@lotte-innovate/ui-component-test 0.1.91 → 0.1.93
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/globals.css +2 -2
- package/dist/lib/Typography/Header/index.mjs +1 -1
- package/dist/lib/Typography/Header/index.mjs.map +1 -1
- package/dist/lib/Typography/Text/index.mjs +1 -1
- package/dist/lib/Typography/Text/index.mjs.map +1 -1
- package/dist/lib/components/Accordion/index.mjs +1 -1
- package/dist/lib/components/Accordion/index.mjs.map +1 -1
- package/dist/lib/components/AlertDialog/AlertDialogAction.mjs +1 -1
- package/dist/lib/components/AlertDialog/AlertDialogAction.mjs.map +1 -1
- package/dist/lib/components/AlertDialog/AlertDialogCancel.mjs +1 -1
- package/dist/lib/components/AlertDialog/AlertDialogCancel.mjs.map +1 -1
- package/dist/lib/components/AlertDialog/AlertDialogContent.mjs +1 -1
- package/dist/lib/components/AlertDialog/AlertDialogContent.mjs.map +1 -1
- package/dist/lib/components/AlertDialog/AlertDialogDescription.mjs +1 -1
- package/dist/lib/components/AlertDialog/AlertDialogDescription.mjs.map +1 -1
- package/dist/lib/components/AlertDialog/AlertDialogRoot.mjs +1 -1
- package/dist/lib/components/AlertDialog/AlertDialogRoot.mjs.map +1 -1
- package/dist/lib/components/AlertDialog/AlertDialogTitle.mjs +1 -1
- package/dist/lib/components/AlertDialog/AlertDialogTitle.mjs.map +1 -1
- package/dist/lib/components/AlertDialog/AlertDialogTrigger.mjs +1 -1
- package/dist/lib/components/AlertDialog/AlertDialogTrigger.mjs.map +1 -1
- package/dist/lib/components/AlertDialog/index.d.ts +0 -1
- package/dist/lib/components/AspectRatio/index.mjs +1 -1
- package/dist/lib/components/AspectRatio/index.mjs.map +1 -1
- package/dist/lib/components/Avatar/index.mjs +1 -1
- package/dist/lib/components/Avatar/index.mjs.map +1 -1
- package/dist/lib/components/Badge/index.mjs +1 -1
- package/dist/lib/components/Badge/index.mjs.map +1 -1
- package/dist/lib/components/BarChart/index.mjs +1 -1
- package/dist/lib/components/BarChart/index.mjs.map +1 -1
- package/dist/lib/components/BubbleChart/index.mjs +1 -1
- package/dist/lib/components/BubbleChart/index.mjs.map +1 -1
- package/dist/lib/components/Button/index.mjs +1 -1
- package/dist/lib/components/Button/index.mjs.map +1 -1
- package/dist/lib/components/Callout/CalloutIcon.mjs +1 -1
- package/dist/lib/components/Callout/CalloutIcon.mjs.map +1 -1
- package/dist/lib/components/Callout/CalloutRoot.mjs +1 -1
- package/dist/lib/components/Callout/CalloutRoot.mjs.map +1 -1
- package/dist/lib/components/Callout/CalloutText.mjs +1 -1
- package/dist/lib/components/Callout/CalloutText.mjs.map +1 -1
- package/dist/lib/components/Callout/index.d.ts +0 -1
- package/dist/lib/components/Card/index.mjs +1 -1
- package/dist/lib/components/Card/index.mjs.map +1 -1
- package/dist/lib/components/Checkbox/index.mjs +1 -1
- package/dist/lib/components/Checkbox/index.mjs.map +1 -1
- package/dist/lib/components/CheckboxCard/index.mjs +1 -1
- package/dist/lib/components/CheckboxCard/index.mjs.map +1 -1
- package/dist/lib/components/CheckboxGroup/CheckboxGroupItem.mjs +1 -1
- package/dist/lib/components/CheckboxGroup/CheckboxGroupItem.mjs.map +1 -1
- package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.mjs +1 -1
- package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.mjs.map +1 -1
- package/dist/lib/components/CheckboxGroup/index.d.ts +1 -2
- package/dist/lib/components/ContextMenu/ContextMenuCheckboxItem.mjs +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuCheckboxItem.mjs.map +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuContent.mjs +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuContent.mjs.map +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuGroup.mjs +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuGroup.mjs.map +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuItem.mjs +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuItem.mjs.map +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuItemIndicator.mjs +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuItemIndicator.mjs.map +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuLabel.mjs +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuLabel.mjs.map +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuRadioGroup.mjs +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuRadioGroup.mjs.map +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuRadioItem.mjs +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuRadioItem.mjs.map +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuRoot.mjs +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuRoot.mjs.map +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuSeparator.mjs +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuSeparator.mjs.map +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuSubContent.mjs +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuSubContent.mjs.map +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuSubTrigger.mjs +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuSubTrigger.mjs.map +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuTrigger.mjs +1 -1
- package/dist/lib/components/ContextMenu/ContextMenuTrigger.mjs.map +1 -1
- package/dist/lib/components/ContextMenu/index.d.ts +0 -1
- package/dist/lib/components/DataList/DataListItem.mjs +1 -1
- package/dist/lib/components/DataList/DataListItem.mjs.map +1 -1
- package/dist/lib/components/DataList/DataListLabel.mjs +1 -1
- package/dist/lib/components/DataList/DataListLabel.mjs.map +1 -1
- package/dist/lib/components/DataList/DataListRoot.mjs +1 -1
- package/dist/lib/components/DataList/DataListRoot.mjs.map +1 -1
- package/dist/lib/components/DataList/DataListValue.mjs +1 -1
- package/dist/lib/components/DataList/DataListValue.mjs.map +1 -1
- package/dist/lib/components/DataList/index.d.ts +0 -1
- package/dist/lib/components/Dialog/DialogAction.mjs +1 -1
- package/dist/lib/components/Dialog/DialogAction.mjs.map +1 -1
- package/dist/lib/components/Dialog/DialogCancel.mjs +1 -1
- package/dist/lib/components/Dialog/DialogCancel.mjs.map +1 -1
- package/dist/lib/components/Dialog/DialogContent.mjs +1 -1
- package/dist/lib/components/Dialog/DialogContent.mjs.map +1 -1
- package/dist/lib/components/Dialog/DialogDescription.mjs +1 -1
- package/dist/lib/components/Dialog/DialogDescription.mjs.map +1 -1
- package/dist/lib/components/Dialog/DialogRoot.mjs +1 -1
- package/dist/lib/components/Dialog/DialogRoot.mjs.map +1 -1
- package/dist/lib/components/Dialog/DialogSlot.mjs +1 -1
- package/dist/lib/components/Dialog/DialogSlot.mjs.map +1 -1
- package/dist/lib/components/Dialog/DialogTitle.mjs +1 -1
- package/dist/lib/components/Dialog/DialogTitle.mjs.map +1 -1
- package/dist/lib/components/Dialog/DialogTrigger.mjs +1 -1
- package/dist/lib/components/Dialog/DialogTrigger.mjs.map +1 -1
- package/dist/lib/components/Dialog/index.d.ts +1 -2
- package/dist/lib/components/DoughnutChart/index.mjs +1 -1
- package/dist/lib/components/DoughnutChart/index.mjs.map +1 -1
- package/dist/lib/components/DropdownMenu/DropdonMenuRadioGroup.mjs +1 -1
- package/dist/lib/components/DropdownMenu/DropdonMenuRadioGroup.mjs.map +1 -1
- package/dist/lib/components/DropdownMenu/DropdonMenuSubContent.mjs +1 -1
- package/dist/lib/components/DropdownMenu/DropdonMenuSubContent.mjs.map +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuCheckboxItem.mjs +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuCheckboxItem.mjs.map +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuContent.mjs +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuContent.mjs.map +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuItem.mjs +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuItem.mjs.map +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuItemIndicator.mjs +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuItemIndicator.mjs.map +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuLable.mjs +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuLable.mjs.map +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuRadioItem.mjs +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuRadioItem.mjs.map +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuRoot.mjs +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuRoot.mjs.map +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuSeparator.mjs +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuSeparator.mjs.map +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuSub.mjs +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuSub.mjs.map +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuSubTrigger.mjs +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuSubTrigger.mjs.map +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.mjs +1 -1
- package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.mjs.map +1 -1
- package/dist/lib/components/DropdownMenu/index.d.ts +1 -2
- package/dist/lib/components/HoverCard/HoverCardContent.mjs +1 -1
- package/dist/lib/components/HoverCard/HoverCardContent.mjs.map +1 -1
- package/dist/lib/components/HoverCard/HoverCardRoot.mjs +1 -1
- package/dist/lib/components/HoverCard/HoverCardRoot.mjs.map +1 -1
- package/dist/lib/components/HoverCard/HoverCardTrigger.mjs +1 -1
- package/dist/lib/components/HoverCard/HoverCardTrigger.mjs.map +1 -1
- package/dist/lib/components/HoverCard/index.d.ts +1 -2
- package/dist/lib/components/IconButton/index.mjs +1 -1
- package/dist/lib/components/IconButton/index.mjs.map +1 -1
- package/dist/lib/components/Inset/index.mjs +1 -1
- package/dist/lib/components/Inset/index.mjs.map +1 -1
- package/dist/lib/components/Label/index.mjs +1 -1
- package/dist/lib/components/Label/index.mjs.map +1 -1
- package/dist/lib/components/LineChart/index.mjs +1 -1
- package/dist/lib/components/LineChart/index.mjs.map +1 -1
- package/dist/lib/components/Menubar/MenubarCheckboxItem.mjs +1 -1
- package/dist/lib/components/Menubar/MenubarCheckboxItem.mjs.map +1 -1
- package/dist/lib/components/Menubar/MenubarContent.mjs +1 -1
- package/dist/lib/components/Menubar/MenubarContent.mjs.map +1 -1
- package/dist/lib/components/Menubar/MenubarItem.mjs +1 -1
- package/dist/lib/components/Menubar/MenubarItem.mjs.map +1 -1
- package/dist/lib/components/Menubar/MenubarItemIndicator.mjs +1 -1
- package/dist/lib/components/Menubar/MenubarItemIndicator.mjs.map +1 -1
- package/dist/lib/components/Menubar/MenubarMenu.mjs +1 -1
- package/dist/lib/components/Menubar/MenubarMenu.mjs.map +1 -1
- package/dist/lib/components/Menubar/MenubarRadioGroup.mjs +1 -1
- package/dist/lib/components/Menubar/MenubarRadioGroup.mjs.map +1 -1
- package/dist/lib/components/Menubar/MenubarRadioItem.mjs +1 -1
- package/dist/lib/components/Menubar/MenubarRadioItem.mjs.map +1 -1
- package/dist/lib/components/Menubar/MenubarRoot.mjs +1 -1
- package/dist/lib/components/Menubar/MenubarRoot.mjs.map +1 -1
- package/dist/lib/components/Menubar/MenubarSeparator.mjs +1 -1
- package/dist/lib/components/Menubar/MenubarSeparator.mjs.map +1 -1
- package/dist/lib/components/Menubar/MenubarSub.mjs +1 -1
- package/dist/lib/components/Menubar/MenubarSub.mjs.map +1 -1
- package/dist/lib/components/Menubar/MenubarSubContent.mjs +1 -1
- package/dist/lib/components/Menubar/MenubarSubContent.mjs.map +1 -1
- package/dist/lib/components/Menubar/MenubarSubTrigger.mjs +1 -1
- package/dist/lib/components/Menubar/MenubarSubTrigger.mjs.map +1 -1
- package/dist/lib/components/Menubar/MenubarTrigger.mjs +1 -1
- package/dist/lib/components/Menubar/MenubarTrigger.mjs.map +1 -1
- package/dist/lib/components/Menubar/index.d.ts +0 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuContent.mjs +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuContent.mjs.map +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuIndicator.mjs +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuIndicator.mjs.map +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuItem.mjs +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuItem.mjs.map +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuLink.mjs +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuLink.mjs.map +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuList.mjs +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuList.mjs.map +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuRoot.mjs +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuRoot.mjs.map +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuTrigger.mjs +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuTrigger.mjs.map +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuViewport.mjs +1 -1
- package/dist/lib/components/NavigationMenu/NavigationMenuViewport.mjs.map +1 -1
- package/dist/lib/components/NavigationMenu/index.d.ts +0 -1
- package/dist/lib/components/PieChart/index.mjs +1 -1
- package/dist/lib/components/PieChart/index.mjs.map +1 -1
- package/dist/lib/components/Popover/PopoverClose.mjs +1 -1
- package/dist/lib/components/Popover/PopoverClose.mjs.map +1 -1
- package/dist/lib/components/Popover/PopoverContent.mjs +1 -1
- package/dist/lib/components/Popover/PopoverContent.mjs.map +1 -1
- package/dist/lib/components/Popover/PopoverRoot.mjs +1 -1
- package/dist/lib/components/Popover/PopoverRoot.mjs.map +1 -1
- package/dist/lib/components/Popover/PopoverTrigger.mjs +1 -1
- package/dist/lib/components/Popover/PopoverTrigger.mjs.map +1 -1
- package/dist/lib/components/Popover/index.d.ts +1 -2
- package/dist/lib/components/Progress/index.mjs +1 -1
- package/dist/lib/components/Progress/index.mjs.map +1 -1
- package/dist/lib/components/RadarChart/index.mjs +1 -1
- package/dist/lib/components/RadarChart/index.mjs.map +1 -1
- package/dist/lib/components/Radio/index.mjs +1 -1
- package/dist/lib/components/Radio/index.mjs.map +1 -1
- package/dist/lib/components/RadioCards/RadioCardsItem.mjs +1 -1
- package/dist/lib/components/RadioCards/RadioCardsItem.mjs.map +1 -1
- package/dist/lib/components/RadioCards/RadioCardsRoot.mjs +1 -1
- package/dist/lib/components/RadioCards/RadioCardsRoot.mjs.map +1 -1
- package/dist/lib/components/RadioCards/index.d.ts +0 -1
- package/dist/lib/components/RadioGroup/RadioGroupItem.mjs +1 -1
- package/dist/lib/components/RadioGroup/RadioGroupItem.mjs.map +1 -1
- package/dist/lib/components/RadioGroup/RadioGroupRoot.mjs +1 -1
- package/dist/lib/components/RadioGroup/RadioGroupRoot.mjs.map +1 -1
- package/dist/lib/components/RadioGroup/index.d.ts +0 -1
- package/dist/lib/components/ScrollArea/index.mjs +1 -1
- package/dist/lib/components/ScrollArea/index.mjs.map +1 -1
- package/dist/lib/components/SegmentedControl/SegmentedControlItem.mjs +1 -1
- package/dist/lib/components/SegmentedControl/SegmentedControlItem.mjs.map +1 -1
- package/dist/lib/components/SegmentedControl/SegmentedControlRoot.mjs +1 -1
- package/dist/lib/components/SegmentedControl/SegmentedControlRoot.mjs.map +1 -1
- package/dist/lib/components/SegmentedControl/index.d.ts +1 -2
- package/dist/lib/components/Select/index.mjs +1 -1
- package/dist/lib/components/Select/index.mjs.map +1 -1
- package/dist/lib/components/Separator/index.mjs +1 -1
- package/dist/lib/components/Separator/index.mjs.map +1 -1
- package/dist/lib/components/Skeleton/index.mjs +1 -1
- package/dist/lib/components/Skeleton/index.mjs.map +1 -1
- package/dist/lib/components/Slider/index.mjs +1 -1
- package/dist/lib/components/Slider/index.mjs.map +1 -1
- package/dist/lib/components/Spinner/index.mjs +1 -1
- package/dist/lib/components/Spinner/index.mjs.map +1 -1
- package/dist/lib/components/TabNav/index.mjs +1 -1
- package/dist/lib/components/TabNav/index.mjs.map +1 -1
- package/dist/lib/components/Table/index.mjs +1 -1
- package/dist/lib/components/Table/index.mjs.map +1 -1
- package/dist/lib/components/Tabs/index.mjs +1 -1
- package/dist/lib/components/Tabs/index.mjs.map +1 -1
- package/dist/lib/components/TextArea/index.mjs +1 -1
- package/dist/lib/components/TextArea/index.mjs.map +1 -1
- package/dist/lib/components/TextField/index.mjs +1 -1
- package/dist/lib/components/TextField/index.mjs.map +1 -1
- package/dist/lib/components/Toast/ToastActionButton.mjs +1 -1
- package/dist/lib/components/Toast/ToastActionButton.mjs.map +1 -1
- package/dist/lib/components/Toast/ToastDescription.mjs +1 -1
- package/dist/lib/components/Toast/ToastDescription.mjs.map +1 -1
- package/dist/lib/components/Toast/ToastRoot.mjs +1 -1
- package/dist/lib/components/Toast/ToastRoot.mjs.map +1 -1
- package/dist/lib/components/Toast/ToastTitle.mjs +1 -1
- package/dist/lib/components/Toast/ToastTitle.mjs.map +1 -1
- package/dist/lib/components/Toast/index.d.ts +0 -1
- package/dist/lib/components/Toggle/ToggleWithText.mjs +1 -1
- package/dist/lib/components/Toggle/ToggleWithText.mjs.map +1 -1
- package/dist/lib/components/Toggle/index.mjs +1 -1
- package/dist/lib/components/Toggle/index.mjs.map +1 -1
- package/dist/lib/components/ToggleGroup/ToggleGroupItem.mjs +1 -1
- package/dist/lib/components/ToggleGroup/ToggleGroupItem.mjs.map +1 -1
- package/dist/lib/components/ToggleGroup/ToggleGroupRoot.mjs +1 -1
- package/dist/lib/components/ToggleGroup/ToggleGroupRoot.mjs.map +1 -1
- package/dist/lib/components/ToggleGroup/index.d.ts +0 -1
- package/dist/lib/components/ToggleSwitch/index.mjs +1 -1
- package/dist/lib/components/ToggleSwitch/index.mjs.map +1 -1
- package/dist/lib/components/Tooltip/index.mjs +1 -1
- package/dist/lib/components/Tooltip/index.mjs.map +1 -1
- package/dist/lib/constants.d.ts +2 -2
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-context/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-context/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-dialog/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-dialog/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-focus-guards/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-focus-guards/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-portal/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-portal/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-presence/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-presence/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-aspect-ratio/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-aspect-ratio/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-collection/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-collection/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-context/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-context/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-context/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-context-menu/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-context-menu/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/react-context/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/react-context/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/react-focus-guards/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/react-focus-guards/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/react-menu/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/react-menu/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/react-portal/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/react-portal/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/react-presence/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/react-presence/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-direction/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-label/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-label/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-menu/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-menu/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-menubar/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-menubar/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-navigation-menu/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-navigation-menu/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-popper/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-popper/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-context/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-context/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-portal/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-portal/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-presence/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-presence/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-progress/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-progress/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-context/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-context/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-context/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-context/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-scroll-area/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-context/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-context/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-presence/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-presence/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-slot/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-toast/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-toast/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-toggle/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-toggle/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-toggle-group/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-toggle-group/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-toggle-group/node_modules/@radix-ui/react-context/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/react-toggle-group/node_modules/@radix-ui/react-context/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/checkbox-group.mjs +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/checkbox-group.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/checkbox-group.primitive.mjs +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/checkbox-group.primitive.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/dialog.mjs +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/dialog.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/grid.props.mjs +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/grid.props.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/hover-card.mjs +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/hover-card.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/icons.mjs +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/icons.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/popover.mjs +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/popover.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/radio-cards.mjs +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/radio-cards.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/radio-group.mjs +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/radio-group.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/select.mjs +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/select.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/slider.mjs +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/slider.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/switch.mjs +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/switch.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/tab-nav.mjs +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/tab-nav.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/tabs.mjs +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/tabs.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/theme.mjs +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/theme.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/helpers/get-responsive-styles.mjs +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/helpers/get-responsive-styles.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/layout.props.mjs +1 -1
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/layout.props.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-checkbox/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-checkbox/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-context/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-context/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-dialog/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-dialog/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-focus-guards/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-focus-guards/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-hover-card/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-hover-card/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-navigation-menu/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-navigation-menu/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-popover/dist/index.mjs +1 -1
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-popover/dist/index.mjs.map +1 -1
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-portal/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-portal/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-presence/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-presence/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-radio-group/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-radio-group/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-select/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-select/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-slider/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-slider/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-switch/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-switch/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-tabs/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-tabs/dist/index.mjs.map +1 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-tooltip/dist/index.mjs +2 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-tooltip/dist/index.mjs.map +1 -0
- package/dist/node_modules/chart.js/dist/chart.mjs +3 -3
- package/dist/node_modules/chart.js/dist/chart.mjs.map +1 -1
- package/dist/node_modules/chart.js/dist/chunks/helpers.segment.mjs +3 -3
- package/dist/node_modules/chart.js/dist/chunks/helpers.segment.mjs.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -1
- package/dist/_virtual/jsx-runtime.mjs +0 -2
- package/dist/_virtual/jsx-runtime.mjs.map +0 -1
- package/dist/_virtual/jsx-runtime2.mjs +0 -2
- package/dist/_virtual/jsx-runtime2.mjs.map +0 -1
- package/dist/_virtual/react-jsx-runtime.development.mjs +0 -2
- package/dist/_virtual/react-jsx-runtime.development.mjs.map +0 -1
- package/dist/_virtual/react-jsx-runtime.production.min.mjs +0 -2
- package/dist/_virtual/react-jsx-runtime.production.min.mjs.map +0 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +0 -2
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.map +0 -1
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +0 -2
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.map +0 -1
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs +0 -2
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs.map +0 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +0 -2
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs.map +0 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs +0 -2
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.map +0 -1
- package/dist/node_modules/@kurkle/color/dist/color.esm.mjs +0 -8
- package/dist/node_modules/@kurkle/color/dist/color.esm.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.mjs +0 -2
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-hover-card/dist/index.mjs +0 -2
- package/dist/node_modules/@radix-ui/react-hover-card/dist/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-radio-group/dist/index.mjs +0 -2
- package/dist/node_modules/@radix-ui/react-radio-group/dist/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-select/dist/index.mjs +0 -2
- package/dist/node_modules/@radix-ui/react-select/dist/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-slider/dist/index.mjs +0 -2
- package/dist/node_modules/@radix-ui/react-slider/dist/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-switch/dist/index.mjs +0 -2
- package/dist/node_modules/@radix-ui/react-switch/dist/index.mjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.mjs +0 -2
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.mjs.map +0 -1
- package/dist/node_modules/chart.js/auto/auto.mjs +0 -2
- package/dist/node_modules/chart.js/auto/auto.mjs.map +0 -1
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.mjs +0 -11
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.mjs.map +0 -1
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.mjs +0 -11
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.mjs.map +0 -1
- package/dist/node_modules/react/jsx-runtime.mjs +0 -2
- package/dist/node_modules/react/jsx-runtime.mjs.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../node_modules/@radix-ui/react-menubar/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/menubar/src/Menubar.tsx\nimport * as React from \"react\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as MenuPrimitive from \"@radix-ui/react-menu\";\nimport { createMenuScope } from \"@radix-ui/react-menu\";\nimport * as RovingFocusGroup from \"@radix-ui/react-roving-focus\";\nimport { createRovingFocusGroupScope } from \"@radix-ui/react-roving-focus\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { jsx } from \"react/jsx-runtime\";\nvar MENUBAR_NAME = \"Menubar\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(MENUBAR_NAME);\nvar [createMenubarContext, createMenubarScope] = createContextScope(MENUBAR_NAME, [\n createCollectionScope,\n createRovingFocusGroupScope\n]);\nvar useMenuScope = createMenuScope();\nvar useRovingFocusGroupScope = createRovingFocusGroupScope();\nvar [MenubarContextProvider, useMenubarContext] = createMenubarContext(MENUBAR_NAME);\nvar Menubar = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeMenubar,\n value: valueProp,\n onValueChange,\n defaultValue,\n loop = true,\n dir,\n ...menubarProps\n } = props;\n const direction = useDirection(dir);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenubar);\n const [value = \"\", setValue] = useControllableState({\n prop: valueProp,\n onChange: onValueChange,\n defaultProp: defaultValue\n });\n const [currentTabStopId, setCurrentTabStopId] = React.useState(null);\n return /* @__PURE__ */ jsx(\n MenubarContextProvider,\n {\n scope: __scopeMenubar,\n value,\n onMenuOpen: React.useCallback(\n (value2) => {\n setValue(value2);\n setCurrentTabStopId(value2);\n },\n [setValue]\n ),\n onMenuClose: React.useCallback(() => setValue(\"\"), [setValue]),\n onMenuToggle: React.useCallback(\n (value2) => {\n setValue((prevValue) => Boolean(prevValue) ? \"\" : value2);\n setCurrentTabStopId(value2);\n },\n [setValue]\n ),\n dir: direction,\n loop,\n children: /* @__PURE__ */ jsx(Collection.Provider, { scope: __scopeMenubar, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: __scopeMenubar, children: /* @__PURE__ */ jsx(\n RovingFocusGroup.Root,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n orientation: \"horizontal\",\n loop,\n dir: direction,\n currentTabStopId,\n onCurrentTabStopIdChange: setCurrentTabStopId,\n children: /* @__PURE__ */ jsx(Primitive.div, { role: \"menubar\", ...menubarProps, ref: forwardedRef })\n }\n ) }) })\n }\n );\n }\n);\nMenubar.displayName = MENUBAR_NAME;\nvar MENU_NAME = \"MenubarMenu\";\nvar [MenubarMenuProvider, useMenubarMenuContext] = createMenubarContext(MENU_NAME);\nvar MenubarMenu = (props) => {\n const { __scopeMenubar, value: valueProp, ...menuProps } = props;\n const autoValue = useId();\n const value = valueProp || autoValue || \"LEGACY_REACT_AUTO_VALUE\";\n const context = useMenubarContext(MENU_NAME, __scopeMenubar);\n const menuScope = useMenuScope(__scopeMenubar);\n const triggerRef = React.useRef(null);\n const wasKeyboardTriggerOpenRef = React.useRef(false);\n const open = context.value === value;\n React.useEffect(() => {\n if (!open) wasKeyboardTriggerOpenRef.current = false;\n }, [open]);\n return /* @__PURE__ */ jsx(\n MenubarMenuProvider,\n {\n scope: __scopeMenubar,\n value,\n triggerId: useId(),\n triggerRef,\n contentId: useId(),\n wasKeyboardTriggerOpenRef,\n children: /* @__PURE__ */ jsx(\n MenuPrimitive.Root,\n {\n ...menuScope,\n open,\n onOpenChange: (open2) => {\n if (!open2) context.onMenuClose();\n },\n modal: false,\n dir: context.dir,\n ...menuProps\n }\n )\n }\n );\n};\nMenubarMenu.displayName = MENU_NAME;\nvar TRIGGER_NAME = \"MenubarTrigger\";\nvar MenubarTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenubar, disabled = false, ...triggerProps } = props;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenubar);\n const menuScope = useMenuScope(__scopeMenubar);\n const context = useMenubarContext(TRIGGER_NAME, __scopeMenubar);\n const menuContext = useMenubarMenuContext(TRIGGER_NAME, __scopeMenubar);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref, menuContext.triggerRef);\n const [isFocused, setIsFocused] = React.useState(false);\n const open = context.value === menuContext.value;\n return /* @__PURE__ */ jsx(Collection.ItemSlot, { scope: __scopeMenubar, value: menuContext.value, disabled, children: /* @__PURE__ */ jsx(\n RovingFocusGroup.Item,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n focusable: !disabled,\n tabStopId: menuContext.value,\n children: /* @__PURE__ */ jsx(MenuPrimitive.Anchor, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n role: \"menuitem\",\n id: menuContext.triggerId,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": open,\n \"aria-controls\": open ? menuContext.contentId : void 0,\n \"data-highlighted\": isFocused ? \"\" : void 0,\n \"data-state\": open ? \"open\" : \"closed\",\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n ...triggerProps,\n ref: composedRefs,\n onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n context.onMenuOpen(menuContext.value);\n if (!open) event.preventDefault();\n }\n }),\n onPointerEnter: composeEventHandlers(props.onPointerEnter, () => {\n const menubarOpen = Boolean(context.value);\n if (menubarOpen && !open) {\n context.onMenuOpen(menuContext.value);\n ref.current?.focus();\n }\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (disabled) return;\n if ([\"Enter\", \" \"].includes(event.key)) context.onMenuToggle(menuContext.value);\n if (event.key === \"ArrowDown\") context.onMenuOpen(menuContext.value);\n if ([\"Enter\", \" \", \"ArrowDown\"].includes(event.key)) {\n menuContext.wasKeyboardTriggerOpenRef.current = true;\n event.preventDefault();\n }\n }),\n onFocus: composeEventHandlers(props.onFocus, () => setIsFocused(true)),\n onBlur: composeEventHandlers(props.onBlur, () => setIsFocused(false))\n }\n ) })\n }\n ) });\n }\n);\nMenubarTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"MenubarPortal\";\nvar MenubarPortal = (props) => {\n const { __scopeMenubar, ...portalProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return /* @__PURE__ */ jsx(MenuPrimitive.Portal, { ...menuScope, ...portalProps });\n};\nMenubarPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"MenubarContent\";\nvar MenubarContent = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenubar, align = \"start\", ...contentProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n const context = useMenubarContext(CONTENT_NAME, __scopeMenubar);\n const menuContext = useMenubarMenuContext(CONTENT_NAME, __scopeMenubar);\n const getItems = useCollection(__scopeMenubar);\n const hasInteractedOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n MenuPrimitive.Content,\n {\n id: menuContext.contentId,\n \"aria-labelledby\": menuContext.triggerId,\n \"data-radix-menubar-content\": \"\",\n ...menuScope,\n ...contentProps,\n ref: forwardedRef,\n align,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n const menubarOpen = Boolean(context.value);\n if (!menubarOpen && !hasInteractedOutsideRef.current) {\n menuContext.triggerRef.current?.focus();\n }\n hasInteractedOutsideRef.current = false;\n event.preventDefault();\n }),\n onFocusOutside: composeEventHandlers(props.onFocusOutside, (event) => {\n const target = event.target;\n const isMenubarTrigger = getItems().some((item) => item.ref.current?.contains(target));\n if (isMenubarTrigger) event.preventDefault();\n }),\n onInteractOutside: composeEventHandlers(props.onInteractOutside, () => {\n hasInteractedOutsideRef.current = true;\n }),\n onEntryFocus: (event) => {\n if (!menuContext.wasKeyboardTriggerOpenRef.current) event.preventDefault();\n },\n onKeyDown: composeEventHandlers(\n props.onKeyDown,\n (event) => {\n if ([\"ArrowRight\", \"ArrowLeft\"].includes(event.key)) {\n const target = event.target;\n const targetIsSubTrigger = target.hasAttribute(\"data-radix-menubar-subtrigger\");\n const isKeyDownInsideSubMenu = target.closest(\"[data-radix-menubar-content]\") !== event.currentTarget;\n const prevMenuKey = context.dir === \"rtl\" ? \"ArrowRight\" : \"ArrowLeft\";\n const isPrevKey = prevMenuKey === event.key;\n const isNextKey = !isPrevKey;\n if (isNextKey && targetIsSubTrigger) return;\n if (isKeyDownInsideSubMenu && isPrevKey) return;\n const items = getItems().filter((item) => !item.disabled);\n let candidateValues = items.map((item) => item.value);\n if (isPrevKey) candidateValues.reverse();\n const currentIndex = candidateValues.indexOf(menuContext.value);\n candidateValues = context.loop ? wrapArray(candidateValues, currentIndex + 1) : candidateValues.slice(currentIndex + 1);\n const [nextValue] = candidateValues;\n if (nextValue) context.onMenuOpen(nextValue);\n }\n },\n { checkForDefaultPrevented: false }\n ),\n style: {\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-menubar-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-menubar-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-menubar-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-menubar-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-menubar-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n );\n }\n);\nMenubarContent.displayName = CONTENT_NAME;\nvar GROUP_NAME = \"MenubarGroup\";\nvar MenubarGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenubar, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return /* @__PURE__ */ jsx(MenuPrimitive.Group, { ...menuScope, ...groupProps, ref: forwardedRef });\n }\n);\nMenubarGroup.displayName = GROUP_NAME;\nvar LABEL_NAME = \"MenubarLabel\";\nvar MenubarLabel = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenubar, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return /* @__PURE__ */ jsx(MenuPrimitive.Label, { ...menuScope, ...labelProps, ref: forwardedRef });\n }\n);\nMenubarLabel.displayName = LABEL_NAME;\nvar ITEM_NAME = \"MenubarItem\";\nvar MenubarItem = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenubar, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return /* @__PURE__ */ jsx(MenuPrimitive.Item, { ...menuScope, ...itemProps, ref: forwardedRef });\n }\n);\nMenubarItem.displayName = ITEM_NAME;\nvar CHECKBOX_ITEM_NAME = \"MenubarCheckboxItem\";\nvar MenubarCheckboxItem = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenubar, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return /* @__PURE__ */ jsx(MenuPrimitive.CheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef });\n }\n);\nMenubarCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\nvar RADIO_GROUP_NAME = \"MenubarRadioGroup\";\nvar MenubarRadioGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenubar, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return /* @__PURE__ */ jsx(MenuPrimitive.RadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef });\n }\n);\nMenubarRadioGroup.displayName = RADIO_GROUP_NAME;\nvar RADIO_ITEM_NAME = \"MenubarRadioItem\";\nvar MenubarRadioItem = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenubar, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return /* @__PURE__ */ jsx(MenuPrimitive.RadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef });\n }\n);\nMenubarRadioItem.displayName = RADIO_ITEM_NAME;\nvar INDICATOR_NAME = \"MenubarItemIndicator\";\nvar MenubarItemIndicator = React.forwardRef((props, forwardedRef) => {\n const { __scopeMenubar, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return /* @__PURE__ */ jsx(MenuPrimitive.ItemIndicator, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef });\n});\nMenubarItemIndicator.displayName = INDICATOR_NAME;\nvar SEPARATOR_NAME = \"MenubarSeparator\";\nvar MenubarSeparator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenubar, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return /* @__PURE__ */ jsx(MenuPrimitive.Separator, { ...menuScope, ...separatorProps, ref: forwardedRef });\n }\n);\nMenubarSeparator.displayName = SEPARATOR_NAME;\nvar ARROW_NAME = \"MenubarArrow\";\nvar MenubarArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenubar, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return /* @__PURE__ */ jsx(MenuPrimitive.Arrow, { ...menuScope, ...arrowProps, ref: forwardedRef });\n }\n);\nMenubarArrow.displayName = ARROW_NAME;\nvar SUB_NAME = \"MenubarSub\";\nvar MenubarSub = (props) => {\n const { __scopeMenubar, children, open: openProp, onOpenChange, defaultOpen } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /* @__PURE__ */ jsx(MenuPrimitive.Sub, { ...menuScope, open, onOpenChange: setOpen, children });\n};\nMenubarSub.displayName = SUB_NAME;\nvar SUB_TRIGGER_NAME = \"MenubarSubTrigger\";\nvar MenubarSubTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenubar, ...subTriggerProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return /* @__PURE__ */ jsx(\n MenuPrimitive.SubTrigger,\n {\n \"data-radix-menubar-subtrigger\": \"\",\n ...menuScope,\n ...subTriggerProps,\n ref: forwardedRef\n }\n );\n }\n);\nMenubarSubTrigger.displayName = SUB_TRIGGER_NAME;\nvar SUB_CONTENT_NAME = \"MenubarSubContent\";\nvar MenubarSubContent = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenubar, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return /* @__PURE__ */ jsx(\n MenuPrimitive.SubContent,\n {\n ...menuScope,\n \"data-radix-menubar-content\": \"\",\n ...subContentProps,\n ref: forwardedRef,\n style: {\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-menubar-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-menubar-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-menubar-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-menubar-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-menubar-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n );\n }\n);\nMenubarSubContent.displayName = SUB_CONTENT_NAME;\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root3 = Menubar;\nvar Menu = MenubarMenu;\nvar Trigger = MenubarTrigger;\nvar Portal2 = MenubarPortal;\nvar Content2 = MenubarContent;\nvar Group2 = MenubarGroup;\nvar Label2 = MenubarLabel;\nvar Item3 = MenubarItem;\nvar CheckboxItem2 = MenubarCheckboxItem;\nvar RadioGroup2 = MenubarRadioGroup;\nvar RadioItem2 = MenubarRadioItem;\nvar ItemIndicator2 = MenubarItemIndicator;\nvar Separator2 = MenubarSeparator;\nvar Arrow2 = MenubarArrow;\nvar Sub2 = MenubarSub;\nvar SubTrigger2 = MenubarSubTrigger;\nvar SubContent2 = MenubarSubContent;\nexport {\n Arrow2 as Arrow,\n CheckboxItem2 as CheckboxItem,\n Content2 as Content,\n Group2 as Group,\n Item3 as Item,\n ItemIndicator2 as ItemIndicator,\n Label2 as Label,\n Menu,\n Menubar,\n MenubarArrow,\n MenubarCheckboxItem,\n MenubarContent,\n MenubarGroup,\n MenubarItem,\n MenubarItemIndicator,\n MenubarLabel,\n MenubarMenu,\n MenubarPortal,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarSeparator,\n MenubarSub,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarTrigger,\n Portal2 as Portal,\n RadioGroup2 as RadioGroup,\n RadioItem2 as RadioItem,\n Root3 as Root,\n Separator2 as Separator,\n Sub2 as Sub,\n SubContent2 as SubContent,\n SubTrigger2 as SubTrigger,\n Trigger,\n createMenubarScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["MENUBAR_NAME","Collection","useCollection","createCollectionScope","createCollection","createMenubarContext","createMenubarScope","createContextScope","createRovingFocusGroupScope","useMenuScope","createMenuScope","useRovingFocusGroupScope","MenubarContextProvider","useMenubarContext","Menubar","React","forwardRef","props","forwardedRef","__scopeMenubar","value","valueProp","onValueChange","defaultValue","loop","dir","menubarProps","direction","useDirection","rovingFocusGroupScope","setValue","useControllableState","prop","onChange","defaultProp","currentTabStopId","setCurrentTabStopId","useState","jsx","scope","onMenuOpen","useCallback","value2","onMenuClose","onMenuToggle","prevValue","Boolean","children","Provider","Slot","RovingFocusGroup.Root","asChild","orientation","onCurrentTabStopIdChange","Primitive","div","role","ref","displayName","MENU_NAME","MenubarMenuProvider","useMenubarMenuContext","MenubarMenu","menuProps","autoValue","useId","context","menuScope","triggerRef","useRef","wasKeyboardTriggerOpenRef","open","useEffect","current","triggerId","contentId","MenuPrimitive.Root","onOpenChange","open2","modal","TRIGGER_NAME","MenubarTrigger","disabled","triggerProps","menuContext","composedRefs","useComposedRefs","isFocused","setIsFocused","ItemSlot","RovingFocusGroup.Item","focusable","tabStopId","MenuPrimitive.Anchor","button","type","id","onPointerDown","composeEventHandlers","event","ctrlKey","preventDefault","onPointerEnter","focus","onKeyDown","includes","key","onFocus","onBlur","MenubarPortal","portalProps","MenuPrimitive.Portal","CONTENT_NAME","MenubarContent","align","contentProps","getItems","hasInteractedOutsideRef","MenuPrimitive.Content","onCloseAutoFocus","onFocusOutside","target","some","item","contains","onInteractOutside","onEntryFocus","targetIsSubTrigger","hasAttribute","isKeyDownInsideSubMenu","closest","currentTarget","isPrevKey","candidateValues","filter","map","reverse","currentIndex","indexOf","startIndex","array","_","index","length","slice","nextValue","checkForDefaultPrevented","style","MenubarGroup","groupProps","MenuPrimitive.Group","MenubarLabel","labelProps","MenuPrimitive.Label","MenubarItem","itemProps","MenuPrimitive.Item","MenubarCheckboxItem","checkboxItemProps","MenuPrimitive.CheckboxItem","MenubarRadioGroup","radioGroupProps","MenuPrimitive.RadioGroup","MenubarRadioItem","radioItemProps","MenuPrimitive.RadioItem","MenubarItemIndicator","itemIndicatorProps","MenuPrimitive.ItemIndicator","MenubarSeparator","separatorProps","MenuPrimitive.Separator","MenubarArrow","arrowProps","MenuPrimitive.Arrow","MenubarSub","openProp","defaultOpen","setOpen","MenuPrimitive.Sub","MenubarSubTrigger","subTriggerProps","MenuPrimitive.SubTrigger","MenubarSubContent","subContentProps","MenuPrimitive.SubContent","Root3","Menu","Trigger","Portal2","Content2","Item3","CheckboxItem2","RadioGroup2","RadioItem2","ItemIndicator2","Separator2","Sub2","SubTrigger2","SubContent2"],"mappings":"wgCAiBA,IAAIA,EAAe,WACdC,EAAYC,EAAeC,GAAyBC,EAAiBJ,IACrEK,EAAsBC,GAAsBC,EAAmBP,EAAc,CAChFG,EACAK,IAEEC,EAAeC,IACfC,EAA2BH,KAC1BI,EAAwBC,GAAqBR,EAAqBL,GACnEc,EAAUC,EAAMC,YAClB,CAACC,EAAOC,KACN,MAAMC,eACJA,EACAC,MAAOC,EAASC,cAChBA,EAAaC,aACbA,EAAYC,KACZA,GAAO,EAAIC,IACXA,KACGC,GACDT,EACEU,EAAYC,EAAaH,GACzBI,EAAwBlB,EAAyBQ,IAChDC,EAAQ,GAAIU,GAAYC,EAAqB,CAClDC,KAAMX,EACNY,SAAUX,EACVY,YAAaX,KAERY,EAAkBC,GAAuBrB,EAAMsB,SAAS,MAC/D,OAAuBC,EAAGA,IACxB1B,EACA,CACE2B,MAAOpB,EACPC,QACAoB,WAAYzB,EAAM0B,aACfC,IACCZ,EAASY,GACTN,EAAoBM,EAAO,GAE7B,CAACZ,IAEHa,YAAa5B,EAAM0B,aAAY,IAAMX,EAAS,KAA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J,EACA,IACKtH,EACH,6BAA8B,MAC3BqH,EACH/H,IAAKvC,EACLiI,MAAO,IACFlI,EAAMkI,MAGP,2CAA4C,uCAC5C,0CAA2C,sCAC3C,2CAA4C,uCAC5C,gCAAiC,mCACjC,iCAAkC,sCAIzC,IAGLoC,GAAkB7H,YA3BK,oBA+BpB,IAACgI,GAAQ5K,EACR6K,GAAO7H,EACP8H,GAAU3G,EACV4G,GAAUhF,EACViF,GAAW7E,EAGX8E,GAAQrC,EACRsC,GAAgBnC,EAChBoC,GAAcjC,GACdkC,GAAa/B,GACbgC,GAAiB7B,GACjB8B,GAAa3B,GAEb4B,GAAOtB,GACPuB,GAAclB,GACdmB,GAAchB"}
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../node_modules/@radix-ui/react-menubar/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/menubar/src/Menubar.tsx\nimport * as React from \"react\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as MenuPrimitive from \"@radix-ui/react-menu\";\nimport { createMenuScope } from \"@radix-ui/react-menu\";\nimport * as RovingFocusGroup from \"@radix-ui/react-roving-focus\";\nimport { createRovingFocusGroupScope } from \"@radix-ui/react-roving-focus\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { jsx } from \"react/jsx-runtime\";\nvar MENUBAR_NAME = \"Menubar\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(MENUBAR_NAME);\nvar [createMenubarContext, createMenubarScope] = createContextScope(MENUBAR_NAME, [\n createCollectionScope,\n createRovingFocusGroupScope\n]);\nvar useMenuScope = createMenuScope();\nvar useRovingFocusGroupScope = createRovingFocusGroupScope();\nvar [MenubarContextProvider, useMenubarContext] = createMenubarContext(MENUBAR_NAME);\nvar Menubar = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeMenubar,\n value: valueProp,\n onValueChange,\n defaultValue,\n loop = true,\n dir,\n ...menubarProps\n } = props;\n const direction = useDirection(dir);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenubar);\n const [value = \"\", setValue] = useControllableState({\n prop: valueProp,\n onChange: onValueChange,\n defaultProp: defaultValue\n });\n const [currentTabStopId, setCurrentTabStopId] = React.useState(null);\n return /* @__PURE__ */ jsx(\n MenubarContextProvider,\n {\n scope: __scopeMenubar,\n value,\n onMenuOpen: React.useCallback(\n (value2) => {\n setValue(value2);\n setCurrentTabStopId(value2);\n },\n [setValue]\n ),\n onMenuClose: React.useCallback(() => setValue(\"\"), [setValue]),\n onMenuToggle: React.useCallback(\n (value2) => {\n setValue((prevValue) => Boolean(prevValue) ? \"\" : value2);\n setCurrentTabStopId(value2);\n },\n [setValue]\n ),\n dir: direction,\n loop,\n children: /* @__PURE__ */ jsx(Collection.Provider, { scope: __scopeMenubar, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: __scopeMenubar, children: /* @__PURE__ */ jsx(\n RovingFocusGroup.Root,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n orientation: \"horizontal\",\n loop,\n dir: direction,\n currentTabStopId,\n onCurrentTabStopIdChange: setCurrentTabStopId,\n children: /* @__PURE__ */ jsx(Primitive.div, { role: \"menubar\", ...menubarProps, ref: forwardedRef })\n }\n ) }) })\n }\n );\n }\n);\nMenubar.displayName = MENUBAR_NAME;\nvar MENU_NAME = \"MenubarMenu\";\nvar [MenubarMenuProvider, useMenubarMenuContext] = createMenubarContext(MENU_NAME);\nvar MenubarMenu = (props) => {\n const { __scopeMenubar, value: valueProp, ...menuProps } = props;\n const autoValue = useId();\n const value = valueProp || autoValue || \"LEGACY_REACT_AUTO_VALUE\";\n const context = useMenubarContext(MENU_NAME, __scopeMenubar);\n const menuScope = useMenuScope(__scopeMenubar);\n const triggerRef = React.useRef(null);\n const wasKeyboardTriggerOpenRef = React.useRef(false);\n const open = context.value === value;\n React.useEffect(() => {\n if (!open) wasKeyboardTriggerOpenRef.current = false;\n }, [open]);\n return /* @__PURE__ */ jsx(\n MenubarMenuProvider,\n {\n scope: __scopeMenubar,\n value,\n triggerId: useId(),\n triggerRef,\n contentId: useId(),\n wasKeyboardTriggerOpenRef,\n children: /* @__PURE__ */ jsx(\n MenuPrimitive.Root,\n {\n ...menuScope,\n open,\n onOpenChange: (open2) => {\n if (!open2) context.onMenuClose();\n },\n modal: false,\n dir: context.dir,\n ...menuProps\n }\n )\n }\n );\n};\nMenubarMenu.displayName = MENU_NAME;\nvar TRIGGER_NAME = \"MenubarTrigger\";\nvar MenubarTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenubar, disabled = false, ...triggerProps } = props;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenubar);\n const menuScope = useMenuScope(__scopeMenubar);\n const context = useMenubarContext(TRIGGER_NAME, __scopeMenubar);\n const menuContext = useMenubarMenuContext(TRIGGER_NAME, __scopeMenubar);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref, menuContext.triggerRef);\n const [isFocused, setIsFocused] = React.useState(false);\n const open = context.value === menuContext.value;\n return /* @__PURE__ */ jsx(Collection.ItemSlot, { scope: __scopeMenubar, value: menuContext.value, disabled, children: /* @__PURE__ */ jsx(\n RovingFocusGroup.Item,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n focusable: !disabled,\n tabStopId: menuContext.value,\n children: /* @__PURE__ */ jsx(MenuPrimitive.Anchor, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n role: \"menuitem\",\n id: menuContext.triggerId,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": open,\n \"aria-controls\": open ? menuContext.contentId : void 0,\n \"data-highlighted\": isFocused ? \"\" : void 0,\n \"data-state\": open ? \"open\" : \"closed\",\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n ...triggerProps,\n ref: composedRefs,\n onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n context.onMenuOpen(menuContext.value);\n if (!open) event.preventDefault();\n }\n }),\n onPointerEnter: composeEventHandlers(props.onPointerEnter, () => {\n const menubarOpen = Boolean(context.value);\n if (menubarOpen && !open) {\n context.onMenuOpen(menuContext.value);\n ref.current?.focus();\n }\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (disabled) return;\n if ([\"Enter\", \" \"].includes(event.key)) context.onMenuToggle(menuContext.value);\n if (event.key === \"ArrowDown\") context.onMenuOpen(menuContext.value);\n if ([\"Enter\", \" \", \"ArrowDown\"].includes(event.key)) {\n menuContext.wasKeyboardTriggerOpenRef.current = true;\n event.preventDefault();\n }\n }),\n onFocus: composeEventHandlers(props.onFocus, () => setIsFocused(true)),\n onBlur: composeEventHandlers(props.onBlur, () => setIsFocused(false))\n }\n ) })\n }\n ) });\n }\n);\nMenubarTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"MenubarPortal\";\nvar MenubarPortal = (props) => {\n const { __scopeMenubar, ...portalProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return /* @__PURE__ */ jsx(MenuPrimitive.Portal, { ...menuScope, ...portalProps });\n};\nMenubarPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"MenubarContent\";\nvar MenubarContent = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenubar, align = \"start\", ...contentProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n const context = useMenubarContext(CONTENT_NAME, __scopeMenubar);\n const menuContext = useMenubarMenuContext(CONTENT_NAME, __scopeMenubar);\n const getItems = useCollection(__scopeMenubar);\n const hasInteractedOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n MenuPrimitive.Content,\n {\n id: menuContext.contentId,\n \"aria-labelledby\": menuContext.triggerId,\n \"data-radix-menubar-content\": \"\",\n ...menuScope,\n ...contentProps,\n ref: forwardedRef,\n align,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n const menubarOpen = Boolean(context.value);\n if (!menubarOpen && !hasInteractedOutsideRef.current) {\n menuContext.triggerRef.current?.focus();\n }\n hasInteractedOutsideRef.current = false;\n event.preventDefault();\n }),\n onFocusOutside: composeEventHandlers(props.onFocusOutside, (event) => {\n const target = event.target;\n const isMenubarTrigger = getItems().some((item) => item.ref.current?.contains(target));\n if (isMenubarTrigger) event.preventDefault();\n }),\n onInteractOutside: composeEventHandlers(props.onInteractOutside, () => {\n hasInteractedOutsideRef.current = true;\n }),\n onEntryFocus: (event) => {\n if (!menuContext.wasKeyboardTriggerOpenRef.current) event.preventDefault();\n },\n onKeyDown: composeEventHandlers(\n props.onKeyDown,\n (event) => {\n if ([\"ArrowRight\", \"ArrowLeft\"].includes(event.key)) {\n const target = event.target;\n const targetIsSubTrigger = target.hasAttribute(\"data-radix-menubar-subtrigger\");\n const isKeyDownInsideSubMenu = target.closest(\"[data-radix-menubar-content]\") !== event.currentTarget;\n const prevMenuKey = context.dir === \"rtl\" ? \"ArrowRight\" : \"ArrowLeft\";\n const isPrevKey = prevMenuKey === event.key;\n const isNextKey = !isPrevKey;\n if (isNextKey && targetIsSubTrigger) return;\n if (isKeyDownInsideSubMenu && isPrevKey) return;\n const items = getItems().filter((item) => !item.disabled);\n let candidateValues = items.map((item) => item.value);\n if (isPrevKey) candidateValues.reverse();\n const currentIndex = candidateValues.indexOf(menuContext.value);\n candidateValues = context.loop ? wrapArray(candidateValues, currentIndex + 1) : candidateValues.slice(currentIndex + 1);\n const [nextValue] = candidateValues;\n if (nextValue) context.onMenuOpen(nextValue);\n }\n },\n { checkForDefaultPrevented: false }\n ),\n style: {\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-menubar-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-menubar-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-menubar-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-menubar-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-menubar-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n );\n }\n);\nMenubarContent.displayName = CONTENT_NAME;\nvar GROUP_NAME = \"MenubarGroup\";\nvar MenubarGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenubar, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return /* @__PURE__ */ jsx(MenuPrimitive.Group, { ...menuScope, ...groupProps, ref: forwardedRef });\n }\n);\nMenubarGroup.displayName = GROUP_NAME;\nvar LABEL_NAME = \"MenubarLabel\";\nvar MenubarLabel = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenubar, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return /* @__PURE__ */ jsx(MenuPrimitive.Label, { ...menuScope, ...labelProps, ref: forwardedRef });\n }\n);\nMenubarLabel.displayName = LABEL_NAME;\nvar ITEM_NAME = \"MenubarItem\";\nvar MenubarItem = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenubar, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return /* @__PURE__ */ jsx(MenuPrimitive.Item, { ...menuScope, ...itemProps, ref: forwardedRef });\n }\n);\nMenubarItem.displayName = ITEM_NAME;\nvar CHECKBOX_ITEM_NAME = \"MenubarCheckboxItem\";\nvar MenubarCheckboxItem = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenubar, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return /* @__PURE__ */ jsx(MenuPrimitive.CheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef });\n }\n);\nMenubarCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\nvar RADIO_GROUP_NAME = \"MenubarRadioGroup\";\nvar MenubarRadioGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenubar, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return /* @__PURE__ */ jsx(MenuPrimitive.RadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef });\n }\n);\nMenubarRadioGroup.displayName = RADIO_GROUP_NAME;\nvar RADIO_ITEM_NAME = \"MenubarRadioItem\";\nvar MenubarRadioItem = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenubar, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return /* @__PURE__ */ jsx(MenuPrimitive.RadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef });\n }\n);\nMenubarRadioItem.displayName = RADIO_ITEM_NAME;\nvar INDICATOR_NAME = \"MenubarItemIndicator\";\nvar MenubarItemIndicator = React.forwardRef((props, forwardedRef) => {\n const { __scopeMenubar, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return /* @__PURE__ */ jsx(MenuPrimitive.ItemIndicator, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef });\n});\nMenubarItemIndicator.displayName = INDICATOR_NAME;\nvar SEPARATOR_NAME = \"MenubarSeparator\";\nvar MenubarSeparator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenubar, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return /* @__PURE__ */ jsx(MenuPrimitive.Separator, { ...menuScope, ...separatorProps, ref: forwardedRef });\n }\n);\nMenubarSeparator.displayName = SEPARATOR_NAME;\nvar ARROW_NAME = \"MenubarArrow\";\nvar MenubarArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenubar, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return /* @__PURE__ */ jsx(MenuPrimitive.Arrow, { ...menuScope, ...arrowProps, ref: forwardedRef });\n }\n);\nMenubarArrow.displayName = ARROW_NAME;\nvar SUB_NAME = \"MenubarSub\";\nvar MenubarSub = (props) => {\n const { __scopeMenubar, children, open: openProp, onOpenChange, defaultOpen } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /* @__PURE__ */ jsx(MenuPrimitive.Sub, { ...menuScope, open, onOpenChange: setOpen, children });\n};\nMenubarSub.displayName = SUB_NAME;\nvar SUB_TRIGGER_NAME = \"MenubarSubTrigger\";\nvar MenubarSubTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenubar, ...subTriggerProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return /* @__PURE__ */ jsx(\n MenuPrimitive.SubTrigger,\n {\n \"data-radix-menubar-subtrigger\": \"\",\n ...menuScope,\n ...subTriggerProps,\n ref: forwardedRef\n }\n );\n }\n);\nMenubarSubTrigger.displayName = SUB_TRIGGER_NAME;\nvar SUB_CONTENT_NAME = \"MenubarSubContent\";\nvar MenubarSubContent = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenubar, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeMenubar);\n return /* @__PURE__ */ jsx(\n MenuPrimitive.SubContent,\n {\n ...menuScope,\n \"data-radix-menubar-content\": \"\",\n ...subContentProps,\n ref: forwardedRef,\n style: {\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-menubar-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-menubar-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-menubar-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-menubar-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-menubar-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n );\n }\n);\nMenubarSubContent.displayName = SUB_CONTENT_NAME;\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root3 = Menubar;\nvar Menu = MenubarMenu;\nvar Trigger = MenubarTrigger;\nvar Portal2 = MenubarPortal;\nvar Content2 = MenubarContent;\nvar Group2 = MenubarGroup;\nvar Label2 = MenubarLabel;\nvar Item3 = MenubarItem;\nvar CheckboxItem2 = MenubarCheckboxItem;\nvar RadioGroup2 = MenubarRadioGroup;\nvar RadioItem2 = MenubarRadioItem;\nvar ItemIndicator2 = MenubarItemIndicator;\nvar Separator2 = MenubarSeparator;\nvar Arrow2 = MenubarArrow;\nvar Sub2 = MenubarSub;\nvar SubTrigger2 = MenubarSubTrigger;\nvar SubContent2 = MenubarSubContent;\nexport {\n Arrow2 as Arrow,\n CheckboxItem2 as CheckboxItem,\n Content2 as Content,\n Group2 as Group,\n Item3 as Item,\n ItemIndicator2 as ItemIndicator,\n Label2 as Label,\n Menu,\n Menubar,\n MenubarArrow,\n MenubarCheckboxItem,\n MenubarContent,\n MenubarGroup,\n MenubarItem,\n MenubarItemIndicator,\n MenubarLabel,\n MenubarMenu,\n MenubarPortal,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarSeparator,\n MenubarSub,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarTrigger,\n Portal2 as Portal,\n RadioGroup2 as RadioGroup,\n RadioItem2 as RadioItem,\n Root3 as Root,\n Separator2 as Separator,\n Sub2 as Sub,\n SubContent2 as SubContent,\n SubTrigger2 as SubTrigger,\n Trigger,\n createMenubarScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["MENUBAR_NAME","Collection","useCollection","createCollectionScope","createCollection","createMenubarContext","createMenubarScope","createContextScope","createRovingFocusGroupScope","useMenuScope","createMenuScope","useRovingFocusGroupScope","MenubarContextProvider","useMenubarContext","Menubar","React","forwardRef","props","forwardedRef","__scopeMenubar","value","valueProp","onValueChange","defaultValue","loop","dir","menubarProps","direction","useDirection","rovingFocusGroupScope","setValue","useControllableState","prop","onChange","defaultProp","currentTabStopId","setCurrentTabStopId","useState","jsx","scope","onMenuOpen","useCallback","value2","onMenuClose","onMenuToggle","prevValue","Boolean","children","Provider","Slot","RovingFocusGroup.Root","asChild","orientation","onCurrentTabStopIdChange","Primitive","div","role","ref","displayName","MENU_NAME","MenubarMenuProvider","useMenubarMenuContext","MenubarMenu","menuProps","autoValue","useId","context","menuScope","triggerRef","useRef","wasKeyboardTriggerOpenRef","open","useEffect","current","triggerId","contentId","MenuPrimitive.Root","onOpenChange","open2","modal","TRIGGER_NAME","MenubarTrigger","disabled","triggerProps","menuContext","composedRefs","useComposedRefs","isFocused","setIsFocused","ItemSlot","RovingFocusGroup.Item","focusable","tabStopId","MenuPrimitive.Anchor","button","type","id","onPointerDown","composeEventHandlers","event","ctrlKey","preventDefault","onPointerEnter","focus","onKeyDown","includes","key","onFocus","onBlur","MenubarPortal","portalProps","MenuPrimitive.Portal","CONTENT_NAME","MenubarContent","align","contentProps","getItems","hasInteractedOutsideRef","MenuPrimitive.Content","onCloseAutoFocus","onFocusOutside","target","some","item","contains","onInteractOutside","onEntryFocus","targetIsSubTrigger","hasAttribute","isKeyDownInsideSubMenu","closest","currentTarget","isPrevKey","candidateValues","filter","map","reverse","currentIndex","indexOf","startIndex","array","_","index","length","slice","nextValue","checkForDefaultPrevented","style","MenubarGroup","groupProps","MenuPrimitive.Group","MenubarLabel","labelProps","MenuPrimitive.Label","MenubarItem","itemProps","MenuPrimitive.Item","MenubarCheckboxItem","checkboxItemProps","MenuPrimitive.CheckboxItem","MenubarRadioGroup","radioGroupProps","MenuPrimitive.RadioGroup","MenubarRadioItem","radioItemProps","MenuPrimitive.RadioItem","MenubarItemIndicator","itemIndicatorProps","MenuPrimitive.ItemIndicator","MenubarSeparator","separatorProps","MenuPrimitive.Separator","MenubarArrow","arrowProps","MenuPrimitive.Arrow","MenubarSub","openProp","defaultOpen","setOpen","MenuPrimitive.Sub","MenubarSubTrigger","subTriggerProps","MenuPrimitive.SubTrigger","MenubarSubContent","subContentProps","MenuPrimitive.SubContent","Root3","Menu","Trigger","Portal2","Content2","Item3","CheckboxItem2","Rad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AAY1D,EAAaU,IACxBoD,GAAO,EAAO2G,GAAWnJ,EAAqB,CACnDC,KAAMgJ,EACN9I,YAAa+I,EACbhJ,SAAU4C,IAEZ,OAAuBvC,EAAI6I,EAAmB,IAAKhH,EAAWI,OAAMM,aAAcqG,EAASnI,YAAW,EAExGgI,GAAWrH,YAXI,aAYf,IACI0H,GAAoBrK,EAAMC,YAC5B,CAACC,EAAOC,KACN,MAAMC,eAAEA,KAAmBkK,GAAoBpK,EACzCkD,EAAY1D,EAAaU,GAC/B,OAAuBmB,EACrBgJ,EACA,CACE,gCAAiC,MAC9BnH,KACAkH,EACH5H,IAAKvC,GAER,IAGLkK,GAAkB1H,YAhBK,oBAiBvB,IACI6H,GAAoBxK,EAAMC,YAC5B,CAACC,EAAOC,KACN,MAAMC,eAAEA,KAAmBqK,GAAoBvK,EACzCkD,EAAY1D,EAAaU,GAC/B,OAAuBmB,EACrBmJ,EACA,IACKtH,EACH,6BAA8B,MAC3BqH,EACH/H,IAAKvC,EACLiI,MAAO,IACFlI,EAAMkI,MAGP,2CAA4C,uCAC5C,0CAA2C,sCAC3C,2CAA4C,uCAC5C,gCAAiC,mCACjC,iCAAkC,sCAIzC,IAGLoC,GAAkB7H,YA3BK,oBA+BpB,IAACgI,GAAQ5K,EACR6K,GAAO7H,EACP8H,GAAU3G,EACV4G,GAAUhF,EACViF,GAAW7E,EAGX8E,GAAQrC,EACRsC,GAAgBnC,EAChBoC,GAAcjC,GACdkC,GAAa/B,GACbgC,GAAiB7B,GACjB8B,GAAa3B,GAEb4B,GAAOtB,GACPuB,GAAclB,GACdmB,GAAchB"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import*as e from"react";import t from"react-dom";import{createContextScope as n}from"../../react-context/dist/index.mjs";import{composeEventHandlers as o}from"../../primitive/dist/index.mjs";import{Primitive as r,dispatchDiscreteCustomEvent as i}from"../../react-primitive/dist/index.mjs";import{useControllableState as a}from"../../react-use-controllable-state/dist/index.mjs";import{useComposedRefs as s,composeRefs as u}from"../../react-compose-refs/dist/index.mjs";import{useDirection as c}from"../../react-direction/dist/index.mjs";import{Presence as l}from"../../react-presence/dist/index.mjs";import{useId as d}from"../../react-id/dist/index.mjs";import{createCollection as f}from"../../react-collection/dist/index.mjs";import{DismissableLayer as v}from"../../react-dismissable-layer/dist/index.mjs";import{usePrevious as m}from"../../react-use-previous/dist/index.mjs";import{useLayoutEffect as p}from"../../react-use-layout-effect/dist/index.mjs";import{useCallbackRef as w}from"../../react-use-callback-ref/dist/index.mjs";import{Root as g}from"../../react-visually-hidden/dist/index.mjs";import{j as x}from"../../../../_virtual/jsx-runtime.mjs";var h="NavigationMenu",[R,C,E]=f(h),[M,j,y]=f(h),[b,N]=n(h,[E,y]),[T,_]=b(h),[P,I]=b(h),L=e.forwardRef(((t,n)=>{const{__scopeNavigationMenu:o,value:i,onValueChange:u,defaultValue:l,delayDuration:d=200,skipDelayDuration:f=300,orientation:v="horizontal",dir:m,...p}=t,[w,g]=e.useState(null),h=s(n,(e=>g(e))),R=c(m),C=e.useRef(0),E=e.useRef(0),M=e.useRef(0),[j,y]=e.useState(!0),[b="",N]=a({prop:i,onChange:e=>{const t=f>0;""!==e?(window.clearTimeout(M.current),t&&y(!1)):(window.clearTimeout(M.current),M.current=window.setTimeout((()=>y(!0)),f)),u?.(e)},defaultProp:l}),T=e.useCallback((()=>{window.clearTimeout(E.current),E.current=window.setTimeout((()=>N("")),150)}),[N]),_=e.useCallback((e=>{window.clearTimeout(E.current),N(e)}),[N]),P=e.useCallback((e=>{b===e?window.clearTimeout(E.current):C.current=window.setTimeout((()=>{window.clearTimeout(E.current),N(e)}),d)}),[b,N,d]);return e.useEffect((()=>()=>{window.clearTimeout(C.current),window.clearTimeout(E.current),window.clearTimeout(M.current)}),[]),x.jsx(F,{scope:o,isRootMenu:!0,value:b,dir:R,orientation:v,rootNavigationMenu:w,onTriggerEnter:e=>{window.clearTimeout(C.current),j?P(e):_(e)},onTriggerLeave:()=>{window.clearTimeout(C.current),T()},onContentEnter:()=>window.clearTimeout(E.current),onContentLeave:T,onItemSelect:e=>{N((t=>t===e?"":e))},onItemDismiss:()=>N(""),children:x.jsx(r.nav,{"aria-label":"Main","data-orientation":v,dir:R,...p,ref:h})})}));L.displayName=h;var D="NavigationMenuSub",k=e.forwardRef(((e,t)=>{const{__scopeNavigationMenu:n,value:o,onValueChange:i,defaultValue:s,orientation:u="horizontal",...c}=e,l=_(D,n),[d="",f]=a({prop:o,onChange:i,defaultProp:s});return x.jsx(F,{scope:n,isRootMenu:!1,value:d,dir:l.dir,orientation:u,rootNavigationMenu:l.rootNavigationMenu,onTriggerEnter:e=>f(e),onItemSelect:e=>f(e),onItemDismiss:()=>f(""),children:x.jsx(r.div,{"data-orientation":u,...c,ref:t})})}));k.displayName=D;var F=t=>{const{scope:n,isRootMenu:o,rootNavigationMenu:r,dir:i,orientation:a,children:s,value:u,onItemSelect:c,onItemDismiss:l,onTriggerEnter:f,onTriggerLeave:v,onContentEnter:p,onContentLeave:g}=t,[h,C]=e.useState(null),[E,M]=e.useState(new Map),[j,y]=e.useState(null);return x.jsx(T,{scope:n,isRootMenu:o,rootNavigationMenu:r,value:u,previousValue:m(u),baseId:d(),dir:i,orientation:a,viewport:h,onViewportChange:C,indicatorTrack:j,onIndicatorTrackChange:y,onTriggerEnter:w(f),onTriggerLeave:w(v),onContentEnter:w(p),onContentLeave:w(g),onItemSelect:w(c),onItemDismiss:w(l),onViewportContentChange:e.useCallback(((e,t)=>{M((n=>(n.set(e,t),new Map(n))))}),[]),onViewportContentRemove:e.useCallback((e=>{M((t=>t.has(e)?(t.delete(e),new Map(t)):t))}),[]),children:x.jsx(R.Provider,{scope:n,children:x.jsx(P,{scope:n,items:E,children:s})})})},S="NavigationMenuList",A=e.forwardRef(((e,t)=>{const{__scopeNavigationMenu:n,...o}=e,i=_(S,n),a=x.jsx(r.ul,{"data-orientation":i.orientation,...o,ref:t});return x.jsx(r.div,{style:{position:"relative"},ref:i.onIndicatorTrackChange,children:x.jsx(R.Slot,{scope:n,children:i.isRootMenu?x.jsx(oe,{asChild:!0,children:a}):a})})}));A.displayName=S;var K="NavigationMenuItem",[O,V]=b(K),z=e.forwardRef(((t,n)=>{const{__scopeNavigationMenu:o,value:i,...a}=t,s=d(),u=i||s||"LEGACY_REACT_AUTO_VALUE",c=e.useRef(null),l=e.useRef(null),f=e.useRef(null),v=e.useRef((()=>{})),m=e.useRef(!1),p=e.useCallback(((e="start")=>{if(c.current){v.current();const t=ae(c.current);t.length&&se("start"===e?t:t.reverse())}}),[]),w=e.useCallback((()=>{if(c.current){const e=ae(c.current);e.length&&(v.current=function(e){return e.forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})),()=>{e.forEach((e=>{const t=e.dataset.tabindex;e.setAttribute("tabindex",t)}))}}(e))}}),[]);return x.jsx(O,{scope:o,value:u,triggerRef:l,contentRef:c,focusProxyRef:f,wasEscapeCloseRef:m,onEntryKeyDown:p,onFocusProxyEnter:p,onRootContentClose:w,onContentFocusOutside:w,children:x.jsx(r.li,{...a,ref:n})})}));z.displayName=K;var $="NavigationMenuTrigger",U=e.forwardRef(((t,n)=>{const{__scopeNavigationMenu:i,disabled:a,...u}=t,c=_($,t.__scopeNavigationMenu),l=V($,t.__scopeNavigationMenu),d=e.useRef(null),f=s(d,l.triggerRef,n),v=le(c.baseId,l.value),m=de(c.baseId,l.value),p=e.useRef(!1),w=e.useRef(!1),h=l.value===c.value;return x.jsxs(x.Fragment,{children:[x.jsx(R.ItemSlot,{scope:i,value:l.value,children:x.jsx(ie,{asChild:!0,children:x.jsx(r.button,{id:v,disabled:a,"data-disabled":a?"":void 0,"data-state":ce(h),"aria-expanded":h,"aria-controls":m,...u,ref:f,onPointerEnter:o(t.onPointerEnter,(()=>{w.current=!1,l.wasEscapeCloseRef.current=!1})),onPointerMove:o(t.onPointerMove,fe((()=>{a||w.current||l.wasEscapeCloseRef.current||p.current||(c.onTriggerEnter(l.value),p.current=!0)}))),onPointerLeave:o(t.onPointerLeave,fe((()=>{a||(c.onTriggerLeave(),p.current=!1)}))),onClick:o(t.onClick,(()=>{c.onItemSelect(l.value),w.current=h})),onKeyDown:o(t.onKeyDown,(e=>{const t={horizontal:"ArrowDown",vertical:"rtl"===c.dir?"ArrowLeft":"ArrowRight"}[c.orientation];h&&e.key===t&&(l.onEntryKeyDown(),e.preventDefault())}))})})}),h&&x.jsxs(x.Fragment,{children:[x.jsx(g,{"aria-hidden":!0,tabIndex:0,ref:l.focusProxyRef,onFocus:e=>{const t=l.contentRef.current,n=e.relatedTarget,o=n===d.current,r=t?.contains(n);!o&&r||l.onFocusProxyEnter(o?"start":"end")}}),c.viewport&&x.jsx("span",{"aria-owns":m})]})]})}));U.displayName=$;var B="navigationMenu.linkSelect",H=e.forwardRef(((e,t)=>{const{__scopeNavigationMenu:n,active:a,onSelect:s,...u}=e;return x.jsx(ie,{asChild:!0,children:x.jsx(r.a,{"data-active":a?"":void 0,"aria-current":a?"page":void 0,...u,ref:t,onClick:o(e.onClick,(e=>{const t=e.target,n=new CustomEvent(B,{bubbles:!0,cancelable:!0});if(t.addEventListener(B,(e=>s?.(e)),{once:!0}),i(t,n),!n.defaultPrevented&&!e.metaKey){const e=new CustomEvent(Q,{bubbles:!0,cancelable:!0});i(t,e)}}),{checkForDefaultPrevented:!1})})})}));H.displayName="NavigationMenuLink";var W="NavigationMenuIndicator",G=e.forwardRef(((e,n)=>{const{forceMount:o,...r}=e,i=_(W,e.__scopeNavigationMenu),a=Boolean(i.value);return i.indicatorTrack?t.createPortal(x.jsx(l,{present:o||a,children:x.jsx(Y,{...r,ref:n})}),i.indicatorTrack):null}));G.displayName=W;var Y=e.forwardRef(((t,n)=>{const{__scopeNavigationMenu:o,...i}=t,a=_(W,o),s=C(o),[u,c]=e.useState(null),[l,d]=e.useState(null),f="horizontal"===a.orientation,v=Boolean(a.value);e.useEffect((()=>{const e=s(),t=e.find((e=>e.value===a.value))?.ref.current;t&&c(t)}),[s,a.value]);const m=()=>{u&&d({size:f?u.offsetWidth:u.offsetHeight,offset:f?u.offsetLeft:u.offsetTop})};return ue(u,m),ue(a.indicatorTrack,m),l?x.jsx(r.div,{"aria-hidden":!0,"data-state":v?"visible":"hidden","data-orientation":a.orientation,...i,ref:n,style:{position:"absolute",...f?{left:0,width:l.size+"px",transform:`translateX(${l.offset}px)`}:{top:0,height:l.size+"px",transform:`translateY(${l.offset}px)`},...i.style}}):null})),q="NavigationMenuContent",X=e.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,i=_(q,e.__scopeNavigationMenu),a=V(q,e.__scopeNavigationMenu),u=s(a.contentRef,t),c=a.value===i.value,d={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...r};return i.viewport?x.jsx(J,{forceMount:n,...d,ref:u}):x.jsx(l,{present:n||c,children:x.jsx(Z,{"data-state":ce(c),...d,ref:u,onPointerEnter:o(e.onPointerEnter,i.onContentEnter),onPointerLeave:o(e.onPointerLeave,fe(i.onContentLeave)),style:{pointerEvents:!c&&i.isRootMenu?"none":void 0,...d.style}})})}));X.displayName=q;var J=e.forwardRef(((e,t)=>{const n=_(q,e.__scopeNavigationMenu),{onViewportContentChange:o,onViewportContentRemove:r}=n;return p((()=>{o(e.value,{ref:t,...e})}),[e,t,o]),p((()=>()=>r(e.value)),[e.value,r]),null})),Q="navigationMenu.rootContentDismiss",Z=e.forwardRef(((t,n)=>{const{__scopeNavigationMenu:r,value:i,triggerRef:a,focusProxyRef:u,wasEscapeCloseRef:c,onRootContentClose:l,onContentFocusOutside:d,...f}=t,m=_(q,r),p=e.useRef(null),w=s(p,n),g=le(m.baseId,i),h=de(m.baseId,i),R=C(r),E=e.useRef(null),{onItemDismiss:M}=m;e.useEffect((()=>{const e=p.current;if(m.isRootMenu&&e){const t=()=>{M(),l(),e.contains(document.activeElement)&&a.current?.focus()};return e.addEventListener(Q,t),()=>e.removeEventListener(Q,t)}}),[m.isRootMenu,t.value,a,M,l]);const j=e.useMemo((()=>{const e=R().map((e=>e.value));"rtl"===m.dir&&e.reverse();const t=e.indexOf(m.value),n=e.indexOf(m.previousValue),o=i===m.value,r=n===e.indexOf(i);if(!o&&!r)return E.current;const a=(()=>{if(t!==n){if(o&&-1!==n)return t>n?"from-end":"from-start";if(r&&-1!==t)return t>n?"to-start":"to-end"}return null})();return E.current=a,a}),[m.previousValue,m.value,m.dir,R,i]);return x.jsx(oe,{asChild:!0,children:x.jsx(v,{id:h,"aria-labelledby":g,"data-motion":j,"data-orientation":m.orientation,...f,ref:w,disableOutsidePointerEvents:!1,onDismiss:()=>{const e=new Event(Q,{bubbles:!0,cancelable:!0});p.current?.dispatchEvent(e)},onFocusOutside:o(t.onFocusOutside,(e=>{d();const t=e.target;m.rootNavigationMenu?.contains(t)&&e.preventDefault()})),onPointerDownOutside:o(t.onPointerDownOutside,(e=>{const t=e.target,n=R().some((e=>e.ref.current?.contains(t))),o=m.isRootMenu&&m.viewport?.contains(t);(n||o||!m.isRootMenu)&&e.preventDefault()})),onKeyDown:o(t.onKeyDown,(e=>{const t=e.altKey||e.ctrlKey||e.metaKey;if("Tab"===e.key&&!t){const t=ae(e.currentTarget),n=document.activeElement,o=t.findIndex((e=>e===n));se(e.shiftKey?t.slice(0,o).reverse():t.slice(o+1,t.length))?e.preventDefault():u.current?.focus()}})),onEscapeKeyDown:o(t.onEscapeKeyDown,(e=>{c.current=!0}))})})})),ee="NavigationMenuViewport",te=e.forwardRef(((e,t)=>{const{forceMount:n,...o}=e,r=_(ee,e.__scopeNavigationMenu),i=Boolean(r.value);return x.jsx(l,{present:n||i,children:x.jsx(ne,{...o,ref:t})})}));te.displayName=ee;var ne=e.forwardRef(((t,n)=>{const{__scopeNavigationMenu:i,children:a,...c}=t,d=_(ee,i),f=s(n,d.onViewportChange),v=I(q,t.__scopeNavigationMenu),[m,p]=e.useState(null),[w,g]=e.useState(null),h=m?m?.width+"px":void 0,R=m?m?.height+"px":void 0,C=Boolean(d.value),E=C?d.value:d.previousValue;return ue(w,(()=>{w&&p({width:w.offsetWidth,height:w.offsetHeight})})),x.jsx(r.div,{"data-state":ce(C),"data-orientation":d.orientation,...c,ref:f,style:{pointerEvents:!C&&d.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":h,"--radix-navigation-menu-viewport-height":R,...c.style},onPointerEnter:o(t.onPointerEnter,d.onContentEnter),onPointerLeave:o(t.onPointerLeave,fe(d.onContentLeave)),children:Array.from(v.items).map((([e,{ref:t,forceMount:n,...o}])=>{const r=E===e;return x.jsx(l,{present:n||r,children:x.jsx(Z,{...o,ref:u(t,(e=>{r&&e&&g(e)}))})},e)}))})})),oe=e.forwardRef(((e,t)=>{const{__scopeNavigationMenu:n,...o}=e,i=_("FocusGroup",n);return x.jsx(M.Provider,{scope:n,children:x.jsx(M.Slot,{scope:n,children:x.jsx(r.div,{dir:i.dir,...o,ref:t})})})})),re=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],ie=e.forwardRef(((e,t)=>{const{__scopeNavigationMenu:n,...i}=e,a=j(n),s=_("FocusGroupItem",n);return x.jsx(M.ItemSlot,{scope:n,children:x.jsx(r.button,{...i,ref:t,onKeyDown:o(e.onKeyDown,(e=>{if(["Home","End",...re].includes(e.key)){let t=a().map((e=>e.ref.current));if(["rtl"===s.dir?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(e.key)&&t.reverse(),re.includes(e.key)){const n=t.indexOf(e.currentTarget);t=t.slice(n+1)}setTimeout((()=>se(t))),e.preventDefault()}}))})})}));function ae(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function se(e){const t=document.activeElement;return e.some((e=>e===t||(e.focus(),document.activeElement!==t)))}function ue(e,t){const n=w(t);p((()=>{let t=0;if(e){const o=new ResizeObserver((()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)}));return o.observe(e),()=>{window.cancelAnimationFrame(t),o.unobserve(e)}}}),[e,n])}function ce(e){return e?"open":"closed"}function le(e,t){return`${e}-trigger-${t}`}function de(e,t){return`${e}-content-${t}`}function fe(e){return t=>"mouse"===t.pointerType?e(t):void 0}var ve=L,me=A,pe=z,we=U,ge=H,xe=G,he=X,Re=te;export{he as Content,xe as Indicator,pe as Item,ge as Link,me as List,L as NavigationMenu,X as NavigationMenuContent,G as NavigationMenuIndicator,z as NavigationMenuItem,H as NavigationMenuLink,A as NavigationMenuList,k as NavigationMenuSub,U as NavigationMenuTrigger,te as NavigationMenuViewport,ve as Root,we as Trigger,Re as Viewport,N as createNavigationMenuScope};
|
1
|
+
import*as e from"react";import t from"react-dom";import{createContextScope as n}from"../../react-context/dist/index.mjs";import{composeEventHandlers as o}from"../../primitive/dist/index.mjs";import{Primitive as r,dispatchDiscreteCustomEvent as i}from"../../react-primitive/dist/index.mjs";import{useControllableState as a}from"../../react-use-controllable-state/dist/index.mjs";import{useComposedRefs as s,composeRefs as u}from"../../react-compose-refs/dist/index.mjs";import{useDirection as c}from"../../react-direction/dist/index.mjs";import{Presence as l}from"../../react-presence/dist/index.mjs";import{useId as d}from"../../react-id/dist/index.mjs";import{createCollection as f}from"../../react-collection/dist/index.mjs";import{DismissableLayer as v}from"../../react-dismissable-layer/dist/index.mjs";import{usePrevious as m}from"../../react-use-previous/dist/index.mjs";import{useLayoutEffect as p}from"../../react-use-layout-effect/dist/index.mjs";import{useCallbackRef as w}from"../../react-use-callback-ref/dist/index.mjs";import{Root as g}from"../../react-visually-hidden/dist/index.mjs";import{jsx as h,jsxs as R,Fragment as C}from"react/jsx-runtime";var E="NavigationMenu",[M,y,b]=f(E),[N,T,x]=f(E),[_,P]=n(E,[b,x]),[I,L]=_(E),[D,k]=_(E),S=e.forwardRef(((t,n)=>{const{__scopeNavigationMenu:o,value:i,onValueChange:u,defaultValue:l,delayDuration:d=200,skipDelayDuration:f=300,orientation:v="horizontal",dir:m,...p}=t,[w,g]=e.useState(null),R=s(n,(e=>g(e))),C=c(m),E=e.useRef(0),M=e.useRef(0),y=e.useRef(0),[b,N]=e.useState(!0),[T="",x]=a({prop:i,onChange:e=>{const t=f>0;""!==e?(window.clearTimeout(y.current),t&&N(!1)):(window.clearTimeout(y.current),y.current=window.setTimeout((()=>N(!0)),f)),u?.(e)},defaultProp:l}),_=e.useCallback((()=>{window.clearTimeout(M.current),M.current=window.setTimeout((()=>x("")),150)}),[x]),P=e.useCallback((e=>{window.clearTimeout(M.current),x(e)}),[x]),I=e.useCallback((e=>{T===e?window.clearTimeout(M.current):E.current=window.setTimeout((()=>{window.clearTimeout(M.current),x(e)}),d)}),[T,x,d]);return e.useEffect((()=>()=>{window.clearTimeout(E.current),window.clearTimeout(M.current),window.clearTimeout(y.current)}),[]),h(K,{scope:o,isRootMenu:!0,value:T,dir:C,orientation:v,rootNavigationMenu:w,onTriggerEnter:e=>{window.clearTimeout(E.current),b?I(e):P(e)},onTriggerLeave:()=>{window.clearTimeout(E.current),_()},onContentEnter:()=>window.clearTimeout(M.current),onContentLeave:_,onItemSelect:e=>{x((t=>t===e?"":e))},onItemDismiss:()=>x(""),children:h(r.nav,{"aria-label":"Main","data-orientation":v,dir:C,...p,ref:R})})}));S.displayName=E;var A="NavigationMenuSub",F=e.forwardRef(((e,t)=>{const{__scopeNavigationMenu:n,value:o,onValueChange:i,defaultValue:s,orientation:u="horizontal",...c}=e,l=L(A,n),[d="",f]=a({prop:o,onChange:i,defaultProp:s});return h(K,{scope:n,isRootMenu:!1,value:d,dir:l.dir,orientation:u,rootNavigationMenu:l.rootNavigationMenu,onTriggerEnter:e=>f(e),onItemSelect:e=>f(e),onItemDismiss:()=>f(""),children:h(r.div,{"data-orientation":u,...c,ref:t})})}));F.displayName=A;var K=t=>{const{scope:n,isRootMenu:o,rootNavigationMenu:r,dir:i,orientation:a,children:s,value:u,onItemSelect:c,onItemDismiss:l,onTriggerEnter:f,onTriggerLeave:v,onContentEnter:p,onContentLeave:g}=t,[R,C]=e.useState(null),[E,y]=e.useState(new Map),[b,N]=e.useState(null);return h(I,{scope:n,isRootMenu:o,rootNavigationMenu:r,value:u,previousValue:m(u),baseId:d(),dir:i,orientation:a,viewport:R,onViewportChange:C,indicatorTrack:b,onIndicatorTrackChange:N,onTriggerEnter:w(f),onTriggerLeave:w(v),onContentEnter:w(p),onContentLeave:w(g),onItemSelect:w(c),onItemDismiss:w(l),onViewportContentChange:e.useCallback(((e,t)=>{y((n=>(n.set(e,t),new Map(n))))}),[]),onViewportContentRemove:e.useCallback((e=>{y((t=>t.has(e)?(t.delete(e),new Map(t)):t))}),[]),children:h(M.Provider,{scope:n,children:h(D,{scope:n,items:E,children:s})})})},O="NavigationMenuList",V=e.forwardRef(((e,t)=>{const{__scopeNavigationMenu:n,...o}=e,i=L(O,n),a=h(r.ul,{"data-orientation":i.orientation,...o,ref:t});return h(r.div,{style:{position:"relative"},ref:i.onIndicatorTrackChange,children:h(M.Slot,{scope:n,children:i.isRootMenu?h(ie,{asChild:!0,children:a}):a})})}));V.displayName=O;var j="NavigationMenuItem",[z,$]=_(j),U=e.forwardRef(((t,n)=>{const{__scopeNavigationMenu:o,value:i,...a}=t,s=d(),u=i||s||"LEGACY_REACT_AUTO_VALUE",c=e.useRef(null),l=e.useRef(null),f=e.useRef(null),v=e.useRef((()=>{})),m=e.useRef(!1),p=e.useCallback(((e="start")=>{if(c.current){v.current();const t=ue(c.current);t.length&&ce("start"===e?t:t.reverse())}}),[]),w=e.useCallback((()=>{if(c.current){const e=ue(c.current);e.length&&(v.current=function(e){return e.forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})),()=>{e.forEach((e=>{const t=e.dataset.tabindex;e.setAttribute("tabindex",t)}))}}(e))}}),[]);return h(z,{scope:o,value:u,triggerRef:l,contentRef:c,focusProxyRef:f,wasEscapeCloseRef:m,onEntryKeyDown:p,onFocusProxyEnter:p,onRootContentClose:w,onContentFocusOutside:w,children:h(r.li,{...a,ref:n})})}));U.displayName=j;var B="NavigationMenuTrigger",H=e.forwardRef(((t,n)=>{const{__scopeNavigationMenu:i,disabled:a,...u}=t,c=L(B,t.__scopeNavigationMenu),l=$(B,t.__scopeNavigationMenu),d=e.useRef(null),f=s(d,l.triggerRef,n),v=fe(c.baseId,l.value),m=ve(c.baseId,l.value),p=e.useRef(!1),w=e.useRef(!1),E=l.value===c.value;return R(C,{children:[h(M.ItemSlot,{scope:i,value:l.value,children:h(se,{asChild:!0,children:h(r.button,{id:v,disabled:a,"data-disabled":a?"":void 0,"data-state":de(E),"aria-expanded":E,"aria-controls":m,...u,ref:f,onPointerEnter:o(t.onPointerEnter,(()=>{w.current=!1,l.wasEscapeCloseRef.current=!1})),onPointerMove:o(t.onPointerMove,me((()=>{a||w.current||l.wasEscapeCloseRef.current||p.current||(c.onTriggerEnter(l.value),p.current=!0)}))),onPointerLeave:o(t.onPointerLeave,me((()=>{a||(c.onTriggerLeave(),p.current=!1)}))),onClick:o(t.onClick,(()=>{c.onItemSelect(l.value),w.current=E})),onKeyDown:o(t.onKeyDown,(e=>{const t={horizontal:"ArrowDown",vertical:"rtl"===c.dir?"ArrowLeft":"ArrowRight"}[c.orientation];E&&e.key===t&&(l.onEntryKeyDown(),e.preventDefault())}))})})}),E&&R(C,{children:[h(g,{"aria-hidden":!0,tabIndex:0,ref:l.focusProxyRef,onFocus:e=>{const t=l.contentRef.current,n=e.relatedTarget,o=n===d.current,r=t?.contains(n);!o&&r||l.onFocusProxyEnter(o?"start":"end")}}),c.viewport&&h("span",{"aria-owns":m})]})]})}));H.displayName=B;var W="navigationMenu.linkSelect",G=e.forwardRef(((e,t)=>{const{__scopeNavigationMenu:n,active:a,onSelect:s,...u}=e;return h(se,{asChild:!0,children:h(r.a,{"data-active":a?"":void 0,"aria-current":a?"page":void 0,...u,ref:t,onClick:o(e.onClick,(e=>{const t=e.target,n=new CustomEvent(W,{bubbles:!0,cancelable:!0});if(t.addEventListener(W,(e=>s?.(e)),{once:!0}),i(t,n),!n.defaultPrevented&&!e.metaKey){const e=new CustomEvent(ee,{bubbles:!0,cancelable:!0});i(t,e)}}),{checkForDefaultPrevented:!1})})})}));G.displayName="NavigationMenuLink";var Y="NavigationMenuIndicator",q=e.forwardRef(((e,n)=>{const{forceMount:o,...r}=e,i=L(Y,e.__scopeNavigationMenu),a=Boolean(i.value);return i.indicatorTrack?t.createPortal(h(l,{present:o||a,children:h(X,{...r,ref:n})}),i.indicatorTrack):null}));q.displayName=Y;var X=e.forwardRef(((t,n)=>{const{__scopeNavigationMenu:o,...i}=t,a=L(Y,o),s=y(o),[u,c]=e.useState(null),[l,d]=e.useState(null),f="horizontal"===a.orientation,v=Boolean(a.value);e.useEffect((()=>{const e=s(),t=e.find((e=>e.value===a.value))?.ref.current;t&&c(t)}),[s,a.value]);const m=()=>{u&&d({size:f?u.offsetWidth:u.offsetHeight,offset:f?u.offsetLeft:u.offsetTop})};return le(u,m),le(a.indicatorTrack,m),l?h(r.div,{"aria-hidden":!0,"data-state":v?"visible":"hidden","data-orientation":a.orientation,...i,ref:n,style:{position:"absolute",...f?{left:0,width:l.size+"px",transform:`translateX(${l.offset}px)`}:{top:0,height:l.size+"px",transform:`translateY(${l.offset}px)`},...i.style}}):null})),J="NavigationMenuContent",Q=e.forwardRef(((e,t)=>{const{forceMount:n,...r}=e,i=L(J,e.__scopeNavigationMenu),a=$(J,e.__scopeNavigationMenu),u=s(a.contentRef,t),c=a.value===i.value,d={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...r};return i.viewport?h(Z,{forceMount:n,...d,ref:u}):h(l,{present:n||c,children:h(te,{"data-state":de(c),...d,ref:u,onPointerEnter:o(e.onPointerEnter,i.onContentEnter),onPointerLeave:o(e.onPointerLeave,me(i.onContentLeave)),style:{pointerEvents:!c&&i.isRootMenu?"none":void 0,...d.style}})})}));Q.displayName=J;var Z=e.forwardRef(((e,t)=>{const n=L(J,e.__scopeNavigationMenu),{onViewportContentChange:o,onViewportContentRemove:r}=n;return p((()=>{o(e.value,{ref:t,...e})}),[e,t,o]),p((()=>()=>r(e.value)),[e.value,r]),null})),ee="navigationMenu.rootContentDismiss",te=e.forwardRef(((t,n)=>{const{__scopeNavigationMenu:r,value:i,triggerRef:a,focusProxyRef:u,wasEscapeCloseRef:c,onRootContentClose:l,onContentFocusOutside:d,...f}=t,m=L(J,r),p=e.useRef(null),w=s(p,n),g=fe(m.baseId,i),R=ve(m.baseId,i),C=y(r),E=e.useRef(null),{onItemDismiss:M}=m;e.useEffect((()=>{const e=p.current;if(m.isRootMenu&&e){const t=()=>{M(),l(),e.contains(document.activeElement)&&a.current?.focus()};return e.addEventListener(ee,t),()=>e.removeEventListener(ee,t)}}),[m.isRootMenu,t.value,a,M,l]);const b=e.useMemo((()=>{const e=C().map((e=>e.value));"rtl"===m.dir&&e.reverse();const t=e.indexOf(m.value),n=e.indexOf(m.previousValue),o=i===m.value,r=n===e.indexOf(i);if(!o&&!r)return E.current;const a=(()=>{if(t!==n){if(o&&-1!==n)return t>n?"from-end":"from-start";if(r&&-1!==t)return t>n?"to-start":"to-end"}return null})();return E.current=a,a}),[m.previousValue,m.value,m.dir,C,i]);return h(ie,{asChild:!0,children:h(v,{id:R,"aria-labelledby":g,"data-motion":b,"data-orientation":m.orientation,...f,ref:w,disableOutsidePointerEvents:!1,onDismiss:()=>{const e=new Event(ee,{bubbles:!0,cancelable:!0});p.current?.dispatchEvent(e)},onFocusOutside:o(t.onFocusOutside,(e=>{d();const t=e.target;m.rootNavigationMenu?.contains(t)&&e.preventDefault()})),onPointerDownOutside:o(t.onPointerDownOutside,(e=>{const t=e.target,n=C().some((e=>e.ref.current?.contains(t))),o=m.isRootMenu&&m.viewport?.contains(t);(n||o||!m.isRootMenu)&&e.preventDefault()})),onKeyDown:o(t.onKeyDown,(e=>{const t=e.altKey||e.ctrlKey||e.metaKey;if("Tab"===e.key&&!t){const t=ue(e.currentTarget),n=document.activeElement,o=t.findIndex((e=>e===n));ce(e.shiftKey?t.slice(0,o).reverse():t.slice(o+1,t.length))?e.preventDefault():u.current?.focus()}})),onEscapeKeyDown:o(t.onEscapeKeyDown,(e=>{c.current=!0}))})})})),ne="NavigationMenuViewport",oe=e.forwardRef(((e,t)=>{const{forceMount:n,...o}=e,r=L(ne,e.__scopeNavigationMenu),i=Boolean(r.value);return h(l,{present:n||i,children:h(re,{...o,ref:t})})}));oe.displayName=ne;var re=e.forwardRef(((t,n)=>{const{__scopeNavigationMenu:i,children:a,...c}=t,d=L(ne,i),f=s(n,d.onViewportChange),v=k(J,t.__scopeNavigationMenu),[m,p]=e.useState(null),[w,g]=e.useState(null),R=m?m?.width+"px":void 0,C=m?m?.height+"px":void 0,E=Boolean(d.value),M=E?d.value:d.previousValue;return le(w,(()=>{w&&p({width:w.offsetWidth,height:w.offsetHeight})})),h(r.div,{"data-state":de(E),"data-orientation":d.orientation,...c,ref:f,style:{pointerEvents:!E&&d.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":R,"--radix-navigation-menu-viewport-height":C,...c.style},onPointerEnter:o(t.onPointerEnter,d.onContentEnter),onPointerLeave:o(t.onPointerLeave,me(d.onContentLeave)),children:Array.from(v.items).map((([e,{ref:t,forceMount:n,...o}])=>{const r=M===e;return h(l,{present:n||r,children:h(te,{...o,ref:u(t,(e=>{r&&e&&g(e)}))})},e)}))})})),ie=e.forwardRef(((e,t)=>{const{__scopeNavigationMenu:n,...o}=e,i=L("FocusGroup",n);return h(N.Provider,{scope:n,children:h(N.Slot,{scope:n,children:h(r.div,{dir:i.dir,...o,ref:t})})})})),ae=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],se=e.forwardRef(((e,t)=>{const{__scopeNavigationMenu:n,...i}=e,a=T(n),s=L("FocusGroupItem",n);return h(N.ItemSlot,{scope:n,children:h(r.button,{...i,ref:t,onKeyDown:o(e.onKeyDown,(e=>{if(["Home","End",...ae].includes(e.key)){let t=a().map((e=>e.ref.current));if(["rtl"===s.dir?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(e.key)&&t.reverse(),ae.includes(e.key)){const n=t.indexOf(e.currentTarget);t=t.slice(n+1)}setTimeout((()=>ce(t))),e.preventDefault()}}))})})}));function ue(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ce(e){const t=document.activeElement;return e.some((e=>e===t||(e.focus(),document.activeElement!==t)))}function le(e,t){const n=w(t);p((()=>{let t=0;if(e){const o=new ResizeObserver((()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)}));return o.observe(e),()=>{window.cancelAnimationFrame(t),o.unobserve(e)}}}),[e,n])}function de(e){return e?"open":"closed"}function fe(e,t){return`${e}-trigger-${t}`}function ve(e,t){return`${e}-content-${t}`}function me(e){return t=>"mouse"===t.pointerType?e(t):void 0}var pe=S,we=V,ge=U,he=H,Re=G,Ce=q,Ee=Q,Me=oe;export{Ee as Content,Ce as Indicator,ge as Item,Re as Link,we as List,S as NavigationMenu,Q as NavigationMenuContent,q as NavigationMenuIndicator,U as NavigationMenuItem,G as NavigationMenuLink,V as NavigationMenuList,F as NavigationMenuSub,H as NavigationMenuTrigger,oe as NavigationMenuViewport,pe as Root,he as Trigger,Me as Viewport,P as createNavigationMenuScope};
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../node_modules/@radix-ui/react-navigation-menu/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/navigation-menu/src/NavigationMenu.tsx\nimport * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { composeRefs, useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { usePrevious } from \"@radix-ui/react-use-previous\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport * as VisuallyHiddenPrimitive from \"@radix-ui/react-visually-hidden\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar NAVIGATION_MENU_NAME = \"NavigationMenu\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(NAVIGATION_MENU_NAME);\nvar [FocusGroupCollection, useFocusGroupCollection, createFocusGroupCollectionScope] = createCollection(NAVIGATION_MENU_NAME);\nvar [createNavigationMenuContext, createNavigationMenuScope] = createContextScope(\n NAVIGATION_MENU_NAME,\n [createCollectionScope, createFocusGroupCollectionScope]\n);\nvar [NavigationMenuProviderImpl, useNavigationMenuContext] = createNavigationMenuContext(NAVIGATION_MENU_NAME);\nvar [ViewportContentProvider, useViewportContentContext] = createNavigationMenuContext(NAVIGATION_MENU_NAME);\nvar NavigationMenu = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeNavigationMenu,\n value: valueProp,\n onValueChange,\n defaultValue,\n delayDuration = 200,\n skipDelayDuration = 300,\n orientation = \"horizontal\",\n dir,\n ...NavigationMenuProps\n } = props;\n const [navigationMenu, setNavigationMenu] = React.useState(null);\n const composedRef = useComposedRefs(forwardedRef, (node) => setNavigationMenu(node));\n const direction = useDirection(dir);\n const openTimerRef = React.useRef(0);\n const closeTimerRef = React.useRef(0);\n const skipDelayTimerRef = React.useRef(0);\n const [isOpenDelayed, setIsOpenDelayed] = React.useState(true);\n const [value = \"\", setValue] = useControllableState({\n prop: valueProp,\n onChange: (value2) => {\n const isOpen = value2 !== \"\";\n const hasSkipDelayDuration = skipDelayDuration > 0;\n if (isOpen) {\n window.clearTimeout(skipDelayTimerRef.current);\n if (hasSkipDelayDuration) setIsOpenDelayed(false);\n } else {\n window.clearTimeout(skipDelayTimerRef.current);\n skipDelayTimerRef.current = window.setTimeout(\n () => setIsOpenDelayed(true),\n skipDelayDuration\n );\n }\n onValueChange?.(value2);\n },\n defaultProp: defaultValue\n });\n const startCloseTimer = React.useCallback(() => {\n window.clearTimeout(closeTimerRef.current);\n closeTimerRef.current = window.setTimeout(() => setValue(\"\"), 150);\n }, [setValue]);\n const handleOpen = React.useCallback(\n (itemValue) => {\n window.clearTimeout(closeTimerRef.current);\n setValue(itemValue);\n },\n [setValue]\n );\n const handleDelayedOpen = React.useCallback(\n (itemValue) => {\n const isOpenItem = value === itemValue;\n if (isOpenItem) {\n window.clearTimeout(closeTimerRef.current);\n } else {\n openTimerRef.current = window.setTimeout(() => {\n window.clearTimeout(closeTimerRef.current);\n setValue(itemValue);\n }, delayDuration);\n }\n },\n [value, setValue, delayDuration]\n );\n React.useEffect(() => {\n return () => {\n window.clearTimeout(openTimerRef.current);\n window.clearTimeout(closeTimerRef.current);\n window.clearTimeout(skipDelayTimerRef.current);\n };\n }, []);\n return /* @__PURE__ */ jsx(\n NavigationMenuProvider,\n {\n scope: __scopeNavigationMenu,\n isRootMenu: true,\n value,\n dir: direction,\n orientation,\n rootNavigationMenu: navigationMenu,\n onTriggerEnter: (itemValue) => {\n window.clearTimeout(openTimerRef.current);\n if (isOpenDelayed) handleDelayedOpen(itemValue);\n else handleOpen(itemValue);\n },\n onTriggerLeave: () => {\n window.clearTimeout(openTimerRef.current);\n startCloseTimer();\n },\n onContentEnter: () => window.clearTimeout(closeTimerRef.current),\n onContentLeave: startCloseTimer,\n onItemSelect: (itemValue) => {\n setValue((prevValue) => prevValue === itemValue ? \"\" : itemValue);\n },\n onItemDismiss: () => setValue(\"\"),\n children: /* @__PURE__ */ jsx(\n Primitive.nav,\n {\n \"aria-label\": \"Main\",\n \"data-orientation\": orientation,\n dir: direction,\n ...NavigationMenuProps,\n ref: composedRef\n }\n )\n }\n );\n }\n);\nNavigationMenu.displayName = NAVIGATION_MENU_NAME;\nvar SUB_NAME = \"NavigationMenuSub\";\nvar NavigationMenuSub = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeNavigationMenu,\n value: valueProp,\n onValueChange,\n defaultValue,\n orientation = \"horizontal\",\n ...subProps\n } = props;\n const context = useNavigationMenuContext(SUB_NAME, __scopeNavigationMenu);\n const [value = \"\", setValue] = useControllableState({\n prop: valueProp,\n onChange: onValueChange,\n defaultProp: defaultValue\n });\n return /* @__PURE__ */ jsx(\n NavigationMenuProvider,\n {\n scope: __scopeNavigationMenu,\n isRootMenu: false,\n value,\n dir: context.dir,\n orientation,\n rootNavigationMenu: context.rootNavigationMenu,\n onTriggerEnter: (itemValue) => setValue(itemValue),\n onItemSelect: (itemValue) => setValue(itemValue),\n onItemDismiss: () => setValue(\"\"),\n children: /* @__PURE__ */ jsx(Primitive.div, { \"data-orientation\": orientation, ...subProps, ref: forwardedRef })\n }\n );\n }\n);\nNavigationMenuSub.displayName = SUB_NAME;\nvar NavigationMenuProvider = (props) => {\n const {\n scope,\n isRootMenu,\n rootNavigationMenu,\n dir,\n orientation,\n children,\n value,\n onItemSelect,\n onItemDismiss,\n onTriggerEnter,\n onTriggerLeave,\n onContentEnter,\n onContentLeave\n } = props;\n const [viewport, setViewport] = React.useState(null);\n const [viewportContent, setViewportContent] = React.useState(/* @__PURE__ */ new Map());\n const [indicatorTrack, setIndicatorTrack] = React.useState(null);\n return /* @__PURE__ */ jsx(\n NavigationMenuProviderImpl,\n {\n scope,\n isRootMenu,\n rootNavigationMenu,\n value,\n previousValue: usePrevious(value),\n baseId: useId(),\n dir,\n orientation,\n viewport,\n onViewportChange: setViewport,\n indicatorTrack,\n onIndicatorTrackChange: setIndicatorTrack,\n onTriggerEnter: useCallbackRef(onTriggerEnter),\n onTriggerLeave: useCallbackRef(onTriggerLeave),\n onContentEnter: useCallbackRef(onContentEnter),\n onContentLeave: useCallbackRef(onContentLeave),\n onItemSelect: useCallbackRef(onItemSelect),\n onItemDismiss: useCallbackRef(onItemDismiss),\n onViewportContentChange: React.useCallback((contentValue, contentData) => {\n setViewportContent((prevContent) => {\n prevContent.set(contentValue, contentData);\n return new Map(prevContent);\n });\n }, []),\n onViewportContentRemove: React.useCallback((contentValue) => {\n setViewportContent((prevContent) => {\n if (!prevContent.has(contentValue)) return prevContent;\n prevContent.delete(contentValue);\n return new Map(prevContent);\n });\n }, []),\n children: /* @__PURE__ */ jsx(Collection.Provider, { scope, children: /* @__PURE__ */ jsx(ViewportContentProvider, { scope, items: viewportContent, children }) })\n }\n );\n};\nvar LIST_NAME = \"NavigationMenuList\";\nvar NavigationMenuList = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeNavigationMenu, ...listProps } = props;\n const context = useNavigationMenuContext(LIST_NAME, __scopeNavigationMenu);\n const list = /* @__PURE__ */ jsx(Primitive.ul, { \"data-orientation\": context.orientation, ...listProps, ref: forwardedRef });\n return /* @__PURE__ */ jsx(Primitive.div, { style: { position: \"relative\" }, ref: context.onIndicatorTrackChange, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: __scopeNavigationMenu, children: context.isRootMenu ? /* @__PURE__ */ jsx(FocusGroup, { asChild: true, children: list }) : list }) });\n }\n);\nNavigationMenuList.displayName = LIST_NAME;\nvar ITEM_NAME = \"NavigationMenuItem\";\nvar [NavigationMenuItemContextProvider, useNavigationMenuItemContext] = createNavigationMenuContext(ITEM_NAME);\nvar NavigationMenuItem = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeNavigationMenu, value: valueProp, ...itemProps } = props;\n const autoValue = useId();\n const value = valueProp || autoValue || \"LEGACY_REACT_AUTO_VALUE\";\n const contentRef = React.useRef(null);\n const triggerRef = React.useRef(null);\n const focusProxyRef = React.useRef(null);\n const restoreContentTabOrderRef = React.useRef(() => {\n });\n const wasEscapeCloseRef = React.useRef(false);\n const handleContentEntry = React.useCallback((side = \"start\") => {\n if (contentRef.current) {\n restoreContentTabOrderRef.current();\n const candidates = getTabbableCandidates(contentRef.current);\n if (candidates.length) focusFirst(side === \"start\" ? candidates : candidates.reverse());\n }\n }, []);\n const handleContentExit = React.useCallback(() => {\n if (contentRef.current) {\n const candidates = getTabbableCandidates(contentRef.current);\n if (candidates.length) restoreContentTabOrderRef.current = removeFromTabOrder(candidates);\n }\n }, []);\n return /* @__PURE__ */ jsx(\n NavigationMenuItemContextProvider,\n {\n scope: __scopeNavigationMenu,\n value,\n triggerRef,\n contentRef,\n focusProxyRef,\n wasEscapeCloseRef,\n onEntryKeyDown: handleContentEntry,\n onFocusProxyEnter: handleContentEntry,\n onRootContentClose: handleContentExit,\n onContentFocusOutside: handleContentExit,\n children: /* @__PURE__ */ jsx(Primitive.li, { ...itemProps, ref: forwardedRef })\n }\n );\n }\n);\nNavigationMenuItem.displayName = ITEM_NAME;\nvar TRIGGER_NAME = \"NavigationMenuTrigger\";\nvar NavigationMenuTrigger = React.forwardRef((props, forwardedRef) => {\n const { __scopeNavigationMenu, disabled, ...triggerProps } = props;\n const context = useNavigationMenuContext(TRIGGER_NAME, props.__scopeNavigationMenu);\n const itemContext = useNavigationMenuItemContext(TRIGGER_NAME, props.__scopeNavigationMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(ref, itemContext.triggerRef, forwardedRef);\n const triggerId = makeTriggerId(context.baseId, itemContext.value);\n const contentId = makeContentId(context.baseId, itemContext.value);\n const hasPointerMoveOpenedRef = React.useRef(false);\n const wasClickCloseRef = React.useRef(false);\n const open = itemContext.value === context.value;\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(Collection.ItemSlot, { scope: __scopeNavigationMenu, value: itemContext.value, children: /* @__PURE__ */ jsx(FocusGroupItem, { asChild: true, children: /* @__PURE__ */ jsx(\n Primitive.button,\n {\n id: triggerId,\n disabled,\n \"data-disabled\": disabled ? \"\" : void 0,\n \"data-state\": getOpenState(open),\n \"aria-expanded\": open,\n \"aria-controls\": contentId,\n ...triggerProps,\n ref: composedRefs,\n onPointerEnter: composeEventHandlers(props.onPointerEnter, () => {\n wasClickCloseRef.current = false;\n itemContext.wasEscapeCloseRef.current = false;\n }),\n onPointerMove: composeEventHandlers(\n props.onPointerMove,\n whenMouse(() => {\n if (disabled || wasClickCloseRef.current || itemContext.wasEscapeCloseRef.current || hasPointerMoveOpenedRef.current)\n return;\n context.onTriggerEnter(itemContext.value);\n hasPointerMoveOpenedRef.current = true;\n })\n ),\n onPointerLeave: composeEventHandlers(\n props.onPointerLeave,\n whenMouse(() => {\n if (disabled) return;\n context.onTriggerLeave();\n hasPointerMoveOpenedRef.current = false;\n })\n ),\n onClick: composeEventHandlers(props.onClick, () => {\n context.onItemSelect(itemContext.value);\n wasClickCloseRef.current = open;\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const verticalEntryKey = context.dir === \"rtl\" ? \"ArrowLeft\" : \"ArrowRight\";\n const entryKey = { horizontal: \"ArrowDown\", vertical: verticalEntryKey }[context.orientation];\n if (open && event.key === entryKey) {\n itemContext.onEntryKeyDown();\n event.preventDefault();\n }\n })\n }\n ) }) }),\n open && /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n VisuallyHiddenPrimitive.Root,\n {\n \"aria-hidden\": true,\n tabIndex: 0,\n ref: itemContext.focusProxyRef,\n onFocus: (event) => {\n const content = itemContext.contentRef.current;\n const prevFocusedElement = event.relatedTarget;\n const wasTriggerFocused = prevFocusedElement === ref.current;\n const wasFocusFromContent = content?.contains(prevFocusedElement);\n if (wasTriggerFocused || !wasFocusFromContent) {\n itemContext.onFocusProxyEnter(wasTriggerFocused ? \"start\" : \"end\");\n }\n }\n }\n ),\n context.viewport && /* @__PURE__ */ jsx(\"span\", { \"aria-owns\": contentId })\n ] })\n ] });\n});\nNavigationMenuTrigger.displayName = TRIGGER_NAME;\nvar LINK_NAME = \"NavigationMenuLink\";\nvar LINK_SELECT = \"navigationMenu.linkSelect\";\nvar NavigationMenuLink = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeNavigationMenu, active, onSelect, ...linkProps } = props;\n return /* @__PURE__ */ jsx(FocusGroupItem, { asChild: true, children: /* @__PURE__ */ jsx(\n Primitive.a,\n {\n \"data-active\": active ? \"\" : void 0,\n \"aria-current\": active ? \"page\" : void 0,\n ...linkProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(\n props.onClick,\n (event) => {\n const target = event.target;\n const linkSelectEvent = new CustomEvent(LINK_SELECT, {\n bubbles: true,\n cancelable: true\n });\n target.addEventListener(LINK_SELECT, (event2) => onSelect?.(event2), { once: true });\n dispatchDiscreteCustomEvent(target, linkSelectEvent);\n if (!linkSelectEvent.defaultPrevented && !event.metaKey) {\n const rootContentDismissEvent = new CustomEvent(ROOT_CONTENT_DISMISS, {\n bubbles: true,\n cancelable: true\n });\n dispatchDiscreteCustomEvent(target, rootContentDismissEvent);\n }\n },\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nNavigationMenuLink.displayName = LINK_NAME;\nvar INDICATOR_NAME = \"NavigationMenuIndicator\";\nvar NavigationMenuIndicator = React.forwardRef((props, forwardedRef) => {\n const { forceMount, ...indicatorProps } = props;\n const context = useNavigationMenuContext(INDICATOR_NAME, props.__scopeNavigationMenu);\n const isVisible = Boolean(context.value);\n return context.indicatorTrack ? ReactDOM.createPortal(\n /* @__PURE__ */ jsx(Presence, { present: forceMount || isVisible, children: /* @__PURE__ */ jsx(NavigationMenuIndicatorImpl, { ...indicatorProps, ref: forwardedRef }) }),\n context.indicatorTrack\n ) : null;\n});\nNavigationMenuIndicator.displayName = INDICATOR_NAME;\nvar NavigationMenuIndicatorImpl = React.forwardRef((props, forwardedRef) => {\n const { __scopeNavigationMenu, ...indicatorProps } = props;\n const context = useNavigationMenuContext(INDICATOR_NAME, __scopeNavigationMenu);\n const getItems = useCollection(__scopeNavigationMenu);\n const [activeTrigger, setActiveTrigger] = React.useState(\n null\n );\n const [position, setPosition] = React.useState(null);\n const isHorizontal = context.orientation === \"horizontal\";\n const isVisible = Boolean(context.value);\n React.useEffect(() => {\n const items = getItems();\n const triggerNode = items.find((item) => item.value === context.value)?.ref.current;\n if (triggerNode) setActiveTrigger(triggerNode);\n }, [getItems, context.value]);\n const handlePositionChange = () => {\n if (activeTrigger) {\n setPosition({\n size: isHorizontal ? activeTrigger.offsetWidth : activeTrigger.offsetHeight,\n offset: isHorizontal ? activeTrigger.offsetLeft : activeTrigger.offsetTop\n });\n }\n };\n useResizeObserver(activeTrigger, handlePositionChange);\n useResizeObserver(context.indicatorTrack, handlePositionChange);\n return position ? /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"aria-hidden\": true,\n \"data-state\": isVisible ? \"visible\" : \"hidden\",\n \"data-orientation\": context.orientation,\n ...indicatorProps,\n ref: forwardedRef,\n style: {\n position: \"absolute\",\n ...isHorizontal ? {\n left: 0,\n width: position.size + \"px\",\n transform: `translateX(${position.offset}px)`\n } : {\n top: 0,\n height: position.size + \"px\",\n transform: `translateY(${position.offset}px)`\n },\n ...indicatorProps.style\n }\n }\n ) : null;\n});\nvar CONTENT_NAME = \"NavigationMenuContent\";\nvar NavigationMenuContent = React.forwardRef((props, forwardedRef) => {\n const { forceMount, ...contentProps } = props;\n const context = useNavigationMenuContext(CONTENT_NAME, props.__scopeNavigationMenu);\n const itemContext = useNavigationMenuItemContext(CONTENT_NAME, props.__scopeNavigationMenu);\n const composedRefs = useComposedRefs(itemContext.contentRef, forwardedRef);\n const open = itemContext.value === context.value;\n const commonProps = {\n value: itemContext.value,\n triggerRef: itemContext.triggerRef,\n focusProxyRef: itemContext.focusProxyRef,\n wasEscapeCloseRef: itemContext.wasEscapeCloseRef,\n onContentFocusOutside: itemContext.onContentFocusOutside,\n onRootContentClose: itemContext.onRootContentClose,\n ...contentProps\n };\n return !context.viewport ? /* @__PURE__ */ jsx(Presence, { present: forceMount || open, children: /* @__PURE__ */ jsx(\n NavigationMenuContentImpl,\n {\n \"data-state\": getOpenState(open),\n ...commonProps,\n ref: composedRefs,\n onPointerEnter: composeEventHandlers(props.onPointerEnter, context.onContentEnter),\n onPointerLeave: composeEventHandlers(\n props.onPointerLeave,\n whenMouse(context.onContentLeave)\n ),\n style: {\n // Prevent interaction when animating out\n pointerEvents: !open && context.isRootMenu ? \"none\" : void 0,\n ...commonProps.style\n }\n }\n ) }) : /* @__PURE__ */ jsx(ViewportContentMounter, { forceMount, ...commonProps, ref: composedRefs });\n});\nNavigationMenuContent.displayName = CONTENT_NAME;\nvar ViewportContentMounter = React.forwardRef((props, forwardedRef) => {\n const context = useNavigationMenuContext(CONTENT_NAME, props.__scopeNavigationMenu);\n const { onViewportContentChange, onViewportContentRemove } = context;\n useLayoutEffect(() => {\n onViewportContentChange(props.value, {\n ref: forwardedRef,\n ...props\n });\n }, [props, forwardedRef, onViewportContentChange]);\n useLayoutEffect(() => {\n return () => onViewportContentRemove(props.value);\n }, [props.value, onViewportContentRemove]);\n return null;\n});\nvar ROOT_CONTENT_DISMISS = \"navigationMenu.rootContentDismiss\";\nvar NavigationMenuContentImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeNavigationMenu,\n value,\n triggerRef,\n focusProxyRef,\n wasEscapeCloseRef,\n onRootContentClose,\n onContentFocusOutside,\n ...contentProps\n } = props;\n const context = useNavigationMenuContext(CONTENT_NAME, __scopeNavigationMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(ref, forwardedRef);\n const triggerId = makeTriggerId(context.baseId, value);\n const contentId = makeContentId(context.baseId, value);\n const getItems = useCollection(__scopeNavigationMenu);\n const prevMotionAttributeRef = React.useRef(null);\n const { onItemDismiss } = context;\n React.useEffect(() => {\n const content = ref.current;\n if (context.isRootMenu && content) {\n const handleClose = () => {\n onItemDismiss();\n onRootContentClose();\n if (content.contains(document.activeElement)) triggerRef.current?.focus();\n };\n content.addEventListener(ROOT_CONTENT_DISMISS, handleClose);\n return () => content.removeEventListener(ROOT_CONTENT_DISMISS, handleClose);\n }\n }, [context.isRootMenu, props.value, triggerRef, onItemDismiss, onRootContentClose]);\n const motionAttribute = React.useMemo(() => {\n const items = getItems();\n const values = items.map((item) => item.value);\n if (context.dir === \"rtl\") values.reverse();\n const index = values.indexOf(context.value);\n const prevIndex = values.indexOf(context.previousValue);\n const isSelected = value === context.value;\n const wasSelected = prevIndex === values.indexOf(value);\n if (!isSelected && !wasSelected) return prevMotionAttributeRef.current;\n const attribute = (() => {\n if (index !== prevIndex) {\n if (isSelected && prevIndex !== -1) return index > prevIndex ? \"from-end\" : \"from-start\";\n if (wasSelected && index !== -1) return index > prevIndex ? \"to-start\" : \"to-end\";\n }\n return null;\n })();\n prevMotionAttributeRef.current = attribute;\n return attribute;\n }, [context.previousValue, context.value, context.dir, getItems, value]);\n return /* @__PURE__ */ jsx(FocusGroup, { asChild: true, children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n id: contentId,\n \"aria-labelledby\": triggerId,\n \"data-motion\": motionAttribute,\n \"data-orientation\": context.orientation,\n ...contentProps,\n ref: composedRefs,\n disableOutsidePointerEvents: false,\n onDismiss: () => {\n const rootContentDismissEvent = new Event(ROOT_CONTENT_DISMISS, {\n bubbles: true,\n cancelable: true\n });\n ref.current?.dispatchEvent(rootContentDismissEvent);\n },\n onFocusOutside: composeEventHandlers(props.onFocusOutside, (event) => {\n onContentFocusOutside();\n const target = event.target;\n if (context.rootNavigationMenu?.contains(target)) event.preventDefault();\n }),\n onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {\n const target = event.target;\n const isTrigger = getItems().some((item) => item.ref.current?.contains(target));\n const isRootViewport = context.isRootMenu && context.viewport?.contains(target);\n if (isTrigger || isRootViewport || !context.isRootMenu) event.preventDefault();\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isMetaKey = event.altKey || event.ctrlKey || event.metaKey;\n const isTabKey = event.key === \"Tab\" && !isMetaKey;\n if (isTabKey) {\n const candidates = getTabbableCandidates(event.currentTarget);\n const focusedElement = document.activeElement;\n const index = candidates.findIndex((candidate) => candidate === focusedElement);\n const isMovingBackwards = event.shiftKey;\n const nextCandidates = isMovingBackwards ? candidates.slice(0, index).reverse() : candidates.slice(index + 1, candidates.length);\n if (focusFirst(nextCandidates)) {\n event.preventDefault();\n } else {\n focusProxyRef.current?.focus();\n }\n }\n }),\n onEscapeKeyDown: composeEventHandlers(props.onEscapeKeyDown, (event) => {\n wasEscapeCloseRef.current = true;\n })\n }\n ) });\n});\nvar VIEWPORT_NAME = \"NavigationMenuViewport\";\nvar NavigationMenuViewport = React.forwardRef((props, forwardedRef) => {\n const { forceMount, ...viewportProps } = props;\n const context = useNavigationMenuContext(VIEWPORT_NAME, props.__scopeNavigationMenu);\n const open = Boolean(context.value);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || open, children: /* @__PURE__ */ jsx(NavigationMenuViewportImpl, { ...viewportProps, ref: forwardedRef }) });\n});\nNavigationMenuViewport.displayName = VIEWPORT_NAME;\nvar NavigationMenuViewportImpl = React.forwardRef((props, forwardedRef) => {\n const { __scopeNavigationMenu, children, ...viewportImplProps } = props;\n const context = useNavigationMenuContext(VIEWPORT_NAME, __scopeNavigationMenu);\n const composedRefs = useComposedRefs(forwardedRef, context.onViewportChange);\n const viewportContentContext = useViewportContentContext(\n CONTENT_NAME,\n props.__scopeNavigationMenu\n );\n const [size, setSize] = React.useState(null);\n const [content, setContent] = React.useState(null);\n const viewportWidth = size ? size?.width + \"px\" : void 0;\n const viewportHeight = size ? size?.height + \"px\" : void 0;\n const open = Boolean(context.value);\n const activeContentValue = open ? context.value : context.previousValue;\n const handleSizeChange = () => {\n if (content) setSize({ width: content.offsetWidth, height: content.offsetHeight });\n };\n useResizeObserver(content, handleSizeChange);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getOpenState(open),\n \"data-orientation\": context.orientation,\n ...viewportImplProps,\n ref: composedRefs,\n style: {\n // Prevent interaction when animating out\n pointerEvents: !open && context.isRootMenu ? \"none\" : void 0,\n [\"--radix-navigation-menu-viewport-width\"]: viewportWidth,\n [\"--radix-navigation-menu-viewport-height\"]: viewportHeight,\n ...viewportImplProps.style\n },\n onPointerEnter: composeEventHandlers(props.onPointerEnter, context.onContentEnter),\n onPointerLeave: composeEventHandlers(props.onPointerLeave, whenMouse(context.onContentLeave)),\n children: Array.from(viewportContentContext.items).map(([value, { ref, forceMount, ...props2 }]) => {\n const isActive = activeContentValue === value;\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || isActive, children: /* @__PURE__ */ jsx(\n NavigationMenuContentImpl,\n {\n ...props2,\n ref: composeRefs(ref, (node) => {\n if (isActive && node) setContent(node);\n })\n }\n ) }, value);\n })\n }\n );\n});\nvar FOCUS_GROUP_NAME = \"FocusGroup\";\nvar FocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeNavigationMenu, ...groupProps } = props;\n const context = useNavigationMenuContext(FOCUS_GROUP_NAME, __scopeNavigationMenu);\n return /* @__PURE__ */ jsx(FocusGroupCollection.Provider, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(FocusGroupCollection.Slot, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(Primitive.div, { dir: context.dir, ...groupProps, ref: forwardedRef }) }) });\n }\n);\nvar ARROW_KEYS = [\"ArrowRight\", \"ArrowLeft\", \"ArrowUp\", \"ArrowDown\"];\nvar FOCUS_GROUP_ITEM_NAME = \"FocusGroupItem\";\nvar FocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeNavigationMenu, ...groupProps } = props;\n const getItems = useFocusGroupCollection(__scopeNavigationMenu);\n const context = useNavigationMenuContext(FOCUS_GROUP_ITEM_NAME, __scopeNavigationMenu);\n return /* @__PURE__ */ jsx(FocusGroupCollection.ItemSlot, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(\n Primitive.button,\n {\n ...groupProps,\n ref: forwardedRef,\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isFocusNavigationKey = [\"Home\", \"End\", ...ARROW_KEYS].includes(event.key);\n if (isFocusNavigationKey) {\n let candidateNodes = getItems().map((item) => item.ref.current);\n const prevItemKey = context.dir === \"rtl\" ? \"ArrowRight\" : \"ArrowLeft\";\n const prevKeys = [prevItemKey, \"ArrowUp\", \"End\"];\n if (prevKeys.includes(event.key)) candidateNodes.reverse();\n if (ARROW_KEYS.includes(event.key)) {\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n event.preventDefault();\n }\n })\n }\n ) });\n }\n);\nfunction getTabbableCandidates(container) {\n const nodes = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node) => {\n const isHiddenInput = node.tagName === \"INPUT\" && node.type === \"hidden\";\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n while (walker.nextNode()) nodes.push(walker.currentNode);\n return nodes;\n}\nfunction focusFirst(candidates) {\n const previouslyFocusedElement = document.activeElement;\n return candidates.some((candidate) => {\n if (candidate === previouslyFocusedElement) return true;\n candidate.focus();\n return document.activeElement !== previouslyFocusedElement;\n });\n}\nfunction removeFromTabOrder(candidates) {\n candidates.forEach((candidate) => {\n candidate.dataset.tabindex = candidate.getAttribute(\"tabindex\") || \"\";\n candidate.setAttribute(\"tabindex\", \"-1\");\n });\n return () => {\n candidates.forEach((candidate) => {\n const prevTabIndex = candidate.dataset.tabindex;\n candidate.setAttribute(\"tabindex\", prevTabIndex);\n });\n };\n}\nfunction useResizeObserver(element, onResize) {\n const handleResize = useCallbackRef(onResize);\n useLayoutEffect(() => {\n let rAF = 0;\n if (element) {\n const resizeObserver = new ResizeObserver(() => {\n cancelAnimationFrame(rAF);\n rAF = window.requestAnimationFrame(handleResize);\n });\n resizeObserver.observe(element);\n return () => {\n window.cancelAnimationFrame(rAF);\n resizeObserver.unobserve(element);\n };\n }\n }, [element, handleResize]);\n}\nfunction getOpenState(open) {\n return open ? \"open\" : \"closed\";\n}\nfunction makeTriggerId(baseId, value) {\n return `${baseId}-trigger-${value}`;\n}\nfunction makeContentId(baseId, value) {\n return `${baseId}-content-${value}`;\n}\nfunction whenMouse(handler) {\n return (event) => event.pointerType === \"mouse\" ? handler(event) : void 0;\n}\nvar Root2 = NavigationMenu;\nvar Sub = NavigationMenuSub;\nvar List = NavigationMenuList;\nvar Item = NavigationMenuItem;\nvar Trigger = NavigationMenuTrigger;\nvar Link = NavigationMenuLink;\nvar Indicator = NavigationMenuIndicator;\nvar Content = NavigationMenuContent;\nvar Viewport = NavigationMenuViewport;\nexport {\n Content,\n Indicator,\n Item,\n Link,\n List,\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuIndicator,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuSub,\n NavigationMenuTrigger,\n NavigationMenuViewport,\n Root2 as Root,\n Sub,\n Trigger,\n Viewport,\n createNavigationMenuScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["NAVIGATION_MENU_NAME","Collection","useCollection","createCollectionScope","createCollection","FocusGroupCollection","useFocusGroupCollection","createFocusGroupCollectionScope","createNavigationMenuContext","createNavigationMenuScope","createContextScope","NavigationMenuProviderImpl","useNavigationMenuContext","ViewportContentProvider","useViewportContentContext","NavigationMenu","React","forwardRef","props","forwardedRef","__scopeNavigationMenu","value","valueProp","onValueChange","defaultValue","delayDuration","skipDelayDuration","orientation","dir","NavigationMenuProps","navigationMenu","setNavigationMenu","useState","composedRef","useComposedRefs","node","direction","useDirection","openTimerRef","useRef","closeTimerRef","skipDelayTimerRef","isOpenDelayed","setIsOpenDelayed","setValue","useControllableState","prop","onChange","value2","hasSkipDelayDuration","window","clearTimeout","current","setTimeout","defaultProp","startCloseTimer","useCallback","handleOpen","itemValue","handleDelayedOpen","useEffect","jsx","NavigationMenuProvider","scope","isRootMenu","rootNavigationMenu","onTriggerEnter","onTriggerLeave","onContentEnter","onContentLeave","onItemSelect","prevValue","onItemDismiss","children","Primitive","nav","ref","displayName","SUB_NAME","NavigationMenuSub","subProps","context","div","viewport","setViewport","viewportContent","setViewportContent","Map","indicatorTrack","setIndicatorTrack","previousValue","usePrevious","baseId","useId","onViewportChange","onIndicatorTrackChange","useCallbackRef","onViewportContentChange","contentValue","contentData","prevContent","set","onViewportContentRemove","has","delete","Provider","items","LIST_NAME","NavigationMenuList","listProps","list","ul","style","position","Slot","FocusGroup","asChild","ITEM_NAME","NavigationMenuItemContextProvider","useNavigationMenuItemContext","NavigationMenuItem","itemProps","autoValue","contentRef","triggerRef","focusProxyRef","restoreContentTabOrderRef","wasEscapeCloseRef","handleContentEntry","side","candidates","getTabbableCandidates","length","focusFirst","reverse","handleContentExit","forEach","candidate","dataset","tabindex","getAttribute","setAttribute","prevTabIndex","removeFromTabOrder","onEntryKeyDown","onFocusProxyEnter","onRootContentClose","onContentFocusOutside","li","TRIGGER_NAME","NavigationMenuTrigger","disabled","triggerProps","itemContext","composedRefs","triggerId","makeTriggerId","contentId","makeContentId","hasPointerMoveOpenedRef","wasClickCloseRef","open","jsxs","Fragment","ItemSlot","FocusGroupItem","button","id","getOpenState","onPointerEnter","composeEventHandlers","onPointerMove","whenMouse","onPointerLeave","onClick","onKeyDown","event","entryKey","horizontal","vertical","key","preventDefault","VisuallyHiddenPrimitive.Root","tabIndex","onFocus","content","prevFocusedElement","relatedTarget","wasTriggerFocused","wasFocusFromContent","contains","LINK_SELECT","NavigationMenuLink","active","onSelect","linkProps","a","target","linkSelectEvent","CustomEvent","bubbles","cancelable","addEventListener","event2","once","dispatchDiscreteCustomEvent","defaultPrevented","metaKey","rootContentDismissEvent","ROOT_CONTENT_DISMISS","checkForDefaultPrevented","INDICATOR_NAME","NavigationMenuIndicator","forceMount","indicatorProps","isVisible","Boolean","ReactDOM","createPortal","Presence","present","NavigationMenuIndicatorImpl","getItems","activeTrigger","setActiveTrigger","setPosition","isHorizontal","triggerNode","find","item","handlePositionChange","size","offsetWidth","offsetHeight","offset","offsetLeft","offsetTop","useResizeObserver","left","width","transform","top","height","CONTENT_NAME","NavigationMenuContent","contentProps","commonProps","ViewportContentMounter","NavigationMenuContentImpl","pointerEvents","useLayoutEffect","prevMotionAttributeRef","handleClose","document","activeElement","focus","removeEventListener","motionAttribute","useMemo","values","map","index","indexOf","prevIndex","isSelected","wasSelected","attribute","DismissableLayer","disableOutsidePointerEvents","onDismiss","Event","dispatchEvent","onFocusOutside","onPointerDownOutside","isTrigger","some","isRootViewport","isMetaKey","altKey","ctrlKey","currentTarget","focusedElement","findIndex","shiftKey","slice","onEscapeKeyDown","VIEWPORT_NAME","NavigationMenuViewport","viewportProps","NavigationMenuViewportImpl","viewportImplProps","viewportContentContext","setSize","setContent","viewportWidth","viewportHeight","activeContentValue","Array","from","props2","isActive","composeRefs","groupProps","ARROW_KEYS","includes","candidateNodes","currentIndex","container","nodes","walker","createTreeWalker","NodeFilter","SHOW_ELEMENT","acceptNode","isHiddenInput","tagName","type","hidden","FILTER_SKIP","FILTER_ACCEPT","nextNode","push","currentNode","previouslyFocusedElement","element","onResize","handleResize","rAF","resizeObserver","ResizeObserver","cancelAnimationFrame","requestAnimationFrame","observe","unobserve","handler","pointerType","Root2","List","Item","Trig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C9B,CACA,SAASuJ,GAAUkK,GACjB,OAAQ9J,GAAgC,UAAtBA,EAAM+J,YAA0BD,EAAQ9J,QAAS,CACrE,CACG,IAACgK,GAAQjU,EAERkU,GAAOrO,EACPsO,GAAO1N,EACP2N,GAAU7L,EACV8L,GAAOpJ,EACPqJ,GAAYjI,EACZkI,GAAUlG,EACVmG,GAAWxD"}
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../node_modules/@radix-ui/react-navigation-menu/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/navigation-menu/src/NavigationMenu.tsx\nimport * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { composeRefs, useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { usePrevious } from \"@radix-ui/react-use-previous\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport * as VisuallyHiddenPrimitive from \"@radix-ui/react-visually-hidden\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar NAVIGATION_MENU_NAME = \"NavigationMenu\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(NAVIGATION_MENU_NAME);\nvar [FocusGroupCollection, useFocusGroupCollection, createFocusGroupCollectionScope] = createCollection(NAVIGATION_MENU_NAME);\nvar [createNavigationMenuContext, createNavigationMenuScope] = createContextScope(\n NAVIGATION_MENU_NAME,\n [createCollectionScope, createFocusGroupCollectionScope]\n);\nvar [NavigationMenuProviderImpl, useNavigationMenuContext] = createNavigationMenuContext(NAVIGATION_MENU_NAME);\nvar [ViewportContentProvider, useViewportContentContext] = createNavigationMenuContext(NAVIGATION_MENU_NAME);\nvar NavigationMenu = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeNavigationMenu,\n value: valueProp,\n onValueChange,\n defaultValue,\n delayDuration = 200,\n skipDelayDuration = 300,\n orientation = \"horizontal\",\n dir,\n ...NavigationMenuProps\n } = props;\n const [navigationMenu, setNavigationMenu] = React.useState(null);\n const composedRef = useComposedRefs(forwardedRef, (node) => setNavigationMenu(node));\n const direction = useDirection(dir);\n const openTimerRef = React.useRef(0);\n const closeTimerRef = React.useRef(0);\n const skipDelayTimerRef = React.useRef(0);\n const [isOpenDelayed, setIsOpenDelayed] = React.useState(true);\n const [value = \"\", setValue] = useControllableState({\n prop: valueProp,\n onChange: (value2) => {\n const isOpen = value2 !== \"\";\n const hasSkipDelayDuration = skipDelayDuration > 0;\n if (isOpen) {\n window.clearTimeout(skipDelayTimerRef.current);\n if (hasSkipDelayDuration) setIsOpenDelayed(false);\n } else {\n window.clearTimeout(skipDelayTimerRef.current);\n skipDelayTimerRef.current = window.setTimeout(\n () => setIsOpenDelayed(true),\n skipDelayDuration\n );\n }\n onValueChange?.(value2);\n },\n defaultProp: defaultValue\n });\n const startCloseTimer = React.useCallback(() => {\n window.clearTimeout(closeTimerRef.current);\n closeTimerRef.current = window.setTimeout(() => setValue(\"\"), 150);\n }, [setValue]);\n const handleOpen = React.useCallback(\n (itemValue) => {\n window.clearTimeout(closeTimerRef.current);\n setValue(itemValue);\n },\n [setValue]\n );\n const handleDelayedOpen = React.useCallback(\n (itemValue) => {\n const isOpenItem = value === itemValue;\n if (isOpenItem) {\n window.clearTimeout(closeTimerRef.current);\n } else {\n openTimerRef.current = window.setTimeout(() => {\n window.clearTimeout(closeTimerRef.current);\n setValue(itemValue);\n }, delayDuration);\n }\n },\n [value, setValue, delayDuration]\n );\n React.useEffect(() => {\n return () => {\n window.clearTimeout(openTimerRef.current);\n window.clearTimeout(closeTimerRef.current);\n window.clearTimeout(skipDelayTimerRef.current);\n };\n }, []);\n return /* @__PURE__ */ jsx(\n NavigationMenuProvider,\n {\n scope: __scopeNavigationMenu,\n isRootMenu: true,\n value,\n dir: direction,\n orientation,\n rootNavigationMenu: navigationMenu,\n onTriggerEnter: (itemValue) => {\n window.clearTimeout(openTimerRef.current);\n if (isOpenDelayed) handleDelayedOpen(itemValue);\n else handleOpen(itemValue);\n },\n onTriggerLeave: () => {\n window.clearTimeout(openTimerRef.current);\n startCloseTimer();\n },\n onContentEnter: () => window.clearTimeout(closeTimerRef.current),\n onContentLeave: startCloseTimer,\n onItemSelect: (itemValue) => {\n setValue((prevValue) => prevValue === itemValue ? \"\" : itemValue);\n },\n onItemDismiss: () => setValue(\"\"),\n children: /* @__PURE__ */ jsx(\n Primitive.nav,\n {\n \"aria-label\": \"Main\",\n \"data-orientation\": orientation,\n dir: direction,\n ...NavigationMenuProps,\n ref: composedRef\n }\n )\n }\n );\n }\n);\nNavigationMenu.displayName = NAVIGATION_MENU_NAME;\nvar SUB_NAME = \"NavigationMenuSub\";\nvar NavigationMenuSub = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeNavigationMenu,\n value: valueProp,\n onValueChange,\n defaultValue,\n orientation = \"horizontal\",\n ...subProps\n } = props;\n const context = useNavigationMenuContext(SUB_NAME, __scopeNavigationMenu);\n const [value = \"\", setValue] = useControllableState({\n prop: valueProp,\n onChange: onValueChange,\n defaultProp: defaultValue\n });\n return /* @__PURE__ */ jsx(\n NavigationMenuProvider,\n {\n scope: __scopeNavigationMenu,\n isRootMenu: false,\n value,\n dir: context.dir,\n orientation,\n rootNavigationMenu: context.rootNavigationMenu,\n onTriggerEnter: (itemValue) => setValue(itemValue),\n onItemSelect: (itemValue) => setValue(itemValue),\n onItemDismiss: () => setValue(\"\"),\n children: /* @__PURE__ */ jsx(Primitive.div, { \"data-orientation\": orientation, ...subProps, ref: forwardedRef })\n }\n );\n }\n);\nNavigationMenuSub.displayName = SUB_NAME;\nvar NavigationMenuProvider = (props) => {\n const {\n scope,\n isRootMenu,\n rootNavigationMenu,\n dir,\n orientation,\n children,\n value,\n onItemSelect,\n onItemDismiss,\n onTriggerEnter,\n onTriggerLeave,\n onContentEnter,\n onContentLeave\n } = props;\n const [viewport, setViewport] = React.useState(null);\n const [viewportContent, setViewportContent] = React.useState(/* @__PURE__ */ new Map());\n const [indicatorTrack, setIndicatorTrack] = React.useState(null);\n return /* @__PURE__ */ jsx(\n NavigationMenuProviderImpl,\n {\n scope,\n isRootMenu,\n rootNavigationMenu,\n value,\n previousValue: usePrevious(value),\n baseId: useId(),\n dir,\n orientation,\n viewport,\n onViewportChange: setViewport,\n indicatorTrack,\n onIndicatorTrackChange: setIndicatorTrack,\n onTriggerEnter: useCallbackRef(onTriggerEnter),\n onTriggerLeave: useCallbackRef(onTriggerLeave),\n onContentEnter: useCallbackRef(onContentEnter),\n onContentLeave: useCallbackRef(onContentLeave),\n onItemSelect: useCallbackRef(onItemSelect),\n onItemDismiss: useCallbackRef(onItemDismiss),\n onViewportContentChange: React.useCallback((contentValue, contentData) => {\n setViewportContent((prevContent) => {\n prevContent.set(contentValue, contentData);\n return new Map(prevContent);\n });\n }, []),\n onViewportContentRemove: React.useCallback((contentValue) => {\n setViewportContent((prevContent) => {\n if (!prevContent.has(contentValue)) return prevContent;\n prevContent.delete(contentValue);\n return new Map(prevContent);\n });\n }, []),\n children: /* @__PURE__ */ jsx(Collection.Provider, { scope, children: /* @__PURE__ */ jsx(ViewportContentProvider, { scope, items: viewportContent, children }) })\n }\n );\n};\nvar LIST_NAME = \"NavigationMenuList\";\nvar NavigationMenuList = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeNavigationMenu, ...listProps } = props;\n const context = useNavigationMenuContext(LIST_NAME, __scopeNavigationMenu);\n const list = /* @__PURE__ */ jsx(Primitive.ul, { \"data-orientation\": context.orientation, ...listProps, ref: forwardedRef });\n return /* @__PURE__ */ jsx(Primitive.div, { style: { position: \"relative\" }, ref: context.onIndicatorTrackChange, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: __scopeNavigationMenu, children: context.isRootMenu ? /* @__PURE__ */ jsx(FocusGroup, { asChild: true, children: list }) : list }) });\n }\n);\nNavigationMenuList.displayName = LIST_NAME;\nvar ITEM_NAME = \"NavigationMenuItem\";\nvar [NavigationMenuItemContextProvider, useNavigationMenuItemContext] = createNavigationMenuContext(ITEM_NAME);\nvar NavigationMenuItem = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeNavigationMenu, value: valueProp, ...itemProps } = props;\n const autoValue = useId();\n const value = valueProp || autoValue || \"LEGACY_REACT_AUTO_VALUE\";\n const contentRef = React.useRef(null);\n const triggerRef = React.useRef(null);\n const focusProxyRef = React.useRef(null);\n const restoreContentTabOrderRef = React.useRef(() => {\n });\n const wasEscapeCloseRef = React.useRef(false);\n const handleContentEntry = React.useCallback((side = \"start\") => {\n if (contentRef.current) {\n restoreContentTabOrderRef.current();\n const candidates = getTabbableCandidates(contentRef.current);\n if (candidates.length) focusFirst(side === \"start\" ? candidates : candidates.reverse());\n }\n }, []);\n const handleContentExit = React.useCallback(() => {\n if (contentRef.current) {\n const candidates = getTabbableCandidates(contentRef.current);\n if (candidates.length) restoreContentTabOrderRef.current = removeFromTabOrder(candidates);\n }\n }, []);\n return /* @__PURE__ */ jsx(\n NavigationMenuItemContextProvider,\n {\n scope: __scopeNavigationMenu,\n value,\n triggerRef,\n contentRef,\n focusProxyRef,\n wasEscapeCloseRef,\n onEntryKeyDown: handleContentEntry,\n onFocusProxyEnter: handleContentEntry,\n onRootContentClose: handleContentExit,\n onContentFocusOutside: handleContentExit,\n children: /* @__PURE__ */ jsx(Primitive.li, { ...itemProps, ref: forwardedRef })\n }\n );\n }\n);\nNavigationMenuItem.displayName = ITEM_NAME;\nvar TRIGGER_NAME = \"NavigationMenuTrigger\";\nvar NavigationMenuTrigger = React.forwardRef((props, forwardedRef) => {\n const { __scopeNavigationMenu, disabled, ...triggerProps } = props;\n const context = useNavigationMenuContext(TRIGGER_NAME, props.__scopeNavigationMenu);\n const itemContext = useNavigationMenuItemContext(TRIGGER_NAME, props.__scopeNavigationMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(ref, itemContext.triggerRef, forwardedRef);\n const triggerId = makeTriggerId(context.baseId, itemContext.value);\n const contentId = makeContentId(context.baseId, itemContext.value);\n const hasPointerMoveOpenedRef = React.useRef(false);\n const wasClickCloseRef = React.useRef(false);\n const open = itemContext.value === context.value;\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(Collection.ItemSlot, { scope: __scopeNavigationMenu, value: itemContext.value, children: /* @__PURE__ */ jsx(FocusGroupItem, { asChild: true, children: /* @__PURE__ */ jsx(\n Primitive.button,\n {\n id: triggerId,\n disabled,\n \"data-disabled\": disabled ? \"\" : void 0,\n \"data-state\": getOpenState(open),\n \"aria-expanded\": open,\n \"aria-controls\": contentId,\n ...triggerProps,\n ref: composedRefs,\n onPointerEnter: composeEventHandlers(props.onPointerEnter, () => {\n wasClickCloseRef.current = false;\n itemContext.wasEscapeCloseRef.current = false;\n }),\n onPointerMove: composeEventHandlers(\n props.onPointerMove,\n whenMouse(() => {\n if (disabled || wasClickCloseRef.current || itemContext.wasEscapeCloseRef.current || hasPointerMoveOpenedRef.current)\n return;\n context.onTriggerEnter(itemContext.value);\n hasPointerMoveOpenedRef.current = true;\n })\n ),\n onPointerLeave: composeEventHandlers(\n props.onPointerLeave,\n whenMouse(() => {\n if (disabled) return;\n context.onTriggerLeave();\n hasPointerMoveOpenedRef.current = false;\n })\n ),\n onClick: composeEventHandlers(props.onClick, () => {\n context.onItemSelect(itemContext.value);\n wasClickCloseRef.current = open;\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const verticalEntryKey = context.dir === \"rtl\" ? \"ArrowLeft\" : \"ArrowRight\";\n const entryKey = { horizontal: \"ArrowDown\", vertical: verticalEntryKey }[context.orientation];\n if (open && event.key === entryKey) {\n itemContext.onEntryKeyDown();\n event.preventDefault();\n }\n })\n }\n ) }) }),\n open && /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n VisuallyHiddenPrimitive.Root,\n {\n \"aria-hidden\": true,\n tabIndex: 0,\n ref: itemContext.focusProxyRef,\n onFocus: (event) => {\n const content = itemContext.contentRef.current;\n const prevFocusedElement = event.relatedTarget;\n const wasTriggerFocused = prevFocusedElement === ref.current;\n const wasFocusFromContent = content?.contains(prevFocusedElement);\n if (wasTriggerFocused || !wasFocusFromContent) {\n itemContext.onFocusProxyEnter(wasTriggerFocused ? \"start\" : \"end\");\n }\n }\n }\n ),\n context.viewport && /* @__PURE__ */ jsx(\"span\", { \"aria-owns\": contentId })\n ] })\n ] });\n});\nNavigationMenuTrigger.displayName = TRIGGER_NAME;\nvar LINK_NAME = \"NavigationMenuLink\";\nvar LINK_SELECT = \"navigationMenu.linkSelect\";\nvar NavigationMenuLink = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeNavigationMenu, active, onSelect, ...linkProps } = props;\n return /* @__PURE__ */ jsx(FocusGroupItem, { asChild: true, children: /* @__PURE__ */ jsx(\n Primitive.a,\n {\n \"data-active\": active ? \"\" : void 0,\n \"aria-current\": active ? \"page\" : void 0,\n ...linkProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(\n props.onClick,\n (event) => {\n const target = event.target;\n const linkSelectEvent = new CustomEvent(LINK_SELECT, {\n bubbles: true,\n cancelable: true\n });\n target.addEventListener(LINK_SELECT, (event2) => onSelect?.(event2), { once: true });\n dispatchDiscreteCustomEvent(target, linkSelectEvent);\n if (!linkSelectEvent.defaultPrevented && !event.metaKey) {\n const rootContentDismissEvent = new CustomEvent(ROOT_CONTENT_DISMISS, {\n bubbles: true,\n cancelable: true\n });\n dispatchDiscreteCustomEvent(target, rootContentDismissEvent);\n }\n },\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nNavigationMenuLink.displayName = LINK_NAME;\nvar INDICATOR_NAME = \"NavigationMenuIndicator\";\nvar NavigationMenuIndicator = React.forwardRef((props, forwardedRef) => {\n const { forceMount, ...indicatorProps } = props;\n const context = useNavigationMenuContext(INDICATOR_NAME, props.__scopeNavigationMenu);\n const isVisible = Boolean(context.value);\n return context.indicatorTrack ? ReactDOM.createPortal(\n /* @__PURE__ */ jsx(Presence, { present: forceMount || isVisible, children: /* @__PURE__ */ jsx(NavigationMenuIndicatorImpl, { ...indicatorProps, ref: forwardedRef }) }),\n context.indicatorTrack\n ) : null;\n});\nNavigationMenuIndicator.displayName = INDICATOR_NAME;\nvar NavigationMenuIndicatorImpl = React.forwardRef((props, forwardedRef) => {\n const { __scopeNavigationMenu, ...indicatorProps } = props;\n const context = useNavigationMenuContext(INDICATOR_NAME, __scopeNavigationMenu);\n const getItems = useCollection(__scopeNavigationMenu);\n const [activeTrigger, setActiveTrigger] = React.useState(\n null\n );\n const [position, setPosition] = React.useState(null);\n const isHorizontal = context.orientation === \"horizontal\";\n const isVisible = Boolean(context.value);\n React.useEffect(() => {\n const items = getItems();\n const triggerNode = items.find((item) => item.value === context.value)?.ref.current;\n if (triggerNode) setActiveTrigger(triggerNode);\n }, [getItems, context.value]);\n const handlePositionChange = () => {\n if (activeTrigger) {\n setPosition({\n size: isHorizontal ? activeTrigger.offsetWidth : activeTrigger.offsetHeight,\n offset: isHorizontal ? activeTrigger.offsetLeft : activeTrigger.offsetTop\n });\n }\n };\n useResizeObserver(activeTrigger, handlePositionChange);\n useResizeObserver(context.indicatorTrack, handlePositionChange);\n return position ? /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"aria-hidden\": true,\n \"data-state\": isVisible ? \"visible\" : \"hidden\",\n \"data-orientation\": context.orientation,\n ...indicatorProps,\n ref: forwardedRef,\n style: {\n position: \"absolute\",\n ...isHorizontal ? {\n left: 0,\n width: position.size + \"px\",\n transform: `translateX(${position.offset}px)`\n } : {\n top: 0,\n height: position.size + \"px\",\n transform: `translateY(${position.offset}px)`\n },\n ...indicatorProps.style\n }\n }\n ) : null;\n});\nvar CONTENT_NAME = \"NavigationMenuContent\";\nvar NavigationMenuContent = React.forwardRef((props, forwardedRef) => {\n const { forceMount, ...contentProps } = props;\n const context = useNavigationMenuContext(CONTENT_NAME, props.__scopeNavigationMenu);\n const itemContext = useNavigationMenuItemContext(CONTENT_NAME, props.__scopeNavigationMenu);\n const composedRefs = useComposedRefs(itemContext.contentRef, forwardedRef);\n const open = itemContext.value === context.value;\n const commonProps = {\n value: itemContext.value,\n triggerRef: itemContext.triggerRef,\n focusProxyRef: itemContext.focusProxyRef,\n wasEscapeCloseRef: itemContext.wasEscapeCloseRef,\n onContentFocusOutside: itemContext.onContentFocusOutside,\n onRootContentClose: itemContext.onRootContentClose,\n ...contentProps\n };\n return !context.viewport ? /* @__PURE__ */ jsx(Presence, { present: forceMount || open, children: /* @__PURE__ */ jsx(\n NavigationMenuContentImpl,\n {\n \"data-state\": getOpenState(open),\n ...commonProps,\n ref: composedRefs,\n onPointerEnter: composeEventHandlers(props.onPointerEnter, context.onContentEnter),\n onPointerLeave: composeEventHandlers(\n props.onPointerLeave,\n whenMouse(context.onContentLeave)\n ),\n style: {\n // Prevent interaction when animating out\n pointerEvents: !open && context.isRootMenu ? \"none\" : void 0,\n ...commonProps.style\n }\n }\n ) }) : /* @__PURE__ */ jsx(ViewportContentMounter, { forceMount, ...commonProps, ref: composedRefs });\n});\nNavigationMenuContent.displayName = CONTENT_NAME;\nvar ViewportContentMounter = React.forwardRef((props, forwardedRef) => {\n const context = useNavigationMenuContext(CONTENT_NAME, props.__scopeNavigationMenu);\n const { onViewportContentChange, onViewportContentRemove } = context;\n useLayoutEffect(() => {\n onViewportContentChange(props.value, {\n ref: forwardedRef,\n ...props\n });\n }, [props, forwardedRef, onViewportContentChange]);\n useLayoutEffect(() => {\n return () => onViewportContentRemove(props.value);\n }, [props.value, onViewportContentRemove]);\n return null;\n});\nvar ROOT_CONTENT_DISMISS = \"navigationMenu.rootContentDismiss\";\nvar NavigationMenuContentImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeNavigationMenu,\n value,\n triggerRef,\n focusProxyRef,\n wasEscapeCloseRef,\n onRootContentClose,\n onContentFocusOutside,\n ...contentProps\n } = props;\n const context = useNavigationMenuContext(CONTENT_NAME, __scopeNavigationMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(ref, forwardedRef);\n const triggerId = makeTriggerId(context.baseId, value);\n const contentId = makeContentId(context.baseId, value);\n const getItems = useCollection(__scopeNavigationMenu);\n const prevMotionAttributeRef = React.useRef(null);\n const { onItemDismiss } = context;\n React.useEffect(() => {\n const content = ref.current;\n if (context.isRootMenu && content) {\n const handleClose = () => {\n onItemDismiss();\n onRootContentClose();\n if (content.contains(document.activeElement)) triggerRef.current?.focus();\n };\n content.addEventListener(ROOT_CONTENT_DISMISS, handleClose);\n return () => content.removeEventListener(ROOT_CONTENT_DISMISS, handleClose);\n }\n }, [context.isRootMenu, props.value, triggerRef, onItemDismiss, onRootContentClose]);\n const motionAttribute = React.useMemo(() => {\n const items = getItems();\n const values = items.map((item) => item.value);\n if (context.dir === \"rtl\") values.reverse();\n const index = values.indexOf(context.value);\n const prevIndex = values.indexOf(context.previousValue);\n const isSelected = value === context.value;\n const wasSelected = prevIndex === values.indexOf(value);\n if (!isSelected && !wasSelected) return prevMotionAttributeRef.current;\n const attribute = (() => {\n if (index !== prevIndex) {\n if (isSelected && prevIndex !== -1) return index > prevIndex ? \"from-end\" : \"from-start\";\n if (wasSelected && index !== -1) return index > prevIndex ? \"to-start\" : \"to-end\";\n }\n return null;\n })();\n prevMotionAttributeRef.current = attribute;\n return attribute;\n }, [context.previousValue, context.value, context.dir, getItems, value]);\n return /* @__PURE__ */ jsx(FocusGroup, { asChild: true, children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n id: contentId,\n \"aria-labelledby\": triggerId,\n \"data-motion\": motionAttribute,\n \"data-orientation\": context.orientation,\n ...contentProps,\n ref: composedRefs,\n disableOutsidePointerEvents: false,\n onDismiss: () => {\n const rootContentDismissEvent = new Event(ROOT_CONTENT_DISMISS, {\n bubbles: true,\n cancelable: true\n });\n ref.current?.dispatchEvent(rootContentDismissEvent);\n },\n onFocusOutside: composeEventHandlers(props.onFocusOutside, (event) => {\n onContentFocusOutside();\n const target = event.target;\n if (context.rootNavigationMenu?.contains(target)) event.preventDefault();\n }),\n onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {\n const target = event.target;\n const isTrigger = getItems().some((item) => item.ref.current?.contains(target));\n const isRootViewport = context.isRootMenu && context.viewport?.contains(target);\n if (isTrigger || isRootViewport || !context.isRootMenu) event.preventDefault();\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isMetaKey = event.altKey || event.ctrlKey || event.metaKey;\n const isTabKey = event.key === \"Tab\" && !isMetaKey;\n if (isTabKey) {\n const candidates = getTabbableCandidates(event.currentTarget);\n const focusedElement = document.activeElement;\n const index = candidates.findIndex((candidate) => candidate === focusedElement);\n const isMovingBackwards = event.shiftKey;\n const nextCandidates = isMovingBackwards ? candidates.slice(0, index).reverse() : candidates.slice(index + 1, candidates.length);\n if (focusFirst(nextCandidates)) {\n event.preventDefault();\n } else {\n focusProxyRef.current?.focus();\n }\n }\n }),\n onEscapeKeyDown: composeEventHandlers(props.onEscapeKeyDown, (event) => {\n wasEscapeCloseRef.current = true;\n })\n }\n ) });\n});\nvar VIEWPORT_NAME = \"NavigationMenuViewport\";\nvar NavigationMenuViewport = React.forwardRef((props, forwardedRef) => {\n const { forceMount, ...viewportProps } = props;\n const context = useNavigationMenuContext(VIEWPORT_NAME, props.__scopeNavigationMenu);\n const open = Boolean(context.value);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || open, children: /* @__PURE__ */ jsx(NavigationMenuViewportImpl, { ...viewportProps, ref: forwardedRef }) });\n});\nNavigationMenuViewport.displayName = VIEWPORT_NAME;\nvar NavigationMenuViewportImpl = React.forwardRef((props, forwardedRef) => {\n const { __scopeNavigationMenu, children, ...viewportImplProps } = props;\n const context = useNavigationMenuContext(VIEWPORT_NAME, __scopeNavigationMenu);\n const composedRefs = useComposedRefs(forwardedRef, context.onViewportChange);\n const viewportContentContext = useViewportContentContext(\n CONTENT_NAME,\n props.__scopeNavigationMenu\n );\n const [size, setSize] = React.useState(null);\n const [content, setContent] = React.useState(null);\n const viewportWidth = size ? size?.width + \"px\" : void 0;\n const viewportHeight = size ? size?.height + \"px\" : void 0;\n const open = Boolean(context.value);\n const activeContentValue = open ? context.value : context.previousValue;\n const handleSizeChange = () => {\n if (content) setSize({ width: content.offsetWidth, height: content.offsetHeight });\n };\n useResizeObserver(content, handleSizeChange);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getOpenState(open),\n \"data-orientation\": context.orientation,\n ...viewportImplProps,\n ref: composedRefs,\n style: {\n // Prevent interaction when animating out\n pointerEvents: !open && context.isRootMenu ? \"none\" : void 0,\n [\"--radix-navigation-menu-viewport-width\"]: viewportWidth,\n [\"--radix-navigation-menu-viewport-height\"]: viewportHeight,\n ...viewportImplProps.style\n },\n onPointerEnter: composeEventHandlers(props.onPointerEnter, context.onContentEnter),\n onPointerLeave: composeEventHandlers(props.onPointerLeave, whenMouse(context.onContentLeave)),\n children: Array.from(viewportContentContext.items).map(([value, { ref, forceMount, ...props2 }]) => {\n const isActive = activeContentValue === value;\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || isActive, children: /* @__PURE__ */ jsx(\n NavigationMenuContentImpl,\n {\n ...props2,\n ref: composeRefs(ref, (node) => {\n if (isActive && node) setContent(node);\n })\n }\n ) }, value);\n })\n }\n );\n});\nvar FOCUS_GROUP_NAME = \"FocusGroup\";\nvar FocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeNavigationMenu, ...groupProps } = props;\n const context = useNavigationMenuContext(FOCUS_GROUP_NAME, __scopeNavigationMenu);\n return /* @__PURE__ */ jsx(FocusGroupCollection.Provider, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(FocusGroupCollection.Slot, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(Primitive.div, { dir: context.dir, ...groupProps, ref: forwardedRef }) }) });\n }\n);\nvar ARROW_KEYS = [\"ArrowRight\", \"ArrowLeft\", \"ArrowUp\", \"ArrowDown\"];\nvar FOCUS_GROUP_ITEM_NAME = \"FocusGroupItem\";\nvar FocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeNavigationMenu, ...groupProps } = props;\n const getItems = useFocusGroupCollection(__scopeNavigationMenu);\n const context = useNavigationMenuContext(FOCUS_GROUP_ITEM_NAME, __scopeNavigationMenu);\n return /* @__PURE__ */ jsx(FocusGroupCollection.ItemSlot, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(\n Primitive.button,\n {\n ...groupProps,\n ref: forwardedRef,\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isFocusNavigationKey = [\"Home\", \"End\", ...ARROW_KEYS].includes(event.key);\n if (isFocusNavigationKey) {\n let candidateNodes = getItems().map((item) => item.ref.current);\n const prevItemKey = context.dir === \"rtl\" ? \"ArrowRight\" : \"ArrowLeft\";\n const prevKeys = [prevItemKey, \"ArrowUp\", \"End\"];\n if (prevKeys.includes(event.key)) candidateNodes.reverse();\n if (ARROW_KEYS.includes(event.key)) {\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n event.preventDefault();\n }\n })\n }\n ) });\n }\n);\nfunction getTabbableCandidates(container) {\n const nodes = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node) => {\n const isHiddenInput = node.tagName === \"INPUT\" && node.type === \"hidden\";\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n while (walker.nextNode()) nodes.push(walker.currentNode);\n return nodes;\n}\nfunction focusFirst(candidates) {\n const previouslyFocusedElement = document.activeElement;\n return candidates.some((candidate) => {\n if (candidate === previouslyFocusedElement) return true;\n candidate.focus();\n return document.activeElement !== previouslyFocusedElement;\n });\n}\nfunction removeFromTabOrder(candidates) {\n candidates.forEach((candidate) => {\n candidate.dataset.tabindex = candidate.getAttribute(\"tabindex\") || \"\";\n candidate.setAttribute(\"tabindex\", \"-1\");\n });\n return () => {\n candidates.forEach((candidate) => {\n const prevTabIndex = candidate.dataset.tabindex;\n candidate.setAttribute(\"tabindex\", prevTabIndex);\n });\n };\n}\nfunction useResizeObserver(element, onResize) {\n const handleResize = useCallbackRef(onResize);\n useLayoutEffect(() => {\n let rAF = 0;\n if (element) {\n const resizeObserver = new ResizeObserver(() => {\n cancelAnimationFrame(rAF);\n rAF = window.requestAnimationFrame(handleResize);\n });\n resizeObserver.observe(element);\n return () => {\n window.cancelAnimationFrame(rAF);\n resizeObserver.unobserve(element);\n };\n }\n }, [element, handleResize]);\n}\nfunction getOpenState(open) {\n return open ? \"open\" : \"closed\";\n}\nfunction makeTriggerId(baseId, value) {\n return `${baseId}-trigger-${value}`;\n}\nfunction makeContentId(baseId, value) {\n return `${baseId}-content-${value}`;\n}\nfunction whenMouse(handler) {\n return (event) => event.pointerType === \"mouse\" ? handler(event) : void 0;\n}\nvar Root2 = NavigationMenu;\nvar Sub = NavigationMenuSub;\nvar List = NavigationMenuList;\nvar Item = NavigationMenuItem;\nvar Trigger = NavigationMenuTrigger;\nvar Link = NavigationMenuLink;\nvar Indicator = NavigationMenuIndicator;\nvar Content = NavigationMenuContent;\nvar Viewport = NavigationMenuViewport;\nexport {\n Content,\n Indicator,\n Item,\n Link,\n List,\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuIndicator,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuSub,\n NavigationMenuTrigger,\n NavigationMenuViewport,\n Root2 as Root,\n Sub,\n Trigger,\n Viewport,\n createNavigationMenuScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["NAVIGATION_MENU_NAME","Collection","useCollection","createCollectionScope","createCollection","FocusGroupCollection","useFocusGroupCollection","createFocusGroupCollectionScope","createNavigationMenuContext","createNavigationMenuScope","createContextScope","NavigationMenuProviderImpl","useNavigationMenuContext","ViewportContentProvider","useViewportContentContext","NavigationMenu","React","forwardRef","props","forwardedRef","__scopeNavigationMenu","value","valueProp","onValueChange","defaultValue","delayDuration","skipDelayDuration","orientation","dir","NavigationMenuProps","navigationMenu","setNavigationMenu","useState","composedRef","useComposedRefs","node","direction","useDirection","openTimerRef","useRef","closeTimerRef","skipDelayTimerRef","isOpenDelayed","setIsOpenDelayed","setValue","useControllableState","prop","onChange","value2","hasSkipDelayDuration","window","clearTimeout","current","setTimeout","defaultProp","startCloseTimer","useCallback","handleOpen","itemValue","handleDelayedOpen","useEffect","jsx","NavigationMenuProvider","scope","isRootMenu","rootNavigationMenu","onTriggerEnter","onTriggerLeave","onContentEnter","onContentLeave","onItemSelect","prevValue","onItemDismiss","children","Primitive","nav","ref","displayName","SUB_NAME","NavigationMenuSub","subProps","context","div","viewport","setViewport","viewportContent","setViewportContent","Map","indicatorTrack","setIndicatorTrack","previousValue","usePrevious","baseId","useId","onViewportChange","onIndicatorTrackChange","useCallbackRef","onViewportContentChange","contentValue","contentData","prevContent","set","onViewportContentRemove","has","delete","Provider","items","LIST_NAME","NavigationMenuList","listProps","list","ul","style","position","Slot","FocusGroup","asChild","ITEM_NAME","NavigationMenuItemContextProvider","useNavigationMenuItemContext","NavigationMenuItem","itemProps","autoValue","contentRef","triggerRef","focusProxyRef","restoreContentTabOrderRef","wasEscapeCloseRef","handleContentEntry","side","candidates","getTabbableCandidates","length","focusFirst","reverse","handleContentExit","forEach","candidate","dataset","tabindex","getAttribute","setAttribute","prevTabIndex","removeFromTabOrder","onEntryKeyDown","onFocusProxyEnter","onRootContentClose","onContentFocusOutside","li","TRIGGER_NAME","NavigationMenuTrigger","disabled","triggerProps","itemContext","composedRefs","triggerId","makeTriggerId","contentId","makeContentId","hasPointerMoveOpenedRef","wasClickCloseRef","open","jsxs","Fragment","ItemSlot","FocusGroupItem","button","id","getOpenState","onPointerEnter","composeEventHandlers","onPointerMove","whenMouse","onPointerLeave","onClick","onKeyDown","event","entryKey","horizontal","vertical","key","preventDefault","VisuallyHiddenPrimitive.Root","tabIndex","onFocus","content","prevFocusedElement","relatedTarget","wasTriggerFocused","wasFocusFromContent","contains","LINK_SELECT","NavigationMenuLink","active","onSelect","linkProps","a","target","linkSelectEvent","CustomEvent","bubbles","cancelable","addEventListener","event2","once","dispatchDiscreteCustomEvent","defaultPrevented","metaKey","rootContentDismissEvent","ROOT_CONTENT_DISMISS","checkForDefaultPrevented","INDICATOR_NAME","NavigationMenuIndicator","forceMount","indicatorProps","isVisible","Boolean","ReactDOM","createPortal","Presence","present","NavigationMenuIndicatorImpl","getItems","activeTrigger","setActiveTrigger","setPosition","isHorizontal","triggerNode","find","item","handlePositionChange","size","offsetWidth","offsetHeight","offset","offsetLeft","offsetTop","useResizeObserver","left","width","transform","top","height","CONTENT_NAME","NavigationMenuContent","contentProps","commonProps","ViewportContentMounter","NavigationMenuContentImpl","pointerEvents","useLayoutEffect","prevMotionAttributeRef","handleClose","document","activeElement","focus","removeEventListener","motionAttribute","useMemo","values","map","index","indexOf","prevIndex","isSelected","wasSelected","attribute","DismissableLayer","disableOutsidePointerEvents","onDismiss","Event","dispatchEvent","onFocusOutside","onPointerDownOutside","isTrigger","some","isRootViewport","isMetaKey","altKey","ctrlKey","currentTarget","focusedElement","findIndex","shiftKey","slice","onEscapeKeyDown","VIEWPORT_NAME","NavigationMenuViewport","viewportProps","NavigationMenuViewportImpl","viewportImplProps","viewportContentContext","setSize","setContent","viewportWidth","viewportHeight","activeContentValue","Array","from","props2","isActive","composeRefs","groupProps","ARROW_KEYS","includes","candidateNodes","currentIndex","container","nodes","walker","createTreeWalker","NodeFilter","SHOW_ELEMENT","acceptNode","isHiddenInput","tagName","type","hidden","FILTER_SKIP","FILTER_ACCEPT","nextNode","push","currentNode","previouslyFocusedElement","element","onResize","handleResize","rAF","resizeObserver","ResizeObserver","cancelAnimationFrame","requestAnimationFrame","observe","unobserve","handler","pointerType","Root2","List","Item","Trigger","Link","Indicator","Content","Viewport"],"mappings":"2oCAoBA,IAAIA,EAAuB,kBACtBC,EAAYC,EAAeC,GAAyBC,EAAiBJ,IACrEK,EAAsBC,EAAyBC,GAAmCH,EAAiBJ,IACnGQ,EAA6BC,GAA6BC,EAC7DV,EACA,CAACG,EAAuBI,KAErBI,EAA4BC,GAA4BJ,EAA4BR,IACpFa,EAAyBC,GAA6BN,EAA4BR,GACnFe,EAAiBC,EAAMC,YACzB,CAACC,EAAOC,KACN,MAAMC,sBACJA,EACAC,MAAOC,EAASC,cAChBA,EAAaC,aACbA,EAAYC,cACZA,EAAgB,IAAGC,kBACnBA,EAAoB,IAAGC,YACvBA,EAAc,aAAYC,IAC1BA,KACGC,GACDX,GACGY,EAAgBC,GAAqBf,EAAMgB,SAAS,MACrDC,EAAcC,EAAgBf,GAAegB,GAASJ,EAAkBI,KACxEC,EAAYC,EAAaT,GACzBU,EAAetB,EAAMuB,OAAO,GAC5BC,EAAgBxB,EAAMuB,OAAO,GAC7BE,EAAoBzB,EAAMuB,OAAO,IAChCG,EAAeC,GAAoB3B,EAAMgB,UAAS,IAClDX,EAAQ,GAAIuB,GAAYC,EAAqB,CAClDC,KAAMxB,EACNyB,SAAWC,IACT,MACMC,EAAuBvB,EAAoB,EADvB,KAAXsB,GAGbE,OAAOC,aAAaV,EAAkBW,SAClCH,GAAsBN,GAAiB,KAE3CO,OAAOC,aAAaV,EAAkBW,SACtCX,EAAkBW,QAAUF,OAAOG,YACjC,IAAMV,GAAiB,IACvBjB,IAGJH,IAAgByB,EAAO,EAEzBM,YAAa9B,IAET+B,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GAAUkK,GACjB,OAAQ9J,GAAgC,UAAtBA,EAAM+J,YAA0BD,EAAQ9J,QAAS,CACrE,CACG,IAACgK,GAAQjU,EAERkU,GAAOrO,EACPsO,GAAO1N,EACP2N,GAAU7L,EACV8L,GAAOpJ,EACPqJ,GAAYjI,EACZkI,GAAUlG,EACVmG,GAAWxD"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import*as e from"react";import{useFloating as t,arrow as
|
1
|
+
import*as e from"react";import{useFloating as t,autoUpdate as r,offset as o,shift as i,limitShift as a,flip as n,size as s,arrow as d,hide as l}from"@floating-ui/react-dom";import{Root as p}from"../../react-arrow/dist/index.mjs";import{useComposedRefs as c}from"../../react-compose-refs/dist/index.mjs";import{createContextScope as m}from"../node_modules/@radix-ui/react-context/dist/index.mjs";import{Primitive as f}from"../../react-primitive/dist/index.mjs";import{useCallbackRef as h}from"../../react-use-callback-ref/dist/index.mjs";import{useLayoutEffect as g}from"../../react-use-layout-effect/dist/index.mjs";import{useSize as u}from"../../react-use-size/dist/index.mjs";import{jsx as x}from"react/jsx-runtime";var y="Popper",[w,v]=m(y),[b,P]=w(y),A=t=>{const{__scopePopper:r,children:o}=t,[i,a]=e.useState(null);return x(b,{scope:r,anchor:i,onAnchorChange:a,children:o})};A.displayName=y;var S="PopperAnchor",$=e.forwardRef(((t,r)=>{const{__scopePopper:o,virtualRef:i,...a}=t,n=P(S,o),s=e.useRef(null),d=c(r,s);return e.useEffect((()=>{n.onAnchorChange(i?.current||s.current)})),i?null:x(f.div,{...a,ref:d})}));$.displayName=S;var j="PopperContent",[_,O]=w(j),C=e.forwardRef(((p,m)=>{const{__scopePopper:y,side:w="bottom",sideOffset:v=0,align:b="center",alignOffset:A=0,arrowPadding:S=0,avoidCollisions:$=!0,collisionBoundary:O=[],collisionPadding:C=0,sticky:H="partial",hideWhenDetached:R=!1,updatePositionStrategy:W="optimized",onPlaced:N,...X}=p,k=P(j,y),[D,B]=e.useState(null),F=c(m,(e=>B(e))),[I,L]=e.useState(null),M=u(I),q=M?.width??0,G=M?.height??0,J=w+("center"!==b?"-"+b:""),K="number"==typeof C?C:{top:0,right:0,bottom:0,left:0,...C},Q=Array.isArray(O)?O:[O],T=Q.length>0,U={padding:K,boundary:Q.filter(Y),altBoundary:T},{refs:V,floatingStyles:Z,placement:ee,isPositioned:te,middlewareData:re}=t({strategy:"fixed",placement:J,whileElementsMounted:(...e)=>r(...e,{animationFrame:"always"===W}),elements:{reference:k.anchor},middleware:[o({mainAxis:v+G,alignmentAxis:A}),$&&i({mainAxis:!0,crossAxis:!1,limiter:"partial"===H?a():void 0,...U}),$&&n({...U}),s({...U,apply:({elements:e,rects:t,availableWidth:r,availableHeight:o})=>{const{width:i,height:a}=t.reference,n=e.floating.style;n.setProperty("--radix-popper-available-width",`${r}px`),n.setProperty("--radix-popper-available-height",`${o}px`),n.setProperty("--radix-popper-anchor-width",`${i}px`),n.setProperty("--radix-popper-anchor-height",`${a}px`)}}),I&&d({element:I,padding:S}),z({arrowWidth:q,arrowHeight:G}),R&&l({strategy:"referenceHidden",...U})]}),[oe,ie]=E(ee),ae=h(N);g((()=>{te&&ae?.()}),[te,ae]);const ne=re.arrow?.x,se=re.arrow?.y,de=0!==re.arrow?.centerOffset,[le,pe]=e.useState();return g((()=>{D&&pe(window.getComputedStyle(D).zIndex)}),[D]),x("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:{...Z,transform:te?Z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:le,"--radix-popper-transform-origin":[re.transformOrigin?.x,re.transformOrigin?.y].join(" "),...re.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:p.dir,children:x(_,{scope:y,placedSide:oe,onArrowChange:L,arrowX:ne,arrowY:se,shouldHideArrow:de,children:x(f.div,{"data-side":oe,"data-align":ie,...X,ref:F,style:{...X.style,animation:te?void 0:"none"}})})})}));C.displayName=j;var H="PopperArrow",R={top:"bottom",right:"left",bottom:"top",left:"right"},W=e.forwardRef((function(e,t){const{__scopePopper:r,...o}=e,i=O(H,r),a=R[i.placedSide];return x("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:x(p,{...o,ref:t,style:{...o.style,display:"block"}})})}));function Y(e){return null!==e}W.displayName=H;var z=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:o,middlewareData:i}=t,a=0!==i.arrow?.centerOffset,n=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[d,l]=E(r),p={start:"0%",center:"50%",end:"100%"}[l],c=(i.arrow?.x??0)+n/2,m=(i.arrow?.y??0)+s/2;let f="",h="";return"bottom"===d?(f=a?p:`${c}px`,h=-s+"px"):"top"===d?(f=a?p:`${c}px`,h=`${o.floating.height+s}px`):"right"===d?(f=-s+"px",h=a?p:`${m}px`):"left"===d&&(f=`${o.floating.width+s}px`,h=a?p:`${m}px`),{data:{x:f,y:h}}}});function E(e){const[t,r="center"]=e.split("-");return[t,r]}var N=A,X=$,k=C,D=W;export{X as Anchor,D as Arrow,k as Content,A as Popper,$ as PopperAnchor,W as PopperArrow,C as PopperContent,N as Root,v as createPopperScope};
|
2
2
|
//# sourceMappingURL=index.mjs.map
|