indicator-ui 1.1.56 → 1.1.58

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.
@@ -15,6 +15,7 @@ export declare function useAnchoredModalController(props: PropsType): {
15
15
  scrollableParentBehavior?: import('../../..').AnchoredModalScrollableParentBehavior;
16
16
  windowScrollBehavior?: import('../../..').AnchoredModalWindowScrollBehavior;
17
17
  closeOnClickOutside?: boolean;
18
+ repositionOnParentsModalsResize?: boolean;
18
19
  } & {
19
20
  zIndex?: number;
20
21
  }) => void;
@@ -6,6 +6,7 @@ type ApplyPositionOptions = UseAnchoredModalOptions & {
6
6
  type PropsType = {
7
7
  anchorRef: React.RefObject<HTMLElement | null>;
8
8
  modalRef: React.RefObject<HTMLElement | null>;
9
+ parentsModalsElementsRefs: Array<React.RefObject<HTMLElement | null>>;
9
10
  options: ApplyPositionOptions;
10
11
  };
11
12
  export declare function useApplyPosition(props: PropsType): {
@@ -1,8 +1,10 @@
1
1
  import { default as React } from 'react';
2
+ import { UseAnchoredModalOptions } from '../types';
2
3
  type Callback = () => void;
3
- type OptionsType = {
4
+ type OptionsType = Pick<UseAnchoredModalOptions, 'repositionOnParentsModalsResize'> & {
4
5
  anchorRef: React.RefObject<HTMLElement | null>;
5
6
  elementRef: React.RefObject<HTMLElement | null>;
7
+ parentsModalsElementsRefs: Array<React.RefObject<HTMLElement | null>>;
6
8
  };
7
9
  export declare function usePositionOnResize(callback: Callback, opt: OptionsType): void;
8
10
  export {};
@@ -8,7 +8,7 @@ type PropsType = Pick<ReturnType<typeof useApplyPosition>, 'applyPosition'> & {
8
8
  scrollableParentBehavior?: AnchoredModalScrollableParentBehavior;
9
9
  anchorRef: React.RefObject<HTMLElement | null>;
10
10
  modalRef: React.RefObject<HTMLElement | null>;
11
- getChildrenModals: () => Array<React.RefObject<HTMLElement | null>>;
11
+ childrenModalsElementsRefs: Array<React.RefObject<HTMLElement | null>>;
12
12
  };
13
13
  export declare function useScrollBehavior(props: PropsType): void;
14
14
  export {};
@@ -28,4 +28,5 @@ export type UseAnchoredModalOptions = AnchoredModalPositionOptions & {
28
28
  scrollableParentBehavior?: AnchoredModalScrollableParentBehavior;
29
29
  windowScrollBehavior?: AnchoredModalWindowScrollBehavior;
30
30
  closeOnClickOutside?: boolean;
31
+ repositionOnParentsModalsResize?: boolean;
31
32
  };
@@ -3,6 +3,7 @@ import { RegisterModal } from './modalInstanceContext';
3
3
  export declare function useModalRegister(modalRef: React.RefObject<HTMLElement | null>): {
4
4
  releaseZIndex: () => void;
5
5
  requestZIndex: () => number;
6
- getChildrenModalsElementsRefs: () => React.RefObject<HTMLElement | null>[];
7
6
  registerModalPortal: RegisterModal;
7
+ getChildrenModalsElementsRefs: () => React.RefObject<HTMLElement | null>[];
8
+ getParentsModalsElementsRefs: () => React.RefObject<HTMLElement | null>[];
8
9
  };
@@ -1,6 +1,7 @@
1
- export * from './useParentModalId';
2
1
  export * from './useRegisterModalId';
3
2
  export * from './useRegisterZIndex';
4
3
  export * from './useModalDataContextManager';
5
4
  export * from './useModalInstanceContextManager';
5
+ export * from './useParentModalId';
6
6
  export * from './useChildModalsManager';
7
+ export * from './useParentModalManager';
@@ -0,0 +1,5 @@
1
+ import { ModalId, ModalItemData } from '../modalFederationContext';
2
+ export declare function useParentsModalManager(): {
3
+ getParentsModals: (modalId: ModalId) => ModalItemData[];
4
+ getFirstParentModal: (modalId: ModalId) => ModalItemData | null | undefined;
5
+ };
@@ -1,2 +1,5 @@
1
1
  import { default as React } from 'react';
2
- export declare function useResizeObserverRef<T extends Element>(ref: React.RefObject<T | null>, _callback: ResizeObserverCallback, options?: ResizeObserverOptions): void;
2
+ type RefsList = Array<React.RefObject<HTMLElement | null>>;
3
+ type RefProps<T extends Element> = React.RefObject<T | null> | RefsList;
4
+ export declare function useResizeObserverRef(ref: RefProps<HTMLElement>, _callback: ResizeObserverCallback, options?: ResizeObserverOptions): void;
5
+ export {};
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "react-components",
12
12
  "ui-kit"
13
13
  ],
14
- "version": "1.1.56",
14
+ "version": "1.1.58",
15
15
  "exports": {
16
16
  ".": {
17
17
  "types": "./dist/types/index.d.ts",