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.
- package/components/AttachmentsList/AttachmentsList.vue.d.ts +1 -1
- package/components/AttachmentsList/AttachmentsList.vue.js +237 -163
- package/components/Avatar.vue.js +1 -1
- package/components/AvatarUploader/AvatarUploader.vue.js +40 -37
- package/components/Button.vue.js +30 -28
- package/components/Carousel/Carousel.vue.d.ts +2 -2
- package/components/CategoryManager/CategoryManager.vue.d.ts +10 -2
- package/components/CategoryManager/CategoryManager.vue.js +137 -118
- package/components/CategoryManager/CategoryNode.vue.d.ts +2 -0
- package/components/CategoryManager/CategoryNode.vue.js +93 -88
- package/components/Chat/ChatBubble.vue.js +22 -22
- package/components/CheckBox.vue.js +29 -28
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
- package/components/ConfirmationModal.vue.js +30 -28
- package/components/CopyButton.vue.d.ts +50 -0
- package/components/CopyButton.vue.js +69 -0
- package/components/CopyButton.vue2.js +4 -0
- package/components/DataTable/DataTable.vue.js +44 -44
- package/components/DatePicker.vue.js +41 -35
- package/components/DateRangePicker.vue.js +18 -17
- package/components/Dropdown/Dropdown.vue.d.ts +3 -0
- package/components/Dropdown/Dropdown.vue.js +117 -115
- package/components/Dropdown/DropdownBooleanItem.vue.js +16 -15
- package/components/Dropdown/DropdownItem.vue.js +21 -20
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Dropdown/DropdownMenu.vue2.js +13 -12
- package/components/Dropdown/DropdownTrigger.vue.d.ts +2 -0
- package/components/Dropdown/DropdownTrigger.vue.js +10 -6
- package/components/Dropdown/composables/useDropdownHydration.d.ts +2 -0
- package/components/Dropdown/composables/useDropdownSelection.d.ts +1 -0
- package/components/Dropdown/composables/useDropdownSelection.js +46 -31
- package/components/FilePicker/FilePicker.vue.js +93 -90
- package/components/Form/CustomFields.vue.js +2 -2
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +68 -64
- package/components/Form/FormField.vue.js +204 -148
- package/components/Form/FormFields.vue.js +2 -2
- package/components/Form/FormFields.vue2.js +28 -27
- package/components/Form/types.d.ts +2 -2
- package/components/Form/utils/form.utils.d.ts +3 -3
- package/components/Form/utils/form.utils.js +37 -37
- package/components/Input.vue.js +64 -62
- package/components/Invoice/Invoice.vue.js +9 -7
- package/components/Invoice/InvoiceTotals.vue.d.ts +14 -0
- package/components/Invoice/InvoiceTotals.vue.js +86 -0
- package/components/Invoice/InvoiceTotals.vue2.js +4 -0
- package/components/Invoice/InvoiceVariant1.vue.d.ts +3 -1
- package/components/Invoice/InvoiceVariant1.vue.js +194 -207
- package/components/Invoice/InvoiceVariant2.vue.d.ts +3 -1
- package/components/Invoice/InvoiceVariant2.vue.js +109 -118
- package/components/Invoice/InvoiceVariant3.vue.d.ts +3 -1
- package/components/Invoice/InvoiceVariant3.vue.js +157 -167
- package/components/Invoice/InvoiceVariant4.vue.d.ts +3 -1
- package/components/Invoice/InvoiceVariant4.vue.js +192 -202
- package/components/Invoice/index.d.ts +1 -0
- package/components/Invoice/types.d.ts +22 -0
- package/components/Masonry/Masonry.vue.d.ts +1 -1
- package/components/Modal.vue.js +1 -1
- package/components/Modal.vue2.js +60 -54
- package/components/MultiSelect/MultiSelect.vue.js +47 -46
- package/components/MultiSelect/composables/useMultiSelectHydration.d.ts +2 -0
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/NumberInput.vue.js +2 -2
- package/components/NumberInput.vue2.js +121 -116
- package/components/PricingPlan/PricingPlan.vue.d.ts +1 -1
- package/components/SidePanel.vue.js +2 -2
- package/components/SidePanel.vue2.js +58 -52
- package/components/Stats/StatItem.vue.js +96 -91
- package/components/Stats/types.d.ts +1 -0
- package/components/Switch.vue.d.ts +6 -1
- package/components/Switch.vue.js +61 -24
- package/components/TagInput/TagInput.vue.d.ts +187 -0
- package/components/TagInput/TagInput.vue.js +113 -0
- package/components/TagInput/TagInput.vue2.js +4 -0
- package/components/TagInput/index.d.ts +1 -0
- package/components/Textarea.vue.js +19 -18
- package/components/ThumbnailSelector/ThumbnailSelector.vue.js +2 -2
- package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +19 -16
- package/core/config.d.ts +36 -0
- package/index.d.ts +2 -0
- package/index.js +130 -124
- package/package.json +1 -1
- package/style.css +616 -1
- package/types/button.d.ts +1 -1
- package/types/styles.d.ts +1 -0
- 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, {},
|
|
7
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
8
8
|
export default _default;
|
|
@@ -1,19 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { $t as
|
|
6
|
-
import { downloadFile as
|
|
7
|
-
import { getComponentConfig as
|
|
8
|
-
import
|
|
9
|
-
import { getFileTypeIcon as
|
|
10
|
-
const
|
|
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
|
-
},
|
|
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
|
-
},
|
|
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(
|
|
41
|
-
const
|
|
42
|
-
() =>
|
|
43
|
-
), H =
|
|
44
|
-
() =>
|
|
45
|
-
),
|
|
46
|
-
() =>
|
|
47
|
-
),
|
|
48
|
-
() =>
|
|
49
|
-
),
|
|
50
|
-
() =>
|
|
51
|
-
),
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
-
}),
|
|
95
|
-
return (
|
|
96
|
-
class:
|
|
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
|
-
|
|
99
|
-
|
|
149
|
+
S.value.length > 0 ? (t(), s(x, { key: 0 }, [
|
|
150
|
+
g.value === "card" ? (t(), s("div", {
|
|
100
151
|
key: 0,
|
|
101
|
-
class:
|
|
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),
|
|
104
|
-
key:
|
|
105
|
-
class:
|
|
106
|
-
onClick: (
|
|
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
|
-
|
|
109
|
-
class:
|
|
110
|
-
|
|
111
|
-
|
|
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
|
-
|
|
115
|
-
|
|
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,
|
|
119
|
-
key:
|
|
120
|
-
icon:
|
|
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
|
-
|
|
124
|
-
key:
|
|
125
|
-
class:
|
|
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
|
-
|
|
184
|
+
y.value && _(e) ? (t(), p(P, {
|
|
128
185
|
key: 0,
|
|
129
|
-
title: e.fileName ||
|
|
186
|
+
title: e.fileName || d(w)("common.words.preview", "Preview"),
|
|
130
187
|
"max-width": "max-w-3xl",
|
|
131
|
-
body:
|
|
188
|
+
body: d(I),
|
|
132
189
|
bodyProps: { url: e.fileUrl, name: e.fileName, canDownload: h.value }
|
|
133
190
|
}, {
|
|
134
|
-
trigger:
|
|
135
|
-
|
|
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"])) :
|
|
144
|
-
h.value ? (t(),
|
|
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:
|
|
151
|
-
}, null, 8, ["onClick"])) :
|
|
208
|
+
onClick: O((D) => A(e, n), ["stop"])
|
|
209
|
+
}, null, 8, ["icon", "loading", "onClick"])) : c("", !0)
|
|
152
210
|
], 2))
|
|
153
211
|
], 2),
|
|
154
|
-
|
|
212
|
+
C(e) || k(e) ? (t(), s("div", {
|
|
155
213
|
key: 0,
|
|
156
|
-
class:
|
|
214
|
+
class: i(["vl-attachments-list__card-info p-3 flex flex-col min-w-0", Z.value])
|
|
157
215
|
}, [
|
|
158
|
-
|
|
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
|
-
},
|
|
163
|
-
|
|
164
|
-
], 2)) :
|
|
165
|
-
|
|
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:
|
|
168
|
-
title: e.fileName ||
|
|
225
|
+
show: B.value === n,
|
|
226
|
+
title: e.fileName || d(w)("common.words.preview", "Preview"),
|
|
169
227
|
"max-width": "max-w-3xl",
|
|
170
|
-
body:
|
|
228
|
+
body: d(I),
|
|
171
229
|
bodyProps: { url: e.fileUrl, name: e.fileName, canDownload: h.value },
|
|
172
|
-
onClose:
|
|
173
|
-
}, null, 8, ["show", "title", "body", "bodyProps"])) :
|
|
174
|
-
], 10,
|
|
175
|
-
], 2)) : (t(),
|
|
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:
|
|
235
|
+
class: i(["vl-attachments-list__list flex flex-col gap-1.5", te.value])
|
|
178
236
|
}, [
|
|
179
|
-
(t(!0),
|
|
180
|
-
key:
|
|
181
|
-
class:
|
|
182
|
-
|
|
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
|
-
|
|
185
|
-
|
|
242
|
+
b.value && (y.value || h.value) ? "cursor-pointer select-none" : "",
|
|
243
|
+
ae.value
|
|
186
244
|
]]),
|
|
187
|
-
onClick: (
|
|
245
|
+
onClick: (D) => W(n, e)
|
|
188
246
|
}, [
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
class:
|
|
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
|
-
|
|
194
|
-
|
|
251
|
+
g.value === "inline" ? "bg-[#79797924] hover:bg-[#7979793f]" : "bg-primary/10",
|
|
252
|
+
se.value
|
|
195
253
|
]])
|
|
196
254
|
}, [
|
|
197
|
-
|
|
198
|
-
|
|
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,
|
|
202
|
-
key:
|
|
203
|
-
icon:
|
|
204
|
-
class:
|
|
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
|
-
|
|
208
|
-
|
|
271
|
+
C(e) || k(e) ? (t(), s("div", Ce, [
|
|
272
|
+
C(e) ? (t(), s("span", {
|
|
209
273
|
key: 0,
|
|
210
|
-
class:
|
|
274
|
+
class: i(["vl-attachments-list__item-name font-medium truncate block", [
|
|
211
275
|
m.value.text,
|
|
212
|
-
|
|
213
|
-
|
|
276
|
+
g.value === "inline" ? "" : "text-foreground",
|
|
277
|
+
oe.value
|
|
214
278
|
]]),
|
|
215
279
|
title: e.fileName
|
|
216
|
-
},
|
|
217
|
-
|
|
280
|
+
}, z(e.fileName), 11, ke)) : c("", !0),
|
|
281
|
+
k(e) ? (t(), s("span", {
|
|
218
282
|
key: 1,
|
|
219
|
-
class:
|
|
283
|
+
class: i(["vl-attachments-list__item-size mt-0.5", [
|
|
220
284
|
m.value.subtext,
|
|
221
|
-
|
|
222
|
-
|
|
285
|
+
g.value === "inline" ? "opacity-50" : "text-muted-foreground",
|
|
286
|
+
le.value
|
|
223
287
|
]])
|
|
224
|
-
},
|
|
225
|
-
])) :
|
|
288
|
+
}, z(F(e.fileSize)), 3)) : c("", !0)
|
|
289
|
+
])) : c("", !0)
|
|
226
290
|
]),
|
|
227
|
-
|
|
291
|
+
ue.value ? (t(), s("div", {
|
|
228
292
|
key: 0,
|
|
229
|
-
class:
|
|
230
|
-
onClick:
|
|
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
|
-
|
|
234
|
-
|
|
297
|
+
g.value === "inline" ? (t(), s(x, { key: 0 }, [
|
|
298
|
+
T.value && _(e) ? (t(), p(P, {
|
|
235
299
|
key: 0,
|
|
236
|
-
title: e.fileName ||
|
|
300
|
+
title: e.fileName || d(w)("common.words.preview", "Preview"),
|
|
237
301
|
"max-width": "max-w-3xl",
|
|
238
|
-
body:
|
|
302
|
+
body: d(I),
|
|
239
303
|
bodyProps: { url: e.fileUrl, name: e.fileName, canDownload: h.value }
|
|
240
304
|
}, {
|
|
241
|
-
trigger:
|
|
242
|
-
|
|
305
|
+
trigger: V(() => [
|
|
306
|
+
U("button", {
|
|
243
307
|
type: "button",
|
|
244
|
-
class:
|
|
245
|
-
"aria-label":
|
|
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
|
-
|
|
311
|
+
N(f, {
|
|
248
312
|
icon: "lucide:eye",
|
|
249
|
-
class:
|
|
313
|
+
class: i(m.value.actionIcon)
|
|
250
314
|
}, null, 8, ["class"])
|
|
251
|
-
], 10,
|
|
315
|
+
], 10, Ne)
|
|
252
316
|
]),
|
|
253
317
|
_: 1
|
|
254
|
-
}, 8, ["title", "body", "bodyProps"])) :
|
|
255
|
-
|
|
318
|
+
}, 8, ["title", "body", "bodyProps"])) : c("", !0),
|
|
319
|
+
$.value ? (t(), s("button", {
|
|
256
320
|
key: 1,
|
|
257
321
|
type: "button",
|
|
258
|
-
class:
|
|
259
|
-
"aria-label":
|
|
260
|
-
onClick: (
|
|
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
|
-
|
|
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:
|
|
265
|
-
}, null, 8, ["class"])
|
|
266
|
-
], 10,
|
|
267
|
-
], 64)) : (t(),
|
|
268
|
-
|
|
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 ||
|
|
339
|
+
title: e.fileName || d(w)("common.words.preview", "Preview"),
|
|
271
340
|
"max-width": "max-w-3xl",
|
|
272
|
-
body:
|
|
341
|
+
body: d(I),
|
|
273
342
|
bodyProps: { url: e.fileUrl, name: e.fileName, canDownload: h.value }
|
|
274
343
|
}, {
|
|
275
|
-
trigger:
|
|
276
|
-
|
|
344
|
+
trigger: V(() => [
|
|
345
|
+
N(j, {
|
|
277
346
|
variant: "ghost",
|
|
278
347
|
size: "xs",
|
|
279
|
-
class:
|
|
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"])) :
|
|
285
|
-
|
|
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:
|
|
290
|
-
icon: "lucide:download",
|
|
291
|
-
|
|
292
|
-
|
|
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)) :
|
|
295
|
-
], 10,
|
|
296
|
-
|
|
297
|
-
key: `preview-${
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
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(),
|
|
380
|
+
], 64)) : (t(), s("div", {
|
|
307
381
|
key: 1,
|
|
308
|
-
class:
|
|
309
|
-
},
|
|
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
|
-
|
|
388
|
+
$e as default
|
|
315
389
|
};
|
package/components/Avatar.vue.js
CHANGED
|
@@ -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-
|
|
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"
|