vlite3 0.1.4 → 0.1.6

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,7 +1,7 @@
1
1
  import o from "./DataTable.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-32de2313"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-896cd72f"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as ee, ref as g, computed as y, watch as p, onMounted as te, openBlock as r, createElementBlock as d, createVNode as C, createSlots as V, withCtx as T, renderSlot as S, createBlock as D, createCommentVNode as I, createElementVNode as n, normalizeClass as B, Fragment as F, renderList as $, normalizeStyle as A, mergeProps as le, toDisplayString as M, createTextVNode as ae, unref as se } from "vue";
1
+ import { defineComponent as ee, ref as g, computed as b, watch as p, onMounted as te, openBlock as r, createElementBlock as d, createVNode as C, createSlots as V, withCtx as T, renderSlot as S, createBlock as D, createCommentVNode as I, createElementVNode as n, normalizeClass as B, Fragment as R, renderList as $, normalizeStyle as A, mergeProps as le, toDisplayString as M, createTextVNode as ae, unref as se } from "vue";
2
2
  import oe from "../Icon.vue.js";
3
3
  import re from "../CheckBox.vue.js";
4
4
  import ne from "../Button.vue.js";
@@ -12,11 +12,11 @@ const fe = { class: "space-y-4" }, he = { class: "overflow-x-auto w-full" }, ve
12
12
  scope: "col",
13
13
  class: "w-[48px] px-0 text-center font-medium text-muted-foreground",
14
14
  style: { width: "48px" }
15
- }, pe = { class: "flex items-center justify-center" }, be = { class: "[&_tr:last-child]:border-0" }, we = {
15
+ }, pe = { class: "flex items-center justify-center" }, we = { class: "[&_tr:last-child]:border-0" }, ye = {
16
16
  key: 0,
17
17
  class: "w-[48px] px-0 py-4 align-middle text-center",
18
18
  style: { width: "48px" }
19
- }, ye = { key: 2 }, ke = ["colspan"], Pe = { class: "flex flex-col items-center justify-center gap-2 text-muted-foreground p-8" }, xe = { class: "flex h-12 w-12 items-center justify-center rounded-full bg-muted" }, Ce = { class: "mt-1 text-base font-semibold text-foreground" }, Se = { class: "text-sm max-w-sm mx-auto" }, Ie = {
19
+ }, be = { key: 2 }, ke = ["colspan"], Pe = { class: "flex flex-col items-center justify-center gap-2 text-muted-foreground p-8" }, xe = { class: "flex h-12 w-12 items-center justify-center rounded-full bg-muted" }, Ce = { class: "mt-1 text-base font-semibold text-foreground" }, Se = { class: "text-sm max-w-sm mx-auto" }, Ie = {
20
20
  key: 0,
21
21
  class: "mt-4"
22
22
  }, $e = { key: 0 }, Ve = /* @__PURE__ */ ee({
@@ -50,7 +50,7 @@ const fe = { class: "space-y-4" }, he = { class: "overflow-x-auto w-full" }, ve
50
50
  },
51
51
  emits: ["change", "select", "rowClick", "update:itemsPerPage", "update:selectedRows", "delete"],
52
52
  setup(a, { emit: U }) {
53
- const O = (e, t) => t.split(".").reduce((s, c) => s?.[c], e), u = (e, t) => O(e, t), l = a, b = U, i = g({ field: "", order: "" }), k = g(l.itemsPerPage), h = g(l.pageInfo?.currentPage || 1), w = g(l.search || ""), P = g(!1), v = g("initial"), L = y(() => l.loading && (v.value === "initial" || v.value === "page"));
53
+ const O = (e, t) => t.split(".").reduce((s, c) => s?.[c], e), u = (e, t) => O(e, t), l = a, w = U, i = g({ field: "", order: "" }), k = g(l.itemsPerPage), h = g(l.pageInfo?.currentPage || 1), y = g(l.search || ""), P = g(!1), v = g("initial"), L = b(() => l.loading && (v.value === "initial" || v.value === "page"));
54
54
  p(
55
55
  () => l.loading,
56
56
  (e, t) => {
@@ -59,12 +59,12 @@ const fe = { class: "space-y-4" }, he = { class: "overflow-x-auto w-full" }, ve
59
59
  ), p(
60
60
  () => l.search,
61
61
  (e) => {
62
- e !== void 0 && e !== w.value && (w.value = e);
62
+ e !== void 0 && e !== y.value && (y.value = e);
63
63
  }
64
64
  );
65
- let R = null;
66
- p(w, (e) => {
67
- R && clearTimeout(R), R = setTimeout(() => {
65
+ let F = null;
66
+ p(y, (e) => {
67
+ F && clearTimeout(F), F = setTimeout(() => {
68
68
  h.value = 1, v.value = "search", x();
69
69
  }, 300);
70
70
  }), p(
@@ -87,7 +87,7 @@ const fe = { class: "space-y-4" }, he = { class: "overflow-x-auto w-full" }, ve
87
87
  },
88
88
  { immediate: !0, deep: !0 }
89
89
  );
90
- const z = y(() => l.rows.length === 0 ? !1 : l.rows.every((e) => o.value.has(u(e, l.keyField)))), E = y(() => o.value.size > 0 && !z.value), W = y(() => {
90
+ const z = b(() => l.rows.length === 0 ? !1 : l.rows.every((e) => o.value.has(u(e, l.keyField)))), E = b(() => o.value.size > 0 && !z.value), W = b(() => {
91
91
  const e = [...l.selectedRows || [], ...l.rows], t = /* @__PURE__ */ new Map();
92
92
  return e.forEach((s) => t.set(u(s, l.keyField), s)), Array.from(o.value).map((s) => t.get(s)).filter(Boolean);
93
93
  }), q = (e) => {
@@ -108,37 +108,34 @@ const fe = { class: "space-y-4" }, he = { class: "overflow-x-auto w-full" }, ve
108
108
  all: z.value,
109
109
  indeterminate: E.value
110
110
  };
111
- b("select", c), b("update:selectedRows", s);
111
+ w("select", c), w("update:selectedRows", s);
112
112
  }, H = (e) => {
113
113
  i.value.field === e ? i.value.order === "asc" ? i.value.order = "desc" : i.value.order === "desc" ? (i.value.order = "", i.value.field = "") : i.value.order = "asc" : (i.value.field = e, i.value.order = "asc"), h.value = 1, v.value = "sort", x();
114
114
  }, J = (e) => {
115
115
  h.value = e, v.value = "page", x();
116
116
  }, K = (e) => {
117
- k.value = e, h.value = 1, v.value = "limit", b("update:itemsPerPage", e), x();
117
+ k.value = e, h.value = 1, v.value = "limit", w("update:itemsPerPage", e), x();
118
118
  }, Q = (e) => {
119
- b("rowClick", e);
119
+ w("rowClick", e);
120
120
  }, X = () => {
121
121
  const e = W.value;
122
- b("delete", e), P.value = !1;
122
+ w("delete", e), P.value = !1;
123
123
  }, x = () => {
124
- b("change", {
124
+ w("change", {
125
125
  pagination: {
126
126
  page: h.value,
127
127
  limit: k.value
128
128
  },
129
129
  sorting: { ...i.value },
130
- search: w.value
130
+ search: y.value
131
131
  });
132
- }, Y = y(() => {
133
- const e = l.variant === "raised";
134
- return [
135
- "w-full flex flex-col",
136
- e ? "bg-background shadow-sm p-2 rounded-lg" : "bg-background rounded",
137
- "overflow-hidden",
138
- !e && l.bordered ? "border-b border-border/60" : "",
139
- l.class
140
- ].join(" ");
141
- }), Z = y(() => ["w-full caption-bottom text-sm", l.tableClass].join(" ")), _ = (e) => e.width ? e.width : "auto";
132
+ }, Y = b(() => [
133
+ "w-full flex flex-col",
134
+ l.variant === "raised" ? "bg-background shadow-sm p-2 rounded-lg" : "bg-background rounded",
135
+ "overflow-hidden",
136
+ l.bordered ? "border border-border/60" : "",
137
+ l.class
138
+ ].join(" ")), Z = b(() => ["w-full caption-bottom text-sm", l.tableClass].join(" ")), _ = (e) => e.width ? e.width : "auto";
142
139
  return p(
143
140
  () => l.rows,
144
141
  () => {
@@ -149,8 +146,8 @@ const fe = { class: "space-y-4" }, he = { class: "overflow-x-auto w-full" }, ve
149
146
  x();
150
147
  }), (e, t) => (r(), d("div", fe, [
151
148
  C(me, {
152
- modelValue: w.value,
153
- "onUpdate:modelValue": t[1] || (t[1] = (s) => w.value = s),
149
+ modelValue: y.value,
150
+ "onUpdate:modelValue": t[1] || (t[1] = (s) => y.value = s),
154
151
  "show-search": a.showSearch,
155
152
  placeholder: a.searchPlaceholder
156
153
  }, V({ _: 2 }, [
@@ -201,7 +198,7 @@ const fe = { class: "space-y-4" }, he = { class: "overflow-x-auto w-full" }, ve
201
198
  }, null, 8, ["model-value", "indeterminate"])
202
199
  ])
203
200
  ])) : I("", !0),
204
- (r(!0), d(F, null, $(a.headers, (s) => (r(), D(ue, {
201
+ (r(!0), d(R, null, $(a.headers, (s) => (r(), D(ue, {
205
202
  key: s.field,
206
203
  header: s,
207
204
  "sort-config": i.value,
@@ -215,17 +212,17 @@ const fe = { class: "space-y-4" }, he = { class: "overflow-x-auto w-full" }, ve
215
212
  }, null, 8, ["header", "sort-config", "compact", "table-sortable", "style"]))), 128))
216
213
  ])
217
214
  ], 2),
218
- n("tbody", be, [
219
- L.value ? (r(!0), d(F, { key: 0 }, $(Math.min(k.value, 15), (s) => (r(), d("tr", {
215
+ n("tbody", we, [
216
+ L.value ? (r(!0), d(R, { key: 0 }, $(Math.min(k.value, 15), (s) => (r(), d("tr", {
220
217
  key: "skeleton-" + s,
221
218
  class: "border-b border-border/50 bg-background transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"
222
219
  }, [
223
- a.selectable ? (r(), d("td", we, [...t[4] || (t[4] = [
220
+ a.selectable ? (r(), d("td", ye, [...t[4] || (t[4] = [
224
221
  n("div", { class: "flex items-center justify-center" }, [
225
222
  n("div", { class: "h-4 w-4 rounded-[4px] bg-muted/50 animate-pulse" })
226
223
  ], -1)
227
224
  ])])) : I("", !0),
228
- (r(!0), d(F, null, $(a.headers, (c) => (r(), d("td", {
225
+ (r(!0), d(R, null, $(a.headers, (c) => (r(), d("td", {
229
226
  key: c.field,
230
227
  class: B(["p-5! align-middle last:pr-6!", [c.hideOnMobile ? "hidden md:table-cell" : ""]])
231
228
  }, [
@@ -236,7 +233,7 @@ const fe = { class: "space-y-4" }, he = { class: "overflow-x-auto w-full" }, ve
236
233
  })
237
234
  }, null, 4)
238
235
  ], 2))), 128))
239
- ]))), 128)) : a.rows.length > 0 ? (r(!0), d(F, { key: 1 }, $(a.rows, (s, c) => (r(), D(ce, {
236
+ ]))), 128)) : a.rows.length > 0 ? (r(!0), d(R, { key: 1 }, $(a.rows, (s, c) => (r(), D(ce, {
240
237
  key: j(s),
241
238
  row: s,
242
239
  headers: a.headers,
@@ -257,7 +254,7 @@ const fe = { class: "space-y-4" }, he = { class: "overflow-x-auto w-full" }, ve
257
254
  S(e.$slots, m.field, le({ ref_for: !0 }, f), void 0, !0)
258
255
  ])
259
256
  }))
260
- ]), 1032, ["row", "headers", "index", "key-field", "selectable", "is-selected", "hoverable", "striped", "compact"]))), 128)) : (r(), d("tr", ye, [
257
+ ]), 1032, ["row", "headers", "index", "key-field", "selectable", "is-selected", "hoverable", "striped", "compact"]))), 128)) : (r(), d("tr", be, [
261
258
  n("td", {
262
259
  colspan: a.selectable ? a.headers.length + 1 : a.headers.length,
263
260
  class: "h-96 text-center align-middle hover:bg-transparent"
@@ -1,13 +1,13 @@
1
1
  import { defineComponent as K, ref as S, useSlots as O, computed as v, openBlock as a, createElementBlock as u, createElementVNode as s, renderSlot as q, normalizeClass as z, createBlock as y, withModifiers as D, createVNode as b, createTextVNode as H, toDisplayString as F, createCommentVNode as x, Fragment as J, renderList as Q } from "vue";
2
2
  import f from "../Icon.vue.js";
3
3
  import T from "../Button.vue.js";
4
- const X = { class: "w-full" }, Y = ["multiple", "accept"], Z = ["value", "placeholder", "disabled"], _ = { class: "absolute right-3 top-1/2 -translate-y-1/2 flex items-center justify-center gap-2 bg-background" }, ee = { class: "p-3 bg-muted-light rounded-full text-muted-foreground" }, le = { class: "space-y-1" }, te = {
4
+ const X = { class: "w-full" }, Y = ["multiple", "accept"], Z = ["value", "placeholder", "disabled"], _ = { class: "absolute right-3 top-1/2 -translate-y-1/2 flex items-center justify-center gap-2 bg-background" }, ee = { class: "p-3 bg-muted rounded-full text-muted-foreground" }, le = { class: "space-y-1" }, te = {
5
5
  key: 0,
6
6
  class: "text-xs text-muted-foreground"
7
7
  }, oe = {
8
8
  key: 1,
9
9
  class: "space-y-2"
10
- }, ie = { class: "shrink-0 mr-3" }, re = { class: "p-2 bg-primary-light rounded text-primary" }, ae = { class: "flex-1 min-w-0" }, ne = { class: "text-sm font-medium text-foreground truncate" }, se = { class: "text-xs text-muted-foreground" }, de = { class: "flex-shrink-0 ml-3 flex gap-2" }, ue = {
10
+ }, ie = { class: "shrink-0 mr-3" }, re = { class: "p-2 bg-primary-light rounded text-primary-fg-light" }, ae = { class: "flex-1 min-w-0" }, ne = { class: "text-sm font-medium text-foreground truncate" }, se = { class: "text-xs text-muted-foreground" }, de = { class: "flex-shrink-0 ml-3 flex gap-2" }, ue = {
11
11
  key: 0,
12
12
  class: "flex gap-2"
13
13
  }, ce = {
@@ -242,7 +242,7 @@ const X = { class: "w-full" }, Y = ["multiple", "accept"], Z = ["value", "placeh
242
242
  ])) : x("", !0)
243
243
  ])) : (a(), u("div", {
244
244
  key: 0,
245
- class: z(["border-2 border-dashed border-border rounded-lg p-6 transition-all duration-200 ease-in-out cursor-pointer flex flex-col items-center justify-center text-center gap-3", [
245
+ class: z(["border-2 border-dashed border-border rounded-lg p-6 transition-all duration-200 ease-in-out cursor-pointer flex flex-col items-center justify-center text-center gap-2", [
246
246
  m.value ? "border-primary bg-primary/5" : "hover:border-primary/50 hover:bg-muted/50",
247
247
  o.disabled || o.loading || d.value ? "opacity-50 cursor-not-allowed" : ""
248
248
  ]]),
@@ -1,14 +1,15 @@
1
- import { defineComponent as z, ref as h, useSlots as S, onMounted as j, onUnmounted as M, computed as f, provide as N, openBlock as r, createElementBlock as i, normalizeClass as a, Fragment as y, createElementVNode as s, renderSlot as l, createVNode as p, createBlock as k, resolveDynamicComponent as P, withCtx as g, createCommentVNode as w, toDisplayString as T, createTextVNode as E } from "vue";
1
+ import { defineComponent as j, ref as v, useSlots as T, onMounted as L, onUnmounted as M, computed as m, provide as N, watch as P, openBlock as n, createElementBlock as d, normalizeClass as a, Fragment as w, createElementVNode as o, renderSlot as s, createVNode as p, createBlock as k, resolveDynamicComponent as E, withCtx as h, createCommentVNode as y, toDisplayString as V, createTextVNode as A } from "vue";
2
+ import { useRoute as H } from "vue-router";
2
3
  import $ from "../Icon.vue.js";
3
- import L from "../SidePanel.vue.js";
4
- import V from "../Logo.vue.js";
5
- const A = { class: "flex items-center gap-4 shrink-0 z-10" }, O = { class: "shrink-0" }, D = { key: 1 }, H = { key: 2 }, U = { class: "h-16 flex items-center px-6 shrink-0 z-10" }, F = { class: "flex-1 px-4 py-4 overflow-y-auto space-y-4 scrollbar-thin" }, Y = { class: "p-4 border-t border-border shrink-0 bg-background mt-auto" }, q = { class: "flex flex-col space-y-6 pt-4 h-full" }, G = {
4
+ import O from "../SidePanel.vue.js";
5
+ import D from "../Logo.vue.js";
6
+ const U = { class: "flex items-center gap-4 shrink-0 z-10" }, F = { class: "shrink-0" }, R = { key: 1 }, Y = { key: 2 }, q = { class: "h-16 flex items-center px-6 shrink-0 z-10" }, G = { class: "flex-1 px-4 py-4 overflow-y-auto space-y-4 scrollbar-thin" }, I = { class: "p-4 border-t border-border shrink-0 bg-background mt-auto" }, J = { class: "flex flex-col space-y-6 pt-4 h-full" }, K = {
6
7
  key: 0,
7
8
  class: "flex flex-col space-y-1"
8
- }, I = {
9
+ }, Q = {
9
10
  key: 1,
10
11
  class: "flex flex-col space-y-4 flex-1 overflow-y-auto"
11
- }, J = { class: "mt-auto pt-4 border-t border-border" }, Z = /* @__PURE__ */ z({
12
+ }, W = { class: "mt-auto pt-4 border-t border-border" }, oe = /* @__PURE__ */ j({
12
13
  __name: "Navbar",
13
14
  props: {
14
15
  variant: { default: "header" },
@@ -26,186 +27,213 @@ const A = { class: "flex items-center gap-4 shrink-0 z-10" }, O = { class: "shri
26
27
  mobileBreakpoint: { default: "md" }
27
28
  },
28
29
  emits: ["toggle-mobile"],
29
- setup(d, { emit: K }) {
30
- const t = d, c = h(!1), m = h(!1);
31
- S();
32
- const v = () => {
33
- m.value = window.scrollY > 10;
30
+ setup(u, { emit: X }) {
31
+ const e = u, f = v(!1), g = v(!1);
32
+ T();
33
+ const x = () => {
34
+ g.value = window.scrollY > 10;
34
35
  };
35
- j(() => {
36
- window.addEventListener("scroll", v, { passive: !0 });
36
+ L(() => {
37
+ window.addEventListener("scroll", x, { passive: !0 });
37
38
  }), M(() => {
38
- window.removeEventListener("scroll", v);
39
+ window.removeEventListener("scroll", x);
39
40
  });
40
- const x = f(() => {
41
- const e = t.variant === "sidebar", o = {
41
+ const C = m(() => {
42
+ const l = e.variant === "sidebar", t = {
42
43
  fixed: "fixed top-0 left-0 z-40",
43
44
  sticky: "sticky top-0 z-40",
44
45
  relative: "relative z-10",
45
46
  absolute: "absolute top-0 left-0 w-full z-40"
46
- }, u = "transition-all duration-300 ease-in-out bg-body", B = [
47
- t.glass && (m.value || e || t.floating) ? "backdrop-blur-md bg-background/80 supports-[backdrop-filter]:bg-background/60" : "bg-background",
48
- t.border && !t.floating ? e ? "border-r border-border" : "border-b border-border" : "",
49
- t.floating ? "m-4 rounded-xl shadow-lg border border-border/50" : "",
50
- m.value && !t.floating && !e && t.position === "sticky" ? "shadow-sm" : ""
47
+ }, i = "bg-body", b = [
48
+ e.glass && (g.value || l || e.floating) ? "backdrop-blur-md bg-background/80 supports-[backdrop-filter]:bg-background/60" : "bg-background",
49
+ e.border && !e.floating ? l ? "border-r border-border" : "border-b border-border" : "",
50
+ e.floating ? "m-4 rounded-xl shadow-lg border border-border/50" : "",
51
+ g.value && !e.floating && !l && e.position === "sticky" ? "shadow-sm" : ""
51
52
  ];
52
- let b = "";
53
- return e ? b = n.value.sidebarLayout : b = `flex items-center gap-4 w-full px-4 sm:px-6 lg:px-8 ${t.height}`, [u, o[t.position], ...B, b, t.class].join(" ");
54
- }), n = f(() => {
55
- const e = t.mobileBreakpoint || "md";
53
+ let c = "";
54
+ return l ? c = r.value.sidebarLayout : c = `flex items-center gap-4 w-full px-4 sm:px-6 lg:px-8 ${e.height}`, [i, t[e.position], ...b, c, e.class].join(" ");
55
+ }), r = m(() => {
56
+ const l = e.mobileBreakpoint || "md", t = {
57
+ sm: "sm:hidden",
58
+ md: "md:hidden",
59
+ lg: "lg:hidden",
60
+ xl: "xl:hidden"
61
+ }, i = {
62
+ sm: "hidden sm:flex",
63
+ md: "hidden md:flex",
64
+ lg: "hidden lg:flex",
65
+ xl: "hidden xl:flex"
66
+ }, b = {
67
+ sm: `flex flex-col max-sm:w-full ${e.compact ? "w-20" : e.width} h-auto sm:h-full sm:max-h-screen`,
68
+ md: `flex flex-col max-md:w-full ${e.compact ? "w-20" : e.width} h-auto md:h-full md:max-h-screen`,
69
+ lg: `flex flex-col max-lg:w-full ${e.compact ? "w-20" : e.width} h-auto lg:h-full lg:max-h-screen`,
70
+ xl: `flex flex-col max-xl:w-full ${e.compact ? "w-20" : e.width} h-auto xl:h-full xl:max-h-screen`
71
+ }, c = {
72
+ sm: "sm:hidden flex items-center justify-between px-4 py-3 shrink-0 bg-background",
73
+ md: "md:hidden flex items-center justify-between px-4 py-3 shrink-0 bg-background",
74
+ lg: "lg:hidden flex items-center justify-between px-4 py-3 shrink-0 bg-background",
75
+ xl: "xl:hidden flex items-center justify-between px-4 py-3 shrink-0 bg-background"
76
+ }, S = {
77
+ sm: "hidden sm:flex flex-col h-full w-full overflow-hidden",
78
+ md: "hidden md:flex flex-col h-full w-full overflow-hidden",
79
+ lg: "hidden lg:flex flex-col h-full w-full overflow-hidden",
80
+ xl: "hidden xl:flex flex-col h-full w-full overflow-hidden"
81
+ };
56
82
  return {
57
- // Show on mobile (up to breakpoint), hide on desktop (breakpoint and up)
58
- mobileTrigger: `${e}:hidden`,
59
- // Hide on mobile, show on desktop
60
- desktopContent: `hidden ${e}:flex`,
61
- // Sidebar: Mobile (auto height, full width) -> Desktop (fixed width based on prop, full height constrained to viewport)
62
- sidebarLayout: `flex flex-col max-${e}:w-full ${t.compact ? "w-20" : t.width} h-auto ${e}:h-full ${e}:max-h-screen`,
63
- // Mobile Header (visible only on small screens)
64
- mobileHeader: `${e}:hidden flex items-center justify-between px-4 py-3 shrink-0 bg-background`,
65
- // Desktop Sidebar Content (hidden on small screens)
66
- desktopSidebar: `hidden ${e}:flex flex-col h-full w-full overflow-hidden`
83
+ mobileTrigger: t[l],
84
+ desktopContent: i[l],
85
+ sidebarLayout: b[l],
86
+ mobileHeader: c[l],
87
+ desktopSidebar: S[l]
67
88
  };
68
- }), C = f(() => {
69
- if (t.variant === "sidebar") return "flex-1 py-4 overflow-y-auto";
70
- switch (t.centerPosition) {
89
+ }), B = m(() => {
90
+ if (e.variant === "sidebar") return "flex-1 py-4 overflow-y-auto";
91
+ switch (e.centerPosition) {
71
92
  case "left":
72
93
  return "flex items-center justify-start";
73
94
  case "right":
74
95
  return "flex items-center justify-end ml-auto";
75
96
  default:
76
- return `${n.value.desktopContent} items-center justify-center mx-auto`;
97
+ return `${r.value.desktopContent} items-center justify-center mx-auto`;
77
98
  }
78
99
  });
79
- return N("navbar-context", {
80
- compact: f(() => t.compact)
81
- }), (e, o) => (r(), i("nav", {
82
- class: a(x.value),
100
+ N("navbar-context", {
101
+ compact: m(() => e.compact)
102
+ });
103
+ const z = H();
104
+ return P(
105
+ () => z.path,
106
+ () => {
107
+ f.value = !1;
108
+ }
109
+ ), (l, t) => (n(), d("nav", {
110
+ class: a(C.value),
83
111
  role: "navigation"
84
112
  }, [
85
- d.variant === "header" ? (r(), i(y, { key: 0 }, [
86
- s("div", A, [
87
- l(e.$slots, "mobile-trigger", {}, () => [
88
- s("button", {
113
+ u.variant === "header" ? (n(), d(w, { key: 0 }, [
114
+ o("div", U, [
115
+ s(l.$slots, "mobile-trigger", {}, () => [
116
+ o("button", {
89
117
  type: "button",
90
- class: a(["p-2 -ml-2 text-muted-foreground hover:bg-accent rounded-md shrink-0", n.value.mobileTrigger]),
91
- onClick: o[0] || (o[0] = (u) => c.value = !0)
118
+ class: a(["p-2 -ml-2 text-muted-foreground hover:bg-accent rounded-md shrink-0", r.value.mobileTrigger]),
119
+ onClick: t[0] || (t[0] = (i) => f.value = !0)
92
120
  }, [
93
121
  p($, {
94
122
  icon: "lucide:menu",
95
123
  class: "w-5 h-5"
96
124
  }),
97
- o[3] || (o[3] = s("span", { class: "sr-only" }, "Open Menu", -1))
125
+ t[3] || (t[3] = o("span", { class: "sr-only" }, "Open Menu", -1))
98
126
  ], 2)
99
127
  ]),
100
- s("div", O, [
101
- l(e.$slots, "logo", {}, () => [
102
- (r(), k(P(t.logo ? "img" : "div"), {
103
- src: t.logo,
128
+ o("div", F, [
129
+ s(l.$slots, "logo", {}, () => [
130
+ (n(), k(E(e.logo ? "img" : "div"), {
131
+ src: e.logo,
104
132
  class: "h-8 w-auto font-bold text-xl flex items-center gap-2"
105
133
  }, {
106
- default: g(() => [
107
- t.logo ? w("", !0) : (r(), k(V, {
134
+ default: h(() => [
135
+ e.logo ? y("", !0) : (n(), k(D, {
108
136
  key: 0,
109
137
  class: "h-6 w-6"
110
138
  })),
111
- !t.logo && t.logoAlt ? (r(), i("span", D, T(t.logoAlt), 1)) : t.logo ? w("", !0) : (r(), i("span", H, "Brand"))
139
+ !e.logo && e.logoAlt ? (n(), d("span", R, V(e.logoAlt), 1)) : e.logo ? y("", !0) : (n(), d("span", Y, "Brand"))
112
140
  ]),
113
141
  _: 1
114
142
  }, 8, ["src"]))
115
143
  ])
116
144
  ]),
117
- s("div", {
118
- class: a(["items-center gap-1 overflow-x-auto no-scrollbar mask-gradient", n.value.desktopContent])
145
+ o("div", {
146
+ class: a(["items-center gap-1 overflow-x-auto no-scrollbar mask-gradient", r.value.desktopContent])
119
147
  }, [
120
- l(e.$slots, "left")
148
+ s(l.$slots, "left")
121
149
  ], 2)
122
150
  ]),
123
- s("div", {
151
+ o("div", {
124
152
  class: a([
125
- C.value,
153
+ B.value,
126
154
  // Width constraint to ensure it doesn't crush others, but allows simple resizing
127
155
  "max-w-full"
128
156
  ])
129
157
  }, [
130
- l(e.$slots, "center")
158
+ s(l.$slots, "center")
131
159
  ], 2),
132
- s("div", {
160
+ o("div", {
133
161
  class: a(["flex items-center gap-2 shrink-0 max-w-[40%] z-10", {
134
162
  // Always push to end unless Center is pushing it.
135
163
  // If Center is 'center' (mx-auto) or 'right' (ml-auto), this naturally falls to end.
136
164
  // If Center is 'left', we MUST have ml-auto here.
137
- "ml-auto": d.centerPosition === "left" || d.centerPosition === "center"
165
+ "ml-auto": u.centerPosition === "left" || u.centerPosition === "center"
138
166
  // If center is 'right', Center has ml-auto. Right just sits next to it.
139
167
  // But if we add ml-auto here too, they might split space? No, flexbox parses strictly.
140
168
  }])
141
169
  }, [
142
- l(e.$slots, "right")
170
+ s(l.$slots, "right")
143
171
  ], 2)
144
- ], 64)) : (r(), i(y, { key: 1 }, [
145
- s("div", {
146
- class: a(n.value.mobileHeader)
172
+ ], 64)) : (n(), d(w, { key: 1 }, [
173
+ o("div", {
174
+ class: a(r.value.mobileHeader)
147
175
  }, [
148
- l(e.$slots, "logo", {}, () => [
149
- o[4] || (o[4] = s("div", { class: "font-bold text-xl truncate" }, "Brand", -1))
176
+ s(l.$slots, "logo", {}, () => [
177
+ t[4] || (t[4] = o("div", { class: "font-bold text-xl truncate" }, "Brand", -1))
150
178
  ]),
151
- s("button", {
179
+ o("button", {
152
180
  type: "button",
153
181
  class: "p-2 -mr-2 text-muted-foreground hover:bg-accent rounded-md",
154
- onClick: o[1] || (o[1] = (u) => c.value = !0)
182
+ onClick: t[1] || (t[1] = (i) => f.value = !0)
155
183
  }, [
156
184
  p($, {
157
185
  icon: "lucide:menu",
158
186
  class: "w-5 h-5"
159
187
  }),
160
- o[5] || (o[5] = s("span", { class: "sr-only" }, "Open Menu", -1))
188
+ t[5] || (t[5] = o("span", { class: "sr-only" }, "Open Menu", -1))
161
189
  ])
162
190
  ], 2),
163
- s("div", {
164
- class: a(n.value.desktopSidebar)
191
+ o("div", {
192
+ class: a(r.value.desktopSidebar)
165
193
  }, [
166
- s("div", U, [
167
- l(e.$slots, "logo", {}, () => [
168
- o[6] || (o[6] = s("div", { class: "font-bold text-xl truncate" }, "Brand", -1))
194
+ o("div", q, [
195
+ s(l.$slots, "logo", {}, () => [
196
+ t[6] || (t[6] = o("div", { class: "font-bold text-xl truncate" }, "Brand", -1))
169
197
  ])
170
198
  ]),
171
- s("div", F, [
172
- l(e.$slots, "left"),
173
- l(e.$slots, "default"),
174
- l(e.$slots, "center")
199
+ o("div", G, [
200
+ s(l.$slots, "left"),
201
+ s(l.$slots, "default"),
202
+ s(l.$slots, "center")
175
203
  ]),
176
- s("div", Y, [
177
- l(e.$slots, "right")
204
+ o("div", I, [
205
+ s(l.$slots, "right")
178
206
  ])
179
207
  ], 2)
180
208
  ], 64)),
181
- p(L, {
182
- show: c.value,
183
- "onUpdate:show": o[2] || (o[2] = (u) => c.value = u),
209
+ p(O, {
210
+ show: f.value,
211
+ "onUpdate:show": t[2] || (t[2] = (i) => f.value = i),
184
212
  position: "left",
185
213
  size: "sm",
186
- triggerClass: n.value.mobileTrigger,
187
- class: a(["z-60", n.value.mobileTrigger])
214
+ triggerClass: r.value.mobileTrigger,
215
+ class: a(["z-60", r.value.mobileTrigger])
188
216
  }, {
189
- header: g(() => [
190
- l(e.$slots, "logo", {}, () => [
191
- o[7] || (o[7] = E("Brand", -1))
217
+ header: h(() => [
218
+ s(l.$slots, "logo", {}, () => [
219
+ t[7] || (t[7] = A("Brand", -1))
192
220
  ])
193
221
  ]),
194
- default: g(() => [
195
- s("div", q, [
196
- d.variant === "header" ? (r(), i("div", G, [
197
- l(e.$slots, "mobile-menu", {}, () => [
198
- l(e.$slots, "left"),
199
- o[8] || (o[8] = s("div", { class: "h-px bg-border my-2" }, null, -1)),
200
- l(e.$slots, "center")
222
+ default: h(() => [
223
+ o("div", J, [
224
+ u.variant === "header" ? (n(), d("div", K, [
225
+ s(l.$slots, "mobile-menu", {}, () => [
226
+ s(l.$slots, "left"),
227
+ t[8] || (t[8] = o("div", { class: "h-px bg-border my-2" }, null, -1)),
228
+ s(l.$slots, "center")
201
229
  ])
202
- ])) : (r(), i("div", I, [
203
- l(e.$slots, "left"),
204
- l(e.$slots, "default"),
205
- l(e.$slots, "center")
230
+ ])) : (n(), d("div", Q, [
231
+ s(l.$slots, "left"),
232
+ s(l.$slots, "default"),
233
+ s(l.$slots, "center")
206
234
  ])),
207
- s("div", J, [
208
- l(e.$slots, "right")
235
+ o("div", W, [
236
+ s(l.$slots, "right")
209
237
  ])
210
238
  ])
211
239
  ]),
@@ -215,5 +243,5 @@ const A = { class: "flex items-center gap-4 shrink-0 z-10" }, O = { class: "shri
215
243
  }
216
244
  });
217
245
  export {
218
- Z as default
246
+ oe as default
219
247
  };