indicator-ui 1.1.54 → 1.1.55
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.cjs +9 -9
- package/dist/index.js +9487 -9335
- package/dist/types/src/hooks/modalsFederation/anchoredModal/hooks/useAnchoredModalController.d.ts +1 -0
- package/dist/types/src/hooks/modalsFederation/anchoredModal/hooks/useModalOutsideClick.d.ts +1 -0
- package/dist/types/src/hooks/modalsFederation/anchoredModal/hooks/useScrollBehavior.d.ts +1 -0
- package/dist/types/src/hooks/modalsFederation/dialogModal/hooks/useDialogModalController.d.ts +1 -0
- package/dist/types/src/hooks/modalsFederation/dialogModal/hooks/useDialogModalOutsideClick.d.ts +1 -0
- package/dist/types/src/hooks/modalsFederation/dialogModal/hooks/useFocusManager.d.ts +1 -0
- package/dist/types/src/hooks/modalsFederation/federation/ModalInstanceBoundary.d.ts +7 -0
- package/dist/types/src/hooks/modalsFederation/federation/index.d.ts +3 -0
- package/dist/types/src/hooks/modalsFederation/federation/modalFederationContext/ModalFederationProvider.d.ts +4 -0
- package/dist/types/src/hooks/modalsFederation/federation/modalFederationContext/index.d.ts +2 -0
- package/dist/types/src/hooks/modalsFederation/federation/modalFederationContext/modalFederationContext.d.ts +18 -0
- package/dist/types/src/hooks/modalsFederation/federation/modalFederationContext/useModalFederationContext.d.ts +16 -0
- package/dist/types/src/hooks/modalsFederation/federation/modalInstanceContext/ModalInstanceProvider.d.ts +9 -0
- package/dist/types/src/hooks/modalsFederation/federation/modalInstanceContext/context.d.ts +5 -0
- package/dist/types/src/hooks/modalsFederation/federation/modalInstanceContext/index.d.ts +2 -0
- package/dist/types/src/hooks/modalsFederation/federation/useModalRegister.d.ts +8 -0
- package/dist/types/src/hooks/modalsFederation/federation/utils/index.d.ts +6 -0
- package/dist/types/src/hooks/modalsFederation/federation/utils/useChildModalsManager.d.ts +4 -0
- package/dist/types/src/hooks/modalsFederation/federation/utils/useModalDataContextManager.d.ts +6 -0
- package/dist/types/src/hooks/modalsFederation/federation/utils/useModalInstanceContextManager.d.ts +3 -0
- package/dist/types/src/hooks/modalsFederation/federation/utils/useParentModalId.d.ts +1 -0
- package/dist/types/src/hooks/modalsFederation/federation/utils/useRegisterModalId.d.ts +3 -0
- package/dist/types/src/hooks/modalsFederation/federation/utils/useRegisterZIndex.d.ts +3 -0
- package/dist/types/src/hooks/modalsFederation/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/types/src/hooks/modalsFederation/context/ModalFederationProvider.d.ts +0 -5
- package/dist/types/src/hooks/modalsFederation/context/ModalPortal.d.ts +0 -6
- package/dist/types/src/hooks/modalsFederation/context/index.d.ts +0 -3
- package/dist/types/src/hooks/modalsFederation/context/main.d.ts +0 -8
- package/dist/types/src/hooks/modalsFederation/context/useModalFederationContext.d.ts +0 -4
|
@@ -2,6 +2,7 @@ import { default as React } from 'react';
|
|
|
2
2
|
type PropsType = {
|
|
3
3
|
modalRef: React.RefObject<HTMLElement | null>;
|
|
4
4
|
anchorRef: React.RefObject<HTMLElement | null>;
|
|
5
|
+
childrenModalsElementsRefs: Array<React.RefObject<HTMLElement | null>>;
|
|
5
6
|
isOpenRef: React.RefObject<boolean>;
|
|
6
7
|
closeOnClickOutside: boolean;
|
|
7
8
|
closeModal: () => void;
|
|
@@ -8,6 +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
12
|
};
|
|
12
13
|
export declare function useScrollBehavior(props: PropsType): void;
|
|
13
14
|
export {};
|
package/dist/types/src/hooks/modalsFederation/dialogModal/hooks/useDialogModalController.d.ts
CHANGED
|
@@ -11,5 +11,6 @@ export declare function useDialogModalController(props: PropsType): {
|
|
|
11
11
|
close: () => Promise<unknown>;
|
|
12
12
|
toggle: () => Promise<unknown>;
|
|
13
13
|
isOpenRef: React.RefObject<boolean>;
|
|
14
|
+
register: import('../../federation/modalInstanceContext').RegisterModal;
|
|
14
15
|
};
|
|
15
16
|
export {};
|
package/dist/types/src/hooks/modalsFederation/dialogModal/hooks/useDialogModalOutsideClick.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ type PropsType = {
|
|
|
4
4
|
closeModal: () => void;
|
|
5
5
|
isOpenRef?: React.RefObject<boolean>;
|
|
6
6
|
closeOnClickOutside: boolean;
|
|
7
|
+
childrenModalsElementsRefs: Array<React.RefObject<HTMLElement | null>>;
|
|
7
8
|
};
|
|
8
9
|
export declare function useDialogModalOutsideClick(props: PropsType): void;
|
|
9
10
|
export {};
|
|
@@ -2,6 +2,7 @@ import { default as React } from 'react';
|
|
|
2
2
|
type PropsType = {
|
|
3
3
|
isOpenRef: React.RefObject<boolean>;
|
|
4
4
|
panelRef: React.RefObject<HTMLElement | null>;
|
|
5
|
+
childrenModalsElementsRefs: Array<React.RefObject<HTMLElement | null>>;
|
|
5
6
|
};
|
|
6
7
|
export declare function useFocusManager(props: PropsType): {
|
|
7
8
|
onOpen: () => void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ModalInstanceProvider } from './modalInstanceContext';
|
|
3
|
+
type PropsType = Pick<React.ComponentProps<typeof ModalInstanceProvider>, 'register'> & {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
};
|
|
6
|
+
export declare function ModalInstanceBoundary(props: PropsType): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type ModalId = string;
|
|
3
|
+
export type ModalItemData = {
|
|
4
|
+
id: ModalId;
|
|
5
|
+
zIndex: number | null;
|
|
6
|
+
parentId: ModalId | null;
|
|
7
|
+
elementRef: React.RefObject<HTMLElement | null>;
|
|
8
|
+
};
|
|
9
|
+
export type ModalsData = Map<ModalId, ModalItemData>;
|
|
10
|
+
export type ModalFederationContextType = {
|
|
11
|
+
getModalsData: () => ModalsData;
|
|
12
|
+
getModalData: (id: ModalId) => ModalItemData | undefined;
|
|
13
|
+
setModalData: (data: ModalItemData) => void;
|
|
14
|
+
putModalData: (modalId: ModalId, data: Partial<ModalItemData>) => void;
|
|
15
|
+
removeModalData: (id: ModalId) => void;
|
|
16
|
+
portalNode: HTMLElement | null;
|
|
17
|
+
};
|
|
18
|
+
export declare const ModalFederationContext: React.Context<ModalFederationContextType | null>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ModalId, ModalItemData, ModalsData } from './modalFederationContext';
|
|
3
|
+
type PropsType = {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
};
|
|
6
|
+
export declare function useModalFederationContext(props: PropsType): {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
getModalsData: () => ModalsData;
|
|
9
|
+
getModalData: (id: ModalId) => ModalItemData | undefined;
|
|
10
|
+
putModalData: (modalId: ModalId, data: Partial<ModalItemData>) => void;
|
|
11
|
+
setModalData: (data: ModalItemData) => void;
|
|
12
|
+
removeModalData: (id: ModalId) => void;
|
|
13
|
+
setPortalNode: import('react').Dispatch<import('react').SetStateAction<HTMLElement | null>>;
|
|
14
|
+
portalNode: HTMLElement | null;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ModalId } from '../modalFederationContext';
|
|
3
|
+
export type RegisterModal = () => ModalId | null;
|
|
4
|
+
type PropsType = {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
register: RegisterModal;
|
|
7
|
+
};
|
|
8
|
+
export declare function ModalInstanceProvider(props: PropsType): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { RegisterModal } from './modalInstanceContext';
|
|
3
|
+
export declare function useModalRegister(modalRef: React.RefObject<HTMLElement | null>): {
|
|
4
|
+
releaseZIndex: () => void;
|
|
5
|
+
requestZIndex: () => number;
|
|
6
|
+
getChildrenModalsElementsRefs: () => React.RefObject<HTMLElement | null>[];
|
|
7
|
+
registerModalPortal: RegisterModal;
|
|
8
|
+
};
|
package/dist/types/src/hooks/modalsFederation/federation/utils/useModalDataContextManager.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ModalId, ModalItemData } from '../modalFederationContext';
|
|
2
|
+
export declare function useModalDataContextManager(): {
|
|
3
|
+
releaseModal: (modalId: ModalId) => void;
|
|
4
|
+
registerModal: (modalData: ModalItemData) => void;
|
|
5
|
+
updateModalData: (modalId: ModalId, modalData: Omit<Partial<ModalItemData>, "id">) => void;
|
|
6
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useParentModalId(): string | null;
|
package/package.json
CHANGED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { ModalFederationContext } from './main';
|
|
3
|
-
type PropsType = Pick<React.ComponentProps<typeof ModalFederationContext.Provider>, 'children'>;
|
|
4
|
-
export declare function ModalFederationProvider(props: PropsType): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
type ModalFederationContextType = {
|
|
2
|
-
portalNode: HTMLElement | null;
|
|
3
|
-
requestZIndex: () => number;
|
|
4
|
-
releaseZIndex: (z: number) => void;
|
|
5
|
-
};
|
|
6
|
-
export declare const ModalFederationContext: import('react').Context<ModalFederationContextType | null>;
|
|
7
|
-
export declare const START_Z_INDEX = 100;
|
|
8
|
-
export {};
|