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

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