@techzyapp/ui-library 1.0.15 → 1.0.17

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 (40) hide show
  1. package/dist/{AdminRoot-BXfZnH5R.cjs → AdminRoot-D866Bc0e.cjs} +2 -2
  2. package/dist/{AdminRoot-BXfZnH5R.cjs.map → AdminRoot-D866Bc0e.cjs.map} +1 -1
  3. package/dist/{AdminRoot-Ca30MPHn.js → AdminRoot-uVDhWjN8.js} +2 -2
  4. package/dist/{AdminRoot-Ca30MPHn.js.map → AdminRoot-uVDhWjN8.js.map} +1 -1
  5. package/dist/{Breadcrumbs-CtljA45l.js → Breadcrumbs-C1crufqj.js} +2 -2
  6. package/dist/{Breadcrumbs-CtljA45l.js.map → Breadcrumbs-C1crufqj.js.map} +1 -1
  7. package/dist/{Breadcrumbs-D8hvHveR.cjs → Breadcrumbs-s90MO0PD.cjs} +2 -2
  8. package/dist/{Breadcrumbs-D8hvHveR.cjs.map → Breadcrumbs-s90MO0PD.cjs.map} +1 -1
  9. package/dist/{PageNotFound-BFAhRHpY.cjs → PageNotFound-D3ZjMKYD.cjs} +2 -2
  10. package/dist/{PageNotFound-BFAhRHpY.cjs.map → PageNotFound-D3ZjMKYD.cjs.map} +1 -1
  11. package/dist/{PageNotFound-UNkPJi-L.js → PageNotFound-DVh_Tyqf.js} +2 -2
  12. package/dist/{PageNotFound-UNkPJi-L.js.map → PageNotFound-DVh_Tyqf.js.map} +1 -1
  13. package/dist/{RootLayout-DPS3gG53.js → RootLayout-BEOofnxb.js} +3 -3
  14. package/dist/{RootLayout-DPS3gG53.js.map → RootLayout-BEOofnxb.js.map} +1 -1
  15. package/dist/{RootLayout-CCQBRBxR.cjs → RootLayout-DGYOCwOK.cjs} +2 -2
  16. package/dist/{RootLayout-CCQBRBxR.cjs.map → RootLayout-DGYOCwOK.cjs.map} +1 -1
  17. package/dist/Sidebar-BYqUTa8D.cjs +2 -0
  18. package/dist/Sidebar-BYqUTa8D.cjs.map +1 -0
  19. package/dist/{Sidebar-nnHriNtf.js → Sidebar-D2RZH5m5.js} +177 -149
  20. package/dist/Sidebar-D2RZH5m5.js.map +1 -0
  21. package/dist/components/Breadcrumbs/index.cjs +1 -1
  22. package/dist/components/Breadcrumbs/index.js +1 -1
  23. package/dist/components/PageNotFound/index.cjs +1 -1
  24. package/dist/components/PageNotFound/index.js +1 -1
  25. package/dist/components/RootLayout/index.cjs +1 -1
  26. package/dist/components/RootLayout/index.js +1 -1
  27. package/dist/components/Sidebar/Sidebar.d.cts +41 -8
  28. package/dist/components/Sidebar/Sidebar.d.ts +41 -8
  29. package/dist/components/Sidebar/index.cjs +1 -1
  30. package/dist/components/Sidebar/index.js +1 -1
  31. package/dist/entries/app.cjs +1 -1
  32. package/dist/entries/app.js +1 -1
  33. package/dist/entries/components.cjs +1 -1
  34. package/dist/entries/components.js +4 -4
  35. package/dist/index.cjs +1 -1
  36. package/dist/index.js +5 -5
  37. package/package.json +1 -1
  38. package/dist/Sidebar-DXX-89d1.cjs +0 -2
  39. package/dist/Sidebar-DXX-89d1.cjs.map +0 -1
  40. package/dist/Sidebar-nnHriNtf.js.map +0 -1
@@ -1,58 +1,61 @@
1
1
  import { jsx as i, jsxs as I, Fragment as M } from "react/jsx-runtime";
2
- import { useMemo as T, useState as D, useRef as K, useEffect as C } from "react";
3
- import { Navigate as V, useRouterState as $, Link as k, useNavigate as Y, useRouter as E } from "@tanstack/react-router";
4
- import { clsx as U } from "clsx";
2
+ import { useMemo as w, useState as D, useRef as V, useEffect as T } from "react";
3
+ import { Navigate as Y, useRouterState as S, Link as C, useNavigate as U, useRouter as E } from "@tanstack/react-router";
4
+ import { clsx as W } from "clsx";
5
5
  import { I as A } from "./Icon-CophpkHo.js";
6
6
  import { L as y } from "./List-LqbfF6gU.js";
7
7
  import { L as B } from "./ListItem-B4Upc0Hy.js";
8
- import { T as W } from "./TextField-Bg4TwkVD.js";
9
- import { u as q, h as H } from "./access-Db4knwyR.js";
10
- import { a as G } from "./ConfigProvider-BYruQYHC.js";
11
- const Q = "_nav_a1zzi_4", X = "_module_a1zzi_17", J = "_search_a1zzi_25", Z = "_searchPanel_a1zzi_31", ee = "_moduleLabel_a1zzi_46", te = "_leaves_a1zzi_61", oe = "_navBadge_a1zzi_66", ne = "_navDot_a1zzi_78", ae = "_leafDot_a1zzi_86", se = "_collapsible_a1zzi_95", le = "_collapsibleClosed_a1zzi_100", ce = "_collapsibleInner_a1zzi_103", re = "_chevron_a1zzi_109", ie = "_chevronButton_a1zzi_119", h = {
12
- nav: Q,
13
- module: X,
14
- search: J,
15
- searchPanel: Z,
16
- moduleLabel: ee,
17
- leaves: te,
18
- navBadge: oe,
19
- navDot: ne,
20
- leafDot: ae,
21
- collapsible: se,
22
- collapsibleClosed: le,
23
- collapsibleInner: ce,
24
- chevron: re,
25
- chevronButton: ie
26
- }, w = B, de = (e) => e.split("-").map((n) => n.charAt(0).toUpperCase() + n.slice(1)).join(" "), F = (e) => e.replace(/^\/+|\/+$/g, ""), S = (e) => e.length > 1 && e.endsWith("/") ? e.slice(0, -1) : e, P = (e, n) => e.order - n.order || e.label.localeCompare(n.label);
27
- function ue(e) {
8
+ import { T as q } from "./TextField-Bg4TwkVD.js";
9
+ import { u as H, h as G } from "./access-Db4knwyR.js";
10
+ import { a as Q } from "./ConfigProvider-BYruQYHC.js";
11
+ const X = "_nav_a1zzi_4", J = "_module_a1zzi_17", Z = "_search_a1zzi_25", ee = "_searchPanel_a1zzi_31", te = "_moduleLabel_a1zzi_46", oe = "_leaves_a1zzi_61", ne = "_navBadge_a1zzi_66", ae = "_navDot_a1zzi_78", se = "_leafDot_a1zzi_86", le = "_collapsible_a1zzi_95", ce = "_collapsibleClosed_a1zzi_100", re = "_collapsibleInner_a1zzi_103", ie = "_chevron_a1zzi_109", ue = "_chevronButton_a1zzi_119", h = {
12
+ nav: X,
13
+ module: J,
14
+ search: Z,
15
+ searchPanel: ee,
16
+ moduleLabel: te,
17
+ leaves: oe,
18
+ navBadge: ne,
19
+ navDot: ae,
20
+ leafDot: se,
21
+ collapsible: le,
22
+ collapsibleClosed: ce,
23
+ collapsibleInner: re,
24
+ chevron: ie,
25
+ chevronButton: ue
26
+ }, k = B, de = (e) => e.split("-").map((n) => n.charAt(0).toUpperCase() + n.slice(1)).join(" "), F = (e) => e.replace(/^\/+|\/+$/g, ""), L = (e) => e.length > 1 && e.endsWith("/") ? e.slice(0, -1) : e, P = (e, n) => e.order - n.order || e.label.localeCompare(n.label);
27
+ function fe(e) {
28
28
  const n = [];
29
29
  for (const a of e) {
30
- const l = a.staticData, s = F(a.fullPath);
31
- !(l != null && l.name) || !s || n.push({ path: s, name: l.name, sd: l });
30
+ const c = a.staticData, s = F(a.fullPath);
31
+ !(c != null && c.name) || !s || n.push({ path: s, name: c.name, sd: c });
32
32
  }
33
- const o = new Map(n.map((a) => [a.path, a])), t = n.map((a) => a.path), c = (a) => t.some((l) => l !== a && l.startsWith(`${a}/`)), d = new Set(e.map((a) => a.fullPath)), b = (a) => d.has(`/${a}/`), m = (a, l) => {
33
+ const o = new Map(n.map((a) => [a.path, a])), t = n.map((a) => a.path), l = (a) => t.some((c) => {
34
+ var s;
35
+ return c !== a && c.startsWith(`${a}/`) && !((s = o.get(c)) != null && s.sd.hidden);
36
+ }), u = new Set(e.map((a) => a.fullPath)), b = (a) => u.has(`/${a}/`), m = (a, c) => {
34
37
  const s = o.get(a);
35
38
  return {
36
- label: (s == null ? void 0 : s.name) ?? de(l),
39
+ label: (s == null ? void 0 : s.name) ?? de(c),
37
40
  icon: s == null ? void 0 : s.sd.icon,
38
41
  badge: s == null ? void 0 : s.sd.badge,
39
42
  dot: s == null ? void 0 : s.sd.dot,
40
43
  order: (s == null ? void 0 : s.sd.order) ?? Number.POSITIVE_INFINITY
41
44
  };
42
45
  }, p = /* @__PURE__ */ new Map(), f = (a) => {
43
- let l = p.get(a);
44
- if (!l) {
46
+ let c = p.get(a);
47
+ if (!c) {
45
48
  const s = m(a, a);
46
- l = { label: s.label, icon: s.icon, order: s.order, groups: /* @__PURE__ */ new Map() }, p.set(a, l);
49
+ c = { label: s.label, icon: s.icon, order: s.order, groups: /* @__PURE__ */ new Map() }, p.set(a, c);
47
50
  }
48
- return l;
51
+ return c;
49
52
  }, g = [];
50
- for (const { path: a, name: l, sd: s } of n) {
53
+ for (const { path: a, name: c, sd: s } of n) {
51
54
  const _ = a.split("/");
52
- if (_.length <= 2 && c(a) || s.hidden) continue;
55
+ if (_.length <= 2 && l(a) || s.hidden) continue;
53
56
  if (_.length === 1) {
54
57
  g.push({
55
- label: l,
58
+ label: c,
56
59
  to: `/${a}`,
57
60
  icon: s.icon,
58
61
  badge: s.badge,
@@ -64,7 +67,7 @@ function ue(e) {
64
67
  const r = f(_[0]);
65
68
  if (_.length === 2)
66
69
  r.groups.set(a, {
67
- label: l,
70
+ label: c,
68
71
  icon: s.icon,
69
72
  to: `/${a}`,
70
73
  badge: s.badge,
@@ -74,23 +77,23 @@ function ue(e) {
74
77
  isContainer: !1
75
78
  });
76
79
  else {
77
- const u = _.slice(0, 2).join("/");
78
- let v = r.groups.get(u);
80
+ const d = _.slice(0, 2).join("/");
81
+ let v = r.groups.get(d);
79
82
  if (!v) {
80
- const N = m(u, _[1]);
83
+ const N = m(d, _[1]);
81
84
  v = {
82
85
  label: N.label,
83
86
  icon: N.icon,
84
87
  badge: N.badge,
85
88
  dot: N.dot,
86
89
  order: N.order,
87
- to: b(u) ? `/${u}` : void 0,
90
+ to: b(d) ? `/${d}` : void 0,
88
91
  leaves: [],
89
92
  isContainer: !0
90
- }, r.groups.set(u, v);
93
+ }, r.groups.set(d, v);
91
94
  }
92
95
  v.leaves.push({
93
- label: l,
96
+ label: c,
94
97
  to: `/${a}`,
95
98
  icon: s.icon,
96
99
  badge: s.badge,
@@ -106,13 +109,13 @@ function ue(e) {
106
109
  module: a.label,
107
110
  icon: a.icon,
108
111
  groups: [...a.groups.values()].sort(P).map(
109
- (l) => ({
110
- label: l.label,
111
- icon: l.icon,
112
- to: l.to,
113
- badge: l.badge,
114
- dot: l.dot,
115
- children: l.isContainer ? l.leaves.sort(P).map((s) => ({
112
+ (c) => ({
113
+ label: c.label,
114
+ icon: c.icon,
115
+ to: c.to,
116
+ badge: c.badge,
117
+ dot: c.dot,
118
+ children: c.isContainer ? c.leaves.sort(P).map((s) => ({
116
119
  label: s.label,
117
120
  to: s.to,
118
121
  icon: s.icon,
@@ -125,10 +128,10 @@ function ue(e) {
125
128
  )
126
129
  };
127
130
  }
128
- function x() {
129
- const e = E(), n = q();
130
- return T(
131
- () => ue(
131
+ function $() {
132
+ const e = E(), n = H();
133
+ return w(
134
+ () => fe(
132
135
  Object.values(e.looseRoutesById).map((o) => {
133
136
  var t;
134
137
  return {
@@ -137,7 +140,7 @@ function x() {
137
140
  };
138
141
  }).filter((o) => {
139
142
  var t;
140
- return H((t = o.staticData) == null ? void 0 : t.roles);
143
+ return G((t = o.staticData) == null ? void 0 : t.roles);
141
144
  })
142
145
  ),
143
146
  [e, n]
@@ -149,38 +152,38 @@ function O(e) {
149
152
  for (const o of e.modules)
150
153
  for (const t of o.groups) {
151
154
  if (t.to) return t.to;
152
- const c = (n = t.children) == null ? void 0 : n[0];
153
- if (c) return c.to;
155
+ const l = (n = t.children) == null ? void 0 : n[0];
156
+ if (l) return l.to;
154
157
  }
155
158
  }
156
- function fe() {
157
- return O(x());
159
+ function me() {
160
+ return O($());
158
161
  }
159
- function me(e) {
162
+ function he(e) {
160
163
  var o;
161
164
  const n = /* @__PURE__ */ new Map();
162
165
  for (const t of e) {
163
- const c = (o = t.staticData) == null ? void 0 : o.name;
164
- if (!c) continue;
165
- const d = S(t.fullPath);
166
- n.has(d) || n.set(d, c);
166
+ const l = (o = t.staticData) == null ? void 0 : o.name;
167
+ if (!l) continue;
168
+ const u = L(t.fullPath);
169
+ n.has(u) || n.set(u, l);
167
170
  }
168
171
  return n;
169
172
  }
170
173
  function R(e, n) {
171
174
  const o = [];
172
175
  let t = "";
173
- for (const c of F(e).split("/").filter(Boolean)) {
174
- t += `/${c}`;
175
- const d = n.get(t);
176
- d && o.push({ name: d, to: t });
176
+ for (const l of F(e).split("/").filter(Boolean)) {
177
+ t += `/${l}`;
178
+ const u = n.get(t);
179
+ u && o.push({ name: u, to: t });
177
180
  }
178
181
  return o;
179
182
  }
180
183
  function j() {
181
184
  const e = E();
182
- return T(
183
- () => me(
185
+ return w(
186
+ () => he(
184
187
  Object.values(e.looseRoutesById).map((n) => {
185
188
  var o;
186
189
  return {
@@ -192,41 +195,66 @@ function j() {
192
195
  [e]
193
196
  );
194
197
  }
195
- function xe() {
196
- const e = j(), n = $({ select: (t) => t.location.pathname }), o = R(n, e);
197
- return o.length > 0 ? o[o.length - 1].name : void 0;
198
+ function be(e, n) {
199
+ if (e != null)
200
+ return typeof e == "function" ? e(n) : e;
198
201
  }
199
- function he(e) {
202
+ function K() {
203
+ var n;
204
+ const e = S({ select: (o) => o.matches });
205
+ for (let o = e.length - 1; o >= 0; o--) {
206
+ const t = be(
207
+ (n = e[o].staticData) == null ? void 0 : n.title,
208
+ e[o].params ?? {}
209
+ );
210
+ if (t) return t;
211
+ }
212
+ }
213
+ function Be() {
214
+ const e = K(), n = j(), o = S({ select: (l) => l.location.pathname });
215
+ if (e != null) return e;
216
+ const t = R(o, n);
217
+ return t.length > 0 ? t[t.length - 1].name : void 0;
218
+ }
219
+ function pe(e) {
200
220
  const n = /* @__PURE__ */ new Set();
201
221
  for (const o of e.links) n.add(o.to);
202
222
  for (const o of e.modules)
203
223
  for (const t of o.groups) {
204
224
  t.to && n.add(t.to);
205
- for (const c of t.children ?? []) n.add(c.to);
225
+ for (const l of t.children ?? []) n.add(l.to);
206
226
  }
207
227
  return n;
208
228
  }
209
- function Se() {
210
- const e = x(), n = j(), o = $({ select: (b) => b.location.pathname }), t = O(e), c = he(e), d = R(o, n).map(({ name: b, to: m }) => ({
229
+ function ve(e, n) {
230
+ const { leafPath: o, leafTitle: t, navigable: l } = n, u = e.map(({ name: b, to: m }) => ({
211
231
  label: b,
212
- to: c.has(m) ? m : void 0
232
+ to: m !== o && l.has(m) ? m : void 0
213
233
  }));
214
- return d.length > 0 && (d[d.length - 1] = { label: d[d.length - 1].label }), { homeTo: t, items: d };
234
+ return t && (e.length > 0 && e[e.length - 1].to === o ? u[u.length - 1] = { label: t } : u.push({ label: t })), u;
235
+ }
236
+ function Me() {
237
+ const e = $(), n = j(), o = S({ select: (b) => b.location.pathname }), t = K(), l = O(e), u = ve(R(o, n), {
238
+ leafPath: L(o),
239
+ leafTitle: t,
240
+ navigable: pe(e)
241
+ });
242
+ return { homeTo: l, items: u };
215
243
  }
216
- function $e() {
217
- const e = fe();
218
- return e ? /* @__PURE__ */ i(V, { to: e }) : null;
244
+ function Ee() {
245
+ const e = me();
246
+ return e ? /* @__PURE__ */ i(Y, { to: e }) : null;
219
247
  }
220
- function Be() {
221
- const { links: e, modules: n } = x(), o = $({ select: (t) => t.location.pathname });
248
+ function Ae() {
249
+ const { links: e, modules: n } = $(), o = S({ select: (t) => t.location.pathname });
222
250
  return /* @__PURE__ */ I("nav", { className: h.nav, children: [
223
251
  e.length > 0 ? /* @__PURE__ */ i(y, { children: e.map((t) => /* @__PURE__ */ i(
224
- w,
252
+ k,
225
253
  {
226
- as: k,
254
+ as: C,
227
255
  to: t.to,
228
256
  icon: t.icon,
229
- selected: L(o, t.to),
257
+ selected: x(o, t.to),
230
258
  clickable: !0,
231
259
  trailing: z(t.badge, t.dot),
232
260
  children: t.label
@@ -235,57 +263,57 @@ function Be() {
235
263
  )) }) : null,
236
264
  n.map((t) => /* @__PURE__ */ I("div", { className: h.module, children: [
237
265
  /* @__PURE__ */ i("div", { className: h.moduleLabel, children: t.module }),
238
- /* @__PURE__ */ i(y, { children: t.groups.map((c) => /* @__PURE__ */ i(Ne, { group: c, pathname: o }, c.label)) })
266
+ /* @__PURE__ */ i(y, { children: t.groups.map((l) => /* @__PURE__ */ i(Pe, { group: l, pathname: o }, l.label)) })
239
267
  ] }, t.module))
240
268
  ] });
241
269
  }
242
- function be(e) {
270
+ function ge(e) {
243
271
  const n = [];
244
272
  for (const o of e.links) n.push({ label: o.label, to: o.to });
245
273
  for (const o of e.modules)
246
274
  for (const t of o.groups) {
247
275
  t.to && n.push({ label: t.label, to: t.to, context: o.module });
248
- for (const c of t.children ?? [])
276
+ for (const l of t.children ?? [])
249
277
  n.push({
250
- label: c.label,
251
- to: c.to,
278
+ label: l.label,
279
+ to: l.to,
252
280
  context: `${o.module} · ${t.label}`
253
281
  });
254
282
  }
255
283
  return n;
256
284
  }
257
- const pe = 8;
258
- function Me() {
259
- const e = G(), n = x(), o = Y(), t = T(() => be(n), [n]), [c, d] = D(""), [b, m] = D(!1), [p, f] = D(0), g = K(null), a = T(() => {
260
- const r = c.trim().toLowerCase();
285
+ const _e = 8;
286
+ function Fe() {
287
+ const e = Q(), n = $(), o = U(), t = w(() => ge(n), [n]), [l, u] = D(""), [b, m] = D(!1), [p, f] = D(0), g = V(null), a = w(() => {
288
+ const r = l.trim().toLowerCase();
261
289
  return r ? t.filter(
262
- (u) => {
290
+ (d) => {
263
291
  var v;
264
- return u.label.toLowerCase().includes(r) || (((v = u.context) == null ? void 0 : v.toLowerCase().includes(r)) ?? !1);
292
+ return d.label.toLowerCase().includes(r) || (((v = d.context) == null ? void 0 : v.toLowerCase().includes(r)) ?? !1);
265
293
  }
266
- ).slice(0, pe) : [];
267
- }, [t, c]), l = b && a.length > 0;
268
- C(() => f(0), [c]), C(() => {
294
+ ).slice(0, _e) : [];
295
+ }, [t, l]), c = b && a.length > 0;
296
+ T(() => f(0), [l]), T(() => {
269
297
  f((r) => r > a.length - 1 ? Math.max(0, a.length - 1) : r);
270
- }, [a.length]), C(() => {
298
+ }, [a.length]), T(() => {
271
299
  if (!b) return;
272
- const r = (u) => {
273
- g.current && !g.current.contains(u.target) && m(!1);
300
+ const r = (d) => {
301
+ g.current && !g.current.contains(d.target) && m(!1);
274
302
  };
275
303
  return document.addEventListener("pointerdown", r), () => document.removeEventListener("pointerdown", r);
276
304
  }, [b]);
277
305
  const s = (r) => {
278
- o({ to: r }), d(""), m(!1);
306
+ o({ to: r }), u(""), m(!1);
279
307
  }, _ = (r) => {
280
- if (l)
308
+ if (c)
281
309
  if (r.key === "ArrowDown")
282
- r.preventDefault(), f((u) => (u + 1) % a.length);
310
+ r.preventDefault(), f((d) => (d + 1) % a.length);
283
311
  else if (r.key === "ArrowUp")
284
- r.preventDefault(), f((u) => (u - 1 + a.length) % a.length);
312
+ r.preventDefault(), f((d) => (d - 1 + a.length) % a.length);
285
313
  else if (r.key === "Enter") {
286
314
  r.preventDefault();
287
- const u = a[p];
288
- u && s(u.to);
315
+ const d = a[p];
316
+ d && s(d.to);
289
317
  } else r.key === "Escape" && m(!1);
290
318
  };
291
319
  return /* @__PURE__ */ I(
@@ -294,15 +322,15 @@ function Me() {
294
322
  ref: g,
295
323
  className: h.search,
296
324
  role: "combobox",
297
- "aria-expanded": l,
325
+ "aria-expanded": c,
298
326
  "aria-haspopup": "listbox",
299
327
  children: [
300
328
  /* @__PURE__ */ i(
301
- W,
329
+ q,
302
330
  {
303
- value: c,
331
+ value: l,
304
332
  onChange: (r) => {
305
- d(r.target.value), m(!0);
333
+ u(r.target.value), m(!0);
306
334
  },
307
335
  onFocus: () => m(!0),
308
336
  onKeyDown: _,
@@ -312,14 +340,14 @@ function Me() {
312
340
  autoComplete: "off"
313
341
  }
314
342
  ),
315
- l ? /* @__PURE__ */ i("div", { className: h.searchPanel, children: /* @__PURE__ */ i(y, { role: "listbox", children: a.map((r, u) => /* @__PURE__ */ i(
343
+ c ? /* @__PURE__ */ i("div", { className: h.searchPanel, children: /* @__PURE__ */ i(y, { role: "listbox", children: a.map((r, d) => /* @__PURE__ */ i(
316
344
  B,
317
345
  {
318
346
  description: r.context,
319
347
  clickable: !0,
320
- selected: u === p,
348
+ selected: d === p,
321
349
  onMouseDown: (v) => v.preventDefault(),
322
- onMouseEnter: () => f(u),
350
+ onMouseEnter: () => f(d),
323
351
  onClick: () => s(r.to),
324
352
  children: r.label
325
353
  },
@@ -329,38 +357,38 @@ function Me() {
329
357
  }
330
358
  );
331
359
  }
332
- function L(e, n) {
333
- const o = S(e), t = S(n);
360
+ function x(e, n) {
361
+ const o = L(e), t = L(n);
334
362
  return t === "/" ? o === "/" : o === t || o.startsWith(t + "/");
335
363
  }
336
- function ve(e, n) {
364
+ function Ne(e, n) {
337
365
  var o;
338
- return e.to && L(n, e.to) ? !0 : ((o = e.children) == null ? void 0 : o.some((t) => L(n, t.to))) ?? !1;
366
+ return e.to && x(n, e.to) ? !0 : ((o = e.children) == null ? void 0 : o.some((t) => x(n, t.to))) ?? !1;
339
367
  }
340
- function ge(e) {
368
+ function ze(e) {
341
369
  return e ? /* @__PURE__ */ i("span", { className: h.navBadge, children: e }) : null;
342
370
  }
343
- function _e(e) {
371
+ function Ie(e) {
344
372
  return e ? /* @__PURE__ */ i("span", { className: h.navDot, style: { background: `var(--tz-color-${e})` } }) : null;
345
373
  }
346
374
  function z(e, n, o) {
347
375
  if (!(e == null && n == null && o == null))
348
376
  return /* @__PURE__ */ I(M, { children: [
349
- ge(e),
350
- _e(n),
377
+ ze(e),
378
+ Ie(n),
351
379
  o
352
380
  ] });
353
381
  }
354
- function Ne({ group: e, pathname: n }) {
382
+ function Pe({ group: e, pathname: n }) {
355
383
  var m, p;
356
- const o = ve(e, n), t = !!((m = e.children) != null && m.length), [c, d] = D(o);
357
- if (C(() => {
358
- o && d(!0);
384
+ const o = Ne(e, n), t = !!((m = e.children) != null && m.length), [l, u] = D(o);
385
+ if (T(() => {
386
+ o && u(!0);
359
387
  }, [o]), !t && e.to)
360
388
  return /* @__PURE__ */ i(
361
- w,
389
+ k,
362
390
  {
363
- as: k,
391
+ as: C,
364
392
  to: e.to,
365
393
  icon: e.icon,
366
394
  selected: o,
@@ -375,21 +403,21 @@ function Ne({ group: e, pathname: n }) {
375
403
  name: "ArrowDown4",
376
404
  size: "sm",
377
405
  className: h.chevron,
378
- "data-open": c ? "true" : "false"
406
+ "data-open": l ? "true" : "false"
379
407
  }
380
408
  );
381
409
  return /* @__PURE__ */ I(M, { children: [
382
410
  t && e.to ? (
383
411
  // "Case B": the row navigates (and expands); a separate chevron only toggles.
384
412
  /* @__PURE__ */ i(
385
- w,
413
+ k,
386
414
  {
387
- as: k,
415
+ as: C,
388
416
  to: e.to,
389
417
  icon: e.icon,
390
418
  selected: o,
391
419
  clickable: !0,
392
- onClick: () => d(!0),
420
+ onClick: () => u(!0),
393
421
  trailing: z(
394
422
  e.badge,
395
423
  e.dot,
@@ -398,10 +426,10 @@ function Ne({ group: e, pathname: n }) {
398
426
  {
399
427
  type: "button",
400
428
  className: h.chevronButton,
401
- "aria-label": `${c ? "Collapse" : "Expand"} ${e.label}`,
402
- "aria-expanded": c,
429
+ "aria-label": `${l ? "Collapse" : "Expand"} ${e.label}`,
430
+ "aria-expanded": l,
403
431
  onClick: (f) => {
404
- f.preventDefault(), f.stopPropagation(), d((g) => !g);
432
+ f.preventDefault(), f.stopPropagation(), u((g) => !g);
405
433
  },
406
434
  children: b
407
435
  }
@@ -418,8 +446,8 @@ function Ne({ group: e, pathname: n }) {
418
446
  icon: e.icon,
419
447
  selected: o,
420
448
  clickable: !0,
421
- "aria-expanded": c,
422
- onClick: () => d((f) => !f),
449
+ "aria-expanded": l,
450
+ onClick: () => u((f) => !f),
423
451
  trailing: z(e.badge, e.dot, b),
424
452
  children: e.label
425
453
  }
@@ -427,13 +455,13 @@ function Ne({ group: e, pathname: n }) {
427
455
  ),
428
456
  t ? (
429
457
  // smooth collapse, same grid-template-rows technique as Card
430
- /* @__PURE__ */ i("div", { className: U(h.collapsible, !c && h.collapsibleClosed), children: /* @__PURE__ */ i("div", { className: h.collapsibleInner, children: /* @__PURE__ */ i(y, { className: h.leaves, children: (p = e.children) == null ? void 0 : p.map((f) => /* @__PURE__ */ i(
431
- w,
458
+ /* @__PURE__ */ i("div", { className: W(h.collapsible, !l && h.collapsibleClosed), children: /* @__PURE__ */ i("div", { className: h.collapsibleInner, children: /* @__PURE__ */ i(y, { className: h.leaves, children: (p = e.children) == null ? void 0 : p.map((f) => /* @__PURE__ */ i(
459
+ k,
432
460
  {
433
- as: k,
461
+ as: C,
434
462
  to: f.to,
435
463
  icon: /* @__PURE__ */ i("span", { className: h.leafDot }),
436
- selected: L(n, f.to),
464
+ selected: x(n, f.to),
437
465
  size: "md",
438
466
  clickable: !0,
439
467
  trailing: z(f.badge, f.dot),
@@ -445,12 +473,12 @@ function Ne({ group: e, pathname: n }) {
445
473
  ] });
446
474
  }
447
475
  export {
448
- $e as F,
449
- Me as N,
450
- Be as S,
451
- xe as a,
452
- ue as b,
476
+ Ee as F,
477
+ Fe as N,
478
+ Ae as S,
479
+ Be as a,
480
+ fe as b,
453
481
  O as f,
454
- Se as u
482
+ Me as u
455
483
  };
456
- //# sourceMappingURL=Sidebar-nnHriNtf.js.map
484
+ //# sourceMappingURL=Sidebar-D2RZH5m5.js.map