@skbkontur/side-menu 0.11.0 → 0.11.1
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 +8 -0
- package/package.json +1 -1
- package/src/SideMenu/SideMenu.js +2 -1
- package/src/internal/InnerSubMenu.d.ts +1 -2
- package/src/internal/InnerSubMenu.js +1 -2
- package/src/internal/SeparatedSubMenu.d.ts +1 -2
- package/src/internal/SeparatedSubMenu.js +1 -2
- package/src/internal/SeparatedSubMenu.styles.js +1 -1
- package/src/internal/SubMenu.d.ts +1 -2
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
|
+
## [0.11.1](https://git.skbkontur.ru/ui/ui-parking/compare/@skbkontur/side-menu@0.11.0...@skbkontur/side-menu@0.11.1) (2023-06-02)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @skbkontur/side-menu
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [0.11.0](https://git.skbkontur.ru/ui/ui-parking/compare/@skbkontur/side-menu@0.10.1...@skbkontur/side-menu@0.11.0) (2023-05-30)
|
|
7
15
|
|
|
8
16
|
|
package/package.json
CHANGED
package/src/SideMenu/SideMenu.js
CHANGED
|
@@ -161,6 +161,7 @@ var SideMenuInner = forwardRef(function (_a, ref) {
|
|
|
161
161
|
}, {
|
|
162
162
|
opacity: 0,
|
|
163
163
|
}), shouldShowBackdrop = _x[0], backdropStyle = _x[1];
|
|
164
|
+
var isSideMenuOverflowing = (isTabletOrMobile && isShown) || (isNarrowDesktop && !isMinimized);
|
|
164
165
|
return (React.createElement(SideMenuContext.Provider, { value: {
|
|
165
166
|
isMinimized: isMinimized,
|
|
166
167
|
setIsMinimized: showMinimizedRoot,
|
|
@@ -188,7 +189,7 @@ var SideMenuInner = forwardRef(function (_a, ref) {
|
|
|
188
189
|
headerHeight: headerHeight,
|
|
189
190
|
setHeaderHeight: setHeaderHeight,
|
|
190
191
|
} },
|
|
191
|
-
React.createElement(ZIndex, { priority:
|
|
192
|
+
React.createElement(ZIndex, { priority: isSideMenuOverflowing ? 8 : 0, className: cx((_b = {},
|
|
192
193
|
_b[jsStyles.root()] = true,
|
|
193
194
|
_b[customStyles.rootForTabletsOrMobiles(headerHeight)] = isTabletOrMobile,
|
|
194
195
|
_b[jsStyles.shownRootForTabletsOrMobiles()] = isShown && isTabletOrMobile,
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ZIndex } from '@skbkontur/react-ui/internal/ZIndex';
|
|
3
2
|
interface InnerSubMenuProps {
|
|
4
3
|
children?: React.ReactNode;
|
|
5
4
|
generatedId?: string;
|
|
6
5
|
}
|
|
7
|
-
declare const InnerSubMenuWithStaticFields: React.ForwardRefExoticComponent<InnerSubMenuProps & React.RefAttributes<
|
|
6
|
+
declare const InnerSubMenuWithStaticFields: React.ForwardRefExoticComponent<InnerSubMenuProps & React.RefAttributes<HTMLDivElement>> & {
|
|
8
7
|
__KONTUR_REACT_UI__: string;
|
|
9
8
|
};
|
|
10
9
|
export { InnerSubMenuWithStaticFields as InnerSubMenu };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import { isClickableSubElement } from '../../lib/utils/scripts';
|
|
3
|
-
import { ZIndex } from '@skbkontur/react-ui/internal/ZIndex';
|
|
4
3
|
/**
|
|
5
4
|
* Подменю, раскрывающееся внутри основного меню
|
|
6
5
|
*
|
|
@@ -9,7 +8,7 @@ import { ZIndex } from '@skbkontur/react-ui/internal/ZIndex';
|
|
|
9
8
|
var InnerSubMenu = forwardRef(function (_a, ref) {
|
|
10
9
|
var children = _a.children, generatedId = _a.generatedId;
|
|
11
10
|
var levelIndex = 0;
|
|
12
|
-
return (React.createElement(
|
|
11
|
+
return (React.createElement("div", { ref: ref }, React.Children.map(children, function (child) {
|
|
13
12
|
if (React.isValidElement(child)) {
|
|
14
13
|
if (
|
|
15
14
|
// @ts-expect-error: accessing private property
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ZIndex } from '@skbkontur/react-ui/internal/ZIndex';
|
|
3
2
|
interface SeparatedSubMenuProps {
|
|
4
3
|
children?: React.ReactNode;
|
|
5
4
|
generatedId?: string;
|
|
@@ -7,7 +6,7 @@ interface SeparatedSubMenuProps {
|
|
|
7
6
|
href?: string;
|
|
8
7
|
caption?: string;
|
|
9
8
|
}
|
|
10
|
-
declare const SeparatedSubMenuWithStaticFields: React.ForwardRefExoticComponent<SeparatedSubMenuProps & React.RefAttributes<
|
|
9
|
+
declare const SeparatedSubMenuWithStaticFields: React.ForwardRefExoticComponent<SeparatedSubMenuProps & React.RefAttributes<HTMLDivElement>> & {
|
|
11
10
|
__KONTUR_REACT_UI__: string;
|
|
12
11
|
};
|
|
13
12
|
export { SeparatedSubMenuWithStaticFields as SeparatedSubMenu };
|
|
@@ -11,7 +11,6 @@ import { SideMenuDataTids } from '../../SideMenuDataTids';
|
|
|
11
11
|
import { ScrollContainer } from '@skbkontur/react-ui';
|
|
12
12
|
import { getSideMenuTheme } from '../../lib/theming/ThemeHelpers';
|
|
13
13
|
import { isIE11 } from '@skbkontur/react-ui/lib/client';
|
|
14
|
-
import { ZIndex } from '@skbkontur/react-ui/internal/ZIndex';
|
|
15
14
|
/**
|
|
16
15
|
* Отдельностоящее подменю
|
|
17
16
|
*
|
|
@@ -37,7 +36,7 @@ var SeparatedSubMenu = forwardRef(function (_a, ref) {
|
|
|
37
36
|
var levelIndex = 0;
|
|
38
37
|
var isDesktopOverlayMenu = (context.isDesktop || context.isNarrowDesktop) && !context.separatedMenuWithoutOverlay;
|
|
39
38
|
var isSeparatedSubMenuOverContent = (context.isTablet || isDesktopOverlayMenu) && !isIE11;
|
|
40
|
-
return (React.createElement(
|
|
39
|
+
return (React.createElement("div", { className: cx((_b = {},
|
|
41
40
|
_b[jsStyles.container(theme)] = true,
|
|
42
41
|
_b[jsStyles.containerForTouchScreens(theme)] = context.isTouchScreen,
|
|
43
42
|
_b[jsStylesForSeparatedSubMenu.root(theme)] = true,
|
|
@@ -3,7 +3,7 @@ import { css } from '@skbkontur/react-ui/lib/theming/Emotion';
|
|
|
3
3
|
import { memoizeStyle } from '../../lib/theming/ThemeHelpers';
|
|
4
4
|
var styles = {
|
|
5
5
|
root: function (t) {
|
|
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 "], ["\n position: absolute;\n top: 0;\n background: ", ";\n left: 100%;\n justify-content: flex-start;\n border-right: 1px solid ", ";\n "])), t.sideMenuSeparatedSubMenuBgColor, t.sideMenuSeparatedSubMenuBorderRightColor);
|
|
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
8
|
rootWithoutOverlayForNarrowDesktop: function (t) {
|
|
9
9
|
return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n left: ", ";\n z-index: -1;\n "], ["\n left: ", ";\n z-index: -1;\n "])), t.sideMenuMinimizedWidth);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ZIndex } from '@skbkontur/react-ui/internal/ZIndex';
|
|
3
2
|
interface SubMenuProps {
|
|
4
3
|
children?: React.ReactNode;
|
|
5
4
|
generatedId?: string;
|
|
@@ -11,7 +10,7 @@ interface SubMenuProps {
|
|
|
11
10
|
href?: string;
|
|
12
11
|
caption?: string;
|
|
13
12
|
}
|
|
14
|
-
declare const SubMenuWithStaticFields: React.ForwardRefExoticComponent<SubMenuProps & React.RefAttributes<
|
|
13
|
+
declare const SubMenuWithStaticFields: React.ForwardRefExoticComponent<SubMenuProps & React.RefAttributes<HTMLDivElement>> & {
|
|
15
14
|
__KONTUR_REACT_UI__: string;
|
|
16
15
|
};
|
|
17
16
|
export { SubMenuWithStaticFields as SubMenu };
|