PromoCursed/node_modules/.cache/babel-loader/c1163fa938a625c82cccc63812d89bbe0bfed4820b30ef8c51b230ef99e5a308.json

1 line
14 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"import { unit } from '@ant-design/cssinjs';\nimport { resetComponent, textEllipsis } from '../../style';\nimport { genStyleHooks, mergeToken } from '../../theme/internal';\n// ============================== Shared ==============================\nconst genSharedAnchorStyle = token => {\n const {\n componentCls,\n holderOffsetBlock,\n motionDurationSlow,\n lineWidthBold,\n colorPrimary,\n lineType,\n colorSplit,\n calc\n } = token;\n return {\n [`${componentCls}-wrapper`]: {\n marginBlockStart: calc(holderOffsetBlock).mul(-1).equal(),\n paddingBlockStart: holderOffsetBlock,\n // delete overflow: auto\n // overflow: 'auto',\n [componentCls]: Object.assign(Object.assign({}, resetComponent(token)), {\n position: 'relative',\n paddingInlineStart: lineWidthBold,\n [`${componentCls}-link`]: {\n paddingBlock: token.linkPaddingBlock,\n paddingInline: `${unit(token.linkPaddingInlineStart)} 0`,\n '&-title': Object.assign(Object.assign({}, textEllipsis), {\n position: 'relative',\n display: 'block',\n marginBlockEnd: token.anchorTitleBlock,\n color: token.colorText,\n transition: `all ${token.motionDurationSlow}`,\n '&:only-child': {\n marginBlockEnd: 0\n }\n }),\n [`&-active > ${componentCls}-link-title`]: {\n color: token.colorPrimary\n },\n // link link\n [`${componentCls}-link`]: {\n paddingBlock: token.anchorPaddingBlockSecondary\n }\n }\n }),\n [`&:not(${componentCls}-wrapper-horizontal)`]: {\n [componentCls]: {\n '&::before': {\n position: 'absolute',\n insetInlineStart: 0,\n top: 0,\n height: '100%',\n borderInlineStart: `${unit(lineWidthBold)} ${lineType} ${colorSplit}`,\n content: '\" \"'\n },\n [`${componentCls}-ink`]: {\n position: 'absolute',\n insetInlineStart: 0,\n display: 'none',\n transform: 'translateY(-50%)',\n transition: `top ${motionDurationSlow} ease-in-out`,\n width: lineWidthBold,\n backgroundColor: colorPrimary,\n [`&${componentCls}-ink-visible`]: {\n display: 'inline-block'\n }\n }\n }\n },\n [`${componentCls}-fixed ${componentCls}-ink ${componentCls}-ink`]: {\n display: 'none'\n }\n }\n };\n};\nconst genSharedAnchorHorizontalStyle = token => {\n const {\n componentCls,\n motionDurationSlow,\n lineWidthBold,\n colorPrimary\n } = token;\n return {\n [`${componentCls}-wrapper-horizontal`]: {\n position: 'relative',\n '&::before': {\n position: 'absolute',\n left: {\n _skip_check_: true,\n value: 0\n },\n right: {\n _skip_check_: true,\n value: 0\n },\n bottom: 0,\n borderBottom: `${unit(token.lineWidth)} ${token.lineType} ${token.colorSplit}`,\n content: '\" \"'\n },\n [componentCls]: {\n overflowX: 'scroll',\n position: 'relative',\n display: 'flex',\n scrollbarWidth: 'none' /* Firefox */,\n '&::-webkit-scrollbar': {\n display: 'none' /* Safari and Chrome */\n },\n [`${componentCls}-link:first-of-type`]: {\n paddingInline: 0\n },\n [`${componentCls}-ink`]: {\n position: 'absolute',\n bottom: 0,\n transition: `left ${motionDurationSlow} ease-in-out, width ${motionDurationSlow} ease-in-out`,\n height: lineWidthBold,\n backgroundColor: colorPrimary\n }\n }\n }\n };\n};\nexport const prepareComponentToken = token => ({\n linkPaddingBlock: token.paddingXXS,\n linkPaddingInlineStart: token.padding\n});\n// ============================== Export ==============================\nexport default genS