PromoCursed/node_modules/.cache/babel-loader/2147b86db26c56ce5a611687be9de2e4c2cd4c37c6bed468715fd1d88ae52fe9.json

1 line
21 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, genPlaceholderStyle, initComponentToken, initInputToken } from '../../input/style';\nimport { genBorderlessStyle, genDisabledStyle, genFilledStyle, genOutlinedStyle } from '../../input/style/variants';\nimport { resetComponent, textEllipsis } from '../../style';\nimport { genStyleHooks, mergeToken } from '../../theme/internal';\nconst genMentionsStyle = token => {\n const {\n componentCls,\n colorTextDisabled,\n controlItemBgHover,\n controlPaddingHorizontal,\n colorText,\n motionDurationSlow,\n lineHeight,\n controlHeight,\n paddingInline,\n paddingBlock,\n fontSize,\n fontSizeIcon,\n colorTextTertiary,\n colorTextQuaternary,\n colorBgElevated,\n paddingXXS,\n paddingLG,\n borderRadius,\n borderRadiusLG,\n boxShadowSecondary,\n itemPaddingVertical,\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 position: 'relative',\n display: 'inline-block',\n height: 'auto',\n padding: 0,\n overflow: 'hidden',\n lineHeight,\n whiteSpace: 'pre-wrap',\n verticalAlign: 'bottom'\n }), genOutlinedStyle(token)), genFilledStyle(token)), genBorderlessStyle(token)), {\n '&-affix-wrapper': Object.assign(Object.assign({}, genBasicInputStyle(token)), {\n display: 'inline-flex',\n padding: 0,\n '&::before': {\n display: 'inline-block',\n width: 0,\n visibility: 'hidden',\n content: '\"\\\\a0\"'\n },\n [`${componentCls}-suffix`]: {\n position: 'absolute',\n top: 0,\n insetInlineEnd: paddingInline,\n bottom: 0,\n zIndex: 1,\n display: 'inline-flex',\n alignItems: 'center',\n margin: 'auto'\n },\n [`&:has(${componentCls}-suffix) > ${componentCls} > textarea`]: {\n paddingInlineEnd: paddingLG\n },\n [`${componentCls}-clear-icon`]: {\n position: 'absolute',\n insetInlineEnd: 0,\n insetBlockStart: calc(fontSize).mul(lineHeight).mul(0.5).add(paddingBlock).equal(),\n transform: `translateY(-50%)`,\n margin: 0,\n color: colorTextQuaternary,\n fontSize: fontSizeIcon,\n verticalAlign: -1,\n // https://github.com/ant-design/ant-design/pull/18151\n // https://codesandbox.io/s/wizardly-sun-u10br\n cursor: 'pointer',\n transition: `color ${motionDurationSlow}`,\n '&:hover': {\n color: colorTextTertiary\n },\n '&:active': {\n color: colorText\n },\n '&-hidden': {\n visibility: 'hidden'\n }\n }\n }),\n '&-disabled': {\n '> textarea': Object.assign({}, genDisabledStyle(token))\n },\n // ================= Input Area =================\n [`&, &-affix-wrapper > ${componentCls}`]: {\n [`> textarea, ${componentCls}-measure`]: {\n color: colorText,\n boxSizing: 'border-box',\n minHeight: token.calc(controlHeight).sub(2),\n margin: 0,\n padding: `${unit(paddingBlock)} ${unit(paddingInline)}`,\n overflow: 'inherit',\n overflowX: 'hidden',\n overflowY: 'auto',\n fontWeight: 'inherit',\n fontSize: 'inherit',\n fontFamily: 'inherit',\n fontStyle: 'inherit',\n fontVariant: 'inherit',\n fontSizeAdjust: 'inherit',\n fontStretch: 'inherit',\n lineHeight: 'inherit',\n direction: 'inherit',\n letterSpacing: 'inherit',\n whiteSpace: 'inherit',\n textAlign: 'inherit',\n verticalAlign: 'top',\n wordWrap: 'break-word',\n wordBreak: 'inherit',\n tabSize: 'inherit'\n },\n '> textare