@talogic/react 0.0.0-stage → 0.6.1

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 (130) hide show
  1. package/README.md +106 -2
  2. package/app/app-shell.component.d.ts +59 -0
  3. package/app/command-shortcut.hook.d.ts +21 -0
  4. package/app/filter-bar.component.d.ts +38 -0
  5. package/app/form-section.component.d.ts +21 -0
  6. package/app/index.d.ts +14 -0
  7. package/app/page-header.component.d.ts +20 -0
  8. package/app/records-table.component.d.ts +38 -0
  9. package/app/sparkline.algorithm.d.ts +11 -0
  10. package/app/stat-card.component.d.ts +28 -0
  11. package/class-names/class-names.algorithm.d.ts +8 -0
  12. package/class-names/index.d.ts +1 -0
  13. package/desktop/flow-node.component.d.ts +25 -0
  14. package/desktop/index.d.ts +12 -0
  15. package/desktop/inspector.component.d.ts +29 -0
  16. package/desktop/status-bar.component.d.ts +17 -0
  17. package/desktop/timeline-lanes.component.d.ts +43 -0
  18. package/desktop/timeline.algorithm.d.ts +22 -0
  19. package/desktop/title-bar.component.d.ts +24 -0
  20. package/fonts.css +4 -0
  21. package/index.d.ts +17 -0
  22. package/index.js +3495 -0
  23. package/index.js.map +1 -0
  24. package/mobile/bottom-nav.component.d.ts +23 -0
  25. package/mobile/capture-frame.component.d.ts +30 -0
  26. package/mobile/index.d.ts +6 -0
  27. package/mobile/record-button.component.d.ts +24 -0
  28. package/package.json +63 -4
  29. package/product/index.d.ts +8 -0
  30. package/product/product-catalogue.content.d.ts +16 -0
  31. package/product/product-logo.component.d.ts +17 -0
  32. package/product/product-switcher.component.d.ts +21 -0
  33. package/product/sidebar-brand.component.d.ts +18 -0
  34. package/status/index.d.ts +6 -0
  35. package/status/run-status.contract.d.ts +7 -0
  36. package/status/run-status.mapper.d.ts +18 -0
  37. package/status/status-badge.component.d.ts +14 -0
  38. package/talogic-react.css +2 -0
  39. package/timecode/index.d.ts +1 -0
  40. package/timecode/timecode.mapper.d.ts +17 -0
  41. package/tokens/apca-contrast.algorithm.d.ts +23 -0
  42. package/tokens/hue-fill.style.d.ts +6 -0
  43. package/tokens/index.d.ts +12 -0
  44. package/tokens/logo-color.algorithm.d.ts +21 -0
  45. package/tokens/palette.style.d.ts +6 -0
  46. package/tokens/product-hue.policy.d.ts +15 -0
  47. package/tokens/theme-attributes.mapper.d.ts +18 -0
  48. package/tokens/theme-root.component.d.ts +15 -0
  49. package/tokens/theme.contract.d.ts +34 -0
  50. package/tokens.css +949 -0
  51. package/ui/active-indicator/active-indicator.hook.d.ts +11 -0
  52. package/ui/active-indicator/active-indicator.recipe.d.ts +5 -0
  53. package/ui/active-indicator/index.d.ts +2 -0
  54. package/ui/avatar/avatar.component.d.ts +23 -0
  55. package/ui/avatar/index.d.ts +1 -0
  56. package/ui/badge/badge.component.d.ts +14 -0
  57. package/ui/badge/badge.recipe.d.ts +12 -0
  58. package/ui/badge/index.d.ts +4 -0
  59. package/ui/button/button.component.d.ts +16 -0
  60. package/ui/button/button.recipe.d.ts +11 -0
  61. package/ui/button/index.d.ts +4 -0
  62. package/ui/choice/checkbox.component.d.ts +11 -0
  63. package/ui/choice/index.d.ts +5 -0
  64. package/ui/choice/radio-group.component.d.ts +17 -0
  65. package/ui/choice/slider.component.d.ts +10 -0
  66. package/ui/choice/switch.component.d.ts +9 -0
  67. package/ui/choice/toggle-group.component.d.ts +17 -0
  68. package/ui/feedback/alert.component.d.ts +41 -0
  69. package/ui/feedback/empty-state.component.d.ts +19 -0
  70. package/ui/feedback/index.d.ts +8 -0
  71. package/ui/feedback/progress.component.d.ts +9 -0
  72. package/ui/feedback/skeleton.component.d.ts +8 -0
  73. package/ui/feedback/spinner.component.d.ts +10 -0
  74. package/ui/feedback/toaster.component.d.ts +10 -0
  75. package/ui/field/control.recipe.d.ts +5 -0
  76. package/ui/field/field-control.hook.d.ts +26 -0
  77. package/ui/field/field.component.d.ts +22 -0
  78. package/ui/field/index.d.ts +10 -0
  79. package/ui/field/input.component.d.ts +13 -0
  80. package/ui/field/label.component.d.ts +9 -0
  81. package/ui/field/select.component.d.ts +43 -0
  82. package/ui/field/textarea.component.d.ts +8 -0
  83. package/ui/index.d.ts +11 -0
  84. package/ui/layout/accordion.component.d.ts +30 -0
  85. package/ui/layout/card.component.d.ts +43 -0
  86. package/ui/layout/index.d.ts +7 -0
  87. package/ui/layout/kbd.component.d.ts +8 -0
  88. package/ui/layout/resizable.component.d.ts +23 -0
  89. package/ui/layout/scroll-area.component.d.ts +16 -0
  90. package/ui/layout/separator.component.d.ts +9 -0
  91. package/ui/layout/table.component.d.ts +50 -0
  92. package/ui/menu/command.component.d.ts +72 -0
  93. package/ui/menu/context-menu.component.d.ts +39 -0
  94. package/ui/menu/dropdown-menu.component.d.ts +57 -0
  95. package/ui/menu/index.d.ts +6 -0
  96. package/ui/menu/menu.recipe.d.ts +13 -0
  97. package/ui/navigation/breadcrumb.component.d.ts +45 -0
  98. package/ui/navigation/index.d.ts +11 -0
  99. package/ui/navigation/menu-icon.component.d.ts +18 -0
  100. package/ui/navigation/menubar.component.d.ts +48 -0
  101. package/ui/navigation/navigation-menu.component.d.ts +39 -0
  102. package/ui/navigation/pagination.component.d.ts +20 -0
  103. package/ui/navigation/stepper.component.d.ts +28 -0
  104. package/ui/navigation/tabs.component.d.ts +39 -0
  105. package/ui/overlay/alert-dialog.component.d.ts +42 -0
  106. package/ui/overlay/dialog.component.d.ts +48 -0
  107. package/ui/overlay/drawer.component.d.ts +29 -0
  108. package/ui/overlay/index.d.ts +9 -0
  109. package/ui/overlay/overlay.recipe.d.ts +18 -0
  110. package/ui/overlay/popover.component.d.ts +15 -0
  111. package/ui/overlay/sheet.component.d.ts +31 -0
  112. package/ui/overlay/tooltip.component.d.ts +20 -0
  113. package/ui/sidebar/index.d.ts +11 -0
  114. package/ui/sidebar/sidebar-context.hook.d.ts +29 -0
  115. package/ui/sidebar/sidebar-group.component.d.ts +26 -0
  116. package/ui/sidebar/sidebar-item.component.d.ts +35 -0
  117. package/ui/sidebar/sidebar-sheet.component.d.ts +25 -0
  118. package/ui/sidebar/sidebar.component.d.ts +80 -0
  119. package/ui/sidebar/sidebar.recipe.d.ts +8 -0
  120. package/web/cta-band.component.d.ts +20 -0
  121. package/web/faq.component.d.ts +19 -0
  122. package/web/feature-grid.component.d.ts +22 -0
  123. package/web/hero.component.d.ts +20 -0
  124. package/web/how-it-works.component.d.ts +22 -0
  125. package/web/index.d.ts +20 -0
  126. package/web/mobile-menu.component.d.ts +25 -0
  127. package/web/pricing-table.component.d.ts +37 -0
  128. package/web/product-card.component.d.ts +20 -0
  129. package/web/site-footer.component.d.ts +25 -0
  130. package/web/site-header.component.d.ts +32 -0
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["talogic","pargic","daygic","ingic","loregic","loregicDark","loomgic","loomgicDark","_jsx","_jsxs","_Fragment","_jsx","_jsx","AvatarPrimitive","_jsxs","_jsx","_jsx","_jsxs","_Fragment","_jsx","CheckboxPrimitive","_jsxs","_jsx","RadioGroupPrimitive","_jsxs","SliderPrimitive","_jsx","_jsx","SwitchPrimitive","_jsxs","ToggleGroupPrimitive","_jsx","_jsxs","_jsx","_jsxs","_jsx","_jsx","ProgressPrimitive","_jsx","_jsx","_jsx","Sonner","_jsx","LabelPrimitive","_jsx","_jsxs","_jsx","_jsxs","SelectPrimitive","_jsxs","_jsx","_jsx","_jsx","AccordionPrimitive","_jsxs","_jsx","_jsx","_jsx","Separator","_jsxs","ScrollAreaPrimitive","_jsx","_jsx","SeparatorPrimitive","_jsx","AlertDialogPrimitive","_jsxs","_jsx","DialogPrimitive","_jsxs","_jsx","DrawerPrimitive","_jsxs","_jsx","PopoverPrimitive","_jsx","SheetPrimitive","_jsxs","_jsx","TooltipPrimitive","_jsx","_jsx","CommandPrimitive","DialogPrimitive","_jsxs","ContextMenuPrimitive","_jsx","DropdownMenuPrimitive","_jsx","_jsxs","_jsx","_jsxs","_jsx","_jsx","MenubarPrimitive","_jsxs","NavigationMenuPrimitive","_jsx","_jsxs","_jsx","_jsx","TabsPrimitive","_jsxs","_jsx","_jsxs","_jsx","_jsxs","_jsxs","_jsx","_jsxs","_Fragment","_jsx","_jsxs","_jsx","_jsxs","_jsx","_jsxs","_jsx","agent","_jsx","_jsxs","_Fragment","_jsxs","_jsx","_jsxs","_jsx","_jsxs","_jsx","_jsxs","_jsx","_jsxs","_jsx","_jsx","_jsxs","_jsx","_jsxs","_jsx","_jsxs","_jsx","_jsxs","_jsx","_jsx","_jsxs","_jsx","_jsxs","_jsxs","_jsx","_jsx","_jsxs","_jsx","_jsxs","_jsx","_jsxs","_jsx","_jsxs","_jsx","_jsxs","_jsx","_jsxs","_jsxs","DialogPrimitive","_jsx","_jsx","_jsxs","_jsxs","_jsx","_jsxs","_jsx","_jsxs","_jsx","_Fragment","clsx","twMerge","Fragment","jsx","jsxs","Accordion$1","AlertDialog$1","Avatar$1","Checkbox$1","Collapsible","ContextMenu$1","Dialog$1","DropdownMenu$1","Label$1","Menubar$1","NavigationMenu$1","Popover$1","Progress$1","RadioGroup$1","ScrollArea$1","Select$1","Separator$1","Slider$1","Slot","Switch$1","Tabs$1","ToggleGroup$1","Tooltip$1","cva","Bookmark","Check","ChevronDown","ChevronRight","ChevronsLeft","ChevronsRight","ChevronsUpDown","CircleCheck","Ellipsis","Info","LoaderCircle","Mic","Minus","PanelLeft","Pause","Play","Plus","Search","Square","TriangleAlert","X","cloneElement","createContext","isValidElement","useCallback","useContext","useEffect","useId","useRef","useState","useSyncExternalStore","Toaster$1","Group","Panel","Separator$2","Drawer$1","Command$1","cn","inputs","PRODUCT_CATALOGUE","LOGOS","ProductLogo","product","alt","className","props","light","dark","classes","APCA","LABEL_COLORS","hexChannels","hex","clean","full","digit","start","screenLuminance","red","green","blue","channel","y","apcaContrast","text","background","textY","backgroundY","sapc","readableLabel","candidates","best","bestLc","candidate","lc","HUE_FILL","FAMILY_PALETTE","LOGO_RULE","channels","hslHue","max","delta","hslToHex","hue","saturation","lightness","chroma","second","match","sextant","value","oklchLightness","long","medium","short","logoColorForHue","degrees","color","PRODUCT_HUES","FREE_HUES","hueForProduct","PRODUCTS","HUES","PALETTE_STEPS","DENSITIES","COLOUR_SCHEMES","themeAttributes","settings","attributes","ThemeRoot","scheme","density","asChild","themeClass","Component","Avatar","AvatarImage","AvatarFallback","badgeVariants","Badge","variant","dot","children","buttonVariants","\"default\"","\"sm\"","\"lg\"","\"icon\"","Button","size","loading","disabled","stroke","Checkbox","RadioGroup","RadioGroupItem","Slider","defaultValue","min","onPointerDown","onPointerMove","onPointerUp","dragging","setDragging","thumbs","thumbLabel","event","_","index","Switch","useActiveIndicator","selector","container","cleanup","attach","node","measure","active","mutations","resizes","activeIndicatorClassName","ToggleGroup","indicator","sliding","ToggleGroupItem","tones","Alert","tone","title","icon","box","iconClass","Icon","EmptyState","description","action","Progress","percent","Skeleton","Spinner","label","Toaster","controlClassName","FieldControlContext","useFieldControl","own","field","\"id\"","Label","Field","hint","error","id","autoId","controlId","hintId","errorId","describedBy","Input","startIcon","type","control","input","Select","SelectGroup","SelectValue","SelectTrigger","SelectContent","position","SelectLabel","SelectItem","SelectSeparator","Textarea","Accordion","AccordionItem","AccordionTrigger","AccordionContent","Card","CardHeader","CardTitle","CardDescription","CardContent","CardFooter","Kbd","ResizablePanelGroup","ResizablePanel","ResizableHandle","ScrollArea","ScrollBar","orientation","Separator","decorative","Table","TableHeader","TableBody","TableRow","TableHead","TableCell","TableCaption","overlayClassName","floatingMotionClassName","sheetMotionClassName","AlertDialog","AlertDialogTrigger","AlertDialogContent","AlertDialogTitle","AlertDialogDescription","AlertDialogAction","AlertDialogCancel","Dialog","DialogTrigger","DialogClose","DialogContent","showClose","DialogHeader","DialogFooter","DialogTitle","DialogDescription","Drawer","DrawerTrigger","DrawerClose","DrawerContent","DrawerTitle","DrawerDescription","Popover","PopoverTrigger","PopoverAnchor","PopoverContent","align","sideOffset","Sheet","SheetTrigger","SheetClose","SheetTitle","SheetDescription","sideClassName","SheetContent","side","TooltipProvider","Tooltip","TooltipTrigger","TooltipContent","menuContentClassName","menuItemClassName","menuShortcutClassName","menuSeparatorClassName","menuLabelClassName","Command","CommandDialog","CommandInput","CommandList","CommandEmpty","CommandGroup","CommandItem","CommandSeparator","CommandShortcut","ContextMenu","ContextMenuTrigger","ContextMenuContent","ContextMenuItem","ContextMenuSeparator","ContextMenuShortcut","DropdownMenu","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuRadioGroup","DropdownMenuContent","DropdownMenuItem","DropdownMenuRadioItem","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut","Breadcrumb","BreadcrumbList","BreadcrumbItem","BreadcrumbLink","BreadcrumbPage","BreadcrumbSeparator","line","MenuIcon","open","Menubar","MenubarMenu","MenubarTrigger","MenubarContent","MenubarItem","MenubarShortcut","MenubarSeparator","NavigationMenu","NavigationMenuList","NavigationMenuItem","triggerClassName","NavigationMenuTrigger","NavigationMenuContent","NavigationMenuLink","Pagination","page","pageCount","onPageChange","window","first","pages","number","Tabs","TabsList","TabsTrigger","TabsContent","markers","Stepper","steps","current","onStepSelect","vertical","step","state","last","marker","head","SidebarContext","useSidebar","fadingLabelClassName","navRowClassName","widths","Sidebar","collapsed","defaultCollapsed","onCollapsedChange","ownCollapsed","setOwnCollapsed","isCollapsed","setCollapsed","next","SidebarTooltip","SidebarCollapseButton","pointsLeft","SidebarHeader","query","onQueryChange","searchLabel","searchText","SidebarContent","SidebarFooter","SidebarGroup","count","forceOpen","defaultOpen","collapsible","setOpen","folds","titleClassName","SidebarItem","meta","badge","content","shared","\"className\"","element","cloneWithContent","child","SidebarSheet","onOpenChange","ProductSwitcher","workspace","products","onProductChange","item","SidebarBrand","name","useCommandShortcut","onTrigger","enabled","onKeyDown","commandShortcutLabel","platform","unsubscribe","subscribe","clientPlatform","serverPlatform","useCommandShortcutLabel","AppShell","nav","secondaryNav","sidebarFooter","user","breadcrumb","topActions","commands","paletteOpen","setPaletteOpen","openPalette","shortcut","groups","command","link","sidebarBody","group","FilterBar","filters","views","FilterChip","FormSection","actions","PageHeader","tabs","RecordsTable","rows","columns","getRowId","selected","onSelectedChange","rowActions","selectable","ids","row","picked","allState","toggle","on","toggleAll","column","isSelected","sparklinePath","values","width","height","inset","range","usable","toneClassName","StatCard","series","path","RUN_STATUSES","DISPLAY","\"queued\"","\"waiting\"","\"running\"","\"completed\"","\"failed\"","\"off\"","runStatusDisplay","status","StatusBadge","live","FlowNode","onSelect","Inspector","subtitle","footer","tab","StatusBar","end","timelineBox","duration","clamp","left","timelineTicks","ticks","pad","formatTimecode","seconds","withHours","total","hours","minutes","rest","formatClockTime","startsAt","time","TimelineLanes","lanes","playhead","tickCount","tick","lane","segment","TitleBar","menus","onMinimise","onMaximise","onClose","controls","BottomNav","items","CaptureFrame","checksTitle","checks","failed","check","RecordButton","elapsed","levels","onStart","onPause","onResume","onMarker","level","CtaBand","body","onSubmit","inputLabel","submitLabel","submit","email","Faq","FeatureGrid","lead","features","feature","Hero","eyebrow","HowItWorks","CLOSE_MS","MobileMenu","links","setToggle","covered","setCovered","toggleRef","timer","observer","changeOpen","origin","PricingTable","plans","defaultBilling","note","featuredLabel","billing","setBilling","plan","ProductCard","href","stage","entry","SiteFooter","tagline","legal","SiteHeader","brand","home"],"sources":["../src/class-names/class-names.algorithm.ts","../src/product/product-catalogue.content.ts","../src/product/logos/daygic.svg","../src/product/logos/ingic.svg","../src/product/logos/loomgic-dark.svg","../src/product/logos/loomgic.svg","../src/product/logos/loregic-dark.svg","../src/product/logos/loregic.svg","../src/product/logos/pargic.svg","../src/product/logos/talogic.svg","../src/product/product-logo.component.tsx","../src/tokens/apca-contrast.algorithm.ts","../src/tokens/hue-fill.style.ts","../src/tokens/palette.style.ts","../src/tokens/logo-color.algorithm.ts","../src/tokens/product-hue.policy.ts","../src/tokens/theme.contract.ts","../src/tokens/theme-attributes.mapper.ts","../src/tokens/theme-root.component.tsx","../src/ui/avatar/avatar.component.tsx","../src/ui/badge/badge.recipe.ts","../src/ui/badge/badge.component.tsx","../src/ui/button/button.recipe.ts","../src/ui/button/button.component.tsx","../src/ui/choice/checkbox.component.tsx","../src/ui/choice/radio-group.component.tsx","../src/ui/choice/slider.component.tsx","../src/ui/choice/switch.component.tsx","../src/ui/active-indicator/active-indicator.hook.ts","../src/ui/active-indicator/active-indicator.recipe.ts","../src/ui/choice/toggle-group.component.tsx","../src/ui/feedback/alert.component.tsx","../src/ui/feedback/empty-state.component.tsx","../src/ui/feedback/progress.component.tsx","../src/ui/feedback/skeleton.component.tsx","../src/ui/feedback/spinner.component.tsx","../src/ui/feedback/toaster.component.tsx","../src/ui/field/control.recipe.ts","../src/ui/field/field-control.hook.ts","../src/ui/field/label.component.tsx","../src/ui/field/field.component.tsx","../src/ui/field/input.component.tsx","../src/ui/field/select.component.tsx","../src/ui/field/textarea.component.tsx","../src/ui/layout/accordion.component.tsx","../src/ui/layout/card.component.tsx","../src/ui/layout/kbd.component.tsx","../src/ui/layout/resizable.component.tsx","../src/ui/layout/scroll-area.component.tsx","../src/ui/layout/separator.component.tsx","../src/ui/layout/table.component.tsx","../src/ui/overlay/overlay.recipe.ts","../src/ui/overlay/alert-dialog.component.tsx","../src/ui/overlay/dialog.component.tsx","../src/ui/overlay/drawer.component.tsx","../src/ui/overlay/popover.component.tsx","../src/ui/overlay/sheet.component.tsx","../src/ui/overlay/tooltip.component.tsx","../src/ui/menu/menu.recipe.ts","../src/ui/menu/command.component.tsx","../src/ui/menu/context-menu.component.tsx","../src/ui/menu/dropdown-menu.component.tsx","../src/ui/navigation/breadcrumb.component.tsx","../src/ui/navigation/menu-icon.component.tsx","../src/ui/navigation/menubar.component.tsx","../src/ui/navigation/navigation-menu.component.tsx","../src/ui/navigation/pagination.component.tsx","../src/ui/navigation/tabs.component.tsx","../src/ui/navigation/stepper.component.tsx","../src/ui/sidebar/sidebar-context.hook.ts","../src/ui/sidebar/sidebar.recipe.ts","../src/ui/sidebar/sidebar.component.tsx","../src/ui/sidebar/sidebar-group.component.tsx","../src/ui/sidebar/sidebar-item.component.tsx","../src/ui/sidebar/sidebar-sheet.component.tsx","../src/product/product-switcher.component.tsx","../src/product/sidebar-brand.component.tsx","../src/app/command-shortcut.hook.ts","../src/app/app-shell.component.tsx","../src/app/filter-bar.component.tsx","../src/app/form-section.component.tsx","../src/app/page-header.component.tsx","../src/app/records-table.component.tsx","../src/app/sparkline.algorithm.ts","../src/app/stat-card.component.tsx","../src/status/run-status.contract.ts","../src/status/run-status.mapper.ts","../src/status/status-badge.component.tsx","../src/desktop/flow-node.component.tsx","../src/desktop/inspector.component.tsx","../src/desktop/status-bar.component.tsx","../src/desktop/timeline.algorithm.ts","../src/timecode/timecode.mapper.ts","../src/desktop/timeline-lanes.component.tsx","../src/desktop/title-bar.component.tsx","../src/mobile/bottom-nav.component.tsx","../src/mobile/capture-frame.component.tsx","../src/mobile/record-button.component.tsx","../src/web/cta-band.component.tsx","../src/web/faq.component.tsx","../src/web/feature-grid.component.tsx","../src/web/hero.component.tsx","../src/web/how-it-works.component.tsx","../src/web/mobile-menu.component.tsx","../src/web/pricing-table.component.tsx","../src/web/product-card.component.tsx","../src/web/site-footer.component.tsx","../src/web/site-header.component.tsx"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\n/**\n * Joins class names and resolves Tailwind conflicts, so a caller's class wins over a recipe default.\n *\n * @param inputs - Class names, arrays or condition maps, as `clsx` accepts them.\n * @returns One class string in which the last conflicting Tailwind utility wins.\n */\nexport function cn (...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs))\n}\n","import type { Product } from '../tokens'\n\n/** What the family says about one product. */\nexport interface ProductEntry {\n /** The product's name. It is always lower case, except Talogic. */\n name: string\n /** One sentence on what the product does. */\n tagline: string\n /** How ready the product is. */\n stage: 'In use' | 'Preview' | 'Early' | 'Concept' | 'Company'\n /** The main colour of the logo symbol, exactly as the logo file has it. It is not the interface accent. */\n logoColor: string\n /** Other colours in the logo symbol, as the logo file has them. */\n logoAccents?: readonly string[]\n}\n\n/** The products of the family, with the copy the website shows. */\nexport const PRODUCT_CATALOGUE: Readonly<Record<Product, ProductEntry>> = {\n talogic: { name: 'Talogic', tagline: 'Human focused automations.', stage: 'Company', logoColor: '#753edd' },\n pargic: { name: 'pargic', tagline: 'Turns websites and documents into clean, checked records on a schedule.', stage: 'In use', logoColor: '#dd773e' },\n daygic: { name: 'daygic', tagline: 'A wearable that listens through the day and writes your summary and to-dos.', stage: 'Concept', logoColor: '#c8902e', logoAccents: ['#9a6a1c'] },\n ingic: { name: 'ingic', tagline: 'Checks a returned scan against the PDF you sent, field by field.', stage: 'Preview', logoColor: '#3e63dd', logoAccents: ['#e5484d', '#979797'] },\n loregic: { name: 'loregic', tagline: 'Publishes repo Markdown to Confluence, Pages and wikis, with a plan first.', stage: 'Preview', logoColor: '#30a46c' },\n loomgic: { name: 'loomgic', tagline: 'Pulls speech, speakers, text and objects out of video and audio.', stage: 'Early', logoColor: '#3e63dd', logoAccents: ['#e5484d', '#30a46c'] },\n}\n","export default \"data:image/svg+xml,%3csvg%20viewBox='0%200%208534%208534'%20xmlns='http://www.w3.org/2000/svg'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2'%3e%3cpath%20d='M4266.667,0c513.234,0%20929.915,416.681%20929.915,929.915l0,1969.231c0,513.234%20-416.681,929.915%20-929.915,929.915c-513.234,0%20-929.915,-416.681%20-929.915,-929.915l0,-1969.231c0,-513.234%20416.681,-929.915%20929.915,-929.915Zm3884.531,2899.145c256.617,444.474%20104.101,1013.67%20-340.372,1270.287l-1136.936,656.41c-444.474,256.617%20-1013.67,104.101%20-1270.287,-340.372c-256.617,-444.474%20-104.101,-1013.67%20340.372,-1270.287l1136.936,-656.41c444.474,-256.617%201013.67,-104.101%201270.287,340.372Zm-568.468,4157.265c-256.617,444.474%20-825.813,596.989%20-1270.287,340.372l-568.468,-328.205c-444.474,-256.617%20-596.989,-825.813%20-340.372,-1270.287c256.617,-444.474%20825.813,-596.989%201270.287,-340.372l568.468,328.205c444.474,256.617%20596.989,825.813%20340.372,1270.287Zm-3316.063,1476.923c-513.234,0%20-929.915,-416.681%20-929.915,-929.915l0,-218.803c0,-513.234%20416.681,-929.915%20929.915,-929.915c513.234,0%20929.915,416.681%20929.915,929.915l0,218.803c0,513.234%20-416.681,929.915%20-929.915,929.915Zm-3316.063,-1476.923c-256.617,-444.474%20-104.101,-1013.67%20340.372,-1270.287l568.468,-328.205c444.474,-256.617%201013.67,-104.101%201270.287,340.372c256.617,444.474%20104.101,1013.67%20-340.372,1270.287l-568.468,328.205c-444.474,256.617%20-1013.67,104.101%20-1270.287,-340.372Zm-568.468,-4157.265c256.617,-444.474%20825.813,-596.989%201270.287,-340.372l1136.936,656.41c444.474,256.617%20596.989,825.813%20340.372,1270.287c-256.617,444.474%20-825.813,596.989%20-1270.287,340.372l-1136.936,-656.41c-444.474,-256.617%20-596.989,-825.813%20-340.372,-1270.287Z'%20fill='%23c8902e'/%3e%3ccircle%20cx='4266.667'%20cy='5141.88'%20r='984.615'%20fill='%239a6a1c'/%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3csvg%20viewBox='0%200%208534%208534'%20xmlns='http://www.w3.org/2000/svg'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2'%3e%3cpath%20d='M1870.136,527.514l-516.654,3372.973l-26.886,3736.744l2489.307,396.496l2838.27,-3.58l571.349,-3510.969l-131.073,-3631.49l-2827.783,-356.798l-2396.531,-3.376Z'%20fill='%23979797'/%3e%3cpath%20d='M1240.537,380.878l6052.26,0c9.199,0%2016.667,7.468%2016.667,16.667l0,7742.078c0,9.199%20-7.468,16.667%20-16.667,16.667l-6052.26,0c-9.199,0%20-16.667,-7.468%20-16.667,-16.667l0,-7742.078c0,-9.199%207.468,-16.667%2016.667,-16.667Zm467.975,7290.77l5116.31,0l0,-6806.128l-5116.31,-0.001l0,6806.13Z'%20fill='%233e63dd'/%3e%3cpath%20d='M1814.457,0.19l5993.356,837.045c9.11,1.272%2015.461,9.7%2014.173,18.808l-1084.269,7666.737c-1.288,9.108%20-9.73,15.469%20-18.84,14.197l-5993.356,-837.045c-9.11,-1.272%20-15.461,-9.7%20-14.173,-18.808l1084.269,-7666.737c1.288,-9.108%209.73,-15.469%2018.84,-14.197Zm-557.633,7284.634l5066.469,707.594l953.216,-6740.075l-5066.469,-707.594l-953.216,6740.075Z'%20fill='%23e5484d'/%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20width='100%25'%20height='100%25'%20viewBox='0%200%208534%208534'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xml:space='preserve'%20xmlns:affinity='https://www.affinity.studio/'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;'%3e%3crect%20id='loomgic-symbol-dark'%20x='0'%20y='0'%20width='8533.333'%20height='8533.333'%20style='fill:none;'/%3e%3cclipPath%20id='_clip1'%3e%3crect%20x='0'%20y='0'%20width='8533.333'%20height='8533.333'/%3e%3c/clipPath%3e%3cg%20clip-path='url(%23_clip1)'%3e%3cpath%20d='M7950,3683.287c321.95,0%20583.333,261.383%20583.333,583.333c0,321.95%20-261.383,583.333%20-583.333,583.333l-7366.667,0c-321.95,0%20-583.333,-261.383%20-583.333,-583.333c0,-321.95%20261.383,-583.333%20583.333,-583.333l7366.667,0Z'%20style='fill:%23979797;'/%3e%3cpath%20d='M6062.5,474.953c321.95,0%20583.333,261.383%20583.333,583.333l0,6416.667c0,321.95%20-261.383,583.333%20-583.333,583.333c-321.95,0%20-583.333,-261.383%20-583.333,-583.333l-0,-6416.667c0,-321.95%20261.383,-583.333%20583.333,-583.333Z'%20style='fill:%233e63dd;'/%3e%3cpath%20d='M2470.833,474.953c321.95,0%20583.333,261.383%20583.333,583.333l0,6416.667c0,321.95%20-261.383,583.333%20-583.333,583.333c-321.95,0%20-583.333,-261.383%20-583.333,-583.333l-0,-6416.667c0,-321.95%20261.383,-583.333%20583.333,-583.333Z'%20style='fill:%23e5484d;'/%3e%3cpath%20d='M7475,1887.453c321.95,0%20583.333,261.383%20583.333,583.333c0,321.95%20-261.383,583.333%20-583.333,583.333l-6416.667,0c-321.95,0%20-583.333,-261.383%20-583.333,-583.333c0,-321.95%20261.383,-583.333%20583.333,-583.333l6416.667,0Z'%20style='fill:%23979797;'/%3e%3cpath%20d='M7475,5479.12c321.95,0%20583.333,261.383%20583.333,583.333c0,321.95%20-261.383,583.333%20-583.333,583.333l-6416.667,0c-321.95,0%20-583.333,-261.383%20-583.333,-583.333c0,-321.95%20261.383,-583.333%20583.333,-583.333l6416.667,0Z'%20style='fill:%23979797;'/%3e%3cpath%20d='M4266.667,-0.047c321.95,0%20583.333,261.383%20583.333,583.333l0,7366.667c0,321.95%20-261.383,583.333%20-583.333,583.333c-321.95,0%20-583.333,-261.383%20-583.333,-583.333l0,-7366.667c0,-321.95%20261.383,-583.333%20583.333,-583.333Z'%20style='fill:%2330a46c;'/%3e%3crect%20x='3365.106'%20y='3683.287'%20width='1799.257'%20height='1166.667'%20style='fill:%23979797;'/%3e%3c/g%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3csvg%20viewBox='0%200%208534%208534'%20xmlns='http://www.w3.org/2000/svg'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2'%3e%3cpath%20d='M7950,3683.287c321.95,0%20583.333,261.383%20583.333,583.333c0,321.95%20-261.383,583.333%20-583.333,583.333l-7366.667,0c-321.95,0%20-583.333,-261.383%20-583.333,-583.333c0,-321.95%20261.383,-583.333%20583.333,-583.333l7366.667,0Z'%20fill='%23333'/%3e%3cpath%20d='M6062.5,474.953c321.95,0%20583.333,261.383%20583.333,583.333l0,6416.667c0,321.95%20-261.383,583.333%20-583.333,583.333c-321.95,0%20-583.333,-261.383%20-583.333,-583.333l-0,-6416.667c0,-321.95%20261.383,-583.333%20583.333,-583.333Z'%20fill='%233e63dd'/%3e%3cpath%20d='M2470.833,474.953c321.95,0%20583.333,261.383%20583.333,583.333l0,6416.667c0,321.95%20-261.383,583.333%20-583.333,583.333c-321.95,0%20-583.333,-261.383%20-583.333,-583.333l-0,-6416.667c0,-321.95%20261.383,-583.333%20583.333,-583.333Z'%20fill='%23e5484d'/%3e%3cpath%20d='M7475,1887.453c321.95,0%20583.333,261.383%20583.333,583.333c0,321.95%20-261.383,583.333%20-583.333,583.333l-6416.667,0c-321.95,0%20-583.333,-261.383%20-583.333,-583.333c0,-321.95%20261.383,-583.333%20583.333,-583.333l6416.667,0Z'%20fill='%23333'/%3e%3cpath%20d='M7475,5479.12c321.95,0%20583.333,261.383%20583.333,583.333c0,321.95%20-261.383,583.333%20-583.333,583.333l-6416.667,0c-321.95,0%20-583.333,-261.383%20-583.333,-583.333c0,-321.95%20261.383,-583.333%20583.333,-583.333l6416.667,0Z'%20fill='%23333'/%3e%3cpath%20d='M4266.667,-0.047c321.95,0%20583.333,261.383%20583.333,583.333l0,7366.667c0,321.95%20-261.383,583.333%20-583.333,583.333c-321.95,0%20-583.333,-261.383%20-583.333,-583.333l0,-7366.667c0,-321.95%20261.383,-583.333%20583.333,-583.333Z'%20fill='%2330a46c'/%3e%3crect%20x='3365.106'%20y='3683.287'%20width='1799.257'%20height='1166.667'%20fill='%23333'/%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20width='100%25'%20height='100%25'%20viewBox='0%200%208534%208534'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xml:space='preserve'%20xmlns:affinity='https://www.affinity.studio/'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;'%3e%3crect%20id='loregic-symbol-dark'%20x='0'%20y='0'%20width='8533.333'%20height='8533.333'%20style='fill:none;'/%3e%3cclipPath%20id='_clip1'%3e%3crect%20x='0'%20y='0'%20width='8533.333'%20height='8533.333'/%3e%3c/clipPath%3e%3cg%20clip-path='url(%23_clip1)'%3e%3cpath%20d='M200,1817.369l991.669,-130.102l0,-1331.039c0,-0%202479.01,718.161%203145.659,1721.344c571.186,-776.837%201880.339,-1562.02%203458.782,-1551.211c19.714,785.684%20125.622,1140.891%20125.622,1140.891l528.268,170.133l-347.435,6274.901c0,0%20-1670.55,-711.336%20-3652.563,160.125c-1293.666,-392.459%20-4208.337,-160.125%20-4208.337,-160.125l-41.666,-6294.916Z'%20style='fill:%2330a46c;'/%3e%3cpath%20d='M674.053,1753.604l-381.14,68.97l180.888,6061.772c1790.647,-649.186%203707.865,142.105%203943.712,247.896c2171.146,-536.339%202945.382,-379.138%204115.821,169.724c-1223.981,-530.825%20-2472.208,-692.399%20-4120.272,121.102c-10.122,-2.112%20-2135.639,-643.387%20-4151.222,94.749c-10.036,3.675%20-19.989,8.122%20-30.296,10.694c-11.963,2.985%20-81.54,20.347%20-149.695,-36.391c-9.916,-8.255%20-67.591,-56.269%20-79.76,-153.367c-1.522,-12.144%20-2.207,-24.479%20-2.071,-36.759c1.103,-99.663%203.277,-199.308%205.787,-298.934l160.292,-6198.949c0.068,-2.502%205.737,-16.793%2016.867,-17.103c4.938,-0.14%204.742,1.071%205.16,1.041l485.925,-34.939c-3.235,-393.18%20-6.254,-1176.405%20-8.182,-1516.972c-0.558,-98.517%2052.936,-157.763%2062.187,-168.011c7.507,-8.316%2049.37,-54.683%20118.281,-65.962c4.06,-0.661%2017.77,-2.162%2051.262,-2.162c2867.999,-0%203522.562,1848.714%203522.562,1848.714c0,0%20529.013,-1771.603%203517.591,-1771.223c25.394,0%2043.815,6.275%2047.467,7.586c56.503,20.326%2078.9,70.675%2082.776,79.402c2.342,5.264%2014.976,33.666%2014.456,71.656c-4.54,327.986%20-9.52,1156.353%20-15.299,1484.309c-12.275,695.753%20-255.794,4862.887%20-257.418,4960.884l-0.063,19.295c0,0%20-252.133,-4787.608%20-273.255,-5794.505c-3067.146,0.02%20-3106.062,2469.368%20-3106.062,2469.368c0,0%20-189.672,-2388.105%20-3166.109,-2388.075l-102.167,5508.351c1142.417,-317.188%202499.89,213.557%203247.925,864.435c-609.581,-521.407%20-2358.969,-1288.246%20-3454.726,-521.707c-41.644,29.133%20-48.158,10.858%20-52.384,11.519c-7.265,1.141%20-14.482,2.862%20-21.807,3.313c-8.629,0.52%20-58.517,3.563%20-101.525,-41.162c-6.4,-6.655%20-42.716,-44.415%20-44.323,-111.537c-1.672,-69.845%20-2.519,-139.699%20-3.453,-209.554l-57.119,-4668.295c-0.205,-21.38%20-0.409,-44.506%20-0.612,-69.17Zm177.819,4796.951l-4.067,-3.713l2.642,3.993l1.425,-0.28Z'%20style='fill:%23979797;'/%3e%3c/g%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3csvg%20viewBox='0%200%208534%208534'%20xmlns='http://www.w3.org/2000/svg'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2'%3e%3cpath%20d='M200,1817.369l991.669,-130.102l0,-1331.039c0,-0%202479.01,718.161%203145.659,1721.344c571.186,-776.837%201880.339,-1562.02%203458.782,-1551.211c19.714,785.684%20125.622,1140.891%20125.622,1140.891l528.268,170.133l-347.435,6274.901c0,0%20-1670.55,-711.336%20-3652.563,160.125c-1293.666,-392.459%20-4208.337,-160.125%20-4208.337,-160.125l-41.666,-6294.916Z'%20fill='%2330a46c'/%3e%3cpath%20d='M674.053,1753.604l-381.14,68.97l180.888,6061.772c1790.647,-649.186%203707.865,142.105%203943.712,247.896c2171.146,-536.339%202945.382,-379.138%204115.821,169.724c-1223.981,-530.825%20-2472.208,-692.399%20-4120.272,121.102c-10.122,-2.112%20-2135.639,-643.387%20-4151.222,94.749c-10.036,3.675%20-19.989,8.122%20-30.296,10.694c-11.963,2.985%20-81.54,20.347%20-149.695,-36.391c-9.916,-8.255%20-67.591,-56.269%20-79.76,-153.367c-1.522,-12.144%20-2.207,-24.479%20-2.071,-36.759c1.103,-99.663%203.277,-199.308%205.787,-298.934l160.292,-6198.949c0.068,-2.502%205.737,-16.793%2016.867,-17.103c4.938,-0.14%204.742,1.071%205.16,1.041l485.925,-34.939c-3.235,-393.18%20-6.254,-1176.405%20-8.182,-1516.972c-0.558,-98.517%2052.936,-157.763%2062.187,-168.011c7.507,-8.316%2049.37,-54.683%20118.281,-65.962c4.06,-0.661%2017.77,-2.162%2051.262,-2.162c2867.999,-0%203522.562,1848.714%203522.562,1848.714c0,0%20529.013,-1771.603%203517.591,-1771.223c25.394,0%2043.815,6.275%2047.467,7.586c56.503,20.326%2078.9,70.675%2082.776,79.402c2.342,5.264%2014.976,33.666%2014.456,71.656c-4.54,327.986%20-9.52,1156.353%20-15.299,1484.309c-12.275,695.753%20-255.794,4862.887%20-257.418,4960.884l-0.063,19.295c0,0%20-252.133,-4787.608%20-273.255,-5794.505c-3067.146,0.02%20-3106.062,2469.368%20-3106.062,2469.368c0,0%20-189.672,-2388.105%20-3166.109,-2388.075l-102.167,5508.351c1142.417,-317.188%202499.89,213.557%203247.925,864.435c-609.581,-521.407%20-2358.969,-1288.246%20-3454.726,-521.707c-41.644,29.133%20-48.158,10.858%20-52.384,11.519c-7.265,1.141%20-14.482,2.862%20-21.807,3.313c-8.629,0.52%20-58.517,3.563%20-101.525,-41.162c-6.4,-6.655%20-42.716,-44.415%20-44.323,-111.537c-1.672,-69.845%20-2.519,-139.699%20-3.453,-209.554l-57.119,-4668.295c-0.205,-21.38%20-0.409,-44.506%20-0.612,-69.17Zm177.819,4796.951l-4.067,-3.713l2.642,3.993l1.425,-0.28Z'%20fill='%23333'/%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3csvg%20viewBox='0%200%208534%208534'%20xmlns='http://www.w3.org/2000/svg'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2'%3e%3cpath%20d='M8350.618,5542.197c-16.744,53.324%20-34,106.427%20-51.758,159.296c-44.706,128.857%20-95.419,254.916%20-151.804,377.842l-1503.884,-488.642l-256.17,788.41l-1812.022,-1974.821l2626.74,-532.622l-256.169,788.407l1504.03,488.689c-26.854,133.499%20-59.948,264.752%20-98.963,393.441Zm-8116.145,159.296c-17.758,-52.869%20-35.014,-105.971%20-51.758,-159.296c-39.015,-128.688%20-72.108,-259.939%20-98.962,-393.437l1504.031,-488.689l-256.17,-788.41l2626.728,532.584l-1812.01,1974.86l-256.169,-788.407l-1503.884,488.641c-56.385,-122.927%20-107.099,-248.988%20-151.806,-377.846Zm1936.602,-5114.117l929.208,1278.945l670.662,-487.264l305.186,2662.744l-2438.145,-1113.059l670.659,-487.262l-928.662,-1278.193c239.997,-220.72%20505.322,-414.318%20791.092,-575.911Zm4982.272,575.908l-928.662,1278.194l670.662,487.264l-2438.112,1113.082l305.153,-2662.768l670.659,487.262l929.208,-1278.945c285.77,161.593%20551.095,355.19%20791.092,575.91Zm-3375.938,7379.666l0,-1581.091l-828.984,0l1318.221,-2333.589l1318.261,2333.589l-828.98,0l0,1581.091c-160.561,18.364%20-323.818,27.801%20-489.261,27.801c-165.442,0%20-328.698,-9.437%20-489.257,-27.801Z'%20fill='%23dd773e'/%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3csvg%20viewBox='0%200%208534%208534'%20xmlns='http://www.w3.org/2000/svg'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2'%3e%3ccircle%20cx='4266.667'%20cy='4266.667'%20r='4266.667'%20fill='%23753edd'/%3e%3cpath%20d='M6239.492,7179.279c-587.992,403.439%20-1284.858,619.682%20-1998.46,619.682c-1937.781,0%20-3532.333,-1594.553%20-3532.333,-3532.333c0,-1937.781%201594.553,-3532.333%203532.333,-3532.333c1593.826,-0%202999.58,1078.727%203412.017,2618.266c53.557,199.918%20-65.269,405.709%20-265.188,459.266c-199.918,53.557%20-405.709,-65.269%20-459.266,-265.188c-324.867,-1212.657%20-1432.145,-2062.344%20-2687.563,-2062.344c-1526.343,-0%20-2782.333,1255.99%20-2782.333,2782.333c0,1526.343%201255.99,2782.333%202782.333,2782.333c559.652,0%201106.236,-168.857%201568.116,-483.988l-249.007,-355.451l1686.002,-207.645l-771.521,1513.043l-235.13,-335.642Zm-3156.366,-3334.215c39.357,-108.037%20159.021,-163.797%20267.058,-124.44c108.037,39.357%20163.797,159.021%20124.44,267.058c-32.594,89.472%20-49.269,183.965%20-49.269,279.189c0,447.461%20368.205,815.667%20815.667,815.667c447.461,0%20815.667,-368.205%20815.667,-815.667c0,-291.052%20-155.783,-560.872%20-407.844,-706.394c-99.578,-57.49%20-133.749,-185.009%20-76.26,-284.587c57.49,-99.578%20185.009,-133.749%20284.587,-76.26c380.821,219.859%20616.183,627.511%20616.183,1067.242c0,676.038%20-556.295,1232.333%20-1232.333,1232.333c-676.038,0%20-1232.333,-556.295%20-1232.333,-1232.333c0,-143.867%2025.193,-286.63%2074.437,-421.807Zm3319.934,1203.659c-55.039,151.274%20-222.539,229.404%20-373.813,174.364c-151.274,-55.039%20-229.404,-222.539%20-174.364,-373.813c68.47,-188.186%20103.497,-386.907%20103.497,-587.163c0,-942.081%20-775.215,-1717.296%20-1717.296,-1717.296c-942.081,0%20-1717.296,775.215%20-1717.296,1717.296c0,612.741%20327.944,1180.786%20858.578,1487.182c139.405,80.494%20187.233,259.024%20106.739,398.429c-80.494,139.405%20-259.024,187.233%20-398.429,106.739c-710.881,-410.472%20-1150.221,-1171.472%20-1150.221,-1992.349c0,-1262.088%201038.541,-2300.629%202300.629,-2300.629c1262.088,0%202300.629,1038.541%202300.629,2300.629c0,268.278%20-46.926,534.501%20-138.654,786.611Zm-2172.051,-1208.724c229.965,0%20416.667,186.702%20416.667,416.667c0,229.965%20-186.702,416.667%20-416.667,416.667c-229.965,0%20-416.667,-186.702%20-416.667,-416.667c0,-229.965%20186.702,-416.667%20416.667,-416.667Z'%20fill='%23fff'/%3e%3c/svg%3e\"","import type { ComponentProps } from 'react'\nimport { cn } from '../class-names'\nimport type { Product } from '../tokens'\nimport daygic from './logos/daygic.svg'\nimport ingic from './logos/ingic.svg'\nimport loomgicDark from './logos/loomgic-dark.svg'\nimport loomgic from './logos/loomgic.svg'\nimport loregicDark from './logos/loregic-dark.svg'\nimport loregic from './logos/loregic.svg'\nimport pargic from './logos/pargic.svg'\nimport talogic from './logos/talogic.svg'\nimport { PRODUCT_CATALOGUE } from './product-catalogue.content'\n\nconst LOGOS: Record<Product, { light: string, dark?: string }> = {\n talogic: { light: talogic },\n pargic: { light: pargic },\n daygic: { light: daygic },\n ingic: { light: ingic },\n loregic: { light: loregic, dark: loregicDark },\n loomgic: { light: loomgic, dark: loomgicDark },\n}\n\n/** Props of {@link ProductLogo}. */\nexport interface ProductLogoProps extends Omit<ComponentProps<'img'>, 'src'> {\n /** The product. */\n product: Product\n /** Decorative logos beside the product name pass an empty alt. Default the product name. */\n alt?: string\n}\n\n/**\n * A product's logo symbol, in its own colours. Logos are never redrawn as icons or recoloured to the UI hue.\n * Logos with dark ink swap to a light-ink file inside `.dark`.\n *\n * @param props - The product, `alt`, and any `img` props; size it with classes (default 24 px).\n * @returns The logo image, or a light and a dark image when the product has a dark file.\n */\nexport function ProductLogo ({ product, alt = PRODUCT_CATALOGUE[product].name, className, ...props }: ProductLogoProps) {\n const { light, dark } = LOGOS[product]\n const classes = cn('size-6 shrink-0 object-contain', className)\n if (!dark) return <img data-slot='product-logo' src={light} alt={alt} className={classes} {...props} />\n\n return (\n <>\n <img data-slot='product-logo' src={light} alt={alt} className={cn(classes, 'dark:hidden')} {...props} />\n <img data-slot='product-logo' src={dark} alt={alt} className={cn(classes, 'hidden dark:block')} {...props} />\n </>\n )\n}\n","/**\n * APCA (Accessible Perceptual Contrast Algorithm, SAPC 0.0.98G-4g), the contrast method of the WCAG 3 draft.\n * Unlike WCAG 2 contrast ratios and HSP brightness, it judges a label on a saturated mid-tone the way people see it:\n * white reads better than black on every step-500 fill of the family palette.\n */\nconst APCA = {\n mainTrc: 2.4,\n red: 0.2126729,\n green: 0.7151522,\n blue: 0.072175,\n normBg: 0.56,\n normText: 0.57,\n revText: 0.62,\n revBg: 0.65,\n blackThresh: 0.022,\n blackClamp: 1.414,\n scale: 1.14,\n lowOffset: 0.027,\n deltaYMin: 0.0005,\n lowClip: 0.1,\n} as const\n\n/** The two label colours of the theme: the Talogic ink and white. */\nexport const LABEL_COLORS = ['#14121a', '#ffffff'] as const\n\n/** A label colour of the theme. */\nexport type LabelColor = typeof LABEL_COLORS[number]\n\n/**\n * Reads a `#rgb` or `#rrggbb` colour as its three 0-255 channels.\n *\n * @param hex - The colour, with or without `#`.\n * @returns The red, green and blue channels.\n * @throws RangeError when the text is not a hex colour.\n */\nfunction hexChannels (hex: string): [number, number, number] {\n const clean = hex.replace('#', '').trim()\n const full = clean.length === 3 ? [...clean].map((digit) => digit.repeat(2)).join('') : clean\n if (!/^[\\da-f]{6}$/i.test(full)) throw new RangeError(`Not a hex colour: ${hex}`)\n\n return [0, 2, 4].map((start) => Number.parseInt(full.slice(start, start + 2), 16)) as [number, number, number]\n}\n\n/**\n * The screen luminance APCA works with, with its soft clamp near black.\n *\n * @param hex - The colour as `#rgb` or `#rrggbb`.\n * @returns The estimated luminance, from about 0 to 1.\n */\nfunction screenLuminance (hex: string): number {\n const [red, green, blue] = hexChannels(hex).map((channel) => (channel / 255) ** APCA.mainTrc) as [number, number, number]\n const y = APCA.red * red + APCA.green * green + APCA.blue * blue\n\n return y < APCA.blackThresh ? y + (APCA.blackThresh - y) ** APCA.blackClamp : y\n}\n\n/**\n * The APCA lightness contrast (Lc) of text on a background. Dark text on a light background gives a positive Lc,\n * light text on a dark background a negative one. |Lc| 60 suits buttons and large text, 75 body text, 90 small text.\n *\n * @param text - The text colour as `#rgb` or `#rrggbb`.\n * @param background - The background colour as `#rgb` or `#rrggbb`.\n * @returns The Lc value, about -108 to 106; 0 when the two are too close to read.\n * @throws RangeError when a colour is not a hex colour.\n */\nexport function apcaContrast (text: string, background: string): number {\n const textY = screenLuminance(text)\n const backgroundY = screenLuminance(background)\n if (Math.abs(backgroundY - textY) < APCA.deltaYMin) return 0\n\n if (backgroundY > textY) {\n const sapc = (backgroundY ** APCA.normBg - textY ** APCA.normText) * APCA.scale\n\n return sapc < APCA.lowClip ? 0 : (sapc - APCA.lowOffset) * 100\n }\n const sapc = (backgroundY ** APCA.revBg - textY ** APCA.revText) * APCA.scale\n\n return sapc > -APCA.lowClip ? 0 : (sapc + APCA.lowOffset) * 100\n}\n\n/**\n * Chooses the label colour that reads best on a background: the candidate with the highest APCA |Lc|.\n *\n * @param background - The background colour as `#rgb` or `#rrggbb`.\n * @param candidates - The label colours to choose from. Default the Talogic ink and white.\n * @returns The candidate with the most contrast; the first one on a tie.\n * @throws RangeError when a colour is not a hex colour.\n */\nexport function readableLabel<Color extends string = LabelColor> (background: string, candidates: readonly Color[] = LABEL_COLORS as unknown as readonly Color[]): Color {\n let best = candidates[0]\n if (best === undefined) throw new RangeError('No label colour to choose from')\n let bestLc = Math.abs(apcaContrast(best, background))\n for (const candidate of candidates.slice(1)) {\n const lc = Math.abs(apcaContrast(candidate, background))\n if (!(lc > bestLc)) {\n continue\n }\n\n best = candidate\n bestLc = lc\n }\n\n return best\n}\n","import type { Hue } from './theme.contract'\n\n/**\n * The fill class of each family hue at step 500. Lanes, plugin dots and chart series use these, in wheel order,\n * so no series outweighs another. The classes are written out so Tailwind finds them.\n */\nexport const HUE_FILL: Readonly<Record<Hue, string>> = {\n red: 'bg-red-500',\n orange: 'bg-orange-500',\n amber: 'bg-amber-500',\n lime: 'bg-lime-500',\n green: 'bg-green-500',\n teal: 'bg-teal-500',\n cyan: 'bg-cyan-500',\n sky: 'bg-sky-500',\n blue: 'bg-blue-500',\n violet: 'bg-violet-500',\n purple: 'bg-purple-500',\n pink: 'bg-pink-500',\n}\n","import type { Hue, PaletteStep } from './theme.contract'\n\n/**\n * The family palette as hex values: the same values that `tokens.css` declares as `--color-<hue>-<step>`.\n * Use it where a CSS variable cannot go, such as canvas drawing. Elsewhere, use the Tailwind class.\n */\nexport const FAMILY_PALETTE: Readonly<Record<Hue, Readonly<Record<PaletteStep, string>>>> = {\n red: { 50: '#fef4f3', 100: '#fee9e7', 200: '#fed2cd', 300: '#ffb0a9', 400: '#fb817a', 500: '#e15955', 600: '#c43f3e', 700: '#a12f2f', 800: '#7c2524', 900: '#581b1a', 950: '#371210' },\n orange: { 50: '#fff4ef', 100: '#feeadf', 200: '#ffd4bc', 300: '#ffb48a', 400: '#f58b4b', 500: '#d96604', 600: '#b65400', 700: '#934302', 800: '#723302', 900: '#532301', 950: '#351502' },\n amber: { 50: '#fcf6ec', 100: '#fcecd5', 200: '#f8d9aa', 300: '#efbe72', 400: '#de9d16', 500: '#b78006', 600: '#996a03', 700: '#7c5500', 800: '#604102', 900: '#452e01', 950: '#2c1c00' },\n lime: { 50: '#f4f9ee', 100: '#e9f3da', 200: '#d3e7b4', 300: '#b7d484', 400: '#95bb46', 500: '#769c03', 600: '#628202', 700: '#4e6801', 800: '#3b5001', 900: '#2a3900', 950: '#192400' },\n green: { 50: '#effaf2', 100: '#ddf6e4', 200: '#baecca', 300: '#8bdda8', 400: '#4bc680', 500: '#01a760', 600: '#028b4f', 700: '#02703f', 800: '#02572f', 900: '#013e20', 950: '#012712' },\n teal: { 50: '#edfaf7', 100: '#d6f7ef', 200: '#abeee0', 300: '#6bdfca', 400: '#02c6ae', 500: '#01a38f', 600: '#098777', 700: '#046d5f', 800: '#025449', 900: '#003c34', 950: '#022620' },\n cyan: { 50: '#ecfafc', 100: '#d5f5fc', 200: '#a7ebf8', 300: '#63dbef', 400: '#00c0d7', 500: '#059eb1', 600: '#058393', 700: '#046a77', 800: '#03515c', 900: '#023a42', 950: '#02242a' },\n sky: { 50: '#eff8ff', 100: '#def2ff', 200: '#bde4fe', 300: '#89d1fe', 400: '#2cb7fd', 500: '#0997d5', 600: '#017db2', 700: '#026590', 800: '#034d70', 900: '#003752', 950: '#002235' },\n blue: { 50: '#f3f7ff', 100: '#e7efff', 200: '#cfdeff', 300: '#adc7ff', 400: '#82a8fe', 500: '#5886f2', 600: '#426dd7', 700: '#3357b1', 800: '#274387', 900: '#1c3060', 950: '#111e3b' },\n violet: { 50: '#f7f6fe', 100: '#efecfe', 200: '#dfd8fe', 300: '#c9bdfe', 400: '#af98fe', 500: '#9274e8', 600: '#7b5bcd', 700: '#6347a9', 800: '#4c3781', 900: '#36285c', 950: '#211939' },\n purple: { 50: '#fbf4fe', 100: '#f9e8fe', 200: '#f2d0fd', 300: '#e5b1f6', 400: '#d28ae8', 500: '#b666ce', 600: '#9c4db4', 700: '#7f3c93', 800: '#622e71', 900: '#452150', 950: '#2b1531' },\n pink: { 50: '#fef3f8', 100: '#ffe7f1', 200: '#fecee4', 300: '#feaad1', 400: '#f080b8', 500: '#d4599b', 600: '#b94082', 700: '#973069', 800: '#742651', 900: '#531b39', 950: '#331123' },\n}\n","import { FAMILY_PALETTE } from './palette.style'\nimport type { Hue } from './theme.contract'\n\n/**\n * The rule behind the Talogic logo colours. The Talogic, pargic, ingic and loomgic logos are HSL saturation 70 %,\n * lightness 55 % (#753edd, #dd773e, #3e63dd). On yellow and green hues that pair is too bright, so the daygic and\n * loregic logos are darker: no logo is lighter than OKLCH lightness 0.70.\n */\nexport const LOGO_RULE = { saturation: 0.7, lightness: 0.55, maxOklchLightness: 0.7, lightnessStep: 0.005 } as const\n\n/**\n * Reads a `#rrggbb` colour as its three channels from 0 to 1.\n *\n * @param hex - The colour.\n * @returns The red, green and blue channels.\n */\nfunction channels (hex: string): [number, number, number] {\n return [1, 3, 5].map((start) => Number.parseInt(hex.slice(start, start + 2), 16) / 255) as [number, number, number]\n}\n\n/**\n * The HSL hue of a colour.\n *\n * @param hex - The colour as `#rrggbb`.\n * @returns The hue in degrees, from 0 to 360.\n */\nfunction hslHue (hex: string): number {\n const [red, green, blue] = channels(hex)\n const max = Math.max(red, green, blue)\n const delta = max - Math.min(red, green, blue)\n if (delta === 0) return 0\n const sector = max === red ? ((green - blue) / delta) % 6 : (max === green ? (blue - red) / delta + 2 : (red - green) / delta + 4)\n\n return (sector * 60 + 360) % 360\n}\n\n/**\n * Converts an HSL colour to hex.\n *\n * @param hue - The hue in degrees.\n * @param saturation - The saturation from 0 to 1.\n * @param lightness - The lightness from 0 to 1.\n * @returns The colour as `#rrggbb`.\n */\nfunction hslToHex (hue: number, saturation: number, lightness: number): string {\n const chroma = (1 - Math.abs(2 * lightness - 1)) * saturation\n const second = chroma * (1 - Math.abs(((hue / 60) % 2) - 1))\n const match = lightness - chroma / 2\n const sextant = Math.floor(hue / 60) % 6\n const rgb = [[chroma, second, 0], [second, chroma, 0], [0, chroma, second], [0, second, chroma], [second, 0, chroma], [chroma, 0, second]][sextant] ?? [0, 0, 0]\n\n return `#${rgb.map((value) => Math.round((value + match) * 255).toString(16).padStart(2, '0')).join('')}`\n}\n\n/**\n * The OKLCH lightness of a colour: how light it looks, from 0 to 1.\n *\n * @param hex - The colour as `#rrggbb`.\n * @returns The lightness.\n */\nfunction oklchLightness (hex: string): number {\n const [red, green, blue] = channels(hex).map((value) => (value <= 0.040_45 ? value / 12.92 : ((value + 0.055) / 1.055) ** 2.4)) as [number, number, number]\n const long = Math.cbrt(0.412_221_470_8 * red + 0.536_332_536_3 * green + 0.051_445_992_9 * blue)\n const medium = Math.cbrt(0.211_903_498_2 * red + 0.680_699_545_1 * green + 0.107_396_956_6 * blue)\n const short = Math.cbrt(0.088_302_461_9 * red + 0.281_718_837_6 * green + 0.629_978_700_5 * blue)\n\n return 0.210_454_255_3 * long + 0.793_617_785 * medium - 0.004_072_046_8 * short\n}\n\n/**\n * Gives the logo colour of a family hue by the Talogic logo rule: HSL saturation 70 % and lightness 55 % at the hue\n * of the palette's step 500, made darker in half-percent steps until its OKLCH lightness is 0.70 or less. Use it for\n * the logo of a new product; the existing logos keep the exact colours of their files.\n *\n * @param hue - The family hue the product takes.\n * @returns The logo colour as `#rrggbb`.\n */\nexport function logoColorForHue (hue: Hue): string {\n const degrees = hslHue(FAMILY_PALETTE[hue]['500'])\n let lightness: number = LOGO_RULE.lightness\n let color = hslToHex(degrees, LOGO_RULE.saturation, lightness)\n while (oklchLightness(color) > LOGO_RULE.maxOklchLightness) {\n lightness -= LOGO_RULE.lightnessStep\n color = hslToHex(degrees, LOGO_RULE.saturation, lightness)\n }\n\n return color\n}\n","import type { Hue, Product } from './theme.contract'\n\n/**\n * The hue each product takes. One product, one hue. Two products may share a hue, as ingic and loomgic\n * share blue: their logos tell them apart. Red is for errors and delete only, so no product takes it.\n */\nexport const PRODUCT_HUES: Readonly<Record<Product, Hue>> = {\n talogic: 'violet',\n pargic: 'orange',\n daygic: 'amber',\n ingic: 'blue',\n loregic: 'green',\n loomgic: 'blue',\n}\n\n/** Hues that no product uses yet. A new product takes one of these. */\nexport const FREE_HUES: readonly Hue[] = ['lime', 'teal', 'cyan', 'sky', 'purple', 'pink']\n\n/**\n * Gives the hue that a product takes.\n *\n * @param product - The product.\n * @returns The family hue of the product's accent.\n */\nexport function hueForProduct (product: Product): Hue {\n return PRODUCT_HUES[product]\n}\n","/** The products of the Talogic family. Each one takes one hue of the family palette. */\nexport const PRODUCTS = ['talogic', 'pargic', 'daygic', 'ingic', 'loregic', 'loomgic'] as const\n\n/** A product of the Talogic family. */\nexport type Product = typeof PRODUCTS[number]\n\n/** The twelve hues of the family palette, in wheel order. */\nexport const HUES = ['red', 'orange', 'amber', 'lime', 'green', 'teal', 'cyan', 'sky', 'blue', 'violet', 'purple', 'pink'] as const\n\n/** A hue of the family palette. */\nexport type Hue = typeof HUES[number]\n\n/** The eleven steps of every hue. Each step has the same OKLCH lightness in every hue. */\nexport const PALETTE_STEPS = ['50', '100', '200', '300', '400', '500', '600', '700', '800', '900', '950'] as const\n\n/** A step of the family palette. */\nexport type PaletteStep = typeof PALETTE_STEPS[number]\n\n/**\n * Control densities, one per surface: `web` 44 px, `app` 36 px, `desk` 28 px, `mob` 48 px.\n * A surface sets its density with a class, and the component recipes read it.\n */\nexport const DENSITIES = ['web', 'app', 'desk', 'mob'] as const\n\n/** A control density. */\nexport type Density = typeof DENSITIES[number]\n\n/** The colour schemes. */\nexport const COLOUR_SCHEMES = ['light', 'dark'] as const\n\n/** A colour scheme. */\nexport type ColourScheme = typeof COLOUR_SCHEMES[number]\n\n/** The switches of a themed region. Every switch is optional: a region inherits what it does not set. */\nexport interface ThemeSettings {\n /** The product whose accent the region shows. */\n product?: Product\n /** A family hue for the accent. It wins over `product`, for a product that has no name yet. */\n hue?: Hue\n /** The colour scheme. Only `dark` adds a class, because `light` is the default. */\n scheme?: ColourScheme\n /** The control density of the surface. */\n density?: Density\n}\n","import type { ThemeSettings } from './theme.contract'\n\n/** The DOM attributes that switch the theme of a region. Spread them on any element. */\nexport interface ThemeAttributes {\n /** `dark` and the density class, or an empty string. */\n 'className': string\n /** The product, when set. */\n 'data-product'?: string\n /** The hue, when set. */\n 'data-hue'?: string\n}\n\n/**\n * Converts theme settings into the attributes that `tokens.css` reads: `.dark`, `.d-<density>`,\n * `data-product` and `data-hue`.\n *\n * @param settings - The switches to apply. A switch that is not set adds nothing.\n * @returns The attributes to spread on the root element of the region.\n */\nexport function themeAttributes (settings: ThemeSettings): ThemeAttributes {\n const classes = [settings.scheme === 'dark' ? 'dark' : '', settings.density ? `d-${settings.density}` : '']\n const attributes: ThemeAttributes = { className: classes.filter(Boolean).join(' ') }\n\n if (settings.product) attributes['data-product'] = settings.product\n if (settings.hue) attributes['data-hue'] = settings.hue\n\n return attributes\n}\n","import { Slot } from 'radix-ui'\nimport type { ComponentProps } from 'react'\nimport { cn } from '../class-names'\nimport type { ThemeSettings } from './theme.contract'\nimport { themeAttributes } from './theme-attributes.mapper'\n\n/** Props of {@link ThemeRoot}: the theme switches plus the props of a `div`. */\nexport interface ThemeRootProps extends ThemeSettings, ComponentProps<'div'> {\n /** Renders the child element in place of a `div`, with the theme attributes merged onto it. */\n asChild?: boolean\n}\n\n/**\n * Themes a region: product accent, hue, colour scheme and density. Regions nest, so a light card can sit\n * in a dark page. Content in a portal (menus, dialogs) follows `<html>`, so theme `<html>` for a whole app.\n *\n * @param props - The theme switches, `asChild`, and any `div` props.\n * @returns The themed element.\n */\nexport function ThemeRoot ({ product, hue, scheme, density, asChild = false, className, ...props }: ThemeRootProps) {\n const { className: themeClass, ...attributes } = themeAttributes({ product, hue, scheme, density })\n const Component = asChild ? Slot.Root : 'div'\n\n return <Component data-slot='theme-root' className={cn(themeClass, className)} {...attributes} {...props} />\n}\n","import { Avatar as AvatarPrimitive } from 'radix-ui'\nimport type { ComponentProps } from 'react'\nimport { cn } from '../../class-names'\n\n/**\n * The shadcn/ui Avatar root: a 32 px circle. Photos crop to the circle.\n *\n * @param props - Radix Avatar root props.\n * @returns The avatar.\n */\nexport function Avatar ({ className, ...props }: ComponentProps<typeof AvatarPrimitive.Root>) {\n return <AvatarPrimitive.Root data-slot='avatar' className={cn('relative flex size-8 shrink-0 overflow-hidden rounded-full', className)} {...props} />\n}\n\n/**\n * The photo of an {@link Avatar}. It shows only once it has loaded.\n *\n * @param props - Radix Avatar image props.\n * @returns The image.\n */\nexport function AvatarImage ({ className, ...props }: ComponentProps<typeof AvatarPrimitive.Image>) {\n return <AvatarPrimitive.Image data-slot='avatar-image' className={cn('aspect-square size-full object-cover', className)} {...props} />\n}\n\n/**\n * The fallback of an {@link Avatar}: initials on the brand-soft colour.\n *\n * @param props - Radix Avatar fallback props.\n * @returns The fallback.\n */\nexport function AvatarFallback ({ className, ...props }: ComponentProps<typeof AvatarPrimitive.Fallback>) {\n return (\n <AvatarPrimitive.Fallback\n data-slot='avatar-fallback'\n className={cn('flex size-full items-center justify-center rounded-full bg-brand-soft text-xs font-semibold text-brand-text', className)}\n {...props}\n />\n )\n}\n","import { cva, type VariantProps } from 'class-variance-authority'\n\n/**\n * The Badge recipe. Status variants (success, warning, danger, info) are the same in every product.\n * A status badge always has a word beside the colour, because some product accents share a hue with a status.\n */\nexport const badgeVariants = cva(\n 'inline-flex h-[22px] shrink-0 items-center gap-[5px] whitespace-nowrap rounded-full border border-transparent px-2 text-xs font-medium [&_svg]:size-3',\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground',\n secondary: 'bg-secondary text-secondary-foreground',\n outline: 'border-border text-foreground',\n brand: 'bg-brand-soft text-brand-text',\n success: 'bg-success-soft text-success',\n warning: 'bg-warning-soft text-warning',\n danger: 'bg-destructive-soft text-destructive',\n info: 'bg-info-soft text-info',\n },\n },\n defaultVariants: { variant: 'default' },\n },\n)\n\n/** The variant option of {@link badgeVariants}. */\nexport type BadgeVariants = VariantProps<typeof badgeVariants>\n\n/** A badge variant. */\nexport type BadgeVariant = NonNullable<BadgeVariants['variant']>\n","import type { ComponentProps } from 'react'\nimport { cn } from '../../class-names'\nimport { badgeVariants, type BadgeVariants } from './badge.recipe'\n\n/** Props of {@link Badge}. */\nexport interface BadgeProps extends ComponentProps<'span'>, BadgeVariants {\n /** Shows a dot in the current colour before the label, for a live status. */\n dot?: boolean\n}\n\n/**\n * The shadcn/ui Badge: a short label or status.\n *\n * @param props - Variant, `dot` and any `span` props.\n * @returns The badge.\n */\nexport function Badge ({ className, variant, dot = false, children, ...props }: BadgeProps) {\n return (\n <span data-slot='badge' className={cn(badgeVariants({ variant }), className)} {...props}>\n {dot && <span aria-hidden='true' className='size-1.5 shrink-0 rounded-full bg-current' />}\n {children}\n </span>\n )\n}\n","import { cva, type VariantProps } from 'class-variance-authority'\n\n/**\n * The Button recipe. Sizes read the surface density (`--control-h`, `--control-px`, `--control-fs`), so the same\n * button is 44 px on the web, 36 px in an app, 28 px on desktop and 48 px on mobile.\n */\nexport const buttonVariants = cva(\n [\n 'inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md border border-transparent font-medium no-underline',\n 'transition-[background-color,border-color,box-shadow,color] duration-150 ease-out outline-none motion-reduce:transition-none',\n 'focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background',\n 'disabled:pointer-events-none disabled:opacity-50 aria-busy:cursor-progress',\n '[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n ],\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground shadow-xs hover:bg-[color-mix(in_oklab,var(--primary)_88%,var(--foreground))]',\n secondary: 'bg-secondary text-secondary-foreground hover:bg-accent',\n outline: 'border-input bg-background text-foreground shadow-xs hover:bg-accent',\n ghost: 'bg-transparent text-foreground hover:bg-accent',\n destructive: 'bg-destructive text-destructive-foreground shadow-xs hover:bg-[color-mix(in_oklab,var(--destructive)_88%,var(--foreground))]',\n link: 'bg-transparent text-brand-text underline underline-offset-3',\n },\n size: {\n 'default': 'h-(--control-h) px-(--control-px) text-(length:--control-fs)',\n 'sm': 'h-[calc(var(--control-h)-6px)] px-[calc(var(--control-px)-4px)] text-[13px]',\n 'lg': 'h-[calc(var(--control-h)+8px)] px-[calc(var(--control-px)+6px)] text-base',\n 'icon': 'size-(--control-h)',\n 'icon-sm': 'size-[calc(var(--control-h)-6px)]',\n },\n },\n compoundVariants: [{ variant: 'link', class: 'h-auto px-0' }],\n defaultVariants: { variant: 'default', size: 'default' },\n },\n)\n\n/** The variant and size options of {@link buttonVariants}. */\nexport type ButtonVariants = VariantProps<typeof buttonVariants>\n","import { LoaderCircle } from 'lucide-react'\nimport { Slot } from 'radix-ui'\nimport type { ComponentProps } from 'react'\nimport { cn } from '../../class-names'\nimport { buttonVariants, type ButtonVariants } from './button.recipe'\n\n/** Props of {@link Button}. */\nexport interface ButtonProps extends ComponentProps<'button'>, ButtonVariants {\n /** Renders the child element (a link, for example) with the button's styles. */\n asChild?: boolean\n /** Shows a spinner, sets `aria-busy` and disables the button. The label stays, so the width does not jump. */\n loading?: boolean\n}\n\n/**\n * The shadcn/ui Button. Use one primary button per view.\n *\n * @param props - Variant, size, `asChild`, `loading` and any `button` props.\n * @returns The button.\n */\nexport function Button ({ className, variant, size, asChild = false, loading = false, disabled = loading, children, ...props }: ButtonProps) {\n const Component = asChild ? Slot.Root : 'button'\n\n return (\n <Component\n data-slot='button'\n className={cn(buttonVariants({ variant, size }), className)}\n disabled={asChild ? undefined : disabled}\n aria-busy={loading || undefined}\n {...props}\n >\n {loading && !asChild ? <><LoaderCircle className='animate-spin' aria-hidden='true' />{children}</> : children}\n </Component>\n )\n}\n","import { Checkbox as CheckboxPrimitive } from 'radix-ui'\nimport type { ComponentProps } from 'react'\nimport { cn } from '../../class-names'\n\nconst stroke = 'fill-none stroke-current [stroke-dasharray:1] [stroke-linecap:round] [stroke-linejoin:round] [stroke-width:2.4] transition-[stroke-dashoffset] ease-emphasised motion-reduce:transition-none'\n\n/**\n * The shadcn/ui Checkbox: 16 px, primary fill when checked. Checking draws the tick from its short end. Going to the\n * indeterminate state undraws the tick while the dash draws across, and clearing undraws the mark while the fill\n * fades. Reduced motion changes at once.\n *\n * @param props - Radix Checkbox props.\n * @returns The checkbox.\n */\nexport function Checkbox ({ className, ...props }: ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n data-slot='checkbox'\n className={cn(\n 'peer group/checkbox grid size-4 shrink-0 cursor-pointer place-content-center rounded-[4px] border border-input bg-background text-primary-foreground shadow-xs outline-none',\n 'transition-[background-color,border-color] duration-150 motion-reduce:transition-none',\n 'focus-visible:ring-3 focus-visible:ring-ring/25 disabled:cursor-not-allowed disabled:opacity-50',\n 'data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator forceMount className='grid place-content-center'>\n <svg viewBox='0 0 16 16' aria-hidden='true' className='size-3'>\n <path\n d='M3.5 8.5 L6.5 11.5 L12.5 4.5'\n pathLength={1}\n className={cn(stroke, 'duration-200 [stroke-dashoffset:1] group-data-[state=checked]/checkbox:[stroke-dashoffset:0]')}\n />\n <path\n d='M4 8 L12 8'\n pathLength={1}\n className={cn(stroke, 'duration-200 [stroke-dashoffset:1] group-data-[state=indeterminate]/checkbox:[stroke-dashoffset:0] group-data-[state=indeterminate]/checkbox:delay-75')}\n />\n </svg>\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n )\n}\n","import { RadioGroup as RadioGroupPrimitive } from 'radix-ui'\nimport type { ComponentProps } from 'react'\nimport { cn } from '../../class-names'\n\n/**\n * The shadcn/ui RadioGroup root.\n *\n * @param props - Radix RadioGroup root props.\n * @returns The group.\n */\nexport function RadioGroup ({ className, ...props }: ComponentProps<typeof RadioGroupPrimitive.Root>) {\n return <RadioGroupPrimitive.Root data-slot='radio-group' className={cn('grid gap-2.5', className)} {...props} />\n}\n\n/**\n * One option of a {@link RadioGroup}: a 16 px circle with a dot when selected. The dot and the fill fade in on the\n * chosen option while they fade out on the one before.\n *\n * @param props - Radix RadioGroup item props.\n * @returns The radio.\n */\nexport function RadioGroupItem ({ className, ...props }: ComponentProps<typeof RadioGroupPrimitive.Item>) {\n return (\n <RadioGroupPrimitive.Item\n data-slot='radio-group-item'\n className={cn(\n 'peer group/radio grid size-4 shrink-0 cursor-pointer place-content-center rounded-full border border-input bg-background shadow-xs outline-none',\n 'transition-[background-color,border-color] duration-200 motion-reduce:transition-none',\n 'focus-visible:ring-3 focus-visible:ring-ring/25 disabled:cursor-not-allowed disabled:opacity-50',\n 'data-[state=checked]:border-primary data-[state=checked]:bg-primary',\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator\n forceMount\n className='size-1.5 scale-0 rounded-full bg-primary-foreground opacity-0 transition-[opacity,scale] duration-200 ease-emphasised group-data-[state=checked]/radio:scale-100 group-data-[state=checked]/radio:opacity-100 motion-reduce:transition-none'\n />\n </RadioGroupPrimitive.Item>\n )\n}\n","import { Slider as SliderPrimitive } from 'radix-ui'\nimport { type ComponentProps, useState } from 'react'\nimport { cn } from '../../class-names'\n\n/**\n * The shadcn/ui Slider, with one thumb per value. A click on the track glides the thumb and the fill to that point;\n * a drag follows the pointer at once. Give it an `aria-label` or label it with a {@link Label}.\n *\n * @param props - Radix Slider props.\n * @returns The slider.\n */\nexport function Slider ({ className, value, defaultValue, min = 0, max = 100, onPointerDown, onPointerMove, onPointerUp, ...props }: ComponentProps<typeof SliderPrimitive.Root>) {\n const [dragging, setDragging] = useState(false)\n const thumbs = (value ?? defaultValue ?? [min]).length\n const thumbLabel = props['aria-label']\n\n return (\n <SliderPrimitive.Root\n data-slot='slider'\n value={value}\n defaultValue={defaultValue}\n min={min}\n max={max}\n data-dragging={dragging || undefined}\n onPointerDown={(event) => { setDragging(false); onPointerDown?.(event) }}\n onPointerMove={(event) => { if (event.buttons > 0) setDragging(true); onPointerMove?.(event) }}\n onPointerUp={(event) => { setDragging(false); onPointerUp?.(event) }}\n className={cn(\n 'group/slider relative flex w-full touch-none select-none items-center data-disabled:opacity-50',\n // The thumb's wrapper (positioned by Radix) and the fill glide unless the user is dragging.\n 'not-data-dragging:[&>span:has([role=slider])]:transition-[left] not-data-dragging:[&>span:has([role=slider])]:duration-200 not-data-dragging:[&>span:has([role=slider])]:ease-emphasised',\n 'motion-reduce:[&>span:has([role=slider])]:transition-none',\n className,\n )}\n {...props}\n >\n <SliderPrimitive.Track className='relative h-1.5 grow overflow-hidden rounded-full bg-muted'>\n <SliderPrimitive.Range className='absolute h-full bg-primary transition-[left,right] duration-200 ease-emphasised group-data-dragging/slider:transition-none motion-reduce:transition-none' />\n </SliderPrimitive.Track>\n {Array.from({ length: thumbs }, (_, index) => (\n <SliderPrimitive.Thumb\n key={index}\n aria-label={thumbLabel}\n className='block size-4 cursor-grab rounded-full border border-primary bg-background shadow-xs outline-none focus-visible:ring-3 focus-visible:ring-ring/25'\n />\n ))}\n </SliderPrimitive.Root>\n )\n}\n","import { Switch as SwitchPrimitive } from 'radix-ui'\nimport type { ComponentProps } from 'react'\nimport { cn } from '../../class-names'\n\n/**\n * The shadcn/ui Switch: 36 by 20 px, primary when on.\n *\n * @param props - Radix Switch props.\n * @returns The switch.\n */\nexport function Switch ({ className, ...props }: ComponentProps<typeof SwitchPrimitive.Root>) {\n return (\n <SwitchPrimitive.Root\n data-slot='switch'\n className={cn(\n 'peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full bg-input p-0.5 outline-none transition-colors duration-200 motion-reduce:transition-none',\n 'focus-visible:ring-3 focus-visible:ring-ring/25 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary',\n className,\n )}\n {...props}\n >\n <SwitchPrimitive.Thumb className='block size-4 rounded-full bg-white shadow-xs transition-transform duration-200 ease-emphasised data-[state=checked]:translate-x-4 motion-reduce:transition-none' />\n </SwitchPrimitive.Root>\n )\n}\n","import { useCallback, useEffect, useRef } from 'react'\n\n/**\n * Follows the active item of a row (a tab, a segment) so one indicator can slide and resize under it. It writes\n * `--indicator-left`, `--indicator-top`, `--indicator-width` and `--indicator-height` (in px, relative to the\n * container) on the container whenever the active item changes or anything resizes, and sets `data-indicator` to\n * `ready` after the first measure, so the indicator does not slide in from the corner on load. With no active item\n * it sets `data-indicator` to `none`.\n *\n * @param selector - The CSS selector of the active item inside the container, such as `[data-state=active]`.\n * @returns A ref callback for the container, which must be positioned (`relative`).\n */\nexport function useActiveIndicator<Container extends HTMLElement> (selector: string): (node: Container | null) => void {\n const container = useRef<Container | null>(null)\n const cleanup = useRef<() => void>(undefined)\n\n const attach = useCallback((node: Container | null) => {\n cleanup.current?.()\n cleanup.current = undefined\n container.current = node\n if (!node) return\n\n function measure (): void {\n if (!node) return\n const active = node.querySelector<HTMLElement>(selector)\n if (!active) {\n node.dataset.indicator = 'none'\n\n return\n }\n node.style.setProperty('--indicator-left', `${active.offsetLeft}px`)\n node.style.setProperty('--indicator-top', `${active.offsetTop}px`)\n node.style.setProperty('--indicator-width', `${active.offsetWidth}px`)\n node.style.setProperty('--indicator-height', `${active.offsetHeight}px`)\n if (node.dataset.indicator === 'ready') return\n node.dataset.indicator = 'placed'\n requestAnimationFrame(() => {\n if (node.dataset.indicator === 'placed') node.dataset.indicator = 'ready'\n })\n }\n\n measure()\n const mutations = new MutationObserver(measure)\n mutations.observe(node, { subtree: true, attributes: true, attributeFilter: ['data-state'], childList: true })\n const resizes = new ResizeObserver(measure)\n resizes.observe(node)\n cleanup.current = () => {\n mutations.disconnect()\n resizes.disconnect()\n }\n }, [selector])\n\n useEffect(() => () => cleanup.current?.(), [])\n\n return attach\n}\n","/**\n * The classes of the indicator element: absolute, placed by the variables of {@link useActiveIndicator}, gliding\n * between items once placed, and hidden while there is no active item.\n */\nexport const activeIndicatorClassName = [\n 'pointer-events-none absolute left-(--indicator-left) top-(--indicator-top) h-(--indicator-height) w-(--indicator-width)',\n 'group-data-[indicator=ready]/indicator:transition-[left,top,width,height] group-data-[indicator=ready]/indicator:duration-250 group-data-[indicator=ready]/indicator:ease-emphasised',\n 'group-data-[indicator=none]/indicator:opacity-0 group-not-data-indicator/indicator:opacity-0 motion-reduce:transition-none',\n].join(' ')\n","import { ToggleGroup as ToggleGroupPrimitive } from 'radix-ui'\nimport type { ComponentProps } from 'react'\nimport { activeIndicatorClassName, useActiveIndicator } from '../active-indicator'\nimport { cn } from '../../class-names'\n\n/**\n * The shadcn/ui ToggleGroup, drawn as a segmented control on the muted colour. With `type='single'`, one raised\n * background slides to the pressed segment and takes its width; with `type='multiple'`, each pressed segment lifts.\n *\n * @param props - Radix ToggleGroup root props (`type` is `single` or `multiple`).\n * @returns The group.\n */\nexport function ToggleGroup ({ className, children, ...props }: ComponentProps<typeof ToggleGroupPrimitive.Root>) {\n const indicator = useActiveIndicator<HTMLDivElement>('[data-state=on]')\n const sliding = props.type === 'single'\n\n return (\n <ToggleGroupPrimitive.Root\n ref={sliding ? indicator : undefined}\n data-slot='toggle-group'\n data-mode={props.type}\n className={cn('group/indicator relative inline-flex w-fit items-center gap-0.5 rounded-md bg-muted p-[3px]', className)}\n {...props}\n >\n {sliding && <span aria-hidden='true' data-slot='toggle-group-indicator' className={cn(activeIndicatorClassName, 'rounded-sm bg-background shadow-xs')} />}\n {children}\n </ToggleGroupPrimitive.Root>\n )\n}\n\n/**\n * One segment of a {@link ToggleGroup}. The pressed segment sits on the raised background.\n *\n * @param props - Radix ToggleGroup item props.\n * @returns The segment.\n */\nexport function ToggleGroupItem ({ className, ...props }: ComponentProps<typeof ToggleGroupPrimitive.Item>) {\n return (\n <ToggleGroupPrimitive.Item\n data-slot='toggle-group-item'\n className={cn(\n 'inline-flex h-[calc(var(--control-h)-6px)] cursor-pointer items-center justify-center gap-1.5 whitespace-nowrap rounded-sm px-3 text-[13px] font-medium text-muted-foreground outline-none',\n 'hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50 [&_svg]:size-4',\n 'relative transition-colors duration-150 data-[state=on]:text-foreground motion-reduce:transition-none',\n 'in-data-[mode=multiple]:data-[state=on]:bg-background in-data-[mode=multiple]:data-[state=on]:shadow-xs',\n className,\n )}\n {...props}\n />\n )\n}\n","import { CircleCheck, Info, TriangleAlert } from 'lucide-react'\nimport type { ComponentProps, ReactNode } from 'react'\nimport { cn } from '../../class-names'\n\nconst tones = {\n info: { box: 'border-border bg-card', icon: 'text-info', Icon: Info },\n success: { box: 'border-border bg-card', icon: 'text-success', Icon: CircleCheck },\n warning: { box: 'border-[color-mix(in_oklab,var(--warning)_35%,var(--border))] bg-warning-soft', icon: 'text-warning', Icon: TriangleAlert },\n danger: { box: 'border-[color-mix(in_oklab,var(--destructive)_40%,var(--border))] bg-destructive-soft', icon: 'text-destructive', Icon: TriangleAlert },\n} as const\n\n/** Props of {@link Alert}. */\nexport interface AlertProps extends Omit<ComponentProps<'div'>, 'title'> {\n /** The tone. It sets the icon and colour; the title says what happened. */\n tone?: keyof typeof tones\n /** A short title, such as \"Run failed\". */\n title: ReactNode\n /** Replaces the tone's icon. */\n icon?: ReactNode\n}\n\n/**\n * The shadcn/ui Alert: an inline message with an icon, a title and a description. Danger and warning\n * alerts are announced at once (`role=\"alert\"`); info and success are polite (`role=\"status\"`).\n *\n * @param props - Tone, title, optional icon, the description as children, and any `div` props.\n * @returns The alert.\n */\nexport function Alert ({ tone = 'info', title, icon, children, className, ...props }: AlertProps) {\n const { box, icon: iconClass, Icon } = tones[tone]\n\n return (\n <div data-slot='alert' role={tone === 'danger' || tone === 'warning' ? 'alert' : 'status'} className={cn('flex gap-3 rounded-lg border px-4 py-3.5', box, className)} {...props}>\n <span aria-hidden='true' className={cn('mt-px flex shrink-0 [&_svg]:size-[18px]', iconClass)}>{icon ?? <Icon />}</span>\n <div className='flex flex-col gap-0.5'>\n <p className='m-0 type-h4'>{title}</p>\n {children && <div className='text-[13px] text-muted-foreground'>{children}</div>}\n </div>\n </div>\n )\n}\n","import { Plus } from 'lucide-react'\nimport type { ComponentProps, ReactNode } from 'react'\nimport { cn } from '../../class-names'\n\n/** Props of {@link EmptyState}. */\nexport interface EmptyStateProps extends Omit<ComponentProps<'div'>, 'title'> {\n /** What is missing, such as \"No schedules yet\". */\n title: ReactNode\n /** What the user gets by adding one. */\n description?: ReactNode\n /** The icon in the brand-soft tile. Default a plus. */\n icon?: ReactNode\n /** The action that fills the space, usually one small primary button. */\n action?: ReactNode\n}\n\n/**\n * The Empty pattern: a dashed box with an icon tile, a title, a sentence and one action.\n *\n * @param props - Title, description, icon, action and any `div` props.\n * @returns The empty state.\n */\nexport function EmptyState ({ title, description, icon, action, className, ...props }: EmptyStateProps) {\n return (\n <div data-slot='empty-state' className={cn('flex flex-col items-center gap-2 rounded-xl border-[1.5px] border-dashed border-input p-6 text-center', className)} {...props}>\n <span aria-hidden='true' className='grid size-10 place-items-center rounded-[10px] bg-brand-soft text-brand-text [&_svg]:size-5'>{icon ?? <Plus />}</span>\n <p className='m-0 type-h4'>{title}</p>\n {description && <p className='m-0 max-w-sm text-[13px] text-muted-foreground'>{description}</p>}\n {action && <div className='mt-1'>{action}</div>}\n </div>\n )\n}\n","import { Progress as ProgressPrimitive } from 'radix-ui'\nimport type { ComponentProps } from 'react'\nimport { cn } from '../../class-names'\n\n/**\n * The shadcn/ui Progress bar: 6 px, brand fill on the muted track. Give it an `aria-label`.\n *\n * @param props - `value` from 0 to `max` (default 100) and Radix Progress props.\n * @returns The progress bar.\n */\nexport function Progress ({ className, value, max = 100, ...props }: ComponentProps<typeof ProgressPrimitive.Root>) {\n const percent = value == null ? 0 : Math.min(100, Math.max(0, (value / max) * 100))\n\n return (\n <ProgressPrimitive.Root data-slot='progress' value={value} max={max} className={cn('relative h-1.5 w-full overflow-hidden rounded-full bg-muted', className)} {...props}>\n <ProgressPrimitive.Indicator className='h-full rounded-full bg-brand transition-[width]' style={{ width: `${percent}%` }} />\n </ProgressPrimitive.Root>\n )\n}\n","import type { ComponentProps } from 'react'\nimport { cn } from '../../class-names'\n\n/**\n * The shadcn/ui Skeleton: a placeholder block. Skeletons copy the real layout, so size them like the content.\n *\n * @param props - Any `div` props; set the size with classes.\n * @returns The placeholder.\n */\nexport function Skeleton ({ className, ...props }: ComponentProps<'div'>) {\n return <div data-slot='skeleton' aria-hidden='true' className={cn('animate-pulse rounded-sm bg-muted', className)} {...props} />\n}\n","import { LoaderCircle } from 'lucide-react'\nimport type { ComponentProps } from 'react'\nimport { cn } from '../../class-names'\n\n/**\n * The shadcn/ui Spinner. Show text beside it for any wait over 400 ms.\n *\n * @param props - `label` (the accessible name, default \"Loading\") and any `svg` props.\n * @returns The spinner.\n */\nexport function Spinner ({ className, label = 'Loading', ...props }: ComponentProps<'svg'> & { label?: string }) {\n return <LoaderCircle data-slot='spinner' role='status' aria-label={label} className={cn('size-4 animate-spin text-muted-foreground', className)} {...props} />\n}\n","import type { ComponentProps } from 'react'\nimport { Toaster as Sonner } from 'sonner'\n\n/**\n * The shadcn/ui Toaster (Sonner), drawn with the Talogic tokens: popover colours, large elevation, 10 px radius.\n * Mount one per app, then call `toast()` from `sonner`.\n *\n * @param props - Sonner Toaster props.\n * @returns The toast region.\n */\nexport function Toaster (props: ComponentProps<typeof Sonner>) {\n return (\n <Sonner\n className='toaster group'\n toastOptions={{\n classNames: {\n toast: 'group flex w-[360px] items-start gap-3 rounded-lg border bg-popover px-4 py-3.5 font-sans text-popover-foreground shadow-lg',\n title: 'text-[15px] font-semibold',\n description: 'text-[13px] text-muted-foreground',\n success: '[&_[data-icon]]:text-success',\n error: '[&_[data-icon]]:text-destructive',\n info: '[&_[data-icon]]:text-info',\n warning: '[&_[data-icon]]:text-warning',\n },\n }}\n {...props}\n />\n )\n}\n","/**\n * The shared look of text controls (input, textarea, select trigger): the surface density height, the input border,\n * a brand focus ring, and a destructive ring when `aria-invalid` is set.\n */\nexport const controlClassName = [\n 'w-full min-w-0 rounded-md border border-input bg-background text-(length:--control-fs) text-foreground shadow-xs',\n 'outline-none transition-[border-color,box-shadow] placeholder:text-muted-foreground',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/25',\n 'aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20',\n 'disabled:cursor-not-allowed disabled:opacity-50',\n].join(' ')\n","import { type AriaAttributes, createContext, useContext } from 'react'\n\n/** What a {@link Field} tells the control inside it. */\nexport interface FieldControlState {\n /** The control's id, which the field's label points at. */\n id: string\n /** Ids of the hint and the error, for `aria-describedby`. Empty when the field has neither. */\n describedBy: string\n /** True when the field shows an error. */\n invalid: boolean\n}\n\n/** The context a {@link Field} provides. Null outside a field. */\nexport const FieldControlContext = createContext<FieldControlState | null>(null)\n\n/** The ARIA wiring a control spreads on itself. */\nexport interface FieldControlProps {\n 'id'?: string\n 'aria-describedby'?: string\n 'aria-invalid'?: AriaAttributes['aria-invalid']\n}\n\n/**\n * Wires a control to the field around it: its id, its description and its invalid state. A prop the caller\n * passes wins over the field's value. Outside a field it returns the caller's props unchanged.\n *\n * @param own - The ARIA props the caller passed to the control.\n * @returns The props to spread on the control element.\n */\nexport function useFieldControl (own: FieldControlProps = {}): FieldControlProps {\n const field = useContext(FieldControlContext)\n if (!field) return own\n\n return {\n 'id': own.id ?? field.id,\n 'aria-describedby': own['aria-describedby'] ?? (field.describedBy || undefined),\n 'aria-invalid': own['aria-invalid'] ?? (field.invalid || undefined),\n }\n}\n","import { Label as LabelPrimitive } from 'radix-ui'\nimport type { ComponentProps } from 'react'\nimport { cn } from '../../class-names'\n\n/**\n * The shadcn/ui Label: 13 px, medium weight.\n *\n * @param props - Radix Label props.\n * @returns The label.\n */\nexport function Label ({ className, ...props }: ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot='label'\n className={cn('flex select-none items-center gap-2 text-[13px] font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50', className)}\n {...props}\n />\n )\n}\n","import { type ReactNode, useId } from 'react'\nimport { cn } from '../../class-names'\nimport { FieldControlContext } from './field-control.hook'\nimport { Label } from './label.component'\n\n/** Props of {@link Field}. */\nexport interface FieldProps {\n /** The visible label. */\n label: ReactNode\n /** Helper copy under the control. */\n hint?: ReactNode\n /** An error under the control. It marks the control invalid and replaces nothing: the hint stays. */\n error?: ReactNode\n /** The control's id. A stable id is made when it is not given. */\n id?: string\n /** The control: an Input, Textarea or SelectTrigger, which wire themselves to the field. */\n children: ReactNode\n className?: string\n}\n\n/**\n * A labelled form field: label, control, hint and error, with the ARIA wiring done for the control.\n *\n * @param props - Label, hint, error, optional id and the control.\n * @returns The field.\n */\nexport function Field ({ label, hint, error, id, children, className }: FieldProps) {\n const autoId = useId()\n const controlId = id ?? autoId\n const hintId = hint ? `${controlId}-hint` : ''\n const errorId = error ? `${controlId}-error` : ''\n const describedBy = [hintId, errorId].filter(Boolean).join(' ')\n\n return (\n <FieldControlContext value={{ id: controlId, describedBy, invalid: Boolean(error) }}>\n <div data-slot='field' className={cn('flex flex-col gap-1.5', className)}>\n <Label htmlFor={controlId}>{label}</Label>\n {children}\n {hint && <p id={hintId} className='m-0 text-xs text-muted-foreground'>{hint}</p>}\n {error && <p id={errorId} className='m-0 text-xs text-destructive'>{error}</p>}\n </div>\n </FieldControlContext>\n )\n}\n","import type { ComponentProps, ReactNode } from 'react'\nimport { cn } from '../../class-names'\nimport { controlClassName } from './control.recipe'\nimport { useFieldControl } from './field-control.hook'\n\n/** Props of {@link Input}. */\nexport interface InputProps extends ComponentProps<'input'> {\n /** An icon inside the start of the input, such as a search glass. It is decorative. */\n startIcon?: ReactNode\n}\n\n/**\n * The shadcn/ui Input. Inside a {@link Field} it takes the field's id, description and invalid state.\n *\n * @param props - `startIcon` and any `input` props.\n * @returns The input, wrapped when it has an icon.\n */\nexport function Input ({ className, startIcon, type = 'text', ...props }: InputProps) {\n const control = useFieldControl(props)\n const input = (\n <input\n data-slot='input'\n type={type}\n className={cn(controlClassName, 'h-(--control-h) px-3 file:border-0 file:bg-transparent file:text-sm file:font-medium', startIcon ? 'ps-[34px]' : '', className)}\n {...props}\n {...control}\n />\n )\n if (!startIcon) return input\n\n return (\n <span className='relative flex w-full items-center'>\n <span aria-hidden='true' className='pointer-events-none absolute start-[11px] flex text-muted-foreground [&_svg]:size-4'>{startIcon}</span>\n {input}\n </span>\n )\n}\n","import { Check, ChevronDown } from 'lucide-react'\nimport { Select as SelectPrimitive } from 'radix-ui'\nimport type { ComponentProps } from 'react'\nimport { cn } from '../../class-names'\nimport { controlClassName } from './control.recipe'\nimport { useFieldControl } from './field-control.hook'\n\n/** The shadcn/ui Select root (Radix). */\nexport const Select = SelectPrimitive.Root\n\n/** A group of {@link SelectItem}s. */\nexport const SelectGroup = SelectPrimitive.Group\n\n/** The selected value inside a {@link SelectTrigger}. */\nexport const SelectValue = SelectPrimitive.Value\n\n/**\n * The button that opens a {@link Select}. Inside a {@link Field} it takes the field's id and state.\n *\n * @param props - Radix Select trigger props.\n * @returns The trigger.\n */\nexport function SelectTrigger ({ className, children, ...props }: ComponentProps<typeof SelectPrimitive.Trigger>) {\n const control = useFieldControl(props)\n\n return (\n <SelectPrimitive.Trigger\n data-slot='select-trigger'\n className={cn(controlClassName, 'flex h-(--control-h) cursor-pointer items-center justify-between gap-2 px-3 text-start data-placeholder:text-muted-foreground [&>span]:truncate', className)}\n {...props}\n {...control}\n >\n {children}\n <SelectPrimitive.Icon asChild><ChevronDown className='size-4 shrink-0 text-muted-foreground' aria-hidden='true' /></SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n )\n}\n\n/**\n * The list of a {@link Select}, in a portal, as wide as the trigger.\n *\n * @param props - Radix Select content props.\n * @returns The list.\n */\nexport function SelectContent ({ className, children, position = 'popper', ...props }: ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot='select-content'\n position={position}\n className={cn(\n 'relative z-50 max-h-(--radix-select-content-available-height) min-w-32 origin-(--radix-select-content-transform-origin) overflow-hidden rounded-lg border bg-popover text-popover-foreground shadow-md',\n 'data-[state=open]:animate-zoom-in data-[state=closed]:animate-zoom-out motion-reduce:data-[state=open]:animate-fade-in motion-reduce:data-[state=closed]:animate-fade-out',\n position === 'popper' && 'w-full min-w-(--radix-select-trigger-width) data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1',\n className,\n )}\n {...props}\n >\n <SelectPrimitive.Viewport className='p-1'>{children}</SelectPrimitive.Viewport>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n )\n}\n\n/**\n * The heading of a {@link SelectGroup}.\n *\n * @param props - Radix Select label props.\n * @returns The heading.\n */\nexport function SelectLabel ({ className, ...props }: ComponentProps<typeof SelectPrimitive.Label>) {\n return <SelectPrimitive.Label data-slot='select-label' className={cn('px-2.5 py-1.5 text-xs font-medium text-muted-foreground', className)} {...props} />\n}\n\n/**\n * An option of a {@link Select}, with a check mark when selected.\n *\n * @param props - Radix Select item props.\n * @returns The option.\n */\nexport function SelectItem ({ className, children, ...props }: ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot='select-item'\n className={cn('relative flex w-full cursor-default select-none items-center gap-2 rounded-sm py-1.5 ps-2.5 pe-8 text-[13.5px] outline-none focus:bg-accent data-disabled:pointer-events-none data-disabled:opacity-50', className)}\n {...props}\n >\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n <span className='absolute end-2 flex size-4 items-center justify-center'>\n <SelectPrimitive.ItemIndicator><Check className='size-4' aria-hidden='true' /></SelectPrimitive.ItemIndicator>\n </span>\n </SelectPrimitive.Item>\n )\n}\n\n/**\n * A line between groups of a {@link Select}.\n *\n * @param props - Radix Select separator props.\n * @returns The separator.\n */\nexport function SelectSeparator ({ className, ...props }: ComponentProps<typeof SelectPrimitive.Separator>) {\n return <SelectPrimitive.Separator data-slot='select-separator' className={cn('-mx-1 my-1 h-px bg-border', className)} {...props} />\n}\n","import type { ComponentProps } from 'react'\nimport { cn } from '../../class-names'\nimport { controlClassName } from './control.recipe'\nimport { useFieldControl } from './field-control.hook'\n\n/**\n * The shadcn/ui Textarea. Inside a {@link Field} it takes the field's id, description and invalid state.\n *\n * @param props - Any `textarea` props.\n * @returns The textarea.\n */\nexport function Textarea ({ className, ...props }: ComponentProps<'textarea'>) {\n const control = useFieldControl(props)\n\n return <textarea data-slot='textarea' className={cn(controlClassName, 'min-h-20 resize-y px-3 py-2.5 leading-normal', className)} {...props} {...control} />\n}\n","import { Accordion as AccordionPrimitive } from 'radix-ui'\nimport type { ComponentProps } from 'react'\nimport { cn } from '../../class-names'\n\n/**\n * The shadcn/ui Accordion root, for FAQs and long settings.\n *\n * @param props - Radix Accordion root props (`type` is `single` or `multiple`).\n * @returns The accordion.\n */\nexport function Accordion ({ className, ...props }: ComponentProps<typeof AccordionPrimitive.Root>) {\n return <AccordionPrimitive.Root data-slot='accordion' className={cn('border-t', className)} {...props} />\n}\n\n/**\n * One question and answer.\n *\n * @param props - Radix Accordion item props.\n * @returns The item.\n */\nexport function AccordionItem ({ className, ...props }: ComponentProps<typeof AccordionPrimitive.Item>) {\n return <AccordionPrimitive.Item data-slot='accordion-item' className={cn('border-b', className)} {...props} />\n}\n\n/**\n * The question: a full-width button with a plus that turns into a minus as the answer opens.\n *\n * @param props - Radix Accordion trigger props.\n * @returns The heading and its button.\n */\nexport function AccordionTrigger ({ className, children, ...props }: ComponentProps<typeof AccordionPrimitive.Trigger>) {\n return (\n <AccordionPrimitive.Header className='m-0 flex'>\n <AccordionPrimitive.Trigger\n data-slot='accordion-trigger'\n className={cn('group flex flex-1 cursor-pointer items-center justify-between gap-4 py-3 text-start type-h4 outline-none transition-colors duration-150 hover:text-brand-text focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none', className)}\n {...props}\n >\n {children}\n {/* One plus: opening turns it a quarter turn while its upright bar folds flat, so it ends as a minus. */}\n <svg viewBox='0 0 16 16' aria-hidden='true' className='size-4 shrink-0 text-muted-foreground transition-transform duration-300 ease-emphasised group-data-[state=open]:rotate-180 motion-reduce:transition-none'>\n <rect x='3' y='7.25' width='10' height='1.5' rx='0.75' fill='currentColor' />\n <rect x='7.25' y='3' width='1.5' height='10' rx='0.75' fill='currentColor' className='origin-center transition-[scale] duration-300 ease-emphasised [transform-box:fill-box] group-data-[state=open]:scale-y-0 motion-reduce:transition-none' />\n </svg>\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n )\n}\n\n/**\n * The answer. It uncovers to its own height while it fades in, and covers again on close.\n *\n * @param props - Radix Accordion content props.\n * @returns The panel.\n */\nexport function AccordionContent ({ className, children, ...props }: ComponentProps<typeof AccordionPrimitive.Content>) {\n return (\n <AccordionPrimitive.Content\n data-slot='accordion-content'\n className='overflow-hidden text-sm text-muted-foreground data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down motion-reduce:animate-none'\n {...props}\n >\n <div className={cn('pb-3', className)}>{children}</div>\n </AccordionPrimitive.Content>\n )\n}\n","import type { ComponentProps } from 'react'\nimport { cn } from '../../class-names'\n\n/**\n * The shadcn/ui Card: card colours, a border, 14 px radius and the lowest elevation.\n *\n * @param props - Any `div` props.\n * @returns The card.\n */\nexport function Card ({ className, ...props }: ComponentProps<'div'>) {\n return <div data-slot='card' className={cn('flex flex-col overflow-hidden rounded-xl border bg-card text-card-foreground shadow-xs', className)} {...props} />\n}\n\n/**\n * The top of a {@link Card}: title, description and an optional action.\n *\n * @param props - Any `div` props.\n * @returns The header.\n */\nexport function CardHeader ({ className, ...props }: ComponentProps<'div'>) {\n return <div data-slot='card-header' className={cn('flex flex-col gap-1 px-5 pt-5', className)} {...props} />\n}\n\n/**\n * The title of a {@link Card}.\n *\n * @param props - Any `h3` props.\n * @returns The title.\n */\nexport function CardTitle ({ className, children, ...props }: ComponentProps<'h3'>) {\n return <h3 data-slot='card-title' className={cn('m-0 type-h4', className)} {...props}>{children}</h3>\n}\n\n/**\n * The description of a {@link Card}.\n *\n * @param props - Any `p` props.\n * @returns The description.\n */\nexport function CardDescription ({ className, ...props }: ComponentProps<'p'>) {\n return <p data-slot='card-description' className={cn('m-0 text-[13px] text-muted-foreground', className)} {...props} />\n}\n\n/**\n * The body of a {@link Card}.\n *\n * @param props - Any `div` props.\n * @returns The content.\n */\nexport function CardContent ({ className, ...props }: ComponentProps<'div'>) {\n return <div data-slot='card-content' className={cn('px-5 py-4', className)} {...props} />\n}\n\n/**\n * The foot of a {@link Card}: muted, with a top border, pinned to the bottom.\n *\n * @param props - Any `div` props.\n * @returns The footer.\n */\nexport function CardFooter ({ className, ...props }: ComponentProps<'div'>) {\n return <div data-slot='card-footer' className={cn('mt-auto flex items-center justify-between gap-3 border-t bg-muted px-5 py-3', className)} {...props} />\n}\n","import type { ComponentProps } from 'react'\nimport { cn } from '../../class-names'\n\n/**\n * The shadcn/ui Kbd: one key, in Fira Code, with a heavier bottom border.\n *\n * @param props - Any `kbd` props.\n * @returns The key.\n */\nexport function Kbd ({ className, ...props }: ComponentProps<'kbd'>) {\n return <kbd data-slot='kbd' className={cn('inline-flex h-5 min-w-5 items-center justify-center rounded-[5px] border border-b-2 bg-muted px-1.5 font-mono text-[11px] text-muted-foreground', className)} {...props} />\n}\n","import type { ComponentProps } from 'react'\nimport { Group, Panel, Separator } from 'react-resizable-panels'\nimport { cn } from '../../class-names'\n\n/**\n * The shadcn/ui Resizable group: panels the user can resize, for desktop sidebars and inspectors.\n *\n * @param props - react-resizable-panels Group props (`orientation`).\n * @returns The panel group.\n */\nexport function ResizablePanelGroup ({ className, ...props }: ComponentProps<typeof Group>) {\n return <Group data-slot='resizable-panel-group' className={cn('flex size-full', className)} {...props} />\n}\n\n/**\n * One panel of a {@link ResizablePanelGroup}.\n *\n * @param props - react-resizable-panels Panel props (`defaultSize`, `minSize`).\n * @returns The panel.\n */\nexport function ResizablePanel (props: ComponentProps<typeof Panel>) {\n return <Panel data-slot='resizable-panel' {...props} />\n}\n\n/**\n * The drag handle between two panels: a 1 px border line with a wider hit area.\n *\n * @param props - react-resizable-panels Separator props.\n * @returns The handle.\n */\nexport function ResizableHandle ({ className, ...props }: ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot='resizable-handle'\n className={cn(\n 'relative flex w-px shrink-0 items-center justify-center bg-border outline-none after:absolute after:inset-y-0 after:start-1/2 after:w-2 after:-translate-x-1/2',\n 'hover:bg-ring focus-visible:bg-ring aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full',\n className,\n )}\n {...props}\n />\n )\n}\n","import { ScrollArea as ScrollAreaPrimitive } from 'radix-ui'\nimport type { ComponentProps } from 'react'\nimport { cn } from '../../class-names'\n\n/**\n * The shadcn/ui ScrollArea: native scrolling with thin themed bars, for panels in apps and desktop.\n *\n * @param props - Radix ScrollArea root props.\n * @returns The scroll area.\n */\nexport function ScrollArea ({ className, children, ...props }: ComponentProps<typeof ScrollAreaPrimitive.Root>) {\n return (\n <ScrollAreaPrimitive.Root data-slot='scroll-area' className={cn('relative overflow-hidden', className)} {...props}>\n <ScrollAreaPrimitive.Viewport className='size-full rounded-[inherit] outline-none focus-visible:ring-2 focus-visible:ring-ring'>{children}</ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollBar orientation='horizontal' />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n )\n}\n\n/**\n * One bar of a {@link ScrollArea}.\n *\n * @param props - Radix ScrollArea scrollbar props.\n * @returns The bar.\n */\nexport function ScrollBar ({ className, orientation = 'vertical', ...props }: ComponentProps<typeof ScrollAreaPrimitive.Scrollbar>) {\n return (\n <ScrollAreaPrimitive.Scrollbar\n data-slot='scroll-area-scrollbar'\n orientation={orientation}\n className={cn('flex touch-none select-none p-px', orientation === 'vertical' ? 'h-full w-2' : 'h-2 flex-col', className)}\n {...props}\n >\n <ScrollAreaPrimitive.Thumb className='relative flex-1 rounded-full bg-input' />\n </ScrollAreaPrimitive.Scrollbar>\n )\n}\n","import { Separator as SeparatorPrimitive } from 'radix-ui'\nimport type { ComponentProps } from 'react'\nimport { cn } from '../../class-names'\n\n/**\n * The shadcn/ui Separator: a 1 px border-colour line. Decorative unless told otherwise.\n *\n * @param props - Radix Separator props (`orientation`, `decorative`).\n * @returns The line.\n */\nexport function Separator ({ className, orientation = 'horizontal', decorative = true, ...props }: ComponentProps<typeof SeparatorPrimitive.Root>) {\n return (\n <SeparatorPrimitive.Root\n data-slot='separator'\n orientation={orientation}\n decorative={decorative}\n className={cn('shrink-0 bg-border', orientation === 'horizontal' ? 'h-px w-full' : 'w-px self-stretch', className)}\n {...props}\n />\n )\n}\n","import type { ComponentProps } from 'react'\nimport { cn } from '../../class-names'\n\n/**\n * The shadcn/ui Table: 13 px, border rows, a muted hover. It scrolls sideways when narrow.\n *\n * @param props - Any `table` props.\n * @returns The table in a scroll container.\n */\nexport function Table ({ className, ...props }: ComponentProps<'table'>) {\n return (\n <div data-slot='table-container' className='relative w-full overflow-x-auto'>\n <table data-slot='table' className={cn('w-full caption-bottom border-collapse text-[13px]', className)} {...props} />\n </div>\n )\n}\n\n/**\n * The head of a {@link Table}.\n *\n * @param props - Any `thead` props.\n * @returns The head.\n */\nexport function TableHeader (props: ComponentProps<'thead'>) {\n return <thead data-slot='table-header' {...props} />\n}\n\n/**\n * The body of a {@link Table}.\n *\n * @param props - Any `tbody` props.\n * @returns The body.\n */\nexport function TableBody (props: ComponentProps<'tbody'>) {\n return <tbody data-slot='table-body' {...props} />\n}\n\n/**\n * A row. `data-state=\"selected\"` tints it.\n *\n * @param props - Any `tr` props.\n * @returns The row.\n */\nexport function TableRow ({ className, ...props }: ComponentProps<'tr'>) {\n return <tr data-slot='table-row' className={cn('border-b transition-colors hover:bg-muted/60 data-[state=selected]:bg-muted', className)} {...props} />\n}\n\n/**\n * A column heading.\n *\n * @param props - Any `th` props.\n * @returns The heading cell.\n */\nexport function TableHead ({ className, ...props }: ComponentProps<'th'>) {\n return <th data-slot='table-head' className={cn('h-9 whitespace-nowrap px-3 text-start align-middle font-medium text-muted-foreground', className)} {...props} />\n}\n\n/**\n * A data cell.\n *\n * @param props - Any `td` props.\n * @returns The cell.\n */\nexport function TableCell ({ className, ...props }: ComponentProps<'td'>) {\n return <td data-slot='table-cell' className={cn('px-3 py-[11px] align-middle', className)} {...props} />\n}\n\n/**\n * The caption, under the table.\n *\n * @param props - Any `caption` props.\n * @returns The caption.\n */\nexport function TableCaption ({ className, ...props }: ComponentProps<'caption'>) {\n return <caption data-slot='table-caption' className={cn('mt-3 text-xs text-muted-foreground', className)} {...props} />\n}\n","/**\n * The scrim under every modal (dialog, alert dialog, sheet, drawer, command palette): the page behind blurs 5 px,\n * drops to 50 % contrast and 30 % saturation, and turns lighter in light mode (brightness 130 %) or darker in dark\n * mode (70 %). It fades in and out.\n */\nexport const overlayClassName = [\n 'fixed inset-0 z-50 backdrop-blur-[5px] backdrop-contrast-[.5] backdrop-saturate-[.3] backdrop-brightness-[1.3] dark:backdrop-brightness-[.7]',\n 'data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out',\n].join(' ')\n\n/**\n * The motion of floating content (dialogs, popovers, tooltips, menus, selects): it grows from its anchor while it\n * fades in, and shrinks back while it fades out. Reduced motion keeps only the fade.\n */\nexport const floatingMotionClassName = [\n 'data-[state=open]:animate-zoom-in data-[state=delayed-open]:animate-zoom-in data-[state=instant-open]:animate-zoom-in data-[state=closed]:animate-zoom-out',\n 'motion-reduce:data-[state=open]:animate-fade-in motion-reduce:data-[state=delayed-open]:animate-fade-in motion-reduce:data-[state=instant-open]:animate-fade-in motion-reduce:data-[state=closed]:animate-fade-out',\n].join(' ')\n\n/** The slide of a sheet from each edge, with a fade for reduced motion. */\nexport const sheetMotionClassName = {\n start: 'data-[state=open]:animate-sheet-in-start data-[state=closed]:animate-sheet-out-start motion-reduce:data-[state=open]:animate-fade-in motion-reduce:data-[state=closed]:animate-fade-out',\n end: 'data-[state=open]:animate-sheet-in-end data-[state=closed]:animate-sheet-out-end motion-reduce:data-[state=open]:animate-fade-in motion-reduce:data-[state=closed]:animate-fade-out',\n top: 'data-[state=open]:animate-sheet-in-top data-[state=closed]:animate-sheet-out-top motion-reduce:data-[state=open]:animate-fade-in motion-reduce:data-[state=closed]:animate-fade-out',\n bottom: 'data-[state=open]:animate-sheet-in-bottom data-[state=closed]:animate-sheet-out-bottom motion-reduce:data-[state=open]:animate-fade-in motion-reduce:data-[state=closed]:animate-fade-out',\n} as const\n","import { AlertDialog as AlertDialogPrimitive } from 'radix-ui'\nimport type { ComponentProps } from 'react'\nimport { buttonVariants, type ButtonVariants } from '../button'\nimport { cn } from '../../class-names'\nimport { floatingMotionClassName, overlayClassName } from './overlay.recipe'\n\n/** The shadcn/ui AlertDialog root: a dialog that needs an answer, such as a delete confirmation. */\nexport const AlertDialog = AlertDialogPrimitive.Root\n\n/** The element that opens an {@link AlertDialog}. */\nexport const AlertDialogTrigger = AlertDialogPrimitive.Trigger\n\n/**\n * The centred panel of an {@link AlertDialog}. It has no close button: the user must pick an action.\n *\n * @param props - Radix AlertDialog content props.\n * @returns The panel in a portal.\n */\nexport function AlertDialogContent ({ className, ...props }: ComponentProps<typeof AlertDialogPrimitive.Content>) {\n return (\n <AlertDialogPrimitive.Portal>\n <AlertDialogPrimitive.Overlay className={overlayClassName} />\n <AlertDialogPrimitive.Content\n data-slot='alert-dialog-content'\n className={cn('fixed start-1/2 top-1/2 z-50 grid w-[calc(100%-2rem)] max-w-md -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl border bg-popover p-6 text-popover-foreground shadow-lg outline-none rtl:translate-x-1/2', floatingMotionClassName, className)}\n {...props}\n />\n </AlertDialogPrimitive.Portal>\n )\n}\n\n/**\n * The title of an {@link AlertDialog}.\n *\n * @param props - Radix AlertDialog title props.\n * @returns The title.\n */\nexport function AlertDialogTitle ({ className, ...props }: ComponentProps<typeof AlertDialogPrimitive.Title>) {\n return <AlertDialogPrimitive.Title data-slot='alert-dialog-title' className={cn('m-0 font-display text-lg font-bold leading-tight', className)} {...props} />\n}\n\n/**\n * The description of an {@link AlertDialog}: what happens and whether it can be undone.\n *\n * @param props - Radix AlertDialog description props.\n * @returns The description.\n */\nexport function AlertDialogDescription ({ className, ...props }: ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return <AlertDialogPrimitive.Description data-slot='alert-dialog-description' className={cn('m-0 text-sm text-muted-foreground', className)} {...props} />\n}\n\n/**\n * The confirming action. Pass `variant='destructive'` for a delete.\n *\n * @param props - A button variant and Radix AlertDialog action props.\n * @returns The action button.\n */\nexport function AlertDialogAction ({ className, variant = 'default', ...props }: ComponentProps<typeof AlertDialogPrimitive.Action> & Pick<ButtonVariants, 'variant'>) {\n return <AlertDialogPrimitive.Action data-slot='alert-dialog-action' className={cn(buttonVariants({ variant }), className)} {...props} />\n}\n\n/**\n * The cancelling action. It gets focus first, so Enter never confirms by accident.\n *\n * @param props - Radix AlertDialog cancel props.\n * @returns The cancel button.\n */\nexport function AlertDialogCancel ({ className, ...props }: ComponentProps<typeof AlertDialogPrimitive.Cancel>) {\n return <AlertDialogPrimitive.Cancel data-slot='alert-dialog-cancel' className={cn(buttonVariants({ variant: 'outline' }), className)} {...props} />\n}\n","import { X } from 'lucide-react'\nimport { Dialog as DialogPrimitive } from 'radix-ui'\nimport type { ComponentProps } from 'react'\nimport { cn } from '../../class-names'\nimport { floatingMotionClassName, overlayClassName } from './overlay.recipe'\n\n/** The shadcn/ui Dialog root (Radix). */\nexport const Dialog = DialogPrimitive.Root\n\n/** The element that opens a {@link Dialog}. */\nexport const DialogTrigger = DialogPrimitive.Trigger\n\n/** An element that closes a {@link Dialog}. */\nexport const DialogClose = DialogPrimitive.Close\n\n/** Props of {@link DialogContent}. */\nexport interface DialogContentProps extends ComponentProps<typeof DialogPrimitive.Content> {\n /** Shows the close button in the corner. Default true. */\n showClose?: boolean\n}\n\n/**\n * The centred panel of a {@link Dialog}: 14 px radius, large elevation, a close button.\n *\n * @param props - `showClose` and Radix Dialog content props.\n * @returns The dialog panel in a portal.\n */\nexport function DialogContent ({ className, children, showClose = true, ...props }: DialogContentProps) {\n return (\n <DialogPrimitive.Portal>\n <DialogPrimitive.Overlay className={overlayClassName} />\n <DialogPrimitive.Content\n data-slot='dialog-content'\n className={cn('fixed start-1/2 top-1/2 z-50 grid w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl border bg-popover p-6 text-popover-foreground shadow-lg outline-none rtl:translate-x-1/2', floatingMotionClassName, className)}\n {...props}\n >\n {children}\n {showClose && (\n <DialogPrimitive.Close className='absolute end-4 top-4 cursor-pointer rounded-sm text-muted-foreground outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring'>\n <X className='size-4' aria-hidden='true' />\n <span className='sr-only'>Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n )\n}\n\n/**\n * The title and description block of a dialog or sheet.\n *\n * @param props - Any `div` props.\n * @returns The header.\n */\nexport function DialogHeader ({ className, ...props }: ComponentProps<'div'>) {\n return <div data-slot='dialog-header' className={cn('flex flex-col gap-1.5 text-start', className)} {...props} />\n}\n\n/**\n * The actions of a dialog or sheet, at the end of the row.\n *\n * @param props - Any `div` props.\n * @returns The footer.\n */\nexport function DialogFooter ({ className, ...props }: ComponentProps<'div'>) {\n return <div data-slot='dialog-footer' className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)} {...props} />\n}\n\n/**\n * The title of a {@link Dialog}, in DM Sans.\n *\n * @param props - Radix Dialog title props.\n * @returns The title.\n */\nexport function DialogTitle ({ className, ...props }: ComponentProps<typeof DialogPrimitive.Title>) {\n return <DialogPrimitive.Title data-slot='dialog-title' className={cn('m-0 font-display text-lg font-bold leading-tight', className)} {...props} />\n}\n\n/**\n * The description of a {@link Dialog}.\n *\n * @param props - Radix Dialog description props.\n * @returns The description.\n */\nexport function DialogDescription ({ className, ...props }: ComponentProps<typeof DialogPrimitive.Description>) {\n return <DialogPrimitive.Description data-slot='dialog-description' className={cn('m-0 text-sm text-muted-foreground', className)} {...props} />\n}\n","import type { ComponentProps } from 'react'\nimport { Drawer as DrawerPrimitive } from 'vaul'\nimport { cn } from '../../class-names'\nimport { overlayClassName } from './overlay.recipe'\n\n/** The shadcn/ui Drawer root (vaul): a bottom sheet the user can drag down to close. */\nexport const Drawer = DrawerPrimitive.Root\n\n/** The element that opens a {@link Drawer}. */\nexport const DrawerTrigger = DrawerPrimitive.Trigger\n\n/** An element that closes a {@link Drawer}. */\nexport const DrawerClose = DrawerPrimitive.Close\n\n/**\n * The bottom sheet: a 24 px top radius and a grab handle.\n *\n * @param props - vaul content props.\n * @returns The sheet in a portal.\n */\nexport function DrawerContent ({ className, children, ...props }: ComponentProps<typeof DrawerPrimitive.Content>) {\n return (\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className={overlayClassName} />\n <DrawerPrimitive.Content\n data-slot='drawer-content'\n className={cn('fixed inset-x-0 bottom-0 z-50 flex max-h-[85vh] flex-col gap-3.5 rounded-t-3xl border-t bg-popover px-5 pt-2.5 pb-8 text-popover-foreground outline-none', className)}\n {...props}\n >\n <div aria-hidden='true' className='mx-auto h-[5px] w-10 shrink-0 rounded-full bg-input' />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n )\n}\n\n/**\n * The title of a {@link Drawer}.\n *\n * @param props - vaul title props.\n * @returns The title.\n */\nexport function DrawerTitle ({ className, ...props }: ComponentProps<typeof DrawerPrimitive.Title>) {\n return <DrawerPrimitive.Title data-slot='drawer-title' className={cn('m-0 text-xl font-semibold leading-tight', className)} {...props} />\n}\n\n/**\n * The description of a {@link Drawer}.\n *\n * @param props - vaul description props.\n * @returns The description.\n */\nexport function DrawerDescription ({ className, ...props }: ComponentProps<typeof DrawerPrimitive.Description>) {\n return <DrawerPrimitive.Description data-slot='drawer-description' className={cn('m-0 text-sm text-muted-foreground', className)} {...props} />\n}\n","import { Popover as PopoverPrimitive } from 'radix-ui'\nimport type { ComponentProps } from 'react'\nimport { cn } from '../../class-names'\nimport { floatingMotionClassName } from './overlay.recipe'\n\n/** The shadcn/ui Popover root (Radix). */\nexport const Popover = PopoverPrimitive.Root\n\n/** The element that opens a {@link Popover}. */\nexport const PopoverTrigger = PopoverPrimitive.Trigger\n\n/** An element the popover places itself against, in place of the trigger. */\nexport const PopoverAnchor = PopoverPrimitive.Anchor\n\n/**\n * The floating panel of a {@link Popover}: medium elevation, 10 px radius.\n *\n * @param props - Radix Popover content props.\n * @returns The panel in a portal.\n */\nexport function PopoverContent ({ className, align = 'center', sideOffset = 6, ...props }: ComponentProps<typeof PopoverPrimitive.Content>) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot='popover-content'\n align={align}\n sideOffset={sideOffset}\n className={cn('z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg border bg-popover p-4 text-popover-foreground shadow-md outline-none', floatingMotionClassName, className)}\n {...props}\n />\n </PopoverPrimitive.Portal>\n )\n}\n","import { X } from 'lucide-react'\nimport { Dialog as SheetPrimitive } from 'radix-ui'\nimport type { ComponentProps } from 'react'\nimport { cn } from '../../class-names'\nimport { overlayClassName, sheetMotionClassName } from './overlay.recipe'\n\n/** The shadcn/ui Sheet root: a dialog that slides in from an edge. */\nexport const Sheet = SheetPrimitive.Root\n\n/** The element that opens a {@link Sheet}. */\nexport const SheetTrigger = SheetPrimitive.Trigger\n\n/** An element that closes a {@link Sheet}. */\nexport const SheetClose = SheetPrimitive.Close\n\n/** The title of a {@link Sheet}. */\nexport const SheetTitle = SheetPrimitive.Title\n\n/** The description of a {@link Sheet}. */\nexport const SheetDescription = SheetPrimitive.Description\n\nconst sideClassName = {\n start: 'inset-y-0 start-0 h-full w-3/4 max-w-sm border-e',\n end: 'inset-y-0 end-0 h-full w-3/4 max-w-sm border-s',\n top: 'inset-x-0 top-0 border-b',\n bottom: 'inset-x-0 bottom-0 border-t',\n} as const\n\n/** Props of {@link SheetContent}. */\nexport interface SheetContentProps extends ComponentProps<typeof SheetPrimitive.Content> {\n /** The edge the sheet comes from. Default `end`. */\n side?: keyof typeof sideClassName\n}\n\n/**\n * The panel of a {@link Sheet}, against one edge, with a close button.\n *\n * @param props - `side` and Radix Dialog content props.\n * @returns The panel in a portal.\n */\nexport function SheetContent ({ className, children, side = 'end', ...props }: SheetContentProps) {\n return (\n <SheetPrimitive.Portal>\n <SheetPrimitive.Overlay className={overlayClassName} />\n <SheetPrimitive.Content\n data-slot='sheet-content'\n className={cn('fixed z-50 flex flex-col gap-4 bg-popover p-6 text-popover-foreground shadow-lg outline-none', sideClassName[side], sheetMotionClassName[side], className)}\n {...props}\n >\n {children}\n <SheetPrimitive.Close className='absolute end-4 top-4 cursor-pointer rounded-sm text-muted-foreground outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring'>\n <X className='size-4' aria-hidden='true' />\n <span className='sr-only'>Close</span>\n </SheetPrimitive.Close>\n </SheetPrimitive.Content>\n </SheetPrimitive.Portal>\n )\n}\n","import { Tooltip as TooltipPrimitive } from 'radix-ui'\nimport type { ComponentProps } from 'react'\nimport { cn } from '../../class-names'\nimport { floatingMotionClassName } from './overlay.recipe'\n\n/** Shares the tooltip delay across the app. Put one near the root. */\nexport const TooltipProvider = TooltipPrimitive.Provider\n\n/**\n * The shadcn/ui Tooltip root. It brings its own provider, so it also works alone.\n *\n * @param props - Radix Tooltip root props.\n * @returns The tooltip.\n */\nexport function Tooltip (props: ComponentProps<typeof TooltipPrimitive.Root>) {\n return (\n <TooltipPrimitive.Provider delayDuration={300}>\n <TooltipPrimitive.Root data-slot='tooltip' {...props} />\n </TooltipPrimitive.Provider>\n )\n}\n\n/** The element that shows a {@link Tooltip} on hover and focus. */\nexport const TooltipTrigger = TooltipPrimitive.Trigger\n\n/**\n * The tip: inverted colours, 12 px text.\n *\n * @param props - Radix Tooltip content props.\n * @returns The tip in a portal.\n */\nexport function TooltipContent ({ className, sideOffset = 6, ...props }: ComponentProps<typeof TooltipPrimitive.Content>) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n data-slot='tooltip-content'\n sideOffset={sideOffset}\n className={cn('z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-sm bg-foreground px-2.5 py-1.5 text-xs text-background', floatingMotionClassName, className)}\n {...props}\n />\n </TooltipPrimitive.Portal>\n )\n}\n","/** The panel of a drop-down or context menu: popover colours, medium elevation, 4 px inset; it zooms in from its anchor. */\nexport const menuContentClassName = [\n 'z-50 min-w-48 overflow-hidden rounded-lg border bg-popover p-1 text-popover-foreground shadow-md',\n 'data-[state=open]:animate-zoom-in data-[state=closed]:animate-zoom-out motion-reduce:data-[state=open]:animate-fade-in motion-reduce:data-[state=closed]:animate-fade-out',\n].join(' ')\n\n/**\n * One row of a menu: 13.5 px text, a muted 16 px icon, the accent colour on focus. `data-variant=destructive`\n * turns the row and its icon red.\n */\nexport const menuItemClassName = [\n 'relative flex cursor-default select-none items-center gap-2.5 rounded-sm px-2.5 py-[7px] text-[13.5px] outline-none transition-colors duration-150 motion-reduce:transition-none',\n 'focus:bg-accent data-disabled:pointer-events-none data-disabled:opacity-50',\n '[&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-muted-foreground',\n 'data-[variant=destructive]:text-destructive data-[variant=destructive]:[&_svg]:text-destructive',\n].join(' ')\n\n/** The keyboard shortcut at the end of a menu row. */\nexport const menuShortcutClassName = 'ms-auto text-xs tracking-wide text-muted-foreground'\n\n/** The line between groups of menu rows. */\nexport const menuSeparatorClassName = '-mx-1 my-1 h-px bg-border'\n\n/** The heading of a group of menu rows. */\nexport const menuLabelClassName = 'px-2.5 py-1.5 text-xs font-medium text-muted-foreground'\n","import { Command as CommandPrimitive } from 'cmdk'\nimport { Search } from 'lucide-react'\nimport { Dialog as DialogPrimitive } from 'radix-ui'\nimport type { ComponentProps, ReactNode } from 'react'\nimport { cn } from '../../class-names'\nimport { floatingMotionClassName, overlayClassName } from '../overlay'\nimport { menuItemClassName, menuSeparatorClassName, menuShortcutClassName } from './menu.recipe'\n\n/**\n * The shadcn/ui Command (cmdk): a filterable list of actions.\n *\n * @param props - cmdk root props.\n * @returns The command list.\n */\nexport function Command ({ className, ...props }: ComponentProps<typeof CommandPrimitive>) {\n return <CommandPrimitive data-slot='command' className={cn('flex size-full flex-col overflow-hidden rounded-lg bg-popover text-popover-foreground', className)} {...props} />\n}\n\n/** Props of {@link CommandDialog}. */\nexport interface CommandDialogProps extends ComponentProps<typeof DialogPrimitive.Root> {\n /** The accessible name of the palette. */\n title?: string\n children?: ReactNode\n}\n\n/**\n * The command palette: a {@link Command} in a dialog, opened with ⌘K or Ctrl K by the app.\n *\n * @param props - `title`, the dialog's open state, and the command content.\n * @returns The palette.\n */\nexport function CommandDialog ({ title = 'Search', children, ...props }: CommandDialogProps) {\n return (\n <DialogPrimitive.Root {...props}>\n <DialogPrimitive.Portal>\n <DialogPrimitive.Overlay className={overlayClassName} />\n <DialogPrimitive.Content className={cn('fixed start-1/2 top-[18%] z-50 w-[calc(100%-2rem)] max-w-xl -translate-x-1/2 overflow-hidden rounded-xl border bg-popover shadow-lg outline-none rtl:translate-x-1/2', floatingMotionClassName)}>\n <DialogPrimitive.Title className='sr-only'>{title}</DialogPrimitive.Title>\n <DialogPrimitive.Description className='sr-only'>Type to filter the commands.</DialogPrimitive.Description>\n <Command>{children}</Command>\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n </DialogPrimitive.Root>\n )\n}\n\n/**\n * The search field of a {@link Command}.\n *\n * @param props - cmdk input props.\n * @returns The field with a search icon.\n */\nexport function CommandInput ({ className, ...props }: ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div data-slot='command-input-wrapper' className='flex h-11 items-center gap-2 border-b px-3'>\n <Search className='size-4 shrink-0 text-muted-foreground' aria-hidden='true' />\n <CommandPrimitive.Input data-slot='command-input' className={cn('h-full w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground', className)} {...props} />\n </div>\n )\n}\n\n/**\n * The scrolling list of results.\n *\n * @param props - cmdk list props.\n * @returns The list.\n */\nexport function CommandList ({ className, ...props }: ComponentProps<typeof CommandPrimitive.List>) {\n return <CommandPrimitive.List data-slot='command-list' className={cn('max-h-80 overflow-y-auto p-1', className)} {...props} />\n}\n\n/**\n * Shown when no result matches.\n *\n * @param props - cmdk empty props.\n * @returns The empty message.\n */\nexport function CommandEmpty ({ className, ...props }: ComponentProps<typeof CommandPrimitive.Empty>) {\n return <CommandPrimitive.Empty data-slot='command-empty' className={cn('py-6 text-center text-sm text-muted-foreground', className)} {...props} />\n}\n\n/**\n * A titled group of results.\n *\n * @param props - cmdk group props.\n * @returns The group.\n */\nexport function CommandGroup ({ className, ...props }: ComponentProps<typeof CommandPrimitive.Group>) {\n return <CommandPrimitive.Group data-slot='command-group' className={cn('[&_[cmdk-group-heading]]:px-2.5 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground', className)} {...props} />\n}\n\n/**\n * One result.\n *\n * @param props - cmdk item props.\n * @returns The result row.\n */\nexport function CommandItem ({ className, ...props }: ComponentProps<typeof CommandPrimitive.Item>) {\n return <CommandPrimitive.Item data-slot='command-item' className={cn(menuItemClassName, 'data-[selected=true]:bg-accent', className)} {...props} />\n}\n\n/**\n * A line between groups.\n *\n * @param props - cmdk separator props.\n * @returns The separator.\n */\nexport function CommandSeparator ({ className, ...props }: ComponentProps<typeof CommandPrimitive.Separator>) {\n return <CommandPrimitive.Separator data-slot='command-separator' className={cn(menuSeparatorClassName, className)} {...props} />\n}\n\n/**\n * The keyboard shortcut of a result.\n *\n * @param props - Any `span` props.\n * @returns The shortcut text.\n */\nexport function CommandShortcut ({ className, ...props }: ComponentProps<'span'>) {\n return <span data-slot='command-shortcut' className={cn(menuShortcutClassName, className)} {...props} />\n}\n","import { ContextMenu as ContextMenuPrimitive } from 'radix-ui'\nimport type { ComponentProps } from 'react'\nimport { cn } from '../../class-names'\nimport { menuContentClassName, menuItemClassName, menuSeparatorClassName, menuShortcutClassName } from './menu.recipe'\n\n/** The shadcn/ui ContextMenu root: the right-click menu of apps and desktop. */\nexport const ContextMenu = ContextMenuPrimitive.Root\n\n/** The area that opens the {@link ContextMenu} on right-click or long press. */\nexport const ContextMenuTrigger = ContextMenuPrimitive.Trigger\n\n/**\n * The menu panel, in a portal.\n *\n * @param props - Radix ContextMenu content props.\n * @returns The panel.\n */\nexport function ContextMenuContent ({ className, ...props }: ComponentProps<typeof ContextMenuPrimitive.Content>) {\n return (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content data-slot='context-menu-content' className={cn(menuContentClassName, 'origin-(--radix-context-menu-content-transform-origin)', className)} {...props} />\n </ContextMenuPrimitive.Portal>\n )\n}\n\n/** Props of {@link ContextMenuItem}. */\nexport interface ContextMenuItemProps extends ComponentProps<typeof ContextMenuPrimitive.Item> {\n /** `destructive` for delete and other actions that lose data. */\n variant?: 'default' | 'destructive'\n}\n\n/**\n * One command row.\n *\n * @param props - `variant` and Radix ContextMenu item props.\n * @returns The row.\n */\nexport function ContextMenuItem ({ className, variant = 'default', ...props }: ContextMenuItemProps) {\n return <ContextMenuPrimitive.Item data-slot='context-menu-item' data-variant={variant} className={cn(menuItemClassName, className)} {...props} />\n}\n\n/**\n * A line between groups of rows.\n *\n * @param props - Radix ContextMenu separator props.\n * @returns The separator.\n */\nexport function ContextMenuSeparator ({ className, ...props }: ComponentProps<typeof ContextMenuPrimitive.Separator>) {\n return <ContextMenuPrimitive.Separator data-slot='context-menu-separator' className={cn(menuSeparatorClassName, className)} {...props} />\n}\n\n/**\n * The keyboard shortcut of a row.\n *\n * @param props - Any `span` props.\n * @returns The shortcut text.\n */\nexport function ContextMenuShortcut ({ className, ...props }: ComponentProps<'span'>) {\n return <span data-slot='context-menu-shortcut' className={cn(menuShortcutClassName, className)} {...props} />\n}\n","import { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui'\nimport type { ComponentProps } from 'react'\nimport { cn } from '../../class-names'\nimport { menuContentClassName, menuItemClassName, menuLabelClassName, menuSeparatorClassName, menuShortcutClassName } from './menu.recipe'\n\n/** The shadcn/ui DropdownMenu root (Radix). */\nexport const DropdownMenu = DropdownMenuPrimitive.Root\n\n/** The element that opens a {@link DropdownMenu}. */\nexport const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger\n\n/** A group of rows. */\nexport const DropdownMenuGroup = DropdownMenuPrimitive.Group\n\n/** A group of rows where one is chosen. */\nexport const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup\n\n/**\n * The menu panel, in a portal.\n *\n * @param props - Radix DropdownMenu content props.\n * @returns The panel.\n */\nexport function DropdownMenuContent ({ className, sideOffset = 6, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content data-slot='dropdown-menu-content' sideOffset={sideOffset} className={cn(menuContentClassName, 'origin-(--radix-dropdown-menu-content-transform-origin)', className)} {...props} />\n </DropdownMenuPrimitive.Portal>\n )\n}\n\n/** Props of {@link DropdownMenuItem}. */\nexport interface DropdownMenuItemProps extends ComponentProps<typeof DropdownMenuPrimitive.Item> {\n /** `destructive` for delete and other actions that lose data. */\n variant?: 'default' | 'destructive'\n}\n\n/**\n * One command row.\n *\n * @param props - `variant` and Radix DropdownMenu item props.\n * @returns The row.\n */\nexport function DropdownMenuItem ({ className, variant = 'default', ...props }: DropdownMenuItemProps) {\n return <DropdownMenuPrimitive.Item data-slot='dropdown-menu-item' data-variant={variant} className={cn(menuItemClassName, className)} {...props} />\n}\n\n/**\n * A row that picks one value of a {@link DropdownMenuRadioGroup}.\n *\n * @param props - Radix DropdownMenu radio item props.\n * @returns The row, with a dot when chosen.\n */\nexport function DropdownMenuRadioItem ({ className, children, ...props }: ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem data-slot='dropdown-menu-radio-item' className={cn(menuItemClassName, 'ps-7', className)} {...props}>\n <span className='absolute start-2.5 flex size-2 items-center justify-center'>\n <DropdownMenuPrimitive.ItemIndicator><span className='block size-2 rounded-full bg-brand' /></DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n )\n}\n\n/**\n * The heading of a group of rows.\n *\n * @param props - Radix DropdownMenu label props.\n * @returns The heading.\n */\nexport function DropdownMenuLabel ({ className, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Label>) {\n return <DropdownMenuPrimitive.Label data-slot='dropdown-menu-label' className={cn(menuLabelClassName, className)} {...props} />\n}\n\n/**\n * A line between groups of rows.\n *\n * @param props - Radix DropdownMenu separator props.\n * @returns The separator.\n */\nexport function DropdownMenuSeparator ({ className, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return <DropdownMenuPrimitive.Separator data-slot='dropdown-menu-separator' className={cn(menuSeparatorClassName, className)} {...props} />\n}\n\n/**\n * The keyboard shortcut of a row.\n *\n * @param props - Any `span` props.\n * @returns The shortcut text.\n */\nexport function DropdownMenuShortcut ({ className, ...props }: ComponentProps<'span'>) {\n return <span data-slot='dropdown-menu-shortcut' className={cn(menuShortcutClassName, className)} {...props} />\n}\n","import { Slot } from 'radix-ui'\nimport type { ComponentProps } from 'react'\nimport { cn } from '../../class-names'\n\n/**\n * The shadcn/ui Breadcrumb landmark.\n *\n * @param props - Any `nav` props.\n * @returns The breadcrumb navigation.\n */\nexport function Breadcrumb ({ 'aria-label': label = 'Breadcrumb', ...props }: ComponentProps<'nav'>) {\n return <nav data-slot='breadcrumb' aria-label={label} {...props} />\n}\n\n/**\n * The ordered list of a {@link Breadcrumb}.\n *\n * @param props - Any `ol` props.\n * @returns The list.\n */\nexport function BreadcrumbList ({ className, ...props }: ComponentProps<'ol'>) {\n return <ol data-slot='breadcrumb-list' className={cn('m-0 flex list-none flex-wrap items-center gap-2 p-0 text-[13px] text-muted-foreground', className)} {...props} />\n}\n\n/**\n * One step of a {@link BreadcrumbList}.\n *\n * @param props - Any `li` props.\n * @returns The step.\n */\nexport function BreadcrumbItem ({ className, ...props }: ComponentProps<'li'>) {\n return <li data-slot='breadcrumb-item' className={cn('inline-flex items-center gap-2', className)} {...props} />\n}\n\n/**\n * A link to an earlier step.\n *\n * @param props - `asChild` for a router link, and any `a` props.\n * @returns The link.\n */\nexport function BreadcrumbLink ({ asChild = false, className, ...props }: ComponentProps<'a'> & { asChild?: boolean }) {\n const Component = asChild ? Slot.Root : 'a'\n\n return <Component data-slot='breadcrumb-link' className={cn('text-inherit no-underline transition-colors hover:text-foreground', className)} {...props} />\n}\n\n/**\n * The current step. It is not a link.\n *\n * @param props - Any `span` props.\n * @returns The current page.\n */\nexport function BreadcrumbPage ({ className, ...props }: ComponentProps<'span'>) {\n return <span data-slot='breadcrumb-page' aria-current='page' className={cn('font-medium text-foreground', className)} {...props} />\n}\n\n/**\n * The slash between steps. It is decorative.\n *\n * @param props - Any `li` props.\n * @returns The separator.\n */\nexport function BreadcrumbSeparator ({ children = '/', ...props }: ComponentProps<'li'>) {\n return <li data-slot='breadcrumb-separator' role='presentation' aria-hidden='true' {...props}>{children}</li>\n}\n","import type { ComponentProps } from 'react'\nimport { cn } from '../../class-names'\n\n/** Props of {@link MenuIcon}. */\nexport interface MenuIconProps extends ComponentProps<'svg'> {\n /**\n * `true` twirls the hamburger into an X, `false` twirls it back. Leave it out for a still hamburger, so a page\n * does not play the closing motion when it loads.\n */\n open?: boolean\n}\n\nconst line = 'origin-center [transform-box:fill-box] motion-reduce:[animation-duration:1ms]'\n\n/**\n * The menu toggle icon. Opening, the outer lines fall to the centre and twirl a half turn past each other into an\n * X, while the middle line shrinks to a dot and pops away. Closing plays it back the other way. With reduced motion\n * the icon changes at once.\n *\n * @param props - `open` and any `svg` props; it is decorative, so label the button around it.\n * @returns The icon.\n */\nexport function MenuIcon ({ open, className, ...props }: MenuIconProps) {\n const state = open === undefined ? undefined : (open ? 'open' : 'closed')\n\n return (\n <svg data-slot='menu-icon' data-state={state} viewBox='0 0 24 24' fill='currentColor' aria-hidden='true' className={cn('group/menu-icon size-5', className)} {...props}>\n <rect x='4' y='6' width='16' height='2' rx='1' className={cn(line, 'group-data-[state=open]/menu-icon:animate-menu-line-top-open group-data-[state=closed]/menu-icon:animate-menu-line-top-close')} />\n <rect x='4' y='11' width='16' height='2' rx='1' className={cn(line, 'group-data-[state=open]/menu-icon:animate-menu-line-middle-open group-data-[state=closed]/menu-icon:animate-menu-line-middle-close')} />\n <rect x='4' y='16' width='16' height='2' rx='1' className={cn(line, 'group-data-[state=open]/menu-icon:animate-menu-line-bottom-open group-data-[state=closed]/menu-icon:animate-menu-line-bottom-close')} />\n </svg>\n )\n}\n","import { Menubar as MenubarPrimitive } from 'radix-ui'\nimport type { ComponentProps } from 'react'\nimport { cn } from '../../class-names'\n\n/**\n * The shadcn/ui Menubar: the File, Edit, View menus of a desktop app.\n *\n * @param props - Radix Menubar root props.\n * @returns The menubar.\n */\nexport function Menubar ({ className, ...props }: ComponentProps<typeof MenubarPrimitive.Root>) {\n return <MenubarPrimitive.Root data-slot='menubar' className={cn('flex items-center gap-0.5', className)} {...props} />\n}\n\n/** One menu of a {@link Menubar}. */\nexport const MenubarMenu = MenubarPrimitive.Menu\n\n/**\n * The name of a menu, such as File.\n *\n * @param props - Radix Menubar trigger props.\n * @returns The trigger.\n */\nexport function MenubarTrigger ({ className, ...props }: ComponentProps<typeof MenubarPrimitive.Trigger>) {\n return (\n <MenubarPrimitive.Trigger\n data-slot='menubar-trigger'\n className={cn('flex h-[26px] cursor-default select-none items-center rounded-sm px-2 text-[13px] outline-none hover:bg-accent focus:bg-accent data-[state=open]:bg-accent', className)}\n {...props}\n />\n )\n}\n\n/**\n * The items of a menu, in a portal.\n *\n * @param props - Radix Menubar content props.\n * @returns The menu panel.\n */\nexport function MenubarContent ({ className, align = 'start', sideOffset = 6, ...props }: ComponentProps<typeof MenubarPrimitive.Content>) {\n return (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.Content\n data-slot='menubar-content'\n align={align}\n sideOffset={sideOffset}\n className={cn('z-50 min-w-48 origin-(--radix-menubar-content-transform-origin) rounded-lg border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-zoom-in data-[state=closed]:animate-zoom-out motion-reduce:data-[state=open]:animate-fade-in motion-reduce:data-[state=closed]:animate-fade-out', className)}\n {...props}\n />\n </MenubarPrimitive.Portal>\n )\n}\n\n/**\n * One command of a menu.\n *\n * @param props - Radix Menubar item props.\n * @returns The item.\n */\nexport function MenubarItem ({ className, ...props }: ComponentProps<typeof MenubarPrimitive.Item>) {\n return (\n <MenubarPrimitive.Item\n data-slot='menubar-item'\n className={cn('relative flex cursor-default select-none items-center gap-2.5 rounded-sm px-2.5 py-1.5 text-[13px] outline-none focus:bg-accent data-disabled:pointer-events-none data-disabled:opacity-50', className)}\n {...props}\n />\n )\n}\n\n/**\n * The keyboard shortcut of a {@link MenubarItem}, at the end of the row.\n *\n * @param props - Any `span` props.\n * @returns The shortcut text.\n */\nexport function MenubarShortcut ({ className, ...props }: ComponentProps<'span'>) {\n return <span data-slot='menubar-shortcut' className={cn('ms-auto text-xs text-muted-foreground', className)} {...props} />\n}\n\n/**\n * A line between groups of items.\n *\n * @param props - Radix Menubar separator props.\n * @returns The separator.\n */\nexport function MenubarSeparator ({ className, ...props }: ComponentProps<typeof MenubarPrimitive.Separator>) {\n return <MenubarPrimitive.Separator data-slot='menubar-separator' className={cn('-mx-1 my-1 h-px bg-border', className)} {...props} />\n}\n","import { ChevronDown } from 'lucide-react'\nimport { NavigationMenu as NavigationMenuPrimitive } from 'radix-ui'\nimport type { ComponentProps } from 'react'\nimport { cn } from '../../class-names'\n\n/**\n * The shadcn/ui NavigationMenu: the main navigation of a website, with drop-down panels.\n *\n * @param props - Radix NavigationMenu root props.\n * @returns The navigation menu.\n */\nexport function NavigationMenu ({ className, children, ...props }: ComponentProps<typeof NavigationMenuPrimitive.Root>) {\n return (\n <NavigationMenuPrimitive.Root data-slot='navigation-menu' className={cn('relative flex items-center', className)} {...props}>\n {children}\n <div className='absolute start-0 top-full flex justify-center'>\n <NavigationMenuPrimitive.Viewport className='relative mt-2 h-(--radix-navigation-menu-viewport-height) w-full origin-top overflow-hidden rounded-xl border bg-popover text-popover-foreground transition-[width,height] duration-200 motion-reduce:transition-none shadow-lg md:w-(--radix-navigation-menu-viewport-width)' />\n </div>\n </NavigationMenuPrimitive.Root>\n )\n}\n\n/**\n * The list of a {@link NavigationMenu}.\n *\n * @param props - Radix NavigationMenu list props.\n * @returns The list.\n */\nexport function NavigationMenuList ({ className, ...props }: ComponentProps<typeof NavigationMenuPrimitive.List>) {\n return <NavigationMenuPrimitive.List data-slot='navigation-menu-list' className={cn('m-0 flex list-none items-center gap-1 p-0', className)} {...props} />\n}\n\n/** One entry of a {@link NavigationMenuList}. */\nexport const NavigationMenuItem = NavigationMenuPrimitive.Item\n\nconst triggerClassName = 'inline-flex h-[calc(var(--control-h)-6px)] cursor-pointer items-center gap-1 rounded-md bg-transparent px-3 text-[15px] font-medium text-foreground no-underline outline-none transition-colors duration-150 motion-reduce:transition-none hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring data-[state=open]:bg-accent'\n\n/**\n * A top-level entry that opens a panel.\n *\n * @param props - Radix NavigationMenu trigger props.\n * @returns The trigger.\n */\nexport function NavigationMenuTrigger ({ className, children, ...props }: ComponentProps<typeof NavigationMenuPrimitive.Trigger>) {\n return (\n <NavigationMenuPrimitive.Trigger data-slot='navigation-menu-trigger' className={cn(triggerClassName, 'group', className)} {...props}>\n {children}\n <ChevronDown className='size-4 transition-transform duration-200 ease-emphasised group-data-[state=open]:rotate-180 motion-reduce:transition-none' aria-hidden='true' />\n </NavigationMenuPrimitive.Trigger>\n )\n}\n\n/**\n * The panel a {@link NavigationMenuTrigger} opens.\n *\n * @param props - Radix NavigationMenu content props.\n * @returns The panel.\n */\nexport function NavigationMenuContent ({ className, ...props }: ComponentProps<typeof NavigationMenuPrimitive.Content>) {\n return (\n <NavigationMenuPrimitive.Content\n data-slot='navigation-menu-content' className={cn(\n 'top-0 start-0 w-full origin-top p-2 md:absolute md:w-auto',\n // The panel's content zooms, not the viewport around it: a zoom on the viewport left the panel blank in Chromium.\n 'data-[state=open]:animate-zoom-in data-[state=closed]:animate-zoom-out motion-reduce:data-[state=open]:animate-fade-in motion-reduce:data-[state=closed]:animate-fade-out',\n className,\n )} {...props}\n />\n )\n}\n\n/**\n * A plain top-level link.\n *\n * @param props - Radix NavigationMenu link props.\n * @returns The link.\n */\nexport function NavigationMenuLink ({ className, ...props }: ComponentProps<typeof NavigationMenuPrimitive.Link>) {\n return <NavigationMenuPrimitive.Link data-slot='navigation-menu-link' className={cn(triggerClassName, className)} {...props} />\n}\n","import { buttonVariants } from '../button'\nimport { cn } from '../../class-names'\n\n/** Props of {@link Pagination}. */\nexport interface PaginationProps {\n /** The current page, from 1. */\n page: number\n /** The number of pages. */\n pageCount: number\n /** Called with the page to show. */\n onPageChange: (page: number) => void\n /** Page buttons to show around the current one. Default 3 in all. */\n window?: number\n className?: string\n}\n\n/**\n * Previous, numbered pages and next, as small buttons. The current page has the outline variant and\n * `aria-current`.\n *\n * @param props - Page, page count, change handler and window size.\n * @returns The pagination navigation.\n */\nexport function Pagination ({ page, pageCount, onPageChange, window = 3, className }: PaginationProps) {\n const first = Math.max(1, Math.min(page - Math.floor(window / 2), pageCount - window + 1))\n const pages = Array.from({ length: Math.min(window, pageCount) }, (_, index) => first + index)\n\n return (\n <nav data-slot='pagination' aria-label='Pagination' className={cn('flex items-center gap-1', className)}>\n <button type='button' className={buttonVariants({ variant: 'ghost', size: 'sm' })} disabled={page <= 1} onClick={() => onPageChange(page - 1)}>Previous</button>\n {pages.map((number) => (\n <button\n key={number}\n type='button'\n aria-current={number === page ? 'page' : undefined}\n aria-label={`Page ${number}`}\n className={buttonVariants({ variant: number === page ? 'outline' : 'ghost', size: 'icon-sm' })}\n onClick={() => onPageChange(number)}\n >\n {number}\n </button>\n ))}\n <button type='button' className={buttonVariants({ variant: 'ghost', size: 'sm' })} disabled={page >= pageCount} onClick={() => onPageChange(page + 1)}>Next</button>\n </nav>\n )\n}\n","import { Tabs as TabsPrimitive } from 'radix-ui'\nimport type { ComponentProps } from 'react'\nimport { activeIndicatorClassName, useActiveIndicator } from '../active-indicator'\nimport { cn } from '../../class-names'\n\n/**\n * The shadcn/ui Tabs root.\n *\n * @param props - Radix Tabs root props.\n * @returns The tabs.\n */\nexport function Tabs ({ className, ...props }: ComponentProps<typeof TabsPrimitive.Root>) {\n return <TabsPrimitive.Root data-slot='tabs' className={cn('flex flex-col gap-3', className)} {...props} />\n}\n\n/** Props of {@link TabsList}. */\nexport interface TabsListProps extends ComponentProps<typeof TabsPrimitive.List> {\n /**\n * `pill` switches views inside a panel. `underline` switches pages in a header, with a brand line under the\n * active tab.\n */\n variant?: 'pill' | 'underline'\n}\n\n/**\n * The row of {@link TabsTrigger}s. One indicator slides to the active tab and takes its size: the raised\n * background of the `pill` variant, or the brand line of the `underline` variant.\n *\n * @param props - `variant` and Radix Tabs list props.\n * @returns The tab list.\n */\nexport function TabsList ({ className, variant = 'pill', children, ...props }: TabsListProps) {\n const indicator = useActiveIndicator<HTMLDivElement>('[data-state=active]')\n\n return (\n <TabsPrimitive.List\n ref={indicator}\n data-slot='tabs-list'\n data-variant={variant}\n className={cn(\n 'group/tabs-list group/indicator relative inline-flex w-fit items-center',\n variant === 'pill' ? 'gap-0.5 rounded-md bg-muted p-[3px]' : 'w-full gap-5 border-b',\n className,\n )}\n {...props}\n >\n <span\n aria-hidden='true'\n data-slot='tabs-indicator'\n className={cn(activeIndicatorClassName, variant === 'pill' ? 'rounded-sm bg-background shadow-xs' : 'top-auto -bottom-px h-0.5 bg-brand')}\n />\n {children}\n </TabsPrimitive.List>\n )\n}\n\n/**\n * One tab. It reads the list's variant, so it has no variant of its own.\n *\n * @param props - Radix Tabs trigger props.\n * @returns The tab.\n */\nexport function TabsTrigger ({ className, ...props }: ComponentProps<typeof TabsPrimitive.Trigger>) {\n return (\n <TabsPrimitive.Trigger\n data-slot='tabs-trigger'\n className={cn(\n 'inline-flex cursor-pointer items-center justify-center gap-1.5 whitespace-nowrap font-medium text-muted-foreground outline-none',\n 'hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4',\n 'group-data-[variant=pill]/tabs-list:h-[calc(var(--control-h)-6px)] group-data-[variant=pill]/tabs-list:rounded-sm group-data-[variant=pill]/tabs-list:px-3 group-data-[variant=pill]/tabs-list:text-[13px]',\n 'relative transition-colors duration-150 data-[state=active]:text-foreground motion-reduce:transition-none',\n 'group-data-[variant=underline]/tabs-list:-mb-px group-data-[variant=underline]/tabs-list:border-b-2 group-data-[variant=underline]/tabs-list:border-transparent group-data-[variant=underline]/tabs-list:py-2.5 group-data-[variant=underline]/tabs-list:text-sm',\n\n className,\n )}\n {...props}\n />\n )\n}\n\n/**\n * The panel of one tab.\n *\n * @param props - Radix Tabs content props.\n * @returns The panel.\n */\nexport function TabsContent ({ className, ...props }: ComponentProps<typeof TabsPrimitive.Content>) {\n return <TabsPrimitive.Content data-slot='tabs-content' className={cn('flex-1 outline-none', className)} {...props} />\n}\n","import { Check } from 'lucide-react'\nimport type { ComponentProps, ReactNode } from 'react'\nimport { cn } from '../../class-names'\n\n/** One step of a {@link Stepper}. */\nexport interface StepperStep {\n /** The step's name, such as \"Models\". */\n title: string\n /** A line under the title, such as \"2 of 3 downloaded\". */\n description?: ReactNode\n}\n\n/** Props of {@link Stepper}. */\nexport interface StepperProps extends Omit<ComponentProps<'ol'>, 'children'> {\n /** The steps, in order. */\n steps: readonly StepperStep[]\n /** The index of the current step, from 0. Steps before it are done. A value past the last step marks all done. */\n current: number\n /** `horizontal` puts the steps in a row with lines between them (default); `vertical` stacks them. */\n orientation?: 'horizontal' | 'vertical'\n /** Called with the index of a done step that the user picks, to go back to it. Without it, the steps are text. */\n onStepSelect?: (index: number) => void\n}\n\ntype StepState = 'done' | 'current' | 'upcoming'\n\nconst markers: Record<StepState, string> = {\n done: 'bg-primary text-primary-foreground',\n current: 'border-2 border-primary text-brand-text',\n upcoming: 'bg-muted text-muted-foreground',\n}\n\n/**\n * The progress of a flow in steps, such as a first-run setup or a wizard. Done steps show a check, the current step\n * a ring and `aria-current=\"step\"`, and later steps a muted number. With `onStepSelect`, done steps are buttons that\n * go back. The lines between steps fill as the flow moves on.\n *\n * @param props - The steps, the current index, the orientation, the select handler and any `ol` props.\n * @returns The stepper.\n */\nexport function Stepper ({ steps, current, orientation = 'horizontal', onStepSelect, className, 'aria-label': label = 'Progress', ...props }: StepperProps) {\n const vertical = orientation === 'vertical'\n\n return (\n <ol\n data-slot='stepper'\n data-orientation={orientation}\n aria-label={label}\n className={cn('m-0 flex list-none p-0', vertical ? 'flex-col' : 'items-start', className)}\n {...props}\n >\n {steps.map((step, index) => {\n const state: StepState = index < current ? 'done' : (index === current ? 'current' : 'upcoming')\n const last = index === steps.length - 1\n const marker = (\n <span\n aria-hidden='true'\n className={cn('grid size-7 shrink-0 place-items-center rounded-full text-xs font-semibold transition-colors duration-200 motion-reduce:transition-none', markers[state])}\n >\n {state === 'done' ? <Check className='size-3.5' strokeWidth={2.5} /> : index + 1}\n </span>\n )\n const text = (\n <span className='flex min-w-0 flex-col'>\n <span className={cn('text-[13px] font-medium', state === 'upcoming' && 'text-muted-foreground')}>\n {step.title}\n {state === 'done' && <span className='sr-only'>, done</span>}\n </span>\n {step.description && <span className='text-xs text-muted-foreground'>{step.description}</span>}\n </span>\n )\n const head = onStepSelect && state === 'done'\n ? (\n <button\n type='button'\n onClick={() => onStepSelect(index)}\n className='flex cursor-pointer items-center gap-2 rounded-md text-start outline-none focus-visible:ring-2 focus-visible:ring-ring'\n >\n {marker}\n {text}\n </button>\n )\n : <span className='flex items-center gap-2'>{marker}{text}</span>\n\n return (\n <li\n key={step.title}\n data-state={state}\n aria-current={state === 'current' ? 'step' : undefined}\n className={cn('flex', vertical ? 'flex-col' : 'items-center gap-2', !last && !vertical && 'flex-1')}\n >\n {head}\n {!last && (\n <span\n aria-hidden='true'\n className={cn(\n 'shrink-0 bg-border transition-colors duration-200 motion-reduce:transition-none',\n vertical ? 'my-1 ms-[13px] h-5 w-0.5' : 'h-0.5 min-w-4 flex-1',\n state === 'done' && 'bg-primary',\n )}\n />\n )}\n </li>\n )\n })}\n </ol>\n )\n}\n","import { createContext, useContext } from 'react'\n\n/**\n * The two sidebars of the family. `panel` is the desktop app's tool panel (loomgic's plugins): foldable groups of\n * items with a colour bar and a meta line, collapsing to a rail with its name written down the side. `nav` is the\n * web platform's navigation (pargic's portal): sections of icon links, collapsing to its icons by narrowing, with\n * the labels fading in place so the icons never move.\n */\nexport type SidebarVariant = 'panel' | 'nav'\n\n/** What a {@link Sidebar} tells the parts inside it. */\nexport interface SidebarState {\n /** True when the sidebar shows only its icons. */\n collapsed: boolean\n /** Expands or collapses the sidebar. */\n setCollapsed: (collapsed: boolean) => void\n /** The sidebar's name, such as \"Plugins\" or \"Portal\". */\n label: string\n /** The edge the sidebar sits on. */\n side: 'start' | 'end'\n /** The kind of sidebar. */\n variant: SidebarVariant\n}\n\n/** The context a {@link Sidebar} provides. Null outside a sidebar. */\nexport const SidebarContext = createContext<SidebarState | null>(null)\n\n/**\n * Reads the state of the sidebar around a part.\n *\n * @returns The sidebar state.\n * @throws Error when the part is not inside a Sidebar.\n */\nexport function useSidebar (): SidebarState {\n const state = useContext(SidebarContext)\n if (!state) throw new Error('A sidebar part must be inside a Sidebar.')\n\n return state\n}\n","/**\n * A label beside an icon, after pargic's sidebar: while the sidebar narrows, the label slides 12 px to the right and\n * fades as the edge covers it; while it widens, it slides back. The icon never moves. In a SidebarSheet the labels\n * slide in the same way when the sheet opens.\n */\nexport const fadingLabelClassName = [\n 'min-w-0 truncate whitespace-nowrap transition-[translate,opacity] duration-150 ease-out motion-reduce:transition-none',\n 'group-data-[collapsed]/sidebar:translate-x-3 group-data-[collapsed]/sidebar:opacity-0',\n 'in-data-[slot=sidebar-sheet]:animate-sidebar-label-in motion-reduce:in-data-[slot=sidebar-sheet]:animate-none',\n].join(' ')\n\n/** A row of a `nav` sidebar: a 36 px link or button with a 16 px icon, the accent colours when current. */\nexport const navRowClassName = [\n 'flex h-9 w-full shrink-0 cursor-pointer items-center gap-3 rounded-md px-3 text-[13.5px] font-medium text-muted-foreground no-underline outline-none transition-colors duration-150 motion-reduce:transition-none',\n 'hover:bg-sidebar-accent hover:text-foreground focus-visible:ring-2 focus-visible:ring-sidebar-ring [&_svg]:size-4 [&_svg]:shrink-0',\n 'aria-[current]:bg-brand-soft aria-[current]:text-brand-text',\n].join(' ')\n","import { ChevronsLeft, ChevronsRight, PanelLeft, Search } from 'lucide-react'\nimport { type ComponentProps, type ReactNode, useState } from 'react'\nimport { Button } from '../button'\nimport { cn } from '../../class-names'\nimport { Input } from '../field'\nimport { Tooltip, TooltipContent, TooltipTrigger } from '../overlay'\nimport { SidebarContext, type SidebarVariant, useSidebar } from './sidebar-context.hook'\nimport { fadingLabelClassName, navRowClassName } from './sidebar.recipe'\n\n/** Props of {@link Sidebar}. */\nexport interface SidebarProps extends Omit<ComponentProps<'aside'>, 'aria-label'> {\n /** The sidebar's name, such as \"Plugins\". It labels the landmark, and the panel rail shows it down the side. */\n label: string\n /** `panel` for a desktop tool panel (default), `nav` for a web platform's navigation. */\n variant?: SidebarVariant\n /** The edge the sidebar sits on. Default `start`. */\n side?: 'start' | 'end'\n /** Controls the collapsed state. Leave it out for a sidebar that keeps its own. */\n collapsed?: boolean\n /** The first collapsed state of a sidebar that keeps its own. Default false. */\n defaultCollapsed?: boolean\n /** Called with the new collapsed state. */\n onCollapsedChange?: (collapsed: boolean) => void\n}\n\nconst widths: Record<SidebarVariant, { open: string, collapsed: string }> = {\n panel: { open: 'w-64 gap-2 px-1.5 py-2.5', collapsed: 'w-12 gap-2 px-1.5 pt-2.5 pb-24' },\n nav: { open: 'w-60 gap-4 px-2 py-3', collapsed: 'w-14 gap-4 px-2 py-3' },\n}\n\n/**\n * The family sidebar, in two variants built from the same parts. `panel` follows loomgic's plugin sidebar: search\n * and a collapse button on top, foldable groups of items with a colour bar, and a rail with the sidebar's name when\n * collapsed (put it in a ResizablePanel to let the user widen it). `nav` follows pargic's portal: the product at the\n * top, sections of icon links, and a foot with the account and the collapse button; it narrows to its icons while\n * the labels fade in place. On a phone, put either in a SidebarSheet.\n *\n * @param props - Label, variant, side, the collapsed state, and any `aside` props.\n * @returns The sidebar.\n */\nexport function Sidebar ({ label, variant = 'panel', side = 'start', collapsed, defaultCollapsed = false, onCollapsedChange, className, children, ...props }: SidebarProps) {\n const [ownCollapsed, setOwnCollapsed] = useState(defaultCollapsed)\n const isCollapsed = collapsed ?? ownCollapsed\n\n function setCollapsed (next: boolean): void {\n if (collapsed === undefined) setOwnCollapsed(next)\n onCollapsedChange?.(next)\n }\n\n return (\n <SidebarContext value={{ collapsed: isCollapsed, setCollapsed, label, side, variant }}>\n <aside\n data-slot='sidebar'\n data-variant={variant}\n data-collapsed={isCollapsed || undefined}\n aria-label={label}\n className={cn(\n 'group/sidebar flex h-full min-h-0 shrink-0 flex-col overflow-hidden bg-sidebar text-[13px] text-sidebar-foreground',\n side === 'start' ? 'border-e border-sidebar-border' : 'border-s border-sidebar-border',\n 'relative transition-[width] duration-150 ease-out motion-reduce:transition-none',\n isCollapsed ? widths[variant].collapsed : widths[variant].open,\n className,\n )}\n {...props}\n >\n {children}\n {variant === 'panel' && (\n <span\n aria-hidden='true'\n className='pointer-events-none absolute bottom-3 left-1/2 -translate-x-1/2 text-xs font-semibold tracking-[0.06em] text-muted-foreground uppercase opacity-0 transition-opacity duration-150 [writing-mode:vertical-rl] group-data-[collapsed]/sidebar:opacity-100 group-data-[collapsed]/sidebar:delay-100 motion-reduce:transition-none'\n >\n {label}\n </span>\n )}\n </aside>\n </SidebarContext>\n )\n}\n\n/**\n * Shows a tooltip with the name of a part while the sidebar is collapsed, when its label is hidden.\n *\n * @param props - The name and the part.\n * @returns The part, with a tooltip when collapsed.\n */\nexport function SidebarTooltip ({ label, children }: { label: string, children: ReactNode }) {\n const { collapsed, side } = useSidebar()\n if (!collapsed) return children\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>{children}</TooltipTrigger>\n <TooltipContent side={side === 'start' ? 'right' : 'left'}>{label}</TooltipContent>\n </Tooltip>\n )\n}\n\n/**\n * The button that collapses the sidebar and expands it again. In the `nav` variant it is a full row with a label.\n *\n * @param props - Any button props.\n * @returns The button.\n */\nexport function SidebarCollapseButton ({ className, ...props }: ComponentProps<'button'>) {\n const { collapsed, setCollapsed, label, side, variant } = useSidebar()\n const text = variant === 'nav' ? `${collapsed ? 'Expand' : 'Collapse'} sidebar` : `${collapsed ? 'Show' : 'Hide'} ${label.toLowerCase()}`\n if (variant === 'nav') {\n return (\n <SidebarTooltip label={text}>\n <button\n type='button'\n aria-label={text}\n aria-expanded={!collapsed}\n onClick={() => setCollapsed(!collapsed)}\n className={cn(navRowClassName, className)}\n {...props}\n >\n <PanelLeft aria-hidden='true' />\n <span aria-hidden='true' className={fadingLabelClassName}>Collapse</span>\n </button>\n </SidebarTooltip>\n )\n }\n\n const pointsLeft = (side === 'start') !== collapsed\n\n return (\n <Button\n variant='ghost'\n size='icon-sm'\n aria-label={text}\n aria-expanded={!collapsed}\n title={text}\n onClick={() => setCollapsed(!collapsed)}\n className={cn('shrink-0 text-muted-foreground', className)}\n {...props}\n >\n {pointsLeft ? <ChevronsLeft /> : <ChevronsRight />}\n </Button>\n )\n}\n\n/** Props of {@link SidebarHeader}. */\nexport interface SidebarHeaderProps {\n /** The search text. Leave out `onQueryChange` for a header without search. */\n query?: string\n /** Called with the new search text. */\n onQueryChange?: (query: string) => void\n /** The search field's accessible label and placeholder. Default \"Search\" and the sidebar's name. */\n searchLabel?: string\n /** Controls beside the search in the `panel` variant, or the brand in the `nav` variant. */\n children?: ReactNode\n className?: string\n}\n\n/**\n * The top of a {@link Sidebar}. In the `panel` variant: the search field and the collapse button; collapsed, only the\n * button stays. In the `nav` variant: its children, usually a SidebarBrand.\n *\n * @param props - The search state, its label, and extra controls.\n * @returns The header.\n */\nexport function SidebarHeader ({ query = '', onQueryChange, searchLabel, children, className }: SidebarHeaderProps) {\n const { collapsed, label, variant } = useSidebar()\n if (variant === 'nav') return <div data-slot='sidebar-header' className={cn('flex h-8 items-center', className)}>{children}</div>\n const searchText = searchLabel ?? `Search ${label.toLowerCase()}`\n\n return (\n <div data-slot='sidebar-header' className={cn('flex items-center gap-1', className)}>\n <div inert={collapsed} className='flex min-w-0 flex-1 items-center gap-1 transition-opacity duration-150 group-data-[collapsed]/sidebar:opacity-0 motion-reduce:transition-none'>\n {onQueryChange && (\n <Input type='search' value={query} onChange={(event) => onQueryChange(event.target.value)} placeholder={searchText} aria-label={searchText} startIcon={<Search />} />\n )}\n {children}\n </div>\n <SidebarCollapseButton className='ms-auto' />\n </div>\n )\n}\n\n/**\n * The scrolling body of a {@link Sidebar}, which holds the groups. In the `nav` variant it is the navigation landmark.\n *\n * @param props - Any `div` props, and `label` for the navigation's name in the `nav` variant.\n * @returns The body.\n */\nexport function SidebarContent ({ className, ...props }: ComponentProps<'div'>) {\n const { label, variant } = useSidebar()\n // A thin scrollbar when open; none on the narrow rail, where it would push the icons aside (it still scrolls).\n const classes = cn(\n 'flex min-h-0 flex-1 flex-col overflow-x-hidden overflow-y-auto [scrollbar-width:thin]',\n 'group-data-[collapsed]/sidebar:[scrollbar-width:none] group-data-[collapsed]/sidebar:[&::-webkit-scrollbar]:hidden',\n variant === 'panel' ? 'gap-3' : 'gap-4',\n className,\n )\n\n return variant === 'nav' ? <nav data-slot='sidebar-content' aria-label={label} className={classes} {...props} /> : <div data-slot='sidebar-content' className={classes} {...props} />\n}\n\n/**\n * The foot of a {@link Sidebar}, for the account, the collapse button or a status. In the `panel` variant it is\n * hidden on the rail; in the `nav` variant it stays, with its labels faded.\n *\n * @param props - Any `div` props.\n * @returns The footer.\n */\nexport function SidebarFooter ({ className, ...props }: ComponentProps<'div'>) {\n const { collapsed, variant } = useSidebar()\n\n return variant === 'panel' && collapsed ? null : <div data-slot='sidebar-footer' className={cn('mt-auto flex flex-col gap-2', variant === 'nav' && 'border-t border-sidebar-border pt-3', className)} {...props} />\n}\n","import { ChevronRight } from 'lucide-react'\nimport { Collapsible } from 'radix-ui'\nimport { type ReactNode, useState } from 'react'\nimport { cn } from '../../class-names'\nimport { useSidebar } from './sidebar-context.hook'\nimport { fadingLabelClassName } from './sidebar.recipe'\n\n/** Props of {@link SidebarGroup}. */\nexport interface SidebarGroupProps {\n /** The group's title, such as \"Speech\" or \"Build\". */\n title: string\n /** The number shown at the end of the title row, such as the number of plugins. */\n count?: number\n /** Opens a folding group whatever the user chose, for example while a search is typed. */\n forceOpen?: boolean\n /** The first open state of a folding group. Default true. */\n defaultOpen?: boolean\n /** Whether the group folds. Default true in the `panel` variant and false in the `nav` variant. */\n collapsible?: boolean\n /** The group's items. */\n children: ReactNode\n className?: string\n}\n\n/**\n * A titled group of a {@link Sidebar}. In the `panel` variant it folds; while the sidebar collapses its title row\n * slides away like the labels, and its items stay as a column of colour bars (a folded group opens on the rail). In the `nav` variant it is a section whose title fades in place when\n * the sidebar collapses.\n *\n * @param props - Title, count, open state, whether it folds, and the items.\n * @returns The group.\n */\nexport function SidebarGroup ({ title, count, forceOpen = false, defaultOpen = true, collapsible, className, children }: SidebarGroupProps) {\n const { collapsed, variant } = useSidebar()\n const [open, setOpen] = useState(defaultOpen)\n const folds = collapsible ?? variant === 'panel'\n const titleClassName = 'text-xs font-semibold tracking-[0.04em] text-muted-foreground uppercase'\n\n if (!folds) {\n return (\n <div role='group' aria-label={title} data-slot='sidebar-group' className={cn('flex flex-col gap-0.5', className)}>\n <span aria-hidden='true' className={cn('flex h-6 items-center px-3', titleClassName, fadingLabelClassName)}>{title}</span>\n {children}\n </div>\n )\n }\n\n return (\n <Collapsible.Root data-slot='sidebar-group' open={forceOpen || collapsed || open} onOpenChange={setOpen} className={cn('flex flex-col gap-1', className)}>\n <Collapsible.Trigger\n disabled={forceOpen}\n inert={collapsed}\n className={cn(\n 'group/trigger flex w-full cursor-pointer items-center gap-1.5 rounded-sm px-[13px] py-0.5 text-start outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-default',\n 'whitespace-nowrap transition-[translate,opacity] duration-150 ease-out group-data-[collapsed]/sidebar:translate-x-3 group-data-[collapsed]/sidebar:opacity-0 motion-reduce:transition-none',\n )}\n >\n <ChevronRight aria-hidden='true' className='size-3.5 shrink-0 text-muted-foreground transition-transform duration-150 group-data-[state=open]/trigger:rotate-90 motion-reduce:transition-none' />\n <span className={titleClassName}>{title}</span>\n {count !== undefined && <span className='ms-auto text-[11px] text-muted-foreground tabular-nums'>{count}</span>}\n </Collapsible.Trigger>\n <Collapsible.Content className='flex flex-col gap-1' role='group' aria-label={title}>\n {children}\n </Collapsible.Content>\n </Collapsible.Root>\n )\n}\n","import { Slot } from 'radix-ui'\nimport { cloneElement, type ComponentProps, isValidElement, type ReactElement, type ReactNode } from 'react'\nimport { cn } from '../../class-names'\nimport { HUE_FILL, type Hue } from '../../tokens'\nimport { SidebarTooltip } from './sidebar.component'\nimport { useSidebar } from './sidebar-context.hook'\nimport { fadingLabelClassName, navRowClassName } from './sidebar.recipe'\n\n/** Props of {@link SidebarItem}. */\nexport interface SidebarItemProps extends Omit<ComponentProps<'button'>, 'title'> {\n /** The item's name, such as a plugin or a page. */\n title: string\n /** One short line under the title in Fira Code, such as a version or a type. `panel` variant only. */\n meta?: ReactNode\n /** A 16 px icon. In the `nav` variant every item has one; in the `panel` variant it replaces the colour bar. */\n icon?: ReactNode\n /** The family hue of the colour bar (`panel` variant). */\n hue?: Hue\n /** A colour for the bar when it is not a family hue, such as a plugin's own colour. */\n color?: string\n /** A count or short badge at the end of the row, such as the number of recipes. */\n badge?: ReactNode\n /** Marks the current item or page: the brand-soft background and `aria-current`. */\n active?: boolean\n /**\n * Renders the item through its only child, such as a router link: the child gets the item's look and content.\n * Its own children are replaced.\n */\n asChild?: boolean\n /** With `asChild`, the element to render, such as `<a href='/runs' />`. */\n children?: ReactNode\n}\n\n/**\n * One entry of a {@link Sidebar}. In the `panel` variant: a colour bar or an icon, the title and a meta line; it can\n * be dragged, for example onto a canvas. In the `nav` variant: an icon and a label. In both, the text slides away\n * while the sidebar collapses and the bar or icon stays put; collapsed, the title shows in a tooltip.\n *\n * @param props - Title, meta, icon or colour, the active state, `asChild` and any button props.\n * @returns The item.\n */\nexport function SidebarItem ({ title, meta, icon, hue, color = 'var(--muted-foreground)', badge, active = false, asChild = false, className, children, ...props }: SidebarItemProps) {\n const { collapsed, variant } = useSidebar()\n const current = active ? (variant === 'nav' ? 'page' : 'true') : undefined\n\n const content = variant === 'nav'\n ? (\n <>\n <span aria-hidden='true' className='flex'>{icon}</span>\n <span className={fadingLabelClassName}>{title}</span>\n {badge !== undefined && <span className={cn('ms-auto rounded-full bg-secondary px-1.5 text-xs text-secondary-foreground tabular-nums', fadingLabelClassName)}>{badge}</span>}\n </>\n )\n : (\n <>\n {icon\n ? <span aria-hidden='true' className='flex w-2.5 shrink-0 justify-center text-muted-foreground group-aria-[current]/item:text-brand-text [&_svg]:size-4'>{icon}</span>\n : <span aria-hidden='true' className={cn('h-6 w-2.5 shrink-0 rounded-[3px]', hue ? HUE_FILL[hue] : '')} style={hue ? undefined : { background: color }} />}\n <span className={cn('flex flex-col', fadingLabelClassName)}>\n <span className='truncate text-[13px] font-medium'>{title}</span>\n {meta && <span className='truncate font-mono text-[10.5px] leading-tight text-muted-foreground'>{meta}</span>}\n </span>\n {badge !== undefined && <span className={cn('ms-auto text-[11px] text-muted-foreground tabular-nums', fadingLabelClassName)}>{badge}</span>}\n </>\n )\n\n const classes = variant === 'nav'\n ? cn(navRowClassName, className)\n : cn(\n 'group/item flex cursor-pointer items-center rounded-md border border-transparent text-start text-sidebar-foreground no-underline outline-none transition-colors duration-150 motion-reduce:transition-none',\n 'hover:border-sidebar-border hover:bg-background focus-visible:ring-2 focus-visible:ring-sidebar-ring disabled:cursor-not-allowed disabled:opacity-50',\n 'aria-[current]:border-transparent aria-[current]:bg-brand-soft aria-[current]:text-brand-text',\n 'w-full gap-2 px-[13px] py-1.5',\n className,\n )\n\n const shared = { 'data-slot': 'sidebar-item', 'aria-current': current, 'aria-label': collapsed ? title : undefined, 'className': classes } as const\n const element = asChild && isValidElement<{ children?: ReactNode }>(children)\n ? <Slot.Root {...shared} {...props}>{cloneWithContent(children, content)}</Slot.Root>\n : <button type='button' {...shared} {...props}>{content}</button>\n\n return <SidebarTooltip label={title}>{element}</SidebarTooltip>\n}\n\n/**\n * Puts the item's content inside the element given with `asChild`.\n *\n * @param child - The element, such as a link.\n * @param content - The item's content.\n * @returns The element with the content as its children.\n */\nfunction cloneWithContent (child: ReactElement<{ children?: ReactNode }>, content: ReactNode): ReactElement {\n // The item's content must go inside the caller's element (a router link, for example); Slot alone cannot do that.\n // eslint-disable-next-line @eslint-react/no-clone-element\n return cloneElement(child, undefined, content)\n}\n","import { PanelLeft } from 'lucide-react'\nimport type { ReactNode } from 'react'\nimport { Button } from '../button'\nimport { Sheet, SheetContent, SheetTitle, SheetTrigger } from '../overlay'\n\n/** Props of {@link SidebarSheet}. */\nexport interface SidebarSheetProps {\n /** The sidebar's name, for the button and the sheet's title. */\n label: string\n /** The Sidebar to show. */\n children: ReactNode\n /** The edge the sheet comes from. Default `start`. */\n side?: 'start' | 'end'\n /** Controls the open state. */\n open?: boolean\n /** Called with the new open state. */\n onOpenChange?: (open: boolean) => void\n /** Classes for the open button, such as `md:hidden`. */\n className?: string\n}\n\n/**\n * The sidebar on a phone: a button that opens the {@link Sidebar} in a sheet from the side, at the mobile density.\n * The sheet slides in and the labels slide into place, as when the desktop sidebar widens.\n * Close the sheet when the user picks an item, with `open` and `onOpenChange`.\n *\n * @param props - The label, the sidebar, the side and the open state.\n * @returns The button, and the sheet while it is open.\n */\nexport function SidebarSheet ({ label, children, side = 'start', open, onOpenChange, className }: SidebarSheetProps) {\n return (\n <Sheet open={open} onOpenChange={onOpenChange}>\n <SheetTrigger asChild>\n <Button variant='ghost' size='icon' aria-label={`Show ${label.toLowerCase()}`} className={className}><PanelLeft /></Button>\n </SheetTrigger>\n <SheetContent data-slot='sidebar-sheet' side={side} className='d-mob w-[min(320px,86vw)] gap-0 p-0 [&>[data-slot=sidebar]]:border-0'>\n <SheetTitle className='sr-only'>{label}</SheetTitle>\n {children}\n </SheetContent>\n </Sheet>\n )\n}\n","import { ChevronsUpDown } from 'lucide-react'\nimport { cn } from '../class-names'\nimport { PRODUCTS, type Product } from '../tokens'\nimport { Button, DropdownMenu, DropdownMenuContent, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuTrigger } from '../ui'\nimport { PRODUCT_CATALOGUE } from './product-catalogue.content'\nimport { ProductLogo } from './product-logo.component'\n\n/** Props of {@link ProductSwitcher}. */\nexport interface ProductSwitcherProps {\n /** The product the user is in. */\n product: Product\n /** The workspace under the product name, such as \"Acme Finance workspace\". */\n workspace?: string\n /** The products the user can switch to. Default every product. */\n products?: readonly Product[]\n /** Called with the product the user picks. */\n onProductChange?: (product: Product) => void\n className?: string\n}\n\n/**\n * The ProductSwitcher pattern: the product logo, name and workspace at the top of a sidebar, opening a menu\n * of the other products.\n *\n * @param props - The current product, workspace, choices and change handler.\n * @returns The switcher.\n */\nexport function ProductSwitcher ({ product, workspace, products = PRODUCTS, onProductChange, className }: ProductSwitcherProps) {\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant='ghost' className={cn('h-12 w-full justify-start gap-2.5 px-2', className)} aria-label={`${PRODUCT_CATALOGUE[product].name}, switch product`}>\n <ProductLogo product={product} alt='' className='size-7' />\n <span className='flex min-w-0 flex-col items-start leading-tight'>\n <span className='font-display text-[17px] font-extrabold italic text-brand-text'>{PRODUCT_CATALOGUE[product].name}</span>\n {workspace && <span className='truncate text-xs font-normal text-muted-foreground'>{workspace}</span>}\n </span>\n <ChevronsUpDown className='ms-auto text-muted-foreground' aria-hidden='true' />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align='start' className='w-60'>\n <DropdownMenuLabel>Products</DropdownMenuLabel>\n <DropdownMenuRadioGroup value={product} onValueChange={(value) => onProductChange?.(value as Product)}>\n {products.map((item) => (\n <DropdownMenuRadioItem key={item} value={item}>\n <ProductLogo product={item} alt='' className='size-4' />\n {PRODUCT_CATALOGUE[item].name}\n </DropdownMenuRadioItem>\n ))}\n </DropdownMenuRadioGroup>\n </DropdownMenuContent>\n </DropdownMenu>\n )\n}\n","import type { ReactNode } from 'react'\nimport { cn } from '../class-names'\nimport type { Product } from '../tokens'\nimport { fadingLabelClassName, useSidebar } from '../ui'\nimport { PRODUCT_CATALOGUE } from './product-catalogue.content'\nimport { ProductLogo } from './product-logo.component'\n\n/** Props of {@link SidebarBrand}. */\nexport interface SidebarBrandProps {\n /** The product whose logo and name the sidebar shows. */\n product: Product\n /** A short badge after the name, such as the environment (\"Dev\"). */\n badge?: ReactNode\n className?: string\n}\n\n/**\n * The top of a `nav` sidebar, after pargic's portal: the product logo is a second collapse button and turns a third\n * of a circle as the sidebar collapses, and the product name fades in place beside it.\n *\n * @param props - The product, an optional badge and classes.\n * @returns The brand row.\n */\nexport function SidebarBrand ({ product, badge, className }: SidebarBrandProps) {\n const { collapsed, setCollapsed } = useSidebar()\n const name = PRODUCT_CATALOGUE[product].name\n\n return (\n <div data-slot='sidebar-brand' className={cn('flex h-8 items-center', className)}>\n <button\n type='button'\n aria-label={`${name}: ${collapsed ? 'expand' : 'collapse'} sidebar`}\n aria-expanded={!collapsed}\n onClick={() => setCollapsed(!collapsed)}\n className='grid size-10 shrink-0 cursor-pointer place-items-center rounded-md outline-none focus-visible:ring-2 focus-visible:ring-sidebar-ring'\n >\n <ProductLogo product={product} alt='' className={cn('size-6 transition-transform duration-300 ease-emphasised motion-reduce:transition-none', collapsed && 'rotate-120')} />\n </button>\n <span className={cn('ms-1 font-display text-lg font-extrabold text-brand-text italic', fadingLabelClassName)}>{name}</span>\n {badge && <span className={cn('ms-2 rounded-full bg-warning-soft px-2 text-xs font-medium text-warning', fadingLabelClassName)}>{badge}</span>}\n </div>\n )\n}\n","import { useEffect, useSyncExternalStore } from 'react'\n\n/**\n * Calls `onTrigger` when the user presses ⌘K on macOS or Ctrl K elsewhere, to open the command palette.\n *\n * @param onTrigger - Called on the shortcut. The default browser action is cancelled.\n * @param enabled - Turns the shortcut off, for example while another dialog is open. Default true.\n */\nexport function useCommandShortcut (onTrigger: () => void, enabled = true): void {\n useEffect(() => {\n if (!enabled) return\n function onKeyDown (event: KeyboardEvent): void {\n if (!(event.key.toLowerCase() === 'k' && (event.metaKey || event.ctrlKey))) {\n return\n }\n\n event.preventDefault()\n onTrigger()\n }\n document.addEventListener('keydown', onKeyDown)\n\n return () => document.removeEventListener('keydown', onKeyDown)\n }, [onTrigger, enabled])\n}\n\n/**\n * Names the command palette shortcut for a platform: ⌘K on Apple systems, Ctrl+K on Windows, Linux and the rest.\n *\n * @param platform - The platform name, such as `navigator.userAgentData.platform` or `navigator.platform`.\n * @returns The shortcut label.\n */\nexport function commandShortcutLabel (platform: string): string {\n return /mac|iphone|ipad|ipod/i.test(platform) ? '⌘K' : 'Ctrl+K'\n}\n\nfunction unsubscribe (): void {}\n\nfunction subscribe (): () => void {\n return unsubscribe\n}\n\nfunction clientPlatform (): string {\n const agent = navigator as Navigator & { userAgentData?: { platform?: string } }\n\n return agent.userAgentData?.platform ?? navigator.platform\n}\n\nfunction serverPlatform (): string {\n return ''\n}\n\n/**\n * Gives the command palette shortcut label for the user's system: ⌘K on Apple systems, Ctrl+K elsewhere. Server\n * rendering shows Ctrl+K.\n *\n * @returns The shortcut label.\n */\nexport function useCommandShortcutLabel (): string {\n return commandShortcutLabel(useSyncExternalStore(subscribe, clientPlatform, serverPlatform))\n}\n","import { Search } from 'lucide-react'\nimport { type ReactNode, useCallback, useState } from 'react'\nimport { cn } from '../class-names'\nimport { ProductSwitcher } from '../product'\nimport type { Product } from '../tokens'\nimport {\n Avatar,\n AvatarFallback,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n fadingLabelClassName,\n Kbd,\n Sidebar,\n SidebarCollapseButton,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarHeader,\n SidebarItem,\n SidebarSheet,\n} from '../ui'\nimport { useCommandShortcut, useCommandShortcutLabel } from './command-shortcut.hook'\n\n/** An entry of the app sidebar. */\nexport interface AppNavItem {\n label: string\n href: string\n /** A 16 px lucide icon. */\n icon: ReactNode\n /** A count badge, such as the number of recipes. */\n count?: number\n /** True for the page the user is on. */\n current?: boolean\n}\n\n/** A command of the palette. */\nexport interface AppCommand {\n label: string\n group: string\n onSelect: () => void\n}\n\n/** Props of {@link AppShell}. */\nexport interface AppShellProps {\n /** The product, for the switcher. Theme the accent with ThemeRoot or `<html data-product>`. */\n product: Product\n workspace?: string\n onProductChange?: (product: Product) => void\n /** The main sidebar entries. */\n nav: readonly AppNavItem[]\n /** A titled second group, such as Workspace settings. */\n secondaryNav?: { title: string, items: readonly AppNavItem[] }\n /** A card at the bottom of the sidebar, such as plan usage. */\n sidebarFooter?: ReactNode\n /** The signed-in user. */\n user?: { name: string, role?: string, initials: string }\n /** The breadcrumb at the start of the top bar. */\n breadcrumb?: ReactNode\n /** Icon buttons at the end of the top bar. */\n topActions?: ReactNode\n /** The commands of the palette, opened with ⌘K or Ctrl+K. Without commands, the search button and shortcut are hidden. */\n commands?: readonly AppCommand[]\n /** The page. */\n children: ReactNode\n className?: string\n}\n\n/**\n * The AppShell pattern of a web portal: the `nav` Sidebar with the product switcher, search, navigation, a footer\n * card and the user, beside a top bar and the page. The sidebar collapses to its icons; on a phone it opens in a\n * sheet from the top bar. ⌘K or Ctrl+K opens the command palette; the search shows the one for the user's system.\n *\n * @param props - Product, navigation, user, top bar, commands and the page.\n * @returns The shell.\n */\nexport function AppShell ({ product, workspace, onProductChange, nav, secondaryNav, sidebarFooter, user, breadcrumb, topActions, commands, children, className }: AppShellProps) {\n const [paletteOpen, setPaletteOpen] = useState(false)\n const openPalette = useCallback(() => setPaletteOpen(true), [])\n useCommandShortcut(openPalette, Boolean(commands?.length))\n const shortcut = useCommandShortcutLabel()\n const groups = [...new Set(commands?.map((command) => command.group))]\n const link = (item: AppNavItem) => (\n <SidebarItem key={item.href} asChild title={item.label} icon={item.icon} badge={item.count} active={item.current}>\n <a href={item.href}>{item.label}</a>\n </SidebarItem>\n )\n const sidebarBody = (\n <>\n <SidebarHeader className='h-12'>\n <ProductSwitcher product={product} workspace={workspace} onProductChange={onProductChange} className='px-2.5' />\n </SidebarHeader>\n <SidebarContent>\n {commands?.length\n ? <SidebarItem title='Search' icon={<Search />} badge={<Kbd className='border-0 bg-transparent'>{shortcut}</Kbd>} onClick={openPalette} />\n : null}\n <div className='flex flex-col gap-0.5'>{nav.map((item) => link(item))}</div>\n {secondaryNav && <SidebarGroup title={secondaryNav.title}>{secondaryNav.items.map((item) => link(item))}</SidebarGroup>}\n </SidebarContent>\n <SidebarFooter>\n {sidebarFooter && <div className={fadingLabelClassName}>{sidebarFooter}</div>}\n {user && (\n <div className='flex items-center gap-2.5 px-1'>\n <Avatar><AvatarFallback>{user.initials}</AvatarFallback></Avatar>\n <span className={cn('flex flex-col leading-tight', fadingLabelClassName)}>\n <span className='text-[13px] font-semibold'>{user.name}</span>\n {user.role && <span className='text-xs text-muted-foreground'>{user.role}</span>}\n </span>\n </div>\n )}\n <SidebarCollapseButton />\n </SidebarFooter>\n </>\n )\n\n return (\n <div data-slot='app-shell' className={cn('flex min-h-screen flex-wrap bg-background', className)}>\n <Sidebar variant='nav' label='Workspace' className='sticky top-0 h-screen max-md:hidden'>\n {sidebarBody}\n </Sidebar>\n <div className='relative flex min-w-0 flex-[999_1_560px] flex-col'>\n <div className='flex h-14 flex-wrap items-center gap-3 border-b px-6'>\n <SidebarSheet label='Workspace' className='-ms-2 md:hidden'>\n <Sidebar variant='nav' label='Workspace' collapsed={false} className='w-full'>{sidebarBody}</Sidebar>\n </SidebarSheet>\n {breadcrumb}\n {topActions && <div className='ms-auto flex items-center gap-1.5'>{topActions}</div>}\n </div>\n <main className='flex flex-col gap-5 p-6'>{children}</main>\n </div>\n {commands?.length\n ? (\n <CommandDialog open={paletteOpen} onOpenChange={setPaletteOpen}>\n <CommandInput placeholder='Search recipes, runs and settings' />\n <CommandList>\n <CommandEmpty>No results.</CommandEmpty>\n {groups.map((group) => (\n <CommandGroup key={group} heading={group}>\n {commands.filter((command) => command.group === group).map((command) => (\n <CommandItem key={command.label} onSelect={() => { setPaletteOpen(false); command.onSelect() }}>{command.label}</CommandItem>\n ))}\n </CommandGroup>\n ))}\n </CommandList>\n </CommandDialog>\n )\n : null}\n </div>\n )\n}\n","import { Plus, Search } from 'lucide-react'\nimport type { ComponentProps, ReactNode } from 'react'\nimport { cn } from '../class-names'\nimport { Badge, Button, Input } from '../ui'\n\n/** Props of {@link FilterBar}. */\nexport interface FilterBarProps {\n /** The search text. */\n query: string\n /** Called with the new search text. */\n onQueryChange: (query: string) => void\n /** The search field's accessible label and placeholder. Default \"Search\". */\n searchLabel?: string\n /** Filter chips, such as {@link FilterChip}s. */\n filters?: ReactNode\n /** A view switch at the end, such as a ToggleGroup. */\n views?: ReactNode\n className?: string\n}\n\n/**\n * The FilterBar pattern above a table: search, filter chips and a view switch.\n *\n * @param props - Search state, filters and views.\n * @returns The bar.\n */\nexport function FilterBar ({ query, onQueryChange, searchLabel = 'Search', filters, views, className }: FilterBarProps) {\n return (\n <div data-slot='filter-bar' role='search' className={cn('flex flex-wrap items-center gap-2 border-b p-3', className)}>\n <div className='max-w-80 flex-[1_1_220px]'>\n <Input type='search' value={query} onChange={(event) => onQueryChange(event.target.value)} placeholder={searchLabel} aria-label={searchLabel} startIcon={<Search />} />\n </div>\n {filters}\n {views && <div className='ms-auto'>{views}</div>}\n </div>\n )\n}\n\n/** Props of {@link FilterChip}. */\nexport interface FilterChipProps extends ComponentProps<'button'> {\n /** The filter's name, such as \"Status\". */\n label: string\n /** How many values the filter has picked. Zero shows no count. */\n count?: number\n /** Replaces the plus icon. */\n icon?: ReactNode\n}\n\n/**\n * A filter button with a dashed border and the count of picked values. Open a popover or menu from it.\n *\n * @param props - Label, count, icon and any `button` props.\n * @returns The chip.\n */\nexport function FilterChip ({ label, count = 0, icon, className, ...props }: FilterChipProps) {\n return (\n <Button variant='outline' size='sm' className={cn('border-dashed', className)} {...props}>\n {icon ?? <Plus />}\n {label}\n {count > 0 && <Badge variant='brand' className='h-[18px]' aria-label={`${count} selected`}>{count}</Badge>}\n </Button>\n )\n}\n","import type { ReactNode } from 'react'\nimport { cn } from '../class-names'\n\n/** Props of {@link FormSection}. */\nexport interface FormSectionProps {\n /** The section title. */\n title: ReactNode\n /** What the settings in the section change. */\n description?: ReactNode\n /** The fields. */\n children: ReactNode\n /** Buttons under the fields, such as Save. */\n actions?: ReactNode\n className?: string\n}\n\n/**\n * The FormSection pattern of a settings page: a title and description beside a card of fields. The two\n * columns stack below 768 px.\n *\n * @param props - Title, description, fields and actions.\n * @returns The section.\n */\nexport function FormSection ({ title, description, children, actions, className }: FormSectionProps) {\n return (\n <section data-slot='form-section' className={cn('grid gap-6 md:grid-cols-[minmax(0,1fr)_minmax(0,2fr)]', className)}>\n <div className='flex flex-col gap-1'>\n <h2 className='m-0 type-h4'>{title}</h2>\n {description && <p className='m-0 text-[13px] text-muted-foreground'>{description}</p>}\n </div>\n <div className='flex flex-col overflow-hidden rounded-xl border bg-card shadow-xs'>\n <div className='flex flex-col gap-4 p-5'>{children}</div>\n {actions && <div className='flex justify-end gap-2 border-t bg-muted px-5 py-3'>{actions}</div>}\n </div>\n </section>\n )\n}\n","import type { ReactNode } from 'react'\nimport { cn } from '../class-names'\n\n/** Props of {@link PageHeader}. */\nexport interface PageHeaderProps {\n /** The page title: 22 px, semibold. */\n title: ReactNode\n /** One line under the title. */\n description?: ReactNode\n /** Actions at the end, with at most one primary button. */\n actions?: ReactNode\n /** Underline tabs under the title, for the sections of the page. */\n tabs?: ReactNode\n className?: string\n}\n\n/**\n * The PageHeader pattern of an app page: title, description, actions and optional section tabs.\n *\n * @param props - Title, description, actions and tabs.\n * @returns The header.\n */\nexport function PageHeader ({ title, description, actions, tabs, className }: PageHeaderProps) {\n return (\n <div data-slot='page-header' className={cn('flex flex-col gap-4', className)}>\n <div className='flex flex-wrap items-end gap-4'>\n <div className='flex flex-col gap-1'>\n <h1 className='m-0 text-[22px] font-semibold tracking-tight'>{title}</h1>\n {description && <p className='m-0 text-[13px] text-muted-foreground'>{description}</p>}\n </div>\n {actions && <div className='ms-auto flex flex-wrap gap-2'>{actions}</div>}\n </div>\n {tabs}\n </div>\n )\n}\n","import { Ellipsis } from 'lucide-react'\nimport type { ReactNode } from 'react'\nimport { cn } from '../class-names'\nimport { Button, Checkbox, DropdownMenu, DropdownMenuContent, DropdownMenuTrigger, Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '../ui'\n\n/** A column of a {@link RecordsTable}. */\nexport interface RecordsColumn<Row> {\n /** A stable key for the column. */\n key: string\n /** The heading. */\n header: ReactNode\n /** Draws the cell of a row. */\n cell: (row: Row) => ReactNode\n /** `end` for numbers, so digits line up. */\n align?: 'start' | 'end'\n className?: string\n}\n\n/** Props of {@link RecordsTable}. */\nexport interface RecordsTableProps<Row> {\n /** The rows to show. */\n rows: readonly Row[]\n columns: readonly RecordsColumn<Row>[]\n /** A stable id of a row. */\n getRowId: (row: Row) => string\n /** The ids of the selected rows. Selection is on when this is given. */\n selected?: ReadonlySet<string>\n /** Called with the new selection. */\n onSelectedChange?: (selected: Set<string>) => void\n /** The items of a row's actions menu. */\n rowActions?: (row: Row) => ReactNode\n /** The accessible name of the table. */\n label: string\n className?: string\n}\n\n/**\n * The RecordsTable pattern: a data table with row selection, a select-all box and a row actions menu.\n * Sorting and virtualisation stay with the caller, which passes the rows to show.\n *\n * @param props - Rows, columns, row ids, selection and row actions.\n * @returns The table.\n */\nexport function RecordsTable<Row> ({ rows, columns, getRowId, selected, onSelectedChange, rowActions, label, className }: RecordsTableProps<Row>) {\n const selectable = selected !== undefined\n const ids = rows.map((row) => getRowId(row))\n const picked = ids.filter((id) => selected?.has(id)).length\n const allState = picked === 0 ? false : (picked === ids.length ? true : 'indeterminate')\n\n function toggle (id: string, on: boolean) {\n const next = new Set(selected)\n if (on) next.add(id)\n else next.delete(id)\n onSelectedChange?.(next)\n }\n\n function toggleAll (on: boolean) {\n const next = new Set(selected)\n for (const id of ids) {\n if (on) next.add(id)\n else next.delete(id)\n }\n onSelectedChange?.(next)\n }\n\n return (\n <Table data-slot='records-table' aria-label={label} className={cn('min-w-[760px]', className)}>\n <TableHeader>\n <TableRow className='hover:bg-transparent'>\n {selectable && <TableHead className='w-9'><Checkbox aria-label='Select all rows' checked={allState} onCheckedChange={(state) => toggleAll(state === true)} /></TableHead>}\n {columns.map((column) => <TableHead key={column.key} className={cn(column.align === 'end' && 'text-end', column.className)}>{column.header}</TableHead>)}\n {rowActions && <TableHead className='w-11'><span className='sr-only'>Actions</span></TableHead>}\n </TableRow>\n </TableHeader>\n <TableBody>\n {rows.map((row) => {\n const id = getRowId(row)\n const isSelected = selected?.has(id) ?? false\n\n return (\n <TableRow key={id} data-state={isSelected ? 'selected' : undefined}>\n {selectable && <TableCell><Checkbox aria-label={`Select ${id}`} checked={isSelected} onCheckedChange={(state) => toggle(id, state === true)} /></TableCell>}\n {columns.map((column) => <TableCell key={column.key} className={cn(column.align === 'end' && 'text-end tabular-nums', column.className)}>{column.cell(row)}</TableCell>)}\n {rowActions && (\n <TableCell>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant='ghost' size='icon-sm' aria-label={`Actions for ${id}`}><Ellipsis /></Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align='end'>{rowActions(row)}</DropdownMenuContent>\n </DropdownMenu>\n </TableCell>\n )}\n </TableRow>\n )\n })}\n </TableBody>\n </Table>\n )\n}\n","/**\n * Builds the SVG path of a sparkline. The series is scaled to fill the box, with the lowest value at the bottom\n * and the highest at the top; a flat series draws a line through the middle.\n *\n * @param values - The series, oldest first. Fewer than two values draws nothing.\n * @param width - The width of the drawing box.\n * @param height - The height of the drawing box.\n * @param inset - Space kept at the top and bottom, so a stroke is not clipped. Default 2.\n * @returns The `d` attribute of a polyline path, or an empty string.\n */\nexport function sparklinePath (values: readonly number[], width: number, height: number, inset = 2): string {\n if (values.length < 2) return ''\n const min = Math.min(...values)\n const range = Math.max(...values) - min\n const usable = height - inset * 2\n const step = width / (values.length - 1)\n\n return values\n .map((value, index) => {\n const y = range === 0 ? height / 2 : inset + usable - ((value - min) / range) * usable\n\n return `${index === 0 ? 'M' : 'L'}${(index * step).toFixed(1)},${y.toFixed(1)}`\n })\n .join(' ')\n}\n","import type { ReactNode } from 'react'\nimport { cn } from '../class-names'\nimport { Card } from '../ui'\nimport { sparklinePath } from './sparkline.algorithm'\n\nconst toneClassName = { positive: 'text-success', negative: 'text-destructive', neutral: 'text-muted-foreground' } as const\n\n/** Props of {@link StatCard}. */\nexport interface StatCardProps {\n /** What the number counts, such as \"Runs, 7 days\". */\n label: ReactNode\n /** The number, already formatted. */\n value: ReactNode\n /** The change, already formatted, such as \"+8.2%\". */\n delta?: ReactNode\n /** Whether the change is good, bad or neither. Default neutral. */\n tone?: keyof typeof toneClassName\n /** A short series for the brand sparkline, oldest first. */\n series?: readonly number[]\n className?: string\n}\n\n/**\n * The StatCard pattern: a label, a tabular number, a sparkline in the brand colour, and the change.\n *\n * @param props - Label, value, delta, tone and series.\n * @returns The card.\n */\nexport function StatCard ({ label, value, delta, tone = 'neutral', series, className }: StatCardProps) {\n const path = series ? sparklinePath(series, 100, 32) : ''\n\n return (\n <Card data-slot='stat-card' className={cn('gap-1.5 p-4', className)}>\n <span className='text-[13px] text-muted-foreground'>{label}</span>\n <div className='flex items-end justify-between gap-2'>\n <span className='text-[26px] font-semibold tracking-tight tabular-nums'>{value}</span>\n {path && (\n <svg viewBox='0 0 100 32' width='100' height='32' preserveAspectRatio='none' aria-hidden='true' className='overflow-visible'>\n <path d={path} fill='none' stroke='var(--brand)' strokeWidth='2' strokeLinejoin='round' vectorEffect='non-scaling-stroke' />\n </svg>\n )}\n </div>\n {delta && <span className={cn('text-xs', toneClassName[tone])}>{delta}</span>}\n </Card>\n )\n}\n","/**\n * The statuses of a run, a node or any job, with the same names in every product: Queued, Waiting, Running,\n * Completed, No records, Failed and Off.\n */\nexport const RUN_STATUSES = ['queued', 'waiting', 'running', 'completed', 'no-records', 'failed', 'off'] as const\n\n/** The status of a run, a node or any job. */\nexport type RunStatus = typeof RUN_STATUSES[number]\n","import type { BadgeVariant } from '../ui'\nimport type { RunStatus } from './run-status.contract'\n\n/** How a status shows: its word and its badge colour. */\nexport interface RunStatusDisplay {\n /** The word beside the colour. A status never relies on colour alone. */\n label: string\n /** The badge variant: success, warning, danger and info are the same in every product. */\n variant: BadgeVariant\n /** True for a live status, which shows a dot. */\n live: boolean\n}\n\nconst DISPLAY: Readonly<Record<RunStatus, RunStatusDisplay>> = {\n 'queued': { label: 'Queued', variant: 'secondary', live: false },\n 'waiting': { label: 'Waiting', variant: 'secondary', live: false },\n 'running': { label: 'Running', variant: 'info', live: true },\n 'completed': { label: 'Completed', variant: 'success', live: true },\n 'no-records': { label: 'No records', variant: 'warning', live: true },\n 'failed': { label: 'Failed', variant: 'danger', live: true },\n 'off': { label: 'Off', variant: 'outline', live: false },\n}\n\n/**\n * Converts a status into the word and colour that every product shows for it.\n *\n * @param status - The status.\n * @returns Its label, badge variant and whether it shows a dot.\n */\nexport function runStatusDisplay (status: RunStatus): RunStatusDisplay {\n return DISPLAY[status]\n}\n","import { Badge, type BadgeProps } from '../ui'\nimport type { RunStatus } from './run-status.contract'\nimport { runStatusDisplay } from './run-status.mapper'\n\n/** Props of {@link StatusBadge}. */\nexport interface StatusBadgeProps extends Omit<BadgeProps, 'variant' | 'dot' | 'children'> {\n /** The status to show. */\n status: RunStatus\n}\n\n/**\n * A badge for a run status, with the same word and colour in every product.\n *\n * @param props - The status and any badge props.\n * @returns The badge.\n */\nexport function StatusBadge ({ status, ...props }: StatusBadgeProps) {\n const { label, variant, live } = runStatusDisplay(status)\n\n return <Badge variant={variant} dot={live} data-status={status} {...props}>{label}</Badge>\n}\n","import type { ReactNode } from 'react'\nimport { cn } from '../class-names'\nimport { type RunStatus, StatusBadge } from '../status'\nimport { HUE_FILL, type Hue } from '../tokens'\n\n/** Props of {@link FlowNode}. */\nexport interface FlowNodeProps {\n /** The node's name, such as a plugin or input. */\n title: string\n /** One line on what the node does. */\n description: ReactNode\n status: RunStatus\n /** The family hue of the node's lane. Default none, for inputs. */\n hue?: Hue\n /** Draws the brand border of the selected node. */\n selected?: boolean\n onSelect?: () => void\n className?: string\n}\n\n/**\n * A node on a desktop flow canvas: a 200 px card with the lane dot, the name, the status and one line.\n * Place it absolutely on the canvas; wrap it in a ContextMenuTrigger for its right-click menu.\n *\n * @param props - Title, description, status, hue, selection and select handler.\n * @returns The node.\n */\nexport function FlowNode ({ title, description, status, hue, selected = false, onSelect, className }: FlowNodeProps) {\n return (\n <button\n type='button'\n data-slot='flow-node'\n aria-pressed={selected}\n onClick={onSelect}\n className={cn(\n 'flex w-[200px] cursor-pointer flex-col rounded-lg bg-card text-start text-[13px] text-card-foreground shadow-sm outline-none focus-visible:ring-2 focus-visible:ring-ring',\n selected ? 'border-2 border-brand' : 'border',\n className,\n )}\n >\n <span className='flex items-center gap-2 border-b px-2.5 py-2'>\n <span aria-hidden='true' className={cn('size-2 shrink-0 rounded-[2px]', hue ? HUE_FILL[hue] : 'bg-muted-foreground')} />\n <span className='font-semibold'>{title}</span>\n <StatusBadge status={status} className='ms-auto h-[18px] text-[11px]' />\n </span>\n <span className='px-2.5 py-2 text-xs leading-snug text-muted-foreground'>{description}</span>\n </button>\n )\n}\n","import type { ReactNode } from 'react'\nimport { cn } from '../class-names'\nimport { HUE_FILL, type Hue } from '../tokens'\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from '../ui'\n\n/** One tab of an {@link Inspector}. */\nexport interface InspectorTab {\n value: string\n label: string\n content: ReactNode\n}\n\n/** Props of {@link Inspector}. */\nexport interface InspectorProps {\n /** The selected item, such as a plugin. */\n title: ReactNode\n /** One line beside the title, such as the version and what it does. */\n subtitle?: ReactNode\n /** The family hue of the item's dot. */\n hue?: Hue\n tabs: readonly InspectorTab[]\n /** A panel pinned to the bottom, such as the progress of the running item. */\n footer?: ReactNode\n className?: string\n}\n\n/**\n * The Inspector pattern of a desktop app: the selected item's header, underline tabs, and its settings.\n * Put it in a ResizablePanel so the user can widen it.\n *\n * @param props - Title, subtitle, hue, tabs and footer.\n * @returns The inspector.\n */\nexport function Inspector ({ title, subtitle, hue, tabs, footer, className }: InspectorProps) {\n return (\n <aside data-slot='inspector' aria-label='Inspector' className={cn('flex h-full flex-col text-[13px]', className)}>\n <div className='flex items-center gap-2 border-b p-3'>\n {hue && <span aria-hidden='true' className={cn('size-2.5 shrink-0 rounded-[3px]', HUE_FILL[hue])} />}\n <h2 className='m-0 type-h4'>{title}</h2>\n {subtitle && <span className='truncate text-xs text-muted-foreground'>{subtitle}</span>}\n </div>\n <Tabs defaultValue={tabs[0]?.value} className='min-h-0 flex-1 gap-0'>\n <TabsList variant='underline' className='gap-4 px-3'>\n {tabs.map((tab) => <TabsTrigger key={tab.value} value={tab.value} className='text-[13px] group-data-[variant=underline]/tabs-list:py-2'>{tab.label}</TabsTrigger>)}\n </TabsList>\n {tabs.map((tab) => <TabsContent key={tab.value} value={tab.value} className='flex flex-col gap-3 overflow-y-auto p-3'>{tab.content}</TabsContent>)}\n </Tabs>\n {footer && <div className='m-3 mt-auto rounded-md bg-muted p-2.5'>{footer}</div>}\n </aside>\n )\n}\n","import type { ReactNode } from 'react'\nimport { cn } from '../class-names'\n\n/** Props of {@link StatusBar}. */\nexport interface StatusBarProps {\n /** Items at the start, such as the engine state. */\n start?: ReactNode\n /** Items at the end, such as the playhead. */\n end?: ReactNode\n className?: string\n}\n\n/**\n * The StatusBar pattern at the foot of a desktop window: 24 px, 12 px muted text, items at both ends.\n * Its content is announced politely when it changes.\n *\n * @param props - Start and end items.\n * @returns The status bar.\n */\nexport function StatusBar ({ start, end, className }: StatusBarProps) {\n return (\n <div data-slot='status-bar' role='status' className={cn('flex h-6 shrink-0 items-center gap-3.5 border-t bg-sidebar px-2.5 text-xs text-muted-foreground', className)}>\n {start}\n {end && <div className='ms-auto flex items-center gap-3.5'>{end}</div>}\n </div>\n )\n}\n","/** Where a span sits on a timeline, in percent of its width. */\nexport interface TimelineBox {\n left: number\n width: number\n}\n\n/**\n * Places a time span on a timeline. The span is clipped to the timeline, so a span past the end stops at 100 %.\n *\n * @param start - The start of the span, in seconds.\n * @param end - The end of the span, in seconds.\n * @param duration - The length of the timeline, in seconds. Zero or less places nothing.\n * @returns The left edge and width, in percent.\n */\nexport function timelineBox (start: number, end: number, duration: number): TimelineBox {\n if (duration <= 0) return { left: 0, width: 0 }\n const clamp = (value: number): number => Math.min(100, Math.max(0, (value / duration) * 100))\n const left = clamp(start)\n\n return { left, width: Math.max(0, clamp(end) - left) }\n}\n\n/**\n * Gives evenly spaced tick times for a timeline ruler, from zero to the duration.\n *\n * @param duration - The length of the timeline, in seconds.\n * @param count - How many ticks, both ends included. At least two.\n * @returns The tick times, in seconds, rounded to whole seconds.\n */\nexport function timelineTicks (duration: number, count: number): number[] {\n const ticks = Math.max(2, count)\n\n return Array.from({ length: ticks }, (_, index) => Math.round((duration * index) / (ticks - 1)))\n}\n","/** Writes a clock field with two digits. */\nfunction pad (value: number): string {\n return String(value).padStart(2, '0')\n}\n\n/**\n * Formats a number of seconds as a clock reading: `mm:ss`, or `hh:mm:ss` from one hour or when asked.\n * Negative and fractional seconds are clamped to whole seconds from zero.\n *\n * @param seconds - The elapsed or total time, in seconds.\n * @param withHours - Always shows the hours, for a clock that will pass one hour. Default false.\n * @returns The clock reading, with two-digit fields.\n */\nexport function formatTimecode (seconds: number, withHours = false): string {\n const total = Math.max(0, Math.floor(seconds))\n const hours = Math.floor(total / 3600)\n const minutes = Math.floor((total % 3600) / 60)\n const rest = total % 60\n\n return withHours || hours > 0 ? `${pad(hours)}:${pad(minutes)}:${pad(rest)}` : `${pad(minutes)}:${pad(rest)}`\n}\n\n/**\n * Gives the 24-hour clock time, such as 09:30, at a number of seconds after a start time, in the local time zone.\n *\n * @param startsAt - The clock time at second zero.\n * @param seconds - The seconds after the start.\n * @returns The time as hours and minutes.\n */\nexport function formatClockTime (startsAt: Date, seconds: number): string {\n const time = new Date(startsAt.getTime() + seconds * 1000)\n\n return `${pad(time.getHours())}:${pad(time.getMinutes())}`\n}\n","import { cn } from '../class-names'\nimport { formatClockTime, formatTimecode } from '../timecode'\nimport { HUE_FILL, type Hue } from '../tokens'\nimport { Tooltip, TooltipContent, TooltipTrigger } from '../ui'\nimport { timelineBox, timelineTicks } from './timeline.algorithm'\n\n/** A span on a lane. */\nexport interface TimelineSegment {\n /** Start, in seconds. */\n start: number\n /** End, in seconds. */\n end: number\n /** Shown in a tooltip, such as a speaker or an object. */\n label?: string\n /** Draws the span faded, for low confidence or a pending result. */\n faint?: boolean\n}\n\n/** One lane of {@link TimelineLanes}. */\nexport interface TimelineLane {\n name: string\n /** The family hue of the lane. */\n hue: Hue\n segments: readonly TimelineSegment[]\n}\n\n/** Props of {@link TimelineLanes}. */\nexport interface TimelineLanesProps {\n /** The length of the media, in seconds. */\n duration: number\n lanes: readonly TimelineLane[]\n /** The playhead, in seconds. */\n playhead?: number\n /** How many ruler ticks. Default 8. */\n tickCount?: number\n /**\n * The clock time at second zero, such as the start of a recording. With it, the ruler and the span names show\n * clock times, such as 09:30. Without it, they show the media time from 00:00.\n */\n startsAt?: Date\n className?: string\n}\n\n/**\n * The Timeline lanes pattern of a desktop media app: a ruler, one lane per result kind with coloured spans,\n * and a playhead. The ruler shows media time, or clock time with `startsAt`.\n *\n * @param props - Duration, lanes, playhead, tick count and the clock start.\n * @returns The timeline.\n */\nexport function TimelineLanes ({ duration, lanes, playhead, tickCount = 8, startsAt, className }: TimelineLanesProps) {\n const label = (seconds: number): string => startsAt ? formatClockTime(startsAt, seconds) : formatTimecode(seconds)\n const head = playhead === undefined ? undefined : timelineBox(0, playhead, duration).width\n\n return (\n <div data-slot='timeline-lanes' role='group' aria-label='Timeline' className={cn('relative flex flex-col text-[13px]', className)}>\n <div className='flex h-[26px] items-center border-b ps-[118px] pe-2.5' aria-hidden='true'>\n {timelineTicks(duration, tickCount).map((tick) => <span key={tick} className='flex-1 text-xs tabular-nums text-muted-foreground'>{label(tick)}</span>)}\n </div>\n {lanes.map((lane) => (\n <div key={lane.name} className='flex h-[46px] items-center border-b'>\n <span className='flex w-[108px] shrink-0 items-center gap-1.5 px-2.5 font-medium'>\n <span aria-hidden='true' className={cn('size-2 shrink-0 rounded-[2px]', HUE_FILL[lane.hue])} />\n {lane.name}\n </span>\n <div className='relative me-2.5 h-[26px] flex-1'>\n {lane.segments.map((segment) => {\n const box = timelineBox(segment.start, segment.end, duration)\n const name = `${lane.name}${segment.label ? `, ${segment.label}` : ''}, ${label(segment.start)} to ${label(segment.end)}`\n\n return (\n <Tooltip key={`${segment.start}-${segment.end}`}>\n <TooltipTrigger asChild>\n <button\n type='button'\n aria-label={name}\n className={cn('absolute inset-y-0 cursor-pointer rounded-[5px] outline-none focus-visible:ring-2 focus-visible:ring-ring', HUE_FILL[lane.hue], segment.faint ? 'opacity-35' : 'opacity-85')}\n style={{ left: `${box.left}%`, width: `${box.width}%` }}\n />\n </TooltipTrigger>\n <TooltipContent>{name}</TooltipContent>\n </Tooltip>\n )\n })}\n </div>\n </div>\n ))}\n {head !== undefined && (\n <span\n aria-hidden='true'\n className='pointer-events-none absolute inset-y-0 w-0.5 bg-foreground'\n style={{ left: `calc(108px + (100% - 118px) * ${head / 100})` }}\n />\n )}\n </div>\n )\n}\n","import { Minus, Square, X } from 'lucide-react'\nimport type { ReactNode } from 'react'\nimport { cn } from '../class-names'\nimport { ProductLogo } from '../product'\nimport type { Product } from '../tokens'\nimport { Button, Menubar } from '../ui'\n\n/** Props of {@link TitleBar}. */\nexport interface TitleBarProps {\n /** The product, for the logo. */\n product: Product\n /** The menus: MenubarMenu elements. */\n menus?: ReactNode\n /** The window title, such as the open file. */\n title?: ReactNode\n /** Window controls. Leave them out on macOS, where the system draws them. */\n onMinimise?: () => void\n onMaximise?: () => void\n onClose?: () => void\n className?: string\n}\n\n/**\n * The TitleBar pattern of a desktop app (Tauri): the logo, the menubar, the title, and the window controls.\n * The bar is a drag region (`data-tauri-drag-region`), so the user moves the window by it.\n *\n * @param props - Product, menus, title and window control handlers.\n * @returns The title bar.\n */\nexport function TitleBar ({ product, menus, title, onMinimise, onMaximise, onClose, className }: TitleBarProps) {\n const controls = [\n { label: 'Minimise', icon: <Minus />, onClick: onMinimise },\n { label: 'Maximise', icon: <Square />, onClick: onMaximise },\n { label: 'Close window', icon: <X />, onClick: onClose },\n ].filter((control) => control.onClick)\n\n return (\n <div data-slot='title-bar' data-tauri-drag-region='' className={cn('flex h-9 shrink-0 items-center gap-3 border-b bg-sidebar ps-3 text-[13px]', className)}>\n <ProductLogo product={product} alt='' className='size-[18px]' />\n {menus && <Menubar>{menus}</Menubar>}\n <span data-tauri-drag-region='' className='flex-1 truncate text-center text-[12.5px] text-muted-foreground'>{title}</span>\n {controls.length > 0 && (\n <div className='flex h-full'>\n {controls.map((control) => (\n <Button\n key={control.label}\n variant='ghost'\n aria-label={control.label}\n onClick={control.onClick}\n className={cn('h-full w-[46px] rounded-none px-0 [&_svg]:size-3.5', control.label === 'Close window' && 'hover:bg-destructive hover:text-destructive-foreground')}\n >\n {control.icon}\n </Button>\n ))}\n </div>\n )}\n </div>\n )\n}\n","import type { ReactNode } from 'react'\nimport { cn } from '../class-names'\n\n/** A tab of a {@link BottomNav}. */\nexport interface BottomNavItem {\n label: string\n href: string\n /** A 22 px lucide icon. */\n icon: ReactNode\n current?: boolean\n}\n\n/** Props of {@link BottomNav}. */\nexport interface BottomNavProps {\n /** Three to five tabs. */\n items: readonly BottomNavItem[]\n className?: string\n}\n\n/**\n * The BottomNav pattern of a mobile app: a tab bar with 48 px targets, above the home indicator safe area.\n * The current tab takes the brand text colour.\n *\n * @param props - The tabs.\n * @returns The tab bar.\n */\nexport function BottomNav ({ items, className }: BottomNavProps) {\n return (\n <nav\n data-slot='bottom-nav'\n aria-label='Tabs'\n className={cn('grid shrink-0 border-t bg-background px-2 pt-1.5 pb-[max(env(safe-area-inset-bottom),8px)]', className)}\n style={{ gridTemplateColumns: `repeat(${items.length}, minmax(0, 1fr))` }}\n >\n {items.map((item) => (\n <a\n key={item.href}\n href={item.href}\n aria-current={item.current ? 'page' : undefined}\n className='flex min-h-12 flex-col items-center justify-center gap-0.5 rounded-xl text-muted-foreground no-underline outline-none focus-visible:ring-2 focus-visible:ring-ring aria-[current=page]:text-brand-text [&_svg]:size-[22px]'\n >\n <span aria-hidden='true' className='flex'>{item.icon}</span>\n <span className='text-[11px] font-medium'>{item.label}</span>\n </a>\n ))}\n </nav>\n )\n}\n","import { Check, X } from 'lucide-react'\nimport type { ReactNode } from 'react'\nimport { cn } from '../class-names'\nimport { Badge, Button } from '../ui'\n\n/** One check of a captured page. */\nexport interface CaptureCheck {\n label: string\n /** The detail at the end of the row, such as \"0.4° skew\" or \"Missing\". */\n detail: string\n passed: boolean\n}\n\n/** Props of {@link CaptureFrame}. */\nexport interface CaptureFrameProps {\n /** The page being captured, such as \"Contract 0417 · page 2 of 3\". */\n title: ReactNode\n /** The camera view or the captured image. */\n children: ReactNode\n /** The title of the result sheet, such as \"Page 2 checks\". */\n checksTitle: ReactNode\n checks: readonly CaptureCheck[]\n onClose: () => void\n /** The actions under the checks, such as Retake and Send back for signature. */\n actions: ReactNode\n className?: string\n}\n\n/**\n * The CaptureFrame pattern of a mobile scanning app: a dark camera view with a close button and the page name,\n * and a sheet of checks. A check always shows a word and an icon beside its colour.\n *\n * @param props - Title, camera view, checks, close handler and actions.\n * @returns The capture screen.\n */\nexport function CaptureFrame ({ title, children, checksTitle, checks, onClose, actions, className }: CaptureFrameProps) {\n const failed = checks.filter((check) => !check.passed).length\n\n return (\n <div data-slot='capture-frame' className={cn('flex h-full flex-col bg-[#0e0d12]', className)}>\n <div className='relative grid min-h-[440px] flex-1 place-items-center overflow-hidden'>\n <div className='absolute inset-x-4 top-[max(env(safe-area-inset-top),16px)] z-10 flex items-center justify-between'>\n <Button size='icon' aria-label='Close camera' onClick={onClose} className='rounded-full bg-white/14 text-white hover:bg-white/24'><X /></Button>\n <span className='text-sm font-semibold text-white'>{title}</span>\n <span className='size-(--control-h)' aria-hidden='true' />\n </div>\n {children}\n </div>\n <section aria-label='Checks' className='flex flex-col gap-3 rounded-t-3xl bg-background px-5 pt-5 pb-[max(env(safe-area-inset-bottom),24px)]'>\n <div className='flex items-center gap-2.5'>\n <h2 className='m-0 type-h3 text-[19px]'>{checksTitle}</h2>\n {failed > 0\n ? <Badge variant='danger' dot className='ms-auto'>{failed} failed</Badge>\n : <Badge variant='success' dot className='ms-auto'>All passed</Badge>}\n </div>\n <ul className='m-0 flex list-none flex-col p-0'>\n {checks.map((check) => (\n <li key={check.label} className='flex min-h-10 items-center gap-3 border-b'>\n <span className={cn('grid size-6 shrink-0 place-items-center rounded-full [&_svg]:size-3.5', check.passed ? 'bg-success-soft text-success' : 'bg-destructive-soft text-destructive')}>\n {check.passed ? <Check strokeWidth={3} aria-label='Passed' /> : <X strokeWidth={3} aria-label='Failed' />}\n </span>\n <span className='flex-1 text-[15px]'>{check.label}</span>\n <span className='text-xs text-muted-foreground'>{check.detail}</span>\n </li>\n ))}\n </ul>\n <div className='mt-1 flex gap-2.5 [&>*]:flex-1'>{actions}</div>\n </section>\n </div>\n )\n}\n","import { Bookmark, Mic, Pause, Play } from 'lucide-react'\nimport { cn } from '../class-names'\nimport { formatTimecode } from '../timecode'\nimport { Badge, Button } from '../ui'\n\n/** The state of a recording. */\nexport type RecordingState = 'idle' | 'recording' | 'paused'\n\n/** Props of {@link RecordButton}. */\nexport interface RecordButtonProps {\n state: RecordingState\n /** The time recorded so far, in seconds. */\n elapsed: number\n /** Recent input levels from 0 to 1, newest last, for the waveform. */\n levels?: readonly number[]\n onStart: () => void\n onPause: () => void\n onResume: () => void\n /** Adds a marker at the current time. The marker button shows only while recording. */\n onMarker?: () => void\n className?: string\n}\n\n/**\n * The RecordButton pattern of a mobile app: the recording state with its word, the elapsed time, a waveform\n * in the brand colour, and one primary action that starts, pauses or resumes.\n *\n * @param props - State, elapsed time, levels and the action handlers.\n * @returns The recording card.\n */\nexport function RecordButton ({ state, elapsed, levels = [], onStart, onPause, onResume, onMarker, className }: RecordButtonProps) {\n const action = {\n idle: { label: 'Start recording', icon: <Mic />, onClick: onStart },\n recording: { label: 'Pause', icon: <Pause />, onClick: onPause },\n paused: { label: 'Resume', icon: <Play />, onClick: onResume },\n }[state]\n\n return (\n <div data-slot='record-button' className={cn('flex flex-col gap-3.5 rounded-[20px] bg-brand-soft p-4', className)}>\n <div className='flex items-center gap-2'>\n {state === 'recording' && <Badge variant='danger' dot className='bg-card'>Recording</Badge>}\n {state === 'paused' && <Badge variant='warning' className='bg-card'>Paused</Badge>}\n {state === 'idle' && <Badge variant='outline' className='bg-card'>Not recording</Badge>}\n <span className='ms-auto text-[13px] font-semibold tabular-nums' aria-label='Recorded time'>{formatTimecode(elapsed, true)}</span>\n </div>\n {levels.length > 0 && (\n <div aria-hidden='true' className='flex h-10 items-center gap-[3px]'>\n {levels.map((level, index) => (\n // The bars are positions on a rolling meter, not items: the index is their identity.\n // eslint-disable-next-line @eslint-react/no-array-index-key\n <span key={index} className={cn('block w-1 rounded-full bg-brand', state !== 'recording' && 'opacity-45')} style={{ height: `${Math.round(6 + Math.min(1, Math.max(0, level)) * 30)}px` }} />\n ))}\n </div>\n )}\n <div className='flex gap-2.5'>\n <Button className='flex-1' onClick={action.onClick}>{action.icon}{action.label}</Button>\n {state === 'recording' && onMarker && (\n <Button variant='outline' size='icon' className='bg-card' aria-label='Add a marker' onClick={onMarker}><Bookmark /></Button>\n )}\n </div>\n </div>\n )\n}\n","import { type FormEvent, type ReactNode, useId } from 'react'\nimport { cn } from '../class-names'\nimport { Button, Input } from '../ui'\n\n/** Props of {@link CtaBand}. */\nexport interface CtaBandProps {\n title: ReactNode\n body?: ReactNode\n /** Called with the email address when the user sends the form. */\n onSubmit: (email: string) => void\n /** The field's accessible label and placeholder. Default \"Work email\". */\n inputLabel?: string\n /** The button label. Default \"Send\". */\n submitLabel?: string\n className?: string\n}\n\n/**\n * The CTABand pattern: a primary-colour band with a title and a one-field email form.\n *\n * @param props - Title, body, submit handler and labels.\n * @returns The section.\n */\nexport function CtaBand ({ title, body, onSubmit, inputLabel = 'Work email', submitLabel = 'Send', className }: CtaBandProps) {\n const id = useId()\n\n function submit (event: FormEvent<HTMLFormElement>) {\n event.preventDefault()\n const email = new FormData(event.currentTarget).get('email')\n if (typeof email === 'string' && email.trim()) onSubmit(email.trim())\n }\n\n return (\n <section data-slot='cta-band' className={cn('py-22', className)}>\n <div className='mx-auto max-w-[1200px] px-6'>\n <div className='grid grid-cols-[repeat(auto-fit,minmax(320px,1fr))] items-center gap-8 rounded-[28px] bg-primary p-[clamp(28px,5vw,56px)] text-primary-foreground'>\n <div className='flex flex-col gap-2.5'>\n <h2 className='m-0 type-h2 text-4xl text-inherit'>{title}</h2>\n {body && <p className='m-0 text-[17px] opacity-90'>{body}</p>}\n </div>\n <form onSubmit={submit} className='flex flex-wrap gap-2.5'>\n <label htmlFor={id} className='sr-only'>{inputLabel}</label>\n <Input id={id} name='email' type='email' required autoComplete='email' placeholder={inputLabel} className='flex-[1_1_220px] border-transparent' />\n <Button type='submit' className='bg-foreground text-background hover:bg-foreground/90'>{submitLabel}</Button>\n </form>\n </div>\n </div>\n </section>\n )\n}\n","import type { ReactNode } from 'react'\nimport { cn } from '../class-names'\nimport { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '../ui'\n\n/** One question of a {@link Faq}. */\nexport interface FaqItem {\n question: string\n answer: ReactNode\n}\n\n/** Props of {@link Faq}. */\nexport interface FaqProps {\n title: ReactNode\n items: readonly FaqItem[]\n className?: string\n}\n\n/**\n * The FAQ pattern: a title and an accordion of questions. One answer opens at a time.\n *\n * @param props - Title and questions.\n * @returns The section.\n */\nexport function Faq ({ title, items, className }: FaqProps) {\n return (\n <section data-slot='faq' className={cn('py-22', className)}>\n <div className='mx-auto grid max-w-[1200px] grid-cols-[repeat(auto-fit,minmax(340px,1fr))] items-start gap-12 px-6'>\n <h2 className='m-0 type-h2 text-4xl'>{title}</h2>\n <Accordion type='single' collapsible>\n {items.map((item) => (\n <AccordionItem key={item.question} value={item.question}>\n <AccordionTrigger>{item.question}</AccordionTrigger>\n <AccordionContent className='text-[15px]'>{item.answer}</AccordionContent>\n </AccordionItem>\n ))}\n </Accordion>\n </div>\n </section>\n )\n}\n","import type { ReactNode } from 'react'\nimport { cn } from '../class-names'\n\n/** One feature of a {@link FeatureGrid}. */\nexport interface Feature {\n /** A 24 px lucide icon. It sits in a 44 px brand-soft tile. */\n icon: ReactNode\n title: string\n body: string\n}\n\n/** Props of {@link FeatureGrid}. */\nexport interface FeatureGridProps {\n title?: ReactNode\n lead?: ReactNode\n features: readonly Feature[]\n className?: string\n}\n\n/**\n * The FeatureGrid pattern: a section of feature cards on the canvas colour.\n *\n * @param props - Title, lead and features.\n * @returns The section.\n */\nexport function FeatureGrid ({ title, lead, features, className }: FeatureGridProps) {\n return (\n <section data-slot='feature-grid' className={cn('border-y bg-canvas py-22', className)}>\n <div className='mx-auto flex max-w-[1200px] flex-col gap-10 px-6'>\n {(title || lead) && (\n <div className='flex max-w-[720px] flex-col gap-2.5'>\n {title && <h2 className='m-0 type-h2 text-4xl'>{title}</h2>}\n {lead && <p className='m-0 type-lead'>{lead}</p>}\n </div>\n )}\n <ul className='m-0 grid list-none grid-cols-[repeat(auto-fit,minmax(300px,1fr))] gap-4 p-0'>\n {features.map((feature) => (\n <li key={feature.title} className='flex flex-col gap-3 rounded-2xl border bg-card p-6 shadow-xs'>\n <span aria-hidden='true' className='grid size-11 place-items-center rounded-xl bg-brand-soft text-brand-text [&_svg]:size-6'>{feature.icon}</span>\n <h3 className='m-0 type-h3'>{feature.title}</h3>\n <p className='m-0 text-[15px] text-muted-foreground'>{feature.body}</p>\n </li>\n ))}\n </ul>\n </div>\n </section>\n )\n}\n","import type { ReactNode } from 'react'\nimport { cn } from '../class-names'\nimport { Badge } from '../ui'\n\n/** Props of {@link Hero}. */\nexport interface HeroProps {\n /** A short label over the title, on brand-soft. */\n eyebrow?: ReactNode\n /** The headline, in DM Sans display. */\n title: ReactNode\n /** The paragraph under the headline. */\n lead?: ReactNode\n /** The calls to action, usually one primary and one outline large button. */\n actions?: ReactNode\n className?: string\n}\n\n/**\n * The Hero pattern: the opening section of a website or product page.\n *\n * @param props - Eyebrow, title, lead and actions.\n * @returns The hero section.\n */\nexport function Hero ({ eyebrow, title, lead, actions, className }: HeroProps) {\n return (\n <section data-slot='hero' className={cn('pt-22 pb-14', className)}>\n <div className='mx-auto flex max-w-[1200px] flex-col items-start gap-5.5 px-6'>\n {eyebrow && <Badge variant='brand' className='h-7 px-3 text-[13px]'>{eyebrow}</Badge>}\n <h1 className='m-0 max-w-[980px] type-display text-[clamp(40px,6vw,72px)]'>{title}</h1>\n {lead && <p className='m-0 max-w-[680px] type-lead text-[19px]'>{lead}</p>}\n {actions && <div className='flex flex-wrap gap-3'>{actions}</div>}\n </div>\n </section>\n )\n}\n","import type { ReactNode } from 'react'\nimport { cn } from '../class-names'\n\n/** One step of {@link HowItWorks}. */\nexport interface HowItWorksStep {\n title: string\n body: string\n}\n\n/** Props of {@link HowItWorks}. */\nexport interface HowItWorksProps {\n title: ReactNode\n lead?: ReactNode\n /** A link under the lead, such as \"How an engagement works\". */\n link?: ReactNode\n steps: readonly HowItWorksStep[]\n className?: string\n}\n\n/**\n * The HowItWorks pattern: a title on one side and numbered steps on the other.\n *\n * @param props - Title, lead, link and steps.\n * @returns The section.\n */\nexport function HowItWorks ({ title, lead, link, steps, className }: HowItWorksProps) {\n return (\n <section data-slot='how-it-works' className={cn('py-22', className)}>\n <div className='mx-auto grid max-w-[1200px] grid-cols-[repeat(auto-fit,minmax(340px,1fr))] items-start gap-12 px-6'>\n <div className='flex flex-col gap-3.5'>\n <h2 className='m-0 type-h2 text-4xl'>{title}</h2>\n {lead && <p className='m-0 type-lead'>{lead}</p>}\n {link}\n </div>\n <ol className='m-0 flex list-none flex-col p-0'>\n {steps.map((step, index) => (\n <li key={step.title} className='grid grid-cols-[44px_minmax(0,1fr)] gap-4.5 border-b py-4.5'>\n <span aria-hidden='true' className='grid size-11 place-items-center rounded-full border-[1.5px] border-brand font-bold text-brand-text'>{index + 1}</span>\n <span className='flex flex-col gap-1'>\n <span className='type-h3'>{step.title}</span>\n <span className='text-[15px] text-muted-foreground'>{step.body}</span>\n </span>\n </li>\n ))}\n </ol>\n </div>\n </section>\n )\n}\n","import { Dialog as DialogPrimitive } from 'radix-ui'\nimport { type CSSProperties, type ReactNode, useEffect, useRef, useState } from 'react'\nimport { cn } from '../class-names'\nimport { Button, MenuIcon } from '../ui'\n\n/** A link of the {@link MobileMenu}. */\nexport interface MobileMenuLink {\n label: string\n href: string\n}\n\n/** Props of {@link MobileMenu}. */\nexport interface MobileMenuProps {\n links: readonly MobileMenuLink[]\n /** The actions at the foot of the panel, such as Sign in and Talk to us. */\n actions?: ReactNode\n /** The accessible name of the navigation. Default \"Main\". */\n label?: string\n /** Classes for the toggle button, such as `md:hidden`. */\n className?: string\n}\n\n/** How long the menu takes to close: the hold animation of its content (menu-hold, 400 ms). */\nconst CLOSE_MS = 400\n\n/** Where the toggle is on screen when the menu opens. */\ninterface ToggleBox {\n left: number\n top: number\n width: number\n height: number\n}\n\n/**\n * The mobile menu of a website. The panel grows out of the toggle as a circle while the page behind blurs and turns\n * grey, and the links fade in one after another. The toggle twirls into an X and back. With reduced motion, the\n * panel and the backdrop only fade.\n *\n * @param props - Links, actions, the navigation label and the toggle's classes.\n * @returns The toggle, and the menu while it is open.\n */\nexport function MobileMenu ({ links, actions, label = 'Main', className }: MobileMenuProps) {\n const [open, setOpen] = useState(false)\n const [toggle, setToggle] = useState<ToggleBox>()\n // True from the open until the close animation ends. The page's toggle hides its own icon all that time, so only\n // the menu's toggle (drawn over it) shows bars, and the two icons never draw on top of each other.\n const [covered, setCovered] = useState(false)\n const toggleRef = useRef<HTMLButtonElement>(null)\n\n useEffect(() => {\n if (open) return\n const timer = setTimeout(() => setCovered(false), CLOSE_MS)\n\n return () => clearTimeout(timer)\n }, [open])\n\n // Measure the toggle again whenever the page's box changes while the menu is open (the scroll lock removing the\n // scrollbar, a rotation, a resize), so the menu's toggle and the reveal's centre stay on the page's toggle.\n useEffect(() => {\n if (!open) return\n const observer = new ResizeObserver(() => measure())\n observer.observe(document.documentElement)\n\n return () => observer.disconnect()\n }, [open])\n\n function measure (): void {\n const box = toggleRef.current?.getBoundingClientRect()\n if (box) setToggle({ left: box.left, top: box.top, width: box.width, height: box.height })\n }\n\n function changeOpen (next: boolean): void {\n if (next) measure()\n if (next) setCovered(true)\n setOpen(next)\n }\n\n const origin = toggle\n ? { '--menu-origin-x': `${toggle.left + toggle.width / 2}px`, '--menu-origin-y': `${toggle.top + toggle.height / 2}px` } as CSSProperties\n : undefined\n\n return (\n <DialogPrimitive.Root open={open} onOpenChange={changeOpen}>\n <DialogPrimitive.Trigger asChild>\n <Button ref={toggleRef} variant='ghost' size='icon' aria-label='Open menu' className={className}><MenuIcon className={covered ? 'invisible' : undefined} /></Button>\n </DialogPrimitive.Trigger>\n <DialogPrimitive.Portal>\n <DialogPrimitive.Overlay\n data-slot='mobile-menu-backdrop'\n className='fixed inset-0 z-50 backdrop-blur-[5px] backdrop-contrast-[.5] backdrop-saturate-[.3] backdrop-brightness-[1.3] dark:backdrop-brightness-[.7] data-[state=closed]:animate-fade-out data-[state=open]:animate-fade-in data-[state=closed]:[animation-duration:340ms] data-[state=open]:[animation-duration:420ms]'\n />\n <DialogPrimitive.Content\n data-slot='mobile-menu'\n aria-describedby={undefined}\n style={origin}\n className='group/menu d-mob pointer-events-none fixed inset-0 z-50 outline-none data-[state=closed]:animate-[menu-hold_400ms_both]'\n >\n <DialogPrimitive.Title className='sr-only'>Menu</DialogPrimitive.Title>\n {/* The shadow sits on a wrapper: a drop-shadow filter follows the clipped circle, a box-shadow would be clipped. */}\n <div className='fixed inset-0 [filter:drop-shadow(0_0_1px_rgb(20_18_26/0.4))_drop-shadow(-12px_16px_36px_rgb(20_18_26/0.4))] dark:[filter:drop-shadow(0_0_1px_rgb(255_255_255/0.45))_drop-shadow(-12px_16px_36px_rgb(0_0_0/0.7))]'>\n <div\n className={cn(\n 'fixed inset-0 animate-menu-reveal group-data-[state=closed]/menu:animate-menu-conceal',\n 'motion-reduce:animate-fade-in motion-reduce:group-data-[state=closed]/menu:animate-fade-out',\n )}\n >\n <div className='pointer-events-auto absolute inset-y-0 end-0 flex w-[min(340px,86vw)] flex-col gap-1 border-s bg-popover px-5 pt-21 pb-8 text-popover-foreground'>\n <nav aria-label={label} className='flex flex-col gap-1'>\n {links.map((link, index) => (\n <a\n key={link.href}\n href={link.href}\n onClick={() => changeOpen(false)}\n style={{ animationDelay: `${120 + index * 45}ms` }}\n className='animate-menu-item-in rounded-md px-2 py-3 text-base font-medium text-foreground no-underline outline-none transition-colors duration-150 hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring motion-reduce:animate-fade-in'\n >\n {link.label}\n </a>\n ))}\n </nav>\n {actions && (\n <div className='mt-auto flex animate-menu-item-in flex-col gap-2 [animation-delay:320ms] motion-reduce:animate-fade-in'>{actions}</div>\n )}\n </div>\n </div>\n </div>\n <DialogPrimitive.Close asChild>\n <Button\n variant='ghost'\n size='icon'\n aria-label='Close menu'\n className='pointer-events-auto fixed'\n style={toggle ? { left: toggle.left, top: toggle.top, width: toggle.width, height: toggle.height } : { right: 24, top: 12 }}\n >\n <MenuIcon open={open} />\n </Button>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n </DialogPrimitive.Root>\n )\n}\n","import { Check } from 'lucide-react'\nimport { type ReactNode, useState } from 'react'\nimport { cn } from '../class-names'\nimport { Badge, Button, ToggleGroup, ToggleGroupItem } from '../ui'\n\n/** How often a plan is billed. */\nexport type Billing = 'monthly' | 'yearly'\n\n/** One plan of a {@link PricingTable}. */\nexport interface PricingPlan {\n name: string\n /** The price, the same for both billings, or one per billing. */\n price: string | Readonly<Record<Billing, string>>\n blurb: string\n features: readonly string[]\n cta: { label: string, href: string }\n /** The plan most teams pick. It gets a brand border, a badge and the primary button. */\n featured?: boolean\n}\n\n/** Props of {@link PricingTable}. */\nexport interface PricingTableProps {\n title: ReactNode\n lead?: ReactNode\n plans: readonly PricingPlan[]\n /** The billing shown first. */\n defaultBilling?: Billing\n /** A note under the plans, such as a placeholder warning. */\n note?: ReactNode\n /** The featured badge text. Default \"Most teams\". */\n featuredLabel?: string\n className?: string\n}\n\n/**\n * The PricingTable pattern: plan cards with a monthly and yearly switch.\n *\n * @param props - Title, lead, plans, first billing and note.\n * @returns The section.\n */\nexport function PricingTable ({ title, lead, plans, defaultBilling = 'monthly', note, featuredLabel = 'Most teams', className }: PricingTableProps) {\n const [billing, setBilling] = useState<Billing>(defaultBilling)\n\n return (\n <section data-slot='pricing-table' className={cn('border-y bg-canvas py-22', className)}>\n <div className='mx-auto flex max-w-[1200px] flex-col gap-8 px-6'>\n <div className='flex flex-wrap items-end justify-between gap-5'>\n <div className='flex flex-col gap-2.5'>\n <h2 className='m-0 type-h2 text-4xl'>{title}</h2>\n {lead && <p className='m-0 type-lead'>{lead}</p>}\n </div>\n <ToggleGroup type='single' value={billing} onValueChange={(value) => value && setBilling(value as Billing)} aria-label='Billing'>\n <ToggleGroupItem value='monthly'>Monthly</ToggleGroupItem>\n <ToggleGroupItem value='yearly'>Yearly</ToggleGroupItem>\n </ToggleGroup>\n </div>\n <ul className='m-0 grid list-none grid-cols-[repeat(auto-fit,minmax(280px,1fr))] gap-4 p-0'>\n {plans.map((plan) => (\n <li\n key={plan.name}\n aria-label={plan.name}\n className={cn('flex flex-col gap-3.5 rounded-2xl border bg-card p-7 shadow-xs', plan.featured && 'border-brand shadow-[0_0_0_1px_var(--brand),var(--elevation-md)]')}\n >\n <div className='flex items-center justify-between'>\n <h3 className='m-0 type-h3'>{plan.name}</h3>\n {plan.featured && <Badge>{featuredLabel}</Badge>}\n </div>\n <span className='font-display text-[34px] font-extrabold tracking-tight'>{typeof plan.price === 'string' ? plan.price : plan.price[billing]}</span>\n <p className='m-0 text-[15px] text-muted-foreground'>{plan.blurb}</p>\n <hr className='m-0 h-px border-0 bg-border' />\n <ul className='m-0 flex list-none flex-col gap-2.5 p-0 text-[15px]'>\n {plan.features.map((feature) => (\n <li key={feature} className='flex gap-2.5'><Check className='mt-0.5 size-4.5 shrink-0 text-brand-text' strokeWidth={2} aria-hidden='true' />{feature}</li>\n ))}\n </ul>\n <Button asChild variant={plan.featured ? 'default' : 'outline'} className='mt-auto'>\n <a href={plan.cta.href}>{plan.cta.label}</a>\n </Button>\n </li>\n ))}\n </ul>\n {note && <p className='m-0 text-xs text-muted-foreground'>{note}</p>}\n </div>\n </section>\n )\n}\n","import { cn } from '../class-names'\nimport { PRODUCT_CATALOGUE, ProductLogo } from '../product'\nimport type { Product } from '../tokens'\nimport { Badge } from '../ui'\n\n/** Props of {@link ProductCard}. */\nexport interface ProductCardProps {\n /** The product. The card takes its accent, so a grid of cards shows each product's colour. */\n product: Product\n /** Where the card links. */\n href: string\n /** Replaces the catalogue tagline. */\n description?: string\n /** Replaces the catalogue stage. */\n stage?: string\n className?: string\n}\n\n/**\n * The ProductCard pattern: a linked card with a brand band, the logo, the name, one sentence and the stage.\n *\n * @param props - Product, link, and optional copy.\n * @returns The card link.\n */\nexport function ProductCard ({ product, href, description, stage, className }: ProductCardProps) {\n const entry = PRODUCT_CATALOGUE[product]\n\n return (\n <a\n data-slot='product-card'\n data-product={product}\n href={href}\n className={cn('flex flex-col overflow-hidden rounded-2xl border bg-card text-card-foreground no-underline shadow-xs transition-shadow hover:shadow-sm focus-visible:outline-2 focus-visible:outline-ring', className)}\n >\n <span aria-hidden='true' className='block h-1.5 bg-brand' />\n <span className='flex flex-col gap-3.5 p-5.5'>\n <ProductLogo product={product} alt='' className='size-11' />\n <span className='flex flex-col gap-1'>\n <span className='font-display text-2xl font-extrabold italic text-brand-text'>{entry.name}</span>\n <span className='text-[13px] leading-normal text-muted-foreground'>{description ?? entry.tagline}</span>\n </span>\n <Badge variant='outline' className='self-start'>{stage ?? entry.stage}</Badge>\n </span>\n </a>\n )\n}\n","import type { ReactNode } from 'react'\nimport { cn } from '../class-names'\nimport { ProductLogo } from '../product'\n\n/** A column of links in a {@link SiteFooter}. */\nexport interface FooterColumn {\n title: string\n links: readonly { label: string, href: string }[]\n}\n\n/** Props of {@link SiteFooter}. */\nexport interface SiteFooterProps {\n /** The line under the brand. */\n tagline?: ReactNode\n columns: readonly FooterColumn[]\n /** The bottom row, such as copyright and legal links. */\n legal?: ReactNode\n className?: string\n}\n\n/**\n * The SiteFooter pattern: the brand and tagline, columns of links, and a legal row.\n *\n * @param props - Tagline, link columns and legal row.\n * @returns The footer.\n */\nexport function SiteFooter ({ tagline, columns, legal, className }: SiteFooterProps) {\n return (\n <footer data-slot='site-footer' className={cn('border-t pt-14 pb-10', className)}>\n <div className='mx-auto grid max-w-[1200px] grid-cols-[repeat(auto-fit,minmax(160px,1fr))] gap-8 px-6'>\n <div className='col-span-2 flex flex-col gap-3'>\n <span className='flex items-center gap-2'>\n <ProductLogo product='talogic' alt='' className='size-7' />\n <span className='font-display text-xl font-extrabold tracking-tight'>Talogic</span>\n </span>\n {tagline && <p className='m-0 max-w-[300px] text-[13px] text-muted-foreground'>{tagline}</p>}\n </div>\n {columns.map((column) => (\n <nav key={column.title} aria-label={column.title} className='flex flex-col gap-2 text-[13px]'>\n <h2 className='m-0 type-h4'>{column.title}</h2>\n {column.links.map((link) => <a key={link.href} href={link.href} className='text-muted-foreground no-underline hover:text-foreground'>{link.label}</a>)}\n </nav>\n ))}\n </div>\n {legal && <div className='mx-auto mt-10 flex max-w-[1200px] flex-wrap justify-between gap-3 px-6 text-xs text-muted-foreground'>{legal}</div>}\n </footer>\n )\n}\n","import type { ReactNode } from 'react'\nimport { cn } from '../class-names'\nimport { ProductLogo } from '../product'\nimport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n} from '../ui'\nimport { MobileMenu } from './mobile-menu.component'\n\n/** A link in the site navigation. */\nexport interface SiteLink {\n label: string\n href: string\n /** One line under the label, in a drop-down panel. */\n description?: string\n}\n\n/** A top-level entry of the site navigation: a link, or a drop-down of links. */\nexport interface SiteNavEntry {\n label: string\n href?: string\n links?: readonly SiteLink[]\n}\n\n/** Props of {@link SiteHeader}. */\nexport interface SiteHeaderProps {\n /** The main navigation. */\n nav: readonly SiteNavEntry[]\n /** The actions at the end, such as Sign in and Talk to us. */\n actions?: ReactNode\n /** The brand at the start. Default the Talogic symbol and name, linking home. */\n brand?: ReactNode\n className?: string\n}\n\n/**\n * The SiteHeader pattern: a sticky, blurred bar with the brand, the main navigation and the actions. Below\n * 768 px the navigation moves into the animated {@link MobileMenu}.\n *\n * @param props - Navigation, actions and brand.\n * @returns The header.\n */\nexport function SiteHeader ({ nav, actions, brand, className }: SiteHeaderProps) {\n const home = brand ?? (\n <a href='/' className='flex items-center gap-2 no-underline' aria-label='Talogic home'>\n <ProductLogo product='talogic' alt='' className='size-7' />\n <span className='font-display text-xl font-extrabold tracking-tight text-foreground'>Talogic</span>\n </a>\n )\n\n return (\n <header data-slot='site-header' className={cn('sticky top-0 z-40 border-b bg-background/88 backdrop-blur-md', className)}>\n <div className='mx-auto flex h-[68px] max-w-[1200px] items-center gap-7 px-6'>\n {home}\n <NavigationMenu className='hidden md:flex' aria-label='Main'>\n <NavigationMenuList>\n {nav.map((entry) => (\n <NavigationMenuItem key={entry.label}>\n {entry.links\n ? (\n <>\n <NavigationMenuTrigger>{entry.label}</NavigationMenuTrigger>\n <NavigationMenuContent>\n <ul className='m-0 grid w-[420px] list-none gap-1 p-0'>\n {entry.links.map((link) => (\n <li key={link.href}>\n <NavigationMenuLink href={link.href} className='flex h-auto flex-col items-start gap-0.5 py-2'>\n <span className='text-sm font-semibold'>{link.label}</span>\n {link.description && <span className='text-[13px] font-normal text-muted-foreground'>{link.description}</span>}\n </NavigationMenuLink>\n </li>\n ))}\n </ul>\n </NavigationMenuContent>\n </>\n )\n : <NavigationMenuLink href={entry.href}>{entry.label}</NavigationMenuLink>}\n </NavigationMenuItem>\n ))}\n </NavigationMenuList>\n </NavigationMenu>\n <div className='ms-auto hidden items-center gap-2 md:flex'>{actions}</div>\n <MobileMenu\n className='ms-auto md:hidden'\n links={nav.flatMap((entry) => entry.links ?? [{ label: entry.label, href: entry.href ?? '#' }])}\n actions={actions}\n />\n </div>\n </header>\n )\n}\n"],"mappings":";;;;;;;;;;;;AASA,SAAgB6O,EAAI,GAA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