@prosperitainova/mirage-ui 1.1.58 → 1.1.62
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/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/lib/Dropzone/Dropzone.d.ts +11 -2
- package/dist/cjs/types/lib/Toggle/Toggle.d.ts +2 -2
- package/dist/cjs/types/lib/Toggle/Toggle.stories.d.ts +1 -0
- package/dist/esm/index.js +4 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/lib/Dropzone/Dropzone.d.ts +11 -2
- package/dist/esm/types/lib/Toggle/Toggle.d.ts +2 -2
- package/dist/esm/types/lib/Toggle/Toggle.stories.d.ts +1 -0
- package/dist/index.d.ts +13 -4
- package/package.json +1 -1
|
@@ -2,11 +2,20 @@ import { DropzoneProps as DropzoneRootProps } from "react-dropzone";
|
|
|
2
2
|
import "../../../src/theme/fonts/ProximaNova.css";
|
|
3
3
|
interface DropzoneRootPropsLite extends Omit<DropzoneRootProps, "onDrop"> {
|
|
4
4
|
}
|
|
5
|
+
type UploadedFileProps = {
|
|
6
|
+
name: string;
|
|
7
|
+
url: string;
|
|
8
|
+
};
|
|
9
|
+
type DropzoneFileProps = File & {
|
|
10
|
+
preview: string;
|
|
11
|
+
};
|
|
5
12
|
export interface DropzoneProps extends DropzoneRootPropsLite {
|
|
6
13
|
error?: string;
|
|
7
14
|
helper?: string;
|
|
8
|
-
|
|
9
|
-
|
|
15
|
+
uploadedFiles: UploadedFileProps[];
|
|
16
|
+
onRemoveUploadedFile?: (removedIndex: number) => void;
|
|
17
|
+
onRemoveFile?: (removedIndex: number) => void;
|
|
18
|
+
onFilesChanged?: (files: DropzoneFileProps[]) => void;
|
|
10
19
|
}
|
|
11
20
|
declare const Dropzone: (props: DropzoneProps) => JSX.Element;
|
|
12
21
|
export default Dropzone;
|
package/dist/index.d.ts
CHANGED
|
@@ -70,11 +70,20 @@ declare const Checkbox: ({ onChange, ...props }: CheckboxProps) => JSX.Element;
|
|
|
70
70
|
|
|
71
71
|
interface DropzoneRootPropsLite extends Omit<DropzoneProps$1, "onDrop"> {
|
|
72
72
|
}
|
|
73
|
+
type UploadedFileProps = {
|
|
74
|
+
name: string;
|
|
75
|
+
url: string;
|
|
76
|
+
};
|
|
77
|
+
type DropzoneFileProps = File & {
|
|
78
|
+
preview: string;
|
|
79
|
+
};
|
|
73
80
|
interface DropzoneProps extends DropzoneRootPropsLite {
|
|
74
81
|
error?: string;
|
|
75
82
|
helper?: string;
|
|
76
|
-
|
|
77
|
-
|
|
83
|
+
uploadedFiles: UploadedFileProps[];
|
|
84
|
+
onRemoveUploadedFile?: (removedIndex: number) => void;
|
|
85
|
+
onRemoveFile?: (removedIndex: number) => void;
|
|
86
|
+
onFilesChanged?: (files: DropzoneFileProps[]) => void;
|
|
78
87
|
}
|
|
79
88
|
declare const Dropzone: (props: DropzoneProps) => JSX.Element;
|
|
80
89
|
|
|
@@ -262,9 +271,9 @@ declare const Toast: (props: ToastProps) => JSX.Element;
|
|
|
262
271
|
|
|
263
272
|
type ToggleProps = {
|
|
264
273
|
mode: "small" | "large";
|
|
265
|
-
actived?: boolean;
|
|
266
|
-
checked?: boolean;
|
|
267
274
|
disabled?: boolean;
|
|
275
|
+
checked?: boolean;
|
|
276
|
+
onToggle?: () => void;
|
|
268
277
|
};
|
|
269
278
|
declare const Toggle: (props: ToggleProps) => JSX.Element;
|
|
270
279
|
|