@lax-wp/design-system 0.3.17 → 0.3.18
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/data-display/access-denied-modal/AccessDeniedModal.d.ts +21 -0
- package/dist/components/data-display/delete-modal/DeleteModal.d.ts +40 -0
- package/dist/components/data-display/dynamic-data-modal/DynamicDataModal.d.ts +26 -0
- package/dist/components/data-display/error-modal/ErrorModal.d.ts +22 -0
- package/dist/components/data-display/in-progress/InProgress.d.ts +13 -0
- package/dist/components/data-display/unsaved-changes-modal/UnsavedChangesModal.d.ts +30 -0
- package/dist/components/icons/CheckSmallIcon.d.ts +7 -0
- package/dist/components/icons/ComingSoonIcon.d.ts +7 -0
- package/dist/components/icons/LaxIcon.d.ts +6 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.es.js +8023 -7605
- package/dist/index.umd.js +91 -91
- package/dist/utils/messageConstants.d.ts +72 -0
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
export interface AccessDeniedModalProps {
|
|
3
|
+
title: string;
|
|
4
|
+
visible: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
content: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* AccessDeniedModal component for displaying access denied messages
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <AccessDeniedModal
|
|
14
|
+
* title="Access Denied"
|
|
15
|
+
* visible={isOpen}
|
|
16
|
+
* onClose={() => setIsOpen(false)}
|
|
17
|
+
* content="You don't have permission to access this resource."
|
|
18
|
+
* />
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare const AccessDeniedModal: FC<AccessDeniedModalProps>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
export interface DeleteModalProps {
|
|
3
|
+
visible: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
onSuccessClose?: () => void;
|
|
6
|
+
sectionName?: string;
|
|
7
|
+
suffix?: string;
|
|
8
|
+
onAgreementDelete?: () => void;
|
|
9
|
+
from?: string;
|
|
10
|
+
text: string;
|
|
11
|
+
additionalText?: string;
|
|
12
|
+
title: string;
|
|
13
|
+
deleteConfirm?: () => void;
|
|
14
|
+
onDeleteConfirm?: () => void;
|
|
15
|
+
onConfirmDelete?: () => void;
|
|
16
|
+
isLoading?: boolean;
|
|
17
|
+
isMod?: boolean;
|
|
18
|
+
isBooleanButton?: boolean;
|
|
19
|
+
cancelText?: string;
|
|
20
|
+
deleteText?: string;
|
|
21
|
+
yesText?: string;
|
|
22
|
+
noText?: string;
|
|
23
|
+
removeText?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* DeleteModal component for confirming delete operations
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```tsx
|
|
30
|
+
* <DeleteModal
|
|
31
|
+
* visible={isOpen}
|
|
32
|
+
* onClose={() => setIsOpen(false)}
|
|
33
|
+
* title="Delete Item"
|
|
34
|
+
* text="Are you sure you want to delete"
|
|
35
|
+
* sectionName="this item"
|
|
36
|
+
* onConfirmDelete={handleDelete}
|
|
37
|
+
* />
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export declare const DeleteModal: FC<DeleteModalProps>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
export declare const TABS: readonly ["JSON", "Grid"];
|
|
3
|
+
export type TTabKey = (typeof TABS)[number];
|
|
4
|
+
export interface DynamicDataModalProps {
|
|
5
|
+
isVisible: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
onChange: (value: string) => void;
|
|
8
|
+
defaultValue: string;
|
|
9
|
+
title?: string;
|
|
10
|
+
saveText?: string;
|
|
11
|
+
width?: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* DynamicDataModal component for editing JSON data
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* <DynamicDataModal
|
|
19
|
+
* isVisible={isOpen}
|
|
20
|
+
* onClose={() => setIsOpen(false)}
|
|
21
|
+
* onChange={handleChange}
|
|
22
|
+
* defaultValue={jsonData}
|
|
23
|
+
* />
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare const DynamicDataModal: FC<DynamicDataModalProps>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
export interface ErrorModalProps {
|
|
3
|
+
visible: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
content?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
okText?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* ErrorModal component for displaying error messages
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <ErrorModal
|
|
15
|
+
* visible={isOpen}
|
|
16
|
+
* onClose={() => setIsOpen(false)}
|
|
17
|
+
* title="Error"
|
|
18
|
+
* content="An error occurred while processing your request."
|
|
19
|
+
* />
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare const ErrorModal: FC<ErrorModalProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
export interface InProgressProps {
|
|
3
|
+
containerClass?: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* InProgress component for displaying a coming soon message
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <InProgress containerClass="custom-class" />
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export declare const InProgress: FC<InProgressProps>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
export interface UnsavedChangesModalProps {
|
|
3
|
+
visible: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
onSaveAndExit: () => void;
|
|
6
|
+
onDiscardChanges: () => void;
|
|
7
|
+
onCancel: () => void;
|
|
8
|
+
isLoading?: boolean;
|
|
9
|
+
title?: string;
|
|
10
|
+
content?: string;
|
|
11
|
+
cancelText?: string;
|
|
12
|
+
discardText?: string;
|
|
13
|
+
saveText?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* UnsavedChangesModal component for prompting users about unsaved changes
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <UnsavedChangesModal
|
|
21
|
+
* visible={isOpen}
|
|
22
|
+
* onClose={() => setIsOpen(false)}
|
|
23
|
+
* onSaveAndExit={handleSave}
|
|
24
|
+
* onDiscardChanges={handleDiscard}
|
|
25
|
+
* onCancel={handleCancel}
|
|
26
|
+
* isLoading={isSaving}
|
|
27
|
+
* />
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare const UnsavedChangesModal: FC<UnsavedChangesModalProps>;
|
package/dist/index.d.ts
CHANGED
|
@@ -62,6 +62,22 @@ export { useTheme } from "./hooks/useTheme";
|
|
|
62
62
|
export { parseJson, filterTopLevelPaths, randomHexString } from "./utils/utilities";
|
|
63
63
|
export { systemMessages } from "./utils/messageConstants";
|
|
64
64
|
export { formatCurrency, formatDate, formatBooleanValue, isISODateString } from "./utils/formatters";
|
|
65
|
+
export { LaxIcon } from "./components/icons/LaxIcon";
|
|
66
|
+
export { ComingSoonIcon } from "./components/icons/ComingSoonIcon";
|
|
67
|
+
export { CheckSmallIcon } from "./components/icons/CheckSmallIcon";
|
|
68
|
+
export type { IconProps } from "./components/icons/LaxIcon";
|
|
69
|
+
export { AccessDeniedModal } from "./components/data-display/access-denied-modal/AccessDeniedModal";
|
|
70
|
+
export type { AccessDeniedModalProps } from "./components/data-display/access-denied-modal/AccessDeniedModal";
|
|
71
|
+
export { InProgress } from "./components/data-display/in-progress/InProgress";
|
|
72
|
+
export type { InProgressProps } from "./components/data-display/in-progress/InProgress";
|
|
73
|
+
export { UnsavedChangesModal } from "./components/data-display/unsaved-changes-modal/UnsavedChangesModal";
|
|
74
|
+
export type { UnsavedChangesModalProps } from "./components/data-display/unsaved-changes-modal/UnsavedChangesModal";
|
|
75
|
+
export { ErrorModal } from "./components/data-display/error-modal/ErrorModal";
|
|
76
|
+
export type { ErrorModalProps } from "./components/data-display/error-modal/ErrorModal";
|
|
77
|
+
export { DynamicDataModal } from "./components/data-display/dynamic-data-modal/DynamicDataModal";
|
|
78
|
+
export type { DynamicDataModalProps, TTabKey as DynamicDataModalTabKey } from "./components/data-display/dynamic-data-modal/DynamicDataModal";
|
|
79
|
+
export { DeleteModal } from "./components/data-display/delete-modal/DeleteModal";
|
|
80
|
+
export type { DeleteModalProps } from "./components/data-display/delete-modal/DeleteModal";
|
|
65
81
|
export type { JsonValue, JsonObject, JsonArray, Tab as CodeEditorTab, ThemeContextType, PythonError, JsonGridContextType } from "./types";
|
|
66
82
|
export { DiffViewer, InlineDiffHighlighter, } from "./components/data-display/diff-viewer/DiffViewer";
|
|
67
83
|
export type { DiffViewerProps, DiffType, DiffTheme, } from "./components/data-display/diff-viewer/DiffViewer";
|