@xsolla/xui-modal 0.64.0-pr56.1768440195
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/native/index.d.mts +43 -0
- package/native/index.d.ts +43 -0
- package/native/index.js +803 -0
- package/native/index.js.map +1 -0
- package/native/index.mjs +767 -0
- package/native/index.mjs.map +1 -0
- package/package.json +48 -0
- package/web/index.d.mts +43 -0
- package/web/index.d.ts +43 -0
- package/web/index.js +804 -0
- package/web/index.js.map +1 -0
- package/web/index.mjs +764 -0
- package/web/index.mjs.map +1 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React, { ReactNode, CSSProperties } from 'react';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
type ModalSize = "sm" | "md" | "lg";
|
|
5
|
+
interface ModalProps {
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
size?: ModalSize;
|
|
8
|
+
openContent?: boolean;
|
|
9
|
+
closeOutside?: boolean;
|
|
10
|
+
onClose?: () => void;
|
|
11
|
+
styled?: CSSProperties;
|
|
12
|
+
maxWidth?: string | number;
|
|
13
|
+
minHeight?: string | number;
|
|
14
|
+
}
|
|
15
|
+
type ModalType = (props: any) => ReactNode;
|
|
16
|
+
interface ModalContextType {
|
|
17
|
+
onOpenModal: (key: string, modal: ModalType) => void;
|
|
18
|
+
onCloseModal: (key: string) => void;
|
|
19
|
+
}
|
|
20
|
+
interface ModalProviderProps {
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
interface ModalRootProps {
|
|
24
|
+
modals: Record<string, ModalType>;
|
|
25
|
+
}
|
|
26
|
+
type WorkAreaSize = "sm" | "md" | "lg";
|
|
27
|
+
interface WorkAreaProps {
|
|
28
|
+
children: ReactNode;
|
|
29
|
+
indent?: WorkAreaSize;
|
|
30
|
+
openContent?: boolean;
|
|
31
|
+
stretched?: boolean;
|
|
32
|
+
fetching?: boolean;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
declare const Modal: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<any>>;
|
|
36
|
+
|
|
37
|
+
declare const ModalProvider: ({ children }: ModalProviderProps) => react_jsx_runtime.JSX.Element;
|
|
38
|
+
|
|
39
|
+
declare const useModal: (modal: ModalType, deps?: any[]) => [() => void, () => void];
|
|
40
|
+
|
|
41
|
+
declare const WorkArea: React.ForwardRefExoticComponent<WorkAreaProps & React.RefAttributes<any>>;
|
|
42
|
+
|
|
43
|
+
export { Modal, type ModalContextType, type ModalProps, ModalProvider, type ModalProviderProps, type ModalRootProps, type ModalSize, type ModalType, WorkArea, type WorkAreaProps, type WorkAreaSize, useModal };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React, { ReactNode, CSSProperties } from 'react';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
type ModalSize = "sm" | "md" | "lg";
|
|
5
|
+
interface ModalProps {
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
size?: ModalSize;
|
|
8
|
+
openContent?: boolean;
|
|
9
|
+
closeOutside?: boolean;
|
|
10
|
+
onClose?: () => void;
|
|
11
|
+
styled?: CSSProperties;
|
|
12
|
+
maxWidth?: string | number;
|
|
13
|
+
minHeight?: string | number;
|
|
14
|
+
}
|
|
15
|
+
type ModalType = (props: any) => ReactNode;
|
|
16
|
+
interface ModalContextType {
|
|
17
|
+
onOpenModal: (key: string, modal: ModalType) => void;
|
|
18
|
+
onCloseModal: (key: string) => void;
|
|
19
|
+
}
|
|
20
|
+
interface ModalProviderProps {
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
interface ModalRootProps {
|
|
24
|
+
modals: Record<string, ModalType>;
|
|
25
|
+
}
|
|
26
|
+
type WorkAreaSize = "sm" | "md" | "lg";
|
|
27
|
+
interface WorkAreaProps {
|
|
28
|
+
children: ReactNode;
|
|
29
|
+
indent?: WorkAreaSize;
|
|
30
|
+
openContent?: boolean;
|
|
31
|
+
stretched?: boolean;
|
|
32
|
+
fetching?: boolean;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
declare const Modal: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<any>>;
|
|
36
|
+
|
|
37
|
+
declare const ModalProvider: ({ children }: ModalProviderProps) => react_jsx_runtime.JSX.Element;
|
|
38
|
+
|
|
39
|
+
declare const useModal: (modal: ModalType, deps?: any[]) => [() => void, () => void];
|
|
40
|
+
|
|
41
|
+
declare const WorkArea: React.ForwardRefExoticComponent<WorkAreaProps & React.RefAttributes<any>>;
|
|
42
|
+
|
|
43
|
+
export { Modal, type ModalContextType, type ModalProps, ModalProvider, type ModalProviderProps, type ModalRootProps, type ModalSize, type ModalType, WorkArea, type WorkAreaProps, type WorkAreaSize, useModal };
|