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.
- package/components/AttachmentsList/AttachmentsList.vue.d.ts +2 -17
- package/components/AttachmentsList/AttachmentsList.vue.js +273 -175
- package/components/Avatar.vue.js +1 -1
- package/components/AvatarUploader/AvatarUploader.vue.d.ts +1 -1
- package/components/AvatarUploader/AvatarUploader.vue.js +40 -37
- package/components/Button.vue.d.ts +1 -1
- package/components/Button.vue.js +30 -28
- package/components/Calendar/Calendar.vue.d.ts +6 -6
- package/components/Carousel/Carousel.vue.d.ts +2 -2
- package/components/CategoryManager/CategoryManager.vue.d.ts +12 -3
- package/components/CategoryManager/CategoryManager.vue.js +204 -145
- package/components/CategoryManager/CategoryNode.vue.d.ts +2 -0
- package/components/CategoryManager/CategoryNode.vue.js +93 -88
- package/components/CategoryManager/types.d.ts +14 -0
- package/components/Chat/ChatBubble.vue.js +22 -22
- package/components/CheckBox.vue.js +29 -28
- package/components/Chip/Chip.vue.d.ts +2 -2
- package/components/ConfirmationModal.vue.d.ts +2 -2
- 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/CustomFieldsDisplay/CustomFieldsDisplay.vue.d.ts +1 -1
- package/components/DataTable/DataTable.vue.d.ts +3 -3
- 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 +5 -2
- package/components/Dropdown/Dropdown.vue.js +117 -115
- package/components/Dropdown/DropdownBooleanItem.vue.js +16 -15
- package/components/Dropdown/DropdownGroupedLayout.vue.d.ts +1 -1
- package/components/Dropdown/DropdownItem.vue.js +21 -20
- package/components/Dropdown/DropdownMenu.vue.d.ts +1 -1
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/Dropdown/DropdownMenu.vue2.js +13 -12
- package/components/Dropdown/DropdownTrigger.vue.d.ts +3 -1
- 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.d.ts +1 -1
- package/components/FilePicker/FilePicker.vue.js +93 -90
- package/components/Form/CustomFields.vue.js +2 -2
- package/components/Form/Form.vue.js +1 -1
- package/components/Form/Form.vue2.js +230 -238
- package/components/Form/FormField.vue.d.ts +1 -1
- 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.d.ts +3 -3
- package/components/Input.vue.js +64 -62
- package/components/Invoice/Invoice.vue.d.ts +1 -4
- package/components/Invoice/Invoice.vue.js +22 -13
- 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 +6 -1
- package/components/Invoice/InvoiceVariant1.vue.js +304 -271
- package/components/Invoice/InvoiceVariant2.vue.d.ts +6 -1
- package/components/Invoice/InvoiceVariant2.vue.js +168 -181
- package/components/Invoice/InvoiceVariant3.vue.d.ts +6 -1
- package/components/Invoice/InvoiceVariant3.vue.js +215 -182
- package/components/Invoice/InvoiceVariant4.vue.d.ts +6 -1
- package/components/Invoice/InvoiceVariant4.vue.js +281 -238
- package/components/Invoice/index.d.ts +1 -0
- package/components/Invoice/types.d.ts +26 -0
- package/components/List/List.vue.d.ts +1 -9
- package/components/List/List.vue.js +166 -165
- package/components/List/ListFieldRow.vue.d.ts +2 -2
- package/components/List/ListFieldRow.vue.js +50 -50
- 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.d.ts +1 -1
- package/components/MultiSelect/MultiSelect.vue.js +47 -46
- package/components/MultiSelect/composables/useMultiSelectHydration.d.ts +2 -0
- package/components/Navbar/NavbarItem.vue.d.ts +1 -1
- package/components/NumberInput.vue.d.ts +2 -2
- package/components/NumberInput.vue.js +2 -2
- package/components/NumberInput.vue2.js +121 -116
- package/components/OTPInput/OTPInput.vue.d.ts +1 -1
- package/components/PricingPlan/PricingPlan.vue.d.ts +2 -2
- package/components/SidePanel.vue.js +2 -2
- package/components/SidePanel.vue2.js +58 -52
- package/components/SidebarMenu/SidebarMenu.vue.d.ts +1 -1
- package/components/Stats/StatItem.vue.js +96 -91
- package/components/Stats/Stats.vue.d.ts +1 -1
- package/components/Stats/types.d.ts +1 -0
- package/components/StatusChip/status-map.js +27 -7
- 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.d.ts +2 -2
- package/components/ThumbnailSelector/ThumbnailSelector.vue.js +2 -2
- package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +19 -16
- package/components/Workbook/Workbook.vue.d.ts +3 -3
- package/core/config.d.ts +112 -0
- package/core/index.js +17 -5
- package/index.d.ts +2 -0
- package/index.js +279 -271
- package/package.json +1 -1
- package/style.css +617 -2
- package/types/button.d.ts +1 -1
- package/types/config.type.d.ts +6 -0
- package/types/list.type.d.ts +6 -0
- package/types/styles.d.ts +1 -0
- package/utils/configUtils.d.ts +9 -0
- package/utils/configUtils.js +7 -0
- package/utils/functions.js +9 -9
- 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
|
-
|
|
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
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
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
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
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:
|
|
14
|
-
canDownload: { type: Boolean, default:
|
|
15
|
-
variant: {
|
|
16
|
-
size: {
|
|
17
|
-
clickToPreview: { type: Boolean, default:
|
|
18
|
-
showDownloadInList: { type: Boolean, default:
|
|
19
|
-
rootClass: {
|
|
20
|
-
gridClass: {
|
|
21
|
-
cardClass: {
|
|
22
|
-
cardThumbnailClass: {
|
|
23
|
-
cardInfoClass: {
|
|
24
|
-
cardActionsClass: {
|
|
25
|
-
listClass: {
|
|
26
|
-
itemClass: {
|
|
27
|
-
itemIconBoxClass: {
|
|
28
|
-
itemNameClass: {
|
|
29
|
-
itemSizeClass: {
|
|
30
|
-
itemActionsClass: {
|
|
31
|
-
emptyClass: {
|
|
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(
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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 = [
|
|
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
|
-
}),
|
|
78
|
-
return (
|
|
79
|
-
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])
|
|
80
148
|
}, [
|
|
81
|
-
|
|
82
|
-
|
|
149
|
+
S.value.length > 0 ? (t(), s(x, { key: 0 }, [
|
|
150
|
+
g.value === "card" ? (t(), s("div", {
|
|
83
151
|
key: 0,
|
|
84
|
-
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])
|
|
85
153
|
}, [
|
|
86
|
-
(
|
|
87
|
-
key:
|
|
88
|
-
class:
|
|
89
|
-
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)
|
|
90
158
|
}, [
|
|
91
|
-
|
|
92
|
-
class:
|
|
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
|
-
|
|
95
|
-
|
|
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,
|
|
99
|
-
key:
|
|
100
|
-
icon:
|
|
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
|
-
|
|
104
|
-
key:
|
|
105
|
-
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])
|
|
106
183
|
}, [
|
|
107
|
-
|
|
184
|
+
y.value && _(e) ? (t(), p(P, {
|
|
108
185
|
key: 0,
|
|
109
|
-
title: e.fileName ||
|
|
186
|
+
title: e.fileName || d(w)("common.words.preview", "Preview"),
|
|
110
187
|
"max-width": "max-w-3xl",
|
|
111
|
-
body:
|
|
112
|
-
bodyProps: { url: e.fileUrl, name: e.fileName, canDownload:
|
|
188
|
+
body: d(I),
|
|
189
|
+
bodyProps: { url: e.fileUrl, name: e.fileName, canDownload: h.value }
|
|
113
190
|
}, {
|
|
114
|
-
trigger:
|
|
115
|
-
|
|
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"])) :
|
|
124
|
-
|
|
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:
|
|
131
|
-
}, null, 8, ["onClick"])) :
|
|
208
|
+
onClick: O((D) => A(e, n), ["stop"])
|
|
209
|
+
}, null, 8, ["icon", "loading", "onClick"])) : c("", !0)
|
|
132
210
|
], 2))
|
|
133
211
|
], 2),
|
|
134
|
-
|
|
135
|
-
|
|
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
|
-
|
|
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
|
-
},
|
|
141
|
-
|
|
142
|
-
], 2),
|
|
143
|
-
|
|
144
|
-
key:
|
|
145
|
-
show:
|
|
146
|
-
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"),
|
|
147
227
|
"max-width": "max-w-3xl",
|
|
148
|
-
body:
|
|
149
|
-
bodyProps: { url: e.fileUrl, name: e.fileName, canDownload:
|
|
150
|
-
onClose:
|
|
151
|
-
}, null, 8, ["show", "title", "body", "bodyProps"])) :
|
|
152
|
-
], 10,
|
|
153
|
-
], 2)) : (
|
|
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:
|
|
235
|
+
class: i(["vl-attachments-list__list flex flex-col gap-1.5", te.value])
|
|
156
236
|
}, [
|
|
157
|
-
(
|
|
158
|
-
key:
|
|
159
|
-
class:
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
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: (
|
|
245
|
+
onClick: (D) => W(n, e)
|
|
166
246
|
}, [
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
class:
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
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
|
-
|
|
176
|
-
|
|
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,
|
|
180
|
-
key:
|
|
181
|
-
icon:
|
|
182
|
-
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"])
|
|
183
269
|
}, null, 8, ["icon", "class"]))
|
|
184
270
|
], 2),
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
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
|
-
},
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
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
|
-
},
|
|
201
|
-
])
|
|
288
|
+
}, z(F(e.fileSize)), 3)) : c("", !0)
|
|
289
|
+
])) : c("", !0)
|
|
202
290
|
]),
|
|
203
|
-
|
|
291
|
+
ue.value ? (t(), s("div", {
|
|
204
292
|
key: 0,
|
|
205
|
-
class:
|
|
206
|
-
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(() => {
|
|
207
295
|
}, ["stop"]))
|
|
208
296
|
}, [
|
|
209
|
-
|
|
210
|
-
|
|
297
|
+
g.value === "inline" ? (t(), s(x, { key: 0 }, [
|
|
298
|
+
T.value && _(e) ? (t(), p(P, {
|
|
211
299
|
key: 0,
|
|
212
|
-
title: e.fileName ||
|
|
300
|
+
title: e.fileName || d(w)("common.words.preview", "Preview"),
|
|
213
301
|
"max-width": "max-w-3xl",
|
|
214
|
-
body:
|
|
215
|
-
bodyProps: { url: e.fileUrl, name: e.fileName, canDownload:
|
|
302
|
+
body: d(I),
|
|
303
|
+
bodyProps: { url: e.fileUrl, name: e.fileName, canDownload: h.value }
|
|
216
304
|
}, {
|
|
217
|
-
trigger:
|
|
218
|
-
|
|
305
|
+
trigger: V(() => [
|
|
306
|
+
U("button", {
|
|
219
307
|
type: "button",
|
|
220
|
-
class:
|
|
221
|
-
"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")
|
|
222
310
|
}, [
|
|
223
|
-
|
|
311
|
+
N(f, {
|
|
224
312
|
icon: "lucide:eye",
|
|
225
|
-
class:
|
|
313
|
+
class: i(m.value.actionIcon)
|
|
226
314
|
}, null, 8, ["class"])
|
|
227
|
-
], 10,
|
|
315
|
+
], 10, Ne)
|
|
228
316
|
]),
|
|
229
317
|
_: 1
|
|
230
|
-
}, 8, ["title", "body", "bodyProps"])) :
|
|
231
|
-
|
|
318
|
+
}, 8, ["title", "body", "bodyProps"])) : c("", !0),
|
|
319
|
+
$.value ? (t(), s("button", {
|
|
232
320
|
key: 1,
|
|
233
321
|
type: "button",
|
|
234
|
-
class:
|
|
235
|
-
"aria-label":
|
|
236
|
-
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)
|
|
237
325
|
}, [
|
|
238
|
-
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:
|
|
241
|
-
}, null, 8, ["class"])
|
|
242
|
-
], 10,
|
|
243
|
-
], 64)) : (
|
|
244
|
-
|
|
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 ||
|
|
339
|
+
title: e.fileName || d(w)("common.words.preview", "Preview"),
|
|
247
340
|
"max-width": "max-w-3xl",
|
|
248
|
-
body:
|
|
249
|
-
bodyProps: { url: e.fileUrl, name: e.fileName, canDownload:
|
|
341
|
+
body: d(I),
|
|
342
|
+
bodyProps: { url: e.fileUrl, name: e.fileName, canDownload: h.value }
|
|
250
343
|
}, {
|
|
251
|
-
trigger:
|
|
252
|
-
|
|
344
|
+
trigger: V(() => [
|
|
345
|
+
N(j, {
|
|
253
346
|
variant: "ghost",
|
|
254
347
|
size: "xs",
|
|
255
|
-
class:
|
|
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"])) :
|
|
261
|
-
|
|
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:
|
|
266
|
-
icon: "lucide:download",
|
|
267
|
-
|
|
268
|
-
|
|
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)) :
|
|
271
|
-
], 10,
|
|
272
|
-
|
|
273
|
-
key: `preview-${
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
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)) : (
|
|
380
|
+
], 64)) : (t(), s("div", {
|
|
283
381
|
key: 1,
|
|
284
|
-
class:
|
|
285
|
-
},
|
|
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
|
-
|
|
388
|
+
$e as default
|
|
291
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"
|
|
@@ -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>;
|