vlite3 1.0.10 → 1.1.2
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/README.md +4 -1
- package/components/AttachmentsList/AttachmentsList.vue.d.ts +1 -16
- package/components/AttachmentsList/AttachmentsList.vue.js +191 -167
- package/components/AvatarGroup/AvatarGroup.vue.d.ts +24 -0
- package/components/AvatarGroup/AvatarGroup.vue.js +91 -0
- package/components/AvatarGroup/AvatarGroup.vue2.js +4 -0
- package/components/AvatarGroup/index.d.ts +2 -0
- package/components/AvatarUploader/AvatarUploader.vue.d.ts +1 -1
- package/components/Barcode/Barcode.vue.js +6 -5
- package/components/Button.vue.d.ts +1 -1
- package/components/Calendar/Calendar.vue.d.ts +229 -0
- package/components/Calendar/Calendar.vue.js +7 -0
- package/components/Calendar/Calendar.vue2.js +186 -0
- package/components/Calendar/CalendarEventItem.vue.d.ts +17 -0
- package/components/Calendar/CalendarEventItem.vue.js +111 -0
- package/components/Calendar/CalendarEventItem.vue2.js +4 -0
- package/components/Calendar/index.d.ts +2 -0
- package/components/Carousel/Carousel.vue.d.ts +2 -2
- package/components/CategoryManager/CategoryManager.vue.d.ts +2 -1
- package/components/CategoryManager/CategoryManager.vue.js +322 -0
- package/components/CategoryManager/CategoryManager.vue2.js +4 -0
- package/components/CategoryManager/CategoryNode.vue.js +224 -0
- package/components/CategoryManager/CategoryNode.vue2.js +4 -0
- package/components/CategoryManager/types.d.ts +14 -0
- package/components/Chip/Chip.vue.d.ts +2 -2
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +2 -2
- package/components/CommandPalette/CommandPaletteContent.vue.js +1 -1
- package/components/CommandPalette/CommandPaletteContent.vue2.js +7 -7
- package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
- package/components/ConfirmationModal.vue.d.ts +2 -2
- package/components/CustomFieldsDisplay/CustomFieldsDisplay.vue.d.ts +48 -0
- package/components/CustomFieldsDisplay/CustomFieldsDisplay.vue.js +97 -0
- package/components/CustomFieldsDisplay/CustomFieldsDisplay.vue2.js +4 -0
- package/components/CustomFieldsDisplay/index.d.ts +2 -0
- package/components/CustomFieldsDisplay/types.d.ts +18 -0
- package/components/DataTable/DataTable.vue.d.ts +3 -3
- package/components/DateTime/DateTime.vue.d.ts +2 -0
- package/components/DateTime/DateTime.vue.js +9 -23
- package/components/Dropdown/Dropdown.vue.d.ts +3 -3
- package/components/Dropdown/DropdownGroupedLayout.vue.d.ts +1 -1
- package/components/Dropdown/DropdownMenu.vue.d.ts +2 -2
- package/components/Dropdown/DropdownTrigger.vue.d.ts +1 -1
- package/components/FilePicker/FilePicker.vue.d.ts +1 -1
- package/components/Form/CustomFields.vue.d.ts +1 -1
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +230 -241
- package/components/Form/FormField.vue.d.ts +1 -1
- package/components/Form/composables/useForm.d.ts +2 -0
- package/components/Form/composables/useForm.js +76 -69
- package/components/Form/utils/form.utils.js +66 -66
- package/components/ImportData/ImportData.vue.js +48 -48
- package/components/ImportData/ImportStep2.vue.js +116 -5
- package/components/ImportData/ImportStep2.vue2.js +2 -105
- package/components/Input.vue.d.ts +3 -3
- package/components/Invoice/Invoice.vue.d.ts +3 -0
- package/components/Invoice/Invoice.vue.js +38 -0
- package/components/Invoice/Invoice.vue2.js +4 -0
- package/components/Invoice/InvoiceVariant1.vue.d.ts +13 -0
- package/components/Invoice/InvoiceVariant1.vue.js +360 -0
- package/components/Invoice/InvoiceVariant1.vue2.js +4 -0
- package/components/Invoice/InvoiceVariant2.vue.d.ts +13 -0
- package/components/Invoice/InvoiceVariant2.vue.js +226 -0
- package/components/Invoice/InvoiceVariant2.vue2.js +4 -0
- package/components/Invoice/InvoiceVariant3.vue.d.ts +13 -0
- package/components/Invoice/InvoiceVariant3.vue.js +292 -0
- package/components/Invoice/InvoiceVariant3.vue2.js +4 -0
- package/components/Invoice/InvoiceVariant4.vue.d.ts +13 -0
- package/components/Invoice/InvoiceVariant4.vue.js +343 -0
- package/components/Invoice/InvoiceVariant4.vue2.js +4 -0
- package/components/Invoice/index.d.ts +2 -0
- package/components/Invoice/types.d.ts +97 -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 +10 -2
- package/components/List/ListFieldRow.vue.js +80 -78
- package/components/List/utils.d.ts +2 -1
- package/components/List/utils.js +8 -39
- package/components/MultiSelect/MultiSelect.vue.d.ts +1 -1
- package/components/Navbar/NavbarItem.vue.d.ts +1 -1
- package/components/Navbar/NavbarTabs.vue.js +2 -2
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/NumberInput.vue.d.ts +2 -2
- package/components/NumberInput.vue.js +2 -2
- package/components/NumberInput.vue2.js +38 -38
- package/components/OTPInput/OTPInput.vue.d.ts +1 -1
- package/components/PricingPlan/PricingPlan.vue.d.ts +1 -1
- package/components/Screen/ScreenFilter.vue.js +22 -21
- package/components/Screen/components/ScreenQuickFilters.vue.js +6 -5
- package/components/SidebarMenu/SidebarMenu.vue.d.ts +1 -1
- package/components/Stats/Stats.vue.d.ts +1 -1
- package/components/StatusChip/status-map.js +27 -7
- package/components/Tabes/Tabes.vue.d.ts +1 -0
- package/components/Tabes/Tabes.vue.js +2 -2
- package/components/Tabes/Tabes.vue2.js +33 -32
- package/components/ThumbnailSelector/ThumbnailSelector.vue.d.ts +2 -2
- package/components/ThumbnailSelector/ThumbnailSelector.vue.js +2 -2
- package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +141 -115
- package/components/Workbook/Workbook.vue.d.ts +3 -3
- package/core/config.d.ts +76 -0
- package/core/index.js +17 -5
- package/index.d.ts +6 -1
- package/index.js +271 -256
- package/package.json +2 -1
- package/style.css +5 -3
- package/types/config.type.d.ts +6 -0
- package/types/list.type.d.ts +6 -0
- package/utils/configUtils.d.ts +9 -0
- package/utils/configUtils.js +7 -0
- package/utils/index.d.ts +1 -0
- package/utils/status.d.ts +5 -0
- package/utils/status.js +33 -0
- /package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +0 -0
package/README.md
CHANGED
|
@@ -88,7 +88,7 @@ const vlite = createVLite({
|
|
|
88
88
|
*
|
|
89
89
|
* This function will be called automatically by:
|
|
90
90
|
* - useFileUpload() composable
|
|
91
|
-
* - Form components (when using 'file', 'fileUploader', or 'avatarUpload' types)
|
|
91
|
+
* - Form components (when using 'file', 'fileUploader', 'ThumbnailSelector', or 'avatarUpload' types)
|
|
92
92
|
*
|
|
93
93
|
* @param file - The File object to upload
|
|
94
94
|
* @param folderId - (Optional) Folder ID passed from component props
|
|
@@ -419,9 +419,11 @@ Follow these rules strictly to ensure visual consistency and predictable styling
|
|
|
419
419
|
- [x] **NumberInput**
|
|
420
420
|
- [x] **DatePicker**
|
|
421
421
|
- [x] **DateRangePicker**
|
|
422
|
+
- [x] **Calendar**
|
|
422
423
|
- [x] **ColorPicker**
|
|
423
424
|
- [x] **FilePicker**
|
|
424
425
|
- [x] **AvatarUploader**
|
|
426
|
+
- [x] **ThumbnailSelector**
|
|
425
427
|
- [x] **IconPicker**
|
|
426
428
|
- [x] **MultiSelect**
|
|
427
429
|
- [x] **Forms**
|
|
@@ -448,6 +450,7 @@ Follow these rules strictly to ensure visual consistency and predictable styling
|
|
|
448
450
|
- [x] **Stats**
|
|
449
451
|
- [x] **Price**
|
|
450
452
|
- [x] **Date**
|
|
453
|
+
- [x] **Invoice**
|
|
451
454
|
|
|
452
455
|
### Feedback & Overlays
|
|
453
456
|
|
|
@@ -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
7
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
23
8
|
export default _default;
|
|
@@ -1,48 +1,65 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { $t as
|
|
6
|
-
import { downloadFile as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
1
|
+
import { defineComponent as ne, computed as a, ref as ie, openBlock as t, createElementBlock as l, normalizeClass as n, Fragment as x, renderList as $, createElementVNode as B, createBlock as u, unref as c, withCtx as j, createVNode as I, createCommentVNode as r, withModifiers as G, toDisplayString as b } from "vue";
|
|
2
|
+
import C from "../Modal.vue.js";
|
|
3
|
+
import D from "../Icon.vue.js";
|
|
4
|
+
import A from "../Button.vue.js";
|
|
5
|
+
import { $t as v } from "../../utils/i18n.js";
|
|
6
|
+
import { downloadFile as re } from "../../utils/functions.js";
|
|
7
|
+
import { getComponentConfig as ce } from "../../utils/configUtils.js";
|
|
8
|
+
import k from "../FilePreview/FilePreview.vue.js";
|
|
9
|
+
import { getFileTypeIcon as K } from "./fileTypeIcon.js";
|
|
10
|
+
const de = ["onClick"], me = ["src"], ue = ["title"], ve = {
|
|
11
|
+
key: 1,
|
|
12
|
+
class: "vl-attachments-list__item-size text-xs text-muted-foreground mt-0.5"
|
|
13
|
+
}, pe = ["onClick"], he = { class: "flex items-center gap-3 overflow-hidden min-w-0 flex-1" }, we = ["src"], ye = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "flex flex-col overflow-hidden leading-tight min-w-0"
|
|
16
|
+
}, xe = ["title"], ge = ["aria-label"], fe = ["aria-label", "onClick"], De = /* @__PURE__ */ ne({
|
|
10
17
|
__name: "AttachmentsList",
|
|
11
18
|
props: {
|
|
12
19
|
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: {
|
|
20
|
+
canView: { type: Boolean, default: void 0 },
|
|
21
|
+
canDownload: { type: Boolean, default: void 0 },
|
|
22
|
+
variant: {},
|
|
23
|
+
size: {},
|
|
24
|
+
clickToPreview: { type: Boolean, default: void 0 },
|
|
25
|
+
showDownloadInList: { type: Boolean, default: void 0 },
|
|
26
|
+
rootClass: {},
|
|
27
|
+
gridClass: {},
|
|
28
|
+
cardClass: {},
|
|
29
|
+
cardThumbnailClass: {},
|
|
30
|
+
cardInfoClass: {},
|
|
31
|
+
cardActionsClass: {},
|
|
32
|
+
listClass: {},
|
|
33
|
+
itemClass: {},
|
|
34
|
+
itemIconBoxClass: {},
|
|
35
|
+
itemNameClass: {},
|
|
36
|
+
itemSizeClass: {},
|
|
37
|
+
itemActionsClass: {},
|
|
38
|
+
emptyClass: {}
|
|
32
39
|
},
|
|
33
|
-
setup(
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
setup(W) {
|
|
41
|
+
const s = W, i = ce("attachmentsList") || {}, p = a(() => s.canView ?? i.canView ?? !0), h = a(() => s.canDownload ?? i.canDownload ?? !0), w = a(() => s.variant ?? i.variant ?? "default"), L = a(() => s.size ?? i.size ?? "md"), y = a(() => s.clickToPreview ?? i.clickToPreview ?? !1), q = a(
|
|
42
|
+
() => s.showDownloadInList ?? i.showDownloadInList ?? !0
|
|
43
|
+
), H = a(() => s.rootClass ?? i.rootClass ?? ""), J = a(() => s.gridClass ?? i.gridClass ?? ""), O = a(() => s.cardClass ?? i.cardClass ?? ""), Q = a(
|
|
44
|
+
() => s.cardThumbnailClass ?? i.cardThumbnailClass ?? ""
|
|
45
|
+
), R = a(() => s.cardInfoClass ?? i.cardInfoClass ?? ""), X = a(
|
|
46
|
+
() => s.cardActionsClass ?? i.cardActionsClass ?? ""
|
|
47
|
+
), Y = a(() => s.listClass ?? i.listClass ?? ""), Z = a(() => s.itemClass ?? i.itemClass ?? ""), ee = a(
|
|
48
|
+
() => s.itemIconBoxClass ?? i.itemIconBoxClass ?? ""
|
|
49
|
+
), te = a(() => s.itemNameClass ?? i.itemNameClass ?? ""), ae = a(() => s.itemSizeClass ?? i.itemSizeClass ?? ""), se = a(
|
|
50
|
+
() => s.itemActionsClass ?? i.itemActionsClass ?? ""
|
|
51
|
+
), oe = a(() => s.emptyClass ?? i.emptyClass ?? ""), N = ie(null), z = a(() => s.attachments ? Array.isArray(s.attachments) ? s.attachments : [s.attachments] : []), V = (o) => {
|
|
52
|
+
if (!o) return "0 Bytes";
|
|
53
|
+
const _ = 1024, e = ["Bytes", "KB", "MB", "GB"], d = Math.floor(Math.log(o) / Math.log(_));
|
|
54
|
+
return parseFloat((o / Math.pow(_, d)).toFixed(2)) + " " + e[d];
|
|
55
|
+
}, U = async (o) => {
|
|
56
|
+
o.fileUrl && o.fileUrl !== "#" && await re(o.fileUrl, o.fileName || "attachment");
|
|
57
|
+
}, F = (o) => o.fileType && o.fileType.startsWith("image/") ? !0 : /\.(jpg|jpeg|png|gif|webp|svg|bmp)(\?.*)?$/i.test(o.fileUrl || ""), g = (o) => o.fileName !== void 0 && o.fileName !== null && String(o.fileName).trim() !== "", f = (o) => o.fileSize !== void 0 && o.fileSize !== null && String(o.fileSize).trim() !== "", M = (o) => {
|
|
58
|
+
y.value && p.value && (N.value = o);
|
|
59
|
+
}, E = () => {
|
|
60
|
+
N.value = null;
|
|
61
|
+
}, m = a(() => {
|
|
62
|
+
switch (L.value) {
|
|
46
63
|
case "sm":
|
|
47
64
|
return {
|
|
48
65
|
item: "pl-2 pr-2.5 py-1.5 gap-1.5",
|
|
@@ -74,45 +91,48 @@ const G = ["onClick"], K = ["src"], W = ["title"], q = { class: "vl-attachments-
|
|
|
74
91
|
actionIcon: "w-4 h-4"
|
|
75
92
|
};
|
|
76
93
|
}
|
|
77
|
-
}),
|
|
78
|
-
return (
|
|
79
|
-
class:
|
|
94
|
+
}), S = a(() => p.value && !y.value), T = a(() => h.value && q.value), le = a(() => S.value || T.value);
|
|
95
|
+
return (o, _) => (t(), l("div", {
|
|
96
|
+
class: n(["vl-attachments-list w-full", H.value])
|
|
80
97
|
}, [
|
|
81
|
-
|
|
82
|
-
|
|
98
|
+
z.value.length > 0 ? (t(), l(x, { key: 0 }, [
|
|
99
|
+
w.value === "card" ? (t(), l("div", {
|
|
83
100
|
key: 0,
|
|
84
|
-
class:
|
|
101
|
+
class: n(["vl-attachments-list__grid grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4", J.value])
|
|
85
102
|
}, [
|
|
86
|
-
(
|
|
87
|
-
key:
|
|
88
|
-
class:
|
|
89
|
-
onClick: (
|
|
103
|
+
(t(!0), l(x, null, $(z.value, (e, d) => (t(), l("div", {
|
|
104
|
+
key: d,
|
|
105
|
+
class: n(["vl-attachments-list__card relative group rounded-xl border border-border bg-body overflow-hidden hover:shadow-md transition-all flex flex-col", [{ "cursor-pointer": y.value && p.value }, O.value]]),
|
|
106
|
+
onClick: (P) => M(d)
|
|
90
107
|
}, [
|
|
91
|
-
|
|
92
|
-
class:
|
|
108
|
+
B("div", {
|
|
109
|
+
class: n(["vl-attachments-list__card-thumbnail h-40 w-full bg-muted/30 flex items-center justify-center overflow-hidden relative", [
|
|
110
|
+
Q.value,
|
|
111
|
+
g(e) || f(e) ? "border-b border-border" : ""
|
|
112
|
+
]])
|
|
93
113
|
}, [
|
|
94
|
-
|
|
114
|
+
F(e) ? (t(), l("img", {
|
|
95
115
|
key: 0,
|
|
96
116
|
src: e.thumbnailUrl || e.fileUrl,
|
|
97
117
|
class: "w-full h-full object-cover transition-transform group-hover:scale-105"
|
|
98
|
-
}, null, 8,
|
|
118
|
+
}, null, 8, me)) : (t(), u(D, {
|
|
99
119
|
key: 1,
|
|
100
|
-
icon:
|
|
120
|
+
icon: c(K)(e.fileName, e.fileUrl, e.fileType),
|
|
101
121
|
class: "w-12 h-12 text-muted-foreground/40 transition-transform group-hover:scale-110"
|
|
102
122
|
}, null, 8, ["icon"])),
|
|
103
|
-
|
|
123
|
+
y.value ? r("", !0) : (t(), l("div", {
|
|
104
124
|
key: 2,
|
|
105
|
-
class:
|
|
125
|
+
class: n(["vl-attachments-list__card-actions absolute top-2 right-2 flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity", X.value])
|
|
106
126
|
}, [
|
|
107
|
-
|
|
127
|
+
p.value ? (t(), u(C, {
|
|
108
128
|
key: 0,
|
|
109
|
-
title: e.fileName ||
|
|
129
|
+
title: e.fileName || c(v)("common.words.preview", "Preview"),
|
|
110
130
|
"max-width": "max-w-3xl",
|
|
111
|
-
body:
|
|
112
|
-
bodyProps: { url: e.fileUrl, name: e.fileName, canDownload:
|
|
131
|
+
body: c(k),
|
|
132
|
+
bodyProps: { url: e.fileUrl, name: e.fileName, canDownload: h.value }
|
|
113
133
|
}, {
|
|
114
|
-
trigger:
|
|
115
|
-
|
|
134
|
+
trigger: j(() => [
|
|
135
|
+
I(A, {
|
|
116
136
|
variant: "secondary",
|
|
117
137
|
size: "xs",
|
|
118
138
|
icon: "lucide:eye",
|
|
@@ -120,172 +140,176 @@ const G = ["onClick"], K = ["src"], W = ["title"], q = { class: "vl-attachments-
|
|
|
120
140
|
})
|
|
121
141
|
]),
|
|
122
142
|
_: 1
|
|
123
|
-
}, 8, ["title", "body", "bodyProps"])) :
|
|
124
|
-
|
|
143
|
+
}, 8, ["title", "body", "bodyProps"])) : r("", !0),
|
|
144
|
+
h.value ? (t(), u(A, {
|
|
125
145
|
key: 1,
|
|
126
146
|
variant: "secondary",
|
|
127
147
|
size: "xs",
|
|
128
148
|
icon: "lucide:download",
|
|
129
149
|
class: "h-7 w-7 px-0 rounded-md shadow-sm",
|
|
130
|
-
onClick:
|
|
131
|
-
}, null, 8, ["onClick"])) :
|
|
150
|
+
onClick: G((P) => U(e), ["stop"])
|
|
151
|
+
}, null, 8, ["onClick"])) : r("", !0)
|
|
132
152
|
], 2))
|
|
133
153
|
], 2),
|
|
134
|
-
|
|
135
|
-
|
|
154
|
+
g(e) || f(e) ? (t(), l("div", {
|
|
155
|
+
key: 0,
|
|
156
|
+
class: n(["vl-attachments-list__card-info p-3 flex flex-col min-w-0", R.value])
|
|
136
157
|
}, [
|
|
137
|
-
|
|
158
|
+
g(e) ? (t(), l("span", {
|
|
159
|
+
key: 0,
|
|
138
160
|
class: "vl-attachments-list__item-name text-sm font-medium truncate",
|
|
139
161
|
title: e.fileName
|
|
140
|
-
},
|
|
141
|
-
|
|
142
|
-
], 2),
|
|
143
|
-
|
|
144
|
-
key:
|
|
145
|
-
show:
|
|
146
|
-
title: e.fileName ||
|
|
162
|
+
}, b(e.fileName), 9, ue)) : r("", !0),
|
|
163
|
+
f(e) ? (t(), l("span", ve, b(V(e.fileSize)), 1)) : r("", !0)
|
|
164
|
+
], 2)) : r("", !0),
|
|
165
|
+
y.value && p.value ? (t(), u(C, {
|
|
166
|
+
key: 1,
|
|
167
|
+
show: N.value === d,
|
|
168
|
+
title: e.fileName || c(v)("common.words.preview", "Preview"),
|
|
147
169
|
"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)) : (
|
|
170
|
+
body: c(k),
|
|
171
|
+
bodyProps: { url: e.fileUrl, name: e.fileName, canDownload: h.value },
|
|
172
|
+
onClose: E
|
|
173
|
+
}, null, 8, ["show", "title", "body", "bodyProps"])) : r("", !0)
|
|
174
|
+
], 10, de))), 128))
|
|
175
|
+
], 2)) : (t(), l("div", {
|
|
154
176
|
key: 1,
|
|
155
|
-
class:
|
|
177
|
+
class: n(["vl-attachments-list__list flex flex-col gap-1.5", Y.value])
|
|
156
178
|
}, [
|
|
157
|
-
(
|
|
158
|
-
key:
|
|
159
|
-
class:
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
179
|
+
(t(!0), l(x, null, $(z.value, (e, d) => (t(), l("div", {
|
|
180
|
+
key: d,
|
|
181
|
+
class: n(["vl-attachments-list__item flex items-center justify-between transition-colors rounded-lg", [
|
|
182
|
+
w.value === "inline" ? "bg-[#79797924] hover:bg-[#7979793f]" : "border border-border bg-muted/20 hover:bg-muted/40",
|
|
183
|
+
m.value.item,
|
|
184
|
+
y.value && p.value ? "cursor-pointer select-none" : "",
|
|
185
|
+
Z.value
|
|
164
186
|
]]),
|
|
165
|
-
onClick: (
|
|
187
|
+
onClick: (P) => M(d)
|
|
166
188
|
}, [
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
class:
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
189
|
+
B("div", he, [
|
|
190
|
+
B("div", {
|
|
191
|
+
class: n(["vl-attachments-list__item-icon-box flex items-center justify-center shrink-0 overflow-hidden relative", [
|
|
192
|
+
m.value.iconBox,
|
|
193
|
+
w.value === "inline" ? "bg-[#79797924] hover:bg-[#7979793f]" : "bg-primary/10",
|
|
194
|
+
ee.value
|
|
173
195
|
]])
|
|
174
196
|
}, [
|
|
175
|
-
|
|
197
|
+
F(e) ? (t(), l("img", {
|
|
176
198
|
key: 0,
|
|
177
199
|
src: e.thumbnailUrl || e.fileUrl,
|
|
178
200
|
class: "w-full h-full object-cover"
|
|
179
|
-
}, null, 8,
|
|
201
|
+
}, null, 8, we)) : (t(), u(D, {
|
|
180
202
|
key: 1,
|
|
181
|
-
icon:
|
|
182
|
-
class:
|
|
203
|
+
icon: c(K)(e.fileName, e.fileUrl, e.fileType),
|
|
204
|
+
class: n([m.value.icon, w.value === "inline" ? "opacity-75" : "text-primary"])
|
|
183
205
|
}, null, 8, ["icon", "class"]))
|
|
184
206
|
], 2),
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
207
|
+
g(e) || f(e) ? (t(), l("div", ye, [
|
|
208
|
+
g(e) ? (t(), l("span", {
|
|
209
|
+
key: 0,
|
|
210
|
+
class: n(["vl-attachments-list__item-name font-medium truncate block", [
|
|
211
|
+
m.value.text,
|
|
212
|
+
w.value === "inline" ? "" : "text-foreground",
|
|
213
|
+
te.value
|
|
191
214
|
]]),
|
|
192
215
|
title: e.fileName
|
|
193
|
-
},
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
216
|
+
}, b(e.fileName), 11, xe)) : r("", !0),
|
|
217
|
+
f(e) ? (t(), l("span", {
|
|
218
|
+
key: 1,
|
|
219
|
+
class: n(["vl-attachments-list__item-size mt-0.5", [
|
|
220
|
+
m.value.subtext,
|
|
221
|
+
w.value === "inline" ? "opacity-50" : "text-muted-foreground",
|
|
222
|
+
ae.value
|
|
199
223
|
]])
|
|
200
|
-
},
|
|
201
|
-
])
|
|
224
|
+
}, b(V(e.fileSize)), 3)) : r("", !0)
|
|
225
|
+
])) : r("", !0)
|
|
202
226
|
]),
|
|
203
|
-
|
|
227
|
+
le.value ? (t(), l("div", {
|
|
204
228
|
key: 0,
|
|
205
|
-
class:
|
|
206
|
-
onClick:
|
|
229
|
+
class: n(["vl-attachments-list__item-actions flex items-center shrink-0 ml-2", [L.value !== "lg" ? "gap-0.5" : "gap-0", se.value]]),
|
|
230
|
+
onClick: _[0] || (_[0] = G(() => {
|
|
207
231
|
}, ["stop"]))
|
|
208
232
|
}, [
|
|
209
|
-
|
|
210
|
-
|
|
233
|
+
w.value === "inline" ? (t(), l(x, { key: 0 }, [
|
|
234
|
+
S.value ? (t(), u(C, {
|
|
211
235
|
key: 0,
|
|
212
|
-
title: e.fileName ||
|
|
236
|
+
title: e.fileName || c(v)("common.words.preview", "Preview"),
|
|
213
237
|
"max-width": "max-w-3xl",
|
|
214
|
-
body:
|
|
215
|
-
bodyProps: { url: e.fileUrl, name: e.fileName, canDownload:
|
|
238
|
+
body: c(k),
|
|
239
|
+
bodyProps: { url: e.fileUrl, name: e.fileName, canDownload: h.value }
|
|
216
240
|
}, {
|
|
217
|
-
trigger:
|
|
218
|
-
|
|
241
|
+
trigger: j(() => [
|
|
242
|
+
B("button", {
|
|
219
243
|
type: "button",
|
|
220
|
-
class:
|
|
221
|
-
"aria-label":
|
|
244
|
+
class: n(["inline-flex items-center justify-center rounded opacity-60 hover:opacity-100 bg-transparent! transition-all", m.value.actions]),
|
|
245
|
+
"aria-label": c(v)("common.words.preview", "Preview")
|
|
222
246
|
}, [
|
|
223
|
-
|
|
247
|
+
I(D, {
|
|
224
248
|
icon: "lucide:eye",
|
|
225
|
-
class:
|
|
249
|
+
class: n(m.value.actionIcon)
|
|
226
250
|
}, null, 8, ["class"])
|
|
227
|
-
], 10,
|
|
251
|
+
], 10, ge)
|
|
228
252
|
]),
|
|
229
253
|
_: 1
|
|
230
|
-
}, 8, ["title", "body", "bodyProps"])) :
|
|
231
|
-
|
|
254
|
+
}, 8, ["title", "body", "bodyProps"])) : r("", !0),
|
|
255
|
+
T.value ? (t(), l("button", {
|
|
232
256
|
key: 1,
|
|
233
257
|
type: "button",
|
|
234
|
-
class:
|
|
235
|
-
"aria-label":
|
|
236
|
-
onClick: (
|
|
258
|
+
class: n(["inline-flex items-center justify-center rounded opacity-60 hover:opacity-100 bg-transparent! transition-all", m.value.actions]),
|
|
259
|
+
"aria-label": c(v)("common.words.download", "Download"),
|
|
260
|
+
onClick: (P) => U(e)
|
|
237
261
|
}, [
|
|
238
|
-
|
|
262
|
+
I(D, {
|
|
239
263
|
icon: "lucide:download",
|
|
240
|
-
class:
|
|
264
|
+
class: n(m.value.actionIcon)
|
|
241
265
|
}, null, 8, ["class"])
|
|
242
|
-
], 10,
|
|
243
|
-
], 64)) : (
|
|
244
|
-
|
|
266
|
+
], 10, fe)) : r("", !0)
|
|
267
|
+
], 64)) : (t(), l(x, { key: 1 }, [
|
|
268
|
+
S.value ? (t(), u(C, {
|
|
245
269
|
key: 0,
|
|
246
|
-
title: e.fileName ||
|
|
270
|
+
title: e.fileName || c(v)("common.words.preview", "Preview"),
|
|
247
271
|
"max-width": "max-w-3xl",
|
|
248
|
-
body:
|
|
249
|
-
bodyProps: { url: e.fileUrl, name: e.fileName, canDownload:
|
|
272
|
+
body: c(k),
|
|
273
|
+
bodyProps: { url: e.fileUrl, name: e.fileName, canDownload: h.value }
|
|
250
274
|
}, {
|
|
251
|
-
trigger:
|
|
252
|
-
|
|
275
|
+
trigger: j(() => [
|
|
276
|
+
I(A, {
|
|
253
277
|
variant: "ghost",
|
|
254
278
|
size: "xs",
|
|
255
|
-
class:
|
|
279
|
+
class: n([m.value.actions, "px-0"]),
|
|
256
280
|
icon: "lucide:eye"
|
|
257
281
|
}, null, 8, ["class"])
|
|
258
282
|
]),
|
|
259
283
|
_: 1
|
|
260
|
-
}, 8, ["title", "body", "bodyProps"])) :
|
|
261
|
-
|
|
284
|
+
}, 8, ["title", "body", "bodyProps"])) : r("", !0),
|
|
285
|
+
T.value ? (t(), u(A, {
|
|
262
286
|
key: 1,
|
|
263
287
|
variant: "ghost",
|
|
264
288
|
size: "xs",
|
|
265
|
-
class:
|
|
289
|
+
class: n([m.value.actions, "px-0"]),
|
|
266
290
|
icon: "lucide:download",
|
|
267
|
-
onClick: (
|
|
268
|
-
}, null, 8, ["class", "onClick"])) :
|
|
291
|
+
onClick: (P) => U(e)
|
|
292
|
+
}, null, 8, ["class", "onClick"])) : r("", !0)
|
|
269
293
|
], 64))
|
|
270
|
-
], 2)) :
|
|
271
|
-
], 10,
|
|
272
|
-
|
|
273
|
-
key: `preview-${
|
|
274
|
-
show:
|
|
275
|
-
title: e.fileName ||
|
|
294
|
+
], 2)) : r("", !0)
|
|
295
|
+
], 10, pe))), 128)),
|
|
296
|
+
y.value && p.value ? (t(!0), l(x, { key: 0 }, $(z.value, (e, d) => (t(), u(C, {
|
|
297
|
+
key: `preview-${d}`,
|
|
298
|
+
show: N.value === d,
|
|
299
|
+
title: e.fileName || c(v)("common.words.preview", "Preview"),
|
|
276
300
|
"max-width": "max-w-3xl",
|
|
277
|
-
body:
|
|
278
|
-
bodyProps: { url: e.fileUrl, name: e.fileName, canDownload:
|
|
279
|
-
onClose:
|
|
280
|
-
}, null, 8, ["show", "title", "body", "bodyProps"]))), 128)) :
|
|
301
|
+
body: c(k),
|
|
302
|
+
bodyProps: { url: e.fileUrl, name: e.fileName, canDownload: h.value },
|
|
303
|
+
onClose: E
|
|
304
|
+
}, null, 8, ["show", "title", "body", "bodyProps"]))), 128)) : r("", !0)
|
|
281
305
|
], 2))
|
|
282
|
-
], 64)) : (
|
|
306
|
+
], 64)) : (t(), l("div", {
|
|
283
307
|
key: 1,
|
|
284
|
-
class:
|
|
285
|
-
},
|
|
308
|
+
class: n(["vl-attachments-list__empty text-sm text-muted-foreground italic bg-muted/10 p-4 rounded-lg border border-dashed border-border text-center", oe.value])
|
|
309
|
+
}, b(c(v)("common.words.noAttachments", "No attachments found.")), 3))
|
|
286
310
|
], 2));
|
|
287
311
|
}
|
|
288
312
|
});
|
|
289
313
|
export {
|
|
290
|
-
|
|
314
|
+
De as default
|
|
291
315
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AvatarSize, AvatarRounded } from '../../types';
|
|
2
|
+
export interface AvatarGroupItem {
|
|
3
|
+
src?: string;
|
|
4
|
+
alt?: string;
|
|
5
|
+
fallback?: string;
|
|
6
|
+
heading?: string;
|
|
7
|
+
text?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface Props {
|
|
10
|
+
items: AvatarGroupItem[];
|
|
11
|
+
max?: number;
|
|
12
|
+
size?: AvatarSize;
|
|
13
|
+
rounded?: AvatarRounded;
|
|
14
|
+
overlap?: 'sm' | 'md' | 'lg';
|
|
15
|
+
class?: string;
|
|
16
|
+
}
|
|
17
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
18
|
+
class: string;
|
|
19
|
+
size: AvatarSize;
|
|
20
|
+
rounded: AvatarRounded;
|
|
21
|
+
max: number;
|
|
22
|
+
overlap: "sm" | "md" | "lg";
|
|
23
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
24
|
+
export default _default;
|