PromoCursed/node_modules/.cache/babel-loader/6272beb98b1915628f7b7dab8ca3d6aa3e17f148a5fcc0f8c8a10b8edc797275.json

1 line
37 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"import { unit } from '@ant-design/cssinjs';\nimport { genBasicInputStyle, genInputGroupStyle, genPlaceholderStyle, initInputToken } from '../../input/style';\nimport { genBorderlessStyle, genFilledGroupStyle, genFilledStyle, genOutlinedGroupStyle, genOutlinedStyle } from '../../input/style/variants';\nimport { resetComponent, resetIcon } from '../../style';\nimport { genCompactItemStyle } from '../../style/compact-item';\nimport { genStyleHooks, mergeToken } from '../../theme/internal';\nimport { prepareComponentToken } from './token';\nexport const genRadiusStyle = (_ref, size) => {\n let {\n componentCls,\n borderRadiusSM,\n borderRadiusLG\n } = _ref;\n const borderRadius = size === 'lg' ? borderRadiusLG : borderRadiusSM;\n return {\n [`&-${size}`]: {\n [`${componentCls}-handler-wrap`]: {\n borderStartEndRadius: borderRadius,\n borderEndEndRadius: borderRadius\n },\n [`${componentCls}-handler-up`]: {\n borderStartEndRadius: borderRadius\n },\n [`${componentCls}-handler-down`]: {\n borderEndEndRadius: borderRadius\n }\n }\n };\n};\nconst genInputNumberStyles = token => {\n const {\n componentCls,\n lineWidth,\n lineType,\n borderRadius,\n inputFontSizeSM,\n inputFontSizeLG,\n controlHeightLG,\n controlHeightSM,\n colorError,\n paddingInlineSM,\n paddingBlockSM,\n paddingBlockLG,\n paddingInlineLG,\n colorTextDescription,\n motionDurationMid,\n handleHoverColor,\n handleOpacity,\n paddingInline,\n paddingBlock,\n handleBg,\n handleActiveBg,\n colorTextDisabled,\n borderRadiusSM,\n borderRadiusLG,\n controlWidth,\n handleBorderColor,\n filledHandleBg,\n lineHeightLG,\n calc\n } = token;\n return [{\n [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, resetComponent(token)), genBasicInputStyle(token)), {\n display: 'inline-block',\n width: controlWidth,\n margin: 0,\n padding: 0,\n borderRadius\n }), genOutlinedStyle(token, {\n [`${componentCls}-handler-wrap`]: {\n background: handleBg,\n [`${componentCls}-handler-down`]: {\n borderBlockStart: `${unit(lineWidth)} ${lineType} ${handleBorderColor}`\n }\n }\n })), genFilledStyle(token, {\n [`${componentCls}-handler-wrap`]: {\n background: filledHandleBg,\n [`${componentCls}-handler-down`]: {\n borderBlockStart: `${unit(lineWidth)} ${lineType} ${handleBorderColor}`\n }\n },\n '&:focus-within': {\n [`${componentCls}-handler-wrap`]: {\n background: handleBg\n }\n }\n })), genBorderlessStyle(token)), {\n '&-rtl': {\n direction: 'rtl',\n [`${componentCls}-input`]: {\n direction: 'rtl'\n }\n },\n '&-lg': {\n padding: 0,\n fontSize: inputFontSizeLG,\n lineHeight: lineHeightLG,\n borderRadius: borderRadiusLG,\n [`input${componentCls}-input`]: {\n height: calc(controlHeightLG).sub(calc(lineWidth).mul(2)).equal(),\n padding: `${unit(paddingBlockLG)} ${unit(paddingInlineLG)}`\n }\n },\n '&-sm': {\n padding: 0,\n fontSize: inputFontSizeSM,\n borderRadius: borderRadiusSM,\n [`input${componentCls}-input`]: {\n height: calc(controlHeightSM).sub(calc(lineWidth).mul(2)).equal(),\n padding: `${unit(paddingBlockSM)} ${unit(paddingInlineSM)}`\n }\n },\n // ===================== Out Of Range =====================\n '&-out-of-range': {\n [`${componentCls}-input-wrap`]: {\n input: {\n color: colorError\n }\n }\n },\n // Style for input-group: input with label, with button or dropdown...\n '&-group': Object.assign(Object.assign(Object.assign({}, resetComponent(token)), genInputGroupStyle(token)), {\n '&-wrapper': Object.assign(Object.assign(Object.assign({\n