vlite3 1.3.5 → 1.3.7
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/CategoryManager/CategoryManager.vue2.js +1 -1
- package/components/ColorPicker/ColorIro.vue3.js +2 -2
- package/components/ColorPicker/ColorPicker.vue.js +2 -2
- package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
- package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
- package/components/Dropdown/DropdownMenu.vue.js +1 -1
- package/components/FileTree/FileTree.vue.d.ts +1 -0
- package/components/FileTree/FileTree.vue.js +3 -3
- package/components/FileTree/FileTree.vue2.js +33 -31
- package/components/FileTree/FileTreeNode.vue.d.ts +2 -0
- package/components/FileTree/FileTreeNode.vue.js +72 -70
- package/components/FileTree/types.d.ts +1 -0
- package/components/Form/CustomFields.vue.js +1 -1
- package/components/Form/CustomFields.vue2.js +1 -1
- package/components/Form/Form.vue.js +2 -2
- package/components/Form/Form.vue2.js +20 -20
- package/components/Form/FormFields.vue.js +1 -1
- package/components/Form/FormFields.vue2.js +8 -8
- package/components/ImportData/ImportStep1.vue.d.ts +2 -2
- package/components/ImportData/ImportStep2.vue.d.ts +2 -2
- package/components/Input.vue.js +1 -1
- package/components/Modal.vue.js +1 -1
- package/components/Modal.vue2.js +1 -1
- package/components/Navbar/NavbarTabs.vue.js +82 -82
- package/components/NavbarCommandPalette.vue.js +1 -1
- package/components/PermissionMatrix/PermissionTopBar.vue.js +36 -36
- package/components/Screen/Screen.vue.d.ts +2 -2
- package/components/Screen/Screen.vue.js +187 -185
- package/components/Screen/ScreenFilter.vue.js +1 -1
- package/components/SidebarMenu/SidebarMenuItem.vue.js +193 -187
- package/components/ThemeToggle.vue.d.ts +1 -1
- package/components/ThemeToggle.vue.js +2 -2
- package/composables/useTheme.d.ts +1 -1
- package/composables/useTheme.js +15 -15
- package/package.json +1 -1
- package/style.css +67 -47
- /package/components/ColorPicker/{ColorIro.vue2.js → ColorIro.vue.js} +0 -0
- /package/components/Dropdown/{DropdownMenu.vue2.js → DropdownMenu.vue3.js} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as le, inject as ce, ref as se, computed as r, onMounted as ue, nextTick as de, resolveComponent as me, openBlock as c, createElementBlock as v, normalizeClass as d, unref as o, createBlock as y, withCtx as g, createElementVNode as b, normalizeStyle as M, createCommentVNode as p, toDisplayString as w, createVNode as C, resolveDynamicComponent as W, mergeProps as F, createTextVNode as fe, Fragment as q, withKeys as pe, withModifiers as ve, Transition as he, renderList as be } from "vue";
|
|
2
2
|
import { useRouter as ye, useRoute as ge } from "vue-router";
|
|
3
3
|
import k from "../Icon.vue.js";
|
|
4
|
-
import
|
|
4
|
+
import G from "../Tooltip.vue.js";
|
|
5
5
|
import xe from "../Dropdown/Dropdown.vue.js";
|
|
6
|
-
import { $t as
|
|
6
|
+
import { $t as J } from "../../utils/i18n.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
/* empty css */
|
|
9
9
|
const we = {
|
|
@@ -12,7 +12,7 @@ const we = {
|
|
|
12
12
|
}, ke = { class: "w-full" }, Ce = { class: "flex items-center w-full gap-2 text-sm" }, Ie = { class: "truncate flex-1 font-medium" }, Se = ["onKeydown"], ze = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "sidebar-children-container overflow-hidden transition-all duration-300 ease-in-out relative"
|
|
15
|
-
}, $e = { class: "pt-1 space-y-0.5" }, Ae = /* @__PURE__ */
|
|
15
|
+
}, $e = { class: "pt-1 space-y-0.5" }, Ae = /* @__PURE__ */ le({
|
|
16
16
|
__name: "SidebarMenuItem",
|
|
17
17
|
props: {
|
|
18
18
|
item: {},
|
|
@@ -21,147 +21,153 @@ const we = {
|
|
|
21
21
|
itemClass: {}
|
|
22
22
|
},
|
|
23
23
|
setup(u) {
|
|
24
|
-
const
|
|
24
|
+
const n = u, e = ce("sidebar-menu-ctx"), Q = ye(), U = ge();
|
|
25
25
|
if (!e)
|
|
26
26
|
throw new Error("SidebarMenuItem must be used within a SidebarMenu");
|
|
27
|
-
const
|
|
28
|
-
() => e.currentOrientation === "horizontal" &&
|
|
29
|
-
), f =
|
|
30
|
-
const
|
|
31
|
-
if (
|
|
32
|
-
if (
|
|
33
|
-
const m = typeof
|
|
27
|
+
const T = se(null), i = r(
|
|
28
|
+
() => e.currentOrientation === "horizontal" && n.depth === 0
|
|
29
|
+
), f = r(() => !!n.item.children?.length), L = r(() => i.value && f.value || e.compact && f.value ? "popover" : n.item.renderMode || e.renderMode || "tree"), I = r(() => e.renderNestedTabs && n.depth === 0 ? !1 : L.value === "drilldown" && f.value), z = r(() => e.renderNestedTabs && n.depth === 0 || I.value ? !1 : L.value === "popover" && f.value), x = r(() => n.item.id ? n.item.id : n.item.to && typeof n.item.to == "string" ? n.item.to : n.item.label), N = r(() => z.value || I.value || e.renderNestedTabs && n.depth === 0 ? !1 : e.expandedItems.includes(x.value)), j = r(() => !(!f.value || I.value || e.renderNestedTabs && n.depth === 0)), X = r(() => I.value && f.value), P = (t, a, s) => {
|
|
30
|
+
const l = t.id || (typeof t.to == "string" ? t.to : null) || t.label;
|
|
31
|
+
if (a && l === a) return !0;
|
|
32
|
+
if (t.to) {
|
|
33
|
+
const m = typeof t.to == "string" ? t.to : t.to.path;
|
|
34
34
|
if (m) {
|
|
35
35
|
if (s === m) return !0;
|
|
36
36
|
if (m !== "/" && m.length > 1 && s.startsWith(m)) {
|
|
37
|
-
const
|
|
38
|
-
if (!
|
|
37
|
+
const E = s[m.length];
|
|
38
|
+
if (!E || E === "/" || E === "?") return !0;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
return
|
|
43
|
-
},
|
|
44
|
-
const
|
|
45
|
-
return f.value ? P(
|
|
46
|
-
}),
|
|
47
|
-
|
|
42
|
+
return t.children?.length ? t.children.some((m) => P(m, a, s)) : !1;
|
|
43
|
+
}, $ = r(() => {
|
|
44
|
+
const t = U?.path || "", a = e.activeItem;
|
|
45
|
+
return f.value ? P(n.item, a, t) : a === x.value;
|
|
46
|
+
}), _ = r(() => e.activeItem === x.value), Y = (t = !0) => {
|
|
47
|
+
_.value && T.value && T.value.scrollIntoView({ behavior: t ? "smooth" : "auto", block: "center" });
|
|
48
48
|
};
|
|
49
49
|
ue(() => {
|
|
50
|
-
|
|
50
|
+
_.value && de(() => {
|
|
51
51
|
Y(!1);
|
|
52
52
|
});
|
|
53
53
|
});
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
if (t.item.action && t.item.action(t.item), t.item.to)
|
|
62
|
-
I.push(t.item.to).catch(() => {
|
|
63
|
-
});
|
|
64
|
-
else if (t.item.href)
|
|
65
|
-
window.open(t.item.href, "_blank");
|
|
66
|
-
else if (f.value) {
|
|
67
|
-
const n = t.item.children?.[0];
|
|
68
|
-
n && (n.to ? I.push(n.to).catch(() => {
|
|
69
|
-
}) : n.href && window.open(n.href, "_blank"));
|
|
70
|
-
}
|
|
71
|
-
e.setActive(y.value);
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
f.value && !t.item.to && !t.item.href && ($.value || e.toggleExpand(y.value)), t.item.action && t.item.action(t.item), (!f.value || t.item.to) && e.setActive(y.value);
|
|
54
|
+
const A = (t) => {
|
|
55
|
+
if (n.item.disabled) return;
|
|
56
|
+
const a = t.metaKey || t.ctrlKey || t.shiftKey || t.altKey;
|
|
57
|
+
if (I.value) {
|
|
58
|
+
if (a) return;
|
|
59
|
+
n.item.action && n.item.action(n.item), e.drillInto(n.item);
|
|
60
|
+
return;
|
|
75
61
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
I.push(t.item.to).catch(() => {
|
|
80
|
-
});
|
|
81
|
-
else if (t.item.href)
|
|
82
|
-
window.open(t.item.href, "_blank");
|
|
83
|
-
else if (f.value) {
|
|
84
|
-
const n = t.item.children?.[0];
|
|
85
|
-
n && (n.to ? I.push(n.to).catch(() => {
|
|
86
|
-
}) : n.href && window.open(n.href, "_blank"));
|
|
87
|
-
}
|
|
88
|
-
e.setActive(y.value);
|
|
62
|
+
if (e.renderNestedTabs && n.depth === 0) {
|
|
63
|
+
if (a) return;
|
|
64
|
+
n.item.action && n.item.action(n.item), e.setActive(x.value);
|
|
89
65
|
return;
|
|
90
66
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
67
|
+
if (f.value && !n.item.to && !n.item.href && !z.value) {
|
|
68
|
+
if (a) return;
|
|
69
|
+
e.toggleExpand(x.value);
|
|
70
|
+
}
|
|
71
|
+
a || (n.item.action && n.item.action(n.item), (!f.value || n.item.to) && e.setActive(x.value));
|
|
72
|
+
}, D = (t) => {
|
|
73
|
+
t.stopPropagation(), z.value || e.toggleExpand(x.value);
|
|
74
|
+
}, K = r(() => e.indentSize || 12), Z = r(() => {
|
|
75
|
+
const a = 8 + parseInt(e.iconSize || "16", 10) / 2;
|
|
76
|
+
return `${n.depth * K.value + a}px`;
|
|
77
|
+
}), H = r(() => {
|
|
78
|
+
if (i.value) return {};
|
|
97
79
|
if (e.compact)
|
|
98
80
|
return { width: "100%" };
|
|
99
|
-
if (
|
|
100
|
-
const
|
|
81
|
+
if (n.depth > 0) {
|
|
82
|
+
const a = 8 + parseInt(e.iconSize || "16", 10) / 2, s = (n.depth - 1) * K.value + a + 8;
|
|
101
83
|
return {
|
|
102
84
|
marginLeft: `${s}px`,
|
|
103
85
|
width: `calc(100% - ${s}px)`
|
|
104
86
|
};
|
|
105
87
|
}
|
|
106
88
|
return {};
|
|
107
|
-
}),
|
|
108
|
-
const
|
|
89
|
+
}), B = r(() => {
|
|
90
|
+
const a = `group flex items-center justify-between font-medium rounded-md focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary/50 relative border border-transparent select-none cursor-pointer ${i.value ? "w-auto" : "w-full"} ${n?.itemClass || ""} ${e.labelClass}`;
|
|
109
91
|
let s = e.compact ? e.compactItemPadding : e.itemPadding;
|
|
110
|
-
!e.compact &&
|
|
111
|
-
const
|
|
92
|
+
!e.compact && n.depth > 0 && (s = s.replace(/py-[\d\.]+/, "py-1.5"));
|
|
93
|
+
const l = e.compact ? `justify-center ${s}` : `justify-between ${s}`;
|
|
112
94
|
let m = "";
|
|
113
|
-
return
|
|
114
|
-
}), h =
|
|
115
|
-
() =>
|
|
116
|
-
),
|
|
117
|
-
label:
|
|
118
|
-
value:
|
|
119
|
-
icon:
|
|
120
|
-
disabled:
|
|
121
|
-
children:
|
|
122
|
-
data:
|
|
123
|
-
}), ee =
|
|
124
|
-
const
|
|
125
|
-
if (
|
|
126
|
-
|
|
127
|
-
const s =
|
|
128
|
-
s && e.setActive(s),
|
|
129
|
-
}) :
|
|
95
|
+
return $.value ? m = "bg-primary-light text-primary-fg-light" : m = "text-muted hover:bg-accent/80 hover:text-foreground", n.item.disabled && (m = "opacity-50 cursor-not-allowed pointer-events-none"), `${a} ${l} ${m} ${n.item.class || ""}`;
|
|
96
|
+
}), h = r(() => e.compact && e.showCompactLabels), S = r(
|
|
97
|
+
() => n.item.labelI18n ? J(n.item.labelI18n) : n.item.label
|
|
98
|
+
), R = (t) => ({
|
|
99
|
+
label: t.labelI18n ? J(t.labelI18n) : t.label,
|
|
100
|
+
value: t.id || t.label,
|
|
101
|
+
icon: t.icon,
|
|
102
|
+
disabled: t.disabled,
|
|
103
|
+
children: t.children ? t.children.map(R) : void 0,
|
|
104
|
+
data: t
|
|
105
|
+
}), ee = r(() => n.item.children ? n.item.children.map(R) : []), te = (t) => {
|
|
106
|
+
const a = t.data;
|
|
107
|
+
if (a) {
|
|
108
|
+
a.action && a.action(a);
|
|
109
|
+
const s = a.id || a.label || (typeof a.to == "string" ? a.to : "");
|
|
110
|
+
s && e.setActive(s), a.to ? Q.push(a.to).catch(() => {
|
|
111
|
+
}) : a.href && window.open(a.href, "_blank");
|
|
130
112
|
}
|
|
131
|
-
}, ne = (
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
},
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
}, oe = (
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
},
|
|
141
|
-
const
|
|
142
|
-
|
|
143
|
-
},
|
|
144
|
-
const
|
|
145
|
-
|
|
146
|
-
},
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
113
|
+
}, ne = (t) => {
|
|
114
|
+
const a = t;
|
|
115
|
+
a.style.height = "0", a.style.opacity = "0";
|
|
116
|
+
}, ae = (t) => {
|
|
117
|
+
const a = t;
|
|
118
|
+
a.style.height = a.scrollHeight + "px", a.style.opacity = "1";
|
|
119
|
+
}, oe = (t) => {
|
|
120
|
+
const a = t;
|
|
121
|
+
a.style.height = "auto", a.style.overflow = "visible";
|
|
122
|
+
}, ie = (t) => {
|
|
123
|
+
const a = t;
|
|
124
|
+
a.style.height = a.scrollHeight + "px", a.style.overflow = "hidden", a.style.opacity = "1";
|
|
125
|
+
}, re = (t) => {
|
|
126
|
+
const a = t;
|
|
127
|
+
a.style.height = "0", a.style.opacity = "0";
|
|
128
|
+
}, V = r(() => {
|
|
129
|
+
if (n.item.to) return "router-link";
|
|
130
|
+
if (n.item.href) return "a";
|
|
131
|
+
if (e.renderNestedTabs && n.depth === 0 && f.value) {
|
|
132
|
+
const t = n.item.children?.[0];
|
|
133
|
+
if (t?.to) return "router-link";
|
|
134
|
+
if (t?.href) return "a";
|
|
135
|
+
}
|
|
136
|
+
return "button";
|
|
137
|
+
}), O = r(() => {
|
|
138
|
+
if (n.item.to) return { to: n.item.to };
|
|
139
|
+
if (n.item.href)
|
|
140
|
+
return {
|
|
141
|
+
href: n.item.href,
|
|
142
|
+
target: "_blank",
|
|
143
|
+
rel: "noopener noreferrer"
|
|
144
|
+
};
|
|
145
|
+
if (e.renderNestedTabs && n.depth === 0 && f.value) {
|
|
146
|
+
const t = n.item.children?.[0];
|
|
147
|
+
if (t?.to) return { to: t.to };
|
|
148
|
+
if (t?.href)
|
|
149
|
+
return {
|
|
150
|
+
href: t.href,
|
|
151
|
+
target: "_blank",
|
|
152
|
+
rel: "noopener noreferrer"
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
return { type: "button" };
|
|
156
|
+
});
|
|
157
|
+
return (t, a) => {
|
|
152
158
|
const s = me("SidebarMenuItem", !0);
|
|
153
159
|
return c(), v("div", {
|
|
154
160
|
ref_key: "itemRef",
|
|
155
|
-
ref:
|
|
161
|
+
ref: T,
|
|
156
162
|
class: d([
|
|
157
163
|
"relative sidebar-manu-item",
|
|
158
|
-
|
|
164
|
+
i.value ? "w-auto" : "w-full",
|
|
159
165
|
o(e).compact && "mb-px"
|
|
160
166
|
])
|
|
161
167
|
}, [
|
|
162
|
-
|
|
168
|
+
z.value ? (c(), y(o(xe), {
|
|
163
169
|
key: 0,
|
|
164
|
-
position:
|
|
170
|
+
position: i.value ? "bottom-start" : "right-start",
|
|
165
171
|
offset: u.menuOffset,
|
|
166
172
|
class: "w-full block",
|
|
167
173
|
searchable: !1,
|
|
@@ -170,69 +176,69 @@ const we = {
|
|
|
170
176
|
options: ee.value,
|
|
171
177
|
onOnSelect: te
|
|
172
178
|
}, {
|
|
173
|
-
header:
|
|
174
|
-
o(e).compact && !
|
|
175
|
-
u.item.icon ? (c(),
|
|
179
|
+
header: g(() => [
|
|
180
|
+
o(e).compact && !i.value ? (c(), v("div", we, [
|
|
181
|
+
u.item.icon ? (c(), y(k, {
|
|
176
182
|
key: 0,
|
|
177
183
|
icon: u.item.icon,
|
|
178
184
|
class: "shrink-0 transition-colors opacity-90 group-hover:opacity-100"
|
|
179
185
|
}, null, 8, ["icon"])) : p("", !0),
|
|
180
|
-
fe(" " + w(
|
|
186
|
+
fe(" " + w(S.value), 1)
|
|
181
187
|
])) : p("", !0)
|
|
182
188
|
]),
|
|
183
|
-
trigger:
|
|
184
|
-
C(
|
|
185
|
-
content:
|
|
186
|
-
placement:
|
|
189
|
+
trigger: g(({ isOpen: l }) => [
|
|
190
|
+
C(G, {
|
|
191
|
+
content: S.value,
|
|
192
|
+
placement: i.value ? "bottom" : "right",
|
|
187
193
|
className: "sidebar-menu-tooltip",
|
|
188
|
-
disabled: !o(e).showTooltip || !o(e).compact && !
|
|
194
|
+
disabled: !o(e).showTooltip || !o(e).compact && !i.value || l,
|
|
189
195
|
class: "w-full block"
|
|
190
196
|
}, {
|
|
191
|
-
default:
|
|
197
|
+
default: g(() => [
|
|
192
198
|
b("div", ke, [
|
|
193
|
-
(c(),
|
|
194
|
-
class: [
|
|
195
|
-
style:
|
|
199
|
+
(c(), y(W(V.value), F(O.value, {
|
|
200
|
+
class: [B.value, l ? "bg-muted text-foreground" : ""],
|
|
201
|
+
style: H.value,
|
|
196
202
|
"aria-haspopup": !0,
|
|
197
|
-
"aria-expanded":
|
|
198
|
-
onClick:
|
|
203
|
+
"aria-expanded": l,
|
|
204
|
+
onClick: A
|
|
199
205
|
}), {
|
|
200
|
-
default:
|
|
206
|
+
default: g(() => [
|
|
201
207
|
b("div", {
|
|
202
208
|
class: d(["min-w-0 flex-1 flex", [
|
|
203
|
-
h.value && !
|
|
209
|
+
h.value && !i.value ? "flex-col items-center justify-center text-center gap-1" : o(e).compact && !i.value ? "justify-center" : "items-center gap-2.5"
|
|
204
210
|
]])
|
|
205
211
|
}, [
|
|
206
|
-
u.item.icon ? (c(),
|
|
212
|
+
u.item.icon ? (c(), y(k, {
|
|
207
213
|
key: 0,
|
|
208
214
|
icon: u.item.icon,
|
|
209
|
-
class: d(["shrink-0 transition-colors opacity-90 group-hover:opacity-100", [
|
|
210
|
-
style:
|
|
211
|
-
width: o(e).compact && !
|
|
212
|
-
height: o(e).compact && !
|
|
215
|
+
class: d(["shrink-0 transition-colors opacity-90 group-hover:opacity-100", [$.value || l ? "opacity-100" : ""]]),
|
|
216
|
+
style: M({
|
|
217
|
+
width: o(e).compact && !i.value ? o(e).compactIconSize : o(e).iconSize,
|
|
218
|
+
height: o(e).compact && !i.value ? o(e).compactIconSize : o(e).iconSize
|
|
213
219
|
})
|
|
214
220
|
}, null, 8, ["icon", "class", "style"])) : p("", !0),
|
|
215
221
|
b("span", {
|
|
216
222
|
class: d(["truncate leading-none pt-0.5 text-wrap", {
|
|
217
|
-
[o(e).compactLabelClass]: h.value && !
|
|
223
|
+
[o(e).compactLabelClass]: h.value && !i.value,
|
|
218
224
|
"w-full text-center": o(e).compact,
|
|
219
|
-
hidden: o(e).compact && !h.value && !
|
|
220
|
-
"md:hidden": o(e).compact && !h.value && !
|
|
225
|
+
hidden: o(e).compact && !h.value && !i.value,
|
|
226
|
+
"md:hidden": o(e).compact && !h.value && !i.value
|
|
221
227
|
}])
|
|
222
|
-
}, w(
|
|
223
|
-
u.item.badge && (!o(e).compact || !h.value ||
|
|
228
|
+
}, w(S.value), 3),
|
|
229
|
+
u.item.badge && (!o(e).compact || !h.value || i.value) ? (c(), v("span", {
|
|
224
230
|
key: 1,
|
|
225
231
|
class: d(["ml-auto inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium", [
|
|
226
232
|
u.item.badgeClass || "bg-muted text-muted-foreground",
|
|
227
|
-
{ "md:hidden": o(e).compact && !
|
|
233
|
+
{ "md:hidden": o(e).compact && !i.value }
|
|
228
234
|
]])
|
|
229
235
|
}, w(u.item.badge), 3)) : p("", !0)
|
|
230
236
|
], 2),
|
|
231
237
|
b("div", {
|
|
232
|
-
class: d(["ml-1.5 flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground", { "md:hidden": o(e).compact && !
|
|
238
|
+
class: d(["ml-1.5 flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground", { "md:hidden": o(e).compact && !i.value }])
|
|
233
239
|
}, [
|
|
234
240
|
C(k, {
|
|
235
|
-
icon:
|
|
241
|
+
icon: i.value ? "lucide:chevron-down" : "lucide:chevron-right",
|
|
236
242
|
class: "h-3 w-3"
|
|
237
243
|
}, null, 8, ["icon"])
|
|
238
244
|
], 2)
|
|
@@ -244,84 +250,84 @@ const we = {
|
|
|
244
250
|
_: 2
|
|
245
251
|
}, 1032, ["content", "placement", "disabled"])
|
|
246
252
|
]),
|
|
247
|
-
item:
|
|
253
|
+
item: g(({ option: l }) => [
|
|
248
254
|
b("div", Ce, [
|
|
249
|
-
|
|
255
|
+
l.icon ? (c(), y(k, {
|
|
250
256
|
key: 0,
|
|
251
|
-
icon:
|
|
257
|
+
icon: l.icon,
|
|
252
258
|
class: "shrink-0 opacity-90",
|
|
253
|
-
style:
|
|
259
|
+
style: M({ width: o(e).iconSize, height: o(e).iconSize })
|
|
254
260
|
}, null, 8, ["icon", "style"])) : p("", !0),
|
|
255
|
-
b("span", Ie, w(
|
|
256
|
-
|
|
261
|
+
b("span", Ie, w(l.label), 1),
|
|
262
|
+
l.data?.badge ? (c(), v("span", {
|
|
257
263
|
key: 1,
|
|
258
|
-
class: d(["ml-auto inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium",
|
|
259
|
-
}, w(
|
|
264
|
+
class: d(["ml-auto inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium", l.data?.badgeClass || "bg-muted text-muted-foreground"])
|
|
265
|
+
}, w(l.data.badge), 3)) : p("", !0)
|
|
260
266
|
])
|
|
261
267
|
]),
|
|
262
268
|
_: 1
|
|
263
|
-
}, 8, ["position", "offset", "width", "maxHeight", "options"])) : (c(), v(
|
|
264
|
-
C(
|
|
265
|
-
content:
|
|
266
|
-
placement:
|
|
267
|
-
disabled: !o(e).showTooltip || !o(e).compact && !
|
|
269
|
+
}, 8, ["position", "offset", "width", "maxHeight", "options"])) : (c(), v(q, { key: 1 }, [
|
|
270
|
+
C(G, {
|
|
271
|
+
content: S.value,
|
|
272
|
+
placement: i.value ? "bottom" : "right",
|
|
273
|
+
disabled: !o(e).showTooltip || !o(e).compact && !i.value,
|
|
268
274
|
class: "w-full block"
|
|
269
275
|
}, {
|
|
270
|
-
default:
|
|
271
|
-
(c(),
|
|
272
|
-
class:
|
|
273
|
-
style:
|
|
274
|
-
"aria-expanded":
|
|
275
|
-
"aria-current":
|
|
276
|
-
onClick:
|
|
276
|
+
default: g(() => [
|
|
277
|
+
(c(), y(W(V.value), F(O.value, {
|
|
278
|
+
class: B.value,
|
|
279
|
+
style: H.value,
|
|
280
|
+
"aria-expanded": j.value ? N.value : void 0,
|
|
281
|
+
"aria-current": $.value ? "page" : void 0,
|
|
282
|
+
onClick: A
|
|
277
283
|
}), {
|
|
278
|
-
default:
|
|
284
|
+
default: g(() => [
|
|
279
285
|
b("div", {
|
|
280
286
|
class: d(["min-w-0 flex-1 flex py-0.5", [
|
|
281
|
-
h.value && !
|
|
287
|
+
h.value && !i.value ? "flex-col items-center justify-center text-center gap-1" : o(e).compact && !i.value ? "justify-center" : "items-center gap-2.5"
|
|
282
288
|
]])
|
|
283
289
|
}, [
|
|
284
|
-
u.item.icon ? (c(),
|
|
290
|
+
u.item.icon ? (c(), y(k, {
|
|
285
291
|
key: 0,
|
|
286
292
|
icon: u.item.icon,
|
|
287
|
-
class: d(["shrink-0 transition-colors opacity-90 group-hover:opacity-100", [
|
|
288
|
-
style:
|
|
289
|
-
width: o(e).compact && !
|
|
290
|
-
height: o(e).compact && !
|
|
293
|
+
class: d(["shrink-0 transition-colors opacity-90 group-hover:opacity-100", [$.value ? "opacity-100" : ""]]),
|
|
294
|
+
style: M({
|
|
295
|
+
width: o(e).compact && !i.value ? o(e).compactIconSize : o(e).iconSize,
|
|
296
|
+
height: o(e).compact && !i.value ? o(e).compactIconSize : o(e).iconSize
|
|
291
297
|
})
|
|
292
298
|
}, null, 8, ["icon", "class", "style"])) : p("", !0),
|
|
293
299
|
b("span", {
|
|
294
300
|
class: d(["truncate leading-none pt-0.5 wrap-break-word flex-wrap text-wrap", {
|
|
295
|
-
[o(e).compactLabelClass]: h.value && !
|
|
301
|
+
[o(e).compactLabelClass]: h.value && !i.value,
|
|
296
302
|
"w-full text-center": o(e).compact,
|
|
297
|
-
hidden: o(e).compact && !h.value && !
|
|
298
|
-
"md:hidden": o(e).compact && !h.value && !
|
|
303
|
+
hidden: o(e).compact && !h.value && !i.value,
|
|
304
|
+
"md:hidden": o(e).compact && !h.value && !i.value
|
|
299
305
|
}])
|
|
300
|
-
}, w(
|
|
301
|
-
u.item.badge && (!o(e).compact || !h.value ||
|
|
306
|
+
}, w(S.value), 3),
|
|
307
|
+
u.item.badge && (!o(e).compact || !h.value || i.value) ? (c(), v("span", {
|
|
302
308
|
key: 1,
|
|
303
309
|
class: d(["ml-auto inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium", [
|
|
304
310
|
u.item.badgeClass || "bg-muted text-muted-foreground",
|
|
305
|
-
{ "md:hidden": o(e).compact && !
|
|
311
|
+
{ "md:hidden": o(e).compact && !i.value }
|
|
306
312
|
]])
|
|
307
313
|
}, w(u.item.badge), 3)) : p("", !0)
|
|
308
314
|
], 2),
|
|
309
|
-
|
|
315
|
+
j.value ? (c(), v("div", {
|
|
310
316
|
key: 0,
|
|
311
317
|
role: "button",
|
|
312
318
|
tabindex: "0",
|
|
313
|
-
class: d(["ml-1.5 flex shrink-0 items-center justify-center rounded-sm text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-all", { "md:hidden": o(e).compact && !
|
|
314
|
-
onClick:
|
|
315
|
-
onKeydown: pe(ve(
|
|
319
|
+
class: d(["ml-1.5 flex shrink-0 items-center justify-center rounded-sm text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-all", { "md:hidden": o(e).compact && !i.value }]),
|
|
320
|
+
onClick: D,
|
|
321
|
+
onKeydown: pe(ve(D, ["prevent"]), ["enter", "space"])
|
|
316
322
|
}, [
|
|
317
323
|
C(k, {
|
|
318
324
|
icon: "lucide:chevron-down",
|
|
319
|
-
class: d(["h-3 w-3 transition-transform duration-200", { "rotate-180":
|
|
325
|
+
class: d(["h-3 w-3 transition-transform duration-200", { "rotate-180": N.value && !i.value }])
|
|
320
326
|
}, null, 8, ["class"])
|
|
321
327
|
], 42, Se)) : p("", !0),
|
|
322
328
|
X.value ? (c(), v("div", {
|
|
323
329
|
key: 1,
|
|
324
|
-
class: d(["ml-1.5 flex shrink-0 items-center justify-center text-muted-foreground", { "md:hidden": o(e).compact && !
|
|
330
|
+
class: d(["ml-1.5 flex shrink-0 items-center justify-center text-muted-foreground", { "md:hidden": o(e).compact && !i.value }])
|
|
325
331
|
}, [
|
|
326
332
|
C(k, {
|
|
327
333
|
icon: "lucide:chevron-right",
|
|
@@ -337,17 +343,17 @@ const we = {
|
|
|
337
343
|
C(he, {
|
|
338
344
|
name: "sidebar-slide",
|
|
339
345
|
onBeforeEnter: ne,
|
|
340
|
-
onEnter:
|
|
346
|
+
onEnter: ae,
|
|
341
347
|
onAfterEnter: oe,
|
|
342
|
-
onBeforeLeave:
|
|
343
|
-
onLeave:
|
|
348
|
+
onBeforeLeave: ie,
|
|
349
|
+
onLeave: re
|
|
344
350
|
}, {
|
|
345
|
-
default:
|
|
346
|
-
f.value &&
|
|
351
|
+
default: g(() => [
|
|
352
|
+
f.value && N.value && !i.value ? (c(), v("div", ze, [
|
|
347
353
|
o(e).variant === "default" ? (c(), v("div", {
|
|
348
354
|
key: 0,
|
|
349
355
|
class: "sidebar-tree-line absolute rounded-full z-[1]",
|
|
350
|
-
style:
|
|
356
|
+
style: M({
|
|
351
357
|
left: Z.value,
|
|
352
358
|
top: "4px",
|
|
353
359
|
bottom: "10px",
|
|
@@ -356,9 +362,9 @@ const we = {
|
|
|
356
362
|
})
|
|
357
363
|
}, null, 4)) : p("", !0),
|
|
358
364
|
b("div", $e, [
|
|
359
|
-
(c(!0), v(
|
|
360
|
-
key:
|
|
361
|
-
item:
|
|
365
|
+
(c(!0), v(q, null, be(u.item.children, (l) => (c(), y(s, {
|
|
366
|
+
key: l.id || l.label,
|
|
367
|
+
item: l,
|
|
362
368
|
depth: u.depth + 1
|
|
363
369
|
}, null, 8, ["item", "depth"]))), 128))
|
|
364
370
|
])
|
|
@@ -12,7 +12,7 @@ const w = /* @__PURE__ */ m({
|
|
|
12
12
|
},
|
|
13
13
|
setup(t) {
|
|
14
14
|
const { theme: i, toggleTheme: s } = f(), a = d(() => {
|
|
15
|
-
const n = i.value === "light", l = "vlite.themeToggle.switchToDark", r = "vlite.themeToggle.switchToLight";
|
|
15
|
+
const n = i.value === "light-mode", l = "vlite.themeToggle.switchToDark", r = "vlite.themeToggle.switchToLight";
|
|
16
16
|
if (n) {
|
|
17
17
|
const e = c(l);
|
|
18
18
|
return e !== l ? e : "Switch to dark mode";
|
|
@@ -26,7 +26,7 @@ const w = /* @__PURE__ */ m({
|
|
|
26
26
|
theme: o(i)
|
|
27
27
|
}, () => [
|
|
28
28
|
h(T, {
|
|
29
|
-
icon: o(i) === "light" ? "lucide:sun" : "lucide:moon",
|
|
29
|
+
icon: o(i) === "light-mode" ? "lucide:sun" : "lucide:moon",
|
|
30
30
|
variant: t.variant || "secondary",
|
|
31
31
|
rounded: t.rounded || "full",
|
|
32
32
|
size: t.size,
|