ab-ui-library 1.49.0 → 1.49.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.
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
2
|
import type { TNestedMenuProps } from './types';
|
|
3
|
-
export declare const NestedMenu: ({ menuItems, parentRef, onClose, isOpen, position, className }: TNestedMenuProps) => ReactElement | null;
|
|
3
|
+
export declare const NestedMenu: ({ additionalRef, menuItems, parentRef, onClose, isOpen, position, className }: TNestedMenuProps) => ReactElement | null;
|
|
@@ -55,7 +55,9 @@ import '../SVGIcons/IconCheckmark.js';
|
|
|
55
55
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
56
56
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
57
57
|
var NestedMenu = function NestedMenu(_ref) {
|
|
58
|
-
var _ref$
|
|
58
|
+
var _ref$additionalRef = _ref.additionalRef,
|
|
59
|
+
additionalRef = _ref$additionalRef === void 0 ? null : _ref$additionalRef,
|
|
60
|
+
_ref$menuItems = _ref.menuItems,
|
|
59
61
|
menuItems = _ref$menuItems === void 0 ? [] : _ref$menuItems,
|
|
60
62
|
parentRef = _ref.parentRef,
|
|
61
63
|
onClose = _ref.onClose,
|
|
@@ -68,7 +70,7 @@ var NestedMenu = function NestedMenu(_ref) {
|
|
|
68
70
|
_useState2 = _slicedToArray(_useState, 2),
|
|
69
71
|
menuRef = _useState2[0],
|
|
70
72
|
setMenuRef = _useState2[1];
|
|
71
|
-
useOnOutsideClick(menuRef, onClose, !!isOpen, useId());
|
|
73
|
+
useOnOutsideClick([menuRef, additionalRef], onClose, !!isOpen, useId());
|
|
72
74
|
useHideOnScroll(onClose);
|
|
73
75
|
var _useGetElemPositions = useGetElemPositions(parentRef),
|
|
74
76
|
left = _useGetElemPositions.left,
|
|
@@ -17,7 +17,7 @@ export type TMenuProps = {
|
|
|
17
17
|
isOpen: boolean;
|
|
18
18
|
withTitleOption?: boolean;
|
|
19
19
|
children?: ReactNode;
|
|
20
|
-
additionalRef?:
|
|
20
|
+
additionalRef?: HTMLElement | null;
|
|
21
21
|
};
|
|
22
22
|
export type TNestedMenuItemProps = {
|
|
23
23
|
title: string;
|
|
@@ -32,4 +32,5 @@ export type TNestedMenuProps = {
|
|
|
32
32
|
className?: string;
|
|
33
33
|
position?: TTooltipPosition;
|
|
34
34
|
isOpen?: boolean;
|
|
35
|
+
additionalRef?: HTMLElement | null;
|
|
35
36
|
};
|
|
@@ -422,6 +422,7 @@ export { IconZoomIn } from './IconZoomIn.js';
|
|
|
422
422
|
export { IconZoomInFilled } from './IconZoomInFilled.js';
|
|
423
423
|
export { IconZoomOut } from './IconZoomOut.js';
|
|
424
424
|
export { IconZoomOutFilled } from './IconZoomOutFilled.js';
|
|
425
|
+
export { IconAppStore } from './IconAppStore.js';
|
|
425
426
|
import '../../defineProperty-ede330e4.js';
|
|
426
427
|
import '../../typeof-462d1335.js';
|
|
427
428
|
import 'react';
|
package/index.js
CHANGED
|
@@ -487,6 +487,7 @@ export { IconZoomIn } from './components/SVGIcons/IconZoomIn.js';
|
|
|
487
487
|
export { IconZoomInFilled } from './components/SVGIcons/IconZoomInFilled.js';
|
|
488
488
|
export { IconZoomOut } from './components/SVGIcons/IconZoomOut.js';
|
|
489
489
|
export { IconZoomOutFilled } from './components/SVGIcons/IconZoomOutFilled.js';
|
|
490
|
+
export { IconAppStore } from './components/SVGIcons/IconAppStore.js';
|
|
490
491
|
export { OneTimePassword } from './components/OneTimePassword/OneTimePassword.js';
|
|
491
492
|
export { OptionItem } from './helperComponents/OptionItem/OptionItem.js';
|
|
492
493
|
export { MultiTextareaWithChips } from './components/MultiTextareaWithChips/MultiTextareaWithChips.js';
|