@delightui/components 0.1.72 → 0.1.74
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/cjs/components/organisms/Dropzone/Dropzone.types.d.ts +9 -8
- package/dist/cjs/library.css +3 -6
- package/dist/cjs/library.js +1 -1
- package/dist/cjs/library.js.map +1 -1
- package/dist/esm/components/organisms/Dropzone/Dropzone.types.d.ts +9 -8
- package/dist/esm/library.css +3 -6
- package/dist/esm/library.js +1 -1
- package/dist/esm/library.js.map +1 -1
- package/dist/index.d.ts +9 -8
- package/package.json +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ButtonProps, IconButtonProps, TextProps } from '../../atoms';
|
|
3
|
+
export type DropzoneStatus = 'Empty' | 'Loading' | 'Uploaded';
|
|
3
4
|
/**
|
|
4
5
|
* Dropzone component props
|
|
5
|
-
* @param
|
|
6
|
-
* @param
|
|
6
|
+
* @param empty React.ReactNode - The empty state of the dropzone.
|
|
7
|
+
* @param loading React.ReactNode - The loading state of the dropzone.
|
|
7
8
|
* @param uploaded React.ReactNode - The uploaded state of the dropzone.
|
|
8
9
|
* @param accept { [key: string]: readonly string[] } - The accepted file types.
|
|
9
10
|
* @param maxSize number - The maximum size of the file in bytes.
|
|
@@ -14,13 +15,13 @@ import { ButtonProps, IconButtonProps, TextProps } from '../../atoms';
|
|
|
14
15
|
export type DropzoneProps = {
|
|
15
16
|
className?: string;
|
|
16
17
|
/**
|
|
17
|
-
* The
|
|
18
|
+
* The empty state of the dropzone.
|
|
18
19
|
*/
|
|
19
|
-
|
|
20
|
+
empty?: React.ReactNode;
|
|
20
21
|
/**
|
|
21
|
-
* The
|
|
22
|
+
* The loading state of the dropzone.
|
|
22
23
|
*/
|
|
23
|
-
|
|
24
|
+
loading?: React.ReactNode;
|
|
24
25
|
/**
|
|
25
26
|
* The uploaded state of the dropzone.
|
|
26
27
|
*/
|
|
@@ -57,7 +58,7 @@ export type DropzoneProps = {
|
|
|
57
58
|
};
|
|
58
59
|
/**
|
|
59
60
|
* Dropzone context type
|
|
60
|
-
* @param status
|
|
61
|
+
* @param status DropzoneStatus - The status of the dropzone.
|
|
61
62
|
* @param file File | null - The file of the dropzone.
|
|
62
63
|
* @param selectFile () => void - The function to call when the file is selected.
|
|
63
64
|
* @param resetUpload () => void - The function to call when the file is reset.
|
|
@@ -66,7 +67,7 @@ export type DropzoneContextType = {
|
|
|
66
67
|
/**
|
|
67
68
|
* The status of the dropzone.
|
|
68
69
|
*/
|
|
69
|
-
status:
|
|
70
|
+
status: DropzoneStatus;
|
|
70
71
|
/**
|
|
71
72
|
* The files of the dropzone.
|
|
72
73
|
*/
|
package/dist/esm/library.css
CHANGED
|
@@ -3771,6 +3771,9 @@ span.flatpickr-weekday {
|
|
|
3771
3771
|
--radio-button-ring-background: var(--radio-button-item-radio-ring-background);
|
|
3772
3772
|
--radio-button-ring-border-color: var(--radio-button-item-radio-ring-border-color);
|
|
3773
3773
|
}
|
|
3774
|
+
.Dropzone-module_dropzone__4uDyI {
|
|
3775
|
+
width: var(--dropzone-width);
|
|
3776
|
+
}
|
|
3774
3777
|
.DropzoneContent-module_dropzoneContent__UjfAn {
|
|
3775
3778
|
width: 100%;
|
|
3776
3779
|
border-width: 1px;
|
|
@@ -24433,8 +24436,6 @@ span.flatpickr-weekday {
|
|
|
24433
24436
|
}
|
|
24434
24437
|
[data-theme='dark'] [component-variant="dropzone-empty"], [data-theme='light'] [component-variant="dropzone-empty"] {
|
|
24435
24438
|
--dropzone-width: 100%;
|
|
24436
|
-
--dropzone-row-gap: var(--spacing-space-5);
|
|
24437
|
-
--dropzone-column-gap: var(--spacing-space-5);
|
|
24438
24439
|
--dropzone-font-family: var(--font-family-body);
|
|
24439
24440
|
--dropzone-font-size: var(--font-size-body-small);
|
|
24440
24441
|
--dropzone-font-weight: var(--font-weight-medium);
|
|
@@ -24444,8 +24445,6 @@ span.flatpickr-weekday {
|
|
|
24444
24445
|
}
|
|
24445
24446
|
[data-theme='dark'] [component-variant="dropzone-loading"], [data-theme='light'] [component-variant="dropzone-loading"] {
|
|
24446
24447
|
--dropzone-width: 100%;
|
|
24447
|
-
--dropzone-row-gap: var(--spacing-space-5);
|
|
24448
|
-
--dropzone-column-gap: var(--spacing-space-5);
|
|
24449
24448
|
--dropzone-font-family: var(--font-family-body);
|
|
24450
24449
|
--dropzone-font-size: var(--font-size-body-small);
|
|
24451
24450
|
--dropzone-font-weight: var(--font-weight-medium);
|
|
@@ -24455,8 +24454,6 @@ span.flatpickr-weekday {
|
|
|
24455
24454
|
}
|
|
24456
24455
|
[data-theme='dark'] [component-variant="dropzone-uploaded"], [data-theme='light'] [component-variant="dropzone-uploaded"] {
|
|
24457
24456
|
--dropzone-width: 100%;
|
|
24458
|
-
--dropzone-row-gap: var(--spacing-space-5);
|
|
24459
|
-
--dropzone-column-gap: var(--spacing-space-5);
|
|
24460
24457
|
--dropzone-font-family: var(--font-family-body);
|
|
24461
24458
|
--dropzone-font-size: var(--font-size-body-small);
|
|
24462
24459
|
--dropzone-font-weight: var(--font-weight-medium);
|