PromoCursed/node_modules/.cache/babel-loader/76b9e97ec48f139413c5d9980767578198a44b64d0d3ec38b3193ad74931ec82.json

1 line
43 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"import { unit } from '@ant-design/cssinjs';\nimport { genPlaceholderStyle, initInputToken } from '../../input/style';\nimport { resetComponent, textEllipsis } from '../../style';\nimport { genCompactItemStyle } from '../../style/compact-item';\nimport { initMoveMotion, initSlideMotion, slideDownIn, slideDownOut, slideUpIn, slideUpOut } from '../../style/motion';\nimport { genRoundedArrow } from '../../style/roundedArrow';\nimport { genStyleHooks, mergeToken } from '../../theme/internal';\nimport genPickerMultipleStyle from './multiple';\nimport genPickerPanelStyle, { genPanelStyle } from './panel';\nimport { initPanelComponentToken, initPickerPanelToken, prepareComponentToken } from './token';\nimport genVariantsStyle from './variants';\nexport { initPickerPanelToken, initPanelComponentToken, genPanelStyle };\nconst genPickerPadding = (token, inputHeight, fontHeight, paddingHorizontal) => {\n const height = token.calc(fontHeight).add(2).equal();\n const paddingTop = token.max(token.calc(inputHeight).sub(height).div(2).equal(), 0);\n const paddingBottom = token.max(token.calc(inputHeight).sub(height).sub(paddingTop).equal(), 0);\n return {\n padding: `${unit(paddingTop)} ${unit(paddingHorizontal)} ${unit(paddingBottom)}`\n };\n};\nconst genPickerStatusStyle = token => {\n const {\n componentCls,\n colorError,\n colorWarning\n } = token;\n return {\n [`${componentCls}:not(${componentCls}-disabled):not([disabled])`]: {\n [`&${componentCls}-status-error`]: {\n [`${componentCls}-active-bar`]: {\n background: colorError\n }\n },\n [`&${componentCls}-status-warning`]: {\n [`${componentCls}-active-bar`]: {\n background: colorWarning\n }\n }\n }\n };\n};\nconst genPickerStyle = token => {\n const {\n componentCls,\n antCls,\n controlHeight,\n paddingInline,\n lineWidth,\n lineType,\n colorBorder,\n borderRadius,\n motionDurationMid,\n colorTextDisabled,\n colorTextPlaceholder,\n controlHeightLG,\n fontSizeLG,\n controlHeightSM,\n paddingInlineSM,\n paddingXS,\n marginXS,\n colorTextDescription,\n lineWidthBold,\n colorPrimary,\n motionDurationSlow,\n zIndexPopup,\n paddingXXS,\n sizePopupArrow,\n colorBgElevated,\n borderRadiusLG,\n boxShadowSecondary,\n borderRadiusSM,\n colorSplit,\n cellHoverBg,\n presetsWidth,\n presetsMaxWidth,\n boxShadowPopoverArrow,\n fontHeight,\n fontHeightLG,\n lineHeightLG\n } = token;\n return [{\n [componentCls]: Object.assign(Object.assign(Object.assign({}, resetComponent(token)), genPickerPadding(token, controlHeight, fontHeight, paddingInline)), {\n position: 'relative',\n display: 'inline-flex',\n alignItems: 'center',\n lineHeight: 1,\n borderRadius,\n transition: `border ${motionDurationMid}, box-shadow ${motionDurationMid}, background ${motionDurationMid}`,\n // ======================== Input =========================\n [`${componentCls}-input`]: {\n position: 'relative',\n display: 'inline-flex',\n alignItems: 'center',\n width: '100%',\n '> input': Object.assign(Object.assign({\n position: 'relative',\n display: 'inline-block',\n width: '100%',\n color: 'inherit',\n fontSize: token.fontSize,\n lineHeight: token.lineHeight,\n transition: `all ${motionDurationMid}`\n }, genPlaceholderStyle(colorTextPlaceholder)), {\n flex: 'auto',\n // Fix Firefox flex not correct:\n // https://github.com/ant-design/ant-design/pull/20023#issuecomment-564389553\n minWidth: 1,\n height: 'auto',\n padding: 0,\n background: 'transparent',\n border: 0,\n fontFamily: 'inherit',\n '&:focus': {\n boxShadow: 'none',\n outline: 0\n },\n '&[disabled]': {\n background: 'transparent',\n color: colorTextDisa