@skbkontur/side-menu 4.0.3 → 4.0.5
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 +22 -0
- package/internal/themes/SideMenuDarkTheme.js +1 -4
- package/internal/themes/SideMenuTheme.d.ts +11 -3
- package/internal/themes/SideMenuTheme.js +22 -16
- package/package.json +6 -6
- package/src/SideMenuNotifications/SideMenuNotifications.js +0 -1
- package/src/internal/ItemContent/Marker.styles.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
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
|
+
## [4.0.5](/compare/@skbkontur/side-menu@4.0.4...@skbkontur/side-menu@4.0.5) (2026-05-08)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* update react & @skbkontur/react-ui peerDependency 21fad11
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [4.0.4](/compare/@skbkontur/side-menu@4.0.3...@skbkontur/side-menu@4.0.4) (2026-05-08)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **SideMenu:** make bell widget marker product color d6efcfa
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
## [4.0.3](/compare/@skbkontur/side-menu@4.0.2...@skbkontur/side-menu@4.0.3) (2026-04-21)
|
|
7
29
|
|
|
8
30
|
|
|
@@ -10,7 +10,6 @@ var SideMenuDarkTheme = /** @class */ (function (_super) {
|
|
|
10
10
|
// #region SideMenu
|
|
11
11
|
SideMenuDarkTheme.sideMenuBg = colors.surfaceLow;
|
|
12
12
|
SideMenuDarkTheme.sideMenuBgHover = colors.shapeOtherNeutralFaintSolid;
|
|
13
|
-
SideMenuDarkTheme.sideMenuProductColor = colors.shapeBoldBrandOriginal;
|
|
14
13
|
// #endregion
|
|
15
14
|
// #region Divider
|
|
16
15
|
SideMenuDarkTheme.sideMenuDividerBg = colors.lineNeutralFaint;
|
|
@@ -29,6 +28,7 @@ var SideMenuDarkTheme = /** @class */ (function (_super) {
|
|
|
29
28
|
// #endregion
|
|
30
29
|
// #region Marker
|
|
31
30
|
SideMenuDarkTheme.sideMenuMarkerColor = colors.textOnBrandOriginalHeavy;
|
|
31
|
+
SideMenuDarkTheme.sideMenuMarkerBg = colors.shapeBoldBrandOriginal;
|
|
32
32
|
SideMenuDarkTheme.sideMenuMarkerSubItemColor = colors.textNeutralSoft;
|
|
33
33
|
// #endregion
|
|
34
34
|
// #region SeparatedSubMenu
|
|
@@ -45,9 +45,6 @@ var SideMenuDarkTheme = /** @class */ (function (_super) {
|
|
|
45
45
|
// #endregion
|
|
46
46
|
// #region Burger
|
|
47
47
|
SideMenuDarkTheme.sideMenuBurgerColor = colors.textNeutralHeavy;
|
|
48
|
-
// #endregion
|
|
49
|
-
// #region SideMenuNotifications
|
|
50
|
-
SideMenuDarkTheme.sideMenuNotificationsMarkerBg = colors.textNeutralHeavy;
|
|
51
48
|
return SideMenuDarkTheme;
|
|
52
49
|
}(SideMenuTheme));
|
|
53
50
|
export var SideMenuDarkThemeInternal = exposeGetters(SideMenuDarkTheme);
|
|
@@ -10,7 +10,11 @@ export declare class SideMenuTheme extends BasicThemeClassForExtension {
|
|
|
10
10
|
static sideMenuBoxShadow: string;
|
|
11
11
|
static sideMenuLineHeight: string;
|
|
12
12
|
static sideMenuLineHeightLarge: string;
|
|
13
|
-
static
|
|
13
|
+
private static _sideMenuProductColor;
|
|
14
|
+
/** @deprecated Не используется и будет удалена в `side-menu@5.0`.
|
|
15
|
+
* Используйте {@link sideMenuMarkerBg} или пакет `@skbkontur/colors`. */
|
|
16
|
+
static get sideMenuProductColor(): string;
|
|
17
|
+
static set sideMenuProductColor(value: string);
|
|
14
18
|
static sideMenuDesktopMediaQuery: string;
|
|
15
19
|
static sideMenuNarrowDesktopMediaQuery: string;
|
|
16
20
|
static sideMenuTabletMediaQuery: string;
|
|
@@ -86,12 +90,14 @@ export declare class SideMenuTheme extends BasicThemeClassForExtension {
|
|
|
86
90
|
static sideMenuMarkerPaddingX: string;
|
|
87
91
|
static sideMenuMarkerPaddingY: string;
|
|
88
92
|
static sideMenuMarkerColor: string;
|
|
89
|
-
static
|
|
93
|
+
static sideMenuMarkerBg: string;
|
|
90
94
|
static sideMenuMarkerMarginRight: string;
|
|
91
95
|
static sideMenuMarkerMultilineMarginTop: string;
|
|
92
96
|
static sideMenuMarkerSubItemFontWeight: string;
|
|
93
97
|
static sideMenuMarkerSubItemColor: string;
|
|
94
|
-
|
|
98
|
+
/** @deprecated Не используется и будет удалена в `side-menu@5.0`.
|
|
99
|
+
* Используйте {@link sideMenuMarkerBg} или пакет `@skbkontur/colors`. */
|
|
100
|
+
static sideMenuMarkerSubItemEmptyBg: string;
|
|
95
101
|
static sideMenuAvatarSize: string;
|
|
96
102
|
static sideMenuSeparatedSubMenuBg: string;
|
|
97
103
|
static sideMenuSeparatedSubMenuBorderRightColor: string;
|
|
@@ -111,6 +117,8 @@ export declare class SideMenuTheme extends BasicThemeClassForExtension {
|
|
|
111
117
|
static sideMenuBackButtonCaptionPaddingY: string;
|
|
112
118
|
static sideMenuBackButtonIconPaddingLeft: string;
|
|
113
119
|
static sideMenuBackButtonIconPaddingRight: string;
|
|
120
|
+
/** @deprecated Не используется и будет удалена в `side-menu@5.0`.
|
|
121
|
+
* Используйте {@link sideMenuMarkerBg} или пакет `@skbkontur/colors`. */
|
|
114
122
|
static sideMenuNotificationsMarkerBg: string;
|
|
115
123
|
/** от 400px до 784px */
|
|
116
124
|
static sideMenuNotificationsWrapperHeight: string;
|
|
@@ -2,11 +2,25 @@ import { __extends } from "tslib";
|
|
|
2
2
|
import * as colors from '@skbkontur/colors/tokens-default/light';
|
|
3
3
|
import { BasicThemeClassForExtension } from '@skbkontur/react-ui/internal/themes/BasicTheme';
|
|
4
4
|
import { exposeGetters } from '@skbkontur/react-ui/lib/theming/ThemeHelpers';
|
|
5
|
+
import warning from 'warning';
|
|
5
6
|
var SideMenuTheme = /** @class */ (function (_super) {
|
|
6
7
|
__extends(SideMenuTheme, _super);
|
|
7
8
|
function SideMenuTheme() {
|
|
8
9
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
9
10
|
}
|
|
11
|
+
Object.defineProperty(SideMenuTheme, "sideMenuProductColor", {
|
|
12
|
+
/** @deprecated Не используется и будет удалена в `side-menu@5.0`.
|
|
13
|
+
* Используйте {@link sideMenuMarkerBg} или пакет `@skbkontur/colors`. */
|
|
14
|
+
get: function () {
|
|
15
|
+
return this._sideMenuProductColor;
|
|
16
|
+
},
|
|
17
|
+
set: function (value) {
|
|
18
|
+
warning('[SideMenuTheme]: sideMenuProductColor is deprecated. Use @skbkontur/colors or theme variable `sideMenuMarkerBg` instead');
|
|
19
|
+
this._sideMenuProductColor = value;
|
|
20
|
+
},
|
|
21
|
+
enumerable: false,
|
|
22
|
+
configurable: true
|
|
23
|
+
});
|
|
10
24
|
Object.defineProperty(SideMenuTheme, "sideMenuHeaderDividerColor", {
|
|
11
25
|
get: function () {
|
|
12
26
|
return this.sideMenuDividerBg;
|
|
@@ -77,20 +91,6 @@ var SideMenuTheme = /** @class */ (function (_super) {
|
|
|
77
91
|
enumerable: false,
|
|
78
92
|
configurable: true
|
|
79
93
|
});
|
|
80
|
-
Object.defineProperty(SideMenuTheme, "sideMenuMarkerBg", {
|
|
81
|
-
get: function () {
|
|
82
|
-
return this.sideMenuProductColor;
|
|
83
|
-
},
|
|
84
|
-
enumerable: false,
|
|
85
|
-
configurable: true
|
|
86
|
-
});
|
|
87
|
-
Object.defineProperty(SideMenuTheme, "sideMenuMarkerSubItemEmptyBg", {
|
|
88
|
-
get: function () {
|
|
89
|
-
return this.sideMenuProductColor;
|
|
90
|
-
},
|
|
91
|
-
enumerable: false,
|
|
92
|
-
configurable: true
|
|
93
|
-
});
|
|
94
94
|
// #region SideMenu
|
|
95
95
|
SideMenuTheme.sideMenuWidth = '232px';
|
|
96
96
|
SideMenuTheme.sideMenuWidthTouchScreen = '328px';
|
|
@@ -101,7 +101,7 @@ var SideMenuTheme = /** @class */ (function (_super) {
|
|
|
101
101
|
SideMenuTheme.sideMenuBoxShadow = "\n 4px 0 12px rgba(0, 0, 0, 0.08),\n 12px 0 32px rgba(0, 0, 0, 0.04),\n 16px 0 40px rgba(0, 0, 0, 0.04)\n ";
|
|
102
102
|
SideMenuTheme.sideMenuLineHeight = '20px';
|
|
103
103
|
SideMenuTheme.sideMenuLineHeightLarge = '22px';
|
|
104
|
-
SideMenuTheme.
|
|
104
|
+
SideMenuTheme._sideMenuProductColor = colors.shapeBoldBrandOriginal;
|
|
105
105
|
SideMenuTheme.sideMenuDesktopMediaQuery = '(min-width: 1200px)';
|
|
106
106
|
SideMenuTheme.sideMenuNarrowDesktopMediaQuery = '(min-width: 992px)';
|
|
107
107
|
SideMenuTheme.sideMenuTabletMediaQuery = '(min-width: 768px)';
|
|
@@ -187,10 +187,14 @@ var SideMenuTheme = /** @class */ (function (_super) {
|
|
|
187
187
|
SideMenuTheme.sideMenuMarkerPaddingX = '4px';
|
|
188
188
|
SideMenuTheme.sideMenuMarkerPaddingY = '0px';
|
|
189
189
|
SideMenuTheme.sideMenuMarkerColor = colors.textOnBrandOriginalHeavy;
|
|
190
|
+
SideMenuTheme.sideMenuMarkerBg = colors.shapeBoldBrandOriginal;
|
|
190
191
|
SideMenuTheme.sideMenuMarkerMarginRight = '8px';
|
|
191
192
|
SideMenuTheme.sideMenuMarkerMultilineMarginTop = '4px';
|
|
192
193
|
SideMenuTheme.sideMenuMarkerSubItemFontWeight = '400';
|
|
193
194
|
SideMenuTheme.sideMenuMarkerSubItemColor = colors.textNeutralSoft;
|
|
195
|
+
/** @deprecated Не используется и будет удалена в `side-menu@5.0`.
|
|
196
|
+
* Используйте {@link sideMenuMarkerBg} или пакет `@skbkontur/colors`. */
|
|
197
|
+
SideMenuTheme.sideMenuMarkerSubItemEmptyBg = colors.shapeBoldBrandOriginal;
|
|
194
198
|
// #endregion
|
|
195
199
|
// #region Avatar
|
|
196
200
|
SideMenuTheme.sideMenuAvatarSize = '24px';
|
|
@@ -224,7 +228,9 @@ var SideMenuTheme = /** @class */ (function (_super) {
|
|
|
224
228
|
SideMenuTheme.sideMenuBackButtonIconPaddingRight = '6px';
|
|
225
229
|
// #endregion
|
|
226
230
|
// #region SideMenuNotifications
|
|
227
|
-
|
|
231
|
+
/** @deprecated Не используется и будет удалена в `side-menu@5.0`.
|
|
232
|
+
* Используйте {@link sideMenuMarkerBg} или пакет `@skbkontur/colors`. */
|
|
233
|
+
SideMenuTheme.sideMenuNotificationsMarkerBg = colors.shapeBoldBrandOriginal;
|
|
228
234
|
/** от 400px до 784px */
|
|
229
235
|
SideMenuTheme.sideMenuNotificationsWrapperHeight = 'calculated';
|
|
230
236
|
return SideMenuTheme;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skbkontur/side-menu",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Kontur",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@skbkontur/bell-widget-npm-loader": "^0.3.0",
|
|
29
29
|
"@skbkontur/colors": "^2.1.7",
|
|
30
|
-
"@skbkontur/empty-state": "^2.0.
|
|
30
|
+
"@skbkontur/empty-state": "^2.0.2",
|
|
31
31
|
"@skbkontur/icons": ">=2 <3",
|
|
32
|
-
"@skbkontur/react-ui-addons": "^6.0.
|
|
32
|
+
"@skbkontur/react-ui-addons": "^6.0.3",
|
|
33
33
|
"@skbkontur/widget-consumer-react-utils": "^1.6.12",
|
|
34
34
|
"tslib": "^2.8.0"
|
|
35
35
|
},
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"@skbkontur/ui-cdn-components": "^1.9.0"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@skbkontur/react-ui": ">=
|
|
41
|
-
"react": ">=16.9
|
|
42
|
-
"react-dom": ">=16.9
|
|
40
|
+
"@skbkontur/react-ui": ">=6 <7",
|
|
41
|
+
"react": ">=16.9 <20",
|
|
42
|
+
"react-dom": ">=16.9 <20"
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -34,7 +34,6 @@ var SideMenuNotificationsInner = forwardRef(function (_a, ref) {
|
|
|
34
34
|
menuPaddingX: '0px',
|
|
35
35
|
menuOffsetY: '8px',
|
|
36
36
|
menuScrollContainerContentWrapperPaddingY: '0px',
|
|
37
|
-
sideMenuMarkerBg: theme.sideMenuNotificationsMarkerBg,
|
|
38
37
|
}, theme) },
|
|
39
38
|
React.createElement(SideMenuDropdown, __assign({ ref: ref, icon: currentIcon, marker: marker, positions: positions, "data-tid": SideMenuDataTids.bellSideMenuDropdownButton, "data-item": BELL_SIDE_MENU_DATA_ITEM, caption: "\u0423\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u044F", onClose: handleClose }, rest), children !== null && children !== void 0 ? children : (React.createElement(BellWidget, { widgetApi: widgetApi, onClose: handleBellWidgetClose, renderErrorButton: renderErrorButton, renderErrorMessage: renderErrorMessage, onError: onError, redirect: redirect }))),
|
|
40
39
|
showDivider && React.createElement(SideMenu.Divider, null)));
|
|
@@ -16,7 +16,7 @@ export var getStyles = memoizeGetStyles(function (_a) {
|
|
|
16
16
|
return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n background: transparent;\n color: ", ";\n font-weight: ", ";\n "], ["\n background: transparent;\n color: ", ";\n font-weight: ", ";\n "])), t.sideMenuMarkerSubItemColor, t.sideMenuMarkerSubItemFontWeight);
|
|
17
17
|
},
|
|
18
18
|
rootSubMenuEmpty: function (t) {
|
|
19
|
-
return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background: ", ";\n "], ["\n background: ", ";\n "])), t.
|
|
19
|
+
return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background: ", ";\n "], ["\n background: ", ";\n "])), t.sideMenuMarkerBg);
|
|
20
20
|
},
|
|
21
21
|
rootCollapsed: function () {
|
|
22
22
|
return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n position: absolute;\n right: 0;\n top: 0;\n margin: 0;\n "], ["\n position: absolute;\n right: 0;\n top: 0;\n margin: 0;\n "])));
|