@adea-ai/ui 0.99.2 → 0.99.4

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 (75) hide show
  1. package/dist/components/composites/workspace-mark/workspace-mark.d.ts.map +1 -1
  2. package/dist/components/composites/workspace-mark/workspace-mark.js +2 -2
  3. package/dist/components/composites/workspace-mark/workspace-mark.js.map +1 -1
  4. package/dist/components/conversation/message-row.d.ts.map +1 -1
  5. package/dist/components/conversation/message-row.js +2 -2
  6. package/dist/components/conversation/message-row.js.map +1 -1
  7. package/dist/components/conversation/thread-panel.d.ts.map +1 -1
  8. package/dist/components/conversation/thread-panel.js +1 -1
  9. package/dist/components/conversation/thread-panel.js.map +1 -1
  10. package/dist/components/ui/badge/badge.d.ts +1 -1
  11. package/dist/components/ui/badge/badge.d.ts.map +1 -1
  12. package/dist/components/ui/badge/badge.js +8 -1
  13. package/dist/components/ui/badge/badge.js.map +1 -1
  14. package/dist/components/ui/context-menu/context-menu.d.ts +8 -0
  15. package/dist/components/ui/context-menu/context-menu.d.ts.map +1 -1
  16. package/dist/components/ui/context-menu/context-menu.js +8 -0
  17. package/dist/components/ui/context-menu/context-menu.js.map +1 -1
  18. package/dist/components/ui/drawer/drawer.d.ts +8 -1
  19. package/dist/components/ui/drawer/drawer.d.ts.map +1 -1
  20. package/dist/components/ui/drawer/drawer.js.map +1 -1
  21. package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +8 -0
  22. package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts.map +1 -1
  23. package/dist/components/ui/dropdown-menu/dropdown-menu.js +8 -0
  24. package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +1 -1
  25. package/dist/components/ui/menubar/menubar.d.ts +8 -0
  26. package/dist/components/ui/menubar/menubar.d.ts.map +1 -1
  27. package/dist/components/ui/menubar/menubar.js +8 -0
  28. package/dist/components/ui/menubar/menubar.js.map +1 -1
  29. package/dist/components/ui/navigation-menu/navigation-menu.d.ts +14 -2
  30. package/dist/components/ui/navigation-menu/navigation-menu.d.ts.map +1 -1
  31. package/dist/components/ui/navigation-menu/navigation-menu.js +28 -23
  32. package/dist/components/ui/navigation-menu/navigation-menu.js.map +1 -1
  33. package/dist/components/ui/tabs/tabs.d.ts +6 -0
  34. package/dist/components/ui/tabs/tabs.d.ts.map +1 -1
  35. package/dist/components/ui/tabs/tabs.js +7 -1
  36. package/dist/components/ui/tabs/tabs.js.map +1 -1
  37. package/dist/components/ui/toast/toast.d.ts.map +1 -1
  38. package/dist/components/ui/toast/toast.js +19 -6
  39. package/dist/components/ui/toast/toast.js.map +1 -1
  40. package/dist/components/ui/tooltip/tooltip.d.ts.map +1 -1
  41. package/dist/components/ui/tooltip/tooltip.js +1 -0
  42. package/dist/components/ui/tooltip/tooltip.js.map +1 -1
  43. package/dist/lib/version-notes.d.ts +6 -0
  44. package/dist/lib/version-notes.d.ts.map +1 -1
  45. package/dist/lib/version-notes.js +9 -1
  46. package/dist/lib/version-notes.js.map +1 -1
  47. package/dist/r/src/components/composites/workspace-mark/workspace-mark.tsx +13 -2
  48. package/dist/r/src/components/conversation/message-row.tsx +6 -1
  49. package/dist/r/src/components/conversation/thread-panel.tsx +4 -1
  50. package/dist/r/src/components/ui/badge/badge.tsx +7 -0
  51. package/dist/r/src/components/ui/context-menu/context-menu.tsx +8 -0
  52. package/dist/r/src/components/ui/drawer/drawer.tsx +8 -1
  53. package/dist/r/src/components/ui/dropdown-menu/dropdown-menu.tsx +8 -0
  54. package/dist/r/src/components/ui/menubar/menubar.tsx +8 -0
  55. package/dist/r/src/components/ui/navigation-menu/navigation-menu.tsx +42 -28
  56. package/dist/r/src/components/ui/tabs/tabs.tsx +7 -1
  57. package/dist/r/src/components/ui/toast/toast.tsx +21 -6
  58. package/dist/r/src/components/ui/tooltip/tooltip.tsx +3 -0
  59. package/dist/r/src/lib/version-notes.ts +8 -0
  60. package/dist/r/src/styles/base.css +13 -0
  61. package/package.json +1 -1
  62. package/src/components/composites/workspace-mark/workspace-mark.tsx +13 -2
  63. package/src/components/conversation/message-row.tsx +6 -1
  64. package/src/components/conversation/thread-panel.tsx +4 -1
  65. package/src/components/ui/badge/badge.tsx +7 -0
  66. package/src/components/ui/context-menu/context-menu.tsx +8 -0
  67. package/src/components/ui/drawer/drawer.tsx +8 -1
  68. package/src/components/ui/dropdown-menu/dropdown-menu.tsx +8 -0
  69. package/src/components/ui/menubar/menubar.tsx +8 -0
  70. package/src/components/ui/navigation-menu/navigation-menu.tsx +42 -28
  71. package/src/components/ui/tabs/tabs.tsx +7 -1
  72. package/src/components/ui/toast/toast.tsx +21 -6
  73. package/src/components/ui/tooltip/tooltip.tsx +3 -0
  74. package/src/lib/version-notes.ts +8 -0
  75. package/src/styles/base.css +13 -0
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-menu.js","names":["DropdownMenu","KobalteDropdownMenu","Check","ChevronRight","Circle","ComponentProps","splitProps","menuContentPadding","destructiveMenuItem","menuItem","menuLabel","menuSeparator","overlayMotion","overlaySurface","popoverArrow","cn","props","local","rest","_$createComponent","_$mergeProps","modal","DropdownMenuTrigger","Trigger","DropdownMenuPortal","Portal","DropdownMenuContentProps","Content","hideArrow","portalMount","HTMLElement","DropdownMenuContent","mount","children","class","_$memo","Arrow","DropdownMenuItem","Item","variant","shortcut","keyshortcuts","aria-keyshortcuts","_el$","_tmpl$","_$insert","DropdownMenuShortcut","_el$2","_tmpl$2","_$spread","DropdownMenuCheckboxItem","CheckboxItem","ItemIndicator","DropdownMenuRadioGroup","RadioGroup","DropdownMenuRadioItem","RadioItem","DropdownMenuLabel","GroupLabel","DropdownMenuGroup","Group","DropdownMenuSeparator","Separator","DropdownMenuSub","Sub","DropdownMenuSubTrigger","SubTrigger","DropdownMenuSubContent","SubContent","DropdownMenu","_$createComponent","KobalteDropdownMenu","_$mergeProps","_$memo"],"sources":["../../../../src/components/ui/dropdown-menu/dropdown-menu.tsx"],"sourcesContent":["import { DropdownMenu as KobalteDropdownMenu } from '@kobalte/core/dropdown-menu'\nimport { Check, ChevronRight, Circle } from 'lucide-solid'\nimport type { ComponentProps } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport {\n menuContentPadding,\n destructiveMenuItem,\n menuItem,\n menuLabel,\n menuSeparator,\n overlayMotion,\n overlaySurface,\n popoverArrow,\n} from '#lib/overlay'\nimport { cn } from '#lib/utils'\n\n/**\n * DropdownMenu.\n *\n * A list of actions on a trigger, with radio groups for persistent choices\n * that fit naturally in a compact menu. Use Select for form inputs whose\n * selected value needs the field-style control, and Popover for arbitrary\n * content.\n *\n * Kobalte supplies the full menu contract — arrow keys, typeahead, the roving\n * highlight, Escape to close and return focus — which is exactly what a\n * hand-rolled `div` with click handlers gets wrong.\n * Menus are nonmodal by default so their generated focus guards do not become\n * invalid direct children of the ARIA menu. Set `modal` explicitly when the\n * surrounding interaction needs modal containment.\n *\n * The `destructive` variant marks the row with a status-coloured edge and\n * highlighted tint while keeping its label on the body foreground. Pairing it\n * with an AlertDialog is the caller's job.\n */\nexport function DropdownMenu(props: ComponentProps<typeof KobalteDropdownMenu>) {\n const [local, rest] = splitProps(props, ['modal'])\n return <KobalteDropdownMenu modal={local.modal ?? false} {...rest} />\n}\n\nexport function DropdownMenuTrigger(props: ComponentProps<typeof KobalteDropdownMenu.Trigger>) {\n return <KobalteDropdownMenu.Trigger {...props} />\n}\n\nexport function DropdownMenuPortal(props: ComponentProps<typeof KobalteDropdownMenu.Portal>) {\n return <KobalteDropdownMenu.Portal {...props} />\n}\n\nexport type DropdownMenuContentProps = ComponentProps<typeof KobalteDropdownMenu.Content> & {\n hideArrow?: boolean\n /** Mount under an owner element such as a modal, keeping the menu in its accessible subtree. */\n portalMount?: HTMLElement\n}\n\nexport function DropdownMenuContent(props: DropdownMenuContentProps) {\n const [local, rest] = splitProps(props, ['class', 'hideArrow', 'children', 'portalMount'])\n\n return (\n <KobalteDropdownMenu.Portal mount={local.portalMount}>\n <KobalteDropdownMenu.Content\n class={cn(\n overlaySurface,\n overlayMotion,\n 'z-(--z-menu) min-w-[10rem] origin-(--kb-menu-content-transform-origin) overflow-hidden',\n menuContentPadding,\n local.class\n )}\n {...rest}\n >\n {!local.hideArrow && <KobalteDropdownMenu.Arrow aria-hidden=\"true\" class={popoverArrow} />}\n {local.children}\n </KobalteDropdownMenu.Content>\n </KobalteDropdownMenu.Portal>\n )\n}\n\nexport function DropdownMenuItem(\n props: ComponentProps<typeof KobalteDropdownMenu.Item> & {\n /** Colour the row as a destructive action. Confirm it separately. */\n variant?: 'default' | 'destructive'\n /** Draw a shortcut hint at the trailing edge of the row. */\n shortcut?: string\n /**\n * The parseable chord behind `shortcut`, e.g. `Meta+E`. The drawn glyph is\n * `aria-hidden` — reading it out would pollute the item's accessible name —\n * so this is what assistive technology announces instead. Supply it\n * whenever `shortcut` is drawn.\n */\n keyshortcuts?: string\n }\n) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'variant',\n 'shortcut',\n 'keyshortcuts',\n 'children',\n ])\n\n return (\n <KobalteDropdownMenu.Item\n class={cn(\n menuItem,\n {\n [destructiveMenuItem]: local.variant === 'destructive',\n },\n local.class\n )}\n aria-keyshortcuts={local.keyshortcuts}\n {...rest}\n >\n {local.children}\n {local.shortcut ? (\n <span\n aria-hidden=\"true\"\n class=\"text-muted-foreground ms-auto font-mono text-2xs tracking-widest\"\n >\n {local.shortcut}\n </span>\n ) : null}\n </KobalteDropdownMenu.Item>\n )\n}\n\n/**\n * The chord drawn at a row's trailing edge.\n *\n * A component as well as the `shortcut` prop on an item, because a caller composing\n * a row by hand needs the same treatment — and because the alternative is every\n * caller inventing the same mono-and-dimmed span.\n *\n * The glyphs are decorative: the span is `aria-hidden` and the parseable chord\n * belongs in the row's `aria-keyshortcuts`, so the item's accessible name stays\n * exactly its label.\n */\nexport function DropdownMenuShortcut(props: ComponentProps<'span'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n aria-hidden=\"true\"\n class={cn('text-muted-foreground ms-auto font-mono text-2xs tracking-widest', local.class)}\n {...rest}\n />\n )\n}\n\nexport function DropdownMenuCheckboxItem(\n props: ComponentProps<typeof KobalteDropdownMenu.CheckboxItem>\n) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobalteDropdownMenu.CheckboxItem class={cn(menuItem, 'pe-8', local.class)} {...rest}>\n {local.children}\n <KobalteDropdownMenu.ItemIndicator\n data-slot=\"dropdown-menu-indicator\"\n class=\"absolute end-2 flex size-4 items-center justify-center text-primary\"\n >\n <Check class=\"size-4\" />\n </KobalteDropdownMenu.ItemIndicator>\n </KobalteDropdownMenu.CheckboxItem>\n )\n}\n\nexport function DropdownMenuRadioGroup(\n props: ComponentProps<typeof KobalteDropdownMenu.RadioGroup>\n) {\n return <KobalteDropdownMenu.RadioGroup {...props} />\n}\n\nexport function DropdownMenuRadioItem(props: ComponentProps<typeof KobalteDropdownMenu.RadioItem>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobalteDropdownMenu.RadioItem class={cn(menuItem, 'pe-8', local.class)} {...rest}>\n {local.children}\n {/* The indicator reads in the accent, like every other selected state in\n the system — a canvas-colored dot on a checked row reads as decoration. */}\n <KobalteDropdownMenu.ItemIndicator\n data-slot=\"dropdown-menu-indicator\"\n class=\"absolute end-2 flex size-4 items-center justify-center text-primary\"\n >\n <Circle class=\"size-2 fill-current\" />\n </KobalteDropdownMenu.ItemIndicator>\n </KobalteDropdownMenu.RadioItem>\n )\n}\n\nexport function DropdownMenuLabel(props: ComponentProps<typeof KobalteDropdownMenu.GroupLabel>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteDropdownMenu.GroupLabel class={cn(menuLabel, local.class)} {...rest} />\n}\n\nexport function DropdownMenuGroup(props: ComponentProps<typeof KobalteDropdownMenu.Group>) {\n return <KobalteDropdownMenu.Group {...props} />\n}\n\nexport function DropdownMenuSeparator(props: ComponentProps<typeof KobalteDropdownMenu.Separator>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteDropdownMenu.Separator class={cn(menuSeparator, local.class)} {...rest} />\n}\n\nexport function DropdownMenuSub(props: ComponentProps<typeof KobalteDropdownMenu.Sub>) {\n return <KobalteDropdownMenu.Sub {...props} />\n}\n\nexport function DropdownMenuSubTrigger(\n props: ComponentProps<typeof KobalteDropdownMenu.SubTrigger>\n) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobalteDropdownMenu.SubTrigger class={cn(menuItem, local.class)} {...rest}>\n {local.children}\n <ChevronRight class=\"ms-auto size-4\" />\n </KobalteDropdownMenu.SubTrigger>\n )\n}\n\nexport function DropdownMenuSubContent(\n props: ComponentProps<typeof KobalteDropdownMenu.SubContent>\n) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <KobalteDropdownMenu.Portal>\n <KobalteDropdownMenu.SubContent\n class={cn(\n overlaySurface,\n overlayMotion,\n 'z-(--z-menu) min-w-[8rem] origin-(--kb-menu-content-transform-origin) overflow-hidden',\n menuContentPadding,\n local.class\n )}\n {...rest}\n />\n </KobalteDropdownMenu.Portal>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,SAAgBA,eAAagB,OAAmD;CAC9E,MAAM,CAACC,OAAOC,QAAQZ,WAAWU,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBAAQlB,cAAmBmB,WAAA,EAAA,IAACC,QAAK;EAAA,OAAEJ,MAAMI,SAAS;CAAK,EAAA,GAAMH,IAAI,CAAA;AACnE;AAEA,SAAgBI,oBAAoBN,OAA2D;CAC7F,OAAAG,gBAAQlB,aAAoBsB,SAAYP,KAAK;AAC/C;AAEA,SAAgBQ,mBAAmBR,OAA0D;CAC3F,OAAAG,gBAAQlB,aAAoBwB,QAAWT,KAAK;AAC9C;AAQA,SAAgBe,oBAAoBf,OAAiC;CACnE,MAAM,CAACC,OAAOC,QAAQZ,WAAWU,OAAO;EAAC;EAAS;EAAa;EAAY;CAAa,C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AA,OAAAd,gBACxBlB,aAAoBmE,YAAUhD,WAAA,EAAA,KAAA,WAAA;GAAA,OACtBL,GACLF,gBACAD,eACA,yFAAA,OAEAK,MAAMiB,KACR;EAAC,EAAA,GACGhB,IAAI,CAAA;CAAA,EAAA,CAAA;AAIhB"}
1
+ {"version":3,"file":"dropdown-menu.js","names":["DropdownMenu","KobalteDropdownMenu","Check","ChevronRight","Circle","ComponentProps","splitProps","menuContentPadding","destructiveMenuItem","menuItem","menuLabel","menuSeparator","overlayMotion","overlaySurface","popoverArrow","cn","props","local","rest","_$createComponent","_$mergeProps","modal","DropdownMenuTrigger","Trigger","DropdownMenuPortal","Portal","DropdownMenuContentProps","Content","hideArrow","portalMount","HTMLElement","DropdownMenuContent","mount","children","class","_$memo","Arrow","DropdownMenuItem","Item","variant","shortcut","keyshortcuts","aria-keyshortcuts","_el$","_tmpl$","_$insert","DropdownMenuShortcut","_el$2","_tmpl$2","_$spread","DropdownMenuCheckboxItem","CheckboxItem","ItemIndicator","DropdownMenuRadioGroup","RadioGroup","DropdownMenuRadioItem","RadioItem","DropdownMenuLabel","GroupLabel","DropdownMenuGroup","Group","DropdownMenuSeparator","Separator","DropdownMenuSub","Sub","DropdownMenuSubTrigger","SubTrigger","DropdownMenuSubContent","SubContent","DropdownMenu","_$createComponent","KobalteDropdownMenu","_$mergeProps","_$memo"],"sources":["../../../../src/components/ui/dropdown-menu/dropdown-menu.tsx"],"sourcesContent":["import { DropdownMenu as KobalteDropdownMenu } from '@kobalte/core/dropdown-menu'\nimport { Check, ChevronRight, Circle } from 'lucide-solid'\nimport type { ComponentProps } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport {\n menuContentPadding,\n destructiveMenuItem,\n menuItem,\n menuLabel,\n menuSeparator,\n overlayMotion,\n overlaySurface,\n popoverArrow,\n} from '#lib/overlay'\nimport { cn } from '#lib/utils'\n\n/**\n * DropdownMenu.\n *\n * A list of actions on a trigger, with radio groups for persistent choices\n * that fit naturally in a compact menu. Use Select for form inputs whose\n * selected value needs the field-style control, and Popover for arbitrary\n * content.\n *\n * Kobalte supplies the full menu contract — arrow keys, typeahead, the roving\n * highlight, Escape to close and return focus — which is exactly what a\n * hand-rolled `div` with click handlers gets wrong.\n * Menus are nonmodal by default so their generated focus guards do not become\n * invalid direct children of the ARIA menu. Set `modal` explicitly when the\n * surrounding interaction needs modal containment.\n *\n * The `destructive` variant marks the row with a status-coloured edge and\n * highlighted tint while keeping its label on the body foreground. Pairing it\n * with an AlertDialog is the caller's job.\n */\nexport function DropdownMenu(props: ComponentProps<typeof KobalteDropdownMenu>) {\n const [local, rest] = splitProps(props, ['modal'])\n return <KobalteDropdownMenu modal={local.modal ?? false} {...rest} />\n}\n\nexport function DropdownMenuTrigger(props: ComponentProps<typeof KobalteDropdownMenu.Trigger>) {\n return <KobalteDropdownMenu.Trigger {...props} />\n}\n\nexport function DropdownMenuPortal(props: ComponentProps<typeof KobalteDropdownMenu.Portal>) {\n return <KobalteDropdownMenu.Portal {...props} />\n}\n\nexport type DropdownMenuContentProps = ComponentProps<typeof KobalteDropdownMenu.Content> & {\n hideArrow?: boolean\n /** Mount under an owner element such as a modal, keeping the menu in its accessible subtree. */\n portalMount?: HTMLElement\n}\n\nexport function DropdownMenuContent(props: DropdownMenuContentProps) {\n const [local, rest] = splitProps(props, ['class', 'hideArrow', 'children', 'portalMount'])\n\n return (\n <KobalteDropdownMenu.Portal mount={local.portalMount}>\n <KobalteDropdownMenu.Content\n class={cn(\n overlaySurface,\n overlayMotion,\n 'z-(--z-menu) min-w-[10rem] origin-(--kb-menu-content-transform-origin) overflow-hidden',\n menuContentPadding,\n local.class\n )}\n {...rest}\n >\n {!local.hideArrow && <KobalteDropdownMenu.Arrow aria-hidden=\"true\" class={popoverArrow} />}\n {local.children}\n </KobalteDropdownMenu.Content>\n </KobalteDropdownMenu.Portal>\n )\n}\n\nexport function DropdownMenuItem(\n props: ComponentProps<typeof KobalteDropdownMenu.Item> & {\n /** Colour the row as a destructive action. Confirm it separately. */\n variant?: 'default' | 'destructive'\n /** Draw a shortcut hint at the trailing edge of the row. */\n shortcut?: string\n /**\n * The parseable chord behind `shortcut`, e.g. `Meta+E`. The drawn glyph is\n * `aria-hidden` — reading it out would pollute the item's accessible name —\n * so this is what assistive technology announces instead. Supply it\n * whenever `shortcut` is drawn.\n */\n keyshortcuts?: string\n }\n) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'variant',\n 'shortcut',\n 'keyshortcuts',\n 'children',\n ])\n\n return (\n <KobalteDropdownMenu.Item\n class={cn(\n menuItem,\n {\n [destructiveMenuItem]: local.variant === 'destructive',\n },\n local.class\n )}\n aria-keyshortcuts={local.keyshortcuts}\n {...rest}\n >\n {local.children}\n {local.shortcut ? (\n <span\n aria-hidden=\"true\"\n class=\"text-muted-foreground ms-auto font-mono text-2xs tracking-widest\"\n >\n {local.shortcut}\n </span>\n ) : null}\n </KobalteDropdownMenu.Item>\n )\n}\n\n/**\n * The chord drawn at a row's trailing edge.\n *\n * A component as well as the `shortcut` prop on an item, because a caller composing\n * a row by hand needs the same treatment — and because the alternative is every\n * caller inventing the same mono-and-dimmed span.\n *\n * The glyphs are decorative: the span is `aria-hidden` and the parseable chord\n * belongs in the row's `aria-keyshortcuts`, so the item's accessible name stays\n * exactly its label.\n */\nexport function DropdownMenuShortcut(props: ComponentProps<'span'>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n aria-hidden=\"true\"\n class={cn('text-muted-foreground ms-auto font-mono text-2xs tracking-widest', local.class)}\n {...rest}\n />\n )\n}\n\nexport function DropdownMenuCheckboxItem(\n props: ComponentProps<typeof KobalteDropdownMenu.CheckboxItem>\n) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobalteDropdownMenu.CheckboxItem class={cn(menuItem, 'pe-8', local.class)} {...rest}>\n {local.children}\n <KobalteDropdownMenu.ItemIndicator\n data-slot=\"dropdown-menu-indicator\"\n class=\"absolute end-2 flex size-4 items-center justify-center text-primary\"\n >\n <Check class=\"size-4\" />\n </KobalteDropdownMenu.ItemIndicator>\n </KobalteDropdownMenu.CheckboxItem>\n )\n}\n\nexport function DropdownMenuRadioGroup(\n props: ComponentProps<typeof KobalteDropdownMenu.RadioGroup>\n) {\n return <KobalteDropdownMenu.RadioGroup {...props} />\n}\n\nexport function DropdownMenuRadioItem(props: ComponentProps<typeof KobalteDropdownMenu.RadioItem>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobalteDropdownMenu.RadioItem class={cn(menuItem, 'pe-8', local.class)} {...rest}>\n {local.children}\n {/* The indicator reads in the accent, like every other selected state in\n the system — a canvas-colored dot on a checked row reads as decoration. */}\n <KobalteDropdownMenu.ItemIndicator\n data-slot=\"dropdown-menu-indicator\"\n class=\"absolute end-2 flex size-4 items-center justify-center text-primary\"\n >\n <Circle class=\"size-2 fill-current\" />\n </KobalteDropdownMenu.ItemIndicator>\n </KobalteDropdownMenu.RadioItem>\n )\n}\n\n/**\n * The caption of a `DropdownMenuGroup`, and that group's accessible name. It must be a\n * child of the group it names: Kobalte reads the group from context, so a label\n * placed directly in the content throws `useMenuGroupContext must be used within\n * a Menu.Group` the moment the menu opens. For an ungrouped caption, wrap the\n * label and its items in a group anyway — the grouping is what a screen reader\n * announces.\n */\nexport function DropdownMenuLabel(props: ComponentProps<typeof KobalteDropdownMenu.GroupLabel>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteDropdownMenu.GroupLabel class={cn(menuLabel, local.class)} {...rest} />\n}\n\nexport function DropdownMenuGroup(props: ComponentProps<typeof KobalteDropdownMenu.Group>) {\n return <KobalteDropdownMenu.Group {...props} />\n}\n\nexport function DropdownMenuSeparator(props: ComponentProps<typeof KobalteDropdownMenu.Separator>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteDropdownMenu.Separator class={cn(menuSeparator, local.class)} {...rest} />\n}\n\nexport function DropdownMenuSub(props: ComponentProps<typeof KobalteDropdownMenu.Sub>) {\n return <KobalteDropdownMenu.Sub {...props} />\n}\n\nexport function DropdownMenuSubTrigger(\n props: ComponentProps<typeof KobalteDropdownMenu.SubTrigger>\n) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobalteDropdownMenu.SubTrigger class={cn(menuItem, local.class)} {...rest}>\n {local.children}\n <ChevronRight class=\"ms-auto size-4\" />\n </KobalteDropdownMenu.SubTrigger>\n )\n}\n\nexport function DropdownMenuSubContent(\n props: ComponentProps<typeof KobalteDropdownMenu.SubContent>\n) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <KobalteDropdownMenu.Portal>\n <KobalteDropdownMenu.SubContent\n class={cn(\n overlaySurface,\n overlayMotion,\n 'z-(--z-menu) min-w-[8rem] origin-(--kb-menu-content-transform-origin) overflow-hidden',\n menuContentPadding,\n local.class\n )}\n {...rest}\n />\n </KobalteDropdownMenu.Portal>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,SAAgBA,eAAagB,OAAmD;CAC9E,MAAM,CAACC,OAAOC,QAAQZ,WAAWU,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBAAQlB,cAAmBmB,WAAA,EAAA,IAACC,QAAK;EAAA,OAAEJ,MAAMI,SAAS;CAAK,EAAA,GAAMH,IAAI,CAAA;AACnE;AAEA,SAAgBI,oBAAoBN,OAA2D;CAC7F,OAAAG,gBAAQlB,aAAoBsB,SAAYP,KAAK;AAC/C;AAEA,SAAgBQ,mBAAmBR,OAA0D;CAC3F,OAAAG,gBAAQlB,aAAoBwB,QAAWT,KAAK;AAC9C;AAQA,SAAgBe,oBAAoBf,OAAiC;CACnE,MAAM,CAACC,OAAOC,QAAQZ,WAAWU,OAAO;EAAC;EAAS;EAAa;EAAY;CAAa,CAAC;CAEzF,OAAAG,gBACGlB,aAAoBwB,QAAM;EAAA,IAACO,QAAK;GAAA,OAAEf,MAAMY;EAAW;EAAA,IAAAI,WAAA;GAAA,OAAAd,g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MiB,KACR;EAAC,EAAA,GACGhB,IAAI,CAAA;CAAA,EAAA,CAAA;AAIhB"}
@@ -36,6 +36,14 @@ export declare function MenubarItem(props: ComponentProps<typeof KobalteMenubar.
36
36
  export declare function MenubarCheckboxItem(props: ComponentProps<typeof KobalteMenubar.CheckboxItem>): import("solid-js").JSX.Element;
37
37
  export declare function MenubarRadioGroup(props: ComponentProps<typeof KobalteMenubar.RadioGroup>): import("solid-js").JSX.Element;
38
38
  export declare function MenubarRadioItem(props: ComponentProps<typeof KobalteMenubar.RadioItem>): import("solid-js").JSX.Element;
39
+ /**
40
+ * The caption of a `MenubarGroup`, and that group's accessible name. It must be a
41
+ * child of the group it names: Kobalte reads the group from context, so a label
42
+ * placed directly in the content throws `useMenuGroupContext must be used within
43
+ * a Menu.Group` the moment the menu opens. For an ungrouped caption, wrap the
44
+ * label and its items in a group anyway — the grouping is what a screen reader
45
+ * announces.
46
+ */
39
47
  export declare function MenubarLabel(props: ComponentProps<typeof KobalteMenubar.GroupLabel>): import("solid-js").JSX.Element;
40
48
  export declare function MenubarGroup(props: ComponentProps<typeof KobalteMenubar.Group>): import("solid-js").JSX.Element;
41
49
  export declare function MenubarSeparator(props: ComponentProps<typeof KobalteMenubar.Separator>): import("solid-js").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"menubar.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/menubar/menubar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAEjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAc9C;;;;;;;;;;GAUG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,cAAc,CAAC,kCAWnE;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,kCAE5E;AAED,wBAAgB,cAAc,CAAC,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CAAC,kCAE9E;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,cAAc,CAAC,SAAS,CAAC,kCAGtF;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,cAAc,CAAC,GAAG,CAAC,kCAE1E;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,cAAc,CAAC,UAAU,CAAC,kCAQxF;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,cAAc,CAAC,UAAU,CAAC,kCAgBxF"}
@@ -104,6 +104,14 @@ function MenubarRadioItem(props) {
104
104
  })];
105
105
  } }));
106
106
  }
107
+ /**
108
+ * The caption of a `MenubarGroup`, and that group's accessible name. It must be a
109
+ * child of the group it names: Kobalte reads the group from context, so a label
110
+ * placed directly in the content throws `useMenuGroupContext must be used within
111
+ * a Menu.Group` the moment the menu opens. For an ungrouped caption, wrap the
112
+ * label and its items in a group anyway — the grouping is what a screen reader
113
+ * announces.
114
+ */
107
115
  function MenubarLabel(props) {
108
116
  const [local, rest] = splitProps(props, ["class"]);
109
117
  return createComponent(Menubar.GroupLabel, mergeProps({ get ["class"]() {
@@ -1 +1 @@
1
- {"version":3,"file":"menubar.js","names":["Menubar","KobalteMenubar","Check","ChevronRight","Circle","ComponentProps","splitProps","menuContentPadding","destructiveMenuItem","menuItem","menuLabel","menuSeparator","overlayMotion","overlaySurface","popoverArrow","cn","props","local","rest","_$createComponent","_$mergeProps","class","MenubarMenu","Menu","MenubarTrigger","Trigger","MenubarContent","Content","Portal","children","Arrow","_$memo","MenubarItem","Item","variant","shortcut","keyshortcuts","aria-keyshortcuts","_el$","_tmpl$","_$insert","MenubarCheckboxItem","CheckboxItem","ItemIndicator","MenubarRadioGroup","RadioGroup","MenubarRadioItem","RadioItem","MenubarLabel","GroupLabel","MenubarGroup","Group","MenubarSeparator","Separator","MenubarSub","Sub","MenubarSubTrigger","SubTrigger","MenubarSubContent","SubContent","Menubar","_$createComponent","KobalteMenubar","_$mergeProps","_$memo"],"sources":["../../../../src/components/ui/menubar/menubar.tsx"],"sourcesContent":["import { Menubar as KobalteMenubar } from '@kobalte/core/menubar'\nimport { Check, ChevronRight, Circle } from 'lucide-solid'\nimport type { ComponentProps } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport {\n menuContentPadding,\n destructiveMenuItem,\n menuItem,\n menuLabel,\n menuSeparator,\n overlayMotion,\n overlaySurface,\n popoverArrow,\n} from '#lib/overlay'\nimport { cn } from '#lib/utils'\n\n/**\n * Menubar.\n *\n * A persistent row of menus at the top of a surface — the desktop application\n * pattern. Each trigger opens its own menu, and the arrow keys move *between*\n * menus once one is open, which is what makes a menubar a single control rather\n * than five menus that happen to be adjacent.\n *\n * This is for a window-level command surface. For actions on one thing, use\n * DropdownMenu; a menubar on a row would be a menu pretending to be chrome.\n */\nexport function Menubar(props: ComponentProps<typeof KobalteMenubar>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteMenubar\n class={cn(\n 'flex items-center gap-0.5 rounded-md border border-border bg-card p-0.5',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/**\n * One top-level menu: a trigger and the panel it opens.\n *\n * Required, and the reason the component is not just a row of triggers — the\n * menubar's arrow keys move *between* menus, which only works when each trigger\n * belongs to a menu the bar knows about. `value` names it.\n */\nexport function MenubarMenu(props: ComponentProps<typeof KobalteMenubar.Menu>) {\n return <KobalteMenubar.Menu {...props} />\n}\n\nexport function MenubarTrigger(props: ComponentProps<typeof KobalteMenubar.Trigger>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteMenubar.Trigger\n class={cn(\n 'flex items-center rounded-sm px-2 py-1 text-sm font-medium select-none',\n 'transition-colors ease-out outline-none',\n 'data-[expanded]:bg-surface-active',\n 'data-[highlighted]:bg-surface-hover',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function MenubarContent(props: ComponentProps<typeof KobalteMenubar.Content>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n return (\n <KobalteMenubar.Portal>\n <KobalteMenubar.Content\n class={cn(\n overlaySurface,\n overlayMotion,\n 'z-(--z-menu) min-w-[10rem] origin-(--kb-menu-content-transform-origin) overflow-hidden',\n menuContentPadding,\n local.class\n )}\n {...rest}\n >\n <KobalteMenubar.Arrow aria-hidden=\"true\" class={popoverArrow} />\n {local.children}\n </KobalteMenubar.Content>\n </KobalteMenubar.Portal>\n )\n}\n\nexport function MenubarItem(\n props: ComponentProps<typeof KobalteMenubar.Item> & {\n variant?: 'default' | 'destructive'\n shortcut?: string\n /**\n * The parseable chord behind `shortcut`, e.g. `Meta+N`. The drawn glyph is\n * `aria-hidden` — reading it out would pollute the item's accessible name —\n * so this is what assistive technology announces instead. Supply it\n * whenever `shortcut` is drawn.\n */\n keyshortcuts?: string\n }\n) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'variant',\n 'shortcut',\n 'keyshortcuts',\n 'children',\n ])\n return (\n <KobalteMenubar.Item\n class={cn(\n menuItem,\n {\n [destructiveMenuItem]: local.variant === 'destructive',\n },\n local.class\n )}\n aria-keyshortcuts={local.keyshortcuts}\n {...rest}\n >\n {local.children}\n {local.shortcut ? (\n <span\n aria-hidden=\"true\"\n class=\"text-muted-foreground ms-auto font-mono text-2xs tracking-widest\"\n >\n {local.shortcut}\n </span>\n ) : null}\n </KobalteMenubar.Item>\n )\n}\n\nexport function MenubarCheckboxItem(props: ComponentProps<typeof KobalteMenubar.CheckboxItem>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n return (\n <KobalteMenubar.CheckboxItem class={cn(menuItem, 'pe-8', local.class)} {...rest}>\n {local.children}\n <KobalteMenubar.ItemIndicator class=\"absolute end-2 flex size-4 items-center justify-center\">\n <Check class=\"size-4\" />\n </KobalteMenubar.ItemIndicator>\n </KobalteMenubar.CheckboxItem>\n )\n}\n\nexport function MenubarRadioGroup(props: ComponentProps<typeof KobalteMenubar.RadioGroup>) {\n return <KobalteMenubar.RadioGroup {...props} />\n}\n\nexport function MenubarRadioItem(props: ComponentProps<typeof KobalteMenubar.RadioItem>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n return (\n <KobalteMenubar.RadioItem class={cn(menuItem, 'pe-8', local.class)} {...rest}>\n {local.children}\n <KobalteMenubar.ItemIndicator class=\"absolute end-2 flex size-4 items-center justify-center\">\n <Circle class=\"size-2 fill-current\" />\n </KobalteMenubar.ItemIndicator>\n </KobalteMenubar.RadioItem>\n )\n}\n\nexport function MenubarLabel(props: ComponentProps<typeof KobalteMenubar.GroupLabel>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteMenubar.GroupLabel class={cn(menuLabel, local.class)} {...rest} />\n}\n\nexport function MenubarGroup(props: ComponentProps<typeof KobalteMenubar.Group>) {\n return <KobalteMenubar.Group {...props} />\n}\n\nexport function MenubarSeparator(props: ComponentProps<typeof KobalteMenubar.Separator>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteMenubar.Separator class={cn(menuSeparator, local.class)} {...rest} />\n}\n\nexport function MenubarSub(props: ComponentProps<typeof KobalteMenubar.Sub>) {\n return <KobalteMenubar.Sub {...props} />\n}\n\nexport function MenubarSubTrigger(props: ComponentProps<typeof KobalteMenubar.SubTrigger>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n return (\n <KobalteMenubar.SubTrigger class={cn(menuItem, local.class)} {...rest}>\n {local.children}\n <ChevronRight class=\"ms-auto size-4\" />\n </KobalteMenubar.SubTrigger>\n )\n}\n\nexport function MenubarSubContent(props: ComponentProps<typeof KobalteMenubar.SubContent>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteMenubar.Portal>\n <KobalteMenubar.SubContent\n class={cn(\n overlaySurface,\n overlayMotion,\n 'z-(--z-menu) min-w-[8rem] origin-(--kb-menu-content-transform-origin) overflow-hidden',\n menuContentPadding,\n local.class\n )}\n {...rest}\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EAAA,SAAA,iBAAA,CAAA,CAAA;CAAA,EAAA,CAAA,CAAA;AAGnB;AAEA,SAAgBuD,kBAAkB1C,OAAyD;CACzF,MAAM,CAACC,OAAOC,QAAQZ,WAAWU,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBACGlB,QAAe2B,QAAM,EAAA,IAAAC,WAAA;EAAA,OAAAV,gBACnBlB,QAAe0D,YAAUvC,WAAA,EAAA,KAAA,WAAA;GAAA,OACjBL,GACLF,gBACAD,eACA,yFAAA,OAEAK,MAAMI,KACR;EAAC,EAAA,GACGH,IAAI,CAAA;CAAA,EAAA,CAAA;AAIhB"}
1
+ {"version":3,"file":"menubar.js","names":["Menubar","KobalteMenubar","Check","ChevronRight","Circle","ComponentProps","splitProps","menuContentPadding","destructiveMenuItem","menuItem","menuLabel","menuSeparator","overlayMotion","overlaySurface","popoverArrow","cn","props","local","rest","_$createComponent","_$mergeProps","class","MenubarMenu","Menu","MenubarTrigger","Trigger","MenubarContent","Content","Portal","children","Arrow","_$memo","MenubarItem","Item","variant","shortcut","keyshortcuts","aria-keyshortcuts","_el$","_tmpl$","_$insert","MenubarCheckboxItem","CheckboxItem","ItemIndicator","MenubarRadioGroup","RadioGroup","MenubarRadioItem","RadioItem","MenubarLabel","GroupLabel","MenubarGroup","Group","MenubarSeparator","Separator","MenubarSub","Sub","MenubarSubTrigger","SubTrigger","MenubarSubContent","SubContent","Menubar","_$createComponent","KobalteMenubar","_$mergeProps","_$memo"],"sources":["../../../../src/components/ui/menubar/menubar.tsx"],"sourcesContent":["import { Menubar as KobalteMenubar } from '@kobalte/core/menubar'\nimport { Check, ChevronRight, Circle } from 'lucide-solid'\nimport type { ComponentProps } from 'solid-js'\nimport { splitProps } from 'solid-js'\nimport {\n menuContentPadding,\n destructiveMenuItem,\n menuItem,\n menuLabel,\n menuSeparator,\n overlayMotion,\n overlaySurface,\n popoverArrow,\n} from '#lib/overlay'\nimport { cn } from '#lib/utils'\n\n/**\n * Menubar.\n *\n * A persistent row of menus at the top of a surface — the desktop application\n * pattern. Each trigger opens its own menu, and the arrow keys move *between*\n * menus once one is open, which is what makes a menubar a single control rather\n * than five menus that happen to be adjacent.\n *\n * This is for a window-level command surface. For actions on one thing, use\n * DropdownMenu; a menubar on a row would be a menu pretending to be chrome.\n */\nexport function Menubar(props: ComponentProps<typeof KobalteMenubar>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteMenubar\n class={cn(\n 'flex items-center gap-0.5 rounded-md border border-border bg-card p-0.5',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/**\n * One top-level menu: a trigger and the panel it opens.\n *\n * Required, and the reason the component is not just a row of triggers — the\n * menubar's arrow keys move *between* menus, which only works when each trigger\n * belongs to a menu the bar knows about. `value` names it.\n */\nexport function MenubarMenu(props: ComponentProps<typeof KobalteMenubar.Menu>) {\n return <KobalteMenubar.Menu {...props} />\n}\n\nexport function MenubarTrigger(props: ComponentProps<typeof KobalteMenubar.Trigger>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteMenubar.Trigger\n class={cn(\n 'flex items-center rounded-sm px-2 py-1 text-sm font-medium select-none',\n 'transition-colors ease-out outline-none',\n 'data-[expanded]:bg-surface-active',\n 'data-[highlighted]:bg-surface-hover',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function MenubarContent(props: ComponentProps<typeof KobalteMenubar.Content>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n return (\n <KobalteMenubar.Portal>\n <KobalteMenubar.Content\n class={cn(\n overlaySurface,\n overlayMotion,\n 'z-(--z-menu) min-w-[10rem] origin-(--kb-menu-content-transform-origin) overflow-hidden',\n menuContentPadding,\n local.class\n )}\n {...rest}\n >\n <KobalteMenubar.Arrow aria-hidden=\"true\" class={popoverArrow} />\n {local.children}\n </KobalteMenubar.Content>\n </KobalteMenubar.Portal>\n )\n}\n\nexport function MenubarItem(\n props: ComponentProps<typeof KobalteMenubar.Item> & {\n variant?: 'default' | 'destructive'\n shortcut?: string\n /**\n * The parseable chord behind `shortcut`, e.g. `Meta+N`. The drawn glyph is\n * `aria-hidden` — reading it out would pollute the item's accessible name —\n * so this is what assistive technology announces instead. Supply it\n * whenever `shortcut` is drawn.\n */\n keyshortcuts?: string\n }\n) {\n const [local, rest] = splitProps(props, [\n 'class',\n 'variant',\n 'shortcut',\n 'keyshortcuts',\n 'children',\n ])\n return (\n <KobalteMenubar.Item\n class={cn(\n menuItem,\n {\n [destructiveMenuItem]: local.variant === 'destructive',\n },\n local.class\n )}\n aria-keyshortcuts={local.keyshortcuts}\n {...rest}\n >\n {local.children}\n {local.shortcut ? (\n <span\n aria-hidden=\"true\"\n class=\"text-muted-foreground ms-auto font-mono text-2xs tracking-widest\"\n >\n {local.shortcut}\n </span>\n ) : null}\n </KobalteMenubar.Item>\n )\n}\n\nexport function MenubarCheckboxItem(props: ComponentProps<typeof KobalteMenubar.CheckboxItem>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n return (\n <KobalteMenubar.CheckboxItem class={cn(menuItem, 'pe-8', local.class)} {...rest}>\n {local.children}\n <KobalteMenubar.ItemIndicator class=\"absolute end-2 flex size-4 items-center justify-center\">\n <Check class=\"size-4\" />\n </KobalteMenubar.ItemIndicator>\n </KobalteMenubar.CheckboxItem>\n )\n}\n\nexport function MenubarRadioGroup(props: ComponentProps<typeof KobalteMenubar.RadioGroup>) {\n return <KobalteMenubar.RadioGroup {...props} />\n}\n\nexport function MenubarRadioItem(props: ComponentProps<typeof KobalteMenubar.RadioItem>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n return (\n <KobalteMenubar.RadioItem class={cn(menuItem, 'pe-8', local.class)} {...rest}>\n {local.children}\n <KobalteMenubar.ItemIndicator class=\"absolute end-2 flex size-4 items-center justify-center\">\n <Circle class=\"size-2 fill-current\" />\n </KobalteMenubar.ItemIndicator>\n </KobalteMenubar.RadioItem>\n )\n}\n\n/**\n * The caption of a `MenubarGroup`, and that group's accessible name. It must be a\n * child of the group it names: Kobalte reads the group from context, so a label\n * placed directly in the content throws `useMenuGroupContext must be used within\n * a Menu.Group` the moment the menu opens. For an ungrouped caption, wrap the\n * label and its items in a group anyway — the grouping is what a screen reader\n * announces.\n */\nexport function MenubarLabel(props: ComponentProps<typeof KobalteMenubar.GroupLabel>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteMenubar.GroupLabel class={cn(menuLabel, local.class)} {...rest} />\n}\n\nexport function MenubarGroup(props: ComponentProps<typeof KobalteMenubar.Group>) {\n return <KobalteMenubar.Group {...props} />\n}\n\nexport function MenubarSeparator(props: ComponentProps<typeof KobalteMenubar.Separator>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteMenubar.Separator class={cn(menuSeparator, local.class)} {...rest} />\n}\n\nexport function MenubarSub(props: ComponentProps<typeof KobalteMenubar.Sub>) {\n return <KobalteMenubar.Sub {...props} />\n}\n\nexport function MenubarSubTrigger(props: ComponentProps<typeof KobalteMenubar.SubTrigger>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n return (\n <KobalteMenubar.SubTrigger class={cn(menuItem, local.class)} {...rest}>\n {local.children}\n <ChevronRight class=\"ms-auto size-4\" />\n </KobalteMenubar.SubTrigger>\n )\n}\n\nexport function MenubarSubContent(props: ComponentProps<typeof KobalteMenubar.SubContent>) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteMenubar.Portal>\n <KobalteMenubar.SubContent\n class={cn(\n overlaySurface,\n overlayMotion,\n 'z-(--z-menu) min-w-[8rem] origin-(--kb-menu-content-transform-origin) overflow-hidden',\n menuContentPadding,\n local.class\n )}\n {...rest}\n />\n </KobalteMenubar.Portal>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA2BA,SAAgBA,UAAQgB,OAA8C;CACpE,MAAM,CAACC,OAAOC,QAAQZ,WAAWU,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBACGlB,SAAcmB,W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B,QAAe2B,QAAM,EAAA,IAAAC,WAAA;EAAA,OAAAV,gBACnBlB,QAAe0D,YAAUvC,WAAA,EAAA,KAAA,WAAA;GAAA,OACjBL,GACLF,gBACAD,eACA,yFAAA,OAEAK,MAAMI,KACR;EAAC,EAAA,GACGH,IAAI,CAAA;CAAA,EAAA,CAAA;AAIhB"}
@@ -37,9 +37,15 @@ import * as KobalteNavigationMenu from '@kobalte/core/navigation-menu';
37
37
  * - `Content` must be a direct child of `Menu`, and the `Viewport` is a **sibling
38
38
  * of the menus** — not inside them. All the panels share one viewport, which is
39
39
  * what lets the bar animate between them instead of each panel popping in place.
40
+ * - The viewport is an empty surface. Each `Content` reaches it through Kobalte's
41
+ * `Portal`, which mounts the panel inside the viewport while keeping it in its
42
+ * own `Menu`'s context. A `Content` rendered anywhere else — the viewport's own
43
+ * children included — has no `Menu` above it, and Kobalte throws
44
+ * `useMenuRootContext must be used within a MenuRoot` the moment a panel opens.
40
45
  *
41
- * The wrapper enforces the last of those by rendering the `Viewport` itself, so a
42
- * caller cannot forget it and get a menu whose panels never appear.
46
+ * The wrapper enforces the last two by rendering the `Viewport` itself and by
47
+ * portalling every `NavigationMenuContent`, so a caller cannot forget either and
48
+ * get a menu whose panels never appear.
43
49
  */
44
50
  export type NavigationMenuProps = ComponentProps<typeof KobalteNavigationMenu.Root> & {
45
51
  /** The accessible name for the navigation landmark. */
@@ -56,6 +62,12 @@ export declare function NavigationMenuContent(props: ComponentProps<typeof Kobal
56
62
  /**
57
63
  * The shared panel surface. One per menu bar, and the wrapper supplies it — but
58
64
  * exported so a caller with an unusual layout can place it themselves.
65
+ *
66
+ * It renders no children: the panels arrive through each `NavigationMenuContent`'s
67
+ * portal. Kobalte positions it under the bar and publishes the active panel's size
68
+ * as `--kb-navigation-menu-viewport-*`, which the surface animates between.
69
+ * `box-content` keeps the border outside that measured size so a panel is never
70
+ * clipped by its own frame.
59
71
  */
60
72
  export declare function NavigationMenuViewport(props: ComponentProps<typeof KobalteNavigationMenu.Viewport>): JSX.Element;
61
73
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"navigation-menu.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/navigation-menu/navigation-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,GAAG,EAAE,MAAM,UAAU,CAAA;AACpE,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAA;AAKtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,OAAO,qBAAqB,CAAC,IAAI,CAAC,GAAG;IACpF,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,eAsBxD;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,qBAAqB,CAAC,IAAI,CAAC,eAE1F;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,qBAAqB,CAAC,OAAO,CAAC,eAuBhG;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,qBAAqB,CAAC,OAAO,CAAC,eAkBhG;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,cAAc,CAAC,OAAO,qBAAqB,CAAC,QAAQ,CAAC,eAyB7D;AAED;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,OAAO,qBAAqB,CAAC,IAAI,CAAC,GAAG;IACxF,qDAAqD;IACrD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,sBAAsB;IACtB,IAAI,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;CACnB,CAAA;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,eAoBhE;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,cAAc,CAAC,OAAO,qBAAqB,CAAC,SAAS,CAAC,eAS9D;AAED,wDAAwD;AACxD,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,cAAc,CAAC,OAAO,qBAAqB,CAAC,UAAU,CAAC,eAa/D;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,qBAAqB,CAAC,KAAK,CAAC,eAG5F"}
1
+ {"version":3,"file":"navigation-menu.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/navigation-menu/navigation-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,GAAG,EAAE,MAAM,UAAU,CAAA;AACpE,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAA;AAKtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC,OAAO,qBAAqB,CAAC,IAAI,CAAC,GAAG;IACpF,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,eAsBxD;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,qBAAqB,CAAC,IAAI,CAAC,eAE1F;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,qBAAqB,CAAC,OAAO,CAAC,eAuBhG;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,qBAAqB,CAAC,OAAO,CAAC,eA4BhG;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,cAAc,CAAC,OAAO,qBAAqB,CAAC,QAAQ,CAAC,eAiB7D;AAED;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,cAAc,CAAC,OAAO,qBAAqB,CAAC,IAAI,CAAC,GAAG;IACxF,qDAAqD;IACrD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,sBAAsB;IACtB,IAAI,CAAC,EAAE,GAAG,CAAC,OAAO,CAAA;CACnB,CAAA;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,eAoBhE;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,cAAc,CAAC,OAAO,qBAAqB,CAAC,SAAS,CAAC,eAS9D;AAED,wDAAwD;AACxD,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,cAAc,CAAC,OAAO,qBAAqB,CAAC,UAAU,CAAC,eAa/D;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,qBAAqB,CAAC,KAAK,CAAC,eAG5F"}
@@ -1,13 +1,12 @@
1
1
  import { cn } from "../../../lib/utils.js";
2
2
  import { menuItem, overlayMotion, overlaySurface } from "../../../lib/overlay.js";
3
- import { className, createComponent, effect, insert, memo, mergeProps, template } from "solid-js/web";
3
+ import { createComponent, insert, memo, mergeProps, template } from "solid-js/web";
4
4
  import { ChevronDown } from "lucide-solid";
5
5
  import { splitProps } from "solid-js";
6
6
  import * as KobalteNavigationMenu from "@kobalte/core/navigation-menu";
7
7
  //#region src/components/ui/navigation-menu/navigation-menu.tsx
8
- var _tmpl$ = /*#__PURE__*/ template(`<div>`);
9
- var _tmpl$2 = /*#__PURE__*/ template(`<span class=font-medium>`);
10
- var _tmpl$3 = /*#__PURE__*/ template(`<span class="col-start-2 text-xs text-muted-foreground">`);
8
+ var _tmpl$ = /*#__PURE__*/ template(`<span class=font-medium>`);
9
+ var _tmpl$2 = /*#__PURE__*/ template(`<span class="col-start-2 text-xs text-muted-foreground">`);
11
10
  function NavigationMenu(props) {
12
11
  const [local, rest] = splitProps(props, [
13
12
  "label",
@@ -45,26 +44,32 @@ function NavigationMenuTrigger(props) {
45
44
  }
46
45
  function NavigationMenuContent(props) {
47
46
  const [local, rest] = splitProps(props, ["class", "children"]);
48
- return createComponent(KobalteNavigationMenu.Content, mergeProps({ get ["class"]() {
49
- return cn("grid w-max gap-1 p-2", "data-[wide]:grid-cols-2", local.class);
50
- } }, rest, { get children() {
51
- return local.children;
52
- } }));
47
+ return createComponent(KobalteNavigationMenu.Portal, { get children() {
48
+ return createComponent(KobalteNavigationMenu.Content, mergeProps({ get ["class"]() {
49
+ return cn("absolute top-0 left-0 grid w-max gap-1 p-2 outline-none", overlayMotion, "data-[wide]:grid-cols-2", local.class);
50
+ } }, rest, { get children() {
51
+ return local.children;
52
+ } }));
53
+ } });
53
54
  }
54
55
  /**
55
56
  * The shared panel surface. One per menu bar, and the wrapper supplies it — but
56
57
  * exported so a caller with an unusual layout can place it themselves.
58
+ *
59
+ * It renders no children: the panels arrive through each `NavigationMenuContent`'s
60
+ * portal. Kobalte positions it under the bar and publishes the active panel's size
61
+ * as `--kb-navigation-menu-viewport-*`, which the surface animates between.
62
+ * `box-content` keeps the border outside that measured size so a panel is never
63
+ * clipped by its own frame.
57
64
  */
58
65
  function NavigationMenuViewport(props) {
59
66
  const [local, rest] = splitProps(props, ["class"]);
60
- return createComponent(KobalteNavigationMenu.Viewport, mergeProps({ get ["class"]() {
61
- return cn("absolute top-full left-0 isolate z-(--z-menu) mt-1.5 flex justify-center overflow-hidden", "h-(--kb-navigation-menu-viewport-height) w-(--kb-navigation-menu-viewport-width)", "origin-top transition-[width,height] duration-200 ease-out", local.class);
62
- } }, rest, { get children() {
63
- var _el$ = _tmpl$();
64
- insert(_el$, createComponent(KobalteNavigationMenu.Content, {}));
65
- effect(() => className(_el$, cn(overlaySurface, overlayMotion, "w-full rounded-lg border border-border bg-popover p-1 shadow-lg")));
66
- return _el$;
67
- } }));
67
+ return createComponent(KobalteNavigationMenu.Viewport, mergeProps({
68
+ "data-slot": "navigation-menu-viewport",
69
+ get ["class"]() {
70
+ return cn(overlaySurface, "isolate z-(--z-menu) mt-1.5 box-content list-none overflow-hidden", "h-(--kb-navigation-menu-viewport-height) w-(--kb-navigation-menu-viewport-width)", "origin-(--kb-menu-content-transform-origin) transition-[width,height] duration-200 ease-out", local.class);
71
+ }
72
+ }, rest));
68
73
  }
69
74
  function NavigationMenuItem(props) {
70
75
  const [local, rest] = splitProps(props, [
@@ -79,14 +84,14 @@ function NavigationMenuItem(props) {
79
84
  return [
80
85
  memo(() => local.icon),
81
86
  (() => {
82
- var _el$2 = _tmpl$2();
83
- insert(_el$2, () => local.children);
84
- return _el$2;
87
+ var _el$ = _tmpl$();
88
+ insert(_el$, () => local.children);
89
+ return _el$;
85
90
  })(),
86
91
  memo(() => memo(() => !!local.description)() && (() => {
87
- var _el$3 = _tmpl$3();
88
- insert(_el$3, () => local.description);
89
- return _el$3;
92
+ var _el$2 = _tmpl$2();
93
+ insert(_el$2, () => local.description);
94
+ return _el$2;
90
95
  })())
91
96
  ];
92
97
  } }));
@@ -1 +1 @@
1
- {"version":3,"file":"navigation-menu.js","names":["splitProps","ComponentProps","JSX","KobalteNavigationMenu","ChevronDown","cn","menuContentPadding","menuItem","overlayMotion","overlaySurface","NavigationMenuProps","Root","label","NavigationMenu","props","local","rest","_$createComponent","_$mergeProps","class","aria-label","children","_$memo","NavigationMenuViewport","NavigationMenuMenu","Menu","NavigationMenuTrigger","Trigger","NavigationMenuContent","Content","Viewport","_el$","_tmpl$","_$insert","_$effect","_$className","NavigationMenuItemProps","Item","description","icon","Element","NavigationMenuItem","_el$2","_tmpl$2","_el$3","_tmpl$3","NavigationMenuSeparator","Separator","NavigationMenuGroupLabel","GroupLabel","NavigationMenuGroup","Group","_$createComponent","_$mergeProps","_$memo","_$className"],"sources":["../../../../src/components/ui/navigation-menu/navigation-menu.tsx"],"sourcesContent":["import { splitProps, type ComponentProps, type JSX } from 'solid-js'\nimport * as KobalteNavigationMenu from '@kobalte/core/navigation-menu'\nimport { ChevronDown } from 'lucide-solid'\nimport { cn } from '#lib/utils'\nimport { menuContentPadding, menuItem, overlayMotion, overlaySurface } from '#lib/overlay'\n\n/**\n * NavigationMenu.\n *\n * A site-style menu bar: top-level triggers that open panels of links. It is the\n * header pattern — a documentation site, a marketing page, an application with\n * several top-level destinations — and it is deliberately *not* a `Menubar`.\n * `Menubar` is a row of application menus (File, Edit, View) whose items are\n * commands; this is a row of destinations whose panels are links. The two have\n * different roles, different keyboard models, and different semantics.\n *\n * ## Composition\n *\n * Kobalte's primitive has an unusual shape, and getting it wrong is why this took\n * three attempts to port. The structure is:\n *\n * ```tsx\n * <NavigationMenu>\n * <NavigationMenuMenu>\n * <NavigationMenuTrigger>Destinations</NavigationMenuTrigger>\n * <NavigationMenuContent>\n * <NavigationMenuItem href=\"/x\">X</NavigationMenuItem>\n * </NavigationMenuContent>\n * </NavigationMenuMenu>\n * <NavigationMenuViewport />\n * </NavigationMenu>\n * ```\n *\n * Three facts that are not obvious from the prop types:\n *\n * - `Menu` renders **nothing**. It is a context provider — one per top-level\n * entry, naming it so the bar's arrow keys can move between entries. A menu\n * without one cannot be reached by keyboard.\n * - `Trigger` renders `<li role=\"presentation\"><button>`. It is already the list\n * item, so wrapping it in your own `<li>` produces a `<ul>` inside a `<ul>`.\n * - `Content` must be a direct child of `Menu`, and the `Viewport` is a **sibling\n * of the menus** — not inside them. All the panels share one viewport, which is\n * what lets the bar animate between them instead of each panel popping in place.\n *\n * The wrapper enforces the last of those by rendering the `Viewport` itself, so a\n * caller cannot forget it and get a menu whose panels never appear.\n */\n\nexport type NavigationMenuProps = ComponentProps<typeof KobalteNavigationMenu.Root> & {\n /** The accessible name for the navigation landmark. */\n label?: string\n}\n\nexport function NavigationMenu(props: NavigationMenuProps) {\n const [local, rest] = splitProps(props, ['label', 'class', 'children'])\n\n return (\n <KobalteNavigationMenu.Root\n class={cn(\n 'relative flex max-w-max flex-1 items-center justify-center',\n '[&>nav>ul]:flex [&>nav>ul]:items-center [&>nav>ul]:gap-1',\n local.class\n )}\n aria-label={local.label ?? 'Main'}\n {...rest}\n >\n {local.children}\n {/*\n The shared panel surface. Rendered here rather than left to the caller:\n every panel animates through this one element, and a menu bar without it\n opens panels that never paint.\n */}\n <NavigationMenuViewport />\n </KobalteNavigationMenu.Root>\n )\n}\n\n/**\n * One top-level entry. Renders nothing itself — see the note above — and exists\n * so a caller cannot build a bar whose entries the keyboard cannot reach.\n */\nexport function NavigationMenuMenu(props: ComponentProps<typeof KobalteNavigationMenu.Menu>) {\n return <KobalteNavigationMenu.Menu {...props} />\n}\n\nexport function NavigationMenuTrigger(props: ComponentProps<typeof KobalteNavigationMenu.Trigger>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobalteNavigationMenu.Trigger\n class={cn(\n 'inline-flex items-center gap-1 rounded-md px-3 py-1.5 text-sm font-medium text-muted-foreground',\n 'transition-colors ease-out outline-none select-none',\n 'hover:bg-muted hover:text-foreground',\n 'data-[expanded]:bg-muted data-[expanded]:text-foreground',\n 'data-[highlighted]:bg-muted data-[highlighted]:text-foreground',\n 'focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none',\n local.class\n )}\n {...rest}\n >\n {local.children}\n <ChevronDown\n aria-hidden=\"true\"\n class=\"size-3.5 transition-transform duration-200 ease-out [[data-expanded]_&]:rotate-180\"\n />\n </KobalteNavigationMenu.Trigger>\n )\n}\n\nexport function NavigationMenuContent(props: ComponentProps<typeof KobalteNavigationMenu.Content>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobalteNavigationMenu.Content\n class={cn(\n 'grid w-max gap-1 p-2',\n // A two-column panel is the shape most menu bars want, and it is opt-in\n // through this hook rather than a prop because the column count is a\n // layout decision the caller's content makes.\n 'data-[wide]:grid-cols-2',\n local.class\n )}\n {...rest}\n >\n {local.children}\n </KobalteNavigationMenu.Content>\n )\n}\n\n/**\n * The shared panel surface. One per menu bar, and the wrapper supplies it — but\n * exported so a caller with an unusual layout can place it themselves.\n */\nexport function NavigationMenuViewport(\n props: ComponentProps<typeof KobalteNavigationMenu.Viewport>\n) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <KobalteNavigationMenu.Viewport\n class={cn(\n 'absolute top-full left-0 isolate z-(--z-menu) mt-1.5 flex justify-center overflow-hidden',\n 'h-(--kb-navigation-menu-viewport-height) w-(--kb-navigation-menu-viewport-width)',\n 'origin-top transition-[width,height] duration-200 ease-out',\n local.class\n )}\n {...rest}\n >\n <div\n class={cn(\n overlaySurface,\n overlayMotion,\n 'w-full rounded-lg border border-border bg-popover p-1 shadow-lg'\n )}\n >\n <KobalteNavigationMenu.Content />\n </div>\n </KobalteNavigationMenu.Viewport>\n )\n}\n\n/**\n * A link inside a panel. `href` is the point of the component, so it is a link\n * rather than a button — and the accessible name comes from its text, which is\n * why there is no `aria-label` here.\n */\nexport type NavigationMenuItemProps = ComponentProps<typeof KobalteNavigationMenu.Item> & {\n /** A one-line description, shown under the label. */\n description?: string\n /** A leading icon. */\n icon?: JSX.Element\n}\n\nexport function NavigationMenuItem(props: NavigationMenuItemProps) {\n const [local, rest] = splitProps(props, ['class', 'children', 'description', 'icon'])\n\n return (\n <KobalteNavigationMenu.Item\n class={cn(\n menuItem,\n 'grid grid-cols-[auto_1fr] items-center gap-x-2 gap-y-0.5',\n local.description && 'grid-rows-[auto_auto] py-2',\n local.class\n )}\n {...rest}\n >\n {local.icon}\n <span class=\"font-medium\">{local.children}</span>\n {local.description && (\n <span class=\"col-start-2 text-xs text-muted-foreground\">{local.description}</span>\n )}\n </KobalteNavigationMenu.Item>\n )\n}\n\nexport function NavigationMenuSeparator(\n props: ComponentProps<typeof KobalteNavigationMenu.Separator>\n) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteNavigationMenu.Separator\n class={cn('-mx-1 my-1 h-px bg-border', local.class)}\n {...rest}\n />\n )\n}\n\n/** A non-interactive caption above a group of items. */\nexport function NavigationMenuGroupLabel(\n props: ComponentProps<typeof KobalteNavigationMenu.GroupLabel>\n) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteNavigationMenu.GroupLabel\n class={cn(\n menuContentPadding,\n 'text-2xs font-semibold text-muted-foreground uppercase',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function NavigationMenuGroup(props: ComponentProps<typeof KobalteNavigationMenu.Group>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteNavigationMenu.Group class={cn('grid gap-0.5', local.class)} {...rest} />\n}\n"],"mappings":";;;;;;;;;;AAqDA,SAAgBa,eAAeC,OAA4B;CACzD,MAAM,CAACC,OAAOC,QAAQhB,WAAWc,OAAO;EAAC;EAAS;EAAS;CAAU,CAAC;CAEtE,OAAAG,gBACGd,sBAAsBQ,MAAIO,WAAA;EAAA,KAAA,WAAA;GAAA,OAClBb,GACL,8DACA,4DACAU,MAAMI,KACR;EAAC;EAAA,KAAA,gBAAA;GAAA,OACWJ,MAAMH,SAAS;EAAM;CAAA,GAC7BI,MAAI,EAAA,IAAAK,WAAA;EAAA,OAAA,CAAAC,WAEPP,MAAMM,QAAQ,GAAAJ,gBAMdM,wBAAsB,CAAA,CAAA,CAAA;CAAA,EAAA,CAAA,CAAA;AAG7B;;;;;AAMA,SAAgBC,mBAAmBV,OAA0D;CAC3F,OAAAG,gBAAQd,sBAAsBsB,MAASX,KAAK;AAC9C;AAEA,SAAgBY,sBAAsBZ,OAA6D;CACjG,MAAM,CAACC,OAAOC,QAAQhB,WAAWc,OAAO,CAAC,SAAS,UAAU,CAAC;CAE7D,OAAAG,gBACGd,sBAAsBwB,SAAOT,WAAA,EAAA,KAAA,WAAA;EAAA,OACrBb,GACL,mGACA,uDACA,wCACA,4DACA,kEACA,2EACAU,MAAMI,KACR;CAAC,EAAA,GACGH,MAAI,EAAA,IAAAK,WAAA;EAAA,OAAA,CAAAC,WAEPP,MAAMM,QAAQ,GAAAJ,gBACdb,aAAW;GAAA,eAAA;GAAA,SAAA;EAAA,CAAA,CAAA;CAAA,EAAA,CAAA,CAAA;AAMlB;AAEA,SAAgBwB,sBAAsBd,OAA6D;CACjG,MAAM,CAACC,OAAOC,QAAQhB,WAAWc,OAAO,CAAC,SAAS,UA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W;IAAA,OAAAM;GAAA,EAAA,CAAA,CAC3E;EAAA;CAAA,EAAA,CAAA,CAAA;AAGP;AAEA,SAAgBE,wBACdhC,OACA;CACA,MAAM,CAACC,OAAOC,QAAQhB,WAAWc,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBACGd,sBAAsB4C,WAAS7B,WAAA,EAAA,KAAA,WAAA;EAAA,OACvBb,GAAG,6BAA6BU,MAAMI,KAAK;CAAC,EAAA,GAC/CH,IAAI,CAAA;AAGd;;AAGA,SAAgBgC,yBACdlC,OACA;CACA,MAAM,CAACC,OAAOC,QAAQhB,WAAWc,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBACGd,sBAAsB8C,YAAU/B,WAAA,EAAA,KAAA,WAAA;EAAA,OACxBb,GAAAA,OAEL,0DACAU,MAAMI,KACR;CAAC,EAAA,GACGH,IAAI,CAAA;AAGd;AAEA,SAAgBkC,oBAAoBpC,OAA2D;CAC7F,MAAM,CAACC,OAAOC,QAAQhB,WAAWc,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBAAQd,sBAAsBgD,OAAKjC,WAAA,EAAA,KAAA,WAAA;EAAA,OAAQb,GAAG,gBAAgBU,MAAMI,KAAK;CAAC,EAAA,GAAMH,IAAI,CAAA;AACtF"}
1
+ {"version":3,"file":"navigation-menu.js","names":["splitProps","ComponentProps","JSX","KobalteNavigationMenu","ChevronDown","cn","menuContentPadding","menuItem","overlayMotion","overlaySurface","NavigationMenuProps","Root","label","NavigationMenu","props","local","rest","_$createComponent","_$mergeProps","class","aria-label","children","_$memo","NavigationMenuViewport","NavigationMenuMenu","Menu","NavigationMenuTrigger","Trigger","NavigationMenuContent","Content","Portal","Viewport","NavigationMenuItemProps","Item","description","icon","Element","NavigationMenuItem","_el$","_tmpl$","_$insert","_el$2","_tmpl$2","NavigationMenuSeparator","Separator","NavigationMenuGroupLabel","GroupLabel","NavigationMenuGroup","Group","_$createComponent","_$mergeProps","_$memo"],"sources":["../../../../src/components/ui/navigation-menu/navigation-menu.tsx"],"sourcesContent":["import { splitProps, type ComponentProps, type JSX } from 'solid-js'\nimport * as KobalteNavigationMenu from '@kobalte/core/navigation-menu'\nimport { ChevronDown } from 'lucide-solid'\nimport { cn } from '#lib/utils'\nimport { menuContentPadding, menuItem, overlayMotion, overlaySurface } from '#lib/overlay'\n\n/**\n * NavigationMenu.\n *\n * A site-style menu bar: top-level triggers that open panels of links. It is the\n * header pattern — a documentation site, a marketing page, an application with\n * several top-level destinations — and it is deliberately *not* a `Menubar`.\n * `Menubar` is a row of application menus (File, Edit, View) whose items are\n * commands; this is a row of destinations whose panels are links. The two have\n * different roles, different keyboard models, and different semantics.\n *\n * ## Composition\n *\n * Kobalte's primitive has an unusual shape, and getting it wrong is why this took\n * three attempts to port. The structure is:\n *\n * ```tsx\n * <NavigationMenu>\n * <NavigationMenuMenu>\n * <NavigationMenuTrigger>Destinations</NavigationMenuTrigger>\n * <NavigationMenuContent>\n * <NavigationMenuItem href=\"/x\">X</NavigationMenuItem>\n * </NavigationMenuContent>\n * </NavigationMenuMenu>\n * <NavigationMenuViewport />\n * </NavigationMenu>\n * ```\n *\n * Three facts that are not obvious from the prop types:\n *\n * - `Menu` renders **nothing**. It is a context provider — one per top-level\n * entry, naming it so the bar's arrow keys can move between entries. A menu\n * without one cannot be reached by keyboard.\n * - `Trigger` renders `<li role=\"presentation\"><button>`. It is already the list\n * item, so wrapping it in your own `<li>` produces a `<ul>` inside a `<ul>`.\n * - `Content` must be a direct child of `Menu`, and the `Viewport` is a **sibling\n * of the menus** — not inside them. All the panels share one viewport, which is\n * what lets the bar animate between them instead of each panel popping in place.\n * - The viewport is an empty surface. Each `Content` reaches it through Kobalte's\n * `Portal`, which mounts the panel inside the viewport while keeping it in its\n * own `Menu`'s context. A `Content` rendered anywhere else — the viewport's own\n * children included — has no `Menu` above it, and Kobalte throws\n * `useMenuRootContext must be used within a MenuRoot` the moment a panel opens.\n *\n * The wrapper enforces the last two by rendering the `Viewport` itself and by\n * portalling every `NavigationMenuContent`, so a caller cannot forget either and\n * get a menu whose panels never appear.\n */\n\nexport type NavigationMenuProps = ComponentProps<typeof KobalteNavigationMenu.Root> & {\n /** The accessible name for the navigation landmark. */\n label?: string\n}\n\nexport function NavigationMenu(props: NavigationMenuProps) {\n const [local, rest] = splitProps(props, ['label', 'class', 'children'])\n\n return (\n <KobalteNavigationMenu.Root\n class={cn(\n 'relative flex max-w-max flex-1 items-center justify-center',\n '[&>nav>ul]:flex [&>nav>ul]:items-center [&>nav>ul]:gap-1',\n local.class\n )}\n aria-label={local.label ?? 'Main'}\n {...rest}\n >\n {local.children}\n {/*\n The shared panel surface. Rendered here rather than left to the caller:\n every panel animates through this one element, and a menu bar without it\n opens panels that never paint.\n */}\n <NavigationMenuViewport />\n </KobalteNavigationMenu.Root>\n )\n}\n\n/**\n * One top-level entry. Renders nothing itself — see the note above — and exists\n * so a caller cannot build a bar whose entries the keyboard cannot reach.\n */\nexport function NavigationMenuMenu(props: ComponentProps<typeof KobalteNavigationMenu.Menu>) {\n return <KobalteNavigationMenu.Menu {...props} />\n}\n\nexport function NavigationMenuTrigger(props: ComponentProps<typeof KobalteNavigationMenu.Trigger>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobalteNavigationMenu.Trigger\n class={cn(\n 'inline-flex items-center gap-1 rounded-md px-3 py-1.5 text-sm font-medium text-muted-foreground',\n 'transition-colors ease-out outline-none select-none',\n 'hover:bg-muted hover:text-foreground',\n 'data-[expanded]:bg-muted data-[expanded]:text-foreground',\n 'data-[highlighted]:bg-muted data-[highlighted]:text-foreground',\n 'focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none',\n local.class\n )}\n {...rest}\n >\n {local.children}\n <ChevronDown\n aria-hidden=\"true\"\n class=\"size-3.5 transition-transform duration-200 ease-out [[data-expanded]_&]:rotate-180\"\n />\n </KobalteNavigationMenu.Trigger>\n )\n}\n\nexport function NavigationMenuContent(props: ComponentProps<typeof KobalteNavigationMenu.Content>) {\n const [local, rest] = splitProps(props, ['class', 'children'])\n\n return (\n <KobalteNavigationMenu.Portal>\n <KobalteNavigationMenu.Content\n class={cn(\n // Absolute so the viewport sizes to the active panel's measured box and\n // animates between panels, rather than stacking them.\n 'absolute top-0 left-0 grid w-max gap-1 p-2 outline-none',\n // The motion is the panel's, not the viewport's. Kobalte keeps an\n // outgoing panel mounted until the viewport's own animation ends; a\n // viewport that carries an entrance animation never fires that again\n // after it opens, so the previous panel would stay painted under the\n // next one.\n overlayMotion,\n // A two-column panel is the shape most menu bars want, and it is opt-in\n // through this hook rather than a prop because the column count is a\n // layout decision the caller's content makes.\n 'data-[wide]:grid-cols-2',\n local.class\n )}\n {...rest}\n >\n {local.children}\n </KobalteNavigationMenu.Content>\n </KobalteNavigationMenu.Portal>\n )\n}\n\n/**\n * The shared panel surface. One per menu bar, and the wrapper supplies it — but\n * exported so a caller with an unusual layout can place it themselves.\n *\n * It renders no children: the panels arrive through each `NavigationMenuContent`'s\n * portal. Kobalte positions it under the bar and publishes the active panel's size\n * as `--kb-navigation-menu-viewport-*`, which the surface animates between.\n * `box-content` keeps the border outside that measured size so a panel is never\n * clipped by its own frame.\n */\nexport function NavigationMenuViewport(\n props: ComponentProps<typeof KobalteNavigationMenu.Viewport>\n) {\n const [local, rest] = splitProps(props, ['class'])\n\n return (\n <KobalteNavigationMenu.Viewport\n data-slot=\"navigation-menu-viewport\"\n class={cn(\n overlaySurface,\n 'isolate z-(--z-menu) mt-1.5 box-content list-none overflow-hidden',\n 'h-(--kb-navigation-menu-viewport-height) w-(--kb-navigation-menu-viewport-width)',\n 'origin-(--kb-menu-content-transform-origin) transition-[width,height] duration-200 ease-out',\n local.class\n )}\n {...rest}\n />\n )\n}\n\n/**\n * A link inside a panel. `href` is the point of the component, so it is a link\n * rather than a button — and the accessible name comes from its text, which is\n * why there is no `aria-label` here.\n */\nexport type NavigationMenuItemProps = ComponentProps<typeof KobalteNavigationMenu.Item> & {\n /** A one-line description, shown under the label. */\n description?: string\n /** A leading icon. */\n icon?: JSX.Element\n}\n\nexport function NavigationMenuItem(props: NavigationMenuItemProps) {\n const [local, rest] = splitProps(props, ['class', 'children', 'description', 'icon'])\n\n return (\n <KobalteNavigationMenu.Item\n class={cn(\n menuItem,\n 'grid grid-cols-[auto_1fr] items-center gap-x-2 gap-y-0.5',\n local.description && 'grid-rows-[auto_auto] py-2',\n local.class\n )}\n {...rest}\n >\n {local.icon}\n <span class=\"font-medium\">{local.children}</span>\n {local.description && (\n <span class=\"col-start-2 text-xs text-muted-foreground\">{local.description}</span>\n )}\n </KobalteNavigationMenu.Item>\n )\n}\n\nexport function NavigationMenuSeparator(\n props: ComponentProps<typeof KobalteNavigationMenu.Separator>\n) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteNavigationMenu.Separator\n class={cn('-mx-1 my-1 h-px bg-border', local.class)}\n {...rest}\n />\n )\n}\n\n/** A non-interactive caption above a group of items. */\nexport function NavigationMenuGroupLabel(\n props: ComponentProps<typeof KobalteNavigationMenu.GroupLabel>\n) {\n const [local, rest] = splitProps(props, ['class'])\n return (\n <KobalteNavigationMenu.GroupLabel\n class={cn(\n menuContentPadding,\n 'text-2xs font-semibold text-muted-foreground uppercase',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function NavigationMenuGroup(props: ComponentProps<typeof KobalteNavigationMenu.Group>) {\n const [local, rest] = splitProps(props, ['class'])\n return <KobalteNavigationMenu.Group class={cn('grid gap-0.5', local.class)} {...rest} />\n}\n"],"mappings":";;;;;;;;;AA2DA,SAAgBa,eAAeC,OAA4B;CACzD,MAAM,CAACC,OAAOC,QAAQhB,WAAWc,OAAO;EAAC;EAAS;EAAS;CAAU,CAAC;CAEtE,OAAAG,gBACGd,sBAAsBQ,MAAIO,WAAA;EAAA,KAAA,WAAA;GAAA,OAClBb,GACL,8DACA,4DACAU,MAAMI,KACR;EAAC;EAAA,KAAA,gBAAA;GAAA,OACWJ,MAAMH,SAAS;EAAM;CAAA,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A2D;CAC7F,MAAM,CAACC,OAAOC,QAAQhB,WAAWc,OAAO,CAAC,OAAO,CAAC;CACjD,OAAAG,gBAAQd,sBAAsB6C,OAAK9B,WAAA,EAAA,KAAA,WAAA;EAAA,OAAQb,GAAG,gBAAgBU,MAAMI,KAAK;CAAC,EAAA,GAAMH,IAAI,CAAA;AACtF"}
@@ -14,6 +14,12 @@ export declare function Tabs(props: ComponentProps<typeof KobalteTabs>): import(
14
14
  export type TabsListProps = ComponentProps<typeof KobalteTabs.List> & {
15
15
  appearance?: 'underline' | 'segmented';
16
16
  };
17
+ /**
18
+ * The underline appearance's rule is the baseline a horizontal row of tabs sits
19
+ * on. A vertical list has no baseline — its triggers stack — so the rule is
20
+ * dropped there; otherwise it draws as a stray line under the last trigger,
21
+ * spanning only the list's width (the SettingsLayout rail showed exactly that).
22
+ */
17
23
  export declare function TabsList(props: TabsListProps): import("solid-js").JSX.Element;
18
24
  export type TabsTriggerProps = ComponentProps<typeof KobalteTabs.Trigger> & {
19
25
  appearance?: 'underline' | 'segmented';
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/tabs/tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,WAAW,EAAE,MAAM,oBAAoB,CAAA;AACxD,OAAO,KAAK,EAAY,cAAc,EAAE,MAAM,UAAU,CAAA;AA2BxD;;;;;;;;;GASG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,WAAW,CAAC,kCAiC7D;AAED,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,OAAO,WAAW,CAAC,IAAI,CAAC,GAAG;IACpE,UAAU,CAAC,EAAE,WAAW,GAAG,WAAW,CAAA;CACvC,CAAA;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,kCAgB5C;AAED,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,WAAW,CAAC,OAAO,CAAC,GAAG;IAC1E,UAAU,CAAC,EAAE,WAAW,GAAG,WAAW,CAAA;CACvC,CAAA;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,kCA+BlD;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,WAAW,CAAC,OAAO,CAAC,kCAc5E"}
1
+ {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/tabs/tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,WAAW,EAAE,MAAM,oBAAoB,CAAA;AACxD,OAAO,KAAK,EAAY,cAAc,EAAE,MAAM,UAAU,CAAA;AA2BxD;;;;;;;;;GASG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,WAAW,CAAC,kCAiC7D;AAED,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,OAAO,WAAW,CAAC,IAAI,CAAC,GAAG;IACpE,UAAU,CAAC,EAAE,WAAW,GAAG,WAAW,CAAA;CACvC,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,kCAgB5C;AAED,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,WAAW,CAAC,OAAO,CAAC,GAAG;IAC1E,UAAU,CAAC,EAAE,WAAW,GAAG,WAAW,CAAA;CACvC,CAAA;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,kCA+BlD;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,WAAW,CAAC,OAAO,CAAC,kCAc5E"}
@@ -53,10 +53,16 @@ function Tabs$1(props) {
53
53
  }
54
54
  });
55
55
  }
56
+ /**
57
+ * The underline appearance's rule is the baseline a horizontal row of tabs sits
58
+ * on. A vertical list has no baseline — its triggers stack — so the rule is
59
+ * dropped there; otherwise it draws as a stray line under the last trigger,
60
+ * spanning only the list's width (the SettingsLayout rail showed exactly that).
61
+ */
56
62
  function TabsList(props) {
57
63
  const [local, rest] = splitProps(props, ["class", "appearance"]);
58
64
  return createComponent(Tabs.List, mergeProps({ get ["class"]() {
59
- return cn("inline-flex w-fit shrink-0 items-center justify-center", local.appearance === "segmented" ? "gap-0.5 rounded-lg bg-surface-hover p-0.5" : "gap-1 rounded-none border-b border-border", "data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch", local.class);
65
+ return cn("inline-flex w-fit shrink-0 items-center justify-center", local.appearance === "segmented" ? "gap-0.5 rounded-lg bg-surface-hover p-0.5" : "gap-1 rounded-none border-b border-border data-[orientation=vertical]:border-b-0", "data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch", local.class);
60
66
  } }, rest));
61
67
  }
62
68
  function TabsTrigger(props) {
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.js","names":["Tabs","KobalteTabs","Accessor","ComponentProps","createContext","createRenderEffect","createSignal","createUniqueId","onCleanup","splitProps","useContext","cn","TabsIdContextValue","id","triggerIds","ReadonlyMap","registerTriggerId","value","unregisterTriggerId","TabsIdContext","useTabsId","tabs","Error","props","local","rest","generatedId","setTriggerIds","Map","triggerId","current","set","get","next","delete","_$createComponent","Provider","children","_$mergeProps","class","TabsListProps","List","appearance","TabsList","TabsTriggerProps","Trigger","TabsTrigger","TabsContent","Content","aria-labelledby","Tabs","_$createComponent","KobalteTabs","_$mergeProps"],"sources":["../../../../src/components/ui/tabs/tabs.tsx"],"sourcesContent":["import { Tabs as KobalteTabs } from '@kobalte/core/tabs'\nimport type { Accessor, ComponentProps } from 'solid-js'\nimport {\n createContext,\n createRenderEffect,\n createSignal,\n createUniqueId,\n onCleanup,\n splitProps,\n useContext,\n} from 'solid-js'\nimport { cn } from '#lib/utils'\n\ntype TabsIdContextValue = {\n id: Accessor<string>\n triggerIds: Accessor<ReadonlyMap<string, string>>\n registerTriggerId: (value: string, id: string) => void\n unregisterTriggerId: (value: string, id: string) => void\n}\n\nconst TabsIdContext = createContext<TabsIdContextValue>()\n\nfunction useTabsId() {\n const tabs = useContext(TabsIdContext)\n if (!tabs) throw new Error('[adea-ui]: Tabs parts must be used within Tabs.')\n return tabs\n}\n\n/**\n * Tabs.\n *\n * For switching between sibling views of the *same* subject — a file's code,\n * diff and history. Not for moving between pages: a tab is expected to keep\n * its panel and its scroll position, which a route does not.\n *\n * `appearance=\"segmented\"` gives the joined bar KiroCrew uses inside a pane\n * where a full-width underline would collide with the panel's own header rule.\n */\nexport function Tabs(props: ComponentProps<typeof KobalteTabs>) {\n const [local, rest] = splitProps(props, ['class', 'id'])\n const generatedId = `tabs-${createUniqueId()}`\n const id = () => local.id ?? generatedId\n const [triggerIds, setTriggerIds] = createSignal<ReadonlyMap<string, string>>(new Map())\n const tabs: TabsIdContextValue = {\n id,\n triggerIds,\n registerTriggerId: (value, triggerId) => {\n setTriggerIds((current) => new Map(current).set(value, triggerId))\n },\n unregisterTriggerId: (value, triggerId) => {\n setTriggerIds((current) => {\n if (current.get(value) !== triggerId) return current\n const next = new Map(current)\n next.delete(value)\n return next\n })\n },\n }\n\n return (\n <TabsIdContext.Provider value={tabs}>\n <KobalteTabs\n id={id()}\n class={cn(\n 'flex min-h-0 min-w-0 flex-col gap-2 data-[orientation=vertical]:flex-row',\n local.class\n )}\n {...rest}\n />\n </TabsIdContext.Provider>\n )\n}\n\nexport type TabsListProps = ComponentProps<typeof KobalteTabs.List> & {\n appearance?: 'underline' | 'segmented'\n}\n\nexport function TabsList(props: TabsListProps) {\n const [local, rest] = splitProps(props, ['class', 'appearance'])\n\n return (\n <KobalteTabs.List\n class={cn(\n 'inline-flex w-fit shrink-0 items-center justify-center',\n local.appearance === 'segmented'\n ? 'gap-0.5 rounded-lg bg-surface-hover p-0.5'\n : 'gap-1 rounded-none border-b border-border',\n 'data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport type TabsTriggerProps = ComponentProps<typeof KobalteTabs.Trigger> & {\n appearance?: 'underline' | 'segmented'\n}\n\nexport function TabsTrigger(props: TabsTriggerProps) {\n const [local, rest] = splitProps(props, ['class', 'appearance', 'id'])\n const tabs = useTabsId()\n const triggerId = () => local.id ?? `${tabs.id()}-trigger-${rest.value}`\n\n // Register before panels render, including SSR where createEffect is skipped.\n createRenderEffect(() => {\n const value = rest.value\n const id = triggerId()\n tabs.registerTriggerId(value, id)\n onCleanup(() => tabs.unregisterTriggerId(value, id))\n })\n\n return (\n <KobalteTabs.Trigger\n id={triggerId()}\n class={cn(\n 'inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap text-sm font-medium',\n 'transition-colors ease-out outline-none select-none',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'disabled:pointer-events-none disabled:opacity-50',\n 'text-foreground',\n '[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-4',\n local.appearance === 'segmented'\n ? 'h-control-sm rounded-md px-control-sm data-[selected]:bg-card data-[selected]:shadow-xs'\n : 'h-control-md -mb-px rounded-none border-b-2 border-transparent px-2 pb-2 data-[selected]:border-primary',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function TabsContent(props: ComponentProps<typeof KobalteTabs.Content>) {\n const [local, rest] = splitProps(props, ['class', 'aria-labelledby'])\n const tabs = useTabsId()\n return (\n <KobalteTabs.Content\n aria-labelledby={\n local['aria-labelledby'] ??\n tabs.triggerIds().get(rest.value) ??\n `${tabs.id()}-trigger-${rest.value}`\n }\n class={cn('min-h-0 min-w-0 flex-1 outline-none', local.class)}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;AAoBA,IAAMmB,gBAAgBf,cAAkC;AAExD,SAASgB,YAAY;CACnB,MAAMC,OAAOX,WAAWS,aAAa;CACrC,IAAI,CAACE,MAAM,MAAM,IAAIC,MAAM,iDAAiD;CAC5E,OAAOD;AACT;;;;;;;;;;;AAYA,SAAgBrB,OAAKuB,OAA2C;CAC9D,MAAM,CAACC,OAAOC,QAAQhB,WAAWc,O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AM,GAAGQ,KAAKR,GAAG,EAAC,WAAYY,KAAKR;CAGjEZ,yBAAyB;EACvB,MAAMY,QAAQQ,KAAKR;EACnB,MAAMJ,KAAKgB,UAAU;EACrBR,KAAKL,kBAAkBC,OAAOJ,EAAE;EAChCL,gBAAgBa,KAAKH,oBAAoBD,OAAOJ,EAAE,CAAC;CACrD,CAAC;CAED,OAAAsB,gBACGlC,KAAY4C,SAAOP,WAAA;EAAA,IAClBzB,KAAE;GAAA,OAAEgB,UAAU;EAAC;EAAA,KAAA,WAAA;GAAA,OACRlB,GACL,kGACA,uDACA,oFACA,oDACA,mBACA,+DACAa,MAAMkB,eAAe,cACjB,4FACA,2GACJlB,MAAMe,KACR;EAAC;CAAA,GACGd,IAAI,CAAA;AAGd;AAEA,SAAgBsB,YAAYxB,OAAmD;CAC7E,MAAM,CAACC,OAAOC,QAAQhB,WAAWc,OAAO,CAAC,SAAS,iBAAiB,CAAC;CACpE,MAAMF,OAAOD,UAAU;CACvB,OAAAe,gBACGlC,KAAY+C,SAAOV,WAAA;EAAA,KAAA,qBAAA;GAAA,OAEhBd,MAAM,sBACNH,KAAKP,WAAW,CAAC,CAACkB,IAAIP,KAAKR,KAAK,KAChC,GAAGI,KAAKR,GAAG,EAAC,WAAYY,KAAKR;EAAO;EAAA,KAAA,WAAA;GAAA,OAE/BN,GAAG,uCAAuCa,MAAMe,KAAK;EAAC;CAAA,GACzDd,IAAI,CAAA;AAGd"}
1
+ {"version":3,"file":"tabs.js","names":["Tabs","KobalteTabs","Accessor","ComponentProps","createContext","createRenderEffect","createSignal","createUniqueId","onCleanup","splitProps","useContext","cn","TabsIdContextValue","id","triggerIds","ReadonlyMap","registerTriggerId","value","unregisterTriggerId","TabsIdContext","useTabsId","tabs","Error","props","local","rest","generatedId","setTriggerIds","Map","triggerId","current","set","get","next","delete","_$createComponent","Provider","children","_$mergeProps","class","TabsListProps","List","appearance","TabsList","TabsTriggerProps","Trigger","TabsTrigger","TabsContent","Content","aria-labelledby","Tabs","_$createComponent","KobalteTabs","_$mergeProps"],"sources":["../../../../src/components/ui/tabs/tabs.tsx"],"sourcesContent":["import { Tabs as KobalteTabs } from '@kobalte/core/tabs'\nimport type { Accessor, ComponentProps } from 'solid-js'\nimport {\n createContext,\n createRenderEffect,\n createSignal,\n createUniqueId,\n onCleanup,\n splitProps,\n useContext,\n} from 'solid-js'\nimport { cn } from '#lib/utils'\n\ntype TabsIdContextValue = {\n id: Accessor<string>\n triggerIds: Accessor<ReadonlyMap<string, string>>\n registerTriggerId: (value: string, id: string) => void\n unregisterTriggerId: (value: string, id: string) => void\n}\n\nconst TabsIdContext = createContext<TabsIdContextValue>()\n\nfunction useTabsId() {\n const tabs = useContext(TabsIdContext)\n if (!tabs) throw new Error('[adea-ui]: Tabs parts must be used within Tabs.')\n return tabs\n}\n\n/**\n * Tabs.\n *\n * For switching between sibling views of the *same* subject — a file's code,\n * diff and history. Not for moving between pages: a tab is expected to keep\n * its panel and its scroll position, which a route does not.\n *\n * `appearance=\"segmented\"` gives the joined bar KiroCrew uses inside a pane\n * where a full-width underline would collide with the panel's own header rule.\n */\nexport function Tabs(props: ComponentProps<typeof KobalteTabs>) {\n const [local, rest] = splitProps(props, ['class', 'id'])\n const generatedId = `tabs-${createUniqueId()}`\n const id = () => local.id ?? generatedId\n const [triggerIds, setTriggerIds] = createSignal<ReadonlyMap<string, string>>(new Map())\n const tabs: TabsIdContextValue = {\n id,\n triggerIds,\n registerTriggerId: (value, triggerId) => {\n setTriggerIds((current) => new Map(current).set(value, triggerId))\n },\n unregisterTriggerId: (value, triggerId) => {\n setTriggerIds((current) => {\n if (current.get(value) !== triggerId) return current\n const next = new Map(current)\n next.delete(value)\n return next\n })\n },\n }\n\n return (\n <TabsIdContext.Provider value={tabs}>\n <KobalteTabs\n id={id()}\n class={cn(\n 'flex min-h-0 min-w-0 flex-col gap-2 data-[orientation=vertical]:flex-row',\n local.class\n )}\n {...rest}\n />\n </TabsIdContext.Provider>\n )\n}\n\nexport type TabsListProps = ComponentProps<typeof KobalteTabs.List> & {\n appearance?: 'underline' | 'segmented'\n}\n\n/**\n * The underline appearance's rule is the baseline a horizontal row of tabs sits\n * on. A vertical list has no baseline — its triggers stack — so the rule is\n * dropped there; otherwise it draws as a stray line under the last trigger,\n * spanning only the list's width (the SettingsLayout rail showed exactly that).\n */\nexport function TabsList(props: TabsListProps) {\n const [local, rest] = splitProps(props, ['class', 'appearance'])\n\n return (\n <KobalteTabs.List\n class={cn(\n 'inline-flex w-fit shrink-0 items-center justify-center',\n local.appearance === 'segmented'\n ? 'gap-0.5 rounded-lg bg-surface-hover p-0.5'\n : 'gap-1 rounded-none border-b border-border data-[orientation=vertical]:border-b-0',\n 'data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport type TabsTriggerProps = ComponentProps<typeof KobalteTabs.Trigger> & {\n appearance?: 'underline' | 'segmented'\n}\n\nexport function TabsTrigger(props: TabsTriggerProps) {\n const [local, rest] = splitProps(props, ['class', 'appearance', 'id'])\n const tabs = useTabsId()\n const triggerId = () => local.id ?? `${tabs.id()}-trigger-${rest.value}`\n\n // Register before panels render, including SSR where createEffect is skipped.\n createRenderEffect(() => {\n const value = rest.value\n const id = triggerId()\n tabs.registerTriggerId(value, id)\n onCleanup(() => tabs.unregisterTriggerId(value, id))\n })\n\n return (\n <KobalteTabs.Trigger\n id={triggerId()}\n class={cn(\n 'inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap text-sm font-medium',\n 'transition-colors ease-out outline-none select-none',\n 'focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle',\n 'disabled:pointer-events-none disabled:opacity-50',\n 'text-foreground',\n '[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-4',\n local.appearance === 'segmented'\n ? 'h-control-sm rounded-md px-control-sm data-[selected]:bg-card data-[selected]:shadow-xs'\n : 'h-control-md -mb-px rounded-none border-b-2 border-transparent px-2 pb-2 data-[selected]:border-primary',\n local.class\n )}\n {...rest}\n />\n )\n}\n\nexport function TabsContent(props: ComponentProps<typeof KobalteTabs.Content>) {\n const [local, rest] = splitProps(props, ['class', 'aria-labelledby'])\n const tabs = useTabsId()\n return (\n <KobalteTabs.Content\n aria-labelledby={\n local['aria-labelledby'] ??\n tabs.triggerIds().get(rest.value) ??\n `${tabs.id()}-trigger-${rest.value}`\n }\n class={cn('min-h-0 min-w-0 flex-1 outline-none', local.class)}\n {...rest}\n />\n )\n}\n"],"mappings":";;;;;AAoBA,IAAMmB,gBAAgBf,cAAkC;AAExD,SAASgB,YAAY;CACnB,MAAMC,OAAOX,WAAWS,aAAa;CACrC,IAAI,CAACE,MAAM,MAAM,IAAIC,MAAM,iDAAiD;CAC5E,OAAOD;AACT;;;;;;;;;;;AAYA,SAAgBrB,OAAKuB,OAA2C;CAC9D,MAAM,CAACC,OAAOC,QAAQhB,WAAWc,OAAO,CAAC,SAAS,IAAI,CAAC;CACvD,MAAMG,cAAc,QAAQnB,eAAe;CAC3C,MAAMM,WAAWW,MAAMX,MAAMa;CAC7B,MAAM,CAACZ,YAAYa,iBAAiBrB,6BAA0C,IAAIsB,IAAI,CAAC;CACvF,MAAMP,OAA2B;EAC/BR;EACAC;EACAE,oBAAoBC,OAAOY,cAAc;GACvCF,eAAeG,YAAY,IAAIF,IAAIE,OAAO,CAAC,CAACC,IAAId,OAAOY,SAAS,CAAC;EACnE;EACAX,sBAAsBD,OAAOY,cAAc;GACzCF,eAAeG,YAAY;IACzB,IAAIA,QAAQE,IAAIf,KAAK,MAAMY,WAAW,OAAOC;IAC7C,MAAMG,OAAO,IAAIL,IAAIE,OAAO;IAC5BG,KAAKC,OAAOjB,KAAK;IACjB,OAAOgB;GACT,CAAC;EACH;CACF;CAEA,OAAAE,gBACGhB,cAAciB,UAAQ;EAACnB,OAAOI;EAAI,IAAAgB,WAAA;GAAA,OAAAF,gBAChClC,MAAWqC,WAAA;IAAA,IACVzB,KAAE;KAAA,OA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AqBD,iFAAiF;AACjF,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,eA+B1C;AAED,OAAO,EAAE,OAAO,EAAE,CAAA"}
@@ -151,11 +151,22 @@ var toast = {
151
151
  dismiss: toaster.dismiss,
152
152
  clear: toaster.clear
153
153
  };
154
+ /**
155
+ * The corner is set on the region, not the list. The region is the `fixed`
156
+ * element: an inset on the list inside it positions nothing, and the region falls
157
+ * back to wherever it happens to sit in the document flow.
158
+ */
154
159
  var toasterPosition = {
155
- "top-left": "top-0 left-0 items-start",
156
- "top-right": "top-0 right-0 items-end",
157
- "bottom-left": "bottom-0 left-0 items-start",
158
- "bottom-right": "bottom-0 right-0 items-end"
160
+ "top-left": "top-0 left-0",
161
+ "top-right": "top-0 right-0",
162
+ "bottom-left": "bottom-0 left-0",
163
+ "bottom-right": "bottom-0 right-0"
164
+ };
165
+ var toasterAlignment = {
166
+ "top-left": "items-start",
167
+ "top-right": "items-end",
168
+ "bottom-left": "items-start",
169
+ "bottom-right": "items-end"
159
170
  };
160
171
  /** Mount once, near the root. Renders the stack and owns its timing defaults. */
161
172
  function Toaster(props) {
@@ -173,10 +184,12 @@ function Toaster(props) {
173
184
  swipeDirection: "right",
174
185
  pauseOnInteraction: true,
175
186
  pauseOnPageIdle: true,
176
- "class": "pointer-events-none fixed z-(--z-toast) flex max-h-screen w-full flex-col gap-2 p-4 sm:max-w-sm"
187
+ get ["class"]() {
188
+ return cn("pointer-events-none fixed z-(--z-toast) flex max-h-screen w-full flex-col gap-2 p-4 sm:max-w-sm", toasterPosition[local.position ?? "bottom-right"]);
189
+ }
177
190
  }, rest, { get children() {
178
191
  return createComponent(Toast.List, { get ["class"]() {
179
- return cn("flex flex-col gap-2", toasterPosition[local.position ?? "bottom-right"], local.class);
192
+ return cn("flex flex-col gap-2", toasterAlignment[local.position ?? "bottom-right"], local.class);
180
193
  } });
181
194
  } }));
182
195
  }
@@ -1 +1 @@
1
- {"version":3,"file":"toast.js","names":["Toast","KobalteToast","ToastComponentProps","toaster","X","ComponentProps","JSX","Show","splitProps","cn","ToastTone","toastTones","Record","default","success","warning","destructive","info","ToastOptions","title","description","tone","action","Element","persistent","duration","region","ToastCard","props","_$createComponent","toastId","priority","class","style","children","_tmpl$","_el$2","_tmpl$3","_$insert","Title","when","Description","_el$3","_tmpl$2","CloseButton","toast","show","options","_$mergeProps","Omit","error","promise","Promise","T","messages","pending","data","resolved","state","dismiss","clear","ToasterProps","Region","position","toasterPosition","Toaster","local","rest","regionId","limit","swipeDirection","pauseOnInteraction","pauseOnPageIdle","List","_$createComponent","KobalteToast","_$mergeProps"],"sources":["../../../../src/components/ui/toast/toast.tsx"],"sourcesContent":["import { Toast as KobalteToast, type ToastComponentProps, toaster } from '@kobalte/core/toast'\nimport { X } from 'lucide-solid'\nimport type { ComponentProps, JSX } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * Toast.\n *\n * A short, self-dismissing message about something that already happened.\n *\n * The rules that make toasts helpful rather than hostile are built into this\n * API rather than left to callers:\n *\n * - A toast never carries the only route to an action. Anything important\n * enough to need doing belongs in the interface, not in a message that\n * disappears. `action` exists, but it is a convenience, not a flow.\n * - Errors from user-initiated work get `priority=\"high\"` so a screen reader\n * interrupts to announce them; background progress uses the default low\n * priority so it is not read over whatever the user is doing.\n * - A toast with a way to undo is preferred to a confirmation dialog for a\n * reversible action. Undo after the fact costs the user nothing; a modal\n * before it costs everyone a click.\n *\n * `Toaster` is mounted once, near the root of the app.\n */\n\ntype ToastTone = 'default' | 'success' | 'warning' | 'destructive' | 'info'\n\n/**\n * The tone dot's colour. A custom property rather than five colour utilities\n * because the value is applied inline (the tone is data, not markup) and a\n * Tailwind colour class cannot be built from a runtime value without becoming\n * invisible to the linter.\n */\nconst toastTones: Record<ToastTone, string> = {\n default: 'var(--foreground)',\n success: 'var(--success)',\n warning: 'var(--warning)',\n destructive: 'var(--destructive)',\n info: 'var(--info)',\n}\n\nexport type ToastOptions = {\n title: string\n description?: string\n tone?: ToastTone\n /** A control rendered inside the toast, usually an Undo. */\n action?: JSX.Element\n /** Keep the toast until it is dismissed. Use for a failure the user must see. */\n persistent?: boolean\n /** Milliseconds before auto-dismiss. Overrides the region's setting. */\n duration?: number\n /** Which Toaster region to render into. */\n region?: string\n}\n\nfunction ToastCard(props: ToastComponentProps & ToastOptions) {\n const tone = () => props.tone ?? 'default'\n\n return (\n <KobalteToast\n toastId={props.toastId}\n /**\n * A user-initiated outcome is announced; a background one waits its turn.\n * A failure the user caused is worth interrupting for; a sync finishing\n * quietly is not.\n */\n priority={tone() === 'destructive' ? 'high' : 'low'}\n duration={props.duration}\n persistent={props.persistent}\n class={cn(\n 'pointer-events-auto flex w-full items-start gap-3 rounded-xl border border-border bg-popover p-3 shadow-lg',\n 'data-[opened]:animate-in data-[opened]:slide-in-from-right-full data-[opened]:fade-in-0',\n 'data-[closed]:animate-out data-[closed]:slide-out-to-right-full data-[closed]:fade-out-0',\n 'data-[swipe=move]:translate-x-(--kb-toast-swipe-move-x) data-[swipe=move]:transition-none',\n 'data-[swipe=cancel]:translate-x-0 data-[swipe=cancel]:transition-transform',\n 'data-[swipe=end]:animate-out data-[swipe=end]:slide-out-to-right-full'\n )}\n style={{ '--toast-tone': toastTones[tone()] }}\n >\n <span\n aria-hidden=\"true\"\n class=\"mt-1.5 size-1.5 shrink-0 rounded-full\"\n style={{ 'background-color': 'var(--toast-tone)' }}\n />\n <div class=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n <KobalteToast.Title class=\"text-sm font-medium\">{props.title}</KobalteToast.Title>\n <Show when={props.description}>\n <KobalteToast.Description class=\"text-sm text-muted-foreground\">\n {props.description}\n </KobalteToast.Description>\n </Show>\n <Show when={props.action}>\n <div class=\"mt-1.5 flex items-center gap-2\">{props.action}</div>\n </Show>\n </div>\n <KobalteToast.CloseButton\n aria-label=\"Dismiss notification\"\n class=\"text-muted-foreground shrink-0 rounded-sm p-0.5 transition-colors ease-out outline-none hover:text-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle\"\n >\n <X class=\"size-3.5\" />\n </KobalteToast.CloseButton>\n </KobalteToast>\n )\n}\n\n/**\n * The toast API. `show` is the general form; the tone helpers are shorthand for\n * the four cases that come up constantly.\n */\nexport const toast = {\n show(options: ToastOptions): number {\n return toaster.show((props) => <ToastCard {...props} {...options} />, {\n region: options.region,\n })\n },\n success(title: string, options?: Omit<ToastOptions, 'title' | 'tone'>): number {\n return toast.show({ ...options, title, tone: 'success' })\n },\n error(title: string, options?: Omit<ToastOptions, 'title' | 'tone'>): number {\n return toast.show({ ...options, title, tone: 'destructive', persistent: true })\n },\n warning(title: string, options?: Omit<ToastOptions, 'title' | 'tone'>): number {\n return toast.show({ ...options, title, tone: 'warning' })\n },\n info(title: string, options?: Omit<ToastOptions, 'title' | 'tone'>): number {\n return toast.show({ ...options, title, tone: 'info' })\n },\n /**\n * A toast that resolves with a promise: pending, then success or failure.\n * The right shape for an operation with a visible duration, because the user\n * gets one message instead of three.\n */\n promise<T>(\n promise: Promise<T> | (() => Promise<T>),\n messages: {\n pending: string\n success: string | ((data: T) => string)\n error: string | ((error: unknown) => string)\n }\n ): Promise<T> {\n const resolved = typeof promise === 'function' ? promise() : promise\n toaster.promise(resolved, (props) => {\n const tone: ToastTone =\n props.state === 'fulfilled'\n ? 'success'\n : props.state === 'rejected'\n ? 'destructive'\n : 'default'\n const title =\n props.state === 'pending'\n ? messages.pending\n : props.state === 'fulfilled'\n ? typeof messages.success === 'function'\n ? messages.success(props.data as T)\n : messages.success\n : typeof messages.error === 'function'\n ? messages.error(props.error)\n : messages.error\n return (\n <ToastCard\n toastId={props.toastId}\n title={title}\n tone={tone}\n persistent={props.state === 'rejected'}\n />\n )\n })\n return resolved\n },\n dismiss: toaster.dismiss,\n clear: toaster.clear,\n}\n\nexport type ToasterProps = ComponentProps<typeof KobalteToast.Region> & {\n /** Where the stack sits. Defaults to the bottom-right, clear of the shell. */\n position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'\n region?: string\n}\n\nconst toasterPosition = {\n 'top-left': 'top-0 left-0 items-start',\n 'top-right': 'top-0 right-0 items-end',\n 'bottom-left': 'bottom-0 left-0 items-start',\n 'bottom-right': 'bottom-0 right-0 items-end',\n}\n\n/** Mount once, near the root. Renders the stack and owns its timing defaults. */\nexport function Toaster(props: ToasterProps) {\n const [local, rest] = splitProps(props, ['position', 'region', 'class'])\n\n return (\n <KobalteToast.Region\n regionId={local.region}\n duration={5000}\n limit={3}\n swipeDirection=\"right\"\n pauseOnInteraction\n pauseOnPageIdle\n /**\n * The toast region is a top layer: opening a dialog must not hide an\n * in-flight notification, and clicking a toast must not dismiss the\n * dialog behind it.\n */\n class=\"pointer-events-none fixed z-(--z-toast) flex max-h-screen w-full flex-col gap-2 p-4 sm:max-w-sm\"\n {...rest}\n >\n <KobalteToast.List\n class={cn(\n 'flex flex-col gap-2',\n toasterPosition[local.position ?? 'bottom-right'],\n local.class\n )}\n />\n </KobalteToast.Region>\n )\n}\n\nexport { toaster }\n"],"mappings":";;;;;;;;;;;;;;;AAmCA,IAAMW,aAAwC;CAC5CE,SAAS;CACTC,SAAS;CACTC,SAAS;CACTC,aAAa;CACbC,MAAM;AACR;AAgBA,SAASU,UAAUC,OAA2C;CAC5D,MAAMP,aAAaO,MAAMP,QAAQ;CAEjC,OAAAQ,gBACG5B,OAAY;EAAA,IACX6B,UAAO;GAAA,OAAEF,MAAME;EAAO;EAAA,IAMtBC,WAAQ;GAAA,OAAEV,KAAK,MAAM,gBAAgB,SAAS;EAAK;EAAA,IACnDI,WAAQ;GAAA,OAAEG,MAAMH;EAAQ;EAAA,IACxBD,aAAU;GAAA,OAAEI,MAAMJ;EAAU;EAAA,KAAA,WAAA;GAAA,OACrBf,GACL,8GACA,2FACA,4FACA,6FACA,8EACA,uEACF;EAAC;EAAA,IACDwB,QAAK;GAAA,OAAE,EAAE,gBAAgBtB,WAAWU,KAAK,GAAG;EAAC;EAAA,IAAA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gBAAc;EACdC,oBAAkB;EAClBC,iBAAe;EAAA,SAAA;CAAA,GAOXL,MAAI,EAAA,IAAAjC,WAAA;EAAA,OAAAL,gBAEP5B,MAAawE,MAAI,EAAA,KAAA,WAAA;GAAA,OACThE,GACL,uBACAuD,gBAAgBE,MAAMH,YAAY,iBAClCG,MAAMlC,KACR;EAAC,EAAA,CAAA;CAAA,EAAA,CAAA,CAAA;AAIT"}
1
+ {"version":3,"file":"toast.js","names":["Toast","KobalteToast","ToastComponentProps","toaster","X","ComponentProps","JSX","Show","splitProps","cn","ToastTone","toastTones","Record","default","success","warning","destructive","info","ToastOptions","title","description","tone","action","Element","persistent","duration","region","ToastCard","props","_$createComponent","toastId","priority","class","style","children","_tmpl$","_el$2","_tmpl$3","_$insert","Title","when","Description","_el$3","_tmpl$2","CloseButton","toast","show","options","_$mergeProps","Omit","error","promise","Promise","T","messages","pending","data","resolved","state","dismiss","clear","ToasterProps","Region","position","toasterPosition","toasterAlignment","Toaster","local","rest","regionId","limit","swipeDirection","pauseOnInteraction","pauseOnPageIdle","List","_$createComponent","KobalteToast","_$mergeProps"],"sources":["../../../../src/components/ui/toast/toast.tsx"],"sourcesContent":["import { Toast as KobalteToast, type ToastComponentProps, toaster } from '@kobalte/core/toast'\nimport { X } from 'lucide-solid'\nimport type { ComponentProps, JSX } from 'solid-js'\nimport { Show, splitProps } from 'solid-js'\nimport { cn } from '#lib/utils'\n\n/**\n * Toast.\n *\n * A short, self-dismissing message about something that already happened.\n *\n * The rules that make toasts helpful rather than hostile are built into this\n * API rather than left to callers:\n *\n * - A toast never carries the only route to an action. Anything important\n * enough to need doing belongs in the interface, not in a message that\n * disappears. `action` exists, but it is a convenience, not a flow.\n * - Errors from user-initiated work get `priority=\"high\"` so a screen reader\n * interrupts to announce them; background progress uses the default low\n * priority so it is not read over whatever the user is doing.\n * - A toast with a way to undo is preferred to a confirmation dialog for a\n * reversible action. Undo after the fact costs the user nothing; a modal\n * before it costs everyone a click.\n *\n * `Toaster` is mounted once, near the root of the app.\n */\n\ntype ToastTone = 'default' | 'success' | 'warning' | 'destructive' | 'info'\n\n/**\n * The tone dot's colour. A custom property rather than five colour utilities\n * because the value is applied inline (the tone is data, not markup) and a\n * Tailwind colour class cannot be built from a runtime value without becoming\n * invisible to the linter.\n */\nconst toastTones: Record<ToastTone, string> = {\n default: 'var(--foreground)',\n success: 'var(--success)',\n warning: 'var(--warning)',\n destructive: 'var(--destructive)',\n info: 'var(--info)',\n}\n\nexport type ToastOptions = {\n title: string\n description?: string\n tone?: ToastTone\n /** A control rendered inside the toast, usually an Undo. */\n action?: JSX.Element\n /** Keep the toast until it is dismissed. Use for a failure the user must see. */\n persistent?: boolean\n /** Milliseconds before auto-dismiss. Overrides the region's setting. */\n duration?: number\n /** Which Toaster region to render into. */\n region?: string\n}\n\nfunction ToastCard(props: ToastComponentProps & ToastOptions) {\n const tone = () => props.tone ?? 'default'\n\n return (\n <KobalteToast\n toastId={props.toastId}\n /**\n * A user-initiated outcome is announced; a background one waits its turn.\n * A failure the user caused is worth interrupting for; a sync finishing\n * quietly is not.\n */\n priority={tone() === 'destructive' ? 'high' : 'low'}\n duration={props.duration}\n persistent={props.persistent}\n class={cn(\n 'pointer-events-auto flex w-full items-start gap-3 rounded-xl border border-border bg-popover p-3 shadow-lg',\n 'data-[opened]:animate-in data-[opened]:slide-in-from-right-full data-[opened]:fade-in-0',\n 'data-[closed]:animate-out data-[closed]:slide-out-to-right-full data-[closed]:fade-out-0',\n 'data-[swipe=move]:translate-x-(--kb-toast-swipe-move-x) data-[swipe=move]:transition-none',\n 'data-[swipe=cancel]:translate-x-0 data-[swipe=cancel]:transition-transform',\n 'data-[swipe=end]:animate-out data-[swipe=end]:slide-out-to-right-full'\n )}\n style={{ '--toast-tone': toastTones[tone()] }}\n >\n <span\n aria-hidden=\"true\"\n class=\"mt-1.5 size-1.5 shrink-0 rounded-full\"\n style={{ 'background-color': 'var(--toast-tone)' }}\n />\n <div class=\"flex min-w-0 flex-1 flex-col gap-0.5\">\n <KobalteToast.Title class=\"text-sm font-medium\">{props.title}</KobalteToast.Title>\n <Show when={props.description}>\n <KobalteToast.Description class=\"text-sm text-muted-foreground\">\n {props.description}\n </KobalteToast.Description>\n </Show>\n <Show when={props.action}>\n <div class=\"mt-1.5 flex items-center gap-2\">{props.action}</div>\n </Show>\n </div>\n <KobalteToast.CloseButton\n aria-label=\"Dismiss notification\"\n class=\"text-muted-foreground shrink-0 rounded-sm p-0.5 transition-colors ease-out outline-none hover:text-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-primary-subtle\"\n >\n <X class=\"size-3.5\" />\n </KobalteToast.CloseButton>\n </KobalteToast>\n )\n}\n\n/**\n * The toast API. `show` is the general form; the tone helpers are shorthand for\n * the four cases that come up constantly.\n */\nexport const toast = {\n show(options: ToastOptions): number {\n return toaster.show((props) => <ToastCard {...props} {...options} />, {\n region: options.region,\n })\n },\n success(title: string, options?: Omit<ToastOptions, 'title' | 'tone'>): number {\n return toast.show({ ...options, title, tone: 'success' })\n },\n error(title: string, options?: Omit<ToastOptions, 'title' | 'tone'>): number {\n return toast.show({ ...options, title, tone: 'destructive', persistent: true })\n },\n warning(title: string, options?: Omit<ToastOptions, 'title' | 'tone'>): number {\n return toast.show({ ...options, title, tone: 'warning' })\n },\n info(title: string, options?: Omit<ToastOptions, 'title' | 'tone'>): number {\n return toast.show({ ...options, title, tone: 'info' })\n },\n /**\n * A toast that resolves with a promise: pending, then success or failure.\n * The right shape for an operation with a visible duration, because the user\n * gets one message instead of three.\n */\n promise<T>(\n promise: Promise<T> | (() => Promise<T>),\n messages: {\n pending: string\n success: string | ((data: T) => string)\n error: string | ((error: unknown) => string)\n }\n ): Promise<T> {\n const resolved = typeof promise === 'function' ? promise() : promise\n toaster.promise(resolved, (props) => {\n const tone: ToastTone =\n props.state === 'fulfilled'\n ? 'success'\n : props.state === 'rejected'\n ? 'destructive'\n : 'default'\n const title =\n props.state === 'pending'\n ? messages.pending\n : props.state === 'fulfilled'\n ? typeof messages.success === 'function'\n ? messages.success(props.data as T)\n : messages.success\n : typeof messages.error === 'function'\n ? messages.error(props.error)\n : messages.error\n return (\n <ToastCard\n toastId={props.toastId}\n title={title}\n tone={tone}\n persistent={props.state === 'rejected'}\n />\n )\n })\n return resolved\n },\n dismiss: toaster.dismiss,\n clear: toaster.clear,\n}\n\nexport type ToasterProps = ComponentProps<typeof KobalteToast.Region> & {\n /** Where the stack sits. Defaults to the bottom-right, clear of the shell. */\n position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'\n region?: string\n}\n\n/**\n * The corner is set on the region, not the list. The region is the `fixed`\n * element: an inset on the list inside it positions nothing, and the region falls\n * back to wherever it happens to sit in the document flow.\n */\nconst toasterPosition = {\n 'top-left': 'top-0 left-0',\n 'top-right': 'top-0 right-0',\n 'bottom-left': 'bottom-0 left-0',\n 'bottom-right': 'bottom-0 right-0',\n}\n\nconst toasterAlignment = {\n 'top-left': 'items-start',\n 'top-right': 'items-end',\n 'bottom-left': 'items-start',\n 'bottom-right': 'items-end',\n}\n\n/** Mount once, near the root. Renders the stack and owns its timing defaults. */\nexport function Toaster(props: ToasterProps) {\n const [local, rest] = splitProps(props, ['position', 'region', 'class'])\n\n return (\n <KobalteToast.Region\n regionId={local.region}\n duration={5000}\n limit={3}\n swipeDirection=\"right\"\n pauseOnInteraction\n pauseOnPageIdle\n /**\n * The toast region is a top layer: opening a dialog must not hide an\n * in-flight notification, and clicking a toast must not dismiss the\n * dialog behind it.\n */\n class={cn(\n 'pointer-events-none fixed z-(--z-toast) flex max-h-screen w-full flex-col gap-2 p-4 sm:max-w-sm',\n toasterPosition[local.position ?? 'bottom-right']\n )}\n {...rest}\n >\n <KobalteToast.List\n class={cn(\n 'flex flex-col gap-2',\n toasterAlignment[local.position ?? 'bottom-right'],\n local.class\n )}\n />\n </KobalteToast.Region>\n )\n}\n\nexport { toaster }\n"],"mappings":";;;;;;;;;;;;;;;AAmCA,IAAMW,aAAwC;CAC5CE,SAA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S;IAAA,IACRG,UAAO;KAAA,OAAEF,MAAME;IAAO;IACfX;IACDE;IAAI,IACVG,aAAU;KAAA,OAAEI,MAAM8B,UAAU;IAAU;GAAA,CAAA;EAG5C,CAAC;EACD,OAAOD;CACT;CACAE,SAASxD,QAAQwD;CACjBC,OAAOzD,QAAQyD;AACjB;;;;;;AAaA,IAAMI,kBAAkB;CACtB,YAAY;CACZ,aAAa;CACb,eAAe;CACf,gBAAgB;AAClB;AAEA,IAAMC,mBAAmB;CACvB,YAAY;CACZ,aAAa;CACb,eAAe;CACf,gBAAgB;AAClB;;AAGA,SAAgBC,QAAQtC,OAAqB;CAC3C,MAAM,CAACuC,OAAOC,QAAQ5D,WAAWoB,OAAO;EAAC;EAAY;EAAU;CAAO,CAAC;CAEvE,OAAAC,gBACG5B,MAAa6D,QAAMd,WAAA;EAAA,IAClBqB,WAAQ;GAAA,OAAEF,MAAMzC;EAAM;EACtBD,UAAU;EACV6C,OAAO;EACPC,gBAAc;EACdC,oBAAkB;EAClBC,iBAAe;EAAA,KAAA,WAAA;GAAA,OAMRhE,GACL,mGACAuD,gBAAgBG,MAAMJ,YAAY,eACpC;EAAC;CAAA,GACGK,MAAI,EAAA,IAAAlC,WAAA;EAAA,OAAAL,gBAEP5B,MAAayE,MAAI,EAAA,KAAA,WAAA;GAAA,OACTjE,GACL,uBACAwD,iBAAiBE,MAAMJ,YAAY,iBACnCI,MAAMnC,KACR;EAAC,EAAA,CAAA;CAAA,EAAA,CAAA,CAAA;AAIT"}
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/tooltip/tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAqB,MAAM,uBAAuB,CAAA;AACpF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAyI9C,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,CAAC,EAAE,cAAc,CAAC,KAAK,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