index.js 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561
  1. "use strict";
  2. var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
  3. Object.defineProperty(exports, "__esModule", {
  4. value: true
  5. });
  6. exports.prepareComponentToken = exports.default = void 0;
  7. var _cssinjs = require("@ant-design/cssinjs");
  8. var _fastColor = require("@ant-design/fast-color");
  9. var _style = require("../../style");
  10. var _motion = require("../../style/motion");
  11. var _internal = require("../../theme/internal");
  12. var _horizontal = _interopRequireDefault(require("./horizontal"));
  13. var _rtl = _interopRequireDefault(require("./rtl"));
  14. var _theme = _interopRequireDefault(require("./theme"));
  15. var _vertical = _interopRequireDefault(require("./vertical"));
  16. const genMenuItemStyle = token => {
  17. const {
  18. componentCls,
  19. motionDurationSlow,
  20. motionDurationMid,
  21. motionEaseInOut,
  22. motionEaseOut,
  23. iconCls,
  24. iconSize,
  25. iconMarginInlineEnd
  26. } = token;
  27. return {
  28. // >>>>> Item
  29. [`${componentCls}-item, ${componentCls}-submenu-title`]: {
  30. position: 'relative',
  31. display: 'block',
  32. margin: 0,
  33. whiteSpace: 'nowrap',
  34. cursor: 'pointer',
  35. transition: [`border-color ${motionDurationSlow}`, `background ${motionDurationSlow}`, `padding calc(${motionDurationSlow} + 0.1s) ${motionEaseInOut}`].join(','),
  36. [`${componentCls}-item-icon, ${iconCls}`]: {
  37. minWidth: iconSize,
  38. fontSize: iconSize,
  39. transition: [`font-size ${motionDurationMid} ${motionEaseOut}`, `margin ${motionDurationSlow} ${motionEaseInOut}`, `color ${motionDurationSlow}`].join(','),
  40. '+ span': {
  41. marginInlineStart: iconMarginInlineEnd,
  42. opacity: 1,
  43. transition: [`opacity ${motionDurationSlow} ${motionEaseInOut}`, `margin ${motionDurationSlow}`, `color ${motionDurationSlow}`].join(',')
  44. }
  45. },
  46. [`${componentCls}-item-icon`]: Object.assign({}, (0, _style.resetIcon)()),
  47. [`&${componentCls}-item-only-child`]: {
  48. [`> ${iconCls}, > ${componentCls}-item-icon`]: {
  49. marginInlineEnd: 0
  50. }
  51. }
  52. },
  53. // Disabled state sets text to gray and nukes hover/tab effects
  54. [`${componentCls}-item-disabled, ${componentCls}-submenu-disabled`]: {
  55. background: 'none !important',
  56. cursor: 'not-allowed',
  57. '&::after': {
  58. borderColor: 'transparent !important'
  59. },
  60. a: {
  61. color: 'inherit !important',
  62. cursor: 'not-allowed',
  63. pointerEvents: 'none'
  64. },
  65. [`> ${componentCls}-submenu-title`]: {
  66. color: 'inherit !important',
  67. cursor: 'not-allowed'
  68. }
  69. }
  70. };
  71. };
  72. const genSubMenuArrowStyle = token => {
  73. const {
  74. componentCls,
  75. motionDurationSlow,
  76. motionEaseInOut,
  77. borderRadius,
  78. menuArrowSize,
  79. menuArrowOffset
  80. } = token;
  81. return {
  82. [`${componentCls}-submenu`]: {
  83. '&-expand-icon, &-arrow': {
  84. position: 'absolute',
  85. top: '50%',
  86. insetInlineEnd: token.margin,
  87. width: menuArrowSize,
  88. color: 'currentcolor',
  89. transform: 'translateY(-50%)',
  90. transition: `transform ${motionDurationSlow} ${motionEaseInOut}, opacity ${motionDurationSlow}`
  91. },
  92. '&-arrow': {
  93. // →
  94. '&::before, &::after': {
  95. position: 'absolute',
  96. width: token.calc(menuArrowSize).mul(0.6).equal(),
  97. height: token.calc(menuArrowSize).mul(0.15).equal(),
  98. backgroundColor: 'currentcolor',
  99. borderRadius,
  100. transition: [`background ${motionDurationSlow} ${motionEaseInOut}`, `transform ${motionDurationSlow} ${motionEaseInOut}`, `top ${motionDurationSlow} ${motionEaseInOut}`, `color ${motionDurationSlow} ${motionEaseInOut}`].join(','),
  101. content: '""'
  102. },
  103. '&::before': {
  104. transform: `rotate(45deg) translateY(${(0, _cssinjs.unit)(token.calc(menuArrowOffset).mul(-1).equal())})`
  105. },
  106. '&::after': {
  107. transform: `rotate(-45deg) translateY(${(0, _cssinjs.unit)(menuArrowOffset)})`
  108. }
  109. }
  110. }
  111. };
  112. };
  113. // =============================== Base ===============================
  114. const getBaseStyle = token => {
  115. const {
  116. antCls,
  117. componentCls,
  118. fontSize,
  119. motionDurationSlow,
  120. motionDurationMid,
  121. motionEaseInOut,
  122. paddingXS,
  123. padding,
  124. colorSplit,
  125. lineWidth,
  126. zIndexPopup,
  127. borderRadiusLG,
  128. subMenuItemBorderRadius,
  129. menuArrowSize,
  130. menuArrowOffset,
  131. lineType,
  132. groupTitleLineHeight,
  133. groupTitleFontSize
  134. } = token;
  135. return [
  136. // Misc
  137. {
  138. '': {
  139. [componentCls]: Object.assign(Object.assign({}, (0, _style.clearFix)()), {
  140. // Hidden
  141. '&-hidden': {
  142. display: 'none'
  143. }
  144. })
  145. },
  146. [`${componentCls}-submenu-hidden`]: {
  147. display: 'none'
  148. }
  149. }, {
  150. [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (0, _style.resetComponent)(token)), (0, _style.clearFix)()), {
  151. marginBottom: 0,
  152. paddingInlineStart: 0,
  153. // Override default ul/ol
  154. fontSize,
  155. lineHeight: 0,
  156. listStyle: 'none',
  157. outline: 'none',
  158. // Magic cubic here but smooth transition
  159. transition: `width ${motionDurationSlow} cubic-bezier(0.2, 0, 0, 1) 0s`,
  160. 'ul, ol': {
  161. margin: 0,
  162. padding: 0,
  163. listStyle: 'none'
  164. },
  165. // Overflow ellipsis
  166. '&-overflow': {
  167. display: 'flex',
  168. [`${componentCls}-item`]: {
  169. flex: 'none'
  170. }
  171. },
  172. [`${componentCls}-item, ${componentCls}-submenu, ${componentCls}-submenu-title`]: {
  173. borderRadius: token.itemBorderRadius
  174. },
  175. [`${componentCls}-item-group-title`]: {
  176. padding: `${(0, _cssinjs.unit)(paddingXS)} ${(0, _cssinjs.unit)(padding)}`,
  177. fontSize: groupTitleFontSize,
  178. lineHeight: groupTitleLineHeight,
  179. transition: `all ${motionDurationSlow}`
  180. },
  181. [`&-horizontal ${componentCls}-submenu`]: {
  182. transition: [`border-color ${motionDurationSlow} ${motionEaseInOut}`, `background ${motionDurationSlow} ${motionEaseInOut}`].join(',')
  183. },
  184. [`${componentCls}-submenu, ${componentCls}-submenu-inline`]: {
  185. transition: [`border-color ${motionDurationSlow} ${motionEaseInOut}`, `background ${motionDurationSlow} ${motionEaseInOut}`, `padding ${motionDurationMid} ${motionEaseInOut}`].join(',')
  186. },
  187. [`${componentCls}-submenu ${componentCls}-sub`]: {
  188. cursor: 'initial',
  189. transition: [`background ${motionDurationSlow} ${motionEaseInOut}`, `padding ${motionDurationSlow} ${motionEaseInOut}`].join(',')
  190. },
  191. [`${componentCls}-title-content`]: {
  192. transition: `color ${motionDurationSlow}`,
  193. '&-with-extra': {
  194. display: 'inline-flex',
  195. alignItems: 'center',
  196. width: '100%'
  197. },
  198. // https://github.com/ant-design/ant-design/issues/41143
  199. [`> ${antCls}-typography-ellipsis-single-line`]: {
  200. display: 'inline',
  201. verticalAlign: 'unset'
  202. },
  203. [`${componentCls}-item-extra`]: {
  204. marginInlineStart: 'auto',
  205. paddingInlineStart: token.padding
  206. }
  207. },
  208. [`${componentCls}-item a`]: {
  209. '&::before': {
  210. position: 'absolute',
  211. inset: 0,
  212. backgroundColor: 'transparent',
  213. content: '""'
  214. }
  215. },
  216. // Removed a Badge related style seems it's safe
  217. // https://github.com/ant-design/ant-design/issues/19809
  218. // >>>>> Divider
  219. [`${componentCls}-item-divider`]: {
  220. overflow: 'hidden',
  221. lineHeight: 0,
  222. borderColor: colorSplit,
  223. borderStyle: lineType,
  224. borderWidth: 0,
  225. borderTopWidth: lineWidth,
  226. marginBlock: lineWidth,
  227. padding: 0,
  228. '&-dashed': {
  229. borderStyle: 'dashed'
  230. }
  231. }
  232. }), genMenuItemStyle(token)), {
  233. [`${componentCls}-item-group`]: {
  234. [`${componentCls}-item-group-list`]: {
  235. margin: 0,
  236. padding: 0,
  237. [`${componentCls}-item, ${componentCls}-submenu-title`]: {
  238. paddingInline: `${(0, _cssinjs.unit)(token.calc(fontSize).mul(2).equal())} ${(0, _cssinjs.unit)(padding)}`
  239. }
  240. }
  241. },
  242. // ======================= Sub Menu =======================
  243. '&-submenu': {
  244. '&-popup': {
  245. position: 'absolute',
  246. zIndex: zIndexPopup,
  247. borderRadius: borderRadiusLG,
  248. boxShadow: 'none',
  249. transformOrigin: '0 0',
  250. [`&${componentCls}-submenu`]: {
  251. background: 'transparent'
  252. },
  253. // https://github.com/ant-design/ant-design/issues/13955
  254. '&::before': {
  255. position: 'absolute',
  256. inset: 0,
  257. zIndex: -1,
  258. width: '100%',
  259. height: '100%',
  260. opacity: 0,
  261. content: '""'
  262. },
  263. [`> ${componentCls}`]: Object.assign(Object.assign(Object.assign({
  264. borderRadius: borderRadiusLG
  265. }, genMenuItemStyle(token)), genSubMenuArrowStyle(token)), {
  266. [`${componentCls}-item, ${componentCls}-submenu > ${componentCls}-submenu-title`]: {
  267. borderRadius: subMenuItemBorderRadius
  268. },
  269. [`${componentCls}-submenu-title::after`]: {
  270. transition: `transform ${motionDurationSlow} ${motionEaseInOut}`
  271. }
  272. })
  273. },
  274. [`
  275. &-placement-leftTop,
  276. &-placement-bottomRight,
  277. `]: {
  278. transformOrigin: '100% 0'
  279. },
  280. [`
  281. &-placement-leftBottom,
  282. &-placement-topRight,
  283. `]: {
  284. transformOrigin: '100% 100%'
  285. },
  286. [`
  287. &-placement-rightBottom,
  288. &-placement-topLeft,
  289. `]: {
  290. transformOrigin: '0 100%'
  291. },
  292. [`
  293. &-placement-bottomLeft,
  294. &-placement-rightTop,
  295. `]: {
  296. transformOrigin: '0 0'
  297. },
  298. [`
  299. &-placement-leftTop,
  300. &-placement-leftBottom
  301. `]: {
  302. paddingInlineEnd: token.paddingXS
  303. },
  304. [`
  305. &-placement-rightTop,
  306. &-placement-rightBottom
  307. `]: {
  308. paddingInlineStart: token.paddingXS
  309. },
  310. [`
  311. &-placement-topRight,
  312. &-placement-topLeft
  313. `]: {
  314. paddingBottom: token.paddingXS
  315. },
  316. [`
  317. &-placement-bottomRight,
  318. &-placement-bottomLeft
  319. `]: {
  320. paddingTop: token.paddingXS
  321. }
  322. }
  323. }), genSubMenuArrowStyle(token)), {
  324. [`&-inline-collapsed ${componentCls}-submenu-arrow,
  325. &-inline ${componentCls}-submenu-arrow`]: {
  326. // ↓
  327. '&::before': {
  328. transform: `rotate(-45deg) translateX(${(0, _cssinjs.unit)(menuArrowOffset)})`
  329. },
  330. '&::after': {
  331. transform: `rotate(45deg) translateX(${(0, _cssinjs.unit)(token.calc(menuArrowOffset).mul(-1).equal())})`
  332. }
  333. },
  334. [`${componentCls}-submenu-open${componentCls}-submenu-inline > ${componentCls}-submenu-title > ${componentCls}-submenu-arrow`]: {
  335. // ↑
  336. transform: `translateY(${(0, _cssinjs.unit)(token.calc(menuArrowSize).mul(0.2).mul(-1).equal())})`,
  337. '&::after': {
  338. transform: `rotate(-45deg) translateX(${(0, _cssinjs.unit)(token.calc(menuArrowOffset).mul(-1).equal())})`
  339. },
  340. '&::before': {
  341. transform: `rotate(45deg) translateX(${(0, _cssinjs.unit)(menuArrowOffset)})`
  342. }
  343. }
  344. })
  345. },
  346. // Integration with header element so menu items have the same height
  347. {
  348. [`${antCls}-layout-header`]: {
  349. [componentCls]: {
  350. lineHeight: 'inherit'
  351. }
  352. }
  353. }];
  354. };
  355. const prepareComponentToken = token => {
  356. var _a, _b, _c;
  357. const {
  358. colorPrimary,
  359. colorError,
  360. colorTextDisabled,
  361. colorErrorBg,
  362. colorText,
  363. colorTextDescription,
  364. colorBgContainer,
  365. colorFillAlter,
  366. colorFillContent,
  367. lineWidth,
  368. lineWidthBold,
  369. controlItemBgActive,
  370. colorBgTextHover,
  371. controlHeightLG,
  372. lineHeight,
  373. colorBgElevated,
  374. marginXXS,
  375. padding,
  376. fontSize,
  377. controlHeightSM,
  378. fontSizeLG,
  379. colorTextLightSolid,
  380. colorErrorHover
  381. } = token;
  382. const activeBarWidth = (_a = token.activeBarWidth) !== null && _a !== void 0 ? _a : 0;
  383. const activeBarBorderWidth = (_b = token.activeBarBorderWidth) !== null && _b !== void 0 ? _b : lineWidth;
  384. const itemMarginInline = (_c = token.itemMarginInline) !== null && _c !== void 0 ? _c : token.marginXXS;
  385. const colorTextDark = new _fastColor.FastColor(colorTextLightSolid).setA(0.65).toRgbString();
  386. return {
  387. dropdownWidth: 160,
  388. zIndexPopup: token.zIndexPopupBase + 50,
  389. radiusItem: token.borderRadiusLG,
  390. itemBorderRadius: token.borderRadiusLG,
  391. radiusSubMenuItem: token.borderRadiusSM,
  392. subMenuItemBorderRadius: token.borderRadiusSM,
  393. colorItemText: colorText,
  394. itemColor: colorText,
  395. colorItemTextHover: colorText,
  396. itemHoverColor: colorText,
  397. colorItemTextHoverHorizontal: colorPrimary,
  398. horizontalItemHoverColor: colorPrimary,
  399. colorGroupTitle: colorTextDescription,
  400. groupTitleColor: colorTextDescription,
  401. colorItemTextSelected: colorPrimary,
  402. itemSelectedColor: colorPrimary,
  403. subMenuItemSelectedColor: colorPrimary,
  404. colorItemTextSelectedHorizontal: colorPrimary,
  405. horizontalItemSelectedColor: colorPrimary,
  406. colorItemBg: colorBgContainer,
  407. itemBg: colorBgContainer,
  408. colorItemBgHover: colorBgTextHover,
  409. itemHoverBg: colorBgTextHover,
  410. colorItemBgActive: colorFillContent,
  411. itemActiveBg: controlItemBgActive,
  412. colorSubItemBg: colorFillAlter,
  413. subMenuItemBg: colorFillAlter,
  414. colorItemBgSelected: controlItemBgActive,
  415. itemSelectedBg: controlItemBgActive,
  416. colorItemBgSelectedHorizontal: 'transparent',
  417. horizontalItemSelectedBg: 'transparent',
  418. colorActiveBarWidth: 0,
  419. activeBarWidth,
  420. colorActiveBarHeight: lineWidthBold,
  421. activeBarHeight: lineWidthBold,
  422. colorActiveBarBorderSize: lineWidth,
  423. activeBarBorderWidth,
  424. // Disabled
  425. colorItemTextDisabled: colorTextDisabled,
  426. itemDisabledColor: colorTextDisabled,
  427. // Danger
  428. colorDangerItemText: colorError,
  429. dangerItemColor: colorError,
  430. colorDangerItemTextHover: colorError,
  431. dangerItemHoverColor: colorError,
  432. colorDangerItemTextSelected: colorError,
  433. dangerItemSelectedColor: colorError,
  434. colorDangerItemBgActive: colorErrorBg,
  435. dangerItemActiveBg: colorErrorBg,
  436. colorDangerItemBgSelected: colorErrorBg,
  437. dangerItemSelectedBg: colorErrorBg,
  438. itemMarginInline,
  439. horizontalItemBorderRadius: 0,
  440. horizontalItemHoverBg: 'transparent',
  441. itemHeight: controlHeightLG,
  442. groupTitleLineHeight: lineHeight,
  443. collapsedWidth: controlHeightLG * 2,
  444. popupBg: colorBgElevated,
  445. itemMarginBlock: marginXXS,
  446. itemPaddingInline: padding,
  447. horizontalLineHeight: `${controlHeightLG * 1.15}px`,
  448. iconSize: fontSize,
  449. iconMarginInlineEnd: controlHeightSM - fontSize,
  450. collapsedIconSize: fontSizeLG,
  451. groupTitleFontSize: fontSize,
  452. // Disabled
  453. darkItemDisabledColor: new _fastColor.FastColor(colorTextLightSolid).setA(0.25).toRgbString(),
  454. // Dark
  455. darkItemColor: colorTextDark,
  456. darkDangerItemColor: colorError,
  457. darkItemBg: '#001529',
  458. darkPopupBg: '#001529',
  459. darkSubMenuItemBg: '#000c17',
  460. darkItemSelectedColor: colorTextLightSolid,
  461. darkItemSelectedBg: colorPrimary,
  462. darkDangerItemSelectedBg: colorError,
  463. darkItemHoverBg: 'transparent',
  464. darkGroupTitleColor: colorTextDark,
  465. darkItemHoverColor: colorTextLightSolid,
  466. darkDangerItemHoverColor: colorErrorHover,
  467. darkDangerItemSelectedColor: colorTextLightSolid,
  468. darkDangerItemActiveBg: colorError,
  469. // internal
  470. itemWidth: activeBarWidth ? `calc(100% + ${activeBarBorderWidth}px)` : `calc(100% - ${itemMarginInline * 2}px)`
  471. };
  472. };
  473. // ============================== Export ==============================
  474. exports.prepareComponentToken = prepareComponentToken;
  475. var _default = (prefixCls, rootCls = prefixCls, injectStyle = true) => {
  476. const useStyle = (0, _internal.genStyleHooks)('Menu', token => {
  477. const {
  478. colorBgElevated,
  479. controlHeightLG,
  480. fontSize,
  481. darkItemColor,
  482. darkDangerItemColor,
  483. darkItemBg,
  484. darkSubMenuItemBg,
  485. darkItemSelectedColor,
  486. darkItemSelectedBg,
  487. darkDangerItemSelectedBg,
  488. darkItemHoverBg,
  489. darkGroupTitleColor,
  490. darkItemHoverColor,
  491. darkItemDisabledColor,
  492. darkDangerItemHoverColor,
  493. darkDangerItemSelectedColor,
  494. darkDangerItemActiveBg,
  495. popupBg,
  496. darkPopupBg
  497. } = token;
  498. const menuArrowSize = token.calc(fontSize).div(7).mul(5).equal();
  499. // Menu Token
  500. const menuToken = (0, _internal.mergeToken)(token, {
  501. menuArrowSize,
  502. menuHorizontalHeight: token.calc(controlHeightLG).mul(1.15).equal(),
  503. menuArrowOffset: token.calc(menuArrowSize).mul(0.25).equal(),
  504. menuSubMenuBg: colorBgElevated,
  505. calc: token.calc,
  506. popupBg
  507. });
  508. const menuDarkToken = (0, _internal.mergeToken)(menuToken, {
  509. itemColor: darkItemColor,
  510. itemHoverColor: darkItemHoverColor,
  511. groupTitleColor: darkGroupTitleColor,
  512. itemSelectedColor: darkItemSelectedColor,
  513. subMenuItemSelectedColor: darkItemSelectedColor,
  514. itemBg: darkItemBg,
  515. popupBg: darkPopupBg,
  516. subMenuItemBg: darkSubMenuItemBg,
  517. itemActiveBg: 'transparent',
  518. itemSelectedBg: darkItemSelectedBg,
  519. activeBarHeight: 0,
  520. activeBarBorderWidth: 0,
  521. itemHoverBg: darkItemHoverBg,
  522. // Disabled
  523. itemDisabledColor: darkItemDisabledColor,
  524. // Danger
  525. dangerItemColor: darkDangerItemColor,
  526. dangerItemHoverColor: darkDangerItemHoverColor,
  527. dangerItemSelectedColor: darkDangerItemSelectedColor,
  528. dangerItemActiveBg: darkDangerItemActiveBg,
  529. dangerItemSelectedBg: darkDangerItemSelectedBg,
  530. menuSubMenuBg: darkSubMenuItemBg,
  531. // Horizontal
  532. horizontalItemSelectedColor: darkItemSelectedColor,
  533. horizontalItemSelectedBg: darkItemSelectedBg
  534. });
  535. return [
  536. // Basic
  537. getBaseStyle(menuToken),
  538. // Horizontal
  539. (0, _horizontal.default)(menuToken),
  540. // Hard code for some light style
  541. // Vertical
  542. (0, _vertical.default)(menuToken),
  543. // Hard code for some light style
  544. // Theme
  545. (0, _theme.default)(menuToken, 'light'), (0, _theme.default)(menuDarkToken, 'dark'),
  546. // RTL
  547. (0, _rtl.default)(menuToken),
  548. // Motion
  549. (0, _motion.genCollapseMotion)(menuToken), (0, _motion.initSlideMotion)(menuToken, 'slide-up'), (0, _motion.initSlideMotion)(menuToken, 'slide-down'), (0, _motion.initZoomMotion)(menuToken, 'zoom-big')];
  550. }, prepareComponentToken, {
  551. deprecatedTokens: [['colorGroupTitle', 'groupTitleColor'], ['radiusItem', 'itemBorderRadius'], ['radiusSubMenuItem', 'subMenuItemBorderRadius'], ['colorItemText', 'itemColor'], ['colorItemTextHover', 'itemHoverColor'], ['colorItemTextHoverHorizontal', 'horizontalItemHoverColor'], ['colorItemTextSelected', 'itemSelectedColor'], ['colorItemTextSelectedHorizontal', 'horizontalItemSelectedColor'], ['colorItemTextDisabled', 'itemDisabledColor'], ['colorDangerItemText', 'dangerItemColor'], ['colorDangerItemTextHover', 'dangerItemHoverColor'], ['colorDangerItemTextSelected', 'dangerItemSelectedColor'], ['colorDangerItemBgActive', 'dangerItemActiveBg'], ['colorDangerItemBgSelected', 'dangerItemSelectedBg'], ['colorItemBg', 'itemBg'], ['colorItemBgHover', 'itemHoverBg'], ['colorSubItemBg', 'subMenuItemBg'], ['colorItemBgActive', 'itemActiveBg'], ['colorItemBgSelectedHorizontal', 'horizontalItemSelectedBg'], ['colorActiveBarWidth', 'activeBarWidth'], ['colorActiveBarHeight', 'activeBarHeight'], ['colorActiveBarBorderSize', 'activeBarBorderWidth'], ['colorItemBgSelected', 'itemSelectedBg']],
  552. // Dropdown will handle menu style self. We do not need to handle this.
  553. injectStyle,
  554. unitless: {
  555. groupTitleLineHeight: true
  556. }
  557. });
  558. return useStyle(prefixCls, rootCls);
  559. };
  560. exports.default = _default;