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
|
@@ -1,176 +1,181 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VueDraggable as
|
|
1
|
+
import { defineComponent as K, inject as R, computed as g, resolveComponent as T, openBlock as r, createBlock as f, unref as l, withCtx as A, createElementBlock as d, Fragment as L, renderList as O, isMemoSame as P, createElementVNode as y, normalizeClass as u, createVNode as i, createCommentVNode as c, withDirectives as k, withModifiers as Q, withKeys as w, vModelText as z, toDisplayString as q, vShow as G } from "vue";
|
|
2
|
+
import { VueDraggable as H } from "vue-draggable-plus";
|
|
3
3
|
import C from "../Icon.vue.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const
|
|
4
|
+
import m from "../Button.vue.js";
|
|
5
|
+
import E from "../IconPicker.vue.js";
|
|
6
|
+
const J = { class: "flex items-center gap-px overflow-hidden flex-1" }, W = ["onClick"], X = { class: "flex items-center gap-1.5 overflow-hidden flex-1 w-full" }, Y = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "drag-handle cursor-grab active:cursor-grabbing text-muted hover:text-foreground transition-colors p-0.5 shrink-0"
|
|
9
|
-
},
|
|
9
|
+
}, Z = ["onUpdate:modelValue", "onChange"], ee = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity shrink-0 bg-background/80 px-1 rounded ml-2"
|
|
12
|
-
},
|
|
12
|
+
}, te = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "ml-6 pl-3 border-l border-border mt-1.5 flex flex-col relative"
|
|
15
|
-
},
|
|
15
|
+
}, ne = {
|
|
16
16
|
key: 1,
|
|
17
17
|
class: "flex items-center gap-1.5 py-1.5 px-2 bg-background border border-border shadow-sm rounded-lg w-full mb-1.5"
|
|
18
|
-
},
|
|
18
|
+
}, ue = /* @__PURE__ */ K({
|
|
19
19
|
__name: "CategoryNode",
|
|
20
20
|
props: {
|
|
21
21
|
modelValue: {},
|
|
22
22
|
level: { default: 0 }
|
|
23
23
|
},
|
|
24
|
-
emits: ["update:modelValue", "change"],
|
|
25
|
-
setup(V, { emit:
|
|
26
|
-
const S = V,
|
|
24
|
+
emits: ["update:modelValue", "change", "dragEnd"],
|
|
25
|
+
setup(V, { emit: U }) {
|
|
26
|
+
const S = V, p = U, n = R("categoryManager"), b = g({
|
|
27
27
|
get: () => S.modelValue,
|
|
28
|
-
set: (
|
|
29
|
-
}),
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
}),
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
set: (s) => p("update:modelValue", s)
|
|
29
|
+
}), D = (s, t) => {
|
|
30
|
+
t.children = s, p("change");
|
|
31
|
+
}, N = () => p("change"), M = (s) => {
|
|
32
|
+
const t = s.item?.dataset?.id;
|
|
33
|
+
t && p("dragEnd", t);
|
|
34
|
+
}, v = g(() => n?.readonly.value || !1), a = g(() => n?.size.value || "md"), j = g(() => a.value === "sm" ? "p-1 md:p-1.5" : a.value === "lg" ? "p-2 md:p-2.5" : "py-1.5 px-2"), I = g(() => {
|
|
35
|
+
const t = S.level === 0 ? "font-semibold" : "font-medium";
|
|
36
|
+
return a.value === "sm" ? `text-xs ${t} text-foreground` : a.value === "lg" ? `-text-fs-1 ${t} text-foreground` : `text-sm ${t} text-foreground`;
|
|
37
|
+
}), h = g(() => a.value === "sm" ? "w-3.5 h-3.5" : a.value === "lg" ? "w-4.5 h-4.5" : "w-4 h-4"), B = {
|
|
38
|
+
mounted: (s) => {
|
|
39
|
+
setTimeout(() => s.focus(), 10);
|
|
37
40
|
}
|
|
38
41
|
};
|
|
39
|
-
return (
|
|
40
|
-
const
|
|
41
|
-
return r(),
|
|
42
|
+
return (s, t) => {
|
|
43
|
+
const F = T("CategoryNode", !0);
|
|
44
|
+
return r(), f(l(H), {
|
|
42
45
|
modelValue: b.value,
|
|
43
|
-
"onUpdate:modelValue":
|
|
46
|
+
"onUpdate:modelValue": t[11] || (t[11] = (e) => b.value = e),
|
|
44
47
|
group: "category-manager",
|
|
45
48
|
animation: 150,
|
|
46
49
|
handle: ".drag-handle",
|
|
47
50
|
"ghost-class": "opacity-50",
|
|
48
51
|
disabled: v.value,
|
|
49
52
|
class: "min-h-[2px]",
|
|
50
|
-
|
|
53
|
+
onEnd: M
|
|
51
54
|
}, {
|
|
52
|
-
default:
|
|
53
|
-
(r(!0),
|
|
54
|
-
const
|
|
55
|
+
default: A(() => [
|
|
56
|
+
(r(!0), d(L, null, O(b.value, (e, oe, le, x) => {
|
|
57
|
+
const $ = [
|
|
55
58
|
e.id,
|
|
56
59
|
e.title,
|
|
57
60
|
e.icon,
|
|
58
|
-
e.children?.
|
|
59
|
-
l(
|
|
60
|
-
l(
|
|
61
|
-
l(
|
|
61
|
+
e.children?.map((o) => o.id).join(","),
|
|
62
|
+
l(n)?.expandedIds.value.has(e.id),
|
|
63
|
+
l(n)?.inlineState.value.targetId === e.id,
|
|
64
|
+
l(n)?.inlineState.value.mode,
|
|
62
65
|
v.value,
|
|
63
66
|
a.value
|
|
64
67
|
];
|
|
65
|
-
if (
|
|
66
|
-
const
|
|
68
|
+
if (x && x.key === e.id && P(x, $)) return x;
|
|
69
|
+
const _ = (r(), d("div", {
|
|
67
70
|
key: e.id,
|
|
71
|
+
"data-id": e.id,
|
|
68
72
|
class: "mb-1.5 flex flex-col"
|
|
69
73
|
}, [
|
|
70
|
-
|
|
74
|
+
y("div", {
|
|
71
75
|
class: u([
|
|
72
76
|
"group flex items-center justify-between rounded-lg transition-colors bg-body! border border-border ",
|
|
73
77
|
j.value
|
|
74
78
|
])
|
|
75
79
|
}, [
|
|
76
|
-
|
|
77
|
-
e.children && e.children.length > 0 ? (r(),
|
|
80
|
+
y("div", J, [
|
|
81
|
+
e.children && e.children.length > 0 ? (r(), d("button", {
|
|
78
82
|
key: 0,
|
|
79
|
-
onClick: (o) => l(
|
|
83
|
+
onClick: (o) => l(n)?.toggleExpand(e.id),
|
|
80
84
|
class: u([
|
|
81
85
|
"flex items-center justify-center shrink-0 text-muted-foreground hover:bg-muted rounded transition-colors",
|
|
82
86
|
a.value === "sm" ? "w-4 h-4" : a.value === "lg" ? "w-6 h-6" : "w-6.5 h-6.5"
|
|
83
87
|
])
|
|
84
88
|
}, [
|
|
85
89
|
i(C, {
|
|
86
|
-
icon: l(
|
|
87
|
-
class: u(
|
|
90
|
+
icon: l(n)?.expandedIds.value.has(e.id) ? "lucide:chevron-down" : "lucide:chevron-right",
|
|
91
|
+
class: u(h.value)
|
|
88
92
|
}, null, 8, ["icon", "class"])
|
|
89
|
-
], 10,
|
|
90
|
-
|
|
91
|
-
v.value ? c("", !0) : (r(),
|
|
93
|
+
], 10, W)) : c("", !0),
|
|
94
|
+
y("div", X, [
|
|
95
|
+
v.value ? c("", !0) : (r(), d("div", Y, [
|
|
92
96
|
i(C, {
|
|
93
97
|
icon: "lucide:grip-vertical",
|
|
94
|
-
class: u(
|
|
98
|
+
class: u(h.value)
|
|
95
99
|
}, null, 8, ["class"])
|
|
96
100
|
])),
|
|
97
|
-
v.value ? e.icon ? (r(),
|
|
101
|
+
v.value ? e.icon ? (r(), f(C, {
|
|
98
102
|
key: 2,
|
|
99
103
|
icon: e.icon,
|
|
100
|
-
class: u([
|
|
101
|
-
}, null, 8, ["icon", "class"])) : c("", !0) : (r(),
|
|
104
|
+
class: u([h.value, "shrink-0 text-muted-foreground"])
|
|
105
|
+
}, null, 8, ["icon", "class"])) : c("", !0) : (r(), f(E, {
|
|
102
106
|
key: 1,
|
|
103
107
|
value: e.icon,
|
|
104
108
|
"btn-props": {
|
|
105
109
|
variant: "ghost",
|
|
106
110
|
size: "xs",
|
|
107
|
-
iconClass:
|
|
111
|
+
iconClass: h.value,
|
|
108
112
|
class: (a.value === "sm" ? "h-5 w-5" : a.value === "lg" ? "h-7 w-7" : "h-6 w-6") + " -ml-0.5! p-0 text-muted-foreground hover:text-foreground shrink-0 rounded-md"
|
|
109
113
|
},
|
|
110
114
|
position: "bottom-start",
|
|
111
115
|
onOnSelect: (o) => {
|
|
112
|
-
console.log("IconPicker value :>> ", o), e.icon = o, l(
|
|
116
|
+
console.log("IconPicker value :>> ", o), e.icon = o, l(n)?.saveItem(e);
|
|
113
117
|
}
|
|
114
118
|
}, null, 8, ["value", "btn-props", "onOnSelect"])),
|
|
115
|
-
v.value ? (r(),
|
|
119
|
+
v.value ? (r(), d("span", {
|
|
116
120
|
key: 4,
|
|
117
|
-
class: u(["truncate",
|
|
118
|
-
},
|
|
121
|
+
class: u(["truncate", I.value])
|
|
122
|
+
}, q(e.title), 3)) : k((r(), d("input", {
|
|
119
123
|
key: 3,
|
|
120
124
|
"onUpdate:modelValue": (o) => e.title = o,
|
|
121
125
|
class: u([
|
|
122
126
|
"bg-transparent border-0 outline-none focus:ring-0 px-1 py-0.5 -ml-1 transition-colors w-full truncate cursor-text min-w-0 shadow-none caret-primary",
|
|
123
|
-
|
|
127
|
+
I.value
|
|
124
128
|
]),
|
|
125
129
|
placeholder: "Category title...",
|
|
126
|
-
onChange: (o) => l(
|
|
127
|
-
onKeyup:
|
|
128
|
-
onClick:
|
|
130
|
+
onChange: (o) => l(n)?.saveItem(e),
|
|
131
|
+
onKeyup: t[0] || (t[0] = w((o) => o.target.blur(), ["enter"])),
|
|
132
|
+
onClick: t[1] || (t[1] = Q(() => {
|
|
129
133
|
}, ["stop"]))
|
|
130
|
-
}, null, 42,
|
|
131
|
-
[
|
|
134
|
+
}, null, 42, Z)), [
|
|
135
|
+
[z, e.title]
|
|
132
136
|
])
|
|
133
137
|
])
|
|
134
138
|
]),
|
|
135
|
-
v.value ? c("", !0) : (r(),
|
|
136
|
-
i(
|
|
139
|
+
v.value ? c("", !0) : (r(), d("div", ee, [
|
|
140
|
+
i(m, {
|
|
137
141
|
variant: "ghost",
|
|
138
142
|
size: "xs",
|
|
139
143
|
icon: "lucide:plus",
|
|
140
144
|
title: "Quick Add Subcategory",
|
|
141
145
|
class: "h-7 w-7 px-0 text-muted-foreground hover:text-primary",
|
|
142
|
-
onClick: (o) => l(
|
|
146
|
+
onClick: (o) => l(n)?.startInline("add-child", e.id)
|
|
143
147
|
}, null, 8, ["onClick"]),
|
|
144
|
-
i(
|
|
148
|
+
i(m, {
|
|
145
149
|
variant: "ghost",
|
|
146
150
|
size: "xs",
|
|
147
151
|
icon: "lucide:settings",
|
|
148
152
|
title: "Advanced Details",
|
|
149
153
|
class: "h-7 w-7 px-0 text-muted-foreground hover:text-primary",
|
|
150
|
-
onClick: (o) => l(
|
|
154
|
+
onClick: (o) => l(n)?.openModalForm("edit", e)
|
|
151
155
|
}, null, 8, ["onClick"]),
|
|
152
|
-
i(
|
|
156
|
+
i(m, {
|
|
153
157
|
variant: "ghost",
|
|
154
158
|
size: "xs",
|
|
155
159
|
icon: "lucide:trash-2",
|
|
156
160
|
title: "Delete",
|
|
157
161
|
class: "h-7 w-7 px-0 text-muted-foreground hover:text-destructive hover:bg-destructive/10",
|
|
158
|
-
onClick: (o) => l(
|
|
162
|
+
onClick: (o) => l(n)?.deleteItem(e)
|
|
159
163
|
}, null, 8, ["onClick"])
|
|
160
164
|
]))
|
|
161
165
|
], 2),
|
|
162
|
-
e.children && e.children.length > 0 || l(
|
|
163
|
-
e.children && e.children.length > 0 ? (r(),
|
|
166
|
+
e.children && e.children.length > 0 || l(n)?.inlineState.value.mode === "add-child" && l(n).inlineState.value.targetId === e.id ? k((r(), d("div", te, [
|
|
167
|
+
e.children && e.children.length > 0 ? (r(), f(F, {
|
|
164
168
|
key: 0,
|
|
165
169
|
modelValue: e.children,
|
|
166
|
-
"onUpdate:modelValue": (o) =>
|
|
170
|
+
"onUpdate:modelValue": (o) => D(o, e),
|
|
167
171
|
level: V.level + 1,
|
|
168
|
-
onChange:
|
|
172
|
+
onChange: N,
|
|
173
|
+
onDragEnd: t[2] || (t[2] = (o) => p("dragEnd", o))
|
|
169
174
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "level"])) : c("", !0),
|
|
170
|
-
l(
|
|
171
|
-
i(
|
|
172
|
-
modelValue: l(
|
|
173
|
-
"onUpdate:modelValue":
|
|
175
|
+
l(n)?.inlineState.value.mode === "add-child" && l(n).inlineState.value.targetId === e.id ? (r(), d("div", ne, [
|
|
176
|
+
i(E, {
|
|
177
|
+
modelValue: l(n).inlineState.value.icon,
|
|
178
|
+
"onUpdate:modelValue": t[3] || (t[3] = (o) => l(n).inlineState.value.icon = o),
|
|
174
179
|
"btn-props": {
|
|
175
180
|
variant: "ghost",
|
|
176
181
|
size: "xs",
|
|
@@ -178,41 +183,41 @@ const H = { class: "flex items-center gap-px overflow-hidden flex-1" }, J = ["on
|
|
|
178
183
|
},
|
|
179
184
|
position: "bottom-start"
|
|
180
185
|
}, null, 8, ["modelValue"]),
|
|
181
|
-
k(
|
|
182
|
-
"onUpdate:modelValue":
|
|
186
|
+
k(y("input", {
|
|
187
|
+
"onUpdate:modelValue": t[4] || (t[4] = (o) => l(n).inlineState.value.title = o),
|
|
183
188
|
class: "flex-1 bg-transparent border-0 outline-none focus:ring-0 px-1 py-0.5 text-sm transition-colors w-full shadow-none caret-primary text-foreground placeholder:text-muted-foreground",
|
|
184
189
|
placeholder: "New subcategory title...",
|
|
185
190
|
onKeyup: [
|
|
186
|
-
|
|
187
|
-
|
|
191
|
+
t[5] || (t[5] = w((o) => l(n).saveInline(), ["enter"])),
|
|
192
|
+
t[6] || (t[6] = w((o) => l(n).cancelInline(), ["esc"]))
|
|
188
193
|
]
|
|
189
194
|
}, null, 544), [
|
|
190
195
|
[B],
|
|
191
|
-
[
|
|
196
|
+
[z, l(n).inlineState.value.title]
|
|
192
197
|
]),
|
|
193
|
-
i(
|
|
198
|
+
i(m, {
|
|
194
199
|
variant: "primary",
|
|
195
200
|
size: "xs",
|
|
196
201
|
icon: "lucide:check",
|
|
197
202
|
class: "shrink-0 h-6 w-6 px-0",
|
|
198
203
|
title: "Save",
|
|
199
|
-
onClick:
|
|
204
|
+
onClick: t[7] || (t[7] = (o) => l(n).saveInline())
|
|
200
205
|
}),
|
|
201
|
-
i(
|
|
206
|
+
i(m, {
|
|
202
207
|
variant: "ghost",
|
|
203
208
|
size: "xs",
|
|
204
209
|
icon: "lucide:x",
|
|
205
210
|
class: "shrink-0 h-6 w-6 px-0",
|
|
206
211
|
title: "Cancel",
|
|
207
|
-
onClick:
|
|
212
|
+
onClick: t[8] || (t[8] = (o) => l(n).cancelInline())
|
|
208
213
|
})
|
|
209
214
|
])) : c("", !0)
|
|
210
215
|
], 512)), [
|
|
211
|
-
[
|
|
216
|
+
[G, l(n)?.expandedIds.value.has(e.id)]
|
|
212
217
|
]) : c("", !0)
|
|
213
|
-
]));
|
|
214
|
-
return
|
|
215
|
-
},
|
|
218
|
+
], 8, ["data-id"]));
|
|
219
|
+
return _.memo = $, _;
|
|
220
|
+
}, t, 9), 128))
|
|
216
221
|
]),
|
|
217
222
|
_: 1
|
|
218
223
|
}, 8, ["modelValue", "disabled"]);
|
|
@@ -220,5 +225,5 @@ const H = { class: "flex items-center gap-px overflow-hidden flex-1" }, J = ["on
|
|
|
220
225
|
}
|
|
221
226
|
});
|
|
222
227
|
export {
|
|
223
|
-
|
|
228
|
+
ue as default
|
|
224
229
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as S, computed as x, ref as T, openBlock as t, createElementBlock as
|
|
1
|
+
import { defineComponent as S, computed as x, ref as T, openBlock as t, createElementBlock as i, normalizeClass as l, createVNode as f, createCommentVNode as a, createElementVNode as d, toDisplayString as u, unref as B, createBlock as E, withModifiers as C } from "vue";
|
|
2
2
|
import D from "../Avatar.vue.js";
|
|
3
3
|
import g from "../Button.vue.js";
|
|
4
4
|
import I from "../AttachmentsList/AttachmentsList.vue.js";
|
|
@@ -53,16 +53,16 @@ const z = {
|
|
|
53
53
|
}, k = () => {
|
|
54
54
|
n.value = !1, r && (clearTimeout(r), r = null);
|
|
55
55
|
};
|
|
56
|
-
return (m, o) => (t(),
|
|
56
|
+
return (m, o) => (t(), i("div", {
|
|
57
57
|
class: l(["flex w-full min-w-0 gap-3 group", e.isSender ? "flex-row-reverse" : "flex-row"])
|
|
58
58
|
}, [
|
|
59
|
-
e.showAvatar ? (t(),
|
|
59
|
+
e.showAvatar ? (t(), i("div", z, [
|
|
60
60
|
f(D, {
|
|
61
61
|
src: e.message.avatar,
|
|
62
62
|
alt: e.message.senderName,
|
|
63
63
|
size: "sm"
|
|
64
64
|
}, null, 8, ["src", "alt"])
|
|
65
|
-
])) :
|
|
65
|
+
])) : a("", !0),
|
|
66
66
|
d("div", {
|
|
67
67
|
class: l(["flex flex-col min-w-0 overflow-hidden max-w-[85%]", e.isSender ? "items-end" : "items-start"])
|
|
68
68
|
}, [
|
|
@@ -74,9 +74,9 @@ const z = {
|
|
|
74
74
|
e.isSender ? "bg-primary text-primary-foreground rounded-br-sm" : "bg-muted text-foreground rounded-bl-sm"
|
|
75
75
|
]])
|
|
76
76
|
}, [
|
|
77
|
-
e.showUserInfo && e.message.senderName && !e.isSender ? (t(),
|
|
78
|
-
e.message.text ? (t(),
|
|
79
|
-
e.message.attachments && e.message.attachments.length > 0 ? (t(),
|
|
77
|
+
e.showUserInfo && e.message.senderName && !e.isSender ? (t(), i("div", A, u(e.message.senderName), 1)) : a("", !0),
|
|
78
|
+
e.message.text ? (t(), i("p", N, u(e.message.text), 1)) : a("", !0),
|
|
79
|
+
e.message.attachments && e.message.attachments.length > 0 ? (t(), i("div", {
|
|
80
80
|
key: 2,
|
|
81
81
|
class: l({ "mt-2": e.message.text || e.showUserInfo && !e.isSender })
|
|
82
82
|
}, [
|
|
@@ -89,27 +89,27 @@ const z = {
|
|
|
89
89
|
"click-to-preview": !0,
|
|
90
90
|
"show-download-in-list": !1
|
|
91
91
|
}, null, 8, ["attachments"])
|
|
92
|
-
], 2)) :
|
|
93
|
-
e.showTimestamp && (e.message.timestamp || e.message.isEdited) ? (t(),
|
|
92
|
+
], 2)) : a("", !0),
|
|
93
|
+
e.showTimestamp && (e.message.timestamp || e.message.isEdited) ? (t(), i("div", {
|
|
94
94
|
key: 3,
|
|
95
95
|
class: l(["mt-1 flex items-center gap-1", e.isSender ? "justify-end" : "justify-start"])
|
|
96
96
|
}, [
|
|
97
|
-
e.message.isEdited && e.showEditedStatus !== !1 ? (t(),
|
|
97
|
+
e.message.isEdited && e.showEditedStatus !== !1 ? (t(), i("span", {
|
|
98
98
|
key: 0,
|
|
99
99
|
class: l(["text-[10px] opacity-60", e.isSender ? "text-primary-foreground" : "text-muted-foreground"])
|
|
100
|
-
}, u(y.value), 3)) :
|
|
101
|
-
e.message.isEdited && e.showEditedStatus !== !1 && e.message.timestamp ? (t(),
|
|
100
|
+
}, u(y.value), 3)) : a("", !0),
|
|
101
|
+
e.message.isEdited && e.showEditedStatus !== !1 && e.message.timestamp ? (t(), i("span", {
|
|
102
102
|
key: 1,
|
|
103
103
|
class: l(["text-[10px] opacity-40", e.isSender ? "text-primary-foreground" : "text-muted-foreground"])
|
|
104
|
-
}, " · ", 2)) :
|
|
105
|
-
e.message.timestamp ? (t(),
|
|
104
|
+
}, " · ", 2)) : a("", !0),
|
|
105
|
+
e.message.timestamp ? (t(), i("span", {
|
|
106
106
|
key: 2,
|
|
107
107
|
class: l(["text-[10px] opacity-60 tabular-nums", e.isSender ? "text-primary-foreground" : "text-muted-foreground"])
|
|
108
|
-
}, u(h.value), 3)) :
|
|
109
|
-
], 2)) :
|
|
108
|
+
}, u(h.value), 3)) : a("", !0)
|
|
109
|
+
], 2)) : a("", !0)
|
|
110
110
|
], 2),
|
|
111
111
|
d("div", {
|
|
112
|
-
class: l(["
|
|
112
|
+
class: l(["opacity-0 group-hover/bubble:opacity-100 focus-within:opacity-100 transition-opacity flex gap-0 pointer-events-none group-hover/bubble:pointer-events-auto focus-within:pointer-events-auto z-10", e.isSender ? "right-full pr-1" : "left-full pl-1"])
|
|
113
113
|
}, [
|
|
114
114
|
(e.isSender || e.allowEditAll) && e.message.text?.trim() ? (t(), E(g, {
|
|
115
115
|
key: 0,
|
|
@@ -120,8 +120,8 @@ const z = {
|
|
|
120
120
|
class: "text-muted-foreground hover:text-foreground h-7 w-7",
|
|
121
121
|
onClick: o[0] || (o[0] = ($) => c("edit", e.message)),
|
|
122
122
|
"aria-label": "Edit message"
|
|
123
|
-
})) :
|
|
124
|
-
e.isSender || e.allowDeleteAll ? (t(),
|
|
123
|
+
})) : a("", !0),
|
|
124
|
+
e.isSender || e.allowDeleteAll ? (t(), i("div", j, [
|
|
125
125
|
f(g, {
|
|
126
126
|
variant: "ghost",
|
|
127
127
|
size: "xs",
|
|
@@ -131,7 +131,7 @@ const z = {
|
|
|
131
131
|
onClick: b,
|
|
132
132
|
"aria-label": n.value ? "Confirm delete" : "Delete message"
|
|
133
133
|
}, null, 8, ["icon", "aria-label"]),
|
|
134
|
-
n.value ? (t(),
|
|
134
|
+
n.value ? (t(), i("button", {
|
|
135
135
|
key: 0,
|
|
136
136
|
class: "absolute -top-1.5 -right-1.5 w-3.5 h-3.5 rounded-full bg-muted border border-border flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors",
|
|
137
137
|
onClick: C(k, ["stop"]),
|
|
@@ -160,8 +160,8 @@ const z = {
|
|
|
160
160
|
y2: "18"
|
|
161
161
|
})
|
|
162
162
|
], -1)
|
|
163
|
-
])])) :
|
|
164
|
-
])) :
|
|
163
|
+
])])) : a("", !0)
|
|
164
|
+
])) : a("", !0)
|
|
165
165
|
], 2)
|
|
166
166
|
], 2)
|
|
167
167
|
], 2)
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as v, computed as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { $t as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as v, computed as n, openBlock as s, createElementBlock as f, createElementVNode as g, normalizeClass as o, createVNode as w, Transition as C, withCtx as h, createBlock as c, createCommentVNode as r, createTextVNode as V, toDisplayString as z } from "vue";
|
|
2
|
+
import b from "./Icon.vue.js";
|
|
3
|
+
import $ from "./Label.vue.js";
|
|
4
|
+
import { $t as B } from "../utils/i18n.js";
|
|
5
|
+
const N = { class: "flex items-center space-x-2" }, j = ["aria-checked", "data-state", "disabled", "id", "data-testid"], I = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "flex items-center justify-center text-current w-full h-full"
|
|
8
|
-
},
|
|
8
|
+
}, q = /* @__PURE__ */ v({
|
|
9
9
|
__name: "CheckBox",
|
|
10
10
|
props: {
|
|
11
11
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -20,24 +20,24 @@ const _ = { class: "flex items-center space-x-2" }, j = ["aria-checked", "data-s
|
|
|
20
20
|
rounded: {}
|
|
21
21
|
},
|
|
22
22
|
emits: ["update:modelValue", "update:checked"],
|
|
23
|
-
setup(t, { emit:
|
|
24
|
-
const e = t,
|
|
23
|
+
setup(t, { emit: k }) {
|
|
24
|
+
const e = t, u = k, d = n(() => e.labelI18n ? B(e.labelI18n) : e.label), m = () => {
|
|
25
25
|
if (e.disabled) return;
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
},
|
|
26
|
+
const l = !(e.modelValue || e.checked);
|
|
27
|
+
u("update:modelValue", l), u("update:checked", l);
|
|
28
|
+
}, p = {
|
|
29
29
|
xs: "h-3.5 w-3.5",
|
|
30
30
|
sm: "h-4 w-4",
|
|
31
31
|
md: "h-4.5 w-4.5",
|
|
32
32
|
lg: "h-5 w-5",
|
|
33
33
|
xl: "h-5.5 w-5.5"
|
|
34
|
-
},
|
|
34
|
+
}, i = {
|
|
35
35
|
xs: "h-2.5 w-2.5",
|
|
36
36
|
sm: "h-3 w-3",
|
|
37
37
|
md: "h-3.5 w-3.5",
|
|
38
38
|
lg: "h-4 w-4",
|
|
39
39
|
xl: "h-5 w-5"
|
|
40
|
-
},
|
|
40
|
+
}, x = {
|
|
41
41
|
none: "rounded-none",
|
|
42
42
|
xs: "rounded-[3px]",
|
|
43
43
|
sm: "rounded-[4px]",
|
|
@@ -46,34 +46,35 @@ const _ = { class: "flex items-center space-x-2" }, j = ["aria-checked", "data-s
|
|
|
46
46
|
xl: "rounded-lg",
|
|
47
47
|
"2xl": "rounded-xl",
|
|
48
48
|
full: "rounded-full"
|
|
49
|
-
}, a =
|
|
49
|
+
}, a = n(() => e.indeterminate ? "indeterminate" : e.modelValue || e.checked ? "checked" : "unchecked"), y = n(() => [
|
|
50
50
|
"peer shrink-0 border transition-all duration-200 ease-in-out",
|
|
51
51
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",
|
|
52
52
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
53
53
|
"data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
|
54
54
|
"data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground",
|
|
55
55
|
"cursor-pointer bg-transparent",
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
p[e.size],
|
|
57
|
+
x[e.rounded || e.size],
|
|
58
58
|
a.value === "checked" ? "border-primary!" : "border-gray-400!",
|
|
59
59
|
e.class
|
|
60
60
|
].join(" "));
|
|
61
|
-
return
|
|
61
|
+
return n(() => [
|
|
62
62
|
"transition-transform duration-200",
|
|
63
63
|
a.value === "checked" || a.value === "indeterminate" ? "scale-100" : "scale-0",
|
|
64
|
-
|
|
65
|
-
].join(" ")), (
|
|
64
|
+
i[e.size]
|
|
65
|
+
].join(" ")), (l, S) => (s(), f("div", N, [
|
|
66
66
|
g("button", {
|
|
67
67
|
type: "button",
|
|
68
68
|
role: "checkbox",
|
|
69
69
|
"aria-checked": t.indeterminate ? "mixed" : t.modelValue,
|
|
70
70
|
"data-state": a.value,
|
|
71
71
|
disabled: t.disabled,
|
|
72
|
-
class:
|
|
72
|
+
class: o(y.value),
|
|
73
73
|
id: t.id,
|
|
74
|
+
"data-testid": l.$attrs["data-testid"] || (l.$attrs.name ? `checkbox-${l.$attrs.name}` : t.id ? `checkbox-${t.id}` : d.value ? `checkbox-${d.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "checkbox"),
|
|
74
75
|
onClick: m
|
|
75
76
|
}, [
|
|
76
|
-
a.value === "checked" || a.value === "indeterminate" ? (
|
|
77
|
+
a.value === "checked" || a.value === "indeterminate" ? (s(), f("div", I, [
|
|
77
78
|
w(C, {
|
|
78
79
|
"enter-active-class": "transition duration-200 ease-out",
|
|
79
80
|
"enter-from-class": "scale-50 opacity-0",
|
|
@@ -83,28 +84,28 @@ const _ = { class: "flex items-center space-x-2" }, j = ["aria-checked", "data-s
|
|
|
83
84
|
"leave-to-class": "scale-50 opacity-0"
|
|
84
85
|
}, {
|
|
85
86
|
default: h(() => [
|
|
86
|
-
a.value === "checked" ? (
|
|
87
|
+
a.value === "checked" ? (s(), c(b, {
|
|
87
88
|
key: 0,
|
|
88
89
|
icon: "lucide:check",
|
|
89
|
-
class: i
|
|
90
|
-
}, null, 8, ["class"])) : a.value === "indeterminate" ? (
|
|
90
|
+
class: o(i[t.size])
|
|
91
|
+
}, null, 8, ["class"])) : a.value === "indeterminate" ? (s(), c(b, {
|
|
91
92
|
key: 1,
|
|
92
93
|
icon: "lucide:minus",
|
|
93
|
-
class: i
|
|
94
|
+
class: o(i[t.size])
|
|
94
95
|
}, null, 8, ["class"])) : r("", !0)
|
|
95
96
|
]),
|
|
96
97
|
_: 1
|
|
97
98
|
})
|
|
98
99
|
])) : r("", !0)
|
|
99
100
|
], 10, j),
|
|
100
|
-
|
|
101
|
+
d.value ? (s(), c($, {
|
|
101
102
|
key: 0,
|
|
102
103
|
for: t.id,
|
|
103
104
|
class: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer",
|
|
104
105
|
onClick: m
|
|
105
106
|
}, {
|
|
106
107
|
default: h(() => [
|
|
107
|
-
V(z(
|
|
108
|
+
V(z(d.value), 1)
|
|
108
109
|
]),
|
|
109
110
|
_: 1
|
|
110
111
|
}, 8, ["for"])) : r("", !0)
|
|
@@ -112,5 +113,5 @@ const _ = { class: "flex items-center space-x-2" }, j = ["aria-checked", "data-s
|
|
|
112
113
|
}
|
|
113
114
|
});
|
|
114
115
|
export {
|
|
115
|
-
|
|
116
|
+
q as default
|
|
116
117
|
};
|
|
@@ -4,7 +4,7 @@ import k from "../Icon.vue.js";
|
|
|
4
4
|
import { $t as E } from "../../utils/i18n.js";
|
|
5
5
|
import { useCommandPaletteItems as Y } from "./useCommandPaletteItems.js";
|
|
6
6
|
import { useCommandPaletteNav as Z } from "./useCommandPaletteNav.js";
|
|
7
|
-
import ee from "./CommandPaletteItem.
|
|
7
|
+
import ee from "./CommandPaletteItem.vue2.js";
|
|
8
8
|
const te = { class: "command-palette-content flex flex-col w-full h-full max-h-[70vh]" }, oe = { class: "flex items-center gap-3 px-4 py-3 border-b border-border/80 shrink-0" }, se = ["placeholder"], ne = ["aria-label"], re = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "flex flex-col items-center justify-center py-14 px-6 text-center select-none",
|