@internxt/ui 0.0.25 → 0.0.27
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/components/dialog/Dialog.d.ts +10 -6
- package/dist/components/index.d.ts +1 -0
- package/dist/components/modal/Modal.d.ts +5 -1
- package/dist/components/suiteLauncher/SuiteLauncher.d.ts +31 -0
- package/dist/components/suiteLauncher/index.d.ts +2 -0
- package/dist/index.cjs.js +62 -96
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +2326 -2303
- package/dist/index.es.js.map +1 -1
- package/package.json +2 -2
|
@@ -5,10 +5,11 @@ export interface DialogProps {
|
|
|
5
5
|
onSecondaryAction: () => void;
|
|
6
6
|
title: string;
|
|
7
7
|
subtitle: string;
|
|
8
|
-
primaryAction: string;
|
|
9
|
-
secondaryAction: string;
|
|
8
|
+
primaryAction: string | JSX.Element;
|
|
9
|
+
secondaryAction: string | JSX.Element;
|
|
10
10
|
primaryActionColor: 'primary' | 'danger';
|
|
11
11
|
isLoading?: boolean;
|
|
12
|
+
maxWidth?: 'sm' | 'md' | 'lg';
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
15
|
* Dialog component
|
|
@@ -31,11 +32,11 @@ export interface DialogProps {
|
|
|
31
32
|
* @property {string} subtitle
|
|
32
33
|
* - A subtitle for the dialog, displayed below the title.
|
|
33
34
|
*
|
|
34
|
-
* @property {string} primaryAction
|
|
35
|
-
* - The label for the primary action button.
|
|
35
|
+
* @property {string | JSX.Element} primaryAction
|
|
36
|
+
* - The label or content for the primary action button.
|
|
36
37
|
*
|
|
37
38
|
* @property {string} secondaryAction
|
|
38
|
-
* - The label for the secondary action button.
|
|
39
|
+
* - The label or content for the secondary action button.
|
|
39
40
|
*
|
|
40
41
|
* @property {('primary' | 'danger')} primaryActionColor
|
|
41
42
|
* - Defines the color of the primary action button. Can either be 'primary' or 'danger'.
|
|
@@ -43,8 +44,11 @@ export interface DialogProps {
|
|
|
43
44
|
* @property {boolean} [isLoading]
|
|
44
45
|
* - Optional flag to indicate if the buttons should show a loading state. Defaults to false.
|
|
45
46
|
*
|
|
47
|
+
* @property {'sm' | 'md' | 'lg'} [maxWidth]
|
|
48
|
+
* - Optional maximum width for the dialog. Can be 'sm', 'md', or 'lg'.
|
|
49
|
+
*
|
|
46
50
|
* @returns {JSX.Element}
|
|
47
51
|
* - The rendered dialog component.
|
|
48
52
|
*/
|
|
49
|
-
declare const Dialog: ({ isOpen, onClose, onPrimaryAction, onSecondaryAction, title, subtitle, primaryAction, secondaryAction, primaryActionColor, isLoading, }: DialogProps) => JSX.Element;
|
|
53
|
+
declare const Dialog: ({ isOpen, onClose, onPrimaryAction, onSecondaryAction, title, subtitle, primaryAction, secondaryAction, primaryActionColor, isLoading, maxWidth, }: DialogProps) => JSX.Element;
|
|
50
54
|
export default Dialog;
|
|
@@ -8,6 +8,7 @@ export interface ModalProps {
|
|
|
8
8
|
className?: string;
|
|
9
9
|
width?: string;
|
|
10
10
|
preventClosing?: boolean;
|
|
11
|
+
stopMouseDownPropagation?: boolean;
|
|
11
12
|
}
|
|
12
13
|
/**
|
|
13
14
|
* Modal component
|
|
@@ -37,6 +38,9 @@ export interface ModalProps {
|
|
|
37
38
|
* @property {boolean} [preventClosing=false]
|
|
38
39
|
* - Optional flag to prevent the modal from closing when clicking outside or pressing the 'Escape' key.
|
|
39
40
|
*
|
|
41
|
+
* @property {boolean} [stopMouseDownPropagation=false]
|
|
42
|
+
* - Optional flag to stop event propagation on mousedown events.
|
|
43
|
+
*
|
|
40
44
|
* @returns {JSX.Element | null}
|
|
41
45
|
* - The rendered Modal component, or `null` if `isOpen` is `false`.
|
|
42
46
|
*
|
|
@@ -49,5 +53,5 @@ export interface ModalProps {
|
|
|
49
53
|
* The modal is displayed with a fixed position in the center of the screen, with a backdrop overlay.
|
|
50
54
|
* The content of the modal is rendered inside a flex container with transition effects to animate its appearance.
|
|
51
55
|
*/
|
|
52
|
-
declare const Modal: ({ isOpen, onClose, children, maxWidth, className, width, preventClosing, }: ModalProps) => JSX.Element | null;
|
|
56
|
+
declare const Modal: ({ isOpen, onClose, children, maxWidth, className, width, preventClosing, stopMouseDownPropagation, }: ModalProps) => JSX.Element | null;
|
|
53
57
|
export default Modal;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface SuiteLauncherProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
suiteArray: {
|
|
4
|
+
icon: JSX.Element;
|
|
5
|
+
title: string;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
isMain?: boolean;
|
|
8
|
+
availableSoon?: boolean;
|
|
9
|
+
isLocked?: boolean;
|
|
10
|
+
}[];
|
|
11
|
+
soonText?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* SuiteLauncher renders a dropdown menu with a list of suite applications.
|
|
15
|
+
*
|
|
16
|
+
* @param {suiteLauncherProps} props
|
|
17
|
+
* - Object containing properties for the suiteLauncher component.
|
|
18
|
+
*
|
|
19
|
+
* @param {suiteLauncherProps['suiteArray']} props.suiteArray
|
|
20
|
+
* - Array of objects containing the suite applications.
|
|
21
|
+
*
|
|
22
|
+
* @param {string} [props.className]
|
|
23
|
+
* - Optional CSS class name for the suiteLauncher component.
|
|
24
|
+
*
|
|
25
|
+
* @param {string} [props.soonText]
|
|
26
|
+
* - Optional text to display when a suite application is available soon. It should be a translated string. Defaults to "Soon".
|
|
27
|
+
*
|
|
28
|
+
* @returns {JSX.Element}
|
|
29
|
+
* - The rendered suiteLauncher component.
|
|
30
|
+
*/
|
|
31
|
+
export default function SuiteLauncher({ className, suiteArray, soonText, }: Readonly<SuiteLauncherProps>): JSX.Element;
|