@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,2 +1,2 @@
|
|
1
|
-
import*as e from"react";import{Primitive as t}from"../../react-primitive/dist/index.mjs";import{
|
1
|
+
import*as e from"react";import{Primitive as t}from"../../react-primitive/dist/index.mjs";import{jsx as r}from"react/jsx-runtime";var a=e.forwardRef(((e,a)=>r(t.label,{...e,ref:a,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})));a.displayName="Label";var o=a;export{a as Label,o as Root};
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../node_modules/@radix-ui/react-label/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/label/src/Label.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Label\";\nvar Label = React.forwardRef((props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.label,\n {\n ...props,\n ref: forwardedRef,\n onMouseDown: (event) => {\n const target = event.target;\n if (target.closest(\"button, input, select, textarea\")) return;\n props.onMouseDown?.(event);\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault();\n }\n }\n );\n});\nLabel.displayName = NAME;\nvar Root = Label;\nexport {\n Label,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["Label","React","forwardRef","props","forwardedRef","jsx","Primitive","label","ref","onMouseDown","event","target","closest","defaultPrevented","detail","preventDefault","displayName","Root"],"mappings":"
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../node_modules/@radix-ui/react-label/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/label/src/Label.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Label\";\nvar Label = React.forwardRef((props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.label,\n {\n ...props,\n ref: forwardedRef,\n onMouseDown: (event) => {\n const target = event.target;\n if (target.closest(\"button, input, select, textarea\")) return;\n props.onMouseDown?.(event);\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault();\n }\n }\n );\n});\nLabel.displayName = NAME;\nvar Root = Label;\nexport {\n Label,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["Label","React","forwardRef","props","forwardedRef","jsx","Primitive","label","ref","onMouseDown","event","target","closest","defaultPrevented","detail","preventDefault","displayName","Root"],"mappings":"iIAMA,IACIA,EAAQC,EAAMC,YAAW,CAACC,EAAOC,IACZC,EACrBC,EAAUC,MACV,IACKJ,EACHK,IAAKJ,EACLK,YAAcC,IACGA,EAAMC,OACVC,QAAQ,qCACnBT,EAAMM,cAAcC,IACfA,EAAMG,kBAAoBH,EAAMI,OAAS,GAAGJ,EAAMK,iBAAgB,MAK/Ef,EAAMgB,YAhBK,QAiBR,IAACC,EAAOjB"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import*as e from"react";import{composeEventHandlers as n}from"../../primitive/dist/index.mjs";import{createCollection as t}from"../../react-collection/dist/index.mjs";import{useComposedRefs as r,composeRefs as o}from"../../react-compose-refs/dist/index.mjs";import{createContextScope as s}from"../../react-context/dist/index.mjs";import{useDirection as c}from"../../react-direction/dist/index.mjs";import{DismissableLayer as a}from"../../react-dismissable-layer/dist/index.mjs";import{useFocusGuards as i}from"../../react-focus-guards/dist/index.mjs";import{FocusScope as u}from"../../react-focus-scope/dist/index.mjs";import{useId as d}from"../../react-id/dist/index.mjs";import{createPopperScope as l,Anchor as f,Content as p,Arrow as m,Root as h}from"../../react-popper/dist/index.mjs";import{Portal as v}from"../../react-portal/dist/index.mjs";import{Presence as g}from"../../react-presence/dist/index.mjs";import{Primitive as x,dispatchDiscreteCustomEvent as _}from"../../react-primitive/dist/index.mjs";import{createRovingFocusGroupScope as w,Root as M,Item as y}from"../../react-roving-focus/dist/index.mjs";import{Slot as j}from"../../react-slot/dist/index.mjs";import{useCallbackRef as C}from"../../react-use-callback-ref/dist/index.mjs";import{hideOthers as b}from"aria-hidden";import{RemoveScroll as R}from"react-remove-scroll";import{j as k}from"../../../../_virtual/jsx-runtime.mjs";var P=["Enter"," "],D=["ArrowUp","PageDown","End"],E=["ArrowDown","PageUp","Home",...D],O={ltr:[...P,"ArrowRight"],rtl:[...P,"ArrowLeft"]},I={ltr:["ArrowLeft"],rtl:["ArrowRight"]},T="Menu",[S,F,L]=t(T),[K,A]=s(T,[L,l,w]),N=l(),G=w(),[V,U]=K(T),[B,X]=K(T),Y=n=>{const{__scopeMenu:t,open:r=!1,children:o,dir:s,onOpenChange:a,modal:i=!0}=n,u=N(t),[d,l]=e.useState(null),f=e.useRef(!1),p=C(a),m=c(s);return e.useEffect((()=>{const e=()=>{f.current=!0,document.addEventListener("pointerdown",n,{capture:!0,once:!0}),document.addEventListener("pointermove",n,{capture:!0,once:!0})},n=()=>f.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",n,{capture:!0}),document.removeEventListener("pointermove",n,{capture:!0})}}),[]),k.jsx(h,{...u,children:k.jsx(V,{scope:t,open:r,onOpenChange:p,content:d,onContentChange:l,children:k.jsx(B,{scope:t,onClose:e.useCallback((()=>p(!1)),[p]),isUsingKeyboardRef:f,dir:m,modal:i,children:o})})})};Y.displayName=T;var z=e.forwardRef(((e,n)=>{const{__scopeMenu:t,...r}=e,o=N(t);return k.jsx(f,{...o,...r,ref:n})}));z.displayName="MenuAnchor";var H="MenuPortal",[W,Z]=K(H,{forceMount:void 0}),q=e=>{const{__scopeMenu:n,forceMount:t,children:r,container:o}=e,s=U(H,n);return k.jsx(W,{scope:n,forceMount:t,children:k.jsx(g,{present:t||s.open,children:k.jsx(v,{asChild:!0,container:o,children:r})})})};q.displayName=H;var J="MenuContent",[Q,$]=K(J),ee=e.forwardRef(((e,n)=>{const t=Z(J,e.__scopeMenu),{forceMount:r=t.forceMount,...o}=e,s=U(J,e.__scopeMenu),c=X(J,e.__scopeMenu);return k.jsx(S.Provider,{scope:e.__scopeMenu,children:k.jsx(g,{present:r||s.open,children:k.jsx(S.Slot,{scope:e.__scopeMenu,children:c.modal?k.jsx(ne,{...o,ref:n}):k.jsx(te,{...o,ref:n})})})})})),ne=e.forwardRef(((t,o)=>{const s=U(J,t.__scopeMenu),c=e.useRef(null),a=r(o,c);return e.useEffect((()=>{const e=c.current;if(e)return b(e)}),[]),k.jsx(re,{...t,ref:a,trapFocus:s.open,disableOutsidePointerEvents:s.open,disableOutsideScroll:!0,onFocusOutside:n(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>s.onOpenChange(!1)})})),te=e.forwardRef(((e,n)=>{const t=U(J,e.__scopeMenu);return k.jsx(re,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>t.onOpenChange(!1)})})),re=e.forwardRef(((t,o)=>{const{__scopeMenu:s,loop:c=!1,trapFocus:d,onOpenAutoFocus:l,onCloseAutoFocus:f,disableOutsidePointerEvents:m,onEntryFocus:h,onEscapeKeyDown:v,onPointerDownOutside:g,onFocusOutside:x,onInteractOutside:_,onDismiss:w,disableOutsideScroll:y,...C}=t,b=U(J,s),P=X(J,s),O=N(s),I=G(s),T=F(s),[S,L]=e.useState(null),K=e.useRef(null),A=r(o,K,b.onContentChange),V=e.useRef(0),B=e.useRef(""),Y=e.useRef(0),z=e.useRef(null),H=e.useRef("right"),W=e.useRef(0),Z=y?R:e.Fragment,q=y?{as:j,allowPinchZoom:!0}:void 0,$=e=>{const n=B.current+e,t=T().filter((e=>!e.disabled)),r=document.activeElement,o=t.find((e=>e.ref.current===r))?.textValue,s=function(e,n,t){const r=n.length>1&&Array.from(n).every((e=>e===n[0])),o=r?n[0]:n,s=t?e.indexOf(t):-1;let c=(a=e,i=Math.max(s,0),a.map(((e,n)=>a[(i+n)%a.length])));var a,i;1===o.length&&(c=c.filter((e=>e!==t)));const u=c.find((e=>e.toLowerCase().startsWith(o.toLowerCase())));return u!==t?u:void 0}(t.map((e=>e.textValue)),n,o),c=t.find((e=>e.textValue===s))?.ref.current;!function e(n){B.current=n,window.clearTimeout(V.current),""!==n&&(V.current=window.setTimeout((()=>e("")),1e3))}(n),c&&setTimeout((()=>c.focus()))};e.useEffect((()=>()=>window.clearTimeout(V.current)),[]),i();const ee=e.useCallback((e=>H.current===z.current?.side&&function(e,n){if(!n)return!1;const t={x:e.clientX,y:e.clientY};return function(e,n){const{x:t,y:r}=e;let o=!1;for(let e=0,s=n.length-1;e<n.length;s=e++){const c=n[e].x,a=n[e].y,i=n[s].x,u=n[s].y;a>r!=u>r&&t<(i-c)*(r-a)/(u-a)+c&&(o=!o)}return o}(t,n)}(e,z.current?.area)),[]);return k.jsx(Q,{scope:s,searchRef:B,onItemEnter:e.useCallback((e=>{ee(e)&&e.preventDefault()}),[ee]),onItemLeave:e.useCallback((e=>{ee(e)||(K.current?.focus(),L(null))}),[ee]),onTriggerLeave:e.useCallback((e=>{ee(e)&&e.preventDefault()}),[ee]),pointerGraceTimerRef:Y,onPointerGraceIntentChange:e.useCallback((e=>{z.current=e}),[]),children:k.jsx(Z,{...q,children:k.jsx(u,{asChild:!0,trapped:d,onMountAutoFocus:n(l,(e=>{e.preventDefault(),K.current?.focus({preventScroll:!0})})),onUnmountAutoFocus:f,children:k.jsx(a,{asChild:!0,disableOutsidePointerEvents:m,onEscapeKeyDown:v,onPointerDownOutside:g,onFocusOutside:x,onInteractOutside:_,onDismiss:w,children:k.jsx(M,{asChild:!0,...I,dir:P.dir,orientation:"vertical",loop:c,currentTabStopId:S,onCurrentTabStopIdChange:L,onEntryFocus:n(h,(e=>{P.isUsingKeyboardRef.current||e.preventDefault()})),preventScrollOnEntryFocus:!0,children:k.jsx(p,{role:"menu","aria-orientation":"vertical","data-state":Oe(b.open),"data-radix-menu-content":"",dir:P.dir,...O,...C,ref:A,style:{outline:"none",...C.style},onKeyDown:n(C.onKeyDown,(e=>{const n=e.target.closest("[data-radix-menu-content]")===e.currentTarget,t=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;n&&("Tab"===e.key&&e.preventDefault(),!t&&r&&$(e.key));const o=K.current;if(e.target!==o)return;if(!E.includes(e.key))return;e.preventDefault();const s=T().filter((e=>!e.disabled)).map((e=>e.ref.current));D.includes(e.key)&&s.reverse(),function(e){const n=document.activeElement;for(const t of e){if(t===n)return;if(t.focus(),document.activeElement!==n)return}}(s)})),onBlur:n(t.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(V.current),B.current="")})),onPointerMove:n(t.onPointerMove,Se((e=>{const n=e.target,t=W.current!==e.clientX;if(e.currentTarget.contains(n)&&t){const n=e.clientX>W.current?"right":"left";H.current=n,W.current=e.clientX}})))})})})})})})}));ee.displayName=J;var oe=e.forwardRef(((e,n)=>{const{__scopeMenu:t,...r}=e;return k.jsx(x.div,{role:"group",...r,ref:n})}));oe.displayName="MenuGroup";var se=e.forwardRef(((e,n)=>{const{__scopeMenu:t,...r}=e;return k.jsx(x.div,{...r,ref:n})}));se.displayName="MenuLabel";var ce="MenuItem",ae="menu.itemSelect",ie=e.forwardRef(((t,o)=>{const{disabled:s=!1,onSelect:c,...a}=t,i=e.useRef(null),u=X(ce,t.__scopeMenu),d=$(ce,t.__scopeMenu),l=r(o,i),f=e.useRef(!1);return k.jsx(ue,{...a,ref:l,disabled:s,onClick:n(t.onClick,(()=>{const e=i.current;if(!s&&e){const n=new CustomEvent(ae,{bubbles:!0,cancelable:!0});e.addEventListener(ae,(e=>c?.(e)),{once:!0}),_(e,n),n.defaultPrevented?f.current=!1:u.onClose()}})),onPointerDown:e=>{t.onPointerDown?.(e),f.current=!0},onPointerUp:n(t.onPointerUp,(e=>{f.current||e.currentTarget?.click()})),onKeyDown:n(t.onKeyDown,(e=>{const n=""!==d.searchRef.current;s||n&&" "===e.key||P.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))})}));ie.displayName=ce;var ue=e.forwardRef(((t,o)=>{const{__scopeMenu:s,disabled:c=!1,textValue:a,...i}=t,u=$(ce,s),d=G(s),l=e.useRef(null),f=r(o,l),[p,m]=e.useState(!1),[h,v]=e.useState("");return e.useEffect((()=>{const e=l.current;e&&v((e.textContent??"").trim())}),[i.children]),k.jsx(S.ItemSlot,{scope:s,disabled:c,textValue:a??h,children:k.jsx(y,{asChild:!0,...d,focusable:!c,children:k.jsx(x.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":c||void 0,"data-disabled":c?"":void 0,...i,ref:f,onPointerMove:n(t.onPointerMove,Se((e=>{if(c)u.onItemLeave(e);else if(u.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}}))),onPointerLeave:n(t.onPointerLeave,Se((e=>u.onItemLeave(e)))),onFocus:n(t.onFocus,(()=>m(!0))),onBlur:n(t.onBlur,(()=>m(!1)))})})})})),de=e.forwardRef(((e,t)=>{const{checked:r=!1,onCheckedChange:o,...s}=e;return k.jsx(xe,{scope:e.__scopeMenu,checked:r,children:k.jsx(ie,{role:"menuitemcheckbox","aria-checked":Ie(r)?"mixed":r,...s,ref:t,"data-state":Te(r),onSelect:n(s.onSelect,(()=>o?.(!!Ie(r)||!r)),{checkForDefaultPrevented:!1})})})}));de.displayName="MenuCheckboxItem";var le="MenuRadioGroup",[fe,pe]=K(le,{value:void 0,onValueChange:()=>{}}),me=e.forwardRef(((e,n)=>{const{value:t,onValueChange:r,...o}=e,s=C(r);return k.jsx(fe,{scope:e.__scopeMenu,value:t,onValueChange:s,children:k.jsx(oe,{...o,ref:n})})}));me.displayName=le;var he="MenuRadioItem",ve=e.forwardRef(((e,t)=>{const{value:r,...o}=e,s=pe(he,e.__scopeMenu),c=r===s.value;return k.jsx(xe,{scope:e.__scopeMenu,checked:c,children:k.jsx(ie,{role:"menuitemradio","aria-checked":c,...o,ref:t,"data-state":Te(c),onSelect:n(o.onSelect,(()=>s.onValueChange?.(r)),{checkForDefaultPrevented:!1})})})}));ve.displayName=he;var ge="MenuItemIndicator",[xe,_e]=K(ge,{checked:!1}),we=e.forwardRef(((e,n)=>{const{__scopeMenu:t,forceMount:r,...o}=e,s=_e(ge,t);return k.jsx(g,{present:r||Ie(s.checked)||!0===s.checked,children:k.jsx(x.span,{...o,ref:n,"data-state":Te(s.checked)})})}));we.displayName=ge;var Me=e.forwardRef(((e,n)=>{const{__scopeMenu:t,...r}=e;return k.jsx(x.div,{role:"separator","aria-orientation":"horizontal",...r,ref:n})}));Me.displayName="MenuSeparator";var ye=e.forwardRef(((e,n)=>{const{__scopeMenu:t,...r}=e,o=N(t);return k.jsx(m,{...o,...r,ref:n})}));ye.displayName="MenuArrow";var je="MenuSub",[Ce,be]=K(je),Re=n=>{const{__scopeMenu:t,children:r,open:o=!1,onOpenChange:s}=n,c=U(je,t),a=N(t),[i,u]=e.useState(null),[l,f]=e.useState(null),p=C(s);return e.useEffect((()=>(!1===c.open&&p(!1),()=>p(!1))),[c.open,p]),k.jsx(h,{...a,children:k.jsx(V,{scope:t,open:o,onOpenChange:p,content:l,onContentChange:f,children:k.jsx(Ce,{scope:t,contentId:d(),triggerId:d(),trigger:i,onTriggerChange:u,children:r})})})};Re.displayName=je;var ke="MenuSubTrigger",Pe=e.forwardRef(((t,r)=>{const s=U(ke,t.__scopeMenu),c=X(ke,t.__scopeMenu),a=be(ke,t.__scopeMenu),i=$(ke,t.__scopeMenu),u=e.useRef(null),{pointerGraceTimerRef:d,onPointerGraceIntentChange:l}=i,f={__scopeMenu:t.__scopeMenu},p=e.useCallback((()=>{u.current&&window.clearTimeout(u.current),u.current=null}),[]);return e.useEffect((()=>p),[p]),e.useEffect((()=>{const e=d.current;return()=>{window.clearTimeout(e),l(null)}}),[d,l]),k.jsx(z,{asChild:!0,...f,children:k.jsx(ue,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":a.contentId,"data-state":Oe(s.open),...t,ref:o(r,a.onTriggerChange),onClick:e=>{t.onClick?.(e),t.disabled||e.defaultPrevented||(e.currentTarget.focus(),s.open||s.onOpenChange(!0))},onPointerMove:n(t.onPointerMove,Se((e=>{i.onItemEnter(e),e.defaultPrevented||t.disabled||s.open||u.current||(i.onPointerGraceIntentChange(null),u.current=window.setTimeout((()=>{s.onOpenChange(!0),p()}),100))}))),onPointerLeave:n(t.onPointerLeave,Se((e=>{p();const n=s.content?.getBoundingClientRect();if(n){const t=s.content?.dataset.side,r="right"===t,o=r?-5:5,c=n[r?"left":"right"],a=n[r?"right":"left"];i.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:n.top},{x:a,y:n.top},{x:a,y:n.bottom},{x:c,y:n.bottom}],side:t}),window.clearTimeout(d.current),d.current=window.setTimeout((()=>i.onPointerGraceIntentChange(null)),300)}else{if(i.onTriggerLeave(e),e.defaultPrevented)return;i.onPointerGraceIntentChange(null)}}))),onKeyDown:n(t.onKeyDown,(e=>{const n=""!==i.searchRef.current;t.disabled||n&&" "===e.key||O[c.dir].includes(e.key)&&(s.onOpenChange(!0),s.content?.focus(),e.preventDefault())}))})})}));Pe.displayName=ke;var De="MenuSubContent",Ee=e.forwardRef(((t,o)=>{const s=Z(J,t.__scopeMenu),{forceMount:c=s.forceMount,...a}=t,i=U(J,t.__scopeMenu),u=X(J,t.__scopeMenu),d=be(De,t.__scopeMenu),l=e.useRef(null),f=r(o,l);return k.jsx(S.Provider,{scope:t.__scopeMenu,children:k.jsx(g,{present:c||i.open,children:k.jsx(S.Slot,{scope:t.__scopeMenu,children:k.jsx(re,{id:d.contentId,"aria-labelledby":d.triggerId,...a,ref:f,align:"start",side:"rtl"===u.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{u.isUsingKeyboardRef.current&&l.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:n(t.onFocusOutside,(e=>{e.target!==d.trigger&&i.onOpenChange(!1)})),onEscapeKeyDown:n(t.onEscapeKeyDown,(e=>{u.onClose(),e.preventDefault()})),onKeyDown:n(t.onKeyDown,(e=>{const n=e.currentTarget.contains(e.target),t=I[u.dir].includes(e.key);n&&t&&(i.onOpenChange(!1),d.trigger?.focus(),e.preventDefault())}))})})})})}));function Oe(e){return e?"open":"closed"}function Ie(e){return"indeterminate"===e}function Te(e){return Ie(e)?"indeterminate":e?"checked":"unchecked"}function Se(e){return n=>"mouse"===n.pointerType?e(n):void 0}Ee.displayName=De;var Fe=Y,Le=z,Ke=q,Ae=ee,Ne=oe,Ge=se,Ve=ie,Ue=de,Be=me,Xe=ve,Ye=we,ze=Me,He=ye,We=Re,Ze=Pe,qe=Ee;export{Le as Anchor,He as Arrow,Ue as CheckboxItem,Ae as Content,Ne as Group,Ve as Item,Ye as ItemIndicator,Ge as Label,Y as Menu,z as MenuAnchor,ye as MenuArrow,de as MenuCheckboxItem,ee as MenuContent,oe as MenuGroup,ie as MenuItem,we as MenuItemIndicator,se as MenuLabel,q as MenuPortal,me as MenuRadioGroup,ve as MenuRadioItem,Me as MenuSeparator,Re as MenuSub,Ee as MenuSubContent,Pe as MenuSubTrigger,Ke as Portal,Be as RadioGroup,Xe as RadioItem,Fe as Root,ze as Separator,We as Sub,qe as SubContent,Ze as SubTrigger,A as createMenuScope};
|
1
|
+
import*as e from"react";import{composeEventHandlers as n}from"../../primitive/dist/index.mjs";import{createCollection as t}from"../../react-collection/dist/index.mjs";import{useComposedRefs as r,composeRefs as o}from"../../react-compose-refs/dist/index.mjs";import{createContextScope as c}from"../../react-context/dist/index.mjs";import{useDirection as a}from"../../react-direction/dist/index.mjs";import{DismissableLayer as i}from"../../react-dismissable-layer/dist/index.mjs";import{useFocusGuards as s}from"../../react-focus-guards/dist/index.mjs";import{FocusScope as u}from"../../react-focus-scope/dist/index.mjs";import{useId as d}from"../../react-id/dist/index.mjs";import{createPopperScope as l,Anchor as f,Content as p,Arrow as m,Root as h}from"../../react-popper/dist/index.mjs";import{Portal as v}from"../../react-portal/dist/index.mjs";import{Presence as g}from"../../react-presence/dist/index.mjs";import{Primitive as _,dispatchDiscreteCustomEvent as w}from"../../react-primitive/dist/index.mjs";import{createRovingFocusGroupScope as M,Root as y,Item as C}from"../../react-roving-focus/dist/index.mjs";import{Slot as b}from"../../react-slot/dist/index.mjs";import{useCallbackRef as R}from"../../react-use-callback-ref/dist/index.mjs";import{hideOthers as k}from"aria-hidden";import{RemoveScroll as x}from"react-remove-scroll";import{jsx as P}from"react/jsx-runtime";var D=["Enter"," "],E=["ArrowUp","PageDown","End"],O=["ArrowDown","PageUp","Home",...E],I={ltr:[...D,"ArrowRight"],rtl:[...D,"ArrowLeft"]},T={ltr:["ArrowLeft"],rtl:["ArrowRight"]},S="Menu",[F,L,K]=t(S),[j,A]=c(S,[K,l,M]),N=l(),G=M(),[V,U]=j(S),[B,X]=j(S),Y=n=>{const{__scopeMenu:t,open:r=!1,children:o,dir:c,onOpenChange:i,modal:s=!0}=n,u=N(t),[d,l]=e.useState(null),f=e.useRef(!1),p=R(i),m=a(c);return e.useEffect((()=>{const e=()=>{f.current=!0,document.addEventListener("pointerdown",n,{capture:!0,once:!0}),document.addEventListener("pointermove",n,{capture:!0,once:!0})},n=()=>f.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",n,{capture:!0}),document.removeEventListener("pointermove",n,{capture:!0})}}),[]),P(h,{...u,children:P(V,{scope:t,open:r,onOpenChange:p,content:d,onContentChange:l,children:P(B,{scope:t,onClose:e.useCallback((()=>p(!1)),[p]),isUsingKeyboardRef:f,dir:m,modal:s,children:o})})})};Y.displayName=S;var z=e.forwardRef(((e,n)=>{const{__scopeMenu:t,...r}=e,o=N(t);return P(f,{...o,...r,ref:n})}));z.displayName="MenuAnchor";var H="MenuPortal",[W,Z]=j(H,{forceMount:void 0}),q=e=>{const{__scopeMenu:n,forceMount:t,children:r,container:o}=e,c=U(H,n);return P(W,{scope:n,forceMount:t,children:P(g,{present:t||c.open,children:P(v,{asChild:!0,container:o,children:r})})})};q.displayName=H;var J="MenuContent",[Q,$]=j(J),ee=e.forwardRef(((e,n)=>{const t=Z(J,e.__scopeMenu),{forceMount:r=t.forceMount,...o}=e,c=U(J,e.__scopeMenu),a=X(J,e.__scopeMenu);return P(F.Provider,{scope:e.__scopeMenu,children:P(g,{present:r||c.open,children:P(F.Slot,{scope:e.__scopeMenu,children:a.modal?P(ne,{...o,ref:n}):P(te,{...o,ref:n})})})})})),ne=e.forwardRef(((t,o)=>{const c=U(J,t.__scopeMenu),a=e.useRef(null),i=r(o,a);return e.useEffect((()=>{const e=a.current;if(e)return k(e)}),[]),P(re,{...t,ref:i,trapFocus:c.open,disableOutsidePointerEvents:c.open,disableOutsideScroll:!0,onFocusOutside:n(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>c.onOpenChange(!1)})})),te=e.forwardRef(((e,n)=>{const t=U(J,e.__scopeMenu);return P(re,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>t.onOpenChange(!1)})})),re=e.forwardRef(((t,o)=>{const{__scopeMenu:c,loop:a=!1,trapFocus:d,onOpenAutoFocus:l,onCloseAutoFocus:f,disableOutsidePointerEvents:m,onEntryFocus:h,onEscapeKeyDown:v,onPointerDownOutside:g,onFocusOutside:_,onInteractOutside:w,onDismiss:M,disableOutsideScroll:C,...R}=t,k=U(J,c),D=X(J,c),I=N(c),T=G(c),S=L(c),[F,K]=e.useState(null),j=e.useRef(null),A=r(o,j,k.onContentChange),V=e.useRef(0),B=e.useRef(""),Y=e.useRef(0),z=e.useRef(null),H=e.useRef("right"),W=e.useRef(0),Z=C?x:e.Fragment,q=C?{as:b,allowPinchZoom:!0}:void 0,$=e=>{const n=B.current+e,t=S().filter((e=>!e.disabled)),r=document.activeElement,o=t.find((e=>e.ref.current===r))?.textValue,c=function(e,n,t){const r=n.length>1&&Array.from(n).every((e=>e===n[0])),o=r?n[0]:n,c=t?e.indexOf(t):-1;let a=(i=e,s=Math.max(c,0),i.map(((e,n)=>i[(s+n)%i.length])));var i,s;1===o.length&&(a=a.filter((e=>e!==t)));const u=a.find((e=>e.toLowerCase().startsWith(o.toLowerCase())));return u!==t?u:void 0}(t.map((e=>e.textValue)),n,o),a=t.find((e=>e.textValue===c))?.ref.current;!function e(n){B.current=n,window.clearTimeout(V.current),""!==n&&(V.current=window.setTimeout((()=>e("")),1e3))}(n),a&&setTimeout((()=>a.focus()))};e.useEffect((()=>()=>window.clearTimeout(V.current)),[]),s();const ee=e.useCallback((e=>H.current===z.current?.side&&function(e,n){if(!n)return!1;const t={x:e.clientX,y:e.clientY};return function(e,n){const{x:t,y:r}=e;let o=!1;for(let e=0,c=n.length-1;e<n.length;c=e++){const a=n[e].x,i=n[e].y,s=n[c].x,u=n[c].y;i>r!=u>r&&t<(s-a)*(r-i)/(u-i)+a&&(o=!o)}return o}(t,n)}(e,z.current?.area)),[]);return P(Q,{scope:c,searchRef:B,onItemEnter:e.useCallback((e=>{ee(e)&&e.preventDefault()}),[ee]),onItemLeave:e.useCallback((e=>{ee(e)||(j.current?.focus(),K(null))}),[ee]),onTriggerLeave:e.useCallback((e=>{ee(e)&&e.preventDefault()}),[ee]),pointerGraceTimerRef:Y,onPointerGraceIntentChange:e.useCallback((e=>{z.current=e}),[]),children:P(Z,{...q,children:P(u,{asChild:!0,trapped:d,onMountAutoFocus:n(l,(e=>{e.preventDefault(),j.current?.focus({preventScroll:!0})})),onUnmountAutoFocus:f,children:P(i,{asChild:!0,disableOutsidePointerEvents:m,onEscapeKeyDown:v,onPointerDownOutside:g,onFocusOutside:_,onInteractOutside:w,onDismiss:M,children:P(y,{asChild:!0,...T,dir:D.dir,orientation:"vertical",loop:a,currentTabStopId:F,onCurrentTabStopIdChange:K,onEntryFocus:n(h,(e=>{D.isUsingKeyboardRef.current||e.preventDefault()})),preventScrollOnEntryFocus:!0,children:P(p,{role:"menu","aria-orientation":"vertical","data-state":Ie(k.open),"data-radix-menu-content":"",dir:D.dir,...I,...R,ref:A,style:{outline:"none",...R.style},onKeyDown:n(R.onKeyDown,(e=>{const n=e.target.closest("[data-radix-menu-content]")===e.currentTarget,t=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;n&&("Tab"===e.key&&e.preventDefault(),!t&&r&&$(e.key));const o=j.current;if(e.target!==o)return;if(!O.includes(e.key))return;e.preventDefault();const c=S().filter((e=>!e.disabled)).map((e=>e.ref.current));E.includes(e.key)&&c.reverse(),function(e){const n=document.activeElement;for(const t of e){if(t===n)return;if(t.focus(),document.activeElement!==n)return}}(c)})),onBlur:n(t.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(V.current),B.current="")})),onPointerMove:n(t.onPointerMove,Fe((e=>{const n=e.target,t=W.current!==e.clientX;if(e.currentTarget.contains(n)&&t){const n=e.clientX>W.current?"right":"left";H.current=n,W.current=e.clientX}})))})})})})})})}));ee.displayName=J;var oe=e.forwardRef(((e,n)=>{const{__scopeMenu:t,...r}=e;return P(_.div,{role:"group",...r,ref:n})}));oe.displayName="MenuGroup";var ce=e.forwardRef(((e,n)=>{const{__scopeMenu:t,...r}=e;return P(_.div,{...r,ref:n})}));ce.displayName="MenuLabel";var ae="MenuItem",ie="menu.itemSelect",se=e.forwardRef(((t,o)=>{const{disabled:c=!1,onSelect:a,...i}=t,s=e.useRef(null),u=X(ae,t.__scopeMenu),d=$(ae,t.__scopeMenu),l=r(o,s),f=e.useRef(!1);return P(ue,{...i,ref:l,disabled:c,onClick:n(t.onClick,(()=>{const e=s.current;if(!c&&e){const n=new CustomEvent(ie,{bubbles:!0,cancelable:!0});e.addEventListener(ie,(e=>a?.(e)),{once:!0}),w(e,n),n.defaultPrevented?f.current=!1:u.onClose()}})),onPointerDown:e=>{t.onPointerDown?.(e),f.current=!0},onPointerUp:n(t.onPointerUp,(e=>{f.current||e.currentTarget?.click()})),onKeyDown:n(t.onKeyDown,(e=>{const n=""!==d.searchRef.current;c||n&&" "===e.key||D.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))})}));se.displayName=ae;var ue=e.forwardRef(((t,o)=>{const{__scopeMenu:c,disabled:a=!1,textValue:i,...s}=t,u=$(ae,c),d=G(c),l=e.useRef(null),f=r(o,l),[p,m]=e.useState(!1),[h,v]=e.useState("");return e.useEffect((()=>{const e=l.current;e&&v((e.textContent??"").trim())}),[s.children]),P(F.ItemSlot,{scope:c,disabled:a,textValue:i??h,children:P(C,{asChild:!0,...d,focusable:!a,children:P(_.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...s,ref:f,onPointerMove:n(t.onPointerMove,Fe((e=>{if(a)u.onItemLeave(e);else if(u.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}}))),onPointerLeave:n(t.onPointerLeave,Fe((e=>u.onItemLeave(e)))),onFocus:n(t.onFocus,(()=>m(!0))),onBlur:n(t.onBlur,(()=>m(!1)))})})})})),de=e.forwardRef(((e,t)=>{const{checked:r=!1,onCheckedChange:o,...c}=e;return P(_e,{scope:e.__scopeMenu,checked:r,children:P(se,{role:"menuitemcheckbox","aria-checked":Te(r)?"mixed":r,...c,ref:t,"data-state":Se(r),onSelect:n(c.onSelect,(()=>o?.(!!Te(r)||!r)),{checkForDefaultPrevented:!1})})})}));de.displayName="MenuCheckboxItem";var le="MenuRadioGroup",[fe,pe]=j(le,{value:void 0,onValueChange:()=>{}}),me=e.forwardRef(((e,n)=>{const{value:t,onValueChange:r,...o}=e,c=R(r);return P(fe,{scope:e.__scopeMenu,value:t,onValueChange:c,children:P(oe,{...o,ref:n})})}));me.displayName=le;var he="MenuRadioItem",ve=e.forwardRef(((e,t)=>{const{value:r,...o}=e,c=pe(he,e.__scopeMenu),a=r===c.value;return P(_e,{scope:e.__scopeMenu,checked:a,children:P(se,{role:"menuitemradio","aria-checked":a,...o,ref:t,"data-state":Se(a),onSelect:n(o.onSelect,(()=>c.onValueChange?.(r)),{checkForDefaultPrevented:!1})})})}));ve.displayName=he;var ge="MenuItemIndicator",[_e,we]=j(ge,{checked:!1}),Me=e.forwardRef(((e,n)=>{const{__scopeMenu:t,forceMount:r,...o}=e,c=we(ge,t);return P(g,{present:r||Te(c.checked)||!0===c.checked,children:P(_.span,{...o,ref:n,"data-state":Se(c.checked)})})}));Me.displayName=ge;var ye=e.forwardRef(((e,n)=>{const{__scopeMenu:t,...r}=e;return P(_.div,{role:"separator","aria-orientation":"horizontal",...r,ref:n})}));ye.displayName="MenuSeparator";var Ce=e.forwardRef(((e,n)=>{const{__scopeMenu:t,...r}=e,o=N(t);return P(m,{...o,...r,ref:n})}));Ce.displayName="MenuArrow";var be="MenuSub",[Re,ke]=j(be),xe=n=>{const{__scopeMenu:t,children:r,open:o=!1,onOpenChange:c}=n,a=U(be,t),i=N(t),[s,u]=e.useState(null),[l,f]=e.useState(null),p=R(c);return e.useEffect((()=>(!1===a.open&&p(!1),()=>p(!1))),[a.open,p]),P(h,{...i,children:P(V,{scope:t,open:o,onOpenChange:p,content:l,onContentChange:f,children:P(Re,{scope:t,contentId:d(),triggerId:d(),trigger:s,onTriggerChange:u,children:r})})})};xe.displayName=be;var Pe="MenuSubTrigger",De=e.forwardRef(((t,r)=>{const c=U(Pe,t.__scopeMenu),a=X(Pe,t.__scopeMenu),i=ke(Pe,t.__scopeMenu),s=$(Pe,t.__scopeMenu),u=e.useRef(null),{pointerGraceTimerRef:d,onPointerGraceIntentChange:l}=s,f={__scopeMenu:t.__scopeMenu},p=e.useCallback((()=>{u.current&&window.clearTimeout(u.current),u.current=null}),[]);return e.useEffect((()=>p),[p]),e.useEffect((()=>{const e=d.current;return()=>{window.clearTimeout(e),l(null)}}),[d,l]),P(z,{asChild:!0,...f,children:P(ue,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":c.open,"aria-controls":i.contentId,"data-state":Ie(c.open),...t,ref:o(r,i.onTriggerChange),onClick:e=>{t.onClick?.(e),t.disabled||e.defaultPrevented||(e.currentTarget.focus(),c.open||c.onOpenChange(!0))},onPointerMove:n(t.onPointerMove,Fe((e=>{s.onItemEnter(e),e.defaultPrevented||t.disabled||c.open||u.current||(s.onPointerGraceIntentChange(null),u.current=window.setTimeout((()=>{c.onOpenChange(!0),p()}),100))}))),onPointerLeave:n(t.onPointerLeave,Fe((e=>{p();const n=c.content?.getBoundingClientRect();if(n){const t=c.content?.dataset.side,r="right"===t,o=r?-5:5,a=n[r?"left":"right"],i=n[r?"right":"left"];s.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:a,y:n.top},{x:i,y:n.top},{x:i,y:n.bottom},{x:a,y:n.bottom}],side:t}),window.clearTimeout(d.current),d.current=window.setTimeout((()=>s.onPointerGraceIntentChange(null)),300)}else{if(s.onTriggerLeave(e),e.defaultPrevented)return;s.onPointerGraceIntentChange(null)}}))),onKeyDown:n(t.onKeyDown,(e=>{const n=""!==s.searchRef.current;t.disabled||n&&" "===e.key||I[a.dir].includes(e.key)&&(c.onOpenChange(!0),c.content?.focus(),e.preventDefault())}))})})}));De.displayName=Pe;var Ee="MenuSubContent",Oe=e.forwardRef(((t,o)=>{const c=Z(J,t.__scopeMenu),{forceMount:a=c.forceMount,...i}=t,s=U(J,t.__scopeMenu),u=X(J,t.__scopeMenu),d=ke(Ee,t.__scopeMenu),l=e.useRef(null),f=r(o,l);return P(F.Provider,{scope:t.__scopeMenu,children:P(g,{present:a||s.open,children:P(F.Slot,{scope:t.__scopeMenu,children:P(re,{id:d.contentId,"aria-labelledby":d.triggerId,...i,ref:f,align:"start",side:"rtl"===u.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{u.isUsingKeyboardRef.current&&l.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:n(t.onFocusOutside,(e=>{e.target!==d.trigger&&s.onOpenChange(!1)})),onEscapeKeyDown:n(t.onEscapeKeyDown,(e=>{u.onClose(),e.preventDefault()})),onKeyDown:n(t.onKeyDown,(e=>{const n=e.currentTarget.contains(e.target),t=T[u.dir].includes(e.key);n&&t&&(s.onOpenChange(!1),d.trigger?.focus(),e.preventDefault())}))})})})})}));function Ie(e){return e?"open":"closed"}function Te(e){return"indeterminate"===e}function Se(e){return Te(e)?"indeterminate":e?"checked":"unchecked"}function Fe(e){return n=>"mouse"===n.pointerType?e(n):void 0}Oe.displayName=Ee;var Le=Y,Ke=z,je=q,Ae=ee,Ne=oe,Ge=ce,Ve=se,Ue=de,Be=me,Xe=ve,Ye=Me,ze=ye,He=Ce,We=xe,Ze=De,qe=Oe;export{Ke as Anchor,He as Arrow,Ue as CheckboxItem,Ae as Content,Ne as Group,Ve as Item,Ye as ItemIndicator,Ge as Label,Y as Menu,z as MenuAnchor,Ce as MenuArrow,de as MenuCheckboxItem,ee as MenuContent,oe as MenuGroup,se as MenuItem,Me as MenuItemIndicator,ce as MenuLabel,q as MenuPortal,me as MenuRadioGroup,ve as MenuRadioItem,ye as MenuSeparator,xe as MenuSub,Oe as MenuSubContent,De as MenuSubTrigger,je as Portal,Be as RadioGroup,Xe as RadioItem,Le as Root,ze as Separator,We as Sub,qe as SubContent,Ze as SubTrigger,A as createMenuScope};
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../node_modules/@radix-ui/react-menu/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/menu/src/Menu.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs, composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport * as RovingFocusGroup from \"@radix-ui/react-roving-focus\";\nimport { createRovingFocusGroupScope } from \"@radix-ui/react-roving-focus\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar SELECTION_KEYS = [\"Enter\", \" \"];\nvar FIRST_KEYS = [\"ArrowDown\", \"PageUp\", \"Home\"];\nvar LAST_KEYS = [\"ArrowUp\", \"PageDown\", \"End\"];\nvar FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS];\nvar SUB_OPEN_KEYS = {\n ltr: [...SELECTION_KEYS, \"ArrowRight\"],\n rtl: [...SELECTION_KEYS, \"ArrowLeft\"]\n};\nvar SUB_CLOSE_KEYS = {\n ltr: [\"ArrowLeft\"],\n rtl: [\"ArrowRight\"]\n};\nvar MENU_NAME = \"Menu\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(MENU_NAME);\nvar [createMenuContext, createMenuScope] = createContextScope(MENU_NAME, [\n createCollectionScope,\n createPopperScope,\n createRovingFocusGroupScope\n]);\nvar usePopperScope = createPopperScope();\nvar useRovingFocusGroupScope = createRovingFocusGroupScope();\nvar [MenuProvider, useMenuContext] = createMenuContext(MENU_NAME);\nvar [MenuRootProvider, useMenuRootContext] = createMenuContext(MENU_NAME);\nvar Menu = (props) => {\n const { __scopeMenu, open = false, children, dir, onOpenChange, modal = true } = props;\n const popperScope = usePopperScope(__scopeMenu);\n const [content, setContent] = React.useState(null);\n const isUsingKeyboardRef = React.useRef(false);\n const handleOpenChange = useCallbackRef(onOpenChange);\n const direction = useDirection(dir);\n React.useEffect(() => {\n const handleKeyDown = () => {\n isUsingKeyboardRef.current = true;\n document.addEventListener(\"pointerdown\", handlePointer, { capture: true, once: true });\n document.addEventListener(\"pointermove\", handlePointer, { capture: true, once: true });\n };\n const handlePointer = () => isUsingKeyboardRef.current = false;\n document.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => {\n document.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n document.removeEventListener(\"pointerdown\", handlePointer, { capture: true });\n document.removeEventListener(\"pointermove\", handlePointer, { capture: true });\n };\n }, []);\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n MenuProvider,\n {\n scope: __scopeMenu,\n open,\n onOpenChange: handleOpenChange,\n content,\n onContentChange: setContent,\n children: /* @__PURE__ */ jsx(\n MenuRootProvider,\n {\n scope: __scopeMenu,\n onClose: React.useCallback(() => handleOpenChange(false), [handleOpenChange]),\n isUsingKeyboardRef,\n dir: direction,\n modal,\n children\n }\n )\n }\n ) });\n};\nMenu.displayName = MENU_NAME;\nvar ANCHOR_NAME = \"MenuAnchor\";\nvar MenuAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...anchorProps } = props;\n const popperScope = usePopperScope(__scopeMenu);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nMenuAnchor.displayName = ANCHOR_NAME;\nvar PORTAL_NAME = \"MenuPortal\";\nvar [PortalProvider, usePortalContext] = createMenuContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar MenuPortal = (props) => {\n const { __scopeMenu, forceMount, children, container } = props;\n const context = useMenuContext(PORTAL_NAME, __scopeMenu);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeMenu, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nMenuPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"MenuContent\";\nvar [MenuContentProvider, useMenuContentContext] = createMenuContext(CONTENT_NAME);\nvar MenuContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu);\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeMenu, children: rootContext.modal ? /* @__PURE__ */ jsx(MenuRootContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(MenuRootContentNonModal, { ...contentProps, ref: forwardedRef }) }) }) });\n }\n);\nvar MenuRootContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const content = ref.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n MenuContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: context.open,\n disableOutsideScroll: true,\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n ),\n onDismiss: () => context.onOpenChange(false)\n }\n );\n }\n);\nvar MenuRootContentNonModal = React.forwardRef((props, forwardedRef) => {\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n return /* @__PURE__ */ jsx(\n MenuContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n disableOutsideScroll: false,\n onDismiss: () => context.onOpenChange(false)\n }\n );\n});\nvar MenuContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeMenu,\n loop = false,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEntryFocus,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n disableOutsideScroll,\n ...contentProps\n } = props;\n const context = useMenuContext(CONTENT_NAME, __scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, __scopeMenu);\n const popperScope = usePopperScope(__scopeMenu);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);\n const getItems = useCollection(__scopeMenu);\n const [currentItemId, setCurrentItemId] = React.useState(null);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef, context.onContentChange);\n const timerRef = React.useRef(0);\n const searchRef = React.useRef(\"\");\n const pointerGraceTimerRef = React.useRef(0);\n const pointerGraceIntentRef = React.useRef(null);\n const pointerDirRef = React.useRef(\"right\");\n const lastPointerXRef = React.useRef(0);\n const ScrollLockWrapper = disableOutsideScroll ? RemoveScroll : React.Fragment;\n const scrollLockWrapperProps = disableOutsideScroll ? { as: Slot, allowPinchZoom: true } : void 0;\n const handleTypeaheadSearch = (key) => {\n const search = searchRef.current + key;\n const items = getItems().filter((item) => !item.disabled);\n const currentItem = document.activeElement;\n const currentMatch = items.find((item) => item.ref.current === currentItem)?.textValue;\n const values = items.map((item) => item.textValue);\n const nextMatch = getNextMatch(values, search, currentMatch);\n const newItem = items.find((item) => item.textValue === nextMatch)?.ref.current;\n (function updateSearch(value) {\n searchRef.current = value;\n window.clearTimeout(timerRef.current);\n if (value !== \"\") timerRef.current = window.setTimeout(() => updateSearch(\"\"), 1e3);\n })(search);\n if (newItem) {\n setTimeout(() => newItem.focus());\n }\n };\n React.useEffect(() => {\n return () => window.clearTimeout(timerRef.current);\n }, []);\n useFocusGuards();\n const isPointerMovingToSubmenu = React.useCallback((event) => {\n const isMovingTowards = pointerDirRef.current === pointerGraceIntentRef.current?.side;\n return isMovingTowards && isPointerInGraceArea(event, pointerGraceIntentRef.current?.area);\n }, []);\n return /* @__PURE__ */ jsx(\n MenuContentProvider,\n {\n scope: __scopeMenu,\n searchRef,\n onItemEnter: React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) event.preventDefault();\n },\n [isPointerMovingToSubmenu]\n ),\n onItemLeave: React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) return;\n contentRef.current?.focus();\n setCurrentItemId(null);\n },\n [isPointerMovingToSubmenu]\n ),\n onTriggerLeave: React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) event.preventDefault();\n },\n [isPointerMovingToSubmenu]\n ),\n pointerGraceTimerRef,\n onPointerGraceIntentChange: React.useCallback((intent) => {\n pointerGraceIntentRef.current = intent;\n }, []),\n children: /* @__PURE__ */ jsx(ScrollLockWrapper, { ...scrollLockWrapperProps, children: /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n trapped: trapFocus,\n onMountAutoFocus: composeEventHandlers(onOpenAutoFocus, (event) => {\n event.preventDefault();\n contentRef.current?.focus({ preventScroll: true });\n }),\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n children: /* @__PURE__ */ jsx(\n RovingFocusGroup.Root,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n dir: rootContext.dir,\n orientation: \"vertical\",\n loop,\n currentTabStopId: currentItemId,\n onCurrentTabStopIdChange: setCurrentItemId,\n onEntryFocus: composeEventHandlers(onEntryFocus, (event) => {\n if (!rootContext.isUsingKeyboardRef.current) event.preventDefault();\n }),\n preventScrollOnEntryFocus: true,\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n role: \"menu\",\n \"aria-orientation\": \"vertical\",\n \"data-state\": getOpenState(context.open),\n \"data-radix-menu-content\": \"\",\n dir: rootContext.dir,\n ...popperScope,\n ...contentProps,\n ref: composedRefs,\n style: { outline: \"none\", ...contentProps.style },\n onKeyDown: composeEventHandlers(contentProps.onKeyDown, (event) => {\n const target = event.target;\n const isKeyDownInside = target.closest(\"[data-radix-menu-content]\") === event.currentTarget;\n const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n const isCharacterKey = event.key.length === 1;\n if (isKeyDownInside) {\n if (event.key === \"Tab\") event.preventDefault();\n if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(event.key);\n }\n const content = contentRef.current;\n if (event.target !== content) return;\n if (!FIRST_LAST_KEYS.includes(event.key)) return;\n event.preventDefault();\n const items = getItems().filter((item) => !item.disabled);\n const candidateNodes = items.map((item) => item.ref.current);\n if (LAST_KEYS.includes(event.key)) candidateNodes.reverse();\n focusFirst(candidateNodes);\n }),\n onBlur: composeEventHandlers(props.onBlur, (event) => {\n if (!event.currentTarget.contains(event.target)) {\n window.clearTimeout(timerRef.current);\n searchRef.current = \"\";\n }\n }),\n onPointerMove: composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n const target = event.target;\n const pointerXHasChanged = lastPointerXRef.current !== event.clientX;\n if (event.currentTarget.contains(target) && pointerXHasChanged) {\n const newDir = event.clientX > lastPointerXRef.current ? \"right\" : \"left\";\n pointerDirRef.current = newDir;\n lastPointerXRef.current = event.clientX;\n }\n })\n )\n }\n )\n }\n )\n }\n )\n }\n ) })\n }\n );\n }\n);\nMenuContent.displayName = CONTENT_NAME;\nvar GROUP_NAME = \"MenuGroup\";\nvar MenuGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...groupProps } = props;\n return /* @__PURE__ */ jsx(Primitive.div, { role: \"group\", ...groupProps, ref: forwardedRef });\n }\n);\nMenuGroup.displayName = GROUP_NAME;\nvar LABEL_NAME = \"MenuLabel\";\nvar MenuLabel = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...labelProps } = props;\n return /* @__PURE__ */ jsx(Primitive.div, { ...labelProps, ref: forwardedRef });\n }\n);\nMenuLabel.displayName = LABEL_NAME;\nvar ITEM_NAME = \"MenuItem\";\nvar ITEM_SELECT = \"menu.itemSelect\";\nvar MenuItem = React.forwardRef(\n (props, forwardedRef) => {\n const { disabled = false, onSelect, ...itemProps } = props;\n const ref = React.useRef(null);\n const rootContext = useMenuRootContext(ITEM_NAME, props.__scopeMenu);\n const contentContext = useMenuContentContext(ITEM_NAME, props.__scopeMenu);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const isPointerDownRef = React.useRef(false);\n const handleSelect = () => {\n const menuItem = ref.current;\n if (!disabled && menuItem) {\n const itemSelectEvent = new CustomEvent(ITEM_SELECT, { bubbles: true, cancelable: true });\n menuItem.addEventListener(ITEM_SELECT, (event) => onSelect?.(event), { once: true });\n dispatchDiscreteCustomEvent(menuItem, itemSelectEvent);\n if (itemSelectEvent.defaultPrevented) {\n isPointerDownRef.current = false;\n } else {\n rootContext.onClose();\n }\n }\n };\n return /* @__PURE__ */ jsx(\n MenuItemImpl,\n {\n ...itemProps,\n ref: composedRefs,\n disabled,\n onClick: composeEventHandlers(props.onClick, handleSelect),\n onPointerDown: (event) => {\n props.onPointerDown?.(event);\n isPointerDownRef.current = true;\n },\n onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {\n if (!isPointerDownRef.current) event.currentTarget?.click();\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isTypingAhead = contentContext.searchRef.current !== \"\";\n if (disabled || isTypingAhead && event.key === \" \") return;\n if (SELECTION_KEYS.includes(event.key)) {\n event.currentTarget.click();\n event.preventDefault();\n }\n })\n }\n );\n }\n);\nMenuItem.displayName = ITEM_NAME;\nvar MenuItemImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, disabled = false, textValue, ...itemProps } = props;\n const contentContext = useMenuContentContext(ITEM_NAME, __scopeMenu);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const [isFocused, setIsFocused] = React.useState(false);\n const [textContent, setTextContent] = React.useState(\"\");\n React.useEffect(() => {\n const menuItem = ref.current;\n if (menuItem) {\n setTextContent((menuItem.textContent ?? \"\").trim());\n }\n }, [itemProps.children]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeMenu,\n disabled,\n textValue: textValue ?? textContent,\n children: /* @__PURE__ */ jsx(RovingFocusGroup.Item, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n role: \"menuitem\",\n \"data-highlighted\": isFocused ? \"\" : void 0,\n \"aria-disabled\": disabled || void 0,\n \"data-disabled\": disabled ? \"\" : void 0,\n ...itemProps,\n ref: composedRefs,\n onPointerMove: composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n if (disabled) {\n contentContext.onItemLeave(event);\n } else {\n contentContext.onItemEnter(event);\n if (!event.defaultPrevented) {\n const item = event.currentTarget;\n item.focus({ preventScroll: true });\n }\n }\n })\n ),\n onPointerLeave: composeEventHandlers(\n props.onPointerLeave,\n whenMouse((event) => contentContext.onItemLeave(event))\n ),\n onFocus: composeEventHandlers(props.onFocus, () => setIsFocused(true)),\n onBlur: composeEventHandlers(props.onBlur, () => setIsFocused(false))\n }\n ) })\n }\n );\n }\n);\nvar CHECKBOX_ITEM_NAME = \"MenuCheckboxItem\";\nvar MenuCheckboxItem = React.forwardRef(\n (props, forwardedRef) => {\n const { checked = false, onCheckedChange, ...checkboxItemProps } = props;\n return /* @__PURE__ */ jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx(\n MenuItem,\n {\n role: \"menuitemcheckbox\",\n \"aria-checked\": isIndeterminate(checked) ? \"mixed\" : checked,\n ...checkboxItemProps,\n ref: forwardedRef,\n \"data-state\": getCheckedState(checked),\n onSelect: composeEventHandlers(\n checkboxItemProps.onSelect,\n () => onCheckedChange?.(isIndeterminate(checked) ? true : !checked),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\nvar RADIO_GROUP_NAME = \"MenuRadioGroup\";\nvar [RadioGroupProvider, useRadioGroupContext] = createMenuContext(\n RADIO_GROUP_NAME,\n { value: void 0, onValueChange: () => {\n } }\n);\nvar MenuRadioGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { value, onValueChange, ...groupProps } = props;\n const handleValueChange = useCallbackRef(onValueChange);\n return /* @__PURE__ */ jsx(RadioGroupProvider, { scope: props.__scopeMenu, value, onValueChange: handleValueChange, children: /* @__PURE__ */ jsx(MenuGroup, { ...groupProps, ref: forwardedRef }) });\n }\n);\nMenuRadioGroup.displayName = RADIO_GROUP_NAME;\nvar RADIO_ITEM_NAME = \"MenuRadioItem\";\nvar MenuRadioItem = React.forwardRef(\n (props, forwardedRef) => {\n const { value, ...radioItemProps } = props;\n const context = useRadioGroupContext(RADIO_ITEM_NAME, props.__scopeMenu);\n const checked = value === context.value;\n return /* @__PURE__ */ jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx(\n MenuItem,\n {\n role: \"menuitemradio\",\n \"aria-checked\": checked,\n ...radioItemProps,\n ref: forwardedRef,\n \"data-state\": getCheckedState(checked),\n onSelect: composeEventHandlers(\n radioItemProps.onSelect,\n () => context.onValueChange?.(value),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nMenuRadioItem.displayName = RADIO_ITEM_NAME;\nvar ITEM_INDICATOR_NAME = \"MenuItemIndicator\";\nvar [ItemIndicatorProvider, useItemIndicatorContext] = createMenuContext(\n ITEM_INDICATOR_NAME,\n { checked: false }\n);\nvar MenuItemIndicator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, forceMount, ...itemIndicatorProps } = props;\n const indicatorContext = useItemIndicatorContext(ITEM_INDICATOR_NAME, __scopeMenu);\n return /* @__PURE__ */ jsx(\n Presence,\n {\n present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n ...itemIndicatorProps,\n ref: forwardedRef,\n \"data-state\": getCheckedState(indicatorContext.checked)\n }\n )\n }\n );\n }\n);\nMenuItemIndicator.displayName = ITEM_INDICATOR_NAME;\nvar SEPARATOR_NAME = \"MenuSeparator\";\nvar MenuSeparator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...separatorProps } = props;\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n role: \"separator\",\n \"aria-orientation\": \"horizontal\",\n ...separatorProps,\n ref: forwardedRef\n }\n );\n }\n);\nMenuSeparator.displayName = SEPARATOR_NAME;\nvar ARROW_NAME = \"MenuArrow\";\nvar MenuArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopeMenu);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nMenuArrow.displayName = ARROW_NAME;\nvar SUB_NAME = \"MenuSub\";\nvar [MenuSubProvider, useMenuSubContext] = createMenuContext(SUB_NAME);\nvar MenuSub = (props) => {\n const { __scopeMenu, children, open = false, onOpenChange } = props;\n const parentMenuContext = useMenuContext(SUB_NAME, __scopeMenu);\n const popperScope = usePopperScope(__scopeMenu);\n const [trigger, setTrigger] = React.useState(null);\n const [content, setContent] = React.useState(null);\n const handleOpenChange = useCallbackRef(onOpenChange);\n React.useEffect(() => {\n if (parentMenuContext.open === false) handleOpenChange(false);\n return () => handleOpenChange(false);\n }, [parentMenuContext.open, handleOpenChange]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n MenuProvider,\n {\n scope: __scopeMenu,\n open,\n onOpenChange: handleOpenChange,\n content,\n onContentChange: setContent,\n children: /* @__PURE__ */ jsx(\n MenuSubProvider,\n {\n scope: __scopeMenu,\n contentId: useId(),\n triggerId: useId(),\n trigger,\n onTriggerChange: setTrigger,\n children\n }\n )\n }\n ) });\n};\nMenuSub.displayName = SUB_NAME;\nvar SUB_TRIGGER_NAME = \"MenuSubTrigger\";\nvar MenuSubTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const context = useMenuContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const subContext = useMenuSubContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const contentContext = useMenuContentContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const openTimerRef = React.useRef(null);\n const { pointerGraceTimerRef, onPointerGraceIntentChange } = contentContext;\n const scope = { __scopeMenu: props.__scopeMenu };\n const clearOpenTimer = React.useCallback(() => {\n if (openTimerRef.current) window.clearTimeout(openTimerRef.current);\n openTimerRef.current = null;\n }, []);\n React.useEffect(() => clearOpenTimer, [clearOpenTimer]);\n React.useEffect(() => {\n const pointerGraceTimer = pointerGraceTimerRef.current;\n return () => {\n window.clearTimeout(pointerGraceTimer);\n onPointerGraceIntentChange(null);\n };\n }, [pointerGraceTimerRef, onPointerGraceIntentChange]);\n return /* @__PURE__ */ jsx(MenuAnchor, { asChild: true, ...scope, children: /* @__PURE__ */ jsx(\n MenuItemImpl,\n {\n id: subContext.triggerId,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": context.open,\n \"aria-controls\": subContext.contentId,\n \"data-state\": getOpenState(context.open),\n ...props,\n ref: composeRefs(forwardedRef, subContext.onTriggerChange),\n onClick: (event) => {\n props.onClick?.(event);\n if (props.disabled || event.defaultPrevented) return;\n event.currentTarget.focus();\n if (!context.open) context.onOpenChange(true);\n },\n onPointerMove: composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n contentContext.onItemEnter(event);\n if (event.defaultPrevented) return;\n if (!props.disabled && !context.open && !openTimerRef.current) {\n contentContext.onPointerGraceIntentChange(null);\n openTimerRef.current = window.setTimeout(() => {\n context.onOpenChange(true);\n clearOpenTimer();\n }, 100);\n }\n })\n ),\n onPointerLeave: composeEventHandlers(\n props.onPointerLeave,\n whenMouse((event) => {\n clearOpenTimer();\n const contentRect = context.content?.getBoundingClientRect();\n if (contentRect) {\n const side = context.content?.dataset.side;\n const rightSide = side === \"right\";\n const bleed = rightSide ? -5 : 5;\n const contentNearEdge = contentRect[rightSide ? \"left\" : \"right\"];\n const contentFarEdge = contentRect[rightSide ? \"right\" : \"left\"];\n contentContext.onPointerGraceIntentChange({\n area: [\n // Apply a bleed on clientX to ensure that our exit point is\n // consistently within polygon bounds\n { x: event.clientX + bleed, y: event.clientY },\n { x: contentNearEdge, y: contentRect.top },\n { x: contentFarEdge, y: contentRect.top },\n { x: contentFarEdge, y: contentRect.bottom },\n { x: contentNearEdge, y: contentRect.bottom }\n ],\n side\n });\n window.clearTimeout(pointerGraceTimerRef.current);\n pointerGraceTimerRef.current = window.setTimeout(\n () => contentContext.onPointerGraceIntentChange(null),\n 300\n );\n } else {\n contentContext.onTriggerLeave(event);\n if (event.defaultPrevented) return;\n contentContext.onPointerGraceIntentChange(null);\n }\n })\n ),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isTypingAhead = contentContext.searchRef.current !== \"\";\n if (props.disabled || isTypingAhead && event.key === \" \") return;\n if (SUB_OPEN_KEYS[rootContext.dir].includes(event.key)) {\n context.onOpenChange(true);\n context.content?.focus();\n event.preventDefault();\n }\n })\n }\n ) });\n }\n);\nMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\nvar SUB_CONTENT_NAME = \"MenuSubContent\";\nvar MenuSubContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu);\n const { forceMount = portalContext.forceMount, ...subContentProps } = props;\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu);\n const subContext = useMenuSubContext(SUB_CONTENT_NAME, props.__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(\n MenuContentImpl,\n {\n id: subContext.contentId,\n \"aria-labelledby\": subContext.triggerId,\n ...subContentProps,\n ref: composedRefs,\n align: \"start\",\n side: rootContext.dir === \"rtl\" ? \"left\" : \"right\",\n disableOutsidePointerEvents: false,\n disableOutsideScroll: false,\n trapFocus: false,\n onOpenAutoFocus: (event) => {\n if (rootContext.isUsingKeyboardRef.current) ref.current?.focus();\n event.preventDefault();\n },\n onCloseAutoFocus: (event) => event.preventDefault(),\n onFocusOutside: composeEventHandlers(props.onFocusOutside, (event) => {\n if (event.target !== subContext.trigger) context.onOpenChange(false);\n }),\n onEscapeKeyDown: composeEventHandlers(props.onEscapeKeyDown, (event) => {\n rootContext.onClose();\n event.preventDefault();\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isKeyDownInside = event.currentTarget.contains(event.target);\n const isCloseKey = SUB_CLOSE_KEYS[rootContext.dir].includes(event.key);\n if (isKeyDownInside && isCloseKey) {\n context.onOpenChange(false);\n subContext.trigger?.focus();\n event.preventDefault();\n }\n })\n }\n ) }) }) });\n }\n);\nMenuSubContent.displayName = SUB_CONTENT_NAME;\nfunction getOpenState(open) {\n return open ? \"open\" : \"closed\";\n}\nfunction isIndeterminate(checked) {\n return checked === \"indeterminate\";\n}\nfunction getCheckedState(checked) {\n return isIndeterminate(checked) ? \"indeterminate\" : checked ? \"checked\" : \"unchecked\";\n}\nfunction focusFirst(candidates) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus();\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nfunction getNextMatch(values, search, currentMatch) {\n const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);\n const normalizedSearch = isRepeated ? search[0] : search;\n const currentMatchIndex = currentMatch ? values.indexOf(currentMatch) : -1;\n let wrappedValues = wrapArray(values, Math.max(currentMatchIndex, 0));\n const excludeCurrentMatch = normalizedSearch.length === 1;\n if (excludeCurrentMatch) wrappedValues = wrappedValues.filter((v) => v !== currentMatch);\n const nextMatch = wrappedValues.find(\n (value) => value.toLowerCase().startsWith(normalizedSearch.toLowerCase())\n );\n return nextMatch !== currentMatch ? nextMatch : void 0;\n}\nfunction isPointInPolygon(point, polygon) {\n const { x, y } = point;\n let inside = false;\n for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {\n const xi = polygon[i].x;\n const yi = polygon[i].y;\n const xj = polygon[j].x;\n const yj = polygon[j].y;\n const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;\n if (intersect) inside = !inside;\n }\n return inside;\n}\nfunction isPointerInGraceArea(event, area) {\n if (!area) return false;\n const cursorPos = { x: event.clientX, y: event.clientY };\n return isPointInPolygon(cursorPos, area);\n}\nfunction whenMouse(handler) {\n return (event) => event.pointerType === \"mouse\" ? handler(event) : void 0;\n}\nvar Root3 = Menu;\nvar Anchor2 = MenuAnchor;\nvar Portal = MenuPortal;\nvar Content2 = MenuContent;\nvar Group = MenuGroup;\nvar Label = MenuLabel;\nvar Item2 = MenuItem;\nvar CheckboxItem = MenuCheckboxItem;\nvar RadioGroup = MenuRadioGroup;\nvar RadioItem = MenuRadioItem;\nvar ItemIndicator = MenuItemIndicator;\nvar Separator = MenuSeparator;\nvar Arrow2 = MenuArrow;\nvar Sub = MenuSub;\nvar SubTrigger = MenuSubTrigger;\nvar SubContent = MenuSubContent;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n CheckboxItem,\n Content2 as Content,\n Group,\n Item2 as Item,\n ItemIndicator,\n Label,\n Menu,\n MenuAnchor,\n MenuArrow,\n MenuCheckboxItem,\n MenuContent,\n MenuGroup,\n MenuItem,\n MenuItemIndicator,\n MenuLabel,\n MenuPortal,\n MenuRadioGroup,\n MenuRadioItem,\n MenuSeparator,\n MenuSub,\n MenuSubContent,\n MenuSubTrigger,\n Portal,\n RadioGroup,\n RadioItem,\n Root3 as Root,\n Separator,\n Sub,\n SubContent,\n SubTrigger,\n createMenuScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["SELECTION_KEYS","LAST_KEYS","FIRST_LAST_KEYS","SUB_OPEN_KEYS","ltr","rtl","SUB_CLOSE_KEYS","MENU_NAME","Collection","useCollection","createCollectionScope","createCollection","createMenuContext","createMenuScope","createContextScope","createPopperScope","createRovingFocusGroupScope","usePopperScope","useRovingFocusGroupScope","MenuProvider","useMenuContext","MenuRootProvider","useMenuRootContext","Menu","props","__scopeMenu","open","children","dir","onOpenChange","modal","popperScope","content","setContent","React","useState","isUsingKeyboardRef","useRef","handleOpenChange","useCallbackRef","direction","useDirection","useEffect","handleKeyDown","current","document","addEventListener","handlePointer","capture","once","removeEventListener","jsx","PopperPrimitive.Root","scope","onContentChange","onClose","useCallback","displayName","MenuAnchor","forwardRef","forwardedRef","anchorProps","PopperPrimitive.Anchor","ref","PORTAL_NAME","PortalProvider","usePortalContext","forceMount","MenuPortal","container","context","Presence","present","PortalPrimitive","asChild","CONTENT_NAME","MenuContentProvider","useMenuContentContext","MenuContent","portalContext","contentProps","rootContext","Provider","Slot","MenuRootContentModal","MenuRootContentNonModal","composedRefs","useComposedRefs","hideOthers","MenuContentImpl","trapFocus","disableOutsidePointerEvents","disableOutsideScroll","onFocusOutside","composeEventHandlers","event","preventDefault","checkForDefaultPrevented","onDismiss","loop","onOpenAutoFocus","onCloseAutoFocus","onEntryFocus","onEscapeKeyDown","onPointerDownOutside","onInteractOutside","rovingFocusGroupScope","getItems","currentItemId","setCurrentItemId","contentRef","timerRef","searchRef","pointerGraceTimerRef","pointerGraceIntentRef","pointerDirRef","lastPointerXRef","ScrollLockWrapper","RemoveScroll","Fragment","scrollLockWrapperProps","as","allowPinchZoom","handleTypeaheadSearch","key","search","items","filter","item","disabled","currentItem","activeElement","currentMatch","find","textValue","nextMatch","values","isRepeated","length","Array","from","every","char","normalizedSearch","currentMatchIndex","indexOf","wrappedValues","array","startIndex","Math","max","map","_","index","v","value","toLowerCase","startsWith","getNextMatch","newItem","updateSearch","window","clearTimeout","setTimeout","focus","useFocusGuards","isPointerMovingToSubmenu","side","area","cursorPos","x","clientX","y","clientY","point","polygon","inside","i","j","xi","yi","xj","yj","isPointInPolygon","isPointerInGraceArea","onItemEnter","onItemLeave","onTriggerLeave","onPointerGraceIntentChange","intent","FocusScope","trapped","onMountAutoFocus","preventScroll","onUnmountAutoFocus","DismissableLayer","RovingFocusGroup.Root","orientation","currentTabStopId","onCurrentTabStopIdChange","preventScrollOnEntryFocus","PopperPrimitive.Content","role","getOpenState","style","outline","onKeyDown","isKeyDownInside","target","closest","currentTarget","isModifierKey","ctrlKey","altKey","metaKey","isCharacterKey","includes","candidateNodes","reverse","candidates","PREVIOUSLY_FOCUSED_ELEMENT","candidate","focusFirst","onBlur","contains","onPointerMove","whenMouse","pointerXHasChanged","newDir","MenuGroup","groupProps","Primitive","div","MenuLabel","labelProps","ITEM_NAME","ITEM_SELECT","MenuItem","onSelect","itemProps","contentContext","isPointerDownRef","MenuItemImpl","onClick","menuItem","itemSelectEvent","CustomEvent","bubbles","cancelable","dispatchDiscreteCustomEvent","defaultPrevented","onPointerDown","onPointerUp","click","isTypingAhead","isFocused","setIsFocused","textContent","setTextContent","trim","ItemSlot","RovingFocusGroup.Item","focusable","onPointerLeave","onFocus","MenuCheckboxItem","checked","onCheckedChange","checkboxItemProps","ItemIndicatorProvider","isIndeterminate","getCheckedState","RADIO_GROUP_NAME","RadioGroupProvider","useRadioGroupContext","onValueChange","MenuRadioGroup","handleValueChange","RADIO_ITEM_NAME","MenuRadioItem","radioItemProps","ITEM_INDICATOR_NAME","useItemIndicatorContext","MenuItemIndicator","itemIndicatorProps","indicatorContext","span","MenuSeparator","separatorProps","MenuArrow","arrowProps","PopperPrimitive.Arrow","SUB_NAME","MenuSubProvider","useMenuSubContext","MenuSub","parentMenuContext","trigger","setTrigger","contentId","useId","triggerId","onTriggerChange","SUB_TRIGGER_NAME","MenuSubTrigger","subContext","openTimerRef","clearOpenTimer","pointerGraceTimer","id","composeRefs","contentRect","getBoundingClientRect","dataset","rightSide","bleed","contentNearEdge","contentFarEdge","top","bottom","SUB_CONTENT_NAME","MenuSubContent","subContentProps","align","isCloseKey","handler","pointerType","Root3","Anchor2","Portal","Content2","Group","Label","Item2","CheckboxItem","RadioGroup","RadioItem","ItemIndicator","Separator","Arrow2","Sub","SubTrigger","SubContent"],"mappings":"o3CAyBA,IAAIA,EAAiB,CAAC,QAAS,KAE3BC,EAAY,CAAC,UAAW,WAAY,OACpCC,EAAkB,CAFJ,YAAa,SAAU,UAEAD,GACrCE,EAAgB,CAClBC,IAAK,IAAIJ,EAAgB,cACzBK,IAAK,IAAIL,EAAgB,cAEvBM,EAAiB,CACnBF,IAAK,CAAC,aACNC,IAAK,CAAC,eAEJE,EAAY,QACXC,EAAYC,EAAeC,GAAyBC,EAAiBJ,IACrEK,EAAmBC,GAAmBC,EAAmBP,EAAW,CACvEG,EACAK,EACAC,IAEEC,EAAiBF,IACjBG,EAA2BF,KAC1BG,EAAcC,GAAkBR,EAAkBL,IAClDc,EAAkBC,GAAsBV,EAAkBL,GAC3DgB,EAAQC,IACV,MAAMC,YAAEA,EAAWC,KAAEA,GAAO,EAAKC,SAAEA,EAAQC,IAAEA,EAAGC,aAAEA,EAAYC,MAAEA,GAAQ,GAASN,EAC3EO,EAAcd,EAAeQ,IAC5BO,EAASC,GAAcC,EAAMC,SAAS,MACvCC,EAAqBF,EAAMG,QAAO,GAClCC,EAAmBC,EAAeV,GAClCW,EAAYC,EAAab,GAe/B,OAdAM,EAAMQ,WAAU,KACd,MAAMC,EAAgB,KACpBP,EAAmBQ,SAAU,EAC7BC,SAASC,iBAAiB,cAAeC,EAAe,C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,CACT,CACA,SAASK,GAAgBL,GACvB,OAAOI,GAAgBJ,GAAW,gBAAkBA,EAAU,UAAY,WAC5E,CA0CA,SAASxC,GAAUmG,GACjB,OAAQtO,GAAgC,UAAtBA,EAAMuO,YAA0BD,EAAQtO,QAAS,CACrE,CArDAkO,GAAexQ,YAAcuQ,GAsD1B,IAACO,GAAQhT,EACRiT,GAAU9Q,EACV+Q,GAASrQ,EACTsQ,GAAW5P,GACX6P,GAAQtG,GACRuG,GAAQnG,GACRoG,GAAQhG,GACRiG,GAAerE,GACfsE,GAAa3D,GACb4D,GAAYzD,GACZ0D,GAAgBtD,GAChBuD,GAAYnD,GACZoD,GAASlD,GACTmD,GAAM7C,GACN8C,GAAarC,GACbsC,GAAarB"}
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../node_modules/@radix-ui/react-menu/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/menu/src/Menu.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs, composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport * as RovingFocusGroup from \"@radix-ui/react-roving-focus\";\nimport { createRovingFocusGroupScope } from \"@radix-ui/react-roving-focus\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar SELECTION_KEYS = [\"Enter\", \" \"];\nvar FIRST_KEYS = [\"ArrowDown\", \"PageUp\", \"Home\"];\nvar LAST_KEYS = [\"ArrowUp\", \"PageDown\", \"End\"];\nvar FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS];\nvar SUB_OPEN_KEYS = {\n ltr: [...SELECTION_KEYS, \"ArrowRight\"],\n rtl: [...SELECTION_KEYS, \"ArrowLeft\"]\n};\nvar SUB_CLOSE_KEYS = {\n ltr: [\"ArrowLeft\"],\n rtl: [\"ArrowRight\"]\n};\nvar MENU_NAME = \"Menu\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(MENU_NAME);\nvar [createMenuContext, createMenuScope] = createContextScope(MENU_NAME, [\n createCollectionScope,\n createPopperScope,\n createRovingFocusGroupScope\n]);\nvar usePopperScope = createPopperScope();\nvar useRovingFocusGroupScope = createRovingFocusGroupScope();\nvar [MenuProvider, useMenuContext] = createMenuContext(MENU_NAME);\nvar [MenuRootProvider, useMenuRootContext] = createMenuContext(MENU_NAME);\nvar Menu = (props) => {\n const { __scopeMenu, open = false, children, dir, onOpenChange, modal = true } = props;\n const popperScope = usePopperScope(__scopeMenu);\n const [content, setContent] = React.useState(null);\n const isUsingKeyboardRef = React.useRef(false);\n const handleOpenChange = useCallbackRef(onOpenChange);\n const direction = useDirection(dir);\n React.useEffect(() => {\n const handleKeyDown = () => {\n isUsingKeyboardRef.current = true;\n document.addEventListener(\"pointerdown\", handlePointer, { capture: true, once: true });\n document.addEventListener(\"pointermove\", handlePointer, { capture: true, once: true });\n };\n const handlePointer = () => isUsingKeyboardRef.current = false;\n document.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => {\n document.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n document.removeEventListener(\"pointerdown\", handlePointer, { capture: true });\n document.removeEventListener(\"pointermove\", handlePointer, { capture: true });\n };\n }, []);\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n MenuProvider,\n {\n scope: __scopeMenu,\n open,\n onOpenChange: handleOpenChange,\n content,\n onContentChange: setContent,\n children: /* @__PURE__ */ jsx(\n MenuRootProvider,\n {\n scope: __scopeMenu,\n onClose: React.useCallback(() => handleOpenChange(false), [handleOpenChange]),\n isUsingKeyboardRef,\n dir: direction,\n modal,\n children\n }\n )\n }\n ) });\n};\nMenu.displayName = MENU_NAME;\nvar ANCHOR_NAME = \"MenuAnchor\";\nvar MenuAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...anchorProps } = props;\n const popperScope = usePopperScope(__scopeMenu);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nMenuAnchor.displayName = ANCHOR_NAME;\nvar PORTAL_NAME = \"MenuPortal\";\nvar [PortalProvider, usePortalContext] = createMenuContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar MenuPortal = (props) => {\n const { __scopeMenu, forceMount, children, container } = props;\n const context = useMenuContext(PORTAL_NAME, __scopeMenu);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeMenu, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nMenuPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"MenuContent\";\nvar [MenuContentProvider, useMenuContentContext] = createMenuContext(CONTENT_NAME);\nvar MenuContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu);\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeMenu, children: rootContext.modal ? /* @__PURE__ */ jsx(MenuRootContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(MenuRootContentNonModal, { ...contentProps, ref: forwardedRef }) }) }) });\n }\n);\nvar MenuRootContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const content = ref.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n MenuContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: context.open,\n disableOutsideScroll: true,\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n ),\n onDismiss: () => context.onOpenChange(false)\n }\n );\n }\n);\nvar MenuRootContentNonModal = React.forwardRef((props, forwardedRef) => {\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n return /* @__PURE__ */ jsx(\n MenuContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n disableOutsideScroll: false,\n onDismiss: () => context.onOpenChange(false)\n }\n );\n});\nvar MenuContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeMenu,\n loop = false,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEntryFocus,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n disableOutsideScroll,\n ...contentProps\n } = props;\n const context = useMenuContext(CONTENT_NAME, __scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, __scopeMenu);\n const popperScope = usePopperScope(__scopeMenu);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);\n const getItems = useCollection(__scopeMenu);\n const [currentItemId, setCurrentItemId] = React.useState(null);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef, context.onContentChange);\n const timerRef = React.useRef(0);\n const searchRef = React.useRef(\"\");\n const pointerGraceTimerRef = React.useRef(0);\n const pointerGraceIntentRef = React.useRef(null);\n const pointerDirRef = React.useRef(\"right\");\n const lastPointerXRef = React.useRef(0);\n const ScrollLockWrapper = disableOutsideScroll ? RemoveScroll : React.Fragment;\n const scrollLockWrapperProps = disableOutsideScroll ? { as: Slot, allowPinchZoom: true } : void 0;\n const handleTypeaheadSearch = (key) => {\n const search = searchRef.current + key;\n const items = getItems().filter((item) => !item.disabled);\n const currentItem = document.activeElement;\n const currentMatch = items.find((item) => item.ref.current === currentItem)?.textValue;\n const values = items.map((item) => item.textValue);\n const nextMatch = getNextMatch(values, search, currentMatch);\n const newItem = items.find((item) => item.textValue === nextMatch)?.ref.current;\n (function updateSearch(value) {\n searchRef.current = value;\n window.clearTimeout(timerRef.current);\n if (value !== \"\") timerRef.current = window.setTimeout(() => updateSearch(\"\"), 1e3);\n })(search);\n if (newItem) {\n setTimeout(() => newItem.focus());\n }\n };\n React.useEffect(() => {\n return () => window.clearTimeout(timerRef.current);\n }, []);\n useFocusGuards();\n const isPointerMovingToSubmenu = React.useCallback((event) => {\n const isMovingTowards = pointerDirRef.current === pointerGraceIntentRef.current?.side;\n return isMovingTowards && isPointerInGraceArea(event, pointerGraceIntentRef.current?.area);\n }, []);\n return /* @__PURE__ */ jsx(\n MenuContentProvider,\n {\n scope: __scopeMenu,\n searchRef,\n onItemEnter: React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) event.preventDefault();\n },\n [isPointerMovingToSubmenu]\n ),\n onItemLeave: React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) return;\n contentRef.current?.focus();\n setCurrentItemId(null);\n },\n [isPointerMovingToSubmenu]\n ),\n onTriggerLeave: React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) event.preventDefault();\n },\n [isPointerMovingToSubmenu]\n ),\n pointerGraceTimerRef,\n onPointerGraceIntentChange: React.useCallback((intent) => {\n pointerGraceIntentRef.current = intent;\n }, []),\n children: /* @__PURE__ */ jsx(ScrollLockWrapper, { ...scrollLockWrapperProps, children: /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n trapped: trapFocus,\n onMountAutoFocus: composeEventHandlers(onOpenAutoFocus, (event) => {\n event.preventDefault();\n contentRef.current?.focus({ preventScroll: true });\n }),\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n children: /* @__PURE__ */ jsx(\n RovingFocusGroup.Root,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n dir: rootContext.dir,\n orientation: \"vertical\",\n loop,\n currentTabStopId: currentItemId,\n onCurrentTabStopIdChange: setCurrentItemId,\n onEntryFocus: composeEventHandlers(onEntryFocus, (event) => {\n if (!rootContext.isUsingKeyboardRef.current) event.preventDefault();\n }),\n preventScrollOnEntryFocus: true,\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n role: \"menu\",\n \"aria-orientation\": \"vertical\",\n \"data-state\": getOpenState(context.open),\n \"data-radix-menu-content\": \"\",\n dir: rootContext.dir,\n ...popperScope,\n ...contentProps,\n ref: composedRefs,\n style: { outline: \"none\", ...contentProps.style },\n onKeyDown: composeEventHandlers(contentProps.onKeyDown, (event) => {\n const target = event.target;\n const isKeyDownInside = target.closest(\"[data-radix-menu-content]\") === event.currentTarget;\n const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n const isCharacterKey = event.key.length === 1;\n if (isKeyDownInside) {\n if (event.key === \"Tab\") event.preventDefault();\n if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(event.key);\n }\n const content = contentRef.current;\n if (event.target !== content) return;\n if (!FIRST_LAST_KEYS.includes(event.key)) return;\n event.preventDefault();\n const items = getItems().filter((item) => !item.disabled);\n const candidateNodes = items.map((item) => item.ref.current);\n if (LAST_KEYS.includes(event.key)) candidateNodes.reverse();\n focusFirst(candidateNodes);\n }),\n onBlur: composeEventHandlers(props.onBlur, (event) => {\n if (!event.currentTarget.contains(event.target)) {\n window.clearTimeout(timerRef.current);\n searchRef.current = \"\";\n }\n }),\n onPointerMove: composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n const target = event.target;\n const pointerXHasChanged = lastPointerXRef.current !== event.clientX;\n if (event.currentTarget.contains(target) && pointerXHasChanged) {\n const newDir = event.clientX > lastPointerXRef.current ? \"right\" : \"left\";\n pointerDirRef.current = newDir;\n lastPointerXRef.current = event.clientX;\n }\n })\n )\n }\n )\n }\n )\n }\n )\n }\n ) })\n }\n );\n }\n);\nMenuContent.displayName = CONTENT_NAME;\nvar GROUP_NAME = \"MenuGroup\";\nvar MenuGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...groupProps } = props;\n return /* @__PURE__ */ jsx(Primitive.div, { role: \"group\", ...groupProps, ref: forwardedRef });\n }\n);\nMenuGroup.displayName = GROUP_NAME;\nvar LABEL_NAME = \"MenuLabel\";\nvar MenuLabel = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...labelProps } = props;\n return /* @__PURE__ */ jsx(Primitive.div, { ...labelProps, ref: forwardedRef });\n }\n);\nMenuLabel.displayName = LABEL_NAME;\nvar ITEM_NAME = \"MenuItem\";\nvar ITEM_SELECT = \"menu.itemSelect\";\nvar MenuItem = React.forwardRef(\n (props, forwardedRef) => {\n const { disabled = false, onSelect, ...itemProps } = props;\n const ref = React.useRef(null);\n const rootContext = useMenuRootContext(ITEM_NAME, props.__scopeMenu);\n const contentContext = useMenuContentContext(ITEM_NAME, props.__scopeMenu);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const isPointerDownRef = React.useRef(false);\n const handleSelect = () => {\n const menuItem = ref.current;\n if (!disabled && menuItem) {\n const itemSelectEvent = new CustomEvent(ITEM_SELECT, { bubbles: true, cancelable: true });\n menuItem.addEventListener(ITEM_SELECT, (event) => onSelect?.(event), { once: true });\n dispatchDiscreteCustomEvent(menuItem, itemSelectEvent);\n if (itemSelectEvent.defaultPrevented) {\n isPointerDownRef.current = false;\n } else {\n rootContext.onClose();\n }\n }\n };\n return /* @__PURE__ */ jsx(\n MenuItemImpl,\n {\n ...itemProps,\n ref: composedRefs,\n disabled,\n onClick: composeEventHandlers(props.onClick, handleSelect),\n onPointerDown: (event) => {\n props.onPointerDown?.(event);\n isPointerDownRef.current = true;\n },\n onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {\n if (!isPointerDownRef.current) event.currentTarget?.click();\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isTypingAhead = contentContext.searchRef.current !== \"\";\n if (disabled || isTypingAhead && event.key === \" \") return;\n if (SELECTION_KEYS.includes(event.key)) {\n event.currentTarget.click();\n event.preventDefault();\n }\n })\n }\n );\n }\n);\nMenuItem.displayName = ITEM_NAME;\nvar MenuItemImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, disabled = false, textValue, ...itemProps } = props;\n const contentContext = useMenuContentContext(ITEM_NAME, __scopeMenu);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const [isFocused, setIsFocused] = React.useState(false);\n const [textContent, setTextContent] = React.useState(\"\");\n React.useEffect(() => {\n const menuItem = ref.current;\n if (menuItem) {\n setTextContent((menuItem.textContent ?? \"\").trim());\n }\n }, [itemProps.children]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeMenu,\n disabled,\n textValue: textValue ?? textContent,\n children: /* @__PURE__ */ jsx(RovingFocusGroup.Item, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n role: \"menuitem\",\n \"data-highlighted\": isFocused ? \"\" : void 0,\n \"aria-disabled\": disabled || void 0,\n \"data-disabled\": disabled ? \"\" : void 0,\n ...itemProps,\n ref: composedRefs,\n onPointerMove: composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n if (disabled) {\n contentContext.onItemLeave(event);\n } else {\n contentContext.onItemEnter(event);\n if (!event.defaultPrevented) {\n const item = event.currentTarget;\n item.focus({ preventScroll: true });\n }\n }\n })\n ),\n onPointerLeave: composeEventHandlers(\n props.onPointerLeave,\n whenMouse((event) => contentContext.onItemLeave(event))\n ),\n onFocus: composeEventHandlers(props.onFocus, () => setIsFocused(true)),\n onBlur: composeEventHandlers(props.onBlur, () => setIsFocused(false))\n }\n ) })\n }\n );\n }\n);\nvar CHECKBOX_ITEM_NAME = \"MenuCheckboxItem\";\nvar MenuCheckboxItem = React.forwardRef(\n (props, forwardedRef) => {\n const { checked = false, onCheckedChange, ...checkboxItemProps } = props;\n return /* @__PURE__ */ jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx(\n MenuItem,\n {\n role: \"menuitemcheckbox\",\n \"aria-checked\": isIndeterminate(checked) ? \"mixed\" : checked,\n ...checkboxItemProps,\n ref: forwardedRef,\n \"data-state\": getCheckedState(checked),\n onSelect: composeEventHandlers(\n checkboxItemProps.onSelect,\n () => onCheckedChange?.(isIndeterminate(checked) ? true : !checked),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\nvar RADIO_GROUP_NAME = \"MenuRadioGroup\";\nvar [RadioGroupProvider, useRadioGroupContext] = createMenuContext(\n RADIO_GROUP_NAME,\n { value: void 0, onValueChange: () => {\n } }\n);\nvar MenuRadioGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { value, onValueChange, ...groupProps } = props;\n const handleValueChange = useCallbackRef(onValueChange);\n return /* @__PURE__ */ jsx(RadioGroupProvider, { scope: props.__scopeMenu, value, onValueChange: handleValueChange, children: /* @__PURE__ */ jsx(MenuGroup, { ...groupProps, ref: forwardedRef }) });\n }\n);\nMenuRadioGroup.displayName = RADIO_GROUP_NAME;\nvar RADIO_ITEM_NAME = \"MenuRadioItem\";\nvar MenuRadioItem = React.forwardRef(\n (props, forwardedRef) => {\n const { value, ...radioItemProps } = props;\n const context = useRadioGroupContext(RADIO_ITEM_NAME, props.__scopeMenu);\n const checked = value === context.value;\n return /* @__PURE__ */ jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx(\n MenuItem,\n {\n role: \"menuitemradio\",\n \"aria-checked\": checked,\n ...radioItemProps,\n ref: forwardedRef,\n \"data-state\": getCheckedState(checked),\n onSelect: composeEventHandlers(\n radioItemProps.onSelect,\n () => context.onValueChange?.(value),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nMenuRadioItem.displayName = RADIO_ITEM_NAME;\nvar ITEM_INDICATOR_NAME = \"MenuItemIndicator\";\nvar [ItemIndicatorProvider, useItemIndicatorContext] = createMenuContext(\n ITEM_INDICATOR_NAME,\n { checked: false }\n);\nvar MenuItemIndicator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, forceMount, ...itemIndicatorProps } = props;\n const indicatorContext = useItemIndicatorContext(ITEM_INDICATOR_NAME, __scopeMenu);\n return /* @__PURE__ */ jsx(\n Presence,\n {\n present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n ...itemIndicatorProps,\n ref: forwardedRef,\n \"data-state\": getCheckedState(indicatorContext.checked)\n }\n )\n }\n );\n }\n);\nMenuItemIndicator.displayName = ITEM_INDICATOR_NAME;\nvar SEPARATOR_NAME = \"MenuSeparator\";\nvar MenuSeparator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...separatorProps } = props;\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n role: \"separator\",\n \"aria-orientation\": \"horizontal\",\n ...separatorProps,\n ref: forwardedRef\n }\n );\n }\n);\nMenuSeparator.displayName = SEPARATOR_NAME;\nvar ARROW_NAME = \"MenuArrow\";\nvar MenuArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopeMenu);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nMenuArrow.displayName = ARROW_NAME;\nvar SUB_NAME = \"MenuSub\";\nvar [MenuSubProvider, useMenuSubContext] = createMenuContext(SUB_NAME);\nvar MenuSub = (props) => {\n const { __scopeMenu, children, open = false, onOpenChange } = props;\n const parentMenuContext = useMenuContext(SUB_NAME, __scopeMenu);\n const popperScope = usePopperScope(__scopeMenu);\n const [trigger, setTrigger] = React.useState(null);\n const [content, setContent] = React.useState(null);\n const handleOpenChange = useCallbackRef(onOpenChange);\n React.useEffect(() => {\n if (parentMenuContext.open === false) handleOpenChange(false);\n return () => handleOpenChange(false);\n }, [parentMenuContext.open, handleOpenChange]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n MenuProvider,\n {\n scope: __scopeMenu,\n open,\n onOpenChange: handleOpenChange,\n content,\n onContentChange: setContent,\n children: /* @__PURE__ */ jsx(\n MenuSubProvider,\n {\n scope: __scopeMenu,\n contentId: useId(),\n triggerId: useId(),\n trigger,\n onTriggerChange: setTrigger,\n children\n }\n )\n }\n ) });\n};\nMenuSub.displayName = SUB_NAME;\nvar SUB_TRIGGER_NAME = \"MenuSubTrigger\";\nvar MenuSubTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const context = useMenuContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const subContext = useMenuSubContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const contentContext = useMenuContentContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const openTimerRef = React.useRef(null);\n const { pointerGraceTimerRef, onPointerGraceIntentChange } = contentContext;\n const scope = { __scopeMenu: props.__scopeMenu };\n const clearOpenTimer = React.useCallback(() => {\n if (openTimerRef.current) window.clearTimeout(openTimerRef.current);\n openTimerRef.current = null;\n }, []);\n React.useEffect(() => clearOpenTimer, [clearOpenTimer]);\n React.useEffect(() => {\n const pointerGraceTimer = pointerGraceTimerRef.current;\n return () => {\n window.clearTimeout(pointerGraceTimer);\n onPointerGraceIntentChange(null);\n };\n }, [pointerGraceTimerRef, onPointerGraceIntentChange]);\n return /* @__PURE__ */ jsx(MenuAnchor, { asChild: true, ...scope, children: /* @__PURE__ */ jsx(\n MenuItemImpl,\n {\n id: subContext.triggerId,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": context.open,\n \"aria-controls\": subContext.contentId,\n \"data-state\": getOpenState(context.open),\n ...props,\n ref: composeRefs(forwardedRef, subContext.onTriggerChange),\n onClick: (event) => {\n props.onClick?.(event);\n if (props.disabled || event.defaultPrevented) return;\n event.currentTarget.focus();\n if (!context.open) context.onOpenChange(true);\n },\n onPointerMove: composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n contentContext.onItemEnter(event);\n if (event.defaultPrevented) return;\n if (!props.disabled && !context.open && !openTimerRef.current) {\n contentContext.onPointerGraceIntentChange(null);\n openTimerRef.current = window.setTimeout(() => {\n context.onOpenChange(true);\n clearOpenTimer();\n }, 100);\n }\n })\n ),\n onPointerLeave: composeEventHandlers(\n props.onPointerLeave,\n whenMouse((event) => {\n clearOpenTimer();\n const contentRect = context.content?.getBoundingClientRect();\n if (contentRect) {\n const side = context.content?.dataset.side;\n const rightSide = side === \"right\";\n const bleed = rightSide ? -5 : 5;\n const contentNearEdge = contentRect[rightSide ? \"left\" : \"right\"];\n const contentFarEdge = contentRect[rightSide ? \"right\" : \"left\"];\n contentContext.onPointerGraceIntentChange({\n area: [\n // Apply a bleed on clientX to ensure that our exit point is\n // consistently within polygon bounds\n { x: event.clientX + bleed, y: event.clientY },\n { x: contentNearEdge, y: contentRect.top },\n { x: contentFarEdge, y: contentRect.top },\n { x: contentFarEdge, y: contentRect.bottom },\n { x: contentNearEdge, y: contentRect.bottom }\n ],\n side\n });\n window.clearTimeout(pointerGraceTimerRef.current);\n pointerGraceTimerRef.current = window.setTimeout(\n () => contentContext.onPointerGraceIntentChange(null),\n 300\n );\n } else {\n contentContext.onTriggerLeave(event);\n if (event.defaultPrevented) return;\n contentContext.onPointerGraceIntentChange(null);\n }\n })\n ),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isTypingAhead = contentContext.searchRef.current !== \"\";\n if (props.disabled || isTypingAhead && event.key === \" \") return;\n if (SUB_OPEN_KEYS[rootContext.dir].includes(event.key)) {\n context.onOpenChange(true);\n context.content?.focus();\n event.preventDefault();\n }\n })\n }\n ) });\n }\n);\nMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\nvar SUB_CONTENT_NAME = \"MenuSubContent\";\nvar MenuSubContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu);\n const { forceMount = portalContext.forceMount, ...subContentProps } = props;\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu);\n const subContext = useMenuSubContext(SUB_CONTENT_NAME, props.__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(\n MenuContentImpl,\n {\n id: subContext.contentId,\n \"aria-labelledby\": subContext.triggerId,\n ...subContentProps,\n ref: composedRefs,\n align: \"start\",\n side: rootContext.dir === \"rtl\" ? \"left\" : \"right\",\n disableOutsidePointerEvents: false,\n disableOutsideScroll: false,\n trapFocus: false,\n onOpenAutoFocus: (event) => {\n if (rootContext.isUsingKeyboardRef.current) ref.current?.focus();\n event.preventDefault();\n },\n onCloseAutoFocus: (event) => event.preventDefault(),\n onFocusOutside: composeEventHandlers(props.onFocusOutside, (event) => {\n if (event.target !== subContext.trigger) context.onOpenChange(false);\n }),\n onEscapeKeyDown: composeEventHandlers(props.onEscapeKeyDown, (event) => {\n rootContext.onClose();\n event.preventDefault();\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isKeyDownInside = event.currentTarget.contains(event.target);\n const isCloseKey = SUB_CLOSE_KEYS[rootContext.dir].includes(event.key);\n if (isKeyDownInside && isCloseKey) {\n context.onOpenChange(false);\n subContext.trigger?.focus();\n event.preventDefault();\n }\n })\n }\n ) }) }) });\n }\n);\nMenuSubContent.displayName = SUB_CONTENT_NAME;\nfunction getOpenState(open) {\n return open ? \"open\" : \"closed\";\n}\nfunction isIndeterminate(checked) {\n return checked === \"indeterminate\";\n}\nfunction getCheckedState(checked) {\n return isIndeterminate(checked) ? \"indeterminate\" : checked ? \"checked\" : \"unchecked\";\n}\nfunction focusFirst(candidates) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus();\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nfunction getNextMatch(values, search, currentMatch) {\n const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);\n const normalizedSearch = isRepeated ? search[0] : search;\n const currentMatchIndex = currentMatch ? values.indexOf(currentMatch) : -1;\n let wrappedValues = wrapArray(values, Math.max(currentMatchIndex, 0));\n const excludeCurrentMatch = normalizedSearch.length === 1;\n if (excludeCurrentMatch) wrappedValues = wrappedValues.filter((v) => v !== currentMatch);\n const nextMatch = wrappedValues.find(\n (value) => value.toLowerCase().startsWith(normalizedSearch.toLowerCase())\n );\n return nextMatch !== currentMatch ? nextMatch : void 0;\n}\nfunction isPointInPolygon(point, polygon) {\n const { x, y } = point;\n let inside = false;\n for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {\n const xi = polygon[i].x;\n const yi = polygon[i].y;\n const xj = polygon[j].x;\n const yj = polygon[j].y;\n const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;\n if (intersect) inside = !inside;\n }\n return inside;\n}\nfunction isPointerInGraceArea(event, area) {\n if (!area) return false;\n const cursorPos = { x: event.clientX, y: event.clientY };\n return isPointInPolygon(cursorPos, area);\n}\nfunction whenMouse(handler) {\n return (event) => event.pointerType === \"mouse\" ? handler(event) : void 0;\n}\nvar Root3 = Menu;\nvar Anchor2 = MenuAnchor;\nvar Portal = MenuPortal;\nvar Content2 = MenuContent;\nvar Group = MenuGroup;\nvar Label = MenuLabel;\nvar Item2 = MenuItem;\nvar CheckboxItem = MenuCheckboxItem;\nvar RadioGroup = MenuRadioGroup;\nvar RadioItem = MenuRadioItem;\nvar ItemIndicator = MenuItemIndicator;\nvar Separator = MenuSeparator;\nvar Arrow2 = MenuArrow;\nvar Sub = MenuSub;\nvar SubTrigger = MenuSubTrigger;\nvar SubContent = MenuSubContent;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n CheckboxItem,\n Content2 as Content,\n Group,\n Item2 as Item,\n ItemIndicator,\n Label,\n Menu,\n MenuAnchor,\n MenuArrow,\n MenuCheckboxItem,\n MenuContent,\n MenuGroup,\n MenuItem,\n MenuItemIndicator,\n MenuLabel,\n MenuPortal,\n MenuRadioGroup,\n MenuRadioItem,\n MenuSeparator,\n MenuSub,\n MenuSubContent,\n MenuSubTrigger,\n Portal,\n RadioGroup,\n RadioItem,\n Root3 as Root,\n Separator,\n Sub,\n SubContent,\n SubTrigger,\n createMenuScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["SELECTION_KEYS","LAST_KEYS","FIRST_LAST_KEYS","SUB_OPEN_KEYS","ltr","rtl","SUB_CLOSE_KEYS","MENU_NAME","Collection","useCollection","createCollectionScope","createCollection","createMenuContext","createMenuScope","createContextScope","createPopperScope","createRovingFocusGroupScope","usePopperScope","useRovingFocusGroupScope","MenuProvider","useMenuContext","MenuRootProvider","useMenuRootContext","Menu","props","__scopeMenu","open","children","dir","onOpenChange","modal","popperScope","content","setContent","React","useState","isUsingKeyboardRef","useRef","handleOpenChange","useCallbackRef","direction","useDirection","useEffect","handleKeyDown","current","document","addEventListener","handlePointer","capture","once","removeEventListener","jsx","PopperPrimitive.Root","scope","onContentChange","onClose","useCallback","displayName","MenuAnchor","forwardRef","forwardedRef","anchorProps","PopperPrimitive.Anchor","ref","PORTAL_NAME","PortalProvider","usePortalContext","forceMount","MenuPortal","container","context","Presence","present","PortalPrimitive","asChild","CONTENT_NAME","MenuContentProvider","useMenuContentContext","MenuContent","portalContext","contentProps","rootContext","Provider","Slot","MenuRootContentModal","MenuRootContentNonModal","composedRefs","useComposedRefs","hideOthers","MenuContentImpl","trapFocus","disableOutsidePointerEvents","disableOutsideScroll","onFocusOutside","composeEventHandlers","event","preventDefault","checkForDefaultPrevented","onDismiss","loop","onOpenAutoFocus","onCloseAutoFocus","onEntryFocus","onEscapeKeyDown","onPointerDownOutside","onInteractOutside","rovingFocusGroupScope","getItems","currentItemId","setCurrentItemId","contentRef","timerRef","searchRef","pointerGraceTimerRef","pointerGraceIntentRef","pointerDirRef","lastPointerXRef","ScrollLockWrapper","RemoveScroll","Fragment","scrollLockWrapperProps","as","allowPinchZoom","handleTypeaheadSearch","key","search","items","filter","item","disabled","currentItem","activeElement","currentMatch","find","textValue","nextMatch","values","isRepeated","length","Array","from","every","char","normalizedSearch","currentMatchIndex","indexOf","wrappedValues","array","startIndex","Math","max","map","_","index","v","value","toLowerCase","startsWith","getNextMatch","newItem","updateSearch","window","clearTimeout","setTimeout","focus","useFocusGuards","isPointerMovingToSubmenu","side","area","cursorPos","x","clientX","y","clientY","point","polygon","inside","i","j","xi","yi","xj","yj","isPointInPolygon","isPointerInGraceArea","onItemEnter","onItemLeave","onTriggerLeave","onPointerGraceIntentChange","intent","FocusScope","trapped","onMountAutoFocus","preventScroll","onUnmountAutoFocus","DismissableLayer","RovingFocusGroup.Root","orientation","currentTabStopId","onCurrentTabStopIdChange","preventScrollOnEntryFocus","PopperPrimitive.Content","role","getOpenState","style","outline","onKeyDown","isKeyDownInside","target","closest","currentTarget","isModifierKey","ctrlKey","altKey","metaKey","isCharacterKey","includes","candidateNodes","reverse","candidates","PREVIOUSLY_FOCUSED_ELEMENT","candidate","focusFirst","onBlur","contains","onPointerMove","whenMouse","pointerXHasChanged","newDir","MenuGroup","groupProps","Primitive","div","MenuLabel","labelProps","ITEM_NAME","ITEM_SELECT","MenuItem","onSelect","itemProps","contentContext","isPointerDownRef","MenuItemImpl","onClick","menuItem","itemSelectEvent","CustomEvent","bubbles","cancelable","dispatchDiscreteCustomEvent","defaultPrevented","onPointerDown","onPointerUp","click","isTypingAhead","isFocused","setIsFocused","textContent","setTextContent","trim","ItemSlot","RovingFocusGroup.Item","focusable","onPointerLeave","onFocus","MenuCheckboxItem","checked","onCheckedChange","checkboxItemProps","ItemIndicatorProvider","isIndeterminate","getCheckedState","RADIO_GROUP_NAME","RadioGroupProvider","useRadioGroupContext","onValueChange","MenuRadioGroup","handleValueChange","RADIO_ITEM_NAME","MenuRadioItem","radioItemProps","ITEM_INDICATOR_NAME","useItemIndicatorContext","MenuItemIndicator","itemIndicatorProps","indicatorContext","span","MenuSeparator","separatorProps","MenuArrow","arrowProps","PopperPrimitive.Arrow","SUB_NAME","MenuSubProvider","useMenuSubContext","MenuSub","parentMenuContext","trigger","setTrigger","contentId","useId","triggerId","onTriggerChange","SUB_TRIGGER_NAME","MenuSubTrigger","subContext","openTimerRef","clearOpenTimer","pointerGraceTimer","id","composeRefs","contentRect","getBoundingClientRect","dataset","rightSide","bleed","contentNearEdge","contentFarEdge","top","bottom","SUB_CONTENT_NAME","MenuSubContent","subContentProps","align","isCloseKey","handler","pointerType","Root3","Anchor2","Portal","Content2","Group","Label","Item2","CheckboxItem","RadioGroup","RadioItem","ItemIndicator","Separator","Arrow2","Sub","SubTrigger","SubContent"],"mappings":"m2CAyBA,IAAIA,EAAiB,CAAC,QAAS,KAE3BC,EAAY,CAAC,UAAW,WAAY,OACpCC,EAAkB,CAFJ,YAAa,SAAU,UAEAD,GACrCE,EAAgB,CAClBC,IAAK,IAAIJ,EAAgB,cACzBK,IAAK,IAAIL,EAAgB,cAEvBM,EAAiB,CACnBF,IAAK,CAAC,aACNC,IAAK,CAAC,eAEJE,EAAY,QACXC,EAAYC,EAAeC,GAAyBC,EAAiBJ,IACrEK,EAAmBC,GAAmBC,EAAmBP,EAAW,CACvEG,EACAK,EACAC,IAEEC,EAAiBF,IACjBG,EAA2BF,KAC1BG,EAAcC,GAAkBR,EAAkBL,IAClDc,EAAkBC,GAAsBV,EAAkBL,GAC3DgB,EAAQC,IACV,MAAMC,YAAEA,EAAWC,KAAEA,GAAO,EAAKC,SAAEA,EAAQC,IAAEA,EAAGC,aAAEA,EAAYC,MAAEA,GAAQ,GAASN,EAC3EO,EAAcd,EAAeQ,IAC5BO,EAASC,GAAcC,EAAMC,SAAS,MACvCC,EAAqBF,EAAMG,QAAO,GAClCC,EAAmBC,EAAeV,GAClCW,EAAYC,EAAab,GAe/B,OAdAM,EAAMQ,WAAU,KACd,MAAMC,EAAgB,KACpBP,EAAmBQ,SAAU,EAC7BC,SAASC,iBAAiB,cAAeC,EAAe,CAAEC,SAAS,EAAMC,MAAM,IAC/EJ,SAASC,iBAAiB,cAAeC,EAAe,CAAEC,SAAS,EAAMC,MAAM,GAAO,EAElFF,EAAgB,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D,GAChBuD,GAAYnD,GACZoD,GAASlD,GACTmD,GAAM7C,GACN8C,GAAarC,GACbsC,GAAarB"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import*as e from"react";import{createCollection as r}from"../../react-collection/dist/index.mjs";import{useDirection as a}from"../../react-direction/dist/index.mjs";import{composeEventHandlers as n}from"../../primitive/dist/index.mjs";import{useComposedRefs as o}from"../../react-compose-refs/dist/index.mjs";import{createContextScope as t}from"../../react-context/dist/index.mjs";import{useId as i}from"../../react-id/dist/index.mjs";import{createMenuScope as
|
1
|
+
import*as e from"react";import{createCollection as r}from"../../react-collection/dist/index.mjs";import{useDirection as a}from"../../react-direction/dist/index.mjs";import{composeEventHandlers as n}from"../../primitive/dist/index.mjs";import{useComposedRefs as o}from"../../react-compose-refs/dist/index.mjs";import{createContextScope as t}from"../../react-context/dist/index.mjs";import{useId as i}from"../../react-id/dist/index.mjs";import{createMenuScope as u,Anchor as s,Content as d,Group as l,Label as p,Item as c,CheckboxItem as f,RadioGroup as m,RadioItem as b,ItemIndicator as g,Separator as v,Arrow as h,SubTrigger as M,SubContent as x,Root as w,Portal as y,Sub as _}from"../../react-menu/dist/index.mjs";import{createRovingFocusGroupScope as R,Root as C,Item as I}from"../../react-roving-focus/dist/index.mjs";import{Primitive as O}from"../../react-primitive/dist/index.mjs";import{useControllableState as N}from"../../react-use-controllable-state/dist/index.mjs";import{jsx as A}from"react/jsx-runtime";var S="Menubar",[D,T,j]=r(S),[k,P]=t(S,[j,R]),E=u(),F=R(),[K,B]=k(S),L=e.forwardRef(((r,n)=>{const{__scopeMenubar:o,value:t,onValueChange:i,defaultValue:u,loop:s=!0,dir:d,...l}=r,p=a(d),c=F(o),[f="",m]=N({prop:t,onChange:i,defaultProp:u}),[b,g]=e.useState(null);return A(K,{scope:o,value:f,onMenuOpen:e.useCallback((e=>{m(e),g(e)}),[m]),onMenuClose:e.useCallback((()=>m("")),[m]),onMenuToggle:e.useCallback((e=>{m((r=>Boolean(r)?"":e)),g(e)}),[m]),dir:p,loop:s,children:A(D.Provider,{scope:o,children:A(D.Slot,{scope:o,children:A(C,{asChild:!0,...c,orientation:"horizontal",loop:s,dir:p,currentTabStopId:b,onCurrentTabStopIdChange:g,children:A(O.div,{role:"menubar",...l,ref:n})})})})})}));L.displayName=S;var G="MenubarMenu",[V,U]=k(G),z=r=>{const{__scopeMenubar:a,value:n,...o}=r,t=i(),u=n||t||"LEGACY_REACT_AUTO_VALUE",s=B(G,a),d=E(a),l=e.useRef(null),p=e.useRef(!1),c=s.value===u;return e.useEffect((()=>{c||(p.current=!1)}),[c]),A(V,{scope:a,value:u,triggerId:i(),triggerRef:l,contentId:i(),wasKeyboardTriggerOpenRef:p,children:A(w,{...d,open:c,onOpenChange:e=>{e||s.onMenuClose()},modal:!1,dir:s.dir,...o})})};z.displayName=G;var Y="MenubarTrigger",q=e.forwardRef(((r,a)=>{const{__scopeMenubar:t,disabled:i=!1,...u}=r,d=F(t),l=E(t),p=B(Y,t),c=U(Y,t),f=e.useRef(null),m=o(a,f,c.triggerRef),[b,g]=e.useState(!1),v=p.value===c.value;return A(D.ItemSlot,{scope:t,value:c.value,disabled:i,children:A(I,{asChild:!0,...d,focusable:!i,tabStopId:c.value,children:A(s,{asChild:!0,...l,children:A(O.button,{type:"button",role:"menuitem",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":v,"aria-controls":v?c.contentId:void 0,"data-highlighted":b?"":void 0,"data-state":v?"open":"closed","data-disabled":i?"":void 0,disabled:i,...u,ref:m,onPointerDown:n(r.onPointerDown,(e=>{i||0!==e.button||!1!==e.ctrlKey||(p.onMenuOpen(c.value),v||e.preventDefault())})),onPointerEnter:n(r.onPointerEnter,(()=>{Boolean(p.value)&&!v&&(p.onMenuOpen(c.value),f.current?.focus())})),onKeyDown:n(r.onKeyDown,(e=>{i||(["Enter"," "].includes(e.key)&&p.onMenuToggle(c.value),"ArrowDown"===e.key&&p.onMenuOpen(c.value),["Enter"," ","ArrowDown"].includes(e.key)&&(c.wasKeyboardTriggerOpenRef.current=!0,e.preventDefault()))})),onFocus:n(r.onFocus,(()=>g(!0))),onBlur:n(r.onBlur,(()=>g(!1)))})})})})}));q.displayName=Y;var H=e=>{const{__scopeMenubar:r,...a}=e,n=E(r);return A(y,{...n,...a})};H.displayName="MenubarPortal";var J="MenubarContent",Q=e.forwardRef(((r,a)=>{const{__scopeMenubar:o,align:t="start",...i}=r,u=E(o),s=B(J,o),l=U(J,o),p=T(o),c=e.useRef(!1);return A(d,{id:l.contentId,"aria-labelledby":l.triggerId,"data-radix-menubar-content":"",...u,...i,ref:a,align:t,onCloseAutoFocus:n(r.onCloseAutoFocus,(e=>{Boolean(s.value)||c.current||l.triggerRef.current?.focus(),c.current=!1,e.preventDefault()})),onFocusOutside:n(r.onFocusOutside,(e=>{const r=e.target;p().some((e=>e.ref.current?.contains(r)))&&e.preventDefault()})),onInteractOutside:n(r.onInteractOutside,(()=>{c.current=!0})),onEntryFocus:e=>{l.wasKeyboardTriggerOpenRef.current||e.preventDefault()},onKeyDown:n(r.onKeyDown,(e=>{if(["ArrowRight","ArrowLeft"].includes(e.key)){const n=e.target,o=n.hasAttribute("data-radix-menubar-subtrigger"),t=n.closest("[data-radix-menubar-content]")!==e.currentTarget,i=("rtl"===s.dir?"ArrowRight":"ArrowLeft")===e.key;if(!i&&o)return;if(t&&i)return;let u=p().filter((e=>!e.disabled)).map((e=>e.value));i&&u.reverse();const d=u.indexOf(l.value);u=s.loop?(a=d+1,(r=u).map(((e,n)=>r[(a+n)%r.length]))):u.slice(d+1);const[c]=u;c&&s.onMenuOpen(c)}var r,a}),{checkForDefaultPrevented:!1}),style:{...r.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})}));Q.displayName=J;var W=e.forwardRef(((e,r)=>{const{__scopeMenubar:a,...n}=e,o=E(a);return A(l,{...o,...n,ref:r})}));W.displayName="MenubarGroup";var X=e.forwardRef(((e,r)=>{const{__scopeMenubar:a,...n}=e,o=E(a);return A(p,{...o,...n,ref:r})}));X.displayName="MenubarLabel";var Z=e.forwardRef(((e,r)=>{const{__scopeMenubar:a,...n}=e,o=E(a);return A(c,{...o,...n,ref:r})}));Z.displayName="MenubarItem";var $=e.forwardRef(((e,r)=>{const{__scopeMenubar:a,...n}=e,o=E(a);return A(f,{...o,...n,ref:r})}));$.displayName="MenubarCheckboxItem";var ee=e.forwardRef(((e,r)=>{const{__scopeMenubar:a,...n}=e,o=E(a);return A(m,{...o,...n,ref:r})}));ee.displayName="MenubarRadioGroup";var re=e.forwardRef(((e,r)=>{const{__scopeMenubar:a,...n}=e,o=E(a);return A(b,{...o,...n,ref:r})}));re.displayName="MenubarRadioItem";var ae=e.forwardRef(((e,r)=>{const{__scopeMenubar:a,...n}=e,o=E(a);return A(g,{...o,...n,ref:r})}));ae.displayName="MenubarItemIndicator";var ne=e.forwardRef(((e,r)=>{const{__scopeMenubar:a,...n}=e,o=E(a);return A(v,{...o,...n,ref:r})}));ne.displayName="MenubarSeparator";var oe=e.forwardRef(((e,r)=>{const{__scopeMenubar:a,...n}=e,o=E(a);return A(h,{...o,...n,ref:r})}));oe.displayName="MenubarArrow";var te=e=>{const{__scopeMenubar:r,children:a,open:n,onOpenChange:o,defaultOpen:t}=e,i=E(r),[u=!1,s]=N({prop:n,defaultProp:t,onChange:o});return A(_,{...i,open:u,onOpenChange:s,children:a})};te.displayName="MenubarSub";var ie=e.forwardRef(((e,r)=>{const{__scopeMenubar:a,...n}=e,o=E(a);return A(M,{"data-radix-menubar-subtrigger":"",...o,...n,ref:r})}));ie.displayName="MenubarSubTrigger";var ue=e.forwardRef(((e,r)=>{const{__scopeMenubar:a,...n}=e,o=E(a);return A(x,{...o,"data-radix-menubar-content":"",...n,ref:r,style:{...e.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})}));ue.displayName="MenubarSubContent";var se=L,de=z,le=q,pe=H,ce=Q,fe=Z,me=$,be=ee,ge=re,ve=ae,he=ne,Me=te,xe=ie,we=ue;export{me as CheckboxItem,ce as Content,fe as Item,ve as ItemIndicator,de as Menu,L as Menubar,oe as MenubarArrow,$ as MenubarCheckboxItem,Q as MenubarContent,W as MenubarGroup,Z as MenubarItem,ae as MenubarItemIndicator,X as MenubarLabel,z as MenubarMenu,H as MenubarPortal,ee as MenubarRadioGroup,re as MenubarRadioItem,ne as MenubarSeparator,te as MenubarSub,ue as MenubarSubContent,ie as MenubarSubTrigger,q as MenubarTrigger,pe as Portal,be as RadioGroup,ge as RadioItem,se as Root,he as Separator,Me as Sub,we as SubContent,xe as SubTrigger,le as Trigger,P as createMenubarScope};
|
2
2
|
//# sourceMappingURL=index.mjs.map
|