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.
Files changed (57) hide show
  1. package/README.md +18 -7
  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/AvatarGroup/AvatarGroup.vue.js +10 -9
  8. package/components/Beacon.vue.d.ts +13 -0
  9. package/components/CategoryManager/CategoryManager.vue.js +1 -1
  10. package/components/ChoiceBox/ChoiceBox.vue.js +4 -2
  11. package/components/{CopyButton.vue.d.ts → Clipboard.vue.d.ts} +4 -3
  12. package/components/{CopyButton.vue.js → Clipboard.vue.js} +19 -19
  13. package/components/Clipboard.vue2.js +4 -0
  14. package/components/ColorPicker/ColorIro.vue3.js +2 -2
  15. package/components/ColorPicker/ColorPicker.vue.js +2 -2
  16. package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
  17. package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
  18. package/components/DataTable/types.d.ts +1 -1
  19. package/components/Form/Form.vue.js +1 -1
  20. package/components/Form/Form.vue2.js +1 -1
  21. package/components/List/ListFieldRow.vue.js +221 -144
  22. package/components/Modal.vue.js +1 -1
  23. package/components/Modal.vue2.js +92 -86
  24. package/components/NavbarCommandPalette.vue.js +1 -1
  25. package/components/Persona.vue.d.ts +25 -0
  26. package/components/Price/Price.vue.d.ts +1 -1
  27. package/components/Price/Price.vue.js +35 -13
  28. package/components/Rating/Rating.vue.d.ts +43 -0
  29. package/components/Rating/Rating.vue.js +7 -0
  30. package/components/Rating/Rating.vue2.js +92 -0
  31. package/components/Rating/ReviewSummary.vue.d.ts +5 -0
  32. package/components/Rating/ReviewSummary.vue.js +67 -0
  33. package/components/Rating/ReviewSummary.vue2.js +4 -0
  34. package/components/Rating/index.d.ts +3 -0
  35. package/components/Rating/types.d.ts +28 -0
  36. package/components/Screen/Screen.vue.d.ts +2 -2
  37. package/components/Screen/Screen.vue.js +3 -1
  38. package/components/Screen/ScreenFilter.vue.js +1 -1
  39. package/components/SidePanel.vue.js +3 -3
  40. package/components/SidePanel.vue2.js +44 -56
  41. package/components/SidebarMenu/SidebarMenu.vue.js +1 -1
  42. package/components/SidebarMenu/SidebarMenuItem.vue.d.ts +3 -1
  43. package/components/SidebarMenu/SidebarMenuItem.vue.js +197 -178
  44. package/components/Stats/StatItem.vue.js +222 -164
  45. package/components/Stats/components/StatIconBox.vue.js +42 -42
  46. package/components/Stats/components/StatTrend.vue.js +20 -20
  47. package/components/ThemeToggle.vue.js +10 -10
  48. package/components/Timeline/Timeline.vue.js +21 -11
  49. package/components/Timeline/TimelineItem.vue.js +1 -1
  50. package/components/index.d.ts +2 -0
  51. package/index.d.ts +3 -1
  52. package/index.js +113 -107
  53. package/package.json +2 -1
  54. package/style.css +47 -32
  55. package/utils/status.js +16 -16
  56. package/components/CopyButton.vue2.js +0 -4
  57. /package/components/ColorPicker/{ColorIro.vue.js → ColorIro.vue2.js} +0 -0
@@ -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, 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 q from "../Tooltip.vue.js";
5
- import pe from "../Dropdown/Dropdown.vue.js";
6
- import { $t as G } from "../../utils/i18n.js";
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 he = {
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
- }, 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
+ }, 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
- }, we = { class: "pt-1 space-y-0.5 pb-1.5" }, je = /* @__PURE__ */ ae({
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(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 = ye(), U = ge();
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), 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 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 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((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) => 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 (I.value) {
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
- S.push(t.item.to).catch(() => {
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 (m.value) {
66
+ else if (f.value) {
59
67
  const n = t.item.children?.[0];
60
- n && (n.to ? S.push(n.to).catch(() => {
68
+ n && (n.to ? I.push(n.to).catch(() => {
61
69
  }) : n.href && window.open(n.href, "_blank"));
62
70
  }
63
- e.setActive(x.value);
71
+ e.setActive(y.value);
64
72
  return;
65
73
  }
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);
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
- }, A = (i) => {
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
- S.push(t.item.to).catch(() => {
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 (m.value) {
83
+ else if (f.value) {
76
84
  const n = t.item.children?.[0];
77
- n && (n.to ? S.push(n.to).catch(() => {
85
+ n && (n.to ? I.push(n.to).catch(() => {
78
86
  }) : n.href && window.open(n.href, "_blank"));
79
87
  }
80
- e.setActive(x.value);
88
+ e.setActive(y.value);
81
89
  return;
82
90
  }
83
- $.value || e.toggleExpand(x.value);
84
- }, D = r(() => e.indentSize || 12), U = r(() => {
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 * D.value + n}px`;
87
- }), H = r(() => {
88
- if (o.value) return {};
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, u = (t.depth - 1) * D.value + n + 8;
100
+ const n = 8 + parseInt(e.iconSize || "16", 10) / 2, s = (t.depth - 1) * B.value + n + 8;
93
101
  return {
94
- marginLeft: `${u}px`,
95
- width: `calc(100% - ${u}px)`
102
+ marginLeft: `${s}px`,
103
+ width: `calc(100% - ${s}px)`
96
104
  };
97
105
  }
98
106
  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,
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(V) : void 0,
121
+ children: i.children ? i.children.map(K) : void 0,
111
122
  data: i
112
- }), X = r(() => t.item.children ? t.item.children.map(V) : []), Y = (i) => {
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 u = n.id || n.label || (typeof n.to == "string" ? n.to : "");
117
- u && e.setActive(u), n.to ? S.push(n.to).catch(() => {
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
- }, Z = (i) => {
131
+ }, ne = (i) => {
121
132
  const n = i;
122
133
  n.style.height = "0", n.style.opacity = "0";
123
- }, ee = (i) => {
134
+ }, ie = (i) => {
124
135
  const n = i;
125
136
  n.style.height = n.scrollHeight + "px", n.style.opacity = "1";
126
- }, te = (i) => {
137
+ }, oe = (i) => {
127
138
  const n = i;
128
139
  n.style.height = "auto", n.style.overflow = "visible";
129
- }, ne = (i) => {
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
- }, ie = (i) => {
143
+ }, le = (i) => {
133
144
  const n = i;
134
145
  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 ? {
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 u = le("SidebarMenuItem", !0);
142
- return s(), p("div", {
143
- class: d(["relative sidebar-manu-item", o.value ? "w-auto" : "w-full"])
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 ? (s(), g(a(pe), {
162
+ $.value ? (c(), g(o(xe), {
146
163
  key: 0,
147
- position: o.value ? "bottom-start" : "right-start",
148
- offset: c.menuOffset,
164
+ position: a.value ? "bottom-start" : "right-start",
165
+ offset: u.menuOffset,
149
166
  class: "w-full block",
150
167
  searchable: !1,
151
- width: a(e).nestedMenuWidth,
152
- maxHeight: a(e).nestedMenuMaxHeight,
153
- options: X.value,
154
- onOnSelect: Y
168
+ width: o(e).nestedMenuWidth,
169
+ maxHeight: o(e).nestedMenuMaxHeight,
170
+ options: ee.value,
171
+ onOnSelect: te
155
172
  }, {
156
- header: y(() => [
157
- a(e).compact && !o.value ? (s(), p("div", he, [
158
- c.item.icon ? (s(), g(k, {
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: c.item.icon,
177
+ icon: u.item.icon,
161
178
  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)
179
+ }, null, 8, ["icon"])) : p("", !0),
180
+ fe(" " + w(z.value), 1)
181
+ ])) : p("", !0)
165
182
  ]),
166
- trigger: y(({ isOpen: l }) => [
167
- C(q, {
183
+ trigger: x(({ isOpen: r }) => [
184
+ C(J, {
168
185
  content: z.value,
169
- placement: o.value ? "bottom" : "right",
186
+ placement: a.value ? "bottom" : "right",
170
187
  className: "sidebar-menu-tooltip",
171
- disabled: !a(e).showTooltip || !a(e).compact && !o.value || l,
188
+ disabled: !o(e).showTooltip || !o(e).compact && !a.value || r,
172
189
  class: "w-full block"
173
190
  }, {
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,
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": l,
181
- onClick: P
197
+ "aria-expanded": r,
198
+ onClick: D
182
199
  }), {
183
- default: y(() => [
184
- v("div", {
200
+ default: x(() => [
201
+ b("div", {
185
202
  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"
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
- c.item.icon ? (s(), g(k, {
206
+ u.item.icon ? (c(), g(k, {
190
207
  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" : ""]]),
193
- 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
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"])) : f("", !0),
198
- v("span", {
214
+ }, null, 8, ["icon", "class", "style"])) : p("", !0),
215
+ b("span", {
199
216
  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
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
- c.item.badge && (!a(e).compact || !h.value || o.value) ? (s(), p("span", {
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
- c.item.badgeClass || "bg-muted text-muted-foreground",
209
- { "md:hidden": a(e).compact && !o.value }
226
+ u.item.badgeClass || "bg-muted text-muted-foreground",
227
+ { "md:hidden": o(e).compact && !a.value }
210
228
  ]])
211
- }, w(c.item.badge), 3)) : f("", !0)
229
+ }, w(u.item.badge), 3)) : p("", !0)
212
230
  ], 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 }])
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: o.value ? "lucide:chevron-down" : "lucide:chevron-right",
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: y(({ option: l }) => [
230
- v("div", be, [
231
- l.icon ? (s(), g(k, {
247
+ item: x(({ option: r }) => [
248
+ b("div", Ce, [
249
+ r.icon ? (c(), g(k, {
232
250
  key: 0,
233
- icon: l.icon,
251
+ icon: r.icon,
234
252
  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", {
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", l.data?.badgeClass || "bg-muted text-muted-foreground"])
241
- }, w(l.data.badge), 3)) : f("", !0)
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"])) : (s(), p(F, { key: 1 }, [
246
- C(q, {
263
+ }, 8, ["position", "offset", "width", "maxHeight", "options"])) : (c(), v(G, { key: 1 }, [
264
+ C(J, {
247
265
  content: z.value,
248
- placement: o.value ? "bottom" : "right",
249
- disabled: !a(e).showTooltip || !a(e).compact && !o.value,
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: 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
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: y(() => [
261
- v("div", {
278
+ default: x(() => [
279
+ b("div", {
262
280
  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"
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
- c.item.icon ? (s(), g(k, {
284
+ u.item.icon ? (c(), g(k, {
267
285
  key: 0,
268
- icon: c.item.icon,
269
- class: d(["shrink-0 transition-colors opacity-90 group-hover:opacity-100", [L.value ? "opacity-100" : ""]]),
270
- 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
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"])) : f("", !0),
275
- v("span", {
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
- [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
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
- c.item.badge && (!a(e).compact || !h.value || o.value) ? (s(), p("span", {
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
- c.item.badgeClass || "bg-muted text-muted-foreground",
286
- { "md:hidden": a(e).compact && !o.value }
304
+ u.item.badgeClass || "bg-muted text-muted-foreground",
305
+ { "md:hidden": o(e).compact && !a.value }
287
306
  ]])
288
- }, w(c.item.badge), 3)) : f("", !0)
307
+ }, w(u.item.badge), 3)) : p("", !0)
289
308
  ], 2),
290
- T.value ? (s(), p("div", {
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": a(e).compact && !o.value }]),
295
- onClick: A,
296
- onKeydown: se(ce(A, ["prevent"]), ["enter", "space"])
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": j.value && !o.value }])
319
+ class: d(["h-3 w-3 transition-transform duration-200", { "rotate-180": L.value && !a.value }])
301
320
  }, null, 8, ["class"])
302
- ], 42, ye)) : f("", !0),
303
- Q.value ? (s(), p("div", {
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": a(e).compact && !o.value }])
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)) : f("", !0)
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(ue, {
337
+ C(he, {
319
338
  name: "sidebar-slide",
320
- onBeforeEnter: Z,
321
- onEnter: ee,
322
- onAfterEnter: te,
323
- onBeforeLeave: ne,
324
- onLeave: ie
339
+ onBeforeEnter: ne,
340
+ onEnter: ie,
341
+ onAfterEnter: oe,
342
+ onBeforeLeave: ae,
343
+ onLeave: le
325
344
  }, {
326
- default: y(() => [
327
- m.value && j.value && !o.value ? (s(), p("div", xe, [
328
- a(e).variant === "default" ? (s(), p("div", {
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: M({
332
- left: U.value,
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)) : 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
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
- ])) : f("", !0)
365
+ ])) : p("", !0)
347
366
  ]),
348
367
  _: 1
349
368
  })
@@ -353,5 +372,5 @@ const he = {
353
372
  }
354
373
  });
355
374
  export {
356
- je as default
375
+ Ae as default
357
376
  };