@skbkontur/side-menu 1.8.2 → 1.8.3
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.
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.8.3](https://git.skbkontur.ru/ui/ui-parking/compare/@skbkontur/side-menu@1.8.2...@skbkontur/side-menu@1.8.3) (2023-10-30)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @skbkontur/side-menu
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [1.8.2](https://git.skbkontur.ru/ui/ui-parking/compare/@skbkontur/side-menu@1.8.1...@skbkontur/side-menu@1.8.2) (2023-10-25)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @skbkontur/side-menu
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skbkontur/side-menu",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@skbkontur/react-ui": "4.13.0"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@skbkontur/icons": "^1.
|
|
25
|
+
"@skbkontur/icons": "^1.6.0",
|
|
26
26
|
"@skbkontur/react-ui-addons": "^4.9.2",
|
|
27
27
|
"tslib": "^1"
|
|
28
28
|
}
|
package/src/SideMenu/SideMenu.js
CHANGED
|
@@ -182,10 +182,12 @@ var SideMenuInner = forwardRef(function (_a, ref) {
|
|
|
182
182
|
setHeaderHeight: setHeaderHeight,
|
|
183
183
|
hideScrollBar: hideScrollBar,
|
|
184
184
|
} },
|
|
185
|
+
(isOpened || isBeingTransitioned) && isTabletOrMobile && React.createElement("div", { style: { height: headerHeight } }),
|
|
185
186
|
React.createElement(ZIndex, { priority: isSideMenuOverflowing ? 8 : 0, className: cx((_b = {},
|
|
186
187
|
_b[jsStylesForSideMenu.root()] = true,
|
|
187
188
|
_b[customStyles.rootForTabletsOrMobiles(headerHeight)] = isTabletOrMobile,
|
|
188
189
|
_b[jsStylesForSideMenu.shownRootForTabletsOrMobiles()] = isOpened && isTabletOrMobile,
|
|
190
|
+
_b[jsStylesForSideMenu.transitionedRootForTabletsOrMobiles()] = isBeingTransitioned && isTabletOrMobile,
|
|
189
191
|
_b[jsStylesForSideMenu.rootForNarrowDesktops(theme)] = isNarrowDesktop,
|
|
190
192
|
_b[jsStylesForSideMenu.separatedRootForNarrowDesktops(theme)] = isSeparatedMenuShown && isNarrowDesktop,
|
|
191
193
|
_b[jsStylesForSideMenu.separatedRootForDesktops(theme)] = isSeparatedMenuShown && isDesktopQuery,
|
|
@@ -5,6 +5,7 @@ export declare const customStyles: {
|
|
|
5
5
|
export declare const jsStylesForSideMenu: {
|
|
6
6
|
root(): string;
|
|
7
7
|
shownRootForTabletsOrMobiles(): string;
|
|
8
|
+
transitionedRootForTabletsOrMobiles(): string;
|
|
8
9
|
rootForNarrowDesktops(t: SideMenuTheme): string;
|
|
9
10
|
separatedRootForNarrowDesktops(t: SideMenuTheme): string;
|
|
10
11
|
separatedRootForDesktops(t: SideMenuTheme): string;
|
|
@@ -7,62 +7,65 @@ var styles = {
|
|
|
7
7
|
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n height: 100%;\n flex-shrink: 0;\n "], ["\n position: relative;\n height: 100%;\n flex-shrink: 0;\n "])));
|
|
8
8
|
},
|
|
9
9
|
shownRootForTabletsOrMobiles: function () {
|
|
10
|
-
return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n @supports (height: 100dvh) {\n height: 100dvh;\n }\n
|
|
10
|
+
return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n @supports (height: 100dvh) {\n height: 100dvh;\n }\n position: absolute;\n height: 100%;\n "], ["\n @supports (height: 100dvh) {\n height: 100dvh;\n }\n position: absolute;\n height: 100%;\n "])));
|
|
11
|
+
},
|
|
12
|
+
transitionedRootForTabletsOrMobiles: function () {
|
|
13
|
+
return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n "], ["\n position: absolute;\n "])));
|
|
11
14
|
},
|
|
12
15
|
rootForNarrowDesktops: function (t) {
|
|
13
|
-
return css(
|
|
16
|
+
return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n width: ", ";\n "], ["\n width: ", ";\n "])), t.sideMenuMinimizedWidth);
|
|
14
17
|
},
|
|
15
18
|
separatedRootForNarrowDesktops: function (t) {
|
|
16
|
-
return css(
|
|
19
|
+
return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n width: calc(", " + ", ");\n background: ", ";\n "], ["\n width: calc(", " + ", ");\n background: ", ";\n "])), t.sideMenuMinimizedWidth, t.sideMenuWidth, t.sideMenuSeparatedSubMenuBgColor);
|
|
17
20
|
},
|
|
18
21
|
separatedRootForDesktops: function (t) {
|
|
19
|
-
return css(
|
|
22
|
+
return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n width: calc(", " + ", ");\n background: ", ";\n "], ["\n width: calc(", " + ", ");\n background: ", ";\n "])), t.sideMenuWidth, t.sideMenuWidth, t.sideMenuSeparatedSubMenuBgColor);
|
|
20
23
|
},
|
|
21
24
|
container: function (t) {
|
|
22
|
-
return css(
|
|
25
|
+
return css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n width: ", ";\n height: 100%;\n background: ", ";\n position: relative;\n box-sizing: border-box;\n transition: width ", "ms ease-out;\n "], ["\n width: ", ";\n height: 100%;\n background: ", ";\n position: relative;\n box-sizing: border-box;\n transition: width ", "ms ease-out;\n "])), t.sideMenuWidth, t.sideMenuBgColor, transitionDuration);
|
|
23
26
|
},
|
|
24
27
|
minimizedContainer: function (t) {
|
|
25
|
-
return css(
|
|
28
|
+
return css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n width: ", " !important;\n "], ["\n width: ", " !important;\n "])), t.sideMenuMinimizedWidth);
|
|
26
29
|
},
|
|
27
30
|
innerContainer: function () {
|
|
28
|
-
return css(
|
|
31
|
+
return css(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n overflow-x: hidden;\n "], ["\n overflow-x: hidden;\n "])));
|
|
29
32
|
},
|
|
30
33
|
containerForTouchScreens: function (t) {
|
|
31
|
-
return css(
|
|
34
|
+
return css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n width: ", ";\n "], ["\n width: ", ";\n "])), t.sideMenuWidthForTouchScreens);
|
|
32
35
|
},
|
|
33
36
|
separatedContainerForMobiles: function (t) {
|
|
34
|
-
return css(
|
|
37
|
+
return css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n background: ", ";\n "], ["\n background: ", ";\n "])), t.sideMenuSeparatedSubMenuBgColor);
|
|
35
38
|
},
|
|
36
39
|
contentWrapper: function (t) {
|
|
37
|
-
return css(
|
|
40
|
+
return css(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n overflow: hidden;\n width: ", ";\n "], ["\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n overflow: hidden;\n width: ", ";\n "])), t.sideMenuWidth);
|
|
38
41
|
},
|
|
39
42
|
contentWrapperForTouchScreens: function (t) {
|
|
40
|
-
return css(
|
|
43
|
+
return css(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n width: ", ";\n "], ["\n width: ", ";\n "])), t.sideMenuWidthForTouchScreens);
|
|
41
44
|
},
|
|
42
45
|
minimizedContentWrapper: function () {
|
|
43
|
-
return css(
|
|
46
|
+
return css(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n width: 100%;\n "], ["\n width: 100%;\n "])));
|
|
44
47
|
},
|
|
45
48
|
wrapper: function () {
|
|
46
|
-
return css(
|
|
49
|
+
return css(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n height: 100%;\n display: inline-flex;\n position: relative;\n "], ["\n height: 100%;\n display: inline-flex;\n position: relative;\n "])));
|
|
47
50
|
},
|
|
48
51
|
wrapperIE: function () {
|
|
49
52
|
var ieRootWrapperCorrection = 15;
|
|
50
|
-
return css(
|
|
53
|
+
return css(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n position: relative;\n top: -", ";\n height: calc(100% + ", ");\n "], ["\n position: relative;\n top: -", ";\n height: calc(100% + ", ");\n "])), ieRootWrapperCorrection, ieRootWrapperCorrection);
|
|
51
54
|
},
|
|
52
55
|
wrapperWithShadow: function (t) {
|
|
53
|
-
return css(
|
|
56
|
+
return css(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n box-shadow: ", ";\n "], ["\n box-shadow: ", ";\n "])), t.sideMenuBoxShadow);
|
|
54
57
|
},
|
|
55
58
|
collapsedContainerForTabletsOrMobiles: function () {
|
|
56
|
-
return css(
|
|
59
|
+
return css(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n background-color: transparent;\n "], ["\n background-color: transparent;\n "])));
|
|
57
60
|
},
|
|
58
61
|
list: function () {
|
|
59
|
-
return css(
|
|
62
|
+
return css(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n list-style: none;\n padding: 0;\n margin: 0;\n "], ["\n list-style: none;\n padding: 0;\n margin: 0;\n "])));
|
|
60
63
|
},
|
|
61
64
|
};
|
|
62
65
|
export var customStyles = {
|
|
63
66
|
rootForTabletsOrMobiles: function (headerHeight) {
|
|
64
|
-
return css(
|
|
67
|
+
return css(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n height: ", "px;\n top: 0;\n transition: height ", "ms ease-out;\n "], ["\n height: ", "px;\n top: 0;\n transition: height ", "ms ease-out;\n "])), headerHeight, burgerTransitionDuration);
|
|
65
68
|
},
|
|
66
69
|
};
|
|
67
70
|
export var jsStylesForSideMenu = memoizeStyle(styles);
|
|
68
|
-
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;
|
|
71
|
+
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;
|