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