@gravity-ui/navigation 1.1.1 → 1.1.3
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/build/cjs/index.js +11 -2
- package/build/cjs/index.js.map +1 -1
- package/build/esm/index.js +11 -2
- package/build/esm/index.js.map +1 -1
- package/package.json +1 -1
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;
|
|
@@ -1314,7 +1323,7 @@ const POPUP_MODIFIERS = [
|
|
|
1314
1323
|
const MultipleTooltip = ({ items, open, anchorRef, placement, }) => {
|
|
1315
1324
|
const { activeIndex, hideCollapseItemTooltip } = React__default["default"].useContext(MultipleTooltipContext);
|
|
1316
1325
|
const activeItem = activeIndex === undefined ? null : items[activeIndex];
|
|
1317
|
-
return (React__default["default"].createElement(uikit.Popup, { open: open, anchorRef: anchorRef, placement: placement, offset: POPUP_OFFSET, contentClassName: b$o(null), modifiers: POPUP_MODIFIERS },
|
|
1326
|
+
return (React__default["default"].createElement(uikit.Popup, { open: open, anchorRef: anchorRef, placement: placement, offset: POPUP_OFFSET, contentClassName: b$o(null), modifiers: POPUP_MODIFIERS, disableLayer: true },
|
|
1318
1327
|
React__default["default"].createElement("div", { className: b$o('items-container') }, items
|
|
1319
1328
|
.filter(({ type = 'regular', id }) => !hideCollapseItemTooltip ||
|
|
1320
1329
|
(id !== COLLAPSE_ITEM_ID && type !== 'action'))
|