@alfadocs/ui-kit-debug 0.56.0 → 0.58.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/_chunks/public-header.agent-CYQK6T6F.js.map +1 -0
- 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/components/public-header/public-header.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +99 -77
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/use-countdown.d.ts +34 -0
- package/dist/hooks/use-countdown.d.ts.map +1 -0
- package/dist/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/public-header.agent-DyVpPwmv.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfadocs/ui-kit-debug",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.58.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AlfaDocs shared design system — tokens, components, patterns, and translations for platform, booking, and alfascribe. (debug build — identical runtime to @alfadocs/ui-kit, ships source maps for symbolication).",
|
|
6
6
|
"license": "BUSL-1.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"public-header.agent-DyVpPwmv.js","sources":["../../src/components/public-header/public-header.tsx","../../src/components/public-header/public-header.agent.ts"],"sourcesContent":["/* ------------------------------------------------------------------ */\n/* PublicHeader — anonymous / pre-auth site header. */\n/* */\n/* Distinct from the kit's `<Header>` (authenticated app shell): this */\n/* one is for booking-website, signature-website, marketing surfaces — */\n/* anywhere the chrome should read as continuous with `alfadocs.com`, */\n/* not as the logged-in app. */\n/* */\n/* DOM (default / transparent / dark / brand variants): */\n/* <header role=banner data-component=public-header data-stuck=…> */\n/* <a aria-label=homeLabel>{logo}</a> */\n/* <Radix.NavigationMenu>…{navSlot}</Radix.NavigationMenu> ≥ md */\n/* <div class=actions>{actionsSlot}</div> ≥ md only */\n/* <IconButton menu trigger /> ↔ Sheet (partial drawer) < md only */\n/* </header> */\n/* */\n/* DOM (pill variant — matches alfadocs.com floating-pill header): */\n/* <header role=banner data-component=public-header> transparent */\n/* <div data-component=public-header-container> rounded */\n/* …same children as flat variants… */\n/* </div> */\n/* </header> */\n/* ------------------------------------------------------------------ */\n\nimport {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useId,\n useImperativeHandle,\n useRef,\n useState,\n type AnchorHTMLAttributes,\n type ComponentPropsWithoutRef,\n type ElementRef,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { ChevronDown, Menu, X } from 'lucide-react';\nimport { useTranslation } from 'react-i18next';\nimport * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';\nimport { IconButton } from '../button/icon-button';\nimport { Sheet } from '../sheet';\n\n/* ------------------------------------------------------------------ */\n/* Types */\n/* ------------------------------------------------------------------ */\n\nexport interface PublicHeaderHandle {\n openMenu: () => void;\n closeMenu: () => void;\n getMenuOpen: () => boolean;\n}\n\nexport interface PublicHeaderProps\n extends\n Omit<ComponentPropsWithoutRef<'header'>, 'children'>,\n VariantProps<typeof rootVariants> {\n /** Logo lockup, typically `<Logo variant=\"wordmark\" tone=\"primary\" size=\"md\" />`. */\n logo: ReactNode;\n /** Optional href for the logo link. Defaults to `/`. */\n homeHref?: string;\n /** Accessible label for the logo link (falls back to `t('publicHeader.homeLabel')`). */\n homeLabel?: string;\n /** Primary nav links rendered inline ≥ md, collapsed into the mobile sheet below md. */\n navSlot?: ReactNode;\n /** Right-side actions (sign-in / register / role-switch CTAs). */\n actionsSlot?: ReactNode;\n /** Sticky behaviour. Default `none`. */\n sticky?: 'none' | 'top' | 'scroll-up';\n /** Pixel offset above which `sticky=\"scroll-up\"` engages and `transparent` fades to default. */\n stickyOffset?: number;\n /** Override the mobile menu trigger's accessible label (`t('publicHeader.openMenu')`). */\n menuLabel?: string;\n /** Override the navigation landmark label (`t('publicHeader.primaryNavLabel')`). */\n navLabel?: string;\n /** Consumer-supplied instance id, surfaced as `data-component-id`. */\n id?: string;\n}\n\nexport interface PublicHeaderNavLinkProps extends Omit<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n 'children'\n> {\n href: string;\n active?: boolean;\n children: ReactNode;\n}\n\nexport interface PublicHeaderNavDropdownProps {\n /** Trigger label (the visible nav item text). */\n label: ReactNode;\n /**\n * `false` (default) renders a single-card dropdown anchored near the trigger\n * (Settori-style). `true` renders a wide multi-card mega-menu spanning the\n * pill's full inline width (Soluzioni-style).\n */\n wide?: boolean;\n /** Cards / content inside the dropdown panel. */\n children: ReactNode;\n /** Optional id; not required — used only for analytics / test selectors. */\n id?: string;\n}\n\nexport interface PublicHeaderDropdownCardProps {\n /**\n * Optional href — when provided the card title becomes a clickable\n * anchor with a `→` arrow indicator. Without href, the title is\n * a static heading (Settori-style).\n */\n href?: string;\n title: ReactNode;\n /** Optional subtitle / muted helper text under the title. */\n subtitle?: ReactNode;\n /** Sub-list contents (typically PublicHeader.DropdownLink children). */\n children?: ReactNode;\n}\n\nexport interface PublicHeaderDropdownLinkProps extends Omit<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n 'children'\n> {\n href: string;\n active?: boolean;\n children: ReactNode;\n}\n\n/* ------------------------------------------------------------------ */\n/* Context — drives the rendering surface for nav subcomponents. */\n/* */\n/* The same navSlot is rendered twice: once inside the desktop Radix */\n/* NavigationMenu (≥ md, flyout mode) and once inside the mobile Sheet */\n/* drawer (< md, disclosure mode). NavLink / NavDropdown / DropdownCard */\n/* / DropdownLink switch their rendering off this flag so the mobile */\n/* tree doesn't depend on the Radix Root being present. */\n/* ------------------------------------------------------------------ */\n\ntype PublicHeaderSurface = 'desktop' | 'mobile';\n\nconst PublicHeaderSurfaceContext =\n createContext<PublicHeaderSurface>('desktop');\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst rootVariants = cva(\n [\n 'ds:w-full ds:z-[var(--z-sticky)]',\n 'ds:transition-[background-color,box-shadow,transform] ds:duration-[var(--animation-duration)]',\n 'ds:motion-reduce:transition-none',\n ].join(' '),\n {\n variants: {\n variant: {\n // Transparent fades to a solid pill chrome once data-stuck=\"true\"\n // (set by the rAF scroll listener). The fade is handled via the\n // same background utility so `data-stuck` swaps cleanly between\n // states.\n transparent: [\n 'ds:flex ds:items-center ds:gap-[var(--spacing-md)]',\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:sm:ps-[var(--spacing-lg)] ds:sm:pe-[var(--spacing-lg)]',\n 'ds:h-14 ds:md:h-16',\n 'ds:bg-transparent ds:text-[var(--foreground)]',\n 'ds:data-[stuck=true]:bg-[var(--card)]',\n 'ds:data-[stuck=true]:shadow-[var(--shadow-md)]',\n // Once stuck, pair the elevation shadow with a tokenized\n // block-end border so the header has a clear edge against the\n // page below it — shadow alone fades to a faint halo on dark\n // surfaces, leaving the bar reading as unbounded.\n 'ds:data-[stuck=true]:border-block-end ds:data-[stuck=true]:border-[color:var(--border)]',\n 'ds:forced-colors:border-b ds:forced-colors:border-[CanvasText]',\n ].join(' '),\n // `dark` flips its own scope into the dark token set so nav\n // links + buttons inside read off-white text on the dark\n // surface. Without the `theme-dark` scope the children inherit\n // the light-theme `--foreground` and fail color-contrast at\n // ~1.3:1. `--background` already resolves to a dark step under\n // `theme-dark`, so we compose the surface from the standard\n // theme token rather than locking to a raw ramp step.\n dark: [\n 'ds:flex ds:items-center ds:gap-[var(--spacing-md)]',\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:sm:ps-[var(--spacing-lg)] ds:sm:pe-[var(--spacing-lg)]',\n 'ds:h-14 ds:md:h-16',\n 'theme-dark ds:bg-[var(--background)] ds:text-[var(--foreground)]',\n ].join(' '),\n // brand: on-primary bar for public signer/marketing surfaces —\n // e.g. sign.alfadocs.com signing nav. Tokens only; logo should be\n // <Logo variant=\"monochrome\" tone=\"inherit\" /> to read on the\n // primary fill.\n brand: [\n 'ds:flex ds:items-center ds:gap-[var(--spacing-md)]',\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:sm:ps-[var(--spacing-lg)] ds:sm:pe-[var(--spacing-lg)]',\n 'ds:h-14 ds:md:h-16',\n 'ds:bg-[var(--primary)] ds:text-[var(--primary-foreground)]',\n ].join(' '),\n // `pill` matches alfadocs.com's floating rounded-pill header.\n // The outer header is fully transparent (no border, no bg) and\n // simply provides a top-side gutter so the inner container reads\n // as floating. The inner `data-component=\"public-header-container\"`\n // div is the visible chrome — border, rounded, card background.\n pill: [\n 'ds:bg-transparent',\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pt-[var(--spacing-md)]',\n 'ds:sm:ps-[var(--spacing-lg)] ds:sm:pe-[var(--spacing-lg)] ds:sm:pt-[var(--spacing-md)]',\n ].join(' '),\n },\n sticky: {\n none: '',\n top: 'ds:sticky ds:top-0',\n // `scroll-up` is sticky but translates off-screen when scrolling\n // down past `stickyOffset` (handled by data-hidden=\"true\") and\n // slides back in when scrolling up.\n 'scroll-up': [\n 'ds:sticky ds:top-0',\n 'ds:data-[hidden=true]:-translate-y-full',\n ].join(' '),\n },\n },\n defaultVariants: { variant: 'pill', sticky: 'none' },\n },\n);\n\n// Inner pill chrome — only rendered when variant === 'pill'. The actual\n// \"header look\" (rounded, border, card surface) lives here so the outer\n// <header> can stay transparent and provide just the floating offset.\nconst pillContainerClasses = [\n 'ds:flex ds:items-center ds:gap-[var(--spacing-md)]',\n 'ds:w-full ds:max-w-[1400px] ds:mx-auto',\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:sm:ps-[var(--spacing-lg)] ds:sm:pe-[var(--spacing-lg)]',\n // 76px isn't a kit token; the closest is h-16 (64px) which reads tight\n // against alfadocs.com's chrome — keep an explicit min-block-size so\n // the pill reads as substantial without bloating beyond live reference.\n 'ds:min-h-16 ds:md:min-h-[76px]',\n 'ds:bg-[var(--card)] ds:text-[var(--foreground)]',\n 'ds:rounded-[var(--radius-lg)]',\n // Surface-border hairline shared with `Card`. Tuned to ~14% black\n // (light) / 16% white (dark) at the token level so the edge stays\n // visible against tinted page backgrounds — see `--card-border` in\n // `src/tokens/index.css`. Matches alfadocs.com's slate-200 reference\n // pill border without introducing a pill-specific token.\n 'ds:border ds:border-[color:var(--card-border)]',\n 'ds:transition-colors ds:duration-[var(--animation-duration)]',\n 'ds:motion-reduce:transition-none',\n].join(' ');\n\nconst navLinkVariants = cva(\n [\n 'ds:inline-flex ds:items-center',\n 'type-body-sm ds:font-medium',\n // Muted-foreground reads as secondary text and matches alfadocs.com's\n // nav-link colour (the reference's slate-grey). `--foreground` was too\n // dark vs the ref.\n 'ds:text-[var(--muted-foreground)]',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:py-[var(--spacing-xs)]',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:hover:text-[var(--primary)]',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:data-[active=true]:text-[var(--primary)]',\n 'ds:data-[active=true]:[box-shadow:inset_0_-2px_0_var(--primary)]',\n ].join(' '),\n);\n\n// Trigger styling shares the link look + adds the chevron rotation hook.\nconst dropdownTriggerClasses = [\n 'ds:group ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]',\n 'type-body-sm ds:font-medium',\n // Mirror the navLinkVariants colour + inline padding so triggers and\n // plain links share weight, colour and target size.\n 'ds:text-[var(--muted-foreground)]',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:bg-transparent ds:border-0 ds:cursor-pointer',\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:py-[var(--spacing-xs)]',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:hover:text-[var(--primary)]',\n 'ds:data-[state=open]:text-[var(--primary)]',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n].join(' ');\n\nconst dropdownChevronClasses = [\n 'ds:size-3 ds:shrink-0',\n 'ds:transition-transform ds:duration-[var(--animation-duration)]',\n 'ds:group-data-[state=open]:rotate-180',\n 'ds:motion-reduce:transition-none',\n].join(' ');\n\nconst dropdownContentVariants = cva(\n [\n // Radix portals Content into the Viewport; sizing + position is\n // governed by the Viewport — keep Content's own paint to padding\n // + inner layout so motion / position stay consistent across\n // trigger placements.\n 'ds:data-[motion=from-start]:animate-in ds:data-[motion=from-start]:fade-in-0',\n 'ds:data-[motion=from-end]:animate-in ds:data-[motion=from-end]:fade-in-0',\n 'ds:data-[motion=to-start]:animate-out ds:data-[motion=to-start]:fade-out-0',\n 'ds:data-[motion=to-end]:animate-out ds:data-[motion=to-end]:fade-out-0',\n 'ds:motion-reduce:animate-none',\n ].join(' '),\n {\n variants: {\n wide: {\n true: [\n 'ds:grid ds:grid-cols-2 ds:lg:grid-cols-4',\n 'ds:gap-[var(--spacing-lg)]',\n 'ds:p-[var(--spacing-lg)]',\n 'ds:w-screen ds:max-w-[1400px]',\n ].join(' '),\n false: ['ds:p-[var(--spacing-md)]', 'ds:min-w-[280px]'].join(' '),\n },\n },\n defaultVariants: { wide: false },\n },\n);\n\nconst viewportClasses = [\n // Position the Viewport flush below the pill / nav row. Radix sets\n // `--radix-navigation-menu-viewport-width` and `…-height` so the\n // panel sizes itself to whichever Content is currently active.\n 'ds:absolute ds:top-full ds:start-1/2 ds:-translate-x-1/2',\n 'ds:mt-[var(--spacing-sm)]',\n 'ds:w-[var(--radix-navigation-menu-viewport-width)]',\n 'ds:h-[var(--radix-navigation-menu-viewport-height)]',\n 'ds:overflow-hidden',\n 'ds:bg-[var(--card)] ds:text-[var(--foreground)]',\n 'ds:rounded-[var(--radius-lg)] ds:border ds:border-[color:var(--border)]',\n 'ds:shadow-[var(--shadow-lg)]',\n 'ds:data-[state=open]:animate-in ds:data-[state=closed]:animate-out',\n 'ds:data-[state=open]:fade-in-0 ds:data-[state=closed]:fade-out-0',\n 'ds:data-[state=open]:zoom-in-95 ds:data-[state=closed]:zoom-out-95',\n 'ds:origin-top ds:transition-[width,height] ds:duration-[var(--animation-duration)]',\n 'ds:motion-reduce:animate-none ds:motion-reduce:transition-none',\n].join(' ');\n\nconst cardLinkClasses = [\n 'ds:flex ds:items-start ds:justify-between ds:gap-[var(--spacing-sm)]',\n 'ds:no-underline ds:text-[var(--foreground)]',\n 'ds:pb-[var(--spacing-sm)]',\n // alfadocs.com renders the card header flush against the sub-list with\n // no separator rule — match that by dropping the border-b that earlier\n // versions of this component carried.\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:hover:[&_[data-card-title]]:text-[var(--primary)]',\n 'ds:hover:[&_[data-card-arrow]]:text-[var(--primary)]',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:group/cardlink',\n].join(' ');\n\nconst cardHeaderStaticClasses = [\n 'ds:pb-[var(--spacing-sm)]',\n // Match the linked-card variant: no separator rule under the title.\n].join(' ');\n\nconst subLinkClasses = [\n 'ds:block ds:no-underline',\n 'type-body-sm ds:font-medium ds:text-[var(--muted-foreground)]',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]',\n 'ds:hover:bg-[var(--muted)]/30 ds:hover:text-[var(--primary)]',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:data-[active=true]:text-[var(--primary)]',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n].join(' ');\n\n/* ------------------------------------------------------------------ */\n/* Reduced motion */\n/* ------------------------------------------------------------------ */\n\nfunction usePrefersReducedMotion(): boolean {\n const [reduced, setReduced] = useState(() => {\n if (typeof window === 'undefined' || !window.matchMedia) return false;\n return window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n });\n useEffect(() => {\n if (typeof window === 'undefined' || !window.matchMedia) return;\n const mq = window.matchMedia('(prefers-reduced-motion: reduce)');\n const onChange = (): void => setReduced(mq.matches);\n mq.addEventListener('change', onChange);\n return () => mq.removeEventListener('change', onChange);\n }, []);\n return reduced;\n}\n\n/* ------------------------------------------------------------------ */\n/* Scroll listener */\n/* */\n/* rAF-throttled tracker for two flags on the header root: */\n/* - `data-stuck`: scrollY > stickyOffset (drives the transparent → */\n/* solid fade + the scroll-up shadow lift). */\n/* - `data-hidden`: scrolling DOWN past stickyOffset hides the header */\n/* via transform; scrolling UP slides it back. Only emitted when */\n/* `sticky === 'scroll-up'`. */\n/* ------------------------------------------------------------------ */\n\nfunction useHeaderScrollState(\n enabled: boolean,\n sticky: NonNullable<PublicHeaderProps['sticky']>,\n stickyOffset: number,\n): {\n stuck: boolean;\n hidden: boolean;\n} {\n const [stuck, setStuck] = useState(false);\n const [hidden, setHidden] = useState(false);\n const lastYRef = useRef(0);\n const tickingRef = useRef(false);\n\n useEffect(() => {\n if (!enabled || typeof window === 'undefined') return;\n lastYRef.current = window.scrollY;\n\n const update = (): void => {\n const y = window.scrollY;\n setStuck(y > stickyOffset);\n if (sticky === 'scroll-up') {\n const delta = y - lastYRef.current;\n // Hide on a meaningful downward delta past the offset; show on\n // any upward delta. 4px deadband keeps minor wheel inertia from\n // flapping the bar.\n if (delta > 4 && y > stickyOffset) setHidden(true);\n else if (delta < -4 || y <= stickyOffset) setHidden(false);\n }\n lastYRef.current = y;\n tickingRef.current = false;\n };\n const onScroll = (): void => {\n if (tickingRef.current) return;\n tickingRef.current = true;\n window.requestAnimationFrame(update);\n };\n window.addEventListener('scroll', onScroll, { passive: true });\n // Initial sync so we don't miss state when mounted past the offset.\n update();\n return () => {\n window.removeEventListener('scroll', onScroll);\n };\n }, [enabled, sticky, stickyOffset]);\n\n return { stuck, hidden };\n}\n\n/* ------------------------------------------------------------------ */\n/* Inner content (shared between flat + pill variants) */\n/* ------------------------------------------------------------------ */\n\ninterface InnerContentProps {\n logo: ReactNode;\n homeHref: string;\n resolvedHomeLabel: string;\n resolvedNavLabel: string;\n resolvedMenuLabel: string;\n navSlot?: ReactNode;\n actionsSlot?: ReactNode;\n menuOpen: boolean;\n setMenuOpen: (open: boolean) => void;\n sheetId: string;\n}\n\nfunction InnerContent({\n logo,\n homeHref,\n resolvedHomeLabel,\n resolvedNavLabel,\n resolvedMenuLabel,\n navSlot,\n actionsSlot,\n menuOpen,\n setMenuOpen,\n sheetId,\n}: InnerContentProps): React.JSX.Element {\n return (\n <>\n <a\n href={homeHref}\n aria-label={resolvedHomeLabel}\n 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)]\"\n >\n {logo}\n </a>\n\n {navSlot ? (\n <PublicHeaderSurfaceContext.Provider value=\"desktop\">\n <NavigationMenuPrimitive.Root\n aria-label={resolvedNavLabel}\n // Radix wraps the List in an unstyled `<div>` between Root and\n // <ul>. The `[&>div:first-of-type]:flex` arbitrary selector\n // forces that wrapper into flex so the List's flex-1 actually\n // stretches it across the available width.\n 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\"\n delayDuration={150}\n >\n <NavigationMenuPrimitive.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\">\n {navSlot}\n </NavigationMenuPrimitive.List>\n {/* Viewport renders the active panel below the nav row. The\n wrapper centres it horizontally relative to the trigger row;\n Radix sets viewport-width/-height vars so the panel sizes\n to whichever Content is open. */}\n <div className=\"ds:absolute ds:top-full ds:start-0 ds:end-0 ds:flex ds:justify-center ds:pointer-events-none\">\n <div className=\"ds:pointer-events-auto\">\n <NavigationMenuPrimitive.Viewport className={viewportClasses} />\n </div>\n </div>\n </NavigationMenuPrimitive.Root>\n </PublicHeaderSurfaceContext.Provider>\n ) : null}\n\n {actionsSlot ? (\n <div className=\"ds:hidden ds:md:flex ds:items-center ds:gap-[var(--spacing-sm)] ds:ms-auto\">\n {actionsSlot}\n </div>\n ) : null}\n\n {/* Mobile menu trigger (< md). Wired to a Sheet (partial drawer\n from inline-end) so navSlot + actionsSlot collapse there. */}\n <Sheet open={menuOpen} onOpenChange={setMenuOpen}>\n <Sheet.Trigger asChild>\n <IconButton\n size=\"md\"\n intent=\"ghost\"\n className=\"ds:ms-auto ds:md:hidden\"\n icon={\n menuOpen ? <X aria-hidden=\"true\" /> : <Menu aria-hidden=\"true\" />\n }\n aria-controls={sheetId}\n aria-expanded={menuOpen}\n aria-label={resolvedMenuLabel}\n />\n </Sheet.Trigger>\n <Sheet.Content side=\"end\" size=\"md\" id={sheetId}>\n <Sheet.Header>\n <Sheet.Title>{resolvedNavLabel}</Sheet.Title>\n </Sheet.Header>\n <Sheet.Body>\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\">\n {navSlot ? (\n <PublicHeaderSurfaceContext.Provider value=\"mobile\">\n <nav\n aria-label={resolvedNavLabel}\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\"\n data-mobile-nav=\"true\"\n >\n {navSlot}\n </nav>\n </PublicHeaderSurfaceContext.Provider>\n ) : null}\n {actionsSlot ? (\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:mt-[var(--spacing-md)]\">\n {actionsSlot}\n </div>\n ) : null}\n </div>\n </Sheet.Body>\n </Sheet.Content>\n </Sheet>\n </>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Root */\n/* ------------------------------------------------------------------ */\n\nconst PublicHeaderRoot = forwardRef<HTMLElement, PublicHeaderProps>(\n (\n {\n logo,\n homeHref = '/',\n homeLabel,\n navSlot,\n actionsSlot,\n variant = 'pill',\n sticky = 'none',\n stickyOffset = 80,\n menuLabel,\n navLabel,\n id,\n className,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const reduced = usePrefersReducedMotion();\n const autoId = useId();\n const sheetId = `${id ?? autoId}-sheet`;\n const [menuOpen, setMenuOpen] = useState(false);\n\n // Scroll listener is only active when `transparent` or `scroll-up`\n // need it. Hidden state is disabled under reduced motion (the bar\n // stays visible — translating off-screen is precisely the motion\n // class of user the preference targets).\n const scrollEnabled = variant === 'transparent' || sticky === 'scroll-up';\n const { stuck, hidden } = useHeaderScrollState(\n scrollEnabled,\n sticky,\n stickyOffset,\n );\n const effectiveHidden = reduced ? false : hidden;\n\n const openMenu = useCallback((): void => setMenuOpen(true), []);\n const closeMenu = useCallback((): void => setMenuOpen(false), []);\n\n useImperativeHandle(\n ref as React.Ref<PublicHeaderHandle> | null | undefined,\n () => ({\n openMenu,\n closeMenu,\n getMenuOpen: () => menuOpen,\n }),\n [openMenu, closeMenu, menuOpen],\n );\n\n const resolvedHomeLabel =\n homeLabel ?? t('publicHeader.homeLabel', 'AlfaDocs — home');\n const resolvedNavLabel =\n navLabel ?? t('publicHeader.primaryNavLabel', 'Primary');\n const resolvedMenuLabel =\n menuLabel ??\n (menuOpen\n ? t('publicHeader.closeMenu', 'Close menu')\n : t('publicHeader.openMenu', 'Open menu'));\n\n const innerProps: InnerContentProps = {\n logo,\n homeHref,\n resolvedHomeLabel,\n resolvedNavLabel,\n resolvedMenuLabel,\n navSlot,\n actionsSlot,\n menuOpen,\n setMenuOpen,\n sheetId,\n };\n\n return (\n <header\n {...rest}\n data-component=\"public-header\"\n data-component-id={id}\n data-variant={variant}\n data-stuck={stuck ? 'true' : undefined}\n data-hidden={effectiveHidden ? 'true' : undefined}\n data-state={reduced ? 'reduced-motion' : undefined}\n className={rootVariants({ variant, sticky, className })}\n >\n {variant === 'pill' ? (\n <div\n data-component=\"public-header-container\"\n className={pillContainerClasses}\n >\n <InnerContent {...innerProps} />\n </div>\n ) : (\n <InnerContent {...innerProps} />\n )}\n </header>\n );\n },\n);\nPublicHeaderRoot.displayName = 'PublicHeader';\n\n/* ------------------------------------------------------------------ */\n/* NavLink */\n/* ------------------------------------------------------------------ */\n\nconst PublicHeaderNavLink = forwardRef<\n HTMLAnchorElement,\n PublicHeaderNavLinkProps\n>(({ active, className, children, ...rest }, ref) => {\n const surface = useContext(PublicHeaderSurfaceContext);\n // Desktop: NavigationMenu.Item + .Link give Radix the keyboard / focus\n // semantics across the trigger row. We render the actual <a> via\n // asChild so consumers can swap in router links transparently.\n // Mobile: plain <a> inside the Sheet's <nav> — no Radix Root in scope,\n // so we render outside the NavigationMenu primitive.\n if (surface === 'mobile') {\n return (\n <a\n ref={ref}\n {...rest}\n data-active={active ? 'true' : undefined}\n aria-current={active ? 'page' : undefined}\n className={[\n 'ds:block ds:no-underline',\n 'type-body-sm ds:font-medium',\n 'ds:text-[var(--foreground)]',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:py-[var(--spacing-sm)]',\n 'ds:hover:bg-[var(--muted)]/30 ds:hover:text-[var(--primary)]',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:data-[active=true]:text-[var(--primary)]',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n >\n {children}\n </a>\n );\n }\n return (\n <NavigationMenuPrimitive.Item>\n <NavigationMenuPrimitive.Link asChild active={active}>\n <a\n ref={ref}\n {...rest}\n data-active={active ? 'true' : undefined}\n aria-current={active ? 'page' : undefined}\n className={[navLinkVariants(), className].filter(Boolean).join(' ')}\n >\n {children}\n </a>\n </NavigationMenuPrimitive.Link>\n </NavigationMenuPrimitive.Item>\n );\n});\nPublicHeaderNavLink.displayName = 'PublicHeader.NavLink';\n\n/* ------------------------------------------------------------------ */\n/* NavDropdown */\n/* ------------------------------------------------------------------ */\n\nconst PublicHeaderNavDropdown = forwardRef<\n ElementRef<typeof NavigationMenuPrimitive.Trigger>,\n PublicHeaderNavDropdownProps\n>(({ label, wide = false, children, id }, ref) => {\n const surface = useContext(PublicHeaderSurfaceContext);\n if (surface === 'mobile') {\n // <details>/<summary> gives semantic disclosure for free —\n // Enter/Space toggles, summary is focusable, content collapses\n // when not open. No JS needed.\n return (\n <details\n id={id}\n data-component=\"public-header-nav-dropdown\"\n className=\"ds:group ds:border-b ds:border-[color:var(--border)]\"\n >\n <summary\n className={[\n 'ds:flex ds:items-center ds:justify-between ds:cursor-pointer',\n 'type-body-sm ds:font-medium ds:text-[var(--foreground)]',\n 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:py-[var(--spacing-sm)]',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:list-none ds:[&::-webkit-details-marker]:hidden',\n ].join(' ')}\n >\n <span>{label}</span>\n <ChevronDown\n aria-hidden=\"true\"\n className=\"ds:size-3 ds:shrink-0 ds:transition-transform ds:duration-[var(--animation-duration)] ds:group-[[open]]:rotate-180 ds:motion-reduce:transition-none\"\n />\n </summary>\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:py-[var(--spacing-sm)]\">\n {children}\n </div>\n </details>\n );\n }\n return (\n <NavigationMenuPrimitive.Item data-component=\"public-header-nav-dropdown\">\n <NavigationMenuPrimitive.Trigger\n ref={ref}\n id={id}\n className={dropdownTriggerClasses}\n // Radix already wires aria-expanded + aria-controls. The\n // group / data-state hooks let the chevron rotate via Tailwind.\n >\n {label}\n <ChevronDown aria-hidden=\"true\" className={dropdownChevronClasses} />\n </NavigationMenuPrimitive.Trigger>\n <NavigationMenuPrimitive.Content\n className={dropdownContentVariants({ wide })}\n >\n {children}\n </NavigationMenuPrimitive.Content>\n </NavigationMenuPrimitive.Item>\n );\n});\nPublicHeaderNavDropdown.displayName = 'PublicHeader.NavDropdown';\n\n/* ------------------------------------------------------------------ */\n/* DropdownCard */\n/* ------------------------------------------------------------------ */\n\nconst PublicHeaderDropdownCard = forwardRef<\n HTMLDivElement,\n PublicHeaderDropdownCardProps\n>(({ href, title, subtitle, children }, ref) => {\n const surface = useContext(PublicHeaderSurfaceContext);\n // The Card header. In mobile we render a plain <a> when href is set —\n // no Radix Link wrapper because the NavigationMenu root isn't in scope\n // inside the Sheet.\n const titleNode = (\n <span\n data-card-title\n className=\"type-title-card ds:text-[var(--foreground)] ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none\"\n >\n {title}\n </span>\n );\n const subtitleNode = subtitle ? (\n <span className=\"type-body-sm ds:text-[var(--muted-foreground)]\">\n {subtitle}\n </span>\n ) : null;\n\n const arrow = (\n <span\n data-card-arrow\n aria-hidden=\"true\"\n className=\"ds:flex-none ds:text-[var(--muted-foreground)] ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none ds:rtl:-scale-x-100\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M5 12h14\" />\n <path d=\"m12 5 7 7-7 7\" />\n </svg>\n </span>\n );\n\n const linkInner = (\n <>\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]\">\n {titleNode}\n {subtitleNode}\n </div>\n {arrow}\n </>\n );\n\n let header: React.JSX.Element;\n if (href) {\n if (surface === 'mobile') {\n header = (\n <a href={href} className={cardLinkClasses}>\n {linkInner}\n </a>\n );\n } else {\n header = (\n <NavigationMenuPrimitive.Link asChild>\n <a href={href} className={cardLinkClasses}>\n {linkInner}\n </a>\n </NavigationMenuPrimitive.Link>\n );\n }\n } else {\n header = (\n <div className={cardHeaderStaticClasses}>\n {titleNode}\n {subtitle ? (\n <span className=\"ds:block type-body-sm ds:text-[var(--muted-foreground)] ds:mt-[var(--spacing-xs)]\">\n {subtitle}\n </span>\n ) : null}\n </div>\n );\n }\n\n return (\n <div\n ref={ref}\n data-component=\"public-header-dropdown-card\"\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]\"\n >\n {header}\n {children ? (\n <ul className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:list-none ds:m-0 ds:ps-0\">\n {children}\n </ul>\n ) : null}\n </div>\n );\n});\nPublicHeaderDropdownCard.displayName = 'PublicHeader.DropdownCard';\n\n/* ------------------------------------------------------------------ */\n/* DropdownLink */\n/* ------------------------------------------------------------------ */\n\nconst PublicHeaderDropdownLink = forwardRef<\n HTMLAnchorElement,\n PublicHeaderDropdownLinkProps\n>(({ active, className, children, ...rest }, ref) => {\n const surface = useContext(PublicHeaderSurfaceContext);\n const anchor = (\n <a\n ref={ref}\n {...rest}\n data-active={active ? 'true' : undefined}\n aria-current={active ? 'page' : undefined}\n className={[subLinkClasses, className].filter(Boolean).join(' ')}\n >\n {children}\n </a>\n );\n return (\n <li data-component=\"public-header-dropdown-link\">\n {surface === 'mobile' ? (\n anchor\n ) : (\n <NavigationMenuPrimitive.Link asChild active={active}>\n {anchor}\n </NavigationMenuPrimitive.Link>\n )}\n </li>\n );\n});\nPublicHeaderDropdownLink.displayName = 'PublicHeader.DropdownLink';\n\n/* ------------------------------------------------------------------ */\n/* Public surface */\n/* ------------------------------------------------------------------ */\n\nexport const PublicHeader = Object.assign(PublicHeaderRoot, {\n NavLink: PublicHeaderNavLink,\n NavDropdown: PublicHeaderNavDropdown,\n DropdownCard: PublicHeaderDropdownCard,\n DropdownLink: PublicHeaderDropdownLink,\n});\n","import type { AgentAdapter } from '../../agent/types';\nimport type { PublicHeaderHandle } from './public-header';\n\nexport const publicHeaderAgent: AgentAdapter<PublicHeaderHandle> = {\n id: 'public-header',\n capabilities: ['open', 'close'],\n state: {\n menuOpen: {\n type: 'boolean',\n description: 'Whether the mobile drawer is currently open.',\n read: (handle) => handle.getMenuOpen(),\n },\n },\n actions: {\n open_menu: {\n safety: 'read',\n description: 'Open the mobile drawer.',\n invoke: (handle) => {\n handle.openMenu();\n },\n },\n close_menu: {\n safety: 'read',\n description: 'Close the mobile drawer.',\n invoke: (handle) => {\n handle.closeMenu();\n },\n },\n },\n domHooks: {\n root: { attr: 'data-component', value: 'public-header' },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop on PublicHeader.',\n },\n },\n};\n"],"names":["PublicHeaderSurfaceContext","createContext","rootVariants","cva","pillContainerClasses","navLinkVariants","dropdownTriggerClasses","dropdownChevronClasses","dropdownContentVariants","viewportClasses","cardLinkClasses","cardHeaderStaticClasses","subLinkClasses","usePrefersReducedMotion","reduced","setReduced","useState","useEffect","mq","onChange","useHeaderScrollState","enabled","sticky","stickyOffset","stuck","setStuck","hidden","setHidden","lastYRef","useRef","tickingRef","update","y","delta","onScroll","InnerContent","logo","homeHref","resolvedHomeLabel","resolvedNavLabel","resolvedMenuLabel","navSlot","actionsSlot","menuOpen","setMenuOpen","sheetId","jsxs","Fragment","jsx","NavigationMenuPrimitive","Sheet","IconButton","X","Menu","PublicHeaderRoot","forwardRef","homeLabel","variant","menuLabel","navLabel","id","className","rest","ref","t","useTranslation","autoId","useId","scrollEnabled","effectiveHidden","openMenu","useCallback","closeMenu","useImperativeHandle","innerProps","PublicHeaderNavLink","active","children","useContext","PublicHeaderNavDropdown","label","wide","ChevronDown","PublicHeaderDropdownCard","href","title","subtitle","surface","titleNode","linkInner","header","PublicHeaderDropdownLink","anchor","PublicHeader","publicHeaderAgent","handle"],"mappings":";;;;;;;;;;AA6IA,MAAMA,IACJC,EAAmC,SAAS,GAMxCC,KAAeC;AAAA,EACnB;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,EAAA,EACA,KAAK,GAAG;AAAA,EACV;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA,QAKP,aAAa;AAAA,UACX;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA;AAAA;AAAA;AAAA;AAAA,UAKA;AAAA,UACA;AAAA,QAAA,EACA,KAAK,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAQV,MAAM;AAAA,UACJ;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QAAA,EACA,KAAK,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA,QAKV,OAAO;AAAA,UACL;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QAAA,EACA,KAAK,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAMV,MAAM;AAAA,UACJ;AAAA,UACA;AAAA,UACA;AAAA,QAAA,EACA,KAAK,GAAG;AAAA,MAAA;AAAA,MAEZ,QAAQ;AAAA,QACN,MAAM;AAAA,QACN,KAAK;AAAA;AAAA;AAAA;AAAA,QAIL,aAAa;AAAA,UACX;AAAA,UACA;AA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