mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 17:44:35 +08:00
parent
cfbbfb5cba
commit
93908debec
@ -33,7 +33,7 @@ export const genBaseStyle: GenerateStyle<AlertToken> = (token: AlertToken): CSSO
|
|||||||
fontSize,
|
fontSize,
|
||||||
fontSizeLG,
|
fontSizeLG,
|
||||||
lineHeight,
|
lineHeight,
|
||||||
controlRadius: borderRadius,
|
radiusLG: borderRadius,
|
||||||
motionEaseInOutCirc,
|
motionEaseInOutCirc,
|
||||||
alertIconSizeLG,
|
alertIconSizeLG,
|
||||||
colorText,
|
colorText,
|
||||||
|
@ -14,7 +14,6 @@ type AvatarToken = FullToken<'Avatar'> & {
|
|||||||
avatarFontSizeBase: number;
|
avatarFontSizeBase: number;
|
||||||
avatarFontSizeLG: number;
|
avatarFontSizeLG: number;
|
||||||
avatarFontSizeSM: number;
|
avatarFontSizeSM: number;
|
||||||
avatarBorderRadius: number;
|
|
||||||
avatarGroupOverlapping: number;
|
avatarGroupOverlapping: number;
|
||||||
avatarGroupSpace: number;
|
avatarGroupSpace: number;
|
||||||
avatarGroupBorderColor: string;
|
avatarGroupBorderColor: string;
|
||||||
@ -34,18 +33,24 @@ const genBaseStyle: GenerateStyle<AvatarToken> = token => {
|
|||||||
avatarFontSizeBase,
|
avatarFontSizeBase,
|
||||||
avatarFontSizeLG,
|
avatarFontSizeLG,
|
||||||
avatarFontSizeSM,
|
avatarFontSizeSM,
|
||||||
avatarBorderRadius,
|
controlRadius,
|
||||||
|
controlRadiusLG,
|
||||||
|
controlRadiusSM,
|
||||||
lineWidth,
|
lineWidth,
|
||||||
lineType,
|
lineType,
|
||||||
} = token;
|
} = token;
|
||||||
|
|
||||||
// Avatar size style
|
// Avatar size style
|
||||||
const avatarSizeStyle = (size: number, fontSize: number): CSSObject => ({
|
const avatarSizeStyle = (size: number, fontSize: number, radius: number): CSSObject => ({
|
||||||
width: size,
|
width: size,
|
||||||
height: size,
|
height: size,
|
||||||
lineHeight: `${size - lineWidth * 2}px`,
|
lineHeight: `${size - lineWidth * 2}px`,
|
||||||
borderRadius: '50%',
|
borderRadius: '50%',
|
||||||
|
|
||||||
|
[`&${componentCls}-square`]: {
|
||||||
|
borderRadius: radius,
|
||||||
|
},
|
||||||
|
|
||||||
[`${componentCls}-string`]: {
|
[`${componentCls}-string`]: {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
left: {
|
left: {
|
||||||
@ -84,18 +89,14 @@ const genBaseStyle: GenerateStyle<AvatarToken> = token => {
|
|||||||
display: 'block',
|
display: 'block',
|
||||||
},
|
},
|
||||||
|
|
||||||
...avatarSizeStyle(avatarSizeBase, avatarFontSizeBase),
|
...avatarSizeStyle(avatarSizeBase, avatarFontSizeBase, controlRadius),
|
||||||
|
|
||||||
[`&-lg`]: {
|
[`&-lg`]: {
|
||||||
...avatarSizeStyle(avatarSizeLG, avatarFontSizeLG),
|
...avatarSizeStyle(avatarSizeLG, avatarFontSizeLG, controlRadiusLG),
|
||||||
},
|
},
|
||||||
|
|
||||||
[`&-sm`]: {
|
[`&-sm`]: {
|
||||||
...avatarSizeStyle(avatarSizeSM, avatarFontSizeSM),
|
...avatarSizeStyle(avatarSizeSM, avatarFontSizeSM, controlRadiusSM),
|
||||||
},
|
|
||||||
|
|
||||||
[`&-square`]: {
|
|
||||||
borderRadius: avatarBorderRadius,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
'> img': {
|
'> img': {
|
||||||
@ -161,7 +162,6 @@ export default genComponentStyleHook('Avatar', token => {
|
|||||||
avatarFontSizeBase: Math.round((fontSizeLG + fontSizeXL) / 2),
|
avatarFontSizeBase: Math.round((fontSizeLG + fontSizeXL) / 2),
|
||||||
avatarFontSizeLG: fontSizeHeading3,
|
avatarFontSizeLG: fontSizeHeading3,
|
||||||
avatarFontSizeSM: fontSize,
|
avatarFontSizeSM: fontSize,
|
||||||
avatarBorderRadius: token.radiusBase,
|
|
||||||
avatarGroupOverlapping: marginXS,
|
avatarGroupOverlapping: marginXS,
|
||||||
avatarGroupSpace: marginXS,
|
avatarGroupSpace: marginXS,
|
||||||
avatarGroupBorderColor: colorBorderBg,
|
avatarGroupBorderColor: colorBorderBg,
|
||||||
|
@ -281,7 +281,7 @@ const genSharedBadgeStyle: GenerateStyle<BadgeToken> = (token: BadgeToken): CSSO
|
|||||||
lineHeight: `${badgeFontHeight}px`,
|
lineHeight: `${badgeFontHeight}px`,
|
||||||
whiteSpace: 'nowrap',
|
whiteSpace: 'nowrap',
|
||||||
backgroundColor: token.colorPrimary,
|
backgroundColor: token.colorPrimary,
|
||||||
borderRadius: token.controlRadius,
|
borderRadius: token.controlRadiusSM,
|
||||||
[`${ribbonPrefixCls}-text`]: { color: token.colorTextLightSolid },
|
[`${ribbonPrefixCls}-text`]: { color: token.colorTextLightSolid },
|
||||||
[`${ribbonPrefixCls}-corner`]: {
|
[`${ribbonPrefixCls}-corner`]: {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
|
@ -110,8 +110,6 @@ const genSolidDisabledButtonStyle: GenerateStyle<ButtonToken, CSSObject> = token
|
|||||||
});
|
});
|
||||||
|
|
||||||
const genSolidButtonStyle: GenerateStyle<ButtonToken, CSSObject> = token => ({
|
const genSolidButtonStyle: GenerateStyle<ButtonToken, CSSObject> = token => ({
|
||||||
borderRadius: token.controlRadius,
|
|
||||||
|
|
||||||
...genSolidDisabledButtonStyle(token),
|
...genSolidDisabledButtonStyle(token),
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -266,8 +264,6 @@ const genLinkButtonStyle: GenerateStyle<ButtonToken, CSSObject> = token => ({
|
|||||||
|
|
||||||
// Type: Text
|
// Type: Text
|
||||||
const genTextButtonStyle: GenerateStyle<ButtonToken, CSSObject> = token => ({
|
const genTextButtonStyle: GenerateStyle<ButtonToken, CSSObject> = token => ({
|
||||||
borderRadius: token.controlRadius,
|
|
||||||
|
|
||||||
...genHoverActiveButtonStyle(
|
...genHoverActiveButtonStyle(
|
||||||
{
|
{
|
||||||
backgroundColor: token.colorBgTextHover,
|
backgroundColor: token.colorBgTextHover,
|
||||||
@ -317,6 +313,7 @@ const genSizeButtonStyle = (token: ButtonToken, sizePrefixCls: string = ''): CSS
|
|||||||
fontSize: token.fontSize,
|
fontSize: token.fontSize,
|
||||||
height: token.controlHeight,
|
height: token.controlHeight,
|
||||||
padding: `${paddingVertical}px ${paddingHorizontal}px`,
|
padding: `${paddingVertical}px ${paddingHorizontal}px`,
|
||||||
|
borderRadius: token.controlRadius,
|
||||||
|
|
||||||
[`&${iconOnlyCls}`]: {
|
[`&${iconOnlyCls}`]: {
|
||||||
width: token.controlHeight,
|
width: token.controlHeight,
|
||||||
@ -357,18 +354,20 @@ const genSizeButtonStyle = (token: ButtonToken, sizePrefixCls: string = ''): CSS
|
|||||||
const genSizeBaseButtonStyle: GenerateStyle<ButtonToken> = token => genSizeButtonStyle(token);
|
const genSizeBaseButtonStyle: GenerateStyle<ButtonToken> = token => genSizeButtonStyle(token);
|
||||||
|
|
||||||
const genSizeSmallButtonStyle: GenerateStyle<ButtonToken> = token => {
|
const genSizeSmallButtonStyle: GenerateStyle<ButtonToken> = token => {
|
||||||
const largeToken = mergeToken<ButtonToken>(token, {
|
const smallToken = mergeToken<ButtonToken>(token, {
|
||||||
controlHeight: token.controlHeightSM,
|
controlHeight: token.controlHeightSM,
|
||||||
padding: token.paddingXS,
|
padding: token.paddingXS,
|
||||||
|
controlRadius: token.controlRadiusSM,
|
||||||
});
|
});
|
||||||
|
|
||||||
return genSizeButtonStyle(largeToken, `${token.componentCls}-sm`);
|
return genSizeButtonStyle(smallToken, `${token.componentCls}-sm`);
|
||||||
};
|
};
|
||||||
|
|
||||||
const genSizeLargeButtonStyle: GenerateStyle<ButtonToken> = token => {
|
const genSizeLargeButtonStyle: GenerateStyle<ButtonToken> = token => {
|
||||||
const largeToken = mergeToken<ButtonToken>(token, {
|
const largeToken = mergeToken<ButtonToken>(token, {
|
||||||
controlHeight: token.controlHeightLG,
|
controlHeight: token.controlHeightLG,
|
||||||
fontSize: token.fontSizeLG,
|
fontSize: token.fontSizeLG,
|
||||||
|
controlRadius: token.controlRadiusLG,
|
||||||
});
|
});
|
||||||
|
|
||||||
return genSizeButtonStyle(largeToken, `${token.componentCls}-lg`);
|
return genSizeButtonStyle(largeToken, `${token.componentCls}-lg`);
|
||||||
|
@ -38,7 +38,7 @@ export default App;
|
|||||||
.site-calendar-demo-card {
|
.site-calendar-demo-card {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
border: 1px solid #f0f0f0;
|
border: 1px solid #f0f0f0;
|
||||||
border-radius: 2px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -67,13 +67,13 @@ export const genCalendarStyles = (token: CalendarToken): CSSObject => {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
[`${calendarCls}-mini`]: {
|
[`${calendarCls}-mini`]: {
|
||||||
borderRadius: token.radiusBase,
|
borderRadius: token.controlRadiusLG,
|
||||||
[`${calendarCls}-header`]: {
|
[`${calendarCls}-header`]: {
|
||||||
paddingInlineEnd: token.paddingXS,
|
paddingInlineEnd: token.paddingXS,
|
||||||
paddingInlineStart: token.paddingXS,
|
paddingInlineStart: token.paddingXS,
|
||||||
},
|
},
|
||||||
[`${componentCls}-panel`]: {
|
[`${componentCls}-panel`]: {
|
||||||
borderRadius: `0 0 ${token.radiusBase}px ${token.radiusBase}px`,
|
borderRadius: `0 0 ${token.controlRadiusLG}px ${token.controlRadiusLG}px`,
|
||||||
},
|
},
|
||||||
[`${componentCls}-content`]: {
|
[`${componentCls}-content`]: {
|
||||||
height: token.miniContentHeight,
|
height: token.miniContentHeight,
|
||||||
|
@ -37,7 +37,7 @@ const genCardHeadStyle: GenerateStyle<CardToken> = (token): CSSObject => {
|
|||||||
fontSize: token.fontSizeLG,
|
fontSize: token.fontSizeLG,
|
||||||
background: 'transparent',
|
background: 'transparent',
|
||||||
borderBottom: `${token.controlLineWidth}px ${token.controlLineType} ${token.colorBorderSecondary}`,
|
borderBottom: `${token.controlLineWidth}px ${token.controlLineType} ${token.colorBorderSecondary}`,
|
||||||
borderRadius: `${token.radiusBase}px ${token.radiusBase}px 0 0`,
|
borderRadius: `${token.radiusLG}px ${token.radiusLG}px 0 0`,
|
||||||
|
|
||||||
...clearFix(),
|
...clearFix(),
|
||||||
|
|
||||||
@ -246,7 +246,7 @@ const genCardStyle: GenerateStyle<CardToken> = (token): CSSObject => {
|
|||||||
|
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
background: token.colorBgContainer,
|
background: token.colorBgContainer,
|
||||||
borderRadius: token.radiusBase,
|
borderRadius: token.radiusLG,
|
||||||
|
|
||||||
[`${componentCls}-head`]: genCardHeadStyle(token),
|
[`${componentCls}-head`]: genCardHeadStyle(token),
|
||||||
|
|
||||||
@ -273,7 +273,7 @@ const genCardStyle: GenerateStyle<CardToken> = (token): CSSObject => {
|
|||||||
},
|
},
|
||||||
|
|
||||||
img: {
|
img: {
|
||||||
borderRadius: `${token.radiusBase}px ${token.radiusBase}px 0 0`,
|
borderRadius: `${token.radiusLG}px ${token.radiusLG}px 0 0`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ export const genCheckboxStyle: GenerateStyle<CheckboxToken> = token => {
|
|||||||
direction: 'ltr',
|
direction: 'ltr',
|
||||||
backgroundColor: token.colorBgContainer,
|
backgroundColor: token.colorBgContainer,
|
||||||
border: `${token.controlLineWidth}px ${token.controlLineType} ${token.colorBorder}`,
|
border: `${token.controlLineWidth}px ${token.controlLineType} ${token.colorBorder}`,
|
||||||
borderRadius: token.controlRadius,
|
borderRadius: token.controlRadiusSM,
|
||||||
borderCollapse: 'separate',
|
borderCollapse: 'separate',
|
||||||
transition: `all ${token.motionDurationSlow}`,
|
transition: `all ${token.motionDurationSlow}`,
|
||||||
|
|
||||||
@ -193,7 +193,7 @@ export const genCheckboxStyle: GenerateStyle<CheckboxToken> = token => {
|
|||||||
width: '100%',
|
width: '100%',
|
||||||
height: '100%',
|
height: '100%',
|
||||||
border: `${token.controlLineWidth}px ${token.controlLineType} ${token.colorPrimary}`,
|
border: `${token.controlLineWidth}px ${token.controlLineType} ${token.colorPrimary}`,
|
||||||
borderRadius: token.controlRadius,
|
borderRadius: token.controlRadiusSM,
|
||||||
visibility: 'hidden',
|
visibility: 'hidden',
|
||||||
animationName: antCheckboxEffect,
|
animationName: antCheckboxEffect,
|
||||||
animationDuration: token.motionDurationSlow,
|
animationDuration: token.motionDurationSlow,
|
||||||
|
@ -245,7 +245,7 @@ export default genComponentStyleHook('Collapse', token => {
|
|||||||
collapseContentPadding: token.padding,
|
collapseContentPadding: token.padding,
|
||||||
collapseHeaderBg: token.colorFillAlter,
|
collapseHeaderBg: token.colorFillAlter,
|
||||||
collapseHeaderPadding: `${token.paddingSM}px ${token.padding}px`,
|
collapseHeaderPadding: `${token.paddingSM}px ${token.padding}px`,
|
||||||
collapsePanelBorderRadius: token.radiusBase,
|
collapsePanelBorderRadius: token.radiusLG,
|
||||||
});
|
});
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
@ -80,7 +80,7 @@ const genPickerCellInnerStyle = (token: SharedPickerToken): CSSObject => {
|
|||||||
minWidth: token.pickerPanelCellHeight,
|
minWidth: token.pickerPanelCellHeight,
|
||||||
height: token.pickerPanelCellHeight,
|
height: token.pickerPanelCellHeight,
|
||||||
lineHeight: `${token.pickerPanelCellHeight}px`,
|
lineHeight: `${token.pickerPanelCellHeight}px`,
|
||||||
borderRadius: token.radiusBase,
|
borderRadius: token.controlRadiusSM,
|
||||||
transition: `background ${token.motionDurationSlow}, border ${token.motionDurationSlow}`,
|
transition: `background ${token.motionDurationSlow}, border ${token.motionDurationSlow}`,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -103,7 +103,7 @@ const genPickerCellInnerStyle = (token: SharedPickerToken): CSSObject => {
|
|||||||
insetInlineStart: 0,
|
insetInlineStart: 0,
|
||||||
zIndex: 1,
|
zIndex: 1,
|
||||||
border: `${token.controlLineWidth}px ${token.controlLineType} ${token.colorPrimary}`,
|
border: `${token.controlLineWidth}px ${token.controlLineType} ${token.colorPrimary}`,
|
||||||
borderRadius: token.radiusBase,
|
borderRadius: token.controlRadiusSM,
|
||||||
content: '""',
|
content: '""',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -187,8 +187,8 @@ const genPickerCellInnerStyle = (token: SharedPickerToken): CSSObject => {
|
|||||||
// range start border-radius
|
// range start border-radius
|
||||||
[`&-in-view:is(&-range-start):not(&-range-start-single):not(&-range-end) ${pickerCellInnerCls}`]:
|
[`&-in-view:is(&-range-start):not(&-range-start-single):not(&-range-end) ${pickerCellInnerCls}`]:
|
||||||
{
|
{
|
||||||
borderStartStartRadius: token.radiusBase,
|
borderStartStartRadius: token.controlRadiusSM,
|
||||||
borderEndStartRadius: token.radiusBase,
|
borderEndStartRadius: token.controlRadiusSM,
|
||||||
borderStartEndRadius: 0,
|
borderStartEndRadius: 0,
|
||||||
borderEndEndRadius: 0,
|
borderEndEndRadius: 0,
|
||||||
},
|
},
|
||||||
@ -198,8 +198,8 @@ const genPickerCellInnerStyle = (token: SharedPickerToken): CSSObject => {
|
|||||||
{
|
{
|
||||||
borderStartStartRadius: 0,
|
borderStartStartRadius: 0,
|
||||||
borderEndStartRadius: 0,
|
borderEndStartRadius: 0,
|
||||||
borderStartEndRadius: token.radiusBase,
|
borderStartEndRadius: token.controlRadiusSM,
|
||||||
borderEndEndRadius: token.radiusBase,
|
borderEndEndRadius: token.controlRadiusSM,
|
||||||
},
|
},
|
||||||
|
|
||||||
'&-range-hover:is(&-range-end)::after': {
|
'&-range-hover:is(&-range-end)::after': {
|
||||||
@ -265,7 +265,7 @@ export const genPanelStyle = (token: SharedPickerToken): CSSObject => {
|
|||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
background: token.colorBgContainer,
|
background: token.colorBgContainer,
|
||||||
border: `${token.controlLineWidth}px ${token.controlLineType} ${token.colorBorder}`,
|
border: `${token.controlLineWidth}px ${token.controlLineType} ${token.colorBorder}`,
|
||||||
borderRadius: token.radiusBase,
|
borderRadius: token.controlRadiusLG,
|
||||||
outline: 'none',
|
outline: 'none',
|
||||||
|
|
||||||
'&-focused': {
|
'&-focused': {
|
||||||
@ -563,8 +563,8 @@ export const genPanelStyle = (token: SharedPickerToken): CSSObject => {
|
|||||||
[`${componentCls}-cell-range-hover-start::after`]: {
|
[`${componentCls}-cell-range-hover-start::after`]: {
|
||||||
insetInlineStart: hoverCellFixedDistance,
|
insetInlineStart: hoverCellFixedDistance,
|
||||||
borderInlineStart: `${token.controlLineWidth}px dashed ${token.pickerDateHoverRangeBorderColor}`,
|
borderInlineStart: `${token.controlLineWidth}px dashed ${token.pickerDateHoverRangeBorderColor}`,
|
||||||
borderStartStartRadius: token.radiusBase,
|
borderStartStartRadius: token.controlRadiusSM,
|
||||||
borderBottomStartRadius: token.radiusBase,
|
borderBottomStartRadius: token.controlRadiusSM,
|
||||||
borderStartEndRadius: 0,
|
borderStartEndRadius: 0,
|
||||||
borderBottomEndRadius: 0,
|
borderBottomEndRadius: 0,
|
||||||
|
|
||||||
@ -573,8 +573,8 @@ export const genPanelStyle = (token: SharedPickerToken): CSSObject => {
|
|||||||
borderInlineEnd: `${token.controlLineWidth}px dashed ${token.pickerDateHoverRangeBorderColor}`,
|
borderInlineEnd: `${token.controlLineWidth}px dashed ${token.pickerDateHoverRangeBorderColor}`,
|
||||||
borderStartStartRadius: 0,
|
borderStartStartRadius: 0,
|
||||||
borderBottomStartRadius: 0,
|
borderBottomStartRadius: 0,
|
||||||
borderStartEndRadius: token.radiusBase,
|
borderStartEndRadius: token.controlRadiusSM,
|
||||||
borderBottomEndRadius: token.radiusBase,
|
borderBottomEndRadius: token.controlRadiusSM,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
[`${componentCls}-cell-range-hover-end::after`]: {
|
[`${componentCls}-cell-range-hover-end::after`]: {
|
||||||
@ -582,14 +582,14 @@ export const genPanelStyle = (token: SharedPickerToken): CSSObject => {
|
|||||||
borderInlineEnd: `${token.controlLineWidth}px dashed ${token.pickerDateHoverRangeBorderColor}`,
|
borderInlineEnd: `${token.controlLineWidth}px dashed ${token.pickerDateHoverRangeBorderColor}`,
|
||||||
borderStartStartRadius: 0,
|
borderStartStartRadius: 0,
|
||||||
borderBottomStartRadius: 0,
|
borderBottomStartRadius: 0,
|
||||||
borderStartEndRadius: token.radiusBase,
|
borderStartEndRadius: token.controlRadius,
|
||||||
borderBottomEndRadius: token.radiusBase,
|
borderBottomEndRadius: token.controlRadius,
|
||||||
|
|
||||||
[`${componentCls}-panel-rtl &`]: {
|
[`${componentCls}-panel-rtl &`]: {
|
||||||
insetInlineStart: hoverCellFixedDistance,
|
insetInlineStart: hoverCellFixedDistance,
|
||||||
borderInlineStart: `${token.controlLineWidth}px dashed ${token.pickerDateHoverRangeBorderColor}`,
|
borderInlineStart: `${token.controlLineWidth}px dashed ${token.pickerDateHoverRangeBorderColor}`,
|
||||||
borderStartStartRadius: token.radiusBase,
|
borderStartStartRadius: token.controlRadius,
|
||||||
borderBottomStartRadius: token.radiusBase,
|
borderBottomStartRadius: token.controlRadius,
|
||||||
borderStartEndRadius: 0,
|
borderStartEndRadius: 0,
|
||||||
borderBottomEndRadius: 0,
|
borderBottomEndRadius: 0,
|
||||||
},
|
},
|
||||||
@ -834,7 +834,7 @@ const genPickerStyle: GenerateStyle<PickerToken> = token => {
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
background: token.colorBgContainer,
|
background: token.colorBgContainer,
|
||||||
border: `${token.controlLineWidth}px ${token.controlLineType} ${token.colorBorder}`,
|
border: `${token.controlLineWidth}px ${token.controlLineType} ${token.colorBorder}`,
|
||||||
borderRadius: token.radiusBase,
|
borderRadius: token.controlRadius,
|
||||||
transition: `border ${token.motionDurationSlow}, box-shadow ${token.motionDurationSlow}`,
|
transition: `border ${token.motionDurationSlow}, box-shadow ${token.motionDurationSlow}`,
|
||||||
|
|
||||||
'&:hover, &-focused': {
|
'&:hover, &-focused': {
|
||||||
@ -1141,14 +1141,19 @@ const genPickerStyle: GenerateStyle<PickerToken> = token => {
|
|||||||
marginInlineStart: token.inputPaddingHorizontal * 1.5,
|
marginInlineStart: token.inputPaddingHorizontal * 1.5,
|
||||||
boxShadow: token.boxShadowPopoverArrowBottom,
|
boxShadow: token.boxShadowPopoverArrowBottom,
|
||||||
transition: `left ${token.motionDurationSlow} ease-out`,
|
transition: `left ${token.motionDurationSlow} ease-out`,
|
||||||
...roundedArrow(token.sizePopupArrow, 5, token.colorBgElevated),
|
...roundedArrow(
|
||||||
|
token.sizePopupArrow,
|
||||||
|
token.radiusXS,
|
||||||
|
token.radiusOuter,
|
||||||
|
token.colorBgElevated,
|
||||||
|
),
|
||||||
},
|
},
|
||||||
|
|
||||||
[`${componentCls}-panel-container`]: {
|
[`${componentCls}-panel-container`]: {
|
||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
verticalAlign: 'top',
|
verticalAlign: 'top',
|
||||||
background: token.colorBgElevated,
|
background: token.colorBgElevated,
|
||||||
borderRadius: token.radiusBase,
|
borderRadius: token.controlRadiusLG,
|
||||||
boxShadow: token.boxShadow,
|
boxShadow: token.boxShadow,
|
||||||
transition: `margin ${token.motionDurationSlow}`,
|
transition: `margin ${token.motionDurationSlow}`,
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ const genDescriptionStyles: GenerateStyle<DescriptionsToken> = (token: Descripti
|
|||||||
},
|
},
|
||||||
[`${componentCls}-view`]: {
|
[`${componentCls}-view`]: {
|
||||||
width: '100%',
|
width: '100%',
|
||||||
borderRadius: token.radiusBase,
|
borderRadius: token.radiusLG,
|
||||||
table: {
|
table: {
|
||||||
width: '100%',
|
width: '100%',
|
||||||
tableLayout: 'fixed',
|
tableLayout: 'fixed',
|
||||||
|
@ -126,7 +126,7 @@ const genBaseStyle: GenerateStyle<DropdownToken> = token => {
|
|||||||
width: sizePopupArrow,
|
width: sizePopupArrow,
|
||||||
height: sizePopupArrow,
|
height: sizePopupArrow,
|
||||||
|
|
||||||
...roundedArrow(sizePopupArrow, 5, colorBgElevated),
|
...roundedArrow(sizePopupArrow, token.radiusXS, token.radiusOuter, colorBgElevated),
|
||||||
},
|
},
|
||||||
|
|
||||||
[`
|
[`
|
||||||
@ -261,7 +261,7 @@ const genBaseStyle: GenerateStyle<DropdownToken> = token => {
|
|||||||
listStyleType: 'none',
|
listStyleType: 'none',
|
||||||
backgroundColor: colorBgElevated,
|
backgroundColor: colorBgElevated,
|
||||||
backgroundClip: 'padding-box',
|
backgroundClip: 'padding-box',
|
||||||
borderRadius: token.controlRadius,
|
borderRadius: token.controlRadiusLG,
|
||||||
outline: 'none',
|
outline: 'none',
|
||||||
boxShadow: token.boxShadow,
|
boxShadow: token.boxShadow,
|
||||||
|
|
||||||
|
@ -124,8 +124,8 @@ const InputNumber = React.forwardRef<HTMLInputElement, InputNumberProps>((props,
|
|||||||
{
|
{
|
||||||
[`${prefixCls}-affix-wrapper-focused`]: focused,
|
[`${prefixCls}-affix-wrapper-focused`]: focused,
|
||||||
[`${prefixCls}-affix-wrapper-disabled`]: props.disabled,
|
[`${prefixCls}-affix-wrapper-disabled`]: props.disabled,
|
||||||
[`${prefixCls}-affix-wrapper-sm`]: size === 'small',
|
[`${prefixCls}-affix-wrapper-sm`]: mergeSize === 'small',
|
||||||
[`${prefixCls}-affix-wrapper-lg`]: size === 'large',
|
[`${prefixCls}-affix-wrapper-lg`]: mergeSize === 'large',
|
||||||
[`${prefixCls}-affix-wrapper-rtl`]: direction === 'rtl',
|
[`${prefixCls}-affix-wrapper-rtl`]: direction === 'rtl',
|
||||||
[`${prefixCls}-affix-wrapper-readonly`]: readOnly,
|
[`${prefixCls}-affix-wrapper-readonly`]: readOnly,
|
||||||
[`${prefixCls}-affix-wrapper-borderless`]: !bordered,
|
[`${prefixCls}-affix-wrapper-borderless`]: !bordered,
|
||||||
@ -174,8 +174,8 @@ const InputNumber = React.forwardRef<HTMLInputElement, InputNumberProps>((props,
|
|||||||
const mergedGroupClassName = classNames(
|
const mergedGroupClassName = classNames(
|
||||||
`${prefixCls}-group-wrapper`,
|
`${prefixCls}-group-wrapper`,
|
||||||
{
|
{
|
||||||
[`${prefixCls}-group-wrapper-sm`]: size === 'small',
|
[`${prefixCls}-group-wrapper-sm`]: mergeSize === 'small',
|
||||||
[`${prefixCls}-group-wrapper-lg`]: size === 'large',
|
[`${prefixCls}-group-wrapper-lg`]: mergeSize === 'large',
|
||||||
[`${prefixCls}-group-wrapper-rtl`]: direction === 'rtl',
|
[`${prefixCls}-group-wrapper-rtl`]: direction === 'rtl',
|
||||||
},
|
},
|
||||||
getStatusClassNames(`${prefixCls}-group-wrapper`, mergedStatus, hasFeedback),
|
getStatusClassNames(`${prefixCls}-group-wrapper`, mergedStatus, hasFeedback),
|
||||||
|
@ -42,6 +42,8 @@ const genInputNumberStyles: GenerateStyle<InputNumberToken> = (token: InputNumbe
|
|||||||
colorBgContainer,
|
colorBgContainer,
|
||||||
motionDurationMid,
|
motionDurationMid,
|
||||||
colorTextDisabled,
|
colorTextDisabled,
|
||||||
|
controlRadiusSM,
|
||||||
|
controlRadiusLG,
|
||||||
controlWidth,
|
controlWidth,
|
||||||
} = token;
|
} = token;
|
||||||
|
|
||||||
@ -70,6 +72,7 @@ const genInputNumberStyles: GenerateStyle<InputNumberToken> = (token: InputNumbe
|
|||||||
'&-lg': {
|
'&-lg': {
|
||||||
padding: 0,
|
padding: 0,
|
||||||
fontSize: fontSizeLG,
|
fontSize: fontSizeLG,
|
||||||
|
borderRadius: controlRadiusLG,
|
||||||
|
|
||||||
[`input${componentCls}-input`]: {
|
[`input${componentCls}-input`]: {
|
||||||
height: controlHeightLG - 2 * controlLineWidth,
|
height: controlHeightLG - 2 * controlLineWidth,
|
||||||
@ -78,6 +81,7 @@ const genInputNumberStyles: GenerateStyle<InputNumberToken> = (token: InputNumbe
|
|||||||
|
|
||||||
'&-sm': {
|
'&-sm': {
|
||||||
padding: 0,
|
padding: 0,
|
||||||
|
borderRadius: controlRadiusSM,
|
||||||
|
|
||||||
[`input${componentCls}-input`]: {
|
[`input${componentCls}-input`]: {
|
||||||
height: controlHeightSM - 2 * controlLineWidth,
|
height: controlHeightSM - 2 * controlLineWidth,
|
||||||
@ -120,6 +124,18 @@ const genInputNumberStyles: GenerateStyle<InputNumberToken> = (token: InputNumbe
|
|||||||
[`${componentCls}-affix-wrapper`]: {
|
[`${componentCls}-affix-wrapper`]: {
|
||||||
width: '100%',
|
width: '100%',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Size
|
||||||
|
'&-lg': {
|
||||||
|
[`${componentCls}-group-addon`]: {
|
||||||
|
borderRadius: controlRadiusLG,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'&-sm': {
|
||||||
|
[`${componentCls}-group-addon`]: {
|
||||||
|
borderRadius: controlRadiusSM,
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -275,7 +291,14 @@ const genInputNumberStyles: GenerateStyle<InputNumberToken> = (token: InputNumbe
|
|||||||
};
|
};
|
||||||
|
|
||||||
const genAffixWrapperStyles: GenerateStyle<InputNumberToken> = (token: InputNumberToken) => {
|
const genAffixWrapperStyles: GenerateStyle<InputNumberToken> = (token: InputNumberToken) => {
|
||||||
const { componentCls, inputPaddingHorizontal, inputAffixPadding, controlWidth } = token;
|
const {
|
||||||
|
componentCls,
|
||||||
|
inputPaddingHorizontal,
|
||||||
|
inputAffixPadding,
|
||||||
|
controlWidth,
|
||||||
|
controlRadiusLG,
|
||||||
|
controlRadiusSM,
|
||||||
|
} = token;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
[`${componentCls}-affix-wrapper`]: {
|
[`${componentCls}-affix-wrapper`]: {
|
||||||
@ -288,6 +311,14 @@ const genAffixWrapperStyles: GenerateStyle<InputNumberToken> = (token: InputNumb
|
|||||||
padding: 0,
|
padding: 0,
|
||||||
paddingInlineStart: inputPaddingHorizontal,
|
paddingInlineStart: inputPaddingHorizontal,
|
||||||
|
|
||||||
|
'&-lg': {
|
||||||
|
borderRadius: controlRadiusLG,
|
||||||
|
},
|
||||||
|
|
||||||
|
'&-sm': {
|
||||||
|
borderRadius: controlRadiusSM,
|
||||||
|
},
|
||||||
|
|
||||||
'&:not(&-disabled):hover': {
|
'&:not(&-disabled):hover': {
|
||||||
...genHoverStyle(token),
|
...genHoverStyle(token),
|
||||||
zIndex: 1,
|
zIndex: 1,
|
||||||
|
@ -55,16 +55,18 @@ export const genDisabledStyle = (token: InputToken): CSSObject => ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const genInputLargeStyle = (token: InputToken): CSSObject => {
|
const genInputLargeStyle = (token: InputToken): CSSObject => {
|
||||||
const { inputPaddingVerticalLG, inputPaddingHorizontal, fontSizeLG } = token;
|
const { inputPaddingVerticalLG, inputPaddingHorizontal, fontSizeLG, controlRadiusLG } = token;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
padding: `${inputPaddingVerticalLG}px ${inputPaddingHorizontal}px`,
|
padding: `${inputPaddingVerticalLG}px ${inputPaddingHorizontal}px`,
|
||||||
fontSize: fontSizeLG,
|
fontSize: fontSizeLG,
|
||||||
|
borderRadius: controlRadiusLG,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
export const genInputSmallStyle = (token: InputToken): CSSObject => ({
|
export const genInputSmallStyle = (token: InputToken): CSSObject => ({
|
||||||
padding: `${token.inputPaddingVerticalSM}px ${token.controlPaddingHorizontalSM - 1}px`,
|
padding: `${token.inputPaddingVerticalSM}px ${token.controlPaddingHorizontalSM - 1}px`,
|
||||||
|
borderRadius: token.controlRadiusSM,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const genStatusStyle = (token: InputToken): CSSObject => {
|
export const genStatusStyle = (token: InputToken): CSSObject => {
|
||||||
@ -653,7 +655,8 @@ const genAffixStyle: GenerateStyle<InputToken> = (token: InputToken) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const genGroupStyle: GenerateStyle<InputToken> = (token: InputToken) => {
|
const genGroupStyle: GenerateStyle<InputToken> = (token: InputToken) => {
|
||||||
const { prefixCls, colorError, colorSuccess } = token;
|
const { prefixCls, colorError, colorSuccess, componentCls, controlRadiusLG, controlRadiusSM } =
|
||||||
|
token;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
[`.${prefixCls}-group`]: {
|
[`.${prefixCls}-group`]: {
|
||||||
@ -675,6 +678,18 @@ const genGroupStyle: GenerateStyle<InputToken> = (token: InputToken) => {
|
|||||||
direction: 'rtl',
|
direction: 'rtl',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Size
|
||||||
|
'&-lg': {
|
||||||
|
[`${componentCls}-group-addon`]: {
|
||||||
|
borderRadius: controlRadiusLG,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
'&-sm': {
|
||||||
|
[`${componentCls}-group-addon`]: {
|
||||||
|
borderRadius: controlRadiusSM,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
// Status
|
// Status
|
||||||
'&-status-error': {
|
'&-status-error': {
|
||||||
[`.${prefixCls}-group-addon`]: {
|
[`.${prefixCls}-group-addon`]: {
|
||||||
|
@ -24,12 +24,12 @@ const genBorderedStyle = (token: ListToken): CSSObject => {
|
|||||||
padding,
|
padding,
|
||||||
listItemPaddingSM,
|
listItemPaddingSM,
|
||||||
marginLG,
|
marginLG,
|
||||||
radiusBase,
|
radiusLG,
|
||||||
} = token;
|
} = token;
|
||||||
return {
|
return {
|
||||||
[`${listBorderedCls}`]: {
|
[`${listBorderedCls}`]: {
|
||||||
border: `${token.lineWidth}px ${token.lineType} ${token.colorBorder}`,
|
border: `${token.lineWidth}px ${token.lineType} ${token.colorBorder}`,
|
||||||
borderRadius: radiusBase,
|
borderRadius: radiusLG,
|
||||||
[`${componentCls}-header,${componentCls}-footer,${componentCls}-item`]: {
|
[`${componentCls}-header,${componentCls}-footer,${componentCls}-item`]: {
|
||||||
paddingInline: paddingLG,
|
paddingInline: paddingLG,
|
||||||
},
|
},
|
||||||
|
@ -33,7 +33,7 @@ const genMentionsStyle: GenerateStyle<MentionsToken> = token => {
|
|||||||
inputPaddingVertical,
|
inputPaddingVertical,
|
||||||
fontSize,
|
fontSize,
|
||||||
colorBgElevated,
|
colorBgElevated,
|
||||||
controlRadius,
|
controlRadiusLG,
|
||||||
boxShadow,
|
boxShadow,
|
||||||
} = token;
|
} = token;
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ const genMentionsStyle: GenerateStyle<MentionsToken> = token => {
|
|||||||
fontSize,
|
fontSize,
|
||||||
fontVariant: 'initial',
|
fontVariant: 'initial',
|
||||||
backgroundColor: colorBgElevated,
|
backgroundColor: colorBgElevated,
|
||||||
borderRadius: controlRadius,
|
borderRadius: controlRadiusLG,
|
||||||
outline: 'none',
|
outline: 'none',
|
||||||
boxShadow,
|
boxShadow,
|
||||||
|
|
||||||
@ -177,8 +177,8 @@ const genMentionsStyle: GenerateStyle<MentionsToken> = token => {
|
|||||||
},
|
},
|
||||||
|
|
||||||
'&:first-child': {
|
'&:first-child': {
|
||||||
borderStartStartRadius: controlRadius,
|
borderStartStartRadius: controlRadiusLG,
|
||||||
borderStartEndRadius: controlRadius,
|
borderStartEndRadius: controlRadiusLG,
|
||||||
borderEndStartRadius: 0,
|
borderEndStartRadius: 0,
|
||||||
borderEndEndRadius: 0,
|
borderEndEndRadius: 0,
|
||||||
},
|
},
|
||||||
@ -186,8 +186,8 @@ const genMentionsStyle: GenerateStyle<MentionsToken> = token => {
|
|||||||
'&:last-child': {
|
'&:last-child': {
|
||||||
borderStartStartRadius: 0,
|
borderStartStartRadius: 0,
|
||||||
borderStartEndRadius: 0,
|
borderStartEndRadius: 0,
|
||||||
borderEndStartRadius: controlRadius,
|
borderEndStartRadius: controlRadiusLG,
|
||||||
borderEndEndRadius: controlRadius,
|
borderEndEndRadius: controlRadiusLG,
|
||||||
},
|
},
|
||||||
|
|
||||||
'&-disabled': {
|
'&-disabled': {
|
||||||
|
@ -31,7 +31,7 @@ const genMessageStyle: GenerateStyle<MessageToken> = token => {
|
|||||||
motionDurationSlow,
|
motionDurationSlow,
|
||||||
marginXS,
|
marginXS,
|
||||||
paddingXS,
|
paddingXS,
|
||||||
radiusBase,
|
radiusLG,
|
||||||
zIndexPopup,
|
zIndexPopup,
|
||||||
// Custom token
|
// Custom token
|
||||||
messageNoticeContentPadding,
|
messageNoticeContentPadding,
|
||||||
@ -128,7 +128,7 @@ const genMessageStyle: GenerateStyle<MessageToken> = token => {
|
|||||||
display: 'inline-block',
|
display: 'inline-block',
|
||||||
padding: messageNoticeContentPadding,
|
padding: messageNoticeContentPadding,
|
||||||
background: colorBgElevated,
|
background: colorBgElevated,
|
||||||
borderRadius: radiusBase,
|
borderRadius: radiusLG,
|
||||||
boxShadow,
|
boxShadow,
|
||||||
pointerEvents: 'all',
|
pointerEvents: 'all',
|
||||||
},
|
},
|
||||||
|
@ -161,7 +161,7 @@ const genModalStyle: GenerateStyle<ModalToken> = token => {
|
|||||||
backgroundColor: token.modalContentBg,
|
backgroundColor: token.modalContentBg,
|
||||||
backgroundClip: 'padding-box',
|
backgroundClip: 'padding-box',
|
||||||
border: 0,
|
border: 0,
|
||||||
borderRadius: token.controlRadius,
|
borderRadius: token.radiusLG,
|
||||||
boxShadow: token.boxShadow,
|
boxShadow: token.boxShadow,
|
||||||
pointerEvents: 'auto',
|
pointerEvents: 'auto',
|
||||||
},
|
},
|
||||||
@ -205,7 +205,7 @@ const genModalStyle: GenerateStyle<ModalToken> = token => {
|
|||||||
color: token.colorText,
|
color: token.colorText,
|
||||||
background: token.modalHeaderBg,
|
background: token.modalHeaderBg,
|
||||||
borderBottom: `${token.modalHeaderBorderWidth}px ${token.modalHeaderBorderStyle} ${token.modalHeaderBorderColorSplit}`,
|
borderBottom: `${token.modalHeaderBorderWidth}px ${token.modalHeaderBorderStyle} ${token.modalHeaderBorderColorSplit}`,
|
||||||
borderRadius: `${token.controlRadius}px ${token.controlRadius}px 0 0`,
|
borderRadius: `${token.radiusLG}px ${token.radiusLG}px 0 0`,
|
||||||
},
|
},
|
||||||
|
|
||||||
[`${componentCls}-body`]: {
|
[`${componentCls}-body`]: {
|
||||||
@ -220,7 +220,7 @@ const genModalStyle: GenerateStyle<ModalToken> = token => {
|
|||||||
textAlign: 'end',
|
textAlign: 'end',
|
||||||
background: token.modalFooterBg,
|
background: token.modalFooterBg,
|
||||||
borderTop: `${token.modalFooterBorderWidth}px ${token.modalFooterBorderStyle} ${token.modalFooterBorderColorSplit}`,
|
borderTop: `${token.modalFooterBorderWidth}px ${token.modalFooterBorderStyle} ${token.modalFooterBorderColorSplit}`,
|
||||||
borderRadius: `0 0 ${token.controlRadius}px ${token.controlRadius}px`,
|
borderRadius: `0 0 ${token.radiusLG}px ${token.radiusLG}px`,
|
||||||
|
|
||||||
[`${token.antCls}-btn + ${token.antCls}-btn:not(${token.antCls}-dropdown-trigger)`]: {
|
[`${token.antCls}-btn + ${token.antCls}-btn:not(${token.antCls}-dropdown-trigger)`]: {
|
||||||
marginBottom: 0,
|
marginBottom: 0,
|
||||||
|
@ -27,7 +27,7 @@ const genNotificationStyle: GenerateStyle<NotificationToken> = token => {
|
|||||||
boxShadow,
|
boxShadow,
|
||||||
fontSizeLG,
|
fontSizeLG,
|
||||||
notificationMarginBottom,
|
notificationMarginBottom,
|
||||||
radiusBase,
|
radiusLG,
|
||||||
colorSuccess,
|
colorSuccess,
|
||||||
colorInfo,
|
colorInfo,
|
||||||
colorWarning,
|
colorWarning,
|
||||||
@ -161,7 +161,7 @@ const genNotificationStyle: GenerateStyle<NotificationToken> = token => {
|
|||||||
lineHeight,
|
lineHeight,
|
||||||
wordWrap: 'break-word',
|
wordWrap: 'break-word',
|
||||||
background: notificationBg,
|
background: notificationBg,
|
||||||
borderRadius: radiusBase,
|
borderRadius: radiusLG,
|
||||||
boxShadow,
|
boxShadow,
|
||||||
|
|
||||||
[`${componentCls}-close-icon`]: {
|
[`${componentCls}-close-icon`]: {
|
||||||
|
@ -33,7 +33,7 @@ const genBaseStyle: GenerateStyle<PopoverToken> = token => {
|
|||||||
boxShadow,
|
boxShadow,
|
||||||
colorSplit,
|
colorSplit,
|
||||||
colorTextHeading,
|
colorTextHeading,
|
||||||
radiusBase: borderRadius,
|
radiusLG: borderRadius,
|
||||||
paddingSM,
|
paddingSM,
|
||||||
zIndexPopup,
|
zIndexPopup,
|
||||||
} = token;
|
} = token;
|
||||||
|
@ -258,6 +258,8 @@ const getRadioButtonStyle: GenerateStyle<RadioToken> = token => {
|
|||||||
controlHeightSM,
|
controlHeightSM,
|
||||||
paddingXS,
|
paddingXS,
|
||||||
controlRadius,
|
controlRadius,
|
||||||
|
controlRadiusSM,
|
||||||
|
controlRadiusLG,
|
||||||
radioDotColor,
|
radioDotColor,
|
||||||
radioButtonFocusShadow,
|
radioButtonFocusShadow,
|
||||||
radioButtonCheckedBg,
|
radioButtonCheckedBg,
|
||||||
@ -308,19 +310,6 @@ const getRadioButtonStyle: GenerateStyle<RadioToken> = token => {
|
|||||||
height: '100%',
|
height: '100%',
|
||||||
},
|
},
|
||||||
|
|
||||||
[`${componentCls}-group-large &`]: {
|
|
||||||
height: controlHeightLG,
|
|
||||||
fontSize: fontSizeLG,
|
|
||||||
lineHeight: `${controlHeightLG - controlLineWidth * 2}px`,
|
|
||||||
},
|
|
||||||
|
|
||||||
[`${componentCls}-group-small &`]: {
|
|
||||||
height: controlHeightSM,
|
|
||||||
paddingInline: paddingXS - controlLineWidth,
|
|
||||||
paddingBlock: 0,
|
|
||||||
lineHeight: `${controlHeightSM - controlLineWidth * 2}px`,
|
|
||||||
},
|
|
||||||
|
|
||||||
'&:not(:first-child)': {
|
'&:not(:first-child)': {
|
||||||
'&::before': {
|
'&::before': {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
@ -353,6 +342,39 @@ const getRadioButtonStyle: GenerateStyle<RadioToken> = token => {
|
|||||||
borderRadius: controlRadius,
|
borderRadius: controlRadius,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
[`${componentCls}-group-large &`]: {
|
||||||
|
height: controlHeightLG,
|
||||||
|
fontSize: fontSizeLG,
|
||||||
|
lineHeight: `${controlHeightLG - controlLineWidth * 2}px`,
|
||||||
|
|
||||||
|
'&:first-child': {
|
||||||
|
borderStartStartRadius: controlRadiusLG,
|
||||||
|
borderEndStartRadius: controlRadiusLG,
|
||||||
|
},
|
||||||
|
|
||||||
|
'&:last-child': {
|
||||||
|
borderStartEndRadius: controlRadiusLG,
|
||||||
|
borderEndEndRadius: controlRadiusLG,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
[`${componentCls}-group-small &`]: {
|
||||||
|
height: controlHeightSM,
|
||||||
|
paddingInline: paddingXS - controlLineWidth,
|
||||||
|
paddingBlock: 0,
|
||||||
|
lineHeight: `${controlHeightSM - controlLineWidth * 2}px`,
|
||||||
|
|
||||||
|
'&:first-child': {
|
||||||
|
borderStartStartRadius: controlRadiusSM,
|
||||||
|
borderEndStartRadius: controlRadiusSM,
|
||||||
|
},
|
||||||
|
|
||||||
|
'&:last-child': {
|
||||||
|
borderStartEndRadius: controlRadiusSM,
|
||||||
|
borderEndEndRadius: controlRadiusSM,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
'&:hover': {
|
'&:hover': {
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
color: radioDotColor,
|
color: radioDotColor,
|
||||||
|
@ -29,7 +29,6 @@ function segmentedDisabledItem(cls: string, token: SegmentedToken): CSSObject {
|
|||||||
function getSegmentedItemSelectedStyle(token: SegmentedToken): CSSObject {
|
function getSegmentedItemSelectedStyle(token: SegmentedToken): CSSObject {
|
||||||
return {
|
return {
|
||||||
backgroundColor: token.bgColorSelected,
|
backgroundColor: token.bgColorSelected,
|
||||||
borderRadius: token.controlRadius,
|
|
||||||
boxShadow: token.boxShadowSegmentedSelectedItem,
|
boxShadow: token.boxShadowSegmentedSelectedItem,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -54,7 +53,7 @@ const genSegmentedStyle: GenerateStyle<SegmentedToken> = (token: SegmentedToken)
|
|||||||
padding: token.segmentedContainerPadding,
|
padding: token.segmentedContainerPadding,
|
||||||
color: token.labelColor,
|
color: token.labelColor,
|
||||||
backgroundColor: token.bgColor,
|
backgroundColor: token.bgColor,
|
||||||
borderRadius: token.radiusBase,
|
borderRadius: token.controlRadius,
|
||||||
transition: `all ${token.motionDurationSlow} ${token.motionEaseInOut}`,
|
transition: `all ${token.motionDurationSlow} ${token.motionEaseInOut}`,
|
||||||
|
|
||||||
[`${componentCls}-group`]: {
|
[`${componentCls}-group`]: {
|
||||||
@ -96,6 +95,7 @@ const genSegmentedStyle: GenerateStyle<SegmentedToken> = (token: SegmentedToken)
|
|||||||
|
|
||||||
'&-selected': {
|
'&-selected': {
|
||||||
...getSegmentedItemSelectedStyle(token),
|
...getSegmentedItemSelectedStyle(token),
|
||||||
|
borderRadius: token.controlRadiusSM,
|
||||||
color: token.labelColorHover,
|
color: token.labelColorHover,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -127,17 +127,29 @@ const genSegmentedStyle: GenerateStyle<SegmentedToken> = (token: SegmentedToken)
|
|||||||
},
|
},
|
||||||
|
|
||||||
// size styles
|
// size styles
|
||||||
[`&&-lg ${componentCls}-item-label`]: {
|
'&&-lg': {
|
||||||
minHeight: token.controlHeightLG - token.segmentedContainerPadding * 2,
|
borderRadius: token.controlRadiusLG,
|
||||||
lineHeight: `${token.controlHeightLG - token.segmentedContainerPadding * 2}px`,
|
[`${componentCls}-item-label`]: {
|
||||||
padding: `0 ${token.segmentedPaddingHorizontal}px`,
|
minHeight: token.controlHeightLG - token.segmentedContainerPadding * 2,
|
||||||
fontSize: token.fontSizeLG,
|
lineHeight: `${token.controlHeightLG - token.segmentedContainerPadding * 2}px`,
|
||||||
|
padding: `0 ${token.segmentedPaddingHorizontal}px`,
|
||||||
|
fontSize: token.fontSizeLG,
|
||||||
|
},
|
||||||
|
[`${componentCls}-item-selected`]: {
|
||||||
|
borderRadius: token.controlRadius,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
[`&&-sm ${componentCls}-item-label`]: {
|
'&&-sm': {
|
||||||
minHeight: token.controlHeightSM - token.segmentedContainerPadding * 2,
|
borderRadius: token.controlRadiusSM,
|
||||||
lineHeight: `${token.controlHeightSM - token.segmentedContainerPadding * 2}px`,
|
[`&&-sm ${componentCls}-item-label`]: {
|
||||||
padding: `0 ${token.segmentedPaddingHorizontalSM}px`,
|
minHeight: token.controlHeightSM - token.segmentedContainerPadding * 2,
|
||||||
|
lineHeight: `${token.controlHeightSM - token.segmentedContainerPadding * 2}px`,
|
||||||
|
padding: `0 ${token.segmentedPaddingHorizontalSM}px`,
|
||||||
|
},
|
||||||
|
[`${componentCls}-item-selected`]: {
|
||||||
|
borderRadius: token.controlRadiusXS,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
// disabled styles
|
// disabled styles
|
||||||
|
@ -52,7 +52,7 @@ const genSingleStyle: GenerateStyle<SelectToken> = token => {
|
|||||||
// https://github.com/ant-design/ant-design/issues/11843
|
// https://github.com/ant-design/ant-design/issues/11843
|
||||||
fontVariant: 'initial',
|
fontVariant: 'initial',
|
||||||
backgroundColor: token.colorBgElevated,
|
backgroundColor: token.colorBgElevated,
|
||||||
borderRadius: token.controlRadius,
|
borderRadius: token.controlRadiusLG,
|
||||||
outline: 'none',
|
outline: 'none',
|
||||||
boxShadow: token.boxShadow,
|
boxShadow: token.boxShadow,
|
||||||
|
|
||||||
|
@ -23,7 +23,6 @@ const genSelectorStyle: GenerateStyle<SelectToken, CSSObject> = token => {
|
|||||||
position: 'relative',
|
position: 'relative',
|
||||||
backgroundColor: token.colorBgContainer,
|
backgroundColor: token.colorBgContainer,
|
||||||
border: `${token.controlLineWidth}px ${token.controlLineType} ${token.colorBorder}`,
|
border: `${token.controlLineWidth}px ${token.controlLineType} ${token.colorBorder}`,
|
||||||
borderRadius: token.controlRadius,
|
|
||||||
transition: `all ${token.motionDurationSlow} ${token.motionEaseInOut}`,
|
transition: `all ${token.motionDurationSlow} ${token.motionEaseInOut}`,
|
||||||
|
|
||||||
input: {
|
input: {
|
||||||
|
@ -56,6 +56,7 @@ function genSizeStyle(token: SelectToken, suffix?: string): CSSObject {
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
// Multiple is little different that horizontal is follow the vertical
|
// Multiple is little different that horizontal is follow the vertical
|
||||||
padding: `${selectItemDist - FIXED_ITEM_MARGIN}px ${FIXED_ITEM_MARGIN * 2}px`,
|
padding: `${selectItemDist - FIXED_ITEM_MARGIN}px ${FIXED_ITEM_MARGIN * 2}px`,
|
||||||
|
borderRadius: token.controlRadius,
|
||||||
|
|
||||||
[`${componentCls}-show-search&`]: {
|
[`${componentCls}-show-search&`]: {
|
||||||
cursor: 'text',
|
cursor: 'text',
|
||||||
@ -95,7 +96,7 @@ function genSizeStyle(token: SelectToken, suffix?: string): CSSObject {
|
|||||||
lineHeight: `${selectItemHeight - token.controlLineWidth * 2}px`,
|
lineHeight: `${selectItemHeight - token.controlLineWidth * 2}px`,
|
||||||
background: token.colorFillSecondary,
|
background: token.colorFillSecondary,
|
||||||
border: `${token.controlLineWidth}px solid ${token.colorSplit}`,
|
border: `${token.controlLineWidth}px solid ${token.colorSplit}`,
|
||||||
borderRadius: token.controlRadius,
|
borderRadius: token.controlRadiusSM,
|
||||||
cursor: 'default',
|
cursor: 'default',
|
||||||
transition: `font-size ${token.motionDurationSlow}, line-height ${token.motionDurationSlow}, height ${token.motionDurationSlow}`,
|
transition: `font-size ${token.motionDurationSlow}, line-height ${token.motionDurationSlow}, height ${token.motionDurationSlow}`,
|
||||||
userSelect: 'none',
|
userSelect: 'none',
|
||||||
@ -196,6 +197,8 @@ export default function genMultipleStyle(token: SelectToken): CSSInterpolation {
|
|||||||
const smallToken = mergeToken<SelectToken>(token, {
|
const smallToken = mergeToken<SelectToken>(token, {
|
||||||
controlHeight: token.controlHeightSM,
|
controlHeight: token.controlHeightSM,
|
||||||
controlHeightSM: token.controlHeightXS,
|
controlHeightSM: token.controlHeightXS,
|
||||||
|
controlRadius: token.controlRadiusSM,
|
||||||
|
controlRadiusSM: token.controlRadiusXS,
|
||||||
});
|
});
|
||||||
const [, smSelectItemMargin] = getSelectItemStyle(token);
|
const [, smSelectItemMargin] = getSelectItemStyle(token);
|
||||||
|
|
||||||
@ -227,6 +230,8 @@ export default function genMultipleStyle(token: SelectToken): CSSInterpolation {
|
|||||||
fontSize: token.fontSizeLG,
|
fontSize: token.fontSizeLG,
|
||||||
controlHeight: token.controlHeightLG,
|
controlHeight: token.controlHeightLG,
|
||||||
controlHeightSM: token.controlHeight,
|
controlHeightSM: token.controlHeight,
|
||||||
|
controlRadius: token.controlRadiusLG,
|
||||||
|
controlRadiusSM: token.controlRadius,
|
||||||
}),
|
}),
|
||||||
'lg',
|
'lg',
|
||||||
),
|
),
|
||||||
|
@ -4,7 +4,7 @@ import type { SelectToken } from '.';
|
|||||||
import { mergeToken } from '../../theme';
|
import { mergeToken } from '../../theme';
|
||||||
|
|
||||||
function genSizeStyle(token: SelectToken, suffix?: string): CSSObject {
|
function genSizeStyle(token: SelectToken, suffix?: string): CSSObject {
|
||||||
const { componentCls, inputPaddingHorizontalBase } = token;
|
const { componentCls, inputPaddingHorizontalBase, controlRadius } = token;
|
||||||
|
|
||||||
const selectHeightWithoutBorder = token.controlHeight - token.controlLineWidth * 2;
|
const selectHeightWithoutBorder = token.controlHeight - token.controlLineWidth * 2;
|
||||||
|
|
||||||
@ -21,6 +21,8 @@ function genSizeStyle(token: SelectToken, suffix?: string): CSSObject {
|
|||||||
...resetComponent(token),
|
...resetComponent(token),
|
||||||
|
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
|
borderRadius: controlRadius,
|
||||||
|
|
||||||
[`${componentCls}-selection-search`]: {
|
[`${componentCls}-selection-search`]: {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
top: 0,
|
top: 0,
|
||||||
@ -143,6 +145,7 @@ export default function genSingleStyle(token: SelectToken): CSSInterpolation {
|
|||||||
genSizeStyle(
|
genSizeStyle(
|
||||||
mergeToken<any>(token, {
|
mergeToken<any>(token, {
|
||||||
controlHeight: token.controlHeightSM,
|
controlHeight: token.controlHeightSM,
|
||||||
|
controlRadius: token.controlRadiusSM,
|
||||||
}),
|
}),
|
||||||
'sm',
|
'sm',
|
||||||
),
|
),
|
||||||
@ -182,6 +185,7 @@ export default function genSingleStyle(token: SelectToken): CSSInterpolation {
|
|||||||
mergeToken<any>(token, {
|
mergeToken<any>(token, {
|
||||||
controlHeight: token.controlHeightLG,
|
controlHeight: token.controlHeightLG,
|
||||||
fontSize: token.fontSizeLG,
|
fontSize: token.fontSizeLG,
|
||||||
|
controlRadius: token.controlRadiusLG,
|
||||||
}),
|
}),
|
||||||
'lg',
|
'lg',
|
||||||
),
|
),
|
||||||
|
@ -171,14 +171,14 @@ const genSkeletonElementButtonSize = (size: number): CSSObject => ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const genSkeletonElementButton = (token: SkeletonToken): CSSObject => {
|
const genSkeletonElementButton = (token: SkeletonToken): CSSObject => {
|
||||||
const { radiusBase, skeletonButtonCls, controlHeight, controlHeightLG, controlHeightSM, color } =
|
const { radiusSM, skeletonButtonCls, controlHeight, controlHeightLG, controlHeightSM, color } =
|
||||||
token;
|
token;
|
||||||
return {
|
return {
|
||||||
[`${skeletonButtonCls}`]: {
|
[`${skeletonButtonCls}`]: {
|
||||||
display: 'inline-block',
|
display: 'inline-block',
|
||||||
verticalAlign: 'top',
|
verticalAlign: 'top',
|
||||||
background: color,
|
background: color,
|
||||||
borderRadius: radiusBase,
|
borderRadius: radiusSM,
|
||||||
width: controlHeight * 2,
|
width: controlHeight * 2,
|
||||||
minWidth: controlHeight * 2,
|
minWidth: controlHeight * 2,
|
||||||
...genSkeletonElementButtonSize(controlHeight),
|
...genSkeletonElementButtonSize(controlHeight),
|
||||||
@ -353,7 +353,7 @@ export default genComponentStyleHook(
|
|||||||
skeletonImageCls: `${componentCls}-image`,
|
skeletonImageCls: `${componentCls}-image`,
|
||||||
imageSizeBase: token.controlHeight * 1.5,
|
imageSizeBase: token.controlHeight * 1.5,
|
||||||
skeletonTitleHeight: token.controlHeight / 2,
|
skeletonTitleHeight: token.controlHeight / 2,
|
||||||
skeletonBlockRadius: token.radiusLG,
|
skeletonBlockRadius: token.radiusSM,
|
||||||
skeletonParagraphLineHeight: token.controlHeight / 2,
|
skeletonParagraphLineHeight: token.controlHeight / 2,
|
||||||
skeletonParagraphMarginTop: token.marginLG + token.marginXXS,
|
skeletonParagraphMarginTop: token.marginLG + token.marginXXS,
|
||||||
borderRadius: 100, // Large number to make capsule shape
|
borderRadius: 100, // Large number to make capsule shape
|
||||||
|
@ -56,14 +56,14 @@ const genBaseStyle: GenerateStyle<SliderToken> = token => {
|
|||||||
[`${componentCls}-rail`]: {
|
[`${componentCls}-rail`]: {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
backgroundColor: token.colorFillSecondary,
|
backgroundColor: token.colorFillSecondary,
|
||||||
borderRadius: token.controlRadius,
|
borderRadius: token.controlRadiusXS,
|
||||||
transition: `background-color ${token.motionDurationSlow}`,
|
transition: `background-color ${token.motionDurationSlow}`,
|
||||||
},
|
},
|
||||||
|
|
||||||
[`${componentCls}-track`]: {
|
[`${componentCls}-track`]: {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
backgroundColor: token.colorPrimaryBorder,
|
backgroundColor: token.colorPrimaryBorder,
|
||||||
borderRadius: token.controlRadius,
|
borderRadius: token.controlRadiusXS,
|
||||||
transition: `background-color ${token.motionDurationSlow}`,
|
transition: `background-color ${token.motionDurationSlow}`,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ export default function getArrowStyle<Token extends TokenWithCommonCls<AliasToke
|
|||||||
colorBg: string,
|
colorBg: string,
|
||||||
showArrowCls?: string,
|
showArrowCls?: string,
|
||||||
): CSSInterpolation {
|
): CSSInterpolation {
|
||||||
const { componentCls, sizePopupArrow, marginXXS } = token;
|
const { componentCls, sizePopupArrow, marginXXS, radiusXS, radiusOuter } = token;
|
||||||
|
|
||||||
const dropdownArrowOffset = (sizePopupArrow / Math.sqrt(2)) * 2;
|
const dropdownArrowOffset = (sizePopupArrow / Math.sqrt(2)) * 2;
|
||||||
const dropdownArrowDistance = sizePopupArrow + marginXXS;
|
const dropdownArrowDistance = sizePopupArrow + marginXXS;
|
||||||
@ -28,7 +28,7 @@ export default function getArrowStyle<Token extends TokenWithCommonCls<AliasToke
|
|||||||
width: sizePopupArrow,
|
width: sizePopupArrow,
|
||||||
height: sizePopupArrow,
|
height: sizePopupArrow,
|
||||||
|
|
||||||
...roundedArrow(sizePopupArrow, 5, colorBg),
|
...roundedArrow(sizePopupArrow, radiusXS, radiusOuter, colorBg),
|
||||||
|
|
||||||
'&:before': {
|
'&:before': {
|
||||||
background: colorBg,
|
background: colorBg,
|
||||||
|
@ -1,18 +1,22 @@
|
|||||||
/* eslint-disable import/prefer-default-export */
|
/* eslint-disable import/prefer-default-export */
|
||||||
import type { CSSObject } from '@ant-design/cssinjs';
|
import type { CSSObject } from '@ant-design/cssinjs';
|
||||||
|
|
||||||
export const roundedArrow = (width: number, outerRadius: number, bgColor: string): CSSObject => {
|
export const roundedArrow = (
|
||||||
|
width: number,
|
||||||
|
innerRadius: number,
|
||||||
|
outerRadius: number,
|
||||||
|
bgColor: string,
|
||||||
|
): CSSObject => {
|
||||||
const cornerHeight = outerRadius * (1 - 1 / Math.sqrt(2));
|
const cornerHeight = outerRadius * (1 - 1 / Math.sqrt(2));
|
||||||
const radiusBase = 2;
|
|
||||||
|
|
||||||
const ax = width - cornerHeight;
|
const ax = width - cornerHeight;
|
||||||
const ay = 2 * width + cornerHeight;
|
const ay = 2 * width + cornerHeight;
|
||||||
const bx = ax + outerRadius * (1 / Math.sqrt(2));
|
const bx = ax + outerRadius * (1 / Math.sqrt(2));
|
||||||
const by = 2 * width;
|
const by = 2 * width;
|
||||||
const cx = 2 * width - radiusBase;
|
const cx = 2 * width - innerRadius;
|
||||||
const cy = 2 * width;
|
const cy = 2 * width;
|
||||||
const dx = 2 * width;
|
const dx = 2 * width;
|
||||||
const dy = 2 * width - radiusBase;
|
const dy = 2 * width - innerRadius;
|
||||||
const fx = 2 * width + cornerHeight;
|
const fx = 2 * width + cornerHeight;
|
||||||
const fy = width - cornerHeight;
|
const fy = width - cornerHeight;
|
||||||
const ex = 2 * width;
|
const ex = 2 * width;
|
||||||
@ -33,7 +37,7 @@ export const roundedArrow = (width: number, outerRadius: number, bgColor: string
|
|||||||
backgroundRepeat: 'no-repeat',
|
backgroundRepeat: 'no-repeat',
|
||||||
backgroundPosition: `${Math.ceil(-width + 1)}px ${Math.ceil(-width + 1)}px`,
|
backgroundPosition: `${Math.ceil(-width + 1)}px ${Math.ceil(-width + 1)}px`,
|
||||||
content: '""',
|
content: '""',
|
||||||
clipPath: `path('M ${ax} ${ay} A ${outerRadius} ${outerRadius} 0 0 1 ${bx} ${by} L ${cx} ${cy} A ${radiusBase} ${radiusBase} 0 0 0 ${dx} ${dy} L ${ex} ${ey} A ${outerRadius} ${outerRadius} 0 0 1 ${fx} ${fy} Z')`,
|
clipPath: `path('M ${ax} ${ay} A ${outerRadius} ${outerRadius} 0 0 1 ${bx} ${by} L ${cx} ${cy} A ${innerRadius} ${innerRadius} 0 0 0 ${dx} ${dy} L ${ex} ${ey} A ${outerRadius} ${outerRadius} 0 0 1 ${fx} ${fy} Z')`,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -239,7 +239,7 @@ export default genComponentStyleHook('Table', token => {
|
|||||||
opacityLoading,
|
opacityLoading,
|
||||||
colorBgContainer,
|
colorBgContainer,
|
||||||
colorFillSecondary,
|
colorFillSecondary,
|
||||||
radiusBase,
|
radiusLG,
|
||||||
colorFillContent,
|
colorFillContent,
|
||||||
controlInteractiveSize: checkboxSize,
|
controlInteractiveSize: checkboxSize,
|
||||||
} = token;
|
} = token;
|
||||||
@ -253,7 +253,7 @@ export default genComponentStyleHook('Table', token => {
|
|||||||
const tableToken = mergeToken<TableToken>(token, {
|
const tableToken = mergeToken<TableToken>(token, {
|
||||||
tableFontSize: fontSize,
|
tableFontSize: fontSize,
|
||||||
tableBg: colorBgContainer,
|
tableBg: colorBgContainer,
|
||||||
tableRadius: radiusBase,
|
tableRadius: radiusLG,
|
||||||
|
|
||||||
tablePaddingVertical: padding,
|
tablePaddingVertical: padding,
|
||||||
tablePaddingHorizontal: padding,
|
tablePaddingHorizontal: padding,
|
||||||
|
@ -67,7 +67,7 @@ const genCardStyle: GenerateStyle<TabsToken> = (token: TabsToken): CSSObject =>
|
|||||||
[`&${componentCls}-top`]: {
|
[`&${componentCls}-top`]: {
|
||||||
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
|
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
|
||||||
[`${componentCls}-tab`]: {
|
[`${componentCls}-tab`]: {
|
||||||
borderRadius: `${token.radiusBase}px ${token.radiusBase}px 0 0`,
|
borderRadius: `${token.radiusLG}px ${token.radiusLG}px 0 0`,
|
||||||
},
|
},
|
||||||
|
|
||||||
[`${componentCls}-tab-active`]: {
|
[`${componentCls}-tab-active`]: {
|
||||||
@ -79,7 +79,7 @@ const genCardStyle: GenerateStyle<TabsToken> = (token: TabsToken): CSSObject =>
|
|||||||
[`&${componentCls}-bottom`]: {
|
[`&${componentCls}-bottom`]: {
|
||||||
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
|
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
|
||||||
[`${componentCls}-tab`]: {
|
[`${componentCls}-tab`]: {
|
||||||
borderRadius: `0 0 ${token.radiusBase}px ${token.radiusBase}px`,
|
borderRadius: `0 0 ${token.radiusLG}px ${token.radiusLG}px`,
|
||||||
},
|
},
|
||||||
|
|
||||||
[`${componentCls}-tab-active`]: {
|
[`${componentCls}-tab-active`]: {
|
||||||
@ -102,7 +102,7 @@ const genCardStyle: GenerateStyle<TabsToken> = (token: TabsToken): CSSObject =>
|
|||||||
[`${componentCls}-tab`]: {
|
[`${componentCls}-tab`]: {
|
||||||
borderRadius: {
|
borderRadius: {
|
||||||
_skip_check_: true,
|
_skip_check_: true,
|
||||||
value: `${token.radiusBase}px 0 0 ${token.radiusBase}px`,
|
value: `${token.radiusLG}px 0 0 ${token.radiusLG}px`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -120,7 +120,7 @@ const genCardStyle: GenerateStyle<TabsToken> = (token: TabsToken): CSSObject =>
|
|||||||
[`${componentCls}-tab`]: {
|
[`${componentCls}-tab`]: {
|
||||||
borderRadius: {
|
borderRadius: {
|
||||||
_skip_check_: true,
|
_skip_check_: true,
|
||||||
value: `0 ${token.radiusBase}px ${token.radiusBase}px 0`,
|
value: `0 ${token.radiusLG}px ${token.radiusLG}px 0`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -168,7 +168,7 @@ const genDropdownStyle: GenerateStyle<TabsToken> = (token: TabsToken): CSSObject
|
|||||||
listStyleType: 'none',
|
listStyleType: 'none',
|
||||||
backgroundColor: token.colorBgContainer,
|
backgroundColor: token.colorBgContainer,
|
||||||
backgroundClip: 'padding-box',
|
backgroundClip: 'padding-box',
|
||||||
borderRadius: token.radiusBase,
|
borderRadius: token.radiusLG,
|
||||||
outline: 'none',
|
outline: 'none',
|
||||||
boxShadow: token.boxShadow,
|
boxShadow: token.boxShadow,
|
||||||
|
|
||||||
@ -486,6 +486,32 @@ const genSizeStyle: GenerateStyle<TabsToken> = (token: TabsToken): CSSObject =>
|
|||||||
padding: `${token.paddingXXS * 1.5}px ${padding}px`,
|
padding: `${token.paddingXXS * 1.5}px ${padding}px`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
[`&${componentCls}-bottom`]: {
|
||||||
|
[`> ${componentCls}-nav ${componentCls}-tab`]: {
|
||||||
|
borderRadius: `0 0 ${token.radiusBase}px ${token.radiusBase}px`,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
[`&${componentCls}-top`]: {
|
||||||
|
[`> ${componentCls}-nav ${componentCls}-tab`]: {
|
||||||
|
borderRadius: `${token.radiusBase}px ${token.radiusBase}px 0 0`,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
[`&${componentCls}-right`]: {
|
||||||
|
[`> ${componentCls}-nav ${componentCls}-tab`]: {
|
||||||
|
borderRadius: {
|
||||||
|
_skip_check_: true,
|
||||||
|
value: `0 ${token.radiusBase}px ${token.radiusBase}px 0`,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
[`&${componentCls}-left`]: {
|
||||||
|
[`> ${componentCls}-nav ${componentCls}-tab`]: {
|
||||||
|
borderRadius: {
|
||||||
|
_skip_check_: true,
|
||||||
|
value: `${token.radiusBase}px 0 0 ${token.radiusBase}px`,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
[`&${componentCls}-large`]: {
|
[`&${componentCls}-large`]: {
|
||||||
@ -774,7 +800,7 @@ const genTabsStyle: GenerateStyle<TabsToken> = (token: TabsToken): CSSObject =>
|
|||||||
padding: `0 ${token.paddingXS}px`,
|
padding: `0 ${token.paddingXS}px`,
|
||||||
background: 'transparent',
|
background: 'transparent',
|
||||||
border: `${token.controlLineWidth}px ${token.controlLineType} ${colorSplit}`,
|
border: `${token.controlLineWidth}px ${token.controlLineType} ${colorSplit}`,
|
||||||
borderRadius: `${token.radiusBase}px ${token.radiusBase}px 0 0`,
|
borderRadius: `${token.radiusLG}px ${token.radiusLG}px 0 0`,
|
||||||
outline: 'none',
|
outline: 'none',
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
transition: `all ${token.motionDurationSlow} ${token.motionEaseInOut}`,
|
transition: `all ${token.motionDurationSlow} ${token.motionEaseInOut}`,
|
||||||
|
@ -72,7 +72,7 @@ const genBaseStyle = (token: TagToken): CSSInterpolation => {
|
|||||||
whiteSpace: 'nowrap',
|
whiteSpace: 'nowrap',
|
||||||
background: token.tagDefaultBg,
|
background: token.tagDefaultBg,
|
||||||
border: `${token.controlLineWidth}px ${token.controlLineType} ${token.colorBorder}`,
|
border: `${token.controlLineWidth}px ${token.controlLineType} ${token.colorBorder}`,
|
||||||
borderRadius: token.controlRadius,
|
borderRadius: token.radiusSM,
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
transition: `all ${token.motionDurationSlow}`,
|
transition: `all ${token.motionDurationSlow}`,
|
||||||
textAlign: 'start',
|
textAlign: 'start',
|
||||||
|
@ -321,9 +321,10 @@ export interface CommonMapToken {
|
|||||||
motionDurationSlow: string;
|
motionDurationSlow: string;
|
||||||
|
|
||||||
// Radius
|
// Radius
|
||||||
|
radiusXS: number;
|
||||||
radiusSM: number;
|
radiusSM: number;
|
||||||
radiusLG: number;
|
radiusLG: number;
|
||||||
radiusXL: number;
|
radiusOuter: number;
|
||||||
|
|
||||||
// Control
|
// Control
|
||||||
/** @private Only Used for control inside component like Multiple Select inner selection item */
|
/** @private Only Used for control inside component like Multiple Select inner selection item */
|
||||||
@ -407,6 +408,9 @@ export interface AliasToken extends MapToken {
|
|||||||
controlLineWidth: number;
|
controlLineWidth: number;
|
||||||
controlLineType: string;
|
controlLineType: string;
|
||||||
controlRadius: number;
|
controlRadius: number;
|
||||||
|
controlRadiusXS: number;
|
||||||
|
controlRadiusSM: number;
|
||||||
|
controlRadiusLG: number;
|
||||||
controlOutlineWidth: number;
|
controlOutlineWidth: number;
|
||||||
controlItemBgHover: string; // Note. It also is a color
|
controlItemBgHover: string; // Note. It also is a color
|
||||||
controlItemBgActive: string; // Note. It also is a color
|
controlItemBgActive: string; // Note. It also is a color
|
||||||
|
@ -57,7 +57,7 @@ const seedToken: SeedToken = {
|
|||||||
motionEaseOutQuint: `cubic-bezier(0.23, 1, 0.32, 1)`,
|
motionEaseOutQuint: `cubic-bezier(0.23, 1, 0.32, 1)`,
|
||||||
|
|
||||||
// Radius
|
// Radius
|
||||||
radiusBase: 2,
|
radiusBase: 6,
|
||||||
|
|
||||||
// Size
|
// Size
|
||||||
sizeUnit: 4,
|
sizeUnit: 4,
|
||||||
|
@ -44,9 +44,10 @@ export default function genCommonMapToken(token: SeedToken): CommonMapToken {
|
|||||||
lineWidthBold: lineWidth + 1,
|
lineWidthBold: lineWidth + 1,
|
||||||
|
|
||||||
// radius
|
// radius
|
||||||
radiusSM: radiusBase / 2,
|
radiusXS: radiusBase / 3,
|
||||||
radiusLG: radiusBase * 2,
|
radiusSM: (radiusBase * 2) / 3,
|
||||||
radiusXL: radiusBase * 4,
|
radiusLG: (radiusBase * 4) / 3,
|
||||||
|
radiusOuter: (radiusBase * 4) / 3,
|
||||||
|
|
||||||
// control
|
// control
|
||||||
controlHeightSM: controlHeight * 0.75,
|
controlHeightSM: controlHeight * 0.75,
|
||||||
|
@ -95,6 +95,9 @@ export default function formatToken(derivativeToken: RawMergedToken): AliasToken
|
|||||||
|
|
||||||
controlLineType: mergedToken.lineType,
|
controlLineType: mergedToken.lineType,
|
||||||
controlRadius: mergedToken.radiusBase,
|
controlRadius: mergedToken.radiusBase,
|
||||||
|
controlRadiusXS: mergedToken.radiusXS,
|
||||||
|
controlRadiusSM: mergedToken.radiusSM,
|
||||||
|
controlRadiusLG: mergedToken.radiusLG,
|
||||||
|
|
||||||
fontWeightStrong: 600,
|
fontWeightStrong: 600,
|
||||||
|
|
||||||
|
@ -101,7 +101,13 @@ const genTooltipStyle: GenerateStyle<TooltipToken> = token => {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// Arrow Style
|
// Arrow Style
|
||||||
getArrowStyle(token, 'var(--antd-arrow-background-color)', ''),
|
getArrowStyle(
|
||||||
|
mergeToken(token, {
|
||||||
|
radiusOuter: 5,
|
||||||
|
}),
|
||||||
|
'var(--antd-arrow-background-color)',
|
||||||
|
'',
|
||||||
|
),
|
||||||
|
|
||||||
// Pure Render
|
// Pure Render
|
||||||
{
|
{
|
||||||
|
@ -114,7 +114,7 @@ const genTransferListStyle: GenerateStyle<TransferToken> = (token: TransferToken
|
|||||||
width: listWidth,
|
width: listWidth,
|
||||||
height: listHeight,
|
height: listHeight,
|
||||||
border: `${controlLineWidth}px ${controlLineType} ${colorBorder}`,
|
border: `${controlLineWidth}px ${controlLineType} ${colorBorder}`,
|
||||||
borderRadius: token.radiusBase,
|
borderRadius: token.controlRadiusLG,
|
||||||
|
|
||||||
'&-with-pagination': {
|
'&-with-pagination': {
|
||||||
width: listWidthLG,
|
width: listWidthLG,
|
||||||
@ -139,7 +139,7 @@ const genTransferListStyle: GenerateStyle<TransferToken> = (token: TransferToken
|
|||||||
color: token.colorText,
|
color: token.colorText,
|
||||||
background: token.colorBgContainer,
|
background: token.colorBgContainer,
|
||||||
borderBottom: `${controlLineWidth}px ${controlLineType} ${colorSplit}`,
|
borderBottom: `${controlLineWidth}px ${controlLineType} ${colorSplit}`,
|
||||||
borderRadius: `${token.radiusBase}px ${token.radiusBase}px 0 0`,
|
borderRadius: `${token.controlRadiusLG}px ${token.controlRadiusLG}px 0 0`,
|
||||||
|
|
||||||
'> *:not(:last-child)': {
|
'> *:not(:last-child)': {
|
||||||
marginInlineEnd: marginXXS,
|
marginInlineEnd: marginXXS,
|
||||||
|
@ -13,7 +13,7 @@ const genDraggerStyle: GenerateStyle<UploadToken> = token => {
|
|||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
background: token.colorFillAlter,
|
background: token.colorFillAlter,
|
||||||
border: `${token.controlLineWidth}px dashed ${token.colorBorder}`,
|
border: `${token.controlLineWidth}px dashed ${token.colorBorder}`,
|
||||||
borderRadius: token.radiusBase,
|
borderRadius: token.controlRadiusLG,
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
transition: `border-color ${token.motionDurationSlow}`,
|
transition: `border-color ${token.motionDurationSlow}`,
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ const genPictureStyle: GenerateStyle<UploadToken> = token => {
|
|||||||
height: uploadThumbnailSize + token.controlLineWidth * 2 + token.paddingXS * 2,
|
height: uploadThumbnailSize + token.controlLineWidth * 2 + token.paddingXS * 2,
|
||||||
padding: token.paddingXS,
|
padding: token.paddingXS,
|
||||||
border: `${token.controlLineWidth}px ${token.controlLineType} ${token.colorBorder}`,
|
border: `${token.controlLineWidth}px ${token.controlLineType} ${token.colorBorder}`,
|
||||||
borderRadius: token.radiusBase,
|
borderRadius: token.controlRadiusLG,
|
||||||
|
|
||||||
'&:hover': {
|
'&:hover': {
|
||||||
background: 'transparent',
|
background: 'transparent',
|
||||||
@ -101,7 +101,7 @@ const genPictureCardStyle: GenerateStyle<UploadToken> = token => {
|
|||||||
verticalAlign: 'top',
|
verticalAlign: 'top',
|
||||||
backgroundColor: token.colorFillAlter,
|
backgroundColor: token.colorFillAlter,
|
||||||
border: `${token.controlLineWidth}px dashed ${token.colorBorder}`,
|
border: `${token.controlLineWidth}px dashed ${token.colorBorder}`,
|
||||||
borderRadius: token.radiusBase,
|
borderRadius: token.controlRadiusLG,
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
transition: `border-color ${token.motionDurationSlow}`,
|
transition: `border-color ${token.motionDurationSlow}`,
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user