@spark-ui/components 11.5.0 → 11.6.0

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.
Files changed (44) hide show
  1. package/dist/alert-dialog/index.mjs +3 -3
  2. package/dist/avatar/index.d.mts +2 -2
  3. package/dist/avatar/index.d.ts +2 -2
  4. package/dist/avatar/index.mjs +2 -2
  5. package/dist/button/index.mjs +1 -1
  6. package/dist/carousel/index.mjs +2 -2
  7. package/dist/{chunk-HEKSVWYW.mjs → chunk-2YM6GKWW.mjs} +2 -1
  8. package/dist/{chunk-TKAU6SMC.mjs → chunk-7EWSMIZU.mjs} +21 -4
  9. package/dist/chunk-7EWSMIZU.mjs.map +1 -0
  10. package/dist/{chunk-XYK6V3JF.mjs → chunk-DCXWGQVZ.mjs} +2 -2
  11. package/dist/{chunk-D7YBYT5H.mjs → chunk-GPJMLIHC.mjs} +2 -2
  12. package/dist/{chunk-2BSBKLHG.mjs → chunk-WLI4EPS6.mjs} +2 -2
  13. package/dist/combobox/index.mjs +3 -3
  14. package/dist/dialog/index.mjs +3 -3
  15. package/dist/docgen.json +344 -65
  16. package/dist/drawer/index.mjs +2 -2
  17. package/dist/dropdown/index.mjs +3 -3
  18. package/dist/file-upload/index.d.mts +51 -32
  19. package/dist/file-upload/index.d.ts +51 -32
  20. package/dist/file-upload/index.js +256 -129
  21. package/dist/file-upload/index.js.map +1 -1
  22. package/dist/file-upload/index.mjs +219 -109
  23. package/dist/file-upload/index.mjs.map +1 -1
  24. package/dist/icon-button/index.mjs +2 -2
  25. package/dist/pagination/index.mjs +2 -2
  26. package/dist/popover/index.mjs +3 -3
  27. package/dist/progress/index.d.mts +6 -2
  28. package/dist/progress/index.d.ts +6 -2
  29. package/dist/progress/index.js +20 -3
  30. package/dist/progress/index.js.map +1 -1
  31. package/dist/progress/index.mjs +1 -1
  32. package/dist/scrolling-list/index.mjs +2 -2
  33. package/dist/snackbar/index.mjs +2 -2
  34. package/dist/stepper/index.mjs +2 -2
  35. package/dist/tabs/index.mjs +1 -1
  36. package/dist/toast/index.d.mts +6 -6
  37. package/dist/toast/index.d.ts +6 -6
  38. package/dist/toast/index.mjs +2 -2
  39. package/package.json +5 -5
  40. package/dist/chunk-TKAU6SMC.mjs.map +0 -1
  41. /package/dist/{chunk-HEKSVWYW.mjs.map → chunk-2YM6GKWW.mjs.map} +0 -0
  42. /package/dist/{chunk-XYK6V3JF.mjs.map → chunk-DCXWGQVZ.mjs.map} +0 -0
  43. /package/dist/{chunk-D7YBYT5H.mjs.map → chunk-GPJMLIHC.mjs.map} +0 -0
  44. /package/dist/{chunk-2BSBKLHG.mjs.map → chunk-WLI4EPS6.mjs.map} +0 -0
@@ -5,6 +5,52 @@ import { ButtonProps } from '../button/index.js';
5
5
  import 'class-variance-authority/types';
6
6
  import 'class-variance-authority';
7
7
 
8
+ /**
9
+ * File upload error codes
10
+ */
11
+ declare const FILE_UPLOAD_ERRORS: {
12
+ /**
13
+ * Exceeds the maxFiles limit
14
+ */
15
+ readonly TOO_MANY_FILES: "TOO_MANY_FILES";
16
+ /**
17
+ * File type not in the accept list
18
+ */
19
+ readonly FILE_INVALID_TYPE: "FILE_INVALID_TYPE";
20
+ /**
21
+ * File size exceeds maxFileSize
22
+ */
23
+ readonly FILE_TOO_LARGE: "FILE_TOO_LARGE";
24
+ /**
25
+ * File size below minFileSize
26
+ */
27
+ readonly FILE_TOO_SMALL: "FILE_TOO_SMALL";
28
+ /**
29
+ * Generic validation failure
30
+ */
31
+ readonly FILE_INVALID: "FILE_INVALID";
32
+ /**
33
+ * Duplicate file detected
34
+ */
35
+ readonly FILE_EXISTS: "FILE_EXISTS";
36
+ };
37
+
38
+ type FileUploadFileError = typeof FILE_UPLOAD_ERRORS.TOO_MANY_FILES | typeof FILE_UPLOAD_ERRORS.FILE_INVALID_TYPE | typeof FILE_UPLOAD_ERRORS.FILE_TOO_LARGE | typeof FILE_UPLOAD_ERRORS.FILE_TOO_SMALL | typeof FILE_UPLOAD_ERRORS.FILE_INVALID | typeof FILE_UPLOAD_ERRORS.FILE_EXISTS;
39
+ interface RejectedFile$1 {
40
+ file: File;
41
+ errors: FileUploadFileError[];
42
+ }
43
+ interface FileAcceptDetails {
44
+ files: File[];
45
+ }
46
+ interface FileRejectDetails {
47
+ files: RejectedFile$1[];
48
+ }
49
+ interface FileChangeDetails {
50
+ acceptedFiles: File[];
51
+ rejectedFiles: RejectedFile$1[];
52
+ }
53
+
8
54
  interface FileUploadProps {
9
55
  /**
10
56
  * Change the default rendered element for the one passed as a child, merging their props and behavior.
@@ -82,31 +128,12 @@ interface FileUploadProps {
82
128
  */
83
129
  locale?: string;
84
130
  }
85
- type FileUploadFileError = 'TOO_MANY_FILES' | 'FILE_INVALID_TYPE' | 'FILE_TOO_LARGE' | 'FILE_TOO_SMALL' | 'FILE_INVALID' | 'FILE_EXISTS';
86
- interface RejectedFile$1 {
87
- file: File;
88
- errors: FileUploadFileError[];
89
- }
90
- interface FileAcceptDetails {
91
- files: File[];
92
- }
93
- interface FileRejectDetails {
94
- files: RejectedFile$1[];
95
- }
96
- interface FileChangeDetails {
97
- acceptedFiles: File[];
98
- rejectedFiles: RejectedFile$1[];
99
- }
100
131
  declare const FileUpload$1: {
101
132
  ({ asChild: _asChild, children, defaultValue, value: controlledValue, onFileAccept, onFileReject, onFileChange, multiple, accept, maxFiles, maxFileSize, minFileSize, disabled: disabledProp, readOnly: readOnlyProp, locale, }: FileUploadProps): react_jsx_runtime.JSX.Element;
102
133
  displayName: string;
103
134
  };
104
135
 
105
136
  interface FileUploadAcceptedFileProps extends ComponentPropsWithoutRef<'li'> {
106
- /**
107
- * Change the default rendered element for the one passed as a child, merging their props and behavior.
108
- */
109
- asChild?: boolean;
110
137
  ref?: Ref<HTMLLIElement>;
111
138
  /**
112
139
  * The file to display
@@ -127,7 +154,7 @@ interface FileUploadAcceptedFileProps extends ComponentPropsWithoutRef<'li'> {
127
154
  className?: string;
128
155
  }
129
156
  declare const AcceptedFile: {
130
- ({ asChild: _asChild, className, file, uploadProgress, deleteButtonAriaLabel, progressAriaLabel, ...props }: FileUploadAcceptedFileProps): react_jsx_runtime.JSX.Element;
157
+ ({ className, file, uploadProgress, deleteButtonAriaLabel, progressAriaLabel, ...props }: FileUploadAcceptedFileProps): react_jsx_runtime.JSX.Element;
131
158
  displayName: string;
132
159
  };
133
160
 
@@ -168,10 +195,6 @@ declare const ItemDeleteTrigger: {
168
195
  };
169
196
 
170
197
  interface FileUploadPreviewImageProps extends ComponentPropsWithoutRef<'div'> {
171
- /**
172
- * Change the default rendered element for the one passed as a child, merging their props and behavior.
173
- */
174
- asChild?: boolean;
175
198
  ref?: Ref<HTMLDivElement>;
176
199
  className?: string;
177
200
  /**
@@ -184,15 +207,11 @@ interface FileUploadPreviewImageProps extends ComponentPropsWithoutRef<'div'> {
184
207
  fallback?: React.ReactNode;
185
208
  }
186
209
  declare const PreviewImage: {
187
- ({ asChild: _asChild, className, file, fallback, ...props }: FileUploadPreviewImageProps): react_jsx_runtime.JSX.Element;
210
+ ({ className, file, fallback, ...props }: FileUploadPreviewImageProps): react_jsx_runtime.JSX.Element;
188
211
  displayName: string;
189
212
  };
190
213
 
191
214
  interface FileUploadRejectedFileProps extends ComponentPropsWithoutRef<'li'> {
192
- /**
193
- * Change the default rendered element for the one passed as a child, merging their props and behavior.
194
- */
195
- asChild?: boolean;
196
215
  ref?: Ref<HTMLLIElement>;
197
216
  /**
198
217
  * The rejected file to display
@@ -211,7 +230,7 @@ interface FileUploadRejectedFileProps extends ComponentPropsWithoutRef<'li'> {
211
230
  className?: string;
212
231
  }
213
232
  declare const RejectedFile: {
214
- ({ asChild: _asChild, className, rejectedFile, renderError, deleteButtonAriaLabel, ...props }: FileUploadRejectedFileProps): react_jsx_runtime.JSX.Element;
233
+ ({ className, rejectedFile, renderError, deleteButtonAriaLabel, ...props }: FileUploadRejectedFileProps): react_jsx_runtime.JSX.Element;
215
234
  displayName: string;
216
235
  };
217
236
 
@@ -233,7 +252,7 @@ interface FileUploadTriggerProps extends Omit<ButtonProps, 'children' | 'disable
233
252
  unstyled?: boolean;
234
253
  }
235
254
  declare const Trigger: {
236
- ({ className, children, asChild, unstyled, design, intent, ref, ...props }: FileUploadTriggerProps): react_jsx_runtime.JSX.Element;
255
+ ({ className, children, asChild, unstyled, design, intent, size, shape, ref, ...props }: FileUploadTriggerProps): react_jsx_runtime.JSX.Element;
237
256
  displayName: string;
238
257
  };
239
258
 
@@ -248,4 +267,4 @@ declare const FileUpload: typeof FileUpload$1 & {
248
267
  RejectedFileDeleteTrigger: typeof RejectedFileDeleteTrigger;
249
268
  };
250
269
 
251
- export { type FileAcceptDetails, type FileChangeDetails, type FileRejectDetails, FileUpload, type FileUploadFileError, type RejectedFile$1 as RejectedFile };
270
+ export { FILE_UPLOAD_ERRORS, type FileAcceptDetails, type FileChangeDetails, type FileRejectDetails, FileUpload, type FileUploadFileError, type RejectedFile$1 as RejectedFile };