PromoCursed/node_modules/.cache/babel-loader/6c80a31785c6f22f8744a35f0e36ce0866c4123ff2e2496da08bda160b9e6dfa.json

1 line
66 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"import { unit } from '@ant-design/cssinjs';\nimport { clearFix, resetComponent } from '../../style';\nimport { genCompactItemStyle } from '../../style/compact-item';\nimport { genStyleHooks, mergeToken } from '../../theme/internal';\nimport { initComponentToken, initInputToken } from './token';\nimport { genBorderlessStyle, genFilledGroupStyle, genFilledStyle, genOutlinedGroupStyle, genOutlinedStyle } from './variants';\nexport { initComponentToken, initInputToken };\nexport const genPlaceholderStyle = color => ({\n // Firefox\n '&::-moz-placeholder': {\n opacity: 1\n },\n '&::placeholder': {\n color,\n userSelect: 'none' // https://github.com/ant-design/ant-design/pull/32639\n },\n '&:placeholder-shown': {\n textOverflow: 'ellipsis'\n }\n});\nexport const genActiveStyle = token => ({\n borderColor: token.activeBorderColor,\n boxShadow: token.activeShadow,\n outline: 0,\n backgroundColor: token.activeBg\n});\nconst genInputLargeStyle = token => {\n const {\n paddingBlockLG,\n lineHeightLG,\n borderRadiusLG,\n paddingInlineLG\n } = token;\n return {\n padding: `${unit(paddingBlockLG)} ${unit(paddingInlineLG)}`,\n fontSize: token.inputFontSizeLG,\n lineHeight: lineHeightLG,\n borderRadius: borderRadiusLG\n };\n};\nexport const genInputSmallStyle = token => ({\n padding: `${unit(token.paddingBlockSM)} ${unit(token.paddingInlineSM)}`,\n fontSize: token.inputFontSizeSM,\n borderRadius: token.borderRadiusSM\n});\nexport const genBasicInputStyle = token => Object.assign(Object.assign({\n position: 'relative',\n display: 'inline-block',\n width: '100%',\n minWidth: 0,\n padding: `${unit(token.paddingBlock)} ${unit(token.paddingInline)}`,\n color: token.colorText,\n fontSize: token.inputFontSize,\n lineHeight: token.lineHeight,\n borderRadius: token.borderRadius,\n transition: `all ${token.motionDurationMid}`\n}, genPlaceholderStyle(token.colorTextPlaceholder)), {\n // Reset height for `textarea`s\n 'textarea&': {\n maxWidth: '100%',\n // prevent textarea resize from coming out of its container\n height: 'auto',\n minHeight: token.controlHeight,\n lineHeight: token.lineHeight,\n verticalAlign: 'bottom',\n transition: `all ${token.motionDurationSlow}, height 0s`,\n resize: 'vertical'\n },\n // Size\n '&-lg': Object.assign({}, genInputLargeStyle(token)),\n '&-sm': Object.assign({}, genInputSmallStyle(token)),\n // RTL\n '&-rtl, &-textarea-rtl': {\n direction: 'rtl'\n }\n});\nexport const genInputGroupStyle = token => {\n const {\n componentCls,\n antCls\n } = token;\n return {\n position: 'relative',\n display: 'table',\n width: '100%',\n borderCollapse: 'separate',\n borderSpacing: 0,\n // Undo padding and float of grid classes\n \"&[class*='col-']\": {\n paddingInlineEnd: token.paddingXS,\n '&:last-child': {\n paddingInlineEnd: 0\n }\n },\n // Sizing options\n [`&-lg ${componentCls}, &-lg > ${componentCls}-group-addon`]: Object.assign({}, genInputLargeStyle(token)),\n [`&-sm ${componentCls}, &-sm > ${componentCls}-group-addon`]: Object.assign({}, genInputSmallStyle(token)),\n // Fix https://github.com/ant-design/ant-design/issues/5754\n [`&-lg ${antCls}-select-single ${antCls}-select-selector`]: {\n height: token.controlHeightLG\n },\n [`&-sm ${antCls}-select-single ${antCls}-select-selector`]: {\n height: token.controlHeightSM\n },\n [`> ${componentCls}`]: {\n display: 'table-cell',\n '&:not(:first-child):not(:last-child)': {\n borderRadius: 0\n }\n },\n [`${componentCls}-group`]: {\n '&-addon, &-wrap': {\n display: 'table-cell',\n width: 1,\n whiteSpace: 'nowrap',\n verticalAlign: 'middle',\n '&:not(:first-child):not(:last-child)': {\n borderRadius: 0\n }\n },\n '&-wrap > *': {\n display: 'block !important'\n },\n '&-addon': {\n position: 'relative',\n padding: `0 ${unit(token.paddingInline)}`,\n