@techzyapp/ui-library 1.0.11 → 1.0.12
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/{RootLayout-BPSWgWlI.js → RootLayout-CqQZ6h5c.js} +99 -97
- package/dist/RootLayout-CqQZ6h5c.js.map +1 -0
- package/dist/RootLayout-CxMadTU1.cjs +2 -0
- package/dist/RootLayout-CxMadTU1.cjs.map +1 -0
- package/dist/components/RootLayout/RootLayout.d.cts +3 -1
- package/dist/components/RootLayout/RootLayout.d.ts +3 -1
- package/dist/components/RootLayout/index.cjs +1 -1
- package/dist/components/RootLayout/index.js +1 -1
- package/dist/entries/components.cjs +1 -1
- package/dist/entries/components.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/RootLayout-4GV6dfdB.cjs +0 -2
- package/dist/RootLayout-4GV6dfdB.cjs.map +0 -1
- package/dist/RootLayout-BPSWgWlI.js.map +0 -1
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { jsxs as n, Fragment as A, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useState as E, useEffect as
|
|
3
|
-
import { useRouterState as
|
|
4
|
-
import { clsx as
|
|
5
|
-
import { a as
|
|
6
|
-
import { u as
|
|
7
|
-
import { A as
|
|
8
|
-
import { C as
|
|
9
|
-
import { D as
|
|
10
|
-
import { D as
|
|
2
|
+
import { useState as E, useEffect as P } from "react";
|
|
3
|
+
import { useRouterState as R } from "@tanstack/react-router";
|
|
4
|
+
import { clsx as j } from "clsx";
|
|
5
|
+
import { a as $ } from "./useMediaQuery-DrDUrkmJ.js";
|
|
6
|
+
import { u as ee } from "./useLockBodyScroll-DwBILLPK.js";
|
|
7
|
+
import { A as Q } from "./Avatar-BJVCdo-K.js";
|
|
8
|
+
import { C as Y, R as ae } from "./Col-B51RlwWP.js";
|
|
9
|
+
import { D as z } from "./Divider-LtH3dLgw.js";
|
|
10
|
+
import { D as W } from "./Dropdown-FfkmluRu.js";
|
|
11
11
|
import { I as v } from "./Icon-CophpkHo.js";
|
|
12
12
|
import { I as k } from "./IconButton-B8FPGgDn.js";
|
|
13
|
-
import { L as
|
|
14
|
-
import { F as
|
|
15
|
-
import { T as
|
|
13
|
+
import { L as G } from "./ListItem-B4Upc0Hy.js";
|
|
14
|
+
import { F as te } from "./FullscreenToggle-DmC0jTay.js";
|
|
15
|
+
import { T as se } from "./ThemeToggle-DEfXczDs.js";
|
|
16
16
|
import { T as l } from "./Typography-Cta6Rg4L.js";
|
|
17
|
-
import { B as
|
|
18
|
-
import { T as
|
|
19
|
-
import { a as
|
|
20
|
-
import { F as
|
|
21
|
-
import { M as
|
|
22
|
-
import { a as
|
|
23
|
-
import { S as
|
|
24
|
-
import { S as
|
|
25
|
-
import { m as
|
|
26
|
-
const
|
|
17
|
+
import { B as re } from "./Breadcrumbs-DvgctFLS.js";
|
|
18
|
+
import { T as ne } from "./Toaster-Da8F_SFV.js";
|
|
19
|
+
import { a as oe, N as q, S as le } from "./Sidebar-Csd3iKbS.js";
|
|
20
|
+
import { F as ie } from "./Flag-Ck1xK22A.js";
|
|
21
|
+
import { M as ce } from "./Modal-XMRDPHvQ.js";
|
|
22
|
+
import { a as U } from "./ChoiceCardGroup-CvFzZlgI.js";
|
|
23
|
+
import { S as de } from "./Select-D7KJ-YMU.js";
|
|
24
|
+
import { S as me } from "./SwatchPicker-D30aSrbY.js";
|
|
25
|
+
import { m as J, a as K, D as N, u as he, g as ge } from "./ConfigProvider-BYruQYHC.js";
|
|
26
|
+
const pe = {
|
|
27
27
|
light: [
|
|
28
28
|
"#dc2626",
|
|
29
29
|
// red
|
|
@@ -89,36 +89,36 @@ const he = {
|
|
|
89
89
|
// slate
|
|
90
90
|
]
|
|
91
91
|
};
|
|
92
|
-
function
|
|
92
|
+
function ue({ open: f, onClose: _, showTheme: S = !0 }) {
|
|
93
93
|
const {
|
|
94
94
|
mode: d,
|
|
95
95
|
setMode: w,
|
|
96
96
|
accentColors: x,
|
|
97
|
-
defaultAccentColors:
|
|
98
|
-
setAccentColor:
|
|
97
|
+
defaultAccentColors: F,
|
|
98
|
+
setAccentColor: L,
|
|
99
99
|
headerSticky: D,
|
|
100
100
|
setHeaderSticky: y,
|
|
101
101
|
fontFamily: i,
|
|
102
102
|
setFontFamily: M
|
|
103
|
-
} =
|
|
103
|
+
} = J(), a = K(), [C, T] = E(""), h = C.trim(), g = i !== N ? [N, i] : [N], I = (h.length > 0 && !g.some((t) => t.toLowerCase() === h.toLowerCase()) ? [h, ...g] : g).map((t) => ({
|
|
104
104
|
value: t,
|
|
105
|
-
label: t ===
|
|
105
|
+
label: t === N ? a("settings.fontDefault", { font: t }) : t
|
|
106
106
|
})), p = (t, u) => {
|
|
107
|
-
const s =
|
|
107
|
+
const s = F[t], m = [s, ...pe[t].filter((c) => c.toLowerCase() !== s.toLowerCase())];
|
|
108
108
|
return /* @__PURE__ */ e(
|
|
109
|
-
|
|
109
|
+
me,
|
|
110
110
|
{
|
|
111
111
|
label: u,
|
|
112
112
|
colors: m,
|
|
113
113
|
value: x[t] ?? s,
|
|
114
|
-
onChange: (c) =>
|
|
114
|
+
onChange: (c) => L(c.toLowerCase() === s.toLowerCase() ? null : c, t),
|
|
115
115
|
labels: { [s]: a("settings.accentDefault", { color: s }) },
|
|
116
116
|
"aria-label": String(u)
|
|
117
117
|
}
|
|
118
118
|
);
|
|
119
119
|
};
|
|
120
120
|
return /* @__PURE__ */ n(
|
|
121
|
-
|
|
121
|
+
ce,
|
|
122
122
|
{
|
|
123
123
|
open: f,
|
|
124
124
|
onClose: _,
|
|
@@ -140,7 +140,7 @@ function ge({ open: f, onClose: _, showTheme: S = !0 }) {
|
|
|
140
140
|
}
|
|
141
141
|
),
|
|
142
142
|
/* @__PURE__ */ e(
|
|
143
|
-
|
|
143
|
+
U,
|
|
144
144
|
{
|
|
145
145
|
exclusive: !0,
|
|
146
146
|
color: "accent",
|
|
@@ -167,7 +167,7 @@ function ge({ open: f, onClose: _, showTheme: S = !0 }) {
|
|
|
167
167
|
style: { marginTop: "var(--tz-space-sm)" }
|
|
168
168
|
}
|
|
169
169
|
),
|
|
170
|
-
/* @__PURE__ */ e(
|
|
170
|
+
/* @__PURE__ */ e(z, { style: { margin: "var(--tz-space-md) 0" } })
|
|
171
171
|
] }),
|
|
172
172
|
/* @__PURE__ */ e(l, { variant: "subtitle", as: "h3", children: a("settings.accentTitle") }),
|
|
173
173
|
/* @__PURE__ */ e(
|
|
@@ -180,14 +180,14 @@ function ge({ open: f, onClose: _, showTheme: S = !0 }) {
|
|
|
180
180
|
children: a("settings.accentDesc")
|
|
181
181
|
}
|
|
182
182
|
),
|
|
183
|
-
/* @__PURE__ */ e(
|
|
183
|
+
/* @__PURE__ */ e(Y, { gap: "md", style: { marginTop: "var(--tz-space-sm)" }, children: S ? /* @__PURE__ */ n(A, { children: [
|
|
184
184
|
p("light", a("settings.lightTheme")),
|
|
185
185
|
p("dark", a("settings.darkTheme"))
|
|
186
186
|
] }) : (
|
|
187
187
|
// theme switching is off → the panel stays in one mode, so only that mode's accent matters
|
|
188
188
|
p(d, a(d === "light" ? "settings.lightTheme" : "settings.darkTheme"))
|
|
189
189
|
) }),
|
|
190
|
-
/* @__PURE__ */ e(
|
|
190
|
+
/* @__PURE__ */ e(z, { style: { margin: "var(--tz-space-md) 0" } }),
|
|
191
191
|
/* @__PURE__ */ e(l, { variant: "subtitle", as: "h3", children: a("settings.fontTitle") }),
|
|
192
192
|
/* @__PURE__ */ e(
|
|
193
193
|
l,
|
|
@@ -200,22 +200,22 @@ function ge({ open: f, onClose: _, showTheme: S = !0 }) {
|
|
|
200
200
|
}
|
|
201
201
|
),
|
|
202
202
|
/* @__PURE__ */ e(
|
|
203
|
-
|
|
203
|
+
de,
|
|
204
204
|
{
|
|
205
205
|
label: a("settings.fontFamily"),
|
|
206
206
|
searchable: !0,
|
|
207
207
|
searchPlaceholder: a("settings.fontSearch"),
|
|
208
208
|
value: i,
|
|
209
209
|
options: I,
|
|
210
|
-
onSearchChange:
|
|
210
|
+
onSearchChange: T,
|
|
211
211
|
onChange: (t) => {
|
|
212
|
-
M(t),
|
|
212
|
+
M(t), T("");
|
|
213
213
|
},
|
|
214
214
|
"aria-label": a("settings.fontFamily"),
|
|
215
215
|
style: { marginTop: "var(--tz-space-sm)" }
|
|
216
216
|
}
|
|
217
217
|
),
|
|
218
|
-
/* @__PURE__ */ e(
|
|
218
|
+
/* @__PURE__ */ e(z, { style: { margin: "var(--tz-space-md) 0" } }),
|
|
219
219
|
/* @__PURE__ */ e(l, { variant: "subtitle", as: "h3", children: a("settings.headerTitle") }),
|
|
220
220
|
/* @__PURE__ */ e(
|
|
221
221
|
l,
|
|
@@ -228,7 +228,7 @@ function ge({ open: f, onClose: _, showTheme: S = !0 }) {
|
|
|
228
228
|
}
|
|
229
229
|
),
|
|
230
230
|
/* @__PURE__ */ e(
|
|
231
|
-
|
|
231
|
+
U,
|
|
232
232
|
{
|
|
233
233
|
exclusive: !0,
|
|
234
234
|
color: "accent",
|
|
@@ -253,45 +253,47 @@ function ge({ open: f, onClose: _, showTheme: S = !0 }) {
|
|
|
253
253
|
}
|
|
254
254
|
);
|
|
255
255
|
}
|
|
256
|
-
const
|
|
257
|
-
shell:
|
|
258
|
-
shellCollapsed:
|
|
259
|
-
sidebar:
|
|
260
|
-
sidebarInner:
|
|
261
|
-
sidebarClose:
|
|
262
|
-
backdrop:
|
|
263
|
-
brand:
|
|
264
|
-
sidebarSearch:
|
|
265
|
-
navScroll:
|
|
266
|
-
sidebarFooter:
|
|
267
|
-
headerSearch:
|
|
268
|
-
main:
|
|
269
|
-
topbar:
|
|
270
|
-
topbarSticky:
|
|
271
|
-
headerStart:
|
|
272
|
-
headerEnd:
|
|
273
|
-
account:
|
|
274
|
-
content:
|
|
275
|
-
pageTitle:
|
|
276
|
-
settings:
|
|
256
|
+
const be = "_shell_1xv33_5", ve = "_shellCollapsed_1xv33_21", fe = "_sidebar_1xv33_21", _e = "_sidebarInner_1xv33_49", Se = "_sidebarClose_1xv33_58", xe = "_backdrop_1xv33_65", ye = "_brand_1xv33_70", Ce = "_sidebarSearch_1xv33_86", Te = "_navScroll_1xv33_99", ke = "_sidebarFooter_1xv33_108", Ne = "_headerSearch_1xv33_115", ze = "_main_1xv33_119", we = "_topbar_1xv33_126", Fe = "_topbarSticky_1xv33_139", Le = "_headerStart_1xv33_150", De = "_headerEnd_1xv33_159", Ie = "_account_1xv33_166", Ae = "_content_1xv33_182", Ee = "_pageTitle_1xv33_188", Me = "_settings_1xv33_198", r = {
|
|
257
|
+
shell: be,
|
|
258
|
+
shellCollapsed: ve,
|
|
259
|
+
sidebar: fe,
|
|
260
|
+
sidebarInner: _e,
|
|
261
|
+
sidebarClose: Se,
|
|
262
|
+
backdrop: xe,
|
|
263
|
+
brand: ye,
|
|
264
|
+
sidebarSearch: Ce,
|
|
265
|
+
navScroll: Te,
|
|
266
|
+
sidebarFooter: ke,
|
|
267
|
+
headerSearch: Ne,
|
|
268
|
+
main: ze,
|
|
269
|
+
topbar: we,
|
|
270
|
+
topbarSticky: Fe,
|
|
271
|
+
headerStart: Le,
|
|
272
|
+
headerEnd: De,
|
|
273
|
+
account: Ie,
|
|
274
|
+
content: Ae,
|
|
275
|
+
pageTitle: Ee,
|
|
276
|
+
settings: Me
|
|
277
277
|
};
|
|
278
|
-
function
|
|
278
|
+
function la({
|
|
279
279
|
logo: f,
|
|
280
280
|
sidebarFooter: _,
|
|
281
281
|
header: S,
|
|
282
282
|
toaster: d = !0,
|
|
283
283
|
children: w
|
|
284
284
|
}) {
|
|
285
|
-
const x =
|
|
286
|
-
|
|
285
|
+
const x = oe(), { headerSticky: F } = J(), { language: L, setLanguage: D, languages: y } = he(), i = K(), a = { ...ge(), ...S }, C = a.theme ?? !0, T = a.fullscreen ?? !1, h = a.settings ?? !0, g = a.search ?? !0, H = a.languages ?? !0, I = a.breadcrumbs ?? !0, p = typeof d == "object" ? d : void 0, t = a.pageTitle ?? !0, u = a.onLogout, s = a.user, m = $("md"), [c, b] = E(m);
|
|
286
|
+
P(() => {
|
|
287
287
|
b(m);
|
|
288
|
-
}, [m]),
|
|
289
|
-
const
|
|
290
|
-
|
|
288
|
+
}, [m]), ee(m && !c);
|
|
289
|
+
const V = R({ select: (o) => o.location.pathname });
|
|
290
|
+
P(() => {
|
|
291
291
|
m && b(!0);
|
|
292
|
-
}, [
|
|
293
|
-
const
|
|
294
|
-
|
|
292
|
+
}, [V]);
|
|
293
|
+
const B = R({
|
|
294
|
+
select: (o) => o.statusCode === 404 || o.matches.some((Z) => Z.status === "notFound")
|
|
295
|
+
}), [X, O] = E(!1);
|
|
296
|
+
return /* @__PURE__ */ n("div", { className: j(r.shell, c && r.shellCollapsed), children: [
|
|
295
297
|
/* @__PURE__ */ e("aside", { className: r.sidebar, children: /* @__PURE__ */ n("div", { className: r.sidebarInner, children: [
|
|
296
298
|
f ? /* @__PURE__ */ n("div", { className: r.brand, children: [
|
|
297
299
|
f,
|
|
@@ -307,13 +309,13 @@ function na({
|
|
|
307
309
|
}
|
|
308
310
|
)
|
|
309
311
|
] }) : null,
|
|
310
|
-
g ? /* @__PURE__ */ e("div", { className: r.sidebarSearch, children: /* @__PURE__ */ e(
|
|
311
|
-
/* @__PURE__ */ e("div", { className: r.navScroll, children: /* @__PURE__ */ e(
|
|
312
|
+
g ? /* @__PURE__ */ e("div", { className: r.sidebarSearch, children: /* @__PURE__ */ e(q, {}) }) : null,
|
|
313
|
+
/* @__PURE__ */ e("div", { className: r.navScroll, children: /* @__PURE__ */ e(le, {}) }),
|
|
312
314
|
_ ? /* @__PURE__ */ e("div", { className: r.sidebarFooter, children: _ }) : null
|
|
313
315
|
] }) }),
|
|
314
316
|
/* @__PURE__ */ e("div", { className: r.backdrop, onClick: () => b(!0), "aria-hidden": "true" }),
|
|
315
317
|
/* @__PURE__ */ n("div", { className: r.main, children: [
|
|
316
|
-
/* @__PURE__ */ n("header", { className:
|
|
318
|
+
/* @__PURE__ */ n("header", { className: j(r.topbar, F && r.topbarSticky), children: [
|
|
317
319
|
/* @__PURE__ */ n("div", { className: r.headerStart, children: [
|
|
318
320
|
/* @__PURE__ */ e(
|
|
319
321
|
k,
|
|
@@ -326,23 +328,23 @@ function na({
|
|
|
326
328
|
children: /* @__PURE__ */ e(v, { name: "Menu" })
|
|
327
329
|
}
|
|
328
330
|
),
|
|
329
|
-
g ? /* @__PURE__ */ e("div", { className: r.headerSearch, children: /* @__PURE__ */ e(
|
|
331
|
+
g ? /* @__PURE__ */ e("div", { className: r.headerSearch, children: /* @__PURE__ */ e(q, {}) }) : null
|
|
330
332
|
] }),
|
|
331
333
|
/* @__PURE__ */ n("div", { className: r.headerEnd, children: [
|
|
332
|
-
|
|
333
|
-
|
|
334
|
+
T ? /* @__PURE__ */ e(te, { variant: "filled", size: "sm" }) : null,
|
|
335
|
+
C ? /* @__PURE__ */ e(se, { variant: "filled", size: "sm" }) : null,
|
|
334
336
|
H && y.length > 1 ? /* @__PURE__ */ e(
|
|
335
|
-
|
|
337
|
+
W,
|
|
336
338
|
{
|
|
337
339
|
placement: "bottom-end",
|
|
338
340
|
trigger: /* @__PURE__ */ e(k, { variant: "filled", size: "sm", "aria-label": i("language.label"), children: /* @__PURE__ */ e(v, { name: "Global" }) }),
|
|
339
341
|
children: y.map((o) => /* @__PURE__ */ e(
|
|
340
|
-
|
|
342
|
+
G,
|
|
341
343
|
{
|
|
342
344
|
clickable: !0,
|
|
343
|
-
selected: o.code ===
|
|
345
|
+
selected: o.code === L,
|
|
344
346
|
onClick: () => D(o.code),
|
|
345
|
-
icon: /* @__PURE__ */ e(
|
|
347
|
+
icon: /* @__PURE__ */ e(ie, { code: o.code }),
|
|
346
348
|
children: o.label ?? o.code
|
|
347
349
|
},
|
|
348
350
|
o.code
|
|
@@ -356,50 +358,50 @@ function na({
|
|
|
356
358
|
variant: "text",
|
|
357
359
|
size: "sm",
|
|
358
360
|
className: r.settings,
|
|
359
|
-
onClick: () =>
|
|
361
|
+
onClick: () => O(!0),
|
|
360
362
|
children: /* @__PURE__ */ e(v, { name: "Setting5" })
|
|
361
363
|
}
|
|
362
364
|
) : null,
|
|
363
365
|
u ? /* @__PURE__ */ n(
|
|
364
|
-
|
|
366
|
+
W,
|
|
365
367
|
{
|
|
366
368
|
placement: "bottom-end",
|
|
367
|
-
trigger: /* @__PURE__ */ e("button", { type: "button", className: r.account, "aria-label": i("account.label"), children: /* @__PURE__ */ e(
|
|
369
|
+
trigger: /* @__PURE__ */ e("button", { type: "button", className: r.account, "aria-label": i("account.label"), children: /* @__PURE__ */ e(Q, { size: "md", name: s == null ? void 0 : s.name, src: s == null ? void 0 : s.avatar, color: "primary" }) }),
|
|
368
370
|
children: [
|
|
369
371
|
s ? /* @__PURE__ */ n(A, { children: [
|
|
370
|
-
/* @__PURE__ */ n(
|
|
371
|
-
/* @__PURE__ */ e(
|
|
372
|
-
/* @__PURE__ */ n(
|
|
372
|
+
/* @__PURE__ */ n(ae, { gap: 8, align: "center", padding: "var(--tz-space-xxs) var(--tz-space-sm)", children: [
|
|
373
|
+
/* @__PURE__ */ e(Q, { size: "sm", name: s.name, src: s.avatar, color: "primary" }),
|
|
374
|
+
/* @__PURE__ */ n(Y, { gap: 2, children: [
|
|
373
375
|
s.name ? /* @__PURE__ */ e(l, { variant: "bodySmall", children: s.name }) : null,
|
|
374
376
|
s.email ? /* @__PURE__ */ e(l, { variant: "caption", color: "muted", children: s.email }) : null
|
|
375
377
|
] })
|
|
376
378
|
] }),
|
|
377
|
-
/* @__PURE__ */ e(
|
|
379
|
+
/* @__PURE__ */ e(z, {})
|
|
378
380
|
] }) : null,
|
|
379
|
-
/* @__PURE__ */ e(
|
|
381
|
+
/* @__PURE__ */ e(G, { icon: /* @__PURE__ */ e(v, { name: "Logout2", color: "error" }), clickable: !0, onClick: u, children: i("userCard.signOut") })
|
|
380
382
|
]
|
|
381
383
|
}
|
|
382
384
|
) : null
|
|
383
385
|
] })
|
|
384
386
|
] }),
|
|
385
387
|
/* @__PURE__ */ n("main", { className: r.content, children: [
|
|
386
|
-
I ? /* @__PURE__ */ e(
|
|
387
|
-
t && x ? /* @__PURE__ */ e(l, { variant: "h2", className: r.pageTitle, children: x }) : null,
|
|
388
|
+
I && !B ? /* @__PURE__ */ e(re, {}) : null,
|
|
389
|
+
t && !B && x ? /* @__PURE__ */ e(l, { variant: "h2", className: r.pageTitle, children: x }) : null,
|
|
388
390
|
w
|
|
389
391
|
] })
|
|
390
392
|
] }),
|
|
391
|
-
d !== !1 && /* @__PURE__ */ e(
|
|
393
|
+
d !== !1 && /* @__PURE__ */ e(ne, { ...p }),
|
|
392
394
|
h ? /* @__PURE__ */ e(
|
|
393
|
-
|
|
395
|
+
ue,
|
|
394
396
|
{
|
|
395
|
-
open:
|
|
396
|
-
onClose: () =>
|
|
397
|
-
showTheme:
|
|
397
|
+
open: X,
|
|
398
|
+
onClose: () => O(!1),
|
|
399
|
+
showTheme: C
|
|
398
400
|
}
|
|
399
401
|
) : null
|
|
400
402
|
] });
|
|
401
403
|
}
|
|
402
404
|
export {
|
|
403
|
-
|
|
405
|
+
la as R
|
|
404
406
|
};
|
|
405
|
-
//# sourceMappingURL=RootLayout-
|
|
407
|
+
//# sourceMappingURL=RootLayout-CqQZ6h5c.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RootLayout-CqQZ6h5c.js","sources":["../src/components/RootLayout/SettingsDrawer.tsx","../src/components/RootLayout/RootLayout.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { DEFAULT_FONT_FAMILY, useT, useTheme } from '../../theme'\nimport { Col } from '../Flex'\nimport { Divider } from '../Divider'\nimport { Modal } from '../Modal'\nimport { ChoiceCardGroup } from '../ChoiceCard'\nimport { Select } from '../Select'\nimport { SwatchPicker } from '../SwatchPicker'\nimport { Typography } from '../Typography'\n\n// Accent choices offered alongside the provider's default (which leads each list) — 15 per mode, so\n// each theme shows 16 total. Tuned PER MODE (deeper tones for light, brighter for dark) and paired by\n// hue (red → violet + a neutral) so a color keeps its identity across themes.\nconst ALT_SWATCHES: Record<'light' | 'dark', string[]> = {\n light: [\n '#dc2626', // red\n '#ea580c', // orange\n '#d97706', // amber\n '#ca8a04', // yellow\n '#65a30d', // lime\n '#16a34a', // green\n '#059669', // emerald\n '#0891b2', // cyan\n '#0284c7', // sky\n '#2563eb', // blue\n '#4f46e5', // indigo\n '#7c3aed', // violet\n '#c026d3', // fuchsia\n '#db2777', // pink\n '#475569', // slate\n ],\n dark: [\n '#f87171', // red\n '#fb923c', // orange\n '#fbbf24', // amber\n '#facc15', // yellow\n '#a3e635', // lime\n '#4ade80', // green\n '#34d399', // emerald\n '#22d3ee', // cyan\n '#38bdf8', // sky\n '#60a5fa', // blue\n '#818cf8', // indigo\n '#a78bfa', // violet\n '#e879f9', // fuchsia\n '#f472b6', // pink\n '#94a3b8', // slate\n ],\n}\n\nexport interface SettingsDrawerProps {\n /** Whether the drawer is open. */\n open: boolean\n /** Close handler. */\n onClose: () => void\n /** Show the light/dark **Theme** section (gated by the shell's `header.theme`, the same flag as the header toggle). */\n showTheme?: boolean\n}\n\n/**\n * The header user-menu **Settings** drawer (a right-side `Modal`), top to bottom: a **Theme** section — an\n * exclusive `ChoiceCardGroup` (**Light** / **Dark** cards) driving `useTheme().setMode`, shown only when\n * **`showTheme`** (the shell's `header.theme`, so the header toggle + this section appear/disappear\n * together); **Accent Color** — **two `SwatchPicker`s** (Light + Dark) so both accents are chosen\n * independently, each with a per-mode set (deeper tones for light, brighter for dark), calling\n * `setAccentColor(color, mode)` and persisting it — each list leads with the provider's default for that\n * mode (`defaultAccentColors[mode]`), selected when there's no override (picking it clears the override).\n * When `showTheme` is off the panel is locked to one mode, so **only the active mode's accent picker**\n * shows (the other is pointless without a theme switch);\n * a **Font** section (a searchable `Select` — Inter preset + type any Google Font — driving\n * `setFontFamily`); and a **Header** section (an exclusive `ChoiceCardGroup` **Scrollable** / **Fixed**\n * driving `setHeaderSticky`). Internal to the admin shell — not a public export.\n */\nexport function SettingsDrawer({ open, onClose, showTheme = true }: SettingsDrawerProps) {\n const {\n mode,\n setMode,\n accentColors,\n defaultAccentColors,\n setAccentColor,\n headerSticky,\n setHeaderSticky,\n fontFamily,\n setFontFamily,\n } = useTheme()\n const t = useT()\n\n // One searchable Select doubles as a \"type any Google Font\" field. Base = Inter (the only preset) +\n // the active font (so a custom pick stays visible/selectable). While searching, the typed query is\n // offered as its own option — picking it applies + loads that family. Base is always kept in the\n // list (never filtered out) so `value` always resolves in the trigger, even mid-search.\n const [fontQuery, setFontQuery] = useState('')\n const q = fontQuery.trim()\n const base =\n fontFamily !== DEFAULT_FONT_FAMILY ? [DEFAULT_FONT_FAMILY, fontFamily] : [DEFAULT_FONT_FAMILY]\n const showTyped = q.length > 0 && !base.some((f) => f.toLowerCase() === q.toLowerCase())\n const fontOptions = (showTyped ? [q, ...base] : base).map((f) => ({\n value: f,\n label: f === DEFAULT_FONT_FAMILY ? t('settings.fontDefault', { font: f }) : f,\n }))\n\n const picker = (mode: 'light' | 'dark', label: string) => {\n const def = defaultAccentColors[mode]\n // the provider's default (per mode) leads the list; then the mode's alts (minus any collision)\n const colors = [def, ...ALT_SWATCHES[mode].filter((c) => c.toLowerCase() !== def.toLowerCase())]\n return (\n <SwatchPicker\n label={label}\n colors={colors}\n // with no override, this mode's default swatch reads as selected\n value={accentColors[mode] ?? def}\n // the default swatch clears this mode's override; the rest set it\n onChange={(color) =>\n setAccentColor(color.toLowerCase() === def.toLowerCase() ? null : color, mode)\n }\n labels={{ [def]: t('settings.accentDefault', { color: def }) }}\n aria-label={String(label)}\n />\n )\n }\n\n return (\n <Modal\n open={open}\n onClose={onClose}\n placement=\"right\"\n size=\"sm\"\n title={t('settings.label')}\n icon=\"Setting5\"\n >\n {showTheme && (\n <>\n <Typography variant=\"subtitle\" as=\"h3\">\n {t('settings.themeTitle')}\n </Typography>\n <Typography\n variant=\"bodySmall\"\n color=\"muted\"\n as=\"p\"\n style={{ marginTop: 'var(--tz-space-xxs)' }}\n >\n {t('settings.themeDesc')}\n </Typography>\n <ChoiceCardGroup\n exclusive\n color=\"accent\"\n minCardWidth={130}\n value={mode}\n onChange={(v) => {\n if (typeof v === 'string') setMode(v as 'light' | 'dark')\n }}\n options={[\n {\n value: 'light',\n label: t('settings.light'),\n description: t('settings.lightDesc'),\n icon: 'Sun',\n },\n {\n value: 'dark',\n label: t('settings.dark'),\n description: t('settings.darkDesc'),\n icon: 'Moon',\n },\n ]}\n aria-label={t('settings.themeTitle')}\n style={{ marginTop: 'var(--tz-space-sm)' }}\n />\n\n <Divider style={{ margin: 'var(--tz-space-md) 0' }} />\n </>\n )}\n\n <Typography variant=\"subtitle\" as=\"h3\">\n {t('settings.accentTitle')}\n </Typography>\n <Typography\n variant=\"bodySmall\"\n color=\"muted\"\n as=\"p\"\n style={{ marginTop: 'var(--tz-space-xxs)' }}\n >\n {t('settings.accentDesc')}\n </Typography>\n <Col gap=\"md\" style={{ marginTop: 'var(--tz-space-sm)' }}>\n {showTheme ? (\n <>\n {picker('light', t('settings.lightTheme'))}\n {picker('dark', t('settings.darkTheme'))}\n </>\n ) : (\n // theme switching is off → the panel stays in one mode, so only that mode's accent matters\n picker(mode, mode === 'light' ? t('settings.lightTheme') : t('settings.darkTheme'))\n )}\n </Col>\n\n <Divider style={{ margin: 'var(--tz-space-md) 0' }} />\n\n <Typography variant=\"subtitle\" as=\"h3\">\n {t('settings.fontTitle')}\n </Typography>\n <Typography\n variant=\"bodySmall\"\n color=\"muted\"\n as=\"p\"\n style={{ marginTop: 'var(--tz-space-xxs)' }}\n >\n {t('settings.fontDesc')}\n </Typography>\n <Select\n label={t('settings.fontFamily')}\n searchable\n searchPlaceholder={t('settings.fontSearch')}\n value={fontFamily}\n options={fontOptions}\n onSearchChange={setFontQuery}\n onChange={(v) => {\n setFontFamily(v)\n setFontQuery('')\n }}\n aria-label={t('settings.fontFamily')}\n style={{ marginTop: 'var(--tz-space-sm)' }}\n />\n\n <Divider style={{ margin: 'var(--tz-space-md) 0' }} />\n\n <Typography variant=\"subtitle\" as=\"h3\">\n {t('settings.headerTitle')}\n </Typography>\n <Typography\n variant=\"bodySmall\"\n color=\"muted\"\n as=\"p\"\n style={{ marginTop: 'var(--tz-space-xxs)' }}\n >\n {t('settings.headerDesc')}\n </Typography>\n <ChoiceCardGroup\n exclusive\n color=\"accent\"\n minCardWidth={130}\n value={headerSticky ? 'fixed' : 'static'}\n // exclusive (radio) → always a string; set sticky from the picked card\n onChange={(v) => {\n if (typeof v === 'string') setHeaderSticky(v === 'fixed')\n }}\n options={[\n {\n value: 'static',\n label: t('settings.scrollable'),\n description: t('settings.scrollableDesc'),\n },\n { value: 'fixed', label: t('settings.fixed'), description: t('settings.fixedDesc') },\n ]}\n aria-label={t('settings.headerTitle')}\n style={{ marginTop: 'var(--tz-space-sm)' }}\n />\n </Modal>\n )\n}\n","import { useEffect, useState, type ReactNode } from 'react'\nimport { useRouterState } from '@tanstack/react-router'\nimport { clsx } from 'clsx'\nimport { useMediaQuery } from '../../hooks/useMediaQuery'\nimport { useLockBodyScroll } from '../../hooks/useLockBodyScroll'\nimport {\n useHeaderConfig,\n useLanguage,\n useT,\n useTheme,\n type HeaderConfig,\n type HeaderUser,\n} from '../../theme'\nimport { Avatar } from '../Avatar'\nimport { Col, Row } from '../Flex'\nimport { Divider } from '../Divider'\nimport { Dropdown } from '../Dropdown'\nimport { Icon } from '../Icon'\nimport { IconButton } from '../IconButton'\nimport { ListItem } from '../List'\nimport { FullscreenToggle } from '../FullscreenToggle'\nimport { ThemeToggle } from '../ThemeToggle'\nimport { Typography } from '../Typography'\nimport { Breadcrumbs } from '../Breadcrumbs'\nimport { Toaster, type ToasterProps } from '../Toast'\nimport { NavSearch, Sidebar, usePageTitle } from '../Sidebar/Sidebar'\nimport { Flag } from '../Flag'\nimport { SettingsDrawer } from './SettingsDrawer'\nimport styles from './RootLayout.module.css'\n\n/**\n * The shell header config + its user shape now live in the theme layer (so `config.header` can carry\n * them app-wide). These aliases keep the historical `RootLayout*` names importable.\n */\nexport type RootLayoutUser = HeaderUser\nexport type RootLayoutHeader = HeaderConfig\n\nexport interface RootLayoutProps {\n /** Brand logo at the top of the sidebar card — pass an `<img>`, an `<Icon>`, or any node. */\n logo?: ReactNode\n /** Optional content pinned to the **bottom of the sidebar** (e.g. a promo / \"Need help?\" card). */\n sidebarFooter?: ReactNode\n /**\n * Header config for **this** shell — merged **over** the app-wide `config.header` (the prop wins).\n * Fields: the built-in `theme` / `search` / `settings` / `languages` toggles (default `true`),\n * `fullscreen` (default `false`), `breadcrumbs` (default `true`), `pageTitle` (default `true`), and the\n * account (`onLogout` / `user`).\n */\n header?: RootLayoutHeader\n /**\n * The built-in toast viewport, mounted for you so `toast.*()` works app-wide with no extra setup.\n * Defaults to `true` (a `<Toaster>` with its defaults). Pass `ToasterProps` to configure it\n * (`{ position, duration }`), or `false` to opt out — e.g. when you mount your own `<Toaster>`.\n */\n toaster?: boolean | ToasterProps\n /** Routed content — the consumer passes `<Outlet />`. */\n children: ReactNode\n}\n\n/**\n * The admin-panel shell — a **floating** layout: the whole app sits on a soft `--tz-color-background`\n * canvas, with a rounded, elevated `--tz-color-surface` **sidebar card** (`logo` + auto-generated `Sidebar` + an optional\n * `sidebarFooter`) beside the header + content. Set it as the root route's component and pass\n * `<Outlet />` as `children`; the `Sidebar` builds itself from the routes' `staticData`. The header\n * holds an optional `ThemeToggle` (on by default), a **Settings** button (opens a right-side drawer to\n * pick + persist the `accent` color), plus an account `Avatar` whose menu has a **Sign out** item when\n * `header.onLogout` is given. The content area stacks\n * **`Breadcrumbs` → the page title (the active route's `staticData.name`) → `children`**; pages wrap\n * their own body in `PageLayout`. Set `header.pageTitle = false` to drop the auto `h2` when pages\n * carry their own heading inside their `PageLayout` header. On a 404 the auto title + breadcrumbs are\n * suppressed automatically (a partial route match would otherwise show a stale section), regardless of\n * the `header.pageTitle` / `header.breadcrumbs` props. A `<Toaster>` is **mounted by default** so\n * `toast.*()` works app-wide with no extra setup (configure via `toaster`, or `toaster={false}` to opt\n * out). Styling is token-based, so it follows the active `ConfigProvider` mode. Requires\n * `@tanstack/react-router` (peer).\n */\nexport function RootLayout({\n logo,\n sidebarFooter,\n header,\n toaster = true,\n children,\n}: RootLayoutProps) {\n const title = usePageTitle()\n // header sticky/static — the user's persisted choice (seeded from config.header.sticky)\n const { headerSticky } = useTheme()\n const { language, setLanguage, languages } = useLanguage()\n const t = useT()\n // app-wide header config (config.header) as the base; this shell's `header` prop wins over it\n const configHeader = useHeaderConfig()\n const h: HeaderConfig = { ...configHeader, ...header }\n const showTheme = h.theme ?? true\n const showFullscreen = h.fullscreen ?? false\n const showSettings = h.settings ?? true\n const showSearch = h.search ?? true\n const showLanguages = h.languages ?? true\n const showBreadcrumbs = h.breadcrumbs ?? true\n const toasterProps = typeof toaster === 'object' ? toaster : undefined\n const showPageTitle = h.pageTitle ?? true\n const onLogout = h.onLogout\n const user = h.user\n // below 1280px the sidebar auto-collapses (and auto-expands again above it); a manual toggle holds\n // until the next breakpoint cross. `useMediaQuery` is correct on the first client render, so no flash.\n const isNarrow = useMediaQuery('md') // ≤ 1279.98px — the shared `md` breakpoint\n const [collapsed, setCollapsed] = useState(isNarrow)\n useEffect(() => {\n setCollapsed(isNarrow)\n }, [isNarrow])\n // while the sidebar overlays the content (narrow + open), lock page scroll so scrolling inside the\n // drawer doesn't scroll the content behind it\n useLockBodyScroll(isNarrow && !collapsed)\n // navigating from the overlay drawer (a nav link or a search suggestion — both change the route) auto-\n // closes it, so you land on the page instead of the still-open sidebar; desktop navigation is untouched\n const pathname = useRouterState({ select: (s) => s.location.pathname })\n useEffect(() => {\n if (isNarrow) setCollapsed(true)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [pathname])\n // on a 404 the URL often partially matches a named layout route (e.g. `/core/xxx` still resolves\n // \"Core\" as the active section), so the auto page title + breadcrumbs would show a stale, wrong trail.\n // suppress both when the router is in a notFound state — automatic, no opt-out needed. `statusCode ===\n // 404` is the primary signal; a `notFound` match status is the fallback.\n const isNotFound = useRouterState({\n select: (s) => s.statusCode === 404 || s.matches.some((m) => m.status === 'notFound'),\n })\n const [settingsOpen, setSettingsOpen] = useState(false)\n\n return (\n <div className={clsx(styles.shell, collapsed && styles.shellCollapsed)}>\n <aside className={styles.sidebar}>\n {/* fixed-width inner: the outer <aside> animates its width to 0 (and clips via overflow),\n while this keeps the sidebar's real width so the content never reflows mid-collapse */}\n <div className={styles.sidebarInner}>\n {logo ? (\n <div className={styles.brand}>\n {logo}\n {/* in-drawer close — only shown when the sidebar overlays (narrow), where the header\n toggle is behind the backdrop; closes the drawer */}\n <IconButton\n variant=\"filled\"\n size=\"sm\"\n className={styles.sidebarClose}\n aria-label={t('common.close')}\n onClick={() => setCollapsed(true)}\n >\n <Icon name=\"Close\" />\n </IconButton>\n </div>\n ) : null}\n {/* the search lives in the header on desktop; below 576px (full-width drawer) it moves here,\n between the logo and the menu (CSS toggles which instance shows) */}\n {showSearch ? (\n <div className={styles.sidebarSearch}>\n <NavSearch />\n </div>\n ) : null}\n <div className={styles.navScroll}>\n <Sidebar />\n </div>\n {sidebarFooter ? <div className={styles.sidebarFooter}>{sidebarFooter}</div> : null}\n </div>\n </aside>\n {/* dim backdrop behind the overlay sidebar — a sibling of the sidebar (same stacking context, so the\n sidebar reliably sits above it, unlike a body-portaled Overlay). Only shown/interactive below\n 1280px while open (CSS); clicking it closes the drawer. On desktop the sidebar is a grid column. */}\n <div className={styles.backdrop} onClick={() => setCollapsed(true)} aria-hidden=\"true\" />\n <div className={styles.main}>\n <header className={clsx(styles.topbar, headerSticky && styles.topbarSticky)}>\n <div className={styles.headerStart}>\n <IconButton\n aria-label={collapsed ? 'Show sidebar' : 'Hide sidebar'}\n aria-expanded={!collapsed}\n variant=\"filled\"\n size=\"sm\"\n onClick={() => setCollapsed((c) => !c)}\n >\n <Icon name=\"Menu\" />\n </IconButton>\n {showSearch ? (\n <div className={styles.headerSearch}>\n <NavSearch />\n </div>\n ) : null}\n </div>\n <div className={styles.headerEnd}>\n {showFullscreen ? <FullscreenToggle variant=\"filled\" size=\"sm\" /> : null}\n {showTheme ? <ThemeToggle variant=\"filled\" size=\"sm\" /> : null}\n {showLanguages && languages.length > 1 ? (\n <Dropdown\n placement=\"bottom-end\"\n trigger={\n <IconButton variant=\"filled\" size=\"sm\" aria-label={t('language.label')}>\n <Icon name=\"Global\" />\n </IconButton>\n }\n >\n {languages.map((l) => (\n <ListItem\n key={l.code}\n clickable\n selected={l.code === language}\n onClick={() => setLanguage(l.code)}\n icon={<Flag code={l.code} />}\n >\n {l.label ?? l.code}\n </ListItem>\n ))}\n </Dropdown>\n ) : null}\n {showSettings ? (\n <IconButton\n aria-label={t('settings.label')}\n variant=\"text\"\n size=\"sm\"\n className={styles.settings}\n onClick={() => setSettingsOpen(true)}\n >\n <Icon name=\"Setting5\" />\n </IconButton>\n ) : null}\n {onLogout ? (\n <Dropdown\n placement=\"bottom-end\"\n trigger={\n <button type=\"button\" className={styles.account} aria-label={t('account.label')}>\n <Avatar size=\"md\" name={user?.name} src={user?.avatar} color=\"primary\" />\n </button>\n }\n >\n {user ? (\n <>\n <Row gap={8} align=\"center\" padding=\"var(--tz-space-xxs) var(--tz-space-sm)\">\n <Avatar size=\"sm\" name={user.name} src={user.avatar} color=\"primary\" />\n <Col gap={2}>\n {user.name ? (\n <Typography variant=\"bodySmall\">{user.name}</Typography>\n ) : null}\n {user.email ? (\n <Typography variant=\"caption\" color=\"muted\">\n {user.email}\n </Typography>\n ) : null}\n </Col>\n </Row>\n <Divider />\n </>\n ) : null}\n <ListItem icon={<Icon name=\"Logout2\" color=\"error\" />} clickable onClick={onLogout}>\n {t('userCard.signOut')}\n </ListItem>\n </Dropdown>\n ) : null}\n </div>\n </header>\n <main className={styles.content}>\n {showBreadcrumbs && !isNotFound ? <Breadcrumbs /> : null}\n {showPageTitle && !isNotFound && title ? (\n <Typography variant=\"h2\" className={styles.pageTitle}>\n {title}\n </Typography>\n ) : null}\n {children}\n </main>\n </div>\n {toaster !== false && <Toaster {...toasterProps} />}\n {showSettings ? (\n <SettingsDrawer\n open={settingsOpen}\n onClose={() => setSettingsOpen(false)}\n showTheme={showTheme}\n />\n ) : null}\n </div>\n )\n}\n"],"names":["ALT_SWATCHES","SettingsDrawer","open","onClose","showTheme","mode","setMode","accentColors","defaultAccentColors","setAccentColor","headerSticky","setHeaderSticky","fontFamily","setFontFamily","useTheme","t","useT","fontQuery","setFontQuery","useState","q","base","DEFAULT_FONT_FAMILY","fontOptions","f","picker","label","def","colors","jsx","SwatchPicker","color","jsxs","Modal","Fragment","Typography","ChoiceCardGroup","v","Divider","Col","Select","RootLayout","logo","sidebarFooter","header","toaster","children","title","usePageTitle","language","setLanguage","languages","useLanguage","h","useHeaderConfig","showFullscreen","showSettings","showSearch","showLanguages","showBreadcrumbs","toasterProps","showPageTitle","onLogout","user","isNarrow","useMediaQuery","collapsed","setCollapsed","useEffect","useLockBodyScroll","pathname","useRouterState","s","isNotFound","m","settingsOpen","setSettingsOpen","clsx","styles","IconButton","Icon","NavSearch","Sidebar","c","FullscreenToggle","ThemeToggle","Dropdown","l","ListItem","Flag","Avatar","Row","Breadcrumbs","Toaster"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAaA,MAAMA,KAAmD;AAAA,EACvD,OAAO;AAAA,IACL;AAAA;AAAA,IACA;AAAA;AAAA,IACA;AAAA;AAAA,IACA;AAAA;AAAA,IACA;AAAA;AAAA,IACA;AAAA;AAAA,IACA;AAAA;AAAA,IACA;AAAA;AAAA,IACA;AAAA;AAAA,IACA;AAAA;AAAA,IACA;AAAA;AAAA,IACA;AAAA;AAAA,IACA;AAAA;AAAA,IACA;AAAA;AAAA,IACA;AAAA;AAAA,EAAA;AAAA,EAEF,MAAM;AAAA,IACJ;AAAA;AAAA,IACA;AAAA;AAAA,IACA;AAAA;AAAA,IACA;AAAA;AAAA,IACA;AAAA;AAAA,IACA;AAAA;AAAA,IACA;AAAA;AAAA,IACA;AAAA;AAAA,IACA;AAA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AAkB,EAAA,CACvB;AAAA,cAAA;AAAA,YAAA;AAAA,UAAA,IAEA;AAAA,QAAA,EAAA,CACN;AAAA,MAAA,GACF;AAAA,MACA,gBAAAiB,EAAC,QAAA,EAAK,WAAW8C,EAAO,SACrB,UAAA;AAAA,QAAAnB,KAAmB,CAACc,IAAa,gBAAA5C,EAAC+D,IAAA,CAAA,CAAY,IAAK;AAAA,QACnD/B,KAAiB,CAACY,KAAc1B,IAC/B,gBAAAlB,EAACM,GAAA,EAAW,SAAQ,MAAK,WAAW2C,EAAO,WACxC,UAAA/B,EAAA,CACH,IACE;AAAA,QACHD;AAAA,MAAA,EAAA,CACH;AAAA,IAAA,GACF;AAAA,IACCD,MAAY,MAAS,gBAAAhB,EAACgE,IAAA,EAAS,GAAGjC,EAAA,CAAc;AAAA,IAChDJ,IACC,gBAAA3B;AAAA,MAAC5B;AAAA,MAAA;AAAA,QACC,MAAM0E;AAAA,QACN,SAAS,MAAMC,EAAgB,EAAK;AAAA,QACpC,WAAAxE;AAAA,MAAA;AAAA,IAAA,IAEA;AAAA,EAAA,GACN;AAEJ;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),v=require("react"),O=require("@tanstack/react-router"),P=require("clsx"),J=require("./useMediaQuery-CHMrI6Dy.cjs"),K=require("./useLockBodyScroll-CIXHZo-Q.cjs"),R=require("./Avatar-_ufXh3AY.cjs"),I=require("./Col-BdQeyKEX.cjs"),L=require("./Divider-CzbhdCiD.cjs"),H=require("./Dropdown-Ui7h2TGd.cjs"),b=require("./Icon-CXTl_QAP.cjs"),k=require("./IconButton-BoY2y_pV.cjs"),G=require("./ListItem-DWQorRxG.cjs"),V=require("./FullscreenToggle-MCxGzAEe.cjs"),X=require("./ThemeToggle-Cz5I2-DL.cjs"),o=require("./Typography-BFatE1_A.cjs"),Z=require("./Breadcrumbs-BnxhmyK5.cjs"),$=require("./Toaster-qdS8Urgy.cjs"),F=require("./Sidebar-CT_NUo_7.cjs"),ee=require("./Flag-BJLWKB9J.cjs"),se=require("./Modal-CO3c3sGY.cjs"),Q=require("./ChoiceCardGroup-6eFM1eL0.cjs"),te=require("./Select-DjMZec8c.cjs"),ae=require("./SwatchPicker-DbAU9-ux.cjs"),c=require("./ConfigProvider-BHNx-NHV.cjs"),re={light:["#dc2626","#ea580c","#d97706","#ca8a04","#65a30d","#16a34a","#059669","#0891b2","#0284c7","#2563eb","#4f46e5","#7c3aed","#c026d3","#db2777","#475569"],dark:["#f87171","#fb923c","#fbbf24","#facc15","#a3e635","#4ade80","#34d399","#22d3ee","#38bdf8","#60a5fa","#818cf8","#a78bfa","#e879f9","#f472b6","#94a3b8"]};function ne({open:_,onClose:y,showTheme:j=!0}){const{mode:d,setMode:q,accentColors:T,defaultAccentColors:N,setAccentColor:w,headerSticky:D,setHeaderSticky:S,fontFamily:i,setFontFamily:A}=c.useTheme(),s=c.useT(),[f,C]=v.useState(""),h=f.trim(),g=i!==c.DEFAULT_FONT_FAMILY?[c.DEFAULT_FONT_FAMILY,i]:[c.DEFAULT_FONT_FAMILY],z=(h.length>0&&!g.some(t=>t.toLowerCase()===h.toLowerCase())?[h,...g]:g).map(t=>({value:t,label:t===c.DEFAULT_FONT_FAMILY?s("settings.fontDefault",{font:t}):t})),m=(t,p)=>{const a=N[t],u=[a,...re[t].filter(l=>l.toLowerCase()!==a.toLowerCase())];return e.jsx(ae.SwatchPicker,{label:p,colors:u,value:T[t]??a,onChange:l=>w(l.toLowerCase()===a.toLowerCase()?null:l,t),labels:{[a]:s("settings.accentDefault",{color:a})},"aria-label":String(p)})};return e.jsxs(se.Modal,{open:_,onClose:y,placement:"right",size:"sm",title:s("settings.label"),icon:"Setting5",children:[j&&e.jsxs(e.Fragment,{children:[e.jsx(o.Typography,{variant:"subtitle",as:"h3",children:s("settings.themeTitle")}),e.jsx(o.Typography,{variant:"bodySmall",color:"muted",as:"p",style:{marginTop:"var(--tz-space-xxs)"},children:s("settings.themeDesc")}),e.jsx(Q.ChoiceCardGroup,{exclusive:!0,color:"accent",minCardWidth:130,value:d,onChange:t=>{typeof t=="string"&&q(t)},options:[{value:"light",label:s("settings.light"),description:s("settings.lightDesc"),icon:"Sun"},{value:"dark",label:s("settings.dark"),description:s("settings.darkDesc"),icon:"Moon"}],"aria-label":s("settings.themeTitle"),style:{marginTop:"var(--tz-space-sm)"}}),e.jsx(L.Divider,{style:{margin:"var(--tz-space-md) 0"}})]}),e.jsx(o.Typography,{variant:"subtitle",as:"h3",children:s("settings.accentTitle")}),e.jsx(o.Typography,{variant:"bodySmall",color:"muted",as:"p",style:{marginTop:"var(--tz-space-xxs)"},children:s("settings.accentDesc")}),e.jsx(I.Col,{gap:"md",style:{marginTop:"var(--tz-space-sm)"},children:j?e.jsxs(e.Fragment,{children:[m("light",s("settings.lightTheme")),m("dark",s("settings.darkTheme"))]}):m(d,s(d==="light"?"settings.lightTheme":"settings.darkTheme"))}),e.jsx(L.Divider,{style:{margin:"var(--tz-space-md) 0"}}),e.jsx(o.Typography,{variant:"subtitle",as:"h3",children:s("settings.fontTitle")}),e.jsx(o.Typography,{variant:"bodySmall",color:"muted",as:"p",style:{marginTop:"var(--tz-space-xxs)"},children:s("settings.fontDesc")}),e.jsx(te.Select,{label:s("settings.fontFamily"),searchable:!0,searchPlaceholder:s("settings.fontSearch"),value:i,options:z,onSearchChange:C,onChange:t=>{A(t),C("")},"aria-label":s("settings.fontFamily"),style:{marginTop:"var(--tz-space-sm)"}}),e.jsx(L.Divider,{style:{margin:"var(--tz-space-md) 0"}}),e.jsx(o.Typography,{variant:"subtitle",as:"h3",children:s("settings.headerTitle")}),e.jsx(o.Typography,{variant:"bodySmall",color:"muted",as:"p",style:{marginTop:"var(--tz-space-xxs)"},children:s("settings.headerDesc")}),e.jsx(Q.ChoiceCardGroup,{exclusive:!0,color:"accent",minCardWidth:130,value:D?"fixed":"static",onChange:t=>{typeof t=="string"&&S(t==="fixed")},options:[{value:"static",label:s("settings.scrollable"),description:s("settings.scrollableDesc")},{value:"fixed",label:s("settings.fixed"),description:s("settings.fixedDesc")}],"aria-label":s("settings.headerTitle"),style:{marginTop:"var(--tz-space-sm)"}})]})}const oe="_shell_1xv33_5",ce="_shellCollapsed_1xv33_21",ie="_sidebar_1xv33_21",le="_sidebarInner_1xv33_49",de="_sidebarClose_1xv33_58",ue="_backdrop_1xv33_65",he="_brand_1xv33_70",ge="_sidebarSearch_1xv33_86",me="_navScroll_1xv33_99",pe="_sidebarFooter_1xv33_108",xe="_headerSearch_1xv33_115",be="_main_1xv33_119",ve="_topbar_1xv33_126",_e="_topbarSticky_1xv33_139",ye="_headerStart_1xv33_150",je="_headerEnd_1xv33_159",Te="_account_1xv33_166",Se="_content_1xv33_182",fe="_pageTitle_1xv33_188",Ce="_settings_1xv33_198",r={shell:oe,shellCollapsed:ce,sidebar:ie,sidebarInner:le,sidebarClose:de,backdrop:ue,brand:he,sidebarSearch:ge,navScroll:me,sidebarFooter:pe,headerSearch:xe,main:be,topbar:ve,topbarSticky:_e,headerStart:ye,headerEnd:je,account:Te,content:Se,pageTitle:fe,settings:Ce};function ke({logo:_,sidebarFooter:y,header:j,toaster:d=!0,children:q}){const T=F.usePageTitle(),{headerSticky:N}=c.useTheme(),{language:w,setLanguage:D,languages:S}=c.useLanguage(),i=c.useT(),s={...c.useHeaderConfig(),...j},f=s.theme??!0,C=s.fullscreen??!1,h=s.settings??!0,g=s.search??!0,E=s.languages??!0,z=s.breadcrumbs??!0,m=typeof d=="object"?d:void 0,t=s.pageTitle??!0,p=s.onLogout,a=s.user,u=J.useMediaQuery("md"),[l,x]=v.useState(u);v.useEffect(()=>{x(u)},[u]),K.useLockBodyScroll(u&&!l);const U=O.useRouterState({select:n=>n.location.pathname});v.useEffect(()=>{u&&x(!0)},[U]);const M=O.useRouterState({select:n=>n.statusCode===404||n.matches.some(W=>W.status==="notFound")}),[Y,B]=v.useState(!1);return e.jsxs("div",{className:P.clsx(r.shell,l&&r.shellCollapsed),children:[e.jsx("aside",{className:r.sidebar,children:e.jsxs("div",{className:r.sidebarInner,children:[_?e.jsxs("div",{className:r.brand,children:[_,e.jsx(k.IconButton,{variant:"filled",size:"sm",className:r.sidebarClose,"aria-label":i("common.close"),onClick:()=>x(!0),children:e.jsx(b.Icon,{name:"Close"})})]}):null,g?e.jsx("div",{className:r.sidebarSearch,children:e.jsx(F.NavSearch,{})}):null,e.jsx("div",{className:r.navScroll,children:e.jsx(F.Sidebar,{})}),y?e.jsx("div",{className:r.sidebarFooter,children:y}):null]})}),e.jsx("div",{className:r.backdrop,onClick:()=>x(!0),"aria-hidden":"true"}),e.jsxs("div",{className:r.main,children:[e.jsxs("header",{className:P.clsx(r.topbar,N&&r.topbarSticky),children:[e.jsxs("div",{className:r.headerStart,children:[e.jsx(k.IconButton,{"aria-label":l?"Show sidebar":"Hide sidebar","aria-expanded":!l,variant:"filled",size:"sm",onClick:()=>x(n=>!n),children:e.jsx(b.Icon,{name:"Menu"})}),g?e.jsx("div",{className:r.headerSearch,children:e.jsx(F.NavSearch,{})}):null]}),e.jsxs("div",{className:r.headerEnd,children:[C?e.jsx(V.FullscreenToggle,{variant:"filled",size:"sm"}):null,f?e.jsx(X.ThemeToggle,{variant:"filled",size:"sm"}):null,E&&S.length>1?e.jsx(H.Dropdown,{placement:"bottom-end",trigger:e.jsx(k.IconButton,{variant:"filled",size:"sm","aria-label":i("language.label"),children:e.jsx(b.Icon,{name:"Global"})}),children:S.map(n=>e.jsx(G.ListItem,{clickable:!0,selected:n.code===w,onClick:()=>D(n.code),icon:e.jsx(ee.Flag,{code:n.code}),children:n.label??n.code},n.code))}):null,h?e.jsx(k.IconButton,{"aria-label":i("settings.label"),variant:"text",size:"sm",className:r.settings,onClick:()=>B(!0),children:e.jsx(b.Icon,{name:"Setting5"})}):null,p?e.jsxs(H.Dropdown,{placement:"bottom-end",trigger:e.jsx("button",{type:"button",className:r.account,"aria-label":i("account.label"),children:e.jsx(R.Avatar,{size:"md",name:a==null?void 0:a.name,src:a==null?void 0:a.avatar,color:"primary"})}),children:[a?e.jsxs(e.Fragment,{children:[e.jsxs(I.Row,{gap:8,align:"center",padding:"var(--tz-space-xxs) var(--tz-space-sm)",children:[e.jsx(R.Avatar,{size:"sm",name:a.name,src:a.avatar,color:"primary"}),e.jsxs(I.Col,{gap:2,children:[a.name?e.jsx(o.Typography,{variant:"bodySmall",children:a.name}):null,a.email?e.jsx(o.Typography,{variant:"caption",color:"muted",children:a.email}):null]})]}),e.jsx(L.Divider,{})]}):null,e.jsx(G.ListItem,{icon:e.jsx(b.Icon,{name:"Logout2",color:"error"}),clickable:!0,onClick:p,children:i("userCard.signOut")})]}):null]})]}),e.jsxs("main",{className:r.content,children:[z&&!M?e.jsx(Z.Breadcrumbs,{}):null,t&&!M&&T?e.jsx(o.Typography,{variant:"h2",className:r.pageTitle,children:T}):null,q]})]}),d!==!1&&e.jsx($.Toaster,{...m}),h?e.jsx(ne,{open:Y,onClose:()=>B(!1),showTheme:f}):null]})}exports.RootLayout=ke;
|
|
2
|
+
//# sourceMappingURL=RootLayout-CxMadTU1.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RootLayout-CxMadTU1.cjs","sources":["../src/components/RootLayout/SettingsDrawer.tsx","../src/components/RootLayout/RootLayout.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { DEFAULT_FONT_FAMILY, useT, useTheme } from '../../theme'\nimport { Col } from '../Flex'\nimport { Divider } from '../Divider'\nimport { Modal } from '../Modal'\nimport { ChoiceCardGroup } from '../ChoiceCard'\nimport { Select } from '../Select'\nimport { SwatchPicker } from '../SwatchPicker'\nimport { Typography } from '../Typography'\n\n// Accent choices offered alongside the provider's default (which leads each list) — 15 per mode, so\n// each theme shows 16 total. Tuned PER MODE (deeper tones for light, brighter for dark) and paired by\n// hue (red → violet + a neutral) so a color keeps its identity across themes.\nconst ALT_SWATCHES: Record<'light' | 'dark', string[]> = {\n light: [\n '#dc2626', // red\n '#ea580c', // orange\n '#d97706', // amber\n '#ca8a04', // yellow\n '#65a30d', // lime\n '#16a34a', // green\n '#059669', // emerald\n '#0891b2', // cyan\n '#0284c7', // sky\n '#2563eb', // blue\n '#4f46e5', // indigo\n '#7c3aed', // violet\n '#c026d3', // fuchsia\n '#db2777', // pink\n '#475569', // slate\n ],\n dark: [\n '#f87171', // red\n '#fb923c', // orange\n '#fbbf24', // amber\n '#facc15', // yellow\n '#a3e635', // lime\n '#4ade80', // green\n '#34d399', // emerald\n '#22d3ee', // cyan\n '#38bdf8', // sky\n '#60a5fa', // blue\n '#818cf8', // indigo\n '#a78bfa', // violet\n '#e879f9', // fuchsia\n '#f472b6', // pink\n '#94a3b8', // slate\n ],\n}\n\nexport interface SettingsDrawerProps {\n /** Whether the drawer is open. */\n open: boolean\n /** Close handler. */\n onClose: () => void\n /** Show the light/dark **Theme** section (gated by the shell's `header.theme`, the same flag as the header toggle). */\n showTheme?: boolean\n}\n\n/**\n * The header user-menu **Settings** drawer (a right-side `Modal`), top to bottom: a **Theme** section — an\n * exclusive `ChoiceCardGroup` (**Light** / **Dark** cards) driving `useTheme().setMode`, shown only when\n * **`showTheme`** (the shell's `header.theme`, so the header toggle + this section appear/disappear\n * together); **Accent Color** — **two `SwatchPicker`s** (Light + Dark) so both accents are chosen\n * independently, each with a per-mode set (deeper tones for light, brighter for dark), calling\n * `setAccentColor(color, mode)` and persisting it — each list leads with the provider's default for that\n * mode (`defaultAccentColors[mode]`), selected when there's no override (picking it clears the override).\n * When `showTheme` is off the panel is locked to one mode, so **only the active mode's accent picker**\n * shows (the other is pointless without a theme switch);\n * a **Font** section (a searchable `Select` — Inter preset + type any Google Font — driving\n * `setFontFamily`); and a **Header** section (an exclusive `ChoiceCardGroup` **Scrollable** / **Fixed**\n * driving `setHeaderSticky`). Internal to the admin shell — not a public export.\n */\nexport function SettingsDrawer({ open, onClose, showTheme = true }: SettingsDrawerProps) {\n const {\n mode,\n setMode,\n accentColors,\n defaultAccentColors,\n setAccentColor,\n headerSticky,\n setHeaderSticky,\n fontFamily,\n setFontFamily,\n } = useTheme()\n const t = useT()\n\n // One searchable Select doubles as a \"type any Google Font\" field. Base = Inter (the only preset) +\n // the active font (so a custom pick stays visible/selectable). While searching, the typed query is\n // offered as its own option — picking it applies + loads that family. Base is always kept in the\n // list (never filtered out) so `value` always resolves in the trigger, even mid-search.\n const [fontQuery, setFontQuery] = useState('')\n const q = fontQuery.trim()\n const base =\n fontFamily !== DEFAULT_FONT_FAMILY ? [DEFAULT_FONT_FAMILY, fontFamily] : [DEFAULT_FONT_FAMILY]\n const showTyped = q.length > 0 && !base.some((f) => f.toLowerCase() === q.toLowerCase())\n const fontOptions = (showTyped ? [q, ...base] : base).map((f) => ({\n value: f,\n label: f === DEFAULT_FONT_FAMILY ? t('settings.fontDefault', { font: f }) : f,\n }))\n\n const picker = (mode: 'light' | 'dark', label: string) => {\n const def = defaultAccentColors[mode]\n // the provider's default (per mode) leads the list; then the mode's alts (minus any collision)\n const colors = [def, ...ALT_SWATCHES[mode].filter((c) => c.toLowerCase() !== def.toLowerCase())]\n return (\n <SwatchPicker\n label={label}\n colors={colors}\n // with no override, this mode's default swatch reads as selected\n value={accentColors[mode] ?? def}\n // the default swatch clears this mode's override; the rest set it\n onChange={(color) =>\n setAccentColor(color.toLowerCase() === def.toLowerCase() ? null : color, mode)\n }\n labels={{ [def]: t('settings.accentDefault', { color: def }) }}\n aria-label={String(label)}\n />\n )\n }\n\n return (\n <Modal\n open={open}\n onClose={onClose}\n placement=\"right\"\n size=\"sm\"\n title={t('settings.label')}\n icon=\"Setting5\"\n >\n {showTheme && (\n <>\n <Typography variant=\"subtitle\" as=\"h3\">\n {t('settings.themeTitle')}\n </Typography>\n <Typography\n variant=\"bodySmall\"\n color=\"muted\"\n as=\"p\"\n style={{ marginTop: 'var(--tz-space-xxs)' }}\n >\n {t('settings.themeDesc')}\n </Typography>\n <ChoiceCardGroup\n exclusive\n color=\"accent\"\n minCardWidth={130}\n value={mode}\n onChange={(v) => {\n if (typeof v === 'string') setMode(v as 'light' | 'dark')\n }}\n options={[\n {\n value: 'light',\n label: t('settings.light'),\n description: t('settings.lightDesc'),\n icon: 'Sun',\n },\n {\n value: 'dark',\n label: t('settings.dark'),\n description: t('settings.darkDesc'),\n icon: 'Moon',\n },\n ]}\n aria-label={t('settings.themeTitle')}\n style={{ marginTop: 'var(--tz-space-sm)' }}\n />\n\n <Divider style={{ margin: 'var(--tz-space-md) 0' }} />\n </>\n )}\n\n <Typography variant=\"subtitle\" as=\"h3\">\n {t('settings.accentTitle')}\n </Typography>\n <Typography\n variant=\"bodySmall\"\n color=\"muted\"\n as=\"p\"\n style={{ marginTop: 'var(--tz-space-xxs)' }}\n >\n {t('settings.accentDesc')}\n </Typography>\n <Col gap=\"md\" style={{ marginTop: 'var(--tz-space-sm)' }}>\n {showTheme ? (\n <>\n {picker('light', t('settings.lightTheme'))}\n {picker('dark', t('settings.darkTheme'))}\n </>\n ) : (\n // theme switching is off → the panel stays in one mode, so only that mode's accent matters\n picker(mode, mode === 'light' ? t('settings.lightTheme') : t('settings.darkTheme'))\n )}\n </Col>\n\n <Divider style={{ margin: 'var(--tz-space-md) 0' }} />\n\n <Typography variant=\"subtitle\" as=\"h3\">\n {t('settings.fontTitle')}\n </Typography>\n <Typography\n variant=\"bodySmall\"\n color=\"muted\"\n as=\"p\"\n style={{ marginTop: 'var(--tz-space-xxs)' }}\n >\n {t('settings.fontDesc')}\n </Typography>\n <Select\n label={t('settings.fontFamily')}\n searchable\n searchPlaceholder={t('settings.fontSearch')}\n value={fontFamily}\n options={fontOptions}\n onSearchChange={setFontQuery}\n onChange={(v) => {\n setFontFamily(v)\n setFontQuery('')\n }}\n aria-label={t('settings.fontFamily')}\n style={{ marginTop: 'var(--tz-space-sm)' }}\n />\n\n <Divider style={{ margin: 'var(--tz-space-md) 0' }} />\n\n <Typography variant=\"subtitle\" as=\"h3\">\n {t('settings.headerTitle')}\n </Typography>\n <Typography\n variant=\"bodySmall\"\n color=\"muted\"\n as=\"p\"\n style={{ marginTop: 'var(--tz-space-xxs)' }}\n >\n {t('settings.headerDesc')}\n </Typography>\n <ChoiceCardGroup\n exclusive\n color=\"accent\"\n minCardWidth={130}\n value={headerSticky ? 'fixed' : 'static'}\n // exclusive (radio) → always a string; set sticky from the picked card\n onChange={(v) => {\n if (typeof v === 'string') setHeaderSticky(v === 'fixed')\n }}\n options={[\n {\n value: 'static',\n label: t('settings.scrollable'),\n description: t('settings.scrollableDesc'),\n },\n { value: 'fixed', label: t('settings.fixed'), description: t('settings.fixedDesc') },\n ]}\n aria-label={t('settings.headerTitle')}\n style={{ marginTop: 'var(--tz-space-sm)' }}\n />\n </Modal>\n )\n}\n","import { useEffect, useState, type ReactNode } from 'react'\nimport { useRouterState } from '@tanstack/react-router'\nimport { clsx } from 'clsx'\nimport { useMediaQuery } from '../../hooks/useMediaQuery'\nimport { useLockBodyScroll } from '../../hooks/useLockBodyScroll'\nimport {\n useHeaderConfig,\n useLanguage,\n useT,\n useTheme,\n type HeaderConfig,\n type HeaderUser,\n} from '../../theme'\nimport { Avatar } from '../Avatar'\nimport { Col, Row } from '../Flex'\nimport { Divider } from '../Divider'\nimport { Dropdown } from '../Dropdown'\nimport { Icon } from '../Icon'\nimport { IconButton } from '../IconButton'\nimport { ListItem } from '../List'\nimport { FullscreenToggle } from '../FullscreenToggle'\nimport { ThemeToggle } from '../ThemeToggle'\nimport { Typography } from '../Typography'\nimport { Breadcrumbs } from '../Breadcrumbs'\nimport { Toaster, type ToasterProps } from '../Toast'\nimport { NavSearch, Sidebar, usePageTitle } from '../Sidebar/Sidebar'\nimport { Flag } from '../Flag'\nimport { SettingsDrawer } from './SettingsDrawer'\nimport styles from './RootLayout.module.css'\n\n/**\n * The shell header config + its user shape now live in the theme layer (so `config.header` can carry\n * them app-wide). These aliases keep the historical `RootLayout*` names importable.\n */\nexport type RootLayoutUser = HeaderUser\nexport type RootLayoutHeader = HeaderConfig\n\nexport interface RootLayoutProps {\n /** Brand logo at the top of the sidebar card — pass an `<img>`, an `<Icon>`, or any node. */\n logo?: ReactNode\n /** Optional content pinned to the **bottom of the sidebar** (e.g. a promo / \"Need help?\" card). */\n sidebarFooter?: ReactNode\n /**\n * Header config for **this** shell — merged **over** the app-wide `config.header` (the prop wins).\n * Fields: the built-in `theme` / `search` / `settings` / `languages` toggles (default `true`),\n * `fullscreen` (default `false`), `breadcrumbs` (default `true`), `pageTitle` (default `true`), and the\n * account (`onLogout` / `user`).\n */\n header?: RootLayoutHeader\n /**\n * The built-in toast viewport, mounted for you so `toast.*()` works app-wide with no extra setup.\n * Defaults to `true` (a `<Toaster>` with its defaults). Pass `ToasterProps` to configure it\n * (`{ position, duration }`), or `false` to opt out — e.g. when you mount your own `<Toaster>`.\n */\n toaster?: boolean | ToasterProps\n /** Routed content — the consumer passes `<Outlet />`. */\n children: ReactNode\n}\n\n/**\n * The admin-panel shell — a **floating** layout: the whole app sits on a soft `--tz-color-background`\n * canvas, with a rounded, elevated `--tz-color-surface` **sidebar card** (`logo` + auto-generated `Sidebar` + an optional\n * `sidebarFooter`) beside the header + content. Set it as the root route's component and pass\n * `<Outlet />` as `children`; the `Sidebar` builds itself from the routes' `staticData`. The header\n * holds an optional `ThemeToggle` (on by default), a **Settings** button (opens a right-side drawer to\n * pick + persist the `accent` color), plus an account `Avatar` whose menu has a **Sign out** item when\n * `header.onLogout` is given. The content area stacks\n * **`Breadcrumbs` → the page title (the active route's `staticData.name`) → `children`**; pages wrap\n * their own body in `PageLayout`. Set `header.pageTitle = false` to drop the auto `h2` when pages\n * carry their own heading inside their `PageLayout` header. On a 404 the auto title + breadcrumbs are\n * suppressed automatically (a partial route match would otherwise show a stale section), regardless of\n * the `header.pageTitle` / `header.breadcrumbs` props. A `<Toaster>` is **mounted by default** so\n * `toast.*()` works app-wide with no extra setup (configure via `toaster`, or `toaster={false}` to opt\n * out). Styling is token-based, so it follows the active `ConfigProvider` mode. Requires\n * `@tanstack/react-router` (peer).\n */\nexport function RootLayout({\n logo,\n sidebarFooter,\n header,\n toaster = true,\n children,\n}: RootLayoutProps) {\n const title = usePageTitle()\n // header sticky/static — the user's persisted choice (seeded from config.header.sticky)\n const { headerSticky } = useTheme()\n const { language, setLanguage, languages } = useLanguage()\n const t = useT()\n // app-wide header config (config.header) as the base; this shell's `header` prop wins over it\n const configHeader = useHeaderConfig()\n const h: HeaderConfig = { ...configHeader, ...header }\n const showTheme = h.theme ?? true\n const showFullscreen = h.fullscreen ?? false\n const showSettings = h.settings ?? true\n const showSearch = h.search ?? true\n const showLanguages = h.languages ?? true\n const showBreadcrumbs = h.breadcrumbs ?? true\n const toasterProps = typeof toaster === 'object' ? toaster : undefined\n const showPageTitle = h.pageTitle ?? true\n const onLogout = h.onLogout\n const user = h.user\n // below 1280px the sidebar auto-collapses (and auto-expands again above it); a manual toggle holds\n // until the next breakpoint cross. `useMediaQuery` is correct on the first client render, so no flash.\n const isNarrow = useMediaQuery('md') // ≤ 1279.98px — the shared `md` breakpoint\n const [collapsed, setCollapsed] = useState(isNarrow)\n useEffect(() => {\n setCollapsed(isNarrow)\n }, [isNarrow])\n // while the sidebar overlays the content (narrow + open), lock page scroll so scrolling inside the\n // drawer doesn't scroll the content behind it\n useLockBodyScroll(isNarrow && !collapsed)\n // navigating from the overlay drawer (a nav link or a search suggestion — both change the route) auto-\n // closes it, so you land on the page instead of the still-open sidebar; desktop navigation is untouched\n const pathname = useRouterState({ select: (s) => s.location.pathname })\n useEffect(() => {\n if (isNarrow) setCollapsed(true)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [pathname])\n // on a 404 the URL often partially matches a named layout route (e.g. `/core/xxx` still resolves\n // \"Core\" as the active section), so the auto page title + breadcrumbs would show a stale, wrong trail.\n // suppress both when the router is in a notFound state — automatic, no opt-out needed. `statusCode ===\n // 404` is the primary signal; a `notFound` match status is the fallback.\n const isNotFound = useRouterState({\n select: (s) => s.statusCode === 404 || s.matches.some((m) => m.status === 'notFound'),\n })\n const [settingsOpen, setSettingsOpen] = useState(false)\n\n return (\n <div className={clsx(styles.shell, collapsed && styles.shellCollapsed)}>\n <aside className={styles.sidebar}>\n {/* fixed-width inner: the outer <aside> animates its width to 0 (and clips via overflow),\n while this keeps the sidebar's real width so the content never reflows mid-collapse */}\n <div className={styles.sidebarInner}>\n {logo ? (\n <div className={styles.brand}>\n {logo}\n {/* in-drawer close — only shown when the sidebar overlays (narrow), where the header\n toggle is behind the backdrop; closes the drawer */}\n <IconButton\n variant=\"filled\"\n size=\"sm\"\n className={styles.sidebarClose}\n aria-label={t('common.close')}\n onClick={() => setCollapsed(true)}\n >\n <Icon name=\"Close\" />\n </IconButton>\n </div>\n ) : null}\n {/* the search lives in the header on desktop; below 576px (full-width drawer) it moves here,\n between the logo and the menu (CSS toggles which instance shows) */}\n {showSearch ? (\n <div className={styles.sidebarSearch}>\n <NavSearch />\n </div>\n ) : null}\n <div className={styles.navScroll}>\n <Sidebar />\n </div>\n {sidebarFooter ? <div className={styles.sidebarFooter}>{sidebarFooter}</div> : null}\n </div>\n </aside>\n {/* dim backdrop behind the overlay sidebar — a sibling of the sidebar (same stacking context, so the\n sidebar reliably sits above it, unlike a body-portaled Overlay). Only shown/interactive below\n 1280px while open (CSS); clicking it closes the drawer. On desktop the sidebar is a grid column. */}\n <div className={styles.backdrop} onClick={() => setCollapsed(true)} aria-hidden=\"true\" />\n <div className={styles.main}>\n <header className={clsx(styles.topbar, headerSticky && styles.topbarSticky)}>\n <div className={styles.headerStart}>\n <IconButton\n aria-label={collapsed ? 'Show sidebar' : 'Hide sidebar'}\n aria-expanded={!collapsed}\n variant=\"filled\"\n size=\"sm\"\n onClick={() => setCollapsed((c) => !c)}\n >\n <Icon name=\"Menu\" />\n </IconButton>\n {showSearch ? (\n <div className={styles.headerSearch}>\n <NavSearch />\n </div>\n ) : null}\n </div>\n <div className={styles.headerEnd}>\n {showFullscreen ? <FullscreenToggle variant=\"filled\" size=\"sm\" /> : null}\n {showTheme ? <ThemeToggle variant=\"filled\" size=\"sm\" /> : null}\n {showLanguages && languages.length > 1 ? (\n <Dropdown\n placement=\"bottom-end\"\n trigger={\n <IconButton variant=\"filled\" size=\"sm\" aria-label={t('language.label')}>\n <Icon name=\"Global\" />\n </IconButton>\n }\n >\n {languages.map((l) => (\n <ListItem\n key={l.code}\n clickable\n selected={l.code === language}\n onClick={() => setLanguage(l.code)}\n icon={<Flag code={l.code} />}\n >\n {l.label ?? l.code}\n </ListItem>\n ))}\n </Dropdown>\n ) : null}\n {showSettings ? (\n <IconButton\n aria-label={t('settings.label')}\n variant=\"text\"\n size=\"sm\"\n className={styles.settings}\n onClick={() => setSettingsOpen(true)}\n >\n <Icon name=\"Setting5\" />\n </IconButton>\n ) : null}\n {onLogout ? (\n <Dropdown\n placement=\"bottom-end\"\n trigger={\n <button type=\"button\" className={styles.account} aria-label={t('account.label')}>\n <Avatar size=\"md\" name={user?.name} src={user?.avatar} color=\"primary\" />\n </button>\n }\n >\n {user ? (\n <>\n <Row gap={8} align=\"center\" padding=\"var(--tz-space-xxs) var(--tz-space-sm)\">\n <Avatar size=\"sm\" name={user.name} src={user.avatar} color=\"primary\" />\n <Col gap={2}>\n {user.name ? (\n <Typography variant=\"bodySmall\">{user.name}</Typography>\n ) : null}\n {user.email ? (\n <Typography variant=\"caption\" color=\"muted\">\n {user.email}\n </Typography>\n ) : null}\n </Col>\n </Row>\n <Divider />\n </>\n ) : null}\n <ListItem icon={<Icon name=\"Logout2\" color=\"error\" />} clickable onClick={onLogout}>\n {t('userCard.signOut')}\n </ListItem>\n </Dropdown>\n ) : null}\n </div>\n </header>\n <main className={styles.content}>\n {showBreadcrumbs && !isNotFound ? <Breadcrumbs /> : null}\n {showPageTitle && !isNotFound && title ? (\n <Typography variant=\"h2\" className={styles.pageTitle}>\n {title}\n </Typography>\n ) : null}\n {children}\n </main>\n </div>\n {toaster !== false && <Toaster {...toasterProps} />}\n {showSettings ? (\n <SettingsDrawer\n open={settingsOpen}\n onClose={() => setSettingsOpen(false)}\n showTheme={showTheme}\n />\n ) : null}\n </div>\n )\n}\n"],"names":["ALT_SWATCHES","SettingsDrawer","open","onClose","showTheme","mode","setMode","accentColors","defaultAccentColors","setAccentColor","headerSticky","setHeaderSticky","fontFamily","setFontFamily","useTheme","t","useT","fontQuery","setFontQuery","useState","q","base","DEFAULT_FONT_FAMILY","fontOptions","f","picker","label","def","colors","c","jsx","SwatchPicker","color","jsxs","Modal","Fragment","Typography","ChoiceCardGroup","v","Divider","Col","Select","RootLayout","logo","sidebarFooter","header","toaster","children","title","usePageTitle","language","setLanguage","languages","useLanguage","h","useHeaderConfig","showFullscreen","showSettings","showSearch","showLanguages","showBreadcrumbs","toasterProps","showPageTitle","onLogout","user","isNarrow","useMediaQuery","collapsed","setCollapsed","useEffect","useLockBodyScroll","pathname","useRouterState","s","isNotFound","m","settingsOpen","setSettingsOpen","clsx","styles","IconButton","Icon","NavSearch","Sidebar","FullscreenToggle","ThemeToggle","Dropdown","l","ListItem","Flag","Avatar","Row","Breadcrumbs","Toaster"],"mappings":"k6BAaMA,GAAmD,CACvD,MAAO,CACL,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,SAAA,EAEF,KAAM,CACJ,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,SAAA,CAEJ,EAyBO,SAASC,GAAe,CAAE,KAAAC,EAAM,QAAAC,EAAS,UAAAC,EAAY,IAA6B,CACvF,KAAM,CACJ,KAAAC,EACA,QAAAC,EACA,aAAAC,EACA,oBAAAC,EACA,eAAAC,EACA,aAAAC,EACA,gBAAAC,EACA,WAAAC,EACA,cAAAC,CAAA,EACEC,WAAA,EACEC,EAAIC,EAAAA,KAAA,EAMJ,CAACC,EAAWC,CAAY,EAAIC,EAAAA,SAAS,EAAE,EACvCC,EAAIH,EAAU,KAAA,EACdI,EACJT,IAAeU,EAAAA,oBAAsB,CAACA,EAAAA,oBAAqBV,CAAU,EAAI,CAACU,qBAAmB,EAEz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38,7 +38,9 @@ export interface RootLayoutProps {
|
|
|
38
38
|
* `header.onLogout` is given. The content area stacks
|
|
39
39
|
* **`Breadcrumbs` → the page title (the active route's `staticData.name`) → `children`**; pages wrap
|
|
40
40
|
* their own body in `PageLayout`. Set `header.pageTitle = false` to drop the auto `h2` when pages
|
|
41
|
-
* carry their own heading inside their `PageLayout` header.
|
|
41
|
+
* carry their own heading inside their `PageLayout` header. On a 404 the auto title + breadcrumbs are
|
|
42
|
+
* suppressed automatically (a partial route match would otherwise show a stale section), regardless of
|
|
43
|
+
* the `header.pageTitle` / `header.breadcrumbs` props. A `<Toaster>` is **mounted by default** so
|
|
42
44
|
* `toast.*()` works app-wide with no extra setup (configure via `toaster`, or `toaster={false}` to opt
|
|
43
45
|
* out). Styling is token-based, so it follows the active `ConfigProvider` mode. Requires
|
|
44
46
|
* `@tanstack/react-router` (peer).
|
|
@@ -38,7 +38,9 @@ export interface RootLayoutProps {
|
|
|
38
38
|
* `header.onLogout` is given. The content area stacks
|
|
39
39
|
* **`Breadcrumbs` → the page title (the active route's `staticData.name`) → `children`**; pages wrap
|
|
40
40
|
* their own body in `PageLayout`. Set `header.pageTitle = false` to drop the auto `h2` when pages
|
|
41
|
-
* carry their own heading inside their `PageLayout` header.
|
|
41
|
+
* carry their own heading inside their `PageLayout` header. On a 404 the auto title + breadcrumbs are
|
|
42
|
+
* suppressed automatically (a partial route match would otherwise show a stale section), regardless of
|
|
43
|
+
* the `header.pageTitle` / `header.breadcrumbs` props. A `<Toaster>` is **mounted by default** so
|
|
42
44
|
* `toast.*()` works app-wide with no extra setup (configure via `toaster`, or `toaster={false}` to opt
|
|
43
45
|
* out). Styling is token-based, so it follows the active `ConfigProvider` mode. Requires
|
|
44
46
|
* `@tanstack/react-router` (peer).
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../../RootLayout-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../../RootLayout-CxMadTU1.cjs");exports.RootLayout=o.RootLayout;exports.default=o.RootLayout;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../Form-Bz2xgkEm.cjs"),e=require("../Accordion-Dy_dM79Y.cjs"),l=require("../Alert-D99G0StL.cjs"),d=require("../AuthLayout-pvqB9w-B.cjs"),q=require("../Avatar-_ufXh3AY.cjs"),T=require("../AvatarGroup-TW1pt4tj.cjs"),p=require("../Badge-BQpr2Jee.cjs"),g=require("../Blockquote-CxHwOecc.cjs"),C=require("../Breadcrumbs-BnxhmyK5.cjs"),F=require("../Button-Cj6pckNl.cjs"),m=require("../Card-DD9SWHzZ.cjs"),S=require("../Checkbox-DXOzYIAz.cjs"),h=require("../Chip-B2lY4TJ0.cjs"),r=require("../ChoiceCardGroup-6eFM1eL0.cjs"),B=require("../Code-CUdpWlY5.cjs"),P=require("../CodeBlock-EhB7v9-R.cjs"),o=require("../Col-BdQeyKEX.cjs"),y=require("../ColorPicker-Dc1y9Zuu.cjs"),k=require("../CopyButton-D_DCLHhb.cjs"),D=require("../DashedButton-q7AOqKUE.cjs"),A=require("../DatePicker-CEczjGZy.cjs"),b=require("../DateTimePicker-CDyGxUBX.cjs"),R=require("../Divider-CzbhdCiD.cjs"),L=require("../Dropdown-Ui7h2TGd.cjs"),I=require("../EmptyState-B77utgEn.cjs"),v=require("../FileCard-CsGW2sxE.cjs"),x=require("../FileUploader-DDi_uzIx.cjs"),t=require("../Sidebar-CT_NUo_7.cjs"),G=require("../Flag-BJLWKB9J.cjs"),M=require("../Flex-C6tHC8n7.cjs"),N=require("../FullscreenToggle-MCxGzAEe.cjs"),w=require("../Grid-frN0D9lR.cjs"),i=require("../names-C2Yj1p3u.cjs"),O=require("../Icon-CXTl_QAP.cjs"),E=require("../IconButton-BoY2y_pV.cjs"),U=require("../List-ChXO0Hz-.cjs"),_=require("../ListItem-DWQorRxG.cjs"),f=require("../Loader-Cwb1bOHj.cjs"),j=require("../Masonry-9LrJKlhI.cjs"),z=require("../Modal-CO3c3sGY.cjs"),H=require("../MultiSelect-DVOVHuIm.cjs"),J=require("../MultilineTextField-Dz6Fg8RJ.cjs"),K=require("../NumberField-BH237Vt2.cjs"),Q=require("../OtpField-CXP59zM2.cjs"),V=require("../PageLayout-CuVuZEbR.cjs"),W=require("../PageNotFound-CxLUFoJa.cjs"),X=require("../Pagination-Dcs_Znx3.cjs"),Y=require("../Popover-CBI1icIM.cjs"),c=require("../RadioGroup-C8u7eNBS.cjs"),Z=require("../RemoveDialog-Cwtq9wAt.cjs"),$=require("../RichTextEditor-GxbnzLRe.cjs"),ee=require("../RootLayout-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../Form-Bz2xgkEm.cjs"),e=require("../Accordion-Dy_dM79Y.cjs"),l=require("../Alert-D99G0StL.cjs"),d=require("../AuthLayout-pvqB9w-B.cjs"),q=require("../Avatar-_ufXh3AY.cjs"),T=require("../AvatarGroup-TW1pt4tj.cjs"),p=require("../Badge-BQpr2Jee.cjs"),g=require("../Blockquote-CxHwOecc.cjs"),C=require("../Breadcrumbs-BnxhmyK5.cjs"),F=require("../Button-Cj6pckNl.cjs"),m=require("../Card-DD9SWHzZ.cjs"),S=require("../Checkbox-DXOzYIAz.cjs"),h=require("../Chip-B2lY4TJ0.cjs"),r=require("../ChoiceCardGroup-6eFM1eL0.cjs"),B=require("../Code-CUdpWlY5.cjs"),P=require("../CodeBlock-EhB7v9-R.cjs"),o=require("../Col-BdQeyKEX.cjs"),y=require("../ColorPicker-Dc1y9Zuu.cjs"),k=require("../CopyButton-D_DCLHhb.cjs"),D=require("../DashedButton-q7AOqKUE.cjs"),A=require("../DatePicker-CEczjGZy.cjs"),b=require("../DateTimePicker-CDyGxUBX.cjs"),R=require("../Divider-CzbhdCiD.cjs"),L=require("../Dropdown-Ui7h2TGd.cjs"),I=require("../EmptyState-B77utgEn.cjs"),v=require("../FileCard-CsGW2sxE.cjs"),x=require("../FileUploader-DDi_uzIx.cjs"),t=require("../Sidebar-CT_NUo_7.cjs"),G=require("../Flag-BJLWKB9J.cjs"),M=require("../Flex-C6tHC8n7.cjs"),N=require("../FullscreenToggle-MCxGzAEe.cjs"),w=require("../Grid-frN0D9lR.cjs"),i=require("../names-C2Yj1p3u.cjs"),O=require("../Icon-CXTl_QAP.cjs"),E=require("../IconButton-BoY2y_pV.cjs"),U=require("../List-ChXO0Hz-.cjs"),_=require("../ListItem-DWQorRxG.cjs"),f=require("../Loader-Cwb1bOHj.cjs"),j=require("../Masonry-9LrJKlhI.cjs"),z=require("../Modal-CO3c3sGY.cjs"),H=require("../MultiSelect-DVOVHuIm.cjs"),J=require("../MultilineTextField-Dz6Fg8RJ.cjs"),K=require("../NumberField-BH237Vt2.cjs"),Q=require("../OtpField-CXP59zM2.cjs"),V=require("../PageLayout-CuVuZEbR.cjs"),W=require("../PageNotFound-CxLUFoJa.cjs"),X=require("../Pagination-Dcs_Znx3.cjs"),Y=require("../Popover-CBI1icIM.cjs"),c=require("../RadioGroup-C8u7eNBS.cjs"),Z=require("../RemoveDialog-Cwtq9wAt.cjs"),$=require("../RichTextEditor-GxbnzLRe.cjs"),ee=require("../RootLayout-CxMadTU1.cjs"),re=require("../Select-DjMZec8c.cjs"),oe=require("../Slider-dxYVXRev.cjs"),u=require("../SpeedDial-CyiPagdu.cjs"),te=require("../Stepper-PW7c45PV.cjs"),ie=require("../SwatchPicker-DbAU9-ux.cjs"),ce=require("../Switch-DRkZ6kHJ.cjs"),ue=require("../Table-C_Ov-kvK.cjs"),ne=require("../Tabs-CaHTJ99w.cjs"),ae=require("../TagsField-BQIwSX5m.cjs"),se=require("../TextField-fmt7aacg.cjs"),le=require("../ThemeToggle-Cz5I2-DL.cjs"),de=require("../TimePicker-B-c6uIaY.cjs"),n=require("../Timeline-CoxW0Ia_.cjs"),qe=require("../Toaster-qdS8Urgy.cjs"),a=require("../ToggleButtonGroup-DYRLwKKh.cjs"),Te=require("../Tooltip-Ao7az09p.cjs"),pe=require("../TranslatedFields-C30ww45c.cjs"),ge=require("../Typography-BFatE1_A.cjs"),Ce=require("../UserCard-C8rC_gzD.cjs"),Fe=require("../toastStore-B4Tk2Xk7.cjs");exports.Form=s.Form;exports.Accordion=e.Accordion;exports.AccordionItem=e.AccordionItem;exports.Alert=l.Alert;exports.AuthLayout=d.AuthLayout;exports.Avatar=q.Avatar;exports.AvatarGroup=T.AvatarGroup;exports.Badge=p.Badge;exports.Blockquote=g.Blockquote;exports.Breadcrumbs=C.Breadcrumbs;exports.Button=F.Button;exports.Card=m.Card;exports.Checkbox=S.Checkbox;exports.Chip=h.Chip;exports.ChoiceCard=r.ChoiceCard;exports.ChoiceCardGroup=r.ChoiceCardGroup;exports.Code=B.Code;exports.CodeBlock=P.CodeBlock;exports.Col=o.Col;exports.Row=o.Row;exports.ColorPicker=y.ColorPicker;exports.CopyButton=k.CopyButton;exports.DashedButton=D.DashedButton;exports.DatePicker=A.DatePicker;exports.DateTimePicker=b.DateTimePicker;exports.Divider=R.Divider;exports.Dropdown=L.Dropdown;exports.EmptyState=I.EmptyState;exports.FileCard=v.FileCard;exports.FileUploader=x.FileUploader;exports.FirstRouteRedirect=t.FirstRouteRedirect;exports.Sidebar=t.Sidebar;exports.Flag=G.Flag;exports.Flex=M.Flex;exports.FullscreenToggle=N.FullscreenToggle;exports.Grid=w.Grid;exports.ICON_COUNT=i.ICON_COUNT;exports.ICON_NAMES=i.ICON_NAMES;exports.Icon=O.Icon;exports.IconButton=E.IconButton;exports.List=U.List;exports.ListItem=_.ListItem;exports.Loader=f.Loader;exports.Masonry=j.Masonry;exports.Modal=z.Modal;exports.MultiSelect=H.MultiSelect;exports.MultilineTextField=J.MultilineTextField;exports.NumberField=K.NumberField;exports.OtpField=Q.OtpField;exports.PageLayout=V.PageLayout;exports.PageNotFound=W.PageNotFound;exports.Pagination=X.Pagination;exports.Popover=Y.Popover;exports.Radio=c.Radio;exports.RadioGroup=c.RadioGroup;exports.RemoveDialog=Z.RemoveDialog;exports.RichTextEditor=$.RichTextEditor;exports.RootLayout=ee.RootLayout;exports.Select=re.Select;exports.Slider=oe.Slider;exports.SpeedDial=u.SpeedDial;exports.SpeedDialAction=u.SpeedDialAction;exports.Stepper=te.Stepper;exports.SwatchPicker=ie.SwatchPicker;exports.Switch=ce.Switch;exports.Table=ue.Table;exports.Tabs=ne.Tabs;exports.TagsField=ae.TagsField;exports.TextField=se.TextField;exports.ThemeToggle=le.ThemeToggle;exports.TimePicker=de.TimePicker;exports.Timeline=n.Timeline;exports.TimelineItem=n.TimelineItem;exports.Toaster=qe.Toaster;exports.ToggleButton=a.ToggleButton;exports.ToggleButtonGroup=a.ToggleButtonGroup;exports.Tooltip=Te.Tooltip;exports.TranslatedFields=pe.TranslatedFields;exports.Typography=ge.Typography;exports.UserCard=Ce.UserCard;exports.toast=Fe.toast;
|
|
2
2
|
//# sourceMappingURL=components.cjs.map
|
|
@@ -49,7 +49,7 @@ import { P as Vo } from "../Popover-CgIU4Rhg.js";
|
|
|
49
49
|
import { R as Xo, a as Yo } from "../RadioGroup-DbodUJW8.js";
|
|
50
50
|
import { R as $o } from "../RemoveDialog-DU6MqkO8.js";
|
|
51
51
|
import { R as rr } from "../RichTextEditor-k-NlWb4Y.js";
|
|
52
|
-
import { R as ar } from "../RootLayout-
|
|
52
|
+
import { R as ar } from "../RootLayout-CqQZ6h5c.js";
|
|
53
53
|
import { S as sr } from "../Select-D7KJ-YMU.js";
|
|
54
54
|
import { S as mr } from "../Slider-oGXd5e9X.js";
|
|
55
55
|
import { S as fr, a as ir } from "../SpeedDial-DEWzAGXi.js";
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./Form-Bz2xgkEm.cjs"),s=require("./useForm-C7erBHt0.cjs"),S=require("./useLockBodyScroll-CIXHZo-Q.cjs"),u=require("./useMediaQuery-CHMrI6Dy.cjs"),m=require("./useClipboard-BjTIX-4g.cjs"),o=require("./access-DPUHbE-S.cjs"),e=require("./ConfigProvider-BHNx-NHV.cjs"),i=require("./messages-Jxz2YMcA.cjs"),r=require("./translations-CXEeeUDL.cjs"),a=require("./table-CZRQGNdk.cjs"),n=require("./authLayoutRoute-CkR9IANN.cjs"),c=require("./Icon-CXTl_QAP.cjs"),l=require("./Accordion-Dy_dM79Y.cjs"),E=require("./Alert-D99G0StL.cjs"),h=require("./AuthLayout-pvqB9w-B.cjs"),b=require("./Avatar-_ufXh3AY.cjs"),B=require("./AvatarGroup-TW1pt4tj.cjs"),t=require("./breakpoints-Dpnh6BbG.cjs"),L=require("./Badge-BQpr2Jee.cjs"),D=require("./Blockquote-CxHwOecc.cjs"),R=require("./Breadcrumbs-BnxhmyK5.cjs"),P=require("./Button-Cj6pckNl.cjs"),N=require("./Card-DD9SWHzZ.cjs"),_=require("./Checkbox-DXOzYIAz.cjs"),k=require("./Chip-B2lY4TJ0.cjs"),d=require("./ChoiceCardGroup-6eFM1eL0.cjs"),I=require("./Code-CUdpWlY5.cjs"),M=require("./CodeBlock-EhB7v9-R.cjs"),T=require("./Col-BdQeyKEX.cjs"),U=require("./ColorPicker-Dc1y9Zuu.cjs"),v=require("./CopyButton-D_DCLHhb.cjs"),Q=require("./DashedButton-q7AOqKUE.cjs"),K=require("./DatePicker-CEczjGZy.cjs"),O=require("./DateTimePicker-CDyGxUBX.cjs"),G=require("./Divider-CzbhdCiD.cjs"),x=require("./Dropdown-Ui7h2TGd.cjs"),Y=require("./EmptyState-B77utgEn.cjs"),f=require("./FileCard-CsGW2sxE.cjs"),w=require("./FileUploader-DDi_uzIx.cjs"),q=require("./Sidebar-CT_NUo_7.cjs"),H=require("./Flag-BJLWKB9J.cjs"),j=require("./Flex-C6tHC8n7.cjs"),z=require("./FullscreenToggle-MCxGzAEe.cjs"),J=require("./Grid-frN0D9lR.cjs"),p=require("./names-C2Yj1p3u.cjs"),V=require("./IconButton-BoY2y_pV.cjs"),W=require("./List-ChXO0Hz-.cjs"),X=require("./ListItem-DWQorRxG.cjs"),Z=require("./Loader-Cwb1bOHj.cjs"),$=require("./Masonry-9LrJKlhI.cjs"),ee=require("./Modal-CO3c3sGY.cjs"),re=require("./MultiSelect-DVOVHuIm.cjs"),oe=require("./MultilineTextField-Dz6Fg8RJ.cjs"),te=require("./NumberField-BH237Vt2.cjs"),ie=require("./OtpField-CXP59zM2.cjs"),se=require("./PageLayout-CuVuZEbR.cjs"),ue=require("./PageNotFound-CxLUFoJa.cjs"),ae=require("./Pagination-Dcs_Znx3.cjs"),ne=require("./Popover-CBI1icIM.cjs"),g=require("./RadioGroup-C8u7eNBS.cjs"),ce=require("./RemoveDialog-Cwtq9wAt.cjs"),le=require("./RichTextEditor-GxbnzLRe.cjs"),de=require("./RootLayout-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./Form-Bz2xgkEm.cjs"),s=require("./useForm-C7erBHt0.cjs"),S=require("./useLockBodyScroll-CIXHZo-Q.cjs"),u=require("./useMediaQuery-CHMrI6Dy.cjs"),m=require("./useClipboard-BjTIX-4g.cjs"),o=require("./access-DPUHbE-S.cjs"),e=require("./ConfigProvider-BHNx-NHV.cjs"),i=require("./messages-Jxz2YMcA.cjs"),r=require("./translations-CXEeeUDL.cjs"),a=require("./table-CZRQGNdk.cjs"),n=require("./authLayoutRoute-CkR9IANN.cjs"),c=require("./Icon-CXTl_QAP.cjs"),l=require("./Accordion-Dy_dM79Y.cjs"),E=require("./Alert-D99G0StL.cjs"),h=require("./AuthLayout-pvqB9w-B.cjs"),b=require("./Avatar-_ufXh3AY.cjs"),B=require("./AvatarGroup-TW1pt4tj.cjs"),t=require("./breakpoints-Dpnh6BbG.cjs"),L=require("./Badge-BQpr2Jee.cjs"),D=require("./Blockquote-CxHwOecc.cjs"),R=require("./Breadcrumbs-BnxhmyK5.cjs"),P=require("./Button-Cj6pckNl.cjs"),N=require("./Card-DD9SWHzZ.cjs"),_=require("./Checkbox-DXOzYIAz.cjs"),k=require("./Chip-B2lY4TJ0.cjs"),d=require("./ChoiceCardGroup-6eFM1eL0.cjs"),I=require("./Code-CUdpWlY5.cjs"),M=require("./CodeBlock-EhB7v9-R.cjs"),T=require("./Col-BdQeyKEX.cjs"),U=require("./ColorPicker-Dc1y9Zuu.cjs"),v=require("./CopyButton-D_DCLHhb.cjs"),Q=require("./DashedButton-q7AOqKUE.cjs"),K=require("./DatePicker-CEczjGZy.cjs"),O=require("./DateTimePicker-CDyGxUBX.cjs"),G=require("./Divider-CzbhdCiD.cjs"),x=require("./Dropdown-Ui7h2TGd.cjs"),Y=require("./EmptyState-B77utgEn.cjs"),f=require("./FileCard-CsGW2sxE.cjs"),w=require("./FileUploader-DDi_uzIx.cjs"),q=require("./Sidebar-CT_NUo_7.cjs"),H=require("./Flag-BJLWKB9J.cjs"),j=require("./Flex-C6tHC8n7.cjs"),z=require("./FullscreenToggle-MCxGzAEe.cjs"),J=require("./Grid-frN0D9lR.cjs"),p=require("./names-C2Yj1p3u.cjs"),V=require("./IconButton-BoY2y_pV.cjs"),W=require("./List-ChXO0Hz-.cjs"),X=require("./ListItem-DWQorRxG.cjs"),Z=require("./Loader-Cwb1bOHj.cjs"),$=require("./Masonry-9LrJKlhI.cjs"),ee=require("./Modal-CO3c3sGY.cjs"),re=require("./MultiSelect-DVOVHuIm.cjs"),oe=require("./MultilineTextField-Dz6Fg8RJ.cjs"),te=require("./NumberField-BH237Vt2.cjs"),ie=require("./OtpField-CXP59zM2.cjs"),se=require("./PageLayout-CuVuZEbR.cjs"),ue=require("./PageNotFound-CxLUFoJa.cjs"),ae=require("./Pagination-Dcs_Znx3.cjs"),ne=require("./Popover-CBI1icIM.cjs"),g=require("./RadioGroup-C8u7eNBS.cjs"),ce=require("./RemoveDialog-Cwtq9wAt.cjs"),le=require("./RichTextEditor-GxbnzLRe.cjs"),de=require("./RootLayout-CxMadTU1.cjs"),Te=require("./Select-DjMZec8c.cjs"),qe=require("./Slider-dxYVXRev.cjs"),y=require("./SpeedDial-CyiPagdu.cjs"),pe=require("./Stepper-PW7c45PV.cjs"),ge=require("./SwatchPicker-DbAU9-ux.cjs"),ye=require("./Switch-DRkZ6kHJ.cjs"),Fe=require("./Table-C_Ov-kvK.cjs"),Ae=require("./Tabs-CaHTJ99w.cjs"),Ce=require("./TagsField-BQIwSX5m.cjs"),Se=require("./TextField-fmt7aacg.cjs"),me=require("./ThemeToggle-Cz5I2-DL.cjs"),Ee=require("./TimePicker-B-c6uIaY.cjs"),F=require("./Timeline-CoxW0Ia_.cjs"),he=require("./Toaster-qdS8Urgy.cjs"),A=require("./ToggleButtonGroup-DYRLwKKh.cjs"),be=require("./Tooltip-Ao7az09p.cjs"),Be=require("./TranslatedFields-C30ww45c.cjs"),Le=require("./Typography-BFatE1_A.cjs"),De=require("./UserCard-C8rC_gzD.cjs"),Re=require("./toastStore-B4Tk2Xk7.cjs");exports.Form=C.Form;exports.useDisclosure=s.useDisclosure;exports.useForm=s.useForm;exports.useLockBodyScroll=S.useLockBodyScroll;exports.useBreakpointMatches=u.useBreakpointMatches;exports.useMediaQuery=u.useMediaQuery;exports.useClipboard=m.useClipboard;exports.getAccessKeys=o.getAccessKeys;exports.hasAccess=o.hasAccess;exports.setAccessKeys=o.setAccessKeys;exports.useAccessKeys=o.useAccessKeys;exports.ConfigProvider=e.ConfigProvider;exports.DEFAULT_FONT_FAMILY=e.DEFAULT_FONT_FAMILY;exports.DEFAULT_NESTED_TAB_QUERY_KEY=e.DEFAULT_NESTED_TAB_QUERY_KEY;exports.DEFAULT_STEP_QUERY_KEY=e.DEFAULT_STEP_QUERY_KEY;exports.DEFAULT_TABS_QUERY_KEY=e.DEFAULT_TABS_QUERY_KEY;exports.applyTheme=e.applyTheme;exports.useHeaderConfig=e.useHeaderConfig;exports.useLanguage=e.useLanguage;exports.useLocales=e.useLocales;exports.useNestedTabQueryKey=e.useNestedTabQueryKey;exports.useStepQueryKey=e.useStepQueryKey;exports.useT=e.useT;exports.useTableQueryConfig=e.useTableQueryConfig;exports.useTabsQueryKey=e.useTabsQueryKey;exports.useTheme=e.useTheme;exports.useTranslations=e.useTranslations;exports.useTranslationsNamespace=e.useTranslationsNamespace;exports.createAppTranslator=i.createAppTranslator;exports.createTranslator=i.createTranslator;exports.flagFor=i.flagFor;exports.DEFAULT_TRANSLATIONS_NAMESPACE=r.DEFAULT_TRANSLATIONS_NAMESPACE;exports.buildTranslationName=r.buildTranslationName;exports.buildTranslations=r.buildTranslations;exports.flattenTranslations=r.flattenTranslations;exports.nestTranslations=r.nestTranslations;exports.toFormData=r.toFormData;exports.buildTableQuery=a.buildTableQuery;exports.parseTableQuery=a.parseTableQuery;exports.AuthGuard=n.AuthGuard;exports.authLayoutRoute=n.authLayoutRoute;exports.Icon=c.Icon;exports.icons=c.icons;exports.Accordion=l.Accordion;exports.AccordionItem=l.AccordionItem;exports.Alert=E.Alert;exports.AuthLayout=h.AuthLayout;exports.Avatar=b.Avatar;exports.AvatarGroup=B.AvatarGroup;exports.BREAKPOINTS=t.BREAKPOINTS;exports.BREAKPOINT_ORDER=t.BREAKPOINT_ORDER;exports.breakpointQuery=t.breakpointQuery;exports.resolveResponsive=t.resolveResponsive;exports.Badge=L.Badge;exports.Blockquote=D.Blockquote;exports.Breadcrumbs=R.Breadcrumbs;exports.Button=P.Button;exports.Card=N.Card;exports.Checkbox=_.Checkbox;exports.Chip=k.Chip;exports.ChoiceCard=d.ChoiceCard;exports.ChoiceCardGroup=d.ChoiceCardGroup;exports.Code=I.Code;exports.CodeBlock=M.CodeBlock;exports.Col=T.Col;exports.Row=T.Row;exports.ColorPicker=U.ColorPicker;exports.CopyButton=v.CopyButton;exports.DashedButton=Q.DashedButton;exports.DatePicker=K.DatePicker;exports.DateTimePicker=O.DateTimePicker;exports.Divider=G.Divider;exports.Dropdown=x.Dropdown;exports.EmptyState=Y.EmptyState;exports.FileCard=f.FileCard;exports.FileUploader=w.FileUploader;exports.FirstRouteRedirect=q.FirstRouteRedirect;exports.Sidebar=q.Sidebar;exports.Flag=H.Flag;exports.Flex=j.Flex;exports.FullscreenToggle=z.FullscreenToggle;exports.Grid=J.Grid;exports.ICON_COUNT=p.ICON_COUNT;exports.ICON_NAMES=p.ICON_NAMES;exports.IconButton=V.IconButton;exports.List=W.List;exports.ListItem=X.ListItem;exports.Loader=Z.Loader;exports.Masonry=$.Masonry;exports.Modal=ee.Modal;exports.MultiSelect=re.MultiSelect;exports.MultilineTextField=oe.MultilineTextField;exports.NumberField=te.NumberField;exports.OtpField=ie.OtpField;exports.PageLayout=se.PageLayout;exports.PageNotFound=ue.PageNotFound;exports.Pagination=ae.Pagination;exports.Popover=ne.Popover;exports.Radio=g.Radio;exports.RadioGroup=g.RadioGroup;exports.RemoveDialog=ce.RemoveDialog;exports.RichTextEditor=le.RichTextEditor;exports.RootLayout=de.RootLayout;exports.Select=Te.Select;exports.Slider=qe.Slider;exports.SpeedDial=y.SpeedDial;exports.SpeedDialAction=y.SpeedDialAction;exports.Stepper=pe.Stepper;exports.SwatchPicker=ge.SwatchPicker;exports.Switch=ye.Switch;exports.Table=Fe.Table;exports.Tabs=Ae.Tabs;exports.TagsField=Ce.TagsField;exports.TextField=Se.TextField;exports.ThemeToggle=me.ThemeToggle;exports.TimePicker=Ee.TimePicker;exports.Timeline=F.Timeline;exports.TimelineItem=F.TimelineItem;exports.Toaster=he.Toaster;exports.ToggleButton=A.ToggleButton;exports.ToggleButtonGroup=A.ToggleButtonGroup;exports.Tooltip=be.Tooltip;exports.TranslatedFields=Be.TranslatedFields;exports.Typography=Le.Typography;exports.UserCard=De.UserCard;exports.toast=Re.toast;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -60,7 +60,7 @@ import { P as Wr } from "./Popover-CgIU4Rhg.js";
|
|
|
60
60
|
import { R as Zr, a as $r } from "./RadioGroup-DbodUJW8.js";
|
|
61
61
|
import { R as re } from "./RemoveDialog-DU6MqkO8.js";
|
|
62
62
|
import { R as ae } from "./RichTextEditor-k-NlWb4Y.js";
|
|
63
|
-
import { R as te } from "./RootLayout-
|
|
63
|
+
import { R as te } from "./RootLayout-CqQZ6h5c.js";
|
|
64
64
|
import { S as me } from "./Select-D7KJ-YMU.js";
|
|
65
65
|
import { S as xe } from "./Slider-oGXd5e9X.js";
|
|
66
66
|
import { S as ue, a as Te } from "./SpeedDial-DEWzAGXi.js";
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),v=require("react"),U=require("@tanstack/react-router"),B=require("clsx"),Y=require("./useMediaQuery-CHMrI6Dy.cjs"),W=require("./useLockBodyScroll-CIXHZo-Q.cjs"),O=require("./Avatar-_ufXh3AY.cjs"),I=require("./Col-BdQeyKEX.cjs"),L=require("./Divider-CzbhdCiD.cjs"),P=require("./Dropdown-Ui7h2TGd.cjs"),b=require("./Icon-CXTl_QAP.cjs"),k=require("./IconButton-BoY2y_pV.cjs"),H=require("./ListItem-DWQorRxG.cjs"),J=require("./FullscreenToggle-MCxGzAEe.cjs"),K=require("./ThemeToggle-Cz5I2-DL.cjs"),n=require("./Typography-BFatE1_A.cjs"),V=require("./Breadcrumbs-BnxhmyK5.cjs"),X=require("./Toaster-qdS8Urgy.cjs"),F=require("./Sidebar-CT_NUo_7.cjs"),Z=require("./Flag-BJLWKB9J.cjs"),$=require("./Modal-CO3c3sGY.cjs"),R=require("./ChoiceCardGroup-6eFM1eL0.cjs"),ee=require("./Select-DjMZec8c.cjs"),se=require("./SwatchPicker-DbAU9-ux.cjs"),c=require("./ConfigProvider-BHNx-NHV.cjs"),ae={light:["#dc2626","#ea580c","#d97706","#ca8a04","#65a30d","#16a34a","#059669","#0891b2","#0284c7","#2563eb","#4f46e5","#7c3aed","#c026d3","#db2777","#475569"],dark:["#f87171","#fb923c","#fbbf24","#facc15","#a3e635","#4ade80","#34d399","#22d3ee","#38bdf8","#60a5fa","#818cf8","#a78bfa","#e879f9","#f472b6","#94a3b8"]};function te({open:_,onClose:y,showTheme:j=!0}){const{mode:d,setMode:q,accentColors:T,defaultAccentColors:N,setAccentColor:w,headerSticky:D,setHeaderSticky:f,fontFamily:i,setFontFamily:A}=c.useTheme(),s=c.useT(),[S,C]=v.useState(""),h=S.trim(),g=i!==c.DEFAULT_FONT_FAMILY?[c.DEFAULT_FONT_FAMILY,i]:[c.DEFAULT_FONT_FAMILY],z=(h.length>0&&!g.some(a=>a.toLowerCase()===h.toLowerCase())?[h,...g]:g).map(a=>({value:a,label:a===c.DEFAULT_FONT_FAMILY?s("settings.fontDefault",{font:a}):a})),m=(a,p)=>{const t=N[a],u=[t,...ae[a].filter(l=>l.toLowerCase()!==t.toLowerCase())];return e.jsx(se.SwatchPicker,{label:p,colors:u,value:T[a]??t,onChange:l=>w(l.toLowerCase()===t.toLowerCase()?null:l,a),labels:{[t]:s("settings.accentDefault",{color:t})},"aria-label":String(p)})};return e.jsxs($.Modal,{open:_,onClose:y,placement:"right",size:"sm",title:s("settings.label"),icon:"Setting5",children:[j&&e.jsxs(e.Fragment,{children:[e.jsx(n.Typography,{variant:"subtitle",as:"h3",children:s("settings.themeTitle")}),e.jsx(n.Typography,{variant:"bodySmall",color:"muted",as:"p",style:{marginTop:"var(--tz-space-xxs)"},children:s("settings.themeDesc")}),e.jsx(R.ChoiceCardGroup,{exclusive:!0,color:"accent",minCardWidth:130,value:d,onChange:a=>{typeof a=="string"&&q(a)},options:[{value:"light",label:s("settings.light"),description:s("settings.lightDesc"),icon:"Sun"},{value:"dark",label:s("settings.dark"),description:s("settings.darkDesc"),icon:"Moon"}],"aria-label":s("settings.themeTitle"),style:{marginTop:"var(--tz-space-sm)"}}),e.jsx(L.Divider,{style:{margin:"var(--tz-space-md) 0"}})]}),e.jsx(n.Typography,{variant:"subtitle",as:"h3",children:s("settings.accentTitle")}),e.jsx(n.Typography,{variant:"bodySmall",color:"muted",as:"p",style:{marginTop:"var(--tz-space-xxs)"},children:s("settings.accentDesc")}),e.jsx(I.Col,{gap:"md",style:{marginTop:"var(--tz-space-sm)"},children:j?e.jsxs(e.Fragment,{children:[m("light",s("settings.lightTheme")),m("dark",s("settings.darkTheme"))]}):m(d,s(d==="light"?"settings.lightTheme":"settings.darkTheme"))}),e.jsx(L.Divider,{style:{margin:"var(--tz-space-md) 0"}}),e.jsx(n.Typography,{variant:"subtitle",as:"h3",children:s("settings.fontTitle")}),e.jsx(n.Typography,{variant:"bodySmall",color:"muted",as:"p",style:{marginTop:"var(--tz-space-xxs)"},children:s("settings.fontDesc")}),e.jsx(ee.Select,{label:s("settings.fontFamily"),searchable:!0,searchPlaceholder:s("settings.fontSearch"),value:i,options:z,onSearchChange:C,onChange:a=>{A(a),C("")},"aria-label":s("settings.fontFamily"),style:{marginTop:"var(--tz-space-sm)"}}),e.jsx(L.Divider,{style:{margin:"var(--tz-space-md) 0"}}),e.jsx(n.Typography,{variant:"subtitle",as:"h3",children:s("settings.headerTitle")}),e.jsx(n.Typography,{variant:"bodySmall",color:"muted",as:"p",style:{marginTop:"var(--tz-space-xxs)"},children:s("settings.headerDesc")}),e.jsx(R.ChoiceCardGroup,{exclusive:!0,color:"accent",minCardWidth:130,value:D?"fixed":"static",onChange:a=>{typeof a=="string"&&f(a==="fixed")},options:[{value:"static",label:s("settings.scrollable"),description:s("settings.scrollableDesc")},{value:"fixed",label:s("settings.fixed"),description:s("settings.fixedDesc")}],"aria-label":s("settings.headerTitle"),style:{marginTop:"var(--tz-space-sm)"}})]})}const re="_shell_1xv33_5",ne="_shellCollapsed_1xv33_21",oe="_sidebar_1xv33_21",ce="_sidebarInner_1xv33_49",ie="_sidebarClose_1xv33_58",le="_backdrop_1xv33_65",de="_brand_1xv33_70",ue="_sidebarSearch_1xv33_86",he="_navScroll_1xv33_99",ge="_sidebarFooter_1xv33_108",me="_headerSearch_1xv33_115",pe="_main_1xv33_119",xe="_topbar_1xv33_126",be="_topbarSticky_1xv33_139",ve="_headerStart_1xv33_150",_e="_headerEnd_1xv33_159",ye="_account_1xv33_166",je="_content_1xv33_182",Te="_pageTitle_1xv33_188",fe="_settings_1xv33_198",r={shell:re,shellCollapsed:ne,sidebar:oe,sidebarInner:ce,sidebarClose:ie,backdrop:le,brand:de,sidebarSearch:ue,navScroll:he,sidebarFooter:ge,headerSearch:me,main:pe,topbar:xe,topbarSticky:be,headerStart:ve,headerEnd:_e,account:ye,content:je,pageTitle:Te,settings:fe};function Se({logo:_,sidebarFooter:y,header:j,toaster:d=!0,children:q}){const T=F.usePageTitle(),{headerSticky:N}=c.useTheme(),{language:w,setLanguage:D,languages:f}=c.useLanguage(),i=c.useT(),s={...c.useHeaderConfig(),...j},S=s.theme??!0,C=s.fullscreen??!1,h=s.settings??!0,g=s.search??!0,E=s.languages??!0,z=s.breadcrumbs??!0,m=typeof d=="object"?d:void 0,a=s.pageTitle??!0,p=s.onLogout,t=s.user,u=Y.useMediaQuery("md"),[l,x]=v.useState(u);v.useEffect(()=>{x(u)},[u]),W.useLockBodyScroll(u&&!l);const G=U.useRouterState({select:o=>o.location.pathname});v.useEffect(()=>{u&&x(!0)},[G]);const[Q,M]=v.useState(!1);return e.jsxs("div",{className:B.clsx(r.shell,l&&r.shellCollapsed),children:[e.jsx("aside",{className:r.sidebar,children:e.jsxs("div",{className:r.sidebarInner,children:[_?e.jsxs("div",{className:r.brand,children:[_,e.jsx(k.IconButton,{variant:"filled",size:"sm",className:r.sidebarClose,"aria-label":i("common.close"),onClick:()=>x(!0),children:e.jsx(b.Icon,{name:"Close"})})]}):null,g?e.jsx("div",{className:r.sidebarSearch,children:e.jsx(F.NavSearch,{})}):null,e.jsx("div",{className:r.navScroll,children:e.jsx(F.Sidebar,{})}),y?e.jsx("div",{className:r.sidebarFooter,children:y}):null]})}),e.jsx("div",{className:r.backdrop,onClick:()=>x(!0),"aria-hidden":"true"}),e.jsxs("div",{className:r.main,children:[e.jsxs("header",{className:B.clsx(r.topbar,N&&r.topbarSticky),children:[e.jsxs("div",{className:r.headerStart,children:[e.jsx(k.IconButton,{"aria-label":l?"Show sidebar":"Hide sidebar","aria-expanded":!l,variant:"filled",size:"sm",onClick:()=>x(o=>!o),children:e.jsx(b.Icon,{name:"Menu"})}),g?e.jsx("div",{className:r.headerSearch,children:e.jsx(F.NavSearch,{})}):null]}),e.jsxs("div",{className:r.headerEnd,children:[C?e.jsx(J.FullscreenToggle,{variant:"filled",size:"sm"}):null,S?e.jsx(K.ThemeToggle,{variant:"filled",size:"sm"}):null,E&&f.length>1?e.jsx(P.Dropdown,{placement:"bottom-end",trigger:e.jsx(k.IconButton,{variant:"filled",size:"sm","aria-label":i("language.label"),children:e.jsx(b.Icon,{name:"Global"})}),children:f.map(o=>e.jsx(H.ListItem,{clickable:!0,selected:o.code===w,onClick:()=>D(o.code),icon:e.jsx(Z.Flag,{code:o.code}),children:o.label??o.code},o.code))}):null,h?e.jsx(k.IconButton,{"aria-label":i("settings.label"),variant:"text",size:"sm",className:r.settings,onClick:()=>M(!0),children:e.jsx(b.Icon,{name:"Setting5"})}):null,p?e.jsxs(P.Dropdown,{placement:"bottom-end",trigger:e.jsx("button",{type:"button",className:r.account,"aria-label":i("account.label"),children:e.jsx(O.Avatar,{size:"md",name:t==null?void 0:t.name,src:t==null?void 0:t.avatar,color:"primary"})}),children:[t?e.jsxs(e.Fragment,{children:[e.jsxs(I.Row,{gap:8,align:"center",padding:"var(--tz-space-xxs) var(--tz-space-sm)",children:[e.jsx(O.Avatar,{size:"sm",name:t.name,src:t.avatar,color:"primary"}),e.jsxs(I.Col,{gap:2,children:[t.name?e.jsx(n.Typography,{variant:"bodySmall",children:t.name}):null,t.email?e.jsx(n.Typography,{variant:"caption",color:"muted",children:t.email}):null]})]}),e.jsx(L.Divider,{})]}):null,e.jsx(H.ListItem,{icon:e.jsx(b.Icon,{name:"Logout2",color:"error"}),clickable:!0,onClick:p,children:i("userCard.signOut")})]}):null]})]}),e.jsxs("main",{className:r.content,children:[z?e.jsx(V.Breadcrumbs,{}):null,a&&T?e.jsx(n.Typography,{variant:"h2",className:r.pageTitle,children:T}):null,q]})]}),d!==!1&&e.jsx(X.Toaster,{...m}),h?e.jsx(te,{open:Q,onClose:()=>M(!1),showTheme:S}):null]})}exports.RootLayout=Se;
|
|
2
|
-
//# sourceMappingURL=RootLayout-4GV6dfdB.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RootLayout-4GV6dfdB.cjs","sources":["../src/components/RootLayout/SettingsDrawer.tsx","../src/components/RootLayout/RootLayout.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { DEFAULT_FONT_FAMILY, useT, useTheme } from '../../theme'\nimport { Col } from '../Flex'\nimport { Divider } from '../Divider'\nimport { Modal } from '../Modal'\nimport { ChoiceCardGroup } from '../ChoiceCard'\nimport { Select } from '../Select'\nimport { SwatchPicker } from '../SwatchPicker'\nimport { Typography } from '../Typography'\n\n// Accent choices offered alongside the provider's default (which leads each list) — 15 per mode, so\n// each theme shows 16 total. Tuned PER MODE (deeper tones for light, brighter for dark) and paired by\n// hue (red → violet + a neutral) so a color keeps its identity across themes.\nconst ALT_SWATCHES: Record<'light' | 'dark', string[]> = {\n light: [\n '#dc2626', // red\n '#ea580c', // orange\n '#d97706', // amber\n '#ca8a04', // yellow\n '#65a30d', // lime\n '#16a34a', // green\n '#059669', // emerald\n '#0891b2', // cyan\n '#0284c7', // sky\n '#2563eb', // blue\n '#4f46e5', // indigo\n '#7c3aed', // violet\n '#c026d3', // fuchsia\n '#db2777', // pink\n '#475569', // slate\n ],\n dark: [\n '#f87171', // red\n '#fb923c', // orange\n '#fbbf24', // amber\n '#facc15', // yellow\n '#a3e635', // lime\n '#4ade80', // green\n '#34d399', // emerald\n '#22d3ee', // cyan\n '#38bdf8', // sky\n '#60a5fa', // blue\n '#818cf8', // indigo\n '#a78bfa', // violet\n '#e879f9', // fuchsia\n '#f472b6', // pink\n '#94a3b8', // slate\n ],\n}\n\nexport interface SettingsDrawerProps {\n /** Whether the drawer is open. */\n open: boolean\n /** Close handler. */\n onClose: () => void\n /** Show the light/dark **Theme** section (gated by the shell's `header.theme`, the same flag as the header toggle). */\n showTheme?: boolean\n}\n\n/**\n * The header user-menu **Settings** drawer (a right-side `Modal`), top to bottom: a **Theme** section — an\n * exclusive `ChoiceCardGroup` (**Light** / **Dark** cards) driving `useTheme().setMode`, shown only when\n * **`showTheme`** (the shell's `header.theme`, so the header toggle + this section appear/disappear\n * together); **Accent Color** — **two `SwatchPicker`s** (Light + Dark) so both accents are chosen\n * independently, each with a per-mode set (deeper tones for light, brighter for dark), calling\n * `setAccentColor(color, mode)` and persisting it — each list leads with the provider's default for that\n * mode (`defaultAccentColors[mode]`), selected when there's no override (picking it clears the override).\n * When `showTheme` is off the panel is locked to one mode, so **only the active mode's accent picker**\n * shows (the other is pointless without a theme switch);\n * a **Font** section (a searchable `Select` — Inter preset + type any Google Font — driving\n * `setFontFamily`); and a **Header** section (an exclusive `ChoiceCardGroup` **Scrollable** / **Fixed**\n * driving `setHeaderSticky`). Internal to the admin shell — not a public export.\n */\nexport function SettingsDrawer({ open, onClose, showTheme = true }: SettingsDrawerProps) {\n const {\n mode,\n setMode,\n accentColors,\n defaultAccentColors,\n setAccentColor,\n headerSticky,\n setHeaderSticky,\n fontFamily,\n setFontFamily,\n } = useTheme()\n const t = useT()\n\n // One searchable Select doubles as a \"type any Google Font\" field. Base = Inter (the only preset) +\n // the active font (so a custom pick stays visible/selectable). While searching, the typed query is\n // offered as its own option — picking it applies + loads that family. Base is always kept in the\n // list (never filtered out) so `value` always resolves in the trigger, even mid-search.\n const [fontQuery, setFontQuery] = useState('')\n const q = fontQuery.trim()\n const base =\n fontFamily !== DEFAULT_FONT_FAMILY ? [DEFAULT_FONT_FAMILY, fontFamily] : [DEFAULT_FONT_FAMILY]\n const showTyped = q.length > 0 && !base.some((f) => f.toLowerCase() === q.toLowerCase())\n const fontOptions = (showTyped ? [q, ...base] : base).map((f) => ({\n value: f,\n label: f === DEFAULT_FONT_FAMILY ? t('settings.fontDefault', { font: f }) : f,\n }))\n\n const picker = (mode: 'light' | 'dark', label: string) => {\n const def = defaultAccentColors[mode]\n // the provider's default (per mode) leads the list; then the mode's alts (minus any collision)\n const colors = [def, ...ALT_SWATCHES[mode].filter((c) => c.toLowerCase() !== def.toLowerCase())]\n return (\n <SwatchPicker\n label={label}\n colors={colors}\n // with no override, this mode's default swatch reads as selected\n value={accentColors[mode] ?? def}\n // the default swatch clears this mode's override; the rest set it\n onChange={(color) =>\n setAccentColor(color.toLowerCase() === def.toLowerCase() ? null : color, mode)\n }\n labels={{ [def]: t('settings.accentDefault', { color: def }) }}\n aria-label={String(label)}\n />\n )\n }\n\n return (\n <Modal\n open={open}\n onClose={onClose}\n placement=\"right\"\n size=\"sm\"\n title={t('settings.label')}\n icon=\"Setting5\"\n >\n {showTheme && (\n <>\n <Typography variant=\"subtitle\" as=\"h3\">\n {t('settings.themeTitle')}\n </Typography>\n <Typography\n variant=\"bodySmall\"\n color=\"muted\"\n as=\"p\"\n style={{ marginTop: 'var(--tz-space-xxs)' }}\n >\n {t('settings.themeDesc')}\n </Typography>\n <ChoiceCardGroup\n exclusive\n color=\"accent\"\n minCardWidth={130}\n value={mode}\n onChange={(v) => {\n if (typeof v === 'string') setMode(v as 'light' | 'dark')\n }}\n options={[\n {\n value: 'light',\n label: t('settings.light'),\n description: t('settings.lightDesc'),\n icon: 'Sun',\n },\n {\n value: 'dark',\n label: t('settings.dark'),\n description: t('settings.darkDesc'),\n icon: 'Moon',\n },\n ]}\n aria-label={t('settings.themeTitle')}\n style={{ marginTop: 'var(--tz-space-sm)' }}\n />\n\n <Divider style={{ margin: 'var(--tz-space-md) 0' }} />\n </>\n )}\n\n <Typography variant=\"subtitle\" as=\"h3\">\n {t('settings.accentTitle')}\n </Typography>\n <Typography\n variant=\"bodySmall\"\n color=\"muted\"\n as=\"p\"\n style={{ marginTop: 'var(--tz-space-xxs)' }}\n >\n {t('settings.accentDesc')}\n </Typography>\n <Col gap=\"md\" style={{ marginTop: 'var(--tz-space-sm)' }}>\n {showTheme ? (\n <>\n {picker('light', t('settings.lightTheme'))}\n {picker('dark', t('settings.darkTheme'))}\n </>\n ) : (\n // theme switching is off → the panel stays in one mode, so only that mode's accent matters\n picker(mode, mode === 'light' ? t('settings.lightTheme') : t('settings.darkTheme'))\n )}\n </Col>\n\n <Divider style={{ margin: 'var(--tz-space-md) 0' }} />\n\n <Typography variant=\"subtitle\" as=\"h3\">\n {t('settings.fontTitle')}\n </Typography>\n <Typography\n variant=\"bodySmall\"\n color=\"muted\"\n as=\"p\"\n style={{ marginTop: 'var(--tz-space-xxs)' }}\n >\n {t('settings.fontDesc')}\n </Typography>\n <Select\n label={t('settings.fontFamily')}\n searchable\n searchPlaceholder={t('settings.fontSearch')}\n value={fontFamily}\n options={fontOptions}\n onSearchChange={setFontQuery}\n onChange={(v) => {\n setFontFamily(v)\n setFontQuery('')\n }}\n aria-label={t('settings.fontFamily')}\n style={{ marginTop: 'var(--tz-space-sm)' }}\n />\n\n <Divider style={{ margin: 'var(--tz-space-md) 0' }} />\n\n <Typography variant=\"subtitle\" as=\"h3\">\n {t('settings.headerTitle')}\n </Typography>\n <Typography\n variant=\"bodySmall\"\n color=\"muted\"\n as=\"p\"\n style={{ marginTop: 'var(--tz-space-xxs)' }}\n >\n {t('settings.headerDesc')}\n </Typography>\n <ChoiceCardGroup\n exclusive\n color=\"accent\"\n minCardWidth={130}\n value={headerSticky ? 'fixed' : 'static'}\n // exclusive (radio) → always a string; set sticky from the picked card\n onChange={(v) => {\n if (typeof v === 'string') setHeaderSticky(v === 'fixed')\n }}\n options={[\n {\n value: 'static',\n label: t('settings.scrollable'),\n description: t('settings.scrollableDesc'),\n },\n { value: 'fixed', label: t('settings.fixed'), description: t('settings.fixedDesc') },\n ]}\n aria-label={t('settings.headerTitle')}\n style={{ marginTop: 'var(--tz-space-sm)' }}\n />\n </Modal>\n )\n}\n","import { useEffect, useState, type ReactNode } from 'react'\nimport { useRouterState } from '@tanstack/react-router'\nimport { clsx } from 'clsx'\nimport { useMediaQuery } from '../../hooks/useMediaQuery'\nimport { useLockBodyScroll } from '../../hooks/useLockBodyScroll'\nimport {\n useHeaderConfig,\n useLanguage,\n useT,\n useTheme,\n type HeaderConfig,\n type HeaderUser,\n} from '../../theme'\nimport { Avatar } from '../Avatar'\nimport { Col, Row } from '../Flex'\nimport { Divider } from '../Divider'\nimport { Dropdown } from '../Dropdown'\nimport { Icon } from '../Icon'\nimport { IconButton } from '../IconButton'\nimport { ListItem } from '../List'\nimport { FullscreenToggle } from '../FullscreenToggle'\nimport { ThemeToggle } from '../ThemeToggle'\nimport { Typography } from '../Typography'\nimport { Breadcrumbs } from '../Breadcrumbs'\nimport { Toaster, type ToasterProps } from '../Toast'\nimport { NavSearch, Sidebar, usePageTitle } from '../Sidebar/Sidebar'\nimport { Flag } from '../Flag'\nimport { SettingsDrawer } from './SettingsDrawer'\nimport styles from './RootLayout.module.css'\n\n/**\n * The shell header config + its user shape now live in the theme layer (so `config.header` can carry\n * them app-wide). These aliases keep the historical `RootLayout*` names importable.\n */\nexport type RootLayoutUser = HeaderUser\nexport type RootLayoutHeader = HeaderConfig\n\nexport interface RootLayoutProps {\n /** Brand logo at the top of the sidebar card — pass an `<img>`, an `<Icon>`, or any node. */\n logo?: ReactNode\n /** Optional content pinned to the **bottom of the sidebar** (e.g. a promo / \"Need help?\" card). */\n sidebarFooter?: ReactNode\n /**\n * Header config for **this** shell — merged **over** the app-wide `config.header` (the prop wins).\n * Fields: the built-in `theme` / `search` / `settings` / `languages` toggles (default `true`),\n * `fullscreen` (default `false`), `breadcrumbs` (default `true`), `pageTitle` (default `true`), and the\n * account (`onLogout` / `user`).\n */\n header?: RootLayoutHeader\n /**\n * The built-in toast viewport, mounted for you so `toast.*()` works app-wide with no extra setup.\n * Defaults to `true` (a `<Toaster>` with its defaults). Pass `ToasterProps` to configure it\n * (`{ position, duration }`), or `false` to opt out — e.g. when you mount your own `<Toaster>`.\n */\n toaster?: boolean | ToasterProps\n /** Routed content — the consumer passes `<Outlet />`. */\n children: ReactNode\n}\n\n/**\n * The admin-panel shell — a **floating** layout: the whole app sits on a soft `--tz-color-background`\n * canvas, with a rounded, elevated `--tz-color-surface` **sidebar card** (`logo` + auto-generated `Sidebar` + an optional\n * `sidebarFooter`) beside the header + content. Set it as the root route's component and pass\n * `<Outlet />` as `children`; the `Sidebar` builds itself from the routes' `staticData`. The header\n * holds an optional `ThemeToggle` (on by default), a **Settings** button (opens a right-side drawer to\n * pick + persist the `accent` color), plus an account `Avatar` whose menu has a **Sign out** item when\n * `header.onLogout` is given. The content area stacks\n * **`Breadcrumbs` → the page title (the active route's `staticData.name`) → `children`**; pages wrap\n * their own body in `PageLayout`. Set `header.pageTitle = false` to drop the auto `h2` when pages\n * carry their own heading inside their `PageLayout` header. A `<Toaster>` is **mounted by default** so\n * `toast.*()` works app-wide with no extra setup (configure via `toaster`, or `toaster={false}` to opt\n * out). Styling is token-based, so it follows the active `ConfigProvider` mode. Requires\n * `@tanstack/react-router` (peer).\n */\nexport function RootLayout({\n logo,\n sidebarFooter,\n header,\n toaster = true,\n children,\n}: RootLayoutProps) {\n const title = usePageTitle()\n // header sticky/static — the user's persisted choice (seeded from config.header.sticky)\n const { headerSticky } = useTheme()\n const { language, setLanguage, languages } = useLanguage()\n const t = useT()\n // app-wide header config (config.header) as the base; this shell's `header` prop wins over it\n const configHeader = useHeaderConfig()\n const h: HeaderConfig = { ...configHeader, ...header }\n const showTheme = h.theme ?? true\n const showFullscreen = h.fullscreen ?? false\n const showSettings = h.settings ?? true\n const showSearch = h.search ?? true\n const showLanguages = h.languages ?? true\n const showBreadcrumbs = h.breadcrumbs ?? true\n const toasterProps = typeof toaster === 'object' ? toaster : undefined\n const showPageTitle = h.pageTitle ?? true\n const onLogout = h.onLogout\n const user = h.user\n // below 1280px the sidebar auto-collapses (and auto-expands again above it); a manual toggle holds\n // until the next breakpoint cross. `useMediaQuery` is correct on the first client render, so no flash.\n const isNarrow = useMediaQuery('md') // ≤ 1279.98px — the shared `md` breakpoint\n const [collapsed, setCollapsed] = useState(isNarrow)\n useEffect(() => {\n setCollapsed(isNarrow)\n }, [isNarrow])\n // while the sidebar overlays the content (narrow + open), lock page scroll so scrolling inside the\n // drawer doesn't scroll the content behind it\n useLockBodyScroll(isNarrow && !collapsed)\n // navigating from the overlay drawer (a nav link or a search suggestion — both change the route) auto-\n // closes it, so you land on the page instead of the still-open sidebar; desktop navigation is untouched\n const pathname = useRouterState({ select: (s) => s.location.pathname })\n useEffect(() => {\n if (isNarrow) setCollapsed(true)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [pathname])\n const [settingsOpen, setSettingsOpen] = useState(false)\n\n return (\n <div className={clsx(styles.shell, collapsed && styles.shellCollapsed)}>\n <aside className={styles.sidebar}>\n {/* fixed-width inner: the outer <aside> animates its width to 0 (and clips via overflow),\n while this keeps the sidebar's real width so the content never reflows mid-collapse */}\n <div className={styles.sidebarInner}>\n {logo ? (\n <div className={styles.brand}>\n {logo}\n {/* in-drawer close — only shown when the sidebar overlays (narrow), where the header\n toggle is behind the backdrop; closes the drawer */}\n <IconButton\n variant=\"filled\"\n size=\"sm\"\n className={styles.sidebarClose}\n aria-label={t('common.close')}\n onClick={() => setCollapsed(true)}\n >\n <Icon name=\"Close\" />\n </IconButton>\n </div>\n ) : null}\n {/* the search lives in the header on desktop; below 576px (full-width drawer) it moves here,\n between the logo and the menu (CSS toggles which instance shows) */}\n {showSearch ? (\n <div className={styles.sidebarSearch}>\n <NavSearch />\n </div>\n ) : null}\n <div className={styles.navScroll}>\n <Sidebar />\n </div>\n {sidebarFooter ? <div className={styles.sidebarFooter}>{sidebarFooter}</div> : null}\n </div>\n </aside>\n {/* dim backdrop behind the overlay sidebar — a sibling of the sidebar (same stacking context, so the\n sidebar reliably sits above it, unlike a body-portaled Overlay). Only shown/interactive below\n 1280px while open (CSS); clicking it closes the drawer. On desktop the sidebar is a grid column. */}\n <div className={styles.backdrop} onClick={() => setCollapsed(true)} aria-hidden=\"true\" />\n <div className={styles.main}>\n <header className={clsx(styles.topbar, headerSticky && styles.topbarSticky)}>\n <div className={styles.headerStart}>\n <IconButton\n aria-label={collapsed ? 'Show sidebar' : 'Hide sidebar'}\n aria-expanded={!collapsed}\n variant=\"filled\"\n size=\"sm\"\n onClick={() => setCollapsed((c) => !c)}\n >\n <Icon name=\"Menu\" />\n </IconButton>\n {showSearch ? (\n <div className={styles.headerSearch}>\n <NavSearch />\n </div>\n ) : null}\n </div>\n <div className={styles.headerEnd}>\n {showFullscreen ? <FullscreenToggle variant=\"filled\" size=\"sm\" /> : null}\n {showTheme ? <ThemeToggle variant=\"filled\" size=\"sm\" /> : null}\n {showLanguages && languages.length > 1 ? (\n <Dropdown\n placement=\"bottom-end\"\n trigger={\n <IconButton variant=\"filled\" size=\"sm\" aria-label={t('language.label')}>\n <Icon name=\"Global\" />\n </IconButton>\n }\n >\n {languages.map((l) => (\n <ListItem\n key={l.code}\n clickable\n selected={l.code === language}\n onClick={() => setLanguage(l.code)}\n icon={<Flag code={l.code} />}\n >\n {l.label ?? l.code}\n </ListItem>\n ))}\n </Dropdown>\n ) : null}\n {showSettings ? (\n <IconButton\n aria-label={t('settings.label')}\n variant=\"text\"\n size=\"sm\"\n className={styles.settings}\n onClick={() => setSettingsOpen(true)}\n >\n <Icon name=\"Setting5\" />\n </IconButton>\n ) : null}\n {onLogout ? (\n <Dropdown\n placement=\"bottom-end\"\n trigger={\n <button type=\"button\" className={styles.account} aria-label={t('account.label')}>\n <Avatar size=\"md\" name={user?.name} src={user?.avatar} color=\"primary\" />\n </button>\n }\n >\n {user ? (\n <>\n <Row gap={8} align=\"center\" padding=\"var(--tz-space-xxs) var(--tz-space-sm)\">\n <Avatar size=\"sm\" name={user.name} src={user.avatar} color=\"primary\" />\n <Col gap={2}>\n {user.name ? (\n <Typography variant=\"bodySmall\">{user.name}</Typography>\n ) : null}\n {user.email ? (\n <Typography variant=\"caption\" color=\"muted\">\n {user.email}\n </Typography>\n ) : null}\n </Col>\n </Row>\n <Divider />\n </>\n ) : null}\n <ListItem icon={<Icon name=\"Logout2\" color=\"error\" />} clickable onClick={onLogout}>\n {t('userCard.signOut')}\n </ListItem>\n </Dropdown>\n ) : null}\n </div>\n </header>\n <main className={styles.content}>\n {showBreadcrumbs ? <Breadcrumbs /> : null}\n {showPageTitle && title ? (\n <Typography variant=\"h2\" className={styles.pageTitle}>\n {title}\n </Typography>\n ) : null}\n {children}\n </main>\n </div>\n {toaster !== false && <Toaster {...toasterProps} />}\n {showSettings ? (\n <SettingsDrawer\n open={settingsOpen}\n onClose={() => setSettingsOpen(false)}\n showTheme={showTheme}\n />\n ) : null}\n </div>\n )\n}\n"],"names":["ALT_SWATCHES","SettingsDrawer","open","onClose","showTheme","mode","setMode","accentColors","defaultAccentColors","setAccentColor","headerSticky","setHeaderSticky","fontFamily","setFontFamily","useTheme","t","useT","fontQuery","setFontQuery","useState","q","base","DEFAULT_FONT_FAMILY","fontOptions","f","picker","label","def","colors","c","jsx","SwatchPicker","color","jsxs","Modal","Fragment","Typography","ChoiceCardGroup","v","Divider","Col","Select","RootLayout","logo","sidebarFooter","header","toaster","children","title","usePageTitle","language","setLanguage","languages","useLanguage","h","useHeaderConfig","showFullscreen","showSettings","showSearch","showLanguages","showBreadcrumbs","toasterProps","showPageTitle","onLogout","user","isNarrow","useMediaQuery","collapsed","setCollapsed","useEffect","useLockBodyScroll","pathname","useRouterState","s","settingsOpen","setSettingsOpen","clsx","styles","IconButton","Icon","NavSearch","Sidebar","FullscreenToggle","ThemeToggle","Dropdown","l","ListItem","Flag","Avatar","Row","Breadcrumbs","Toaster"],"mappings":"g6BAaMA,GAAmD,CACvD,MAAO,CACL,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA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Bd,EAChBlB,EAAAA,IAACM,EAAAA,WAAA,CAAW,QAAQ,KAAK,UAAWyC,EAAO,UACxC,SAAA7B,CAAA,CACH,EACE,KACHD,CAAA,CAAA,CACH,CAAA,EACF,EACCD,IAAY,IAAShB,EAAAA,IAAC6D,EAAAA,QAAA,CAAS,GAAG9B,CAAA,CAAc,EAChDJ,EACC3B,EAAAA,IAAC7B,GAAA,CACC,KAAMyE,EACN,QAAS,IAAMC,EAAgB,EAAK,EACpC,UAAAvE,CAAA,CAAA,EAEA,IAAA,EACN,CAEJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RootLayout-BPSWgWlI.js","sources":["../src/components/RootLayout/SettingsDrawer.tsx","../src/components/RootLayout/RootLayout.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { DEFAULT_FONT_FAMILY, useT, useTheme } from '../../theme'\nimport { Col } from '../Flex'\nimport { Divider } from '../Divider'\nimport { Modal } from '../Modal'\nimport { ChoiceCardGroup } from '../ChoiceCard'\nimport { Select } from '../Select'\nimport { SwatchPicker } from '../SwatchPicker'\nimport { Typography } from '../Typography'\n\n// Accent choices offered alongside the provider's default (which leads each list) — 15 per mode, so\n// each theme shows 16 total. Tuned PER MODE (deeper tones for light, brighter for dark) and paired by\n// hue (red → violet + a neutral) so a color keeps its identity across themes.\nconst ALT_SWATCHES: Record<'light' | 'dark', string[]> = {\n light: [\n '#dc2626', // red\n '#ea580c', // orange\n '#d97706', // amber\n '#ca8a04', // yellow\n '#65a30d', // lime\n '#16a34a', // green\n '#059669', // emerald\n '#0891b2', // cyan\n '#0284c7', // sky\n '#2563eb', // blue\n '#4f46e5', // indigo\n '#7c3aed', // violet\n '#c026d3', // fuchsia\n '#db2777', // pink\n '#475569', // slate\n ],\n dark: [\n '#f87171', // red\n '#fb923c', // orange\n '#fbbf24', // amber\n '#facc15', // yellow\n '#a3e635', // lime\n '#4ade80', // green\n '#34d399', // emerald\n '#22d3ee', // cyan\n '#38bdf8', // sky\n '#60a5fa', // blue\n '#818cf8', // indigo\n '#a78bfa', // violet\n '#e879f9', // fuchsia\n '#f472b6', // pink\n '#94a3b8', // slate\n ],\n}\n\nexport interface SettingsDrawerProps {\n /** Whether the drawer is open. */\n open: boolean\n /** Close handler. */\n onClose: () => void\n /** Show the light/dark **Theme** section (gated by the shell's `header.theme`, the same flag as the header toggle). */\n showTheme?: boolean\n}\n\n/**\n * The header user-menu **Settings** drawer (a right-side `Modal`), top to bottom: a **Theme** section — an\n * exclusive `ChoiceCardGroup` (**Light** / **Dark** cards) driving `useTheme().setMode`, shown only when\n * **`showTheme`** (the shell's `header.theme`, so the header toggle + this section appear/disappear\n * together); **Accent Color** — **two `SwatchPicker`s** (Light + Dark) so both accents are chosen\n * independently, each with a per-mode set (deeper tones for light, brighter for dark), calling\n * `setAccentColor(color, mode)` and persisting it — each list leads with the provider's default for that\n * mode (`defaultAccentColors[mode]`), selected when there's no override (picking it clears the override).\n * When `showTheme` is off the panel is locked to one mode, so **only the active mode's accent picker**\n * shows (the other is pointless without a theme switch);\n * a **Font** section (a searchable `Select` — Inter preset + type any Google Font — driving\n * `setFontFamily`); and a **Header** section (an exclusive `ChoiceCardGroup` **Scrollable** / **Fixed**\n * driving `setHeaderSticky`). Internal to the admin shell — not a public export.\n */\nexport function SettingsDrawer({ open, onClose, showTheme = true }: SettingsDrawerProps) {\n const {\n mode,\n setMode,\n accentColors,\n defaultAccentColors,\n setAccentColor,\n headerSticky,\n setHeaderSticky,\n fontFamily,\n setFontFamily,\n } = useTheme()\n const t = useT()\n\n // One searchable Select doubles as a \"type any Google Font\" field. Base = Inter (the only preset) +\n // the active font (so a custom pick stays visible/selectable). While searching, the typed query is\n // offered as its own option — picking it applies + loads that family. Base is always kept in the\n // list (never filtered out) so `value` always resolves in the trigger, even mid-search.\n const [fontQuery, setFontQuery] = useState('')\n const q = fontQuery.trim()\n const base =\n fontFamily !== DEFAULT_FONT_FAMILY ? [DEFAULT_FONT_FAMILY, fontFamily] : [DEFAULT_FONT_FAMILY]\n const showTyped = q.length > 0 && !base.some((f) => f.toLowerCase() === q.toLowerCase())\n const fontOptions = (showTyped ? [q, ...base] : base).map((f) => ({\n value: f,\n label: f === DEFAULT_FONT_FAMILY ? t('settings.fontDefault', { font: f }) : f,\n }))\n\n const picker = (mode: 'light' | 'dark', label: string) => {\n const def = defaultAccentColors[mode]\n // the provider's default (per mode) leads the list; then the mode's alts (minus any collision)\n const colors = [def, ...ALT_SWATCHES[mode].filter((c) => c.toLowerCase() !== def.toLowerCase())]\n return (\n <SwatchPicker\n label={label}\n colors={colors}\n // with no override, this mode's default swatch reads as selected\n value={accentColors[mode] ?? def}\n // the default swatch clears this mode's override; the rest set it\n onChange={(color) =>\n setAccentColor(color.toLowerCase() === def.toLowerCase() ? null : color, mode)\n }\n labels={{ [def]: t('settings.accentDefault', { color: def }) }}\n aria-label={String(label)}\n />\n )\n }\n\n return (\n <Modal\n open={open}\n onClose={onClose}\n placement=\"right\"\n size=\"sm\"\n title={t('settings.label')}\n icon=\"Setting5\"\n >\n {showTheme && (\n <>\n <Typography variant=\"subtitle\" as=\"h3\">\n {t('settings.themeTitle')}\n </Typography>\n <Typography\n variant=\"bodySmall\"\n color=\"muted\"\n as=\"p\"\n style={{ marginTop: 'var(--tz-space-xxs)' }}\n >\n {t('settings.themeDesc')}\n </Typography>\n <ChoiceCardGroup\n exclusive\n color=\"accent\"\n minCardWidth={130}\n value={mode}\n onChange={(v) => {\n if (typeof v === 'string') setMode(v as 'light' | 'dark')\n }}\n options={[\n {\n value: 'light',\n label: t('settings.light'),\n description: t('settings.lightDesc'),\n icon: 'Sun',\n },\n {\n value: 'dark',\n label: t('settings.dark'),\n description: t('settings.darkDesc'),\n icon: 'Moon',\n },\n ]}\n aria-label={t('settings.themeTitle')}\n style={{ marginTop: 'var(--tz-space-sm)' }}\n />\n\n <Divider style={{ margin: 'var(--tz-space-md) 0' }} />\n </>\n )}\n\n <Typography variant=\"subtitle\" as=\"h3\">\n {t('settings.accentTitle')}\n </Typography>\n <Typography\n variant=\"bodySmall\"\n color=\"muted\"\n as=\"p\"\n style={{ marginTop: 'var(--tz-space-xxs)' }}\n >\n {t('settings.accentDesc')}\n </Typography>\n <Col gap=\"md\" style={{ marginTop: 'var(--tz-space-sm)' }}>\n {showTheme ? (\n <>\n {picker('light', t('settings.lightTheme'))}\n {picker('dark', t('settings.darkTheme'))}\n </>\n ) : (\n // theme switching is off → the panel stays in one mode, so only that mode's accent matters\n picker(mode, mode === 'light' ? t('settings.lightTheme') : t('settings.darkTheme'))\n )}\n </Col>\n\n <Divider style={{ margin: 'var(--tz-space-md) 0' }} />\n\n <Typography variant=\"subtitle\" as=\"h3\">\n {t('settings.fontTitle')}\n </Typography>\n <Typography\n variant=\"bodySmall\"\n color=\"muted\"\n as=\"p\"\n style={{ marginTop: 'var(--tz-space-xxs)' }}\n >\n {t('settings.fontDesc')}\n </Typography>\n <Select\n label={t('settings.fontFamily')}\n searchable\n searchPlaceholder={t('settings.fontSearch')}\n value={fontFamily}\n options={fontOptions}\n onSearchChange={setFontQuery}\n onChange={(v) => {\n setFontFamily(v)\n setFontQuery('')\n }}\n aria-label={t('settings.fontFamily')}\n style={{ marginTop: 'var(--tz-space-sm)' }}\n />\n\n <Divider style={{ margin: 'var(--tz-space-md) 0' }} />\n\n <Typography variant=\"subtitle\" as=\"h3\">\n {t('settings.headerTitle')}\n </Typography>\n <Typography\n variant=\"bodySmall\"\n color=\"muted\"\n as=\"p\"\n style={{ marginTop: 'var(--tz-space-xxs)' }}\n >\n {t('settings.headerDesc')}\n </Typography>\n <ChoiceCardGroup\n exclusive\n color=\"accent\"\n minCardWidth={130}\n value={headerSticky ? 'fixed' : 'static'}\n // exclusive (radio) → always a string; set sticky from the picked card\n onChange={(v) => {\n if (typeof v === 'string') setHeaderSticky(v === 'fixed')\n }}\n options={[\n {\n value: 'static',\n label: t('settings.scrollable'),\n description: t('settings.scrollableDesc'),\n },\n { value: 'fixed', label: t('settings.fixed'), description: t('settings.fixedDesc') },\n ]}\n aria-label={t('settings.headerTitle')}\n style={{ marginTop: 'var(--tz-space-sm)' }}\n />\n </Modal>\n )\n}\n","import { useEffect, useState, type ReactNode } from 'react'\nimport { useRouterState } from '@tanstack/react-router'\nimport { clsx } from 'clsx'\nimport { useMediaQuery } from '../../hooks/useMediaQuery'\nimport { useLockBodyScroll } from '../../hooks/useLockBodyScroll'\nimport {\n useHeaderConfig,\n useLanguage,\n useT,\n useTheme,\n type HeaderConfig,\n type HeaderUser,\n} from '../../theme'\nimport { Avatar } from '../Avatar'\nimport { Col, Row } from '../Flex'\nimport { Divider } from '../Divider'\nimport { Dropdown } from '../Dropdown'\nimport { Icon } from '../Icon'\nimport { IconButton } from '../IconButton'\nimport { ListItem } from '../List'\nimport { FullscreenToggle } from '../FullscreenToggle'\nimport { ThemeToggle } from '../ThemeToggle'\nimport { Typography } from '../Typography'\nimport { Breadcrumbs } from '../Breadcrumbs'\nimport { Toaster, type ToasterProps } from '../Toast'\nimport { NavSearch, Sidebar, usePageTitle } from '../Sidebar/Sidebar'\nimport { Flag } from '../Flag'\nimport { SettingsDrawer } from './SettingsDrawer'\nimport styles from './RootLayout.module.css'\n\n/**\n * The shell header config + its user shape now live in the theme layer (so `config.header` can carry\n * them app-wide). These aliases keep the historical `RootLayout*` names importable.\n */\nexport type RootLayoutUser = HeaderUser\nexport type RootLayoutHeader = HeaderConfig\n\nexport interface RootLayoutProps {\n /** Brand logo at the top of the sidebar card — pass an `<img>`, an `<Icon>`, or any node. */\n logo?: ReactNode\n /** Optional content pinned to the **bottom of the sidebar** (e.g. a promo / \"Need help?\" card). */\n sidebarFooter?: ReactNode\n /**\n * Header config for **this** shell — merged **over** the app-wide `config.header` (the prop wins).\n * Fields: the built-in `theme` / `search` / `settings` / `languages` toggles (default `true`),\n * `fullscreen` (default `false`), `breadcrumbs` (default `true`), `pageTitle` (default `true`), and the\n * account (`onLogout` / `user`).\n */\n header?: RootLayoutHeader\n /**\n * The built-in toast viewport, mounted for you so `toast.*()` works app-wide with no extra setup.\n * Defaults to `true` (a `<Toaster>` with its defaults). Pass `ToasterProps` to configure it\n * (`{ position, duration }`), or `false` to opt out — e.g. when you mount your own `<Toaster>`.\n */\n toaster?: boolean | ToasterProps\n /** Routed content — the consumer passes `<Outlet />`. */\n children: ReactNode\n}\n\n/**\n * The admin-panel shell — a **floating** layout: the whole app sits on a soft `--tz-color-background`\n * canvas, with a rounded, elevated `--tz-color-surface` **sidebar card** (`logo` + auto-generated `Sidebar` + an optional\n * `sidebarFooter`) beside the header + content. Set it as the root route's component and pass\n * `<Outlet />` as `children`; the `Sidebar` builds itself from the routes' `staticData`. The header\n * holds an optional `ThemeToggle` (on by default), a **Settings** button (opens a right-side drawer to\n * pick + persist the `accent` color), plus an account `Avatar` whose menu has a **Sign out** item when\n * `header.onLogout` is given. The content area stacks\n * **`Breadcrumbs` → the page title (the active route's `staticData.name`) → `children`**; pages wrap\n * their own body in `PageLayout`. Set `header.pageTitle = false` to drop the auto `h2` when pages\n * carry their own heading inside their `PageLayout` header. A `<Toaster>` is **mounted by default** so\n * `toast.*()` works app-wide with no extra setup (configure via `toaster`, or `toaster={false}` to opt\n * out). Styling is token-based, so it follows the active `ConfigProvider` mode. Requires\n * `@tanstack/react-router` (peer).\n */\nexport function RootLayout({\n logo,\n sidebarFooter,\n header,\n toaster = true,\n children,\n}: RootLayoutProps) {\n const title = usePageTitle()\n // header sticky/static — the user's persisted choice (seeded from config.header.sticky)\n const { headerSticky } = useTheme()\n const { language, setLanguage, languages } = useLanguage()\n const t = useT()\n // app-wide header config (config.header) as the base; this shell's `header` prop wins over it\n const configHeader = useHeaderConfig()\n const h: HeaderConfig = { ...configHeader, ...header }\n const showTheme = h.theme ?? true\n const showFullscreen = h.fullscreen ?? false\n const showSettings = h.settings ?? true\n const showSearch = h.search ?? true\n const showLanguages = h.languages ?? true\n const showBreadcrumbs = h.breadcrumbs ?? true\n const toasterProps = typeof toaster === 'object' ? toaster : undefined\n const showPageTitle = h.pageTitle ?? true\n const onLogout = h.onLogout\n const user = h.user\n // below 1280px the sidebar auto-collapses (and auto-expands again above it); a manual toggle holds\n // until the next breakpoint cross. `useMediaQuery` is correct on the first client render, so no flash.\n const isNarrow = useMediaQuery('md') // ≤ 1279.98px — the shared `md` breakpoint\n const [collapsed, setCollapsed] = useState(isNarrow)\n useEffect(() => {\n setCollapsed(isNarrow)\n }, [isNarrow])\n // while the sidebar overlays the content (narrow + open), lock page scroll so scrolling inside the\n // drawer doesn't scroll the content behind it\n useLockBodyScroll(isNarrow && !collapsed)\n // navigating from the overlay drawer (a nav link or a search suggestion — both change the route) auto-\n // closes it, so you land on the page instead of the still-open sidebar; desktop navigation is untouched\n const pathname = useRouterState({ select: (s) => s.location.pathname })\n useEffect(() => {\n if (isNarrow) setCollapsed(true)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [pathname])\n const [settingsOpen, setSettingsOpen] = useState(false)\n\n return (\n <div className={clsx(styles.shell, collapsed && styles.shellCollapsed)}>\n <aside className={styles.sidebar}>\n {/* fixed-width inner: the outer <aside> animates its width to 0 (and clips via overflow),\n while this keeps the sidebar's real width so the content never reflows mid-collapse */}\n <div className={styles.sidebarInner}>\n {logo ? (\n <div className={styles.brand}>\n {logo}\n {/* in-drawer close — only shown when the sidebar overlays (narrow), where the header\n toggle is behind the backdrop; closes the drawer */}\n <IconButton\n variant=\"filled\"\n size=\"sm\"\n className={styles.sidebarClose}\n aria-label={t('common.close')}\n onClick={() => setCollapsed(true)}\n >\n <Icon name=\"Close\" />\n </IconButton>\n </div>\n ) : null}\n {/* the search lives in the header on desktop; below 576px (full-width drawer) it moves here,\n between the logo and the menu (CSS toggles which instance shows) */}\n {showSearch ? (\n <div className={styles.sidebarSearch}>\n <NavSearch />\n </div>\n ) : null}\n <div className={styles.navScroll}>\n <Sidebar />\n </div>\n {sidebarFooter ? <div className={styles.sidebarFooter}>{sidebarFooter}</div> : null}\n </div>\n </aside>\n {/* dim backdrop behind the overlay sidebar — a sibling of the sidebar (same stacking context, so the\n sidebar reliably sits above it, unlike a body-portaled Overlay). Only shown/interactive below\n 1280px while open (CSS); clicking it closes the drawer. On desktop the sidebar is a grid column. */}\n <div className={styles.backdrop} onClick={() => setCollapsed(true)} aria-hidden=\"true\" />\n <div className={styles.main}>\n <header className={clsx(styles.topbar, headerSticky && styles.topbarSticky)}>\n <div className={styles.headerStart}>\n <IconButton\n aria-label={collapsed ? 'Show sidebar' : 'Hide sidebar'}\n aria-expanded={!collapsed}\n variant=\"filled\"\n size=\"sm\"\n onClick={() => setCollapsed((c) => !c)}\n >\n <Icon name=\"Menu\" />\n </IconButton>\n {showSearch ? (\n <div className={styles.headerSearch}>\n <NavSearch />\n </div>\n ) : null}\n </div>\n <div className={styles.headerEnd}>\n {showFullscreen ? <FullscreenToggle variant=\"filled\" size=\"sm\" /> : null}\n {showTheme ? <ThemeToggle variant=\"filled\" size=\"sm\" /> : null}\n {showLanguages && languages.length > 1 ? (\n <Dropdown\n placement=\"bottom-end\"\n trigger={\n <IconButton variant=\"filled\" size=\"sm\" aria-label={t('language.label')}>\n <Icon name=\"Global\" />\n </IconButton>\n }\n >\n {languages.map((l) => (\n <ListItem\n key={l.code}\n clickable\n selected={l.code === language}\n onClick={() => setLanguage(l.code)}\n icon={<Flag code={l.code} />}\n >\n {l.label ?? l.code}\n </ListItem>\n ))}\n </Dropdown>\n ) : null}\n {showSettings ? (\n <IconButton\n aria-label={t('settings.label')}\n variant=\"text\"\n size=\"sm\"\n className={styles.settings}\n onClick={() => setSettingsOpen(true)}\n >\n <Icon name=\"Setting5\" />\n </IconButton>\n ) : null}\n {onLogout ? (\n <Dropdown\n placement=\"bottom-end\"\n trigger={\n <button type=\"button\" className={styles.account} aria-label={t('account.label')}>\n <Avatar size=\"md\" name={user?.name} src={user?.avatar} color=\"primary\" />\n </button>\n }\n >\n {user ? (\n <>\n <Row gap={8} align=\"center\" padding=\"var(--tz-space-xxs) var(--tz-space-sm)\">\n <Avatar size=\"sm\" name={user.name} src={user.avatar} color=\"primary\" />\n <Col gap={2}>\n {user.name ? (\n <Typography variant=\"bodySmall\">{user.name}</Typography>\n ) : null}\n {user.email ? (\n <Typography variant=\"caption\" color=\"muted\">\n {user.email}\n </Typography>\n ) : null}\n </Col>\n </Row>\n <Divider />\n </>\n ) : null}\n <ListItem icon={<Icon name=\"Logout2\" color=\"error\" />} clickable onClick={onLogout}>\n {t('userCard.signOut')}\n </ListItem>\n </Dropdown>\n ) : null}\n </div>\n </header>\n <main className={styles.content}>\n {showBreadcrumbs ? <Breadcrumbs /> : null}\n {showPageTitle && title ? (\n <Typography variant=\"h2\" className={styles.pageTitle}>\n {title}\n </Typography>\n ) : null}\n {children}\n </main>\n </div>\n {toaster !== false && <Toaster {...toasterProps} />}\n {showSettings ? (\n <SettingsDrawer\n open={settingsOpen}\n onClose={() => setSettingsOpen(false)}\n showTheme={showTheme}\n />\n ) : null}\n </div>\n )\n}\n"],"names":["ALT_SWATCHES","SettingsDrawer","open","onClose","showTheme","mode","setMode","accentColors","defaultAccentColors","setAccentColor","headerSticky","setHeaderSticky","fontFamily","setFontFamily","useTheme","t","useT","fontQuery","setFontQuery","useState","q","base","DEFAULT_FONT_FAMILY","fontOptions","f","picker","label","def","colors","jsx","SwatchPicker","color","jsxs","Modal","Fragment","Typography","ChoiceCardGroup","v","Divider","Col","Select","RootLayout","logo","sidebarFooter","header","toaster","children","title","usePageTitle","language","setLanguage","languages","useLanguage","h","useHeaderConfig","showFullscreen","showSettings","showSearch","showLanguages","showBreadcrumbs","toasterProps","showPageTitle","onLogout","user","isNarrow","useMediaQuery","collapsed","setCollapsed","useEffect","useLockBodyScroll","pathname","useRouterState","s","settingsOpen","setSettingsOpen","clsx","styles","IconButton","Icon","NavSearch","Sidebar","c","FullscreenToggle","ThemeToggle","Dropdown","l","ListItem","Flag","Avatar","Row","Breadcrumbs","Toaster"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAaA,MAAMA,KAAmD;AAAA,EACvD,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