@nuka-ui/core 1.0.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +135 -23
- package/dist/_virtual/_rolldown/runtime.cjs +1 -0
- package/dist/bundle.css +1 -1
- package/dist/components/Accordion/Accordion.cjs +2 -0
- package/dist/components/Accordion/Accordion.cjs.map +1 -0
- package/dist/components/Accordion/Accordion.context.cjs +2 -0
- package/dist/components/Accordion/Accordion.context.cjs.map +1 -0
- package/dist/components/Accordion/Accordion.context.d.ts.map +1 -1
- package/dist/components/Accordion/Accordion.context.js +19 -0
- package/dist/components/Accordion/Accordion.context.js.map +1 -0
- package/dist/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/Accordion/Accordion.js +103 -0
- package/dist/components/Accordion/Accordion.js.map +1 -0
- package/dist/components/Accordion/AccordionContent.cjs +2 -0
- package/dist/components/Accordion/AccordionContent.cjs.map +1 -0
- package/dist/components/Accordion/AccordionContent.d.ts.map +1 -1
- package/dist/components/Accordion/AccordionContent.js +19 -0
- package/dist/components/Accordion/AccordionContent.js.map +1 -0
- package/dist/components/Accordion/AccordionItem.cjs +2 -0
- package/dist/components/Accordion/AccordionItem.cjs.map +1 -0
- package/dist/components/Accordion/AccordionItem.d.ts.map +1 -1
- package/dist/components/Accordion/AccordionItem.js +35 -0
- package/dist/components/Accordion/AccordionItem.js.map +1 -0
- package/dist/components/Accordion/AccordionTrigger.cjs +2 -0
- package/dist/components/Accordion/AccordionTrigger.cjs.map +1 -0
- package/dist/components/Accordion/AccordionTrigger.d.ts.map +1 -1
- package/dist/components/Accordion/AccordionTrigger.js +39 -0
- package/dist/components/Accordion/AccordionTrigger.js.map +1 -0
- package/dist/components/Alert/Alert.cjs +2 -0
- package/dist/components/Alert/Alert.cjs.map +1 -0
- package/dist/components/Alert/Alert.js +35 -0
- package/dist/components/Alert/Alert.js.map +1 -0
- package/dist/components/Alert/Alert.variants.cjs +2 -0
- package/dist/components/Alert/Alert.variants.cjs.map +1 -0
- package/dist/components/Alert/Alert.variants.js +42 -0
- package/dist/components/Alert/Alert.variants.js.map +1 -0
- package/dist/components/AppShell/AppShell.cjs +2 -0
- package/dist/components/AppShell/AppShell.cjs.map +1 -0
- package/dist/components/AppShell/AppShell.js +14 -0
- package/dist/components/AppShell/AppShell.js.map +1 -0
- package/dist/components/AppShell/AppShellBody.cjs +2 -0
- package/dist/components/AppShell/AppShellBody.cjs.map +1 -0
- package/dist/components/AppShell/AppShellBody.js +14 -0
- package/dist/components/AppShell/AppShellBody.js.map +1 -0
- package/dist/components/AppShell/AppShellHeader.cjs +2 -0
- package/dist/components/AppShell/AppShellHeader.cjs.map +1 -0
- package/dist/components/AppShell/AppShellHeader.js +14 -0
- package/dist/components/AppShell/AppShellHeader.js.map +1 -0
- package/dist/components/AppShell/AppShellMain.cjs +2 -0
- package/dist/components/AppShell/AppShellMain.cjs.map +1 -0
- package/dist/components/AppShell/AppShellMain.js +14 -0
- package/dist/components/AppShell/AppShellMain.js.map +1 -0
- package/dist/components/AspectRatio/AspectRatio.cjs +2 -0
- package/dist/components/AspectRatio/AspectRatio.cjs.map +1 -0
- package/dist/components/AspectRatio/AspectRatio.d.ts +2 -2
- package/dist/components/AspectRatio/AspectRatio.d.ts.map +1 -1
- package/dist/components/AspectRatio/AspectRatio.js +17 -0
- package/dist/components/AspectRatio/AspectRatio.js.map +1 -0
- package/dist/components/AspectRatio/AspectRatio.utils.d.ts +1 -2
- package/dist/components/AspectRatio/AspectRatio.utils.d.ts.map +1 -1
- package/dist/components/Avatar/Avatar.cjs +2 -0
- package/dist/components/Avatar/Avatar.cjs.map +1 -0
- package/dist/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/Avatar/Avatar.js +64 -0
- package/dist/components/Avatar/Avatar.js.map +1 -0
- package/dist/components/Avatar/Avatar.variants.cjs +2 -0
- package/dist/components/Avatar/Avatar.variants.cjs.map +1 -0
- package/dist/components/Avatar/Avatar.variants.js +32 -0
- package/dist/components/Avatar/Avatar.variants.js.map +1 -0
- package/dist/components/Badge/Badge.cjs +2 -0
- package/dist/components/Badge/Badge.cjs.map +1 -0
- package/dist/components/Badge/Badge.js +20 -0
- package/dist/components/Badge/Badge.js.map +1 -0
- package/dist/components/Badge/Badge.variants.cjs +2 -0
- package/dist/components/Badge/Badge.variants.cjs.map +1 -0
- package/dist/components/Badge/Badge.variants.js +97 -0
- package/dist/components/Badge/Badge.variants.js.map +1 -0
- package/dist/components/Banner/Banner.cjs +2 -0
- package/dist/components/Banner/Banner.cjs.map +1 -0
- package/dist/components/Banner/Banner.js +32 -0
- package/dist/components/Banner/Banner.js.map +1 -0
- package/dist/components/Banner/Banner.variants.cjs +2 -0
- package/dist/components/Banner/Banner.variants.cjs.map +1 -0
- package/dist/components/Banner/Banner.variants.js +20 -0
- package/dist/components/Banner/Banner.variants.js.map +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.cjs +2 -0
- package/dist/components/Breadcrumb/Breadcrumb.cjs.map +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +13 -0
- package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -0
- package/dist/components/Breadcrumb/BreadcrumbEllipsis.cjs +2 -0
- package/dist/components/Breadcrumb/BreadcrumbEllipsis.cjs.map +1 -0
- package/dist/components/Breadcrumb/BreadcrumbEllipsis.js +22 -0
- package/dist/components/Breadcrumb/BreadcrumbEllipsis.js.map +1 -0
- package/dist/components/Breadcrumb/BreadcrumbItem.cjs +2 -0
- package/dist/components/Breadcrumb/BreadcrumbItem.cjs.map +1 -0
- package/dist/components/Breadcrumb/BreadcrumbItem.js +14 -0
- package/dist/components/Breadcrumb/BreadcrumbItem.js.map +1 -0
- package/dist/components/Breadcrumb/BreadcrumbLink.cjs +2 -0
- package/dist/components/Breadcrumb/BreadcrumbLink.cjs.map +1 -0
- package/dist/components/Breadcrumb/BreadcrumbLink.js +15 -0
- package/dist/components/Breadcrumb/BreadcrumbLink.js.map +1 -0
- package/dist/components/Breadcrumb/BreadcrumbList.cjs +2 -0
- package/dist/components/Breadcrumb/BreadcrumbList.cjs.map +1 -0
- package/dist/components/Breadcrumb/BreadcrumbList.js +15 -0
- package/dist/components/Breadcrumb/BreadcrumbList.js.map +1 -0
- package/dist/components/Breadcrumb/BreadcrumbPage.cjs +2 -0
- package/dist/components/Breadcrumb/BreadcrumbPage.cjs.map +1 -0
- package/dist/components/Breadcrumb/BreadcrumbPage.js +15 -0
- package/dist/components/Breadcrumb/BreadcrumbPage.js.map +1 -0
- package/dist/components/Breadcrumb/BreadcrumbSeparator.cjs +2 -0
- package/dist/components/Breadcrumb/BreadcrumbSeparator.cjs.map +1 -0
- package/dist/components/Breadcrumb/BreadcrumbSeparator.js +23 -0
- package/dist/components/Breadcrumb/BreadcrumbSeparator.js.map +1 -0
- package/dist/components/Button/Button.cjs +2 -0
- package/dist/components/Button/Button.cjs.map +1 -0
- package/dist/components/Button/Button.js +20 -0
- package/dist/components/Button/Button.js.map +1 -0
- package/dist/components/Button/Button.variants.cjs +2 -0
- package/dist/components/Button/Button.variants.cjs.map +1 -0
- package/dist/components/Button/Button.variants.js +209 -0
- package/dist/components/Button/Button.variants.js.map +1 -0
- package/dist/components/Card/Card.cjs +2 -0
- package/dist/components/Card/Card.cjs.map +1 -0
- package/dist/components/Card/Card.js +67 -0
- package/dist/components/Card/Card.js.map +1 -0
- package/dist/components/Card/Card.variants.cjs +2 -0
- package/dist/components/Card/Card.variants.cjs.map +1 -0
- package/dist/components/Card/Card.variants.js +18 -0
- package/dist/components/Card/Card.variants.js.map +1 -0
- package/dist/components/Checkbox/Checkbox.cjs +2 -0
- package/dist/components/Checkbox/Checkbox.cjs.map +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.js +59 -0
- package/dist/components/Checkbox/Checkbox.js.map +1 -0
- package/dist/components/Checkbox/Checkbox.variants.cjs +2 -0
- package/dist/components/Checkbox/Checkbox.variants.cjs.map +1 -0
- package/dist/components/Checkbox/Checkbox.variants.js +49 -0
- package/dist/components/Checkbox/Checkbox.variants.js.map +1 -0
- package/dist/components/Chip/Chip.cjs +2 -0
- package/dist/components/Chip/Chip.cjs.map +1 -0
- package/dist/components/Chip/Chip.d.ts +8 -0
- package/dist/components/Chip/Chip.d.ts.map +1 -0
- package/dist/components/Chip/Chip.js +22 -0
- package/dist/components/Chip/Chip.js.map +1 -0
- package/dist/components/Chip/Chip.variants.cjs +2 -0
- package/dist/components/Chip/Chip.variants.cjs.map +1 -0
- package/dist/components/Chip/Chip.variants.d.ts +9 -0
- package/dist/components/Chip/Chip.variants.d.ts.map +1 -0
- package/dist/components/Chip/Chip.variants.js +296 -0
- package/dist/components/Chip/Chip.variants.js.map +1 -0
- package/dist/components/Chip/index.d.ts +4 -0
- package/dist/components/Chip/index.d.ts.map +1 -0
- package/dist/components/Code/Code.cjs +2 -0
- package/dist/components/Code/Code.cjs.map +1 -0
- package/dist/components/Code/Code.d.ts.map +1 -1
- package/dist/components/Code/Code.js +20 -0
- package/dist/components/Code/Code.js.map +1 -0
- package/dist/components/Code/Code.variants.cjs +2 -0
- package/dist/components/Code/Code.variants.cjs.map +1 -0
- package/dist/components/Code/Code.variants.d.ts +1 -0
- package/dist/components/Code/Code.variants.d.ts.map +1 -1
- package/dist/components/Code/Code.variants.js +106 -0
- package/dist/components/Code/Code.variants.js.map +1 -0
- package/dist/components/Collapsible/Collapsible.cjs +2 -0
- package/dist/components/Collapsible/Collapsible.cjs.map +1 -0
- package/dist/components/Collapsible/Collapsible.context.cjs +2 -0
- package/dist/components/Collapsible/Collapsible.context.cjs.map +1 -0
- package/dist/components/Collapsible/Collapsible.context.d.ts.map +1 -1
- package/dist/components/Collapsible/Collapsible.context.js +13 -0
- package/dist/components/Collapsible/Collapsible.context.js.map +1 -0
- package/dist/components/Collapsible/Collapsible.d.ts.map +1 -1
- package/dist/components/Collapsible/Collapsible.js +35 -0
- package/dist/components/Collapsible/Collapsible.js.map +1 -0
- package/dist/components/Collapsible/CollapsibleContent.cjs +2 -0
- package/dist/components/Collapsible/CollapsibleContent.cjs.map +1 -0
- package/dist/components/Collapsible/CollapsibleContent.d.ts.map +1 -1
- package/dist/components/Collapsible/CollapsibleContent.js +28 -0
- package/dist/components/Collapsible/CollapsibleContent.js.map +1 -0
- package/dist/components/Collapsible/CollapsibleTrigger.cjs +2 -0
- package/dist/components/Collapsible/CollapsibleTrigger.cjs.map +1 -0
- package/dist/components/Collapsible/CollapsibleTrigger.d.ts.map +1 -1
- package/dist/components/Collapsible/CollapsibleTrigger.js +29 -0
- package/dist/components/Collapsible/CollapsibleTrigger.js.map +1 -0
- package/dist/components/Combobox/Combobox.cjs +2 -0
- package/dist/components/Combobox/Combobox.cjs.map +1 -0
- package/dist/components/Combobox/Combobox.context.cjs +2 -0
- package/dist/components/Combobox/Combobox.context.cjs.map +1 -0
- package/dist/components/Combobox/Combobox.context.d.ts.map +1 -1
- package/dist/components/Combobox/Combobox.context.js +13 -0
- package/dist/components/Combobox/Combobox.context.js.map +1 -0
- package/dist/components/Combobox/Combobox.d.ts.map +1 -1
- package/dist/components/Combobox/Combobox.js +114 -0
- package/dist/components/Combobox/Combobox.js.map +1 -0
- package/dist/components/Combobox/Combobox.utils.cjs +2 -0
- package/dist/components/Combobox/Combobox.utils.cjs.map +1 -0
- package/dist/components/Combobox/Combobox.utils.js +11 -0
- package/dist/components/Combobox/Combobox.utils.js.map +1 -0
- package/dist/components/Combobox/Combobox.variants.cjs +2 -0
- package/dist/components/Combobox/Combobox.variants.cjs.map +1 -0
- package/dist/components/Combobox/Combobox.variants.js +36 -0
- package/dist/components/Combobox/Combobox.variants.js.map +1 -0
- package/dist/components/Combobox/ComboboxContent.cjs +2 -0
- package/dist/components/Combobox/ComboboxContent.cjs.map +1 -0
- package/dist/components/Combobox/ComboboxContent.d.ts.map +1 -1
- package/dist/components/Combobox/ComboboxContent.js +28 -0
- package/dist/components/Combobox/ComboboxContent.js.map +1 -0
- package/dist/components/Combobox/ComboboxEmpty.cjs +2 -0
- package/dist/components/Combobox/ComboboxEmpty.cjs.map +1 -0
- package/dist/components/Combobox/ComboboxEmpty.d.ts.map +1 -1
- package/dist/components/Combobox/ComboboxEmpty.js +23 -0
- package/dist/components/Combobox/ComboboxEmpty.js.map +1 -0
- package/dist/components/Combobox/ComboboxGroup.cjs +2 -0
- package/dist/components/Combobox/ComboboxGroup.cjs.map +1 -0
- package/dist/components/Combobox/ComboboxGroup.d.ts.map +1 -1
- package/dist/components/Combobox/ComboboxGroup.js +37 -0
- package/dist/components/Combobox/ComboboxGroup.js.map +1 -0
- package/dist/components/Combobox/ComboboxInput.cjs +2 -0
- package/dist/components/Combobox/ComboboxInput.cjs.map +1 -0
- package/dist/components/Combobox/ComboboxInput.d.ts.map +1 -1
- package/dist/components/Combobox/ComboboxInput.js +107 -0
- package/dist/components/Combobox/ComboboxInput.js.map +1 -0
- package/dist/components/Combobox/ComboboxListbox.cjs +2 -0
- package/dist/components/Combobox/ComboboxListbox.cjs.map +1 -0
- package/dist/components/Combobox/ComboboxListbox.d.ts.map +1 -1
- package/dist/components/Combobox/ComboboxListbox.js +34 -0
- package/dist/components/Combobox/ComboboxListbox.js.map +1 -0
- package/dist/components/Combobox/ComboboxOption.cjs +2 -0
- package/dist/components/Combobox/ComboboxOption.cjs.map +1 -0
- package/dist/components/Combobox/ComboboxOption.d.ts.map +1 -1
- package/dist/components/Combobox/ComboboxOption.js +40 -0
- package/dist/components/Combobox/ComboboxOption.js.map +1 -0
- package/dist/components/Combobox/ComboboxTrigger.cjs +2 -0
- package/dist/components/Combobox/ComboboxTrigger.cjs.map +1 -0
- package/dist/components/Combobox/ComboboxTrigger.d.ts.map +1 -1
- package/dist/components/Combobox/ComboboxTrigger.js +84 -0
- package/dist/components/Combobox/ComboboxTrigger.js.map +1 -0
- package/dist/components/CommandMenu/CommandMenu.cjs +2 -0
- package/dist/components/CommandMenu/CommandMenu.cjs.map +1 -0
- package/dist/components/CommandMenu/CommandMenu.context.cjs +2 -0
- package/dist/components/CommandMenu/CommandMenu.context.cjs.map +1 -0
- package/dist/components/CommandMenu/CommandMenu.context.d.ts.map +1 -1
- package/dist/components/CommandMenu/CommandMenu.context.js +13 -0
- package/dist/components/CommandMenu/CommandMenu.context.js.map +1 -0
- package/dist/components/CommandMenu/CommandMenu.d.ts.map +1 -1
- package/dist/components/CommandMenu/CommandMenu.js +230 -0
- package/dist/components/CommandMenu/CommandMenu.js.map +1 -0
- package/dist/components/Container/Container.cjs +2 -0
- package/dist/components/Container/Container.cjs.map +1 -0
- package/dist/components/Container/Container.js +22 -0
- package/dist/components/Container/Container.js.map +1 -0
- package/dist/components/ContextMenu/ContextMenu.cjs +2 -0
- package/dist/components/ContextMenu/ContextMenu.cjs.map +1 -0
- package/dist/components/ContextMenu/ContextMenu.context.cjs +2 -0
- package/dist/components/ContextMenu/ContextMenu.context.cjs.map +1 -0
- package/dist/components/ContextMenu/ContextMenu.context.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.context.js +13 -0
- package/dist/components/ContextMenu/ContextMenu.context.js.map +1 -0
- package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.js +45 -0
- package/dist/components/ContextMenu/ContextMenu.js.map +1 -0
- package/dist/components/ContextMenu/ContextMenuCheckboxItem.cjs +2 -0
- package/dist/components/ContextMenu/ContextMenuCheckboxItem.cjs.map +1 -0
- package/dist/components/ContextMenu/ContextMenuCheckboxItem.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenuCheckboxItem.js +14 -0
- package/dist/components/ContextMenu/ContextMenuCheckboxItem.js.map +1 -0
- package/dist/components/ContextMenu/ContextMenuContent.cjs +2 -0
- package/dist/components/ContextMenu/ContextMenuContent.cjs.map +1 -0
- package/dist/components/ContextMenu/ContextMenuContent.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenuContent.js +42 -0
- package/dist/components/ContextMenu/ContextMenuContent.js.map +1 -0
- package/dist/components/ContextMenu/ContextMenuItem.cjs +2 -0
- package/dist/components/ContextMenu/ContextMenuItem.cjs.map +1 -0
- package/dist/components/ContextMenu/ContextMenuItem.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenuItem.js +14 -0
- package/dist/components/ContextMenu/ContextMenuItem.js.map +1 -0
- package/dist/components/ContextMenu/ContextMenuLabel.cjs +2 -0
- package/dist/components/ContextMenu/ContextMenuLabel.cjs.map +1 -0
- package/dist/components/ContextMenu/ContextMenuLabel.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenuLabel.js +14 -0
- package/dist/components/ContextMenu/ContextMenuLabel.js.map +1 -0
- package/dist/components/ContextMenu/ContextMenuRadioGroup.cjs +2 -0
- package/dist/components/ContextMenu/ContextMenuRadioGroup.cjs.map +1 -0
- package/dist/components/ContextMenu/ContextMenuRadioGroup.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenuRadioGroup.js +14 -0
- package/dist/components/ContextMenu/ContextMenuRadioGroup.js.map +1 -0
- package/dist/components/ContextMenu/ContextMenuRadioItem.cjs +2 -0
- package/dist/components/ContextMenu/ContextMenuRadioItem.cjs.map +1 -0
- package/dist/components/ContextMenu/ContextMenuRadioItem.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenuRadioItem.js +14 -0
- package/dist/components/ContextMenu/ContextMenuRadioItem.js.map +1 -0
- package/dist/components/ContextMenu/ContextMenuSeparator.cjs +2 -0
- package/dist/components/ContextMenu/ContextMenuSeparator.cjs.map +1 -0
- package/dist/components/ContextMenu/ContextMenuSeparator.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenuSeparator.js +14 -0
- package/dist/components/ContextMenu/ContextMenuSeparator.js.map +1 -0
- package/dist/components/ContextMenu/ContextMenuTrigger.cjs +2 -0
- package/dist/components/ContextMenu/ContextMenuTrigger.cjs.map +1 -0
- package/dist/components/ContextMenu/ContextMenuTrigger.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenuTrigger.js +54 -0
- package/dist/components/ContextMenu/ContextMenuTrigger.js.map +1 -0
- package/dist/components/DataTable/DataTable.cjs +2 -0
- package/dist/components/DataTable/DataTable.cjs.map +1 -0
- package/dist/components/DataTable/DataTable.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.js +118 -0
- package/dist/components/DataTable/DataTable.js.map +1 -0
- package/dist/components/DatePicker/DatePicker.cjs +2 -0
- package/dist/components/DatePicker/DatePicker.cjs.map +1 -0
- package/dist/components/DatePicker/DatePicker.context.cjs +2 -0
- package/dist/components/DatePicker/DatePicker.context.cjs.map +1 -0
- package/dist/components/DatePicker/DatePicker.context.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.context.js +13 -0
- package/dist/components/DatePicker/DatePicker.context.js.map +1 -0
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.hooks.cjs +2 -0
- package/dist/components/DatePicker/DatePicker.hooks.cjs.map +1 -0
- package/dist/components/DatePicker/DatePicker.hooks.js +141 -0
- package/dist/components/DatePicker/DatePicker.hooks.js.map +1 -0
- package/dist/components/DatePicker/DatePicker.js +89 -0
- package/dist/components/DatePicker/DatePicker.js.map +1 -0
- package/dist/components/DatePicker/DatePicker.utils.cjs +2 -0
- package/dist/components/DatePicker/DatePicker.utils.cjs.map +1 -0
- package/dist/components/DatePicker/DatePicker.utils.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.utils.js +40 -0
- package/dist/components/DatePicker/DatePicker.utils.js.map +1 -0
- package/dist/components/DatePicker/DatePickerCalendar.cjs +2 -0
- package/dist/components/DatePicker/DatePickerCalendar.cjs.map +1 -0
- package/dist/components/DatePicker/DatePickerCalendar.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePickerCalendar.js +158 -0
- package/dist/components/DatePicker/DatePickerCalendar.js.map +1 -0
- package/dist/components/DatePicker/DatePickerInput.cjs +2 -0
- package/dist/components/DatePicker/DatePickerInput.cjs.map +1 -0
- package/dist/components/DatePicker/DatePickerInput.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePickerInput.js +116 -0
- package/dist/components/DatePicker/DatePickerInput.js.map +1 -0
- package/dist/components/Dialog/Dialog.cjs +2 -0
- package/dist/components/Dialog/Dialog.cjs.map +1 -0
- package/dist/components/Dialog/Dialog.context.cjs +2 -0
- package/dist/components/Dialog/Dialog.context.cjs.map +1 -0
- package/dist/components/Dialog/Dialog.context.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.context.js +13 -0
- package/dist/components/Dialog/Dialog.context.js.map +1 -0
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.js +47 -0
- package/dist/components/Dialog/Dialog.js.map +1 -0
- package/dist/components/Divider/Divider.cjs +2 -0
- package/dist/components/Divider/Divider.cjs.map +1 -0
- package/dist/components/Divider/Divider.d.ts +3 -2
- package/dist/components/Divider/Divider.d.ts.map +1 -1
- package/dist/components/Divider/Divider.js +60 -0
- package/dist/components/Divider/Divider.js.map +1 -0
- package/dist/components/Divider/Divider.variants.d.ts +5 -6
- package/dist/components/Divider/Divider.variants.d.ts.map +1 -1
- package/dist/components/Divider/index.d.ts +1 -3
- package/dist/components/Divider/index.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.cjs +2 -0
- package/dist/components/DropdownMenu/DropdownMenu.cjs.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenu.context.cjs +2 -0
- package/dist/components/DropdownMenu/DropdownMenu.context.cjs.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenu.context.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.context.js +13 -0
- package/dist/components/DropdownMenu/DropdownMenu.context.js.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.js +49 -0
- package/dist/components/DropdownMenu/DropdownMenu.js.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenuCheckboxItem.cjs +2 -0
- package/dist/components/DropdownMenu/DropdownMenuCheckboxItem.cjs.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenuCheckboxItem.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenuCheckboxItem.js +14 -0
- package/dist/components/DropdownMenu/DropdownMenuCheckboxItem.js.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenuContent.cjs +2 -0
- package/dist/components/DropdownMenu/DropdownMenuContent.cjs.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenuContent.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenuContent.js +42 -0
- package/dist/components/DropdownMenu/DropdownMenuContent.js.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenuItem.cjs +2 -0
- package/dist/components/DropdownMenu/DropdownMenuItem.cjs.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenuItem.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenuItem.js +14 -0
- package/dist/components/DropdownMenu/DropdownMenuItem.js.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenuLabel.cjs +2 -0
- package/dist/components/DropdownMenu/DropdownMenuLabel.cjs.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenuLabel.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenuLabel.js +14 -0
- package/dist/components/DropdownMenu/DropdownMenuLabel.js.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenuRadioGroup.cjs +2 -0
- package/dist/components/DropdownMenu/DropdownMenuRadioGroup.cjs.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenuRadioGroup.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenuRadioGroup.js +14 -0
- package/dist/components/DropdownMenu/DropdownMenuRadioGroup.js.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenuRadioItem.cjs +2 -0
- package/dist/components/DropdownMenu/DropdownMenuRadioItem.cjs.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenuRadioItem.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenuRadioItem.js +14 -0
- package/dist/components/DropdownMenu/DropdownMenuRadioItem.js.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenuSeparator.cjs +2 -0
- package/dist/components/DropdownMenu/DropdownMenuSeparator.cjs.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenuSeparator.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenuSeparator.js +14 -0
- package/dist/components/DropdownMenu/DropdownMenuSeparator.js.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenuTrigger.cjs +2 -0
- package/dist/components/DropdownMenu/DropdownMenuTrigger.cjs.map +1 -0
- package/dist/components/DropdownMenu/DropdownMenuTrigger.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenuTrigger.js +22 -0
- package/dist/components/DropdownMenu/DropdownMenuTrigger.js.map +1 -0
- package/dist/components/EmptyState/EmptyState.cjs +2 -0
- package/dist/components/EmptyState/EmptyState.cjs.map +1 -0
- package/dist/components/EmptyState/EmptyState.js +40 -0
- package/dist/components/EmptyState/EmptyState.js.map +1 -0
- package/dist/components/Eyebrow/Eyebrow.cjs +2 -0
- package/dist/components/Eyebrow/Eyebrow.cjs.map +1 -0
- package/dist/components/Eyebrow/Eyebrow.d.ts +9 -0
- package/dist/components/Eyebrow/Eyebrow.d.ts.map +1 -0
- package/dist/components/Eyebrow/Eyebrow.js +15 -0
- package/dist/components/Eyebrow/Eyebrow.js.map +1 -0
- package/dist/components/Eyebrow/Eyebrow.variants.cjs +2 -0
- package/dist/components/Eyebrow/Eyebrow.variants.cjs.map +1 -0
- package/dist/components/Eyebrow/Eyebrow.variants.d.ts +6 -0
- package/dist/components/Eyebrow/Eyebrow.variants.d.ts.map +1 -0
- package/dist/components/Eyebrow/Eyebrow.variants.js +20 -0
- package/dist/components/Eyebrow/Eyebrow.variants.js.map +1 -0
- package/dist/components/Eyebrow/index.d.ts +4 -0
- package/dist/components/Eyebrow/index.d.ts.map +1 -0
- package/dist/components/FileInput/FileInput.cjs +2 -0
- package/dist/components/FileInput/FileInput.cjs.map +1 -0
- package/dist/components/FileInput/FileInput.d.ts +11 -0
- package/dist/components/FileInput/FileInput.d.ts.map +1 -0
- package/dist/components/FileInput/FileInput.js +109 -0
- package/dist/components/FileInput/FileInput.js.map +1 -0
- package/dist/components/FileInput/FileInput.variants.cjs +2 -0
- package/dist/components/FileInput/FileInput.variants.cjs.map +1 -0
- package/dist/components/FileInput/FileInput.variants.d.ts +7 -0
- package/dist/components/FileInput/FileInput.variants.d.ts.map +1 -0
- package/dist/components/FileInput/FileInput.variants.js +105 -0
- package/dist/components/FileInput/FileInput.variants.js.map +1 -0
- package/dist/components/FileInput/index.d.ts +4 -0
- package/dist/components/FileInput/index.d.ts.map +1 -0
- package/dist/components/FormField/FormField.cjs +2 -0
- package/dist/components/FormField/FormField.cjs.map +1 -0
- package/dist/components/FormField/FormField.context.cjs +2 -0
- package/dist/components/FormField/FormField.context.cjs.map +1 -0
- package/dist/components/FormField/FormField.context.d.ts.map +1 -1
- package/dist/components/FormField/FormField.context.js +18 -0
- package/dist/components/FormField/FormField.context.js.map +1 -0
- package/dist/components/FormField/FormField.d.ts.map +1 -1
- package/dist/components/FormField/FormField.js +53 -0
- package/dist/components/FormField/FormField.js.map +1 -0
- package/dist/components/Grid/Grid.cjs +2 -0
- package/dist/components/Grid/Grid.cjs.map +1 -0
- package/dist/components/Grid/Grid.js +16 -0
- package/dist/components/Grid/Grid.js.map +1 -0
- package/dist/components/Heading/Heading.cjs +2 -0
- package/dist/components/Heading/Heading.cjs.map +1 -0
- package/dist/components/Heading/Heading.d.ts +2 -0
- package/dist/components/Heading/Heading.d.ts.map +1 -1
- package/dist/components/Heading/Heading.js +21 -0
- package/dist/components/Heading/Heading.js.map +1 -0
- package/dist/components/Heading/Heading.variants.cjs +2 -0
- package/dist/components/Heading/Heading.variants.cjs.map +1 -0
- package/dist/components/Heading/Heading.variants.d.ts +1 -1
- package/dist/components/Heading/Heading.variants.d.ts.map +1 -1
- package/dist/components/Heading/Heading.variants.js +43 -0
- package/dist/components/Heading/Heading.variants.js.map +1 -0
- package/dist/components/Icon/Icon.cjs +2 -0
- package/dist/components/Icon/Icon.cjs.map +1 -0
- package/dist/components/Icon/Icon.js +28 -0
- package/dist/components/Icon/Icon.js.map +1 -0
- package/dist/components/Icon/Icon.variants.cjs +2 -0
- package/dist/components/Icon/Icon.variants.cjs.map +1 -0
- package/dist/components/Icon/Icon.variants.js +30 -0
- package/dist/components/Icon/Icon.variants.js.map +1 -0
- package/dist/components/Input/Input.cjs +2 -0
- package/dist/components/Input/Input.cjs.map +1 -0
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Input/Input.js +32 -0
- package/dist/components/Input/Input.js.map +1 -0
- package/dist/components/Input/Input.variants.cjs +2 -0
- package/dist/components/Input/Input.variants.cjs.map +1 -0
- package/dist/components/Input/Input.variants.js +26 -0
- package/dist/components/Input/Input.variants.js.map +1 -0
- package/dist/components/Kbd/Kbd.cjs +2 -0
- package/dist/components/Kbd/Kbd.cjs.map +1 -0
- package/dist/components/Kbd/Kbd.js +18 -0
- package/dist/components/Kbd/Kbd.js.map +1 -0
- package/dist/components/Kbd/Kbd.variants.cjs +2 -0
- package/dist/components/Kbd/Kbd.variants.cjs.map +1 -0
- package/dist/components/Kbd/Kbd.variants.d.ts +1 -0
- package/dist/components/Kbd/Kbd.variants.d.ts.map +1 -1
- package/dist/components/Kbd/Kbd.variants.js +32 -0
- package/dist/components/Kbd/Kbd.variants.js.map +1 -0
- package/dist/components/Label/Label.cjs +2 -0
- package/dist/components/Label/Label.cjs.map +1 -0
- package/dist/components/Label/Label.d.ts.map +1 -1
- package/dist/components/Label/Label.js +26 -0
- package/dist/components/Label/Label.js.map +1 -0
- package/dist/components/Menu/MenuCheckboxItemBase.cjs +2 -0
- package/dist/components/Menu/MenuCheckboxItemBase.cjs.map +1 -0
- package/dist/components/Menu/MenuCheckboxItemBase.js +46 -0
- package/dist/components/Menu/MenuCheckboxItemBase.js.map +1 -0
- package/dist/components/Menu/MenuContentBase.cjs +2 -0
- package/dist/components/Menu/MenuContentBase.cjs.map +1 -0
- package/dist/components/Menu/MenuContentBase.js +84 -0
- package/dist/components/Menu/MenuContentBase.js.map +1 -0
- package/dist/components/Menu/MenuItemBase.cjs +2 -0
- package/dist/components/Menu/MenuItemBase.cjs.map +1 -0
- package/dist/components/Menu/MenuItemBase.js +29 -0
- package/dist/components/Menu/MenuItemBase.js.map +1 -0
- package/dist/components/Menu/MenuLabelBase.cjs +2 -0
- package/dist/components/Menu/MenuLabelBase.cjs.map +1 -0
- package/dist/components/Menu/MenuLabelBase.js +16 -0
- package/dist/components/Menu/MenuLabelBase.js.map +1 -0
- package/dist/components/Menu/MenuRadioGroupBase.cjs +2 -0
- package/dist/components/Menu/MenuRadioGroupBase.cjs.map +1 -0
- package/dist/components/Menu/MenuRadioGroupBase.js +26 -0
- package/dist/components/Menu/MenuRadioGroupBase.js.map +1 -0
- package/dist/components/Menu/MenuRadioItemBase.cjs +2 -0
- package/dist/components/Menu/MenuRadioItemBase.cjs.map +1 -0
- package/dist/components/Menu/MenuRadioItemBase.js +47 -0
- package/dist/components/Menu/MenuRadioItemBase.js.map +1 -0
- package/dist/components/Menu/MenuSeparatorBase.cjs +2 -0
- package/dist/components/Menu/MenuSeparatorBase.cjs.map +1 -0
- package/dist/components/Menu/MenuSeparatorBase.js +16 -0
- package/dist/components/Menu/MenuSeparatorBase.js.map +1 -0
- package/dist/components/Menu/menuItemVariants.cjs +2 -0
- package/dist/components/Menu/menuItemVariants.cjs.map +1 -0
- package/dist/components/Menu/menuItemVariants.js +53 -0
- package/dist/components/Menu/menuItemVariants.js.map +1 -0
- package/dist/components/Menubar/Menubar.cjs +2 -0
- package/dist/components/Menubar/Menubar.cjs.map +1 -0
- package/dist/components/Menubar/Menubar.context.cjs +2 -0
- package/dist/components/Menubar/Menubar.context.cjs.map +1 -0
- package/dist/components/Menubar/Menubar.context.d.ts.map +1 -1
- package/dist/components/Menubar/Menubar.context.js +19 -0
- package/dist/components/Menubar/Menubar.context.js.map +1 -0
- package/dist/components/Menubar/Menubar.d.ts.map +1 -1
- package/dist/components/Menubar/Menubar.js +46 -0
- package/dist/components/Menubar/Menubar.js.map +1 -0
- package/dist/components/Menubar/MenubarCheckboxItem.cjs +2 -0
- package/dist/components/Menubar/MenubarCheckboxItem.cjs.map +1 -0
- package/dist/components/Menubar/MenubarCheckboxItem.d.ts.map +1 -1
- package/dist/components/Menubar/MenubarCheckboxItem.js +14 -0
- package/dist/components/Menubar/MenubarCheckboxItem.js.map +1 -0
- package/dist/components/Menubar/MenubarContent.cjs +2 -0
- package/dist/components/Menubar/MenubarContent.cjs.map +1 -0
- package/dist/components/Menubar/MenubarContent.d.ts.map +1 -1
- package/dist/components/Menubar/MenubarContent.js +55 -0
- package/dist/components/Menubar/MenubarContent.js.map +1 -0
- package/dist/components/Menubar/MenubarItem.cjs +2 -0
- package/dist/components/Menubar/MenubarItem.cjs.map +1 -0
- package/dist/components/Menubar/MenubarItem.d.ts.map +1 -1
- package/dist/components/Menubar/MenubarItem.js +14 -0
- package/dist/components/Menubar/MenubarItem.js.map +1 -0
- package/dist/components/Menubar/MenubarMenu.cjs +2 -0
- package/dist/components/Menubar/MenubarMenu.cjs.map +1 -0
- package/dist/components/Menubar/MenubarMenu.d.ts.map +1 -1
- package/dist/components/Menubar/MenubarMenu.js +56 -0
- package/dist/components/Menubar/MenubarMenu.js.map +1 -0
- package/dist/components/Menubar/MenubarRadioGroup.cjs +2 -0
- package/dist/components/Menubar/MenubarRadioGroup.cjs.map +1 -0
- package/dist/components/Menubar/MenubarRadioGroup.d.ts.map +1 -1
- package/dist/components/Menubar/MenubarRadioGroup.js +14 -0
- package/dist/components/Menubar/MenubarRadioGroup.js.map +1 -0
- package/dist/components/Menubar/MenubarRadioItem.cjs +2 -0
- package/dist/components/Menubar/MenubarRadioItem.cjs.map +1 -0
- package/dist/components/Menubar/MenubarRadioItem.d.ts.map +1 -1
- package/dist/components/Menubar/MenubarRadioItem.js +14 -0
- package/dist/components/Menubar/MenubarRadioItem.js.map +1 -0
- package/dist/components/Menubar/MenubarSeparator.cjs +2 -0
- package/dist/components/Menubar/MenubarSeparator.cjs.map +1 -0
- package/dist/components/Menubar/MenubarSeparator.d.ts.map +1 -1
- package/dist/components/Menubar/MenubarSeparator.js +14 -0
- package/dist/components/Menubar/MenubarSeparator.js.map +1 -0
- package/dist/components/Menubar/MenubarTrigger.cjs +2 -0
- package/dist/components/Menubar/MenubarTrigger.cjs.map +1 -0
- package/dist/components/Menubar/MenubarTrigger.d.ts.map +1 -1
- package/dist/components/Menubar/MenubarTrigger.js +44 -0
- package/dist/components/Menubar/MenubarTrigger.js.map +1 -0
- package/dist/components/Nav/Nav.cjs +2 -0
- package/dist/components/Nav/Nav.cjs.map +1 -0
- package/dist/components/Nav/Nav.d.ts +7 -0
- package/dist/components/Nav/Nav.d.ts.map +1 -0
- package/dist/components/Nav/Nav.js +13 -0
- package/dist/components/Nav/Nav.js.map +1 -0
- package/dist/components/Nav/NavItem.cjs +2 -0
- package/dist/components/Nav/NavItem.cjs.map +1 -0
- package/dist/components/Nav/NavItem.d.ts +7 -0
- package/dist/components/Nav/NavItem.d.ts.map +1 -0
- package/dist/components/Nav/NavItem.js +14 -0
- package/dist/components/Nav/NavItem.js.map +1 -0
- package/dist/components/Nav/NavLink.cjs +2 -0
- package/dist/components/Nav/NavLink.cjs.map +1 -0
- package/dist/components/Nav/NavLink.d.ts +8 -0
- package/dist/components/Nav/NavLink.d.ts.map +1 -0
- package/dist/components/Nav/NavLink.js +16 -0
- package/dist/components/Nav/NavLink.js.map +1 -0
- package/dist/components/Nav/NavList.cjs +2 -0
- package/dist/components/Nav/NavList.cjs.map +1 -0
- package/dist/components/Nav/NavList.d.ts +6 -0
- package/dist/components/Nav/NavList.d.ts.map +1 -0
- package/dist/components/Nav/NavList.js +14 -0
- package/dist/components/Nav/NavList.js.map +1 -0
- package/dist/components/Nav/NavSubmenu.cjs +2 -0
- package/dist/components/Nav/NavSubmenu.cjs.map +1 -0
- package/dist/components/Nav/NavSubmenu.d.ts +7 -0
- package/dist/components/Nav/NavSubmenu.d.ts.map +1 -0
- package/dist/components/Nav/NavSubmenu.js +14 -0
- package/dist/components/Nav/NavSubmenu.js.map +1 -0
- package/dist/components/Nav/NavTrigger.cjs +2 -0
- package/dist/components/Nav/NavTrigger.cjs.map +1 -0
- package/dist/components/Nav/NavTrigger.d.ts +7 -0
- package/dist/components/Nav/NavTrigger.d.ts.map +1 -0
- package/dist/components/Nav/NavTrigger.js +47 -0
- package/dist/components/Nav/NavTrigger.js.map +1 -0
- package/dist/components/Nav/index.d.ts +13 -0
- package/dist/components/Nav/index.d.ts.map +1 -0
- package/dist/components/NavigationMenu/NavigationMenu.cjs +2 -0
- package/dist/components/NavigationMenu/NavigationMenu.cjs.map +1 -0
- package/dist/components/NavigationMenu/NavigationMenu.context.cjs +2 -0
- package/dist/components/NavigationMenu/NavigationMenu.context.cjs.map +1 -0
- package/dist/components/NavigationMenu/NavigationMenu.context.d.ts.map +1 -1
- package/dist/components/NavigationMenu/NavigationMenu.context.js +23 -0
- package/dist/components/NavigationMenu/NavigationMenu.context.js.map +1 -0
- package/dist/components/NavigationMenu/NavigationMenu.d.ts +1 -0
- package/dist/components/NavigationMenu/NavigationMenu.d.ts.map +1 -1
- package/dist/components/NavigationMenu/NavigationMenu.js +220 -0
- package/dist/components/NavigationMenu/NavigationMenu.js.map +1 -0
- package/dist/components/NumberInput/NumberInput.cjs +2 -0
- package/dist/components/NumberInput/NumberInput.cjs.map +1 -0
- package/dist/components/NumberInput/NumberInput.d.ts +16 -0
- package/dist/components/NumberInput/NumberInput.d.ts.map +1 -0
- package/dist/components/NumberInput/NumberInput.js +117 -0
- package/dist/components/NumberInput/NumberInput.js.map +1 -0
- package/dist/components/NumberInput/index.d.ts +3 -0
- package/dist/components/NumberInput/index.d.ts.map +1 -0
- package/dist/components/Pagination/Pagination.cjs +2 -0
- package/dist/components/Pagination/Pagination.cjs.map +1 -0
- package/dist/components/Pagination/Pagination.js +15 -0
- package/dist/components/Pagination/Pagination.js.map +1 -0
- package/dist/components/Pagination/PaginationContent.cjs +2 -0
- package/dist/components/Pagination/PaginationContent.cjs.map +1 -0
- package/dist/components/Pagination/PaginationContent.js +14 -0
- package/dist/components/Pagination/PaginationContent.js.map +1 -0
- package/dist/components/Pagination/PaginationEllipsis.cjs +2 -0
- package/dist/components/Pagination/PaginationEllipsis.cjs.map +1 -0
- package/dist/components/Pagination/PaginationEllipsis.js +19 -0
- package/dist/components/Pagination/PaginationEllipsis.js.map +1 -0
- package/dist/components/Pagination/PaginationItem.cjs +2 -0
- package/dist/components/Pagination/PaginationItem.cjs.map +1 -0
- package/dist/components/Pagination/PaginationItem.js +12 -0
- package/dist/components/Pagination/PaginationItem.js.map +1 -0
- package/dist/components/Pagination/PaginationLink.cjs +2 -0
- package/dist/components/Pagination/PaginationLink.cjs.map +1 -0
- package/dist/components/Pagination/PaginationLink.js +21 -0
- package/dist/components/Pagination/PaginationLink.js.map +1 -0
- package/dist/components/Pagination/PaginationNext.cjs +2 -0
- package/dist/components/Pagination/PaginationNext.cjs.map +1 -0
- package/dist/components/Pagination/PaginationNext.js +61 -0
- package/dist/components/Pagination/PaginationNext.js.map +1 -0
- package/dist/components/Pagination/PaginationPrevious.cjs +2 -0
- package/dist/components/Pagination/PaginationPrevious.cjs.map +1 -0
- package/dist/components/Pagination/PaginationPrevious.js +61 -0
- package/dist/components/Pagination/PaginationPrevious.js.map +1 -0
- package/dist/components/Popover/Popover.cjs +2 -0
- package/dist/components/Popover/Popover.cjs.map +1 -0
- package/dist/components/Popover/Popover.context.cjs +2 -0
- package/dist/components/Popover/Popover.context.cjs.map +1 -0
- package/dist/components/Popover/Popover.context.d.ts.map +1 -1
- package/dist/components/Popover/Popover.context.js +13 -0
- package/dist/components/Popover/Popover.context.js.map +1 -0
- package/dist/components/Popover/Popover.d.ts.map +1 -1
- package/dist/components/Popover/Popover.js +49 -0
- package/dist/components/Popover/Popover.js.map +1 -0
- package/dist/components/Popover/PopoverContent.cjs +2 -0
- package/dist/components/Popover/PopoverContent.cjs.map +1 -0
- package/dist/components/Popover/PopoverContent.d.ts.map +1 -1
- package/dist/components/Popover/PopoverContent.js +34 -0
- package/dist/components/Popover/PopoverContent.js.map +1 -0
- package/dist/components/Popover/PopoverTrigger.cjs +2 -0
- package/dist/components/Popover/PopoverTrigger.cjs.map +1 -0
- package/dist/components/Popover/PopoverTrigger.d.ts.map +1 -1
- package/dist/components/Popover/PopoverTrigger.js +20 -0
- package/dist/components/Popover/PopoverTrigger.js.map +1 -0
- package/dist/components/Progress/Progress.cjs +2 -0
- package/dist/components/Progress/Progress.cjs.map +1 -0
- package/dist/components/Progress/Progress.d.ts.map +1 -1
- package/dist/components/Progress/Progress.js +28 -0
- package/dist/components/Progress/Progress.js.map +1 -0
- package/dist/components/Progress/Progress.variants.cjs +2 -0
- package/dist/components/Progress/Progress.variants.cjs.map +1 -0
- package/dist/components/Progress/Progress.variants.js +40 -0
- package/dist/components/Progress/Progress.variants.js.map +1 -0
- package/dist/components/RadioGroup/Radio.cjs +2 -0
- package/dist/components/RadioGroup/Radio.cjs.map +1 -0
- package/dist/components/RadioGroup/Radio.d.ts.map +1 -1
- package/dist/components/RadioGroup/Radio.js +55 -0
- package/dist/components/RadioGroup/Radio.js.map +1 -0
- package/dist/components/RadioGroup/Radio.variants.cjs +2 -0
- package/dist/components/RadioGroup/Radio.variants.cjs.map +1 -0
- package/dist/components/RadioGroup/Radio.variants.js +38 -0
- package/dist/components/RadioGroup/Radio.variants.js.map +1 -0
- package/dist/components/RadioGroup/RadioGroup.cjs +2 -0
- package/dist/components/RadioGroup/RadioGroup.cjs.map +1 -0
- package/dist/components/RadioGroup/RadioGroup.context.cjs +2 -0
- package/dist/components/RadioGroup/RadioGroup.context.cjs.map +1 -0
- package/dist/components/RadioGroup/RadioGroup.context.d.ts.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.context.js +18 -0
- package/dist/components/RadioGroup/RadioGroup.context.js.map +1 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +110 -0
- package/dist/components/RadioGroup/RadioGroup.js.map +1 -0
- package/dist/components/ScrollArea/ScrollArea.cjs +2 -0
- package/dist/components/ScrollArea/ScrollArea.cjs.map +1 -0
- package/dist/components/ScrollArea/ScrollArea.d.ts +13 -0
- package/dist/components/ScrollArea/ScrollArea.d.ts.map +1 -0
- package/dist/components/ScrollArea/ScrollArea.js +24 -0
- package/dist/components/ScrollArea/ScrollArea.js.map +1 -0
- package/dist/components/ScrollArea/index.d.ts +3 -0
- package/dist/components/ScrollArea/index.d.ts.map +1 -0
- package/dist/components/Section/Section.cjs +2 -0
- package/dist/components/Section/Section.cjs.map +1 -0
- package/dist/components/Section/Section.d.ts +10 -0
- package/dist/components/Section/Section.d.ts.map +1 -0
- package/dist/components/Section/Section.js +20 -0
- package/dist/components/Section/Section.js.map +1 -0
- package/dist/components/Section/Section.variants.cjs +2 -0
- package/dist/components/Section/Section.variants.cjs.map +1 -0
- package/dist/components/Section/Section.variants.d.ts +8 -0
- package/dist/components/Section/Section.variants.d.ts.map +1 -0
- package/dist/components/Section/Section.variants.js +31 -0
- package/dist/components/Section/Section.variants.js.map +1 -0
- package/dist/components/Section/index.d.ts +4 -0
- package/dist/components/Section/index.d.ts.map +1 -0
- package/dist/components/Select/Select.cjs +2 -0
- package/dist/components/Select/Select.cjs.map +1 -0
- package/dist/components/Select/Select.context.cjs +2 -0
- package/dist/components/Select/Select.context.cjs.map +1 -0
- package/dist/components/Select/Select.context.d.ts.map +1 -1
- package/dist/components/Select/Select.context.js +13 -0
- package/dist/components/Select/Select.context.js.map +1 -0
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/Select.js +83 -0
- package/dist/components/Select/Select.js.map +1 -0
- package/dist/components/Select/SelectContent.cjs +2 -0
- package/dist/components/Select/SelectContent.cjs.map +1 -0
- package/dist/components/Select/SelectContent.d.ts.map +1 -1
- package/dist/components/Select/SelectContent.js +22 -0
- package/dist/components/Select/SelectContent.js.map +1 -0
- package/dist/components/Select/SelectItem.cjs +2 -0
- package/dist/components/Select/SelectItem.cjs.map +1 -0
- package/dist/components/Select/SelectItem.d.ts.map +1 -1
- package/dist/components/Select/SelectItem.js +38 -0
- package/dist/components/Select/SelectItem.js.map +1 -0
- package/dist/components/Select/SelectSeparator.cjs +2 -0
- package/dist/components/Select/SelectSeparator.cjs.map +1 -0
- package/dist/components/Select/SelectSeparator.d.ts.map +1 -1
- package/dist/components/Select/SelectSeparator.js +17 -0
- package/dist/components/Select/SelectSeparator.js.map +1 -0
- package/dist/components/Select/SelectTrigger.cjs +2 -0
- package/dist/components/Select/SelectTrigger.cjs.map +1 -0
- package/dist/components/Select/SelectTrigger.d.ts.map +1 -1
- package/dist/components/Select/SelectTrigger.js +157 -0
- package/dist/components/Select/SelectTrigger.js.map +1 -0
- package/dist/components/Select/SelectTrigger.variants.cjs +2 -0
- package/dist/components/Select/SelectTrigger.variants.cjs.map +1 -0
- package/dist/components/Select/SelectTrigger.variants.js +36 -0
- package/dist/components/Select/SelectTrigger.variants.js.map +1 -0
- package/dist/components/Sheet/Sheet.cjs +2 -0
- package/dist/components/Sheet/Sheet.cjs.map +1 -0
- package/dist/components/Sheet/Sheet.context.cjs +2 -0
- package/dist/components/Sheet/Sheet.context.cjs.map +1 -0
- package/dist/components/Sheet/Sheet.context.d.ts.map +1 -1
- package/dist/components/Sheet/Sheet.context.js +13 -0
- package/dist/components/Sheet/Sheet.context.js.map +1 -0
- package/dist/components/Sheet/Sheet.d.ts.map +1 -1
- package/dist/components/Sheet/Sheet.js +53 -0
- package/dist/components/Sheet/Sheet.js.map +1 -0
- package/dist/components/Sidebar/Sidebar.cjs +2 -0
- package/dist/components/Sidebar/Sidebar.cjs.map +1 -0
- package/dist/components/Sidebar/Sidebar.context.cjs +2 -0
- package/dist/components/Sidebar/Sidebar.context.cjs.map +1 -0
- package/dist/components/Sidebar/Sidebar.context.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.context.js +13 -0
- package/dist/components/Sidebar/Sidebar.context.js.map +1 -0
- package/dist/components/Sidebar/Sidebar.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.js +45 -0
- package/dist/components/Sidebar/Sidebar.js.map +1 -0
- package/dist/components/Sidebar/SidebarContent.cjs +2 -0
- package/dist/components/Sidebar/SidebarContent.cjs.map +1 -0
- package/dist/components/Sidebar/SidebarContent.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarContent.js +15 -0
- package/dist/components/Sidebar/SidebarContent.js.map +1 -0
- package/dist/components/Sidebar/SidebarFooter.cjs +2 -0
- package/dist/components/Sidebar/SidebarFooter.cjs.map +1 -0
- package/dist/components/Sidebar/SidebarFooter.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarFooter.js +15 -0
- package/dist/components/Sidebar/SidebarFooter.js.map +1 -0
- package/dist/components/Sidebar/SidebarGroup.cjs +2 -0
- package/dist/components/Sidebar/SidebarGroup.cjs.map +1 -0
- package/dist/components/Sidebar/SidebarGroup.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarGroup.js +15 -0
- package/dist/components/Sidebar/SidebarGroup.js.map +1 -0
- package/dist/components/Sidebar/SidebarGroupLabel.cjs +2 -0
- package/dist/components/Sidebar/SidebarGroupLabel.cjs.map +1 -0
- package/dist/components/Sidebar/SidebarGroupLabel.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarGroupLabel.js +24 -0
- package/dist/components/Sidebar/SidebarGroupLabel.js.map +1 -0
- package/dist/components/Sidebar/SidebarHeader.cjs +2 -0
- package/dist/components/Sidebar/SidebarHeader.cjs.map +1 -0
- package/dist/components/Sidebar/SidebarHeader.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarHeader.js +15 -0
- package/dist/components/Sidebar/SidebarHeader.js.map +1 -0
- package/dist/components/Sidebar/SidebarInset.cjs +2 -0
- package/dist/components/Sidebar/SidebarInset.cjs.map +1 -0
- package/dist/components/Sidebar/SidebarInset.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarInset.js +19 -0
- package/dist/components/Sidebar/SidebarInset.js.map +1 -0
- package/dist/components/Sidebar/SidebarMenu.cjs +2 -0
- package/dist/components/Sidebar/SidebarMenu.cjs.map +1 -0
- package/dist/components/Sidebar/SidebarMenu.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarMenu.js +15 -0
- package/dist/components/Sidebar/SidebarMenu.js.map +1 -0
- package/dist/components/Sidebar/SidebarMenuButton.cjs +2 -0
- package/dist/components/Sidebar/SidebarMenuButton.cjs.map +1 -0
- package/dist/components/Sidebar/SidebarMenuButton.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarMenuButton.js +31 -0
- package/dist/components/Sidebar/SidebarMenuButton.js.map +1 -0
- package/dist/components/Sidebar/SidebarMenuItem.cjs +2 -0
- package/dist/components/Sidebar/SidebarMenuItem.cjs.map +1 -0
- package/dist/components/Sidebar/SidebarMenuItem.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarMenuItem.js +15 -0
- package/dist/components/Sidebar/SidebarMenuItem.js.map +1 -0
- package/dist/components/Sidebar/SidebarProvider.cjs +2 -0
- package/dist/components/Sidebar/SidebarProvider.cjs.map +1 -0
- package/dist/components/Sidebar/SidebarProvider.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarProvider.js +36 -0
- package/dist/components/Sidebar/SidebarProvider.js.map +1 -0
- package/dist/components/Sidebar/SidebarTrigger.cjs +2 -0
- package/dist/components/Sidebar/SidebarTrigger.cjs.map +1 -0
- package/dist/components/Sidebar/SidebarTrigger.d.ts.map +1 -1
- package/dist/components/Sidebar/SidebarTrigger.js +79 -0
- package/dist/components/Sidebar/SidebarTrigger.js.map +1 -0
- package/dist/components/Skeleton/Skeleton.cjs +2 -0
- package/dist/components/Skeleton/Skeleton.cjs.map +1 -0
- package/dist/components/Skeleton/Skeleton.js +16 -0
- package/dist/components/Skeleton/Skeleton.js.map +1 -0
- package/dist/components/Skeleton/Skeleton.variants.cjs +2 -0
- package/dist/components/Skeleton/Skeleton.variants.cjs.map +1 -0
- package/dist/components/Skeleton/Skeleton.variants.js +14 -0
- package/dist/components/Skeleton/Skeleton.variants.js.map +1 -0
- package/dist/components/SkipLink/SkipLink.cjs +2 -0
- package/dist/components/SkipLink/SkipLink.cjs.map +1 -0
- package/dist/components/SkipLink/SkipLink.d.ts +8 -0
- package/dist/components/SkipLink/SkipLink.d.ts.map +1 -0
- package/dist/components/SkipLink/SkipLink.js +16 -0
- package/dist/components/SkipLink/SkipLink.js.map +1 -0
- package/dist/components/SkipLink/index.d.ts +3 -0
- package/dist/components/SkipLink/index.d.ts.map +1 -0
- package/dist/components/Slider/Slider.cjs +2 -0
- package/dist/components/Slider/Slider.cjs.map +1 -0
- package/dist/components/Slider/Slider.d.ts.map +1 -1
- package/dist/components/Slider/Slider.js +75 -0
- package/dist/components/Slider/Slider.js.map +1 -0
- package/dist/components/Slider/Slider.variants.cjs +2 -0
- package/dist/components/Slider/Slider.variants.cjs.map +1 -0
- package/dist/components/Slider/Slider.variants.js +65 -0
- package/dist/components/Slider/Slider.variants.js.map +1 -0
- package/dist/components/Spinner/Spinner.cjs +2 -0
- package/dist/components/Spinner/Spinner.cjs.map +1 -0
- package/dist/components/Spinner/Spinner.js +52 -0
- package/dist/components/Spinner/Spinner.js.map +1 -0
- package/dist/components/Spinner/Spinner.variants.cjs +2 -0
- package/dist/components/Spinner/Spinner.variants.cjs.map +1 -0
- package/dist/components/Spinner/Spinner.variants.js +21 -0
- package/dist/components/Spinner/Spinner.variants.js.map +1 -0
- package/dist/components/SplitLayout/SplitLayout.cjs +2 -0
- package/dist/components/SplitLayout/SplitLayout.cjs.map +1 -0
- package/dist/components/SplitLayout/SplitLayout.d.ts +15 -0
- package/dist/components/SplitLayout/SplitLayout.d.ts.map +1 -0
- package/dist/components/SplitLayout/SplitLayout.js +56 -0
- package/dist/components/SplitLayout/SplitLayout.js.map +1 -0
- package/dist/components/SplitLayout/index.d.ts +3 -0
- package/dist/components/SplitLayout/index.d.ts.map +1 -0
- package/dist/components/Stack/Stack.cjs +2 -0
- package/dist/components/Stack/Stack.cjs.map +1 -0
- package/dist/components/Stack/Stack.js +16 -0
- package/dist/components/Stack/Stack.js.map +1 -0
- package/dist/components/Stepper/Stepper.cjs +2 -0
- package/dist/components/Stepper/Stepper.cjs.map +1 -0
- package/dist/components/Stepper/Stepper.context.cjs +2 -0
- package/dist/components/Stepper/Stepper.context.cjs.map +1 -0
- package/dist/components/Stepper/Stepper.context.d.ts.map +1 -1
- package/dist/components/Stepper/Stepper.context.js +19 -0
- package/dist/components/Stepper/Stepper.context.js.map +1 -0
- package/dist/components/Stepper/Stepper.d.ts.map +1 -1
- package/dist/components/Stepper/Stepper.js +55 -0
- package/dist/components/Stepper/Stepper.js.map +1 -0
- package/dist/components/Stepper/StepperContent.cjs +2 -0
- package/dist/components/Stepper/StepperContent.cjs.map +1 -0
- package/dist/components/Stepper/StepperContent.d.ts.map +1 -1
- package/dist/components/Stepper/StepperContent.js +19 -0
- package/dist/components/Stepper/StepperContent.js.map +1 -0
- package/dist/components/Stepper/StepperDescription.cjs +2 -0
- package/dist/components/Stepper/StepperDescription.cjs.map +1 -0
- package/dist/components/Stepper/StepperDescription.d.ts.map +1 -1
- package/dist/components/Stepper/StepperDescription.js +23 -0
- package/dist/components/Stepper/StepperDescription.js.map +1 -0
- package/dist/components/Stepper/StepperIndicator.cjs +2 -0
- package/dist/components/Stepper/StepperIndicator.cjs.map +1 -0
- package/dist/components/Stepper/StepperIndicator.d.ts.map +1 -1
- package/dist/components/Stepper/StepperIndicator.js +63 -0
- package/dist/components/Stepper/StepperIndicator.js.map +1 -0
- package/dist/components/Stepper/StepperItem.cjs +2 -0
- package/dist/components/Stepper/StepperItem.cjs.map +1 -0
- package/dist/components/Stepper/StepperItem.d.ts.map +1 -1
- package/dist/components/Stepper/StepperItem.js +38 -0
- package/dist/components/Stepper/StepperItem.js.map +1 -0
- package/dist/components/Stepper/StepperTitle.cjs +2 -0
- package/dist/components/Stepper/StepperTitle.cjs.map +1 -0
- package/dist/components/Stepper/StepperTitle.d.ts.map +1 -1
- package/dist/components/Stepper/StepperTitle.js +23 -0
- package/dist/components/Stepper/StepperTitle.js.map +1 -0
- package/dist/components/Switch/Switch.cjs +2 -0
- package/dist/components/Switch/Switch.cjs.map +1 -0
- package/dist/components/Switch/Switch.d.ts.map +1 -1
- package/dist/components/Switch/Switch.js +50 -0
- package/dist/components/Switch/Switch.js.map +1 -0
- package/dist/components/Switch/Switch.variants.cjs +2 -0
- package/dist/components/Switch/Switch.variants.cjs.map +1 -0
- package/dist/components/Switch/Switch.variants.js +35 -0
- package/dist/components/Switch/Switch.variants.js.map +1 -0
- package/dist/components/Table/Table.cjs +2 -0
- package/dist/components/Table/Table.cjs.map +1 -0
- package/dist/components/Table/Table.context.cjs +2 -0
- package/dist/components/Table/Table.context.cjs.map +1 -0
- package/dist/components/Table/Table.context.d.ts.map +1 -1
- package/dist/components/Table/Table.context.js +11 -0
- package/dist/components/Table/Table.context.js.map +1 -0
- package/dist/components/Table/Table.d.ts.map +1 -1
- package/dist/components/Table/Table.js +28 -0
- package/dist/components/Table/Table.js.map +1 -0
- package/dist/components/Table/Table.variants.cjs +2 -0
- package/dist/components/Table/Table.variants.cjs.map +1 -0
- package/dist/components/Table/Table.variants.js +13 -0
- package/dist/components/Table/Table.variants.js.map +1 -0
- package/dist/components/Table/TableBody.cjs +2 -0
- package/dist/components/Table/TableBody.cjs.map +1 -0
- package/dist/components/Table/TableBody.js +14 -0
- package/dist/components/Table/TableBody.js.map +1 -0
- package/dist/components/Table/TableCell.cjs +2 -0
- package/dist/components/Table/TableCell.cjs.map +1 -0
- package/dist/components/Table/TableCell.d.ts.map +1 -1
- package/dist/components/Table/TableCell.js +19 -0
- package/dist/components/Table/TableCell.js.map +1 -0
- package/dist/components/Table/TableFooter.cjs +2 -0
- package/dist/components/Table/TableFooter.cjs.map +1 -0
- package/dist/components/Table/TableFooter.js +14 -0
- package/dist/components/Table/TableFooter.js.map +1 -0
- package/dist/components/Table/TableHead.cjs +2 -0
- package/dist/components/Table/TableHead.cjs.map +1 -0
- package/dist/components/Table/TableHead.d.ts.map +1 -1
- package/dist/components/Table/TableHead.js +54 -0
- package/dist/components/Table/TableHead.js.map +1 -0
- package/dist/components/Table/TableHeader.cjs +2 -0
- package/dist/components/Table/TableHeader.cjs.map +1 -0
- package/dist/components/Table/TableHeader.js +14 -0
- package/dist/components/Table/TableHeader.js.map +1 -0
- package/dist/components/Table/TableRow.cjs +2 -0
- package/dist/components/Table/TableRow.cjs.map +1 -0
- package/dist/components/Table/TableRow.js +20 -0
- package/dist/components/Table/TableRow.js.map +1 -0
- package/dist/components/Tabs/Tabs.cjs +2 -0
- package/dist/components/Tabs/Tabs.cjs.map +1 -0
- package/dist/components/Tabs/Tabs.context.cjs +2 -0
- package/dist/components/Tabs/Tabs.context.cjs.map +1 -0
- package/dist/components/Tabs/Tabs.context.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.context.js +13 -0
- package/dist/components/Tabs/Tabs.context.js.map +1 -0
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.js +39 -0
- package/dist/components/Tabs/Tabs.js.map +1 -0
- package/dist/components/Tabs/Tabs.variants.cjs +2 -0
- package/dist/components/Tabs/Tabs.variants.cjs.map +1 -0
- package/dist/components/Tabs/Tabs.variants.js +24 -0
- package/dist/components/Tabs/Tabs.variants.js.map +1 -0
- package/dist/components/Tabs/TabsContent.cjs +2 -0
- package/dist/components/Tabs/TabsContent.cjs.map +1 -0
- package/dist/components/Tabs/TabsContent.d.ts.map +1 -1
- package/dist/components/Tabs/TabsContent.js +25 -0
- package/dist/components/Tabs/TabsContent.js.map +1 -0
- package/dist/components/Tabs/TabsList.cjs +2 -0
- package/dist/components/Tabs/TabsList.cjs.map +1 -0
- package/dist/components/Tabs/TabsList.d.ts.map +1 -1
- package/dist/components/Tabs/TabsList.js +52 -0
- package/dist/components/Tabs/TabsList.js.map +1 -0
- package/dist/components/Tabs/TabsTrigger.cjs +2 -0
- package/dist/components/Tabs/TabsTrigger.cjs.map +1 -0
- package/dist/components/Tabs/TabsTrigger.d.ts.map +1 -1
- package/dist/components/Tabs/TabsTrigger.js +34 -0
- package/dist/components/Tabs/TabsTrigger.js.map +1 -0
- package/dist/components/Tag/Tag.cjs +2 -0
- package/dist/components/Tag/Tag.cjs.map +1 -0
- package/dist/components/Tag/Tag.js +24 -0
- package/dist/components/Tag/Tag.js.map +1 -0
- package/dist/components/Tag/Tag.variants.cjs +2 -0
- package/dist/components/Tag/Tag.variants.cjs.map +1 -0
- package/dist/components/Tag/Tag.variants.js +39 -0
- package/dist/components/Tag/Tag.variants.js.map +1 -0
- package/dist/components/Text/Text.cjs +2 -0
- package/dist/components/Text/Text.cjs.map +1 -0
- package/dist/components/Text/Text.d.ts +3 -0
- package/dist/components/Text/Text.d.ts.map +1 -1
- package/dist/components/Text/Text.js +21 -0
- package/dist/components/Text/Text.js.map +1 -0
- package/dist/components/Text/Text.variants.cjs +2 -0
- package/dist/components/Text/Text.variants.cjs.map +1 -0
- package/dist/components/Text/Text.variants.d.ts +1 -2
- package/dist/components/Text/Text.variants.d.ts.map +1 -1
- package/dist/components/Text/Text.variants.js +43 -0
- package/dist/components/Text/Text.variants.js.map +1 -0
- package/dist/components/Textarea/Textarea.cjs +2 -0
- package/dist/components/Textarea/Textarea.cjs.map +1 -0
- package/dist/components/Textarea/Textarea.js +31 -0
- package/dist/components/Textarea/Textarea.js.map +1 -0
- package/dist/components/Textarea/Textarea.variants.cjs +2 -0
- package/dist/components/Textarea/Textarea.variants.cjs.map +1 -0
- package/dist/components/Textarea/Textarea.variants.js +26 -0
- package/dist/components/Textarea/Textarea.variants.js.map +1 -0
- package/dist/components/Timeline/Timeline.cjs +2 -0
- package/dist/components/Timeline/Timeline.cjs.map +1 -0
- package/dist/components/Timeline/Timeline.js +14 -0
- package/dist/components/Timeline/Timeline.js.map +1 -0
- package/dist/components/Timeline/Timeline.variants.cjs +2 -0
- package/dist/components/Timeline/Timeline.variants.cjs.map +1 -0
- package/dist/components/Timeline/Timeline.variants.js +21 -0
- package/dist/components/Timeline/Timeline.variants.js.map +1 -0
- package/dist/components/Timeline/TimelineItem.cjs +2 -0
- package/dist/components/Timeline/TimelineItem.cjs.map +1 -0
- package/dist/components/Timeline/TimelineItem.js +55 -0
- package/dist/components/Timeline/TimelineItem.js.map +1 -0
- package/dist/components/Toast/Toast.cjs +2 -0
- package/dist/components/Toast/Toast.cjs.map +1 -0
- package/dist/components/Toast/Toast.d.ts.map +1 -1
- package/dist/components/Toast/Toast.js +45 -0
- package/dist/components/Toast/Toast.js.map +1 -0
- package/dist/components/Toast/Toast.variants.cjs +2 -0
- package/dist/components/Toast/Toast.variants.cjs.map +1 -0
- package/dist/components/Toast/Toast.variants.js +38 -0
- package/dist/components/Toast/Toast.variants.js.map +1 -0
- package/dist/components/Toast/Toaster.cjs +2 -0
- package/dist/components/Toast/Toaster.cjs.map +1 -0
- package/dist/components/Toast/Toaster.d.ts.map +1 -1
- package/dist/components/Toast/Toaster.js +33 -0
- package/dist/components/Toast/Toaster.js.map +1 -0
- package/dist/components/Toast/toastStore.cjs +2 -0
- package/dist/components/Toast/toastStore.cjs.map +1 -0
- package/dist/components/Toast/toastStore.js +89 -0
- package/dist/components/Toast/toastStore.js.map +1 -0
- package/dist/components/Tooltip/Tooltip.cjs +2 -0
- package/dist/components/Tooltip/Tooltip.cjs.map +1 -0
- package/dist/components/Tooltip/Tooltip.context.cjs +2 -0
- package/dist/components/Tooltip/Tooltip.context.cjs.map +1 -0
- package/dist/components/Tooltip/Tooltip.context.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.context.js +13 -0
- package/dist/components/Tooltip/Tooltip.context.js.map +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.js +51 -0
- package/dist/components/Tooltip/Tooltip.js.map +1 -0
- package/dist/components/Tooltip/TooltipContent.cjs +2 -0
- package/dist/components/Tooltip/TooltipContent.cjs.map +1 -0
- package/dist/components/Tooltip/TooltipContent.d.ts.map +1 -1
- package/dist/components/Tooltip/TooltipContent.js +25 -0
- package/dist/components/Tooltip/TooltipContent.js.map +1 -0
- package/dist/components/Tooltip/TooltipTrigger.cjs +2 -0
- package/dist/components/Tooltip/TooltipTrigger.cjs.map +1 -0
- package/dist/components/Tooltip/TooltipTrigger.d.ts.map +1 -1
- package/dist/components/Tooltip/TooltipTrigger.js +20 -0
- package/dist/components/Tooltip/TooltipTrigger.js.map +1 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.cjs +2 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.cjs.map +1 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +8 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts.map +1 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.js +14 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.js.map +1 -0
- package/dist/components/VisuallyHidden/index.d.ts +3 -0
- package/dist/components/VisuallyHidden/index.d.ts.map +1 -0
- package/dist/hooks/use-controllable-state.cjs +2 -0
- package/dist/hooks/use-controllable-state.cjs.map +1 -0
- package/dist/hooks/use-controllable-state.d.ts.map +1 -1
- package/dist/hooks/use-controllable-state.js +13 -0
- package/dist/hooks/use-controllable-state.js.map +1 -0
- package/dist/hooks/use-escape-key.cjs +2 -0
- package/dist/hooks/use-escape-key.cjs.map +1 -0
- package/dist/hooks/use-escape-key.d.ts.map +1 -1
- package/dist/hooks/use-escape-key.js +16 -0
- package/dist/hooks/use-escape-key.js.map +1 -0
- package/dist/hooks/use-focus-first-interactive.cjs +2 -0
- package/dist/hooks/use-focus-first-interactive.cjs.map +1 -0
- package/dist/hooks/use-focus-first-interactive.d.ts.map +1 -1
- package/dist/hooks/use-focus-first-interactive.js +19 -0
- package/dist/hooks/use-focus-first-interactive.js.map +1 -0
- package/dist/hooks/use-focus-trap.cjs +2 -0
- package/dist/hooks/use-focus-trap.cjs.map +1 -0
- package/dist/hooks/use-focus-trap.d.ts.map +1 -1
- package/dist/hooks/use-focus-trap.js +41 -0
- package/dist/hooks/use-focus-trap.js.map +1 -0
- package/dist/hooks/use-form-field-props.cjs +2 -0
- package/dist/hooks/use-form-field-props.cjs.map +1 -0
- package/dist/hooks/use-form-field-props.d.ts.map +1 -1
- package/dist/hooks/use-form-field-props.js +17 -0
- package/dist/hooks/use-form-field-props.js.map +1 -0
- package/dist/hooks/use-media-query.cjs +2 -0
- package/dist/hooks/use-media-query.cjs.map +1 -0
- package/dist/hooks/use-media-query.d.ts.map +1 -1
- package/dist/hooks/use-media-query.js +18 -0
- package/dist/hooks/use-media-query.js.map +1 -0
- package/dist/hooks/use-menu-navigation.cjs +2 -0
- package/dist/hooks/use-menu-navigation.cjs.map +1 -0
- package/dist/hooks/use-menu-navigation.d.ts +1 -0
- package/dist/hooks/use-menu-navigation.d.ts.map +1 -1
- package/dist/hooks/use-menu-navigation.js +99 -0
- package/dist/hooks/use-menu-navigation.js.map +1 -0
- package/dist/hooks/use-scroll-lock.cjs +2 -0
- package/dist/hooks/use-scroll-lock.cjs.map +1 -0
- package/dist/hooks/use-scroll-lock.d.ts.map +1 -1
- package/dist/hooks/use-scroll-lock.js +22 -0
- package/dist/hooks/use-scroll-lock.js.map +1 -0
- package/dist/index.cjs +1 -2
- package/dist/index.d.ts +22 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +211 -10328
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +2 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.cjs.map +1 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +267 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +1 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +2 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs.map +1 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +330 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.cjs +2 -0
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.cjs.map +1 -0
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.js +738 -0
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.js.map +1 -0
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.utils.cjs +2 -0
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.utils.cjs.map +1 -0
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.utils.js +108 -0
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.utils.js.map +1 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs +2 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs.map +1 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +179 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs +2 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs.map +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs +2 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs.map +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +99 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +103 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +1 -0
- package/dist/node_modules/class-variance-authority/dist/index.cjs +2 -0
- package/dist/node_modules/class-variance-authority/dist/index.cjs.map +1 -0
- package/dist/node_modules/class-variance-authority/dist/index.js +35 -0
- package/dist/node_modules/class-variance-authority/dist/index.js.map +1 -0
- package/dist/node_modules/clsx/dist/clsx.cjs +2 -0
- package/dist/node_modules/clsx/dist/clsx.cjs.map +1 -0
- package/dist/node_modules/clsx/dist/clsx.js +18 -0
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -0
- package/dist/node_modules/tabbable/dist/index.esm.cjs +2 -0
- package/dist/node_modules/tabbable/dist/index.esm.cjs.map +1 -0
- package/dist/node_modules/tabbable/dist/index.esm.js +169 -0
- package/dist/node_modules/tabbable/dist/index.esm.js.map +1 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs +2 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs.map +1 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +1674 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
- package/dist/styles-root.css +31 -1
- package/dist/styles.css +39 -1
- package/dist/utils/cn.cjs +2 -0
- package/dist/utils/cn.cjs.map +1 -0
- package/dist/utils/cn.js +10 -0
- package/dist/utils/cn.js.map +1 -0
- package/dist/utils/dismiss-button.cjs +2 -0
- package/dist/utils/dismiss-button.cjs.map +1 -0
- package/dist/utils/dismiss-button.js +41 -0
- package/dist/utils/dismiss-button.js.map +1 -0
- package/dist/utils/field-base.cjs +2 -0
- package/dist/utils/field-base.cjs.map +1 -0
- package/dist/utils/field-base.js +16 -0
- package/dist/utils/field-base.js.map +1 -0
- package/dist/utils/modal-primitive.cjs +2 -0
- package/dist/utils/modal-primitive.cjs.map +1 -0
- package/dist/utils/modal-primitive.d.ts.map +1 -1
- package/dist/utils/modal-primitive.js +111 -0
- package/dist/utils/modal-primitive.js.map +1 -0
- package/dist/utils/portal.cjs +2 -0
- package/dist/utils/portal.cjs.map +1 -0
- package/dist/utils/portal.d.ts.map +1 -1
- package/dist/utils/portal.js +11 -0
- package/dist/utils/portal.js.map +1 -0
- package/dist/utils/responsive.cjs +2 -0
- package/dist/utils/responsive.cjs.map +1 -0
- package/dist/utils/responsive.d.ts +11 -0
- package/dist/utils/responsive.d.ts.map +1 -1
- package/dist/utils/responsive.js +128 -0
- package/dist/utils/responsive.js.map +1 -0
- package/dist/utils/slot.cjs +2 -0
- package/dist/utils/slot.cjs.map +1 -0
- package/dist/utils/slot.js +46 -0
- package/dist/utils/slot.js.map +1 -0
- package/dist/utils/variants.cjs +2 -0
- package/dist/utils/variants.cjs.map +1 -0
- package/dist/utils/variants.js +141 -0
- package/dist/utils/variants.js.map +1 -0
- package/package.json +1 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["getComputedStyle","FOCUSABLE_ATTRIBUTE","index","SafeReact","useLatestRef","computePosition","flip","offset","shift","size","offset","offset$1","shift","shift$1","flip","flip$1","size","size$1","useFloating","useLatestRef","getDocument$1","contains$1","getNodeChildren$1","getTarget$1","getComputedStyle"],"sources":["../node_modules/clsx/dist/clsx.mjs","../node_modules/tailwind-merge/dist/bundle-mjs.mjs","../src/utils/cn.ts","../src/utils/slot.tsx","../src/hooks/use-controllable-state.ts","../src/components/Accordion/Accordion.context.tsx","../src/components/Accordion/Accordion.tsx","../src/components/Collapsible/Collapsible.context.tsx","../src/components/Collapsible/Collapsible.tsx","../src/components/Collapsible/CollapsibleTrigger.tsx","../src/components/Collapsible/CollapsibleContent.tsx","../src/components/Accordion/AccordionItem.tsx","../node_modules/class-variance-authority/dist/index.mjs","../src/utils/variants.ts","../src/components/Icon/Icon.variants.ts","../src/components/Icon/Icon.tsx","../src/components/Accordion/AccordionTrigger.tsx","../src/components/Accordion/AccordionContent.tsx","../src/utils/dismiss-button.tsx","../src/components/Alert/Alert.variants.ts","../src/components/Alert/Alert.tsx","../src/components/AppShell/AppShell.tsx","../src/components/AppShell/AppShellHeader.tsx","../src/components/AppShell/AppShellBody.tsx","../src/components/AppShell/AppShellMain.tsx","../src/components/AspectRatio/AspectRatio.utils.ts","../src/components/AspectRatio/AspectRatio.tsx","../src/components/Banner/Banner.variants.ts","../src/components/Banner/Banner.tsx","../src/components/Avatar/Avatar.variants.ts","../src/components/Avatar/Avatar.tsx","../src/components/Badge/Badge.variants.ts","../src/components/Badge/Badge.tsx","../src/components/Button/Button.variants.ts","../src/components/Button/Button.tsx","../src/components/Heading/Heading.variants.ts","../src/components/Heading/Heading.tsx","../src/components/Text/Text.variants.ts","../src/components/Text/Text.tsx","../src/utils/responsive.ts","../src/components/Stack/Stack.tsx","../src/components/Card/Card.variants.ts","../src/components/Card/Card.tsx","../src/components/FormField/FormField.context.tsx","../src/components/FormField/FormField.tsx","../src/hooks/use-form-field-props.ts","../src/components/Checkbox/Checkbox.variants.ts","../src/components/Checkbox/Checkbox.tsx","../src/components/Code/Code.variants.ts","../src/components/Code/Code.tsx","../src/utils/portal.tsx","../src/hooks/use-scroll-lock.ts","../src/hooks/use-escape-key.ts","../src/components/CommandMenu/CommandMenu.context.tsx","../src/components/CommandMenu/CommandMenu.tsx","../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","../node_modules/tabbable/dist/index.esm.js","../node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs","../node_modules/@floating-ui/core/dist/floating-ui.core.mjs","../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs","../node_modules/@floating-ui/react/dist/floating-ui.react.mjs","../src/components/Combobox/Combobox.context.tsx","../src/components/Combobox/Combobox.tsx","../src/components/Combobox/Combobox.variants.ts","../src/components/Combobox/ComboboxTrigger.tsx","../src/components/Combobox/ComboboxContent.tsx","../src/components/Combobox/Combobox.utils.ts","../src/components/Combobox/ComboboxInput.tsx","../src/components/Combobox/ComboboxListbox.tsx","../src/components/Combobox/ComboboxOption.tsx","../src/components/Combobox/ComboboxGroup.tsx","../src/components/Combobox/ComboboxEmpty.tsx","../src/components/Container/Container.tsx","../src/hooks/use-focus-trap.ts","../src/utils/modal-primitive.tsx","../src/components/Dialog/Dialog.context.tsx","../src/components/Dialog/Dialog.tsx","../src/components/ContextMenu/ContextMenu.context.tsx","../src/components/ContextMenu/ContextMenu.tsx","../src/components/ContextMenu/ContextMenuTrigger.tsx","../src/hooks/use-menu-navigation.ts","../src/components/Menu/menuItemVariants.ts","../src/components/Menu/MenuItemBase.tsx","../src/components/Menu/MenuCheckboxItemBase.tsx","../src/components/Menu/MenuRadioGroupBase.tsx","../src/components/Menu/MenuRadioItemBase.tsx","../src/components/Menu/MenuContentBase.tsx","../src/components/ContextMenu/ContextMenuContent.tsx","../src/components/ContextMenu/ContextMenuItem.tsx","../src/components/ContextMenu/ContextMenuCheckboxItem.tsx","../src/components/ContextMenu/ContextMenuRadioGroup.tsx","../src/components/ContextMenu/ContextMenuRadioItem.tsx","../src/components/Menu/MenuSeparatorBase.tsx","../src/components/ContextMenu/ContextMenuSeparator.tsx","../src/components/Menu/MenuLabelBase.tsx","../src/components/ContextMenu/ContextMenuLabel.tsx","../src/utils/field-base.ts","../src/components/Input/Input.variants.ts","../src/components/Input/Input.tsx","../src/components/EmptyState/EmptyState.tsx","../src/components/Table/Table.context.tsx","../src/components/Table/Table.variants.ts","../src/components/Table/Table.tsx","../src/components/Table/TableHeader.tsx","../src/components/Table/TableBody.tsx","../src/components/Table/TableFooter.tsx","../src/components/Table/TableRow.tsx","../src/components/Table/TableHead.tsx","../src/components/Table/TableCell.tsx","../src/components/Pagination/Pagination.tsx","../src/components/Pagination/PaginationContent.tsx","../src/components/Pagination/PaginationItem.tsx","../src/components/Pagination/PaginationLink.tsx","../src/components/Pagination/PaginationPrevious.tsx","../src/components/Pagination/PaginationNext.tsx","../src/components/Pagination/PaginationEllipsis.tsx","../src/components/DataTable/DataTable.tsx","../src/components/DatePicker/DatePicker.context.tsx","../src/components/DatePicker/DatePicker.utils.ts","../src/components/DatePicker/DatePickerInput.tsx","../src/components/DatePicker/DatePicker.hooks.ts","../src/components/DatePicker/DatePickerCalendar.tsx","../src/components/DatePicker/DatePicker.tsx","../src/components/Divider/Divider.variants.ts","../src/components/Divider/Divider.tsx","../src/components/DropdownMenu/DropdownMenu.context.tsx","../src/components/DropdownMenu/DropdownMenu.tsx","../src/components/DropdownMenu/DropdownMenuTrigger.tsx","../src/components/DropdownMenu/DropdownMenuContent.tsx","../src/components/DropdownMenu/DropdownMenuItem.tsx","../src/components/DropdownMenu/DropdownMenuCheckboxItem.tsx","../src/components/DropdownMenu/DropdownMenuRadioGroup.tsx","../src/components/DropdownMenu/DropdownMenuRadioItem.tsx","../src/components/DropdownMenu/DropdownMenuSeparator.tsx","../src/components/DropdownMenu/DropdownMenuLabel.tsx","../src/components/Grid/Grid.tsx","../src/components/Kbd/Kbd.variants.ts","../src/components/Kbd/Kbd.tsx","../src/components/Label/Label.tsx","../src/components/Menubar/Menubar.context.tsx","../src/components/Menubar/Menubar.tsx","../src/components/Menubar/MenubarMenu.tsx","../src/components/Menubar/MenubarTrigger.tsx","../src/components/Menubar/MenubarContent.tsx","../src/components/Menubar/MenubarItem.tsx","../src/components/Menubar/MenubarCheckboxItem.tsx","../src/components/Menubar/MenubarRadioGroup.tsx","../src/components/Menubar/MenubarRadioItem.tsx","../src/components/Menubar/MenubarSeparator.tsx","../src/components/Select/Select.context.tsx","../src/components/Select/Select.tsx","../src/components/Select/SelectTrigger.variants.ts","../src/components/Select/SelectTrigger.tsx","../src/components/Select/SelectContent.tsx","../src/components/Select/SelectItem.tsx","../src/components/Select/SelectSeparator.tsx","../src/components/Sheet/Sheet.context.tsx","../src/components/Sheet/Sheet.tsx","../src/components/Skeleton/Skeleton.variants.ts","../src/components/Skeleton/Skeleton.tsx","../src/components/Slider/Slider.variants.ts","../src/components/Slider/Slider.tsx","../src/components/RadioGroup/RadioGroup.context.tsx","../src/components/RadioGroup/RadioGroup.tsx","../src/components/RadioGroup/Radio.variants.ts","../src/components/RadioGroup/Radio.tsx","../src/components/Progress/Progress.variants.ts","../src/components/Progress/Progress.tsx","../src/components/Switch/Switch.variants.ts","../src/components/Switch/Switch.tsx","../src/components/Spinner/Spinner.variants.ts","../src/components/Spinner/Spinner.tsx","../src/components/Tabs/Tabs.context.tsx","../src/components/Tabs/Tabs.tsx","../src/components/Tabs/Tabs.variants.ts","../src/components/Tabs/TabsList.tsx","../src/components/Tabs/TabsTrigger.tsx","../src/components/Tabs/TabsContent.tsx","../src/components/Tag/Tag.variants.ts","../src/components/Tag/Tag.tsx","../src/components/Textarea/Textarea.variants.ts","../src/components/Textarea/Textarea.tsx","../src/components/Tooltip/Tooltip.context.tsx","../src/components/Tooltip/Tooltip.tsx","../src/components/Tooltip/TooltipTrigger.tsx","../src/components/Tooltip/TooltipContent.tsx","../src/components/Popover/Popover.context.tsx","../src/components/Popover/Popover.tsx","../src/components/Popover/PopoverTrigger.tsx","../src/hooks/use-focus-first-interactive.ts","../src/components/Popover/PopoverContent.tsx","../src/components/Timeline/Timeline.tsx","../src/components/Timeline/Timeline.variants.ts","../src/components/Timeline/TimelineItem.tsx","../src/components/Toast/toastStore.ts","../src/components/Toast/Toast.variants.ts","../src/components/Toast/Toast.tsx","../src/components/Toast/Toaster.tsx","../src/components/NavigationMenu/NavigationMenu.context.tsx","../src/components/NavigationMenu/NavigationMenu.tsx","../src/components/Breadcrumb/Breadcrumb.tsx","../src/components/Breadcrumb/BreadcrumbList.tsx","../src/components/Breadcrumb/BreadcrumbItem.tsx","../src/components/Breadcrumb/BreadcrumbLink.tsx","../src/components/Breadcrumb/BreadcrumbPage.tsx","../src/components/Breadcrumb/BreadcrumbSeparator.tsx","../src/components/Breadcrumb/BreadcrumbEllipsis.tsx","../src/components/Stepper/Stepper.context.tsx","../src/components/Stepper/Stepper.tsx","../src/components/Stepper/StepperItem.tsx","../src/components/Stepper/StepperIndicator.tsx","../src/components/Stepper/StepperContent.tsx","../src/components/Stepper/StepperTitle.tsx","../src/components/Stepper/StepperDescription.tsx","../src/hooks/use-media-query.ts","../src/components/Sidebar/Sidebar.context.tsx","../src/components/Sidebar/SidebarProvider.tsx","../src/components/Sidebar/Sidebar.tsx","../src/components/Sidebar/SidebarHeader.tsx","../src/components/Sidebar/SidebarContent.tsx","../src/components/Sidebar/SidebarFooter.tsx","../src/components/Sidebar/SidebarGroup.tsx","../src/components/Sidebar/SidebarGroupLabel.tsx","../src/components/Sidebar/SidebarMenu.tsx","../src/components/Sidebar/SidebarMenuItem.tsx","../src/components/Sidebar/SidebarMenuButton.tsx","../src/components/Sidebar/SidebarTrigger.tsx","../src/components/Sidebar/SidebarInset.tsx"],"sourcesContent":["function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","/**\n * Concatenates two arrays faster than the array spread operator.\n */\nconst concatArrays = (array1, array2) => {\n // Pre-allocate for better V8 optimization\n const combinedArray = new Array(array1.length + array2.length);\n for (let i = 0; i < array1.length; i++) {\n combinedArray[i] = array1[i];\n }\n for (let i = 0; i < array2.length; i++) {\n combinedArray[array1.length + i] = array2[i];\n }\n return combinedArray;\n};\n\n// Factory function ensures consistent object shapes\nconst createClassValidatorObject = (classGroupId, validator) => ({\n classGroupId,\n validator\n});\n// Factory ensures consistent ClassPartObject shape\nconst createClassPartObject = (nextPart = new Map(), validators = null, classGroupId) => ({\n nextPart,\n validators,\n classGroupId\n});\nconst CLASS_PART_SEPARATOR = '-';\nconst EMPTY_CONFLICTS = [];\n// I use two dots here because one dot is used as prefix for class groups in plugins\nconst ARBITRARY_PROPERTY_PREFIX = 'arbitrary..';\nconst createClassGroupUtils = config => {\n const classMap = createClassMap(config);\n const {\n conflictingClassGroups,\n conflictingClassGroupModifiers\n } = config;\n const getClassGroupId = className => {\n if (className.startsWith('[') && className.endsWith(']')) {\n return getGroupIdForArbitraryProperty(className);\n }\n const classParts = className.split(CLASS_PART_SEPARATOR);\n // Classes like `-inset-1` produce an empty string as first classPart. We assume that classes for negative values are used correctly and skip it.\n const startIndex = classParts[0] === '' && classParts.length > 1 ? 1 : 0;\n return getGroupRecursive(classParts, startIndex, classMap);\n };\n const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {\n if (hasPostfixModifier) {\n const modifierConflicts = conflictingClassGroupModifiers[classGroupId];\n const baseConflicts = conflictingClassGroups[classGroupId];\n if (modifierConflicts) {\n if (baseConflicts) {\n // Merge base conflicts with modifier conflicts\n return concatArrays(baseConflicts, modifierConflicts);\n }\n // Only modifier conflicts\n return modifierConflicts;\n }\n // Fall back to without postfix if no modifier conflicts\n return baseConflicts || EMPTY_CONFLICTS;\n }\n return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;\n };\n return {\n getClassGroupId,\n getConflictingClassGroupIds\n };\n};\nconst getGroupRecursive = (classParts, startIndex, classPartObject) => {\n const classPathsLength = classParts.length - startIndex;\n if (classPathsLength === 0) {\n return classPartObject.classGroupId;\n }\n const currentClassPart = classParts[startIndex];\n const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);\n if (nextClassPartObject) {\n const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);\n if (result) return result;\n }\n const validators = classPartObject.validators;\n if (validators === null) {\n return undefined;\n }\n // Build classRest string efficiently by joining from startIndex onwards\n const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);\n const validatorsLength = validators.length;\n for (let i = 0; i < validatorsLength; i++) {\n const validatorObj = validators[i];\n if (validatorObj.validator(classRest)) {\n return validatorObj.classGroupId;\n }\n }\n return undefined;\n};\n/**\n * Get the class group ID for an arbitrary property.\n *\n * @param className - The class name to get the group ID for. Is expected to be string starting with `[` and ending with `]`.\n */\nconst getGroupIdForArbitraryProperty = className => className.slice(1, -1).indexOf(':') === -1 ? undefined : (() => {\n const content = className.slice(1, -1);\n const colonIndex = content.indexOf(':');\n const property = content.slice(0, colonIndex);\n return property ? ARBITRARY_PROPERTY_PREFIX + property : undefined;\n})();\n/**\n * Exported for testing only\n */\nconst createClassMap = config => {\n const {\n theme,\n classGroups\n } = config;\n return processClassGroups(classGroups, theme);\n};\n// Split into separate functions to maintain monomorphic call sites\nconst processClassGroups = (classGroups, theme) => {\n const classMap = createClassPartObject();\n for (const classGroupId in classGroups) {\n const group = classGroups[classGroupId];\n processClassesRecursively(group, classMap, classGroupId, theme);\n }\n return classMap;\n};\nconst processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {\n const len = classGroup.length;\n for (let i = 0; i < len; i++) {\n const classDefinition = classGroup[i];\n processClassDefinition(classDefinition, classPartObject, classGroupId, theme);\n }\n};\n// Split into separate functions for each type to maintain monomorphic call sites\nconst processClassDefinition = (classDefinition, classPartObject, classGroupId, theme) => {\n if (typeof classDefinition === 'string') {\n processStringDefinition(classDefinition, classPartObject, classGroupId);\n return;\n }\n if (typeof classDefinition === 'function') {\n processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme);\n return;\n }\n processObjectDefinition(classDefinition, classPartObject, classGroupId, theme);\n};\nconst processStringDefinition = (classDefinition, classPartObject, classGroupId) => {\n const classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition);\n classPartObjectToEdit.classGroupId = classGroupId;\n};\nconst processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => {\n if (isThemeGetter(classDefinition)) {\n processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);\n return;\n }\n if (classPartObject.validators === null) {\n classPartObject.validators = [];\n }\n classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));\n};\nconst processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => {\n const entries = Object.entries(classDefinition);\n const len = entries.length;\n for (let i = 0; i < len; i++) {\n const [key, value] = entries[i];\n processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme);\n }\n};\nconst getPart = (classPartObject, path) => {\n let current = classPartObject;\n const parts = path.split(CLASS_PART_SEPARATOR);\n const len = parts.length;\n for (let i = 0; i < len; i++) {\n const part = parts[i];\n let next = current.nextPart.get(part);\n if (!next) {\n next = createClassPartObject();\n current.nextPart.set(part, next);\n }\n current = next;\n }\n return current;\n};\n// Type guard maintains monomorphic check\nconst isThemeGetter = func => 'isThemeGetter' in func && func.isThemeGetter === true;\n\n// LRU cache implementation using plain objects for simplicity\nconst createLruCache = maxCacheSize => {\n if (maxCacheSize < 1) {\n return {\n get: () => undefined,\n set: () => {}\n };\n }\n let cacheSize = 0;\n let cache = Object.create(null);\n let previousCache = Object.create(null);\n const update = (key, value) => {\n cache[key] = value;\n cacheSize++;\n if (cacheSize > maxCacheSize) {\n cacheSize = 0;\n previousCache = cache;\n cache = Object.create(null);\n }\n };\n return {\n get(key) {\n let value = cache[key];\n if (value !== undefined) {\n return value;\n }\n if ((value = previousCache[key]) !== undefined) {\n update(key, value);\n return value;\n }\n },\n set(key, value) {\n if (key in cache) {\n cache[key] = value;\n } else {\n update(key, value);\n }\n }\n };\n};\nconst IMPORTANT_MODIFIER = '!';\nconst MODIFIER_SEPARATOR = ':';\nconst EMPTY_MODIFIERS = [];\n// Pre-allocated result object shape for consistency\nconst createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({\n modifiers,\n hasImportantModifier,\n baseClassName,\n maybePostfixModifierPosition,\n isExternal\n});\nconst createParseClassName = config => {\n const {\n prefix,\n experimentalParseClassName\n } = config;\n /**\n * Parse class name into parts.\n *\n * Inspired by `splitAtTopLevelOnly` used in Tailwind CSS\n * @see https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js\n */\n let parseClassName = className => {\n // Use simple array with push for better performance\n const modifiers = [];\n let bracketDepth = 0;\n let parenDepth = 0;\n let modifierStart = 0;\n let postfixModifierPosition;\n const len = className.length;\n for (let index = 0; index < len; index++) {\n const currentCharacter = className[index];\n if (bracketDepth === 0 && parenDepth === 0) {\n if (currentCharacter === MODIFIER_SEPARATOR) {\n modifiers.push(className.slice(modifierStart, index));\n modifierStart = index + 1;\n continue;\n }\n if (currentCharacter === '/') {\n postfixModifierPosition = index;\n continue;\n }\n }\n if (currentCharacter === '[') bracketDepth++;else if (currentCharacter === ']') bracketDepth--;else if (currentCharacter === '(') parenDepth++;else if (currentCharacter === ')') parenDepth--;\n }\n const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart);\n // Inline important modifier check\n let baseClassName = baseClassNameWithImportantModifier;\n let hasImportantModifier = false;\n if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) {\n baseClassName = baseClassNameWithImportantModifier.slice(0, -1);\n hasImportantModifier = true;\n } else if (\n /**\n * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.\n * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864\n */\n baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)) {\n baseClassName = baseClassNameWithImportantModifier.slice(1);\n hasImportantModifier = true;\n }\n const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined;\n return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);\n };\n if (prefix) {\n const fullPrefix = prefix + MODIFIER_SEPARATOR;\n const parseClassNameOriginal = parseClassName;\n parseClassName = className => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, undefined, true);\n }\n if (experimentalParseClassName) {\n const parseClassNameOriginal = parseClassName;\n parseClassName = className => experimentalParseClassName({\n className,\n parseClassName: parseClassNameOriginal\n });\n }\n return parseClassName;\n};\n\n/**\n * Sorts modifiers according to following schema:\n * - Predefined modifiers are sorted alphabetically\n * - When an arbitrary variant appears, it must be preserved which modifiers are before and after it\n */\nconst createSortModifiers = config => {\n // Pre-compute weights for all known modifiers for O(1) comparison\n const modifierWeights = new Map();\n // Assign weights to sensitive modifiers (highest priority, but preserve order)\n config.orderSensitiveModifiers.forEach((mod, index) => {\n modifierWeights.set(mod, 1000000 + index); // High weights for sensitive mods\n });\n return modifiers => {\n const result = [];\n let currentSegment = [];\n // Process modifiers in one pass\n for (let i = 0; i < modifiers.length; i++) {\n const modifier = modifiers[i];\n // Check if modifier is sensitive (starts with '[' or in orderSensitiveModifiers)\n const isArbitrary = modifier[0] === '[';\n const isOrderSensitive = modifierWeights.has(modifier);\n if (isArbitrary || isOrderSensitive) {\n // Sort and flush current segment alphabetically\n if (currentSegment.length > 0) {\n currentSegment.sort();\n result.push(...currentSegment);\n currentSegment = [];\n }\n result.push(modifier);\n } else {\n // Regular modifier - add to current segment for batch sorting\n currentSegment.push(modifier);\n }\n }\n // Sort and add any remaining segment items\n if (currentSegment.length > 0) {\n currentSegment.sort();\n result.push(...currentSegment);\n }\n return result;\n };\n};\nconst createConfigUtils = config => ({\n cache: createLruCache(config.cacheSize),\n parseClassName: createParseClassName(config),\n sortModifiers: createSortModifiers(config),\n ...createClassGroupUtils(config)\n});\nconst SPLIT_CLASSES_REGEX = /\\s+/;\nconst mergeClassList = (classList, configUtils) => {\n const {\n parseClassName,\n getClassGroupId,\n getConflictingClassGroupIds,\n sortModifiers\n } = configUtils;\n /**\n * Set of classGroupIds in following format:\n * `{importantModifier}{variantModifiers}{classGroupId}`\n * @example 'float'\n * @example 'hover:focus:bg-color'\n * @example 'md:!pr'\n */\n const classGroupsInConflict = [];\n const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);\n let result = '';\n for (let index = classNames.length - 1; index >= 0; index -= 1) {\n const originalClassName = classNames[index];\n const {\n isExternal,\n modifiers,\n hasImportantModifier,\n baseClassName,\n maybePostfixModifierPosition\n } = parseClassName(originalClassName);\n if (isExternal) {\n result = originalClassName + (result.length > 0 ? ' ' + result : result);\n continue;\n }\n let hasPostfixModifier = !!maybePostfixModifierPosition;\n let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);\n if (!classGroupId) {\n if (!hasPostfixModifier) {\n // Not a Tailwind class\n result = originalClassName + (result.length > 0 ? ' ' + result : result);\n continue;\n }\n classGroupId = getClassGroupId(baseClassName);\n if (!classGroupId) {\n // Not a Tailwind class\n result = originalClassName + (result.length > 0 ? ' ' + result : result);\n continue;\n }\n hasPostfixModifier = false;\n }\n // Fast path: skip sorting for empty or single modifier\n const variantModifier = modifiers.length === 0 ? '' : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(':');\n const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;\n const classId = modifierId + classGroupId;\n if (classGroupsInConflict.indexOf(classId) > -1) {\n // Tailwind class omitted due to conflict\n continue;\n }\n classGroupsInConflict.push(classId);\n const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);\n for (let i = 0; i < conflictGroups.length; ++i) {\n const group = conflictGroups[i];\n classGroupsInConflict.push(modifierId + group);\n }\n // Tailwind class not in conflict\n result = originalClassName + (result.length > 0 ? ' ' + result : result);\n }\n return result;\n};\n\n/**\n * The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better.\n *\n * Specifically:\n * - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js\n * - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts\n *\n * Original code has MIT license: Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)\n */\nconst twJoin = (...classLists) => {\n let index = 0;\n let argument;\n let resolvedValue;\n let string = '';\n while (index < classLists.length) {\n if (argument = classLists[index++]) {\n if (resolvedValue = toValue(argument)) {\n string && (string += ' ');\n string += resolvedValue;\n }\n }\n }\n return string;\n};\nconst toValue = mix => {\n // Fast path for strings\n if (typeof mix === 'string') {\n return mix;\n }\n let resolvedValue;\n let string = '';\n for (let k = 0; k < mix.length; k++) {\n if (mix[k]) {\n if (resolvedValue = toValue(mix[k])) {\n string && (string += ' ');\n string += resolvedValue;\n }\n }\n }\n return string;\n};\nconst createTailwindMerge = (createConfigFirst, ...createConfigRest) => {\n let configUtils;\n let cacheGet;\n let cacheSet;\n let functionToCall;\n const initTailwindMerge = classList => {\n const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());\n configUtils = createConfigUtils(config);\n cacheGet = configUtils.cache.get;\n cacheSet = configUtils.cache.set;\n functionToCall = tailwindMerge;\n return tailwindMerge(classList);\n };\n const tailwindMerge = classList => {\n const cachedResult = cacheGet(classList);\n if (cachedResult) {\n return cachedResult;\n }\n const result = mergeClassList(classList, configUtils);\n cacheSet(classList, result);\n return result;\n };\n functionToCall = initTailwindMerge;\n return (...args) => functionToCall(twJoin(...args));\n};\nconst fallbackThemeArr = [];\nconst fromTheme = key => {\n const themeGetter = theme => theme[key] || fallbackThemeArr;\n themeGetter.isThemeGetter = true;\n return themeGetter;\n};\nconst arbitraryValueRegex = /^\\[(?:(\\w[\\w-]*):)?(.+)\\]$/i;\nconst arbitraryVariableRegex = /^\\((?:(\\w[\\w-]*):)?(.+)\\)$/i;\nconst fractionRegex = /^\\d+(?:\\.\\d+)?\\/\\d+(?:\\.\\d+)?$/;\nconst tshirtUnitRegex = /^(\\d+(\\.\\d+)?)?(xs|sm|md|lg|xl)$/;\nconst lengthUnitRegex = /\\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\\b(calc|min|max|clamp)\\(.+\\)|^0$/;\nconst colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\\(.+\\)$/;\n// Shadow always begins with x and y offset separated by underscore optionally prepended by inset\nconst shadowRegex = /^(inset_)?-?((\\d+)?\\.?(\\d+)[a-z]+|0)_-?((\\d+)?\\.?(\\d+)[a-z]+|0)/;\nconst imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\\(.+\\)$/;\nconst isFraction = value => fractionRegex.test(value);\nconst isNumber = value => !!value && !Number.isNaN(Number(value));\nconst isInteger = value => !!value && Number.isInteger(Number(value));\nconst isPercent = value => value.endsWith('%') && isNumber(value.slice(0, -1));\nconst isTshirtSize = value => tshirtUnitRegex.test(value);\nconst isAny = () => true;\nconst isLengthOnly = value =>\n// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.\n// For example, `hsl(0 0% 0%)` would be classified as a length without this check.\n// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.\nlengthUnitRegex.test(value) && !colorFunctionRegex.test(value);\nconst isNever = () => false;\nconst isShadow = value => shadowRegex.test(value);\nconst isImage = value => imageRegex.test(value);\nconst isAnyNonArbitrary = value => !isArbitraryValue(value) && !isArbitraryVariable(value);\nconst isArbitrarySize = value => getIsArbitraryValue(value, isLabelSize, isNever);\nconst isArbitraryValue = value => arbitraryValueRegex.test(value);\nconst isArbitraryLength = value => getIsArbitraryValue(value, isLabelLength, isLengthOnly);\nconst isArbitraryNumber = value => getIsArbitraryValue(value, isLabelNumber, isNumber);\nconst isArbitraryWeight = value => getIsArbitraryValue(value, isLabelWeight, isAny);\nconst isArbitraryFamilyName = value => getIsArbitraryValue(value, isLabelFamilyName, isNever);\nconst isArbitraryPosition = value => getIsArbitraryValue(value, isLabelPosition, isNever);\nconst isArbitraryImage = value => getIsArbitraryValue(value, isLabelImage, isImage);\nconst isArbitraryShadow = value => getIsArbitraryValue(value, isLabelShadow, isShadow);\nconst isArbitraryVariable = value => arbitraryVariableRegex.test(value);\nconst isArbitraryVariableLength = value => getIsArbitraryVariable(value, isLabelLength);\nconst isArbitraryVariableFamilyName = value => getIsArbitraryVariable(value, isLabelFamilyName);\nconst isArbitraryVariablePosition = value => getIsArbitraryVariable(value, isLabelPosition);\nconst isArbitraryVariableSize = value => getIsArbitraryVariable(value, isLabelSize);\nconst isArbitraryVariableImage = value => getIsArbitraryVariable(value, isLabelImage);\nconst isArbitraryVariableShadow = value => getIsArbitraryVariable(value, isLabelShadow, true);\nconst isArbitraryVariableWeight = value => getIsArbitraryVariable(value, isLabelWeight, true);\n// Helpers\nconst getIsArbitraryValue = (value, testLabel, testValue) => {\n const result = arbitraryValueRegex.exec(value);\n if (result) {\n if (result[1]) {\n return testLabel(result[1]);\n }\n return testValue(result[2]);\n }\n return false;\n};\nconst getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) => {\n const result = arbitraryVariableRegex.exec(value);\n if (result) {\n if (result[1]) {\n return testLabel(result[1]);\n }\n return shouldMatchNoLabel;\n }\n return false;\n};\n// Labels\nconst isLabelPosition = label => label === 'position' || label === 'percentage';\nconst isLabelImage = label => label === 'image' || label === 'url';\nconst isLabelSize = label => label === 'length' || label === 'size' || label === 'bg-size';\nconst isLabelLength = label => label === 'length';\nconst isLabelNumber = label => label === 'number';\nconst isLabelFamilyName = label => label === 'family-name';\nconst isLabelWeight = label => label === 'number' || label === 'weight';\nconst isLabelShadow = label => label === 'shadow';\nconst validators = /*#__PURE__*/Object.defineProperty({\n __proto__: null,\n isAny,\n isAnyNonArbitrary,\n isArbitraryFamilyName,\n isArbitraryImage,\n isArbitraryLength,\n isArbitraryNumber,\n isArbitraryPosition,\n isArbitraryShadow,\n isArbitrarySize,\n isArbitraryValue,\n isArbitraryVariable,\n isArbitraryVariableFamilyName,\n isArbitraryVariableImage,\n isArbitraryVariableLength,\n isArbitraryVariablePosition,\n isArbitraryVariableShadow,\n isArbitraryVariableSize,\n isArbitraryVariableWeight,\n isArbitraryWeight,\n isFraction,\n isInteger,\n isNumber,\n isPercent,\n isTshirtSize\n}, Symbol.toStringTag, {\n value: 'Module'\n});\nconst getDefaultConfig = () => {\n /**\n * Theme getters for theme variable namespaces\n * @see https://tailwindcss.com/docs/theme#theme-variable-namespaces\n */\n /***/\n const themeColor = fromTheme('color');\n const themeFont = fromTheme('font');\n const themeText = fromTheme('text');\n const themeFontWeight = fromTheme('font-weight');\n const themeTracking = fromTheme('tracking');\n const themeLeading = fromTheme('leading');\n const themeBreakpoint = fromTheme('breakpoint');\n const themeContainer = fromTheme('container');\n const themeSpacing = fromTheme('spacing');\n const themeRadius = fromTheme('radius');\n const themeShadow = fromTheme('shadow');\n const themeInsetShadow = fromTheme('inset-shadow');\n const themeTextShadow = fromTheme('text-shadow');\n const themeDropShadow = fromTheme('drop-shadow');\n const themeBlur = fromTheme('blur');\n const themePerspective = fromTheme('perspective');\n const themeAspect = fromTheme('aspect');\n const themeEase = fromTheme('ease');\n const themeAnimate = fromTheme('animate');\n /**\n * Helpers to avoid repeating the same scales\n *\n * We use functions that create a new array every time they're called instead of static arrays.\n * This ensures that users who modify any scale by mutating the array (e.g. with `array.push(element)`) don't accidentally mutate arrays in other parts of the config.\n */\n /***/\n const scaleBreak = () => ['auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column'];\n const scalePosition = () => ['center', 'top', 'bottom', 'left', 'right', 'top-left',\n // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378\n 'left-top', 'top-right',\n // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378\n 'right-top', 'bottom-right',\n // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378\n 'right-bottom', 'bottom-left',\n // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378\n 'left-bottom'];\n const scalePositionWithArbitrary = () => [...scalePosition(), isArbitraryVariable, isArbitraryValue];\n const scaleOverflow = () => ['auto', 'hidden', 'clip', 'visible', 'scroll'];\n const scaleOverscroll = () => ['auto', 'contain', 'none'];\n const scaleUnambiguousSpacing = () => [isArbitraryVariable, isArbitraryValue, themeSpacing];\n const scaleInset = () => [isFraction, 'full', 'auto', ...scaleUnambiguousSpacing()];\n const scaleGridTemplateColsRows = () => [isInteger, 'none', 'subgrid', isArbitraryVariable, isArbitraryValue];\n const scaleGridColRowStartAndEnd = () => ['auto', {\n span: ['full', isInteger, isArbitraryVariable, isArbitraryValue]\n }, isInteger, isArbitraryVariable, isArbitraryValue];\n const scaleGridColRowStartOrEnd = () => [isInteger, 'auto', isArbitraryVariable, isArbitraryValue];\n const scaleGridAutoColsRows = () => ['auto', 'min', 'max', 'fr', isArbitraryVariable, isArbitraryValue];\n const scaleAlignPrimaryAxis = () => ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch', 'baseline', 'center-safe', 'end-safe'];\n const scaleAlignSecondaryAxis = () => ['start', 'end', 'center', 'stretch', 'center-safe', 'end-safe'];\n const scaleMargin = () => ['auto', ...scaleUnambiguousSpacing()];\n const scaleSizing = () => [isFraction, 'auto', 'full', 'dvw', 'dvh', 'lvw', 'lvh', 'svw', 'svh', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];\n const scaleSizingInline = () => [isFraction, 'screen', 'full', 'dvw', 'lvw', 'svw', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];\n const scaleSizingBlock = () => [isFraction, 'screen', 'full', 'lh', 'dvh', 'lvh', 'svh', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];\n const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue];\n const scaleBgPosition = () => [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition, {\n position: [isArbitraryVariable, isArbitraryValue]\n }];\n const scaleBgRepeat = () => ['no-repeat', {\n repeat: ['', 'x', 'y', 'space', 'round']\n }];\n const scaleBgSize = () => ['auto', 'cover', 'contain', isArbitraryVariableSize, isArbitrarySize, {\n size: [isArbitraryVariable, isArbitraryValue]\n }];\n const scaleGradientStopPosition = () => [isPercent, isArbitraryVariableLength, isArbitraryLength];\n const scaleRadius = () => [\n // Deprecated since Tailwind CSS v4.0.0\n '', 'none', 'full', themeRadius, isArbitraryVariable, isArbitraryValue];\n const scaleBorderWidth = () => ['', isNumber, isArbitraryVariableLength, isArbitraryLength];\n const scaleLineStyle = () => ['solid', 'dashed', 'dotted', 'double'];\n const scaleBlendMode = () => ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'];\n const scaleMaskImagePosition = () => [isNumber, isPercent, isArbitraryVariablePosition, isArbitraryPosition];\n const scaleBlur = () => [\n // Deprecated since Tailwind CSS v4.0.0\n '', 'none', themeBlur, isArbitraryVariable, isArbitraryValue];\n const scaleRotate = () => ['none', isNumber, isArbitraryVariable, isArbitraryValue];\n const scaleScale = () => ['none', isNumber, isArbitraryVariable, isArbitraryValue];\n const scaleSkew = () => [isNumber, isArbitraryVariable, isArbitraryValue];\n const scaleTranslate = () => [isFraction, 'full', ...scaleUnambiguousSpacing()];\n return {\n cacheSize: 500,\n theme: {\n animate: ['spin', 'ping', 'pulse', 'bounce'],\n aspect: ['video'],\n blur: [isTshirtSize],\n breakpoint: [isTshirtSize],\n color: [isAny],\n container: [isTshirtSize],\n 'drop-shadow': [isTshirtSize],\n ease: ['in', 'out', 'in-out'],\n font: [isAnyNonArbitrary],\n 'font-weight': ['thin', 'extralight', 'light', 'normal', 'medium', 'semibold', 'bold', 'extrabold', 'black'],\n 'inset-shadow': [isTshirtSize],\n leading: ['none', 'tight', 'snug', 'normal', 'relaxed', 'loose'],\n perspective: ['dramatic', 'near', 'normal', 'midrange', 'distant', 'none'],\n radius: [isTshirtSize],\n shadow: [isTshirtSize],\n spacing: ['px', isNumber],\n text: [isTshirtSize],\n 'text-shadow': [isTshirtSize],\n tracking: ['tighter', 'tight', 'normal', 'wide', 'wider', 'widest']\n },\n classGroups: {\n // --------------\n // --- Layout ---\n // --------------\n /**\n * Aspect Ratio\n * @see https://tailwindcss.com/docs/aspect-ratio\n */\n aspect: [{\n aspect: ['auto', 'square', isFraction, isArbitraryValue, isArbitraryVariable, themeAspect]\n }],\n /**\n * Container\n * @see https://tailwindcss.com/docs/container\n * @deprecated since Tailwind CSS v4.0.0\n */\n container: ['container'],\n /**\n * Columns\n * @see https://tailwindcss.com/docs/columns\n */\n columns: [{\n columns: [isNumber, isArbitraryValue, isArbitraryVariable, themeContainer]\n }],\n /**\n * Break After\n * @see https://tailwindcss.com/docs/break-after\n */\n 'break-after': [{\n 'break-after': scaleBreak()\n }],\n /**\n * Break Before\n * @see https://tailwindcss.com/docs/break-before\n */\n 'break-before': [{\n 'break-before': scaleBreak()\n }],\n /**\n * Break Inside\n * @see https://tailwindcss.com/docs/break-inside\n */\n 'break-inside': [{\n 'break-inside': ['auto', 'avoid', 'avoid-page', 'avoid-column']\n }],\n /**\n * Box Decoration Break\n * @see https://tailwindcss.com/docs/box-decoration-break\n */\n 'box-decoration': [{\n 'box-decoration': ['slice', 'clone']\n }],\n /**\n * Box Sizing\n * @see https://tailwindcss.com/docs/box-sizing\n */\n box: [{\n box: ['border', 'content']\n }],\n /**\n * Display\n * @see https://tailwindcss.com/docs/display\n */\n display: ['block', 'inline-block', 'inline', 'flex', 'inline-flex', 'table', 'inline-table', 'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row-group', 'table-row', 'flow-root', 'grid', 'inline-grid', 'contents', 'list-item', 'hidden'],\n /**\n * Screen Reader Only\n * @see https://tailwindcss.com/docs/display#screen-reader-only\n */\n sr: ['sr-only', 'not-sr-only'],\n /**\n * Floats\n * @see https://tailwindcss.com/docs/float\n */\n float: [{\n float: ['right', 'left', 'none', 'start', 'end']\n }],\n /**\n * Clear\n * @see https://tailwindcss.com/docs/clear\n */\n clear: [{\n clear: ['left', 'right', 'both', 'none', 'start', 'end']\n }],\n /**\n * Isolation\n * @see https://tailwindcss.com/docs/isolation\n */\n isolation: ['isolate', 'isolation-auto'],\n /**\n * Object Fit\n * @see https://tailwindcss.com/docs/object-fit\n */\n 'object-fit': [{\n object: ['contain', 'cover', 'fill', 'none', 'scale-down']\n }],\n /**\n * Object Position\n * @see https://tailwindcss.com/docs/object-position\n */\n 'object-position': [{\n object: scalePositionWithArbitrary()\n }],\n /**\n * Overflow\n * @see https://tailwindcss.com/docs/overflow\n */\n overflow: [{\n overflow: scaleOverflow()\n }],\n /**\n * Overflow X\n * @see https://tailwindcss.com/docs/overflow\n */\n 'overflow-x': [{\n 'overflow-x': scaleOverflow()\n }],\n /**\n * Overflow Y\n * @see https://tailwindcss.com/docs/overflow\n */\n 'overflow-y': [{\n 'overflow-y': scaleOverflow()\n }],\n /**\n * Overscroll Behavior\n * @see https://tailwindcss.com/docs/overscroll-behavior\n */\n overscroll: [{\n overscroll: scaleOverscroll()\n }],\n /**\n * Overscroll Behavior X\n * @see https://tailwindcss.com/docs/overscroll-behavior\n */\n 'overscroll-x': [{\n 'overscroll-x': scaleOverscroll()\n }],\n /**\n * Overscroll Behavior Y\n * @see https://tailwindcss.com/docs/overscroll-behavior\n */\n 'overscroll-y': [{\n 'overscroll-y': scaleOverscroll()\n }],\n /**\n * Position\n * @see https://tailwindcss.com/docs/position\n */\n position: ['static', 'fixed', 'absolute', 'relative', 'sticky'],\n /**\n * Inset\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n inset: [{\n inset: scaleInset()\n }],\n /**\n * Inset Inline\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n 'inset-x': [{\n 'inset-x': scaleInset()\n }],\n /**\n * Inset Block\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n 'inset-y': [{\n 'inset-y': scaleInset()\n }],\n /**\n * Inset Inline Start\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n * @todo class group will be renamed to `inset-s` in next major release\n */\n start: [{\n 'inset-s': scaleInset(),\n /**\n * @deprecated since Tailwind CSS v4.2.0 in favor of `inset-s-*` utilities.\n * @see https://github.com/tailwindlabs/tailwindcss/pull/19613\n */\n start: scaleInset()\n }],\n /**\n * Inset Inline End\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n * @todo class group will be renamed to `inset-e` in next major release\n */\n end: [{\n 'inset-e': scaleInset(),\n /**\n * @deprecated since Tailwind CSS v4.2.0 in favor of `inset-e-*` utilities.\n * @see https://github.com/tailwindlabs/tailwindcss/pull/19613\n */\n end: scaleInset()\n }],\n /**\n * Inset Block Start\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n 'inset-bs': [{\n 'inset-bs': scaleInset()\n }],\n /**\n * Inset Block End\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n 'inset-be': [{\n 'inset-be': scaleInset()\n }],\n /**\n * Top\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n top: [{\n top: scaleInset()\n }],\n /**\n * Right\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n right: [{\n right: scaleInset()\n }],\n /**\n * Bottom\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n bottom: [{\n bottom: scaleInset()\n }],\n /**\n * Left\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n left: [{\n left: scaleInset()\n }],\n /**\n * Visibility\n * @see https://tailwindcss.com/docs/visibility\n */\n visibility: ['visible', 'invisible', 'collapse'],\n /**\n * Z-Index\n * @see https://tailwindcss.com/docs/z-index\n */\n z: [{\n z: [isInteger, 'auto', isArbitraryVariable, isArbitraryValue]\n }],\n // ------------------------\n // --- Flexbox and Grid ---\n // ------------------------\n /**\n * Flex Basis\n * @see https://tailwindcss.com/docs/flex-basis\n */\n basis: [{\n basis: [isFraction, 'full', 'auto', themeContainer, ...scaleUnambiguousSpacing()]\n }],\n /**\n * Flex Direction\n * @see https://tailwindcss.com/docs/flex-direction\n */\n 'flex-direction': [{\n flex: ['row', 'row-reverse', 'col', 'col-reverse']\n }],\n /**\n * Flex Wrap\n * @see https://tailwindcss.com/docs/flex-wrap\n */\n 'flex-wrap': [{\n flex: ['nowrap', 'wrap', 'wrap-reverse']\n }],\n /**\n * Flex\n * @see https://tailwindcss.com/docs/flex\n */\n flex: [{\n flex: [isNumber, isFraction, 'auto', 'initial', 'none', isArbitraryValue]\n }],\n /**\n * Flex Grow\n * @see https://tailwindcss.com/docs/flex-grow\n */\n grow: [{\n grow: ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Flex Shrink\n * @see https://tailwindcss.com/docs/flex-shrink\n */\n shrink: [{\n shrink: ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Order\n * @see https://tailwindcss.com/docs/order\n */\n order: [{\n order: [isInteger, 'first', 'last', 'none', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Grid Template Columns\n * @see https://tailwindcss.com/docs/grid-template-columns\n */\n 'grid-cols': [{\n 'grid-cols': scaleGridTemplateColsRows()\n }],\n /**\n * Grid Column Start / End\n * @see https://tailwindcss.com/docs/grid-column\n */\n 'col-start-end': [{\n col: scaleGridColRowStartAndEnd()\n }],\n /**\n * Grid Column Start\n * @see https://tailwindcss.com/docs/grid-column\n */\n 'col-start': [{\n 'col-start': scaleGridColRowStartOrEnd()\n }],\n /**\n * Grid Column End\n * @see https://tailwindcss.com/docs/grid-column\n */\n 'col-end': [{\n 'col-end': scaleGridColRowStartOrEnd()\n }],\n /**\n * Grid Template Rows\n * @see https://tailwindcss.com/docs/grid-template-rows\n */\n 'grid-rows': [{\n 'grid-rows': scaleGridTemplateColsRows()\n }],\n /**\n * Grid Row Start / End\n * @see https://tailwindcss.com/docs/grid-row\n */\n 'row-start-end': [{\n row: scaleGridColRowStartAndEnd()\n }],\n /**\n * Grid Row Start\n * @see https://tailwindcss.com/docs/grid-row\n */\n 'row-start': [{\n 'row-start': scaleGridColRowStartOrEnd()\n }],\n /**\n * Grid Row End\n * @see https://tailwindcss.com/docs/grid-row\n */\n 'row-end': [{\n 'row-end': scaleGridColRowStartOrEnd()\n }],\n /**\n * Grid Auto Flow\n * @see https://tailwindcss.com/docs/grid-auto-flow\n */\n 'grid-flow': [{\n 'grid-flow': ['row', 'col', 'dense', 'row-dense', 'col-dense']\n }],\n /**\n * Grid Auto Columns\n * @see https://tailwindcss.com/docs/grid-auto-columns\n */\n 'auto-cols': [{\n 'auto-cols': scaleGridAutoColsRows()\n }],\n /**\n * Grid Auto Rows\n * @see https://tailwindcss.com/docs/grid-auto-rows\n */\n 'auto-rows': [{\n 'auto-rows': scaleGridAutoColsRows()\n }],\n /**\n * Gap\n * @see https://tailwindcss.com/docs/gap\n */\n gap: [{\n gap: scaleUnambiguousSpacing()\n }],\n /**\n * Gap X\n * @see https://tailwindcss.com/docs/gap\n */\n 'gap-x': [{\n 'gap-x': scaleUnambiguousSpacing()\n }],\n /**\n * Gap Y\n * @see https://tailwindcss.com/docs/gap\n */\n 'gap-y': [{\n 'gap-y': scaleUnambiguousSpacing()\n }],\n /**\n * Justify Content\n * @see https://tailwindcss.com/docs/justify-content\n */\n 'justify-content': [{\n justify: [...scaleAlignPrimaryAxis(), 'normal']\n }],\n /**\n * Justify Items\n * @see https://tailwindcss.com/docs/justify-items\n */\n 'justify-items': [{\n 'justify-items': [...scaleAlignSecondaryAxis(), 'normal']\n }],\n /**\n * Justify Self\n * @see https://tailwindcss.com/docs/justify-self\n */\n 'justify-self': [{\n 'justify-self': ['auto', ...scaleAlignSecondaryAxis()]\n }],\n /**\n * Align Content\n * @see https://tailwindcss.com/docs/align-content\n */\n 'align-content': [{\n content: ['normal', ...scaleAlignPrimaryAxis()]\n }],\n /**\n * Align Items\n * @see https://tailwindcss.com/docs/align-items\n */\n 'align-items': [{\n items: [...scaleAlignSecondaryAxis(), {\n baseline: ['', 'last']\n }]\n }],\n /**\n * Align Self\n * @see https://tailwindcss.com/docs/align-self\n */\n 'align-self': [{\n self: ['auto', ...scaleAlignSecondaryAxis(), {\n baseline: ['', 'last']\n }]\n }],\n /**\n * Place Content\n * @see https://tailwindcss.com/docs/place-content\n */\n 'place-content': [{\n 'place-content': scaleAlignPrimaryAxis()\n }],\n /**\n * Place Items\n * @see https://tailwindcss.com/docs/place-items\n */\n 'place-items': [{\n 'place-items': [...scaleAlignSecondaryAxis(), 'baseline']\n }],\n /**\n * Place Self\n * @see https://tailwindcss.com/docs/place-self\n */\n 'place-self': [{\n 'place-self': ['auto', ...scaleAlignSecondaryAxis()]\n }],\n // Spacing\n /**\n * Padding\n * @see https://tailwindcss.com/docs/padding\n */\n p: [{\n p: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Inline\n * @see https://tailwindcss.com/docs/padding\n */\n px: [{\n px: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Block\n * @see https://tailwindcss.com/docs/padding\n */\n py: [{\n py: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Inline Start\n * @see https://tailwindcss.com/docs/padding\n */\n ps: [{\n ps: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Inline End\n * @see https://tailwindcss.com/docs/padding\n */\n pe: [{\n pe: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Block Start\n * @see https://tailwindcss.com/docs/padding\n */\n pbs: [{\n pbs: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Block End\n * @see https://tailwindcss.com/docs/padding\n */\n pbe: [{\n pbe: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Top\n * @see https://tailwindcss.com/docs/padding\n */\n pt: [{\n pt: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Right\n * @see https://tailwindcss.com/docs/padding\n */\n pr: [{\n pr: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Bottom\n * @see https://tailwindcss.com/docs/padding\n */\n pb: [{\n pb: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Left\n * @see https://tailwindcss.com/docs/padding\n */\n pl: [{\n pl: scaleUnambiguousSpacing()\n }],\n /**\n * Margin\n * @see https://tailwindcss.com/docs/margin\n */\n m: [{\n m: scaleMargin()\n }],\n /**\n * Margin Inline\n * @see https://tailwindcss.com/docs/margin\n */\n mx: [{\n mx: scaleMargin()\n }],\n /**\n * Margin Block\n * @see https://tailwindcss.com/docs/margin\n */\n my: [{\n my: scaleMargin()\n }],\n /**\n * Margin Inline Start\n * @see https://tailwindcss.com/docs/margin\n */\n ms: [{\n ms: scaleMargin()\n }],\n /**\n * Margin Inline End\n * @see https://tailwindcss.com/docs/margin\n */\n me: [{\n me: scaleMargin()\n }],\n /**\n * Margin Block Start\n * @see https://tailwindcss.com/docs/margin\n */\n mbs: [{\n mbs: scaleMargin()\n }],\n /**\n * Margin Block End\n * @see https://tailwindcss.com/docs/margin\n */\n mbe: [{\n mbe: scaleMargin()\n }],\n /**\n * Margin Top\n * @see https://tailwindcss.com/docs/margin\n */\n mt: [{\n mt: scaleMargin()\n }],\n /**\n * Margin Right\n * @see https://tailwindcss.com/docs/margin\n */\n mr: [{\n mr: scaleMargin()\n }],\n /**\n * Margin Bottom\n * @see https://tailwindcss.com/docs/margin\n */\n mb: [{\n mb: scaleMargin()\n }],\n /**\n * Margin Left\n * @see https://tailwindcss.com/docs/margin\n */\n ml: [{\n ml: scaleMargin()\n }],\n /**\n * Space Between X\n * @see https://tailwindcss.com/docs/margin#adding-space-between-children\n */\n 'space-x': [{\n 'space-x': scaleUnambiguousSpacing()\n }],\n /**\n * Space Between X Reverse\n * @see https://tailwindcss.com/docs/margin#adding-space-between-children\n */\n 'space-x-reverse': ['space-x-reverse'],\n /**\n * Space Between Y\n * @see https://tailwindcss.com/docs/margin#adding-space-between-children\n */\n 'space-y': [{\n 'space-y': scaleUnambiguousSpacing()\n }],\n /**\n * Space Between Y Reverse\n * @see https://tailwindcss.com/docs/margin#adding-space-between-children\n */\n 'space-y-reverse': ['space-y-reverse'],\n // --------------\n // --- Sizing ---\n // --------------\n /**\n * Size\n * @see https://tailwindcss.com/docs/width#setting-both-width-and-height\n */\n size: [{\n size: scaleSizing()\n }],\n /**\n * Inline Size\n * @see https://tailwindcss.com/docs/width\n */\n 'inline-size': [{\n inline: ['auto', ...scaleSizingInline()]\n }],\n /**\n * Min-Inline Size\n * @see https://tailwindcss.com/docs/min-width\n */\n 'min-inline-size': [{\n 'min-inline': ['auto', ...scaleSizingInline()]\n }],\n /**\n * Max-Inline Size\n * @see https://tailwindcss.com/docs/max-width\n */\n 'max-inline-size': [{\n 'max-inline': ['none', ...scaleSizingInline()]\n }],\n /**\n * Block Size\n * @see https://tailwindcss.com/docs/height\n */\n 'block-size': [{\n block: ['auto', ...scaleSizingBlock()]\n }],\n /**\n * Min-Block Size\n * @see https://tailwindcss.com/docs/min-height\n */\n 'min-block-size': [{\n 'min-block': ['auto', ...scaleSizingBlock()]\n }],\n /**\n * Max-Block Size\n * @see https://tailwindcss.com/docs/max-height\n */\n 'max-block-size': [{\n 'max-block': ['none', ...scaleSizingBlock()]\n }],\n /**\n * Width\n * @see https://tailwindcss.com/docs/width\n */\n w: [{\n w: [themeContainer, 'screen', ...scaleSizing()]\n }],\n /**\n * Min-Width\n * @see https://tailwindcss.com/docs/min-width\n */\n 'min-w': [{\n 'min-w': [themeContainer, 'screen', /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */\n 'none', ...scaleSizing()]\n }],\n /**\n * Max-Width\n * @see https://tailwindcss.com/docs/max-width\n */\n 'max-w': [{\n 'max-w': [themeContainer, 'screen', 'none', /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */\n 'prose', /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */\n {\n screen: [themeBreakpoint]\n }, ...scaleSizing()]\n }],\n /**\n * Height\n * @see https://tailwindcss.com/docs/height\n */\n h: [{\n h: ['screen', 'lh', ...scaleSizing()]\n }],\n /**\n * Min-Height\n * @see https://tailwindcss.com/docs/min-height\n */\n 'min-h': [{\n 'min-h': ['screen', 'lh', 'none', ...scaleSizing()]\n }],\n /**\n * Max-Height\n * @see https://tailwindcss.com/docs/max-height\n */\n 'max-h': [{\n 'max-h': ['screen', 'lh', ...scaleSizing()]\n }],\n // ------------------\n // --- Typography ---\n // ------------------\n /**\n * Font Size\n * @see https://tailwindcss.com/docs/font-size\n */\n 'font-size': [{\n text: ['base', themeText, isArbitraryVariableLength, isArbitraryLength]\n }],\n /**\n * Font Smoothing\n * @see https://tailwindcss.com/docs/font-smoothing\n */\n 'font-smoothing': ['antialiased', 'subpixel-antialiased'],\n /**\n * Font Style\n * @see https://tailwindcss.com/docs/font-style\n */\n 'font-style': ['italic', 'not-italic'],\n /**\n * Font Weight\n * @see https://tailwindcss.com/docs/font-weight\n */\n 'font-weight': [{\n font: [themeFontWeight, isArbitraryVariableWeight, isArbitraryWeight]\n }],\n /**\n * Font Stretch\n * @see https://tailwindcss.com/docs/font-stretch\n */\n 'font-stretch': [{\n 'font-stretch': ['ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded', isPercent, isArbitraryValue]\n }],\n /**\n * Font Family\n * @see https://tailwindcss.com/docs/font-family\n */\n 'font-family': [{\n font: [isArbitraryVariableFamilyName, isArbitraryFamilyName, themeFont]\n }],\n /**\n * Font Feature Settings\n * @see https://tailwindcss.com/docs/font-feature-settings\n */\n 'font-features': [{\n 'font-features': [isArbitraryValue]\n }],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-normal': ['normal-nums'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-ordinal': ['ordinal'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-slashed-zero': ['slashed-zero'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-figure': ['lining-nums', 'oldstyle-nums'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-spacing': ['proportional-nums', 'tabular-nums'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-fraction': ['diagonal-fractions', 'stacked-fractions'],\n /**\n * Letter Spacing\n * @see https://tailwindcss.com/docs/letter-spacing\n */\n tracking: [{\n tracking: [themeTracking, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Line Clamp\n * @see https://tailwindcss.com/docs/line-clamp\n */\n 'line-clamp': [{\n 'line-clamp': [isNumber, 'none', isArbitraryVariable, isArbitraryNumber]\n }],\n /**\n * Line Height\n * @see https://tailwindcss.com/docs/line-height\n */\n leading: [{\n leading: [/** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */\n themeLeading, ...scaleUnambiguousSpacing()]\n }],\n /**\n * List Style Image\n * @see https://tailwindcss.com/docs/list-style-image\n */\n 'list-image': [{\n 'list-image': ['none', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * List Style Position\n * @see https://tailwindcss.com/docs/list-style-position\n */\n 'list-style-position': [{\n list: ['inside', 'outside']\n }],\n /**\n * List Style Type\n * @see https://tailwindcss.com/docs/list-style-type\n */\n 'list-style-type': [{\n list: ['disc', 'decimal', 'none', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Text Alignment\n * @see https://tailwindcss.com/docs/text-align\n */\n 'text-alignment': [{\n text: ['left', 'center', 'right', 'justify', 'start', 'end']\n }],\n /**\n * Placeholder Color\n * @deprecated since Tailwind CSS v3.0.0\n * @see https://v3.tailwindcss.com/docs/placeholder-color\n */\n 'placeholder-color': [{\n placeholder: scaleColor()\n }],\n /**\n * Text Color\n * @see https://tailwindcss.com/docs/text-color\n */\n 'text-color': [{\n text: scaleColor()\n }],\n /**\n * Text Decoration\n * @see https://tailwindcss.com/docs/text-decoration\n */\n 'text-decoration': ['underline', 'overline', 'line-through', 'no-underline'],\n /**\n * Text Decoration Style\n * @see https://tailwindcss.com/docs/text-decoration-style\n */\n 'text-decoration-style': [{\n decoration: [...scaleLineStyle(), 'wavy']\n }],\n /**\n * Text Decoration Thickness\n * @see https://tailwindcss.com/docs/text-decoration-thickness\n */\n 'text-decoration-thickness': [{\n decoration: [isNumber, 'from-font', 'auto', isArbitraryVariable, isArbitraryLength]\n }],\n /**\n * Text Decoration Color\n * @see https://tailwindcss.com/docs/text-decoration-color\n */\n 'text-decoration-color': [{\n decoration: scaleColor()\n }],\n /**\n * Text Underline Offset\n * @see https://tailwindcss.com/docs/text-underline-offset\n */\n 'underline-offset': [{\n 'underline-offset': [isNumber, 'auto', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Text Transform\n * @see https://tailwindcss.com/docs/text-transform\n */\n 'text-transform': ['uppercase', 'lowercase', 'capitalize', 'normal-case'],\n /**\n * Text Overflow\n * @see https://tailwindcss.com/docs/text-overflow\n */\n 'text-overflow': ['truncate', 'text-ellipsis', 'text-clip'],\n /**\n * Text Wrap\n * @see https://tailwindcss.com/docs/text-wrap\n */\n 'text-wrap': [{\n text: ['wrap', 'nowrap', 'balance', 'pretty']\n }],\n /**\n * Text Indent\n * @see https://tailwindcss.com/docs/text-indent\n */\n indent: [{\n indent: scaleUnambiguousSpacing()\n }],\n /**\n * Vertical Alignment\n * @see https://tailwindcss.com/docs/vertical-align\n */\n 'vertical-align': [{\n align: ['baseline', 'top', 'middle', 'bottom', 'text-top', 'text-bottom', 'sub', 'super', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Whitespace\n * @see https://tailwindcss.com/docs/whitespace\n */\n whitespace: [{\n whitespace: ['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces']\n }],\n /**\n * Word Break\n * @see https://tailwindcss.com/docs/word-break\n */\n break: [{\n break: ['normal', 'words', 'all', 'keep']\n }],\n /**\n * Overflow Wrap\n * @see https://tailwindcss.com/docs/overflow-wrap\n */\n wrap: [{\n wrap: ['break-word', 'anywhere', 'normal']\n }],\n /**\n * Hyphens\n * @see https://tailwindcss.com/docs/hyphens\n */\n hyphens: [{\n hyphens: ['none', 'manual', 'auto']\n }],\n /**\n * Content\n * @see https://tailwindcss.com/docs/content\n */\n content: [{\n content: ['none', isArbitraryVariable, isArbitraryValue]\n }],\n // -------------------\n // --- Backgrounds ---\n // -------------------\n /**\n * Background Attachment\n * @see https://tailwindcss.com/docs/background-attachment\n */\n 'bg-attachment': [{\n bg: ['fixed', 'local', 'scroll']\n }],\n /**\n * Background Clip\n * @see https://tailwindcss.com/docs/background-clip\n */\n 'bg-clip': [{\n 'bg-clip': ['border', 'padding', 'content', 'text']\n }],\n /**\n * Background Origin\n * @see https://tailwindcss.com/docs/background-origin\n */\n 'bg-origin': [{\n 'bg-origin': ['border', 'padding', 'content']\n }],\n /**\n * Background Position\n * @see https://tailwindcss.com/docs/background-position\n */\n 'bg-position': [{\n bg: scaleBgPosition()\n }],\n /**\n * Background Repeat\n * @see https://tailwindcss.com/docs/background-repeat\n */\n 'bg-repeat': [{\n bg: scaleBgRepeat()\n }],\n /**\n * Background Size\n * @see https://tailwindcss.com/docs/background-size\n */\n 'bg-size': [{\n bg: scaleBgSize()\n }],\n /**\n * Background Image\n * @see https://tailwindcss.com/docs/background-image\n */\n 'bg-image': [{\n bg: ['none', {\n linear: [{\n to: ['t', 'tr', 'r', 'br', 'b', 'bl', 'l', 'tl']\n }, isInteger, isArbitraryVariable, isArbitraryValue],\n radial: ['', isArbitraryVariable, isArbitraryValue],\n conic: [isInteger, isArbitraryVariable, isArbitraryValue]\n }, isArbitraryVariableImage, isArbitraryImage]\n }],\n /**\n * Background Color\n * @see https://tailwindcss.com/docs/background-color\n */\n 'bg-color': [{\n bg: scaleColor()\n }],\n /**\n * Gradient Color Stops From Position\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-from-pos': [{\n from: scaleGradientStopPosition()\n }],\n /**\n * Gradient Color Stops Via Position\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-via-pos': [{\n via: scaleGradientStopPosition()\n }],\n /**\n * Gradient Color Stops To Position\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-to-pos': [{\n to: scaleGradientStopPosition()\n }],\n /**\n * Gradient Color Stops From\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-from': [{\n from: scaleColor()\n }],\n /**\n * Gradient Color Stops Via\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-via': [{\n via: scaleColor()\n }],\n /**\n * Gradient Color Stops To\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-to': [{\n to: scaleColor()\n }],\n // ---------------\n // --- Borders ---\n // ---------------\n /**\n * Border Radius\n * @see https://tailwindcss.com/docs/border-radius\n */\n rounded: [{\n rounded: scaleRadius()\n }],\n /**\n * Border Radius Start\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-s': [{\n 'rounded-s': scaleRadius()\n }],\n /**\n * Border Radius End\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-e': [{\n 'rounded-e': scaleRadius()\n }],\n /**\n * Border Radius Top\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-t': [{\n 'rounded-t': scaleRadius()\n }],\n /**\n * Border Radius Right\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-r': [{\n 'rounded-r': scaleRadius()\n }],\n /**\n * Border Radius Bottom\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-b': [{\n 'rounded-b': scaleRadius()\n }],\n /**\n * Border Radius Left\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-l': [{\n 'rounded-l': scaleRadius()\n }],\n /**\n * Border Radius Start Start\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-ss': [{\n 'rounded-ss': scaleRadius()\n }],\n /**\n * Border Radius Start End\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-se': [{\n 'rounded-se': scaleRadius()\n }],\n /**\n * Border Radius End End\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-ee': [{\n 'rounded-ee': scaleRadius()\n }],\n /**\n * Border Radius End Start\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-es': [{\n 'rounded-es': scaleRadius()\n }],\n /**\n * Border Radius Top Left\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-tl': [{\n 'rounded-tl': scaleRadius()\n }],\n /**\n * Border Radius Top Right\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-tr': [{\n 'rounded-tr': scaleRadius()\n }],\n /**\n * Border Radius Bottom Right\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-br': [{\n 'rounded-br': scaleRadius()\n }],\n /**\n * Border Radius Bottom Left\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-bl': [{\n 'rounded-bl': scaleRadius()\n }],\n /**\n * Border Width\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w': [{\n border: scaleBorderWidth()\n }],\n /**\n * Border Width Inline\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-x': [{\n 'border-x': scaleBorderWidth()\n }],\n /**\n * Border Width Block\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-y': [{\n 'border-y': scaleBorderWidth()\n }],\n /**\n * Border Width Inline Start\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-s': [{\n 'border-s': scaleBorderWidth()\n }],\n /**\n * Border Width Inline End\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-e': [{\n 'border-e': scaleBorderWidth()\n }],\n /**\n * Border Width Block Start\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-bs': [{\n 'border-bs': scaleBorderWidth()\n }],\n /**\n * Border Width Block End\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-be': [{\n 'border-be': scaleBorderWidth()\n }],\n /**\n * Border Width Top\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-t': [{\n 'border-t': scaleBorderWidth()\n }],\n /**\n * Border Width Right\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-r': [{\n 'border-r': scaleBorderWidth()\n }],\n /**\n * Border Width Bottom\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-b': [{\n 'border-b': scaleBorderWidth()\n }],\n /**\n * Border Width Left\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-l': [{\n 'border-l': scaleBorderWidth()\n }],\n /**\n * Divide Width X\n * @see https://tailwindcss.com/docs/border-width#between-children\n */\n 'divide-x': [{\n 'divide-x': scaleBorderWidth()\n }],\n /**\n * Divide Width X Reverse\n * @see https://tailwindcss.com/docs/border-width#between-children\n */\n 'divide-x-reverse': ['divide-x-reverse'],\n /**\n * Divide Width Y\n * @see https://tailwindcss.com/docs/border-width#between-children\n */\n 'divide-y': [{\n 'divide-y': scaleBorderWidth()\n }],\n /**\n * Divide Width Y Reverse\n * @see https://tailwindcss.com/docs/border-width#between-children\n */\n 'divide-y-reverse': ['divide-y-reverse'],\n /**\n * Border Style\n * @see https://tailwindcss.com/docs/border-style\n */\n 'border-style': [{\n border: [...scaleLineStyle(), 'hidden', 'none']\n }],\n /**\n * Divide Style\n * @see https://tailwindcss.com/docs/border-style#setting-the-divider-style\n */\n 'divide-style': [{\n divide: [...scaleLineStyle(), 'hidden', 'none']\n }],\n /**\n * Border Color\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color': [{\n border: scaleColor()\n }],\n /**\n * Border Color Inline\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-x': [{\n 'border-x': scaleColor()\n }],\n /**\n * Border Color Block\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-y': [{\n 'border-y': scaleColor()\n }],\n /**\n * Border Color Inline Start\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-s': [{\n 'border-s': scaleColor()\n }],\n /**\n * Border Color Inline End\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-e': [{\n 'border-e': scaleColor()\n }],\n /**\n * Border Color Block Start\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-bs': [{\n 'border-bs': scaleColor()\n }],\n /**\n * Border Color Block End\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-be': [{\n 'border-be': scaleColor()\n }],\n /**\n * Border Color Top\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-t': [{\n 'border-t': scaleColor()\n }],\n /**\n * Border Color Right\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-r': [{\n 'border-r': scaleColor()\n }],\n /**\n * Border Color Bottom\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-b': [{\n 'border-b': scaleColor()\n }],\n /**\n * Border Color Left\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-l': [{\n 'border-l': scaleColor()\n }],\n /**\n * Divide Color\n * @see https://tailwindcss.com/docs/divide-color\n */\n 'divide-color': [{\n divide: scaleColor()\n }],\n /**\n * Outline Style\n * @see https://tailwindcss.com/docs/outline-style\n */\n 'outline-style': [{\n outline: [...scaleLineStyle(), 'none', 'hidden']\n }],\n /**\n * Outline Offset\n * @see https://tailwindcss.com/docs/outline-offset\n */\n 'outline-offset': [{\n 'outline-offset': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Outline Width\n * @see https://tailwindcss.com/docs/outline-width\n */\n 'outline-w': [{\n outline: ['', isNumber, isArbitraryVariableLength, isArbitraryLength]\n }],\n /**\n * Outline Color\n * @see https://tailwindcss.com/docs/outline-color\n */\n 'outline-color': [{\n outline: scaleColor()\n }],\n // ---------------\n // --- Effects ---\n // ---------------\n /**\n * Box Shadow\n * @see https://tailwindcss.com/docs/box-shadow\n */\n shadow: [{\n shadow: [\n // Deprecated since Tailwind CSS v4.0.0\n '', 'none', themeShadow, isArbitraryVariableShadow, isArbitraryShadow]\n }],\n /**\n * Box Shadow Color\n * @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color\n */\n 'shadow-color': [{\n shadow: scaleColor()\n }],\n /**\n * Inset Box Shadow\n * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow\n */\n 'inset-shadow': [{\n 'inset-shadow': ['none', themeInsetShadow, isArbitraryVariableShadow, isArbitraryShadow]\n }],\n /**\n * Inset Box Shadow Color\n * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color\n */\n 'inset-shadow-color': [{\n 'inset-shadow': scaleColor()\n }],\n /**\n * Ring Width\n * @see https://tailwindcss.com/docs/box-shadow#adding-a-ring\n */\n 'ring-w': [{\n ring: scaleBorderWidth()\n }],\n /**\n * Ring Width Inset\n * @see https://v3.tailwindcss.com/docs/ring-width#inset-rings\n * @deprecated since Tailwind CSS v4.0.0\n * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158\n */\n 'ring-w-inset': ['ring-inset'],\n /**\n * Ring Color\n * @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color\n */\n 'ring-color': [{\n ring: scaleColor()\n }],\n /**\n * Ring Offset Width\n * @see https://v3.tailwindcss.com/docs/ring-offset-width\n * @deprecated since Tailwind CSS v4.0.0\n * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158\n */\n 'ring-offset-w': [{\n 'ring-offset': [isNumber, isArbitraryLength]\n }],\n /**\n * Ring Offset Color\n * @see https://v3.tailwindcss.com/docs/ring-offset-color\n * @deprecated since Tailwind CSS v4.0.0\n * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158\n */\n 'ring-offset-color': [{\n 'ring-offset': scaleColor()\n }],\n /**\n * Inset Ring Width\n * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring\n */\n 'inset-ring-w': [{\n 'inset-ring': scaleBorderWidth()\n }],\n /**\n * Inset Ring Color\n * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color\n */\n 'inset-ring-color': [{\n 'inset-ring': scaleColor()\n }],\n /**\n * Text Shadow\n * @see https://tailwindcss.com/docs/text-shadow\n */\n 'text-shadow': [{\n 'text-shadow': ['none', themeTextShadow, isArbitraryVariableShadow, isArbitraryShadow]\n }],\n /**\n * Text Shadow Color\n * @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color\n */\n 'text-shadow-color': [{\n 'text-shadow': scaleColor()\n }],\n /**\n * Opacity\n * @see https://tailwindcss.com/docs/opacity\n */\n opacity: [{\n opacity: [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Mix Blend Mode\n * @see https://tailwindcss.com/docs/mix-blend-mode\n */\n 'mix-blend': [{\n 'mix-blend': [...scaleBlendMode(), 'plus-darker', 'plus-lighter']\n }],\n /**\n * Background Blend Mode\n * @see https://tailwindcss.com/docs/background-blend-mode\n */\n 'bg-blend': [{\n 'bg-blend': scaleBlendMode()\n }],\n /**\n * Mask Clip\n * @see https://tailwindcss.com/docs/mask-clip\n */\n 'mask-clip': [{\n 'mask-clip': ['border', 'padding', 'content', 'fill', 'stroke', 'view']\n }, 'mask-no-clip'],\n /**\n * Mask Composite\n * @see https://tailwindcss.com/docs/mask-composite\n */\n 'mask-composite': [{\n mask: ['add', 'subtract', 'intersect', 'exclude']\n }],\n /**\n * Mask Image\n * @see https://tailwindcss.com/docs/mask-image\n */\n 'mask-image-linear-pos': [{\n 'mask-linear': [isNumber]\n }],\n 'mask-image-linear-from-pos': [{\n 'mask-linear-from': scaleMaskImagePosition()\n }],\n 'mask-image-linear-to-pos': [{\n 'mask-linear-to': scaleMaskImagePosition()\n }],\n 'mask-image-linear-from-color': [{\n 'mask-linear-from': scaleColor()\n }],\n 'mask-image-linear-to-color': [{\n 'mask-linear-to': scaleColor()\n }],\n 'mask-image-t-from-pos': [{\n 'mask-t-from': scaleMaskImagePosition()\n }],\n 'mask-image-t-to-pos': [{\n 'mask-t-to': scaleMaskImagePosition()\n }],\n 'mask-image-t-from-color': [{\n 'mask-t-from': scaleColor()\n }],\n 'mask-image-t-to-color': [{\n 'mask-t-to': scaleColor()\n }],\n 'mask-image-r-from-pos': [{\n 'mask-r-from': scaleMaskImagePosition()\n }],\n 'mask-image-r-to-pos': [{\n 'mask-r-to': scaleMaskImagePosition()\n }],\n 'mask-image-r-from-color': [{\n 'mask-r-from': scaleColor()\n }],\n 'mask-image-r-to-color': [{\n 'mask-r-to': scaleColor()\n }],\n 'mask-image-b-from-pos': [{\n 'mask-b-from': scaleMaskImagePosition()\n }],\n 'mask-image-b-to-pos': [{\n 'mask-b-to': scaleMaskImagePosition()\n }],\n 'mask-image-b-from-color': [{\n 'mask-b-from': scaleColor()\n }],\n 'mask-image-b-to-color': [{\n 'mask-b-to': scaleColor()\n }],\n 'mask-image-l-from-pos': [{\n 'mask-l-from': scaleMaskImagePosition()\n }],\n 'mask-image-l-to-pos': [{\n 'mask-l-to': scaleMaskImagePosition()\n }],\n 'mask-image-l-from-color': [{\n 'mask-l-from': scaleColor()\n }],\n 'mask-image-l-to-color': [{\n 'mask-l-to': scaleColor()\n }],\n 'mask-image-x-from-pos': [{\n 'mask-x-from': scaleMaskImagePosition()\n }],\n 'mask-image-x-to-pos': [{\n 'mask-x-to': scaleMaskImagePosition()\n }],\n 'mask-image-x-from-color': [{\n 'mask-x-from': scaleColor()\n }],\n 'mask-image-x-to-color': [{\n 'mask-x-to': scaleColor()\n }],\n 'mask-image-y-from-pos': [{\n 'mask-y-from': scaleMaskImagePosition()\n }],\n 'mask-image-y-to-pos': [{\n 'mask-y-to': scaleMaskImagePosition()\n }],\n 'mask-image-y-from-color': [{\n 'mask-y-from': scaleColor()\n }],\n 'mask-image-y-to-color': [{\n 'mask-y-to': scaleColor()\n }],\n 'mask-image-radial': [{\n 'mask-radial': [isArbitraryVariable, isArbitraryValue]\n }],\n 'mask-image-radial-from-pos': [{\n 'mask-radial-from': scaleMaskImagePosition()\n }],\n 'mask-image-radial-to-pos': [{\n 'mask-radial-to': scaleMaskImagePosition()\n }],\n 'mask-image-radial-from-color': [{\n 'mask-radial-from': scaleColor()\n }],\n 'mask-image-radial-to-color': [{\n 'mask-radial-to': scaleColor()\n }],\n 'mask-image-radial-shape': [{\n 'mask-radial': ['circle', 'ellipse']\n }],\n 'mask-image-radial-size': [{\n 'mask-radial': [{\n closest: ['side', 'corner'],\n farthest: ['side', 'corner']\n }]\n }],\n 'mask-image-radial-pos': [{\n 'mask-radial-at': scalePosition()\n }],\n 'mask-image-conic-pos': [{\n 'mask-conic': [isNumber]\n }],\n 'mask-image-conic-from-pos': [{\n 'mask-conic-from': scaleMaskImagePosition()\n }],\n 'mask-image-conic-to-pos': [{\n 'mask-conic-to': scaleMaskImagePosition()\n }],\n 'mask-image-conic-from-color': [{\n 'mask-conic-from': scaleColor()\n }],\n 'mask-image-conic-to-color': [{\n 'mask-conic-to': scaleColor()\n }],\n /**\n * Mask Mode\n * @see https://tailwindcss.com/docs/mask-mode\n */\n 'mask-mode': [{\n mask: ['alpha', 'luminance', 'match']\n }],\n /**\n * Mask Origin\n * @see https://tailwindcss.com/docs/mask-origin\n */\n 'mask-origin': [{\n 'mask-origin': ['border', 'padding', 'content', 'fill', 'stroke', 'view']\n }],\n /**\n * Mask Position\n * @see https://tailwindcss.com/docs/mask-position\n */\n 'mask-position': [{\n mask: scaleBgPosition()\n }],\n /**\n * Mask Repeat\n * @see https://tailwindcss.com/docs/mask-repeat\n */\n 'mask-repeat': [{\n mask: scaleBgRepeat()\n }],\n /**\n * Mask Size\n * @see https://tailwindcss.com/docs/mask-size\n */\n 'mask-size': [{\n mask: scaleBgSize()\n }],\n /**\n * Mask Type\n * @see https://tailwindcss.com/docs/mask-type\n */\n 'mask-type': [{\n 'mask-type': ['alpha', 'luminance']\n }],\n /**\n * Mask Image\n * @see https://tailwindcss.com/docs/mask-image\n */\n 'mask-image': [{\n mask: ['none', isArbitraryVariable, isArbitraryValue]\n }],\n // ---------------\n // --- Filters ---\n // ---------------\n /**\n * Filter\n * @see https://tailwindcss.com/docs/filter\n */\n filter: [{\n filter: [\n // Deprecated since Tailwind CSS v3.0.0\n '', 'none', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Blur\n * @see https://tailwindcss.com/docs/blur\n */\n blur: [{\n blur: scaleBlur()\n }],\n /**\n * Brightness\n * @see https://tailwindcss.com/docs/brightness\n */\n brightness: [{\n brightness: [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Contrast\n * @see https://tailwindcss.com/docs/contrast\n */\n contrast: [{\n contrast: [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Drop Shadow\n * @see https://tailwindcss.com/docs/drop-shadow\n */\n 'drop-shadow': [{\n 'drop-shadow': [\n // Deprecated since Tailwind CSS v4.0.0\n '', 'none', themeDropShadow, isArbitraryVariableShadow, isArbitraryShadow]\n }],\n /**\n * Drop Shadow Color\n * @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color\n */\n 'drop-shadow-color': [{\n 'drop-shadow': scaleColor()\n }],\n /**\n * Grayscale\n * @see https://tailwindcss.com/docs/grayscale\n */\n grayscale: [{\n grayscale: ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Hue Rotate\n * @see https://tailwindcss.com/docs/hue-rotate\n */\n 'hue-rotate': [{\n 'hue-rotate': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Invert\n * @see https://tailwindcss.com/docs/invert\n */\n invert: [{\n invert: ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Saturate\n * @see https://tailwindcss.com/docs/saturate\n */\n saturate: [{\n saturate: [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Sepia\n * @see https://tailwindcss.com/docs/sepia\n */\n sepia: [{\n sepia: ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Filter\n * @see https://tailwindcss.com/docs/backdrop-filter\n */\n 'backdrop-filter': [{\n 'backdrop-filter': [\n // Deprecated since Tailwind CSS v3.0.0\n '', 'none', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Blur\n * @see https://tailwindcss.com/docs/backdrop-blur\n */\n 'backdrop-blur': [{\n 'backdrop-blur': scaleBlur()\n }],\n /**\n * Backdrop Brightness\n * @see https://tailwindcss.com/docs/backdrop-brightness\n */\n 'backdrop-brightness': [{\n 'backdrop-brightness': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Contrast\n * @see https://tailwindcss.com/docs/backdrop-contrast\n */\n 'backdrop-contrast': [{\n 'backdrop-contrast': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Grayscale\n * @see https://tailwindcss.com/docs/backdrop-grayscale\n */\n 'backdrop-grayscale': [{\n 'backdrop-grayscale': ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Hue Rotate\n * @see https://tailwindcss.com/docs/backdrop-hue-rotate\n */\n 'backdrop-hue-rotate': [{\n 'backdrop-hue-rotate': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Invert\n * @see https://tailwindcss.com/docs/backdrop-invert\n */\n 'backdrop-invert': [{\n 'backdrop-invert': ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Opacity\n * @see https://tailwindcss.com/docs/backdrop-opacity\n */\n 'backdrop-opacity': [{\n 'backdrop-opacity': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Saturate\n * @see https://tailwindcss.com/docs/backdrop-saturate\n */\n 'backdrop-saturate': [{\n 'backdrop-saturate': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Sepia\n * @see https://tailwindcss.com/docs/backdrop-sepia\n */\n 'backdrop-sepia': [{\n 'backdrop-sepia': ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n // --------------\n // --- Tables ---\n // --------------\n /**\n * Border Collapse\n * @see https://tailwindcss.com/docs/border-collapse\n */\n 'border-collapse': [{\n border: ['collapse', 'separate']\n }],\n /**\n * Border Spacing\n * @see https://tailwindcss.com/docs/border-spacing\n */\n 'border-spacing': [{\n 'border-spacing': scaleUnambiguousSpacing()\n }],\n /**\n * Border Spacing X\n * @see https://tailwindcss.com/docs/border-spacing\n */\n 'border-spacing-x': [{\n 'border-spacing-x': scaleUnambiguousSpacing()\n }],\n /**\n * Border Spacing Y\n * @see https://tailwindcss.com/docs/border-spacing\n */\n 'border-spacing-y': [{\n 'border-spacing-y': scaleUnambiguousSpacing()\n }],\n /**\n * Table Layout\n * @see https://tailwindcss.com/docs/table-layout\n */\n 'table-layout': [{\n table: ['auto', 'fixed']\n }],\n /**\n * Caption Side\n * @see https://tailwindcss.com/docs/caption-side\n */\n caption: [{\n caption: ['top', 'bottom']\n }],\n // ---------------------------------\n // --- Transitions and Animation ---\n // ---------------------------------\n /**\n * Transition Property\n * @see https://tailwindcss.com/docs/transition-property\n */\n transition: [{\n transition: ['', 'all', 'colors', 'opacity', 'shadow', 'transform', 'none', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Transition Behavior\n * @see https://tailwindcss.com/docs/transition-behavior\n */\n 'transition-behavior': [{\n transition: ['normal', 'discrete']\n }],\n /**\n * Transition Duration\n * @see https://tailwindcss.com/docs/transition-duration\n */\n duration: [{\n duration: [isNumber, 'initial', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Transition Timing Function\n * @see https://tailwindcss.com/docs/transition-timing-function\n */\n ease: [{\n ease: ['linear', 'initial', themeEase, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Transition Delay\n * @see https://tailwindcss.com/docs/transition-delay\n */\n delay: [{\n delay: [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Animation\n * @see https://tailwindcss.com/docs/animation\n */\n animate: [{\n animate: ['none', themeAnimate, isArbitraryVariable, isArbitraryValue]\n }],\n // ------------------\n // --- Transforms ---\n // ------------------\n /**\n * Backface Visibility\n * @see https://tailwindcss.com/docs/backface-visibility\n */\n backface: [{\n backface: ['hidden', 'visible']\n }],\n /**\n * Perspective\n * @see https://tailwindcss.com/docs/perspective\n */\n perspective: [{\n perspective: [themePerspective, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Perspective Origin\n * @see https://tailwindcss.com/docs/perspective-origin\n */\n 'perspective-origin': [{\n 'perspective-origin': scalePositionWithArbitrary()\n }],\n /**\n * Rotate\n * @see https://tailwindcss.com/docs/rotate\n */\n rotate: [{\n rotate: scaleRotate()\n }],\n /**\n * Rotate X\n * @see https://tailwindcss.com/docs/rotate\n */\n 'rotate-x': [{\n 'rotate-x': scaleRotate()\n }],\n /**\n * Rotate Y\n * @see https://tailwindcss.com/docs/rotate\n */\n 'rotate-y': [{\n 'rotate-y': scaleRotate()\n }],\n /**\n * Rotate Z\n * @see https://tailwindcss.com/docs/rotate\n */\n 'rotate-z': [{\n 'rotate-z': scaleRotate()\n }],\n /**\n * Scale\n * @see https://tailwindcss.com/docs/scale\n */\n scale: [{\n scale: scaleScale()\n }],\n /**\n * Scale X\n * @see https://tailwindcss.com/docs/scale\n */\n 'scale-x': [{\n 'scale-x': scaleScale()\n }],\n /**\n * Scale Y\n * @see https://tailwindcss.com/docs/scale\n */\n 'scale-y': [{\n 'scale-y': scaleScale()\n }],\n /**\n * Scale Z\n * @see https://tailwindcss.com/docs/scale\n */\n 'scale-z': [{\n 'scale-z': scaleScale()\n }],\n /**\n * Scale 3D\n * @see https://tailwindcss.com/docs/scale\n */\n 'scale-3d': ['scale-3d'],\n /**\n * Skew\n * @see https://tailwindcss.com/docs/skew\n */\n skew: [{\n skew: scaleSkew()\n }],\n /**\n * Skew X\n * @see https://tailwindcss.com/docs/skew\n */\n 'skew-x': [{\n 'skew-x': scaleSkew()\n }],\n /**\n * Skew Y\n * @see https://tailwindcss.com/docs/skew\n */\n 'skew-y': [{\n 'skew-y': scaleSkew()\n }],\n /**\n * Transform\n * @see https://tailwindcss.com/docs/transform\n */\n transform: [{\n transform: [isArbitraryVariable, isArbitraryValue, '', 'none', 'gpu', 'cpu']\n }],\n /**\n * Transform Origin\n * @see https://tailwindcss.com/docs/transform-origin\n */\n 'transform-origin': [{\n origin: scalePositionWithArbitrary()\n }],\n /**\n * Transform Style\n * @see https://tailwindcss.com/docs/transform-style\n */\n 'transform-style': [{\n transform: ['3d', 'flat']\n }],\n /**\n * Translate\n * @see https://tailwindcss.com/docs/translate\n */\n translate: [{\n translate: scaleTranslate()\n }],\n /**\n * Translate X\n * @see https://tailwindcss.com/docs/translate\n */\n 'translate-x': [{\n 'translate-x': scaleTranslate()\n }],\n /**\n * Translate Y\n * @see https://tailwindcss.com/docs/translate\n */\n 'translate-y': [{\n 'translate-y': scaleTranslate()\n }],\n /**\n * Translate Z\n * @see https://tailwindcss.com/docs/translate\n */\n 'translate-z': [{\n 'translate-z': scaleTranslate()\n }],\n /**\n * Translate None\n * @see https://tailwindcss.com/docs/translate\n */\n 'translate-none': ['translate-none'],\n // ---------------------\n // --- Interactivity ---\n // ---------------------\n /**\n * Accent Color\n * @see https://tailwindcss.com/docs/accent-color\n */\n accent: [{\n accent: scaleColor()\n }],\n /**\n * Appearance\n * @see https://tailwindcss.com/docs/appearance\n */\n appearance: [{\n appearance: ['none', 'auto']\n }],\n /**\n * Caret Color\n * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities\n */\n 'caret-color': [{\n caret: scaleColor()\n }],\n /**\n * Color Scheme\n * @see https://tailwindcss.com/docs/color-scheme\n */\n 'color-scheme': [{\n scheme: ['normal', 'dark', 'light', 'light-dark', 'only-dark', 'only-light']\n }],\n /**\n * Cursor\n * @see https://tailwindcss.com/docs/cursor\n */\n cursor: [{\n cursor: ['auto', 'default', 'pointer', 'wait', 'text', 'move', 'help', 'not-allowed', 'none', 'context-menu', 'progress', 'cell', 'crosshair', 'vertical-text', 'alias', 'copy', 'no-drop', 'grab', 'grabbing', 'all-scroll', 'col-resize', 'row-resize', 'n-resize', 'e-resize', 's-resize', 'w-resize', 'ne-resize', 'nw-resize', 'se-resize', 'sw-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'zoom-in', 'zoom-out', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Field Sizing\n * @see https://tailwindcss.com/docs/field-sizing\n */\n 'field-sizing': [{\n 'field-sizing': ['fixed', 'content']\n }],\n /**\n * Pointer Events\n * @see https://tailwindcss.com/docs/pointer-events\n */\n 'pointer-events': [{\n 'pointer-events': ['auto', 'none']\n }],\n /**\n * Resize\n * @see https://tailwindcss.com/docs/resize\n */\n resize: [{\n resize: ['none', '', 'y', 'x']\n }],\n /**\n * Scroll Behavior\n * @see https://tailwindcss.com/docs/scroll-behavior\n */\n 'scroll-behavior': [{\n scroll: ['auto', 'smooth']\n }],\n /**\n * Scroll Margin\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-m': [{\n 'scroll-m': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Inline\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mx': [{\n 'scroll-mx': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Block\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-my': [{\n 'scroll-my': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Inline Start\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-ms': [{\n 'scroll-ms': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Inline End\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-me': [{\n 'scroll-me': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Block Start\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mbs': [{\n 'scroll-mbs': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Block End\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mbe': [{\n 'scroll-mbe': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Top\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mt': [{\n 'scroll-mt': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Right\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mr': [{\n 'scroll-mr': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Bottom\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mb': [{\n 'scroll-mb': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Left\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-ml': [{\n 'scroll-ml': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-p': [{\n 'scroll-p': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Inline\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-px': [{\n 'scroll-px': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Block\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-py': [{\n 'scroll-py': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Inline Start\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-ps': [{\n 'scroll-ps': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Inline End\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pe': [{\n 'scroll-pe': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Block Start\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pbs': [{\n 'scroll-pbs': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Block End\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pbe': [{\n 'scroll-pbe': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Top\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pt': [{\n 'scroll-pt': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Right\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pr': [{\n 'scroll-pr': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Bottom\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pb': [{\n 'scroll-pb': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Left\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pl': [{\n 'scroll-pl': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Snap Align\n * @see https://tailwindcss.com/docs/scroll-snap-align\n */\n 'snap-align': [{\n snap: ['start', 'end', 'center', 'align-none']\n }],\n /**\n * Scroll Snap Stop\n * @see https://tailwindcss.com/docs/scroll-snap-stop\n */\n 'snap-stop': [{\n snap: ['normal', 'always']\n }],\n /**\n * Scroll Snap Type\n * @see https://tailwindcss.com/docs/scroll-snap-type\n */\n 'snap-type': [{\n snap: ['none', 'x', 'y', 'both']\n }],\n /**\n * Scroll Snap Type Strictness\n * @see https://tailwindcss.com/docs/scroll-snap-type\n */\n 'snap-strictness': [{\n snap: ['mandatory', 'proximity']\n }],\n /**\n * Touch Action\n * @see https://tailwindcss.com/docs/touch-action\n */\n touch: [{\n touch: ['auto', 'none', 'manipulation']\n }],\n /**\n * Touch Action X\n * @see https://tailwindcss.com/docs/touch-action\n */\n 'touch-x': [{\n 'touch-pan': ['x', 'left', 'right']\n }],\n /**\n * Touch Action Y\n * @see https://tailwindcss.com/docs/touch-action\n */\n 'touch-y': [{\n 'touch-pan': ['y', 'up', 'down']\n }],\n /**\n * Touch Action Pinch Zoom\n * @see https://tailwindcss.com/docs/touch-action\n */\n 'touch-pz': ['touch-pinch-zoom'],\n /**\n * User Select\n * @see https://tailwindcss.com/docs/user-select\n */\n select: [{\n select: ['none', 'text', 'all', 'auto']\n }],\n /**\n * Will Change\n * @see https://tailwindcss.com/docs/will-change\n */\n 'will-change': [{\n 'will-change': ['auto', 'scroll', 'contents', 'transform', isArbitraryVariable, isArbitraryValue]\n }],\n // -----------\n // --- SVG ---\n // -----------\n /**\n * Fill\n * @see https://tailwindcss.com/docs/fill\n */\n fill: [{\n fill: ['none', ...scaleColor()]\n }],\n /**\n * Stroke Width\n * @see https://tailwindcss.com/docs/stroke-width\n */\n 'stroke-w': [{\n stroke: [isNumber, isArbitraryVariableLength, isArbitraryLength, isArbitraryNumber]\n }],\n /**\n * Stroke\n * @see https://tailwindcss.com/docs/stroke\n */\n stroke: [{\n stroke: ['none', ...scaleColor()]\n }],\n // ---------------------\n // --- Accessibility ---\n // ---------------------\n /**\n * Forced Color Adjust\n * @see https://tailwindcss.com/docs/forced-color-adjust\n */\n 'forced-color-adjust': [{\n 'forced-color-adjust': ['auto', 'none']\n }]\n },\n conflictingClassGroups: {\n overflow: ['overflow-x', 'overflow-y'],\n overscroll: ['overscroll-x', 'overscroll-y'],\n inset: ['inset-x', 'inset-y', 'inset-bs', 'inset-be', 'start', 'end', 'top', 'right', 'bottom', 'left'],\n 'inset-x': ['right', 'left'],\n 'inset-y': ['top', 'bottom'],\n flex: ['basis', 'grow', 'shrink'],\n gap: ['gap-x', 'gap-y'],\n p: ['px', 'py', 'ps', 'pe', 'pbs', 'pbe', 'pt', 'pr', 'pb', 'pl'],\n px: ['pr', 'pl'],\n py: ['pt', 'pb'],\n m: ['mx', 'my', 'ms', 'me', 'mbs', 'mbe', 'mt', 'mr', 'mb', 'ml'],\n mx: ['mr', 'ml'],\n my: ['mt', 'mb'],\n size: ['w', 'h'],\n 'font-size': ['leading'],\n 'fvn-normal': ['fvn-ordinal', 'fvn-slashed-zero', 'fvn-figure', 'fvn-spacing', 'fvn-fraction'],\n 'fvn-ordinal': ['fvn-normal'],\n 'fvn-slashed-zero': ['fvn-normal'],\n 'fvn-figure': ['fvn-normal'],\n 'fvn-spacing': ['fvn-normal'],\n 'fvn-fraction': ['fvn-normal'],\n 'line-clamp': ['display', 'overflow'],\n rounded: ['rounded-s', 'rounded-e', 'rounded-t', 'rounded-r', 'rounded-b', 'rounded-l', 'rounded-ss', 'rounded-se', 'rounded-ee', 'rounded-es', 'rounded-tl', 'rounded-tr', 'rounded-br', 'rounded-bl'],\n 'rounded-s': ['rounded-ss', 'rounded-es'],\n 'rounded-e': ['rounded-se', 'rounded-ee'],\n 'rounded-t': ['rounded-tl', 'rounded-tr'],\n 'rounded-r': ['rounded-tr', 'rounded-br'],\n 'rounded-b': ['rounded-br', 'rounded-bl'],\n 'rounded-l': ['rounded-tl', 'rounded-bl'],\n 'border-spacing': ['border-spacing-x', 'border-spacing-y'],\n 'border-w': ['border-w-x', 'border-w-y', 'border-w-s', 'border-w-e', 'border-w-bs', 'border-w-be', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'],\n 'border-w-x': ['border-w-r', 'border-w-l'],\n 'border-w-y': ['border-w-t', 'border-w-b'],\n 'border-color': ['border-color-x', 'border-color-y', 'border-color-s', 'border-color-e', 'border-color-bs', 'border-color-be', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'],\n 'border-color-x': ['border-color-r', 'border-color-l'],\n 'border-color-y': ['border-color-t', 'border-color-b'],\n translate: ['translate-x', 'translate-y', 'translate-none'],\n 'translate-none': ['translate', 'translate-x', 'translate-y', 'translate-z'],\n 'scroll-m': ['scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mbs', 'scroll-mbe', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml'],\n 'scroll-mx': ['scroll-mr', 'scroll-ml'],\n 'scroll-my': ['scroll-mt', 'scroll-mb'],\n 'scroll-p': ['scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pbs', 'scroll-pbe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl'],\n 'scroll-px': ['scroll-pr', 'scroll-pl'],\n 'scroll-py': ['scroll-pt', 'scroll-pb'],\n touch: ['touch-x', 'touch-y', 'touch-pz'],\n 'touch-x': ['touch'],\n 'touch-y': ['touch'],\n 'touch-pz': ['touch']\n },\n conflictingClassGroupModifiers: {\n 'font-size': ['leading']\n },\n orderSensitiveModifiers: ['*', '**', 'after', 'backdrop', 'before', 'details-content', 'file', 'first-letter', 'first-line', 'marker', 'placeholder', 'selection']\n };\n};\n\n/**\n * @param baseConfig Config where other config will be merged into. This object will be mutated.\n * @param configExtension Partial config to merge into the `baseConfig`.\n */\nconst mergeConfigs = (baseConfig, {\n cacheSize,\n prefix,\n experimentalParseClassName,\n extend = {},\n override = {}\n}) => {\n overrideProperty(baseConfig, 'cacheSize', cacheSize);\n overrideProperty(baseConfig, 'prefix', prefix);\n overrideProperty(baseConfig, 'experimentalParseClassName', experimentalParseClassName);\n overrideConfigProperties(baseConfig.theme, override.theme);\n overrideConfigProperties(baseConfig.classGroups, override.classGroups);\n overrideConfigProperties(baseConfig.conflictingClassGroups, override.conflictingClassGroups);\n overrideConfigProperties(baseConfig.conflictingClassGroupModifiers, override.conflictingClassGroupModifiers);\n overrideProperty(baseConfig, 'orderSensitiveModifiers', override.orderSensitiveModifiers);\n mergeConfigProperties(baseConfig.theme, extend.theme);\n mergeConfigProperties(baseConfig.classGroups, extend.classGroups);\n mergeConfigProperties(baseConfig.conflictingClassGroups, extend.conflictingClassGroups);\n mergeConfigProperties(baseConfig.conflictingClassGroupModifiers, extend.conflictingClassGroupModifiers);\n mergeArrayProperties(baseConfig, extend, 'orderSensitiveModifiers');\n return baseConfig;\n};\nconst overrideProperty = (baseObject, overrideKey, overrideValue) => {\n if (overrideValue !== undefined) {\n baseObject[overrideKey] = overrideValue;\n }\n};\nconst overrideConfigProperties = (baseObject, overrideObject) => {\n if (overrideObject) {\n for (const key in overrideObject) {\n overrideProperty(baseObject, key, overrideObject[key]);\n }\n }\n};\nconst mergeConfigProperties = (baseObject, mergeObject) => {\n if (mergeObject) {\n for (const key in mergeObject) {\n mergeArrayProperties(baseObject, mergeObject, key);\n }\n }\n};\nconst mergeArrayProperties = (baseObject, mergeObject, key) => {\n const mergeValue = mergeObject[key];\n if (mergeValue !== undefined) {\n baseObject[key] = baseObject[key] ? baseObject[key].concat(mergeValue) : mergeValue;\n }\n};\nconst extendTailwindMerge = (configExtension, ...createConfig) => typeof configExtension === 'function' ? createTailwindMerge(getDefaultConfig, configExtension, ...createConfig) : createTailwindMerge(() => mergeConfigs(getDefaultConfig(), configExtension), ...createConfig);\nconst twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig);\nexport { createTailwindMerge, extendTailwindMerge, fromTheme, getDefaultConfig, mergeConfigs, twJoin, twMerge, validators };\n//# sourceMappingURL=bundle-mjs.mjs.map\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","import * as React from \"react\";\nimport { clsx } from \"clsx\";\n\n/**\n * Composes multiple refs into a single ref callback.\n * Handles function refs, ref objects, null, and undefined.\n */\nfunction composeRefs<T>(\n ...refs: (React.Ref<T> | undefined)[]\n): React.RefCallback<T> {\n return (node: T | null) => {\n for (const ref of refs) {\n if (ref == null) continue;\n if (typeof ref === \"function\") {\n ref(node);\n } else {\n ref.current = node;\n }\n }\n };\n}\n\nfunction isEventHandlerProp(key: string): boolean {\n return (\n key.length > 2 && key.startsWith(\"on\") && key[2] === key[2]?.toUpperCase()\n );\n}\n\nfunction mergeProps(\n slotProps: Record<string, unknown>,\n childProps: Record<string, unknown>,\n): Record<string, unknown> {\n const merged: Record<string, unknown> = { ...slotProps };\n\n for (const key of Object.keys(childProps)) {\n const slotValue = slotProps[key];\n const childValue = childProps[key];\n\n if (key === \"className\") {\n merged[key] = clsx(slotValue as string, childValue as string);\n } else if (key === \"style\") {\n merged[key] = {\n ...(slotValue as React.CSSProperties | undefined),\n ...(childValue as React.CSSProperties | undefined),\n };\n } else if (isEventHandlerProp(key)) {\n if (slotValue != null && childValue != null) {\n const slotHandler = slotValue as (...args: unknown[]) => void;\n const childHandler = childValue as (...args: unknown[]) => void;\n const composed = (...args: unknown[]) => {\n slotHandler(...args);\n childHandler(...args);\n };\n merged[key] = composed;\n } else {\n merged[key] = childValue ?? slotValue;\n }\n } else {\n merged[key] = childValue;\n }\n }\n\n return merged;\n}\n\nconst Slot = React.forwardRef<HTMLElement, React.HTMLAttributes<HTMLElement>>(\n ({ children, ...slotProps }, forwardedRef) => {\n if (!React.isValidElement(children)) {\n if (process.env.NODE_ENV !== \"production\") {\n throw new Error(\n \"Slot requires a single valid React element as its child. \" +\n `Received: ${children === null ? \"null\" : typeof children}`,\n );\n }\n return null;\n }\n\n const childElement = children as React.ReactElement<\n Record<string, unknown> & { ref?: React.Ref<HTMLElement> }\n >;\n\n const childRef = childElement.props.ref;\n const composedRef = composeRefs(forwardedRef, childRef);\n\n const mergedProps = mergeProps(\n slotProps as Record<string, unknown>,\n childElement.props as Record<string, unknown>,\n );\n\n const cloneProps: Record<string, unknown> & React.Attributes = {\n ...mergedProps,\n ref: composedRef,\n };\n\n return React.cloneElement(\n childElement,\n cloneProps as Partial<\n Record<string, unknown> & { ref?: React.Ref<HTMLElement> }\n >,\n );\n },\n);\n\nSlot.displayName = \"Slot\";\n\nexport { Slot, composeRefs };\n","import { useState, useCallback } from \"react\";\n\nfunction useControllableState<T>(\n controlledValue: T | undefined,\n defaultValue: T,\n onChange?: (value: T) => void,\n): [T, (next: T) => void];\nfunction useControllableState<T>(\n controlledValue: T | undefined,\n defaultValue: T | undefined,\n onChange?: (value: T) => void,\n): [T | undefined, (next: T) => void];\nfunction useControllableState<T>(\n controlledValue: T | undefined,\n defaultValue: T | undefined,\n onChange?: (value: T) => void,\n): [T | undefined, (next: T) => void] {\n const [internalValue, setInternalValue] = useState(defaultValue);\n\n const isControlled = controlledValue !== undefined;\n const value = isControlled ? controlledValue : internalValue;\n\n const setValue = useCallback(\n (next: T) => {\n if (!isControlled) {\n setInternalValue(next);\n }\n onChange?.(next);\n },\n [isControlled, onChange],\n );\n\n return [value, setValue];\n}\n\nexport { useControllableState };\n","import { createContext, useContext } from \"react\";\n\ntype HeadingLevel = \"h2\" | \"h3\" | \"h4\";\n\ninterface AccordionContextValue {\n type: \"single\" | \"multiple\";\n collapsible: boolean;\n headingLevel: HeadingLevel;\n isItemOpen: (value: string) => boolean;\n toggleItem: (value: string) => void;\n}\n\nconst AccordionContext = createContext<AccordionContextValue | null>(null);\n\nfunction useAccordionContext(): AccordionContextValue {\n const context = useContext(AccordionContext);\n if (context === null) {\n throw new Error(\n \"Accordion compound components must be used within an <Accordion> parent.\",\n );\n }\n return context;\n}\n\ninterface AccordionItemContextValue {\n value: string;\n disabled: boolean;\n open: boolean;\n}\n\nconst AccordionItemContext = createContext<AccordionItemContextValue | null>(\n null,\n);\n\nfunction useAccordionItemContext(): AccordionItemContextValue {\n const context = useContext(AccordionItemContext);\n if (context === null) {\n throw new Error(\n \"AccordionTrigger and AccordionContent must be used within an <AccordionItem> parent.\",\n );\n }\n return context;\n}\n\nexport {\n AccordionContext,\n useAccordionContext,\n AccordionItemContext,\n useAccordionItemContext,\n};\nexport type { AccordionContextValue, AccordionItemContextValue, HeadingLevel };\n","import * as React from \"react\";\nimport { composeRefs } from \"@nuka/utils/slot\";\nimport { useControllableState } from \"@nuka/hooks/use-controllable-state\";\nimport { AccordionContext } from \"@nuka/components/Accordion/Accordion.context\";\nimport type { HeadingLevel } from \"@nuka/components/Accordion/Accordion.context\";\n\ninterface AccordionSingleProps extends React.HTMLAttributes<HTMLDivElement> {\n type: \"single\";\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n collapsible?: boolean;\n headingLevel?: HeadingLevel;\n}\n\ninterface AccordionMultipleProps extends React.HTMLAttributes<HTMLDivElement> {\n type: \"multiple\";\n value?: string[];\n defaultValue?: string[];\n onValueChange?: (value: string[]) => void;\n collapsible?: never;\n headingLevel?: HeadingLevel;\n}\n\nexport type AccordionProps = AccordionSingleProps | AccordionMultipleProps;\n\nconst TRIGGER_SELECTOR = \"button[data-accordion-trigger]\";\n\nfunction handleKeyboardNavigation(\n e: React.KeyboardEvent<HTMLDivElement>,\n rootRef: React.RefObject<HTMLDivElement | null>,\n) {\n const triggers = rootRef.current?.querySelectorAll(TRIGGER_SELECTOR);\n if (!triggers || triggers.length === 0) return;\n\n const active = document.activeElement;\n const items = Array.from(triggers) as HTMLButtonElement[];\n const currentIndex = items.indexOf(active as HTMLButtonElement);\n if (currentIndex === -1) return;\n\n let nextIndex: number | undefined;\n\n switch (e.key) {\n case \"ArrowDown\":\n nextIndex = (currentIndex + 1) % items.length;\n break;\n case \"ArrowUp\":\n nextIndex = (currentIndex - 1 + items.length) % items.length;\n break;\n case \"Home\":\n nextIndex = 0;\n break;\n case \"End\":\n nextIndex = items.length - 1;\n break;\n default:\n return;\n }\n\n e.preventDefault();\n items[nextIndex]?.focus();\n}\n\nconst Accordion = React.forwardRef<HTMLDivElement, AccordionProps>(\n (props, ref) => {\n const {\n type,\n headingLevel = \"h3\",\n className,\n children,\n onKeyDown,\n ...rest\n } = props;\n\n const rootRef = React.useRef<HTMLDivElement>(null);\n const composedRef = composeRefs(ref, rootRef);\n\n if (type === \"single\") {\n return (\n <AccordionSingle\n {...(rest as Omit<\n AccordionSingleProps,\n \"type\" | \"headingLevel\" | \"className\" | \"children\" | \"onKeyDown\"\n >)}\n headingLevel={headingLevel}\n className={className}\n rootRef={rootRef}\n composedRef={composedRef}\n onKeyDown={onKeyDown}\n >\n {children}\n </AccordionSingle>\n );\n }\n\n return (\n <AccordionMultiple\n {...(rest as Omit<\n AccordionMultipleProps,\n \"type\" | \"headingLevel\" | \"className\" | \"children\" | \"onKeyDown\"\n >)}\n headingLevel={headingLevel}\n className={className}\n rootRef={rootRef}\n composedRef={composedRef}\n onKeyDown={onKeyDown}\n >\n {children}\n </AccordionMultiple>\n );\n },\n);\n\nAccordion.displayName = \"Accordion\";\n\ninterface AccordionInternalProps {\n headingLevel: HeadingLevel;\n className: string | undefined;\n children: React.ReactNode | undefined;\n rootRef: React.RefObject<HTMLDivElement | null>;\n composedRef: (node: HTMLDivElement | null) => void;\n onKeyDown: React.KeyboardEventHandler<HTMLDivElement> | undefined;\n}\n\nfunction AccordionSingle({\n value: controlledValue,\n defaultValue,\n onValueChange,\n collapsible = false,\n headingLevel,\n className,\n children,\n rootRef,\n composedRef,\n onKeyDown,\n ...divProps\n}: Omit<AccordionSingleProps, \"type\"> & AccordionInternalProps) {\n const [value, setValue] = useControllableState(\n controlledValue,\n defaultValue,\n onValueChange as ((value: string | undefined) => void) | undefined,\n );\n\n const contextValue = React.useMemo(\n () => ({\n type: \"single\" as const,\n collapsible,\n headingLevel,\n isItemOpen: (itemValue: string) => value === itemValue,\n toggleItem: (itemValue: string) => {\n if (value === itemValue) {\n if (collapsible) {\n // Safe: useControllableState<string> expects string, but clearing a collapsible\n // single-mode accordion requires undefined. The onValueChange cast above\n // widens the callback to accept string | undefined, so the runtime value is correct.\n setValue(undefined as unknown as string);\n }\n } else {\n setValue(itemValue);\n }\n },\n }),\n [value, setValue, collapsible, headingLevel],\n );\n\n return (\n <AccordionContext value={contextValue}>\n <div\n ref={composedRef}\n className={className}\n onKeyDown={(e) => {\n handleKeyboardNavigation(e, rootRef);\n onKeyDown?.(e);\n }}\n {...divProps}\n >\n {children}\n </div>\n </AccordionContext>\n );\n}\n\nfunction AccordionMultiple({\n value: controlledValue,\n defaultValue,\n onValueChange,\n headingLevel,\n className,\n children,\n rootRef,\n composedRef,\n onKeyDown,\n ...divProps\n}: Omit<AccordionMultipleProps, \"type\" | \"collapsible\"> &\n AccordionInternalProps) {\n const [value, setValue] = useControllableState(\n controlledValue,\n defaultValue ?? [],\n onValueChange,\n );\n\n const contextValue = React.useMemo(\n () => ({\n type: \"multiple\" as const,\n collapsible: true,\n headingLevel,\n isItemOpen: (itemValue: string) => value.includes(itemValue),\n toggleItem: (itemValue: string) => {\n if (value.includes(itemValue)) {\n setValue(value.filter((v) => v !== itemValue));\n } else {\n setValue([...value, itemValue]);\n }\n },\n }),\n [value, setValue, headingLevel],\n );\n\n return (\n <AccordionContext value={contextValue}>\n <div\n ref={composedRef}\n className={className}\n onKeyDown={(e) => {\n handleKeyboardNavigation(e, rootRef);\n onKeyDown?.(e);\n }}\n {...divProps}\n >\n {children}\n </div>\n </AccordionContext>\n );\n}\n\nexport { Accordion };\n","import { createContext, useContext } from \"react\";\n\ninterface CollapsibleContextValue {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n contentId: string;\n triggerId: string;\n disabled: boolean;\n}\n\nconst CollapsibleContext = createContext<CollapsibleContextValue | null>(null);\n\nfunction useCollapsibleContext(): CollapsibleContextValue {\n const context = useContext(CollapsibleContext);\n if (context === null) {\n throw new Error(\n \"Collapsible compound components must be used within a <Collapsible> parent.\",\n );\n }\n return context;\n}\n\nexport { CollapsibleContext, useCollapsibleContext };\nexport type { CollapsibleContextValue };\n","import * as React from \"react\";\nimport { useControllableState } from \"@nuka/hooks/use-controllable-state\";\nimport { CollapsibleContext } from \"@nuka/components/Collapsible/Collapsible.context\";\n\nexport interface CollapsibleProps extends React.HTMLAttributes<HTMLDivElement> {\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n disabled?: boolean;\n}\n\nconst Collapsible = React.forwardRef<HTMLDivElement, CollapsibleProps>(\n (\n {\n open: controlledOpen,\n defaultOpen,\n onOpenChange,\n disabled = false,\n className,\n ...props\n },\n ref,\n ) => {\n const [open, setOpen] = useControllableState(\n controlledOpen,\n defaultOpen ?? false,\n onOpenChange,\n );\n const contentId = React.useId();\n const triggerId = React.useId();\n\n const contextValue = React.useMemo(\n () => ({ open, onOpenChange: setOpen, contentId, triggerId, disabled }),\n [open, setOpen, contentId, triggerId, disabled],\n );\n\n return (\n <CollapsibleContext value={contextValue}>\n <div\n ref={ref}\n data-state={open ? \"open\" : \"closed\"}\n className={className}\n {...props}\n />\n </CollapsibleContext>\n );\n },\n);\n\nCollapsible.displayName = \"Collapsible\";\n\nexport { Collapsible };\n","import * as React from \"react\";\nimport { Slot } from \"@nuka/utils/slot\";\nimport { useCollapsibleContext } from \"@nuka/components/Collapsible/Collapsible.context\";\n\nexport interface CollapsibleTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n asChild?: boolean;\n}\n\nconst CollapsibleTrigger = React.forwardRef<\n HTMLButtonElement,\n CollapsibleTriggerProps\n>(({ asChild = false, className, onClick, ...props }, ref) => {\n const { open, onOpenChange, contentId, triggerId, disabled } =\n useCollapsibleContext();\n\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n onOpenChange(!open);\n onClick?.(e);\n };\n\n const Comp = asChild ? Slot : \"button\";\n\n return (\n <Comp\n ref={ref}\n type={asChild ? undefined : \"button\"}\n id={triggerId}\n aria-expanded={open}\n aria-controls={contentId}\n disabled={disabled}\n data-state={open ? \"open\" : \"closed\"}\n className={className}\n onClick={handleClick}\n {...props}\n />\n );\n});\n\nCollapsibleTrigger.displayName = \"CollapsibleTrigger\";\n\nexport { CollapsibleTrigger };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { useCollapsibleContext } from \"@nuka/components/Collapsible/Collapsible.context\";\n\nexport interface CollapsibleContentProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst CollapsibleContent = React.forwardRef<\n HTMLDivElement,\n CollapsibleContentProps\n>(({ className, children, ...props }, ref) => {\n const { open, contentId, triggerId } = useCollapsibleContext();\n\n return (\n <div\n ref={ref}\n id={contentId}\n role=\"region\"\n aria-labelledby={triggerId}\n aria-hidden={!open}\n data-state={open ? \"open\" : \"closed\"}\n className={cn(\n \"grid grid-rows-[0fr] transition-[grid-template-rows] duration-200 ease-in-out\",\n \"data-[state=open]:grid-rows-[1fr]\",\n \"motion-reduce:transition-none\",\n className,\n )}\n {...props}\n >\n <div className=\"overflow-hidden\">{children}</div>\n </div>\n );\n});\n\nCollapsibleContent.displayName = \"CollapsibleContent\";\n\nexport { CollapsibleContent };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Collapsible } from \"@nuka/components/Collapsible\";\nimport {\n AccordionItemContext,\n useAccordionContext,\n} from \"@nuka/components/Accordion/Accordion.context\";\n\nexport interface AccordionItemProps extends React.HTMLAttributes<HTMLDivElement> {\n value: string;\n disabled?: boolean;\n}\n\nconst AccordionItem = React.forwardRef<HTMLDivElement, AccordionItemProps>(\n ({ value, disabled = false, className, children, ...props }, ref) => {\n const { isItemOpen, toggleItem } = useAccordionContext();\n const open = isItemOpen(value);\n\n const itemContextValue = React.useMemo(\n () => ({ value, disabled, open }),\n [value, disabled, open],\n );\n\n return (\n <AccordionItemContext value={itemContextValue}>\n <Collapsible\n ref={ref}\n open={open}\n onOpenChange={() => toggleItem(value)}\n disabled={disabled}\n className={cn(\"border-b border-(--nuka-border-base)\", className)}\n {...props}\n >\n {children}\n </Collapsible>\n </AccordionItemContext>\n );\n },\n);\n\nAccordionItem.displayName = \"AccordionItem\";\n\nexport { AccordionItem };\n","/**\n * Copyright 2022 Joe Bell. All rights reserved.\n *\n * This file is licensed to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with the\n * License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations under\n * the License.\n */ import { clsx } from \"clsx\";\nconst falsyToString = (value)=>typeof value === \"boolean\" ? `${value}` : value === 0 ? \"0\" : value;\nexport const cx = clsx;\nexport const cva = (base, config)=>(props)=>{\n var _config_compoundVariants;\n if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n const { variants, defaultVariants } = config;\n const getVariantClassNames = Object.keys(variants).map((variant)=>{\n const variantProp = props === null || props === void 0 ? void 0 : props[variant];\n const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];\n if (variantProp === null) return null;\n const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);\n return variants[variant][variantKey];\n });\n const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{\n let [key, value] = param;\n if (value === undefined) {\n return acc;\n }\n acc[key] = value;\n return acc;\n }, {});\n const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param)=>{\n let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;\n return Object.entries(compoundVariantOptions).every((param)=>{\n let [key, value] = param;\n return Array.isArray(value) ? value.includes({\n ...defaultVariants,\n ...propsWithoutUndefined\n }[key]) : ({\n ...defaultVariants,\n ...propsWithoutUndefined\n })[key] === value;\n }) ? [\n ...acc,\n cvClass,\n cvClassName\n ] : acc;\n }, []);\n return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n };\n\n","/**\n * CVA conventions for nuka-ui components\n *\n * Structure every component's variants file as follows:\n *\n * 1. Import cva and VariantProps from 'class-variance-authority'\n * 2. Define the base classes (always applied)\n * 3. Define variants (mutually exclusive options per axis)\n * 4. Define compoundVariants (classes applied when multiple variants combine)\n * 5. Define defaultVariants\n * 6. Export the VariantProps type alongside the cva instance\n *\n * Naming:\n * - cva instance: <componentName>Variants (e.g. buttonVariants)\n * - props type: <ComponentName>VariantProps (e.g. ButtonVariantProps)\n *\n * Token usage:\n * - Always reference CSS custom properties, never raw Tailwind color utilities\n * - Correct: bg-(--nuka-accent-bg)\n * - Incorrect: bg-blue-500\n *\n * Class ordering within a variant value:\n * - Layout first, then visual, then interactive\n * - e.g. 'px-4 py-2 rounded-md bg-(--nuka-accent-bg) hover:bg-(--nuka-accent-bg-hover)'\n */\n\nexport { cva, type VariantProps } from \"class-variance-authority\";\n\ninterface IntentCompoundVariant {\n variant: \"primary\" | \"secondary\" | \"outline\" | \"ghost\";\n intent: \"default\" | \"danger\" | \"success\" | \"warning\";\n className: string[];\n}\n\n/**\n * Returns the standard 16-cell compound variant matrix (4 variants x 4 intents).\n *\n * The secondary-default cell differs between components (e.g. Tag uses neutral\n * tokens, Alert uses accent tokens). Pass `secondaryDefault` to override that\n * single cell. When omitted, defaults to Tag's neutral treatment.\n */\nfunction intentCompoundVariants(options?: {\n secondaryDefault?: string[];\n}): IntentCompoundVariant[] {\n const secondaryDefault = options?.secondaryDefault ?? [\n \"bg-(--nuka-bg-muted)\",\n \"text-(--nuka-text-base)\",\n \"border-(--nuka-border-base)\",\n ];\n\n return [\n {\n variant: \"primary\",\n intent: \"default\",\n className: [\"bg-(--nuka-accent-bg)\", \"text-(--nuka-accent-fg)\"],\n },\n {\n variant: \"primary\",\n intent: \"danger\",\n className: [\"bg-(--nuka-danger-base)\", \"text-(--nuka-danger-fg)\"],\n },\n {\n variant: \"primary\",\n intent: \"success\",\n className: [\"bg-(--nuka-success-base)\", \"text-(--nuka-success-fg)\"],\n },\n {\n variant: \"primary\",\n intent: \"warning\",\n className: [\"bg-(--nuka-warning-base)\", \"text-(--nuka-warning-fg)\"],\n },\n\n {\n variant: \"secondary\",\n intent: \"default\",\n className: secondaryDefault,\n },\n {\n variant: \"secondary\",\n intent: \"danger\",\n className: [\n \"bg-(--nuka-danger-bg)\",\n \"text-(--nuka-danger-text)\",\n \"border-(--nuka-danger-border)\",\n ],\n },\n {\n variant: \"secondary\",\n intent: \"success\",\n className: [\n \"bg-(--nuka-success-bg)\",\n \"text-(--nuka-success-text)\",\n \"border-(--nuka-success-border)\",\n ],\n },\n {\n variant: \"secondary\",\n intent: \"warning\",\n className: [\n \"bg-(--nuka-warning-bg)\",\n \"text-(--nuka-warning-text)\",\n \"border-(--nuka-warning-border)\",\n ],\n },\n\n {\n variant: \"outline\",\n intent: \"default\",\n className: [\"border-(--nuka-accent-border)\", \"text-(--nuka-accent-text)\"],\n },\n {\n variant: \"outline\",\n intent: \"danger\",\n className: [\"border-(--nuka-danger-border)\", \"text-(--nuka-danger-text)\"],\n },\n {\n variant: \"outline\",\n intent: \"success\",\n className: [\n \"border-(--nuka-success-border)\",\n \"text-(--nuka-success-text)\",\n ],\n },\n {\n variant: \"outline\",\n intent: \"warning\",\n className: [\n \"border-(--nuka-warning-border)\",\n \"text-(--nuka-warning-text)\",\n ],\n },\n\n {\n variant: \"ghost\",\n intent: \"default\",\n className: [\"text-(--nuka-text-base)\"],\n },\n {\n variant: \"ghost\",\n intent: \"danger\",\n className: [\"text-(--nuka-danger-text)\"],\n },\n {\n variant: \"ghost\",\n intent: \"success\",\n className: [\"text-(--nuka-success-text)\"],\n },\n {\n variant: \"ghost\",\n intent: \"warning\",\n className: [\"text-(--nuka-warning-text)\"],\n },\n ];\n}\n\nconst selectionIndicatorIntentVariants = [\n {\n intent: \"default\" as const,\n className: [\n \"border-(--nuka-input-border)\",\n \"peer-checked:bg-(--nuka-accent-bg)\",\n \"peer-checked:border-transparent\",\n ],\n },\n {\n intent: \"danger\" as const,\n className: [\n \"border-(--nuka-danger-border)\",\n \"peer-checked:bg-(--nuka-danger-base)\",\n \"peer-checked:border-transparent\",\n ],\n },\n {\n intent: \"success\" as const,\n className: [\n \"border-(--nuka-success-border)\",\n \"peer-checked:bg-(--nuka-success-base)\",\n \"peer-checked:border-transparent\",\n ],\n },\n {\n intent: \"warning\" as const,\n className: [\n \"border-(--nuka-warning-border)\",\n \"peer-checked:bg-(--nuka-warning-base)\",\n \"peer-checked:border-transparent\",\n \"peer-checked:text-(--nuka-warning-fg)\",\n ],\n },\n];\n\nexport { intentCompoundVariants, selectionIndicatorIntentVariants };\nexport type { IntentCompoundVariant };\n","import { cva, type VariantProps } from \"@nuka/utils/variants\";\n\nexport const iconVariants = cva(\n [\"inline-flex\", \"items-center\", \"justify-center\", \"shrink-0\"],\n {\n variants: {\n size: {\n sm: \"size-4\",\n md: \"size-6\",\n lg: \"size-8\",\n xl: \"size-10\",\n },\n },\n defaultVariants: { size: \"md\" },\n },\n);\n\nexport const iconColorVariants = cva([], {\n variants: {\n color: {\n inherit: \"\",\n base: \"text-(--nuka-text-base)\",\n muted: \"text-(--nuka-text-muted)\",\n subtle: \"text-(--nuka-text-subtle)\",\n inverse: \"text-(--nuka-text-inverse)\",\n disabled: \"text-(--nuka-text-disabled)\",\n },\n },\n defaultVariants: { color: \"inherit\" },\n});\n\nexport type IconVariantProps = VariantProps<typeof iconVariants> &\n VariantProps<typeof iconColorVariants>;\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport {\n iconVariants,\n iconColorVariants,\n type IconVariantProps,\n} from \"@nuka/components/Icon/Icon.variants\";\n\nexport interface IconProps\n extends\n Omit<React.HTMLAttributes<HTMLSpanElement>, \"color\">,\n IconVariantProps {\n children: React.ReactElement;\n label?: string;\n}\n\nconst Icon = React.forwardRef<HTMLSpanElement, IconProps>(\n ({ className, size, color, label, children, ...props }, ref) => {\n if (process.env.NODE_ENV !== \"production\") {\n if (!React.isValidElement(children)) {\n console.error(\n \"[nuka-ui] Icon: children must be a single React element.\",\n );\n }\n }\n\n const isLabelled = label !== undefined;\n\n const child = React.isValidElement(children)\n ? React.cloneElement(\n // Safe: children prop is typed as React.ReactElement in the interface,\n // so the generic parameter narrowing for cloneElement is safe (ADR-011).\n children as React.ReactElement<Record<string, unknown>>,\n {\n \"aria-hidden\": \"true\" as const,\n width: \"100%\",\n height: \"100%\",\n },\n )\n : children;\n\n return (\n <span\n ref={ref}\n {...(isLabelled\n ? { role: \"img\", \"aria-label\": label }\n : { \"aria-hidden\": \"true\" as const })}\n className={cn(\n iconVariants({ size }),\n iconColorVariants({ color }),\n className,\n )}\n {...props}\n >\n {child}\n </span>\n );\n },\n);\n\nIcon.displayName = \"Icon\";\n\nexport { Icon, iconVariants, iconColorVariants };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Icon } from \"@nuka/components/Icon\";\nimport { CollapsibleTrigger } from \"@nuka/components/Collapsible\";\nimport {\n useAccordionContext,\n useAccordionItemContext,\n} from \"@nuka/components/Accordion/Accordion.context\";\n\nexport interface AccordionTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {}\n\nconst AccordionTrigger = React.forwardRef<\n HTMLButtonElement,\n AccordionTriggerProps\n>(({ className, children, ...props }, ref) => {\n const { headingLevel } = useAccordionContext();\n const { open } = useAccordionItemContext();\n const HeadingTag = headingLevel;\n\n return (\n <HeadingTag className=\"flex\">\n <CollapsibleTrigger\n ref={ref}\n data-accordion-trigger=\"\"\n className={cn(\n \"flex flex-1 items-center justify-between\",\n \"py-(--space-4)\",\n \"text-[length:var(--font-size-sm)]\",\n \"font-[number:var(--font-weight-medium)]\",\n \"text-(--nuka-text-base)\",\n \"transition-colors duration-150\",\n \"hover:underline\",\n \"focus-visible:outline-2 focus-visible:outline-offset-2\",\n \"focus-visible:outline-(--nuka-border-focus)\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n {children}\n <Icon\n size=\"sm\"\n className={cn(\n \"transition-transform duration-200\",\n open && \"rotate-180\",\n )}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n </Icon>\n </CollapsibleTrigger>\n </HeadingTag>\n );\n});\n\nAccordionTrigger.displayName = \"AccordionTrigger\";\n\nexport { AccordionTrigger };\n","import * as React from \"react\";\nimport { CollapsibleContent } from \"@nuka/components/Collapsible\";\n\nexport interface AccordionContentProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst AccordionContent = React.forwardRef<\n HTMLDivElement,\n AccordionContentProps\n>(({ className, children, ...props }, ref) => {\n return (\n <CollapsibleContent ref={ref} className={className} {...props}>\n <div className=\"pb-(--space-4)\">{children}</div>\n </CollapsibleContent>\n );\n});\n\nAccordionContent.displayName = \"AccordionContent\";\n\nexport { AccordionContent };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Icon } from \"@nuka/components/Icon\";\n\ninterface DismissButtonProps extends Omit<\n React.ButtonHTMLAttributes<HTMLButtonElement>,\n \"onClick\"\n> {\n onClick: () => void;\n label?: string;\n}\n\nconst DismissButton = React.forwardRef<HTMLButtonElement, DismissButtonProps>(\n ({ onClick, label = \"Dismiss\", className, ...props }, ref) => {\n return (\n <button\n ref={ref}\n type=\"button\"\n aria-label={label}\n onClick={onClick}\n className={cn(\n \"inline-flex items-center justify-center\",\n \"rounded-(--radius-sm) p-(--space-1)\",\n \"min-w-6 min-h-6\",\n \"opacity-70 hover:opacity-100 transition-opacity cursor-pointer\",\n \"focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--nuka-border-focus)\",\n className,\n )}\n {...props}\n >\n <Icon size=\"sm\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n </Icon>\n </button>\n );\n },\n);\n\nDismissButton.displayName = \"DismissButton\";\n\nexport { DismissButton };\nexport type { DismissButtonProps };\n","import {\n cva,\n intentCompoundVariants,\n type VariantProps,\n} from \"@nuka/utils/variants\";\n\nexport const alertVariants = cva(\n [\"flex items-start gap-(--space-3)\", \"rounded-(--radius-md)\", \"border\"],\n {\n variants: {\n variant: {\n primary: [\"border-transparent\"],\n secondary: [],\n outline: [\"bg-transparent\"],\n ghost: [\"bg-transparent\", \"border-transparent\"],\n },\n intent: {\n default: \"\",\n danger: \"\",\n success: \"\",\n warning: \"\",\n },\n size: {\n sm: \"px-(--space-3) py-(--space-2) text-xs\",\n md: \"px-(--space-4) py-(--space-3) text-sm\",\n lg: \"px-(--space-6) py-(--space-4) text-base\",\n },\n },\n\n compoundVariants: intentCompoundVariants({\n secondaryDefault: [\n \"bg-(--nuka-accent-bg-subtle)\",\n \"text-(--nuka-accent-text)\",\n \"border-(--nuka-accent-border)\",\n ],\n }),\n\n defaultVariants: {\n variant: \"secondary\",\n intent: \"default\",\n size: \"md\",\n },\n },\n);\n\nexport type AlertVariantProps = VariantProps<typeof alertVariants>;\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { DismissButton } from \"@nuka/utils/dismiss-button\";\nimport {\n alertVariants,\n type AlertVariantProps,\n} from \"@nuka/components/Alert/Alert.variants\";\n\nexport interface AlertProps\n extends React.HTMLAttributes<HTMLDivElement>, AlertVariantProps {\n onDismiss?: () => void;\n icon?: React.ReactNode;\n}\n\nconst Alert = React.forwardRef<HTMLDivElement, AlertProps>(\n (\n { className, variant, intent, size, onDismiss, icon, children, ...props },\n ref,\n ) => {\n return (\n <div\n ref={ref}\n role=\"alert\"\n className={cn(alertVariants({ variant, intent, size }), className)}\n {...props}\n >\n {icon && <span className=\"shrink-0\">{icon}</span>}\n <div className=\"flex-1 min-w-0\">{children}</div>\n {onDismiss != null && (\n <DismissButton\n onClick={onDismiss}\n className=\"ml-auto self-start shrink-0\"\n />\n )}\n </div>\n );\n },\n);\n\nAlert.displayName = \"Alert\";\n\nexport { Alert, alertVariants };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\n\nexport interface AppShellProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst AppShell = React.forwardRef<HTMLDivElement, AppShellProps>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex h-svh flex-col\", className)}\n {...props}\n />\n ),\n);\n\nAppShell.displayName = \"AppShell\";\n\nexport { AppShell };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\n\nexport interface AppShellHeaderProps extends React.HTMLAttributes<HTMLElement> {\n border?: boolean;\n}\n\nconst AppShellHeader = React.forwardRef<HTMLElement, AppShellHeaderProps>(\n ({ border = true, className, ...props }, ref) => (\n <header\n ref={ref}\n className={cn(\n \"sticky top-0 z-(--nuka-z-header)\",\n \"flex items-center gap-(--space-3)\",\n \"px-(--space-4) py-(--space-3)\",\n \"bg-(--nuka-bg-base)\",\n border && \"border-b border-(--nuka-border-base)\",\n className,\n )}\n {...props}\n />\n ),\n);\n\nAppShellHeader.displayName = \"AppShellHeader\";\n\nexport { AppShellHeader };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\n\nexport interface AppShellBodyProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst AppShellBody = React.forwardRef<HTMLDivElement, AppShellBodyProps>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"flex flex-1 h-full overflow-hidden\", className)}\n {...props}\n />\n ),\n);\n\nAppShellBody.displayName = \"AppShellBody\";\n\nexport { AppShellBody };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\n\nexport interface AppShellMainProps extends React.HTMLAttributes<HTMLElement> {\n padded?: boolean;\n}\n\nconst AppShellMain = React.forwardRef<HTMLElement, AppShellMainProps>(\n ({ padded = true, className, ...props }, ref) => (\n <main\n ref={ref}\n className={cn(\n \"flex-1 overflow-y-auto\",\n padded && \"p-(--space-6) lg:p-(--space-8)\",\n className,\n )}\n {...props}\n />\n ),\n);\n\nAppShellMain.displayName = \"AppShellMain\";\n\nexport { AppShellMain };\n","export type AspectRatioValue =\n | \"1/1\"\n | \"16/9\"\n | \"9/16\"\n | \"4/3\"\n | \"3/4\"\n | \"21/9\"\n | number;\n\nconst RATIO_MAP: Record<string, number> = {\n \"1/1\": 1,\n \"16/9\": 16 / 9,\n \"9/16\": 9 / 16,\n \"4/3\": 4 / 3,\n \"3/4\": 3 / 4,\n \"21/9\": 21 / 9,\n};\n\nexport function resolveRatio(ratio: AspectRatioValue): number {\n if (typeof ratio === \"number\") return ratio;\n return RATIO_MAP[ratio] ?? 1;\n}\n","import * as React from \"react\";\nimport { Slot } from \"@nuka/utils/slot\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { resolveRatio } from \"@nuka/components/AspectRatio/AspectRatio.utils\";\nimport type { AspectRatioValue } from \"@nuka/components/AspectRatio/AspectRatio.utils\";\n\nexport type { AspectRatioValue };\n\nexport interface AspectRatioProps extends React.HTMLAttributes<HTMLDivElement> {\n ratio?: AspectRatioValue;\n asChild?: boolean;\n}\n\nconst AspectRatio = React.forwardRef<HTMLDivElement, AspectRatioProps>(\n (\n { ratio = \"1/1\", asChild = false, className, style, children, ...props },\n ref,\n ) => {\n const Comp = asChild ? Slot : \"div\";\n\n return (\n <Comp\n ref={ref}\n className={cn(\"w-full overflow-hidden\", className)}\n style={{ aspectRatio: resolveRatio(ratio), ...style }}\n {...props}\n >\n {children}\n </Comp>\n );\n },\n);\n\nAspectRatio.displayName = \"AspectRatio\";\n\nexport { AspectRatio };\n","import { cva, type VariantProps } from \"@nuka/utils/variants\";\n\nexport const bannerVariants = cva(\n [\n \"w-full flex items-start gap-(--space-3)\",\n \"border-l-4\",\n \"px-(--space-4) py-(--space-3)\",\n \"text-sm\",\n ],\n {\n variants: {\n intent: {\n default:\n \"bg-(--nuka-accent-bg-subtle) border-(--nuka-accent-bg) text-(--nuka-text-base)\",\n success:\n \"bg-(--nuka-success-bg) border-(--nuka-success-base) text-(--nuka-success-text)\",\n danger:\n \"bg-(--nuka-danger-bg) border-(--nuka-danger-base) text-(--nuka-danger-text)\",\n warning:\n \"bg-(--nuka-warning-bg) border-(--nuka-warning-base) text-(--nuka-warning-text)\",\n },\n },\n defaultVariants: {\n intent: \"default\",\n },\n },\n);\n\nexport type BannerVariantProps = VariantProps<typeof bannerVariants>;\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { DismissButton } from \"@nuka/utils/dismiss-button\";\nimport {\n bannerVariants,\n type BannerVariantProps,\n} from \"@nuka/components/Banner/Banner.variants\";\n\nexport interface BannerProps\n extends\n Omit<React.HTMLAttributes<HTMLDivElement>, \"aria-label\">,\n BannerVariantProps {\n \"aria-label\": string;\n onDismiss?: () => void;\n action?: React.ReactNode;\n}\n\nconst Banner = React.forwardRef<HTMLDivElement, BannerProps>(\n (\n {\n className,\n intent,\n \"aria-label\": ariaLabel,\n onDismiss,\n action,\n children,\n ...props\n },\n ref,\n ) => {\n return (\n <div\n ref={ref}\n role=\"region\"\n aria-label={ariaLabel}\n className={cn(bannerVariants({ intent }), className)}\n {...props}\n >\n <div className=\"flex-1 min-w-0\">{children}</div>\n {action && <div className=\"shrink-0\">{action}</div>}\n {onDismiss != null && (\n <DismissButton\n onClick={onDismiss}\n className=\"shrink-0 self-start ml-auto\"\n />\n )}\n </div>\n );\n },\n);\n\nBanner.displayName = \"Banner\";\n\nexport { Banner, bannerVariants };\n","import { cva, type VariantProps } from \"@nuka/utils/variants\";\n\nexport const avatarVariants = cva(\n [\n \"relative inline-flex items-center justify-center\",\n \"shrink-0 overflow-hidden\",\n \"border border-(--nuka-border-base)\",\n \"bg-(--nuka-bg-muted)\",\n \"text-(--nuka-text-muted)\",\n \"font-medium\",\n ],\n {\n variants: {\n size: {\n xs: \"size-6 text-[length:var(--font-size-xs)]\",\n sm: \"size-8 text-[length:var(--font-size-xs)]\",\n md: \"size-10 text-[length:var(--font-size-sm)]\",\n lg: \"size-12 text-[length:var(--font-size-md)]\",\n xl: \"size-16 text-[length:var(--font-size-lg)]\",\n },\n shape: {\n circle: \"rounded-(--radius-full)\",\n square: \"rounded-(--radius-md)\",\n },\n },\n defaultVariants: {\n size: \"md\",\n shape: \"circle\",\n },\n },\n);\n\nexport type AvatarVariantProps = VariantProps<typeof avatarVariants>;\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Icon } from \"@nuka/components/Icon\";\nimport {\n avatarVariants,\n type AvatarVariantProps,\n} from \"@nuka/components/Avatar/Avatar.variants\";\n\nexport interface AvatarProps\n extends\n Omit<React.HTMLAttributes<HTMLSpanElement>, \"children\">,\n AvatarVariantProps {\n src?: string;\n alt?: string;\n name?: string;\n}\n\nexport function getInitials(name: string): string {\n const trimmed = name.trim();\n if (trimmed === \"\") return \"\";\n\n const words = trimmed.split(/\\s+/).filter(Boolean);\n const first = words[0];\n const last = words[words.length - 1];\n\n if (!first) return \"\";\n\n if (words.length === 1) {\n return first.length === 1\n ? first.toUpperCase()\n : ((first[0] ?? \"\") + (first[1] ?? \"\")).toUpperCase();\n }\n\n return ((first[0] ?? \"\") + (last?.[0] ?? \"\")).toUpperCase();\n}\n\nfunction PersonIcon() {\n return (\n <Icon className=\"size-[1em]\">\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <circle cx=\"12\" cy=\"8\" r=\"4\" />\n <path d=\"M5.5 21.5c0-4.14 2.91-7.5 6.5-7.5s6.5 3.36 6.5 7.5\" />\n </svg>\n </Icon>\n );\n}\n\nfunction resolveAriaLabel(\n src: string | undefined,\n alt: string | undefined,\n name: string | undefined,\n loaded: boolean,\n errored: boolean,\n): string {\n const imageVisible = src !== undefined && loaded && !errored;\n\n if (imageVisible) {\n if (alt !== undefined && alt !== \"\") return alt;\n if (name !== undefined && name !== \"\") return name;\n return \"Avatar\";\n }\n\n const hasName = name !== undefined && name.trim() !== \"\";\n if (hasName) return name;\n\n return \"User avatar\";\n}\n\nconst Avatar = React.forwardRef<HTMLSpanElement, AvatarProps>(\n ({ className, size, shape, src, alt, name, ...props }, ref) => {\n const [loaded, setLoaded] = React.useState(false);\n const [errored, setErrored] = React.useState(false);\n const prevSrcRef = React.useRef(src);\n\n if (prevSrcRef.current !== src) {\n prevSrcRef.current = src;\n setLoaded(false);\n setErrored(false);\n }\n\n const initials = name !== undefined ? getInitials(name) : \"\";\n const showInitials = initials !== \"\";\n const ariaLabel = resolveAriaLabel(src, alt, name, loaded, errored);\n\n return (\n <span\n ref={ref}\n role=\"img\"\n aria-label={ariaLabel}\n className={cn(avatarVariants({ size, shape }), className)}\n {...props}\n >\n {/* Fallback layer: always rendered */}\n {showInitials ? (\n <span aria-hidden=\"true\">{initials}</span>\n ) : (\n <PersonIcon />\n )}\n\n {/* Image layer: on top, hidden until loaded */}\n {src !== undefined && !errored && (\n <img\n key={src}\n src={src}\n alt=\"\"\n onLoad={() => setLoaded(true)}\n onError={() => setErrored(true)}\n className={cn(\n \"absolute inset-0 h-full w-full object-cover\",\n loaded ? \"opacity-100\" : \"opacity-0\",\n )}\n />\n )}\n </span>\n );\n },\n);\n\nAvatar.displayName = \"Avatar\";\n\nexport { Avatar, avatarVariants };\n","import { cva, type VariantProps } from \"@nuka/utils/variants\";\n\nexport const badgeVariants = cva(\n [\n \"inline-flex items-center\",\n \"font-medium leading-none whitespace-nowrap\",\n \"rounded-full\",\n ],\n {\n variants: {\n variant: {\n solid: [],\n subtle: [],\n outline: [\"border\"],\n },\n intent: {\n default: \"\",\n danger: \"\",\n success: \"\",\n warning: \"\",\n },\n size: {\n sm: \"px-(--space-2) py-(--space-1) text-xs\",\n md: \"px-(--space-3) py-(--space-1) text-xs\",\n lg: \"px-(--space-3) py-(--space-2) text-sm\",\n },\n },\n\n // Manual matrix: variant names (solid/subtle/outline) differ from the shared\n // utility's axis (primary/secondary/outline/ghost). See ADR-006.\n compoundVariants: [\n {\n variant: \"solid\",\n intent: \"default\",\n className: [\"bg-(--nuka-accent-bg)\", \"text-(--nuka-accent-fg)\"],\n },\n {\n variant: \"solid\",\n intent: \"danger\",\n className: [\"bg-(--nuka-danger-base)\", \"text-(--nuka-danger-fg)\"],\n },\n {\n variant: \"solid\",\n intent: \"success\",\n className: [\"bg-(--nuka-success-base)\", \"text-(--nuka-success-fg)\"],\n },\n {\n variant: \"solid\",\n intent: \"warning\",\n className: [\"bg-(--nuka-warning-base)\", \"text-(--nuka-warning-fg)\"],\n },\n\n {\n variant: \"subtle\",\n intent: \"default\",\n className: [\"bg-(--nuka-bg-muted)\", \"text-(--nuka-text-base)\"],\n },\n {\n variant: \"subtle\",\n intent: \"danger\",\n className: [\"bg-(--nuka-danger-bg)\", \"text-(--nuka-danger-text)\"],\n },\n {\n variant: \"subtle\",\n intent: \"success\",\n className: [\"bg-(--nuka-success-bg)\", \"text-(--nuka-success-text)\"],\n },\n {\n variant: \"subtle\",\n intent: \"warning\",\n className: [\"bg-(--nuka-warning-bg)\", \"text-(--nuka-warning-text)\"],\n },\n\n {\n variant: \"outline\",\n intent: \"default\",\n className: [\n \"border-(--nuka-accent-border)\",\n \"text-(--nuka-accent-text)\",\n ],\n },\n {\n variant: \"outline\",\n intent: \"danger\",\n className: [\n \"border-(--nuka-danger-border)\",\n \"text-(--nuka-danger-text)\",\n ],\n },\n {\n variant: \"outline\",\n intent: \"success\",\n className: [\n \"border-(--nuka-success-border)\",\n \"text-(--nuka-success-text)\",\n ],\n },\n {\n variant: \"outline\",\n intent: \"warning\",\n className: [\n \"border-(--nuka-warning-border)\",\n \"text-(--nuka-warning-text)\",\n ],\n },\n ],\n\n defaultVariants: {\n variant: \"solid\",\n intent: \"default\",\n size: \"md\",\n },\n },\n);\n\nexport type BadgeVariantProps = VariantProps<typeof badgeVariants>;\n","import * as React from \"react\";\nimport { Slot } from \"@nuka/utils/slot\";\nimport { cn } from \"@nuka/utils/cn\";\nimport {\n badgeVariants,\n type BadgeVariantProps,\n} from \"@nuka/components/Badge/Badge.variants\";\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLSpanElement>, BadgeVariantProps {\n asChild?: boolean;\n}\n\nconst Badge = React.forwardRef<HTMLSpanElement, BadgeProps>(\n ({ className, variant, intent, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"span\";\n\n return (\n <Comp\n ref={ref}\n className={cn(badgeVariants({ variant, intent, size }), className)}\n {...props}\n />\n );\n },\n);\n\nBadge.displayName = \"Badge\";\n\nexport { Badge, badgeVariants };\n","import { cva, type VariantProps } from \"@nuka/utils/variants\";\n\nexport const buttonVariants = cva(\n [\n \"inline-flex items-center justify-center gap-(--space-2)\",\n \"font-medium leading-none whitespace-nowrap\",\n \"rounded-(--radius-md)\",\n \"border\",\n \"transition-colors duration-150\",\n \"focus-visible:outline-2 focus-visible:outline-offset-2\",\n \"focus-visible:outline-(--nuka-border-focus)\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n \"cursor-pointer\",\n ],\n {\n variants: {\n variant: {\n primary: [\"border-transparent\"],\n secondary: [],\n outline: [\"bg-transparent\"],\n ghost: [\"bg-transparent\", \"border-transparent\"],\n link: [\n \"bg-transparent\",\n \"border-transparent\",\n \"underline-offset-4\",\n \"hover:underline\",\n \"rounded-none\",\n \"px-0 py-0\",\n ],\n },\n intent: {\n default: \"\",\n danger: \"\",\n success: \"\",\n warning: \"\",\n },\n size: {\n sm: \"px-(--space-3) py-(--space-2) text-xs\",\n md: \"px-(--space-4) py-(--space-3) text-sm\",\n lg: \"px-(--space-6) py-(--space-4) text-base\",\n },\n },\n\n // Manual matrix: includes `link` variant (5th axis) and per-cell hover/active\n // states that intentCompoundVariants() does not cover. See ADR-001.\n compoundVariants: [\n {\n variant: \"primary\",\n intent: \"default\",\n className: [\n \"bg-(--nuka-accent-bg)\",\n \"text-(--nuka-accent-fg)\",\n \"hover:bg-(--nuka-accent-bg-hover)\",\n \"active:bg-(--nuka-accent-bg-active)\",\n ],\n },\n {\n variant: \"primary\",\n intent: \"danger\",\n className: [\n \"bg-(--nuka-danger-base)\",\n \"text-(--nuka-danger-fg)\",\n \"hover:brightness-90\",\n \"active:brightness-80\",\n ],\n },\n {\n variant: \"primary\",\n intent: \"success\",\n className: [\n \"bg-(--nuka-success-base)\",\n \"text-(--nuka-success-fg)\",\n \"hover:brightness-90\",\n \"active:brightness-80\",\n ],\n },\n {\n variant: \"primary\",\n intent: \"warning\",\n className: [\n \"bg-(--nuka-warning-base)\",\n \"text-(--nuka-warning-fg)\",\n \"hover:brightness-90\",\n \"active:brightness-80\",\n ],\n },\n\n {\n variant: \"secondary\",\n intent: \"default\",\n className: [\n \"bg-(--nuka-bg-muted)\",\n \"text-(--nuka-text-base)\",\n \"border-(--nuka-border-base)\",\n \"hover:bg-(--nuka-bg-subtle)\",\n \"hover:border-(--nuka-border-strong)\",\n ],\n },\n {\n variant: \"secondary\",\n intent: \"danger\",\n className: [\n \"bg-(--nuka-danger-bg)\",\n \"text-(--nuka-danger-text)\",\n \"border-(--nuka-danger-border)\",\n \"hover:brightness-95\",\n ],\n },\n {\n variant: \"secondary\",\n intent: \"success\",\n className: [\n \"bg-(--nuka-success-bg)\",\n \"text-(--nuka-success-text)\",\n \"border-(--nuka-success-border)\",\n \"hover:brightness-95\",\n ],\n },\n {\n variant: \"secondary\",\n intent: \"warning\",\n className: [\n \"bg-(--nuka-warning-bg)\",\n \"text-(--nuka-warning-text)\",\n \"border-(--nuka-warning-border)\",\n \"hover:brightness-95\",\n ],\n },\n\n {\n variant: \"outline\",\n intent: \"default\",\n className: [\n \"border-(--nuka-accent-border)\",\n \"text-(--nuka-accent-text)\",\n \"hover:bg-(--nuka-accent-bg-subtle)\",\n ],\n },\n {\n variant: \"outline\",\n intent: \"danger\",\n className: [\n \"border-(--nuka-danger-border)\",\n \"text-(--nuka-danger-text)\",\n \"hover:bg-(--nuka-danger-bg)\",\n ],\n },\n {\n variant: \"outline\",\n intent: \"success\",\n className: [\n \"border-(--nuka-success-border)\",\n \"text-(--nuka-success-text)\",\n \"hover:bg-(--nuka-success-bg)\",\n ],\n },\n {\n variant: \"outline\",\n intent: \"warning\",\n className: [\n \"border-(--nuka-warning-border)\",\n \"text-(--nuka-warning-text)\",\n \"hover:bg-(--nuka-warning-bg)\",\n ],\n },\n\n {\n variant: \"ghost\",\n intent: \"default\",\n className: [\"text-(--nuka-text-base)\", \"hover:bg-(--nuka-bg-muted)\"],\n },\n {\n variant: \"ghost\",\n intent: \"danger\",\n className: [\"text-(--nuka-danger-text)\", \"hover:bg-(--nuka-danger-bg)\"],\n },\n {\n variant: \"ghost\",\n intent: \"success\",\n className: [\n \"text-(--nuka-success-text)\",\n \"hover:bg-(--nuka-success-bg)\",\n ],\n },\n {\n variant: \"ghost\",\n intent: \"warning\",\n className: [\n \"text-(--nuka-warning-text)\",\n \"hover:bg-(--nuka-warning-bg)\",\n ],\n },\n\n {\n variant: \"link\",\n intent: \"default\",\n className: [\"text-(--nuka-accent-text)\"],\n },\n {\n variant: \"link\",\n intent: \"danger\",\n className: [\"text-(--nuka-danger-text)\"],\n },\n {\n variant: \"link\",\n intent: \"success\",\n className: [\"text-(--nuka-success-text)\"],\n },\n {\n variant: \"link\",\n intent: \"warning\",\n className: [\"text-(--nuka-warning-text)\"],\n },\n ],\n\n defaultVariants: {\n variant: \"primary\",\n intent: \"default\",\n size: \"md\",\n },\n },\n);\n\nexport type ButtonVariantProps = VariantProps<typeof buttonVariants>;\n","import * as React from \"react\";\nimport { Slot } from \"@nuka/utils/slot\";\nimport { cn } from \"@nuka/utils/cn\";\nimport {\n buttonVariants,\n type ButtonVariantProps,\n} from \"@nuka/components/Button/Button.variants\";\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>, ButtonVariantProps {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, intent, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n\n return (\n <Comp\n ref={ref}\n className={cn(buttonVariants({ variant, intent, size }), className)}\n {...props}\n />\n );\n },\n);\n\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import { cva, type VariantProps } from \"@nuka/utils/variants\";\n\nexport const headingVariants = cva(\n [\"font-[number:var(--font-weight-bold)]\", \"text-(--nuka-text-base)\"],\n {\n variants: {\n size: {\n xl: \"text-[length:var(--font-size-xl)] leading-(--line-height-snug)\",\n \"2xl\":\n \"text-[length:var(--font-size-2xl)] leading-(--line-height-snug)\",\n \"3xl\":\n \"text-[length:var(--font-size-3xl)] leading-(--line-height-snug)\",\n \"4xl\":\n \"text-[length:var(--font-size-4xl)] leading-(--line-height-tight)\",\n },\n weight: {\n regular: \"font-[number:var(--font-weight-regular)]\",\n medium: \"font-[number:var(--font-weight-medium)]\",\n semibold: \"font-[number:var(--font-weight-semibold)]\",\n bold: \"font-[number:var(--font-weight-bold)]\",\n },\n color: {\n base: \"text-(--nuka-text-base)\",\n muted: \"text-(--nuka-text-muted)\",\n subtle: \"text-(--nuka-text-subtle)\",\n inverse: \"text-(--nuka-text-inverse)\",\n disabled: \"text-(--nuka-text-disabled)\",\n accent: \"text-(--nuka-accent-text)\",\n danger: \"text-(--nuka-danger-text)\",\n success: \"text-(--nuka-success-text)\",\n warning: \"text-(--nuka-warning-text)\",\n },\n truncate: {\n true: \"truncate\",\n false: \"\",\n },\n },\n defaultVariants: {\n // Default size is 3xl: matches the default element (h2) typographic convention.\n // The two are intentionally decoupled: size controls visuals, as controls semantics.\n size: \"3xl\",\n weight: \"bold\",\n color: \"base\",\n truncate: false,\n },\n },\n);\n\nexport type HeadingVariantProps = VariantProps<typeof headingVariants>;\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport {\n headingVariants,\n type HeadingVariantProps,\n} from \"@nuka/components/Heading/Heading.variants\";\n\n// Constrained to h1-h6 only. Headings are semantically defined by HTML as these\n// six levels. For other block elements, use Text with as=\"div\" instead.\nexport type HeadingElement = \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n\nexport interface HeadingProps\n extends\n Omit<React.HTMLAttributes<HTMLElement>, \"color\">,\n HeadingVariantProps {\n as?: HeadingElement;\n}\n\nconst Heading = React.forwardRef<HTMLElement, HeadingProps>(\n (\n {\n // Default element is h2: the most common non-landmark heading level.\n // h1 is reserved for the page title (typically one per page).\n as: Comp = \"h2\",\n className,\n size,\n weight,\n color,\n truncate,\n ...props\n },\n ref,\n ) => {\n return (\n <Comp\n // Safe: the `as` prop selects h1-h6, making the ref type a union.\n // Same polymorphic element pattern as Text.tsx.\n ref={ref as React.RefObject<never>}\n className={cn(\n headingVariants({ size, weight, color, truncate }),\n className,\n )}\n {...props}\n />\n );\n },\n);\n\nHeading.displayName = \"Heading\";\n\nexport { Heading, headingVariants };\n","import { cva, type VariantProps } from \"@nuka/utils/variants\";\n\nexport const textVariants = cva([], {\n variants: {\n size: {\n xs: \"text-[length:var(--font-size-xs)] leading-(--line-height-normal)\",\n sm: \"text-[length:var(--font-size-sm)] leading-(--line-height-normal)\",\n md: \"text-[length:var(--font-size-md)] leading-(--line-height-normal)\",\n lg: \"text-[length:var(--font-size-lg)] leading-(--line-height-snug)\",\n xl: \"text-[length:var(--font-size-xl)] leading-(--line-height-snug)\",\n },\n weight: {\n regular: \"font-[number:var(--font-weight-regular)]\",\n medium: \"font-[number:var(--font-weight-medium)]\",\n semibold: \"font-[number:var(--font-weight-semibold)]\",\n bold: \"font-[number:var(--font-weight-bold)]\",\n },\n color: {\n base: \"text-(--nuka-text-base)\",\n muted: \"text-(--nuka-text-muted)\",\n subtle: \"text-(--nuka-text-subtle)\",\n inverse: \"text-(--nuka-text-inverse)\",\n disabled: \"text-(--nuka-text-disabled)\",\n accent: \"text-(--nuka-accent-text)\",\n danger: \"text-(--nuka-danger-text)\",\n success: \"text-(--nuka-success-text)\",\n warning: \"text-(--nuka-warning-text)\",\n },\n align: {\n left: \"text-left\",\n center: \"text-center\",\n right: \"text-right\",\n },\n truncate: {\n true: \"truncate\",\n false: \"\",\n },\n },\n defaultVariants: {\n size: \"md\",\n weight: \"regular\",\n color: \"base\",\n align: \"left\",\n truncate: false,\n },\n});\n\nexport type TextVariantProps = VariantProps<typeof textVariants>;\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport {\n textVariants,\n type TextVariantProps,\n} from \"@nuka/components/Text/Text.variants\";\n\ntype TextElement =\n | \"p\"\n | \"span\"\n | \"label\"\n | \"li\"\n | \"time\"\n | \"abbr\"\n | \"figcaption\"\n | \"div\";\n\nexport interface TextProps\n extends Omit<React.HTMLAttributes<HTMLElement>, \"color\">, TextVariantProps {\n as?: TextElement;\n}\n\nconst Text = React.forwardRef<HTMLElement, TextProps>(\n (\n {\n as: Comp = \"p\",\n className,\n size,\n weight,\n color,\n align,\n truncate,\n ...props\n },\n ref,\n ) => {\n return (\n <Comp\n // Safe: the `as` prop makes the element type dynamic (p | span | label | ...),\n // so ref cannot satisfy any single element ref type. Each render produces one\n // concrete element, so the ref assignment is correct at runtime.\n ref={ref as React.RefObject<never>}\n className={cn(\n textVariants({ size, weight, color, align, truncate }),\n className,\n )}\n {...props}\n />\n );\n },\n);\n\nText.displayName = \"Text\";\n\nexport { Text, textVariants };\n","/**\n * Responsive prop utilities for layout primitives.\n *\n * Uses static lookup tables so every emitted class is present\n * as a complete string in source. Required for Tailwind v4 scanning.\n */\n\nexport type Breakpoint = \"base\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\n\nexport type Responsive<T> = T | Partial<Record<Breakpoint, T>>;\n\nexport type GapScale = \"none\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\n\nconst BREAKPOINTS: Breakpoint[] = [\"base\", \"sm\", \"md\", \"lg\", \"xl\", \"2xl\"];\n\nexport function resolveResponsiveClasses<T extends string | number>(\n value: Responsive<T> | undefined,\n lookup: Record<Breakpoint, Record<T, string>>,\n): string[] {\n if (value === undefined) return [];\n\n if (typeof value === \"string\" || typeof value === \"number\") {\n return [lookup.base[value]];\n }\n\n const result: string[] = [];\n for (const bp of BREAKPOINTS) {\n const v = value[bp];\n if (v !== undefined) {\n result.push(lookup[bp][v]);\n }\n }\n return result;\n}\n\n// Helper to build a breakpoint-keyed lookup from a base map\nfunction buildLookup<T extends string | number>(\n baseMap: Record<T, string>,\n): Record<Breakpoint, Record<T, string>> {\n const prefixes: Record<Breakpoint, string> = {\n base: \"\",\n sm: \"sm:\",\n md: \"md:\",\n lg: \"lg:\",\n xl: \"xl:\",\n \"2xl\": \"2xl:\",\n };\n\n const result = {} as Record<Breakpoint, Record<T, string>>;\n for (const bp of BREAKPOINTS) {\n const map = {} as Record<T, string>;\n for (const key of Object.keys(baseMap) as T[]) {\n map[key] = `${prefixes[bp]}${baseMap[key]}`;\n }\n result[bp] = map;\n }\n return result;\n}\n\nexport const gapClasses = buildLookup<GapScale>({\n none: \"gap-0\",\n xs: \"gap-1\",\n sm: \"gap-2\",\n md: \"gap-4\",\n lg: \"gap-6\",\n xl: \"gap-8\",\n \"2xl\": \"gap-12\",\n});\n\nexport const colGapClasses = buildLookup<GapScale>({\n none: \"gap-x-0\",\n xs: \"gap-x-1\",\n sm: \"gap-x-2\",\n md: \"gap-x-4\",\n lg: \"gap-x-6\",\n xl: \"gap-x-8\",\n \"2xl\": \"gap-x-12\",\n});\n\nexport const rowGapClasses = buildLookup<GapScale>({\n none: \"gap-y-0\",\n xs: \"gap-y-1\",\n sm: \"gap-y-2\",\n md: \"gap-y-4\",\n lg: \"gap-y-6\",\n xl: \"gap-y-8\",\n \"2xl\": \"gap-y-12\",\n});\n\nexport type Direction = \"row\" | \"column\" | \"row-reverse\" | \"column-reverse\";\n\nexport const directionClasses = buildLookup<Direction>({\n row: \"flex-row\",\n column: \"flex-col\",\n \"row-reverse\": \"flex-row-reverse\",\n \"column-reverse\": \"flex-col-reverse\",\n});\n\nexport type Align = \"start\" | \"center\" | \"end\" | \"stretch\" | \"baseline\";\n\nexport const alignClasses = buildLookup<Align>({\n start: \"items-start\",\n center: \"items-center\",\n end: \"items-end\",\n stretch: \"items-stretch\",\n baseline: \"items-baseline\",\n});\n\nexport type Justify =\n | \"start\"\n | \"center\"\n | \"end\"\n | \"between\"\n | \"around\"\n | \"evenly\";\n\nexport const justifyClasses = buildLookup<Justify>({\n start: \"justify-start\",\n center: \"justify-center\",\n end: \"justify-end\",\n between: \"justify-between\",\n around: \"justify-around\",\n evenly: \"justify-evenly\",\n});\n\nexport type Wrap = \"wrap\" | \"nowrap\" | \"wrap-reverse\";\n\nexport const wrapClasses = buildLookup<Wrap>({\n wrap: \"flex-wrap\",\n nowrap: \"flex-nowrap\",\n \"wrap-reverse\": \"flex-wrap-reverse\",\n});\n\nexport type ColCount = 1 | 2 | 3 | 4 | 6 | 12;\n\nexport const colsClasses = buildLookup<ColCount>({\n 1: \"grid-cols-1\",\n 2: \"grid-cols-2\",\n 3: \"grid-cols-3\",\n 4: \"grid-cols-4\",\n 6: \"grid-cols-6\",\n 12: \"grid-cols-12\",\n});\n","import * as React from \"react\";\nimport { Slot } from \"@nuka/utils/slot\";\nimport { cn } from \"@nuka/utils/cn\";\nimport {\n resolveResponsiveClasses,\n directionClasses,\n gapClasses,\n alignClasses,\n justifyClasses,\n wrapClasses,\n} from \"@nuka/utils/responsive\";\nimport type {\n Responsive,\n GapScale,\n Direction,\n Align,\n Justify,\n Wrap,\n} from \"@nuka/utils/responsive\";\n\nexport interface StackProps extends React.HTMLAttributes<HTMLDivElement> {\n direction?: Responsive<Direction>;\n gap?: Responsive<GapScale>;\n align?: Responsive<Align>;\n justify?: Responsive<Justify>;\n wrap?: Responsive<Wrap>;\n asChild?: boolean;\n}\n\nconst Stack = React.forwardRef<HTMLDivElement, StackProps>(\n (\n {\n className,\n direction = \"column\",\n gap = \"none\",\n align,\n justify,\n wrap,\n asChild = false,\n ...props\n },\n ref,\n ) => {\n const Comp = asChild ? Slot : \"div\";\n\n return (\n <Comp\n ref={ref}\n className={cn(\n \"flex\",\n ...resolveResponsiveClasses(direction, directionClasses),\n ...resolveResponsiveClasses(gap, gapClasses),\n ...resolveResponsiveClasses(align, alignClasses),\n ...resolveResponsiveClasses(justify, justifyClasses),\n ...resolveResponsiveClasses(wrap, wrapClasses),\n className,\n )}\n {...props}\n />\n );\n },\n);\n\nStack.displayName = \"Stack\";\n\nexport { Stack };\n","import { cva, type VariantProps } from \"@nuka/utils/variants\";\n\nexport const cardVariants = cva(\n [\"rounded-(--radius-lg)\", \"text-(--nuka-text-base)\"],\n {\n variants: {\n variant: {\n outlined: [\n \"bg-(--nuka-bg-base)\",\n \"border\",\n \"border-(--nuka-border-base)\",\n ],\n elevated: [\"bg-(--nuka-bg-base)\", \"shadow-(--nuka-shadow-card)\"],\n filled: [\"bg-(--nuka-bg-muted)\"],\n },\n },\n defaultVariants: {\n variant: \"outlined\",\n },\n },\n);\n\nexport type CardVariantProps = VariantProps<typeof cardVariants>;\n","import * as React from \"react\";\nimport { Slot } from \"@nuka/utils/slot\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Heading } from \"@nuka/components/Heading\";\nimport type { HeadingElement } from \"@nuka/components/Heading\";\nimport { Text } from \"@nuka/components/Text\";\nimport { Stack } from \"@nuka/components/Stack\";\nimport {\n cardVariants,\n type CardVariantProps,\n} from \"@nuka/components/Card/Card.variants\";\n\nexport interface CardProps\n extends React.HTMLAttributes<HTMLDivElement>, CardVariantProps {\n asChild?: boolean;\n}\n\nconst Card = React.forwardRef<HTMLDivElement, CardProps>(\n ({ className, variant, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"div\";\n\n return (\n <Comp\n ref={ref}\n className={cn(cardVariants({ variant }), className)}\n {...props}\n />\n );\n },\n);\n\nCard.displayName = \"Card\";\n\nexport interface CardHeaderProps extends React.HTMLAttributes<HTMLDivElement> {\n asChild?: boolean;\n}\n\nconst CardHeader = React.forwardRef<HTMLDivElement, CardHeaderProps>(\n ({ className, asChild = false, ...props }, ref) => {\n if (asChild) {\n return (\n <Slot\n ref={ref}\n className={cn(\"p-(--space-6) pb-0\", className)}\n {...props}\n />\n );\n }\n\n return (\n <Stack\n ref={ref}\n className={cn(\"p-(--space-6) pb-0\", className)}\n direction=\"column\"\n gap=\"xs\"\n {...props}\n />\n );\n },\n);\n\nCardHeader.displayName = \"CardHeader\";\n\nexport interface CardTitleProps extends Omit<\n React.HTMLAttributes<HTMLElement>,\n \"color\"\n> {\n as?: HeadingElement;\n}\n\nconst CardTitle = React.forwardRef<HTMLElement, CardTitleProps>(\n ({ as = \"h3\", className, ...props }, ref) => {\n return (\n <Heading ref={ref} as={as} size=\"xl\" className={className} {...props} />\n );\n },\n);\n\nCardTitle.displayName = \"CardTitle\";\n\nexport interface CardDescriptionProps extends Omit<\n React.HTMLAttributes<HTMLElement>,\n \"color\"\n> {}\n\nconst CardDescription = React.forwardRef<HTMLElement, CardDescriptionProps>(\n ({ className, ...props }, ref) => {\n return (\n <Text\n ref={ref}\n as=\"p\"\n color=\"muted\"\n size=\"sm\"\n className={className}\n {...props}\n />\n );\n },\n);\n\nCardDescription.displayName = \"CardDescription\";\n\nexport interface CardBodyProps extends React.HTMLAttributes<HTMLDivElement> {\n asChild?: boolean;\n}\n\nconst CardBody = React.forwardRef<HTMLDivElement, CardBodyProps>(\n ({ className, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"div\";\n\n return (\n <Comp ref={ref} className={cn(\"p-(--space-6)\", className)} {...props} />\n );\n },\n);\n\nCardBody.displayName = \"CardBody\";\n\nexport interface CardFooterProps extends React.HTMLAttributes<HTMLDivElement> {\n asChild?: boolean;\n}\n\nconst CardFooter = React.forwardRef<HTMLDivElement, CardFooterProps>(\n ({ className, asChild = false, ...props }, ref) => {\n if (asChild) {\n return (\n <Slot\n ref={ref}\n className={cn(\"p-(--space-6) pt-0\", className)}\n {...props}\n />\n );\n }\n\n return (\n <Stack\n ref={ref}\n className={cn(\"p-(--space-6) pt-0\", className)}\n direction=\"row\"\n gap=\"sm\"\n justify=\"end\"\n {...props}\n />\n );\n },\n);\n\nCardFooter.displayName = \"CardFooter\";\n\nexport {\n Card,\n cardVariants,\n CardHeader,\n CardTitle,\n CardDescription,\n CardBody,\n CardFooter,\n};\n","import * as React from \"react\";\n\nexport interface FormFieldContextValue {\n fieldId: string;\n labelId: string;\n errorId: string;\n hintId: string;\n hasError: boolean;\n required: boolean;\n disabled: boolean;\n}\n\nconst defaultContext: FormFieldContextValue = {\n fieldId: \"\",\n labelId: \"\",\n errorId: \"\",\n hintId: \"\",\n hasError: false,\n required: false,\n disabled: false,\n};\n\nexport const FormFieldContext = React.createContext(defaultContext);\n\nexport function useFormField(): FormFieldContextValue {\n return React.useContext(FormFieldContext);\n}\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Text } from \"@nuka/components/Text\";\nimport { FormFieldContext } from \"@nuka/components/FormField/FormField.context\";\nimport type { FormFieldContextValue } from \"@nuka/components/FormField/FormField.context\";\n\nexport interface FormFieldProps extends React.HTMLAttributes<HTMLDivElement> {\n id?: string;\n error?: string;\n hint?: string;\n required?: boolean;\n disabled?: boolean;\n}\n\nconst FormField = React.forwardRef<HTMLDivElement, FormFieldProps>(\n (\n {\n className,\n children,\n id,\n error,\n hint,\n required = false,\n disabled = false,\n ...props\n },\n ref,\n ) => {\n const generatedId = React.useId();\n const baseId = id ?? generatedId;\n\n const contextValue: FormFieldContextValue = React.useMemo(\n () => ({\n fieldId: baseId,\n labelId: `${baseId}-label`,\n errorId: `${baseId}-error`,\n hintId: `${baseId}-hint`,\n hasError: !!error,\n required,\n disabled,\n }),\n [baseId, error, required, disabled],\n );\n\n return (\n <FormFieldContext value={contextValue}>\n <div\n ref={ref}\n className={cn(\"flex flex-col gap-(--space-1)\", className)}\n {...props}\n >\n {children}\n {hint && (\n <Text as=\"p\" size=\"sm\" color=\"muted\" id={contextValue.hintId}>\n {hint}\n </Text>\n )}\n {error && (\n <Text as=\"p\" size=\"sm\" color=\"danger\" id={contextValue.errorId}>\n {error}\n </Text>\n )}\n </div>\n </FormFieldContext>\n );\n },\n);\n\nFormField.displayName = \"FormField\";\n\nexport { FormField };\n","import type * as React from \"react\";\nimport { useFormField } from \"@nuka/components/FormField\";\n\nexport interface UseFormFieldPropsInput {\n id?: string | undefined;\n disabled?: boolean | undefined;\n \"aria-invalid\"?: React.AriaAttributes[\"aria-invalid\"];\n \"aria-describedby\"?: string | undefined;\n \"aria-required\"?: React.AriaAttributes[\"aria-required\"];\n}\n\nexport interface UseFormFieldPropsOptions {\n skipInvalid?: boolean | undefined;\n}\n\nexport interface UseFormFieldPropsResult {\n resolvedId: string | undefined;\n resolvedDisabled: boolean | undefined;\n ariaInvalid: React.AriaAttributes[\"aria-invalid\"];\n ariaDescribedBy: string | undefined;\n ariaRequired: React.AriaAttributes[\"aria-required\"];\n}\n\nexport function useFormFieldProps(\n input: UseFormFieldPropsInput,\n options?: UseFormFieldPropsOptions,\n): UseFormFieldPropsResult {\n const ctx = useFormField();\n\n const resolvedId = input.id ?? (ctx.fieldId || undefined);\n\n const resolvedDisabled = input.disabled ?? (ctx.disabled ? true : undefined);\n\n const ariaInvalid = options?.skipInvalid\n ? undefined\n : (input[\"aria-invalid\"] ?? (ctx.hasError ? true : undefined));\n\n const contextDescribedBy = [ctx.hasError ? ctx.errorId : \"\", ctx.hintId || \"\"]\n .filter(Boolean)\n .join(\" \");\n\n const ariaDescribedBy =\n [input[\"aria-describedby\"], contextDescribedBy].filter(Boolean).join(\" \") ||\n undefined;\n\n const ariaRequired =\n input[\"aria-required\"] ?? (ctx.required ? true : undefined);\n\n return {\n resolvedId,\n resolvedDisabled,\n ariaInvalid,\n ariaDescribedBy,\n ariaRequired,\n };\n}\n","import {\n cva,\n selectionIndicatorIntentVariants,\n type VariantProps,\n} from \"@nuka/utils/variants\";\n\nexport const checkboxWrapperVariants = cva(\n [\"inline-flex items-center gap-(--space-2)\", \"cursor-pointer\", \"select-none\"],\n {\n variants: {\n size: {\n sm: \"min-h-6 min-w-6 text-xs\",\n md: \"min-h-6 min-w-6 text-sm\",\n lg: \"min-h-6 min-w-6 text-base\",\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n },\n);\n\nexport const checkboxIndicatorVariants = cva(\n [\n \"inline-flex items-center justify-center shrink-0\",\n \"rounded-(--radius-sm)\",\n \"border\",\n \"bg-(--nuka-input-bg)\",\n \"text-(--nuka-text-inverse)\",\n \"transition-colors duration-150\",\n \"peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2\",\n \"peer-focus-visible:outline-(--nuka-border-focus)\",\n \"peer-disabled:cursor-not-allowed peer-disabled:opacity-50\",\n \"peer-checked:*:block\",\n ],\n {\n variants: {\n intent: {\n default: \"\",\n danger: \"\",\n success: \"\",\n warning: \"\",\n },\n size: {\n sm: \"size-4\",\n md: \"size-5\",\n lg: \"size-6\",\n },\n },\n compoundVariants: selectionIndicatorIntentVariants,\n defaultVariants: {\n intent: \"default\",\n size: \"md\",\n },\n },\n);\n\nexport const checkboxVariants = checkboxIndicatorVariants;\n\nexport type CheckboxVariantProps = VariantProps<\n typeof checkboxIndicatorVariants\n>;\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { useFormFieldProps } from \"@nuka/hooks/use-form-field-props\";\nimport { Text } from \"@nuka/components/Text\";\nimport {\n checkboxWrapperVariants,\n checkboxIndicatorVariants,\n type CheckboxVariantProps,\n} from \"@nuka/components/Checkbox/Checkbox.variants\";\n\nexport interface CheckboxProps\n extends\n Omit<React.InputHTMLAttributes<HTMLInputElement>, \"size\" | \"type\">,\n CheckboxVariantProps {\n children?: React.ReactNode;\n}\n\nconst Checkbox = React.forwardRef<HTMLInputElement, CheckboxProps>(\n ({ className, intent, size, children, id, disabled, ...props }, ref) => {\n const {\n resolvedId,\n resolvedDisabled,\n ariaInvalid,\n ariaDescribedBy,\n ariaRequired,\n } = useFormFieldProps({\n id,\n disabled,\n \"aria-invalid\": props[\"aria-invalid\"],\n \"aria-describedby\": props[\"aria-describedby\"],\n \"aria-required\": props[\"aria-required\"],\n });\n\n return (\n <label\n className={cn(\n checkboxWrapperVariants({ size }),\n resolvedDisabled ? \"cursor-not-allowed\" : undefined,\n className,\n )}\n >\n <input\n ref={ref}\n type=\"checkbox\"\n id={resolvedId}\n disabled={resolvedDisabled}\n className=\"peer sr-only\"\n {...props}\n aria-invalid={ariaInvalid}\n aria-describedby={ariaDescribedBy}\n aria-required={ariaRequired}\n />\n <span\n aria-hidden=\"true\"\n className={cn(checkboxIndicatorVariants({ intent, size }))}\n >\n <svg\n className=\"hidden size-full p-0.5\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M3.5 8.5L6.5 11.5L12.5 4.5\" />\n </svg>\n </span>\n {children && <Text as=\"span\">{children}</Text>}\n </label>\n );\n },\n);\n\nCheckbox.displayName = \"Checkbox\";\n\nexport { Checkbox };\n","import { cva, type VariantProps } from \"@nuka/utils/variants\";\n\nexport const codeVariants = cva(\n [\n \"font-mono\",\n \"rounded-(--radius-sm)\",\n // py-0.5: no --space-0.5 token in the current scale\n \"px-(--space-1) py-0.5\",\n \"leading-none\",\n // Reserve border space so layout does not shift between subtle and outline variants.\n \"border border-transparent\",\n ],\n {\n variants: {\n variant: {\n subtle: [],\n outline: [],\n ghost: [],\n },\n intent: {\n default: \"\",\n danger: \"\",\n success: \"\",\n warning: \"\",\n },\n size: {\n sm: \"text-[length:var(--font-size-xs)]\",\n md: \"text-[length:var(--font-size-sm)]\",\n lg: \"text-[length:var(--font-size-md)]\",\n },\n },\n\n compoundVariants: [\n {\n variant: \"subtle\",\n intent: \"default\",\n className: [\"bg-(--nuka-bg-muted)\", \"text-(--nuka-text-base)\"],\n },\n {\n variant: \"subtle\",\n intent: \"danger\",\n className: [\"bg-(--nuka-danger-bg)\", \"text-(--nuka-danger-text)\"],\n },\n {\n variant: \"subtle\",\n intent: \"success\",\n className: [\"bg-(--nuka-success-bg)\", \"text-(--nuka-success-text)\"],\n },\n {\n variant: \"subtle\",\n intent: \"warning\",\n className: [\"bg-(--nuka-warning-bg)\", \"text-(--nuka-warning-text)\"],\n },\n\n {\n variant: \"outline\",\n intent: \"default\",\n className: [\"border-(--nuka-border-strong)\", \"text-(--nuka-text-base)\"],\n },\n {\n variant: \"outline\",\n intent: \"danger\",\n className: [\n \"border-(--nuka-danger-border)\",\n \"text-(--nuka-danger-text)\",\n ],\n },\n {\n variant: \"outline\",\n intent: \"success\",\n className: [\n \"border-(--nuka-success-border)\",\n \"text-(--nuka-success-text)\",\n ],\n },\n {\n variant: \"outline\",\n intent: \"warning\",\n className: [\n \"border-(--nuka-warning-border)\",\n \"text-(--nuka-warning-text)\",\n ],\n },\n\n {\n variant: \"ghost\",\n intent: \"default\",\n className: [\"text-(--nuka-text-muted)\"],\n },\n {\n variant: \"ghost\",\n intent: \"danger\",\n className: [\"text-(--nuka-danger-text)\"],\n },\n {\n variant: \"ghost\",\n intent: \"success\",\n className: [\"text-(--nuka-success-text)\"],\n },\n {\n variant: \"ghost\",\n intent: \"warning\",\n className: [\"text-(--nuka-warning-text)\"],\n },\n ],\n\n defaultVariants: {\n variant: \"subtle\",\n intent: \"default\",\n size: \"md\",\n },\n },\n);\n\nexport type CodeVariantProps = VariantProps<typeof codeVariants>;\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport {\n codeVariants,\n type CodeVariantProps,\n} from \"@nuka/components/Code/Code.variants\";\n\nexport interface CodeProps\n extends React.HTMLAttributes<HTMLElement>, CodeVariantProps {}\n\nconst Code = React.forwardRef<HTMLElement, CodeProps>(\n ({ className, variant, intent, size, ...props }, ref) => {\n return (\n <code\n ref={ref}\n className={cn(codeVariants({ variant, intent, size }), className)}\n {...props}\n />\n );\n },\n);\n\nCode.displayName = \"Code\";\n\nexport { Code, codeVariants };\n","import * as ReactDOM from \"react-dom\";\nimport type { ReactNode } from \"react\";\n\ninterface PortalProps {\n children: ReactNode;\n}\n\nfunction Portal({ children }: PortalProps) {\n if (typeof document === \"undefined\") return null;\n return ReactDOM.createPortal(children, document.body);\n}\n\nPortal.displayName = \"Portal\";\n\nexport { Portal };\nexport type { PortalProps };\n","import { useEffect } from \"react\";\n\nlet lockCount = 0;\nlet originalOverflow = \"\";\nlet originalPaddingRight = \"\";\n\nfunction useScrollLock(active: boolean) {\n useEffect(() => {\n if (!active) return undefined;\n if (typeof document === \"undefined\") return undefined;\n\n lockCount++;\n\n if (lockCount === 1) {\n originalOverflow = document.body.style.overflow;\n originalPaddingRight = document.body.style.paddingRight;\n\n const scrollbarWidth =\n window.innerWidth - document.documentElement.clientWidth;\n\n document.body.style.overflow = \"hidden\";\n if (scrollbarWidth > 0) {\n document.body.style.paddingRight = String(scrollbarWidth) + \"px\";\n }\n }\n\n return () => {\n lockCount--;\n\n if (lockCount === 0) {\n document.body.style.overflow = originalOverflow;\n document.body.style.paddingRight = originalPaddingRight;\n }\n };\n }, [active]);\n}\n\n// Exposed for test cleanup only. Not part of the public API.\nfunction __resetScrollLock() {\n lockCount = 0;\n originalOverflow = \"\";\n originalPaddingRight = \"\";\n}\n\nexport { useScrollLock, __resetScrollLock };\n","import { useEffect } from \"react\";\n\nfunction useEscapeKey(onEscape: () => void, enabled: boolean): void {\n useEffect(() => {\n if (!enabled) return undefined;\n\n function handleEscape(e: KeyboardEvent) {\n if (e.key === \"Escape\") {\n e.stopPropagation();\n onEscape();\n }\n }\n\n document.addEventListener(\"keydown\", handleEscape);\n return () => document.removeEventListener(\"keydown\", handleEscape);\n }, [enabled, onEscape]);\n}\n\nexport { useEscapeKey };\n","import { createContext, useContext } from \"react\";\n\nexport interface CommandMenuContextValue {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n filter: string;\n setFilter: (value: string) => void;\n activeItemId: string | null;\n setActiveItemId: (id: string | null) => void;\n visibleCount: number;\n baseId: string;\n listboxId: string;\n inputId: string;\n listRef: React.RefObject<HTMLDivElement | null>;\n}\n\nconst CommandMenuContext = createContext<CommandMenuContextValue | null>(null);\n\nfunction useCommandMenuContext(): CommandMenuContextValue {\n const ctx = useContext(CommandMenuContext);\n if (ctx === null) {\n throw new Error(\n \"CommandMenu compound components must be used within <CommandMenu>.\",\n );\n }\n return ctx;\n}\n\nexport { CommandMenuContext, useCommandMenuContext };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Portal } from \"@nuka/utils/portal\";\nimport { useScrollLock } from \"@nuka/hooks/use-scroll-lock\";\nimport { useEscapeKey } from \"@nuka/hooks/use-escape-key\";\nimport { useControllableState } from \"@nuka/hooks/use-controllable-state\";\nimport { Icon } from \"@nuka/components/Icon\";\nimport { Text } from \"@nuka/components/Text\";\nimport {\n CommandMenuContext,\n useCommandMenuContext,\n} from \"@nuka/components/CommandMenu/CommandMenu.context\";\n\nexport interface CommandMenuProps {\n children: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n}\n\nfunction getVisibleItems(\n listRef: React.RefObject<HTMLDivElement | null>,\n): HTMLElement[] {\n if (listRef.current == null) return [];\n return Array.from(\n listRef.current.querySelectorAll<HTMLElement>(\n '[role=\"option\"]:not([hidden])',\n ),\n );\n}\n\nfunction CommandMenu({\n children,\n open: controlledOpen,\n defaultOpen = false,\n onOpenChange,\n}: CommandMenuProps) {\n const [open, setOpen] = useControllableState(\n controlledOpen,\n defaultOpen,\n onOpenChange,\n );\n\n const [filter, setFilter] = React.useState(\"\");\n const [activeItemId, setActiveItemId] = React.useState<string | null>(null);\n const [visibleCount, setVisibleCount] = React.useState(0);\n\n const baseId = React.useId();\n const listboxId = `${baseId}-listbox`;\n const inputId = `${baseId}-input`;\n const listRef = React.useRef<HTMLDivElement>(null);\n const restoreRef = React.useRef<HTMLElement | null>(null);\n\n useScrollLock(open);\n useEscapeKey(\n React.useCallback(() => setOpen(false), [setOpen]),\n open,\n );\n\n // Update visibleCount after each filter change\n React.useEffect(() => {\n if (!open) return;\n const count = getVisibleItems(listRef).length;\n setVisibleCount(count);\n }, [open, filter]);\n\n // Save focus on open, restore on close\n React.useEffect(() => {\n if (open) {\n restoreRef.current = document.activeElement as HTMLElement | null;\n } else if (restoreRef.current != null) {\n restoreRef.current.focus();\n restoreRef.current = null;\n }\n }, [open]);\n\n // Reset filter and active item when closing\n React.useEffect(() => {\n if (!open) {\n setFilter(\"\");\n setActiveItemId(null);\n }\n }, [open]);\n\n const contextValue = React.useMemo(\n () => ({\n open,\n onOpenChange: setOpen,\n filter,\n setFilter,\n activeItemId,\n setActiveItemId,\n visibleCount,\n baseId,\n listboxId,\n inputId,\n listRef,\n }),\n [\n open,\n setOpen,\n filter,\n activeItemId,\n visibleCount,\n baseId,\n listboxId,\n inputId,\n ],\n );\n\n if (!open) return null;\n\n return (\n <CommandMenuContext value={contextValue}>\n <Portal>\n <div\n className={cn(\n \"fixed inset-0 z-(--nuka-z-modal)\",\n \"bg-(--nuka-bg-overlay)\",\n )}\n onClick={() => setOpen(false)}\n aria-hidden=\"true\"\n />\n <div\n className={cn(\n \"fixed z-(--nuka-z-modal)\",\n \"left-1/2 top-[20%] -translate-x-1/2\",\n \"w-full max-w-lg\",\n \"rounded-(--radius-xl) border border-(--nuka-border-base)\",\n \"bg-(--nuka-bg-base) shadow-(--nuka-shadow-modal)\",\n \"overflow-hidden\",\n )}\n >\n {children}\n </div>\n </Portal>\n </CommandMenuContext>\n );\n}\n\nCommandMenu.displayName = \"CommandMenu\";\n\nconst SearchIcon = () => (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <circle cx=\"11\" cy=\"11\" r=\"8\" />\n <path d=\"m21 21-4.3-4.3\" />\n </svg>\n);\n\nexport interface CommandMenuInputProps extends Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n \"value\" | \"onChange\"\n> {}\n\nconst CommandMenuInput = React.forwardRef<\n HTMLInputElement,\n CommandMenuInputProps\n>(({ className, ...props }, ref) => {\n const ctx = useCommandMenuContext();\n const internalRef = React.useRef<HTMLInputElement>(null);\n const composedRef = React.useCallback(\n (node: HTMLInputElement | null) => {\n internalRef.current = node;\n if (typeof ref === \"function\") {\n ref(node);\n } else if (ref != null) {\n ref.current = node;\n }\n },\n [ref],\n );\n\n // Focus input when the menu opens\n React.useEffect(() => {\n if (ctx.open) {\n requestAnimationFrame(() => {\n internalRef.current?.focus();\n });\n }\n }, [ctx.open]);\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n const items = getVisibleItems(ctx.listRef);\n\n switch (e.key) {\n case \"ArrowDown\": {\n e.preventDefault();\n if (items.length === 0) return;\n const currentIdx = items.findIndex((el) => el.id === ctx.activeItemId);\n const nextIdx = currentIdx === -1 ? 0 : (currentIdx + 1) % items.length;\n const next = items[nextIdx];\n if (next != null) {\n ctx.setActiveItemId(next.id);\n }\n break;\n }\n case \"ArrowUp\": {\n e.preventDefault();\n if (items.length === 0) return;\n const currentIdx = items.findIndex((el) => el.id === ctx.activeItemId);\n const prevIdx =\n currentIdx === -1\n ? items.length - 1\n : (currentIdx - 1 + items.length) % items.length;\n const prev = items[prevIdx];\n if (prev != null) {\n ctx.setActiveItemId(prev.id);\n }\n break;\n }\n case \"Home\": {\n e.preventDefault();\n const first = items[0];\n if (first != null) {\n ctx.setActiveItemId(first.id);\n }\n break;\n }\n case \"End\": {\n e.preventDefault();\n const last = items[items.length - 1];\n if (last != null) {\n ctx.setActiveItemId(last.id);\n }\n break;\n }\n case \"Enter\": {\n e.preventDefault();\n if (ctx.activeItemId != null) {\n const activeEl = document.getElementById(ctx.activeItemId);\n if (\n activeEl != null &&\n activeEl.getAttribute(\"aria-disabled\") !== \"true\"\n ) {\n activeEl.click();\n }\n }\n break;\n }\n case \"Tab\": {\n ctx.onOpenChange(false);\n break;\n }\n default:\n break;\n }\n };\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n ctx.setFilter(e.target.value);\n ctx.setActiveItemId(null);\n };\n\n const activedescendant = ctx.activeItemId ?? undefined;\n\n return (\n <div\n className={cn(\n \"flex items-center gap-(--space-2) px-(--space-3)\",\n \"border-b border-(--nuka-border-base)\",\n )}\n >\n <Icon size=\"sm\" color=\"muted\">\n <SearchIcon />\n </Icon>\n <input\n ref={composedRef}\n id={ctx.inputId}\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-expanded={true}\n aria-controls={ctx.listboxId}\n aria-activedescendant={activedescendant}\n value={ctx.filter}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n className={cn(\n \"flex-1 bg-transparent py-(--space-3)\",\n \"text-sm text-(--nuka-text-base)\",\n \"placeholder:text-(--nuka-text-muted)\",\n \"outline-none\",\n className,\n )}\n {...props}\n />\n </div>\n );\n});\n\nCommandMenuInput.displayName = \"CommandMenuInput\";\n\nexport interface CommandMenuListProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst CommandMenuList = React.forwardRef<HTMLDivElement, CommandMenuListProps>(\n ({ className, ...props }, ref) => {\n const ctx = useCommandMenuContext();\n const composedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n ctx.listRef.current = node;\n if (typeof ref === \"function\") {\n ref(node);\n } else if (ref != null) {\n ref.current = node;\n }\n },\n [ref, ctx.listRef],\n );\n\n return (\n <div\n ref={composedRef}\n id={ctx.listboxId}\n role=\"listbox\"\n aria-label=\"Suggestions\"\n className={cn(\"overflow-y-auto max-h-80 p-(--space-1)\", className)}\n {...props}\n />\n );\n },\n);\n\nCommandMenuList.displayName = \"CommandMenuList\";\n\nexport interface CommandMenuEmptyProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst CommandMenuEmpty = React.forwardRef<\n HTMLDivElement,\n CommandMenuEmptyProps\n>(({ className, children, ...props }, ref) => {\n const ctx = useCommandMenuContext();\n\n if (ctx.visibleCount > 0) return null;\n\n return (\n <div\n ref={ref}\n role=\"presentation\"\n className={cn(\"py-(--space-8) text-center\", className)}\n {...props}\n >\n <Text size=\"sm\" color=\"muted\">\n {children}\n </Text>\n </div>\n );\n});\n\nCommandMenuEmpty.displayName = \"CommandMenuEmpty\";\n\nexport interface CommandMenuGroupProps extends React.HTMLAttributes<HTMLDivElement> {\n heading?: string;\n}\n\nconst CommandMenuGroup = React.forwardRef<\n HTMLDivElement,\n CommandMenuGroupProps\n>(({ heading, className, children, ...props }, ref) => {\n const headingId = React.useId();\n const groupRef = React.useRef<HTMLDivElement>(null);\n const [hasVisibleItems, setHasVisibleItems] = React.useState(true);\n const ctx = useCommandMenuContext();\n\n const composedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n groupRef.current = node;\n if (typeof ref === \"function\") {\n ref(node);\n } else if (ref != null) {\n ref.current = node;\n }\n },\n [ref],\n );\n\n React.useEffect(() => {\n if (groupRef.current == null) return;\n const visible =\n groupRef.current.querySelector('[role=\"option\"]:not([hidden])') !== null;\n setHasVisibleItems(visible);\n }, [ctx.filter]);\n\n return (\n <div\n ref={composedRef}\n role=\"group\"\n aria-labelledby={heading != null ? headingId : undefined}\n hidden={!hasVisibleItems || undefined}\n className={cn(className)}\n {...props}\n >\n {heading != null && (\n <div\n id={headingId}\n role=\"presentation\"\n className={cn(\n \"text-xs font-medium text-(--nuka-text-muted)\",\n \"px-(--space-3) py-(--space-2)\",\n )}\n >\n {heading}\n </div>\n )}\n {children}\n </div>\n );\n});\n\nCommandMenuGroup.displayName = \"CommandMenuGroup\";\n\nexport interface CommandMenuItemProps extends Omit<\n React.HTMLAttributes<HTMLDivElement>,\n \"onSelect\"\n> {\n value?: string;\n disabled?: boolean;\n onSelect?: () => void;\n}\n\nconst CommandMenuItem = React.forwardRef<HTMLDivElement, CommandMenuItemProps>(\n (\n { value, disabled = false, onSelect, className, children, ...props },\n ref,\n ) => {\n const ctx = useCommandMenuContext();\n const itemId = React.useId();\n const internalRef = React.useRef<HTMLDivElement>(null);\n\n const composedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n internalRef.current = node;\n if (typeof ref === \"function\") {\n ref(node);\n } else if (ref != null) {\n ref.current = node;\n }\n },\n [ref],\n );\n\n const isFiltered =\n value != null &&\n ctx.filter !== \"\" &&\n !value.toLowerCase().includes(ctx.filter.toLowerCase());\n\n const isActive = ctx.activeItemId === itemId;\n\n // Auto-scroll active item into view\n React.useEffect(() => {\n if (isActive && internalRef.current != null) {\n internalRef.current.scrollIntoView({ block: \"nearest\" });\n }\n }, [isActive]);\n\n const handleClick = () => {\n if (disabled) return;\n onSelect?.();\n ctx.onOpenChange(false);\n };\n\n return (\n <div\n ref={composedRef}\n id={itemId}\n role=\"option\"\n aria-selected={isActive}\n aria-disabled={disabled || undefined}\n hidden={isFiltered || undefined}\n onClick={handleClick}\n className={cn(\n \"flex items-center gap-(--space-2)\",\n \"px-(--space-3) py-(--space-2)\",\n \"rounded-(--radius-md) text-sm cursor-default\",\n \"select-none\",\n isActive && \"bg-(--nuka-bg-muted)\",\n disabled ? \"text-(--nuka-text-disabled)\" : \"text-(--nuka-text-base)\",\n className,\n )}\n {...props}\n >\n {children}\n </div>\n );\n },\n);\n\nCommandMenuItem.displayName = \"CommandMenuItem\";\n\nexport interface CommandMenuShortcutProps extends React.HTMLAttributes<HTMLSpanElement> {}\n\nconst CommandMenuShortcut = React.forwardRef<\n HTMLSpanElement,\n CommandMenuShortcutProps\n>(({ className, ...props }, ref) => (\n <span\n ref={ref}\n aria-hidden=\"true\"\n className={cn(\"ml-auto text-xs text-(--nuka-text-muted)\", className)}\n {...props}\n />\n));\n\nCommandMenuShortcut.displayName = \"CommandMenuShortcut\";\n\nexport {\n CommandMenu,\n CommandMenuInput,\n CommandMenuList,\n CommandMenuEmpty,\n CommandMenuGroup,\n CommandMenuItem,\n CommandMenuShortcut,\n};\n","function hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';\n}\nfunction isTableElement(element) {\n return /^(table|td|th)$/.test(getNodeName(element));\n}\nfunction isTopLayer(element) {\n try {\n if (element.matches(':popover-open')) {\n return true;\n }\n } catch (_e) {\n // no-op\n }\n try {\n return element.matches(':modal');\n } catch (_e) {\n return false;\n }\n}\nconst willChangeRe = /transform|translate|scale|rotate|perspective|filter/;\nconst containRe = /paint|layout|strict|content/;\nconst isNotNone = value => !!value && value !== 'none';\nlet isWebKitValue;\nfunction isContainingBlock(elementOrCss) {\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n // https://drafts.csswg.org/css-transforms-2/#individual-transforms\n return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (isWebKitValue == null) {\n isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');\n }\n return isWebKitValue;\n}\nfunction isLastTraversableNode(node) {\n return /^(html|body|#document)$/.test(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n } else {\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n }\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n","/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nfunction getSideAxis(placement) {\n const firstChar = placement[0];\n return firstChar === 't' || firstChar === 'b' ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start');\n}\nconst lrPlacement = ['left', 'right'];\nconst rlPlacement = ['right', 'left'];\nconst tbPlacement = ['top', 'bottom'];\nconst btPlacement = ['bottom', 'top'];\nfunction getSideList(side, isStart, rtl) {\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rlPlacement : lrPlacement;\n return isStart ? lrPlacement : rlPlacement;\n case 'left':\n case 'right':\n return isStart ? tbPlacement : btPlacement;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n const side = getSide(placement);\n return oppositeSideMap[side] + placement.slice(side.length);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n const {\n x,\n y,\n width,\n height\n } = rect;\n return {\n width,\n height,\n top: y,\n left: x,\n right: x + width,\n bottom: y + height,\n x,\n y\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","/*!\n* tabbable 6.4.0\n* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE\n*/\n// NOTE: separate `:not()` selectors has broader browser support than the newer\n// `:not([inert], [inert] *)` (Feb 2023)\nvar candidateSelectors = ['input:not([inert]):not([inert] *)', 'select:not([inert]):not([inert] *)', 'textarea:not([inert]):not([inert] *)', 'a[href]:not([inert]):not([inert] *)', 'button:not([inert]):not([inert] *)', '[tabindex]:not(slot):not([inert]):not([inert] *)', 'audio[controls]:not([inert]):not([inert] *)', 'video[controls]:not([inert]):not([inert] *)', '[contenteditable]:not([contenteditable=\"false\"]):not([inert]):not([inert] *)', 'details>summary:first-of-type:not([inert]):not([inert] *)', 'details:not([inert]):not([inert] *)'];\nvar candidateSelector = /* #__PURE__ */candidateSelectors.join(',');\nvar NoElement = typeof Element === 'undefined';\nvar matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\nvar getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {\n var _element$getRootNode;\n return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);\n} : function (element) {\n return element === null || element === void 0 ? void 0 : element.ownerDocument;\n};\n\n/**\n * Determines if a node is inert or in an inert ancestor.\n * @param {Node} [node]\n * @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to\n * see if any of them are inert. If false, only `node` itself is considered.\n * @returns {boolean} True if inert itself or by way of being in an inert ancestor.\n * False if `node` is falsy.\n */\nvar _isInert = function isInert(node, lookUp) {\n var _node$getAttribute;\n if (lookUp === void 0) {\n lookUp = true;\n }\n // CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`\n // JS API property; we have to check the attribute, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's an active element\n var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');\n var inert = inertAtt === '' || inertAtt === 'true';\n\n // NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`\n // if it weren't for `matches()` not being a function on shadow roots; the following\n // code works for any kind of node\n var result = inert || lookUp && node && (\n // closest does not exist on shadow roots, so we fall back to a manual\n // lookup upward, in case it is not defined.\n typeof node.closest === 'function' ? node.closest('[inert]') : _isInert(node.parentNode));\n return result;\n};\n\n/**\n * Determines if a node's content is editable.\n * @param {Element} [node]\n * @returns True if it's content-editable; false if it's not or `node` is falsy.\n */\nvar isContentEditable = function isContentEditable(node) {\n var _node$getAttribute2;\n // CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have\n // to use the attribute directly to check for this, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's a non-editable element\n var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');\n return attValue === '' || attValue === 'true';\n};\n\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\nvar getCandidates = function getCandidates(el, includeContainer, filter) {\n // even if `includeContainer=false`, we still have to check it for inertness because\n // if it's inert (either by itself or via its parent), then all its children are inert\n if (_isInert(el)) {\n return [];\n }\n var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));\n if (includeContainer && matches.call(el, candidateSelector)) {\n candidates.unshift(el);\n }\n candidates = candidates.filter(filter);\n return candidates;\n};\n\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidateScope\n * @property {Element} scopeParent contains inner candidates\n * @property {Element[]} candidates list of candidates found in the scope parent\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n * if a function, implies shadow support is enabled and either returns the shadow root of an element\n * or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.<Element|CandidateScope>}\n */\nvar _getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {\n var candidates = [];\n var elementsToCheck = Array.from(elements);\n while (elementsToCheck.length) {\n var element = elementsToCheck.shift();\n if (_isInert(element, false)) {\n // no need to look up since we're drilling down\n // anything inside this container will also be inert\n continue;\n }\n if (element.tagName === 'SLOT') {\n // add shadow dom slot scope (slot itself cannot be focusable)\n var assigned = element.assignedElements();\n var content = assigned.length ? assigned : element.children;\n var nestedCandidates = _getCandidatesIteratively(content, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: nestedCandidates\n });\n }\n } else {\n // check candidate element\n var validCandidate = matches.call(element, candidateSelector);\n if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {\n candidates.push(element);\n }\n\n // iterate over shadow content if possible\n var shadowRoot = element.shadowRoot ||\n // check for an undisclosed shadow\n typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);\n\n // no inert look up because we're already drilling down and checking for inertness\n // on the way down, so all containers to this root node should have already been\n // vetted as non-inert\n var validShadowRoot = !_isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));\n if (shadowRoot && validShadowRoot) {\n // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n // shadow exists, so look at light dom children as fallback BUT create a scope for any\n // child candidates found because they're likely slotted elements (elements that are\n // children of the web component element (which has the shadow), in the light dom, but\n // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n // _after_ we return from this recursive call\n var _nestedCandidates = _getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, _nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: _nestedCandidates\n });\n }\n } else {\n // there's not shadow so just dig into the element's (light dom) children\n // __without__ giving the element special scope treatment\n elementsToCheck.unshift.apply(elementsToCheck, element.children);\n }\n }\n }\n return candidates;\n};\n\n/**\n * @private\n * Determines if the node has an explicitly specified `tabindex` attribute.\n * @param {HTMLElement} node\n * @returns {boolean} True if so; false if not.\n */\nvar hasTabIndex = function hasTabIndex(node) {\n return !isNaN(parseInt(node.getAttribute('tabindex'), 10));\n};\n\n/**\n * Determine the tab index of a given node.\n * @param {HTMLElement} node\n * @returns {number} Tab order (negative, 0, or positive number).\n * @throws {Error} If `node` is falsy.\n */\nvar getTabIndex = function getTabIndex(node) {\n if (!node) {\n throw new Error('No node provided');\n }\n if (node.tabIndex < 0) {\n // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default\n // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n // yet they are still part of the regular tab order; in FF, they get a default\n // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n // order, consider their tab index to be 0.\n // Also browsers do not return `tabIndex` correctly for contentEditable nodes;\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {\n return 0;\n }\n }\n return node.tabIndex;\n};\n\n/**\n * Determine the tab index of a given node __for sort order purposes__.\n * @param {HTMLElement} node\n * @param {boolean} [isScope] True for a custom element with shadow root or slot that, by default,\n * has tabIndex -1, but needs to be sorted by document order in order for its content to be\n * inserted into the correct sort position.\n * @returns {number} Tab order (negative, 0, or positive number).\n */\nvar getSortOrderTabIndex = function getSortOrderTabIndex(node, isScope) {\n var tabIndex = getTabIndex(node);\n if (tabIndex < 0 && isScope && !hasTabIndex(node)) {\n return 0;\n }\n return tabIndex;\n};\nvar sortOrderedTabbables = function sortOrderedTabbables(a, b) {\n return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;\n};\nvar isInput = function isInput(node) {\n return node.tagName === 'INPUT';\n};\nvar isHiddenInput = function isHiddenInput(node) {\n return isInput(node) && node.type === 'hidden';\n};\nvar isDetailsWithSummary = function isDetailsWithSummary(node) {\n var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {\n return child.tagName === 'SUMMARY';\n });\n return r;\n};\nvar getCheckedRadio = function getCheckedRadio(nodes, form) {\n for (var i = 0; i < nodes.length; i++) {\n if (nodes[i].checked && nodes[i].form === form) {\n return nodes[i];\n }\n }\n};\nvar isTabbableRadio = function isTabbableRadio(node) {\n if (!node.name) {\n return true;\n }\n var radioScope = node.form || getRootNode(node);\n var queryRadios = function queryRadios(name) {\n return radioScope.querySelectorAll('input[type=\"radio\"][name=\"' + name + '\"]');\n };\n var radioSet;\n if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {\n radioSet = queryRadios(window.CSS.escape(node.name));\n } else {\n try {\n radioSet = queryRadios(node.name);\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);\n return false;\n }\n }\n var checked = getCheckedRadio(radioSet, node.form);\n return !checked || checked === node;\n};\nvar isRadio = function isRadio(node) {\n return isInput(node) && node.type === 'radio';\n};\nvar isNonTabbableRadio = function isNonTabbableRadio(node) {\n return isRadio(node) && !isTabbableRadio(node);\n};\n\n// determines if a node is ultimately attached to the window's document\nvar isNodeAttached = function isNodeAttached(node) {\n var _nodeRoot;\n // The root node is the shadow root if the node is in a shadow DOM; some document otherwise\n // (but NOT _the_ document; see second 'If' comment below for more).\n // If rootNode is shadow root, it'll have a host, which is the element to which the shadow\n // is attached, and the one we need to check if it's in the document or not (because the\n // shadow, and all nodes it contains, is never considered in the document since shadows\n // behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,\n // is hidden, or is not in the document itself but is detached, it will affect the shadow's\n // visibility, including all the nodes it contains). The host could be any normal node,\n // or a custom element (i.e. web component). Either way, that's the one that is considered\n // part of the document, not the shadow root, nor any of its children (i.e. the node being\n // tested).\n // To further complicate things, we have to look all the way up until we find a shadow HOST\n // that is attached (or find none) because the node might be in nested shadows...\n // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the\n // document (per the docs) and while it's a Document-type object, that document does not\n // appear to be the same as the node's `ownerDocument` for some reason, so it's safer\n // to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,\n // using `rootNode.contains(node)` will _always_ be true we'll get false-positives when\n // node is actually detached.\n // NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible\n // if a tabbable/focusable node was quickly added to the DOM, focused, and then removed\n // from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then\n // `ownerDocument` will be `null`, hence the optional chaining on it.\n var nodeRoot = node && getRootNode(node);\n var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;\n\n // in some cases, a detached node will return itself as the root instead of a document or\n // shadow root object, in which case, we shouldn't try to look further up the host chain\n var attached = false;\n if (nodeRoot && nodeRoot !== node) {\n var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;\n attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));\n while (!attached && nodeRootHost) {\n var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;\n // since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,\n // which means we need to get the host's host and check if that parent host is contained\n // in (i.e. attached to) the document\n nodeRoot = getRootNode(nodeRootHost);\n nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;\n attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));\n }\n }\n return attached;\n};\nvar isZeroArea = function isZeroArea(node) {\n var _node$getBoundingClie = node.getBoundingClientRect(),\n width = _node$getBoundingClie.width,\n height = _node$getBoundingClie.height;\n return width === 0 && height === 0;\n};\nvar isHidden = function isHidden(node, _ref) {\n var displayCheck = _ref.displayCheck,\n getShadowRoot = _ref.getShadowRoot;\n if (displayCheck === 'full-native') {\n if ('checkVisibility' in node) {\n // Chrome >= 105, Edge >= 105, Firefox >= 106, Safari >= 17.4\n // @see https://developer.mozilla.org/en-US/docs/Web/API/Element/checkVisibility#browser_compatibility\n var visible = node.checkVisibility({\n // Checking opacity might be desirable for some use cases, but natively,\n // opacity zero elements _are_ focusable and tabbable.\n checkOpacity: false,\n opacityProperty: false,\n contentVisibilityAuto: true,\n visibilityProperty: true,\n // This is an alias for `visibilityProperty`. Contemporary browsers\n // support both. However, this alias has wider browser support (Chrome\n // >= 105 and Firefox >= 106, vs. Chrome >= 121 and Firefox >= 122), so\n // we include it anyway.\n checkVisibilityCSS: true\n });\n return !visible;\n }\n // Fall through to manual visibility checks\n }\n\n // NOTE: visibility will be `undefined` if node is detached from the document\n // (see notes about this further down), which means we will consider it visible\n // (this is legacy behavior from a very long way back)\n // NOTE: we check this regardless of `displayCheck=\"none\"` because this is a\n // _visibility_ check, not a _display_ check\n if (getComputedStyle(node).visibility === 'hidden') {\n return true;\n }\n var isDirectSummary = matches.call(node, 'details>summary:first-of-type');\n var nodeUnderDetails = isDirectSummary ? node.parentElement : node;\n if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {\n return true;\n }\n if (!displayCheck || displayCheck === 'full' ||\n // full-native can run this branch when it falls through in case\n // Element#checkVisibility is unsupported\n displayCheck === 'full-native' || displayCheck === 'legacy-full') {\n if (typeof getShadowRoot === 'function') {\n // figure out if we should consider the node to be in an undisclosed shadow and use the\n // 'non-zero-area' fallback\n var originalNode = node;\n while (node) {\n var parentElement = node.parentElement;\n var rootNode = getRootNode(node);\n if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow\n ) {\n // node has an undisclosed shadow which means we can only treat it as a black box, so we\n // fall back to a non-zero-area test\n return isZeroArea(node);\n } else if (node.assignedSlot) {\n // iterate up slot\n node = node.assignedSlot;\n } else if (!parentElement && rootNode !== node.ownerDocument) {\n // cross shadow boundary\n node = rootNode.host;\n } else {\n // iterate up normal dom\n node = parentElement;\n }\n }\n node = originalNode;\n }\n // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support\n // (i.e. it does not also presume that all nodes might have undisclosed shadows); or\n // it might be a falsy value, which means shadow DOM support is disabled\n\n // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)\n // now we can just test to see if it would normally be visible or not, provided it's\n // attached to the main document.\n // NOTE: We must consider case where node is inside a shadow DOM and given directly to\n // `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.\n\n if (isNodeAttached(node)) {\n // this works wherever the node is: if there's at least one client rect, it's\n // somehow displayed; it also covers the CSS 'display: contents' case where the\n // node itself is hidden in place of its contents; and there's no need to search\n // up the hierarchy either\n return !node.getClientRects().length;\n }\n\n // Else, the node isn't attached to the document, which means the `getClientRects()`\n // API will __always__ return zero rects (this can happen, for example, if React\n // is used to render nodes onto a detached tree, as confirmed in this thread:\n // https://github.com/facebook/react/issues/9117#issuecomment-284228870)\n //\n // It also means that even window.getComputedStyle(node).display will return `undefined`\n // because styles are only computed for nodes that are in the document.\n //\n // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable\n // somehow. Though it was never stated officially, anyone who has ever used tabbable\n // APIs on nodes in detached containers has actually implicitly used tabbable in what\n // was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck=\"none\"` mode -- essentially\n // considering __everything__ to be visible because of the innability to determine styles.\n //\n // v6.0.0: As of this major release, the default 'full' option __no longer treats detached\n // nodes as visible with the 'none' fallback.__\n if (displayCheck !== 'legacy-full') {\n return true; // hidden\n }\n // else, fallback to 'none' mode and consider the node visible\n } else if (displayCheck === 'non-zero-area') {\n // NOTE: Even though this tests that the node's client rect is non-zero to determine\n // whether it's displayed, and that a detached node will __always__ have a zero-area\n // client rect, we don't special-case for whether the node is attached or not. In\n // this mode, we do want to consider nodes that have a zero area to be hidden at all\n // times, and that includes attached or not.\n return isZeroArea(node);\n }\n\n // visible, as far as we can tell, or per current `displayCheck=none` mode, we assume\n // it's visible\n return false;\n};\n\n// form fields (nested) inside a disabled fieldset are not focusable/tabbable\n// unless they are in the _first_ <legend> element of the top-most disabled\n// fieldset\nvar isDisabledFromFieldset = function isDisabledFromFieldset(node) {\n if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {\n var parentNode = node.parentElement;\n // check if `node` is contained in a disabled <fieldset>\n while (parentNode) {\n if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {\n // look for the first <legend> among the children of the disabled <fieldset>\n for (var i = 0; i < parentNode.children.length; i++) {\n var child = parentNode.children.item(i);\n // when the first <legend> (in document order) is found\n if (child.tagName === 'LEGEND') {\n // if its parent <fieldset> is not nested in another disabled <fieldset>,\n // return whether `node` is a descendant of its first <legend>\n return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);\n }\n }\n // the disabled <fieldset> containing `node` has no <legend>\n return true;\n }\n parentNode = parentNode.parentElement;\n }\n }\n\n // else, node's tabbable/focusable state should not be affected by a fieldset's\n // enabled/disabled state\n return false;\n};\nvar isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {\n if (node.disabled || isHiddenInput(node) || isHidden(node, options) ||\n // For a details element with a summary, the summary element gets the focus\n isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {\n return false;\n }\n return true;\n};\nvar isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {\n if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {\n return false;\n }\n return true;\n};\nvar isShadowRootTabbable = function isShadowRootTabbable(shadowHostNode) {\n var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);\n if (isNaN(tabIndex) || tabIndex >= 0) {\n return true;\n }\n // If a custom element has an explicit negative tabindex,\n // browsers will not allow tab targeting said element's children.\n return false;\n};\n\n/**\n * @param {Array.<Element|CandidateScope>} candidates\n * @returns Element[]\n */\nvar _sortByOrder = function sortByOrder(candidates) {\n var regularTabbables = [];\n var orderedTabbables = [];\n candidates.forEach(function (item, i) {\n var isScope = !!item.scopeParent;\n var element = isScope ? item.scopeParent : item;\n var candidateTabindex = getSortOrderTabIndex(element, isScope);\n var elements = isScope ? _sortByOrder(item.candidates) : element;\n if (candidateTabindex === 0) {\n isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);\n } else {\n orderedTabbables.push({\n documentOrder: i,\n tabIndex: candidateTabindex,\n item: item,\n isScope: isScope,\n content: elements\n });\n }\n });\n return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {\n sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);\n return acc;\n }, []).concat(regularTabbables);\n};\nvar tabbable = function tabbable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = _getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorTabbable.bind(null, options),\n flatten: false,\n getShadowRoot: options.getShadowRoot,\n shadowRootFilter: isShadowRootTabbable\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));\n }\n return _sortByOrder(candidates);\n};\nvar focusable = function focusable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = _getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorFocusable.bind(null, options),\n flatten: true,\n getShadowRoot: options.getShadowRoot\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));\n }\n return candidates;\n};\nvar isTabbable = function isTabbable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, candidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorTabbable(options, node);\n};\nvar focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe:not([inert]):not([inert] *)').join(',');\nvar isFocusable = function isFocusable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, focusableCandidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorFocusable(options, node);\n};\n\nexport { focusable, getTabIndex, isFocusable, isTabbable, tabbable };\n//# sourceMappingURL=index.esm.js.map\n","import { isShadowRoot, isHTMLElement } from '@floating-ui/utils/dom';\nimport * as React from 'react';\nimport { useLayoutEffect } from 'react';\nimport { floor } from '@floating-ui/utils';\nimport { tabbable } from 'tabbable';\n\n// Avoid Chrome DevTools blue warning.\nfunction getPlatform() {\n const uaData = navigator.userAgentData;\n if (uaData != null && uaData.platform) {\n return uaData.platform;\n }\n return navigator.platform;\n}\nfunction getUserAgent() {\n const uaData = navigator.userAgentData;\n if (uaData && Array.isArray(uaData.brands)) {\n return uaData.brands.map(_ref => {\n let {\n brand,\n version\n } = _ref;\n return brand + \"/\" + version;\n }).join(' ');\n }\n return navigator.userAgent;\n}\nfunction isSafari() {\n // Chrome DevTools does not complain about navigator.vendor\n return /apple/i.test(navigator.vendor);\n}\nfunction isAndroid() {\n const re = /android/i;\n return re.test(getPlatform()) || re.test(getUserAgent());\n}\nfunction isMac() {\n return getPlatform().toLowerCase().startsWith('mac') && !navigator.maxTouchPoints;\n}\nfunction isJSDOM() {\n return getUserAgent().includes('jsdom/');\n}\n\nconst FOCUSABLE_ATTRIBUTE = 'data-floating-ui-focusable';\nconst TYPEABLE_SELECTOR = \"input:not([type='hidden']):not([disabled]),\" + \"[contenteditable]:not([contenteditable='false']),textarea:not([disabled])\";\nconst ARROW_LEFT = 'ArrowLeft';\nconst ARROW_RIGHT = 'ArrowRight';\nconst ARROW_UP = 'ArrowUp';\nconst ARROW_DOWN = 'ArrowDown';\n\nfunction activeElement(doc) {\n let activeElement = doc.activeElement;\n while (((_activeElement = activeElement) == null || (_activeElement = _activeElement.shadowRoot) == null ? void 0 : _activeElement.activeElement) != null) {\n var _activeElement;\n activeElement = activeElement.shadowRoot.activeElement;\n }\n return activeElement;\n}\nfunction contains(parent, child) {\n if (!parent || !child) {\n return false;\n }\n const rootNode = child.getRootNode == null ? void 0 : child.getRootNode();\n\n // First, attempt with faster native method\n if (parent.contains(child)) {\n return true;\n }\n\n // then fallback to custom implementation with Shadow DOM support\n if (rootNode && isShadowRoot(rootNode)) {\n let next = child;\n while (next) {\n if (parent === next) {\n return true;\n }\n // @ts-ignore\n next = next.parentNode || next.host;\n }\n }\n\n // Give up, the result is false\n return false;\n}\nfunction getTarget(event) {\n if ('composedPath' in event) {\n return event.composedPath()[0];\n }\n\n // TS thinks `event` is of type never as it assumes all browsers support\n // `composedPath()`, but browsers without shadow DOM don't.\n return event.target;\n}\nfunction isEventTargetWithin(event, node) {\n if (node == null) {\n return false;\n }\n if ('composedPath' in event) {\n return event.composedPath().includes(node);\n }\n\n // TS thinks `event` is of type never as it assumes all browsers support composedPath, but browsers without shadow dom don't\n const e = event;\n return e.target != null && node.contains(e.target);\n}\nfunction isRootElement(element) {\n return element.matches('html,body');\n}\nfunction getDocument(node) {\n return (node == null ? void 0 : node.ownerDocument) || document;\n}\nfunction isTypeableElement(element) {\n return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR);\n}\nfunction isTypeableCombobox(element) {\n if (!element) return false;\n return element.getAttribute('role') === 'combobox' && isTypeableElement(element);\n}\nfunction matchesFocusVisible(element) {\n // We don't want to block focus from working with `visibleOnly`\n // (JSDOM doesn't match `:focus-visible` when the element has `:focus`)\n if (!element || isJSDOM()) return true;\n try {\n return element.matches(':focus-visible');\n } catch (_e) {\n return true;\n }\n}\nfunction getFloatingFocusElement(floatingElement) {\n if (!floatingElement) {\n return null;\n }\n // Try to find the element that has `{...getFloatingProps()}` spread on it.\n // This indicates the floating element is acting as a positioning wrapper, and\n // so focus should be managed on the child element with the event handlers and\n // aria props.\n return floatingElement.hasAttribute(FOCUSABLE_ATTRIBUTE) ? floatingElement : floatingElement.querySelector(\"[\" + FOCUSABLE_ATTRIBUTE + \"]\") || floatingElement;\n}\n\nfunction getNodeChildren(nodes, id, onlyOpenChildren) {\n if (onlyOpenChildren === void 0) {\n onlyOpenChildren = true;\n }\n const directChildren = nodes.filter(node => {\n var _node$context;\n return node.parentId === id && (!onlyOpenChildren || ((_node$context = node.context) == null ? void 0 : _node$context.open));\n });\n return directChildren.flatMap(child => [child, ...getNodeChildren(nodes, child.id, onlyOpenChildren)]);\n}\nfunction getDeepestNode(nodes, id) {\n let deepestNodeId;\n let maxDepth = -1;\n function findDeepest(nodeId, depth) {\n if (depth > maxDepth) {\n deepestNodeId = nodeId;\n maxDepth = depth;\n }\n const children = getNodeChildren(nodes, nodeId);\n children.forEach(child => {\n findDeepest(child.id, depth + 1);\n });\n }\n findDeepest(id, 0);\n return nodes.find(node => node.id === deepestNodeId);\n}\nfunction getNodeAncestors(nodes, id) {\n var _nodes$find;\n let allAncestors = [];\n let currentParentId = (_nodes$find = nodes.find(node => node.id === id)) == null ? void 0 : _nodes$find.parentId;\n while (currentParentId) {\n const currentNode = nodes.find(node => node.id === currentParentId);\n currentParentId = currentNode == null ? void 0 : currentNode.parentId;\n if (currentNode) {\n allAncestors = allAncestors.concat(currentNode);\n }\n }\n return allAncestors;\n}\n\nfunction stopEvent(event) {\n event.preventDefault();\n event.stopPropagation();\n}\nfunction isReactEvent(event) {\n return 'nativeEvent' in event;\n}\n\n// License: https://github.com/adobe/react-spectrum/blob/b35d5c02fe900badccd0cf1a8f23bb593419f238/packages/@react-aria/utils/src/isVirtualEvent.ts\nfunction isVirtualClick(event) {\n // FIXME: Firefox is now emitting a deprecation warning for `mozInputSource`.\n // Try to find a workaround for this. `react-aria` source still has the check.\n if (event.mozInputSource === 0 && event.isTrusted) {\n return true;\n }\n if (isAndroid() && event.pointerType) {\n return event.type === 'click' && event.buttons === 1;\n }\n return event.detail === 0 && !event.pointerType;\n}\nfunction isVirtualPointerEvent(event) {\n if (isJSDOM()) return false;\n return !isAndroid() && event.width === 0 && event.height === 0 || isAndroid() && event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'mouse' ||\n // iOS VoiceOver returns 0.333• for width/height.\n event.width < 1 && event.height < 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'touch';\n}\nfunction isMouseLikePointerType(pointerType, strict) {\n // On some Linux machines with Chromium, mouse inputs return a `pointerType`\n // of \"pen\": https://github.com/floating-ui/floating-ui/issues/2015\n const values = ['mouse', 'pen'];\n if (!strict) {\n values.push('', undefined);\n }\n return values.includes(pointerType);\n}\n\nvar isClient = typeof document !== 'undefined';\n\nvar noop = function noop() {};\nvar index = isClient ? useLayoutEffect : noop;\n\n// https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379\nconst SafeReact = {\n ...React\n};\n\nfunction useLatestRef(value) {\n const ref = React.useRef(value);\n index(() => {\n ref.current = value;\n });\n return ref;\n}\nconst useInsertionEffect = SafeReact.useInsertionEffect;\nconst useSafeInsertionEffect = useInsertionEffect || (fn => fn());\nfunction useEffectEvent(callback) {\n const ref = React.useRef(() => {\n if (process.env.NODE_ENV !== \"production\") {\n throw new Error('Cannot call an event handler while rendering.');\n }\n });\n useSafeInsertionEffect(() => {\n ref.current = callback;\n });\n return React.useCallback(function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return ref.current == null ? void 0 : ref.current(...args);\n }, []);\n}\n\nfunction isDifferentGridRow(index, cols, prevRow) {\n return Math.floor(index / cols) !== prevRow;\n}\nfunction isIndexOutOfListBounds(listRef, index) {\n return index < 0 || index >= listRef.current.length;\n}\nfunction getMinListIndex(listRef, disabledIndices) {\n return findNonDisabledListIndex(listRef, {\n disabledIndices\n });\n}\nfunction getMaxListIndex(listRef, disabledIndices) {\n return findNonDisabledListIndex(listRef, {\n decrement: true,\n startingIndex: listRef.current.length,\n disabledIndices\n });\n}\nfunction findNonDisabledListIndex(listRef, _temp) {\n let {\n startingIndex = -1,\n decrement = false,\n disabledIndices,\n amount = 1\n } = _temp === void 0 ? {} : _temp;\n let index = startingIndex;\n do {\n index += decrement ? -amount : amount;\n } while (index >= 0 && index <= listRef.current.length - 1 && isListIndexDisabled(listRef, index, disabledIndices));\n return index;\n}\nfunction getGridNavigatedIndex(listRef, _ref) {\n let {\n event,\n orientation,\n loop,\n rtl,\n cols,\n disabledIndices,\n minIndex,\n maxIndex,\n prevIndex,\n stopEvent: stop = false\n } = _ref;\n let nextIndex = prevIndex;\n if (event.key === ARROW_UP) {\n stop && stopEvent(event);\n if (prevIndex === -1) {\n nextIndex = maxIndex;\n } else {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: nextIndex,\n amount: cols,\n decrement: true,\n disabledIndices\n });\n if (loop && (prevIndex - cols < minIndex || nextIndex < 0)) {\n const col = prevIndex % cols;\n const maxCol = maxIndex % cols;\n const offset = maxIndex - (maxCol - col);\n if (maxCol === col) {\n nextIndex = maxIndex;\n } else {\n nextIndex = maxCol > col ? offset : offset - cols;\n }\n }\n }\n if (isIndexOutOfListBounds(listRef, nextIndex)) {\n nextIndex = prevIndex;\n }\n }\n if (event.key === ARROW_DOWN) {\n stop && stopEvent(event);\n if (prevIndex === -1) {\n nextIndex = minIndex;\n } else {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex,\n amount: cols,\n disabledIndices\n });\n if (loop && prevIndex + cols > maxIndex) {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex % cols - cols,\n amount: cols,\n disabledIndices\n });\n }\n }\n if (isIndexOutOfListBounds(listRef, nextIndex)) {\n nextIndex = prevIndex;\n }\n }\n\n // Remains on the same row/column.\n if (orientation === 'both') {\n const prevRow = floor(prevIndex / cols);\n if (event.key === (rtl ? ARROW_LEFT : ARROW_RIGHT)) {\n stop && stopEvent(event);\n if (prevIndex % cols !== cols - 1) {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex,\n disabledIndices\n });\n if (loop && isDifferentGridRow(nextIndex, cols, prevRow)) {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex - prevIndex % cols - 1,\n disabledIndices\n });\n }\n } else if (loop) {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex - prevIndex % cols - 1,\n disabledIndices\n });\n }\n if (isDifferentGridRow(nextIndex, cols, prevRow)) {\n nextIndex = prevIndex;\n }\n }\n if (event.key === (rtl ? ARROW_RIGHT : ARROW_LEFT)) {\n stop && stopEvent(event);\n if (prevIndex % cols !== 0) {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex,\n decrement: true,\n disabledIndices\n });\n if (loop && isDifferentGridRow(nextIndex, cols, prevRow)) {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex + (cols - prevIndex % cols),\n decrement: true,\n disabledIndices\n });\n }\n } else if (loop) {\n nextIndex = findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex + (cols - prevIndex % cols),\n decrement: true,\n disabledIndices\n });\n }\n if (isDifferentGridRow(nextIndex, cols, prevRow)) {\n nextIndex = prevIndex;\n }\n }\n const lastRow = floor(maxIndex / cols) === prevRow;\n if (isIndexOutOfListBounds(listRef, nextIndex)) {\n if (loop && lastRow) {\n nextIndex = event.key === (rtl ? ARROW_RIGHT : ARROW_LEFT) ? maxIndex : findNonDisabledListIndex(listRef, {\n startingIndex: prevIndex - prevIndex % cols - 1,\n disabledIndices\n });\n } else {\n nextIndex = prevIndex;\n }\n }\n }\n return nextIndex;\n}\n\n/** For each cell index, gets the item index that occupies that cell */\nfunction createGridCellMap(sizes, cols, dense) {\n const cellMap = [];\n let startIndex = 0;\n sizes.forEach((_ref2, index) => {\n let {\n width,\n height\n } = _ref2;\n if (width > cols) {\n if (process.env.NODE_ENV !== \"production\") {\n throw new Error(\"[Floating UI]: Invalid grid - item width at index \" + index + \" is greater than grid columns\");\n }\n }\n let itemPlaced = false;\n if (dense) {\n startIndex = 0;\n }\n while (!itemPlaced) {\n const targetCells = [];\n for (let i = 0; i < width; i++) {\n for (let j = 0; j < height; j++) {\n targetCells.push(startIndex + i + j * cols);\n }\n }\n if (startIndex % cols + width <= cols && targetCells.every(cell => cellMap[cell] == null)) {\n targetCells.forEach(cell => {\n cellMap[cell] = index;\n });\n itemPlaced = true;\n } else {\n startIndex++;\n }\n }\n });\n\n // convert into a non-sparse array\n return [...cellMap];\n}\n\n/** Gets cell index of an item's corner or -1 when index is -1. */\nfunction getGridCellIndexOfCorner(index, sizes, cellMap, cols, corner) {\n if (index === -1) return -1;\n const firstCellIndex = cellMap.indexOf(index);\n const sizeItem = sizes[index];\n switch (corner) {\n case 'tl':\n return firstCellIndex;\n case 'tr':\n if (!sizeItem) {\n return firstCellIndex;\n }\n return firstCellIndex + sizeItem.width - 1;\n case 'bl':\n if (!sizeItem) {\n return firstCellIndex;\n }\n return firstCellIndex + (sizeItem.height - 1) * cols;\n case 'br':\n return cellMap.lastIndexOf(index);\n }\n}\n\n/** Gets all cell indices that correspond to the specified indices */\nfunction getGridCellIndices(indices, cellMap) {\n return cellMap.flatMap((index, cellIndex) => indices.includes(index) ? [cellIndex] : []);\n}\nfunction isListIndexDisabled(listRef, index, disabledIndices) {\n if (typeof disabledIndices === 'function') {\n return disabledIndices(index);\n } else if (disabledIndices) {\n return disabledIndices.includes(index);\n }\n const element = listRef.current[index];\n return element == null || element.hasAttribute('disabled') || element.getAttribute('aria-disabled') === 'true';\n}\n\nconst getTabbableOptions = () => ({\n getShadowRoot: true,\n displayCheck:\n // JSDOM does not support the `tabbable` library. To solve this we can\n // check if `ResizeObserver` is a real function (not polyfilled), which\n // determines if the current environment is JSDOM-like.\n typeof ResizeObserver === 'function' && ResizeObserver.toString().includes('[native code]') ? 'full' : 'none'\n});\nfunction getTabbableIn(container, dir) {\n const list = tabbable(container, getTabbableOptions());\n const len = list.length;\n if (len === 0) return;\n const active = activeElement(getDocument(container));\n const index = list.indexOf(active);\n const nextIndex = index === -1 ? dir === 1 ? 0 : len - 1 : index + dir;\n return list[nextIndex];\n}\nfunction getNextTabbable(referenceElement) {\n return getTabbableIn(getDocument(referenceElement).body, 1) || referenceElement;\n}\nfunction getPreviousTabbable(referenceElement) {\n return getTabbableIn(getDocument(referenceElement).body, -1) || referenceElement;\n}\nfunction isOutsideEvent(event, container) {\n const containerElement = container || event.currentTarget;\n const relatedTarget = event.relatedTarget;\n return !relatedTarget || !contains(containerElement, relatedTarget);\n}\nfunction disableFocusInside(container) {\n const tabbableElements = tabbable(container, getTabbableOptions());\n tabbableElements.forEach(element => {\n element.dataset.tabindex = element.getAttribute('tabindex') || '';\n element.setAttribute('tabindex', '-1');\n });\n}\nfunction enableFocusInside(container) {\n const elements = container.querySelectorAll('[data-tabindex]');\n elements.forEach(element => {\n const tabindex = element.dataset.tabindex;\n delete element.dataset.tabindex;\n if (tabindex) {\n element.setAttribute('tabindex', tabindex);\n } else {\n element.removeAttribute('tabindex');\n }\n });\n}\n\nexport { activeElement, contains, createGridCellMap, disableFocusInside, enableFocusInside, findNonDisabledListIndex, getDeepestNode, getDocument, getFloatingFocusElement, getGridCellIndexOfCorner, getGridCellIndices, getGridNavigatedIndex, getMaxListIndex, getMinListIndex, getNextTabbable, getNodeAncestors, getNodeChildren, getPlatform, getPreviousTabbable, getTabbableOptions, getTarget, getUserAgent, isAndroid, isDifferentGridRow, isEventTargetWithin, isIndexOutOfListBounds, isJSDOM, isListIndexDisabled, isMac, isMouseLikePointerType, isOutsideEvent, isReactEvent, isRootElement, isSafari, isTypeableCombobox, isTypeableElement, isVirtualClick, isVirtualPointerEvent, matchesFocusVisible, stopEvent, useEffectEvent, useLatestRef, index as useModernLayoutEffect };\n","import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n switch (getAlignment(placement)) {\n case 'start':\n coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n case 'end':\n coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n }\n return coords;\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n x,\n y,\n width: rects.floating.width,\n height: rects.floating.height\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n } : {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements,\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n// Maximum number of resets that can occur before bailing to avoid infinite reset loops.\nconst MAX_RESET_COUNT = 50;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const platformWithDetectOverflow = platform.detectOverflow ? platform : {\n ...platform,\n detectOverflow\n };\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let resetCount = 0;\n const middlewareData = {};\n for (let i = 0; i < middleware.length; i++) {\n const currentMiddleware = middleware[i];\n if (!currentMiddleware) {\n continue;\n }\n const {\n name,\n fn\n } = currentMiddleware;\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform: platformWithDetectOverflow,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData[name] = {\n ...middlewareData[name],\n ...data\n };\n if (reset && resetCount < MAX_RESET_COUNT) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const min$1 = minPadding;\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(min$1, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n\n // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const initialSideAxis = getSideAxis(initialPlacement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';\n if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;\n if (!ignoreCrossAxisOverflow ||\n // We leave the current main axis only if every placement on that axis\n // overflows the main axis.\n overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$filter2;\n const placement = (_overflowsData$filter2 = overflowsData.filter(d => {\n if (hasFallbackAxisSideDirection) {\n const currentSideAxis = getSideAxis(d.placement);\n return currentSideAxis === initialSideAxis ||\n // Create a bias to the `y` side axis due to horizontal\n // reading directions favoring greater width.\n currentSideAxis === 'y';\n }\n return true;\n }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects,\n platform\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await platform.detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await platform.detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n const left = minLeft;\n const right = maxRight;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\nconst originSides = /*#__PURE__*/new Set(['left', 'top']);\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = originSides.has(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n\n // eslint-disable-next-line prefer-const\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: rawValue.mainAxis || 0,\n crossAxis: rawValue.crossAxis || 0,\n alignmentAxis: rawValue.alignmentAxis\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n var _middlewareData$offse, _middlewareData$arrow;\n const {\n x,\n y,\n placement,\n middlewareData\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n\n // If the placement is the same and the arrow caused an alignment offset\n // then we don't need to change the positioning coordinates.\n if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: {\n ...diffCoords,\n placement\n }\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n platform\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(getSide(placement));\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n if (checkMainAxis) {\n const minSide = mainAxis === 'y' ? 'top' : 'left';\n const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n const min = mainAxisCoord + overflow[minSide];\n const max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = clamp(min, mainAxisCoord, max);\n }\n if (checkCrossAxis) {\n const minSide = crossAxis === 'y' ? 'top' : 'left';\n const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n const min = crossAxisCoord + overflow[minSide];\n const max = crossAxisCoord - overflow[maxSide];\n crossAxisCoord = clamp(min, crossAxisCoord, max);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y,\n enabled: {\n [mainAxis]: checkMainAxis,\n [crossAxis]: checkCrossAxis\n }\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawOffset\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = originSides.has(getSide(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n var _state$middlewareData, _state$middlewareData2;\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n const maximumClippingWidth = width - overflow.left - overflow.right;\n const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);\n const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);\n const noShift = !state.middlewareData.shift;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {\n availableWidth = maximumClippingWidth;\n }\n if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {\n availableHeight = maximumClippingHeight;\n }\n if (noShift && !alignment) {\n const xMin = max(overflow.left, 0);\n const xMax = max(overflow.right, 0);\n const yMin = max(overflow.top, 0);\n const yMax = max(overflow.bottom, 0);\n if (isYAxis) {\n availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n } else {\n availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n","import { rectToClientRect, arrow as arrow$1, autoPlacement as autoPlacement$1, detectOverflow as detectOverflow$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1, computePosition as computePosition$1 } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle as getComputedStyle$1, isHTMLElement, isElement, getWindow, isWebKit, getFrameElement, getNodeScroll, getDocumentElement, isTopLayer, getNodeName, isOverflowElement, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle$1(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement) {\n const win = getWindow(domElement);\n const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = getFrameElement(currentWin);\n while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle$1(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentWin = getWindow(currentIFrame);\n currentIFrame = getFrameElement(currentWin);\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\n// If <html> has a CSS width greater than the viewport, then this will be\n// incorrect for RTL.\nfunction getWindowScrollBarX(element, rect) {\n const leftScroll = getNodeScroll(element).scrollLeft;\n if (!rect) {\n return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;\n }\n return rect.left + leftScroll;\n}\n\nfunction getHTMLOffset(documentElement, scroll) {\n const htmlRect = documentElement.getBoundingClientRect();\n const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);\n const y = htmlRect.top + scroll.scrollTop;\n return {\n x,\n y\n };\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = getDocumentElement(offsetParent);\n const topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y\n };\n}\n\nfunction getClientRects(element) {\n return Array.from(element.getClientRects());\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = element.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n if (getComputedStyle$1(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Safety check: ensure the scrollbar space is reasonable in case this\n// calculation is affected by unusual styles.\n// Most scrollbars leave 15-18px of space.\nconst SCROLLBAR_MAX = 25;\nfunction getViewportRect(element, strategy) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n const visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n const windowScrollbarX = getWindowScrollBarX(html);\n // <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the\n // visual width of the <html> but this is not considered in the size\n // of `html.clientWidth`.\n if (windowScrollbarX <= 0) {\n const doc = html.ownerDocument;\n const body = doc.body;\n const bodyStyles = getComputedStyle(body);\n const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;\n const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);\n if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {\n width -= clippingStableScrollbarWidth;\n }\n } else if (windowScrollbarX <= SCROLLBAR_MAX) {\n // If the <body> scrollbar is on the left, the width needs to be extended\n // by the scrollbar amount so there isn't extra space on the right.\n width += windowScrollbarX;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport') {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y,\n width: clippingAncestor.width,\n height: clippingAncestor.height\n };\n }\n return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n const parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let currentContainingBlockComputedStyle = null;\n const elementIsFixed = getComputedStyle$1(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle$1(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n currentContainingBlockComputedStyle = null;\n }\n const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === 'absolute' || currentContainingBlockComputedStyle.position === 'fixed') || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // Record last containing block for next iteration.\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);\n let top = firstRect.top;\n let right = firstRect.right;\n let bottom = firstRect.bottom;\n let left = firstRect.left;\n for (let i = 1; i < clippingAncestors.length; i++) {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);\n top = max(rect.top, top);\n right = min(rect.right, right);\n bottom = min(rect.bottom, bottom);\n left = max(rect.left, left);\n }\n return {\n width: right - left,\n height: bottom - top,\n x: left,\n y: top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n\n // If the <body> scrollbar appears on the left (e.g. RTL systems). Use\n // Firefox with layout.scrollbar.side = 3 in about:config to test this.\n function setLeftRTLScrollbarOffset() {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n setLeftRTLScrollbarOffset();\n }\n }\n if (isFixed && !isOffsetParentAnElement && documentElement) {\n setLeftRTLScrollbarOffset();\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;\n const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction isStaticPositioned(element) {\n return getComputedStyle$1(element).position === 'static';\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n let rawOffsetParent = element.offsetParent;\n\n // Firefox returns the <html> element as the offsetParent if it's non-static,\n // while Chrome and Safari return the <body> element. The <body> element must\n // be used to perform the correct calculations even if the <html> element is\n // non-static.\n if (getDocumentElement(element) === rawOffsetParent) {\n rawOffsetParent = rawOffsetParent.ownerDocument.body;\n }\n return rawOffsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const win = getWindow(element);\n if (isTopLayer(element)) {\n return win;\n }\n if (!isHTMLElement(element)) {\n let svgOffsetParent = getParentNode(element);\n while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {\n if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {\n return svgOffsetParent;\n }\n svgOffsetParent = getParentNode(svgOffsetParent);\n }\n return win;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {\n return win;\n }\n return offsetParent || getContainingBlock(element) || win;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n const floatingDimensions = await getDimensionsFn(data.floating);\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n floating: {\n x: 0,\n y: 0,\n width: floatingDimensions.width,\n height: floatingDimensions.height\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle$1(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\nfunction rectsAreEqual(a, b) {\n return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;\n}\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const elementRectForRootMargin = element.getBoundingClientRect();\n const {\n left,\n top,\n width,\n height\n } = elementRectForRootMargin;\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n // If the reference is clipped, the ratio is 0. Throttle the refresh\n // to prevent an infinite loop of updates.\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 1000);\n } else {\n refresh(false, ratio);\n }\n }\n if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {\n // It's possible that even though the ratio is reported as 1, the\n // element is not actually fully within the IntersectionObserver's root\n // area anymore. This can happen under performance constraints. This may\n // be a bug in the browser's IntersectionObserver implementation. To\n // work around this, we compare the element's bounding rect now with\n // what it was at the time we created the IntersectionObserver. If they\n // are not equal then the element moved, so we refresh.\n refresh();\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle <iframe>s\n root: root.ownerDocument\n });\n } catch (_e) {\n io = new IntersectionObserver(handleObserve, options);\n }\n io.observe(element);\n }\n refresh(true);\n return cleanup;\n}\n\n/**\n * Automatically updates the position of the floating element when necessary.\n * Should only be called when the floating element is mounted on the DOM or\n * visible on the screen.\n * @returns cleanup function that should be invoked when the floating element is\n * removed from the DOM or hidden from the screen.\n * @see https://floating-ui.com/docs/autoUpdate\n */\nfunction autoUpdate(reference, floating, update, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n ancestorScroll = true,\n ancestorResize = true,\n elementResize = typeof ResizeObserver === 'function',\n layoutShift = typeof IntersectionObserver === 'function',\n animationFrame = false\n } = options;\n const referenceEl = unwrapElement(reference);\n const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...(floating ? getOverflowAncestors(floating) : [])] : [];\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.addEventListener('scroll', update, {\n passive: true\n });\n ancestorResize && ancestor.addEventListener('resize', update);\n });\n const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;\n let reobserveFrame = -1;\n let resizeObserver = null;\n if (elementResize) {\n resizeObserver = new ResizeObserver(_ref => {\n let [firstEntry] = _ref;\n if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {\n // Prevent update loops when using the `size` middleware.\n // https://github.com/floating-ui/floating-ui/issues/1740\n resizeObserver.unobserve(floating);\n cancelAnimationFrame(reobserveFrame);\n reobserveFrame = requestAnimationFrame(() => {\n var _resizeObserver;\n (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);\n });\n }\n update();\n });\n if (referenceEl && !animationFrame) {\n resizeObserver.observe(referenceEl);\n }\n if (floating) {\n resizeObserver.observe(floating);\n }\n }\n let frameId;\n let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;\n if (animationFrame) {\n frameLoop();\n }\n function frameLoop() {\n const nextRefRect = getBoundingClientRect(reference);\n if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {\n update();\n }\n prevRefRect = nextRefRect;\n frameId = requestAnimationFrame(frameLoop);\n }\n update();\n return () => {\n var _resizeObserver2;\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.removeEventListener('scroll', update);\n ancestorResize && ancestor.removeEventListener('resize', update);\n });\n cleanupIo == null || cleanupIo();\n (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();\n resizeObserver = null;\n if (animationFrame) {\n cancelAnimationFrame(frameId);\n }\n };\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nconst detectOverflow = detectOverflow$1;\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = offset$1;\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = autoPlacement$1;\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = shift$1;\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = flip$1;\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = size$1;\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = hide$1;\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = arrow$1;\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = inline$1;\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = limitShift$1;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n */\nconst computePosition = (reference, floating, options) => {\n // This caches the expensive `getClippingElementAncestors` function so that\n // multiple lifecycle resets re-use the same result. It only lives for a\n // single call. If other functions become expensive, we can add them as well.\n const cache = new Map();\n const mergedOptions = {\n platform,\n ...options\n };\n const platformWithCache = {\n ...mergedOptions.platform,\n _c: cache\n };\n return computePosition$1(reference, floating, {\n ...mergedOptions,\n platform: platformWithCache\n });\n};\n\nexport { arrow, autoPlacement, autoUpdate, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, platform, shift, size };\n","import { computePosition, arrow as arrow$2, autoPlacement as autoPlacement$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1 } from '@floating-ui/dom';\nexport { autoUpdate, computePosition, detectOverflow, getOverflowAncestors, platform } from '@floating-ui/dom';\nimport * as React from 'react';\nimport { useLayoutEffect } from 'react';\nimport * as ReactDOM from 'react-dom';\n\nvar isClient = typeof document !== 'undefined';\n\nvar noop = function noop() {};\nvar index = isClient ? useLayoutEffect : noop;\n\n// Fork of `fast-deep-equal` that only does the comparisons we need and compares\n// functions\nfunction deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n if (typeof a !== typeof b) {\n return false;\n }\n if (typeof a === 'function' && a.toString() === b.toString()) {\n return true;\n }\n let length;\n let i;\n let keys;\n if (a && b && typeof a === 'object') {\n if (Array.isArray(a)) {\n length = a.length;\n if (length !== b.length) return false;\n for (i = length; i-- !== 0;) {\n if (!deepEqual(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) {\n return false;\n }\n for (i = length; i-- !== 0;) {\n if (!{}.hasOwnProperty.call(b, keys[i])) {\n return false;\n }\n }\n for (i = length; i-- !== 0;) {\n const key = keys[i];\n if (key === '_owner' && a.$$typeof) {\n continue;\n }\n if (!deepEqual(a[key], b[key])) {\n return false;\n }\n }\n return true;\n }\n return a !== a && b !== b;\n}\n\nfunction getDPR(element) {\n if (typeof window === 'undefined') {\n return 1;\n }\n const win = element.ownerDocument.defaultView || window;\n return win.devicePixelRatio || 1;\n}\n\nfunction roundByDPR(element, value) {\n const dpr = getDPR(element);\n return Math.round(value * dpr) / dpr;\n}\n\nfunction useLatestRef(value) {\n const ref = React.useRef(value);\n index(() => {\n ref.current = value;\n });\n return ref;\n}\n\n/**\n * Provides data to position a floating element.\n * @see https://floating-ui.com/docs/useFloating\n */\nfunction useFloating(options) {\n if (options === void 0) {\n options = {};\n }\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform,\n elements: {\n reference: externalReference,\n floating: externalFloating\n } = {},\n transform = true,\n whileElementsMounted,\n open\n } = options;\n const [data, setData] = React.useState({\n x: 0,\n y: 0,\n strategy,\n placement,\n middlewareData: {},\n isPositioned: false\n });\n const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);\n if (!deepEqual(latestMiddleware, middleware)) {\n setLatestMiddleware(middleware);\n }\n const [_reference, _setReference] = React.useState(null);\n const [_floating, _setFloating] = React.useState(null);\n const setReference = React.useCallback(node => {\n if (node !== referenceRef.current) {\n referenceRef.current = node;\n _setReference(node);\n }\n }, []);\n const setFloating = React.useCallback(node => {\n if (node !== floatingRef.current) {\n floatingRef.current = node;\n _setFloating(node);\n }\n }, []);\n const referenceEl = externalReference || _reference;\n const floatingEl = externalFloating || _floating;\n const referenceRef = React.useRef(null);\n const floatingRef = React.useRef(null);\n const dataRef = React.useRef(data);\n const hasWhileElementsMounted = whileElementsMounted != null;\n const whileElementsMountedRef = useLatestRef(whileElementsMounted);\n const platformRef = useLatestRef(platform);\n const openRef = useLatestRef(open);\n const update = React.useCallback(() => {\n if (!referenceRef.current || !floatingRef.current) {\n return;\n }\n const config = {\n placement,\n strategy,\n middleware: latestMiddleware\n };\n if (platformRef.current) {\n config.platform = platformRef.current;\n }\n computePosition(referenceRef.current, floatingRef.current, config).then(data => {\n const fullData = {\n ...data,\n // The floating element's position may be recomputed while it's closed\n // but still mounted (such as when transitioning out). To ensure\n // `isPositioned` will be `false` initially on the next open, avoid\n // setting it to `true` when `open === false` (must be specified).\n isPositioned: openRef.current !== false\n };\n if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {\n dataRef.current = fullData;\n ReactDOM.flushSync(() => {\n setData(fullData);\n });\n }\n });\n }, [latestMiddleware, placement, strategy, platformRef, openRef]);\n index(() => {\n if (open === false && dataRef.current.isPositioned) {\n dataRef.current.isPositioned = false;\n setData(data => ({\n ...data,\n isPositioned: false\n }));\n }\n }, [open]);\n const isMountedRef = React.useRef(false);\n index(() => {\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n };\n }, []);\n index(() => {\n if (referenceEl) referenceRef.current = referenceEl;\n if (floatingEl) floatingRef.current = floatingEl;\n if (referenceEl && floatingEl) {\n if (whileElementsMountedRef.current) {\n return whileElementsMountedRef.current(referenceEl, floatingEl, update);\n }\n update();\n }\n }, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);\n const refs = React.useMemo(() => ({\n reference: referenceRef,\n floating: floatingRef,\n setReference,\n setFloating\n }), [setReference, setFloating]);\n const elements = React.useMemo(() => ({\n reference: referenceEl,\n floating: floatingEl\n }), [referenceEl, floatingEl]);\n const floatingStyles = React.useMemo(() => {\n const initialStyles = {\n position: strategy,\n left: 0,\n top: 0\n };\n if (!elements.floating) {\n return initialStyles;\n }\n const x = roundByDPR(elements.floating, data.x);\n const y = roundByDPR(elements.floating, data.y);\n if (transform) {\n return {\n ...initialStyles,\n transform: \"translate(\" + x + \"px, \" + y + \"px)\",\n ...(getDPR(elements.floating) >= 1.5 && {\n willChange: 'transform'\n })\n };\n }\n return {\n position: strategy,\n left: x,\n top: y\n };\n }, [strategy, transform, elements.floating, data.x, data.y]);\n return React.useMemo(() => ({\n ...data,\n update,\n refs,\n elements,\n floatingStyles\n }), [data, update, refs, elements, floatingStyles]);\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow$1 = options => {\n function isRef(value) {\n return {}.hasOwnProperty.call(value, 'current');\n }\n return {\n name: 'arrow',\n options,\n fn(state) {\n const {\n element,\n padding\n } = typeof options === 'function' ? options(state) : options;\n if (element && isRef(element)) {\n if (element.current != null) {\n return arrow$2({\n element: element.current,\n padding\n }).fn(state);\n }\n return {};\n }\n if (element) {\n return arrow$2({\n element,\n padding\n }).fn(state);\n }\n return {};\n }\n };\n};\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = (options, deps) => {\n const result = offset$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = (options, deps) => {\n const result = shift$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = (options, deps) => {\n const result = limitShift$1(options);\n return {\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = (options, deps) => {\n const result = flip$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = (options, deps) => {\n const result = size$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = (options, deps) => {\n const result = autoPlacement$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = (options, deps) => {\n const result = hide$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = (options, deps) => {\n const result = inline$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = (options, deps) => {\n const result = arrow$1(options);\n return {\n name: result.name,\n fn: result.fn,\n options: [options, deps]\n };\n};\n\nexport { arrow, autoPlacement, flip, hide, inline, limitShift, offset, shift, size, useFloating };\n","import * as React from 'react';\nimport { useModernLayoutEffect, useEffectEvent, getMinListIndex, getMaxListIndex, createGridCellMap, isListIndexDisabled, getGridNavigatedIndex, getGridCellIndexOfCorner, getGridCellIndices, findNonDisabledListIndex, isIndexOutOfListBounds, useLatestRef, getDocument as getDocument$1, isMouseLikePointerType, contains as contains$1, isSafari, enableFocusInside, isOutsideEvent, getPreviousTabbable, getNextTabbable, disableFocusInside, isTypeableCombobox, getFloatingFocusElement, getTabbableOptions, getNodeAncestors, activeElement, getNodeChildren as getNodeChildren$1, stopEvent, getTarget as getTarget$1, isVirtualClick, isVirtualPointerEvent, getPlatform, isTypeableElement, isReactEvent, isRootElement, isEventTargetWithin, matchesFocusVisible, isMac, getDeepestNode, getUserAgent } from '@floating-ui/react/utils';\nimport { jsx, jsxs, Fragment } from 'react/jsx-runtime';\nimport { getComputedStyle, isElement, isShadowRoot, getNodeName, isNode, isHTMLElement, getWindow, isLastTraversableNode, getParentNode, isWebKit } from '@floating-ui/utils/dom';\nimport { tabbable, isTabbable, focusable } from 'tabbable';\nimport * as ReactDOM from 'react-dom';\nimport { getOverflowAncestors, useFloating as useFloating$1, offset } from '@floating-ui/react-dom';\nexport { arrow, autoPlacement, autoUpdate, computePosition, detectOverflow, flip, getOverflowAncestors, hide, inline, limitShift, offset, platform, shift, size } from '@floating-ui/react-dom';\nimport { evaluate, max, min, round } from '@floating-ui/utils';\n\n/**\n * Merges an array of refs into a single memoized callback ref or `null`.\n * @see https://floating-ui.com/docs/react-utils#usemergerefs\n */\nfunction useMergeRefs(refs) {\n const cleanupRef = React.useRef(undefined);\n const refEffect = React.useCallback(instance => {\n const cleanups = refs.map(ref => {\n if (ref == null) {\n return;\n }\n if (typeof ref === 'function') {\n const refCallback = ref;\n const refCleanup = refCallback(instance);\n return typeof refCleanup === 'function' ? refCleanup : () => {\n refCallback(null);\n };\n }\n ref.current = instance;\n return () => {\n ref.current = null;\n };\n });\n return () => {\n cleanups.forEach(refCleanup => refCleanup == null ? void 0 : refCleanup());\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n return React.useMemo(() => {\n if (refs.every(ref => ref == null)) {\n return null;\n }\n return value => {\n if (cleanupRef.current) {\n cleanupRef.current();\n cleanupRef.current = undefined;\n }\n if (value != null) {\n cleanupRef.current = refEffect(value);\n }\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n}\n\nfunction sortByDocumentPosition(a, b) {\n const position = a.compareDocumentPosition(b);\n if (position & Node.DOCUMENT_POSITION_FOLLOWING || position & Node.DOCUMENT_POSITION_CONTAINED_BY) {\n return -1;\n }\n if (position & Node.DOCUMENT_POSITION_PRECEDING || position & Node.DOCUMENT_POSITION_CONTAINS) {\n return 1;\n }\n return 0;\n}\nconst FloatingListContext = /*#__PURE__*/React.createContext({\n register: () => {},\n unregister: () => {},\n map: /*#__PURE__*/new Map(),\n elementsRef: {\n current: []\n }\n});\n/**\n * Provides context for a list of items within the floating element.\n * @see https://floating-ui.com/docs/FloatingList\n */\nfunction FloatingList(props) {\n const {\n children,\n elementsRef,\n labelsRef\n } = props;\n const [nodes, setNodes] = React.useState(() => new Set());\n const register = React.useCallback(node => {\n setNodes(prevSet => new Set(prevSet).add(node));\n }, []);\n const unregister = React.useCallback(node => {\n setNodes(prevSet => {\n const set = new Set(prevSet);\n set.delete(node);\n return set;\n });\n }, []);\n const map = React.useMemo(() => {\n const newMap = new Map();\n const sortedNodes = Array.from(nodes.keys()).sort(sortByDocumentPosition);\n sortedNodes.forEach((node, index) => {\n newMap.set(node, index);\n });\n return newMap;\n }, [nodes]);\n return /*#__PURE__*/jsx(FloatingListContext.Provider, {\n value: React.useMemo(() => ({\n register,\n unregister,\n map,\n elementsRef,\n labelsRef\n }), [register, unregister, map, elementsRef, labelsRef]),\n children: children\n });\n}\n/**\n * Used to register a list item and its index (DOM position) in the\n * `FloatingList`.\n * @see https://floating-ui.com/docs/FloatingList#uselistitem\n */\nfunction useListItem(props) {\n if (props === void 0) {\n props = {};\n }\n const {\n label\n } = props;\n const {\n register,\n unregister,\n map,\n elementsRef,\n labelsRef\n } = React.useContext(FloatingListContext);\n const [index, setIndex] = React.useState(null);\n const componentRef = React.useRef(null);\n const ref = React.useCallback(node => {\n componentRef.current = node;\n if (index !== null) {\n elementsRef.current[index] = node;\n if (labelsRef) {\n var _node$textContent;\n const isLabelDefined = label !== undefined;\n labelsRef.current[index] = isLabelDefined ? label : (_node$textContent = node == null ? void 0 : node.textContent) != null ? _node$textContent : null;\n }\n }\n }, [index, elementsRef, labelsRef, label]);\n useModernLayoutEffect(() => {\n const node = componentRef.current;\n if (node) {\n register(node);\n return () => {\n unregister(node);\n };\n }\n }, [register, unregister]);\n useModernLayoutEffect(() => {\n const index = componentRef.current ? map.get(componentRef.current) : null;\n if (index != null) {\n setIndex(index);\n }\n }, [map]);\n return React.useMemo(() => ({\n ref,\n index: index == null ? -1 : index\n }), [index, ref]);\n}\n\nconst FOCUSABLE_ATTRIBUTE = 'data-floating-ui-focusable';\nconst ACTIVE_KEY = 'active';\nconst SELECTED_KEY = 'selected';\nconst ARROW_LEFT = 'ArrowLeft';\nconst ARROW_RIGHT = 'ArrowRight';\nconst ARROW_UP = 'ArrowUp';\nconst ARROW_DOWN = 'ArrowDown';\n\nfunction renderJsx(render, computedProps) {\n if (typeof render === 'function') {\n return render(computedProps);\n }\n if (render) {\n return /*#__PURE__*/React.cloneElement(render, computedProps);\n }\n return /*#__PURE__*/jsx(\"div\", {\n ...computedProps\n });\n}\nconst CompositeContext = /*#__PURE__*/React.createContext({\n activeIndex: 0,\n onNavigate: () => {}\n});\nconst horizontalKeys = [ARROW_LEFT, ARROW_RIGHT];\nconst verticalKeys = [ARROW_UP, ARROW_DOWN];\nconst allKeys = [...horizontalKeys, ...verticalKeys];\n\n/**\n * Creates a single tab stop whose items are navigated by arrow keys, which\n * provides list navigation outside of floating element contexts.\n *\n * This is useful to enable navigation of a list of items that aren’t part of a\n * floating element. A menubar is an example of a composite, with each reference\n * element being an item.\n * @see https://floating-ui.com/docs/Composite\n */\nconst Composite = /*#__PURE__*/React.forwardRef(function Composite(props, forwardedRef) {\n const {\n render,\n orientation = 'both',\n loop = true,\n rtl = false,\n cols = 1,\n disabledIndices,\n activeIndex: externalActiveIndex,\n onNavigate: externalSetActiveIndex,\n itemSizes,\n dense = false,\n ...domProps\n } = props;\n const [internalActiveIndex, internalSetActiveIndex] = React.useState(0);\n const activeIndex = externalActiveIndex != null ? externalActiveIndex : internalActiveIndex;\n const onNavigate = useEffectEvent(externalSetActiveIndex != null ? externalSetActiveIndex : internalSetActiveIndex);\n const elementsRef = React.useRef([]);\n const renderElementProps = render && typeof render !== 'function' ? render.props : {};\n const contextValue = React.useMemo(() => ({\n activeIndex,\n onNavigate\n }), [activeIndex, onNavigate]);\n const isGrid = cols > 1;\n function handleKeyDown(event) {\n if (!allKeys.includes(event.key)) return;\n let nextIndex = activeIndex;\n const minIndex = getMinListIndex(elementsRef, disabledIndices);\n const maxIndex = getMaxListIndex(elementsRef, disabledIndices);\n const horizontalEndKey = rtl ? ARROW_LEFT : ARROW_RIGHT;\n const horizontalStartKey = rtl ? ARROW_RIGHT : ARROW_LEFT;\n if (isGrid) {\n const sizes = itemSizes || Array.from({\n length: elementsRef.current.length\n }, () => ({\n width: 1,\n height: 1\n }));\n // To calculate movements on the grid, we use hypothetical cell indices\n // as if every item was 1x1, then convert back to real indices.\n const cellMap = createGridCellMap(sizes, cols, dense);\n const minGridIndex = cellMap.findIndex(index => index != null && !isListIndexDisabled(elementsRef, index, disabledIndices));\n // last enabled index\n const maxGridIndex = cellMap.reduce((foundIndex, index, cellIndex) => index != null && !isListIndexDisabled(elementsRef, index, disabledIndices) ? cellIndex : foundIndex, -1);\n const maybeNextIndex = cellMap[getGridNavigatedIndex({\n current: cellMap.map(itemIndex => itemIndex ? elementsRef.current[itemIndex] : null)\n }, {\n event,\n orientation,\n loop,\n rtl,\n cols,\n // treat undefined (empty grid spaces) as disabled indices so we\n // don't end up in them\n disabledIndices: getGridCellIndices([...((typeof disabledIndices !== 'function' ? disabledIndices : null) || elementsRef.current.map((_, index) => isListIndexDisabled(elementsRef, index, disabledIndices) ? index : undefined)), undefined], cellMap),\n minIndex: minGridIndex,\n maxIndex: maxGridIndex,\n prevIndex: getGridCellIndexOfCorner(activeIndex > maxIndex ? minIndex : activeIndex, sizes, cellMap, cols,\n // use a corner matching the edge closest to the direction we're\n // moving in so we don't end up in the same item. Prefer\n // top/left over bottom/right.\n event.key === ARROW_DOWN ? 'bl' : event.key === horizontalEndKey ? 'tr' : 'tl')\n })];\n if (maybeNextIndex != null) {\n nextIndex = maybeNextIndex;\n }\n }\n const toEndKeys = {\n horizontal: [horizontalEndKey],\n vertical: [ARROW_DOWN],\n both: [horizontalEndKey, ARROW_DOWN]\n }[orientation];\n const toStartKeys = {\n horizontal: [horizontalStartKey],\n vertical: [ARROW_UP],\n both: [horizontalStartKey, ARROW_UP]\n }[orientation];\n const preventedKeys = isGrid ? allKeys : {\n horizontal: horizontalKeys,\n vertical: verticalKeys,\n both: allKeys\n }[orientation];\n if (nextIndex === activeIndex && [...toEndKeys, ...toStartKeys].includes(event.key)) {\n if (loop && nextIndex === maxIndex && toEndKeys.includes(event.key)) {\n nextIndex = minIndex;\n } else if (loop && nextIndex === minIndex && toStartKeys.includes(event.key)) {\n nextIndex = maxIndex;\n } else {\n nextIndex = findNonDisabledListIndex(elementsRef, {\n startingIndex: nextIndex,\n decrement: toStartKeys.includes(event.key),\n disabledIndices\n });\n }\n }\n if (nextIndex !== activeIndex && !isIndexOutOfListBounds(elementsRef, nextIndex)) {\n var _elementsRef$current$;\n event.stopPropagation();\n if (preventedKeys.includes(event.key)) {\n event.preventDefault();\n }\n onNavigate(nextIndex);\n (_elementsRef$current$ = elementsRef.current[nextIndex]) == null || _elementsRef$current$.focus();\n }\n }\n const computedProps = {\n ...domProps,\n ...renderElementProps,\n ref: forwardedRef,\n 'aria-orientation': orientation === 'both' ? undefined : orientation,\n onKeyDown(e) {\n domProps.onKeyDown == null || domProps.onKeyDown(e);\n renderElementProps.onKeyDown == null || renderElementProps.onKeyDown(e);\n handleKeyDown(e);\n }\n };\n return /*#__PURE__*/jsx(CompositeContext.Provider, {\n value: contextValue,\n children: /*#__PURE__*/jsx(FloatingList, {\n elementsRef: elementsRef,\n children: renderJsx(render, computedProps)\n })\n });\n});\n/**\n * @see https://floating-ui.com/docs/Composite\n */\nconst CompositeItem = /*#__PURE__*/React.forwardRef(function CompositeItem(props, forwardedRef) {\n const {\n render,\n ...domProps\n } = props;\n const renderElementProps = render && typeof render !== 'function' ? render.props : {};\n const {\n activeIndex,\n onNavigate\n } = React.useContext(CompositeContext);\n const {\n ref,\n index\n } = useListItem();\n const mergedRef = useMergeRefs([ref, forwardedRef, renderElementProps.ref]);\n const isActive = activeIndex === index;\n const computedProps = {\n ...domProps,\n ...renderElementProps,\n ref: mergedRef,\n tabIndex: isActive ? 0 : -1,\n 'data-active': isActive ? '' : undefined,\n onFocus(e) {\n domProps.onFocus == null || domProps.onFocus(e);\n renderElementProps.onFocus == null || renderElementProps.onFocus(e);\n onNavigate(index);\n }\n };\n return renderJsx(render, computedProps);\n});\n\n// https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379\nconst SafeReact = {\n ...React\n};\n\nlet serverHandoffComplete = false;\nlet count = 0;\nconst genId = () => // Ensure the id is unique with multiple independent versions of Floating UI\n// on <React 18\n\"floating-ui-\" + Math.random().toString(36).slice(2, 6) + count++;\nfunction useFloatingId() {\n const [id, setId] = React.useState(() => serverHandoffComplete ? genId() : undefined);\n useModernLayoutEffect(() => {\n if (id == null) {\n setId(genId());\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n React.useEffect(() => {\n serverHandoffComplete = true;\n }, []);\n return id;\n}\nconst useReactId = SafeReact.useId;\n\n/**\n * Uses React 18's built-in `useId()` when available, or falls back to a\n * slightly less performant (requiring a double render) implementation for\n * earlier React versions.\n * @see https://floating-ui.com/docs/react-utils#useid\n */\nconst useId = useReactId || useFloatingId;\n\nlet devMessageSet;\nif (process.env.NODE_ENV !== \"production\") {\n devMessageSet = /*#__PURE__*/new Set();\n}\nfunction warn() {\n var _devMessageSet;\n for (var _len = arguments.length, messages = new Array(_len), _key = 0; _key < _len; _key++) {\n messages[_key] = arguments[_key];\n }\n const message = \"Floating UI: \" + messages.join(' ');\n if (!((_devMessageSet = devMessageSet) != null && _devMessageSet.has(message))) {\n var _devMessageSet2;\n (_devMessageSet2 = devMessageSet) == null || _devMessageSet2.add(message);\n console.warn(message);\n }\n}\nfunction error() {\n var _devMessageSet3;\n for (var _len2 = arguments.length, messages = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n messages[_key2] = arguments[_key2];\n }\n const message = \"Floating UI: \" + messages.join(' ');\n if (!((_devMessageSet3 = devMessageSet) != null && _devMessageSet3.has(message))) {\n var _devMessageSet4;\n (_devMessageSet4 = devMessageSet) == null || _devMessageSet4.add(message);\n console.error(message);\n }\n}\n\n/**\n * Renders a pointing arrow triangle.\n * @see https://floating-ui.com/docs/FloatingArrow\n */\nconst FloatingArrow = /*#__PURE__*/React.forwardRef(function FloatingArrow(props, ref) {\n const {\n context: {\n placement,\n elements: {\n floating\n },\n middlewareData: {\n arrow,\n shift\n }\n },\n width = 14,\n height = 7,\n tipRadius = 0,\n strokeWidth = 0,\n staticOffset,\n stroke,\n d,\n style: {\n transform,\n ...restStyle\n } = {},\n ...rest\n } = props;\n if (process.env.NODE_ENV !== \"production\") {\n if (!ref) {\n warn('The `ref` prop is required for `FloatingArrow`.');\n }\n }\n const clipPathId = useId();\n const [isRTL, setIsRTL] = React.useState(false);\n\n // https://github.com/floating-ui/floating-ui/issues/2932\n useModernLayoutEffect(() => {\n if (!floating) return;\n const isRTL = getComputedStyle(floating).direction === 'rtl';\n if (isRTL) {\n setIsRTL(true);\n }\n }, [floating]);\n if (!floating) {\n return null;\n }\n const [side, alignment] = placement.split('-');\n const isVerticalSide = side === 'top' || side === 'bottom';\n let computedStaticOffset = staticOffset;\n if (isVerticalSide && shift != null && shift.x || !isVerticalSide && shift != null && shift.y) {\n computedStaticOffset = null;\n }\n\n // Strokes must be double the border width, this ensures the stroke's width\n // works as you'd expect.\n const computedStrokeWidth = strokeWidth * 2;\n const halfStrokeWidth = computedStrokeWidth / 2;\n const svgX = width / 2 * (tipRadius / -8 + 1);\n const svgY = height / 2 * tipRadius / 4;\n const isCustomShape = !!d;\n const yOffsetProp = computedStaticOffset && alignment === 'end' ? 'bottom' : 'top';\n let xOffsetProp = computedStaticOffset && alignment === 'end' ? 'right' : 'left';\n if (computedStaticOffset && isRTL) {\n xOffsetProp = alignment === 'end' ? 'left' : 'right';\n }\n const arrowX = (arrow == null ? void 0 : arrow.x) != null ? computedStaticOffset || arrow.x : '';\n const arrowY = (arrow == null ? void 0 : arrow.y) != null ? computedStaticOffset || arrow.y : '';\n const dValue = d || 'M0,0' + (\" H\" + width) + (\" L\" + (width - svgX) + \",\" + (height - svgY)) + (\" Q\" + width / 2 + \",\" + height + \" \" + svgX + \",\" + (height - svgY)) + ' Z';\n const rotation = {\n top: isCustomShape ? 'rotate(180deg)' : '',\n left: isCustomShape ? 'rotate(90deg)' : 'rotate(-90deg)',\n bottom: isCustomShape ? '' : 'rotate(180deg)',\n right: isCustomShape ? 'rotate(-90deg)' : 'rotate(90deg)'\n }[side];\n return /*#__PURE__*/jsxs(\"svg\", {\n ...rest,\n \"aria-hidden\": true,\n ref: ref,\n width: isCustomShape ? width : width + computedStrokeWidth,\n height: width,\n viewBox: \"0 0 \" + width + \" \" + (height > width ? height : width),\n style: {\n position: 'absolute',\n pointerEvents: 'none',\n [xOffsetProp]: arrowX,\n [yOffsetProp]: arrowY,\n [side]: isVerticalSide || isCustomShape ? '100%' : \"calc(100% - \" + computedStrokeWidth / 2 + \"px)\",\n transform: [rotation, transform].filter(t => !!t).join(' '),\n ...restStyle\n },\n children: [computedStrokeWidth > 0 && /*#__PURE__*/jsx(\"path\", {\n clipPath: \"url(#\" + clipPathId + \")\",\n fill: \"none\",\n stroke: stroke\n // Account for the stroke on the fill path rendered below.\n ,\n strokeWidth: computedStrokeWidth + (d ? 0 : 1),\n d: dValue\n }), /*#__PURE__*/jsx(\"path\", {\n stroke: computedStrokeWidth && !d ? rest.fill : 'none',\n d: dValue\n }), /*#__PURE__*/jsx(\"clipPath\", {\n id: clipPathId,\n children: /*#__PURE__*/jsx(\"rect\", {\n x: -halfStrokeWidth,\n y: halfStrokeWidth * (isCustomShape ? -1 : 1),\n width: width + computedStrokeWidth,\n height: width\n })\n })]\n });\n});\n\nfunction createEventEmitter() {\n const map = new Map();\n return {\n emit(event, data) {\n var _map$get;\n (_map$get = map.get(event)) == null || _map$get.forEach(listener => listener(data));\n },\n on(event, listener) {\n if (!map.has(event)) {\n map.set(event, new Set());\n }\n map.get(event).add(listener);\n },\n off(event, listener) {\n var _map$get2;\n (_map$get2 = map.get(event)) == null || _map$get2.delete(listener);\n }\n };\n}\n\nconst FloatingNodeContext = /*#__PURE__*/React.createContext(null);\nconst FloatingTreeContext = /*#__PURE__*/React.createContext(null);\n\n/**\n * Returns the parent node id for nested floating elements, if available.\n * Returns `null` for top-level floating elements.\n */\nconst useFloatingParentNodeId = () => {\n var _React$useContext;\n return ((_React$useContext = React.useContext(FloatingNodeContext)) == null ? void 0 : _React$useContext.id) || null;\n};\n\n/**\n * Returns the nearest floating tree context, if available.\n */\nconst useFloatingTree = () => React.useContext(FloatingTreeContext);\n\n/**\n * Registers a node into the `FloatingTree`, returning its id.\n * @see https://floating-ui.com/docs/FloatingTree\n */\nfunction useFloatingNodeId(customParentId) {\n const id = useId();\n const tree = useFloatingTree();\n const reactParentId = useFloatingParentNodeId();\n const parentId = customParentId || reactParentId;\n useModernLayoutEffect(() => {\n if (!id) return;\n const node = {\n id,\n parentId\n };\n tree == null || tree.addNode(node);\n return () => {\n tree == null || tree.removeNode(node);\n };\n }, [tree, id, parentId]);\n return id;\n}\n/**\n * Provides parent node context for nested floating elements.\n * @see https://floating-ui.com/docs/FloatingTree\n */\nfunction FloatingNode(props) {\n const {\n children,\n id\n } = props;\n const parentId = useFloatingParentNodeId();\n return /*#__PURE__*/jsx(FloatingNodeContext.Provider, {\n value: React.useMemo(() => ({\n id,\n parentId\n }), [id, parentId]),\n children: children\n });\n}\n/**\n * Provides context for nested floating elements when they are not children of\n * each other on the DOM.\n * This is not necessary in all cases, except when there must be explicit communication between parent and child floating elements. It is necessary for:\n * - The `bubbles` option in the `useDismiss()` Hook\n * - Nested virtual list navigation\n * - Nested floating elements that each open on hover\n * - Custom communication between parent and child floating elements\n * @see https://floating-ui.com/docs/FloatingTree\n */\nfunction FloatingTree(props) {\n const {\n children\n } = props;\n const nodesRef = React.useRef([]);\n const addNode = React.useCallback(node => {\n nodesRef.current = [...nodesRef.current, node];\n }, []);\n const removeNode = React.useCallback(node => {\n nodesRef.current = nodesRef.current.filter(n => n !== node);\n }, []);\n const [events] = React.useState(() => createEventEmitter());\n return /*#__PURE__*/jsx(FloatingTreeContext.Provider, {\n value: React.useMemo(() => ({\n nodesRef,\n addNode,\n removeNode,\n events\n }), [addNode, removeNode, events]),\n children: children\n });\n}\n\nfunction createAttribute(name) {\n return \"data-floating-ui-\" + name;\n}\n\nfunction clearTimeoutIfSet(timeoutRef) {\n if (timeoutRef.current !== -1) {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = -1;\n }\n}\n\nconst safePolygonIdentifier = /*#__PURE__*/createAttribute('safe-polygon');\nfunction getDelay(value, prop, pointerType) {\n if (pointerType && !isMouseLikePointerType(pointerType)) {\n return 0;\n }\n if (typeof value === 'number') {\n return value;\n }\n if (typeof value === 'function') {\n const result = value();\n if (typeof result === 'number') {\n return result;\n }\n return result == null ? void 0 : result[prop];\n }\n return value == null ? void 0 : value[prop];\n}\nfunction getRestMs(value) {\n if (typeof value === 'function') {\n return value();\n }\n return value;\n}\n/**\n * Opens the floating element while hovering over the reference element, like\n * CSS `:hover`.\n * @see https://floating-ui.com/docs/useHover\n */\nfunction useHover(context, props) {\n if (props === void 0) {\n props = {};\n }\n const {\n open,\n onOpenChange,\n dataRef,\n events,\n elements\n } = context;\n const {\n enabled = true,\n delay = 0,\n handleClose = null,\n mouseOnly = false,\n restMs = 0,\n move = true\n } = props;\n const tree = useFloatingTree();\n const parentId = useFloatingParentNodeId();\n const handleCloseRef = useLatestRef(handleClose);\n const delayRef = useLatestRef(delay);\n const openRef = useLatestRef(open);\n const restMsRef = useLatestRef(restMs);\n const pointerTypeRef = React.useRef();\n const timeoutRef = React.useRef(-1);\n const handlerRef = React.useRef();\n const restTimeoutRef = React.useRef(-1);\n const blockMouseMoveRef = React.useRef(true);\n const performedPointerEventsMutationRef = React.useRef(false);\n const unbindMouseMoveRef = React.useRef(() => {});\n const restTimeoutPendingRef = React.useRef(false);\n const isHoverOpen = useEffectEvent(() => {\n var _dataRef$current$open;\n const type = (_dataRef$current$open = dataRef.current.openEvent) == null ? void 0 : _dataRef$current$open.type;\n return (type == null ? void 0 : type.includes('mouse')) && type !== 'mousedown';\n });\n\n // When closing before opening, clear the delay timeouts to cancel it\n // from showing.\n React.useEffect(() => {\n if (!enabled) return;\n function onOpenChange(_ref) {\n let {\n open\n } = _ref;\n if (!open) {\n clearTimeoutIfSet(timeoutRef);\n clearTimeoutIfSet(restTimeoutRef);\n blockMouseMoveRef.current = true;\n restTimeoutPendingRef.current = false;\n }\n }\n events.on('openchange', onOpenChange);\n return () => {\n events.off('openchange', onOpenChange);\n };\n }, [enabled, events]);\n React.useEffect(() => {\n if (!enabled) return;\n if (!handleCloseRef.current) return;\n if (!open) return;\n function onLeave(event) {\n if (isHoverOpen()) {\n onOpenChange(false, event, 'hover');\n }\n }\n const html = getDocument$1(elements.floating).documentElement;\n html.addEventListener('mouseleave', onLeave);\n return () => {\n html.removeEventListener('mouseleave', onLeave);\n };\n }, [elements.floating, open, onOpenChange, enabled, handleCloseRef, isHoverOpen]);\n const closeWithDelay = React.useCallback(function (event, runElseBranch, reason) {\n if (runElseBranch === void 0) {\n runElseBranch = true;\n }\n if (reason === void 0) {\n reason = 'hover';\n }\n const closeDelay = getDelay(delayRef.current, 'close', pointerTypeRef.current);\n if (closeDelay && !handlerRef.current) {\n clearTimeoutIfSet(timeoutRef);\n timeoutRef.current = window.setTimeout(() => onOpenChange(false, event, reason), closeDelay);\n } else if (runElseBranch) {\n clearTimeoutIfSet(timeoutRef);\n onOpenChange(false, event, reason);\n }\n }, [delayRef, onOpenChange]);\n const cleanupMouseMoveHandler = useEffectEvent(() => {\n unbindMouseMoveRef.current();\n handlerRef.current = undefined;\n });\n const clearPointerEvents = useEffectEvent(() => {\n if (performedPointerEventsMutationRef.current) {\n const body = getDocument$1(elements.floating).body;\n body.style.pointerEvents = '';\n body.removeAttribute(safePolygonIdentifier);\n performedPointerEventsMutationRef.current = false;\n }\n });\n const isClickLikeOpenEvent = useEffectEvent(() => {\n return dataRef.current.openEvent ? ['click', 'mousedown'].includes(dataRef.current.openEvent.type) : false;\n });\n\n // Registering the mouse events on the reference directly to bypass React's\n // delegation system. If the cursor was on a disabled element and then entered\n // the reference (no gap), `mouseenter` doesn't fire in the delegation system.\n React.useEffect(() => {\n if (!enabled) return;\n function onReferenceMouseEnter(event) {\n clearTimeoutIfSet(timeoutRef);\n blockMouseMoveRef.current = false;\n if (mouseOnly && !isMouseLikePointerType(pointerTypeRef.current) || getRestMs(restMsRef.current) > 0 && !getDelay(delayRef.current, 'open')) {\n return;\n }\n const openDelay = getDelay(delayRef.current, 'open', pointerTypeRef.current);\n if (openDelay) {\n timeoutRef.current = window.setTimeout(() => {\n if (!openRef.current) {\n onOpenChange(true, event, 'hover');\n }\n }, openDelay);\n } else if (!open) {\n onOpenChange(true, event, 'hover');\n }\n }\n function onReferenceMouseLeave(event) {\n if (isClickLikeOpenEvent()) {\n clearPointerEvents();\n return;\n }\n unbindMouseMoveRef.current();\n const doc = getDocument$1(elements.floating);\n clearTimeoutIfSet(restTimeoutRef);\n restTimeoutPendingRef.current = false;\n if (handleCloseRef.current && dataRef.current.floatingContext) {\n // Prevent clearing `onScrollMouseLeave` timeout.\n if (!open) {\n clearTimeoutIfSet(timeoutRef);\n }\n handlerRef.current = handleCloseRef.current({\n ...dataRef.current.floatingContext,\n tree,\n x: event.clientX,\n y: event.clientY,\n onClose() {\n clearPointerEvents();\n cleanupMouseMoveHandler();\n if (!isClickLikeOpenEvent()) {\n closeWithDelay(event, true, 'safe-polygon');\n }\n }\n });\n const handler = handlerRef.current;\n doc.addEventListener('mousemove', handler);\n unbindMouseMoveRef.current = () => {\n doc.removeEventListener('mousemove', handler);\n };\n return;\n }\n\n // Allow interactivity without `safePolygon` on touch devices. With a\n // pointer, a short close delay is an alternative, so it should work\n // consistently.\n const shouldClose = pointerTypeRef.current === 'touch' ? !contains$1(elements.floating, event.relatedTarget) : true;\n if (shouldClose) {\n closeWithDelay(event);\n }\n }\n\n // Ensure the floating element closes after scrolling even if the pointer\n // did not move.\n // https://github.com/floating-ui/floating-ui/discussions/1692\n function onScrollMouseLeave(event) {\n if (isClickLikeOpenEvent()) return;\n if (!dataRef.current.floatingContext) return;\n handleCloseRef.current == null || handleCloseRef.current({\n ...dataRef.current.floatingContext,\n tree,\n x: event.clientX,\n y: event.clientY,\n onClose() {\n clearPointerEvents();\n cleanupMouseMoveHandler();\n if (!isClickLikeOpenEvent()) {\n closeWithDelay(event);\n }\n }\n })(event);\n }\n function onFloatingMouseEnter() {\n clearTimeoutIfSet(timeoutRef);\n }\n function onFloatingMouseLeave(event) {\n if (!isClickLikeOpenEvent()) {\n closeWithDelay(event, false);\n }\n }\n if (isElement(elements.domReference)) {\n const reference = elements.domReference;\n const floating = elements.floating;\n if (open) {\n reference.addEventListener('mouseleave', onScrollMouseLeave);\n }\n if (move) {\n reference.addEventListener('mousemove', onReferenceMouseEnter, {\n once: true\n });\n }\n reference.addEventListener('mouseenter', onReferenceMouseEnter);\n reference.addEventListener('mouseleave', onReferenceMouseLeave);\n if (floating) {\n floating.addEventListener('mouseleave', onScrollMouseLeave);\n floating.addEventListener('mouseenter', onFloatingMouseEnter);\n floating.addEventListener('mouseleave', onFloatingMouseLeave);\n }\n return () => {\n if (open) {\n reference.removeEventListener('mouseleave', onScrollMouseLeave);\n }\n if (move) {\n reference.removeEventListener('mousemove', onReferenceMouseEnter);\n }\n reference.removeEventListener('mouseenter', onReferenceMouseEnter);\n reference.removeEventListener('mouseleave', onReferenceMouseLeave);\n if (floating) {\n floating.removeEventListener('mouseleave', onScrollMouseLeave);\n floating.removeEventListener('mouseenter', onFloatingMouseEnter);\n floating.removeEventListener('mouseleave', onFloatingMouseLeave);\n }\n };\n }\n }, [elements, enabled, context, mouseOnly, move, closeWithDelay, cleanupMouseMoveHandler, clearPointerEvents, onOpenChange, open, openRef, tree, delayRef, handleCloseRef, dataRef, isClickLikeOpenEvent, restMsRef]);\n\n // Block pointer-events of every element other than the reference and floating\n // while the floating element is open and has a `handleClose` handler. Also\n // handles nested floating elements.\n // https://github.com/floating-ui/floating-ui/issues/1722\n useModernLayoutEffect(() => {\n var _handleCloseRef$curre;\n if (!enabled) return;\n if (open && (_handleCloseRef$curre = handleCloseRef.current) != null && (_handleCloseRef$curre = _handleCloseRef$curre.__options) != null && _handleCloseRef$curre.blockPointerEvents && isHoverOpen()) {\n performedPointerEventsMutationRef.current = true;\n const floatingEl = elements.floating;\n if (isElement(elements.domReference) && floatingEl) {\n var _tree$nodesRef$curren;\n const body = getDocument$1(elements.floating).body;\n body.setAttribute(safePolygonIdentifier, '');\n const ref = elements.domReference;\n const parentFloating = tree == null || (_tree$nodesRef$curren = tree.nodesRef.current.find(node => node.id === parentId)) == null || (_tree$nodesRef$curren = _tree$nodesRef$curren.context) == null ? void 0 : _tree$nodesRef$curren.elements.floating;\n if (parentFloating) {\n parentFloating.style.pointerEvents = '';\n }\n body.style.pointerEvents = 'none';\n ref.style.pointerEvents = 'auto';\n floatingEl.style.pointerEvents = 'auto';\n return () => {\n body.style.pointerEvents = '';\n ref.style.pointerEvents = '';\n floatingEl.style.pointerEvents = '';\n };\n }\n }\n }, [enabled, open, parentId, elements, tree, handleCloseRef, isHoverOpen]);\n useModernLayoutEffect(() => {\n if (!open) {\n pointerTypeRef.current = undefined;\n restTimeoutPendingRef.current = false;\n cleanupMouseMoveHandler();\n clearPointerEvents();\n }\n }, [open, cleanupMouseMoveHandler, clearPointerEvents]);\n React.useEffect(() => {\n return () => {\n cleanupMouseMoveHandler();\n clearTimeoutIfSet(timeoutRef);\n clearTimeoutIfSet(restTimeoutRef);\n clearPointerEvents();\n };\n }, [enabled, elements.domReference, cleanupMouseMoveHandler, clearPointerEvents]);\n const reference = React.useMemo(() => {\n function setPointerRef(event) {\n pointerTypeRef.current = event.pointerType;\n }\n return {\n onPointerDown: setPointerRef,\n onPointerEnter: setPointerRef,\n onMouseMove(event) {\n const {\n nativeEvent\n } = event;\n function handleMouseMove() {\n if (!blockMouseMoveRef.current && !openRef.current) {\n onOpenChange(true, nativeEvent, 'hover');\n }\n }\n if (mouseOnly && !isMouseLikePointerType(pointerTypeRef.current)) {\n return;\n }\n if (open || getRestMs(restMsRef.current) === 0) {\n return;\n }\n\n // Ignore insignificant movements to account for tremors.\n if (restTimeoutPendingRef.current && event.movementX ** 2 + event.movementY ** 2 < 2) {\n return;\n }\n clearTimeoutIfSet(restTimeoutRef);\n if (pointerTypeRef.current === 'touch') {\n handleMouseMove();\n } else {\n restTimeoutPendingRef.current = true;\n restTimeoutRef.current = window.setTimeout(handleMouseMove, getRestMs(restMsRef.current));\n }\n }\n };\n }, [mouseOnly, onOpenChange, open, openRef, restMsRef]);\n return React.useMemo(() => enabled ? {\n reference\n } : {}, [enabled, reference]);\n}\n\nconst NOOP = () => {};\nconst FloatingDelayGroupContext = /*#__PURE__*/React.createContext({\n delay: 0,\n initialDelay: 0,\n timeoutMs: 0,\n currentId: null,\n setCurrentId: NOOP,\n setState: NOOP,\n isInstantPhase: false\n});\n\n/**\n * @deprecated\n * Use the return value of `useDelayGroup()` instead.\n */\nconst useDelayGroupContext = () => React.useContext(FloatingDelayGroupContext);\n/**\n * Provides context for a group of floating elements that should share a\n * `delay`.\n * @see https://floating-ui.com/docs/FloatingDelayGroup\n */\nfunction FloatingDelayGroup(props) {\n const {\n children,\n delay,\n timeoutMs = 0\n } = props;\n const [state, setState] = React.useReducer((prev, next) => ({\n ...prev,\n ...next\n }), {\n delay,\n timeoutMs,\n initialDelay: delay,\n currentId: null,\n isInstantPhase: false\n });\n const initialCurrentIdRef = React.useRef(null);\n const setCurrentId = React.useCallback(currentId => {\n setState({\n currentId\n });\n }, []);\n useModernLayoutEffect(() => {\n if (state.currentId) {\n if (initialCurrentIdRef.current === null) {\n initialCurrentIdRef.current = state.currentId;\n } else if (!state.isInstantPhase) {\n setState({\n isInstantPhase: true\n });\n }\n } else {\n if (state.isInstantPhase) {\n setState({\n isInstantPhase: false\n });\n }\n initialCurrentIdRef.current = null;\n }\n }, [state.currentId, state.isInstantPhase]);\n return /*#__PURE__*/jsx(FloatingDelayGroupContext.Provider, {\n value: React.useMemo(() => ({\n ...state,\n setState,\n setCurrentId\n }), [state, setCurrentId]),\n children: children\n });\n}\n/**\n * Enables grouping when called inside a component that's a child of a\n * `FloatingDelayGroup`.\n * @see https://floating-ui.com/docs/FloatingDelayGroup\n */\nfunction useDelayGroup(context, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n open,\n onOpenChange,\n floatingId\n } = context;\n const {\n id: optionId,\n enabled = true\n } = options;\n const id = optionId != null ? optionId : floatingId;\n const groupContext = useDelayGroupContext();\n const {\n currentId,\n setCurrentId,\n initialDelay,\n setState,\n timeoutMs\n } = groupContext;\n useModernLayoutEffect(() => {\n if (!enabled) return;\n if (!currentId) return;\n setState({\n delay: {\n open: 1,\n close: getDelay(initialDelay, 'close')\n }\n });\n if (currentId !== id) {\n onOpenChange(false);\n }\n }, [enabled, id, onOpenChange, setState, currentId, initialDelay]);\n useModernLayoutEffect(() => {\n function unset() {\n onOpenChange(false);\n setState({\n delay: initialDelay,\n currentId: null\n });\n }\n if (!enabled) return;\n if (!currentId) return;\n if (!open && currentId === id) {\n if (timeoutMs) {\n const timeout = window.setTimeout(unset, timeoutMs);\n return () => {\n clearTimeout(timeout);\n };\n }\n unset();\n }\n }, [enabled, open, setState, currentId, id, onOpenChange, initialDelay, timeoutMs]);\n useModernLayoutEffect(() => {\n if (!enabled) return;\n if (setCurrentId === NOOP || !open) return;\n setCurrentId(id);\n }, [enabled, open, setCurrentId, id]);\n return groupContext;\n}\n\nconst NextFloatingDelayGroupContext = /*#__PURE__*/React.createContext({\n hasProvider: false,\n timeoutMs: 0,\n delayRef: {\n current: 0\n },\n initialDelayRef: {\n current: 0\n },\n timeoutIdRef: {\n current: -1\n },\n currentIdRef: {\n current: null\n },\n currentContextRef: {\n current: null\n }\n});\n/**\n * Experimental next version of `FloatingDelayGroup` to become the default\n * in the future. This component is not yet stable.\n * Provides context for a group of floating elements that should share a\n * `delay`. Unlike `FloatingDelayGroup`, `useNextDelayGroup` with this\n * component does not cause a re-render of unrelated consumers of the\n * context when the delay changes.\n * @see https://floating-ui.com/docs/FloatingDelayGroup\n */\nfunction NextFloatingDelayGroup(props) {\n const {\n children,\n delay,\n timeoutMs = 0\n } = props;\n const delayRef = React.useRef(delay);\n const initialDelayRef = React.useRef(delay);\n const currentIdRef = React.useRef(null);\n const currentContextRef = React.useRef(null);\n const timeoutIdRef = React.useRef(-1);\n return /*#__PURE__*/jsx(NextFloatingDelayGroupContext.Provider, {\n value: React.useMemo(() => ({\n hasProvider: true,\n delayRef,\n initialDelayRef,\n currentIdRef,\n timeoutMs,\n currentContextRef,\n timeoutIdRef\n }), [timeoutMs]),\n children: children\n });\n}\n/**\n * Enables grouping when called inside a component that's a child of a\n * `NextFloatingDelayGroup`.\n * @see https://floating-ui.com/docs/FloatingDelayGroup\n */\nfunction useNextDelayGroup(context, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n open,\n onOpenChange,\n floatingId\n } = context;\n const {\n enabled = true\n } = options;\n const groupContext = React.useContext(NextFloatingDelayGroupContext);\n const {\n currentIdRef,\n delayRef,\n timeoutMs,\n initialDelayRef,\n currentContextRef,\n hasProvider,\n timeoutIdRef\n } = groupContext;\n const [isInstantPhase, setIsInstantPhase] = React.useState(false);\n useModernLayoutEffect(() => {\n function unset() {\n var _currentContextRef$cu;\n setIsInstantPhase(false);\n (_currentContextRef$cu = currentContextRef.current) == null || _currentContextRef$cu.setIsInstantPhase(false);\n currentIdRef.current = null;\n currentContextRef.current = null;\n delayRef.current = initialDelayRef.current;\n }\n if (!enabled) return;\n if (!currentIdRef.current) return;\n if (!open && currentIdRef.current === floatingId) {\n setIsInstantPhase(false);\n if (timeoutMs) {\n timeoutIdRef.current = window.setTimeout(unset, timeoutMs);\n return () => {\n clearTimeout(timeoutIdRef.current);\n };\n }\n unset();\n }\n }, [enabled, open, floatingId, currentIdRef, delayRef, timeoutMs, initialDelayRef, currentContextRef, timeoutIdRef]);\n useModernLayoutEffect(() => {\n if (!enabled) return;\n if (!open) return;\n const prevContext = currentContextRef.current;\n const prevId = currentIdRef.current;\n currentContextRef.current = {\n onOpenChange,\n setIsInstantPhase\n };\n currentIdRef.current = floatingId;\n delayRef.current = {\n open: 0,\n close: getDelay(initialDelayRef.current, 'close')\n };\n if (prevId !== null && prevId !== floatingId) {\n clearTimeoutIfSet(timeoutIdRef);\n setIsInstantPhase(true);\n prevContext == null || prevContext.setIsInstantPhase(true);\n prevContext == null || prevContext.onOpenChange(false);\n } else {\n setIsInstantPhase(false);\n prevContext == null || prevContext.setIsInstantPhase(false);\n }\n }, [enabled, open, floatingId, onOpenChange, currentIdRef, delayRef, timeoutMs, initialDelayRef, currentContextRef, timeoutIdRef]);\n useModernLayoutEffect(() => {\n return () => {\n currentContextRef.current = null;\n };\n }, [currentContextRef]);\n return React.useMemo(() => ({\n hasProvider,\n delayRef,\n isInstantPhase\n }), [hasProvider, delayRef, isInstantPhase]);\n}\n\nlet rafId = 0;\nfunction enqueueFocus(el, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n preventScroll = false,\n cancelPrevious = true,\n sync = false\n } = options;\n cancelPrevious && cancelAnimationFrame(rafId);\n const exec = () => el == null ? void 0 : el.focus({\n preventScroll\n });\n if (sync) {\n exec();\n } else {\n rafId = requestAnimationFrame(exec);\n }\n}\n\nfunction contains(parent, child) {\n if (!parent || !child) {\n return false;\n }\n const rootNode = child.getRootNode == null ? void 0 : child.getRootNode();\n\n // First, attempt with faster native method\n if (parent.contains(child)) {\n return true;\n }\n\n // then fallback to custom implementation with Shadow DOM support\n if (rootNode && isShadowRoot(rootNode)) {\n let next = child;\n while (next) {\n if (parent === next) {\n return true;\n }\n // @ts-ignore\n next = next.parentNode || next.host;\n }\n }\n\n // Give up, the result is false\n return false;\n}\nfunction getTarget(event) {\n if ('composedPath' in event) {\n return event.composedPath()[0];\n }\n\n // TS thinks `event` is of type never as it assumes all browsers support\n // `composedPath()`, but browsers without shadow DOM don't.\n return event.target;\n}\nfunction getDocument(node) {\n return (node == null ? void 0 : node.ownerDocument) || document;\n}\n\n// Modified to add conditional `aria-hidden` support:\n// https://github.com/theKashey/aria-hidden/blob/9220c8f4a4fd35f63bee5510a9f41a37264382d4/src/index.ts\nconst counters = {\n inert: /*#__PURE__*/new WeakMap(),\n 'aria-hidden': /*#__PURE__*/new WeakMap(),\n none: /*#__PURE__*/new WeakMap()\n};\nfunction getCounterMap(control) {\n if (control === 'inert') return counters.inert;\n if (control === 'aria-hidden') return counters['aria-hidden'];\n return counters.none;\n}\nlet uncontrolledElementsSet = /*#__PURE__*/new WeakSet();\nlet markerMap = {};\nlet lockCount$1 = 0;\nconst supportsInert = () => typeof HTMLElement !== 'undefined' && 'inert' in HTMLElement.prototype;\nfunction unwrapHost(node) {\n if (!node) {\n return null;\n }\n return isShadowRoot(node) ? node.host : unwrapHost(node.parentNode);\n}\nconst correctElements = (parent, targets) => targets.map(target => {\n if (parent.contains(target)) {\n return target;\n }\n const correctedTarget = unwrapHost(target);\n if (parent.contains(correctedTarget)) {\n return correctedTarget;\n }\n return null;\n}).filter(x => x != null);\nfunction applyAttributeToOthers(uncorrectedAvoidElements, body, ariaHidden, inert) {\n const markerName = 'data-floating-ui-inert';\n const controlAttribute = inert ? 'inert' : ariaHidden ? 'aria-hidden' : null;\n const avoidElements = correctElements(body, uncorrectedAvoidElements);\n const elementsToKeep = new Set();\n const elementsToStop = new Set(avoidElements);\n const hiddenElements = [];\n if (!markerMap[markerName]) {\n markerMap[markerName] = new WeakMap();\n }\n const markerCounter = markerMap[markerName];\n avoidElements.forEach(keep);\n deep(body);\n elementsToKeep.clear();\n function keep(el) {\n if (!el || elementsToKeep.has(el)) {\n return;\n }\n elementsToKeep.add(el);\n el.parentNode && keep(el.parentNode);\n }\n function deep(parent) {\n if (!parent || elementsToStop.has(parent)) {\n return;\n }\n [].forEach.call(parent.children, node => {\n if (getNodeName(node) === 'script') return;\n if (elementsToKeep.has(node)) {\n deep(node);\n } else {\n const attr = controlAttribute ? node.getAttribute(controlAttribute) : null;\n const alreadyHidden = attr !== null && attr !== 'false';\n const counterMap = getCounterMap(controlAttribute);\n const counterValue = (counterMap.get(node) || 0) + 1;\n const markerValue = (markerCounter.get(node) || 0) + 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n hiddenElements.push(node);\n if (counterValue === 1 && alreadyHidden) {\n uncontrolledElementsSet.add(node);\n }\n if (markerValue === 1) {\n node.setAttribute(markerName, '');\n }\n if (!alreadyHidden && controlAttribute) {\n node.setAttribute(controlAttribute, controlAttribute === 'inert' ? '' : 'true');\n }\n }\n });\n }\n lockCount$1++;\n return () => {\n hiddenElements.forEach(element => {\n const counterMap = getCounterMap(controlAttribute);\n const currentCounterValue = counterMap.get(element) || 0;\n const counterValue = currentCounterValue - 1;\n const markerValue = (markerCounter.get(element) || 0) - 1;\n counterMap.set(element, counterValue);\n markerCounter.set(element, markerValue);\n if (!counterValue) {\n if (!uncontrolledElementsSet.has(element) && controlAttribute) {\n element.removeAttribute(controlAttribute);\n }\n uncontrolledElementsSet.delete(element);\n }\n if (!markerValue) {\n element.removeAttribute(markerName);\n }\n });\n lockCount$1--;\n if (!lockCount$1) {\n counters.inert = new WeakMap();\n counters['aria-hidden'] = new WeakMap();\n counters.none = new WeakMap();\n uncontrolledElementsSet = new WeakSet();\n markerMap = {};\n }\n };\n}\nfunction markOthers(avoidElements, ariaHidden, inert) {\n if (ariaHidden === void 0) {\n ariaHidden = false;\n }\n if (inert === void 0) {\n inert = false;\n }\n const body = getDocument(avoidElements[0]).body;\n return applyAttributeToOthers(avoidElements.concat(Array.from(body.querySelectorAll('[aria-live],[role=\"status\"],output'))), body, ariaHidden, inert);\n}\n\nconst HIDDEN_STYLES = {\n border: 0,\n clip: 'rect(0 0 0 0)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: 0,\n position: 'fixed',\n whiteSpace: 'nowrap',\n width: '1px',\n top: 0,\n left: 0\n};\nconst FocusGuard = /*#__PURE__*/React.forwardRef(function FocusGuard(props, ref) {\n const [role, setRole] = React.useState();\n useModernLayoutEffect(() => {\n if (isSafari()) {\n // Unlike other screen readers such as NVDA and JAWS, the virtual cursor\n // on VoiceOver does trigger the onFocus event, so we can use the focus\n // trap element. On Safari, only buttons trigger the onFocus event.\n // NB: \"group\" role in the Sandbox no longer appears to work, must be a\n // button role.\n setRole('button');\n }\n }, []);\n const restProps = {\n ref,\n tabIndex: 0,\n // Role is only for VoiceOver\n role,\n 'aria-hidden': role ? undefined : true,\n [createAttribute('focus-guard')]: '',\n style: HIDDEN_STYLES\n };\n return /*#__PURE__*/jsx(\"span\", {\n ...props,\n ...restProps\n });\n});\n\nconst HIDDEN_OWNER_STYLES = {\n clipPath: 'inset(50%)',\n position: 'fixed',\n top: 0,\n left: 0\n};\nconst PortalContext = /*#__PURE__*/React.createContext(null);\nconst attr = /*#__PURE__*/createAttribute('portal');\n/**\n * @see https://floating-ui.com/docs/FloatingPortal#usefloatingportalnode\n */\nfunction useFloatingPortalNode(props) {\n if (props === void 0) {\n props = {};\n }\n const {\n id,\n root\n } = props;\n const uniqueId = useId();\n const portalContext = usePortalContext();\n const [portalNode, setPortalNode] = React.useState(null);\n const portalNodeRef = React.useRef(null);\n useModernLayoutEffect(() => {\n return () => {\n portalNode == null || portalNode.remove();\n // Allow the subsequent layout effects to create a new node on updates.\n // The portal node will still be cleaned up on unmount.\n // https://github.com/floating-ui/floating-ui/issues/2454\n queueMicrotask(() => {\n portalNodeRef.current = null;\n });\n };\n }, [portalNode]);\n useModernLayoutEffect(() => {\n // Wait for the uniqueId to be generated before creating the portal node in\n // React <18 (using `useFloatingId` instead of the native `useId`).\n // https://github.com/floating-ui/floating-ui/issues/2778\n if (!uniqueId) return;\n if (portalNodeRef.current) return;\n const existingIdRoot = id ? document.getElementById(id) : null;\n if (!existingIdRoot) return;\n const subRoot = document.createElement('div');\n subRoot.id = uniqueId;\n subRoot.setAttribute(attr, '');\n existingIdRoot.appendChild(subRoot);\n portalNodeRef.current = subRoot;\n setPortalNode(subRoot);\n }, [id, uniqueId]);\n useModernLayoutEffect(() => {\n // Wait for the root to exist before creating the portal node. The root must\n // be stored in state, not a ref, for this to work reactively.\n if (root === null) return;\n if (!uniqueId) return;\n if (portalNodeRef.current) return;\n let container = root || (portalContext == null ? void 0 : portalContext.portalNode);\n if (container && !isNode(container)) container = container.current;\n container = container || document.body;\n let idWrapper = null;\n if (id) {\n idWrapper = document.createElement('div');\n idWrapper.id = id;\n container.appendChild(idWrapper);\n }\n const subRoot = document.createElement('div');\n subRoot.id = uniqueId;\n subRoot.setAttribute(attr, '');\n container = idWrapper || container;\n container.appendChild(subRoot);\n portalNodeRef.current = subRoot;\n setPortalNode(subRoot);\n }, [id, root, uniqueId, portalContext]);\n return portalNode;\n}\n/**\n * Portals the floating element into a given container element — by default,\n * outside of the app root and into the body.\n * This is necessary to ensure the floating element can appear outside any\n * potential parent containers that cause clipping (such as `overflow: hidden`),\n * while retaining its location in the React tree.\n * @see https://floating-ui.com/docs/FloatingPortal\n */\nfunction FloatingPortal(props) {\n const {\n children,\n id,\n root,\n preserveTabOrder = true\n } = props;\n const portalNode = useFloatingPortalNode({\n id,\n root\n });\n const [focusManagerState, setFocusManagerState] = React.useState(null);\n const beforeOutsideRef = React.useRef(null);\n const afterOutsideRef = React.useRef(null);\n const beforeInsideRef = React.useRef(null);\n const afterInsideRef = React.useRef(null);\n const modal = focusManagerState == null ? void 0 : focusManagerState.modal;\n const open = focusManagerState == null ? void 0 : focusManagerState.open;\n const shouldRenderGuards =\n // The FocusManager and therefore floating element are currently open/\n // rendered.\n !!focusManagerState &&\n // Guards are only for non-modal focus management.\n !focusManagerState.modal &&\n // Don't render if unmount is transitioning.\n focusManagerState.open && preserveTabOrder && !!(root || portalNode);\n\n // https://codesandbox.io/s/tabbable-portal-f4tng?file=/src/TabbablePortal.tsx\n React.useEffect(() => {\n if (!portalNode || !preserveTabOrder || modal) {\n return;\n }\n\n // Make sure elements inside the portal element are tabbable only when the\n // portal has already been focused, either by tabbing into a focus trap\n // element outside or using the mouse.\n function onFocus(event) {\n if (portalNode && isOutsideEvent(event)) {\n const focusing = event.type === 'focusin';\n const manageFocus = focusing ? enableFocusInside : disableFocusInside;\n manageFocus(portalNode);\n }\n }\n // Listen to the event on the capture phase so they run before the focus\n // trap elements onFocus prop is called.\n portalNode.addEventListener('focusin', onFocus, true);\n portalNode.addEventListener('focusout', onFocus, true);\n return () => {\n portalNode.removeEventListener('focusin', onFocus, true);\n portalNode.removeEventListener('focusout', onFocus, true);\n };\n }, [portalNode, preserveTabOrder, modal]);\n React.useEffect(() => {\n if (!portalNode) return;\n if (open) return;\n enableFocusInside(portalNode);\n }, [open, portalNode]);\n return /*#__PURE__*/jsxs(PortalContext.Provider, {\n value: React.useMemo(() => ({\n preserveTabOrder,\n beforeOutsideRef,\n afterOutsideRef,\n beforeInsideRef,\n afterInsideRef,\n portalNode,\n setFocusManagerState\n }), [preserveTabOrder, portalNode]),\n children: [shouldRenderGuards && portalNode && /*#__PURE__*/jsx(FocusGuard, {\n \"data-type\": \"outside\",\n ref: beforeOutsideRef,\n onFocus: event => {\n if (isOutsideEvent(event, portalNode)) {\n var _beforeInsideRef$curr;\n (_beforeInsideRef$curr = beforeInsideRef.current) == null || _beforeInsideRef$curr.focus();\n } else {\n const domReference = focusManagerState ? focusManagerState.domReference : null;\n const prevTabbable = getPreviousTabbable(domReference);\n prevTabbable == null || prevTabbable.focus();\n }\n }\n }), shouldRenderGuards && portalNode && /*#__PURE__*/jsx(\"span\", {\n \"aria-owns\": portalNode.id,\n style: HIDDEN_OWNER_STYLES\n }), portalNode && /*#__PURE__*/ReactDOM.createPortal(children, portalNode), shouldRenderGuards && portalNode && /*#__PURE__*/jsx(FocusGuard, {\n \"data-type\": \"outside\",\n ref: afterOutsideRef,\n onFocus: event => {\n if (isOutsideEvent(event, portalNode)) {\n var _afterInsideRef$curre;\n (_afterInsideRef$curre = afterInsideRef.current) == null || _afterInsideRef$curre.focus();\n } else {\n const domReference = focusManagerState ? focusManagerState.domReference : null;\n const nextTabbable = getNextTabbable(domReference);\n nextTabbable == null || nextTabbable.focus();\n (focusManagerState == null ? void 0 : focusManagerState.closeOnFocusOut) && (focusManagerState == null ? void 0 : focusManagerState.onOpenChange(false, event.nativeEvent, 'focus-out'));\n }\n }\n })]\n });\n}\nconst usePortalContext = () => React.useContext(PortalContext);\n\nfunction useLiteMergeRefs(refs) {\n return React.useMemo(() => {\n return value => {\n refs.forEach(ref => {\n if (ref) {\n ref.current = value;\n }\n });\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n}\n\nconst LIST_LIMIT = 20;\nlet previouslyFocusedElements = [];\nfunction clearDisconnectedPreviouslyFocusedElements() {\n previouslyFocusedElements = previouslyFocusedElements.filter(elementRef => {\n var _elementRef$deref;\n return (_elementRef$deref = elementRef.deref()) == null ? void 0 : _elementRef$deref.isConnected;\n });\n}\nfunction addPreviouslyFocusedElement(element) {\n clearDisconnectedPreviouslyFocusedElements();\n if (element && getNodeName(element) !== 'body') {\n previouslyFocusedElements.push(new WeakRef(element));\n if (previouslyFocusedElements.length > LIST_LIMIT) {\n previouslyFocusedElements = previouslyFocusedElements.slice(-LIST_LIMIT);\n }\n }\n}\nfunction getPreviouslyFocusedElement() {\n clearDisconnectedPreviouslyFocusedElements();\n const elementRef = previouslyFocusedElements[previouslyFocusedElements.length - 1];\n return elementRef == null ? void 0 : elementRef.deref();\n}\nfunction getFirstTabbableElement(container) {\n const tabbableOptions = getTabbableOptions();\n if (isTabbable(container, tabbableOptions)) {\n return container;\n }\n return tabbable(container, tabbableOptions)[0] || container;\n}\nfunction handleTabIndex(floatingFocusElement, orderRef) {\n var _floatingFocusElement;\n if (!orderRef.current.includes('floating') && !((_floatingFocusElement = floatingFocusElement.getAttribute('role')) != null && _floatingFocusElement.includes('dialog'))) {\n return;\n }\n const options = getTabbableOptions();\n const focusableElements = focusable(floatingFocusElement, options);\n const tabbableContent = focusableElements.filter(element => {\n const dataTabIndex = element.getAttribute('data-tabindex') || '';\n return isTabbable(element, options) || element.hasAttribute('data-tabindex') && !dataTabIndex.startsWith('-');\n });\n const tabIndex = floatingFocusElement.getAttribute('tabindex');\n if (orderRef.current.includes('floating') || tabbableContent.length === 0) {\n if (tabIndex !== '0') {\n floatingFocusElement.setAttribute('tabindex', '0');\n }\n } else if (tabIndex !== '-1' || floatingFocusElement.hasAttribute('data-tabindex') && floatingFocusElement.getAttribute('data-tabindex') !== '-1') {\n floatingFocusElement.setAttribute('tabindex', '-1');\n floatingFocusElement.setAttribute('data-tabindex', '-1');\n }\n}\nconst VisuallyHiddenDismiss = /*#__PURE__*/React.forwardRef(function VisuallyHiddenDismiss(props, ref) {\n return /*#__PURE__*/jsx(\"button\", {\n ...props,\n type: \"button\",\n ref: ref,\n tabIndex: -1,\n style: HIDDEN_STYLES\n });\n});\n/**\n * Provides focus management for the floating element.\n * @see https://floating-ui.com/docs/FloatingFocusManager\n */\nfunction FloatingFocusManager(props) {\n const {\n context,\n children,\n disabled = false,\n order = ['content'],\n guards: _guards = true,\n initialFocus = 0,\n returnFocus = true,\n restoreFocus = false,\n modal = true,\n visuallyHiddenDismiss = false,\n closeOnFocusOut = true,\n outsideElementsInert = false,\n getInsideElements: _getInsideElements = () => []\n } = props;\n const {\n open,\n onOpenChange,\n events,\n dataRef,\n elements: {\n domReference,\n floating\n }\n } = context;\n const getNodeId = useEffectEvent(() => {\n var _dataRef$current$floa;\n return (_dataRef$current$floa = dataRef.current.floatingContext) == null ? void 0 : _dataRef$current$floa.nodeId;\n });\n const getInsideElements = useEffectEvent(_getInsideElements);\n const ignoreInitialFocus = typeof initialFocus === 'number' && initialFocus < 0;\n // If the reference is a combobox and is typeable (e.g. input/textarea),\n // there are different focus semantics. The guards should not be rendered, but\n // aria-hidden should be applied to all nodes still. Further, the visually\n // hidden dismiss button should only appear at the end of the list, not the\n // start.\n const isUntrappedTypeableCombobox = isTypeableCombobox(domReference) && ignoreInitialFocus;\n\n // Force the guards to be rendered if the `inert` attribute is not supported.\n const inertSupported = supportsInert();\n const guards = inertSupported ? _guards : true;\n const useInert = !guards || inertSupported && outsideElementsInert;\n const orderRef = useLatestRef(order);\n const initialFocusRef = useLatestRef(initialFocus);\n const returnFocusRef = useLatestRef(returnFocus);\n const tree = useFloatingTree();\n const portalContext = usePortalContext();\n const startDismissButtonRef = React.useRef(null);\n const endDismissButtonRef = React.useRef(null);\n const preventReturnFocusRef = React.useRef(false);\n const isPointerDownRef = React.useRef(false);\n const tabbableIndexRef = React.useRef(-1);\n const blurTimeoutRef = React.useRef(-1);\n const isInsidePortal = portalContext != null;\n const floatingFocusElement = getFloatingFocusElement(floating);\n const getTabbableContent = useEffectEvent(function (container) {\n if (container === void 0) {\n container = floatingFocusElement;\n }\n return container ? tabbable(container, getTabbableOptions()) : [];\n });\n const getTabbableElements = useEffectEvent(container => {\n const content = getTabbableContent(container);\n return orderRef.current.map(type => {\n if (domReference && type === 'reference') {\n return domReference;\n }\n if (floatingFocusElement && type === 'floating') {\n return floatingFocusElement;\n }\n return content;\n }).filter(Boolean).flat();\n });\n React.useEffect(() => {\n if (disabled) return;\n if (!modal) return;\n function onKeyDown(event) {\n if (event.key === 'Tab') {\n // The focus guards have nothing to focus, so we need to stop the event.\n if (contains$1(floatingFocusElement, activeElement(getDocument$1(floatingFocusElement))) && getTabbableContent().length === 0 && !isUntrappedTypeableCombobox) {\n stopEvent(event);\n }\n const els = getTabbableElements();\n const target = getTarget$1(event);\n if (orderRef.current[0] === 'reference' && target === domReference) {\n stopEvent(event);\n if (event.shiftKey) {\n enqueueFocus(els[els.length - 1]);\n } else {\n enqueueFocus(els[1]);\n }\n }\n if (orderRef.current[1] === 'floating' && target === floatingFocusElement && event.shiftKey) {\n stopEvent(event);\n enqueueFocus(els[0]);\n }\n }\n }\n const doc = getDocument$1(floatingFocusElement);\n doc.addEventListener('keydown', onKeyDown);\n return () => {\n doc.removeEventListener('keydown', onKeyDown);\n };\n }, [disabled, domReference, floatingFocusElement, modal, orderRef, isUntrappedTypeableCombobox, getTabbableContent, getTabbableElements]);\n React.useEffect(() => {\n if (disabled) return;\n if (!floating) return;\n function handleFocusIn(event) {\n const target = getTarget$1(event);\n const tabbableContent = getTabbableContent();\n const tabbableIndex = tabbableContent.indexOf(target);\n if (tabbableIndex !== -1) {\n tabbableIndexRef.current = tabbableIndex;\n }\n }\n floating.addEventListener('focusin', handleFocusIn);\n return () => {\n floating.removeEventListener('focusin', handleFocusIn);\n };\n }, [disabled, floating, getTabbableContent]);\n React.useEffect(() => {\n if (disabled) return;\n if (!closeOnFocusOut) return;\n\n // In Safari, buttons lose focus when pressing them.\n function handlePointerDown() {\n isPointerDownRef.current = true;\n setTimeout(() => {\n isPointerDownRef.current = false;\n });\n }\n function handleFocusOutside(event) {\n const relatedTarget = event.relatedTarget;\n const currentTarget = event.currentTarget;\n const target = getTarget$1(event);\n queueMicrotask(() => {\n const nodeId = getNodeId();\n const movedToUnrelatedNode = !(contains$1(domReference, relatedTarget) || contains$1(floating, relatedTarget) || contains$1(relatedTarget, floating) || contains$1(portalContext == null ? void 0 : portalContext.portalNode, relatedTarget) || relatedTarget != null && relatedTarget.hasAttribute(createAttribute('focus-guard')) || tree && (getNodeChildren$1(tree.nodesRef.current, nodeId).find(node => {\n var _node$context, _node$context2;\n return contains$1((_node$context = node.context) == null ? void 0 : _node$context.elements.floating, relatedTarget) || contains$1((_node$context2 = node.context) == null ? void 0 : _node$context2.elements.domReference, relatedTarget);\n }) || getNodeAncestors(tree.nodesRef.current, nodeId).find(node => {\n var _node$context3, _node$context4, _node$context5;\n return [(_node$context3 = node.context) == null ? void 0 : _node$context3.elements.floating, getFloatingFocusElement((_node$context4 = node.context) == null ? void 0 : _node$context4.elements.floating)].includes(relatedTarget) || ((_node$context5 = node.context) == null ? void 0 : _node$context5.elements.domReference) === relatedTarget;\n })));\n if (currentTarget === domReference && floatingFocusElement) {\n handleTabIndex(floatingFocusElement, orderRef);\n }\n\n // Restore focus to the previous tabbable element index to prevent\n // focus from being lost outside the floating tree.\n if (restoreFocus && currentTarget !== domReference && !(target != null && target.isConnected) && activeElement(getDocument$1(floatingFocusElement)) === getDocument$1(floatingFocusElement).body) {\n // Let `FloatingPortal` effect knows that focus is still inside the\n // floating tree.\n if (isHTMLElement(floatingFocusElement)) {\n floatingFocusElement.focus();\n }\n const prevTabbableIndex = tabbableIndexRef.current;\n const tabbableContent = getTabbableContent();\n const nodeToFocus = tabbableContent[prevTabbableIndex] || tabbableContent[tabbableContent.length - 1] || floatingFocusElement;\n if (isHTMLElement(nodeToFocus)) {\n nodeToFocus.focus();\n }\n }\n\n // https://github.com/floating-ui/floating-ui/issues/3060\n if (dataRef.current.insideReactTree) {\n dataRef.current.insideReactTree = false;\n return;\n }\n\n // Focus did not move inside the floating tree, and there are no tabbable\n // portal guards to handle closing.\n if ((isUntrappedTypeableCombobox ? true : !modal) && relatedTarget && movedToUnrelatedNode && !isPointerDownRef.current &&\n // Fix React 18 Strict Mode returnFocus due to double rendering.\n relatedTarget !== getPreviouslyFocusedElement()) {\n preventReturnFocusRef.current = true;\n onOpenChange(false, event, 'focus-out');\n }\n });\n }\n const shouldHandleBlurCapture = Boolean(!tree && portalContext);\n function markInsideReactTree() {\n clearTimeoutIfSet(blurTimeoutRef);\n dataRef.current.insideReactTree = true;\n blurTimeoutRef.current = window.setTimeout(() => {\n dataRef.current.insideReactTree = false;\n });\n }\n if (floating && isHTMLElement(domReference)) {\n domReference.addEventListener('focusout', handleFocusOutside);\n domReference.addEventListener('pointerdown', handlePointerDown);\n floating.addEventListener('focusout', handleFocusOutside);\n if (shouldHandleBlurCapture) {\n floating.addEventListener('focusout', markInsideReactTree, true);\n }\n return () => {\n domReference.removeEventListener('focusout', handleFocusOutside);\n domReference.removeEventListener('pointerdown', handlePointerDown);\n floating.removeEventListener('focusout', handleFocusOutside);\n if (shouldHandleBlurCapture) {\n floating.removeEventListener('focusout', markInsideReactTree, true);\n }\n };\n }\n }, [disabled, domReference, floating, floatingFocusElement, modal, tree, portalContext, onOpenChange, closeOnFocusOut, restoreFocus, getTabbableContent, isUntrappedTypeableCombobox, getNodeId, orderRef, dataRef]);\n const beforeGuardRef = React.useRef(null);\n const afterGuardRef = React.useRef(null);\n const mergedBeforeGuardRef = useLiteMergeRefs([beforeGuardRef, portalContext == null ? void 0 : portalContext.beforeInsideRef]);\n const mergedAfterGuardRef = useLiteMergeRefs([afterGuardRef, portalContext == null ? void 0 : portalContext.afterInsideRef]);\n React.useEffect(() => {\n var _portalContext$portal, _ancestors$find;\n if (disabled) return;\n if (!floating) return;\n\n // Don't hide portals nested within the parent portal.\n const portalNodes = Array.from((portalContext == null || (_portalContext$portal = portalContext.portalNode) == null ? void 0 : _portalContext$portal.querySelectorAll(\"[\" + createAttribute('portal') + \"]\")) || []);\n const ancestors = tree ? getNodeAncestors(tree.nodesRef.current, getNodeId()) : [];\n const rootAncestorComboboxDomReference = (_ancestors$find = ancestors.find(node => {\n var _node$context6;\n return isTypeableCombobox(((_node$context6 = node.context) == null ? void 0 : _node$context6.elements.domReference) || null);\n })) == null || (_ancestors$find = _ancestors$find.context) == null ? void 0 : _ancestors$find.elements.domReference;\n const insideElements = [floating, rootAncestorComboboxDomReference, ...portalNodes, ...getInsideElements(), startDismissButtonRef.current, endDismissButtonRef.current, beforeGuardRef.current, afterGuardRef.current, portalContext == null ? void 0 : portalContext.beforeOutsideRef.current, portalContext == null ? void 0 : portalContext.afterOutsideRef.current, orderRef.current.includes('reference') || isUntrappedTypeableCombobox ? domReference : null].filter(x => x != null);\n const cleanup = modal || isUntrappedTypeableCombobox ? markOthers(insideElements, !useInert, useInert) : markOthers(insideElements);\n return () => {\n cleanup();\n };\n }, [disabled, domReference, floating, modal, orderRef, portalContext, isUntrappedTypeableCombobox, guards, useInert, tree, getNodeId, getInsideElements]);\n useModernLayoutEffect(() => {\n if (disabled || !isHTMLElement(floatingFocusElement)) return;\n const doc = getDocument$1(floatingFocusElement);\n const previouslyFocusedElement = activeElement(doc);\n\n // Wait for any layout effect state setters to execute to set `tabIndex`.\n queueMicrotask(() => {\n const focusableElements = getTabbableElements(floatingFocusElement);\n const initialFocusValue = initialFocusRef.current;\n const elToFocus = (typeof initialFocusValue === 'number' ? focusableElements[initialFocusValue] : initialFocusValue.current) || floatingFocusElement;\n const focusAlreadyInsideFloatingEl = contains$1(floatingFocusElement, previouslyFocusedElement);\n if (!ignoreInitialFocus && !focusAlreadyInsideFloatingEl && open) {\n enqueueFocus(elToFocus, {\n preventScroll: elToFocus === floatingFocusElement\n });\n }\n });\n }, [disabled, open, floatingFocusElement, ignoreInitialFocus, getTabbableElements, initialFocusRef]);\n useModernLayoutEffect(() => {\n if (disabled || !floatingFocusElement) return;\n const doc = getDocument$1(floatingFocusElement);\n const previouslyFocusedElement = activeElement(doc);\n addPreviouslyFocusedElement(previouslyFocusedElement);\n\n // Dismissing via outside press should always ignore `returnFocus` to\n // prevent unwanted scrolling.\n function onOpenChange(_ref) {\n let {\n reason,\n event,\n nested\n } = _ref;\n if (['hover', 'safe-polygon'].includes(reason) && event.type === 'mouseleave') {\n preventReturnFocusRef.current = true;\n }\n if (reason !== 'outside-press') return;\n if (nested) {\n preventReturnFocusRef.current = false;\n } else if (isVirtualClick(event) || isVirtualPointerEvent(event)) {\n preventReturnFocusRef.current = false;\n } else {\n let isPreventScrollSupported = false;\n document.createElement('div').focus({\n get preventScroll() {\n isPreventScrollSupported = true;\n return false;\n }\n });\n if (isPreventScrollSupported) {\n preventReturnFocusRef.current = false;\n } else {\n preventReturnFocusRef.current = true;\n }\n }\n }\n events.on('openchange', onOpenChange);\n const fallbackEl = doc.createElement('span');\n fallbackEl.setAttribute('tabindex', '-1');\n fallbackEl.setAttribute('aria-hidden', 'true');\n Object.assign(fallbackEl.style, HIDDEN_STYLES);\n if (isInsidePortal && domReference) {\n domReference.insertAdjacentElement('afterend', fallbackEl);\n }\n function getReturnElement() {\n if (typeof returnFocusRef.current === 'boolean') {\n const el = domReference || getPreviouslyFocusedElement();\n return el && el.isConnected ? el : fallbackEl;\n }\n return returnFocusRef.current.current || fallbackEl;\n }\n return () => {\n events.off('openchange', onOpenChange);\n const activeEl = activeElement(doc);\n const isFocusInsideFloatingTree = contains$1(floating, activeEl) || tree && getNodeChildren$1(tree.nodesRef.current, getNodeId(), false).some(node => {\n var _node$context7;\n return contains$1((_node$context7 = node.context) == null ? void 0 : _node$context7.elements.floating, activeEl);\n });\n const returnElement = getReturnElement();\n queueMicrotask(() => {\n // This is `returnElement`, if it's tabbable, or its first tabbable child.\n const tabbableReturnElement = getFirstTabbableElement(returnElement);\n if (\n // eslint-disable-next-line react-hooks/exhaustive-deps\n returnFocusRef.current && !preventReturnFocusRef.current && isHTMLElement(tabbableReturnElement) && (\n // If the focus moved somewhere else after mount, avoid returning focus\n // since it likely entered a different element which should be\n // respected: https://github.com/floating-ui/floating-ui/issues/2607\n tabbableReturnElement !== activeEl && activeEl !== doc.body ? isFocusInsideFloatingTree : true)) {\n tabbableReturnElement.focus({\n preventScroll: true\n });\n }\n fallbackEl.remove();\n });\n };\n }, [disabled, floating, floatingFocusElement, returnFocusRef, dataRef, events, tree, isInsidePortal, domReference, getNodeId]);\n React.useEffect(() => {\n // The `returnFocus` cleanup behavior is inside a microtask; ensure we\n // wait for it to complete before resetting the flag.\n queueMicrotask(() => {\n preventReturnFocusRef.current = false;\n });\n return () => {\n queueMicrotask(clearDisconnectedPreviouslyFocusedElements);\n };\n }, [disabled]);\n\n // Synchronize the `context` & `modal` value to the FloatingPortal context.\n // It will decide whether or not it needs to render its own guards.\n useModernLayoutEffect(() => {\n if (disabled) return;\n if (!portalContext) return;\n portalContext.setFocusManagerState({\n modal,\n closeOnFocusOut,\n open,\n onOpenChange,\n domReference\n });\n return () => {\n portalContext.setFocusManagerState(null);\n };\n }, [disabled, portalContext, modal, open, onOpenChange, closeOnFocusOut, domReference]);\n useModernLayoutEffect(() => {\n if (disabled) return;\n if (!floatingFocusElement) return;\n handleTabIndex(floatingFocusElement, orderRef);\n }, [disabled, floatingFocusElement, orderRef]);\n function renderDismissButton(location) {\n if (disabled || !visuallyHiddenDismiss || !modal) {\n return null;\n }\n return /*#__PURE__*/jsx(VisuallyHiddenDismiss, {\n ref: location === 'start' ? startDismissButtonRef : endDismissButtonRef,\n onClick: event => onOpenChange(false, event.nativeEvent),\n children: typeof visuallyHiddenDismiss === 'string' ? visuallyHiddenDismiss : 'Dismiss'\n });\n }\n const shouldRenderGuards = !disabled && guards && (modal ? !isUntrappedTypeableCombobox : true) && (isInsidePortal || modal);\n return /*#__PURE__*/jsxs(Fragment, {\n children: [shouldRenderGuards && /*#__PURE__*/jsx(FocusGuard, {\n \"data-type\": \"inside\",\n ref: mergedBeforeGuardRef,\n onFocus: event => {\n if (modal) {\n const els = getTabbableElements();\n enqueueFocus(order[0] === 'reference' ? els[0] : els[els.length - 1]);\n } else if (portalContext != null && portalContext.preserveTabOrder && portalContext.portalNode) {\n preventReturnFocusRef.current = false;\n if (isOutsideEvent(event, portalContext.portalNode)) {\n const nextTabbable = getNextTabbable(domReference);\n nextTabbable == null || nextTabbable.focus();\n } else {\n var _portalContext$before;\n (_portalContext$before = portalContext.beforeOutsideRef.current) == null || _portalContext$before.focus();\n }\n }\n }\n }), !isUntrappedTypeableCombobox && renderDismissButton('start'), children, renderDismissButton('end'), shouldRenderGuards && /*#__PURE__*/jsx(FocusGuard, {\n \"data-type\": \"inside\",\n ref: mergedAfterGuardRef,\n onFocus: event => {\n if (modal) {\n enqueueFocus(getTabbableElements()[0]);\n } else if (portalContext != null && portalContext.preserveTabOrder && portalContext.portalNode) {\n if (closeOnFocusOut) {\n preventReturnFocusRef.current = true;\n }\n if (isOutsideEvent(event, portalContext.portalNode)) {\n const prevTabbable = getPreviousTabbable(domReference);\n prevTabbable == null || prevTabbable.focus();\n } else {\n var _portalContext$afterO;\n (_portalContext$afterO = portalContext.afterOutsideRef.current) == null || _portalContext$afterO.focus();\n }\n }\n }\n })]\n });\n}\n\nlet lockCount = 0;\nconst scrollbarProperty = '--floating-ui-scrollbar-width';\nfunction enableScrollLock() {\n const platform = getPlatform();\n const isIOS = /iP(hone|ad|od)|iOS/.test(platform) ||\n // iPads can claim to be MacIntel\n platform === 'MacIntel' && navigator.maxTouchPoints > 1;\n const bodyStyle = document.body.style;\n // RTL <body> scrollbar\n const scrollbarX = Math.round(document.documentElement.getBoundingClientRect().left) + document.documentElement.scrollLeft;\n const paddingProp = scrollbarX ? 'paddingLeft' : 'paddingRight';\n const scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;\n const scrollX = bodyStyle.left ? parseFloat(bodyStyle.left) : window.scrollX;\n const scrollY = bodyStyle.top ? parseFloat(bodyStyle.top) : window.scrollY;\n bodyStyle.overflow = 'hidden';\n bodyStyle.setProperty(scrollbarProperty, scrollbarWidth + \"px\");\n if (scrollbarWidth) {\n bodyStyle[paddingProp] = scrollbarWidth + \"px\";\n }\n\n // Only iOS doesn't respect `overflow: hidden` on document.body, and this\n // technique has fewer side effects.\n if (isIOS) {\n var _window$visualViewpor, _window$visualViewpor2;\n // iOS 12 does not support `visualViewport`.\n const offsetLeft = ((_window$visualViewpor = window.visualViewport) == null ? void 0 : _window$visualViewpor.offsetLeft) || 0;\n const offsetTop = ((_window$visualViewpor2 = window.visualViewport) == null ? void 0 : _window$visualViewpor2.offsetTop) || 0;\n Object.assign(bodyStyle, {\n position: 'fixed',\n top: -(scrollY - Math.floor(offsetTop)) + \"px\",\n left: -(scrollX - Math.floor(offsetLeft)) + \"px\",\n right: '0'\n });\n }\n return () => {\n Object.assign(bodyStyle, {\n overflow: '',\n [paddingProp]: ''\n });\n bodyStyle.removeProperty(scrollbarProperty);\n if (isIOS) {\n Object.assign(bodyStyle, {\n position: '',\n top: '',\n left: '',\n right: ''\n });\n window.scrollTo(scrollX, scrollY);\n }\n };\n}\nlet cleanup = () => {};\n\n/**\n * Provides base styling for a fixed overlay element to dim content or block\n * pointer events behind a floating element.\n * It's a regular `<div>`, so it can be styled via any CSS solution you prefer.\n * @see https://floating-ui.com/docs/FloatingOverlay\n */\nconst FloatingOverlay = /*#__PURE__*/React.forwardRef(function FloatingOverlay(props, ref) {\n const {\n lockScroll = false,\n ...rest\n } = props;\n useModernLayoutEffect(() => {\n if (!lockScroll) return;\n lockCount++;\n if (lockCount === 1) {\n cleanup = enableScrollLock();\n }\n return () => {\n lockCount--;\n if (lockCount === 0) {\n cleanup();\n }\n };\n }, [lockScroll]);\n return /*#__PURE__*/jsx(\"div\", {\n ref: ref,\n ...rest,\n style: {\n position: 'fixed',\n overflow: 'auto',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...rest.style\n }\n });\n});\n\nfunction isButtonTarget(event) {\n return isHTMLElement(event.target) && event.target.tagName === 'BUTTON';\n}\nfunction isAnchorTarget(event) {\n return isHTMLElement(event.target) && event.target.tagName === 'A';\n}\nfunction isSpaceIgnored(element) {\n return isTypeableElement(element);\n}\n/**\n * Opens or closes the floating element when clicking the reference element.\n * @see https://floating-ui.com/docs/useClick\n */\nfunction useClick(context, props) {\n if (props === void 0) {\n props = {};\n }\n const {\n open,\n onOpenChange,\n dataRef,\n elements: {\n domReference\n }\n } = context;\n const {\n enabled = true,\n event: eventOption = 'click',\n toggle = true,\n ignoreMouse = false,\n keyboardHandlers = true,\n stickIfOpen = true\n } = props;\n const pointerTypeRef = React.useRef();\n const didKeyDownRef = React.useRef(false);\n const reference = React.useMemo(() => ({\n onPointerDown(event) {\n pointerTypeRef.current = event.pointerType;\n },\n onMouseDown(event) {\n const pointerType = pointerTypeRef.current;\n\n // Ignore all buttons except for the \"main\" button.\n // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button\n if (event.button !== 0) return;\n if (eventOption === 'click') return;\n if (isMouseLikePointerType(pointerType, true) && ignoreMouse) return;\n if (open && toggle && (dataRef.current.openEvent && stickIfOpen ? dataRef.current.openEvent.type === 'mousedown' : true)) {\n onOpenChange(false, event.nativeEvent, 'click');\n } else {\n // Prevent stealing focus from the floating element\n event.preventDefault();\n onOpenChange(true, event.nativeEvent, 'click');\n }\n },\n onClick(event) {\n const pointerType = pointerTypeRef.current;\n if (eventOption === 'mousedown' && pointerTypeRef.current) {\n pointerTypeRef.current = undefined;\n return;\n }\n if (isMouseLikePointerType(pointerType, true) && ignoreMouse) return;\n if (open && toggle && (dataRef.current.openEvent && stickIfOpen ? dataRef.current.openEvent.type === 'click' : true)) {\n onOpenChange(false, event.nativeEvent, 'click');\n } else {\n onOpenChange(true, event.nativeEvent, 'click');\n }\n },\n onKeyDown(event) {\n pointerTypeRef.current = undefined;\n if (event.defaultPrevented || !keyboardHandlers || isButtonTarget(event)) {\n return;\n }\n if (event.key === ' ' && !isSpaceIgnored(domReference)) {\n // Prevent scrolling\n event.preventDefault();\n didKeyDownRef.current = true;\n }\n if (isAnchorTarget(event)) {\n return;\n }\n if (event.key === 'Enter') {\n if (open && toggle) {\n onOpenChange(false, event.nativeEvent, 'click');\n } else {\n onOpenChange(true, event.nativeEvent, 'click');\n }\n }\n },\n onKeyUp(event) {\n if (event.defaultPrevented || !keyboardHandlers || isButtonTarget(event) || isSpaceIgnored(domReference)) {\n return;\n }\n if (event.key === ' ' && didKeyDownRef.current) {\n didKeyDownRef.current = false;\n if (open && toggle) {\n onOpenChange(false, event.nativeEvent, 'click');\n } else {\n onOpenChange(true, event.nativeEvent, 'click');\n }\n }\n }\n }), [dataRef, domReference, eventOption, ignoreMouse, keyboardHandlers, onOpenChange, open, stickIfOpen, toggle]);\n return React.useMemo(() => enabled ? {\n reference\n } : {}, [enabled, reference]);\n}\n\nfunction createVirtualElement(domElement, data) {\n let offsetX = null;\n let offsetY = null;\n let isAutoUpdateEvent = false;\n return {\n contextElement: domElement || undefined,\n getBoundingClientRect() {\n var _data$dataRef$current;\n const domRect = (domElement == null ? void 0 : domElement.getBoundingClientRect()) || {\n width: 0,\n height: 0,\n x: 0,\n y: 0\n };\n const isXAxis = data.axis === 'x' || data.axis === 'both';\n const isYAxis = data.axis === 'y' || data.axis === 'both';\n const canTrackCursorOnAutoUpdate = ['mouseenter', 'mousemove'].includes(((_data$dataRef$current = data.dataRef.current.openEvent) == null ? void 0 : _data$dataRef$current.type) || '') && data.pointerType !== 'touch';\n let width = domRect.width;\n let height = domRect.height;\n let x = domRect.x;\n let y = domRect.y;\n if (offsetX == null && data.x && isXAxis) {\n offsetX = domRect.x - data.x;\n }\n if (offsetY == null && data.y && isYAxis) {\n offsetY = domRect.y - data.y;\n }\n x -= offsetX || 0;\n y -= offsetY || 0;\n width = 0;\n height = 0;\n if (!isAutoUpdateEvent || canTrackCursorOnAutoUpdate) {\n width = data.axis === 'y' ? domRect.width : 0;\n height = data.axis === 'x' ? domRect.height : 0;\n x = isXAxis && data.x != null ? data.x : x;\n y = isYAxis && data.y != null ? data.y : y;\n } else if (isAutoUpdateEvent && !canTrackCursorOnAutoUpdate) {\n height = data.axis === 'x' ? domRect.height : height;\n width = data.axis === 'y' ? domRect.width : width;\n }\n isAutoUpdateEvent = true;\n return {\n width,\n height,\n x,\n y,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x\n };\n }\n };\n}\nfunction isMouseBasedEvent(event) {\n return event != null && event.clientX != null;\n}\n/**\n * Positions the floating element relative to a client point (in the viewport),\n * such as the mouse position. By default, it follows the mouse cursor.\n * @see https://floating-ui.com/docs/useClientPoint\n */\nfunction useClientPoint(context, props) {\n if (props === void 0) {\n props = {};\n }\n const {\n open,\n dataRef,\n elements: {\n floating,\n domReference\n },\n refs\n } = context;\n const {\n enabled = true,\n axis = 'both',\n x = null,\n y = null\n } = props;\n const initialRef = React.useRef(false);\n const cleanupListenerRef = React.useRef(null);\n const [pointerType, setPointerType] = React.useState();\n const [reactive, setReactive] = React.useState([]);\n const setReference = useEffectEvent((x, y) => {\n if (initialRef.current) return;\n\n // Prevent setting if the open event was not a mouse-like one\n // (e.g. focus to open, then hover over the reference element).\n // Only apply if the event exists.\n if (dataRef.current.openEvent && !isMouseBasedEvent(dataRef.current.openEvent)) {\n return;\n }\n refs.setPositionReference(createVirtualElement(domReference, {\n x,\n y,\n axis,\n dataRef,\n pointerType\n }));\n });\n const handleReferenceEnterOrMove = useEffectEvent(event => {\n if (x != null || y != null) return;\n if (!open) {\n setReference(event.clientX, event.clientY);\n } else if (!cleanupListenerRef.current) {\n // If there's no cleanup, there's no listener, but we want to ensure\n // we add the listener if the cursor landed on the floating element and\n // then back on the reference (i.e. it's interactive).\n setReactive([]);\n }\n });\n\n // If the pointer is a mouse-like pointer, we want to continue following the\n // mouse even if the floating element is transitioning out. On touch\n // devices, this is undesirable because the floating element will move to\n // the dismissal touch point.\n const openCheck = isMouseLikePointerType(pointerType) ? floating : open;\n const addListener = React.useCallback(() => {\n // Explicitly specified `x`/`y` coordinates shouldn't add a listener.\n if (!openCheck || !enabled || x != null || y != null) return;\n const win = getWindow(floating);\n function handleMouseMove(event) {\n const target = getTarget$1(event);\n if (!contains$1(floating, target)) {\n setReference(event.clientX, event.clientY);\n } else {\n win.removeEventListener('mousemove', handleMouseMove);\n cleanupListenerRef.current = null;\n }\n }\n if (!dataRef.current.openEvent || isMouseBasedEvent(dataRef.current.openEvent)) {\n win.addEventListener('mousemove', handleMouseMove);\n const cleanup = () => {\n win.removeEventListener('mousemove', handleMouseMove);\n cleanupListenerRef.current = null;\n };\n cleanupListenerRef.current = cleanup;\n return cleanup;\n }\n refs.setPositionReference(domReference);\n }, [openCheck, enabled, x, y, floating, dataRef, refs, domReference, setReference]);\n React.useEffect(() => {\n return addListener();\n }, [addListener, reactive]);\n React.useEffect(() => {\n if (enabled && !floating) {\n initialRef.current = false;\n }\n }, [enabled, floating]);\n React.useEffect(() => {\n if (!enabled && open) {\n initialRef.current = true;\n }\n }, [enabled, open]);\n useModernLayoutEffect(() => {\n if (enabled && (x != null || y != null)) {\n initialRef.current = false;\n setReference(x, y);\n }\n }, [enabled, x, y, setReference]);\n const reference = React.useMemo(() => {\n function setPointerTypeRef(_ref) {\n let {\n pointerType\n } = _ref;\n setPointerType(pointerType);\n }\n return {\n onPointerDown: setPointerTypeRef,\n onPointerEnter: setPointerTypeRef,\n onMouseMove: handleReferenceEnterOrMove,\n onMouseEnter: handleReferenceEnterOrMove\n };\n }, [handleReferenceEnterOrMove]);\n return React.useMemo(() => enabled ? {\n reference\n } : {}, [enabled, reference]);\n}\n\nconst bubbleHandlerKeys = {\n pointerdown: 'onPointerDown',\n mousedown: 'onMouseDown',\n click: 'onClick'\n};\nconst captureHandlerKeys = {\n pointerdown: 'onPointerDownCapture',\n mousedown: 'onMouseDownCapture',\n click: 'onClickCapture'\n};\nconst normalizeProp = normalizable => {\n var _normalizable$escapeK, _normalizable$outside;\n return {\n escapeKey: typeof normalizable === 'boolean' ? normalizable : (_normalizable$escapeK = normalizable == null ? void 0 : normalizable.escapeKey) != null ? _normalizable$escapeK : false,\n outsidePress: typeof normalizable === 'boolean' ? normalizable : (_normalizable$outside = normalizable == null ? void 0 : normalizable.outsidePress) != null ? _normalizable$outside : true\n };\n};\n/**\n * Closes the floating element when a dismissal is requested — by default, when\n * the user presses the `escape` key or outside of the floating element.\n * @see https://floating-ui.com/docs/useDismiss\n */\nfunction useDismiss(context, props) {\n if (props === void 0) {\n props = {};\n }\n const {\n open,\n onOpenChange,\n elements,\n dataRef\n } = context;\n const {\n enabled = true,\n escapeKey = true,\n outsidePress: unstable_outsidePress = true,\n outsidePressEvent = 'pointerdown',\n referencePress = false,\n referencePressEvent = 'pointerdown',\n ancestorScroll = false,\n bubbles,\n capture\n } = props;\n const tree = useFloatingTree();\n const outsidePressFn = useEffectEvent(typeof unstable_outsidePress === 'function' ? unstable_outsidePress : () => false);\n const outsidePress = typeof unstable_outsidePress === 'function' ? outsidePressFn : unstable_outsidePress;\n const endedOrStartedInsideRef = React.useRef(false);\n const {\n escapeKey: escapeKeyBubbles,\n outsidePress: outsidePressBubbles\n } = normalizeProp(bubbles);\n const {\n escapeKey: escapeKeyCapture,\n outsidePress: outsidePressCapture\n } = normalizeProp(capture);\n const isComposingRef = React.useRef(false);\n const closeOnEscapeKeyDown = useEffectEvent(event => {\n var _dataRef$current$floa;\n if (!open || !enabled || !escapeKey || event.key !== 'Escape') {\n return;\n }\n\n // Wait until IME is settled. Pressing `Escape` while composing should\n // close the compose menu, but not the floating element.\n if (isComposingRef.current) {\n return;\n }\n const nodeId = (_dataRef$current$floa = dataRef.current.floatingContext) == null ? void 0 : _dataRef$current$floa.nodeId;\n const children = tree ? getNodeChildren$1(tree.nodesRef.current, nodeId) : [];\n if (!escapeKeyBubbles) {\n event.stopPropagation();\n if (children.length > 0) {\n let shouldDismiss = true;\n children.forEach(child => {\n var _child$context;\n if ((_child$context = child.context) != null && _child$context.open && !child.context.dataRef.current.__escapeKeyBubbles) {\n shouldDismiss = false;\n return;\n }\n });\n if (!shouldDismiss) {\n return;\n }\n }\n }\n onOpenChange(false, isReactEvent(event) ? event.nativeEvent : event, 'escape-key');\n });\n const closeOnEscapeKeyDownCapture = useEffectEvent(event => {\n var _getTarget2;\n const callback = () => {\n var _getTarget;\n closeOnEscapeKeyDown(event);\n (_getTarget = getTarget$1(event)) == null || _getTarget.removeEventListener('keydown', callback);\n };\n (_getTarget2 = getTarget$1(event)) == null || _getTarget2.addEventListener('keydown', callback);\n });\n const closeOnPressOutside = useEffectEvent(event => {\n var _dataRef$current$floa2;\n // Given developers can stop the propagation of the synthetic event,\n // we can only be confident with a positive value.\n const insideReactTree = dataRef.current.insideReactTree;\n dataRef.current.insideReactTree = false;\n\n // When click outside is lazy (`click` event), handle dragging.\n // Don't close if:\n // - The click started inside the floating element.\n // - The click ended inside the floating element.\n const endedOrStartedInside = endedOrStartedInsideRef.current;\n endedOrStartedInsideRef.current = false;\n if (outsidePressEvent === 'click' && endedOrStartedInside) {\n return;\n }\n if (insideReactTree) {\n return;\n }\n if (typeof outsidePress === 'function' && !outsidePress(event)) {\n return;\n }\n const target = getTarget$1(event);\n const inertSelector = \"[\" + createAttribute('inert') + \"]\";\n const markers = getDocument$1(elements.floating).querySelectorAll(inertSelector);\n let targetRootAncestor = isElement(target) ? target : null;\n while (targetRootAncestor && !isLastTraversableNode(targetRootAncestor)) {\n const nextParent = getParentNode(targetRootAncestor);\n if (isLastTraversableNode(nextParent) || !isElement(nextParent)) {\n break;\n }\n targetRootAncestor = nextParent;\n }\n\n // Check if the click occurred on a third-party element injected after the\n // floating element rendered.\n if (markers.length && isElement(target) && !isRootElement(target) &&\n // Clicked on a direct ancestor (e.g. FloatingOverlay).\n !contains$1(target, elements.floating) &&\n // If the target root element contains none of the markers, then the\n // element was injected after the floating element rendered.\n Array.from(markers).every(marker => !contains$1(targetRootAncestor, marker))) {\n return;\n }\n\n // Check if the click occurred on the scrollbar\n if (isHTMLElement(target) && floating) {\n const lastTraversableNode = isLastTraversableNode(target);\n const style = getComputedStyle(target);\n const scrollRe = /auto|scroll/;\n const isScrollableX = lastTraversableNode || scrollRe.test(style.overflowX);\n const isScrollableY = lastTraversableNode || scrollRe.test(style.overflowY);\n const canScrollX = isScrollableX && target.clientWidth > 0 && target.scrollWidth > target.clientWidth;\n const canScrollY = isScrollableY && target.clientHeight > 0 && target.scrollHeight > target.clientHeight;\n const isRTL = style.direction === 'rtl';\n\n // Check click position relative to scrollbar.\n // In some browsers it is possible to change the <body> (or window)\n // scrollbar to the left side, but is very rare and is difficult to\n // check for. Plus, for modal dialogs with backdrops, it is more\n // important that the backdrop is checked but not so much the window.\n const pressedVerticalScrollbar = canScrollY && (isRTL ? event.offsetX <= target.offsetWidth - target.clientWidth : event.offsetX > target.clientWidth);\n const pressedHorizontalScrollbar = canScrollX && event.offsetY > target.clientHeight;\n if (pressedVerticalScrollbar || pressedHorizontalScrollbar) {\n return;\n }\n }\n const nodeId = (_dataRef$current$floa2 = dataRef.current.floatingContext) == null ? void 0 : _dataRef$current$floa2.nodeId;\n const targetIsInsideChildren = tree && getNodeChildren$1(tree.nodesRef.current, nodeId).some(node => {\n var _node$context;\n return isEventTargetWithin(event, (_node$context = node.context) == null ? void 0 : _node$context.elements.floating);\n });\n if (isEventTargetWithin(event, elements.floating) || isEventTargetWithin(event, elements.domReference) || targetIsInsideChildren) {\n return;\n }\n const children = tree ? getNodeChildren$1(tree.nodesRef.current, nodeId) : [];\n if (children.length > 0) {\n let shouldDismiss = true;\n children.forEach(child => {\n var _child$context2;\n if ((_child$context2 = child.context) != null && _child$context2.open && !child.context.dataRef.current.__outsidePressBubbles) {\n shouldDismiss = false;\n return;\n }\n });\n if (!shouldDismiss) {\n return;\n }\n }\n onOpenChange(false, event, 'outside-press');\n });\n const closeOnPressOutsideCapture = useEffectEvent(event => {\n var _getTarget4;\n const callback = () => {\n var _getTarget3;\n closeOnPressOutside(event);\n (_getTarget3 = getTarget$1(event)) == null || _getTarget3.removeEventListener(outsidePressEvent, callback);\n };\n (_getTarget4 = getTarget$1(event)) == null || _getTarget4.addEventListener(outsidePressEvent, callback);\n });\n React.useEffect(() => {\n if (!open || !enabled) {\n return;\n }\n dataRef.current.__escapeKeyBubbles = escapeKeyBubbles;\n dataRef.current.__outsidePressBubbles = outsidePressBubbles;\n let compositionTimeout = -1;\n function onScroll(event) {\n onOpenChange(false, event, 'ancestor-scroll');\n }\n function handleCompositionStart() {\n window.clearTimeout(compositionTimeout);\n isComposingRef.current = true;\n }\n function handleCompositionEnd() {\n // Safari fires `compositionend` before `keydown`, so we need to wait\n // until the next tick to set `isComposing` to `false`.\n // https://bugs.webkit.org/show_bug.cgi?id=165004\n compositionTimeout = window.setTimeout(() => {\n isComposingRef.current = false;\n },\n // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.\n // Only apply to WebKit for the test to remain 0ms.\n isWebKit() ? 5 : 0);\n }\n const doc = getDocument$1(elements.floating);\n if (escapeKey) {\n doc.addEventListener('keydown', escapeKeyCapture ? closeOnEscapeKeyDownCapture : closeOnEscapeKeyDown, escapeKeyCapture);\n doc.addEventListener('compositionstart', handleCompositionStart);\n doc.addEventListener('compositionend', handleCompositionEnd);\n }\n outsidePress && doc.addEventListener(outsidePressEvent, outsidePressCapture ? closeOnPressOutsideCapture : closeOnPressOutside, outsidePressCapture);\n let ancestors = [];\n if (ancestorScroll) {\n if (isElement(elements.domReference)) {\n ancestors = getOverflowAncestors(elements.domReference);\n }\n if (isElement(elements.floating)) {\n ancestors = ancestors.concat(getOverflowAncestors(elements.floating));\n }\n if (!isElement(elements.reference) && elements.reference && elements.reference.contextElement) {\n ancestors = ancestors.concat(getOverflowAncestors(elements.reference.contextElement));\n }\n }\n\n // Ignore the visual viewport for scrolling dismissal (allow pinch-zoom)\n ancestors = ancestors.filter(ancestor => {\n var _doc$defaultView;\n return ancestor !== ((_doc$defaultView = doc.defaultView) == null ? void 0 : _doc$defaultView.visualViewport);\n });\n ancestors.forEach(ancestor => {\n ancestor.addEventListener('scroll', onScroll, {\n passive: true\n });\n });\n return () => {\n if (escapeKey) {\n doc.removeEventListener('keydown', escapeKeyCapture ? closeOnEscapeKeyDownCapture : closeOnEscapeKeyDown, escapeKeyCapture);\n doc.removeEventListener('compositionstart', handleCompositionStart);\n doc.removeEventListener('compositionend', handleCompositionEnd);\n }\n outsidePress && doc.removeEventListener(outsidePressEvent, outsidePressCapture ? closeOnPressOutsideCapture : closeOnPressOutside, outsidePressCapture);\n ancestors.forEach(ancestor => {\n ancestor.removeEventListener('scroll', onScroll);\n });\n window.clearTimeout(compositionTimeout);\n };\n }, [dataRef, elements, escapeKey, outsidePress, outsidePressEvent, open, onOpenChange, ancestorScroll, enabled, escapeKeyBubbles, outsidePressBubbles, closeOnEscapeKeyDown, escapeKeyCapture, closeOnEscapeKeyDownCapture, closeOnPressOutside, outsidePressCapture, closeOnPressOutsideCapture]);\n React.useEffect(() => {\n dataRef.current.insideReactTree = false;\n }, [dataRef, outsidePress, outsidePressEvent]);\n const reference = React.useMemo(() => ({\n onKeyDown: closeOnEscapeKeyDown,\n ...(referencePress && {\n [bubbleHandlerKeys[referencePressEvent]]: event => {\n onOpenChange(false, event.nativeEvent, 'reference-press');\n },\n ...(referencePressEvent !== 'click' && {\n onClick(event) {\n onOpenChange(false, event.nativeEvent, 'reference-press');\n }\n })\n })\n }), [closeOnEscapeKeyDown, onOpenChange, referencePress, referencePressEvent]);\n const floating = React.useMemo(() => {\n function setMouseDownOrUpInside(event) {\n if (event.button !== 0) {\n return;\n }\n endedOrStartedInsideRef.current = true;\n }\n return {\n onKeyDown: closeOnEscapeKeyDown,\n onMouseDown: setMouseDownOrUpInside,\n onMouseUp: setMouseDownOrUpInside,\n [captureHandlerKeys[outsidePressEvent]]: () => {\n dataRef.current.insideReactTree = true;\n }\n };\n }, [closeOnEscapeKeyDown, outsidePressEvent, dataRef]);\n return React.useMemo(() => enabled ? {\n reference,\n floating\n } : {}, [enabled, reference, floating]);\n}\n\nfunction useFloatingRootContext(options) {\n const {\n open = false,\n onOpenChange: onOpenChangeProp,\n elements: elementsProp\n } = options;\n const floatingId = useId();\n const dataRef = React.useRef({});\n const [events] = React.useState(() => createEventEmitter());\n const nested = useFloatingParentNodeId() != null;\n if (process.env.NODE_ENV !== \"production\") {\n const optionDomReference = elementsProp.reference;\n if (optionDomReference && !isElement(optionDomReference)) {\n error('Cannot pass a virtual element to the `elements.reference` option,', 'as it must be a real DOM element. Use `refs.setPositionReference()`', 'instead.');\n }\n }\n const [positionReference, setPositionReference] = React.useState(elementsProp.reference);\n const onOpenChange = useEffectEvent((open, event, reason) => {\n dataRef.current.openEvent = open ? event : undefined;\n events.emit('openchange', {\n open,\n event,\n reason,\n nested\n });\n onOpenChangeProp == null || onOpenChangeProp(open, event, reason);\n });\n const refs = React.useMemo(() => ({\n setPositionReference\n }), []);\n const elements = React.useMemo(() => ({\n reference: positionReference || elementsProp.reference || null,\n floating: elementsProp.floating || null,\n domReference: elementsProp.reference\n }), [positionReference, elementsProp.reference, elementsProp.floating]);\n return React.useMemo(() => ({\n dataRef,\n open,\n onOpenChange,\n elements,\n events,\n floatingId,\n refs\n }), [open, onOpenChange, elements, events, floatingId, refs]);\n}\n\n/**\n * Provides data to position a floating element and context to add interactions.\n * @see https://floating-ui.com/docs/useFloating\n */\nfunction useFloating(options) {\n if (options === void 0) {\n options = {};\n }\n const {\n nodeId\n } = options;\n const internalRootContext = useFloatingRootContext({\n ...options,\n elements: {\n reference: null,\n floating: null,\n ...options.elements\n }\n });\n const rootContext = options.rootContext || internalRootContext;\n const computedElements = rootContext.elements;\n const [_domReference, setDomReference] = React.useState(null);\n const [positionReference, _setPositionReference] = React.useState(null);\n const optionDomReference = computedElements == null ? void 0 : computedElements.domReference;\n const domReference = optionDomReference || _domReference;\n const domReferenceRef = React.useRef(null);\n const tree = useFloatingTree();\n useModernLayoutEffect(() => {\n if (domReference) {\n domReferenceRef.current = domReference;\n }\n }, [domReference]);\n const position = useFloating$1({\n ...options,\n elements: {\n ...computedElements,\n ...(positionReference && {\n reference: positionReference\n })\n }\n });\n const setPositionReference = React.useCallback(node => {\n const computedPositionReference = isElement(node) ? {\n getBoundingClientRect: () => node.getBoundingClientRect(),\n getClientRects: () => node.getClientRects(),\n contextElement: node\n } : node;\n // Store the positionReference in state if the DOM reference is specified externally via the\n // `elements.reference` option. This ensures that it won't be overridden on future renders.\n _setPositionReference(computedPositionReference);\n position.refs.setReference(computedPositionReference);\n }, [position.refs]);\n const setReference = React.useCallback(node => {\n if (isElement(node) || node === null) {\n domReferenceRef.current = node;\n setDomReference(node);\n }\n\n // Backwards-compatibility for passing a virtual element to `reference`\n // after it has set the DOM reference.\n if (isElement(position.refs.reference.current) || position.refs.reference.current === null ||\n // Don't allow setting virtual elements using the old technique back to\n // `null` to support `positionReference` + an unstable `reference`\n // callback ref.\n node !== null && !isElement(node)) {\n position.refs.setReference(node);\n }\n }, [position.refs]);\n const refs = React.useMemo(() => ({\n ...position.refs,\n setReference,\n setPositionReference,\n domReference: domReferenceRef\n }), [position.refs, setReference, setPositionReference]);\n const elements = React.useMemo(() => ({\n ...position.elements,\n domReference: domReference\n }), [position.elements, domReference]);\n const context = React.useMemo(() => ({\n ...position,\n ...rootContext,\n refs,\n elements,\n nodeId\n }), [position, refs, elements, nodeId, rootContext]);\n useModernLayoutEffect(() => {\n rootContext.dataRef.current.floatingContext = context;\n const node = tree == null ? void 0 : tree.nodesRef.current.find(node => node.id === nodeId);\n if (node) {\n node.context = context;\n }\n });\n return React.useMemo(() => ({\n ...position,\n context,\n refs,\n elements\n }), [position, refs, elements, context]);\n}\n\nfunction isMacSafari() {\n return isMac() && isSafari();\n}\n/**\n * Opens the floating element while the reference element has focus, like CSS\n * `:focus`.\n * @see https://floating-ui.com/docs/useFocus\n */\nfunction useFocus(context, props) {\n if (props === void 0) {\n props = {};\n }\n const {\n open,\n onOpenChange,\n events,\n dataRef,\n elements\n } = context;\n const {\n enabled = true,\n visibleOnly = true\n } = props;\n const blockFocusRef = React.useRef(false);\n const timeoutRef = React.useRef(-1);\n const keyboardModalityRef = React.useRef(true);\n React.useEffect(() => {\n if (!enabled) return;\n const win = getWindow(elements.domReference);\n\n // If the reference was focused and the user left the tab/window, and the\n // floating element was not open, the focus should be blocked when they\n // return to the tab/window.\n function onBlur() {\n if (!open && isHTMLElement(elements.domReference) && elements.domReference === activeElement(getDocument$1(elements.domReference))) {\n blockFocusRef.current = true;\n }\n }\n function onKeyDown() {\n keyboardModalityRef.current = true;\n }\n function onPointerDown() {\n keyboardModalityRef.current = false;\n }\n win.addEventListener('blur', onBlur);\n if (isMacSafari()) {\n win.addEventListener('keydown', onKeyDown, true);\n win.addEventListener('pointerdown', onPointerDown, true);\n }\n return () => {\n win.removeEventListener('blur', onBlur);\n if (isMacSafari()) {\n win.removeEventListener('keydown', onKeyDown, true);\n win.removeEventListener('pointerdown', onPointerDown, true);\n }\n };\n }, [elements.domReference, open, enabled]);\n React.useEffect(() => {\n if (!enabled) return;\n function onOpenChange(_ref) {\n let {\n reason\n } = _ref;\n if (reason === 'reference-press' || reason === 'escape-key') {\n blockFocusRef.current = true;\n }\n }\n events.on('openchange', onOpenChange);\n return () => {\n events.off('openchange', onOpenChange);\n };\n }, [events, enabled]);\n React.useEffect(() => {\n return () => {\n clearTimeoutIfSet(timeoutRef);\n };\n }, []);\n const reference = React.useMemo(() => ({\n onMouseLeave() {\n blockFocusRef.current = false;\n },\n onFocus(event) {\n if (blockFocusRef.current) return;\n const target = getTarget$1(event.nativeEvent);\n if (visibleOnly && isElement(target)) {\n // Safari fails to match `:focus-visible` if focus was initially\n // outside the document.\n if (isMacSafari() && !event.relatedTarget) {\n if (!keyboardModalityRef.current && !isTypeableElement(target)) {\n return;\n }\n } else if (!matchesFocusVisible(target)) {\n return;\n }\n }\n onOpenChange(true, event.nativeEvent, 'focus');\n },\n onBlur(event) {\n blockFocusRef.current = false;\n const relatedTarget = event.relatedTarget;\n const nativeEvent = event.nativeEvent;\n\n // Hit the non-modal focus management portal guard. Focus will be\n // moved into the floating element immediately after.\n const movedToFocusGuard = isElement(relatedTarget) && relatedTarget.hasAttribute(createAttribute('focus-guard')) && relatedTarget.getAttribute('data-type') === 'outside';\n\n // Wait for the window blur listener to fire.\n timeoutRef.current = window.setTimeout(() => {\n var _dataRef$current$floa;\n const activeEl = activeElement(elements.domReference ? elements.domReference.ownerDocument : document);\n\n // Focus left the page, keep it open.\n if (!relatedTarget && activeEl === elements.domReference) return;\n\n // When focusing the reference element (e.g. regular click), then\n // clicking into the floating element, prevent it from hiding.\n // Note: it must be focusable, e.g. `tabindex=\"-1\"`.\n // We can not rely on relatedTarget to point to the correct element\n // as it will only point to the shadow host of the newly focused element\n // and not the element that actually has received focus if it is located\n // inside a shadow root.\n if (contains$1((_dataRef$current$floa = dataRef.current.floatingContext) == null ? void 0 : _dataRef$current$floa.refs.floating.current, activeEl) || contains$1(elements.domReference, activeEl) || movedToFocusGuard) {\n return;\n }\n onOpenChange(false, nativeEvent, 'focus');\n });\n }\n }), [dataRef, elements.domReference, onOpenChange, visibleOnly]);\n return React.useMemo(() => enabled ? {\n reference\n } : {}, [enabled, reference]);\n}\n\nfunction mergeProps(userProps, propsList, elementKey) {\n const map = new Map();\n const isItem = elementKey === 'item';\n let domUserProps = userProps;\n if (isItem && userProps) {\n const {\n [ACTIVE_KEY]: _,\n [SELECTED_KEY]: __,\n ...validProps\n } = userProps;\n domUserProps = validProps;\n }\n return {\n ...(elementKey === 'floating' && {\n tabIndex: -1,\n [FOCUSABLE_ATTRIBUTE]: ''\n }),\n ...domUserProps,\n ...propsList.map(value => {\n const propsOrGetProps = value ? value[elementKey] : null;\n if (typeof propsOrGetProps === 'function') {\n return userProps ? propsOrGetProps(userProps) : null;\n }\n return propsOrGetProps;\n }).concat(userProps).reduce((acc, props) => {\n if (!props) {\n return acc;\n }\n Object.entries(props).forEach(_ref => {\n let [key, value] = _ref;\n if (isItem && [ACTIVE_KEY, SELECTED_KEY].includes(key)) {\n return;\n }\n if (key.indexOf('on') === 0) {\n if (!map.has(key)) {\n map.set(key, []);\n }\n if (typeof value === 'function') {\n var _map$get;\n (_map$get = map.get(key)) == null || _map$get.push(value);\n acc[key] = function () {\n var _map$get2;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return (_map$get2 = map.get(key)) == null ? void 0 : _map$get2.map(fn => fn(...args)).find(val => val !== undefined);\n };\n }\n } else {\n acc[key] = value;\n }\n });\n return acc;\n }, {})\n };\n}\n/**\n * Merges an array of interaction hooks' props into prop getters, allowing\n * event handler functions to be composed together without overwriting one\n * another.\n * @see https://floating-ui.com/docs/useInteractions\n */\nfunction useInteractions(propsList) {\n if (propsList === void 0) {\n propsList = [];\n }\n const referenceDeps = propsList.map(key => key == null ? void 0 : key.reference);\n const floatingDeps = propsList.map(key => key == null ? void 0 : key.floating);\n const itemDeps = propsList.map(key => key == null ? void 0 : key.item);\n const getReferenceProps = React.useCallback(userProps => mergeProps(userProps, propsList, 'reference'),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n referenceDeps);\n const getFloatingProps = React.useCallback(userProps => mergeProps(userProps, propsList, 'floating'),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n floatingDeps);\n const getItemProps = React.useCallback(userProps => mergeProps(userProps, propsList, 'item'),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n itemDeps);\n return React.useMemo(() => ({\n getReferenceProps,\n getFloatingProps,\n getItemProps\n }), [getReferenceProps, getFloatingProps, getItemProps]);\n}\n\nconst ESCAPE = 'Escape';\nfunction doSwitch(orientation, vertical, horizontal) {\n switch (orientation) {\n case 'vertical':\n return vertical;\n case 'horizontal':\n return horizontal;\n default:\n return vertical || horizontal;\n }\n}\nfunction isMainOrientationKey(key, orientation) {\n const vertical = key === ARROW_UP || key === ARROW_DOWN;\n const horizontal = key === ARROW_LEFT || key === ARROW_RIGHT;\n return doSwitch(orientation, vertical, horizontal);\n}\nfunction isMainOrientationToEndKey(key, orientation, rtl) {\n const vertical = key === ARROW_DOWN;\n const horizontal = rtl ? key === ARROW_LEFT : key === ARROW_RIGHT;\n return doSwitch(orientation, vertical, horizontal) || key === 'Enter' || key === ' ' || key === '';\n}\nfunction isCrossOrientationOpenKey(key, orientation, rtl) {\n const vertical = rtl ? key === ARROW_LEFT : key === ARROW_RIGHT;\n const horizontal = key === ARROW_DOWN;\n return doSwitch(orientation, vertical, horizontal);\n}\nfunction isCrossOrientationCloseKey(key, orientation, rtl, cols) {\n const vertical = rtl ? key === ARROW_RIGHT : key === ARROW_LEFT;\n const horizontal = key === ARROW_UP;\n if (orientation === 'both' || orientation === 'horizontal' && cols && cols > 1) {\n return key === ESCAPE;\n }\n return doSwitch(orientation, vertical, horizontal);\n}\n/**\n * Adds arrow key-based navigation of a list of items, either using real DOM\n * focus or virtual focus.\n * @see https://floating-ui.com/docs/useListNavigation\n */\nfunction useListNavigation(context, props) {\n const {\n open,\n onOpenChange,\n elements,\n floatingId\n } = context;\n const {\n listRef,\n activeIndex,\n onNavigate: unstable_onNavigate = () => {},\n enabled = true,\n selectedIndex = null,\n allowEscape = false,\n loop = false,\n nested = false,\n rtl = false,\n virtual = false,\n focusItemOnOpen = 'auto',\n focusItemOnHover = true,\n openOnArrowKeyDown = true,\n disabledIndices = undefined,\n orientation = 'vertical',\n parentOrientation,\n cols = 1,\n scrollItemIntoView = true,\n virtualItemRef,\n itemSizes,\n dense = false\n } = props;\n if (process.env.NODE_ENV !== \"production\") {\n if (allowEscape) {\n if (!loop) {\n warn('`useListNavigation` looping must be enabled to allow escaping.');\n }\n if (!virtual) {\n warn('`useListNavigation` must be virtual to allow escaping.');\n }\n }\n if (orientation === 'vertical' && cols > 1) {\n warn('In grid list navigation mode (`cols` > 1), the `orientation` should', 'be either \"horizontal\" or \"both\".');\n }\n }\n const floatingFocusElement = getFloatingFocusElement(elements.floating);\n const floatingFocusElementRef = useLatestRef(floatingFocusElement);\n const parentId = useFloatingParentNodeId();\n const tree = useFloatingTree();\n useModernLayoutEffect(() => {\n context.dataRef.current.orientation = orientation;\n }, [context, orientation]);\n const onNavigate = useEffectEvent(() => {\n unstable_onNavigate(indexRef.current === -1 ? null : indexRef.current);\n });\n const typeableComboboxReference = isTypeableCombobox(elements.domReference);\n const focusItemOnOpenRef = React.useRef(focusItemOnOpen);\n const indexRef = React.useRef(selectedIndex != null ? selectedIndex : -1);\n const keyRef = React.useRef(null);\n const isPointerModalityRef = React.useRef(true);\n const previousOnNavigateRef = React.useRef(onNavigate);\n const previousMountedRef = React.useRef(!!elements.floating);\n const previousOpenRef = React.useRef(open);\n const forceSyncFocusRef = React.useRef(false);\n const forceScrollIntoViewRef = React.useRef(false);\n const disabledIndicesRef = useLatestRef(disabledIndices);\n const latestOpenRef = useLatestRef(open);\n const scrollItemIntoViewRef = useLatestRef(scrollItemIntoView);\n const selectedIndexRef = useLatestRef(selectedIndex);\n const [activeId, setActiveId] = React.useState();\n const [virtualId, setVirtualId] = React.useState();\n const focusItem = useEffectEvent(() => {\n function runFocus(item) {\n if (virtual) {\n var _item$id;\n if ((_item$id = item.id) != null && _item$id.endsWith('-fui-option')) {\n item.id = floatingId + \"-\" + Math.random().toString(16).slice(2, 10);\n }\n setActiveId(item.id);\n tree == null || tree.events.emit('virtualfocus', item);\n if (virtualItemRef) {\n virtualItemRef.current = item;\n }\n } else {\n enqueueFocus(item, {\n sync: forceSyncFocusRef.current,\n preventScroll: true\n });\n }\n }\n const initialItem = listRef.current[indexRef.current];\n const forceScrollIntoView = forceScrollIntoViewRef.current;\n if (initialItem) {\n runFocus(initialItem);\n }\n const scheduler = forceSyncFocusRef.current ? v => v() : requestAnimationFrame;\n scheduler(() => {\n const waitedItem = listRef.current[indexRef.current] || initialItem;\n if (!waitedItem) return;\n if (!initialItem) {\n runFocus(waitedItem);\n }\n const scrollIntoViewOptions = scrollItemIntoViewRef.current;\n const shouldScrollIntoView = scrollIntoViewOptions && item && (forceScrollIntoView || !isPointerModalityRef.current);\n if (shouldScrollIntoView) {\n // JSDOM doesn't support `.scrollIntoView()` but it's widely supported\n // by all browsers.\n waitedItem.scrollIntoView == null || waitedItem.scrollIntoView(typeof scrollIntoViewOptions === 'boolean' ? {\n block: 'nearest',\n inline: 'nearest'\n } : scrollIntoViewOptions);\n }\n });\n });\n\n // Sync `selectedIndex` to be the `activeIndex` upon opening the floating\n // element. Also, reset `activeIndex` upon closing the floating element.\n useModernLayoutEffect(() => {\n if (!enabled) return;\n if (open && elements.floating) {\n if (focusItemOnOpenRef.current && selectedIndex != null) {\n // Regardless of the pointer modality, we want to ensure the selected\n // item comes into view when the floating element is opened.\n forceScrollIntoViewRef.current = true;\n indexRef.current = selectedIndex;\n onNavigate();\n }\n } else if (previousMountedRef.current) {\n // Since the user can specify `onNavigate` conditionally\n // (onNavigate: open ? setActiveIndex : setSelectedIndex),\n // we store and call the previous function.\n indexRef.current = -1;\n previousOnNavigateRef.current();\n }\n }, [enabled, open, elements.floating, selectedIndex, onNavigate]);\n\n // Sync `activeIndex` to be the focused item while the floating element is\n // open.\n useModernLayoutEffect(() => {\n if (!enabled) return;\n if (!open) return;\n if (!elements.floating) return;\n if (activeIndex == null) {\n forceSyncFocusRef.current = false;\n if (selectedIndexRef.current != null) {\n return;\n }\n\n // Reset while the floating element was open (e.g. the list changed).\n if (previousMountedRef.current) {\n indexRef.current = -1;\n focusItem();\n }\n\n // Initial sync.\n if ((!previousOpenRef.current || !previousMountedRef.current) && focusItemOnOpenRef.current && (keyRef.current != null || focusItemOnOpenRef.current === true && keyRef.current == null)) {\n let runs = 0;\n const waitForListPopulated = () => {\n if (listRef.current[0] == null) {\n // Avoid letting the browser paint if possible on the first try,\n // otherwise use rAF. Don't try more than twice, since something\n // is wrong otherwise.\n if (runs < 2) {\n const scheduler = runs ? requestAnimationFrame : queueMicrotask;\n scheduler(waitForListPopulated);\n }\n runs++;\n } else {\n indexRef.current = keyRef.current == null || isMainOrientationToEndKey(keyRef.current, orientation, rtl) || nested ? getMinListIndex(listRef, disabledIndicesRef.current) : getMaxListIndex(listRef, disabledIndicesRef.current);\n keyRef.current = null;\n onNavigate();\n }\n };\n waitForListPopulated();\n }\n } else if (!isIndexOutOfListBounds(listRef, activeIndex)) {\n indexRef.current = activeIndex;\n focusItem();\n forceScrollIntoViewRef.current = false;\n }\n }, [enabled, open, elements.floating, activeIndex, selectedIndexRef, nested, listRef, orientation, rtl, onNavigate, focusItem, disabledIndicesRef]);\n\n // Ensure the parent floating element has focus when a nested child closes\n // to allow arrow key navigation to work after the pointer leaves the child.\n useModernLayoutEffect(() => {\n var _nodes$find;\n if (!enabled || elements.floating || !tree || virtual || !previousMountedRef.current) {\n return;\n }\n const nodes = tree.nodesRef.current;\n const parent = (_nodes$find = nodes.find(node => node.id === parentId)) == null || (_nodes$find = _nodes$find.context) == null ? void 0 : _nodes$find.elements.floating;\n const activeEl = activeElement(getDocument$1(elements.floating));\n const treeContainsActiveEl = nodes.some(node => node.context && contains$1(node.context.elements.floating, activeEl));\n if (parent && !treeContainsActiveEl && isPointerModalityRef.current) {\n parent.focus({\n preventScroll: true\n });\n }\n }, [enabled, elements.floating, tree, parentId, virtual]);\n useModernLayoutEffect(() => {\n if (!enabled) return;\n if (!tree) return;\n if (!virtual) return;\n if (parentId) return;\n function handleVirtualFocus(item) {\n setVirtualId(item.id);\n if (virtualItemRef) {\n virtualItemRef.current = item;\n }\n }\n tree.events.on('virtualfocus', handleVirtualFocus);\n return () => {\n tree.events.off('virtualfocus', handleVirtualFocus);\n };\n }, [enabled, tree, virtual, parentId, virtualItemRef]);\n useModernLayoutEffect(() => {\n previousOnNavigateRef.current = onNavigate;\n previousOpenRef.current = open;\n previousMountedRef.current = !!elements.floating;\n });\n useModernLayoutEffect(() => {\n if (!open) {\n keyRef.current = null;\n focusItemOnOpenRef.current = focusItemOnOpen;\n }\n }, [open, focusItemOnOpen]);\n const hasActiveIndex = activeIndex != null;\n const item = React.useMemo(() => {\n function syncCurrentTarget(currentTarget) {\n if (!latestOpenRef.current) return;\n const index = listRef.current.indexOf(currentTarget);\n if (index !== -1 && indexRef.current !== index) {\n indexRef.current = index;\n onNavigate();\n }\n }\n const props = {\n onFocus(_ref) {\n let {\n currentTarget\n } = _ref;\n forceSyncFocusRef.current = true;\n syncCurrentTarget(currentTarget);\n },\n onClick: _ref2 => {\n let {\n currentTarget\n } = _ref2;\n return currentTarget.focus({\n preventScroll: true\n });\n },\n // Safari\n onMouseMove(_ref3) {\n let {\n currentTarget\n } = _ref3;\n forceSyncFocusRef.current = true;\n forceScrollIntoViewRef.current = false;\n if (focusItemOnHover) {\n syncCurrentTarget(currentTarget);\n }\n },\n onPointerLeave(_ref4) {\n let {\n pointerType\n } = _ref4;\n if (!isPointerModalityRef.current || pointerType === 'touch') {\n return;\n }\n forceSyncFocusRef.current = true;\n if (!focusItemOnHover) {\n return;\n }\n indexRef.current = -1;\n onNavigate();\n if (!virtual) {\n var _floatingFocusElement;\n (_floatingFocusElement = floatingFocusElementRef.current) == null || _floatingFocusElement.focus({\n preventScroll: true\n });\n }\n }\n };\n return props;\n }, [latestOpenRef, floatingFocusElementRef, focusItemOnHover, listRef, onNavigate, virtual]);\n const getParentOrientation = React.useCallback(() => {\n var _tree$nodesRef$curren;\n return parentOrientation != null ? parentOrientation : tree == null || (_tree$nodesRef$curren = tree.nodesRef.current.find(node => node.id === parentId)) == null || (_tree$nodesRef$curren = _tree$nodesRef$curren.context) == null || (_tree$nodesRef$curren = _tree$nodesRef$curren.dataRef) == null ? void 0 : _tree$nodesRef$curren.current.orientation;\n }, [parentId, tree, parentOrientation]);\n const commonOnKeyDown = useEffectEvent(event => {\n isPointerModalityRef.current = false;\n forceSyncFocusRef.current = true;\n\n // When composing a character, Chrome fires ArrowDown twice. Firefox/Safari\n // don't appear to suffer from this. `event.isComposing` is avoided due to\n // Safari not supporting it properly (although it's not needed in the first\n // place for Safari, just avoiding any possible issues).\n if (event.which === 229) {\n return;\n }\n\n // If the floating element is animating out, ignore navigation. Otherwise,\n // the `activeIndex` gets set to 0 despite not being open so the next time\n // the user ArrowDowns, the first item won't be focused.\n if (!latestOpenRef.current && event.currentTarget === floatingFocusElementRef.current) {\n return;\n }\n if (nested && isCrossOrientationCloseKey(event.key, orientation, rtl, cols)) {\n // If the nested list's close key is also the parent navigation key,\n // let the parent navigate. Otherwise, stop propagating the event.\n if (!isMainOrientationKey(event.key, getParentOrientation())) {\n stopEvent(event);\n }\n onOpenChange(false, event.nativeEvent, 'list-navigation');\n if (isHTMLElement(elements.domReference)) {\n if (virtual) {\n tree == null || tree.events.emit('virtualfocus', elements.domReference);\n } else {\n elements.domReference.focus();\n }\n }\n return;\n }\n const currentIndex = indexRef.current;\n const minIndex = getMinListIndex(listRef, disabledIndices);\n const maxIndex = getMaxListIndex(listRef, disabledIndices);\n if (!typeableComboboxReference) {\n if (event.key === 'Home') {\n stopEvent(event);\n indexRef.current = minIndex;\n onNavigate();\n }\n if (event.key === 'End') {\n stopEvent(event);\n indexRef.current = maxIndex;\n onNavigate();\n }\n }\n\n // Grid navigation.\n if (cols > 1) {\n const sizes = itemSizes || Array.from({\n length: listRef.current.length\n }, () => ({\n width: 1,\n height: 1\n }));\n // To calculate movements on the grid, we use hypothetical cell indices\n // as if every item was 1x1, then convert back to real indices.\n const cellMap = createGridCellMap(sizes, cols, dense);\n const minGridIndex = cellMap.findIndex(index => index != null && !isListIndexDisabled(listRef, index, disabledIndices));\n // last enabled index\n const maxGridIndex = cellMap.reduce((foundIndex, index, cellIndex) => index != null && !isListIndexDisabled(listRef, index, disabledIndices) ? cellIndex : foundIndex, -1);\n const index = cellMap[getGridNavigatedIndex({\n current: cellMap.map(itemIndex => itemIndex != null ? listRef.current[itemIndex] : null)\n }, {\n event,\n orientation,\n loop,\n rtl,\n cols,\n // treat undefined (empty grid spaces) as disabled indices so we\n // don't end up in them\n disabledIndices: getGridCellIndices([...((typeof disabledIndices !== 'function' ? disabledIndices : null) || listRef.current.map((_, index) => isListIndexDisabled(listRef, index, disabledIndices) ? index : undefined)), undefined], cellMap),\n minIndex: minGridIndex,\n maxIndex: maxGridIndex,\n prevIndex: getGridCellIndexOfCorner(indexRef.current > maxIndex ? minIndex : indexRef.current, sizes, cellMap, cols,\n // use a corner matching the edge closest to the direction\n // we're moving in so we don't end up in the same item. Prefer\n // top/left over bottom/right.\n event.key === ARROW_DOWN ? 'bl' : event.key === (rtl ? ARROW_LEFT : ARROW_RIGHT) ? 'tr' : 'tl'),\n stopEvent: true\n })];\n if (index != null) {\n indexRef.current = index;\n onNavigate();\n }\n if (orientation === 'both') {\n return;\n }\n }\n if (isMainOrientationKey(event.key, orientation)) {\n stopEvent(event);\n\n // Reset the index if no item is focused.\n if (open && !virtual && activeElement(event.currentTarget.ownerDocument) === event.currentTarget) {\n indexRef.current = isMainOrientationToEndKey(event.key, orientation, rtl) ? minIndex : maxIndex;\n onNavigate();\n return;\n }\n if (isMainOrientationToEndKey(event.key, orientation, rtl)) {\n if (loop) {\n indexRef.current = currentIndex >= maxIndex ? allowEscape && currentIndex !== listRef.current.length ? -1 : minIndex : findNonDisabledListIndex(listRef, {\n startingIndex: currentIndex,\n disabledIndices\n });\n } else {\n indexRef.current = Math.min(maxIndex, findNonDisabledListIndex(listRef, {\n startingIndex: currentIndex,\n disabledIndices\n }));\n }\n } else {\n if (loop) {\n indexRef.current = currentIndex <= minIndex ? allowEscape && currentIndex !== -1 ? listRef.current.length : maxIndex : findNonDisabledListIndex(listRef, {\n startingIndex: currentIndex,\n decrement: true,\n disabledIndices\n });\n } else {\n indexRef.current = Math.max(minIndex, findNonDisabledListIndex(listRef, {\n startingIndex: currentIndex,\n decrement: true,\n disabledIndices\n }));\n }\n }\n if (isIndexOutOfListBounds(listRef, indexRef.current)) {\n indexRef.current = -1;\n }\n onNavigate();\n }\n });\n const ariaActiveDescendantProp = React.useMemo(() => {\n return virtual && open && hasActiveIndex && {\n 'aria-activedescendant': virtualId || activeId\n };\n }, [virtual, open, hasActiveIndex, virtualId, activeId]);\n const floating = React.useMemo(() => {\n return {\n 'aria-orientation': orientation === 'both' ? undefined : orientation,\n ...(!typeableComboboxReference ? ariaActiveDescendantProp : {}),\n onKeyDown: commonOnKeyDown,\n onPointerMove() {\n isPointerModalityRef.current = true;\n }\n };\n }, [ariaActiveDescendantProp, commonOnKeyDown, orientation, typeableComboboxReference]);\n const reference = React.useMemo(() => {\n function checkVirtualMouse(event) {\n if (focusItemOnOpen === 'auto' && isVirtualClick(event.nativeEvent)) {\n focusItemOnOpenRef.current = true;\n }\n }\n function checkVirtualPointer(event) {\n // `pointerdown` fires first, reset the state then perform the checks.\n focusItemOnOpenRef.current = focusItemOnOpen;\n if (focusItemOnOpen === 'auto' && isVirtualPointerEvent(event.nativeEvent)) {\n focusItemOnOpenRef.current = true;\n }\n }\n return {\n ...ariaActiveDescendantProp,\n onKeyDown(event) {\n isPointerModalityRef.current = false;\n const isArrowKey = event.key.startsWith('Arrow');\n const isHomeOrEndKey = ['Home', 'End'].includes(event.key);\n const isMoveKey = isArrowKey || isHomeOrEndKey;\n const isCrossOpenKey = isCrossOrientationOpenKey(event.key, orientation, rtl);\n const isCrossCloseKey = isCrossOrientationCloseKey(event.key, orientation, rtl, cols);\n const isParentCrossOpenKey = isCrossOrientationOpenKey(event.key, getParentOrientation(), rtl);\n const isMainKey = isMainOrientationKey(event.key, orientation);\n const isNavigationKey = (nested ? isParentCrossOpenKey : isMainKey) || event.key === 'Enter' || event.key.trim() === '';\n if (virtual && open) {\n const rootNode = tree == null ? void 0 : tree.nodesRef.current.find(node => node.parentId == null);\n const deepestNode = tree && rootNode ? getDeepestNode(tree.nodesRef.current, rootNode.id) : null;\n if (isMoveKey && deepestNode && virtualItemRef) {\n const eventObject = new KeyboardEvent('keydown', {\n key: event.key,\n bubbles: true\n });\n if (isCrossOpenKey || isCrossCloseKey) {\n var _deepestNode$context, _deepestNode$context2;\n const isCurrentTarget = ((_deepestNode$context = deepestNode.context) == null ? void 0 : _deepestNode$context.elements.domReference) === event.currentTarget;\n const dispatchItem = isCrossCloseKey && !isCurrentTarget ? (_deepestNode$context2 = deepestNode.context) == null ? void 0 : _deepestNode$context2.elements.domReference : isCrossOpenKey ? listRef.current.find(item => (item == null ? void 0 : item.id) === activeId) : null;\n if (dispatchItem) {\n stopEvent(event);\n dispatchItem.dispatchEvent(eventObject);\n setVirtualId(undefined);\n }\n }\n if ((isMainKey || isHomeOrEndKey) && deepestNode.context) {\n if (deepestNode.context.open && deepestNode.parentId && event.currentTarget !== deepestNode.context.elements.domReference) {\n var _deepestNode$context$;\n stopEvent(event);\n (_deepestNode$context$ = deepestNode.context.elements.domReference) == null || _deepestNode$context$.dispatchEvent(eventObject);\n return;\n }\n }\n }\n return commonOnKeyDown(event);\n }\n // If a floating element should not open on arrow key down, avoid\n // setting `activeIndex` while it's closed.\n if (!open && !openOnArrowKeyDown && isArrowKey) {\n return;\n }\n if (isNavigationKey) {\n const isParentMainKey = isMainOrientationKey(event.key, getParentOrientation());\n keyRef.current = nested && isParentMainKey ? null : event.key;\n }\n if (nested) {\n if (isParentCrossOpenKey) {\n stopEvent(event);\n if (open) {\n indexRef.current = getMinListIndex(listRef, disabledIndicesRef.current);\n onNavigate();\n } else {\n onOpenChange(true, event.nativeEvent, 'list-navigation');\n }\n }\n return;\n }\n if (isMainKey) {\n if (selectedIndex != null) {\n indexRef.current = selectedIndex;\n }\n stopEvent(event);\n if (!open && openOnArrowKeyDown) {\n onOpenChange(true, event.nativeEvent, 'list-navigation');\n } else {\n commonOnKeyDown(event);\n }\n if (open) {\n onNavigate();\n }\n }\n },\n onFocus() {\n if (open && !virtual) {\n indexRef.current = -1;\n onNavigate();\n }\n },\n onPointerDown: checkVirtualPointer,\n onPointerEnter: checkVirtualPointer,\n onMouseDown: checkVirtualMouse,\n onClick: checkVirtualMouse\n };\n }, [activeId, ariaActiveDescendantProp, cols, commonOnKeyDown, disabledIndicesRef, focusItemOnOpen, listRef, nested, onNavigate, onOpenChange, open, openOnArrowKeyDown, orientation, getParentOrientation, rtl, selectedIndex, tree, virtual, virtualItemRef]);\n return React.useMemo(() => enabled ? {\n reference,\n floating,\n item\n } : {}, [enabled, reference, floating, item]);\n}\n\nconst componentRoleToAriaRoleMap = /*#__PURE__*/new Map([['select', 'listbox'], ['combobox', 'listbox'], ['label', false]]);\n\n/**\n * Adds base screen reader props to the reference and floating elements for a\n * given floating element `role`.\n * @see https://floating-ui.com/docs/useRole\n */\nfunction useRole(context, props) {\n var _elements$domReferenc, _componentRoleToAriaR;\n if (props === void 0) {\n props = {};\n }\n const {\n open,\n elements,\n floatingId: defaultFloatingId\n } = context;\n const {\n enabled = true,\n role = 'dialog'\n } = props;\n const defaultReferenceId = useId();\n const referenceId = ((_elements$domReferenc = elements.domReference) == null ? void 0 : _elements$domReferenc.id) || defaultReferenceId;\n const floatingId = React.useMemo(() => {\n var _getFloatingFocusElem;\n return ((_getFloatingFocusElem = getFloatingFocusElement(elements.floating)) == null ? void 0 : _getFloatingFocusElem.id) || defaultFloatingId;\n }, [elements.floating, defaultFloatingId]);\n const ariaRole = (_componentRoleToAriaR = componentRoleToAriaRoleMap.get(role)) != null ? _componentRoleToAriaR : role;\n const parentId = useFloatingParentNodeId();\n const isNested = parentId != null;\n const reference = React.useMemo(() => {\n if (ariaRole === 'tooltip' || role === 'label') {\n return {\n [\"aria-\" + (role === 'label' ? 'labelledby' : 'describedby')]: open ? floatingId : undefined\n };\n }\n return {\n 'aria-expanded': open ? 'true' : 'false',\n 'aria-haspopup': ariaRole === 'alertdialog' ? 'dialog' : ariaRole,\n 'aria-controls': open ? floatingId : undefined,\n ...(ariaRole === 'listbox' && {\n role: 'combobox'\n }),\n ...(ariaRole === 'menu' && {\n id: referenceId\n }),\n ...(ariaRole === 'menu' && isNested && {\n role: 'menuitem'\n }),\n ...(role === 'select' && {\n 'aria-autocomplete': 'none'\n }),\n ...(role === 'combobox' && {\n 'aria-autocomplete': 'list'\n })\n };\n }, [ariaRole, floatingId, isNested, open, referenceId, role]);\n const floating = React.useMemo(() => {\n const floatingProps = {\n id: floatingId,\n ...(ariaRole && {\n role: ariaRole\n })\n };\n if (ariaRole === 'tooltip' || role === 'label') {\n return floatingProps;\n }\n return {\n ...floatingProps,\n ...(ariaRole === 'menu' && {\n 'aria-labelledby': referenceId\n })\n };\n }, [ariaRole, floatingId, referenceId, role]);\n const item = React.useCallback(_ref => {\n let {\n active,\n selected\n } = _ref;\n const commonProps = {\n role: 'option',\n ...(active && {\n id: floatingId + \"-fui-option\"\n })\n };\n\n // For `menu`, we are unable to tell if the item is a `menuitemradio`\n // or `menuitemcheckbox`. For backwards-compatibility reasons, also\n // avoid defaulting to `menuitem` as it may overwrite custom role props.\n switch (role) {\n case 'select':\n case 'combobox':\n return {\n ...commonProps,\n 'aria-selected': selected\n };\n }\n return {};\n }, [floatingId, role]);\n return React.useMemo(() => enabled ? {\n reference,\n floating,\n item\n } : {}, [enabled, reference, floating, item]);\n}\n\n// Converts a JS style key like `backgroundColor` to a CSS transition-property\n// like `background-color`.\nconst camelCaseToKebabCase = str => str.replace(/[A-Z]+(?![a-z])|[A-Z]/g, ($, ofs) => (ofs ? '-' : '') + $.toLowerCase());\nfunction execWithArgsOrReturn(valueOrFn, args) {\n return typeof valueOrFn === 'function' ? valueOrFn(args) : valueOrFn;\n}\nfunction useDelayUnmount(open, durationMs) {\n const [isMounted, setIsMounted] = React.useState(open);\n if (open && !isMounted) {\n setIsMounted(true);\n }\n React.useEffect(() => {\n if (!open && isMounted) {\n const timeout = setTimeout(() => setIsMounted(false), durationMs);\n return () => clearTimeout(timeout);\n }\n }, [open, isMounted, durationMs]);\n return isMounted;\n}\n/**\n * Provides a status string to apply CSS transitions to a floating element,\n * correctly handling placement-aware transitions.\n * @see https://floating-ui.com/docs/useTransition#usetransitionstatus\n */\nfunction useTransitionStatus(context, props) {\n if (props === void 0) {\n props = {};\n }\n const {\n open,\n elements: {\n floating\n }\n } = context;\n const {\n duration = 250\n } = props;\n const isNumberDuration = typeof duration === 'number';\n const closeDuration = (isNumberDuration ? duration : duration.close) || 0;\n const [status, setStatus] = React.useState('unmounted');\n const isMounted = useDelayUnmount(open, closeDuration);\n if (!isMounted && status === 'close') {\n setStatus('unmounted');\n }\n useModernLayoutEffect(() => {\n if (!floating) return;\n if (open) {\n setStatus('initial');\n const frame = requestAnimationFrame(() => {\n // Ensure it opens before paint. With `FloatingDelayGroup`,\n // this avoids a flicker when moving between floating elements\n // to ensure one is always open with no missing frames.\n ReactDOM.flushSync(() => {\n setStatus('open');\n });\n });\n return () => {\n cancelAnimationFrame(frame);\n };\n }\n setStatus('close');\n }, [open, floating]);\n return {\n isMounted,\n status\n };\n}\n/**\n * Provides styles to apply CSS transitions to a floating element, correctly\n * handling placement-aware transitions. Wrapper around `useTransitionStatus`.\n * @see https://floating-ui.com/docs/useTransition#usetransitionstyles\n */\nfunction useTransitionStyles(context, props) {\n if (props === void 0) {\n props = {};\n }\n const {\n initial: unstable_initial = {\n opacity: 0\n },\n open: unstable_open,\n close: unstable_close,\n common: unstable_common,\n duration = 250\n } = props;\n const placement = context.placement;\n const side = placement.split('-')[0];\n const fnArgs = React.useMemo(() => ({\n side,\n placement\n }), [side, placement]);\n const isNumberDuration = typeof duration === 'number';\n const openDuration = (isNumberDuration ? duration : duration.open) || 0;\n const closeDuration = (isNumberDuration ? duration : duration.close) || 0;\n const [styles, setStyles] = React.useState(() => ({\n ...execWithArgsOrReturn(unstable_common, fnArgs),\n ...execWithArgsOrReturn(unstable_initial, fnArgs)\n }));\n const {\n isMounted,\n status\n } = useTransitionStatus(context, {\n duration\n });\n const initialRef = useLatestRef(unstable_initial);\n const openRef = useLatestRef(unstable_open);\n const closeRef = useLatestRef(unstable_close);\n const commonRef = useLatestRef(unstable_common);\n useModernLayoutEffect(() => {\n const initialStyles = execWithArgsOrReturn(initialRef.current, fnArgs);\n const closeStyles = execWithArgsOrReturn(closeRef.current, fnArgs);\n const commonStyles = execWithArgsOrReturn(commonRef.current, fnArgs);\n const openStyles = execWithArgsOrReturn(openRef.current, fnArgs) || Object.keys(initialStyles).reduce((acc, key) => {\n acc[key] = '';\n return acc;\n }, {});\n if (status === 'initial') {\n setStyles(styles => ({\n transitionProperty: styles.transitionProperty,\n ...commonStyles,\n ...initialStyles\n }));\n }\n if (status === 'open') {\n setStyles({\n transitionProperty: Object.keys(openStyles).map(camelCaseToKebabCase).join(','),\n transitionDuration: openDuration + \"ms\",\n ...commonStyles,\n ...openStyles\n });\n }\n if (status === 'close') {\n const styles = closeStyles || initialStyles;\n setStyles({\n transitionProperty: Object.keys(styles).map(camelCaseToKebabCase).join(','),\n transitionDuration: closeDuration + \"ms\",\n ...commonStyles,\n ...styles\n });\n }\n }, [closeDuration, closeRef, initialRef, openRef, commonRef, openDuration, status, fnArgs]);\n return {\n isMounted,\n styles\n };\n}\n\n/**\n * Provides a matching callback that can be used to focus an item as the user\n * types, often used in tandem with `useListNavigation()`.\n * @see https://floating-ui.com/docs/useTypeahead\n */\nfunction useTypeahead(context, props) {\n var _ref;\n const {\n open,\n dataRef\n } = context;\n const {\n listRef,\n activeIndex,\n onMatch: unstable_onMatch,\n onTypingChange: unstable_onTypingChange,\n enabled = true,\n findMatch = null,\n resetMs = 750,\n ignoreKeys = [],\n selectedIndex = null\n } = props;\n const timeoutIdRef = React.useRef(-1);\n const stringRef = React.useRef('');\n const prevIndexRef = React.useRef((_ref = selectedIndex != null ? selectedIndex : activeIndex) != null ? _ref : -1);\n const matchIndexRef = React.useRef(null);\n const onMatch = useEffectEvent(unstable_onMatch);\n const onTypingChange = useEffectEvent(unstable_onTypingChange);\n const findMatchRef = useLatestRef(findMatch);\n const ignoreKeysRef = useLatestRef(ignoreKeys);\n useModernLayoutEffect(() => {\n if (open) {\n clearTimeoutIfSet(timeoutIdRef);\n matchIndexRef.current = null;\n stringRef.current = '';\n }\n }, [open]);\n useModernLayoutEffect(() => {\n // Sync arrow key navigation but not typeahead navigation.\n if (open && stringRef.current === '') {\n var _ref2;\n prevIndexRef.current = (_ref2 = selectedIndex != null ? selectedIndex : activeIndex) != null ? _ref2 : -1;\n }\n }, [open, selectedIndex, activeIndex]);\n const setTypingChange = useEffectEvent(value => {\n if (value) {\n if (!dataRef.current.typing) {\n dataRef.current.typing = value;\n onTypingChange(value);\n }\n } else {\n if (dataRef.current.typing) {\n dataRef.current.typing = value;\n onTypingChange(value);\n }\n }\n });\n const onKeyDown = useEffectEvent(event => {\n function getMatchingIndex(list, orderedList, string) {\n const str = findMatchRef.current ? findMatchRef.current(orderedList, string) : orderedList.find(text => (text == null ? void 0 : text.toLocaleLowerCase().indexOf(string.toLocaleLowerCase())) === 0);\n return str ? list.indexOf(str) : -1;\n }\n const listContent = listRef.current;\n if (stringRef.current.length > 0 && stringRef.current[0] !== ' ') {\n if (getMatchingIndex(listContent, listContent, stringRef.current) === -1) {\n setTypingChange(false);\n } else if (event.key === ' ') {\n stopEvent(event);\n }\n }\n if (listContent == null || ignoreKeysRef.current.includes(event.key) ||\n // Character key.\n event.key.length !== 1 ||\n // Modifier key.\n event.ctrlKey || event.metaKey || event.altKey) {\n return;\n }\n if (open && event.key !== ' ') {\n stopEvent(event);\n setTypingChange(true);\n }\n\n // Bail out if the list contains a word like \"llama\" or \"aaron\". TODO:\n // allow it in this case, too.\n const allowRapidSuccessionOfFirstLetter = listContent.every(text => {\n var _text$, _text$2;\n return text ? ((_text$ = text[0]) == null ? void 0 : _text$.toLocaleLowerCase()) !== ((_text$2 = text[1]) == null ? void 0 : _text$2.toLocaleLowerCase()) : true;\n });\n\n // Allows the user to cycle through items that start with the same letter\n // in rapid succession.\n if (allowRapidSuccessionOfFirstLetter && stringRef.current === event.key) {\n stringRef.current = '';\n prevIndexRef.current = matchIndexRef.current;\n }\n stringRef.current += event.key;\n clearTimeoutIfSet(timeoutIdRef);\n timeoutIdRef.current = window.setTimeout(() => {\n stringRef.current = '';\n prevIndexRef.current = matchIndexRef.current;\n setTypingChange(false);\n }, resetMs);\n const prevIndex = prevIndexRef.current;\n const index = getMatchingIndex(listContent, [...listContent.slice((prevIndex || 0) + 1), ...listContent.slice(0, (prevIndex || 0) + 1)], stringRef.current);\n if (index !== -1) {\n onMatch(index);\n matchIndexRef.current = index;\n } else if (event.key !== ' ') {\n stringRef.current = '';\n setTypingChange(false);\n }\n });\n const reference = React.useMemo(() => ({\n onKeyDown\n }), [onKeyDown]);\n const floating = React.useMemo(() => {\n return {\n onKeyDown,\n onKeyUp(event) {\n if (event.key === ' ') {\n setTypingChange(false);\n }\n }\n };\n }, [onKeyDown, setTypingChange]);\n return React.useMemo(() => enabled ? {\n reference,\n floating\n } : {}, [enabled, reference, floating]);\n}\n\nfunction getArgsWithCustomFloatingHeight(state, height) {\n return {\n ...state,\n rects: {\n ...state.rects,\n floating: {\n ...state.rects.floating,\n height\n }\n }\n };\n}\n/**\n * Positions the floating element such that an inner element inside of it is\n * anchored to the reference element.\n * @see https://floating-ui.com/docs/inner\n * @deprecated\n */\nconst inner = props => ({\n name: 'inner',\n options: props,\n async fn(state) {\n const {\n listRef,\n overflowRef,\n onFallbackChange,\n offset: innerOffset = 0,\n index = 0,\n minItemsVisible = 4,\n referenceOverflowThreshold = 0,\n scrollRef,\n ...detectOverflowOptions\n } = evaluate(props, state);\n const {\n rects,\n platform,\n elements: {\n floating\n }\n } = state;\n const item = listRef.current[index];\n const scrollEl = (scrollRef == null ? void 0 : scrollRef.current) || floating;\n\n // Valid combinations:\n // 1. Floating element is the scrollRef and has a border (default)\n // 2. Floating element is not the scrollRef, floating element has a border\n // 3. Floating element is not the scrollRef, scrollRef has a border\n // Floating > {...getFloatingProps()} wrapper > scrollRef > items is not\n // allowed as VoiceOver doesn't work.\n const clientTop = floating.clientTop || scrollEl.clientTop;\n const floatingIsBordered = floating.clientTop !== 0;\n const scrollElIsBordered = scrollEl.clientTop !== 0;\n const floatingIsScrollEl = floating === scrollEl;\n if (process.env.NODE_ENV !== \"production\") {\n if (!state.placement.startsWith('bottom')) {\n warn('`placement` side must be \"bottom\" when using the `inner`', 'middleware.');\n }\n }\n if (!item) {\n return {};\n }\n const nextArgs = {\n ...state,\n ...(await offset(-item.offsetTop - floating.clientTop - rects.reference.height / 2 - item.offsetHeight / 2 - innerOffset).fn(state))\n };\n const overflow = await platform.detectOverflow(getArgsWithCustomFloatingHeight(nextArgs, scrollEl.scrollHeight + clientTop + floating.clientTop), detectOverflowOptions);\n const refOverflow = await platform.detectOverflow(nextArgs, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const diffY = max(0, overflow.top);\n const nextY = nextArgs.y + diffY;\n const isScrollable = scrollEl.scrollHeight > scrollEl.clientHeight;\n const rounder = isScrollable ? v => v : round;\n const maxHeight = rounder(max(0, scrollEl.scrollHeight + (floatingIsBordered && floatingIsScrollEl || scrollElIsBordered ? clientTop * 2 : 0) - diffY - max(0, overflow.bottom)));\n scrollEl.style.maxHeight = maxHeight + \"px\";\n scrollEl.scrollTop = diffY;\n\n // There is not enough space, fallback to standard anchored positioning\n if (onFallbackChange) {\n const shouldFallback = scrollEl.offsetHeight < item.offsetHeight * min(minItemsVisible, listRef.current.length) - 1 || refOverflow.top >= -referenceOverflowThreshold || refOverflow.bottom >= -referenceOverflowThreshold;\n ReactDOM.flushSync(() => onFallbackChange(shouldFallback));\n }\n if (overflowRef) {\n overflowRef.current = await platform.detectOverflow(getArgsWithCustomFloatingHeight({\n ...nextArgs,\n y: nextY\n }, scrollEl.offsetHeight + clientTop + floating.clientTop), detectOverflowOptions);\n }\n return {\n y: nextY\n };\n }\n});\n/**\n * Changes the `inner` middleware's `offset` upon a `wheel` event to\n * expand the floating element's height, revealing more list items.\n * @see https://floating-ui.com/docs/inner\n * @deprecated\n */\nfunction useInnerOffset(context, props) {\n const {\n open,\n elements\n } = context;\n const {\n enabled = true,\n overflowRef,\n scrollRef,\n onChange: unstable_onChange\n } = props;\n const onChange = useEffectEvent(unstable_onChange);\n const controlledScrollingRef = React.useRef(false);\n const prevScrollTopRef = React.useRef(null);\n const initialOverflowRef = React.useRef(null);\n React.useEffect(() => {\n if (!enabled) return;\n function onWheel(e) {\n if (e.ctrlKey || !el || overflowRef.current == null) {\n return;\n }\n const dY = e.deltaY;\n const isAtTop = overflowRef.current.top >= -0.5;\n const isAtBottom = overflowRef.current.bottom >= -0.5;\n const remainingScroll = el.scrollHeight - el.clientHeight;\n const sign = dY < 0 ? -1 : 1;\n const method = dY < 0 ? 'max' : 'min';\n if (el.scrollHeight <= el.clientHeight) {\n return;\n }\n if (!isAtTop && dY > 0 || !isAtBottom && dY < 0) {\n e.preventDefault();\n ReactDOM.flushSync(() => {\n onChange(d => d + Math[method](dY, remainingScroll * sign));\n });\n } else if (/firefox/i.test(getUserAgent())) {\n // Needed to propagate scrolling during momentum scrolling phase once\n // it gets limited by the boundary. UX improvement, not critical.\n el.scrollTop += dY;\n }\n }\n const el = (scrollRef == null ? void 0 : scrollRef.current) || elements.floating;\n if (open && el) {\n el.addEventListener('wheel', onWheel);\n\n // Wait for the position to be ready.\n requestAnimationFrame(() => {\n prevScrollTopRef.current = el.scrollTop;\n if (overflowRef.current != null) {\n initialOverflowRef.current = {\n ...overflowRef.current\n };\n }\n });\n return () => {\n prevScrollTopRef.current = null;\n initialOverflowRef.current = null;\n el.removeEventListener('wheel', onWheel);\n };\n }\n }, [enabled, open, elements.floating, overflowRef, scrollRef, onChange]);\n const floating = React.useMemo(() => ({\n onKeyDown() {\n controlledScrollingRef.current = true;\n },\n onWheel() {\n controlledScrollingRef.current = false;\n },\n onPointerMove() {\n controlledScrollingRef.current = false;\n },\n onScroll() {\n const el = (scrollRef == null ? void 0 : scrollRef.current) || elements.floating;\n if (!overflowRef.current || !el || !controlledScrollingRef.current) {\n return;\n }\n if (prevScrollTopRef.current !== null) {\n const scrollDiff = el.scrollTop - prevScrollTopRef.current;\n if (overflowRef.current.bottom < -0.5 && scrollDiff < -1 || overflowRef.current.top < -0.5 && scrollDiff > 1) {\n ReactDOM.flushSync(() => onChange(d => d + scrollDiff));\n }\n }\n\n // [Firefox] Wait for the height change to have been applied.\n requestAnimationFrame(() => {\n prevScrollTopRef.current = el.scrollTop;\n });\n }\n }), [elements.floating, onChange, overflowRef, scrollRef]);\n return React.useMemo(() => enabled ? {\n floating\n } : {}, [enabled, floating]);\n}\n\nfunction getNodeChildren(nodes, id, onlyOpenChildren) {\n if (onlyOpenChildren === void 0) {\n onlyOpenChildren = true;\n }\n const directChildren = nodes.filter(node => {\n var _node$context;\n return node.parentId === id && (!onlyOpenChildren || ((_node$context = node.context) == null ? void 0 : _node$context.open));\n });\n return directChildren.flatMap(child => [child, ...getNodeChildren(nodes, child.id, onlyOpenChildren)]);\n}\n\nfunction isPointInPolygon(point, polygon) {\n const [x, y] = point;\n let isInside = false;\n const length = polygon.length;\n for (let i = 0, j = length - 1; i < length; j = i++) {\n const [xi, yi] = polygon[i] || [0, 0];\n const [xj, yj] = polygon[j] || [0, 0];\n const intersect = yi >= y !== yj >= y && x <= (xj - xi) * (y - yi) / (yj - yi) + xi;\n if (intersect) {\n isInside = !isInside;\n }\n }\n return isInside;\n}\nfunction isInside(point, rect) {\n return point[0] >= rect.x && point[0] <= rect.x + rect.width && point[1] >= rect.y && point[1] <= rect.y + rect.height;\n}\n/**\n * Generates a safe polygon area that the user can traverse without closing the\n * floating element once leaving the reference element.\n * @see https://floating-ui.com/docs/useHover#safepolygon\n */\nfunction safePolygon(options) {\n if (options === void 0) {\n options = {};\n }\n const {\n buffer = 0.5,\n blockPointerEvents = false,\n requireIntent = true\n } = options;\n const timeoutRef = {\n current: -1\n };\n let hasLanded = false;\n let lastX = null;\n let lastY = null;\n let lastCursorTime = typeof performance !== 'undefined' ? performance.now() : 0;\n function getCursorSpeed(x, y) {\n const currentTime = performance.now();\n const elapsedTime = currentTime - lastCursorTime;\n if (lastX === null || lastY === null || elapsedTime === 0) {\n lastX = x;\n lastY = y;\n lastCursorTime = currentTime;\n return null;\n }\n const deltaX = x - lastX;\n const deltaY = y - lastY;\n const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n const speed = distance / elapsedTime; // px / ms\n\n lastX = x;\n lastY = y;\n lastCursorTime = currentTime;\n return speed;\n }\n const fn = _ref => {\n let {\n x,\n y,\n placement,\n elements,\n onClose,\n nodeId,\n tree\n } = _ref;\n return function onMouseMove(event) {\n function close() {\n clearTimeoutIfSet(timeoutRef);\n onClose();\n }\n clearTimeoutIfSet(timeoutRef);\n if (!elements.domReference || !elements.floating || placement == null || x == null || y == null) {\n return;\n }\n const {\n clientX,\n clientY\n } = event;\n const clientPoint = [clientX, clientY];\n const target = getTarget(event);\n const isLeave = event.type === 'mouseleave';\n const isOverFloatingEl = contains(elements.floating, target);\n const isOverReferenceEl = contains(elements.domReference, target);\n const refRect = elements.domReference.getBoundingClientRect();\n const rect = elements.floating.getBoundingClientRect();\n const side = placement.split('-')[0];\n const cursorLeaveFromRight = x > rect.right - rect.width / 2;\n const cursorLeaveFromBottom = y > rect.bottom - rect.height / 2;\n const isOverReferenceRect = isInside(clientPoint, refRect);\n const isFloatingWider = rect.width > refRect.width;\n const isFloatingTaller = rect.height > refRect.height;\n const left = (isFloatingWider ? refRect : rect).left;\n const right = (isFloatingWider ? refRect : rect).right;\n const top = (isFloatingTaller ? refRect : rect).top;\n const bottom = (isFloatingTaller ? refRect : rect).bottom;\n if (isOverFloatingEl) {\n hasLanded = true;\n if (!isLeave) {\n return;\n }\n }\n if (isOverReferenceEl) {\n hasLanded = false;\n }\n if (isOverReferenceEl && !isLeave) {\n hasLanded = true;\n return;\n }\n\n // Prevent overlapping floating element from being stuck in an open-close\n // loop: https://github.com/floating-ui/floating-ui/issues/1910\n if (isLeave && isElement(event.relatedTarget) && contains(elements.floating, event.relatedTarget)) {\n return;\n }\n\n // If any nested child is open, abort.\n if (tree && getNodeChildren(tree.nodesRef.current, nodeId).length) {\n return;\n }\n\n // If the pointer is leaving from the opposite side, the \"buffer\" logic\n // creates a point where the floating element remains open, but should be\n // ignored.\n // A constant of 1 handles floating point rounding errors.\n if (side === 'top' && y >= refRect.bottom - 1 || side === 'bottom' && y <= refRect.top + 1 || side === 'left' && x >= refRect.right - 1 || side === 'right' && x <= refRect.left + 1) {\n return close();\n }\n\n // Ignore when the cursor is within the rectangular trough between the\n // two elements. Since the triangle is created from the cursor point,\n // which can start beyond the ref element's edge, traversing back and\n // forth from the ref to the floating element can cause it to close. This\n // ensures it always remains open in that case.\n let rectPoly = [];\n switch (side) {\n case 'top':\n rectPoly = [[left, refRect.top + 1], [left, rect.bottom - 1], [right, rect.bottom - 1], [right, refRect.top + 1]];\n break;\n case 'bottom':\n rectPoly = [[left, rect.top + 1], [left, refRect.bottom - 1], [right, refRect.bottom - 1], [right, rect.top + 1]];\n break;\n case 'left':\n rectPoly = [[rect.right - 1, bottom], [rect.right - 1, top], [refRect.left + 1, top], [refRect.left + 1, bottom]];\n break;\n case 'right':\n rectPoly = [[refRect.right - 1, bottom], [refRect.right - 1, top], [rect.left + 1, top], [rect.left + 1, bottom]];\n break;\n }\n function getPolygon(_ref2) {\n let [x, y] = _ref2;\n switch (side) {\n case 'top':\n {\n const cursorPointOne = [isFloatingWider ? x + buffer / 2 : cursorLeaveFromRight ? x + buffer * 4 : x - buffer * 4, y + buffer + 1];\n const cursorPointTwo = [isFloatingWider ? x - buffer / 2 : cursorLeaveFromRight ? x + buffer * 4 : x - buffer * 4, y + buffer + 1];\n const commonPoints = [[rect.left, cursorLeaveFromRight ? rect.bottom - buffer : isFloatingWider ? rect.bottom - buffer : rect.top], [rect.right, cursorLeaveFromRight ? isFloatingWider ? rect.bottom - buffer : rect.top : rect.bottom - buffer]];\n return [cursorPointOne, cursorPointTwo, ...commonPoints];\n }\n case 'bottom':\n {\n const cursorPointOne = [isFloatingWider ? x + buffer / 2 : cursorLeaveFromRight ? x + buffer * 4 : x - buffer * 4, y - buffer];\n const cursorPointTwo = [isFloatingWider ? x - buffer / 2 : cursorLeaveFromRight ? x + buffer * 4 : x - buffer * 4, y - buffer];\n const commonPoints = [[rect.left, cursorLeaveFromRight ? rect.top + buffer : isFloatingWider ? rect.top + buffer : rect.bottom], [rect.right, cursorLeaveFromRight ? isFloatingWider ? rect.top + buffer : rect.bottom : rect.top + buffer]];\n return [cursorPointOne, cursorPointTwo, ...commonPoints];\n }\n case 'left':\n {\n const cursorPointOne = [x + buffer + 1, isFloatingTaller ? y + buffer / 2 : cursorLeaveFromBottom ? y + buffer * 4 : y - buffer * 4];\n const cursorPointTwo = [x + buffer + 1, isFloatingTaller ? y - buffer / 2 : cursorLeaveFromBottom ? y + buffer * 4 : y - buffer * 4];\n const commonPoints = [[cursorLeaveFromBottom ? rect.right - buffer : isFloatingTaller ? rect.right - buffer : rect.left, rect.top], [cursorLeaveFromBottom ? isFloatingTaller ? rect.right - buffer : rect.left : rect.right - buffer, rect.bottom]];\n return [...commonPoints, cursorPointOne, cursorPointTwo];\n }\n case 'right':\n {\n const cursorPointOne = [x - buffer, isFloatingTaller ? y + buffer / 2 : cursorLeaveFromBottom ? y + buffer * 4 : y - buffer * 4];\n const cursorPointTwo = [x - buffer, isFloatingTaller ? y - buffer / 2 : cursorLeaveFromBottom ? y + buffer * 4 : y - buffer * 4];\n const commonPoints = [[cursorLeaveFromBottom ? rect.left + buffer : isFloatingTaller ? rect.left + buffer : rect.right, rect.top], [cursorLeaveFromBottom ? isFloatingTaller ? rect.left + buffer : rect.right : rect.left + buffer, rect.bottom]];\n return [cursorPointOne, cursorPointTwo, ...commonPoints];\n }\n }\n }\n if (isPointInPolygon([clientX, clientY], rectPoly)) {\n return;\n }\n if (hasLanded && !isOverReferenceRect) {\n return close();\n }\n if (!isLeave && requireIntent) {\n const cursorSpeed = getCursorSpeed(event.clientX, event.clientY);\n const cursorSpeedThreshold = 0.1;\n if (cursorSpeed !== null && cursorSpeed < cursorSpeedThreshold) {\n return close();\n }\n }\n if (!isPointInPolygon([clientX, clientY], getPolygon([x, y]))) {\n close();\n } else if (!hasLanded && requireIntent) {\n timeoutRef.current = window.setTimeout(close, 40);\n }\n };\n };\n fn.__options = {\n blockPointerEvents\n };\n return fn;\n}\n\nexport { Composite, CompositeItem, FloatingArrow, FloatingDelayGroup, FloatingFocusManager, FloatingList, FloatingNode, FloatingOverlay, FloatingPortal, FloatingTree, NextFloatingDelayGroup, inner, safePolygon, useClick, useClientPoint, useDelayGroup, useDelayGroupContext, useDismiss, useFloating, useFloatingNodeId, useFloatingParentNodeId, useFloatingPortalNode, useFloatingRootContext, useFloatingTree, useFocus, useHover, useId, useInnerOffset, useInteractions, useListItem, useListNavigation, useMergeRefs, useNextDelayGroup, useRole, useTransitionStatus, useTransitionStyles, useTypeahead };\n","import * as React from \"react\";\n\nimport type { ComboboxContextValue } from \"@nuka/components/Combobox/Combobox.types\";\n\nconst ComboboxContext = React.createContext<ComboboxContextValue | undefined>(\n undefined,\n);\n\nexport function useComboboxContext(): ComboboxContextValue {\n const context = React.useContext(ComboboxContext);\n if (context === undefined) {\n throw new Error(\n \"useComboboxContext must be used within a <Combobox> component\",\n );\n }\n return context;\n}\n\nexport { ComboboxContext };\nexport type { ComboboxContextValue };\n","// > 200 lines: root orchestrates Floating UI, option registry, and context\n// value assembly; splitting further would scatter tightly coupled state.\nimport * as React from \"react\";\nimport {\n useFloating,\n useClick,\n useDismiss,\n useInteractions,\n offset,\n flip,\n shift,\n size,\n autoUpdate,\n} from \"@floating-ui/react\";\nimport { useControllableState } from \"@nuka/hooks/use-controllable-state\";\nimport { ComboboxContext } from \"@nuka/components/Combobox/Combobox.context\";\nimport type {\n ComboboxProps,\n ComboboxContextValue,\n OptionEntry,\n} from \"@nuka/components/Combobox/Combobox.types\";\n\nfunction Combobox({\n children,\n value: controlledValue,\n defaultValue,\n onValueChange,\n open: controlledOpen,\n defaultOpen = false,\n onOpenChange,\n disabled = false,\n freeText = false,\n name,\n}: ComboboxProps) {\n const [currentValue, handleValueChange] = useControllableState(\n controlledValue,\n defaultValue,\n onValueChange,\n );\n const [currentOpen, setOpen] = useControllableState(\n controlledOpen,\n defaultOpen,\n onOpenChange,\n );\n const [filterText, setFilterText] = React.useState(\"\");\n const [activeDescendantId, setActiveDescendantId] = React.useState<\n string | undefined\n >(undefined);\n const [visibleCount, setVisibleCount] = React.useState(0);\n\n // Split registry: labelMap persists for trigger label display across open/close,\n // activeOptions tracks mounted option elements for keyboard navigation\n const labelMapRef = React.useRef(new Map<string, string>());\n const activeOptionsRef = React.useRef(new Map<string, OptionEntry>());\n const [registryVersion, setRegistryVersion] = React.useState(0);\n const bumpRegistry = React.useCallback(() => {\n setRegistryVersion((v) => v + 1);\n }, []);\n\n const generatedId = React.useId();\n const listboxId = `${generatedId}-listbox`;\n const inputId = `${generatedId}-input`;\n const listRef = React.useRef<HTMLDivElement | null>(null);\n const triggerRef = React.useRef<HTMLButtonElement | null>(null);\n const highlightOnOpenRef = React.useRef<\"first\" | \"last\" | null>(null);\n\n const handleOpenChange = React.useCallback(\n (nextOpen: boolean) => {\n setOpen(nextOpen);\n if (!nextOpen) {\n setFilterText(\"\");\n setActiveDescendantId(undefined);\n }\n },\n [setOpen],\n );\n\n // Restore focus to trigger when panel closes and focus is lost to body\n const prevOpenRef = React.useRef(currentOpen);\n React.useEffect(() => {\n if (prevOpenRef.current && !currentOpen) {\n requestAnimationFrame(() => {\n if (\n document.activeElement === document.body ||\n document.activeElement === null\n ) {\n triggerRef.current?.focus();\n }\n });\n }\n prevOpenRef.current = currentOpen;\n }, [currentOpen]);\n\n // Floating UI: no useRole to avoid ARIA injection conflicts\n const { refs, floatingStyles, context } = useFloating({\n open: currentOpen,\n onOpenChange: handleOpenChange,\n placement: \"bottom-start\",\n middleware: [\n offset(4),\n flip(),\n shift({ padding: 8 }),\n size({\n apply({ rects, elements }) {\n Object.assign(elements.floating.style, {\n minWidth: `${String(rects.reference.width)}px`,\n });\n },\n }),\n ],\n whileElementsMounted: autoUpdate,\n });\n\n const click = useClick(context);\n const dismiss = useDismiss(context);\n const { getReferenceProps, getFloatingProps } = useInteractions([\n click,\n dismiss,\n ]);\n\n const registerOption = React.useCallback(\n (optionValue: string, label: string, ref: HTMLElement | null) => {\n labelMapRef.current.set(optionValue, label);\n const existing = activeOptionsRef.current.get(optionValue);\n activeOptionsRef.current.set(optionValue, {\n label,\n ref,\n disabled: existing?.disabled ?? false,\n });\n bumpRegistry();\n },\n [bumpRegistry],\n );\n\n const unregisterOption = React.useCallback((optionValue: string) => {\n activeOptionsRef.current.delete(optionValue);\n }, []);\n\n const getOptions = React.useCallback((): string[] => {\n return Array.from(activeOptionsRef.current.keys());\n }, []);\n\n const getOptionLabel = React.useCallback(\n (optionValue: string): string | undefined => {\n return labelMapRef.current.get(optionValue);\n },\n [],\n );\n\n const getOptionRef = React.useCallback(\n (optionValue: string): HTMLElement | null | undefined => {\n return activeOptionsRef.current.get(optionValue)?.ref;\n },\n [],\n );\n\n const isOptionDisabled = React.useCallback((optionValue: string): boolean => {\n return activeOptionsRef.current.get(optionValue)?.disabled ?? false;\n }, []);\n\n const registerDisabledOption = React.useCallback(\n (optionValue: string, optionDisabled: boolean) => {\n const existing = activeOptionsRef.current.get(optionValue);\n if (existing) {\n existing.disabled = optionDisabled;\n }\n },\n [],\n );\n\n // registryVersion invalidates memo when options register\n const contextValue: ComboboxContextValue = React.useMemo(() => {\n void registryVersion;\n return {\n open: currentOpen,\n onOpenChange: handleOpenChange,\n value: currentValue,\n onValueChange: handleValueChange,\n filterText,\n setFilterText,\n activeDescendantId,\n setActiveDescendantId,\n visibleCount,\n setVisibleCount,\n disabled,\n freeText,\n listboxId,\n inputId,\n listRef,\n triggerRef,\n highlightOnOpenRef,\n registerOption,\n unregisterOption,\n getOptions,\n getOptionLabel,\n getOptionRef,\n isOptionDisabled,\n registerDisabledOption,\n refs,\n floatingStyles,\n getReferenceProps,\n getFloatingProps,\n };\n }, [\n currentOpen,\n handleOpenChange,\n currentValue,\n handleValueChange,\n filterText,\n activeDescendantId,\n visibleCount,\n disabled,\n freeText,\n listboxId,\n inputId,\n registerOption,\n unregisterOption,\n getOptions,\n getOptionLabel,\n getOptionRef,\n isOptionDisabled,\n registerDisabledOption,\n refs,\n floatingStyles,\n getReferenceProps,\n getFloatingProps,\n registryVersion,\n ]);\n\n return (\n <ComboboxContext value={contextValue}>\n {children}\n {name !== undefined && (\n <input type=\"hidden\" name={name} value={currentValue ?? \"\"} />\n )}\n </ComboboxContext>\n );\n}\n\nCombobox.displayName = \"Combobox\";\n\nexport { Combobox };\n","import { cva, type VariantProps } from \"@nuka/utils/variants\";\n\nexport const comboboxTriggerVariants = cva(\n [\n \"w-full\",\n \"inline-flex items-center justify-between\",\n \"rounded-(--radius-md)\",\n \"border\",\n \"bg-(--nuka-input-bg)\",\n \"text-(--nuka-text-base)\",\n \"text-left\",\n \"focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--nuka-border-focus)\",\n \"disabled:cursor-not-allowed disabled:opacity-50\",\n \"transition-colors duration-150\",\n ],\n {\n variants: {\n intent: {\n default:\n \"border-(--nuka-input-border) hover:border-(--nuka-input-border-hover)\",\n danger: \"border-(--nuka-danger-border)\",\n success: \"border-(--nuka-success-border)\",\n warning: \"border-(--nuka-warning-border)\",\n },\n size: {\n sm: \"px-(--space-3) py-(--space-2) text-xs\",\n md: \"px-(--space-4) py-(--space-3) text-sm\",\n lg: \"px-(--space-6) py-(--space-4) text-base\",\n },\n },\n defaultVariants: {\n intent: \"default\",\n size: \"md\",\n },\n },\n);\n\nexport type ComboboxTriggerVariantProps = VariantProps<\n typeof comboboxTriggerVariants\n>;\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Icon } from \"@nuka/components/Icon\";\nimport { useFormField } from \"@nuka/components/FormField\";\nimport { useFormFieldProps } from \"@nuka/hooks/use-form-field-props\";\nimport { comboboxTriggerVariants } from \"@nuka/components/Combobox/Combobox.variants\";\nimport type { ComboboxTriggerProps } from \"@nuka/components/Combobox/Combobox.types\";\nimport { useComboboxContext } from \"@nuka/components/Combobox/Combobox.context\";\n\nconst ComboboxTrigger = React.forwardRef<\n HTMLButtonElement,\n ComboboxTriggerProps\n>(\n (\n {\n className,\n placeholder,\n intent,\n size: sizeProp,\n disabled: disabledProp,\n onKeyDown: propsOnKeyDown,\n onClick: propsOnClick,\n ...props\n },\n ref,\n ) => {\n const ctx = useComboboxContext();\n const formCtx = useFormField();\n const field = useFormFieldProps({\n id: props.id,\n \"aria-invalid\": props[\"aria-invalid\"],\n \"aria-describedby\": props[\"aria-describedby\"],\n \"aria-required\": props[\"aria-required\"],\n });\n\n const resolvedDisabled = disabledProp ?? ctx.disabled;\n\n const ariaLabelledBy =\n props[\"aria-labelledby\"] ?? (formCtx.labelId || undefined);\n\n const displayLabel =\n ctx.value !== undefined ? ctx.getOptionLabel(ctx.value) : undefined;\n\n const ariaLabel =\n props[\"aria-label\"] ??\n (ariaLabelledBy === undefined\n ? (displayLabel ?? placeholder ?? \"Select\")\n : undefined);\n\n const composedRef = React.useCallback(\n (node: HTMLButtonElement | null) => {\n if (typeof ref === \"function\") ref(node);\n else if (ref != null) ref.current = node;\n ctx.triggerRef.current = node;\n ctx.refs.setReference(node);\n },\n [ref, ctx.triggerRef, ctx.refs],\n );\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLButtonElement>) => {\n propsOnKeyDown?.(e);\n if (e.defaultPrevented) return;\n\n switch (e.key) {\n case \"ArrowDown\": {\n e.preventDefault();\n if (!ctx.open) {\n ctx.highlightOnOpenRef.current = \"first\";\n ctx.onOpenChange(true);\n }\n break;\n }\n case \"ArrowUp\": {\n e.preventDefault();\n if (!ctx.open) {\n ctx.highlightOnOpenRef.current = \"last\";\n ctx.onOpenChange(true);\n }\n break;\n }\n default: {\n if (\n e.key.length === 1 &&\n e.key !== \" \" &&\n !e.ctrlKey &&\n !e.metaKey &&\n !e.altKey &&\n !ctx.open\n ) {\n e.preventDefault();\n ctx.setFilterText(e.key);\n ctx.onOpenChange(true);\n }\n break;\n }\n }\n };\n\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n propsOnClick?.(e);\n };\n\n const referenceProps = ctx.getReferenceProps({\n onKeyDown: handleKeyDown,\n onClick: handleClick,\n });\n\n return (\n <button\n {...props}\n {...referenceProps}\n ref={composedRef}\n type=\"button\"\n id={field.resolvedId}\n aria-haspopup=\"listbox\"\n aria-expanded={ctx.open}\n aria-controls={ctx.open ? ctx.listboxId : undefined}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-invalid={field.ariaInvalid}\n aria-describedby={field.ariaDescribedBy}\n aria-required={field.ariaRequired}\n disabled={resolvedDisabled}\n className={cn(\n comboboxTriggerVariants({ intent, size: sizeProp }),\n className,\n )}\n >\n <span\n className={cn(\n \"truncate\",\n displayLabel === undefined && \"text-(--nuka-text-muted)\",\n )}\n >\n {displayLabel ?? placeholder}\n </span>\n <Icon\n size=\"sm\"\n color=\"muted\"\n className={cn(\n \"transition-transform duration-150\",\n ctx.open && \"rotate-180\",\n )}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n </Icon>\n </button>\n );\n },\n);\n\nComboboxTrigger.displayName = \"ComboboxTrigger\";\n\nexport { ComboboxTrigger };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Portal } from \"@nuka/utils/portal\";\nimport type { ComboboxContentProps } from \"@nuka/components/Combobox/Combobox.types\";\nimport { useComboboxContext } from \"@nuka/components/Combobox/Combobox.context\";\n\nconst ComboboxContent = React.forwardRef<HTMLDivElement, ComboboxContentProps>(\n ({ className, children }, ref) => {\n const ctx = useComboboxContext();\n\n // When closed, render children in a hidden container so ComboboxOption\n // can register labels for the trigger to display. When open, render\n // in a Portal with Floating UI positioning.\n if (!ctx.open) {\n return (\n <div ref={ref} hidden>\n {children}\n </div>\n );\n }\n\n return (\n <Portal>\n <div\n ref={(node) => {\n if (typeof ref === \"function\") ref(node);\n else if (ref != null) ref.current = node;\n ctx.refs.setFloating(node);\n }}\n style={ctx.floatingStyles}\n {...ctx.getFloatingProps()}\n className={cn(\n \"z-(--nuka-z-dropdown)\",\n \"bg-(--nuka-bg-base)\",\n \"border border-(--nuka-border-base)\",\n \"rounded-(--radius-md)\",\n \"shadow-(--nuka-shadow-overlay)\",\n \"overflow-hidden\",\n className,\n )}\n >\n {children}\n </div>\n </Portal>\n );\n },\n);\n\nComboboxContent.displayName = \"ComboboxContent\";\n\nexport { ComboboxContent };\n","import type * as React from \"react\";\n\nexport function getNavigableOptions(\n listRef: React.RefObject<HTMLDivElement | null>,\n): HTMLElement[] {\n if (listRef.current == null) return [];\n return Array.from(\n listRef.current.querySelectorAll<HTMLElement>(\n '[role=\"option\"]:not([hidden]):not([aria-disabled=\"true\"])',\n ),\n );\n}\n\nexport function getLabel(children: React.ReactNode): string {\n if (typeof children === \"string\") return children;\n if (typeof children === \"number\") return String(children);\n return \"\";\n}\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Icon } from \"@nuka/components/Icon\";\nimport type { ComboboxInputProps } from \"@nuka/components/Combobox/Combobox.types\";\nimport { useComboboxContext } from \"@nuka/components/Combobox/Combobox.context\";\nimport { getNavigableOptions } from \"@nuka/components/Combobox/Combobox.utils\";\n\nconst ComboboxInput = React.forwardRef<HTMLInputElement, ComboboxInputProps>(\n ({ className, ...props }, ref) => {\n const ctx = useComboboxContext();\n const internalRef = React.useRef<HTMLInputElement>(null);\n\n const composedRef = React.useCallback(\n (node: HTMLInputElement | null) => {\n internalRef.current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref != null) ref.current = node;\n },\n [ref],\n );\n\n // Focus input and apply highlight directive when panel opens.\n // No rAF: by the time useEffect fires, Portal content and callback refs\n // are committed, so the input and option elements are in the DOM.\n // Empty deps: component unmounts on close and remounts on open.\n React.useEffect(() => {\n internalRef.current?.focus();\n\n const dir = ctx.highlightOnOpenRef.current;\n if (dir != null) {\n ctx.highlightOnOpenRef.current = null;\n const items = getNavigableOptions(ctx.listRef);\n if (items.length > 0) {\n const target = dir === \"first\" ? items[0] : items[items.length - 1];\n if (target != null) {\n ctx.setActiveDescendantId(target.id);\n if (typeof target.scrollIntoView === \"function\") {\n target.scrollIntoView({ block: \"nearest\" });\n }\n }\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- runs once on mount when panel opens\n }, []);\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n const items = getNavigableOptions(ctx.listRef);\n\n switch (e.key) {\n case \"ArrowDown\": {\n e.preventDefault();\n if (items.length === 0) return;\n const currentIdx = items.findIndex(\n (el) => el.id === ctx.activeDescendantId,\n );\n const nextIdx =\n currentIdx === -1 ? 0 : (currentIdx + 1) % items.length;\n const next = items[nextIdx];\n if (next != null) {\n ctx.setActiveDescendantId(next.id);\n if (typeof next.scrollIntoView === \"function\") {\n next.scrollIntoView({ block: \"nearest\" });\n }\n }\n break;\n }\n case \"ArrowUp\": {\n e.preventDefault();\n if (items.length === 0) return;\n const currentIdx = items.findIndex(\n (el) => el.id === ctx.activeDescendantId,\n );\n const prevIdx =\n currentIdx === -1\n ? items.length - 1\n : (currentIdx - 1 + items.length) % items.length;\n const prev = items[prevIdx];\n if (prev != null) {\n ctx.setActiveDescendantId(prev.id);\n if (typeof prev.scrollIntoView === \"function\") {\n prev.scrollIntoView({ block: \"nearest\" });\n }\n }\n break;\n }\n case \"Home\": {\n e.preventDefault();\n const first = items[0];\n if (first != null) {\n ctx.setActiveDescendantId(first.id);\n if (typeof first.scrollIntoView === \"function\") {\n first.scrollIntoView({ block: \"nearest\" });\n }\n }\n break;\n }\n case \"End\": {\n e.preventDefault();\n const last = items[items.length - 1];\n if (last != null) {\n ctx.setActiveDescendantId(last.id);\n if (typeof last.scrollIntoView === \"function\") {\n last.scrollIntoView({ block: \"nearest\" });\n }\n }\n break;\n }\n case \"Enter\": {\n e.preventDefault();\n if (ctx.activeDescendantId != null) {\n const activeEl = document.getElementById(ctx.activeDescendantId);\n if (\n activeEl != null &&\n activeEl.getAttribute(\"aria-disabled\") !== \"true\"\n ) {\n activeEl.click();\n }\n } else if (ctx.freeText && ctx.filterText !== \"\") {\n ctx.onValueChange(ctx.filterText);\n ctx.onOpenChange(false);\n ctx.triggerRef.current?.focus();\n }\n break;\n }\n case \"Escape\": {\n ctx.onOpenChange(false);\n ctx.triggerRef.current?.focus();\n break;\n }\n case \"Tab\": {\n ctx.triggerRef.current?.focus();\n ctx.onOpenChange(false);\n break;\n }\n default:\n break;\n }\n };\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n ctx.setFilterText(e.target.value);\n ctx.setActiveDescendantId(undefined);\n };\n\n return (\n <div\n className={cn(\n \"flex items-center gap-(--space-2) px-(--space-3)\",\n \"border-b border-(--nuka-border-base)\",\n )}\n >\n <Icon size=\"sm\" color=\"muted\">\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <circle cx=\"11\" cy=\"11\" r=\"8\" />\n <path d=\"m21 21-4.3-4.3\" />\n </svg>\n </Icon>\n <input\n {...props}\n ref={composedRef}\n id={ctx.inputId}\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-expanded={true}\n aria-controls={ctx.listboxId}\n aria-activedescendant={ctx.activeDescendantId}\n value={ctx.filterText}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n className={cn(\n \"flex-1 bg-transparent py-(--space-3)\",\n \"text-sm text-(--nuka-text-base)\",\n \"placeholder:text-(--nuka-text-muted)\",\n \"outline-none\",\n className,\n )}\n />\n </div>\n );\n },\n);\n\nComboboxInput.displayName = \"ComboboxInput\";\n\nexport { ComboboxInput };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport type { ComboboxListboxProps } from \"@nuka/components/Combobox/Combobox.types\";\nimport { useComboboxContext } from \"@nuka/components/Combobox/Combobox.context\";\n\nconst ComboboxListbox = React.forwardRef<HTMLDivElement, ComboboxListboxProps>(\n ({ className, children, ...props }, ref) => {\n const ctx = useComboboxContext();\n\n const composedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n ctx.listRef.current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref != null) ref.current = node;\n },\n [ref, ctx.listRef],\n );\n\n // Count visible options for ComboboxEmpty. Layout effect avoids\n // flash-of-empty-state by updating before paint.\n React.useLayoutEffect(() => {\n if (ctx.listRef.current == null) return;\n const count = ctx.listRef.current.querySelectorAll(\n '[role=\"option\"]:not([hidden])',\n ).length;\n ctx.setVisibleCount(count);\n }, [ctx, ctx.filterText, ctx.setVisibleCount, ctx.listRef]);\n\n return (\n <div\n ref={composedRef}\n id={ctx.listboxId}\n role=\"listbox\"\n aria-label=\"Options\"\n className={cn(\"max-h-[280px] overflow-y-auto p-(--space-1)\", className)}\n {...props}\n >\n {children}\n </div>\n );\n },\n);\n\nComboboxListbox.displayName = \"ComboboxListbox\";\n\nexport { ComboboxListbox };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport type { ComboboxOptionProps } from \"@nuka/components/Combobox/Combobox.types\";\nimport { useComboboxContext } from \"@nuka/components/Combobox/Combobox.context\";\nimport { getLabel } from \"@nuka/components/Combobox/Combobox.utils\";\n\nconst ComboboxOption = React.forwardRef<HTMLDivElement, ComboboxOptionProps>(\n ({ value, disabled = false, className, children, onSelect }, ref) => {\n const ctx = useComboboxContext();\n const internalRef = React.useRef<HTMLDivElement>(null);\n\n const composedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n internalRef.current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref != null) ref.current = node;\n },\n [ref],\n );\n\n const isSelected = ctx.value === value;\n const optionId = `${ctx.listboxId}-option-${value}`;\n const label = getLabel(children);\n\n const isFiltered =\n ctx.filterText !== \"\" &&\n !label.toLowerCase().includes(ctx.filterText.toLowerCase());\n\n const isActive = ctx.activeDescendantId === optionId;\n\n React.useLayoutEffect(() => {\n ctx.registerOption(value, label, internalRef.current);\n return () => {\n ctx.unregisterOption(value);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps -- register once on mount, unregister on unmount\n }, []);\n\n React.useEffect(() => {\n ctx.registerDisabledOption(value, disabled);\n }, [ctx, value, disabled]);\n\n React.useEffect(() => {\n if (isActive && internalRef.current != null) {\n if (typeof internalRef.current.scrollIntoView === \"function\") {\n internalRef.current.scrollIntoView({ block: \"nearest\" });\n }\n }\n }, [isActive]);\n\n const handleClick = () => {\n if (disabled) return;\n ctx.onValueChange(value);\n onSelect?.();\n ctx.onOpenChange(false);\n };\n\n return (\n <div\n ref={composedRef}\n id={optionId}\n role=\"option\"\n aria-selected={isSelected}\n aria-disabled={disabled || undefined}\n hidden={isFiltered || undefined}\n className={cn(\n \"px-(--space-3) py-(--space-2)\",\n \"text-sm\",\n \"cursor-pointer\",\n \"select-none\",\n \"text-(--nuka-text-base)\",\n disabled && \"opacity-50 cursor-not-allowed pointer-events-none\",\n isSelected &&\n !isActive &&\n \"bg-(--nuka-accent-bg-subtle) text-(--nuka-accent-text)\",\n isActive && \"bg-(--nuka-bg-muted) outline-none\",\n !isSelected && !isActive && !disabled && \"hover:bg-(--nuka-bg-muted)\",\n className,\n )}\n onClick={handleClick}\n >\n {children}\n </div>\n );\n },\n);\n\nComboboxOption.displayName = \"ComboboxOption\";\n\nexport { ComboboxOption };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Text } from \"@nuka/components/Text\";\nimport type { ComboboxGroupProps } from \"@nuka/components/Combobox/Combobox.types\";\nimport { useComboboxContext } from \"@nuka/components/Combobox/Combobox.context\";\n\nconst ComboboxGroup = React.forwardRef<HTMLDivElement, ComboboxGroupProps>(\n ({ label, className, children, ...props }, ref) => {\n const headingId = React.useId();\n const groupRef = React.useRef<HTMLDivElement>(null);\n const [hasVisibleItems, setHasVisibleItems] = React.useState(true);\n const ctx = useComboboxContext();\n\n const composedRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n groupRef.current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref != null) ref.current = node;\n },\n [ref],\n );\n\n React.useEffect(() => {\n if (groupRef.current == null) return;\n const visible =\n groupRef.current.querySelector('[role=\"option\"]:not([hidden])') !==\n null;\n setHasVisibleItems(visible);\n }, [ctx.filterText]);\n\n return (\n <div\n ref={composedRef}\n role=\"group\"\n aria-labelledby={label != null ? headingId : undefined}\n hidden={!hasVisibleItems || undefined}\n className={cn(className)}\n {...props}\n >\n {label != null && (\n <Text\n as=\"div\"\n size=\"xs\"\n weight=\"medium\"\n color=\"muted\"\n id={headingId}\n role=\"presentation\"\n className=\"px-(--space-3) py-(--space-2)\"\n >\n {label}\n </Text>\n )}\n {children}\n </div>\n );\n },\n);\n\nComboboxGroup.displayName = \"ComboboxGroup\";\n\nexport { ComboboxGroup };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Text } from \"@nuka/components/Text\";\nimport type { ComboboxEmptyProps } from \"@nuka/components/Combobox/Combobox.types\";\nimport { useComboboxContext } from \"@nuka/components/Combobox/Combobox.context\";\n\nconst ComboboxEmpty = React.forwardRef<HTMLDivElement, ComboboxEmptyProps>(\n ({ className, children, ...props }, ref) => {\n const ctx = useComboboxContext();\n\n if (ctx.visibleCount > 0) return null;\n\n return (\n <div\n ref={ref}\n role=\"presentation\"\n className={cn(\"py-(--space-8) text-center\", className)}\n {...props}\n >\n <Text size=\"sm\" color=\"muted\">\n {children}\n </Text>\n </div>\n );\n },\n);\n\nComboboxEmpty.displayName = \"ComboboxEmpty\";\n\nexport { ComboboxEmpty };\n","import * as React from \"react\";\nimport { Slot } from \"@nuka/utils/slot\";\nimport { cn } from \"@nuka/utils/cn\";\n\nexport type ContainerSize = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"full\";\n\nexport interface ContainerProps extends React.HTMLAttributes<HTMLDivElement> {\n size?: ContainerSize;\n padded?: boolean;\n centered?: boolean;\n asChild?: boolean;\n}\n\nconst sizeClasses: Record<ContainerSize, string> = {\n sm: \"max-w-screen-sm\",\n md: \"max-w-screen-md\",\n lg: \"max-w-screen-lg\",\n xl: \"max-w-screen-xl\",\n \"2xl\": \"max-w-screen-2xl\",\n full: \"max-w-full\",\n};\n\nconst Container = React.forwardRef<HTMLDivElement, ContainerProps>(\n (\n {\n className,\n size = \"xl\",\n padded = true,\n centered = true,\n asChild = false,\n ...props\n },\n ref,\n ) => {\n const Comp = asChild ? Slot : \"div\";\n\n return (\n <Comp\n ref={ref}\n className={cn(\n \"w-full\",\n sizeClasses[size],\n centered && \"mx-auto\",\n padded && \"px-4 sm:px-6 lg:px-8\",\n className,\n )}\n {...props}\n />\n );\n },\n);\n\nContainer.displayName = \"Container\";\n\nexport { Container };\n","import { useEffect, useRef } from \"react\";\nimport { tabbable } from \"tabbable\";\n\nfunction useFocusTrap(\n containerRef: React.RefObject<HTMLElement | null>,\n active: boolean,\n) {\n const restoreRef = useRef<HTMLElement | null>(null);\n\n useEffect(() => {\n if (!active) return undefined;\n\n const container = containerRef.current;\n if (!container) return undefined;\n\n restoreRef.current = document.activeElement as HTMLElement | null;\n\n const tabbableOptions = { displayCheck: \"none\" as const };\n\n const frame = requestAnimationFrame(() => {\n const focusableElements = tabbable(container, tabbableOptions);\n if (focusableElements.length > 0) {\n focusableElements[0]?.focus();\n } else {\n container.focus();\n }\n });\n\n function handleKeyDown(e: KeyboardEvent) {\n if (e.key !== \"Tab\" || !container) return;\n\n const focusableElements = tabbable(container, tabbableOptions);\n if (focusableElements.length === 0) {\n e.preventDefault();\n return;\n }\n\n const first = focusableElements[0];\n const last = focusableElements[focusableElements.length - 1];\n if (!first || !last) return;\n\n if (e.shiftKey) {\n if (document.activeElement === first) {\n e.preventDefault();\n last.focus();\n }\n } else {\n if (document.activeElement === last) {\n e.preventDefault();\n first.focus();\n }\n }\n }\n\n function handleFocusOut(e: FocusEvent) {\n const relatedTarget = e.relatedTarget as HTMLElement | null;\n if (relatedTarget && container && !container.contains(relatedTarget)) {\n const focusableElements = tabbable(container, tabbableOptions);\n if (focusableElements.length > 0) {\n focusableElements[0]?.focus();\n } else {\n container.focus();\n }\n }\n }\n\n container.addEventListener(\"keydown\", handleKeyDown);\n container.addEventListener(\"focusout\", handleFocusOut);\n\n return () => {\n cancelAnimationFrame(frame);\n container.removeEventListener(\"keydown\", handleKeyDown);\n container.removeEventListener(\"focusout\", handleFocusOut);\n\n restoreRef.current?.focus();\n restoreRef.current = null;\n };\n }, [active, containerRef]);\n}\n\nexport { useFocusTrap };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Slot } from \"@nuka/utils/slot\";\nimport { DismissButton } from \"@nuka/utils/dismiss-button\";\nimport { useControllableState } from \"@nuka/hooks/use-controllable-state\";\nimport { useEscapeKey } from \"@nuka/hooks/use-escape-key\";\nimport { Heading } from \"@nuka/components/Heading\";\nimport { Text } from \"@nuka/components/Text\";\n\nfunction useModalTitleWarning(\n displayName: string,\n titleId: string,\n open: boolean,\n): void {\n React.useEffect(() => {\n if (open && process.env.NODE_ENV !== \"production\") {\n const frame = requestAnimationFrame(() => {\n if (!document.getElementById(titleId)) {\n console.error(\n `${displayName}: a <${displayName}Title> is required for accessible labeling. ` +\n `Add a <${displayName}Title> inside <${displayName}Content>.`,\n );\n }\n });\n return () => cancelAnimationFrame(frame);\n }\n return undefined;\n }, [open, displayName, titleId]);\n}\n\nexport interface ModalContextValue {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n titleId: string;\n descriptionId: string;\n hasDescription: boolean;\n setHasDescription: (value: boolean) => void;\n}\n\ninterface ModalPrimitiveOptions {\n displayNamePrefix: string;\n closeLabel: string;\n Context: React.Context<ModalContextValue | null>;\n useContext: () => ModalContextValue;\n}\n\nexport interface ModalRootProps {\n children: React.ReactNode;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n}\n\nexport interface ModalTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n asChild?: boolean;\n}\n\nexport interface ModalTitleProps extends Omit<\n React.HTMLAttributes<HTMLElement>,\n \"color\"\n> {\n as?: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n}\n\nexport interface ModalDescriptionProps extends Omit<\n React.HTMLAttributes<HTMLElement>,\n \"color\"\n> {}\n\nexport interface ModalCloseProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n asChild?: boolean;\n}\n\ninterface ModalPrimitiveResult {\n Root: React.FC<ModalRootProps>;\n Trigger: React.ForwardRefExoticComponent<\n ModalTriggerProps & React.RefAttributes<HTMLButtonElement>\n >;\n Title: React.ForwardRefExoticComponent<\n ModalTitleProps & React.RefAttributes<HTMLElement>\n >;\n Description: React.ForwardRefExoticComponent<\n ModalDescriptionProps & React.RefAttributes<HTMLElement>\n >;\n Close: React.ForwardRefExoticComponent<\n ModalCloseProps & React.RefAttributes<HTMLButtonElement>\n >;\n}\n\nfunction createModalPrimitive(\n options: ModalPrimitiveOptions,\n): ModalPrimitiveResult {\n const { displayNamePrefix, closeLabel, Context, useContext } = options;\n\n function Root({\n children,\n open: controlledOpen,\n defaultOpen = false,\n onOpenChange,\n }: ModalRootProps) {\n const [open, setOpen] = useControllableState(\n controlledOpen,\n defaultOpen,\n onOpenChange,\n );\n\n const baseId = React.useId();\n const titleId = `${baseId}-title`;\n const descriptionId = `${baseId}-description`;\n const [hasDescription, setHasDescription] = React.useState(false);\n\n const contextValue = React.useMemo(\n () => ({\n open,\n onOpenChange: setOpen,\n titleId,\n descriptionId,\n hasDescription,\n setHasDescription,\n }),\n [open, setOpen, titleId, descriptionId, hasDescription],\n );\n\n return <Context value={contextValue}>{children}</Context>;\n }\n\n Root.displayName = displayNamePrefix;\n\n const Trigger = React.forwardRef<HTMLButtonElement, ModalTriggerProps>(\n ({ asChild = false, onClick, ...props }, ref) => {\n const ctx = useContext();\n const Comp = asChild ? Slot : \"button\";\n\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n ctx.onOpenChange(true);\n onClick?.(e);\n };\n\n return (\n <Comp\n ref={ref}\n type={asChild ? undefined : \"button\"}\n aria-haspopup=\"dialog\"\n aria-expanded={ctx.open}\n onClick={handleClick}\n {...props}\n />\n );\n },\n );\n\n Trigger.displayName = `${displayNamePrefix}Trigger`;\n\n const Title = React.forwardRef<HTMLElement, ModalTitleProps>(\n ({ as = \"h2\", className, ...props }, ref) => {\n const ctx = useContext();\n\n return (\n <Heading\n ref={ref}\n as={as}\n size=\"xl\"\n weight=\"semibold\"\n id={ctx.titleId}\n className={className}\n {...props}\n />\n );\n },\n );\n\n Title.displayName = `${displayNamePrefix}Title`;\n\n const Description = React.forwardRef<HTMLElement, ModalDescriptionProps>(\n ({ className, ...props }, ref) => {\n const ctx = useContext();\n\n const { setHasDescription } = ctx;\n React.useEffect(() => {\n setHasDescription(true);\n return () => setHasDescription(false);\n }, [setHasDescription]);\n\n return (\n <Text\n ref={ref}\n color=\"muted\"\n size=\"sm\"\n id={ctx.descriptionId}\n className={cn(\"mt-(--space-2)\", className)}\n {...props}\n />\n );\n },\n );\n\n Description.displayName = `${displayNamePrefix}Description`;\n\n const Close = React.forwardRef<HTMLButtonElement, ModalCloseProps>(\n ({ asChild = false, onClick, ...props }, ref) => {\n const ctx = useContext();\n\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n ctx.onOpenChange(false);\n onClick?.(e);\n };\n\n if (asChild) {\n return <Slot ref={ref} onClick={handleClick} {...props} />;\n }\n\n return (\n <DismissButton\n {...props}\n ref={ref}\n onClick={() => ctx.onOpenChange(false)}\n label={closeLabel}\n />\n );\n },\n );\n\n Close.displayName = `${displayNamePrefix}Close`;\n\n return { Root, Trigger, Title, Description, Close };\n}\n\nexport { createModalPrimitive, useEscapeKey, useModalTitleWarning };\n","import { createContext, useContext } from \"react\";\n\nexport interface DialogContextValue {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n titleId: string;\n descriptionId: string;\n hasDescription: boolean;\n setHasDescription: (value: boolean) => void;\n}\n\nconst DialogContext = createContext<DialogContextValue | null>(null);\n\nfunction useDialogContext(): DialogContextValue {\n const context = useContext(DialogContext);\n if (context === null) {\n throw new Error(\"Dialog compound components must be used within <Dialog>\");\n }\n return context;\n}\n\nexport { DialogContext, useDialogContext };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { composeRefs } from \"@nuka/utils/slot\";\nimport { Portal } from \"@nuka/utils/portal\";\nimport { DismissButton } from \"@nuka/utils/dismiss-button\";\nimport { useFocusTrap } from \"@nuka/hooks/use-focus-trap\";\nimport { useScrollLock } from \"@nuka/hooks/use-scroll-lock\";\nimport {\n createModalPrimitive,\n useEscapeKey,\n useModalTitleWarning,\n} from \"@nuka/utils/modal-primitive\";\nimport type {\n ModalRootProps,\n ModalTriggerProps,\n ModalTitleProps,\n ModalDescriptionProps,\n ModalCloseProps,\n} from \"@nuka/utils/modal-primitive\";\nimport {\n DialogContext,\n useDialogContext,\n} from \"@nuka/components/Dialog/Dialog.context\";\n\nconst {\n Root: Dialog,\n Trigger: DialogTrigger,\n Title: DialogTitle,\n Description: DialogDescription,\n Close: DialogClose,\n} = createModalPrimitive({\n displayNamePrefix: \"Dialog\",\n closeLabel: \"Close dialog\",\n Context: DialogContext,\n useContext: useDialogContext,\n});\n\nexport type DialogProps = ModalRootProps;\nexport type DialogTriggerProps = ModalTriggerProps;\nexport type DialogTitleProps = ModalTitleProps;\nexport type DialogDescriptionProps = ModalDescriptionProps;\nexport type DialogCloseProps = ModalCloseProps;\n\nexport interface DialogContentProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst DialogContent = React.forwardRef<HTMLDivElement, DialogContentProps>(\n ({ className, children, ...props }, ref) => {\n const ctx = useDialogContext();\n const panelRef = React.useRef<HTMLDivElement>(null);\n const composedRef = composeRefs(ref, panelRef);\n\n useFocusTrap(panelRef, ctx.open);\n useScrollLock(ctx.open);\n useModalTitleWarning(\"Dialog\", ctx.titleId, ctx.open);\n useEscapeKey(() => ctx.onOpenChange(false), ctx.open);\n\n if (!ctx.open) return null;\n\n return (\n <Portal>\n <div\n className={cn(\n \"fixed inset-0 z-(--nuka-z-modal)\",\n \"bg-(--nuka-bg-overlay)\",\n \"data-[state=open]:animate-[nuka-dialog-overlay-enter_150ms_ease-out]\",\n )}\n data-state=\"open\"\n onClick={() => ctx.onOpenChange(false)}\n aria-hidden=\"true\"\n />\n <div\n ref={composedRef}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={ctx.titleId}\n aria-describedby={ctx.hasDescription ? ctx.descriptionId : undefined}\n tabIndex={-1}\n data-state=\"open\"\n className={cn(\n \"fixed z-(--nuka-z-modal)\",\n \"left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2\",\n \"w-full max-w-lg\",\n \"rounded-(--radius-xl) border border-(--nuka-border-base)\",\n \"bg-(--nuka-bg-base) shadow-md\",\n \"p-(--space-6)\",\n \"data-[state=open]:animate-[nuka-dialog-enter_150ms_ease-out]\",\n // Programmatic focus via useFocusTrap; :focus-visible does not activate, so this is inert\n \"focus-visible:outline-none\",\n className,\n )}\n {...props}\n >\n <DismissButton\n onClick={() => ctx.onOpenChange(false)}\n label=\"Close dialog\"\n className=\"absolute top-(--space-4) right-(--space-4) text-(--nuka-text-muted)\"\n />\n {children}\n </div>\n </Portal>\n );\n },\n);\n\nDialogContent.displayName = \"DialogContent\";\n\nexport {\n Dialog,\n DialogTrigger,\n DialogContent,\n DialogTitle,\n DialogDescription,\n DialogClose,\n};\n","import * as React from \"react\";\nimport type { useFloating, useInteractions } from \"@floating-ui/react\";\n\nexport interface ContextMenuContextValue {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n refs: ReturnType<typeof useFloating>[\"refs\"];\n floatingStyles: React.CSSProperties;\n getFloatingProps: ReturnType<typeof useInteractions>[\"getFloatingProps\"];\n}\n\nconst ContextMenuContext = React.createContext<\n ContextMenuContextValue | undefined\n>(undefined);\n\nfunction useContextMenuContext(): ContextMenuContextValue {\n const context = React.useContext(ContextMenuContext);\n if (context === undefined) {\n throw new Error(\n \"useContextMenuContext must be used within a <ContextMenu> component\",\n );\n }\n return context;\n}\n\nexport { ContextMenuContext, useContextMenuContext };\n","import * as React from \"react\";\nimport {\n useFloating,\n useDismiss,\n useRole,\n useInteractions,\n offset,\n flip,\n shift,\n autoUpdate,\n} from \"@floating-ui/react\";\nimport { ContextMenuContext } from \"@nuka/components/ContextMenu/ContextMenu.context\";\nimport type { ContextMenuContextValue } from \"@nuka/components/ContextMenu/ContextMenu.context\";\n\nexport interface ContextMenuProps {\n children: React.ReactNode;\n onOpenChange?: (open: boolean) => void;\n}\n\nfunction ContextMenu({ children, onOpenChange }: ContextMenuProps) {\n const [open, setOpen] = React.useState(false);\n\n const handleOpenChange = React.useCallback(\n (next: boolean) => {\n setOpen(next);\n onOpenChange?.(next);\n },\n [onOpenChange],\n );\n\n const { refs, floatingStyles, context } = useFloating({\n open,\n onOpenChange: handleOpenChange,\n placement: \"bottom-start\",\n middleware: [offset(0), flip(), shift({ padding: 8 })],\n whileElementsMounted: autoUpdate,\n strategy: \"fixed\",\n });\n\n const dismiss = useDismiss(context);\n const role = useRole(context, { role: \"menu\" });\n\n const { getFloatingProps } = useInteractions([dismiss, role]);\n\n const contextValue: ContextMenuContextValue = React.useMemo(\n () => ({\n open,\n onOpenChange: handleOpenChange,\n refs,\n floatingStyles,\n getFloatingProps,\n }),\n [open, handleOpenChange, refs, floatingStyles, getFloatingProps],\n );\n\n return (\n <ContextMenuContext value={contextValue}>{children}</ContextMenuContext>\n );\n}\n\nContextMenu.displayName = \"ContextMenu\";\n\nexport { ContextMenu };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Slot, composeRefs } from \"@nuka/utils/slot\";\nimport { useContextMenuContext } from \"@nuka/components/ContextMenu/ContextMenu.context\";\n\nexport interface ContextMenuTriggerProps extends React.HTMLAttributes<HTMLDivElement> {\n asChild?: boolean;\n}\n\nconst ContextMenuTrigger = React.forwardRef<\n HTMLDivElement,\n ContextMenuTriggerProps\n>(\n (\n {\n asChild = false,\n children,\n onContextMenu,\n onKeyDown,\n className,\n ...props\n },\n ref,\n ) => {\n const ctx = useContextMenuContext();\n const triggerRef = React.useRef<HTMLDivElement>(null);\n const composedTriggerRef = composeRefs(ref, triggerRef);\n const Comp = asChild ? Slot : \"div\";\n\n const handleContextMenu = (e: React.MouseEvent<HTMLDivElement>) => {\n e.preventDefault();\n onContextMenu?.(e);\n\n ctx.refs.setReference({\n getBoundingClientRect: () => ({\n x: e.clientX,\n y: e.clientY,\n width: 0,\n height: 0,\n top: e.clientY,\n left: e.clientX,\n bottom: e.clientY,\n right: e.clientX,\n toJSON: () => ({}),\n }),\n });\n\n ctx.onOpenChange(true);\n };\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\n onKeyDown?.(e);\n if (e.defaultPrevented) return;\n\n const isContextMenuKey =\n e.key === \"ContextMenu\" || (e.shiftKey && e.key === \"F10\");\n\n if (isContextMenuKey) {\n e.preventDefault();\n const rect = triggerRef.current?.getBoundingClientRect();\n if (rect) {\n ctx.refs.setReference({\n getBoundingClientRect: () => ({\n x: rect.x,\n y: rect.y + rect.height,\n width: 0,\n height: 0,\n top: rect.y + rect.height,\n left: rect.x,\n bottom: rect.y + rect.height,\n right: rect.x,\n toJSON: () => ({}),\n }),\n });\n }\n ctx.onOpenChange(true);\n }\n };\n\n return (\n <Comp\n ref={composedTriggerRef}\n tabIndex={0}\n onContextMenu={handleContextMenu}\n onKeyDown={handleKeyDown}\n className={cn(\n \"rounded-(--radius-sm)\",\n \"focus-visible:outline-2 focus-visible:outline-offset-2\",\n \"focus-visible:outline-(--nuka-border-focus)\",\n className,\n )}\n {...(props as React.HTMLAttributes<HTMLDivElement>)}\n >\n {children}\n </Comp>\n );\n },\n);\n\nContextMenuTrigger.displayName = \"ContextMenuTrigger\";\n\nexport { ContextMenuTrigger };\n","import type * as React from \"react\";\nimport { useCallback, useRef } from \"react\";\n\ninterface UseMenuNavigationOptions {\n onEscape?: (() => void) | undefined;\n onTab?: (() => void) | undefined;\n}\n\ninterface ItemProps {\n tabIndex: number;\n ref: (el: HTMLElement | null) => void;\n onKeyDown: (e: React.KeyboardEvent) => void;\n}\n\ninterface UseMenuNavigationReturn {\n getItemProps: (index: number) => ItemProps;\n focusItem: (index: number) => void;\n itemsRef: React.RefObject<(HTMLElement | null)[]>;\n}\n\nfunction useMenuNavigation(\n options: UseMenuNavigationOptions = {},\n): UseMenuNavigationReturn {\n const { onEscape, onTab } = options;\n const itemsRef = useRef<(HTMLElement | null)[]>([]);\n const typeAheadBuffer = useRef(\"\");\n const typeAheadTimer = useRef<ReturnType<typeof setTimeout> | undefined>(\n undefined,\n );\n\n const getEnabledItems = useCallback(() => {\n const items = itemsRef.current;\n const result: { index: number; element: HTMLElement }[] = [];\n for (let i = 0; i < items.length; i++) {\n const el = items[i];\n if (el) {\n result.push({ index: i, element: el });\n }\n }\n return result;\n }, []);\n\n const focusItem = useCallback((index: number) => {\n const el = itemsRef.current[index];\n if (el) {\n el.focus();\n }\n }, []);\n\n const focusNextEnabled = useCallback(\n (currentIndex: number, direction: 1 | -1) => {\n const items = getEnabledItems();\n if (items.length === 0) return;\n\n const currentPos = items.findIndex((item) => item.index === currentIndex);\n if (currentPos === -1) {\n const first = items[0];\n if (first) focusItem(first.index);\n return;\n }\n\n const nextPos = (currentPos + direction + items.length) % items.length;\n const next = items[nextPos];\n if (next) focusItem(next.index);\n },\n [getEnabledItems, focusItem],\n );\n\n const focusFirst = useCallback(() => {\n const items = getEnabledItems();\n const first = items[0];\n if (first) {\n focusItem(first.index);\n }\n }, [getEnabledItems, focusItem]);\n\n const focusLast = useCallback(() => {\n const items = getEnabledItems();\n const last = items[items.length - 1];\n if (last) {\n focusItem(last.index);\n }\n }, [getEnabledItems, focusItem]);\n\n const handleTypeAhead = useCallback(\n (char: string, currentIndex: number) => {\n if (typeAheadTimer.current) {\n clearTimeout(typeAheadTimer.current);\n }\n\n typeAheadBuffer.current += char.toLowerCase();\n typeAheadTimer.current = setTimeout(() => {\n typeAheadBuffer.current = \"\";\n }, 500);\n\n const items = getEnabledItems();\n if (items.length === 0) return;\n\n const buffer = typeAheadBuffer.current;\n const currentPos = items.findIndex((item) => item.index === currentIndex);\n const startPos = currentPos === -1 ? 0 : currentPos;\n\n for (\n let offset = buffer.length === 1 ? 1 : 0;\n offset < items.length;\n offset++\n ) {\n const idx = (startPos + offset) % items.length;\n const item = items[idx];\n if (!item) continue;\n const text = (item.element.textContent || \"\").toLowerCase();\n if (text.startsWith(buffer)) {\n focusItem(item.index);\n return;\n }\n }\n },\n [getEnabledItems, focusItem],\n );\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent, index: number) => {\n switch (e.key) {\n case \"ArrowDown\": {\n e.preventDefault();\n focusNextEnabled(index, 1);\n break;\n }\n case \"ArrowUp\": {\n e.preventDefault();\n focusNextEnabled(index, -1);\n break;\n }\n case \"Home\": {\n e.preventDefault();\n focusFirst();\n break;\n }\n case \"End\": {\n e.preventDefault();\n focusLast();\n break;\n }\n case \"Escape\": {\n e.preventDefault();\n onEscape?.();\n break;\n }\n case \"Tab\": {\n onTab?.();\n break;\n }\n default: {\n if (e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey) {\n e.preventDefault();\n handleTypeAhead(e.key, index);\n }\n break;\n }\n }\n },\n [focusNextEnabled, focusFirst, focusLast, onEscape, onTab, handleTypeAhead],\n );\n\n const getItemProps = useCallback(\n (index: number): ItemProps => ({\n tabIndex: -1,\n ref: (el: HTMLElement | null) => {\n itemsRef.current[index] = el;\n },\n onKeyDown: (e: React.KeyboardEvent) => handleKeyDown(e, index),\n }),\n [handleKeyDown],\n );\n\n return { getItemProps, focusItem, itemsRef };\n}\n\nexport { useMenuNavigation };\nexport type { UseMenuNavigationOptions, UseMenuNavigationReturn };\n","import { cva } from \"@nuka/utils/variants\";\nimport type { VariantProps } from \"@nuka/utils/variants\";\n\nconst menuItemVariants = cva(\n [\n \"flex w-full items-center gap-(--space-2)\",\n \"rounded-(--radius-sm) px-(--space-2) py-(--space-1.5)\",\n \"text-sm cursor-default select-none outline-none\",\n \"focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--nuka-border-focus)\",\n \"transition-colors\",\n ],\n {\n variants: {\n intent: {\n default: \"\",\n danger: \"\",\n },\n },\n compoundVariants: [\n {\n intent: \"default\",\n className: [\"text-(--nuka-text-base)\", \"focus:bg-(--nuka-bg-muted)\"],\n },\n {\n intent: \"danger\",\n className: [\"text-(--nuka-danger-text)\", \"focus:bg-(--nuka-danger-bg)\"],\n },\n ],\n defaultVariants: {\n intent: \"default\",\n },\n },\n);\n\ntype MenuItemVariantProps = VariantProps<typeof menuItemVariants>;\n\nconst menuCheckboxItemVariants = cva([\n \"flex w-full items-center gap-(--space-2)\",\n \"rounded-(--radius-sm) px-(--space-2) py-(--space-1.5)\",\n \"text-sm cursor-default select-none outline-none\",\n \"focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--nuka-border-focus)\",\n \"transition-colors\",\n \"text-(--nuka-text-base)\",\n \"focus:bg-(--nuka-bg-muted)\",\n]);\n\nconst menuRadioItemVariants = cva([\n \"flex w-full items-center gap-(--space-2)\",\n \"rounded-(--radius-sm) px-(--space-2) py-(--space-1.5)\",\n \"text-sm cursor-default select-none outline-none\",\n \"focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--nuka-border-focus)\",\n \"transition-colors\",\n \"text-(--nuka-text-base)\",\n \"focus:bg-(--nuka-bg-muted)\",\n]);\n\nconst menuSeparatorVariants = cva([\n \"h-px my-(--space-1) mx-(--space-2)\",\n \"bg-(--nuka-border-base)\",\n]);\n\nconst menuLabelVariants = cva([\n \"px-(--space-2) py-(--space-1.5)\",\n \"text-xs font-semibold\",\n \"text-(--nuka-text-muted)\",\n \"select-none\",\n]);\n\nconst menuContentVariants = cva([\n \"z-(--nuka-z-dropdown) min-w-48 overflow-hidden\",\n \"rounded-(--radius-md) border border-(--nuka-border-base)\",\n \"bg-(--nuka-bg-base) shadow-md\",\n \"p-(--space-1)\",\n \"focus:outline-none\",\n]);\n\nexport {\n menuItemVariants,\n menuCheckboxItemVariants,\n menuRadioItemVariants,\n menuSeparatorVariants,\n menuLabelVariants,\n menuContentVariants,\n};\nexport type { MenuItemVariantProps };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { menuItemVariants } from \"@nuka/components/Menu/menuItemVariants\";\nimport type { MenuItemVariantProps } from \"@nuka/components/Menu/menuItemVariants\";\n\nexport interface MenuItemBaseProps\n extends React.HTMLAttributes<HTMLDivElement>, MenuItemVariantProps {\n disabled?: boolean;\n onSelect?: () => void;\n onClose?: () => void;\n}\n\nconst MenuItemBase = React.forwardRef<HTMLDivElement, MenuItemBaseProps>(\n (\n {\n className,\n intent,\n disabled = false,\n onSelect,\n onClose,\n children,\n onClick,\n onKeyDown,\n ...props\n },\n ref,\n ) => {\n const handleActivate = () => {\n if (disabled) return;\n onSelect?.();\n onClose?.();\n };\n\n const handleClick = (e: React.MouseEvent<HTMLDivElement>) => {\n onClick?.(e);\n handleActivate();\n };\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\n onKeyDown?.(e);\n if (e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n handleActivate();\n }\n };\n\n return (\n <div\n ref={ref}\n role=\"menuitem\"\n aria-disabled={disabled || undefined}\n className={cn(\n menuItemVariants({ intent }),\n disabled && \"opacity-50 pointer-events-none\",\n className,\n )}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n {...props}\n >\n {children}\n </div>\n );\n },\n);\n\nMenuItemBase.displayName = \"MenuItemBase\";\n\nexport { MenuItemBase };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Icon } from \"@nuka/components/Icon\";\nimport { menuCheckboxItemVariants } from \"@nuka/components/Menu/menuItemVariants\";\n\nexport interface MenuCheckboxItemBaseProps extends React.HTMLAttributes<HTMLDivElement> {\n checked: boolean;\n onCheckedChange?: (checked: boolean) => void;\n disabled?: boolean;\n onClose?: () => void;\n}\n\nconst CheckIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M20 6 9 17l-5-5\" />\n </svg>\n);\n\nconst MenuCheckboxItemBase = React.forwardRef<\n HTMLDivElement,\n MenuCheckboxItemBaseProps\n>(\n (\n {\n className,\n checked,\n onCheckedChange,\n disabled = false,\n onClose,\n children,\n onClick,\n onKeyDown,\n ...props\n },\n ref,\n ) => {\n const handleActivate = () => {\n if (disabled) return;\n onCheckedChange?.(!checked);\n onClose?.();\n };\n\n const handleClick = (e: React.MouseEvent<HTMLDivElement>) => {\n onClick?.(e);\n handleActivate();\n };\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\n onKeyDown?.(e);\n if (e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n handleActivate();\n }\n };\n\n return (\n <div\n ref={ref}\n role=\"menuitemcheckbox\"\n aria-checked={checked}\n aria-disabled={disabled || undefined}\n className={cn(\n menuCheckboxItemVariants(),\n disabled && \"opacity-50 pointer-events-none\",\n className,\n )}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n {...props}\n >\n <span className=\"inline-flex size-4 items-center justify-center shrink-0\">\n {checked && (\n <Icon size=\"sm\">\n <CheckIcon />\n </Icon>\n )}\n </span>\n {children}\n </div>\n );\n },\n);\n\nMenuCheckboxItemBase.displayName = \"MenuCheckboxItemBase\";\n\nexport { MenuCheckboxItemBase };\n","import * as React from \"react\";\n\nexport interface MenuRadioGroupBaseProps extends React.HTMLAttributes<HTMLDivElement> {\n value: string;\n onValueChange?: (value: string) => void;\n \"aria-label\"?: string;\n \"aria-labelledby\"?: string;\n}\n\nconst MenuRadioGroupContext = React.createContext<\n | {\n value: string;\n onValueChange?: ((value: string) => void) | undefined;\n }\n | undefined\n>(undefined);\n\nfunction useMenuRadioGroup() {\n const ctx = React.useContext(MenuRadioGroupContext);\n if (ctx === undefined) {\n throw new Error(\"useMenuRadioGroup must be used within a MenuRadioGroup\");\n }\n return ctx;\n}\n\nconst MenuRadioGroupBase = React.forwardRef<\n HTMLDivElement,\n MenuRadioGroupBaseProps\n>(({ value, onValueChange, children, ...props }, ref) => {\n const ctxValue = React.useMemo(\n () => ({ value, onValueChange }),\n [value, onValueChange],\n );\n\n return (\n <MenuRadioGroupContext value={ctxValue}>\n <div ref={ref} role=\"group\" {...props}>\n {children}\n </div>\n </MenuRadioGroupContext>\n );\n});\n\nMenuRadioGroupBase.displayName = \"MenuRadioGroupBase\";\n\nexport { MenuRadioGroupBase, MenuRadioGroupContext, useMenuRadioGroup };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Icon } from \"@nuka/components/Icon\";\nimport { menuRadioItemVariants } from \"@nuka/components/Menu/menuItemVariants\";\nimport { useMenuRadioGroup } from \"@nuka/components/Menu/MenuRadioGroupBase\";\n\nexport interface MenuRadioItemBaseProps extends React.HTMLAttributes<HTMLDivElement> {\n value: string;\n disabled?: boolean;\n onClose?: () => void;\n}\n\nconst DotIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"4\" />\n </svg>\n);\n\nconst MenuRadioItemBase = React.forwardRef<\n HTMLDivElement,\n MenuRadioItemBaseProps\n>(\n (\n {\n className,\n value,\n disabled = false,\n onClose,\n children,\n onClick,\n onKeyDown,\n ...props\n },\n ref,\n ) => {\n const radioGroup = useMenuRadioGroup();\n const checked = radioGroup.value === value;\n\n const handleActivate = () => {\n if (disabled) return;\n radioGroup.onValueChange?.(value);\n onClose?.();\n };\n\n const handleClick = (e: React.MouseEvent<HTMLDivElement>) => {\n onClick?.(e);\n handleActivate();\n };\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\n onKeyDown?.(e);\n if (e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n handleActivate();\n }\n };\n\n return (\n <div\n ref={ref}\n role=\"menuitemradio\"\n aria-checked={checked}\n aria-disabled={disabled || undefined}\n className={cn(\n menuRadioItemVariants(),\n disabled && \"opacity-50 pointer-events-none\",\n className,\n )}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n {...props}\n >\n <span className=\"inline-flex size-4 items-center justify-center shrink-0\">\n {checked && (\n <Icon size=\"sm\">\n <DotIcon />\n </Icon>\n )}\n </span>\n {children}\n </div>\n );\n },\n);\n\nMenuRadioItemBase.displayName = \"MenuRadioItemBase\";\n\nexport { MenuRadioItemBase };\n","import * as React from \"react\";\nimport { composeRefs } from \"@nuka/utils/slot\";\nimport { MenuItemBase } from \"@nuka/components/Menu/MenuItemBase\";\nimport type { MenuItemBaseProps } from \"@nuka/components/Menu/MenuItemBase\";\nimport { MenuCheckboxItemBase } from \"@nuka/components/Menu/MenuCheckboxItemBase\";\nimport type { MenuCheckboxItemBaseProps } from \"@nuka/components/Menu/MenuCheckboxItemBase\";\nimport { MenuRadioItemBase } from \"@nuka/components/Menu/MenuRadioItemBase\";\nimport type { MenuRadioItemBaseProps } from \"@nuka/components/Menu/MenuRadioItemBase\";\n\nexport interface MenuItemContextValue {\n getItemProps: (index: number) => {\n tabIndex: number;\n ref: (el: HTMLElement | null) => void;\n onKeyDown: (e: React.KeyboardEvent) => void;\n };\n indexRef: React.RefObject<number>;\n close: () => void;\n onArrowLeft?: (() => void) | undefined;\n onArrowRight?: (() => void) | undefined;\n}\n\nconst MenuItemContext = React.createContext<MenuItemContextValue | undefined>(\n undefined,\n);\n\nfunction useMenuItemContext(): MenuItemContextValue {\n const ctx = React.useContext(MenuItemContext);\n if (ctx === undefined) {\n throw new Error(\"Menu item must be used within a MenuContent component\");\n }\n return ctx;\n}\n\nexport function useAutoFocusFirstItem(\n open: boolean,\n focusItem: (index: number) => void,\n itemsRef: React.RefObject<(HTMLElement | null)[]>,\n itemIndexRef: React.RefObject<number>,\n): void {\n React.useEffect(() => {\n if (open) {\n itemIndexRef.current = 0;\n const frame = requestAnimationFrame(() => {\n const items = itemsRef.current;\n for (let i = 0; i < items.length; i++) {\n if (items[i]) {\n focusItem(i);\n break;\n }\n }\n });\n return () => cancelAnimationFrame(frame);\n }\n itemsRef.current = [];\n return undefined;\n }, [open, focusItem, itemsRef, itemIndexRef]);\n}\n\nfunction createMenuItemKeyHandler(\n itemCtx: MenuItemContextValue,\n navProps: ReturnType<MenuItemContextValue[\"getItemProps\"]>,\n onKeyDown: ((e: React.KeyboardEvent<HTMLDivElement>) => void) | undefined,\n) {\n return (e: React.KeyboardEvent<HTMLDivElement>) => {\n if (e.key === \"ArrowLeft\" && itemCtx.onArrowLeft) {\n e.preventDefault();\n itemCtx.onArrowLeft();\n return;\n }\n if (e.key === \"ArrowRight\" && itemCtx.onArrowRight) {\n e.preventDefault();\n itemCtx.onArrowRight();\n return;\n }\n navProps.onKeyDown(e);\n onKeyDown?.(e);\n };\n}\n\nexport interface MenuItemWithNavProps extends Omit<\n MenuItemBaseProps,\n \"onClose\"\n> {}\n\nconst MenuItemWithNav = React.forwardRef<HTMLDivElement, MenuItemWithNavProps>(\n ({ onKeyDown, ...props }, ref) => {\n const itemCtx = useMenuItemContext();\n const index = itemCtx.indexRef.current++;\n const navProps = itemCtx.getItemProps(index);\n const composedRef = composeRefs(ref, navProps.ref);\n\n return (\n <MenuItemBase\n ref={composedRef}\n tabIndex={navProps.tabIndex}\n onKeyDown={createMenuItemKeyHandler(itemCtx, navProps, onKeyDown)}\n onClose={itemCtx.close}\n {...props}\n />\n );\n },\n);\n\nMenuItemWithNav.displayName = \"MenuItemWithNav\";\n\nexport interface MenuCheckboxItemWithNavProps extends Omit<\n MenuCheckboxItemBaseProps,\n \"onClose\"\n> {}\n\nconst MenuCheckboxItemWithNav = React.forwardRef<\n HTMLDivElement,\n MenuCheckboxItemWithNavProps\n>(({ onKeyDown, ...props }, ref) => {\n const itemCtx = useMenuItemContext();\n const index = itemCtx.indexRef.current++;\n const navProps = itemCtx.getItemProps(index);\n const composedRef = composeRefs(ref, navProps.ref);\n\n return (\n <MenuCheckboxItemBase\n ref={composedRef}\n tabIndex={navProps.tabIndex}\n onKeyDown={createMenuItemKeyHandler(itemCtx, navProps, onKeyDown)}\n onClose={itemCtx.close}\n {...props}\n />\n );\n});\n\nMenuCheckboxItemWithNav.displayName = \"MenuCheckboxItemWithNav\";\n\nexport interface MenuRadioItemWithNavProps extends Omit<\n MenuRadioItemBaseProps,\n \"onClose\"\n> {}\n\nconst MenuRadioItemWithNav = React.forwardRef<\n HTMLDivElement,\n MenuRadioItemWithNavProps\n>(({ onKeyDown, ...props }, ref) => {\n const itemCtx = useMenuItemContext();\n const index = itemCtx.indexRef.current++;\n const navProps = itemCtx.getItemProps(index);\n const composedRef = composeRefs(ref, navProps.ref);\n\n return (\n <MenuRadioItemBase\n ref={composedRef}\n tabIndex={navProps.tabIndex}\n onKeyDown={createMenuItemKeyHandler(itemCtx, navProps, onKeyDown)}\n onClose={itemCtx.close}\n {...props}\n />\n );\n});\n\nMenuRadioItemWithNav.displayName = \"MenuRadioItemWithNav\";\n\nexport {\n MenuItemContext,\n useMenuItemContext,\n MenuItemWithNav,\n MenuCheckboxItemWithNav,\n MenuRadioItemWithNav,\n};\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { composeRefs } from \"@nuka/utils/slot\";\nimport { useMenuNavigation } from \"@nuka/hooks/use-menu-navigation\";\nimport { Portal } from \"@nuka/utils/portal\";\nimport { useContextMenuContext } from \"@nuka/components/ContextMenu/ContextMenu.context\";\nimport { menuContentVariants } from \"@nuka/components/Menu/menuItemVariants\";\nimport {\n MenuItemContext,\n useAutoFocusFirstItem,\n} from \"@nuka/components/Menu/MenuContentBase\";\n\nexport interface ContextMenuContentProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst ContextMenuContent = React.forwardRef<\n HTMLDivElement,\n ContextMenuContentProps\n>(({ className, children, ...props }, ref) => {\n const ctx = useContextMenuContext();\n const contentRef = React.useRef<HTMLDivElement>(null);\n const composedRef = composeRefs(ref, contentRef, ctx.refs.setFloating);\n\n const { getItemProps, focusItem, itemsRef } = useMenuNavigation({\n onEscape: () => ctx.onOpenChange(false),\n onTab: () => ctx.onOpenChange(false),\n });\n\n const itemIndexRef = React.useRef(0);\n\n useAutoFocusFirstItem(ctx.open, focusItem, itemsRef, itemIndexRef);\n\n if (!ctx.open) return null;\n\n itemIndexRef.current = 0;\n\n const floatingProps = ctx.getFloatingProps(props);\n\n return (\n <Portal>\n <MenuItemContext\n value={{\n getItemProps,\n indexRef: itemIndexRef,\n close: () => ctx.onOpenChange(false),\n }}\n >\n <div\n ref={composedRef}\n style={ctx.floatingStyles}\n data-state=\"open\"\n {...floatingProps}\n className={cn(menuContentVariants(), className)}\n >\n {children}\n </div>\n </MenuItemContext>\n </Portal>\n );\n});\n\nContextMenuContent.displayName = \"ContextMenuContent\";\n\nexport { ContextMenuContent };\n","import * as React from \"react\";\nimport { MenuItemWithNav } from \"@nuka/components/Menu/MenuContentBase\";\nimport type { MenuItemWithNavProps } from \"@nuka/components/Menu/MenuContentBase\";\n\nexport type ContextMenuItemProps = MenuItemWithNavProps;\n\nconst ContextMenuItem = React.forwardRef<HTMLDivElement, ContextMenuItemProps>(\n (props, ref) => <MenuItemWithNav ref={ref} {...props} />,\n);\n\nContextMenuItem.displayName = \"ContextMenuItem\";\n\nexport { ContextMenuItem };\n","import * as React from \"react\";\nimport { MenuCheckboxItemWithNav } from \"@nuka/components/Menu/MenuContentBase\";\nimport type { MenuCheckboxItemWithNavProps } from \"@nuka/components/Menu/MenuContentBase\";\n\nexport type ContextMenuCheckboxItemProps = MenuCheckboxItemWithNavProps;\n\nconst ContextMenuCheckboxItem = React.forwardRef<\n HTMLDivElement,\n ContextMenuCheckboxItemProps\n>((props, ref) => <MenuCheckboxItemWithNav ref={ref} {...props} />);\n\nContextMenuCheckboxItem.displayName = \"ContextMenuCheckboxItem\";\n\nexport { ContextMenuCheckboxItem };\n","import * as React from \"react\";\nimport { MenuRadioGroupBase } from \"@nuka/components/Menu/MenuRadioGroupBase\";\nimport type { MenuRadioGroupBaseProps } from \"@nuka/components/Menu/MenuRadioGroupBase\";\n\nexport interface ContextMenuRadioGroupProps extends MenuRadioGroupBaseProps {}\n\nconst ContextMenuRadioGroup = React.forwardRef<\n HTMLDivElement,\n ContextMenuRadioGroupProps\n>((props, ref) => <MenuRadioGroupBase ref={ref} {...props} />);\n\nContextMenuRadioGroup.displayName = \"ContextMenuRadioGroup\";\n\nexport { ContextMenuRadioGroup };\n","import * as React from \"react\";\nimport { MenuRadioItemWithNav } from \"@nuka/components/Menu/MenuContentBase\";\nimport type { MenuRadioItemWithNavProps } from \"@nuka/components/Menu/MenuContentBase\";\n\nexport type ContextMenuRadioItemProps = MenuRadioItemWithNavProps;\n\nconst ContextMenuRadioItem = React.forwardRef<\n HTMLDivElement,\n ContextMenuRadioItemProps\n>((props, ref) => <MenuRadioItemWithNav ref={ref} {...props} />);\n\nContextMenuRadioItem.displayName = \"ContextMenuRadioItem\";\n\nexport { ContextMenuRadioItem };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { menuSeparatorVariants } from \"@nuka/components/Menu/menuItemVariants\";\n\nconst MenuSeparatorBase = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n role=\"separator\"\n className={cn(menuSeparatorVariants(), className)}\n {...props}\n />\n));\n\nMenuSeparatorBase.displayName = \"MenuSeparatorBase\";\n\nexport { MenuSeparatorBase };\n","import * as React from \"react\";\nimport { MenuSeparatorBase } from \"@nuka/components/Menu/MenuSeparatorBase\";\n\nexport interface ContextMenuSeparatorProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst ContextMenuSeparator = React.forwardRef<\n HTMLDivElement,\n ContextMenuSeparatorProps\n>((props, ref) => <MenuSeparatorBase ref={ref} {...props} />);\n\nContextMenuSeparator.displayName = \"ContextMenuSeparator\";\n\nexport { ContextMenuSeparator };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { menuLabelVariants } from \"@nuka/components/Menu/menuItemVariants\";\n\nconst MenuLabelBase = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, children, ...props }, ref) => (\n <div ref={ref} className={cn(menuLabelVariants(), className)} {...props}>\n {children}\n </div>\n));\n\nMenuLabelBase.displayName = \"MenuLabelBase\";\n\nexport { MenuLabelBase };\n","import * as React from \"react\";\nimport { MenuLabelBase } from \"@nuka/components/Menu/MenuLabelBase\";\n\nexport interface ContextMenuLabelProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst ContextMenuLabel = React.forwardRef<\n HTMLDivElement,\n ContextMenuLabelProps\n>((props, ref) => <MenuLabelBase ref={ref} {...props} />);\n\nContextMenuLabel.displayName = \"ContextMenuLabel\";\n\nexport { ContextMenuLabel };\n","// Shared base classes for field-type form controls (Input, Textarea).\n// Each consumer spreads this into its own cva() base array and appends\n// component-specific classes (e.g. read-only styles, resize behavior).\nconst fieldBaseClasses = [\n \"w-full\",\n \"rounded-(--radius-md)\",\n \"border\",\n \"bg-(--nuka-input-bg)\",\n \"text-(--nuka-text-base)\",\n \"placeholder:text-(--nuka-text-muted)\",\n \"focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--nuka-border-focus)\",\n \"disabled:cursor-not-allowed disabled:opacity-50\",\n \"transition-colors duration-150\",\n];\n\nexport { fieldBaseClasses };\n","import { cva, type VariantProps } from \"@nuka/utils/variants\";\nimport { fieldBaseClasses } from \"@nuka/utils/field-base\";\n\nexport const inputVariants = cva(\n [\n ...fieldBaseClasses,\n \"read-only:bg-(--nuka-input-bg-readonly) read-only:cursor-default\",\n ],\n {\n variants: {\n intent: {\n default:\n \"border-(--nuka-input-border) hover:border-(--nuka-input-border-hover)\",\n danger: \"border-(--nuka-danger-border)\",\n success: \"border-(--nuka-success-border)\",\n warning: \"border-(--nuka-warning-border)\",\n },\n size: {\n sm: \"px-(--space-3) py-(--space-2) text-xs\",\n md: \"px-(--space-4) py-(--space-3) text-sm\",\n lg: \"px-(--space-6) py-(--space-4) text-base\",\n },\n },\n defaultVariants: {\n intent: \"default\",\n size: \"md\",\n },\n },\n);\n\nexport type InputVariantProps = VariantProps<typeof inputVariants>;\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { useFormFieldProps } from \"@nuka/hooks/use-form-field-props\";\nimport {\n inputVariants,\n type InputVariantProps,\n} from \"@nuka/components/Input/Input.variants\";\n\nexport interface InputProps\n extends\n Omit<React.InputHTMLAttributes<HTMLInputElement>, \"size\">,\n InputVariantProps {}\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, intent, size, id, ...props }, ref) => {\n const field = useFormFieldProps({\n id,\n \"aria-invalid\": props[\"aria-invalid\"],\n \"aria-describedby\": props[\"aria-describedby\"],\n \"aria-required\": props[\"aria-required\"],\n });\n\n const ariaInvalid =\n field.ariaInvalid ?? (intent === \"danger\" ? true : undefined);\n\n return (\n <input\n ref={ref}\n id={field.resolvedId}\n className={cn(inputVariants({ intent, size }), className)}\n {...props}\n aria-invalid={ariaInvalid}\n aria-describedby={field.ariaDescribedBy}\n aria-required={field.ariaRequired}\n />\n );\n },\n);\n\nInput.displayName = \"Input\";\n\nexport { Input, inputVariants };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Text } from \"@nuka/components/Text\";\n\nexport interface EmptyStateProps extends React.HTMLAttributes<HTMLDivElement> {\n illustration?: React.ReactNode;\n icon?: React.ReactNode;\n heading: string;\n description?: string;\n action?: React.ReactNode;\n}\n\nconst EmptyState = React.forwardRef<HTMLDivElement, EmptyStateProps>(\n (\n {\n className,\n illustration,\n icon,\n heading,\n description,\n action,\n children,\n ...props\n },\n ref,\n ) => {\n const visual = illustration ?? icon ?? null;\n\n return (\n <div\n ref={ref}\n className={cn(\n \"flex flex-col items-center justify-center text-center\",\n \"gap-(--space-4)\",\n \"py-(--space-12) px-(--space-6)\",\n className,\n )}\n {...props}\n >\n {visual && (\n <div className=\"flex items-center justify-center text-(--nuka-text-muted)\">\n {visual}\n </div>\n )}\n <div className=\"flex flex-col gap-(--space-2) max-w-sm\">\n <Text as=\"p\" size=\"md\" weight=\"semibold\">\n {heading}\n </Text>\n {description != null && (\n <Text as=\"p\" size=\"sm\" color=\"muted\">\n {description}\n </Text>\n )}\n </div>\n {action && <div>{action}</div>}\n {children}\n </div>\n );\n },\n);\n\nEmptyState.displayName = \"EmptyState\";\n\nexport { EmptyState };\n","import { createContext, useContext } from \"react\";\n\nexport interface TableContextValue {\n variant: \"default\" | \"bordered\";\n}\n\nconst TableContext = createContext<TableContextValue>({ variant: \"default\" });\n\nfunction useTableContext(): TableContextValue {\n return useContext(TableContext);\n}\n\nexport { TableContext, useTableContext };\n","import { cva, type VariantProps } from \"@nuka/utils/variants\";\n\nexport const tableVariants = cva([\"overflow-x-auto\"], {\n variants: {\n variant: {\n default: \"\",\n bordered: [\"border border-(--nuka-border-base)\", \"rounded-(--radius-lg)\"],\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n});\n\nexport type TableVariantProps = VariantProps<typeof tableVariants>;\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { TableContext } from \"@nuka/components/Table/Table.context\";\nimport type { TableContextValue } from \"@nuka/components/Table/Table.context\";\nimport {\n tableVariants,\n type TableVariantProps,\n} from \"@nuka/components/Table/Table.variants\";\n\nexport interface TableProps\n extends React.HTMLAttributes<HTMLDivElement>, TableVariantProps {\n caption: string;\n}\n\n// Ref forwards to the outer <div> wrapper, not the inner <table>.\n// Consumers who need the <table> element directly can use a callback ref\n// on a child or query the DOM. This is an acceptable tradeoff for the\n// overflow-x-auto scroll wrapper pattern.\nconst Table = React.forwardRef<HTMLDivElement, TableProps>(\n ({ caption, variant = \"default\", className, children, ...props }, ref) => {\n const contextValue: TableContextValue = React.useMemo(\n () => ({ variant: variant ?? \"default\" }),\n [variant],\n );\n\n return (\n <TableContext value={contextValue}>\n <div\n ref={ref}\n data-variant={variant}\n className={cn(tableVariants({ variant }), className)}\n {...props}\n >\n <table className=\"w-full border-collapse text-sm\">\n <caption className=\"sr-only\">{caption}</caption>\n {children}\n </table>\n </div>\n </TableContext>\n );\n },\n);\n\nTable.displayName = \"Table\";\n\nexport { Table };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\n\nexport interface TableHeaderProps extends React.HTMLAttributes<HTMLTableSectionElement> {}\n\nconst TableHeader = React.forwardRef<HTMLTableSectionElement, TableHeaderProps>(\n ({ className, ...props }, ref) => (\n <thead\n ref={ref}\n className={cn(\"border-b border-(--nuka-border-base)\", className)}\n {...props}\n />\n ),\n);\n\nTableHeader.displayName = \"TableHeader\";\n\nexport { TableHeader };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\n\nexport interface TableBodyProps extends React.HTMLAttributes<HTMLTableSectionElement> {}\n\nconst TableBody = React.forwardRef<HTMLTableSectionElement, TableBodyProps>(\n ({ className, ...props }, ref) => (\n <tbody ref={ref} className={cn(className)} {...props} />\n ),\n);\n\nTableBody.displayName = \"TableBody\";\n\nexport { TableBody };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\n\nexport interface TableFooterProps extends React.HTMLAttributes<HTMLTableSectionElement> {}\n\nconst TableFooter = React.forwardRef<HTMLTableSectionElement, TableFooterProps>(\n ({ className, ...props }, ref) => (\n <tfoot\n ref={ref}\n className={cn(\n \"border-t border-(--nuka-border-base)\",\n \"bg-(--nuka-bg-subtle)\",\n \"text-(--nuka-text-muted) font-medium\",\n className,\n )}\n {...props}\n />\n ),\n);\n\nTableFooter.displayName = \"TableFooter\";\n\nexport { TableFooter };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\n\nexport type TableRowIntent = \"default\" | \"danger\" | \"success\" | \"warning\";\n\nconst rowIntentClasses: Record<TableRowIntent, string> = {\n default: \"\",\n danger: \"bg-(--nuka-danger-bg)\",\n success: \"bg-(--nuka-success-bg)\",\n warning: \"bg-(--nuka-warning-bg)\",\n};\n\nexport interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement> {\n intent?: TableRowIntent;\n selected?: boolean;\n}\n\nconst TableRow = React.forwardRef<HTMLTableRowElement, TableRowProps>(\n ({ intent = \"default\", selected = false, className, ...props }, ref) => (\n <tr\n ref={ref}\n aria-selected={selected ? true : undefined}\n className={cn(\n \"border-b border-(--nuka-border-base) last:border-b-0\",\n // Intent background first, then selected background.\n // cn() uses tailwind-merge: the last bg-* class wins.\n rowIntentClasses[intent],\n selected && \"bg-(--nuka-accent-bg-subtle)\",\n className,\n )}\n {...props}\n />\n ),\n);\n\nTableRow.displayName = \"TableRow\";\n\nexport { TableRow };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Icon } from \"@nuka/components/Icon\";\nimport { useTableContext } from \"@nuka/components/Table/Table.context\";\n\nconst ariaSortMap = {\n asc: \"ascending\",\n desc: \"descending\",\n none: \"none\",\n} as const;\n\nconst SortAscIcon = () => (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M12 19V5\" />\n <path d=\"M5 12l7-7 7 7\" />\n </svg>\n);\n\nconst SortDescIcon = () => (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M12 5v14\" />\n <path d=\"M19 12l-7 7-7-7\" />\n </svg>\n);\n\nexport type SortDirection = \"asc\" | \"desc\" | \"none\";\n\nexport interface TableHeadProps extends React.ThHTMLAttributes<HTMLTableCellElement> {\n sortable?: boolean;\n sortDirection?: SortDirection;\n onSort?: () => void;\n}\n\nconst TableHead = React.forwardRef<HTMLTableCellElement, TableHeadProps>(\n (\n {\n sortable = false,\n sortDirection = \"none\",\n onSort,\n className,\n children,\n ...props\n },\n ref,\n ) => {\n const { variant } = useTableContext();\n const isBordered = variant === \"bordered\";\n\n return (\n <th\n ref={ref}\n scope=\"col\"\n aria-sort={sortable ? ariaSortMap[sortDirection] : undefined}\n className={cn(\n \"text-left font-medium text-(--nuka-text-muted)\",\n \"px-(--space-4) py-(--space-3)\",\n isBordered && \"border-r border-(--nuka-border-base) last:border-r-0\",\n className,\n )}\n {...props}\n >\n {sortable ? (\n <button\n type=\"button\"\n onClick={onSort}\n className={cn(\n \"group inline-flex items-center gap-(--space-1)\",\n \"rounded-(--radius-sm)\",\n \"-mx-(--space-1) px-(--space-1)\",\n \"hover:bg-(--nuka-bg-muted)\",\n \"focus-visible:outline-2 focus-visible:outline-offset-2\",\n \"focus-visible:outline-(--nuka-border-focus)\",\n )}\n >\n {children}\n <Icon size=\"sm\">\n {sortDirection === \"desc\" ? (\n <SortDescIcon />\n ) : (\n <span\n className={cn(\n sortDirection === \"none\" &&\n \"opacity-0 group-hover:opacity-50\",\n )}\n >\n <SortAscIcon />\n </span>\n )}\n </Icon>\n </button>\n ) : (\n children\n )}\n </th>\n );\n },\n);\n\nTableHead.displayName = \"TableHead\";\n\nexport { TableHead };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { useTableContext } from \"@nuka/components/Table/Table.context\";\n\nexport interface TableCellProps extends React.TdHTMLAttributes<HTMLTableCellElement> {}\n\nconst TableCell = React.forwardRef<HTMLTableCellElement, TableCellProps>(\n ({ className, ...props }, ref) => {\n const { variant } = useTableContext();\n const isBordered = variant === \"bordered\";\n\n return (\n <td\n ref={ref}\n className={cn(\n \"px-(--space-4) py-(--space-3) align-middle\",\n isBordered && \"border-r border-(--nuka-border-base) last:border-r-0\",\n className,\n )}\n {...props}\n />\n );\n },\n);\n\nTableCell.displayName = \"TableCell\";\n\nexport { TableCell };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\n\nexport interface PaginationProps extends React.HTMLAttributes<HTMLElement> {\n \"aria-label\"?: string;\n}\n\nconst Pagination = React.forwardRef<HTMLElement, PaginationProps>(\n ({ \"aria-label\": ariaLabel = \"Pagination\", className, ...props }, ref) => (\n <nav\n ref={ref}\n aria-label={ariaLabel}\n className={cn(\"mx-auto flex w-full justify-center\", className)}\n {...props}\n />\n ),\n);\n\nPagination.displayName = \"Pagination\";\n\nexport { Pagination };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\n\nexport interface PaginationContentProps extends React.HTMLAttributes<HTMLUListElement> {}\n\nconst PaginationContent = React.forwardRef<\n HTMLUListElement,\n PaginationContentProps\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n className={cn(\"flex items-center gap-(--space-1)\", \"list-none\", className)}\n {...props}\n />\n));\n\nPaginationContent.displayName = \"PaginationContent\";\n\nexport { PaginationContent };\n","import * as React from \"react\";\n\nexport interface PaginationItemProps extends React.LiHTMLAttributes<HTMLLIElement> {}\n\nconst PaginationItem = React.forwardRef<HTMLLIElement, PaginationItemProps>(\n (props, ref) => <li ref={ref} {...props} />,\n);\n\nPaginationItem.displayName = \"PaginationItem\";\n\nexport { PaginationItem };\n","import * as React from \"react\";\nimport { Slot } from \"@nuka/utils/slot\";\nimport { Button } from \"@nuka/components/Button\";\n\nexport interface PaginationLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {\n isActive?: boolean;\n asChild?: boolean;\n}\n\nconst PaginationLink = React.forwardRef<HTMLAnchorElement, PaginationLinkProps>(\n ({ isActive = false, asChild = false, className, ...props }, ref) => {\n const Comp = asChild ? Slot : \"a\";\n\n return (\n <Button\n asChild\n variant={isActive ? \"outline\" : \"ghost\"}\n size=\"sm\"\n className={className}\n >\n <Comp\n ref={ref}\n aria-current={isActive ? \"page\" : undefined}\n {...props}\n />\n </Button>\n );\n },\n);\n\nPaginationLink.displayName = \"PaginationLink\";\n\nexport { PaginationLink };\n","import * as React from \"react\";\nimport { composeRefs } from \"@nuka/utils/slot\";\nimport { Button } from \"@nuka/components/Button\";\nimport { Icon } from \"@nuka/components/Icon\";\n\nexport interface PaginationPreviousProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {\n disabled?: boolean;\n asChild?: boolean;\n}\n\nconst PreviousIcon = () => (\n <Icon size=\"sm\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"m15 18-6-6 6-6\" />\n </svg>\n </Icon>\n);\n\nconst PaginationPrevious = React.forwardRef<\n HTMLAnchorElement,\n PaginationPreviousProps\n>(\n (\n {\n disabled = false,\n asChild = false,\n className,\n children,\n onClick,\n ...props\n },\n ref,\n ) => {\n const handleClick = disabled\n ? (e: React.MouseEvent<HTMLAnchorElement>) => {\n e.preventDefault();\n }\n : onClick;\n\n // When asChild, the consumer provides a single child element (e.g. <button>).\n // We inject the icon + label as that element's children via cloneElement,\n // avoiding the Slot multiple-children error.\n if (asChild && React.isValidElement(children)) {\n const child = children as React.ReactElement<\n Record<string, unknown> & { ref?: React.Ref<HTMLElement> }\n >;\n const label = (child.props.children as React.ReactNode) ?? \"Previous\";\n\n return (\n <Button\n asChild\n variant=\"ghost\"\n size=\"sm\"\n className={className}\n disabled={disabled}\n >\n {React.cloneElement(\n child,\n {\n ref: composeRefs(\n ref as React.Ref<HTMLElement>,\n child.props.ref,\n ) as React.Ref<never>,\n \"aria-label\": \"Go to previous page\",\n ...props,\n } as Partial<Record<string, unknown>> & React.Attributes,\n <PreviousIcon />,\n label,\n )}\n </Button>\n );\n }\n\n const Comp = disabled ? \"span\" : \"a\";\n\n return (\n <Button\n asChild\n variant=\"ghost\"\n size=\"sm\"\n className={className}\n disabled={disabled}\n >\n <Comp\n ref={ref as React.Ref<never>}\n aria-label=\"Go to previous page\"\n onClick={handleClick}\n {...props}\n {...(disabled\n ? { role: \"link\" as const, \"aria-disabled\": true }\n : {})}\n >\n <PreviousIcon />\n {children ?? \"Previous\"}\n </Comp>\n </Button>\n );\n },\n);\n\nPaginationPrevious.displayName = \"PaginationPrevious\";\n\nexport { PaginationPrevious };\n","import * as React from \"react\";\nimport { composeRefs } from \"@nuka/utils/slot\";\nimport { Button } from \"@nuka/components/Button\";\nimport { Icon } from \"@nuka/components/Icon\";\n\nexport interface PaginationNextProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {\n disabled?: boolean;\n asChild?: boolean;\n}\n\nconst NextIcon = () => (\n <Icon size=\"sm\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </Icon>\n);\n\nconst PaginationNext = React.forwardRef<HTMLAnchorElement, PaginationNextProps>(\n (\n {\n disabled = false,\n asChild = false,\n className,\n children,\n onClick,\n ...props\n },\n ref,\n ) => {\n const handleClick = disabled\n ? (e: React.MouseEvent<HTMLAnchorElement>) => {\n e.preventDefault();\n }\n : onClick;\n\n if (asChild && React.isValidElement(children)) {\n const child = children as React.ReactElement<\n Record<string, unknown> & { ref?: React.Ref<HTMLElement> }\n >;\n const label = (child.props.children as React.ReactNode) ?? \"Next\";\n\n return (\n <Button\n asChild\n variant=\"ghost\"\n size=\"sm\"\n className={className}\n disabled={disabled}\n >\n {React.cloneElement(\n child,\n {\n ref: composeRefs(\n ref as React.Ref<HTMLElement>,\n child.props.ref,\n ) as React.Ref<never>,\n \"aria-label\": \"Go to next page\",\n ...props,\n } as Partial<Record<string, unknown>> & React.Attributes,\n label,\n <NextIcon />,\n )}\n </Button>\n );\n }\n\n const Comp = disabled ? \"span\" : \"a\";\n\n return (\n <Button\n asChild\n variant=\"ghost\"\n size=\"sm\"\n className={className}\n disabled={disabled}\n >\n <Comp\n ref={ref as React.Ref<never>}\n aria-label=\"Go to next page\"\n onClick={handleClick}\n {...props}\n {...(disabled\n ? { role: \"link\" as const, \"aria-disabled\": true }\n : {})}\n >\n {children ?? \"Next\"}\n <NextIcon />\n </Comp>\n </Button>\n );\n },\n);\n\nPaginationNext.displayName = \"PaginationNext\";\n\nexport { PaginationNext };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\n\nexport interface PaginationEllipsisProps extends React.HTMLAttributes<HTMLSpanElement> {}\n\nconst PaginationEllipsis = React.forwardRef<\n HTMLSpanElement,\n PaginationEllipsisProps\n>(({ className, ...props }, ref) => (\n <>\n <span\n ref={ref}\n aria-hidden=\"true\"\n className={cn(\n \"flex items-center justify-center size-8\",\n \"text-(--nuka-text-muted)\",\n className,\n )}\n {...props}\n >\n ...\n </span>\n <span className=\"sr-only\">More pages</span>\n </>\n));\n\nPaginationEllipsis.displayName = \"PaginationEllipsis\";\n\nexport { PaginationEllipsis };\n","import * as React from \"react\";\nimport { Input } from \"@nuka/components/Input\";\nimport { EmptyState } from \"@nuka/components/EmptyState\";\nimport {\n Table,\n TableHeader,\n TableBody,\n TableRow,\n TableHead,\n TableCell,\n} from \"@nuka/components/Table\";\nimport {\n Pagination,\n PaginationContent,\n PaginationItem,\n PaginationLink,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n} from \"@nuka/components/Pagination\";\nimport type { SortDirection } from \"@nuka/components/Table\";\n\nexport interface DataTableColumn<TRow> {\n key: keyof TRow & string;\n header: string;\n sortable?: boolean;\n cell?: (value: TRow[keyof TRow & string], row: TRow) => React.ReactNode;\n}\n\nexport interface DataTableProps<TRow extends object> {\n data: TRow[];\n columns: DataTableColumn<TRow>[];\n caption: string;\n rowKey?: keyof TRow & string;\n pageSize?: number;\n filterable?: boolean;\n filterPlaceholder?: string;\n emptyMessage?: string;\n}\n\nfunction getPageNumbers(currentPage: number, totalPages: number): number[] {\n const pageSet = new Set<number>();\n pageSet.add(1);\n pageSet.add(totalPages);\n pageSet.add(currentPage);\n if (currentPage - 1 >= 1) pageSet.add(currentPage - 1);\n if (currentPage + 1 <= totalPages) pageSet.add(currentPage + 1);\n\n return Array.from(pageSet).sort((a, b) => a - b);\n}\n\n// DataTable is a generic function component. React.forwardRef does not support\n// generics cleanly in React 19. Consumers interact with DataTable at the data\n// level (columns, rows), not the DOM level, so ref forwarding is not needed.\nfunction DataTable<TRow extends object>({\n data,\n columns,\n caption,\n rowKey,\n pageSize = 10,\n filterable = false,\n filterPlaceholder,\n emptyMessage = \"No results found\",\n}: DataTableProps<TRow>) {\n const [filterValue, setFilterValue] = React.useState(\"\");\n const [currentPage, setCurrentPage] = React.useState(1);\n const [sort, setSort] = React.useState<{\n key: string;\n direction: SortDirection;\n } | null>(null);\n\n const hasFilteredRef = React.useRef(false);\n const filterId = React.useId();\n\n const handleFilterChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n hasFilteredRef.current = true;\n setFilterValue(e.target.value);\n setCurrentPage(1);\n };\n\n const handleSort = (key: string) => {\n setSort((prev) => {\n if (prev?.key !== key) {\n return { key, direction: \"asc\" };\n }\n if (prev.direction === \"asc\") {\n return { key, direction: \"desc\" };\n }\n if (prev.direction === \"desc\") {\n return null;\n }\n return null;\n });\n };\n\n const filteredData = React.useMemo(() => {\n if (filterValue === \"\") return data;\n\n const lower = filterValue.toLowerCase();\n return data.filter((row) =>\n columns.some((col) => {\n const value = row[col.key];\n return String(value).toLowerCase().includes(lower);\n }),\n );\n }, [data, columns, filterValue]);\n\n const sortedData = React.useMemo(() => {\n if (sort === null) return filteredData;\n\n return [...filteredData].sort((a, b) => {\n const aVal = String(a[sort.key as keyof TRow] ?? \"\");\n const bVal = String(b[sort.key as keyof TRow] ?? \"\");\n const cmp = aVal.localeCompare(bVal);\n return sort.direction === \"desc\" ? -cmp : cmp;\n });\n }, [filteredData, sort]);\n\n const totalPages = Math.max(1, Math.ceil(filteredData.length / pageSize));\n const startIndex = (currentPage - 1) * pageSize;\n const pageData = sortedData.slice(startIndex, startIndex + pageSize);\n const showPagination = totalPages > 1;\n\n const pages = getPageNumbers(currentPage, totalPages);\n\n return (\n <div className=\"flex flex-col gap-(--space-4)\">\n {filterable && (\n <div>\n <label htmlFor={filterId} className=\"sr-only\">\n Filter {caption}\n </label>\n <Input\n id={filterId}\n type=\"search\"\n value={filterValue}\n onChange={handleFilterChange}\n placeholder={filterPlaceholder}\n size=\"sm\"\n />\n </div>\n )}\n\n {filteredData.length === 0 ? (\n <EmptyState heading={emptyMessage} />\n ) : (\n <Table caption={caption}>\n <TableHeader>\n <TableRow>\n {columns.map((col) => {\n const isSortable = col.sortable === true;\n return (\n <TableHead\n key={col.key}\n {...(isSortable\n ? {\n sortable: true,\n sortDirection:\n sort !== null && sort.key === col.key\n ? sort.direction\n : \"none\",\n onSort: () => handleSort(col.key),\n }\n : {})}\n >\n {col.header}\n </TableHead>\n );\n })}\n </TableRow>\n </TableHeader>\n <TableBody>\n {pageData.map((row, rowIndex) => (\n <TableRow key={rowKey != null ? String(row[rowKey]) : rowIndex}>\n {columns.map((col) => (\n <TableCell key={col.key}>\n {col.cell != null\n ? col.cell(row[col.key], row)\n : String(row[col.key] ?? \"\")}\n </TableCell>\n ))}\n </TableRow>\n ))}\n </TableBody>\n </Table>\n )}\n\n {showPagination && filteredData.length > 0 && (\n <Pagination>\n <PaginationContent>\n <PaginationItem>\n <PaginationPrevious asChild>\n <button\n type=\"button\"\n disabled={currentPage === 1}\n onClick={() => setCurrentPage((p) => Math.max(1, p - 1))}\n />\n </PaginationPrevious>\n </PaginationItem>\n\n {pages.map((page, i) => {\n const prev = pages[i - 1];\n const showEllipsis = prev != null && page - prev > 1;\n\n return (\n <React.Fragment key={page}>\n {showEllipsis && (\n <PaginationItem>\n <PaginationEllipsis />\n </PaginationItem>\n )}\n <PaginationItem>\n <PaginationLink asChild isActive={page === currentPage}>\n <button\n type=\"button\"\n onClick={() => setCurrentPage(page)}\n >\n {page}\n </button>\n </PaginationLink>\n </PaginationItem>\n </React.Fragment>\n );\n })}\n\n <PaginationItem>\n <PaginationNext asChild>\n <button\n type=\"button\"\n disabled={currentPage === totalPages}\n onClick={() =>\n setCurrentPage((p) => Math.min(totalPages, p + 1))\n }\n />\n </PaginationNext>\n </PaginationItem>\n </PaginationContent>\n </Pagination>\n )}\n\n <div role=\"status\" className=\"sr-only\">\n {hasFilteredRef.current\n ? `Showing ${String(filteredData.length)} ${filteredData.length === 1 ? \"result\" : \"results\"}`\n : \"\"}\n </div>\n </div>\n );\n}\n\nDataTable.displayName = \"DataTable\";\n\nexport { DataTable };\n","import * as React from \"react\";\nimport type { useFloating, useInteractions } from \"@floating-ui/react\";\n\nexport interface DatePickerContextValue {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n selectedDate: Date | undefined;\n onSelectedDateChange: (date: Date | undefined) => void;\n focusedDate: Date;\n setFocusedDate: (date: Date) => void;\n disabled: boolean;\n min: Date | undefined;\n max: Date | undefined;\n refs: ReturnType<typeof useFloating>[\"refs\"];\n floatingStyles: React.CSSProperties;\n getReferenceProps: ReturnType<typeof useInteractions>[\"getReferenceProps\"];\n getFloatingProps: ReturnType<typeof useInteractions>[\"getFloatingProps\"];\n baseId: string;\n triggerButtonRef: React.RefObject<HTMLButtonElement | null>;\n focusCalendarOnOpen: React.RefObject<boolean>;\n formatDate: (date: Date) => string;\n parseDate: (input: string) => Date | null;\n locale: string | undefined;\n}\n\nconst DatePickerContext = React.createContext<\n DatePickerContextValue | undefined\n>(undefined);\n\nexport function useDatePickerContext(): DatePickerContextValue {\n const context = React.useContext(DatePickerContext);\n if (context === undefined) {\n throw new Error(\n \"useDatePickerContext must be used within a <DatePicker> component\",\n );\n }\n return context;\n}\n\nexport { DatePickerContext };\n","export function isSameDay(a: Date, b: Date): boolean {\n return (\n a.getFullYear() === b.getFullYear() &&\n a.getMonth() === b.getMonth() &&\n a.getDate() === b.getDate()\n );\n}\n\nexport function isDateDisabled(\n date: Date,\n min: Date | undefined,\n max: Date | undefined,\n): boolean {\n if (min !== undefined) {\n const minStart = new Date(min.getFullYear(), min.getMonth(), min.getDate());\n if (date < minStart) return true;\n }\n if (max !== undefined) {\n const maxEnd = new Date(max.getFullYear(), max.getMonth(), max.getDate());\n if (date > maxEnd) return true;\n }\n return false;\n}\n\nexport function defaultFormatDate(date: Date): string {\n const y = date.getFullYear();\n const m = String(date.getMonth() + 1).padStart(2, \"0\");\n const d = String(date.getDate()).padStart(2, \"0\");\n return `${String(y)}-${m}-${d}`;\n}\n\nexport function defaultParseDate(input: string): Date | null {\n const match = /^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(input);\n if (!match) return null;\n const year = Number(match[1]);\n const month = Number(match[2]);\n const day = Number(match[3]);\n if (month < 1 || month > 12) return null;\n const maxDay = new Date(year, month, 0).getDate();\n if (day < 1 || day > maxDay) return null;\n return new Date(year, month - 1, day);\n}\n\nexport function buildMonthGrid(\n year: number,\n month: number,\n): (number | null)[][] {\n const firstDay = new Date(year, month, 1).getDay();\n const leadingEmpties = (firstDay + 6) % 7;\n const totalDays = new Date(year, month + 1, 0).getDate();\n\n const cells: (number | null)[] = [];\n for (let i = 0; i < leadingEmpties; i++) cells.push(null);\n for (let d = 1; d <= totalDays; d++) cells.push(d);\n while (cells.length % 7 !== 0) cells.push(null);\n\n const weeks: (number | null)[][] = [];\n for (let i = 0; i < cells.length; i += 7) {\n weeks.push(cells.slice(i, i + 7));\n }\n return weeks;\n}\n\nexport function clampDate(\n date: Date,\n min: Date | undefined,\n max: Date | undefined,\n): Date {\n if (min !== undefined && date < min)\n return new Date(min.getFullYear(), min.getMonth(), min.getDate());\n if (max !== undefined && date > max)\n return new Date(max.getFullYear(), max.getMonth(), max.getDate());\n return date;\n}\n\nexport function monthHasSelectableDays(\n year: number,\n month: number,\n min: Date | undefined,\n max: Date | undefined,\n): boolean {\n const totalDays = new Date(year, month + 1, 0).getDate();\n const firstOfMonth = new Date(year, month, 1);\n const lastOfMonth = new Date(year, month, totalDays);\n if (\n min !== undefined &&\n lastOfMonth < new Date(min.getFullYear(), min.getMonth(), min.getDate())\n )\n return false;\n if (\n max !== undefined &&\n firstOfMonth > new Date(max.getFullYear(), max.getMonth(), max.getDate())\n )\n return false;\n return true;\n}\n","// Exceeds 200 lines: single forwardRef component with input handling, blur/keydown/click\n// callbacks, form field integration, and calendar toggle. Cannot split without violating\n// single-component-per-file.\nimport * as React from \"react\";\nimport { useFormFieldProps } from \"@nuka/hooks/use-form-field-props\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { composeRefs } from \"@nuka/utils/slot\";\nimport { Input } from \"@nuka/components/Input\";\nimport { Icon } from \"@nuka/components/Icon\";\nimport { useDatePickerContext } from \"@nuka/components/DatePicker/DatePicker.context\";\nimport { isDateDisabled } from \"@nuka/components/DatePicker/DatePicker.utils\";\n\nexport interface DatePickerInputProps extends Omit<\n React.HTMLAttributes<HTMLDivElement>,\n \"id\"\n> {\n placeholder?: string;\n size?: \"sm\" | \"md\" | \"lg\";\n id?: string;\n \"aria-invalid\"?: React.AriaAttributes[\"aria-invalid\"];\n \"aria-describedby\"?: string;\n \"aria-required\"?: React.AriaAttributes[\"aria-required\"];\n}\n\nconst DatePickerInput = React.forwardRef<HTMLDivElement, DatePickerInputProps>(\n (\n {\n className,\n placeholder = \"YYYY-MM-DD\",\n size,\n id,\n \"aria-invalid\": ariaInvalidProp,\n \"aria-describedby\": ariaDescribedByProp,\n \"aria-required\": ariaRequiredProp,\n ...props\n },\n ref,\n ) => {\n const ctx = useDatePickerContext();\n const setPositionRef = React.useCallback(\n (node: HTMLDivElement | null) => {\n if (node) {\n ctx.refs.setPositionReference(node);\n }\n },\n [ctx.refs],\n );\n const composedRef = composeRefs(ref, setPositionRef);\n\n const field = useFormFieldProps({\n id,\n \"aria-invalid\": ariaInvalidProp,\n \"aria-describedby\": ariaDescribedByProp,\n \"aria-required\": ariaRequiredProp,\n });\n\n const { selectedDate, open, formatDate: ctxFormatDate } = ctx;\n\n const [inputText, setInputText] = React.useState(\n selectedDate !== undefined ? ctxFormatDate(selectedDate) : \"\",\n );\n\n React.useEffect(() => {\n if (!open) {\n setInputText(\n selectedDate !== undefined ? ctxFormatDate(selectedDate) : \"\",\n );\n }\n }, [selectedDate, open, ctxFormatDate]);\n\n const ariaInvalid = field.ariaInvalid ?? undefined;\n\n const handleInputClick = React.useCallback(() => {\n if (!ctx.disabled && !ctx.open) {\n ctx.focusCalendarOnOpen.current = false;\n ctx.onOpenChange(true);\n }\n }, [ctx]);\n\n const commitValue = React.useCallback(() => {\n const parsed = ctx.parseDate(inputText);\n if (parsed !== null && !isDateDisabled(parsed, ctx.min, ctx.max)) {\n ctx.onSelectedDateChange(parsed);\n } else {\n setInputText(\n ctx.selectedDate !== undefined\n ? ctx.formatDate(ctx.selectedDate)\n : \"\",\n );\n }\n }, [inputText, ctx]);\n\n const handleInputKeyDown = React.useCallback(\n (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === \"Enter\") {\n e.preventDefault();\n commitValue();\n } else if (e.key === \"Escape\") {\n if (ctx.open) {\n e.preventDefault();\n ctx.onOpenChange(false);\n } else {\n setInputText(\n ctx.selectedDate !== undefined\n ? ctx.formatDate(ctx.selectedDate)\n : \"\",\n );\n }\n } else if (e.key === \"Tab\") {\n if (ctx.open) {\n ctx.onOpenChange(false);\n }\n }\n },\n [commitValue, ctx],\n );\n\n const handleInputBlur = React.useCallback(\n (e: React.FocusEvent<HTMLInputElement>) => {\n const relatedTarget = e.relatedTarget as Node | null;\n if (\n relatedTarget &&\n ctx.refs.floating.current?.contains(relatedTarget)\n ) {\n return;\n }\n commitValue();\n },\n [commitValue, ctx.refs.floating],\n );\n\n const handleToggle = React.useCallback(() => {\n if (!ctx.disabled) {\n ctx.focusCalendarOnOpen.current = !ctx.open;\n ctx.onOpenChange(!ctx.open);\n }\n }, [ctx]);\n\n const referenceProps = ctx.getReferenceProps({});\n\n return (\n <div\n ref={composedRef}\n className={cn(\"relative inline-flex w-full items-center\", className)}\n {...props}\n >\n <Input\n type=\"text\"\n value={inputText}\n onChange={(e) => setInputText(e.target.value)}\n onClick={handleInputClick}\n onKeyDown={handleInputKeyDown}\n onBlur={handleInputBlur}\n placeholder={placeholder}\n size={size}\n id={field.resolvedId}\n disabled={ctx.disabled || field.resolvedDisabled}\n aria-invalid={ariaInvalid}\n aria-describedby={field.ariaDescribedBy}\n aria-required={field.ariaRequired}\n className=\"pr-(--space-10)\"\n autoComplete=\"off\"\n />\n <button\n ref={composeRefs(\n ctx.triggerButtonRef,\n ctx.refs.setReference as React.Ref<HTMLButtonElement>,\n )}\n type=\"button\"\n {...(referenceProps as React.ButtonHTMLAttributes<HTMLButtonElement>)}\n onClick={handleToggle}\n disabled={ctx.disabled}\n aria-label=\"Open calendar\"\n className={cn(\n \"absolute right-0 top-0 bottom-0 flex items-center justify-center\",\n \"px-(--space-3) text-(--nuka-text-muted) hover:text-(--nuka-text-base)\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n \"cursor-pointer\",\n )}\n >\n <Icon size=\"sm\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <rect x=\"3\" y=\"4\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\" />\n <line x1=\"16\" y1=\"2\" x2=\"16\" y2=\"6\" />\n <line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"6\" />\n <line x1=\"3\" y1=\"10\" x2=\"21\" y2=\"10\" />\n </svg>\n </Icon>\n </button>\n </div>\n );\n },\n);\n\nDatePickerInput.displayName = \"DatePickerInput\";\n\nexport { DatePickerInput };\n","// Exceeds 200 lines: three tightly related calendar hooks in one file by design.\n// useCalendarKeyboard accounts for ~165 lines due to the full ARIA grid keyboard\n// contract (12 key cases). Splitting into separate files would scatter one concern.\nimport * as React from \"react\";\nimport type { DatePickerContextValue } from \"@nuka/components/DatePicker/DatePicker.context\";\nimport {\n clampDate,\n monthHasSelectableDays,\n} from \"@nuka/components/DatePicker/DatePicker.utils\";\n\nexport function useCalendarNavigation(ctx: DatePickerContextValue) {\n const [displayedYear, setDisplayedYear] = React.useState(\n ctx.focusedDate.getFullYear(),\n );\n const [displayedMonth, setDisplayedMonth] = React.useState(\n ctx.focusedDate.getMonth(),\n );\n\n React.useEffect(() => {\n if (ctx.open) {\n setDisplayedYear(ctx.focusedDate.getFullYear());\n setDisplayedMonth(ctx.focusedDate.getMonth());\n }\n }, [ctx.open, ctx.focusedDate]);\n\n const canGoPrev = React.useMemo(() => {\n const prevMonth = displayedMonth - 1;\n const prevYear = prevMonth < 0 ? displayedYear - 1 : displayedYear;\n const normalizedMonth = ((prevMonth % 12) + 12) % 12;\n return monthHasSelectableDays(prevYear, normalizedMonth, ctx.min, ctx.max);\n }, [displayedYear, displayedMonth, ctx.min, ctx.max]);\n\n const canGoNext = React.useMemo(() => {\n const nextMonth = displayedMonth + 1;\n const nextYear = nextMonth > 11 ? displayedYear + 1 : displayedYear;\n const normalizedMonth = nextMonth % 12;\n return monthHasSelectableDays(nextYear, normalizedMonth, ctx.min, ctx.max);\n }, [displayedYear, displayedMonth, ctx.min, ctx.max]);\n\n const goToPrevMonth = React.useCallback(() => {\n if (!canGoPrev) return;\n const d = new Date(displayedYear, displayedMonth - 1, 1);\n setDisplayedYear(d.getFullYear());\n setDisplayedMonth(d.getMonth());\n const newFocused = new Date(\n d.getFullYear(),\n d.getMonth(),\n Math.min(\n ctx.focusedDate.getDate(),\n new Date(d.getFullYear(), d.getMonth() + 1, 0).getDate(),\n ),\n );\n ctx.setFocusedDate(clampDate(newFocused, ctx.min, ctx.max));\n }, [canGoPrev, displayedYear, displayedMonth, ctx]);\n\n const goToNextMonth = React.useCallback(() => {\n if (!canGoNext) return;\n const d = new Date(displayedYear, displayedMonth + 1, 1);\n setDisplayedYear(d.getFullYear());\n setDisplayedMonth(d.getMonth());\n const newFocused = new Date(\n d.getFullYear(),\n d.getMonth(),\n Math.min(\n ctx.focusedDate.getDate(),\n new Date(d.getFullYear(), d.getMonth() + 1, 0).getDate(),\n ),\n );\n ctx.setFocusedDate(clampDate(newFocused, ctx.min, ctx.max));\n }, [canGoNext, displayedYear, displayedMonth, ctx]);\n\n return {\n displayedYear,\n setDisplayedYear,\n displayedMonth,\n setDisplayedMonth,\n canGoPrev,\n canGoNext,\n goToPrevMonth,\n goToNextMonth,\n };\n}\n\nexport function useCalendarFocus(\n ctx: DatePickerContextValue,\n displayedYear: number,\n displayedMonth: number,\n) {\n const focusedDayRef = React.useRef<HTMLButtonElement>(null);\n const isFirstRenderRef = React.useRef(true);\n\n React.useEffect(() => {\n if (!ctx.open) {\n isFirstRenderRef.current = true;\n return;\n }\n\n if (focusedDayRef.current) {\n if (isFirstRenderRef.current) {\n isFirstRenderRef.current = false;\n if (ctx.focusCalendarOnOpen.current) {\n requestAnimationFrame(() => {\n focusedDayRef.current?.focus();\n });\n }\n } else {\n requestAnimationFrame(() => {\n focusedDayRef.current?.focus();\n });\n }\n }\n }, [\n ctx.open,\n ctx.focusedDate,\n ctx.focusCalendarOnOpen,\n displayedYear,\n displayedMonth,\n ]);\n\n return { focusedDayRef };\n}\n\nexport function useCalendarKeyboard(\n ctx: DatePickerContextValue,\n navigateToDate: (candidate: Date, stepFn: (d: Date) => Date) => void,\n selectDay: (date: Date) => void,\n) {\n const handleKeyDown = React.useCallback(\n (e: React.KeyboardEvent) => {\n const focused = ctx.focusedDate;\n let handled = true;\n\n switch (e.key) {\n case \"ArrowLeft\": {\n const candidate = new Date(\n focused.getFullYear(),\n focused.getMonth(),\n focused.getDate() - 1,\n );\n navigateToDate(\n candidate,\n (d) => new Date(d.getFullYear(), d.getMonth(), d.getDate() - 1),\n );\n break;\n }\n case \"ArrowRight\": {\n const candidate = new Date(\n focused.getFullYear(),\n focused.getMonth(),\n focused.getDate() + 1,\n );\n navigateToDate(\n candidate,\n (d) => new Date(d.getFullYear(), d.getMonth(), d.getDate() + 1),\n );\n break;\n }\n case \"ArrowUp\": {\n const candidate = new Date(\n focused.getFullYear(),\n focused.getMonth(),\n focused.getDate() - 7,\n );\n navigateToDate(\n candidate,\n (d) => new Date(d.getFullYear(), d.getMonth(), d.getDate() - 7),\n );\n break;\n }\n case \"ArrowDown\": {\n const candidate = new Date(\n focused.getFullYear(),\n focused.getMonth(),\n focused.getDate() + 7,\n );\n navigateToDate(\n candidate,\n (d) => new Date(d.getFullYear(), d.getMonth(), d.getDate() + 7),\n );\n break;\n }\n case \"PageUp\": {\n const prevMonthDate = new Date(\n focused.getFullYear(),\n focused.getMonth() - 1,\n 1,\n );\n const maxDayInPrev = new Date(\n prevMonthDate.getFullYear(),\n prevMonthDate.getMonth() + 1,\n 0,\n ).getDate();\n const candidate = new Date(\n prevMonthDate.getFullYear(),\n prevMonthDate.getMonth(),\n Math.min(focused.getDate(), maxDayInPrev),\n );\n navigateToDate(\n candidate,\n (d) => new Date(d.getFullYear(), d.getMonth(), d.getDate() - 1),\n );\n break;\n }\n case \"PageDown\": {\n const nextMonthDate = new Date(\n focused.getFullYear(),\n focused.getMonth() + 1,\n 1,\n );\n const maxDayInNext = new Date(\n nextMonthDate.getFullYear(),\n nextMonthDate.getMonth() + 1,\n 0,\n ).getDate();\n const candidate = new Date(\n nextMonthDate.getFullYear(),\n nextMonthDate.getMonth(),\n Math.min(focused.getDate(), maxDayInNext),\n );\n navigateToDate(\n candidate,\n (d) => new Date(d.getFullYear(), d.getMonth(), d.getDate() + 1),\n );\n break;\n }\n case \"Home\": {\n const dayOfWeek = focused.getDay();\n const mondayOffset = (dayOfWeek + 6) % 7;\n const candidate = new Date(\n focused.getFullYear(),\n focused.getMonth(),\n focused.getDate() - mondayOffset,\n );\n navigateToDate(\n candidate,\n (d) => new Date(d.getFullYear(), d.getMonth(), d.getDate() + 1),\n );\n break;\n }\n case \"End\": {\n const dayOfWeek = focused.getDay();\n const sundayOffset = (7 - dayOfWeek) % 7;\n const candidate = new Date(\n focused.getFullYear(),\n focused.getMonth(),\n focused.getDate() + sundayOffset,\n );\n navigateToDate(\n candidate,\n (d) => new Date(d.getFullYear(), d.getMonth(), d.getDate() - 1),\n );\n break;\n }\n case \"Enter\":\n case \" \": {\n e.preventDefault();\n selectDay(focused);\n break;\n }\n case \"Escape\": {\n ctx.onOpenChange(false);\n requestAnimationFrame(() => {\n ctx.triggerButtonRef.current?.focus();\n });\n break;\n }\n case \"Tab\": {\n e.preventDefault();\n ctx.onOpenChange(false);\n requestAnimationFrame(() => {\n ctx.triggerButtonRef.current?.focus();\n });\n break;\n }\n default:\n handled = false;\n }\n\n if (handled) {\n e.preventDefault();\n }\n },\n [ctx, navigateToDate, selectDay],\n );\n\n return { handleKeyDown };\n}\n","// Exceeds 200 lines: calendar grid JSX is inseparable from the hooks that feed it.\n// Hook calls, Intl formatters, memos, and selectDay/navigateToDate callbacks all\n// close over the same display state and cannot be moved to a sibling file.\nimport * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { composeRefs } from \"@nuka/utils/slot\";\nimport { Portal } from \"@nuka/utils/portal\";\nimport { Button } from \"@nuka/components/Button\";\nimport { Icon } from \"@nuka/components/Icon\";\nimport { Text } from \"@nuka/components/Text\";\nimport { useDatePickerContext } from \"@nuka/components/DatePicker/DatePicker.context\";\nimport {\n isSameDay,\n isDateDisabled,\n buildMonthGrid,\n} from \"@nuka/components/DatePicker/DatePicker.utils\";\nimport {\n useCalendarNavigation,\n useCalendarFocus,\n useCalendarKeyboard,\n} from \"@nuka/components/DatePicker/DatePicker.hooks\";\n\nexport interface DatePickerCalendarProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst DatePickerCalendar = React.forwardRef<\n HTMLDivElement,\n DatePickerCalendarProps\n>(({ className, ...props }, ref) => {\n const ctx = useDatePickerContext();\n const contentRef = React.useRef<HTMLDivElement>(null);\n const composedRef = composeRefs(\n ref,\n contentRef,\n ctx.refs.setFloating as React.Ref<HTMLDivElement>,\n );\n\n const {\n displayedYear,\n setDisplayedYear,\n displayedMonth,\n setDisplayedMonth,\n canGoPrev,\n canGoNext,\n goToPrevMonth,\n goToNextMonth,\n } = useCalendarNavigation(ctx);\n\n const { focusedDayRef } = useCalendarFocus(\n ctx,\n displayedYear,\n displayedMonth,\n );\n\n const labelFormatter = React.useMemo(\n () =>\n new Intl.DateTimeFormat(ctx.locale, {\n weekday: \"long\",\n year: \"numeric\",\n month: \"long\",\n day: \"numeric\",\n }),\n [ctx.locale],\n );\n\n const headerFormatter = React.useMemo(\n () =>\n new Intl.DateTimeFormat(ctx.locale, {\n month: \"long\",\n year: \"numeric\",\n }),\n [ctx.locale],\n );\n\n const weekdayLabels = React.useMemo(() => {\n const shortFmt = new Intl.DateTimeFormat(ctx.locale, { weekday: \"short\" });\n const longFmt = new Intl.DateTimeFormat(ctx.locale, { weekday: \"long\" });\n return Array.from({ length: 7 }, (_, i) => {\n const date = new Date(2026, 0, 5 + i);\n return {\n short: shortFmt.format(date),\n long: longFmt.format(date),\n };\n });\n }, [ctx.locale]);\n\n const weeks = React.useMemo(\n () => buildMonthGrid(displayedYear, displayedMonth),\n [displayedYear, displayedMonth],\n );\n\n const headerLabel = React.useMemo(\n () => headerFormatter.format(new Date(displayedYear, displayedMonth, 1)),\n [displayedYear, displayedMonth, headerFormatter],\n );\n\n const selectDay = React.useCallback(\n (date: Date) => {\n if (isDateDisabled(date, ctx.min, ctx.max)) return;\n ctx.onSelectedDateChange(date);\n ctx.onOpenChange(false);\n requestAnimationFrame(() => {\n ctx.triggerButtonRef.current?.focus();\n });\n },\n [ctx],\n );\n\n const navigateToDate = React.useCallback(\n (candidate: Date, stepFn: (d: Date) => Date) => {\n let current = candidate;\n let attempts = 0;\n while (isDateDisabled(current, ctx.min, ctx.max) && attempts < 366) {\n current = stepFn(current);\n attempts++;\n }\n if (isDateDisabled(current, ctx.min, ctx.max)) return;\n\n ctx.setFocusedDate(current);\n if (\n current.getMonth() !== displayedMonth ||\n current.getFullYear() !== displayedYear\n ) {\n setDisplayedYear(current.getFullYear());\n setDisplayedMonth(current.getMonth());\n }\n },\n [ctx, displayedMonth, displayedYear, setDisplayedYear, setDisplayedMonth],\n );\n\n const { handleKeyDown } = useCalendarKeyboard(ctx, navigateToDate, selectDay);\n\n if (!ctx.open) return null;\n\n const floatingProps = ctx.getFloatingProps(props);\n const today = new Date();\n\n return (\n <Portal>\n <div\n ref={composedRef}\n style={ctx.floatingStyles}\n role=\"dialog\"\n aria-label=\"Date picker\"\n {...(floatingProps as React.HTMLAttributes<HTMLDivElement>)}\n className={cn(\n \"z-(--nuka-z-dropdown) rounded-(--radius-md) border border-(--nuka-border-base)\",\n \"bg-(--nuka-bg-base) shadow-md p-(--space-3)\",\n \"focus-visible:outline-none\",\n className,\n )}\n >\n <div className=\"flex items-center justify-between mb-(--space-2)\">\n <Button\n variant=\"ghost\"\n size=\"sm\"\n onClick={goToPrevMonth}\n disabled={!canGoPrev}\n aria-label=\"Previous month\"\n >\n <Icon size=\"sm\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <polyline points=\"15 18 9 12 15 6\" />\n </svg>\n </Icon>\n </Button>\n <Text as=\"span\" size=\"sm\" weight=\"medium\">\n {headerLabel}\n </Text>\n <Button\n variant=\"ghost\"\n size=\"sm\"\n onClick={goToNextMonth}\n disabled={!canGoNext}\n aria-label=\"Next month\"\n >\n <Icon size=\"sm\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <polyline points=\"9 18 15 12 9 6\" />\n </svg>\n </Icon>\n </Button>\n </div>\n\n <div\n role=\"grid\"\n aria-label={headerLabel}\n id={`${ctx.baseId}-grid`}\n onKeyDown={handleKeyDown}\n >\n <div\n role=\"row\"\n aria-hidden=\"true\"\n className=\"grid grid-cols-7 mb-(--space-1)\"\n >\n {weekdayLabels.map((day) => (\n <abbr\n key={day.short}\n title={day.long}\n className=\"flex items-center justify-center text-xs text-(--nuka-text-muted) no-underline py-(--space-1)\"\n >\n {day.short}\n </abbr>\n ))}\n </div>\n\n {weeks.map((week, weekIndex) => (\n <div role=\"row\" key={weekIndex} className=\"grid grid-cols-7\">\n {week.map((day, dayIndex) => {\n if (day === null) {\n return (\n <div\n role=\"gridcell\"\n key={`empty-${String(dayIndex)}`}\n aria-hidden=\"true\"\n >\n <span className=\"block size-9\" />\n </div>\n );\n }\n\n const date = new Date(displayedYear, displayedMonth, day);\n const disabled = isDateDisabled(date, ctx.min, ctx.max);\n const isSelected =\n ctx.selectedDate !== undefined &&\n isSameDay(date, ctx.selectedDate);\n const isFocused = isSameDay(date, ctx.focusedDate);\n const isToday = isSameDay(date, today);\n const dayLabel = labelFormatter.format(date);\n\n return (\n <div role=\"gridcell\" key={day}>\n <button\n ref={isFocused ? focusedDayRef : undefined}\n type=\"button\"\n tabIndex={isFocused ? 0 : -1}\n aria-label={dayLabel}\n aria-selected={isSelected}\n aria-disabled={disabled || undefined}\n disabled={disabled}\n onClick={() => selectDay(date)}\n className={cn(\n \"flex items-center justify-center size-9 rounded-(--radius-md) text-sm\",\n \"focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--nuka-border-focus)\",\n \"cursor-pointer\",\n isSelected &&\n \"bg-(--nuka-accent-bg) text-(--nuka-accent-fg)\",\n !isSelected &&\n !disabled &&\n \"hover:bg-(--nuka-bg-muted)\",\n isToday &&\n !isSelected &&\n \"ring-1 ring-(--nuka-border-strong)\",\n disabled && \"opacity-50 cursor-default\",\n )}\n >\n {day}\n </button>\n </div>\n );\n })}\n </div>\n ))}\n </div>\n </div>\n </Portal>\n );\n});\n\nDatePickerCalendar.displayName = \"DatePickerCalendar\";\n\nexport { DatePickerCalendar };\n","import * as React from \"react\";\nimport {\n useFloating,\n useDismiss,\n useRole,\n useInteractions,\n offset,\n flip,\n shift,\n autoUpdate,\n} from \"@floating-ui/react\";\nimport { useControllableState } from \"@nuka/hooks/use-controllable-state\";\nimport { DatePickerContext } from \"@nuka/components/DatePicker/DatePicker.context\";\nimport type { DatePickerContextValue } from \"@nuka/components/DatePicker/DatePicker.context\";\nimport {\n defaultFormatDate,\n defaultParseDate,\n clampDate,\n} from \"@nuka/components/DatePicker/DatePicker.utils\";\n\nexport interface DatePickerProps {\n children: React.ReactNode;\n value?: Date | undefined;\n defaultValue?: Date | undefined;\n onValueChange?: (date: Date | undefined) => void;\n disabled?: boolean | undefined;\n min?: Date | undefined;\n max?: Date | undefined;\n formatDate?: ((date: Date) => string) | undefined;\n parseDate?: ((input: string) => Date | null) | undefined;\n locale?: string | undefined;\n}\n\nfunction DatePicker({\n children,\n value: controlledValue,\n defaultValue,\n onValueChange,\n disabled = false,\n min,\n max,\n formatDate,\n parseDate,\n locale,\n}: DatePickerProps) {\n const effectiveFormatDate = formatDate ?? defaultFormatDate;\n const effectiveParseDate = parseDate ?? defaultParseDate;\n const [selectedDate, setSelectedDate] = useControllableState(\n controlledValue,\n defaultValue,\n onValueChange,\n );\n\n const [open, setOpen] = React.useState(false);\n\n const today = React.useMemo(() => {\n const now = new Date();\n return new Date(now.getFullYear(), now.getMonth(), now.getDate());\n }, []);\n\n const initialFocusDate = React.useMemo(() => {\n if (selectedDate !== undefined) return selectedDate;\n return clampDate(today, min, max);\n }, [selectedDate, today, min, max]);\n\n const [focusedDate, setFocusedDate] = React.useState(initialFocusDate);\n\n const handleOpenChange = React.useCallback(\n (nextOpen: boolean) => {\n setOpen(nextOpen);\n if (nextOpen) {\n const target = selectedDate ?? clampDate(today, min, max);\n setFocusedDate(target);\n }\n },\n [selectedDate, today, min, max],\n );\n\n const { refs, floatingStyles, context } = useFloating({\n open,\n onOpenChange: handleOpenChange,\n placement: \"bottom-start\",\n middleware: [offset(8), flip(), shift({ padding: 8 })],\n whileElementsMounted: autoUpdate,\n });\n\n const dismiss = useDismiss(context);\n const role = useRole(context, { role: \"dialog\" });\n\n const { getReferenceProps, getFloatingProps } = useInteractions([\n dismiss,\n role,\n ]);\n\n const baseId = React.useId();\n const triggerButtonRef = React.useRef<HTMLButtonElement>(null);\n const focusCalendarOnOpen = React.useRef(false);\n\n const contextValue: DatePickerContextValue = React.useMemo(\n () => ({\n open,\n onOpenChange: handleOpenChange,\n selectedDate,\n onSelectedDateChange: setSelectedDate,\n focusedDate,\n setFocusedDate,\n disabled,\n min,\n max,\n refs,\n floatingStyles,\n getReferenceProps,\n getFloatingProps,\n baseId,\n triggerButtonRef,\n focusCalendarOnOpen,\n formatDate: effectiveFormatDate,\n parseDate: effectiveParseDate,\n locale,\n }),\n [\n open,\n handleOpenChange,\n selectedDate,\n setSelectedDate,\n focusedDate,\n setFocusedDate,\n disabled,\n min,\n max,\n refs,\n floatingStyles,\n getReferenceProps,\n getFloatingProps,\n baseId,\n triggerButtonRef,\n focusCalendarOnOpen,\n effectiveFormatDate,\n effectiveParseDate,\n locale,\n ],\n );\n\n return <DatePickerContext value={contextValue}>{children}</DatePickerContext>;\n}\n\nDatePicker.displayName = \"DatePicker\";\n\nexport { DatePicker };\nexport {\n DatePickerInput,\n type DatePickerInputProps,\n} from \"@nuka/components/DatePicker/DatePickerInput\";\nexport {\n DatePickerCalendar,\n type DatePickerCalendarProps,\n} from \"@nuka/components/DatePicker/DatePickerCalendar\";\n","import { cva, type VariantProps } from \"@nuka/utils/variants\";\n\nexport const dividerVariants = cva([], {\n variants: {\n orientation: {\n horizontal: \"w-full\",\n vertical: \"self-stretch\",\n },\n size: {\n sm: \"\",\n md: \"\",\n lg: \"\",\n },\n },\n compoundVariants: [\n { orientation: \"horizontal\", size: \"sm\", className: \"h-px\" },\n { orientation: \"horizontal\", size: \"md\", className: \"h-px\" },\n { orientation: \"horizontal\", size: \"lg\", className: \"h-0.5\" },\n { orientation: \"vertical\", size: \"sm\", className: \"w-px\" },\n { orientation: \"vertical\", size: \"md\", className: \"w-px\" },\n { orientation: \"vertical\", size: \"lg\", className: \"w-0.5\" },\n ],\n defaultVariants: {\n orientation: \"horizontal\",\n size: \"md\",\n },\n});\n\nexport type DividerVariantProps = VariantProps<typeof dividerVariants>;\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Text } from \"@nuka/components/Text\";\nimport {\n dividerVariants,\n type DividerVariantProps,\n} from \"@nuka/components/Divider/Divider.variants\";\n\nexport interface DividerProps\n extends React.ComponentPropsWithoutRef<\"div\">, DividerVariantProps {\n label?: React.ReactNode;\n}\n\n/**\n * Ref type is HTMLElement because the root element varies between\n * HTMLHRElement (horizontal, no label) and HTMLDivElement (vertical or labeled).\n * HTMLElement is the correct common supertype.\n */\nconst Divider = React.forwardRef<HTMLElement, DividerProps>(\n (\n { className, orientation = \"horizontal\", size = \"md\", label, ...props },\n ref,\n ) => {\n const isVertical = orientation === \"vertical\";\n const hasLabel = label != null;\n\n // Vertical + label is explicitly unsupported\n if (isVertical && hasLabel) {\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(\n 'Divider: `label` is not supported with `orientation=\"vertical\"`. The label will be ignored.',\n );\n }\n\n return (\n <div\n ref={ref as React.Ref<HTMLDivElement>}\n role=\"separator\"\n aria-orientation=\"vertical\"\n className={cn(\n \"bg-(--nuka-border-base)\",\n dividerVariants({ orientation: \"vertical\", size }),\n className,\n )}\n {...props}\n />\n );\n }\n\n // Horizontal with label: flex layout with two line segments\n if (hasLabel) {\n return (\n <div\n ref={ref as React.Ref<HTMLDivElement>}\n role=\"separator\"\n aria-orientation=\"horizontal\"\n className={cn(\"flex items-center gap-(--space-3)\", className)}\n {...props}\n >\n <div\n className={cn(\n \"flex-1 bg-(--nuka-border-base)\",\n dividerVariants({ orientation: \"horizontal\", size }),\n )}\n aria-hidden=\"true\"\n />\n <Text\n as=\"span\"\n size=\"xs\"\n color=\"muted\"\n className=\"shrink-0 px-(--space-2) whitespace-nowrap\"\n >\n {label}\n </Text>\n <div\n className={cn(\n \"flex-1 bg-(--nuka-border-base)\",\n dividerVariants({ orientation: \"horizontal\", size }),\n )}\n aria-hidden=\"true\"\n />\n </div>\n );\n }\n\n // Vertical without label: div with role=\"separator\"\n if (isVertical) {\n return (\n <div\n ref={ref as React.Ref<HTMLDivElement>}\n role=\"separator\"\n aria-orientation=\"vertical\"\n className={cn(\n \"bg-(--nuka-border-base)\",\n dividerVariants({ orientation: \"vertical\", size }),\n className,\n )}\n {...props}\n />\n );\n }\n\n // Horizontal without label: semantic <hr>\n return (\n <hr\n ref={ref as React.Ref<HTMLHRElement>}\n className={cn(\n \"border-0 bg-(--nuka-border-base)\",\n dividerVariants({ orientation: \"horizontal\", size }),\n className,\n )}\n {...(props as React.ComponentPropsWithoutRef<\"hr\">)}\n />\n );\n },\n);\n\nDivider.displayName = \"Divider\";\n\nexport { Divider, dividerVariants };\n","import * as React from \"react\";\nimport type { useFloating, useInteractions } from \"@floating-ui/react\";\n\nexport interface DropdownMenuContextValue {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n refs: ReturnType<typeof useFloating>[\"refs\"];\n floatingStyles: React.CSSProperties;\n getReferenceProps: ReturnType<typeof useInteractions>[\"getReferenceProps\"];\n getFloatingProps: ReturnType<typeof useInteractions>[\"getFloatingProps\"];\n}\n\nconst DropdownMenuContext = React.createContext<\n DropdownMenuContextValue | undefined\n>(undefined);\n\nfunction useDropdownMenuContext(): DropdownMenuContextValue {\n const context = React.useContext(DropdownMenuContext);\n if (context === undefined) {\n throw new Error(\n \"useDropdownMenuContext must be used within a <DropdownMenu> component\",\n );\n }\n return context;\n}\n\nexport { DropdownMenuContext, useDropdownMenuContext };\n","import * as React from \"react\";\nimport {\n useFloating,\n useClick,\n useDismiss,\n useRole,\n useInteractions,\n offset,\n flip,\n shift,\n autoUpdate,\n} from \"@floating-ui/react\";\nimport type { Placement } from \"@floating-ui/react\";\nimport { useControllableState } from \"@nuka/hooks/use-controllable-state\";\nimport { DropdownMenuContext } from \"@nuka/components/DropdownMenu/DropdownMenu.context\";\nimport type { DropdownMenuContextValue } from \"@nuka/components/DropdownMenu/DropdownMenu.context\";\n\nexport interface DropdownMenuProps {\n children: React.ReactNode;\n defaultOpen?: boolean;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n}\n\nfunction DropdownMenu({\n children,\n defaultOpen = false,\n open: controlledOpen,\n onOpenChange,\n}: DropdownMenuProps) {\n const [currentOpen, handleOpenChange] = useControllableState(\n controlledOpen,\n defaultOpen,\n onOpenChange,\n );\n\n const { refs, floatingStyles, context } = useFloating({\n open: currentOpen,\n onOpenChange: handleOpenChange,\n placement: \"bottom-start\" as Placement,\n middleware: [offset(4), flip(), shift({ padding: 8 })],\n whileElementsMounted: autoUpdate,\n });\n\n const click = useClick(context);\n const dismiss = useDismiss(context);\n const role = useRole(context, { role: \"menu\" });\n\n const { getReferenceProps, getFloatingProps } = useInteractions([\n click,\n dismiss,\n role,\n ]);\n\n const contextValue: DropdownMenuContextValue = React.useMemo(\n () => ({\n open: currentOpen,\n onOpenChange: handleOpenChange,\n refs,\n floatingStyles,\n getReferenceProps,\n getFloatingProps,\n }),\n [\n currentOpen,\n handleOpenChange,\n refs,\n floatingStyles,\n getReferenceProps,\n getFloatingProps,\n ],\n );\n\n return (\n <DropdownMenuContext value={contextValue}>{children}</DropdownMenuContext>\n );\n}\n\nDropdownMenu.displayName = \"DropdownMenu\";\n\nexport { DropdownMenu };\n","import * as React from \"react\";\nimport { Slot, composeRefs } from \"@nuka/utils/slot\";\nimport { useDropdownMenuContext } from \"@nuka/components/DropdownMenu/DropdownMenu.context\";\n\nexport interface DropdownMenuTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n asChild?: boolean;\n}\n\nconst DropdownMenuTrigger = React.forwardRef<\n HTMLButtonElement,\n DropdownMenuTriggerProps\n>(({ asChild = false, children, ...props }, ref) => {\n const ctx = useDropdownMenuContext();\n const composedRef = composeRefs(ref, ctx.refs.setReference);\n const Comp = asChild ? Slot : \"button\";\n const triggerProps = ctx.getReferenceProps(props);\n\n return (\n <Comp\n ref={composedRef}\n type={asChild ? undefined : \"button\"}\n aria-haspopup=\"menu\"\n aria-expanded={ctx.open}\n // Safe: Floating UI's getReferenceProps() returns Record<string, unknown>;\n // values are standard DOM event handlers (onClick, onKeyDown, etc.).\n {...(triggerProps as React.ButtonHTMLAttributes<HTMLButtonElement>)}\n >\n {children}\n </Comp>\n );\n});\n\nDropdownMenuTrigger.displayName = \"DropdownMenuTrigger\";\n\nexport { DropdownMenuTrigger };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { composeRefs } from \"@nuka/utils/slot\";\nimport { useMenuNavigation } from \"@nuka/hooks/use-menu-navigation\";\nimport { Portal } from \"@nuka/utils/portal\";\nimport { menuContentVariants } from \"@nuka/components/Menu/menuItemVariants\";\nimport {\n MenuItemContext,\n useAutoFocusFirstItem,\n} from \"@nuka/components/Menu/MenuContentBase\";\nimport { useDropdownMenuContext } from \"@nuka/components/DropdownMenu/DropdownMenu.context\";\n\nexport interface DropdownMenuContentProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst DropdownMenuContent = React.forwardRef<\n HTMLDivElement,\n DropdownMenuContentProps\n>(({ className, children, ...props }, ref) => {\n const ctx = useDropdownMenuContext();\n const contentRef = React.useRef<HTMLDivElement>(null);\n const composedRef = composeRefs(ref, contentRef, ctx.refs.setFloating);\n\n const { getItemProps, focusItem, itemsRef } = useMenuNavigation({\n onEscape: () => ctx.onOpenChange(false),\n onTab: () => ctx.onOpenChange(false),\n });\n\n const itemIndexRef = React.useRef(0);\n\n useAutoFocusFirstItem(ctx.open, focusItem, itemsRef, itemIndexRef);\n\n if (!ctx.open) return null;\n\n itemIndexRef.current = 0;\n\n const floatingProps = ctx.getFloatingProps(props);\n\n return (\n <Portal>\n <MenuItemContext\n value={{\n getItemProps,\n indexRef: itemIndexRef,\n close: () => ctx.onOpenChange(false),\n }}\n >\n <div\n ref={composedRef}\n style={ctx.floatingStyles}\n data-state=\"open\"\n {...floatingProps}\n className={cn(menuContentVariants(), className)}\n >\n {children}\n </div>\n </MenuItemContext>\n </Portal>\n );\n});\n\nDropdownMenuContent.displayName = \"DropdownMenuContent\";\n\nexport { DropdownMenuContent };\n","import * as React from \"react\";\nimport { MenuItemWithNav } from \"@nuka/components/Menu/MenuContentBase\";\nimport type { MenuItemWithNavProps } from \"@nuka/components/Menu/MenuContentBase\";\n\nexport type DropdownMenuItemProps = MenuItemWithNavProps;\n\nconst DropdownMenuItem = React.forwardRef<\n HTMLDivElement,\n DropdownMenuItemProps\n>((props, ref) => <MenuItemWithNav ref={ref} {...props} />);\n\nDropdownMenuItem.displayName = \"DropdownMenuItem\";\n\nexport { DropdownMenuItem };\n","import * as React from \"react\";\nimport { MenuCheckboxItemWithNav } from \"@nuka/components/Menu/MenuContentBase\";\nimport type { MenuCheckboxItemWithNavProps } from \"@nuka/components/Menu/MenuContentBase\";\n\nexport type DropdownMenuCheckboxItemProps = MenuCheckboxItemWithNavProps;\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n HTMLDivElement,\n DropdownMenuCheckboxItemProps\n>((props, ref) => <MenuCheckboxItemWithNav ref={ref} {...props} />);\n\nDropdownMenuCheckboxItem.displayName = \"DropdownMenuCheckboxItem\";\n\nexport { DropdownMenuCheckboxItem };\n","import * as React from \"react\";\nimport { MenuRadioGroupBase } from \"@nuka/components/Menu/MenuRadioGroupBase\";\nimport type { MenuRadioGroupBaseProps } from \"@nuka/components/Menu/MenuRadioGroupBase\";\n\nexport interface DropdownMenuRadioGroupProps extends MenuRadioGroupBaseProps {}\n\nconst DropdownMenuRadioGroup = React.forwardRef<\n HTMLDivElement,\n DropdownMenuRadioGroupProps\n>((props, ref) => <MenuRadioGroupBase ref={ref} {...props} />);\n\nDropdownMenuRadioGroup.displayName = \"DropdownMenuRadioGroup\";\n\nexport { DropdownMenuRadioGroup };\n","import * as React from \"react\";\nimport { MenuRadioItemWithNav } from \"@nuka/components/Menu/MenuContentBase\";\nimport type { MenuRadioItemWithNavProps } from \"@nuka/components/Menu/MenuContentBase\";\n\nexport type DropdownMenuRadioItemProps = MenuRadioItemWithNavProps;\n\nconst DropdownMenuRadioItem = React.forwardRef<\n HTMLDivElement,\n DropdownMenuRadioItemProps\n>((props, ref) => <MenuRadioItemWithNav ref={ref} {...props} />);\n\nDropdownMenuRadioItem.displayName = \"DropdownMenuRadioItem\";\n\nexport { DropdownMenuRadioItem };\n","import * as React from \"react\";\nimport { MenuSeparatorBase } from \"@nuka/components/Menu/MenuSeparatorBase\";\n\nexport interface DropdownMenuSeparatorProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst DropdownMenuSeparator = React.forwardRef<\n HTMLDivElement,\n DropdownMenuSeparatorProps\n>((props, ref) => <MenuSeparatorBase ref={ref} {...props} />);\n\nDropdownMenuSeparator.displayName = \"DropdownMenuSeparator\";\n\nexport { DropdownMenuSeparator };\n","import * as React from \"react\";\nimport { MenuLabelBase } from \"@nuka/components/Menu/MenuLabelBase\";\n\nexport interface DropdownMenuLabelProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst DropdownMenuLabel = React.forwardRef<\n HTMLDivElement,\n DropdownMenuLabelProps\n>((props, ref) => <MenuLabelBase ref={ref} {...props} />);\n\nDropdownMenuLabel.displayName = \"DropdownMenuLabel\";\n\nexport { DropdownMenuLabel };\n","import * as React from \"react\";\nimport { Slot } from \"@nuka/utils/slot\";\nimport { cn } from \"@nuka/utils/cn\";\nimport {\n resolveResponsiveClasses,\n gapClasses,\n colGapClasses,\n rowGapClasses,\n colsClasses,\n} from \"@nuka/utils/responsive\";\nimport type { Responsive, GapScale, ColCount } from \"@nuka/utils/responsive\";\n\nexport interface GridProps extends React.HTMLAttributes<HTMLDivElement> {\n cols?: Responsive<ColCount>;\n gap?: Responsive<GapScale>;\n colGap?: Responsive<GapScale>;\n rowGap?: Responsive<GapScale>;\n asChild?: boolean;\n}\n\nconst Grid = React.forwardRef<HTMLDivElement, GridProps>(\n (\n {\n className,\n cols = 1,\n gap = \"none\",\n colGap,\n rowGap,\n asChild = false,\n ...props\n },\n ref,\n ) => {\n const Comp = asChild ? Slot : \"div\";\n\n return (\n <Comp\n ref={ref}\n className={cn(\n \"grid\",\n ...resolveResponsiveClasses(cols, colsClasses),\n ...resolveResponsiveClasses(gap, gapClasses),\n ...resolveResponsiveClasses(colGap, colGapClasses),\n ...resolveResponsiveClasses(rowGap, rowGapClasses),\n className,\n )}\n {...props}\n />\n );\n },\n);\n\nGrid.displayName = \"Grid\";\n\nexport { Grid };\n","import { cva, type VariantProps } from \"@nuka/utils/variants\";\n\nexport const kbdVariants = cva(\n [\n \"inline-flex items-center justify-center\",\n \"font-mono\",\n \"rounded-(--radius-sm)\",\n \"border border-(--nuka-border-base)\",\n \"bg-(--nuka-bg-subtle)\",\n \"text-(--nuka-text-base)\",\n ],\n {\n variants: {\n size: {\n sm: \"min-h-5 px-(--space-1) text-[length:var(--font-size-xs)] leading-(--line-height-normal)\",\n md: \"min-h-6 px-(--space-2) text-[length:var(--font-size-sm)] leading-(--line-height-normal)\",\n lg: \"min-h-8 px-(--space-3) text-[length:var(--font-size-md)] leading-(--line-height-normal)\",\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n },\n);\n\nexport type KbdVariantProps = VariantProps<typeof kbdVariants>;\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport {\n kbdVariants,\n type KbdVariantProps,\n} from \"@nuka/components/Kbd/Kbd.variants\";\n\nexport interface KbdProps\n extends React.HTMLAttributes<HTMLElement>, KbdVariantProps {}\n\nconst Kbd = React.forwardRef<HTMLElement, KbdProps>(\n ({ className, size, ...props }, ref) => {\n return (\n <kbd\n ref={ref}\n className={cn(kbdVariants({ size }), className)}\n {...props}\n />\n );\n },\n);\n\nKbd.displayName = \"Kbd\";\n\nexport { Kbd, kbdVariants };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { useFormField } from \"@nuka/components/FormField\";\n\nexport interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {\n required?: boolean;\n}\n\nconst Label = React.forwardRef<HTMLLabelElement, LabelProps>(\n ({ className, children, required, id, htmlFor, ...props }, ref) => {\n const ctx = useFormField();\n\n const resolvedId = id ?? (ctx.labelId || undefined);\n const resolvedHtmlFor = htmlFor ?? (ctx.fieldId || undefined);\n const resolvedRequired = required ?? ctx.required;\n\n return (\n <label\n ref={ref}\n id={resolvedId}\n htmlFor={resolvedHtmlFor}\n className={cn(\n \"text-sm font-medium leading-none text-(--nuka-text-base)\",\n className,\n )}\n {...props}\n >\n {children}\n {resolvedRequired && (\n <span\n aria-hidden=\"true\"\n className=\"ml-(--space-1) text-(--nuka-danger-text)\"\n >\n *\n </span>\n )}\n </label>\n );\n },\n);\n\nLabel.displayName = \"Label\";\n\nexport { Label };\n","import * as React from \"react\";\nimport type { useFloating, useInteractions } from \"@floating-ui/react\";\n\nexport interface MenubarContextValue {\n openValue: string | null;\n openMenu: (value: string) => void;\n closeMenu: () => void;\n triggerRefs: React.RefObject<Map<string, HTMLButtonElement>>;\n registerTrigger: (value: string, el: HTMLButtonElement | null) => void;\n menuValues: React.RefObject<string[]>;\n registerMenu: (value: string) => void;\n}\n\nconst MenubarContext = React.createContext<MenubarContextValue | undefined>(\n undefined,\n);\n\nfunction useMenubarContext(): MenubarContextValue {\n const context = React.useContext(MenubarContext);\n if (context === undefined) {\n throw new Error(\n \"useMenubarContext must be used within a <Menubar> component\",\n );\n }\n return context;\n}\n\nexport interface MenubarMenuContextValue {\n value: string;\n open: boolean;\n onOpenChange: (open: boolean) => void;\n refs: ReturnType<typeof useFloating>[\"refs\"];\n floatingStyles: React.CSSProperties;\n getReferenceProps: ReturnType<typeof useInteractions>[\"getReferenceProps\"];\n getFloatingProps: ReturnType<typeof useInteractions>[\"getFloatingProps\"];\n}\n\nconst MenubarMenuContext = React.createContext<\n MenubarMenuContextValue | undefined\n>(undefined);\n\nfunction useMenubarMenuContext(): MenubarMenuContextValue {\n const context = React.useContext(MenubarMenuContext);\n if (context === undefined) {\n throw new Error(\n \"useMenubarMenuContext must be used within a <MenubarMenu> component\",\n );\n }\n return context;\n}\n\nexport {\n MenubarContext,\n useMenubarContext,\n MenubarMenuContext,\n useMenubarMenuContext,\n};\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { MenubarContext } from \"@nuka/components/Menubar/Menubar.context\";\nimport type { MenubarContextValue } from \"@nuka/components/Menubar/Menubar.context\";\n\nexport interface MenubarProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst Menubar = React.forwardRef<HTMLDivElement, MenubarProps>(\n ({ className, children, ...props }, ref) => {\n const [openValue, setOpenValue] = React.useState<string | null>(null);\n const triggerRefs = React.useRef(new Map<string, HTMLButtonElement>());\n const menuValues = React.useRef<string[]>([]);\n\n const registerTrigger = React.useCallback(\n (value: string, el: HTMLButtonElement | null) => {\n if (el) {\n triggerRefs.current.set(value, el);\n } else {\n triggerRefs.current.delete(value);\n }\n },\n [],\n );\n\n const registerMenu = React.useCallback((value: string) => {\n if (!menuValues.current.includes(value)) {\n menuValues.current.push(value);\n }\n }, []);\n\n const openMenu = React.useCallback((value: string) => {\n setOpenValue(value);\n }, []);\n\n const closeMenu = React.useCallback(() => {\n setOpenValue(null);\n }, []);\n\n const contextValue: MenubarContextValue = React.useMemo(\n () => ({\n openValue,\n openMenu,\n closeMenu,\n triggerRefs,\n registerTrigger,\n menuValues,\n registerMenu,\n }),\n [openValue, openMenu, closeMenu, registerTrigger, registerMenu],\n );\n\n return (\n <MenubarContext value={contextValue}>\n <div\n ref={ref}\n role=\"menubar\"\n className={cn(\n \"inline-flex items-center gap-(--space-1)\",\n \"rounded-(--radius-md) border border-(--nuka-border-base)\",\n \"bg-(--nuka-bg-base) p-(--space-1)\",\n className,\n )}\n {...props}\n >\n {children}\n </div>\n </MenubarContext>\n );\n },\n);\n\nMenubar.displayName = \"Menubar\";\n\nexport { Menubar };\n","import * as React from \"react\";\nimport {\n useFloating,\n useClick,\n useDismiss,\n useRole,\n useInteractions,\n offset,\n flip,\n shift,\n autoUpdate,\n} from \"@floating-ui/react\";\nimport {\n useMenubarContext,\n MenubarMenuContext,\n} from \"@nuka/components/Menubar/Menubar.context\";\nimport type { MenubarMenuContextValue } from \"@nuka/components/Menubar/Menubar.context\";\n\nexport interface MenubarMenuProps {\n value: string;\n children: React.ReactNode;\n}\n\nfunction MenubarMenu({ value, children }: MenubarMenuProps) {\n const bar = useMenubarContext();\n\n React.useEffect(() => {\n bar.registerMenu(value);\n }, [bar, value]);\n\n const open = bar.openValue === value;\n\n const handleOpenChange = React.useCallback(\n (next: boolean) => {\n if (next) {\n bar.openMenu(value);\n } else {\n bar.closeMenu();\n }\n },\n [bar, value],\n );\n\n const { refs, floatingStyles, context } = useFloating({\n open,\n onOpenChange: handleOpenChange,\n placement: \"bottom-start\",\n middleware: [offset(4), flip(), shift({ padding: 8 })],\n whileElementsMounted: autoUpdate,\n });\n\n const click = useClick(context);\n const dismiss = useDismiss(context);\n const role = useRole(context, { role: \"menu\" });\n\n const { getReferenceProps, getFloatingProps } = useInteractions([\n click,\n dismiss,\n role,\n ]);\n\n const menuContextValue: MenubarMenuContextValue = React.useMemo(\n () => ({\n value,\n open,\n onOpenChange: handleOpenChange,\n refs,\n floatingStyles,\n getReferenceProps,\n getFloatingProps,\n }),\n [\n value,\n open,\n handleOpenChange,\n refs,\n floatingStyles,\n getReferenceProps,\n getFloatingProps,\n ],\n );\n\n return (\n <MenubarMenuContext value={menuContextValue}>{children}</MenubarMenuContext>\n );\n}\n\nMenubarMenu.displayName = \"MenubarMenu\";\n\nexport { MenubarMenu };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { composeRefs } from \"@nuka/utils/slot\";\nimport {\n useMenubarContext,\n useMenubarMenuContext,\n} from \"@nuka/components/Menubar/Menubar.context\";\n\nexport interface MenubarTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {}\n\nconst MenubarTrigger = React.forwardRef<HTMLButtonElement, MenubarTriggerProps>(\n ({ className, children, onKeyDown, ...props }, ref) => {\n const bar = useMenubarContext();\n const menu = useMenubarMenuContext();\n const composedRef = composeRefs(\n ref,\n menu.refs.setReference,\n (el: HTMLButtonElement | null) => {\n bar.registerTrigger(menu.value, el);\n },\n );\n\n const getAdjacentValue = (direction: -1 | 1): string | undefined => {\n const values = bar.menuValues.current;\n const currentIndex = values.indexOf(menu.value);\n if (currentIndex === -1) return undefined;\n const nextIndex =\n (currentIndex + direction + values.length) % values.length;\n return values[nextIndex];\n };\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLButtonElement>) => {\n onKeyDown?.(e);\n\n if (e.key === \"ArrowRight\") {\n e.preventDefault();\n const nextValue = getAdjacentValue(1);\n if (nextValue !== undefined) {\n if (menu.open) {\n bar.openMenu(nextValue);\n }\n bar.triggerRefs.current.get(nextValue)?.focus();\n }\n } else if (e.key === \"ArrowLeft\") {\n e.preventDefault();\n const prevValue = getAdjacentValue(-1);\n if (prevValue !== undefined) {\n if (menu.open) {\n bar.openMenu(prevValue);\n }\n bar.triggerRefs.current.get(prevValue)?.focus();\n }\n } else if (e.key === \"ArrowDown\") {\n e.preventDefault();\n if (!menu.open) {\n bar.openMenu(menu.value);\n }\n }\n };\n\n const triggerProps = menu.getReferenceProps({\n ...props,\n onKeyDown: handleKeyDown,\n });\n\n return (\n <button\n ref={composedRef}\n type=\"button\"\n role=\"menuitem\"\n aria-haspopup=\"menu\"\n aria-expanded={menu.open}\n className={cn(\n \"inline-flex items-center justify-center\",\n \"rounded-(--radius-sm) px-(--space-3) py-(--space-1.5)\",\n \"text-sm font-medium\",\n \"text-(--nuka-text-base)\",\n \"select-none cursor-default\",\n \"hover:bg-(--nuka-bg-muted)\",\n \"focus-visible:bg-(--nuka-bg-muted)\",\n \"focus-visible:outline-2 focus-visible:outline-offset-2\",\n \"focus-visible:outline-(--nuka-border-focus)\",\n \"data-[state=open]:bg-(--nuka-bg-muted)\",\n className,\n )}\n data-state={menu.open ? \"open\" : \"closed\"}\n // Safe: Floating UI getReferenceProps() returns Record<string, unknown>;\n // values are standard DOM event handlers.\n {...(triggerProps as React.ButtonHTMLAttributes<HTMLButtonElement>)}\n >\n {children}\n </button>\n );\n },\n);\n\nMenubarTrigger.displayName = \"MenubarTrigger\";\n\nexport { MenubarTrigger };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { composeRefs } from \"@nuka/utils/slot\";\nimport { Portal } from \"@nuka/utils/portal\";\nimport { useMenuNavigation } from \"@nuka/hooks/use-menu-navigation\";\nimport {\n useMenubarContext,\n useMenubarMenuContext,\n} from \"@nuka/components/Menubar/Menubar.context\";\nimport { menuContentVariants } from \"@nuka/components/Menu/menuItemVariants\";\nimport {\n MenuItemContext,\n useAutoFocusFirstItem,\n} from \"@nuka/components/Menu/MenuContentBase\";\n\nexport interface MenubarContentProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst MenubarContent = React.forwardRef<HTMLDivElement, MenubarContentProps>(\n ({ className, children, ...props }, ref) => {\n const bar = useMenubarContext();\n const menu = useMenubarMenuContext();\n const contentRef = React.useRef<HTMLDivElement>(null);\n const composedRef = composeRefs(ref, contentRef, menu.refs.setFloating);\n\n const handleEscape = React.useCallback(() => {\n menu.onOpenChange(false);\n bar.triggerRefs.current.get(menu.value)?.focus();\n }, [menu, bar]);\n\n const handleTab = React.useCallback(() => {\n menu.onOpenChange(false);\n }, [menu]);\n\n const { getItemProps, focusItem, itemsRef } = useMenuNavigation({\n onEscape: handleEscape,\n onTab: handleTab,\n });\n\n const itemIndexRef = React.useRef(0);\n\n const handleArrowToAdjacentMenu = React.useCallback(\n (direction: -1 | 1) => {\n const values = bar.menuValues.current;\n const currentIndex = values.indexOf(menu.value);\n if (currentIndex === -1) return;\n const nextIndex =\n (currentIndex + direction + values.length) % values.length;\n const nextValue = values[nextIndex];\n if (nextValue !== undefined) {\n bar.openMenu(nextValue);\n bar.triggerRefs.current.get(nextValue)?.focus();\n }\n },\n [bar, menu.value],\n );\n\n useAutoFocusFirstItem(menu.open, focusItem, itemsRef, itemIndexRef);\n\n if (!menu.open) return null;\n\n itemIndexRef.current = 0;\n\n const floatingProps = menu.getFloatingProps(props);\n\n return (\n <Portal>\n <MenuItemContext\n value={{\n getItemProps,\n indexRef: itemIndexRef,\n close: () => menu.onOpenChange(false),\n onArrowLeft: () => handleArrowToAdjacentMenu(-1),\n onArrowRight: () => handleArrowToAdjacentMenu(1),\n }}\n >\n <div\n ref={composedRef}\n style={menu.floatingStyles}\n data-state=\"open\"\n {...floatingProps}\n className={cn(menuContentVariants(), className)}\n >\n {children}\n </div>\n </MenuItemContext>\n </Portal>\n );\n },\n);\n\nMenubarContent.displayName = \"MenubarContent\";\n\nexport { MenubarContent };\n","import * as React from \"react\";\nimport { MenuItemWithNav } from \"@nuka/components/Menu/MenuContentBase\";\nimport type { MenuItemWithNavProps } from \"@nuka/components/Menu/MenuContentBase\";\n\nexport type MenubarItemProps = MenuItemWithNavProps;\n\nconst MenubarItem = React.forwardRef<HTMLDivElement, MenubarItemProps>(\n (props, ref) => <MenuItemWithNav ref={ref} {...props} />,\n);\n\nMenubarItem.displayName = \"MenubarItem\";\n\nexport { MenubarItem };\n","import * as React from \"react\";\nimport { MenuCheckboxItemWithNav } from \"@nuka/components/Menu/MenuContentBase\";\nimport type { MenuCheckboxItemWithNavProps } from \"@nuka/components/Menu/MenuContentBase\";\n\nexport type MenubarCheckboxItemProps = MenuCheckboxItemWithNavProps;\n\nconst MenubarCheckboxItem = React.forwardRef<\n HTMLDivElement,\n MenubarCheckboxItemProps\n>((props, ref) => <MenuCheckboxItemWithNav ref={ref} {...props} />);\n\nMenubarCheckboxItem.displayName = \"MenubarCheckboxItem\";\n\nexport { MenubarCheckboxItem };\n","import * as React from \"react\";\nimport { MenuRadioGroupBase } from \"@nuka/components/Menu/MenuRadioGroupBase\";\nimport type { MenuRadioGroupBaseProps } from \"@nuka/components/Menu/MenuRadioGroupBase\";\n\nexport interface MenubarRadioGroupProps extends MenuRadioGroupBaseProps {}\n\nconst MenubarRadioGroup = React.forwardRef<\n HTMLDivElement,\n MenubarRadioGroupProps\n>((props, ref) => <MenuRadioGroupBase ref={ref} {...props} />);\n\nMenubarRadioGroup.displayName = \"MenubarRadioGroup\";\n\nexport { MenubarRadioGroup };\n","import * as React from \"react\";\nimport { MenuRadioItemWithNav } from \"@nuka/components/Menu/MenuContentBase\";\nimport type { MenuRadioItemWithNavProps } from \"@nuka/components/Menu/MenuContentBase\";\n\nexport type MenubarRadioItemProps = MenuRadioItemWithNavProps;\n\nconst MenubarRadioItem = React.forwardRef<\n HTMLDivElement,\n MenubarRadioItemProps\n>((props, ref) => <MenuRadioItemWithNav ref={ref} {...props} />);\n\nMenubarRadioItem.displayName = \"MenubarRadioItem\";\n\nexport { MenubarRadioItem };\n","import * as React from \"react\";\nimport { MenuSeparatorBase } from \"@nuka/components/Menu/MenuSeparatorBase\";\n\nexport interface MenubarSeparatorProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst MenubarSeparator = React.forwardRef<\n HTMLDivElement,\n MenubarSeparatorProps\n>((props, ref) => <MenuSeparatorBase ref={ref} {...props} />);\n\nMenubarSeparator.displayName = \"MenubarSeparator\";\n\nexport { MenubarSeparator };\n","import * as React from \"react\";\n\nexport interface SelectContextValue {\n open: boolean;\n value: string | undefined;\n highlightedValue: string | undefined;\n disabled: boolean;\n listboxId: string;\n onOpenChange: (open: boolean) => void;\n onValueChange: (value: string) => void;\n onHighlightChange: (value: string | undefined) => void;\n registerOption: (\n value: string,\n label: string,\n ref: HTMLElement | null,\n ) => void;\n unregisterOption: (value: string) => void;\n getOptions: () => string[];\n getOptionLabel: (value: string) => string | undefined;\n getOptionRef: (value: string) => HTMLElement | null | undefined;\n isOptionDisabled: (value: string) => boolean;\n registerDisabledOption: (value: string, disabled: boolean) => void;\n}\n\nconst SelectContext = React.createContext<SelectContextValue | undefined>(\n undefined,\n);\n\nexport function useSelect(): SelectContextValue {\n const context = React.useContext(SelectContext);\n if (context === undefined) {\n throw new Error(\"useSelect must be used within a <Select> component\");\n }\n return context;\n}\n\nexport { SelectContext };\n","import * as React from \"react\";\nimport { useControllableState } from \"@nuka/hooks/use-controllable-state\";\nimport { composeRefs } from \"@nuka/utils/slot\";\nimport { SelectContext } from \"@nuka/components/Select/Select.context\";\nimport type { SelectContextValue } from \"@nuka/components/Select/Select.context\";\n\nexport interface SelectProps {\n children: React.ReactNode;\n value?: string | undefined;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n disabled?: boolean;\n name?: string;\n}\n\ninterface OptionEntry {\n label: string;\n ref: HTMLElement | null;\n disabled: boolean;\n}\n\nconst Select = React.forwardRef<HTMLDivElement, SelectProps>(\n (\n {\n children,\n value: controlledValue,\n defaultValue,\n onValueChange,\n open: controlledOpen,\n defaultOpen = false,\n onOpenChange,\n disabled = false,\n name,\n },\n ref,\n ) => {\n const [currentValue, handleValueChange] = useControllableState(\n controlledValue,\n defaultValue,\n onValueChange,\n );\n const [currentOpen, setOpen] = useControllableState(\n controlledOpen,\n defaultOpen,\n onOpenChange,\n );\n const [highlightedValue, setHighlightedValue] = React.useState<\n string | undefined\n >(undefined);\n\n const optionsRef = React.useRef(new Map<string, OptionEntry>());\n const [registryVersion, setRegistryVersion] = React.useState(0);\n const bumpRegistry = React.useCallback(() => {\n setRegistryVersion((v) => v + 1);\n }, []);\n const rootRef = React.useRef<HTMLDivElement>(null);\n\n const generatedId = React.useId();\n const listboxId = `${generatedId}-listbox`;\n\n const handleOpenChange = React.useCallback(\n (nextOpen: boolean) => {\n setOpen(nextOpen);\n if (!nextOpen) {\n setHighlightedValue(undefined);\n }\n },\n [setOpen],\n );\n\n const registerOption = React.useCallback(\n (optionValue: string, label: string, ref: HTMLElement | null) => {\n const existing = optionsRef.current.get(optionValue);\n optionsRef.current.set(optionValue, {\n label,\n ref,\n disabled: existing?.disabled ?? false,\n });\n bumpRegistry();\n },\n [bumpRegistry],\n );\n\n const unregisterOption = React.useCallback(\n (optionValue: string) => {\n optionsRef.current.delete(optionValue);\n bumpRegistry();\n },\n [bumpRegistry],\n );\n\n const getOptions = React.useCallback((): string[] => {\n return Array.from(optionsRef.current.keys());\n }, []);\n\n const getOptionLabel = React.useCallback(\n (optionValue: string): string | undefined => {\n return optionsRef.current.get(optionValue)?.label;\n },\n [],\n );\n\n const getOptionRef = React.useCallback(\n (optionValue: string): HTMLElement | null | undefined => {\n return optionsRef.current.get(optionValue)?.ref;\n },\n [],\n );\n\n const isOptionDisabled = React.useCallback(\n (optionValue: string): boolean => {\n return optionsRef.current.get(optionValue)?.disabled ?? false;\n },\n [],\n );\n\n const registerDisabledOption = React.useCallback(\n (optionValue: string, optionDisabled: boolean) => {\n const existing = optionsRef.current.get(optionValue);\n if (existing) {\n existing.disabled = optionDisabled;\n }\n },\n [],\n );\n\n // TODO: extract to useOutsideClick or migrate to Floating UI useDismiss\n // when SelectContent moves to Portal rendering (deferred from audit batch 2).\n // Close on outside click. Manual listener because Select uses absolute\n // positioning (ADR-013), not Floating UI. A Portal + useFloating refactor\n // would unify this with useDismiss but requires rearchitecting SelectContent.\n React.useEffect(() => {\n if (!currentOpen) return;\n\n const handleMouseDown = (e: MouseEvent) => {\n if (rootRef.current && !rootRef.current.contains(e.target as Node)) {\n handleOpenChange(false);\n }\n };\n\n document.addEventListener(\"mousedown\", handleMouseDown);\n return () => {\n document.removeEventListener(\"mousedown\", handleMouseDown);\n };\n }, [currentOpen, handleOpenChange]);\n\n const contextValue: SelectContextValue = React.useMemo(() => {\n // registryVersion is read to invalidate the memo when options register/unregister\n void registryVersion;\n return {\n open: currentOpen,\n value: currentValue,\n highlightedValue,\n disabled,\n listboxId,\n onOpenChange: handleOpenChange,\n onValueChange: handleValueChange,\n onHighlightChange: setHighlightedValue,\n registerOption,\n unregisterOption,\n getOptions,\n getOptionLabel,\n getOptionRef,\n isOptionDisabled,\n registerDisabledOption,\n };\n }, [\n currentOpen,\n currentValue,\n highlightedValue,\n disabled,\n listboxId,\n handleOpenChange,\n handleValueChange,\n registerOption,\n unregisterOption,\n getOptions,\n getOptionLabel,\n getOptionRef,\n isOptionDisabled,\n registerDisabledOption,\n registryVersion,\n ]);\n\n return (\n <SelectContext value={contextValue}>\n <div\n ref={composeRefs(ref, rootRef)}\n className=\"relative inline-block w-full\"\n >\n {children}\n {name !== undefined && (\n <input type=\"hidden\" name={name} value={currentValue ?? \"\"} />\n )}\n </div>\n </SelectContext>\n );\n },\n);\n\nSelect.displayName = \"Select\";\n\nexport { Select };\n","import { cva, type VariantProps } from \"@nuka/utils/variants\";\n\nexport const selectTriggerVariants = cva(\n [\n \"w-full\",\n \"inline-flex items-center justify-between\",\n \"rounded-(--radius-md)\",\n \"border\",\n \"bg-(--nuka-input-bg)\",\n \"text-(--nuka-text-base)\",\n \"text-left\",\n \"focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--nuka-border-focus)\",\n \"disabled:cursor-not-allowed disabled:opacity-50\",\n \"transition-colors duration-150\",\n ],\n {\n variants: {\n intent: {\n default:\n \"border-(--nuka-input-border) hover:border-(--nuka-input-border-hover)\",\n danger: \"border-(--nuka-danger-border)\",\n success: \"border-(--nuka-success-border)\",\n warning: \"border-(--nuka-warning-border)\",\n },\n size: {\n sm: \"px-(--space-3) py-(--space-2) text-xs\",\n md: \"px-(--space-4) py-(--space-3) text-sm\",\n lg: \"px-(--space-6) py-(--space-4) text-base\",\n },\n },\n defaultVariants: {\n intent: \"default\",\n size: \"md\",\n },\n },\n);\n\nexport type SelectTriggerVariantProps = VariantProps<\n typeof selectTriggerVariants\n>;\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Icon } from \"@nuka/components/Icon\";\nimport { useSelect } from \"@nuka/components/Select/Select.context\";\nimport { useFormField } from \"@nuka/components/FormField\";\nimport { useFormFieldProps } from \"@nuka/hooks/use-form-field-props\";\nimport {\n selectTriggerVariants,\n type SelectTriggerVariantProps,\n} from \"@nuka/components/Select/SelectTrigger.variants\";\n\nexport interface SelectTriggerProps\n extends\n Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, \"children\">,\n SelectTriggerVariantProps {\n placeholder?: string;\n}\n\nconst TYPEAHEAD_TIMEOUT = 300;\n\nconst SelectTrigger = React.forwardRef<HTMLButtonElement, SelectTriggerProps>(\n (\n { className, placeholder, intent, size, disabled: disabledProp, ...props },\n ref,\n ) => {\n const ctx = useSelect();\n const formCtx = useFormField();\n\n const field = useFormFieldProps({\n id: props.id,\n \"aria-invalid\": props[\"aria-invalid\"],\n \"aria-describedby\": props[\"aria-describedby\"],\n \"aria-required\": props[\"aria-required\"],\n });\n\n const typeaheadBufferRef = React.useRef(\"\");\n const typeaheadTimerRef = React.useRef<\n ReturnType<typeof setTimeout> | undefined\n >(undefined);\n\n const resolvedDisabled = disabledProp ?? ctx.disabled;\n\n const ariaLabelledBy =\n props[\"aria-labelledby\"] ?? (formCtx.labelId || undefined);\n\n const displayLabel =\n ctx.value !== undefined ? ctx.getOptionLabel(ctx.value) : undefined;\n\n // Fallback aria-label when no aria-labelledby provides a name.\n // role=\"combobox\" has nameFrom:author, so text content alone won't work.\n const ariaLabel =\n props[\"aria-label\"] ??\n (ariaLabelledBy === undefined\n ? (displayLabel ?? placeholder ?? \"Select\")\n : undefined);\n\n const getEnabledOptions = React.useCallback((): string[] => {\n return ctx.getOptions().filter((v) => !ctx.isOptionDisabled(v));\n }, [ctx]);\n\n const highlightOption = React.useCallback(\n (optionValue: string | undefined) => {\n ctx.onHighlightChange(optionValue);\n if (optionValue !== undefined) {\n const optionEl = ctx.getOptionRef(optionValue);\n if (typeof optionEl?.scrollIntoView === \"function\") {\n optionEl.scrollIntoView({ block: \"nearest\" });\n }\n }\n },\n [ctx],\n );\n\n const selectHighlighted = React.useCallback(() => {\n if (ctx.highlightedValue !== undefined) {\n ctx.onValueChange(ctx.highlightedValue);\n ctx.onOpenChange(false);\n }\n }, [ctx]);\n\n const moveHighlight = React.useCallback(\n (direction: \"next\" | \"prev\" | \"first\" | \"last\") => {\n const options = getEnabledOptions();\n if (options.length === 0) return;\n\n const currentIndex =\n ctx.highlightedValue !== undefined\n ? options.indexOf(ctx.highlightedValue)\n : -1;\n\n let nextIndex: number;\n switch (direction) {\n case \"next\":\n nextIndex =\n currentIndex < options.length - 1 ? currentIndex + 1 : 0;\n break;\n case \"prev\":\n nextIndex =\n currentIndex > 0 ? currentIndex - 1 : options.length - 1;\n break;\n case \"first\":\n nextIndex = 0;\n break;\n case \"last\":\n nextIndex = options.length - 1;\n break;\n }\n\n const nextValue = options[nextIndex];\n if (nextValue !== undefined) {\n highlightOption(nextValue);\n }\n },\n [ctx.highlightedValue, getEnabledOptions, highlightOption],\n );\n\n const openAndHighlight = React.useCallback(\n (direction: \"first\" | \"last\" | \"current\") => {\n ctx.onOpenChange(true);\n const options = getEnabledOptions();\n if (options.length === 0) return;\n\n if (direction === \"current\" && ctx.value !== undefined) {\n const valueIndex = options.indexOf(ctx.value);\n if (valueIndex !== -1) {\n highlightOption(options[valueIndex]);\n return;\n }\n }\n\n if (direction === \"last\") {\n highlightOption(options[options.length - 1]);\n } else {\n highlightOption(options[0]);\n }\n },\n [ctx, getEnabledOptions, highlightOption],\n );\n\n const handleTypeahead = React.useCallback(\n (char: string) => {\n if (typeaheadTimerRef.current !== undefined) {\n clearTimeout(typeaheadTimerRef.current);\n }\n\n typeaheadBufferRef.current += char.toLowerCase();\n\n typeaheadTimerRef.current = setTimeout(() => {\n typeaheadBufferRef.current = \"\";\n }, TYPEAHEAD_TIMEOUT);\n\n const options = getEnabledOptions();\n const match = options.find((v) => {\n const label = ctx.getOptionLabel(v);\n return label?.toLowerCase().startsWith(typeaheadBufferRef.current);\n });\n\n if (match !== undefined) {\n if (!ctx.open) {\n ctx.onOpenChange(true);\n }\n highlightOption(match);\n }\n },\n [ctx, getEnabledOptions, highlightOption],\n );\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLButtonElement>) => {\n props.onKeyDown?.(e);\n if (e.defaultPrevented) return;\n\n switch (e.key) {\n case \"ArrowDown\":\n e.preventDefault();\n if (!ctx.open) {\n openAndHighlight(\"first\");\n } else {\n moveHighlight(\"next\");\n }\n break;\n\n case \"ArrowUp\":\n e.preventDefault();\n if (!ctx.open) {\n openAndHighlight(\"last\");\n } else {\n moveHighlight(\"prev\");\n }\n break;\n\n case \"Home\":\n if (ctx.open) {\n e.preventDefault();\n moveHighlight(\"first\");\n }\n break;\n\n case \"End\":\n if (ctx.open) {\n e.preventDefault();\n moveHighlight(\"last\");\n }\n break;\n\n case \"Enter\":\n e.preventDefault();\n if (!ctx.open) {\n openAndHighlight(\"current\");\n } else {\n selectHighlighted();\n }\n break;\n\n case \" \":\n e.preventDefault();\n if (!ctx.open) {\n openAndHighlight(\"current\");\n } else {\n selectHighlighted();\n }\n break;\n\n case \"Escape\":\n if (ctx.open) {\n e.preventDefault();\n ctx.onOpenChange(false);\n }\n break;\n\n case \"Tab\":\n if (ctx.open) {\n ctx.onOpenChange(false);\n // Do not preventDefault: allow Tab to move focus naturally\n }\n break;\n\n default:\n if (e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey) {\n handleTypeahead(e.key);\n }\n break;\n }\n };\n\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n props.onClick?.(e);\n if (e.defaultPrevented) return;\n ctx.onOpenChange(!ctx.open);\n if (!ctx.open) {\n // Opening: highlight current value or first option\n const options = getEnabledOptions();\n if (ctx.value !== undefined && options.includes(ctx.value)) {\n highlightOption(ctx.value);\n }\n }\n };\n\n // aria-activedescendant must be undefined (not empty string) when no highlight\n const ariaActiveDescendant =\n ctx.open && ctx.highlightedValue !== undefined\n ? `${ctx.listboxId}-option-${ctx.highlightedValue}`\n : undefined;\n\n return (\n <button\n {...props}\n ref={ref}\n type=\"button\"\n id={field.resolvedId}\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n aria-expanded={ctx.open}\n aria-controls={ctx.listboxId}\n aria-activedescendant={ariaActiveDescendant}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-invalid={field.ariaInvalid}\n aria-describedby={field.ariaDescribedBy}\n aria-required={field.ariaRequired}\n disabled={resolvedDisabled}\n className={cn(selectTriggerVariants({ intent, size }), className)}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n >\n <span\n className={cn(\n \"truncate\",\n displayLabel === undefined && \"text-(--nuka-text-muted)\",\n )}\n >\n {displayLabel ?? placeholder}\n </span>\n <Icon\n size=\"sm\"\n color=\"muted\"\n className={cn(\n \"transition-transform duration-150\",\n ctx.open && \"rotate-180\",\n )}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n </Icon>\n </button>\n );\n },\n);\n\nSelectTrigger.displayName = \"SelectTrigger\";\n\nexport { SelectTrigger, selectTriggerVariants };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { useSelect } from \"@nuka/components/Select/Select.context\";\n\nexport interface SelectContentProps {\n className?: string;\n children: React.ReactNode;\n}\n\n// TODO: migrate to Portal + Floating UI positioning to avoid overflow/stacking\n// context clipping (deferred from audit batch 2).\nconst SelectContent = React.forwardRef<HTMLDivElement, SelectContentProps>(\n ({ className, children }, ref) => {\n const ctx = useSelect();\n\n return (\n <div\n ref={ref}\n id={ctx.listboxId}\n role=\"listbox\"\n hidden={!ctx.open}\n className={cn(\n \"absolute left-0 w-full\",\n \"z-(--nuka-z-dropdown)\",\n \"bg-(--nuka-bg-base)\",\n \"border border-(--nuka-border-base)\",\n \"rounded-(--radius-md)\",\n \"shadow-md\",\n \"py-(--space-1)\",\n \"mt-(--space-1)\",\n \"max-h-60 overflow-y-auto\",\n className,\n )}\n >\n {children}\n </div>\n );\n },\n);\n\nSelectContent.displayName = \"SelectContent\";\n\nexport { SelectContent };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { composeRefs } from \"@nuka/utils/slot\";\nimport { useSelect } from \"@nuka/components/Select/Select.context\";\n\nexport interface SelectItemProps {\n value: string;\n disabled?: boolean;\n className?: string;\n children: React.ReactNode;\n}\n\nfunction getLabel(children: React.ReactNode): string {\n if (typeof children === \"string\") return children;\n if (typeof children === \"number\") return String(children);\n return \"\";\n}\n\nconst SelectItem = React.forwardRef<HTMLDivElement, SelectItemProps>(\n ({ value, disabled = false, className, children }, ref) => {\n const ctx = useSelect();\n const internalRef = React.useRef<HTMLDivElement>(null);\n const composedRef = composeRefs(ref, internalRef);\n\n const isSelected = ctx.value === value;\n const isHighlighted = ctx.highlightedValue === value;\n const optionId = `${ctx.listboxId}-option-${value}`;\n const label = getLabel(children);\n\n React.useLayoutEffect(() => {\n ctx.registerOption(value, label, internalRef.current);\n return () => {\n ctx.unregisterOption(value);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps -- register once on mount, unregister on unmount\n }, []);\n\n React.useEffect(() => {\n ctx.registerDisabledOption(value, disabled);\n }, [ctx, value, disabled]);\n\n const handleClick = () => {\n if (disabled) return;\n ctx.onValueChange(value);\n ctx.onOpenChange(false);\n };\n\n return (\n <div\n ref={composedRef}\n id={optionId}\n role=\"option\"\n aria-selected={isSelected}\n aria-disabled={disabled || undefined}\n className={cn(\n \"px-(--space-3) py-(--space-2)\",\n \"text-sm\",\n \"cursor-pointer\",\n \"select-none\",\n \"text-(--nuka-text-base)\",\n disabled && \"opacity-50 cursor-not-allowed pointer-events-none\",\n isSelected &&\n !isHighlighted &&\n \"bg-(--nuka-accent-bg-subtle) text-(--nuka-accent-text)\",\n isHighlighted && \"bg-(--nuka-bg-muted) outline-none\",\n !isSelected &&\n !isHighlighted &&\n !disabled &&\n \"hover:bg-(--nuka-bg-muted)\",\n className,\n )}\n onClick={handleClick}\n >\n {children}\n </div>\n );\n },\n);\n\nSelectItem.displayName = \"SelectItem\";\n\nexport { SelectItem };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\n\nexport interface SelectSeparatorProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst SelectSeparator = React.forwardRef<HTMLDivElement, SelectSeparatorProps>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n role=\"separator\"\n aria-orientation=\"horizontal\"\n className={cn(\"my-(--space-1) h-px bg-(--nuka-border-base)\", className)}\n {...props}\n />\n ),\n);\n\nSelectSeparator.displayName = \"SelectSeparator\";\n\nexport { SelectSeparator };\n","import { createContext, useContext } from \"react\";\n\nexport interface SheetContextValue {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n titleId: string;\n descriptionId: string;\n hasDescription: boolean;\n setHasDescription: (value: boolean) => void;\n}\n\nconst SheetContext = createContext<SheetContextValue | null>(null);\n\nfunction useSheetContext(): SheetContextValue {\n const context = useContext(SheetContext);\n if (context === null) {\n throw new Error(\"Sheet compound components must be used within <Sheet>\");\n }\n return context;\n}\n\nexport { SheetContext, useSheetContext };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { composeRefs } from \"@nuka/utils/slot\";\nimport { Portal } from \"@nuka/utils/portal\";\nimport { DismissButton } from \"@nuka/utils/dismiss-button\";\nimport { useFocusTrap } from \"@nuka/hooks/use-focus-trap\";\nimport { useScrollLock } from \"@nuka/hooks/use-scroll-lock\";\nimport {\n createModalPrimitive,\n useEscapeKey,\n useModalTitleWarning,\n} from \"@nuka/utils/modal-primitive\";\nimport type {\n ModalRootProps,\n ModalTriggerProps,\n ModalTitleProps,\n ModalDescriptionProps,\n ModalCloseProps,\n} from \"@nuka/utils/modal-primitive\";\nimport {\n SheetContext,\n useSheetContext,\n} from \"@nuka/components/Sheet/Sheet.context\";\n\nexport type SheetSide = \"top\" | \"right\" | \"bottom\" | \"left\";\n\nconst {\n Root: Sheet,\n Trigger: SheetTrigger,\n Title: SheetTitle,\n Description: SheetDescription,\n Close: SheetClose,\n} = createModalPrimitive({\n displayNamePrefix: \"Sheet\",\n closeLabel: \"Close sheet\",\n Context: SheetContext,\n useContext: useSheetContext,\n});\n\nexport type SheetProps = ModalRootProps;\nexport type SheetTriggerProps = ModalTriggerProps;\nexport type SheetTitleProps = ModalTitleProps;\nexport type SheetDescriptionProps = ModalDescriptionProps;\nexport type SheetCloseProps = ModalCloseProps;\n\nconst sideClasses: Record<SheetSide, string> = {\n right:\n \"inset-y-0 right-0 h-full w-3/4 max-w-sm translate-x-full data-[state=open]:translate-x-0 border-l\",\n left: \"inset-y-0 left-0 h-full w-3/4 max-w-sm -translate-x-full data-[state=open]:translate-x-0 border-r\",\n top: \"inset-x-0 top-0 w-full -translate-y-full data-[state=open]:translate-y-0 border-b\",\n bottom:\n \"inset-x-0 bottom-0 w-full translate-y-full data-[state=open]:translate-y-0 border-t\",\n};\n\nexport interface SheetContentProps extends React.HTMLAttributes<HTMLDivElement> {\n side?: SheetSide;\n}\n\nconst SheetContent = React.forwardRef<HTMLDivElement, SheetContentProps>(\n ({ side = \"right\", className, children, ...props }, ref) => {\n const ctx = useSheetContext();\n const panelRef = React.useRef<HTMLDivElement>(null);\n const composedRef = composeRefs(ref, panelRef);\n\n useFocusTrap(panelRef, ctx.open);\n useScrollLock(ctx.open);\n useModalTitleWarning(\"Sheet\", ctx.titleId, ctx.open);\n useEscapeKey(() => ctx.onOpenChange(false), ctx.open);\n\n if (!ctx.open) return null;\n\n return (\n <Portal>\n <div\n className={cn(\n \"fixed inset-0 z-(--nuka-z-modal)\",\n \"bg-(--nuka-bg-overlay)\",\n \"data-[state=open]:animate-[nuka-dialog-overlay-enter_150ms_ease-out]\",\n )}\n data-state=\"open\"\n onClick={() => ctx.onOpenChange(false)}\n aria-hidden=\"true\"\n />\n <div\n ref={composedRef}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby={ctx.titleId}\n aria-describedby={ctx.hasDescription ? ctx.descriptionId : undefined}\n tabIndex={-1}\n data-state=\"open\"\n data-side={side}\n className={cn(\n \"fixed z-(--nuka-z-modal)\",\n \"bg-(--nuka-bg-base) border-(--nuka-border-base) shadow-md\",\n \"p-(--space-6)\",\n \"transition-transform duration-300 ease-in-out\",\n \"motion-reduce:transition-none\",\n // Programmatic focus via useFocusTrap; :focus-visible does not activate, so this is inert\n \"focus-visible:outline-none\",\n sideClasses[side],\n className,\n )}\n {...props}\n >\n <DismissButton\n onClick={() => ctx.onOpenChange(false)}\n label=\"Close sheet\"\n className=\"absolute top-(--space-4) right-(--space-4) text-(--nuka-text-muted)\"\n />\n {children}\n </div>\n </Portal>\n );\n },\n);\n\nSheetContent.displayName = \"SheetContent\";\n\nexport {\n Sheet,\n SheetTrigger,\n SheetContent,\n SheetTitle,\n SheetDescription,\n SheetClose,\n};\n","import { cva } from \"@nuka/utils/variants\";\n\nexport const skeletonVariants = cva([\"animate-pulse bg-(--nuka-bg-muted)\"], {\n variants: {\n shape: {\n rect: \"rounded-(--radius-md)\",\n circle: \"rounded-full aspect-square\",\n text: \"rounded-(--radius-sm) h-[1em]\",\n },\n },\n defaultVariants: {\n shape: \"rect\",\n },\n});\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { skeletonVariants } from \"@nuka/components/Skeleton/Skeleton.variants\";\n\nexport interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement> {\n shape?: \"rect\" | \"circle\" | \"text\";\n}\n\nconst Skeleton = React.forwardRef<HTMLDivElement, SkeletonProps>(\n ({ className, shape, ...props }, ref) => {\n return (\n <div\n ref={ref}\n {...props}\n aria-hidden=\"true\"\n className={cn(skeletonVariants({ shape }), className)}\n />\n );\n },\n);\n\nSkeleton.displayName = \"Skeleton\";\n\nexport { Skeleton, skeletonVariants };\n","import { cva, type VariantProps } from \"@nuka/utils/variants\";\n\nexport const sliderWrapperVariants = cva(\n [\"relative flex items-center w-full\"],\n {\n variants: {\n size: {\n sm: \"min-h-[24px]\",\n md: \"min-h-[24px]\",\n lg: \"min-h-[24px]\",\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n },\n);\n\nexport const sliderTrackVariants = cva(\n [\"relative w-full rounded-full\", \"bg-(--nuka-border-base)\"],\n {\n variants: {\n size: {\n sm: \"h-1\",\n md: \"h-1.5\",\n lg: \"h-2\",\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n },\n);\n\nexport const sliderFillVariants = cva(\n [\n \"absolute left-0 top-0 h-full rounded-full\",\n \"transition-[width] duration-75\",\n ],\n {\n variants: {\n intent: {\n default: \"bg-(--nuka-accent-bg)\",\n danger: \"bg-(--nuka-danger-base)\",\n success: \"bg-(--nuka-success-base)\",\n warning: \"bg-(--nuka-warning-base)\",\n },\n },\n defaultVariants: {\n intent: \"default\",\n },\n },\n);\n\nexport const sliderThumbVariants = cva(\n [\n \"absolute top-1/2 -translate-y-1/2\",\n \"rounded-full\",\n \"border-2 border-(--nuka-bg-base)\",\n \"shadow-sm\",\n \"transition-[left] duration-75\",\n \"pointer-events-none\",\n ],\n {\n variants: {\n intent: {\n default: \"bg-(--nuka-accent-bg)\",\n danger: \"bg-(--nuka-danger-base)\",\n success: \"bg-(--nuka-success-base)\",\n warning: \"bg-(--nuka-warning-base)\",\n },\n size: {\n sm: \"w-6 h-6\",\n md: \"w-[18px] h-[18px]\",\n lg: \"w-[22px] h-[22px]\",\n },\n },\n defaultVariants: {\n intent: \"default\",\n size: \"md\",\n },\n },\n);\n\nexport const sliderValueVariants = cva(\n [\"tabular-nums text-(--nuka-text-muted)\", \"ml-(--space-3)\", \"select-none\"],\n {\n variants: {\n size: {\n sm: \"text-xs\",\n md: \"text-sm\",\n lg: \"text-base\",\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n },\n);\n\nexport type SliderVariantProps = VariantProps<typeof sliderFillVariants> &\n VariantProps<typeof sliderThumbVariants>;\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { useFormFieldProps } from \"@nuka/hooks/use-form-field-props\";\nimport { useControllableState } from \"@nuka/hooks/use-controllable-state\";\nimport {\n sliderWrapperVariants,\n sliderTrackVariants,\n sliderFillVariants,\n sliderThumbVariants,\n sliderValueVariants,\n type SliderVariantProps,\n} from \"@nuka/components/Slider/Slider.variants\";\n\nconst THUMB_SIZES = {\n sm: 24,\n md: 18,\n lg: 22,\n} as const;\n\nexport interface SliderProps\n extends\n Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n \"size\" | \"type\" | \"onChange\"\n >,\n SliderVariantProps {\n value?: number;\n defaultValue?: number;\n min?: number;\n max?: number;\n step?: number;\n onValueChange?: (value: number) => void;\n showValue?: boolean;\n}\n\n/**\n * Custom range slider built on a visually-replaced native `<input type=\"range\">`.\n *\n * WCAG 2.5.7: Dragging alternative satisfied by native keyboard support\n * (Arrow keys, Home, End, Page Up/Down).\n */\nconst Slider = React.forwardRef<HTMLInputElement, SliderProps>(\n (\n {\n className,\n intent,\n size,\n value: controlledValue,\n defaultValue,\n min = 0,\n max = 100,\n step = 1,\n onValueChange,\n showValue = false,\n id,\n disabled,\n ...props\n },\n ref,\n ) => {\n const field = useFormFieldProps({\n id,\n disabled,\n \"aria-invalid\": props[\"aria-invalid\"],\n \"aria-describedby\": props[\"aria-describedby\"],\n \"aria-required\": props[\"aria-required\"],\n });\n\n const [currentValue, setCurrentValue] = useControllableState(\n controlledValue,\n defaultValue ?? min,\n onValueChange,\n );\n const [focused, setFocused] = React.useState(false);\n const percentage = ((currentValue - min) / (max - min)) * 100;\n const resolvedSize = size ?? \"md\";\n const thumbOffset = THUMB_SIZES[resolvedSize] / 2;\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n setCurrentValue(Number(e.target.value));\n };\n\n return (\n <div className={cn(sliderWrapperVariants({ size }), className)}>\n {/* Native input: invisible, covers full interactive area */}\n <input\n type=\"range\"\n ref={ref}\n id={field.resolvedId}\n min={min}\n max={max}\n step={step}\n value={currentValue}\n onChange={handleChange}\n onFocus={() => setFocused(true)}\n onBlur={() => setFocused(false)}\n disabled={field.resolvedDisabled}\n className=\"absolute inset-0 w-full h-full opacity-0 cursor-pointer disabled:cursor-not-allowed\"\n aria-valuemin={min}\n aria-valuemax={max}\n aria-valuenow={currentValue}\n aria-invalid={field.ariaInvalid}\n aria-describedby={field.ariaDescribedBy}\n aria-required={field.ariaRequired}\n {...props}\n />\n\n {/* Track */}\n <div className={sliderTrackVariants({ size })} aria-hidden=\"true\">\n {/* Fill */}\n <div\n className={sliderFillVariants({ intent })}\n style={{ width: `${String(percentage)}%` }}\n data-testid=\"slider-fill\"\n />\n\n {/* Thumb */}\n <div\n className={cn(\n sliderThumbVariants({ intent, size }),\n focused &&\n \"outline-2 outline-offset-2 outline-(--nuka-border-focus)\",\n )}\n style={{\n left: `calc(${String(percentage)}% - ${String(thumbOffset)}px)`,\n }}\n data-testid=\"slider-thumb\"\n />\n </div>\n\n {/* Optional value display */}\n {showValue && (\n <span aria-hidden=\"true\" className={sliderValueVariants({ size })}>\n {currentValue}\n </span>\n )}\n </div>\n );\n },\n);\n\nSlider.displayName = \"Slider\";\n\nexport {\n Slider,\n sliderWrapperVariants,\n sliderTrackVariants,\n sliderFillVariants,\n sliderThumbVariants,\n sliderValueVariants,\n};\n","import * as React from \"react\";\n\nexport interface RadioGroupContextValue {\n name: string;\n value: string | undefined;\n disabled: boolean;\n focusedValue: string | undefined;\n setFocusedValue: (value: string) => void;\n onChange: (value: string) => void;\n registerRef: (value: string, ref: HTMLInputElement | null) => void;\n}\n\nconst defaultContext: RadioGroupContextValue = {\n name: \"\",\n value: undefined,\n disabled: false,\n focusedValue: undefined,\n setFocusedValue: () => {\n /* noop */\n },\n onChange: () => {\n /* noop */\n },\n registerRef: () => {\n /* noop */\n },\n};\n\nexport const RadioGroupContext = React.createContext(defaultContext);\n\nexport function useRadioGroup(): RadioGroupContextValue {\n return React.useContext(RadioGroupContext);\n}\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { useFormFieldProps } from \"@nuka/hooks/use-form-field-props\";\nimport { useControllableState } from \"@nuka/hooks/use-controllable-state\";\nimport { RadioGroupContext } from \"@nuka/components/RadioGroup/RadioGroup.context\";\nimport type { RadioGroupContextValue } from \"@nuka/components/RadioGroup/RadioGroup.context\";\n\nexport interface RadioGroupProps extends Omit<\n React.HTMLAttributes<HTMLDivElement>,\n \"onChange\"\n> {\n name: string;\n value?: string;\n defaultValue?: string;\n disabled?: boolean;\n onChange?: (value: string) => void;\n orientation?: \"vertical\" | \"horizontal\";\n children: React.ReactNode;\n}\n\nconst RadioGroup = React.forwardRef<HTMLDivElement, RadioGroupProps>(\n (\n {\n className,\n name,\n value: controlledValue,\n defaultValue,\n disabled,\n onChange,\n orientation = \"vertical\",\n children,\n ...props\n },\n ref,\n ) => {\n const field = useFormFieldProps({\n disabled,\n \"aria-invalid\": props[\"aria-invalid\"],\n \"aria-describedby\": props[\"aria-describedby\"],\n });\n\n const resolvedDisabled = field.resolvedDisabled ?? false;\n\n const [currentValue, setCurrentValue] = useControllableState(\n controlledValue,\n defaultValue,\n onChange,\n );\n\n const refsMap = React.useRef(new Map<string, HTMLInputElement>());\n\n const [focusedValue, setFocusedValue] = React.useState(currentValue);\n\n // Incremented each time a Radio mounts and registers its ref. Used as a\n // dependency for the first-focus effect below: refsMap is a ref (not state)\n // so mutating it does not trigger a re-render. Without this counter the\n // effect would run on mount before any radios have registered, read an\n // empty map, and never set focusedValue, leaving all radios at tabIndex=-1.\n const [registrationCount, setRegistrationCount] = React.useState(0);\n\n const registerRef = React.useCallback(\n (radioValue: string, node: HTMLInputElement | null) => {\n if (node) {\n refsMap.current.set(radioValue, node);\n setRegistrationCount((c) => c + 1);\n } else {\n refsMap.current.delete(radioValue);\n }\n },\n [],\n );\n\n // When the group has no selection, ensure the first non-disabled radio\n // has tabIndex=0 so the group is reachable by Tab. Depends on\n // registrationCount so it re-runs after radios mount and populate refsMap.\n React.useEffect(() => {\n if (focusedValue === undefined && currentValue === undefined) {\n const firstKey = Array.from(refsMap.current.keys())[0];\n if (firstKey !== undefined) {\n setFocusedValue(firstKey);\n }\n }\n }, [focusedValue, currentValue, registrationCount]);\n\n const handleChange = React.useCallback(\n (radioValue: string) => {\n setCurrentValue(radioValue);\n setFocusedValue(radioValue);\n },\n [setCurrentValue],\n );\n\n const getOrderedValues = React.useCallback((): string[] => {\n const values: string[] = [];\n refsMap.current.forEach((node, radioValue) => {\n if (!node.disabled) {\n values.push(radioValue);\n }\n });\n return values;\n }, []);\n\n const moveFocus = React.useCallback(\n (direction: \"next\" | \"prev\" | \"first\" | \"last\") => {\n const values = getOrderedValues();\n if (values.length === 0) return;\n\n const currentIndex = values.indexOf(focusedValue ?? \"\");\n let nextIndex: number;\n\n switch (direction) {\n case \"next\":\n nextIndex = currentIndex < values.length - 1 ? currentIndex + 1 : 0;\n break;\n case \"prev\":\n nextIndex = currentIndex > 0 ? currentIndex - 1 : values.length - 1;\n break;\n case \"first\":\n nextIndex = 0;\n break;\n case \"last\":\n nextIndex = values.length - 1;\n break;\n }\n\n const nextValue = values[nextIndex];\n if (nextValue === undefined) return;\n setFocusedValue(nextValue);\n handleChange(nextValue);\n refsMap.current.get(nextValue)?.focus();\n },\n [focusedValue, getOrderedValues, handleChange],\n );\n\n const handleKeyDown = React.useCallback(\n (e: React.KeyboardEvent<HTMLDivElement>) => {\n props.onKeyDown?.(e);\n if (e.defaultPrevented) return;\n\n switch (e.key) {\n case \"ArrowDown\":\n case \"ArrowRight\":\n e.preventDefault();\n moveFocus(\"next\");\n break;\n case \"ArrowUp\":\n case \"ArrowLeft\":\n e.preventDefault();\n moveFocus(\"prev\");\n break;\n case \"Home\":\n e.preventDefault();\n moveFocus(\"first\");\n break;\n case \"End\":\n e.preventDefault();\n moveFocus(\"last\");\n break;\n }\n },\n [moveFocus, props],\n );\n\n const contextValue: RadioGroupContextValue = React.useMemo(\n () => ({\n name,\n value: currentValue,\n disabled: resolvedDisabled,\n focusedValue: focusedValue ?? currentValue ?? undefined,\n setFocusedValue,\n onChange: handleChange,\n registerRef,\n }),\n [\n name,\n currentValue,\n resolvedDisabled,\n focusedValue,\n handleChange,\n registerRef,\n ],\n );\n\n return (\n <RadioGroupContext value={contextValue}>\n <div\n ref={ref}\n role=\"radiogroup\"\n aria-orientation={orientation}\n aria-invalid={field.ariaInvalid}\n aria-describedby={field.ariaDescribedBy}\n className={cn(\n \"flex\",\n orientation === \"vertical\" ? \"flex-col\" : \"flex-row\",\n \"gap-(--space-2)\",\n className,\n )}\n {...props}\n onKeyDown={handleKeyDown}\n >\n {children}\n </div>\n </RadioGroupContext>\n );\n },\n);\n\nRadioGroup.displayName = \"RadioGroup\";\n\nexport { RadioGroup };\n","import {\n cva,\n selectionIndicatorIntentVariants,\n type VariantProps,\n} from \"@nuka/utils/variants\";\n\nexport const radioIndicatorVariants = cva(\n [\n \"inline-flex items-center justify-center shrink-0\",\n \"rounded-full\",\n \"border\",\n \"bg-(--nuka-input-bg)\",\n \"text-(--nuka-text-inverse)\",\n \"transition-colors duration-150\",\n \"peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2\",\n \"peer-focus-visible:outline-(--nuka-border-focus)\",\n \"peer-disabled:cursor-not-allowed peer-disabled:opacity-50\",\n \"peer-checked:*:block\",\n ],\n {\n variants: {\n intent: {\n default: \"\",\n danger: \"\",\n success: \"\",\n warning: \"\",\n },\n size: {\n sm: \"size-4\",\n md: \"size-5\",\n lg: \"size-6\",\n },\n },\n compoundVariants: selectionIndicatorIntentVariants,\n defaultVariants: {\n intent: \"default\",\n size: \"md\",\n },\n },\n);\n\nexport const radioVariants = radioIndicatorVariants;\n\nexport type RadioVariantProps = VariantProps<typeof radioIndicatorVariants>;\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { composeRefs } from \"@nuka/utils/slot\";\nimport { Text } from \"@nuka/components/Text\";\nimport { useRadioGroup } from \"@nuka/components/RadioGroup/RadioGroup.context\";\nimport {\n radioIndicatorVariants,\n type RadioVariantProps,\n} from \"@nuka/components/RadioGroup/Radio.variants\";\n\nexport interface RadioProps\n extends\n Omit<React.InputHTMLAttributes<HTMLInputElement>, \"size\" | \"type\">,\n RadioVariantProps {\n value: string;\n children?: React.ReactNode;\n}\n\nconst Radio = React.forwardRef<HTMLInputElement, RadioProps>(\n (\n { className, intent, size, value, children, disabled, name, ...props },\n ref,\n ) => {\n const ctx = useRadioGroup();\n const internalRef = React.useRef<HTMLInputElement>(null);\n\n const resolvedName = ctx.name || name;\n const isChecked = ctx.value !== undefined ? ctx.value === value : undefined;\n const isDisabled = disabled ?? (ctx.disabled || undefined);\n const isFocusTarget = ctx.focusedValue === value;\n const tabIndex = ctx.name ? (isFocusTarget ? 0 : -1) : undefined;\n\n React.useEffect(() => {\n const node = internalRef.current;\n ctx.registerRef(value, node);\n return () => {\n ctx.registerRef(value, null);\n };\n }, [ctx, value]);\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n props.onChange?.(e);\n ctx.onChange(value);\n };\n\n return (\n <label\n className={cn(\n \"inline-flex items-center gap-(--space-2) cursor-pointer select-none min-h-6 min-w-6\",\n isDisabled ? \"cursor-not-allowed\" : undefined,\n className,\n )}\n >\n <input\n ref={composeRefs(ref, internalRef)}\n type=\"radio\"\n name={resolvedName}\n value={value}\n checked={isChecked}\n disabled={isDisabled}\n tabIndex={tabIndex}\n className=\"peer sr-only\"\n {...props}\n onChange={handleChange}\n />\n <span\n aria-hidden=\"true\"\n className={cn(radioIndicatorVariants({ intent, size }))}\n >\n <span className=\"hidden size-1/2 rounded-full bg-current\" />\n </span>\n {children && <Text as=\"span\">{children}</Text>}\n </label>\n );\n },\n);\n\nRadio.displayName = \"Radio\";\n\nexport { Radio };\n","import { cva, type VariantProps } from \"@nuka/utils/variants\";\n\nexport const progressTrackVariants = cva(\n [\"w-full overflow-hidden rounded-full bg-(--nuka-bg-muted)\"],\n {\n variants: {\n size: {\n sm: \"h-1.5\",\n md: \"h-2.5\",\n lg: \"h-4\",\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n },\n);\n\nexport const progressFillVariants = cva(\n [\"h-full rounded-full transition-[width] duration-300\"],\n {\n variants: {\n intent: {\n default: \"\",\n danger: \"\",\n success: \"\",\n warning: \"\",\n },\n },\n compoundVariants: [\n {\n intent: \"default\",\n className: \"bg-(--nuka-accent-bg)\",\n },\n {\n intent: \"danger\",\n className: \"bg-(--nuka-danger-base)\",\n },\n {\n intent: \"success\",\n className: \"bg-(--nuka-success-base)\",\n },\n {\n intent: \"warning\",\n className: \"bg-(--nuka-warning-base)\",\n },\n ],\n defaultVariants: {\n intent: \"default\",\n },\n },\n);\n\nexport type ProgressTrackVariantProps = VariantProps<\n typeof progressTrackVariants\n>;\nexport type ProgressFillVariantProps = VariantProps<\n typeof progressFillVariants\n>;\nexport type ProgressVariantProps = ProgressTrackVariantProps &\n ProgressFillVariantProps;\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport {\n progressTrackVariants,\n progressFillVariants,\n type ProgressVariantProps,\n} from \"@nuka/components/Progress/Progress.variants\";\n\nexport interface ProgressProps\n extends\n Omit<React.HTMLAttributes<HTMLDivElement>, \"role\">,\n ProgressVariantProps {\n value?: number;\n label?: string;\n}\n\nconst Progress = React.forwardRef<HTMLDivElement, ProgressProps>(\n ({ className, size, intent, value, label, ...props }, ref) => {\n const isIndeterminate = value === undefined;\n\n return (\n <div\n ref={ref}\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={isIndeterminate ? undefined : value}\n aria-label={label ?? \"Loading\"}\n className={cn(progressTrackVariants({ size }), className)}\n {...props}\n >\n <div\n className={cn(\n progressFillVariants({ intent }),\n isIndeterminate &&\n \"w-[33%] nuka-progress-indeterminate animate-[nuka-progress-indeterminate_1.5s_ease-in-out_infinite]\",\n )}\n style={isIndeterminate ? undefined : { width: `${String(value)}%` }}\n />\n </div>\n );\n },\n);\n\nProgress.displayName = \"Progress\";\n\nexport { Progress, progressTrackVariants, progressFillVariants };\n","import { cva, type VariantProps } from \"@nuka/utils/variants\";\n\nexport const switchVariants = cva(\n [\n \"inline-flex items-center shrink-0\",\n \"rounded-full\",\n \"border-2 border-transparent\",\n \"transition-colors duration-150\",\n \"cursor-pointer\",\n \"focus-visible:outline-2 focus-visible:outline-offset-2\",\n \"focus-visible:outline-(--nuka-border-focus)\",\n \"disabled:cursor-not-allowed disabled:opacity-50\",\n ],\n {\n variants: {\n size: {\n sm: \"h-6 w-10\",\n md: \"h-5 w-9\",\n lg: \"h-6 w-11\",\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n },\n);\n\nexport const switchThumbVariants = cva(\n [\n \"block rounded-full\",\n \"bg-(--nuka-text-inverse)\",\n \"transition-transform duration-150\",\n \"pointer-events-none\",\n ],\n {\n variants: {\n size: {\n sm: \"size-4\",\n md: \"size-4\",\n lg: \"size-5\",\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n },\n);\n\nexport type SwitchVariantProps = VariantProps<typeof switchVariants>;\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { useFormFieldProps } from \"@nuka/hooks/use-form-field-props\";\nimport { Text } from \"@nuka/components/Text\";\nimport { useControllableState } from \"@nuka/hooks/use-controllable-state\";\nimport {\n switchVariants,\n switchThumbVariants,\n type SwitchVariantProps,\n} from \"@nuka/components/Switch/Switch.variants\";\n\nexport interface SwitchProps\n extends\n Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, \"onChange\">,\n SwitchVariantProps {\n checked?: boolean;\n defaultChecked?: boolean;\n onChange?: (checked: boolean) => void;\n children?: React.ReactNode;\n}\n\nconst Switch = React.forwardRef<HTMLButtonElement, SwitchProps>(\n (\n {\n className,\n size,\n checked: controlledChecked,\n defaultChecked,\n onChange,\n children,\n id,\n disabled,\n ...props\n },\n ref,\n ) => {\n const field = useFormFieldProps(\n {\n id,\n disabled,\n \"aria-describedby\": props[\"aria-describedby\"],\n },\n { skipInvalid: true },\n );\n const [isChecked, setChecked] = useControllableState(\n controlledChecked,\n defaultChecked ?? false,\n onChange,\n );\n\n const handleClick = () => {\n setChecked(!isChecked);\n };\n\n const translateClass = {\n sm: isChecked ? \"translate-x-4\" : \"translate-x-0\",\n md: isChecked ? \"translate-x-4\" : \"translate-x-0\",\n lg: isChecked ? \"translate-x-5\" : \"translate-x-0\",\n }[size ?? \"md\"];\n\n return (\n <div className=\"inline-flex items-center gap-(--space-2)\">\n <button\n ref={ref}\n type=\"button\"\n role=\"switch\"\n id={field.resolvedId}\n aria-checked={isChecked}\n aria-describedby={field.ariaDescribedBy}\n disabled={field.resolvedDisabled}\n className={cn(\n switchVariants({ size }),\n isChecked ? \"bg-(--nuka-accent-bg)\" : \"bg-(--nuka-border-strong)\",\n className,\n )}\n onClick={handleClick}\n {...props}\n >\n <span\n aria-hidden=\"true\"\n className={cn(switchThumbVariants({ size }), translateClass)}\n />\n </button>\n {children && (\n <Text as=\"span\" size=\"sm\">\n {children}\n </Text>\n )}\n </div>\n );\n },\n);\n\nSwitch.displayName = \"Switch\";\n\nexport { Switch, switchVariants, switchThumbVariants };\n","import { cva, type VariantProps } from \"@nuka/utils/variants\";\n\nexport const spinnerVariants = cva(\n [\"inline-flex items-center justify-center\", \"shrink-0\"],\n {\n variants: {\n size: {\n sm: \"size-4\",\n md: \"size-6\",\n lg: \"size-8\",\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n },\n);\n\nexport const spinnerColorVariants = cva([], {\n variants: {\n color: {\n default: \"stroke-(--nuka-accent-bg)\",\n muted: \"stroke-(--nuka-text-muted)\",\n inverse: \"stroke-(--nuka-text-inverse)\",\n },\n },\n defaultVariants: {\n color: \"default\",\n },\n});\n\nexport type SpinnerVariantProps = VariantProps<typeof spinnerVariants> &\n VariantProps<typeof spinnerColorVariants>;\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport {\n spinnerVariants,\n spinnerColorVariants,\n type SpinnerVariantProps,\n} from \"@nuka/components/Spinner/Spinner.variants\";\n\ntype SpinnerSize = NonNullable<SpinnerVariantProps[\"size\"]>;\ntype SpinnerColor = NonNullable<SpinnerVariantProps[\"color\"]>;\n\nconst strokeWidthMap = {\n sm: 2,\n md: 2.5,\n lg: 3,\n} as const satisfies Record<SpinnerSize, number>;\n\nexport interface SpinnerProps\n extends\n Omit<React.ComponentPropsWithoutRef<\"span\">, \"color\">,\n SpinnerVariantProps {\n label?: string;\n}\n\nconst Spinner = React.forwardRef<HTMLSpanElement, SpinnerProps>(\n ({ className, size: sizeProp, color: colorProp, label, ...props }, ref) => {\n const size: SpinnerSize = sizeProp ?? \"md\";\n const color: SpinnerColor = colorProp ?? \"default\";\n\n // Strict check: only boolean true triggers embedded mode\n const isHidden = props[\"aria-hidden\"] === true;\n\n const strokeWidth = strokeWidthMap[size];\n\n return (\n <span\n ref={ref}\n {...(!isHidden && { role: \"status\" })}\n {...(!isHidden && !label && { \"aria-label\": \"Loading\" })}\n className={cn(spinnerVariants({ size }), className)}\n {...props}\n >\n {label && !isHidden && <span className=\"sr-only\">{label}</span>}\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n aria-hidden=\"true\"\n className=\"nuka-spinner size-full\"\n >\n {/* Track ring */}\n <circle\n cx=\"12\"\n cy=\"12\"\n r=\"9\"\n stroke=\"var(--nuka-border-base)\"\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n fill=\"none\"\n />\n {/* Animated arc */}\n <circle\n cx=\"12\"\n cy=\"12\"\n r=\"9\"\n className={spinnerColorVariants({ color })}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeDasharray=\"56.5\"\n strokeDashoffset=\"42.4\"\n fill=\"none\"\n />\n </svg>\n </span>\n );\n },\n);\n\nSpinner.displayName = \"Spinner\";\n\nexport { Spinner, spinnerVariants, spinnerColorVariants };\n","import { createContext, useContext } from \"react\";\n\nexport interface TabsContextValue {\n value: string | undefined;\n onValueChange: (value: string) => void;\n orientation: \"horizontal\" | \"vertical\";\n activationMode: \"automatic\" | \"manual\";\n baseId: string;\n focusedValue: string | undefined;\n setFocusedValue: (value: string | undefined) => void;\n}\n\nconst TabsContext = createContext<TabsContextValue | null>(null);\n\nfunction useTabsContext(): TabsContextValue {\n const context = useContext(TabsContext);\n if (context === null) {\n throw new Error(\"Tabs compound components must be used within <Tabs>\");\n }\n return context;\n}\n\nexport { TabsContext, useTabsContext };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { useControllableState } from \"@nuka/hooks/use-controllable-state\";\nimport { TabsContext } from \"@nuka/components/Tabs/Tabs.context\";\n\nexport interface TabsProps extends React.HTMLAttributes<HTMLDivElement> {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n orientation?: \"horizontal\" | \"vertical\";\n activationMode?: \"automatic\" | \"manual\";\n}\n\nconst Tabs = React.forwardRef<HTMLDivElement, TabsProps>(\n (\n {\n value: controlledValue,\n defaultValue,\n onValueChange,\n orientation = \"horizontal\",\n activationMode = \"automatic\",\n className,\n children,\n ...props\n },\n ref,\n ) => {\n const [value, setValue] = useControllableState(\n controlledValue,\n defaultValue,\n onValueChange,\n );\n\n const baseId = React.useId();\n const [focusedValue, setFocusedValue] = React.useState<string | undefined>(\n undefined,\n );\n\n const contextValue = React.useMemo(\n () => ({\n value,\n onValueChange: setValue,\n orientation,\n activationMode,\n baseId,\n focusedValue,\n setFocusedValue,\n }),\n [value, setValue, orientation, activationMode, baseId, focusedValue],\n );\n\n return (\n <TabsContext value={contextValue}>\n <div\n ref={ref}\n className={cn(\n orientation === \"horizontal\" ? \"flex flex-col\" : \"flex flex-row\",\n className,\n )}\n {...props}\n >\n {children}\n </div>\n </TabsContext>\n );\n },\n);\n\nTabs.displayName = \"Tabs\";\n\nexport { Tabs };\n","import { cva, type VariantProps } from \"@nuka/utils/variants\";\n\nexport const tabsListVariants = cva(\n [\"flex shrink-0\", \"focus-visible:outline-none\"],\n {\n variants: {\n variant: {\n underline: [\"border-b border-(--nuka-border-base)\", \"gap-(--space-4)\"],\n pill: [\n \"bg-(--nuka-bg-muted)\",\n \"rounded-(--radius-lg)\",\n \"p-(--space-1)\",\n \"gap-(--space-1)\",\n ],\n boxed: [\n \"border border-(--nuka-border-base)\",\n \"rounded-(--radius-lg)\",\n \"p-(--space-1)\",\n \"gap-(--space-1)\",\n ],\n },\n },\n defaultVariants: {\n variant: \"underline\",\n },\n },\n);\n\nexport type TabsListVariantProps = VariantProps<typeof tabsListVariants>;\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { composeRefs } from \"@nuka/utils/slot\";\nimport { useTabsContext } from \"@nuka/components/Tabs/Tabs.context\";\nimport {\n tabsListVariants,\n type TabsListVariantProps,\n} from \"@nuka/components/Tabs/Tabs.variants\";\n\nconst TRIGGER_SELECTOR = '[role=\"tab\"]:not([aria-disabled=\"true\"])';\n\nexport interface TabsListProps\n extends React.HTMLAttributes<HTMLDivElement>, TabsListVariantProps {}\n\nconst TabsList = React.forwardRef<HTMLDivElement, TabsListProps>(\n ({ variant, className, onKeyDown, children, ...props }, ref) => {\n const { orientation } = useTabsContext();\n const listRef = React.useRef<HTMLDivElement>(null);\n\n const composedRef = composeRefs(ref, listRef);\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLDivElement>) => {\n handleTabsKeyboard(e, listRef);\n onKeyDown?.(e);\n };\n\n return (\n <div\n ref={composedRef}\n role=\"tablist\"\n aria-orientation={orientation}\n className={cn(\n tabsListVariants({ variant }),\n orientation === \"vertical\" && \"flex-col\",\n className,\n )}\n onKeyDown={handleKeyDown}\n {...props}\n >\n {children}\n </div>\n );\n },\n);\n\nTabsList.displayName = \"TabsList\";\n\nfunction handleTabsKeyboard(\n e: React.KeyboardEvent<HTMLDivElement>,\n listRef: React.RefObject<HTMLDivElement | null>,\n) {\n const list = listRef.current;\n if (!list) return;\n\n const triggers = Array.from(\n list.querySelectorAll<HTMLButtonElement>(TRIGGER_SELECTOR),\n );\n if (triggers.length === 0) return;\n\n const active = document.activeElement;\n const currentIndex = triggers.indexOf(active as HTMLButtonElement);\n if (currentIndex === -1) return;\n\n const isHorizontal = list.getAttribute(\"aria-orientation\") !== \"vertical\";\n const prevKey = isHorizontal ? \"ArrowLeft\" : \"ArrowUp\";\n const nextKey = isHorizontal ? \"ArrowRight\" : \"ArrowDown\";\n\n let nextIndex: number | undefined;\n\n switch (e.key) {\n case nextKey:\n nextIndex = (currentIndex + 1) % triggers.length;\n break;\n case prevKey:\n nextIndex = (currentIndex - 1 + triggers.length) % triggers.length;\n break;\n case \"Home\":\n nextIndex = 0;\n break;\n case \"End\":\n nextIndex = triggers.length - 1;\n break;\n default:\n return;\n }\n\n e.preventDefault();\n triggers[nextIndex]?.focus();\n}\n\nexport { TabsList };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { useTabsContext } from \"@nuka/components/Tabs/Tabs.context\";\n\nexport interface TabsTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n value: string;\n}\n\nconst TabsTrigger = React.forwardRef<HTMLButtonElement, TabsTriggerProps>(\n ({ value, disabled = false, className, onClick, onFocus, ...props }, ref) => {\n const ctx = useTabsContext();\n const isSelected = ctx.value === value;\n const triggerId = `${ctx.baseId}-trigger-${value}`;\n const panelId = `${ctx.baseId}-panel-${value}`;\n\n const isFocusTarget = ctx.focusedValue\n ? ctx.focusedValue === value\n : isSelected;\n\n const handleFocus = (e: React.FocusEvent<HTMLButtonElement>) => {\n ctx.setFocusedValue(value);\n if (ctx.activationMode === \"automatic\") {\n ctx.onValueChange(value);\n }\n onFocus?.(e);\n };\n\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n ctx.onValueChange(value);\n onClick?.(e);\n };\n\n return (\n <button\n ref={ref}\n type=\"button\"\n role=\"tab\"\n id={triggerId}\n aria-selected={isSelected}\n aria-controls={panelId}\n aria-disabled={disabled || undefined}\n disabled={disabled}\n tabIndex={isFocusTarget ? 0 : -1}\n data-state={isSelected ? \"active\" : \"inactive\"}\n className={cn(\n \"inline-flex items-center justify-center whitespace-nowrap\",\n \"text-[length:var(--font-size-sm)]\",\n \"font-[number:var(--font-weight-medium)]\",\n \"transition-colors duration-150\",\n \"focus-visible:outline-2 focus-visible:outline-offset-2\",\n \"focus-visible:outline-(--nuka-border-focus)\",\n \"disabled:pointer-events-none disabled:opacity-50\",\n \"cursor-pointer\",\n \"px-(--space-3) py-(--space-2)\",\n \"text-(--nuka-text-muted)\",\n \"hover:text-(--nuka-text-base)\",\n \"data-[state=active]:text-(--nuka-text-base)\",\n \"rounded-(--radius-md)\",\n \"data-[state=active]:bg-(--nuka-bg-base)\",\n \"data-[state=active]:shadow-sm\",\n className,\n )}\n onFocus={handleFocus}\n onClick={handleClick}\n {...props}\n />\n );\n },\n);\n\nTabsTrigger.displayName = \"TabsTrigger\";\n\nexport { TabsTrigger };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { useTabsContext } from \"@nuka/components/Tabs/Tabs.context\";\n\nexport interface TabsContentProps extends React.HTMLAttributes<HTMLDivElement> {\n value: string;\n}\n\nconst TabsContent = React.forwardRef<HTMLDivElement, TabsContentProps>(\n ({ value, className, ...props }, ref) => {\n const ctx = useTabsContext();\n const isActive = ctx.value === value;\n const triggerId = `${ctx.baseId}-trigger-${value}`;\n const panelId = `${ctx.baseId}-panel-${value}`;\n\n return (\n <div\n ref={ref}\n role=\"tabpanel\"\n id={panelId}\n aria-labelledby={triggerId}\n hidden={!isActive ? true : undefined}\n tabIndex={0}\n data-state={isActive ? \"active\" : \"inactive\"}\n className={cn(\n \"mt-(--space-2)\",\n \"focus-visible:outline-2 focus-visible:outline-offset-2\",\n \"focus-visible:outline-(--nuka-border-focus)\",\n className,\n )}\n {...props}\n />\n );\n },\n);\n\nTabsContent.displayName = \"TabsContent\";\n\nexport { TabsContent };\n","import {\n cva,\n intentCompoundVariants,\n type VariantProps,\n} from \"@nuka/utils/variants\";\n\nexport const tagVariants = cva(\n [\n \"inline-flex items-center\",\n \"font-medium leading-none whitespace-nowrap\",\n \"rounded-(--radius-md)\",\n \"border\",\n ],\n {\n variants: {\n variant: {\n primary: [\"border-transparent\"],\n secondary: [],\n outline: [\"bg-transparent\"],\n ghost: [\"bg-transparent\", \"border-transparent\"],\n },\n intent: {\n default: \"\",\n danger: \"\",\n success: \"\",\n warning: \"\",\n },\n size: {\n sm: \"gap-(--space-1) px-(--space-2) py-(--space-1) text-xs\",\n md: \"gap-(--space-1) px-(--space-3) py-(--space-1) text-xs\",\n lg: \"gap-(--space-2) px-(--space-3) py-(--space-2) text-sm\",\n },\n },\n\n compoundVariants: intentCompoundVariants(),\n\n defaultVariants: {\n variant: \"secondary\",\n intent: \"default\",\n size: \"md\",\n },\n },\n);\n\nexport type TagVariantProps = VariantProps<typeof tagVariants>;\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { DismissButton } from \"@nuka/utils/dismiss-button\";\nimport {\n tagVariants,\n type TagVariantProps,\n} from \"@nuka/components/Tag/Tag.variants\";\n\nexport interface TagProps\n extends React.HTMLAttributes<HTMLSpanElement>, TagVariantProps {\n onDismiss?: () => void;\n dismissLabel?: string;\n}\n\nconst Tag = React.forwardRef<HTMLSpanElement, TagProps>(\n (\n {\n className,\n variant,\n intent,\n size,\n onDismiss,\n dismissLabel = \"Remove\",\n children,\n ...props\n },\n ref,\n ) => {\n return (\n <span\n ref={ref}\n className={cn(tagVariants({ variant, intent, size }), className)}\n {...props}\n >\n {children}\n {onDismiss !== undefined && (\n <DismissButton onClick={onDismiss} label={dismissLabel} />\n )}\n </span>\n );\n },\n);\n\nTag.displayName = \"Tag\";\n\nexport { Tag, tagVariants };\n","import { cva, type VariantProps } from \"@nuka/utils/variants\";\nimport { fieldBaseClasses } from \"@nuka/utils/field-base\";\n\nexport const textareaVariants = cva([...fieldBaseClasses, \"resize-y\"], {\n variants: {\n intent: {\n default:\n \"border-(--nuka-input-border) hover:border-(--nuka-input-border-hover)\",\n danger: \"border-(--nuka-danger-border)\",\n success: \"border-(--nuka-success-border)\",\n warning: \"border-(--nuka-warning-border)\",\n },\n size: {\n sm: \"px-(--space-3) py-(--space-2) text-xs\",\n md: \"px-(--space-4) py-(--space-3) text-sm\",\n lg: \"px-(--space-6) py-(--space-4) text-base\",\n },\n },\n defaultVariants: {\n intent: \"default\",\n size: \"md\",\n },\n});\n\nexport type TextareaVariantProps = VariantProps<typeof textareaVariants>;\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { useFormFieldProps } from \"@nuka/hooks/use-form-field-props\";\nimport {\n textareaVariants,\n type TextareaVariantProps,\n} from \"@nuka/components/Textarea/Textarea.variants\";\n\nexport interface TextareaProps\n extends\n React.TextareaHTMLAttributes<HTMLTextAreaElement>,\n TextareaVariantProps {}\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n ({ className, intent, size, id, ...props }, ref) => {\n const field = useFormFieldProps({\n id,\n \"aria-invalid\": props[\"aria-invalid\"],\n \"aria-describedby\": props[\"aria-describedby\"],\n \"aria-required\": props[\"aria-required\"],\n });\n\n const ariaInvalid =\n field.ariaInvalid ?? (intent === \"danger\" ? true : undefined);\n\n return (\n <textarea\n ref={ref}\n id={field.resolvedId}\n className={cn(textareaVariants({ intent, size }), className)}\n {...props}\n aria-invalid={ariaInvalid}\n aria-describedby={field.ariaDescribedBy}\n aria-required={field.ariaRequired}\n />\n );\n },\n);\n\nTextarea.displayName = \"Textarea\";\n\nexport { Textarea, textareaVariants };\n","import * as React from \"react\";\nimport type { useFloating, useInteractions } from \"@floating-ui/react\";\n\nexport interface TooltipContextValue {\n open: boolean;\n refs: ReturnType<typeof useFloating>[\"refs\"];\n floatingStyles: React.CSSProperties;\n getReferenceProps: ReturnType<typeof useInteractions>[\"getReferenceProps\"];\n getFloatingProps: ReturnType<typeof useInteractions>[\"getFloatingProps\"];\n}\n\nconst TooltipContext = React.createContext<TooltipContextValue | undefined>(\n undefined,\n);\n\nexport function useTooltipContext(): TooltipContextValue {\n const context = React.useContext(TooltipContext);\n if (context === undefined) {\n throw new Error(\n \"useTooltipContext must be used within a <Tooltip> component\",\n );\n }\n return context;\n}\n\nexport { TooltipContext };\n","import * as React from \"react\";\nimport {\n useFloating,\n useHover,\n useFocus,\n useDismiss,\n useRole,\n useInteractions,\n offset,\n flip,\n shift,\n autoUpdate,\n} from \"@floating-ui/react\";\nimport { useControllableState } from \"@nuka/hooks/use-controllable-state\";\nimport { TooltipContext } from \"@nuka/components/Tooltip/Tooltip.context\";\nimport type { TooltipContextValue } from \"@nuka/components/Tooltip/Tooltip.context\";\n\nexport interface TooltipProps {\n children: React.ReactNode;\n defaultOpen?: boolean;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n delay?: number;\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n}\n\nfunction Tooltip({\n children,\n defaultOpen = false,\n open: controlledOpen,\n onOpenChange,\n delay = 600,\n side = \"top\",\n}: TooltipProps) {\n const [currentOpen, handleOpenChange] = useControllableState(\n controlledOpen,\n defaultOpen,\n onOpenChange,\n );\n\n const { refs, floatingStyles, context } = useFloating({\n open: currentOpen,\n onOpenChange: handleOpenChange,\n placement: side,\n middleware: [offset(8), flip(), shift({ padding: 8 })],\n whileElementsMounted: autoUpdate,\n });\n\n const hover = useHover(context, { delay: { open: delay, close: 0 } });\n const focus = useFocus(context);\n const dismiss = useDismiss(context);\n const role = useRole(context, { role: \"tooltip\" });\n\n const { getReferenceProps, getFloatingProps } = useInteractions([\n hover,\n focus,\n dismiss,\n role,\n ]);\n\n const contextValue: TooltipContextValue = React.useMemo(\n () => ({\n open: currentOpen,\n refs,\n floatingStyles,\n getReferenceProps,\n getFloatingProps,\n }),\n [currentOpen, refs, floatingStyles, getReferenceProps, getFloatingProps],\n );\n\n return <TooltipContext value={contextValue}>{children}</TooltipContext>;\n}\n\nTooltip.displayName = \"Tooltip\";\n\nexport { Tooltip };\n","import * as React from \"react\";\nimport { Slot, composeRefs } from \"@nuka/utils/slot\";\nimport { useTooltipContext } from \"@nuka/components/Tooltip/Tooltip.context\";\n\nexport interface TooltipTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n asChild?: boolean;\n}\n\nconst TooltipTrigger = React.forwardRef<HTMLButtonElement, TooltipTriggerProps>(\n ({ asChild = false, children, ...props }, ref) => {\n const ctx = useTooltipContext();\n const composedRef = composeRefs(ref, ctx.refs.setReference);\n\n const Comp = asChild ? Slot : \"button\";\n\n const triggerProps = ctx.getReferenceProps(props);\n\n return (\n <Comp\n ref={composedRef}\n type={asChild ? undefined : \"button\"}\n // Safe: Floating UI getReferenceProps() returns Record<string, unknown>;\n // values are standard DOM event handlers.\n {...(triggerProps as React.ButtonHTMLAttributes<HTMLButtonElement>)}\n >\n {children}\n </Comp>\n );\n },\n);\n\nTooltipTrigger.displayName = \"TooltipTrigger\";\n\nexport { TooltipTrigger };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Portal } from \"@nuka/utils/portal\";\nimport { composeRefs } from \"@nuka/utils/slot\";\nimport { useTooltipContext } from \"@nuka/components/Tooltip/Tooltip.context\";\n\nexport interface TooltipContentProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst TooltipContent = React.forwardRef<HTMLDivElement, TooltipContentProps>(\n ({ className, ...props }, ref) => {\n const ctx = useTooltipContext();\n\n if (!ctx.open) return null;\n\n const floatingProps = ctx.getFloatingProps(props);\n\n return (\n <Portal>\n <div\n ref={composeRefs(ref, ctx.refs.setFloating)}\n role=\"tooltip\"\n style={ctx.floatingStyles}\n // Safe: Floating UI getFloatingProps() returns Record<string, unknown>;\n // values are standard DOM attributes and event handlers.\n {...(floatingProps as React.HTMLAttributes<HTMLDivElement>)}\n className={cn(\n \"z-(--nuka-z-dropdown) max-w-xs rounded-(--radius-md) px-(--space-2) py-(--space-1)\",\n \"text-xs bg-(--nuka-bg-emphasis) text-(--nuka-text-inverse)\",\n \"shadow-md pointer-events-none\",\n className,\n )}\n />\n </Portal>\n );\n },\n);\n\nTooltipContent.displayName = \"TooltipContent\";\n\nexport { TooltipContent };\n","import * as React from \"react\";\nimport type { useFloating, useInteractions } from \"@floating-ui/react\";\n\nexport interface PopoverContextValue {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n refs: ReturnType<typeof useFloating>[\"refs\"];\n floatingStyles: React.CSSProperties;\n getReferenceProps: ReturnType<typeof useInteractions>[\"getReferenceProps\"];\n getFloatingProps: ReturnType<typeof useInteractions>[\"getFloatingProps\"];\n}\n\nconst PopoverContext = React.createContext<PopoverContextValue | undefined>(\n undefined,\n);\n\nexport function usePopoverContext(): PopoverContextValue {\n const context = React.useContext(PopoverContext);\n if (context === undefined) {\n throw new Error(\n \"usePopoverContext must be used within a <Popover> component\",\n );\n }\n return context;\n}\n\nexport { PopoverContext };\n","import * as React from \"react\";\nimport {\n useFloating,\n useClick,\n useDismiss,\n useRole,\n useInteractions,\n offset,\n flip,\n shift,\n autoUpdate,\n} from \"@floating-ui/react\";\nimport type { Placement } from \"@floating-ui/react\";\nimport { useControllableState } from \"@nuka/hooks/use-controllable-state\";\nimport { PopoverContext } from \"@nuka/components/Popover/Popover.context\";\nimport type { PopoverContextValue } from \"@nuka/components/Popover/Popover.context\";\n\nexport interface PopoverProps {\n children: React.ReactNode;\n defaultOpen?: boolean;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n placement?: Placement;\n}\n\nfunction Popover({\n children,\n defaultOpen = false,\n open: controlledOpen,\n onOpenChange,\n placement = \"bottom-start\",\n}: PopoverProps) {\n const [currentOpen, handleOpenChange] = useControllableState(\n controlledOpen,\n defaultOpen,\n onOpenChange,\n );\n\n const { refs, floatingStyles, context } = useFloating({\n open: currentOpen,\n onOpenChange: handleOpenChange,\n placement,\n middleware: [offset(8), flip(), shift({ padding: 8 })],\n whileElementsMounted: autoUpdate,\n });\n\n const click = useClick(context);\n const dismiss = useDismiss(context);\n const role = useRole(context, { role: \"dialog\" });\n\n const { getReferenceProps, getFloatingProps } = useInteractions([\n click,\n dismiss,\n role,\n ]);\n\n const contextValue: PopoverContextValue = React.useMemo(\n () => ({\n open: currentOpen,\n onOpenChange: handleOpenChange,\n refs,\n floatingStyles,\n getReferenceProps,\n getFloatingProps,\n }),\n [\n currentOpen,\n handleOpenChange,\n refs,\n floatingStyles,\n getReferenceProps,\n getFloatingProps,\n ],\n );\n\n return <PopoverContext value={contextValue}>{children}</PopoverContext>;\n}\n\nPopover.displayName = \"Popover\";\n\nexport { Popover };\n","import * as React from \"react\";\nimport { Slot, composeRefs } from \"@nuka/utils/slot\";\nimport { usePopoverContext } from \"@nuka/components/Popover/Popover.context\";\n\nexport interface PopoverTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n asChild?: boolean;\n}\n\nconst PopoverTrigger = React.forwardRef<HTMLButtonElement, PopoverTriggerProps>(\n ({ asChild = false, children, ...props }, ref) => {\n const ctx = usePopoverContext();\n const composedRef = composeRefs(ref, ctx.refs.setReference);\n\n const Comp = asChild ? Slot : \"button\";\n\n const triggerProps = ctx.getReferenceProps(props);\n\n return (\n <Comp\n ref={composedRef}\n type={asChild ? undefined : \"button\"}\n {...(triggerProps as React.ButtonHTMLAttributes<HTMLButtonElement>)}\n >\n {children}\n </Comp>\n );\n },\n);\n\nPopoverTrigger.displayName = \"PopoverTrigger\";\n\nexport { PopoverTrigger };\n","import { useEffect } from \"react\";\nimport type { RefObject } from \"react\";\n\nconst FOCUSABLE_SELECTOR =\n 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])';\n\nfunction useFocusFirstInteractive(\n containerRef: RefObject<HTMLElement | null>,\n enabled: boolean,\n): void {\n useEffect(() => {\n if (enabled) {\n const frame = requestAnimationFrame(() => {\n const focusable =\n containerRef.current?.querySelector<HTMLElement>(FOCUSABLE_SELECTOR);\n if (focusable) {\n focusable.focus();\n } else {\n containerRef.current?.focus();\n }\n });\n return () => cancelAnimationFrame(frame);\n }\n return undefined;\n }, [enabled, containerRef]);\n}\n\nexport { useFocusFirstInteractive };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Portal } from \"@nuka/utils/portal\";\nimport { composeRefs } from \"@nuka/utils/slot\";\nimport { useFocusFirstInteractive } from \"@nuka/hooks/use-focus-first-interactive\";\nimport { usePopoverContext } from \"@nuka/components/Popover/Popover.context\";\n\nexport interface PopoverContentProps extends React.HTMLAttributes<HTMLDivElement> {\n \"aria-label\"?: string;\n \"aria-labelledby\"?: string;\n}\n\nconst PopoverContent = React.forwardRef<HTMLDivElement, PopoverContentProps>(\n (\n {\n className,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n ...props\n },\n ref,\n ) => {\n const ctx = usePopoverContext();\n const contentRef = React.useRef<HTMLDivElement>(null);\n const composedRef = composeRefs(ref, contentRef, ctx.refs.setFloating);\n\n React.useEffect(() => {\n if (\n ctx.open &&\n process.env.NODE_ENV !== \"production\" &&\n !ariaLabel &&\n !ariaLabelledBy\n ) {\n console.error(\n 'Popover: PopoverContent has role=\"dialog\" but no accessible name. ' +\n \"Provide an aria-label or aria-labelledby prop.\",\n );\n }\n }, [ctx.open, ariaLabel, ariaLabelledBy]);\n\n useFocusFirstInteractive(contentRef, ctx.open);\n\n if (!ctx.open) return null;\n\n const floatingProps = ctx.getFloatingProps(props);\n\n return (\n <Portal>\n <div\n ref={composedRef}\n style={ctx.floatingStyles}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n tabIndex={-1}\n // Safe: Floating UI getFloatingProps() returns Record<string, unknown>;\n // values are standard DOM attributes and event handlers.\n {...(floatingProps as React.HTMLAttributes<HTMLDivElement>)}\n className={cn(\n \"z-(--nuka-z-dropdown) rounded-(--radius-md) border border-(--nuka-border-base)\",\n \"bg-(--nuka-bg-base) shadow-md p-(--space-4)\",\n \"focus-visible:outline-none\",\n className,\n )}\n />\n </Portal>\n );\n },\n);\n\nPopoverContent.displayName = \"PopoverContent\";\n\nexport { PopoverContent };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\n\nexport interface TimelineProps extends React.OlHTMLAttributes<HTMLOListElement> {}\n\nconst Timeline = React.forwardRef<HTMLOListElement, TimelineProps>(\n ({ className, ...props }, ref) => {\n return (\n <ol\n ref={ref}\n className={cn(\"relative flex flex-col\", \"list-none\", className)}\n {...props}\n />\n );\n },\n);\n\nTimeline.displayName = \"Timeline\";\n\nexport { Timeline };\n","import { cva, type VariantProps } from \"@nuka/utils/variants\";\n\nexport const timelineItemMarkerVariants = cva(\n [\n \"flex items-center justify-center\",\n \"w-8 h-8 rounded-full\",\n \"border-2\",\n \"shrink-0 z-10\",\n \"bg-(--nuka-bg-base)\",\n ],\n {\n variants: {\n intent: {\n default: \"border-(--nuka-accent-bg) text-(--nuka-accent-text)\",\n success: \"border-(--nuka-success-base) text-(--nuka-success-text)\",\n danger: \"border-(--nuka-danger-base) text-(--nuka-danger-text)\",\n warning: \"border-(--nuka-warning-base) text-(--nuka-warning-text)\",\n },\n },\n defaultVariants: {\n intent: \"default\",\n },\n },\n);\n\nexport type TimelineItemMarkerVariantProps = VariantProps<\n typeof timelineItemMarkerVariants\n>;\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Text } from \"@nuka/components/Text\";\nimport { timelineItemMarkerVariants } from \"@nuka/components/Timeline/Timeline.variants\";\n\nexport interface TimelineItemProps extends React.LiHTMLAttributes<HTMLLIElement> {\n timestamp?: string;\n title: string;\n description?: string;\n icon?: React.ReactNode;\n intent?: \"default\" | \"danger\" | \"success\" | \"warning\";\n}\n\nconst TimelineItem = React.forwardRef<HTMLLIElement, TimelineItemProps>(\n (\n {\n className,\n timestamp,\n title,\n description,\n icon,\n intent,\n children,\n ...rest\n },\n ref,\n ) => {\n return (\n <li\n ref={ref}\n className={cn(\n \"group relative flex gap-(--space-4) pb-(--space-6) last:pb-0\",\n className,\n )}\n {...rest}\n >\n {/* Left column: marker + connector */}\n <div className=\"flex flex-col items-center self-stretch -mb-(--space-6) group-last:mb-0\">\n <div className={cn(timelineItemMarkerVariants({ intent }))}>\n {icon ? (\n <span className=\"text-sm\" aria-hidden=\"true\">\n {icon}\n </span>\n ) : (\n <span\n className=\"w-2 h-2 rounded-full bg-current\"\n aria-hidden=\"true\"\n />\n )}\n </div>\n {/* Connector line: hidden on last item */}\n <div className=\"w-px flex-1 bg-(--nuka-border-base) mt-(--space-1) group-last:hidden\" />\n </div>\n\n {/* Right column: content */}\n <div className=\"flex-1 min-w-0 pb-(--space-1)\">\n {timestamp != null && (\n <time className=\"block text-xs text-(--nuka-text-muted) mb-(--space-1)\">\n {timestamp}\n </time>\n )}\n <Text as=\"p\" size=\"sm\" weight=\"medium\">\n {title}\n </Text>\n {description != null && (\n <Text as=\"p\" size=\"sm\" color=\"muted\" className=\"mt-(--space-1)\">\n {description}\n </Text>\n )}\n {children && <div className=\"mt-(--space-2)\">{children}</div>}\n </div>\n </li>\n );\n },\n);\n\nTimelineItem.displayName = \"TimelineItem\";\n\nexport { TimelineItem };\n","export type ToastIntent = \"default\" | \"success\" | \"danger\" | \"warning\";\n\nexport interface ToastAction {\n label: string;\n onClick: () => void;\n}\n\nexport interface ToastItem {\n id: string;\n message: string;\n intent: ToastIntent;\n duration: number;\n visible: boolean;\n dismissing: boolean;\n action?: ToastAction;\n}\n\nexport interface ToastOptions {\n intent?: ToastIntent;\n duration?: number;\n action?: ToastAction;\n}\n\nconst MAX_VISIBLE = 5;\nconst DEFAULT_DURATION = 4000;\nconst EXIT_ANIMATION_DURATION = 300;\n\nlet state: ToastItem[] = [];\nconst listeners = new Set<() => void>();\nconst timers = new Map<string, ReturnType<typeof setTimeout>>();\n\nfunction notify(): void {\n for (const listener of listeners) {\n listener();\n }\n}\n\nfunction setState(updater: (prev: ToastItem[]) => ToastItem[]): void {\n state = updater(state);\n notify();\n}\n\nfunction generateId(): string {\n if (\n typeof crypto !== \"undefined\" &&\n typeof crypto.randomUUID === \"function\"\n ) {\n return crypto.randomUUID();\n }\n return Math.random().toString(36).slice(2) + Date.now().toString(36);\n}\n\nfunction startTimer(id: string, duration: number): void {\n if (duration === Infinity) return;\n const timer = setTimeout(() => {\n timers.delete(id);\n dismiss(id);\n }, duration);\n timers.set(id, timer);\n}\n\nfunction flush(): void {\n const visibleCount = state.filter((t) => t.visible && !t.dismissing).length;\n let slotsAvailable = MAX_VISIBLE - visibleCount;\n\n if (slotsAvailable <= 0) return;\n\n const updated = state.map((t) => {\n if (slotsAvailable <= 0 || t.visible || t.dismissing) return t;\n slotsAvailable--;\n startTimer(t.id, t.duration);\n return { ...t, visible: true };\n });\n\n state = updated;\n notify();\n}\n\nfunction add(message: string, options?: ToastOptions): string {\n const id = generateId();\n const item: ToastItem = {\n id,\n message,\n intent: options?.intent ?? \"default\",\n duration: options?.duration ?? DEFAULT_DURATION,\n visible: false,\n dismissing: false,\n ...(options?.action != null ? { action: options.action } : {}),\n };\n\n setState((prev) => [...prev, item]);\n flush();\n return id;\n}\n\nfunction dismiss(id: string): void {\n const existing = state.find((t) => t.id === id);\n if (!existing || existing.dismissing) return;\n\n const timer = timers.get(id);\n if (timer != null) {\n clearTimeout(timer);\n timers.delete(id);\n }\n\n setState((prev) =>\n prev.map((t) => (t.id === id ? { ...t, dismissing: true } : t)),\n );\n\n setTimeout(() => {\n remove(id);\n }, EXIT_ANIMATION_DURATION);\n}\n\nfunction remove(id: string): void {\n setState((prev) => prev.filter((t) => t.id !== id));\n flush();\n}\n\nfunction subscribe(listener: () => void): () => void {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n}\n\nfunction getSnapshot(): ToastItem[] {\n return state;\n}\n\nfunction __reset(): void {\n if (process.env.NODE_ENV !== \"test\") return;\n for (const timer of timers.values()) {\n clearTimeout(timer);\n }\n timers.clear();\n state = [];\n notify();\n}\n\nfunction toast(message: string, options?: ToastOptions): string {\n return add(message, options);\n}\n\ntoast.success = (\n message: string,\n options?: Omit<ToastOptions, \"intent\">,\n): string => add(message, { ...options, intent: \"success\" });\n\ntoast.danger = (\n message: string,\n options?: Omit<ToastOptions, \"intent\">,\n): string => add(message, { ...options, intent: \"danger\" });\n\ntoast.warning = (\n message: string,\n options?: Omit<ToastOptions, \"intent\">,\n): string => add(message, { ...options, intent: \"warning\" });\n\ntoast.dismiss = (id: string): void => {\n dismiss(id);\n};\n\nconst toastStore = { subscribe, getSnapshot, __reset };\n\nexport { toast, toastStore };\n","import { cva } from \"@nuka/utils/variants\";\n\nexport const toastVariants = cva(\n [\n \"relative flex items-start gap-(--space-3)\",\n \"w-80 rounded-(--radius-md) border p-(--space-4)\",\n \"shadow-lg\",\n \"transition-all duration-300\",\n \"data-[state=open]:animate-[nuka-toast-enter_200ms_ease-out]\",\n \"data-[state=closed]:animate-[nuka-toast-exit_300ms_ease-in_forwards]\",\n ],\n {\n variants: {\n intent: {\n default: [\n \"bg-(--nuka-bg-base)\",\n \"border-(--nuka-border-base)\",\n \"text-(--nuka-text-base)\",\n ],\n success: [\n \"bg-(--nuka-success-bg)\",\n \"border-(--nuka-success-border)\",\n \"text-(--nuka-success-text)\",\n ],\n danger: [\n \"bg-(--nuka-danger-bg)\",\n \"border-(--nuka-danger-border)\",\n \"text-(--nuka-danger-text)\",\n ],\n warning: [\n \"bg-(--nuka-warning-bg)\",\n \"border-(--nuka-warning-border)\",\n \"text-(--nuka-warning-text)\",\n ],\n },\n },\n defaultVariants: {\n intent: \"default\",\n },\n },\n);\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { DismissButton } from \"@nuka/utils/dismiss-button\";\nimport { Button } from \"@nuka/components/Button\";\nimport { Text } from \"@nuka/components/Text\";\nimport type { ToastItem } from \"@nuka/components/Toast/toastStore\";\nimport { toastVariants } from \"@nuka/components/Toast/Toast.variants\";\n\nexport interface ToastProps {\n toast: ToastItem;\n onDismiss: (id: string) => void;\n}\n\nconst Toast = React.forwardRef<HTMLDivElement, ToastProps>(\n ({ toast: toastItem, onDismiss }, ref) => {\n return (\n <div\n ref={ref}\n role=\"status\"\n aria-live={toastItem.intent === \"danger\" ? \"assertive\" : \"polite\"}\n aria-atomic=\"true\"\n data-state={toastItem.dismissing ? \"closed\" : \"open\"}\n className={cn(toastVariants({ intent: toastItem.intent }))}\n >\n <Text as=\"div\" size=\"sm\" weight=\"medium\" className=\"flex-1\">\n {toastItem.message}\n </Text>\n {toastItem.action != null && (\n <Button\n variant=\"link\"\n size=\"sm\"\n className=\"shrink-0\"\n onClick={() => {\n toastItem.action?.onClick();\n onDismiss(toastItem.id);\n }}\n >\n {toastItem.action.label}\n </Button>\n )}\n <DismissButton\n onClick={() => onDismiss(toastItem.id)}\n label=\"Dismiss notification\"\n className=\"shrink-0\"\n />\n </div>\n );\n },\n);\n\nToast.displayName = \"Toast\";\n\nexport { Toast, toastVariants };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Portal } from \"@nuka/utils/portal\";\nimport { toast, toastStore } from \"@nuka/components/Toast/toastStore\";\nimport type { ToastItem } from \"@nuka/components/Toast/toastStore\";\nimport { Toast } from \"@nuka/components/Toast/Toast\";\n\nexport type ToasterPosition =\n | \"top-right\"\n | \"top-left\"\n | \"top-center\"\n | \"bottom-right\"\n | \"bottom-left\"\n | \"bottom-center\";\n\nconst positionClasses: Record<ToasterPosition, string> = {\n \"top-right\": \"top-0 right-0 items-end\",\n \"top-left\": \"top-0 left-0 items-start\",\n \"top-center\": \"top-0 left-1/2 -translate-x-1/2 items-center\",\n \"bottom-right\": \"bottom-0 right-0 items-end\",\n \"bottom-left\": \"bottom-0 left-0 items-start\",\n \"bottom-center\": \"bottom-0 left-1/2 -translate-x-1/2 items-center\",\n};\n\nconst emptySnapshot: ToastItem[] = [];\n\nexport interface ToasterProps {\n position?: ToasterPosition;\n className?: string;\n}\n\nconst Toaster = React.forwardRef<HTMLDivElement, ToasterProps>(\n ({ position = \"bottom-right\", className }, ref) => {\n const toasts = React.useSyncExternalStore(\n toastStore.subscribe,\n toastStore.getSnapshot,\n () => emptySnapshot,\n );\n\n const visibleToasts = toasts.filter((t) => t.visible);\n\n if (visibleToasts.length === 0) return null;\n\n return (\n <Portal>\n <div\n ref={ref}\n role=\"region\"\n aria-label=\"Notifications\"\n className={cn(\n \"fixed z-(--nuka-z-toast) flex flex-col gap-(--space-2) p-(--space-4)\",\n positionClasses[position],\n className,\n )}\n >\n {visibleToasts.map((t) => (\n <Toast key={t.id} toast={t} onDismiss={toast.dismiss} />\n ))}\n </div>\n </Portal>\n );\n },\n);\n\nToaster.displayName = \"Toaster\";\n\nexport { Toaster };\n","import * as React from \"react\";\nimport type { useFloating, useInteractions } from \"@floating-ui/react\";\n\nexport interface NavigationMenuContextValue {\n activeValue: string | null;\n openMenu: (value: string) => void;\n closeMenu: () => void;\n registerItem: (value: string, el: HTMLElement | null) => void;\n itemValues: React.RefObject<string[]>;\n itemRefs: React.RefObject<Map<string, HTMLElement>>;\n itemLabels: React.RefObject<Map<string, string>>;\n rovingValue: string | null;\n setRovingValue: (value: string | null) => void;\n}\n\nconst NavigationMenuContext =\n React.createContext<NavigationMenuContextValue | null>(null);\n\nexport function useNavigationMenuContext(): NavigationMenuContextValue {\n const context = React.useContext(NavigationMenuContext);\n if (context === null) {\n throw new Error(\n \"NavigationMenu compound components must be used within <NavigationMenu>\",\n );\n }\n return context;\n}\n\nexport interface NavigationMenuItemContextValue {\n value: string;\n open: boolean;\n onOpenChange: (open: boolean) => void;\n contentId: string;\n refs: ReturnType<typeof useFloating>[\"refs\"];\n floatingStyles: React.CSSProperties;\n getReferenceProps: ReturnType<typeof useInteractions>[\"getReferenceProps\"];\n getFloatingProps: ReturnType<typeof useInteractions>[\"getFloatingProps\"];\n}\n\nconst NavigationMenuItemContext =\n React.createContext<NavigationMenuItemContextValue | null>(null);\n\nexport function useNavigationMenuItemContext(): NavigationMenuItemContextValue {\n const context = React.useContext(NavigationMenuItemContext);\n if (context === null) {\n throw new Error(\n \"NavigationMenuItem compound components must be used within <NavigationMenuItem>\",\n );\n }\n return context;\n}\n\nconst NavigationMenuContentContext = React.createContext(false);\n\nexport function useIsInsideContent(): boolean {\n return React.useContext(NavigationMenuContentContext);\n}\n\nexport {\n NavigationMenuContext,\n NavigationMenuItemContext,\n NavigationMenuContentContext,\n};\n","import * as React from \"react\";\nimport {\n useFloating,\n useClick,\n useDismiss,\n useRole,\n useInteractions,\n offset,\n flip,\n shift,\n autoUpdate,\n} from \"@floating-ui/react\";\nimport type { Placement } from \"@floating-ui/react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Slot, composeRefs } from \"@nuka/utils/slot\";\nimport { Portal } from \"@nuka/utils/portal\";\nimport { useFocusFirstInteractive } from \"@nuka/hooks/use-focus-first-interactive\";\nimport { Icon } from \"@nuka/components/Icon\";\nimport {\n NavigationMenuContext,\n NavigationMenuItemContext,\n NavigationMenuContentContext,\n useNavigationMenuContext,\n useNavigationMenuItemContext,\n useIsInsideContent,\n} from \"@nuka/components/NavigationMenu/NavigationMenu.context\";\n\nexport interface NavigationMenuProps extends React.HTMLAttributes<HTMLElement> {\n \"aria-label\"?: string;\n}\n\nconst NavigationMenu = React.forwardRef<HTMLElement, NavigationMenuProps>(\n (\n {\n className,\n children,\n \"aria-label\": ariaLabel = \"Main navigation\",\n ...props\n },\n ref,\n ) => {\n const [activeValue, setActiveValue] = React.useState<string | null>(null);\n const itemRefs = React.useRef(new Map<string, HTMLElement>());\n const itemValues = React.useRef<string[]>([]);\n const itemLabels = React.useRef(new Map<string, string>());\n const [rovingValue, setRovingValue] = React.useState<string | null>(null);\n\n const openMenu = React.useCallback((value: string) => {\n setActiveValue(value);\n }, []);\n\n const closeMenu = React.useCallback(() => {\n setActiveValue(null);\n }, []);\n\n const registerItem = React.useCallback(\n (value: string, el: HTMLElement | null) => {\n if (el) {\n itemRefs.current.set(value, el);\n if (!itemValues.current.includes(value)) {\n itemValues.current.push(value);\n setRovingValue((prev) => prev ?? value);\n }\n } else {\n itemRefs.current.delete(value);\n itemValues.current = itemValues.current.filter((v) => v !== value);\n }\n },\n [],\n );\n\n const contextValue = React.useMemo(\n () => ({\n activeValue,\n openMenu,\n closeMenu,\n registerItem,\n itemValues,\n itemRefs,\n itemLabels,\n rovingValue,\n setRovingValue,\n }),\n [activeValue, openMenu, closeMenu, registerItem, rovingValue],\n );\n\n return (\n <NavigationMenuContext value={contextValue}>\n <nav\n ref={ref}\n aria-label={ariaLabel}\n className={cn(\"relative\", className)}\n {...props}\n >\n {children}\n </nav>\n </NavigationMenuContext>\n );\n },\n);\n\nNavigationMenu.displayName = \"NavigationMenu\";\n\nexport interface NavigationMenuListProps extends React.HTMLAttributes<HTMLUListElement> {}\n\nconst NavigationMenuList = React.forwardRef<\n HTMLUListElement,\n NavigationMenuListProps\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n className={cn(\"flex items-center gap-(--space-1)\", \"list-none\", className)}\n {...props}\n />\n));\n\nNavigationMenuList.displayName = \"NavigationMenuList\";\n\nexport interface NavigationMenuItemProps extends React.LiHTMLAttributes<HTMLLIElement> {\n value: string;\n placement?: Placement;\n}\n\nconst NavigationMenuItem = React.forwardRef<\n HTMLLIElement,\n NavigationMenuItemProps\n>(\n (\n { value, placement = \"bottom-start\", className, children, ...props },\n ref,\n ) => {\n const rootCtx = useNavigationMenuContext();\n const open = rootCtx.activeValue === value;\n const contentId = React.useId();\n\n const handleOpenChange = React.useCallback(\n (next: boolean) => {\n if (next) {\n rootCtx.openMenu(value);\n } else {\n rootCtx.closeMenu();\n const itemEl = rootCtx.itemRefs.current.get(value);\n if (itemEl) {\n itemEl.tabIndex = 0;\n rootCtx.setRovingValue(value);\n itemEl.focus();\n }\n }\n },\n [rootCtx, value],\n );\n\n const { refs, floatingStyles, context } = useFloating({\n open,\n onOpenChange: handleOpenChange,\n placement,\n middleware: [offset(4), flip(), shift({ padding: 8 })],\n whileElementsMounted: autoUpdate,\n });\n\n const click = useClick(context);\n const dismiss = useDismiss(context);\n const role = useRole(context, { role: \"dialog\" });\n\n const { getReferenceProps, getFloatingProps } = useInteractions([\n click,\n dismiss,\n role,\n ]);\n\n const itemContextValue = React.useMemo(\n () => ({\n value,\n open,\n onOpenChange: handleOpenChange,\n contentId,\n refs,\n floatingStyles,\n getReferenceProps,\n getFloatingProps,\n }),\n [\n value,\n open,\n handleOpenChange,\n contentId,\n refs,\n floatingStyles,\n getReferenceProps,\n getFloatingProps,\n ],\n );\n\n return (\n <NavigationMenuItemContext value={itemContextValue}>\n <li\n ref={ref}\n role=\"none\"\n className={cn(\"relative\", className)}\n {...props}\n >\n {children}\n </li>\n </NavigationMenuItemContext>\n );\n },\n);\n\nNavigationMenuItem.displayName = \"NavigationMenuItem\";\n\nexport interface NavigationMenuTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {}\n\nfunction navigateToAdjacentItem(\n rootCtx: ReturnType<typeof useNavigationMenuContext>,\n currentValue: string,\n direction: -1 | 1,\n): HTMLElement | undefined {\n const values = rootCtx.itemValues.current;\n const currentIndex = values.indexOf(currentValue);\n if (currentIndex === -1) return undefined;\n const nextIndex = (currentIndex + direction + values.length) % values.length;\n const nextValue = values[nextIndex];\n if (nextValue === undefined) return undefined;\n const nextEl = rootCtx.itemRefs.current.get(nextValue);\n if (nextEl) {\n const currentEl = rootCtx.itemRefs.current.get(currentValue);\n if (currentEl) currentEl.tabIndex = -1;\n nextEl.tabIndex = 0;\n rootCtx.setRovingValue(nextValue);\n nextEl.focus();\n }\n return nextEl;\n}\n\nconst NavigationMenuTrigger = React.forwardRef<\n HTMLButtonElement,\n NavigationMenuTriggerProps\n>(({ className, children, onClick, onKeyDown, ...props }, ref) => {\n const rootCtx = useNavigationMenuContext();\n const itemCtx = useNavigationMenuItemContext();\n const composedRef = composeRefs(\n ref,\n itemCtx.refs.setReference,\n (el: HTMLButtonElement | null) => {\n rootCtx.registerItem(itemCtx.value, el);\n if (el) {\n rootCtx.itemLabels.current.set(\n itemCtx.value,\n el.textContent.trim() || itemCtx.value,\n );\n } else {\n rootCtx.itemLabels.current.delete(itemCtx.value);\n }\n },\n );\n\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n itemCtx.onOpenChange(!itemCtx.open);\n onClick?.(e);\n };\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLButtonElement>) => {\n onKeyDown?.(e);\n if (e.defaultPrevented) return;\n\n switch (e.key) {\n case \"ArrowRight\": {\n e.preventDefault();\n if (itemCtx.open) {\n itemCtx.onOpenChange(false);\n }\n navigateToAdjacentItem(rootCtx, itemCtx.value, 1);\n break;\n }\n case \"ArrowLeft\": {\n e.preventDefault();\n if (itemCtx.open) {\n itemCtx.onOpenChange(false);\n }\n navigateToAdjacentItem(rootCtx, itemCtx.value, -1);\n break;\n }\n case \"ArrowDown\": {\n if (!itemCtx.open) {\n e.preventDefault();\n itemCtx.onOpenChange(true);\n }\n break;\n }\n }\n };\n\n const triggerProps = itemCtx.getReferenceProps({\n ...props,\n onClick: handleClick,\n onKeyDown: handleKeyDown,\n });\n\n return (\n <button\n ref={composedRef}\n type=\"button\"\n aria-haspopup=\"dialog\"\n aria-expanded={itemCtx.open}\n aria-controls={itemCtx.contentId}\n className={cn(\n \"inline-flex items-center gap-(--space-1)\",\n \"rounded-(--radius-md) px-(--space-3) py-(--space-2)\",\n \"text-sm font-medium\",\n \"text-(--nuka-text-base)\",\n \"select-none\",\n \"hover:bg-(--nuka-bg-muted)\",\n \"focus-visible:outline-2 focus-visible:outline-offset-2\",\n \"focus-visible:outline-(--nuka-border-focus)\",\n \"data-[state=open]:bg-(--nuka-bg-muted)\",\n className,\n )}\n data-state={itemCtx.open ? \"open\" : \"closed\"}\n // Safe: Floating UI getReferenceProps() returns Record<string, unknown>;\n // values are standard DOM event handlers.\n {...(triggerProps as React.ButtonHTMLAttributes<HTMLButtonElement>)}\n tabIndex={itemCtx.value === rootCtx.rovingValue ? 0 : -1}\n >\n {children}\n <Icon\n size=\"sm\"\n className={cn(\n \"transition-transform duration-200\",\n itemCtx.open && \"rotate-180\",\n )}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n </Icon>\n </button>\n );\n});\n\nNavigationMenuTrigger.displayName = \"NavigationMenuTrigger\";\n\nexport interface NavigationMenuContentProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst NavigationMenuContent = React.forwardRef<\n HTMLDivElement,\n NavigationMenuContentProps\n>(({ className, children, ...props }, ref) => {\n const rootCtx = useNavigationMenuContext();\n const itemCtx = useNavigationMenuItemContext();\n const contentRef = React.useRef<HTMLDivElement>(null);\n const composedRef = composeRefs(ref, contentRef, itemCtx.refs.setFloating);\n\n useFocusFirstInteractive(contentRef, itemCtx.open);\n\n if (!itemCtx.open) return null;\n\n const floatingProps = itemCtx.getFloatingProps(props);\n\n return (\n <Portal>\n <NavigationMenuContentContext value={true}>\n <div\n ref={composedRef}\n id={itemCtx.contentId}\n role=\"dialog\"\n aria-label={\n rootCtx.itemLabels.current.get(itemCtx.value) ?? itemCtx.value\n }\n tabIndex={-1}\n style={itemCtx.floatingStyles}\n // Safe: Floating UI getFloatingProps() returns Record<string, unknown>;\n // values are standard DOM attributes and event handlers.\n {...(floatingProps as React.HTMLAttributes<HTMLDivElement>)}\n className={cn(\n \"z-(--nuka-z-dropdown) min-w-48\",\n \"rounded-(--radius-md) border border-(--nuka-border-base)\",\n \"bg-(--nuka-bg-base) shadow-md\",\n \"p-(--space-4)\",\n \"focus-visible:outline-none\",\n className,\n )}\n >\n {children}\n </div>\n </NavigationMenuContentContext>\n </Portal>\n );\n});\n\nNavigationMenuContent.displayName = \"NavigationMenuContent\";\n\nexport interface NavigationMenuLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {\n asChild?: boolean;\n active?: boolean;\n}\n\nconst NavigationMenuLink = React.forwardRef<\n HTMLAnchorElement,\n NavigationMenuLinkProps\n>(\n (\n { asChild = false, active = false, className, onKeyDown, ...props },\n ref,\n ) => {\n const rootCtx = useNavigationMenuContext();\n const itemCtx = useNavigationMenuItemContext();\n const insideContent = useIsInsideContent();\n const Comp = asChild ? Slot : \"a\";\n\n const composedRef = composeRefs(\n ref,\n insideContent\n ? undefined\n : (el: HTMLAnchorElement | null) => {\n rootCtx.registerItem(itemCtx.value, el);\n },\n );\n\n const handleKeyDown = insideContent\n ? onKeyDown\n : (e: React.KeyboardEvent<HTMLAnchorElement>) => {\n onKeyDown?.(e);\n if (e.defaultPrevented) return;\n\n switch (e.key) {\n case \"ArrowRight\": {\n e.preventDefault();\n navigateToAdjacentItem(rootCtx, itemCtx.value, 1);\n break;\n }\n case \"ArrowLeft\": {\n e.preventDefault();\n navigateToAdjacentItem(rootCtx, itemCtx.value, -1);\n break;\n }\n case \"Escape\": {\n e.preventDefault();\n if (rootCtx.activeValue !== null) {\n rootCtx.closeMenu();\n }\n break;\n }\n }\n };\n\n const menubarProps = insideContent\n ? {}\n : {\n tabIndex: itemCtx.value === rootCtx.rovingValue ? 0 : -1,\n };\n\n return (\n <Comp\n ref={composedRef}\n aria-current={active ? \"page\" : undefined}\n className={cn(\n \"inline-flex items-center\",\n \"rounded-(--radius-md) px-(--space-3) py-(--space-2)\",\n \"text-sm font-medium\",\n \"text-(--nuka-text-base)\",\n \"select-none\",\n \"hover:bg-(--nuka-bg-muted)\",\n \"focus-visible:outline-2 focus-visible:outline-offset-2\",\n \"focus-visible:outline-(--nuka-border-focus)\",\n active && \"text-(--nuka-accent-text)\",\n className,\n )}\n {...menubarProps}\n onKeyDown={handleKeyDown}\n {...props}\n />\n );\n },\n);\n\nNavigationMenuLink.displayName = \"NavigationMenuLink\";\n\nexport {\n NavigationMenu,\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuTrigger,\n NavigationMenuContent,\n NavigationMenuLink,\n};\n","import * as React from \"react\";\n\nexport interface BreadcrumbProps extends React.HTMLAttributes<HTMLElement> {\n \"aria-label\"?: string;\n}\n\nconst Breadcrumb = React.forwardRef<HTMLElement, BreadcrumbProps>(\n ({ \"aria-label\": ariaLabel = \"Breadcrumb\", ...props }, ref) => (\n <nav ref={ref} aria-label={ariaLabel} {...props} />\n ),\n);\n\nBreadcrumb.displayName = \"Breadcrumb\";\n\nexport { Breadcrumb };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\n\nexport interface BreadcrumbListProps extends React.OlHTMLAttributes<HTMLOListElement> {}\n\nconst BreadcrumbList = React.forwardRef<HTMLOListElement, BreadcrumbListProps>(\n ({ className, ...props }, ref) => (\n <ol\n ref={ref}\n role=\"list\"\n className={cn(\n \"flex items-center gap-(--space-1.5)\",\n \"flex-wrap\",\n \"list-none\",\n \"text-sm text-(--nuka-text-muted)\",\n className,\n )}\n {...props}\n />\n ),\n);\n\nBreadcrumbList.displayName = \"BreadcrumbList\";\n\nexport { BreadcrumbList };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\n\nexport interface BreadcrumbItemProps extends React.LiHTMLAttributes<HTMLLIElement> {}\n\nconst BreadcrumbItem = React.forwardRef<HTMLLIElement, BreadcrumbItemProps>(\n ({ className, ...props }, ref) => (\n <li\n ref={ref}\n className={cn(\"inline-flex items-center gap-(--space-1.5)\", className)}\n {...props}\n />\n ),\n);\n\nBreadcrumbItem.displayName = \"BreadcrumbItem\";\n\nexport { BreadcrumbItem };\n","import * as React from \"react\";\nimport { Slot } from \"@nuka/utils/slot\";\nimport { cn } from \"@nuka/utils/cn\";\n\nexport interface BreadcrumbLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {\n asChild?: boolean;\n}\n\nconst BreadcrumbLink = React.forwardRef<HTMLAnchorElement, BreadcrumbLinkProps>(\n ({ asChild = false, className, ...props }, ref) => {\n const Comp = asChild ? Slot : \"a\";\n\n return (\n <Comp\n ref={ref}\n className={cn(\n \"text-(--nuka-text-muted)\",\n \"hover:text-(--nuka-text-base)\",\n \"transition-colors duration-150\",\n \"focus-visible:outline-2 focus-visible:outline-offset-2\",\n \"focus-visible:outline-(--nuka-border-focus)\",\n \"rounded-(--radius-sm)\",\n className,\n )}\n {...props}\n />\n );\n },\n);\n\nBreadcrumbLink.displayName = \"BreadcrumbLink\";\n\nexport { BreadcrumbLink };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\n\nexport interface BreadcrumbPageProps extends React.HTMLAttributes<HTMLSpanElement> {}\n\nconst BreadcrumbPage = React.forwardRef<HTMLSpanElement, BreadcrumbPageProps>(\n ({ className, ...props }, ref) => (\n <span\n ref={ref}\n aria-current=\"page\"\n className={cn(\"text-(--nuka-text-base)\", \"font-medium\", className)}\n {...props}\n />\n ),\n);\n\nBreadcrumbPage.displayName = \"BreadcrumbPage\";\n\nexport { BreadcrumbPage };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Text } from \"@nuka/components/Text\";\n\nexport interface BreadcrumbSeparatorProps extends React.LiHTMLAttributes<HTMLLIElement> {}\n\nconst BreadcrumbSeparator = React.forwardRef<\n HTMLLIElement,\n BreadcrumbSeparatorProps\n>(({ className, children, ...props }, ref) => (\n <li\n ref={ref}\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(\n \"flex items-center px-(--space-1) text-(--nuka-text-subtle\",\n className,\n )}\n {...props}\n >\n {children ?? (\n <Text as=\"span\" size=\"sm\" color=\"subtle\">\n /\n </Text>\n )}\n </li>\n));\n\nBreadcrumbSeparator.displayName = \"BreadcrumbSeparator\";\n\nexport { BreadcrumbSeparator };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\n\nexport interface BreadcrumbEllipsisProps extends React.HTMLAttributes<HTMLSpanElement> {}\n\nconst BreadcrumbEllipsis = React.forwardRef<\n HTMLSpanElement,\n BreadcrumbEllipsisProps\n>(({ className, ...props }, ref) => (\n <span\n ref={ref}\n role=\"presentation\"\n className={cn(\"flex items-center justify-center size-6\", className)}\n {...props}\n >\n <span aria-hidden=\"true\">...</span>\n <span className=\"sr-only\">More pages</span>\n </span>\n));\n\nBreadcrumbEllipsis.displayName = \"BreadcrumbEllipsis\";\n\nexport { BreadcrumbEllipsis };\n","import { createContext, useContext } from \"react\";\n\nexport type StepperOrientation = \"horizontal\" | \"vertical\";\nexport type StepState = \"completed\" | \"current\" | \"upcoming\" | \"error\";\n\nexport interface StepperContextValue {\n currentStep: number;\n orientation: StepperOrientation;\n onStepClick: ((step: number) => void) | undefined;\n}\n\nexport interface StepperItemContextValue {\n step: number;\n state: StepState;\n disabled: boolean;\n}\n\nconst StepperContext = createContext<StepperContextValue | null>(null);\n\nfunction useStepperContext(): StepperContextValue {\n const context = useContext(StepperContext);\n if (context === null) {\n throw new Error(\n \"Stepper compound components must be used within <Stepper>\",\n );\n }\n return context;\n}\n\nconst StepperItemContext = createContext<StepperItemContextValue | null>(null);\n\nfunction useStepperItemContext(): StepperItemContextValue {\n const context = useContext(StepperItemContext);\n if (context === null) {\n throw new Error(\n \"StepperIndicator/StepperContent must be used within <StepperItem>\",\n );\n }\n return context;\n}\n\nexport {\n StepperContext,\n useStepperContext,\n StepperItemContext,\n useStepperItemContext,\n};\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { StepperContext } from \"@nuka/components/Stepper/Stepper.context\";\nimport type {\n StepperOrientation,\n StepState,\n StepperContextValue,\n} from \"@nuka/components/Stepper/Stepper.context\";\n\nfunction resolveStepState(\n child: React.ReactNode,\n index: number,\n currentStep: number,\n): StepState {\n if (React.isValidElement(child)) {\n const explicitState = (child.props as Record<string, unknown>).state as\n | StepState\n | undefined;\n if (explicitState !== undefined) return explicitState;\n\n const step = (child.props as Record<string, unknown>).step as\n | number\n | undefined;\n const stepIndex = step ?? index;\n if (stepIndex < currentStep) return \"completed\";\n if (stepIndex === currentStep) return \"current\";\n }\n return \"upcoming\";\n}\n\nexport interface StepperProps extends React.HTMLAttributes<HTMLElement> {\n currentStep: number;\n orientation?: StepperOrientation;\n onStepClick?: (step: number) => void;\n}\n\nconst Stepper = React.forwardRef<HTMLElement, StepperProps>(\n (\n {\n currentStep,\n orientation = \"horizontal\",\n onStepClick,\n className,\n children,\n \"aria-label\": ariaLabel = \"Progress\",\n ...props\n },\n ref,\n ) => {\n const contextValue: StepperContextValue = React.useMemo(\n () => ({ currentStep, orientation, onStepClick }),\n [currentStep, orientation, onStepClick],\n );\n\n const childArray = React.Children.toArray(children);\n let listChildren: React.ReactNode[];\n\n if (orientation === \"horizontal\") {\n listChildren = [];\n childArray.forEach((child, i) => {\n listChildren.push(child);\n if (i < childArray.length - 1) {\n const leftStepState = resolveStepState(child, i, currentStep);\n const segmentCompleted = leftStepState === \"completed\";\n listChildren.push(\n <li\n key={`connector-${String(i)}`}\n role=\"presentation\"\n aria-hidden=\"true\"\n className=\"flex items-start flex-1\"\n >\n <div\n className={cn(\n \"h-px w-full mt-(--space-4)\",\n segmentCompleted\n ? \"bg-(--nuka-accent-bg)\"\n : \"bg-(--nuka-border-base)\",\n )}\n />\n </li>,\n );\n }\n });\n } else {\n listChildren = childArray;\n }\n\n return (\n <StepperContext value={contextValue}>\n <nav ref={ref} aria-label={ariaLabel} className={className} {...props}>\n <ol\n className={cn(\n \"flex list-none\",\n orientation === \"horizontal\"\n ? \"flex-row items-start\"\n : \"flex-col\",\n )}\n >\n {listChildren}\n </ol>\n </nav>\n </StepperContext>\n );\n },\n);\n\nStepper.displayName = \"Stepper\";\n\nexport { Stepper };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport {\n StepperItemContext,\n useStepperContext,\n} from \"@nuka/components/Stepper/Stepper.context\";\nimport type {\n StepState,\n StepperItemContextValue,\n} from \"@nuka/components/Stepper/Stepper.context\";\n\nexport interface StepperItemProps extends React.LiHTMLAttributes<HTMLLIElement> {\n step: number;\n state?: StepState;\n disabled?: boolean;\n}\n\nconst StepperItem = React.forwardRef<HTMLLIElement, StepperItemProps>(\n (\n {\n step,\n state: explicitState,\n disabled = false,\n className,\n children,\n ...props\n },\n ref,\n ) => {\n const { currentStep, orientation, onStepClick } = useStepperContext();\n\n const inferredState: StepState =\n step < currentStep\n ? \"completed\"\n : step === currentStep\n ? \"current\"\n : \"upcoming\";\n\n const state = explicitState ?? inferredState;\n\n const isInteractive =\n onStepClick !== undefined && state === \"completed\" && !disabled;\n\n const itemContextValue: StepperItemContextValue = React.useMemo(\n () => ({ step, state, disabled }),\n [step, state, disabled],\n );\n\n return (\n <StepperItemContext value={itemContextValue}>\n <li\n ref={ref}\n aria-current={state === \"current\" ? \"step\" : undefined}\n className={cn(\n orientation === \"horizontal\"\n ? \"flex flex-col items-center shrink-0\"\n : \"group relative flex gap-(--space-3) pb-(--space-8) last:pb-0\",\n className,\n )}\n {...props}\n >\n {isInteractive ? (\n <button\n type=\"button\"\n onClick={() => onStepClick(step)}\n aria-label={`Go to step ${String(step + 1)}`}\n className={cn(\n \"flex cursor-pointer bg-transparent border-none p-0\",\n orientation === \"horizontal\"\n ? \"flex-col items-center\"\n : \"flex-row gap-(--space-3) items-start\",\n \"rounded-(--radius-md)\",\n \"focus-visible:outline-2 focus-visible:outline-offset-2\",\n \"focus-visible:outline-(--nuka-border-focus)\",\n )}\n >\n {children}\n </button>\n ) : (\n children\n )}\n </li>\n </StepperItemContext>\n );\n },\n);\n\nStepperItem.displayName = \"StepperItem\";\n\nexport { StepperItem };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Icon } from \"@nuka/components/Icon\";\nimport { Text } from \"@nuka/components/Text\";\nimport {\n useStepperContext,\n useStepperItemContext,\n} from \"@nuka/components/Stepper/Stepper.context\";\n\nexport interface StepperIndicatorProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst StepperIndicator = React.forwardRef<\n HTMLDivElement,\n StepperIndicatorProps\n>(({ className, ...props }, ref) => {\n const { state, step } = useStepperItemContext();\n const { orientation } = useStepperContext();\n\n const circle = (\n <div\n ref={ref}\n className={cn(\n \"flex items-center justify-center\",\n \"w-8 h-8 rounded-full\",\n \"border-2 shrink-0\",\n \"text-sm font-medium\",\n \"transition-colors duration-150\",\n state === \"completed\" &&\n \"bg-(--nuka-accent-bg) border-(--nuka-accent-bg) text-(--nuka-accent-fg)\",\n state === \"current\" &&\n \"border-(--nuka-accent-bg) text-(--nuka-accent-text) bg-(--nuka-bg-base)\",\n state === \"upcoming\" &&\n \"border-(--nuka-border-base) text-(--nuka-text-muted) bg-(--nuka-bg-base)\",\n state === \"error\" &&\n \"border-(--nuka-danger-base) text-(--nuka-danger-fg) bg-(--nuka-danger-base)\",\n className,\n )}\n {...props}\n >\n {state === \"completed\" ? (\n <>\n <Icon size=\"sm\">\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={3}\n >\n <path\n d=\"M5 13l4 4L19 7\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </Icon>\n <span className=\"sr-only\">Completed</span>\n </>\n ) : state === \"error\" ? (\n <>\n <Icon size=\"sm\">\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={3}\n >\n <path\n d=\"M12 8v4m0 4h.01\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </Icon>\n <span className=\"sr-only\">Error</span>\n </>\n ) : (\n <Text as=\"span\">{step + 1}</Text>\n )}\n </div>\n );\n\n if (orientation === \"vertical\") {\n return (\n <div className=\"flex flex-col items-center self-stretch shrink-0 -mb-(--space-8) group-last:mb-0\">\n {circle}\n <div\n aria-hidden=\"true\"\n className={cn(\n \"w-px flex-1 group-last:hidden\",\n state === \"completed\"\n ? \"bg-(--nuka-accent-bg)\"\n : \"bg-(--nuka-border-base)\",\n )}\n />\n </div>\n );\n }\n\n return circle;\n});\n\nStepperIndicator.displayName = \"StepperIndicator\";\n\nexport { StepperIndicator };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { useStepperContext } from \"@nuka/components/Stepper/Stepper.context\";\n\nexport interface StepperContentProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst StepperContent = React.forwardRef<HTMLDivElement, StepperContentProps>(\n ({ className, ...props }, ref) => {\n const { orientation } = useStepperContext();\n\n return (\n <div\n ref={ref}\n className={cn(\n \"flex flex-col\",\n orientation === \"horizontal\"\n ? \"w-0 mt-(--space-1) items-center text-center\"\n : \"flex-1 min-w-0 pt-(--space-0.5)\",\n className,\n )}\n {...props}\n />\n );\n },\n);\n\nStepperContent.displayName = \"StepperContent\";\n\nexport { StepperContent };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Text } from \"@nuka/components/Text\";\nimport { useStepperContext } from \"@nuka/components/Stepper/Stepper.context\";\n\nexport interface StepperTitleProps extends Omit<\n React.HTMLAttributes<HTMLElement>,\n \"color\"\n> {}\n\nconst StepperTitle = React.forwardRef<HTMLElement, StepperTitleProps>(\n ({ className, ...props }, ref) => {\n const { orientation } = useStepperContext();\n\n return (\n <Text\n ref={ref}\n as=\"span\"\n size=\"sm\"\n weight=\"medium\"\n className={cn(\n orientation === \"horizontal\" && \"whitespace-nowrap\",\n className,\n )}\n {...props}\n />\n );\n },\n);\n\nStepperTitle.displayName = \"StepperTitle\";\n\nexport { StepperTitle };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Text } from \"@nuka/components/Text\";\nimport { useStepperContext } from \"@nuka/components/Stepper/Stepper.context\";\n\nexport interface StepperDescriptionProps extends Omit<\n React.HTMLAttributes<HTMLElement>,\n \"color\"\n> {}\n\nconst StepperDescription = React.forwardRef<\n HTMLElement,\n StepperDescriptionProps\n>(({ className, ...props }, ref) => {\n const { orientation } = useStepperContext();\n\n return (\n <Text\n ref={ref}\n as=\"span\"\n size=\"xs\"\n color=\"muted\"\n className={cn(\n orientation === \"horizontal\" && \"whitespace-nowrap\",\n className,\n )}\n {...props}\n />\n );\n});\n\nStepperDescription.displayName = \"StepperDescription\";\n\nexport { StepperDescription };\n","import { useState, useEffect } from \"react\";\n\nfunction useMediaQuery(query: string): boolean {\n const [matches, setMatches] = useState(() => {\n if (typeof window === \"undefined\") return false;\n return window.matchMedia(query).matches;\n });\n\n useEffect(() => {\n const mql = window.matchMedia(query);\n setMatches(mql.matches);\n\n function handleChange(e: MediaQueryListEvent) {\n setMatches(e.matches);\n }\n\n mql.addEventListener(\"change\", handleChange);\n return () => mql.removeEventListener(\"change\", handleChange);\n }, [query]);\n\n return matches;\n}\n\nexport { useMediaQuery };\n","import { createContext, useContext } from \"react\";\n\nexport interface SidebarContextValue {\n expanded: boolean;\n setExpanded: (expanded: boolean) => void;\n isMobile: boolean;\n mobileOpen: boolean;\n setMobileOpen: (open: boolean) => void;\n}\n\nconst SidebarContext = createContext<SidebarContextValue | null>(null);\n\nfunction useSidebarContext(): SidebarContextValue {\n const context = useContext(SidebarContext);\n if (context === null) {\n throw new Error(\n \"Sidebar compound components must be used within <SidebarProvider>\",\n );\n }\n return context;\n}\n\nexport { SidebarContext, useSidebarContext };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { useControllableState } from \"@nuka/hooks/use-controllable-state\";\nimport { useMediaQuery } from \"@nuka/hooks/use-media-query\";\nimport { SidebarContext } from \"@nuka/components/Sidebar/Sidebar.context\";\nimport type { SidebarContextValue } from \"@nuka/components/Sidebar/Sidebar.context\";\n\nexport interface SidebarProviderProps extends React.HTMLAttributes<HTMLDivElement> {\n expanded?: boolean;\n defaultExpanded?: boolean;\n onExpandedChange?: (expanded: boolean) => void;\n mobileBreakpoint?: string;\n}\n\nconst SidebarProvider = React.forwardRef<HTMLDivElement, SidebarProviderProps>(\n (\n {\n expanded: controlledExpanded,\n defaultExpanded = true,\n onExpandedChange,\n mobileBreakpoint = \"(max-width: 768px)\",\n className,\n children,\n ...props\n },\n ref,\n ) => {\n const [currentExpanded, setExpanded] = useControllableState(\n controlledExpanded,\n defaultExpanded,\n onExpandedChange,\n );\n\n const isMobile = useMediaQuery(mobileBreakpoint);\n const [mobileOpen, setMobileOpen] = React.useState(false);\n\n const contextValue: SidebarContextValue = React.useMemo(\n () => ({\n expanded: currentExpanded,\n setExpanded,\n isMobile,\n mobileOpen,\n setMobileOpen,\n }),\n [currentExpanded, setExpanded, isMobile, mobileOpen],\n );\n\n return (\n <SidebarContext value={contextValue}>\n <div\n ref={ref}\n className={cn(\"flex min-h-svh w-full\", className)}\n {...props}\n >\n {children}\n </div>\n </SidebarContext>\n );\n },\n);\n\nSidebarProvider.displayName = \"SidebarProvider\";\n\nexport { SidebarProvider };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { useSidebarContext } from \"@nuka/components/Sidebar/Sidebar.context\";\nimport {\n Sheet,\n SheetContent,\n SheetTitle,\n SheetDescription,\n} from \"@nuka/components/Sheet\";\n\nexport interface SidebarProps extends React.HTMLAttributes<HTMLElement> {}\n\nconst Sidebar = React.forwardRef<HTMLElement, SidebarProps>(\n ({ className, children, ...props }, ref) => {\n const { expanded, isMobile, mobileOpen, setMobileOpen } =\n useSidebarContext();\n\n if (isMobile) {\n return (\n <Sheet open={mobileOpen} onOpenChange={setMobileOpen}>\n {/* w-72 (288px): layout-specific width, no matching design token */}\n <SheetContent side=\"left\" className=\"w-72 p-0\">\n <SheetTitle className=\"sr-only\">Navigation</SheetTitle>\n <SheetDescription className=\"sr-only\">\n Main navigation menu\n </SheetDescription>\n <div className=\"flex h-full flex-col\" {...props}>\n {children}\n </div>\n </SheetContent>\n </Sheet>\n );\n }\n\n return (\n <aside\n ref={ref}\n data-expanded={expanded ? \"\" : undefined}\n data-collapsed={!expanded ? \"\" : undefined}\n className={cn(\n \"flex h-full flex-col\",\n \"border-r border-(--nuka-border-base)\",\n \"bg-(--nuka-bg-base)\",\n \"transition-[width] duration-200 ease-in-out\",\n \"motion-reduce:transition-none\",\n \"overflow-hidden shrink-0\",\n // w-64 (256px) expanded, w-14 (56px) collapsed: layout-specific widths, no matching design tokens\n expanded ? \"w-64\" : \"w-14\",\n className,\n )}\n {...props}\n >\n {children}\n </aside>\n );\n },\n);\n\nSidebar.displayName = \"Sidebar\";\n\nexport { Sidebar };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\n\nexport interface SidebarHeaderProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst SidebarHeader = React.forwardRef<HTMLDivElement, SidebarHeaderProps>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex items-center gap-(--space-2) px-(--space-3) py-(--space-4)\",\n \"border-b border-(--nuka-border-base)\",\n className,\n )}\n {...props}\n />\n ),\n);\n\nSidebarHeader.displayName = \"SidebarHeader\";\n\nexport { SidebarHeader };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\n\nexport interface SidebarContentProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst SidebarContent = React.forwardRef<HTMLDivElement, SidebarContentProps>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex-1 overflow-y-auto px-(--space-2) py-(--space-2)\",\n className,\n )}\n {...props}\n />\n ),\n);\n\nSidebarContent.displayName = \"SidebarContent\";\n\nexport { SidebarContent };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\n\nexport interface SidebarFooterProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst SidebarFooter = React.forwardRef<HTMLDivElement, SidebarFooterProps>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"flex items-center gap-(--space-2) px-(--space-3) py-(--space-3)\",\n \"border-t border-(--nuka-border-base)\",\n className,\n )}\n {...props}\n />\n ),\n);\n\nSidebarFooter.displayName = \"SidebarFooter\";\n\nexport { SidebarFooter };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\n\nexport interface SidebarGroupProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst SidebarGroup = React.forwardRef<HTMLDivElement, SidebarGroupProps>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"py-(--space-2)\", className)} {...props} />\n ),\n);\n\nSidebarGroup.displayName = \"SidebarGroup\";\n\nexport { SidebarGroup };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Text } from \"@nuka/components/Text\";\nimport { useSidebarContext } from \"@nuka/components/Sidebar/Sidebar.context\";\n\nexport interface SidebarGroupLabelProps extends Omit<\n React.HTMLAttributes<HTMLElement>,\n \"color\"\n> {}\n\nconst SidebarGroupLabel = React.forwardRef<HTMLElement, SidebarGroupLabelProps>(\n ({ className, ...props }, ref) => {\n const { expanded, isMobile } = useSidebarContext();\n const isVisible = expanded || isMobile;\n\n if (!isVisible) return null;\n\n return (\n <Text\n ref={ref}\n as=\"span\"\n size=\"xs\"\n weight=\"semibold\"\n color=\"muted\"\n className={cn(\"block px-(--space-3) py-(--space-1)\", className)}\n {...props}\n />\n );\n },\n);\n\nSidebarGroupLabel.displayName = \"SidebarGroupLabel\";\n\nexport { SidebarGroupLabel };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\n\nexport interface SidebarMenuProps extends React.HTMLAttributes<HTMLUListElement> {}\n\nconst SidebarMenu = React.forwardRef<HTMLUListElement, SidebarMenuProps>(\n ({ className, ...props }, ref) => (\n <ul\n ref={ref}\n className={cn(\"flex flex-col gap-(--space-0.5) list-none\", className)}\n {...props}\n />\n ),\n);\n\nSidebarMenu.displayName = \"SidebarMenu\";\n\nexport { SidebarMenu };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\n\nexport interface SidebarMenuItemProps extends React.LiHTMLAttributes<HTMLLIElement> {}\n\nconst SidebarMenuItem = React.forwardRef<HTMLLIElement, SidebarMenuItemProps>(\n ({ className, ...props }, ref) => (\n <li ref={ref} className={cn(className)} {...props} />\n ),\n);\n\nSidebarMenuItem.displayName = \"SidebarMenuItem\";\n\nexport { SidebarMenuItem };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Slot } from \"@nuka/utils/slot\";\nimport { useSidebarContext } from \"@nuka/components/Sidebar/Sidebar.context\";\nimport {\n Tooltip,\n TooltipTrigger,\n TooltipContent,\n} from \"@nuka/components/Tooltip\";\n\nexport interface SidebarMenuButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n asChild?: boolean;\n tooltip?: string;\n}\n\nconst SidebarMenuButton = React.forwardRef<\n HTMLButtonElement,\n SidebarMenuButtonProps\n>(({ asChild = false, tooltip, className, children, ...props }, ref) => {\n const { expanded, isMobile } = useSidebarContext();\n const showTooltip = !expanded && !isMobile && tooltip !== undefined;\n\n const Comp = asChild ? Slot : \"button\";\n\n const button = (\n <Comp\n ref={ref}\n className={cn(\n \"flex w-full items-center gap-(--space-3)\",\n \"rounded-(--radius-md) px-(--space-3) py-(--space-2)\",\n \"text-sm text-(--nuka-text-base)\",\n \"hover:bg-(--nuka-bg-muted)\",\n \"transition-colors duration-150\",\n \"focus-visible:outline-2 focus-visible:outline-offset-2\",\n \"focus-visible:outline-(--nuka-border-focus)\",\n !expanded && !isMobile && \"justify-center px-(--space-2)\",\n className,\n )}\n {...props}\n >\n {children}\n </Comp>\n );\n\n if (showTooltip) {\n return (\n <Tooltip side=\"right\" delay={200}>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent>{tooltip}</TooltipContent>\n </Tooltip>\n );\n }\n\n return button;\n});\n\nSidebarMenuButton.displayName = \"SidebarMenuButton\";\n\nexport { SidebarMenuButton };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { Icon } from \"@nuka/components/Icon\";\nimport { useSidebarContext } from \"@nuka/components/Sidebar/Sidebar.context\";\n\nconst CloseIcon = () => (\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2}>\n <path\n d=\"M18 6L6 18M6 6l12 12\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n);\n\nconst MenuIcon = () => (\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2}>\n <path\n d=\"M4 6h16M4 12h16M4 18h16\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n);\n\nconst CollapseIcon = () => (\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2}>\n <path d=\"M11 19l-7-7 7-7\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n <path d=\"M4 12h16\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n);\n\nconst ExpandIcon = () => (\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth={2}>\n <path d=\"M13 5l7 7-7 7\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n <path d=\"M20 12H4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n);\n\nexport interface SidebarTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {}\n\nconst SidebarTrigger = React.forwardRef<HTMLButtonElement, SidebarTriggerProps>(\n ({ className, ...props }, ref) => {\n const { expanded, setExpanded, isMobile, setMobileOpen, mobileOpen } =\n useSidebarContext();\n\n function handleClick() {\n if (isMobile) {\n setMobileOpen(!mobileOpen);\n } else {\n setExpanded(!expanded);\n }\n }\n\n const IconSvg = isMobile\n ? mobileOpen\n ? CloseIcon\n : MenuIcon\n : expanded\n ? CollapseIcon\n : ExpandIcon;\n\n return (\n <button\n ref={ref}\n type=\"button\"\n aria-label={\n isMobile\n ? mobileOpen\n ? \"Close navigation\"\n : \"Open navigation\"\n : expanded\n ? \"Collapse sidebar\"\n : \"Expand sidebar\"\n }\n onClick={handleClick}\n className={cn(\n \"inline-flex items-center justify-center\",\n \"w-8 h-8 rounded-(--radius-md)\",\n \"text-(--nuka-text-muted)\",\n \"hover:bg-(--nuka-bg-muted) hover:text-(--nuka-text-base)\",\n \"transition-colors duration-150\",\n \"focus-visible:outline-2 focus-visible:outline-offset-2\",\n \"focus-visible:outline-(--nuka-border-focus)\",\n className,\n )}\n {...props}\n >\n <Icon size=\"sm\">\n <IconSvg />\n </Icon>\n </button>\n );\n },\n);\n\nSidebarTrigger.displayName = \"SidebarTrigger\";\n\nexport { SidebarTrigger };\n","import * as React from \"react\";\nimport { cn } from \"@nuka/utils/cn\";\nimport { useSidebarContext } from \"@nuka/components/Sidebar/Sidebar.context\";\n\nexport interface SidebarInsetProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nconst SidebarInset = React.forwardRef<HTMLDivElement, SidebarInsetProps>(\n ({ className, ...props }, ref) => {\n const { isMobile } = useSidebarContext();\n\n return (\n <div\n ref={ref}\n className={cn(\n \"flex-1 overflow-auto\",\n !isMobile && \"transition-[margin-left] duration-200 ease-in-out\",\n !isMobile && \"motion-reduce:transition-none\",\n className,\n )}\n {...props}\n />\n );\n },\n);\n\nSidebarInset.displayName = \"SidebarInset\";\n\nexport { SidebarInset };\n"],"x_google_ignoreList":[0,1,12,55,56,57,58,59,60,61,62],"mappings":";;;;;AAAA,SAAS,EAAE,GAAE;CAAC,IAAI,GAAE,GAAE,IAAE;AAAG,KAAa,OAAO,KAAjB,YAA8B,OAAO,KAAjB,SAAmB,MAAG;UAAoB,OAAO,KAAjB,SAAmB,KAAG,MAAM,QAAQ,EAAE,EAAC;EAAC,IAAI,IAAE,EAAE;AAAO,OAAI,IAAE,GAAE,IAAE,GAAE,IAAI,GAAE,OAAK,IAAE,EAAE,EAAE,GAAG,MAAI,MAAI,KAAG,MAAK,KAAG;OAAQ,MAAI,KAAK,EAAE,GAAE,OAAK,MAAI,KAAG,MAAK,KAAG;AAAG,QAAO;;AAAE,SAAgB,IAAM;AAAC,MAAI,IAAI,GAAE,GAAE,IAAE,GAAE,IAAE,IAAG,IAAE,UAAU,QAAO,IAAE,GAAE,IAAI,EAAC,IAAE,UAAU,QAAM,IAAE,EAAE,EAAE,MAAI,MAAI,KAAG,MAAK,KAAG;AAAG,QAAO;;;;ACG9W,IAAM,KAAgB,GAAQ,MAAW;CAEvC,IAAM,IAAoB,MAAM,EAAO,SAAS,EAAO,OAAO;AAC9D,MAAK,IAAI,IAAI,GAAG,IAAI,EAAO,QAAQ,IACjC,GAAc,KAAK,EAAO;AAE5B,MAAK,IAAI,IAAI,GAAG,IAAI,EAAO,QAAQ,IACjC,GAAc,EAAO,SAAS,KAAK,EAAO;AAE5C,QAAO;GAIH,KAA8B,GAAc,OAAe;CAC/D;CACA;CACD,GAEK,K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,cAAW,YAAS,WAAQ,SAAM,aAAU,IAAO,GAAG,KAAS,MAI9D,kBAHW,IAAU,IAAO,QAG5B;CACO;CACL,WAAW,EAAG,GAAc;EAAE;EAAS;EAAQ;EAAM,CAAC,EAAE,EAAU;CAClE,GAAI;CACJ,CAAA,CAGP;AAED,GAAM,cAAc;;;ACzBpB,IAAa,KAAiB,EAC5B;CACE;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EACD;CACE,UAAU;EACR,SAAS;GACP,SAAS,CAAC,qBAAqB;GAC/B,WAAW,EAAE;GACb,SAAS,CAAC,iBAAiB;GAC3B,OAAO,CAAC,kBAAkB,qBAAqB;GAC/C,MAAM;IACJ;IACA;IACA;IACA;IACA;IACA;IACD;GACF;EACD,QAAQ;GACN,SAAS;GACT,QAAQ;GACR,SAAS;GACT,SAAS;GACV;EACD,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACL;EACF;CAID,kBAAkB;EAChB;GACE,SAAS;GACT,QAAQ;GACR,WAAW;IACT;IACA;IACA;IACA;IACD;GACF;EACD;GACE,SAAS;GACT,QAAQ;GACR,WAAW;IACT;IACA;IACA;IACA;IACD;GACF;EACD;GACE,SAAS;GACT,QAAQ;GACR,WAAW;IACT;IACA;IACA;IACA;IACD;GACF;EACD;GACE,SAAS;GACT,QAAQ;GACR,WAAW;IACT;IACA;IACA;IACA;IACD;GACF;EAED;GACE,SAAS;GACT,QAAQ;GACR,WAAW;IACT;IACA;IACA;IACA;IACA;IACD;GACF;EACD;GACE,SAAS;GACT,QAAQ;GACR,WAAW;IACT;IACA;IACA;IACA;IACD;GACF;EACD;GACE,SAAS;GACT,QAAQ;GACR,WAAW;IACT;IACA;IACA;IACA;IACD;GACF;EACD;GACE,SAAS;GACT,QAAQ;GACR,WAAW;IACT;IACA;IACA;IACA;IACD;GACF;EAED;GACE,SAAS;GACT,QAAQ;GACR,WAAW;IACT;IACA;IACA;IACD;GACF;EACD;GACE,SAAS;GACT,QAAQ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