@lotte-innovate/ui-component-test 0.1.73 → 0.1.75
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/_virtual/_commonjsHelpers.js +2 -0
- package/dist/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/_virtual/index.js +2 -0
- package/dist/_virtual/index2.js +2 -0
- package/dist/_virtual/index2.js.map +1 -0
- package/dist/_virtual/jsx-runtime.js +2 -0
- package/dist/_virtual/jsx-runtime.js.map +1 -0
- package/dist/_virtual/jsx-runtime2.js +2 -0
- package/dist/_virtual/jsx-runtime2.js.map +1 -0
- package/dist/_virtual/react-jsx-runtime.development.js +2 -0
- package/dist/_virtual/react-jsx-runtime.development.js.map +1 -0
- package/dist/_virtual/react-jsx-runtime.production.min.js +2 -0
- package/dist/_virtual/react-jsx-runtime.production.min.js.map +1 -0
- package/dist/dist/lib/Typography/Header/index.js +2 -0
- package/dist/dist/lib/Typography/Text/index.js +2 -0
- package/dist/dist/lib/color/alpha.js +2 -0
- package/dist/dist/lib/color/constants.js +2 -0
- package/dist/dist/lib/color/light.js +2 -0
- package/dist/dist/lib/components/Accordion/index.js +2 -0
- package/dist/dist/lib/components/AlertDialog/AlertDialogAction.js +2 -0
- package/dist/dist/lib/components/AlertDialog/AlertDialogCancel.js +2 -0
- package/dist/dist/lib/components/AlertDialog/AlertDialogContent.js +2 -0
- package/dist/dist/lib/components/AlertDialog/AlertDialogDescription.js +2 -0
- package/dist/dist/lib/components/AlertDialog/AlertDialogRoot.js +2 -0
- package/dist/dist/lib/components/AlertDialog/AlertDialogTitle.js +2 -0
- package/dist/dist/lib/components/AlertDialog/AlertDialogTrigger.js +2 -0
- package/dist/dist/lib/components/AlertDialog/index.js +2 -0
- package/dist/dist/lib/components/AspectRatio/index.js +2 -0
- package/dist/dist/lib/components/Avatar/index.js +2 -0
- package/dist/dist/lib/components/Badge/index.js +2 -0
- package/dist/dist/lib/components/BarChart/index.js +2 -0
- package/dist/dist/lib/components/BubbleChart/index.js +2 -0
- package/dist/dist/lib/components/Button/index.js +2 -0
- package/dist/dist/lib/components/Callout/CalloutIcon.js +2 -0
- package/dist/dist/lib/components/Callout/CalloutRoot.js +2 -0
- package/dist/dist/lib/components/Callout/CalloutText.js +2 -0
- package/dist/dist/lib/components/Callout/index.js +2 -0
- package/dist/dist/lib/components/Card/index.js +2 -0
- package/dist/dist/lib/components/Checkbox/index.js +2 -0
- package/dist/dist/lib/components/CheckboxCard/index.js +2 -0
- package/dist/dist/lib/components/CheckboxGroup/CheckboxGroupItem.js +2 -0
- package/dist/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.js +2 -0
- package/dist/dist/lib/components/CheckboxGroup/index.js +2 -0
- package/dist/dist/lib/components/ContextMenu/ContextMenuCheckboxItem.js +2 -0
- package/dist/dist/lib/components/ContextMenu/ContextMenuContent.js +2 -0
- package/dist/dist/lib/components/ContextMenu/ContextMenuGroup.js +2 -0
- package/dist/dist/lib/components/ContextMenu/ContextMenuItem.js +2 -0
- package/dist/dist/lib/components/ContextMenu/ContextMenuItemIndicator.js +2 -0
- package/dist/dist/lib/components/ContextMenu/ContextMenuLabel.js +2 -0
- package/dist/dist/lib/components/ContextMenu/ContextMenuRadioGroup.js +2 -0
- package/dist/dist/lib/components/ContextMenu/ContextMenuRadioItem.js +2 -0
- package/dist/dist/lib/components/ContextMenu/ContextMenuRoot.js +2 -0
- package/dist/dist/lib/components/ContextMenu/ContextMenuSeparator.js +2 -0
- package/dist/dist/lib/components/ContextMenu/ContextMenuSubContent.js +2 -0
- package/dist/dist/lib/components/ContextMenu/ContextMenuSubTrigger.js +2 -0
- package/dist/dist/lib/components/ContextMenu/ContextMenuTrigger.js +2 -0
- package/dist/dist/lib/components/ContextMenu/index.js +2 -0
- package/dist/dist/lib/components/DataList/DataListItem.js +2 -0
- package/dist/dist/lib/components/DataList/DataListLabel.js +2 -0
- package/dist/dist/lib/components/DataList/DataListRoot.js +2 -0
- package/dist/dist/lib/components/DataList/DataListValue.js +2 -0
- package/dist/dist/lib/components/DataList/index.js +2 -0
- package/dist/dist/lib/components/Dialog/DialogAction.js +2 -0
- package/dist/dist/lib/components/Dialog/DialogCancel.js +2 -0
- package/dist/dist/lib/components/Dialog/DialogContent.js +2 -0
- package/dist/dist/lib/components/Dialog/DialogDescription.js +2 -0
- package/dist/dist/lib/components/Dialog/DialogRoot.js +2 -0
- package/dist/dist/lib/components/Dialog/DialogSlot.js +2 -0
- package/dist/dist/lib/components/Dialog/DialogTitle.js +2 -0
- package/dist/dist/lib/components/Dialog/DialogTrigger.js +2 -0
- package/dist/dist/lib/components/Dialog/index.js +2 -0
- package/dist/dist/lib/components/DoughnutChart/index.js +2 -0
- package/dist/dist/lib/components/DropdownMenu/DropdonMenuRadioGroup.js +2 -0
- package/dist/dist/lib/components/DropdownMenu/DropdonMenuSubContent.js +2 -0
- package/dist/dist/lib/components/DropdownMenu/DropdownMenuCheckboxItem.js +2 -0
- package/dist/dist/lib/components/DropdownMenu/DropdownMenuContent.js +2 -0
- package/dist/dist/lib/components/DropdownMenu/DropdownMenuItem.js +2 -0
- package/dist/dist/lib/components/DropdownMenu/DropdownMenuItemIndicator.js +2 -0
- package/dist/dist/lib/components/DropdownMenu/DropdownMenuLable.js +2 -0
- package/dist/dist/lib/components/DropdownMenu/DropdownMenuRadioItem.js +2 -0
- package/dist/dist/lib/components/DropdownMenu/DropdownMenuRoot.js +2 -0
- package/dist/dist/lib/components/DropdownMenu/DropdownMenuSeparator.js +2 -0
- package/dist/dist/lib/components/DropdownMenu/DropdownMenuSub.js +2 -0
- package/dist/dist/lib/components/DropdownMenu/DropdownMenuSubTrigger.js +2 -0
- package/dist/dist/lib/components/DropdownMenu/DropdownMenuTrigger.js +2 -0
- package/dist/dist/lib/components/DropdownMenu/index.js +2 -0
- package/dist/dist/lib/components/HoverCard/HoverCardContent.js +2 -0
- package/dist/dist/lib/components/HoverCard/HoverCardRoot.js +2 -0
- package/dist/dist/lib/components/HoverCard/HoverCardTrigger.js +2 -0
- package/dist/dist/lib/components/HoverCard/index.js +2 -0
- package/dist/dist/lib/components/IconButton/index.js +2 -0
- package/dist/dist/lib/components/Inset/index.js +2 -0
- package/dist/dist/lib/components/Label/index.js +2 -0
- package/dist/dist/lib/components/LineChart/index.js +2 -0
- package/dist/dist/lib/components/Menubar/MenubarCheckboxItem.js +2 -0
- package/dist/dist/lib/components/Menubar/MenubarContent.js +2 -0
- package/dist/dist/lib/components/Menubar/MenubarItem.js +2 -0
- package/dist/dist/lib/components/Menubar/MenubarItemIndicator.js +2 -0
- package/dist/dist/lib/components/Menubar/MenubarMenu.js +2 -0
- package/dist/dist/lib/components/Menubar/MenubarRadioGroup.js +2 -0
- package/dist/dist/lib/components/Menubar/MenubarRadioItem.js +2 -0
- package/dist/dist/lib/components/Menubar/MenubarRoot.js +2 -0
- package/dist/dist/lib/components/Menubar/MenubarSeparator.js +2 -0
- package/dist/dist/lib/components/Menubar/MenubarSub.js +2 -0
- package/dist/dist/lib/components/Menubar/MenubarSubContent.js +2 -0
- package/dist/dist/lib/components/Menubar/MenubarSubTrigger.js +2 -0
- package/dist/dist/lib/components/Menubar/MenubarTrigger.js +2 -0
- package/dist/dist/lib/components/Menubar/index.js +2 -0
- package/dist/dist/lib/components/NavigationMenu/NavigationMenuContent.js +2 -0
- package/dist/dist/lib/components/NavigationMenu/NavigationMenuIndicator.js +2 -0
- package/dist/dist/lib/components/NavigationMenu/NavigationMenuItem.js +2 -0
- package/dist/dist/lib/components/NavigationMenu/NavigationMenuLink.js +2 -0
- package/dist/dist/lib/components/NavigationMenu/NavigationMenuList.js +2 -0
- package/dist/dist/lib/components/NavigationMenu/NavigationMenuRoot.js +2 -0
- package/dist/dist/lib/components/NavigationMenu/NavigationMenuTrigger.js +2 -0
- package/dist/dist/lib/components/NavigationMenu/NavigationMenuViewport.js +2 -0
- package/dist/dist/lib/components/NavigationMenu/index.js +2 -0
- package/dist/dist/lib/components/PieChart/index.js +2 -0
- package/dist/dist/lib/components/Popover/PopoverClose.js +2 -0
- package/dist/dist/lib/components/Popover/PopoverContent.js +2 -0
- package/dist/dist/lib/components/Popover/PopoverRoot.js +2 -0
- package/dist/dist/lib/components/Popover/PopoverTrigger.js +2 -0
- package/dist/dist/lib/components/Popover/index.js +2 -0
- package/dist/dist/lib/components/Progress/index.js +2 -0
- package/dist/dist/lib/components/RadarChart/index.js +2 -0
- package/dist/dist/lib/components/Radio/index.js +2 -0
- package/dist/dist/lib/components/RadioCards/RadioCardsItem.js +2 -0
- package/dist/dist/lib/components/RadioCards/RadioCardsRoot.js +2 -0
- package/dist/dist/lib/components/RadioCards/index.js +2 -0
- package/dist/dist/lib/components/RadioGroup/RadioGroupItem.js +2 -0
- package/dist/dist/lib/components/RadioGroup/RadioGroupRoot.js +2 -0
- package/dist/dist/lib/components/RadioGroup/index.js +2 -0
- package/dist/dist/lib/components/ScrollArea/index.js +2 -0
- package/dist/dist/lib/components/SegmentedControl/SegmentedControlItem.js +2 -0
- package/dist/dist/lib/components/SegmentedControl/SegmentedControlRoot.js +2 -0
- package/dist/dist/lib/components/SegmentedControl/index.js +2 -0
- package/dist/dist/lib/components/Select/index.js +2 -0
- package/dist/dist/lib/components/Separator/index.js +2 -0
- package/dist/dist/lib/components/Skeleton/index.js +2 -0
- package/dist/dist/lib/components/Slider/index.js +2 -0
- package/dist/dist/lib/components/Spinner/index.js +2 -0
- package/dist/dist/lib/components/TabNav/index.js +2 -0
- package/dist/dist/lib/components/Table/index.js +2 -0
- package/dist/dist/lib/components/Tabs/index.js +2 -0
- package/dist/dist/lib/components/TextArea/index.js +2 -0
- package/dist/dist/lib/components/TextField/index.js +2 -0
- package/dist/dist/lib/components/Toast/ToastActionButton.js +2 -0
- package/dist/dist/lib/components/Toast/ToastDescription.js +2 -0
- package/dist/dist/lib/components/Toast/ToastRoot.js +2 -0
- package/dist/dist/lib/components/Toast/ToastTitle.js +2 -0
- package/dist/dist/lib/components/Toast/index.js +2 -0
- package/dist/dist/lib/components/Toggle/ToggleWithText.js +2 -0
- package/dist/dist/lib/components/Toggle/index.js +2 -0
- package/dist/dist/lib/components/ToggleGroup/ToggleGroupItem.js +2 -0
- package/dist/dist/lib/components/ToggleGroup/ToggleGroupRoot.js +2 -0
- package/dist/dist/lib/components/ToggleGroup/index.js +2 -0
- package/dist/dist/lib/components/ToggleSwitch/index.js +2 -0
- package/dist/dist/lib/components/Tooltip/index.js +2 -0
- package/dist/dist/lib/constants.js +2 -0
- package/dist/dist/lib/index.js +2 -0
- package/dist/dist/lib/index.js.map +1 -0
- package/dist/dist/lib/utils/useDarkMode.js +2 -0
- package/dist/dist/lib/utils/utils.js +2 -0
- package/dist/lib/Typography/Header/index.d.ts +13 -0
- package/dist/lib/Typography/Header/index.js +55 -2
- package/dist/lib/Typography/Text/index.d.ts +15 -0
- package/dist/lib/Typography/Text/index.js +44 -2
- package/dist/lib/Typography/index.d.ts +2 -0
- package/dist/lib/Typography/index.js +2 -0
- package/dist/lib/color/alpha.d.ts +784 -0
- package/dist/lib/color/alpha.js +784 -2
- package/dist/lib/color/constants.d.ts +29 -0
- package/dist/lib/color/constants.js +296 -2
- package/dist/lib/color/dark.d.ts +392 -0
- package/dist/lib/color/dark.js +392 -0
- package/dist/lib/color/krdsColors.d.ts +309 -0
- package/dist/lib/color/krdsColors.js +309 -0
- package/dist/lib/color/light.d.ts +392 -0
- package/dist/lib/color/light.js +393 -2
- package/dist/lib/components/Accordion/index.d.ts +22 -0
- package/dist/lib/components/Accordion/index.js +64 -2
- package/dist/lib/components/AlertDialog/AlertDialogAction.d.ts +14 -0
- package/dist/lib/components/AlertDialog/AlertDialogAction.js +61 -2
- package/dist/lib/components/AlertDialog/AlertDialogCancel.d.ts +13 -0
- package/dist/lib/components/AlertDialog/AlertDialogCancel.js +60 -2
- package/dist/lib/components/AlertDialog/AlertDialogContent.d.ts +11 -0
- package/dist/lib/components/AlertDialog/AlertDialogContent.js +51 -2
- package/dist/lib/components/AlertDialog/AlertDialogDescription.d.ts +10 -0
- package/dist/lib/components/AlertDialog/AlertDialogDescription.js +47 -2
- package/dist/lib/components/AlertDialog/AlertDialogRoot.d.ts +16 -0
- package/dist/lib/components/AlertDialog/AlertDialogRoot.js +46 -2
- package/dist/lib/components/AlertDialog/AlertDialogTitle.d.ts +10 -0
- package/dist/lib/components/AlertDialog/AlertDialogTitle.js +47 -2
- package/dist/lib/components/AlertDialog/AlertDialogTrigger.d.ts +17 -0
- package/dist/lib/components/AlertDialog/AlertDialogTrigger.js +55 -2
- package/dist/lib/components/AlertDialog/index.d.ts +10 -0
- package/dist/lib/components/AlertDialog/index.js +17 -2
- package/dist/lib/components/AspectRatio/index.d.ts +10 -0
- package/dist/lib/components/AspectRatio/index.js +42 -2
- package/dist/lib/components/Avatar/index.d.ts +21 -0
- package/dist/lib/components/Avatar/index.js +58 -2
- package/dist/lib/components/Badge/index.d.ts +18 -0
- package/dist/lib/components/Badge/index.js +54 -2
- package/dist/lib/components/BarChart/index.d.ts +37 -0
- package/dist/lib/components/BarChart/index.js +63 -2
- package/dist/lib/components/BubbleChart/index.d.ts +28 -0
- package/dist/lib/components/BubbleChart/index.js +73 -2
- package/dist/lib/components/Button/index.d.ts +16 -0
- package/dist/lib/components/Button/index.js +56 -2
- package/dist/lib/components/Callout/CalloutIcon.d.ts +13 -0
- package/dist/lib/components/Callout/CalloutIcon.js +57 -2
- package/dist/lib/components/Callout/CalloutRoot.d.ts +18 -0
- package/dist/lib/components/Callout/CalloutRoot.js +72 -2
- package/dist/lib/components/Callout/CalloutText.d.ts +10 -0
- package/dist/lib/components/Callout/CalloutText.js +52 -2
- package/dist/lib/components/Callout/index.d.ts +6 -0
- package/dist/lib/components/Callout/index.js +9 -2
- package/dist/lib/components/Card/index.d.ts +14 -0
- package/dist/lib/components/Card/index.js +64 -2
- package/dist/lib/components/Checkbox/index.d.ts +17 -0
- package/dist/lib/components/Checkbox/index.js +89 -2
- package/dist/lib/components/CheckboxCard/index.d.ts +20 -0
- package/dist/lib/components/CheckboxCard/index.js +58 -2
- package/dist/lib/components/CheckboxGroup/CheckboxGroupItem.d.ts +5 -0
- package/dist/lib/components/CheckboxGroup/CheckboxGroupItem.js +33 -2
- package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.d.ts +17 -0
- package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.js +34 -2
- package/dist/lib/components/CheckboxGroup/index.d.ts +5 -0
- package/dist/lib/components/CheckboxGroup/index.js +4 -2
- package/dist/lib/components/ContextMenu/ContextMenuCheckboxItem.d.ts +4 -0
- package/dist/lib/components/ContextMenu/ContextMenuCheckboxItem.js +42 -2
- package/dist/lib/components/ContextMenu/ContextMenuContent.d.ts +11 -0
- package/dist/lib/components/ContextMenu/ContextMenuContent.js +56 -2
- package/dist/lib/components/ContextMenu/ContextMenuGroup.d.ts +4 -0
- package/dist/lib/components/ContextMenu/ContextMenuGroup.js +30 -2
- package/dist/lib/components/ContextMenu/ContextMenuItem.d.ts +13 -0
- package/dist/lib/components/ContextMenu/ContextMenuItem.js +59 -2
- package/dist/lib/components/ContextMenu/ContextMenuItemIndicator.d.ts +10 -0
- package/dist/lib/components/ContextMenu/ContextMenuItemIndicator.js +50 -2
- package/dist/lib/components/ContextMenu/ContextMenuLabel.d.ts +11 -0
- package/dist/lib/components/ContextMenu/ContextMenuLabel.js +48 -2
- package/dist/lib/components/ContextMenu/ContextMenuRadioGroup.d.ts +8 -0
- package/dist/lib/components/ContextMenu/ContextMenuRadioGroup.js +31 -2
- package/dist/lib/components/ContextMenu/ContextMenuRadioItem.d.ts +4 -0
- package/dist/lib/components/ContextMenu/ContextMenuRadioItem.js +44 -2
- package/dist/lib/components/ContextMenu/ContextMenuRoot.d.ts +13 -0
- package/dist/lib/components/ContextMenu/ContextMenuRoot.js +42 -2
- package/dist/lib/components/ContextMenu/ContextMenuSeparator.d.ts +3 -0
- package/dist/lib/components/ContextMenu/ContextMenuSeparator.js +31 -2
- package/dist/lib/components/ContextMenu/ContextMenuSubContent.d.ts +11 -0
- package/dist/lib/components/ContextMenu/ContextMenuSubContent.js +54 -2
- package/dist/lib/components/ContextMenu/ContextMenuSubTrigger.d.ts +4 -0
- package/dist/lib/components/ContextMenu/ContextMenuSubTrigger.js +40 -2
- package/dist/lib/components/ContextMenu/ContextMenuTrigger.d.ts +4 -0
- package/dist/lib/components/ContextMenu/ContextMenuTrigger.js +31 -2
- package/dist/lib/components/ContextMenu/index.d.ts +16 -0
- package/dist/lib/components/ContextMenu/index.js +29 -2
- package/dist/lib/components/DataList/DataListItem.d.ts +9 -0
- package/dist/lib/components/DataList/DataListItem.js +43 -2
- package/dist/lib/components/DataList/DataListLabel.d.ts +10 -0
- package/dist/lib/components/DataList/DataListLabel.js +49 -2
- package/dist/lib/components/DataList/DataListRoot.d.ts +14 -0
- package/dist/lib/components/DataList/DataListRoot.js +54 -2
- package/dist/lib/components/DataList/DataListValue.d.ts +11 -0
- package/dist/lib/components/DataList/DataListValue.js +51 -2
- package/dist/lib/components/DataList/index.d.ts +7 -0
- package/dist/lib/components/DataList/index.js +6 -2
- package/dist/lib/components/Dialog/DialogAction.d.ts +13 -0
- package/dist/lib/components/Dialog/DialogAction.js +59 -2
- package/dist/lib/components/Dialog/DialogCancel.d.ts +11 -0
- package/dist/lib/components/Dialog/DialogCancel.js +55 -2
- package/dist/lib/components/Dialog/DialogContent.d.ts +11 -0
- package/dist/lib/components/Dialog/DialogContent.js +57 -2
- package/dist/lib/components/Dialog/DialogDescription.d.ts +9 -0
- package/dist/lib/components/Dialog/DialogDescription.js +47 -2
- package/dist/lib/components/Dialog/DialogRoot.d.ts +15 -0
- package/dist/lib/components/Dialog/DialogRoot.js +37 -2
- package/dist/lib/components/Dialog/DialogSlot.d.ts +9 -0
- package/dist/lib/components/Dialog/DialogSlot.js +46 -2
- package/dist/lib/components/Dialog/DialogTitle.d.ts +11 -0
- package/dist/lib/components/Dialog/DialogTitle.js +47 -2
- package/dist/lib/components/Dialog/DialogTrigger.d.ts +3 -0
- package/dist/lib/components/Dialog/DialogTrigger.js +30 -2
- package/dist/lib/components/Dialog/index.d.ts +14 -0
- package/dist/lib/components/Dialog/index.js +19 -2
- package/dist/lib/components/DoughnutChart/index.d.ts +22 -0
- package/dist/lib/components/DoughnutChart/index.js +65 -2
- package/dist/lib/components/DropdownMenu/DropdonMenuRadioGroup.d.ts +3 -0
- package/dist/lib/components/DropdownMenu/DropdonMenuRadioGroup.js +30 -2
- package/dist/lib/components/DropdownMenu/DropdonMenuSubContent.d.ts +11 -0
- package/dist/lib/components/DropdownMenu/DropdonMenuSubContent.js +60 -2
- package/dist/lib/components/DropdownMenu/DropdownMenuCheckboxItem.d.ts +7 -0
- package/dist/lib/components/DropdownMenu/DropdownMenuCheckboxItem.js +41 -2
- package/dist/lib/components/DropdownMenu/DropdownMenuContent.d.ts +11 -0
- package/dist/lib/components/DropdownMenu/DropdownMenuContent.js +56 -2
- package/dist/lib/components/DropdownMenu/DropdownMenuItem.d.ts +15 -0
- package/dist/lib/components/DropdownMenu/DropdownMenuItem.js +58 -2
- package/dist/lib/components/DropdownMenu/DropdownMenuItemIndicator.d.ts +10 -0
- package/dist/lib/components/DropdownMenu/DropdownMenuItemIndicator.js +48 -2
- package/dist/lib/components/DropdownMenu/DropdownMenuLable.d.ts +10 -0
- package/dist/lib/components/DropdownMenu/DropdownMenuLable.js +45 -2
- package/dist/lib/components/DropdownMenu/DropdownMenuRadioItem.d.ts +6 -0
- package/dist/lib/components/DropdownMenu/DropdownMenuRadioItem.js +41 -2
- package/dist/lib/components/DropdownMenu/DropdownMenuRoot.d.ts +15 -0
- package/dist/lib/components/DropdownMenu/DropdownMenuRoot.js +38 -2
- package/dist/lib/components/DropdownMenu/DropdownMenuSeparator.d.ts +3 -0
- package/dist/lib/components/DropdownMenu/DropdownMenuSeparator.js +31 -2
- package/dist/lib/components/DropdownMenu/DropdownMenuSub.d.ts +3 -0
- package/dist/lib/components/DropdownMenu/DropdownMenuSub.js +30 -2
- package/dist/lib/components/DropdownMenu/DropdownMenuSubTrigger.d.ts +4 -0
- package/dist/lib/components/DropdownMenu/DropdownMenuSubTrigger.js +40 -2
- package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.d.ts +14 -0
- package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.js +53 -2
- package/dist/lib/components/DropdownMenu/index.d.ts +19 -0
- package/dist/lib/components/DropdownMenu/index.js +29 -2
- package/dist/lib/components/HoverCard/HoverCardContent.d.ts +14 -0
- package/dist/lib/components/HoverCard/HoverCardContent.js +61 -2
- package/dist/lib/components/HoverCard/HoverCardRoot.d.ts +11 -0
- package/dist/lib/components/HoverCard/HoverCardRoot.js +38 -2
- package/dist/lib/components/HoverCard/HoverCardTrigger.d.ts +3 -0
- package/dist/lib/components/HoverCard/HoverCardTrigger.js +30 -2
- package/dist/lib/components/HoverCard/index.d.ts +9 -0
- package/dist/lib/components/HoverCard/index.js +9 -2
- package/dist/lib/components/IconButton/index.d.ts +15 -0
- package/dist/lib/components/IconButton/index.js +63 -2
- package/dist/lib/components/Inset/index.d.ts +10 -0
- package/dist/lib/components/Inset/index.js +50 -2
- package/dist/lib/components/Label/index.d.ts +17 -0
- package/dist/lib/components/Label/index.js +53 -2
- package/dist/lib/components/LineChart/index.d.ts +43 -0
- package/dist/lib/components/LineChart/index.js +61 -2
- package/dist/lib/components/Menubar/MenubarCheckboxItem.d.ts +4 -0
- package/dist/lib/components/Menubar/MenubarCheckboxItem.js +38 -2
- package/dist/lib/components/Menubar/MenubarContent.d.ts +11 -0
- package/dist/lib/components/Menubar/MenubarContent.js +60 -2
- package/dist/lib/components/Menubar/MenubarItem.d.ts +13 -0
- package/dist/lib/components/Menubar/MenubarItem.js +54 -2
- package/dist/lib/components/Menubar/MenubarItemIndicator.d.ts +10 -0
- package/dist/lib/components/Menubar/MenubarItemIndicator.js +49 -2
- package/dist/lib/components/Menubar/MenubarMenu.d.ts +5 -0
- package/dist/lib/components/Menubar/MenubarMenu.js +30 -2
- package/dist/lib/components/Menubar/MenubarRadioGroup.d.ts +8 -0
- package/dist/lib/components/Menubar/MenubarRadioGroup.js +31 -2
- package/dist/lib/components/Menubar/MenubarRadioItem.d.ts +4 -0
- package/dist/lib/components/Menubar/MenubarRadioItem.js +40 -2
- package/dist/lib/components/Menubar/MenubarRoot.d.ts +19 -0
- package/dist/lib/components/Menubar/MenubarRoot.js +61 -2
- package/dist/lib/components/Menubar/MenubarSeparator.d.ts +3 -0
- package/dist/lib/components/Menubar/MenubarSeparator.js +31 -2
- package/dist/lib/components/Menubar/MenubarSub.d.ts +3 -0
- package/dist/lib/components/Menubar/MenubarSub.js +30 -2
- package/dist/lib/components/Menubar/MenubarSubContent.d.ts +10 -0
- package/dist/lib/components/Menubar/MenubarSubContent.js +51 -2
- package/dist/lib/components/Menubar/MenubarSubTrigger.d.ts +4 -0
- package/dist/lib/components/Menubar/MenubarSubTrigger.js +41 -2
- package/dist/lib/components/Menubar/MenubarTrigger.d.ts +12 -0
- package/dist/lib/components/Menubar/MenubarTrigger.js +57 -2
- package/dist/lib/components/Menubar/index.d.ts +18 -0
- package/dist/lib/components/Menubar/index.js +29 -2
- package/dist/lib/components/NavigationMenu/NavigationMenuContent.d.ts +11 -0
- package/dist/lib/components/NavigationMenu/NavigationMenuContent.js +48 -2
- package/dist/lib/components/NavigationMenu/NavigationMenuIndicator.d.ts +3 -0
- package/dist/lib/components/NavigationMenu/NavigationMenuIndicator.js +31 -2
- package/dist/lib/components/NavigationMenu/NavigationMenuItem.d.ts +3 -0
- package/dist/lib/components/NavigationMenu/NavigationMenuItem.js +30 -2
- package/dist/lib/components/NavigationMenu/NavigationMenuLink.d.ts +13 -0
- package/dist/lib/components/NavigationMenu/NavigationMenuLink.js +51 -2
- package/dist/lib/components/NavigationMenu/NavigationMenuList.d.ts +12 -0
- package/dist/lib/components/NavigationMenu/NavigationMenuList.js +47 -2
- package/dist/lib/components/NavigationMenu/NavigationMenuRoot.d.ts +14 -0
- package/dist/lib/components/NavigationMenu/NavigationMenuRoot.js +43 -2
- package/dist/lib/components/NavigationMenu/NavigationMenuTrigger.d.ts +13 -0
- package/dist/lib/components/NavigationMenu/NavigationMenuTrigger.js +58 -2
- package/dist/lib/components/NavigationMenu/NavigationMenuViewport.d.ts +12 -0
- package/dist/lib/components/NavigationMenu/NavigationMenuViewport.js +53 -2
- package/dist/lib/components/NavigationMenu/index.d.ts +11 -0
- package/dist/lib/components/NavigationMenu/index.js +10 -2
- package/dist/lib/components/PieChart/index.d.ts +22 -0
- package/dist/lib/components/PieChart/index.js +65 -2
- package/dist/lib/components/Popover/PopoverClose.d.ts +9 -0
- package/dist/lib/components/Popover/PopoverClose.js +48 -2
- package/dist/lib/components/Popover/PopoverContent.d.ts +11 -0
- package/dist/lib/components/Popover/PopoverContent.js +65 -2
- package/dist/lib/components/Popover/PopoverRoot.d.ts +12 -0
- package/dist/lib/components/Popover/PopoverRoot.js +36 -2
- package/dist/lib/components/Popover/PopoverTrigger.d.ts +3 -0
- package/dist/lib/components/Popover/PopoverTrigger.js +30 -2
- package/dist/lib/components/Popover/index.d.ts +10 -0
- package/dist/lib/components/Popover/index.js +11 -2
- package/dist/lib/components/Progress/index.d.ts +13 -0
- package/dist/lib/components/Progress/index.js +56 -2
- package/dist/lib/components/RadarChart/index.d.ts +32 -0
- package/dist/lib/components/RadarChart/index.js +76 -2
- package/dist/lib/components/Radio/index.d.ts +13 -0
- package/dist/lib/components/Radio/index.js +53 -2
- package/dist/lib/components/RadioCards/RadioCardsItem.d.ts +10 -0
- package/dist/lib/components/RadioCards/RadioCardsItem.js +54 -2
- package/dist/lib/components/RadioCards/RadioCardsRoot.d.ts +13 -0
- package/dist/lib/components/RadioCards/RadioCardsRoot.js +46 -2
- package/dist/lib/components/RadioCards/index.d.ts +5 -0
- package/dist/lib/components/RadioCards/index.js +7 -2
- package/dist/lib/components/RadioGroup/RadioGroupItem.d.ts +13 -0
- package/dist/lib/components/RadioGroup/RadioGroupItem.js +46 -2
- package/dist/lib/components/RadioGroup/RadioGroupRoot.d.ts +15 -0
- package/dist/lib/components/RadioGroup/RadioGroupRoot.js +53 -2
- package/dist/lib/components/RadioGroup/index.d.ts +5 -0
- package/dist/lib/components/RadioGroup/index.js +7 -2
- package/dist/lib/components/ScrollArea/index.d.ts +9 -0
- package/dist/lib/components/ScrollArea/index.js +36 -2
- package/dist/lib/components/SegmentedControl/SegmentedControlItem.d.ts +6 -0
- package/dist/lib/components/SegmentedControl/SegmentedControlItem.js +35 -2
- package/dist/lib/components/SegmentedControl/SegmentedControlRoot.d.ts +14 -0
- package/dist/lib/components/SegmentedControl/SegmentedControlRoot.js +47 -2
- package/dist/lib/components/SegmentedControl/index.d.ts +5 -0
- package/dist/lib/components/SegmentedControl/index.js +7 -2
- package/dist/lib/components/Select/index.d.ts +34 -0
- package/dist/lib/components/Select/index.js +92 -2
- package/dist/lib/components/Separator/index.d.ts +11 -0
- package/dist/lib/components/Separator/index.js +47 -2
- package/dist/lib/components/Skeleton/index.d.ts +14 -0
- package/dist/lib/components/Skeleton/index.js +42 -2
- package/dist/lib/components/Slider/index.d.ts +14 -0
- package/dist/lib/components/Slider/index.js +49 -2
- package/dist/lib/components/Spinner/index.d.ts +15 -0
- package/dist/lib/components/Spinner/index.js +47 -2
- package/dist/lib/components/TabNav/index.d.ts +15 -0
- package/dist/lib/components/TabNav/index.js +50 -2
- package/dist/lib/components/Table/index.d.ts +30 -0
- package/dist/lib/components/Table/index.js +98 -2
- package/dist/lib/components/Tabs/index.d.ts +22 -0
- package/dist/lib/components/Tabs/index.js +65 -2
- package/dist/lib/components/TextArea/index.d.ts +16 -0
- package/dist/lib/components/TextArea/index.js +58 -2
- package/dist/lib/components/TextField/index.d.ts +21 -0
- package/dist/lib/components/TextField/index.js +56 -2
- package/dist/lib/components/Toast/ToastActionButton.d.ts +14 -0
- package/dist/lib/components/Toast/ToastActionButton.js +67 -2
- package/dist/lib/components/Toast/ToastDescription.d.ts +13 -0
- package/dist/lib/components/Toast/ToastDescription.js +53 -2
- package/dist/lib/components/Toast/ToastRoot.d.ts +27 -0
- package/dist/lib/components/Toast/ToastRoot.js +90 -2
- package/dist/lib/components/Toast/ToastTitle.d.ts +13 -0
- package/dist/lib/components/Toast/ToastTitle.js +53 -2
- package/dist/lib/components/Toast/index.d.ts +7 -0
- package/dist/lib/components/Toast/index.js +11 -2
- package/dist/lib/components/Toggle/ToggleWithText.d.ts +21 -0
- package/dist/lib/components/Toggle/ToggleWithText.js +58 -2
- package/dist/lib/components/Toggle/index.d.ts +21 -0
- package/dist/lib/components/Toggle/index.js +58 -2
- package/dist/lib/components/ToggleGroup/ToggleGroupItem.d.ts +17 -0
- package/dist/lib/components/ToggleGroup/ToggleGroupItem.js +54 -2
- package/dist/lib/components/ToggleGroup/ToggleGroupRoot.d.ts +15 -0
- package/dist/lib/components/ToggleGroup/ToggleGroupRoot.js +48 -2
- package/dist/lib/components/ToggleGroup/index.d.ts +5 -0
- package/dist/lib/components/ToggleGroup/index.js +7 -2
- package/dist/lib/components/ToggleSwitch/index.d.ts +13 -0
- package/dist/lib/components/ToggleSwitch/index.js +71 -2
- package/dist/lib/components/Tooltip/index.d.ts +19 -0
- package/dist/lib/components/Tooltip/index.js +49 -2
- package/dist/lib/components/index.d.ts +50 -0
- package/dist/lib/components/index.js +52 -0
- package/dist/lib/constants.d.ts +655 -0
- package/dist/lib/constants.js +914 -2
- package/dist/lib/index.d.ts +2 -0
- package/dist/lib/index.js +2 -2
- package/dist/lib/types.d.ts +81 -0
- package/dist/lib/types.js +1 -0
- package/dist/lib/utils/useDarkMode.d.ts +1 -0
- package/dist/lib/utils/useDarkMode.js +49 -2
- package/dist/lib/utils/utils.d.ts +2 -0
- package/dist/lib/utils/utils.js +10 -2
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js +2 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js.map +1 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js +2 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js.map +1 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs.js +2 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs.js.map +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs.js +2 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs.js.map +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js +2 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js.map +1 -0
- package/dist/node_modules/@kurkle/color/dist/color.esm.js +8 -0
- package/dist/node_modules/@kurkle/color/dist/color.esm.js.map +1 -0
- package/dist/node_modules/@radix-ui/number/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/number/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/primitive/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/primitive/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-aspect-ratio/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-aspect-ratio/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-context-menu/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-context-menu/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-hover-card/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-hover-card/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js +2 -0
- package/dist/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-label/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-label/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-menu/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-menu/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-menubar/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-menubar/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-navigation-menu/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-navigation-menu/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-portal/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-portal/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-progress/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-progress/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-radio-group/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-radio-group/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-select/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-select/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-slider/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-slider/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-switch/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-switch/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-toast/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-toast/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-toggle/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-toggle/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-toggle-group/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-toggle-group/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-previous/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-use-previous/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/base-checkbox.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/base-checkbox.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/base-radio.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/base-radio.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/base-tab-list.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/base-tab-list.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/callout.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/callout.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/callout.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/callout.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/checkbox-group.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/checkbox-group.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/checkbox-group.primitive.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/checkbox-group.primitive.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/checkbox-group.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/checkbox-group.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/data-list.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/data-list.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/data-list.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/data-list.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/dialog.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/dialog.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/dialog.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/dialog.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/flex.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/flex.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/flex.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/flex.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/grid.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/grid.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/grid.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/grid.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/heading.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/heading.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/heading.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/heading.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/hover-card.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/hover-card.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/hover-card.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/hover-card.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/icons.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/icons.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/inset.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/inset.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/inset.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/inset.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/popover.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/popover.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/popover.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/popover.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/progress.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/progress.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/progress.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/progress.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/radio-cards.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/radio-cards.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/radio-cards.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/radio-cards.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/radio-group.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/radio-group.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/radio-group.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/radio-group.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/radio.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/radio.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/scroll-area.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/scroll-area.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/scroll-area.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/scroll-area.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/segmented-control.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/segmented-control.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/segmented-control.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/segmented-control.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/select.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/select.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/select.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/select.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/separator.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/separator.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/separator.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/separator.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/skeleton.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/skeleton.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/skeleton.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/skeleton.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/slider.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/slider.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/slider.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/slider.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/spinner.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/spinner.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/spinner.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/spinner.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/switch.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/switch.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/switch.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/switch.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/tab-nav.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/tab-nav.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/table.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/table.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/table.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/table.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/tabs.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/tabs.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/text-area.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/text-area.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/text-area.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/text-area.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/text-field.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/text-field.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/text-field.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/text-field.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/text.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/text.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/text.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/text.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/theme.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/theme.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/theme.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/components/theme.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/helpers/extract-margin-props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/helpers/extract-margin-props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/helpers/extract-props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/helpers/extract-props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/helpers/get-margin-styles.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/helpers/get-margin-styles.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/helpers/get-matching-gray-color.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/helpers/get-matching-gray-color.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/helpers/get-responsive-styles.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/helpers/get-responsive-styles.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/helpers/get-subtree.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/helpers/get-subtree.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/helpers/has-own-property.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/helpers/has-own-property.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/helpers/inert.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/helpers/inert.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/helpers/is-responsive-object.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/helpers/is-responsive-object.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/helpers/map-prop-values.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/helpers/map-prop-values.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/helpers/merge-styles.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/helpers/merge-styles.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/helpers/require-react-element.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/helpers/require-react-element.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/as-child.prop.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/as-child.prop.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/color.prop.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/color.prop.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/gap.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/gap.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/height.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/height.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/high-contrast.prop.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/high-contrast.prop.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/layout.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/layout.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/leading-trim.prop.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/leading-trim.prop.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/margin.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/margin.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/padding.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/padding.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/prop-def.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/prop-def.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/radius.prop.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/radius.prop.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/text-align.prop.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/text-align.prop.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/text-wrap.prop.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/text-wrap.prop.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/truncate.prop.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/truncate.prop.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/weight.prop.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/weight.prop.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/width.props.js +2 -0
- package/dist/node_modules/@radix-ui/themes/dist/esm/props/width.props.js.map +1 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-popover/dist/index.mjs.js +2 -0
- package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-popover/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +2 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.js.map +1 -0
- package/dist/node_modules/chart.js/auto/auto.js +2 -0
- package/dist/node_modules/chart.js/auto/auto.js.map +1 -0
- package/dist/node_modules/chart.js/dist/chart.js +8 -0
- package/dist/node_modules/chart.js/dist/chart.js.map +1 -0
- package/dist/node_modules/chart.js/dist/chunks/helpers.segment.js +8 -0
- package/dist/node_modules/chart.js/dist/chunks/helpers.segment.js.map +1 -0
- package/dist/node_modules/chartjs-plugin-datalabels/dist/chartjs-plugin-datalabels.esm.js +8 -0
- package/dist/node_modules/chartjs-plugin-datalabels/dist/chartjs-plugin-datalabels.esm.js.map +1 -0
- package/dist/node_modules/class-variance-authority/dist/index.mjs.js +2 -0
- package/dist/node_modules/class-variance-authority/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/class-variance-authority/node_modules/clsx/dist/clsx.mjs.js +2 -0
- package/dist/node_modules/class-variance-authority/node_modules/clsx/dist/clsx.mjs.js.map +1 -0
- package/dist/node_modules/classnames/index.js +7 -0
- package/dist/node_modules/classnames/index.js.map +1 -0
- package/dist/node_modules/clsx/dist/clsx.mjs.js +2 -0
- package/dist/node_modules/clsx/dist/clsx.mjs.js.map +1 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.js +2 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.js.map +1 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.js +11 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.development.js.map +1 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js +11 -0
- package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.js.map +1 -0
- package/dist/node_modules/react/jsx-runtime.js +2 -0
- package/dist/node_modules/react/jsx-runtime.js.map +1 -0
- package/dist/node_modules/react-chartjs-2/dist/index.js +2 -0
- package/dist/node_modules/react-chartjs-2/dist/index.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +2 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +2 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +2 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +2 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +2 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +2 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +2 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +2 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +2 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +2 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js +2 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +2 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +2 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js.map +1 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.mjs.js +2 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.mjs.js.map +1 -0
- package/dist/node_modules/tslib/tslib.es6.js +2 -0
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +2 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +2 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +2 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js.map +1 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js +2 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js.map +1 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js +2 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -0
- package/package.json +2 -13
- /package/dist/{lib → _virtual}/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/Typography/Header/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/Typography/Text/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/color/alpha.js.map +0 -0
- /package/dist/{lib → dist/lib}/color/constants.js.map +0 -0
- /package/dist/{lib → dist/lib}/color/light.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Accordion/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/AlertDialog/AlertDialogAction.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/AlertDialog/AlertDialogCancel.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/AlertDialog/AlertDialogContent.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/AlertDialog/AlertDialogDescription.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/AlertDialog/AlertDialogRoot.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/AlertDialog/AlertDialogTitle.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/AlertDialog/AlertDialogTrigger.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/AlertDialog/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/AspectRatio/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Avatar/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Badge/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/BarChart/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/BubbleChart/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Button/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Callout/CalloutIcon.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Callout/CalloutRoot.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Callout/CalloutText.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Callout/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Card/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Checkbox/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/CheckboxCard/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/CheckboxGroup/CheckboxGroupItem.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/CheckboxGroup/CheckboxGroupRoot.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/CheckboxGroup/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/ContextMenu/ContextMenuCheckboxItem.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/ContextMenu/ContextMenuContent.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/ContextMenu/ContextMenuGroup.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/ContextMenu/ContextMenuItem.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/ContextMenu/ContextMenuItemIndicator.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/ContextMenu/ContextMenuLabel.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/ContextMenu/ContextMenuRadioGroup.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/ContextMenu/ContextMenuRadioItem.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/ContextMenu/ContextMenuRoot.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/ContextMenu/ContextMenuSeparator.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/ContextMenu/ContextMenuSubContent.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/ContextMenu/ContextMenuSubTrigger.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/ContextMenu/ContextMenuTrigger.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/ContextMenu/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/DataList/DataListItem.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/DataList/DataListLabel.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/DataList/DataListRoot.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/DataList/DataListValue.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/DataList/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Dialog/DialogAction.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Dialog/DialogCancel.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Dialog/DialogContent.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Dialog/DialogDescription.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Dialog/DialogRoot.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Dialog/DialogSlot.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Dialog/DialogTitle.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Dialog/DialogTrigger.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Dialog/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/DoughnutChart/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/DropdownMenu/DropdonMenuRadioGroup.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/DropdownMenu/DropdonMenuSubContent.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/DropdownMenu/DropdownMenuCheckboxItem.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/DropdownMenu/DropdownMenuContent.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/DropdownMenu/DropdownMenuItem.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/DropdownMenu/DropdownMenuItemIndicator.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/DropdownMenu/DropdownMenuLable.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/DropdownMenu/DropdownMenuRadioItem.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/DropdownMenu/DropdownMenuRoot.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/DropdownMenu/DropdownMenuSeparator.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/DropdownMenu/DropdownMenuSub.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/DropdownMenu/DropdownMenuSubTrigger.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/DropdownMenu/DropdownMenuTrigger.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/DropdownMenu/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/HoverCard/HoverCardContent.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/HoverCard/HoverCardRoot.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/HoverCard/HoverCardTrigger.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/HoverCard/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/IconButton/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Inset/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Label/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/LineChart/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Menubar/MenubarCheckboxItem.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Menubar/MenubarContent.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Menubar/MenubarItem.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Menubar/MenubarItemIndicator.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Menubar/MenubarMenu.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Menubar/MenubarRadioGroup.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Menubar/MenubarRadioItem.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Menubar/MenubarRoot.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Menubar/MenubarSeparator.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Menubar/MenubarSub.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Menubar/MenubarSubContent.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Menubar/MenubarSubTrigger.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Menubar/MenubarTrigger.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Menubar/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/NavigationMenu/NavigationMenuContent.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/NavigationMenu/NavigationMenuIndicator.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/NavigationMenu/NavigationMenuItem.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/NavigationMenu/NavigationMenuLink.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/NavigationMenu/NavigationMenuList.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/NavigationMenu/NavigationMenuRoot.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/NavigationMenu/NavigationMenuTrigger.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/NavigationMenu/NavigationMenuViewport.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/NavigationMenu/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/PieChart/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Popover/PopoverClose.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Popover/PopoverContent.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Popover/PopoverRoot.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Popover/PopoverTrigger.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Popover/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Progress/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/RadarChart/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Radio/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/RadioCards/RadioCardsItem.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/RadioCards/RadioCardsRoot.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/RadioCards/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/RadioGroup/RadioGroupItem.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/RadioGroup/RadioGroupRoot.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/RadioGroup/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/ScrollArea/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/SegmentedControl/SegmentedControlItem.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/SegmentedControl/SegmentedControlRoot.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/SegmentedControl/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Select/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Separator/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Skeleton/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Slider/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Spinner/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/TabNav/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Table/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Tabs/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/TextArea/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/TextField/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Toast/ToastActionButton.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Toast/ToastDescription.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Toast/ToastRoot.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Toast/ToastTitle.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Toast/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Toggle/ToggleWithText.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Toggle/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/ToggleGroup/ToggleGroupItem.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/ToggleGroup/ToggleGroupRoot.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/ToggleGroup/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/ToggleSwitch/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/components/Tooltip/index.js.map +0 -0
- /package/dist/{lib → dist/lib}/constants.js.map +0 -0
- /package/dist/{lib → dist/lib}/utils/useDarkMode.js.map +0 -0
- /package/dist/{lib → dist/lib}/utils/utils.js.map +0 -0
- /package/dist/{lib/globals.css → globals.css} +0 -0
- /package/dist/{lib/tailwind.config.d.ts → tailwind.config.d.ts} +0 -0
- /package/dist/{lib/tailwind.config.js → tailwind.config.js} +0 -0
- /package/dist/{lib/tsconfig.tsbuildinfo → tsconfig.tsbuildinfo} +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.mjs.js","sources":["../../../../../node_modules/@radix-ui/react-presence/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/presence/src/Presence.tsx\nimport * as React2 from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// packages/react/presence/src/useStateMachine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// packages/react/presence/src/Presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef({});\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(event.animationName);\n if (event.target === node && isCurrentAnimation) {\n ReactDOM.flushSync(() => send(\"ANIMATION_END\"));\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n if (node2) stylesRef.current = getComputedStyle(node2);\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Presence\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["Presence","props","present","children","presence","node","setNode","React2","useState","stylesRef","useRef","prevPresentRef","prevAnimationNameRef","initialState","state","send","machine","React","useReducer","event","useStateMachine","mounted","UNMOUNT","ANIMATION_OUT","unmountSuspended","MOUNT","ANIMATION_END","unmounted","useEffect","currentAnimationName","getAnimationName","current","useLayoutEffect","styles","wasPresent","prevAnimationName","display","handleAnimationEnd","isCurrentAnimation","includes","animationName","target","ReactDOM","flushSync","handleAnimationStart","addEventListener","removeEventListener","isPresent","ref","useCallback","node2","getComputedStyle","usePresence","child","Children","only","useComposedRefs","element","getter","Object","getOwnPropertyDescriptor","get","mayWarn","isReactWarning","getElementRef","cloneElement","displayName"],"mappings":"mNAkBG,IAACA,EAAYC,IACd,MAAMC,QAAEA,EAAOC,SAAEA,GAAaF,EACxBG,EAOR,SAAqBF,GACnB,MAAOG,EAAMC,GAAWC,EAAOC,WACzBC,EAAYF,EAAOG,OAAO,CAAE,GAC5BC,EAAiBJ,EAAOG,OAAOR,GAC/BU,EAAuBL,E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BT,GAC5ChC,EAAKyC,oBAAoB,eAAgBT,EAAmB,CAEpE,CACMtB,EAAK,gBACN,GACA,CAACV,EAAMU,IACH,CACLgC,UAAW,CAAC,UAAW,oBAAoBR,SAASzB,GACpDkC,IAAKzC,EAAO0C,aAAaC,IACnBA,IAAOzC,EAAUsB,QAAUoB,iBAAiBD,IAChD5C,EAAQ4C,EAAM,GACb,IAEP,CArFmBE,CAAYlD,GACvBmD,EAA4B,mBAAblD,EAA0BA,EAAS,CAAED,QAASE,EAAS2C,YAAexC,EAAO+C,SAASC,KAAKpD,GAC1G6C,EAAMQ,EAAgBpD,EAAS4C,IAuFvC,SAAuBS,GACrB,IAAIC,EAASC,OAAOC,yBAAyBH,EAAQxD,MAAO,QAAQ4D,IAChEC,EAAUJ,GAAU,mBAAoBA,GAAUA,EAAOK,eAC7D,GAAID,EACF,OAAOL,EAAQT,IAIjB,GAFAU,EAASC,OAAOC,yBAAyBH,EAAS,QAAQI,IAC1DC,EAAUJ,GAAU,mBAAoBA,GAAUA,EAAOK,eACrDD,EACF,OAAOL,EAAQxD,MAAM+C,IAEvB,OAAOS,EAAQxD,MAAM+C,KAAOS,EAAQT,GACtC,CAnG4CgB,CAAcX,IAExD,MADuC,mBAAblD,GACLC,EAAS2C,UAAYxC,EAAO0D,aAAaZ,EAAO,CAAEL,QAAS,IAAI,EAkFtF,SAASlB,EAAiBG,GACxB,OAAOA,GAAQO,eAAiB,MAClC,CAlFAxC,EAASkE,YAAc"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import*as r from"react";import*as i from"react-dom";import{Slot as t}from"../../react-slot/dist/index.mjs.js";import{j as o}from"../../../../_virtual/jsx-runtime.js";var e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((i,e)=>{const a=r.forwardRef(((r,i)=>{const{asChild:a,...n}=r,s=a?t:e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),o.jsx(s,{...n,ref:i})}));return a.displayName=`Primitive.${e}`,{...i,[e]:a}}),{});function a(r,t){r&&i.flushSync((()=>r.dispatchEvent(t)))}export{e as Primitive,a as dispatchDiscreteCustomEvent};
|
2
|
+
//# sourceMappingURL=index.mjs.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.mjs.js","sources":["../../../../../node_modules/@radix-ui/react-primitive/dist/index.mjs"],"sourcesContent":["// packages/react/primitive/src/Primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["Primitive","reduce","primitive","node","Node","React","forwardRef","props","forwardedRef","asChild","primitiveProps","Comp","Slot","window","Symbol","for","jsx","ref","displayName","dispatchDiscreteCustomEvent","target","event","ReactDOM","flushSync","dispatchEvent"],"mappings":"sKAKA,IAkBIA,EAlBQ,CACV,IACA,SACA,MACA,OACA,KACA,KACA,MACA,QACA,QACA,KACA,MACA,KACA,IACA,OACA,MACA,MAEoBC,QAAO,CAACC,EAAWC,KACvC,MAAMC,EAAOC,EAAMC,YAAW,CAACC,EAAOC,KACpC,MAAMC,QAAEA,KAAYC,GAAmBH,EACjCI,EAAOF,EAAUG,EAAOT,EAI9B,MAHsB,oBAAXU,SACTA,OAAOC,OAAOC,IAAI,cAAe,GAEZC,EAAAA,IAAIL,EAAM,IAAKD,EAAgBO,IAAKT,GAAe,IAG5E,OADAJ,EAAKc,YAAc,aAAaf,IACzB,IAAKD,EAAWC,CAACA,GAAOC,EAAM,GACpC,IACH,SAASe,EAA4BC,EAAQC,GACvCD,GAAQE,EAASC,WAAU,IAAMH,EAAOI,cAAcH,IAC5D"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import*as e from"react";import{createContextScope as a}from"../../react-context/dist/index.mjs.js";import{Primitive as r}from"../../react-primitive/dist/index.mjs.js";import{j as t}from"../../../../_virtual/jsx-runtime.js";var o="Progress",n=100,[s,i]=a(o),[u,l]=s(o),d=e.forwardRef(((e,a)=>{const{__scopeProgress:o,value:s=null,max:i,getValueLabel:l=p,...d}=e;!i&&0!==i||x(i)||console.error(`Invalid prop \`max\` of value \`${`${i}`}\` supplied to \`${"Progress"}\`. Only numbers greater than 0 are valid max values. Defaulting to \`100\`.`);const m=x(i)?i:n;null===s||g(s,m)||console.error(function(e,a){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${a}\`. The \`value\` prop must be:\n - a positive number\n - less than the value passed to \`max\` (or 100 if no \`max\` prop is set)\n - \`null\` or \`undefined\` if the progress is indeterminate.\n\nDefaulting to \`null\`.`}(`${s}`,"Progress"));const v=g(s,m)?s:null,j=c(v)?l(v,m):void 0;return t.jsx(u,{scope:o,value:v,max:m,children:t.jsx(r.div,{"aria-valuemax":m,"aria-valuemin":0,"aria-valuenow":c(v)?v:void 0,"aria-valuetext":j,role:"progressbar","data-state":f(v,m),"data-value":v??void 0,"data-max":m,...d,ref:a})})}));d.displayName=o;var m="ProgressIndicator",v=e.forwardRef(((e,a)=>{const{__scopeProgress:o,...n}=e,s=l(m,o);return t.jsx(r.div,{"data-state":f(s.value,s.max),"data-value":s.value??void 0,"data-max":s.max,...n,ref:a})}));function p(e,a){return`${Math.round(e/a*100)}%`}function f(e,a){return null==e?"indeterminate":e===a?"complete":"loading"}function c(e){return"number"==typeof e}function x(e){return c(e)&&!isNaN(e)&&e>0}function g(e,a){return c(e)&&!isNaN(e)&&e<=a&&e>=0}v.displayName=m;var j=d,h=v;export{h as Indicator,d as Progress,v as ProgressIndicator,j as Root,i as createProgressScope};
|
2
|
+
//# sourceMappingURL=index.mjs.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.mjs.js","sources":["../../../../../node_modules/@radix-ui/react-progress/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/progress/src/Progress.tsx\nimport * as React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PROGRESS_NAME = \"Progress\";\nvar DEFAULT_MAX = 100;\nvar [createProgressContext, createProgressScope] = createContextScope(PROGRESS_NAME);\nvar [ProgressProvider, useProgressContext] = createProgressContext(PROGRESS_NAME);\nvar Progress = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeProgress,\n value: valueProp = null,\n max: maxProp,\n getValueLabel = defaultGetValueLabel,\n ...progressProps\n } = props;\n if ((maxProp || maxProp === 0) && !isValidMaxNumber(maxProp)) {\n console.error(getInvalidMaxError(`${maxProp}`, \"Progress\"));\n }\n const max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX;\n if (valueProp !== null && !isValidValueNumber(valueProp, max)) {\n console.error(getInvalidValueError(`${valueProp}`, \"Progress\"));\n }\n const value = isValidValueNumber(valueProp, max) ? valueProp : null;\n const valueLabel = isNumber(value) ? getValueLabel(value, max) : void 0;\n return /* @__PURE__ */ jsx(ProgressProvider, { scope: __scopeProgress, value, max, children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"aria-valuemax\": max,\n \"aria-valuemin\": 0,\n \"aria-valuenow\": isNumber(value) ? value : void 0,\n \"aria-valuetext\": valueLabel,\n role: \"progressbar\",\n \"data-state\": getProgressState(value, max),\n \"data-value\": value ?? void 0,\n \"data-max\": max,\n ...progressProps,\n ref: forwardedRef\n }\n ) });\n }\n);\nProgress.displayName = PROGRESS_NAME;\nvar INDICATOR_NAME = \"ProgressIndicator\";\nvar ProgressIndicator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeProgress, ...indicatorProps } = props;\n const context = useProgressContext(INDICATOR_NAME, __scopeProgress);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getProgressState(context.value, context.max),\n \"data-value\": context.value ?? void 0,\n \"data-max\": context.max,\n ...indicatorProps,\n ref: forwardedRef\n }\n );\n }\n);\nProgressIndicator.displayName = INDICATOR_NAME;\nfunction defaultGetValueLabel(value, max) {\n return `${Math.round(value / max * 100)}%`;\n}\nfunction getProgressState(value, maxValue) {\n return value == null ? \"indeterminate\" : value === maxValue ? \"complete\" : \"loading\";\n}\nfunction isNumber(value) {\n return typeof value === \"number\";\n}\nfunction isValidMaxNumber(max) {\n return isNumber(max) && !isNaN(max) && max > 0;\n}\nfunction isValidValueNumber(value, max) {\n return isNumber(value) && !isNaN(value) && value <= max && value >= 0;\n}\nfunction getInvalidMaxError(propValue, componentName) {\n return `Invalid prop \\`max\\` of value \\`${propValue}\\` supplied to \\`${componentName}\\`. Only numbers greater than 0 are valid max values. Defaulting to \\`${DEFAULT_MAX}\\`.`;\n}\nfunction getInvalidValueError(propValue, componentName) {\n return `Invalid prop \\`value\\` of value \\`${propValue}\\` supplied to \\`${componentName}\\`. The \\`value\\` prop must be:\n - a positive number\n - less than the value passed to \\`max\\` (or ${DEFAULT_MAX} if no \\`max\\` prop is set)\n - \\`null\\` or \\`undefined\\` if the progress is indeterminate.\n\nDefaulting to \\`null\\`.`;\n}\nvar Root = Progress;\nvar Indicator = ProgressIndicator;\nexport {\n Indicator,\n Progress,\n ProgressIndicator,\n Root,\n createProgressScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["PROGRESS_NAME","DEFAULT_MAX","createProgressContext","createProgressScope","createContextScope","ProgressProvider","useProgressContext","Progress","React","forwardRef","props","forwardedRef","__scopeProgress","value","valueProp","max","maxProp","getValueLabel","defaultGetValueLabel","progressProps","isValidMaxNumber","console","error","isValidValueNumber","propValue","componentName","getInvalidValueError","valueLabel","isNumber","jsx","scope","children","Primitive","div","role","getProgressState","ref","displayName","INDICATOR_NAME","ProgressIndicator","indicatorProps","context","Math","round","maxValue","isNaN","Root","Indicator"],"mappings":"+NAOA,IAAIA,EAAgB,WAChBC,EAAc,KACbC,EAAuBC,GAAuBC,EAAmBJ,IACjEK,EAAkBC,GAAsBJ,EAAsBF,GAC/DO,EAAWC,EAAMC,YACnB,CAACC,EAAOC,KACN,MAAMC,gBACJA,EACAC,MAAOC,EAAY,KACnBC,IAAKC,EAAOC,cACZA,EAAgBC,KACbC,GACDT,GACCM,GAAuB,IAAZA,GAAmBI,EAAiBJ,IAClDK,QAAQC,MA4DL,mCA5D8B,GAAGN,uBAAW,0FAEjD,MAAMD,EAAMK,EAAiBJ,GAAWA,EAAUf,EAChC,OAAda,GAAuBS,EAAmBT,EAAWC,IACvDM,QAAQC,MA0Dd,SAA8BE,EAAWC,GACvC,MAAO,qCAAqCD,qBAA6BC,mOAM3E,CAjEoBC,CAAqB,GAAGZ,IAAa,aAErD,MAAMD,EAAQU,EAAmBT,EAAWC,GAAOD,EAAY,KACzDa,EAAaC,EAASf,GAASI,EAAcJ,EAAOE,QAAO,EACjE,OAAuBc,EAAGA,IAACxB,EAAkB,CAAEyB,MAAOlB,EAAiBC,QAAOE,MAAKgB,SAA0BF,EAAGA,IAC9GG,EAAUC,IACV,CACE,gBAAiBlB,EACjB,gBAAiB,EACjB,gBAAiBa,EAASf,GAASA,OAAQ,EAC3C,iBAAkBc,EAClBO,KAAM,cACN,aAAcC,EAAiBtB,EAAOE,GACtC,aAAcF,QAAS,EACvB,WAAYE,KACTI,EACHiB,IAAKzB,KAEL,IAGRJ,EAAS8B,YAAcrC,EACvB,IAAIsC,EAAiB,oBACjBC,EAAoB/B,EAAMC,YAC5B,CAACC,EAAOC,KACN,MAAMC,gBAAEA,KAAoB4B,GAAmB9B,EACzC+B,EAAUnC,EAAmBgC,EAAgB1B,GACnD,OAAuBiB,EAAGA,IACxBG,EAAUC,IACV,CACE,aAAcE,EAAiBM,EAAQ5B,MAAO4B,EAAQ1B,KACtD,aAAc0B,EAAQ5B,YAAS,EAC/B,WAAY4B,EAAQ1B,OACjByB,EACHJ,IAAKzB,GAER,IAIL,SAASO,EAAqBL,EAAOE,GACnC,MAAO,GAAG2B,KAAKC,MAAM9B,EAAQE,EAAM,OACrC,CACA,SAASoB,EAAiBtB,EAAO+B,GAC/B,OAAgB,MAAT/B,EAAgB,gBAAkBA,IAAU+B,EAAW,WAAa,SAC7E,CACA,SAAShB,EAASf,GAChB,MAAwB,iBAAVA,CAChB,CACA,SAASO,EAAiBL,GACxB,OAAOa,EAASb,KAAS8B,MAAM9B,IAAQA,EAAM,CAC/C,CACA,SAASQ,EAAmBV,EAAOE,GACjC,OAAOa,EAASf,KAAWgC,MAAMhC,IAAUA,GAASE,GAAOF,GAAS,CACtE,CAfA0B,EAAkBF,YAAcC,EA2B7B,IAACQ,EAAOvC,EACPwC,EAAYR"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import*as e from"react";import{composeEventHandlers as r}from"../../primitive/dist/index.mjs.js";import{useComposedRefs as o}from"../../react-compose-refs/dist/index.mjs.js";import{createContextScope as t}from"../../react-context/dist/index.mjs.js";import{Primitive as a}from"../../react-primitive/dist/index.mjs.js";import{createRovingFocusGroupScope as i,Root as s,Item as d}from"../../react-roving-focus/dist/index.mjs.js";import{useControllableState as n}from"../../react-use-controllable-state/dist/index.mjs.js";import{useDirection as c}from"../../react-direction/dist/index.mjs.js";import{useSize as u}from"../../react-use-size/dist/index.mjs.js";import{usePrevious as l}from"../../react-use-previous/dist/index.mjs.js";import{Presence as p}from"../../react-presence/dist/index.mjs.js";import{j as m}from"../../../../_virtual/jsx-runtime.js";var f="Radio",[j,v]=t(f),[b,h]=j(f),x=e.forwardRef(((t,i)=>{const{__scopeRadio:s,name:d,checked:n=!1,required:c,disabled:u,value:l="on",onCheck:p,...f}=t,[j,v]=e.useState(null),h=o(i,(e=>v(e))),x=e.useRef(!1),k=!j||Boolean(j.closest("form"));return m.jsxs(b,{scope:s,checked:n,disabled:u,children:[m.jsx(a.button,{type:"button",role:"radio","aria-checked":n,"data-state":w(n),"data-disabled":u?"":void 0,disabled:u,value:l,...f,ref:h,onClick:r(t.onClick,(e=>{n||p?.(),k&&(x.current=e.isPropagationStopped(),x.current||e.stopPropagation())}))}),k&&m.jsx(y,{control:j,bubbles:!x.current,name:d,value:l,checked:n,required:c,disabled:u,style:{transform:"translateX(-100%)"}})]})}));x.displayName=f;var k="RadioIndicator",R=e.forwardRef(((e,r)=>{const{__scopeRadio:o,forceMount:t,...i}=e,s=h(k,o);return m.jsx(p,{present:t||s.checked,children:m.jsx(a.span,{"data-state":w(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:r})})}));R.displayName=k;var y=r=>{const{control:o,checked:t,bubbles:a=!0,...i}=r,s=e.useRef(null),d=l(t),n=u(o);return e.useEffect((()=>{const e=s.current,r=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(r,"checked").set;if(d!==t&&o){const r=new Event("click",{bubbles:a});o.call(e,t),e.dispatchEvent(r)}}),[d,t,a]),m.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:t,...i,tabIndex:-1,ref:s,style:{...r.style,...n,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function w(e){return e?"checked":"unchecked"}var g=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],C="RadioGroup",[E,_]=t(C,[i,v]),q=i(),G=v(),[I,L]=E(C),N=e.forwardRef(((e,r)=>{const{__scopeRadioGroup:o,name:t,defaultValue:i,value:d,required:u=!1,disabled:l=!1,orientation:p,dir:f,loop:j=!0,onValueChange:v,...b}=e,h=q(o),x=c(f),[k,R]=n({prop:d,defaultProp:i,onChange:v});return m.jsx(I,{scope:o,name:t,required:u,disabled:l,value:k,onValueChange:R,children:m.jsx(s,{asChild:!0,...h,orientation:p,dir:x,loop:j,children:m.jsx(a.div,{role:"radiogroup","aria-required":u,"aria-orientation":p,"data-disabled":l?"":void 0,dir:x,...b,ref:r})})})}));N.displayName=C;var A="RadioGroupItem",D=e.forwardRef(((t,a)=>{const{__scopeRadioGroup:i,disabled:s,...n}=t,c=L(A,i),u=c.disabled||s,l=q(i),p=G(i),f=e.useRef(null),j=o(a,f),v=c.value===n.value,b=e.useRef(!1);return e.useEffect((()=>{const e=e=>{g.includes(e.key)&&(b.current=!0)},r=()=>b.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",r),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",r)}}),[]),m.jsx(d,{asChild:!0,...l,focusable:!u,active:v,children:m.jsx(x,{disabled:u,required:c.required,checked:v,...p,...n,name:c.name,ref:j,onCheck:()=>c.onValueChange(n.value),onKeyDown:r((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:r(n.onFocus,(()=>{b.current&&f.current?.click()}))})})}));D.displayName=A;var P=e.forwardRef(((e,r)=>{const{__scopeRadioGroup:o,...t}=e,a=G(o);return m.jsx(R,{...a,...t,ref:r})}));P.displayName="RadioGroupIndicator";var V=N,F=D;export{F as Item,N as RadioGroup,P as RadioGroupIndicator,D as RadioGroupItem,V as Root,_ as createRadioGroupScope};
|
2
|
+
//# sourceMappingURL=index.mjs.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.mjs.js","sources":["../../../../../node_modules/@radix-ui/react-radio-group/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/radio-group/src/RadioGroup.tsx\nimport * as React2 from \"react\";\nimport { composeEventHandlers as composeEventHandlers2 } from \"@radix-ui/primitive\";\nimport { useComposedRefs as useComposedRefs2 } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope as createContextScope2 } from \"@radix-ui/react-context\";\nimport { Primitive as Primitive2 } from \"@radix-ui/react-primitive\";\nimport * as RovingFocusGroup from \"@radix-ui/react-roving-focus\";\nimport { createRovingFocusGroupScope } from \"@radix-ui/react-roving-focus\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\n\n// packages/react/radio-group/src/Radio.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useSize } from \"@radix-ui/react-use-size\";\nimport { usePrevious } from \"@radix-ui/react-use-previous\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar RADIO_NAME = \"Radio\";\nvar [createRadioContext, createRadioScope] = createContextScope(RADIO_NAME);\nvar [RadioProvider, useRadioContext] = createRadioContext(RADIO_NAME);\nvar Radio = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRadio,\n name,\n checked = false,\n required,\n disabled,\n value = \"on\",\n onCheck,\n ...radioProps\n } = props;\n const [button, setButton] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));\n const hasConsumerStoppedPropagationRef = React.useRef(false);\n const isFormControl = button ? Boolean(button.closest(\"form\")) : true;\n return /* @__PURE__ */ jsxs(RadioProvider, { scope: __scopeRadio, checked, disabled, children: [\n /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n role: \"radio\",\n \"aria-checked\": checked,\n \"data-state\": getState(checked),\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n value,\n ...radioProps,\n ref: composedRefs,\n onClick: composeEventHandlers(props.onClick, (event) => {\n if (!checked) onCheck?.();\n if (isFormControl) {\n hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();\n if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();\n }\n })\n }\n ),\n isFormControl && /* @__PURE__ */ jsx(\n BubbleInput,\n {\n control: button,\n bubbles: !hasConsumerStoppedPropagationRef.current,\n name,\n value,\n checked,\n required,\n disabled,\n style: { transform: \"translateX(-100%)\" }\n }\n )\n ] });\n }\n);\nRadio.displayName = RADIO_NAME;\nvar INDICATOR_NAME = \"RadioIndicator\";\nvar RadioIndicator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeRadio, forceMount, ...indicatorProps } = props;\n const context = useRadioContext(INDICATOR_NAME, __scopeRadio);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.checked, children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n \"data-state\": getState(context.checked),\n \"data-disabled\": context.disabled ? \"\" : void 0,\n ...indicatorProps,\n ref: forwardedRef\n }\n ) });\n }\n);\nRadioIndicator.displayName = INDICATOR_NAME;\nvar BubbleInput = (props) => {\n const { control, checked, bubbles = true, ...inputProps } = props;\n const ref = React.useRef(null);\n const prevChecked = usePrevious(checked);\n const controlSize = useSize(control);\n React.useEffect(() => {\n const input = ref.current;\n const inputProto = window.HTMLInputElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(inputProto, \"checked\");\n const setChecked = descriptor.set;\n if (prevChecked !== checked && setChecked) {\n const event = new Event(\"click\", { bubbles });\n setChecked.call(input, checked);\n input.dispatchEvent(event);\n }\n }, [prevChecked, checked, bubbles]);\n return /* @__PURE__ */ jsx(\n \"input\",\n {\n type: \"radio\",\n \"aria-hidden\": true,\n defaultChecked: checked,\n ...inputProps,\n tabIndex: -1,\n ref,\n style: {\n ...props.style,\n ...controlSize,\n position: \"absolute\",\n pointerEvents: \"none\",\n opacity: 0,\n margin: 0\n }\n }\n );\n};\nfunction getState(checked) {\n return checked ? \"checked\" : \"unchecked\";\n}\n\n// packages/react/radio-group/src/RadioGroup.tsx\nimport { jsx as jsx2 } from \"react/jsx-runtime\";\nvar ARROW_KEYS = [\"ArrowUp\", \"ArrowDown\", \"ArrowLeft\", \"ArrowRight\"];\nvar RADIO_GROUP_NAME = \"RadioGroup\";\nvar [createRadioGroupContext, createRadioGroupScope] = createContextScope2(RADIO_GROUP_NAME, [\n createRovingFocusGroupScope,\n createRadioScope\n]);\nvar useRovingFocusGroupScope = createRovingFocusGroupScope();\nvar useRadioScope = createRadioScope();\nvar [RadioGroupProvider, useRadioGroupContext] = createRadioGroupContext(RADIO_GROUP_NAME);\nvar RadioGroup = React2.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRadioGroup,\n name,\n defaultValue,\n value: valueProp,\n required = false,\n disabled = false,\n orientation,\n dir,\n loop = true,\n onValueChange,\n ...groupProps\n } = props;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup);\n const direction = useDirection(dir);\n const [value, setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue,\n onChange: onValueChange\n });\n return /* @__PURE__ */ jsx2(\n RadioGroupProvider,\n {\n scope: __scopeRadioGroup,\n name,\n required,\n disabled,\n value,\n onValueChange: setValue,\n children: /* @__PURE__ */ jsx2(\n RovingFocusGroup.Root,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n orientation,\n dir: direction,\n loop,\n children: /* @__PURE__ */ jsx2(\n Primitive2.div,\n {\n role: \"radiogroup\",\n \"aria-required\": required,\n \"aria-orientation\": orientation,\n \"data-disabled\": disabled ? \"\" : void 0,\n dir: direction,\n ...groupProps,\n ref: forwardedRef\n }\n )\n }\n )\n }\n );\n }\n);\nRadioGroup.displayName = RADIO_GROUP_NAME;\nvar ITEM_NAME = \"RadioGroupItem\";\nvar RadioGroupItem = React2.forwardRef(\n (props, forwardedRef) => {\n const { __scopeRadioGroup, disabled, ...itemProps } = props;\n const context = useRadioGroupContext(ITEM_NAME, __scopeRadioGroup);\n const isDisabled = context.disabled || disabled;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeRadioGroup);\n const radioScope = useRadioScope(__scopeRadioGroup);\n const ref = React2.useRef(null);\n const composedRefs = useComposedRefs2(forwardedRef, ref);\n const checked = context.value === itemProps.value;\n const isArrowKeyPressedRef = React2.useRef(false);\n React2.useEffect(() => {\n const handleKeyDown = (event) => {\n if (ARROW_KEYS.includes(event.key)) {\n isArrowKeyPressedRef.current = true;\n }\n };\n const handleKeyUp = () => isArrowKeyPressedRef.current = false;\n document.addEventListener(\"keydown\", handleKeyDown);\n document.addEventListener(\"keyup\", handleKeyUp);\n return () => {\n document.removeEventListener(\"keydown\", handleKeyDown);\n document.removeEventListener(\"keyup\", handleKeyUp);\n };\n }, []);\n return /* @__PURE__ */ jsx2(\n RovingFocusGroup.Item,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n focusable: !isDisabled,\n active: checked,\n children: /* @__PURE__ */ jsx2(\n Radio,\n {\n disabled: isDisabled,\n required: context.required,\n checked,\n ...radioScope,\n ...itemProps,\n name: context.name,\n ref: composedRefs,\n onCheck: () => context.onValueChange(itemProps.value),\n onKeyDown: composeEventHandlers2((event) => {\n if (event.key === \"Enter\") event.preventDefault();\n }),\n onFocus: composeEventHandlers2(itemProps.onFocus, () => {\n if (isArrowKeyPressedRef.current) ref.current?.click();\n })\n }\n )\n }\n );\n }\n);\nRadioGroupItem.displayName = ITEM_NAME;\nvar INDICATOR_NAME2 = \"RadioGroupIndicator\";\nvar RadioGroupIndicator = React2.forwardRef(\n (props, forwardedRef) => {\n const { __scopeRadioGroup, ...indicatorProps } = props;\n const radioScope = useRadioScope(__scopeRadioGroup);\n return /* @__PURE__ */ jsx2(RadioIndicator, { ...radioScope, ...indicatorProps, ref: forwardedRef });\n }\n);\nRadioGroupIndicator.displayName = INDICATOR_NAME2;\nvar Root2 = RadioGroup;\nvar Item2 = RadioGroupItem;\nvar Indicator = RadioGroupIndicator;\nexport {\n Indicator,\n Item2 as Item,\n RadioGroup,\n RadioGroupIndicator,\n RadioGroupItem,\n Root2 as Root,\n createRadioGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["RADIO_NAME","createRadioContext","createRadioScope","createContextScope","RadioProvider","useRadioContext","Radio","React","forwardRef","props","forwardedRef","__scopeRadio","name","checked","required","disabled","value","onCheck","radioProps","button","setButton","useState","composedRefs","useComposedRefs","node","hasConsumerStoppedPropagationRef","useRef","isFormControl","Boolean","closest","jsxs","scope","children","jsx","Primitive","type","role","getState","ref","onClick","composeEventHandlers","event","current","isPropagationStopped","stopPropagation","BubbleInput","control","bubbles","style","transform","displayName","INDICATOR_NAME","RadioIndicator","forceMount","indicatorProps","context","Presence","present","span","inputProps","prevChecked","usePrevious","controlSize","useSize","useEffect","input","inputProto","window","HTMLInputElement","prototype","setChecked","Object","getOwnPropertyDescriptor","set","Event","call","dispatchEvent","defaultChecked","tabIndex","position","pointerEvents","opacity","margin","ARROW_KEYS","RADIO_GROUP_NAME","createRadioGroupContext","createRadioGroupScope","createContextScope2","createRovingFocusGroupScope","useRovingFocusGroupScope","useRadioScope","RadioGroupProvider","useRadioGroupContext","RadioGroup","React2","__scopeRadioGroup","defaultValue","valueProp","orientation","dir","loop","onValueChange","groupProps","rovingFocusGroupScope","direction","useDirection","setValue","useControllableState","prop","defaultProp","onChange","jsx2","RovingFocusGroup.Root","asChild","Primitive2","div","ITEM_NAME","RadioGroupItem","itemProps","isDisabled","radioScope","useComposedRefs2","isArrowKeyPressedRef","handleKeyDown","includes","key","handleKeyUp","document","addEventListener","removeEventListener","RovingFocusGroup.Item","focusable","active","onKeyDown","composeEventHandlers2","preventDefault","onFocus","click","RadioGroupIndicator","Root2","Item2"],"mappings":"i1BAuBA,IAAIA,EAAa,SACZC,EAAoBC,GAAoBC,EAAmBH,IAC3DI,EAAeC,GAAmBJ,EAAmBD,GACtDM,EAAQC,EAAMC,YAChB,CAACC,EAAOC,KACN,MAAMC,aACJA,EAAYC,KACZA,EAAIC,QACJA,GAAU,EAAKC,SACf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WC,GAAuB7F,IACd,UAAdA,EAAMoF,KAAiBpF,EAAM8F,gBAAgB,IAEnDC,QAASF,EAAsBhB,EAAUkB,SAAS,KAC5Cd,EAAqBhF,SAASJ,EAAII,SAAS+F,OAAO,OAK/D,IAGLpB,EAAenE,YAAckE,EAC7B,IACIsB,EAAsB5C,EAAOtF,YAC/B,CAACC,EAAOC,KACN,MAAMqF,kBAAEA,KAAsBzC,GAAmB7C,EAC3C+G,EAAa9B,EAAcK,GACjC,OAAuBgB,EAAI9E,IAACmB,EAAgB,IAAKoE,KAAelE,EAAgBhB,IAAK5B,GAAe,IAGxGgI,EAAoBxF,YARE,sBASnB,IAACyF,EAAQ9C,EACR+C,EAAQvB"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import*as e from"react";import{composeEventHandlers as t}from"../../primitive/dist/index.mjs.js";import{createCollection as o}from"../../react-collection/dist/index.mjs.js";import{useComposedRefs as r}from"../../react-compose-refs/dist/index.mjs.js";import{createContextScope as n}from"../../react-context/dist/index.mjs.js";import{useId as s}from"../../react-id/dist/index.mjs.js";import{Primitive as i}from"../../react-primitive/dist/index.mjs.js";import{useCallbackRef as c}from"../../react-use-callback-ref/dist/index.mjs.js";import{useControllableState as a}from"../../react-use-controllable-state/dist/index.mjs.js";import{useDirection as u}from"../../react-direction/dist/index.mjs.js";import{j as l}from"../../../../_virtual/jsx-runtime.js";var f="rovingFocusGroup.onEntryFocus",d={bubbles:!1,cancelable:!0},m="RovingFocusGroup",[p,v,b]=o(m),[j,w]=n(m,[b]),[x,g]=j(m),F=e.forwardRef(((e,t)=>l.jsx(p.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(p.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(I,{...e,ref:t})})})));F.displayName=m;var I=e.forwardRef(((o,n)=>{const{__scopeRovingFocusGroup:s,orientation:m,loop:p=!1,dir:b,currentTabStopId:j,defaultCurrentTabStopId:w,onCurrentTabStopIdChange:g,onEntryFocus:F,preventScrollOnEntryFocus:I=!1,...h}=o,R=e.useRef(null),y=r(n,R),S=u(b),[T=null,E]=a({prop:j,defaultProp:w,onChange:g}),[D,C]=e.useState(!1),_=c(F),k=v(s),G=e.useRef(!1),[K,L]=e.useState(0);return e.useEffect((()=>{const e=R.current;if(e)return e.addEventListener(f,_),()=>e.removeEventListener(f,_)}),[_]),l.jsx(x,{scope:s,orientation:m,dir:S,loop:p,currentTabStopId:T,onItemFocus:e.useCallback((e=>E(e)),[E]),onItemShiftTab:e.useCallback((()=>C(!0)),[]),onFocusableItemAdd:e.useCallback((()=>L((e=>e+1))),[]),onFocusableItemRemove:e.useCallback((()=>L((e=>e-1))),[]),children:l.jsx(i.div,{tabIndex:D||0===K?-1:0,"data-orientation":m,...h,ref:y,style:{outline:"none",...o.style},onMouseDown:t(o.onMouseDown,(()=>{G.current=!0})),onFocus:t(o.onFocus,(e=>{const t=!G.current;if(e.target===e.currentTarget&&t&&!D){const t=new CustomEvent(f,d);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=k().filter((e=>e.focusable));A([e.find((e=>e.active)),e.find((e=>e.id===T)),...e].filter(Boolean).map((e=>e.ref.current)),I)}}G.current=!1})),onBlur:t(o.onBlur,(()=>C(!1)))})})})),h="RovingFocusGroupItem",R=e.forwardRef(((o,r)=>{const{__scopeRovingFocusGroup:n,focusable:c=!0,active:a=!1,tabStopId:u,...f}=o,d=s(),m=u||d,b=g(h,n),j=b.currentTabStopId===m,w=v(n),{onFocusableItemAdd:x,onFocusableItemRemove:F}=b;return e.useEffect((()=>{if(c)return x(),()=>F()}),[c,x,F]),l.jsx(p.ItemSlot,{scope:n,id:m,focusable:c,active:a,children:l.jsx(i.span,{tabIndex:j?0:-1,"data-orientation":b.orientation,...f,ref:r,onMouseDown:t(o.onMouseDown,(e=>{c?b.onItemFocus(m):e.preventDefault()})),onFocus:t(o.onFocus,(()=>b.onItemFocus(m))),onKeyDown:t(o.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void b.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,o){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,o);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:y[r]}(e,b.orientation,b.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=w().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)n.reverse();else if("prev"===t||"next"===t){"prev"===t&&n.reverse();const s=n.indexOf(e.currentTarget);n=b.loop?(r=s+1,(o=n).map(((e,t)=>o[(r+t)%o.length]))):n.slice(s+1)}setTimeout((()=>A(n)))}var o,r}))})})}));R.displayName=h;var y={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function A(e,t=!1){const o=document.activeElement;for(const r of e){if(r===o)return;if(r.focus({preventScroll:t}),document.activeElement!==o)return}}var S=F,T=R;export{T as Item,S as Root,F as RovingFocusGroup,R as RovingFocusGroupItem,w as createRovingFocusGroupScope};
|
2
|
+
//# sourceMappingURL=index.mjs.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.mjs.js","sources":["../../../../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/roving-focus/src/RovingFocusGroup.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId = null, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId,\n onChange: onCurrentTabStopIdChange\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n })\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\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}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["ENTRY_FOCUS","EVENT_OPTIONS","bubbles","cancelable","GROUP_NAME","Collection","useCollection","createCollectionScope","createCollection","createRovingFocusGroupContext","createRovingFocusGroupScope","createContextScope","RovingFocusProvider","useRovingFocusContext","RovingFocusGroup","React","forwardRef","props","forwardedRef","jsx","Provider","scope","__scopeRovingFocusGroup","children","Slot","RovingFocusGroupImpl","ref","displayName","orientation","loop","dir","currentTabStopId","currentTabStopIdProp","defaultCurrentTabStopId","onCurrentTabStopIdChange","onEntryFocus","preventScrollOnEntryFocus","groupProps","useRef","composedRefs","useComposedRefs","direction","useDirection","setCurrentTabStopId","useControllableState","prop","defaultProp","onChange","isTabbingBackOut","setIsTabbingBackOut","useState","handleEntryFocus","useCallbackRef","getItems","isClickFocusRef","focusableItemsCount","setFocusableItemsCount","useEffect","node","current","addEventListener","removeEventListener","onItemFocus","useCallback","tabStopId","onItemShiftTab","onFocusableItemAdd","prevCount","onFocusableItemRemove","Primitive","div","tabIndex","style","outline","onMouseDown","composeEventHandlers","onFocus","event","isKeyboardFocus","target","currentTarget","entryFocusEvent","CustomEvent","dispatchEvent","defaultPrevented","items","filter","item","focusable","focusFirst","find","active","id","Boolean","map","onBlur","ITEM_NAME","RovingFocusGroupItem","itemProps","autoId","useId","context","isCurrentTabStop","ItemSlot","span","preventDefault","onKeyDown","key","shiftKey","focusIntent","getDirectionAwareKey","includes","MAP_KEY_TO_FOCUS_INTENT","getFocusIntent","metaKey","ctrlKey","altKey","candidateNodes","reverse","currentIndex","indexOf","startIndex","array","_","index","length","slice","setTimeout","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","PageUp","Home","PageDown","End","candidates","preventScroll","PREVIOUSLY_FOCUSED_ELEMENT","document","activeElement","candidate","focus","Root","Item"],"mappings":"6uBAcA,IAAIA,EAAc,gCACdC,EAAgB,CAAEC,SAAS,EAAOC,YAAY,GAC9CC,EAAa,oBACZC,EAAYC,EAAeC,GAAyBC,EAAiBJ,IACrEK,EAA+BC,GAA+BC,EACjEP,EACA,CAACG,KAEEK,EAAqBC,GAAyBJ,EAA8BL,GAC7EU,EAAmBC,EAAMC,YAC3B,CAACC,EAAOC,IACiBC,MAAId,EAAWe,SAAU,CAAEC,MAAOJ,EAAMK,wBAAyBC,SAA0BJ,EAAAA,IAAId,EAAWmB,KAAM,CAAEH,MAAOJ,EAAMK,wBAAyBC,SAA0BJ,EAAGA,IAACM,EAAsB,IAAKR,EAAOS,IAAKR,UAGxPJ,EAAiBa,YAAcvB,EAC/B,IAAIqB,EAAuBV,EAAMC,YAAW,CAACC,EAAOC,KAClD,MAAMI,wBACJ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AGLxB,EAAqBtE,YAAcqE,EACnC,IAAIgB,EAA0B,CAC5BgB,UAAW,OACXC,QAAS,OACTC,WAAY,OACZC,UAAW,OACXC,OAAQ,QACRC,KAAM,QACNC,SAAU,OACVC,IAAK,QAYP,SAAS9C,EAAW+C,EAAYC,GAAgB,GAC9C,MAAMC,EAA6BC,SAASC,cAC5C,IAAK,MAAMC,KAAaL,EAAY,CAClC,GAAIK,IAAcH,EAA4B,OAE9C,GADAG,EAAUC,MAAM,CAAEL,kBACdE,SAASC,gBAAkBF,EAA4B,MAC5D,CACH,CAIG,IAACK,EAAOjI,EACPkI,EAAO/C"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import*as e from"react";import{Primitive as r}from"../../react-primitive/dist/index.mjs.js";import{Presence as t}from"../../react-presence/dist/index.mjs.js";import{createContextScope as o}from"../../react-context/dist/index.mjs.js";import{useComposedRefs as n}from"../../react-compose-refs/dist/index.mjs.js";import{useCallbackRef as l}from"../../react-use-callback-ref/dist/index.mjs.js";import{useDirection as i}from"../../react-direction/dist/index.mjs.js";import{useLayoutEffect as s}from"../../react-use-layout-effect/dist/index.mjs.js";import{clamp as a}from"../../number/dist/index.mjs.js";import{composeEventHandlers as c}from"../../primitive/dist/index.mjs.js";import{j as d}from"../../../../_virtual/jsx-runtime.js";var u="ScrollArea",[p,f]=o(u),[h,w]=p(u),v=e.forwardRef(((t,o)=>{const{__scopeScrollArea:l,type:s="hover",dir:a,scrollHideDelay:c=600,...u}=t,[p,f]=e.useState(null),[w,v]=e.useState(null),[m,b]=e.useState(null),[g,S]=e.useState(null),[x,y]=e.useState(null),[E,T]=e.useState(0),[C,j]=e.useState(0),[R,P]=e.useState(!1),[_,L]=e.useState(!1),D=n(o,(e=>f(e))),A=i(a);return d.jsx(h,{scope:l,type:s,dir:A,scrollHideDelay:c,scrollArea:p,viewport:w,onViewportChange:v,content:m,onContentChange:b,scrollbarX:g,onScrollbarXChange:S,scrollbarXEnabled:R,onScrollbarXEnabledChange:P,scrollbarY:x,onScrollbarYChange:y,scrollbarYEnabled:_,onScrollbarYEnabledChange:L,onCornerWidthChange:T,onCornerHeightChange:j,children:d.jsx(r.div,{dir:A,...u,ref:D,style:{position:"relative","--radix-scroll-area-corner-width":E+"px","--radix-scroll-area-corner-height":C+"px",...t.style}})})}));v.displayName=u;var m="ScrollAreaViewport",b=e.forwardRef(((t,o)=>{const{__scopeScrollArea:l,children:i,nonce:s,...a}=t,c=w(m,l),u=e.useRef(null),p=n(o,u,c.onViewportChange);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),d.jsx(r.div,{"data-radix-scroll-area-viewport":"",...a,ref:p,style:{overflowX:c.scrollbarXEnabled?"scroll":"hidden",overflowY:c.scrollbarYEnabled?"scroll":"hidden",...t.style},children:d.jsx("div",{ref:c.onContentChange,style:{minWidth:"100%",display:"table"},children:i})})]})}));b.displayName=m;var g="ScrollAreaScrollbar",S=e.forwardRef(((r,t)=>{const{forceMount:o,...n}=r,l=w(g,r.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:s}=l,a="horizontal"===r.orientation;return e.useEffect((()=>(a?i(!0):s(!0),()=>{a?i(!1):s(!1)})),[a,i,s]),"hover"===l.type?d.jsx(x,{...n,ref:t,forceMount:o}):"scroll"===l.type?d.jsx(y,{...n,ref:t,forceMount:o}):"auto"===l.type?d.jsx(E,{...n,ref:t,forceMount:o}):"always"===l.type?d.jsx(T,{...n,ref:t}):null}));S.displayName=g;var x=e.forwardRef(((r,o)=>{const{forceMount:n,...l}=r,i=w(g,r.__scopeScrollArea),[s,a]=e.useState(!1);return e.useEffect((()=>{const e=i.scrollArea;let r=0;if(e){const t=()=>{window.clearTimeout(r),a(!0)},o=()=>{r=window.setTimeout((()=>a(!1)),i.scrollHideDelay)};return e.addEventListener("pointerenter",t),e.addEventListener("pointerleave",o),()=>{window.clearTimeout(r),e.removeEventListener("pointerenter",t),e.removeEventListener("pointerleave",o)}}}),[i.scrollArea,i.scrollHideDelay]),d.jsx(t,{present:n||s,children:d.jsx(E,{"data-state":s?"visible":"hidden",...l,ref:o})})})),y=e.forwardRef(((r,o)=>{const{forceMount:n,...l}=r,i=w(g,r.__scopeScrollArea),s="horizontal"===r.orientation,a=B((()=>p("SCROLL_END")),100),[u,p]=(f="hidden",h={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},e.useReducer(((e,r)=>h[e][r]??e),f));var f,h;return e.useEffect((()=>{if("idle"===u){const e=window.setTimeout((()=>p("HIDE")),i.scrollHideDelay);return()=>window.clearTimeout(e)}}),[u,i.scrollHideDelay,p]),e.useEffect((()=>{const e=i.viewport,r=s?"scrollLeft":"scrollTop";if(e){let t=e[r];const o=()=>{const o=e[r];t!==o&&(p("SCROLL"),a()),t=o};return e.addEventListener("scroll",o),()=>e.removeEventListener("scroll",o)}}),[i.viewport,s,p,a]),d.jsx(t,{present:n||"hidden"!==u,children:d.jsx(T,{"data-state":"hidden"===u?"hidden":"visible",...l,ref:o,onPointerEnter:c(r.onPointerEnter,(()=>p("POINTER_ENTER"))),onPointerLeave:c(r.onPointerLeave,(()=>p("POINTER_LEAVE")))})})})),E=e.forwardRef(((r,o)=>{const n=w(g,r.__scopeScrollArea),{forceMount:l,...i}=r,[s,a]=e.useState(!1),c="horizontal"===r.orientation,u=B((()=>{if(n.viewport){const e=n.viewport.offsetWidth<n.viewport.scrollWidth,r=n.viewport.offsetHeight<n.viewport.scrollHeight;a(c?e:r)}}),10);return k(n.viewport,u),k(n.content,u),d.jsx(t,{present:l||s,children:d.jsx(T,{"data-state":s?"visible":"hidden",...i,ref:o})})})),T=e.forwardRef(((r,t)=>{const{orientation:o="vertical",...n}=r,l=w(g,r.__scopeScrollArea),i=e.useRef(null),s=e.useRef(0),[a,c]=e.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=X(a.viewport,a.content),p={...n,sizes:a,onSizesChange:c,hasThumb:Boolean(u>0&&u<1),onThumbChange:e=>i.current=e,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:e=>s.current=e};function f(e,r){return function(e,r,t,o="ltr"){const n=Y(t),l=n/2,i=r||l,s=n-i,a=t.scrollbar.paddingStart+i,c=t.scrollbar.size-t.scrollbar.paddingEnd-s,d=t.content-t.viewport,u="ltr"===o?[0,d]:[-1*d,0];return M([a,c],u)(e)}(e,s.current,a,r)}return"horizontal"===o?d.jsx(C,{...p,ref:t,onThumbPositionChange:()=>{if(l.viewport&&i.current){const e=I(l.viewport.scrollLeft,a,l.dir);i.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{l.viewport&&(l.viewport.scrollLeft=e)},onDragScroll:e=>{l.viewport&&(l.viewport.scrollLeft=f(e,l.dir))}}):"vertical"===o?d.jsx(j,{...p,ref:t,onThumbPositionChange:()=>{if(l.viewport&&i.current){const e=I(l.viewport.scrollTop,a);i.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{l.viewport&&(l.viewport.scrollTop=e)},onDragScroll:e=>{l.viewport&&(l.viewport.scrollTop=f(e))}}):null})),C=e.forwardRef(((r,t)=>{const{sizes:o,onSizesChange:l,...i}=r,s=w(g,r.__scopeScrollArea),[a,c]=e.useState(),u=e.useRef(null),p=n(t,u,s.onScrollbarXChange);return e.useEffect((()=>{u.current&&c(getComputedStyle(u.current))}),[u]),d.jsx(_,{"data-orientation":"horizontal",...i,ref:p,sizes:o,style:{bottom:0,left:"rtl"===s.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===s.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Y(o)+"px",...r.style},onThumbPointerDown:e=>r.onThumbPointerDown(e.x),onDragScroll:e=>r.onDragScroll(e.x),onWheelScroll:(e,t)=>{if(s.viewport){const o=s.viewport.scrollLeft+e.deltaX;r.onWheelScroll(o),O(o,t)&&e.preventDefault()}},onResize:()=>{u.current&&s.viewport&&a&&l({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:W(a.paddingLeft),paddingEnd:W(a.paddingRight)}})}})})),j=e.forwardRef(((r,t)=>{const{sizes:o,onSizesChange:l,...i}=r,s=w(g,r.__scopeScrollArea),[a,c]=e.useState(),u=e.useRef(null),p=n(t,u,s.onScrollbarYChange);return e.useEffect((()=>{u.current&&c(getComputedStyle(u.current))}),[u]),d.jsx(_,{"data-orientation":"vertical",...i,ref:p,sizes:o,style:{top:0,right:"ltr"===s.dir?0:void 0,left:"rtl"===s.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Y(o)+"px",...r.style},onThumbPointerDown:e=>r.onThumbPointerDown(e.y),onDragScroll:e=>r.onDragScroll(e.y),onWheelScroll:(e,t)=>{if(s.viewport){const o=s.viewport.scrollTop+e.deltaY;r.onWheelScroll(o),O(o,t)&&e.preventDefault()}},onResize:()=>{u.current&&s.viewport&&a&&l({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:W(a.paddingTop),paddingEnd:W(a.paddingBottom)}})}})})),[R,P]=p(g),_=e.forwardRef(((t,o)=>{const{__scopeScrollArea:i,sizes:s,hasThumb:a,onThumbChange:u,onThumbPointerUp:p,onThumbPointerDown:f,onThumbPositionChange:h,onDragScroll:v,onWheelScroll:m,onResize:b,...S}=t,x=w(g,i),[y,E]=e.useState(null),T=n(o,(e=>E(e))),C=e.useRef(null),j=e.useRef(""),P=x.viewport,_=s.content-s.viewport,L=l(m),D=l(h),A=B(b,10);function z(e){if(C.current){const r=e.clientX-C.current.left,t=e.clientY-C.current.top;v({x:r,y:t})}}return e.useEffect((()=>{const e=e=>{const r=e.target,t=y?.contains(r);t&&L(e,_)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})}),[P,y,_,L]),e.useEffect(D,[s,D]),k(y,A),k(x.content,A),d.jsx(R,{scope:i,scrollbar:y,hasThumb:a,onThumbChange:l(u),onThumbPointerUp:l(p),onThumbPositionChange:D,onThumbPointerDown:l(f),children:d.jsx(r.div,{...S,ref:T,style:{position:"absolute",...S.style},onPointerDown:c(t.onPointerDown,(e=>{if(0===e.button){e.target.setPointerCapture(e.pointerId),C.current=y.getBoundingClientRect(),j.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",x.viewport&&(x.viewport.style.scrollBehavior="auto"),z(e)}})),onPointerMove:c(t.onPointerMove,z),onPointerUp:c(t.onPointerUp,(e=>{const r=e.target;r.hasPointerCapture(e.pointerId)&&r.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=j.current,x.viewport&&(x.viewport.style.scrollBehavior=""),C.current=null}))})})})),L="ScrollAreaThumb",D=e.forwardRef(((e,r)=>{const{forceMount:o,...n}=e,l=P(L,e.__scopeScrollArea);return d.jsx(t,{present:o||l.hasThumb,children:d.jsx(A,{ref:r,...n})})})),A=e.forwardRef(((t,o)=>{const{__scopeScrollArea:l,style:i,...s}=t,a=w(L,l),u=P(L,l),{onThumbPositionChange:p}=u,f=n(o,(e=>u.onThumbChange(e))),h=e.useRef(),v=B((()=>{h.current&&(h.current(),h.current=void 0)}),100);return e.useEffect((()=>{const e=a.viewport;if(e){const r=()=>{if(v(),!h.current){const r=U(e,p);h.current=r,p()}};return p(),e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}}),[a.viewport,v,p]),d.jsx(r.div,{"data-state":u.hasThumb?"visible":"hidden",...s,ref:f,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:c(t.onPointerDownCapture,(e=>{const r=e.target.getBoundingClientRect(),t=e.clientX-r.left,o=e.clientY-r.top;u.onThumbPointerDown({x:t,y:o})})),onPointerUp:c(t.onPointerUp,u.onThumbPointerUp)})}));D.displayName=L;var z="ScrollAreaCorner",H=e.forwardRef(((e,r)=>{const t=w(z,e.__scopeScrollArea),o=Boolean(t.scrollbarX&&t.scrollbarY);return"scroll"!==t.type&&o?d.jsx(N,{...e,ref:r}):null}));H.displayName=z;var N=e.forwardRef(((t,o)=>{const{__scopeScrollArea:n,...l}=t,i=w(z,n),[s,a]=e.useState(0),[c,u]=e.useState(0),p=Boolean(s&&c);return k(i.scrollbarX,(()=>{const e=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(e),u(e)})),k(i.scrollbarY,(()=>{const e=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(e),a(e)})),p?d.jsx(r.div,{...l,ref:o,style:{width:s,height:c,position:"absolute",right:"ltr"===i.dir?0:void 0,left:"rtl"===i.dir?0:void 0,bottom:0,...t.style}}):null}));function W(e){return e?parseInt(e,10):0}function X(e,r){const t=e/r;return isNaN(t)?0:t}function Y(e){const r=X(e.viewport,e.content),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=(e.scrollbar.size-t)*r;return Math.max(o,18)}function I(e,r,t="ltr"){const o=Y(r),n=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,l=r.scrollbar.size-n,i=r.content-r.viewport,s=l-o,c=a(e,"ltr"===t?[0,i]:[-1*i,0]);return M([0,i],[0,s])(c)}function M(e,r){return t=>{if(e[0]===e[1]||r[0]===r[1])return r[0];const o=(r[1]-r[0])/(e[1]-e[0]);return r[0]+o*(t-e[0])}}function O(e,r){return e>0&&e<r}var U=(e,r=(()=>{}))=>{let t={left:e.scrollLeft,top:e.scrollTop},o=0;return function n(){const l={left:e.scrollLeft,top:e.scrollTop},i=t.left!==l.left,s=t.top!==l.top;(i||s)&&r(),t=l,o=window.requestAnimationFrame(n)}(),()=>window.cancelAnimationFrame(o)};function B(r,t){const o=l(r),n=e.useRef(0);return e.useEffect((()=>()=>window.clearTimeout(n.current)),[]),e.useCallback((()=>{window.clearTimeout(n.current),n.current=window.setTimeout(o,t)}),[o,t])}function k(e,r){const t=l(r);s((()=>{let r=0;if(e){const o=new ResizeObserver((()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(t)}));return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}}),[e,t])}var F=v,V=b,q=S,$=D,G=H;export{G as Corner,F as Root,v as ScrollArea,H as ScrollAreaCorner,S as ScrollAreaScrollbar,D as ScrollAreaThumb,b as ScrollAreaViewport,q as Scrollbar,$ as Thumb,V as Viewport,f as createScrollAreaScope};
|
2
|
+
//# sourceMappingURL=index.mjs.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.mjs.js","sources":["../../../../../node_modules/@radix-ui/react-scroll-area/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/scroll-area/src/ScrollArea.tsx\nimport * as React2 from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { clamp } from \"@radix-ui/number\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\n\n// packages/react/scroll-area/src/useStateMachine.ts\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// packages/react/scroll-area/src/ScrollArea.tsx\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar SCROLL_AREA_NAME = \"ScrollArea\";\nvar [createScrollAreaContext, createScrollAreaScope] = createContextScope(SCROLL_AREA_NAME);\nvar [ScrollAreaProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME);\nvar ScrollArea = React2.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeScrollArea,\n type = \"hover\",\n dir,\n scrollHideDelay = 600,\n ...scrollAreaProps\n } = props;\n const [scrollArea, setScrollArea] = React2.useState(null);\n const [viewport, setViewport] = React2.useState(null);\n const [content, setContent] = React2.useState(null);\n const [scrollbarX, setScrollbarX] = React2.useState(null);\n const [scrollbarY, setScrollbarY] = React2.useState(null);\n const [cornerWidth, setCornerWidth] = React2.useState(0);\n const [cornerHeight, setCornerHeight] = React2.useState(0);\n const [scrollbarXEnabled, setScrollbarXEnabled] = React2.useState(false);\n const [scrollbarYEnabled, setScrollbarYEnabled] = React2.useState(false);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setScrollArea(node));\n const direction = useDirection(dir);\n return /* @__PURE__ */ jsx(\n ScrollAreaProvider,\n {\n scope: __scopeScrollArea,\n type,\n dir: direction,\n scrollHideDelay,\n scrollArea,\n viewport,\n onViewportChange: setViewport,\n content,\n onContentChange: setContent,\n scrollbarX,\n onScrollbarXChange: setScrollbarX,\n scrollbarXEnabled,\n onScrollbarXEnabledChange: setScrollbarXEnabled,\n scrollbarY,\n onScrollbarYChange: setScrollbarY,\n scrollbarYEnabled,\n onScrollbarYEnabledChange: setScrollbarYEnabled,\n onCornerWidthChange: setCornerWidth,\n onCornerHeightChange: setCornerHeight,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n dir: direction,\n ...scrollAreaProps,\n ref: composedRefs,\n style: {\n position: \"relative\",\n // Pass corner sizes as CSS vars to reduce re-renders of context consumers\n [\"--radix-scroll-area-corner-width\"]: cornerWidth + \"px\",\n [\"--radix-scroll-area-corner-height\"]: cornerHeight + \"px\",\n ...props.style\n }\n }\n )\n }\n );\n }\n);\nScrollArea.displayName = SCROLL_AREA_NAME;\nvar VIEWPORT_NAME = \"ScrollAreaViewport\";\nvar ScrollAreaViewport = React2.forwardRef(\n (props, forwardedRef) => {\n const { __scopeScrollArea, children, nonce, ...viewportProps } = props;\n const context = useScrollAreaContext(VIEWPORT_NAME, __scopeScrollArea);\n const ref = React2.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange);\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n \"style\",\n {\n dangerouslySetInnerHTML: {\n __html: `[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`\n },\n nonce\n }\n ),\n /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-radix-scroll-area-viewport\": \"\",\n ...viewportProps,\n ref: composedRefs,\n style: {\n /**\n * We don't support `visible` because the intention is to have at least one scrollbar\n * if this component is used and `visible` will behave like `auto` in that case\n * https://developer.mozilla.org/en-US/docs/Web/CSS/overflowed#description\n *\n * We don't handle `auto` because the intention is for the native implementation\n * to be hidden if using this component. We just want to ensure the node is scrollable\n * so could have used either `scroll` or `auto` here. We picked `scroll` to prevent\n * the browser from having to work out whether to render native scrollbars or not,\n * we tell it to with the intention of hiding them in CSS.\n */\n overflowX: context.scrollbarXEnabled ? \"scroll\" : \"hidden\",\n overflowY: context.scrollbarYEnabled ? \"scroll\" : \"hidden\",\n ...props.style\n },\n children: /* @__PURE__ */ jsx(\"div\", { ref: context.onContentChange, style: { minWidth: \"100%\", display: \"table\" }, children })\n }\n )\n ] });\n }\n);\nScrollAreaViewport.displayName = VIEWPORT_NAME;\nvar SCROLLBAR_NAME = \"ScrollAreaScrollbar\";\nvar ScrollAreaScrollbar = React2.forwardRef(\n (props, forwardedRef) => {\n const { forceMount, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const { onScrollbarXEnabledChange, onScrollbarYEnabledChange } = context;\n const isHorizontal = props.orientation === \"horizontal\";\n React2.useEffect(() => {\n isHorizontal ? onScrollbarXEnabledChange(true) : onScrollbarYEnabledChange(true);\n return () => {\n isHorizontal ? onScrollbarXEnabledChange(false) : onScrollbarYEnabledChange(false);\n };\n }, [isHorizontal, onScrollbarXEnabledChange, onScrollbarYEnabledChange]);\n return context.type === \"hover\" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarHover, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === \"scroll\" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarScroll, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === \"auto\" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarAuto, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === \"always\" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarVisible, { ...scrollbarProps, ref: forwardedRef }) : null;\n }\n);\nScrollAreaScrollbar.displayName = SCROLLBAR_NAME;\nvar ScrollAreaScrollbarHover = React2.forwardRef((props, forwardedRef) => {\n const { forceMount, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const [visible, setVisible] = React2.useState(false);\n React2.useEffect(() => {\n const scrollArea = context.scrollArea;\n let hideTimer = 0;\n if (scrollArea) {\n const handlePointerEnter = () => {\n window.clearTimeout(hideTimer);\n setVisible(true);\n };\n const handlePointerLeave = () => {\n hideTimer = window.setTimeout(() => setVisible(false), context.scrollHideDelay);\n };\n scrollArea.addEventListener(\"pointerenter\", handlePointerEnter);\n scrollArea.addEventListener(\"pointerleave\", handlePointerLeave);\n return () => {\n window.clearTimeout(hideTimer);\n scrollArea.removeEventListener(\"pointerenter\", handlePointerEnter);\n scrollArea.removeEventListener(\"pointerleave\", handlePointerLeave);\n };\n }\n }, [context.scrollArea, context.scrollHideDelay]);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || visible, children: /* @__PURE__ */ jsx(\n ScrollAreaScrollbarAuto,\n {\n \"data-state\": visible ? \"visible\" : \"hidden\",\n ...scrollbarProps,\n ref: forwardedRef\n }\n ) });\n});\nvar ScrollAreaScrollbarScroll = React2.forwardRef((props, forwardedRef) => {\n const { forceMount, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const isHorizontal = props.orientation === \"horizontal\";\n const debounceScrollEnd = useDebounceCallback(() => send(\"SCROLL_END\"), 100);\n const [state, send] = useStateMachine(\"hidden\", {\n hidden: {\n SCROLL: \"scrolling\"\n },\n scrolling: {\n SCROLL_END: \"idle\",\n POINTER_ENTER: \"interacting\"\n },\n interacting: {\n SCROLL: \"interacting\",\n POINTER_LEAVE: \"idle\"\n },\n idle: {\n HIDE: \"hidden\",\n SCROLL: \"scrolling\",\n POINTER_ENTER: \"interacting\"\n }\n });\n React2.useEffect(() => {\n if (state === \"idle\") {\n const hideTimer = window.setTimeout(() => send(\"HIDE\"), context.scrollHideDelay);\n return () => window.clearTimeout(hideTimer);\n }\n }, [state, context.scrollHideDelay, send]);\n React2.useEffect(() => {\n const viewport = context.viewport;\n const scrollDirection = isHorizontal ? \"scrollLeft\" : \"scrollTop\";\n if (viewport) {\n let prevScrollPos = viewport[scrollDirection];\n const handleScroll = () => {\n const scrollPos = viewport[scrollDirection];\n const hasScrollInDirectionChanged = prevScrollPos !== scrollPos;\n if (hasScrollInDirectionChanged) {\n send(\"SCROLL\");\n debounceScrollEnd();\n }\n prevScrollPos = scrollPos;\n };\n viewport.addEventListener(\"scroll\", handleScroll);\n return () => viewport.removeEventListener(\"scroll\", handleScroll);\n }\n }, [context.viewport, isHorizontal, send, debounceScrollEnd]);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || state !== \"hidden\", children: /* @__PURE__ */ jsx(\n ScrollAreaScrollbarVisible,\n {\n \"data-state\": state === \"hidden\" ? \"hidden\" : \"visible\",\n ...scrollbarProps,\n ref: forwardedRef,\n onPointerEnter: composeEventHandlers(props.onPointerEnter, () => send(\"POINTER_ENTER\")),\n onPointerLeave: composeEventHandlers(props.onPointerLeave, () => send(\"POINTER_LEAVE\"))\n }\n ) });\n});\nvar ScrollAreaScrollbarAuto = React2.forwardRef((props, forwardedRef) => {\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const { forceMount, ...scrollbarProps } = props;\n const [visible, setVisible] = React2.useState(false);\n const isHorizontal = props.orientation === \"horizontal\";\n const handleResize = useDebounceCallback(() => {\n if (context.viewport) {\n const isOverflowX = context.viewport.offsetWidth < context.viewport.scrollWidth;\n const isOverflowY = context.viewport.offsetHeight < context.viewport.scrollHeight;\n setVisible(isHorizontal ? isOverflowX : isOverflowY);\n }\n }, 10);\n useResizeObserver(context.viewport, handleResize);\n useResizeObserver(context.content, handleResize);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || visible, children: /* @__PURE__ */ jsx(\n ScrollAreaScrollbarVisible,\n {\n \"data-state\": visible ? \"visible\" : \"hidden\",\n ...scrollbarProps,\n ref: forwardedRef\n }\n ) });\n});\nvar ScrollAreaScrollbarVisible = React2.forwardRef((props, forwardedRef) => {\n const { orientation = \"vertical\", ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const thumbRef = React2.useRef(null);\n const pointerOffsetRef = React2.useRef(0);\n const [sizes, setSizes] = React2.useState({\n content: 0,\n viewport: 0,\n scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }\n });\n const thumbRatio = getThumbRatio(sizes.viewport, sizes.content);\n const commonProps = {\n ...scrollbarProps,\n sizes,\n onSizesChange: setSizes,\n hasThumb: Boolean(thumbRatio > 0 && thumbRatio < 1),\n onThumbChange: (thumb) => thumbRef.current = thumb,\n onThumbPointerUp: () => pointerOffsetRef.current = 0,\n onThumbPointerDown: (pointerPos) => pointerOffsetRef.current = pointerPos\n };\n function getScrollPosition(pointerPos, dir) {\n return getScrollPositionFromPointer(pointerPos, pointerOffsetRef.current, sizes, dir);\n }\n if (orientation === \"horizontal\") {\n return /* @__PURE__ */ jsx(\n ScrollAreaScrollbarX,\n {\n ...commonProps,\n ref: forwardedRef,\n onThumbPositionChange: () => {\n if (context.viewport && thumbRef.current) {\n const scrollPos = context.viewport.scrollLeft;\n const offset = getThumbOffsetFromScroll(scrollPos, sizes, context.dir);\n thumbRef.current.style.transform = `translate3d(${offset}px, 0, 0)`;\n }\n },\n onWheelScroll: (scrollPos) => {\n if (context.viewport) context.viewport.scrollLeft = scrollPos;\n },\n onDragScroll: (pointerPos) => {\n if (context.viewport) {\n context.viewport.scrollLeft = getScrollPosition(pointerPos, context.dir);\n }\n }\n }\n );\n }\n if (orientation === \"vertical\") {\n return /* @__PURE__ */ jsx(\n ScrollAreaScrollbarY,\n {\n ...commonProps,\n ref: forwardedRef,\n onThumbPositionChange: () => {\n if (context.viewport && thumbRef.current) {\n const scrollPos = context.viewport.scrollTop;\n const offset = getThumbOffsetFromScroll(scrollPos, sizes);\n thumbRef.current.style.transform = `translate3d(0, ${offset}px, 0)`;\n }\n },\n onWheelScroll: (scrollPos) => {\n if (context.viewport) context.viewport.scrollTop = scrollPos;\n },\n onDragScroll: (pointerPos) => {\n if (context.viewport) context.viewport.scrollTop = getScrollPosition(pointerPos);\n }\n }\n );\n }\n return null;\n});\nvar ScrollAreaScrollbarX = React2.forwardRef((props, forwardedRef) => {\n const { sizes, onSizesChange, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const [computedStyle, setComputedStyle] = React2.useState();\n const ref = React2.useRef(null);\n const composeRefs = useComposedRefs(forwardedRef, ref, context.onScrollbarXChange);\n React2.useEffect(() => {\n if (ref.current) setComputedStyle(getComputedStyle(ref.current));\n }, [ref]);\n return /* @__PURE__ */ jsx(\n ScrollAreaScrollbarImpl,\n {\n \"data-orientation\": \"horizontal\",\n ...scrollbarProps,\n ref: composeRefs,\n sizes,\n style: {\n bottom: 0,\n left: context.dir === \"rtl\" ? \"var(--radix-scroll-area-corner-width)\" : 0,\n right: context.dir === \"ltr\" ? \"var(--radix-scroll-area-corner-width)\" : 0,\n [\"--radix-scroll-area-thumb-width\"]: getThumbSize(sizes) + \"px\",\n ...props.style\n },\n onThumbPointerDown: (pointerPos) => props.onThumbPointerDown(pointerPos.x),\n onDragScroll: (pointerPos) => props.onDragScroll(pointerPos.x),\n onWheelScroll: (event, maxScrollPos) => {\n if (context.viewport) {\n const scrollPos = context.viewport.scrollLeft + event.deltaX;\n props.onWheelScroll(scrollPos);\n if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) {\n event.preventDefault();\n }\n }\n },\n onResize: () => {\n if (ref.current && context.viewport && computedStyle) {\n onSizesChange({\n content: context.viewport.scrollWidth,\n viewport: context.viewport.offsetWidth,\n scrollbar: {\n size: ref.current.clientWidth,\n paddingStart: toInt(computedStyle.paddingLeft),\n paddingEnd: toInt(computedStyle.paddingRight)\n }\n });\n }\n }\n }\n );\n});\nvar ScrollAreaScrollbarY = React2.forwardRef((props, forwardedRef) => {\n const { sizes, onSizesChange, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const [computedStyle, setComputedStyle] = React2.useState();\n const ref = React2.useRef(null);\n const composeRefs = useComposedRefs(forwardedRef, ref, context.onScrollbarYChange);\n React2.useEffect(() => {\n if (ref.current) setComputedStyle(getComputedStyle(ref.current));\n }, [ref]);\n return /* @__PURE__ */ jsx(\n ScrollAreaScrollbarImpl,\n {\n \"data-orientation\": \"vertical\",\n ...scrollbarProps,\n ref: composeRefs,\n sizes,\n style: {\n top: 0,\n right: context.dir === \"ltr\" ? 0 : void 0,\n left: context.dir === \"rtl\" ? 0 : void 0,\n bottom: \"var(--radix-scroll-area-corner-height)\",\n [\"--radix-scroll-area-thumb-height\"]: getThumbSize(sizes) + \"px\",\n ...props.style\n },\n onThumbPointerDown: (pointerPos) => props.onThumbPointerDown(pointerPos.y),\n onDragScroll: (pointerPos) => props.onDragScroll(pointerPos.y),\n onWheelScroll: (event, maxScrollPos) => {\n if (context.viewport) {\n const scrollPos = context.viewport.scrollTop + event.deltaY;\n props.onWheelScroll(scrollPos);\n if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) {\n event.preventDefault();\n }\n }\n },\n onResize: () => {\n if (ref.current && context.viewport && computedStyle) {\n onSizesChange({\n content: context.viewport.scrollHeight,\n viewport: context.viewport.offsetHeight,\n scrollbar: {\n size: ref.current.clientHeight,\n paddingStart: toInt(computedStyle.paddingTop),\n paddingEnd: toInt(computedStyle.paddingBottom)\n }\n });\n }\n }\n }\n );\n});\nvar [ScrollbarProvider, useScrollbarContext] = createScrollAreaContext(SCROLLBAR_NAME);\nvar ScrollAreaScrollbarImpl = React2.forwardRef((props, forwardedRef) => {\n const {\n __scopeScrollArea,\n sizes,\n hasThumb,\n onThumbChange,\n onThumbPointerUp,\n onThumbPointerDown,\n onThumbPositionChange,\n onDragScroll,\n onWheelScroll,\n onResize,\n ...scrollbarProps\n } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, __scopeScrollArea);\n const [scrollbar, setScrollbar] = React2.useState(null);\n const composeRefs = useComposedRefs(forwardedRef, (node) => setScrollbar(node));\n const rectRef = React2.useRef(null);\n const prevWebkitUserSelectRef = React2.useRef(\"\");\n const viewport = context.viewport;\n const maxScrollPos = sizes.content - sizes.viewport;\n const handleWheelScroll = useCallbackRef(onWheelScroll);\n const handleThumbPositionChange = useCallbackRef(onThumbPositionChange);\n const handleResize = useDebounceCallback(onResize, 10);\n function handleDragScroll(event) {\n if (rectRef.current) {\n const x = event.clientX - rectRef.current.left;\n const y = event.clientY - rectRef.current.top;\n onDragScroll({ x, y });\n }\n }\n React2.useEffect(() => {\n const handleWheel = (event) => {\n const element = event.target;\n const isScrollbarWheel = scrollbar?.contains(element);\n if (isScrollbarWheel) handleWheelScroll(event, maxScrollPos);\n };\n document.addEventListener(\"wheel\", handleWheel, { passive: false });\n return () => document.removeEventListener(\"wheel\", handleWheel, { passive: false });\n }, [viewport, scrollbar, maxScrollPos, handleWheelScroll]);\n React2.useEffect(handleThumbPositionChange, [sizes, handleThumbPositionChange]);\n useResizeObserver(scrollbar, handleResize);\n useResizeObserver(context.content, handleResize);\n return /* @__PURE__ */ jsx(\n ScrollbarProvider,\n {\n scope: __scopeScrollArea,\n scrollbar,\n hasThumb,\n onThumbChange: useCallbackRef(onThumbChange),\n onThumbPointerUp: useCallbackRef(onThumbPointerUp),\n onThumbPositionChange: handleThumbPositionChange,\n onThumbPointerDown: useCallbackRef(onThumbPointerDown),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...scrollbarProps,\n ref: composeRefs,\n style: { position: \"absolute\", ...scrollbarProps.style },\n onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {\n const mainPointer = 0;\n if (event.button === mainPointer) {\n const element = event.target;\n element.setPointerCapture(event.pointerId);\n rectRef.current = scrollbar.getBoundingClientRect();\n prevWebkitUserSelectRef.current = document.body.style.webkitUserSelect;\n document.body.style.webkitUserSelect = \"none\";\n if (context.viewport) context.viewport.style.scrollBehavior = \"auto\";\n handleDragScroll(event);\n }\n }),\n onPointerMove: composeEventHandlers(props.onPointerMove, handleDragScroll),\n onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {\n const element = event.target;\n if (element.hasPointerCapture(event.pointerId)) {\n element.releasePointerCapture(event.pointerId);\n }\n document.body.style.webkitUserSelect = prevWebkitUserSelectRef.current;\n if (context.viewport) context.viewport.style.scrollBehavior = \"\";\n rectRef.current = null;\n })\n }\n )\n }\n );\n});\nvar THUMB_NAME = \"ScrollAreaThumb\";\nvar ScrollAreaThumb = React2.forwardRef(\n (props, forwardedRef) => {\n const { forceMount, ...thumbProps } = props;\n const scrollbarContext = useScrollbarContext(THUMB_NAME, props.__scopeScrollArea);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || scrollbarContext.hasThumb, children: /* @__PURE__ */ jsx(ScrollAreaThumbImpl, { ref: forwardedRef, ...thumbProps }) });\n }\n);\nvar ScrollAreaThumbImpl = React2.forwardRef(\n (props, forwardedRef) => {\n const { __scopeScrollArea, style, ...thumbProps } = props;\n const scrollAreaContext = useScrollAreaContext(THUMB_NAME, __scopeScrollArea);\n const scrollbarContext = useScrollbarContext(THUMB_NAME, __scopeScrollArea);\n const { onThumbPositionChange } = scrollbarContext;\n const composedRef = useComposedRefs(\n forwardedRef,\n (node) => scrollbarContext.onThumbChange(node)\n );\n const removeUnlinkedScrollListenerRef = React2.useRef();\n const debounceScrollEnd = useDebounceCallback(() => {\n if (removeUnlinkedScrollListenerRef.current) {\n removeUnlinkedScrollListenerRef.current();\n removeUnlinkedScrollListenerRef.current = void 0;\n }\n }, 100);\n React2.useEffect(() => {\n const viewport = scrollAreaContext.viewport;\n if (viewport) {\n const handleScroll = () => {\n debounceScrollEnd();\n if (!removeUnlinkedScrollListenerRef.current) {\n const listener = addUnlinkedScrollListener(viewport, onThumbPositionChange);\n removeUnlinkedScrollListenerRef.current = listener;\n onThumbPositionChange();\n }\n };\n onThumbPositionChange();\n viewport.addEventListener(\"scroll\", handleScroll);\n return () => viewport.removeEventListener(\"scroll\", handleScroll);\n }\n }, [scrollAreaContext.viewport, debounceScrollEnd, onThumbPositionChange]);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": scrollbarContext.hasThumb ? \"visible\" : \"hidden\",\n ...thumbProps,\n ref: composedRef,\n style: {\n width: \"var(--radix-scroll-area-thumb-width)\",\n height: \"var(--radix-scroll-area-thumb-height)\",\n ...style\n },\n onPointerDownCapture: composeEventHandlers(props.onPointerDownCapture, (event) => {\n const thumb = event.target;\n const thumbRect = thumb.getBoundingClientRect();\n const x = event.clientX - thumbRect.left;\n const y = event.clientY - thumbRect.top;\n scrollbarContext.onThumbPointerDown({ x, y });\n }),\n onPointerUp: composeEventHandlers(props.onPointerUp, scrollbarContext.onThumbPointerUp)\n }\n );\n }\n);\nScrollAreaThumb.displayName = THUMB_NAME;\nvar CORNER_NAME = \"ScrollAreaCorner\";\nvar ScrollAreaCorner = React2.forwardRef(\n (props, forwardedRef) => {\n const context = useScrollAreaContext(CORNER_NAME, props.__scopeScrollArea);\n const hasBothScrollbarsVisible = Boolean(context.scrollbarX && context.scrollbarY);\n const hasCorner = context.type !== \"scroll\" && hasBothScrollbarsVisible;\n return hasCorner ? /* @__PURE__ */ jsx(ScrollAreaCornerImpl, { ...props, ref: forwardedRef }) : null;\n }\n);\nScrollAreaCorner.displayName = CORNER_NAME;\nvar ScrollAreaCornerImpl = React2.forwardRef((props, forwardedRef) => {\n const { __scopeScrollArea, ...cornerProps } = props;\n const context = useScrollAreaContext(CORNER_NAME, __scopeScrollArea);\n const [width, setWidth] = React2.useState(0);\n const [height, setHeight] = React2.useState(0);\n const hasSize = Boolean(width && height);\n useResizeObserver(context.scrollbarX, () => {\n const height2 = context.scrollbarX?.offsetHeight || 0;\n context.onCornerHeightChange(height2);\n setHeight(height2);\n });\n useResizeObserver(context.scrollbarY, () => {\n const width2 = context.scrollbarY?.offsetWidth || 0;\n context.onCornerWidthChange(width2);\n setWidth(width2);\n });\n return hasSize ? /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...cornerProps,\n ref: forwardedRef,\n style: {\n width,\n height,\n position: \"absolute\",\n right: context.dir === \"ltr\" ? 0 : void 0,\n left: context.dir === \"rtl\" ? 0 : void 0,\n bottom: 0,\n ...props.style\n }\n }\n ) : null;\n});\nfunction toInt(value) {\n return value ? parseInt(value, 10) : 0;\n}\nfunction getThumbRatio(viewportSize, contentSize) {\n const ratio = viewportSize / contentSize;\n return isNaN(ratio) ? 0 : ratio;\n}\nfunction getThumbSize(sizes) {\n const ratio = getThumbRatio(sizes.viewport, sizes.content);\n const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;\n const thumbSize = (sizes.scrollbar.size - scrollbarPadding) * ratio;\n return Math.max(thumbSize, 18);\n}\nfunction getScrollPositionFromPointer(pointerPos, pointerOffset, sizes, dir = \"ltr\") {\n const thumbSizePx = getThumbSize(sizes);\n const thumbCenter = thumbSizePx / 2;\n const offset = pointerOffset || thumbCenter;\n const thumbOffsetFromEnd = thumbSizePx - offset;\n const minPointerPos = sizes.scrollbar.paddingStart + offset;\n const maxPointerPos = sizes.scrollbar.size - sizes.scrollbar.paddingEnd - thumbOffsetFromEnd;\n const maxScrollPos = sizes.content - sizes.viewport;\n const scrollRange = dir === \"ltr\" ? [0, maxScrollPos] : [maxScrollPos * -1, 0];\n const interpolate = linearScale([minPointerPos, maxPointerPos], scrollRange);\n return interpolate(pointerPos);\n}\nfunction getThumbOffsetFromScroll(scrollPos, sizes, dir = \"ltr\") {\n const thumbSizePx = getThumbSize(sizes);\n const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;\n const scrollbar = sizes.scrollbar.size - scrollbarPadding;\n const maxScrollPos = sizes.content - sizes.viewport;\n const maxThumbPos = scrollbar - thumbSizePx;\n const scrollClampRange = dir === \"ltr\" ? [0, maxScrollPos] : [maxScrollPos * -1, 0];\n const scrollWithoutMomentum = clamp(scrollPos, scrollClampRange);\n const interpolate = linearScale([0, maxScrollPos], [0, maxThumbPos]);\n return interpolate(scrollWithoutMomentum);\n}\nfunction linearScale(input, output) {\n return (value) => {\n if (input[0] === input[1] || output[0] === output[1]) return output[0];\n const ratio = (output[1] - output[0]) / (input[1] - input[0]);\n return output[0] + ratio * (value - input[0]);\n };\n}\nfunction isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos) {\n return scrollPos > 0 && scrollPos < maxScrollPos;\n}\nvar addUnlinkedScrollListener = (node, handler = () => {\n}) => {\n let prevPosition = { left: node.scrollLeft, top: node.scrollTop };\n let rAF = 0;\n (function loop() {\n const position = { left: node.scrollLeft, top: node.scrollTop };\n const isHorizontalScroll = prevPosition.left !== position.left;\n const isVerticalScroll = prevPosition.top !== position.top;\n if (isHorizontalScroll || isVerticalScroll) handler();\n prevPosition = position;\n rAF = window.requestAnimationFrame(loop);\n })();\n return () => window.cancelAnimationFrame(rAF);\n};\nfunction useDebounceCallback(callback, delay) {\n const handleCallback = useCallbackRef(callback);\n const debounceTimerRef = React2.useRef(0);\n React2.useEffect(() => () => window.clearTimeout(debounceTimerRef.current), []);\n return React2.useCallback(() => {\n window.clearTimeout(debounceTimerRef.current);\n debounceTimerRef.current = window.setTimeout(handleCallback, delay);\n }, [handleCallback, delay]);\n}\nfunction useResizeObserver(element, onResize) {\n const handleResize = useCallbackRef(onResize);\n useLayoutEffect(() => {\n let rAF = 0;\n if (element) {\n const resizeObserver = new ResizeObserver(() => {\n cancelAnimationFrame(rAF);\n rAF = window.requestAnimationFrame(handleResize);\n });\n resizeObserver.observe(element);\n return () => {\n window.cancelAnimationFrame(rAF);\n resizeObserver.unobserve(element);\n };\n }\n }, [element, handleResize]);\n}\nvar Root = ScrollArea;\nvar Viewport = ScrollAreaViewport;\nvar Scrollbar = ScrollAreaScrollbar;\nvar Thumb = ScrollAreaThumb;\nvar Corner = ScrollAreaCorner;\nexport {\n Corner,\n Root,\n ScrollArea,\n ScrollAreaCorner,\n ScrollAreaScrollbar,\n ScrollAreaThumb,\n ScrollAreaViewport,\n Scrollbar,\n Thumb,\n Viewport,\n createScrollAreaScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["SCROLL_AREA_NAME","createScrollAreaContext","createScrollAreaScope","createContextScope","ScrollAreaProvider","useScrollAreaContext","ScrollArea","React2","forwardRef","props","forwardedRef","__scopeScrollArea","type","dir","scrollHideDelay","scrollAreaProps","scrollArea","setScrollArea","useState","viewport","setViewport","content","setContent","scrollbarX","setScrollbarX","scrollbarY","setScrollbarY","cornerWidth","setCornerWidth","cornerHeight","setCornerHeight","scrollbarXEnabled","setScrollbarXEnabled","scrollbarYEnabled","setScrollbarYEnabled","composedRefs","useComposedRefs","node","direction","useDirection","jsx","scope","onViewportChange","onContentChange","onScrollbarXChange","onScrollbarXEnabledChange","onScrollbarYChange","onScrollbarYEnabledChange","onCornerWidthChange","onCornerHeightChange","children","Primitive","div","ref","style","position","displayName","VIEWPORT_NAME","ScrollAreaViewport","nonce","viewportProps","context","useRef","jsxs","Fragment","dangerouslySetInnerHTML","__html","overflowX","overflowY","minWidth","display","SCROLLBAR_NAME","ScrollAreaScrollbar","forceMount","scrollbarProps","isHorizontal","orientation","useEffect","ScrollAreaScrollbarHover","ScrollAreaScrollbarScroll","ScrollAreaScrollbarAuto","ScrollAreaScrollbarVisible","visible","setVisible","hideTimer","handlePointerEnter","window","clearTimeout","handlePointerLeave","setTimeout","addEventListener","removeEventListener","Presence","present","debounceScrollEnd","useDebounceCallback","send","state","initialState","machine","hidden","SCROLL","scrolling","SCROLL_END","POINTER_ENTER","interacting","POINTER_LEAVE","idle","HIDE","React","useReducer","event","scrollDirection","prevScrollPos","handleScroll","scrollPos","onPointerEnter","composeEventHandlers","onPointerLeave","handleResize","isOverflowX","offsetWidth","scrollWidth","isOverflowY","offsetHeight","scrollHeight","useResizeObserver","thumbRef","pointerOffsetRef","sizes","setSizes","scrollbar","size","paddingStart","paddingEnd","thumbRatio","getThumbRatio","commonProps","onSizesChange","hasThumb","Boolean","onThumbChange","thumb","current","onThumbPointerUp","onThumbPointerDown","pointerPos","getScrollPosition","pointerOffset","thumbSizePx","getThumbSize","thumbCenter","offset","thumbOffsetFromEnd","minPointerPos","maxPointerPos","maxScrollPos","scrollRange","linearScale","interpolate","getScrollPositionFromPointer","ScrollAreaScrollbarX","onThumbPositionChange","getThumbOffsetFromScroll","scrollLeft","transform","onWheelScroll","onDragScroll","ScrollAreaScrollbarY","scrollTop","computedStyle","setComputedStyle","composeRefs","getComputedStyle","ScrollAreaScrollbarImpl","bottom","left","right","x","deltaX","isScrollingWithinScrollbarBounds","preventDefault","onResize","clientWidth","toInt","paddingLeft","paddingRight","top","y","deltaY","clientHeight","paddingTop","paddingBottom","ScrollbarProvider","useScrollbarContext","setScrollbar","rectRef","prevWebkitUserSelectRef","handleWheelScroll","useCallbackRef","handleThumbPositionChange","handleDragScroll","clientX","clientY","handleWheel","element","target","isScrollbarWheel","contains","document","passive","onPointerDown","button","setPointerCapture","pointerId","getBoundingClientRect","body","webkitUserSelect","scrollBehavior","onPointerMove","onPointerUp","hasPointerCapture","releasePointerCapture","THUMB_NAME","ScrollAreaThumb","thumbProps","scrollbarContext","ScrollAreaThumbImpl","scrollAreaContext","composedRef","removeUnlinkedScrollListenerRef","listener","addUnlinkedScrollListener","width","height","onPointerDownCapture","thumbRect","CORNER_NAME","ScrollAreaCorner","hasBothScrollbarsVisible","ScrollAreaCornerImpl","cornerProps","setWidth","setHeight","hasSize","height2","width2","value","parseInt","viewportSize","contentSize","ratio","isNaN","scrollbarPadding","thumbSize","Math","max","maxThumbPos","scrollWithoutMomentum","clamp","input","output","handler","prevPosition","rAF","loop","isHorizontalScroll","isVerticalScroll","requestAnimationFrame","cancelAnimationFrame","callback","delay","handleCallback","debounceTimerRef","useCallback","useLayoutEffect","resizeObserver","ResizeObserver","observe","unobserve","Root","Viewport","Scrollbar","Thumb","Corner"],"mappings":"utBAyBA,IAAIA,EAAmB,cAClBC,EAAyBC,GAAyBC,EAAmBH,IACrEI,EAAoBC,GAAwBJ,EAAwBD,GACrEM,EAAaC,EAAOC,YACtB,CAACC,EAAOC,KACN,MAAMC,kBACJA,EAAiBC,KACjBA,EAAO,QAAOC,IACdA,EAAGC,gBACHA,EAAkB,OACfC,GACDN,GACGO,EAAYC,GAAiBV,EAAOW,SAAS,OAC7CC,EAAUC,GAAeb,EAAOW,SAAS,OACzCG,EAASC,GAAcf,EAAOW,SAAS,OACvCK,EAAYC,GAAiBjB,EAAOW,SAAS,OAC7CO,EAAYC,GAAiBnB,EAAOW,SAAS,OAC7CS,EAAaC,GAAkBrB,EAAOW,SAAS,IAC/CW,EAAcC,GAAmBvB,EAAOW,SAAS,IACjDa,EAAmBC,GAAwBzB,EAAOW,UAAS,IAC3De,EAAmBC,GAAwB3B,EAAOW,UAAS,GAC5DiB,EAAeC,EAAgB1B,GAAe2B,GAASpB,EAAcoB,KACrEC,EAAYC,EAAa1B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M,EASV,OARA,SAAUC,IACR,MAAMlN,EAAW,CAAEyH,KAAM3I,EAAK+H,WAAYuB,IAAKtJ,EAAKoI,WAC9CiG,EAAqBH,EAAavF,OAASzH,EAASyH,KACpD2F,EAAmBJ,EAAa5E,MAAQpI,EAASoI,KACnD+E,GAAsBC,IAAkBL,IAC5CC,EAAehN,EACfiN,EAAMlL,OAAOsL,sBAAsBH,EACpC,CAPD,GAQO,IAAMnL,OAAOuL,qBAAqBL,EAAI,EAE/C,SAASzK,EAAoB+K,EAAUC,GACrC,MAAMC,EAAiBzE,EAAeuE,GAChCG,EAAmB1Q,EAAOuD,OAAO,GAEvC,OADAvD,EAAOsE,WAAU,IAAM,IAAMS,OAAOC,aAAa0L,EAAiBlI,UAAU,IACrExI,EAAO2Q,aAAY,KACxB5L,OAAOC,aAAa0L,EAAiBlI,SACrCkI,EAAiBlI,QAAUzD,OAAOG,WAAWuL,EAAgBD,EAAM,GAClE,CAACC,EAAgBD,GACtB,CACA,SAASjJ,EAAkB+E,EAASvB,GAClC,MAAM/D,EAAegF,EAAejB,GACpC6F,GAAgB,KACd,IAAIX,EAAM,EACV,GAAI3D,EAAS,CACX,MAAMuE,EAAiB,IAAIC,gBAAe,KACxCR,qBAAqBL,GACrBA,EAAMlL,OAAOsL,sBAAsBrJ,EAAa,IAGlD,OADA6J,EAAeE,QAAQzE,GAChB,KACLvH,OAAOuL,qBAAqBL,GAC5BY,EAAeG,UAAU1E,EAAQ,CAEpC,IACA,CAACA,EAAStF,GACf,CACG,IAACiK,EAAOlR,EACPmR,EAAW/N,EACXgO,EAAYlN,EACZmN,EAAQ3D,EACR4D,EAAS9C"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import*as e from"react";import*as t from"react-dom";import{clamp as o}from"../../number/dist/index.mjs.js";import{composeEventHandlers as n}from"../../primitive/dist/index.mjs.js";import{createCollection as r}from"../../react-collection/dist/index.mjs.js";import{useComposedRefs as i}from"../../react-compose-refs/dist/index.mjs.js";import{createContextScope as l}from"../../react-context/dist/index.mjs.js";import{useDirection as s}from"../../react-direction/dist/index.mjs.js";import{DismissableLayer as a}from"../../react-dismissable-layer/dist/index.mjs.js";import{useFocusGuards as c}from"../../react-focus-guards/dist/index.mjs.js";import{FocusScope as d}from"../../react-focus-scope/dist/index.mjs.js";import{useId as u}from"../../react-id/dist/index.mjs.js";import{createPopperScope as p,Anchor as f,Content as m,Arrow as h,Root as v}from"../../react-popper/dist/index.mjs.js";import{Portal as g}from"../../react-portal/dist/index.mjs.js";import{Primitive as x}from"../../react-primitive/dist/index.mjs.js";import{Slot as w}from"../../react-slot/dist/index.mjs.js";import{useCallbackRef as y}from"../../react-use-callback-ref/dist/index.mjs.js";import{useControllableState as S}from"../../react-use-controllable-state/dist/index.mjs.js";import{useLayoutEffect as j}from"../../react-use-layout-effect/dist/index.mjs.js";import{usePrevious as b}from"../../react-use-previous/dist/index.mjs.js";import{VisuallyHidden as C}from"../../react-visually-hidden/dist/index.mjs.js";import{hideOthers as _}from"../../../aria-hidden/dist/es2015/index.js";import P from"../../../react-remove-scroll/dist/es2015/Combination.js";import{j as R}from"../../../../_virtual/jsx-runtime.js";var I=[" ","Enter","ArrowUp","ArrowDown"],T=[" ","Enter"],k="Select",[E,D,N]=r(k),[L,M]=l(k,[N,p]),O=p(),[H,A]=L(k),[B,V]=L(k),K=t=>{const{__scopeSelect:o,children:n,open:r,defaultOpen:i,onOpenChange:l,value:a,defaultValue:c,onValueChange:d,dir:p,name:f,autoComplete:m,disabled:h,required:g}=t,x=O(o),[w,y]=e.useState(null),[j,b]=e.useState(null),[C,_]=e.useState(!1),P=s(p),[I=!1,T]=S({prop:r,defaultProp:i,onChange:l}),[k,D]=S({prop:a,defaultProp:c,onChange:d}),N=e.useRef(null),L=!w||Boolean(w.closest("form")),[M,A]=e.useState(new Set),V=Array.from(M).map((e=>e.props.value)).join(";");return R.jsx(v,{...x,children:R.jsxs(H,{required:g,scope:o,trigger:w,onTriggerChange:y,valueNode:j,onValueNodeChange:b,valueNodeHasChildren:C,onValueNodeHasChildrenChange:_,contentId:u(),value:k,onValueChange:D,open:I,onOpenChange:T,dir:P,triggerPointerDownPosRef:N,disabled:h,children:[R.jsx(E.Provider,{scope:o,children:R.jsx(B,{scope:t.__scopeSelect,onNativeOptionAdd:e.useCallback((e=>{A((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:e.useCallback((e=>{A((t=>{const o=new Set(t);return o.delete(e),o}))}),[]),children:n})}),L?R.jsxs(Te,{"aria-hidden":!0,required:g,tabIndex:-1,name:f,autoComplete:m,value:k,onChange:e=>D(e.target.value),disabled:h,children:[void 0===k?R.jsx("option",{value:""}):null,Array.from(M)]},V):null]})})};K.displayName=k;var F="SelectTrigger",W=e.forwardRef(((e,t)=>{const{__scopeSelect:o,disabled:r=!1,...l}=e,s=O(o),a=A(F,o),c=a.disabled||r,d=i(t,a.onTriggerChange),u=D(o),[p,m,h]=ke((e=>{const t=u().filter((e=>!e.disabled)),o=t.find((e=>e.value===a.value)),n=Ee(t,e,o);void 0!==n&&a.onValueChange(n.value)})),v=()=>{c||(a.onOpenChange(!0),h())};return R.jsx(f,{asChild:!0,...s,children:R.jsx(x.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":Ie(a.value)?"":void 0,...l,ref:d,onClick:n(l.onClick,(e=>{e.currentTarget.focus()})),onPointerDown:n(l.onPointerDown,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&(v(),a.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)},e.preventDefault())})),onKeyDown:n(l.onKeyDown,(e=>{const t=""!==p.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||m(e.key),t&&" "===e.key||I.includes(e.key)&&(v(),e.preventDefault())}))})})}));W.displayName=F;var U="SelectValue",q=e.forwardRef(((e,t)=>{const{__scopeSelect:o,className:n,style:r,children:l,placeholder:s="",...a}=e,c=A(U,o),{onValueNodeHasChildrenChange:d}=c,u=void 0!==l,p=i(t,c.onValueNodeChange);return j((()=>{d(u)}),[d,u]),R.jsx(x.span,{...a,ref:p,style:{pointerEvents:"none"},children:Ie(c.value)?R.jsx(R.Fragment,{children:s}):l})}));q.displayName=U;var z=e.forwardRef(((e,t)=>{const{__scopeSelect:o,children:n,...r}=e;return R.jsx(x.span,{"aria-hidden":!0,...r,ref:t,children:n||"▼"})}));z.displayName="SelectIcon";var X=e=>R.jsx(g,{asChild:!0,...e});X.displayName="SelectPortal";var Y="SelectContent",G=e.forwardRef(((o,n)=>{const r=A(Y,o.__scopeSelect),[i,l]=e.useState();if(j((()=>{l(new DocumentFragment)}),[]),!r.open){const e=i;return e?t.createPortal(R.jsx($,{scope:o.__scopeSelect,children:R.jsx(E.Slot,{scope:o.__scopeSelect,children:R.jsx("div",{children:o.children})})}),e):null}return R.jsx(Q,{...o,ref:n})}));G.displayName=Y;var Z=10,[$,J]=L(Y),Q=e.forwardRef(((t,o)=>{const{__scopeSelect:r,position:l="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:u,onPointerDownOutside:p,side:f,sideOffset:m,align:h,alignOffset:v,arrowPadding:g,collisionBoundary:x,collisionPadding:y,sticky:S,hideWhenDetached:j,avoidCollisions:b,...C}=t,I=A(Y,r),[T,k]=e.useState(null),[E,N]=e.useState(null),L=i(o,(e=>k(e))),[M,O]=e.useState(null),[H,B]=e.useState(null),V=D(r),[K,F]=e.useState(!1),W=e.useRef(!1);e.useEffect((()=>{if(T)return _(T)}),[T]),c();const U=e.useCallback((e=>{const[t,...o]=V().map((e=>e.ref.current)),[n]=o.slice(-1),r=document.activeElement;for(const o of e){if(o===r)return;if(o?.scrollIntoView({block:"nearest"}),o===t&&E&&(E.scrollTop=0),o===n&&E&&(E.scrollTop=E.scrollHeight),o?.focus(),document.activeElement!==r)return}}),[V,E]),q=e.useCallback((()=>U([M,T])),[U,M,T]);e.useEffect((()=>{K&&q()}),[K,q]);const{onOpenChange:z,triggerPointerDownPosRef:X}=I;e.useEffect((()=>{if(T){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(X.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(X.current?.y??0))}},o=o=>{e.x<=10&&e.y<=10?o.preventDefault():T.contains(o.target)||z(!1),document.removeEventListener("pointermove",t),X.current=null};return null!==X.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",o,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",o,{capture:!0})}}}),[T,z,X]),e.useEffect((()=>{const e=()=>z(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[z]);const[G,Z]=ke((e=>{const t=V().filter((e=>!e.disabled)),o=t.find((e=>e.ref.current===document.activeElement)),n=Ee(t,e,o);n&&setTimeout((()=>n.ref.current.focus()))})),J=e.useCallback(((e,t,o)=>{const n=!W.current&&!o;(void 0!==I.value&&I.value===t||n)&&(O(e),n&&(W.current=!0))}),[I.value]),Q=e.useCallback((()=>T?.focus()),[T]),oe=e.useCallback(((e,t,o)=>{const n=!W.current&&!o;(void 0!==I.value&&I.value===t||n)&&B(e)}),[I.value]),ne="popper"===l?te:ee,re=ne===te?{side:f,sideOffset:m,align:h,alignOffset:v,arrowPadding:g,collisionBoundary:x,collisionPadding:y,sticky:S,hideWhenDetached:j,avoidCollisions:b}:{};return R.jsx($,{scope:r,content:T,viewport:E,onViewportChange:N,itemRefCallback:J,selectedItem:M,onItemLeave:Q,itemTextRefCallback:oe,focusSelectedItem:q,selectedItemText:H,position:l,isPositioned:K,searchRef:G,children:R.jsx(P,{as:w,allowPinchZoom:!0,children:R.jsx(d,{asChild:!0,trapped:I.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:n(s,(e=>{I.trigger?.focus({preventScroll:!0}),e.preventDefault()})),children:R.jsx(a,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:u,onPointerDownOutside:p,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>I.onOpenChange(!1),children:R.jsx(ne,{role:"listbox",id:I.contentId,"data-state":I.open?"open":"closed",dir:I.dir,onContextMenu:e=>e.preventDefault(),...C,...re,onPlaced:()=>F(!0),ref:L,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:n(C.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||Z(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=V().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const o=e.target,n=t.indexOf(o);t=t.slice(n+1)}setTimeout((()=>U(t))),e.preventDefault()}}))})})})})})}));Q.displayName="SelectContentImpl";var ee=e.forwardRef(((t,n)=>{const{__scopeSelect:r,onPlaced:l,...s}=t,a=A(Y,r),c=J(Y,r),[d,u]=e.useState(null),[p,f]=e.useState(null),m=i(n,(e=>f(e))),h=D(r),v=e.useRef(!1),g=e.useRef(!0),{viewport:w,selectedItem:y,selectedItemText:S,focusSelectedItem:b}=c,C=e.useCallback((()=>{if(a.trigger&&a.valueNode&&d&&p&&w&&y&&S){const e=a.trigger.getBoundingClientRect(),t=p.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),r=S.getBoundingClientRect();if("rtl"!==a.dir){const i=r.left-t.left,l=n.left-i,s=e.left-l,a=e.width+s,c=Math.max(a,t.width),u=window.innerWidth-Z,p=o(l,[Z,u-c]);d.style.minWidth=a+"px",d.style.left=p+"px"}else{const i=t.right-r.right,l=window.innerWidth-n.right-i,s=window.innerWidth-e.right-l,a=e.width+s,c=Math.max(a,t.width),u=window.innerWidth-Z,p=o(l,[Z,u-c]);d.style.minWidth=a+"px",d.style.right=p+"px"}const i=h(),s=window.innerHeight-2*Z,c=w.scrollHeight,u=window.getComputedStyle(p),f=parseInt(u.borderTopWidth,10),m=parseInt(u.paddingTop,10),g=parseInt(u.borderBottomWidth,10),x=f+m+c+parseInt(u.paddingBottom,10)+g,j=Math.min(5*y.offsetHeight,x),b=window.getComputedStyle(w),C=parseInt(b.paddingTop,10),_=parseInt(b.paddingBottom,10),P=e.top+e.height/2-Z,R=s-P,I=y.offsetHeight/2,T=f+m+(y.offsetTop+I),k=x-T;if(T<=P){const e=y===i[i.length-1].ref.current;d.style.bottom="0px";const t=p.clientHeight-w.offsetTop-w.offsetHeight,o=T+Math.max(R,I+(e?_:0)+t+g);d.style.height=o+"px"}else{const e=y===i[0].ref.current;d.style.top="0px";const t=Math.max(P,f+w.offsetTop+(e?C:0)+I)+k;d.style.height=t+"px",w.scrollTop=T-P+w.offsetTop}d.style.margin=`${Z}px 0`,d.style.minHeight=j+"px",d.style.maxHeight=s+"px",l?.(),requestAnimationFrame((()=>v.current=!0))}}),[h,a.trigger,a.valueNode,d,p,w,y,S,a.dir,l]);j((()=>C()),[C]);const[_,P]=e.useState();j((()=>{p&&P(window.getComputedStyle(p).zIndex)}),[p]);const I=e.useCallback((e=>{e&&!0===g.current&&(C(),b?.(),g.current=!1)}),[C,b]);return R.jsx(oe,{scope:r,contentWrapper:d,shouldExpandOnScrollRef:v,onScrollButtonChange:I,children:R.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:R.jsx(x.div,{...s,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})}));ee.displayName="SelectItemAlignedPosition";var te=e.forwardRef(((e,t)=>{const{__scopeSelect:o,align:n="start",collisionPadding:r=Z,...i}=e,l=O(o);return R.jsx(m,{...l,...i,ref:t,align:n,collisionPadding:r,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})}));te.displayName="SelectPopperPosition";var[oe,ne]=L(Y,{}),re="SelectViewport",ie=e.forwardRef(((t,o)=>{const{__scopeSelect:r,nonce:l,...s}=t,a=J(re,r),c=ne(re,r),d=i(o,a.onViewportChange),u=e.useRef(0);return R.jsxs(R.Fragment,{children:[R.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:l}),R.jsx(E.Slot,{scope:r,children:R.jsx(x.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:d,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:n(s.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:o,shouldExpandOnScrollRef:n}=c;if(n?.current&&o){const e=Math.abs(u.current-t.scrollTop);if(e>0){const n=window.innerHeight-2*Z,r=parseFloat(o.style.minHeight),i=parseFloat(o.style.height),l=Math.max(r,i);if(l<n){const r=l+e,i=Math.min(n,r),s=r-i;o.style.height=i+"px","0px"===o.style.bottom&&(t.scrollTop=s>0?s:0,o.style.justifyContent="flex-end")}}}u.current=t.scrollTop}))})})]})}));ie.displayName=re;var le="SelectGroup",[se,ae]=L(le),ce=e.forwardRef(((e,t)=>{const{__scopeSelect:o,...n}=e,r=u();return R.jsx(se,{scope:o,id:r,children:R.jsx(x.div,{role:"group","aria-labelledby":r,...n,ref:t})})}));ce.displayName=le;var de="SelectLabel",ue=e.forwardRef(((e,t)=>{const{__scopeSelect:o,...n}=e,r=ae(de,o);return R.jsx(x.div,{id:r.id,...n,ref:t})}));ue.displayName=de;var pe="SelectItem",[fe,me]=L(pe),he=e.forwardRef(((t,o)=>{const{__scopeSelect:r,value:l,disabled:s=!1,textValue:a,...c}=t,d=A(pe,r),p=J(pe,r),f=d.value===l,[m,h]=e.useState(a??""),[v,g]=e.useState(!1),w=i(o,(e=>p.itemRefCallback?.(e,l,s))),y=u(),S=()=>{s||(d.onValueChange(l),d.onOpenChange(!1))};if(""===l)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return R.jsx(fe,{scope:r,value:l,disabled:s,textId:y,isSelected:f,onItemTextChange:e.useCallback((e=>{h((t=>t||(e?.textContent??"").trim()))}),[]),children:R.jsx(E.ItemSlot,{scope:r,value:l,disabled:s,textValue:m,children:R.jsx(x.div,{role:"option","aria-labelledby":y,"data-highlighted":v?"":void 0,"aria-selected":f&&v,"data-state":f?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...c,ref:w,onFocus:n(c.onFocus,(()=>g(!0))),onBlur:n(c.onBlur,(()=>g(!1))),onPointerUp:n(c.onPointerUp,S),onPointerMove:n(c.onPointerMove,(e=>{s?p.onItemLeave?.():e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:n(c.onPointerLeave,(e=>{e.currentTarget===document.activeElement&&p.onItemLeave?.()})),onKeyDown:n(c.onKeyDown,(e=>{""!==p.searchRef?.current&&" "===e.key||(T.includes(e.key)&&S()," "===e.key&&e.preventDefault())}))})})})}));he.displayName=pe;var ve="SelectItemText",ge=e.forwardRef(((o,n)=>{const{__scopeSelect:r,className:l,style:s,...a}=o,c=A(ve,r),d=J(ve,r),u=me(ve,r),p=V(ve,r),[f,m]=e.useState(null),h=i(n,(e=>m(e)),u.onItemTextChange,(e=>d.itemTextRefCallback?.(e,u.value,u.disabled))),v=f?.textContent,g=e.useMemo((()=>R.jsx("option",{value:u.value,disabled:u.disabled,children:v},u.value)),[u.disabled,u.value,v]),{onNativeOptionAdd:w,onNativeOptionRemove:y}=p;return j((()=>(w(g),()=>y(g))),[w,y,g]),R.jsxs(R.Fragment,{children:[R.jsx(x.span,{id:u.textId,...a,ref:h}),u.isSelected&&c.valueNode&&!c.valueNodeHasChildren?t.createPortal(a.children,c.valueNode):null]})}));ge.displayName=ve;var xe="SelectItemIndicator",we=e.forwardRef(((e,t)=>{const{__scopeSelect:o,...n}=e;return me(xe,o).isSelected?R.jsx(x.span,{"aria-hidden":!0,...n,ref:t}):null}));we.displayName=xe;var ye="SelectScrollUpButton",Se=e.forwardRef(((t,o)=>{const n=J(ye,t.__scopeSelect),r=ne(ye,t.__scopeSelect),[l,s]=e.useState(!1),a=i(o,r.onScrollButtonChange);return j((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;s(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),l?R.jsx(Ce,{...t,ref:a,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null}));Se.displayName=ye;var je="SelectScrollDownButton",be=e.forwardRef(((t,o)=>{const n=J(je,t.__scopeSelect),r=ne(je,t.__scopeSelect),[l,s]=e.useState(!1),a=i(o,r.onScrollButtonChange);return j((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,o=Math.ceil(t.scrollTop)<e;s(o)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),l?R.jsx(Ce,{...t,ref:a,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null}));be.displayName=je;var Ce=e.forwardRef(((t,o)=>{const{__scopeSelect:r,onAutoScroll:i,...l}=t,s=J("SelectScrollButton",r),a=e.useRef(null),c=D(r),d=e.useCallback((()=>{null!==a.current&&(window.clearInterval(a.current),a.current=null)}),[]);return e.useEffect((()=>()=>d()),[d]),j((()=>{const e=c().find((e=>e.ref.current===document.activeElement));e?.ref.current?.scrollIntoView({block:"nearest"})}),[c]),R.jsx(x.div,{"aria-hidden":!0,...l,ref:o,style:{flexShrink:0,...l.style},onPointerDown:n(l.onPointerDown,(()=>{null===a.current&&(a.current=window.setInterval(i,50))})),onPointerMove:n(l.onPointerMove,(()=>{s.onItemLeave?.(),null===a.current&&(a.current=window.setInterval(i,50))})),onPointerLeave:n(l.onPointerLeave,(()=>{d()}))})})),_e=e.forwardRef(((e,t)=>{const{__scopeSelect:o,...n}=e;return R.jsx(x.div,{"aria-hidden":!0,...n,ref:t})}));_e.displayName="SelectSeparator";var Pe="SelectArrow",Re=e.forwardRef(((e,t)=>{const{__scopeSelect:o,...n}=e,r=O(o),i=A(Pe,o),l=J(Pe,o);return i.open&&"popper"===l.position?R.jsx(h,{...r,...n,ref:t}):null}));function Ie(e){return""===e||void 0===e}Re.displayName=Pe;var Te=e.forwardRef(((t,o)=>{const{value:n,...r}=t,l=e.useRef(null),s=i(o,l),a=b(n);return e.useEffect((()=>{const e=l.current,t=window.HTMLSelectElement.prototype,o=Object.getOwnPropertyDescriptor(t,"value").set;if(a!==n&&o){const t=new Event("change",{bubbles:!0});o.call(e,n),e.dispatchEvent(t)}}),[a,n]),R.jsx(C,{asChild:!0,children:R.jsx("select",{...r,ref:s,defaultValue:n})})}));function ke(t){const o=y(t),n=e.useRef(""),r=e.useRef(0),i=e.useCallback((e=>{const t=n.current+e;o(t),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout((()=>e("")),1e3))}(t)}),[o]),l=e.useCallback((()=>{n.current="",window.clearTimeout(r.current)}),[]);return e.useEffect((()=>()=>window.clearTimeout(r.current)),[]),[n,i,l]}function Ee(e,t,o){const n=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,r=o?e.indexOf(o):-1;let i=(l=e,s=Math.max(r,0),l.map(((e,t)=>l[(s+t)%l.length])));var l,s;1===n.length&&(i=i.filter((e=>e!==o)));const a=i.find((e=>e.textValue.toLowerCase().startsWith(n.toLowerCase())));return a!==o?a:void 0}Te.displayName="BubbleSelect";var De=K,Ne=W,Le=q,Me=z,Oe=X,He=G,Ae=ie,Be=ce,Ve=ue,Ke=he,Fe=ge,We=we,Ue=_e;export{He as Content,Be as Group,Me as Icon,Ke as Item,We as ItemIndicator,Fe as ItemText,Ve as Label,Oe as Portal,De as Root,K as Select,Re as SelectArrow,G as SelectContent,ce as SelectGroup,z as SelectIcon,he as SelectItem,we as SelectItemIndicator,ge as SelectItemText,ue as SelectLabel,X as SelectPortal,be as SelectScrollDownButton,Se as SelectScrollUpButton,_e as SelectSeparator,W as SelectTrigger,q as SelectValue,ie as SelectViewport,Ue as Separator,Ne as Trigger,Le as Value,Ae as Viewport,M as createSelectScope};
|
2
|
+
//# sourceMappingURL=index.mjs.js.map
|