@alfadocs/ui-kit 0.56.0 → 0.57.0
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/_chunks/{public-header.agent-DyVpPwmv.js → public-header.agent-CYQK6T6F.js} +130 -115
- package/dist/agent-catalog.json +1 -1
- package/dist/components/public-header/index.js +1 -1
- package/dist/components/public-header/public-header.d.ts +8 -0
- package/dist/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as s, jsxs as t, Fragment as
|
|
2
|
-
import { forwardRef as h, useId as
|
|
1
|
+
import { jsx as s, jsxs as t, Fragment as R } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as h, useId as U, useState as y, useCallback as P, useImperativeHandle as Z, useContext as N, useEffect as _, useRef as D, createContext as ss } from "react";
|
|
3
3
|
import { c as C } from "./index-D2ZczOXr.js";
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import * as
|
|
6
|
-
import { I as
|
|
4
|
+
import { useTranslation as es } from "react-i18next";
|
|
5
|
+
import * as p from "@radix-ui/react-navigation-menu";
|
|
6
|
+
import { I as ds } from "./icon-button-CKEOrN37.js";
|
|
7
7
|
import { S as f } from "./sheet-xbzu4YiY.js";
|
|
8
8
|
import { C as I } from "./chevron-down-BX_NP2Yh.js";
|
|
9
|
-
import { X as
|
|
10
|
-
import { M as
|
|
11
|
-
const g =
|
|
9
|
+
import { X as as } from "./x-CCcI3eJp.js";
|
|
10
|
+
import { M as ns } from "./menu-XRhW3_99.js";
|
|
11
|
+
const g = ss("desktop"), rs = C(
|
|
12
12
|
[
|
|
13
13
|
"ds:w-full ds:z-[var(--z-sticky)]",
|
|
14
14
|
"ds:transition-[background-color,box-shadow,transform] ds:duration-[var(--animation-duration)]",
|
|
@@ -83,7 +83,7 @@ const g = Z("desktop"), rs = C(
|
|
|
83
83
|
},
|
|
84
84
|
defaultVariants: { variant: "pill", sticky: "none" }
|
|
85
85
|
}
|
|
86
|
-
),
|
|
86
|
+
), os = [
|
|
87
87
|
"ds:flex ds:items-center ds:gap-[var(--spacing-md)]",
|
|
88
88
|
"ds:w-full ds:max-w-[1400px] ds:mx-auto",
|
|
89
89
|
"ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:sm:ps-[var(--spacing-lg)] ds:sm:pe-[var(--spacing-lg)]",
|
|
@@ -101,7 +101,7 @@ const g = Z("desktop"), rs = C(
|
|
|
101
101
|
"ds:border ds:border-[color:var(--card-border)]",
|
|
102
102
|
"ds:transition-colors ds:duration-[var(--animation-duration)]",
|
|
103
103
|
"ds:motion-reduce:transition-none"
|
|
104
|
-
].join(" "),
|
|
104
|
+
].join(" "), is = C(
|
|
105
105
|
[
|
|
106
106
|
"ds:inline-flex ds:items-center",
|
|
107
107
|
"type-body-sm ds:font-medium",
|
|
@@ -118,7 +118,7 @@ const g = Z("desktop"), rs = C(
|
|
|
118
118
|
"ds:data-[active=true]:text-[var(--primary)]",
|
|
119
119
|
"ds:data-[active=true]:[box-shadow:inset_0_-2px_0_var(--primary)]"
|
|
120
120
|
].join(" ")
|
|
121
|
-
),
|
|
121
|
+
), ts = [
|
|
122
122
|
"ds:group ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
123
123
|
"type-body-sm ds:font-medium",
|
|
124
124
|
// Mirror the navLinkVariants colour + inline padding so triggers and
|
|
@@ -132,12 +132,12 @@ const g = Z("desktop"), rs = C(
|
|
|
132
132
|
"ds:hover:text-[var(--primary)]",
|
|
133
133
|
"ds:data-[state=open]:text-[var(--primary)]",
|
|
134
134
|
"ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none"
|
|
135
|
-
].join(" "),
|
|
135
|
+
].join(" "), cs = [
|
|
136
136
|
"ds:size-3 ds:shrink-0",
|
|
137
137
|
"ds:transition-transform ds:duration-[var(--animation-duration)]",
|
|
138
138
|
"ds:group-data-[state=open]:rotate-180",
|
|
139
139
|
"ds:motion-reduce:transition-none"
|
|
140
|
-
].join(" "),
|
|
140
|
+
].join(" "), ls = C(
|
|
141
141
|
[
|
|
142
142
|
// Radix portals Content into the Viewport; sizing + position is
|
|
143
143
|
// governed by the Viewport — keep Content's own paint to padding
|
|
@@ -163,7 +163,7 @@ const g = Z("desktop"), rs = C(
|
|
|
163
163
|
},
|
|
164
164
|
defaultVariants: { wide: !1 }
|
|
165
165
|
}
|
|
166
|
-
),
|
|
166
|
+
), us = [
|
|
167
167
|
// Position the Viewport flush below the pill / nav row. Radix sets
|
|
168
168
|
// `--radix-navigation-menu-viewport-width` and `…-height` so the
|
|
169
169
|
// panel sizes itself to whichever Content is currently active.
|
|
@@ -194,10 +194,10 @@ const g = Z("desktop"), rs = C(
|
|
|
194
194
|
"ds:hover:[&_[data-card-arrow]]:text-[var(--primary)]",
|
|
195
195
|
"ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
196
196
|
"ds:group/cardlink"
|
|
197
|
-
].join(" "),
|
|
197
|
+
].join(" "), ms = [
|
|
198
198
|
"ds:pb-[var(--spacing-sm)]"
|
|
199
199
|
// Match the linked-card variant: no separator rule under the title.
|
|
200
|
-
].join(" "),
|
|
200
|
+
].join(" "), ps = [
|
|
201
201
|
"ds:block ds:no-underline",
|
|
202
202
|
"type-body-sm ds:font-medium ds:text-[var(--muted-foreground)]",
|
|
203
203
|
"ds:rounded-[var(--radius-sm)]",
|
|
@@ -208,83 +208,96 @@ const g = Z("desktop"), rs = C(
|
|
|
208
208
|
"ds:data-[active=true]:text-[var(--primary)]",
|
|
209
209
|
"ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none"
|
|
210
210
|
].join(" ");
|
|
211
|
-
function
|
|
212
|
-
const [e,
|
|
213
|
-
return
|
|
211
|
+
function vs() {
|
|
212
|
+
const [e, o] = y(() => typeof window > "u" || !window.matchMedia ? !1 : window.matchMedia("(prefers-reduced-motion: reduce)").matches);
|
|
213
|
+
return _(() => {
|
|
214
214
|
if (typeof window > "u" || !window.matchMedia) return;
|
|
215
|
-
const d = window.matchMedia("(prefers-reduced-motion: reduce)"), a = () =>
|
|
215
|
+
const d = window.matchMedia("(prefers-reduced-motion: reduce)"), a = () => o(d.matches);
|
|
216
216
|
return d.addEventListener("change", a), () => d.removeEventListener("change", a);
|
|
217
217
|
}, []), e;
|
|
218
218
|
}
|
|
219
|
-
function
|
|
220
|
-
const [a, i] = y(!1), [n,
|
|
221
|
-
return
|
|
219
|
+
function fs(e, o, d) {
|
|
220
|
+
const [a, i] = y(!1), [n, r] = y(!1), l = D(0), u = D(!1);
|
|
221
|
+
return _(() => {
|
|
222
222
|
if (!e || typeof window > "u") return;
|
|
223
|
-
|
|
224
|
-
const
|
|
225
|
-
const
|
|
226
|
-
if (i(
|
|
227
|
-
const b =
|
|
228
|
-
b > 4 &&
|
|
223
|
+
l.current = window.scrollY;
|
|
224
|
+
const v = () => {
|
|
225
|
+
const m = window.scrollY;
|
|
226
|
+
if (i(m > d), o === "scroll-up") {
|
|
227
|
+
const b = m - l.current;
|
|
228
|
+
b > 4 && m > d ? r(!0) : (b < -4 || m <= d) && r(!1);
|
|
229
229
|
}
|
|
230
|
-
|
|
231
|
-
},
|
|
232
|
-
|
|
230
|
+
l.current = m, u.current = !1;
|
|
231
|
+
}, c = () => {
|
|
232
|
+
u.current || (u.current = !0, window.requestAnimationFrame(v));
|
|
233
233
|
};
|
|
234
|
-
return window.addEventListener("scroll",
|
|
235
|
-
window.removeEventListener("scroll",
|
|
234
|
+
return window.addEventListener("scroll", c, { passive: !0 }), v(), () => {
|
|
235
|
+
window.removeEventListener("scroll", c);
|
|
236
236
|
};
|
|
237
|
-
}, [e,
|
|
237
|
+
}, [e, o, d]), { stuck: a, hidden: n };
|
|
238
238
|
}
|
|
239
|
-
function
|
|
239
|
+
function B({
|
|
240
240
|
logo: e,
|
|
241
|
-
homeHref:
|
|
241
|
+
homeHref: o,
|
|
242
242
|
resolvedHomeLabel: d,
|
|
243
243
|
resolvedNavLabel: a,
|
|
244
244
|
resolvedMenuLabel: i,
|
|
245
245
|
navSlot: n,
|
|
246
|
-
actionsSlot:
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
246
|
+
actionsSlot: r,
|
|
247
|
+
persistActions: l,
|
|
248
|
+
menuOpen: u,
|
|
249
|
+
setMenuOpen: v,
|
|
250
|
+
sheetId: c
|
|
250
251
|
}) {
|
|
251
|
-
|
|
252
|
+
const m = !!n || !!r && !l;
|
|
253
|
+
return /* @__PURE__ */ t(R, { children: [
|
|
252
254
|
/* @__PURE__ */ s(
|
|
253
255
|
"a",
|
|
254
256
|
{
|
|
255
|
-
href:
|
|
257
|
+
href: o,
|
|
256
258
|
"aria-label": d,
|
|
257
259
|
className: "ds:inline-flex ds:items-center ds:rounded-[var(--radius-sm)] ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
258
260
|
children: e
|
|
259
261
|
}
|
|
260
262
|
),
|
|
261
263
|
n ? /* @__PURE__ */ s(g.Provider, { value: "desktop", children: /* @__PURE__ */ t(
|
|
262
|
-
|
|
264
|
+
p.Root,
|
|
263
265
|
{
|
|
264
266
|
"aria-label": a,
|
|
265
267
|
className: "ds:hidden ds:md:flex ds:relative ds:items-center ds:ms-[var(--spacing-lg)] ds:flex-1 ds:[&>div:first-of-type]:flex ds:[&>div:first-of-type]:flex-1",
|
|
266
268
|
delayDuration: 150,
|
|
267
269
|
children: [
|
|
268
|
-
/* @__PURE__ */ s(
|
|
269
|
-
/* @__PURE__ */ s("div", { className: "ds:absolute ds:top-full ds:start-0 ds:end-0 ds:flex ds:justify-center ds:pointer-events-none", children: /* @__PURE__ */ s("div", { className: "ds:pointer-events-auto", children: /* @__PURE__ */ s(
|
|
270
|
+
/* @__PURE__ */ s(p.List, { className: "ds:flex ds:flex-1 ds:items-center ds:justify-center ds:gap-[var(--spacing-md)] ds:list-none ds:m-0 ds:ps-0", children: n }),
|
|
271
|
+
/* @__PURE__ */ s("div", { className: "ds:absolute ds:top-full ds:start-0 ds:end-0 ds:flex ds:justify-center ds:pointer-events-none", children: /* @__PURE__ */ s("div", { className: "ds:pointer-events-auto", children: /* @__PURE__ */ s(p.Viewport, { className: us }) }) })
|
|
270
272
|
]
|
|
271
273
|
}
|
|
272
274
|
) }) : null,
|
|
273
|
-
|
|
274
|
-
|
|
275
|
+
r ? /* @__PURE__ */ s(
|
|
276
|
+
"div",
|
|
277
|
+
{
|
|
278
|
+
className: [
|
|
279
|
+
// Pinned actions stay inline at every breakpoint; otherwise they
|
|
280
|
+
// are hidden < md and collapse into the mobile menu below.
|
|
281
|
+
l ? "ds:flex" : "ds:hidden ds:md:flex",
|
|
282
|
+
"ds:items-center ds:gap-[var(--spacing-sm)] ds:ms-auto"
|
|
283
|
+
].join(" "),
|
|
284
|
+
children: r
|
|
285
|
+
}
|
|
286
|
+
) : null,
|
|
287
|
+
m ? /* @__PURE__ */ t(f, { open: u, onOpenChange: v, children: [
|
|
275
288
|
/* @__PURE__ */ s(f.Trigger, { asChild: !0, children: /* @__PURE__ */ s(
|
|
276
|
-
|
|
289
|
+
ds,
|
|
277
290
|
{
|
|
278
291
|
size: "md",
|
|
279
292
|
intent: "ghost",
|
|
280
293
|
className: "ds:ms-auto ds:md:hidden",
|
|
281
|
-
icon:
|
|
282
|
-
"aria-controls":
|
|
283
|
-
"aria-expanded":
|
|
294
|
+
icon: u ? /* @__PURE__ */ s(as, { "aria-hidden": "true" }) : /* @__PURE__ */ s(ns, { "aria-hidden": "true" }),
|
|
295
|
+
"aria-controls": c,
|
|
296
|
+
"aria-expanded": u,
|
|
284
297
|
"aria-label": i
|
|
285
298
|
}
|
|
286
299
|
) }),
|
|
287
|
-
/* @__PURE__ */ t(f.Content, { side: "end", size: "md", id:
|
|
300
|
+
/* @__PURE__ */ t(f.Content, { side: "end", size: "md", id: c, children: [
|
|
288
301
|
/* @__PURE__ */ s(f.Header, { children: /* @__PURE__ */ s(f.Title, { children: a }) }),
|
|
289
302
|
/* @__PURE__ */ s(f.Body, { children: /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
290
303
|
n ? /* @__PURE__ */ s(g.Provider, { value: "mobile", children: /* @__PURE__ */ s(
|
|
@@ -296,35 +309,36 @@ function R({
|
|
|
296
309
|
children: n
|
|
297
310
|
}
|
|
298
311
|
) }) : null,
|
|
299
|
-
|
|
312
|
+
r && !l ? /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:mt-[var(--spacing-md)]", children: r }) : null
|
|
300
313
|
] }) })
|
|
301
314
|
] })
|
|
302
|
-
] })
|
|
315
|
+
] }) : null
|
|
303
316
|
] });
|
|
304
317
|
}
|
|
305
318
|
const E = h(
|
|
306
319
|
({
|
|
307
320
|
logo: e,
|
|
308
|
-
homeHref:
|
|
321
|
+
homeHref: o = "/",
|
|
309
322
|
homeLabel: d,
|
|
310
323
|
navSlot: a,
|
|
311
324
|
actionsSlot: i,
|
|
312
325
|
variant: n = "pill",
|
|
313
|
-
sticky:
|
|
314
|
-
stickyOffset:
|
|
315
|
-
menuLabel:
|
|
316
|
-
navLabel:
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
o,
|
|
324
|
-
c
|
|
325
|
-
), $ = j ? !1 : X, H = M(() => k(!0), []), L = M(() => k(!1), []);
|
|
326
|
-
U(
|
|
326
|
+
sticky: r = "none",
|
|
327
|
+
stickyOffset: l = 80,
|
|
328
|
+
menuLabel: u,
|
|
329
|
+
navLabel: v,
|
|
330
|
+
persistActions: c = !1,
|
|
331
|
+
id: m,
|
|
332
|
+
className: b,
|
|
333
|
+
...q
|
|
334
|
+
}, F) => {
|
|
335
|
+
const { t: x } = es(), j = vs(), S = U(), W = `${m ?? S}-sheet`, [w, k] = y(!1), A = n === "transparent" || r === "scroll-up", { stuck: X, hidden: $ } = fs(
|
|
327
336
|
A,
|
|
337
|
+
r,
|
|
338
|
+
l
|
|
339
|
+
), G = j ? !1 : $, H = P(() => k(!0), []), L = P(() => k(!1), []);
|
|
340
|
+
Z(
|
|
341
|
+
F,
|
|
328
342
|
() => ({
|
|
329
343
|
openMenu: H,
|
|
330
344
|
closeMenu: L,
|
|
@@ -332,43 +346,44 @@ const E = h(
|
|
|
332
346
|
}),
|
|
333
347
|
[H, L, w]
|
|
334
348
|
);
|
|
335
|
-
const
|
|
349
|
+
const J = d ?? x("publicHeader.homeLabel", "AlfaDocs — home"), K = v ?? x("publicHeader.primaryNavLabel", "Primary"), Q = u ?? (w ? x("publicHeader.closeMenu", "Close menu") : x("publicHeader.openMenu", "Open menu")), M = {
|
|
336
350
|
logo: e,
|
|
337
|
-
homeHref:
|
|
338
|
-
resolvedHomeLabel:
|
|
339
|
-
resolvedNavLabel:
|
|
340
|
-
resolvedMenuLabel:
|
|
351
|
+
homeHref: o,
|
|
352
|
+
resolvedHomeLabel: J,
|
|
353
|
+
resolvedNavLabel: K,
|
|
354
|
+
resolvedMenuLabel: Q,
|
|
341
355
|
navSlot: a,
|
|
342
356
|
actionsSlot: i,
|
|
357
|
+
persistActions: c,
|
|
343
358
|
menuOpen: w,
|
|
344
359
|
setMenuOpen: k,
|
|
345
|
-
sheetId:
|
|
360
|
+
sheetId: W
|
|
346
361
|
};
|
|
347
362
|
return /* @__PURE__ */ s(
|
|
348
363
|
"header",
|
|
349
364
|
{
|
|
350
|
-
...
|
|
365
|
+
...q,
|
|
351
366
|
"data-component": "public-header",
|
|
352
|
-
"data-component-id":
|
|
367
|
+
"data-component-id": m,
|
|
353
368
|
"data-variant": n,
|
|
354
|
-
"data-stuck":
|
|
355
|
-
"data-hidden":
|
|
369
|
+
"data-stuck": X ? "true" : void 0,
|
|
370
|
+
"data-hidden": G ? "true" : void 0,
|
|
356
371
|
"data-state": j ? "reduced-motion" : void 0,
|
|
357
|
-
className: rs({ variant: n, sticky:
|
|
372
|
+
className: rs({ variant: n, sticky: r, className: b }),
|
|
358
373
|
children: n === "pill" ? /* @__PURE__ */ s(
|
|
359
374
|
"div",
|
|
360
375
|
{
|
|
361
376
|
"data-component": "public-header-container",
|
|
362
|
-
className:
|
|
363
|
-
children: /* @__PURE__ */ s(
|
|
377
|
+
className: os,
|
|
378
|
+
children: /* @__PURE__ */ s(B, { ...M })
|
|
364
379
|
}
|
|
365
|
-
) : /* @__PURE__ */ s(
|
|
380
|
+
) : /* @__PURE__ */ s(B, { ...M })
|
|
366
381
|
}
|
|
367
382
|
);
|
|
368
383
|
}
|
|
369
384
|
);
|
|
370
385
|
E.displayName = "PublicHeader";
|
|
371
|
-
const T = h(({ active: e, className:
|
|
386
|
+
const T = h(({ active: e, className: o, children: d, ...a }, i) => N(g) === "mobile" ? /* @__PURE__ */ s(
|
|
372
387
|
"a",
|
|
373
388
|
{
|
|
374
389
|
ref: i,
|
|
@@ -386,23 +401,23 @@ const T = h(({ active: e, className: r, children: d, ...a }, i) => N(g) === "mob
|
|
|
386
401
|
"ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
387
402
|
"ds:data-[active=true]:text-[var(--primary)]",
|
|
388
403
|
"ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
389
|
-
|
|
404
|
+
o
|
|
390
405
|
].filter(Boolean).join(" "),
|
|
391
406
|
children: d
|
|
392
407
|
}
|
|
393
|
-
) : /* @__PURE__ */ s(
|
|
408
|
+
) : /* @__PURE__ */ s(p.Item, { children: /* @__PURE__ */ s(p.Link, { asChild: !0, active: e, children: /* @__PURE__ */ s(
|
|
394
409
|
"a",
|
|
395
410
|
{
|
|
396
411
|
ref: i,
|
|
397
412
|
...a,
|
|
398
413
|
"data-active": e ? "true" : void 0,
|
|
399
414
|
"aria-current": e ? "page" : void 0,
|
|
400
|
-
className: [
|
|
415
|
+
className: [is(), o].filter(Boolean).join(" "),
|
|
401
416
|
children: d
|
|
402
417
|
}
|
|
403
418
|
) }) }));
|
|
404
419
|
T.displayName = "PublicHeader.NavLink";
|
|
405
|
-
const V = h(({ label: e, wide:
|
|
420
|
+
const V = h(({ label: e, wide: o = !1, children: d, id: a }, i) => N(g) === "mobile" ? /* @__PURE__ */ t(
|
|
406
421
|
"details",
|
|
407
422
|
{
|
|
408
423
|
id: a,
|
|
@@ -435,39 +450,39 @@ const V = h(({ label: e, wide: r = !1, children: d, id: a }, i) => N(g) === "mob
|
|
|
435
450
|
/* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:py-[var(--spacing-sm)]", children: d })
|
|
436
451
|
]
|
|
437
452
|
}
|
|
438
|
-
) : /* @__PURE__ */ t(
|
|
453
|
+
) : /* @__PURE__ */ t(p.Item, { "data-component": "public-header-nav-dropdown", children: [
|
|
439
454
|
/* @__PURE__ */ t(
|
|
440
|
-
|
|
455
|
+
p.Trigger,
|
|
441
456
|
{
|
|
442
457
|
ref: i,
|
|
443
458
|
id: a,
|
|
444
|
-
className:
|
|
459
|
+
className: ts,
|
|
445
460
|
children: [
|
|
446
461
|
e,
|
|
447
|
-
/* @__PURE__ */ s(I, { "aria-hidden": "true", className:
|
|
462
|
+
/* @__PURE__ */ s(I, { "aria-hidden": "true", className: cs })
|
|
448
463
|
]
|
|
449
464
|
}
|
|
450
465
|
),
|
|
451
466
|
/* @__PURE__ */ s(
|
|
452
|
-
|
|
467
|
+
p.Content,
|
|
453
468
|
{
|
|
454
|
-
className:
|
|
469
|
+
className: ls({ wide: o }),
|
|
455
470
|
children: d
|
|
456
471
|
}
|
|
457
472
|
)
|
|
458
473
|
] }));
|
|
459
474
|
V.displayName = "PublicHeader.NavDropdown";
|
|
460
|
-
const O = h(({ href: e, title:
|
|
461
|
-
const n = N(g),
|
|
475
|
+
const O = h(({ href: e, title: o, subtitle: d, children: a }, i) => {
|
|
476
|
+
const n = N(g), r = /* @__PURE__ */ s(
|
|
462
477
|
"span",
|
|
463
478
|
{
|
|
464
479
|
"data-card-title": !0,
|
|
465
480
|
className: "type-title-card ds:text-[var(--foreground)] ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
466
|
-
children:
|
|
481
|
+
children: o
|
|
467
482
|
}
|
|
468
|
-
),
|
|
483
|
+
), v = /* @__PURE__ */ t(R, { children: [
|
|
469
484
|
/* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
470
|
-
|
|
485
|
+
r,
|
|
471
486
|
d ? /* @__PURE__ */ s("span", { className: "type-body-sm ds:text-[var(--muted-foreground)]", children: d }) : null
|
|
472
487
|
] }),
|
|
473
488
|
/* @__PURE__ */ s(
|
|
@@ -497,9 +512,9 @@ const O = h(({ href: e, title: r, subtitle: d, children: a }, i) => {
|
|
|
497
512
|
}
|
|
498
513
|
)
|
|
499
514
|
] });
|
|
500
|
-
let
|
|
501
|
-
return e ? n === "mobile" ?
|
|
502
|
-
|
|
515
|
+
let c;
|
|
516
|
+
return e ? n === "mobile" ? c = /* @__PURE__ */ s("a", { href: e, className: z, children: v }) : c = /* @__PURE__ */ s(p.Link, { asChild: !0, children: /* @__PURE__ */ s("a", { href: e, className: z, children: v }) }) : c = /* @__PURE__ */ t("div", { className: ms, children: [
|
|
517
|
+
r,
|
|
503
518
|
d ? /* @__PURE__ */ s("span", { className: "ds:block type-body-sm ds:text-[var(--muted-foreground)] ds:mt-[var(--spacing-xs)]", children: d }) : null
|
|
504
519
|
] }), /* @__PURE__ */ t(
|
|
505
520
|
"div",
|
|
@@ -508,34 +523,34 @@ const O = h(({ href: e, title: r, subtitle: d, children: a }, i) => {
|
|
|
508
523
|
"data-component": "public-header-dropdown-card",
|
|
509
524
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
510
525
|
children: [
|
|
511
|
-
|
|
526
|
+
c,
|
|
512
527
|
a ? /* @__PURE__ */ s("ul", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:list-none ds:m-0 ds:ps-0", children: a }) : null
|
|
513
528
|
]
|
|
514
529
|
}
|
|
515
530
|
);
|
|
516
531
|
});
|
|
517
532
|
O.displayName = "PublicHeader.DropdownCard";
|
|
518
|
-
const
|
|
519
|
-
const n = N(g),
|
|
533
|
+
const Y = h(({ active: e, className: o, children: d, ...a }, i) => {
|
|
534
|
+
const n = N(g), r = /* @__PURE__ */ s(
|
|
520
535
|
"a",
|
|
521
536
|
{
|
|
522
537
|
ref: i,
|
|
523
538
|
...a,
|
|
524
539
|
"data-active": e ? "true" : void 0,
|
|
525
540
|
"aria-current": e ? "page" : void 0,
|
|
526
|
-
className: [
|
|
541
|
+
className: [ps, o].filter(Boolean).join(" "),
|
|
527
542
|
children: d
|
|
528
543
|
}
|
|
529
544
|
);
|
|
530
|
-
return /* @__PURE__ */ s("li", { "data-component": "public-header-dropdown-link", children: n === "mobile" ?
|
|
545
|
+
return /* @__PURE__ */ s("li", { "data-component": "public-header-dropdown-link", children: n === "mobile" ? r : /* @__PURE__ */ s(p.Link, { asChild: !0, active: e, children: r }) });
|
|
531
546
|
});
|
|
532
|
-
|
|
533
|
-
const
|
|
547
|
+
Y.displayName = "PublicHeader.DropdownLink";
|
|
548
|
+
const js = Object.assign(E, {
|
|
534
549
|
NavLink: T,
|
|
535
550
|
NavDropdown: V,
|
|
536
551
|
DropdownCard: O,
|
|
537
|
-
DropdownLink:
|
|
538
|
-
}),
|
|
552
|
+
DropdownLink: Y
|
|
553
|
+
}), Hs = {
|
|
539
554
|
id: "public-header",
|
|
540
555
|
capabilities: ["open", "close"],
|
|
541
556
|
state: {
|
|
@@ -571,7 +586,7 @@ const Cs = Object.assign(E, {
|
|
|
571
586
|
}
|
|
572
587
|
};
|
|
573
588
|
export {
|
|
574
|
-
|
|
575
|
-
|
|
589
|
+
js as P,
|
|
590
|
+
Hs as p
|
|
576
591
|
};
|
|
577
|
-
//# sourceMappingURL=public-header.agent-
|
|
592
|
+
//# sourceMappingURL=public-header.agent-CYQK6T6F.js.map
|
package/dist/agent-catalog.json
CHANGED
|
@@ -24,6 +24,14 @@ export interface PublicHeaderProps extends Omit<ComponentPropsWithoutRef<'header
|
|
|
24
24
|
menuLabel?: string;
|
|
25
25
|
/** Override the navigation landmark label (`t('publicHeader.primaryNavLabel')`). */
|
|
26
26
|
navLabel?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Keep `actionsSlot` visible inline at every breakpoint instead of
|
|
29
|
+
* collapsing it into the mobile menu. When there is no `navSlot`, the
|
|
30
|
+
* mobile menu trigger is omitted entirely (nothing left to collapse) — use
|
|
31
|
+
* this for a header whose only action is a single always-relevant control,
|
|
32
|
+
* e.g. a public signer's "Sign out". Default `false`.
|
|
33
|
+
*/
|
|
34
|
+
persistActions?: boolean;
|
|
27
35
|
/** Consumer-supplied instance id, surfaced as `data-component-id`. */
|
|
28
36
|
id?: string;
|
|
29
37
|
}
|
package/dist/index.js
CHANGED
|
@@ -86,7 +86,7 @@ import { S as Kt } from "./_chunks/skip-link-BaSMtPwB.js";
|
|
|
86
86
|
import { L as qt } from "./_chunks/link-DrD_cRUg.js";
|
|
87
87
|
import { P as jt, a as zt, b as Xt, c as Jt, d as Zt, e as $t, f as as, g as es, p as rs } from "./_chunks/pagination-DQOgnxxw.js";
|
|
88
88
|
import { D as ts, a as ss, P as ns, S as is, c as ps, p as ms } from "./_chunks/public-footer.agent-CfXuW1x6.js";
|
|
89
|
-
import { P as ds, p as cs } from "./_chunks/public-header.agent-
|
|
89
|
+
import { P as ds, p as cs } from "./_chunks/public-header.agent-CYQK6T6F.js";
|
|
90
90
|
import { S as gs, f as As, s as xs } from "./_chunks/search-bar-CvN_S0jW.js";
|
|
91
91
|
import { S as us, a as Ss, b as Ts, c as bs, d as Ps, e as Is, f as Rs, g as Es, h as hs, i as Fs, j as Ns, k as _s, l as Ls, m as Ds, n as ys, o as Os, p as Bs, q as Ms, s as ks, u as Hs } from "./_chunks/sidebar-DPEHzxLZ.js";
|
|
92
92
|
import { S as vs } from "./_chunks/stepper-accordion-Dki6r9ZE.js";
|