1 line
17 KiB
JSON
1 line
17 KiB
JSON
|
{"ast":null,"code":"import { unit } from '@ant-design/cssinjs';\nimport { resetComponent, textEllipsis } from '../../style';\nimport { genStyleHooks, mergeToken } from '../../theme/internal';\nconst genBorderedStyle = token => {\n const {\n componentCls,\n labelBg\n } = token;\n return {\n [`&${componentCls}-bordered`]: {\n [`> ${componentCls}-view`]: {\n overflow: 'hidden',\n border: `${unit(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,\n '> table': {\n tableLayout: 'auto'\n },\n [`${componentCls}-row`]: {\n borderBottom: `${unit(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,\n '&:last-child': {\n borderBottom: 'none'\n },\n [`> ${componentCls}-item-label, > ${componentCls}-item-content`]: {\n padding: `${unit(token.padding)} ${unit(token.paddingLG)}`,\n borderInlineEnd: `${unit(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,\n '&:last-child': {\n borderInlineEnd: 'none'\n }\n },\n [`> ${componentCls}-item-label`]: {\n color: token.colorTextSecondary,\n backgroundColor: labelBg,\n '&::after': {\n display: 'none'\n }\n }\n }\n },\n [`&${componentCls}-middle`]: {\n [`${componentCls}-row`]: {\n [`> ${componentCls}-item-label, > ${componentCls}-item-content`]: {\n padding: `${unit(token.paddingSM)} ${unit(token.paddingLG)}`\n }\n }\n },\n [`&${componentCls}-small`]: {\n [`${componentCls}-row`]: {\n [`> ${componentCls}-item-label, > ${componentCls}-item-content`]: {\n padding: `${unit(token.paddingXS)} ${unit(token.padding)}`\n }\n }\n }\n }\n };\n};\nconst genDescriptionStyles = token => {\n const {\n componentCls,\n extraColor,\n itemPaddingBottom,\n itemPaddingEnd,\n colonMarginRight,\n colonMarginLeft,\n titleMarginBottom\n } = token;\n return {\n [componentCls]: Object.assign(Object.assign(Object.assign({}, resetComponent(token)), genBorderedStyle(token)), {\n '&-rtl': {\n direction: 'rtl'\n },\n [`${componentCls}-header`]: {\n display: 'flex',\n alignItems: 'center',\n marginBottom: titleMarginBottom\n },\n [`${componentCls}-title`]: Object.assign(Object.assign({}, textEllipsis), {\n flex: 'auto',\n color: token.titleColor,\n fontWeight: token.fontWeightStrong,\n fontSize: token.fontSizeLG,\n lineHeight: token.lineHeightLG\n }),\n [`${componentCls}-extra`]: {\n marginInlineStart: 'auto',\n color: extraColor,\n fontSize: token.fontSize\n },\n [`${componentCls}-view`]: {\n width: '100%',\n borderRadius: token.borderRadiusLG,\n table: {\n width: '100%',\n tableLayout: 'fixed',\n borderCollapse: 'collapse'\n }\n },\n [`${componentCls}-row`]: {\n '> th, > td': {\n paddingBottom: itemPaddingBottom,\n paddingInlineEnd: itemPaddingEnd\n },\n '> th:last-child, > td:last-child': {\n paddingInlineEnd: 0\n },\n '&:last-child': {\n borderBottom: 'none',\n '> th, > td': {\n paddingBottom: 0\n }\n }\n },\n [`${componentCls}-item-label`]: {\n color: token.colorTextTertiary,\n fontWeight: 'normal',\n fontSize: token.fontSize,\n lineHeight: token.lineHeight,\n textAlign: 'start',\n '&::after': {\n content: '\":\"',\n position: 'relative',\n top: -0.5,\n // magic for position\n marginInline: `${unit(colonMarginLeft)} ${unit(colonMarginRight)}`\n },\n [`&${componentCls}-item-no-colon::after`]: {\n content: '\"\"'\n }\n },\n [`${componentCls}-item-no-label`]: {\n '&::after': {\n
|