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

1 line
40 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"import { unit } from '@ant-design/cssinjs';\nimport { genFocusOutline, resetComponent } from '../../style';\nimport { genStyleHooks, mergeToken } from '../../theme/internal';\n// ============================== Styles ==============================\n// styles from RadioGroup only\nconst getGroupRadioStyle = token => {\n const {\n componentCls,\n antCls\n } = token;\n const groupPrefixCls = `${componentCls}-group`;\n return {\n [groupPrefixCls]: Object.assign(Object.assign({}, resetComponent(token)), {\n display: 'inline-block',\n fontSize: 0,\n // RTL\n [`&${groupPrefixCls}-rtl`]: {\n direction: 'rtl'\n },\n [`${antCls}-badge ${antCls}-badge-count`]: {\n zIndex: 1\n },\n [`> ${antCls}-badge:not(:first-child) > ${antCls}-button-wrapper`]: {\n borderInlineStart: 'none'\n }\n })\n };\n};\n// Styles from radio-wrapper\nconst getRadioBasicStyle = token => {\n const {\n componentCls,\n wrapperMarginInlineEnd,\n colorPrimary,\n radioSize,\n motionDurationSlow,\n motionDurationMid,\n motionEaseInOutCirc,\n colorBgContainer,\n colorBorder,\n lineWidth,\n colorBgContainerDisabled,\n colorTextDisabled,\n paddingXS,\n dotColorDisabled,\n lineType,\n radioColor,\n radioBgColor,\n calc\n } = token;\n const radioInnerPrefixCls = `${componentCls}-inner`;\n const dotPadding = 4;\n const radioDotDisabledSize = calc(radioSize).sub(calc(dotPadding).mul(2));\n const radioSizeCalc = calc(1).mul(radioSize).equal({\n unit: true\n });\n return {\n [`${componentCls}-wrapper`]: Object.assign(Object.assign({}, resetComponent(token)), {\n display: 'inline-flex',\n alignItems: 'baseline',\n marginInlineStart: 0,\n marginInlineEnd: wrapperMarginInlineEnd,\n cursor: 'pointer',\n // RTL\n [`&${componentCls}-wrapper-rtl`]: {\n direction: 'rtl'\n },\n '&-disabled': {\n cursor: 'not-allowed',\n color: token.colorTextDisabled\n },\n '&::after': {\n display: 'inline-block',\n width: 0,\n overflow: 'hidden',\n content: '\"\\\\a0\"'\n },\n // hashId 在 wrapper 上,只能铺平\n [`${componentCls}-checked::after`]: {\n position: 'absolute',\n insetBlockStart: 0,\n insetInlineStart: 0,\n width: '100%',\n height: '100%',\n border: `${unit(lineWidth)} ${lineType} ${colorPrimary}`,\n borderRadius: '50%',\n visibility: 'hidden',\n opacity: 0,\n content: '\"\"'\n },\n [componentCls]: Object.assign(Object.assign({}, resetComponent(token)), {\n position: 'relative',\n display: 'inline-block',\n outline: 'none',\n cursor: 'pointer',\n alignSelf: 'center',\n borderRadius: '50%'\n }),\n [`${componentCls}-wrapper:hover &,\n &:hover ${radioInnerPrefixCls}`]: {\n borderColor: colorPrimary\n },\n [`${componentCls}-input:focus-visible + ${radioInnerPrefixCls}`]: Object.assign({}, genFocusOutline(token)),\n [`${componentCls}:hover::after, ${componentCls}-wrapper:hover &::after`]: {\n visibility: 'visible'\n },\n [`${componentCls}-inner`]: {\n '&::after': {\n boxSizing: 'border-box',\n position: 'absolute',\n insetBlockStart: '50%',\n insetInlineStart: '50%',\n display: 'block',\n width: radioSizeCalc,\n height: radioSizeCalc,\n marginBlockStart: calc(1).mul(radioSize).div(-2).equal({\n unit: true\n }),\n marginInlineStart: calc(1).mul(radioSize).div(-2).equal({\n unit: true\n }),\n backgroundColor: radioColor,\n borderBlockStart: 0,\n borderInlineStart: 0,\n borderRadius: radioSizeCalc,\n transform: 'scale(0)',\n opacity: 0,\n transition: `all ${motionDurationSlow} ${motionEaseInOutCirc}`,\n content: '\"\"'\n },\