1 line
32 KiB
JSON
1 line
32 KiB
JSON
|
{"ast":null,"code":"import { unit } from '@ant-design/cssinjs';\nimport { clearFix, resetComponent, textEllipsis } from '../../style';\nimport { genStyleHooks, mergeToken } from '../../theme/internal';\n// ============================== Styles ==============================\n// ============================== Head ==============================\nconst genCardHeadStyle = token => {\n const {\n antCls,\n componentCls,\n headerHeight,\n cardPaddingBase,\n tabsMarginBottom\n } = token;\n return Object.assign(Object.assign({\n display: 'flex',\n justifyContent: 'center',\n flexDirection: 'column',\n minHeight: headerHeight,\n marginBottom: -1,\n padding: `0 ${unit(cardPaddingBase)}`,\n color: token.colorTextHeading,\n fontWeight: token.fontWeightStrong,\n fontSize: token.headerFontSize,\n background: token.headerBg,\n borderBottom: `${unit(token.lineWidth)} ${token.lineType} ${token.colorBorderSecondary}`,\n borderRadius: `${unit(token.borderRadiusLG)} ${unit(token.borderRadiusLG)} 0 0`\n }, clearFix()), {\n '&-wrapper': {\n width: '100%',\n display: 'flex',\n alignItems: 'center'\n },\n '&-title': Object.assign(Object.assign({\n display: 'inline-block',\n flex: 1\n }, textEllipsis), {\n [`\n > ${componentCls}-typography,\n > ${componentCls}-typography-edit-content\n `]: {\n insetInlineStart: 0,\n marginTop: 0,\n marginBottom: 0\n }\n }),\n [`${antCls}-tabs-top`]: {\n clear: 'both',\n marginBottom: tabsMarginBottom,\n color: token.colorText,\n fontWeight: 'normal',\n fontSize: token.fontSize,\n '&-bar': {\n borderBottom: `${unit(token.lineWidth)} ${token.lineType} ${token.colorBorderSecondary}`\n }\n }\n });\n};\n// ============================== Grid ==============================\nconst genCardGridStyle = token => {\n const {\n cardPaddingBase,\n colorBorderSecondary,\n cardShadow,\n lineWidth\n } = token;\n return {\n width: '33.33%',\n padding: cardPaddingBase,\n border: 0,\n borderRadius: 0,\n boxShadow: `\n ${unit(lineWidth)} 0 0 0 ${colorBorderSecondary},\n 0 ${unit(lineWidth)} 0 0 ${colorBorderSecondary},\n ${unit(lineWidth)} ${unit(lineWidth)} 0 0 ${colorBorderSecondary},\n ${unit(lineWidth)} 0 0 0 ${colorBorderSecondary} inset,\n 0 ${unit(lineWidth)} 0 0 ${colorBorderSecondary} inset;\n `,\n transition: `all ${token.motionDurationMid}`,\n '&-hoverable:hover': {\n position: 'relative',\n zIndex: 1,\n boxShadow: cardShadow\n }\n };\n};\n// ============================== Actions ==============================\nconst genCardActionsStyle = token => {\n const {\n componentCls,\n iconCls,\n actionsLiMargin,\n cardActionsIconSize,\n colorBorderSecondary,\n actionsBg\n } = token;\n return Object.assign(Object.assign({\n margin: 0,\n padding: 0,\n listStyle: 'none',\n background: actionsBg,\n borderTop: `${unit(token.lineWidth)} ${token.lineType} ${colorBorderSecondary}`,\n display: 'flex',\n borderRadius: `0 0 ${unit(token.borderRadiusLG)} ${unit(token.borderRadiusLG)}`\n }, clearFix()), {\n '& > li': {\n margin: actionsLiMargin,\n color: token.colorTextDescription,\n textAlign: 'center',\n '> span': {\n position: 'relative',\n display: 'block',\n minWidth: token.calc(token.cardActionsIconSize).mul(2).equal(),\n fontSize: token.fontSize,\n lineHeight: token.lineHeight,\n cursor: 'pointer',\n '&:hover': {\n color: token.colorPrimary,\n transition: `color ${token.motionDurationMid}`\n },\n [`a:not(${componentCls}-btn), > ${iconCls}`]: {\n display: 'inline-block',\n width: '100%',\n color: token.colorTextDescription,\n lineHeight: unit(token.fontHeight),\n transition: `color ${token.motionDurationMid}`,\n '&:hover': {\n color: token.colorPrim
|