vlite3 1.1.2 → 1.1.4

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 (87) hide show
  1. package/components/AttachmentsList/AttachmentsList.vue.d.ts +1 -1
  2. package/components/AttachmentsList/AttachmentsList.vue.js +237 -163
  3. package/components/Avatar.vue.js +1 -1
  4. package/components/AvatarUploader/AvatarUploader.vue.js +40 -37
  5. package/components/Button.vue.js +30 -28
  6. package/components/Carousel/Carousel.vue.d.ts +2 -2
  7. package/components/CategoryManager/CategoryManager.vue.d.ts +10 -2
  8. package/components/CategoryManager/CategoryManager.vue.js +137 -118
  9. package/components/CategoryManager/CategoryNode.vue.d.ts +2 -0
  10. package/components/CategoryManager/CategoryNode.vue.js +93 -88
  11. package/components/Chat/ChatBubble.vue.js +22 -22
  12. package/components/CheckBox.vue.js +29 -28
  13. package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
  14. package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
  15. package/components/ConfirmationModal.vue.js +30 -28
  16. package/components/CopyButton.vue.d.ts +50 -0
  17. package/components/CopyButton.vue.js +69 -0
  18. package/components/CopyButton.vue2.js +4 -0
  19. package/components/DataTable/DataTable.vue.js +44 -44
  20. package/components/DatePicker.vue.js +41 -35
  21. package/components/DateRangePicker.vue.js +18 -17
  22. package/components/Dropdown/Dropdown.vue.d.ts +3 -0
  23. package/components/Dropdown/Dropdown.vue.js +117 -115
  24. package/components/Dropdown/DropdownBooleanItem.vue.js +16 -15
  25. package/components/Dropdown/DropdownItem.vue.js +21 -20
  26. package/components/Dropdown/DropdownMenu.vue.js +1 -1
  27. package/components/Dropdown/DropdownMenu.vue2.js +13 -12
  28. package/components/Dropdown/DropdownTrigger.vue.d.ts +2 -0
  29. package/components/Dropdown/DropdownTrigger.vue.js +10 -6
  30. package/components/Dropdown/composables/useDropdownHydration.d.ts +2 -0
  31. package/components/Dropdown/composables/useDropdownSelection.d.ts +1 -0
  32. package/components/Dropdown/composables/useDropdownSelection.js +46 -31
  33. package/components/FilePicker/FilePicker.vue.js +93 -90
  34. package/components/Form/CustomFields.vue.js +2 -2
  35. package/components/Form/Form.vue.js +2 -2
  36. package/components/Form/Form.vue2.js +68 -64
  37. package/components/Form/FormField.vue.js +204 -148
  38. package/components/Form/FormFields.vue.js +2 -2
  39. package/components/Form/FormFields.vue2.js +28 -27
  40. package/components/Form/types.d.ts +2 -2
  41. package/components/Form/utils/form.utils.d.ts +3 -3
  42. package/components/Form/utils/form.utils.js +37 -37
  43. package/components/Input.vue.js +64 -62
  44. package/components/Invoice/Invoice.vue.js +9 -7
  45. package/components/Invoice/InvoiceTotals.vue.d.ts +14 -0
  46. package/components/Invoice/InvoiceTotals.vue.js +86 -0
  47. package/components/Invoice/InvoiceTotals.vue2.js +4 -0
  48. package/components/Invoice/InvoiceVariant1.vue.d.ts +3 -1
  49. package/components/Invoice/InvoiceVariant1.vue.js +194 -207
  50. package/components/Invoice/InvoiceVariant2.vue.d.ts +3 -1
  51. package/components/Invoice/InvoiceVariant2.vue.js +109 -118
  52. package/components/Invoice/InvoiceVariant3.vue.d.ts +3 -1
  53. package/components/Invoice/InvoiceVariant3.vue.js +157 -167
  54. package/components/Invoice/InvoiceVariant4.vue.d.ts +3 -1
  55. package/components/Invoice/InvoiceVariant4.vue.js +192 -202
  56. package/components/Invoice/index.d.ts +1 -0
  57. package/components/Invoice/types.d.ts +22 -0
  58. package/components/Masonry/Masonry.vue.d.ts +1 -1
  59. package/components/Modal.vue.js +1 -1
  60. package/components/Modal.vue2.js +60 -54
  61. package/components/MultiSelect/MultiSelect.vue.js +47 -46
  62. package/components/MultiSelect/composables/useMultiSelectHydration.d.ts +2 -0
  63. package/components/NavbarCommandPalette.vue.js +1 -1
  64. package/components/NumberInput.vue.js +2 -2
  65. package/components/NumberInput.vue2.js +121 -116
  66. package/components/PricingPlan/PricingPlan.vue.d.ts +1 -1
  67. package/components/SidePanel.vue.js +2 -2
  68. package/components/SidePanel.vue2.js +58 -52
  69. package/components/Stats/StatItem.vue.js +96 -91
  70. package/components/Stats/types.d.ts +1 -0
  71. package/components/Switch.vue.d.ts +6 -1
  72. package/components/Switch.vue.js +61 -24
  73. package/components/TagInput/TagInput.vue.d.ts +187 -0
  74. package/components/TagInput/TagInput.vue.js +113 -0
  75. package/components/TagInput/TagInput.vue2.js +4 -0
  76. package/components/TagInput/index.d.ts +1 -0
  77. package/components/Textarea.vue.js +19 -18
  78. package/components/ThumbnailSelector/ThumbnailSelector.vue.js +2 -2
  79. package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +19 -16
  80. package/core/config.d.ts +36 -0
  81. package/index.d.ts +2 -0
  82. package/index.js +130 -124
  83. package/package.json +1 -1
  84. package/style.css +616 -1
  85. package/types/button.d.ts +1 -1
  86. package/types/styles.d.ts +1 -0
  87. package/utils/functions.js +9 -9
@@ -4,5 +4,5 @@ declare const _default: import('vue').DefineComponent<AttachmentsListProps, {},
4
4
  canDownload: boolean;
5
5
  clickToPreview: boolean;
6
6
  showDownloadInList: boolean;
7
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
7
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
8
8
  export default _default;
@@ -1,19 +1,25 @@
1
- import { defineComponent as ne, computed as a, ref as ie, openBlock as t, createElementBlock as l, normalizeClass as n, Fragment as x, renderList as $, createElementVNode as B, createBlock as u, unref as c, withCtx as j, createVNode as I, createCommentVNode as r, withModifiers as G, toDisplayString as b } from "vue";
2
- import C from "../Modal.vue.js";
3
- import D from "../Icon.vue.js";
4
- import A from "../Button.vue.js";
5
- import { $t as v } from "../../utils/i18n.js";
6
- import { downloadFile as re } from "../../utils/functions.js";
7
- import { getComponentConfig as ce } from "../../utils/configUtils.js";
8
- import k from "../FilePreview/FilePreview.vue.js";
9
- import { getFileTypeIcon as K } from "./fileTypeIcon.js";
10
- const de = ["onClick"], me = ["src"], ue = ["title"], ve = {
1
+ import { defineComponent as de, computed as o, ref as K, openBlock as t, createElementBlock as s, normalizeClass as i, Fragment as x, renderList as L, createElementVNode as U, createVNode as N, createCommentVNode as c, createBlock as p, unref as d, withCtx as V, withModifiers as O, toDisplayString as z } from "vue";
2
+ import P from "../Modal.vue.js";
3
+ import f from "../Icon.vue.js";
4
+ import j from "../Button.vue.js";
5
+ import { $t as w } from "../../utils/i18n.js";
6
+ import { downloadFile as me } from "../../utils/functions.js";
7
+ import { getComponentConfig as ve } from "../../utils/configUtils.js";
8
+ import I from "../FilePreview/FilePreview.vue.js";
9
+ import { getFileTypeIcon as R } from "./fileTypeIcon.js";
10
+ const pe = ["onClick"], he = {
11
+ key: 0,
12
+ class: "absolute inset-0 bg-background/50 flex items-center justify-center z-10 backdrop-blur-[2px] transition-all"
13
+ }, we = ["src"], ye = ["title"], ge = {
11
14
  key: 1,
12
15
  class: "vl-attachments-list__item-size text-xs text-muted-foreground mt-0.5"
13
- }, pe = ["onClick"], he = { class: "flex items-center gap-3 overflow-hidden min-w-0 flex-1" }, we = ["src"], ye = {
16
+ }, be = ["onClick"], xe = { class: "flex items-center gap-3 overflow-hidden min-w-0 flex-1" }, fe = {
17
+ key: 0,
18
+ class: "absolute inset-0 bg-background/60 flex items-center justify-center z-10 backdrop-blur-[1px] transition-all"
19
+ }, _e = ["src"], Ce = {
14
20
  key: 0,
15
21
  class: "flex flex-col overflow-hidden leading-tight min-w-0"
16
- }, xe = ["title"], ge = ["aria-label"], fe = ["aria-label", "onClick"], De = /* @__PURE__ */ ne({
22
+ }, ke = ["title"], Ne = ["aria-label"], ze = ["aria-label", "onClick"], $e = /* @__PURE__ */ de({
17
23
  __name: "AttachmentsList",
18
24
  props: {
19
25
  attachments: {},
@@ -37,29 +43,74 @@ const de = ["onClick"], me = ["src"], ue = ["title"], ve = {
37
43
  itemActionsClass: {},
38
44
  emptyClass: {}
39
45
  },
40
- setup(W) {
41
- const s = W, i = ce("attachmentsList") || {}, p = a(() => s.canView ?? i.canView ?? !0), h = a(() => s.canDownload ?? i.canDownload ?? !0), w = a(() => s.variant ?? i.variant ?? "default"), L = a(() => s.size ?? i.size ?? "md"), y = a(() => s.clickToPreview ?? i.clickToPreview ?? !1), q = a(
42
- () => s.showDownloadInList ?? i.showDownloadInList ?? !0
43
- ), H = a(() => s.rootClass ?? i.rootClass ?? ""), J = a(() => s.gridClass ?? i.gridClass ?? ""), O = a(() => s.cardClass ?? i.cardClass ?? ""), Q = a(
44
- () => s.cardThumbnailClass ?? i.cardThumbnailClass ?? ""
45
- ), R = a(() => s.cardInfoClass ?? i.cardInfoClass ?? ""), X = a(
46
- () => s.cardActionsClass ?? i.cardActionsClass ?? ""
47
- ), Y = a(() => s.listClass ?? i.listClass ?? ""), Z = a(() => s.itemClass ?? i.itemClass ?? ""), ee = a(
48
- () => s.itemIconBoxClass ?? i.itemIconBoxClass ?? ""
49
- ), te = a(() => s.itemNameClass ?? i.itemNameClass ?? ""), ae = a(() => s.itemSizeClass ?? i.itemSizeClass ?? ""), se = a(
50
- () => s.itemActionsClass ?? i.itemActionsClass ?? ""
51
- ), oe = a(() => s.emptyClass ?? i.emptyClass ?? ""), N = ie(null), z = a(() => s.attachments ? Array.isArray(s.attachments) ? s.attachments : [s.attachments] : []), V = (o) => {
52
- if (!o) return "0 Bytes";
53
- const _ = 1024, e = ["Bytes", "KB", "MB", "GB"], d = Math.floor(Math.log(o) / Math.log(_));
54
- return parseFloat((o / Math.pow(_, d)).toFixed(2)) + " " + e[d];
55
- }, U = async (o) => {
56
- o.fileUrl && o.fileUrl !== "#" && await re(o.fileUrl, o.fileName || "attachment");
57
- }, F = (o) => o.fileType && o.fileType.startsWith("image/") ? !0 : /\.(jpg|jpeg|png|gif|webp|svg|bmp)(\?.*)?$/i.test(o.fileUrl || ""), g = (o) => o.fileName !== void 0 && o.fileName !== null && String(o.fileName).trim() !== "", f = (o) => o.fileSize !== void 0 && o.fileSize !== null && String(o.fileSize).trim() !== "", M = (o) => {
58
- y.value && p.value && (N.value = o);
59
- }, E = () => {
60
- N.value = null;
61
- }, m = a(() => {
62
- switch (L.value) {
46
+ setup(X) {
47
+ const l = X, r = ve("attachmentsList") || {}, y = o(() => l.canView ?? r.canView ?? !0), h = o(() => l.canDownload ?? r.canDownload ?? !0), g = o(() => l.variant ?? r.variant ?? "default"), E = o(() => l.size ?? r.size ?? "md"), b = o(() => l.clickToPreview ?? r.clickToPreview ?? !1), q = o(
48
+ () => l.showDownloadInList ?? r.showDownloadInList ?? !0
49
+ ), H = o(() => l.rootClass ?? r.rootClass ?? ""), J = o(() => l.gridClass ?? r.gridClass ?? ""), Q = o(() => l.cardClass ?? r.cardClass ?? ""), Y = o(
50
+ () => l.cardThumbnailClass ?? r.cardThumbnailClass ?? ""
51
+ ), Z = o(() => l.cardInfoClass ?? r.cardInfoClass ?? ""), ee = o(
52
+ () => l.cardActionsClass ?? r.cardActionsClass ?? ""
53
+ ), te = o(() => l.listClass ?? r.listClass ?? ""), ae = o(() => l.itemClass ?? r.itemClass ?? ""), se = o(
54
+ () => l.itemIconBoxClass ?? r.itemIconBoxClass ?? ""
55
+ ), oe = o(() => l.itemNameClass ?? r.itemNameClass ?? ""), le = o(() => l.itemSizeClass ?? r.itemSizeClass ?? ""), ne = o(
56
+ () => l.itemActionsClass ?? r.itemActionsClass ?? ""
57
+ ), ie = o(() => l.emptyClass ?? r.emptyClass ?? ""), B = K(null), v = K(/* @__PURE__ */ new Set()), re = [
58
+ "pdf",
59
+ "docx",
60
+ "xlsx",
61
+ "xls",
62
+ "csv",
63
+ "jpg",
64
+ "jpeg",
65
+ "png",
66
+ "webp",
67
+ "gif",
68
+ "svg",
69
+ "mp4",
70
+ "webm",
71
+ "ogg",
72
+ "mov",
73
+ "mp3",
74
+ "wav",
75
+ "json",
76
+ "js",
77
+ "ts",
78
+ "vue",
79
+ "html",
80
+ "css",
81
+ "txt",
82
+ "md"
83
+ ], S = o(() => l.attachments ? Array.isArray(l.attachments) ? l.attachments : [l.attachments] : []), F = (a) => {
84
+ if (!a) return "0 Bytes";
85
+ const u = 1024, e = ["Bytes", "KB", "MB", "GB"], n = Math.floor(Math.log(a) / Math.log(u));
86
+ return parseFloat((a / Math.pow(u, n)).toFixed(2)) + " " + e[n];
87
+ }, ce = (a) => {
88
+ if (!a) return "";
89
+ const u = a.split("?")[0].split("#")[0], e = u.lastIndexOf(".");
90
+ return e !== -1 ? u.slice(e + 1).toLowerCase() : "";
91
+ }, _ = (a) => {
92
+ const u = ce(a.fileName || a.fileUrl);
93
+ return re.includes(u);
94
+ }, A = async (a, u) => {
95
+ if (a.fileUrl && a.fileUrl !== "#")
96
+ try {
97
+ if (u !== void 0) {
98
+ const e = new Set(v.value);
99
+ e.add(u), v.value = e;
100
+ }
101
+ await me(a.fileUrl, a.fileName || "attachment");
102
+ } finally {
103
+ if (u !== void 0) {
104
+ const e = new Set(v.value);
105
+ e.delete(u), v.value = e;
106
+ }
107
+ }
108
+ }, M = (a) => a.fileType && a.fileType.startsWith("image/") ? !0 : /\.(jpg|jpeg|png|gif|webp|svg|bmp)(\?.*)?$/i.test(a.fileUrl || ""), C = (a) => a.fileName !== void 0 && a.fileName !== null && String(a.fileName).trim() !== "", k = (a) => a.fileSize !== void 0 && a.fileSize !== null && String(a.fileSize).trim() !== "", W = async (a, u) => {
109
+ b.value && (y.value && _(u) ? B.value = a : h.value && await A(u, a));
110
+ }, G = () => {
111
+ B.value = null;
112
+ }, m = o(() => {
113
+ switch (E.value) {
63
114
  case "sm":
64
115
  return {
65
116
  item: "pl-2 pr-2.5 py-1.5 gap-1.5",
@@ -91,48 +142,54 @@ const de = ["onClick"], me = ["src"], ue = ["title"], ve = {
91
142
  actionIcon: "w-4 h-4"
92
143
  };
93
144
  }
94
- }), S = a(() => p.value && !y.value), T = a(() => h.value && q.value), le = a(() => S.value || T.value);
95
- return (o, _) => (t(), l("div", {
96
- class: n(["vl-attachments-list w-full", H.value])
145
+ }), T = o(() => y.value && !b.value), $ = o(() => h.value && q.value), ue = o(() => T.value || $.value);
146
+ return (a, u) => (t(), s("div", {
147
+ class: i(["vl-attachments-list w-full", H.value])
97
148
  }, [
98
- z.value.length > 0 ? (t(), l(x, { key: 0 }, [
99
- w.value === "card" ? (t(), l("div", {
149
+ S.value.length > 0 ? (t(), s(x, { key: 0 }, [
150
+ g.value === "card" ? (t(), s("div", {
100
151
  key: 0,
101
- class: n(["vl-attachments-list__grid grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4", J.value])
152
+ class: i(["vl-attachments-list__grid grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4", J.value])
102
153
  }, [
103
- (t(!0), l(x, null, $(z.value, (e, d) => (t(), l("div", {
104
- key: d,
105
- class: n(["vl-attachments-list__card relative group rounded-xl border border-border bg-body overflow-hidden hover:shadow-md transition-all flex flex-col", [{ "cursor-pointer": y.value && p.value }, O.value]]),
106
- onClick: (P) => M(d)
154
+ (t(!0), s(x, null, L(S.value, (e, n) => (t(), s("div", {
155
+ key: n,
156
+ class: i(["vl-attachments-list__card relative group rounded-xl border border-border bg-body overflow-hidden hover:shadow-md transition-all flex flex-col", [{ "cursor-pointer": b.value && (y.value || h.value) }, Q.value]]),
157
+ onClick: (D) => W(n, e)
107
158
  }, [
108
- B("div", {
109
- class: n(["vl-attachments-list__card-thumbnail h-40 w-full bg-muted/30 flex items-center justify-center overflow-hidden relative", [
110
- Q.value,
111
- g(e) || f(e) ? "border-b border-border" : ""
159
+ U("div", {
160
+ class: i(["vl-attachments-list__card-thumbnail h-40 w-full bg-muted/30 flex items-center justify-center overflow-hidden relative", [
161
+ Y.value,
162
+ C(e) || k(e) ? "border-b border-border" : ""
112
163
  ]])
113
164
  }, [
114
- F(e) ? (t(), l("img", {
115
- key: 0,
165
+ v.value.has(n) ? (t(), s("div", he, [
166
+ N(f, {
167
+ icon: "lucide:loader-2",
168
+ class: "w-8 h-8 text-primary animate-spin"
169
+ })
170
+ ])) : c("", !0),
171
+ M(e) ? (t(), s("img", {
172
+ key: 1,
116
173
  src: e.thumbnailUrl || e.fileUrl,
117
174
  class: "w-full h-full object-cover transition-transform group-hover:scale-105"
118
- }, null, 8, me)) : (t(), u(D, {
119
- key: 1,
120
- icon: c(K)(e.fileName, e.fileUrl, e.fileType),
175
+ }, null, 8, we)) : (t(), p(f, {
176
+ key: 2,
177
+ icon: d(R)(e.fileName, e.fileUrl, e.fileType),
121
178
  class: "w-12 h-12 text-muted-foreground/40 transition-transform group-hover:scale-110"
122
179
  }, null, 8, ["icon"])),
123
- y.value ? r("", !0) : (t(), l("div", {
124
- key: 2,
125
- class: n(["vl-attachments-list__card-actions absolute top-2 right-2 flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity", X.value])
180
+ b.value ? c("", !0) : (t(), s("div", {
181
+ key: 3,
182
+ class: i(["vl-attachments-list__card-actions absolute top-2 right-2 flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity", ee.value])
126
183
  }, [
127
- p.value ? (t(), u(C, {
184
+ y.value && _(e) ? (t(), p(P, {
128
185
  key: 0,
129
- title: e.fileName || c(v)("common.words.preview", "Preview"),
186
+ title: e.fileName || d(w)("common.words.preview", "Preview"),
130
187
  "max-width": "max-w-3xl",
131
- body: c(k),
188
+ body: d(I),
132
189
  bodyProps: { url: e.fileUrl, name: e.fileName, canDownload: h.value }
133
190
  }, {
134
- trigger: j(() => [
135
- I(A, {
191
+ trigger: V(() => [
192
+ N(j, {
136
193
  variant: "secondary",
137
194
  size: "xs",
138
195
  icon: "lucide:eye",
@@ -140,176 +197,193 @@ const de = ["onClick"], me = ["src"], ue = ["title"], ve = {
140
197
  })
141
198
  ]),
142
199
  _: 1
143
- }, 8, ["title", "body", "bodyProps"])) : r("", !0),
144
- h.value ? (t(), u(A, {
200
+ }, 8, ["title", "body", "bodyProps"])) : c("", !0),
201
+ h.value ? (t(), p(j, {
145
202
  key: 1,
146
203
  variant: "secondary",
147
204
  size: "xs",
148
- icon: "lucide:download",
205
+ icon: v.value.has(n) ? "lucide:loader-2" : "lucide:download",
206
+ loading: v.value.has(n),
149
207
  class: "h-7 w-7 px-0 rounded-md shadow-sm",
150
- onClick: G((P) => U(e), ["stop"])
151
- }, null, 8, ["onClick"])) : r("", !0)
208
+ onClick: O((D) => A(e, n), ["stop"])
209
+ }, null, 8, ["icon", "loading", "onClick"])) : c("", !0)
152
210
  ], 2))
153
211
  ], 2),
154
- g(e) || f(e) ? (t(), l("div", {
212
+ C(e) || k(e) ? (t(), s("div", {
155
213
  key: 0,
156
- class: n(["vl-attachments-list__card-info p-3 flex flex-col min-w-0", R.value])
214
+ class: i(["vl-attachments-list__card-info p-3 flex flex-col min-w-0", Z.value])
157
215
  }, [
158
- g(e) ? (t(), l("span", {
216
+ C(e) ? (t(), s("span", {
159
217
  key: 0,
160
218
  class: "vl-attachments-list__item-name text-sm font-medium truncate",
161
219
  title: e.fileName
162
- }, b(e.fileName), 9, ue)) : r("", !0),
163
- f(e) ? (t(), l("span", ve, b(V(e.fileSize)), 1)) : r("", !0)
164
- ], 2)) : r("", !0),
165
- y.value && p.value ? (t(), u(C, {
220
+ }, z(e.fileName), 9, ye)) : c("", !0),
221
+ k(e) ? (t(), s("span", ge, z(F(e.fileSize)), 1)) : c("", !0)
222
+ ], 2)) : c("", !0),
223
+ b.value && y.value && _(e) ? (t(), p(P, {
166
224
  key: 1,
167
- show: N.value === d,
168
- title: e.fileName || c(v)("common.words.preview", "Preview"),
225
+ show: B.value === n,
226
+ title: e.fileName || d(w)("common.words.preview", "Preview"),
169
227
  "max-width": "max-w-3xl",
170
- body: c(k),
228
+ body: d(I),
171
229
  bodyProps: { url: e.fileUrl, name: e.fileName, canDownload: h.value },
172
- onClose: E
173
- }, null, 8, ["show", "title", "body", "bodyProps"])) : r("", !0)
174
- ], 10, de))), 128))
175
- ], 2)) : (t(), l("div", {
230
+ onClose: G
231
+ }, null, 8, ["show", "title", "body", "bodyProps"])) : c("", !0)
232
+ ], 10, pe))), 128))
233
+ ], 2)) : (t(), s("div", {
176
234
  key: 1,
177
- class: n(["vl-attachments-list__list flex flex-col gap-1.5", Y.value])
235
+ class: i(["vl-attachments-list__list flex flex-col gap-1.5", te.value])
178
236
  }, [
179
- (t(!0), l(x, null, $(z.value, (e, d) => (t(), l("div", {
180
- key: d,
181
- class: n(["vl-attachments-list__item flex items-center justify-between transition-colors rounded-lg", [
182
- w.value === "inline" ? "bg-[#79797924] hover:bg-[#7979793f]" : "border border-border bg-muted/20 hover:bg-muted/40",
237
+ (t(!0), s(x, null, L(S.value, (e, n) => (t(), s("div", {
238
+ key: n,
239
+ class: i(["vl-attachments-list__item flex items-center justify-between transition-colors rounded-lg", [
240
+ g.value === "inline" ? "bg-[#79797924] hover:bg-[#7979793f]" : "border border-border bg-muted/20 hover:bg-muted/40",
183
241
  m.value.item,
184
- y.value && p.value ? "cursor-pointer select-none" : "",
185
- Z.value
242
+ b.value && (y.value || h.value) ? "cursor-pointer select-none" : "",
243
+ ae.value
186
244
  ]]),
187
- onClick: (P) => M(d)
245
+ onClick: (D) => W(n, e)
188
246
  }, [
189
- B("div", he, [
190
- B("div", {
191
- class: n(["vl-attachments-list__item-icon-box flex items-center justify-center shrink-0 overflow-hidden relative", [
247
+ U("div", xe, [
248
+ U("div", {
249
+ class: i(["vl-attachments-list__item-icon-box flex items-center justify-center shrink-0 overflow-hidden relative", [
192
250
  m.value.iconBox,
193
- w.value === "inline" ? "bg-[#79797924] hover:bg-[#7979793f]" : "bg-primary/10",
194
- ee.value
251
+ g.value === "inline" ? "bg-[#79797924] hover:bg-[#7979793f]" : "bg-primary/10",
252
+ se.value
195
253
  ]])
196
254
  }, [
197
- F(e) ? (t(), l("img", {
198
- key: 0,
255
+ v.value.has(n) ? (t(), s("div", fe, [
256
+ N(f, {
257
+ icon: "lucide:loader-2",
258
+ class: i([m.value.icon, "text-primary animate-spin"])
259
+ }, null, 8, ["class"])
260
+ ])) : c("", !0),
261
+ M(e) ? (t(), s("img", {
262
+ key: 1,
199
263
  src: e.thumbnailUrl || e.fileUrl,
200
264
  class: "w-full h-full object-cover"
201
- }, null, 8, we)) : (t(), u(D, {
202
- key: 1,
203
- icon: c(K)(e.fileName, e.fileUrl, e.fileType),
204
- class: n([m.value.icon, w.value === "inline" ? "opacity-75" : "text-primary"])
265
+ }, null, 8, _e)) : (t(), p(f, {
266
+ key: 2,
267
+ icon: d(R)(e.fileName, e.fileUrl, e.fileType),
268
+ class: i([m.value.icon, g.value === "inline" ? "opacity-75" : "text-primary"])
205
269
  }, null, 8, ["icon", "class"]))
206
270
  ], 2),
207
- g(e) || f(e) ? (t(), l("div", ye, [
208
- g(e) ? (t(), l("span", {
271
+ C(e) || k(e) ? (t(), s("div", Ce, [
272
+ C(e) ? (t(), s("span", {
209
273
  key: 0,
210
- class: n(["vl-attachments-list__item-name font-medium truncate block", [
274
+ class: i(["vl-attachments-list__item-name font-medium truncate block", [
211
275
  m.value.text,
212
- w.value === "inline" ? "" : "text-foreground",
213
- te.value
276
+ g.value === "inline" ? "" : "text-foreground",
277
+ oe.value
214
278
  ]]),
215
279
  title: e.fileName
216
- }, b(e.fileName), 11, xe)) : r("", !0),
217
- f(e) ? (t(), l("span", {
280
+ }, z(e.fileName), 11, ke)) : c("", !0),
281
+ k(e) ? (t(), s("span", {
218
282
  key: 1,
219
- class: n(["vl-attachments-list__item-size mt-0.5", [
283
+ class: i(["vl-attachments-list__item-size mt-0.5", [
220
284
  m.value.subtext,
221
- w.value === "inline" ? "opacity-50" : "text-muted-foreground",
222
- ae.value
285
+ g.value === "inline" ? "opacity-50" : "text-muted-foreground",
286
+ le.value
223
287
  ]])
224
- }, b(V(e.fileSize)), 3)) : r("", !0)
225
- ])) : r("", !0)
288
+ }, z(F(e.fileSize)), 3)) : c("", !0)
289
+ ])) : c("", !0)
226
290
  ]),
227
- le.value ? (t(), l("div", {
291
+ ue.value ? (t(), s("div", {
228
292
  key: 0,
229
- class: n(["vl-attachments-list__item-actions flex items-center shrink-0 ml-2", [L.value !== "lg" ? "gap-0.5" : "gap-0", se.value]]),
230
- onClick: _[0] || (_[0] = G(() => {
293
+ class: i(["vl-attachments-list__item-actions flex items-center shrink-0 ml-2", [E.value !== "lg" ? "gap-0.5" : "gap-0", ne.value]]),
294
+ onClick: u[0] || (u[0] = O(() => {
231
295
  }, ["stop"]))
232
296
  }, [
233
- w.value === "inline" ? (t(), l(x, { key: 0 }, [
234
- S.value ? (t(), u(C, {
297
+ g.value === "inline" ? (t(), s(x, { key: 0 }, [
298
+ T.value && _(e) ? (t(), p(P, {
235
299
  key: 0,
236
- title: e.fileName || c(v)("common.words.preview", "Preview"),
300
+ title: e.fileName || d(w)("common.words.preview", "Preview"),
237
301
  "max-width": "max-w-3xl",
238
- body: c(k),
302
+ body: d(I),
239
303
  bodyProps: { url: e.fileUrl, name: e.fileName, canDownload: h.value }
240
304
  }, {
241
- trigger: j(() => [
242
- B("button", {
305
+ trigger: V(() => [
306
+ U("button", {
243
307
  type: "button",
244
- class: n(["inline-flex items-center justify-center rounded opacity-60 hover:opacity-100 bg-transparent! transition-all", m.value.actions]),
245
- "aria-label": c(v)("common.words.preview", "Preview")
308
+ class: i(["inline-flex items-center justify-center rounded opacity-60 hover:opacity-100 bg-transparent! transition-all", m.value.actions]),
309
+ "aria-label": d(w)("common.words.preview", "Preview")
246
310
  }, [
247
- I(D, {
311
+ N(f, {
248
312
  icon: "lucide:eye",
249
- class: n(m.value.actionIcon)
313
+ class: i(m.value.actionIcon)
250
314
  }, null, 8, ["class"])
251
- ], 10, ge)
315
+ ], 10, Ne)
252
316
  ]),
253
317
  _: 1
254
- }, 8, ["title", "body", "bodyProps"])) : r("", !0),
255
- T.value ? (t(), l("button", {
318
+ }, 8, ["title", "body", "bodyProps"])) : c("", !0),
319
+ $.value ? (t(), s("button", {
256
320
  key: 1,
257
321
  type: "button",
258
- class: n(["inline-flex items-center justify-center rounded opacity-60 hover:opacity-100 bg-transparent! transition-all", m.value.actions]),
259
- "aria-label": c(v)("common.words.download", "Download"),
260
- onClick: (P) => U(e)
322
+ class: i(["inline-flex items-center justify-center rounded opacity-60 hover:opacity-100 bg-transparent! transition-all", m.value.actions]),
323
+ "aria-label": d(w)("common.words.download", "Download"),
324
+ onClick: (D) => A(e, n)
261
325
  }, [
262
- I(D, {
326
+ v.value.has(n) ? (t(), p(f, {
327
+ key: 0,
328
+ icon: "lucide:loader-2",
329
+ class: i([m.value.actionIcon, "animate-spin"])
330
+ }, null, 8, ["class"])) : (t(), p(f, {
331
+ key: 1,
263
332
  icon: "lucide:download",
264
- class: n(m.value.actionIcon)
265
- }, null, 8, ["class"])
266
- ], 10, fe)) : r("", !0)
267
- ], 64)) : (t(), l(x, { key: 1 }, [
268
- S.value ? (t(), u(C, {
333
+ class: i(m.value.actionIcon)
334
+ }, null, 8, ["class"]))
335
+ ], 10, ze)) : c("", !0)
336
+ ], 64)) : (t(), s(x, { key: 1 }, [
337
+ T.value && _(e) ? (t(), p(P, {
269
338
  key: 0,
270
- title: e.fileName || c(v)("common.words.preview", "Preview"),
339
+ title: e.fileName || d(w)("common.words.preview", "Preview"),
271
340
  "max-width": "max-w-3xl",
272
- body: c(k),
341
+ body: d(I),
273
342
  bodyProps: { url: e.fileUrl, name: e.fileName, canDownload: h.value }
274
343
  }, {
275
- trigger: j(() => [
276
- I(A, {
344
+ trigger: V(() => [
345
+ N(j, {
277
346
  variant: "ghost",
278
347
  size: "xs",
279
- class: n([m.value.actions, "px-0"]),
348
+ class: i([m.value.actions, "px-0"]),
280
349
  icon: "lucide:eye"
281
350
  }, null, 8, ["class"])
282
351
  ]),
283
352
  _: 1
284
- }, 8, ["title", "body", "bodyProps"])) : r("", !0),
285
- T.value ? (t(), u(A, {
353
+ }, 8, ["title", "body", "bodyProps"])) : c("", !0),
354
+ $.value ? (t(), p(j, {
286
355
  key: 1,
287
356
  variant: "ghost",
288
357
  size: "xs",
289
- class: n([m.value.actions, "px-0"]),
290
- icon: "lucide:download",
291
- onClick: (P) => U(e)
292
- }, null, 8, ["class", "onClick"])) : r("", !0)
358
+ class: i([m.value.actions, "px-0"]),
359
+ icon: v.value.has(n) ? "lucide:loader-2" : "lucide:download",
360
+ loading: v.value.has(n),
361
+ onClick: (D) => A(e, n)
362
+ }, null, 8, ["class", "icon", "loading", "onClick"])) : c("", !0)
293
363
  ], 64))
294
- ], 2)) : r("", !0)
295
- ], 10, pe))), 128)),
296
- y.value && p.value ? (t(!0), l(x, { key: 0 }, $(z.value, (e, d) => (t(), u(C, {
297
- key: `preview-${d}`,
298
- show: N.value === d,
299
- title: e.fileName || c(v)("common.words.preview", "Preview"),
300
- "max-width": "max-w-3xl",
301
- body: c(k),
302
- bodyProps: { url: e.fileUrl, name: e.fileName, canDownload: h.value },
303
- onClose: E
304
- }, null, 8, ["show", "title", "body", "bodyProps"]))), 128)) : r("", !0)
364
+ ], 2)) : c("", !0)
365
+ ], 10, be))), 128)),
366
+ b.value ? (t(!0), s(x, { key: 0 }, L(S.value, (e, n) => (t(), s(x, {
367
+ key: `preview-${n}`
368
+ }, [
369
+ y.value && _(e) ? (t(), p(P, {
370
+ key: 0,
371
+ show: B.value === n,
372
+ title: e.fileName || d(w)("common.words.preview", "Preview"),
373
+ "max-width": "max-w-3xl",
374
+ body: d(I),
375
+ bodyProps: { url: e.fileUrl, name: e.fileName, canDownload: h.value },
376
+ onClose: G
377
+ }, null, 8, ["show", "title", "body", "bodyProps"])) : c("", !0)
378
+ ], 64))), 128)) : c("", !0)
305
379
  ], 2))
306
- ], 64)) : (t(), l("div", {
380
+ ], 64)) : (t(), s("div", {
307
381
  key: 1,
308
- class: n(["vl-attachments-list__empty text-sm text-muted-foreground italic bg-muted/10 p-4 rounded-lg border border-dashed border-border text-center", oe.value])
309
- }, b(c(v)("common.words.noAttachments", "No attachments found.")), 3))
382
+ class: i(["vl-attachments-list__empty text-sm text-muted-foreground italic bg-muted/10 p-4 rounded-lg border border-dashed border-border text-center", ie.value])
383
+ }, z(d(w)("common.words.noAttachments", "No attachments found.")), 3))
310
384
  ], 2));
311
385
  }
312
386
  });
313
387
  export {
314
- De as default
388
+ $e as default
315
389
  };
@@ -30,7 +30,7 @@ const y = ["src", "alt"], z = { key: 0 }, A = /* @__PURE__ */ k({
30
30
  }), x = {
31
31
  xs: "h-6 w-6 text-[10px]",
32
32
  sm: "h-7.5 w-7.5 text-xs",
33
- md: "h-10 w-10 text-sm",
33
+ md: "h-9.5 w-9.5 text-sm",
34
34
  lg: "h-14 w-14 text-base",
35
35
  xl: "h-18 w-18 text-lg",
36
36
  "2xl": "h-22 w-22 text-xl"