@skbkontur/side-menu 0.9.5 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +90 -9
  3. package/hooks/useActiveState.js +1 -1
  4. package/hooks/useNumberOfTextLinesInItem.d.ts +12 -1
  5. package/hooks/useNumberOfTextLinesInItem.js +45 -30
  6. package/hooks/useNumberOfTextLinesInSubItem.d.ts +2 -1
  7. package/hooks/useNumberOfTextLinesInSubItem.js +2 -2
  8. package/hooks/useOpenedState.js +1 -1
  9. package/hooks/useOpenedSubElementState.js +1 -1
  10. package/internal/themes/SideMenuTheme.d.ts +110 -0
  11. package/internal/themes/SideMenuTheme.js +234 -0
  12. package/lib/theming/ThemeHelpers.d.ts +18 -0
  13. package/lib/theming/ThemeHelpers.js +66 -0
  14. package/lib/theming/ThemeTypes.d.ts +3 -0
  15. package/lib/theming/ThemeTypes.js +0 -0
  16. package/lib/utils/memo.d.ts +1 -0
  17. package/lib/utils/memo.js +9 -0
  18. package/{utils → lib/utils}/scripts.d.ts +1 -2
  19. package/{utils → lib/utils}/scripts.js +0 -8
  20. package/package.json +2 -2
  21. package/src/SideMenu/SideMenu.js +40 -36
  22. package/src/SideMenu/SideMenu.styles.d.ts +12 -14
  23. package/src/SideMenu/SideMenu.styles.js +29 -31
  24. package/src/SideMenuAvatar/SideMenuAvatar.md +7 -0
  25. package/src/SideMenuBody/SideMenuBody.d.ts +1 -2
  26. package/src/SideMenuBody/SideMenuBody.js +16 -9
  27. package/src/SideMenuBody/SideMenuBody.md +7 -0
  28. package/src/SideMenuBody/SideMenuBody.styles.d.ts +2 -1
  29. package/src/SideMenuBody/SideMenuBody.styles.js +4 -4
  30. package/src/SideMenuContext.d.ts +3 -2
  31. package/src/SideMenuDivider/SideMenuDivider.md +7 -0
  32. package/src/SideMenuDivider/SideMenuDivider.styles.js +2 -1
  33. package/src/SideMenuDropdown/SideMenuDropdown.js +9 -8
  34. package/src/SideMenuDropdown/SideMenuDropdown.styles.d.ts +2 -1
  35. package/src/SideMenuDropdown/SideMenuDropdown.styles.js +4 -3
  36. package/src/SideMenuFooter/SideMenuFooter.js +6 -3
  37. package/src/SideMenuFooter/SideMenuFooter.md +8 -0
  38. package/src/SideMenuFooter/SideMenuFooter.styles.d.ts +3 -2
  39. package/src/SideMenuFooter/SideMenuFooter.styles.js +6 -6
  40. package/src/SideMenuHeader/SideMenuHeader.js +15 -6
  41. package/src/SideMenuHeader/SideMenuHeader.md +16 -0
  42. package/src/SideMenuHeader/SideMenuHeader.styles.d.ts +5 -5
  43. package/src/SideMenuHeader/SideMenuHeader.styles.js +12 -15
  44. package/src/SideMenuItem/SideMenuItem.md +63 -0
  45. package/src/SideMenuSubItemHeader/SideMenuSubItemHeader.js +7 -1
  46. package/src/SideMenuSubItemHeader/SideMenuSubItemHeader.md +7 -0
  47. package/src/SideMenuSubItemHeader/SideMenuSubItemHeader.styles.d.ts +2 -1
  48. package/src/SideMenuSubItemHeader/SideMenuSubItemHeader.styles.js +4 -3
  49. package/src/internal/Backdrop.styles.js +1 -1
  50. package/src/internal/Burger.js +4 -1
  51. package/src/internal/Burger.styles.d.ts +2 -1
  52. package/src/internal/Burger.styles.js +4 -3
  53. package/src/internal/ClickableElement.js +8 -5
  54. package/src/internal/ClickableElement.styles.d.ts +6 -5
  55. package/src/internal/ClickableElement.styles.js +13 -11
  56. package/src/internal/InnerBody.js +5 -2
  57. package/src/internal/InnerBody.styles.d.ts +2 -1
  58. package/src/internal/InnerBody.styles.js +4 -3
  59. package/src/internal/InnerSubMenu.js +1 -1
  60. package/src/internal/ItemContent/Avatar.js +5 -2
  61. package/src/internal/ItemContent/Avatar.styles.d.ts +2 -1
  62. package/src/internal/ItemContent/Avatar.styles.js +4 -3
  63. package/src/internal/ItemContent/Caption.js +9 -6
  64. package/src/internal/ItemContent/Caption.styles.d.ts +9 -6
  65. package/src/internal/ItemContent/Caption.styles.js +17 -14
  66. package/src/internal/ItemContent/Icon.js +19 -9
  67. package/src/internal/ItemContent/Icon.styles.d.ts +7 -6
  68. package/src/internal/ItemContent/Icon.styles.js +14 -13
  69. package/src/internal/ItemContent/ItemContent.js +36 -12
  70. package/src/internal/ItemContent/ItemContent.styles.d.ts +9 -9
  71. package/src/internal/ItemContent/ItemContent.styles.js +18 -22
  72. package/src/internal/ItemContent/Marker.js +6 -3
  73. package/src/internal/ItemContent/Marker.styles.d.ts +3 -2
  74. package/src/internal/ItemContent/Marker.styles.js +6 -5
  75. package/src/internal/NestedMenu.js +6 -3
  76. package/src/internal/NestedMenu.styles.d.ts +2 -1
  77. package/src/internal/NestedMenu.styles.js +4 -3
  78. package/src/internal/RightBorder.js +10 -9
  79. package/src/internal/RightBorder.styles.d.ts +3 -4
  80. package/src/internal/RightBorder.styles.js +7 -7
  81. package/src/internal/SeparatedSubMenu.js +13 -10
  82. package/src/internal/SeparatedSubMenu.styles.d.ts +9 -6
  83. package/src/internal/SeparatedSubMenu.styles.js +18 -17
  84. package/src/internal/SideMenuLogotype.js +14 -10
  85. package/src/internal/SideMenuLogotype.styles.d.ts +6 -3
  86. package/src/internal/SideMenuLogotype.styles.js +11 -10
@@ -1,9 +1,10 @@
1
1
  import { __makeTemplateObject } from "tslib";
2
- import { css, memoizeStyle } from '@skbkontur/react-ui/lib/theming/Emotion';
2
+ import { css } from '@skbkontur/react-ui/lib/theming/Emotion';
3
+ import { memoizeStyle } from '../../lib/theming/ThemeHelpers';
3
4
  import { transitionDuration } from '../SideMenu/SideMenu';
4
5
  var styles = {
5
- label: function () {
6
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 200px;\n transition: width ", "ms ease-out;\n "], ["\n width: 200px;\n transition: width ", "ms ease-out;\n "])), transitionDuration);
6
+ label: function (t) {
7
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: calc(", " - 2 * ", ");\n transition: width ", "ms ease-out;\n "], ["\n width: calc(", " - 2 * ", ");\n transition: width ", "ms ease-out;\n "])), t.sideMenuWidth, t.sideMenuMarginX, transitionDuration);
7
8
  },
8
9
  minimizedLabel: function () {
9
10
  return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 100%;\n "], ["\n width: 100%;\n "])));
@@ -1,21 +1,24 @@
1
1
  import { __assign, __rest } from "tslib";
2
2
  import React, { forwardRef, useContext, useEffect, useState } from 'react';
3
3
  import { cx } from '@skbkontur/react-ui/lib/theming/Emotion';
4
+ import { ThemeContext } from '@skbkontur/react-ui/lib/theming/ThemeContext';
4
5
  import { jsStyles } from './SideMenuFooter.styles';
5
- import { getItemId } from '../../utils/scripts';
6
+ import { getItemId } from '../../lib/utils/scripts';
6
7
  import { SideMenuContext } from '../SideMenuContext';
8
+ import { getSideMenuTheme } from '../../lib/theming/ThemeHelpers';
7
9
  var SideMenuFooterInner = forwardRef(function (_a, ref) {
8
10
  var _b;
9
11
  var className = _a.className, children = _a.children, rest = __rest(_a, ["className", "children"]);
10
12
  var context = useContext(SideMenuContext);
13
+ var theme = getSideMenuTheme(useContext(ThemeContext));
11
14
  var _c = useState(false), isFixed = _c[0], setIsFixed = _c[1];
12
15
  useEffect(function () {
13
16
  setIsFixed(!!context.hasScrollBar && !(context.scrollState === 'bottom'));
14
17
  }, [context.hasScrollBar, context.scrollState]);
15
18
  if (context.isShown) {
16
19
  return (React.createElement("footer", __assign({ className: cx((_b = {},
17
- _b[jsStyles.root()] = true,
18
- _b[jsStyles.rootFixed()] = isFixed,
20
+ _b[jsStyles.root(theme)] = true,
21
+ _b[jsStyles.rootFixed(theme)] = isFixed,
19
22
  _b[jsStyles.rootTransitioned()] = context.isBeingTransitioned,
20
23
  _b), className), ref: ref }, rest), React.Children.map(children, function (child, index) {
21
24
  if (React.isValidElement(child)) {
@@ -0,0 +1,8 @@
1
+ #### Переменные кастомизации (см. [ThemeContext](https://tech.skbkontur.ru/react-ui/#/Customization/ThemeContext))
2
+
3
+ ```typescript
4
+ {
5
+ sideMenuFooterPaddingBottom: string;
6
+ sideMenuFooterPaddingTop: string;
7
+ sideMenuFooterDividerColor: string;
8
+ }
@@ -1,5 +1,6 @@
1
+ import { SideMenuTheme } from '../../lib/theming/ThemeTypes';
1
2
  export declare const jsStyles: {
2
- root(): string;
3
- rootFixed(): string;
3
+ root(t: SideMenuTheme): string;
4
+ rootFixed(t: SideMenuTheme): string;
4
5
  rootTransitioned(): string;
5
6
  };
@@ -1,12 +1,12 @@
1
1
  import { __makeTemplateObject } from "tslib";
2
- import { css, memoizeStyle } from '@skbkontur/react-ui/lib/theming/Emotion';
3
- import { sideMenuMarginX } from '../SideMenu/SideMenu.styles';
2
+ import { css } from '@skbkontur/react-ui/lib/theming/Emotion';
3
+ import { memoizeStyle } from '../../lib/theming/ThemeHelpers';
4
4
  var styles = {
5
- root: function () {
6
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-grow: 0;\n position: sticky;\n bottom: 0;\n padding-bottom: 24px;\n padding-top: 8px;\n margin: 0 ", ";\n "], ["\n flex-grow: 0;\n position: sticky;\n bottom: 0;\n padding-bottom: 24px;\n padding-top: 8px;\n margin: 0 ", ";\n "])), sideMenuMarginX);
5
+ root: function (t) {
6
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-grow: 0;\n position: sticky;\n bottom: 0;\n padding-bottom: ", ";\n padding-top: ", ";\n margin: 0 ", ";\n "], ["\n flex-grow: 0;\n position: sticky;\n bottom: 0;\n padding-bottom: ", ";\n padding-top: ", ";\n margin: 0 ", ";\n "])), t.sideMenuFooterPaddingBottom, t.sideMenuFooterPaddingTop, t.sideMenuMarginX);
7
7
  },
8
- rootFixed: function () {
9
- return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n box-shadow: inset 0 1px 0 #e6e6e6;\n "], ["\n box-shadow: inset 0 1px 0 #e6e6e6;\n "])));
8
+ rootFixed: function (t) {
9
+ return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n box-shadow: inset 0 1px 0 ", ";\n "], ["\n box-shadow: inset 0 1px 0 ", ";\n "])), t.sideMenuFooterDividerColor);
10
10
  },
11
11
  rootTransitioned: function () {
12
12
  return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: static;\n "], ["\n position: static;\n "])));
@@ -1,22 +1,31 @@
1
1
  import { __assign, __rest } from "tslib";
2
- import React, { forwardRef, useContext, useRef } from 'react';
2
+ import React, { forwardRef, useContext, useEffect, useRef } from 'react';
3
3
  import { cx } from '@skbkontur/react-ui/lib/theming/Emotion';
4
4
  import { mergeRefs } from '@skbkontur/react-ui/lib/utils';
5
+ import { ThemeContext } from '@skbkontur/react-ui/lib/theming/ThemeContext';
5
6
  import { jsStyles } from './SideMenuHeader.styles';
6
7
  import { SideMenuContext } from '../SideMenuContext';
7
8
  import { SideMenuLogotype } from '../internal/SideMenuLogotype';
9
+ import { getSideMenuTheme } from '../../lib/theming/ThemeHelpers';
10
+ import { getDOMRect } from '@skbkontur/react-ui/lib/dom/getDOMRect';
8
11
  var SideMenuHeaderInner = forwardRef(function (_a, ref) {
9
12
  var _b;
10
13
  var className = _a.className, productLogo = _a.productLogo, konturLogo = _a.konturLogo, iconUrl = _a.iconUrl, style = _a.style, withWidget = _a.withWidget, rest = __rest(_a, ["className", "productLogo", "konturLogo", "iconUrl", "style", "withWidget"]);
11
14
  var context = useContext(SideMenuContext);
15
+ var theme = getSideMenuTheme(useContext(ThemeContext));
12
16
  var headerWrapperRef = useRef(null);
17
+ useEffect(function () {
18
+ var _a;
19
+ if (headerWrapperRef.current) {
20
+ (_a = context.setHeaderHeight) === null || _a === void 0 ? void 0 : _a.call(context, getDOMRect(headerWrapperRef.current).height);
21
+ }
22
+ }, []);
13
23
  return (React.createElement("header", __assign({ className: cx((_b = {},
14
- _b[jsStyles.root()] = true,
15
- _b[jsStyles.rootForTabletsOrMobiles()] = context.isMobile || context.isTablet,
16
- _b[jsStyles.fixedRoot()] = context.isShown && !(context.scrollState === 'top'),
17
- _b[jsStyles.minimizedRoot()] = context.isMinimized || context.isBeingTransitioned,
24
+ _b[jsStyles.root(theme)] = true,
25
+ _b[jsStyles.rootForTabletsOrMobiles(theme)] = context.isMobile || context.isTablet,
26
+ _b[jsStyles.fixedRoot(theme)] = context.isShown && !(context.scrollState === 'top'),
18
27
  _b[jsStyles.collapsedRootForTabletsOrMobiles()] = !context.isShown || context.isBeingTransitioned,
19
- _b[jsStyles.rootWithSeparatedMenuShown()] = context.isShown && context.isMobile && context.isSeparatedMenuShown,
28
+ _b[jsStyles.rootWithSeparatedMenuShown(theme)] = context.isShown && context.isMobile && context.isSeparatedMenuShown,
20
29
  _b), className), ref: mergeRefs([headerWrapperRef, ref]), style: style }, rest),
21
30
  React.createElement(SideMenuLogotype, __assign({ productLogo: productLogo, konturLogo: konturLogo, iconUrl: iconUrl, withWidget: withWidget }, rest))));
22
31
  });
@@ -0,0 +1,16 @@
1
+ #### Переменные кастомизации (см. [ThemeContext](https://tech.skbkontur.ru/react-ui/#/Customization/ThemeContext))
2
+
3
+ ```typescript
4
+ {
5
+ sideMenuHeaderPaddingTop: string;
6
+ sideMenuHeaderPaddingBottom: string;
7
+ sideMenuHeaderDividerColor: string;
8
+ sideMenuHeaderPaddingTopForTouchScreens: string;
9
+ //#region Logotype
10
+ sideMenuLogotypePaddingLeft: string;
11
+ sideMenuLogotypePaddingTop: string;
12
+ sideMenuLogotypePaddingBottom: string;
13
+ sideMenuLogotypePaddingYForTouchScreens: string;
14
+ sideMenuLogotypeHiddenIconPaddingLeft: string;
15
+ //#endregion
16
+ }
@@ -1,8 +1,8 @@
1
+ import { SideMenuTheme } from '../../lib/theming/ThemeTypes';
1
2
  export declare const jsStyles: {
2
- root(): string;
3
- minimizedRoot(): string;
4
- rootForTabletsOrMobiles(): string;
3
+ root(t: SideMenuTheme): string;
4
+ rootForTabletsOrMobiles(t: SideMenuTheme): string;
5
5
  collapsedRootForTabletsOrMobiles(): string;
6
- rootWithSeparatedMenuShown(): string;
7
- fixedRoot(): string;
6
+ rootWithSeparatedMenuShown(t: SideMenuTheme): string;
7
+ fixedRoot(t: SideMenuTheme): string;
8
8
  };
@@ -1,25 +1,22 @@
1
1
  import { __makeTemplateObject } from "tslib";
2
- import { css, memoizeStyle } from '@skbkontur/react-ui/lib/theming/Emotion';
3
- import { sideMenuMarginX } from '../SideMenu/SideMenu.styles';
2
+ import { css } from '@skbkontur/react-ui/lib/theming/Emotion';
3
+ import { memoizeStyle } from '../../lib/theming/ThemeHelpers';
4
4
  var styles = {
5
- root: function () {
6
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: sticky;\n width: calc(100% - 2 * ", ");\n top: 0;\n z-index: 1;\n padding: 24px 0 8px;\n margin: 0 ", ";\n "], ["\n position: sticky;\n width: calc(100% - 2 * ", ");\n top: 0;\n z-index: 1;\n padding: 24px 0 8px;\n margin: 0 ", ";\n "])), sideMenuMarginX, sideMenuMarginX);
5
+ root: function (t) {
6
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: sticky;\n width: calc(100% - 2 * ", ");\n top: 0;\n z-index: 1;\n padding: ", " 0 ", ";\n margin: 0 ", ";\n "], ["\n position: sticky;\n width: calc(100% - 2 * ", ");\n top: 0;\n z-index: 1;\n padding: ", " 0 ", ";\n margin: 0 ", ";\n "])), t.sideMenuMarginX, t.sideMenuHeaderPaddingTop, t.sideMenuHeaderPaddingBottom, t.sideMenuMarginX);
7
7
  },
8
- minimizedRoot: function () {
9
- return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 54px;\n "], ["\n width: 54px;\n "])));
10
- },
11
- rootForTabletsOrMobiles: function () {
12
- return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n padding-top: 16px;\n "], ["\n padding-top: 16px;\n "])));
8
+ rootForTabletsOrMobiles: function (t) {
9
+ return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding-top: ", ";\n "], ["\n padding-top: ", ";\n "])), t.sideMenuHeaderPaddingTopForTouchScreens);
13
10
  },
14
11
  collapsedRootForTabletsOrMobiles: function () {
15
- return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n background: transparent;\n "], ["\n background: transparent;\n "])));
12
+ return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n background: transparent;\n "], ["\n background: transparent;\n "])));
16
13
  },
17
- rootWithSeparatedMenuShown: function () {
18
- return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background: #fff;\n "], ["\n background: #fff;\n "])));
14
+ rootWithSeparatedMenuShown: function (t) {
15
+ return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n background: ", ";\n "], ["\n background: ", ";\n "])), t.sideMenuSeparatedSubMenuBgColor);
19
16
  },
20
- fixedRoot: function () {
21
- return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n padding-bottom: 8px;\n box-shadow: inset 0 -1px 0 #e6e6e6;\n "], ["\n padding-bottom: 8px;\n box-shadow: inset 0 -1px 0 #e6e6e6;\n "])));
17
+ fixedRoot: function (t) {
18
+ return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n box-shadow: inset 0 -1px 0 ", ";\n "], ["\n box-shadow: inset 0 -1px 0 ", ";\n "])), t.sideMenuHeaderDividerColor);
22
19
  },
23
20
  };
24
21
  export var jsStyles = memoizeStyle(styles);
25
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
22
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
@@ -0,0 +1,63 @@
1
+ #### Переменные кастомизации (см. [ThemeContext](https://tech.skbkontur.ru/react-ui/#/Customization/ThemeContext))
2
+
3
+ ```typescript
4
+ {
5
+ sideMenuItemBorderRadius: string;
6
+ sideMenuItemHoverBg: string;
7
+ sideMenuItemActiveBg: string;
8
+ sideMenuSubItemWithSeparatedSubMenuHoverBg: string;
9
+ sideMenuSubItemWithSeparatedSubMenuActiveBg: string;
10
+ sideMenuFocusedItemBoxShadowInset: string;
11
+ sideMenuFocusedItemBoxShadowOffsetX: string;
12
+ sideMenuFocusedItemBoxShadowOffsetY: string;
13
+ sideMenuFocusedItemBoxShadowBlurRadius: string;
14
+ sideMenuFocusedItemBoxShadowSpreadRadius: string;
15
+ sideMenuFocusedItemBoxShadowColor: string;
16
+ ideMenuFocusedItemBoxShadow: string;
17
+ // #region ItemContent
18
+ sideMenuItemContentPaddingY: string;
19
+ sideMenuItemContentLargePaddingY: string;
20
+ sideMenuSubItemContentPaddingY: string;
21
+ sideMenuSubItemContentLargePaddingY: string;
22
+ sideMenuItemContentLargeMultilinePaddingY: string;
23
+ sideMenuItemContentPaddingYForTouchScreens: string;
24
+ sideMenuSubItemContentPaddingYForTouchScreens: string;
25
+ //#endregion
26
+ // #region Icon
27
+ sideMenuIconSize: string;
28
+ sideMenuIconSubItemSize: string;
29
+ sideMenuIconPaddingY: string;
30
+ sideMenuIconPaddingX: string;
31
+ sideMenuIconMinHeight: string;
32
+ sideMenuIconLineHeight: string;
33
+ sideMenuIconLargeMinHeight: string;
34
+ sideMenuIconLargeLineHeight: string;
35
+ sideMenuIconSubItemPaddingLeft: string;
36
+ sideMenuIconSubItemPaddingRight: string;
37
+ sideMenuIconSubItemMinHeight: string;
38
+ sideMenuIconSubItemLineHeight: string;
39
+ sideMenuIconSubItemColor: string;
40
+ sideMenuIconLargeSubItemMinHeight: string;
41
+ sideMenuIconWithSeparatedSubMenuSubItemPaddingLeft: string;
42
+ //#endregion
43
+ // #region Caption
44
+ sideMenuCaptionLineHeight: string;
45
+ sideMenuCaptionFontSize: string;
46
+ sideMenuCaptionFontSizeForTouchScreens: string;
47
+ sideMenuCaptionLineHeightForTouchScreens: string;
48
+ sideMenuCaptionSubItemMarginLeft: string;
49
+ sideMenuCaptionSubItemFontSizeForTouchScreens: string;
50
+ sideMenuCaptionSubItemLineHeightForTouchScreens: string;
51
+ sideMenuCaptionLargeFontSize: string;
52
+ sideMenuCaptionLargeLineHeights: string;
53
+ //#endregion
54
+ // #region Marker
55
+ sideMenuMarkerPaddingX: string;
56
+ sideMenuMarkerBg: string;
57
+ sideMenuMarkerColor: string;
58
+ sideMenuMarkerMarginRight: string;
59
+ sideMenuMarkerFontWeight: string;
60
+ sideMenuMarkerMultilineMarginTop: string;
61
+ //#endregion
62
+ }
63
+ ```
@@ -1,13 +1,19 @@
1
1
  import { __assign, __rest } from "tslib";
2
2
  import React, { forwardRef, useContext } from 'react';
3
3
  import { cx } from '@skbkontur/react-ui/lib/theming/Emotion';
4
+ import { ThemeContext } from '@skbkontur/react-ui/lib/theming/ThemeContext';
4
5
  import { jsStyles } from './SideMenuSubItemHeader.styles';
5
6
  import { SideMenuContext } from '../SideMenuContext';
7
+ import { getSideMenuTheme } from '../../lib/theming/ThemeHelpers';
6
8
  var SideMenuSubItemHeaderInner = forwardRef(function (_a, ref) {
7
9
  var _b;
8
10
  var className = _a.className, children = _a.children, rest = __rest(_a, ["className", "children"]);
9
11
  var context = useContext(SideMenuContext);
10
- return (React.createElement("p", __assign({ className: cx((_b = {}, _b[jsStyles.root()] = true, _b[jsStyles.rootInSeparatedSubMenu()] = context.isSeparatedMenu, _b), className), ref: ref }, rest), children));
12
+ var theme = getSideMenuTheme(useContext(ThemeContext));
13
+ return (React.createElement("p", __assign({ className: cx((_b = {},
14
+ _b[jsStyles.root(theme)] = true,
15
+ _b[jsStyles.rootInSeparatedSubMenu()] = context.isSeparatedMenu,
16
+ _b), className), ref: ref }, rest), children));
11
17
  });
12
18
  SideMenuSubItemHeaderInner.displayName = 'SideMenuSubItemHeader';
13
19
  /**
@@ -0,0 +1,7 @@
1
+ ```typescript
2
+ {
3
+ sideMenuSubItemHeaderFontSize: string;
4
+ sideMenuSubItemHeaderColor: string;
5
+ sideMenuSubItemHeaderPadding: string;
6
+ }
7
+ ```
@@ -1,4 +1,5 @@
1
+ import { SideMenuTheme } from '../../lib/theming/ThemeTypes';
1
2
  export declare const jsStyles: {
2
- root(): string;
3
+ root(t: SideMenuTheme): string;
3
4
  rootInSeparatedSubMenu(): string;
4
5
  };
@@ -1,8 +1,9 @@
1
1
  import { __makeTemplateObject } from "tslib";
2
- import { css, memoizeStyle } from '@skbkontur/react-ui/lib/theming/Emotion';
2
+ import { css } from '@skbkontur/react-ui/lib/theming/Emotion';
3
+ import { memoizeStyle } from '../../lib/theming/ThemeHelpers';
3
4
  var styles = {
4
- root: function () {
5
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-size: 12px;\n color: rgba(0, 0, 0, 0.48);\n padding: 10px 8px 2px 40px;\n margin: 0;\n "], ["\n font-size: 12px;\n color: rgba(0, 0, 0, 0.48);\n padding: 10px 8px 2px 40px;\n margin: 0;\n "])));
5
+ root: function (t) {
6
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-size: ", ";\n color: ", ";\n padding: ", ";\n margin: 0;\n "], ["\n font-size: ", ";\n color: ", ";\n padding: ", ";\n margin: 0;\n "])), t.sideMenuSubItemHeaderFontSize, t.sideMenuSubItemHeaderColor, t.sideMenuSubItemHeaderPadding);
6
7
  },
7
8
  rootInSeparatedSubMenu: function () {
8
9
  return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding-left: 8px;\n "], ["\n padding-left: 8px;\n "])));
@@ -3,7 +3,7 @@ import { css, memoizeStyle } from '@skbkontur/react-ui/lib/theming/Emotion';
3
3
  import { burgerTransitionDuration } from '../SideMenu/SideMenu';
4
4
  var styles = {
5
5
  rootForTabletsOrMobiles: function () {
6
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n transition: opacity ", "ms ease-in;\n "], ["\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n transition: opacity ", "ms ease-in;\n "])), burgerTransitionDuration);
6
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n transition: opacity ", "ms ease-out;\n "], ["\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n transition: opacity ", "ms ease-out;\n "])), burgerTransitionDuration);
7
7
  },
8
8
  };
9
9
  export var jsStyles = memoizeStyle(styles);
@@ -3,8 +3,11 @@ import { jsStyles } from './Burger.styles';
3
3
  import { SideMenuContext } from '../SideMenuContext';
4
4
  import { UiMenuBarsThreeHIcon24Regular } from '@skbkontur/icons';
5
5
  import { SideMenuDataTids } from '../../SideMenuDataTids';
6
+ import { getSideMenuTheme } from '../../lib/theming/ThemeHelpers';
7
+ import { ThemeContext } from '@skbkontur/react-ui';
6
8
  export var Burger = function () {
7
9
  var context = useContext(SideMenuContext);
8
- return (React.createElement("button", { className: jsStyles.rootForTabletsOrMobiles(), onClick: context.toggleIsShown, "data-tid": SideMenuDataTids.burger },
10
+ var theme = getSideMenuTheme(useContext(ThemeContext));
11
+ return (React.createElement("button", { className: jsStyles.rootForTabletsOrMobiles(theme), onClick: context.toggleIsShown, "data-tid": SideMenuDataTids.burger },
9
12
  React.createElement(UiMenuBarsThreeHIcon24Regular, null)));
10
13
  };
@@ -1,3 +1,4 @@
1
+ import { SideMenuTheme } from '../../lib/theming/ThemeTypes';
1
2
  export declare const jsStyles: {
2
- rootForTabletsOrMobiles(): string;
3
+ rootForTabletsOrMobiles(t: SideMenuTheme): string;
3
4
  };
@@ -1,9 +1,10 @@
1
1
  import { __makeTemplateObject } from "tslib";
2
- import { css, memoizeStyle } from '@skbkontur/react-ui/lib/theming/Emotion';
2
+ import { css } from '@skbkontur/react-ui/lib/theming/Emotion';
3
3
  import { resetButton } from '@skbkontur/react-ui/lib/styles/Mixins';
4
+ import { memoizeStyle } from '../../lib/theming/ThemeHelpers';
4
5
  var styles = {
5
- rootForTabletsOrMobiles: function () {
6
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", ";\n margin-right: 8px;\n cursor: pointer;\n "], ["\n ", ";\n margin-right: 8px;\n cursor: pointer;\n "])), resetButton());
6
+ rootForTabletsOrMobiles: function (t) {
7
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", ";\n margin-right: ", ";\n cursor: pointer;\n "], ["\n ", ";\n margin-right: ", ";\n cursor: pointer;\n "])), resetButton(), t.sideMenuBurgerMarginRight);
7
8
  },
8
9
  };
9
10
  export var jsStyles = memoizeStyle(styles);
@@ -8,6 +8,8 @@ import { useOpenedState } from '../../hooks/useOpenedState';
8
8
  import { useActiveState } from '../../hooks/useActiveState';
9
9
  import { jsStyles } from './ClickableElement.styles';
10
10
  import { cx } from '@skbkontur/react-ui/lib/theming/Emotion';
11
+ import { getSideMenuTheme } from '../../lib/theming/ThemeHelpers';
12
+ import { ThemeContext } from '@skbkontur/react-ui';
11
13
  /**
12
14
  * Элемент списка (пункт меню либо ссылка)
13
15
  *
@@ -17,6 +19,7 @@ var ClickableElement = forwardRef(function (_a, ref) {
17
19
  var _b;
18
20
  var onClick = _a.onClick, icon = _a.icon, _avatar = _a._avatar, marker = _a.marker, caption = _a.caption, subCaption = _a.subCaption, id = _a.id, _isSubMenu = _a._isSubMenu, children = _a.children, _isNestedSubMenu = _a._isNestedSubMenu, _generatedId = _a._generatedId, Tag = _a.element, onKeyDown = _a.onKeyDown, onFocus = _a.onFocus, onBlur = _a.onBlur, className = _a.className, _isDropdown = _a._isDropdown, _isBackButton = _a._isBackButton, rest = __rest(_a, ["onClick", "icon", "_avatar", "marker", "caption", "subCaption", "id", "_isSubMenu", "children", "_isNestedSubMenu", "_generatedId", "element", "onKeyDown", "onFocus", "onBlur", "className", "_isDropdown", "_isBackButton"]);
19
21
  var context = useContext(SideMenuContext);
22
+ var theme = getSideMenuTheme(useContext(ThemeContext));
20
23
  var isActive = useActiveState(id, rest.href, _generatedId, context.activeMenuItem);
21
24
  var _c = useState(false), isFocusedByTab = _c[0], setIsFocusedByTab = _c[1];
22
25
  var isOpened = useOpenedState(id || rest.href, _generatedId, context.openedParents, isActive, children, context.isSeparatedMenuShown, context.isMobile && context.isSeparatedMenu);
@@ -94,13 +97,13 @@ var ClickableElement = forwardRef(function (_a, ref) {
94
97
  var shouldHighlightTopLevelItemWhenMenuIsMinimized = isOpened && !_isSubMenu && context.isNarrowDesktop && context.isMinimized;
95
98
  return (React.createElement("div", null,
96
99
  React.cloneElement(React.createElement(Tag, null), __assign({ className: cx((_b = {},
97
- _b[jsStyles.root()] = true,
98
- _b[jsStyles.rootSubItem()] = context.isSeparatedMenu && _isSubMenu,
99
- _b[jsStyles.focusedRoot()] = isFocusedByTab,
100
- _b[jsStyles.activeRoot()] = isActive ||
100
+ _b[jsStyles.root(theme)] = true,
101
+ _b[jsStyles.rootSubItemInSeparatedSubMenu(theme)] = context.isSeparatedMenu && _isSubMenu,
102
+ _b[jsStyles.focusedRoot(theme)] = isFocusedByTab,
103
+ _b[jsStyles.activeRoot(theme)] = isActive ||
101
104
  shouldHighlightTopLevelItemWhenSubItemSelectedInSeparatedMenu ||
102
105
  shouldHighlightTopLevelItemWhenMenuIsMinimized,
103
- _b[jsStyles.activeRootSubItemInSeparatedSubMenu()] = isActive && context.isSeparatedMenu && _isSubMenu,
106
+ _b[jsStyles.activeRootSubItemInSeparatedSubMenu(theme)] = isActive && context.isSeparatedMenu && _isSubMenu,
104
107
  _b), className), onClick: handleClick, onFocus: handleFocus, onBlur: handleBlur, children: (React.createElement(ItemContent, { _isSubMenu: _isSubMenu, icon: icon, _isNestedSubMenu: _isNestedSubMenu, caption: caption, subCaption: subCaption, marker: marker, _avatar: _avatar, _isBackButton: _isBackButton })), ref: ref }, rest)),
105
108
  React.createElement(SubMenu, { generatedId: _generatedId, id: id, href: rest.href, caption: caption, isSubMenu: _isSubMenu, isSeparatedMenu: context.isSeparatedMenu, isOpened: isOpened, isMinimized: context.isMinimized }, children)));
106
109
  });
@@ -1,7 +1,8 @@
1
+ import { SideMenuTheme } from '../../lib/theming/ThemeTypes';
1
2
  export declare const jsStyles: {
2
- root(): string;
3
- rootSubItem(): string;
4
- focusedRoot(): string;
5
- activeRoot(): string;
6
- activeRootSubItemInSeparatedSubMenu(): string;
3
+ root(t: SideMenuTheme): string;
4
+ rootSubItemInSeparatedSubMenu(t: SideMenuTheme): string;
5
+ focusedRoot(t: SideMenuTheme): string;
6
+ activeRoot(t: SideMenuTheme): string;
7
+ activeRootSubItemInSeparatedSubMenu(t: SideMenuTheme): string;
7
8
  };
@@ -1,20 +1,22 @@
1
1
  import { __makeTemplateObject } from "tslib";
2
- import { css, memoizeStyle } from '@skbkontur/react-ui/lib/theming/Emotion';
2
+ import { css } from '@skbkontur/react-ui/lib/theming/Emotion';
3
+ import { resetButton } from '@skbkontur/react-ui/lib/styles/Mixins';
4
+ import { memoizeStyle } from '../../lib/theming/ThemeHelpers';
3
5
  var styles = {
4
- root: function () {
5
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border: none;\n margin: 0;\n padding: 0;\n overflow: visible;\n color: inherit;\n font: inherit;\n line-height: normal;\n text-align: inherit;\n outline: none;\n width: 100%;\n background: transparent;\n border-radius: 8px;\n box-sizing: border-box;\n cursor: pointer;\n &:hover {\n background: rgba(255, 255, 255, 0.48);\n }\n &:focus {\n outline: none;\n }\n "], ["\n border: none;\n margin: 0;\n padding: 0;\n overflow: visible;\n color: inherit;\n font: inherit;\n line-height: normal;\n text-align: inherit;\n outline: none;\n width: 100%;\n background: transparent;\n border-radius: 8px;\n box-sizing: border-box;\n cursor: pointer;\n &:hover {\n background: rgba(255, 255, 255, 0.48);\n }\n &:focus {\n outline: none;\n }\n "])));
6
+ root: function (t) {
7
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", ";\n width: 100%;\n border-radius: ", ";\n cursor: pointer;\n &:hover {\n background: ", ";\n }\n "], ["\n ", ";\n width: 100%;\n border-radius: ", ";\n cursor: pointer;\n &:hover {\n background: ", ";\n }\n "])), resetButton(), t.sideMenuItemBorderRadius, t.sideMenuItemHoverBg);
6
8
  },
7
- rootSubItem: function () {
8
- return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background: #fff;\n &:hover {\n background: #f6f6f6;\n }\n "], ["\n background: #fff;\n &:hover {\n background: #f6f6f6;\n }\n "])));
9
+ rootSubItemInSeparatedSubMenu: function (t) {
10
+ return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n &:hover {\n background: ", ";\n }\n "], ["\n &:hover {\n background: ", ";\n }\n "])), t.sideMenuSubItemWithSeparatedSubMenuHoverBg);
9
11
  },
10
- focusedRoot: function () {
11
- return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n box-shadow: inset 0 0 0 2px #1c7edf;\n "], ["\n box-shadow: inset 0 0 0 2px #1c7edf;\n "])));
12
+ focusedRoot: function (t) {
13
+ return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n box-shadow: ", ";\n "], ["\n box-shadow: ", ";\n "])), t.sideMenuFocusedItemBoxShadow);
12
14
  },
13
- activeRoot: function () {
14
- return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n background: #fff !important;\n "], ["\n background: #fff !important;\n "])));
15
+ activeRoot: function (t) {
16
+ return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n background: ", " !important;\n "], ["\n background: ", " !important;\n "])), t.sideMenuItemActiveBg);
15
17
  },
16
- activeRootSubItemInSeparatedSubMenu: function () {
17
- return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background: #f2f2f2 !important;\n "], ["\n background: #f2f2f2 !important;\n "])));
18
+ activeRootSubItemInSeparatedSubMenu: function (t) {
19
+ return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background: ", " !important;\n "], ["\n background: ", " !important;\n "])), t.sideMenuSubItemWithSeparatedSubMenuActiveBg);
18
20
  },
19
21
  };
20
22
  export var jsStyles = memoizeStyle(styles);
@@ -2,7 +2,9 @@ import { __assign } from "tslib";
2
2
  import React, { isValidElement, useContext, useEffect, useRef, useState } from 'react';
3
3
  import { jsStyles } from './InnerBody.styles';
4
4
  import { SideMenuContext } from '../SideMenuContext';
5
- import { getAllParents, getChildrenIdArray, getElementsChildren, getItemId, isClickableElement, } from '../../utils/scripts';
5
+ import { getAllParents, getChildrenIdArray, getElementsChildren, getItemId, isClickableElement, } from '../../lib/utils/scripts';
6
+ import { getSideMenuTheme } from '../../lib/theming/ThemeHelpers';
7
+ import { ThemeContext } from '@skbkontur/react-ui';
6
8
  /**
7
9
  * Внутренняя часть SideMenuBody
8
10
  *
@@ -13,6 +15,7 @@ var InnerBody = function (_a) {
13
15
  var context = useContext(SideMenuContext);
14
16
  var _b = useState([]), parents = _b[0], setParents = _b[1];
15
17
  var flattedArrayOfAllElements = useRef([]);
18
+ var theme = getSideMenuTheme(useContext(ThemeContext));
16
19
  var getFlattedArrayOfAllElements = function () {
17
20
  var levelIndex = 0;
18
21
  React.Children.map(children, function (child) {
@@ -52,7 +55,7 @@ var InnerBody = function (_a) {
52
55
  // @ts-expect-error: accessing private property
53
56
  if ((child === null || child === void 0 ? void 0 : child.type.__KONTUR_REACT_UI__) === 'SideMenuDivider') {
54
57
  return React.cloneElement(child, {
55
- className: jsStyles.divider(),
58
+ className: jsStyles.divider(theme),
56
59
  });
57
60
  }
58
61
  if (
@@ -1,3 +1,4 @@
1
+ import { SideMenuTheme } from '../../lib/theming/ThemeTypes';
1
2
  export declare const jsStyles: {
2
- divider(): string;
3
+ divider(t: SideMenuTheme): string;
3
4
  };
@@ -1,8 +1,9 @@
1
1
  import { __makeTemplateObject } from "tslib";
2
- import { css, memoizeStyle } from '@skbkontur/react-ui/lib/theming/Emotion';
2
+ import { css } from '@skbkontur/react-ui/lib/theming/Emotion';
3
+ import { memoizeStyle } from '../../lib/theming/ThemeHelpers';
3
4
  var styles = {
4
- divider: function () {
5
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background: #d6d6d6;\n margin-left: 8px;\n margin-right: 8px;\n "], ["\n background: #d6d6d6;\n margin-left: 8px;\n margin-right: 8px;\n "])));
5
+ divider: function (t) {
6
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background: ", ";\n margin-left: ", ";\n margin-right: ", ";\n "], ["\n background: ", ";\n margin-left: ", ";\n margin-right: ", ";\n "])), t.sideMenuDividerBgColor, t.sideMenuDividerMarginX, t.sideMenuDividerMarginX);
6
7
  },
7
8
  };
8
9
  export var jsStyles = memoizeStyle(styles);
@@ -1,5 +1,5 @@
1
1
  import React, { forwardRef } from 'react';
2
- import { isClickableSubElement } from '../../utils/scripts';
2
+ import { isClickableSubElement } from '../../lib/utils/scripts';
3
3
  import { ZIndex } from '@skbkontur/react-ui/internal/ZIndex';
4
4
  /**
5
5
  * Подменю, раскрывающееся внутри основного меню
@@ -1,12 +1,15 @@
1
- import React from 'react';
1
+ import React, { useContext } from 'react';
2
2
  import { cx } from '@skbkontur/react-ui/lib/theming/Emotion';
3
3
  import { jsStyles } from './Avatar.styles';
4
+ import { getSideMenuTheme } from '../../../lib/theming/ThemeHelpers';
5
+ import { ThemeContext } from '@skbkontur/react-ui/lib/theming/ThemeContext';
4
6
  export var Avatar = function (_a) {
5
7
  var _b;
6
8
  var _avatar = _a._avatar;
9
+ var theme = getSideMenuTheme(useContext(ThemeContext));
7
10
  return React.cloneElement(_avatar, {
8
11
  className: cx((_b = {},
9
- _b[jsStyles.avatarIcon()] = true,
12
+ _b[jsStyles.avatarIcon(theme)] = true,
10
13
  _b)),
11
14
  });
12
15
  };
@@ -1,3 +1,4 @@
1
+ import { SideMenuTheme } from '../../../lib/theming/ThemeTypes';
1
2
  export declare const jsStyles: {
2
- avatarIcon(): string;
3
+ avatarIcon(t: SideMenuTheme): string;
3
4
  };
@@ -1,8 +1,9 @@
1
1
  import { __makeTemplateObject } from "tslib";
2
- import { css, memoizeStyle } from '@skbkontur/react-ui/lib/theming/Emotion';
2
+ import { css } from '@skbkontur/react-ui/lib/theming/Emotion';
3
+ import { memoizeStyle } from '../../../lib/theming/ThemeHelpers';
3
4
  var styles = {
4
- avatarIcon: function () {
5
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin: 0 4px;\n padding: 0;\n "], ["\n margin: 0 4px;\n padding: 0;\n "])));
5
+ avatarIcon: function (t) {
6
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin: ", ";\n "], ["\n margin: ", ";\n "])), t.sideMenuAvatarMargin);
6
7
  },
7
8
  };
8
9
  export var jsStyles = memoizeStyle(styles);
@@ -1,11 +1,14 @@
1
1
  import { cx } from '@skbkontur/react-ui/lib/theming/Emotion';
2
+ import { ThemeContext } from '@skbkontur/react-ui/lib/theming/ThemeContext';
2
3
  import { jsStyles } from './Caption.styles';
3
4
  import React, { forwardRef, useContext } from 'react';
4
5
  import { SideMenuContext } from '../../SideMenuContext';
6
+ import { getSideMenuTheme } from '../../../lib/theming/ThemeHelpers';
5
7
  export var Caption = forwardRef(function (_a, ref) {
6
8
  var _b, _c;
7
9
  var _isSubMenu = _a._isSubMenu, _isNestedSubMenu = _a._isNestedSubMenu, hasShortcutImage = _a.hasShortcutImage, caption = _a.caption, subCaption = _a.subCaption, isMultiline = _a.isMultiline, _isBackButton = _a._isBackButton;
8
10
  var context = useContext(SideMenuContext);
11
+ var theme = getSideMenuTheme(useContext(ThemeContext));
9
12
  var isBeingTransitioned = context.isBeingTransitioned, isSeparatedMenu = context.isSeparatedMenu, size = context.size, isTouchScreen = context.isTouchScreen, hasSubIcons = context.hasSubIcons;
10
13
  return (React.createElement("div", { className: cx((_b = {},
11
14
  _b[jsStyles.root()] = true,
@@ -13,16 +16,16 @@ export var Caption = forwardRef(function (_a, ref) {
13
16
  _b[jsStyles.rootMultiline()] = isMultiline && !_isSubMenu,
14
17
  _b)), ref: ref },
15
18
  React.createElement("p", { className: cx((_c = {},
16
- _c[jsStyles.caption()] = true,
17
- _c[jsStyles.captionSubItem()] = _isSubMenu,
19
+ _c[jsStyles.caption(theme)] = true,
20
+ _c[jsStyles.captionSubItem(theme)] = _isSubMenu,
18
21
  _c[jsStyles.captionSubItemSeparatedMenuTopLevel()] = isSeparatedMenu && !_isNestedSubMenu && _isSubMenu,
19
22
  _c[jsStyles.captionNestedItemSeparatedMenu()] = isSeparatedMenu && _isNestedSubMenu && !hasShortcutImage,
20
23
  _c[jsStyles.captionWithoutItemIcon()] = !hasShortcutImage && !isSeparatedMenu,
21
24
  _c[jsStyles.captionSubItemWithoutColumnIcons()] = _isSubMenu && isSeparatedMenu && !hasSubIcons,
22
- _c[jsStyles.captionLarge()] = size === 'large',
23
- _c[jsStyles.captionForTouchScreens()] = isTouchScreen,
24
- _c[jsStyles.captionSubItemForTouchScreens()] = isTouchScreen && _isSubMenu,
25
- _c[jsStyles.captionInBackButton()] = _isBackButton,
25
+ _c[jsStyles.captionLarge(theme)] = size === 'large',
26
+ _c[jsStyles.captionForTouchScreens(theme)] = isTouchScreen,
27
+ _c[jsStyles.captionSubItemForTouchScreens(theme)] = isTouchScreen && _isSubMenu,
28
+ _c[jsStyles.captionInBackButton(theme)] = _isBackButton,
26
29
  _c)), ref: ref }, caption),
27
30
  subCaption));
28
31
  });