@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
@@ -1,11 +1,11 @@
1
1
  import * as React from "react";
2
- import type { ImperativePanelGroupHandle, ImperativePanelHandle } from "react-resizable-panels";
2
+ import type { GroupImperativeHandle, PanelImperativeHandle } from "react-resizable-panels";
3
3
  import * as ResizablePrimitive from "react-resizable-panels";
4
- export type { ImperativePanelGroupHandle, ImperativePanelHandle };
4
+ export type { GroupImperativeHandle, PanelImperativeHandle };
5
5
  /**
6
6
  * Props for the {@link ResizablePanelGroup} component.
7
7
  */
8
- export type ResizablePanelGroupProps = React.ComponentProps<typeof ResizablePrimitive.PanelGroup>;
8
+ export type ResizablePanelGroupProps = React.ComponentProps<typeof ResizablePrimitive.Group>;
9
9
  /**
10
10
  * Props for the {@link ResizablePanel} component.
11
11
  */
@@ -15,7 +15,7 @@ export type ResizablePanelProps = React.ComponentProps<typeof ResizablePrimitive
15
15
  *
16
16
  * @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs}
17
17
  */
18
- export interface ResizableHandleProps extends React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> {
18
+ export interface ResizableHandleProps extends React.ComponentProps<typeof ResizablePrimitive.Separator> {
19
19
  /**
20
20
  * Renders a visual drag grip inside the resize handle to indicate that adjacent panels can be resized.
21
21
  *
@@ -28,19 +28,21 @@ export interface ResizableHandleProps extends React.ComponentProps<typeof Resiza
28
28
  * Wraps `react-resizable-panels` panel groups with shared styles.
29
29
  *
30
30
  * @remarks
31
- * - Third-party wrapper component
31
+ * - Third-party wrapper component (v4 API: `Group` with `orientation` prop)
32
32
  * - Styling via CSS Modules with `--ac-*` custom properties
33
33
  *
34
34
  * @example
35
35
  * ```tsx
36
- * <ResizablePanelGroup direction='horizontal'>...</ResizablePanelGroup>
36
+ * <ResizablePanelGroup orientation='horizontal'>...</ResizablePanelGroup>
37
37
  * ```
38
38
  *
39
39
  * @see {@link ResizablePanelGroupProps} for available props
40
40
  * @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs}
41
- * @see {@link https://github.com/bvaughn/react-resizable-panels/tree/main/packages/react-resizable-panels#readme | react-resizable-panels API reference}
42
41
  */
43
- declare const ResizablePanelGroup: React.ForwardRefExoticComponent<ResizablePanelGroupProps & React.RefAttributes<ImperativePanelGroupHandle>>;
42
+ declare function ResizablePanelGroup({ className, ...props }: Readonly<ResizablePanelGroupProps>): React.JSX.Element;
43
+ declare namespace ResizablePanelGroup {
44
+ var displayName: string;
45
+ }
44
46
  /**
45
47
  * Re-exports the underlying resizable panel primitive for consistent composition.
46
48
  *
@@ -50,35 +52,18 @@ declare const ResizablePanelGroup: React.ForwardRefExoticComponent<ResizablePane
50
52
  *
51
53
  * @example
52
54
  * ```tsx
53
- * <ResizablePanel defaultSize={50}>Content</ResizablePanel>
55
+ * <ResizablePanel defaultSize="50%">Content</ResizablePanel>
54
56
  * ```
55
57
  *
56
58
  * @see {@link ResizablePanelProps} for available props
57
59
  * @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs}
58
- * @see {@link https://github.com/bvaughn/react-resizable-panels/tree/main/packages/react-resizable-panels#readme | react-resizable-panels API reference}
59
60
  */
60
- declare const ResizablePanel: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLDivElement | HTMLElement | HTMLObjectElement | HTMLAnchorElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLButtonElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDialogElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLFormElement | HTMLHeadingElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLImageElement | HTMLInputElement | HTMLLabelElement | HTMLLegendElement | HTMLLIElement | HTMLLinkElement | HTMLMapElement | HTMLMetaElement | HTMLMeterElement | HTMLOListElement | HTMLOptGroupElement | HTMLOptionElement | HTMLOutputElement | HTMLParagraphElement | HTMLPreElement | HTMLProgressElement | HTMLSlotElement | HTMLScriptElement | HTMLSelectElement | HTMLSourceElement | HTMLSpanElement | HTMLStyleElement | HTMLTableElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTextAreaElement | HTMLTimeElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLVideoElement | HTMLTableCaptionElement | HTMLMenuElement | HTMLPictureElement>, "id" | "onResize"> & {
61
- className?: string;
62
- collapsedSize?: number | undefined;
63
- collapsible?: boolean | undefined;
64
- defaultSize?: number | undefined;
65
- id?: string;
66
- maxSize?: number | undefined;
67
- minSize?: number | undefined;
68
- onCollapse?: ResizablePrimitive.PanelOnCollapse;
69
- onExpand?: ResizablePrimitive.PanelOnExpand;
70
- onResize?: ResizablePrimitive.PanelOnResize;
71
- order?: number;
72
- style?: object;
73
- tagName?: keyof HTMLElementTagNameMap | undefined;
74
- } & {
75
- children?: import("react").ReactNode | undefined;
76
- } & React.RefAttributes<ImperativePanelHandle>>;
61
+ declare const ResizablePanel: typeof ResizablePrimitive.Panel;
77
62
  /**
78
63
  * Renders a draggable resize handle between resizable panels.
79
64
  *
80
65
  * @remarks
81
- * - Third-party wrapper component
66
+ * - Third-party wrapper component (v4 API: `Separator`)
82
67
  * - Styling via CSS Modules with `--ac-*` custom properties
83
68
  *
84
69
  * @example
@@ -88,7 +73,6 @@ declare const ResizablePanel: React.ForwardRefExoticComponent<Omit<React.HTMLAtt
88
73
  *
89
74
  * @see {@link ResizableHandleProps} for available props
90
75
  * @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs}
91
- * @see {@link https://github.com/bvaughn/react-resizable-panels/tree/main/packages/react-resizable-panels#readme | react-resizable-panels API reference}
92
76
  */
93
77
  declare function ResizableHandle({ withHandle, className, children, ...props }: Readonly<ResizableHandleProps>): React.JSX.Element;
94
78
  declare namespace ResizableHandle {
@@ -1 +1 @@
1
- {"version":3,"file":"resizable.d.ts","sourceRoot":"","sources":["../../../src/components/ui/resizable.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,0BAA0B,EAAE,qBAAqB,EAAC,MAAM,wBAAwB,CAAC;AAC9F,OAAO,KAAK,kBAAkB,MAAM,wBAAwB,CAAC;AAM7D,YAAY,EAAC,0BAA0B,EAAE,qBAAqB,EAAC,CAAC;AAEhE;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,UAAU,CAAC,CAAC;AAElG;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC;AAExF;;;;GAIG;AACH,MAAM,WAAW,oBAAqB,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,iBAAiB,CAAC;IAC7G;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,yBAAyB,CAAC,wBAAwB,GAAG,KAAK,CAAC,aAAa,CAAC,0BAA0B,CAAC,CAOjI,CAAC;AAEL;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;+CAA2B,CAAC;AAEhD;;;;;;;;;;;;;;;GAeG;AACH,iBAAS,eAAe,CAAC,EAAC,UAAkB,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAC,EAAE,QAAQ,CAAC,oBAAoB,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAa/H;kBAbQ,eAAe;;;AAmBxB,OAAO,EAAC,eAAe,EAAE,cAAc,EAAE,mBAAmB,EAAC,CAAC"}
1
+ {"version":3,"file":"resizable.d.ts","sourceRoot":"","sources":["../../../src/components/ui/resizable.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,qBAAqB,EAAE,qBAAqB,EAAC,MAAM,wBAAwB,CAAC;AACzF,OAAO,KAAK,kBAAkB,MAAM,wBAAwB,CAAC;AAM7D,YAAY,EAAC,qBAAqB,EAAE,qBAAqB,EAAC,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC;AAE7F;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC;AAExF;;;;GAIG;AACH,MAAM,WAAW,oBAAqB,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,SAAS,CAAC;IACrG;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;;;;GAcG;AACH,iBAAS,mBAAmB,CAAC,EAAC,SAAS,EAAE,GAAG,KAAK,EAAC,EAAE,QAAQ,CAAC,wBAAwB,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAOzG;kBAPQ,mBAAmB;;;AAS5B;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,cAAc,iCAA2B,CAAC;AAEhD;;;;;;;;;;;;;;GAcG;AACH,iBAAS,eAAe,CAAC,EAAC,UAAkB,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAC,EAAE,QAAQ,CAAC,oBAAoB,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAa/H;kBAbQ,eAAe;;;AAmBxB,OAAO,EAAC,eAAe,EAAE,cAAc,EAAE,mBAAmB,EAAC,CAAC"}
@@ -1,18 +1,19 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { GripVertical } from "lucide-react";
4
- import { forwardRef } from "react";
5
- import { Panel, PanelGroup, PanelResizeHandle } from "react-resizable-panels";
4
+ import "react";
6
5
  import { cn } from "../../lib/utilities.js";
7
6
  import resizable_module from "./resizable.module.js";
8
- const ResizablePanelGroup = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(PanelGroup, {
9
- ref: ref,
7
+ import * as __rspack_external_react_resizable_panels_8d5960a0 from "react-resizable-panels";
8
+ function ResizablePanelGroup({ className, ...props }) {
9
+ return /*#__PURE__*/ jsx(__rspack_external_react_resizable_panels_8d5960a0.Group, {
10
10
  className: cn(resizable_module.group, className),
11
11
  ...props
12
- }));
13
- const ResizablePanel = Panel;
12
+ });
13
+ }
14
+ const ResizablePanel = __rspack_external_react_resizable_panels_8d5960a0.Panel;
14
15
  function ResizableHandle({ withHandle = false, className, children, ...props }) {
15
- return /*#__PURE__*/ jsxs(PanelResizeHandle, {
16
+ return /*#__PURE__*/ jsxs(__rspack_external_react_resizable_panels_8d5960a0.Separator, {
16
17
  className: cn(resizable_module.handle, className),
17
18
  ...props,
18
19
  children: [
@@ -1 +1 @@
1
- {"version":3,"file":"components/ui/resizable.js","sources":["../../../src/components/ui/resizable.tsx"],"sourcesContent":["\"use client\";\r\n\r\n/* eslint-disable react/jsx-handler-names */\r\n\r\nimport {GripVertical} from \"lucide-react\";\r\nimport * as React from \"react\";\r\nimport type {ImperativePanelGroupHandle, ImperativePanelHandle} from \"react-resizable-panels\";\r\nimport * as ResizablePrimitive from \"react-resizable-panels\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nimport styles from \"./resizable.module.css\";\r\n\r\nexport type {ImperativePanelGroupHandle, ImperativePanelHandle};\r\n\r\n/**\r\n * Props for the {@link ResizablePanelGroup} component.\r\n */\r\nexport type ResizablePanelGroupProps = React.ComponentProps<typeof ResizablePrimitive.PanelGroup>;\r\n\r\n/**\r\n * Props for the {@link ResizablePanel} component.\r\n */\r\nexport type ResizablePanelProps = React.ComponentProps<typeof ResizablePrimitive.Panel>;\r\n\r\n/**\r\n * Props for the {@link ResizableHandle} component.\r\n *\r\n * @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs}\r\n */\r\nexport interface ResizableHandleProps extends React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> {\r\n /**\r\n * Renders a visual drag grip inside the resize handle to indicate that adjacent panels can be resized.\r\n *\r\n * @default false\r\n * @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs}\r\n */\r\n withHandle?: boolean;\r\n}\r\n\r\n/**\r\n * Wraps `react-resizable-panels` panel groups with shared styles.\r\n *\r\n * @remarks\r\n * - Third-party wrapper component\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <ResizablePanelGroup direction='horizontal'>...</ResizablePanelGroup>\r\n * ```\r\n *\r\n * @see {@link ResizablePanelGroupProps} for available props\r\n * @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs}\r\n * @see {@link https://github.com/bvaughn/react-resizable-panels/tree/main/packages/react-resizable-panels#readme | react-resizable-panels API reference}\r\n */\r\nconst ResizablePanelGroup: React.ForwardRefExoticComponent<ResizablePanelGroupProps & React.RefAttributes<ImperativePanelGroupHandle>> =\r\n React.forwardRef<ImperativePanelGroupHandle, ResizablePanelGroupProps>(({className, ...props}, ref) => (\r\n <ResizablePrimitive.PanelGroup\r\n ref={ref}\r\n className={cn(styles.group, className)}\r\n {...props}\r\n />\r\n ));\r\n\r\n/**\r\n * Re-exports the underlying resizable panel primitive for consistent composition.\r\n *\r\n * @remarks\r\n * - Third-party wrapper component\r\n * - Styling is applied by parent panel group and handles\r\n *\r\n * @example\r\n * ```tsx\r\n * <ResizablePanel defaultSize={50}>Content</ResizablePanel>\r\n * ```\r\n *\r\n * @see {@link ResizablePanelProps} for available props\r\n * @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs}\r\n * @see {@link https://github.com/bvaughn/react-resizable-panels/tree/main/packages/react-resizable-panels#readme | react-resizable-panels API reference}\r\n */\r\nconst ResizablePanel = ResizablePrimitive.Panel;\r\n\r\n/**\r\n * Renders a draggable resize handle between resizable panels.\r\n *\r\n * @remarks\r\n * - Third-party wrapper component\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <ResizableHandle withHandle />\r\n * ```\r\n *\r\n * @see {@link ResizableHandleProps} for available props\r\n * @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs}\r\n * @see {@link https://github.com/bvaughn/react-resizable-panels/tree/main/packages/react-resizable-panels#readme | react-resizable-panels API reference}\r\n */\r\nfunction ResizableHandle({withHandle = false, className, children, ...props}: Readonly<ResizableHandleProps>): React.JSX.Element {\r\n return (\r\n <ResizablePrimitive.PanelResizeHandle\r\n className={cn(styles.handle, className)}\r\n {...props}>\r\n {Boolean(withHandle) && (\r\n <div className={styles.handleGrip}>\r\n <GripVertical className={styles.handleGripIcon} />\r\n </div>\r\n )}\r\n {children}\r\n </ResizablePrimitive.PanelResizeHandle>\r\n );\r\n}\r\n\r\nResizablePanelGroup.displayName = \"ResizablePanelGroup\";\r\nResizablePanel.displayName = \"ResizablePanel\";\r\nResizableHandle.displayName = \"ResizableHandle\";\r\n\r\nexport {ResizableHandle, ResizablePanel, ResizablePanelGroup};\r\n"],"names":["ResizablePanelGroup","React","className","props","ref","ResizablePrimitive","cn","styles","ResizablePanel","ResizableHandle","withHandle","children","Boolean","GripVertical"],"mappings":";;;;;;;AAwDA,MAAMA,sBAAmBA,WAAAA,GACvBC,WAAuE,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GAC7F,IAACC,YAA6B;QAC5B,KAAKD;QACL,WAAWE,GAAGC,iBAAAA,KAAY,EAAEL;QAC3B,GAAGC,KAAK;;AAoBf,MAAMK,iBAAiBH;AAkBvB,SAASI,gBAAgB,EAACC,aAAa,KAAK,EAAER,SAAS,EAAES,QAAQ,EAAE,GAAGR,OAAsC;IAC1G,OAAO,WAAP,GACE,KAACE,mBAAoC;QACnC,WAAWC,GAAGC,iBAAAA,MAAa,EAAEL;QAC5B,GAAGC,KAAK;;YACRS,QAAQF,eAAe,WAAfA,GACP,IAAC;gBAAI,WAAWH,iBAAAA,UAAiB;0BAC/B,kBAACM,cAAYA;oBAAC,WAAWN,iBAAAA,cAAqB;;;YAGjDI;;;AAGP;AAEAX,oBAAoB,WAAW,GAAG;AAClCQ,eAAe,WAAW,GAAG;AAC7BC,gBAAgB,WAAW,GAAG"}
1
+ {"version":3,"file":"components/ui/resizable.js","sources":["../../../src/components/ui/resizable.tsx"],"sourcesContent":["\"use client\";\r\n\r\n/* eslint-disable react/jsx-handler-names */\r\n\r\nimport {GripVertical} from \"lucide-react\";\r\nimport * as React from \"react\";\r\nimport type {GroupImperativeHandle, PanelImperativeHandle} from \"react-resizable-panels\";\r\nimport * as ResizablePrimitive from \"react-resizable-panels\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nimport styles from \"./resizable.module.css\";\r\n\r\nexport type {GroupImperativeHandle, PanelImperativeHandle};\r\n\r\n/**\r\n * Props for the {@link ResizablePanelGroup} component.\r\n */\r\nexport type ResizablePanelGroupProps = React.ComponentProps<typeof ResizablePrimitive.Group>;\r\n\r\n/**\r\n * Props for the {@link ResizablePanel} component.\r\n */\r\nexport type ResizablePanelProps = React.ComponentProps<typeof ResizablePrimitive.Panel>;\r\n\r\n/**\r\n * Props for the {@link ResizableHandle} component.\r\n *\r\n * @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs}\r\n */\r\nexport interface ResizableHandleProps extends React.ComponentProps<typeof ResizablePrimitive.Separator> {\r\n /**\r\n * Renders a visual drag grip inside the resize handle to indicate that adjacent panels can be resized.\r\n *\r\n * @default false\r\n * @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs}\r\n */\r\n withHandle?: boolean;\r\n}\r\n\r\n/**\r\n * Wraps `react-resizable-panels` panel groups with shared styles.\r\n *\r\n * @remarks\r\n * - Third-party wrapper component (v4 API: `Group` with `orientation` prop)\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <ResizablePanelGroup orientation='horizontal'>...</ResizablePanelGroup>\r\n * ```\r\n *\r\n * @see {@link ResizablePanelGroupProps} for available props\r\n * @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs}\r\n */\r\nfunction ResizablePanelGroup({className, ...props}: Readonly<ResizablePanelGroupProps>): React.JSX.Element {\r\n return (\r\n <ResizablePrimitive.Group\r\n className={cn(styles.group, className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\n/**\r\n * Re-exports the underlying resizable panel primitive for consistent composition.\r\n *\r\n * @remarks\r\n * - Third-party wrapper component\r\n * - Styling is applied by parent panel group and handles\r\n *\r\n * @example\r\n * ```tsx\r\n * <ResizablePanel defaultSize=\"50%\">Content</ResizablePanel>\r\n * ```\r\n *\r\n * @see {@link ResizablePanelProps} for available props\r\n * @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs}\r\n */\r\nconst ResizablePanel = ResizablePrimitive.Panel;\r\n\r\n/**\r\n * Renders a draggable resize handle between resizable panels.\r\n *\r\n * @remarks\r\n * - Third-party wrapper component (v4 API: `Separator`)\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <ResizableHandle withHandle />\r\n * ```\r\n *\r\n * @see {@link ResizableHandleProps} for available props\r\n * @see {@link https://github.com/bvaughn/react-resizable-panels | react-resizable-panels docs}\r\n */\r\nfunction ResizableHandle({withHandle = false, className, children, ...props}: Readonly<ResizableHandleProps>): React.JSX.Element {\r\n return (\r\n <ResizablePrimitive.Separator\r\n className={cn(styles.handle, className)}\r\n {...props}>\r\n {Boolean(withHandle) && (\r\n <div className={styles.handleGrip}>\r\n <GripVertical className={styles.handleGripIcon} />\r\n </div>\r\n )}\r\n {children}\r\n </ResizablePrimitive.Separator>\r\n );\r\n}\r\n\r\nResizablePanelGroup.displayName = \"ResizablePanelGroup\";\r\nResizablePanel.displayName = \"ResizablePanel\";\r\nResizableHandle.displayName = \"ResizableHandle\";\r\n\r\nexport {ResizableHandle, ResizablePanel, ResizablePanelGroup};\r\n"],"names":["ResizablePanelGroup","className","props","ResizablePrimitive","cn","styles","ResizablePanel","ResizableHandle","withHandle","children","Boolean","GripVertical"],"mappings":";;;;;;;AAuDA,SAASA,oBAAoB,EAACC,SAAS,EAAE,GAAGC,OAA0C;IACpF,OAAO,WAAP,GACE,IAACC,kDAAAA,KAAwB;QACvB,WAAWC,GAAGC,iBAAAA,KAAY,EAAEJ;QAC3B,GAAGC,KAAK;;AAGf;AAiBA,MAAMI,iBAAiBH,kDAAAA,KAAwB;AAiB/C,SAASI,gBAAgB,EAACC,aAAa,KAAK,EAAEP,SAAS,EAAEQ,QAAQ,EAAE,GAAGP,OAAsC;IAC1G,OAAO,WAAP,GACE,KAACC,kDAAAA,SAA4B;QAC3B,WAAWC,GAAGC,iBAAAA,MAAa,EAAEJ;QAC5B,GAAGC,KAAK;;YACRQ,QAAQF,eAAe,WAAfA,GACP,IAAC;gBAAI,WAAWH,iBAAAA,UAAiB;0BAC/B,kBAACM,cAAYA;oBAAC,WAAWN,iBAAAA,cAAqB;;;YAGjDI;;;AAGP;AAEAT,oBAAoB,WAAW,GAAG;AAClCM,eAAe,WAAW,GAAG;AAC7BC,gBAAgB,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/resizable.module.css","webpack://./src/components/ui/resizable.module.css"],"names":[],"mappings":"AADA;ECEE,WAAW;EACX,YAAY;EACZ,aAAa;AACf;;AAEA;EACE,sBAAsB;AACxB;;AAEA;EACE,kCAAkC;EAClC,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,UAAU;EACV,aAAa;EACb,kBAAkB;AACpB;;AAEA;EACE,WAAW;EACX,cAAc;EACd,aAAa;EACb,kBAAkB;EAClB,SAAS;EACT,2BAA2B;AAC7B;;AAEA;EACE,mEAAmE;AACrE;;AAEA;EACE,WAAW;EACX,WAAW;AACb;;AAEA;EACE,WAAW;EACX,cAAc;EACd,MAAM;EACN,OAAO;EACP,2BAA2B;AAC7B;;AAEA;EACE,sCAAsC;EACtC,kCAAkC;EAClC,kCAAkC;EAClC,UAAU;EACV,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;EACb,YAAY;EACZ,aAAa;EACb,kBAAkB;AACpB;;AAEA;EACE,wBAAwB;AAC1B;;AAEA;EACE,cAAc;EACd,eAAe;AACjB","sourcesContent":[".group{display:flex;height:100%;width:100%}.group[data-panel-group-direction=vertical]{flex-direction:column}.handle{align-items:center;background-color:var(--ac-border);display:flex;justify-content:center;outline:none;position:relative;width:1px}.handle:after{content:\"\";inset-block:0;left:50%;position:absolute;transform:translateX(-50%);width:.25rem}.handle:focus-visible{box-shadow:0 0 0 1px var(--ac-ring),0 0 0 2px var(--ac-background)}.handle[data-panel-group-direction=vertical]{height:1px;width:100%}.handle[data-panel-group-direction=vertical]:after{height:.25rem;left:0;top:0;transform:translateY(-50%);width:100%}.handleGrip{align-items:center;background-color:var(--ac-background);border:1px solid var(--ac-border);border-radius:var(--ac-radius-sm);display:flex;height:1rem;justify-content:center;position:relative;width:.75rem;z-index:1}.handle[data-panel-group-direction=vertical] .handleGrip{transform:rotate(90deg)}.handleGripIcon{height:.625rem;width:.625rem}",".group {\n width: 100%;\n height: 100%;\n display: flex;\n}\n\n.group[data-panel-group-direction=\"vertical\"] {\n flex-direction: column;\n}\n\n.handle {\n background-color: var(--ac-border);\n outline: none;\n justify-content: center;\n align-items: center;\n width: 1px;\n display: flex;\n position: relative;\n}\n\n.handle:after {\n content: \"\";\n inset-block: 0;\n width: .25rem;\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n}\n\n.handle:focus-visible {\n box-shadow: 0 0 0 1px var(--ac-ring),0 0 0 2px var(--ac-background);\n}\n\n.handle[data-panel-group-direction=\"vertical\"] {\n width: 100%;\n height: 1px;\n}\n\n.handle[data-panel-group-direction=\"vertical\"]:after {\n width: 100%;\n height: .25rem;\n top: 0;\n left: 0;\n transform: translateY(-50%);\n}\n\n.handleGrip {\n background-color: var(--ac-background);\n border: 1px solid var(--ac-border);\n border-radius: var(--ac-radius-sm);\n z-index: 1;\n justify-content: center;\n align-items: center;\n width: .75rem;\n height: 1rem;\n display: flex;\n position: relative;\n}\n\n.handle[data-panel-group-direction=\"vertical\"] .handleGrip {\n transform: rotate(90deg);\n}\n\n.handleGripIcon {\n width: .625rem;\n height: .625rem;\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./../../node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].oneOf[2].use[2]!/home/runner/work/arolariu.ro/arolariu.ro/node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/postcss-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[3]!/home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/resizable.module.css","webpack://./src/components/ui/resizable.module.css"],"names":[],"mappings":"AAAA;ECCE,WAAW;EACX,YAAY;EACZ,aAAa;AACf;;ADJ2C;ECOzC,sBAAsB;AACxB;;ADR6G;ECW3G,kCAAkC;EAClC,aAAa;EACb,uBAAuB;EACvB,mBAAmB;EACnB,UAAU;EACV,aAAa;EACb,kBAAkB;AACpB;;ADlBuP;ECqBrP,WAAW;EACX,cAAc;EACd,aAAa;EACb,kBAAkB;EAClB,SAAS;EACT,2BAA2B;AAC7B;;AD3BiW;EC8B/V,mEAAmE;AACrE;;AD/B0b;ECkCxb,WAAW;EACX,WAAW;AACb;;ADpC6f;ECuC3f,WAAW;EACX,cAAc;EACd,MAAM;EACN,OAAO;EACP,2BAA2B;AAC7B;;AD5CinB;EC+C/mB,sCAAsC;EACtC,kCAAkC;EAClC,kCAAkC;EAClC,UAAU;EACV,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;EACb,YAAY;EACZ,aAAa;EACb,kBAAkB;AACpB;;ADzDm1B;EC4Dj1B,wBAAwB;AAC1B;;AD7Do6B;ECgEl6B,cAAc;EACd,eAAe;AACjB","sourcesContent":[".group{display:flex;height:100%;width:100%}.group[data-panel-group-direction=vertical]{flex-direction:column}.handle{align-items:center;background-color:var(--ac-border);display:flex;justify-content:center;outline:none;position:relative;width:1px}.handle:after{content:\"\";inset-block:0;left:50%;position:absolute;transform:translateX(-50%);width:.25rem}.handle:focus-visible{box-shadow:0 0 0 1px var(--ac-ring),0 0 0 2px var(--ac-background)}.handle[data-panel-group-direction=vertical]{height:1px;width:100%}.handle[data-panel-group-direction=vertical]:after{height:.25rem;left:0;top:0;transform:translateY(-50%);width:100%}.handleGrip{align-items:center;background-color:var(--ac-background);border:1px solid var(--ac-border);border-radius:var(--ac-radius-sm);display:flex;height:1rem;justify-content:center;position:relative;width:.75rem;z-index:1}.handle[data-panel-group-direction=vertical] .handleGrip{transform:rotate(90deg)}.handleGripIcon{height:.625rem;width:.625rem}",".group {\n width: 100%;\n height: 100%;\n display: flex;\n}\n\n.group[data-panel-group-direction=\"vertical\"] {\n flex-direction: column;\n}\n\n.handle {\n background-color: var(--ac-border);\n outline: none;\n justify-content: center;\n align-items: center;\n width: 1px;\n display: flex;\n position: relative;\n}\n\n.handle:after {\n content: \"\";\n inset-block: 0;\n width: .25rem;\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n}\n\n.handle:focus-visible {\n box-shadow: 0 0 0 1px var(--ac-ring),0 0 0 2px var(--ac-background);\n}\n\n.handle[data-panel-group-direction=\"vertical\"] {\n width: 100%;\n height: 1px;\n}\n\n.handle[data-panel-group-direction=\"vertical\"]:after {\n width: 100%;\n height: .25rem;\n top: 0;\n left: 0;\n transform: translateY(-50%);\n}\n\n.handleGrip {\n background-color: var(--ac-background);\n border: 1px solid var(--ac-border);\n border-radius: var(--ac-radius-sm);\n z-index: 1;\n justify-content: center;\n align-items: center;\n width: .75rem;\n height: 1rem;\n display: flex;\n position: relative;\n}\n\n.handle[data-panel-group-direction=\"vertical\"] .handleGrip {\n transform: rotate(90deg);\n}\n\n.handleGripIcon {\n width: .625rem;\n height: .625rem;\n}\n"],"sourceRoot":""}
@@ -1,24 +1,24 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { motion } from "motion/react";
4
- import { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from "react";
5
4
  import { cn } from "../../lib/utilities.js";
6
5
  import ripple_button_module from "./ripple-button.module.js";
7
- const RippleButton = /*#__PURE__*/ forwardRef(({ children, onClick, className, rippleClassName, scale = 10, transition = {
6
+ import * as __rspack_external_react from "react";
7
+ const RippleButton = /*#__PURE__*/ __rspack_external_react.forwardRef(({ children, onClick, className, rippleClassName, scale = 10, transition = {
8
8
  duration: 0.6,
9
9
  ease: "easeOut"
10
10
  }, ...props }, ref)=>{
11
11
  const { key: _ignoredKey, ...restProps } = props;
12
- const [ripples, setRipples] = useState([]);
13
- const buttonRef = useRef(null);
14
- const timeoutIdsRef = useRef([]);
15
- useImperativeHandle(ref, ()=>buttonRef.current, []);
16
- useEffect(()=>()=>{
12
+ const [ripples, setRipples] = __rspack_external_react.useState([]);
13
+ const buttonRef = __rspack_external_react.useRef(null);
14
+ const timeoutIdsRef = __rspack_external_react.useRef([]);
15
+ __rspack_external_react.useImperativeHandle(ref, ()=>buttonRef.current, []);
16
+ __rspack_external_react.useEffect(()=>()=>{
17
17
  timeoutIdsRef.current.forEach((timeoutId)=>{
18
18
  globalThis.window.clearTimeout(timeoutId);
19
19
  });
20
20
  }, []);
21
- const createRipple = useCallback((event)=>{
21
+ const createRipple = __rspack_external_react.useCallback((event)=>{
22
22
  const button = buttonRef.current;
23
23
  if (!button) return;
24
24
  const rect = button.getBoundingClientRect();
@@ -41,7 +41,7 @@ const RippleButton = /*#__PURE__*/ forwardRef(({ children, onClick, className, r
41
41
  timeoutId
42
42
  ];
43
43
  }, []);
44
- const handleClick = useCallback((event)=>{
44
+ const handleClick = __rspack_external_react.useCallback((event)=>{
45
45
  createRipple(event);
46
46
  onClick?.(event);
47
47
  }, [
@@ -1 +1 @@
1
- {"version":3,"file":"components/ui/ripple-button.js","sources":["../../../src/components/ui/ripple-button.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {motion, type HTMLMotionProps, type Transition} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./ripple-button.module.css\";\r\n\r\ninterface Ripple {\r\n id: number;\r\n x: number;\r\n y: number;\r\n}\r\n\r\n/** Props accepted by {@link RippleButton}. */\r\nexport interface RippleButtonProps extends HTMLMotionProps<\"button\"> {\r\n /** Button contents rendered above the ripple layer. @default undefined */\r\n children: React.ReactNode;\r\n /** Additional CSS classes merged with each generated ripple. @default undefined */\r\n rippleClassName?: string;\r\n /** Final expansion scale applied to each ripple animation. @default 10 */\r\n scale?: number;\r\n /** Motion timing used for each ripple animation. @default {duration: 0.6, ease: \"easeOut\"} */\r\n transition?: Transition;\r\n}\r\n\r\n/**\r\n * Renders a pressable button that emits animated ripples from the click position.\r\n *\r\n * @remarks\r\n * - Animated component using the `motion` library\r\n * - Renders a `<button>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n * - Client-side only (`\"use client\"` directive)\r\n *\r\n * @example\r\n * ```tsx\r\n * <RippleButton>Click me</RippleButton>\r\n * ```\r\n *\r\n * @see {@link RippleButtonProps} for available props\r\n */\r\nconst RippleButton = React.forwardRef<HTMLButtonElement, RippleButtonProps>(\r\n ({children, onClick, className, rippleClassName, scale = 10, transition = {duration: 0.6, ease: \"easeOut\"}, ...props}, ref) => {\r\n // eslint-disable-next-line sonarjs/no-unused-vars -- removing React key avoids implicit key spreading\r\n const {key: _ignoredKey, ...restProps} = props;\r\n const [ripples, setRipples] = React.useState<ReadonlyArray<Ripple>>([]);\r\n const buttonRef = React.useRef<HTMLButtonElement>(null);\r\n const timeoutIdsRef = React.useRef<ReadonlyArray<number>>([]);\r\n\r\n React.useImperativeHandle(ref, () => buttonRef.current!, []);\r\n\r\n React.useEffect(\r\n () => () => {\r\n timeoutIdsRef.current.forEach((timeoutId) => {\r\n globalThis.window.clearTimeout(timeoutId);\r\n });\r\n },\r\n [],\r\n );\r\n\r\n const createRipple = React.useCallback((event: React.MouseEvent<HTMLButtonElement>): void => {\r\n const button = buttonRef.current;\r\n if (!button) {\r\n return;\r\n }\r\n\r\n const rect = button.getBoundingClientRect();\r\n const x = event.clientX - rect.left;\r\n const y = event.clientY - rect.top;\r\n\r\n const newRipple: Ripple = {\r\n id: Date.now(),\r\n x,\r\n y,\r\n };\r\n\r\n setRipples((previousRipples) => [...previousRipples, newRipple]);\r\n\r\n const timeoutId = globalThis.window.setTimeout(() => {\r\n setRipples((previousRipples) => previousRipples.filter((ripple) => ripple.id !== newRipple.id));\r\n }, 600);\r\n\r\n timeoutIdsRef.current = [...timeoutIdsRef.current, timeoutId];\r\n }, []);\r\n\r\n const handleClick = React.useCallback(\r\n (event: React.MouseEvent<HTMLButtonElement>): void => {\r\n createRipple(event);\r\n onClick?.(event);\r\n },\r\n [createRipple, onClick],\r\n );\r\n\r\n return (\r\n <motion.button\r\n ref={buttonRef}\r\n onClick={handleClick}\r\n whileTap={{scale: 0.95}}\r\n whileHover={{scale: 1.05}}\r\n className={cn(styles.button, className)}\r\n {...restProps}>\r\n <span className={styles.content}>{children}</span>\r\n {ripples.map((ripple) => (\r\n <motion.span\r\n key={ripple.id}\r\n initial={{scale: 0, opacity: 0.5}}\r\n animate={{scale, opacity: 0}}\r\n transition={transition}\r\n className={cn(styles.ripple, rippleClassName)}\r\n style={{\r\n top: ripple.y - 10,\r\n left: ripple.x - 10,\r\n }}\r\n />\r\n ))}\r\n </motion.button>\r\n );\r\n },\r\n);\r\n\r\nRippleButton.displayName = \"RippleButton\";\r\n\r\nexport {RippleButton};\r\n"],"names":["RippleButton","React","children","onClick","className","rippleClassName","scale","transition","props","ref","_ignoredKey","restProps","ripples","setRipples","buttonRef","timeoutIdsRef","timeoutId","globalThis","createRipple","event","button","rect","x","y","newRipple","Date","previousRipples","ripple","handleClick","motion","cn","styles"],"mappings":";;;;;;AA0CA,MAAMA,eAAe,WAAHA,GAAGC,WACnB,CAAC,EAACC,QAAQ,EAAEC,OAAO,EAAEC,SAAS,EAAEC,eAAe,EAAEC,QAAQ,EAAE,EAAEC,aAAa;IAAC,UAAU;IAAK,MAAM;AAAS,CAAC,EAAE,GAAGC,OAAM,EAAEC;IAErH,MAAM,EAAC,KAAKC,WAAW,EAAE,GAAGC,WAAU,GAAGH;IACzC,MAAM,CAACI,SAASC,WAAW,GAAGZ,SAAsC,EAAE;IACtE,MAAMa,YAAYb,OAAgC;IAClD,MAAMc,gBAAgBd,OAAoC,EAAE;IAE5DA,oBAA0BQ,KAAK,IAAMK,UAAU,OAAO,EAAG,EAAE;IAE3Db,UACE,IAAM;YACJc,cAAc,OAAO,CAAC,OAAO,CAAC,CAACC;gBAC7BC,WAAW,MAAM,CAAC,YAAY,CAACD;YACjC;QACF,GACA,EAAE;IAGJ,MAAME,eAAejB,YAAkB,CAACkB;QACtC,MAAMC,SAASN,UAAU,OAAO;QAChC,IAAI,CAACM,QACH;QAGF,MAAMC,OAAOD,OAAO,qBAAqB;QACzC,MAAME,IAAIH,MAAM,OAAO,GAAGE,KAAK,IAAI;QACnC,MAAME,IAAIJ,MAAM,OAAO,GAAGE,KAAK,GAAG;QAElC,MAAMG,YAAoB;YACxB,IAAIC,KAAK,GAAG;YACZH;YACAC;QACF;QAEAV,WAAW,CAACa,kBAAoB;mBAAIA;gBAAiBF;aAAU;QAE/D,MAAMR,YAAYC,WAAW,MAAM,CAAC,UAAU,CAAC;YAC7CJ,WAAW,CAACa,kBAAoBA,gBAAgB,MAAM,CAAC,CAACC,SAAWA,OAAO,EAAE,KAAKH,UAAU,EAAE;QAC/F,GAAG;QAEHT,cAAc,OAAO,GAAG;eAAIA,cAAc,OAAO;YAAEC;SAAU;IAC/D,GAAG,EAAE;IAEL,MAAMY,cAAc3B,YAClB,CAACkB;QACCD,aAAaC;QACbhB,UAAUgB;IACZ,GACA;QAACD;QAAcf;KAAQ;IAGzB,OAAO,WAAP,GACE,KAAC0B,OAAO,MAAM;QACZ,KAAKf;QACL,SAASc;QACT,UAAU;YAAC,OAAO;QAAI;QACtB,YAAY;YAAC,OAAO;QAAI;QACxB,WAAWE,GAAGC,qBAAAA,MAAa,EAAE3B;QAC5B,GAAGO,SAAS;;0BACb,IAAC;gBAAK,WAAWoB,qBAAAA,OAAc;0BAAG7B;;YACjCU,QAAQ,GAAG,CAAC,CAACe,SAAAA,WAAAA,GACZ,IAACE,OAAO,IAAI;oBAEV,SAAS;wBAAC,OAAO;wBAAG,SAAS;oBAAG;oBAChC,SAAS;wBAACvB;wBAAO,SAAS;oBAAC;oBAC3B,YAAYC;oBACZ,WAAWuB,GAAGC,qBAAAA,MAAa,EAAE1B;oBAC7B,OAAO;wBACL,KAAKsB,OAAO,CAAC,GAAG;wBAChB,MAAMA,OAAO,CAAC,GAAG;oBACnB;mBARKA,OAAO,EAAE;;;AAaxB;AAGF3B,aAAa,WAAW,GAAG"}
1
+ {"version":3,"file":"components/ui/ripple-button.js","sources":["../../../src/components/ui/ripple-button.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {motion, type HTMLMotionProps, type Transition} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./ripple-button.module.css\";\r\n\r\ninterface Ripple {\r\n id: number;\r\n x: number;\r\n y: number;\r\n}\r\n\r\n/** Props accepted by {@link RippleButton}. */\r\nexport interface RippleButtonProps extends HTMLMotionProps<\"button\"> {\r\n /** Button contents rendered above the ripple layer. @default undefined */\r\n children: React.ReactNode;\r\n /** Additional CSS classes merged with each generated ripple. @default undefined */\r\n rippleClassName?: string;\r\n /** Final expansion scale applied to each ripple animation. @default 10 */\r\n scale?: number;\r\n /** Motion timing used for each ripple animation. @default {duration: 0.6, ease: \"easeOut\"} */\r\n transition?: Transition;\r\n}\r\n\r\n/**\r\n * Renders a pressable button that emits animated ripples from the click position.\r\n *\r\n * @remarks\r\n * - Animated component using the `motion` library\r\n * - Renders a `<button>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n * - Client-side only (`\"use client\"` directive)\r\n *\r\n * @example\r\n * ```tsx\r\n * <RippleButton>Click me</RippleButton>\r\n * ```\r\n *\r\n * @see {@link RippleButtonProps} for available props\r\n */\r\nconst RippleButton = React.forwardRef<HTMLButtonElement, RippleButtonProps>(\r\n ({children, onClick, className, rippleClassName, scale = 10, transition = {duration: 0.6, ease: \"easeOut\"}, ...props}, ref) => {\r\n // eslint-disable-next-line sonarjs/no-unused-vars -- removing React key avoids implicit key spreading\r\n const {key: _ignoredKey, ...restProps} = props;\r\n const [ripples, setRipples] = React.useState<ReadonlyArray<Ripple>>([]);\r\n const buttonRef = React.useRef<HTMLButtonElement>(null);\r\n const timeoutIdsRef = React.useRef<ReadonlyArray<number>>([]);\r\n\r\n React.useImperativeHandle(ref, () => buttonRef.current!, []);\r\n\r\n React.useEffect(\r\n () => () => {\r\n timeoutIdsRef.current.forEach((timeoutId) => {\r\n globalThis.window.clearTimeout(timeoutId);\r\n });\r\n },\r\n [],\r\n );\r\n\r\n const createRipple = React.useCallback((event: React.MouseEvent<HTMLButtonElement>): void => {\r\n const button = buttonRef.current;\r\n if (!button) {\r\n return;\r\n }\r\n\r\n const rect = button.getBoundingClientRect();\r\n const x = event.clientX - rect.left;\r\n const y = event.clientY - rect.top;\r\n\r\n const newRipple: Ripple = {\r\n id: Date.now(),\r\n x,\r\n y,\r\n };\r\n\r\n setRipples((previousRipples) => [...previousRipples, newRipple]);\r\n\r\n const timeoutId = globalThis.window.setTimeout(() => {\r\n setRipples((previousRipples) => previousRipples.filter((ripple) => ripple.id !== newRipple.id));\r\n }, 600);\r\n\r\n timeoutIdsRef.current = [...timeoutIdsRef.current, timeoutId];\r\n }, []);\r\n\r\n const handleClick = React.useCallback(\r\n (event: React.MouseEvent<HTMLButtonElement>): void => {\r\n createRipple(event);\r\n onClick?.(event);\r\n },\r\n [createRipple, onClick],\r\n );\r\n\r\n return (\r\n <motion.button\r\n ref={buttonRef}\r\n onClick={handleClick}\r\n whileTap={{scale: 0.95}}\r\n whileHover={{scale: 1.05}}\r\n className={cn(styles.button, className)}\r\n {...restProps}>\r\n <span className={styles.content}>{children}</span>\r\n {ripples.map((ripple) => (\r\n <motion.span\r\n key={ripple.id}\r\n initial={{scale: 0, opacity: 0.5}}\r\n animate={{scale, opacity: 0}}\r\n transition={transition}\r\n className={cn(styles.ripple, rippleClassName)}\r\n style={{\r\n top: ripple.y - 10,\r\n left: ripple.x - 10,\r\n }}\r\n />\r\n ))}\r\n </motion.button>\r\n );\r\n },\r\n);\r\n\r\nRippleButton.displayName = \"RippleButton\";\r\n\r\nexport {RippleButton};\r\n"],"names":["RippleButton","React","children","onClick","className","rippleClassName","scale","transition","props","ref","_ignoredKey","restProps","ripples","setRipples","buttonRef","timeoutIdsRef","timeoutId","globalThis","createRipple","event","button","rect","x","y","newRipple","Date","previousRipples","ripple","handleClick","motion","cn","styles"],"mappings":";;;;;;AA0CA,MAAMA,eAAe,WAAHA,GAAGC,wBAAAA,UAAgB,CACnC,CAAC,EAACC,QAAQ,EAAEC,OAAO,EAAEC,SAAS,EAAEC,eAAe,EAAEC,QAAQ,EAAE,EAAEC,aAAa;IAAC,UAAU;IAAK,MAAM;AAAS,CAAC,EAAE,GAAGC,OAAM,EAAEC;IAErH,MAAM,EAAC,KAAKC,WAAW,EAAE,GAAGC,WAAU,GAAGH;IACzC,MAAM,CAACI,SAASC,WAAW,GAAGZ,wBAAAA,QAAc,CAAwB,EAAE;IACtE,MAAMa,YAAYb,wBAAAA,MAAY,CAAoB;IAClD,MAAMc,gBAAgBd,wBAAAA,MAAY,CAAwB,EAAE;IAE5DA,wBAAAA,mBAAyB,CAACQ,KAAK,IAAMK,UAAU,OAAO,EAAG,EAAE;IAE3Db,wBAAAA,SAAe,CACb,IAAM;YACJc,cAAc,OAAO,CAAC,OAAO,CAAC,CAACC;gBAC7BC,WAAW,MAAM,CAAC,YAAY,CAACD;YACjC;QACF,GACA,EAAE;IAGJ,MAAME,eAAejB,wBAAAA,WAAiB,CAAC,CAACkB;QACtC,MAAMC,SAASN,UAAU,OAAO;QAChC,IAAI,CAACM,QACH;QAGF,MAAMC,OAAOD,OAAO,qBAAqB;QACzC,MAAME,IAAIH,MAAM,OAAO,GAAGE,KAAK,IAAI;QACnC,MAAME,IAAIJ,MAAM,OAAO,GAAGE,KAAK,GAAG;QAElC,MAAMG,YAAoB;YACxB,IAAIC,KAAK,GAAG;YACZH;YACAC;QACF;QAEAV,WAAW,CAACa,kBAAoB;mBAAIA;gBAAiBF;aAAU;QAE/D,MAAMR,YAAYC,WAAW,MAAM,CAAC,UAAU,CAAC;YAC7CJ,WAAW,CAACa,kBAAoBA,gBAAgB,MAAM,CAAC,CAACC,SAAWA,OAAO,EAAE,KAAKH,UAAU,EAAE;QAC/F,GAAG;QAEHT,cAAc,OAAO,GAAG;eAAIA,cAAc,OAAO;YAAEC;SAAU;IAC/D,GAAG,EAAE;IAEL,MAAMY,cAAc3B,wBAAAA,WAAiB,CACnC,CAACkB;QACCD,aAAaC;QACbhB,UAAUgB;IACZ,GACA;QAACD;QAAcf;KAAQ;IAGzB,OAAO,WAAP,GACE,KAAC0B,OAAO,MAAM;QACZ,KAAKf;QACL,SAASc;QACT,UAAU;YAAC,OAAO;QAAI;QACtB,YAAY;YAAC,OAAO;QAAI;QACxB,WAAWE,GAAGC,qBAAAA,MAAa,EAAE3B;QAC5B,GAAGO,SAAS;;0BACb,IAAC;gBAAK,WAAWoB,qBAAAA,OAAc;0BAAG7B;;YACjCU,QAAQ,GAAG,CAAC,CAACe,SAAAA,WAAAA,GACZ,IAACE,OAAO,IAAI;oBAEV,SAAS;wBAAC,OAAO;wBAAG,SAAS;oBAAG;oBAChC,SAAS;wBAACvB;wBAAO,SAAS;oBAAC;oBAC3B,YAAYC;oBACZ,WAAWuB,GAAGC,qBAAAA,MAAa,EAAE1B;oBAC7B,OAAO;wBACL,KAAKsB,OAAO,CAAC,GAAG;wBAChB,MAAMA,OAAO,CAAC,GAAG;oBACnB;mBARKA,OAAO,EAAE;;;AAaxB;AAGF3B,aAAa,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/ripple-button.module.css","webpack://./src/components/ui/ripple-button.module.css"],"names":[],"mappings":"AADA;ECEE,6BAA6B;EAC7B,kCAAkC;EAClC,mCAAmC;EACnC,eAAe;EACf,4BAA4B;EAC5B,SAAS;EACT,uBAAuB;EACvB,mBAAmB;EACnB,cAAc;EACd,mBAAmB;EACnB,gBAAgB;EAChB,oBAAoB;EACpB,kBAAkB;EAClB,gBAAgB;AAClB;;AAEA;EACE,iCAAiC;EACjC,mBAAmB;AACrB;;AAEA;EACE,UAAU;EACV,kBAAkB;AACpB;;AAEA;EACE,wCAAwC;EACxC,oBAAoB;EACpB,qBAAqB;EACrB,cAAc;EACd,eAAe;EACf,kBAAkB;AACpB","sourcesContent":[".button{align-items:center;background:var(--ac-primary);border:0;border-radius:var(--ac-radius-lg);color:var(--ac-primary-foreground);cursor:pointer;display:inline-flex;font-size:var(--ac-text-sm);font-weight:500;height:2.5rem;justify-content:center;overflow:hidden;padding:.5rem 1rem;position:relative}.button:focus-visible{outline:2px solid var(--ac-ring);outline-offset:2px}.content{position:relative;z-index:1}.ripple{background:var(--ac-primary-foreground);border-radius:9999px;height:1.25rem;pointer-events:none;position:absolute;width:1.25rem}",".button {\n background: var(--ac-primary);\n border-radius: var(--ac-radius-lg);\n color: var(--ac-primary-foreground);\n cursor: pointer;\n font-size: var(--ac-text-sm);\n border: 0;\n justify-content: center;\n align-items: center;\n height: 2.5rem;\n padding: .5rem 1rem;\n font-weight: 500;\n display: inline-flex;\n position: relative;\n overflow: hidden;\n}\n\n.button:focus-visible {\n outline: 2px solid var(--ac-ring);\n outline-offset: 2px;\n}\n\n.content {\n z-index: 1;\n position: relative;\n}\n\n.ripple {\n background: var(--ac-primary-foreground);\n pointer-events: none;\n border-radius: 9999px;\n width: 1.25rem;\n height: 1.25rem;\n position: absolute;\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./../../node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].oneOf[2].use[2]!/home/runner/work/arolariu.ro/arolariu.ro/node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/postcss-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[3]!/home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/ripple-button.module.css","webpack://./src/components/ui/ripple-button.module.css"],"names":[],"mappings":"AAAA;ECCE,6BAA6B;EAC7B,kCAAkC;EAClC,mCAAmC;EACnC,eAAe;EACf,4BAA4B;EAC5B,SAAS;EACT,uBAAuB;EACvB,mBAAmB;EACnB,cAAc;EACd,mBAAmB;EACnB,gBAAgB;EAChB,oBAAoB;EACpB,kBAAkB;EAClB,gBAAgB;AAClB;;ADf+S;ECkB7S,iCAAiC;EACjC,mBAAmB;AACrB;;ADpByX;ECuBvX,UAAU;EACV,kBAAkB;AACpB;;ADzB8Z;EC4B5Z,wCAAwC;EACxC,oBAAoB;EACpB,qBAAqB;EACrB,cAAc;EACd,eAAe;EACf,kBAAkB;AACpB","sourcesContent":[".button{align-items:center;background:var(--ac-primary);border:0;border-radius:var(--ac-radius-lg);color:var(--ac-primary-foreground);cursor:pointer;display:inline-flex;font-size:var(--ac-text-sm);font-weight:500;height:2.5rem;justify-content:center;overflow:hidden;padding:.5rem 1rem;position:relative}.button:focus-visible{outline:2px solid var(--ac-ring);outline-offset:2px}.content{position:relative;z-index:1}.ripple{background:var(--ac-primary-foreground);border-radius:9999px;height:1.25rem;pointer-events:none;position:absolute;width:1.25rem}",".button {\n background: var(--ac-primary);\n border-radius: var(--ac-radius-lg);\n color: var(--ac-primary-foreground);\n cursor: pointer;\n font-size: var(--ac-text-sm);\n border: 0;\n justify-content: center;\n align-items: center;\n height: 2.5rem;\n padding: .5rem 1rem;\n font-weight: 500;\n display: inline-flex;\n position: relative;\n overflow: hidden;\n}\n\n.button:focus-visible {\n outline: 2px solid var(--ac-ring);\n outline-offset: 2px;\n}\n\n.content {\n z-index: 1;\n position: relative;\n}\n\n.ripple {\n background: var(--ac-primary-foreground);\n pointer-events: none;\n border-radius: 9999px;\n width: 1.25rem;\n height: 1.25rem;\n position: absolute;\n}\n"],"sourceRoot":""}
@@ -32,5 +32,5 @@ export interface ScratcherProps {
32
32
  *
33
33
  * @see {@link ScratcherProps} for available props
34
34
  */
35
- export declare const Scratcher: React.FC<ScratcherProps>;
35
+ export declare const Scratcher: React.ForwardRefExoticComponent<ScratcherProps & React.RefAttributes<HTMLDivElement>>;
36
36
  //# sourceMappingURL=scratcher.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scratcher.d.ts","sourceRoot":"","sources":["../../../src/components/ui/scratcher.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAKzD,2CAA2C;AAC3C,MAAM,WAAW,cAAc;IAC7B,+EAA+E;IAC/E,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,MAAM,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,wFAAwF;IACxF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4FAA4F;IAC5F,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,uGAAuG;IACvG,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CAC3C;AAKD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAqJ9C,CAAC"}
1
+ {"version":3,"file":"scratcher.d.ts","sourceRoot":"","sources":["../../../src/components/ui/scratcher.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAKzD,2CAA2C;AAC3C,MAAM,WAAW,cAAc;IAC7B,+EAA+E;IAC/E,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,MAAM,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,wFAAwF;IACxF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4FAA4F;IAC5F,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,uGAAuG;IACvG,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CAC3C;AAKD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,SAAS,uFAiJpB,CAAC"}
@@ -10,7 +10,7 @@ const defaultGradientColors = [
10
10
  "#FDCC92"
11
11
  ];
12
12
  const ignoreAnimationError = ()=>null;
13
- const Scratcher = ({ width, height, minScratchPercentage = 50, onComplete, children, className, gradientColors = defaultGradientColors })=>{
13
+ const scratcher_Scratcher = /*#__PURE__*/ react.forwardRef(function({ width, height, minScratchPercentage = 50, onComplete, children, className, gradientColors = defaultGradientColors }, forwardedRef) {
14
14
  const canvasRef = useRef(null);
15
15
  const [isScratching, setIsScratching] = useState(false);
16
16
  const [isComplete, setIsComplete] = useState(false);
@@ -119,6 +119,7 @@ const Scratcher = ({ width, height, minScratchPercentage = 50, onComplete, child
119
119
  scratch
120
120
  ]);
121
121
  return /*#__PURE__*/ jsxs(motion.div, {
122
+ ref: forwardedRef,
122
123
  className: cn(scratcher_module.root, className),
123
124
  style: {
124
125
  width,
@@ -138,8 +139,8 @@ const Scratcher = ({ width, height, minScratchPercentage = 50, onComplete, child
138
139
  children
139
140
  ]
140
141
  });
141
- };
142
- Scratcher.displayName = "Scratcher";
143
- export { Scratcher };
142
+ });
143
+ scratcher_Scratcher.displayName = "Scratcher";
144
+ export { scratcher_Scratcher as Scratcher };
144
145
 
145
146
  //# sourceMappingURL=scratcher.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/ui/scratcher.js","sources":["../../../src/components/ui/scratcher.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {motion, useAnimation} from \"motion/react\";\r\nimport React, {useEffect, useRef, useState} from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./scratcher.module.css\";\r\n\r\n/** Props accepted by {@link Scratcher}. */\r\nexport interface ScratcherProps {\r\n /** Content revealed after the overlay is scratched away. @default undefined */\r\n children: React.ReactNode;\r\n /** Width of the scratch card surface in pixels. @default undefined */\r\n width: number;\r\n /** Height of the scratch card surface in pixels. @default undefined */\r\n height: number;\r\n /** Percentage of cleared pixels required before completion fires. @default 50 */\r\n minScratchPercentage?: number;\r\n /** Additional CSS classes merged with the scratch card container. @default undefined */\r\n className?: string;\r\n /** Callback invoked once the scratch completion threshold is reached. @default undefined */\r\n onComplete?: () => void;\r\n /** Three-stop gradient used for the scratchable overlay. @default [\"#A97CF8\", \"#F38CB8\", \"#FDCC92\"] */\r\n gradientColors?: [string, string, string];\r\n}\r\n\r\nconst defaultGradientColors: [string, string, string] = [\"#A97CF8\", \"#F38CB8\", \"#FDCC92\"];\r\nconst ignoreAnimationError = (): null => null;\r\n\r\n/**\r\n * Renders a scratch-card reveal surface with animated completion feedback.\r\n *\r\n * @remarks\r\n * - Animated component using the `motion` library\r\n * - Renders a `<div>` element containing a `<canvas>`\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n * - Client-side only (`\"use client\"` directive)\r\n *\r\n * @example\r\n * ```tsx\r\n * <Scratcher width={320} height={180}>Prize unlocked</Scratcher>\r\n * ```\r\n *\r\n * @see {@link ScratcherProps} for available props\r\n */\r\nexport const Scratcher: React.FC<ScratcherProps> = ({\r\n width,\r\n height,\r\n minScratchPercentage = 50,\r\n onComplete,\r\n children,\r\n className,\r\n gradientColors = defaultGradientColors,\r\n}): React.JSX.Element => {\r\n const canvasRef = useRef<HTMLCanvasElement>(null);\r\n const [isScratching, setIsScratching] = useState(false);\r\n const [isComplete, setIsComplete] = useState(false);\r\n\r\n const controls = useAnimation();\r\n\r\n useEffect(() => {\r\n const canvas = canvasRef.current;\r\n const context = canvas?.getContext(\"2d\");\r\n if (!canvas || !context) {\r\n return;\r\n }\r\n\r\n context.fillStyle = \"#ccc\";\r\n context.fillRect(0, 0, canvas.width, canvas.height);\r\n const gradient = context.createLinearGradient(0, 0, canvas.width, canvas.height);\r\n gradient.addColorStop(0, gradientColors[0]);\r\n gradient.addColorStop(0.5, gradientColors[1]);\r\n gradient.addColorStop(1, gradientColors[2]);\r\n context.fillStyle = gradient;\r\n context.fillRect(0, 0, canvas.width, canvas.height);\r\n }, [gradientColors]);\r\n\r\n const scratch = React.useCallback((clientX: number, clientY: number): void => {\r\n const canvas = canvasRef.current;\r\n const context = canvas?.getContext(\"2d\");\r\n if (!canvas || !context) {\r\n return;\r\n }\r\n\r\n const rect = canvas.getBoundingClientRect();\r\n const x = clientX - rect.left + 16;\r\n const y = clientY - rect.top + 16;\r\n context.globalCompositeOperation = \"destination-out\";\r\n context.beginPath();\r\n context.arc(x, y, 30, 0, Math.PI * 2);\r\n context.fill();\r\n }, []);\r\n\r\n const startAnimation = React.useCallback(async (): Promise<void> => {\r\n await controls.start({\r\n scale: [1, 1.5, 1],\r\n rotate: [0, 10, -10, 10, -10, 0],\r\n transition: {duration: 0.5},\r\n });\r\n\r\n onComplete?.();\r\n }, [controls, onComplete]);\r\n\r\n const checkCompletion = React.useCallback((): void => {\r\n if (isComplete) {\r\n return;\r\n }\r\n\r\n const canvas = canvasRef.current;\r\n const context = canvas?.getContext(\"2d\");\r\n if (!canvas || !context) {\r\n return;\r\n }\r\n\r\n const imageData = context.getImageData(0, 0, canvas.width, canvas.height);\r\n const pixels = imageData.data;\r\n const totalPixels = pixels.length / 4;\r\n let clearPixels = 0;\r\n\r\n for (let index = 3; index < pixels.length; index += 4) {\r\n if (pixels[index] === 0) {\r\n clearPixels += 1;\r\n }\r\n }\r\n\r\n const percentage = (clearPixels / totalPixels) * 100;\r\n if (percentage >= minScratchPercentage) {\r\n setIsComplete(true);\r\n context.clearRect(0, 0, canvas.width, canvas.height);\r\n startAnimation().catch(ignoreAnimationError);\r\n }\r\n }, [isComplete, minScratchPercentage, startAnimation]);\r\n\r\n useEffect(() => {\r\n const handleDocumentMouseMove = (event: MouseEvent): void => {\r\n if (isScratching) {\r\n scratch(event.clientX, event.clientY);\r\n }\r\n };\r\n\r\n const handleDocumentTouchMove = (event: TouchEvent): void => {\r\n if (!isScratching) {\r\n return;\r\n }\r\n\r\n const [touch] = event.touches;\r\n if (!touch) {\r\n return;\r\n }\r\n\r\n scratch(touch.clientX, touch.clientY);\r\n };\r\n\r\n const handleDocumentPointerEnd = (): void => {\r\n setIsScratching(false);\r\n checkCompletion();\r\n };\r\n\r\n globalThis.document.addEventListener(\"mousemove\", handleDocumentMouseMove);\r\n globalThis.document.addEventListener(\"touchmove\", handleDocumentTouchMove);\r\n globalThis.document.addEventListener(\"mouseup\", handleDocumentPointerEnd);\r\n globalThis.document.addEventListener(\"touchend\", handleDocumentPointerEnd);\r\n globalThis.document.addEventListener(\"touchcancel\", handleDocumentPointerEnd);\r\n\r\n return () => {\r\n globalThis.document.removeEventListener(\"mousemove\", handleDocumentMouseMove);\r\n globalThis.document.removeEventListener(\"touchmove\", handleDocumentTouchMove);\r\n globalThis.document.removeEventListener(\"mouseup\", handleDocumentPointerEnd);\r\n globalThis.document.removeEventListener(\"touchend\", handleDocumentPointerEnd);\r\n globalThis.document.removeEventListener(\"touchcancel\", handleDocumentPointerEnd);\r\n };\r\n }, [checkCompletion, isScratching, scratch]);\r\n\r\n return (\r\n <motion.div\r\n className={cn(styles.root, className)}\r\n style={{\r\n width,\r\n height,\r\n cursor:\r\n \"url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDMyIDMyIj4KICA8Y2lyY2xlIGN4PSIxNiIgY3k9IjE2IiByPSIxNSIgc3R5bGU9ImZpbGw6I2ZmZjtzdHJva2U6IzAwMDtzdHJva2Utd2lkdGg6MXB4OyIgLz4KPC9zdmc+'), auto\",\r\n }}\r\n animate={controls}>\r\n <canvas\r\n ref={canvasRef}\r\n width={width}\r\n height={height}\r\n className={styles.canvas}\r\n onMouseDown={() => setIsScratching(true)}\r\n onTouchStart={() => setIsScratching(true)}\r\n />\r\n {children}\r\n </motion.div>\r\n );\r\n};\r\n\r\nScratcher.displayName = \"Scratcher\";\r\n"],"names":["defaultGradientColors","ignoreAnimationError","Scratcher","width","height","minScratchPercentage","onComplete","children","className","gradientColors","canvasRef","useRef","isScratching","setIsScratching","useState","isComplete","setIsComplete","controls","useAnimation","useEffect","canvas","context","gradient","scratch","React","clientX","clientY","rect","x","y","Math","startAnimation","checkCompletion","imageData","pixels","totalPixels","clearPixels","index","percentage","handleDocumentMouseMove","event","handleDocumentTouchMove","touch","handleDocumentPointerEnd","globalThis","motion","cn","styles"],"mappings":"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"}
1
+ {"version":3,"file":"components/ui/scratcher.js","sources":["../../../src/components/ui/scratcher.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {motion, useAnimation} from \"motion/react\";\r\nimport React, {useEffect, useRef, useState} from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./scratcher.module.css\";\r\n\r\n/** Props accepted by {@link Scratcher}. */\r\nexport interface ScratcherProps {\r\n /** Content revealed after the overlay is scratched away. @default undefined */\r\n children: React.ReactNode;\r\n /** Width of the scratch card surface in pixels. @default undefined */\r\n width: number;\r\n /** Height of the scratch card surface in pixels. @default undefined */\r\n height: number;\r\n /** Percentage of cleared pixels required before completion fires. @default 50 */\r\n minScratchPercentage?: number;\r\n /** Additional CSS classes merged with the scratch card container. @default undefined */\r\n className?: string;\r\n /** Callback invoked once the scratch completion threshold is reached. @default undefined */\r\n onComplete?: () => void;\r\n /** Three-stop gradient used for the scratchable overlay. @default [\"#A97CF8\", \"#F38CB8\", \"#FDCC92\"] */\r\n gradientColors?: [string, string, string];\r\n}\r\n\r\nconst defaultGradientColors: [string, string, string] = [\"#A97CF8\", \"#F38CB8\", \"#FDCC92\"];\r\nconst ignoreAnimationError = (): null => null;\r\n\r\n/**\r\n * Renders a scratch-card reveal surface with animated completion feedback.\r\n *\r\n * @remarks\r\n * - Animated component using the `motion` library\r\n * - Renders a `<div>` element containing a `<canvas>`\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n * - Client-side only (`\"use client\"` directive)\r\n *\r\n * @example\r\n * ```tsx\r\n * <Scratcher width={320} height={180}>Prize unlocked</Scratcher>\r\n * ```\r\n *\r\n * @see {@link ScratcherProps} for available props\r\n */\r\nexport const Scratcher = React.forwardRef<HTMLDivElement, ScratcherProps>(function Scratcher(\r\n {width, height, minScratchPercentage = 50, onComplete, children, className, gradientColors = defaultGradientColors},\r\n forwardedRef,\r\n) {\r\n const canvasRef = useRef<HTMLCanvasElement>(null);\r\n const [isScratching, setIsScratching] = useState(false);\r\n const [isComplete, setIsComplete] = useState(false);\r\n\r\n const controls = useAnimation();\r\n\r\n useEffect(() => {\r\n const canvas = canvasRef.current;\r\n const context = canvas?.getContext(\"2d\");\r\n if (!canvas || !context) {\r\n return;\r\n }\r\n\r\n context.fillStyle = \"#ccc\";\r\n context.fillRect(0, 0, canvas.width, canvas.height);\r\n const gradient = context.createLinearGradient(0, 0, canvas.width, canvas.height);\r\n gradient.addColorStop(0, gradientColors[0]);\r\n gradient.addColorStop(0.5, gradientColors[1]);\r\n gradient.addColorStop(1, gradientColors[2]);\r\n context.fillStyle = gradient;\r\n context.fillRect(0, 0, canvas.width, canvas.height);\r\n }, [gradientColors]);\r\n\r\n const scratch = React.useCallback((clientX: number, clientY: number): void => {\r\n const canvas = canvasRef.current;\r\n const context = canvas?.getContext(\"2d\");\r\n if (!canvas || !context) {\r\n return;\r\n }\r\n\r\n const rect = canvas.getBoundingClientRect();\r\n const x = clientX - rect.left + 16;\r\n const y = clientY - rect.top + 16;\r\n context.globalCompositeOperation = \"destination-out\";\r\n context.beginPath();\r\n context.arc(x, y, 30, 0, Math.PI * 2);\r\n context.fill();\r\n }, []);\r\n\r\n const startAnimation = React.useCallback(async (): Promise<void> => {\r\n await controls.start({\r\n scale: [1, 1.5, 1],\r\n rotate: [0, 10, -10, 10, -10, 0],\r\n transition: {duration: 0.5},\r\n });\r\n\r\n onComplete?.();\r\n }, [controls, onComplete]);\r\n\r\n const checkCompletion = React.useCallback((): void => {\r\n if (isComplete) {\r\n return;\r\n }\r\n\r\n const canvas = canvasRef.current;\r\n const context = canvas?.getContext(\"2d\");\r\n if (!canvas || !context) {\r\n return;\r\n }\r\n\r\n const imageData = context.getImageData(0, 0, canvas.width, canvas.height);\r\n const pixels = imageData.data;\r\n const totalPixels = pixels.length / 4;\r\n let clearPixels = 0;\r\n\r\n for (let index = 3; index < pixels.length; index += 4) {\r\n if (pixels[index] === 0) {\r\n clearPixels += 1;\r\n }\r\n }\r\n\r\n const percentage = (clearPixels / totalPixels) * 100;\r\n if (percentage >= minScratchPercentage) {\r\n setIsComplete(true);\r\n context.clearRect(0, 0, canvas.width, canvas.height);\r\n startAnimation().catch(ignoreAnimationError);\r\n }\r\n }, [isComplete, minScratchPercentage, startAnimation]);\r\n\r\n useEffect(() => {\r\n const handleDocumentMouseMove = (event: MouseEvent): void => {\r\n if (isScratching) {\r\n scratch(event.clientX, event.clientY);\r\n }\r\n };\r\n\r\n const handleDocumentTouchMove = (event: TouchEvent): void => {\r\n if (!isScratching) {\r\n return;\r\n }\r\n\r\n const [touch] = event.touches;\r\n if (!touch) {\r\n return;\r\n }\r\n\r\n scratch(touch.clientX, touch.clientY);\r\n };\r\n\r\n const handleDocumentPointerEnd = (): void => {\r\n setIsScratching(false);\r\n checkCompletion();\r\n };\r\n\r\n globalThis.document.addEventListener(\"mousemove\", handleDocumentMouseMove);\r\n globalThis.document.addEventListener(\"touchmove\", handleDocumentTouchMove);\r\n globalThis.document.addEventListener(\"mouseup\", handleDocumentPointerEnd);\r\n globalThis.document.addEventListener(\"touchend\", handleDocumentPointerEnd);\r\n globalThis.document.addEventListener(\"touchcancel\", handleDocumentPointerEnd);\r\n\r\n return () => {\r\n globalThis.document.removeEventListener(\"mousemove\", handleDocumentMouseMove);\r\n globalThis.document.removeEventListener(\"touchmove\", handleDocumentTouchMove);\r\n globalThis.document.removeEventListener(\"mouseup\", handleDocumentPointerEnd);\r\n globalThis.document.removeEventListener(\"touchend\", handleDocumentPointerEnd);\r\n globalThis.document.removeEventListener(\"touchcancel\", handleDocumentPointerEnd);\r\n };\r\n }, [checkCompletion, isScratching, scratch]);\r\n\r\n return (\r\n <motion.div\r\n ref={forwardedRef}\r\n className={cn(styles.root, className)}\r\n style={{\r\n width,\r\n height,\r\n cursor:\r\n \"url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDMyIDMyIj4KICA8Y2lyY2xlIGN4PSIxNiIgY3k9IjE2IiByPSIxNSIgc3R5bGU9ImZpbGw6I2ZmZjtzdHJva2U6IzAwMDtzdHJva2Utd2lkdGg6MXB4OyIgLz4KPC9zdmc+'), auto\",\r\n }}\r\n animate={controls}>\r\n <canvas\r\n ref={canvasRef}\r\n width={width}\r\n height={height}\r\n className={styles.canvas}\r\n onMouseDown={() => setIsScratching(true)}\r\n onTouchStart={() => setIsScratching(true)}\r\n />\r\n {children}\r\n </motion.div>\r\n );\r\n});\r\n\r\nScratcher.displayName = \"Scratcher\";\r\n"],"names":["defaultGradientColors","ignoreAnimationError","Scratcher","React","width","height","minScratchPercentage","onComplete","children","className","gradientColors","forwardedRef","canvasRef","useRef","isScratching","setIsScratching","useState","isComplete","setIsComplete","controls","useAnimation","useEffect","canvas","context","gradient","scratch","clientX","clientY","rect","x","y","Math","startAnimation","checkCompletion","imageData","pixels","totalPixels","clearPixels","index","percentage","handleDocumentMouseMove","event","handleDocumentTouchMove","touch","handleDocumentPointerEnd","globalThis","motion","cn","styles"],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/scratcher.module.css","webpack://./src/components/ui/scratcher.module.css"],"names":[],"mappings":"AADA;ECEE,yBAAyB;EACzB,iBAAiB;EACjB,kBAAkB;AACpB;;AAEA;EACE,kBAAkB;EAClB,QAAQ;AACV","sourcesContent":[".root{position:relative;user-select:none}.canvas{inset:0;position:absolute}",".root {\n -webkit-user-select: none;\n user-select: none;\n position: relative;\n}\n\n.canvas {\n position: absolute;\n inset: 0;\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./../../node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].oneOf[2].use[2]!/home/runner/work/arolariu.ro/arolariu.ro/node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/postcss-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[3]!/home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/scratcher.module.css","webpack://./src/components/ui/scratcher.module.css"],"names":[],"mappings":"AAAA;ECCE,yBAAyB;EACzB,iBAAiB;EACjB,kBAAkB;AACpB;;ADJyC;ECOvC,kBAAkB;EAClB,QAAQ;AACV","sourcesContent":[".root{position:relative;user-select:none}.canvas{inset:0;position:absolute}",".root {\n -webkit-user-select: none;\n user-select: none;\n position: relative;\n}\n\n.canvas {\n position: absolute;\n inset: 0;\n}\n"],"sourceRoot":""}
@@ -1,7 +1,5 @@
1
1
  import { ScrollArea as BaseScrollArea } from "@base-ui/react/scroll-area";
2
2
  import * as React from "react";
3
- type ScrollAreaProps = React.ComponentPropsWithRef<typeof BaseScrollArea.Root>;
4
- type ScrollBarProps = React.ComponentPropsWithRef<typeof BaseScrollArea.Scrollbar>;
5
3
  /**
6
4
  * Coordinates scroll area layout and scrolling behavior.
7
5
  *
@@ -38,11 +36,11 @@ declare namespace ScrollBar {
38
36
  var displayName: string;
39
37
  }
40
38
  declare namespace ScrollArea {
41
- type Props = ScrollAreaProps;
39
+ type Props = React.ComponentPropsWithRef<typeof BaseScrollArea.Root>;
42
40
  type State = BaseScrollArea.Root.State;
43
41
  }
44
42
  declare namespace ScrollBar {
45
- type Props = ScrollBarProps;
43
+ type Props = React.ComponentPropsWithRef<typeof BaseScrollArea.Scrollbar>;
46
44
  type State = BaseScrollArea.Scrollbar.State;
47
45
  }
48
46
  export { ScrollArea, ScrollBar };
@@ -1 +1 @@
1
- {"version":3,"file":"scroll-area.d.ts","sourceRoot":"","sources":["../../../src/components/ui/scroll-area.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAC,UAAU,IAAI,cAAc,EAAC,MAAM,4BAA4B,CAAC;AAExE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,KAAK,eAAe,GAAG,KAAK,CAAC,qBAAqB,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC;AAC/E,KAAK,cAAc,GAAG,KAAK,CAAC,qBAAqB,CAAC,OAAO,cAAc,CAAC,SAAS,CAAC,CAAC;AAEnF;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,UAAU,qLAqBf,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,iBAAS,SAAS,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,YAAY,CAoBvE;kBApBQ,SAAS;;;AAuBlB,kBAAU,UAAU,CAAC;IACnB,KAAY,KAAK,GAAG,eAAe,CAAC;IACpC,KAAY,KAAK,GAAG,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC;CAC/C;AAGD,kBAAU,SAAS,CAAC;IAClB,KAAY,KAAK,GAAG,cAAc,CAAC;IACnC,KAAY,KAAK,GAAG,cAAc,CAAC,SAAS,CAAC,KAAK,CAAC;CACpD;AAKD,OAAO,EAAC,UAAU,EAAE,SAAS,EAAC,CAAC"}
1
+ {"version":3,"file":"scroll-area.d.ts","sourceRoot":"","sources":["../../../src/components/ui/scroll-area.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAC,UAAU,IAAI,cAAc,EAAC,MAAM,4BAA4B,CAAC;AAExE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,UAAU,qLAqBf,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,iBAAS,SAAS,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,YAAY,CAoBvE;kBApBQ,SAAS;;;AAuBlB,kBAAU,UAAU,CAAC;IACnB,KAAY,KAAK,GAAG,KAAK,CAAC,qBAAqB,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC;IAC5E,KAAY,KAAK,GAAG,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC;CAC/C;AAGD,kBAAU,SAAS,CAAC;IAClB,KAAY,KAAK,GAAG,KAAK,CAAC,qBAAqB,CAAC,OAAO,cAAc,CAAC,SAAS,CAAC,CAAC;IACjF,KAAY,KAAK,GAAG,cAAc,CAAC,SAAS,CAAC,KAAK,CAAC;CACpD;AAKD,OAAO,EAAC,UAAU,EAAE,SAAS,EAAC,CAAC"}
@@ -3,10 +3,10 @@ import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { mergeProps } from "@base-ui/react/merge-props";
4
4
  import { ScrollArea } from "@base-ui/react/scroll-area";
5
5
  import { useRender } from "@base-ui/react/use-render";
6
- import { forwardRef } from "react";
7
6
  import { cn } from "../../lib/utilities.js";
8
7
  import scroll_area_module from "./scroll-area.module.js";
9
- const scroll_area_ScrollArea = /*#__PURE__*/ forwardRef((props, ref)=>{
8
+ import * as __rspack_external_react from "react";
9
+ const scroll_area_ScrollArea = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
10
10
  const { className, children, render, ...otherProps } = props;
11
11
  return /*#__PURE__*/ jsxs(ScrollArea.Root, {
12
12
  ref: ref,
@@ -1 +1 @@
1
- {"version":3,"file":"components/ui/scroll-area.js","sources":["../../../src/components/ui/scroll-area.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport {ScrollArea as BaseScrollArea} from \"@base-ui/react/scroll-area\";\r\nimport {useRender} from \"@base-ui/react/use-render\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./scroll-area.module.css\";\r\n\r\ntype ScrollAreaProps = React.ComponentPropsWithRef<typeof BaseScrollArea.Root>;\r\ntype ScrollBarProps = React.ComponentPropsWithRef<typeof BaseScrollArea.Scrollbar>;\r\n\r\n/**\r\n * Coordinates scroll area layout and scrolling behavior.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/scroll-area | Base UI Scroll Area}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ScrollArea>Content</ScrollArea>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/scroll-area | Base UI Documentation}\r\n */\r\nconst ScrollArea = React.forwardRef<React.ComponentRef<typeof BaseScrollArea.Root>, ScrollArea.Props>(\r\n (props: Readonly<ScrollArea.Props>, ref): React.ReactElement => {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseScrollArea.Root\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.root, className)}, {}),\r\n })}>\r\n <BaseScrollArea.Viewport className={styles.viewport}>\r\n <BaseScrollArea.Content className={styles.content}>{children}</BaseScrollArea.Content>\r\n </BaseScrollArea.Viewport>\r\n <ScrollBar />\r\n <BaseScrollArea.Corner className={styles.corner} />\r\n </BaseScrollArea.Root>\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Renders the scroll bar.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/scroll-area | Base UI Scroll Area}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ScrollBar>Content</ScrollBar>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/scroll-area | Base UI Documentation}\r\n */\r\nfunction ScrollBar(props: Readonly<ScrollBar.Props>): React.ReactElement {\r\n const {className, orientation = \"vertical\", render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseScrollArea.Scrollbar\r\n orientation={orientation}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps(\r\n {\r\n className: cn(styles.scrollbar, orientation === \"vertical\" ? styles.vertical : styles.horizontal, className),\r\n },\r\n {},\r\n ),\r\n })}>\r\n <BaseScrollArea.Thumb className={styles.thumb} />\r\n </BaseScrollArea.Scrollbar>\r\n );\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ScrollArea {\r\n export type Props = ScrollAreaProps;\r\n export type State = BaseScrollArea.Root.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ScrollBar {\r\n export type Props = ScrollBarProps;\r\n export type State = BaseScrollArea.Scrollbar.State;\r\n}\r\n\r\nScrollArea.displayName = \"ScrollArea\";\r\nScrollBar.displayName = \"ScrollBar\";\r\n\r\nexport {ScrollArea, ScrollBar};\r\n"],"names":["ScrollArea","React","props","ref","className","children","render","otherProps","BaseScrollArea","useRender","mergeProps","cn","styles","ScrollBar","orientation"],"mappings":";;;;;;;;AA4BA,MAAMA,yBAAa,WAAHA,GAAGC,WACjB,CAACC,OAAmCC;IAClC,MAAM,EAACC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGL;IAErD,OAAO,WAAP,GACE,KAACM,WAAAA,IAAmB;QAClB,KAAKL;QACJ,GAAGI,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAWC,GAAGC,mBAAAA,IAAW,EAAER;YAAU,GAAG,CAAC;QAC9D;;0BACA,IAACI,WAAAA,QAAuB;gBAAC,WAAWI,mBAAAA,QAAe;0BACjD,kBAACJ,WAAAA,OAAsB;oBAAC,WAAWI,mBAAAA,OAAc;8BAAGP;;;0BAEtD,IAACQ,WAASA,CAAAA;0BACV,IAACL,WAAAA,MAAqB;gBAAC,WAAWI,mBAAAA,MAAa;;;;AAGrD;AAkBF,SAASC,UAAUX,KAAgC;IACjD,MAAM,EAACE,SAAS,EAAEU,cAAc,UAAU,EAAER,MAAM,EAAE,GAAGC,YAAW,GAAGL;IAErE,OAAO,WAAP,GACE,IAACM,WAAAA,SAAwB;QACvB,aAAaM;QACZ,GAAGP,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WACL;gBACE,WAAWC,GAAGC,mBAAAA,SAAgB,EAAEE,AAAgB,eAAhBA,cAA6BF,mBAAAA,QAAe,GAAGA,mBAAAA,UAAiB,EAAER;YACpG,GACA,CAAC;QAEL;kBACA,kBAACI,WAAAA,KAAoB;YAAC,WAAWI,mBAAAA,KAAY;;;AAGnD;AAcAZ,uBAAW,WAAW,GAAG;AACzBa,UAAU,WAAW,GAAG"}
1
+ {"version":3,"file":"components/ui/scroll-area.js","sources":["../../../src/components/ui/scroll-area.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {mergeProps} from \"@base-ui/react/merge-props\";\r\nimport {ScrollArea as BaseScrollArea} from \"@base-ui/react/scroll-area\";\r\nimport {useRender} from \"@base-ui/react/use-render\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./scroll-area.module.css\";\r\n\r\n/**\r\n * Coordinates scroll area layout and scrolling behavior.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/scroll-area | Base UI Scroll Area}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ScrollArea>Content</ScrollArea>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/scroll-area | Base UI Documentation}\r\n */\r\nconst ScrollArea = React.forwardRef<React.ComponentRef<typeof BaseScrollArea.Root>, ScrollArea.Props>(\r\n (props: Readonly<ScrollArea.Props>, ref): React.ReactElement => {\r\n const {className, children, render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseScrollArea.Root\r\n ref={ref}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps({className: cn(styles.root, className)}, {}),\r\n })}>\r\n <BaseScrollArea.Viewport className={styles.viewport}>\r\n <BaseScrollArea.Content className={styles.content}>{children}</BaseScrollArea.Content>\r\n </BaseScrollArea.Viewport>\r\n <ScrollBar />\r\n <BaseScrollArea.Corner className={styles.corner} />\r\n </BaseScrollArea.Root>\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Renders the scroll bar.\r\n *\r\n * @remarks\r\n * - Renders a `<div>` element by default\r\n * - Built on {@link https://base-ui.com/react/components/scroll-area | Base UI Scroll Area}\r\n * - Supports the `render` prop for element composition\r\n *\r\n * @example\r\n * ```tsx\r\n * <ScrollBar>Content</ScrollBar>\r\n * ```\r\n *\r\n * @see {@link https://base-ui.com/react/components/scroll-area | Base UI Documentation}\r\n */\r\nfunction ScrollBar(props: Readonly<ScrollBar.Props>): React.ReactElement {\r\n const {className, orientation = \"vertical\", render, ...otherProps} = props;\r\n\r\n return (\r\n <BaseScrollArea.Scrollbar\r\n orientation={orientation}\r\n {...otherProps}\r\n render={useRender({\r\n defaultTagName: \"div\",\r\n render: render as never,\r\n props: mergeProps(\r\n {\r\n className: cn(styles.scrollbar, orientation === \"vertical\" ? styles.vertical : styles.horizontal, className),\r\n },\r\n {},\r\n ),\r\n })}>\r\n <BaseScrollArea.Thumb className={styles.thumb} />\r\n </BaseScrollArea.Scrollbar>\r\n );\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ScrollArea {\r\n export type Props = React.ComponentPropsWithRef<typeof BaseScrollArea.Root>;\r\n export type State = BaseScrollArea.Root.State;\r\n}\r\n\r\n// eslint-disable-next-line no-redeclare -- required for the canonical component namespace typing API\r\nnamespace ScrollBar {\r\n export type Props = React.ComponentPropsWithRef<typeof BaseScrollArea.Scrollbar>;\r\n export type State = BaseScrollArea.Scrollbar.State;\r\n}\r\n\r\nScrollArea.displayName = \"ScrollArea\";\r\nScrollBar.displayName = \"ScrollBar\";\r\n\r\nexport {ScrollArea, ScrollBar};\r\n"],"names":["ScrollArea","React","props","ref","className","children","render","otherProps","BaseScrollArea","useRender","mergeProps","cn","styles","ScrollBar","orientation"],"mappings":";;;;;;;;AAyBA,MAAMA,yBAAa,WAAHA,GAAGC,wBAAAA,UAAgB,CACjC,CAACC,OAAmCC;IAClC,MAAM,EAACC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAE,GAAGC,YAAW,GAAGL;IAErD,OAAO,WAAP,GACE,KAACM,WAAAA,IAAmB;QAClB,KAAKL;QACJ,GAAGI,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WAAW;gBAAC,WAAWC,GAAGC,mBAAAA,IAAW,EAAER;YAAU,GAAG,CAAC;QAC9D;;0BACA,IAACI,WAAAA,QAAuB;gBAAC,WAAWI,mBAAAA,QAAe;0BACjD,kBAACJ,WAAAA,OAAsB;oBAAC,WAAWI,mBAAAA,OAAc;8BAAGP;;;0BAEtD,IAACQ,WAASA,CAAAA;0BACV,IAACL,WAAAA,MAAqB;gBAAC,WAAWI,mBAAAA,MAAa;;;;AAGrD;AAkBF,SAASC,UAAUX,KAAgC;IACjD,MAAM,EAACE,SAAS,EAAEU,cAAc,UAAU,EAAER,MAAM,EAAE,GAAGC,YAAW,GAAGL;IAErE,OAAO,WAAP,GACE,IAACM,WAAAA,SAAwB;QACvB,aAAaM;QACZ,GAAGP,UAAU;QACd,QAAQE,UAAU;YAChB,gBAAgB;YAChB,QAAQH;YACR,OAAOI,WACL;gBACE,WAAWC,GAAGC,mBAAAA,SAAgB,EAAEE,AAAgB,eAAhBA,cAA6BF,mBAAAA,QAAe,GAAGA,mBAAAA,UAAiB,EAAER;YACpG,GACA,CAAC;QAEL;kBACA,kBAACI,WAAAA,KAAoB;YAAC,WAAWI,mBAAAA,KAAY;;;AAGnD;AAcAZ,uBAAW,WAAW,GAAG;AACzBa,UAAU,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/scroll-area.module.css","webpack://./src/components/ui/scroll-area.module.css"],"names":[],"mappings":"AADA;ECEE,kBAAkB;EAClB,gBAAgB;AAClB;;AAEA;EACE,sBAAsB;EACtB,WAAW;EACX,YAAY;AACd;;AAEA;EACE,eAAe;AACjB;;AAEA;EACE,kBAAkB;EAClB,sDAAsD;EACtD,yBAAyB;EACzB,iBAAiB;EACjB,aAAa;AACf;;AAEA;EACE,4BAA4B;EAC5B,cAAc;EACd,YAAY;EACZ,YAAY;AACd;;AAEA;EACE,2BAA2B;EAC3B,sBAAsB;EACtB,WAAW;EACX,eAAe;EACf,YAAY;AACd;;AAEA;EACE,kCAAkC;EAClC,oBAAoB;EACpB,OAAO;EACP,kBAAkB;AACpB;;AAEA;EACE,uBAAuB;AACzB","sourcesContent":[".root{overflow:hidden;position:relative}.viewport{border-radius:inherit;height:100%;width:100%}.content{min-width:100%}.scrollbar{display:flex;touch-action:none;transition:background-color var(--ac-transition-fast);user-select:none}.vertical{border-left:1px solid transparent;height:100%;padding:1px;width:.625rem}.horizontal{border-top:1px solid transparent;flex-direction:column;height:.625rem;padding:1px;width:100%}.thumb{background-color:var(--ac-border);border-radius:999px;flex:1;position:relative}.corner{background-color:transparent}",".root {\n position: relative;\n overflow: hidden;\n}\n\n.viewport {\n border-radius: inherit;\n width: 100%;\n height: 100%;\n}\n\n.content {\n min-width: 100%;\n}\n\n.scrollbar {\n touch-action: none;\n transition: background-color var(--ac-transition-fast);\n -webkit-user-select: none;\n user-select: none;\n display: flex;\n}\n\n.vertical {\n border-left: 1px solid #0000;\n width: .625rem;\n height: 100%;\n padding: 1px;\n}\n\n.horizontal {\n border-top: 1px solid #0000;\n flex-direction: column;\n width: 100%;\n height: .625rem;\n padding: 1px;\n}\n\n.thumb {\n background-color: var(--ac-border);\n border-radius: 999px;\n flex: 1;\n position: relative;\n}\n\n.corner {\n background-color: #0000;\n}\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://./../../node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/css-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[1]!builtin:lightningcss-loader??ruleSet[1].rules[1].oneOf[2].use[2]!/home/runner/work/arolariu.ro/arolariu.ro/node_modules/@rslib/core/node_modules/@rsbuild/core/compiled/postcss-loader/index.js??ruleSet[1].rules[1].oneOf[2].use[3]!/home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/scroll-area.module.css","webpack://./src/components/ui/scroll-area.module.css"],"names":[],"mappings":"AAAA;ECCE,kBAAkB;EAClB,gBAAgB;AAClB;;ADHwC;ECMtC,sBAAsB;EACtB,WAAW;EACX,YAAY;AACd;;ADT+F;ECY7F,eAAe;AACjB;;ADbuH;ECgBrH,kBAAkB;EAClB,sDAAsD;EACtD,yBAAyB;EACzB,iBAAiB;EACjB,aAAa;AACf;;ADrBwO;ECwBtO,4BAA4B;EAC5B,cAAc;EACd,YAAY;EACZ,YAAY;AACd;;AD5B0T;EC+BxT,2BAA2B;EAC3B,sBAAsB;EACtB,WAAW;EACX,eAAe;EACf,YAAY;AACd;;ADpCma;ECuCja,kCAAkC;EAClC,oBAAoB;EACpB,OAAO;EACP,kBAAkB;AACpB;;AD3Cyf;EC8Cvf,uBAAuB;AACzB","sourcesContent":[".root{overflow:hidden;position:relative}.viewport{border-radius:inherit;height:100%;width:100%}.content{min-width:100%}.scrollbar{display:flex;touch-action:none;transition:background-color var(--ac-transition-fast);user-select:none}.vertical{border-left:1px solid transparent;height:100%;padding:1px;width:.625rem}.horizontal{border-top:1px solid transparent;flex-direction:column;height:.625rem;padding:1px;width:100%}.thumb{background-color:var(--ac-border);border-radius:999px;flex:1;position:relative}.corner{background-color:transparent}",".root {\n position: relative;\n overflow: hidden;\n}\n\n.viewport {\n border-radius: inherit;\n width: 100%;\n height: 100%;\n}\n\n.content {\n min-width: 100%;\n}\n\n.scrollbar {\n touch-action: none;\n transition: background-color var(--ac-transition-fast);\n -webkit-user-select: none;\n user-select: none;\n display: flex;\n}\n\n.vertical {\n border-left: 1px solid #0000;\n width: .625rem;\n height: 100%;\n padding: 1px;\n}\n\n.horizontal {\n border-top: 1px solid #0000;\n flex-direction: column;\n width: 100%;\n height: .625rem;\n padding: 1px;\n}\n\n.thumb {\n background-color: var(--ac-border);\n border-radius: 999px;\n flex: 1;\n position: relative;\n}\n\n.corner {\n background-color: #0000;\n}\n"],"sourceRoot":""}
@@ -4,12 +4,12 @@ import { mergeProps } from "@base-ui/react/merge-props";
4
4
  import { Select } from "@base-ui/react/select";
5
5
  import { useRender } from "@base-ui/react/use-render";
6
6
  import { Check, ChevronDown, ChevronUp } from "lucide-react";
7
- import { forwardRef, useCallback } from "react";
8
7
  import { cn } from "../../lib/utilities.js";
9
8
  import select_module from "./select.module.js";
9
+ import * as __rspack_external_react from "react";
10
10
  function select_Select(props) {
11
11
  const { onValueChange, ...otherProps } = props;
12
- const handleChange = useCallback((value)=>{
12
+ const handleChange = __rspack_external_react.useCallback((value)=>{
13
13
  if (onValueChange && "string" == typeof value) onValueChange(value);
14
14
  }, [
15
15
  onValueChange
@@ -24,7 +24,7 @@ const SelectGroup = Select.Group;
24
24
  SelectGroup.displayName = "SelectGroup";
25
25
  const SelectValue = Select.Value;
26
26
  SelectValue.displayName = "SelectValue";
27
- const SelectTrigger = /*#__PURE__*/ forwardRef((props, ref)=>{
27
+ const SelectTrigger = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
28
28
  const { className, children, render, ...otherProps } = props;
29
29
  return /*#__PURE__*/ jsxs(Select.Trigger, {
30
30
  ref: ref,
@@ -82,7 +82,7 @@ function SelectScrollDownButton(props) {
82
82
  });
83
83
  }
84
84
  SelectScrollDownButton.displayName = "SelectScrollDownButton";
85
- const SelectContent = /*#__PURE__*/ forwardRef((props, ref)=>{
85
+ const SelectContent = /*#__PURE__*/ __rspack_external_react.forwardRef((props, ref)=>{
86
86
  const { className, children, render, sideOffset = 4, ...otherProps } = props;
87
87
  return /*#__PURE__*/ jsx(Select.Portal, {
88
88
  children: /*#__PURE__*/ jsx(Select.Positioner, {