PromoCursed/node_modules/.cache/babel-loader/5641ff6c916d1b27b070a094cd2273934f9506200ca83be66fc686d7704eac1e.json

1 line
31 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"import { unit } from '@ant-design/cssinjs';\nimport { genFocusStyle, resetComponent } from '../../style';\nimport { initMoveMotion, initSlideMotion, initZoomMotion, slideDownIn, slideDownOut, slideUpIn, slideUpOut } from '../../style/motion';\nimport getArrowStyle, { getArrowOffsetToken } from '../../style/placementArrow';\nimport { getArrowToken } from '../../style/roundedArrow';\nimport { genStyleHooks, mergeToken } from '../../theme/internal';\nimport genStatusStyle from './status';\n// =============================== Base ===============================\nconst genBaseStyle = token => {\n const {\n componentCls,\n menuCls,\n zIndexPopup,\n dropdownArrowDistance,\n sizePopupArrow,\n antCls,\n iconCls,\n motionDurationMid,\n paddingBlock,\n fontSize,\n dropdownEdgeChildPadding,\n colorTextDisabled,\n fontSizeIcon,\n controlPaddingHorizontal,\n colorBgElevated\n } = token;\n return [{\n [componentCls]: {\n position: 'absolute',\n top: -9999,\n left: {\n _skip_check_: true,\n value: -9999\n },\n zIndex: zIndexPopup,\n display: 'block',\n // A placeholder out of dropdown visible range to avoid close when user moving\n '&::before': {\n position: 'absolute',\n insetBlock: token.calc(sizePopupArrow).div(2).sub(dropdownArrowDistance).equal(),\n // insetInlineStart: -7, // FIXME: Seems not work for hidden element\n zIndex: -9999,\n opacity: 0.0001,\n content: '\"\"'\n },\n [`&-trigger${antCls}-btn`]: {\n [`& > ${iconCls}-down, & > ${antCls}-btn-icon > ${iconCls}-down`]: {\n fontSize: fontSizeIcon\n }\n },\n [`${componentCls}-wrap`]: {\n position: 'relative',\n [`${antCls}-btn > ${iconCls}-down`]: {\n fontSize: fontSizeIcon\n },\n [`${iconCls}-down::before`]: {\n transition: `transform ${motionDurationMid}`\n }\n },\n [`${componentCls}-wrap-open`]: {\n [`${iconCls}-down::before`]: {\n transform: `rotate(180deg)`\n }\n },\n [`\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n `]: {\n display: 'none'\n },\n // =============================================================\n // == Motion ==\n // =============================================================\n // When position is not enough for dropdown, the placement will revert.\n // We will handle this with revert motion name.\n [`&${antCls}-slide-down-enter${antCls}-slide-down-enter-active${componentCls}-placement-bottomLeft,\n &${antCls}-slide-down-appear${antCls}-slide-down-appear-active${componentCls}-placement-bottomLeft,\n &${antCls}-slide-down-enter${antCls}-slide-down-enter-active${componentCls}-placement-bottom,\n &${antCls}-slide-down-appear${antCls}-slide-down-appear-active${componentCls}-placement-bottom,\n &${antCls}-slide-down-enter${antCls}-slide-down-enter-active${componentCls}-placement-bottomRight,\n &${antCls}-slide-down-appear${antCls}-slide-down-appear-active${componentCls}-placement-bottomRight`]: {\n animationName: slideUpIn\n },\n [`&${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-placement-topLeft,\n &${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-placement-topLeft,\n &${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-placement-top,\n &${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-placement-top,\n &${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-placement-topRight,\n &${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-placement-topRight`]: {\n animationName: slideDownIn\n },\n [`&${antCls}-slide-down-leave${antCls}-slide-down-leave-active${componentCls}-placement-bottomLeft,\