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