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

1 line
20 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 } from '../../style';\nconst accessibilityFocus = token => Object.assign({}, genFocusOutline(token));\nconst getThemeStyle = (token, themeSuffix) => {\n const {\n componentCls,\n itemColor,\n itemSelectedColor,\n groupTitleColor,\n itemBg,\n subMenuItemBg,\n itemSelectedBg,\n activeBarHeight,\n activeBarWidth,\n activeBarBorderWidth,\n motionDurationSlow,\n motionEaseInOut,\n motionEaseOut,\n itemPaddingInline,\n motionDurationMid,\n itemHoverColor,\n lineType,\n colorSplit,\n // Disabled\n itemDisabledColor,\n // Danger\n dangerItemColor,\n dangerItemHoverColor,\n dangerItemSelectedColor,\n dangerItemActiveBg,\n dangerItemSelectedBg,\n // Bg\n popupBg,\n itemHoverBg,\n itemActiveBg,\n menuSubMenuBg,\n // Horizontal\n horizontalItemSelectedColor,\n horizontalItemSelectedBg,\n horizontalItemBorderRadius,\n horizontalItemHoverBg\n } = token;\n return {\n [`${componentCls}-${themeSuffix}, ${componentCls}-${themeSuffix} > ${componentCls}`]: {\n color: itemColor,\n background: itemBg,\n [`&${componentCls}-root:focus-visible`]: Object.assign({}, accessibilityFocus(token)),\n // ======================== Item ========================\n [`${componentCls}-item-group-title`]: {\n color: groupTitleColor\n },\n [`${componentCls}-submenu-selected`]: {\n [`> ${componentCls}-submenu-title`]: {\n color: itemSelectedColor\n }\n },\n [`${componentCls}-item, ${componentCls}-submenu-title`]: {\n color: itemColor,\n [`&:not(${componentCls}-item-disabled):focus-visible`]: Object.assign({}, accessibilityFocus(token))\n },\n // Disabled\n [`${componentCls}-item-disabled, ${componentCls}-submenu-disabled`]: {\n color: `${itemDisabledColor} !important`\n },\n // Hover\n [`${componentCls}-item:not(${componentCls}-item-selected):not(${componentCls}-submenu-selected)`]: {\n [`&:hover, > ${componentCls}-submenu-title:hover`]: {\n color: itemHoverColor\n }\n },\n [`&:not(${componentCls}-horizontal)`]: {\n [`${componentCls}-item:not(${componentCls}-item-selected)`]: {\n '&:hover': {\n backgroundColor: itemHoverBg\n },\n '&:active': {\n backgroundColor: itemActiveBg\n }\n },\n [`${componentCls}-submenu-title`]: {\n '&:hover': {\n backgroundColor: itemHoverBg\n },\n '&:active': {\n backgroundColor: itemActiveBg\n }\n }\n },\n // Danger - only Item has\n [`${componentCls}-item-danger`]: {\n color: dangerItemColor,\n [`&${componentCls}-item:hover`]: {\n [`&:not(${componentCls}-item-selected):not(${componentCls}-submenu-selected)`]: {\n color: dangerItemHoverColor\n }\n },\n [`&${componentCls}-item:active`]: {\n background: dangerItemActiveBg\n }\n },\n [`${componentCls}-item a`]: {\n '&, &:hover': {\n color: 'inherit'\n }\n },\n [`${componentCls}-item-selected`]: {\n color: itemSelectedColor,\n // Danger\n [`&${componentCls}-item-danger`]: {\n color: dangerItemSelectedColor\n },\n 'a, a:hover': {\n color: 'inherit'\n }\n },\n [`& ${componentCls}-item-selected`]: {\n backgroundColor: itemSelectedBg,\n // Danger\n [`&${componentCls}-item-danger`]: {\n backgroundColor: dangerItemSelectedBg\n }\n },\n [`&${componentCls}-submenu > ${componentCls}`]: {\n backgroundColor: menuSubMenuBg\n },\n // ===== 设置浮层的颜色 =======\n // dark 模式会被popupBg 会被rest 为 darkPopupBg\n [`&${componentCls}-popup > ${componentCls}`]: {\n backgroundColor: popupBg\n },\n [`&${co