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.
@@ -1,5 +1,5 @@
1
- import o from "./ColorIro.vue2.js";
2
- /* empty css */
1
+ import o from "./ColorIro.vue.js";
2
+ /* empty css */
3
3
  export {
4
4
  o as default
5
5
  };
@@ -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.vue2.js";
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,
@@ -11,7 +11,7 @@ import "v-datepicker-lite";
11
11
  import "v-datepicker-lite/style.css";
12
12
  import "@jaames/iro";
13
13
  import "@vueuse/core";
14
- /* empty css */
14
+ /* empty css */
15
15
  import "iconify-icon-picker";
16
16
  import "iconify-icon-picker/style.css";
17
17
  /* empty css */
@@ -1,17 +1,17 @@
1
- import { defineComponent as X, inject as Y, computed as s, resolveComponent as Z, openBlock as r, createElementBlock as f, normalizeClass as u, createBlock as h, unref as n, withCtx as b, createElementVNode as v, normalizeStyle as M, createCommentVNode as d, toDisplayString as g, createVNode as S, resolveDynamicComponent as B, mergeProps as D, createTextVNode as ee, Fragment as V, withKeys as te, withModifiers as ae, Transition as ne, renderList as ie } from "vue";
2
- import { useRouter as oe } from "vue-router";
3
- import w from "../Icon.vue.js";
4
- import K from "../Tooltip.vue.js";
5
- import le from "../Dropdown/Dropdown.vue.js";
6
- import { $t as O } from "../../utils/i18n.js";
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 re = {
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
- }, ce = { class: "w-full" }, se = { class: "flex items-center w-full gap-2 text-sm" }, ue = { class: "truncate flex-1 font-medium" }, de = ["onKeydown"], me = {
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
- }, fe = { class: "mt-0.5 space-y-0.5" }, we = /* @__PURE__ */ X({
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(c) {
23
- const t = c, e = Y("sidebar-menu-ctx"), k = oe();
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 i = s(
26
+ const o = c(
27
27
  () => e.currentOrientation === "horizontal" && t.depth === 0
28
- ), p = s(() => !!t.item.children?.length), R = s(() => i.value && p.value || e.compact && p.value ? "popover" : t.item.renderMode || e.renderMode || "tree"), I = s(() => e.renderNestedTabs && t.depth === 0 ? !1 : R.value === "popover" && p.value), y = s(() => t.item.id ? t.item.id : t.item.to && typeof t.item.to == "string" ? t.item.to : t.item.label), E = s(() => I.value || e.renderNestedTabs && t.depth === 0 ? !1 : e.expandedItems.includes(y.value)), j = s(() => !(!p.value || e.renderNestedTabs && t.depth === 0)), z = s(() => e.activeItem === y.value), L = (o) => {
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
- k.push(t.item.to).catch(() => {
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 (p.value) {
37
- const a = t.item.children?.[0];
38
- a && (a.to ? k.push(a.to).catch(() => {
39
- }) : a.href && window.open(a.href, "_blank"));
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(y.value);
60
+ e.setActive(x.value);
42
61
  return;
43
62
  }
44
- p.value && !t.item.to && !t.item.href && (I.value || e.toggleExpand(y.value)), t.item.action && t.item.action(t.item), (!p.value || t.item.to) && e.setActive(y.value);
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
- }, N = (o) => {
47
- if (o.stopPropagation(), e.renderNestedTabs && t.depth === 0) {
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
- k.push(t.item.to).catch(() => {
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 (p.value) {
54
- const a = t.item.children?.[0];
55
- a && (a.to ? k.push(a.to).catch(() => {
56
- }) : a.href && window.open(a.href, "_blank"));
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(y.value);
77
+ e.setActive(x.value);
59
78
  return;
60
79
  }
61
- I.value || e.toggleExpand(y.value);
62
- }, $ = s(() => e.indentSize || 12), T = s(() => i.value ? {} : e.compact ? { width: "100%" } : {
63
- marginLeft: `${t.depth * $.value}px`,
64
- width: `calc(100% - ${t.depth * $.value}px)`
65
- }), _ = s(() => {
66
- 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"} ${t?.itemClass || ""} ${e.labelClass}`, x = e.compact ? `justify-center ${e.compactItemPadding}` : `justify-between ${e.itemPadding}`;
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 z.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"), `${a} ${x} ${l} ${t.item.class || ""}`;
69
- }), m = s(() => e.compact && e.showCompactLabels), C = s(
70
- () => t.item.labelI18n ? O(t.item.labelI18n) : t.item.label
71
- ), A = (o) => ({
72
- label: o.labelI18n ? O(o.labelI18n) : o.label,
73
- value: o.id || o.label,
74
- icon: o.icon,
75
- disabled: o.disabled,
76
- children: o.children ? o.children.map(A) : void 0,
77
- data: o
78
- }), F = s(() => t.item.children ? t.item.children.map(A) : []), W = (o) => {
79
- const a = o.data;
80
- if (a) {
81
- a.action && a.action(a);
82
- const x = a.id || a.label || (typeof a.to == "string" ? a.to : "");
83
- x && e.setActive(x), a.to ? k.push(a.to).catch(() => {
84
- }) : a.href && window.open(a.href, "_blank");
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
- }, q = (o) => {
87
- const a = o;
88
- a.style.height = "0", a.style.opacity = "0";
89
- }, G = (o) => {
90
- const a = o;
91
- a.style.height = a.scrollHeight + "px", a.style.opacity = "1";
92
- }, J = (o) => {
93
- const a = o;
94
- a.style.height = "auto", a.style.overflow = "visible";
95
- }, Q = (o) => {
96
- const a = o;
97
- a.style.height = a.scrollHeight + "px", a.style.overflow = "hidden", a.style.opacity = "1";
98
- }, U = (o) => {
99
- const a = o;
100
- a.style.height = "0", a.style.opacity = "0";
101
- }, H = s(() => t.item.to ? "router-link" : t.item.href ? "a" : "button"), P = s(() => t.item.to ? { to: t.item.to } : t.item.href ? {
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 (o, a) => {
107
- const x = Z("SidebarMenuItem", !0);
108
- return r(), f("div", {
109
- class: u(["relative sidebar-manu-item", i.value ? "w-auto" : "w-full"])
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
- I.value ? (r(), h(n(le), {
130
+ z.value ? (r(), g(i(de), {
112
131
  key: 0,
113
- position: i.value ? "bottom-start" : "right-start",
114
- offset: c.menuOffset,
132
+ position: o.value ? "bottom-start" : "right-start",
133
+ offset: s.menuOffset,
115
134
  class: "w-full block",
116
135
  searchable: !1,
117
- width: n(e).nestedMenuWidth,
118
- maxHeight: n(e).nestedMenuMaxHeight,
119
- options: F.value,
120
- onOnSelect: W
136
+ width: i(e).nestedMenuWidth,
137
+ maxHeight: i(e).nestedMenuMaxHeight,
138
+ options: J.value,
139
+ onOnSelect: Q
121
140
  }, {
122
- header: b(() => [
123
- n(e).compact && !i.value ? (r(), f("div", re, [
124
- c.item.icon ? (r(), h(w, {
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: c.item.icon,
145
+ icon: s.item.icon,
127
146
  class: "shrink-0 transition-colors opacity-80 group-hover:opacity-100"
128
- }, null, 8, ["icon"])) : d("", !0),
129
- ee(" " + g(C.value), 1)
130
- ])) : d("", !0)
147
+ }, null, 8, ["icon"])) : m("", !0),
148
+ ie(" " + w(S.value), 1)
149
+ ])) : m("", !0)
131
150
  ]),
132
- trigger: b(({ isOpen: l }) => [
133
- S(K, {
134
- content: C.value,
135
- placement: i.value ? "bottom" : "right",
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: !n(e).showTooltip || !n(e).compact && !i.value || l,
156
+ disabled: !i(e).showTooltip || !i(e).compact && !o.value || l,
138
157
  class: "w-full block"
139
158
  }, {
140
- default: b(() => [
141
- v("div", ce, [
142
- (r(), h(B(H.value), D(P.value, {
143
- class: [_.value, l ? "bg-muted text-foreground" : ""],
144
- style: T.value,
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: L
166
+ onClick: _
148
167
  }), {
149
- default: b(() => [
168
+ default: y(() => [
150
169
  v("div", {
151
170
  class: u(["min-w-0 flex-1 flex", [
152
- m.value && !i.value ? "flex-col items-center justify-center gap-1" : n(e).compact && !i.value ? "justify-center" : "items-center gap-2.5"
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
- c.item.icon ? (r(), h(w, {
174
+ s.item.icon ? (r(), g(k, {
156
175
  key: 0,
157
- icon: c.item.icon,
158
- class: u(["shrink-0 transition-colors opacity-80 group-hover:opacity-100", [z.value || l ? "opacity-100" : ""]]),
159
- style: M({
160
- width: n(e).compact && !i.value ? n(e).compactIconSize : n(e).iconSize,
161
- height: n(e).compact && !i.value ? n(e).compactIconSize : n(e).iconSize
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"])) : d("", !0),
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
- [n(e).compactLabelClass]: m.value && !i.value,
167
- hidden: n(e).compact && !m.value && !i.value,
168
- "md:hidden": n(e).compact && !m.value && !i.value
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
- }, g(C.value), 3),
171
- c.item.badge && (!n(e).compact || !m.value || i.value) ? (r(), f("span", {
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
- c.item.badgeClass || "bg-muted text-muted-foreground",
175
- { "md:hidden": n(e).compact && !i.value }
193
+ s.item.badgeClass || "bg-muted text-muted-foreground",
194
+ { "md:hidden": i(e).compact && !o.value }
176
195
  ]])
177
- }, g(c.item.badge), 3)) : d("", !0)
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": n(e).compact && !i.value }])
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
- S(w, {
183
- icon: i.value ? "lucide:chevron-down" : "lucide:chevron-right",
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: b(({ option: l }) => [
196
- v("div", se, [
197
- l.icon ? (r(), h(w, {
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: M({ width: n(e).iconSize, height: n(e).iconSize })
202
- }, null, 8, ["icon", "style"])) : d("", !0),
203
- v("span", ue, g(l.label), 1),
204
- l.data?.badge ? (r(), f("span", {
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
- }, g(l.data.badge), 3)) : d("", !0)
226
+ }, w(l.data.badge), 3)) : m("", !0)
208
227
  ])
209
228
  ]),
210
229
  _: 1
211
- }, 8, ["position", "offset", "width", "maxHeight", "options"])) : (r(), f(V, { key: 1 }, [
212
- S(K, {
213
- content: C.value,
214
- placement: i.value ? "bottom" : "right",
215
- disabled: !n(e).showTooltip || !n(e).compact && !i.value,
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: b(() => [
219
- (r(), h(B(H.value), D(P.value, {
220
- class: [_.value, "mb-0.5"],
221
- style: T.value,
222
- "aria-expanded": j.value ? E.value : void 0,
223
- "aria-current": z.value ? "page" : void 0,
224
- onClick: L
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: b(() => [
245
+ default: y(() => [
227
246
  v("div", {
228
247
  class: u(["min-w-0 flex-1 flex py-0.5", [
229
- m.value && !i.value ? "flex-col items-center justify-center gap-1" : n(e).compact && !i.value ? "justify-center" : "items-center gap-2.5"
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
- c.item.icon ? (r(), h(w, {
251
+ s.item.icon ? (r(), g(k, {
233
252
  key: 0,
234
- icon: c.item.icon,
235
- class: u(["shrink-0 transition-colors opacity-80 group-hover:opacity-100", [z.value ? "opacity-100" : ""]]),
236
- style: M({
237
- width: n(e).compact && !i.value ? n(e).compactIconSize : n(e).iconSize,
238
- height: n(e).compact && !i.value ? n(e).compactIconSize : n(e).iconSize
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"])) : d("", !0),
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
- [n(e).compactLabelClass]: m.value && !i.value,
244
- hidden: n(e).compact && !m.value && !i.value,
245
- "md:hidden": n(e).compact && !m.value && !i.value
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
- }, g(C.value), 3),
248
- c.item.badge && (!n(e).compact || !m.value || i.value) ? (r(), f("span", {
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
- c.item.badgeClass || "bg-muted text-muted-foreground",
252
- { "md:hidden": n(e).compact && !i.value }
270
+ s.item.badgeClass || "bg-muted text-muted-foreground",
271
+ { "md:hidden": i(e).compact && !o.value }
253
272
  ]])
254
- }, g(c.item.badge), 3)) : d("", !0)
273
+ }, w(s.item.badge), 3)) : m("", !0)
255
274
  ], 2),
256
- j.value ? (r(), f("div", {
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": n(e).compact && !i.value }]),
261
- onClick: N,
262
- onKeydown: te(ae(N, ["prevent"]), ["enter", "space"])
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
- S(w, {
283
+ I(k, {
265
284
  icon: "lucide:chevron-down",
266
- class: u(["h-3 w-3 transition-transform duration-200", { "rotate-180": E.value && !i.value }])
285
+ class: u(["h-3 w-3 transition-transform duration-200", { "rotate-180": j.value && !o.value }])
267
286
  }, null, 8, ["class"])
268
- ], 42, de)) : d("", !0)
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
- S(ne, {
294
+ I(re, {
276
295
  name: "sidebar-slide",
277
- onBeforeEnter: q,
278
- onEnter: G,
279
- onAfterEnter: J,
280
- onBeforeLeave: Q,
281
- onLeave: U
296
+ onBeforeEnter: U,
297
+ onEnter: X,
298
+ onAfterEnter: Y,
299
+ onBeforeLeave: Z,
300
+ onLeave: ee
282
301
  }, {
283
- default: b(() => [
284
- p.value && E.value && !i.value ? (r(), f("div", me, [
285
- n(e).variant === "default" ? (r(), f("div", {
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: M({
289
- left: `${(c.depth + 1) * $.value - $.value / 2}px`
307
+ style: E({
308
+ left: `${(s.depth + 1) * M.value - M.value / 2}px`
290
309
  })
291
- }, null, 4)) : d("", !0),
292
- v("div", fe, [
293
- (r(!0), f(V, null, ie(c.item.children, (l) => (r(), h(x, {
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: c.depth + 1
315
+ depth: s.depth + 1
297
316
  }, null, 8, ["item", "depth"]))), 128))
298
317
  ])
299
- ])) : d("", !0)
318
+ ])) : m("", !0)
300
319
  ]),
301
320
  _: 1
302
321
  })
@@ -306,5 +325,5 @@ const re = {
306
325
  }
307
326
  });
308
327
  export {
309
- we as default
328
+ ze as default
310
329
  };
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": "0.6.11",
6
+ "version": "0.7.1",
7
7
  "type": "module",
8
8
  "main": "index.js",
9
9
  "module": "index.js",