11import { OverridableProps } from "@unlimited-react-components/kernel" ;
2- import { FileListProps } from "../../../file-item/components/FileList/FileListProps" ;
2+ import { FileItemContainerProps } from "../../../file-item/components/FileItemContainer/FileItemContainerProps" ;
3+ import { FileValidated } from "../utils/validation.utils" ;
34export interface DropzoneProps extends OverridableProps {
45 /**
56 * What to do when Drop event is triggered
@@ -78,7 +79,6 @@ export interface DropzoneProps extends OverridableProps {
7879 /**
7980 * The current number of valid files
8081 */
81- numberOfValidFiles ?: number ;
8282 /**
8383 * If present will make change view visible
8484 * and also return the selected view mode
@@ -87,7 +87,7 @@ export interface DropzoneProps extends OverridableProps {
8787 /**
8888 * The current view
8989 */
90- view ?: FileListProps [ "view" ] ;
90+ view ?: FileItemContainerProps [ "view" ] ;
9191 /**
9292 * The max height of the container
9393 * in string format
@@ -108,5 +108,36 @@ export interface DropzoneProps extends OverridableProps {
108108 * if true, shows the dropzone footer
109109 */
110110 header ?: boolean ;
111+ /**
112+ * Just like any other input component
113+ * the value prop is the current value
114+ */
115+ value ?: FileValidated [ ] ;
116+ /**
117+ * In both cases of uploading (onDropUpload, or with clicking upload button)
118+ * This event is the result one by one of the uploading process
119+ */
120+ onUploading ?: ( files : FileValidated [ ] ) => void ;
121+ /**
122+ * A message to show in the footer when the uploading process happens
123+ */
124+ uploadingMessage ?: string ;
125+ /**
126+ * The onChange Event occurs when the value is changed
127+ */
128+ onChange ?: ( files : FileValidated [ ] ) => void ;
129+ /**
130+ * The behaviuor on drop files
131+ */
132+ behaviour ?: "add" | "replace" ;
133+ /**
134+ * Label to place when no files selected
135+ */
136+ label ?: string ;
137+ /**
138+ * Use this prop only in development mode
139+ * This will make dropzone to simulate a server upload
140+ */
141+ fakeUploading ?: boolean ;
111142}
112143export declare const DropzonePropsDefault : DropzoneProps ;
0 commit comments