@gravity-ui/navigation 1.1.0 → 1.1.2
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/README.md +9 -9
- package/build/cjs/components/Settings/Settings.d.ts +1 -1
- package/build/cjs/index.js +10 -1
- package/build/cjs/index.js.map +1 -1
- package/build/esm/components/Settings/Settings.d.ts +1 -1
- package/build/esm/index.js +10 -1
- package/build/esm/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,12 +37,12 @@ Used for themization Navigation's components
|
|
|
37
37
|
|
|
38
38
|
### AsideHeader vars
|
|
39
39
|
|
|
40
|
-
| Name | Description | Default
|
|
41
|
-
| :----------------------------------------------------- | :--------------------------------------------------------------- |
|
|
42
|
-
| `--gn-aside-header-background-color` | Сolor of decorations and selected items | `--g-color-base-warning-light`
|
|
43
|
-
| `--gn-aside-header-subheader-divider-line-color` | Divider line color for withDecoration and expanded `AsideHeader` | `--g-color-
|
|
44
|
-
| `--gn-aside-header-collapse-button-divider-line-color` | | `--gn-aside-header-subheader-divider-line-color`
|
|
45
|
-
| `--gn-aside-header-footer-item-icon-color` | | `--g-color-text-primary`
|
|
46
|
-
| `--gn-aside-header-subheader-item-icon-color` | | `--g-color-text-primary`
|
|
47
|
-
| `--gn-aside-header-item-icon-background-size` | Background size used when `AsideHeader` is compact | `38px`
|
|
48
|
-
| `--gn-aside-header-divider-line-color` | Vertical color divider between `AsideHeader` and content | Light theme: `transparent`, Dark theme: `--g-color-line-generic-solid`
|
|
40
|
+
| Name | Description | Default |
|
|
41
|
+
| :----------------------------------------------------- | :--------------------------------------------------------------- | :-------------------------------------------------------------------------------- |
|
|
42
|
+
| `--gn-aside-header-background-color` | Сolor of decorations and selected items | `--g-color-base-warning-light` |
|
|
43
|
+
| `--gn-aside-header-subheader-divider-line-color` | Divider line color for withDecoration and expanded `AsideHeader` | Light theme: `--g-color-line-generic`, Dark theme: `--g-color-line-generic-solid` |
|
|
44
|
+
| `--gn-aside-header-collapse-button-divider-line-color` | | `--gn-aside-header-subheader-divider-line-color` |
|
|
45
|
+
| `--gn-aside-header-footer-item-icon-color` | | `--g-color-text-primary` |
|
|
46
|
+
| `--gn-aside-header-subheader-item-icon-color` | | `--g-color-text-primary` |
|
|
47
|
+
| `--gn-aside-header-item-icon-background-size` | Background size used when `AsideHeader` is compact | `38px` |
|
|
48
|
+
| `--gn-aside-header-divider-line-color` | Vertical color divider between `AsideHeader` and content | Light theme: `transparent`, Dark theme: `--g-color-line-generic-solid` |
|
|
@@ -43,7 +43,7 @@ export interface SettingsItemProps {
|
|
|
43
43
|
children: React.ReactNode;
|
|
44
44
|
withBadge?: boolean;
|
|
45
45
|
mode?: 'row';
|
|
46
|
-
description?:
|
|
46
|
+
description?: React.ReactNode;
|
|
47
47
|
}
|
|
48
48
|
export interface SettingsContextType extends Pick<SettingsProps, 'renderRightAdornment' | 'showRightAdornmentOnHover'> {
|
|
49
49
|
}
|
package/build/cjs/index.js
CHANGED
|
@@ -1188,6 +1188,15 @@ const Item$1 = (props) => {
|
|
|
1188
1188
|
const icon = item.icon;
|
|
1189
1189
|
const iconSize = item.iconSize || ASIDE_HEADER_ICON_SIZE;
|
|
1190
1190
|
const collapsedItem = item.id === COLLAPSE_ITEM_ID;
|
|
1191
|
+
const modifiers = React__default["default"].useMemo(() => [
|
|
1192
|
+
{
|
|
1193
|
+
name: 'compact',
|
|
1194
|
+
enabled: true,
|
|
1195
|
+
options: { compact },
|
|
1196
|
+
phase: 'main',
|
|
1197
|
+
fn() { },
|
|
1198
|
+
},
|
|
1199
|
+
], [compact]);
|
|
1191
1200
|
const onClose = React__default["default"].useCallback((event) => {
|
|
1192
1201
|
var _a;
|
|
1193
1202
|
if (event instanceof MouseEvent &&
|
|
@@ -1229,7 +1238,7 @@ const Item$1 = (props) => {
|
|
|
1229
1238
|
} },
|
|
1230
1239
|
React__default["default"].createElement("div", { className: b$p('icon-place'), ref: highlightedRef }, makeIconNode(iconEl)),
|
|
1231
1240
|
React__default["default"].createElement("div", { className: b$p('title'), title: typeof item.title === 'string' ? item.title : undefined }, titleEl)),
|
|
1232
|
-
renderPopupContent && Boolean(anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current) && (React__default["default"].createElement(uikit.Popup, { contentClassName: b$p('popup'), open: popupVisible, keepMounted: popupKeepMounted, placement: popupPlacement, offset: popupOffset, anchorRef: anchorRef, onClose: onClose }, renderPopupContent()))));
|
|
1241
|
+
renderPopupContent && Boolean(anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current) && (React__default["default"].createElement(uikit.Popup, { contentClassName: b$p('popup'), open: popupVisible, keepMounted: popupKeepMounted, placement: popupPlacement, offset: popupOffset, anchorRef: anchorRef, onClose: onClose, modifiers: modifiers }, renderPopupContent()))));
|
|
1233
1242
|
return item.link ? (React__default["default"].createElement("a", { href: item.link, className: b$p('link') }, createdNode)) : (createdNode);
|
|
1234
1243
|
};
|
|
1235
1244
|
const iconNode = icon ? React__default["default"].createElement(uikit.Icon, { data: icon, size: iconSize, className: b$p('icon') }) : null;
|