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

1 line
15 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"import { resetComponent, textEllipsis } from '../../style';\nimport { initMoveMotion, initSlideMotion, slideDownIn, slideDownOut, slideUpIn, slideUpOut } from '../../style/motion';\nconst genItemStyle = token => {\n const {\n optionHeight,\n optionFontSize,\n optionLineHeight,\n optionPadding\n } = token;\n return {\n position: 'relative',\n display: 'block',\n minHeight: optionHeight,\n padding: optionPadding,\n color: token.colorText,\n fontWeight: 'normal',\n fontSize: optionFontSize,\n lineHeight: optionLineHeight,\n boxSizing: 'border-box'\n };\n};\nconst genSingleStyle = token => {\n const {\n antCls,\n componentCls\n } = token;\n const selectItemCls = `${componentCls}-item`;\n const slideUpEnterActive = `&${antCls}-slide-up-enter${antCls}-slide-up-enter-active`;\n const slideUpAppearActive = `&${antCls}-slide-up-appear${antCls}-slide-up-appear-active`;\n const slideUpLeaveActive = `&${antCls}-slide-up-leave${antCls}-slide-up-leave-active`;\n const dropdownPlacementCls = `${componentCls}-dropdown-placement-`;\n return [{\n [`${componentCls}-dropdown`]: Object.assign(Object.assign({}, resetComponent(token)), {\n position: 'absolute',\n top: -9999,\n zIndex: token.zIndexPopup,\n boxSizing: 'border-box',\n padding: token.paddingXXS,\n overflow: 'hidden',\n fontSize: token.fontSize,\n // Fix select render lag of long text in chrome\n // https://github.com/ant-design/ant-design/issues/11456\n // https://github.com/ant-design/ant-design/issues/11843\n fontVariant: 'initial',\n backgroundColor: token.colorBgElevated,\n borderRadius: token.borderRadiusLG,\n outline: 'none',\n boxShadow: token.boxShadowSecondary,\n [`\n ${slideUpEnterActive}${dropdownPlacementCls}bottomLeft,\n ${slideUpAppearActive}${dropdownPlacementCls}bottomLeft\n `]: {\n animationName: slideUpIn\n },\n [`\n ${slideUpEnterActive}${dropdownPlacementCls}topLeft,\n ${slideUpAppearActive}${dropdownPlacementCls}topLeft,\n ${slideUpEnterActive}${dropdownPlacementCls}topRight,\n ${slideUpAppearActive}${dropdownPlacementCls}topRight\n `]: {\n animationName: slideDownIn\n },\n [`${slideUpLeaveActive}${dropdownPlacementCls}bottomLeft`]: {\n animationName: slideUpOut\n },\n [`\n ${slideUpLeaveActive}${dropdownPlacementCls}topLeft,\n ${slideUpLeaveActive}${dropdownPlacementCls}topRight\n `]: {\n animationName: slideDownOut\n },\n '&-hidden': {\n display: 'none'\n },\n [selectItemCls]: Object.assign(Object.assign({}, genItemStyle(token)), {\n cursor: 'pointer',\n transition: `background ${token.motionDurationSlow} ease`,\n borderRadius: token.borderRadiusSM,\n // =========== Group ============\n '&-group': {\n color: token.colorTextDescription,\n fontSize: token.fontSizeSM,\n cursor: 'default'\n },\n // =========== Option ===========\n '&-option': {\n display: 'flex',\n '&-content': Object.assign({\n flex: 'auto'\n }, textEllipsis),\n '&-state': {\n flex: 'none',\n display: 'flex',\n alignItems: 'center'\n },\n [`&-active:not(${selectItemCls}-option-disabled)`]: {\n backgroundColor: token.optionActiveBg\n },\n [`&-selected:not(${selectItemCls}-option-disabled)`]: {\n color: token.optionSelectedColor,\n fontWeight: token.optionSelectedFontWeight,\n backgroundColor: token.optionSelectedBg,\n [`${selectItemCls}-option-state`]: {\n color: token.colorPrimary\n },\n [`&:has(+ ${selectItemCls}-option-selected:not(${selectItemCls}-option-disabled))`]: {\n borderEndStartRadius: 0,\n borderEndEndRadius: 0,\n [`& + ${select