@skbkontur/side-menu 1.8.11 → 1.8.12
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 +11 -0
- package/package.json +1 -1
- package/src/SideMenu/SideMenu.js +2 -1
- package/src/SideMenu/SideMenu.styles.d.ts +1 -0
- package/src/SideMenu/SideMenu.styles.js +19 -16
- package/src/internal/SeparatedSubMenu.js +1 -0
- package/src/internal/SeparatedSubMenu.styles.d.ts +1 -0
- package/src/internal/SeparatedSubMenu.styles.js +10 -7
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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.12](https://git.skbkontur.ru/ui/ui-parking/compare/@skbkontur/side-menu@1.8.11...@skbkontur/side-menu@1.8.12) (2024-01-24)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **SideMenu:** fix width on touchscreens ([55297c4](https://git.skbkontur.ru/ui/ui-parking/commits/55297c46e7de65357fa9d04eeda3bdc8bd974409))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [1.8.11](https://git.skbkontur.ru/ui/ui-parking/compare/@skbkontur/side-menu@1.8.10...@skbkontur/side-menu@1.8.11) (2024-01-15)
|
|
7
18
|
|
|
8
19
|
|
package/package.json
CHANGED
package/src/SideMenu/SideMenu.js
CHANGED
|
@@ -103,7 +103,7 @@ var SideMenuInner = forwardRef(function (_a, ref) {
|
|
|
103
103
|
}
|
|
104
104
|
};
|
|
105
105
|
var handleMouseEnter = function () {
|
|
106
|
-
if (isSeparatedMenu && isSeparatedMenuShown && isNarrowDesktop && manual) {
|
|
106
|
+
if ((isSeparatedMenu && isSeparatedMenuShown && isNarrowDesktop && manual) || isTouchScreen) {
|
|
107
107
|
return;
|
|
108
108
|
}
|
|
109
109
|
if (isNarrowDesktop || (isDesktopQuery && !isOpened)) {
|
|
@@ -193,6 +193,7 @@ var SideMenuInner = forwardRef(function (_a, ref) {
|
|
|
193
193
|
_b[jsStylesForSideMenu.transitionedRootForTabletsOrMobiles()] = isBeingTransitioned && isTabletOrMobile,
|
|
194
194
|
_b[jsStylesForSideMenu.rootForNarrowDesktops(theme)] = isNarrowDesktop,
|
|
195
195
|
_b[jsStylesForSideMenu.separatedRootForNarrowDesktops(theme)] = isSeparatedMenuShown && isNarrowDesktop,
|
|
196
|
+
_b[jsStylesForSideMenu.separatedRootForTouchScreens(theme)] = isSeparatedMenuShown && isTouchScreen && isNarrowDesktop,
|
|
196
197
|
_b[jsStylesForSideMenu.separatedRootForDesktops(theme)] = isSeparatedMenuShown && isDesktopQuery,
|
|
197
198
|
_b)) },
|
|
198
199
|
React.createElement(React.Fragment, null,
|
|
@@ -8,6 +8,7 @@ export declare const jsStylesForSideMenu: {
|
|
|
8
8
|
transitionedRootForTabletsOrMobiles(): string;
|
|
9
9
|
rootForNarrowDesktops(t: SideMenuTheme): string;
|
|
10
10
|
separatedRootForNarrowDesktops(t: SideMenuTheme): string;
|
|
11
|
+
separatedRootForTouchScreens(t: SideMenuTheme): string;
|
|
11
12
|
separatedRootForDesktops(t: SideMenuTheme): string;
|
|
12
13
|
container(t: SideMenuTheme): string;
|
|
13
14
|
minimizedContainer(t: SideMenuTheme): string;
|
|
@@ -18,54 +18,57 @@ var styles = {
|
|
|
18
18
|
separatedRootForNarrowDesktops: function (t) {
|
|
19
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);
|
|
20
20
|
},
|
|
21
|
+
separatedRootForTouchScreens: function (t) {
|
|
22
|
+
return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n width: calc(", " + ", ");\n background: ", ";\n "], ["\n width: calc(", " + ", ");\n background: ", ";\n "])), t.sideMenuMinimizedWidth, t.sideMenuWidthForTouchScreens, t.sideMenuSeparatedSubMenuBgColor);
|
|
23
|
+
},
|
|
21
24
|
separatedRootForDesktops: function (t) {
|
|
22
|
-
return css(
|
|
25
|
+
return css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n width: calc(", " + ", ");\n background: ", ";\n "], ["\n width: calc(", " + ", ");\n background: ", ";\n "])), t.sideMenuWidth, t.sideMenuWidth, t.sideMenuSeparatedSubMenuBgColor);
|
|
23
26
|
},
|
|
24
27
|
container: function (t) {
|
|
25
|
-
return css(
|
|
28
|
+
return css(templateObject_8 || (templateObject_8 = __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);
|
|
26
29
|
},
|
|
27
30
|
minimizedContainer: function (t) {
|
|
28
|
-
return css(
|
|
31
|
+
return css(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n width: ", " !important;\n "], ["\n width: ", " !important;\n "])), t.sideMenuMinimizedWidth);
|
|
29
32
|
},
|
|
30
33
|
innerContainer: function () {
|
|
31
|
-
return css(
|
|
34
|
+
return css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n overflow-x: hidden;\n "], ["\n overflow-x: hidden;\n "])));
|
|
32
35
|
},
|
|
33
36
|
containerForTouchScreens: function (t) {
|
|
34
|
-
return css(
|
|
37
|
+
return css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n width: ", ";\n "], ["\n width: ", ";\n "])), t.sideMenuWidthForTouchScreens);
|
|
35
38
|
},
|
|
36
39
|
separatedContainerForMobiles: function (t) {
|
|
37
|
-
return css(
|
|
40
|
+
return css(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n background: ", ";\n "], ["\n background: ", ";\n "])), t.sideMenuSeparatedSubMenuBgColor);
|
|
38
41
|
},
|
|
39
42
|
contentWrapper: function (t) {
|
|
40
|
-
return css(
|
|
43
|
+
return css(templateObject_13 || (templateObject_13 = __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);
|
|
41
44
|
},
|
|
42
45
|
contentWrapperForTouchScreens: function (t) {
|
|
43
|
-
return css(
|
|
46
|
+
return css(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n width: ", ";\n "], ["\n width: ", ";\n "])), t.sideMenuWidthForTouchScreens);
|
|
44
47
|
},
|
|
45
48
|
minimizedContentWrapper: function () {
|
|
46
|
-
return css(
|
|
49
|
+
return css(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n width: 100%;\n "], ["\n width: 100%;\n "])));
|
|
47
50
|
},
|
|
48
51
|
wrapper: function () {
|
|
49
|
-
return css(
|
|
52
|
+
return css(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n height: 100%;\n display: inline-flex;\n position: relative;\n "], ["\n height: 100%;\n display: inline-flex;\n position: relative;\n "])));
|
|
50
53
|
},
|
|
51
54
|
wrapperIE: function () {
|
|
52
55
|
var ieRootWrapperCorrection = 15;
|
|
53
|
-
return css(
|
|
56
|
+
return css(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n position: relative;\n top: -", ";\n height: calc(100% + ", ");\n "], ["\n position: relative;\n top: -", ";\n height: calc(100% + ", ");\n "])), ieRootWrapperCorrection, ieRootWrapperCorrection);
|
|
54
57
|
},
|
|
55
58
|
wrapperWithShadow: function (t) {
|
|
56
|
-
return css(
|
|
59
|
+
return css(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n box-shadow: ", ";\n "], ["\n box-shadow: ", ";\n "])), t.sideMenuBoxShadow);
|
|
57
60
|
},
|
|
58
61
|
collapsedContainerForTabletsOrMobiles: function () {
|
|
59
|
-
return css(
|
|
62
|
+
return css(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n background-color: transparent;\n "], ["\n background-color: transparent;\n "])));
|
|
60
63
|
},
|
|
61
64
|
list: function () {
|
|
62
|
-
return css(
|
|
65
|
+
return css(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n list-style: none;\n padding: 0;\n margin: 0;\n "], ["\n list-style: none;\n padding: 0;\n margin: 0;\n "])));
|
|
63
66
|
},
|
|
64
67
|
};
|
|
65
68
|
export var customStyles = {
|
|
66
69
|
rootForTabletsOrMobiles: function (headerHeight) {
|
|
67
|
-
return css(
|
|
70
|
+
return css(templateObject_21 || (templateObject_21 = __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);
|
|
68
71
|
},
|
|
69
72
|
};
|
|
70
73
|
export var jsStylesForSideMenu = memoizeStyle(styles);
|
|
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;
|
|
74
|
+
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;
|
|
@@ -40,6 +40,7 @@ var SeparatedSubMenu = forwardRef(function (_a, ref) {
|
|
|
40
40
|
_b[jsStyles.root(theme)] = true,
|
|
41
41
|
_b[customStyles.rootForMobiles(context.headerHeight)] = context.isMobile,
|
|
42
42
|
_b[jsStyles.rootForDesktop(theme)] = context.isDesktop,
|
|
43
|
+
_b[jsStyles.rootForTouchScreens(theme)] = context.isTouchScreen && context.isOpened,
|
|
43
44
|
_b[jsStyles.rootForNarrowDesktop(theme)] = context.isNarrowDesktop,
|
|
44
45
|
_b[jsStyles.rootWithShadow(theme)] = context.isTablet && !isIE11,
|
|
45
46
|
_b)), ref: ref, "data-tid": SideMenuDataTids.separatedSubMenu },
|
|
@@ -4,6 +4,7 @@ export declare const customStyles: {
|
|
|
4
4
|
};
|
|
5
5
|
export declare const jsStyles: {
|
|
6
6
|
root(t: SideMenuTheme): string;
|
|
7
|
+
rootForTouchScreens(t: SideMenuTheme): string;
|
|
7
8
|
rootForNarrowDesktop(t: SideMenuTheme): string;
|
|
8
9
|
rootForDesktop(t: SideMenuTheme): string;
|
|
9
10
|
rootWithShadow(t: SideMenuTheme): string;
|
|
@@ -5,26 +5,29 @@ var styles = {
|
|
|
5
5
|
root: function (t) {
|
|
6
6
|
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n background: ", ";\n left: 100%;\n justify-content: flex-start;\n border-right: 1px solid ", ";\n z-index: 8000;\n "], ["\n position: absolute;\n top: 0;\n background: ", ";\n left: 100%;\n justify-content: flex-start;\n border-right: 1px solid ", ";\n z-index: 8000;\n "])), t.sideMenuSeparatedSubMenuBgColor, t.sideMenuSeparatedSubMenuBorderRightColor);
|
|
7
7
|
},
|
|
8
|
+
rootForTouchScreens: function (t) {
|
|
9
|
+
return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n left: ", ";\n z-index: -1;\n "], ["\n left: ", ";\n z-index: -1;\n "])), t.sideMenuWidthForTouchScreens);
|
|
10
|
+
},
|
|
8
11
|
rootForNarrowDesktop: function (t) {
|
|
9
|
-
return css(
|
|
12
|
+
return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n left: ", ";\n z-index: -1;\n "], ["\n left: ", ";\n z-index: -1;\n "])), t.sideMenuMinimizedWidth);
|
|
10
13
|
},
|
|
11
14
|
rootForDesktop: function (t) {
|
|
12
|
-
return css(
|
|
15
|
+
return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n left: ", ";\n z-index: -1;\n "], ["\n left: ", ";\n z-index: -1;\n "])), t.sideMenuWidth);
|
|
13
16
|
},
|
|
14
17
|
rootWithShadow: function (t) {
|
|
15
|
-
return css(
|
|
18
|
+
return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n box-shadow: ", ";\n clip-path: inset(0 -", " 0 0);\n border-right: none;\n "], ["\n box-shadow: ", ";\n clip-path: inset(0 -", " 0 0);\n border-right: none;\n "])), t.sideMenuBoxShadow, t.sideMenuBoxShadowBlurRadius);
|
|
16
19
|
},
|
|
17
20
|
contentWrapper: function (t) {
|
|
18
|
-
return css(
|
|
21
|
+
return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n padding: ", " ", ";\n "], ["\n padding: ", " ", ";\n "])), t.sideMenuSeparatedSubMenuPaddingY, t.sideMenuSeparatedSubMenuPaddingX);
|
|
19
22
|
},
|
|
20
23
|
contentWrapperForMobiles: function () {
|
|
21
|
-
return css(
|
|
24
|
+
return css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n padding-top: 0;\n "], ["\n padding-top: 0;\n "])));
|
|
22
25
|
},
|
|
23
26
|
};
|
|
24
27
|
export var customStyles = {
|
|
25
28
|
rootForMobiles: function (headerHeight) {
|
|
26
|
-
return css(
|
|
29
|
+
return css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n height: calc(100vh - ", "px);\n left: 0;\n top: ", "px;\n "], ["\n height: calc(100vh - ", "px);\n left: 0;\n top: ", "px;\n "])), headerHeight, headerHeight);
|
|
27
30
|
},
|
|
28
31
|
};
|
|
29
32
|
export var jsStyles = memoizeStyle(styles);
|
|
30
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
|
|
33
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
|