@skbkontur/side-menu 0.4.1 → 0.4.2

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 (92) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +13 -6
  3. package/hooks/UseMemoIcon.d.ts +2 -0
  4. package/hooks/UseMemoIcon.js +14 -0
  5. package/hooks/useActiveState.d.ts +1 -0
  6. package/hooks/useActiveState.js +12 -0
  7. package/hooks/useOpenedState.d.ts +2 -0
  8. package/hooks/useOpenedState.js +11 -0
  9. package/hooks/useOpenedSubElementState.d.ts +1 -0
  10. package/hooks/useOpenedSubElementState.js +12 -0
  11. package/index.d.ts +13 -11
  12. package/index.js +13 -11
  13. package/package.json +1 -1
  14. package/src/SideMenu/SideMenu.d.ts +42 -0
  15. package/src/{SideMenu.js → SideMenu/SideMenu.js} +33 -27
  16. package/src/SideMenu/SideMenu.md +0 -0
  17. package/src/SideMenu.styles.d.ts +3 -1
  18. package/src/SideMenu.styles.js +60 -54
  19. package/src/SideMenuAvatar/SideMenuAvatar.d.ts +13 -0
  20. package/src/{SideMenuAvatar.js → SideMenuAvatar/SideMenuAvatar.js} +9 -10
  21. package/src/SideMenuAvatar/SideMenuAvatar.md +0 -0
  22. package/src/SideMenuBody/SideMenuBody.d.ts +13 -0
  23. package/src/{SideMenuBody.js → SideMenuBody/SideMenuBody.js} +10 -11
  24. package/src/SideMenuBody/SideMenuBody.md +0 -0
  25. package/src/SideMenuDivider/SideMenuDivider.d.ts +10 -0
  26. package/src/{SideMenuDivider.js → SideMenuDivider/SideMenuDivider.js} +8 -9
  27. package/src/SideMenuDivider/SideMenuDivider.md +0 -0
  28. package/src/{SideMenuDropdown.d.ts → SideMenuDropdown/SideMenuDropdown.d.ts} +6 -2
  29. package/src/{SideMenuDropdown.js → SideMenuDropdown/SideMenuDropdown.js} +11 -12
  30. package/src/SideMenuDropdown/SideMenuDropdown.md +0 -0
  31. package/src/{SideMenuFooter.d.ts → SideMenuFooter/SideMenuFooter.d.ts} +6 -2
  32. package/src/{SideMenuFooter.js → SideMenuFooter/SideMenuFooter.js} +10 -11
  33. package/src/SideMenuFooter/SideMenuFooter.md +0 -0
  34. package/src/{SideMenuHeader.d.ts → SideMenuHeader/SideMenuHeader.d.ts} +6 -2
  35. package/src/{SideMenuHeader.js → SideMenuHeader/SideMenuHeader.js} +11 -12
  36. package/src/SideMenuHeader/SideMenuHeader.md +0 -0
  37. package/src/SideMenuItem/SideMenuItem.d.ts +14 -0
  38. package/src/SideMenuItem/SideMenuItem.js +15 -0
  39. package/src/SideMenuItem/SideMenuItem.md +0 -0
  40. package/src/SideMenuLink/SideMenuLink.d.ts +16 -0
  41. package/src/SideMenuLink/SideMenuLink.js +21 -0
  42. package/src/SideMenuLink/SideMenuLink.md +0 -0
  43. package/src/SideMenuOrganisations/SideMenuOrganisations.d.ts +10 -0
  44. package/src/{SideMenuOrganisations.js → SideMenuOrganisations/SideMenuOrganisations.js} +7 -8
  45. package/src/SideMenuOrganisations/SideMenuOrganisations.md +0 -0
  46. package/src/SideMenuSubItem/SideMenuSubItem.d.ts +12 -0
  47. package/src/SideMenuSubItem/SideMenuSubItem.js +27 -0
  48. package/src/SideMenuSubItem/SideMenuSubItem.md +0 -0
  49. package/src/SideMenuSubItemHeader/SideMenuSubItemHeader.d.ts +13 -0
  50. package/src/{SideMenuSubItemHeader.js → SideMenuSubItemHeader/SideMenuSubItemHeader.js} +10 -11
  51. package/src/SideMenuSubItemHeader/SideMenuSubItemHeader.md +0 -0
  52. package/src/SideMenuSubLink/SideMenuSubLink.d.ts +16 -0
  53. package/src/SideMenuSubLink/SideMenuSubLink.js +31 -0
  54. package/src/SideMenuSubLink/SideMenuSubLink.md +0 -0
  55. package/src/internal/ClickableElement.d.ts +25 -0
  56. package/src/internal/ClickableElement.js +63 -0
  57. package/src/{SideMenuBodyChildren.d.ts → internal/InnerBody.d.ts} +2 -2
  58. package/src/{SideMenuBodyChildren.js → internal/InnerBody.js} +13 -12
  59. package/src/{InnerSubMenu.d.ts → internal/InnerSubMenu.d.ts} +0 -0
  60. package/src/{InnerSubMenu.js → internal/InnerSubMenu.js} +3 -1
  61. package/src/internal/ItemContent/Avatar.d.ts +5 -0
  62. package/src/internal/ItemContent/Avatar.js +12 -0
  63. package/src/internal/ItemContent/Caption.d.ts +9 -0
  64. package/src/internal/ItemContent/Caption.js +19 -0
  65. package/src/internal/ItemContent/Icon.d.ts +8 -0
  66. package/src/internal/ItemContent/Icon.js +20 -0
  67. package/src/internal/ItemContent/ItemContent.d.ts +7 -0
  68. package/src/internal/ItemContent/ItemContent.js +39 -0
  69. package/src/internal/ItemContent/Marker.d.ts +6 -0
  70. package/src/internal/ItemContent/Marker.js +11 -0
  71. package/src/internal/NestedMenu.d.ts +9 -0
  72. package/src/internal/NestedMenu.js +27 -0
  73. package/src/{RightBorder.d.ts → internal/RightBorder.d.ts} +0 -0
  74. package/src/{RightBorder.js → internal/RightBorder.js} +2 -2
  75. package/src/{SeparatedSubMenu.d.ts → internal/SeparatedSubMenu.d.ts} +0 -0
  76. package/src/{SeparatedSubMenu.js → internal/SeparatedSubMenu.js} +6 -4
  77. package/src/{SideMenuLogotype.d.ts → internal/SideMenuLogotype.d.ts} +1 -1
  78. package/src/{SideMenuLogotype.js → internal/SideMenuLogotype.js} +2 -2
  79. package/src/internal/SubMenu.d.ts +13 -0
  80. package/src/internal/SubMenu.js +21 -0
  81. package/utils/scripts.d.ts +4 -2
  82. package/utils/scripts.js +18 -14
  83. package/src/SideMenu.d.ts +0 -38
  84. package/src/SideMenuAvatar.d.ts +0 -9
  85. package/src/SideMenuBody.d.ts +0 -9
  86. package/src/SideMenuDivider.d.ts +0 -6
  87. package/src/SideMenuItem.d.ts +0 -19
  88. package/src/SideMenuItem.js +0 -126
  89. package/src/SideMenuOrganisations.d.ts +0 -6
  90. package/src/SideMenuSubItem.d.ts +0 -8
  91. package/src/SideMenuSubItem.js +0 -58
  92. package/src/SideMenuSubItemHeader.d.ts +0 -9
@@ -3,7 +3,7 @@ import { css, memoizeStyle } from '@skbkontur/react-ui/lib/theming/Emotion';
3
3
  var subItemTextSeparatedMenuFirstLevelXMargin = '8px';
4
4
  var styles = {
5
5
  root: function () {
6
- return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 232px;\n height: 100%;\n background: #f6f6f6;\n padding: 0 16px 24px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n position: relative;\n box-sizing: border-box;\n transition: width 1s;\n "], ["\n width: 232px;\n height: 100%;\n background: #f6f6f6;\n padding: 0 16px 24px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n position: relative;\n box-sizing: border-box;\n transition: width 1s;\n "])));
6
+ return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 232px;\n height: 100%;\n background: #f6f6f6;\n position: relative;\n box-sizing: border-box;\n transition: width 1s;\n "], ["\n width: 232px;\n height: 100%;\n background: #f6f6f6;\n position: relative;\n box-sizing: border-box;\n transition: width 1s;\n "])));
7
7
  },
8
8
  rootSafari: function () {
9
9
  return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n &::-webkit-scrollbar {\n display: block;\n width: 10px;\n }\n &::-webkit-scrollbar-track {\n background: #f1f1f1;\n }\n &::-webkit-scrollbar-thumb {\n background: #888;\n }\n "], ["\n &::-webkit-scrollbar {\n display: block;\n width: 10px;\n }\n &::-webkit-scrollbar-track {\n background: #f1f1f1;\n }\n &::-webkit-scrollbar-thumb {\n background: #888;\n }\n "])));
@@ -17,162 +17,168 @@ var styles = {
17
17
  rootWithInnerSubMenu: function () {
18
18
  return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n overflow-x: hidden;\n "], ["\n overflow-x: hidden;\n "])));
19
19
  },
20
+ rootInnerContainer: function () {
21
+ return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n height: calc(100% - 24px);\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n overflow-x: hidden;\n overflow-y: auto;\n padding: 0 16px 24px;\n "], ["\n height: calc(100% - 24px);\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n overflow-x: hidden;\n overflow-y: auto;\n padding: 0 16px 24px;\n "])));
22
+ },
20
23
  rootWrapper: function () {
21
- return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n height: 100%;\n display: inline-flex;\n position: relative;\n "], ["\n height: 100%;\n display: inline-flex;\n position: relative;\n "])));
24
+ return css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n height: 100%;\n display: inline-flex;\n position: relative;\n "], ["\n height: 100%;\n display: inline-flex;\n position: relative;\n "])));
22
25
  },
23
26
  rootWrapperIE: function () {
24
27
  var ieRootWrapperCorrection = 15;
25
- return css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n position: relative;\n top: -", "px;\n height: calc(100% + ", "px);\n "], ["\n position: relative;\n top: -", "px;\n height: calc(100% + ", "px);\n "])), ieRootWrapperCorrection, ieRootWrapperCorrection);
28
+ return css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n position: relative;\n top: -", "px;\n height: calc(100% + ", "px);\n "], ["\n position: relative;\n top: -", "px;\n height: calc(100% + ", "px);\n "])), ieRootWrapperCorrection, ieRootWrapperCorrection);
26
29
  },
27
30
  resizableRightBorder: function () {
28
- return css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n cursor: col-resize;\n "], ["\n cursor: col-resize;\n "])));
31
+ return css(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n cursor: col-resize;\n "], ["\n cursor: col-resize;\n "])));
29
32
  },
30
33
  body: function () {
31
- return css(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n flex-grow: 1;\n padding-bottom: 16px;\n margin-top: 0;\n "], ["\n flex-grow: 1;\n padding-bottom: 16px;\n margin-top: 0;\n "])));
34
+ return css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n flex-grow: 1;\n padding-bottom: 16px;\n margin-top: 0;\n "], ["\n flex-grow: 1;\n padding-bottom: 16px;\n margin-top: 0;\n "])));
32
35
  },
33
36
  footer: function () {
34
- return css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n flex-grow: 0;\n "], ["\n flex-grow: 0;\n "])));
37
+ return css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n flex-grow: 0;\n "], ["\n flex-grow: 0;\n "])));
35
38
  },
36
39
  headerWrapper: function () {
37
- return css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n position: sticky;\n width: 186px;\n top: 0;\n background: #f6f6f6;\n z-index: 1;\n padding: 24px 8px 16px;\n "], ["\n position: sticky;\n width: 186px;\n top: 0;\n background: #f6f6f6;\n z-index: 1;\n padding: 24px 8px 16px;\n "])));
40
+ return css(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n position: sticky;\n width: 186px;\n top: 0;\n background: #f6f6f6;\n z-index: 1;\n padding: 24px 8px 16px;\n "], ["\n position: sticky;\n width: 186px;\n top: 0;\n background: #f6f6f6;\n z-index: 1;\n padding: 24px 8px 16px;\n "])));
38
41
  },
39
42
  headerMinimisedWrapper: function () {
40
- return css(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n width: 54px;\n padding-left: 0 !important;\n padding-right: 0;\n "], ["\n width: 54px;\n padding-left: 0 !important;\n padding-right: 0;\n "])));
43
+ return css(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n width: 54px;\n padding-left: 0 !important;\n padding-right: 0;\n "], ["\n width: 54px;\n padding-left: 0 !important;\n padding-right: 0;\n "])));
41
44
  },
42
45
  headerFixedWrapper: function () {
43
- return css(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n border-bottom: 1px solid #e6e6e6;\n "], ["\n border-bottom: 1px solid #e6e6e6;\n "])));
46
+ return css(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n border-bottom: 1px solid #e6e6e6;\n "], ["\n border-bottom: 1px solid #e6e6e6;\n "])));
44
47
  },
45
48
  item: function () {
46
- return css(templateObject_14 || (templateObject_14 = __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: #f6f6f6;\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: #f6f6f6;\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 "])));
49
+ return css(templateObject_15 || (templateObject_15 = __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: #f6f6f6;\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: #f6f6f6;\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 "])));
47
50
  },
48
51
  subItem: function () {
49
- return css(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n background: #fff;\n &:hover {\n background: #f6f6f6;\n }\n "], ["\n background: #fff;\n &:hover {\n background: #f6f6f6;\n }\n "])));
52
+ return css(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n background: #fff;\n &:hover {\n background: #f6f6f6;\n }\n "], ["\n background: #fff;\n &:hover {\n background: #f6f6f6;\n }\n "])));
50
53
  },
51
54
  focusedItem: function () {
52
- return css(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n box-shadow: inset 0 0 0 2px #1c7edf;\n "], ["\n box-shadow: inset 0 0 0 2px #1c7edf;\n "])));
55
+ return css(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n box-shadow: inset 0 0 0 2px #1c7edf;\n "], ["\n box-shadow: inset 0 0 0 2px #1c7edf;\n "])));
53
56
  },
54
57
  activeItem: function () {
55
- return css(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n background: #fff !important;\n "], ["\n background: #fff !important;\n "])));
58
+ return css(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n background: #fff !important;\n "], ["\n background: #fff !important;\n "])));
56
59
  },
57
60
  activeSubItem: function () {
58
- return css(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n background: #f2f2f2 !important;\n "], ["\n background: #f2f2f2 !important;\n "])));
61
+ return css(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n background: #f2f2f2 !important;\n "], ["\n background: #f2f2f2 !important;\n "])));
59
62
  },
60
63
  itemWrapper: function () {
61
- return css(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-top: 4px;\n padding-bottom: 4px;\n "], ["\n display: flex;\n align-items: center;\n padding-top: 4px;\n padding-bottom: 4px;\n "])));
64
+ return css(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-top: 4px;\n padding-bottom: 4px;\n "], ["\n display: flex;\n align-items: center;\n padding-top: 4px;\n padding-bottom: 4px;\n "])));
62
65
  },
63
66
  itemMultilineWrapper: function () {
64
- return css(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n padding-top: 8px;\n padding-bottom: 8px;\n "], ["\n padding-top: 8px;\n padding-bottom: 8px;\n "])));
67
+ return css(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n padding-top: 8px;\n padding-bottom: 8px;\n "], ["\n padding-top: 8px;\n padding-bottom: 8px;\n "])));
65
68
  },
66
69
  itemLargeWrapper: function () {
67
- return css(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n padding-top: 9px;\n padding-bottom: 9px;\n "], ["\n padding-top: 9px;\n padding-bottom: 9px;\n "])));
70
+ return css(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n padding-top: 9px;\n padding-bottom: 9px;\n "], ["\n padding-top: 9px;\n padding-bottom: 9px;\n "])));
68
71
  },
69
72
  subItemLargeWrapper: function () {
70
- return css(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n padding-top: 5px !important;\n padding-bottom: 5px !important;\n "], ["\n padding-top: 5px !important;\n padding-bottom: 5px !important;\n "])));
73
+ return css(templateObject_23 || (templateObject_23 = __makeTemplateObject(["\n padding-top: 5px !important;\n padding-bottom: 5px !important;\n "], ["\n padding-top: 5px !important;\n padding-bottom: 5px !important;\n "])));
71
74
  },
72
75
  itemLargeMultilineWrapper: function () {
73
- return css(templateObject_23 || (templateObject_23 = __makeTemplateObject(["\n padding-top: 8px;\n padding-bottom: 8px;\n "], ["\n padding-top: 8px;\n padding-bottom: 8px;\n "])));
76
+ return css(templateObject_24 || (templateObject_24 = __makeTemplateObject(["\n padding-top: 8px;\n padding-bottom: 8px;\n "], ["\n padding-top: 8px;\n padding-bottom: 8px;\n "])));
74
77
  },
75
78
  subItemWrapper: function () {
76
- return css(templateObject_24 || (templateObject_24 = __makeTemplateObject(["\n padding-top: 4px;\n padding-bottom: 4px;\n "], ["\n padding-top: 4px;\n padding-bottom: 4px;\n "])));
79
+ return css(templateObject_25 || (templateObject_25 = __makeTemplateObject(["\n padding-top: 4px;\n padding-bottom: 4px;\n "], ["\n padding-top: 4px;\n padding-bottom: 4px;\n "])));
77
80
  },
78
81
  itemText: function () {
79
- return css(templateObject_25 || (templateObject_25 = __makeTemplateObject(["\n line-height: 20px;\n margin: 0 8px 0 0;\n "], ["\n line-height: 20px;\n margin: 0 8px 0 0;\n "])));
82
+ return css(templateObject_26 || (templateObject_26 = __makeTemplateObject(["\n line-height: 20px;\n margin: 0 8px 0 0;\n "], ["\n line-height: 20px;\n margin: 0 8px 0 0;\n "])));
80
83
  },
81
84
  itemTextTransitioned: function () {
82
- return css(templateObject_26 || (templateObject_26 = __makeTemplateObject(["\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n "], ["\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n "])));
85
+ return css(templateObject_27 || (templateObject_27 = __makeTemplateObject(["\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n "], ["\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n "])));
83
86
  },
84
87
  itemTextMultiline: function () {
85
- return css(templateObject_27 || (templateObject_27 = __makeTemplateObject(["\n align-self: flex-start;\n "], ["\n align-self: flex-start;\n "])));
88
+ return css(templateObject_28 || (templateObject_28 = __makeTemplateObject(["\n align-self: flex-start;\n "], ["\n align-self: flex-start;\n "])));
86
89
  },
87
90
  subItemText: function () {
88
- return css(templateObject_28 || (templateObject_28 = __makeTemplateObject(["\n margin-left: 4px;\n "], ["\n margin-left: 4px;\n "])));
91
+ return css(templateObject_29 || (templateObject_29 = __makeTemplateObject(["\n margin-left: 4px;\n "], ["\n margin-left: 4px;\n "])));
89
92
  },
90
93
  subItemTextSeparatedMenuFirstLevel: function () {
91
- return css(templateObject_29 || (templateObject_29 = __makeTemplateObject(["\n margin: 0 ", ";\n "], ["\n margin: 0 ", ";\n "])), subItemTextSeparatedMenuFirstLevelXMargin);
94
+ return css(templateObject_30 || (templateObject_30 = __makeTemplateObject(["\n margin: 0 ", ";\n "], ["\n margin: 0 ", ";\n "])), subItemTextSeparatedMenuFirstLevelXMargin);
92
95
  },
93
96
  nestedSubItemTextSeparatedMenu: function () {
94
- return css(templateObject_30 || (templateObject_30 = __makeTemplateObject(["\n margin: 0 20px;\n "], ["\n margin: 0 20px;\n "])));
97
+ return css(templateObject_31 || (templateObject_31 = __makeTemplateObject(["\n margin-left: 25px;\n "], ["\n margin-left: 25px;\n "])));
95
98
  },
96
99
  itemTextWithoutItemIcon: function () {
97
- return css(templateObject_31 || (templateObject_31 = __makeTemplateObject(["\n margin-left: 40px;\n "], ["\n margin-left: 40px;\n "])));
100
+ return css(templateObject_32 || (templateObject_32 = __makeTemplateObject(["\n margin-left: 40px;\n "], ["\n margin-left: 40px;\n "])));
98
101
  },
99
102
  subItemTextWithoutColumnIcons: function () {
100
- return css(templateObject_32 || (templateObject_32 = __makeTemplateObject(["\n margin-left: 8px;\n "], ["\n margin-left: 8px;\n "])));
103
+ return css(templateObject_33 || (templateObject_33 = __makeTemplateObject(["\n margin-left: 8px;\n "], ["\n margin-left: 8px;\n "])));
101
104
  },
102
105
  itemTextLarge: function () {
103
- return css(templateObject_33 || (templateObject_33 = __makeTemplateObject(["\n font-size: 16px;\n line-height: 22px;\n "], ["\n font-size: 16px;\n line-height: 22px;\n "])));
106
+ return css(templateObject_34 || (templateObject_34 = __makeTemplateObject(["\n font-size: 16px;\n line-height: 22px;\n "], ["\n font-size: 16px;\n line-height: 22px;\n "])));
104
107
  },
105
108
  dividerInDropdown: function () {
106
- return css(templateObject_34 || (templateObject_34 = __makeTemplateObject(["\n background: #ebebeb;\n height: 1px;\n border: none;\n margin: 4px 12px 4px 32px;\n "], ["\n background: #ebebeb;\n height: 1px;\n border: none;\n margin: 4px 12px 4px 32px;\n "])));
109
+ return css(templateObject_35 || (templateObject_35 = __makeTemplateObject(["\n background: #ebebeb;\n height: 1px;\n border: none;\n margin: 4px 12px 4px 32px;\n "], ["\n background: #ebebeb;\n height: 1px;\n border: none;\n margin: 4px 12px 4px 32px;\n "])));
107
110
  },
108
111
  dividerInSideMenu: function () {
109
- return css(templateObject_35 || (templateObject_35 = __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 "])));
112
+ return css(templateObject_36 || (templateObject_36 = __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 "])));
110
113
  },
111
114
  icon: function () {
112
- return css(templateObject_36 || (templateObject_36 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n padding: 0 8px;\n min-height: 32px;\n line-height: 20px;\n flex-shrink: 0;\n "], ["\n display: flex;\n align-items: center;\n padding: 0 8px;\n min-height: 32px;\n line-height: 20px;\n flex-shrink: 0;\n "])));
115
+ return css(templateObject_37 || (templateObject_37 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n padding: 0 8px;\n min-height: 32px;\n line-height: 20px;\n flex-shrink: 0;\n "], ["\n display: flex;\n align-items: center;\n padding: 0 8px;\n min-height: 32px;\n line-height: 20px;\n flex-shrink: 0;\n "])));
113
116
  },
114
117
  iconMultiline: function () {
115
- return css(templateObject_37 || (templateObject_37 = __makeTemplateObject(["\n min-height: 0;\n align-self: flex-start;\n align-items: flex-start;\n "], ["\n min-height: 0;\n align-self: flex-start;\n align-items: flex-start;\n "])));
118
+ return css(templateObject_38 || (templateObject_38 = __makeTemplateObject(["\n min-height: 0;\n align-self: flex-start;\n align-items: flex-start;\n "], ["\n min-height: 0;\n align-self: flex-start;\n align-items: flex-start;\n "])));
116
119
  },
117
120
  iconLarge: function () {
118
- return css(templateObject_38 || (templateObject_38 = __makeTemplateObject(["\n min-height: 30px;\n line-height: 22px;\n "], ["\n min-height: 30px;\n line-height: 22px;\n "])));
121
+ return css(templateObject_39 || (templateObject_39 = __makeTemplateObject(["\n min-height: 30px;\n line-height: 22px;\n "], ["\n min-height: 30px;\n line-height: 22px;\n "])));
119
122
  },
120
123
  iconMultilineLarge: function () {
121
- return css(templateObject_39 || (templateObject_39 = __makeTemplateObject(["\n min-height: 0;\n "], ["\n min-height: 0;\n "])));
124
+ return css(templateObject_40 || (templateObject_40 = __makeTemplateObject(["\n min-height: 0;\n "], ["\n min-height: 0;\n "])));
122
125
  },
123
126
  iconSubItemLarge: function () {
124
- return css(templateObject_40 || (templateObject_40 = __makeTemplateObject(["\n min-height: 22px;\n "], ["\n min-height: 22px;\n "])));
127
+ return css(templateObject_41 || (templateObject_41 = __makeTemplateObject(["\n min-height: 22px;\n "], ["\n min-height: 22px;\n "])));
125
128
  },
126
129
  iconSubItem: function () {
127
- return css(templateObject_41 || (templateObject_41 = __makeTemplateObject(["\n padding-left: 20px;\n padding-right: 0;\n min-height: 20px;\n line-height: 16px;\n "], ["\n padding-left: 20px;\n padding-right: 0;\n min-height: 20px;\n line-height: 16px;\n "])));
130
+ return css(templateObject_42 || (templateObject_42 = __makeTemplateObject(["\n padding-left: 20px;\n padding-right: 0;\n min-height: 20px;\n line-height: 16px;\n "], ["\n padding-left: 20px;\n padding-right: 0;\n min-height: 20px;\n line-height: 16px;\n "])));
128
131
  },
129
132
  iconSubItemSeparatedMenu: function () {
130
- return css(templateObject_42 || (templateObject_42 = __makeTemplateObject(["\n padding-left: 4px;\n "], ["\n padding-left: 4px;\n "])));
133
+ return css(templateObject_43 || (templateObject_43 = __makeTemplateObject(["\n padding-left: 4px;\n "], ["\n padding-left: 4px;\n "])));
131
134
  },
132
135
  avatarIcon: function () {
133
- return css(templateObject_43 || (templateObject_43 = __makeTemplateObject(["\n margin: 0 4px;\n padding: 0;\n "], ["\n margin: 0 4px;\n padding: 0;\n "])));
136
+ return css(templateObject_44 || (templateObject_44 = __makeTemplateObject(["\n margin: 0 4px;\n padding: 0;\n "], ["\n margin: 0 4px;\n padding: 0;\n "])));
134
137
  },
135
138
  headerIcon: function () {
136
- return css(templateObject_44 || (templateObject_44 = __makeTemplateObject(["\n padding: 0 4px;\n "], ["\n padding: 0 4px;\n "])));
139
+ return css(templateObject_45 || (templateObject_45 = __makeTemplateObject(["\n padding: 0 4px;\n "], ["\n padding: 0 4px;\n "])));
137
140
  },
138
141
  marker: function () {
139
- return css(templateObject_45 || (templateObject_45 = __makeTemplateObject(["\n padding-right: 6px;\n padding-left: 6px;\n background: #2291ff;\n border-radius: 9999px;\n margin-left: auto;\n margin-right: 8px;\n color: #fff;\n line-height: 20px;\n font-weight: 700;\n "], ["\n padding-right: 6px;\n padding-left: 6px;\n background: #2291ff;\n border-radius: 9999px;\n margin-left: auto;\n margin-right: 8px;\n color: #fff;\n line-height: 20px;\n font-weight: 700;\n "])));
142
+ return css(templateObject_46 || (templateObject_46 = __makeTemplateObject(["\n padding-right: 6px;\n padding-left: 6px;\n background: #2291ff;\n border-radius: 9999px;\n margin-left: auto;\n margin-right: 8px;\n color: #fff;\n line-height: 20px;\n font-weight: 700;\n "], ["\n padding-right: 6px;\n padding-left: 6px;\n background: #2291ff;\n border-radius: 9999px;\n margin-left: auto;\n margin-right: 8px;\n color: #fff;\n line-height: 20px;\n font-weight: 700;\n "])));
140
143
  },
141
144
  textAndMarkerWrapper: function () {
142
- return css(templateObject_46 || (templateObject_46 = __makeTemplateObject(["\n display: flex;\n flex-grow: 1;\n align-items: center;\n "], ["\n display: flex;\n flex-grow: 1;\n align-items: center;\n "])));
145
+ return css(templateObject_47 || (templateObject_47 = __makeTemplateObject(["\n display: flex;\n flex-grow: 1;\n align-items: center;\n "], ["\n display: flex;\n flex-grow: 1;\n align-items: center;\n "])));
143
146
  },
144
147
  markerMultiline: function () {
145
- return css(templateObject_47 || (templateObject_47 = __makeTemplateObject(["\n align-self: flex-start;\n "], ["\n align-self: flex-start;\n "])));
148
+ return css(templateObject_48 || (templateObject_48 = __makeTemplateObject(["\n align-self: flex-start;\n "], ["\n align-self: flex-start;\n "])));
146
149
  },
147
150
  subItemHeader: function () {
148
- return css(templateObject_48 || (templateObject_48 = __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 "])));
151
+ return css(templateObject_49 || (templateObject_49 = __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 "])));
149
152
  },
150
153
  subItemHeaderInSeparatedSubMenu: function () {
151
- return css(templateObject_49 || (templateObject_49 = __makeTemplateObject(["\n padding-left: ", ";\n "], ["\n padding-left: ", ";\n "])), subItemTextSeparatedMenuFirstLevelXMargin);
154
+ return css(templateObject_50 || (templateObject_50 = __makeTemplateObject(["\n padding-left: ", ";\n "], ["\n padding-left: ", ";\n "])), subItemTextSeparatedMenuFirstLevelXMargin);
152
155
  },
153
156
  separatedMenu: function () {
154
- return css(templateObject_50 || (templateObject_50 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n z-index: 8000;\n background: #fff;\n left: 100%;\n overflow: auto;\n justify-content: flex-start;\n padding-top: 24px;\n border-right: 1px solid #e5e5e5;\n "], ["\n position: absolute;\n top: 0;\n z-index: 8000;\n background: #fff;\n left: 100%;\n overflow: auto;\n justify-content: flex-start;\n padding-top: 24px;\n border-right: 1px solid #e5e5e5;\n "])));
157
+ return css(templateObject_51 || (templateObject_51 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n z-index: 8000;\n background: #fff;\n left: 100%;\n overflow: auto;\n justify-content: flex-start;\n padding: 24px 16px;\n border-right: 1px solid #e5e5e5;\n "], ["\n position: absolute;\n top: 0;\n z-index: 8000;\n background: #fff;\n left: 100%;\n overflow: auto;\n justify-content: flex-start;\n padding: 24px 16px;\n border-right: 1px solid #e5e5e5;\n "])));
155
158
  },
156
159
  dropdownWrapper: function () {
157
- return css(templateObject_51 || (templateObject_51 = __makeTemplateObject(["\n overflow-x: hidden;\n "], ["\n overflow-x: hidden;\n "])));
160
+ return css(templateObject_52 || (templateObject_52 = __makeTemplateObject(["\n overflow-x: hidden;\n "], ["\n overflow-x: hidden;\n "])));
158
161
  },
159
162
  dropdownLabel: function () {
160
- return css(templateObject_52 || (templateObject_52 = __makeTemplateObject(["\n width: 200px;\n transition: width 1s;\n "], ["\n width: 200px;\n transition: width 1s;\n "])));
163
+ return css(templateObject_53 || (templateObject_53 = __makeTemplateObject(["\n width: 200px;\n transition: width 1s;\n "], ["\n width: 200px;\n transition: width 1s;\n "])));
161
164
  },
162
165
  dropdownLabelMinimized: function () {
163
- return css(templateObject_53 || (templateObject_53 = __makeTemplateObject(["\n width: 100%;\n "], ["\n width: 100%;\n "])));
166
+ return css(templateObject_54 || (templateObject_54 = __makeTemplateObject(["\n width: 100%;\n "], ["\n width: 100%;\n "])));
164
167
  },
165
- subItemMenu: function () {
166
- return css(templateObject_54 || (templateObject_54 = __makeTemplateObject(["\n padding-left: 16px;\n "], ["\n padding-left: 16px;\n "])));
168
+ nestedMenu: function () {
169
+ return css(templateObject_55 || (templateObject_55 = __makeTemplateObject(["\n padding-left: 16px;\n "], ["\n padding-left: 16px;\n "])));
167
170
  },
168
171
  rightBorder: function () {
169
- return css(templateObject_55 || (templateObject_55 = __makeTemplateObject(["\n position: absolute;\n width: 20px;\n height: 100%;\n right: -10px;\n background: transparent;\n "], ["\n position: absolute;\n width: 20px;\n height: 100%;\n right: -10px;\n background: transparent;\n "])));
172
+ return css(templateObject_56 || (templateObject_56 = __makeTemplateObject(["\n position: absolute;\n width: 20px;\n height: 100%;\n right: -10px;\n background: transparent;\n "], ["\n position: absolute;\n width: 20px;\n height: 100%;\n right: -10px;\n background: transparent;\n "])));
173
+ },
174
+ link: function () {
175
+ return css(templateObject_57 || (templateObject_57 = __makeTemplateObject(["\n color: inherit;\n text-decoration: none;\n display: inline-block;\n "], ["\n color: inherit;\n text-decoration: none;\n display: inline-block;\n "])));
170
176
  },
171
177
  };
172
178
  export var customStyles = {
173
179
  rightBorderHovered: function (color) {
174
- return css(templateObject_56 || (templateObject_56 = __makeTemplateObject(["\n position: absolute;\n width: 2px;\n background: ", ";\n height: 100%;\n left: 9px;\n "], ["\n position: absolute;\n width: 2px;\n background: ", ";\n height: 100%;\n left: 9px;\n "])), color);
180
+ return css(templateObject_58 || (templateObject_58 = __makeTemplateObject(["\n position: absolute;\n width: 2px;\n background: ", ";\n height: 100%;\n left: 9px;\n "], ["\n position: absolute;\n width: 2px;\n background: ", ";\n height: 100%;\n left: 9px;\n "])), color);
175
181
  },
176
182
  };
177
183
  export var jsStyles = memoizeStyle(styles);
178
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22, templateObject_23, templateObject_24, templateObject_25, templateObject_26, templateObject_27, templateObject_28, templateObject_29, templateObject_30, templateObject_31, templateObject_32, templateObject_33, templateObject_34, templateObject_35, templateObject_36, templateObject_37, templateObject_38, templateObject_39, templateObject_40, templateObject_41, templateObject_42, templateObject_43, templateObject_44, templateObject_45, templateObject_46, templateObject_47, templateObject_48, templateObject_49, templateObject_50, templateObject_51, templateObject_52, templateObject_53, templateObject_54, templateObject_55, templateObject_56;
184
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22, templateObject_23, templateObject_24, templateObject_25, templateObject_26, templateObject_27, templateObject_28, templateObject_29, templateObject_30, templateObject_31, templateObject_32, templateObject_33, templateObject_34, templateObject_35, templateObject_36, templateObject_37, templateObject_38, templateObject_39, templateObject_40, templateObject_41, templateObject_42, templateObject_43, templateObject_44, templateObject_45, templateObject_46, templateObject_47, templateObject_48, templateObject_49, templateObject_50, templateObject_51, templateObject_52, templateObject_53, templateObject_54, templateObject_55, templateObject_56, templateObject_57, templateObject_58;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { UserAvatarProps } from '@skbkontur/react-ui-addons/components/UserAvatar';
3
+ import { SideMenuDropdownProps } from '../SideMenuDropdown/SideMenuDropdown';
4
+ export interface SideMenuAvatarProps extends UserAvatarProps, Omit<SideMenuDropdownProps, 'icon' | '_avatar' | 'caption'>, Partial<Pick<SideMenuDropdownProps, 'icon' | 'onOpen' | 'onClose'>> {
5
+ }
6
+ /**
7
+ * Аватар пользователя
8
+ *
9
+ * @visibleName SideMenu.Avatar
10
+ */
11
+ export declare const SideMenuAvatar: React.ForwardRefExoticComponent<SideMenuAvatarProps & React.RefAttributes<HTMLDivElement>> & {
12
+ __KONTUR_REACT_UI__: string;
13
+ };
@@ -1,18 +1,17 @@
1
1
  import { __assign, __rest } from "tslib";
2
2
  import React, { forwardRef } from 'react';
3
3
  import { UserAvatar } from '@skbkontur/react-ui-addons/components/UserAvatar';
4
- import { SideMenuDropdown } from './SideMenuDropdown';
5
- /**
6
- * Аватар пользователя
7
- *
8
- * @visibleName SideMenu.Avatar
9
- */
10
- var SideMenuAvatar = forwardRef(function (_a, ref) {
4
+ import { SideMenuDropdown } from '../SideMenuDropdown/SideMenuDropdown';
5
+ var SideMenuAvatarInner = forwardRef(function (_a, ref) {
11
6
  var userName = _a.userName, avatarUrl = _a.avatarUrl, children = _a.children, icon = _a.icon, rest = __rest(_a, ["userName", "avatarUrl", "children", "icon"]);
12
7
  return (
13
8
  // @ts-expect-error: icon is not provided as _avatar replaces it
14
9
  React.createElement(SideMenuDropdown, __assign({ _avatar: React.createElement(UserAvatar, { userName: userName, avatarUrl: avatarUrl }), caption: userName, menuWidth: 200, positions: ['top left'], ref: ref }, rest), children));
15
10
  });
16
- SideMenuAvatar.displayName = 'SideMenuAvatar';
17
- var SideMenuAvatarWithStaticFields = Object.assign(SideMenuAvatar, { __KONTUR_REACT_UI__: 'SideMenuAvatar' });
18
- export { SideMenuAvatarWithStaticFields as SideMenuAvatar };
11
+ SideMenuAvatarInner.displayName = 'SideMenuAvatar';
12
+ /**
13
+ * Аватар пользователя
14
+ *
15
+ * @visibleName SideMenu.Avatar
16
+ */
17
+ export var SideMenuAvatar = Object.assign(SideMenuAvatarInner, { __KONTUR_REACT_UI__: 'SideMenuAvatar' });
File without changes
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { CommonProps } from '@skbkontur/react-ui/internal/CommonWrapper';
3
+ export interface SideMenuBodyProps extends CommonProps {
4
+ children?: React.ReactNode;
5
+ }
6
+ /**
7
+ * Основной контейнер для меню
8
+ *
9
+ * @visibleName SideMenu.Body
10
+ */
11
+ export declare const SideMenuBody: React.ForwardRefExoticComponent<SideMenuBodyProps & React.RefAttributes<HTMLDivElement>> & {
12
+ __KONTUR_REACT_UI__: string;
13
+ };
@@ -1,19 +1,18 @@
1
1
  import { __assign, __rest } from "tslib";
2
2
  import React, { forwardRef } from 'react';
3
3
  import { cx } from '@skbkontur/react-ui/lib/theming/Emotion';
4
- import { jsStyles } from './SideMenu.styles';
5
- import { SideMenuBodyChildren } from './SideMenuBodyChildren';
4
+ import { jsStyles } from '../SideMenu.styles';
5
+ import { InnerBody } from '../internal/InnerBody';
6
+ var SideMenuBodyInner = forwardRef(function (_a, ref) {
7
+ var _b;
8
+ var className = _a.className, children = _a.children, rest = __rest(_a, ["className", "children"]);
9
+ return (React.createElement("div", __assign({ className: cx((_b = {}, _b[jsStyles.body()] = true, _b), className), ref: ref }, rest),
10
+ React.createElement(InnerBody, null, children)));
11
+ });
12
+ SideMenuBodyInner.displayName = 'SideMenuBody';
6
13
  /**
7
14
  * Основной контейнер для меню
8
15
  *
9
16
  * @visibleName SideMenu.Body
10
17
  */
11
- var SideMenuBody = forwardRef(function (_a, ref) {
12
- var _b;
13
- var className = _a.className, children = _a.children, rest = __rest(_a, ["className", "children"]);
14
- return (React.createElement("div", __assign({ className: cx((_b = {}, _b[jsStyles.body()] = true, _b), className), ref: ref }, rest),
15
- React.createElement(SideMenuBodyChildren, null, children)));
16
- });
17
- SideMenuBody.displayName = 'SideMenuBody';
18
- var SideMenuBodyWithStaticFields = Object.assign(SideMenuBody, { __KONTUR_REACT_UI__: 'SideMenuBody' });
19
- export { SideMenuBodyWithStaticFields as SideMenuBody };
18
+ export var SideMenuBody = Object.assign(SideMenuBodyInner, { __KONTUR_REACT_UI__: 'SideMenuBody' });
File without changes
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { CommonProps } from '@skbkontur/react-ui/internal/CommonWrapper';
3
+ /**
4
+ * Разделитель в главном меню
5
+ *
6
+ * @visibleName SideMenu.Divider
7
+ */
8
+ export declare const SideMenuDivider: React.ForwardRefExoticComponent<CommonProps & React.RefAttributes<HTMLHRElement>> & {
9
+ __KONTUR_REACT_UI__: string;
10
+ };
@@ -1,17 +1,16 @@
1
1
  import { __assign, __rest } from "tslib";
2
2
  import React, { forwardRef } from 'react';
3
3
  import { cx } from '@skbkontur/react-ui/lib/theming/Emotion';
4
- import { jsStyles } from './SideMenu.styles';
4
+ import { jsStyles } from '../SideMenu.styles';
5
+ var SideMenuDividerInner = forwardRef(function (_a, ref) {
6
+ var _b;
7
+ var className = _a.className, rest = __rest(_a, ["className"]);
8
+ return React.createElement("hr", __assign({ className: cx((_b = {}, _b[jsStyles.dividerInDropdown()] = true, _b), className), ref: ref }, rest));
9
+ });
10
+ SideMenuDividerInner.displayName = 'SideMenuDivider';
5
11
  /**
6
12
  * Разделитель в главном меню
7
13
  *
8
14
  * @visibleName SideMenu.Divider
9
15
  */
10
- var SideMenuDivider = forwardRef(function (_a, ref) {
11
- var _b;
12
- var className = _a.className, rest = __rest(_a, ["className"]);
13
- return React.createElement("hr", __assign({ className: cx((_b = {}, _b[jsStyles.dividerInDropdown()] = true, _b), className), ref: ref }, rest));
14
- });
15
- SideMenuDivider.displayName = 'SideMenuDivider';
16
- var SideMenuDividerWithStaticFields = Object.assign(SideMenuDivider, { __KONTUR_REACT_UI__: 'SideMenuDivider' });
17
- export { SideMenuDividerWithStaticFields as SideMenuDivider };
16
+ export var SideMenuDivider = Object.assign(SideMenuDividerInner, { __KONTUR_REACT_UI__: 'SideMenuDivider' });
File without changes
@@ -9,7 +9,11 @@ export interface SideMenuDropdownProps extends CommonProps, Omit<DropdownMenuPro
9
9
  _avatar?: React.ReactElement;
10
10
  id?: string;
11
11
  }
12
- declare const SideMenuDropdownWithStaticFields: React.ForwardRefExoticComponent<SideMenuDropdownProps & React.RefAttributes<HTMLDivElement>> & {
12
+ /**
13
+ * Элемент списка с выпадающим меню
14
+ *
15
+ * @visibleName SideMenu.Dropdown
16
+ */
17
+ export declare const SideMenuDropdown: React.ForwardRefExoticComponent<SideMenuDropdownProps & React.RefAttributes<HTMLDivElement>> & {
13
18
  __KONTUR_REACT_UI__: string;
14
19
  };
15
- export { SideMenuDropdownWithStaticFields as SideMenuDropdown };
@@ -3,15 +3,10 @@ import React, { forwardRef, useContext } from 'react';
3
3
  import { ThemeContext } from '@skbkontur/react-ui/lib/theming/ThemeContext';
4
4
  import { DEFAULT_THEME, DropdownMenu, ThemeFactory } from '@skbkontur/react-ui';
5
5
  import { cx } from '@skbkontur/react-ui/lib/theming/Emotion';
6
- import { jsStyles } from './SideMenu.styles';
7
- import { SideMenuItem } from './SideMenuItem';
8
- import { SideMenuContext } from './SideMenuContext';
9
- /**
10
- * Элемент списка с выпадающим меню
11
- *
12
- * @visibleName SideMenu.Dropdown
13
- */
14
- var SideMenuDropdown = forwardRef(function (_a, ref) {
6
+ import { jsStyles } from '../SideMenu.styles';
7
+ import { SideMenuItem } from '../SideMenuItem/SideMenuItem';
8
+ import { SideMenuContext } from '../SideMenuContext';
9
+ var SideMenuDropdownInner = forwardRef(function (_a, ref) {
15
10
  var _b, _c;
16
11
  var icon = _a.icon, id = _a.id, _avatar = _a._avatar, children = _a.children, _d = _a.caption, caption = _d === void 0 ? 'СКБ Контур' : _d, className = _a.className, _e = _a.disableAnimations, disableAnimations = _e === void 0 ? false : _e, menuWidth = _a.menuWidth, rest = __rest(_a, ["icon", "id", "_avatar", "children", "caption", "className", "disableAnimations", "menuWidth"]);
17
12
  var context = useContext(SideMenuContext);
@@ -29,6 +24,10 @@ var SideMenuDropdown = forwardRef(function (_a, ref) {
29
24
  React.createElement("div", __assign({ className: cx((_c = {}, _c[jsStyles.dropdownWrapper()] = true, _c), className), ref: ref }, rest),
30
25
  React.createElement(DropdownMenu, __assign({ caption: label, positions: ['top left'], disableAnimations: true, menuWidth: menuWidth }, rest), children))));
31
26
  });
32
- SideMenuDropdown.displayName = 'SideMenuDropdown';
33
- var SideMenuDropdownWithStaticFields = Object.assign(SideMenuDropdown, { __KONTUR_REACT_UI__: 'SideMenuDropdown' });
34
- export { SideMenuDropdownWithStaticFields as SideMenuDropdown };
27
+ SideMenuDropdownInner.displayName = 'SideMenuDropdown';
28
+ /**
29
+ * Элемент списка с выпадающим меню
30
+ *
31
+ * @visibleName SideMenu.Dropdown
32
+ */
33
+ export var SideMenuDropdown = Object.assign(SideMenuDropdownInner, { __KONTUR_REACT_UI__: 'SideMenuDropdown' });
File without changes
@@ -3,7 +3,11 @@ import { CommonProps } from '@skbkontur/react-ui/internal/CommonWrapper';
3
3
  export interface SideMenuFooterProps extends CommonProps {
4
4
  children?: React.ReactNode;
5
5
  }
6
- declare const SideMenuFooterWithStaticFields: React.FC<SideMenuFooterProps> & {
6
+ /**
7
+ * Нижняя часть меню
8
+ *
9
+ * @visibleName SideMenu.Footer
10
+ */
11
+ export declare const SideMenuFooter: React.FC<SideMenuFooterProps> & {
7
12
  __KONTUR_REACT_UI__: string;
8
13
  };
9
- export { SideMenuFooterWithStaticFields as SideMenuFooter };
@@ -1,14 +1,9 @@
1
1
  import { __assign, __rest } from "tslib";
2
2
  import React, { forwardRef } from 'react';
3
3
  import { cx } from '@skbkontur/react-ui/lib/theming/Emotion';
4
- import { jsStyles } from './SideMenu.styles';
5
- import { getItemId } from '../utils/scripts';
6
- /**
7
- * Нижняя часть меню
8
- *
9
- * @visibleName SideMenu.Footer
10
- */
11
- var SideMenuFooter = forwardRef(function (_a, ref) {
4
+ import { jsStyles } from '../SideMenu.styles';
5
+ import { getItemId } from '../../utils/scripts';
6
+ var SideMenuFooterInner = forwardRef(function (_a, ref) {
12
7
  var _b;
13
8
  var className = _a.className, children = _a.children, rest = __rest(_a, ["className", "children"]);
14
9
  return (React.createElement("footer", __assign({ className: cx((_b = {}, _b[jsStyles.footer()] = true, _b), className), ref: ref }, rest), React.Children.map(children, function (child, index) {
@@ -20,6 +15,10 @@ var SideMenuFooter = forwardRef(function (_a, ref) {
20
15
  return child;
21
16
  })));
22
17
  });
23
- SideMenuFooter.displayName = 'SideMenuFooter';
24
- var SideMenuFooterWithStaticFields = Object.assign(SideMenuFooter, { __KONTUR_REACT_UI__: 'SideMenuFooter' });
25
- export { SideMenuFooterWithStaticFields as SideMenuFooter };
18
+ SideMenuFooterInner.displayName = 'SideMenuFooter';
19
+ /**
20
+ * Нижняя часть меню
21
+ *
22
+ * @visibleName SideMenu.Footer
23
+ */
24
+ export var SideMenuFooter = Object.assign(SideMenuFooterInner, { __KONTUR_REACT_UI__: 'SideMenuFooter' });
File without changes
@@ -3,7 +3,11 @@ import { LogotypeProps } from '@skbkontur/react-ui-addons/components/Logotype';
3
3
  export interface SideMenuHeaderProps extends Partial<LogotypeProps> {
4
4
  iconUrl?: string;
5
5
  }
6
- declare const SideMenuHeaderWithStaticFields: React.ForwardRefExoticComponent<SideMenuHeaderProps & React.RefAttributes<HTMLDivElement>> & {
6
+ /**
7
+ * Контейнер для логотипа
8
+ *
9
+ * @visibleName SideMenu.Header
10
+ */
11
+ export declare const SideMenuHeader: React.ForwardRefExoticComponent<SideMenuHeaderProps & React.RefAttributes<HTMLDivElement>> & {
7
12
  __KONTUR_REACT_UI__: string;
8
13
  };
9
- export { SideMenuHeaderWithStaticFields as SideMenuHeader };
@@ -2,15 +2,10 @@ import { __assign, __rest } from "tslib";
2
2
  import React, { forwardRef, useContext, useEffect, useRef, useState } 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 { jsStyles } from './SideMenu.styles';
6
- import { SideMenuContext } from './SideMenuContext';
7
- import { SideMenuLogotype } from './SideMenuLogotype';
8
- /**
9
- * Контейнер для логотипа
10
- *
11
- * @visibleName SideMenu.Header
12
- */
13
- var SideMenuHeader = forwardRef(function (_a, ref) {
5
+ import { jsStyles } from '../SideMenu.styles';
6
+ import { SideMenuContext } from '../SideMenuContext';
7
+ import { SideMenuLogotype } from '../internal/SideMenuLogotype';
8
+ var SideMenuHeaderInner = forwardRef(function (_a, ref) {
14
9
  var _b;
15
10
  var className = _a.className, productLogo = _a.productLogo, konturLogo = _a.konturLogo, iconUrl = _a.iconUrl, withWidget = _a.withWidget, rest = __rest(_a, ["className", "productLogo", "konturLogo", "iconUrl", "withWidget"]);
16
11
  var context = useContext(SideMenuContext);
@@ -37,6 +32,10 @@ var SideMenuHeader = forwardRef(function (_a, ref) {
37
32
  _b), className), ref: mergeRefs([headerWrapperRef, ref]) }, rest),
38
33
  React.createElement(SideMenuLogotype, __assign({ productLogo: productLogo, konturLogo: konturLogo, iconUrl: iconUrl, withWidget: withWidget }, rest))));
39
34
  });
40
- SideMenuHeader.displayName = 'SideMenuHeader';
41
- var SideMenuHeaderWithStaticFields = Object.assign(SideMenuHeader, { __KONTUR_REACT_UI__: 'SideMenuHeader' });
42
- export { SideMenuHeaderWithStaticFields as SideMenuHeader };
35
+ SideMenuHeaderInner.displayName = 'SideMenuHeader';
36
+ /**
37
+ * Контейнер для логотипа
38
+ *
39
+ * @visibleName SideMenu.Header
40
+ */
41
+ export var SideMenuHeader = Object.assign(SideMenuHeaderInner, { __KONTUR_REACT_UI__: 'SideMenuHeader' });
File without changes
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { CommonClickableElementProps } from '../internal/ClickableElement';
3
+ export interface SideMenuItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, CommonClickableElementProps {
4
+ }
5
+ /**
6
+ * Элемент списка
7
+ *
8
+ * Может принимать все атрибуты обычной HTML-кнопки
9
+ *
10
+ * @visibleName SideMenu.Item
11
+ */
12
+ export declare const SideMenuItem: React.ForwardRefExoticComponent<SideMenuItemProps & React.RefAttributes<HTMLButtonElement>> & {
13
+ __KONTUR_REACT_UI__: string;
14
+ };
@@ -0,0 +1,15 @@
1
+ import { __assign } from "tslib";
2
+ import React, { forwardRef } from 'react';
3
+ import { ClickableElement } from '../internal/ClickableElement';
4
+ var SideMenuItemInner = forwardRef(function (props, ref) {
5
+ return React.createElement(ClickableElement, __assign({}, props, { ref: ref, element: 'button' }));
6
+ });
7
+ SideMenuItemInner.displayName = 'SideMenuItem';
8
+ /**
9
+ * Элемент списка
10
+ *
11
+ * Может принимать все атрибуты обычной HTML-кнопки
12
+ *
13
+ * @visibleName SideMenu.Item
14
+ */
15
+ export var SideMenuItem = Object.assign(SideMenuItemInner, { __KONTUR_REACT_UI__: 'SideMenuItem' });
File without changes
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { CommonClickableElementProps } from '../internal/ClickableElement';
3
+ export interface SideMenuLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement>, CommonClickableElementProps {
4
+ }
5
+ /**
6
+ * Ссылка для `SideMenu`
7
+ *
8
+ * Визуально повторяет `SideMenu.Item`
9
+ *
10
+ * Может принимать все атрибуты обычной HTML-ссылки
11
+ *
12
+ * @visibleName SideMenu.Link
13
+ */
14
+ export declare const SideMenuLink: React.ForwardRefExoticComponent<SideMenuLinkProps & React.RefAttributes<HTMLAnchorElement>> & {
15
+ __KONTUR_REACT_UI__: string;
16
+ };