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