@vlrc-fe/components 2.7.0 → 2.8.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/CHANGELOG.md +25 -0
- package/dist/ConfirmModal.d.ts +2 -3
- package/dist/ConfirmModal.d.ts.map +1 -1
- package/dist/DataTable/components/DataTableFacetedFilter.d.ts.map +1 -1
- package/dist/DataTable/components/DataTablePagination.d.ts.map +1 -1
- package/dist/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/Dropdown/types.d.ts +1 -1
- package/dist/Dropdown/types.d.ts.map +1 -1
- package/dist/Form/FormDatePicker/FormDatePicker.d.ts.map +1 -1
- package/dist/Form/FormDatePicker/MonthPickerPanel.d.ts +2 -1
- package/dist/Form/FormDatePicker/MonthPickerPanel.d.ts.map +1 -1
- package/dist/Form/FormDatePicker/RangeDatePicker.d.ts +7 -1
- package/dist/Form/FormDatePicker/RangeDatePicker.d.ts.map +1 -1
- package/dist/Form/FormDatePicker/SingleDatePicker.d.ts +5 -1
- package/dist/Form/FormDatePicker/SingleDatePicker.d.ts.map +1 -1
- package/dist/Form/FormDatePicker/TimeInput.d.ts.map +1 -1
- package/dist/Form/FormDatePicker/TimePicker.d.ts.map +1 -1
- package/dist/Form/FormDatePicker/types.d.ts +5 -0
- package/dist/Form/FormDatePicker/types.d.ts.map +1 -1
- package/dist/Form/FormFileUpload/index.d.ts.map +1 -1
- package/dist/Form/FormNumberInput/useFormNumberInput.d.ts +2 -2
- package/dist/Form/FormNumberInput/useFormNumberInput.d.ts.map +1 -1
- package/dist/Form/FormSelect/FormSelect.d.ts.map +1 -1
- package/dist/Form/FormSelect/types.d.ts +1 -1
- package/dist/Form/FormSelect/types.d.ts.map +1 -1
- package/dist/Form/FormSelect/useFormSelect.d.ts +1 -1
- package/dist/Form/FormSelect/useFormSelect.d.ts.map +1 -1
- package/dist/MultiSelect/MultiSelect.d.ts +3 -31
- package/dist/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/MultiSelect/renderers.d.ts.map +1 -1
- package/dist/MultiSelect/type.d.ts +1 -0
- package/dist/MultiSelect/type.d.ts.map +1 -1
- package/dist/MultiSelect/useMultiSelect.d.ts.map +1 -1
- package/dist/Select/BaseSelect.d.ts.map +1 -1
- package/dist/Select/MultiSelectTags.d.ts.map +1 -1
- package/dist/Select/type.d.ts +1 -1
- package/dist/Select/type.d.ts.map +1 -1
- package/dist/Typography/Code.d.ts.map +1 -1
- package/dist/Typography/Link.d.ts.map +1 -1
- package/dist/Typography/Paragraph.d.ts.map +1 -1
- package/dist/Typography/Text.d.ts.map +1 -1
- package/dist/Typography/Title.d.ts.map +1 -1
- package/dist/Typography/types.d.ts +37 -1
- package/dist/Typography/types.d.ts.map +1 -1
- package/dist/Typography/utils.d.ts +3 -2
- package/dist/Typography/utils.d.ts.map +1 -1
- package/dist/assets/stylex.css +36 -24
- package/dist/index.cjs +1 -1
- package/dist/index.js +108 -108
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +18 -55
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +89 -89
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +29 -29
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +128 -124
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +16 -16
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +2 -2
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +114 -117
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +95 -92
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +41 -41
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +36 -164
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +1 -1
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +1 -1
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +128 -120
- package/dist/index114.cjs +1 -1
- package/dist/index114.js +151 -151
- package/dist/index116.cjs +1 -1
- package/dist/index116.js +96 -91
- package/dist/index117.cjs +1 -1
- package/dist/index117.js +18 -18
- package/dist/index118.cjs +1 -1
- package/dist/index118.js +2 -2
- package/dist/index119.cjs +1 -1
- package/dist/index119.js +15 -15
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +147 -103
- package/dist/index120.cjs +1 -1
- package/dist/index120.js +10 -10
- package/dist/index121.cjs +1 -1
- package/dist/index121.js +31 -31
- package/dist/index122.cjs +1 -1
- package/dist/index122.js +3 -3
- package/dist/index123.cjs +1 -1
- package/dist/index123.js +2 -2
- package/dist/index124.cjs +1 -1
- package/dist/index124.js +53 -49
- package/dist/index126.cjs +1 -1
- package/dist/index126.js +35 -38
- package/dist/index127.cjs +1 -1
- package/dist/index127.js +114 -107
- package/dist/index128.cjs +1 -1
- package/dist/index128.js +8 -8
- package/dist/index129.cjs +1 -1
- package/dist/index129.js +53 -53
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +130 -102
- package/dist/index130.cjs +1 -1
- package/dist/index130.js +134 -130
- package/dist/index132.cjs +1 -1
- package/dist/index132.js +7 -7
- package/dist/index133.cjs +1 -1
- package/dist/index133.js +95 -95
- package/dist/index134.cjs +1 -1
- package/dist/index134.js +2 -2
- package/dist/index135.cjs +1 -1
- package/dist/index135.js +113 -99
- package/dist/index136.cjs +1 -1
- package/dist/index136.js +8 -8
- package/dist/index137.cjs +1 -1
- package/dist/index137.js +16 -16
- package/dist/index138.cjs +1 -1
- package/dist/index138.js +20 -20
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +154 -80
- package/dist/index140.cjs +1 -1
- package/dist/index140.js +2 -2
- package/dist/index141.cjs +1 -1
- package/dist/index141.js +24 -24
- package/dist/index142.cjs +1 -1
- package/dist/index142.js +2 -2
- package/dist/index143.cjs +1 -1
- package/dist/index143.js +15 -15
- package/dist/index144.cjs +1 -1
- package/dist/index144.js +3 -3
- package/dist/index145.cjs +1 -1
- package/dist/index145.js +2 -2
- package/dist/index146.cjs +1 -1
- package/dist/index146.js +1 -1
- package/dist/index147.cjs +1 -1
- package/dist/index147.js +88 -88
- package/dist/index149.cjs +1 -1
- package/dist/index149.js +64 -64
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +116 -63
- package/dist/index150.cjs +1 -1
- package/dist/index150.js +9 -9
- package/dist/index152.cjs +1 -1
- package/dist/index152.js +1 -1
- package/dist/index153.cjs +1 -1
- package/dist/index153.js +41 -41
- package/dist/index154.cjs +1 -1
- package/dist/index154.js +73 -73
- package/dist/index155.cjs +1 -1
- package/dist/index155.js +34 -34
- package/dist/index156.cjs +1 -1
- package/dist/index156.js +8 -8
- package/dist/index157.cjs +1 -1
- package/dist/index157.js +1 -1
- package/dist/index158.cjs +1 -1
- package/dist/index158.js +30 -30
- package/dist/index159.cjs +1 -1
- package/dist/index159.js +21 -21
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +60 -91
- package/dist/index160.cjs +1 -1
- package/dist/index160.js +59 -59
- package/dist/index161.cjs +1 -1
- package/dist/index161.js +2 -2
- package/dist/index162.cjs +1 -1
- package/dist/index162.js +50 -50
- package/dist/index163.cjs +1 -1
- package/dist/index163.js +11 -11
- package/dist/index164.cjs +1 -1
- package/dist/index164.js +1 -1
- package/dist/index165.cjs +1 -1
- package/dist/index165.js +33 -33
- package/dist/index166.cjs +1 -1
- package/dist/index166.js +11 -11
- package/dist/index167.cjs +1 -1
- package/dist/index167.js +2 -2
- package/dist/index168.cjs +1 -1
- package/dist/index168.js +7 -7
- package/dist/index169.cjs +1 -1
- package/dist/index169.js +74 -65
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +122 -15
- package/dist/index170.cjs +1 -1
- package/dist/index170.js +9 -9
- package/dist/index171.cjs +1 -1
- package/dist/index171.js +7 -7
- package/dist/index172.cjs +1 -1
- package/dist/index172.js +12 -12
- package/dist/index174.cjs +1 -1
- package/dist/index174.js +15 -15
- package/dist/index175.cjs +1 -1
- package/dist/index175.js +13 -13
- package/dist/index176.cjs +1 -1
- package/dist/index176.js +2 -2
- package/dist/index177.cjs +1 -1
- package/dist/index177.js +140 -115
- package/dist/index178.cjs +1 -1
- package/dist/index178.js +4 -4
- package/dist/index179.cjs +1 -1
- package/dist/index179.js +47 -47
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +15 -268
- package/dist/index181.cjs +1 -1
- package/dist/index181.js +36 -25
- package/dist/index183.cjs +1 -1
- package/dist/index183.js +4 -4
- package/dist/index185.cjs +1 -1
- package/dist/index185.js +5 -8
- package/dist/index186.cjs +1 -1
- package/dist/index186.js +5 -15
- package/dist/index187.cjs +1 -1
- package/dist/index187.js +5 -20
- package/dist/index188.cjs +1 -1
- package/dist/index188.js +5 -16
- package/dist/index189.cjs +1 -1
- package/dist/index189.js +8 -5
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +11 -281
- package/dist/index190.cjs +1 -1
- package/dist/index190.js +7 -4
- package/dist/index191.cjs +1 -1
- package/dist/index191.js +12 -6
- package/dist/index192.cjs +1 -1
- package/dist/index192.js +6 -5
- package/dist/index193.cjs +1 -1
- package/dist/index193.js +6 -5
- package/dist/index194.cjs +1 -1
- package/dist/index194.js +6 -7
- package/dist/index195.cjs +1 -1
- package/dist/index195.js +10 -68
- package/dist/index196.cjs +1 -1
- package/dist/index196.js +9 -10
- package/dist/index197.cjs +1 -1
- package/dist/index197.js +5 -201
- package/dist/index198.cjs +1 -1
- package/dist/index198.js +7 -123
- package/dist/index199.cjs +1 -1
- package/dist/index199.js +7 -31
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +26 -11
- package/dist/index200.cjs +1 -1
- package/dist/index200.js +66 -17
- package/dist/index201.cjs +1 -1
- package/dist/index201.js +8 -68
- package/dist/index202.cjs +1 -1
- package/dist/index202.js +13 -13
- package/dist/index203.cjs +1 -1
- package/dist/index203.js +6 -6
- package/dist/index204.cjs +1 -1
- package/dist/index204.js +15 -278
- package/dist/index205.cjs +1 -1
- package/dist/index205.js +171 -126
- package/dist/index206.cjs +1 -1
- package/dist/index206.js +21 -19
- package/dist/index207.cjs +1 -1
- package/dist/index207.js +16 -8
- package/dist/index208.cjs +1 -1
- package/dist/index208.js +123 -13
- package/dist/index209.cjs +1 -1
- package/dist/index209.js +19 -7
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +29 -26
- package/dist/index210.cjs +1 -1
- package/dist/index210.js +8 -6
- package/dist/index211.cjs +1 -1
- package/dist/index211.js +9 -9
- package/dist/index212.cjs +1 -1
- package/dist/index212.js +13 -8
- package/dist/index213.cjs +1 -1
- package/dist/index213.js +9 -4
- package/dist/index214.cjs +1 -1
- package/dist/index214.js +9 -6
- package/dist/index215.cjs +1 -1
- package/dist/index215.js +4 -6
- package/dist/index216.cjs +1 -1
- package/dist/index216.js +42 -9
- package/dist/index217.cjs +1 -1
- package/dist/index217.js +386 -8
- package/dist/index218.cjs +1 -1
- package/dist/index218.js +37 -14
- package/dist/index219.cjs +1 -1
- package/dist/index219.js +22 -10
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +367 -59
- package/dist/index220.cjs +1 -1
- package/dist/index220.js +57 -9
- package/dist/index221.cjs +1 -1
- package/dist/index221.js +39 -4
- package/dist/index222.cjs +1 -1
- package/dist/index222.js +116 -35
- package/dist/index223.cjs +1 -1
- package/dist/index223.js +85 -387
- package/dist/index224.cjs +1 -1
- package/dist/index224.js +87 -35
- package/dist/index225.cjs +1 -1
- package/dist/index225.js +116 -18
- package/dist/index226.cjs +1 -1
- package/dist/index226.js +97 -55
- package/dist/index227.cjs +1 -1
- package/dist/index227.js +154 -37
- package/dist/index228.cjs +1 -1
- package/dist/index228.js +76 -121
- package/dist/index229.cjs +9 -1
- package/dist/index229.js +588 -77
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +212 -29
- package/dist/index230.cjs +1 -1
- package/dist/index230.js +64 -68
- package/dist/index231.cjs +1 -1
- package/dist/index231.js +42 -115
- package/dist/index232.cjs +1 -1
- package/dist/index232.js +65 -98
- package/dist/index233.cjs +1 -1
- package/dist/index233.js +48 -149
- package/dist/index234.cjs +1 -1
- package/dist/index234.js +98 -68
- package/dist/index235.cjs +1 -9
- package/dist/index235.js +214 -580
- package/dist/index236.cjs +1 -1
- package/dist/index236.js +29 -66
- package/dist/index237.cjs +1 -1
- package/dist/index237.js +23 -40
- package/dist/index238.cjs +1 -1
- package/dist/index238.js +55 -59
- package/dist/index239.cjs +1 -1
- package/dist/index239.js +419 -46
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +200 -312
- package/dist/index240.cjs +1 -1
- package/dist/index240.js +30 -97
- package/dist/index241.cjs +1 -1
- package/dist/index241.js +205 -196
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +228 -124
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +161 -86
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +89 -143
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +140 -76
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +92 -84
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +84 -26
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +26 -35
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +39 -86
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +84 -231
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +234 -44
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +39 -26
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +30 -14
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +14 -13
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +13 -3
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +4 -87
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +83 -174
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +66 -142
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +217 -62
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +135 -47
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +47 -260
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +273 -8
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +7 -4
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +4 -503
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +472 -177
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +205 -23
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +21 -1008
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +1014 -21
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +22 -207
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +181 -130
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +132 -99
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +123 -19
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +17 -79
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +75 -90
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +91 -9
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +12 -91
- package/dist/index6.cjs +1 -1
- package/dist/index6.js +62 -5
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +92 -31
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +29 -208
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +123 -99
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +17 -17
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +28 -28
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +30 -30
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +11 -11
- package/dist/index7.cjs +1 -1
- package/dist/index7.js +22 -28
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +1 -1
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +20 -20
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +7 -7
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +28 -28
- package/dist/index8.cjs +1 -1
- package/dist/index8.js +28 -61
- package/dist/index9.cjs +1 -1
- package/dist/index9.js +60 -15
- package/dist/ui/accordion.d.ts.map +1 -1
- package/dist/ui/avatar.d.ts.map +1 -1
- package/dist/ui/breadcrumb.d.ts.map +1 -1
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/calendar.d.ts +1 -1
- package/dist/ui/calendar.d.ts.map +1 -1
- package/dist/ui/command.d.ts +1 -1
- package/dist/ui/command.d.ts.map +1 -1
- package/dist/ui/context-menu.d.ts.map +1 -1
- package/dist/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/ui/editable.d.ts.map +1 -1
- package/dist/ui/field.d.ts.map +1 -1
- package/dist/ui/form.d.ts.map +1 -1
- package/dist/ui/input-group.d.ts.map +1 -1
- package/dist/ui/input-otp.d.ts +1 -1
- package/dist/ui/input-otp.d.ts.map +1 -1
- package/dist/ui/item.d.ts.map +1 -1
- package/dist/ui/menubar.d.ts.map +1 -1
- package/dist/ui/pagination.d.ts +3 -1
- package/dist/ui/pagination.d.ts.map +1 -1
- package/dist/ui/toggle-group.d.ts +1 -1
- package/dist/ui/toggle-group.d.ts.map +1 -1
- package/dist/ui/toggle.d.ts +1 -1
- package/dist/ui/toggle.d.ts.map +1 -1
- package/dist/ui/useBreakpoint.d.ts +0 -4
- package/dist/ui/useBreakpoint.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/index242.cjs +0 -1
- package/dist/index242.js +0 -25
- package/dist/index243.cjs +0 -1
- package/dist/index243.js +0 -26
- package/dist/index244.cjs +0 -1
- package/dist/index244.js +0 -63
- package/dist/index245.cjs +0 -1
- package/dist/index245.js +0 -422
- package/dist/index246.cjs +0 -1
- package/dist/index246.js +0 -25
- package/dist/index247.cjs +0 -1
- package/dist/index247.js +0 -209
package/dist/index239.js
CHANGED
|
@@ -1,49 +1,422 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
1
|
+
import { Icons as e } from "./index4.js";
|
|
2
|
+
import { Text as t } from "./index14.js";
|
|
3
|
+
import { Button as n } from "./index22.js";
|
|
4
|
+
import { createApiUploadHandler as r, createUploadThingUploadHandler as i, formatFileSize as a } from "./index113.js";
|
|
5
|
+
import { FileUpload as o, FileUploadClear as s, FileUploadDropzone as c, FileUploadItem as l, FileUploadItemDelete as u, FileUploadItemMetadata as d, FileUploadItemPreview as f, FileUploadItemProgress as p, FileUploadList as m, FileUploadTrigger as h, useFileUpload as g } from "./index114.js";
|
|
6
|
+
import * as _ from "@stylexjs/stylex";
|
|
7
|
+
import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
8
|
+
import * as x from "react";
|
|
9
|
+
import { c as S } from "react/compiler-runtime";
|
|
10
|
+
// src/Form/FormFileUpload/FileUpload.tsx
|
|
11
|
+
var C = {
|
|
12
|
+
avatarDropzone: {
|
|
13
|
+
kVAEAm: "x1n2onr6",
|
|
14
|
+
kzqmXN: "x1eyvef",
|
|
15
|
+
kZKoxP: "xw76nk8",
|
|
16
|
+
kaIpWk: "x7xypw4",
|
|
17
|
+
kMzoRj: "xdh2fpr",
|
|
18
|
+
ksu8eU: "xbsl7fq",
|
|
19
|
+
kVAM5u: "xb30jbz",
|
|
20
|
+
kWkggS: "x1mlyrtw",
|
|
21
|
+
kVQacm: "xb3r6kr",
|
|
22
|
+
kmVPX3: "x1717udv",
|
|
23
|
+
kkrTdU: "x1ypdohk",
|
|
24
|
+
k1xSpc: "x78zum5",
|
|
25
|
+
kGNEyG: "x6s0dn4",
|
|
26
|
+
kjj79g: "xl56j7k",
|
|
27
|
+
k1ekBW: "xq90yva",
|
|
28
|
+
kIyJzY: "x13dflua",
|
|
29
|
+
kaVNsj: "x14aqmuz",
|
|
30
|
+
$$css: !0
|
|
31
|
+
},
|
|
32
|
+
avatarItem: {
|
|
33
|
+
kVAEAm: "x1n2onr6",
|
|
34
|
+
k1xSpc: "x78zum5",
|
|
35
|
+
kzqmXN: "xh8yej3",
|
|
36
|
+
kZKoxP: "x5yr21d",
|
|
37
|
+
kXwgrk: "xdt5ytf",
|
|
38
|
+
kaIpWk: "x2u8bby",
|
|
39
|
+
kMzoRj: "xc342km",
|
|
40
|
+
kmVPX3: "x1717udv",
|
|
41
|
+
$$css: !0
|
|
42
|
+
},
|
|
43
|
+
avatarPreview: {
|
|
44
|
+
kzqmXN: "xh8yej3",
|
|
45
|
+
kZKoxP: "x5yr21d",
|
|
46
|
+
kaIpWk: "x2u8bby",
|
|
47
|
+
kMzoRj: "xc342km",
|
|
48
|
+
kWkggS: "xjbqb8w",
|
|
49
|
+
$$css: !0
|
|
50
|
+
},
|
|
51
|
+
avatarImg: {
|
|
52
|
+
kzqmXN: "xh8yej3",
|
|
53
|
+
kZKoxP: "x5yr21d",
|
|
54
|
+
kVIFPx: "xl1xv1r",
|
|
55
|
+
$$css: !0
|
|
56
|
+
},
|
|
57
|
+
compactDropzone: {
|
|
58
|
+
kVAEAm: "x1n2onr6",
|
|
59
|
+
k1xSpc: "x78zum5",
|
|
60
|
+
kXwgrk: "x1q0g3np",
|
|
61
|
+
kGNEyG: "x6s0dn4",
|
|
62
|
+
kOIVth: "x8233eu",
|
|
63
|
+
kaIpWk: "x1mr5ieh",
|
|
64
|
+
kMzoRj: "xmkeg23",
|
|
65
|
+
ksu8eU: "xbsl7fq",
|
|
66
|
+
kVAM5u: "xb30jbz",
|
|
67
|
+
kWkggS: "x1mlyrtw",
|
|
68
|
+
kmVPX3: "x19btat0",
|
|
69
|
+
kkrTdU: "x1ypdohk",
|
|
70
|
+
k1ekBW: "xq90yva",
|
|
71
|
+
kIyJzY: "xx6bhzk",
|
|
72
|
+
kaVNsj: "x14aqmuz",
|
|
73
|
+
kGzVvX: "x9p52ec",
|
|
74
|
+
$$css: !0
|
|
75
|
+
},
|
|
76
|
+
clearBtnRow: {
|
|
77
|
+
k1xSpc: "x78zum5",
|
|
78
|
+
kjj79g: "x13a6bvl",
|
|
79
|
+
kzqmXN: "xh8yej3",
|
|
80
|
+
$$css: !0
|
|
81
|
+
},
|
|
82
|
+
clearBtn: {
|
|
83
|
+
k1xSpc: "x3nfvp2",
|
|
84
|
+
kGNEyG: "x6s0dn4",
|
|
85
|
+
kOIVth: "xvh977a",
|
|
86
|
+
kGuDYH: "xboafo0",
|
|
87
|
+
kMwMTN: "xw3nh4a",
|
|
88
|
+
kWkggS: "xjbqb8w",
|
|
89
|
+
kMzoRj: "xc342km",
|
|
90
|
+
kkrTdU: "x1ypdohk",
|
|
91
|
+
kmVPX3: "x48ff29",
|
|
92
|
+
kaIpWk: "x1q0v2j7",
|
|
93
|
+
kGzVvX: "x9p52ec",
|
|
94
|
+
kDPRdz: "x1mqvv6a",
|
|
95
|
+
$$css: !0
|
|
96
|
+
},
|
|
97
|
+
deleteBtn: {
|
|
98
|
+
k1xSpc: "x3nfvp2",
|
|
99
|
+
kGNEyG: "x6s0dn4",
|
|
100
|
+
kjj79g: "xl56j7k",
|
|
101
|
+
kzqmXN: "xs5h3dt",
|
|
102
|
+
kZKoxP: "xettwda",
|
|
103
|
+
kaIpWk: "x1q0v2j7",
|
|
104
|
+
kMzoRj: "xc342km",
|
|
105
|
+
kWkggS: "xjbqb8w",
|
|
106
|
+
kMwMTN: "xw3nh4a",
|
|
107
|
+
kkrTdU: "x1ypdohk",
|
|
108
|
+
kmuXW: "x2lah0s",
|
|
109
|
+
k1ekBW: "x1gbuem2",
|
|
110
|
+
kIyJzY: "xx6bhzk",
|
|
111
|
+
kGzVvX: "x9p52ec",
|
|
112
|
+
kDPRdz: "x1mqvv6a",
|
|
113
|
+
$$css: !0
|
|
114
|
+
},
|
|
115
|
+
whiteText: {
|
|
116
|
+
kMwMTN: "x1f7m26b",
|
|
117
|
+
$$css: !0
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
function w(e) {
|
|
121
|
+
let t = S(6), { onChange: n, autoUpload: r, maxFiles: i } = e, a = g(k), o = x.useRef(null), s = x.useRef(!0), c, l;
|
|
122
|
+
return t[0] !== r || t[1] !== i || t[2] !== n || t[3] !== a ? (c = () => {
|
|
123
|
+
if (!n) return;
|
|
124
|
+
let e = Array.from(a.files.values());
|
|
125
|
+
if (s.current && (s.current = !1, e.length === 0)) return;
|
|
126
|
+
let t = (() => {
|
|
127
|
+
if (r) {
|
|
128
|
+
let t = e.filter(O).map(D).filter(E);
|
|
129
|
+
return i === 1 ? t.length > 0 ? t[t.length - 1] : null : t;
|
|
45
130
|
}
|
|
131
|
+
let t = e.map(T);
|
|
132
|
+
return i === 1 ? t.length > 0 ? t[t.length - 1] : null : t;
|
|
133
|
+
})(), c = o.current;
|
|
134
|
+
(r ? JSON.stringify(c) === JSON.stringify(t) : Array.isArray(t) && Array.isArray(c) ? t.length === c.length && t.every((e, t) => e === c[t]) : t === c) || (o.current = t, n(t));
|
|
135
|
+
}, l = [
|
|
136
|
+
a,
|
|
137
|
+
r,
|
|
138
|
+
i,
|
|
139
|
+
n
|
|
140
|
+
], t[0] = r, t[1] = i, t[2] = n, t[3] = a, t[4] = c, t[5] = l) : (c = t[4], l = t[5]), x.useEffect(c, l), null;
|
|
141
|
+
}
|
|
142
|
+
function T(e) {
|
|
143
|
+
return e.file;
|
|
144
|
+
}
|
|
145
|
+
function E(e) {
|
|
146
|
+
return !!e;
|
|
147
|
+
}
|
|
148
|
+
function D(e) {
|
|
149
|
+
return e.file.uploadedUrl;
|
|
150
|
+
}
|
|
151
|
+
function O(e) {
|
|
152
|
+
return e.status === "success";
|
|
153
|
+
}
|
|
154
|
+
function k(e) {
|
|
155
|
+
return e;
|
|
156
|
+
}
|
|
157
|
+
function A(e, t = "") {
|
|
158
|
+
let n = e.split("/").pop()?.split("?")[0] || "file", r = n.split(".").pop()?.toLowerCase(), i = r && {
|
|
159
|
+
jpg: "image/jpeg",
|
|
160
|
+
jpeg: "image/jpeg",
|
|
161
|
+
png: "image/png",
|
|
162
|
+
gif: "image/gif",
|
|
163
|
+
webp: "image/webp",
|
|
164
|
+
pdf: "application/pdf"
|
|
165
|
+
}[r];
|
|
166
|
+
i ||= t.includes("image") ? "image/jpeg" : "application/octet-stream";
|
|
167
|
+
let a = new File([""], n, { type: i });
|
|
168
|
+
return a.isUploadedUrl = !0, a.uploadedUrl = e, a;
|
|
169
|
+
}
|
|
170
|
+
function j({ showPreview: t, showProgress: r, orientation: i = "vertical", avatarImgSx: a, deleteBtnSx: o }) {
|
|
171
|
+
let s = g((e) => Array.from(e.files.values()).map((e) => e.file));
|
|
172
|
+
return s.length === 0 ? null : /* @__PURE__ */ y(m, {
|
|
173
|
+
orientation: i,
|
|
174
|
+
children: s.map((s, c) => /* @__PURE__ */ b(l, {
|
|
175
|
+
value: s,
|
|
176
|
+
children: [
|
|
177
|
+
t && /* @__PURE__ */ y(f, { render: (e, t) => {
|
|
178
|
+
let n = e.uploadedUrl || (e.type.startsWith("image/") && typeof URL < "u" && URL.createObjectURL ? URL.createObjectURL(e) : null);
|
|
179
|
+
return n && e.type.startsWith("image/") ? /* @__PURE__ */ y("img", {
|
|
180
|
+
src: n,
|
|
181
|
+
alt: e.name,
|
|
182
|
+
..._.props(a)
|
|
183
|
+
}) : t();
|
|
184
|
+
} }),
|
|
185
|
+
/* @__PURE__ */ y(d, {}),
|
|
186
|
+
r && /* @__PURE__ */ y(p, { variant: "bottom" }),
|
|
187
|
+
/* @__PURE__ */ y(u, {
|
|
188
|
+
asChild: !0,
|
|
189
|
+
children: /* @__PURE__ */ y(n, {
|
|
190
|
+
variant: "ghost",
|
|
191
|
+
size: "icon",
|
|
192
|
+
"aria-label": `Delete ${s.name}`,
|
|
193
|
+
sx: o,
|
|
194
|
+
children: /* @__PURE__ */ y(e.Trash2, { size: i === "horizontal" ? 15 : 16 })
|
|
195
|
+
})
|
|
196
|
+
})
|
|
197
|
+
]
|
|
198
|
+
}, `${s.name}-${c}`))
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
function M(t) {
|
|
202
|
+
let n = S(10), { clearBtnRowSx: r, clearBtnSx: i } = t;
|
|
203
|
+
if (g(N) === 0) return null;
|
|
204
|
+
let a;
|
|
205
|
+
n[0] === r ? a = n[1] : (a = _.props(r), n[0] = r, n[1] = a);
|
|
206
|
+
let o;
|
|
207
|
+
n[2] === i ? o = n[3] : (o = _.props(i), n[2] = i, n[3] = o);
|
|
208
|
+
let c;
|
|
209
|
+
n[4] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ y(e.Trash2, { size: 13 }), n[4] = c) : c = n[4];
|
|
210
|
+
let l;
|
|
211
|
+
n[5] === o ? l = n[6] : (l = /* @__PURE__ */ y(s, {
|
|
212
|
+
asChild: !0,
|
|
213
|
+
children: /* @__PURE__ */ b("button", {
|
|
214
|
+
type: "button",
|
|
215
|
+
...o,
|
|
216
|
+
children: [c, "Clear all"]
|
|
46
217
|
})
|
|
47
|
-
};
|
|
218
|
+
}), n[5] = o, n[6] = l);
|
|
219
|
+
let u;
|
|
220
|
+
return n[7] !== a || n[8] !== l ? (u = /* @__PURE__ */ y("div", {
|
|
221
|
+
...a,
|
|
222
|
+
children: l
|
|
223
|
+
}), n[7] = a, n[8] = l, n[9] = u) : u = n[9], u;
|
|
224
|
+
}
|
|
225
|
+
function N(e) {
|
|
226
|
+
return e.files.size;
|
|
227
|
+
}
|
|
228
|
+
function P(n) {
|
|
229
|
+
let r = S(8), { showProgress: i, maxSize: o } = n, s = g(I), u;
|
|
230
|
+
r[0] !== s || r[1] !== i ? (u = /* @__PURE__ */ y(c, {
|
|
231
|
+
sx: C.avatarDropzone,
|
|
232
|
+
children: s ? /* @__PURE__ */ b(l, {
|
|
233
|
+
value: s,
|
|
234
|
+
sx: C.avatarItem,
|
|
235
|
+
children: [
|
|
236
|
+
/* @__PURE__ */ y(f, {
|
|
237
|
+
sx: C.avatarPreview,
|
|
238
|
+
render: F
|
|
239
|
+
}),
|
|
240
|
+
/* @__PURE__ */ b("div", {
|
|
241
|
+
className: "x10l6tqk x10a8y8t x78zum5 xdt5ytf x6s0dn4 xl56j7k xvh977a xa44r0r x1f7m26b xg01cxk x19991ni x13dflua x1o7uuvo",
|
|
242
|
+
children: [/* @__PURE__ */ y(e.Camera, { size: 22 }), /* @__PURE__ */ y(t, {
|
|
243
|
+
size: "xs",
|
|
244
|
+
weight: "semibold",
|
|
245
|
+
sx: C.whiteText,
|
|
246
|
+
children: "Change photo"
|
|
247
|
+
})]
|
|
248
|
+
}),
|
|
249
|
+
i && /* @__PURE__ */ y(p, {
|
|
250
|
+
variant: "fill",
|
|
251
|
+
style: { opacity: .5 }
|
|
252
|
+
})
|
|
253
|
+
]
|
|
254
|
+
}) : /* @__PURE__ */ b("div", {
|
|
255
|
+
className: "x78zum5 xh8yej3 x5yr21d xdt5ytf x6s0dn4 xl56j7k xvh977a x1jgryid xw3nh4a x15406qy x13dflua",
|
|
256
|
+
children: [/* @__PURE__ */ y(e.Camera, { size: 24 }), /* @__PURE__ */ y(t, {
|
|
257
|
+
size: "xs",
|
|
258
|
+
weight: "medium",
|
|
259
|
+
children: "Upload"
|
|
260
|
+
})]
|
|
261
|
+
})
|
|
262
|
+
}), r[0] = s, r[1] = i, r[2] = u) : u = r[2];
|
|
263
|
+
let d;
|
|
264
|
+
r[3] === o ? d = r[4] : (d = o ? /* @__PURE__ */ b(t, {
|
|
265
|
+
size: "xs",
|
|
266
|
+
type: "muted",
|
|
267
|
+
children: ["Max ", a(o)]
|
|
268
|
+
}) : null, r[3] = o, r[4] = d);
|
|
269
|
+
let m;
|
|
270
|
+
return r[5] !== u || r[6] !== d ? (m = /* @__PURE__ */ b("div", {
|
|
271
|
+
className: "x78zum5 xdt5ytf x6s0dn4 x13z6uf9",
|
|
272
|
+
children: [u, d]
|
|
273
|
+
}), r[5] = u, r[6] = d, r[7] = m) : m = r[7], m;
|
|
274
|
+
}
|
|
275
|
+
function F(n) {
|
|
276
|
+
let r = n.uploadedUrl || (n.type.startsWith("image/") && typeof URL < "u" && URL.createObjectURL ? URL.createObjectURL(n) : null);
|
|
277
|
+
return r ? /* @__PURE__ */ y("img", {
|
|
278
|
+
src: r,
|
|
279
|
+
alt: "Avatar",
|
|
280
|
+
className: "xh8yej3 x5yr21d xl1xv1r"
|
|
281
|
+
}) : /* @__PURE__ */ b("div", {
|
|
282
|
+
className: "x78zum5 xh8yej3 x5yr21d xdt5ytf x6s0dn4 xl56j7k xvh977a x1jgryid xw3nh4a x15406qy x13dflua",
|
|
283
|
+
children: [/* @__PURE__ */ y(e.Camera, { size: 24 }), /* @__PURE__ */ y(t, {
|
|
284
|
+
size: "xs",
|
|
285
|
+
weight: "medium",
|
|
286
|
+
children: "Upload"
|
|
287
|
+
})]
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
function I(e) {
|
|
291
|
+
let t = e.files.values().next();
|
|
292
|
+
return t.done ? null : t.value.file;
|
|
293
|
+
}
|
|
294
|
+
function L({ value: s, onChange: l, autoUpload: u = !1, uploadFile: d, apiConfig: f, uploadThingConfig: p, uploadHandler: m, maxFiles: g = 1, maxSize: _ = 5242880, accept: S = "image/*", multiple: T, disabled: E, className: D, sx: O, variant: k = "default", dropzoneTitle: N, dropzoneSubtitle: F, icon: I, showFileList: L = !0, showProgress: R = !0, showPreview: z = !0, showClear: B = !1 }) {
|
|
295
|
+
let V = x.useRef(/* @__PURE__ */ new Map()), H = x.useMemo(() => (Array.isArray(s) ? s : s ? [s] : []).map((e) => {
|
|
296
|
+
if (e instanceof File) return e;
|
|
297
|
+
if (typeof e == "string") {
|
|
298
|
+
let t = V.current.get(e);
|
|
299
|
+
return t || (t = A(e, S), V.current.set(e, t)), t;
|
|
300
|
+
}
|
|
301
|
+
return e;
|
|
302
|
+
}), [s, S]), U = x.useMemo(() => m || (p ? i(p) : f ? r(f) : null), [
|
|
303
|
+
m,
|
|
304
|
+
p,
|
|
305
|
+
f
|
|
306
|
+
]), W = async (e, t) => {
|
|
307
|
+
if (!u) e.forEach((e) => t.onSuccess(e));
|
|
308
|
+
else if (U) try {
|
|
309
|
+
(await U(e, {
|
|
310
|
+
onProgress: t.onProgress,
|
|
311
|
+
onSuccess: (e, n) => {
|
|
312
|
+
e.uploadedUrl = n.url, t.onSuccess(e);
|
|
313
|
+
},
|
|
314
|
+
onError: (e, n) => {
|
|
315
|
+
t.onError(e, n);
|
|
316
|
+
}
|
|
317
|
+
})).forEach((t, n) => {
|
|
318
|
+
let r = e[n];
|
|
319
|
+
r && (r.uploadedUrl = t.url);
|
|
320
|
+
});
|
|
321
|
+
} catch {}
|
|
322
|
+
else d ? await Promise.all(e.map(async (e) => {
|
|
323
|
+
let n = e;
|
|
324
|
+
if (n.isUploadedUrl) t.onSuccess(e);
|
|
325
|
+
else try {
|
|
326
|
+
t.onProgress(e, 20), n.uploadedUrl = await d(e), t.onProgress(e, 100), t.onSuccess(e);
|
|
327
|
+
} catch (n) {
|
|
328
|
+
t.onError(e, n instanceof Error ? n : /* @__PURE__ */ Error("Upload failed"));
|
|
329
|
+
}
|
|
330
|
+
})) : (console.warn("FileUpload: autoUpload is true but no upload handler or config was provided."), e.forEach((e) => t.onError(e, /* @__PURE__ */ Error("Missing upload configuration"))));
|
|
331
|
+
}, G = `${g > 1 ? `Up to ${g} files` : "1 file max"} ${_ ? `(Max ${a(_)})` : ""}`;
|
|
332
|
+
return /* @__PURE__ */ b(o, {
|
|
333
|
+
value: H,
|
|
334
|
+
maxFiles: k === "avatar" ? 1 : g,
|
|
335
|
+
maxSize: _,
|
|
336
|
+
accept: S,
|
|
337
|
+
multiple: k === "avatar" ? !1 : T ?? g > 1,
|
|
338
|
+
disabled: E,
|
|
339
|
+
onUpload: W,
|
|
340
|
+
className: D,
|
|
341
|
+
sx: O,
|
|
342
|
+
children: [/* @__PURE__ */ y(w, {
|
|
343
|
+
onChange: l,
|
|
344
|
+
autoUpload: !!u,
|
|
345
|
+
maxFiles: k === "avatar" ? 1 : g
|
|
346
|
+
}), k === "avatar" ? /* @__PURE__ */ y(P, {
|
|
347
|
+
showProgress: R,
|
|
348
|
+
maxSize: _
|
|
349
|
+
}) : k === "compact" ? /* @__PURE__ */ b(v, { children: [
|
|
350
|
+
/* @__PURE__ */ b(c, {
|
|
351
|
+
sx: C.compactDropzone,
|
|
352
|
+
children: [
|
|
353
|
+
/* @__PURE__ */ y("div", {
|
|
354
|
+
className: "x78zum5 x6s0dn4 xl56j7k xs5h3dt xettwda x7xypw4 xmkeg23 x1y0btm7 xb30jbz x1rexohn xw3nh4a x2lah0s",
|
|
355
|
+
children: I || /* @__PURE__ */ y(e.CloudUpload, { size: 18 })
|
|
356
|
+
}),
|
|
357
|
+
/* @__PURE__ */ b("div", {
|
|
358
|
+
className: "x78zum5 xdt5ytf x98rzlu xeuugli",
|
|
359
|
+
children: [/* @__PURE__ */ y(t, {
|
|
360
|
+
size: "sm",
|
|
361
|
+
weight: "medium",
|
|
362
|
+
children: N || "Choose or drop files to upload"
|
|
363
|
+
}), /* @__PURE__ */ y(t, {
|
|
364
|
+
size: "xs",
|
|
365
|
+
type: "muted",
|
|
366
|
+
children: F || G
|
|
367
|
+
})]
|
|
368
|
+
}),
|
|
369
|
+
/* @__PURE__ */ y(h, {
|
|
370
|
+
asChild: !0,
|
|
371
|
+
children: /* @__PURE__ */ y(n, {
|
|
372
|
+
variant: "outline",
|
|
373
|
+
size: "sm",
|
|
374
|
+
disabled: E,
|
|
375
|
+
children: "Browse"
|
|
376
|
+
})
|
|
377
|
+
})
|
|
378
|
+
]
|
|
379
|
+
}),
|
|
380
|
+
B && /* @__PURE__ */ y(M, {
|
|
381
|
+
clearBtnRowSx: C.clearBtnRow,
|
|
382
|
+
clearBtnSx: C.clearBtn
|
|
383
|
+
}),
|
|
384
|
+
L && /* @__PURE__ */ y(j, {
|
|
385
|
+
showPreview: z,
|
|
386
|
+
showProgress: R,
|
|
387
|
+
orientation: "horizontal",
|
|
388
|
+
avatarImgSx: C.avatarImg,
|
|
389
|
+
deleteBtnSx: C.deleteBtn
|
|
390
|
+
})
|
|
391
|
+
] }) : /* @__PURE__ */ b(v, { children: [
|
|
392
|
+
/* @__PURE__ */ b(c, { children: [
|
|
393
|
+
/* @__PURE__ */ y("div", {
|
|
394
|
+
className: "x78zum5 x6s0dn4 xl56j7k xvm51jw xwaiz5r x7xypw4 xmkeg23 x1y0btm7 xb30jbz x1rexohn xw3nh4a x1hpqcdg",
|
|
395
|
+
children: I || /* @__PURE__ */ y(e.CloudUpload, { size: 20 })
|
|
396
|
+
}),
|
|
397
|
+
/* @__PURE__ */ y(t, {
|
|
398
|
+
size: "md",
|
|
399
|
+
weight: "medium",
|
|
400
|
+
children: N || "Drag & drop files here, or click to select"
|
|
401
|
+
}),
|
|
402
|
+
/* @__PURE__ */ y(t, {
|
|
403
|
+
size: "xs",
|
|
404
|
+
type: "muted",
|
|
405
|
+
children: F || G
|
|
406
|
+
})
|
|
407
|
+
] }),
|
|
408
|
+
B && /* @__PURE__ */ y(M, {
|
|
409
|
+
clearBtnRowSx: C.clearBtnRow,
|
|
410
|
+
clearBtnSx: C.clearBtn
|
|
411
|
+
}),
|
|
412
|
+
L && /* @__PURE__ */ y(j, {
|
|
413
|
+
showPreview: z,
|
|
414
|
+
showProgress: R,
|
|
415
|
+
orientation: "vertical",
|
|
416
|
+
avatarImgSx: C.avatarImg,
|
|
417
|
+
deleteBtnSx: C.deleteBtn
|
|
418
|
+
})
|
|
419
|
+
] })]
|
|
420
|
+
});
|
|
48
421
|
}
|
|
49
|
-
export {
|
|
422
|
+
export { L as FileUpload };
|
package/dist/index24.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./index2.cjs"),t=require("./
|
|
1
|
+
const e=require("./index2.cjs"),t=require("./index4.cjs"),n=require("./index12.cjs"),r=require("./index14.cjs"),i=require("./index22.cjs"),a=require("./index23.cjs");let o=require("@stylexjs/stylex");o=e.__toESM(o,1);let s=require("react/jsx-runtime");var c={dialog:{kzqmXN:`xh8yej3`,kaIpWk:`x1mr5ieh`,kWkggS:`x1be509`,kMwMTN:`xap3l8t`,kmVPX3:`xis3749`,kGVxlE:`xym7dz`,kMzoRj:`xmkeg23`,ksu8eU:`x1y0btm7`,kVAM5u:`xb30jbz`,k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kOIVth:`x15iy025`,$$css:!0},sizeXxs:{ks0D6T:`x1va8c73`,$$css:!0},sizeXs:{ks0D6T:`x1dt7z5j`,$$css:!0},sizeSm:{ks0D6T:`xq2pcee`,$$css:!0},sizeMd:{ks0D6T:`x1ptgtm5`,$$css:!0},sizeLg:{ks0D6T:`x11gisft`,$$css:!0},sizeXl:{ks0D6T:`x1yjoq1l`,$$css:!0},sizeXxl:{ks0D6T:`xyzno7u`,$$css:!0},title:{kogj98:`x1ghz6dp`,k1K539:`x18jvhmb`,kGuDYH:`x1c3i2sq`,kLWn49:`x37zpob`,k63SB2:`x1s688f`,kMwMTN:`x84br7x`,$$css:!0},message:{kogj98:`x1ghz6dp`,kGuDYH:`xkpwil5`,kLWn49:`x1evy7pa`,kMwMTN:`xw3nh4a`,$$css:!0},cancelBtn:{kaIpWk:`xsda711`,kMzoRj:`xmkeg23`,ksu8eU:`x1y0btm7`,kVAM5u:`xb30jbz`,kWkggS:`x1mlyrtw`,kMwMTN:`x84br7x`,kg3NbH:`xnxx81d`,k8WAf4:`x18g2hj5`,kGuDYH:`xkpwil5`,k63SB2:`xk50ysn`,kkrTdU:`x1ypdohk`,kGVxlE:`x1dsmnui`,kGzVvX:`x9p52ec`,kYPGJ8:`x1s07b3s`,kWCcOm:`xijokvz`,$$css:!0},confirmBtn:{kaIpWk:`xsda711`,kMzoRj:`xc342km`,kg3NbH:`xnxx81d`,k8WAf4:`x18g2hj5`,kGuDYH:`xkpwil5`,k63SB2:`xk50ysn`,kMwMTN:`x1f7m26b`,kkrTdU:`x1ypdohk`,kGVxlE:`x1dsmnui`,kYPGJ8:`x1s07b3s`,kWCcOm:`xijokvz`,$$css:!0},btnWarning:{kWkggS:`x1yjhq7t`,kGzVvX:`x1af168x`,$$css:!0},btnInfo:{kWkggS:`x1efvng4`,kGzVvX:`xupd0a8`,$$css:!0},btnSuccess:{kWkggS:`xvrvcqj`,kGzVvX:`x1tl4bfe`,$$css:!0},btnDanger:{kWkggS:`x57dptr`,kKhh5M:`x18uuni6`,$$css:!0},iconWarning:{kMwMTN:`x1m3z5z6`,$$css:!0},iconInfo:{kMwMTN:`xd85xce`,$$css:!0},iconSuccess:{kMwMTN:`xqi19zs`,$$css:!0},iconDanger:{kMwMTN:`xuuroe4`,$$css:!0},typeIcon:{kzqmXN:`xvy4d1p`,kZKoxP:`xxk0z11`,$$css:!0}},l={xxs:c.sizeXxs,xs:c.sizeXs,sm:c.sizeSm,md:c.sizeMd,lg:c.sizeLg,xl:c.sizeXl,xxl:c.sizeXxl};function u({open:e,isOpen:u,onClose:d,onCancel:f,onConfirm:p,onOk:m,title:h,message:g,description:_,children:v,confirmText:y=`Confirm`,cancelText:b=`Cancel`,closeLabel:x=`Close`,processingText:S,loadingText:C,type:w,variant:T=`warning`,isLoading:E,loading:D,size:O=`md`,width:k,footer:A,sx:j,className:M}){let N=e??u??!0,P=E??D??!1,F=w??T??`warning`,I=F===`error`?`danger`:F,L=g??_,R=C??S??`Processing...`,z=()=>{P||(f??d)?.()},B=()=>{P||(p??m)?.()},V={warning:t.Icons.AlertTriangle,info:t.Icons.Info,success:t.Icons.CheckCircle2,danger:t.Icons.XCircle}[I],H={warning:{icon:c.iconWarning,btn:c.btnWarning},info:{icon:c.iconInfo,btn:c.btnInfo},success:{icon:c.iconSuccess,btn:c.btnSuccess},danger:{icon:c.iconDanger,btn:c.btnDanger}}[I],U=l[O]??c.sizeMd;return(0,s.jsx)(a.Dialog,{open:N,onOpenChange:e=>!e&&z(),children:(0,s.jsxs)(a.DialogContent,{showCloseButton:!1,sx:[c.dialog,U,j],className:M,style:k?{maxWidth:k}:void 0,onEscapeKeyDown:e=>{P&&e.preventDefault()},onPointerDownOutside:e=>{P&&e.preventDefault()},children:[(0,s.jsx)(`button`,{type:`button`,onClick:z,disabled:P,className:`x10l6tqk x1u62bzc x1nwpe0i x7xypw4 x78pyy4 xw3nh4a xc342km xjbqb8w x1ypdohk x78zum5 x6s0dn4 xl56j7k x1a2a7pz xfyfa0t x9p52ec x8aud5w xybh4k3 x7s97pk x1s07b3s xijokvz`,"aria-label":x,children:(0,s.jsx)(t.Icons.X,{className:`xw4jnvo x1qx5ct2`})}),(0,s.jsxs)(`div`,{className:`x78zum5 x1cy8zhl x1fsutb xnywu7s`,children:[(0,s.jsx)(`div`,{className:`x78zum5 x6s0dn4 xl56j7k x2lah0s xrhwvvd`,children:(0,s.jsx)(V,{...o.props(c.typeIcon,H.icon)})}),(0,s.jsxs)(`div`,{className:`xeuugli x845mor`,children:[(0,s.jsx)(a.DialogTitle,{asChild:!0,children:(0,s.jsx)(n.Title,{id:`confirm-modal-title`,level:3,sx:c.title,children:h})}),L?(0,s.jsx)(a.DialogDescription,{asChild:!0,children:(0,s.jsx)(r.Text,{type:`muted`,sx:c.message,children:L})}):null,v]})]}),A||(0,s.jsxs)(`div`,{className:`x78zum5 x13a6bvl xb6y1gh xdj266r`,children:[(0,s.jsx)(i.Button,{type:`button`,variant:`outline`,onClick:z,disabled:P,sx:c.cancelBtn,children:b}),(0,s.jsx)(i.Button,{type:`button`,variant:w===`danger`?`destructive`:`default`,onClick:B,isLoading:P,sx:[c.confirmBtn,H.btn],children:P?R:y})]})]})})}exports.ConfirmModal=u,exports.default=u;
|