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