kiban-design-system 1.1.9 → 1.1.10

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.
@@ -0,0 +1,21 @@
1
+ import type { FileUploadProps } from './FileUpload.props';
2
+ import './FileUpload.styles.scss';
3
+ /**
4
+ * FileUpload component with drag and drop functionality
5
+ *
6
+ * @example
7
+ * <FileUpload
8
+ * label="Upload File"
9
+ * iconName="Upload"
10
+ * title="Drag & drop files here"
11
+ * subtitle="Or click to browse"
12
+ * value={files}
13
+ * onValueChange={setFiles}
14
+ * maxFiles={5}
15
+ * maxSize={5 * 1024 * 1024}
16
+ * accept=".csv"
17
+ * multiple
18
+ * />
19
+ */
20
+ declare const FileUpload: ({ label, iconName, title, subtitle, value, onValueChange, maxFiles, maxSize, accept, multiple, disabled, onFileReject, onFileRemove, onDrop, ariaLabel, }: FileUploadProps) => import("react/jsx-runtime").JSX.Element;
21
+ export default FileUpload;
@@ -0,0 +1,63 @@
1
+ import type { IconName } from '../Icon';
2
+ export interface FileUploadProps {
3
+ /**
4
+ * Label text displayed above the file upload area
5
+ */
6
+ label?: string;
7
+ /**
8
+ * Icon name to display in the dropzone (passed to Icon component)
9
+ */
10
+ iconName?: IconName;
11
+ /**
12
+ * Title text displayed in the dropzone
13
+ */
14
+ title?: string;
15
+ /**
16
+ * Subtitle text displayed in the dropzone
17
+ */
18
+ subtitle?: string;
19
+ /**
20
+ * Controlled value - array of files
21
+ */
22
+ value?: File[];
23
+ /**
24
+ * Callback when files change
25
+ */
26
+ onValueChange?: (files: File[]) => void;
27
+ /**
28
+ * Maximum number of files allowed
29
+ */
30
+ maxFiles?: number;
31
+ /**
32
+ * Maximum file size in bytes
33
+ */
34
+ maxSize?: number;
35
+ /**
36
+ * Accepted file types (e.g., ".csv", "image/*")
37
+ */
38
+ accept?: string;
39
+ /**
40
+ * Allow multiple file selection
41
+ */
42
+ multiple?: boolean;
43
+ /**
44
+ * Disable the component
45
+ */
46
+ disabled?: boolean;
47
+ /**
48
+ * Callback when a file is rejected (validation failed)
49
+ */
50
+ onFileReject?: (file: File, message: string) => void;
51
+ /**
52
+ * Callback when a file is removed
53
+ */
54
+ onFileRemove?: (file: File) => void;
55
+ /**
56
+ * Callback when files are dropped
57
+ */
58
+ onDrop?: (files: File[]) => void;
59
+ /**
60
+ * Aria label for accessibility
61
+ */
62
+ ariaLabel?: string;
63
+ }
@@ -0,0 +1,3 @@
1
+ export * from './FileUpload.props';
2
+ import FileUpload from './FileUpload';
3
+ export { FileUpload };
@@ -66,6 +66,7 @@ export * from "./Toggle";
66
66
  export * from "./DynamicForm";
67
67
  export * from "./EmptyState";
68
68
  export * from "./FileDownloader";
69
+ export * from "./FileUpload";
69
70
  export * from "./Label";
70
71
  export * from "./SortableList";
71
72
  export * from "./FilterControl";