@lotte-innovate/ui-component-test 0.1.91 → 0.1.93

Sign up to get free protection for your applications and to get access to all the features.
Files changed (490) hide show
  1. package/dist/globals.css +2 -2
  2. package/dist/lib/Typography/Header/index.mjs +1 -1
  3. package/dist/lib/Typography/Header/index.mjs.map +1 -1
  4. package/dist/lib/Typography/Text/index.mjs +1 -1
  5. package/dist/lib/Typography/Text/index.mjs.map +1 -1
  6. package/dist/lib/components/Accordion/index.mjs +1 -1
  7. package/dist/lib/components/Accordion/index.mjs.map +1 -1
  8. package/dist/lib/components/AlertDialog/AlertDialogAction.mjs +1 -1
  9. package/dist/lib/components/AlertDialog/AlertDialogAction.mjs.map +1 -1
  10. package/dist/lib/components/AlertDialog/AlertDialogCancel.mjs +1 -1
  11. package/dist/lib/components/AlertDialog/AlertDialogCancel.mjs.map +1 -1
  12. package/dist/lib/components/AlertDialog/AlertDialogContent.mjs +1 -1
  13. package/dist/lib/components/AlertDialog/AlertDialogContent.mjs.map +1 -1
  14. package/dist/lib/components/AlertDialog/AlertDialogDescription.mjs +1 -1
  15. package/dist/lib/components/AlertDialog/AlertDialogDescription.mjs.map +1 -1
  16. package/dist/lib/components/AlertDialog/AlertDialogRoot.mjs +1 -1
  17. package/dist/lib/components/AlertDialog/AlertDialogRoot.mjs.map +1 -1
  18. package/dist/lib/components/AlertDialog/AlertDialogTitle.mjs +1 -1
  19. package/dist/lib/components/AlertDialog/AlertDialogTitle.mjs.map +1 -1
  20. package/dist/lib/components/AlertDialog/AlertDialogTrigger.mjs +1 -1
  21. package/dist/lib/components/AlertDialog/AlertDialogTrigger.mjs.map +1 -1
  22. package/dist/lib/components/AlertDialog/index.d.ts +0 -1
  23. package/dist/lib/components/AspectRatio/index.mjs +1 -1
  24. package/dist/lib/components/AspectRatio/index.mjs.map +1 -1
  25. package/dist/lib/components/Avatar/index.mjs +1 -1
  26. package/dist/lib/components/Avatar/index.mjs.map +1 -1
  27. package/dist/lib/components/Badge/index.mjs +1 -1
  28. package/dist/lib/components/Badge/index.mjs.map +1 -1
  29. package/dist/lib/components/BarChart/index.mjs +1 -1
  30. package/dist/lib/components/BarChart/index.mjs.map +1 -1
  31. package/dist/lib/components/BubbleChart/index.mjs +1 -1
  32. package/dist/lib/components/BubbleChart/index.mjs.map +1 -1
  33. package/dist/lib/components/Button/index.mjs +1 -1
  34. package/dist/lib/components/Button/index.mjs.map +1 -1
  35. package/dist/lib/components/Callout/CalloutIcon.mjs +1 -1
  36. package/dist/lib/components/Callout/CalloutIcon.mjs.map +1 -1
  37. package/dist/lib/components/Callout/CalloutRoot.mjs +1 -1
  38. package/dist/lib/components/Callout/CalloutRoot.mjs.map +1 -1
  39. package/dist/lib/components/Callout/CalloutText.mjs +1 -1
  40. package/dist/lib/components/Callout/CalloutText.mjs.map +1 -1
  41. package/dist/lib/components/Callout/index.d.ts +0 -1
  42. package/dist/lib/components/Card/index.mjs +1 -1
  43. package/dist/lib/components/Card/index.mjs.map +1 -1
  44. package/dist/lib/components/Checkbox/index.mjs +1 -1
  45. package/dist/lib/components/Checkbox/index.mjs.map +1 -1
  46. package/dist/lib/components/CheckboxCard/index.mjs +1 -1
  47. package/dist/lib/components/CheckboxCard/index.mjs.map +1 -1
  48. package/dist/lib/components/CheckboxGroup/CheckboxGroupItem.mjs +1 -1
  49. package/dist/lib/components/CheckboxGroup/CheckboxGroupItem.mjs.map +1 -1
  50. package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.mjs +1 -1
  51. package/dist/lib/components/CheckboxGroup/CheckboxGroupRoot.mjs.map +1 -1
  52. package/dist/lib/components/CheckboxGroup/index.d.ts +1 -2
  53. package/dist/lib/components/ContextMenu/ContextMenuCheckboxItem.mjs +1 -1
  54. package/dist/lib/components/ContextMenu/ContextMenuCheckboxItem.mjs.map +1 -1
  55. package/dist/lib/components/ContextMenu/ContextMenuContent.mjs +1 -1
  56. package/dist/lib/components/ContextMenu/ContextMenuContent.mjs.map +1 -1
  57. package/dist/lib/components/ContextMenu/ContextMenuGroup.mjs +1 -1
  58. package/dist/lib/components/ContextMenu/ContextMenuGroup.mjs.map +1 -1
  59. package/dist/lib/components/ContextMenu/ContextMenuItem.mjs +1 -1
  60. package/dist/lib/components/ContextMenu/ContextMenuItem.mjs.map +1 -1
  61. package/dist/lib/components/ContextMenu/ContextMenuItemIndicator.mjs +1 -1
  62. package/dist/lib/components/ContextMenu/ContextMenuItemIndicator.mjs.map +1 -1
  63. package/dist/lib/components/ContextMenu/ContextMenuLabel.mjs +1 -1
  64. package/dist/lib/components/ContextMenu/ContextMenuLabel.mjs.map +1 -1
  65. package/dist/lib/components/ContextMenu/ContextMenuRadioGroup.mjs +1 -1
  66. package/dist/lib/components/ContextMenu/ContextMenuRadioGroup.mjs.map +1 -1
  67. package/dist/lib/components/ContextMenu/ContextMenuRadioItem.mjs +1 -1
  68. package/dist/lib/components/ContextMenu/ContextMenuRadioItem.mjs.map +1 -1
  69. package/dist/lib/components/ContextMenu/ContextMenuRoot.mjs +1 -1
  70. package/dist/lib/components/ContextMenu/ContextMenuRoot.mjs.map +1 -1
  71. package/dist/lib/components/ContextMenu/ContextMenuSeparator.mjs +1 -1
  72. package/dist/lib/components/ContextMenu/ContextMenuSeparator.mjs.map +1 -1
  73. package/dist/lib/components/ContextMenu/ContextMenuSubContent.mjs +1 -1
  74. package/dist/lib/components/ContextMenu/ContextMenuSubContent.mjs.map +1 -1
  75. package/dist/lib/components/ContextMenu/ContextMenuSubTrigger.mjs +1 -1
  76. package/dist/lib/components/ContextMenu/ContextMenuSubTrigger.mjs.map +1 -1
  77. package/dist/lib/components/ContextMenu/ContextMenuTrigger.mjs +1 -1
  78. package/dist/lib/components/ContextMenu/ContextMenuTrigger.mjs.map +1 -1
  79. package/dist/lib/components/ContextMenu/index.d.ts +0 -1
  80. package/dist/lib/components/DataList/DataListItem.mjs +1 -1
  81. package/dist/lib/components/DataList/DataListItem.mjs.map +1 -1
  82. package/dist/lib/components/DataList/DataListLabel.mjs +1 -1
  83. package/dist/lib/components/DataList/DataListLabel.mjs.map +1 -1
  84. package/dist/lib/components/DataList/DataListRoot.mjs +1 -1
  85. package/dist/lib/components/DataList/DataListRoot.mjs.map +1 -1
  86. package/dist/lib/components/DataList/DataListValue.mjs +1 -1
  87. package/dist/lib/components/DataList/DataListValue.mjs.map +1 -1
  88. package/dist/lib/components/DataList/index.d.ts +0 -1
  89. package/dist/lib/components/Dialog/DialogAction.mjs +1 -1
  90. package/dist/lib/components/Dialog/DialogAction.mjs.map +1 -1
  91. package/dist/lib/components/Dialog/DialogCancel.mjs +1 -1
  92. package/dist/lib/components/Dialog/DialogCancel.mjs.map +1 -1
  93. package/dist/lib/components/Dialog/DialogContent.mjs +1 -1
  94. package/dist/lib/components/Dialog/DialogContent.mjs.map +1 -1
  95. package/dist/lib/components/Dialog/DialogDescription.mjs +1 -1
  96. package/dist/lib/components/Dialog/DialogDescription.mjs.map +1 -1
  97. package/dist/lib/components/Dialog/DialogRoot.mjs +1 -1
  98. package/dist/lib/components/Dialog/DialogRoot.mjs.map +1 -1
  99. package/dist/lib/components/Dialog/DialogSlot.mjs +1 -1
  100. package/dist/lib/components/Dialog/DialogSlot.mjs.map +1 -1
  101. package/dist/lib/components/Dialog/DialogTitle.mjs +1 -1
  102. package/dist/lib/components/Dialog/DialogTitle.mjs.map +1 -1
  103. package/dist/lib/components/Dialog/DialogTrigger.mjs +1 -1
  104. package/dist/lib/components/Dialog/DialogTrigger.mjs.map +1 -1
  105. package/dist/lib/components/Dialog/index.d.ts +1 -2
  106. package/dist/lib/components/DoughnutChart/index.mjs +1 -1
  107. package/dist/lib/components/DoughnutChart/index.mjs.map +1 -1
  108. package/dist/lib/components/DropdownMenu/DropdonMenuRadioGroup.mjs +1 -1
  109. package/dist/lib/components/DropdownMenu/DropdonMenuRadioGroup.mjs.map +1 -1
  110. package/dist/lib/components/DropdownMenu/DropdonMenuSubContent.mjs +1 -1
  111. package/dist/lib/components/DropdownMenu/DropdonMenuSubContent.mjs.map +1 -1
  112. package/dist/lib/components/DropdownMenu/DropdownMenuCheckboxItem.mjs +1 -1
  113. package/dist/lib/components/DropdownMenu/DropdownMenuCheckboxItem.mjs.map +1 -1
  114. package/dist/lib/components/DropdownMenu/DropdownMenuContent.mjs +1 -1
  115. package/dist/lib/components/DropdownMenu/DropdownMenuContent.mjs.map +1 -1
  116. package/dist/lib/components/DropdownMenu/DropdownMenuItem.mjs +1 -1
  117. package/dist/lib/components/DropdownMenu/DropdownMenuItem.mjs.map +1 -1
  118. package/dist/lib/components/DropdownMenu/DropdownMenuItemIndicator.mjs +1 -1
  119. package/dist/lib/components/DropdownMenu/DropdownMenuItemIndicator.mjs.map +1 -1
  120. package/dist/lib/components/DropdownMenu/DropdownMenuLable.mjs +1 -1
  121. package/dist/lib/components/DropdownMenu/DropdownMenuLable.mjs.map +1 -1
  122. package/dist/lib/components/DropdownMenu/DropdownMenuRadioItem.mjs +1 -1
  123. package/dist/lib/components/DropdownMenu/DropdownMenuRadioItem.mjs.map +1 -1
  124. package/dist/lib/components/DropdownMenu/DropdownMenuRoot.mjs +1 -1
  125. package/dist/lib/components/DropdownMenu/DropdownMenuRoot.mjs.map +1 -1
  126. package/dist/lib/components/DropdownMenu/DropdownMenuSeparator.mjs +1 -1
  127. package/dist/lib/components/DropdownMenu/DropdownMenuSeparator.mjs.map +1 -1
  128. package/dist/lib/components/DropdownMenu/DropdownMenuSub.mjs +1 -1
  129. package/dist/lib/components/DropdownMenu/DropdownMenuSub.mjs.map +1 -1
  130. package/dist/lib/components/DropdownMenu/DropdownMenuSubTrigger.mjs +1 -1
  131. package/dist/lib/components/DropdownMenu/DropdownMenuSubTrigger.mjs.map +1 -1
  132. package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.mjs +1 -1
  133. package/dist/lib/components/DropdownMenu/DropdownMenuTrigger.mjs.map +1 -1
  134. package/dist/lib/components/DropdownMenu/index.d.ts +1 -2
  135. package/dist/lib/components/HoverCard/HoverCardContent.mjs +1 -1
  136. package/dist/lib/components/HoverCard/HoverCardContent.mjs.map +1 -1
  137. package/dist/lib/components/HoverCard/HoverCardRoot.mjs +1 -1
  138. package/dist/lib/components/HoverCard/HoverCardRoot.mjs.map +1 -1
  139. package/dist/lib/components/HoverCard/HoverCardTrigger.mjs +1 -1
  140. package/dist/lib/components/HoverCard/HoverCardTrigger.mjs.map +1 -1
  141. package/dist/lib/components/HoverCard/index.d.ts +1 -2
  142. package/dist/lib/components/IconButton/index.mjs +1 -1
  143. package/dist/lib/components/IconButton/index.mjs.map +1 -1
  144. package/dist/lib/components/Inset/index.mjs +1 -1
  145. package/dist/lib/components/Inset/index.mjs.map +1 -1
  146. package/dist/lib/components/Label/index.mjs +1 -1
  147. package/dist/lib/components/Label/index.mjs.map +1 -1
  148. package/dist/lib/components/LineChart/index.mjs +1 -1
  149. package/dist/lib/components/LineChart/index.mjs.map +1 -1
  150. package/dist/lib/components/Menubar/MenubarCheckboxItem.mjs +1 -1
  151. package/dist/lib/components/Menubar/MenubarCheckboxItem.mjs.map +1 -1
  152. package/dist/lib/components/Menubar/MenubarContent.mjs +1 -1
  153. package/dist/lib/components/Menubar/MenubarContent.mjs.map +1 -1
  154. package/dist/lib/components/Menubar/MenubarItem.mjs +1 -1
  155. package/dist/lib/components/Menubar/MenubarItem.mjs.map +1 -1
  156. package/dist/lib/components/Menubar/MenubarItemIndicator.mjs +1 -1
  157. package/dist/lib/components/Menubar/MenubarItemIndicator.mjs.map +1 -1
  158. package/dist/lib/components/Menubar/MenubarMenu.mjs +1 -1
  159. package/dist/lib/components/Menubar/MenubarMenu.mjs.map +1 -1
  160. package/dist/lib/components/Menubar/MenubarRadioGroup.mjs +1 -1
  161. package/dist/lib/components/Menubar/MenubarRadioGroup.mjs.map +1 -1
  162. package/dist/lib/components/Menubar/MenubarRadioItem.mjs +1 -1
  163. package/dist/lib/components/Menubar/MenubarRadioItem.mjs.map +1 -1
  164. package/dist/lib/components/Menubar/MenubarRoot.mjs +1 -1
  165. package/dist/lib/components/Menubar/MenubarRoot.mjs.map +1 -1
  166. package/dist/lib/components/Menubar/MenubarSeparator.mjs +1 -1
  167. package/dist/lib/components/Menubar/MenubarSeparator.mjs.map +1 -1
  168. package/dist/lib/components/Menubar/MenubarSub.mjs +1 -1
  169. package/dist/lib/components/Menubar/MenubarSub.mjs.map +1 -1
  170. package/dist/lib/components/Menubar/MenubarSubContent.mjs +1 -1
  171. package/dist/lib/components/Menubar/MenubarSubContent.mjs.map +1 -1
  172. package/dist/lib/components/Menubar/MenubarSubTrigger.mjs +1 -1
  173. package/dist/lib/components/Menubar/MenubarSubTrigger.mjs.map +1 -1
  174. package/dist/lib/components/Menubar/MenubarTrigger.mjs +1 -1
  175. package/dist/lib/components/Menubar/MenubarTrigger.mjs.map +1 -1
  176. package/dist/lib/components/Menubar/index.d.ts +0 -1
  177. package/dist/lib/components/NavigationMenu/NavigationMenuContent.mjs +1 -1
  178. package/dist/lib/components/NavigationMenu/NavigationMenuContent.mjs.map +1 -1
  179. package/dist/lib/components/NavigationMenu/NavigationMenuIndicator.mjs +1 -1
  180. package/dist/lib/components/NavigationMenu/NavigationMenuIndicator.mjs.map +1 -1
  181. package/dist/lib/components/NavigationMenu/NavigationMenuItem.mjs +1 -1
  182. package/dist/lib/components/NavigationMenu/NavigationMenuItem.mjs.map +1 -1
  183. package/dist/lib/components/NavigationMenu/NavigationMenuLink.mjs +1 -1
  184. package/dist/lib/components/NavigationMenu/NavigationMenuLink.mjs.map +1 -1
  185. package/dist/lib/components/NavigationMenu/NavigationMenuList.mjs +1 -1
  186. package/dist/lib/components/NavigationMenu/NavigationMenuList.mjs.map +1 -1
  187. package/dist/lib/components/NavigationMenu/NavigationMenuRoot.mjs +1 -1
  188. package/dist/lib/components/NavigationMenu/NavigationMenuRoot.mjs.map +1 -1
  189. package/dist/lib/components/NavigationMenu/NavigationMenuTrigger.mjs +1 -1
  190. package/dist/lib/components/NavigationMenu/NavigationMenuTrigger.mjs.map +1 -1
  191. package/dist/lib/components/NavigationMenu/NavigationMenuViewport.mjs +1 -1
  192. package/dist/lib/components/NavigationMenu/NavigationMenuViewport.mjs.map +1 -1
  193. package/dist/lib/components/NavigationMenu/index.d.ts +0 -1
  194. package/dist/lib/components/PieChart/index.mjs +1 -1
  195. package/dist/lib/components/PieChart/index.mjs.map +1 -1
  196. package/dist/lib/components/Popover/PopoverClose.mjs +1 -1
  197. package/dist/lib/components/Popover/PopoverClose.mjs.map +1 -1
  198. package/dist/lib/components/Popover/PopoverContent.mjs +1 -1
  199. package/dist/lib/components/Popover/PopoverContent.mjs.map +1 -1
  200. package/dist/lib/components/Popover/PopoverRoot.mjs +1 -1
  201. package/dist/lib/components/Popover/PopoverRoot.mjs.map +1 -1
  202. package/dist/lib/components/Popover/PopoverTrigger.mjs +1 -1
  203. package/dist/lib/components/Popover/PopoverTrigger.mjs.map +1 -1
  204. package/dist/lib/components/Popover/index.d.ts +1 -2
  205. package/dist/lib/components/Progress/index.mjs +1 -1
  206. package/dist/lib/components/Progress/index.mjs.map +1 -1
  207. package/dist/lib/components/RadarChart/index.mjs +1 -1
  208. package/dist/lib/components/RadarChart/index.mjs.map +1 -1
  209. package/dist/lib/components/Radio/index.mjs +1 -1
  210. package/dist/lib/components/Radio/index.mjs.map +1 -1
  211. package/dist/lib/components/RadioCards/RadioCardsItem.mjs +1 -1
  212. package/dist/lib/components/RadioCards/RadioCardsItem.mjs.map +1 -1
  213. package/dist/lib/components/RadioCards/RadioCardsRoot.mjs +1 -1
  214. package/dist/lib/components/RadioCards/RadioCardsRoot.mjs.map +1 -1
  215. package/dist/lib/components/RadioCards/index.d.ts +0 -1
  216. package/dist/lib/components/RadioGroup/RadioGroupItem.mjs +1 -1
  217. package/dist/lib/components/RadioGroup/RadioGroupItem.mjs.map +1 -1
  218. package/dist/lib/components/RadioGroup/RadioGroupRoot.mjs +1 -1
  219. package/dist/lib/components/RadioGroup/RadioGroupRoot.mjs.map +1 -1
  220. package/dist/lib/components/RadioGroup/index.d.ts +0 -1
  221. package/dist/lib/components/ScrollArea/index.mjs +1 -1
  222. package/dist/lib/components/ScrollArea/index.mjs.map +1 -1
  223. package/dist/lib/components/SegmentedControl/SegmentedControlItem.mjs +1 -1
  224. package/dist/lib/components/SegmentedControl/SegmentedControlItem.mjs.map +1 -1
  225. package/dist/lib/components/SegmentedControl/SegmentedControlRoot.mjs +1 -1
  226. package/dist/lib/components/SegmentedControl/SegmentedControlRoot.mjs.map +1 -1
  227. package/dist/lib/components/SegmentedControl/index.d.ts +1 -2
  228. package/dist/lib/components/Select/index.mjs +1 -1
  229. package/dist/lib/components/Select/index.mjs.map +1 -1
  230. package/dist/lib/components/Separator/index.mjs +1 -1
  231. package/dist/lib/components/Separator/index.mjs.map +1 -1
  232. package/dist/lib/components/Skeleton/index.mjs +1 -1
  233. package/dist/lib/components/Skeleton/index.mjs.map +1 -1
  234. package/dist/lib/components/Slider/index.mjs +1 -1
  235. package/dist/lib/components/Slider/index.mjs.map +1 -1
  236. package/dist/lib/components/Spinner/index.mjs +1 -1
  237. package/dist/lib/components/Spinner/index.mjs.map +1 -1
  238. package/dist/lib/components/TabNav/index.mjs +1 -1
  239. package/dist/lib/components/TabNav/index.mjs.map +1 -1
  240. package/dist/lib/components/Table/index.mjs +1 -1
  241. package/dist/lib/components/Table/index.mjs.map +1 -1
  242. package/dist/lib/components/Tabs/index.mjs +1 -1
  243. package/dist/lib/components/Tabs/index.mjs.map +1 -1
  244. package/dist/lib/components/TextArea/index.mjs +1 -1
  245. package/dist/lib/components/TextArea/index.mjs.map +1 -1
  246. package/dist/lib/components/TextField/index.mjs +1 -1
  247. package/dist/lib/components/TextField/index.mjs.map +1 -1
  248. package/dist/lib/components/Toast/ToastActionButton.mjs +1 -1
  249. package/dist/lib/components/Toast/ToastActionButton.mjs.map +1 -1
  250. package/dist/lib/components/Toast/ToastDescription.mjs +1 -1
  251. package/dist/lib/components/Toast/ToastDescription.mjs.map +1 -1
  252. package/dist/lib/components/Toast/ToastRoot.mjs +1 -1
  253. package/dist/lib/components/Toast/ToastRoot.mjs.map +1 -1
  254. package/dist/lib/components/Toast/ToastTitle.mjs +1 -1
  255. package/dist/lib/components/Toast/ToastTitle.mjs.map +1 -1
  256. package/dist/lib/components/Toast/index.d.ts +0 -1
  257. package/dist/lib/components/Toggle/ToggleWithText.mjs +1 -1
  258. package/dist/lib/components/Toggle/ToggleWithText.mjs.map +1 -1
  259. package/dist/lib/components/Toggle/index.mjs +1 -1
  260. package/dist/lib/components/Toggle/index.mjs.map +1 -1
  261. package/dist/lib/components/ToggleGroup/ToggleGroupItem.mjs +1 -1
  262. package/dist/lib/components/ToggleGroup/ToggleGroupItem.mjs.map +1 -1
  263. package/dist/lib/components/ToggleGroup/ToggleGroupRoot.mjs +1 -1
  264. package/dist/lib/components/ToggleGroup/ToggleGroupRoot.mjs.map +1 -1
  265. package/dist/lib/components/ToggleGroup/index.d.ts +0 -1
  266. package/dist/lib/components/ToggleSwitch/index.mjs +1 -1
  267. package/dist/lib/components/ToggleSwitch/index.mjs.map +1 -1
  268. package/dist/lib/components/Tooltip/index.mjs +1 -1
  269. package/dist/lib/components/Tooltip/index.mjs.map +1 -1
  270. package/dist/lib/constants.d.ts +2 -2
  271. package/dist/node_modules/@radix-ui/react-accordion/dist/index.mjs +1 -1
  272. package/dist/node_modules/@radix-ui/react-accordion/dist/index.mjs.map +1 -1
  273. package/dist/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs +1 -1
  274. package/dist/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs.map +1 -1
  275. package/dist/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-context/dist/index.mjs +2 -0
  276. package/dist/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-context/dist/index.mjs.map +1 -0
  277. package/dist/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-dialog/dist/index.mjs +2 -0
  278. package/dist/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-dialog/dist/index.mjs.map +1 -0
  279. package/dist/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs +2 -0
  280. package/dist/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs.map +1 -0
  281. package/dist/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-focus-guards/dist/index.mjs +2 -0
  282. package/dist/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-focus-guards/dist/index.mjs.map +1 -0
  283. package/dist/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-portal/dist/index.mjs +2 -0
  284. package/dist/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-portal/dist/index.mjs.map +1 -0
  285. package/dist/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-presence/dist/index.mjs +2 -0
  286. package/dist/node_modules/@radix-ui/react-alert-dialog/node_modules/@radix-ui/react-presence/dist/index.mjs.map +1 -0
  287. package/dist/node_modules/@radix-ui/react-arrow/dist/index.mjs +1 -1
  288. package/dist/node_modules/@radix-ui/react-arrow/dist/index.mjs.map +1 -1
  289. package/dist/node_modules/@radix-ui/react-aspect-ratio/dist/index.mjs +1 -1
  290. package/dist/node_modules/@radix-ui/react-aspect-ratio/dist/index.mjs.map +1 -1
  291. package/dist/node_modules/@radix-ui/react-avatar/dist/index.mjs +1 -1
  292. package/dist/node_modules/@radix-ui/react-avatar/dist/index.mjs.map +1 -1
  293. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.mjs +2 -0
  294. package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.mjs.map +1 -0
  295. package/dist/node_modules/@radix-ui/react-checkbox/dist/index.mjs +1 -1
  296. package/dist/node_modules/@radix-ui/react-checkbox/dist/index.mjs.map +1 -1
  297. package/dist/node_modules/@radix-ui/react-collapsible/dist/index.mjs +1 -1
  298. package/dist/node_modules/@radix-ui/react-collapsible/dist/index.mjs.map +1 -1
  299. package/dist/node_modules/@radix-ui/react-collection/dist/index.mjs +1 -1
  300. package/dist/node_modules/@radix-ui/react-collection/dist/index.mjs.map +1 -1
  301. package/dist/node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-context/dist/index.mjs +2 -0
  302. package/dist/node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-context/dist/index.mjs.map +1 -0
  303. package/dist/node_modules/@radix-ui/react-context/dist/index.mjs +1 -1
  304. package/dist/node_modules/@radix-ui/react-context/dist/index.mjs.map +1 -1
  305. package/dist/node_modules/@radix-ui/react-context-menu/dist/index.mjs +1 -1
  306. package/dist/node_modules/@radix-ui/react-context-menu/dist/index.mjs.map +1 -1
  307. package/dist/node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/react-context/dist/index.mjs +2 -0
  308. package/dist/node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/react-context/dist/index.mjs.map +1 -0
  309. package/dist/node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs +2 -0
  310. package/dist/node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs.map +1 -0
  311. package/dist/node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/react-focus-guards/dist/index.mjs +2 -0
  312. package/dist/node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/react-focus-guards/dist/index.mjs.map +1 -0
  313. package/dist/node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/react-menu/dist/index.mjs +2 -0
  314. package/dist/node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/react-menu/dist/index.mjs.map +1 -0
  315. package/dist/node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/react-portal/dist/index.mjs +2 -0
  316. package/dist/node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/react-portal/dist/index.mjs.map +1 -0
  317. package/dist/node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/react-presence/dist/index.mjs +2 -0
  318. package/dist/node_modules/@radix-ui/react-context-menu/node_modules/@radix-ui/react-presence/dist/index.mjs.map +1 -0
  319. package/dist/node_modules/@radix-ui/react-direction/dist/index.mjs +1 -1
  320. package/dist/node_modules/@radix-ui/react-direction/dist/index.mjs.map +1 -1
  321. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs +1 -1
  322. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs.map +1 -1
  323. package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs +1 -1
  324. package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs.map +1 -1
  325. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.mjs +1 -1
  326. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.mjs.map +1 -1
  327. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.mjs +1 -1
  328. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.mjs.map +1 -1
  329. package/dist/node_modules/@radix-ui/react-label/dist/index.mjs +1 -1
  330. package/dist/node_modules/@radix-ui/react-label/dist/index.mjs.map +1 -1
  331. package/dist/node_modules/@radix-ui/react-menu/dist/index.mjs +1 -1
  332. package/dist/node_modules/@radix-ui/react-menu/dist/index.mjs.map +1 -1
  333. package/dist/node_modules/@radix-ui/react-menubar/dist/index.mjs +1 -1
  334. package/dist/node_modules/@radix-ui/react-menubar/dist/index.mjs.map +1 -1
  335. package/dist/node_modules/@radix-ui/react-navigation-menu/dist/index.mjs +1 -1
  336. package/dist/node_modules/@radix-ui/react-navigation-menu/dist/index.mjs.map +1 -1
  337. package/dist/node_modules/@radix-ui/react-popper/dist/index.mjs +1 -1
  338. package/dist/node_modules/@radix-ui/react-popper/dist/index.mjs.map +1 -1
  339. package/dist/node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-context/dist/index.mjs +2 -0
  340. package/dist/node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-context/dist/index.mjs.map +1 -0
  341. package/dist/node_modules/@radix-ui/react-portal/dist/index.mjs +1 -1
  342. package/dist/node_modules/@radix-ui/react-portal/dist/index.mjs.map +1 -1
  343. package/dist/node_modules/@radix-ui/react-presence/dist/index.mjs +1 -1
  344. package/dist/node_modules/@radix-ui/react-presence/dist/index.mjs.map +1 -1
  345. package/dist/node_modules/@radix-ui/react-primitive/dist/index.mjs +1 -1
  346. package/dist/node_modules/@radix-ui/react-primitive/dist/index.mjs.map +1 -1
  347. package/dist/node_modules/@radix-ui/react-progress/dist/index.mjs +1 -1
  348. package/dist/node_modules/@radix-ui/react-progress/dist/index.mjs.map +1 -1
  349. package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-context/dist/index.mjs +2 -0
  350. package/dist/node_modules/@radix-ui/react-progress/node_modules/@radix-ui/react-context/dist/index.mjs.map +1 -0
  351. package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.mjs +1 -1
  352. package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.mjs.map +1 -1
  353. package/dist/node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-context/dist/index.mjs +2 -0
  354. package/dist/node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-context/dist/index.mjs.map +1 -0
  355. package/dist/node_modules/@radix-ui/react-scroll-area/dist/index.mjs +1 -1
  356. package/dist/node_modules/@radix-ui/react-scroll-area/dist/index.mjs.map +1 -1
  357. package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-context/dist/index.mjs +2 -0
  358. package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-context/dist/index.mjs.map +1 -0
  359. package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-presence/dist/index.mjs +2 -0
  360. package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-presence/dist/index.mjs.map +1 -0
  361. package/dist/node_modules/@radix-ui/react-slot/dist/index.mjs +1 -1
  362. package/dist/node_modules/@radix-ui/react-slot/dist/index.mjs.map +1 -1
  363. package/dist/node_modules/@radix-ui/react-toast/dist/index.mjs +1 -1
  364. package/dist/node_modules/@radix-ui/react-toast/dist/index.mjs.map +1 -1
  365. package/dist/node_modules/@radix-ui/react-toggle/dist/index.mjs +1 -1
  366. package/dist/node_modules/@radix-ui/react-toggle/dist/index.mjs.map +1 -1
  367. package/dist/node_modules/@radix-ui/react-toggle-group/dist/index.mjs +1 -1
  368. package/dist/node_modules/@radix-ui/react-toggle-group/dist/index.mjs.map +1 -1
  369. package/dist/node_modules/@radix-ui/react-toggle-group/node_modules/@radix-ui/react-context/dist/index.mjs +2 -0
  370. package/dist/node_modules/@radix-ui/react-toggle-group/node_modules/@radix-ui/react-context/dist/index.mjs.map +1 -0
  371. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.mjs +1 -1
  372. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.mjs.map +1 -1
  373. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs +1 -1
  374. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs.map +1 -1
  375. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs +1 -1
  376. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs.map +1 -1
  377. package/dist/node_modules/@radix-ui/themes/dist/esm/components/checkbox-group.mjs +1 -1
  378. package/dist/node_modules/@radix-ui/themes/dist/esm/components/checkbox-group.mjs.map +1 -1
  379. package/dist/node_modules/@radix-ui/themes/dist/esm/components/checkbox-group.primitive.mjs +1 -1
  380. package/dist/node_modules/@radix-ui/themes/dist/esm/components/checkbox-group.primitive.mjs.map +1 -1
  381. package/dist/node_modules/@radix-ui/themes/dist/esm/components/dialog.mjs +1 -1
  382. package/dist/node_modules/@radix-ui/themes/dist/esm/components/dialog.mjs.map +1 -1
  383. package/dist/node_modules/@radix-ui/themes/dist/esm/components/grid.props.mjs +1 -1
  384. package/dist/node_modules/@radix-ui/themes/dist/esm/components/grid.props.mjs.map +1 -1
  385. package/dist/node_modules/@radix-ui/themes/dist/esm/components/hover-card.mjs +1 -1
  386. package/dist/node_modules/@radix-ui/themes/dist/esm/components/hover-card.mjs.map +1 -1
  387. package/dist/node_modules/@radix-ui/themes/dist/esm/components/icons.mjs +1 -1
  388. package/dist/node_modules/@radix-ui/themes/dist/esm/components/icons.mjs.map +1 -1
  389. package/dist/node_modules/@radix-ui/themes/dist/esm/components/popover.mjs +1 -1
  390. package/dist/node_modules/@radix-ui/themes/dist/esm/components/popover.mjs.map +1 -1
  391. package/dist/node_modules/@radix-ui/themes/dist/esm/components/radio-cards.mjs +1 -1
  392. package/dist/node_modules/@radix-ui/themes/dist/esm/components/radio-cards.mjs.map +1 -1
  393. package/dist/node_modules/@radix-ui/themes/dist/esm/components/radio-group.mjs +1 -1
  394. package/dist/node_modules/@radix-ui/themes/dist/esm/components/radio-group.mjs.map +1 -1
  395. package/dist/node_modules/@radix-ui/themes/dist/esm/components/select.mjs +1 -1
  396. package/dist/node_modules/@radix-ui/themes/dist/esm/components/select.mjs.map +1 -1
  397. package/dist/node_modules/@radix-ui/themes/dist/esm/components/slider.mjs +1 -1
  398. package/dist/node_modules/@radix-ui/themes/dist/esm/components/slider.mjs.map +1 -1
  399. package/dist/node_modules/@radix-ui/themes/dist/esm/components/switch.mjs +1 -1
  400. package/dist/node_modules/@radix-ui/themes/dist/esm/components/switch.mjs.map +1 -1
  401. package/dist/node_modules/@radix-ui/themes/dist/esm/components/tab-nav.mjs +1 -1
  402. package/dist/node_modules/@radix-ui/themes/dist/esm/components/tab-nav.mjs.map +1 -1
  403. package/dist/node_modules/@radix-ui/themes/dist/esm/components/tabs.mjs +1 -1
  404. package/dist/node_modules/@radix-ui/themes/dist/esm/components/tabs.mjs.map +1 -1
  405. package/dist/node_modules/@radix-ui/themes/dist/esm/components/theme.mjs +1 -1
  406. package/dist/node_modules/@radix-ui/themes/dist/esm/components/theme.mjs.map +1 -1
  407. package/dist/node_modules/@radix-ui/themes/dist/esm/helpers/get-responsive-styles.mjs +1 -1
  408. package/dist/node_modules/@radix-ui/themes/dist/esm/helpers/get-responsive-styles.mjs.map +1 -1
  409. package/dist/node_modules/@radix-ui/themes/dist/esm/props/layout.props.mjs +1 -1
  410. package/dist/node_modules/@radix-ui/themes/dist/esm/props/layout.props.mjs.map +1 -1
  411. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-checkbox/dist/index.mjs +2 -0
  412. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-checkbox/dist/index.mjs.map +1 -0
  413. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-context/dist/index.mjs +2 -0
  414. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-context/dist/index.mjs.map +1 -0
  415. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-dialog/dist/index.mjs +2 -0
  416. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-dialog/dist/index.mjs.map +1 -0
  417. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs +2 -0
  418. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs.map +1 -0
  419. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-focus-guards/dist/index.mjs +2 -0
  420. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-focus-guards/dist/index.mjs.map +1 -0
  421. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-hover-card/dist/index.mjs +2 -0
  422. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-hover-card/dist/index.mjs.map +1 -0
  423. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-navigation-menu/dist/index.mjs +2 -0
  424. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-navigation-menu/dist/index.mjs.map +1 -0
  425. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-popover/dist/index.mjs +1 -1
  426. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-popover/dist/index.mjs.map +1 -1
  427. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-portal/dist/index.mjs +2 -0
  428. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-portal/dist/index.mjs.map +1 -0
  429. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-presence/dist/index.mjs +2 -0
  430. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-presence/dist/index.mjs.map +1 -0
  431. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-radio-group/dist/index.mjs +2 -0
  432. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-radio-group/dist/index.mjs.map +1 -0
  433. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-select/dist/index.mjs +2 -0
  434. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-select/dist/index.mjs.map +1 -0
  435. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-slider/dist/index.mjs +2 -0
  436. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-slider/dist/index.mjs.map +1 -0
  437. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-switch/dist/index.mjs +2 -0
  438. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-switch/dist/index.mjs.map +1 -0
  439. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-tabs/dist/index.mjs +2 -0
  440. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-tabs/dist/index.mjs.map +1 -0
  441. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-tooltip/dist/index.mjs +2 -0
  442. package/dist/node_modules/@radix-ui/themes/node_modules/@radix-ui/react-tooltip/dist/index.mjs.map +1 -0
  443. package/dist/node_modules/chart.js/dist/chart.mjs +3 -3
  444. package/dist/node_modules/chart.js/dist/chart.mjs.map +1 -1
  445. package/dist/node_modules/chart.js/dist/chunks/helpers.segment.mjs +3 -3
  446. package/dist/node_modules/chart.js/dist/chunks/helpers.segment.mjs.map +1 -1
  447. package/dist/tsconfig.tsbuildinfo +1 -1
  448. package/package.json +7 -1
  449. package/dist/_virtual/jsx-runtime.mjs +0 -2
  450. package/dist/_virtual/jsx-runtime.mjs.map +0 -1
  451. package/dist/_virtual/jsx-runtime2.mjs +0 -2
  452. package/dist/_virtual/jsx-runtime2.mjs.map +0 -1
  453. package/dist/_virtual/react-jsx-runtime.development.mjs +0 -2
  454. package/dist/_virtual/react-jsx-runtime.development.mjs.map +0 -1
  455. package/dist/_virtual/react-jsx-runtime.production.min.mjs +0 -2
  456. package/dist/_virtual/react-jsx-runtime.production.min.mjs.map +0 -1
  457. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +0 -2
  458. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.map +0 -1
  459. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +0 -2
  460. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.map +0 -1
  461. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs +0 -2
  462. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs.map +0 -1
  463. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +0 -2
  464. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs.map +0 -1
  465. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs +0 -2
  466. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.map +0 -1
  467. package/dist/node_modules/@kurkle/color/dist/color.esm.mjs +0 -8
  468. package/dist/node_modules/@kurkle/color/dist/color.esm.mjs.map +0 -1
  469. package/dist/node_modules/@radix-ui/react-dialog/dist/index.mjs +0 -2
  470. package/dist/node_modules/@radix-ui/react-dialog/dist/index.mjs.map +0 -1
  471. package/dist/node_modules/@radix-ui/react-hover-card/dist/index.mjs +0 -2
  472. package/dist/node_modules/@radix-ui/react-hover-card/dist/index.mjs.map +0 -1
  473. package/dist/node_modules/@radix-ui/react-radio-group/dist/index.mjs +0 -2
  474. package/dist/node_modules/@radix-ui/react-radio-group/dist/index.mjs.map +0 -1
  475. package/dist/node_modules/@radix-ui/react-select/dist/index.mjs +0 -2
  476. package/dist/node_modules/@radix-ui/react-select/dist/index.mjs.map +0 -1
  477. package/dist/node_modules/@radix-ui/react-slider/dist/index.mjs +0 -2
  478. package/dist/node_modules/@radix-ui/react-slider/dist/index.mjs.map +0 -1
  479. package/dist/node_modules/@radix-ui/react-switch/dist/index.mjs +0 -2
  480. package/dist/node_modules/@radix-ui/react-switch/dist/index.mjs.map +0 -1
  481. package/dist/node_modules/@radix-ui/react-tabs/dist/index.mjs +0 -2
  482. package/dist/node_modules/@radix-ui/react-tabs/dist/index.mjs.map +0 -1
  483. package/dist/node_modules/chart.js/auto/auto.mjs +0 -2
  484. package/dist/node_modules/chart.js/auto/auto.mjs.map +0 -1
  485. package/dist/node_modules/react/cjs/react-jsx-runtime.development.mjs +0 -11
  486. package/dist/node_modules/react/cjs/react-jsx-runtime.development.mjs.map +0 -1
  487. package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.mjs +0 -11
  488. package/dist/node_modules/react/cjs/react-jsx-runtime.production.min.mjs.map +0 -1
  489. package/dist/node_modules/react/jsx-runtime.mjs +0 -2
  490. package/dist/node_modules/react/jsx-runtime.mjs.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../node_modules/@radix-ui/react-dialog/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/dialog/src/Dialog.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContext, createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { hideOthers } from \"aria-hidden\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar DIALOG_NAME = \"Dialog\";\nvar [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\nvar [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);\nvar Dialog = (props) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const triggerRef = React.useRef(null);\n const contentRef = React.useRef(null);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /* @__PURE__ */ jsx(\n DialogProvider,\n {\n scope: __scopeDialog,\n triggerRef,\n contentRef,\n contentId: useId(),\n titleId: useId(),\n descriptionId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children\n }\n );\n};\nDialog.displayName = DIALOG_NAME;\nvar TRIGGER_NAME = \"DialogTrigger\";\nvar DialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n }\n);\nDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DialogPortal\";\nvar [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar DialogPortal = (props) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children: child }) })) });\n};\nDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"DialogOverlay\";\nvar DialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;\n }\n);\nDialogOverlay.displayName = OVERLAY_NAME;\nvar DialogOverlayImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(context.open),\n ...overlayProps,\n ref: forwardedRef,\n style: { pointerEvents: \"auto\", ...overlayProps.style }\n }\n ) })\n );\n }\n);\nvar CONTENT_NAME = \"DialogContent\";\nvar DialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nDialogContent.displayName = CONTENT_NAME;\nvar DialogContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.preventDefault();\n }),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault()\n )\n }\n );\n }\n);\nvar DialogContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar DialogContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n useFocusGuards();\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n role: \"dialog\",\n id: context.contentId,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n ...contentProps,\n ref: composedRefs,\n onDismiss: () => context.onOpenChange(false)\n }\n )\n }\n ),\n /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })\n ] })\n ] });\n }\n);\nvar TITLE_NAME = \"DialogTitle\";\nvar DialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });\n }\n);\nDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"DialogDescription\";\nvar DialogDescription = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });\n }\n);\nDialogDescription.displayName = DESCRIPTION_NAME;\nvar CLOSE_NAME = \"DialogClose\";\nvar DialogClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nDialogClose.displayName = CLOSE_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar TITLE_WARNING_NAME = \"DialogTitleWarning\";\nvar [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"dialog\"\n});\nvar TitleWarning = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n React.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n return null;\n};\nvar DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nvar DescriptionWarning = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n React.useEffect(() => {\n const describedById = contentRef.current?.getAttribute(\"aria-describedby\");\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n return null;\n};\nvar Root = Dialog;\nvar Trigger = DialogTrigger;\nvar Portal = DialogPortal;\nvar Overlay = DialogOverlay;\nvar Content = DialogContent;\nvar Title = DialogTitle;\nvar Description = DialogDescription;\nvar Close = DialogClose;\nexport {\n Close,\n Content,\n Description,\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n Overlay,\n Portal,\n Root,\n Title,\n Trigger,\n WarningProvider,\n createDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["DIALOG_NAME","createDialogContext","createDialogScope","createContextScope","DialogProvider","useDialogContext","Dialog","props","__scopeDialog","children","open","openProp","defaultOpen","onOpenChange","modal","triggerRef","React","useRef","contentRef","setOpen","useControllableState","prop","defaultProp","onChange","jsx","scope","contentId","useId","titleId","descriptionId","onOpenToggle","useCallback","prevOpen","displayName","TRIGGER_NAME","DialogTrigger","forwardRef","forwardedRef","triggerProps","context","composedTriggerRef","useComposedRefs","Primitive","button","type","getState","ref","onClick","composeEventHandlers","PORTAL_NAME","PortalProvider","usePortalContext","forceMount","DialogPortal","container","Children","map","child","Presence","present","PortalPrimitive","asChild","OVERLAY_NAME","DialogOverlay","portalContext","overlayProps","DialogOverlayImpl","RemoveScroll","as","Slot","allowPinchZoom","shards","div","style","pointerEvents","CONTENT_NAME","DialogContent","contentProps","DialogContentModal","DialogContentNonModal","composedRefs","useEffect","content","current","hideOthers","DialogContentImpl","trapFocus","disableOutsidePointerEvents","onCloseAutoFocus","event","preventDefault","focus","onPointerDownOutside","originalEvent","detail","ctrlLeftClick","ctrlKey","onFocusOutside","hasInteractedOutsideRef","hasPointerDownOutsideRef","defaultPrevented","onInteractOutside","target","targetIsTrigger","contains","onOpenAutoFocus","useFocusGuards","jsxs","Fragment","FocusScope","loop","trapped","onMountAutoFocus","onUnmountAutoFocus","DismissableLayer","role","id","onDismiss","TitleWarning","DescriptionWarning","TITLE_NAME","DialogTitle","titleProps","h2","DESCRIPTION_NAME","DialogDescription","descriptionProps","p","CLOSE_NAME","DialogClose","closeProps","TITLE_WARNING_NAME","WarningProvider","useWarningContext","createContext","contentName","titleName","docsSlug","titleWarningContext","MESSAGE","document","getElementById","console","error","describedById","getAttribute","warn","Root","Trigger","Portal","Overlay","Content","Title","Description","Close"],"mappings":"s/BAmBA,IAAIA,EAAc,UACbC,EAAqBC,GAAqBC,EAAmBH,IAC7DI,EAAgBC,GAAoBJ,EAAoBD,GACzDM,EAAUC,IACZ,MAAMC,cACJA,EAAaC,SACbA,EACAC,KAAMC,EAAQC,YACdA,EAAWC,aACXA,EAAYC,MACZA,GAAQ,GACNP,EACEQ,EAAaC,EAAMC,OAAO,MAC1BC,EAAaF,EAAMC,OAAO,OACzBP,GAAO,EAAOS,GAAWC,EAAqB,CACnDC,KAAMV,EACNW,YAAaV,EACbW,SAAUV,IAEZ,OAAuBW,EAAGA,IACxBpB,EACA,CACEqB,MAAOjB,EACPO,aACAG,aACAQ,UAAWC,IACXC,QAASD,IACTE,cAAeF,IACfjB,OACAG,aAAcM,EACdW,aAAcd,EAAMe,aAAY,IAAMZ,GAASa,IAAcA,KAAW,CAACb,IACzEL,QACAL,YAEH,EAEHH,EAAO2B,YAAcjC,EACrB,IAAIkC,EAAe,gBACfC,EAAgBnB,EAAMoB,YACxB,CAAC7B,EAAO8B,KACN,MAAM7B,cAAEA,KAAkB8B,GAAiB/B,EACrCgC,EAAUlC,EAAiB6B,EAAc1B,GACzCgC,EAAqBC,EAAgBJ,EAAcE,EAAQxB,YACjE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a,MAE3E,IAIL,SAASgC,EAASnC,GAChB,OAAOA,EAAO,OAAS,QACzB,CAHAuH,EAAYhG,YAAc+F,EAI1B,IAAIG,EAAqB,sBACpBC,EAAiBC,GAAqBC,EAAcH,EAAoB,CAC3EI,YAAa5D,EACb6D,UAAWhB,EACXiB,SAAU,WAERnB,EAAe,EAAG1F,cACpB,MAAM8G,EAAsBL,EAAkBF,GACxCQ,EAAU,KAAKD,EAAoBH,8BAA8BG,EAAoBF,wGAEjEE,EAAoBF,gJAE4BE,EAAoBD,WAO9F,OANAzH,EAAMiE,WAAU,KACd,GAAIrD,EAAS,CACMgH,SAASC,eAAejH,IAC1BkH,QAAQC,MAAMJ,EAC9B,IACA,CAACA,EAAS/G,IACN,IAAI,EAGT2F,EAAqB,EAAGrG,aAAYW,oBACtC,MACM8G,EAAU,6EADkBN,EAFL,4BAG0FE,gBAQvH,OAPAvH,EAAMiE,WAAU,KACd,MAAM+D,EAAgB9H,EAAWiE,SAAS8D,aAAa,oBACvD,GAAIpH,GAAiBmH,EAAe,CACXJ,SAASC,eAAehH,IAC1BiH,QAAQI,KAAKP,EACnC,IACA,CAACA,EAASzH,EAAYW,IAClB,IAAI,EAETsH,EAAO7I,EACP8I,EAAUjH,EACVkH,EAAShG,EACTiG,EAAUvF,EACVwF,EAAU3E,EACV4E,GAAQ/B,EACRgC,GAAc5B,EACd6B,GAAQzB"}
@@ -1,2 +0,0 @@
1
- import*as e from"react";import{composeEventHandlers as r}from"../../primitive/dist/index.mjs";import{createContextScope as t}from"../../react-context/dist/index.mjs";import{useControllableState as o}from"../../react-use-controllable-state/dist/index.mjs";import{useComposedRefs as n}from"../../react-compose-refs/dist/index.mjs";import{createPopperScope as i,Anchor as s,Content as a,Arrow as c,Root as d}from"../../react-popper/dist/index.mjs";import{Portal as u}from"../../react-portal/dist/index.mjs";import{Presence as l}from"../../react-presence/dist/index.mjs";import{Primitive as p}from"../../react-primitive/dist/index.mjs";import{DismissableLayer as f}from"../../react-dismissable-layer/dist/index.mjs";import{j as m}from"../../../../_virtual/jsx-runtime.mjs";var v,h="HoverCard",[x,C]=t(h,[i]),w=i(),[j,P]=x(h),R=r=>{const{__scopeHoverCard:t,children:n,open:i,defaultOpen:s,onOpenChange:a,openDelay:c=700,closeDelay:u=300}=r,l=w(t),p=e.useRef(0),f=e.useRef(0),v=e.useRef(!1),h=e.useRef(!1),[x=!1,C]=o({prop:i,defaultProp:s,onChange:a}),P=e.useCallback((()=>{clearTimeout(f.current),p.current=window.setTimeout((()=>C(!0)),c)}),[c,C]),R=e.useCallback((()=>{clearTimeout(p.current),v.current||h.current||(f.current=window.setTimeout((()=>C(!1)),u))}),[u,C]),y=e.useCallback((()=>C(!1)),[C]);return e.useEffect((()=>()=>{clearTimeout(p.current),clearTimeout(f.current)}),[]),m.jsx(j,{scope:t,open:x,onOpenChange:C,onOpen:P,onClose:R,onDismiss:y,hasSelectionRef:v,isPointerDownOnContentRef:h,children:m.jsx(d,{...l,children:n})})};R.displayName=h;var y="HoverCardTrigger",E=e.forwardRef(((e,t)=>{const{__scopeHoverCard:o,...n}=e,i=P(y,o),a=w(o);return m.jsx(s,{asChild:!0,...a,children:m.jsx(p.a,{"data-state":i.open?"open":"closed",...n,ref:t,onPointerEnter:r(e.onPointerEnter,N(i.onOpen)),onPointerLeave:r(e.onPointerLeave,N(i.onClose)),onFocus:r(e.onFocus,i.onOpen),onBlur:r(e.onBlur,i.onClose),onTouchStart:r(e.onTouchStart,(e=>e.preventDefault()))})})}));E.displayName=y;var O="HoverCardPortal",[S,g]=x(O,{forceMount:void 0}),b=e=>{const{__scopeHoverCard:r,forceMount:t,children:o,container:n}=e,i=P(O,r);return m.jsx(S,{scope:r,forceMount:t,children:m.jsx(l,{present:t||i.open,children:m.jsx(u,{asChild:!0,container:n,children:o})})})};b.displayName=O;var D="HoverCardContent",_=e.forwardRef(((e,t)=>{const o=g(D,e.__scopeHoverCard),{forceMount:n=o.forceMount,...i}=e,s=P(D,e.__scopeHoverCard);return m.jsx(l,{present:n||s.open,children:m.jsx(T,{"data-state":s.open?"open":"closed",...i,onPointerEnter:r(e.onPointerEnter,N(s.onOpen)),onPointerLeave:r(e.onPointerLeave,N(s.onClose)),ref:t})})}));_.displayName=D;var T=e.forwardRef(((t,o)=>{const{__scopeHoverCard:i,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:u,...l}=t,p=P(D,i),h=w(i),x=e.useRef(null),C=n(o,x),[j,R]=e.useState(!1);return e.useEffect((()=>{if(j){const e=document.body;return v=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=v,e.style.webkitUserSelect=v}}}),[j]),e.useEffect((()=>{if(x.current){const e=()=>{R(!1),p.isPointerDownOnContentRef.current=!1,setTimeout((()=>{""!==document.getSelection()?.toString()&&(p.hasSelectionRef.current=!0)}))};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),p.hasSelectionRef.current=!1,p.isPointerDownOnContentRef.current=!1}}}),[p.isPointerDownOnContentRef,p.hasSelectionRef]),e.useEffect((()=>{if(x.current){(function(e){const r=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;t.nextNode();)r.push(t.currentNode);return r})(x.current).forEach((e=>e.setAttribute("tabindex","-1")))}})),m.jsx(f,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:r(d,(e=>{e.preventDefault()})),onDismiss:p.onDismiss,children:m.jsx(a,{...h,...l,onPointerDown:r(l.onPointerDown,(e=>{e.currentTarget.contains(e.target)&&R(!0),p.hasSelectionRef.current=!1,p.isPointerDownOnContentRef.current=!0})),ref:C,style:{...l.style,userSelect:j?"text":void 0,WebkitUserSelect:j?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})})),H=e.forwardRef(((e,r)=>{const{__scopeHoverCard:t,...o}=e,n=w(t);return m.jsx(c,{...n,...o,ref:r})}));function N(e){return r=>"touch"===r.pointerType?void 0:e()}H.displayName="HoverCardArrow";var F=R,L=E,k=b,I=_;export{I as Content,R as HoverCard,H as HoverCardArrow,_ as HoverCardContent,b as HoverCardPortal,E as HoverCardTrigger,k as Portal,F as Root,L as Trigger,C as createHoverCardScope};
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../node_modules/@radix-ui/react-hover-card/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/hover-card/src/HoverCard.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { jsx } from \"react/jsx-runtime\";\nvar originalBodyUserSelect;\nvar HOVERCARD_NAME = \"HoverCard\";\nvar [createHoverCardContext, createHoverCardScope] = createContextScope(HOVERCARD_NAME, [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar [HoverCardProvider, useHoverCardContext] = createHoverCardContext(HOVERCARD_NAME);\nvar HoverCard = (props) => {\n const {\n __scopeHoverCard,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n openDelay = 700,\n closeDelay = 300\n } = props;\n const popperScope = usePopperScope(__scopeHoverCard);\n const openTimerRef = React.useRef(0);\n const closeTimerRef = React.useRef(0);\n const hasSelectionRef = React.useRef(false);\n const isPointerDownOnContentRef = React.useRef(false);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n const handleOpen = React.useCallback(() => {\n clearTimeout(closeTimerRef.current);\n openTimerRef.current = window.setTimeout(() => setOpen(true), openDelay);\n }, [openDelay, setOpen]);\n const handleClose = React.useCallback(() => {\n clearTimeout(openTimerRef.current);\n if (!hasSelectionRef.current && !isPointerDownOnContentRef.current) {\n closeTimerRef.current = window.setTimeout(() => setOpen(false), closeDelay);\n }\n }, [closeDelay, setOpen]);\n const handleDismiss = React.useCallback(() => setOpen(false), [setOpen]);\n React.useEffect(() => {\n return () => {\n clearTimeout(openTimerRef.current);\n clearTimeout(closeTimerRef.current);\n };\n }, []);\n return /* @__PURE__ */ jsx(\n HoverCardProvider,\n {\n scope: __scopeHoverCard,\n open,\n onOpenChange: setOpen,\n onOpen: handleOpen,\n onClose: handleClose,\n onDismiss: handleDismiss,\n hasSelectionRef,\n isPointerDownOnContentRef,\n children: /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children })\n }\n );\n};\nHoverCard.displayName = HOVERCARD_NAME;\nvar TRIGGER_NAME = \"HoverCardTrigger\";\nvar HoverCardTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeHoverCard, ...triggerProps } = props;\n const context = useHoverCardContext(TRIGGER_NAME, __scopeHoverCard);\n const popperScope = usePopperScope(__scopeHoverCard);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(\n Primitive.a,\n {\n \"data-state\": context.open ? \"open\" : \"closed\",\n ...triggerProps,\n ref: forwardedRef,\n onPointerEnter: composeEventHandlers(props.onPointerEnter, excludeTouch(context.onOpen)),\n onPointerLeave: composeEventHandlers(props.onPointerLeave, excludeTouch(context.onClose)),\n onFocus: composeEventHandlers(props.onFocus, context.onOpen),\n onBlur: composeEventHandlers(props.onBlur, context.onClose),\n onTouchStart: composeEventHandlers(props.onTouchStart, (event) => event.preventDefault())\n }\n ) });\n }\n);\nHoverCardTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"HoverCardPortal\";\nvar [PortalProvider, usePortalContext] = createHoverCardContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar HoverCardPortal = (props) => {\n const { __scopeHoverCard, forceMount, children, container } = props;\n const context = useHoverCardContext(PORTAL_NAME, __scopeHoverCard);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeHoverCard, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nHoverCardPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"HoverCardContent\";\nvar HoverCardContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeHoverCard);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useHoverCardContext(CONTENT_NAME, props.__scopeHoverCard);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(\n HoverCardContentImpl,\n {\n \"data-state\": context.open ? \"open\" : \"closed\",\n ...contentProps,\n onPointerEnter: composeEventHandlers(props.onPointerEnter, excludeTouch(context.onOpen)),\n onPointerLeave: composeEventHandlers(props.onPointerLeave, excludeTouch(context.onClose)),\n ref: forwardedRef\n }\n ) });\n }\n);\nHoverCardContent.displayName = CONTENT_NAME;\nvar HoverCardContentImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeHoverCard,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = useHoverCardContext(CONTENT_NAME, __scopeHoverCard);\n const popperScope = usePopperScope(__scopeHoverCard);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const [containSelection, setContainSelection] = React.useState(false);\n React.useEffect(() => {\n if (containSelection) {\n const body = document.body;\n originalBodyUserSelect = body.style.userSelect || body.style.webkitUserSelect;\n body.style.userSelect = \"none\";\n body.style.webkitUserSelect = \"none\";\n return () => {\n body.style.userSelect = originalBodyUserSelect;\n body.style.webkitUserSelect = originalBodyUserSelect;\n };\n }\n }, [containSelection]);\n React.useEffect(() => {\n if (ref.current) {\n const handlePointerUp = () => {\n setContainSelection(false);\n context.isPointerDownOnContentRef.current = false;\n setTimeout(() => {\n const hasSelection = document.getSelection()?.toString() !== \"\";\n if (hasSelection) context.hasSelectionRef.current = true;\n });\n };\n document.addEventListener(\"pointerup\", handlePointerUp);\n return () => {\n document.removeEventListener(\"pointerup\", handlePointerUp);\n context.hasSelectionRef.current = false;\n context.isPointerDownOnContentRef.current = false;\n };\n }\n }, [context.isPointerDownOnContentRef, context.hasSelectionRef]);\n React.useEffect(() => {\n if (ref.current) {\n const tabbables = getTabbableNodes(ref.current);\n tabbables.forEach((tabbable) => tabbable.setAttribute(\"tabindex\", \"-1\"));\n }\n });\n return /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents: false,\n onInteractOutside,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside: composeEventHandlers(onFocusOutside, (event) => {\n event.preventDefault();\n }),\n onDismiss: context.onDismiss,\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n ...popperScope,\n ...contentProps,\n onPointerDown: composeEventHandlers(contentProps.onPointerDown, (event) => {\n if (event.currentTarget.contains(event.target)) {\n setContainSelection(true);\n }\n context.hasSelectionRef.current = false;\n context.isPointerDownOnContentRef.current = true;\n }),\n ref: composedRefs,\n style: {\n ...contentProps.style,\n userSelect: containSelection ? \"text\" : void 0,\n // Safari requires prefix\n WebkitUserSelect: containSelection ? \"text\" : void 0,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-hover-card-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-hover-card-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-hover-card-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-hover-card-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-hover-card-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n )\n }\n );\n});\nvar ARROW_NAME = \"HoverCardArrow\";\nvar HoverCardArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeHoverCard, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopeHoverCard);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nHoverCardArrow.displayName = ARROW_NAME;\nfunction excludeTouch(eventHandler) {\n return (event) => event.pointerType === \"touch\" ? void 0 : eventHandler();\n}\nfunction getTabbableNodes(container) {\n const nodes = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node) => {\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n while (walker.nextNode()) nodes.push(walker.currentNode);\n return nodes;\n}\nvar Root2 = HoverCard;\nvar Trigger = HoverCardTrigger;\nvar Portal = HoverCardPortal;\nvar Content2 = HoverCardContent;\nvar Arrow2 = HoverCardArrow;\nexport {\n Arrow2 as Arrow,\n Content2 as Content,\n HoverCard,\n HoverCardArrow,\n HoverCardContent,\n HoverCardPortal,\n HoverCardTrigger,\n Portal,\n Root2 as Root,\n Trigger,\n createHoverCardScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["originalBodyUserSelect","HOVERCARD_NAME","createHoverCardContext","createHoverCardScope","createContextScope","createPopperScope","usePopperScope","HoverCardProvider","useHoverCardContext","HoverCard","props","__scopeHoverCard","children","open","openProp","defaultOpen","onOpenChange","openDelay","closeDelay","popperScope","openTimerRef","React","useRef","closeTimerRef","hasSelectionRef","isPointerDownOnContentRef","setOpen","useControllableState","prop","defaultProp","onChange","handleOpen","useCallback","clearTimeout","current","window","setTimeout","handleClose","handleDismiss","useEffect","jsx","scope","onOpen","onClose","onDismiss","PopperPrimitive.Root","displayName","TRIGGER_NAME","HoverCardTrigger","forwardRef","forwardedRef","triggerProps","context","PopperPrimitive.Anchor","asChild","Primitive","a","ref","onPointerEnter","composeEventHandlers","excludeTouch","onPointerLeave","onFocus","onBlur","onTouchStart","event","preventDefault","PORTAL_NAME","PortalProvider","usePortalContext","forceMount","HoverCardPortal","container","Presence","present","PortalPrimitive","CONTENT_NAME","HoverCardContent","portalContext","contentProps","HoverCardContentImpl","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","composedRefs","useComposedRefs","containSelection","setContainSelection","useState","body","document","style","userSelect","webkitUserSelect","handlePointerUp","getSelection","toString","addEventListener","removeEventListener","nodes","walker","createTreeWalker","NodeFilter","SHOW_ELEMENT","acceptNode","node","tabIndex","FILTER_ACCEPT","FILTER_SKIP","nextNode","push","currentNode","getTabbableNodes","forEach","tabbable","setAttribute","DismissableLayer","disableOutsidePointerEvents","PopperPrimitive.Content","onPointerDown","currentTarget","contains","target","WebkitUserSelect","HoverCardArrow","arrowProps","PopperPrimitive.Arrow","eventHandler","pointerType","Root2","Trigger","Portal","Content2"],"mappings":"iwBAeA,IAAIA,EACAC,EAAiB,aAChBC,EAAwBC,GAAwBC,EAAmBH,EAAgB,CACtFI,IAEEC,EAAiBD,KAChBE,EAAmBC,GAAuBN,EAAuBD,GAClEQ,EAAaC,IACf,MAAMC,iBACJA,EAAgBC,SAChBA,EACAC,KAAMC,EAAQC,YACdA,EAAWC,aACXA,EAAYC,UACZA,EAAY,IAAGC,WACfA,EAAa,KACXR,EACES,EAAcb,EAAeK,GAC7BS,EAAeC,EAAMC,OAAO,GAC5BC,EAAgBF,EAAMC,OAAO,GAC7BE,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KAEoB5E,EAAGA,IACxB6E,EACA,CACE/D,SAAS,EACTgE,6BAA6B,EAC7BlC,oBACAH,kBACAC,uBACAC,eAAgBxB,EAAqBwB,GAAiBlB,IACpDA,EAAMC,gBAAgB,IAExBtB,UAAWQ,EAAQR,UACnBhC,SAA0B4B,EAAGA,IAC3B+E,EACA,IACKpG,KACA4D,EACHyC,cAAe7D,EAAqBoB,EAAayC,eAAgBvD,IAC3DA,EAAMwD,cAAcC,SAASzD,EAAM0D,SACrCnC,GAAoB,GAEtBpC,EAAQ5B,gBAAgBU,SAAU,EAClCkB,EAAQ3B,0BAA0BS,SAAU,CAAI,IAElDuB,IAAK4B,EACLO,MAAO,IACFb,EAAaa,MAChBC,WAAYN,EAAmB,YAAS,EAExCqC,iBAAkBrC,EAAmB,YAAS,EAG5C,8CAA+C,uCAC/C,6CAA8C,sCAC9C,8CAA+C,uCAC/C,mCAAoC,mCACpC,oCAAqC,wCAMhD,IAGCsC,EAAiBxG,EAAM4B,YACzB,CAACvC,EAAOwC,KACN,MAAMvC,iBAAEA,KAAqBmH,GAAepH,EACtCS,EAAcb,EAAeK,GACnC,OAAuB6B,EAAGA,IAACuF,EAAuB,IAAK5G,KAAgB2G,EAAYrE,IAAKP,GAAe,IAI3G,SAASU,EAAaoE,GACpB,OAAQ/D,GAAgC,UAAtBA,EAAMgE,iBAA0B,EAASD,GAC7D,CAHAH,EAAe/E,YARE,iBAsBd,IAACoF,EAAQzH,EACR0H,EAAUnF,EACVoF,EAAS7D,EACT8D,EAAWxD"}
@@ -1,2 +0,0 @@
1
- import*as e from"react";import{composeEventHandlers as r}from"../../primitive/dist/index.mjs";import{useComposedRefs as o}from"../../react-compose-refs/dist/index.mjs";import{createContextScope as t}from"../../react-context/dist/index.mjs";import{Primitive as a}from"../../react-primitive/dist/index.mjs";import{createRovingFocusGroupScope as i,Root as d,Item as n}from"../../react-roving-focus/dist/index.mjs";import{useControllableState as s}from"../../react-use-controllable-state/dist/index.mjs";import{useDirection as c}from"../../react-direction/dist/index.mjs";import{useSize as u}from"../../react-use-size/dist/index.mjs";import{usePrevious as l}from"../../react-use-previous/dist/index.mjs";import{Presence as p}from"../../react-presence/dist/index.mjs";import{j as m}from"../../../../_virtual/jsx-runtime.mjs";var f="Radio",[v,b]=t(f),[h,j]=v(f),x=e.forwardRef(((t,i)=>{const{__scopeRadio:d,name:n,checked:s=!1,required:c,disabled:u,value:l="on",onCheck:p,...f}=t,[v,b]=e.useState(null),j=o(i,(e=>b(e))),x=e.useRef(!1),k=!v||Boolean(v.closest("form"));return m.jsxs(h,{scope:d,checked:s,disabled:u,children:[m.jsx(a.button,{type:"button",role:"radio","aria-checked":s,"data-state":w(s),"data-disabled":u?"":void 0,disabled:u,value:l,...f,ref:j,onClick:r(t.onClick,(e=>{s||p?.(),k&&(x.current=e.isPropagationStopped(),x.current||e.stopPropagation())}))}),k&&m.jsx(y,{control:v,bubbles:!x.current,name:n,value:l,checked:s,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,d=j(k,o);return m.jsx(p,{present:t||d.checked,children:m.jsx(a.span,{"data-state":w(d.checked),"data-disabled":d.disabled?"":void 0,...i,ref:r})})}));R.displayName=k;var y=r=>{const{control:o,checked:t,bubbles:a=!0,...i}=r,d=e.useRef(null),n=l(t),s=u(o);return e.useEffect((()=>{const e=d.current,r=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(r,"checked").set;if(n!==t&&o){const r=new Event("click",{bubbles:a});o.call(e,t),e.dispatchEvent(r)}}),[n,t,a]),m.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:t,...i,tabIndex:-1,ref:d,style:{...r.style,...s,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,b]),q=i(),G=b(),[I,L]=E(C),N=e.forwardRef(((e,r)=>{const{__scopeRadioGroup:o,name:t,defaultValue:i,value:n,required:u=!1,disabled:l=!1,orientation:p,dir:f,loop:v=!0,onValueChange:b,...h}=e,j=q(o),x=c(f),[k,R]=s({prop:n,defaultProp:i,onChange:b});return m.jsx(I,{scope:o,name:t,required:u,disabled:l,value:k,onValueChange:R,children:m.jsx(d,{asChild:!0,...j,orientation:p,dir:x,loop:v,children:m.jsx(a.div,{role:"radiogroup","aria-required":u,"aria-orientation":p,"data-disabled":l?"":void 0,dir:x,...h,ref:r})})})}));N.displayName=C;var A="RadioGroupItem",D=e.forwardRef(((t,a)=>{const{__scopeRadioGroup:i,disabled:d,...s}=t,c=L(A,i),u=c.disabled||d,l=q(i),p=G(i),f=e.useRef(null),v=o(a,f),b=c.value===s.value,h=e.useRef(!1);return e.useEffect((()=>{const e=e=>{g.includes(e.key)&&(h.current=!0)},r=()=>h.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",r),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",r)}}),[]),m.jsx(n,{asChild:!0,...l,focusable:!u,active:b,children:m.jsx(x,{disabled:u,required:c.required,checked:b,...p,...s,name:c.name,ref:v,onCheck:()=>c.onValueChange(s.value),onKeyDown:r((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:r(s.onFocus,(()=>{h.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.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","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":"ozBAuBA,IAAIA,EAAa,SACZC,EAAoBC,GAAoBC,EAAmBH,IAC3DI,EAAeC,GAAmBJ,EAAmBD,GACtDM,EAAQC,EAAMC,YAChB,CAACC,EAAOC,KACN,MAAMC,aACJA,EAAYC,KACZA,E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cAAciB,EAAUtG,OAC/CqH,UAAWC,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"}
@@ -1,2 +0,0 @@
1
- import*as e from"react";import*as t from"react-dom";import{clamp as o}from"../../number/dist/index.mjs";import{composeEventHandlers as n}from"../../primitive/dist/index.mjs";import{createCollection as r}from"../../react-collection/dist/index.mjs";import{useComposedRefs as l}from"../../react-compose-refs/dist/index.mjs";import{createContextScope as i}from"../../react-context/dist/index.mjs";import{useDirection as a}from"../../react-direction/dist/index.mjs";import{DismissableLayer as s}from"../../react-dismissable-layer/dist/index.mjs";import{useFocusGuards as c}from"../../react-focus-guards/dist/index.mjs";import{FocusScope as d}from"../../react-focus-scope/dist/index.mjs";import{useId as u}from"../../react-id/dist/index.mjs";import{createPopperScope as p,Anchor as f,Content as m,Arrow as h,Root as v}from"../../react-popper/dist/index.mjs";import{Portal as g}from"../../react-portal/dist/index.mjs";import{Primitive as x}from"../../react-primitive/dist/index.mjs";import{Slot as w}from"../../react-slot/dist/index.mjs";import{useCallbackRef as y}from"../../react-use-callback-ref/dist/index.mjs";import{useControllableState as S}from"../../react-use-controllable-state/dist/index.mjs";import{useLayoutEffect as b}from"../../react-use-layout-effect/dist/index.mjs";import{usePrevious as C}from"../../react-use-previous/dist/index.mjs";import{VisuallyHidden as j}from"../../react-visually-hidden/dist/index.mjs";import{hideOthers as _}from"aria-hidden";import{RemoveScroll as P}from"react-remove-scroll";import{j as R}from"../../../../_virtual/jsx-runtime.mjs";var I=[" ","Enter","ArrowUp","ArrowDown"],T=[" ","Enter"],k="Select",[E,D,N]=r(k),[L,M]=i(k,[N,p]),O=p(),[H,A]=L(k),[B,V]=L(k),K=t=>{const{__scopeSelect:o,children:n,open:r,defaultOpen:l,onOpenChange:i,value:s,defaultValue:c,onValueChange:d,dir:p,name:f,autoComplete:m,disabled:h,required:g}=t,x=O(o),[w,y]=e.useState(null),[b,C]=e.useState(null),[j,_]=e.useState(!1),P=a(p),[I=!1,T]=S({prop:r,defaultProp:l,onChange:i}),[k,D]=S({prop:s,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:b,onValueNodeChange:C,valueNodeHasChildren:j,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,...i}=e,a=O(o),s=A(F,o),c=s.disabled||r,d=l(t,s.onTriggerChange),u=D(o),[p,m,h]=ke((e=>{const t=u().filter((e=>!e.disabled)),o=t.find((e=>e.value===s.value)),n=Ee(t,e,o);void 0!==n&&s.onValueChange(n.value)})),v=()=>{c||(s.onOpenChange(!0),h())};return R.jsx(f,{asChild:!0,...a,children:R.jsx(x.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":Ie(s.value)?"":void 0,...i,ref:d,onClick:n(i.onClick,(e=>{e.currentTarget.focus()})),onPointerDown:n(i.onPointerDown,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&(v(),s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)},e.preventDefault())})),onKeyDown:n(i.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:i,placeholder:a="",...s}=e,c=A(U,o),{onValueNodeHasChildrenChange:d}=c,u=void 0!==i,p=l(t,c.onValueNodeChange);return b((()=>{d(u)}),[d,u]),R.jsx(x.span,{...s,ref:p,style:{pointerEvents:"none"},children:Ie(c.value)?R.jsx(R.Fragment,{children:a}):i})}));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),[l,i]=e.useState();if(b((()=>{i(new DocumentFragment)}),[]),!r.open){const e=l;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:i="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:u,onPointerDownOutside:p,side:f,sideOffset:m,align:h,alignOffset:v,arrowPadding:g,collisionBoundary:x,collisionPadding:y,sticky:S,hideWhenDetached:b,avoidCollisions:C,...j}=t,I=A(Y,r),[T,k]=e.useState(null),[E,N]=e.useState(null),L=l(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"===i?te:ee,re=ne===te?{side:f,sideOffset:m,align:h,alignOffset:v,arrowPadding:g,collisionBoundary:x,collisionPadding:y,sticky:S,hideWhenDetached:b,avoidCollisions:C}:{};return R.jsx($,{scope:r,content:T,viewport:E,onViewportChange:N,itemRefCallback:J,selectedItem:M,onItemLeave:Q,itemTextRefCallback:oe,focusSelectedItem:q,selectedItemText:H,position:i,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(a,(e=>{I.trigger?.focus({preventScroll:!0}),e.preventDefault()})),children:R.jsx(s,{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(),...j,...re,onPlaced:()=>F(!0),ref:L,style:{display:"flex",flexDirection:"column",outline:"none",...j.style},onKeyDown:n(j.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:i,...a}=t,s=A(Y,r),c=J(Y,r),[d,u]=e.useState(null),[p,f]=e.useState(null),m=l(n,(e=>f(e))),h=D(r),v=e.useRef(!1),g=e.useRef(!0),{viewport:w,selectedItem:y,selectedItemText:S,focusSelectedItem:C}=c,j=e.useCallback((()=>{if(s.trigger&&s.valueNode&&d&&p&&w&&y&&S){const e=s.trigger.getBoundingClientRect(),t=p.getBoundingClientRect(),n=s.valueNode.getBoundingClientRect(),r=S.getBoundingClientRect();if("rtl"!==s.dir){const l=r.left-t.left,i=n.left-l,a=e.left-i,s=e.width+a,c=Math.max(s,t.width),u=window.innerWidth-Z,p=o(i,[Z,u-c]);d.style.minWidth=s+"px",d.style.left=p+"px"}else{const l=t.right-r.right,i=window.innerWidth-n.right-l,a=window.innerWidth-e.right-i,s=e.width+a,c=Math.max(s,t.width),u=window.innerWidth-Z,p=o(i,[Z,u-c]);d.style.minWidth=s+"px",d.style.right=p+"px"}const l=h(),a=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,b=Math.min(5*y.offsetHeight,x),C=window.getComputedStyle(w),j=parseInt(C.paddingTop,10),_=parseInt(C.paddingBottom,10),P=e.top+e.height/2-Z,R=a-P,I=y.offsetHeight/2,T=f+m+(y.offsetTop+I),k=x-T;if(T<=P){const e=y===l[l.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===l[0].ref.current;d.style.top="0px";const t=Math.max(P,f+w.offsetTop+(e?j:0)+I)+k;d.style.height=t+"px",w.scrollTop=T-P+w.offsetTop}d.style.margin=`${Z}px 0`,d.style.minHeight=b+"px",d.style.maxHeight=a+"px",i?.(),requestAnimationFrame((()=>v.current=!0))}}),[h,s.trigger,s.valueNode,d,p,w,y,S,s.dir,i]);b((()=>j()),[j]);const[_,P]=e.useState();b((()=>{p&&P(window.getComputedStyle(p).zIndex)}),[p]);const I=e.useCallback((e=>{e&&!0===g.current&&(j(),C?.(),g.current=!1)}),[j,C]);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,{...a,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})}));ee.displayName="SelectItemAlignedPosition";var te=e.forwardRef(((e,t)=>{const{__scopeSelect:o,align:n="start",collisionPadding:r=Z,...l}=e,i=O(o);return R.jsx(m,{...i,...l,ref:t,align:n,collisionPadding:r,style:{boxSizing:"border-box",...l.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",le=e.forwardRef(((t,o)=>{const{__scopeSelect:r,nonce:i,...a}=t,s=J(re,r),c=ne(re,r),d=l(o,s.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:i}),R.jsx(E.Slot,{scope:r,children:R.jsx(x.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:d,style:{position:"relative",flex:1,overflow:"auto",...a.style},onScroll:n(a.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),l=parseFloat(o.style.height),i=Math.max(r,l);if(i<n){const r=i+e,l=Math.min(n,r),a=r-l;o.style.height=l+"px","0px"===o.style.bottom&&(t.scrollTop=a>0?a:0,o.style.justifyContent="flex-end")}}}u.current=t.scrollTop}))})})]})}));le.displayName=re;var ie="SelectGroup",[ae,se]=L(ie),ce=e.forwardRef(((e,t)=>{const{__scopeSelect:o,...n}=e,r=u();return R.jsx(ae,{scope:o,id:r,children:R.jsx(x.div,{role:"group","aria-labelledby":r,...n,ref:t})})}));ce.displayName=ie;var de="SelectLabel",ue=e.forwardRef(((e,t)=>{const{__scopeSelect:o,...n}=e,r=se(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:i,disabled:a=!1,textValue:s,...c}=t,d=A(pe,r),p=J(pe,r),f=d.value===i,[m,h]=e.useState(s??""),[v,g]=e.useState(!1),w=l(o,(e=>p.itemRefCallback?.(e,i,a))),y=u(),S=()=>{a||(d.onValueChange(i),d.onOpenChange(!1))};if(""===i)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:i,disabled:a,textId:y,isSelected:f,onItemTextChange:e.useCallback((e=>{h((t=>t||(e?.textContent??"").trim()))}),[]),children:R.jsx(E.ItemSlot,{scope:r,value:i,disabled:a,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":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?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=>{a?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:i,style:a,...s}=o,c=A(ve,r),d=J(ve,r),u=me(ve,r),p=V(ve,r),[f,m]=e.useState(null),h=l(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 b((()=>(w(g),()=>y(g))),[w,y,g]),R.jsxs(R.Fragment,{children:[R.jsx(x.span,{id:u.textId,...s,ref:h}),u.isSelected&&c.valueNode&&!c.valueNodeHasChildren?t.createPortal(s.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),[i,a]=e.useState(!1),s=l(o,r.onScrollButtonChange);return b((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;a(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),i?R.jsx(je,{...t,ref:s,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null}));Se.displayName=ye;var be="SelectScrollDownButton",Ce=e.forwardRef(((t,o)=>{const n=J(be,t.__scopeSelect),r=ne(be,t.__scopeSelect),[i,a]=e.useState(!1),s=l(o,r.onScrollButtonChange);return b((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,o=Math.ceil(t.scrollTop)<e;a(o)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),i?R.jsx(je,{...t,ref:s,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null}));Ce.displayName=be;var je=e.forwardRef(((t,o)=>{const{__scopeSelect:r,onAutoScroll:l,...i}=t,a=J("SelectScrollButton",r),s=e.useRef(null),c=D(r),d=e.useCallback((()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)}),[]);return e.useEffect((()=>()=>d()),[d]),b((()=>{const e=c().find((e=>e.ref.current===document.activeElement));e?.ref.current?.scrollIntoView({block:"nearest"})}),[c]),R.jsx(x.div,{"aria-hidden":!0,...i,ref:o,style:{flexShrink:0,...i.style},onPointerDown:n(i.onPointerDown,(()=>{null===s.current&&(s.current=window.setInterval(l,50))})),onPointerMove:n(i.onPointerMove,(()=>{a.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(l,50))})),onPointerLeave:n(i.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),l=A(Pe,o),i=J(Pe,o);return l.open&&"popper"===i.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,i=e.useRef(null),a=l(o,i),s=C(n);return e.useEffect((()=>{const e=i.current,t=window.HTMLSelectElement.prototype,o=Object.getOwnPropertyDescriptor(t,"value").set;if(s!==n&&o){const t=new Event("change",{bubbles:!0});o.call(e,n),e.dispatchEvent(t)}}),[s,n]),R.jsx(j,{asChild:!0,children:R.jsx("select",{...r,ref:a,defaultValue:n})})}));function ke(t){const o=y(t),n=e.useRef(""),r=e.useRef(0),l=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]),i=e.useCallback((()=>{n.current="",window.clearTimeout(r.current)}),[]);return e.useEffect((()=>()=>window.clearTimeout(r.current)),[]),[n,l,i]}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 l=(i=e,a=Math.max(r,0),i.map(((e,t)=>i[(a+t)%i.length])));var i,a;1===n.length&&(l=l.filter((e=>e!==o)));const s=l.find((e=>e.textValue.toLowerCase().startsWith(n.toLowerCase())));return s!==o?s:void 0}Te.displayName="BubbleSelect";var De=K,Ne=W,Le=q,Me=z,Oe=X,He=G,Ae=le,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,Ce as SelectScrollDownButton,Se as SelectScrollUpButton,_e as SelectSeparator,W as SelectTrigger,q as SelectValue,le as SelectViewport,Ue as Separator,Ne as Trigger,Le as Value,Ae as Viewport,M as createSelectScope};
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../node_modules/@radix-ui/react-select/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/select/src/Select.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { clamp } from \"@radix-ui/number\";\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 { useDirection } from \"@radix-ui/react-direction\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { usePrevious } from \"@radix-ui/react-use-previous\";\nimport { VisuallyHidden } from \"@radix-ui/react-visually-hidden\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar OPEN_KEYS = [\" \", \"Enter\", \"ArrowUp\", \"ArrowDown\"];\nvar SELECTION_KEYS = [\" \", \"Enter\"];\nvar SELECT_NAME = \"Select\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(SELECT_NAME);\nvar [createSelectContext, createSelectScope] = createContextScope(SELECT_NAME, [\n createCollectionScope,\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar [SelectProvider, useSelectContext] = createSelectContext(SELECT_NAME);\nvar [SelectNativeOptionsProvider, useSelectNativeOptionsContext] = createSelectContext(SELECT_NAME);\nvar Select = (props) => {\n const {\n __scopeSelect,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n value: valueProp,\n defaultValue,\n onValueChange,\n dir,\n name,\n autoComplete,\n disabled,\n required\n } = props;\n const popperScope = usePopperScope(__scopeSelect);\n const [trigger, setTrigger] = React.useState(null);\n const [valueNode, setValueNode] = React.useState(null);\n const [valueNodeHasChildren, setValueNodeHasChildren] = React.useState(false);\n const direction = useDirection(dir);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n const [value, setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValue,\n onChange: onValueChange\n });\n const triggerPointerDownPosRef = React.useRef(null);\n const isFormControl = trigger ? Boolean(trigger.closest(\"form\")) : true;\n const [nativeOptionsSet, setNativeOptionsSet] = React.useState(/* @__PURE__ */ new Set());\n const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(\";\");\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsxs(\n SelectProvider,\n {\n required,\n scope: __scopeSelect,\n trigger,\n onTriggerChange: setTrigger,\n valueNode,\n onValueNodeChange: setValueNode,\n valueNodeHasChildren,\n onValueNodeHasChildrenChange: setValueNodeHasChildren,\n contentId: useId(),\n value,\n onValueChange: setValue,\n open,\n onOpenChange: setOpen,\n dir: direction,\n triggerPointerDownPosRef,\n disabled,\n children: [\n /* @__PURE__ */ jsx(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ jsx(\n SelectNativeOptionsProvider,\n {\n scope: props.__scopeSelect,\n onNativeOptionAdd: React.useCallback((option) => {\n setNativeOptionsSet((prev) => new Set(prev).add(option));\n }, []),\n onNativeOptionRemove: React.useCallback((option) => {\n setNativeOptionsSet((prev) => {\n const optionsSet = new Set(prev);\n optionsSet.delete(option);\n return optionsSet;\n });\n }, []),\n children\n }\n ) }),\n isFormControl ? /* @__PURE__ */ jsxs(\n BubbleSelect,\n {\n \"aria-hidden\": true,\n required,\n tabIndex: -1,\n name,\n autoComplete,\n value,\n onChange: (event) => setValue(event.target.value),\n disabled,\n children: [\n value === void 0 ? /* @__PURE__ */ jsx(\"option\", { value: \"\" }) : null,\n Array.from(nativeOptionsSet)\n ]\n },\n nativeSelectKey\n ) : null\n ]\n }\n ) });\n};\nSelect.displayName = SELECT_NAME;\nvar TRIGGER_NAME = \"SelectTrigger\";\nvar SelectTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeSelect, disabled = false, ...triggerProps } = props;\n const popperScope = usePopperScope(__scopeSelect);\n const context = useSelectContext(TRIGGER_NAME, __scopeSelect);\n const isDisabled = context.disabled || disabled;\n const composedRefs = useComposedRefs(forwardedRef, context.onTriggerChange);\n const getItems = useCollection(__scopeSelect);\n const [searchRef, handleTypeaheadSearch, resetTypeahead] = useTypeaheadSearch((search) => {\n const enabledItems = getItems().filter((item) => !item.disabled);\n const currentItem = enabledItems.find((item) => item.value === context.value);\n const nextItem = findNextItem(enabledItems, search, currentItem);\n if (nextItem !== void 0) {\n context.onValueChange(nextItem.value);\n }\n });\n const handleOpen = () => {\n if (!isDisabled) {\n context.onOpenChange(true);\n resetTypeahead();\n }\n };\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n role: \"combobox\",\n \"aria-controls\": context.contentId,\n \"aria-expanded\": context.open,\n \"aria-required\": context.required,\n \"aria-autocomplete\": \"none\",\n dir: context.dir,\n \"data-state\": context.open ? \"open\" : \"closed\",\n disabled: isDisabled,\n \"data-disabled\": isDisabled ? \"\" : void 0,\n \"data-placeholder\": shouldShowPlaceholder(context.value) ? \"\" : void 0,\n ...triggerProps,\n ref: composedRefs,\n onClick: composeEventHandlers(triggerProps.onClick, (event) => {\n event.currentTarget.focus();\n }),\n onPointerDown: composeEventHandlers(triggerProps.onPointerDown, (event) => {\n const target = event.target;\n if (target.hasPointerCapture(event.pointerId)) {\n target.releasePointerCapture(event.pointerId);\n }\n if (event.button === 0 && event.ctrlKey === false) {\n handleOpen();\n context.triggerPointerDownPosRef.current = {\n x: Math.round(event.pageX),\n y: Math.round(event.pageY)\n };\n event.preventDefault();\n }\n }),\n onKeyDown: composeEventHandlers(triggerProps.onKeyDown, (event) => {\n const isTypingAhead = searchRef.current !== \"\";\n const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n if (!isModifierKey && event.key.length === 1) handleTypeaheadSearch(event.key);\n if (isTypingAhead && event.key === \" \") return;\n if (OPEN_KEYS.includes(event.key)) {\n handleOpen();\n event.preventDefault();\n }\n })\n }\n ) });\n }\n);\nSelectTrigger.displayName = TRIGGER_NAME;\nvar VALUE_NAME = \"SelectValue\";\nvar SelectValue = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeSelect, className, style, children, placeholder = \"\", ...valueProps } = props;\n const context = useSelectContext(VALUE_NAME, __scopeSelect);\n const { onValueNodeHasChildrenChange } = context;\n const hasChildren = children !== void 0;\n const composedRefs = useComposedRefs(forwardedRef, context.onValueNodeChange);\n useLayoutEffect(() => {\n onValueNodeHasChildrenChange(hasChildren);\n }, [onValueNodeHasChildrenChange, hasChildren]);\n return /* @__PURE__ */ jsx(\n Primitive.span,\n {\n ...valueProps,\n ref: composedRefs,\n style: { pointerEvents: \"none\" },\n children: shouldShowPlaceholder(context.value) ? /* @__PURE__ */ jsx(Fragment, { children: placeholder }) : children\n }\n );\n }\n);\nSelectValue.displayName = VALUE_NAME;\nvar ICON_NAME = \"SelectIcon\";\nvar SelectIcon = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeSelect, children, ...iconProps } = props;\n return /* @__PURE__ */ jsx(Primitive.span, { \"aria-hidden\": true, ...iconProps, ref: forwardedRef, children: children || \"\\u25BC\" });\n }\n);\nSelectIcon.displayName = ICON_NAME;\nvar PORTAL_NAME = \"SelectPortal\";\nvar SelectPortal = (props) => {\n return /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, ...props });\n};\nSelectPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"SelectContent\";\nvar SelectContent = React.forwardRef(\n (props, forwardedRef) => {\n const context = useSelectContext(CONTENT_NAME, props.__scopeSelect);\n const [fragment, setFragment] = React.useState();\n useLayoutEffect(() => {\n setFragment(new DocumentFragment());\n }, []);\n if (!context.open) {\n const frag = fragment;\n return frag ? ReactDOM.createPortal(\n /* @__PURE__ */ jsx(SelectContentProvider, { scope: props.__scopeSelect, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeSelect, children: /* @__PURE__ */ jsx(\"div\", { children: props.children }) }) }),\n frag\n ) : null;\n }\n return /* @__PURE__ */ jsx(SelectContentImpl, { ...props, ref: forwardedRef });\n }\n);\nSelectContent.displayName = CONTENT_NAME;\nvar CONTENT_MARGIN = 10;\nvar [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME);\nvar CONTENT_IMPL_NAME = \"SelectContentImpl\";\nvar SelectContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeSelect,\n position = \"item-aligned\",\n onCloseAutoFocus,\n onEscapeKeyDown,\n onPointerDownOutside,\n //\n // PopperContent props\n side,\n sideOffset,\n align,\n alignOffset,\n arrowPadding,\n collisionBoundary,\n collisionPadding,\n sticky,\n hideWhenDetached,\n avoidCollisions,\n //\n ...contentProps\n } = props;\n const context = useSelectContext(CONTENT_NAME, __scopeSelect);\n const [content, setContent] = React.useState(null);\n const [viewport, setViewport] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));\n const [selectedItem, setSelectedItem] = React.useState(null);\n const [selectedItemText, setSelectedItemText] = React.useState(\n null\n );\n const getItems = useCollection(__scopeSelect);\n const [isPositioned, setIsPositioned] = React.useState(false);\n const firstValidItemFoundRef = React.useRef(false);\n React.useEffect(() => {\n if (content) return hideOthers(content);\n }, [content]);\n useFocusGuards();\n const focusFirst = React.useCallback(\n (candidates) => {\n const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);\n const [lastItem] = restItems.slice(-1);\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate?.scrollIntoView({ block: \"nearest\" });\n if (candidate === firstItem && viewport) viewport.scrollTop = 0;\n if (candidate === lastItem && viewport) viewport.scrollTop = viewport.scrollHeight;\n candidate?.focus();\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n },\n [getItems, viewport]\n );\n const focusSelectedItem = React.useCallback(\n () => focusFirst([selectedItem, content]),\n [focusFirst, selectedItem, content]\n );\n React.useEffect(() => {\n if (isPositioned) {\n focusSelectedItem();\n }\n }, [isPositioned, focusSelectedItem]);\n const { onOpenChange, triggerPointerDownPosRef } = context;\n React.useEffect(() => {\n if (content) {\n let pointerMoveDelta = { x: 0, y: 0 };\n const handlePointerMove = (event) => {\n pointerMoveDelta = {\n x: Math.abs(Math.round(event.pageX) - (triggerPointerDownPosRef.current?.x ?? 0)),\n y: Math.abs(Math.round(event.pageY) - (triggerPointerDownPosRef.current?.y ?? 0))\n };\n };\n const handlePointerUp = (event) => {\n if (pointerMoveDelta.x <= 10 && pointerMoveDelta.y <= 10) {\n event.preventDefault();\n } else {\n if (!content.contains(event.target)) {\n onOpenChange(false);\n }\n }\n document.removeEventListener(\"pointermove\", handlePointerMove);\n triggerPointerDownPosRef.current = null;\n };\n if (triggerPointerDownPosRef.current !== null) {\n document.addEventListener(\"pointermove\", handlePointerMove);\n document.addEventListener(\"pointerup\", handlePointerUp, { capture: true, once: true });\n }\n return () => {\n document.removeEventListener(\"pointermove\", handlePointerMove);\n document.removeEventListener(\"pointerup\", handlePointerUp, { capture: true });\n };\n }\n }, [content, onOpenChange, triggerPointerDownPosRef]);\n React.useEffect(() => {\n const close = () => onOpenChange(false);\n window.addEventListener(\"blur\", close);\n window.addEventListener(\"resize\", close);\n return () => {\n window.removeEventListener(\"blur\", close);\n window.removeEventListener(\"resize\", close);\n };\n }, [onOpenChange]);\n const [searchRef, handleTypeaheadSearch] = useTypeaheadSearch((search) => {\n const enabledItems = getItems().filter((item) => !item.disabled);\n const currentItem = enabledItems.find((item) => item.ref.current === document.activeElement);\n const nextItem = findNextItem(enabledItems, search, currentItem);\n if (nextItem) {\n setTimeout(() => nextItem.ref.current.focus());\n }\n });\n const itemRefCallback = React.useCallback(\n (node, value, disabled) => {\n const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;\n const isSelectedItem = context.value !== void 0 && context.value === value;\n if (isSelectedItem || isFirstValidItem) {\n setSelectedItem(node);\n if (isFirstValidItem) firstValidItemFoundRef.current = true;\n }\n },\n [context.value]\n );\n const handleItemLeave = React.useCallback(() => content?.focus(), [content]);\n const itemTextRefCallback = React.useCallback(\n (node, value, disabled) => {\n const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;\n const isSelectedItem = context.value !== void 0 && context.value === value;\n if (isSelectedItem || isFirstValidItem) {\n setSelectedItemText(node);\n }\n },\n [context.value]\n );\n const SelectPosition = position === \"popper\" ? SelectPopperPosition : SelectItemAlignedPosition;\n const popperContentProps = SelectPosition === SelectPopperPosition ? {\n side,\n sideOffset,\n align,\n alignOffset,\n arrowPadding,\n collisionBoundary,\n collisionPadding,\n sticky,\n hideWhenDetached,\n avoidCollisions\n } : {};\n return /* @__PURE__ */ jsx(\n SelectContentProvider,\n {\n scope: __scopeSelect,\n content,\n viewport,\n onViewportChange: setViewport,\n itemRefCallback,\n selectedItem,\n onItemLeave: handleItemLeave,\n itemTextRefCallback,\n focusSelectedItem,\n selectedItemText,\n position,\n isPositioned,\n searchRef,\n children: /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n trapped: context.open,\n onMountAutoFocus: (event) => {\n event.preventDefault();\n },\n onUnmountAutoFocus: composeEventHandlers(onCloseAutoFocus, (event) => {\n context.trigger?.focus({ preventScroll: true });\n event.preventDefault();\n }),\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents: true,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside: (event) => event.preventDefault(),\n onDismiss: () => context.onOpenChange(false),\n children: /* @__PURE__ */ jsx(\n SelectPosition,\n {\n role: \"listbox\",\n id: context.contentId,\n \"data-state\": context.open ? \"open\" : \"closed\",\n dir: context.dir,\n onContextMenu: (event) => event.preventDefault(),\n ...contentProps,\n ...popperContentProps,\n onPlaced: () => setIsPositioned(true),\n ref: composedRefs,\n style: {\n // flex layout so we can place the scroll buttons properly\n display: \"flex\",\n flexDirection: \"column\",\n // reset the outline by default as the content MAY get focused\n outline: \"none\",\n ...contentProps.style\n },\n onKeyDown: composeEventHandlers(contentProps.onKeyDown, (event) => {\n const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n if (event.key === \"Tab\") event.preventDefault();\n if (!isModifierKey && event.key.length === 1) handleTypeaheadSearch(event.key);\n if ([\"ArrowUp\", \"ArrowDown\", \"Home\", \"End\"].includes(event.key)) {\n const items = getItems().filter((item) => !item.disabled);\n let candidateNodes = items.map((item) => item.ref.current);\n if ([\"ArrowUp\", \"End\"].includes(event.key)) {\n candidateNodes = candidateNodes.slice().reverse();\n }\n if ([\"ArrowUp\", \"ArrowDown\"].includes(event.key)) {\n const currentElement = event.target;\n const currentIndex = candidateNodes.indexOf(currentElement);\n candidateNodes = candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n event.preventDefault();\n }\n })\n }\n )\n }\n )\n }\n ) })\n }\n );\n }\n);\nSelectContentImpl.displayName = CONTENT_IMPL_NAME;\nvar ITEM_ALIGNED_POSITION_NAME = \"SelectItemAlignedPosition\";\nvar SelectItemAlignedPosition = React.forwardRef((props, forwardedRef) => {\n const { __scopeSelect, onPlaced, ...popperProps } = props;\n const context = useSelectContext(CONTENT_NAME, __scopeSelect);\n const contentContext = useSelectContentContext(CONTENT_NAME, __scopeSelect);\n const [contentWrapper, setContentWrapper] = React.useState(null);\n const [content, setContent] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));\n const getItems = useCollection(__scopeSelect);\n const shouldExpandOnScrollRef = React.useRef(false);\n const shouldRepositionRef = React.useRef(true);\n const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;\n const position = React.useCallback(() => {\n if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {\n const triggerRect = context.trigger.getBoundingClientRect();\n const contentRect = content.getBoundingClientRect();\n const valueNodeRect = context.valueNode.getBoundingClientRect();\n const itemTextRect = selectedItemText.getBoundingClientRect();\n if (context.dir !== \"rtl\") {\n const itemTextOffset = itemTextRect.left - contentRect.left;\n const left = valueNodeRect.left - itemTextOffset;\n const leftDelta = triggerRect.left - left;\n const minContentWidth = triggerRect.width + leftDelta;\n const contentWidth = Math.max(minContentWidth, contentRect.width);\n const rightEdge = window.innerWidth - CONTENT_MARGIN;\n const clampedLeft = clamp(left, [CONTENT_MARGIN, rightEdge - contentWidth]);\n contentWrapper.style.minWidth = minContentWidth + \"px\";\n contentWrapper.style.left = clampedLeft + \"px\";\n } else {\n const itemTextOffset = contentRect.right - itemTextRect.right;\n const right = window.innerWidth - valueNodeRect.right - itemTextOffset;\n const rightDelta = window.innerWidth - triggerRect.right - right;\n const minContentWidth = triggerRect.width + rightDelta;\n const contentWidth = Math.max(minContentWidth, contentRect.width);\n const leftEdge = window.innerWidth - CONTENT_MARGIN;\n const clampedRight = clamp(right, [CONTENT_MARGIN, leftEdge - contentWidth]);\n contentWrapper.style.minWidth = minContentWidth + \"px\";\n contentWrapper.style.right = clampedRight + \"px\";\n }\n const items = getItems();\n const availableHeight = window.innerHeight - CONTENT_MARGIN * 2;\n const itemsHeight = viewport.scrollHeight;\n const contentStyles = window.getComputedStyle(content);\n const contentBorderTopWidth = parseInt(contentStyles.borderTopWidth, 10);\n const contentPaddingTop = parseInt(contentStyles.paddingTop, 10);\n const contentBorderBottomWidth = parseInt(contentStyles.borderBottomWidth, 10);\n const contentPaddingBottom = parseInt(contentStyles.paddingBottom, 10);\n const fullContentHeight = contentBorderTopWidth + contentPaddingTop + itemsHeight + contentPaddingBottom + contentBorderBottomWidth;\n const minContentHeight = Math.min(selectedItem.offsetHeight * 5, fullContentHeight);\n const viewportStyles = window.getComputedStyle(viewport);\n const viewportPaddingTop = parseInt(viewportStyles.paddingTop, 10);\n const viewportPaddingBottom = parseInt(viewportStyles.paddingBottom, 10);\n const topEdgeToTriggerMiddle = triggerRect.top + triggerRect.height / 2 - CONTENT_MARGIN;\n const triggerMiddleToBottomEdge = availableHeight - topEdgeToTriggerMiddle;\n const selectedItemHalfHeight = selectedItem.offsetHeight / 2;\n const itemOffsetMiddle = selectedItem.offsetTop + selectedItemHalfHeight;\n const contentTopToItemMiddle = contentBorderTopWidth + contentPaddingTop + itemOffsetMiddle;\n const itemMiddleToContentBottom = fullContentHeight - contentTopToItemMiddle;\n const willAlignWithoutTopOverflow = contentTopToItemMiddle <= topEdgeToTriggerMiddle;\n if (willAlignWithoutTopOverflow) {\n const isLastItem = selectedItem === items[items.length - 1].ref.current;\n contentWrapper.style.bottom = \"0px\";\n const viewportOffsetBottom = content.clientHeight - viewport.offsetTop - viewport.offsetHeight;\n const clampedTriggerMiddleToBottomEdge = Math.max(\n triggerMiddleToBottomEdge,\n selectedItemHalfHeight + // viewport might have padding bottom, include it to avoid a scrollable viewport\n (isLastItem ? viewportPaddingBottom : 0) + viewportOffsetBottom + contentBorderBottomWidth\n );\n const height = contentTopToItemMiddle + clampedTriggerMiddleToBottomEdge;\n contentWrapper.style.height = height + \"px\";\n } else {\n const isFirstItem = selectedItem === items[0].ref.current;\n contentWrapper.style.top = \"0px\";\n const clampedTopEdgeToTriggerMiddle = Math.max(\n topEdgeToTriggerMiddle,\n contentBorderTopWidth + viewport.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport\n (isFirstItem ? viewportPaddingTop : 0) + selectedItemHalfHeight\n );\n const height = clampedTopEdgeToTriggerMiddle + itemMiddleToContentBottom;\n contentWrapper.style.height = height + \"px\";\n viewport.scrollTop = contentTopToItemMiddle - topEdgeToTriggerMiddle + viewport.offsetTop;\n }\n contentWrapper.style.margin = `${CONTENT_MARGIN}px 0`;\n contentWrapper.style.minHeight = minContentHeight + \"px\";\n contentWrapper.style.maxHeight = availableHeight + \"px\";\n onPlaced?.();\n requestAnimationFrame(() => shouldExpandOnScrollRef.current = true);\n }\n }, [\n getItems,\n context.trigger,\n context.valueNode,\n contentWrapper,\n content,\n viewport,\n selectedItem,\n selectedItemText,\n context.dir,\n onPlaced\n ]);\n useLayoutEffect(() => position(), [position]);\n const [contentZIndex, setContentZIndex] = React.useState();\n useLayoutEffect(() => {\n if (content) setContentZIndex(window.getComputedStyle(content).zIndex);\n }, [content]);\n const handleScrollButtonChange = React.useCallback(\n (node) => {\n if (node && shouldRepositionRef.current === true) {\n position();\n focusSelectedItem?.();\n shouldRepositionRef.current = false;\n }\n },\n [position, focusSelectedItem]\n );\n return /* @__PURE__ */ jsx(\n SelectViewportProvider,\n {\n scope: __scopeSelect,\n contentWrapper,\n shouldExpandOnScrollRef,\n onScrollButtonChange: handleScrollButtonChange,\n children: /* @__PURE__ */ jsx(\n \"div\",\n {\n ref: setContentWrapper,\n style: {\n display: \"flex\",\n flexDirection: \"column\",\n position: \"fixed\",\n zIndex: contentZIndex\n },\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...popperProps,\n ref: composedRefs,\n style: {\n // When we get the height of the content, it includes borders. If we were to set\n // the height without having `boxSizing: 'border-box'` it would be too big.\n boxSizing: \"border-box\",\n // We need to ensure the content doesn't get taller than the wrapper\n maxHeight: \"100%\",\n ...popperProps.style\n }\n }\n )\n }\n )\n }\n );\n});\nSelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;\nvar POPPER_POSITION_NAME = \"SelectPopperPosition\";\nvar SelectPopperPosition = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeSelect,\n align = \"start\",\n collisionPadding = CONTENT_MARGIN,\n ...popperProps\n } = props;\n const popperScope = usePopperScope(__scopeSelect);\n return /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n ...popperScope,\n ...popperProps,\n ref: forwardedRef,\n align,\n collisionPadding,\n style: {\n // Ensure border-box for floating-ui calculations\n boxSizing: \"border-box\",\n ...popperProps.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-select-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-select-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-select-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-select-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-select-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n );\n});\nSelectPopperPosition.displayName = POPPER_POSITION_NAME;\nvar [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME, {});\nvar VIEWPORT_NAME = \"SelectViewport\";\nvar SelectViewport = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeSelect, nonce, ...viewportProps } = props;\n const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);\n const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);\n const composedRefs = useComposedRefs(forwardedRef, contentContext.onViewportChange);\n const prevScrollTopRef = React.useRef(0);\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n \"style\",\n {\n dangerouslySetInnerHTML: {\n __html: `[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`\n },\n nonce\n }\n ),\n /* @__PURE__ */ jsx(Collection.Slot, { scope: __scopeSelect, children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-radix-select-viewport\": \"\",\n role: \"presentation\",\n ...viewportProps,\n ref: composedRefs,\n style: {\n // we use position: 'relative' here on the `viewport` so that when we call\n // `selectedItem.offsetTop` in calculations, the offset is relative to the viewport\n // (independent of the scrollUpButton).\n position: \"relative\",\n flex: 1,\n overflow: \"auto\",\n ...viewportProps.style\n },\n onScroll: composeEventHandlers(viewportProps.onScroll, (event) => {\n const viewport = event.currentTarget;\n const { contentWrapper, shouldExpandOnScrollRef } = viewportContext;\n if (shouldExpandOnScrollRef?.current && contentWrapper) {\n const scrolledBy = Math.abs(prevScrollTopRef.current - viewport.scrollTop);\n if (scrolledBy > 0) {\n const availableHeight = window.innerHeight - CONTENT_MARGIN * 2;\n const cssMinHeight = parseFloat(contentWrapper.style.minHeight);\n const cssHeight = parseFloat(contentWrapper.style.height);\n const prevHeight = Math.max(cssMinHeight, cssHeight);\n if (prevHeight < availableHeight) {\n const nextHeight = prevHeight + scrolledBy;\n const clampedNextHeight = Math.min(availableHeight, nextHeight);\n const heightDiff = nextHeight - clampedNextHeight;\n contentWrapper.style.height = clampedNextHeight + \"px\";\n if (contentWrapper.style.bottom === \"0px\") {\n viewport.scrollTop = heightDiff > 0 ? heightDiff : 0;\n contentWrapper.style.justifyContent = \"flex-end\";\n }\n }\n }\n }\n prevScrollTopRef.current = viewport.scrollTop;\n })\n }\n ) })\n ] });\n }\n);\nSelectViewport.displayName = VIEWPORT_NAME;\nvar GROUP_NAME = \"SelectGroup\";\nvar [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME);\nvar SelectGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeSelect, ...groupProps } = props;\n const groupId = useId();\n return /* @__PURE__ */ jsx(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx(Primitive.div, { role: \"group\", \"aria-labelledby\": groupId, ...groupProps, ref: forwardedRef }) });\n }\n);\nSelectGroup.displayName = GROUP_NAME;\nvar LABEL_NAME = \"SelectLabel\";\nvar SelectLabel = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeSelect, ...labelProps } = props;\n const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);\n return /* @__PURE__ */ jsx(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });\n }\n);\nSelectLabel.displayName = LABEL_NAME;\nvar ITEM_NAME = \"SelectItem\";\nvar [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME);\nvar SelectItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeSelect,\n value,\n disabled = false,\n textValue: textValueProp,\n ...itemProps\n } = props;\n const context = useSelectContext(ITEM_NAME, __scopeSelect);\n const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect);\n const isSelected = context.value === value;\n const [textValue, setTextValue] = React.useState(textValueProp ?? \"\");\n const [isFocused, setIsFocused] = React.useState(false);\n const composedRefs = useComposedRefs(\n forwardedRef,\n (node) => contentContext.itemRefCallback?.(node, value, disabled)\n );\n const textId = useId();\n const handleSelect = () => {\n if (!disabled) {\n context.onValueChange(value);\n context.onOpenChange(false);\n }\n };\n if (value === \"\") {\n throw new Error(\n \"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.\"\n );\n }\n return /* @__PURE__ */ jsx(\n SelectItemContextProvider,\n {\n scope: __scopeSelect,\n value,\n disabled,\n textId,\n isSelected,\n onItemTextChange: React.useCallback((node) => {\n setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? \"\").trim());\n }, []),\n children: /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeSelect,\n value,\n disabled,\n textValue,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n role: \"option\",\n \"aria-labelledby\": textId,\n \"data-highlighted\": isFocused ? \"\" : void 0,\n \"aria-selected\": isSelected && isFocused,\n \"data-state\": isSelected ? \"checked\" : \"unchecked\",\n \"aria-disabled\": disabled || void 0,\n \"data-disabled\": disabled ? \"\" : void 0,\n tabIndex: disabled ? void 0 : -1,\n ...itemProps,\n ref: composedRefs,\n onFocus: composeEventHandlers(itemProps.onFocus, () => setIsFocused(true)),\n onBlur: composeEventHandlers(itemProps.onBlur, () => setIsFocused(false)),\n onPointerUp: composeEventHandlers(itemProps.onPointerUp, handleSelect),\n onPointerMove: composeEventHandlers(itemProps.onPointerMove, (event) => {\n if (disabled) {\n contentContext.onItemLeave?.();\n } else {\n event.currentTarget.focus({ preventScroll: true });\n }\n }),\n onPointerLeave: composeEventHandlers(itemProps.onPointerLeave, (event) => {\n if (event.currentTarget === document.activeElement) {\n contentContext.onItemLeave?.();\n }\n }),\n onKeyDown: composeEventHandlers(itemProps.onKeyDown, (event) => {\n const isTypingAhead = contentContext.searchRef?.current !== \"\";\n if (isTypingAhead && event.key === \" \") return;\n if (SELECTION_KEYS.includes(event.key)) handleSelect();\n if (event.key === \" \") event.preventDefault();\n })\n }\n )\n }\n )\n }\n );\n }\n);\nSelectItem.displayName = ITEM_NAME;\nvar ITEM_TEXT_NAME = \"SelectItemText\";\nvar SelectItemText = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeSelect, className, style, ...itemTextProps } = props;\n const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);\n const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);\n const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);\n const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);\n const [itemTextNode, setItemTextNode] = React.useState(null);\n const composedRefs = useComposedRefs(\n forwardedRef,\n (node) => setItemTextNode(node),\n itemContext.onItemTextChange,\n (node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled)\n );\n const textContent = itemTextNode?.textContent;\n const nativeOption = React.useMemo(\n () => /* @__PURE__ */ jsx(\"option\", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value),\n [itemContext.disabled, itemContext.value, textContent]\n );\n const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;\n useLayoutEffect(() => {\n onNativeOptionAdd(nativeOption);\n return () => onNativeOptionRemove(nativeOption);\n }, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),\n itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? ReactDOM.createPortal(itemTextProps.children, context.valueNode) : null\n ] });\n }\n);\nSelectItemText.displayName = ITEM_TEXT_NAME;\nvar ITEM_INDICATOR_NAME = \"SelectItemIndicator\";\nvar SelectItemIndicator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeSelect, ...itemIndicatorProps } = props;\n const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);\n return itemContext.isSelected ? /* @__PURE__ */ jsx(Primitive.span, { \"aria-hidden\": true, ...itemIndicatorProps, ref: forwardedRef }) : null;\n }\n);\nSelectItemIndicator.displayName = ITEM_INDICATOR_NAME;\nvar SCROLL_UP_BUTTON_NAME = \"SelectScrollUpButton\";\nvar SelectScrollUpButton = React.forwardRef((props, forwardedRef) => {\n const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);\n const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);\n const [canScrollUp, setCanScrollUp] = React.useState(false);\n const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);\n useLayoutEffect(() => {\n if (contentContext.viewport && contentContext.isPositioned) {\n let handleScroll2 = function() {\n const canScrollUp2 = viewport.scrollTop > 0;\n setCanScrollUp(canScrollUp2);\n };\n var handleScroll = handleScroll2;\n const viewport = contentContext.viewport;\n handleScroll2();\n viewport.addEventListener(\"scroll\", handleScroll2);\n return () => viewport.removeEventListener(\"scroll\", handleScroll2);\n }\n }, [contentContext.viewport, contentContext.isPositioned]);\n return canScrollUp ? /* @__PURE__ */ jsx(\n SelectScrollButtonImpl,\n {\n ...props,\n ref: composedRefs,\n onAutoScroll: () => {\n const { viewport, selectedItem } = contentContext;\n if (viewport && selectedItem) {\n viewport.scrollTop = viewport.scrollTop - selectedItem.offsetHeight;\n }\n }\n }\n ) : null;\n});\nSelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;\nvar SCROLL_DOWN_BUTTON_NAME = \"SelectScrollDownButton\";\nvar SelectScrollDownButton = React.forwardRef((props, forwardedRef) => {\n const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);\n const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);\n const [canScrollDown, setCanScrollDown] = React.useState(false);\n const composedRefs = useComposedRefs(forwardedRef, viewportContext.onScrollButtonChange);\n useLayoutEffect(() => {\n if (contentContext.viewport && contentContext.isPositioned) {\n let handleScroll2 = function() {\n const maxScroll = viewport.scrollHeight - viewport.clientHeight;\n const canScrollDown2 = Math.ceil(viewport.scrollTop) < maxScroll;\n setCanScrollDown(canScrollDown2);\n };\n var handleScroll = handleScroll2;\n const viewport = contentContext.viewport;\n handleScroll2();\n viewport.addEventListener(\"scroll\", handleScroll2);\n return () => viewport.removeEventListener(\"scroll\", handleScroll2);\n }\n }, [contentContext.viewport, contentContext.isPositioned]);\n return canScrollDown ? /* @__PURE__ */ jsx(\n SelectScrollButtonImpl,\n {\n ...props,\n ref: composedRefs,\n onAutoScroll: () => {\n const { viewport, selectedItem } = contentContext;\n if (viewport && selectedItem) {\n viewport.scrollTop = viewport.scrollTop + selectedItem.offsetHeight;\n }\n }\n }\n ) : null;\n});\nSelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;\nvar SelectScrollButtonImpl = React.forwardRef((props, forwardedRef) => {\n const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;\n const contentContext = useSelectContentContext(\"SelectScrollButton\", __scopeSelect);\n const autoScrollTimerRef = React.useRef(null);\n const getItems = useCollection(__scopeSelect);\n const clearAutoScrollTimer = React.useCallback(() => {\n if (autoScrollTimerRef.current !== null) {\n window.clearInterval(autoScrollTimerRef.current);\n autoScrollTimerRef.current = null;\n }\n }, []);\n React.useEffect(() => {\n return () => clearAutoScrollTimer();\n }, [clearAutoScrollTimer]);\n useLayoutEffect(() => {\n const activeItem = getItems().find((item) => item.ref.current === document.activeElement);\n activeItem?.ref.current?.scrollIntoView({ block: \"nearest\" });\n }, [getItems]);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"aria-hidden\": true,\n ...scrollIndicatorProps,\n ref: forwardedRef,\n style: { flexShrink: 0, ...scrollIndicatorProps.style },\n onPointerDown: composeEventHandlers(scrollIndicatorProps.onPointerDown, () => {\n if (autoScrollTimerRef.current === null) {\n autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50);\n }\n }),\n onPointerMove: composeEventHandlers(scrollIndicatorProps.onPointerMove, () => {\n contentContext.onItemLeave?.();\n if (autoScrollTimerRef.current === null) {\n autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50);\n }\n }),\n onPointerLeave: composeEventHandlers(scrollIndicatorProps.onPointerLeave, () => {\n clearAutoScrollTimer();\n })\n }\n );\n});\nvar SEPARATOR_NAME = \"SelectSeparator\";\nvar SelectSeparator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeSelect, ...separatorProps } = props;\n return /* @__PURE__ */ jsx(Primitive.div, { \"aria-hidden\": true, ...separatorProps, ref: forwardedRef });\n }\n);\nSelectSeparator.displayName = SEPARATOR_NAME;\nvar ARROW_NAME = \"SelectArrow\";\nvar SelectArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeSelect, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopeSelect);\n const context = useSelectContext(ARROW_NAME, __scopeSelect);\n const contentContext = useSelectContentContext(ARROW_NAME, __scopeSelect);\n return context.open && contentContext.position === \"popper\" ? /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef }) : null;\n }\n);\nSelectArrow.displayName = ARROW_NAME;\nfunction shouldShowPlaceholder(value) {\n return value === \"\" || value === void 0;\n}\nvar BubbleSelect = React.forwardRef(\n (props, forwardedRef) => {\n const { value, ...selectProps } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const prevValue = usePrevious(value);\n React.useEffect(() => {\n const select = ref.current;\n const selectProto = window.HTMLSelectElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(\n selectProto,\n \"value\"\n );\n const setValue = descriptor.set;\n if (prevValue !== value && setValue) {\n const event = new Event(\"change\", { bubbles: true });\n setValue.call(select, value);\n select.dispatchEvent(event);\n }\n }, [prevValue, value]);\n return /* @__PURE__ */ jsx(VisuallyHidden, { asChild: true, children: /* @__PURE__ */ jsx(\"select\", { ...selectProps, ref: composedRefs, defaultValue: value }) });\n }\n);\nBubbleSelect.displayName = \"BubbleSelect\";\nfunction useTypeaheadSearch(onSearchChange) {\n const handleSearchChange = useCallbackRef(onSearchChange);\n const searchRef = React.useRef(\"\");\n const timerRef = React.useRef(0);\n const handleTypeaheadSearch = React.useCallback(\n (key) => {\n const search = searchRef.current + key;\n handleSearchChange(search);\n (function updateSearch(value) {\n searchRef.current = value;\n window.clearTimeout(timerRef.current);\n if (value !== \"\") timerRef.current = window.setTimeout(() => updateSearch(\"\"), 1e3);\n })(search);\n },\n [handleSearchChange]\n );\n const resetTypeahead = React.useCallback(() => {\n searchRef.current = \"\";\n window.clearTimeout(timerRef.current);\n }, []);\n React.useEffect(() => {\n return () => window.clearTimeout(timerRef.current);\n }, []);\n return [searchRef, handleTypeaheadSearch, resetTypeahead];\n}\nfunction findNextItem(items, search, currentItem) {\n const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);\n const normalizedSearch = isRepeated ? search[0] : search;\n const currentItemIndex = currentItem ? items.indexOf(currentItem) : -1;\n let wrappedItems = wrapArray(items, Math.max(currentItemIndex, 0));\n const excludeCurrentItem = normalizedSearch.length === 1;\n if (excludeCurrentItem) wrappedItems = wrappedItems.filter((v) => v !== currentItem);\n const nextItem = wrappedItems.find(\n (item) => item.textValue.toLowerCase().startsWith(normalizedSearch.toLowerCase())\n );\n return nextItem !== currentItem ? nextItem : void 0;\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root2 = Select;\nvar Trigger = SelectTrigger;\nvar Value = SelectValue;\nvar Icon = SelectIcon;\nvar Portal = SelectPortal;\nvar Content2 = SelectContent;\nvar Viewport = SelectViewport;\nvar Group = SelectGroup;\nvar Label = SelectLabel;\nvar Item = SelectItem;\nvar ItemText = SelectItemText;\nvar ItemIndicator = SelectItemIndicator;\nvar ScrollUpButton = SelectScrollUpButton;\nvar ScrollDownButton = SelectScrollDownButton;\nvar Separator = SelectSeparator;\nvar Arrow2 = SelectArrow;\nexport {\n Arrow2 as Arrow,\n Content2 as Content,\n Group,\n Icon,\n Item,\n ItemIndicator,\n ItemText,\n Label,\n Portal,\n Root2 as Root,\n ScrollDownButton,\n ScrollUpButton,\n Select,\n SelectArrow,\n SelectContent,\n SelectGroup,\n SelectIcon,\n SelectItem,\n SelectItemIndicator,\n SelectItemText,\n SelectLabel,\n SelectPortal,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n SelectViewport,\n Separator,\n Trigger,\n Value,\n Viewport,\n createSelectScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["OPEN_KEYS","SELECTION_KEYS","SELECT_NAME","Collection","useCollection","createCollectionScope","createCollection","createSelectContext","createSelectScope","createContextScope","createPopperScope","usePopperScope","SelectProvider","useSelectContext","SelectNativeOptionsProvider","useSelectNativeOptionsContext","Select","props","__scopeSelect","children","open","openProp","defaultOpen","onOpenChange","value","valueProp","defaultValue","onValueChange","dir","name","autoComplete","disabled","required","popperScope","trigger","setTrigger","React","useState","valueNode","setValueNode","valueNodeHasChildren","setValueNodeHasChildren","direction","useDirection","setOpen","useControllableState","prop","defaultProp","onChange","setValue","triggerPointerDownPosRef","useRef","isFormControl","Boolean","closest","nativeOptionsSet","setNativeOptionsSet","Set","nativeSelectKey","Array","from","map","option","join","jsx","PopperPrimitive.Root","jsxs","scope","onTriggerChange","onValueNodeChange","onValueNodeHasChildrenChange","contentId","useId","Provider","onNativeOptionAdd","useCallback","prev","add","onNativeOptionRemove","optionsSet","delete","BubbleSelect","tabIndex","event","target","displayName","TRIGGER_NAME","SelectTrigger","forwardRef","forwardedRef","triggerProps","context","isDisabled","composedRefs","useComposedRefs","getItems","searchRef","handleTypeaheadSearch","resetTypeahead","useTypeaheadSearch","search","enabledItems","filter","item","currentItem","find","nextItem","findNextItem","handleOpen","PopperPrimitive.Anchor","asChild","Primitive","button","type","role","shouldShowPlaceholder","ref","onClick","composeEventHandlers","currentTarget","focus","onPointerDown","hasPointerCapture","pointerId","releasePointerCapture","ctrlKey","current","x","Math","round","pageX","y","pageY","preventDefault","onKeyDown","isTypingAhead","altKey","metaKey","key","length","includes","VALUE_NAME","SelectValue","className","style","placeholder","valueProps","hasChildren","useLayoutEffect","span","pointerEvents","Fragment","SelectIcon","iconProps","SelectPortal","PortalPrimitive","CONTENT_NAME","SelectContent","fragment","setFragment","DocumentFragment","frag","ReactDOM","createPortal","SelectContentProvider","Slot","SelectContentImpl","CONTENT_MARGIN","useSelectContentContext","position","onCloseAutoFocus","onEscapeKeyDown","onPointerDownOutside","side","sideOffset","align","alignOffset","arrowPadding","collisionBoundary","collisionPadding","sticky","hideWhenDetached","avoidCollisions","contentProps","content","setContent","viewport","setViewport","node","selectedItem","setSelectedItem","selectedItemText","setSelectedItemText","isPositioned","setIsPositioned","firstValidItemFoundRef","useEffect","hideOthers","useFocusGuards","focusFirst","candidates","firstItem","restItems","lastItem","slice","PREVIOUSLY_FOCUSED_ELEMENT","document","activeElement","candidate","scrollIntoView","block","scrollTop","scrollHeight","focusSelectedItem","pointerMoveDelta","handlePointerMove","abs","handlePointerUp","contains","removeEventListener","addEventListener","capture","once","close","window","setTimeout","itemRefCallback","isFirstValidItem","handleItemLeave","itemTextRefCallback","SelectPosition","SelectPopperPosition","SelectItemAlignedPosition","popperContentProps","onViewportChange","onItemLeave","RemoveScroll","as","allowPinchZoom","FocusScope","trapped","onMountAutoFocus","onUnmountAutoFocus","preventScroll","DismissableLayer","disableOutsidePointerEvents","onFocusOutside","onDismiss","id","onContextMenu","onPlaced","display","flexDirection","outline","isModifierKey","candidateNodes","reverse","currentElement","currentIndex","indexOf","popperProps","contentContext","contentWrapper","setContentWrapper","shouldExpandOnScrollRef","shouldRepositionRef","triggerRect","getBoundingClientRect","contentRect","valueNodeRect","itemTextRect","itemTextOffset","left","leftDelta","minContentWidth","width","contentWidth","max","rightEdge","innerWidth","clampedLeft","clamp","minWidth","right","rightDelta","leftEdge","clampedRight","items","availableHeight","innerHeight","itemsHeight","contentStyles","getComputedStyle","contentBorderTopWidth","parseInt","borderTopWidth","contentPaddingTop","paddingTop","contentBorderBottomWidth","borderBottomWidth","fullContentHeight","paddingBottom","minContentHeight","min","offsetHeight","viewportStyles","viewportPaddingTop","viewportPaddingBottom","topEdgeToTriggerMiddle","top","height","triggerMiddleToBottomEdge","selectedItemHalfHeight","contentTopToItemMiddle","offsetTop","itemMiddleToContentBottom","isLastItem","bottom","viewportOffsetBottom","clientHeight","isFirstItem","margin","minHeight","maxHeight","requestAnimationFrame","contentZIndex","setContentZIndex","zIndex","handleScrollButtonChange","SelectViewportProvider","onScrollButtonChange","div","boxSizing","PopperPrimitive.Content","useSelectViewportContext","VIEWPORT_NAME","SelectViewport","nonce","viewportProps","viewportContext","prevScrollTopRef","dangerouslySetInnerHTML","__html","flex","overflow","onScroll","scrolledBy","cssMinHeight","parseFloat","cssHeight","prevHeight","nextHeight","clampedNextHeight","heightDiff","justifyContent","GROUP_NAME","SelectGroupContextProvider","useSelectGroupContext","SelectGroup","groupProps","groupId","LABEL_NAME","SelectLabel","labelProps","groupContext","ITEM_NAME","SelectItemContextProvider","useSelectItemContext","SelectItem","textValue","textValueProp","itemProps","isSelected","setTextValue","isFocused","setIsFocused","textId","handleSelect","Error","onItemTextChange","prevTextValue","textContent","trim","ItemSlot","onFocus","onBlur","onPointerUp","onPointerMove","onPointerLeave","ITEM_TEXT_NAME","SelectItemText","itemTextProps","itemContext","nativeOptionsContext","itemTextNode","setItemTextNode","nativeOption","useMemo","ITEM_INDICATOR_NAME","SelectItemIndicator","itemIndicatorProps","SCROLL_UP_BUTTON_NAME","SelectScrollUpButton","canScrollUp","setCanScrollUp","handleScroll2","canScrollUp2","SelectScrollButtonImpl","onAutoScroll","SCROLL_DOWN_BUTTON_NAME","SelectScrollDownButton","canScrollDown","setCanScrollDown","maxScroll","canScrollDown2","ceil","scrollIndicatorProps","autoScrollTimerRef","clearAutoScrollTimer","clearInterval","activeItem","flexShrink","setInterval","SelectSeparator","separatorProps","ARROW_NAME","SelectArrow","arrowProps","PopperPrimitive.Arrow","selectProps","prevValue","usePrevious","select","selectProto","HTMLSelectElement","prototype","Object","getOwnPropertyDescriptor","set","Event","bubbles","call","dispatchEvent","VisuallyHidden","onSearchChange","handleSearchChange","useCallbackRef","timerRef","updateSearch","clearTimeout","normalizedSearch","every","char","currentItemIndex","wrappedItems","array","startIndex","_","index","v","toLowerCase","startsWith","Root2","Trigger","Value","Icon","Portal","Content2","Viewport","Group","Label","Item","ItemText","ItemIndicator","Separator"],"mappings":"miDA4BA,IAAIA,EAAY,CAAC,IAAK,QAAS,UAAW,aACtCC,EAAiB,CAAC,IAAK,SACvBC,EAAc,UACbC,EAAYC,EAAeC,GAAyBC,EAAiBJ,IACrEK,EAAqBC,GAAqBC,EAAmBP,EAAa,CAC7EG,EACAK,IAEEC,EAAiBD,KAChBE,EAAgBC,GAAoBN,EAAoBL,IACxDY,EAA6BC,GAAiCR,EAAoBL,GACnFc,EAAUC,IACZ,MAAMC,cACJA,EAAaC,SACbA,EACAC,KAAMC,EAAQC,YACdA,EAAWC,aACXA,EACAC,MAAOC,EAASC,aAChBA,EAAYC,cACZA,EAAaC,IACbA,EAAGC,KACHA,EAAIC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EAQLyK,EARYxU,KAAKqJ,IAAIgL,EAAkB,GASxDE,EAAM1Y,KAAI,CAAC4Y,EAAGC,IAAUH,GAAOC,EAAaE,GAASH,EAAM5T,WADpE,IAAmB4T,EAAOC,EAP+B,IAA5BN,EAAiBvT,SACpB2T,EAAeA,EAAahW,QAAQqW,GAAMA,IAAMnW,KACxE,MAAME,EAAW4V,EAAa7V,MAC3BF,GAASA,EAAK0Q,UAAU2F,cAAcC,WAAWX,EAAiBU,iBAErE,OAAOlW,IAAaF,EAAcE,OAAW,CAC/C,CArCAzB,GAAaI,YAAc,eAyCxB,IAACyX,GAAQ9b,EACR+b,GAAUxX,EACVyX,GAAQlU,EACRmU,GAAOzT,EACP0T,GAASxT,EACTyT,GAAWtT,EACXuT,GAAWpI,GACXqI,GAAQ/G,GACRgH,GAAQ5G,GACR6G,GAAOvG,GACPwG,GAAWlF,GACXmF,GAAgB1E,GAGhB2E,GAAYnD"}
@@ -1,2 +0,0 @@
1
- import*as e from"react";import{clamp as t}from"../../number/dist/index.mjs";import{composeEventHandlers as n}from"../../primitive/dist/index.mjs";import{useComposedRefs as r}from"../../react-compose-refs/dist/index.mjs";import{createContextScope as o}from"../../react-context/dist/index.mjs";import{useControllableState as i}from"../../react-use-controllable-state/dist/index.mjs";import{useDirection as a}from"../../react-direction/dist/index.mjs";import{usePrevious as s}from"../../react-use-previous/dist/index.mjs";import{useSize as d}from"../../react-use-size/dist/index.mjs";import{Primitive as l}from"../../react-primitive/dist/index.mjs";import{createCollection as u}from"../../react-collection/dist/index.mjs";import{j as c}from"../../../../_virtual/jsx-runtime.mjs";var m=["PageUp","PageDown"],f=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],p={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},v="Slider",[h,w,S]=u(v),[x,g]=o(v,[S]),[y,b]=x(v),j=e.forwardRef(((r,o)=>{const{name:a,min:s=0,max:d=100,step:l=1,orientation:u="horizontal",disabled:p=!1,minStepsBetweenThumbs:v=0,defaultValue:w=[s],value:S,onValueChange:x=(()=>{}),onValueCommit:g=(()=>{}),inverted:b=!1,...j}=r,D=e.useRef(new Set),E=e.useRef(0),P="horizontal"===u?R:_,[M=[],K]=i({prop:S,defaultProp:w,onChange:e=>{const t=[...D.current];t[E.current]?.focus(),x(e)}}),A=e.useRef(M);function C(e,n,{commit:r}={commit:!1}){const o=function(e){return(String(e).split(".")[1]||"").length}(l),i=function(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}(Math.round((e-s)/l)*l+s,o),a=t(i,[s,d]);K(((e=[])=>{const t=function(e=[],t,n){const r=[...e];return r[n]=t,r.sort(((e,t)=>e-t))}(e,a,n);if(function(e,t){if(t>0){const n=function(e){return e.slice(0,-1).map(((t,n)=>e[n+1]-t))}(e);return Math.min(...n)>=t}return!0}(t,v*l)){E.current=t.indexOf(a);const n=String(t)!==String(e);return n&&r&&g(t),n?t:e}return e}))}return c.jsx(y,{scope:r.__scopeSlider,name:a,disabled:p,min:s,max:d,valueIndexToChangeRef:E,thumbs:D.current,values:M,orientation:u,children:c.jsx(h.Provider,{scope:r.__scopeSlider,children:c.jsx(h.Slot,{scope:r.__scopeSlider,children:c.jsx(P,{"aria-disabled":p,"data-disabled":p?"":void 0,...j,ref:o,onPointerDown:n(j.onPointerDown,(()=>{p||(A.current=M)})),min:s,max:d,inverted:b,onSlideStart:p?void 0:function(e){const t=function(e,t){if(1===e.length)return 0;const n=e.map((e=>Math.abs(e-t))),r=Math.min(...n);return n.indexOf(r)}(M,e);C(e,t)},onSlideMove:p?void 0:function(e){C(e,E.current)},onSlideEnd:p?void 0:function(){const e=A.current[E.current];M[E.current]!==e&&g(M)},onHomeKeyDown:()=>!p&&C(s,0,{commit:!0}),onEndKeyDown:()=>!p&&C(d,M.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!p){const n=m.includes(e.key)||e.shiftKey&&f.includes(e.key)?10:1,r=E.current;C(M[r]+l*n*t,r,{commit:!0})}}})})})})}));j.displayName=v;var[D,E]=x(v,{startEdge:"left",endEdge:"right",size:"width",direction:1}),R=e.forwardRef(((t,n)=>{const{min:o,max:i,dir:s,inverted:d,onSlideStart:l,onSlideMove:u,onSlideEnd:m,onStepKeyDown:f,...v}=t,[h,w]=e.useState(null),S=r(n,(e=>w(e))),x=e.useRef(),g=a(s),y="ltr"===g,b=y&&!d||!y&&d;function j(e){const t=x.current||h.getBoundingClientRect(),n=L([0,t.width],b?[o,i]:[i,o]);return x.current=t,n(e-t.left)}return c.jsx(D,{scope:t.__scopeSlider,startEdge:b?"left":"right",endEdge:b?"right":"left",direction:b?1:-1,size:"width",children:c.jsx(P,{dir:g,"data-orientation":"horizontal",...v,ref:S,style:{...v.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{const t=j(e.clientX);l?.(t)},onSlideMove:e=>{const t=j(e.clientX);u?.(t)},onSlideEnd:()=>{x.current=void 0,m?.()},onStepKeyDown:e=>{const t=p[b?"from-left":"from-right"].includes(e.key);f?.({event:e,direction:t?-1:1})}})})})),_=e.forwardRef(((t,n)=>{const{min:o,max:i,inverted:a,onSlideStart:s,onSlideMove:d,onSlideEnd:l,onStepKeyDown:u,...m}=t,f=e.useRef(null),v=r(n,f),h=e.useRef(),w=!a;function S(e){const t=h.current||f.current.getBoundingClientRect(),n=L([0,t.height],w?[i,o]:[o,i]);return h.current=t,n(e-t.top)}return c.jsx(D,{scope:t.__scopeSlider,startEdge:w?"bottom":"top",endEdge:w?"top":"bottom",size:"height",direction:w?1:-1,children:c.jsx(P,{"data-orientation":"vertical",...m,ref:v,style:{...m.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{const t=S(e.clientY);s?.(t)},onSlideMove:e=>{const t=S(e.clientY);d?.(t)},onSlideEnd:()=>{h.current=void 0,l?.()},onStepKeyDown:e=>{const t=p[w?"from-bottom":"from-top"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})})),P=e.forwardRef(((e,t)=>{const{__scopeSlider:r,onSlideStart:o,onSlideMove:i,onSlideEnd:a,onHomeKeyDown:s,onEndKeyDown:d,onStepKeyDown:u,...p}=e,h=b(v,r);return c.jsx(l.span,{...p,ref:t,onKeyDown:n(e.onKeyDown,(e=>{"Home"===e.key?(s(e),e.preventDefault()):"End"===e.key?(d(e),e.preventDefault()):m.concat(f).includes(e.key)&&(u(e),e.preventDefault())})),onPointerDown:n(e.onPointerDown,(e=>{const t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),h.thumbs.has(t)?t.focus():o(e)})),onPointerMove:n(e.onPointerMove,(e=>{e.target.hasPointerCapture(e.pointerId)&&i(e)})),onPointerUp:n(e.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),a(e))}))})})),M="SliderTrack",K=e.forwardRef(((e,t)=>{const{__scopeSlider:n,...r}=e,o=b(M,n);return c.jsx(l.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})}));K.displayName=M;var A="SliderRange",C=e.forwardRef(((t,n)=>{const{__scopeSlider:o,...i}=t,a=b(A,o),s=E(A,o),d=e.useRef(null),u=r(n,d),m=a.values.length,f=a.values.map((e=>T(e,a.min,a.max))),p=m>1?Math.min(...f):0,v=100-Math.max(...f);return c.jsx(l.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,...i,ref:u,style:{...t.style,[s.startEdge]:p+"%",[s.endEdge]:v+"%"}})}));C.displayName=A;var I="SliderThumb",k=e.forwardRef(((t,n)=>{const o=w(t.__scopeSlider),[i,a]=e.useState(null),s=r(n,(e=>a(e))),d=e.useMemo((()=>i?o().findIndex((e=>e.ref.current===i)):-1),[o,i]);return c.jsx(z,{...t,ref:s,index:d})})),z=e.forwardRef(((t,o)=>{const{__scopeSlider:i,index:a,name:s,...u}=t,m=b(I,i),f=E(I,i),[p,v]=e.useState(null),w=r(o,(e=>v(e))),S=!p||Boolean(p.closest("form")),x=d(p),g=m.values[a],y=void 0===g?0:T(g,m.min,m.max),j=function(e,t){return t>2?`Value ${e+1} of ${t}`:2===t?["Minimum","Maximum"][e]:void 0}(a,m.values.length),D=x?.[f.size],R=D?function(e,t,n){const r=e/2,o=L([0,50],[0,r]);return(r-o(t)*n)*n}(D,y,f.direction):0;return e.useEffect((()=>{if(p)return m.thumbs.add(p),()=>{m.thumbs.delete(p)}}),[p,m.thumbs]),c.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[f.startEdge]:`calc(${y}% + ${R}px)`},children:[c.jsx(h.ItemSlot,{scope:t.__scopeSlider,children:c.jsx(l.span,{role:"slider","aria-label":t["aria-label"]||j,"aria-valuemin":m.min,"aria-valuenow":g,"aria-valuemax":m.max,"aria-orientation":m.orientation,"data-orientation":m.orientation,"data-disabled":m.disabled?"":void 0,tabIndex:m.disabled?void 0:0,...u,ref:w,style:void 0===g?{display:"none"}:t.style,onFocus:n(t.onFocus,(()=>{m.valueIndexToChangeRef.current=a}))})}),S&&c.jsx(H,{name:s??(m.name?m.name+(m.values.length>1?"[]":""):void 0),value:g},a)]})}));k.displayName=I;var H=t=>{const{value:n,...r}=t,o=e.useRef(null),i=s(n);return e.useEffect((()=>{const e=o.current,t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(i!==n&&r){const t=new Event("input",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[i,n]),c.jsx("input",{style:{display:"none"},...r,ref:o,defaultValue:n})};function T(e,n,r){return t(100/(r-n)*(e-n),[0,100])}function L(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}var U=j,V=K,B=C,N=k;export{B as Range,U as Root,j as Slider,C as SliderRange,k as SliderThumb,K as SliderTrack,N as Thumb,V as Track,g as createSliderScope};
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../node_modules/@radix-ui/react-slider/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/slider/src/Slider.tsx\nimport * as React from \"react\";\nimport { clamp } from \"@radix-ui/number\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { usePrevious } from \"@radix-ui/react-use-previous\";\nimport { useSize } from \"@radix-ui/react-use-size\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar PAGE_KEYS = [\"PageUp\", \"PageDown\"];\nvar ARROW_KEYS = [\"ArrowUp\", \"ArrowDown\", \"ArrowLeft\", \"ArrowRight\"];\nvar BACK_KEYS = {\n \"from-left\": [\"Home\", \"PageDown\", \"ArrowDown\", \"ArrowLeft\"],\n \"from-right\": [\"Home\", \"PageDown\", \"ArrowDown\", \"ArrowRight\"],\n \"from-bottom\": [\"Home\", \"PageDown\", \"ArrowDown\", \"ArrowLeft\"],\n \"from-top\": [\"Home\", \"PageDown\", \"ArrowUp\", \"ArrowLeft\"]\n};\nvar SLIDER_NAME = \"Slider\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(SLIDER_NAME);\nvar [createSliderContext, createSliderScope] = createContextScope(SLIDER_NAME, [\n createCollectionScope\n]);\nvar [SliderProvider, useSliderContext] = createSliderContext(SLIDER_NAME);\nvar Slider = React.forwardRef(\n (props, forwardedRef) => {\n const {\n name,\n min = 0,\n max = 100,\n step = 1,\n orientation = \"horizontal\",\n disabled = false,\n minStepsBetweenThumbs = 0,\n defaultValue = [min],\n value,\n onValueChange = () => {\n },\n onValueCommit = () => {\n },\n inverted = false,\n ...sliderProps\n } = props;\n const thumbRefs = React.useRef(/* @__PURE__ */ new Set());\n const valueIndexToChangeRef = React.useRef(0);\n const isHorizontal = orientation === \"horizontal\";\n const SliderOrientation = isHorizontal ? SliderHorizontal : SliderVertical;\n const [values = [], setValues] = useControllableState({\n prop: value,\n defaultProp: defaultValue,\n onChange: (value2) => {\n const thumbs = [...thumbRefs.current];\n thumbs[valueIndexToChangeRef.current]?.focus();\n onValueChange(value2);\n }\n });\n const valuesBeforeSlideStartRef = React.useRef(values);\n function handleSlideStart(value2) {\n const closestIndex = getClosestValueIndex(values, value2);\n updateValues(value2, closestIndex);\n }\n function handleSlideMove(value2) {\n updateValues(value2, valueIndexToChangeRef.current);\n }\n function handleSlideEnd() {\n const prevValue = valuesBeforeSlideStartRef.current[valueIndexToChangeRef.current];\n const nextValue = values[valueIndexToChangeRef.current];\n const hasChanged = nextValue !== prevValue;\n if (hasChanged) onValueCommit(values);\n }\n function updateValues(value2, atIndex, { commit } = { commit: false }) {\n const decimalCount = getDecimalCount(step);\n const snapToStep = roundValue(Math.round((value2 - min) / step) * step + min, decimalCount);\n const nextValue = clamp(snapToStep, [min, max]);\n setValues((prevValues = []) => {\n const nextValues = getNextSortedValues(prevValues, nextValue, atIndex);\n if (hasMinStepsBetweenValues(nextValues, minStepsBetweenThumbs * step)) {\n valueIndexToChangeRef.current = nextValues.indexOf(nextValue);\n const hasChanged = String(nextValues) !== String(prevValues);\n if (hasChanged && commit) onValueCommit(nextValues);\n return hasChanged ? nextValues : prevValues;\n } else {\n return prevValues;\n }\n });\n }\n return /* @__PURE__ */ jsx(\n SliderProvider,\n {\n scope: props.__scopeSlider,\n name,\n disabled,\n min,\n max,\n valueIndexToChangeRef,\n thumbs: thumbRefs.current,\n values,\n orientation,\n children: /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeSlider, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeSlider, children: /* @__PURE__ */ jsx(\n SliderOrientation,\n {\n \"aria-disabled\": disabled,\n \"data-disabled\": disabled ? \"\" : void 0,\n ...sliderProps,\n ref: forwardedRef,\n onPointerDown: composeEventHandlers(sliderProps.onPointerDown, () => {\n if (!disabled) valuesBeforeSlideStartRef.current = values;\n }),\n min,\n max,\n inverted,\n onSlideStart: disabled ? void 0 : handleSlideStart,\n onSlideMove: disabled ? void 0 : handleSlideMove,\n onSlideEnd: disabled ? void 0 : handleSlideEnd,\n onHomeKeyDown: () => !disabled && updateValues(min, 0, { commit: true }),\n onEndKeyDown: () => !disabled && updateValues(max, values.length - 1, { commit: true }),\n onStepKeyDown: ({ event, direction: stepDirection }) => {\n if (!disabled) {\n const isPageKey = PAGE_KEYS.includes(event.key);\n const isSkipKey = isPageKey || event.shiftKey && ARROW_KEYS.includes(event.key);\n const multiplier = isSkipKey ? 10 : 1;\n const atIndex = valueIndexToChangeRef.current;\n const value2 = values[atIndex];\n const stepInDirection = step * multiplier * stepDirection;\n updateValues(value2 + stepInDirection, atIndex, { commit: true });\n }\n }\n }\n ) }) })\n }\n );\n }\n);\nSlider.displayName = SLIDER_NAME;\nvar [SliderOrientationProvider, useSliderOrientationContext] = createSliderContext(SLIDER_NAME, {\n startEdge: \"left\",\n endEdge: \"right\",\n size: \"width\",\n direction: 1\n});\nvar SliderHorizontal = React.forwardRef(\n (props, forwardedRef) => {\n const {\n min,\n max,\n dir,\n inverted,\n onSlideStart,\n onSlideMove,\n onSlideEnd,\n onStepKeyDown,\n ...sliderProps\n } = props;\n const [slider, setSlider] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setSlider(node));\n const rectRef = React.useRef();\n const direction = useDirection(dir);\n const isDirectionLTR = direction === \"ltr\";\n const isSlidingFromLeft = isDirectionLTR && !inverted || !isDirectionLTR && inverted;\n function getValueFromPointer(pointerPosition) {\n const rect = rectRef.current || slider.getBoundingClientRect();\n const input = [0, rect.width];\n const output = isSlidingFromLeft ? [min, max] : [max, min];\n const value = linearScale(input, output);\n rectRef.current = rect;\n return value(pointerPosition - rect.left);\n }\n return /* @__PURE__ */ jsx(\n SliderOrientationProvider,\n {\n scope: props.__scopeSlider,\n startEdge: isSlidingFromLeft ? \"left\" : \"right\",\n endEdge: isSlidingFromLeft ? \"right\" : \"left\",\n direction: isSlidingFromLeft ? 1 : -1,\n size: \"width\",\n children: /* @__PURE__ */ jsx(\n SliderImpl,\n {\n dir: direction,\n \"data-orientation\": \"horizontal\",\n ...sliderProps,\n ref: composedRefs,\n style: {\n ...sliderProps.style,\n [\"--radix-slider-thumb-transform\"]: \"translateX(-50%)\"\n },\n onSlideStart: (event) => {\n const value = getValueFromPointer(event.clientX);\n onSlideStart?.(value);\n },\n onSlideMove: (event) => {\n const value = getValueFromPointer(event.clientX);\n onSlideMove?.(value);\n },\n onSlideEnd: () => {\n rectRef.current = void 0;\n onSlideEnd?.();\n },\n onStepKeyDown: (event) => {\n const slideDirection = isSlidingFromLeft ? \"from-left\" : \"from-right\";\n const isBackKey = BACK_KEYS[slideDirection].includes(event.key);\n onStepKeyDown?.({ event, direction: isBackKey ? -1 : 1 });\n }\n }\n )\n }\n );\n }\n);\nvar SliderVertical = React.forwardRef(\n (props, forwardedRef) => {\n const {\n min,\n max,\n inverted,\n onSlideStart,\n onSlideMove,\n onSlideEnd,\n onStepKeyDown,\n ...sliderProps\n } = props;\n const sliderRef = React.useRef(null);\n const ref = useComposedRefs(forwardedRef, sliderRef);\n const rectRef = React.useRef();\n const isSlidingFromBottom = !inverted;\n function getValueFromPointer(pointerPosition) {\n const rect = rectRef.current || sliderRef.current.getBoundingClientRect();\n const input = [0, rect.height];\n const output = isSlidingFromBottom ? [max, min] : [min, max];\n const value = linearScale(input, output);\n rectRef.current = rect;\n return value(pointerPosition - rect.top);\n }\n return /* @__PURE__ */ jsx(\n SliderOrientationProvider,\n {\n scope: props.__scopeSlider,\n startEdge: isSlidingFromBottom ? \"bottom\" : \"top\",\n endEdge: isSlidingFromBottom ? \"top\" : \"bottom\",\n size: \"height\",\n direction: isSlidingFromBottom ? 1 : -1,\n children: /* @__PURE__ */ jsx(\n SliderImpl,\n {\n \"data-orientation\": \"vertical\",\n ...sliderProps,\n ref,\n style: {\n ...sliderProps.style,\n [\"--radix-slider-thumb-transform\"]: \"translateY(50%)\"\n },\n onSlideStart: (event) => {\n const value = getValueFromPointer(event.clientY);\n onSlideStart?.(value);\n },\n onSlideMove: (event) => {\n const value = getValueFromPointer(event.clientY);\n onSlideMove?.(value);\n },\n onSlideEnd: () => {\n rectRef.current = void 0;\n onSlideEnd?.();\n },\n onStepKeyDown: (event) => {\n const slideDirection = isSlidingFromBottom ? \"from-bottom\" : \"from-top\";\n const isBackKey = BACK_KEYS[slideDirection].includes(event.key);\n onStepKeyDown?.({ event, direction: isBackKey ? -1 : 1 });\n }\n }\n )\n }\n );\n }\n);\nvar SliderImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeSlider,\n onSlideStart,\n onSlideMove,\n onSlideEnd,\n onHomeKeyDown,\n onEndKeyDown,\n onStepKeyDown,\n ...sliderProps\n } = props;\n const context = useSliderContext(SLIDER_NAME, __scopeSlider);\n return /* @__PURE__ */ jsx(\n Primitive.span,\n {\n ...sliderProps,\n ref: forwardedRef,\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Home\") {\n onHomeKeyDown(event);\n event.preventDefault();\n } else if (event.key === \"End\") {\n onEndKeyDown(event);\n event.preventDefault();\n } else if (PAGE_KEYS.concat(ARROW_KEYS).includes(event.key)) {\n onStepKeyDown(event);\n event.preventDefault();\n }\n }),\n onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {\n const target = event.target;\n target.setPointerCapture(event.pointerId);\n event.preventDefault();\n if (context.thumbs.has(target)) {\n target.focus();\n } else {\n onSlideStart(event);\n }\n }),\n onPointerMove: composeEventHandlers(props.onPointerMove, (event) => {\n const target = event.target;\n if (target.hasPointerCapture(event.pointerId)) onSlideMove(event);\n }),\n onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {\n const target = event.target;\n if (target.hasPointerCapture(event.pointerId)) {\n target.releasePointerCapture(event.pointerId);\n onSlideEnd(event);\n }\n })\n }\n );\n }\n);\nvar TRACK_NAME = \"SliderTrack\";\nvar SliderTrack = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeSlider, ...trackProps } = props;\n const context = useSliderContext(TRACK_NAME, __scopeSlider);\n return /* @__PURE__ */ jsx(\n Primitive.span,\n {\n \"data-disabled\": context.disabled ? \"\" : void 0,\n \"data-orientation\": context.orientation,\n ...trackProps,\n ref: forwardedRef\n }\n );\n }\n);\nSliderTrack.displayName = TRACK_NAME;\nvar RANGE_NAME = \"SliderRange\";\nvar SliderRange = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeSlider, ...rangeProps } = props;\n const context = useSliderContext(RANGE_NAME, __scopeSlider);\n const orientation = useSliderOrientationContext(RANGE_NAME, __scopeSlider);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const valuesCount = context.values.length;\n const percentages = context.values.map(\n (value) => convertValueToPercentage(value, context.min, context.max)\n );\n const offsetStart = valuesCount > 1 ? Math.min(...percentages) : 0;\n const offsetEnd = 100 - Math.max(...percentages);\n return /* @__PURE__ */ jsx(\n Primitive.span,\n {\n \"data-orientation\": context.orientation,\n \"data-disabled\": context.disabled ? \"\" : void 0,\n ...rangeProps,\n ref: composedRefs,\n style: {\n ...props.style,\n [orientation.startEdge]: offsetStart + \"%\",\n [orientation.endEdge]: offsetEnd + \"%\"\n }\n }\n );\n }\n);\nSliderRange.displayName = RANGE_NAME;\nvar THUMB_NAME = \"SliderThumb\";\nvar SliderThumb = React.forwardRef(\n (props, forwardedRef) => {\n const getItems = useCollection(props.__scopeSlider);\n const [thumb, setThumb] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setThumb(node));\n const index = React.useMemo(\n () => thumb ? getItems().findIndex((item) => item.ref.current === thumb) : -1,\n [getItems, thumb]\n );\n return /* @__PURE__ */ jsx(SliderThumbImpl, { ...props, ref: composedRefs, index });\n }\n);\nvar SliderThumbImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeSlider, index, name, ...thumbProps } = props;\n const context = useSliderContext(THUMB_NAME, __scopeSlider);\n const orientation = useSliderOrientationContext(THUMB_NAME, __scopeSlider);\n const [thumb, setThumb] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setThumb(node));\n const isFormControl = thumb ? Boolean(thumb.closest(\"form\")) : true;\n const size = useSize(thumb);\n const value = context.values[index];\n const percent = value === void 0 ? 0 : convertValueToPercentage(value, context.min, context.max);\n const label = getLabel(index, context.values.length);\n const orientationSize = size?.[orientation.size];\n const thumbInBoundsOffset = orientationSize ? getThumbInBoundsOffset(orientationSize, percent, orientation.direction) : 0;\n React.useEffect(() => {\n if (thumb) {\n context.thumbs.add(thumb);\n return () => {\n context.thumbs.delete(thumb);\n };\n }\n }, [thumb, context.thumbs]);\n return /* @__PURE__ */ jsxs(\n \"span\",\n {\n style: {\n transform: \"var(--radix-slider-thumb-transform)\",\n position: \"absolute\",\n [orientation.startEdge]: `calc(${percent}% + ${thumbInBoundsOffset}px)`\n },\n children: [\n /* @__PURE__ */ jsx(Collection.ItemSlot, { scope: props.__scopeSlider, children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n role: \"slider\",\n \"aria-label\": props[\"aria-label\"] || label,\n \"aria-valuemin\": context.min,\n \"aria-valuenow\": value,\n \"aria-valuemax\": context.max,\n \"aria-orientation\": context.orientation,\n \"data-orientation\": context.orientation,\n \"data-disabled\": context.disabled ? \"\" : void 0,\n tabIndex: context.disabled ? void 0 : 0,\n ...thumbProps,\n ref: composedRefs,\n style: value === void 0 ? { display: \"none\" } : props.style,\n onFocus: composeEventHandlers(props.onFocus, () => {\n context.valueIndexToChangeRef.current = index;\n })\n }\n ) }),\n isFormControl && /* @__PURE__ */ jsx(\n BubbleInput,\n {\n name: name ?? (context.name ? context.name + (context.values.length > 1 ? \"[]\" : \"\") : void 0),\n value\n },\n index\n )\n ]\n }\n );\n }\n);\nSliderThumb.displayName = THUMB_NAME;\nvar BubbleInput = (props) => {\n const { value, ...inputProps } = props;\n const ref = React.useRef(null);\n const prevValue = usePrevious(value);\n React.useEffect(() => {\n const input = ref.current;\n const inputProto = window.HTMLInputElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(inputProto, \"value\");\n const setValue = descriptor.set;\n if (prevValue !== value && setValue) {\n const event = new Event(\"input\", { bubbles: true });\n setValue.call(input, value);\n input.dispatchEvent(event);\n }\n }, [prevValue, value]);\n return /* @__PURE__ */ jsx(\"input\", { style: { display: \"none\" }, ...inputProps, ref, defaultValue: value });\n};\nfunction getNextSortedValues(prevValues = [], nextValue, atIndex) {\n const nextValues = [...prevValues];\n nextValues[atIndex] = nextValue;\n return nextValues.sort((a, b) => a - b);\n}\nfunction convertValueToPercentage(value, min, max) {\n const maxSteps = max - min;\n const percentPerStep = 100 / maxSteps;\n const percentage = percentPerStep * (value - min);\n return clamp(percentage, [0, 100]);\n}\nfunction getLabel(index, totalValues) {\n if (totalValues > 2) {\n return `Value ${index + 1} of ${totalValues}`;\n } else if (totalValues === 2) {\n return [\"Minimum\", \"Maximum\"][index];\n } else {\n return void 0;\n }\n}\nfunction getClosestValueIndex(values, nextValue) {\n if (values.length === 1) return 0;\n const distances = values.map((value) => Math.abs(value - nextValue));\n const closestDistance = Math.min(...distances);\n return distances.indexOf(closestDistance);\n}\nfunction getThumbInBoundsOffset(width, left, direction) {\n const halfWidth = width / 2;\n const halfPercent = 50;\n const offset = linearScale([0, halfPercent], [0, halfWidth]);\n return (halfWidth - offset(left) * direction) * direction;\n}\nfunction getStepsBetweenValues(values) {\n return values.slice(0, -1).map((value, index) => values[index + 1] - value);\n}\nfunction hasMinStepsBetweenValues(values, minStepsBetweenValues) {\n if (minStepsBetweenValues > 0) {\n const stepsBetweenValues = getStepsBetweenValues(values);\n const actualMinStepsBetweenValues = Math.min(...stepsBetweenValues);\n return actualMinStepsBetweenValues >= minStepsBetweenValues;\n }\n return true;\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 getDecimalCount(value) {\n return (String(value).split(\".\")[1] || \"\").length;\n}\nfunction roundValue(value, decimalCount) {\n const rounder = Math.pow(10, decimalCount);\n return Math.round(value * rounder) / rounder;\n}\nvar Root = Slider;\nvar Track = SliderTrack;\nvar Range = SliderRange;\nvar Thumb = SliderThumb;\nexport {\n Range,\n Root,\n Slider,\n SliderRange,\n SliderThumb,\n SliderTrack,\n Thumb,\n Track,\n createSliderScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["PAGE_KEYS","ARROW_KEYS","BACK_KEYS","SLIDER_NAME","Collection","useCollection","createCollectionScope","createCollection","createSliderContext","createSliderScope","createContextScope","SliderProvider","useSliderContext","Slider","React","forwardRef","props","forwardedRef","name","min","max","step","orientation","disabled","minStepsBetweenThumbs","defaultValue","value","onValueChange","onValueCommit","inverted","sliderProps","thumbRefs","useRef","Set","valueIndexToChangeRef","SliderOrientation","SliderHorizontal","SliderVertical","values","setValues","useControllableState","prop","defaultProp","onChange","value2","thumbs","current","focus","valuesBeforeSlideStartRef","updateValues","atIndex","commit","decimalCount","String","split","length","getDecimalCount","snapToStep","rounder","Math","pow","round","roundValue","nextValue","clamp","prevValues","nextValues","sort","a","b","getNextSortedValues","minStepsBetweenValues","stepsBetweenValues","slice","map","index","getStepsBetweenValues","hasMinStepsBetweenValues","indexOf","hasChanged","jsx","scope","__scopeSlider","children","Provider","Slot","ref","onPointerDown","composeEventHandlers","onSlideStart","closestIndex","distances","abs","closestDistance","getClosestValueIndex","onSlideMove","onSlideEnd","prevValue","onHomeKeyDown","onEndKeyDown","onStepKeyDown","event","direction","stepDirection","multiplier","includes","key","shiftKey","displayName","SliderOrientationProvider","useSliderOrientationContext","startEdge","endEdge","size","dir","slider","setSlider","useState","composedRefs","useComposedRefs","node","rectRef","useDirection","isDirectionLTR","isSlidingFromLeft","getValueFromPointer","pointerPosition","rect","getBoundingClientRect","linearScale","width","left","SliderImpl","style","clientX","isBackKey","sliderRef","isSlidingFromBottom","height","top","clientY","context","Primitive","span","onKeyDown","preventDefault","concat","target","setPointerCapture","pointerId","has","onPointerMove","hasPointerCapture","onPointerUp","releasePointerCapture","TRACK_NAME","SliderTrack","trackProps","RANGE_NAME","SliderRange","rangeProps","valuesCount","percentages","convertValueToPercentage","offsetStart","offsetEnd","THUMB_NAME","SliderThumb","getItems","thumb","setThumb","useMemo","findIndex","item","SliderThumbImpl","thumbProps","isFormControl","Boolean","closest","useSize","percent","label","totalValues","getLabel","orientationSize","thumbInBoundsOffset","halfWidth","offset","getThumbInBoundsOffset","useEffect","add","delete","jsxs","transform","position","ItemSlot","role","tabIndex","display","onFocus","BubbleInput","inputProps","usePrevious","input","inputProto","window","HTMLInputElement","prototype","setValue","Object","getOwnPropertyDescriptor","set","Event","bubbles","call","dispatchEvent","output","ratio","Root","Track","Range","Thumb"],"mappings":"wwBAeA,IAAIA,EAAY,CAAC,SAAU,YACvBC,EAAa,CAAC,UAAW,YAAa,YAAa,cACnDC,EAAY,CACd,YAAa,CAAC,OAAQ,WAAY,YAAa,aAC/C,aAAc,CAAC,OAAQ,WAAY,YAAa,cAChD,cAAe,CAAC,OAAQ,WAAY,YAAa,aACjD,WAAY,CAAC,OAAQ,WAAY,UAAW,cAE1CC,EAAc,UACbC,EAAYC,EAAeC,GAAyBC,EAAiBJ,IACrEK,EAAqBC,GAAqBC,EAAmBP,EAAa,CAC7EG,KAEGK,EAAgBC,GAAoBJ,EAAoBL,GACzDU,EAASC,EAAMC,YACjB,CAACC,EAAOC,KACN,MAAMC,KACJA,EAAIC,IACJA,EAAM,EAACC,IACPA,EAAM,IAAGC,KACTA,EAAO,EAACC,YACRA,EAAc,aAAYC,SAC1BA,GAAW,EAAKC,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AM+K,WAAU,KACd,MAAMc,EAAQrH,EAAIxC,QACZ8J,EAAaC,OAAOC,iBAAiBC,UAErCC,EADaC,OAAOC,yBAAyBN,EAAY,SACnCO,IAC5B,GAAIlH,IAAcvE,GAASsL,EAAU,CACnC,MAAM3G,EAAQ,IAAI+G,MAAM,QAAS,CAAEC,SAAS,IAC5CL,EAASM,KAAKX,EAAOjL,GACrBiL,EAAMY,cAAclH,EACrB,IACA,CAACJ,EAAWvE,IACQsD,EAAGA,IAAC,QAAS,CAAEqD,MAAO,CAAEiE,QAAS,WAAaG,EAAYnH,MAAK7D,aAAcC,GAAQ,EAO9G,SAASyI,EAAyBzI,EAAOP,EAAKC,GAI5C,OAAO4C,EAFgB,KADN5C,EAAMD,IAEcO,EAAQP,GACpB,CAAC,EAAG,KAC/B,CAiCA,SAAS8G,EAAY0E,EAAOa,GAC1B,OAAQ9L,IACN,GAAIiL,EAAM,KAAOA,EAAM,IAAMa,EAAO,KAAOA,EAAO,GAAI,OAAOA,EAAO,GACpE,MAAMC,GAASD,EAAO,GAAKA,EAAO,KAAOb,EAAM,GAAKA,EAAM,IAC1D,OAAOa,EAAO,GAAKC,GAAS/L,EAAQiL,EAAM,GAAG,CAEjD,CAQG,IAACe,EAAO7M,EACP8M,EAAQ/D,EACRgE,EAAQ7D,EACR8D,EAAQtD"}
@@ -1,2 +0,0 @@
1
- import*as e from"react";import{composeEventHandlers as t}from"../../primitive/dist/index.mjs";import{useComposedRefs as r}from"../../react-compose-refs/dist/index.mjs";import{createContextScope as o}from"../../react-context/dist/index.mjs";import{useControllableState as s}from"../../react-use-controllable-state/dist/index.mjs";import{usePrevious as i}from"../../react-use-previous/dist/index.mjs";import{useSize as a}from"../../react-use-size/dist/index.mjs";import{Primitive as c}from"../../react-primitive/dist/index.mjs";import{j as n}from"../../../../_virtual/jsx-runtime.mjs";var d="Switch",[l,p]=o(d),[u,m]=l(d),f=e.forwardRef(((o,i)=>{const{__scopeSwitch:a,name:d,checked:l,defaultChecked:p,required:m,disabled:f,value:b="on",onCheckedChange:h,...k}=o,[v,w]=e.useState(null),y=r(i,(e=>w(e))),C=e.useRef(!1),g=!v||Boolean(v.closest("form")),[S=!1,E]=s({prop:l,defaultProp:p,onChange:h});return n.jsxs(u,{scope:a,checked:S,disabled:f,children:[n.jsx(c.button,{type:"button",role:"switch","aria-checked":S,"aria-required":m,"data-state":j(S),"data-disabled":f?"":void 0,disabled:f,value:b,...k,ref:y,onClick:t(o.onClick,(e=>{E((e=>!e)),g&&(C.current=e.isPropagationStopped(),C.current||e.stopPropagation())}))}),g&&n.jsx(x,{control:v,bubbles:!C.current,name:d,value:b,checked:S,required:m,disabled:f,style:{transform:"translateX(-100%)"}})]})}));f.displayName=d;var b="SwitchThumb",h=e.forwardRef(((e,t)=>{const{__scopeSwitch:r,...o}=e,s=m(b,r);return n.jsx(c.span,{"data-state":j(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})}));h.displayName=b;var x=t=>{const{control:r,checked:o,bubbles:s=!0,...c}=t,d=e.useRef(null),l=i(o),p=a(r);return e.useEffect((()=>{const e=d.current,t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"checked").set;if(l!==o&&r){const t=new Event("click",{bubbles:s});r.call(e,o),e.dispatchEvent(t)}}),[l,o,s]),n.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o,...c,tabIndex:-1,ref:d,style:{...t.style,...p,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function j(e){return e?"checked":"unchecked"}var k=f,v=h;export{k as Root,f as Switch,h as SwitchThumb,v as Thumb,p as createSwitchScope};
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../node_modules/@radix-ui/react-switch/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/switch/src/Switch.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 { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { usePrevious } from \"@radix-ui/react-use-previous\";\nimport { useSize } from \"@radix-ui/react-use-size\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar SWITCH_NAME = \"Switch\";\nvar [createSwitchContext, createSwitchScope] = createContextScope(SWITCH_NAME);\nvar [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME);\nvar Switch = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeSwitch,\n name,\n checked: checkedProp,\n defaultChecked,\n required,\n disabled,\n value = \"on\",\n onCheckedChange,\n ...switchProps\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 const [checked = false, setChecked] = useControllableState({\n prop: checkedProp,\n defaultProp: defaultChecked,\n onChange: onCheckedChange\n });\n return /* @__PURE__ */ jsxs(SwitchProvider, { scope: __scopeSwitch, checked, disabled, children: [\n /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n role: \"switch\",\n \"aria-checked\": checked,\n \"aria-required\": required,\n \"data-state\": getState(checked),\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n value,\n ...switchProps,\n ref: composedRefs,\n onClick: composeEventHandlers(props.onClick, (event) => {\n setChecked((prevChecked) => !prevChecked);\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);\nSwitch.displayName = SWITCH_NAME;\nvar THUMB_NAME = \"SwitchThumb\";\nvar SwitchThumb = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeSwitch, ...thumbProps } = props;\n const context = useSwitchContext(THUMB_NAME, __scopeSwitch);\n return /* @__PURE__ */ jsx(\n Primitive.span,\n {\n \"data-state\": getState(context.checked),\n \"data-disabled\": context.disabled ? \"\" : void 0,\n ...thumbProps,\n ref: forwardedRef\n }\n );\n }\n);\nSwitchThumb.displayName = THUMB_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: \"checkbox\",\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}\nvar Root = Switch;\nvar Thumb = SwitchThumb;\nexport {\n Root,\n Switch,\n SwitchThumb,\n Thumb,\n createSwitchScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["SWITCH_NAME","createSwitchContext","createSwitchScope","createContextScope","SwitchProvider","useSwitchContext","Switch","React","forwardRef","props","forwardedRef","__scopeSwitch","name","checked","checkedProp","defaultChecked","required","disabled","value","onCheckedChange","switchProps","button","setButton","useState","composedRefs","useComposedRefs","node","hasConsumerStoppedPropagationRef","useRef","isFormControl","Boolean","closest","setChecked","useControllableState","prop","defaultProp","onChange","jsxs","scope","children","jsx","Primitive","type","role","getState","ref","onClick","composeEventHandlers","event","prevChecked","current","isPropagationStopped","stopPropagation","BubbleInput","control","bubbles","style","transform","displayName","THUMB_NAME","SwitchThumb","thumbProps","context","span","inputProps","usePrevious","controlSize","useSize","useEffect","input","inputProto","window","HTMLInputElement","prototype","Object","getOwnPropertyDescriptor","set","Event","call","dispatchEvent","tabIndex","position","pointerEvents","opacity","margin","Root","Thumb"],"mappings":"ukBAYA,IAAIA,EAAc,UACbC,EAAqBC,GAAqBC,EAAmBH,IAC7DI,EAAgBC,GAAoBJ,EAAoBD,GACzDM,EAASC,EAAMC,YACjB,CAACC,EAAOC,KACN,MAAMC,cACJA,EAAaC,KACbA,EACAC,QAASC,EAAWC,eACpBA,EAAcC,SACdA,EAAQC,SACRA,EAAQC,MACRA,EAAQ,KAAIC,gBACZA,KACGC,GACDX,GACGY,EAAQC,GAAaf,EAAMgB,SAAS,MACrCC,EAAeC,EAAgBf,GAAegB,GAASJ,EAAUI,KACjEC,EAAmCpB,EAAMqB,QAAO,GAChDC,GAAgBR,GAASS,QAAQT,EAAOU,QAAQ,UAC/ClB,GAAU,EAAOmB,GAAcC,EAAqB,CACzDC,KAAMpB,EACNqB,YAAapB,EACbqB,SAAUjB,IAEZ,OAAuBkB,EAAAA,KAAKjC,EAAgB,CAAEkC,MAAO3B,EAAeE,UAASI,WAAUsB,SAAU,CAC/EC,EAAGA,IACjBC,EAAUpB,OACV,CACEqB,KAAM,SACNC,KAAM,SACN,eAAgB9B,EAChB,gBAAiBG,EACjB,aAAc4B,EAAS/B,GACvB,gBAAiBI,EAAW,QAAK,EACjCA,WACAC,WACGE,EACHyB,IAAKrB,EACLsB,QAASC,EAAqBtC,EAAMqC,SAAUE,IAC5ChB,GAAYiB,IAAiBA,IACzBpB,IACFF,EAAiCuB,QAAUF,EAAMG,uBAC5CxB,EAAiCuB,SAASF,EAAMI,kBACtD,MAIPvB,GAAiCW,EAAGA,IAClC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