@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.
- package/dist/{AdminRoot-BXfZnH5R.cjs → AdminRoot-D866Bc0e.cjs} +2 -2
- package/dist/{AdminRoot-BXfZnH5R.cjs.map → AdminRoot-D866Bc0e.cjs.map} +1 -1
- package/dist/{AdminRoot-Ca30MPHn.js → AdminRoot-uVDhWjN8.js} +2 -2
- package/dist/{AdminRoot-Ca30MPHn.js.map → AdminRoot-uVDhWjN8.js.map} +1 -1
- package/dist/{Breadcrumbs-CtljA45l.js → Breadcrumbs-C1crufqj.js} +2 -2
- package/dist/{Breadcrumbs-CtljA45l.js.map → Breadcrumbs-C1crufqj.js.map} +1 -1
- package/dist/{Breadcrumbs-D8hvHveR.cjs → Breadcrumbs-s90MO0PD.cjs} +2 -2
- package/dist/{Breadcrumbs-D8hvHveR.cjs.map → Breadcrumbs-s90MO0PD.cjs.map} +1 -1
- package/dist/{PageNotFound-BFAhRHpY.cjs → PageNotFound-D3ZjMKYD.cjs} +2 -2
- package/dist/{PageNotFound-BFAhRHpY.cjs.map → PageNotFound-D3ZjMKYD.cjs.map} +1 -1
- package/dist/{PageNotFound-UNkPJi-L.js → PageNotFound-DVh_Tyqf.js} +2 -2
- package/dist/{PageNotFound-UNkPJi-L.js.map → PageNotFound-DVh_Tyqf.js.map} +1 -1
- package/dist/{RootLayout-DPS3gG53.js → RootLayout-BEOofnxb.js} +3 -3
- package/dist/{RootLayout-DPS3gG53.js.map → RootLayout-BEOofnxb.js.map} +1 -1
- package/dist/{RootLayout-CCQBRBxR.cjs → RootLayout-DGYOCwOK.cjs} +2 -2
- package/dist/{RootLayout-CCQBRBxR.cjs.map → RootLayout-DGYOCwOK.cjs.map} +1 -1
- package/dist/Sidebar-BYqUTa8D.cjs +2 -0
- package/dist/Sidebar-BYqUTa8D.cjs.map +1 -0
- package/dist/{Sidebar-nnHriNtf.js → Sidebar-D2RZH5m5.js} +177 -149
- package/dist/Sidebar-D2RZH5m5.js.map +1 -0
- package/dist/components/Breadcrumbs/index.cjs +1 -1
- package/dist/components/Breadcrumbs/index.js +1 -1
- package/dist/components/PageNotFound/index.cjs +1 -1
- package/dist/components/PageNotFound/index.js +1 -1
- package/dist/components/RootLayout/index.cjs +1 -1
- package/dist/components/RootLayout/index.js +1 -1
- package/dist/components/Sidebar/Sidebar.d.cts +41 -8
- package/dist/components/Sidebar/Sidebar.d.ts +41 -8
- package/dist/components/Sidebar/index.cjs +1 -1
- package/dist/components/Sidebar/index.js +1 -1
- package/dist/entries/app.cjs +1 -1
- package/dist/entries/app.js +1 -1
- package/dist/entries/components.cjs +1 -1
- package/dist/entries/components.js +4 -4
- package/dist/index.cjs +1 -1
- package/dist/index.js +5 -5
- package/package.json +1 -1
- package/dist/Sidebar-DXX-89d1.cjs +0 -2
- package/dist/Sidebar-DXX-89d1.cjs.map +0 -1
- 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
|
|
3
|
-
import { Navigate as
|
|
4
|
-
import { clsx as
|
|
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
|
|
9
|
-
import { u as
|
|
10
|
-
import { a as
|
|
11
|
-
const
|
|
12
|
-
nav:
|
|
13
|
-
module:
|
|
14
|
-
search:
|
|
15
|
-
searchPanel:
|
|
16
|
-
moduleLabel:
|
|
17
|
-
leaves:
|
|
18
|
-
navBadge:
|
|
19
|
-
navDot:
|
|
20
|
-
leafDot:
|
|
21
|
-
collapsible:
|
|
22
|
-
collapsibleClosed:
|
|
23
|
-
collapsibleInner:
|
|
24
|
-
chevron:
|
|
25
|
-
chevronButton:
|
|
26
|
-
},
|
|
27
|
-
function
|
|
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
|
|
31
|
-
!(
|
|
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),
|
|
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(
|
|
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
|
|
44
|
-
if (!
|
|
46
|
+
let c = p.get(a);
|
|
47
|
+
if (!c) {
|
|
45
48
|
const s = m(a, a);
|
|
46
|
-
|
|
49
|
+
c = { label: s.label, icon: s.icon, order: s.order, groups: /* @__PURE__ */ new Map() }, p.set(a, c);
|
|
47
50
|
}
|
|
48
|
-
return
|
|
51
|
+
return c;
|
|
49
52
|
}, g = [];
|
|
50
|
-
for (const { path: a, name:
|
|
53
|
+
for (const { path: a, name: c, sd: s } of n) {
|
|
51
54
|
const _ = a.split("/");
|
|
52
|
-
if (_.length <= 2 &&
|
|
55
|
+
if (_.length <= 2 && l(a) || s.hidden) continue;
|
|
53
56
|
if (_.length === 1) {
|
|
54
57
|
g.push({
|
|
55
|
-
label:
|
|
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:
|
|
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
|
|
78
|
-
let v = r.groups.get(
|
|
80
|
+
const d = _.slice(0, 2).join("/");
|
|
81
|
+
let v = r.groups.get(d);
|
|
79
82
|
if (!v) {
|
|
80
|
-
const N = m(
|
|
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(
|
|
90
|
+
to: b(d) ? `/${d}` : void 0,
|
|
88
91
|
leaves: [],
|
|
89
92
|
isContainer: !0
|
|
90
|
-
}, r.groups.set(
|
|
93
|
+
}, r.groups.set(d, v);
|
|
91
94
|
}
|
|
92
95
|
v.leaves.push({
|
|
93
|
-
label:
|
|
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
|
-
(
|
|
110
|
-
label:
|
|
111
|
-
icon:
|
|
112
|
-
to:
|
|
113
|
-
badge:
|
|
114
|
-
dot:
|
|
115
|
-
children:
|
|
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
|
|
129
|
-
const e = E(), n =
|
|
130
|
-
return
|
|
131
|
-
() =>
|
|
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
|
|
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
|
|
153
|
-
if (
|
|
155
|
+
const l = (n = t.children) == null ? void 0 : n[0];
|
|
156
|
+
if (l) return l.to;
|
|
154
157
|
}
|
|
155
158
|
}
|
|
156
|
-
function
|
|
157
|
-
return O(
|
|
159
|
+
function me() {
|
|
160
|
+
return O($());
|
|
158
161
|
}
|
|
159
|
-
function
|
|
162
|
+
function he(e) {
|
|
160
163
|
var o;
|
|
161
164
|
const n = /* @__PURE__ */ new Map();
|
|
162
165
|
for (const t of e) {
|
|
163
|
-
const
|
|
164
|
-
if (!
|
|
165
|
-
const
|
|
166
|
-
n.has(
|
|
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
|
|
174
|
-
t += `/${
|
|
175
|
-
const
|
|
176
|
-
|
|
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
|
|
183
|
-
() =>
|
|
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
|
|
196
|
-
|
|
197
|
-
|
|
198
|
+
function be(e, n) {
|
|
199
|
+
if (e != null)
|
|
200
|
+
return typeof e == "function" ? e(n) : e;
|
|
198
201
|
}
|
|
199
|
-
function
|
|
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
|
|
225
|
+
for (const l of t.children ?? []) n.add(l.to);
|
|
206
226
|
}
|
|
207
227
|
return n;
|
|
208
228
|
}
|
|
209
|
-
function
|
|
210
|
-
const
|
|
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:
|
|
232
|
+
to: m !== o && l.has(m) ? m : void 0
|
|
213
233
|
}));
|
|
214
|
-
return
|
|
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
|
|
217
|
-
const e =
|
|
218
|
-
return e ? /* @__PURE__ */ i(
|
|
244
|
+
function Ee() {
|
|
245
|
+
const e = me();
|
|
246
|
+
return e ? /* @__PURE__ */ i(Y, { to: e }) : null;
|
|
219
247
|
}
|
|
220
|
-
function
|
|
221
|
-
const { links: e, modules: n } =
|
|
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
|
-
|
|
252
|
+
k,
|
|
225
253
|
{
|
|
226
|
-
as:
|
|
254
|
+
as: C,
|
|
227
255
|
to: t.to,
|
|
228
256
|
icon: t.icon,
|
|
229
|
-
selected:
|
|
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((
|
|
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
|
|
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
|
|
276
|
+
for (const l of t.children ?? [])
|
|
249
277
|
n.push({
|
|
250
|
-
label:
|
|
251
|
-
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
|
|
258
|
-
function
|
|
259
|
-
const e =
|
|
260
|
-
const r =
|
|
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
|
-
(
|
|
290
|
+
(d) => {
|
|
263
291
|
var v;
|
|
264
|
-
return
|
|
292
|
+
return d.label.toLowerCase().includes(r) || (((v = d.context) == null ? void 0 : v.toLowerCase().includes(r)) ?? !1);
|
|
265
293
|
}
|
|
266
|
-
).slice(0,
|
|
267
|
-
}, [t,
|
|
268
|
-
|
|
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]),
|
|
298
|
+
}, [a.length]), T(() => {
|
|
271
299
|
if (!b) return;
|
|
272
|
-
const r = (
|
|
273
|
-
g.current && !g.current.contains(
|
|
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 }),
|
|
306
|
+
o({ to: r }), u(""), m(!1);
|
|
279
307
|
}, _ = (r) => {
|
|
280
|
-
if (
|
|
308
|
+
if (c)
|
|
281
309
|
if (r.key === "ArrowDown")
|
|
282
|
-
r.preventDefault(), f((
|
|
310
|
+
r.preventDefault(), f((d) => (d + 1) % a.length);
|
|
283
311
|
else if (r.key === "ArrowUp")
|
|
284
|
-
r.preventDefault(), f((
|
|
312
|
+
r.preventDefault(), f((d) => (d - 1 + a.length) % a.length);
|
|
285
313
|
else if (r.key === "Enter") {
|
|
286
314
|
r.preventDefault();
|
|
287
|
-
const
|
|
288
|
-
|
|
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":
|
|
325
|
+
"aria-expanded": c,
|
|
298
326
|
"aria-haspopup": "listbox",
|
|
299
327
|
children: [
|
|
300
328
|
/* @__PURE__ */ i(
|
|
301
|
-
|
|
329
|
+
q,
|
|
302
330
|
{
|
|
303
|
-
value:
|
|
331
|
+
value: l,
|
|
304
332
|
onChange: (r) => {
|
|
305
|
-
|
|
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
|
-
|
|
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:
|
|
348
|
+
selected: d === p,
|
|
321
349
|
onMouseDown: (v) => v.preventDefault(),
|
|
322
|
-
onMouseEnter: () => f(
|
|
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
|
|
333
|
-
const o =
|
|
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
|
|
364
|
+
function Ne(e, n) {
|
|
337
365
|
var o;
|
|
338
|
-
return e.to &&
|
|
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
|
|
368
|
+
function ze(e) {
|
|
341
369
|
return e ? /* @__PURE__ */ i("span", { className: h.navBadge, children: e }) : null;
|
|
342
370
|
}
|
|
343
|
-
function
|
|
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
|
-
|
|
350
|
-
|
|
377
|
+
ze(e),
|
|
378
|
+
Ie(n),
|
|
351
379
|
o
|
|
352
380
|
] });
|
|
353
381
|
}
|
|
354
|
-
function
|
|
382
|
+
function Pe({ group: e, pathname: n }) {
|
|
355
383
|
var m, p;
|
|
356
|
-
const o =
|
|
357
|
-
if (
|
|
358
|
-
o &&
|
|
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
|
-
|
|
389
|
+
k,
|
|
362
390
|
{
|
|
363
|
-
as:
|
|
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":
|
|
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
|
-
|
|
413
|
+
k,
|
|
386
414
|
{
|
|
387
|
-
as:
|
|
415
|
+
as: C,
|
|
388
416
|
to: e.to,
|
|
389
417
|
icon: e.icon,
|
|
390
418
|
selected: o,
|
|
391
419
|
clickable: !0,
|
|
392
|
-
onClick: () =>
|
|
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": `${
|
|
402
|
-
"aria-expanded":
|
|
429
|
+
"aria-label": `${l ? "Collapse" : "Expand"} ${e.label}`,
|
|
430
|
+
"aria-expanded": l,
|
|
403
431
|
onClick: (f) => {
|
|
404
|
-
f.preventDefault(), f.stopPropagation(),
|
|
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":
|
|
422
|
-
onClick: () =>
|
|
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:
|
|
431
|
-
|
|
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:
|
|
461
|
+
as: C,
|
|
434
462
|
to: f.to,
|
|
435
463
|
icon: /* @__PURE__ */ i("span", { className: h.leafDot }),
|
|
436
|
-
selected:
|
|
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
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
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
|
-
|
|
482
|
+
Me as u
|
|
455
483
|
};
|
|
456
|
-
//# sourceMappingURL=Sidebar-
|
|
484
|
+
//# sourceMappingURL=Sidebar-D2RZH5m5.js.map
|