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 margin: 0,\n content: '\"\"'\n }\n },\n [`${componentCls}-item-content`]: {\n display: 'table-cell',\n flex: 1,\n color: token.contentColor,\n fontSize: token.fontSize,\n lineHeight: token.lineHeight,\n wordBreak: 'break-word',\n overflowWrap: 'break-word'\n },\n [`${componentCls}-item`]: {\n paddingBottom: 0,\n verticalAlign: 'top',\n '&-container': {\n display: 'flex',\n [`${componentCls}-item-label`]: {\n display: 'inline-flex',\n alignItems: 'baseline'\n },\n [`${componentCls}-item-content`]: {\n display: 'inline-flex',\n alignItems: 'baseline',\n minWidth: 0\n }\n }\n },\n '&-middle': {\n [`${componentCls}-row`]: {\n '> th, > td': {\n paddingBottom: token.paddingSM\n }\n }\n },\n '&-small': {\n [`${componentCls}-row`]: {\n '> th, > td': {\n paddingBottom: token.paddingXS\n }\n }\n }\n })\n };\n};\nexport const prepareComponentToken = token => ({\n labelBg: token.colorFillAlter,\n titleColor: token.colorText,\n titleMarginBottom: token.fontSizeSM * token.lineHeightSM,\n itemPaddingBottom: token.padding,\n itemPaddingEnd: token.padding,\n colonMarginRight: token.marginXS,\n colonMarginLeft: token.marginXXS / 2,\n contentColor: token.colorText,\n extraColor: token.colorText\n});\n// ============================== Export ==============================\nexport default genStyleHooks('Descriptions', token => {\n const descriptionToken = mergeToken(token, {});\n return genDescriptionStyles(descriptionToken);\n}, prepareComponentToken);","map":{"version":3,"names":["unit","resetComponent","textEllipsis","genStyleHooks","mergeToken","genBorderedStyle","token","componentCls","labelBg","overflow","border","lineWidth","lineType","colorSplit","tableLayout","borderBottom","padding","paddingLG","borderInlineEnd","color","colorTextSecondary","backgroundColor","display","paddingSM","paddingXS","genDescriptionStyles","extraColor","itemPaddingBottom","itemPaddingEnd","colonMarginRight","colonMarginLeft","titleMarginBottom","Object","assign","direction","alignItems","marginBottom","flex","titleColor","fontWeight","fontWeightStrong","fontSize","fontSizeLG","lineHeight","lineHeightLG","marginInlineStart","width","borderRadius","borderRadiusLG","table","borderCollapse","paddingBottom","paddingInlineEnd","colorTextTertiary","textAlign","content","position","top","marginInline","margin","contentColor","wordBreak","overflowWrap","verticalAlign","minWidth","prepareComponentToken","colorFillAlter","colorText","fontSizeSM","lineHeightSM","marginXS","marginXXS","descriptionToken"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/antd/es/descriptions/style/index.js"],"sourcesContent":["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 margin: 0,\n content: '\"\"'\n }\n },\n [`${componentCls}-item-content`]: {\n display: 'table-cell',\n flex: 1,\n color: token.contentColor,\n fontSize: token.fontSize,\n lineHeight: token.lineHeight,\n wordBreak: 'break-word',\n overflowWrap: 'break-word'\n },\n [`${componentCls}-item`]: {\n paddingBottom: 0,\n verticalAlign: 'top',\n '&-container': {\n display: 'flex',\n [`${componentCls}-item-label`]: {\n display: 'inline-flex',\n alignItems: 'baseline'\n },\n [`${componentCls}-item-content`]: {\n display: 'inline-flex',\n alignItems: 'baseline',\n minWidth: 0\n }\n }\n },\n '&-middle': {\n [`${componentCls}-row`]: {\n '> th, > td': {\n paddingBottom: token.paddingSM\n }\n }\n },\n '&-small': {\n [`${componentCls}-row`]: {\n '> th, > td': {\n paddingBottom: token.paddingXS\n }\n }\n }\n })\n };\n};\nexport const prepareComponentToken = token => ({\n labelBg: token.colorFillAlter,\n titleColor: token.colorText,\n titleMarginBottom: token.fontSizeSM * token.lineHeightSM,\n itemPaddingBottom: token.padding,\n itemPaddingEnd: token.padding,\n colonMarginRight: token.marginXS,\n colonMarginLeft: token.marginXXS / 2,\n contentColor: token.colorText,\n extraColor: token.colorText\n});\n// ============================== Export ==============================\nexport default genStyleHooks('Descriptions', token => {\n const descriptionToken = mergeToken(token, {});\n return genDescriptionStyles(descriptionToken);\n}, prepareComponentToken);"],"mappings":"AAAA,SAASA,IAAI,QAAQ,qBAAqB;AAC1C,SAASC,cAAc,EAAEC,YAAY,QAAQ,aAAa;AAC1D,SAASC,aAAa,EAAEC,UAAU,QAAQ,sBAAsB;AAChE,MAAMC,gBAAgB,GAAGC,KAAK,IAAI;EAChC,MAAM;IACJC,YAAY;IACZC;EACF,CAAC,GAAGF,KAAK;EACT,OAAO;IACL,CAAC,IAAIC,YAAY,WAAW,GAAG;MAC7B,CAAC,KAAKA,YAAY,OAAO,GAAG;QAC1BE,QAAQ,EAAE,QAAQ;QAClBC,MAAM,EAAE,GAAGV,IAAI,CAACM,KAAK,CAACK,SAAS,CAAC,IAAIL,KAAK,CAACM,QAAQ,IAAIN,KAAK,CAACO,UAAU,EAAE;QACxE,SAAS,EAAE;UACTC,WAAW,EAAE;QACf,CAAC;QACD,CAAC,GAAGP,YAAY,MAAM,GAAG;UACvBQ,YAAY,EAAE,GAAGf,IAAI,CAACM,KAAK,CAACK,SAAS,CAAC,IAAIL,KAAK,CAACM,QAAQ,IAAIN,KAAK,CAACO,UAAU,EAAE;UAC9E,cAAc,EAAE;YACdE,YAAY,EAAE;UAChB,CAAC;UACD,CAAC,KAAKR,YAAY,kBAAkBA,YAAY,eAAe,GAAG;YAChES,OAAO,EAAE,GAAGhB,IAAI,CAACM,KAAK,CAACU,OAAO,CAAC,IAAIhB,IAAI,CAACM,KAAK,CAACW,SAAS,CAAC,EAAE;YAC1DC,eAAe,EAAE,GAAGlB,IAAI,CAACM,KAAK,CAACK,SAAS,CAAC,IAAIL,KAAK,CAACM,QAAQ,IAAIN,KAAK,CAACO,UAAU,EAAE;YACjF,cAAc,EAAE;cACdK,eAAe,EAAE;YACnB;UACF,CAAC;UACD,CAAC,KAAKX,YAAY,aAAa,GAAG;YAChCY,KAAK,EAAEb,KAAK,CAACc,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