@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/esm/index.js
CHANGED
|
@@ -1161,6 +1161,15 @@ const Item$1 = (props) => {
|
|
|
1161
1161
|
const icon = item.icon;
|
|
1162
1162
|
const iconSize = item.iconSize || ASIDE_HEADER_ICON_SIZE;
|
|
1163
1163
|
const collapsedItem = item.id === COLLAPSE_ITEM_ID;
|
|
1164
|
+
const modifiers = React__default.useMemo(() => [
|
|
1165
|
+
{
|
|
1166
|
+
name: 'compact',
|
|
1167
|
+
enabled: true,
|
|
1168
|
+
options: { compact },
|
|
1169
|
+
phase: 'main',
|
|
1170
|
+
fn() { },
|
|
1171
|
+
},
|
|
1172
|
+
], [compact]);
|
|
1164
1173
|
const onClose = React__default.useCallback((event) => {
|
|
1165
1174
|
var _a;
|
|
1166
1175
|
if (event instanceof MouseEvent &&
|
|
@@ -1202,7 +1211,7 @@ const Item$1 = (props) => {
|
|
|
1202
1211
|
} },
|
|
1203
1212
|
React__default.createElement("div", { className: b$p('icon-place'), ref: highlightedRef }, makeIconNode(iconEl)),
|
|
1204
1213
|
React__default.createElement("div", { className: b$p('title'), title: typeof item.title === 'string' ? item.title : undefined }, titleEl)),
|
|
1205
|
-
renderPopupContent && Boolean(anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current) && (React__default.createElement(Popup, { contentClassName: b$p('popup'), open: popupVisible, keepMounted: popupKeepMounted, placement: popupPlacement, offset: popupOffset, anchorRef: anchorRef, onClose: onClose }, renderPopupContent()))));
|
|
1214
|
+
renderPopupContent && Boolean(anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.current) && (React__default.createElement(Popup, { contentClassName: b$p('popup'), open: popupVisible, keepMounted: popupKeepMounted, placement: popupPlacement, offset: popupOffset, anchorRef: anchorRef, onClose: onClose, modifiers: modifiers }, renderPopupContent()))));
|
|
1206
1215
|
return item.link ? (React__default.createElement("a", { href: item.link, className: b$p('link') }, createdNode)) : (createdNode);
|
|
1207
1216
|
};
|
|
1208
1217
|
const iconNode = icon ? React__default.createElement(Icon, { data: icon, size: iconSize, className: b$p('icon') }) : null;
|
|
@@ -1287,7 +1296,7 @@ const POPUP_MODIFIERS = [
|
|
|
1287
1296
|
const MultipleTooltip = ({ items, open, anchorRef, placement, }) => {
|
|
1288
1297
|
const { activeIndex, hideCollapseItemTooltip } = React__default.useContext(MultipleTooltipContext);
|
|
1289
1298
|
const activeItem = activeIndex === undefined ? null : items[activeIndex];
|
|
1290
|
-
return (React__default.createElement(Popup, { open: open, anchorRef: anchorRef, placement: placement, offset: POPUP_OFFSET, contentClassName: b$o(null), modifiers: POPUP_MODIFIERS },
|
|
1299
|
+
return (React__default.createElement(Popup, { open: open, anchorRef: anchorRef, placement: placement, offset: POPUP_OFFSET, contentClassName: b$o(null), modifiers: POPUP_MODIFIERS, disableLayer: true },
|
|
1291
1300
|
React__default.createElement("div", { className: b$o('items-container') }, items
|
|
1292
1301
|
.filter(({ type = 'regular', id }) => !hideCollapseItemTooltip ||
|
|
1293
1302
|
(id !== COLLAPSE_ITEM_ID && type !== 'action'))
|