@arolariu/components 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (451) hide show
  1. package/CHANGELOG.md +89 -0
  2. package/EXAMPLES.md +2510 -0
  3. package/dist/components/ui/accordion.js +3 -3
  4. package/dist/components/ui/accordion.js.map +1 -1
  5. package/dist/components/ui/accordion_module.css.map +1 -1
  6. package/dist/components/ui/alert-dialog.d.ts +4 -16
  7. package/dist/components/ui/alert-dialog.d.ts.map +1 -1
  8. package/dist/components/ui/alert-dialog.js +21 -17
  9. package/dist/components/ui/alert-dialog.js.map +1 -1
  10. package/dist/components/ui/alert-dialog_module.css +1 -1
  11. package/dist/components/ui/alert-dialog_module.css.map +1 -1
  12. package/dist/components/ui/alert.js +4 -4
  13. package/dist/components/ui/alert.js.map +1 -1
  14. package/dist/components/ui/alert_module.css.map +1 -1
  15. package/dist/components/ui/aspect-ratio.js +2 -2
  16. package/dist/components/ui/aspect-ratio.js.map +1 -1
  17. package/dist/components/ui/aspect-ratio_module.css.map +1 -1
  18. package/dist/components/ui/async-boundary.js +2 -2
  19. package/dist/components/ui/async-boundary.js.map +1 -1
  20. package/dist/components/ui/avatar.d.ts +3 -12
  21. package/dist/components/ui/avatar.d.ts.map +1 -1
  22. package/dist/components/ui/avatar.js +18 -15
  23. package/dist/components/ui/avatar.js.map +1 -1
  24. package/dist/components/ui/avatar_module.css.map +1 -1
  25. package/dist/components/ui/background-beams.js +3 -3
  26. package/dist/components/ui/background-beams.js.map +1 -1
  27. package/dist/components/ui/background-beams_module.css.map +1 -1
  28. package/dist/components/ui/badge.js +2 -2
  29. package/dist/components/ui/badge.js.map +1 -1
  30. package/dist/components/ui/badge_module.css.map +1 -1
  31. package/dist/components/ui/breadcrumb.js +10 -10
  32. package/dist/components/ui/breadcrumb.js.map +1 -1
  33. package/dist/components/ui/breadcrumb_module.css.map +1 -1
  34. package/dist/components/ui/bubble-background.js +5 -5
  35. package/dist/components/ui/bubble-background.js.map +1 -1
  36. package/dist/components/ui/bubble-background_module.css.map +1 -1
  37. package/dist/components/ui/button-group.d.ts +1 -1
  38. package/dist/components/ui/button-group.d.ts.map +1 -1
  39. package/dist/components/ui/button-group.js +6 -6
  40. package/dist/components/ui/button-group.js.map +1 -1
  41. package/dist/components/ui/button-group_module.css.map +1 -1
  42. package/dist/components/ui/button.js +4 -4
  43. package/dist/components/ui/button.js.map +1 -1
  44. package/dist/components/ui/button_module.css.map +1 -1
  45. package/dist/components/ui/calendar.d.ts +3 -5
  46. package/dist/components/ui/calendar.d.ts.map +1 -1
  47. package/dist/components/ui/calendar.js +9 -9
  48. package/dist/components/ui/calendar.js.map +1 -1
  49. package/dist/components/ui/calendar_module.css.map +1 -1
  50. package/dist/components/ui/card-skeleton.js +2 -2
  51. package/dist/components/ui/card-skeleton.js.map +1 -1
  52. package/dist/components/ui/card-skeleton_module.css.map +1 -1
  53. package/dist/components/ui/card.js +8 -8
  54. package/dist/components/ui/card.js.map +1 -1
  55. package/dist/components/ui/card_module.css.map +1 -1
  56. package/dist/components/ui/carousel.d.ts.map +1 -1
  57. package/dist/components/ui/carousel.js +16 -16
  58. package/dist/components/ui/carousel.js.map +1 -1
  59. package/dist/components/ui/carousel_module.css +1 -1
  60. package/dist/components/ui/carousel_module.css.map +1 -1
  61. package/dist/components/ui/chart.d.ts +6 -3
  62. package/dist/components/ui/chart.d.ts.map +1 -1
  63. package/dist/components/ui/chart.js +70 -70
  64. package/dist/components/ui/chart.js.map +1 -1
  65. package/dist/components/ui/chart_module.css.map +1 -1
  66. package/dist/components/ui/checkbox-group.d.ts +2 -6
  67. package/dist/components/ui/checkbox-group.d.ts.map +1 -1
  68. package/dist/components/ui/checkbox-group.js +8 -7
  69. package/dist/components/ui/checkbox-group.js.map +1 -1
  70. package/dist/components/ui/checkbox-group_module.css.map +1 -1
  71. package/dist/components/ui/checkbox.d.ts +3 -1
  72. package/dist/components/ui/checkbox.d.ts.map +1 -1
  73. package/dist/components/ui/checkbox.js +6 -3
  74. package/dist/components/ui/checkbox.js.map +1 -1
  75. package/dist/components/ui/checkbox_module.css.map +1 -1
  76. package/dist/components/ui/collapsible.d.ts.map +1 -1
  77. package/dist/components/ui/collapsible.js +4 -4
  78. package/dist/components/ui/collapsible.js.map +1 -1
  79. package/dist/components/ui/collapsible_module.css.map +1 -1
  80. package/dist/components/ui/combobox.d.ts +335 -0
  81. package/dist/components/ui/combobox.d.ts.map +1 -0
  82. package/dist/components/ui/combobox.js +206 -0
  83. package/dist/components/ui/combobox.js.map +1 -0
  84. package/dist/components/ui/combobox.module.js +23 -0
  85. package/dist/components/ui/combobox.module.js.map +1 -0
  86. package/dist/components/ui/combobox_module.css +142 -0
  87. package/dist/components/ui/combobox_module.css.map +1 -0
  88. package/dist/components/ui/command.d.ts.map +1 -1
  89. package/dist/components/ui/command.js +62 -53
  90. package/dist/components/ui/command.js.map +1 -1
  91. package/dist/components/ui/command_module.css +1 -1
  92. package/dist/components/ui/command_module.css.map +1 -1
  93. package/dist/components/ui/context-menu.d.ts.map +1 -1
  94. package/dist/components/ui/context-menu.js +6 -6
  95. package/dist/components/ui/context-menu.js.map +1 -1
  96. package/dist/components/ui/context-menu_module.css.map +1 -1
  97. package/dist/components/ui/copy-button.js +6 -6
  98. package/dist/components/ui/copy-button.js.map +1 -1
  99. package/dist/components/ui/copy-button_module.css.map +1 -1
  100. package/dist/components/ui/counting-number.js +6 -6
  101. package/dist/components/ui/counting-number.js.map +1 -1
  102. package/dist/components/ui/counting-number_module.css.map +1 -1
  103. package/dist/components/ui/dialog.js +6 -6
  104. package/dist/components/ui/dialog.js.map +1 -1
  105. package/dist/components/ui/dialog_module.css +1 -1
  106. package/dist/components/ui/dialog_module.css.map +1 -1
  107. package/dist/components/ui/dot-background_module.css.map +1 -1
  108. package/dist/components/ui/drawer.d.ts.map +1 -1
  109. package/dist/components/ui/drawer.js +5 -5
  110. package/dist/components/ui/drawer.js.map +1 -1
  111. package/dist/components/ui/drawer_module.css.map +1 -1
  112. package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
  113. package/dist/components/ui/dropdown-menu.js +6 -6
  114. package/dist/components/ui/dropdown-menu.js.map +1 -1
  115. package/dist/components/ui/dropdown-menu_module.css.map +1 -1
  116. package/dist/components/ui/dropdrawer.d.ts +10 -16
  117. package/dist/components/ui/dropdrawer.d.ts.map +1 -1
  118. package/dist/components/ui/dropdrawer.js +73 -65
  119. package/dist/components/ui/dropdrawer.js.map +1 -1
  120. package/dist/components/ui/dropdrawer_module.css.map +1 -1
  121. package/dist/components/ui/empty.js +7 -7
  122. package/dist/components/ui/empty.js.map +1 -1
  123. package/dist/components/ui/empty_module.css.map +1 -1
  124. package/dist/components/ui/error-boundary.js +2 -2
  125. package/dist/components/ui/error-boundary.js.map +1 -1
  126. package/dist/components/ui/error-boundary_module.css.map +1 -1
  127. package/dist/components/ui/field.js +12 -12
  128. package/dist/components/ui/field.js.map +1 -1
  129. package/dist/components/ui/field_module.css.map +1 -1
  130. package/dist/components/ui/fireworks-background.js +6 -6
  131. package/dist/components/ui/fireworks-background.js.map +1 -1
  132. package/dist/components/ui/fireworks-background_module.css.map +1 -1
  133. package/dist/components/ui/flip-button.js +5 -5
  134. package/dist/components/ui/flip-button.js.map +1 -1
  135. package/dist/components/ui/flip-button_module.css.map +1 -1
  136. package/dist/components/ui/focus-scope.js +6 -6
  137. package/dist/components/ui/focus-scope.js.map +1 -1
  138. package/dist/components/ui/focus-scope_module.css.map +1 -1
  139. package/dist/components/ui/form-skeleton.js +2 -2
  140. package/dist/components/ui/form-skeleton.js.map +1 -1
  141. package/dist/components/ui/form-skeleton_module.css.map +1 -1
  142. package/dist/components/ui/form.d.ts +3 -3
  143. package/dist/components/ui/form.d.ts.map +1 -1
  144. package/dist/components/ui/form.js +13 -13
  145. package/dist/components/ui/form.js.map +1 -1
  146. package/dist/components/ui/form_module.css.map +1 -1
  147. package/dist/components/ui/gradient-background.js +2 -2
  148. package/dist/components/ui/gradient-background.js.map +1 -1
  149. package/dist/components/ui/gradient-background_module.css.map +1 -1
  150. package/dist/components/ui/gradient-text.js +2 -2
  151. package/dist/components/ui/gradient-text.js.map +1 -1
  152. package/dist/components/ui/gradient-text_module.css.map +1 -1
  153. package/dist/components/ui/highlight-text.js +4 -4
  154. package/dist/components/ui/highlight-text.js.map +1 -1
  155. package/dist/components/ui/highlight-text_module.css.map +1 -1
  156. package/dist/components/ui/hole-background.js +21 -21
  157. package/dist/components/ui/hole-background.js.map +1 -1
  158. package/dist/components/ui/hole-background_module.css.map +1 -1
  159. package/dist/components/ui/hover-card.js +3 -3
  160. package/dist/components/ui/hover-card.js.map +1 -1
  161. package/dist/components/ui/hover-card_module.css.map +1 -1
  162. package/dist/components/ui/input-group.js +7 -7
  163. package/dist/components/ui/input-group.js.map +1 -1
  164. package/dist/components/ui/input-group_module.css.map +1 -1
  165. package/dist/components/ui/input-otp.d.ts +3 -3
  166. package/dist/components/ui/input-otp.d.ts.map +1 -1
  167. package/dist/components/ui/input-otp.js +6 -6
  168. package/dist/components/ui/input-otp.js.map +1 -1
  169. package/dist/components/ui/input-otp_module.css.map +1 -1
  170. package/dist/components/ui/input.js +2 -2
  171. package/dist/components/ui/input.js.map +1 -1
  172. package/dist/components/ui/input_module.css.map +1 -1
  173. package/dist/components/ui/item.d.ts +1 -1
  174. package/dist/components/ui/item.d.ts.map +1 -1
  175. package/dist/components/ui/item.js +13 -13
  176. package/dist/components/ui/item.js.map +1 -1
  177. package/dist/components/ui/item_module.css.map +1 -1
  178. package/dist/components/ui/kbd.js +3 -3
  179. package/dist/components/ui/kbd.js.map +1 -1
  180. package/dist/components/ui/kbd_module.css.map +1 -1
  181. package/dist/components/ui/label.js +2 -2
  182. package/dist/components/ui/label.js.map +1 -1
  183. package/dist/components/ui/label_module.css.map +1 -1
  184. package/dist/components/ui/list-skeleton.js +2 -2
  185. package/dist/components/ui/list-skeleton.js.map +1 -1
  186. package/dist/components/ui/list-skeleton_module.css.map +1 -1
  187. package/dist/components/ui/loading-overlay.js +2 -2
  188. package/dist/components/ui/loading-overlay.js.map +1 -1
  189. package/dist/components/ui/loading-overlay_module.css.map +1 -1
  190. package/dist/components/ui/menubar.d.ts +11 -13
  191. package/dist/components/ui/menubar.d.ts.map +1 -1
  192. package/dist/components/ui/menubar.js +4 -4
  193. package/dist/components/ui/menubar.js.map +1 -1
  194. package/dist/components/ui/menubar_module.css.map +1 -1
  195. package/dist/components/ui/meter.d.ts +8 -24
  196. package/dist/components/ui/meter.d.ts.map +1 -1
  197. package/dist/components/ui/meter.js +23 -19
  198. package/dist/components/ui/meter.js.map +1 -1
  199. package/dist/components/ui/meter_module.css.map +1 -1
  200. package/dist/components/ui/navigation-menu.d.ts +3 -12
  201. package/dist/components/ui/navigation-menu.d.ts.map +1 -1
  202. package/dist/components/ui/navigation-menu.js +15 -12
  203. package/dist/components/ui/navigation-menu.js.map +1 -1
  204. package/dist/components/ui/navigation-menu_module.css +1 -1
  205. package/dist/components/ui/navigation-menu_module.css.map +1 -1
  206. package/dist/components/ui/number-field.d.ts +6 -12
  207. package/dist/components/ui/number-field.d.ts.map +1 -1
  208. package/dist/components/ui/number-field.js +3 -3
  209. package/dist/components/ui/number-field.js.map +1 -1
  210. package/dist/components/ui/number-field_module.css.map +1 -1
  211. package/dist/components/ui/pagination.js +8 -8
  212. package/dist/components/ui/pagination.js.map +1 -1
  213. package/dist/components/ui/pagination_module.css.map +1 -1
  214. package/dist/components/ui/popover.js +5 -5
  215. package/dist/components/ui/popover.js.map +1 -1
  216. package/dist/components/ui/popover_module.css.map +1 -1
  217. package/dist/components/ui/progress.d.ts +1 -4
  218. package/dist/components/ui/progress.d.ts.map +1 -1
  219. package/dist/components/ui/progress.js +10 -9
  220. package/dist/components/ui/progress.js.map +1 -1
  221. package/dist/components/ui/progress_module.css.map +1 -1
  222. package/dist/components/ui/radio-group.d.ts +2 -4
  223. package/dist/components/ui/radio-group.d.ts.map +1 -1
  224. package/dist/components/ui/radio-group.js +3 -3
  225. package/dist/components/ui/radio-group.js.map +1 -1
  226. package/dist/components/ui/radio-group_module.css.map +1 -1
  227. package/dist/components/ui/resizable.d.ts +13 -29
  228. package/dist/components/ui/resizable.d.ts.map +1 -1
  229. package/dist/components/ui/resizable.js +8 -7
  230. package/dist/components/ui/resizable.js.map +1 -1
  231. package/dist/components/ui/resizable_module.css.map +1 -1
  232. package/dist/components/ui/ripple-button.js +9 -9
  233. package/dist/components/ui/ripple-button.js.map +1 -1
  234. package/dist/components/ui/ripple-button_module.css.map +1 -1
  235. package/dist/components/ui/scratcher.d.ts +1 -1
  236. package/dist/components/ui/scratcher.d.ts.map +1 -1
  237. package/dist/components/ui/scratcher.js +5 -4
  238. package/dist/components/ui/scratcher.js.map +1 -1
  239. package/dist/components/ui/scratcher_module.css.map +1 -1
  240. package/dist/components/ui/scroll-area.d.ts +2 -4
  241. package/dist/components/ui/scroll-area.d.ts.map +1 -1
  242. package/dist/components/ui/scroll-area.js +2 -2
  243. package/dist/components/ui/scroll-area.js.map +1 -1
  244. package/dist/components/ui/scroll-area_module.css.map +1 -1
  245. package/dist/components/ui/select.js +4 -4
  246. package/dist/components/ui/select.js.map +1 -1
  247. package/dist/components/ui/select_module.css.map +1 -1
  248. package/dist/components/ui/separator.d.ts +1 -4
  249. package/dist/components/ui/separator.d.ts.map +1 -1
  250. package/dist/components/ui/separator.js +9 -8
  251. package/dist/components/ui/separator.js.map +1 -1
  252. package/dist/components/ui/separator_module.css.map +1 -1
  253. package/dist/components/ui/sheet.d.ts.map +1 -1
  254. package/dist/components/ui/sheet.js +6 -6
  255. package/dist/components/ui/sheet.js.map +1 -1
  256. package/dist/components/ui/sheet_module.css.map +1 -1
  257. package/dist/components/ui/sidebar.d.ts +1 -1
  258. package/dist/components/ui/sidebar.d.ts.map +1 -1
  259. package/dist/components/ui/sidebar.js +36 -36
  260. package/dist/components/ui/sidebar.js.map +1 -1
  261. package/dist/components/ui/sidebar_module.css.map +1 -1
  262. package/dist/components/ui/skeleton.js +2 -2
  263. package/dist/components/ui/skeleton.js.map +1 -1
  264. package/dist/components/ui/skeleton_module.css.map +1 -1
  265. package/dist/components/ui/slider.js +2 -2
  266. package/dist/components/ui/slider.js.map +1 -1
  267. package/dist/components/ui/slider_module.css.map +1 -1
  268. package/dist/components/ui/spinner.js +2 -2
  269. package/dist/components/ui/spinner.js.map +1 -1
  270. package/dist/components/ui/spinner_module.css.map +1 -1
  271. package/dist/components/ui/stepper.js +2 -2
  272. package/dist/components/ui/stepper.js.map +1 -1
  273. package/dist/components/ui/stepper_module.css.map +1 -1
  274. package/dist/components/ui/switch.js +2 -2
  275. package/dist/components/ui/switch.js.map +1 -1
  276. package/dist/components/ui/switch_module.css.map +1 -1
  277. package/dist/components/ui/table-skeleton.js +2 -2
  278. package/dist/components/ui/table-skeleton.js.map +1 -1
  279. package/dist/components/ui/table-skeleton_module.css.map +1 -1
  280. package/dist/components/ui/table.js +9 -9
  281. package/dist/components/ui/table.js.map +1 -1
  282. package/dist/components/ui/table_module.css.map +1 -1
  283. package/dist/components/ui/tabs.js +3 -3
  284. package/dist/components/ui/tabs.js.map +1 -1
  285. package/dist/components/ui/tabs_module.css.map +1 -1
  286. package/dist/components/ui/textarea.js +2 -2
  287. package/dist/components/ui/textarea.js.map +1 -1
  288. package/dist/components/ui/textarea_module.css.map +1 -1
  289. package/dist/components/ui/timeline.js +5 -5
  290. package/dist/components/ui/timeline.js.map +1 -1
  291. package/dist/components/ui/timeline_module.css.map +1 -1
  292. package/dist/components/ui/{sonner.d.ts → toast.d.ts} +15 -6
  293. package/dist/components/ui/toast.d.ts.map +1 -0
  294. package/dist/components/ui/{sonner.js → toast.js} +43 -42
  295. package/dist/components/ui/toast.js.map +1 -0
  296. package/dist/components/ui/toast.module.js +34 -0
  297. package/dist/components/ui/toast.module.js.map +1 -0
  298. package/dist/components/ui/{sonner_module.css → toast_module.css} +35 -35
  299. package/dist/components/ui/toast_module.css.map +1 -0
  300. package/dist/components/ui/toggle-group.d.ts +2 -8
  301. package/dist/components/ui/toggle-group.d.ts.map +1 -1
  302. package/dist/components/ui/toggle-group.js +14 -12
  303. package/dist/components/ui/toggle-group.js.map +1 -1
  304. package/dist/components/ui/toggle-group_module.css.map +1 -1
  305. package/dist/components/ui/toggle.js +2 -2
  306. package/dist/components/ui/toggle.js.map +1 -1
  307. package/dist/components/ui/toggle_module.css.map +1 -1
  308. package/dist/components/ui/toolbar.d.ts +10 -30
  309. package/dist/components/ui/toolbar.d.ts.map +1 -1
  310. package/dist/components/ui/toolbar.js +28 -23
  311. package/dist/components/ui/toolbar.js.map +1 -1
  312. package/dist/components/ui/toolbar_module.css.map +1 -1
  313. package/dist/components/ui/tooltip.js +4 -4
  314. package/dist/components/ui/tooltip.js.map +1 -1
  315. package/dist/components/ui/tooltip_module.css.map +1 -1
  316. package/dist/components/ui/typewriter.js +4 -4
  317. package/dist/components/ui/typewriter.js.map +1 -1
  318. package/dist/components/ui/typewriter_module.css.map +1 -1
  319. package/dist/components/ui/visually-hidden.js +2 -2
  320. package/dist/components/ui/visually-hidden.js.map +1 -1
  321. package/dist/components/ui/visually-hidden_module.css.map +1 -1
  322. package/dist/hooks/useAnnounce.js +5 -5
  323. package/dist/hooks/useAnnounce.js.map +1 -1
  324. package/dist/hooks/useClipboard.d.ts +77 -0
  325. package/dist/hooks/useClipboard.d.ts.map +1 -0
  326. package/dist/hooks/useClipboard.js +42 -0
  327. package/dist/hooks/useClipboard.js.map +1 -0
  328. package/dist/hooks/useControllableState.d.ts +54 -0
  329. package/dist/hooks/useControllableState.d.ts.map +1 -0
  330. package/dist/hooks/useControllableState.js +29 -0
  331. package/dist/hooks/useControllableState.js.map +1 -0
  332. package/dist/hooks/useDebounce.d.ts +33 -0
  333. package/dist/hooks/useDebounce.d.ts.map +1 -0
  334. package/dist/hooks/useDebounce.js +20 -0
  335. package/dist/hooks/useDebounce.js.map +1 -0
  336. package/dist/hooks/useEventCallback.d.ts +34 -0
  337. package/dist/hooks/useEventCallback.d.ts.map +1 -0
  338. package/dist/hooks/useEventCallback.js +12 -0
  339. package/dist/hooks/useEventCallback.js.map +1 -0
  340. package/dist/hooks/useFocusManager.js +6 -6
  341. package/dist/hooks/useFocusManager.js.map +1 -1
  342. package/dist/hooks/useFocusVisible.js +5 -5
  343. package/dist/hooks/useFocusVisible.js.map +1 -1
  344. package/dist/hooks/useId.d.ts +30 -0
  345. package/dist/hooks/useId.d.ts.map +1 -0
  346. package/dist/hooks/useId.js +9 -0
  347. package/dist/hooks/useId.js.map +1 -0
  348. package/dist/hooks/useIntersectionObserver.d.ts +51 -0
  349. package/dist/hooks/useIntersectionObserver.d.ts.map +1 -0
  350. package/dist/hooks/useIntersectionObserver.js +25 -0
  351. package/dist/hooks/useIntersectionObserver.js.map +1 -0
  352. package/dist/hooks/useInterval.d.ts +55 -0
  353. package/dist/hooks/useInterval.d.ts.map +1 -0
  354. package/dist/hooks/useInterval.js +24 -0
  355. package/dist/hooks/useInterval.js.map +1 -0
  356. package/dist/hooks/useLocalStorage.d.ts +43 -0
  357. package/dist/hooks/useLocalStorage.d.ts.map +1 -0
  358. package/dist/hooks/useLocalStorage.js +53 -0
  359. package/dist/hooks/useLocalStorage.js.map +1 -0
  360. package/dist/hooks/useMediaQuery.js +3 -3
  361. package/dist/hooks/useMediaQuery.js.map +1 -1
  362. package/dist/hooks/useMergedRefs.d.ts +27 -0
  363. package/dist/hooks/useMergedRefs.d.ts.map +1 -0
  364. package/dist/hooks/useMergedRefs.js +11 -0
  365. package/dist/hooks/useMergedRefs.js.map +1 -0
  366. package/dist/hooks/useOnClickOutside.d.ts +32 -0
  367. package/dist/hooks/useOnClickOutside.d.ts.map +1 -0
  368. package/dist/hooks/useOnClickOutside.js +23 -0
  369. package/dist/hooks/useOnClickOutside.js.map +1 -0
  370. package/dist/hooks/usePrevious.d.ts +33 -0
  371. package/dist/hooks/usePrevious.d.ts.map +1 -0
  372. package/dist/hooks/usePrevious.js +14 -0
  373. package/dist/hooks/usePrevious.js.map +1 -0
  374. package/dist/hooks/useThrottle.d.ts +37 -0
  375. package/dist/hooks/useThrottle.d.ts.map +1 -0
  376. package/dist/hooks/useThrottle.js +34 -0
  377. package/dist/hooks/useThrottle.js.map +1 -0
  378. package/dist/hooks/useTimeout.d.ts +28 -0
  379. package/dist/hooks/useTimeout.d.ts.map +1 -0
  380. package/dist/hooks/useTimeout.js +24 -0
  381. package/dist/hooks/useTimeout.js.map +1 -0
  382. package/dist/index.css.map +1 -1
  383. package/dist/index.d.ts +17 -3
  384. package/dist/index.d.ts.map +1 -1
  385. package/dist/index.js +15 -1
  386. package/dist/lib/utilities.d.ts +2 -3
  387. package/dist/lib/utilities.d.ts.map +1 -1
  388. package/dist/lib/utilities.js.map +1 -1
  389. package/dist/motion/Collapse.js +2 -2
  390. package/dist/motion/Collapse.js.map +1 -1
  391. package/dist/motion/Collapse_module.css.map +1 -1
  392. package/dist/motion/tokens.js +5 -5
  393. package/dist/motion/tokens.js.map +1 -1
  394. package/package.json +88 -10
  395. package/src/components/ui/alert-dialog.tsx +15 -8
  396. package/src/components/ui/avatar.tsx +9 -6
  397. package/src/components/ui/calendar.tsx +9 -14
  398. package/src/components/ui/carousel.tsx +2 -0
  399. package/src/components/ui/chart.tsx +65 -62
  400. package/src/components/ui/checkbox-group.tsx +4 -5
  401. package/src/components/ui/checkbox.tsx +10 -2
  402. package/src/components/ui/collapsible.tsx +1 -0
  403. package/src/components/ui/combobox.module.css +158 -0
  404. package/src/components/ui/combobox.tsx +569 -0
  405. package/src/components/ui/command.tsx +31 -15
  406. package/src/components/ui/context-menu.tsx +3 -0
  407. package/src/components/ui/drawer.tsx +2 -0
  408. package/src/components/ui/dropdown-menu.tsx +3 -0
  409. package/src/components/ui/dropdrawer.tsx +80 -62
  410. package/src/components/ui/form.tsx +28 -3
  411. package/src/components/ui/input-otp.tsx +3 -3
  412. package/src/components/ui/menubar.tsx +9 -10
  413. package/src/components/ui/meter.tsx +16 -17
  414. package/src/components/ui/navigation-menu.tsx +41 -33
  415. package/src/components/ui/number-field.tsx +6 -13
  416. package/src/components/ui/progress.tsx +3 -2
  417. package/src/components/ui/radio-group.tsx +2 -5
  418. package/src/components/ui/resizable.tsx +15 -18
  419. package/src/components/ui/scratcher.tsx +6 -10
  420. package/src/components/ui/scroll-area.tsx +2 -5
  421. package/src/components/ui/separator.tsx +4 -3
  422. package/src/components/ui/sheet.tsx +3 -0
  423. package/src/components/ui/sidebar.tsx +1 -0
  424. package/src/components/ui/{sonner.module.css → toast.module.css} +1 -1
  425. package/src/components/ui/{sonner.tsx → toast.tsx} +22 -14
  426. package/src/components/ui/toggle-group.tsx +6 -4
  427. package/src/components/ui/toolbar.tsx +20 -21
  428. package/src/hooks/useClipboard.tsx +137 -0
  429. package/src/hooks/useControllableState.tsx +81 -0
  430. package/src/hooks/useDebounce.tsx +50 -0
  431. package/src/hooks/useEventCallback.tsx +47 -0
  432. package/src/hooks/useId.tsx +36 -0
  433. package/src/hooks/useIntersectionObserver.tsx +81 -0
  434. package/src/hooks/useInterval.tsx +80 -0
  435. package/src/hooks/useLocalStorage.tsx +111 -0
  436. package/src/hooks/useMergedRefs.tsx +48 -0
  437. package/src/hooks/useOnClickOutside.tsx +55 -0
  438. package/src/hooks/usePrevious.tsx +44 -0
  439. package/src/hooks/useThrottle.tsx +78 -0
  440. package/src/hooks/useTimeout.tsx +51 -0
  441. package/src/index.ts +27 -4
  442. package/src/lib/utilities.ts +4 -4
  443. package/src/motion/tokens.ts +4 -4
  444. package/src/stories/DesignPrinciples.mdx +48 -0
  445. package/src/stories/GettingStarted.mdx +92 -0
  446. package/src/stories/Welcome.mdx +44 -0
  447. package/dist/components/ui/sonner.d.ts.map +0 -1
  448. package/dist/components/ui/sonner.js.map +0 -1
  449. package/dist/components/ui/sonner.module.js +0 -34
  450. package/dist/components/ui/sonner.module.js.map +0 -1
  451. package/dist/components/ui/sonner_module.css.map +0 -1
@@ -8,13 +8,6 @@ import * as React from "react";
8
8
  import {cn} from "@/lib/utilities";
9
9
  import styles from "./number-field.module.css";
10
10
 
11
- type NumberFieldProps = React.ComponentPropsWithRef<typeof BaseNumberField.Root>;
12
- type NumberFieldGroupProps = React.ComponentPropsWithRef<typeof BaseNumberField.Group>;
13
- type NumberFieldInputProps = React.ComponentPropsWithRef<typeof BaseNumberField.Input>;
14
- type NumberFieldIncrementProps = React.ComponentPropsWithRef<typeof BaseNumberField.Increment>;
15
- type NumberFieldDecrementProps = React.ComponentPropsWithRef<typeof BaseNumberField.Decrement>;
16
- type NumberFieldScrubAreaProps = React.ComponentPropsWithRef<typeof BaseNumberField.ScrubArea>;
17
-
18
11
  /**
19
12
  * Provides a styled numeric input with optional steppers and scrub support.
20
13
  *
@@ -210,37 +203,37 @@ function NumberFieldScrubArea(props: Readonly<NumberFieldScrubArea.Props>): Reac
210
203
 
211
204
  // eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
212
205
  namespace NumberField {
213
- export type Props = NumberFieldProps;
206
+ export type Props = React.ComponentPropsWithRef<typeof BaseNumberField.Root>;
214
207
  export type State = BaseNumberField.Root.State;
215
208
  }
216
209
 
217
210
  // eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
218
211
  namespace NumberFieldGroup {
219
- export type Props = NumberFieldGroupProps;
212
+ export type Props = React.ComponentPropsWithRef<typeof BaseNumberField.Group>;
220
213
  export type State = BaseNumberField.Group.State;
221
214
  }
222
215
 
223
216
  // eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
224
217
  namespace NumberFieldInput {
225
- export type Props = NumberFieldInputProps;
218
+ export type Props = React.ComponentPropsWithRef<typeof BaseNumberField.Input>;
226
219
  export type State = BaseNumberField.Input.State;
227
220
  }
228
221
 
229
222
  // eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
230
223
  namespace NumberFieldIncrement {
231
- export type Props = NumberFieldIncrementProps;
224
+ export type Props = React.ComponentPropsWithRef<typeof BaseNumberField.Increment>;
232
225
  export type State = BaseNumberField.Increment.State;
233
226
  }
234
227
 
235
228
  // eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
236
229
  namespace NumberFieldDecrement {
237
- export type Props = NumberFieldDecrementProps;
230
+ export type Props = React.ComponentPropsWithRef<typeof BaseNumberField.Decrement>;
238
231
  export type State = BaseNumberField.Decrement.State;
239
232
  }
240
233
 
241
234
  // eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
242
235
  namespace NumberFieldScrubArea {
243
- export type Props = NumberFieldScrubAreaProps;
236
+ export type Props = React.ComponentPropsWithRef<typeof BaseNumberField.ScrubArea>;
244
237
  export type State = BaseNumberField.ScrubArea.State;
245
238
  }
246
239
 
@@ -33,13 +33,14 @@ export interface ProgressProps extends Omit<React.ComponentPropsWithRef<typeof B
33
33
  *
34
34
  * @see {@link https://base-ui.com/react/components/progress | Base UI Documentation}
35
35
  */
36
- function Progress(props: Readonly<Progress.Props>): React.ReactElement {
36
+ const Progress = React.forwardRef<HTMLDivElement, Progress.Props>(function Progress(props, forwardedRef) {
37
37
  const {className, render, value = 0, ...otherProps} = props;
38
38
 
39
39
  return (
40
40
  <BaseProgress.Root
41
41
  value={value}
42
42
  {...otherProps}
43
+ ref={forwardedRef}
43
44
  render={useRender({
44
45
  defaultTagName: "div",
45
46
  render: render as never,
@@ -49,7 +50,7 @@ function Progress(props: Readonly<Progress.Props>): React.ReactElement {
49
50
  </BaseProgress.Track>
50
51
  </BaseProgress.Root>
51
52
  );
52
- }
53
+ });
53
54
  Progress.displayName = "Progress";
54
55
 
55
56
  // eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
@@ -10,9 +10,6 @@ import * as React from "react";
10
10
  import {cn} from "@/lib/utilities";
11
11
  import styles from "./radio-group.module.css";
12
12
 
13
- type RadioGroupProps = React.ComponentPropsWithRef<typeof BaseRadioGroup>;
14
- type RadioGroupItemProps = React.ComponentPropsWithRef<typeof Radio.Root>;
15
-
16
13
  /**
17
14
  * Coordinates radio group state and selection behavior.
18
15
  *
@@ -84,13 +81,13 @@ const RadioGroupItem = React.forwardRef<React.ComponentRef<typeof Radio.Root>, R
84
81
 
85
82
  // eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
86
83
  namespace RadioGroup {
87
- export type Props = RadioGroupProps;
84
+ export type Props = React.ComponentPropsWithRef<typeof BaseRadioGroup>;
88
85
  export type State = BaseRadioGroup.State;
89
86
  }
90
87
 
91
88
  // eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
92
89
  namespace RadioGroupItem {
93
- export type Props = RadioGroupItemProps;
90
+ export type Props = React.ComponentPropsWithRef<typeof Radio.Root>;
94
91
  export type State = Radio.Root.State;
95
92
  }
96
93
 
@@ -4,19 +4,19 @@
4
4
 
5
5
  import {GripVertical} from "lucide-react";
6
6
  import * as React from "react";
7
- import type {ImperativePanelGroupHandle, ImperativePanelHandle} from "react-resizable-panels";
7
+ import type {GroupImperativeHandle, PanelImperativeHandle} from "react-resizable-panels";
8
8
  import * as ResizablePrimitive from "react-resizable-panels";
9
9
 
10
10
  import {cn} from "@/lib/utilities";
11
11
 
12
12
  import styles from "./resizable.module.css";
13
13
 
14
- export type {ImperativePanelGroupHandle, ImperativePanelHandle};
14
+ export type {GroupImperativeHandle, PanelImperativeHandle};
15
15
 
16
16
  /**
17
17
  * Props for the {@link ResizablePanelGroup} component.
18
18
  */
19
- export type ResizablePanelGroupProps = React.ComponentProps<typeof ResizablePrimitive.PanelGroup>;
19
+ export type ResizablePanelGroupProps = React.ComponentProps<typeof ResizablePrimitive.Group>;
20
20
 
21
21
  /**
22
22
  * Props for the {@link ResizablePanel} component.
@@ -28,7 +28,7 @@ export type ResizablePanelProps = React.ComponentProps<typeof ResizablePrimitive
28
28
  *
29
29
  * @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs}
30
30
  */
31
- export interface ResizableHandleProps extends React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> {
31
+ export interface ResizableHandleProps extends React.ComponentProps<typeof ResizablePrimitive.Separator> {
32
32
  /**
33
33
  * Renders a visual drag grip inside the resize handle to indicate that adjacent panels can be resized.
34
34
  *
@@ -42,26 +42,25 @@ export interface ResizableHandleProps extends React.ComponentProps<typeof Resiza
42
42
  * Wraps `react-resizable-panels` panel groups with shared styles.
43
43
  *
44
44
  * @remarks
45
- * - Third-party wrapper component
45
+ * - Third-party wrapper component (v4 API: `Group` with `orientation` prop)
46
46
  * - Styling via CSS Modules with `--ac-*` custom properties
47
47
  *
48
48
  * @example
49
49
  * ```tsx
50
- * <ResizablePanelGroup direction='horizontal'>...</ResizablePanelGroup>
50
+ * <ResizablePanelGroup orientation='horizontal'>...</ResizablePanelGroup>
51
51
  * ```
52
52
  *
53
53
  * @see {@link ResizablePanelGroupProps} for available props
54
54
  * @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs}
55
- * @see {@link https://github.com/bvaughn/react-resizable-panels/tree/main/packages/react-resizable-panels#readme | react-resizable-panels API reference}
56
55
  */
57
- const ResizablePanelGroup: React.ForwardRefExoticComponent<ResizablePanelGroupProps & React.RefAttributes<ImperativePanelGroupHandle>> =
58
- React.forwardRef<ImperativePanelGroupHandle, ResizablePanelGroupProps>(({className, ...props}, ref) => (
59
- <ResizablePrimitive.PanelGroup
60
- ref={ref}
56
+ function ResizablePanelGroup({className, ...props}: Readonly<ResizablePanelGroupProps>): React.JSX.Element {
57
+ return (
58
+ <ResizablePrimitive.Group
61
59
  className={cn(styles.group, className)}
62
60
  {...props}
63
61
  />
64
- ));
62
+ );
63
+ }
65
64
 
66
65
  /**
67
66
  * Re-exports the underlying resizable panel primitive for consistent composition.
@@ -72,12 +71,11 @@ const ResizablePanelGroup: React.ForwardRefExoticComponent<ResizablePanelGroupPr
72
71
  *
73
72
  * @example
74
73
  * ```tsx
75
- * <ResizablePanel defaultSize={50}>Content</ResizablePanel>
74
+ * <ResizablePanel defaultSize="50%">Content</ResizablePanel>
76
75
  * ```
77
76
  *
78
77
  * @see {@link ResizablePanelProps} for available props
79
78
  * @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs}
80
- * @see {@link https://github.com/bvaughn/react-resizable-panels/tree/main/packages/react-resizable-panels#readme | react-resizable-panels API reference}
81
79
  */
82
80
  const ResizablePanel = ResizablePrimitive.Panel;
83
81
 
@@ -85,7 +83,7 @@ const ResizablePanel = ResizablePrimitive.Panel;
85
83
  * Renders a draggable resize handle between resizable panels.
86
84
  *
87
85
  * @remarks
88
- * - Third-party wrapper component
86
+ * - Third-party wrapper component (v4 API: `Separator`)
89
87
  * - Styling via CSS Modules with `--ac-*` custom properties
90
88
  *
91
89
  * @example
@@ -95,11 +93,10 @@ const ResizablePanel = ResizablePrimitive.Panel;
95
93
  *
96
94
  * @see {@link ResizableHandleProps} for available props
97
95
  * @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs}
98
- * @see {@link https://github.com/bvaughn/react-resizable-panels/tree/main/packages/react-resizable-panels#readme | react-resizable-panels API reference}
99
96
  */
100
97
  function ResizableHandle({withHandle = false, className, children, ...props}: Readonly<ResizableHandleProps>): React.JSX.Element {
101
98
  return (
102
- <ResizablePrimitive.PanelResizeHandle
99
+ <ResizablePrimitive.Separator
103
100
  className={cn(styles.handle, className)}
104
101
  {...props}>
105
102
  {Boolean(withHandle) && (
@@ -108,7 +105,7 @@ function ResizableHandle({withHandle = false, className, children, ...props}: Re
108
105
  </div>
109
106
  )}
110
107
  {children}
111
- </ResizablePrimitive.PanelResizeHandle>
108
+ </ResizablePrimitive.Separator>
112
109
  );
113
110
  }
114
111
 
@@ -43,15 +43,10 @@ const ignoreAnimationError = (): null => null;
43
43
  *
44
44
  * @see {@link ScratcherProps} for available props
45
45
  */
46
- export const Scratcher: React.FC<ScratcherProps> = ({
47
- width,
48
- height,
49
- minScratchPercentage = 50,
50
- onComplete,
51
- children,
52
- className,
53
- gradientColors = defaultGradientColors,
54
- }): React.JSX.Element => {
46
+ export const Scratcher = React.forwardRef<HTMLDivElement, ScratcherProps>(function Scratcher(
47
+ {width, height, minScratchPercentage = 50, onComplete, children, className, gradientColors = defaultGradientColors},
48
+ forwardedRef,
49
+ ) {
55
50
  const canvasRef = useRef<HTMLCanvasElement>(null);
56
51
  const [isScratching, setIsScratching] = useState(false);
57
52
  const [isComplete, setIsComplete] = useState(false);
@@ -173,6 +168,7 @@ export const Scratcher: React.FC<ScratcherProps> = ({
173
168
 
174
169
  return (
175
170
  <motion.div
171
+ ref={forwardedRef}
176
172
  className={cn(styles.root, className)}
177
173
  style={{
178
174
  width,
@@ -192,6 +188,6 @@ export const Scratcher: React.FC<ScratcherProps> = ({
192
188
  {children}
193
189
  </motion.div>
194
190
  );
195
- };
191
+ });
196
192
 
197
193
  Scratcher.displayName = "Scratcher";
@@ -8,9 +8,6 @@ import * as React from "react";
8
8
  import {cn} from "@/lib/utilities";
9
9
  import styles from "./scroll-area.module.css";
10
10
 
11
- type ScrollAreaProps = React.ComponentPropsWithRef<typeof BaseScrollArea.Root>;
12
- type ScrollBarProps = React.ComponentPropsWithRef<typeof BaseScrollArea.Scrollbar>;
13
-
14
11
  /**
15
12
  * Coordinates scroll area layout and scrolling behavior.
16
13
  *
@@ -88,13 +85,13 @@ function ScrollBar(props: Readonly<ScrollBar.Props>): React.ReactElement {
88
85
 
89
86
  // eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
90
87
  namespace ScrollArea {
91
- export type Props = ScrollAreaProps;
88
+ export type Props = React.ComponentPropsWithRef<typeof BaseScrollArea.Root>;
92
89
  export type State = BaseScrollArea.Root.State;
93
90
  }
94
91
 
95
92
  // eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
96
93
  namespace ScrollBar {
97
- export type Props = ScrollBarProps;
94
+ export type Props = React.ComponentPropsWithRef<typeof BaseScrollArea.Scrollbar>;
98
95
  export type State = BaseScrollArea.Scrollbar.State;
99
96
  }
100
97
 
@@ -36,13 +36,14 @@ export interface SeparatorProps extends Omit<React.ComponentPropsWithRef<typeof
36
36
  *
37
37
  * @see {@link https://base-ui.com/react/components/separator | Base UI Documentation}
38
38
  */
39
- function Separator(props: Readonly<Separator.Props>): React.ReactElement {
40
- const {className, decorative: _decorative = true, orientation = "horizontal", render, ...otherProps} = props;
39
+ const Separator = React.forwardRef<HTMLDivElement, Separator.Props>(function Separator(props, forwardedRef) {
40
+ const {className, orientation = "horizontal", render, ...otherProps} = props;
41
41
 
42
42
  return (
43
43
  <BaseSeparator
44
44
  orientation={orientation}
45
45
  {...otherProps}
46
+ ref={forwardedRef}
46
47
  render={useRender({
47
48
  defaultTagName: "div",
48
49
  render: render as never,
@@ -55,7 +56,7 @@ function Separator(props: Readonly<Separator.Props>): React.ReactElement {
55
56
  })}
56
57
  />
57
58
  );
58
- }
59
+ });
59
60
  Separator.displayName = "Separator";
60
61
 
61
62
  // eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
@@ -171,6 +171,7 @@ const SheetClose = BaseDialog.Close;
171
171
  */
172
172
  const SheetTrigger = React.forwardRef<HTMLButtonElement, SheetTrigger.Props>(
173
173
  (props: Readonly<SheetTrigger.Props>, ref): React.ReactElement => {
174
+ // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API
174
175
  const {asChild = false, children, className, render, ...otherProps} = props;
175
176
  const renderProp = asChild && React.isValidElement(children) ? children : render;
176
177
 
@@ -277,6 +278,7 @@ const SheetContent = React.forwardRef<React.ComponentRef<typeof BaseDialog.Popup
277
278
  * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}
278
279
  */
279
280
  function SheetHeader(props: Readonly<SheetHeader.Props>): React.ReactElement {
281
+ // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API
280
282
  const {asChild = false, children, className, render, ...otherProps} = props;
281
283
  const renderProp = asChild && React.isValidElement(children) ? children : render;
282
284
 
@@ -305,6 +307,7 @@ function SheetHeader(props: Readonly<SheetHeader.Props>): React.ReactElement {
305
307
  * @see {@link https://base-ui.com/react/components/dialog | Base UI Documentation}
306
308
  */
307
309
  function SheetFooter(props: Readonly<SheetFooter.Props>): React.ReactElement {
310
+ // eslint-disable-next-line sonarjs/deprecation -- backward-compatible asChild API
308
311
  const {asChild = false, children, className, render, ...otherProps} = props;
309
312
  const renderProp = asChild && React.isValidElement(children) ? children : render;
310
313
 
@@ -1,3 +1,4 @@
1
+ /* eslint-disable max-lines */
1
2
  "use client";
2
3
 
3
4
  import {PanelLeft} from "lucide-react";
@@ -1,6 +1,6 @@
1
1
  .viewport {
2
2
  position: fixed;
3
- z-index: 100;
3
+ z-index: 9999;
4
4
  display: flex;
5
5
  width: min(calc(100vw - 2rem), 24rem);
6
6
  flex-direction: column;
@@ -13,7 +13,7 @@ import {AlertCircle, BellRing, CheckCircle2, Info, LoaderCircle, TriangleAlert,
13
13
  import * as React from "react";
14
14
 
15
15
  import {cn} from "@/lib/utilities";
16
- import styles from "./sonner.module.css";
16
+ import styles from "./toast.module.css";
17
17
 
18
18
  const DEFAULT_TOAST_DURATION = 5000;
19
19
  const DEFAULT_TOAST_LIMIT = 3;
@@ -384,7 +384,7 @@ function updateToast(toastId: ToastIdentifier, options: ToastUpdateOptions): str
384
384
  const normalizedToastId = String(toastId);
385
385
  const existingRecord = toastRecords.get(normalizedToastId);
386
386
  const mergedOptions: ToastOptions = {
387
- ...(existingRecord?.options ?? {}),
387
+ ...existingRecord?.options,
388
388
  ...options,
389
389
  };
390
390
  const variant = options.variant ?? existingRecord?.snapshot.variant ?? "default";
@@ -594,16 +594,23 @@ function ToastViewportContent(): React.JSX.Element {
594
594
  *
595
595
  * @see {@link https://base-ui.com/react/components/toast | Base UI Toast Docs}
596
596
  */
597
- function Toaster({
598
- className,
599
- closeButton = true,
600
- containerAriaLabel = DEFAULT_VIEWPORT_ARIA_LABEL,
601
- duration = DEFAULT_TOAST_DURATION,
602
- position = "bottom-right",
603
- style,
604
- toastOptions,
605
- visibleToasts = DEFAULT_TOAST_LIMIT,
606
- }: Readonly<ToasterProps>): React.JSX.Element {
597
+ /**
598
+ * Toaster is the root viewport container for displaying toast notifications.
599
+ * It should be rendered once at the app root level.
600
+ */
601
+ const Toaster = React.forwardRef<HTMLDivElement, ToasterProps>(function Toaster(
602
+ {
603
+ className,
604
+ closeButton = true,
605
+ containerAriaLabel = DEFAULT_VIEWPORT_ARIA_LABEL,
606
+ duration = DEFAULT_TOAST_DURATION,
607
+ position = "bottom-right",
608
+ style,
609
+ toastOptions,
610
+ visibleToasts = DEFAULT_TOAST_LIMIT,
611
+ },
612
+ forwardedRef,
613
+ ) {
607
614
  const toasterId = React.useId();
608
615
 
609
616
  React.useEffect(() => {
@@ -624,6 +631,7 @@ function Toaster({
624
631
  toastManager={toastManager}>
625
632
  <Toast.Portal>
626
633
  <Toast.Viewport
634
+ ref={forwardedRef}
627
635
  aria-label={containerAriaLabel}
628
636
  className={cn(styles.viewport, positionStyles[position], className)}
629
637
  style={style}>
@@ -632,7 +640,7 @@ function Toaster({
632
640
  </Toast.Portal>
633
641
  </Toast.Provider>
634
642
  );
635
- }
643
+ });
636
644
 
637
645
  Toaster.displayName = "Toaster";
638
646
 
@@ -776,5 +784,5 @@ toast.promise = async function promise<Value>(promiseValue: ToastPromise<Value>,
776
784
  toast.getToasts = (): ReadonlyArray<ToastSnapshot> => [...activeToasts.values()];
777
785
  toast.getHistory = (): ReadonlyArray<ToastSnapshot> => [...toastHistory];
778
786
 
779
- export type {Toast} from "@base-ui/react/toast";
787
+ export type {Toast};
780
788
  export {toast, Toaster};
@@ -63,12 +63,13 @@ export interface ToggleGroupItemProps extends Omit<ToggleProps, "pressed" | "def
63
63
  *
64
64
  * @see {@link https://base-ui.com/react/components/toggle-group | Base UI Toggle Group Docs}
65
65
  */
66
- function ToggleGroup(props: Readonly<ToggleGroup.Props>): React.ReactElement {
66
+ const ToggleGroup = React.forwardRef<HTMLDivElement, ToggleGroup.Props>(function ToggleGroup(props, forwardedRef) {
67
67
  const {className, children, render, size, variant, ...otherProps} = props;
68
68
 
69
69
  return (
70
70
  <BaseToggleGroup
71
71
  {...otherProps}
72
+ ref={forwardedRef}
72
73
  render={useRender({
73
74
  defaultTagName: "div",
74
75
  render: render as never,
@@ -77,7 +78,7 @@ function ToggleGroup(props: Readonly<ToggleGroup.Props>): React.ReactElement {
77
78
  <ToggleGroupContext.Provider value={{variant, size}}>{children}</ToggleGroupContext.Provider>
78
79
  </BaseToggleGroup>
79
80
  );
80
- }
81
+ });
81
82
 
82
83
  /**
83
84
  * Renders an individual toggle item within a toggle group.
@@ -96,12 +97,13 @@ function ToggleGroup(props: Readonly<ToggleGroup.Props>): React.ReactElement {
96
97
  *
97
98
  * @see {@link https://base-ui.com/react/components/toggle-group | Base UI Toggle Group Docs}
98
99
  */
99
- function ToggleGroupItem(props: Readonly<ToggleGroupItem.Props>): React.ReactElement {
100
+ const ToggleGroupItem = React.forwardRef<HTMLButtonElement, ToggleGroupItem.Props>(function ToggleGroupItem(props, forwardedRef) {
100
101
  const {className, size, variant, ...otherProps} = props;
101
102
  const context = React.useContext(ToggleGroupContext);
102
103
 
103
104
  return (
104
105
  <Toggle
106
+ ref={forwardedRef}
105
107
  className={cn(
106
108
  toggleVariants({
107
109
  variant: variant ?? context.variant,
@@ -114,7 +116,7 @@ function ToggleGroupItem(props: Readonly<ToggleGroupItem.Props>): React.ReactEle
114
116
  {...otherProps}
115
117
  />
116
118
  );
117
- }
119
+ });
118
120
 
119
121
  // eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
120
122
  namespace ToggleGroup {
@@ -8,12 +8,6 @@ import * as React from "react";
8
8
  import {cn} from "@/lib/utilities";
9
9
  import styles from "./toolbar.module.css";
10
10
 
11
- type ToolbarProps = React.ComponentPropsWithRef<typeof BaseToolbar.Root>;
12
- type ToolbarButtonProps = React.ComponentPropsWithRef<typeof BaseToolbar.Button>;
13
- type ToolbarGroupProps = React.ComponentPropsWithRef<typeof BaseToolbar.Group>;
14
- type ToolbarSeparatorProps = React.ComponentPropsWithRef<typeof BaseToolbar.Separator>;
15
- type ToolbarLinkProps = React.ComponentPropsWithRef<typeof BaseToolbar.Link>;
16
-
17
11
  /**
18
12
  * Arranges related actions into a keyboard-accessible toolbar.
19
13
  *
@@ -32,12 +26,13 @@ type ToolbarLinkProps = React.ComponentPropsWithRef<typeof BaseToolbar.Link>;
32
26
  *
33
27
  * @see {@link https://base-ui.com/react/components/toolbar | Base UI Toolbar Docs}
34
28
  */
35
- function Toolbar(props: Readonly<Toolbar.Props>): React.ReactElement {
29
+ const Toolbar = React.forwardRef<HTMLDivElement, Toolbar.Props>(function Toolbar(props, forwardedRef) {
36
30
  const {className, children, render, ...otherProps} = props;
37
31
 
38
32
  return (
39
33
  <BaseToolbar.Root
40
34
  {...otherProps}
35
+ ref={forwardedRef}
41
36
  render={useRender({
42
37
  defaultTagName: "div",
43
38
  render: render as never,
@@ -46,7 +41,7 @@ function Toolbar(props: Readonly<Toolbar.Props>): React.ReactElement {
46
41
  {children}
47
42
  </BaseToolbar.Root>
48
43
  );
49
- }
44
+ });
50
45
 
51
46
  /**
52
47
  * Renders an interactive button within a toolbar.
@@ -63,12 +58,13 @@ function Toolbar(props: Readonly<Toolbar.Props>): React.ReactElement {
63
58
  *
64
59
  * @see {@link https://base-ui.com/react/components/toolbar | Base UI Toolbar Docs}
65
60
  */
66
- function ToolbarButton(props: Readonly<ToolbarButton.Props>): React.ReactElement {
61
+ const ToolbarButton = React.forwardRef<HTMLButtonElement, ToolbarButton.Props>(function ToolbarButton(props, forwardedRef) {
67
62
  const {className, children, render, ...otherProps} = props;
68
63
 
69
64
  return (
70
65
  <BaseToolbar.Button
71
66
  {...otherProps}
67
+ ref={forwardedRef}
72
68
  render={useRender({
73
69
  defaultTagName: "button",
74
70
  render: render as never,
@@ -77,7 +73,7 @@ function ToolbarButton(props: Readonly<ToolbarButton.Props>): React.ReactElement
77
73
  {children}
78
74
  </BaseToolbar.Button>
79
75
  );
80
- }
76
+ });
81
77
 
82
78
  /**
83
79
  * Groups related toolbar controls into a single visual cluster.
@@ -96,12 +92,13 @@ function ToolbarButton(props: Readonly<ToolbarButton.Props>): React.ReactElement
96
92
  *
97
93
  * @see {@link https://base-ui.com/react/components/toolbar | Base UI Toolbar Docs}
98
94
  */
99
- function ToolbarGroup(props: Readonly<ToolbarGroup.Props>): React.ReactElement {
95
+ const ToolbarGroup = React.forwardRef<HTMLDivElement, ToolbarGroup.Props>(function ToolbarGroup(props, forwardedRef) {
100
96
  const {className, children, render, ...otherProps} = props;
101
97
 
102
98
  return (
103
99
  <BaseToolbar.Group
104
100
  {...otherProps}
101
+ ref={forwardedRef}
105
102
  render={useRender({
106
103
  defaultTagName: "div",
107
104
  render: render as never,
@@ -110,7 +107,7 @@ function ToolbarGroup(props: Readonly<ToolbarGroup.Props>): React.ReactElement {
110
107
  {children}
111
108
  </BaseToolbar.Group>
112
109
  );
113
- }
110
+ });
114
111
 
115
112
  /**
116
113
  * Renders a visual separator between toolbar items or groups.
@@ -126,12 +123,13 @@ function ToolbarGroup(props: Readonly<ToolbarGroup.Props>): React.ReactElement {
126
123
  *
127
124
  * @see {@link https://base-ui.com/react/components/toolbar | Base UI Toolbar Docs}
128
125
  */
129
- function ToolbarSeparator(props: Readonly<ToolbarSeparator.Props>): React.ReactElement {
126
+ const ToolbarSeparator = React.forwardRef<HTMLDivElement, ToolbarSeparator.Props>(function ToolbarSeparator(props, forwardedRef) {
130
127
  const {className, render, ...otherProps} = props;
131
128
 
132
129
  return (
133
130
  <BaseToolbar.Separator
134
131
  {...otherProps}
132
+ ref={forwardedRef}
135
133
  render={useRender({
136
134
  defaultTagName: "div",
137
135
  render: render as never,
@@ -139,7 +137,7 @@ function ToolbarSeparator(props: Readonly<ToolbarSeparator.Props>): React.ReactE
139
137
  })}
140
138
  />
141
139
  );
142
- }
140
+ });
143
141
 
144
142
  /**
145
143
  * Renders a link that visually matches toolbar buttons.
@@ -155,12 +153,13 @@ function ToolbarSeparator(props: Readonly<ToolbarSeparator.Props>): React.ReactE
155
153
  *
156
154
  * @see {@link https://base-ui.com/react/components/toolbar | Base UI Toolbar Docs}
157
155
  */
158
- function ToolbarLink(props: Readonly<ToolbarLink.Props>): React.ReactElement {
156
+ const ToolbarLink = React.forwardRef<HTMLAnchorElement, ToolbarLink.Props>(function ToolbarLink(props, forwardedRef) {
159
157
  const {className, children, render, ...otherProps} = props;
160
158
 
161
159
  return (
162
160
  <BaseToolbar.Link
163
161
  {...otherProps}
162
+ ref={forwardedRef}
164
163
  render={useRender({
165
164
  defaultTagName: "a",
166
165
  render: render as never,
@@ -169,35 +168,35 @@ function ToolbarLink(props: Readonly<ToolbarLink.Props>): React.ReactElement {
169
168
  {children}
170
169
  </BaseToolbar.Link>
171
170
  );
172
- }
171
+ });
173
172
 
174
173
  // eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
175
174
  namespace Toolbar {
176
- export type Props = ToolbarProps;
175
+ export type Props = React.ComponentPropsWithRef<typeof BaseToolbar.Root>;
177
176
  export type State = BaseToolbar.Root.State;
178
177
  }
179
178
 
180
179
  // eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
181
180
  namespace ToolbarButton {
182
- export type Props = ToolbarButtonProps;
181
+ export type Props = React.ComponentPropsWithRef<typeof BaseToolbar.Button>;
183
182
  export type State = BaseToolbar.Button.State;
184
183
  }
185
184
 
186
185
  // eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
187
186
  namespace ToolbarGroup {
188
- export type Props = ToolbarGroupProps;
187
+ export type Props = React.ComponentPropsWithRef<typeof BaseToolbar.Group>;
189
188
  export type State = BaseToolbar.Group.State;
190
189
  }
191
190
 
192
191
  // eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
193
192
  namespace ToolbarSeparator {
194
- export type Props = ToolbarSeparatorProps;
193
+ export type Props = React.ComponentPropsWithRef<typeof BaseToolbar.Separator>;
195
194
  export type State = BaseToolbar.Separator.State;
196
195
  }
197
196
 
198
197
  // eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API
199
198
  namespace ToolbarLink {
200
- export type Props = ToolbarLinkProps;
199
+ export type Props = React.ComponentPropsWithRef<typeof BaseToolbar.Link>;
201
200
  export type State = BaseToolbar.Link.State;
202
201
  }
203
202