@lax-wp/design-system 0.3.85 → 0.3.87
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/button/ButtonGroup.d.ts +6 -0
- package/dist/components/cards/card-header-view/CardHeaderView.d.ts +33 -0
- package/dist/components/cards/card-header-view/index.d.ts +2 -0
- package/dist/components/cards/card-main/CardMain.d.ts +25 -0
- package/dist/components/cards/card-main/index.d.ts +2 -0
- package/dist/components/cards/tab-content/TabContent.d.ts +30 -0
- package/dist/components/cards/tab-content/index.d.ts +2 -0
- package/dist/components/drag-and-drop/drag-overlay/DragOverlay.d.ts +25 -0
- package/dist/components/drag-and-drop/drag-overlay/index.d.ts +2 -0
- package/dist/components/drag-and-drop/draggable-container/DraggableContainer.d.ts +29 -0
- package/dist/components/drag-and-drop/draggable-container/index.d.ts +2 -0
- package/dist/components/modal/confirm-popup/ConfirmPopUp.d.ts +26 -0
- package/dist/components/modal/confirm-popup/index.d.ts +2 -0
- package/dist/components/modal/drawer/Drawer.d.ts +45 -0
- package/dist/components/modal/drawer/index.d.ts +2 -0
- package/dist/components/navigation/accordion/Accordion.d.ts +39 -0
- package/dist/components/navigation/accordion/index.d.ts +2 -0
- package/dist/components/navigation/stepper/Stepper.d.ts +45 -0
- package/dist/components/navigation/stepper/index.d.ts +2 -0
- package/dist/components/sidebar/Sidebar.d.ts +15 -0
- package/dist/components/sidebar/index.d.ts +2 -0
- package/dist/components/user-avatar/PersonIcon.d.ts +7 -0
- package/dist/components/user-avatar/StatusInfoRow.d.ts +5 -0
- package/dist/components/user-avatar/UserAvatar.d.ts +51 -0
- package/dist/components/user-avatar/UserAvatarPopper.d.ts +11 -0
- package/dist/components/user-avatar/constants.d.ts +8 -0
- package/dist/components/user-avatar/index.d.ts +9 -0
- package/dist/components/user-avatar/useDynamicPosition.d.ts +13 -0
- package/dist/index.d.ts +24 -2
- package/dist/index.es.js +21370 -17608
- package/dist/index.umd.js +102 -98
- package/package.json +3 -2
- package/dist/components/forms/file-upload/FileUpload.d.ts +0 -81
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lax-wp/design-system",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.87",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.umd.js",
|
|
7
7
|
"module": "dist/index.es.js",
|
|
@@ -70,7 +70,8 @@
|
|
|
70
70
|
"framer-motion": "^10.0.0 || ^11.0.0 || ^12.0.0",
|
|
71
71
|
"react": "^18.2.0 || ^19.0.0",
|
|
72
72
|
"react-dom": "^18.2.0 || ^19.0.0",
|
|
73
|
-
"react-i18next": "^14.0.0"
|
|
73
|
+
"react-i18next": "^14.0.0",
|
|
74
|
+
"react-router-dom": "^7.1.0"
|
|
74
75
|
},
|
|
75
76
|
"devDependencies": {
|
|
76
77
|
"@chromatic-com/storybook": "^4.0.1",
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* File upload size options
|
|
4
|
-
*/
|
|
5
|
-
export type FileUploadSize = "small" | "medium" | "large";
|
|
6
|
-
/**
|
|
7
|
-
* File upload variant options
|
|
8
|
-
*/
|
|
9
|
-
export type FileUploadVariant = "primary" | "secondary";
|
|
10
|
-
/**
|
|
11
|
-
* Props for the FileUpload component
|
|
12
|
-
*/
|
|
13
|
-
export interface FileUploadProps {
|
|
14
|
-
/** Unique identifier for the file upload */
|
|
15
|
-
id?: string;
|
|
16
|
-
/** Callback function called when file is selected */
|
|
17
|
-
onFileSelect: (file: File | File[] | null, fileName?: string) => void;
|
|
18
|
-
/** Custom upload handler function */
|
|
19
|
-
onUpload?: (file: File | File[]) => Promise<void>;
|
|
20
|
-
/** Description text to display */
|
|
21
|
-
description?: string;
|
|
22
|
-
/** Error message to display */
|
|
23
|
-
errorMessage?: string;
|
|
24
|
-
/** Whether the upload is disabled */
|
|
25
|
-
disabled?: boolean;
|
|
26
|
-
/** Default file to display */
|
|
27
|
-
defaultFile?: File | null;
|
|
28
|
-
/** Accepted file types (e.g., ".pdf,.doc,.docx") */
|
|
29
|
-
acceptedFiles?: string;
|
|
30
|
-
/** Whether the upload is in loading state */
|
|
31
|
-
isLoading?: boolean;
|
|
32
|
-
/** Whether to convert file to base64 */
|
|
33
|
-
asBase64?: boolean;
|
|
34
|
-
/** Whether to allow multiple file selection */
|
|
35
|
-
multiple?: boolean;
|
|
36
|
-
/** Whether to hide the selected file display */
|
|
37
|
-
hideSelectedFile?: boolean;
|
|
38
|
-
/** Callback when file is deleted */
|
|
39
|
-
onDelete?: () => void;
|
|
40
|
-
/** Maximum file size in bytes (default: 200MB) */
|
|
41
|
-
maxSize?: number;
|
|
42
|
-
/** Additional CSS classes for the wrapper container */
|
|
43
|
-
wrapperClassName?: string;
|
|
44
|
-
/** Additional CSS classes for the upload area */
|
|
45
|
-
uploadClassName?: string;
|
|
46
|
-
/** Size variant for the upload area */
|
|
47
|
-
size?: FileUploadSize;
|
|
48
|
-
/** Visual variant for the upload area */
|
|
49
|
-
variant?: FileUploadVariant;
|
|
50
|
-
/** Custom upload icon */
|
|
51
|
-
uploadIcon?: ReactNode;
|
|
52
|
-
/** Custom delete icon */
|
|
53
|
-
deleteIcon?: ReactNode;
|
|
54
|
-
/** Custom file type icons */
|
|
55
|
-
fileTypeIcons?: {
|
|
56
|
-
pdf?: ReactNode;
|
|
57
|
-
default?: ReactNode;
|
|
58
|
-
};
|
|
59
|
-
/** Whether to show file size */
|
|
60
|
-
showFileSize?: boolean;
|
|
61
|
-
/** Whether to show upload progress */
|
|
62
|
-
showProgress?: boolean;
|
|
63
|
-
/** Upload progress percentage */
|
|
64
|
-
progress?: number;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* A highly customizable file upload component with drag-and-drop support.
|
|
68
|
-
* Features multiple sizes, variants, file type detection, and comprehensive styling options.
|
|
69
|
-
*
|
|
70
|
-
* @example
|
|
71
|
-
* ```tsx
|
|
72
|
-
* <FileUpload
|
|
73
|
-
* id="document-upload"
|
|
74
|
-
* onFileSelect={(file) => console.log('File selected:', file)}
|
|
75
|
-
* description="Upload your document here"
|
|
76
|
-
* acceptedFiles=".pdf,.doc,.docx"
|
|
77
|
-
* maxSize={10 * 1024 * 1024} // 10MB
|
|
78
|
-
* />
|
|
79
|
-
* ```
|
|
80
|
-
*/
|
|
81
|
-
export declare const FileUpload: import("react").ForwardRefExoticComponent<FileUploadProps & import("react").RefAttributes<HTMLDivElement>>;
|