vlite3 1.2.13 → 1.2.15
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 +28 -25
- 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/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 +64 -77
- package/package.json +1 -1
- package/style.css +25 -25
package/components/Avatar.vue.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as k, ref as c, watch as w, computed as a, openBlock as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as k, ref as c, watch as w, computed as a, openBlock as s, createElementBlock as r, normalizeClass as d, renderSlot as b, toDisplayString as g, createBlock as y } from "vue";
|
|
2
|
+
import C from "./Icon.vue.js";
|
|
3
|
+
const _ = ["src", "alt"], z = { key: 0 }, A = /* @__PURE__ */ k({
|
|
4
4
|
__name: "Avatar",
|
|
5
5
|
props: {
|
|
6
6
|
src: { default: "" },
|
|
@@ -11,18 +11,18 @@ const y = ["src", "alt"], z = { key: 0 }, A = /* @__PURE__ */ k({
|
|
|
11
11
|
class: { default: "" }
|
|
12
12
|
},
|
|
13
13
|
setup(o) {
|
|
14
|
-
const e = o,
|
|
14
|
+
const e = o, t = c(!1), n = c(!1);
|
|
15
15
|
w(
|
|
16
16
|
() => e.src,
|
|
17
17
|
() => {
|
|
18
|
-
|
|
18
|
+
t.value = !1, n.value = !1;
|
|
19
19
|
}
|
|
20
20
|
);
|
|
21
21
|
const f = () => {
|
|
22
|
-
|
|
22
|
+
t.value = !0, n.value = !1;
|
|
23
23
|
}, i = () => {
|
|
24
|
-
n.value = !0,
|
|
25
|
-
}, m = a(() => e.src && !
|
|
24
|
+
n.value = !0, t.value = !1;
|
|
25
|
+
}, m = a(() => e.src && !t.value), u = a(() => {
|
|
26
26
|
if (e.fallback) return e.fallback;
|
|
27
27
|
if (!e.alt) return "";
|
|
28
28
|
const l = e.alt.trim().split(/\s+/);
|
|
@@ -43,27 +43,27 @@ const y = ["src", "alt"], z = { key: 0 }, A = /* @__PURE__ */ k({
|
|
|
43
43
|
"2xl": "rounded-2xl",
|
|
44
44
|
full: "rounded-full"
|
|
45
45
|
}, v = a(() => [
|
|
46
|
-
"relative flex shrink-0 overflow-hidden bg-
|
|
46
|
+
"relative flex shrink-0 overflow-hidden bg-secondary! border border-border/50",
|
|
47
47
|
x[e.size],
|
|
48
48
|
h[e.rounded],
|
|
49
49
|
e.class
|
|
50
|
-
].join(" ")), p = a(() => "flex h-full w-full items-center justify-center bg-
|
|
51
|
-
return (l, j) => (
|
|
50
|
+
].join(" ")), p = a(() => "flex h-full w-full items-center justify-center bg-secondary! text-muted-foreground font-medium");
|
|
51
|
+
return (l, j) => (s(), r("div", {
|
|
52
52
|
class: d(v.value)
|
|
53
53
|
}, [
|
|
54
|
-
m.value ? (
|
|
54
|
+
m.value ? (s(), r("img", {
|
|
55
55
|
key: 0,
|
|
56
56
|
src: o.src,
|
|
57
57
|
alt: o.alt,
|
|
58
58
|
class: "aspect-square h-full w-full object-cover",
|
|
59
59
|
onError: f,
|
|
60
60
|
onLoad: i
|
|
61
|
-
}, null, 40,
|
|
61
|
+
}, null, 40, _)) : (s(), r("div", {
|
|
62
62
|
key: 1,
|
|
63
63
|
class: d(p.value)
|
|
64
64
|
}, [
|
|
65
65
|
b(l.$slots, "fallback", {}, () => [
|
|
66
|
-
u.value ? (
|
|
66
|
+
u.value ? (s(), r("span", z, g(u.value), 1)) : (s(), y(C, {
|
|
67
67
|
key: 1,
|
|
68
68
|
icon: "lucide:user",
|
|
69
69
|
class: "h-1/2 w-1/2"
|
package/components/Button.vue.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as N, useAttrs as T, computed as s, useSlots as A, withDirectives as G, openBlock as i, createElementBlock as l, normalizeClass as a, Fragment as C, createElementVNode as k, createBlock as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as N, useAttrs as T, computed as s, useSlots as A, withDirectives as G, openBlock as i, createElementBlock as l, normalizeClass as a, Fragment as C, createElementVNode as k, createBlock as x, createCommentVNode as c, renderSlot as S, createTextVNode as $, toDisplayString as p, unref as F } from "vue";
|
|
2
|
+
import v from "./Icon.vue.js";
|
|
3
3
|
import { vRipple as H } from "../directives/vRipple.js";
|
|
4
4
|
import { $t as M } from "../utils/i18n.js";
|
|
5
5
|
const O = ["type", "disabled", "data-testid"], Z = {
|
|
@@ -65,10 +65,10 @@ const O = ["type", "disabled", "data-testid"], Z = {
|
|
|
65
65
|
md: "w-12 h-12",
|
|
66
66
|
lg: "w-14 h-14",
|
|
67
67
|
xl: "w-16 h-16"
|
|
68
|
-
})[e.size]), r = s(() => e.textI18n ? M(e.textI18n) : e.text), B = A(),
|
|
68
|
+
})[e.size]), r = s(() => e.textI18n ? M(e.textI18n) : e.text), B = A(), m = s(
|
|
69
69
|
() => e?.asIcon || e.icon && !r.value && !B.default
|
|
70
70
|
), u = s(() => e.icon ? e.icon.startsWith("http://") || e.icon.startsWith("https://") || e.icon.startsWith("data:image/") ? !0 : [".png", ".jpg", ".jpeg", ".gif", ".svg", ".webp", ".ico", ".avif"].some((g) => e.icon.toLowerCase().endsWith(g)) : !1), R = s(() => {
|
|
71
|
-
const g = `inline-flex items-center justify-center whitespace-nowrap text-sm font-medium disabled:pointer-events-none disabled:opacity-50 active:scale-[0.98] cursor-pointer ${o.value === "tile" ? "flex-col gap-1.5 items-center" : o.value === "vertical" ? "flex-col gap-2" : e.description ? "gap-3" : "gap-2"} ${
|
|
71
|
+
const g = `inline-flex items-center justify-center whitespace-nowrap text-sm font-medium disabled:pointer-events-none disabled:opacity-50 active:scale-[0.98] cursor-pointer ${o.value === "tile" ? "flex-col gap-1.5 items-center" : o.value === "vertical" ? "flex-col gap-2" : e.description ? "gap-3" : "gap-2"} ${m.value ? "icon-only shrink-0" : ""}`, y = {
|
|
72
72
|
primary: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
73
73
|
"primary-light": "bg-primary-light text-primary-fg-light hover:bg-primary/15",
|
|
74
74
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
@@ -114,7 +114,7 @@ const O = ["type", "disabled", "data-testid"], Z = {
|
|
|
114
114
|
"2xl": "rounded-2xl",
|
|
115
115
|
full: "rounded-full"
|
|
116
116
|
};
|
|
117
|
-
let w =
|
|
117
|
+
let w = m.value ? V[e.size] : d[e.size];
|
|
118
118
|
o.value === "tile" ? w = {
|
|
119
119
|
xs: "h-auto p-0!",
|
|
120
120
|
sm: "h-auto p-0!",
|
|
@@ -134,7 +134,7 @@ const O = ["type", "disabled", "data-testid"], Z = {
|
|
|
134
134
|
return [g, D, W[e.rounded], w, e.class].join(
|
|
135
135
|
" "
|
|
136
136
|
);
|
|
137
|
-
}),
|
|
137
|
+
}), f = s(() => {
|
|
138
138
|
if (h.value && u.value)
|
|
139
139
|
return `${b.value} object-cover`;
|
|
140
140
|
const n = e.description && o.value === "horizontal", g = {
|
|
@@ -152,7 +152,7 @@ const O = ["type", "disabled", "data-testid"], Z = {
|
|
|
152
152
|
lg: "w-4 h-4",
|
|
153
153
|
xl: "w-4 h-4"
|
|
154
154
|
};
|
|
155
|
-
let d =
|
|
155
|
+
let d = m.value ? y[e.size] : g[e.size];
|
|
156
156
|
return u.value && (d += " object-cover"), h.value ? d += " scale-[1.45]!" : o.value === "vertical" && (d += " scale-[1.35]! mt-1"), d;
|
|
157
157
|
}), E = s(() => o.value === "vertical" ? "scale-[0.9]" : "");
|
|
158
158
|
return (n, g) => G((i(), l("button", {
|
|
@@ -169,14 +169,14 @@ const O = ["type", "disabled", "data-testid"], Z = {
|
|
|
169
169
|
u.value ? "" : b.value
|
|
170
170
|
]])
|
|
171
171
|
}, [
|
|
172
|
-
t.loading ? (i(),
|
|
172
|
+
t.loading ? (i(), x(v, {
|
|
173
173
|
key: 0,
|
|
174
174
|
icon: "lucide:loader-2",
|
|
175
|
-
class: a(["animate-spin pointer-events-none", [
|
|
176
|
-
}, null, 8, ["class"])) : t.icon ? (i(),
|
|
175
|
+
class: a(["animate-spin pointer-events-none", [f.value, u.value ? b.value : ""]])
|
|
176
|
+
}, null, 8, ["class"])) : t.icon ? (i(), x(v, {
|
|
177
177
|
key: 1,
|
|
178
178
|
icon: t.icon,
|
|
179
|
-
class: a(["pointer-events-none", [t.iconClass,
|
|
179
|
+
class: a(["pointer-events-none", [t.iconClass, f.value]])
|
|
180
180
|
}, null, 8, ["icon", "class"])) : c("", !0)
|
|
181
181
|
], 2),
|
|
182
182
|
r.value || n.$slots.default || e.description ? (i(), l("span", {
|
|
@@ -185,38 +185,41 @@ const O = ["type", "disabled", "data-testid"], Z = {
|
|
|
185
185
|
}, [
|
|
186
186
|
r.value || n.$slots.default ? (i(), l("span", Z, [
|
|
187
187
|
S(n.$slots, "default", {}, () => [
|
|
188
|
-
$(
|
|
188
|
+
$(p(r.value), 1)
|
|
189
189
|
])
|
|
190
190
|
])) : c("", !0),
|
|
191
|
-
e.description ? (i(), l("span", q,
|
|
191
|
+
e.description ? (i(), l("span", q, p(e.description), 1)) : c("", !0)
|
|
192
192
|
], 2)) : c("", !0)
|
|
193
193
|
], 64)) : (i(), l(C, { key: 1 }, [
|
|
194
|
-
t.loading ? (i(),
|
|
194
|
+
t.loading ? (i(), x(v, {
|
|
195
195
|
key: 0,
|
|
196
196
|
icon: "lucide:loader-2",
|
|
197
|
-
class: a(["animate-spin pointer-events-none",
|
|
198
|
-
}, null, 8, ["class"])) : t.icon ? (i(),
|
|
197
|
+
class: a(["animate-spin pointer-events-none", f.value])
|
|
198
|
+
}, null, 8, ["class"])) : t.icon ? (i(), x(v, {
|
|
199
199
|
key: 1,
|
|
200
200
|
icon: t.icon,
|
|
201
|
-
class: a(["pointer-events-none", [t.iconClass,
|
|
201
|
+
class: a(["pointer-events-none", [t.iconClass, f.value, m.value ? "mx-auto" : ""]])
|
|
202
202
|
}, null, 8, ["icon", "class"])) : c("", !0),
|
|
203
|
-
r.value || n.$slots.default || e.description ? (i(), l("div", {
|
|
203
|
+
!m.value && (r.value || n.$slots.default || e.description) ? (i(), l("div", {
|
|
204
204
|
key: 2,
|
|
205
|
-
class: a(["flex flex-col justify-center",
|
|
205
|
+
class: a(["flex flex-col justify-center", [
|
|
206
|
+
o.value === "vertical" ? "items-center text-center" : e.description ? "items-start text-left" : "items-center text-center",
|
|
207
|
+
!t.icon && !t.iconRight && !t.loading ? "flex-1 w-full" : ""
|
|
208
|
+
]])
|
|
206
209
|
}, [
|
|
207
|
-
k("
|
|
208
|
-
class: a([[t.textClass, E.value], "leading-tight"])
|
|
210
|
+
k("div", {
|
|
211
|
+
class: a([[t.textClass, E.value], "leading-tight w-full [&>:where(svg)]:mx-auto [&>:where(img)]:mx-auto"])
|
|
209
212
|
}, [
|
|
210
213
|
S(n.$slots, "default", {}, () => [
|
|
211
|
-
$(
|
|
214
|
+
$(p(r.value), 1)
|
|
212
215
|
])
|
|
213
216
|
], 2),
|
|
214
|
-
e.description ? (i(), l("span", J,
|
|
217
|
+
e.description ? (i(), l("span", J, p(e.description), 1)) : c("", !0)
|
|
215
218
|
], 2)) : c("", !0),
|
|
216
|
-
t.iconRight && !t.loading ? (i(),
|
|
219
|
+
t.iconRight && !t.loading ? (i(), x(v, {
|
|
217
220
|
key: 3,
|
|
218
221
|
icon: t.iconRight,
|
|
219
|
-
class: a([[t.iconRightClass,
|
|
222
|
+
class: a([[t.iconRightClass, f.value], "h-4 w-4 pointer-events-none"])
|
|
220
223
|
}, null, 8, ["icon", "class"])) : c("", !0)
|
|
221
224
|
], 64))
|
|
222
225
|
], 10, O)), [
|