@skbkontur/side-menu 3.4.8 → 3.4.9
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,18 @@
|
|
|
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
|
+
## [3.4.9](https://git.skbkontur.ru/ui/ui-parking-2/compare/@skbkontur/side-menu@3.4.8...@skbkontur/side-menu@3.4.9) (2025-12-25)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **SideMenu:** add `aria-current="page"` to active menu item ([76a5e37](https://git.skbkontur.ru/ui/ui-parking-2/commits/76a5e3794cf8331d2970cf852354030774827824))
|
|
12
|
+
* **SideMenu:** render RightBorder icon on top of scrollbar ([8ee36f4](https://git.skbkontur.ru/ui/ui-parking-2/commits/8ee36f43b1449d95df3d094baf87654902174d08))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
6
18
|
## [3.4.8](https://git.skbkontur.ru/ui/ui-parking-2/compare/@skbkontur/side-menu@3.4.7...@skbkontur/side-menu@3.4.8) (2025-12-19)
|
|
7
19
|
|
|
8
20
|
**Note:** Version bump only for package @skbkontur/side-menu
|
package/package.json
CHANGED
|
@@ -131,7 +131,7 @@ var ClickableElement = forwardRef(function (_a, ref) {
|
|
|
131
131
|
_b[jsStyles.activeRootSubItemInSeparatedSubMenu(theme)] = isActive && context.isSeparatedMenu && _isSubMenu,
|
|
132
132
|
_b), className), onClick: handleClick, onFocus: handleFocus, onBlur: handleBlur, children: (React.createElement(ItemContent, { _isSubMenu: _isSubMenu,
|
|
133
133
|
// @ts-expect-error: SideMenuItem should have icon
|
|
134
|
-
icon: _isSubMenu && !_isBackButton ? useMemoIcon(children, { isOpened: isOpened, onClick: handleCollapse }) : icon, isNestedSubMenu: isNestedSubMenu, caption: caption, subCaption: subCaption, marker: marker, _isBackButton: _isBackButton, _isDropdown: _isDropdown, _isAvatar: _isAvatar, disabled: disabled, noWrap: noWrap })), ref: ref, href: href }, rest);
|
|
134
|
+
icon: _isSubMenu && !_isBackButton ? useMemoIcon(children, { isOpened: isOpened, onClick: handleCollapse }) : icon, isNestedSubMenu: isNestedSubMenu, caption: caption, subCaption: subCaption, marker: marker, _isBackButton: _isBackButton, _isDropdown: _isDropdown, _isAvatar: _isAvatar, disabled: disabled, noWrap: noWrap })), ref: ref, href: href, 'aria-current': isActive ? 'page' : undefined }, rest);
|
|
135
135
|
return (React.createElement(Component, (_c = { "data-tid": SideMenuDataTids.clickableElement }, _c[navigationAttribute] = currentId, _c),
|
|
136
136
|
React.cloneElement(React.createElement(Tag, { state: isActive ? 'active' : undefined }), children
|
|
137
137
|
? __assign(__assign({}, newProps), { 'aria-expanded': children ? isOpened : undefined, 'aria-controls': children ? currentId : undefined }) : __assign({}, newProps)),
|
|
@@ -2,6 +2,7 @@ import React, { forwardRef, useContext } from 'react';
|
|
|
2
2
|
import { cx } from '@skbkontur/react-ui/lib/theming/Emotion';
|
|
3
3
|
import { ThemeContext } from '@skbkontur/react-ui/lib/theming/ThemeContext';
|
|
4
4
|
import { Hint } from '@skbkontur/react-ui/components/Hint/Hint';
|
|
5
|
+
import { ZIndex } from '@skbkontur/react-ui/internal/ZIndex';
|
|
5
6
|
import { getSideMenuTheme } from '../../lib/theming/ThemeHelpers';
|
|
6
7
|
import { useMemoBorderIcon } from '../../hooks/useMemoIcon';
|
|
7
8
|
import { SideMenuContext } from '../SideMenuContext';
|
|
@@ -27,7 +28,8 @@ var RightBorder = forwardRef(function (_a, ref) {
|
|
|
27
28
|
if (e.key === 'Enter' || e.key === 'Space') {
|
|
28
29
|
onClick();
|
|
29
30
|
}
|
|
30
|
-
}, role: "button", tabIndex: 0, "data-tid": SideMenuDataTids.rightBorder },
|
|
31
|
+
}, role: "button", tabIndex: 0, "data-tid": SideMenuDataTids.rightBorder },
|
|
32
|
+
React.createElement(ZIndex, { priority: 1 }, icon))));
|
|
31
33
|
});
|
|
32
34
|
RightBorder.displayName = 'RightBorder';
|
|
33
35
|
var RightBorderWithStaticFields = Object.assign(RightBorder, { __KONTUR_REACT_UI__: 'RightBorder' });
|
|
@@ -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 opacity: 0;\n position: absolute;\n width: ", ";\n height: 100%;\n right: 0;\n background: transparent;\n display: flex;\n color: ", ";\n transition: opacity, color 150ms cubic-bezier(0.5, 1, 0.89, 1);\n &:hover {\n color: ", ";\n }\n "], ["\n opacity: 0;\n position: absolute;\n width: ", ";\n height: 100%;\n right: 0;\n background: transparent;\n display: flex;\n color: ", ";\n transition: opacity, color 150ms cubic-bezier(0.5, 1, 0.89, 1);\n &:hover {\n color: ", ";\n }\n "])), t.sideMenuRightBorderWidth, t.sideMenuRightBorderIconColor, t.sideMenuRightBorderHoverIconColor);
|
|
6
|
+
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n opacity: 0;\n position: absolute;\n width: ", ";\n height: 100%;\n right: 0;\n background: transparent;\n display: flex;\n align-items: center;\n color: ", ";\n transition: opacity, color 150ms cubic-bezier(0.5, 1, 0.89, 1);\n &:hover {\n color: ", ";\n }\n "], ["\n opacity: 0;\n position: absolute;\n width: ", ";\n height: 100%;\n right: 0;\n background: transparent;\n display: flex;\n align-items: center;\n color: ", ";\n transition: opacity, color 150ms cubic-bezier(0.5, 1, 0.89, 1);\n &:hover {\n color: ", ";\n }\n "])), t.sideMenuRightBorderWidth, t.sideMenuRightBorderIconColor, t.sideMenuRightBorderHoverIconColor);
|
|
7
7
|
},
|
|
8
8
|
rootWithButton: function () {
|
|
9
9
|
return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n opacity: 1;\n "], ["\n opacity: 1;\n "])));
|