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

1 line
24 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"import { unit } from '@ant-design/cssinjs';\nimport { genCompactItemStyle } from '../../style/compact-item';\nimport { genStyleHooks, mergeToken } from '../../theme/internal';\nimport genColorBlockStyle from './color-block';\nimport genInputStyle from './input';\nimport genPickerStyle from './picker';\nimport genPresetsStyle from './presets';\nimport genSliderStyle from './slider';\nexport const genActiveStyle = (token, borderColor, outlineColor) => ({\n borderInlineEndWidth: token.lineWidth,\n borderColor,\n boxShadow: `0 0 0 ${unit(token.controlOutlineWidth)} ${outlineColor}`,\n outline: 0\n});\nconst genRtlStyle = token => {\n const {\n componentCls\n } = token;\n return {\n '&-rtl': {\n [`${componentCls}-presets-color`]: {\n '&::after': {\n direction: 'ltr'\n }\n },\n [`${componentCls}-clear`]: {\n '&::after': {\n direction: 'ltr'\n }\n }\n }\n };\n};\nconst genClearStyle = (token, size, extraStyle) => {\n const {\n componentCls,\n borderRadiusSM,\n lineWidth,\n colorSplit,\n colorBorder,\n red6\n } = token;\n return {\n [`${componentCls}-clear`]: Object.assign(Object.assign({\n width: size,\n height: size,\n borderRadius: borderRadiusSM,\n border: `${unit(lineWidth)} solid ${colorSplit}`,\n position: 'relative',\n overflow: 'hidden',\n cursor: 'inherit',\n transition: `all ${token.motionDurationFast}`\n }, extraStyle), {\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n insetInlineEnd: token.calc(lineWidth).mul(-1).equal(),\n top: token.calc(lineWidth).mul(-1).equal(),\n display: 'block',\n width: 40,\n // maximum\n height: 2,\n // fixed\n transformOrigin: `calc(100% - 1px) 1px`,\n transform: 'rotate(-45deg)',\n backgroundColor: red6\n },\n '&:hover': {\n borderColor: colorBorder\n }\n })\n };\n};\nconst genStatusStyle = token => {\n const {\n componentCls,\n colorError,\n colorWarning,\n colorErrorHover,\n colorWarningHover,\n colorErrorOutline,\n colorWarningOutline\n } = token;\n return {\n [`&${componentCls}-status-error`]: {\n borderColor: colorError,\n '&:hover': {\n borderColor: colorErrorHover\n },\n [`&${componentCls}-trigger-active`]: Object.assign({}, genActiveStyle(token, colorError, colorErrorOutline))\n },\n [`&${componentCls}-status-warning`]: {\n borderColor: colorWarning,\n '&:hover': {\n borderColor: colorWarningHover\n },\n [`&${componentCls}-trigger-active`]: Object.assign({}, genActiveStyle(token, colorWarning, colorWarningOutline))\n }\n };\n};\nconst genSizeStyle = token => {\n const {\n componentCls,\n controlHeightLG,\n controlHeightSM,\n controlHeight,\n controlHeightXS,\n borderRadius,\n borderRadiusSM,\n borderRadiusXS,\n borderRadiusLG,\n fontSizeLG\n } = token;\n return {\n [`&${componentCls}-lg`]: {\n minWidth: controlHeightLG,\n minHeight: controlHeightLG,\n borderRadius: borderRadiusLG,\n [`${componentCls}-color-block, ${componentCls}-clear`]: {\n width: controlHeight,\n height: controlHeight,\n borderRadius\n },\n [`${componentCls}-trigger-text`]: {\n fontSize: fontSizeLG\n }\n },\n [`&${componentCls}-sm`]: {\n minWidth: controlHeightSM,\n minHeight: controlHeightSM,\n borderRadius: borderRadiusSM,\n [`${componentCls}-color-block, ${componentCls}-clear`]: {\n width: controlHeightXS,\n height: controlHeightXS,\n borderRadius: borderRadiusXS\n },\n [`${componentCls}-trigger-text`]: {\n lineHeight: unit(controlHeightXS)\n }\n }\n };\n};\nconst genColorPickerStyle = token => {\n const {\n antCls,\n componentCls,\n colorPickerWidth,\n colorPrimary,\n motionDurationMid,\n colorBgElevated,\n colorTextDisabled,\n col