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.
Files changed (38) hide show
  1. package/README.md +1 -0
  2. package/components/AppShell/AppShellLayoutDashboard.vue.js +1 -1
  3. package/components/AppShell/AppShellLayoutHeaderShell.vue.js +1 -1
  4. package/components/AsyncSelect/createAsyncSelect.d.ts +88 -0
  5. package/components/AsyncSelect/createAsyncSelect.js +156 -0
  6. package/components/AsyncSelect/index.d.ts +1 -0
  7. package/components/ChoiceBox/ChoiceBox.vue.js +4 -2
  8. package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
  9. package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
  10. package/components/Form/Form.vue.js +1 -1
  11. package/components/Form/Form.vue2.js +1 -1
  12. package/components/List/ListFieldRow.vue.js +221 -144
  13. package/components/NavbarCommandPalette.vue.js +1 -1
  14. package/components/Price/Price.vue.d.ts +1 -1
  15. package/components/Price/Price.vue.js +35 -13
  16. package/components/Rating/Rating.vue.d.ts +43 -0
  17. package/components/Rating/Rating.vue.js +7 -0
  18. package/components/Rating/Rating.vue2.js +92 -0
  19. package/components/Rating/ReviewSummary.vue.d.ts +5 -0
  20. package/components/Rating/ReviewSummary.vue.js +67 -0
  21. package/components/Rating/ReviewSummary.vue2.js +4 -0
  22. package/components/Rating/index.d.ts +3 -0
  23. package/components/Rating/types.d.ts +28 -0
  24. package/components/Screen/Screen.vue.d.ts +2 -2
  25. package/components/Screen/Screen.vue.js +3 -1
  26. package/components/SidebarMenu/SidebarMenu.vue.js +1 -1
  27. package/components/SidebarMenu/SidebarMenuItem.vue.d.ts +3 -1
  28. package/components/SidebarMenu/SidebarMenuItem.vue.js +198 -175
  29. package/components/Stats/StatItem.vue.js +222 -164
  30. package/components/Stats/components/StatIconBox.vue.js +42 -42
  31. package/components/Stats/components/StatTrend.vue.js +20 -20
  32. package/components/Timeline/Timeline.vue.js +21 -11
  33. package/components/Timeline/TimelineItem.vue.js +1 -1
  34. package/index.d.ts +2 -0
  35. package/index.js +108 -102
  36. package/package.json +2 -1
  37. package/style.css +23 -17
  38. package/utils/status.js +16 -16
@@ -1,18 +1,18 @@
1
- import { defineComponent as ae, inject as oe, computed as r, resolveComponent as le, openBlock as s, createElementBlock as p, normalizeClass as d, createBlock as g, unref as a, withCtx as y, createElementVNode as v, normalizeStyle as M, createCommentVNode as f, toDisplayString as w, createVNode as C, resolveDynamicComponent as R, mergeProps as W, createTextVNode as re, Fragment as F, withKeys as se, withModifiers as ce, Transition as ue, renderList as de } from "vue";
2
- import { useRouter as me, useRoute as fe } from "vue-router";
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 q from "../Tooltip.vue.js";
5
- import pe from "../Dropdown/Dropdown.vue.js";
6
- import { $t as G } from "../../utils/i18n.js";
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 he = {
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
- }, ve = { class: "w-full" }, be = { class: "flex items-center w-full gap-2 text-sm" }, ge = { class: "truncate flex-1 font-medium" }, ye = ["onKeydown"], xe = {
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
- }, we = { class: "pt-1 space-y-0.5 pb-1.5" }, je = /* @__PURE__ */ ae({
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(c) {
24
- const t = c, e = oe("sidebar-menu-ctx"), S = me(), J = fe();
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 o = r(
27
+ const E = se(null), a = l(
28
28
  () => e.currentOrientation === "horizontal" && t.depth === 0
29
- ), m = r(() => !!t.item.children?.length), N = r(() => o.value && m.value || e.compact && m.value ? "popover" : t.item.renderMode || e.renderMode || "tree"), I = r(() => e.renderNestedTabs && t.depth === 0 ? !1 : N.value === "drilldown" && m.value), $ = r(() => e.renderNestedTabs && t.depth === 0 || I.value ? !1 : N.value === "popover" && m.value), x = r(() => t.item.id ? t.item.id : t.item.to && typeof t.item.to == "string" ? t.item.to : t.item.label), j = r(() => $.value || I.value || e.renderNestedTabs && t.depth === 0 ? !1 : e.expandedItems.includes(x.value)), T = r(() => !(!m.value || I.value || e.renderNestedTabs && t.depth === 0)), Q = r(() => I.value && m.value), _ = (i, n, u) => {
30
- const l = i.id || (typeof i.to == "string" ? i.to : null) || i.label;
31
- if (n && l === n) return !0;
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 b = typeof i.to == "string" ? i.to : i.to.path;
34
- if (b) {
35
- if (u === b) return !0;
36
- if (b !== "/" && b.length > 1 && u.startsWith(b)) {
37
- const E = u[b.length];
38
- if (!E || E === "/" || E === "?") return !0;
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((b) => _(b, n, u)) : !1;
43
- }, L = r(() => {
44
- const i = J?.path || "", n = e.activeItem;
45
- return m.value ? _(t.item, n, i) : n === x.value;
46
- }), P = (i) => {
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 (I.value) {
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
- S.push(t.item.to).catch(() => {
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 (m.value) {
70
+ else if (f.value) {
59
71
  const n = t.item.children?.[0];
60
- n && (n.to ? S.push(n.to).catch(() => {
72
+ n && (n.to ? I.push(n.to).catch(() => {
61
73
  }) : n.href && window.open(n.href, "_blank"));
62
74
  }
63
- e.setActive(x.value);
75
+ e.setActive(y.value);
64
76
  return;
65
77
  }
66
- m.value && !t.item.to && !t.item.href && ($.value || e.toggleExpand(x.value)), t.item.action && t.item.action(t.item), (!m.value || t.item.to) && e.setActive(x.value);
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
- }, A = (i) => {
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
- S.push(t.item.to).catch(() => {
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 (m.value) {
87
+ else if (f.value) {
76
88
  const n = t.item.children?.[0];
77
- n && (n.to ? S.push(n.to).catch(() => {
89
+ n && (n.to ? I.push(n.to).catch(() => {
78
90
  }) : n.href && window.open(n.href, "_blank"));
79
91
  }
80
- e.setActive(x.value);
92
+ e.setActive(y.value);
81
93
  return;
82
94
  }
83
- $.value || e.toggleExpand(x.value);
84
- }, D = r(() => e.indentSize || 12), U = r(() => {
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 * D.value + n}px`;
87
- }), H = r(() => {
88
- if (o.value) return {};
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, u = (t.depth - 1) * D.value + n + 8;
104
+ const n = 8 + parseInt(e.iconSize || "16", 10) / 2, s = (t.depth - 1) * R.value + n + 8;
93
105
  return {
94
- marginLeft: `${u}px`,
95
- width: `calc(100% - ${u}px)`
106
+ marginLeft: `${s}px`,
107
+ width: `calc(100% - ${s}px)`
96
108
  };
97
109
  }
98
110
  return {};
99
- }), B = r(() => {
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 ${o.value ? "w-auto" : "w-full"} ${t?.itemClass || ""} ${e.labelClass}`, u = e.compact ? `justify-center ${e.compactItemPadding}` : `justify-between ${e.itemPadding}`;
101
- let l = "";
102
- return L.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} ${u} ${l} ${t.item.class || ""}`;
103
- }), h = r(() => e.compact && e.showCompactLabels), z = r(
104
- () => t.item.labelI18n ? G(t.item.labelI18n) : t.item.label
105
- ), V = (i) => ({
106
- label: i.labelI18n ? G(i.labelI18n) : i.label,
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(V) : void 0,
125
+ children: i.children ? i.children.map(O) : void 0,
111
126
  data: i
112
- }), X = r(() => t.item.children ? t.item.children.map(V) : []), Y = (i) => {
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 u = n.id || n.label || (typeof n.to == "string" ? n.to : "");
117
- u && e.setActive(u), n.to ? S.push(n.to).catch(() => {
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
- }, Z = (i) => {
135
+ }, ne = (i) => {
121
136
  const n = i;
122
137
  n.style.height = "0", n.style.opacity = "0";
123
- }, ee = (i) => {
138
+ }, ie = (i) => {
124
139
  const n = i;
125
140
  n.style.height = n.scrollHeight + "px", n.style.opacity = "1";
126
- }, te = (i) => {
141
+ }, oe = (i) => {
127
142
  const n = i;
128
143
  n.style.height = "auto", n.style.overflow = "visible";
129
- }, ne = (i) => {
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
- }, ie = (i) => {
147
+ }, le = (i) => {
133
148
  const n = i;
134
149
  n.style.height = "0", n.style.opacity = "0";
135
- }, K = r(() => t.item.to ? "router-link" : t.item.href ? "a" : "button"), O = r(() => t.item.to ? { to: t.item.to } : t.item.href ? {
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 u = le("SidebarMenuItem", !0);
142
- return s(), p("div", {
143
- class: d(["relative sidebar-manu-item", o.value ? "w-auto" : "w-full"])
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 ? (s(), g(a(pe), {
166
+ $.value ? (c(), g(o(we), {
146
167
  key: 0,
147
- position: o.value ? "bottom-start" : "right-start",
148
- offset: c.menuOffset,
168
+ position: a.value ? "bottom-start" : "right-start",
169
+ offset: u.menuOffset,
149
170
  class: "w-full block",
150
171
  searchable: !1,
151
- width: a(e).nestedMenuWidth,
152
- maxHeight: a(e).nestedMenuMaxHeight,
153
- options: X.value,
154
- onOnSelect: Y
172
+ width: o(e).nestedMenuWidth,
173
+ maxHeight: o(e).nestedMenuMaxHeight,
174
+ options: ee.value,
175
+ onOnSelect: te
155
176
  }, {
156
- header: y(() => [
157
- a(e).compact && !o.value ? (s(), p("div", he, [
158
- c.item.icon ? (s(), g(k, {
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: c.item.icon,
181
+ icon: u.item.icon,
161
182
  class: "shrink-0 transition-colors opacity-90 group-hover:opacity-100"
162
- }, null, 8, ["icon"])) : f("", !0),
163
- re(" " + w(z.value), 1)
164
- ])) : f("", !0)
183
+ }, null, 8, ["icon"])) : p("", !0),
184
+ pe(" " + w(z.value), 1)
185
+ ])) : p("", !0)
165
186
  ]),
166
- trigger: y(({ isOpen: l }) => [
167
- C(q, {
187
+ trigger: x(({ isOpen: r }) => [
188
+ C(Q, {
168
189
  content: z.value,
169
- placement: o.value ? "bottom" : "right",
190
+ placement: a.value ? "bottom" : "right",
170
191
  className: "sidebar-menu-tooltip",
171
- disabled: !a(e).showTooltip || !a(e).compact && !o.value || l,
192
+ disabled: !o(e).showTooltip || !o(e).compact && !a.value || r,
172
193
  class: "w-full block"
173
194
  }, {
174
- default: y(() => [
175
- v("div", ve, [
176
- (s(), g(R(K.value), W(O.value, {
177
- class: [B.value, l ? "bg-muted text-foreground" : ""],
178
- style: H.value,
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": l,
181
- onClick: P
201
+ "aria-expanded": r,
202
+ onClick: H
182
203
  }), {
183
- default: y(() => [
184
- v("div", {
204
+ default: x(() => [
205
+ b("div", {
185
206
  class: d(["min-w-0 flex-1 flex", [
186
- h.value && !o.value ? "flex-col items-center justify-center gap-1" : a(e).compact && !o.value ? "justify-center" : "items-center gap-2.5"
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
- c.item.icon ? (s(), g(k, {
210
+ u.item.icon ? (c(), g(k, {
190
211
  key: 0,
191
- icon: c.item.icon,
192
- class: d(["shrink-0 transition-colors opacity-90 group-hover:opacity-100", [L.value || l ? "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: a(e).compact && !o.value ? a(e).compactIconSize : a(e).iconSize,
195
- height: a(e).compact && !o.value ? a(e).compactIconSize : a(e).iconSize
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"])) : f("", !0),
198
- v("span", {
218
+ }, null, 8, ["icon", "class", "style"])) : p("", !0),
219
+ b("span", {
199
220
  class: d(["truncate leading-none pt-0.5 text-wrap", {
200
- [a(e).compactLabelClass]: h.value && !o.value,
201
- hidden: a(e).compact && !h.value && !o.value,
202
- "md:hidden": a(e).compact && !h.value && !o.value
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
- c.item.badge && (!a(e).compact || !h.value || o.value) ? (s(), p("span", {
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
- c.item.badgeClass || "bg-muted text-muted-foreground",
209
- { "md:hidden": a(e).compact && !o.value }
230
+ u.item.badgeClass || "bg-muted text-muted-foreground",
231
+ { "md:hidden": o(e).compact && !a.value }
210
232
  ]])
211
- }, w(c.item.badge), 3)) : f("", !0)
233
+ }, w(u.item.badge), 3)) : p("", !0)
212
234
  ], 2),
213
- v("div", {
214
- class: d(["ml-1.5 flex h-4 w-4 shrink-0 items-center justify-center text-muted-foreground", { "md:hidden": a(e).compact && !o.value }])
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: o.value ? "lucide:chevron-down" : "lucide:chevron-right",
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: y(({ option: l }) => [
230
- v("div", be, [
231
- l.icon ? (s(), g(k, {
251
+ item: x(({ option: r }) => [
252
+ b("div", Ie, [
253
+ r.icon ? (c(), g(k, {
232
254
  key: 0,
233
- icon: l.icon,
255
+ icon: r.icon,
234
256
  class: "shrink-0 opacity-90",
235
- style: M({ width: a(e).iconSize, height: a(e).iconSize })
236
- }, null, 8, ["icon", "style"])) : f("", !0),
237
- v("span", ge, w(l.label), 1),
238
- l.data?.badge ? (s(), p("span", {
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", l.data?.badgeClass || "bg-muted text-muted-foreground"])
241
- }, w(l.data.badge), 3)) : f("", !0)
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"])) : (s(), p(F, { key: 1 }, [
246
- C(q, {
267
+ }, 8, ["position", "offset", "width", "maxHeight", "options"])) : (c(), v(J, { key: 1 }, [
268
+ C(Q, {
247
269
  content: z.value,
248
- placement: o.value ? "bottom" : "right",
249
- disabled: !a(e).showTooltip || !a(e).compact && !o.value,
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: y(() => [
253
- (s(), g(R(K.value), W(O.value, {
254
- class: B.value,
255
- style: H.value,
256
- "aria-expanded": T.value ? j.value : void 0,
257
- "aria-current": L.value ? "page" : void 0,
258
- onClick: P
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: y(() => [
261
- v("div", {
282
+ default: x(() => [
283
+ b("div", {
262
284
  class: d(["min-w-0 flex-1 flex py-0.5", [
263
- h.value && !o.value ? "flex-col items-center justify-center gap-1" : a(e).compact && !o.value ? "justify-center" : "items-center gap-2.5"
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
- c.item.icon ? (s(), g(k, {
288
+ u.item.icon ? (c(), g(k, {
267
289
  key: 0,
268
- icon: c.item.icon,
269
- class: d(["shrink-0 transition-colors opacity-90 group-hover:opacity-100", [L.value ? "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: a(e).compact && !o.value ? a(e).compactIconSize : a(e).iconSize,
272
- height: a(e).compact && !o.value ? a(e).compactIconSize : a(e).iconSize
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"])) : f("", !0),
275
- v("span", {
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
- [a(e).compactLabelClass]: h.value && !o.value,
278
- hidden: a(e).compact && !h.value && !o.value,
279
- "md:hidden": a(e).compact && !h.value && !o.value
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
- c.item.badge && (!a(e).compact || !h.value || o.value) ? (s(), p("span", {
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
- c.item.badgeClass || "bg-muted text-muted-foreground",
286
- { "md:hidden": a(e).compact && !o.value }
308
+ u.item.badgeClass || "bg-muted text-muted-foreground",
309
+ { "md:hidden": o(e).compact && !a.value }
287
310
  ]])
288
- }, w(c.item.badge), 3)) : f("", !0)
311
+ }, w(u.item.badge), 3)) : p("", !0)
289
312
  ], 2),
290
- T.value ? (s(), p("div", {
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": a(e).compact && !o.value }]),
295
- onClick: A,
296
- onKeydown: se(ce(A, ["prevent"]), ["enter", "space"])
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": j.value && !o.value }])
323
+ class: d(["h-3 w-3 transition-transform duration-200", { "rotate-180": L.value && !a.value }])
301
324
  }, null, 8, ["class"])
302
- ], 42, ye)) : f("", !0),
303
- Q.value ? (s(), p("div", {
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": a(e).compact && !o.value }])
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)) : f("", !0)
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(ue, {
341
+ C(be, {
319
342
  name: "sidebar-slide",
320
- onBeforeEnter: Z,
321
- onEnter: ee,
322
- onAfterEnter: te,
323
- onBeforeLeave: ne,
324
- onLeave: ie
343
+ onBeforeEnter: ne,
344
+ onEnter: ie,
345
+ onAfterEnter: oe,
346
+ onBeforeLeave: ae,
347
+ onLeave: le
325
348
  }, {
326
- default: y(() => [
327
- m.value && j.value && !o.value ? (s(), p("div", xe, [
328
- a(e).variant === "default" ? (s(), p("div", {
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: U.value,
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)) : f("", !0),
339
- v("div", we, [
340
- (s(!0), p(F, null, de(c.item.children, (l) => (s(), g(u, {
341
- key: l.id || l.label,
342
- item: l,
343
- depth: c.depth + 1
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
- ])) : f("", !0)
369
+ ])) : p("", !0)
347
370
  ]),
348
371
  _: 1
349
372
  })
@@ -353,5 +376,5 @@ const he = {
353
376
  }
354
377
  });
355
378
  export {
356
- je as default
379
+ De as default
357
380
  };