indicator-ui 1.1.62 → 1.1.63

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/dist/index.js CHANGED
@@ -20711,18 +20711,18 @@ function o9(r) {
20711
20711
  const { modalIdRef: e } = OH(), t = WH(), n = YH(), i = qH(), o = VH(), s = BH(), c = k(() => {
20712
20712
  s.registerModal({
20713
20713
  zIndex: null,
20714
- elementRef: r,
20714
+ elementsRefs: r,
20715
20715
  parentId: t,
20716
20716
  id: e.current
20717
20717
  });
20718
- }, [s]), u = k(() => {
20718
+ }, [s, r]), u = k(() => {
20719
20719
  e.current !== null && s.releaseModal(e.current);
20720
20720
  }, [s]), d = k(() => {
20721
20721
  const g = o.requestZIndex();
20722
20722
  return e.current != null && s.updateModalData(e.current, { zIndex: g }), g;
20723
20723
  }, [s, o]), f = k(() => {
20724
20724
  e.current != null && s.updateModalData(e.current, { zIndex: null });
20725
- }, [s]), h = k(() => e.current == null ? [] : i.getChildrenModals(e.current).map((g) => g.elementRef), [i]), p = k(() => e.current == null ? [] : n.getParentsModals(e.current).map((g) => g.elementRef), [n]), _ = k(() => e.current, []);
20725
+ }, [s]), h = k(() => e.current == null ? [] : i.getChildrenModals(e.current).flatMap((g) => g.elementsRefs), [i]), p = k(() => e.current == null ? [] : n.getParentsModals(e.current).flatMap((g) => g.elementsRefs), [n]), _ = k(() => e.current, []);
20726
20726
  return pe(() => (c(), () => {
20727
20727
  u();
20728
20728
  }), []), {
@@ -21148,7 +21148,7 @@ function Toe(r) {
21148
21148
  getChildrenModalsElementsRefs: p,
21149
21149
  getParentsModalsElementsRefs: _,
21150
21150
  registerModalPortal: g
21151
- } = o9(e), y = G(() => p(), [p]), v = G(() => _(), [_]), [w, S] = yt(void 0), { onLeave: x, onEnter: E } = QH({ leave: n, enter: i, modalRef: e }), { applyPosition: b } = ZH({
21151
+ } = o9([e]), y = G(() => p(), [p]), v = G(() => _(), [_]), [w, S] = yt(void 0), { onLeave: x, onEnter: E } = QH({ leave: n, enter: i, modalRef: e }), { applyPosition: b } = ZH({
21152
21152
  anchorRef: t,
21153
21153
  modalRef: e,
21154
21154
  parentsModalsElementsRefs: v,
@@ -21322,7 +21322,7 @@ function Eoe(r) {
21322
21322
  releaseZIndex: d,
21323
21323
  getChildrenModalsElementsRefs: f,
21324
21324
  registerModalPortal: h
21325
- } = o9(e), p = G(() => f(), [f]), [_, g] = yt(void 0), { onLeave: y, onEnter: v } = iq({ leave: s, enter: o, panelRef: e, backdropRef: t }), { applyPosition: w } = oq({ backdropRef: t, options: { zIndex: _() } }), { onOpen: S, onClose: x } = cq({
21325
+ } = o9([e, t]), p = G(() => f(), [f]), [_, g] = yt(void 0), { onLeave: y, onEnter: v } = iq({ leave: s, enter: o, panelRef: e, backdropRef: t }), { applyPosition: w } = oq({ backdropRef: t, options: { zIndex: _() } }), { onOpen: S, onClose: x } = cq({
21326
21326
  panelRef: e,
21327
21327
  isOpenRef: c,
21328
21328
  childrenModalsElementsRefs: p
@@ -4,7 +4,7 @@ export type ModalItemData = {
4
4
  id: ModalId;
5
5
  zIndex: number | null;
6
6
  parentId: ModalId | null;
7
- elementRef: React.RefObject<HTMLElement | null>;
7
+ elementsRefs: Array<React.RefObject<HTMLElement | null>>;
8
8
  };
9
9
  export type ModalsData = Map<ModalId, ModalItemData>;
10
10
  export type ModalFederationContextType = {
@@ -1,6 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  import { RegisterModal } from './modalInstanceContext';
3
- export declare function useModalRegister(modalRef: React.RefObject<HTMLElement | null>): {
3
+ export declare function useModalRegister(elementsRefs: Array<React.RefObject<HTMLElement | null>>): {
4
4
  releaseZIndex: () => void;
5
5
  requestZIndex: () => number;
6
6
  registerModalPortal: RegisterModal;
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "react-components",
12
12
  "ui-kit"
13
13
  ],
14
- "version": "1.1.62",
14
+ "version": "1.1.63",
15
15
  "exports": {
16
16
  ".": {
17
17
  "types": "./dist/types/index.d.ts",