@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.
- package/dist/alert-dialog/index.mjs +3 -3
- package/dist/avatar/index.d.mts +2 -2
- package/dist/avatar/index.d.ts +2 -2
- package/dist/avatar/index.mjs +2 -2
- package/dist/button/index.mjs +1 -1
- package/dist/carousel/index.mjs +2 -2
- package/dist/{chunk-HEKSVWYW.mjs → chunk-2YM6GKWW.mjs} +2 -1
- package/dist/{chunk-TKAU6SMC.mjs → chunk-7EWSMIZU.mjs} +21 -4
- package/dist/chunk-7EWSMIZU.mjs.map +1 -0
- package/dist/{chunk-XYK6V3JF.mjs → chunk-DCXWGQVZ.mjs} +2 -2
- package/dist/{chunk-D7YBYT5H.mjs → chunk-GPJMLIHC.mjs} +2 -2
- package/dist/{chunk-2BSBKLHG.mjs → chunk-WLI4EPS6.mjs} +2 -2
- package/dist/combobox/index.mjs +3 -3
- package/dist/dialog/index.mjs +3 -3
- package/dist/docgen.json +344 -65
- package/dist/drawer/index.mjs +2 -2
- package/dist/dropdown/index.mjs +3 -3
- package/dist/file-upload/index.d.mts +51 -32
- package/dist/file-upload/index.d.ts +51 -32
- package/dist/file-upload/index.js +256 -129
- package/dist/file-upload/index.js.map +1 -1
- package/dist/file-upload/index.mjs +219 -109
- package/dist/file-upload/index.mjs.map +1 -1
- package/dist/icon-button/index.mjs +2 -2
- package/dist/pagination/index.mjs +2 -2
- package/dist/popover/index.mjs +3 -3
- package/dist/progress/index.d.mts +6 -2
- package/dist/progress/index.d.ts +6 -2
- package/dist/progress/index.js +20 -3
- package/dist/progress/index.js.map +1 -1
- package/dist/progress/index.mjs +1 -1
- package/dist/scrolling-list/index.mjs +2 -2
- package/dist/snackbar/index.mjs +2 -2
- package/dist/stepper/index.mjs +2 -2
- package/dist/tabs/index.mjs +1 -1
- package/dist/toast/index.d.mts +6 -6
- package/dist/toast/index.d.ts +6 -6
- package/dist/toast/index.mjs +2 -2
- package/package.json +5 -5
- package/dist/chunk-TKAU6SMC.mjs.map +0 -1
- /package/dist/{chunk-HEKSVWYW.mjs.map → chunk-2YM6GKWW.mjs.map} +0 -0
- /package/dist/{chunk-XYK6V3JF.mjs.map → chunk-DCXWGQVZ.mjs.map} +0 -0
- /package/dist/{chunk-D7YBYT5H.mjs.map → chunk-GPJMLIHC.mjs.map} +0 -0
- /package/dist/{chunk-2BSBKLHG.mjs.map → chunk-WLI4EPS6.mjs.map} +0 -0
package/dist/docgen.json
CHANGED
|
@@ -30524,27 +30524,6 @@
|
|
|
30524
30524
|
"displayName": "FileUpload.AcceptedFile",
|
|
30525
30525
|
"methods": [],
|
|
30526
30526
|
"props": {
|
|
30527
|
-
"asChild": {
|
|
30528
|
-
"defaultValue": {
|
|
30529
|
-
"value": false
|
|
30530
|
-
},
|
|
30531
|
-
"description": "Change the default rendered element for the one passed as a child, merging their props and behavior.",
|
|
30532
|
-
"name": "asChild",
|
|
30533
|
-
"parent": {
|
|
30534
|
-
"fileName": "src/file-upload/FileUploadAcceptedFile.tsx",
|
|
30535
|
-
"name": "FileUploadAcceptedFileProps"
|
|
30536
|
-
},
|
|
30537
|
-
"declarations": [
|
|
30538
|
-
{
|
|
30539
|
-
"fileName": "src/file-upload/FileUploadAcceptedFile.tsx",
|
|
30540
|
-
"name": "FileUploadAcceptedFileProps"
|
|
30541
|
-
}
|
|
30542
|
-
],
|
|
30543
|
-
"required": false,
|
|
30544
|
-
"type": {
|
|
30545
|
-
"name": "boolean"
|
|
30546
|
-
}
|
|
30547
|
-
},
|
|
30548
30527
|
"ref": {
|
|
30549
30528
|
"defaultValue": null,
|
|
30550
30529
|
"description": "",
|
|
@@ -30728,6 +30707,13 @@
|
|
|
30728
30707
|
}
|
|
30729
30708
|
}
|
|
30730
30709
|
},
|
|
30710
|
+
"DropzoneContext": {
|
|
30711
|
+
"tags": {},
|
|
30712
|
+
"description": "",
|
|
30713
|
+
"displayName": "DropzoneContext",
|
|
30714
|
+
"methods": [],
|
|
30715
|
+
"props": {}
|
|
30716
|
+
},
|
|
30731
30717
|
"FileUpload.ItemDeleteTrigger": {
|
|
30732
30718
|
"tags": {},
|
|
30733
30719
|
"description": "",
|
|
@@ -30994,27 +30980,6 @@
|
|
|
30994
30980
|
"displayName": "FileUpload.PreviewImage",
|
|
30995
30981
|
"methods": [],
|
|
30996
30982
|
"props": {
|
|
30997
|
-
"asChild": {
|
|
30998
|
-
"defaultValue": {
|
|
30999
|
-
"value": false
|
|
31000
|
-
},
|
|
31001
|
-
"description": "Change the default rendered element for the one passed as a child, merging their props and behavior.",
|
|
31002
|
-
"name": "asChild",
|
|
31003
|
-
"parent": {
|
|
31004
|
-
"fileName": "src/file-upload/FileUploadPreviewImage.tsx",
|
|
31005
|
-
"name": "FileUploadPreviewImageProps"
|
|
31006
|
-
},
|
|
31007
|
-
"declarations": [
|
|
31008
|
-
{
|
|
31009
|
-
"fileName": "src/file-upload/FileUploadPreviewImage.tsx",
|
|
31010
|
-
"name": "FileUploadPreviewImageProps"
|
|
31011
|
-
}
|
|
31012
|
-
],
|
|
31013
|
-
"required": false,
|
|
31014
|
-
"type": {
|
|
31015
|
-
"name": "boolean"
|
|
31016
|
-
}
|
|
31017
|
-
},
|
|
31018
30983
|
"ref": {
|
|
31019
30984
|
"defaultValue": null,
|
|
31020
30985
|
"description": "",
|
|
@@ -31101,27 +31066,6 @@
|
|
|
31101
31066
|
"displayName": "FileUpload.RejectedFile",
|
|
31102
31067
|
"methods": [],
|
|
31103
31068
|
"props": {
|
|
31104
|
-
"asChild": {
|
|
31105
|
-
"defaultValue": {
|
|
31106
|
-
"value": false
|
|
31107
|
-
},
|
|
31108
|
-
"description": "Change the default rendered element for the one passed as a child, merging their props and behavior.",
|
|
31109
|
-
"name": "asChild",
|
|
31110
|
-
"parent": {
|
|
31111
|
-
"fileName": "src/file-upload/FileUploadRejectedFile.tsx",
|
|
31112
|
-
"name": "FileUploadRejectedFileProps"
|
|
31113
|
-
},
|
|
31114
|
-
"declarations": [
|
|
31115
|
-
{
|
|
31116
|
-
"fileName": "src/file-upload/FileUploadRejectedFile.tsx",
|
|
31117
|
-
"name": "FileUploadRejectedFileProps"
|
|
31118
|
-
}
|
|
31119
|
-
],
|
|
31120
|
-
"required": false,
|
|
31121
|
-
"type": {
|
|
31122
|
-
"name": "boolean"
|
|
31123
|
-
}
|
|
31124
|
-
},
|
|
31125
31069
|
"ref": {
|
|
31126
31070
|
"defaultValue": null,
|
|
31127
31071
|
"description": "",
|
|
@@ -31596,7 +31540,9 @@
|
|
|
31596
31540
|
}
|
|
31597
31541
|
},
|
|
31598
31542
|
"size": {
|
|
31599
|
-
"defaultValue":
|
|
31543
|
+
"defaultValue": {
|
|
31544
|
+
"value": "md"
|
|
31545
|
+
},
|
|
31600
31546
|
"description": "Size of the button.",
|
|
31601
31547
|
"name": "size",
|
|
31602
31548
|
"declarations": [],
|
|
@@ -31666,7 +31612,9 @@
|
|
|
31666
31612
|
}
|
|
31667
31613
|
},
|
|
31668
31614
|
"shape": {
|
|
31669
|
-
"defaultValue":
|
|
31615
|
+
"defaultValue": {
|
|
31616
|
+
"value": "rounded"
|
|
31617
|
+
},
|
|
31670
31618
|
"description": "Shape of the button.",
|
|
31671
31619
|
"name": "shape",
|
|
31672
31620
|
"declarations": [],
|
|
@@ -31756,6 +31704,55 @@
|
|
|
31756
31704
|
}
|
|
31757
31705
|
}
|
|
31758
31706
|
},
|
|
31707
|
+
"FILE_UPLOAD_ERRORS": {
|
|
31708
|
+
"tags": {},
|
|
31709
|
+
"description": "File upload error codes",
|
|
31710
|
+
"displayName": "FILE_UPLOAD_ERRORS",
|
|
31711
|
+
"methods": [],
|
|
31712
|
+
"props": {}
|
|
31713
|
+
},
|
|
31714
|
+
"TOO_MANY_FILES": {
|
|
31715
|
+
"tags": {},
|
|
31716
|
+
"description": "Exceeds the maxFiles limit",
|
|
31717
|
+
"displayName": "TOO_MANY_FILES",
|
|
31718
|
+
"methods": [],
|
|
31719
|
+
"props": {}
|
|
31720
|
+
},
|
|
31721
|
+
"FILE_INVALID_TYPE": {
|
|
31722
|
+
"tags": {},
|
|
31723
|
+
"description": "File type not in the accept list",
|
|
31724
|
+
"displayName": "FILE_INVALID_TYPE",
|
|
31725
|
+
"methods": [],
|
|
31726
|
+
"props": {}
|
|
31727
|
+
},
|
|
31728
|
+
"FILE_TOO_LARGE": {
|
|
31729
|
+
"tags": {},
|
|
31730
|
+
"description": "File size exceeds maxFileSize",
|
|
31731
|
+
"displayName": "FILE_TOO_LARGE",
|
|
31732
|
+
"methods": [],
|
|
31733
|
+
"props": {}
|
|
31734
|
+
},
|
|
31735
|
+
"FILE_TOO_SMALL": {
|
|
31736
|
+
"tags": {},
|
|
31737
|
+
"description": "File size below minFileSize",
|
|
31738
|
+
"displayName": "FILE_TOO_SMALL",
|
|
31739
|
+
"methods": [],
|
|
31740
|
+
"props": {}
|
|
31741
|
+
},
|
|
31742
|
+
"FILE_INVALID": {
|
|
31743
|
+
"tags": {},
|
|
31744
|
+
"description": "Generic validation failure",
|
|
31745
|
+
"displayName": "FILE_INVALID",
|
|
31746
|
+
"methods": [],
|
|
31747
|
+
"props": {}
|
|
31748
|
+
},
|
|
31749
|
+
"FILE_EXISTS": {
|
|
31750
|
+
"tags": {},
|
|
31751
|
+
"description": "Duplicate file detected",
|
|
31752
|
+
"displayName": "FILE_EXISTS",
|
|
31753
|
+
"methods": [],
|
|
31754
|
+
"props": {}
|
|
31755
|
+
},
|
|
31759
31756
|
"uploadFiles": {
|
|
31760
31757
|
"tags": {
|
|
31761
31758
|
"param": "input - The file input element\nfiles - Single file or array of files to upload"
|
|
@@ -31765,6 +31762,269 @@
|
|
|
31765
31762
|
"methods": [],
|
|
31766
31763
|
"props": {}
|
|
31767
31764
|
},
|
|
31765
|
+
"useFileUploadState": {
|
|
31766
|
+
"tags": {},
|
|
31767
|
+
"description": "Hook that manages file upload state, validation, and file operations",
|
|
31768
|
+
"displayName": "useFileUploadState",
|
|
31769
|
+
"methods": [],
|
|
31770
|
+
"props": {
|
|
31771
|
+
"defaultValue": {
|
|
31772
|
+
"defaultValue": {
|
|
31773
|
+
"value": "[]"
|
|
31774
|
+
},
|
|
31775
|
+
"description": "Initial files to display when the component mounts (uncontrolled mode)",
|
|
31776
|
+
"name": "defaultValue",
|
|
31777
|
+
"parent": {
|
|
31778
|
+
"fileName": "components/src/file-upload/useFileUploadState.tsx",
|
|
31779
|
+
"name": "UseFileUploadStateProps"
|
|
31780
|
+
},
|
|
31781
|
+
"declarations": [
|
|
31782
|
+
{
|
|
31783
|
+
"fileName": "components/src/file-upload/useFileUploadState.tsx",
|
|
31784
|
+
"name": "UseFileUploadStateProps"
|
|
31785
|
+
}
|
|
31786
|
+
],
|
|
31787
|
+
"required": false,
|
|
31788
|
+
"type": {
|
|
31789
|
+
"name": "File[]"
|
|
31790
|
+
}
|
|
31791
|
+
},
|
|
31792
|
+
"value": {
|
|
31793
|
+
"defaultValue": null,
|
|
31794
|
+
"description": "Controlled files value (controlled mode)\nWhen provided, the component becomes controlled",
|
|
31795
|
+
"name": "value",
|
|
31796
|
+
"parent": {
|
|
31797
|
+
"fileName": "components/src/file-upload/useFileUploadState.tsx",
|
|
31798
|
+
"name": "UseFileUploadStateProps"
|
|
31799
|
+
},
|
|
31800
|
+
"declarations": [
|
|
31801
|
+
{
|
|
31802
|
+
"fileName": "components/src/file-upload/useFileUploadState.tsx",
|
|
31803
|
+
"name": "UseFileUploadStateProps"
|
|
31804
|
+
}
|
|
31805
|
+
],
|
|
31806
|
+
"required": false,
|
|
31807
|
+
"type": {
|
|
31808
|
+
"name": "File[]"
|
|
31809
|
+
}
|
|
31810
|
+
},
|
|
31811
|
+
"onFileAccept": {
|
|
31812
|
+
"defaultValue": null,
|
|
31813
|
+
"description": "Callback when files are accepted",
|
|
31814
|
+
"name": "onFileAccept",
|
|
31815
|
+
"parent": {
|
|
31816
|
+
"fileName": "components/src/file-upload/useFileUploadState.tsx",
|
|
31817
|
+
"name": "UseFileUploadStateProps"
|
|
31818
|
+
},
|
|
31819
|
+
"declarations": [
|
|
31820
|
+
{
|
|
31821
|
+
"fileName": "components/src/file-upload/useFileUploadState.tsx",
|
|
31822
|
+
"name": "UseFileUploadStateProps"
|
|
31823
|
+
}
|
|
31824
|
+
],
|
|
31825
|
+
"required": false,
|
|
31826
|
+
"type": {
|
|
31827
|
+
"name": "(details: FileAcceptDetails) => void"
|
|
31828
|
+
}
|
|
31829
|
+
},
|
|
31830
|
+
"onFileReject": {
|
|
31831
|
+
"defaultValue": null,
|
|
31832
|
+
"description": "Callback when files are rejected",
|
|
31833
|
+
"name": "onFileReject",
|
|
31834
|
+
"parent": {
|
|
31835
|
+
"fileName": "components/src/file-upload/useFileUploadState.tsx",
|
|
31836
|
+
"name": "UseFileUploadStateProps"
|
|
31837
|
+
},
|
|
31838
|
+
"declarations": [
|
|
31839
|
+
{
|
|
31840
|
+
"fileName": "components/src/file-upload/useFileUploadState.tsx",
|
|
31841
|
+
"name": "UseFileUploadStateProps"
|
|
31842
|
+
}
|
|
31843
|
+
],
|
|
31844
|
+
"required": false,
|
|
31845
|
+
"type": {
|
|
31846
|
+
"name": "(details: FileRejectDetails) => void"
|
|
31847
|
+
}
|
|
31848
|
+
},
|
|
31849
|
+
"onFileChange": {
|
|
31850
|
+
"defaultValue": null,
|
|
31851
|
+
"description": "Callback when files change (both accepted and rejected)\nFor controlled mode, use this to update the value prop by extracting details.acceptedFiles",
|
|
31852
|
+
"name": "onFileChange",
|
|
31853
|
+
"parent": {
|
|
31854
|
+
"fileName": "components/src/file-upload/useFileUploadState.tsx",
|
|
31855
|
+
"name": "UseFileUploadStateProps"
|
|
31856
|
+
},
|
|
31857
|
+
"declarations": [
|
|
31858
|
+
{
|
|
31859
|
+
"fileName": "components/src/file-upload/useFileUploadState.tsx",
|
|
31860
|
+
"name": "UseFileUploadStateProps"
|
|
31861
|
+
}
|
|
31862
|
+
],
|
|
31863
|
+
"required": false,
|
|
31864
|
+
"type": {
|
|
31865
|
+
"name": "(details: FileChangeDetails) => void"
|
|
31866
|
+
}
|
|
31867
|
+
},
|
|
31868
|
+
"multiple": {
|
|
31869
|
+
"defaultValue": {
|
|
31870
|
+
"value": true
|
|
31871
|
+
},
|
|
31872
|
+
"description": "Whether multiple files can be selected",
|
|
31873
|
+
"name": "multiple",
|
|
31874
|
+
"parent": {
|
|
31875
|
+
"fileName": "components/src/file-upload/useFileUploadState.tsx",
|
|
31876
|
+
"name": "UseFileUploadStateProps"
|
|
31877
|
+
},
|
|
31878
|
+
"declarations": [
|
|
31879
|
+
{
|
|
31880
|
+
"fileName": "components/src/file-upload/useFileUploadState.tsx",
|
|
31881
|
+
"name": "UseFileUploadStateProps"
|
|
31882
|
+
}
|
|
31883
|
+
],
|
|
31884
|
+
"required": false,
|
|
31885
|
+
"type": {
|
|
31886
|
+
"name": "boolean"
|
|
31887
|
+
}
|
|
31888
|
+
},
|
|
31889
|
+
"accept": {
|
|
31890
|
+
"defaultValue": null,
|
|
31891
|
+
"description": "Comma-separated list of accepted file types",
|
|
31892
|
+
"name": "accept",
|
|
31893
|
+
"parent": {
|
|
31894
|
+
"fileName": "components/src/file-upload/useFileUploadState.tsx",
|
|
31895
|
+
"name": "UseFileUploadStateProps"
|
|
31896
|
+
},
|
|
31897
|
+
"declarations": [
|
|
31898
|
+
{
|
|
31899
|
+
"fileName": "components/src/file-upload/useFileUploadState.tsx",
|
|
31900
|
+
"name": "UseFileUploadStateProps"
|
|
31901
|
+
}
|
|
31902
|
+
],
|
|
31903
|
+
"required": false,
|
|
31904
|
+
"type": {
|
|
31905
|
+
"name": "string"
|
|
31906
|
+
}
|
|
31907
|
+
},
|
|
31908
|
+
"maxFiles": {
|
|
31909
|
+
"defaultValue": null,
|
|
31910
|
+
"description": "Maximum number of files that can be uploaded",
|
|
31911
|
+
"name": "maxFiles",
|
|
31912
|
+
"parent": {
|
|
31913
|
+
"fileName": "components/src/file-upload/useFileUploadState.tsx",
|
|
31914
|
+
"name": "UseFileUploadStateProps"
|
|
31915
|
+
},
|
|
31916
|
+
"declarations": [
|
|
31917
|
+
{
|
|
31918
|
+
"fileName": "components/src/file-upload/useFileUploadState.tsx",
|
|
31919
|
+
"name": "UseFileUploadStateProps"
|
|
31920
|
+
}
|
|
31921
|
+
],
|
|
31922
|
+
"required": false,
|
|
31923
|
+
"type": {
|
|
31924
|
+
"name": "number"
|
|
31925
|
+
}
|
|
31926
|
+
},
|
|
31927
|
+
"maxFileSize": {
|
|
31928
|
+
"defaultValue": null,
|
|
31929
|
+
"description": "Maximum file size in bytes",
|
|
31930
|
+
"name": "maxFileSize",
|
|
31931
|
+
"parent": {
|
|
31932
|
+
"fileName": "components/src/file-upload/useFileUploadState.tsx",
|
|
31933
|
+
"name": "UseFileUploadStateProps"
|
|
31934
|
+
},
|
|
31935
|
+
"declarations": [
|
|
31936
|
+
{
|
|
31937
|
+
"fileName": "components/src/file-upload/useFileUploadState.tsx",
|
|
31938
|
+
"name": "UseFileUploadStateProps"
|
|
31939
|
+
}
|
|
31940
|
+
],
|
|
31941
|
+
"required": false,
|
|
31942
|
+
"type": {
|
|
31943
|
+
"name": "number"
|
|
31944
|
+
}
|
|
31945
|
+
},
|
|
31946
|
+
"minFileSize": {
|
|
31947
|
+
"defaultValue": null,
|
|
31948
|
+
"description": "Minimum file size in bytes",
|
|
31949
|
+
"name": "minFileSize",
|
|
31950
|
+
"parent": {
|
|
31951
|
+
"fileName": "components/src/file-upload/useFileUploadState.tsx",
|
|
31952
|
+
"name": "UseFileUploadStateProps"
|
|
31953
|
+
},
|
|
31954
|
+
"declarations": [
|
|
31955
|
+
{
|
|
31956
|
+
"fileName": "components/src/file-upload/useFileUploadState.tsx",
|
|
31957
|
+
"name": "UseFileUploadStateProps"
|
|
31958
|
+
}
|
|
31959
|
+
],
|
|
31960
|
+
"required": false,
|
|
31961
|
+
"type": {
|
|
31962
|
+
"name": "number"
|
|
31963
|
+
}
|
|
31964
|
+
},
|
|
31965
|
+
"disabled": {
|
|
31966
|
+
"defaultValue": {
|
|
31967
|
+
"value": false
|
|
31968
|
+
},
|
|
31969
|
+
"description": "When `true`, prevents the user from interacting with the file upload",
|
|
31970
|
+
"name": "disabled",
|
|
31971
|
+
"parent": {
|
|
31972
|
+
"fileName": "components/src/file-upload/useFileUploadState.tsx",
|
|
31973
|
+
"name": "UseFileUploadStateProps"
|
|
31974
|
+
},
|
|
31975
|
+
"declarations": [
|
|
31976
|
+
{
|
|
31977
|
+
"fileName": "components/src/file-upload/useFileUploadState.tsx",
|
|
31978
|
+
"name": "UseFileUploadStateProps"
|
|
31979
|
+
}
|
|
31980
|
+
],
|
|
31981
|
+
"required": false,
|
|
31982
|
+
"type": {
|
|
31983
|
+
"name": "boolean"
|
|
31984
|
+
}
|
|
31985
|
+
},
|
|
31986
|
+
"readOnly": {
|
|
31987
|
+
"defaultValue": {
|
|
31988
|
+
"value": false
|
|
31989
|
+
},
|
|
31990
|
+
"description": "When `true`, sets the file upload to read-only mode",
|
|
31991
|
+
"name": "readOnly",
|
|
31992
|
+
"parent": {
|
|
31993
|
+
"fileName": "components/src/file-upload/useFileUploadState.tsx",
|
|
31994
|
+
"name": "UseFileUploadStateProps"
|
|
31995
|
+
},
|
|
31996
|
+
"declarations": [
|
|
31997
|
+
{
|
|
31998
|
+
"fileName": "components/src/file-upload/useFileUploadState.tsx",
|
|
31999
|
+
"name": "UseFileUploadStateProps"
|
|
32000
|
+
}
|
|
32001
|
+
],
|
|
32002
|
+
"required": false,
|
|
32003
|
+
"type": {
|
|
32004
|
+
"name": "boolean"
|
|
32005
|
+
}
|
|
32006
|
+
},
|
|
32007
|
+
"locale": {
|
|
32008
|
+
"defaultValue": null,
|
|
32009
|
+
"description": "The [BCP47](https://www.ietf.org/rfc/bcp/bcp47.txt) language code for the locale.\nUsed for formatting file sizes and error messages.",
|
|
32010
|
+
"name": "locale",
|
|
32011
|
+
"parent": {
|
|
32012
|
+
"fileName": "components/src/file-upload/useFileUploadState.tsx",
|
|
32013
|
+
"name": "UseFileUploadStateProps"
|
|
32014
|
+
},
|
|
32015
|
+
"declarations": [
|
|
32016
|
+
{
|
|
32017
|
+
"fileName": "components/src/file-upload/useFileUploadState.tsx",
|
|
32018
|
+
"name": "UseFileUploadStateProps"
|
|
32019
|
+
}
|
|
32020
|
+
],
|
|
32021
|
+
"required": false,
|
|
32022
|
+
"type": {
|
|
32023
|
+
"name": "string"
|
|
32024
|
+
}
|
|
32025
|
+
}
|
|
32026
|
+
}
|
|
32027
|
+
},
|
|
31768
32028
|
"validateFileAccept": {
|
|
31769
32029
|
"tags": {},
|
|
31770
32030
|
"description": "Validates if a file matches the accept patterns\nSupports MIME types (e.g., \"image/*\", \"image/png\", \"application/pdf\")\nand file extensions (e.g., \".pdf\", \".doc\", \".jpg\")",
|
|
@@ -35744,6 +36004,25 @@
|
|
|
35744
36004
|
"name": "boolean"
|
|
35745
36005
|
}
|
|
35746
36006
|
},
|
|
36007
|
+
"onComplete": {
|
|
36008
|
+
"defaultValue": null,
|
|
36009
|
+
"description": "Callback called when the progress reaches its maximum value and the transition animation completes.",
|
|
36010
|
+
"name": "onComplete",
|
|
36011
|
+
"parent": {
|
|
36012
|
+
"fileName": "components/src/progress/Progress.tsx",
|
|
36013
|
+
"name": "ProgressProps"
|
|
36014
|
+
},
|
|
36015
|
+
"declarations": [
|
|
36016
|
+
{
|
|
36017
|
+
"fileName": "components/src/progress/Progress.tsx",
|
|
36018
|
+
"name": "ProgressProps"
|
|
36019
|
+
}
|
|
36020
|
+
],
|
|
36021
|
+
"required": false,
|
|
36022
|
+
"type": {
|
|
36023
|
+
"name": "() => void"
|
|
36024
|
+
}
|
|
36025
|
+
},
|
|
35747
36026
|
"ref": {
|
|
35748
36027
|
"defaultValue": null,
|
|
35749
36028
|
"description": "",
|
package/dist/drawer/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
IconButton
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-DCXWGQVZ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
Icon
|
|
6
6
|
} from "../chunk-UMUMFMFB.mjs";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-2YM6GKWW.mjs";
|
|
8
8
|
import "../chunk-GAK4SC2F.mjs";
|
|
9
9
|
import "../chunk-KEGAAGJW.mjs";
|
|
10
10
|
import "../chunk-6QCEPQ3U.mjs";
|
package/dist/dropdown/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Popover
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-GPJMLIHC.mjs";
|
|
4
|
+
import "../chunk-DCXWGQVZ.mjs";
|
|
5
5
|
import {
|
|
6
6
|
Icon
|
|
7
7
|
} from "../chunk-UMUMFMFB.mjs";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-2YM6GKWW.mjs";
|
|
9
9
|
import "../chunk-GAK4SC2F.mjs";
|
|
10
10
|
import {
|
|
11
11
|
VisuallyHidden
|
|
@@ -5,6 +5,52 @@ import { ButtonProps } from '../button/index.mjs';
|
|
|
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
|
-
({
|
|
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
|
-
({
|
|
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
|
-
({
|
|
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 };
|