@nswds/ui 5.5.1 → 5.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/components/badge.d.ts +1 -1
  2. package/dist/components/button-group.js +4 -4
  3. package/dist/components/button-group.js.map +1 -1
  4. package/dist/components/button.d.ts +2 -2
  5. package/dist/components/card.js +2 -2
  6. package/dist/components/card.js.map +1 -1
  7. package/dist/components/checkbox.js +1 -1
  8. package/dist/components/checkbox.js.map +1 -1
  9. package/dist/components/combobox.js +3 -3
  10. package/dist/components/combobox.js.map +1 -1
  11. package/dist/components/drawer.js +1 -1
  12. package/dist/components/drawer.js.map +1 -1
  13. package/dist/components/header.d.ts +1 -1
  14. package/dist/components/hover-card.js +1 -1
  15. package/dist/components/hover-card.js.map +1 -1
  16. package/dist/components/input-group.js +2 -2
  17. package/dist/components/input-group.js.map +1 -1
  18. package/dist/components/input-otp.js +2 -2
  19. package/dist/components/input-otp.js.map +1 -1
  20. package/dist/components/kbd.js +1 -1
  21. package/dist/components/kbd.js.map +1 -1
  22. package/dist/components/link.d.ts +1 -1
  23. package/dist/components/masthead.d.ts +1 -1
  24. package/dist/components/native-select.js +1 -1
  25. package/dist/components/native-select.js.map +1 -1
  26. package/dist/components/navigation-menu.js +2 -2
  27. package/dist/components/navigation-menu.js.map +1 -1
  28. package/dist/components/popover.js +1 -1
  29. package/dist/components/popover.js.map +1 -1
  30. package/dist/components/progress.js +1 -1
  31. package/dist/components/progress.js.map +1 -1
  32. package/dist/components/resizable.js +1 -1
  33. package/dist/components/resizable.js.map +1 -1
  34. package/dist/components/select.js +3 -3
  35. package/dist/components/select.js.map +1 -1
  36. package/dist/components/site-search.js +1 -1
  37. package/dist/components/site-search.js.map +1 -1
  38. package/dist/components/skip-link.d.ts +1 -1
  39. package/dist/components/slider.js +2 -2
  40. package/dist/components/slider.js.map +1 -1
  41. package/dist/components/tabs.js +2 -2
  42. package/dist/components/tabs.js.map +1 -1
  43. package/dist/components/textarea.js +1 -1
  44. package/dist/components/textarea.js.map +1 -1
  45. package/dist/components/toggle-group.js +2 -2
  46. package/dist/components/toggle-group.js.map +1 -1
  47. package/dist/components/toggle.js +2 -2
  48. package/dist/components/toggle.js.map +1 -1
  49. package/dist/components/tooltip.js +1 -1
  50. package/dist/components/tooltip.js.map +1 -1
  51. package/dist/styles.css +1 -1
  52. package/package.json +2 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/navigation-menu.tsx"],"names":["NavigationMenuPrimitive"],"mappings":";;;;;;;AAiCA,MAAM,iBAAA,GAAoB;AAAA,EACxB,8EAAA;AAAA,EACA,2EAAA;AAAA,EACA;AACF,CAAA;AAgBA,MAAM,gCAAgC,GAAA,CAAI;AAAA,EACxC,GAAG,iBAAA;AAAA;AAAA;AAAA,EAGH,0JAAA;AAAA,EACA,gCAAA;AAAA,EACA,+BAAA;AAAA;AAAA;AAAA;AAAA,EAIA,0FAAA;AAAA;AAAA,EAEA,sCAAA;AAAA,EACA,kIAAA;AAAA,EACA;AACF,CAAC;AAyDD,SAAS,cAAA,CAAe;AAAA,EACtB,SAAA;AAAA,EACA,QAAA;AAAA,EACA,IAAA;AAAA,EACA,UAAA,GAAa,CAAA;AAAA,EACb,KAAA;AAAA,EACA,WAAA;AAAA;AAAA,EAEA,gBAAA,GAAmB,EAAA;AAAA;AAAA,EAEnB,kBAAA,GAAqB,EAAE,IAAA,EAAM,MAAA,EAAO;AAAA,EACpC,cAAA;AAAA,EACA,UAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAwB;AACtB,EAAA,uBACE,IAAA;AAAA,IAACA,gBAAA,CAAwB,IAAA;AAAA,IAAxB;AAAA,MACC,WAAA,EAAU,iBAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,kFAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG,KAAA;AAAA,MAEH,QAAA,EAAA;AAAA,QAAA,QAAA;AAAA,wBACD,GAAA,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EACA,IAAA;AAAA,EACA,YAAA,GAAe,IAAA;AAAA,EACf,GAAG;AACL,CAAA,EAA4B;AAC1B,EAAA,uBACE,GAAA;AAAA,IAACA,gBAAA,CAAwB,IAAA;AAAA,IAAxB;AAAA,MACC,WAAA,EAAU,sBAAA;AAAA,MACV,YAAA;AAAA,MACA,SAAA,EAAW,EAAA;AAAA,QACT,iBAAA;AAAA,QACA,4DAAA;AAAA,QACA,+BAAA;AAAA,QACA,0FAAA;AAAA;AAAA,QAEA,kCAAA;AAAA,QACA,kIAAA;AAAA;AAAA;AAAA,QAGA,0FAAA;AAAA,QACA;AAAA,OACF;AAAA,MACA,MAAA,kBAAQ,GAAA,CAAC,IAAA,EAAA,EAAK,OAAA,EAAQ,YAAW,IAAA,EAAY,CAAA;AAAA,MAC5C,GAAG;AAAA;AAAA,GACN;AAEJ","file":"navigation-menu.js","sourcesContent":["'use client'\n\nimport { NavigationMenu as NavigationMenuPrimitive } from '@base-ui/react/navigation-menu'\nimport { cva } from 'class-variance-authority'\nimport type * as React from 'react'\n\nimport { IconKeyboardArrowDown } from '../icons/keyboard-arrow-down.js'\nimport { cn } from '../lib/utils.js'\n\nimport { Link, type LinkProps } from '../components/link.js'\n\n// ─── Shared motion + ink tokens ───────────────────────────────────────────────\n\n// One easing curve — ease-[cubic-bezier(0.22,1,0.36,1)] — is written literally\n// on every animated part (positioner glide, popup resize, content cross-fade,\n// chevron flip) so the menu reads as a single surface in motion, not four\n// independent animations. It is Base UI's documented nav-menu curve: a strong\n// ease-out that settles without overshoot. Written out per-use rather than\n// composed from a shared const so every class stays a literal for Tailwind's\n// source-text scanner.\n\n// Every interactive tint in the menu derives from a single --nav-menu-ink\n// token via color-mix, mirroring the --footer-ink / --link-color pattern\n// (see footer.tsx, link.tsx): a restyle only has to swap the one ink value and\n// the resting/active halos follow. The derivations are written literally\n// (not template-built) because Tailwind scans source text for class names —\n// a computed string would never be emitted.\n//\n// Ink values use the RAW masterbrand tokens (--primary-800 / --primary-200)\n// rather than Tailwind's --color-* bridge aliases: Tailwind v4 tree-shakes\n// unreferenced @theme keys, and a reference from inside an arbitrary property\n// is not a usage signal. The raw tokens are plain :root declarations from\n// @nswds/tokens and always resolve.\nconst navigationMenuInk = [\n '[--nav-menu-ink:var(--primary-800)] dark:[--nav-menu-ink:var(--primary-200)]',\n '[--nav-menu-halo:color-mix(in_oklch,var(--nav-menu-ink)_10%,transparent)]',\n '[--nav-menu-halo-active:color-mix(in_oklch,var(--nav-menu-ink)_18%,transparent)]',\n]\n\n// ─── Trigger styling (exported for reuse) ─────────────────────────────────────\n\n/**\n * Trigger chrome, exported as a cva so siblings (e.g. a main-nav pattern) and\n * plain links that should sit visually beside triggers can reuse or extend it —\n * the app source's `Contact` item renders an `<a>` with exactly these classes.\n *\n * The 10% ink halo marks hover/open and the 18% mix marks pressed; both are\n * backgrounds behind unchanged text, so text contrast is untouched. The\n * keyboard focus indicator is a 2px outline in the ink colour itself\n * (primary-800 on light surfaces, primary-200 in dark mode) — well above the\n * 3:1 non-text contrast minimum of WCAG 2.2 SC 1.4.11 against the white/dark\n * popover surfaces, and offset so it is never obscured (SC 2.4.7, 2.4.11).\n */\nconst navigationMenuTriggerVariants = cva([\n ...navigationMenuInk,\n // Layout — h-9 keeps the row compact; the halo box is the pointer target.\n // mb-2 pairs with the list's bottom hairline, matching the app source.\n 'group mb-2 inline-flex h-9 w-max cursor-pointer items-center justify-center gap-1 rounded-sm px-4 py-2 text-sm font-medium whitespace-nowrap select-none',\n 'bg-transparent text-foreground',\n 'motion-safe:transition-colors',\n // Resting halo on hover/focus/open. `focus:` (not focus-visible) is\n // deliberate for the tint — like Button, triggers give click feedback —\n // while the *outline* below stays keyboard-only.\n 'hover:bg-(--nav-menu-halo) focus:bg-(--nav-menu-halo) active:bg-(--nav-menu-halo-active)',\n // Base UI marks the trigger whose popup is open with data-popup-open.\n 'data-popup-open:bg-(--nav-menu-halo)',\n 'outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--nav-menu-ink)',\n 'disabled:pointer-events-none disabled:opacity-50',\n])\n\n// ─── Root ─────────────────────────────────────────────────────────────────────\n\ntype NavigationMenuProps = Omit<NavigationMenuPrimitive.Root.Props, 'className'> &\n Pick<\n NavigationMenuPrimitive.Positioner.Props,\n 'side' | 'sideOffset' | 'align' | 'alignOffset' | 'collisionPadding' | 'collisionAvoidance'\n > & {\n className?: string\n /** Extra classes for the shared popup surface (sizing, width caps, …). */\n popupClassName?: string\n /**\n * Inline styles for the shared popup surface. The popup normally sizes\n * itself from Base UI's `--popup-width`/`--popup-height`, which are\n * measured ONCE when a section activates — geometry that must track\n * something that can change while the menu is open (MainNav's\n * container-width panels, say) goes stale there. An inline style wins\n * over the measured vars and stays reactive to re-renders.\n */\n popupStyle?: React.CSSProperties\n }\n\n/**\n * Top-level navigation menu — a menubar of triggers whose panels open into one\n * shared, animated popup.\n *\n * INTERNAL to MainNav — not exported from the package barrel, not a registry\n * item, no stories. It began as a public generic wrapper but was pulled from\n * the public API: bare primitive wrappers are not the nswds-ui style (the\n * design system publishes NSW-branded components, not shadcn-alikes), and\n * MainNav is the supported way to get this behaviour. The file ships inside\n * the main-nav registry item, and the module remains reachable through the\n * package's undocumented `components/navigation-menu` export subpath purely\n * as a build artefact — treat that as private API with no stability promise.\n * (The package name is deliberately not written out here: this comment ships\n * in registry content, and the alias-leak guard rejects any occurrence of the\n * package-prefixed import form.)\n *\n * Consumers only write `List > Item > (Trigger + Content)` pairs; the popup\n * plumbing Base UI requires (Portal → Positioner → Popup → Viewport, rendered\n * once at root level, into which every `Content` teleports) is composed here so\n * it cannot be assembled wrong. Positioning knobs (`side`, `sideOffset`,\n * `align`, `collisionPadding`, `collisionAvoidance`) pass through to the\n * internal Positioner.\n *\n * Accessibility is inherited from Base UI: the root renders a `<nav>` landmark\n * (pass `aria-label` when a page has more than one), triggers are real buttons\n * wired with `aria-expanded`/`aria-controls`, ArrowDown/Enter open from the\n * keyboard, arrow keys move along the list, and Escape or focus-out closes\n * (WAI-ARIA disclosure navigation pattern). Do not add ARIA by hand.\n *\n * Departure from the nswds-app source: that wrapper was Radix-based with an\n * optional inline viewport (`viewport` prop); Base UI's model has exactly one\n * viewport, so the prop is gone. Radix's `delayDuration`/`skipDelayDuration`\n * map to Base UI's `delay`/`closeDelay` (both default 50ms).\n */\nfunction NavigationMenu({\n className,\n children,\n side,\n sideOffset = 8,\n align,\n alignOffset,\n // Keep a gutter between the popup and the viewport edge on small screens.\n collisionPadding = 20,\n // Nav panels should never flip beside their menubar — cap size instead.\n collisionAvoidance = { side: 'none' },\n popupClassName,\n popupStyle,\n ...props\n}: NavigationMenuProps) {\n return (\n <NavigationMenuPrimitive.Root\n data-slot='navigation-menu'\n className={cn(\n 'group/navigation-menu relative flex max-w-max flex-1 items-center justify-center',\n className,\n )}\n {...props}\n >\n {children}\n <NavigationMenuPrimitive.Portal>\n <NavigationMenuPrimitive.Positioner\n data-slot='navigation-menu-positioner'\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n collisionPadding={collisionPadding}\n collisionAvoidance={collisionAvoidance}\n className={cn(\n // Base UI reports its measured geometry through these vars; sizing\n // the box from them lets top/left glide between triggers.\n 'isolate z-50 box-border h-[var(--positioner-height)] w-[var(--positioner-width)] max-w-[var(--available-width)]',\n 'duration-300 ease-[cubic-bezier(0.22,1,0.36,1)] motion-safe:transition-[top,left,right,bottom]',\n // data-instant: Base UI disables the glide (e.g. keyboard re-anchor).\n 'data-instant:transition-none',\n )}\n >\n <NavigationMenuPrimitive.Popup\n data-slot='navigation-menu-popup'\n className={cn(\n // House popup surface (see popover.tsx / sheet.tsx).\n 'relative rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10',\n // Width/height track the active Content's size (Base UI measures\n // it into --popup-*), so switching sections morphs the surface\n // instead of jump-cutting.\n 'h-[var(--popup-height)] w-[var(--popup-width)] max-w-[var(--available-width)] origin-(--transform-origin)',\n 'duration-300 ease-[cubic-bezier(0.22,1,0.36,1)] motion-safe:transition-[opacity,transform,width,height,scale,translate]',\n // Open/close via Base UI transition attributes.\n 'data-starting-style:scale-95 data-starting-style:opacity-0',\n 'data-ending-style:scale-95 data-ending-style:opacity-0',\n popupClassName,\n )}\n style={popupStyle}\n >\n <NavigationMenuPrimitive.Viewport\n data-slot='navigation-menu-viewport'\n // Clips the outgoing/incoming Content pair during a section\n // switch; rounded to match the popup so corners don't leak.\n className='relative size-full overflow-hidden rounded-lg'\n />\n </NavigationMenuPrimitive.Popup>\n </NavigationMenuPrimitive.Positioner>\n </NavigationMenuPrimitive.Portal>\n </NavigationMenuPrimitive.Root>\n )\n}\n\n// ─── List / Item ──────────────────────────────────────────────────────────────\n\ntype NavigationMenuListProps = Omit<NavigationMenuPrimitive.List.Props, 'className'> & {\n className?: string\n}\n\n/**\n * The menubar row of triggers. Base UI renders a `<ul>` and manages roving\n * arrow-key focus between the items.\n *\n * Carries the app source's bottom hairline (tokenised from raw grey utilities\n * to the semantic `border-border`, which already flips for dark mode) and its\n * hidden-scrollbar overflow so a long menu can pan on narrow screens.\n *\n * `overflow-x-auto` is what makes that panning real. The scrollbar-HIDING\n * declarations beside it (`[scrollbar-width:none]`, the `::-webkit-scrollbar`\n * rule) are inert on their own: an `overflow: visible` box has no scrollbar to\n * hide, so without this the row simply overflowed its container and pushed a\n * horizontal scrollbar onto the page. `whitespace-nowrap` plus the `shrink-0`\n * items MainNav renders means a bar with more entries than fit is the normal\n * case on a phone, not an edge case.\n *\n * Two consequences of becoming a scroll container, both handled at the call\n * site rather than here:\n *\n * - Per CSS overflow, a non-visible `overflow-x` forces `overflow-y` to\n * compute to `auto`, so anything drawn OUTSIDE a row item's border box is\n * clipped. Items inside the list therefore use inset focus rings\n * (`-outline-offset-*`) — see `mainNavTriggerClassName` /\n * `mainNavTopLinkClassName`. Links inside a `NavigationMenuContent` panel\n * are portalled out of this box and keep the house outward-offset ring.\n * - `justify-center` (the default below) makes the leading overflow\n * unreachable in a scroll container — the well-known centred-flex overflow\n * trap. MainNav overrides it with `justify-start`; any future consumer that\n * keeps the centred default must not also rely on scrolling.\n */\nfunction NavigationMenuList({ className, ...props }: NavigationMenuListProps) {\n return (\n <NavigationMenuPrimitive.List\n data-slot='navigation-menu-list'\n className={cn(\n 'group flex flex-1 list-none items-center justify-center gap-1',\n '[scrollbar-width:none] overflow-x-auto border-b border-border whitespace-nowrap [&::-webkit-scrollbar]:hidden',\n className,\n )}\n {...props}\n />\n )\n}\n\ntype NavigationMenuItemProps = Omit<NavigationMenuPrimitive.Item.Props, 'className'> & {\n className?: string\n}\n\n/**\n * One menubar entry (`<li>`), pairing a `NavigationMenuTrigger` with its\n * `NavigationMenuContent` — or holding a bare `NavigationMenuLink` for items\n * with no panel. Pass `value` when controlling the open item programmatically.\n */\nfunction NavigationMenuItem({ className, ...props }: NavigationMenuItemProps) {\n return (\n <NavigationMenuPrimitive.Item\n data-slot='navigation-menu-item'\n className={cn('relative', className)}\n {...props}\n />\n )\n}\n\n// ─── Trigger ──────────────────────────────────────────────────────────────────\n\ntype NavigationMenuTriggerProps = Omit<NavigationMenuPrimitive.Trigger.Props, 'className'> & {\n className?: string\n}\n\n/**\n * Opens the item's panel. Renders a real `<button>` (never an anchor — the\n * trigger discloses content, it doesn't navigate), which Base UI wires with\n * `aria-expanded`/`aria-controls` and hover/click/keyboard open behaviour.\n *\n * The trailing chevron rides Base UI's Icon part, which mirrors the trigger's\n * `data-popup-open` attribute — the 180° flip is pure CSS off that attribute\n * (no JS state), and is suppressed for reduced-motion users (WCAG 2.3.3).\n * The chevron is decorative, so the Icon part is `aria-hidden`: it never\n * enters the button's accessible name, and the open state it hints at is\n * already conveyed programmatically via `aria-expanded` (SC 4.1.2).\n */\nfunction NavigationMenuTrigger({ className, children, ...props }: NavigationMenuTriggerProps) {\n return (\n <NavigationMenuPrimitive.Trigger\n data-slot='navigation-menu-trigger'\n className={cn(navigationMenuTriggerVariants(), className)}\n {...props}\n >\n {children}\n <NavigationMenuPrimitive.Icon\n data-slot='navigation-menu-icon'\n aria-hidden='true'\n className='flex duration-300 ease-[cubic-bezier(0.22,1,0.36,1)] data-popup-open:rotate-180 motion-safe:transition-transform'\n >\n <IconKeyboardArrowDown className='size-5' />\n </NavigationMenuPrimitive.Icon>\n </NavigationMenuPrimitive.Trigger>\n )\n}\n\n// ─── Content ──────────────────────────────────────────────────────────────────\n\ntype NavigationMenuContentProps = Omit<NavigationMenuPrimitive.Content.Props, 'className'> & {\n className?: string\n}\n\n/**\n * The panel for one item. Authored inline next to its Trigger, but rendered\n * (teleported by Base UI) into the shared root-level Viewport while active —\n * so panel-to-panel switches cross-fade inside one popup surface.\n *\n * The directional slide keys off `data-activation-direction` (which adjacent\n * trigger the user came from), matching the app source's from-start/from-end\n * motion. Set `keepMounted` to keep the panel in the DOM for SSR crawlers.\n */\nfunction NavigationMenuContent({ className, ...props }: NavigationMenuContentProps) {\n return (\n <NavigationMenuPrimitive.Content\n data-slot='navigation-menu-content'\n className={cn(\n 'h-full w-max max-w-[var(--available-width)] p-2',\n 'duration-300 ease-[cubic-bezier(0.22,1,0.36,1)] motion-safe:transition-[opacity,translate]',\n 'data-ending-style:opacity-0 data-starting-style:opacity-0',\n // Slide with the direction of travel between adjacent triggers.\n 'data-starting-style:data-[activation-direction=left]:-translate-x-1/2',\n 'data-starting-style:data-[activation-direction=right]:translate-x-1/2',\n 'data-ending-style:data-[activation-direction=left]:translate-x-1/2',\n 'data-ending-style:data-[activation-direction=right]:-translate-x-1/2',\n className,\n )}\n {...props}\n />\n )\n}\n\n// ─── Link ─────────────────────────────────────────────────────────────────────\n\ntype NavigationMenuLinkProps = Omit<\n NavigationMenuPrimitive.Link.Props,\n 'className' | 'render' | 'href'\n> & {\n className?: string\n /**\n * Link target. Accepts the same string-or-UrlObject union as `Link`, since\n * the rendered element may be a framework link injected via `LinkProvider`.\n */\n href: LinkProps['href']\n}\n\n/**\n * A navigation link inside (or beside) the menu. Composes the design system's\n * `Link` through Base UI's `render` prop: Base UI keeps the behaviour —\n * roving focus, focus-out closing, `aria-current='page'` when `active`, close\n * on click — while `Link` supplies the element, so a `LinkProvider` framework\n * component (e.g. next/link) is injected automatically. `Link` renders with\n * `variant='unstyled'`; this component owns the visual treatment (same ink\n * halo/outline contract as the trigger — see `navigationMenuTriggerVariants`).\n *\n * Departure from Base UI's default: `closeOnClick` defaults to **true** here.\n * In an SPA a client-side navigation doesn't reload the document, so a menu\n * that stays open after choosing a destination reads as broken; pass\n * `closeOnClick={false}` for in-page links that should keep the panel open.\n *\n * Set `active` for the current page (the app source's `usePathname` check is\n * a framework API this package must not import — compare in the consumer and\n * pass the result down): it sets `aria-current='page'` (WCAG 2.4.8 support)\n * and the persistent halo via `data-active`.\n */\nfunction NavigationMenuLink({\n className,\n href,\n closeOnClick = true,\n ...props\n}: NavigationMenuLinkProps) {\n return (\n <NavigationMenuPrimitive.Link\n data-slot='navigation-menu-link'\n closeOnClick={closeOnClick}\n className={cn(\n navigationMenuInk,\n 'flex flex-col gap-1 rounded-sm p-2 text-sm text-foreground',\n 'motion-safe:transition-colors',\n 'hover:bg-(--nav-menu-halo) focus:bg-(--nav-menu-halo) active:bg-(--nav-menu-halo-active)',\n // Persistent tint for the current page (`active` prop → data-active).\n 'data-active:bg-(--nav-menu-halo)',\n 'outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--nav-menu-ink)',\n // Unsized inline icons default to text scale and muted ink; explicit\n // size-*/text-* classes on the icon win.\n \"[&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground\",\n className,\n )}\n render={<Link variant='unstyled' href={href} />}\n {...props}\n />\n )\n}\n\nexport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerVariants,\n}\nexport type {\n NavigationMenuContentProps,\n NavigationMenuItemProps,\n NavigationMenuLinkProps,\n NavigationMenuListProps,\n NavigationMenuProps,\n NavigationMenuTriggerProps,\n}\n"]}
1
+ {"version":3,"sources":["../../src/components/navigation-menu.tsx"],"names":["NavigationMenuPrimitive"],"mappings":";;;;;;;AAiCA,MAAM,iBAAA,GAAoB;AAAA,EACxB,8EAAA;AAAA,EACA,2EAAA;AAAA,EACA;AACF,CAAA;AAgBA,MAAM,gCAAgC,GAAA,CAAI;AAAA,EACxC,GAAG,iBAAA;AAAA;AAAA;AAAA,EAGH,0JAAA;AAAA,EACA,gCAAA;AAAA,EACA,+BAAA;AAAA;AAAA;AAAA;AAAA,EAIA,0FAAA;AAAA;AAAA,EAEA,sCAAA;AAAA,EACA,kIAAA;AAAA,EACA;AACF,CAAC;AAyDD,SAAS,cAAA,CAAe;AAAA,EACtB,SAAA;AAAA,EACA,QAAA;AAAA,EACA,IAAA;AAAA,EACA,UAAA,GAAa,CAAA;AAAA,EACb,KAAA;AAAA,EACA,WAAA;AAAA;AAAA,EAEA,gBAAA,GAAmB,EAAA;AAAA;AAAA,EAEnB,kBAAA,GAAqB,EAAE,IAAA,EAAM,MAAA,EAAO;AAAA,EACpC,cAAA;AAAA,EACA,UAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAwB;AACtB,EAAA,uBACE,IAAA;AAAA,IAACA,gBAAA,CAAwB,IAAA;AAAA,IAAxB;AAAA,MACC,WAAA,EAAU,iBAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,kFAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG,KAAA;AAAA,MAEH,QAAA,EAAA;AAAA,QAAA,QAAA;AAAA,wBACD,GAAA,CAACA,gBAAA,CAAwB,MAAA,EAAxB,EACC,QAAA,kBAAA,GAAA;AAAA,UAACA,gBAAA,CAAwB,UAAA;AAAA,UAAxB;AAAA,YACC,WAAA,EAAU,4BAAA;AAAA,YACV,IAAA;AAAA,YACA,UAAA;AAAA,YACA,KAAA;AAAA,YACA,WAAA;AAAA,YACA,gBAAA;AAAA,YACA,kBAAA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AA;AAAA,QACA,4DAAA;AAAA,QACA,+BAAA;AAAA,QACA,0FAAA;AAAA;AAAA,QAEA,kCAAA;AAAA,QACA,kIAAA;AAAA;AAAA;AAAA,QAGA,0FAAA;AAAA,QACA;AAAA,OACF;AAAA,MACA,MAAA,kBAAQ,GAAA,CAAC,IAAA,EAAA,EAAK,OAAA,EAAQ,YAAW,IAAA,EAAY,CAAA;AAAA,MAC5C,GAAG;AAAA;AAAA,GACN;AAEJ","file":"navigation-menu.js","sourcesContent":["'use client'\n\nimport { NavigationMenu as NavigationMenuPrimitive } from '@base-ui/react/navigation-menu'\nimport { cva } from 'class-variance-authority'\nimport type * as React from 'react'\n\nimport { IconKeyboardArrowDown } from '../icons/keyboard-arrow-down.js'\nimport { cn } from '../lib/utils.js'\n\nimport { Link, type LinkProps } from '../components/link.js'\n\n// ─── Shared motion + ink tokens ───────────────────────────────────────────────\n\n// One easing curve — ease-[cubic-bezier(0.22,1,0.36,1)] — is written literally\n// on every animated part (positioner glide, popup resize, content cross-fade,\n// chevron flip) so the menu reads as a single surface in motion, not four\n// independent animations. It is Base UI's documented nav-menu curve: a strong\n// ease-out that settles without overshoot. Written out per-use rather than\n// composed from a shared const so every class stays a literal for Tailwind's\n// source-text scanner.\n\n// Every interactive tint in the menu derives from a single --nav-menu-ink\n// token via color-mix, mirroring the --footer-ink / --link-color pattern\n// (see footer.tsx, link.tsx): a restyle only has to swap the one ink value and\n// the resting/active halos follow. The derivations are written literally\n// (not template-built) because Tailwind scans source text for class names —\n// a computed string would never be emitted.\n//\n// Ink values use the RAW masterbrand tokens (--primary-800 / --primary-200)\n// rather than Tailwind's --color-* bridge aliases: Tailwind v4 tree-shakes\n// unreferenced @theme keys, and a reference from inside an arbitrary property\n// is not a usage signal. The raw tokens are plain :root declarations from\n// @nswds/tokens and always resolve.\nconst navigationMenuInk = [\n '[--nav-menu-ink:var(--primary-800)] dark:[--nav-menu-ink:var(--primary-200)]',\n '[--nav-menu-halo:color-mix(in_oklch,var(--nav-menu-ink)_10%,transparent)]',\n '[--nav-menu-halo-active:color-mix(in_oklch,var(--nav-menu-ink)_18%,transparent)]',\n]\n\n// ─── Trigger styling (exported for reuse) ─────────────────────────────────────\n\n/**\n * Trigger chrome, exported as a cva so siblings (e.g. a main-nav pattern) and\n * plain links that should sit visually beside triggers can reuse or extend it —\n * the app source's `Contact` item renders an `<a>` with exactly these classes.\n *\n * The 10% ink halo marks hover/open and the 18% mix marks pressed; both are\n * backgrounds behind unchanged text, so text contrast is untouched. The\n * keyboard focus indicator is a 2px outline in the ink colour itself\n * (primary-800 on light surfaces, primary-200 in dark mode) — well above the\n * 3:1 non-text contrast minimum of WCAG 2.2 SC 1.4.11 against the white/dark\n * popover surfaces, and offset so it is never obscured (SC 2.4.7, 2.4.11).\n */\nconst navigationMenuTriggerVariants = cva([\n ...navigationMenuInk,\n // Layout — h-9 keeps the row compact; the halo box is the pointer target.\n // mb-2 pairs with the list's bottom hairline, matching the app source.\n 'group mb-2 inline-flex h-9 w-max cursor-pointer items-center justify-center gap-1 rounded-sm px-4 py-2 text-sm font-medium whitespace-nowrap select-none',\n 'bg-transparent text-foreground',\n 'motion-safe:transition-colors',\n // Resting halo on hover/focus/open. `focus:` (not focus-visible) is\n // deliberate for the tint — like Button, triggers give click feedback —\n // while the *outline* below stays keyboard-only.\n 'hover:bg-(--nav-menu-halo) focus:bg-(--nav-menu-halo) active:bg-(--nav-menu-halo-active)',\n // Base UI marks the trigger whose popup is open with data-popup-open.\n 'data-popup-open:bg-(--nav-menu-halo)',\n 'outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--nav-menu-ink)',\n 'disabled:pointer-events-none disabled:opacity-50',\n])\n\n// ─── Root ─────────────────────────────────────────────────────────────────────\n\ntype NavigationMenuProps = Omit<NavigationMenuPrimitive.Root.Props, 'className'> &\n Pick<\n NavigationMenuPrimitive.Positioner.Props,\n 'side' | 'sideOffset' | 'align' | 'alignOffset' | 'collisionPadding' | 'collisionAvoidance'\n > & {\n className?: string\n /** Extra classes for the shared popup surface (sizing, width caps, …). */\n popupClassName?: string\n /**\n * Inline styles for the shared popup surface. The popup normally sizes\n * itself from Base UI's `--popup-width`/`--popup-height`, which are\n * measured ONCE when a section activates — geometry that must track\n * something that can change while the menu is open (MainNav's\n * container-width panels, say) goes stale there. An inline style wins\n * over the measured vars and stays reactive to re-renders.\n */\n popupStyle?: React.CSSProperties\n }\n\n/**\n * Top-level navigation menu — a menubar of triggers whose panels open into one\n * shared, animated popup.\n *\n * INTERNAL to MainNav — not exported from the package barrel, not a registry\n * item, no stories. It began as a public generic wrapper but was pulled from\n * the public API: bare primitive wrappers are not the nswds-ui style (the\n * design system publishes NSW-branded components, not shadcn-alikes), and\n * MainNav is the supported way to get this behaviour. The file ships inside\n * the main-nav registry item, and the module remains reachable through the\n * package's undocumented `components/navigation-menu` export subpath purely\n * as a build artefact — treat that as private API with no stability promise.\n * (The package name is deliberately not written out here: this comment ships\n * in registry content, and the alias-leak guard rejects any occurrence of the\n * package-prefixed import form.)\n *\n * Consumers only write `List > Item > (Trigger + Content)` pairs; the popup\n * plumbing Base UI requires (Portal → Positioner → Popup → Viewport, rendered\n * once at root level, into which every `Content` teleports) is composed here so\n * it cannot be assembled wrong. Positioning knobs (`side`, `sideOffset`,\n * `align`, `collisionPadding`, `collisionAvoidance`) pass through to the\n * internal Positioner.\n *\n * Accessibility is inherited from Base UI: the root renders a `<nav>` landmark\n * (pass `aria-label` when a page has more than one), triggers are real buttons\n * wired with `aria-expanded`/`aria-controls`, ArrowDown/Enter open from the\n * keyboard, arrow keys move along the list, and Escape or focus-out closes\n * (WAI-ARIA disclosure navigation pattern). Do not add ARIA by hand.\n *\n * Departure from the nswds-app source: that wrapper was Radix-based with an\n * optional inline viewport (`viewport` prop); Base UI's model has exactly one\n * viewport, so the prop is gone. Radix's `delayDuration`/`skipDelayDuration`\n * map to Base UI's `delay`/`closeDelay` (both default 50ms).\n */\nfunction NavigationMenu({\n className,\n children,\n side,\n sideOffset = 8,\n align,\n alignOffset,\n // Keep a gutter between the popup and the viewport edge on small screens.\n collisionPadding = 20,\n // Nav panels should never flip beside their menubar — cap size instead.\n collisionAvoidance = { side: 'none' },\n popupClassName,\n popupStyle,\n ...props\n}: NavigationMenuProps) {\n return (\n <NavigationMenuPrimitive.Root\n data-slot='navigation-menu'\n className={cn(\n 'group/navigation-menu relative flex max-w-max flex-1 items-center justify-center',\n className,\n )}\n {...props}\n >\n {children}\n <NavigationMenuPrimitive.Portal>\n <NavigationMenuPrimitive.Positioner\n data-slot='navigation-menu-positioner'\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n collisionPadding={collisionPadding}\n collisionAvoidance={collisionAvoidance}\n className={cn(\n // Base UI reports its measured geometry through these vars; sizing\n // the box from them lets top/left glide between triggers.\n 'isolate z-50 box-border h-[var(--positioner-height)] w-[var(--positioner-width)] max-w-[var(--available-width)]',\n 'duration-300 ease-[cubic-bezier(0.22,1,0.36,1)] motion-safe:transition-[top,left,right,bottom]',\n // data-instant: Base UI disables the glide (e.g. keyboard re-anchor).\n 'data-instant:transition-none',\n )}\n >\n <NavigationMenuPrimitive.Popup\n data-slot='navigation-menu-popup'\n className={cn(\n // House popup surface (see popover.tsx / sheet.tsx).\n 'relative rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10',\n // Width/height track the active Content's size (Base UI measures\n // it into --popup-*), so switching sections morphs the surface\n // instead of jump-cutting.\n 'h-[var(--popup-height)] w-[var(--popup-width)] max-w-[var(--available-width)] origin-(--transform-origin)',\n 'duration-300 ease-[cubic-bezier(0.22,1,0.36,1)] motion-safe:transition-[opacity,transform,width,height,scale,translate]',\n // Open/close via Base UI transition attributes.\n 'data-starting-style:scale-95 data-starting-style:opacity-0',\n 'data-ending-style:scale-95 data-ending-style:opacity-0',\n popupClassName,\n )}\n style={popupStyle}\n >\n <NavigationMenuPrimitive.Viewport\n data-slot='navigation-menu-viewport'\n // Clips the outgoing/incoming Content pair during a section\n // switch; rounded to match the popup so corners don't leak.\n className='relative size-full overflow-hidden rounded-md'\n />\n </NavigationMenuPrimitive.Popup>\n </NavigationMenuPrimitive.Positioner>\n </NavigationMenuPrimitive.Portal>\n </NavigationMenuPrimitive.Root>\n )\n}\n\n// ─── List / Item ──────────────────────────────────────────────────────────────\n\ntype NavigationMenuListProps = Omit<NavigationMenuPrimitive.List.Props, 'className'> & {\n className?: string\n}\n\n/**\n * The menubar row of triggers. Base UI renders a `<ul>` and manages roving\n * arrow-key focus between the items.\n *\n * Carries the app source's bottom hairline (tokenised from raw grey utilities\n * to the semantic `border-border`, which already flips for dark mode) and its\n * hidden-scrollbar overflow so a long menu can pan on narrow screens.\n *\n * `overflow-x-auto` is what makes that panning real. The scrollbar-HIDING\n * declarations beside it (`[scrollbar-width:none]`, the `::-webkit-scrollbar`\n * rule) are inert on their own: an `overflow: visible` box has no scrollbar to\n * hide, so without this the row simply overflowed its container and pushed a\n * horizontal scrollbar onto the page. `whitespace-nowrap` plus the `shrink-0`\n * items MainNav renders means a bar with more entries than fit is the normal\n * case on a phone, not an edge case.\n *\n * Two consequences of becoming a scroll container, both handled at the call\n * site rather than here:\n *\n * - Per CSS overflow, a non-visible `overflow-x` forces `overflow-y` to\n * compute to `auto`, so anything drawn OUTSIDE a row item's border box is\n * clipped. Items inside the list therefore use inset focus rings\n * (`-outline-offset-*`) — see `mainNavTriggerClassName` /\n * `mainNavTopLinkClassName`. Links inside a `NavigationMenuContent` panel\n * are portalled out of this box and keep the house outward-offset ring.\n * - `justify-center` (the default below) makes the leading overflow\n * unreachable in a scroll container — the well-known centred-flex overflow\n * trap. MainNav overrides it with `justify-start`; any future consumer that\n * keeps the centred default must not also rely on scrolling.\n */\nfunction NavigationMenuList({ className, ...props }: NavigationMenuListProps) {\n return (\n <NavigationMenuPrimitive.List\n data-slot='navigation-menu-list'\n className={cn(\n 'group flex flex-1 list-none items-center justify-center gap-1',\n '[scrollbar-width:none] overflow-x-auto border-b border-border whitespace-nowrap [&::-webkit-scrollbar]:hidden',\n className,\n )}\n {...props}\n />\n )\n}\n\ntype NavigationMenuItemProps = Omit<NavigationMenuPrimitive.Item.Props, 'className'> & {\n className?: string\n}\n\n/**\n * One menubar entry (`<li>`), pairing a `NavigationMenuTrigger` with its\n * `NavigationMenuContent` — or holding a bare `NavigationMenuLink` for items\n * with no panel. Pass `value` when controlling the open item programmatically.\n */\nfunction NavigationMenuItem({ className, ...props }: NavigationMenuItemProps) {\n return (\n <NavigationMenuPrimitive.Item\n data-slot='navigation-menu-item'\n className={cn('relative', className)}\n {...props}\n />\n )\n}\n\n// ─── Trigger ──────────────────────────────────────────────────────────────────\n\ntype NavigationMenuTriggerProps = Omit<NavigationMenuPrimitive.Trigger.Props, 'className'> & {\n className?: string\n}\n\n/**\n * Opens the item's panel. Renders a real `<button>` (never an anchor — the\n * trigger discloses content, it doesn't navigate), which Base UI wires with\n * `aria-expanded`/`aria-controls` and hover/click/keyboard open behaviour.\n *\n * The trailing chevron rides Base UI's Icon part, which mirrors the trigger's\n * `data-popup-open` attribute — the 180° flip is pure CSS off that attribute\n * (no JS state), and is suppressed for reduced-motion users (WCAG 2.3.3).\n * The chevron is decorative, so the Icon part is `aria-hidden`: it never\n * enters the button's accessible name, and the open state it hints at is\n * already conveyed programmatically via `aria-expanded` (SC 4.1.2).\n */\nfunction NavigationMenuTrigger({ className, children, ...props }: NavigationMenuTriggerProps) {\n return (\n <NavigationMenuPrimitive.Trigger\n data-slot='navigation-menu-trigger'\n className={cn(navigationMenuTriggerVariants(), className)}\n {...props}\n >\n {children}\n <NavigationMenuPrimitive.Icon\n data-slot='navigation-menu-icon'\n aria-hidden='true'\n className='flex duration-300 ease-[cubic-bezier(0.22,1,0.36,1)] data-popup-open:rotate-180 motion-safe:transition-transform'\n >\n <IconKeyboardArrowDown className='size-5' />\n </NavigationMenuPrimitive.Icon>\n </NavigationMenuPrimitive.Trigger>\n )\n}\n\n// ─── Content ──────────────────────────────────────────────────────────────────\n\ntype NavigationMenuContentProps = Omit<NavigationMenuPrimitive.Content.Props, 'className'> & {\n className?: string\n}\n\n/**\n * The panel for one item. Authored inline next to its Trigger, but rendered\n * (teleported by Base UI) into the shared root-level Viewport while active —\n * so panel-to-panel switches cross-fade inside one popup surface.\n *\n * The directional slide keys off `data-activation-direction` (which adjacent\n * trigger the user came from), matching the app source's from-start/from-end\n * motion. Set `keepMounted` to keep the panel in the DOM for SSR crawlers.\n */\nfunction NavigationMenuContent({ className, ...props }: NavigationMenuContentProps) {\n return (\n <NavigationMenuPrimitive.Content\n data-slot='navigation-menu-content'\n className={cn(\n 'h-full w-max max-w-[var(--available-width)] p-2',\n 'duration-300 ease-[cubic-bezier(0.22,1,0.36,1)] motion-safe:transition-[opacity,translate]',\n 'data-ending-style:opacity-0 data-starting-style:opacity-0',\n // Slide with the direction of travel between adjacent triggers.\n 'data-starting-style:data-[activation-direction=left]:-translate-x-1/2',\n 'data-starting-style:data-[activation-direction=right]:translate-x-1/2',\n 'data-ending-style:data-[activation-direction=left]:translate-x-1/2',\n 'data-ending-style:data-[activation-direction=right]:-translate-x-1/2',\n className,\n )}\n {...props}\n />\n )\n}\n\n// ─── Link ─────────────────────────────────────────────────────────────────────\n\ntype NavigationMenuLinkProps = Omit<\n NavigationMenuPrimitive.Link.Props,\n 'className' | 'render' | 'href'\n> & {\n className?: string\n /**\n * Link target. Accepts the same string-or-UrlObject union as `Link`, since\n * the rendered element may be a framework link injected via `LinkProvider`.\n */\n href: LinkProps['href']\n}\n\n/**\n * A navigation link inside (or beside) the menu. Composes the design system's\n * `Link` through Base UI's `render` prop: Base UI keeps the behaviour —\n * roving focus, focus-out closing, `aria-current='page'` when `active`, close\n * on click — while `Link` supplies the element, so a `LinkProvider` framework\n * component (e.g. next/link) is injected automatically. `Link` renders with\n * `variant='unstyled'`; this component owns the visual treatment (same ink\n * halo/outline contract as the trigger — see `navigationMenuTriggerVariants`).\n *\n * Departure from Base UI's default: `closeOnClick` defaults to **true** here.\n * In an SPA a client-side navigation doesn't reload the document, so a menu\n * that stays open after choosing a destination reads as broken; pass\n * `closeOnClick={false}` for in-page links that should keep the panel open.\n *\n * Set `active` for the current page (the app source's `usePathname` check is\n * a framework API this package must not import — compare in the consumer and\n * pass the result down): it sets `aria-current='page'` (WCAG 2.4.8 support)\n * and the persistent halo via `data-active`.\n */\nfunction NavigationMenuLink({\n className,\n href,\n closeOnClick = true,\n ...props\n}: NavigationMenuLinkProps) {\n return (\n <NavigationMenuPrimitive.Link\n data-slot='navigation-menu-link'\n closeOnClick={closeOnClick}\n className={cn(\n navigationMenuInk,\n 'flex flex-col gap-1 rounded-sm p-2 text-sm text-foreground',\n 'motion-safe:transition-colors',\n 'hover:bg-(--nav-menu-halo) focus:bg-(--nav-menu-halo) active:bg-(--nav-menu-halo-active)',\n // Persistent tint for the current page (`active` prop → data-active).\n 'data-active:bg-(--nav-menu-halo)',\n 'outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--nav-menu-ink)',\n // Unsized inline icons default to text scale and muted ink; explicit\n // size-*/text-* classes on the icon win.\n \"[&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground\",\n className,\n )}\n render={<Link variant='unstyled' href={href} />}\n {...props}\n />\n )\n}\n\nexport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerVariants,\n}\nexport type {\n NavigationMenuContentProps,\n NavigationMenuItemProps,\n NavigationMenuLinkProps,\n NavigationMenuListProps,\n NavigationMenuProps,\n NavigationMenuTriggerProps,\n}\n"]}
@@ -30,7 +30,7 @@ function PopoverContent({
30
30
  {
31
31
  "data-slot": "popover-content",
32
32
  className: cn(
33
- "z-50 flex w-72 origin-(--transform-origin) flex-col gap-4 rounded-lg bg-popover p-2.5 text-xs text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
33
+ "z-50 flex w-72 origin-(--transform-origin) flex-col gap-4 rounded-md bg-popover p-2.5 text-xs text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
34
34
  className
35
35
  ),
36
36
  ...props
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/popover.tsx"],"names":["PopoverPrimitive"],"mappings":";;;;AAOA,SAAS,OAAA,CAAQ,EAAE,GAAG,KAAA,EAAM,EAAgC;AAC1D,EAAA,2BAAQA,SAAA,CAAiB,IAAA,EAAjB,EAAsB,WAAA,EAAU,SAAA,EAAW,GAAG,KAAA,EAAO,CAAA;AAC/D;AAEA,SAAS,cAAA,CAAe,EAAE,GAAG,KAAA,EAAM,EAAmC;AACpE,EAAA,2BAAQA,SAAA,CAAiB,OAAA,EAAjB,EAAyB,WAAA,EAAU,iBAAA,EAAmB,GAAG,KAAA,EAAO,CAAA;AAC1E;AAEA,SAAS,cAAA,CAAe;AAAA,EACtB,SAAA;AAAA,EACA,KAAA,GAAQ,QAAA;AAAA,EACR,WAAA,GAAc,CAAA;AAAA,EACd,IAAA,GAAO,QAAA;AAAA,EACP,UAAA,GAAa,CAAA;AAAA,EACb,GAAG;AACL,CAAA,EAC4F;AAC1F,EAAA,uBACE,GAAA,CAACA,SAAA,CA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import { Popover as PopoverPrimitive } from '@base-ui/react/popover'\nimport * as React from 'react'\n\nimport { cn } from '../lib/utils.js'\n\nfunction Popover({ ...props }: PopoverPrimitive.Root.Props) {\n return <PopoverPrimitive.Root data-slot='popover' {...props} />\n}\n\nfunction PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props) {\n return <PopoverPrimitive.Trigger data-slot='popover-trigger' {...props} />\n}\n\nfunction PopoverContent({\n className,\n align = 'center',\n alignOffset = 0,\n side = 'bottom',\n sideOffset = 4,\n ...props\n}: PopoverPrimitive.Popup.Props &\n Pick<PopoverPrimitive.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset'>) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Positioner\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n className='isolate z-50'\n >\n <PopoverPrimitive.Popup\n data-slot='popover-content'\n className={cn(\n 'z-50 flex w-72 origin-(--transform-origin) flex-col gap-4 rounded-lg bg-popover p-2.5 text-xs text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Positioner>\n </PopoverPrimitive.Portal>\n )\n}\n\nfunction PopoverHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='popover-header'\n className={cn('flex flex-col gap-1 text-xs', className)}\n {...props}\n />\n )\n}\n\nfunction PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {\n return (\n <PopoverPrimitive.Title\n data-slot='popover-title'\n className={cn('text-sm font-medium', className)}\n {...props}\n />\n )\n}\n\nfunction PopoverDescription({ className, ...props }: PopoverPrimitive.Description.Props) {\n return (\n <PopoverPrimitive.Description\n data-slot='popover-description'\n className={cn('text-muted-foreground', className)}\n {...props}\n />\n )\n}\n\nexport { Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger }\n"]}
1
+ {"version":3,"sources":["../../src/components/popover.tsx"],"names":["PopoverPrimitive"],"mappings":";;;;AAOA,SAAS,OAAA,CAAQ,EAAE,GAAG,KAAA,EAAM,EAAgC;AAC1D,EAAA,2BAAQA,SAAA,CAAiB,IAAA,EAAjB,EAAsB,WAAA,EAAU,SAAA,EAAW,GAAG,KAAA,EAAO,CAAA;AAC/D;AAEA,SAAS,cAAA,CAAe,EAAE,GAAG,KAAA,EAAM,EAAmC;AACpE,EAAA,2BAAQA,SAAA,CAAiB,OAAA,EAAjB,EAAyB,WAAA,EAAU,iBAAA,EAAmB,GAAG,KAAA,EAAO,CAAA;AAC1E;AAEA,SAAS,cAAA,CAAe;AAAA,EACtB,SAAA;AAAA,EACA,KAAA,GAAQ,QAAA;AAAA,EACR,WAAA,GAAc,CAAA;AAAA,EACd,IAAA,GAAO,QAAA;AAAA,EACP,UAAA,GAAa,CAAA;AAAA,EACb,GAAG;AACL,CAAA,EAC4F;AAC1F,EAAA,uBACE,GAAA,CAACA,SAAA,CAAiB,MAAA,EAAjB,EACC,QAAA,kBAAA,GAAA;AAAA,IAACA,SAAA,CAAiB,UAAA;AAAA,IAAjB;AAAA,MACC,KAAA;AAAA,MACA,WAAA;AAAA,MACA,IAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA,EAAU,cAAA;AAAA,MAEV,QAAA,kBAAA,GAAA;AAAA,QAACA,SAAA,CAAiB,KAAA;AAAA,QAAjB;AAAA,UACC,WAAA,EAAU,iBAAA;AAAA,UACV,SAAA,EAAW,EAAA;AAAA,YACT,kjBAAA;AAAA,YACA;AAAA,WACF;AAAA,UACC,GAAG;AAAA;AAAA;AACN;AAAA,GACF,EACF,CAAA;AAEJ;AAEA,SAAS,aAAA,CAAc,EAAE,SAAA,EAAW,GAAG,OAAM,EAAgC;AAC3E,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,gBAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,6BAAA,EAA+B,SAAS,CAAA;AAAA,MACrD,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,YAAA,CAAa,EAAE,SAAA,EAAW,GAAG,OAAM,EAAiC;AAC3E,EAAA,uBACE,GAAA;AAAA,IAACA,SAAA,CAAiB,KAAA;AAAA,IAAjB;AAAA,MACC,WAAA,EAAU,eAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,qBAAA,EAAuB,SAAS,CAAA;AAAA,MAC7C,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,kBAAA,CAAmB,EAAE,SAAA,EAAW,GAAG,OAAM,EAAuC;AACvF,EAAA,uBACE,GAAA;AAAA,IAACA,SAAA,CAAiB,WAAA;AAAA,IAAjB;AAAA,MACC,WAAA,EAAU,qBAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,uBAAA,EAAyB,SAAS,CAAA;AAAA,MAC/C,GAAG;AAAA;AAAA,GACN;AAEJ","file":"popover.js","sourcesContent":["'use client'\n\nimport { Popover as PopoverPrimitive } from '@base-ui/react/popover'\nimport * as React from 'react'\n\nimport { cn } from '../lib/utils.js'\n\nfunction Popover({ ...props }: PopoverPrimitive.Root.Props) {\n return <PopoverPrimitive.Root data-slot='popover' {...props} />\n}\n\nfunction PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props) {\n return <PopoverPrimitive.Trigger data-slot='popover-trigger' {...props} />\n}\n\nfunction PopoverContent({\n className,\n align = 'center',\n alignOffset = 0,\n side = 'bottom',\n sideOffset = 4,\n ...props\n}: PopoverPrimitive.Popup.Props &\n Pick<PopoverPrimitive.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset'>) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Positioner\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n className='isolate z-50'\n >\n <PopoverPrimitive.Popup\n data-slot='popover-content'\n className={cn(\n 'z-50 flex w-72 origin-(--transform-origin) flex-col gap-4 rounded-md bg-popover p-2.5 text-xs text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Positioner>\n </PopoverPrimitive.Portal>\n )\n}\n\nfunction PopoverHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='popover-header'\n className={cn('flex flex-col gap-1 text-xs', className)}\n {...props}\n />\n )\n}\n\nfunction PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {\n return (\n <PopoverPrimitive.Title\n data-slot='popover-title'\n className={cn('text-sm font-medium', className)}\n {...props}\n />\n )\n}\n\nfunction PopoverDescription({ className, ...props }: PopoverPrimitive.Description.Props) {\n return (\n <PopoverPrimitive.Description\n data-slot='popover-description'\n className={cn('text-muted-foreground', className)}\n {...props}\n />\n )\n}\n\nexport { Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger }\n"]}
@@ -23,7 +23,7 @@ function ProgressTrack({ className, ...props }) {
23
23
  Progress$1.Track,
24
24
  {
25
25
  className: cn(
26
- "relative flex h-1 w-full items-center overflow-x-hidden rounded-md bg-muted",
26
+ "relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted",
27
27
  className
28
28
  ),
29
29
  "data-slot": "progress-track",
@@ -1 +1 @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S,CAAA;AAAA,MACtD,WAAA,EAAU,gBAAA;AAAA,MACT,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,aAAA,CAAc,EAAE,SAAA,EAAW,GAAG,OAAM,EAAkC;AAC7E,EAAA,uBACE,GAAA;AAAA,IAACA,UAAA,CAAkB,KAAA;AAAA,IAAlB;AAAA,MACC,SAAA,EAAW,EAAA,CAAG,4DAAA,EAA8D,SAAS,CAAA;AAAA,MACrF,WAAA,EAAU,gBAAA;AAAA,MACT,GAAG;AAAA;AAAA,GACN;AAEJ","file":"progress.js","sourcesContent":["'use client'\n\nimport { Progress as ProgressPrimitive } from '@base-ui/react/progress'\n\nimport { cn } from '../lib/utils.js'\n\nfunction Progress({ className, children, value, ...props }: ProgressPrimitive.Root.Props) {\n return (\n <ProgressPrimitive.Root\n value={value}\n data-slot='progress'\n className={cn('flex flex-wrap gap-3', className)}\n {...props}\n >\n {children}\n <ProgressTrack>\n <ProgressIndicator />\n </ProgressTrack>\n </ProgressPrimitive.Root>\n )\n}\n\nfunction ProgressTrack({ className, ...props }: ProgressPrimitive.Track.Props) {\n return (\n <ProgressPrimitive.Track\n className={cn(\n 'relative flex h-1 w-full items-center overflow-x-hidden rounded-md bg-muted',\n className,\n )}\n data-slot='progress-track'\n {...props}\n />\n )\n}\n\nfunction ProgressIndicator({ className, ...props }: ProgressPrimitive.Indicator.Props) {\n return (\n <ProgressPrimitive.Indicator\n data-slot='progress-indicator'\n className={cn('h-full bg-primary transition-all', className)}\n {...props}\n />\n )\n}\n\nfunction ProgressLabel({ className, ...props }: ProgressPrimitive.Label.Props) {\n return (\n <ProgressPrimitive.Label\n className={cn('text-xs/relaxed font-medium', className)}\n data-slot='progress-label'\n {...props}\n />\n )\n}\n\nfunction ProgressValue({ className, ...props }: ProgressPrimitive.Value.Props) {\n return (\n <ProgressPrimitive.Value\n className={cn('ms-auto text-xs/relaxed text-muted-foreground tabular-nums', className)}\n data-slot='progress-value'\n {...props}\n />\n )\n}\n\nexport { Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue }\n"]}
1
+ {"version":3,"sources":["../../src/components/progress.tsx"],"names":["ProgressPrimitive"],"mappings":";;;;AAMA,SAAS,SAAS,EAAE,SAAA,EAAW,UAAU,KAAA,EAAO,GAAG,OAAM,EAAiC;AACxF,EAAA,uBACE,IAAA;AAAA,IAACA,UAAA,CAAkB,IAAA;AAAA,IAAlB;AAAA,MACC,KAAA;AAAA,MACA,WAAA,EAAU,UAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,sBAAA,EAAwB,SAAS,CAAA;AAAA,MAC9C,GAAG,KAAA;AAAA,MAEH,QAAA,EAAA;AAAA,QAAA,QAAA;AAAA,wBACD,GAAA,CAAC,aAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,iBAAA,EAAA,EAAkB,CAAA,EACrB;AAAA;AAAA;AAAA,GACF;AAEJ;AAEA,SAAS,aAAA,CAAc,EAAE,SAAA,EAAW,GAAG,OAAM,EAAkC;AAC7E,EAAA,uBACE,GAAA;AAAA,IAACA,UAAA,CAAkB,KAAA;AAAA,IAAlB;AAAA,MACC,SAAA,EAAW,EAAA;AAAA,QACT,+EAAA;AAAA,QACA;AAAA,OACF;AAAA,MACA,WAAA,EAAU,gBAAA;AAAA,MACT,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,iBAAA,CAAkB,EAAE,SAAA,EAAW,GAAG,OAAM,EAAsC;AACrF,EAAA,uBACE,GAAA;AAAA,IAACA,UAAA,CAAkB,SAAA;AAAA,IAAlB;AAAA,MACC,WAAA,EAAU,oBAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,kCAAA,EAAoC,SAAS,CAAA;AAAA,MAC1D,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,aAAA,CAAc,EAAE,SAAA,EAAW,GAAG,OAAM,EAAkC;AAC7E,EAAA,uBACE,GAAA;AAAA,IAACA,UAAA,CAAkB,KAAA;AAAA,IAAlB;AAAA,MACC,SAAA,EAAW,EAAA,CAAG,6BAAA,EAA+B,SAAS,CAAA;AAAA,MACtD,WAAA,EAAU,gBAAA;AAAA,MACT,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,aAAA,CAAc,EAAE,SAAA,EAAW,GAAG,OAAM,EAAkC;AAC7E,EAAA,uBACE,GAAA;AAAA,IAACA,UAAA,CAAkB,KAAA;AAAA,IAAlB;AAAA,MACC,SAAA,EAAW,EAAA,CAAG,4DAAA,EAA8D,SAAS,CAAA;AAAA,MACrF,WAAA,EAAU,gBAAA;AAAA,MACT,GAAG;AAAA;AAAA,GACN;AAEJ","file":"progress.js","sourcesContent":["'use client'\n\nimport { Progress as ProgressPrimitive } from '@base-ui/react/progress'\n\nimport { cn } from '../lib/utils.js'\n\nfunction Progress({ className, children, value, ...props }: ProgressPrimitive.Root.Props) {\n return (\n <ProgressPrimitive.Root\n value={value}\n data-slot='progress'\n className={cn('flex flex-wrap gap-3', className)}\n {...props}\n >\n {children}\n <ProgressTrack>\n <ProgressIndicator />\n </ProgressTrack>\n </ProgressPrimitive.Root>\n )\n}\n\nfunction ProgressTrack({ className, ...props }: ProgressPrimitive.Track.Props) {\n return (\n <ProgressPrimitive.Track\n className={cn(\n 'relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted',\n className,\n )}\n data-slot='progress-track'\n {...props}\n />\n )\n}\n\nfunction ProgressIndicator({ className, ...props }: ProgressPrimitive.Indicator.Props) {\n return (\n <ProgressPrimitive.Indicator\n data-slot='progress-indicator'\n className={cn('h-full bg-primary transition-all', className)}\n {...props}\n />\n )\n}\n\nfunction ProgressLabel({ className, ...props }: ProgressPrimitive.Label.Props) {\n return (\n <ProgressPrimitive.Label\n className={cn('text-xs/relaxed font-medium', className)}\n data-slot='progress-label'\n {...props}\n />\n )\n}\n\nfunction ProgressValue({ className, ...props }: ProgressPrimitive.Value.Props) {\n return (\n <ProgressPrimitive.Value\n className={cn('ms-auto text-xs/relaxed text-muted-foreground tabular-nums', className)}\n data-slot='progress-value'\n {...props}\n />\n )\n}\n\nexport { Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue }\n"]}
@@ -30,7 +30,7 @@ function ResizableHandle({
30
30
  className
31
31
  ),
32
32
  ...props,
33
- children: withHandle && /* @__PURE__ */ jsx("div", { className: "z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border" })
33
+ children: withHandle && /* @__PURE__ */ jsx("div", { className: "z-10 flex h-6 w-1 shrink-0 rounded-full bg-border" })
34
34
  }
35
35
  );
36
36
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/resizable.tsx"],"names":[],"mappings":";;;;AAMA,SAAS,mBAAA,CAAoB,EAAE,SAAA,EAAW,GAAG,OAAM,EAAkC;AACnF,EAAA,uBACE,GAAA;AAAA,IAAC,kBAAA,CAAmB,KAAA;AAAA,IAAnB;AAAA,MACC,WAAA,EAAU,uBAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,yDAAA,EAA2D,SAAS,CAAA;AAAA,MACjF,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,cAAA,CAAe,EAAE,GAAG,KAAA,EAAM,EAAkC;AACnE,EAAA,2BAAQ,kBAAA,CAAmB,KAAA,EAAnB,EAAyB,WAAA,EAAU,iBAAA,EAAmB,GAAG,KAAA,EAAO,CAAA;AAC1E;AAEA,SAAS,eAAA,CAAgB;AAAA,EACvB,UAAA;AAAA,EACA,SAAA;AAAA,EACA,GAAG;AACL,CAAA,EAEG;AACD,EAAA,uBACE,GAAA;AAAA,IAAC,kBAAA,CAAmB,SAAA;AAAA,IAAnB;AAAA,MACC,WAAA,EAAU,kBAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,ypBAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG,KAAA;AAAA,MAEH,QAAA,EAAA,UAAA,oBAAc,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,iDAAA,EAAkD;AAAA;AAAA,GAClF;AAEJ","file":"resizable.js","sourcesContent":["'use client'\n\nimport * as ResizablePrimitive from 'react-resizable-panels'\n\nimport { cn } from '../lib/utils.js'\n\nfunction ResizablePanelGroup({ className, ...props }: ResizablePrimitive.GroupProps) {\n return (\n <ResizablePrimitive.Group\n data-slot='resizable-panel-group'\n className={cn('flex h-full w-full aria-[orientation=vertical]:flex-col', className)}\n {...props}\n />\n )\n}\n\nfunction ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {\n return <ResizablePrimitive.Panel data-slot='resizable-panel' {...props} />\n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: ResizablePrimitive.SeparatorProps & {\n withHandle?: boolean\n}) {\n return (\n <ResizablePrimitive.Separator\n data-slot='resizable-handle'\n className={cn(\n 'relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:start-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:start-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 rtl:after:translate-x-1/2 rtl:aria-[orientation=horizontal]:after:-translate-x-0 [&[aria-orientation=horizontal]>div]:rotate-90',\n className,\n )}\n {...props}\n >\n {withHandle && <div className='z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border' />}\n </ResizablePrimitive.Separator>\n )\n}\n\nexport { ResizableHandle, ResizablePanel, ResizablePanelGroup }\n"]}
1
+ {"version":3,"sources":["../../src/components/resizable.tsx"],"names":[],"mappings":";;;;AAMA,SAAS,mBAAA,CAAoB,EAAE,SAAA,EAAW,GAAG,OAAM,EAAkC;AACnF,EAAA,uBACE,GAAA;AAAA,IAAC,kBAAA,CAAmB,KAAA;AAAA,IAAnB;AAAA,MACC,WAAA,EAAU,uBAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,yDAAA,EAA2D,SAAS,CAAA;AAAA,MACjF,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,cAAA,CAAe,EAAE,GAAG,KAAA,EAAM,EAAkC;AACnE,EAAA,2BAAQ,kBAAA,CAAmB,KAAA,EAAnB,EAAyB,WAAA,EAAU,iBAAA,EAAmB,GAAG,KAAA,EAAO,CAAA;AAC1E;AAEA,SAAS,eAAA,CAAgB;AAAA,EACvB,UAAA;AAAA,EACA,SAAA;AAAA,EACA,GAAG;AACL,CAAA,EAEG;AACD,EAAA,uBACE,GAAA;AAAA,IAAC,kBAAA,CAAmB,SAAA;AAAA,IAAnB;AAAA,MACC,WAAA,EAAU,kBAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,ypBAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG,KAAA;AAAA,MAEH,QAAA,EAAA,UAAA,oBAAc,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,mDAAA,EAAoD;AAAA;AAAA,GACpF;AAEJ","file":"resizable.js","sourcesContent":["'use client'\n\nimport * as ResizablePrimitive from 'react-resizable-panels'\n\nimport { cn } from '../lib/utils.js'\n\nfunction ResizablePanelGroup({ className, ...props }: ResizablePrimitive.GroupProps) {\n return (\n <ResizablePrimitive.Group\n data-slot='resizable-panel-group'\n className={cn('flex h-full w-full aria-[orientation=vertical]:flex-col', className)}\n {...props}\n />\n )\n}\n\nfunction ResizablePanel({ ...props }: ResizablePrimitive.PanelProps) {\n return <ResizablePrimitive.Panel data-slot='resizable-panel' {...props} />\n}\n\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: ResizablePrimitive.SeparatorProps & {\n withHandle?: boolean\n}) {\n return (\n <ResizablePrimitive.Separator\n data-slot='resizable-handle'\n className={cn(\n 'relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:start-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:start-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 rtl:after:translate-x-1/2 rtl:aria-[orientation=horizontal]:after:-translate-x-0 [&[aria-orientation=horizontal]>div]:rotate-90',\n className,\n )}\n {...props}\n >\n {withHandle && <div className='z-10 flex h-6 w-1 shrink-0 rounded-full bg-border' />}\n </ResizablePrimitive.Separator>\n )\n}\n\nexport { ResizableHandle, ResizablePanel, ResizablePanelGroup }\n"]}
@@ -39,7 +39,7 @@ function SelectTrigger({
39
39
  "data-slot": "select-trigger",
40
40
  "data-size": size,
41
41
  className: cn(
42
- "flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-input/20 px-2 py-1.5 text-xs/relaxed whitespace-nowrap transition-colors outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-7 data-[size=sm]:h-6 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",
42
+ "flex w-fit items-center justify-between gap-1.5 rounded-sm border border-input bg-input/20 px-2 py-1.5 text-xs/relaxed whitespace-nowrap transition-colors outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-7 data-[size=sm]:h-6 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",
43
43
  className
44
44
  ),
45
45
  ...props,
@@ -80,7 +80,7 @@ function SelectContent({
80
80
  "data-slot": "select-content",
81
81
  "data-align-trigger": alignItemWithTrigger,
82
82
  className: cn(
83
- "relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
83
+ "relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
84
84
  className
85
85
  ),
86
86
  ...props,
@@ -110,7 +110,7 @@ function SelectItem({ className, children, ...props }) {
110
110
  {
111
111
  "data-slot": "select-item",
112
112
  className: cn(
113
- "relative flex min-h-7 w-full cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
113
+ "relative flex min-h-7 w-full cursor-default items-center gap-2 rounded-sm px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
114
114
  className
115
115
  ),
116
116
  ...props,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/select.tsx"],"names":["SelectPrimitive"],"mappings":";;;;;;;AAUA,MAAM,SAASA,QAAA,CAAgB;AAE/B,SAAS,WAAA,CAAY,EAAE,SAAA,EAAW,GAAG,OAAM,EAAgC;AACzE,EAAA,uBACE,GAAA;AAAA,IAACA,QAAA,CAAgB,KAAA;AAAA,IAAhB;AAAA,MACC,WAAA,EAAU,cAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,iBAAA,EAAmB,SAAS,CAAA;AAAA,MACzC,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,WAAA,CAAY,EAAE,SAAA,EAAW,GAAG,OAAM,EAAgC;AACzE,EAAA,uBACE,GAAA;AAAA,IAACA,QAAA,CAAgB,KAAA;AAAA,IAAhB;AAAA,MACC,WAAA,EAAU,cAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,wBAAA,EAA0B,SAAS,CAAA;AAAA,MAChD,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,aAAA,CAAc;AAAA,EACrB,S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AACjF,EAAA,uBACE,GAAA;AAAA,IAACA,QAAA,CAAgB,SAAA;AAAA,IAAhB;AAAA,MACC,WAAA,EAAU,kBAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,kDAAA,EAAoD,SAAS,CAAA;AAAA,MAC1E,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,oBAAA,CAAqB;AAAA,EAC5B,SAAA;AAAA,EACA,GAAG;AACL,CAAA,EAA+D;AAC7D,EAAA,uBACE,GAAA;AAAA,IAACA,QAAA,CAAgB,aAAA;AAAA,IAAhB;AAAA,MACC,WAAA,EAAU,yBAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,0HAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG,KAAA;AAAA,MAEJ,8BAAC,cAAA,EAAA,EAAe;AAAA;AAAA,GAClB;AAEJ;AAEA,SAAS,sBAAA,CAAuB;AAAA,EAC9B,SAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAiE;AAC/D,EAAA,uBACE,GAAA;AAAA,IAACA,QAAA,CAAgB,eAAA;AAAA,IAAhB;AAAA,MACC,WAAA,EAAU,2BAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,6HAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG,KAAA;AAAA,MAEJ,8BAAC,cAAA,EAAA,EAAe;AAAA;AAAA,GAClB;AAEJ","file":"select.js","sourcesContent":["'use client'\n\nimport { Select as SelectPrimitive } from '@base-ui/react/select'\nimport * as React from 'react'\n\nimport { IconCheck } from '../icons/check.js'\nimport { IconExpandLess } from '../icons/expand-less.js'\nimport { IconExpandMore } from '../icons/expand-more.js'\nimport { cn } from '../lib/utils.js'\n\nconst Select = SelectPrimitive.Root\n\nfunction SelectGroup({ className, ...props }: SelectPrimitive.Group.Props) {\n return (\n <SelectPrimitive.Group\n data-slot='select-group'\n className={cn('scroll-my-1 p-1', className)}\n {...props}\n />\n )\n}\n\nfunction SelectValue({ className, ...props }: SelectPrimitive.Value.Props) {\n return (\n <SelectPrimitive.Value\n data-slot='select-value'\n className={cn('flex flex-1 text-start', className)}\n {...props}\n />\n )\n}\n\nfunction SelectTrigger({\n className,\n size = 'default',\n children,\n ...props\n}: SelectPrimitive.Trigger.Props & {\n size?: 'sm' | 'default'\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot='select-trigger'\n data-size={size}\n className={cn(\n \"flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-input/20 px-2 py-1.5 text-xs/relaxed whitespace-nowrap transition-colors outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-7 data-[size=sm]:h-6 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5\",\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon\n render={<IconExpandMore className='pointer-events-none size-3.5 text-muted-foreground' />}\n />\n </SelectPrimitive.Trigger>\n )\n}\n\nfunction SelectContent({\n className,\n children,\n side = 'bottom',\n sideOffset = 4,\n align = 'center',\n alignOffset = 0,\n alignItemWithTrigger = true,\n ...props\n}: SelectPrimitive.Popup.Props &\n Pick<\n SelectPrimitive.Positioner.Props,\n 'align' | 'alignOffset' | 'side' | 'sideOffset' | 'alignItemWithTrigger'\n >) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n alignItemWithTrigger={alignItemWithTrigger}\n className='isolate z-50'\n >\n <SelectPrimitive.Popup\n data-slot='select-content'\n data-align-trigger={alignItemWithTrigger}\n className={cn(\n 'relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',\n className,\n )}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.List>{children}</SelectPrimitive.List>\n <SelectScrollDownButton />\n </SelectPrimitive.Popup>\n </SelectPrimitive.Positioner>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({ className, ...props }: SelectPrimitive.GroupLabel.Props) {\n return (\n <SelectPrimitive.GroupLabel\n data-slot='select-label'\n className={cn('px-2 py-1.5 text-xs text-muted-foreground', className)}\n {...props}\n />\n )\n}\n\nfunction SelectItem({ className, children, ...props }: SelectPrimitive.Item.Props) {\n return (\n <SelectPrimitive.Item\n data-slot='select-item'\n className={cn(\n \"relative flex min-h-7 w-full cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className,\n )}\n {...props}\n >\n <SelectPrimitive.ItemText className='flex flex-1 shrink-0 gap-2 whitespace-nowrap'>\n {children}\n </SelectPrimitive.ItemText>\n <SelectPrimitive.ItemIndicator\n render={\n <span className='pointer-events-none absolute end-2 flex items-center justify-center' />\n }\n >\n <IconCheck className='pointer-events-none' />\n </SelectPrimitive.ItemIndicator>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({ className, ...props }: SelectPrimitive.Separator.Props) {\n return (\n <SelectPrimitive.Separator\n data-slot='select-separator'\n className={cn('pointer-events-none -mx-1 my-1 h-px bg-border/50', className)}\n {...props}\n />\n )\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>) {\n return (\n <SelectPrimitive.ScrollUpArrow\n data-slot='select-scroll-up-button'\n className={cn(\n \"top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5\",\n className,\n )}\n {...props}\n >\n <IconExpandLess />\n </SelectPrimitive.ScrollUpArrow>\n )\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>) {\n return (\n <SelectPrimitive.ScrollDownArrow\n data-slot='select-scroll-down-button'\n className={cn(\n \"bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5\",\n className,\n )}\n {...props}\n >\n <IconExpandMore />\n </SelectPrimitive.ScrollDownArrow>\n )\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n}\n"]}
1
+ {"version":3,"sources":["../../src/components/select.tsx"],"names":["SelectPrimitive"],"mappings":";;;;;;;AAUA,MAAM,SAASA,QAAA,CAAgB;AAE/B,SAAS,WAAA,CAAY,EAAE,SAAA,EAAW,GAAG,OAAM,EAAgC;AACzE,EAAA,uBACE,GAAA;AAAA,IAACA,QAAA,CAAgB,KAAA;AAAA,IAAhB;AAAA,MACC,WAAA,EAAU,cAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,iBAAA,EAAmB,SAAS,C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cesContent":["'use client'\n\nimport { Select as SelectPrimitive } from '@base-ui/react/select'\nimport * as React from 'react'\n\nimport { IconCheck } from '../icons/check.js'\nimport { IconExpandLess } from '../icons/expand-less.js'\nimport { IconExpandMore } from '../icons/expand-more.js'\nimport { cn } from '../lib/utils.js'\n\nconst Select = SelectPrimitive.Root\n\nfunction SelectGroup({ className, ...props }: SelectPrimitive.Group.Props) {\n return (\n <SelectPrimitive.Group\n data-slot='select-group'\n className={cn('scroll-my-1 p-1', className)}\n {...props}\n />\n )\n}\n\nfunction SelectValue({ className, ...props }: SelectPrimitive.Value.Props) {\n return (\n <SelectPrimitive.Value\n data-slot='select-value'\n className={cn('flex flex-1 text-start', className)}\n {...props}\n />\n )\n}\n\nfunction SelectTrigger({\n className,\n size = 'default',\n children,\n ...props\n}: SelectPrimitive.Trigger.Props & {\n size?: 'sm' | 'default'\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot='select-trigger'\n data-size={size}\n className={cn(\n \"flex w-fit items-center justify-between gap-1.5 rounded-sm border border-input bg-input/20 px-2 py-1.5 text-xs/relaxed whitespace-nowrap transition-colors outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-7 data-[size=sm]:h-6 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5\",\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon\n render={<IconExpandMore className='pointer-events-none size-3.5 text-muted-foreground' />}\n />\n </SelectPrimitive.Trigger>\n )\n}\n\nfunction SelectContent({\n className,\n children,\n side = 'bottom',\n sideOffset = 4,\n align = 'center',\n alignOffset = 0,\n alignItemWithTrigger = true,\n ...props\n}: SelectPrimitive.Popup.Props &\n Pick<\n SelectPrimitive.Positioner.Props,\n 'align' | 'alignOffset' | 'side' | 'sideOffset' | 'alignItemWithTrigger'\n >) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n alignItemWithTrigger={alignItemWithTrigger}\n className='isolate z-50'\n >\n <SelectPrimitive.Popup\n data-slot='select-content'\n data-align-trigger={alignItemWithTrigger}\n className={cn(\n 'relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',\n className,\n )}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.List>{children}</SelectPrimitive.List>\n <SelectScrollDownButton />\n </SelectPrimitive.Popup>\n </SelectPrimitive.Positioner>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({ className, ...props }: SelectPrimitive.GroupLabel.Props) {\n return (\n <SelectPrimitive.GroupLabel\n data-slot='select-label'\n className={cn('px-2 py-1.5 text-xs text-muted-foreground', className)}\n {...props}\n />\n )\n}\n\nfunction SelectItem({ className, children, ...props }: SelectPrimitive.Item.Props) {\n return (\n <SelectPrimitive.Item\n data-slot='select-item'\n className={cn(\n \"relative flex min-h-7 w-full cursor-default items-center gap-2 rounded-sm px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className,\n )}\n {...props}\n >\n <SelectPrimitive.ItemText className='flex flex-1 shrink-0 gap-2 whitespace-nowrap'>\n {children}\n </SelectPrimitive.ItemText>\n <SelectPrimitive.ItemIndicator\n render={\n <span className='pointer-events-none absolute end-2 flex items-center justify-center' />\n }\n >\n <IconCheck className='pointer-events-none' />\n </SelectPrimitive.ItemIndicator>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({ className, ...props }: SelectPrimitive.Separator.Props) {\n return (\n <SelectPrimitive.Separator\n data-slot='select-separator'\n className={cn('pointer-events-none -mx-1 my-1 h-px bg-border/50', className)}\n {...props}\n />\n )\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>) {\n return (\n <SelectPrimitive.ScrollUpArrow\n data-slot='select-scroll-up-button'\n className={cn(\n \"top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5\",\n className,\n )}\n {...props}\n >\n <IconExpandLess />\n </SelectPrimitive.ScrollUpArrow>\n )\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>) {\n return (\n <SelectPrimitive.ScrollDownArrow\n data-slot='select-scroll-down-button'\n className={cn(\n \"bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-3.5\",\n className,\n )}\n {...props}\n >\n <IconExpandMore />\n </SelectPrimitive.ScrollDownArrow>\n )\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n}\n"]}
@@ -103,7 +103,7 @@ function SiteSearch({
103
103
  className: cn(
104
104
  // Centred panel on the house popup surface (popover.tsx / sheet.tsx).
105
105
  "fixed top-[max(--spacing(4),15vh)] left-1/2 z-50 w-[calc(100vw-2rem)] max-w-2xl -translate-x-1/2",
106
- "rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden",
106
+ "rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden",
107
107
  "duration-150 ease-out motion-safe:transition",
108
108
  "data-ending-style:scale-95 data-ending-style:opacity-0 data-starting-style:scale-95 data-starting-style:opacity-0",
109
109
  className
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/site-search.tsx"],"names":[],"mappings":";;;;;;;;AA4HA,SAAS,UAAA,CAAW;AAAA,EAClB,MAAA;AAAA,EACA,QAAA;AAAA,EACA,IAAA,EAAM,QAAA;AAAA,EACN,YAAA;AAAA,EACA,WAAA,GAAc,KAAA;AAAA,EACd,QAAA,GAAW,IAAA;AAAA,EACX,KAAA,GAAQ,aAAA;AAAA,EACR,WAAA,GAAc,mCAAA;AAAA,EACd,YAAA,GAAe,mBAAA;AAAA,EACf,OAAA;AAAA,EACA,QAAA;AAAA,EACA;AACF,CAAA,EAAoB;AAClB,EAAA,MAAM,CAAC,gBAAA,EAAkB,mBAAmB,CAAA,GAAI,KAAA,CAAM,SAAS,WAAW,CAAA;AAC1E,EAAA,MAAM,eAAe,QAAA,KAAa,MAAA;AAClC,EAAA,MAAM,IAAA,GAAO,eAAe,QAAA,GAAW,gBAAA;AAEvC,EAAA,MAAM,QAAA,GAAW,KAAA,CAAM,MAAA,CAAyB,IAAI,CAAA;AAOpD,EAAA,MAAM,OAAA,GAAU,KAAA,CAAM,MAAA,CAAO,IAAI,CAAA;AACjC,EAAA,MAAM,oBAAA,GAAuB,KAAA,CAAM,MAAA,CAAgC,MAAM;AAAA,EAAC,CAAC,CAAA;AA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,EAEJ;AAAA;AAAA,yBAAA;AAAA,wBAxBK,KAAA,CAAM;AAAA;AAyBb;AAAA;AAEJ;AAAA;AAAA,aACF;AAAA,YAEC,YAAY,IAAA,mBACX,GAAA;AAAA,cAAC,KAAA;AAAA,cAAA;AAAA,gBACC,WAAA,EAAU,oBAAA;AAAA,gBACV,SAAA,EAAU,uEAAA;AAAA,gBAET;AAAA;AAAA,aACH,GACE;AAAA;AAAA;AAAA;AACN,KAAA,EACF;AAAA,GAAA,EACF,CAAA;AAEJ","file":"site-search.js","sourcesContent":["'use client'\n\nimport { Autocomplete } from '@base-ui/react/autocomplete'\nimport { Dialog } from '@base-ui/react/dialog'\nimport React from 'react'\n\nimport { IconSearch } from '../icons/search.js'\nimport { cn } from '../lib/utils.js'\n\nimport { Button } from '../components/button.js'\n\n/** A single searchable destination. `keywords` extend matching beyond the title. */\ntype SiteSearchItem = {\n title: string\n href: string\n keywords?: string[]\n}\n\n/** A titled section of results, rendered with a muted group heading. */\ntype SiteSearchGroup = {\n title: string\n items: SiteSearchItem[]\n}\n\ntype SiteSearchProps = {\n /** The searchable site map, as titled groups of items. */\n groups: SiteSearchGroup[]\n /**\n * Called with the chosen item on click or Enter, after the palette closes.\n * Navigation is the APP's job — call your router here (e.g. next/navigation's\n * `router.push(item.href)`). The design system ships no framework code, so it\n * never navigates itself; this mirrors the DS-wide framework-free rule\n * (see `Link` / `LinkProvider`).\n */\n onSelect: (item: SiteSearchItem) => void\n /** Whether the palette is open. Use when controlled. */\n open?: boolean\n /** Called whenever the palette asks to open or close. */\n onOpenChange?: (open: boolean) => void\n /** Whether the palette is initially open (uncontrolled). */\n defaultOpen?: boolean\n /**\n * Wire the global Cmd/Ctrl-K toggle on `document`, with cleanup on unmount.\n * Defaults to true. Only one shortcut-enabled SiteSearch should be mounted\n * per page, or each press toggles all of them.\n */\n shortcut?: boolean\n /**\n * Accessible name for the palette, applied as `aria-label` to the dialog\n * panel, the search input and the default trigger. Defaults to\n * `'Search site'`. Mirrors ExpandableSearch's `label` prop — localise it\n * rather than hardcoding English into consumers' pages.\n */\n label?: string\n /** Placeholder for the search input. */\n placeholder?: string\n /** Message shown when no items match the query. */\n emptyMessage?: string\n /**\n * The element that opens the palette. Defaults to a ghost icon `Button`\n * named by `label`. Pass an element to replace it — it is composed via Base\n * UI's `render` prop, so it inherits the trigger behaviour and ARIA — or\n * `null` to render no trigger at all (open via `open` or the shortcut).\n * A custom trigger owns its own accessible name — `label` is applied as\n * `aria-label` to the default icon button only, since overriding a visible\n * label that way fails WCAG 2.2, 2.5.3 Label in Name.\n *\n * Conditional triggers must resolve to `null`, not `false`: write\n * `cond ? <Button/> : null`, since `cond && <Button/>` yields `false`, which\n * Base UI's `render` prop rejects with an invalid-element error. TypeScript\n * catches it (`false` is not assignable here); plain-JS consumers see the\n * error at render.\n */\n trigger?: React.ReactElement | null\n /**\n * Extra content rendered at the foot of the panel, below the results —\n * e.g. shortcut hints or a \"browse all\" link.\n */\n children?: React.ReactNode\n /** Extra classes for the centred panel. */\n className?: string\n}\n\n/**\n * Cmd/Ctrl-K command-palette site search: a centred modal panel with a\n * filter-as-you-type input over a grouped list of destinations.\n *\n * Ported from nswds-app's `MobileSearch`, rebuilt framework-free: the app\n * version composed cmdk's `Command*` widgets with next/navigation's router;\n * this version composes Base UI's Autocomplete (the combobox/listbox pattern)\n * inside Base UI's Dialog, and hands the chosen item to `onSelect` instead of\n * navigating. The Autocomplete renders in `inline` mode — its input and list\n * sit statically inside the dialog panel with no popup of their own — which is\n * Base UI's documented composition for palettes (it avoids any portal /\n * focus-trap interplay between the two primitives; the always-`open` inline\n * root unmounts with the dialog, so the query and highlight reset on close).\n *\n * Accessibility contract (inherited, not hand-rolled):\n * - Dialog provides the modal behaviour: focus trap, scroll lock, Escape and\n * backdrop-press dismissal, and focus restoration to the trigger on close.\n * The panel is named via `aria-label` (WCAG 2.2, 4.1.2).\n * - Autocomplete provides the combobox pattern: the input is announced as a\n * combobox controlling a listbox, arrow keys move `aria-activedescendant`\n * highlight while DOM focus stays in the input, Enter activates the\n * highlighted item, and the empty state is announced politely.\n * - The trigger (default or custom) renders through `Dialog.Trigger`, so it\n * carries `aria-haspopup=\"dialog\"` / `aria-expanded` automatically.\n * - Result rows are at least 44px tall (2.5.8 Target Size, AAA-sized).\n * - Panel and backdrop transitions honour `prefers-reduced-motion` (2.3.3).\n *\n * Departures from the nswds-app source, beyond the rebuild above:\n * - `groups`/`onSelect` replace the app's `NavigationItem[]` + router: the\n * data shape is explicit (`title`/`href`/`keywords`) instead of the app's\n * nav config, and untitled/unlinked entries can't exist by construction\n * (the source filtered them at render time).\n * - Filtering matches `title` AND `keywords`, case-insensitively, via the\n * Autocomplete `filter` prop. Base UI's `useFilter` helper only matches one\n * string per item, so a custom predicate is the documented escape hatch for\n * multi-field matching; groups with no matching items are dropped by the\n * primitive, headings included.\n * - The Cmd/Ctrl-K listener can be disabled (`shortcut={false}`) — required\n * for pages that mount more than one instance. It still toggles, per the\n * source.\n */\nfunction SiteSearch({\n groups,\n onSelect,\n open: openProp,\n onOpenChange,\n defaultOpen = false,\n shortcut = true,\n label = 'Search site',\n placeholder = 'Type to search across the site...',\n emptyMessage = 'No results found.',\n trigger,\n children,\n className,\n}: SiteSearchProps) {\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen)\n const isControlled = openProp !== undefined\n const open = isControlled ? openProp : uncontrolledOpen\n\n const inputRef = React.useRef<HTMLInputElement>(null)\n\n // Latest-value refs so the document-level shortcut listener (bound once per\n // `shortcut` value) never acts on a stale open state or stale callbacks.\n // They are written in a passive effect (not during render, per\n // react-hooks/refs) — safe because they are only read from event listeners,\n // which always fire after the commit that synced them.\n const openRef = React.useRef(open)\n const requestOpenChangeRef = React.useRef<(next: boolean) => void>(() => {})\n\n const requestOpenChange = (next: boolean) => {\n if (isControlled) {\n // Dedupe against the render-authoritative prop only — never write\n // openRef optimistically here. An optimistic write would let a parent\n // that vetoes a request (ignores it, so no re-render runs the resync\n // effect) permanently swallow every later identical request. Accepted\n // trade-off: a same-tick duplicate close (Escape reaching both the\n // Autocomplete and the Dialog) may reach `onOpenChange` twice with the\n // same value — idempotent for a setState parent, and correctness in\n // the veto case beats dedupe cosmetics.\n if (open === next) {\n return\n }\n onOpenChange?.(next)\n return\n }\n // Uncontrolled, the component owns the state, so the optimistic write is\n // safe (the commit below confirms it) and dedupes the double-report case\n // (both primitives announcing the same close) down to one callback.\n if (openRef.current === next) {\n return\n }\n openRef.current = next\n setUncontrolledOpen(next)\n onOpenChange?.(next)\n }\n\n React.useEffect(() => {\n // `open` (not `next` from an event) is authoritative here: in controlled\n // mode this effect is the ref's ONLY writer, so the shortcut listener\n // always toggles from the last value the parent actually rendered.\n openRef.current = open\n requestOpenChangeRef.current = requestOpenChange\n })\n\n React.useEffect(() => {\n if (!shortcut) {\n return undefined\n }\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n event.key.toLowerCase() === 'k' &&\n (event.metaKey || event.ctrlKey) &&\n !event.altKey &&\n !event.defaultPrevented\n ) {\n event.preventDefault()\n // Toggle, per the nswds-app source: the same chord opens and closes.\n requestOpenChangeRef.current(!openRef.current)\n }\n }\n document.addEventListener('keydown', handleKeyDown)\n return () => document.removeEventListener('keydown', handleKeyDown)\n }, [shortcut])\n\n const handleSelect = (item: SiteSearchItem) => {\n // Close first, then hand over — mirrors the source's `runCommand`, so the\n // app's navigation starts from a closed palette.\n requestOpenChange(false)\n onSelect(item)\n }\n\n const filter = React.useCallback((item: SiteSearchItem, query: string) => {\n const q = query.trim().toLowerCase()\n if (q === '') {\n return true\n }\n if (item.title.toLowerCase().includes(q)) {\n return true\n }\n return (item.keywords ?? []).some((keyword) => keyword.toLowerCase().includes(q))\n }, [])\n\n const defaultTrigger = (\n <Button\n variant='ghost'\n color='grey'\n size='icon'\n aria-label={label}\n leadingVisual={IconSearch}\n />\n )\n\n return (\n <Dialog.Root open={open} onOpenChange={(next) => requestOpenChange(next)}>\n {trigger === null ? null : (\n <Dialog.Trigger data-slot='site-search-trigger' render={trigger ?? defaultTrigger} />\n )}\n\n <Dialog.Portal>\n <Dialog.Backdrop\n data-slot='site-search-overlay'\n className='fixed inset-0 z-50 bg-black/80 duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs motion-safe:transition-opacity'\n />\n <Dialog.Popup\n data-slot='site-search-panel'\n aria-label={label}\n // The default focus target on touch is the panel itself (to keep the\n // virtual keyboard closed) — wrong for a search palette, whose whole\n // purpose is typing. Always focus the input.\n initialFocus={inputRef}\n className={cn(\n // Centred panel on the house popup surface (popover.tsx / sheet.tsx).\n 'fixed top-[max(--spacing(4),15vh)] left-1/2 z-50 w-[calc(100vw-2rem)] max-w-2xl -translate-x-1/2',\n 'rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden',\n 'duration-150 ease-out motion-safe:transition',\n 'data-ending-style:scale-95 data-ending-style:opacity-0 data-starting-style:scale-95 data-starting-style:opacity-0',\n className,\n )}\n >\n <Autocomplete.Root\n items={groups}\n filter={filter}\n itemToStringValue={(item: SiteSearchItem) => item.title}\n autoHighlight\n // Inline mode: the list renders statically inside the dialog panel\n // (no Autocomplete portal/positioner), with `open` pinned per the\n // Base UI docs. Opening/closing belongs to the Dialog; the whole\n // Autocomplete unmounts with it, resetting query and highlight.\n inline\n open\n onOpenChange={(nextOpen, eventDetails) => {\n // The pinned-open inline Autocomplete still *requests* closes;\n // forward the ones that should dismiss the palette. Other\n // reasons (input-clear, focus-out) must not close the dialog —\n // clearing the query or tabbing within the trap isn't dismissal.\n if (\n !nextOpen &&\n (eventDetails.reason === 'escape-key' || eventDetails.reason === 'item-press')\n ) {\n requestOpenChange(false)\n }\n }}\n >\n <div\n data-slot='site-search-input-row'\n className='flex items-center gap-3 border-b border-foreground/10 px-4'\n >\n <IconSearch aria-hidden='true' className='size-5 shrink-0 text-muted-foreground' />\n <Autocomplete.Input\n data-slot='site-search-input'\n aria-label={label}\n placeholder={placeholder}\n className='h-12 w-full bg-transparent text-base text-foreground outline-hidden placeholder:text-muted-foreground'\n ref={inputRef}\n />\n </div>\n\n {/* Base UI renders Empty's children only while the list is empty;\n the padding lives on the inner div so the (always-mounted, for\n polite announcements) outer element paints nothing otherwise. */}\n <Autocomplete.Empty data-slot='site-search-empty'>\n <div className='px-4 py-6 text-center text-sm text-muted-foreground'>\n {emptyMessage}\n </div>\n </Autocomplete.Empty>\n\n <Autocomplete.List\n data-slot='site-search-list'\n className='max-h-[min(--spacing(96),60vh)] overflow-y-auto overscroll-contain p-2 empty:hidden'\n >\n {(group: SiteSearchGroup) => (\n <Autocomplete.Group\n key={group.title}\n items={group.items}\n data-slot='site-search-group'\n >\n <Autocomplete.GroupLabel\n data-slot='site-search-group-label'\n className='px-3 pt-3 pb-1 text-xs font-semibold text-muted-foreground'\n >\n {group.title}\n </Autocomplete.GroupLabel>\n <Autocomplete.Collection>\n {(item: SiteSearchItem) => (\n <Autocomplete.Item\n key={item.href}\n value={item}\n data-slot='site-search-item'\n onClick={() => handleSelect(item)}\n // Highlight treatment mirrors menubar.tsx: keyboard and\n // hover unify as data-highlighted, painted as 10% ink.\n className='flex min-h-11 cursor-default items-center gap-2 rounded-sm px-3 py-2 text-sm text-foreground outline-hidden select-none data-highlighted:bg-primary-800/10 data-highlighted:text-accent-foreground dark:data-highlighted:bg-primary-200/10'\n >\n {item.title}\n </Autocomplete.Item>\n )}\n </Autocomplete.Collection>\n </Autocomplete.Group>\n )}\n </Autocomplete.List>\n </Autocomplete.Root>\n\n {children != null ? (\n <div\n data-slot='site-search-footer'\n className='border-t border-foreground/10 px-4 py-2 text-xs text-muted-foreground'\n >\n {children}\n </div>\n ) : null}\n </Dialog.Popup>\n </Dialog.Portal>\n </Dialog.Root>\n )\n}\n\nexport { SiteSearch }\nexport type { SiteSearchGroup, SiteSearchItem, SiteSearchProps }\n"]}
1
+ {"version":3,"sources":["../../src/components/site-search.tsx"],"names":[],"mappings":";;;;;;;;AA4HA,SAAS,U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AAA;AAAA,sBAET,WAAC,KAAA,qBACA,IAAA;AAAA,wBAAC,YAAA,CAAa,KAAA;AAAA,wBAAb;AAAA,0BAEC,OAAO,KAAA,CAAM,KAAA;AAAA,0BACb,WAAA,EAAU,mBAAA;AAAA,0BAEV,QAAA,EAAA;AAAA,4CAAA,GAAA;AAAA,8BAAC,YAAA,CAAa,UAAA;AAAA,8BAAb;AAAA,gCACC,WAAA,EAAU,yBAAA;AAAA,gCACV,SAAA,EAAU,4DAAA;AAAA,gCAET,QAAA,EAAA,KAAA,CAAM;AAAA;AAAA,6BACT;AAAA,4CACA,GAAA,CAAC,YAAA,CAAa,UAAA,EAAb,EACE,WAAC,IAAA,qBACA,GAAA;AAAA,8BAAC,YAAA,CAAa,IAAA;AAAA,8BAAb;AAAA,gCAEC,KAAA,EAAO,IAAA;AAAA,gCACP,WAAA,EAAU,kBAAA;AAAA,gCACV,OAAA,EAAS,MAAM,YAAA,CAAa,IAAI,CAAA;AAAA,gCAGhC,SAAA,EAAU,4OAAA;AAAA,gCAET,QAAA,EAAA,IAAA,CAAK;AAAA,+BAAA;AAAA,8BARD,IAAA,CAAK;AAAA,6BASZ,EAEJ;AAAA;AAAA,yBAAA;AAAA,wBAxBK,KAAA,CAAM;AAAA;AAyBb;AAAA;AAEJ;AAAA;AAAA,aACF;AAAA,YAEC,YAAY,IAAA,mBACX,GAAA;AAAA,cAAC,KAAA;AAAA,cAAA;AAAA,gBACC,WAAA,EAAU,oBAAA;AAAA,gBACV,SAAA,EAAU,uEAAA;AAAA,gBAET;AAAA;AAAA,aACH,GACE;AAAA;AAAA;AAAA;AACN,KAAA,EACF;AAAA,GAAA,EACF,CAAA;AAEJ","file":"site-search.js","sourcesContent":["'use client'\n\nimport { Autocomplete } from '@base-ui/react/autocomplete'\nimport { Dialog } from '@base-ui/react/dialog'\nimport React from 'react'\n\nimport { IconSearch } from '../icons/search.js'\nimport { cn } from '../lib/utils.js'\n\nimport { Button } from '../components/button.js'\n\n/** A single searchable destination. `keywords` extend matching beyond the title. */\ntype SiteSearchItem = {\n title: string\n href: string\n keywords?: string[]\n}\n\n/** A titled section of results, rendered with a muted group heading. */\ntype SiteSearchGroup = {\n title: string\n items: SiteSearchItem[]\n}\n\ntype SiteSearchProps = {\n /** The searchable site map, as titled groups of items. */\n groups: SiteSearchGroup[]\n /**\n * Called with the chosen item on click or Enter, after the palette closes.\n * Navigation is the APP's job — call your router here (e.g. next/navigation's\n * `router.push(item.href)`). The design system ships no framework code, so it\n * never navigates itself; this mirrors the DS-wide framework-free rule\n * (see `Link` / `LinkProvider`).\n */\n onSelect: (item: SiteSearchItem) => void\n /** Whether the palette is open. Use when controlled. */\n open?: boolean\n /** Called whenever the palette asks to open or close. */\n onOpenChange?: (open: boolean) => void\n /** Whether the palette is initially open (uncontrolled). */\n defaultOpen?: boolean\n /**\n * Wire the global Cmd/Ctrl-K toggle on `document`, with cleanup on unmount.\n * Defaults to true. Only one shortcut-enabled SiteSearch should be mounted\n * per page, or each press toggles all of them.\n */\n shortcut?: boolean\n /**\n * Accessible name for the palette, applied as `aria-label` to the dialog\n * panel, the search input and the default trigger. Defaults to\n * `'Search site'`. Mirrors ExpandableSearch's `label` prop — localise it\n * rather than hardcoding English into consumers' pages.\n */\n label?: string\n /** Placeholder for the search input. */\n placeholder?: string\n /** Message shown when no items match the query. */\n emptyMessage?: string\n /**\n * The element that opens the palette. Defaults to a ghost icon `Button`\n * named by `label`. Pass an element to replace it — it is composed via Base\n * UI's `render` prop, so it inherits the trigger behaviour and ARIA — or\n * `null` to render no trigger at all (open via `open` or the shortcut).\n * A custom trigger owns its own accessible name — `label` is applied as\n * `aria-label` to the default icon button only, since overriding a visible\n * label that way fails WCAG 2.2, 2.5.3 Label in Name.\n *\n * Conditional triggers must resolve to `null`, not `false`: write\n * `cond ? <Button/> : null`, since `cond && <Button/>` yields `false`, which\n * Base UI's `render` prop rejects with an invalid-element error. TypeScript\n * catches it (`false` is not assignable here); plain-JS consumers see the\n * error at render.\n */\n trigger?: React.ReactElement | null\n /**\n * Extra content rendered at the foot of the panel, below the results —\n * e.g. shortcut hints or a \"browse all\" link.\n */\n children?: React.ReactNode\n /** Extra classes for the centred panel. */\n className?: string\n}\n\n/**\n * Cmd/Ctrl-K command-palette site search: a centred modal panel with a\n * filter-as-you-type input over a grouped list of destinations.\n *\n * Ported from nswds-app's `MobileSearch`, rebuilt framework-free: the app\n * version composed cmdk's `Command*` widgets with next/navigation's router;\n * this version composes Base UI's Autocomplete (the combobox/listbox pattern)\n * inside Base UI's Dialog, and hands the chosen item to `onSelect` instead of\n * navigating. The Autocomplete renders in `inline` mode — its input and list\n * sit statically inside the dialog panel with no popup of their own — which is\n * Base UI's documented composition for palettes (it avoids any portal /\n * focus-trap interplay between the two primitives; the always-`open` inline\n * root unmounts with the dialog, so the query and highlight reset on close).\n *\n * Accessibility contract (inherited, not hand-rolled):\n * - Dialog provides the modal behaviour: focus trap, scroll lock, Escape and\n * backdrop-press dismissal, and focus restoration to the trigger on close.\n * The panel is named via `aria-label` (WCAG 2.2, 4.1.2).\n * - Autocomplete provides the combobox pattern: the input is announced as a\n * combobox controlling a listbox, arrow keys move `aria-activedescendant`\n * highlight while DOM focus stays in the input, Enter activates the\n * highlighted item, and the empty state is announced politely.\n * - The trigger (default or custom) renders through `Dialog.Trigger`, so it\n * carries `aria-haspopup=\"dialog\"` / `aria-expanded` automatically.\n * - Result rows are at least 44px tall (2.5.8 Target Size, AAA-sized).\n * - Panel and backdrop transitions honour `prefers-reduced-motion` (2.3.3).\n *\n * Departures from the nswds-app source, beyond the rebuild above:\n * - `groups`/`onSelect` replace the app's `NavigationItem[]` + router: the\n * data shape is explicit (`title`/`href`/`keywords`) instead of the app's\n * nav config, and untitled/unlinked entries can't exist by construction\n * (the source filtered them at render time).\n * - Filtering matches `title` AND `keywords`, case-insensitively, via the\n * Autocomplete `filter` prop. Base UI's `useFilter` helper only matches one\n * string per item, so a custom predicate is the documented escape hatch for\n * multi-field matching; groups with no matching items are dropped by the\n * primitive, headings included.\n * - The Cmd/Ctrl-K listener can be disabled (`shortcut={false}`) — required\n * for pages that mount more than one instance. It still toggles, per the\n * source.\n */\nfunction SiteSearch({\n groups,\n onSelect,\n open: openProp,\n onOpenChange,\n defaultOpen = false,\n shortcut = true,\n label = 'Search site',\n placeholder = 'Type to search across the site...',\n emptyMessage = 'No results found.',\n trigger,\n children,\n className,\n}: SiteSearchProps) {\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen)\n const isControlled = openProp !== undefined\n const open = isControlled ? openProp : uncontrolledOpen\n\n const inputRef = React.useRef<HTMLInputElement>(null)\n\n // Latest-value refs so the document-level shortcut listener (bound once per\n // `shortcut` value) never acts on a stale open state or stale callbacks.\n // They are written in a passive effect (not during render, per\n // react-hooks/refs) — safe because they are only read from event listeners,\n // which always fire after the commit that synced them.\n const openRef = React.useRef(open)\n const requestOpenChangeRef = React.useRef<(next: boolean) => void>(() => {})\n\n const requestOpenChange = (next: boolean) => {\n if (isControlled) {\n // Dedupe against the render-authoritative prop only — never write\n // openRef optimistically here. An optimistic write would let a parent\n // that vetoes a request (ignores it, so no re-render runs the resync\n // effect) permanently swallow every later identical request. Accepted\n // trade-off: a same-tick duplicate close (Escape reaching both the\n // Autocomplete and the Dialog) may reach `onOpenChange` twice with the\n // same value — idempotent for a setState parent, and correctness in\n // the veto case beats dedupe cosmetics.\n if (open === next) {\n return\n }\n onOpenChange?.(next)\n return\n }\n // Uncontrolled, the component owns the state, so the optimistic write is\n // safe (the commit below confirms it) and dedupes the double-report case\n // (both primitives announcing the same close) down to one callback.\n if (openRef.current === next) {\n return\n }\n openRef.current = next\n setUncontrolledOpen(next)\n onOpenChange?.(next)\n }\n\n React.useEffect(() => {\n // `open` (not `next` from an event) is authoritative here: in controlled\n // mode this effect is the ref's ONLY writer, so the shortcut listener\n // always toggles from the last value the parent actually rendered.\n openRef.current = open\n requestOpenChangeRef.current = requestOpenChange\n })\n\n React.useEffect(() => {\n if (!shortcut) {\n return undefined\n }\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n event.key.toLowerCase() === 'k' &&\n (event.metaKey || event.ctrlKey) &&\n !event.altKey &&\n !event.defaultPrevented\n ) {\n event.preventDefault()\n // Toggle, per the nswds-app source: the same chord opens and closes.\n requestOpenChangeRef.current(!openRef.current)\n }\n }\n document.addEventListener('keydown', handleKeyDown)\n return () => document.removeEventListener('keydown', handleKeyDown)\n }, [shortcut])\n\n const handleSelect = (item: SiteSearchItem) => {\n // Close first, then hand over — mirrors the source's `runCommand`, so the\n // app's navigation starts from a closed palette.\n requestOpenChange(false)\n onSelect(item)\n }\n\n const filter = React.useCallback((item: SiteSearchItem, query: string) => {\n const q = query.trim().toLowerCase()\n if (q === '') {\n return true\n }\n if (item.title.toLowerCase().includes(q)) {\n return true\n }\n return (item.keywords ?? []).some((keyword) => keyword.toLowerCase().includes(q))\n }, [])\n\n const defaultTrigger = (\n <Button\n variant='ghost'\n color='grey'\n size='icon'\n aria-label={label}\n leadingVisual={IconSearch}\n />\n )\n\n return (\n <Dialog.Root open={open} onOpenChange={(next) => requestOpenChange(next)}>\n {trigger === null ? null : (\n <Dialog.Trigger data-slot='site-search-trigger' render={trigger ?? defaultTrigger} />\n )}\n\n <Dialog.Portal>\n <Dialog.Backdrop\n data-slot='site-search-overlay'\n className='fixed inset-0 z-50 bg-black/80 duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs motion-safe:transition-opacity'\n />\n <Dialog.Popup\n data-slot='site-search-panel'\n aria-label={label}\n // The default focus target on touch is the panel itself (to keep the\n // virtual keyboard closed) — wrong for a search palette, whose whole\n // purpose is typing. Always focus the input.\n initialFocus={inputRef}\n className={cn(\n // Centred panel on the house popup surface (popover.tsx / sheet.tsx).\n 'fixed top-[max(--spacing(4),15vh)] left-1/2 z-50 w-[calc(100vw-2rem)] max-w-2xl -translate-x-1/2',\n 'rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden',\n 'duration-150 ease-out motion-safe:transition',\n 'data-ending-style:scale-95 data-ending-style:opacity-0 data-starting-style:scale-95 data-starting-style:opacity-0',\n className,\n )}\n >\n <Autocomplete.Root\n items={groups}\n filter={filter}\n itemToStringValue={(item: SiteSearchItem) => item.title}\n autoHighlight\n // Inline mode: the list renders statically inside the dialog panel\n // (no Autocomplete portal/positioner), with `open` pinned per the\n // Base UI docs. Opening/closing belongs to the Dialog; the whole\n // Autocomplete unmounts with it, resetting query and highlight.\n inline\n open\n onOpenChange={(nextOpen, eventDetails) => {\n // The pinned-open inline Autocomplete still *requests* closes;\n // forward the ones that should dismiss the palette. Other\n // reasons (input-clear, focus-out) must not close the dialog —\n // clearing the query or tabbing within the trap isn't dismissal.\n if (\n !nextOpen &&\n (eventDetails.reason === 'escape-key' || eventDetails.reason === 'item-press')\n ) {\n requestOpenChange(false)\n }\n }}\n >\n <div\n data-slot='site-search-input-row'\n className='flex items-center gap-3 border-b border-foreground/10 px-4'\n >\n <IconSearch aria-hidden='true' className='size-5 shrink-0 text-muted-foreground' />\n <Autocomplete.Input\n data-slot='site-search-input'\n aria-label={label}\n placeholder={placeholder}\n className='h-12 w-full bg-transparent text-base text-foreground outline-hidden placeholder:text-muted-foreground'\n ref={inputRef}\n />\n </div>\n\n {/* Base UI renders Empty's children only while the list is empty;\n the padding lives on the inner div so the (always-mounted, for\n polite announcements) outer element paints nothing otherwise. */}\n <Autocomplete.Empty data-slot='site-search-empty'>\n <div className='px-4 py-6 text-center text-sm text-muted-foreground'>\n {emptyMessage}\n </div>\n </Autocomplete.Empty>\n\n <Autocomplete.List\n data-slot='site-search-list'\n className='max-h-[min(--spacing(96),60vh)] overflow-y-auto overscroll-contain p-2 empty:hidden'\n >\n {(group: SiteSearchGroup) => (\n <Autocomplete.Group\n key={group.title}\n items={group.items}\n data-slot='site-search-group'\n >\n <Autocomplete.GroupLabel\n data-slot='site-search-group-label'\n className='px-3 pt-3 pb-1 text-xs font-semibold text-muted-foreground'\n >\n {group.title}\n </Autocomplete.GroupLabel>\n <Autocomplete.Collection>\n {(item: SiteSearchItem) => (\n <Autocomplete.Item\n key={item.href}\n value={item}\n data-slot='site-search-item'\n onClick={() => handleSelect(item)}\n // Highlight treatment mirrors menubar.tsx: keyboard and\n // hover unify as data-highlighted, painted as 10% ink.\n className='flex min-h-11 cursor-default items-center gap-2 rounded-sm px-3 py-2 text-sm text-foreground outline-hidden select-none data-highlighted:bg-primary-800/10 data-highlighted:text-accent-foreground dark:data-highlighted:bg-primary-200/10'\n >\n {item.title}\n </Autocomplete.Item>\n )}\n </Autocomplete.Collection>\n </Autocomplete.Group>\n )}\n </Autocomplete.List>\n </Autocomplete.Root>\n\n {children != null ? (\n <div\n data-slot='site-search-footer'\n className='border-t border-foreground/10 px-4 py-2 text-xs text-muted-foreground'\n >\n {children}\n </div>\n ) : null}\n </Dialog.Popup>\n </Dialog.Portal>\n </Dialog.Root>\n )\n}\n\nexport { SiteSearch }\nexport type { SiteSearchGroup, SiteSearchItem, SiteSearchProps }\n"]}
@@ -3,7 +3,7 @@ import { VariantProps } from 'class-variance-authority';
3
3
  import React__default from 'react';
4
4
 
5
5
  declare const skipLinkVariants: (props?: ({
6
- color?: "white" | "grey" | "light" | "dark" | null | undefined;
6
+ color?: "light" | "white" | "grey" | "dark" | null | undefined;
7
7
  } & class_variance_authority_types.ClassProp) | undefined) => string;
8
8
  type SkipLinkProps = React__default.ComponentPropsWithoutRef<'a'> & VariantProps<typeof skipLinkVariants> & {
9
9
  /** Same-page fragment target, e.g. `"#content"`. */
@@ -27,7 +27,7 @@ function Slider({
27
27
  Slider$1.Track,
28
28
  {
29
29
  "data-slot": "slider-track",
30
- className: "relative grow overflow-hidden rounded-md bg-muted select-none data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1",
30
+ className: "relative grow overflow-hidden rounded-full bg-muted select-none data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1",
31
31
  children: /* @__PURE__ */ jsx(
32
32
  Slider$1.Indicator,
33
33
  {
@@ -41,7 +41,7 @@ function Slider({
41
41
  Slider$1.Thumb,
42
42
  {
43
43
  "data-slot": "slider-thumb",
44
- className: "relative block size-3 shrink-0 rounded-md border border-ring bg-white ring-ring/30 transition-[color,box-shadow] select-none after:absolute after:-inset-2 hover:ring-2 focus-visible:ring-2 focus-visible:outline-hidden active:ring-2 disabled:pointer-events-none disabled:opacity-50"
44
+ className: "relative block size-3 shrink-0 rounded-full border border-ring bg-white ring-ring/30 transition-[color,box-shadow] select-none after:absolute after:-inset-2 hover:ring-2 focus-visible:ring-2 focus-visible:outline-hidden active:ring-2 disabled:pointer-events-none disabled:opacity-50"
45
45
  },
46
46
  index
47
47
  ))
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/slider.tsx"],"names":["SliderPrimitive"],"mappings":";;;;AAIA,SAAS,MAAA,CAAO;AAAA,EACd,SAAA;AAAA,EACA,YAAA;AAAA,EACA,KAAA;AAAA,EACA,GAAA,GAAM,CAAA;AAAA,EACN,GAAA,GAAM,GAAA;AAAA,EACN,GAAG;AACL,CAAA,EAA+B;AAC7B,EAAA,MAAM,OAAA,GAAU,KAAA,CAAM,OAAA,CAAQ,KAAK,CAAA,GAC/B,KAAA,GACA,KAAA,CAAM,OAAA,CAAQ,YAAY,CAAA,GACxB,YAAA,GACA,CAAC,KAAK,GAAG,CAAA;AAEf,EAAA,uBACE,GAAA;AAAA,IAACA,QAAA,CAAgB,IAAA;AAAA,IAAhB;AAAA,MACC,SAAA,EAAW,EAAA,CAAG,6CAAA,EAA+C,SAAS,CAAA;AAAA,MACtE,WAAA,EAAU,QAAA;AAAA,MACV,YAAA;AAAA,MACA,KAAA;AAAA,MACA,GAAA;AAAA,MACA,GAAA;AAAA,MACA,cAAA,EAAe,MAAA;AAAA,MACd,GAAG,KAAA;AAAA,MAEJ,QAAA,kBAAA,IAAA,CAACA,QAAA,CAAgB,OAAA,EAAhB,EAAwB,WAAU,2KAAA,EACjC,QAAA,EAAA;AAAA,wBAAA,GAAA;AAAA,UAACA,QAAA,CAAgB,KAAA;AAAA,UAAhB;AAAA,YACC,WAAA,EAAU,cAAA;AAAA,YACV,SAAA,EAAU,iJAAA;AAAA,YAEV,QAAA,kBAAA,GAAA;AAAA,cAACA,QAAA,CAAgB,SAAA;AAAA,cAAhB;AAAA,gBACC,WAAA,EAAU,cAAA;AAAA,gBACV,SAAA,EAAU;AAAA;AAAA;AACZ;AAAA,SACF;AAAA,QACC,KAAA,CAAM,KAAK,EAAE,MAAA,EAAQ,QAAQ,MAAA,EAAO,EAAG,CAAC,CAAA,EAAG,KAAA,qBAC1C,GAAA;AAAA,UAACA,QAAA,CAAgB,KAAA;AAAA,UAAhB;AAAA,YACC,WAAA,EAAU,cAAA;AAAA,YAEV,SAAA,EAAU;AAAA,WAAA;AAAA,UADL;AAAA,SAGR;AAAA,OAAA,EACH;AAAA;AAAA,GACF;AAEJ","file":"slider.js","sourcesContent":["import { Slider as SliderPrimitive } from '@base-ui/react/slider'\n\nimport { cn } from '../lib/utils.js'\n\nfunction Slider({\n className,\n defaultValue,\n value,\n min = 0,\n max = 100,\n ...props\n}: SliderPrimitive.Root.Props) {\n const _values = Array.isArray(value)\n ? value\n : Array.isArray(defaultValue)\n ? defaultValue\n : [min, max]\n\n return (\n <SliderPrimitive.Root\n className={cn('data-horizontal:w-full data-vertical:h-full', className)}\n data-slot='slider'\n defaultValue={defaultValue}\n value={value}\n min={min}\n max={max}\n thumbAlignment='edge'\n {...props}\n >\n <SliderPrimitive.Control className='relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col'>\n <SliderPrimitive.Track\n data-slot='slider-track'\n className='relative grow overflow-hidden rounded-md bg-muted select-none data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1'\n >\n <SliderPrimitive.Indicator\n data-slot='slider-range'\n className='bg-primary select-none data-horizontal:h-full data-vertical:w-full'\n />\n </SliderPrimitive.Track>\n {Array.from({ length: _values.length }, (_, index) => (\n <SliderPrimitive.Thumb\n data-slot='slider-thumb'\n key={index}\n className='relative block size-3 shrink-0 rounded-md border border-ring bg-white ring-ring/30 transition-[color,box-shadow] select-none after:absolute after:-inset-2 hover:ring-2 focus-visible:ring-2 focus-visible:outline-hidden active:ring-2 disabled:pointer-events-none disabled:opacity-50'\n />\n ))}\n </SliderPrimitive.Control>\n </SliderPrimitive.Root>\n )\n}\n\nexport { Slider }\n"]}
1
+ {"version":3,"sources":["../../src/components/slider.tsx"],"names":["SliderPrimitive"],"mappings":";;;;AAIA,SAAS,MAAA,CAAO;AAAA,EACd,SAAA;AAAA,EACA,YAAA;AAAA,EACA,KAAA;AAAA,EACA,GAAA,GAAM,CAAA;AAAA,EACN,GAAA,GAAM,GAAA;AAAA,EACN,GAAG;AACL,CAAA,EAA+B;AAC7B,EAAA,MAAM,OAAA,GAAU,KAAA,CAAM,OAAA,CAAQ,KAAK,CAAA,GAC/B,KAAA,GACA,KAAA,CAAM,OAAA,CAAQ,YAAY,CAAA,GACxB,YAAA,GACA,CAAC,KAAK,GAAG,CAAA;AAEf,EAAA,uBACE,GAAA;AAAA,IAACA,QAAA,CAAgB,IAAA;AAAA,IAAhB;AAAA,MACC,SAAA,EAAW,EAAA,CAAG,6CAAA,EAA+C,SAAS,CAAA;AAAA,MACtE,WAAA,EAAU,QAAA;AAAA,MACV,YAAA;AAAA,MACA,KAAA;AAAA,MACA,GAAA;AAAA,MACA,GAAA;AAAA,MACA,cAAA,EAAe,MAAA;AAAA,MACd,GAAG,KAAA;AAAA,MAEJ,QAAA,kBAAA,IAAA,CAACA,QAAA,CAAgB,OAAA,EAAhB,EAAwB,WAAU,2KAAA,EACjC,QAAA,EAAA;AAAA,wBAAA,GAAA;AAAA,UAACA,QAAA,CAAgB,KAAA;AAAA,UAAhB;AAAA,YACC,WAAA,EAAU,cAAA;AAAA,YACV,SAAA,EAAU,mJAAA;AAAA,YAEV,QAAA,kBAAA,GAAA;AAAA,cAACA,QAAA,CAAgB,SAAA;AAAA,cAAhB;AAAA,gBACC,WAAA,EAAU,cAAA;AAAA,gBACV,SAAA,EAAU;AAAA;AAAA;AACZ;AAAA,SACF;AAAA,QACC,KAAA,CAAM,KAAK,EAAE,MAAA,EAAQ,QAAQ,MAAA,EAAO,EAAG,CAAC,CAAA,EAAG,KAAA,qBAC1C,GAAA;AAAA,UAACA,QAAA,CAAgB,KAAA;AAAA,UAAhB;AAAA,YACC,WAAA,EAAU,cAAA;AAAA,YAEV,SAAA,EAAU;AAAA,WAAA;AAAA,UADL;AAAA,SAGR;AAAA,OAAA,EACH;AAAA;AAAA,GACF;AAEJ","file":"slider.js","sourcesContent":["import { Slider as SliderPrimitive } from '@base-ui/react/slider'\n\nimport { cn } from '../lib/utils.js'\n\nfunction Slider({\n className,\n defaultValue,\n value,\n min = 0,\n max = 100,\n ...props\n}: SliderPrimitive.Root.Props) {\n const _values = Array.isArray(value)\n ? value\n : Array.isArray(defaultValue)\n ? defaultValue\n : [min, max]\n\n return (\n <SliderPrimitive.Root\n className={cn('data-horizontal:w-full data-vertical:h-full', className)}\n data-slot='slider'\n defaultValue={defaultValue}\n value={value}\n min={min}\n max={max}\n thumbAlignment='edge'\n {...props}\n >\n <SliderPrimitive.Control className='relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col'>\n <SliderPrimitive.Track\n data-slot='slider-track'\n className='relative grow overflow-hidden rounded-full bg-muted select-none data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1'\n >\n <SliderPrimitive.Indicator\n data-slot='slider-range'\n className='bg-primary select-none data-horizontal:h-full data-vertical:w-full'\n />\n </SliderPrimitive.Track>\n {Array.from({ length: _values.length }, (_, index) => (\n <SliderPrimitive.Thumb\n data-slot='slider-thumb'\n key={index}\n className='relative block size-3 shrink-0 rounded-full border border-ring bg-white ring-ring/30 transition-[color,box-shadow] select-none after:absolute after:-inset-2 hover:ring-2 focus-visible:ring-2 focus-visible:outline-hidden active:ring-2 disabled:pointer-events-none disabled:opacity-50'\n />\n ))}\n </SliderPrimitive.Control>\n </SliderPrimitive.Root>\n )\n}\n\nexport { Slider }\n"]}
@@ -16,7 +16,7 @@ function Tabs({ className, orientation = "horizontal", ...props }) {
16
16
  );
17
17
  }
18
18
  const tabsListVariants = cva(
19
- "group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",
19
+ "group/tabs-list inline-flex w-fit items-center justify-center rounded-md p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",
20
20
  {
21
21
  variants: {
22
22
  variant: {
@@ -50,7 +50,7 @@ function TabsTrigger({ className, ...props }) {
50
50
  {
51
51
  "data-slot": "tabs-trigger",
52
52
  className: cn(
53
- "relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-xs font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start group-data-vertical/tabs:py-[calc(--spacing(1.25))] hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pe-1 has-data-[icon=inline-start]:ps-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",
53
+ "relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-sm border border-transparent px-1.5 py-0.5 text-xs font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start group-data-vertical/tabs:py-[calc(--spacing(1.25))] hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pe-1 has-data-[icon=inline-start]:ps-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",
54
54
  "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent",
55
55
  "data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground",
56
56
  "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-end-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/tabs.tsx"],"names":["TabsPrimitive"],"mappings":";;;;;AAOA,SAAS,KAAK,EAAE,SAAA,EAAW,cAAc,YAAA,EAAc,GAAG,OAAM,EAA6B;AAC3F,EAAA,uBACE,GAAA;AAAA,IAACA,MAAA,CAAc,IAAA;AAAA,IAAd;AAAA,MACC,WAAA,EAAU,MAAA;AAAA,MACV,kBAAA,EAAkB,WAAA;AAAA,MAClB,SAAA,EAAW,EAAA,CAAG,gDAAA,EAAkD,SAAS,CAAA;AAAA,MACxE,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,MAAM,gBAAA,GAAmB,GAAA;AAAA,EACvB,yOAAA;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA,QACP,OAAA,EAAS,UAAA;AAAA,QACT,IAAA,EAAM;AAAA;AACR,KACF;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,OAAA,EAAS;AAAA;AACX;AAEJ;AAEA,SAAS,QAAA,CAAS;AAAA,EAChB,SAAA;AAAA,EACA,OAAA,GAAU,SAAA;AAAA,EACV,GAAG;AACL,CAAA,EAAqE;AACnE,EAAA,uBACE,GAAA;AAAA,IAACA,MAAA,CAAc,IAAA;AAAA,IAAd;AAAA,MACC,WAAA,EAAU,WAAA;AAAA,MACV,cAAA,EAAc,OAAA;AAAA,MACd,WAAW,EAAA,CAAG,gBAAA,CAAiB,EAAE,OAAA,EAAS,GAAG,SAAS,CAAA;AAAA,MACrD,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,WAAA,CAAY,EAAE,SAAA,EAAW,GAAG,OAAM,EAA4B;AACrE,EAAA,uBACE,GAAA;AAAA,IAACA,MAAA,CAAc,GAAA;AAAA,IAAd;AAAA,MACC,WAAA,EAAU,cAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,yxBAAA;AAAA,QACA,+PAAA;AAAA,QACA,mJAAA;AAAA,QACA,oYAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,WAAA,CAAY,EAAE,SAAA,EAAW,GAAG,OAAM,EAA8B;AACvE,EAAA,uBACE,GAAA;AAAA,IAACA,MAAA,CAAc,KAAA;AAAA,IAAd;AAAA,MACC,WAAA,EAAU,cAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,qCAAA,EAAuC,SAAS,CAAA;AAAA,MAC7D,GAAG;AAAA;AAAA,GACN;AAEJ","file":"tabs.js","sourcesContent":["'use client'\n\nimport { Tabs as TabsPrimitive } from '@base-ui/react/tabs'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '../lib/utils.js'\n\nfunction Tabs({ className, orientation = 'horizontal', ...props }: TabsPrimitive.Root.Props) {\n return (\n <TabsPrimitive.Root\n data-slot='tabs'\n data-orientation={orientation}\n className={cn('group/tabs flex gap-2 data-horizontal:flex-col', className)}\n {...props}\n />\n )\n}\n\nconst tabsListVariants = cva(\n 'group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none',\n {\n variants: {\n variant: {\n default: 'bg-muted',\n line: 'gap-1 bg-transparent',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n)\n\nfunction TabsList({\n className,\n variant = 'default',\n ...props\n}: TabsPrimitive.List.Props & VariantProps<typeof tabsListVariants>) {\n return (\n <TabsPrimitive.List\n data-slot='tabs-list'\n data-variant={variant}\n className={cn(tabsListVariants({ variant }), className)}\n {...props}\n />\n )\n}\n\nfunction TabsTrigger({ className, ...props }: TabsPrimitive.Tab.Props) {\n return (\n <TabsPrimitive.Tab\n data-slot='tabs-trigger'\n className={cn(\n \"relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-xs font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start group-data-vertical/tabs:py-[calc(--spacing(1.25))] hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pe-1 has-data-[icon=inline-start]:ps-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5\",\n 'group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent',\n 'data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground',\n 'after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-end-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction TabsContent({ className, ...props }: TabsPrimitive.Panel.Props) {\n return (\n <TabsPrimitive.Panel\n data-slot='tabs-content'\n className={cn('flex-1 text-xs/relaxed outline-none', className)}\n {...props}\n />\n )\n}\n\nexport { Tabs, TabsContent, TabsList, tabsListVariants, TabsTrigger }\n"]}
1
+ {"version":3,"sources":["../../src/components/tabs.tsx"],"names":["TabsPrimitive"],"mappings":";;;;;AAOA,SAAS,KAAK,EAAE,SAAA,EAAW,cAAc,YAAA,EAAc,GAAG,OAAM,EAA6B;AAC3F,EAAA,uBACE,GAAA;AAAA,IAACA,MAAA,CAAc,IAAA;AAAA,IAAd;AAAA,MACC,WAAA,EAAU,MAAA;AAAA,MACV,kBAAA,EAAkB,WAAA;AAAA,MAClB,SAAA,EAAW,EAAA,CAAG,gDAAA,EAAkD,SAAS,CAAA;AAAA,MACxE,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,MAAM,gBAAA,GAAmB,GAAA;AAAA,EACvB,yOAAA;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA,QACP,OAAA,EAAS,UAAA;AAAA,QACT,IAAA,EAAM;AAAA;AACR,KACF;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,OAAA,EAAS;AAAA;AACX;AAEJ;AAEA,SAAS,QAAA,CAAS;AAAA,EAChB,SAAA;AAAA,EACA,OAAA,GAAU,SAAA;AAAA,EACV,GAAG;AACL,CAAA,EAAqE;AACnE,EAAA,uBACE,GAAA;AAAA,IAACA,MAAA,CAAc,IAAA;AAAA,IAAd;AAAA,MACC,WAAA,EAAU,WAAA;AAAA,MACV,cAAA,EAAc,OAAA;AAAA,MACd,WAAW,EAAA,CAAG,gBAAA,CAAiB,EAAE,OAAA,EAAS,GAAG,SAAS,CAAA;AAAA,MACrD,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,WAAA,CAAY,EAAE,SAAA,EAAW,GAAG,OAAM,EAA4B;AACrE,EAAA,uBACE,GAAA;AAAA,IAACA,MAAA,CAAc,GAAA;AAAA,IAAd;AAAA,MACC,WAAA,EAAU,cAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,yxBAAA;AAAA,QACA,+PAAA;AAAA,QACA,mJAAA;AAAA,QACA,oYAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,WAAA,CAAY,EAAE,SAAA,EAAW,GAAG,OAAM,EAA8B;AACvE,EAAA,uBACE,GAAA;AAAA,IAACA,MAAA,CAAc,KAAA;AAAA,IAAd;AAAA,MACC,WAAA,EAAU,cAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,qCAAA,EAAuC,SAAS,CAAA;AAAA,MAC7D,GAAG;AAAA;AAAA,GACN;AAEJ","file":"tabs.js","sourcesContent":["'use client'\n\nimport { Tabs as TabsPrimitive } from '@base-ui/react/tabs'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { cn } from '../lib/utils.js'\n\nfunction Tabs({ className, orientation = 'horizontal', ...props }: TabsPrimitive.Root.Props) {\n return (\n <TabsPrimitive.Root\n data-slot='tabs'\n data-orientation={orientation}\n className={cn('group/tabs flex gap-2 data-horizontal:flex-col', className)}\n {...props}\n />\n )\n}\n\nconst tabsListVariants = cva(\n 'group/tabs-list inline-flex w-fit items-center justify-center rounded-md p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none',\n {\n variants: {\n variant: {\n default: 'bg-muted',\n line: 'gap-1 bg-transparent',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n)\n\nfunction TabsList({\n className,\n variant = 'default',\n ...props\n}: TabsPrimitive.List.Props & VariantProps<typeof tabsListVariants>) {\n return (\n <TabsPrimitive.List\n data-slot='tabs-list'\n data-variant={variant}\n className={cn(tabsListVariants({ variant }), className)}\n {...props}\n />\n )\n}\n\nfunction TabsTrigger({ className, ...props }: TabsPrimitive.Tab.Props) {\n return (\n <TabsPrimitive.Tab\n data-slot='tabs-trigger'\n className={cn(\n \"relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-sm border border-transparent px-1.5 py-0.5 text-xs font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start group-data-vertical/tabs:py-[calc(--spacing(1.25))] hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pe-1 has-data-[icon=inline-start]:ps-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5\",\n 'group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent',\n 'data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground',\n 'after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-end-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100',\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction TabsContent({ className, ...props }: TabsPrimitive.Panel.Props) {\n return (\n <TabsPrimitive.Panel\n data-slot='tabs-content'\n className={cn('flex-1 text-xs/relaxed outline-none', className)}\n {...props}\n />\n )\n}\n\nexport { Tabs, TabsContent, TabsList, tabsListVariants, TabsTrigger }\n"]}
@@ -7,7 +7,7 @@ function Textarea({ className, ...props }) {
7
7
  {
8
8
  "data-slot": "textarea",
9
9
  className: cn(
10
- "flex field-sizing-content min-h-16 w-full resize-none rounded-md border border-input bg-input/20 px-2 py-2 transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 max-md:text-sm md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
10
+ "flex field-sizing-content min-h-16 w-full resize-none rounded-sm border border-input bg-input/20 px-2 py-2 transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 max-md:text-sm md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
11
11
  className
12
12
  ),
13
13
  ...props
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/textarea.tsx"],"names":[],"mappings":";;;AAIA,SAAS,QAAA,CAAS,EAAE,SAAA,EAAW,GAAG,OAAM,EAAqC;AAC3E,EAAA,uBACE,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,UAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,6fAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ","file":"textarea.js","sourcesContent":["import * as React from 'react'\n\nimport { cn } from '../lib/utils.js'\n\nfunction Textarea({ className, ...props }: React.ComponentProps<'textarea'>) {\n return (\n <textarea\n data-slot='textarea'\n className={cn(\n 'flex field-sizing-content min-h-16 w-full resize-none rounded-md border border-input bg-input/20 px-2 py-2 transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 max-md:text-sm md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40',\n className,\n )}\n {...props}\n />\n )\n}\n\nexport { Textarea }\n"]}
1
+ {"version":3,"sources":["../../src/components/textarea.tsx"],"names":[],"mappings":";;;AAIA,SAAS,QAAA,CAAS,EAAE,SAAA,EAAW,GAAG,OAAM,EAAqC;AAC3E,EAAA,uBACE,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,UAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,6fAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ","file":"textarea.js","sourcesContent":["import * as React from 'react'\n\nimport { cn } from '../lib/utils.js'\n\nfunction Textarea({ className, ...props }: React.ComponentProps<'textarea'>) {\n return (\n <textarea\n data-slot='textarea'\n className={cn(\n 'flex field-sizing-content min-h-16 w-full resize-none rounded-sm border border-input bg-input/20 px-2 py-2 transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 max-md:text-sm md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40',\n className,\n )}\n {...props}\n />\n )\n}\n\nexport { Textarea }\n"]}
@@ -31,7 +31,7 @@ function ToggleGroup({
31
31
  "data-orientation": orientation,
32
32
  style: { "--gap": spacing },
33
33
  className: cn(
34
- "group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-md data-[size=sm]:rounded-[min(var(--radius-md),8px)] data-vertical:flex-col data-vertical:items-stretch",
34
+ "group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-sm data-[size=sm]:rounded-sm data-vertical:flex-col data-vertical:items-stretch",
35
35
  className
36
36
  ),
37
37
  ...props,
@@ -55,7 +55,7 @@ function ToggleGroupItem({
55
55
  "data-size": context.size || size,
56
56
  "data-spacing": context.spacing,
57
57
  className: cn(
58
- "shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pe-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:ps-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-s-md group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-md group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-e-md group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-md group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-s-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-s group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",
58
+ "shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pe-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:ps-1.5 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-s-sm group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-sm group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-e-sm group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-sm group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-s-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-s group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",
59
59
  toggleVariants({
60
60
  variant: context.variant || variant,
61
61
  size: context.size || size