vlite3 1.4.40 → 1.4.41

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