@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 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../node_modules/@radix-ui/react-scroll-area/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/scroll-area/src/ScrollArea.tsx\nimport * as React2 from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { clamp } from \"@radix-ui/number\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\n\n// packages/react/scroll-area/src/useStateMachine.ts\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// packages/react/scroll-area/src/ScrollArea.tsx\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar SCROLL_AREA_NAME = \"ScrollArea\";\nvar [createScrollAreaContext, createScrollAreaScope] = createContextScope(SCROLL_AREA_NAME);\nvar [ScrollAreaProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME);\nvar ScrollArea = React2.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeScrollArea,\n type = \"hover\",\n dir,\n scrollHideDelay = 600,\n ...scrollAreaProps\n } = props;\n const [scrollArea, setScrollArea] = React2.useState(null);\n const [viewport, setViewport] = React2.useState(null);\n const [content, setContent] = React2.useState(null);\n const [scrollbarX, setScrollbarX] = React2.useState(null);\n const [scrollbarY, setScrollbarY] = React2.useState(null);\n const [cornerWidth, setCornerWidth] = React2.useState(0);\n const [cornerHeight, setCornerHeight] = React2.useState(0);\n const [scrollbarXEnabled, setScrollbarXEnabled] = React2.useState(false);\n const [scrollbarYEnabled, setScrollbarYEnabled] = React2.useState(false);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setScrollArea(node));\n const direction = useDirection(dir);\n return /* @__PURE__ */ jsx(\n ScrollAreaProvider,\n {\n scope: __scopeScrollArea,\n type,\n dir: direction,\n scrollHideDelay,\n scrollArea,\n viewport,\n onViewportChange: setViewport,\n content,\n onContentChange: setContent,\n scrollbarX,\n onScrollbarXChange: setScrollbarX,\n scrollbarXEnabled,\n onScrollbarXEnabledChange: setScrollbarXEnabled,\n scrollbarY,\n onScrollbarYChange: setScrollbarY,\n scrollbarYEnabled,\n onScrollbarYEnabledChange: setScrollbarYEnabled,\n onCornerWidthChange: setCornerWidth,\n onCornerHeightChange: setCornerHeight,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n dir: direction,\n ...scrollAreaProps,\n ref: composedRefs,\n style: {\n position: \"relative\",\n // Pass corner sizes as CSS vars to reduce re-renders of context consumers\n [\"--radix-scroll-area-corner-width\"]: cornerWidth + \"px\",\n [\"--radix-scroll-area-corner-height\"]: cornerHeight + \"px\",\n ...props.style\n }\n }\n )\n }\n );\n }\n);\nScrollArea.displayName = SCROLL_AREA_NAME;\nvar VIEWPORT_NAME = \"ScrollAreaViewport\";\nvar ScrollAreaViewport = React2.forwardRef(\n (props, forwardedRef) => {\n const { __scopeScrollArea, children, nonce, ...viewportProps } = props;\n const context = useScrollAreaContext(VIEWPORT_NAME, __scopeScrollArea);\n const ref = React2.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange);\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n \"style\",\n {\n dangerouslySetInnerHTML: {\n __html: `[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`\n },\n nonce\n }\n ),\n /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-radix-scroll-area-viewport\": \"\",\n ...viewportProps,\n ref: composedRefs,\n style: {\n /**\n * We don't support `visible` because the intention is to have at least one scrollbar\n * if this component is used and `visible` will behave like `auto` in that case\n * https://developer.mozilla.org/en-US/docs/Web/CSS/overflowed#description\n *\n * We don't handle `auto` because the intention is for the native implementation\n * to be hidden if using this component. We just want to ensure the node is scrollable\n * so could have used either `scroll` or `auto` here. We picked `scroll` to prevent\n * the browser from having to work out whether to render native scrollbars or not,\n * we tell it to with the intention of hiding them in CSS.\n */\n overflowX: context.scrollbarXEnabled ? \"scroll\" : \"hidden\",\n overflowY: context.scrollbarYEnabled ? \"scroll\" : \"hidden\",\n ...props.style\n },\n children: /* @__PURE__ */ jsx(\"div\", { ref: context.onContentChange, style: { minWidth: \"100%\", display: \"table\" }, children })\n }\n )\n ] });\n }\n);\nScrollAreaViewport.displayName = VIEWPORT_NAME;\nvar SCROLLBAR_NAME = \"ScrollAreaScrollbar\";\nvar ScrollAreaScrollbar = React2.forwardRef(\n (props, forwardedRef) => {\n const { forceMount, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const { onScrollbarXEnabledChange, onScrollbarYEnabledChange } = context;\n const isHorizontal = props.orientation === \"horizontal\";\n React2.useEffect(() => {\n isHorizontal ? onScrollbarXEnabledChange(true) : onScrollbarYEnabledChange(true);\n return () => {\n isHorizontal ? onScrollbarXEnabledChange(false) : onScrollbarYEnabledChange(false);\n };\n }, [isHorizontal, onScrollbarXEnabledChange, onScrollbarYEnabledChange]);\n return context.type === \"hover\" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarHover, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === \"scroll\" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarScroll, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === \"auto\" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarAuto, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === \"always\" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarVisible, { ...scrollbarProps, ref: forwardedRef }) : null;\n }\n);\nScrollAreaScrollbar.displayName = SCROLLBAR_NAME;\nvar ScrollAreaScrollbarHover = React2.forwardRef((props, forwardedRef) => {\n const { forceMount, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const [visible, setVisible] = React2.useState(false);\n React2.useEffect(() => {\n const scrollArea = context.scrollArea;\n let hideTimer = 0;\n if (scrollArea) {\n const handlePointerEnter = () => {\n window.clearTimeout(hideTimer);\n setVisible(true);\n };\n const handlePointerLeave = () => {\n hideTimer = window.setTimeout(() => setVisible(false), context.scrollHideDelay);\n };\n scrollArea.addEventListener(\"pointerenter\", handlePointerEnter);\n scrollArea.addEventListener(\"pointerleave\", handlePointerLeave);\n return () => {\n window.clearTimeout(hideTimer);\n scrollArea.removeEventListener(\"pointerenter\", handlePointerEnter);\n scrollArea.removeEventListener(\"pointerleave\", handlePointerLeave);\n };\n }\n }, [context.scrollArea, context.scrollHideDelay]);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || visible, children: /* @__PURE__ */ jsx(\n ScrollAreaScrollbarAuto,\n {\n \"data-state\": visible ? \"visible\" : \"hidden\",\n ...scrollbarProps,\n ref: forwardedRef\n }\n ) });\n});\nvar ScrollAreaScrollbarScroll = React2.forwardRef((props, forwardedRef) => {\n const { forceMount, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const isHorizontal = props.orientation === \"horizontal\";\n const debounceScrollEnd = useDebounceCallback(() => send(\"SCROLL_END\"), 100);\n const [state, send] = useStateMachine(\"hidden\", {\n hidden: {\n SCROLL: \"scrolling\"\n },\n scrolling: {\n SCROLL_END: \"idle\",\n POINTER_ENTER: \"interacting\"\n },\n interacting: {\n SCROLL: \"interacting\",\n POINTER_LEAVE: \"idle\"\n },\n idle: {\n HIDE: \"hidden\",\n SCROLL: \"scrolling\",\n POINTER_ENTER: \"interacting\"\n }\n });\n React2.useEffect(() => {\n if (state === \"idle\") {\n const hideTimer = window.setTimeout(() => send(\"HIDE\"), context.scrollHideDelay);\n return () => window.clearTimeout(hideTimer);\n }\n }, [state, context.scrollHideDelay, send]);\n React2.useEffect(() => {\n const viewport = context.viewport;\n const scrollDirection = isHorizontal ? \"scrollLeft\" : \"scrollTop\";\n if (viewport) {\n let prevScrollPos = viewport[scrollDirection];\n const handleScroll = () => {\n const scrollPos = viewport[scrollDirection];\n const hasScrollInDirectionChanged = prevScrollPos !== scrollPos;\n if (hasScrollInDirectionChanged) {\n send(\"SCROLL\");\n debounceScrollEnd();\n }\n prevScrollPos = scrollPos;\n };\n viewport.addEventListener(\"scroll\", handleScroll);\n return () => viewport.removeEventListener(\"scroll\", handleScroll);\n }\n }, [context.viewport, isHorizontal, send, debounceScrollEnd]);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || state !== \"hidden\", children: /* @__PURE__ */ jsx(\n ScrollAreaScrollbarVisible,\n {\n \"data-state\": state === \"hidden\" ? \"hidden\" : \"visible\",\n ...scrollbarProps,\n ref: forwardedRef,\n onPointerEnter: composeEventHandlers(props.onPointerEnter, () => send(\"POINTER_ENTER\")),\n onPointerLeave: composeEventHandlers(props.onPointerLeave, () => send(\"POINTER_LEAVE\"))\n }\n ) });\n});\nvar ScrollAreaScrollbarAuto = React2.forwardRef((props, forwardedRef) => {\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const { forceMount, ...scrollbarProps } = props;\n const [visible, setVisible] = React2.useState(false);\n const isHorizontal = props.orientation === \"horizontal\";\n const handleResize = useDebounceCallback(() => {\n if (context.viewport) {\n const isOverflowX = context.viewport.offsetWidth < context.viewport.scrollWidth;\n const isOverflowY = context.viewport.offsetHeight < context.viewport.scrollHeight;\n setVisible(isHorizontal ? isOverflowX : isOverflowY);\n }\n }, 10);\n useResizeObserver(context.viewport, handleResize);\n useResizeObserver(context.content, handleResize);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || visible, children: /* @__PURE__ */ jsx(\n ScrollAreaScrollbarVisible,\n {\n \"data-state\": visible ? \"visible\" : \"hidden\",\n ...scrollbarProps,\n ref: forwardedRef\n }\n ) });\n});\nvar ScrollAreaScrollbarVisible = React2.forwardRef((props, forwardedRef) => {\n const { orientation = \"vertical\", ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const thumbRef = React2.useRef(null);\n const pointerOffsetRef = React2.useRef(0);\n const [sizes, setSizes] = React2.useState({\n content: 0,\n viewport: 0,\n scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }\n });\n const thumbRatio = getThumbRatio(sizes.viewport, sizes.content);\n const commonProps = {\n ...scrollbarProps,\n sizes,\n onSizesChange: setSizes,\n hasThumb: Boolean(thumbRatio > 0 && thumbRatio < 1),\n onThumbChange: (thumb) => thumbRef.current = thumb,\n onThumbPointerUp: () => pointerOffsetRef.current = 0,\n onThumbPointerDown: (pointerPos) => pointerOffsetRef.current = pointerPos\n };\n function getScrollPosition(pointerPos, dir) {\n return getScrollPositionFromPointer(pointerPos, pointerOffsetRef.current, sizes, dir);\n }\n if (orientation === \"horizontal\") {\n return /* @__PURE__ */ jsx(\n ScrollAreaScrollbarX,\n {\n ...commonProps,\n ref: forwardedRef,\n onThumbPositionChange: () => {\n if (context.viewport && thumbRef.current) {\n const scrollPos = context.viewport.scrollLeft;\n const offset = getThumbOffsetFromScroll(scrollPos, sizes, context.dir);\n thumbRef.current.style.transform = `translate3d(${offset}px, 0, 0)`;\n }\n },\n onWheelScroll: (scrollPos) => {\n if (context.viewport) context.viewport.scrollLeft = scrollPos;\n },\n onDragScroll: (pointerPos) => {\n if (context.viewport) {\n context.viewport.scrollLeft = getScrollPosition(pointerPos, context.dir);\n }\n }\n }\n );\n }\n if (orientation === \"vertical\") {\n return /* @__PURE__ */ jsx(\n ScrollAreaScrollbarY,\n {\n ...commonProps,\n ref: forwardedRef,\n onThumbPositionChange: () => {\n if (context.viewport && thumbRef.current) {\n const scrollPos = context.viewport.scrollTop;\n const offset = getThumbOffsetFromScroll(scrollPos, sizes);\n thumbRef.current.style.transform = `translate3d(0, ${offset}px, 0)`;\n }\n },\n onWheelScroll: (scrollPos) => {\n if (context.viewport) context.viewport.scrollTop = scrollPos;\n },\n onDragScroll: (pointerPos) => {\n if (context.viewport) context.viewport.scrollTop = getScrollPosition(pointerPos);\n }\n }\n );\n }\n return null;\n});\nvar ScrollAreaScrollbarX = React2.forwardRef((props, forwardedRef) => {\n const { sizes, onSizesChange, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const [computedStyle, setComputedStyle] = React2.useState();\n const ref = React2.useRef(null);\n const composeRefs = useComposedRefs(forwardedRef, ref, context.onScrollbarXChange);\n React2.useEffect(() => {\n if (ref.current) setComputedStyle(getComputedStyle(ref.current));\n }, [ref]);\n return /* @__PURE__ */ jsx(\n ScrollAreaScrollbarImpl,\n {\n \"data-orientation\": \"horizontal\",\n ...scrollbarProps,\n ref: composeRefs,\n sizes,\n style: {\n bottom: 0,\n left: context.dir === \"rtl\" ? \"var(--radix-scroll-area-corner-width)\" : 0,\n right: context.dir === \"ltr\" ? \"var(--radix-scroll-area-corner-width)\" : 0,\n [\"--radix-scroll-area-thumb-width\"]: getThumbSize(sizes) + \"px\",\n ...props.style\n },\n onThumbPointerDown: (pointerPos) => props.onThumbPointerDown(pointerPos.x),\n onDragScroll: (pointerPos) => props.onDragScroll(pointerPos.x),\n onWheelScroll: (event, maxScrollPos) => {\n if (context.viewport) {\n const scrollPos = context.viewport.scrollLeft + event.deltaX;\n props.onWheelScroll(scrollPos);\n if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) {\n event.preventDefault();\n }\n }\n },\n onResize: () => {\n if (ref.current && context.viewport && computedStyle) {\n onSizesChange({\n content: context.viewport.scrollWidth,\n viewport: context.viewport.offsetWidth,\n scrollbar: {\n size: ref.current.clientWidth,\n paddingStart: toInt(computedStyle.paddingLeft),\n paddingEnd: toInt(computedStyle.paddingRight)\n }\n });\n }\n }\n }\n );\n});\nvar ScrollAreaScrollbarY = React2.forwardRef((props, forwardedRef) => {\n const { sizes, onSizesChange, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const [computedStyle, setComputedStyle] = React2.useState();\n const ref = React2.useRef(null);\n const composeRefs = useComposedRefs(forwardedRef, ref, context.onScrollbarYChange);\n React2.useEffect(() => {\n if (ref.current) setComputedStyle(getComputedStyle(ref.current));\n }, [ref]);\n return /* @__PURE__ */ jsx(\n ScrollAreaScrollbarImpl,\n {\n \"data-orientation\": \"vertical\",\n ...scrollbarProps,\n ref: composeRefs,\n sizes,\n style: {\n top: 0,\n right: context.dir === \"ltr\" ? 0 : void 0,\n left: context.dir === \"rtl\" ? 0 : void 0,\n bottom: \"var(--radix-scroll-area-corner-height)\",\n [\"--radix-scroll-area-thumb-height\"]: getThumbSize(sizes) + \"px\",\n ...props.style\n },\n onThumbPointerDown: (pointerPos) => props.onThumbPointerDown(pointerPos.y),\n onDragScroll: (pointerPos) => props.onDragScroll(pointerPos.y),\n onWheelScroll: (event, maxScrollPos) => {\n if (context.viewport) {\n const scrollPos = context.viewport.scrollTop + event.deltaY;\n props.onWheelScroll(scrollPos);\n if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) {\n event.preventDefault();\n }\n }\n },\n onResize: () => {\n if (ref.current && context.viewport && computedStyle) {\n onSizesChange({\n content: context.viewport.scrollHeight,\n viewport: context.viewport.offsetHeight,\n scrollbar: {\n size: ref.current.clientHeight,\n paddingStart: toInt(computedStyle.paddingTop),\n paddingEnd: toInt(computedStyle.paddingBottom)\n }\n });\n }\n }\n }\n );\n});\nvar [ScrollbarProvider, useScrollbarContext] = createScrollAreaContext(SCROLLBAR_NAME);\nvar ScrollAreaScrollbarImpl = React2.forwardRef((props, forwardedRef) => {\n const {\n __scopeScrollArea,\n sizes,\n hasThumb,\n onThumbChange,\n onThumbPointerUp,\n onThumbPointerDown,\n onThumbPositionChange,\n onDragScroll,\n onWheelScroll,\n onResize,\n ...scrollbarProps\n } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, __scopeScrollArea);\n const [scrollbar, setScrollbar] = React2.useState(null);\n const composeRefs = useComposedRefs(forwardedRef, (node) => setScrollbar(node));\n const rectRef = React2.useRef(null);\n const prevWebkitUserSelectRef = React2.useRef(\"\");\n const viewport = context.viewport;\n const maxScrollPos = sizes.content - sizes.viewport;\n const handleWheelScroll = useCallbackRef(onWheelScroll);\n const handleThumbPositionChange = useCallbackRef(onThumbPositionChange);\n const handleResize = useDebounceCallback(onResize, 10);\n function handleDragScroll(event) {\n if (rectRef.current) {\n const x = event.clientX - rectRef.current.left;\n const y = event.clientY - rectRef.current.top;\n onDragScroll({ x, y });\n }\n }\n React2.useEffect(() => {\n const handleWheel = (event) => {\n const element = event.target;\n const isScrollbarWheel = scrollbar?.contains(element);\n if (isScrollbarWheel) handleWheelScroll(event, maxScrollPos);\n };\n document.addEventListener(\"wheel\", handleWheel, { passive: false });\n return () => document.removeEventListener(\"wheel\", handleWheel, { passive: false });\n }, [viewport, scrollbar, maxScrollPos, handleWheelScroll]);\n React2.useEffect(handleThumbPositionChange, [sizes, handleThumbPositionChange]);\n useResizeObserver(scrollbar, handleResize);\n useResizeObserver(context.content, handleResize);\n return /* @__PURE__ */ jsx(\n ScrollbarProvider,\n {\n scope: __scopeScrollArea,\n scrollbar,\n hasThumb,\n onThumbChange: useCallbackRef(onThumbChange),\n onThumbPointerUp: useCallbackRef(onThumbPointerUp),\n onThumbPositionChange: handleThumbPositionChange,\n onThumbPointerDown: useCallbackRef(onThumbPointerDown),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...scrollbarProps,\n ref: composeRefs,\n style: { position: \"absolute\", ...scrollbarProps.style },\n onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {\n const mainPointer = 0;\n if (event.button === mainPointer) {\n const element = event.target;\n element.setPointerCapture(event.pointerId);\n rectRef.current = scrollbar.getBoundingClientRect();\n prevWebkitUserSelectRef.current = document.body.style.webkitUserSelect;\n document.body.style.webkitUserSelect = \"none\";\n if (context.viewport) context.viewport.style.scrollBehavior = \"auto\";\n handleDragScroll(event);\n }\n }),\n onPointerMove: composeEventHandlers(props.onPointerMove, handleDragScroll),\n onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {\n const element = event.target;\n if (element.hasPointerCapture(event.pointerId)) {\n element.releasePointerCapture(event.pointerId);\n }\n document.body.style.webkitUserSelect = prevWebkitUserSelectRef.current;\n if (context.viewport) context.viewport.style.scrollBehavior = \"\";\n rectRef.current = null;\n })\n }\n )\n }\n );\n});\nvar THUMB_NAME = \"ScrollAreaThumb\";\nvar ScrollAreaThumb = React2.forwardRef(\n (props, forwardedRef) => {\n const { forceMount, ...thumbProps } = props;\n const scrollbarContext = useScrollbarContext(THUMB_NAME, props.__scopeScrollArea);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || scrollbarContext.hasThumb, children: /* @__PURE__ */ jsx(ScrollAreaThumbImpl, { ref: forwardedRef, ...thumbProps }) });\n }\n);\nvar ScrollAreaThumbImpl = React2.forwardRef(\n (props, forwardedRef) => {\n const { __scopeScrollArea, style, ...thumbProps } = props;\n const scrollAreaContext = useScrollAreaContext(THUMB_NAME, __scopeScrollArea);\n const scrollbarContext = useScrollbarContext(THUMB_NAME, __scopeScrollArea);\n const { onThumbPositionChange } = scrollbarContext;\n const composedRef = useComposedRefs(\n forwardedRef,\n (node) => scrollbarContext.onThumbChange(node)\n );\n const removeUnlinkedScrollListenerRef = React2.useRef();\n const debounceScrollEnd = useDebounceCallback(() => {\n if (removeUnlinkedScrollListenerRef.current) {\n removeUnlinkedScrollListenerRef.current();\n removeUnlinkedScrollListenerRef.current = void 0;\n }\n }, 100);\n React2.useEffect(() => {\n const viewport = scrollAreaContext.viewport;\n if (viewport) {\n const handleScroll = () => {\n debounceScrollEnd();\n if (!removeUnlinkedScrollListenerRef.current) {\n const listener = addUnlinkedScrollListener(viewport, onThumbPositionChange);\n removeUnlinkedScrollListenerRef.current = listener;\n onThumbPositionChange();\n }\n };\n onThumbPositionChange();\n viewport.addEventListener(\"scroll\", handleScroll);\n return () => viewport.removeEventListener(\"scroll\", handleScroll);\n }\n }, [scrollAreaContext.viewport, debounceScrollEnd, onThumbPositionChange]);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": scrollbarContext.hasThumb ? \"visible\" : \"hidden\",\n ...thumbProps,\n ref: composedRef,\n style: {\n width: \"var(--radix-scroll-area-thumb-width)\",\n height: \"var(--radix-scroll-area-thumb-height)\",\n ...style\n },\n onPointerDownCapture: composeEventHandlers(props.onPointerDownCapture, (event) => {\n const thumb = event.target;\n const thumbRect = thumb.getBoundingClientRect();\n const x = event.clientX - thumbRect.left;\n const y = event.clientY - thumbRect.top;\n scrollbarContext.onThumbPointerDown({ x, y });\n }),\n onPointerUp: composeEventHandlers(props.onPointerUp, scrollbarContext.onThumbPointerUp)\n }\n );\n }\n);\nScrollAreaThumb.displayName = THUMB_NAME;\nvar CORNER_NAME = \"ScrollAreaCorner\";\nvar ScrollAreaCorner = React2.forwardRef(\n (props, forwardedRef) => {\n const context = useScrollAreaContext(CORNER_NAME, props.__scopeScrollArea);\n const hasBothScrollbarsVisible = Boolean(context.scrollbarX && context.scrollbarY);\n const hasCorner = context.type !== \"scroll\" && hasBothScrollbarsVisible;\n return hasCorner ? /* @__PURE__ */ jsx(ScrollAreaCornerImpl, { ...props, ref: forwardedRef }) : null;\n }\n);\nScrollAreaCorner.displayName = CORNER_NAME;\nvar ScrollAreaCornerImpl = React2.forwardRef((props, forwardedRef) => {\n const { __scopeScrollArea, ...cornerProps } = props;\n const context = useScrollAreaContext(CORNER_NAME, __scopeScrollArea);\n const [width, setWidth] = React2.useState(0);\n const [height, setHeight] = React2.useState(0);\n const hasSize = Boolean(width && height);\n useResizeObserver(context.scrollbarX, () => {\n const height2 = context.scrollbarX?.offsetHeight || 0;\n context.onCornerHeightChange(height2);\n setHeight(height2);\n });\n useResizeObserver(context.scrollbarY, () => {\n const width2 = context.scrollbarY?.offsetWidth || 0;\n context.onCornerWidthChange(width2);\n setWidth(width2);\n });\n return hasSize ? /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...cornerProps,\n ref: forwardedRef,\n style: {\n width,\n height,\n position: \"absolute\",\n right: context.dir === \"ltr\" ? 0 : void 0,\n left: context.dir === \"rtl\" ? 0 : void 0,\n bottom: 0,\n ...props.style\n }\n }\n ) : null;\n});\nfunction toInt(value) {\n return value ? parseInt(value, 10) : 0;\n}\nfunction getThumbRatio(viewportSize, contentSize) {\n const ratio = viewportSize / contentSize;\n return isNaN(ratio) ? 0 : ratio;\n}\nfunction getThumbSize(sizes) {\n const ratio = getThumbRatio(sizes.viewport, sizes.content);\n const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;\n const thumbSize = (sizes.scrollbar.size - scrollbarPadding) * ratio;\n return Math.max(thumbSize, 18);\n}\nfunction getScrollPositionFromPointer(pointerPos, pointerOffset, sizes, dir = \"ltr\") {\n const thumbSizePx = getThumbSize(sizes);\n const thumbCenter = thumbSizePx / 2;\n const offset = pointerOffset || thumbCenter;\n const thumbOffsetFromEnd = thumbSizePx - offset;\n const minPointerPos = sizes.scrollbar.paddingStart + offset;\n const maxPointerPos = sizes.scrollbar.size - sizes.scrollbar.paddingEnd - thumbOffsetFromEnd;\n const maxScrollPos = sizes.content - sizes.viewport;\n const scrollRange = dir === \"ltr\" ? [0, maxScrollPos] : [maxScrollPos * -1, 0];\n const interpolate = linearScale([minPointerPos, maxPointerPos], scrollRange);\n return interpolate(pointerPos);\n}\nfunction getThumbOffsetFromScroll(scrollPos, sizes, dir = \"ltr\") {\n const thumbSizePx = getThumbSize(sizes);\n const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;\n const scrollbar = sizes.scrollbar.size - scrollbarPadding;\n const maxScrollPos = sizes.content - sizes.viewport;\n const maxThumbPos = scrollbar - thumbSizePx;\n const scrollClampRange = dir === \"ltr\" ? [0, maxScrollPos] : [maxScrollPos * -1, 0];\n const scrollWithoutMomentum = clamp(scrollPos, scrollClampRange);\n const interpolate = linearScale([0, maxScrollPos], [0, maxThumbPos]);\n return interpolate(scrollWithoutMomentum);\n}\nfunction linearScale(input, output) {\n return (value) => {\n if (input[0] === input[1] || output[0] === output[1]) return output[0];\n const ratio = (output[1] - output[0]) / (input[1] - input[0]);\n return output[0] + ratio * (value - input[0]);\n };\n}\nfunction isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos) {\n return scrollPos > 0 && scrollPos < maxScrollPos;\n}\nvar addUnlinkedScrollListener = (node, handler = () => {\n}) => {\n let prevPosition = { left: node.scrollLeft, top: node.scrollTop };\n let rAF = 0;\n (function loop() {\n const position = { left: node.scrollLeft, top: node.scrollTop };\n const isHorizontalScroll = prevPosition.left !== position.left;\n const isVerticalScroll = prevPosition.top !== position.top;\n if (isHorizontalScroll || isVerticalScroll) handler();\n prevPosition = position;\n rAF = window.requestAnimationFrame(loop);\n })();\n return () => window.cancelAnimationFrame(rAF);\n};\nfunction useDebounceCallback(callback, delay) {\n const handleCallback = useCallbackRef(callback);\n const debounceTimerRef = React2.useRef(0);\n React2.useEffect(() => () => window.clearTimeout(debounceTimerRef.current), []);\n return React2.useCallback(() => {\n window.clearTimeout(debounceTimerRef.current);\n debounceTimerRef.current = window.setTimeout(handleCallback, delay);\n }, [handleCallback, delay]);\n}\nfunction useResizeObserver(element, onResize) {\n const handleResize = useCallbackRef(onResize);\n useLayoutEffect(() => {\n let rAF = 0;\n if (element) {\n const resizeObserver = new ResizeObserver(() => {\n cancelAnimationFrame(rAF);\n rAF = window.requestAnimationFrame(handleResize);\n });\n resizeObserver.observe(element);\n return () => {\n window.cancelAnimationFrame(rAF);\n resizeObserver.unobserve(element);\n };\n }\n }, [element, handleResize]);\n}\nvar Root = ScrollArea;\nvar Viewport = ScrollAreaViewport;\nvar Scrollbar = ScrollAreaScrollbar;\nvar Thumb = ScrollAreaThumb;\nvar Corner = ScrollAreaCorner;\nexport {\n Corner,\n Root,\n ScrollArea,\n ScrollAreaCorner,\n ScrollAreaScrollbar,\n ScrollAreaThumb,\n ScrollAreaViewport,\n Scrollbar,\n Thumb,\n Viewport,\n createScrollAreaScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["SCROLL_AREA_NAME","createScrollAreaContext","createScrollAreaScope","createContextScope","ScrollAreaProvider","useScrollAreaContext","ScrollArea","React2","forwardRef","props","forwardedRef","__scopeScrollArea","type","dir","scrollHideDelay","scrollAreaProps","scrollArea","setScrollArea","useState","viewport","setViewport","content","setContent","scrollbarX","setScrollbarX","scrollbarY","setScrollbarY","cornerWidth","setCornerWidth","cornerHeight","setCornerHeight","scrollbarXEnabled","setScrollbarXEnabled","scrollbarYEnabled","setScrollbarYEnabled","composedRefs","useComposedRefs","node","direction","useDirection","jsx","scope","onViewportChange","onContentChange","onScrollbarXChange","onScrollbarXEnabledChange","onScrollbarYChange","onScrollbarYEnabledChange","onCornerWidthChange","onCornerHeightChange","children","Primitive","div","ref","style","position","displayName","VIEWPORT_NAME","ScrollAreaViewport","nonce","viewportProps","context","useRef","jsxs","Fragment","dangerouslySetInnerHTML","__html","overflowX","overflowY","minWidth","display","SCROLLBAR_NAME","ScrollAreaScrollbar","forceMount","scrollbarProps","isHorizontal","orientation","useEffect","ScrollAreaScrollbarHover","ScrollAreaScrollbarScroll","ScrollAreaScrollbarAuto","ScrollAreaScrollbarVisible","visible","setVisible","hideTimer","handlePointerEnter","window","clearTimeout","handlePointerLeave","setTimeout","addEventListener","removeEventListener","Presence","present","debounceScrollEnd","useDebounceCallback","send","state","initialState","machine","hidden","SCROLL","scrolling","SCROLL_END","POINTER_ENTER","interacting","POINTER_LEAVE","idle","HIDE","React","useReducer","event","scrollDirection","prevScrollPos","handleScroll","scrollPos","onPointerEnter","composeEventHandlers","onPointerLeave","handleResize","isOverflowX","offsetWidth","scrollWidth","isOverflowY","offsetHeight","scrollHeight","useResizeObserver","thumbRef","pointerOffsetRef","sizes","setSizes","scrollbar","size","paddingStart","paddingEnd","thumbRatio","getThumbRatio","commonProps","onSizesChange","hasThumb","Boolean","onThumbChange","thumb","current","onThumbPointerUp","onThumbPointerDown","pointerPos","getScrollPosition","pointerOffset","thumbSizePx","getThumbSize","thumbCenter","offset","thumbOffsetFromEnd","minPointerPos","maxPointerPos","maxScrollPos","scrollRange","linearScale","interpolate","getScrollPositionFromPointer","ScrollAreaScrollbarX","onThumbPositionChange","getThumbOffsetFromScroll","scrollLeft","transform","onWheelScroll","onDragScroll","ScrollAreaScrollbarY","scrollTop","computedStyle","setComputedStyle","composeRefs","getComputedStyle","ScrollAreaScrollbarImpl","bottom","left","right","x","deltaX","isScrollingWithinScrollbarBounds","preventDefault","onResize","clientWidth","toInt","paddingLeft","paddingRight","top","y","deltaY","clientHeight","paddingTop","paddingBottom","ScrollbarProvider","useScrollbarContext","setScrollbar","rectRef","prevWebkitUserSelectRef","handleWheelScroll","useCallbackRef","handleThumbPositionChange","handleDragScroll","clientX","clientY","handleWheel","element","target","isScrollbarWheel","contains","document","passive","onPointerDown","button","setPointerCapture","pointerId","getBoundingClientRect","body","webkitUserSelect","scrollBehavior","onPointerMove","onPointerUp","hasPointerCapture","releasePointerCapture","THUMB_NAME","ScrollAreaThumb","thumbProps","scrollbarContext","ScrollAreaThumbImpl","scrollAreaContext","composedRef","removeUnlinkedScrollListenerRef","listener","addUnlinkedScrollListener","width","height","onPointerDownCapture","thumbRect","CORNER_NAME","ScrollAreaCorner","hasBothScrollbarsVisible","ScrollAreaCornerImpl","cornerProps","setWidth","setHeight","hasSize","height2","width2","value","parseInt","viewportSize","contentSize","ratio","isNaN","scrollbarPadding","thumbSize","Math","max","maxThumbPos","scrollWithoutMomentum","clamp","input","output","handler","prevPosition","rAF","loop","isHorizontalScroll","isVerticalScroll","requestAnimationFrame","cancelAnimationFrame","callback","delay","handleCallback","debounceTimerRef","useCallback","useLayoutEffect","resizeObserver","ResizeObserver","observe","unobserve","Root","Viewport","Scrollbar","Thumb","Corner"],"mappings":"6rBAyBA,IAAIA,EAAmB,cAClBC,EAAyBC,GAAyBC,EAAmBH,IACrEI,EAAoBC,GAAwBJ,EAAwBD,GACrEM,EAAaC,EAAOC,YACtB,CAACC,EAAOC,KACN,MAAMC,kBACJA,EAAiBC,KACjBA,EAAO,QAAOC,IACdA,EAAGC,gBACHA,EAAkB,OACfC,GACDN,GACGO,EAAYC,GAAiBV,EAAOW,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OAAOuL,qBAAqBL,GAC5BY,EAAeG,UAAU1E,EAAQ,CAEpC,IACA,CAACA,EAAStF,GACf,CACG,IAACiK,EAAOlR,EACPmR,EAAW/N,EACXgO,EAAYlN,EACZmN,EAAQ3D,EACR4D,EAAS9C"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../node_modules/@radix-ui/react-scroll-area/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/scroll-area/src/ScrollArea.tsx\nimport * as React2 from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { clamp } from \"@radix-ui/number\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\n\n// packages/react/scroll-area/src/useStateMachine.ts\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// packages/react/scroll-area/src/ScrollArea.tsx\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar SCROLL_AREA_NAME = \"ScrollArea\";\nvar [createScrollAreaContext, createScrollAreaScope] = createContextScope(SCROLL_AREA_NAME);\nvar [ScrollAreaProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME);\nvar ScrollArea = React2.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeScrollArea,\n type = \"hover\",\n dir,\n scrollHideDelay = 600,\n ...scrollAreaProps\n } = props;\n const [scrollArea, setScrollArea] = React2.useState(null);\n const [viewport, setViewport] = React2.useState(null);\n const [content, setContent] = React2.useState(null);\n const [scrollbarX, setScrollbarX] = React2.useState(null);\n const [scrollbarY, setScrollbarY] = React2.useState(null);\n const [cornerWidth, setCornerWidth] = React2.useState(0);\n const [cornerHeight, setCornerHeight] = React2.useState(0);\n const [scrollbarXEnabled, setScrollbarXEnabled] = React2.useState(false);\n const [scrollbarYEnabled, setScrollbarYEnabled] = React2.useState(false);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setScrollArea(node));\n const direction = useDirection(dir);\n return /* @__PURE__ */ jsx(\n ScrollAreaProvider,\n {\n scope: __scopeScrollArea,\n type,\n dir: direction,\n scrollHideDelay,\n scrollArea,\n viewport,\n onViewportChange: setViewport,\n content,\n onContentChange: setContent,\n scrollbarX,\n onScrollbarXChange: setScrollbarX,\n scrollbarXEnabled,\n onScrollbarXEnabledChange: setScrollbarXEnabled,\n scrollbarY,\n onScrollbarYChange: setScrollbarY,\n scrollbarYEnabled,\n onScrollbarYEnabledChange: setScrollbarYEnabled,\n onCornerWidthChange: setCornerWidth,\n onCornerHeightChange: setCornerHeight,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n dir: direction,\n ...scrollAreaProps,\n ref: composedRefs,\n style: {\n position: \"relative\",\n // Pass corner sizes as CSS vars to reduce re-renders of context consumers\n [\"--radix-scroll-area-corner-width\"]: cornerWidth + \"px\",\n [\"--radix-scroll-area-corner-height\"]: cornerHeight + \"px\",\n ...props.style\n }\n }\n )\n }\n );\n }\n);\nScrollArea.displayName = SCROLL_AREA_NAME;\nvar VIEWPORT_NAME = \"ScrollAreaViewport\";\nvar ScrollAreaViewport = React2.forwardRef(\n (props, forwardedRef) => {\n const { __scopeScrollArea, children, nonce, ...viewportProps } = props;\n const context = useScrollAreaContext(VIEWPORT_NAME, __scopeScrollArea);\n const ref = React2.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange);\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n \"style\",\n {\n dangerouslySetInnerHTML: {\n __html: `[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`\n },\n nonce\n }\n ),\n /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-radix-scroll-area-viewport\": \"\",\n ...viewportProps,\n ref: composedRefs,\n style: {\n /**\n * We don't support `visible` because the intention is to have at least one scrollbar\n * if this component is used and `visible` will behave like `auto` in that case\n * https://developer.mozilla.org/en-US/docs/Web/CSS/overflowed#description\n *\n * We don't handle `auto` because the intention is for the native implementation\n * to be hidden if using this component. We just want to ensure the node is scrollable\n * so could have used either `scroll` or `auto` here. We picked `scroll` to prevent\n * the browser from having to work out whether to render native scrollbars or not,\n * we tell it to with the intention of hiding them in CSS.\n */\n overflowX: context.scrollbarXEnabled ? \"scroll\" : \"hidden\",\n overflowY: context.scrollbarYEnabled ? \"scroll\" : \"hidden\",\n ...props.style\n },\n children: /* @__PURE__ */ jsx(\"div\", { ref: context.onContentChange, style: { minWidth: \"100%\", display: \"table\" }, children })\n }\n )\n ] });\n }\n);\nScrollAreaViewport.displayName = VIEWPORT_NAME;\nvar SCROLLBAR_NAME = \"ScrollAreaScrollbar\";\nvar ScrollAreaScrollbar = React2.forwardRef(\n (props, forwardedRef) => {\n const { forceMount, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const { onScrollbarXEnabledChange, onScrollbarYEnabledChange } = context;\n const isHorizontal = props.orientation === \"horizontal\";\n React2.useEffect(() => {\n isHorizontal ? onScrollbarXEnabledChange(true) : onScrollbarYEnabledChange(true);\n return () => {\n isHorizontal ? onScrollbarXEnabledChange(false) : onScrollbarYEnabledChange(false);\n };\n }, [isHorizontal, onScrollbarXEnabledChange, onScrollbarYEnabledChange]);\n return context.type === \"hover\" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarHover, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === \"scroll\" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarScroll, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === \"auto\" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarAuto, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === \"always\" ? /* @__PURE__ */ jsx(ScrollAreaScrollbarVisible, { ...scrollbarProps, ref: forwardedRef }) : null;\n }\n);\nScrollAreaScrollbar.displayName = SCROLLBAR_NAME;\nvar ScrollAreaScrollbarHover = React2.forwardRef((props, forwardedRef) => {\n const { forceMount, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const [visible, setVisible] = React2.useState(false);\n React2.useEffect(() => {\n const scrollArea = context.scrollArea;\n let hideTimer = 0;\n if (scrollArea) {\n const handlePointerEnter = () => {\n window.clearTimeout(hideTimer);\n setVisible(true);\n };\n const handlePointerLeave = () => {\n hideTimer = window.setTimeout(() => setVisible(false), context.scrollHideDelay);\n };\n scrollArea.addEventListener(\"pointerenter\", handlePointerEnter);\n scrollArea.addEventListener(\"pointerleave\", handlePointerLeave);\n return () => {\n window.clearTimeout(hideTimer);\n scrollArea.removeEventListener(\"pointerenter\", handlePointerEnter);\n scrollArea.removeEventListener(\"pointerleave\", handlePointerLeave);\n };\n }\n }, [context.scrollArea, context.scrollHideDelay]);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || visible, children: /* @__PURE__ */ jsx(\n ScrollAreaScrollbarAuto,\n {\n \"data-state\": visible ? \"visible\" : \"hidden\",\n ...scrollbarProps,\n ref: forwardedRef\n }\n ) });\n});\nvar ScrollAreaScrollbarScroll = React2.forwardRef((props, forwardedRef) => {\n const { forceMount, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const isHorizontal = props.orientation === \"horizontal\";\n const debounceScrollEnd = useDebounceCallback(() => send(\"SCROLL_END\"), 100);\n const [state, send] = useStateMachine(\"hidden\", {\n hidden: {\n SCROLL: \"scrolling\"\n },\n scrolling: {\n SCROLL_END: \"idle\",\n POINTER_ENTER: \"interacting\"\n },\n interacting: {\n SCROLL: \"interacting\",\n POINTER_LEAVE: \"idle\"\n },\n idle: {\n HIDE: \"hidden\",\n SCROLL: \"scrolling\",\n POINTER_ENTER: \"interacting\"\n }\n });\n React2.useEffect(() => {\n if (state === \"idle\") {\n const hideTimer = window.setTimeout(() => send(\"HIDE\"), context.scrollHideDelay);\n return () => window.clearTimeout(hideTimer);\n }\n }, [state, context.scrollHideDelay, send]);\n React2.useEffect(() => {\n const viewport = context.viewport;\n const scrollDirection = isHorizontal ? \"scrollLeft\" : \"scrollTop\";\n if (viewport) {\n let prevScrollPos = viewport[scrollDirection];\n const handleScroll = () => {\n const scrollPos = viewport[scrollDirection];\n const hasScrollInDirectionChanged = prevScrollPos !== scrollPos;\n if (hasScrollInDirectionChanged) {\n send(\"SCROLL\");\n debounceScrollEnd();\n }\n prevScrollPos = scrollPos;\n };\n viewport.addEventListener(\"scroll\", handleScroll);\n return () => viewport.removeEventListener(\"scroll\", handleScroll);\n }\n }, [context.viewport, isHorizontal, send, debounceScrollEnd]);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || state !== \"hidden\", children: /* @__PURE__ */ jsx(\n ScrollAreaScrollbarVisible,\n {\n \"data-state\": state === \"hidden\" ? \"hidden\" : \"visible\",\n ...scrollbarProps,\n ref: forwardedRef,\n onPointerEnter: composeEventHandlers(props.onPointerEnter, () => send(\"POINTER_ENTER\")),\n onPointerLeave: composeEventHandlers(props.onPointerLeave, () => send(\"POINTER_LEAVE\"))\n }\n ) });\n});\nvar ScrollAreaScrollbarAuto = React2.forwardRef((props, forwardedRef) => {\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const { forceMount, ...scrollbarProps } = props;\n const [visible, setVisible] = React2.useState(false);\n const isHorizontal = props.orientation === \"horizontal\";\n const handleResize = useDebounceCallback(() => {\n if (context.viewport) {\n const isOverflowX = context.viewport.offsetWidth < context.viewport.scrollWidth;\n const isOverflowY = context.viewport.offsetHeight < context.viewport.scrollHeight;\n setVisible(isHorizontal ? isOverflowX : isOverflowY);\n }\n }, 10);\n useResizeObserver(context.viewport, handleResize);\n useResizeObserver(context.content, handleResize);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || visible, children: /* @__PURE__ */ jsx(\n ScrollAreaScrollbarVisible,\n {\n \"data-state\": visible ? \"visible\" : \"hidden\",\n ...scrollbarProps,\n ref: forwardedRef\n }\n ) });\n});\nvar ScrollAreaScrollbarVisible = React2.forwardRef((props, forwardedRef) => {\n const { orientation = \"vertical\", ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const thumbRef = React2.useRef(null);\n const pointerOffsetRef = React2.useRef(0);\n const [sizes, setSizes] = React2.useState({\n content: 0,\n viewport: 0,\n scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }\n });\n const thumbRatio = getThumbRatio(sizes.viewport, sizes.content);\n const commonProps = {\n ...scrollbarProps,\n sizes,\n onSizesChange: setSizes,\n hasThumb: Boolean(thumbRatio > 0 && thumbRatio < 1),\n onThumbChange: (thumb) => thumbRef.current = thumb,\n onThumbPointerUp: () => pointerOffsetRef.current = 0,\n onThumbPointerDown: (pointerPos) => pointerOffsetRef.current = pointerPos\n };\n function getScrollPosition(pointerPos, dir) {\n return getScrollPositionFromPointer(pointerPos, pointerOffsetRef.current, sizes, dir);\n }\n if (orientation === \"horizontal\") {\n return /* @__PURE__ */ jsx(\n ScrollAreaScrollbarX,\n {\n ...commonProps,\n ref: forwardedRef,\n onThumbPositionChange: () => {\n if (context.viewport && thumbRef.current) {\n const scrollPos = context.viewport.scrollLeft;\n const offset = getThumbOffsetFromScroll(scrollPos, sizes, context.dir);\n thumbRef.current.style.transform = `translate3d(${offset}px, 0, 0)`;\n }\n },\n onWheelScroll: (scrollPos) => {\n if (context.viewport) context.viewport.scrollLeft = scrollPos;\n },\n onDragScroll: (pointerPos) => {\n if (context.viewport) {\n context.viewport.scrollLeft = getScrollPosition(pointerPos, context.dir);\n }\n }\n }\n );\n }\n if (orientation === \"vertical\") {\n return /* @__PURE__ */ jsx(\n ScrollAreaScrollbarY,\n {\n ...commonProps,\n ref: forwardedRef,\n onThumbPositionChange: () => {\n if (context.viewport && thumbRef.current) {\n const scrollPos = context.viewport.scrollTop;\n const offset = getThumbOffsetFromScroll(scrollPos, sizes);\n thumbRef.current.style.transform = `translate3d(0, ${offset}px, 0)`;\n }\n },\n onWheelScroll: (scrollPos) => {\n if (context.viewport) context.viewport.scrollTop = scrollPos;\n },\n onDragScroll: (pointerPos) => {\n if (context.viewport) context.viewport.scrollTop = getScrollPosition(pointerPos);\n }\n }\n );\n }\n return null;\n});\nvar ScrollAreaScrollbarX = React2.forwardRef((props, forwardedRef) => {\n const { sizes, onSizesChange, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const [computedStyle, setComputedStyle] = React2.useState();\n const ref = React2.useRef(null);\n const composeRefs = useComposedRefs(forwardedRef, ref, context.onScrollbarXChange);\n React2.useEffect(() => {\n if (ref.current) setComputedStyle(getComputedStyle(ref.current));\n }, [ref]);\n return /* @__PURE__ */ jsx(\n ScrollAreaScrollbarImpl,\n {\n \"data-orientation\": \"horizontal\",\n ...scrollbarProps,\n ref: composeRefs,\n sizes,\n style: {\n bottom: 0,\n left: context.dir === \"rtl\" ? \"var(--radix-scroll-area-corner-width)\" : 0,\n right: context.dir === \"ltr\" ? \"var(--radix-scroll-area-corner-width)\" : 0,\n [\"--radix-scroll-area-thumb-width\"]: getThumbSize(sizes) + \"px\",\n ...props.style\n },\n onThumbPointerDown: (pointerPos) => props.onThumbPointerDown(pointerPos.x),\n onDragScroll: (pointerPos) => props.onDragScroll(pointerPos.x),\n onWheelScroll: (event, maxScrollPos) => {\n if (context.viewport) {\n const scrollPos = context.viewport.scrollLeft + event.deltaX;\n props.onWheelScroll(scrollPos);\n if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) {\n event.preventDefault();\n }\n }\n },\n onResize: () => {\n if (ref.current && context.viewport && computedStyle) {\n onSizesChange({\n content: context.viewport.scrollWidth,\n viewport: context.viewport.offsetWidth,\n scrollbar: {\n size: ref.current.clientWidth,\n paddingStart: toInt(computedStyle.paddingLeft),\n paddingEnd: toInt(computedStyle.paddingRight)\n }\n });\n }\n }\n }\n );\n});\nvar ScrollAreaScrollbarY = React2.forwardRef((props, forwardedRef) => {\n const { sizes, onSizesChange, ...scrollbarProps } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);\n const [computedStyle, setComputedStyle] = React2.useState();\n const ref = React2.useRef(null);\n const composeRefs = useComposedRefs(forwardedRef, ref, context.onScrollbarYChange);\n React2.useEffect(() => {\n if (ref.current) setComputedStyle(getComputedStyle(ref.current));\n }, [ref]);\n return /* @__PURE__ */ jsx(\n ScrollAreaScrollbarImpl,\n {\n \"data-orientation\": \"vertical\",\n ...scrollbarProps,\n ref: composeRefs,\n sizes,\n style: {\n top: 0,\n right: context.dir === \"ltr\" ? 0 : void 0,\n left: context.dir === \"rtl\" ? 0 : void 0,\n bottom: \"var(--radix-scroll-area-corner-height)\",\n [\"--radix-scroll-area-thumb-height\"]: getThumbSize(sizes) + \"px\",\n ...props.style\n },\n onThumbPointerDown: (pointerPos) => props.onThumbPointerDown(pointerPos.y),\n onDragScroll: (pointerPos) => props.onDragScroll(pointerPos.y),\n onWheelScroll: (event, maxScrollPos) => {\n if (context.viewport) {\n const scrollPos = context.viewport.scrollTop + event.deltaY;\n props.onWheelScroll(scrollPos);\n if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) {\n event.preventDefault();\n }\n }\n },\n onResize: () => {\n if (ref.current && context.viewport && computedStyle) {\n onSizesChange({\n content: context.viewport.scrollHeight,\n viewport: context.viewport.offsetHeight,\n scrollbar: {\n size: ref.current.clientHeight,\n paddingStart: toInt(computedStyle.paddingTop),\n paddingEnd: toInt(computedStyle.paddingBottom)\n }\n });\n }\n }\n }\n );\n});\nvar [ScrollbarProvider, useScrollbarContext] = createScrollAreaContext(SCROLLBAR_NAME);\nvar ScrollAreaScrollbarImpl = React2.forwardRef((props, forwardedRef) => {\n const {\n __scopeScrollArea,\n sizes,\n hasThumb,\n onThumbChange,\n onThumbPointerUp,\n onThumbPointerDown,\n onThumbPositionChange,\n onDragScroll,\n onWheelScroll,\n onResize,\n ...scrollbarProps\n } = props;\n const context = useScrollAreaContext(SCROLLBAR_NAME, __scopeScrollArea);\n const [scrollbar, setScrollbar] = React2.useState(null);\n const composeRefs = useComposedRefs(forwardedRef, (node) => setScrollbar(node));\n const rectRef = React2.useRef(null);\n const prevWebkitUserSelectRef = React2.useRef(\"\");\n const viewport = context.viewport;\n const maxScrollPos = sizes.content - sizes.viewport;\n const handleWheelScroll = useCallbackRef(onWheelScroll);\n const handleThumbPositionChange = useCallbackRef(onThumbPositionChange);\n const handleResize = useDebounceCallback(onResize, 10);\n function handleDragScroll(event) {\n if (rectRef.current) {\n const x = event.clientX - rectRef.current.left;\n const y = event.clientY - rectRef.current.top;\n onDragScroll({ x, y });\n }\n }\n React2.useEffect(() => {\n const handleWheel = (event) => {\n const element = event.target;\n const isScrollbarWheel = scrollbar?.contains(element);\n if (isScrollbarWheel) handleWheelScroll(event, maxScrollPos);\n };\n document.addEventListener(\"wheel\", handleWheel, { passive: false });\n return () => document.removeEventListener(\"wheel\", handleWheel, { passive: false });\n }, [viewport, scrollbar, maxScrollPos, handleWheelScroll]);\n React2.useEffect(handleThumbPositionChange, [sizes, handleThumbPositionChange]);\n useResizeObserver(scrollbar, handleResize);\n useResizeObserver(context.content, handleResize);\n return /* @__PURE__ */ jsx(\n ScrollbarProvider,\n {\n scope: __scopeScrollArea,\n scrollbar,\n hasThumb,\n onThumbChange: useCallbackRef(onThumbChange),\n onThumbPointerUp: useCallbackRef(onThumbPointerUp),\n onThumbPositionChange: handleThumbPositionChange,\n onThumbPointerDown: useCallbackRef(onThumbPointerDown),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...scrollbarProps,\n ref: composeRefs,\n style: { position: \"absolute\", ...scrollbarProps.style },\n onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {\n const mainPointer = 0;\n if (event.button === mainPointer) {\n const element = event.target;\n element.setPointerCapture(event.pointerId);\n rectRef.current = scrollbar.getBoundingClientRect();\n prevWebkitUserSelectRef.current = document.body.style.webkitUserSelect;\n document.body.style.webkitUserSelect = \"none\";\n if (context.viewport) context.viewport.style.scrollBehavior = \"auto\";\n handleDragScroll(event);\n }\n }),\n onPointerMove: composeEventHandlers(props.onPointerMove, handleDragScroll),\n onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {\n const element = event.target;\n if (element.hasPointerCapture(event.pointerId)) {\n element.releasePointerCapture(event.pointerId);\n }\n document.body.style.webkitUserSelect = prevWebkitUserSelectRef.current;\n if (context.viewport) context.viewport.style.scrollBehavior = \"\";\n rectRef.current = null;\n })\n }\n )\n }\n );\n});\nvar THUMB_NAME = \"ScrollAreaThumb\";\nvar ScrollAreaThumb = React2.forwardRef(\n (props, forwardedRef) => {\n const { forceMount, ...thumbProps } = props;\n const scrollbarContext = useScrollbarContext(THUMB_NAME, props.__scopeScrollArea);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || scrollbarContext.hasThumb, children: /* @__PURE__ */ jsx(ScrollAreaThumbImpl, { ref: forwardedRef, ...thumbProps }) });\n }\n);\nvar ScrollAreaThumbImpl = React2.forwardRef(\n (props, forwardedRef) => {\n const { __scopeScrollArea, style, ...thumbProps } = props;\n const scrollAreaContext = useScrollAreaContext(THUMB_NAME, __scopeScrollArea);\n const scrollbarContext = useScrollbarContext(THUMB_NAME, __scopeScrollArea);\n const { onThumbPositionChange } = scrollbarContext;\n const composedRef = useComposedRefs(\n forwardedRef,\n (node) => scrollbarContext.onThumbChange(node)\n );\n const removeUnlinkedScrollListenerRef = React2.useRef();\n const debounceScrollEnd = useDebounceCallback(() => {\n if (removeUnlinkedScrollListenerRef.current) {\n removeUnlinkedScrollListenerRef.current();\n removeUnlinkedScrollListenerRef.current = void 0;\n }\n }, 100);\n React2.useEffect(() => {\n const viewport = scrollAreaContext.viewport;\n if (viewport) {\n const handleScroll = () => {\n debounceScrollEnd();\n if (!removeUnlinkedScrollListenerRef.current) {\n const listener = addUnlinkedScrollListener(viewport, onThumbPositionChange);\n removeUnlinkedScrollListenerRef.current = listener;\n onThumbPositionChange();\n }\n };\n onThumbPositionChange();\n viewport.addEventListener(\"scroll\", handleScroll);\n return () => viewport.removeEventListener(\"scroll\", handleScroll);\n }\n }, [scrollAreaContext.viewport, debounceScrollEnd, onThumbPositionChange]);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": scrollbarContext.hasThumb ? \"visible\" : \"hidden\",\n ...thumbProps,\n ref: composedRef,\n style: {\n width: \"var(--radix-scroll-area-thumb-width)\",\n height: \"var(--radix-scroll-area-thumb-height)\",\n ...style\n },\n onPointerDownCapture: composeEventHandlers(props.onPointerDownCapture, (event) => {\n const thumb = event.target;\n const thumbRect = thumb.getBoundingClientRect();\n const x = event.clientX - thumbRect.left;\n const y = event.clientY - thumbRect.top;\n scrollbarContext.onThumbPointerDown({ x, y });\n }),\n onPointerUp: composeEventHandlers(props.onPointerUp, scrollbarContext.onThumbPointerUp)\n }\n );\n }\n);\nScrollAreaThumb.displayName = THUMB_NAME;\nvar CORNER_NAME = \"ScrollAreaCorner\";\nvar ScrollAreaCorner = React2.forwardRef(\n (props, forwardedRef) => {\n const context = useScrollAreaContext(CORNER_NAME, props.__scopeScrollArea);\n const hasBothScrollbarsVisible = Boolean(context.scrollbarX && context.scrollbarY);\n const hasCorner = context.type !== \"scroll\" && hasBothScrollbarsVisible;\n return hasCorner ? /* @__PURE__ */ jsx(ScrollAreaCornerImpl, { ...props, ref: forwardedRef }) : null;\n }\n);\nScrollAreaCorner.displayName = CORNER_NAME;\nvar ScrollAreaCornerImpl = React2.forwardRef((props, forwardedRef) => {\n const { __scopeScrollArea, ...cornerProps } = props;\n const context = useScrollAreaContext(CORNER_NAME, __scopeScrollArea);\n const [width, setWidth] = React2.useState(0);\n const [height, setHeight] = React2.useState(0);\n const hasSize = Boolean(width && height);\n useResizeObserver(context.scrollbarX, () => {\n const height2 = context.scrollbarX?.offsetHeight || 0;\n context.onCornerHeightChange(height2);\n setHeight(height2);\n });\n useResizeObserver(context.scrollbarY, () => {\n const width2 = context.scrollbarY?.offsetWidth || 0;\n context.onCornerWidthChange(width2);\n setWidth(width2);\n });\n return hasSize ? /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...cornerProps,\n ref: forwardedRef,\n style: {\n width,\n height,\n position: \"absolute\",\n right: context.dir === \"ltr\" ? 0 : void 0,\n left: context.dir === \"rtl\" ? 0 : void 0,\n bottom: 0,\n ...props.style\n }\n }\n ) : null;\n});\nfunction toInt(value) {\n return value ? parseInt(value, 10) : 0;\n}\nfunction getThumbRatio(viewportSize, contentSize) {\n const ratio = viewportSize / contentSize;\n return isNaN(ratio) ? 0 : ratio;\n}\nfunction getThumbSize(sizes) {\n const ratio = getThumbRatio(sizes.viewport, sizes.content);\n const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;\n const thumbSize = (sizes.scrollbar.size - scrollbarPadding) * ratio;\n return Math.max(thumbSize, 18);\n}\nfunction getScrollPositionFromPointer(pointerPos, pointerOffset, sizes, dir = \"ltr\") {\n const thumbSizePx = getThumbSize(sizes);\n const thumbCenter = thumbSizePx / 2;\n const offset = pointerOffset || thumbCenter;\n const thumbOffsetFromEnd = thumbSizePx - offset;\n const minPointerPos = sizes.scrollbar.paddingStart + offset;\n const maxPointerPos = sizes.scrollbar.size - sizes.scrollbar.paddingEnd - thumbOffsetFromEnd;\n const maxScrollPos = sizes.content - sizes.viewport;\n const scrollRange = dir === \"ltr\" ? [0, maxScrollPos] : [maxScrollPos * -1, 0];\n const interpolate = linearScale([minPointerPos, maxPointerPos], scrollRange);\n return interpolate(pointerPos);\n}\nfunction getThumbOffsetFromScroll(scrollPos, sizes, dir = \"ltr\") {\n const thumbSizePx = getThumbSize(sizes);\n const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;\n const scrollbar = sizes.scrollbar.size - scrollbarPadding;\n const maxScrollPos = sizes.content - sizes.viewport;\n const maxThumbPos = scrollbar - thumbSizePx;\n const scrollClampRange = dir === \"ltr\" ? [0, maxScrollPos] : [maxScrollPos * -1, 0];\n const scrollWithoutMomentum = clamp(scrollPos, scrollClampRange);\n const interpolate = linearScale([0, maxScrollPos], [0, maxThumbPos]);\n return interpolate(scrollWithoutMomentum);\n}\nfunction linearScale(input, output) {\n return (value) => {\n if (input[0] === input[1] || output[0] === output[1]) return output[0];\n const ratio = (output[1] - output[0]) / (input[1] - input[0]);\n return output[0] + ratio * (value - input[0]);\n };\n}\nfunction isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos) {\n return scrollPos > 0 && scrollPos < maxScrollPos;\n}\nvar addUnlinkedScrollListener = (node, handler = () => {\n}) => {\n let prevPosition = { left: node.scrollLeft, top: node.scrollTop };\n let rAF = 0;\n (function loop() {\n const position = { left: node.scrollLeft, top: node.scrollTop };\n const isHorizontalScroll = prevPosition.left !== position.left;\n const isVerticalScroll = prevPosition.top !== position.top;\n if (isHorizontalScroll || isVerticalScroll) handler();\n prevPosition = position;\n rAF = window.requestAnimationFrame(loop);\n })();\n return () => window.cancelAnimationFrame(rAF);\n};\nfunction useDebounceCallback(callback, delay) {\n const handleCallback = useCallbackRef(callback);\n const debounceTimerRef = React2.useRef(0);\n React2.useEffect(() => () => window.clearTimeout(debounceTimerRef.current), []);\n return React2.useCallback(() => {\n window.clearTimeout(debounceTimerRef.current);\n debounceTimerRef.current = window.setTimeout(handleCallback, delay);\n }, [handleCallback, delay]);\n}\nfunction useResizeObserver(element, onResize) {\n const handleResize = useCallbackRef(onResize);\n useLayoutEffect(() => {\n let rAF = 0;\n if (element) {\n const resizeObserver = new ResizeObserver(() => {\n cancelAnimationFrame(rAF);\n rAF = window.requestAnimationFrame(handleResize);\n });\n resizeObserver.observe(element);\n return () => {\n window.cancelAnimationFrame(rAF);\n resizeObserver.unobserve(element);\n };\n }\n }, [element, handleResize]);\n}\nvar Root = ScrollArea;\nvar Viewport = ScrollAreaViewport;\nvar Scrollbar = ScrollAreaScrollbar;\nvar Thumb = ScrollAreaThumb;\nvar Corner = ScrollAreaCorner;\nexport {\n Corner,\n Root,\n ScrollArea,\n ScrollAreaCorner,\n ScrollAreaScrollbar,\n ScrollAreaThumb,\n ScrollAreaViewport,\n Scrollbar,\n Thumb,\n Viewport,\n createScrollAreaScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["SCROLL_AREA_NAME","createScrollAreaContext","createScrollAreaScope","createContextScope","ScrollAreaProvider","useScrollAreaContext","ScrollArea","React2","forwardRef","props","forwardedRef","__scopeScrollArea","type","dir","scrollHideDelay","scrollAreaProps","scrollArea","setScrollArea","useState","viewport","setViewport","content","setContent","scrollbarX","setScrollbarX","scrollbarY","setScrollbarY","cornerWidth","setCornerWidth","cornerHeight","setCornerHeight","scrollbarXEnabled","setScrollbarXEnabled","scrollbarYEnabled","setScrollbarYEnabled","composedRefs","useComposedRefs","node","direction","useDirection","jsx","scope","onViewportChange","onContentChange","onScrollbarXChange","onScrollbarXEnabledChange","onScrollbarYChange","onScrollbarYEnabledChange","onCornerWidthChange","onCornerHeightChange","children","Primitive","div","ref","style","position","displayName","VIEWPORT_NAME","ScrollAreaViewport","nonce","viewportProps","context","useRef","jsxs","Fragment","dangerouslySetInnerHTML","__html","overflowX","overflowY","minWidth","display","SCROLLBAR_NAME","ScrollAreaScrollbar","forceMount","scrollbarProps","isHorizontal","orientation","useEffect","ScrollAreaScrollbarHover","ScrollAreaScrollbarScroll","ScrollAreaScrollbarAuto","ScrollAreaScrollbarVisible","visible","setVisible","hideTimer","handlePointerEnter","window","clearTimeout","handlePointerLeave","setTimeout","addEventListener","removeEventListener","Presence","present","debounceScrollEnd","useDebounceCallback","send","state","initialState","machine","hidden","SCROLL","scrolling","SCROLL_END","POINTER_ENTER","interacting","POINTER_LEAVE","idle","HIDE","React","useReducer","event","scrollDirection","prevScrollPos","handleScroll","scrollPos","onPointerEnter","composeEventHandlers","onPointerLeave","handleResize","isOverflowX","offsetWidth","scrollWidth","isOverflowY","offsetHeight","scrollHeight","useResizeObserver","thumbRef","pointerOffsetRef","sizes","setSizes","scrollbar","size","paddingStart","paddingEnd","thumbRatio","getThumbRatio","commonProps","onSizesChange","hasThumb","Boolean","onThumbChange","thumb","current","onThumbPointerUp","onThumbPointerDown","pointerPos","getScrollPosition","pointerOffset","thumbSizePx","getThumbSize","thumbCenter","offset","thumbOffsetFromEnd","minPointerPos","maxPointerPos","maxScrollPos","scrollRange","linearScale","interpolate","getScrollPositionFromPointer","ScrollAreaScrollbarX","onThumbPositionChange","getThumbOffsetFromScroll","scrollLeft","transform","onWheelScroll","onDragScroll","ScrollAreaScrollbarY","scrollTop","computedStyle","setComputedStyle","composeRefs","getComputedStyle","ScrollAreaScrollbarImpl","bottom","left","right","x","deltaX","isScrollingWithinScrollbarBounds","preventDefault","onResize","clientWidth","toInt","paddingLeft","paddingRight","top","y","deltaY","clientHeight","paddingTop","paddingBottom","ScrollbarProvider","useScrollbarContext","setScrollbar","rectRef","prevWebkitUserSelectRef","handleWheelScroll","useCallbackRef","handleThumbPositionChange","handleDragScroll","clientX","clientY","handleWheel","element","target","isScrollbarWheel","contains","document","passive","onPointerDown","button","setPointerCapture","pointerId","getBoundingClientRect","body","webkitUserSelect","scrollBehavior","onPointerMove","onPointerUp","hasPointerCapture","releasePointerCapture","THUMB_NAME","ScrollAreaThumb","thumbProps","scrollbarContext","ScrollAreaThumbImpl","scrollAreaContext","composedRef","removeUnlinkedScrollListenerRef","listener","addUnlinkedScrollListener","width","height","onPointerDownCapture","thumbRect","CORNER_NAME","ScrollAreaCorner","hasBothScrollbarsVisible","ScrollAreaCornerImpl","cornerProps","setWidth","setHeight","hasSize","height2","width2","value","parseInt","viewportSize","contentSize","ratio","isNaN","scrollbarPadding","thumbSize","Math","max","maxThumbPos","scrollWithoutMomentum","clamp","input","output","handler","prevPosition","rAF","loop","isHorizontalScroll","isVerticalScroll","requestAnimationFrame","cancelAnimationFrame","callback","delay","handleCallback","debounceTimerRef","useCallback","useLayoutEffect","resizeObserver","ResizeObserver","observe","unobserve","Root","Viewport","Scrollbar","Thumb","Corner"],"mappings":"4uBAyBA,IAAIA,EAAmB,cAClBC,EAAyBC,GAAyBC,EAAmBH,IACrEI,EAAoBC,GAAwBJ,EAAwBD,GACrEM,EAAaC,EAAOC,YACtB,CAACC,EAAOC,KACN,MAAMC,kBACJA,EAAiBC,KACjBA,EAAO,QAAOC,IACdA,EAAGC,gBACHA,EAAkB,OACfC,GACDN,GACGO,EAAYC,GAAiBV,EAAOW,SAAS,OAC7CC,EAAUC,GAAeb,EAAOW,SAAS,OACzCG,EAASC,GAAcf,EAAOW,SAAS,OACvCK,EAAYC,GAAiBjB,EAAOW,SAAS,OAC7CO,EAAYC,GAAiBnB,EAAOW,SAAS,OAC7CS,EAAaC,GAAkBrB,EAAOW,SAAS,IAC/CW,EAAcC,GAAmBvB,EAAOW,SAAS,IACjDa,EAAmBC,GAAwBzB,EAAOW,UAAS,IAC3De,EAAmBC,GAAwB3B,EAAOW,UAAS,GAC5DiB,EAAeC,EAAgB1B,GAAe2B,GAASpB,EAAcoB,KACrEC,EAAYC,EAAa1B,GAC/B,OAAuB2B,EACrBpC,EACA,CACEqC,MAAO9B,EACPC,OACAC,IAAKyB,EACLxB,kBACAE,aACAG,WACAuB,iBAAkBtB,EAClBC,UACAsB,gBAAiBrB,EACjBC,aACAqB,mBAAoBpB,EACpBO,oBACAc,0BAA2Bb,EAC3BP,aACAqB,mBAAoBpB,EACpBO,oBACAc,0BAA2Bb,EAC3Bc,oBAAqBpB,EACrBqB,qBAAsBnB,EACtBoB,SAA0BV,EACxBW,EAAUC,IACV,CACEvC,IAAKyB,KACFvB,EACHsC,IAAKlB,EAC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kI,EAAiBlI,QAAUzD,OAAOG,WAAWuL,EAAgBD,EAAM,GAClE,CAACC,EAAgBD,GACtB,CACA,SAASjJ,EAAkB+E,EAASvB,GAClC,MAAM/D,EAAegF,EAAejB,GACpC6F,GAAgB,KACd,IAAIX,EAAM,EACV,GAAI3D,EAAS,CACX,MAAMuE,EAAiB,IAAIC,gBAAe,KACxCR,qBAAqBL,GACrBA,EAAMlL,OAAOsL,sBAAsBrJ,EAAa,IAGlD,OADA6J,EAAeE,QAAQzE,GAChB,KACLvH,OAAOuL,qBAAqBL,GAC5BY,EAAeG,UAAU1E,EAAQ,CAEpC,IACA,CAACA,EAAStF,GACf,CACG,IAACiK,EAAOlR,EACPmR,EAAW/N,EACXgO,EAAYlN,EACZmN,EAAQ3D,EACR4D,EAAS9C"}
@@ -0,0 +1,2 @@
1
+ import*as e from"react";import{jsx as t}from"react/jsx-runtime";function o(o,r=[]){let c=[];const s=()=>{const t=c.map((t=>e.createContext(t)));return function(n){const r=n?.[o]||t;return e.useMemo((()=>({[`__scope${o}`]:{...n,[o]:r}})),[n,r])}};return s.scopeName=o,[function(n,r){const s=e.createContext(r),u=c.length;function i(n){const{scope:r,children:c,...i}=n,m=r?.[o][u]||s,p=e.useMemo((()=>i),Object.values(i));return t(m.Provider,{value:p,children:c})}return c=[...c,r],i.displayName=n+"Provider",[i,function(t,c){const i=c?.[o][u]||s,m=e.useContext(i);if(m)return m;if(void 0!==r)return r;throw new Error(`\`${t}\` must be used within \`${n}\``)}]},n(s,...r)]}function n(...t){const o=t[0];if(1===t.length)return o;const n=()=>{const n=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const r=n.reduce(((e,{useScope:o,scopeName:n})=>({...e,...o(t)[`__scope${n}`]})),{});return e.useMemo((()=>({[`__scope${o.scopeName}`]:r})),[r])}};return n.scopeName=o.scopeName,n}export{o as createContextScope};
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../../../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-context/dist/index.mjs"],"sourcesContent":["// packages/react/context/src/createContext.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = React.createContext(defaultContext);\n function Provider(props) {\n const { children, ...context } = props;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n }\n function useContext2(consumerName) {\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n Provider.displayName = rootComponentName + \"Provider\";\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = React.createContext(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n function Provider(props) {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName][index] || BaseContext;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n }\n function useContext2(consumerName, scope) {\n const Context = scope?.[scopeName][index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n Provider.displayName = rootComponentName + \"Provider\";\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\nexport {\n createContext2 as createContext,\n createContextScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createContextScope","scopeName","createContextScopeDeps","defaultContexts","createScope","scopeContexts","map","defaultContext","React","createContext","scope","contexts","useMemo","rootComponentName","BaseContext","index","length","Provider","props","children","context","Context","value","Object","values","jsx","displayName","consumerName","useContext","Error","composeContextScopes","scopes","baseScope","scopeHooks","createScope2","useScope","overrideScopes","nextScopes","reduce","nextScopes2"],"mappings":"gEAmBA,SAASA,EAAmBC,EAAWC,EAAyB,IAC9D,IAAIC,EAAkB,GAqBtB,MAAMC,EAAc,KAClB,MAAMC,EAAgBF,EAAgBG,KAAKC,GAClCC,EAAMC,cAAcF,KAE7B,OAAO,SAAkBG,GACvB,MAAMC,EAAWD,IAAQT,IAAcI,EACvC,OAAOG,EAAMI,SACX,KAAA,CAAS,CAAC,UAAUX,KAAc,IAAKS,EAAOT,CAACA,GAAYU,MAC3D,CAACD,EAAOC,GAEhB,CAAK,EAGH,OADAP,EAAYH,UAAYA,EACjB,CAjCP,SAAwBY,EAAmBN,GACzC,MAAMO,EAAcN,EAAMC,cAAcF,GAClCQ,EAAQZ,EAAgBa,OAE9B,SAASC,EAASC,GAChB,MAAMR,MAAEA,EAAKS,SAAEA,KAAaC,GAAYF,EAClCG,EAAUX,IAAQT,GAAWc,IAAUD,EACvCQ,EAAQd,EAAMI,SAAQ,IAAMQ,GAASG,OAAOC,OAAOJ,IACzD,OAAuBK,EAAIJ,EAAQJ,SAAU,CAAEK,QAAOH,YACvD,CASD,OAfAhB,EAAkB,IAAIA,EAAiBI,GAcvCU,EAASS,YAAcb,EAAoB,WACpC,CAACI,EARR,SAAqBU,EAAcjB,GACjC,MAAMW,EAAUX,IAAQT,GAAWc,IAAUD,EACvCM,EAAUZ,EAAMoB,WAAWP,GACjC,GAAID,EAAS,OAAOA,EACpB,QAAuB,IAAnBb,EAA2B,OAAOA,EACtC,MAAM,IAAIsB,MAAM,KAAKF,6BAAwCd,MAC9D,EAGF,EAcuBiB,EAAqB1B,KAAgBF,GAC/D,CACA,SAAS4B,KAAwBC,GAC/B,MAAMC,EAAYD,EAAO,GACzB,GAAsB,IAAlBA,EAAOf,OAAc,OAAOgB,EAChC,MAAM5B,EAAc,KAClB,MAAM6B,EAAaF,EAAOzB,KAAK4B,IAAkB,CAC/CC,SAAUD,IACVjC,UAAWiC,EAAajC,cAE1B,OAAO,SAA2BmC,GAChC,MAAMC,EAAaJ,EAAWK,QAAO,CAACC,GAAeJ,WAAUlC,gBAGtD,IAAKsC,KAFOJ,EAASC,GACI,UAAUnC,QAEzC,CAAE,GACL,OAAOO,EAAMI,SAAQ,MAAS,CAAC,UAAUoB,EAAU/B,aAAcoC,KAAe,CAACA,GACvF,CAAK,EAGH,OADAjC,EAAYH,UAAY+B,EAAU/B,UAC3BG,CACT"}
@@ -0,0 +1,2 @@
1
+ import*as e from"react";import*as n from"react-dom";import{useComposedRefs as t}from"../../../../../react-compose-refs/dist/index.mjs";import{useLayoutEffect as r}from"../../../../../react-use-layout-effect/dist/index.mjs";var o=o=>{const{present:i,children:s}=o,a=function(t){const[o,i]=e.useState(),s=e.useRef({}),a=e.useRef(t),c=e.useRef("none"),m=t?"mounted":"unmounted",[f,d]=function(n,t){return e.useReducer(((e,n)=>t[e][n]??e),n)}(m,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=u(s.current);c.current="mounted"===f?e:"none"}),[f]),r((()=>{const e=s.current,n=a.current;if(n!==t){const r=c.current,o=u(e);if(t)d("MOUNT");else if("none"===o||"none"===e?.display)d("UNMOUNT");else{d(n&&r!==o?"ANIMATION_OUT":"UNMOUNT")}a.current=t}}),[t,d]),r((()=>{if(o){const e=e=>{const t=u(s.current).includes(e.animationName);e.target===o&&t&&n.flushSync((()=>d("ANIMATION_END")))},t=e=>{e.target===o&&(c.current=u(s.current))};return o.addEventListener("animationstart",t),o.addEventListener("animationcancel",e),o.addEventListener("animationend",e),()=>{o.removeEventListener("animationstart",t),o.removeEventListener("animationcancel",e),o.removeEventListener("animationend",e)}}d("ANIMATION_END")}),[o,d]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:e.useCallback((e=>{e&&(s.current=getComputedStyle(e)),i(e)}),[])}}(i),c="function"==typeof s?s({present:a.isPresent}):e.Children.only(s),m=t(a.ref,function(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,t=n&&"isReactWarning"in n&&n.isReactWarning;if(t)return e.ref;if(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t)return e.props.ref;return e.props.ref||e.ref}(c));return"function"==typeof s||a.isPresent?e.cloneElement(c,{ref:m}):null};function u(e){return e?.animationName||"none"}o.displayName="Presence";export{o as Presence};
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../../../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-presence/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/presence/src/Presence.tsx\nimport * as React2 from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// packages/react/presence/src/useStateMachine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// packages/react/presence/src/Presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef({});\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(event.animationName);\n if (event.target === node && isCurrentAnimation) {\n ReactDOM.flushSync(() => send(\"ANIMATION_END\"));\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n if (node2) stylesRef.current = getComputedStyle(node2);\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Presence\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["Presence","props","present","children","presence","node","setNode","React2","useState","stylesRef","useRef","prevPresentRef","prevAnimationNameRef","initialState","state","send","machine","React","useReducer","event","useStateMachine","mounted","UNMOUNT","ANIMATION_OUT","unmountSuspended","MOUNT","ANIMATION_END","unmounted","useEffect","currentAnimationName","getAnimationName","current","useLayoutEffect","styles","wasPresent","prevAnimationName","display","handleAnimationEnd","isCurrentAnimation","includes","animationName","target","ReactDOM","flushSync","handleAnimationStart","addEventListener","removeEventListener","isPresent","ref","useCallback","node2","getComputedStyle","usePresence","child","Children","only","useComposedRefs","element","getter","Object","getOwnPropertyDescriptor","get","mayWarn","isReactWarning","getElementRef","cloneElement","displayName"],"mappings":"+NAkBG,IAACA,EAAYC,IACd,MAAMC,QAAEA,EAAOC,SAAEA,GAAaF,EACxBG,EAOR,SAAqBF,GACnB,MAAOG,EAAMC,GAAWC,EAAOC,WACzBC,EAAYF,EAAOG,OAAO,CAAE,GAC5BC,EAAiBJ,EAAOG,OAAOR,GAC/BU,EAAuBL,EAAOG,OAAO,QACrCG,EAAeX,EAAU,UAAY,aACpCY,EAAOC,GAvBhB,SAAyBF,EAAcG,GACrC,OAAOC,EAAMC,YAAW,CAACJ,EAAOK,IACZH,EAAQF,GAAOK,IACbL,GACnBD,EACL,CAkBwBO,CAAgBP,EAAc,CAClDQ,QAAS,CACPC,QAAS,YACTC,cAAe,oBAEjBC,iBAAkB,CAChBC,MAAO,UACPC,cAAe,aAEjBC,UAAW,CACTF,MAAO,aAuDX,OApDAlB,EAAOqB,WAAU,KACf,MAAMC,EAAuBC,EAAiBrB,EAAUsB,SACxDnB,EAAqBmB,QAAoB,YAAVjB,EAAsBe,EAAuB,MAAM,GACjF,CAACf,IACJkB,GAAgB,KACd,MAAMC,EAASxB,EAAUsB,QACnBG,EAAavB,EAAeoB,QAElC,GAD0BG,IAAehC,EAClB,CACrB,MAAMiC,EAAoBvB,EAAqBmB,QACzCF,EAAuBC,EAAiBG,GAC9C,GAAI/B,EACFa,EAAK,cACA,GAA6B,SAAzBc,GAAuD,SAApBI,GAAQG,QACpDrB,EAAK,eACA,CAGHA,EADEmB,GADgBC,IAAsBN,EAEnC,gBAEA,UAER,CACDlB,EAAeoB,QAAU7B,CAC1B,IACA,CAACA,EAASa,IACbiB,GAAgB,KACd,GAAI3B,EAAM,CACR,MAAMgC,EAAsBlB,IAC1B,MACMmB,EADuBR,EAAiBrB,EAAUsB,SACRQ,SAASpB,EAAMqB,eAC3DrB,EAAMsB,SAAWpC,G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AAc"}
@@ -1,2 +1,2 @@
1
- import*as r from"react";import{composeRefs as e}from"../../react-compose-refs/dist/index.mjs";import{j as n}from"../../../../_virtual/jsx-runtime.mjs";var t=r.forwardRef(((e,t)=>{const{children:l,...s}=e,c=r.Children.toArray(l),a=c.find(o);if(a){const e=a.props.children,l=c.map((n=>n===a?r.Children.count(e)>1?r.Children.only(null):r.isValidElement(e)?e.props.children:null:n));return n.jsx(i,{...s,ref:t,children:r.isValidElement(e)?r.cloneElement(e,void 0,l):null})}return n.jsx(i,{...s,ref:t,children:l})}));t.displayName="Slot";var i=r.forwardRef(((n,t)=>{const{children:i,...l}=n;if(r.isValidElement(i)){const n=function(r){let e=Object.getOwnPropertyDescriptor(r.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;if(n)return r.ref;if(e=Object.getOwnPropertyDescriptor(r,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n)return r.props.ref;return r.props.ref||r.ref}(i);return r.cloneElement(i,{...s(l,i.props),ref:t?e(t,n):n})}return r.Children.count(i)>1?r.Children.only(null):null}));i.displayName="SlotClone";var l=({children:r})=>n.jsx(n.Fragment,{children:r});function o(e){return r.isValidElement(e)&&e.type===l}function s(r,e){const n={...e};for(const t in e){const i=r[t],l=e[t];/^on[A-Z]/.test(t)?i&&l?n[t]=(...r)=>{l(...r),i(...r)}:i&&(n[t]=i):"style"===t?n[t]={...i,...l}:"className"===t&&(n[t]=[i,l].filter(Boolean).join(" "))}return{...r,...n}}export{t as Slot,l as Slottable};
1
+ import*as r from"react";import{composeRefs as e}from"../../react-compose-refs/dist/index.mjs";import{jsx as n,Fragment as t}from"react/jsx-runtime";var i=r.forwardRef(((e,t)=>{const{children:i,...o}=e,s=r.Children.toArray(i),a=s.find(c);if(a){const e=a.props.children,i=s.map((n=>n===a?r.Children.count(e)>1?r.Children.only(null):r.isValidElement(e)?e.props.children:null:n));return n(l,{...o,ref:t,children:r.isValidElement(e)?r.cloneElement(e,void 0,i):null})}return n(l,{...o,ref:t,children:i})}));i.displayName="Slot";var l=r.forwardRef(((n,t)=>{const{children:i,...l}=n;if(r.isValidElement(i)){const n=function(r){let e=Object.getOwnPropertyDescriptor(r.props,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning;if(n)return r.ref;if(e=Object.getOwnPropertyDescriptor(r,"ref")?.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n)return r.props.ref;return r.props.ref||r.ref}(i);return r.cloneElement(i,{...s(l,i.props),ref:t?e(t,n):n})}return r.Children.count(i)>1?r.Children.only(null):null}));l.displayName="SlotClone";var o=({children:r})=>n(t,{children:r});function c(e){return r.isValidElement(e)&&e.type===o}function s(r,e){const n={...e};for(const t in e){const i=r[t],l=e[t];/^on[A-Z]/.test(t)?i&&l?n[t]=(...r)=>{l(...r),i(...r)}:i&&(n[t]=i):"style"===t?n[t]={...i,...l}:"className"===t&&(n[t]=[i,l].filter(Boolean).join(" "))}return{...r,...n}}export{i as Slot,o as Slottable};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../../node_modules/@radix-ui/react-slot/dist/index.mjs"],"sourcesContent":["// packages/react/slot/src/Slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment, jsx } from \"react/jsx-runtime\";\nvar Slot = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n});\nSlot.displayName = \"Slot\";\nvar SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n return React.cloneElement(children, {\n ...mergeProps(slotProps, children.props),\n // @ts-ignore\n ref: forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef\n });\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n});\nSlotClone.displayName = \"SlotClone\";\nvar Slottable = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment, { children });\n};\nfunction isSlottable(child) {\n return React.isValidElement(child) && child.type === Slottable;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n childPropValue(...args);\n slotPropValue(...args);\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Slot;\nexport {\n Root,\n Slot,\n Slottable\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["Slot","React","forwardRef","props","forwardedRef","children","slotProps","childrenArray","Children","toArray","slottable","find","isSlottable","newElement","newChildren","map","child","count","only","isValidElement","jsx","SlotClone","ref","cloneElement","displayName","childrenRef","element","getter","Object","getOwnPropertyDescriptor","get","mayWarn","isReactWarning","getElementRef","mergeProps","composeRefs","Slottable","Fragment","type","childProps","overrideProps","propName","slotPropValue","childPropValue","test","args","filter","Boolean","join"],"mappings":"uJAIG,IAACA,EAAOC,EAAMC,YAAW,CAACC,EAAOC,KAClC,MAAMC,SAAEA,KAAaC,GAAcH,EAC7BI,EAAgBN,EAAMO,SAASC,QAAQJ,GACvCK,EAAYH,EAAcI,KAAKC,GACrC,GAAIF,EAAW,CACb,MAAMG,EAAaH,EAAUP,MAAME,SAC7BS,EAAcP,EAAcQ,KAAKC,GACjCA,IAAUN,EACRT,EAAMO,SAASS,MAAMJ,GAAc,EAAUZ,EAAMO,SAASU,KAAK,MAC9DjB,EAAMkB,eAAeN,GAAcA,EAAWV,MAAME,SAAW,KAE/DW,IAGX,OAAuBI,EAAGA,IAACC,EAAW,IAAKf,EAAWgB,IAAKlB,EAAcC,SAAUJ,EAAMkB,eAAeN,GAAcZ,EAAMsB,aAAaV,OAAY,EAAQC,GAAe,MAC7K,CACD,OAAuBM,EAAGA,IAACC,EAAW,IAAKf,EAAWgB,IAAKlB,EAAcC,YAAW,IAEtFL,EAAKwB,YAAc,OACnB,IAAIH,EAAYpB,EAAMC,YAAW,CAACC,EAAOC,KACvC,MAAMC,SAAEA,KAAaC,GAAcH,EACnC,GAAIF,EAAMkB,eAAed,GAAW,CAClC,MAAMoB,EAuCV,SAAuBC,GACrB,IAAIC,EAASC,OAAOC,yBAAyBH,EAAQvB,MAAO,QAAQ2B,IAChEC,EAAUJ,GAAU,mBAAoBA,GAAUA,EAAOK,eAC7D,GAAID,EACF,OAAOL,EAAQJ,IAIjB,GAFAK,EAASC,OAAOC,yBAAyBH,EAAS,QAAQI,IAC1DC,EAAUJ,GAAU,mBAAoBA,GAAUA,EAAOK,eACrDD,EACF,OAAOL,EAAQvB,MAAMmB,IAEvB,OAAOI,EAAQvB,MAAMmB,KAAOI,EAAQJ,GACtC,CAnDwBW,CAAc5B,GAClC,OAAOJ,EAAMsB,aAAalB,EAAU,IAC/B6B,EAAW5B,EAAWD,EAASF,OAElCmB,IAAKlB,EAAe+B,EAAY/B,EAAcqB,GAAeA,GAEhE,CACD,OAAOxB,EAAMO,SAASS,MAAMZ,GAAY,EAAIJ,EAAMO,SAASU,KAAK,MAAQ,IAAI,IAE9EG,EAAUG,YAAc,YACrB,IAACY,EAAY,EAAG/B,cACMe,MAAIiB,EAAAA,SAAU,CAAEhC,aAEzC,SAASO,EAAYI,GACnB,OAAOf,EAAMkB,eAAeH,IAAUA,EAAMsB,OAASF,CACvD,CACA,SAASF,EAAW5B,EAAWiC,GAC7B,MAAMC,EAAgB,IAAKD,GAC3B,IAAK,MAAME,KAAYF,EAAY,CACjC,MAAMG,EAAgBpC,EAAUmC,GAC1BE,EAAiBJ,EAAWE,GAChB,WAAWG,KAAKH,GAE5BC,GAAiBC,EACnBH,EAAcC,GAAY,IAAII,KAC5BF,KAAkBE,GAClBH,KAAiBG,EAAK,EAEfH,IACTF,EAAcC,GAAYC,GAEN,UAAbD,EACTD,EAAcC,GAAY,IAAKC,KAAkBC,GAC3B,cAAbF,IACTD,EAAcC,GAAY,CAACC,EAAeC,GAAgBG,OAAOC,SAASC,KAAK,KAElF,CACD,MAAO,IAAK1C,KAAckC,EAC5B"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../../../node_modules/@radix-ui/react-slot/dist/index.mjs"],"sourcesContent":["// packages/react/slot/src/Slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment, jsx } from \"react/jsx-runtime\";\nvar Slot = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n});\nSlot.displayName = \"Slot\";\nvar SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n return React.cloneElement(children, {\n ...mergeProps(slotProps, children.props),\n // @ts-ignore\n ref: forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef\n });\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n});\nSlotClone.displayName = \"SlotClone\";\nvar Slottable = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment, { children });\n};\nfunction isSlottable(child) {\n return React.isValidElement(child) && child.type === Slottable;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n childPropValue(...args);\n slotPropValue(...args);\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Slot;\nexport {\n Root,\n Slot,\n Slottable\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["Slot","React","forwardRef","props","forwardedRef","children","slotProps","childrenArray","Children","toArray","slottable","find","isSlottable","newElement","newChildren","map","child","count","only","isValidElement","jsx","SlotClone","ref","cloneElement","displayName","childrenRef","element","getter","Object","getOwnPropertyDescriptor","get","mayWarn","isReactWarning","getElementRef","mergeProps","composeRefs","Slottable","Fragment","type","childProps","overrideProps","propName","slotPropValue","childPropValue","test","args","filter","Boolean","join"],"mappings":"oJAIG,IAACA,EAAOC,EAAMC,YAAW,CAACC,EAAOC,KAClC,MAAMC,SAAEA,KAAaC,GAAcH,EAC7BI,EAAgBN,EAAMO,SAASC,QAAQJ,GACvCK,EAAYH,EAAcI,KAAKC,GACrC,GAAIF,EAAW,CACb,MAAMG,EAAaH,EAAUP,MAAME,SAC7BS,EAAcP,EAAcQ,KAAKC,GACjCA,IAAUN,EACRT,EAAMO,SAASS,MAAMJ,GAAc,EAAUZ,EAAMO,SAASU,KAAK,MAC9DjB,EAAMkB,eAAeN,GAAcA,EAAWV,MAAME,SAAW,KAE/DW,IAGX,OAAuBI,EAAIC,EAAW,IAAKf,EAAWgB,IAAKlB,EAAcC,SAAUJ,EAAMkB,eAAeN,GAAcZ,EAAMsB,aAAaV,OAAY,EAAQC,GAAe,MAC7K,CACD,OAAuBM,EAAIC,EAAW,IAAKf,EAAWgB,IAAKlB,EAAcC,YAAW,IAEtFL,EAAKwB,YAAc,OACnB,IAAIH,EAAYpB,EAAMC,YAAW,CAACC,EAAOC,KACvC,MAAMC,SAAEA,KAAaC,GAAcH,EACnC,GAAIF,EAAMkB,eAAed,GAAW,CAClC,MAAMoB,EAuCV,SAAuBC,GACrB,IAAIC,EAASC,OAAOC,yBAAyBH,EAAQvB,MAAO,QAAQ2B,IAChEC,EAAUJ,GAAU,mBAAoBA,GAAUA,EAAOK,eAC7D,GAAID,EACF,OAAOL,EAAQJ,IAIjB,GAFAK,EAASC,OAAOC,yBAAyBH,EAAS,QAAQI,IAC1DC,EAAUJ,GAAU,mBAAoBA,GAAUA,EAAOK,eACrDD,EACF,OAAOL,EAAQvB,MAAMmB,IAEvB,OAAOI,EAAQvB,MAAMmB,KAAOI,EAAQJ,GACtC,CAnDwBW,CAAc5B,GAClC,OAAOJ,EAAMsB,aAAalB,EAAU,IAC/B6B,EAAW5B,EAAWD,EAASF,OAElCmB,IAAKlB,EAAe+B,EAAY/B,EAAcqB,GAAeA,GAEhE,CACD,OAAOxB,EAAMO,SAASS,MAAMZ,GAAY,EAAIJ,EAAMO,SAASU,KAAK,MAAQ,IAAI,IAE9EG,EAAUG,YAAc,YACrB,IAACY,EAAY,EAAG/B,cACMe,EAAIiB,EAAU,CAAEhC,aAEzC,SAASO,EAAYI,GACnB,OAAOf,EAAMkB,eAAeH,IAAUA,EAAMsB,OAASF,CACvD,CACA,SAASF,EAAW5B,EAAWiC,GAC7B,MAAMC,EAAgB,IAAKD,GAC3B,IAAK,MAAME,KAAYF,EAAY,CACjC,MAAMG,EAAgBpC,EAAUmC,GAC1BE,EAAiBJ,EAAWE,GAChB,WAAWG,KAAKH,GAE5BC,GAAiBC,EACnBH,EAAcC,GAAY,IAAII,KAC5BF,KAAkBE,GAClBH,KAAiBG,EAAK,EAEfH,IACTF,EAAcC,GAAYC,GAEN,UAAbD,EACTD,EAAcC,GAAY,IAAKC,KAAkBC,GAC3B,cAAbF,IACTD,EAAcC,GAAY,CAACC,EAAeC,GAAgBG,OAAOC,SAASC,KAAK,KAElF,CACD,MAAO,IAAK1C,KAAckC,EAC5B"}
@@ -1,2 +1,2 @@
1
- import*as e from"react";import*as t from"react-dom";import{composeEventHandlers as r}from"../../primitive/dist/index.mjs";import{useComposedRefs as n}from"../../react-compose-refs/dist/index.mjs";import{createCollection as o}from"../../react-collection/dist/index.mjs";import{createContextScope as s}from"../../react-context/dist/index.mjs";import{Branch as i,Root as a}from"../../react-dismissable-layer/dist/index.mjs";import{Portal as c}from"../../react-portal/dist/index.mjs";import{Presence as d}from"../../react-presence/dist/index.mjs";import{Primitive as u,dispatchDiscreteCustomEvent as l}from"../../react-primitive/dist/index.mjs";import{useCallbackRef as p}from"../../react-use-callback-ref/dist/index.mjs";import{useControllableState as f}from"../../react-use-controllable-state/dist/index.mjs";import{useLayoutEffect as m}from"../../react-use-layout-effect/dist/index.mjs";import{VisuallyHidden as v}from"../../react-visually-hidden/dist/index.mjs";import{j as w}from"../../../../_virtual/jsx-runtime.mjs";var x="ToastProvider",[y,T,E]=o("Toast"),[h,g]=s("Toast",[E]),[b,C]=h(x),j=t=>{const{__scopeToast:r,label:n="Notification",duration:o=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:a}=t,[c,d]=e.useState(null),[u,l]=e.useState(0),p=e.useRef(!1),f=e.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${x}\`. Expected non-empty \`string\`.`),w.jsx(y.Provider,{scope:r,children:w.jsx(b,{scope:r,label:n,duration:o,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:c,onViewportChange:d,onToastAdd:e.useCallback((()=>l((e=>e+1))),[]),onToastRemove:e.useCallback((()=>l((e=>e-1))),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:f,children:a})})};j.displayName=x;var R="ToastViewport",P=["F8"],D="toast.viewportPause",L="toast.viewportResume",S=e.forwardRef(((t,r)=>{const{__scopeToast:o,hotkey:s=P,label:a="Notifications ({hotkey})",...c}=t,d=C(R,o),l=T(o),p=e.useRef(null),f=e.useRef(null),m=e.useRef(null),v=e.useRef(null),x=n(r,v,d.onViewportChange),E=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=d.toastCount>0;e.useEffect((()=>{const e=e=>{s.every((t=>e[t]||e.code===t))&&v.current?.focus()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[s]),e.useEffect((()=>{const e=p.current,t=v.current;if(h&&e&&t){const r=()=>{if(!d.isClosePausedRef.current){const e=new CustomEvent(D);t.dispatchEvent(e),d.isClosePausedRef.current=!0}},n=()=>{if(d.isClosePausedRef.current){const e=new CustomEvent(L);t.dispatchEvent(e),d.isClosePausedRef.current=!1}},o=t=>{!e.contains(t.relatedTarget)&&n()},s=()=>{e.contains(document.activeElement)||n()};return e.addEventListener("focusin",r),e.addEventListener("focusout",o),e.addEventListener("pointermove",r),e.addEventListener("pointerleave",s),window.addEventListener("blur",r),window.addEventListener("focus",n),()=>{e.removeEventListener("focusin",r),e.removeEventListener("focusout",o),e.removeEventListener("pointermove",r),e.removeEventListener("pointerleave",s),window.removeEventListener("blur",r),window.removeEventListener("focus",n)}}}),[h,d.isClosePausedRef]);const g=e.useCallback((({tabbingDirection:e})=>{const t=l().map((t=>{const r=t.ref.current,n=[r,...z(r)];return"forwards"===e?n:n.reverse()}));return("forwards"===e?t.reverse():t).flat()}),[l]);return e.useEffect((()=>{const e=v.current;if(e){const t=t=>{const r=t.altKey||t.ctrlKey||t.metaKey;if("Tab"===t.key&&!r){const r=document.activeElement,n=t.shiftKey;if(t.target===e&&n)return void f.current?.focus();const o=g({tabbingDirection:n?"backwards":"forwards"}),s=o.findIndex((e=>e===r));G(o.slice(s+1))?t.preventDefault():n?f.current?.focus():m.current?.focus()}};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)}}),[l,g]),w.jsxs(i,{ref:p,role:"region","aria-label":a.replace("{hotkey}",E),tabIndex:-1,style:{pointerEvents:h?void 0:"none"},children:[h&&w.jsx(F,{ref:f,onFocusFromOutsideViewport:()=>{G(g({tabbingDirection:"forwards"}))}}),w.jsx(y.Slot,{scope:o,children:w.jsx(u.ol,{tabIndex:-1,...c,ref:x})}),h&&w.jsx(F,{ref:m,onFocusFromOutsideViewport:()=>{G(g({tabbingDirection:"backwards"}))}})]})}));S.displayName=R;var _="ToastFocusProxy",F=e.forwardRef(((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...o}=e,s=C(_,r);return w.jsx(v,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:e=>{const t=e.relatedTarget;!s.viewport?.contains(t)&&n()}})}));F.displayName=_;var N="Toast",k=e.forwardRef(((e,t)=>{const{forceMount:n,open:o,defaultOpen:s,onOpenChange:i,...a}=e,[c=!0,u]=f({prop:o,defaultProp:s,onChange:i});return w.jsx(d,{present:n||c,children:w.jsx(M,{open:c,...a,ref:t,onClose:()=>u(!1),onPause:p(e.onPause),onResume:p(e.onResume),onSwipeStart:r(e.onSwipeStart,(e=>{e.currentTarget.setAttribute("data-swipe","start")})),onSwipeMove:r(e.onSwipeMove,(e=>{const{x:t,y:r}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","move"),e.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${t}px`),e.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${r}px`)})),onSwipeCancel:r(e.onSwipeCancel,(e=>{e.currentTarget.setAttribute("data-swipe","cancel"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")})),onSwipeEnd:r(e.onSwipeEnd,(e=>{const{x:t,y:r}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","end"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${t}px`),e.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${r}px`),u(!1)}))})})}));k.displayName=N;var[I,A]=h(N,{onClose(){}}),M=e.forwardRef(((o,s)=>{const{__scopeToast:i,type:c="foreground",duration:d,open:l,onClose:f,onEscapeKeyDown:m,onPause:v,onResume:x,onSwipeStart:T,onSwipeMove:E,onSwipeCancel:h,onSwipeEnd:g,...b}=o,j=C(N,i),[R,P]=e.useState(null),S=n(s,(e=>P(e))),_=e.useRef(null),F=e.useRef(null),k=d||j.duration,A=e.useRef(0),M=e.useRef(k),O=e.useRef(0),{onToastAdd:V,onToastRemove:$}=j,U=p((()=>{const e=R?.contains(document.activeElement);e&&j.viewport?.focus(),f()})),X=e.useCallback((e=>{e&&e!==1/0&&(window.clearTimeout(O.current),A.current=(new Date).getTime(),O.current=window.setTimeout(U,e))}),[U]);e.useEffect((()=>{const e=j.viewport;if(e){const t=()=>{X(M.current),x?.()},r=()=>{const e=(new Date).getTime()-A.current;M.current=M.current-e,window.clearTimeout(O.current),v?.()};return e.addEventListener(D,r),e.addEventListener(L,t),()=>{e.removeEventListener(D,r),e.removeEventListener(L,t)}}}),[j.viewport,k,v,x,X]),e.useEffect((()=>{l&&!j.isClosePausedRef.current&&X(k)}),[l,k,j.isClosePausedRef,X]),e.useEffect((()=>(V(),()=>$())),[V,$]);const q=e.useMemo((()=>R?W(R):null),[R]);return j.viewport?w.jsxs(w.Fragment,{children:[q&&w.jsx(K,{__scopeToast:i,role:"status","aria-live":"foreground"===c?"assertive":"polite","aria-atomic":!0,children:q}),w.jsx(I,{scope:i,onClose:U,children:t.createPortal(w.jsx(y.ItemSlot,{scope:i,children:w.jsx(a,{asChild:!0,onEscapeKeyDown:r(m,(()=>{j.isFocusedToastEscapeKeyDownRef.current||U(),j.isFocusedToastEscapeKeyDownRef.current=!1})),children:w.jsx(u.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":l?"open":"closed","data-swipe-direction":j.swipeDirection,...b,ref:S,style:{userSelect:"none",touchAction:"none",...o.style},onKeyDown:r(o.onKeyDown,(e=>{"Escape"===e.key&&(m?.(e.nativeEvent),e.nativeEvent.defaultPrevented||(j.isFocusedToastEscapeKeyDownRef.current=!0,U()))})),onPointerDown:r(o.onPointerDown,(e=>{0===e.button&&(_.current={x:e.clientX,y:e.clientY})})),onPointerMove:r(o.onPointerMove,(e=>{if(!_.current)return;const t=e.clientX-_.current.x,r=e.clientY-_.current.y,n=Boolean(F.current),o=["left","right"].includes(j.swipeDirection),s=["left","up"].includes(j.swipeDirection)?Math.min:Math.max,i=o?s(0,t):0,a=o?0:s(0,r),c="touch"===e.pointerType?10:2,d={x:i,y:a},u={originalEvent:e,delta:d};n?(F.current=d,Y("toast.swipeMove",E,u,{discrete:!1})):B(d,j.swipeDirection,c)?(F.current=d,Y("toast.swipeStart",T,u,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(r)>c)&&(_.current=null)})),onPointerUp:r(o.onPointerUp,(e=>{const t=F.current,r=e.target;if(r.hasPointerCapture(e.pointerId)&&r.releasePointerCapture(e.pointerId),F.current=null,_.current=null,t){const r=e.currentTarget,n={originalEvent:e,delta:t};B(t,j.swipeDirection,j.swipeThreshold)?Y("toast.swipeEnd",g,n,{discrete:!0}):Y("toast.swipeCancel",h,n,{discrete:!0}),r.addEventListener("click",(e=>e.preventDefault()),{once:!0})}}))})})}),j.viewport)})]}):null})),K=t=>{const{__scopeToast:r,children:n,...o}=t,s=C(N,r),[i,a]=e.useState(!1),[d,u]=e.useState(!1);return function(e=(()=>{})){const t=p(e);m((()=>{let e=0,r=0;return e=window.requestAnimationFrame((()=>r=window.requestAnimationFrame(t))),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(r)}}),[t])}((()=>a(!0))),e.useEffect((()=>{const e=window.setTimeout((()=>u(!0)),1e3);return()=>window.clearTimeout(e)}),[]),d?null:w.jsx(c,{asChild:!0,children:w.jsx(v,{...o,children:i&&w.jsxs(w.Fragment,{children:[s.label," ",n]})})})},O=e.forwardRef(((e,t)=>{const{__scopeToast:r,...n}=e;return w.jsx(u.div,{...n,ref:t})}));O.displayName="ToastTitle";var V=e.forwardRef(((e,t)=>{const{__scopeToast:r,...n}=e;return w.jsx(u.div,{...n,ref:t})}));V.displayName="ToastDescription";var $="ToastAction",U=e.forwardRef(((e,t)=>{const{altText:r,...n}=e;return r.trim()?w.jsx(H,{altText:r,asChild:!0,children:w.jsx(q,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${$}\`. Expected non-empty \`string\`.`),null)}));U.displayName=$;var X="ToastClose",q=e.forwardRef(((e,t)=>{const{__scopeToast:n,...o}=e,s=A(X,n);return w.jsx(H,{asChild:!0,children:w.jsx(u.button,{type:"button",...o,ref:t,onClick:r(e.onClick,s.onClose)})})}));q.displayName=X;var H=e.forwardRef(((e,t)=>{const{__scopeToast:r,altText:n,...o}=e;return w.jsx(u.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...o,ref:t})}));function W(e){const t=[];return Array.from(e.childNodes).forEach((e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),function(e){return e.nodeType===e.ELEMENT_NODE}(e)){const r=e.ariaHidden||e.hidden||"none"===e.style.display,n=""===e.dataset.radixToastAnnounceExclude;if(!r)if(n){const r=e.dataset.radixToastAnnounceAlt;r&&t.push(r)}else t.push(...W(e))}})),t}function Y(e,t,r,{discrete:n}){const o=r.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?l(o,s):o.dispatchEvent(s)}var B=(e,t,r=0)=>{const n=Math.abs(e.x),o=Math.abs(e.y),s=n>o;return"left"===t||"right"===t?s&&n>r:!s&&o>r};function z(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function G(e){const t=document.activeElement;return e.some((e=>e===t||(e.focus(),document.activeElement!==t)))}var J=j,Q=S,Z=k,ee=O,te=V,re=U;export{re as Action,te as Description,J as Provider,Z as Root,ee as Title,k as Toast,U as ToastAction,q as ToastClose,V as ToastDescription,j as ToastProvider,O as ToastTitle,S as ToastViewport,Q as Viewport,g as createToastScope};
1
+ import*as e from"react";import*as t from"react-dom";import{composeEventHandlers as r}from"../../primitive/dist/index.mjs";import{useComposedRefs as n}from"../../react-compose-refs/dist/index.mjs";import{createCollection as o}from"../../react-collection/dist/index.mjs";import{createContextScope as s}from"../../react-context/dist/index.mjs";import{Branch as i,Root as a}from"../../react-dismissable-layer/dist/index.mjs";import{Portal as c}from"../../react-portal/dist/index.mjs";import{Presence as d}from"../../react-presence/dist/index.mjs";import{Primitive as u,dispatchDiscreteCustomEvent as l}from"../../react-primitive/dist/index.mjs";import{useCallbackRef as p}from"../../react-use-callback-ref/dist/index.mjs";import{useControllableState as f}from"../../react-use-controllable-state/dist/index.mjs";import{useLayoutEffect as m}from"../../react-use-layout-effect/dist/index.mjs";import{VisuallyHidden as v}from"../../react-visually-hidden/dist/index.mjs";import{jsxs as w,jsx as y,Fragment as T}from"react/jsx-runtime";var E="ToastProvider",[x,h,b]=o("Toast"),[g,C]=s("Toast",[b]),[R,P]=g(E),D=t=>{const{__scopeToast:r,label:n="Notification",duration:o=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:a}=t,[c,d]=e.useState(null),[u,l]=e.useState(0),p=e.useRef(!1),f=e.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${E}\`. Expected non-empty \`string\`.`),y(x.Provider,{scope:r,children:y(R,{scope:r,label:n,duration:o,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:c,onViewportChange:d,onToastAdd:e.useCallback((()=>l((e=>e+1))),[]),onToastRemove:e.useCallback((()=>l((e=>e-1))),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:f,children:a})})};D.displayName=E;var L="ToastViewport",S=["F8"],_="toast.viewportPause",F="toast.viewportResume",N=e.forwardRef(((t,r)=>{const{__scopeToast:o,hotkey:s=S,label:a="Notifications ({hotkey})",...c}=t,d=P(L,o),l=h(o),p=e.useRef(null),f=e.useRef(null),m=e.useRef(null),v=e.useRef(null),T=n(r,v,d.onViewportChange),E=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=d.toastCount>0;e.useEffect((()=>{const e=e=>{0!==s.length&&s.every((t=>e[t]||e.code===t))&&v.current?.focus()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[s]),e.useEffect((()=>{const e=p.current,t=v.current;if(b&&e&&t){const r=()=>{if(!d.isClosePausedRef.current){const e=new CustomEvent(_);t.dispatchEvent(e),d.isClosePausedRef.current=!0}},n=()=>{if(d.isClosePausedRef.current){const e=new CustomEvent(F);t.dispatchEvent(e),d.isClosePausedRef.current=!1}},o=t=>{!e.contains(t.relatedTarget)&&n()},s=()=>{e.contains(document.activeElement)||n()};return e.addEventListener("focusin",r),e.addEventListener("focusout",o),e.addEventListener("pointermove",r),e.addEventListener("pointerleave",s),window.addEventListener("blur",r),window.addEventListener("focus",n),()=>{e.removeEventListener("focusin",r),e.removeEventListener("focusout",o),e.removeEventListener("pointermove",r),e.removeEventListener("pointerleave",s),window.removeEventListener("blur",r),window.removeEventListener("focus",n)}}}),[b,d.isClosePausedRef]);const g=e.useCallback((({tabbingDirection:e})=>{const t=l().map((t=>{const r=t.ref.current,n=[r,...J(r)];return"forwards"===e?n:n.reverse()}));return("forwards"===e?t.reverse():t).flat()}),[l]);return e.useEffect((()=>{const e=v.current;if(e){const t=t=>{const r=t.altKey||t.ctrlKey||t.metaKey;if("Tab"===t.key&&!r){const r=document.activeElement,n=t.shiftKey;if(t.target===e&&n)return void f.current?.focus();const o=g({tabbingDirection:n?"backwards":"forwards"}),s=o.findIndex((e=>e===r));Q(o.slice(s+1))?t.preventDefault():n?f.current?.focus():m.current?.focus()}};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)}}),[l,g]),w(i,{ref:p,role:"region","aria-label":a.replace("{hotkey}",E),tabIndex:-1,style:{pointerEvents:b?void 0:"none"},children:[b&&y(I,{ref:f,onFocusFromOutsideViewport:()=>{Q(g({tabbingDirection:"forwards"}))}}),y(x.Slot,{scope:o,children:y(u.ol,{tabIndex:-1,...c,ref:T})}),b&&y(I,{ref:m,onFocusFromOutsideViewport:()=>{Q(g({tabbingDirection:"backwards"}))}})]})}));N.displayName=L;var k="ToastFocusProxy",I=e.forwardRef(((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...o}=e,s=P(k,r);return y(v,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:e=>{const t=e.relatedTarget;!s.viewport?.contains(t)&&n()}})}));I.displayName=k;var A="Toast",M=e.forwardRef(((e,t)=>{const{forceMount:n,open:o,defaultOpen:s,onOpenChange:i,...a}=e,[c=!0,u]=f({prop:o,defaultProp:s,onChange:i});return y(d,{present:n||c,children:y(O,{open:c,...a,ref:t,onClose:()=>u(!1),onPause:p(e.onPause),onResume:p(e.onResume),onSwipeStart:r(e.onSwipeStart,(e=>{e.currentTarget.setAttribute("data-swipe","start")})),onSwipeMove:r(e.onSwipeMove,(e=>{const{x:t,y:r}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","move"),e.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${t}px`),e.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${r}px`)})),onSwipeCancel:r(e.onSwipeCancel,(e=>{e.currentTarget.setAttribute("data-swipe","cancel"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")})),onSwipeEnd:r(e.onSwipeEnd,(e=>{const{x:t,y:r}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","end"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${t}px`),e.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${r}px`),u(!1)}))})})}));M.displayName=A;var[K,j]=g(A,{onClose(){}}),O=e.forwardRef(((o,s)=>{const{__scopeToast:i,type:c="foreground",duration:d,open:l,onClose:f,onEscapeKeyDown:m,onPause:v,onResume:E,onSwipeStart:h,onSwipeMove:b,onSwipeCancel:g,onSwipeEnd:C,...R}=o,D=P(A,i),[L,S]=e.useState(null),N=n(s,(e=>S(e))),k=e.useRef(null),I=e.useRef(null),M=d||D.duration,j=e.useRef(0),O=e.useRef(M),$=e.useRef(0),{onToastAdd:U,onToastRemove:X}=D,q=p((()=>{const e=L?.contains(document.activeElement);e&&D.viewport?.focus(),f()})),H=e.useCallback((e=>{e&&e!==1/0&&(window.clearTimeout($.current),j.current=(new Date).getTime(),$.current=window.setTimeout(q,e))}),[q]);e.useEffect((()=>{const e=D.viewport;if(e){const t=()=>{H(O.current),E?.()},r=()=>{const e=(new Date).getTime()-j.current;O.current=O.current-e,window.clearTimeout($.current),v?.()};return e.addEventListener(_,r),e.addEventListener(F,t),()=>{e.removeEventListener(_,r),e.removeEventListener(F,t)}}}),[D.viewport,M,v,E,H]),e.useEffect((()=>{l&&!D.isClosePausedRef.current&&H(M)}),[l,M,D.isClosePausedRef,H]),e.useEffect((()=>(U(),()=>X())),[U,X]);const W=e.useMemo((()=>L?B(L):null),[L]);return D.viewport?w(T,{children:[W&&y(V,{__scopeToast:i,role:"status","aria-live":"foreground"===c?"assertive":"polite","aria-atomic":!0,children:W}),y(K,{scope:i,onClose:q,children:t.createPortal(y(x.ItemSlot,{scope:i,children:y(a,{asChild:!0,onEscapeKeyDown:r(m,(()=>{D.isFocusedToastEscapeKeyDownRef.current||q(),D.isFocusedToastEscapeKeyDownRef.current=!1})),children:y(u.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":l?"open":"closed","data-swipe-direction":D.swipeDirection,...R,ref:N,style:{userSelect:"none",touchAction:"none",...o.style},onKeyDown:r(o.onKeyDown,(e=>{"Escape"===e.key&&(m?.(e.nativeEvent),e.nativeEvent.defaultPrevented||(D.isFocusedToastEscapeKeyDownRef.current=!0,q()))})),onPointerDown:r(o.onPointerDown,(e=>{0===e.button&&(k.current={x:e.clientX,y:e.clientY})})),onPointerMove:r(o.onPointerMove,(e=>{if(!k.current)return;const t=e.clientX-k.current.x,r=e.clientY-k.current.y,n=Boolean(I.current),o=["left","right"].includes(D.swipeDirection),s=["left","up"].includes(D.swipeDirection)?Math.min:Math.max,i=o?s(0,t):0,a=o?0:s(0,r),c="touch"===e.pointerType?10:2,d={x:i,y:a},u={originalEvent:e,delta:d};n?(I.current=d,z("toast.swipeMove",b,u,{discrete:!1})):G(d,D.swipeDirection,c)?(I.current=d,z("toast.swipeStart",h,u,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(r)>c)&&(k.current=null)})),onPointerUp:r(o.onPointerUp,(e=>{const t=I.current,r=e.target;if(r.hasPointerCapture(e.pointerId)&&r.releasePointerCapture(e.pointerId),I.current=null,k.current=null,t){const r=e.currentTarget,n={originalEvent:e,delta:t};G(t,D.swipeDirection,D.swipeThreshold)?z("toast.swipeEnd",C,n,{discrete:!0}):z("toast.swipeCancel",g,n,{discrete:!0}),r.addEventListener("click",(e=>e.preventDefault()),{once:!0})}}))})})}),D.viewport)})]}):null})),V=t=>{const{__scopeToast:r,children:n,...o}=t,s=P(A,r),[i,a]=e.useState(!1),[d,u]=e.useState(!1);return function(e=()=>{}){const t=p(e);m((()=>{let e=0,r=0;return e=window.requestAnimationFrame((()=>r=window.requestAnimationFrame(t))),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(r)}}),[t])}((()=>a(!0))),e.useEffect((()=>{const e=window.setTimeout((()=>u(!0)),1e3);return()=>window.clearTimeout(e)}),[]),d?null:y(c,{asChild:!0,children:y(v,{...o,children:i&&w(T,{children:[s.label," ",n]})})})},$=e.forwardRef(((e,t)=>{const{__scopeToast:r,...n}=e;return y(u.div,{...n,ref:t})}));$.displayName="ToastTitle";var U=e.forwardRef(((e,t)=>{const{__scopeToast:r,...n}=e;return y(u.div,{...n,ref:t})}));U.displayName="ToastDescription";var X="ToastAction",q=e.forwardRef(((e,t)=>{const{altText:r,...n}=e;return r.trim()?y(Y,{altText:r,asChild:!0,children:y(W,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${X}\`. Expected non-empty \`string\`.`),null)}));q.displayName=X;var H="ToastClose",W=e.forwardRef(((e,t)=>{const{__scopeToast:n,...o}=e,s=j(H,n);return y(Y,{asChild:!0,children:y(u.button,{type:"button",...o,ref:t,onClick:r(e.onClick,s.onClose)})})}));W.displayName=H;var Y=e.forwardRef(((e,t)=>{const{__scopeToast:r,altText:n,...o}=e;return y(u.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...o,ref:t})}));function B(e){const t=[];return Array.from(e.childNodes).forEach((e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),function(e){return e.nodeType===e.ELEMENT_NODE}(e)){const r=e.ariaHidden||e.hidden||"none"===e.style.display,n=""===e.dataset.radixToastAnnounceExclude;if(!r)if(n){const r=e.dataset.radixToastAnnounceAlt;r&&t.push(r)}else t.push(...B(e))}})),t}function z(e,t,r,{discrete:n}){const o=r.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?l(o,s):o.dispatchEvent(s)}var G=(e,t,r=0)=>{const n=Math.abs(e.x),o=Math.abs(e.y),s=n>o;return"left"===t||"right"===t?s&&n>r:!s&&o>r};function J(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Q(e){const t=document.activeElement;return e.some((e=>e===t||(e.focus(),document.activeElement!==t)))}var Z=D,ee=N,te=M,re=$,ne=U,oe=q;export{oe as Action,ne as Description,Z as Provider,te as Root,re as Title,M as Toast,q as ToastAction,W as ToastClose,U as ToastDescription,D as ToastProvider,$ as ToastTitle,N as ToastViewport,ee as Viewport,C as createToastScope};
2
2
  //# sourceMappingURL=index.mjs.map