PromoCursed/node_modules/.cache/babel-loader/4d67d67c2250215a8696cbe227ce0ce2e073277a7b4254c1c34f664b80dfa3ad.json

1 line
10 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"import { unit } from '@ant-design/cssinjs';\nimport { genOverflowStyle, getMultipleSelectorUnit } from '../../select/style/multiple';\nimport { mergeToken } from '../../theme/internal';\nconst genSize = (token, suffix) => {\n const {\n componentCls,\n controlHeight\n } = token;\n const suffixCls = suffix ? `${componentCls}-${suffix}` : '';\n const multipleSelectorUnit = getMultipleSelectorUnit(token);\n return [\n // genSelectionStyle(token, suffix),\n {\n [`${componentCls}-multiple${suffixCls}`]: {\n paddingBlock: multipleSelectorUnit.containerPadding,\n paddingInlineStart: multipleSelectorUnit.basePadding,\n minHeight: controlHeight,\n // ======================== Selections ========================\n [`${componentCls}-selection-item`]: {\n height: multipleSelectorUnit.itemHeight,\n lineHeight: unit(multipleSelectorUnit.itemLineHeight)\n }\n }\n }];\n};\nconst genPickerMultipleStyle = token => {\n const {\n componentCls,\n calc,\n lineWidth\n } = token;\n const smallToken = mergeToken(token, {\n fontHeight: token.fontSize,\n selectHeight: token.controlHeightSM,\n multipleSelectItemHeight: token.multipleItemHeightSM,\n borderRadius: token.borderRadiusSM,\n borderRadiusSM: token.borderRadiusXS,\n controlHeight: token.controlHeightSM\n });\n const largeToken = mergeToken(token, {\n fontHeight: calc(token.multipleItemHeightLG).sub(calc(lineWidth).mul(2).equal()).equal(),\n fontSize: token.fontSizeLG,\n selectHeight: token.controlHeightLG,\n multipleSelectItemHeight: token.multipleItemHeightLG,\n borderRadius: token.borderRadiusLG,\n borderRadiusSM: token.borderRadius,\n controlHeight: token.controlHeightLG\n });\n return [\n // ======================== Size ========================\n genSize(smallToken, 'small'), genSize(token), genSize(largeToken, 'large'),\n // ====================== Selection ======================\n {\n [`${componentCls}${componentCls}-multiple`]: Object.assign(Object.assign({\n width: '100%',\n cursor: 'text',\n // ==================== Selector =====================\n [`${componentCls}-selector`]: {\n flex: 'auto',\n padding: 0,\n position: 'relative',\n '&:after': {\n margin: 0\n },\n // ================== placeholder ==================\n [`${componentCls}-selection-placeholder`]: {\n position: 'absolute',\n top: '50%',\n insetInlineStart: token.inputPaddingHorizontalBase,\n insetInlineEnd: 0,\n transform: 'translateY(-50%)',\n transition: `all ${token.motionDurationSlow}`,\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n flex: 1,\n color: token.colorTextPlaceholder,\n pointerEvents: 'none'\n }\n }\n }, genOverflowStyle(token)), {\n // ====================== Input ======================\n // Input is `readonly`, which is used for a11y only\n [`${componentCls}-multiple-input`]: {\n width: 0,\n height: 0,\n border: 0,\n visibility: 'hidden',\n position: 'absolute',\n zIndex: -1\n }\n })\n }];\n};\nexport default genPickerMultipleStyle;","map":{"version":3,"names":["unit","genOverflowStyle","getMultipleSelectorUnit","mergeToken","genSize","token","suffix","componentCls","controlHeight","suffixCls","multipleSelectorUnit","paddingBlock","containerPadding","paddingInlineStart","basePadding","minHeight","height","itemHeight","lineHeight","itemLineHeight","genPickerMultipleStyle","calc","lineWidth","smallToken","fontHeight","fontSize","selectHeight","controlHeightSM","multipleSelectItemHeight","multipleItemHeightSM","borderRadius","borderRadiusSM","borderRadiusXS","largeToken","multipleItemHeightLG","sub","mul","equal","fontSizeLG","controlHeightLG","borderRadiusLG","Object","assign","width","cursor","flex","padding","position","margin","top","insetInlineStart","inputPaddingHo