1 line
73 KiB
JSON
1 line
73 KiB
JSON
|
{"ast":null,"code":"import { unit } from '@ant-design/cssinjs';\nimport { genFocusStyle, resetComponent, textEllipsis } from '../../style';\nimport { genStyleHooks, mergeToken } from '../../theme/internal';\nimport genMotionStyle from './motion';\nconst genCardStyle = token => {\n const {\n componentCls,\n tabsCardPadding,\n cardBg,\n cardGutter,\n colorBorderSecondary,\n itemSelectedColor\n } = token;\n return {\n [`${componentCls}-card`]: {\n [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {\n [`${componentCls}-tab`]: {\n margin: 0,\n padding: tabsCardPadding,\n background: cardBg,\n border: `${unit(token.lineWidth)} ${token.lineType} ${colorBorderSecondary}`,\n transition: `all ${token.motionDurationSlow} ${token.motionEaseInOut}`\n },\n [`${componentCls}-tab-active`]: {\n color: itemSelectedColor,\n background: token.colorBgContainer\n },\n [`${componentCls}-ink-bar`]: {\n visibility: 'hidden'\n }\n },\n // ========================== Top & Bottom ==========================\n [`&${componentCls}-top, &${componentCls}-bottom`]: {\n [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {\n [`${componentCls}-tab + ${componentCls}-tab`]: {\n marginLeft: {\n _skip_check_: true,\n value: unit(cardGutter)\n }\n }\n }\n },\n [`&${componentCls}-top`]: {\n [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {\n [`${componentCls}-tab`]: {\n borderRadius: `${unit(token.borderRadiusLG)} ${unit(token.borderRadiusLG)} 0 0`\n },\n [`${componentCls}-tab-active`]: {\n borderBottomColor: token.colorBgContainer\n }\n }\n },\n [`&${componentCls}-bottom`]: {\n [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {\n [`${componentCls}-tab`]: {\n borderRadius: `0 0 ${unit(token.borderRadiusLG)} ${unit(token.borderRadiusLG)}`\n },\n [`${componentCls}-tab-active`]: {\n borderTopColor: token.colorBgContainer\n }\n }\n },\n // ========================== Left & Right ==========================\n [`&${componentCls}-left, &${componentCls}-right`]: {\n [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {\n [`${componentCls}-tab + ${componentCls}-tab`]: {\n marginTop: unit(cardGutter)\n }\n }\n },\n [`&${componentCls}-left`]: {\n [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {\n [`${componentCls}-tab`]: {\n borderRadius: {\n _skip_check_: true,\n value: `${unit(token.borderRadiusLG)} 0 0 ${unit(token.borderRadiusLG)}`\n }\n },\n [`${componentCls}-tab-active`]: {\n borderRightColor: {\n _skip_check_: true,\n value: token.colorBgContainer\n }\n }\n }\n },\n [`&${componentCls}-right`]: {\n [`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {\n [`${componentCls}-tab`]: {\n borderRadius: {\n _skip_check_: true,\n value: `0 ${unit(token.borderRadiusLG)} ${unit(token.borderRadiusLG)} 0`\n }\n },\n [`${componentCls}-tab-active`]: {\n borderLeftColor: {\n _skip_check_: true,\n value: token.colorBgContainer\n }\n }\n }\n }\n }\n };\n};\nconst genDropdownStyle = token => {\n const {\n componentCls,\n itemHoverColor,\n dropdownEdgeChildVerticalPadding\n } = token;\n return {\n [`${componentCls}-dropdown`]: Object.assign(Object.assign({}, resetComponent(token)), {\n position: 'absolute',\n top: -9999,\n left: {\n _skip_check_: true,\n value: -9999\n },\n zIndex: token.zIndexPopup,\n display: 'block',\n
|