vlite3 1.2.4 → 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.
@@ -1,11 +1,11 @@
1
- import { defineComponent as D, ref as L, inject as V, computed as f, markRaw as j, watch as h, onMounted as K, onUnmounted as M, openBlock as l, createElementBlock as d, Fragment as F, createElementVNode as y, mergeProps as w, withModifiers as R, renderSlot as c, createCommentVNode as a, createBlock as g, Teleport as U, createVNode as $, Transition as k, withCtx as x, normalizeClass as m, toDisplayString as B, resolveDynamicComponent as q } from "vue";
1
+ import { defineComponent as E, ref as N, inject as P, computed as f, markRaw as D, watch as h, onMounted as L, onUnmounted as V, openBlock as l, createElementBlock as i, Fragment as j, createElementVNode as y, mergeProps as w, withModifiers as K, renderSlot as c, createCommentVNode as a, createBlock as g, Teleport as M, normalizeClass as m, createVNode as F, Transition as R, withCtx as U, toDisplayString as $, resolveDynamicComponent as q } from "vue";
2
2
  import G from "./Button.vue.js";
3
3
  import { useKeyStroke as H } from "../composables/useKeyStroke.js";
4
- import { $t as T } from "../utils/i18n.js";
4
+ import { $t as k } from "../utils/i18n.js";
5
5
  const J = ["data-testid"], Q = ["data-testid"], W = { class: "text-lg font-bold text-foreground" }, X = {
6
6
  key: 0,
7
7
  class: "mt-1 text-sm text-muted-foreground"
8
- }, te = /* @__PURE__ */ D({
8
+ }, te = /* @__PURE__ */ E({
9
9
  inheritAttrs: !1,
10
10
  __name: "SidePanel",
11
11
  props: {
@@ -29,91 +29,79 @@ const J = ["data-testid"], Q = ["data-testid"], W = { class: "text-lg font-bold
29
29
  bodyProps: {}
30
30
  },
31
31
  emits: ["close", "update:show", "onOpen", "onAfterOpen", "onAfterClose"],
32
- setup(o, { emit: z }) {
33
- const t = o, v = z, s = L(t.show);
32
+ setup(o, { emit: x }) {
33
+ const t = o, v = x, s = N(t.show);
34
34
  let u = null;
35
- const i = V("dropdown-context", null), C = f(() => t.body ? j(t.body) : void 0);
35
+ const r = P("dropdown-context", null), b = f(() => t.body ? D(t.body) : void 0);
36
36
  h(
37
37
  () => t.show,
38
38
  (e) => {
39
- s.value = e, e && (v("onOpen"), i?.close());
39
+ s.value = e, e && (v("onOpen"), r?.close());
40
40
  }
41
41
  );
42
- const A = () => {
43
- s.value = !0, i?.close();
42
+ const B = () => {
43
+ s.value = !0, r?.close();
44
44
  }, n = () => {
45
45
  s.value = !1, v("update:show", !1), v("close");
46
- }, O = () => {
46
+ }, T = () => {
47
47
  t.closeOutside && n();
48
- }, { onKeyStroke: S } = H();
49
- S("Escape", n), h(s, (e) => {
50
- u && clearTimeout(u), e ? (i?.onChildToggle?.(!0), document.body.style.overflow = "hidden") : (document.body.style.overflow = "", u = setTimeout(() => {
51
- i?.onChildToggle?.(!1);
52
- }, 300));
53
- }), K(() => {
54
- s.value && i?.onChildToggle?.(!0);
55
- }), M(() => {
56
- u && clearTimeout(u), s.value && i?.onChildToggle?.(!1), document.body.style.overflow = "";
48
+ }, { onKeyStroke: z } = H();
49
+ z("Escape", n), h(s, (e) => {
50
+ u && clearTimeout(u), e ? (r?.onChildToggle?.(!0), document.body.style.overflow = "hidden") : (document.body.style.overflow = "", u = setTimeout(() => {
51
+ r?.onChildToggle?.(!1);
52
+ }, 150));
53
+ }), L(() => {
54
+ s.value && r?.onChildToggle?.(!0);
55
+ }), V(() => {
56
+ u && clearTimeout(u), s.value && r?.onChildToggle?.(!1), document.body.style.overflow = "";
57
57
  });
58
- const I = {
58
+ const A = {
59
59
  sm: "max-w-sm",
60
60
  md: "max-w-md",
61
61
  lg: "max-w-lg",
62
62
  xl: "max-w-xl",
63
63
  full: "max-w-full"
64
- }, E = f(() => t.position === "left" ? "left-0" : "right-0"), N = f(() => t.position === "left" ? "slide-left" : "slide-right"), r = f(() => t.titleI18n ? T(t.titleI18n) : t.title), b = f(
65
- () => t.descriptionI18n ? T(t.descriptionI18n) : t.description
64
+ }, O = f(() => t.position === "left" ? "left-0 rounded-r-lg" : "right-0 rounded-l-md"), S = f(() => t.position === "left" ? "slide-left" : "slide-right"), d = f(() => t.titleI18n ? k(t.titleI18n) : t.title), C = f(
65
+ () => t.descriptionI18n ? k(t.descriptionI18n) : t.description
66
66
  );
67
- return (e, p) => (l(), d(F, null, [
67
+ return (e, p) => (l(), i(j, null, [
68
68
  y("span", w({
69
- onClick: R(A, ["stop"]),
69
+ onClick: K(B, ["stop"]),
70
70
  class: `${o.triggerClass}`
71
71
  }, e.$attrs, {
72
- "data-testid": e.$attrs["data-testid"] ? `${e.$attrs["data-testid"]}-trigger` : r.value ? `sidepanel-trigger-${r.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "sidepanel-trigger"
72
+ "data-testid": e.$attrs["data-testid"] ? `${e.$attrs["data-testid"]}-trigger` : d.value ? `sidepanel-trigger-${d.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "sidepanel-trigger"
73
73
  }), [
74
74
  c(e.$slots, "trigger", {}, () => [
75
75
  o.body ? c(e.$slots, "default", { key: 0 }, void 0, !0) : a("", !0)
76
76
  ], !0)
77
77
  ], 16, J),
78
- (l(), g(U, { to: "body" }, [
79
- $(k, {
80
- "enter-active-class": "transition-opacity duration-300 ease-out",
81
- "enter-from-class": "opacity-0",
82
- "enter-to-class": "opacity-100",
83
- "leave-active-class": "transition-opacity duration-200 ease-in",
84
- "leave-from-class": "opacity-100",
85
- "leave-to-class": "opacity-0"
78
+ (l(), g(M, { to: "body" }, [
79
+ s.value ? (l(), i("div", {
80
+ key: 0,
81
+ class: m(["fixed inset-0 z-50 v-sidepanel-overlay", o.overlayClass]),
82
+ onClick: T
83
+ }, null, 2)) : a("", !0),
84
+ F(R, {
85
+ name: S.value,
86
+ onAfterEnter: p[0] || (p[0] = (I) => e.$emit("onAfterOpen")),
87
+ onAfterLeave: p[1] || (p[1] = (I) => e.$emit("onAfterClose"))
86
88
  }, {
87
- default: x(() => [
88
- s.value ? (l(), d("div", {
89
- key: 0,
90
- class: m(["fixed inset-0 z-50 v-sidepanel-overlay", o.overlayClass]),
91
- onClick: O
92
- }, null, 2)) : a("", !0)
93
- ]),
94
- _: 1
95
- }),
96
- $(k, {
97
- name: N.value,
98
- onAfterEnter: p[0] || (p[0] = (P) => e.$emit("onAfterOpen")),
99
- onAfterLeave: p[1] || (p[1] = (P) => e.$emit("onAfterClose"))
100
- }, {
101
- default: x(() => [
102
- s.value ? (l(), d("div", {
89
+ default: U(() => [
90
+ s.value ? (l(), i("div", {
103
91
  key: 0,
104
92
  role: "dialog",
105
93
  "aria-modal": "true",
106
- class: m(["sidepanel-body fixed inset-y-0 z-50 flex flex-col bg-body shadow-sm border transition-transform duration-300 ease-in-out w-full", [I[o.size], E.value, t.class]]),
107
- "data-testid": e.$attrs["data-testid"] || (r.value ? `sidepanel-${r.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "sidepanel")
94
+ class: m(["sidepanel-body fixed inset-y-0 z-50 flex flex-col bg-body shadow-sm border border-border/80 w-full", [A[o.size], O.value, t.class]]),
95
+ "data-testid": e.$attrs["data-testid"] || (d.value ? `sidepanel-${d.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "sidepanel")
108
96
  }, [
109
- r.value || e.$slots.header ? (l(), d("div", {
97
+ d.value || e.$slots.header ? (l(), i("div", {
110
98
  key: 0,
111
99
  class: m([o.headerClass, "flex-none flex items-center justify-between px-5 py-2 border-b border-border"])
112
100
  }, [
113
101
  c(e.$slots, "header", {}, () => [
114
102
  y("div", null, [
115
- y("h3", W, B(r.value), 1),
116
- b.value ? (l(), d("p", X, B(b.value), 1)) : a("", !0)
103
+ y("h3", W, $(d.value), 1),
104
+ C.value ? (l(), i("p", X, $(C.value), 1)) : a("", !0)
117
105
  ])
118
106
  ], !0),
119
107
  o.hideCloseButton ? a("", !0) : (l(), g(G, {
@@ -130,12 +118,12 @@ const J = ["data-testid"], Q = ["data-testid"], W = { class: "text-lg font-bold
130
118
  y("div", {
131
119
  class: m(["flex-1 overflow-y-auto px-6 py-4 scrollbar-thin scrollbar-stable", o.bodyClass])
132
120
  }, [
133
- C.value ? (l(), g(q(C.value), w({ key: 0 }, { ...o.bodyProps, ...e.$attrs }, { close: n }), null, 16)) : c(e.$slots, "default", {
121
+ b.value ? (l(), g(q(b.value), w({ key: 0 }, { ...o.bodyProps, ...e.$attrs }, { close: n }), null, 16)) : c(e.$slots, "default", {
134
122
  key: 1,
135
123
  close: n
136
124
  }, void 0, !0)
137
125
  ], 2),
138
- e.$slots.footer ? (l(), d("div", {
126
+ e.$slots.footer ? (l(), i("div", {
139
127
  key: 1,
140
128
  class: m(["flex-none px-6 py-3 border-t border-border", o.footerClass])
141
129
  }, [
@@ -1,18 +1,18 @@
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";
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 we from "../Dropdown/Dropdown.vue.js";
6
- import { $t as U } 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 ke = {
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
- }, 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 = {
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
- }, Te = { class: "pt-1 space-y-0.5" }, De = /* @__PURE__ */ re({
15
+ }, $e = { class: "pt-1 space-y-0.5" }, Ae = /* @__PURE__ */ re({
16
16
  __name: "SidebarMenuItem",
17
17
  props: {
18
18
  item: {},
@@ -21,12 +21,12 @@ const ke = {
21
21
  itemClass: {}
22
22
  },
23
23
  setup(u) {
24
- const t = u, e = ce("sidebar-menu-ctx"), I = ge(), X = xe();
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
27
  const E = se(null), a = l(
28
28
  () => e.currentOrientation === "horizontal" && t.depth === 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) => {
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
30
  const r = i.id || (typeof i.to == "string" ? i.to : null) || i.label;
31
31
  if (n && r === n) return !0;
32
32
  if (i.to) {
@@ -34,28 +34,24 @@ const ke = {
34
34
  if (m) {
35
35
  if (s === m) return !0;
36
36
  if (m !== "/" && m.length > 1 && s.startsWith(m)) {
37
- const j = s[m.length];
38
- if (!j || j === "/" || j === "?") return !0;
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((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" });
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
48
  };
49
49
  ue(() => {
50
- N.value && de(() => {
51
- D(!1);
50
+ A.value && de(() => {
51
+ Y(!1);
52
52
  });
53
- }), me(N, (i) => {
54
- i && setTimeout(() => {
55
- D(!0);
56
- }, 250);
57
53
  });
58
- const H = (i) => {
54
+ const D = (i) => {
59
55
  if (!t.item.disabled) {
60
56
  if (S.value) {
61
57
  t.item.action && t.item.action(t.item), e.drillInto(t.item);
@@ -77,7 +73,7 @@ const ke = {
77
73
  }
78
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);
79
75
  }
80
- }, B = (i) => {
76
+ }, H = (i) => {
81
77
  if (i.stopPropagation(), e.renderNestedTabs && t.depth === 0) {
82
78
  if (t.item.action && t.item.action(t.item), t.item.to)
83
79
  I.push(t.item.to).catch(() => {
@@ -93,38 +89,38 @@ const ke = {
93
89
  return;
94
90
  }
95
91
  $.value || e.toggleExpand(y.value);
96
- }, R = l(() => e.indentSize || 12), Z = l(() => {
92
+ }, B = l(() => e.indentSize || 12), Z = l(() => {
97
93
  const n = 8 + parseInt(e.iconSize || "16", 10) / 2;
98
- return `${t.depth * R.value + n}px`;
99
- }), V = l(() => {
94
+ return `${t.depth * B.value + n}px`;
95
+ }), R = l(() => {
100
96
  if (a.value) return {};
101
97
  if (e.compact)
102
98
  return { width: "100%" };
103
99
  if (t.depth > 0) {
104
- const n = 8 + parseInt(e.iconSize || "16", 10) / 2, s = (t.depth - 1) * R.value + n + 8;
100
+ const n = 8 + parseInt(e.iconSize || "16", 10) / 2, s = (t.depth - 1) * B.value + n + 8;
105
101
  return {
106
102
  marginLeft: `${s}px`,
107
103
  width: `calc(100% - ${s}px)`
108
104
  };
109
105
  }
110
106
  return {};
111
- }), K = l(() => {
107
+ }), V = l(() => {
112
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}`;
113
109
  let s = e.compact ? e.compactItemPadding : e.itemPadding;
114
110
  !e.compact && t.depth > 0 && (s = s.replace(/py-[\d\.]+/, "py-1.5"));
115
111
  const r = e.compact ? `justify-center ${s}` : `justify-between ${s}`;
116
112
  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 || ""}`;
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 || ""}`;
118
114
  }), 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,
115
+ () => t.item.labelI18n ? Q(t.item.labelI18n) : t.item.label
116
+ ), K = (i) => ({
117
+ label: i.labelI18n ? Q(i.labelI18n) : i.label,
122
118
  value: i.id || i.label,
123
119
  icon: i.icon,
124
120
  disabled: i.disabled,
125
- children: i.children ? i.children.map(O) : void 0,
121
+ children: i.children ? i.children.map(K) : void 0,
126
122
  data: i
127
- }), ee = l(() => t.item.children ? t.item.children.map(O) : []), te = (i) => {
123
+ }), ee = l(() => t.item.children ? t.item.children.map(K) : []), te = (i) => {
128
124
  const n = i.data;
129
125
  if (n) {
130
126
  n.action && n.action(n);
@@ -147,13 +143,13 @@ const ke = {
147
143
  }, le = (i) => {
148
144
  const n = i;
149
145
  n.style.height = "0", n.style.opacity = "0";
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 ? {
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 ? {
151
147
  href: t.item.href,
152
148
  target: "_blank",
153
149
  rel: "noopener noreferrer"
154
150
  } : { type: "button" });
155
151
  return (i, n) => {
156
- const s = fe("SidebarMenuItem", !0);
152
+ const s = me("SidebarMenuItem", !0);
157
153
  return c(), v("div", {
158
154
  ref_key: "itemRef",
159
155
  ref: E,
@@ -163,7 +159,7 @@ const ke = {
163
159
  o(e).compact && "mb-px"
164
160
  ])
165
161
  }, [
166
- $.value ? (c(), g(o(we), {
162
+ $.value ? (c(), g(o(xe), {
167
163
  key: 0,
168
164
  position: a.value ? "bottom-start" : "right-start",
169
165
  offset: u.menuOffset,
@@ -175,17 +171,17 @@ const ke = {
175
171
  onOnSelect: te
176
172
  }, {
177
173
  header: x(() => [
178
- o(e).compact && !a.value ? (c(), v("div", ke, [
174
+ o(e).compact && !a.value ? (c(), v("div", we, [
179
175
  u.item.icon ? (c(), g(k, {
180
176
  key: 0,
181
177
  icon: u.item.icon,
182
178
  class: "shrink-0 transition-colors opacity-90 group-hover:opacity-100"
183
179
  }, null, 8, ["icon"])) : p("", !0),
184
- pe(" " + w(z.value), 1)
180
+ fe(" " + w(z.value), 1)
185
181
  ])) : p("", !0)
186
182
  ]),
187
183
  trigger: x(({ isOpen: r }) => [
188
- C(Q, {
184
+ C(J, {
189
185
  content: z.value,
190
186
  placement: a.value ? "bottom" : "right",
191
187
  className: "sidebar-menu-tooltip",
@@ -193,13 +189,13 @@ const ke = {
193
189
  class: "w-full block"
194
190
  }, {
195
191
  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,
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,
200
196
  "aria-haspopup": !0,
201
197
  "aria-expanded": r,
202
- onClick: H
198
+ onClick: D
203
199
  }), {
204
200
  default: x(() => [
205
201
  b("div", {
@@ -210,8 +206,8 @@ const ke = {
210
206
  u.item.icon ? (c(), g(k, {
211
207
  key: 0,
212
208
  icon: u.item.icon,
213
- class: d(["shrink-0 transition-colors opacity-90 group-hover:opacity-100", [T.value || r ? "opacity-100" : ""]]),
214
- style: M({
209
+ class: d(["shrink-0 transition-colors opacity-90 group-hover:opacity-100", [M.value || r ? "opacity-100" : ""]]),
210
+ style: T({
215
211
  width: o(e).compact && !a.value ? o(e).compactIconSize : o(e).iconSize,
216
212
  height: o(e).compact && !a.value ? o(e).compactIconSize : o(e).iconSize
217
213
  })
@@ -249,14 +245,14 @@ const ke = {
249
245
  }, 1032, ["content", "placement", "disabled"])
250
246
  ]),
251
247
  item: x(({ option: r }) => [
252
- b("div", Ie, [
248
+ b("div", Ce, [
253
249
  r.icon ? (c(), g(k, {
254
250
  key: 0,
255
251
  icon: r.icon,
256
252
  class: "shrink-0 opacity-90",
257
- style: M({ width: o(e).iconSize, height: o(e).iconSize })
253
+ style: T({ width: o(e).iconSize, height: o(e).iconSize })
258
254
  }, null, 8, ["icon", "style"])) : p("", !0),
259
- b("span", Se, w(r.label), 1),
255
+ b("span", Ie, w(r.label), 1),
260
256
  r.data?.badge ? (c(), v("span", {
261
257
  key: 1,
262
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"])
@@ -264,20 +260,20 @@ const ke = {
264
260
  ])
265
261
  ]),
266
262
  _: 1
267
- }, 8, ["position", "offset", "width", "maxHeight", "options"])) : (c(), v(J, { key: 1 }, [
268
- C(Q, {
263
+ }, 8, ["position", "offset", "width", "maxHeight", "options"])) : (c(), v(G, { key: 1 }, [
264
+ C(J, {
269
265
  content: z.value,
270
266
  placement: a.value ? "bottom" : "right",
271
267
  disabled: !o(e).showTooltip || !o(e).compact && !a.value,
272
268
  class: "w-full block"
273
269
  }, {
274
270
  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
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
281
277
  }), {
282
278
  default: x(() => [
283
279
  b("div", {
@@ -288,8 +284,8 @@ const ke = {
288
284
  u.item.icon ? (c(), g(k, {
289
285
  key: 0,
290
286
  icon: u.item.icon,
291
- class: d(["shrink-0 transition-colors opacity-90 group-hover:opacity-100", [T.value ? "opacity-100" : ""]]),
292
- style: M({
287
+ class: d(["shrink-0 transition-colors opacity-90 group-hover:opacity-100", [M.value ? "opacity-100" : ""]]),
288
+ style: T({
293
289
  width: o(e).compact && !a.value ? o(e).compactIconSize : o(e).iconSize,
294
290
  height: o(e).compact && !a.value ? o(e).compactIconSize : o(e).iconSize
295
291
  })
@@ -310,20 +306,20 @@ const ke = {
310
306
  ]])
311
307
  }, w(u.item.badge), 3)) : p("", !0)
312
308
  ], 2),
313
- P.value ? (c(), v("div", {
309
+ _.value ? (c(), v("div", {
314
310
  key: 0,
315
311
  role: "button",
316
312
  tabindex: "0",
317
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 }]),
318
- onClick: B,
319
- onKeydown: ve(he(B, ["prevent"]), ["enter", "space"])
314
+ onClick: H,
315
+ onKeydown: pe(ve(H, ["prevent"]), ["enter", "space"])
320
316
  }, [
321
317
  C(k, {
322
318
  icon: "lucide:chevron-down",
323
319
  class: d(["h-3 w-3 transition-transform duration-200", { "rotate-180": L.value && !a.value }])
324
320
  }, null, 8, ["class"])
325
- ], 42, ze)) : p("", !0),
326
- Y.value ? (c(), v("div", {
321
+ ], 42, Se)) : p("", !0),
322
+ X.value ? (c(), v("div", {
327
323
  key: 1,
328
324
  class: d(["ml-1.5 flex shrink-0 items-center justify-center text-muted-foreground", { "md:hidden": o(e).compact && !a.value }])
329
325
  }, [
@@ -338,7 +334,7 @@ const ke = {
338
334
  ]),
339
335
  _: 1
340
336
  }, 8, ["content", "placement", "disabled"]),
341
- C(be, {
337
+ C(he, {
342
338
  name: "sidebar-slide",
343
339
  onBeforeEnter: ne,
344
340
  onEnter: ie,
@@ -347,11 +343,11 @@ const ke = {
347
343
  onLeave: le
348
344
  }, {
349
345
  default: x(() => [
350
- f.value && L.value && !a.value ? (c(), v("div", $e, [
346
+ f.value && L.value && !a.value ? (c(), v("div", ze, [
351
347
  o(e).variant === "default" ? (c(), v("div", {
352
348
  key: 0,
353
349
  class: "sidebar-tree-line absolute rounded-full z-[1]",
354
- style: M({
350
+ style: T({
355
351
  left: Z.value,
356
352
  top: "4px",
357
353
  bottom: "10px",
@@ -359,8 +355,8 @@ const ke = {
359
355
  backgroundColor: "var(--color-border)"
360
356
  })
361
357
  }, null, 4)) : p("", !0),
362
- b("div", Te, [
363
- (c(!0), v(J, null, ye(u.item.children, (r) => (c(), g(s, {
358
+ b("div", $e, [
359
+ (c(!0), v(G, null, be(u.item.children, (r) => (c(), g(s, {
364
360
  key: r.id || r.label,
365
361
  item: r,
366
362
  depth: u.depth + 1
@@ -376,5 +372,5 @@ const ke = {
376
372
  }
377
373
  });
378
374
  export {
379
- De as default
375
+ Ae as default
380
376
  };
@@ -11,28 +11,28 @@ const w = /* @__PURE__ */ m({
11
11
  variant: {}
12
12
  },
13
13
  setup(t) {
14
- const { theme: i, toggleTheme: r } = f(), a = d(() => {
15
- const n = i.value === "light", s = "vlite.themeToggle.switchToDark", l = "vlite.themeToggle.switchToLight";
14
+ const { theme: i, toggleTheme: s } = f(), a = d(() => {
15
+ const n = i.value === "light", l = "vlite.themeToggle.switchToDark", r = "vlite.themeToggle.switchToLight";
16
16
  if (n) {
17
- const e = c(s);
18
- return e !== s ? e : "Switch to dark mode";
19
- } else {
20
17
  const e = c(l);
21
- return e !== l ? e : "Switch to light mode";
18
+ return e !== l ? e : "Switch to dark mode";
19
+ } else {
20
+ const e = c(r);
21
+ return e !== r ? e : "Switch to light mode";
22
22
  }
23
23
  });
24
- return (n, s) => u(n.$slots, "default", {
25
- toggleTheme: o(r),
24
+ return (n, l) => u(n.$slots, "default", {
25
+ toggleTheme: o(s),
26
26
  theme: o(i)
27
27
  }, () => [
28
28
  h(T, {
29
29
  icon: o(i) === "light" ? "lucide:sun" : "lucide:moon",
30
30
  variant: t.variant || "secondary",
31
- rounded: t.rounded || "md",
31
+ rounded: t.rounded || "full",
32
32
  size: t.size,
33
33
  class: g(t.class),
34
34
  title: a.value,
35
- onClick: o(r)
35
+ onClick: o(s)
36
36
  }, null, 8, ["icon", "variant", "rounded", "size", "class", "title", "onClick"])
37
37
  ]);
38
38
  }
@@ -4,6 +4,7 @@ export { default as Avatar } from './Avatar.vue';
4
4
  export { AvatarUploader } from './AvatarUploader';
5
5
  export { default as Badge } from './Badge.vue';
6
6
  export { Barcode } from './Barcode';
7
+ export { default as Beacon } from './Beacon.vue';
7
8
  export { Breadcrumb, BreadcrumbItem } from './Breadcrumb';
8
9
  export { default as Button } from './Button.vue';
9
10
  export { default as BackButton } from './BackButton.vue';
@@ -43,6 +44,7 @@ export { default as NumberInput } from './NumberInput.vue';
43
44
  export { OTPInput } from './OTPInput';
44
45
  export { Pagination } from './Pagination';
45
46
  export { PermissionMatrix, PermissionEditor } from './PermissionMatrix';
47
+ export { default as Persona } from './Persona.vue';
46
48
  export { PricingPlan } from './PricingPlan';
47
49
  export { ProgressBar } from './ProgressBar';
48
50
  export { QRCode } from './QRCode';
package/index.d.ts CHANGED
@@ -68,7 +68,7 @@ export { default as Modal } from './components/Modal.vue';
68
68
  export { default as Avatar } from './components/Avatar.vue';
69
69
  export { default as Button } from './components/Button.vue';
70
70
  export { default as BackButton } from './components/BackButton.vue';
71
- export { default as CopyButton } from './components/CopyButton.vue';
71
+ export { default as Clipboard } from './components/Clipboard.vue';
72
72
  export { default as Slider } from './components/Slider.vue';
73
73
  export { default as Switch } from './components/Switch.vue';
74
74
  export { default as Tooltip } from './components/Tooltip.vue';