@oneplatformdev/ui 0.1.99-beta.296 → 0.1.99-beta.298

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 (187) hide show
  1. package/.storybook/Wrappers.js.map +1 -1
  2. package/Accordion/Accordion.js.map +1 -1
  3. package/Alert/Alert.js.map +1 -1
  4. package/Alert/alertVariants.js.map +1 -1
  5. package/AlertDialog/AlertDialog.js.map +1 -1
  6. package/AlertDialog/AlertDialog.stories.js +2 -4
  7. package/AlertDialog/AlertDialog.stories.js.map +1 -1
  8. package/AlertDialog/AlertDialogRoot.js +18 -20
  9. package/AlertDialog/AlertDialogRoot.js.map +1 -1
  10. package/AreaChart/AreaChart.js.map +1 -1
  11. package/Aside/Aside.js.map +1 -1
  12. package/Aside/AsideSidebar.js.map +1 -1
  13. package/AspectRatio/AspectRatio.js.map +1 -1
  14. package/Avatar/Avatar.js.map +1 -1
  15. package/Badge/Badge.js.map +1 -1
  16. package/Badge/badgeVariants.js.map +1 -1
  17. package/Breadcrumb/Breadcrumb.js.map +1 -1
  18. package/Button/Button.js +10 -11
  19. package/Button/Button.js.map +1 -1
  20. package/Button/Button.stories.js.map +1 -1
  21. package/Button/Button.utils.js.map +1 -1
  22. package/Button/ButtonCounterBadge.js.map +1 -1
  23. package/Button/buttonVariants.js.map +1 -1
  24. package/ButtonIcon/ButtonIcon.js +19 -22
  25. package/ButtonIcon/ButtonIcon.js.map +1 -1
  26. package/ButtonIcon/ButtonIcon.stories.js.map +1 -1
  27. package/ButtonIcon/buttonIconVariants.js.map +1 -1
  28. package/CHANGELOG.md +3491 -3465
  29. package/Calendar/Calendar.js +4 -6
  30. package/Calendar/Calendar.js.map +1 -1
  31. package/Card/Card.js.map +1 -1
  32. package/Carousel/Carousel.js +6 -7
  33. package/Carousel/Carousel.js.map +1 -1
  34. package/Chart/Chart.js.map +1 -1
  35. package/Checkbox/Checkbox.js +0 -1
  36. package/Checkbox/Checkbox.js.map +1 -1
  37. package/Checkbox/Checkbox.stories.js.map +1 -1
  38. package/Collapsible/Collapsible.js.map +1 -1
  39. package/Combobox/Combobox.js +10 -10
  40. package/Combobox/Combobox.js.map +1 -1
  41. package/Combobox/Combobox.stories.js.map +1 -1
  42. package/Combobox/Combobox.types.js.map +1 -1
  43. package/Combobox/ComboboxOptionItem.js +18 -19
  44. package/Combobox/ComboboxOptionItem.js.map +1 -1
  45. package/Combobox/ComboboxRenderContent.js +26 -27
  46. package/Combobox/ComboboxRenderContent.js.map +1 -1
  47. package/Combobox/ComboboxRenderOptions.js +5 -5
  48. package/Combobox/ComboboxRenderOptions.js.map +1 -1
  49. package/Combobox/ComboboxRenderTrigger.js +18 -20
  50. package/Combobox/ComboboxRenderTrigger.js.map +1 -1
  51. package/Command/Command.js +21 -22
  52. package/Command/Command.js.map +1 -1
  53. package/ContextPopover/ContextDropdownMenu.js.map +1 -1
  54. package/ContextPopover/ContextPopover.js.map +1 -1
  55. package/ContextPopover/useContextPopoverHandler.js.map +1 -1
  56. package/DataTable/DataTable.js +24 -26
  57. package/DataTable/DataTable.js.map +1 -1
  58. package/DataTable/DataTableColumnFilter.js +6 -7
  59. package/DataTable/DataTableColumnFilter.js.map +1 -1
  60. package/DataTable/useDataTable.js.map +1 -1
  61. package/DatePicker/DatePicker.js +1 -2
  62. package/DatePicker/DatePicker.js.map +1 -1
  63. package/Dialog/Dialog.js +20 -21
  64. package/Dialog/Dialog.js.map +1 -1
  65. package/Dialog/Dialog.stories.js +14 -15
  66. package/Dialog/Dialog.stories.js.map +1 -1
  67. package/Dialog/DialogOverlayScope.js.map +1 -1
  68. package/Dialog/useDialogClosePosition.js.map +1 -1
  69. package/Drawer/Drawer.js.map +1 -1
  70. package/DropdownMenu/DropdownMenu.js.map +1 -1
  71. package/Dropzone/Dropzone.d.ts.map +1 -1
  72. package/Dropzone/Dropzone.js +300 -277
  73. package/Dropzone/Dropzone.js.map +1 -1
  74. package/Dropzone/Dropzone.stories.js +87 -66
  75. package/Dropzone/Dropzone.stories.js.map +1 -1
  76. package/Dropzone/Dropzone.types.d.ts +2 -1
  77. package/Dropzone/Dropzone.types.d.ts.map +1 -1
  78. package/Dropzone/Dropzone.types.js +17 -6
  79. package/Dropzone/Dropzone.types.js.map +1 -1
  80. package/Dropzone/DropzoneCoverPreview.d.ts +14 -0
  81. package/Dropzone/DropzoneCoverPreview.d.ts.map +1 -0
  82. package/Dropzone/DropzoneCoverPreview.js +56 -0
  83. package/Dropzone/DropzoneCoverPreview.js.map +1 -0
  84. package/Dropzone/DropzoneFileCard.d.ts +17 -0
  85. package/Dropzone/DropzoneFileCard.d.ts.map +1 -0
  86. package/Dropzone/DropzoneFileCard.js +39 -0
  87. package/Dropzone/DropzoneFileCard.js.map +1 -0
  88. package/Dropzone/DropzoneFilePreview.js.map +1 -1
  89. package/Dropzone/DropzoneSinglePickPreview.js +2 -3
  90. package/Dropzone/DropzoneSinglePickPreview.js.map +1 -1
  91. package/Dropzone/DropzoneUtils.js.map +1 -1
  92. package/Dropzone/index.js +6 -5
  93. package/Form/Form.js +14 -15
  94. package/Form/Form.js.map +1 -1
  95. package/Form/FormRenderControl.js +6 -7
  96. package/Form/FormRenderControl.js.map +1 -1
  97. package/Form/Form_old.js +4 -5
  98. package/Form/Form_old.js.map +1 -1
  99. package/FormCheckbox/FormCheckbox.js +4 -4
  100. package/FormCheckbox/FormCheckbox.js.map +1 -1
  101. package/FormCombobox/FormCombobox.js +4 -4
  102. package/FormCombobox/FormCombobox.js.map +1 -1
  103. package/FormDatePicker/FormDatePicker.js +4 -4
  104. package/FormDatePicker/FormDatePicker.js.map +1 -1
  105. package/FormDropzone/FormDropzone.js +3 -3
  106. package/FormDropzone/FormDropzone.js.map +1 -1
  107. package/FormInput/FormInput.js +6 -6
  108. package/FormInput/FormInput.js.map +1 -1
  109. package/FormInput/FormInput.stories.js.map +1 -1
  110. package/FormRadio/FormRadio.js.map +1 -1
  111. package/FormSelect/FormSelect.js +6 -9
  112. package/FormSelect/FormSelect.js.map +1 -1
  113. package/FormTextarea/FormTextarea.js +4 -4
  114. package/FormTextarea/FormTextarea.js.map +1 -1
  115. package/Header/Header.js.map +1 -1
  116. package/HoverCard/HoverCard.js.map +1 -1
  117. package/InfoBlock/InfoBlock.js.map +1 -1
  118. package/InfoBlock/InfoBlock.stories.js.map +1 -1
  119. package/InfoBlock/infoBlockVariants.js.map +1 -1
  120. package/Input/Input.js.map +1 -1
  121. package/Input/Input.stories.js.map +1 -1
  122. package/Input/inputVariants.js.map +1 -1
  123. package/InputOTP/InputOTP.d.ts.map +1 -1
  124. package/InputOTP/InputOTP.js.map +1 -1
  125. package/LICENSE +21 -21
  126. package/Label/Label.js.map +1 -1
  127. package/Label/labelVariants.js.map +1 -1
  128. package/LazyLoader/LazyLoader.js +4 -5
  129. package/LazyLoader/LazyLoader.js.map +1 -1
  130. package/LoadedIcon/LoadedIcon.js.map +1 -1
  131. package/LoadingMask/LoadingMask.js.map +1 -1
  132. package/LoadingMask/RenderLoadingMask.js.map +1 -1
  133. package/LoadingProgress/LoadingProgress.js.map +1 -1
  134. package/LoadingProgress/loadingProgressVariants.js.map +1 -1
  135. package/Menubar/Menubar.js.map +1 -1
  136. package/NavigationMenu/NavigationMenu.js.map +1 -1
  137. package/NavigationMenu/navigationMenuVariants.js.map +1 -1
  138. package/Pagination/Pagination.js +0 -1
  139. package/Pagination/Pagination.js.map +1 -1
  140. package/Popover/Popover.js.map +1 -1
  141. package/Progress/Progress.js.map +1 -1
  142. package/README.md +7 -7
  143. package/Radio/Radio.js.map +1 -1
  144. package/RadioGroup/RadioGroup.js.map +1 -1
  145. package/Resizable/Resizable.js.map +1 -1
  146. package/Resizable/Resizable.stories.js.map +1 -1
  147. package/ScrollArea/ScrollArea.js.map +1 -1
  148. package/Search/Search.js +9 -9
  149. package/Search/Search.js.map +1 -1
  150. package/Search/Search.stories.js.map +1 -1
  151. package/Select/Select.js +6 -7
  152. package/Select/Select.js.map +1 -1
  153. package/Select/Select.stories.js.map +1 -1
  154. package/Select/SelectRoot.js.map +1 -1
  155. package/Separator/Separator.js.map +1 -1
  156. package/Sheet/Sheet.js.map +1 -1
  157. package/Sidebar/Sidebar.js +20 -21
  158. package/Sidebar/Sidebar.js.map +1 -1
  159. package/Skeleton/Skeleton.js.map +1 -1
  160. package/Slider/Slider.js.map +1 -1
  161. package/Sonner/Sonner.js.map +1 -1
  162. package/Switch/Switch.js.map +1 -1
  163. package/Switch/Switch.stories.js.map +1 -1
  164. package/Table/Table.js.map +1 -1
  165. package/TablePagination/TablePagination.js +21 -26
  166. package/TablePagination/TablePagination.js.map +1 -1
  167. package/Tabs/Tabs.js.map +1 -1
  168. package/Tabs/TabsRoot.js.map +1 -1
  169. package/Textarea/Textarea.js.map +1 -1
  170. package/Textarea/Textarea.stories.js.map +1 -1
  171. package/Textarea/useAutosizeTextArea.js.map +1 -1
  172. package/Theme/ThemeModeToggle.js +3 -4
  173. package/Theme/ThemeModeToggle.js.map +1 -1
  174. package/Theme/ThemeProvider.js.map +1 -1
  175. package/Toast/Toast.js.map +1 -1
  176. package/Toast/toast.constants.js.map +1 -1
  177. package/Toast/toastVariants.js.map +1 -1
  178. package/Toast/useToast.js.map +1 -1
  179. package/Toaster/Toaster.js.map +1 -1
  180. package/Toggle/Toggle.js.map +1 -1
  181. package/ToggleGroup/ToggleGroup.js.map +1 -1
  182. package/Tooltip/Tooltip.js.map +1 -1
  183. package/Tooltip/TooltipRoot.js.map +1 -1
  184. package/Tooltip/tooltipVariants.js.map +1 -1
  185. package/index.js +304 -303
  186. package/package.json +4 -4
  187. package/vite-env.d.ts +7 -7
@@ -1,73 +1,74 @@
1
- import { jsxs as r, jsx as e, Fragment as U } from "react/jsx-runtime";
2
- import { X as M, Plus as Se, UploadIcon as Me, FileTextIcon as V, InfoIcon as ee } from "lucide-react";
3
- import { forwardRef as ke, useState as te, useEffect as Re, useImperativeHandle as We } from "react";
4
- import { useDropzone as Ae } from "react-dropzone";
1
+ import { jsxs as l, jsx as t, Fragment as V } from "react/jsx-runtime";
2
+ import { X as M, Plus as ke, UploadIcon as We, FileTextIcon as ee, InfoIcon as te } from "lucide-react";
3
+ import { forwardRef as _e, useState as le, useEffect as $e, useImperativeHandle as Le } from "react";
4
+ import { useDropzone as Ge } from "react-dropzone";
5
5
  import { cn as x } from "@oneplatformdev/utils";
6
- import { Card as _e } from "../Card/Card.js";
7
- import { DEFAULT_FILE_TYPES as $e } from "./Dropzone.types.js";
8
- import { FilePreview as re } from "./DropzoneFilePreview.js";
9
- import { DropzoneSinglePickPreview as Xe } from "./DropzoneSinglePickPreview.js";
10
- import { isFile as z, isVideoUrl as Ge, extractName as Ke } from "./DropzoneUtils.js";
11
- import { Button as Le } from "../Button/Button.js";
12
- import "../Button/buttonVariants.js";
13
- import Oe from "./icons/file-csv.svg.js";
6
+ import { Card as Xe } from "../Card/Card.js";
7
+ import { DEFAULT_FILE_TYPES as Ke } from "./Dropzone.types.js";
8
+ import { DropzoneCoverPreview as re } from "./DropzoneCoverPreview.js";
9
+ import { DropzoneFileCard as Oe } from "./DropzoneFileCard.js";
10
+ import { FilePreview as Te } from "./DropzoneFilePreview.js";
11
+ import { DropzoneSinglePickPreview as qe } from "./DropzoneSinglePickPreview.js";
12
+ import { isFile as F, isVideoUrl as He, extractName as oe } from "./DropzoneUtils.js";
13
+ import Je from "./icons/file-csv.svg.js";
14
14
  import Pe from "./icons/file-doc.svg.js";
15
- import Te from "./icons/file-docx.svg.js";
16
- import le from "./icons/file-jpg.svg.js";
17
- import qe from "./icons/file-pdf.svg.js";
18
- import He from "./icons/file-png.svg.js";
19
- import Je from "./icons/file-ppt.svg.js";
20
- import Ye from "./icons/file-pptx.svg.js";
21
- import Ze from "./icons/file-rar.svg.js";
22
- import Qe from "./icons/file-svg.svg.js";
23
- import Ue from "./icons/file-webp.svg.js";
24
- import Ve from "./icons/file-xls.svg.js";
25
- import et from "./icons/file-xlsx.svg.js";
26
- import tt from "./icons/file-zip.svg.js";
27
- const b = (l = 0) => {
28
- if (!l || l < 0) return "0 KB";
29
- const s = 1024, m = s * 1024, a = m * 1024;
30
- if (l >= a) return `${(l / a).toFixed(2)} GB`;
31
- if (l >= m) {
32
- const c = l / m;
33
- return `${c >= 100 ? c.toFixed(0) : c.toFixed(2)} MB`;
15
+ import Ye from "./icons/file-docx.svg.js";
16
+ import ie from "./icons/file-jpg.svg.js";
17
+ import Ze from "./icons/file-pdf.svg.js";
18
+ import Qe from "./icons/file-png.svg.js";
19
+ import Ue from "./icons/file-ppt.svg.js";
20
+ import Ve from "./icons/file-pptx.svg.js";
21
+ import et from "./icons/file-rar.svg.js";
22
+ import tt from "./icons/file-svg.svg.js";
23
+ import lt from "./icons/file-webp.svg.js";
24
+ import rt from "./icons/file-xls.svg.js";
25
+ import ot from "./icons/file-xlsx.svg.js";
26
+ import it from "./icons/file-zip.svg.js";
27
+ import { Button as nt } from "../Button/Button.js";
28
+ const z = (r = 0) => {
29
+ if (!r || r < 0) return "0 KB";
30
+ const s = 1024, d = s * 1024, m = d * 1024;
31
+ if (r >= m) return `${(r / m).toFixed(2)} GB`;
32
+ if (r >= d) {
33
+ const a = r / d;
34
+ return `${a >= 100 ? a.toFixed(0) : a.toFixed(2)} MB`;
34
35
  }
35
- return l >= s ? `${(l / s).toFixed(l / s >= 100 ? 0 : 1)} KB` : `${l} B`;
36
- }, rt = {
37
- csv: Oe,
36
+ return r >= s ? `${(r / s).toFixed(r / s >= 100 ? 0 : 1)} KB` : `${r} B`;
37
+ }, st = {
38
+ csv: Je,
38
39
  doc: Pe,
39
- docx: Te,
40
- jpg: le,
41
- jpeg: le,
42
- pdf: qe,
43
- png: He,
44
- ppt: Je,
45
- pptx: Ye,
46
- rar: Ze,
47
- svg: Qe,
48
- webp: Ue,
49
- xls: Ve,
50
- xlsx: et,
51
- zip: tt
52
- }, lt = (l) => {
53
- if (!l) return "";
54
- const s = l.toLowerCase().split(".");
40
+ docx: Ye,
41
+ jpg: ie,
42
+ jpeg: ie,
43
+ pdf: Ze,
44
+ png: Qe,
45
+ ppt: Ue,
46
+ pptx: Ve,
47
+ rar: et,
48
+ svg: tt,
49
+ webp: lt,
50
+ xls: rt,
51
+ xlsx: ot,
52
+ zip: it
53
+ }, ct = (r) => {
54
+ if (!r) return "";
55
+ const s = r.toLowerCase().split(".");
55
56
  return s.length > 1 ? s[s.length - 1] : "";
56
- }, it = (l) => {
57
- const s = lt(l);
58
- return rt[s] ?? null;
59
- }, nt = (l, s) => {
60
- if (l === s) return !0;
61
- if (l.length !== s.length) return !1;
62
- for (let m = 0; m < l.length; m++) {
63
- const a = l[m], c = s[m];
64
- if (a !== c) {
65
- if (typeof a == "string" && typeof c == "string") {
66
- if (a !== c) return !1;
57
+ }, ne = (r) => {
58
+ const s = ct(r);
59
+ return st[s] ?? null;
60
+ }, at = (r, s) => {
61
+ if (r === s) return !0;
62
+ if (r.length !== s.length) return !1;
63
+ for (let d = 0; d < r.length; d++) {
64
+ const m = r[d], a = s[d];
65
+ if (m !== a) {
66
+ if (typeof m == "string" && typeof a == "string") {
67
+ if (m !== a) return !1;
67
68
  continue;
68
69
  }
69
- if (z(a) && z(c)) {
70
- if (a.name !== c.name || a.size !== c.size || a.type !== c.type || a.lastModified !== c.lastModified)
70
+ if (F(m) && F(a)) {
71
+ if (m.name !== a.name || m.size !== a.size || m.type !== a.type || m.lastModified !== a.lastModified)
71
72
  return !1;
72
73
  continue;
73
74
  }
@@ -75,128 +76,141 @@ const b = (l = 0) => {
75
76
  }
76
77
  }
77
78
  return !0;
78
- }, ot = ke(
79
+ }, dt = _e(
79
80
  ({
80
- acceptTypes: l = $e,
81
+ acceptTypes: r = Ke,
81
82
  maxSizeMB: s,
82
- maxFiles: m = 1,
83
- onErrors: a,
84
- hideErrors: c = !1,
83
+ maxFiles: d = 1,
84
+ onErrors: m,
85
+ hideErrors: a = !1,
85
86
  disabled: f = !1,
86
- classNames: u,
87
- value: v,
88
- onChangeValue: K,
89
- className: ie,
90
- labelDropzonePrompt: k = "Drop files here or click to select",
91
- labelDropzoneSubPrompt: ne = "",
92
- labelOrClickToSelect: oe = "Upload file",
93
- labelSelectedFiles: se = "Selected Files",
94
- labelUploadErrors: ce = "Upload Errors",
95
- labelFileTooLarge: R = "File is too large",
96
- labelInvalidFileType: I = "Invalid file type",
97
- labelVideoUploaded: ae = "Uploaded",
98
- labelVideoReplace: de = "Replace",
87
+ classNames: b,
88
+ value: I,
89
+ onChangeValue: q,
90
+ className: se,
91
+ labelDropzonePrompt: R = "Drop files here or click to select",
92
+ labelDropzoneSubPrompt: ce = "",
93
+ labelOrClickToSelect: ae = "Upload file",
94
+ labelSelectedFiles: de = "Selected Files",
95
+ labelUploadErrors: me = "Upload Errors",
96
+ labelFileTooLarge: k = "File is too large",
97
+ labelInvalidFileType: y = "Invalid file type",
98
+ labelVideoUploaded: fe = "Uploaded",
99
+ labelVideoReplace: pe = "Replace",
99
100
  singlePick: n = !1,
100
- labelDropzoneClassname: me,
101
- labelDropzoneSubClassname: fe,
101
+ labelDropzoneClassname: xe,
102
+ labelDropzoneSubClassname: he,
102
103
  isUploading: p = !1,
103
- uploadProgress: L = 0,
104
- uploadLoadedBytes: pe = 0,
105
- uploadTotalBytes: xe = 0,
106
- onCancelUpload: O,
107
- labelUploadingTitle: he = "Uploading video...",
108
- labelUploadingHint: ue = "Please do not close this page",
109
- labelUploadingActionCancel: ge = "Cancel",
110
- labelUploadingOf: we = "of",
111
- playerTranslations: Ne,
104
+ uploadProgress: H = 0,
105
+ uploadLoadedBytes: ue = 0,
106
+ uploadTotalBytes: ge = 0,
107
+ onCancelUpload: J,
108
+ labelUploadingTitle: Ne = "Uploading video...",
109
+ labelUploadingHint: Fe = "Please do not close this page",
110
+ labelUploadingActionCancel: we = "Cancel",
111
+ labelUploadingOf: ve = "of",
112
+ playerTranslations: Ce,
112
113
  singlePickFileInfo: W,
113
- persistentDropzone: P = !1,
114
- previewVariant: g = "default",
115
- coverFirstItem: Fe = !1,
116
- ...A
117
- }, ve) => {
118
- const [i, y] = te(v ?? []), [h, T] = te([]), w = i[0], _ = h[0]?.file, Ce = !!_?.type?.includes("image"), $ = n && i.length > 0 && z(w), be = $ && w.type.includes("image"), q = $ && w.type.includes("video") || n && i.length > 0 && typeof w == "string" && Ge(w), X = $ && !be && !q, H = n && !i.length && !!_ && !Ce, N = X ? w : _, D = it(N?.name), E = n && q, ze = E, j = n && i.length > 0, Ie = j && !X && !E, ye = (t, d) => {
119
- T(d), a?.(d);
120
- const o = n ? t.slice(0, 1) : [...i, ...t].slice(0, m);
121
- y(o), K?.(o);
114
+ persistentDropzone: _ = !1,
115
+ previewVariant: h = "default",
116
+ coverFirstItem: ze = !1,
117
+ ...$
118
+ }, be) => {
119
+ const [o, A] = le(I ?? []), [u, P] = le([]), w = o[0], L = u[0]?.file, Ie = !!L?.type?.includes("image"), G = n && o.length > 0 && F(w), Ee = G && w.type.includes("image"), Y = G && w.type.includes("video") || n && o.length > 0 && typeof w == "string" && He(w), X = G && !Ee && !Y, Z = n && !o.length && !!L && !Ie, v = X ? w : L, S = ne(v?.name), j = n && Y, De = j, B = n && o.length > 0, ye = B && !X && !j, N = h === "file-list" && !n && o.length >= d, Ae = (e, c) => {
120
+ P(c), m?.(c);
121
+ const i = n ? e.slice(0, 1) : [...o, ...e].slice(0, d);
122
+ A(i), q?.(i);
122
123
  };
123
- Re(() => {
124
- v && !nt(i, v) && y(v);
125
- }, [i, v]);
126
- const B = (t, d) => {
124
+ $e(() => {
125
+ I && !at(o, I) && A(I);
126
+ }, [o, I]);
127
+ const E = (e, c) => {
127
128
  if (f) return;
128
- t.stopPropagation();
129
- const o = i.filter((F, S) => S !== d);
130
- y(o), K?.(o);
131
- }, { getRootProps: De, getInputProps: Ee, isDragActive: je, open: G } = Ae({
132
- onDrop: ye,
133
- accept: l.reduce((t, d) => (t[d] = [], t), {}),
129
+ e.stopPropagation();
130
+ const i = o.filter((g, C) => C !== c);
131
+ A(i), q?.(i);
132
+ }, { getRootProps: Se, getInputProps: je, isDragActive: Be, open: K } = Ge({
133
+ onDrop: Ae,
134
+ accept: r.reduce((e, c) => (e[c] = [], e), {}),
134
135
  maxSize: s * 1024 * 1024,
135
- maxFiles: n ? 1 : m,
136
- disabled: f || p,
136
+ maxFiles: n ? 1 : d,
137
+ disabled: f || p || N,
137
138
  noClick: !0
138
139
  });
139
- We(ve, () => ({
140
- setItems: y
140
+ Le(be, () => ({
141
+ setItems: A
141
142
  }), []);
142
- const C = Fe && g === "image-grid" && !n && i.length > 0, J = !p && !n && P && i.length > 0, Y = C ? i.slice(1) : i, Z = !f && !n && g === "image-grid" && i.length > 0 && i.length < m, Q = !p && !n && (Y.length > 0 || Z) && /* @__PURE__ */ r("div", { className: x("w-full mt-2", u?.previewWrapper), children: [
143
- g === "default" && /* @__PURE__ */ r("pre", { className: "font-semibold text-gray-600", children: [
144
- se,
143
+ const D = ze && h === "image-grid" && !n && o.length > 0, O = !p && !n && _ && o.length > 0, T = D ? o.slice(1) : o, Q = !f && !n && h === "image-grid" && o.length > 0 && o.length < d, Me = !n && h === "image-grid" && (_ || o.length === 0), U = !p && !n && (T.length > 0 || Q) && /* @__PURE__ */ l("div", { className: x("w-full mt-2", b?.previewWrapper), children: [
144
+ h === "default" && /* @__PURE__ */ l("pre", { className: "font-semibold text-gray-600", children: [
145
+ de,
145
146
  ":"
146
147
  ] }),
147
- /* @__PURE__ */ r(
148
+ h === "file-list" ? /* @__PURE__ */ t("div", { className: "mt-2 flex flex-col gap-2", children: T.map((e, c) => {
149
+ const i = F(e) ? e.name : oe(e), g = F(e) ? z(e.size) : "";
150
+ return /* @__PURE__ */ t(
151
+ Oe,
152
+ {
153
+ name: i,
154
+ sizeLabel: g,
155
+ iconSrc: ne(i),
156
+ disabled: f,
157
+ onRemove: (C) => E(C, c)
158
+ },
159
+ c
160
+ );
161
+ }) }) : /* @__PURE__ */ l(
148
162
  "ul",
149
163
  {
150
164
  className: x(
151
165
  "mt-2 text-sm text-gray-500 flex flex-wrap items-start",
152
- g === "image-grid" ? "gap-2 justify-start" : "gap-4 justify-center"
166
+ h === "image-grid" ? "gap-2 justify-start" : "gap-4 justify-center"
153
167
  ),
154
168
  children: [
155
- Y.map((t, d) => {
156
- const o = C ? d + 1 : d, F = z(t) ? t.name : Ke(t), S = z(t) ? b(t.size) : "";
157
- return /* @__PURE__ */ r(
169
+ T.map((e, c) => {
170
+ const i = D ? c + 1 : c, g = F(e) ? e.name : oe(e), C = F(e) ? z(e.size) : "";
171
+ return /* @__PURE__ */ l(
158
172
  "li",
159
173
  {
160
174
  className: x(
161
175
  "relative",
162
- g === "image-grid" ? "w-[75px] h-[75px]" : "flex flex-col items-center gap-2"
176
+ h === "image-grid" ? "w-[75px] h-[75px]" : "flex flex-col items-center gap-2"
163
177
  ),
164
178
  children: [
165
- /* @__PURE__ */ r("div", { className: "relative w-full h-full", children: [
166
- /* @__PURE__ */ e(re, { item: t, styles: u }),
167
- /* @__PURE__ */ e(
179
+ /* @__PURE__ */ l("div", { className: "relative w-full h-full", children: [
180
+ h === "image-grid" ? /* @__PURE__ */ t(re, { item: e, className: "rounded-[8px]" }) : /* @__PURE__ */ t(Te, { item: e, styles: b }),
181
+ /* @__PURE__ */ t(
168
182
  "div",
169
183
  {
170
184
  className: x(
171
- "absolute top-0 right-0 cursor-pointer bg-gray-300 rounded-sm",
172
- g === "image-grid" && "top-1 right-1 bg-white/90 rounded-full p-0.5"
185
+ "absolute top-0 right-0 z-20 cursor-pointer bg-gray-300 rounded-sm",
186
+ h === "image-grid" && "top-1 right-1 bg-white/90 rounded-full p-0.5"
173
187
  ),
174
- onClick: (Be) => B(Be, o),
175
- children: /* @__PURE__ */ e(M, { size: 16, strokeWidth: 1, color: "black" })
188
+ onClick: (Re) => E(Re, i),
189
+ children: /* @__PURE__ */ t(M, { size: 16, strokeWidth: 1, color: "black" })
176
190
  }
177
191
  )
178
192
  ] }),
179
- g === "default" && /* @__PURE__ */ r("span", { className: "inline-flex flex-col items-center", children: [
180
- /* @__PURE__ */ e("span", { className: "max-w-[80px] text-ellipsis overflow-hidden whitespace-nowrap", children: F }),
181
- S && /* @__PURE__ */ r("span", { children: [
193
+ h === "default" && /* @__PURE__ */ l("span", { className: "inline-flex flex-col items-center", children: [
194
+ /* @__PURE__ */ t("span", { className: "max-w-[80px] text-ellipsis overflow-hidden whitespace-nowrap", children: g }),
195
+ C && /* @__PURE__ */ l("span", { children: [
182
196
  "(",
183
- S,
197
+ C,
184
198
  ")"
185
199
  ] })
186
200
  ] })
187
201
  ]
188
202
  },
189
- o
203
+ i
190
204
  );
191
205
  }),
192
- Z && /* @__PURE__ */ e(
206
+ Q && /* @__PURE__ */ t(
193
207
  "li",
194
208
  {
195
209
  className: "relative w-[75px] h-[75px] flex items-center justify-center rounded-[8px] border border-dashed border-[#9368FF80] bg-[#FCFCFC] cursor-pointer hover:bg-[#9368FF0F]",
196
- onClick: (t) => {
197
- t.stopPropagation(), !(f || p) && G();
210
+ onClick: (e) => {
211
+ e.stopPropagation(), !(f || p) && K();
198
212
  },
199
- children: /* @__PURE__ */ e("div", { className: "flex size-6 items-center justify-center rounded-full bg-[#9368FF1F]", children: /* @__PURE__ */ e(Se, { size: 16, className: "text-[#9368FF]" }) })
213
+ children: /* @__PURE__ */ t("div", { className: "flex size-6 items-center justify-center rounded-full bg-[#9368FF1F]", children: /* @__PURE__ */ t(ke, { size: 16, className: "text-[#9368FF]" }) })
200
214
  },
201
215
  "add-more"
202
216
  )
@@ -204,282 +218,291 @@ const b = (l = 0) => {
204
218
  }
205
219
  )
206
220
  ] });
207
- return /* @__PURE__ */ r("div", { className: "w-full select-none", children: [
208
- /* @__PURE__ */ r(
209
- _e,
221
+ return /* @__PURE__ */ l("div", { className: "w-full select-none", children: [
222
+ /* @__PURE__ */ l(
223
+ Xe,
210
224
  {
211
- ...A,
212
- ...De({
213
- onClick: (t) => {
214
- if (!(f || p)) {
215
- if (ze) {
216
- A.onClick?.(t);
225
+ ...$,
226
+ ...Se({
227
+ onClick: (e) => {
228
+ if (!(f || p || N)) {
229
+ if (De) {
230
+ $.onClick?.(e);
217
231
  return;
218
232
  }
219
- G(), A.onClick?.(t);
233
+ K(), $.onClick?.(e);
220
234
  }
221
235
  }
222
236
  }),
223
237
  className: x(
224
238
  "w-full text-center flex flex-col items-center justify-center gap-6 cursor-pointer",
225
- !j && "border border-dashed border-[#9368FF80] rounded-[8px] bg-[#FCFCFC] p-4",
226
- j && "min-h-0 border-0 bg-transparent p-0",
227
- C && "relative",
239
+ !B && "border border-dashed border-[#9368FF80] rounded-[8px] bg-[#FCFCFC] p-4",
240
+ B && "min-h-0 border-0 bg-transparent p-0",
241
+ Me && "aspect-video h-auto",
242
+ D && "relative",
228
243
  f && "border-[#E4E4E7] pointer-events-none",
229
- h.length > 0 && !j && "border-red-500",
230
- je && "bg-gray-100",
244
+ u.length > 0 && !B && "border-red-500",
245
+ Be && "bg-gray-100",
231
246
  n && "shadow-none!",
232
- n && i.length > 0 && !E && "p-0! shadow-none!",
233
- E && "h-auto! max-h-none! min-h-0! p-2!",
234
- Ie && "h-64",
235
- ie
247
+ n && o.length > 0 && !j && "p-0! shadow-none!",
248
+ j && "h-auto! max-h-none! min-h-0! p-2!",
249
+ ye && "h-64",
250
+ N && O && "border-[#E4E4E7] bg-[#F5F5F5] cursor-default pointer-events-none",
251
+ se
236
252
  ),
237
253
  children: [
238
- /* @__PURE__ */ e("input", { ...Ee() }),
239
- p && /* @__PURE__ */ r(
254
+ /* @__PURE__ */ t("input", { ...je() }),
255
+ p && /* @__PURE__ */ l(
240
256
  "div",
241
257
  {
242
258
  className: "w-full h-full min-h-46 rounded-lg border border-[#E4E4E7] bg-[#FCFCFC] flex flex-col items-center justify-center gap-4 p-4",
243
- onClick: (t) => t.stopPropagation(),
259
+ onClick: (e) => e.stopPropagation(),
244
260
  children: [
245
- /* @__PURE__ */ r("div", { className: "relative h-24 w-24", children: [
246
- /* @__PURE__ */ e("svg", { className: "h-24 w-24", viewBox: "0 0 100 100", children: /* @__PURE__ */ e("circle", { cx: "50", cy: "50", r: "42", stroke: "#E6E1F5", strokeWidth: "8", fill: "none" }) }),
247
- /* @__PURE__ */ r("span", { className: "absolute inset-0 flex items-center justify-center text-lg font-semibold text-foreground", children: [
248
- Math.max(0, Math.min(100, Math.round(L))),
261
+ /* @__PURE__ */ l("div", { className: "relative h-24 w-24", children: [
262
+ /* @__PURE__ */ t("svg", { className: "h-24 w-24", viewBox: "0 0 100 100", children: /* @__PURE__ */ t("circle", { cx: "50", cy: "50", r: "42", stroke: "#E6E1F5", strokeWidth: "8", fill: "none" }) }),
263
+ /* @__PURE__ */ l("span", { className: "absolute inset-0 flex items-center justify-center text-lg font-semibold text-foreground", children: [
264
+ Math.max(0, Math.min(100, Math.round(H))),
249
265
  "%"
250
266
  ] })
251
267
  ] }),
252
- /* @__PURE__ */ r("div", { className: "text-center", children: [
253
- /* @__PURE__ */ e("p", { className: "text-xl font-semibold text-foreground", children: he }),
254
- /* @__PURE__ */ r("p", { className: "text-sm text-[#666A78]", children: [
255
- b(pe),
268
+ /* @__PURE__ */ l("div", { className: "text-center", children: [
269
+ /* @__PURE__ */ t("p", { className: "text-xl font-semibold text-foreground", children: Ne }),
270
+ /* @__PURE__ */ l("p", { className: "text-sm text-[#666A78]", children: [
271
+ z(ue),
256
272
  " ",
257
- we,
273
+ ve,
258
274
  " ",
259
- b(xe)
275
+ z(ge)
260
276
  ] }),
261
- /* @__PURE__ */ e("p", { className: "mt-2 text-sm text-[#666A78]", children: ue })
277
+ /* @__PURE__ */ t("p", { className: "mt-2 text-sm text-[#666A78]", children: Fe })
262
278
  ] }),
263
- /* @__PURE__ */ e("div", { className: "w-full max-w-[520px] h-2 rounded-full bg-[#E6E1F5] overflow-hidden", children: /* @__PURE__ */ e(
279
+ /* @__PURE__ */ t("div", { className: "w-full max-w-[520px] h-2 rounded-full bg-[#E6E1F5] overflow-hidden", children: /* @__PURE__ */ t(
264
280
  "div",
265
281
  {
266
282
  className: "h-full bg-[#9368FF] transition-[width] duration-150 ease-linear",
267
- style: { width: `${Math.max(0, Math.min(100, L))}%` }
283
+ style: { width: `${Math.max(0, Math.min(100, H))}%` }
268
284
  }
269
285
  ) }),
270
- O && /* @__PURE__ */ e(
286
+ J && /* @__PURE__ */ t(
271
287
  "button",
272
288
  {
273
289
  type: "button",
274
290
  className: "mt-1 h-10 min-w-36 rounded-md border border-[#E4E4E7] bg-white px-6 text-base font-medium text-foreground cursor-pointer",
275
- onClick: (t) => {
276
- t.stopPropagation(), O();
291
+ onClick: (e) => {
292
+ e.stopPropagation(), J();
277
293
  },
278
- children: ge
294
+ children: we
279
295
  }
280
296
  )
281
297
  ]
282
298
  }
283
299
  ),
284
- !p && C && /* @__PURE__ */ r(
300
+ !p && D && /* @__PURE__ */ l(
285
301
  "div",
286
302
  {
287
303
  className: "absolute inset-0 rounded-[8px] overflow-hidden",
288
- onClick: (t) => t.stopPropagation(),
304
+ onClick: (e) => e.stopPropagation(),
289
305
  children: [
290
- /* @__PURE__ */ e(
291
- re,
292
- {
293
- item: i[0],
294
- styles: {
295
- ...u,
296
- previewWraper: x(
297
- "w-full h-full rounded-[8px] border-0",
298
- u?.previewWraper?.replace(/w-\[[^\]]+\]|h-\[[^\]]+\]/g, "")
299
- )
300
- }
301
- }
302
- ),
303
- /* @__PURE__ */ e(
306
+ /* @__PURE__ */ t(re, { item: o[0], className: "rounded-[8px]" }),
307
+ /* @__PURE__ */ t(
304
308
  "div",
305
309
  {
306
- className: "absolute top-2 right-2 cursor-pointer bg-white/90 rounded-full p-1",
307
- onClick: (t) => B(t, 0),
308
- children: /* @__PURE__ */ e(M, { size: 16, strokeWidth: 1, color: "black" })
310
+ className: "absolute top-2 right-2 z-20 cursor-pointer bg-white/90 rounded-full p-1",
311
+ onClick: (e) => E(e, 0),
312
+ children: /* @__PURE__ */ t(M, { size: 16, strokeWidth: 1, color: "black" })
309
313
  }
310
314
  )
311
315
  ]
312
316
  }
313
317
  ),
314
- !p && (i.length === 0 || !n && P) && (h.length === 0 || !n) && /* @__PURE__ */ r(
318
+ !p && (o.length === 0 || !n && _) && (u.length === 0 || !n) && /* @__PURE__ */ l(
315
319
  "div",
316
320
  {
317
321
  className: x(
318
322
  "flex flex-col items-center gap-2 w-full",
319
- u?.idleWrapper,
320
- C && "invisible"
323
+ b?.idleWrapper,
324
+ D && "invisible"
321
325
  ),
322
326
  children: [
323
- /* @__PURE__ */ e("div", { className: "flex size-12 items-center justify-center rounded-full bg-[#9368FF1F]", children: /* @__PURE__ */ e(Me, { className: "size-6 text-[#9368FF]" }) }),
324
- /* @__PURE__ */ e("div", { className: "flex flex-col items-center gap-1 w-full", children: !f && /* @__PURE__ */ r(U, { children: [
325
- /* @__PURE__ */ e(
327
+ /* @__PURE__ */ t(
328
+ "div",
329
+ {
330
+ className: x(
331
+ "flex size-12 items-center justify-center rounded-full bg-[#9368FF1F]",
332
+ N && "bg-[#EDEDF0]"
333
+ ),
334
+ children: /* @__PURE__ */ t(
335
+ We,
336
+ {
337
+ className: x(
338
+ "size-6 text-[#9368FF]",
339
+ N && "text-[#A1A1AA]"
340
+ )
341
+ }
342
+ )
343
+ }
344
+ ),
345
+ /* @__PURE__ */ t("div", { className: "flex flex-col items-center gap-1 w-full", children: !f && /* @__PURE__ */ l(V, { children: [
346
+ /* @__PURE__ */ t(
326
347
  "span",
327
348
  {
328
349
  className: x(
329
350
  "font-semibold text-[14px] leading-[125%] text-[#06080D] text-center w-full whitespace-pre-line",
330
- me
351
+ N && "text-[#A1A1AA]",
352
+ xe
331
353
  ),
332
- children: k
354
+ children: R
333
355
  }
334
356
  ),
335
- /* @__PURE__ */ e(
357
+ /* @__PURE__ */ t(
336
358
  "span",
337
359
  {
338
360
  className: x(
339
361
  "font-medium text-[12px] leading-[120%] text-[#666A78] text-center w-full whitespace-pre-line",
340
- fe
362
+ he
341
363
  ),
342
- children: ne
364
+ children: ce
343
365
  }
344
366
  )
345
367
  ] }) }),
346
- !f && /* @__PURE__ */ e(
347
- Le,
368
+ !f && /* @__PURE__ */ t(
369
+ nt,
348
370
  {
349
371
  type: "button",
350
372
  size: "md",
351
- children: oe
373
+ disabled: N,
374
+ children: ae
352
375
  }
353
376
  )
354
377
  ]
355
378
  }
356
379
  ),
357
- !p && n && h.length > 0 && !H && /* @__PURE__ */ r("div", { className: x("w-full mt-4", u?.errorWrapper), children: [
358
- /* @__PURE__ */ r("span", { className: "font-semibold text-red-500", children: [
359
- ce,
380
+ !p && n && u.length > 0 && !Z && /* @__PURE__ */ l("div", { className: x("w-full mt-4", b?.errorWrapper), children: [
381
+ /* @__PURE__ */ l("span", { className: "font-semibold text-red-500", children: [
382
+ me,
360
383
  ":"
361
384
  ] }),
362
- /* @__PURE__ */ e("ul", { className: "mt-2 text-sm text-red-500 list-disc list-inside", children: h.map((t, d) => /* @__PURE__ */ r("li", { children: [
363
- t.file.name,
385
+ /* @__PURE__ */ t("ul", { className: "mt-2 text-sm text-red-500 list-disc list-inside", children: u.map((e, c) => /* @__PURE__ */ l("li", { children: [
386
+ e.file.name,
364
387
  " (",
365
- b(t.file.size),
388
+ z(e.file.size),
366
389
  ")",
367
- !c && /* @__PURE__ */ e("ul", { className: "ml-4 list-disc list-inside", children: t.errors.map((o, F) => /* @__PURE__ */ r("li", { children: [
368
- o.code === "file-too-large" && R,
369
- o.code === "file-invalid-type" && I,
370
- o.code !== "file-too-large" && o.code !== "file-invalid-type" && o.message
371
- ] }, F)) })
372
- ] }, d)) })
390
+ !a && /* @__PURE__ */ t("ul", { className: "ml-4 list-disc list-inside", children: e.errors.map((i, g) => /* @__PURE__ */ l("li", { children: [
391
+ i.code === "file-too-large" && k,
392
+ i.code === "file-invalid-type" && y,
393
+ i.code !== "file-too-large" && i.code !== "file-invalid-type" && i.message
394
+ ] }, g)) })
395
+ ] }, c)) })
373
396
  ] }),
374
- !p && !!(n && i.length) && /* @__PURE__ */ e(U, { children: X ? /* @__PURE__ */ r(
397
+ !p && !!(n && o.length) && /* @__PURE__ */ t(V, { children: X ? /* @__PURE__ */ l(
375
398
  "div",
376
399
  {
377
400
  className: "w-full max-w-[502px] flex flex-col items-center gap-4",
378
- onClick: (t) => t.stopPropagation(),
401
+ onClick: (e) => e.stopPropagation(),
379
402
  children: [
380
- /* @__PURE__ */ e("p", { className: "w-full text-center text-[16px] leading-[130%] font-semibold text-[#06080D]", children: k }),
381
- /* @__PURE__ */ r("div", { className: "w-full min-h-[72px] rounded-[8px] bg-[#F5F5F5] p-4 flex items-center gap-4", children: [
382
- D ? /* @__PURE__ */ e(
403
+ /* @__PURE__ */ t("p", { className: "w-full text-center text-[16px] leading-[130%] font-semibold text-[#06080D]", children: R }),
404
+ /* @__PURE__ */ l("div", { className: "w-full min-h-[72px] rounded-[8px] bg-[#F5F5F5] p-4 flex items-center gap-4", children: [
405
+ S ? /* @__PURE__ */ t(
383
406
  "img",
384
407
  {
385
- src: D,
408
+ src: S,
386
409
  alt: "",
387
410
  className: "size-10 shrink-0"
388
411
  }
389
- ) : /* @__PURE__ */ e("div", { className: "size-10 rounded-[8px] bg-[#DC2626] text-white flex items-center justify-center shrink-0", children: /* @__PURE__ */ e(V, { size: 20 }) }),
390
- /* @__PURE__ */ r("div", { className: "flex flex-col items-start text-left gap-1 min-w-0 flex-1", children: [
391
- /* @__PURE__ */ e("span", { className: "w-full text-[14px] font-semibold leading-[125%] text-[#06080D] truncate", children: W?.name || N?.name }),
392
- /* @__PURE__ */ e("span", { className: "w-full text-[12px] font-medium leading-[120%] text-[#666A78]", children: b(W?.size || N?.size) })
412
+ ) : /* @__PURE__ */ t("div", { className: "size-10 rounded-[8px] bg-[#DC2626] text-white flex items-center justify-center shrink-0", children: /* @__PURE__ */ t(ee, { size: 20 }) }),
413
+ /* @__PURE__ */ l("div", { className: "flex flex-col items-start text-left gap-1 min-w-0 flex-1", children: [
414
+ /* @__PURE__ */ t("span", { className: "w-full text-[14px] font-semibold leading-[125%] text-[#06080D] truncate", children: W?.name || v?.name }),
415
+ /* @__PURE__ */ t("span", { className: "w-full text-[12px] font-medium leading-[120%] text-[#666A78]", children: z(W?.size || v?.size) })
393
416
  ] }),
394
- !f && /* @__PURE__ */ e(
417
+ !f && /* @__PURE__ */ t(
395
418
  "div",
396
419
  {
397
420
  className: "size-6 flex items-center justify-center cursor-pointer",
398
- onClick: (t) => B(t, 0),
399
- children: /* @__PURE__ */ e(M, { size: 24, color: "#06080D" })
421
+ onClick: (e) => E(e, 0),
422
+ children: /* @__PURE__ */ t(M, { size: 24, color: "#06080D" })
400
423
  }
401
424
  )
402
425
  ] })
403
426
  ]
404
427
  }
405
- ) : /* @__PURE__ */ e(
406
- Xe,
428
+ ) : /* @__PURE__ */ t(
429
+ qe,
407
430
  {
408
- item: i[0],
409
- onRemoveClick: (t) => B(t, 0),
410
- onReplaceClick: (t) => {
411
- t.stopPropagation(), !f && G();
431
+ item: o[0],
432
+ onRemoveClick: (e) => E(e, 0),
433
+ onReplaceClick: (e) => {
434
+ e.stopPropagation(), !f && K();
412
435
  },
413
- labelUploaded: ae,
414
- labelReplace: de,
436
+ labelUploaded: fe,
437
+ labelReplace: pe,
415
438
  fileInfo: W,
416
439
  disabled: f,
417
- playerTranslations: Ne
440
+ playerTranslations: Ce
418
441
  }
419
442
  ) }),
420
- !p && H && /* @__PURE__ */ r(
443
+ !p && Z && /* @__PURE__ */ l(
421
444
  "div",
422
445
  {
423
446
  className: "w-full max-w-[502px] flex flex-col items-center gap-4",
424
- onClick: (t) => t.stopPropagation(),
447
+ onClick: (e) => e.stopPropagation(),
425
448
  children: [
426
- /* @__PURE__ */ e("p", { className: "w-full text-center text-[16px] leading-[130%] font-semibold text-[#06080D]", children: k }),
427
- /* @__PURE__ */ r("div", { className: "w-full min-h-[72px] rounded-[8px] bg-[#F5F5F5] p-4 flex items-center gap-4", children: [
428
- D ? /* @__PURE__ */ e(
449
+ /* @__PURE__ */ t("p", { className: "w-full text-center text-[16px] leading-[130%] font-semibold text-[#06080D]", children: R }),
450
+ /* @__PURE__ */ l("div", { className: "w-full min-h-[72px] rounded-[8px] bg-[#F5F5F5] p-4 flex items-center gap-4", children: [
451
+ S ? /* @__PURE__ */ t(
429
452
  "img",
430
453
  {
431
- src: D,
454
+ src: S,
432
455
  alt: "",
433
456
  className: "size-10 shrink-0"
434
457
  }
435
- ) : /* @__PURE__ */ e("div", { className: "size-10 rounded-[8px] bg-[#DC2626] text-white flex items-center justify-center shrink-0", children: /* @__PURE__ */ e(V, { size: 20 }) }),
436
- /* @__PURE__ */ r("div", { className: "flex flex-col items-start text-left gap-1 min-w-0 flex-1", children: [
437
- /* @__PURE__ */ e("span", { className: "w-full text-[14px] font-semibold leading-[125%] text-[#06080D] truncate", children: N?.name }),
438
- /* @__PURE__ */ e("span", { className: "w-full text-[12px] font-medium leading-[120%] text-[#666A78]", children: N ? `${(N.size / (1024 * 1024)).toFixed(0)} MB` : "" })
458
+ ) : /* @__PURE__ */ t("div", { className: "size-10 rounded-[8px] bg-[#DC2626] text-white flex items-center justify-center shrink-0", children: /* @__PURE__ */ t(ee, { size: 20 }) }),
459
+ /* @__PURE__ */ l("div", { className: "flex flex-col items-start text-left gap-1 min-w-0 flex-1", children: [
460
+ /* @__PURE__ */ t("span", { className: "w-full text-[14px] font-semibold leading-[125%] text-[#06080D] truncate", children: v?.name }),
461
+ /* @__PURE__ */ t("span", { className: "w-full text-[12px] font-medium leading-[120%] text-[#666A78]", children: v ? `${(v.size / (1024 * 1024)).toFixed(0)} MB` : "" })
439
462
  ] }),
440
- !f && /* @__PURE__ */ e(
463
+ !f && /* @__PURE__ */ t(
441
464
  "div",
442
465
  {
443
466
  className: "size-6 flex items-center justify-center cursor-pointer",
444
- onClick: (t) => {
445
- t.stopPropagation(), T([]);
467
+ onClick: (e) => {
468
+ e.stopPropagation(), P([]);
446
469
  },
447
- children: /* @__PURE__ */ e(M, { size: 24, color: "#06080D" })
470
+ children: /* @__PURE__ */ t(M, { size: 24, color: "#06080D" })
448
471
  }
449
472
  )
450
473
  ] }),
451
- /* @__PURE__ */ r("div", { className: "w-full bg-[#DC26260F] p-4 flex items-start gap-4", children: [
452
- /* @__PURE__ */ e(ee, { size: 20, color: "#DC2626" }),
453
- /* @__PURE__ */ e("p", { className: "text-[12px] leading-[120%] font-medium text-[#DC2626] text-left", children: h[0]?.errors?.[0]?.code === "file-too-large" ? R : h[0]?.errors?.[0]?.message || I })
474
+ /* @__PURE__ */ l("div", { className: "w-full bg-[#DC26260F] p-4 flex items-start gap-4", children: [
475
+ /* @__PURE__ */ t(te, { size: 20, color: "#DC2626" }),
476
+ /* @__PURE__ */ t("p", { className: "text-[12px] leading-[120%] font-medium text-[#DC2626] text-left", children: u[0]?.errors?.[0]?.code === "file-too-large" ? k : u[0]?.errors?.[0]?.message || y })
454
477
  ] })
455
478
  ]
456
479
  }
457
480
  ),
458
- !J && Q
481
+ !O && U
459
482
  ]
460
483
  }
461
484
  ),
462
- J && /* @__PURE__ */ e("div", { className: "w-full", children: Q }),
463
- !p && !n && h.length > 0 && /* @__PURE__ */ e(
485
+ O && /* @__PURE__ */ t("div", { className: "w-full", children: U }),
486
+ !p && !n && u.length > 0 && /* @__PURE__ */ t(
464
487
  "div",
465
488
  {
466
- className: x("w-full mt-4 flex flex-col gap-2", u?.errorWrapper),
467
- children: h.map((t, d) => {
468
- const o = t.errors[0], F = o?.code === "file-too-large" ? R : o?.code === "file-invalid-type" ? I : o?.message || I;
469
- return /* @__PURE__ */ r(
489
+ className: x("w-full mt-4 flex flex-col gap-2", b?.errorWrapper),
490
+ children: u.map((e, c) => {
491
+ const i = e.errors[0], g = i?.code === "file-too-large" ? k : i?.code === "file-invalid-type" ? y : i?.message || y;
492
+ return /* @__PURE__ */ l(
470
493
  "div",
471
494
  {
472
495
  className: "w-full bg-[#DC26260F] p-4 flex items-start gap-4 rounded-[8px]",
473
496
  children: [
474
- /* @__PURE__ */ e(ee, { size: 20, color: "#DC2626", className: "shrink-0" }),
475
- /* @__PURE__ */ r("p", { className: "text-[12px] leading-[120%] font-medium text-[#DC2626] text-left", children: [
476
- /* @__PURE__ */ e("span", { className: "font-semibold", children: t.file.name }),
497
+ /* @__PURE__ */ t(te, { size: 20, color: "#DC2626", className: "shrink-0" }),
498
+ /* @__PURE__ */ l("p", { className: "text-[12px] leading-[120%] font-medium text-[#DC2626] text-left", children: [
499
+ /* @__PURE__ */ t("span", { className: "font-semibold", children: e.file.name }),
477
500
  " — ",
478
- F
501
+ g
479
502
  ] })
480
503
  ]
481
504
  },
482
- d
505
+ c
483
506
  );
484
507
  })
485
508
  }
@@ -487,8 +510,8 @@ const b = (l = 0) => {
487
510
  ] });
488
511
  }
489
512
  );
490
- ot.displayName = "Dropzone";
513
+ dt.displayName = "Dropzone";
491
514
  export {
492
- ot as Dropzone
515
+ dt as Dropzone
493
516
  };
494
517
  //# sourceMappingURL=Dropzone.js.map