vlite3 1.3.6 → 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.
@@ -1,9 +1,9 @@
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";
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 J from "../Tooltip.vue.js";
4
+ import G from "../Tooltip.vue.js";
5
5
  import xe from "../Dropdown/Dropdown.vue.js";
6
- import { $t as Q } from "../../utils/i18n.js";
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__ */ re({
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 t = u, e = ce("sidebar-menu-ctx"), I = ye(), U = ge();
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 E = se(null), a = l(
28
- () => e.currentOrientation === "horizontal" && t.depth === 0
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
- if (i.to) {
33
- const m = typeof i.to == "string" ? i.to : i.to.path;
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 N = s[m.length];
38
- if (!N || N === "/" || N === "?") return !0;
37
+ const E = s[m.length];
38
+ if (!E || E === "/" || E === "?") return !0;
39
39
  }
40
40
  }
41
41
  }
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" });
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
- A.value && de(() => {
50
+ _.value && de(() => {
51
51
  Y(!1);
52
52
  });
53
53
  });
54
- const D = (i) => {
55
- if (!t.item.disabled) {
56
- if (S.value) {
57
- t.item.action && t.item.action(t.item), e.drillInto(t.item);
58
- return;
59
- }
60
- if (e.renderNestedTabs && t.depth === 0) {
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
- }, H = (i) => {
77
- if (i.stopPropagation(), e.renderNestedTabs && t.depth === 0) {
78
- if (t.item.action && t.item.action(t.item), t.item.to)
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
- $.value || e.toggleExpand(y.value);
92
- }, B = l(() => e.indentSize || 12), Z = l(() => {
93
- const n = 8 + parseInt(e.iconSize || "16", 10) / 2;
94
- return `${t.depth * B.value + n}px`;
95
- }), R = l(() => {
96
- if (a.value) return {};
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 (t.depth > 0) {
100
- const n = 8 + parseInt(e.iconSize || "16", 10) / 2, s = (t.depth - 1) * B.value + n + 8;
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
- }), 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}`;
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 && t.depth > 0 && (s = s.replace(/py-[\d\.]+/, "py-1.5"));
111
- const r = e.compact ? `justify-center ${s}` : `justify-between ${s}`;
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 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,
118
- value: i.id || i.label,
119
- icon: i.icon,
120
- disabled: i.disabled,
121
- children: i.children ? i.children.map(K) : void 0,
122
- data: i
123
- }), ee = l(() => t.item.children ? t.item.children.map(K) : []), te = (i) => {
124
- const n = i.data;
125
- if (n) {
126
- n.action && n.action(n);
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(() => {
129
- }) : n.href && window.open(n.href, "_blank");
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 = (i) => {
132
- const n = i;
133
- n.style.height = "0", n.style.opacity = "0";
134
- }, ie = (i) => {
135
- const n = i;
136
- n.style.height = n.scrollHeight + "px", n.style.opacity = "1";
137
- }, oe = (i) => {
138
- const n = i;
139
- n.style.height = "auto", n.style.overflow = "visible";
140
- }, ae = (i) => {
141
- const n = i;
142
- n.style.height = n.scrollHeight + "px", n.style.overflow = "hidden", n.style.opacity = "1";
143
- }, le = (i) => {
144
- const n = i;
145
- n.style.height = "0", n.style.opacity = "0";
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 ? {
147
- href: t.item.href,
148
- target: "_blank",
149
- rel: "noopener noreferrer"
150
- } : { type: "button" });
151
- return (i, n) => {
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: E,
161
+ ref: T,
156
162
  class: d([
157
163
  "relative sidebar-manu-item",
158
- a.value ? "w-auto" : "w-full",
164
+ i.value ? "w-auto" : "w-full",
159
165
  o(e).compact && "mb-px"
160
166
  ])
161
167
  }, [
162
- $.value ? (c(), g(o(xe), {
168
+ z.value ? (c(), y(o(xe), {
163
169
  key: 0,
164
- position: a.value ? "bottom-start" : "right-start",
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: x(() => [
174
- o(e).compact && !a.value ? (c(), v("div", we, [
175
- u.item.icon ? (c(), g(k, {
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(z.value), 1)
186
+ fe(" " + w(S.value), 1)
181
187
  ])) : p("", !0)
182
188
  ]),
183
- trigger: x(({ isOpen: r }) => [
184
- C(J, {
185
- content: z.value,
186
- placement: a.value ? "bottom" : "right",
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 && !a.value || r,
194
+ disabled: !o(e).showTooltip || !o(e).compact && !i.value || l,
189
195
  class: "w-full block"
190
196
  }, {
191
- default: x(() => [
197
+ default: g(() => [
192
198
  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,
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": r,
198
- onClick: D
203
+ "aria-expanded": l,
204
+ onClick: A
199
205
  }), {
200
- default: x(() => [
206
+ default: g(() => [
201
207
  b("div", {
202
208
  class: d(["min-w-0 flex-1 flex", [
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"
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(), g(k, {
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", [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
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 && !a.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 && !a.value,
220
- "md:hidden": o(e).compact && !h.value && !a.value
225
+ hidden: o(e).compact && !h.value && !i.value,
226
+ "md:hidden": o(e).compact && !h.value && !i.value
221
227
  }])
222
- }, w(z.value), 3),
223
- u.item.badge && (!o(e).compact || !h.value || a.value) ? (c(), v("span", {
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 && !a.value }
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 && !a.value }])
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: a.value ? "lucide:chevron-down" : "lucide:chevron-right",
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: x(({ option: r }) => [
253
+ item: g(({ option: l }) => [
248
254
  b("div", Ce, [
249
- r.icon ? (c(), g(k, {
255
+ l.icon ? (c(), y(k, {
250
256
  key: 0,
251
- icon: r.icon,
257
+ icon: l.icon,
252
258
  class: "shrink-0 opacity-90",
253
- style: T({ width: o(e).iconSize, height: o(e).iconSize })
259
+ style: M({ width: o(e).iconSize, height: o(e).iconSize })
254
260
  }, null, 8, ["icon", "style"])) : p("", !0),
255
- b("span", Ie, w(r.label), 1),
256
- r.data?.badge ? (c(), v("span", {
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", r.data?.badgeClass || "bg-muted text-muted-foreground"])
259
- }, w(r.data.badge), 3)) : p("", !0)
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(G, { key: 1 }, [
264
- C(J, {
265
- content: z.value,
266
- placement: a.value ? "bottom" : "right",
267
- disabled: !o(e).showTooltip || !o(e).compact && !a.value,
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: 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
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: x(() => [
284
+ default: g(() => [
279
285
  b("div", {
280
286
  class: d(["min-w-0 flex-1 flex py-0.5", [
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"
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(), g(k, {
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", [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
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 && !a.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 && !a.value,
298
- "md:hidden": o(e).compact && !h.value && !a.value
303
+ hidden: o(e).compact && !h.value && !i.value,
304
+ "md:hidden": o(e).compact && !h.value && !i.value
299
305
  }])
300
- }, w(z.value), 3),
301
- u.item.badge && (!o(e).compact || !h.value || a.value) ? (c(), v("span", {
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 && !a.value }
311
+ { "md:hidden": o(e).compact && !i.value }
306
312
  ]])
307
313
  }, w(u.item.badge), 3)) : p("", !0)
308
314
  ], 2),
309
- _.value ? (c(), v("div", {
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 && !a.value }]),
314
- onClick: H,
315
- onKeydown: pe(ve(H, ["prevent"]), ["enter", "space"])
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": L.value && !a.value }])
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 && !a.value }])
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: ie,
346
+ onEnter: ae,
341
347
  onAfterEnter: oe,
342
- onBeforeLeave: ae,
343
- onLeave: le
348
+ onBeforeLeave: ie,
349
+ onLeave: re
344
350
  }, {
345
- default: x(() => [
346
- f.value && L.value && !a.value ? (c(), v("div", ze, [
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: T({
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(G, null, be(u.item.children, (r) => (c(), g(s, {
360
- key: r.id || r.label,
361
- item: r,
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
  ])
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "private": false,
4
4
  "description": "A Vue 3 UI component library built with Tailwind CSS.",
5
5
  "license": "MIT",
6
- "version": "1.3.6",
6
+ "version": "1.3.7",
7
7
  "type": "module",
8
8
  "main": "index.js",
9
9
  "module": "index.js",