vlite3 1.2.13 → 1.2.14
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/Avatar.vue.js +14 -14
- package/components/Button.vue.js +3 -3
- package/components/CategoryManager/CategoryManager.vue.js +325 -203
- package/components/CategoryManager/CategoryNode.vue.js +91 -91
- package/components/CategoryManager/types.d.ts +41 -0
- package/components/Chat/ChatBubble.vue.js +1 -1
- package/components/Clipboard.vue.d.ts +1 -18
- package/components/Clipboard.vue.js +15 -23
- package/components/DataTable/DataTable.vue.js +2 -5
- package/components/Dropdown/DropdownItem.vue.js +1 -1
- package/components/Label.vue.js +4 -4
- package/components/MultiSelect/MultiSelect.vue.js +29 -27
- package/components/PermissionMatrix/PermissionEditorMatrix.vue.js +2 -2
- package/components/PermissionMatrix/PermissionEditorMatrix.vue2.js +17 -17
- package/components/Screen/ScreenFilter.vue.js +1 -1
- package/components/Workbook/Sheet.vue.js +63 -76
- package/package.json +1 -1
- package/style.css +25 -25
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as A, inject as B, computed as p, resolveComponent as F, openBlock as r, createBlock as f, unref as l, withCtx as K, createElementBlock as s, Fragment as R, renderList as L, isMemoSame as O, createElementVNode as y, normalizeClass as u, createVNode as d, createCommentVNode as c, withDirectives as k, withModifiers as q, withKeys as w, vModelText as _, toDisplayString as Q, vShow as G } from "vue";
|
|
2
2
|
import { VueDraggable as H } from "vue-draggable-plus";
|
|
3
3
|
import C from "../Icon.vue.js";
|
|
4
4
|
import m from "../Button.vue.js";
|
|
5
|
-
import
|
|
5
|
+
import z from "../IconPicker.vue.js";
|
|
6
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
|
-
}, Z = ["onUpdate:modelValue", "onChange"], ee = {
|
|
9
|
+
}, Z = ["onUpdate:modelValue", "placeholder", "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
|
+
}, le = {
|
|
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
|
+
}, oe = ["placeholder"], ce = /* @__PURE__ */ A({
|
|
19
19
|
__name: "CategoryNode",
|
|
20
20
|
props: {
|
|
21
21
|
modelValue: {},
|
|
22
22
|
level: { default: 0 }
|
|
23
23
|
},
|
|
24
24
|
emits: ["update:modelValue", "change", "dragEnd"],
|
|
25
|
-
setup(V, { emit:
|
|
26
|
-
const S = V,
|
|
25
|
+
setup(V, { emit: E }) {
|
|
26
|
+
const S = V, g = E, t = B("categoryManager"), b = p({
|
|
27
27
|
get: () => S.modelValue,
|
|
28
|
-
set: (
|
|
29
|
-
}), D = (
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
}, v =
|
|
35
|
-
const
|
|
36
|
-
return a.value === "sm" ? `text-xs ${
|
|
37
|
-
}), h =
|
|
38
|
-
mounted: (
|
|
39
|
-
setTimeout(() =>
|
|
28
|
+
set: (i) => g("update:modelValue", i)
|
|
29
|
+
}), D = (i, o) => {
|
|
30
|
+
o.children = i, g("change");
|
|
31
|
+
}, U = () => g("change"), N = (i) => {
|
|
32
|
+
const o = i.item?.dataset?.id;
|
|
33
|
+
o && g("dragEnd", o);
|
|
34
|
+
}, v = p(() => t?.readonly.value || !1), a = p(() => t?.size.value || "md"), M = p(() => a.value === "sm" ? "p-1 md:p-1.5" : a.value === "lg" ? "p-2 md:p-2.5" : "py-1.5 px-2"), I = p(() => {
|
|
35
|
+
const o = S.level === 0 ? "font-semibold" : "font-medium";
|
|
36
|
+
return a.value === "sm" ? `text-xs ${o} text-foreground` : a.value === "lg" ? `-text-fs-1 ${o} text-foreground` : `text-sm ${o} text-foreground`;
|
|
37
|
+
}), h = p(() => a.value === "sm" ? "w-3.5 h-3.5" : a.value === "lg" ? "w-4.5 h-4.5" : "w-4 h-4"), j = {
|
|
38
|
+
mounted: (i) => {
|
|
39
|
+
setTimeout(() => i.focus(), 10);
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
|
-
return (
|
|
43
|
-
const
|
|
42
|
+
return (i, o) => {
|
|
43
|
+
const P = F("CategoryNode", !0);
|
|
44
44
|
return r(), f(l(H), {
|
|
45
45
|
modelValue: b.value,
|
|
46
|
-
"onUpdate:modelValue":
|
|
46
|
+
"onUpdate:modelValue": o[11] || (o[11] = (e) => b.value = e),
|
|
47
47
|
group: "category-manager",
|
|
48
48
|
animation: 150,
|
|
49
49
|
handle: ".drag-handle",
|
|
50
50
|
"ghost-class": "opacity-50",
|
|
51
51
|
disabled: v.value,
|
|
52
52
|
class: "min-h-[2px]",
|
|
53
|
-
onEnd:
|
|
53
|
+
onEnd: N
|
|
54
54
|
}, {
|
|
55
|
-
default:
|
|
56
|
-
(r(!0),
|
|
57
|
-
const
|
|
55
|
+
default: K(() => [
|
|
56
|
+
(r(!0), s(R, null, L(b.value, (e, ne, re, x) => {
|
|
57
|
+
const T = [
|
|
58
58
|
e.id,
|
|
59
59
|
e.title,
|
|
60
60
|
e.icon,
|
|
61
|
-
e.children?.map((
|
|
62
|
-
l(
|
|
63
|
-
l(
|
|
64
|
-
l(
|
|
61
|
+
e.children?.map((n) => n.id).join(","),
|
|
62
|
+
l(t)?.expandedIds.value.has(e.id),
|
|
63
|
+
l(t)?.inlineState.value.targetId === e.id,
|
|
64
|
+
l(t)?.inlineState.value.mode,
|
|
65
65
|
v.value,
|
|
66
66
|
a.value
|
|
67
67
|
];
|
|
68
|
-
if (x && x.key === e.id &&
|
|
69
|
-
const
|
|
68
|
+
if (x && x.key === e.id && O(x, T)) return x;
|
|
69
|
+
const $ = (r(), s("div", {
|
|
70
70
|
key: e.id,
|
|
71
71
|
"data-id": e.id,
|
|
72
72
|
class: "mb-1.5 flex flex-col"
|
|
@@ -74,26 +74,26 @@ const J = { class: "flex items-center gap-px overflow-hidden flex-1" }, W = ["on
|
|
|
74
74
|
y("div", {
|
|
75
75
|
class: u([
|
|
76
76
|
"group flex items-center justify-between rounded-lg transition-colors bg-body! border border-border ",
|
|
77
|
-
|
|
77
|
+
M.value
|
|
78
78
|
])
|
|
79
79
|
}, [
|
|
80
80
|
y("div", J, [
|
|
81
|
-
e.children && e.children.length > 0 ? (r(),
|
|
81
|
+
e.children && e.children.length > 0 ? (r(), s("button", {
|
|
82
82
|
key: 0,
|
|
83
|
-
onClick: (
|
|
83
|
+
onClick: (n) => l(t)?.toggleExpand(e.id),
|
|
84
84
|
class: u([
|
|
85
85
|
"flex items-center justify-center shrink-0 text-muted-foreground hover:bg-muted rounded transition-colors",
|
|
86
86
|
a.value === "sm" ? "w-4 h-4" : a.value === "lg" ? "w-6 h-6" : "w-6.5 h-6.5"
|
|
87
87
|
])
|
|
88
88
|
}, [
|
|
89
|
-
|
|
90
|
-
icon: l(
|
|
89
|
+
d(C, {
|
|
90
|
+
icon: l(t)?.expandedIds.value.has(e.id) ? "lucide:chevron-down" : "lucide:chevron-right",
|
|
91
91
|
class: u(h.value)
|
|
92
92
|
}, null, 8, ["icon", "class"])
|
|
93
93
|
], 10, W)) : c("", !0),
|
|
94
94
|
y("div", X, [
|
|
95
|
-
v.value ? c("", !0) : (r(),
|
|
96
|
-
|
|
95
|
+
v.value ? c("", !0) : (r(), s("div", Y, [
|
|
96
|
+
d(C, {
|
|
97
97
|
icon: "lucide:grip-vertical",
|
|
98
98
|
class: u(h.value)
|
|
99
99
|
}, null, 8, ["class"])
|
|
@@ -102,7 +102,7 @@ const J = { class: "flex items-center gap-px overflow-hidden flex-1" }, W = ["on
|
|
|
102
102
|
key: 2,
|
|
103
103
|
icon: e.icon,
|
|
104
104
|
class: u([h.value, "shrink-0 text-muted-foreground"])
|
|
105
|
-
}, null, 8, ["icon", "class"])) : c("", !0) : (r(), f(
|
|
105
|
+
}, null, 8, ["icon", "class"])) : c("", !0) : (r(), f(z, {
|
|
106
106
|
key: 1,
|
|
107
107
|
value: e.icon,
|
|
108
108
|
"btn-props": {
|
|
@@ -112,70 +112,70 @@ const J = { class: "flex items-center gap-px overflow-hidden flex-1" }, W = ["on
|
|
|
112
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"
|
|
113
113
|
},
|
|
114
114
|
position: "bottom-start",
|
|
115
|
-
onOnSelect: (
|
|
116
|
-
console.log("IconPicker value :>> ",
|
|
115
|
+
onOnSelect: (n) => {
|
|
116
|
+
console.log("IconPicker value :>> ", n), e.icon = n, l(t)?.saveItem(e);
|
|
117
117
|
}
|
|
118
118
|
}, null, 8, ["value", "btn-props", "onOnSelect"])),
|
|
119
|
-
v.value ? (r(),
|
|
119
|
+
v.value ? (r(), s("span", {
|
|
120
120
|
key: 4,
|
|
121
121
|
class: u(["truncate", I.value])
|
|
122
|
-
},
|
|
122
|
+
}, Q(e.title), 3)) : k((r(), s("input", {
|
|
123
123
|
key: 3,
|
|
124
|
-
"onUpdate:modelValue": (
|
|
124
|
+
"onUpdate:modelValue": (n) => e.title = n,
|
|
125
125
|
class: u([
|
|
126
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",
|
|
127
127
|
I.value
|
|
128
128
|
]),
|
|
129
|
-
placeholder: "Category title...",
|
|
130
|
-
onChange: (
|
|
131
|
-
onKeyup:
|
|
132
|
-
onClick:
|
|
129
|
+
placeholder: l(t)?.categoryTitlePlaceholderText.value || "Category title...",
|
|
130
|
+
onChange: (n) => l(t)?.saveItem(e),
|
|
131
|
+
onKeyup: o[0] || (o[0] = w((n) => n.target.blur(), ["enter"])),
|
|
132
|
+
onClick: o[1] || (o[1] = q(() => {
|
|
133
133
|
}, ["stop"]))
|
|
134
134
|
}, null, 42, Z)), [
|
|
135
|
-
[
|
|
135
|
+
[_, e.title]
|
|
136
136
|
])
|
|
137
137
|
])
|
|
138
138
|
]),
|
|
139
|
-
v.value ? c("", !0) : (r(),
|
|
140
|
-
|
|
139
|
+
v.value ? c("", !0) : (r(), s("div", ee, [
|
|
140
|
+
d(m, {
|
|
141
141
|
variant: "ghost",
|
|
142
142
|
size: "xs",
|
|
143
143
|
icon: "lucide:plus",
|
|
144
|
-
title: "Quick Add Subcategory",
|
|
144
|
+
title: l(t)?.quickAddTooltipText.value || "Quick Add Subcategory",
|
|
145
145
|
class: "h-7 w-7 px-0 text-muted-foreground hover:text-primary",
|
|
146
|
-
onClick: (
|
|
147
|
-
}, null, 8, ["onClick"]),
|
|
148
|
-
|
|
146
|
+
onClick: (n) => l(t)?.startInline("add-child", e.id)
|
|
147
|
+
}, null, 8, ["title", "onClick"]),
|
|
148
|
+
d(m, {
|
|
149
149
|
variant: "ghost",
|
|
150
150
|
size: "xs",
|
|
151
151
|
icon: "lucide:settings",
|
|
152
|
-
title: "Advanced Details",
|
|
152
|
+
title: l(t)?.advancedDetailsTooltipText.value || "Advanced Details",
|
|
153
153
|
class: "h-7 w-7 px-0 text-muted-foreground hover:text-primary",
|
|
154
|
-
onClick: (
|
|
155
|
-
}, null, 8, ["onClick"]),
|
|
156
|
-
|
|
154
|
+
onClick: (n) => l(t)?.openModalForm("edit", e)
|
|
155
|
+
}, null, 8, ["title", "onClick"]),
|
|
156
|
+
d(m, {
|
|
157
157
|
variant: "ghost",
|
|
158
158
|
size: "xs",
|
|
159
159
|
icon: "lucide:trash-2",
|
|
160
|
-
title: "Delete",
|
|
160
|
+
title: l(t)?.deleteTooltipText.value || "Delete",
|
|
161
161
|
class: "h-7 w-7 px-0 text-muted-foreground hover:text-destructive hover:bg-destructive/10",
|
|
162
|
-
onClick: (
|
|
163
|
-
}, null, 8, ["onClick"])
|
|
162
|
+
onClick: (n) => l(t)?.deleteItem(e)
|
|
163
|
+
}, null, 8, ["title", "onClick"])
|
|
164
164
|
]))
|
|
165
165
|
], 2),
|
|
166
|
-
e.children && e.children.length > 0 || l(
|
|
167
|
-
e.children && e.children.length > 0 ? (r(), f(
|
|
166
|
+
e.children && e.children.length > 0 || l(t)?.inlineState.value.mode === "add-child" && l(t).inlineState.value.targetId === e.id ? k((r(), s("div", te, [
|
|
167
|
+
e.children && e.children.length > 0 ? (r(), f(P, {
|
|
168
168
|
key: 0,
|
|
169
169
|
modelValue: e.children,
|
|
170
|
-
"onUpdate:modelValue": (
|
|
170
|
+
"onUpdate:modelValue": (n) => D(n, e),
|
|
171
171
|
level: V.level + 1,
|
|
172
|
-
onChange:
|
|
173
|
-
onDragEnd:
|
|
172
|
+
onChange: U,
|
|
173
|
+
onDragEnd: o[2] || (o[2] = (n) => g("dragEnd", n))
|
|
174
174
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "level"])) : c("", !0),
|
|
175
|
-
l(
|
|
176
|
-
|
|
177
|
-
modelValue: l(
|
|
178
|
-
"onUpdate:modelValue":
|
|
175
|
+
l(t)?.inlineState.value.mode === "add-child" && l(t).inlineState.value.targetId === e.id ? (r(), s("div", le, [
|
|
176
|
+
d(z, {
|
|
177
|
+
modelValue: l(t).inlineState.value.icon,
|
|
178
|
+
"onUpdate:modelValue": o[3] || (o[3] = (n) => l(t).inlineState.value.icon = n),
|
|
179
179
|
"btn-props": {
|
|
180
180
|
variant: "ghost",
|
|
181
181
|
size: "xs",
|
|
@@ -184,40 +184,40 @@ const J = { class: "flex items-center gap-px overflow-hidden flex-1" }, W = ["on
|
|
|
184
184
|
position: "bottom-start"
|
|
185
185
|
}, null, 8, ["modelValue"]),
|
|
186
186
|
k(y("input", {
|
|
187
|
-
"onUpdate:modelValue":
|
|
187
|
+
"onUpdate:modelValue": o[4] || (o[4] = (n) => l(t).inlineState.value.title = n),
|
|
188
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",
|
|
189
|
-
placeholder: "New subcategory title...",
|
|
189
|
+
placeholder: l(t)?.newSubcategoryPlaceholderText.value || "New subcategory title...",
|
|
190
190
|
onKeyup: [
|
|
191
|
-
|
|
192
|
-
|
|
191
|
+
o[5] || (o[5] = w((n) => l(t).saveInline(), ["enter"])),
|
|
192
|
+
o[6] || (o[6] = w((n) => l(t).cancelInline(), ["esc"]))
|
|
193
193
|
]
|
|
194
|
-
}, null,
|
|
195
|
-
[
|
|
196
|
-
[
|
|
194
|
+
}, null, 40, oe), [
|
|
195
|
+
[j],
|
|
196
|
+
[_, l(t).inlineState.value.title]
|
|
197
197
|
]),
|
|
198
|
-
|
|
198
|
+
d(m, {
|
|
199
199
|
variant: "primary",
|
|
200
200
|
size: "xs",
|
|
201
201
|
icon: "lucide:check",
|
|
202
202
|
class: "shrink-0 h-6 w-6 px-0",
|
|
203
|
-
title: "Save",
|
|
204
|
-
onClick:
|
|
205
|
-
}),
|
|
206
|
-
|
|
203
|
+
title: l(t)?.saveTooltipText.value || "Save",
|
|
204
|
+
onClick: o[7] || (o[7] = (n) => l(t).saveInline())
|
|
205
|
+
}, null, 8, ["title"]),
|
|
206
|
+
d(m, {
|
|
207
207
|
variant: "ghost",
|
|
208
208
|
size: "xs",
|
|
209
209
|
icon: "lucide:x",
|
|
210
210
|
class: "shrink-0 h-6 w-6 px-0",
|
|
211
|
-
title: "Cancel",
|
|
212
|
-
onClick:
|
|
213
|
-
})
|
|
211
|
+
title: l(t)?.cancelTooltipText.value || "Cancel",
|
|
212
|
+
onClick: o[8] || (o[8] = (n) => l(t).cancelInline())
|
|
213
|
+
}, null, 8, ["title"])
|
|
214
214
|
])) : c("", !0)
|
|
215
215
|
], 512)), [
|
|
216
|
-
[G, l(
|
|
216
|
+
[G, l(t)?.expandedIds.value.has(e.id)]
|
|
217
217
|
]) : c("", !0)
|
|
218
218
|
], 8, ["data-id"]));
|
|
219
|
-
return
|
|
220
|
-
},
|
|
219
|
+
return $.memo = T, $;
|
|
220
|
+
}, o, 9), 128))
|
|
221
221
|
]),
|
|
222
222
|
_: 1
|
|
223
223
|
}, 8, ["modelValue", "disabled"]);
|
|
@@ -225,5 +225,5 @@ const J = { class: "flex items-center gap-px overflow-hidden flex-1" }, W = ["on
|
|
|
225
225
|
}
|
|
226
226
|
});
|
|
227
227
|
export {
|
|
228
|
-
|
|
228
|
+
ce as default
|
|
229
229
|
};
|
|
@@ -35,6 +35,40 @@ export interface CategoryManagerProps {
|
|
|
35
35
|
emptyDescription?: string;
|
|
36
36
|
/** Size modifier for the category nodes */
|
|
37
37
|
size?: 'sm' | 'md' | 'lg';
|
|
38
|
+
emptyTitleI18n?: string;
|
|
39
|
+
emptyDescriptionI18n?: string;
|
|
40
|
+
headerTitle?: string;
|
|
41
|
+
headerTitleI18n?: string;
|
|
42
|
+
headerDescription?: string;
|
|
43
|
+
headerDescriptionI18n?: string;
|
|
44
|
+
addCategoryText?: string;
|
|
45
|
+
addCategoryTextI18n?: string;
|
|
46
|
+
createCategoryText?: string;
|
|
47
|
+
createCategoryTextI18n?: string;
|
|
48
|
+
newRootPlaceholder?: string;
|
|
49
|
+
newRootPlaceholderI18n?: string;
|
|
50
|
+
newSubcategoryPlaceholder?: string;
|
|
51
|
+
newSubcategoryPlaceholderI18n?: string;
|
|
52
|
+
categoryTitlePlaceholder?: string;
|
|
53
|
+
categoryTitlePlaceholderI18n?: string;
|
|
54
|
+
modalTitleAdd?: string;
|
|
55
|
+
modalTitleAddI18n?: string;
|
|
56
|
+
modalTitleAddChild?: string;
|
|
57
|
+
modalTitleAddChildI18n?: string;
|
|
58
|
+
modalTitleEdit?: string;
|
|
59
|
+
modalTitleEditI18n?: string;
|
|
60
|
+
modalSaveText?: string;
|
|
61
|
+
modalSaveTextI18n?: string;
|
|
62
|
+
quickAddTooltip?: string;
|
|
63
|
+
quickAddTooltipI18n?: string;
|
|
64
|
+
advancedDetailsTooltip?: string;
|
|
65
|
+
advancedDetailsTooltipI18n?: string;
|
|
66
|
+
deleteTooltip?: string;
|
|
67
|
+
deleteTooltipI18n?: string;
|
|
68
|
+
saveTooltip?: string;
|
|
69
|
+
saveTooltipI18n?: string;
|
|
70
|
+
cancelTooltip?: string;
|
|
71
|
+
cancelTooltipI18n?: string;
|
|
38
72
|
}
|
|
39
73
|
export interface InlineState {
|
|
40
74
|
mode: 'add-root' | 'add-child' | null;
|
|
@@ -54,4 +88,11 @@ export interface CategoryManagerContext {
|
|
|
54
88
|
deleteItem: (item: CategoryItem) => void;
|
|
55
89
|
readonly: ComputedRef<boolean>;
|
|
56
90
|
size: ComputedRef<'sm' | 'md' | 'lg'>;
|
|
91
|
+
newSubcategoryPlaceholderText: ComputedRef<string>;
|
|
92
|
+
categoryTitlePlaceholderText: ComputedRef<string>;
|
|
93
|
+
quickAddTooltipText: ComputedRef<string>;
|
|
94
|
+
advancedDetailsTooltipText: ComputedRef<string>;
|
|
95
|
+
deleteTooltipText: ComputedRef<string>;
|
|
96
|
+
saveTooltipText: ComputedRef<string>;
|
|
97
|
+
cancelTooltipText: ComputedRef<string>;
|
|
57
98
|
}
|
|
@@ -71,7 +71,7 @@ const z = {
|
|
|
71
71
|
}, [
|
|
72
72
|
d("div", {
|
|
73
73
|
class: l(["px-3.5 py-2.5 rounded-2xl break-words relative min-w-[60px] max-w-full min-w-0 overflow-hidden", [
|
|
74
|
-
e.isSender ? "bg-primary text-primary-foreground rounded-br-sm" : "bg-muted text-foreground rounded-bl-sm"
|
|
74
|
+
e.isSender ? "bg-primary text-primary-foreground rounded-br-sm" : "bg-muted! text-foreground rounded-bl-sm"
|
|
75
75
|
]])
|
|
76
76
|
}, [
|
|
77
77
|
e.showUserInfo && e.message.senderName && !e.isSender ? (t(), i("div", A, u(e.message.senderName), 1)) : a("", !0),
|
|
@@ -15,18 +15,7 @@ export interface ClipboardProps {
|
|
|
15
15
|
copiedTextI18n?: string;
|
|
16
16
|
asIcon?: boolean;
|
|
17
17
|
}
|
|
18
|
-
declare
|
|
19
|
-
attrs: Partial<{}>;
|
|
20
|
-
slots: {
|
|
21
|
-
default?(_: {
|
|
22
|
-
copied: boolean;
|
|
23
|
-
}): any;
|
|
24
|
-
};
|
|
25
|
-
refs: {};
|
|
26
|
-
rootEl: HTMLButtonElement;
|
|
27
|
-
};
|
|
28
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
29
|
-
declare const __VLS_component: import('vue').DefineComponent<ClipboardProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
18
|
+
declare const _default: import('vue').DefineComponent<ClipboardProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
30
19
|
copy: (text: string) => any;
|
|
31
20
|
error: (err: Error) => any;
|
|
32
21
|
}, string, import('vue').PublicProps, Readonly<ClipboardProps> & Readonly<{
|
|
@@ -42,10 +31,4 @@ declare const __VLS_component: import('vue').DefineComponent<ClipboardProps, {},
|
|
|
42
31
|
defaultTextI18n: string;
|
|
43
32
|
copiedTextI18n: string;
|
|
44
33
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
45
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
46
34
|
export default _default;
|
|
47
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
48
|
-
new (): {
|
|
49
|
-
$slots: S;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as f, ref as p, computed as i, openBlock as
|
|
2
|
-
import
|
|
3
|
-
import { $t as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as f, ref as p, computed as i, openBlock as x, createBlock as m, normalizeClass as T } from "vue";
|
|
2
|
+
import v from "./Button.vue.js";
|
|
3
|
+
import { $t as l } from "../utils/i18n.js";
|
|
4
|
+
const z = /* @__PURE__ */ f({
|
|
5
5
|
__name: "Clipboard",
|
|
6
6
|
props: {
|
|
7
7
|
textToCopy: {},
|
|
@@ -20,50 +20,42 @@ const w = /* @__PURE__ */ f({
|
|
|
20
20
|
},
|
|
21
21
|
emits: ["copy", "error"],
|
|
22
22
|
setup(o, { emit: r }) {
|
|
23
|
-
const e = o,
|
|
23
|
+
const e = o, c = r, a = p(!1);
|
|
24
24
|
let n = null;
|
|
25
|
-
const
|
|
25
|
+
const d = i(() => a.value ? e.copiedIcon : e.defaultIcon), u = i(() => {
|
|
26
26
|
if (!e.asIcon)
|
|
27
27
|
if (a.value) {
|
|
28
28
|
if (e.copiedText) return e.copiedText;
|
|
29
|
-
const t =
|
|
29
|
+
const t = l(e.copiedTextI18n);
|
|
30
30
|
return t !== e.copiedTextI18n ? t : "Copied";
|
|
31
31
|
} else {
|
|
32
32
|
if (e.defaultText) return e.defaultText;
|
|
33
|
-
const t =
|
|
33
|
+
const t = l(e.defaultTextI18n);
|
|
34
34
|
return t !== e.defaultTextI18n ? t : "Copy";
|
|
35
35
|
}
|
|
36
36
|
}), s = async () => {
|
|
37
37
|
if (!e.disabled)
|
|
38
38
|
try {
|
|
39
|
-
await navigator.clipboard.writeText(e.textToCopy), a.value = !0,
|
|
39
|
+
await navigator.clipboard.writeText(e.textToCopy), a.value = !0, c("copy", e.textToCopy), n && clearTimeout(n), n = setTimeout(() => {
|
|
40
40
|
a.value = !1;
|
|
41
41
|
}, 500);
|
|
42
42
|
} catch (t) {
|
|
43
|
-
|
|
43
|
+
c("error", t instanceof Error ? t : new Error("Copy failed"));
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
|
-
return (t,
|
|
46
|
+
return (t, y) => (x(), m(v, {
|
|
47
47
|
variant: o.variant,
|
|
48
48
|
size: o.size,
|
|
49
49
|
rounded: o.rounded,
|
|
50
50
|
class: T(e.class),
|
|
51
51
|
disabled: o.disabled,
|
|
52
|
-
icon:
|
|
53
|
-
text:
|
|
52
|
+
icon: d.value,
|
|
53
|
+
text: u.value,
|
|
54
54
|
"as-icon": o.asIcon,
|
|
55
55
|
onClick: s
|
|
56
|
-
},
|
|
57
|
-
default: v(() => [
|
|
58
|
-
!o.asIcon && !c.value ? y(t.$slots, "default", {
|
|
59
|
-
key: 0,
|
|
60
|
-
copied: a.value
|
|
61
|
-
}) : I("", !0)
|
|
62
|
-
]),
|
|
63
|
-
_: 3
|
|
64
|
-
}, 8, ["variant", "size", "rounded", "class", "disabled", "icon", "text", "as-icon"]));
|
|
56
|
+
}, null, 8, ["variant", "size", "rounded", "class", "disabled", "icon", "text", "as-icon"]));
|
|
65
57
|
}
|
|
66
58
|
});
|
|
67
59
|
export {
|
|
68
|
-
|
|
60
|
+
z as default
|
|
69
61
|
};
|
|
@@ -184,7 +184,7 @@ const xe = { class: "space-y-6.5" }, Be = { class: "overflow-x-auto w-full" }, I
|
|
|
184
184
|
m("thead", {
|
|
185
185
|
class: b([
|
|
186
186
|
"[&_tr]:border-b [&_tr]:border-border",
|
|
187
|
-
a.headerVariant === "minimal" ? "bg-transparent" : "bg-
|
|
187
|
+
a.headerVariant === "minimal" ? "bg-transparent" : "bg-accent",
|
|
188
188
|
a.variant === "raised" ? "[&_th:first-child]:rounded-tl-lg [&_th:last-child]:rounded-tr-lg" : ""
|
|
189
189
|
])
|
|
190
190
|
}, [
|
|
@@ -208,10 +208,7 @@ const xe = { class: "space-y-6.5" }, Be = { class: "overflow-x-auto w-full" }, I
|
|
|
208
208
|
"table-sortable": a.sortable,
|
|
209
209
|
"cell-bordered": a.cellBordered,
|
|
210
210
|
onSort: _,
|
|
211
|
-
class: b([
|
|
212
|
-
a.cellBordered ? "" : "last:pr-5!",
|
|
213
|
-
re(l)
|
|
214
|
-
]),
|
|
211
|
+
class: b([a.cellBordered ? "" : "last:pr-5!", re(l)]),
|
|
215
212
|
style: j(se(l))
|
|
216
213
|
}, null, 8, ["header", "sort-config", "compact", "size", "table-sortable", "cell-bordered", "class", "style"]))), 128))
|
|
217
214
|
])
|
|
@@ -45,7 +45,7 @@ const j = ["tabindex", "data-disabled", "data-testid"], C = { class: "flex flex-
|
|
|
45
45
|
key: 0,
|
|
46
46
|
icon: e.option.icon,
|
|
47
47
|
emoji: e.option.emoji,
|
|
48
|
-
class: "mr-2 h-4 w-4 shrink-0 mt-0.5"
|
|
48
|
+
class: "mr-2.5 h-4 w-4 shrink-0 mt-0.5"
|
|
49
49
|
}, null, 8, ["icon", "emoji"])) : i("", !0),
|
|
50
50
|
c("div", C, [
|
|
51
51
|
c("div", S, [
|
package/components/Label.vue.js
CHANGED
|
@@ -9,10 +9,10 @@ const f = ["for"], m = /* @__PURE__ */ l({
|
|
|
9
9
|
setup(t) {
|
|
10
10
|
const e = t, o = a(() => [
|
|
11
11
|
{
|
|
12
|
-
xs: "-text-fs-3.5",
|
|
13
|
-
sm: "-text-fs-3",
|
|
14
|
-
md: "-text-fs-2",
|
|
15
|
-
lg: "text-base"
|
|
12
|
+
xs: "-text-fs-3.5!",
|
|
13
|
+
sm: "-text-fs-3!",
|
|
14
|
+
md: "-text-fs-2!",
|
|
15
|
+
lg: "text-base!"
|
|
16
16
|
}[e.size],
|
|
17
17
|
"leading-none text-gray-800 block peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
18
18
|
e.class
|