PromoCursed/node_modules/.cache/babel-loader/3584738b13ec3e63eadcdcb27c6863e1a670caec2cd348cb3dcd250d2b4b1b7a.json

1 line
56 KiB
JSON
Raw Normal View History

2024-08-20 23:25:37 +04:00
{"ast":null,"code":"import { unit } from '@ant-design/cssinjs';\nimport { TinyColor } from '@ctrl/tinycolor';\nimport { clearFix, resetComponent, resetIcon } from '../../style';\nimport { genCollapseMotion, initSlideMotion, initZoomMotion } from '../../style/motion';\nimport { genStyleHooks, mergeToken } from '../../theme/internal';\nimport getHorizontalStyle from './horizontal';\nimport getRTLStyle from './rtl';\nimport getThemeStyle from './theme';\nimport getVerticalStyle from './vertical';\nconst genMenuItemStyle = token => {\n const {\n componentCls,\n motionDurationSlow,\n motionDurationMid,\n motionEaseInOut,\n motionEaseOut,\n iconCls,\n iconSize,\n iconMarginInlineEnd\n } = token;\n return {\n // >>>>> Item\n [`${componentCls}-item, ${componentCls}-submenu-title`]: {\n position: 'relative',\n display: 'block',\n margin: 0,\n whiteSpace: 'nowrap',\n cursor: 'pointer',\n transition: [`border-color ${motionDurationSlow}`, `background ${motionDurationSlow}`, `padding ${motionDurationSlow} ${motionEaseInOut}`].join(','),\n [`${componentCls}-item-icon, ${iconCls}`]: {\n minWidth: iconSize,\n fontSize: iconSize,\n transition: [`font-size ${motionDurationMid} ${motionEaseOut}`, `margin ${motionDurationSlow} ${motionEaseInOut}`, `color ${motionDurationSlow}`].join(','),\n '+ span': {\n marginInlineStart: iconMarginInlineEnd,\n opacity: 1,\n transition: [`opacity ${motionDurationSlow} ${motionEaseInOut}`, `margin ${motionDurationSlow}`, `color ${motionDurationSlow}`].join(',')\n }\n },\n [`${componentCls}-item-icon`]: Object.assign({}, resetIcon()),\n [`&${componentCls}-item-only-child`]: {\n [`> ${iconCls}, > ${componentCls}-item-icon`]: {\n marginInlineEnd: 0\n }\n }\n },\n // Disabled state sets text to gray and nukes hover/tab effects\n [`${componentCls}-item-disabled, ${componentCls}-submenu-disabled`]: {\n background: 'none !important',\n cursor: 'not-allowed',\n '&::after': {\n borderColor: 'transparent !important'\n },\n a: {\n color: 'inherit !important'\n },\n [`> ${componentCls}-submenu-title`]: {\n color: 'inherit !important',\n cursor: 'not-allowed'\n }\n }\n };\n};\nconst genSubMenuArrowStyle = token => {\n const {\n componentCls,\n motionDurationSlow,\n motionEaseInOut,\n borderRadius,\n menuArrowSize,\n menuArrowOffset\n } = token;\n return {\n [`${componentCls}-submenu`]: {\n '&-expand-icon, &-arrow': {\n position: 'absolute',\n top: '50%',\n insetInlineEnd: token.margin,\n width: menuArrowSize,\n color: 'currentcolor',\n transform: 'translateY(-50%)',\n transition: `transform ${motionDurationSlow} ${motionEaseInOut}, opacity ${motionDurationSlow}`\n },\n '&-arrow': {\n // →\n '&::before, &::after': {\n position: 'absolute',\n width: token.calc(menuArrowSize).mul(0.6).equal(),\n height: token.calc(menuArrowSize).mul(0.15).equal(),\n backgroundColor: 'currentcolor',\n borderRadius,\n transition: [`background ${motionDurationSlow} ${motionEaseInOut}`, `transform ${motionDurationSlow} ${motionEaseInOut}`, `top ${motionDurationSlow} ${motionEaseInOut}`, `color ${motionDurationSlow} ${motionEaseInOut}`].join(','),\n content: '\"\"'\n },\n '&::before': {\n transform: `rotate(45deg) translateY(${unit(token.calc(menuArrowOffset).mul(-1).equal())})`\n },\n '&::after': {\n transform: `rotate(-45deg) translateY(${unit(menuArrowOffset)})`\n }\n }\n }\n };\n};\n// =============================== Base ===============================\nconst getBaseStyle = token => {\n const {\n antCls,\n componentCls,\n fontSize,\n motionDurationSlow,\n motionDurationMid,\n motionEaseInOut,\n paddingXS,\n padding,\n colorSplit,\n l