@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,9 +1,9 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { forwardRef, useMemo } from "react";
4
3
  import { Separator } from "./separator.js";
5
4
  import { cn } from "../../lib/utilities.js";
6
5
  import field_module from "./field.module.js";
6
+ import * as __rspack_external_react from "react";
7
7
  function getFieldOrientationClass(orientation) {
8
8
  switch(orientation){
9
9
  case "horizontal":
@@ -14,26 +14,26 @@ function getFieldOrientationClass(orientation) {
14
14
  return field_module.vertical;
15
15
  }
16
16
  }
17
- const FieldSet = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("fieldset", {
17
+ const FieldSet = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("fieldset", {
18
18
  ref: ref,
19
19
  "data-slot": "field-set",
20
20
  className: cn(field_module.fieldSet, className),
21
21
  ...props
22
22
  }));
23
- const FieldLegend = /*#__PURE__*/ forwardRef(({ className, variant = "legend", ...props }, ref)=>/*#__PURE__*/ jsx("legend", {
23
+ const FieldLegend = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, variant = "legend", ...props }, ref)=>/*#__PURE__*/ jsx("legend", {
24
24
  ref: ref,
25
25
  "data-slot": "field-legend",
26
26
  "data-variant": variant,
27
27
  className: cn(field_module.legend, "label" === variant ? field_module.legendLabel : field_module.legendDefault, className),
28
28
  ...props
29
29
  }));
30
- const FieldGroup = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
30
+ const FieldGroup = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
31
31
  ref: ref,
32
32
  "data-slot": "field-group",
33
33
  className: cn(field_module.group, className),
34
34
  ...props
35
35
  }));
36
- const Field = /*#__PURE__*/ forwardRef(({ className, orientation = "vertical", ...props }, ref)=>/*#__PURE__*/ jsx("div", {
36
+ const Field = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, orientation = "vertical", ...props }, ref)=>/*#__PURE__*/ jsx("div", {
37
37
  ref: ref,
38
38
  role: "group",
39
39
  "data-slot": "field",
@@ -41,31 +41,31 @@ const Field = /*#__PURE__*/ forwardRef(({ className, orientation = "vertical", .
41
41
  className: cn(field_module.field, getFieldOrientationClass(orientation), className),
42
42
  ...props
43
43
  }));
44
- const FieldContent = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
44
+ const FieldContent = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
45
45
  ref: ref,
46
46
  "data-slot": "field-content",
47
47
  className: cn(field_module.content, className),
48
48
  ...props
49
49
  }));
50
- const FieldLabel = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("label", {
50
+ const FieldLabel = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("label", {
51
51
  ref: ref,
52
52
  "data-slot": "field-label",
53
53
  className: cn(field_module.label, className),
54
54
  ...props
55
55
  }));
56
- const FieldTitle = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
56
+ const FieldTitle = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
57
57
  ref: ref,
58
58
  "data-slot": "field-label",
59
59
  className: cn(field_module.title, className),
60
60
  ...props
61
61
  }));
62
- const FieldDescription = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("p", {
62
+ const FieldDescription = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("p", {
63
63
  ref: ref,
64
64
  "data-slot": "field-description",
65
65
  className: cn(field_module.description, className),
66
66
  ...props
67
67
  }));
68
- const FieldSeparator = /*#__PURE__*/ forwardRef(({ children, className, ...props }, ref)=>/*#__PURE__*/ jsxs("div", {
68
+ const FieldSeparator = /*#__PURE__*/ __rspack_external_react.forwardRef(({ children, className, ...props }, ref)=>/*#__PURE__*/ jsxs("div", {
69
69
  ref: ref,
70
70
  "data-slot": "field-separator",
71
71
  "data-content": children ? "true" : void 0,
@@ -81,8 +81,8 @@ const FieldSeparator = /*#__PURE__*/ forwardRef(({ children, className, ...props
81
81
  }) : null
82
82
  ]
83
83
  }));
84
- const FieldError = /*#__PURE__*/ forwardRef(({ className, children, errors, ...props }, ref)=>{
85
- const content = useMemo(()=>{
84
+ const FieldError = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, children, errors, ...props }, ref)=>{
85
+ const content = __rspack_external_react.useMemo(()=>{
86
86
  if (children) return /*#__PURE__*/ jsx("span", {
87
87
  children: children
88
88
  });
@@ -1 +1 @@
1
- {"version":3,"file":"components/ui/field.js","sources":["../../../src/components/ui/field.tsx"],"sourcesContent":["\"use client\";\r\n\r\n/* eslint-disable jsx-a11y/label-has-associated-control */\r\n\r\nimport * as React from \"react\";\r\n\r\nimport {Separator} from \"@/components/ui/separator\";\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./field.module.css\";\r\n\r\n/** Supported layouts for {@link Field}. */\r\nexport type FieldOrientation = \"vertical\" | \"horizontal\" | \"responsive\";\r\n\r\n/** Supported legend render styles for {@link FieldLegend}. */\r\nexport type FieldLegendVariant = \"legend\" | \"label\";\r\n\r\n/** Shape of error objects accepted by {@link FieldError}. */\r\nexport interface FieldErrorItem {\r\n /** Human-readable validation error message. @default undefined */\r\n message?: string;\r\n}\r\n\r\n/**\r\n * Props for the {@link FieldSet} component.\r\n */\r\nexport type FieldSetProps = React.ComponentPropsWithoutRef<\"fieldset\">;\r\n\r\n/**\r\n * Props for the {@link FieldLegend} component.\r\n */\r\nexport interface FieldLegendProps extends React.ComponentPropsWithoutRef<\"legend\"> {\r\n /** Visual treatment used for the legend content. @default \"legend\" */\r\n variant?: FieldLegendVariant;\r\n}\r\n\r\n/**\r\n * Props for the {@link FieldGroup} component.\r\n */\r\nexport type FieldGroupProps = React.ComponentPropsWithoutRef<\"div\">;\r\n\r\n/**\r\n * Props for the {@link Field} component.\r\n */\r\nexport interface FieldProps extends React.ComponentPropsWithoutRef<\"div\"> {\r\n /** Layout used to arrange labels and controls. @default \"vertical\" */\r\n orientation?: FieldOrientation;\r\n}\r\n\r\n/**\r\n * Props for the {@link FieldContent} component.\r\n */\r\nexport type FieldContentProps = React.ComponentPropsWithoutRef<\"div\">;\r\n\r\n/**\r\n * Props for the {@link FieldLabel} component.\r\n */\r\nexport type FieldLabelProps = React.ComponentPropsWithoutRef<\"label\">;\r\n\r\n/**\r\n * Props for the {@link FieldTitle} component.\r\n */\r\nexport type FieldTitleProps = React.ComponentPropsWithoutRef<\"div\">;\r\n\r\n/**\r\n * Props for the {@link FieldDescription} component.\r\n */\r\nexport type FieldDescriptionProps = React.ComponentPropsWithoutRef<\"p\">;\r\n\r\n/**\r\n * Props for the {@link FieldSeparator} component.\r\n */\r\nexport type FieldSeparatorProps = React.ComponentPropsWithoutRef<\"div\">;\r\n\r\n/**\r\n * Props for the {@link FieldError} component.\r\n */\r\nexport interface FieldErrorProps extends React.ComponentPropsWithoutRef<\"div\"> {\r\n /** Validation errors rendered when children are not provided. @default undefined */\r\n errors?: Array<FieldErrorItem | undefined>;\r\n}\r\n\r\nfunction getFieldOrientationClass(orientation: FieldOrientation): string {\r\n switch (orientation) {\r\n case \"horizontal\": {\r\n return styles.horizontal;\r\n }\r\n case \"responsive\": {\r\n return styles.responsive;\r\n }\r\n default: {\r\n return styles.vertical;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Groups related controls within a semantic fieldset.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<fieldset>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <FieldSet>\r\n * <FieldLegend>Preferences</FieldLegend>\r\n * </FieldSet>\r\n * ```\r\n *\r\n * @see {@link FieldSetProps} for available props\r\n */\r\nconst FieldSet = React.forwardRef<HTMLFieldSetElement, FieldSetProps>(\r\n ({className, ...props}: Readonly<FieldSetProps>, ref): React.JSX.Element => (\r\n <fieldset\r\n ref={ref}\r\n data-slot='field-set'\r\n className={cn(styles.fieldSet, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Labels a grouped set of controls within {@link FieldSet}.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<legend>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <FieldLegend variant='label'>Billing address</FieldLegend>\r\n * ```\r\n *\r\n * @see {@link FieldLegendProps} for available props\r\n */\r\nconst FieldLegend = React.forwardRef<HTMLLegendElement, FieldLegendProps>(\r\n ({className, variant = \"legend\", ...props}: Readonly<FieldLegendProps>, ref): React.JSX.Element => (\r\n <legend\r\n ref={ref}\r\n data-slot='field-legend'\r\n data-variant={variant}\r\n className={cn(styles.legend, variant === \"label\" ? styles.legendLabel : styles.legendDefault, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Stacks multiple field rows under a shared container.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<div>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <FieldGroup>\r\n * <Field />\r\n * </FieldGroup>\r\n * ```\r\n *\r\n * @see {@link FieldGroupProps} for available props\r\n */\r\nconst FieldGroup = React.forwardRef<HTMLDivElement, FieldGroupProps>(\r\n ({className, ...props}: Readonly<FieldGroupProps>, ref): React.JSX.Element => (\r\n <div\r\n ref={ref}\r\n data-slot='field-group'\r\n className={cn(styles.group, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Creates a styled field row for labels, descriptions, and controls.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<div>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <Field orientation='responsive'>...</Field>\r\n * ```\r\n *\r\n * @see {@link FieldProps} for available props\r\n */\r\nconst Field = React.forwardRef<HTMLDivElement, FieldProps>(\r\n ({className, orientation = \"vertical\", ...props}: Readonly<FieldProps>, ref): React.JSX.Element => (\r\n <div\r\n ref={ref}\r\n role='group'\r\n data-slot='field'\r\n data-orientation={orientation}\r\n className={cn(styles.field, getFieldOrientationClass(orientation), className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Wraps field controls and supporting content.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<div>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <FieldContent>{control}</FieldContent>\r\n * ```\r\n *\r\n * @see {@link FieldContentProps} for available props\r\n */\r\nconst FieldContent = React.forwardRef<HTMLDivElement, FieldContentProps>(\r\n ({className, ...props}: Readonly<FieldContentProps>, ref): React.JSX.Element => (\r\n <div\r\n ref={ref}\r\n data-slot='field-content'\r\n className={cn(styles.content, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Renders the label associated with a form control.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<label>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <FieldLabel htmlFor='email'>Email</FieldLabel>\r\n * ```\r\n *\r\n * @see {@link FieldLabelProps} for available props\r\n */\r\nconst FieldLabel = React.forwardRef<HTMLLabelElement, FieldLabelProps>(\r\n ({className, ...props}: Readonly<FieldLabelProps>, ref): React.JSX.Element => {\r\n return (\r\n <label\r\n ref={ref}\r\n data-slot='field-label'\r\n className={cn(styles.label, className)}\r\n {...props}\r\n />\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Displays the leading title content for a field row.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<div>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <FieldTitle>Account</FieldTitle>\r\n * ```\r\n *\r\n * @see {@link FieldTitleProps} for available props\r\n */\r\nconst FieldTitle = React.forwardRef<HTMLDivElement, FieldTitleProps>(\r\n ({className, ...props}: Readonly<FieldTitleProps>, ref): React.JSX.Element => (\r\n <div\r\n ref={ref}\r\n data-slot='field-label'\r\n className={cn(styles.title, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Renders supplementary descriptive text for a field.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<p>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <FieldDescription>Used for account recovery.</FieldDescription>\r\n * ```\r\n *\r\n * @see {@link FieldDescriptionProps} for available props\r\n */\r\nconst FieldDescription = React.forwardRef<HTMLParagraphElement, FieldDescriptionProps>(\r\n ({className, ...props}: Readonly<FieldDescriptionProps>, ref): React.JSX.Element => (\r\n <p\r\n ref={ref}\r\n data-slot='field-description'\r\n className={cn(styles.description, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Separates field sections with optional inline content.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<div>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <FieldSeparator>or</FieldSeparator>\r\n * ```\r\n *\r\n * @see {@link FieldSeparatorProps} for available props\r\n */\r\nconst FieldSeparator = React.forwardRef<HTMLDivElement, FieldSeparatorProps>(\r\n ({children, className, ...props}: Readonly<FieldSeparatorProps>, ref): React.JSX.Element => (\r\n <div\r\n ref={ref}\r\n data-slot='field-separator'\r\n data-content={children ? \"true\" : undefined}\r\n className={cn(styles.separator, className)}\r\n {...props}>\r\n <Separator className={styles.separatorLine} />\r\n {children ? <span className={styles.separatorContent}>{children}</span> : null}\r\n </div>\r\n ),\r\n);\r\n\r\n/**\r\n * Presents validation feedback for a field.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<div>` element when content exists\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <FieldError errors={[{message: \"Required\"}]} />\r\n * ```\r\n *\r\n * @see {@link FieldErrorProps} for available props\r\n */\r\nconst FieldError = React.forwardRef<HTMLDivElement, FieldErrorProps>(\r\n ({className, children, errors, ...props}: Readonly<FieldErrorProps>, ref): React.JSX.Element | null => {\r\n const content = React.useMemo((): React.JSX.Element | null => {\r\n if (children) {\r\n return <span>{children}</span>;\r\n }\r\n\r\n if (!errors) {\r\n return null;\r\n }\r\n\r\n if (errors.length === 1 && errors[0]?.message) {\r\n return <span>{errors[0].message}</span>;\r\n }\r\n\r\n return (\r\n <ul className={styles.errorList}>{errors.map((error, index) => (error?.message ? <li key={index}>{error.message}</li> : null))}</ul>\r\n );\r\n }, [children, errors]);\r\n\r\n if (!content) {\r\n return null;\r\n }\r\n\r\n return (\r\n <div\r\n ref={ref}\r\n role='alert'\r\n data-slot='field-error'\r\n className={cn(styles.error, className)}\r\n {...props}>\r\n {content}\r\n </div>\r\n );\r\n },\r\n);\r\n\r\nFieldSet.displayName = \"FieldSet\";\r\nFieldLegend.displayName = \"FieldLegend\";\r\nFieldGroup.displayName = \"FieldGroup\";\r\nField.displayName = \"Field\";\r\nFieldContent.displayName = \"FieldContent\";\r\nFieldLabel.displayName = \"FieldLabel\";\r\nFieldTitle.displayName = \"FieldTitle\";\r\nFieldDescription.displayName = \"FieldDescription\";\r\nFieldSeparator.displayName = \"FieldSeparator\";\r\nFieldError.displayName = \"FieldError\";\r\n\r\nexport {Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle};\r\n"],"names":["getFieldOrientationClass","orientation","styles","FieldSet","React","className","props","ref","cn","FieldLegend","variant","FieldGroup","Field","FieldContent","FieldLabel","FieldTitle","FieldDescription","FieldSeparator","children","undefined","Separator","FieldError","errors","content","error","index"],"mappings":";;;;;;AAiFA,SAASA,yBAAyBC,WAA6B;IAC7D,OAAQA;QACN,KAAK;YACH,OAAOC,aAAAA,UAAiB;QAE1B,KAAK;YACH,OAAOA,aAAAA,UAAiB;QAE1B;YACE,OAAOA,aAAAA,QAAe;IAE1B;AACF;AAmBA,MAAMC,WAAW,WAAHA,GAAGC,WACf,CAAC,EAACC,SAAS,EAAE,GAAGC,OAA+B,EAAEC,MAAAA,WAAAA,GAC/C,IAAC;QACC,KAAKA;QACL,aAAU;QACV,WAAWC,GAAGN,aAAAA,QAAe,EAAEG;QAC9B,GAAGC,KAAK;;AAoBf,MAAMG,cAAc,WAAHA,GAAGL,WAClB,CAAC,EAACC,SAAS,EAAEK,UAAU,QAAQ,EAAE,GAAGJ,OAAkC,EAAEC,MAAAA,WAAAA,GACtE,IAAC;QACC,KAAKA;QACL,aAAU;QACV,gBAAcG;QACd,WAAWF,GAAGN,aAAAA,MAAa,EAAEQ,AAAY,YAAZA,UAAsBR,aAAAA,WAAkB,GAAGA,aAAAA,aAAoB,EAAEG;QAC7F,GAAGC,KAAK;;AAsBf,MAAMK,aAAa,WAAHA,GAAGP,WACjB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAiC,EAAEC,MAAAA,WAAAA,GACjD,IAAC;QACC,KAAKA;QACL,aAAU;QACV,WAAWC,GAAGN,aAAAA,KAAY,EAAEG;QAC3B,GAAGC,KAAK;;AAoBf,MAAMM,QAAQ,WAAHA,GAAGR,WACZ,CAAC,EAACC,SAAS,EAAEJ,cAAc,UAAU,EAAE,GAAGK,OAA4B,EAAEC,MAAAA,WAAAA,GACtE,IAAC;QACC,KAAKA;QACL,MAAK;QACL,aAAU;QACV,oBAAkBN;QAClB,WAAWO,GAAGN,aAAAA,KAAY,EAAE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WAAHA,GAAGjB,WACjB,CAAC,EAACC,SAAS,EAAEa,QAAQ,EAAEI,MAAM,EAAE,GAAGhB,OAAiC,EAAEC;IACnE,MAAMgB,UAAUnB,QAAc;QAC5B,IAAIc,UACF,OAAO,WAAP,GAAO,IAAC;sBAAMA;;QAGhB,IAAI,CAACI,QACH,OAAO;QAGT,IAAIA,AAAkB,MAAlBA,OAAO,MAAM,IAAUA,MAAM,CAAC,EAAE,EAAE,SACpC,OAAO,WAAP,GAAO,IAAC;sBAAMA,MAAM,CAAC,EAAE,CAAC,OAAO;;QAGjC,OAAO,WAAP,GACE,IAAC;YAAG,WAAWpB,aAAAA,SAAgB;sBAAGoB,OAAO,GAAG,CAAC,CAACE,OAAOC,QAAWD,OAAO,UAAU,WAAV,GAAU,IAAC;8BAAgBA,MAAM,OAAO;mBAArBC,SAA8B;;IAE5H,GAAG;QAACP;QAAUI;KAAO;IAErB,IAAI,CAACC,SACH,OAAO;IAGT,OAAO,WAAP,GACE,IAAC;QACC,KAAKhB;QACL,MAAK;QACL,aAAU;QACV,WAAWC,GAAGN,aAAAA,KAAY,EAAEG;QAC3B,GAAGC,KAAK;kBACRiB;;AAGP;AAGFpB,SAAS,WAAW,GAAG;AACvBM,YAAY,WAAW,GAAG;AAC1BE,WAAW,WAAW,GAAG;AACzBC,MAAM,WAAW,GAAG;AACpBC,aAAa,WAAW,GAAG;AAC3BC,WAAW,WAAW,GAAG;AACzBC,WAAW,WAAW,GAAG;AACzBC,iBAAiB,WAAW,GAAG;AAC/BC,eAAe,WAAW,GAAG;AAC7BI,WAAW,WAAW,GAAG"}
1
+ {"version":3,"file":"components/ui/field.js","sources":["../../../src/components/ui/field.tsx"],"sourcesContent":["\"use client\";\r\n\r\n/* eslint-disable jsx-a11y/label-has-associated-control */\r\n\r\nimport * as React from \"react\";\r\n\r\nimport {Separator} from \"@/components/ui/separator\";\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./field.module.css\";\r\n\r\n/** Supported layouts for {@link Field}. */\r\nexport type FieldOrientation = \"vertical\" | \"horizontal\" | \"responsive\";\r\n\r\n/** Supported legend render styles for {@link FieldLegend}. */\r\nexport type FieldLegendVariant = \"legend\" | \"label\";\r\n\r\n/** Shape of error objects accepted by {@link FieldError}. */\r\nexport interface FieldErrorItem {\r\n /** Human-readable validation error message. @default undefined */\r\n message?: string;\r\n}\r\n\r\n/**\r\n * Props for the {@link FieldSet} component.\r\n */\r\nexport type FieldSetProps = React.ComponentPropsWithoutRef<\"fieldset\">;\r\n\r\n/**\r\n * Props for the {@link FieldLegend} component.\r\n */\r\nexport interface FieldLegendProps extends React.ComponentPropsWithoutRef<\"legend\"> {\r\n /** Visual treatment used for the legend content. @default \"legend\" */\r\n variant?: FieldLegendVariant;\r\n}\r\n\r\n/**\r\n * Props for the {@link FieldGroup} component.\r\n */\r\nexport type FieldGroupProps = React.ComponentPropsWithoutRef<\"div\">;\r\n\r\n/**\r\n * Props for the {@link Field} component.\r\n */\r\nexport interface FieldProps extends React.ComponentPropsWithoutRef<\"div\"> {\r\n /** Layout used to arrange labels and controls. @default \"vertical\" */\r\n orientation?: FieldOrientation;\r\n}\r\n\r\n/**\r\n * Props for the {@link FieldContent} component.\r\n */\r\nexport type FieldContentProps = React.ComponentPropsWithoutRef<\"div\">;\r\n\r\n/**\r\n * Props for the {@link FieldLabel} component.\r\n */\r\nexport type FieldLabelProps = React.ComponentPropsWithoutRef<\"label\">;\r\n\r\n/**\r\n * Props for the {@link FieldTitle} component.\r\n */\r\nexport type FieldTitleProps = React.ComponentPropsWithoutRef<\"div\">;\r\n\r\n/**\r\n * Props for the {@link FieldDescription} component.\r\n */\r\nexport type FieldDescriptionProps = React.ComponentPropsWithoutRef<\"p\">;\r\n\r\n/**\r\n * Props for the {@link FieldSeparator} component.\r\n */\r\nexport type FieldSeparatorProps = React.ComponentPropsWithoutRef<\"div\">;\r\n\r\n/**\r\n * Props for the {@link FieldError} component.\r\n */\r\nexport interface FieldErrorProps extends React.ComponentPropsWithoutRef<\"div\"> {\r\n /** Validation errors rendered when children are not provided. @default undefined */\r\n errors?: Array<FieldErrorItem | undefined>;\r\n}\r\n\r\nfunction getFieldOrientationClass(orientation: FieldOrientation): string {\r\n switch (orientation) {\r\n case \"horizontal\": {\r\n return styles.horizontal;\r\n }\r\n case \"responsive\": {\r\n return styles.responsive;\r\n }\r\n default: {\r\n return styles.vertical;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Groups related controls within a semantic fieldset.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<fieldset>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <FieldSet>\r\n * <FieldLegend>Preferences</FieldLegend>\r\n * </FieldSet>\r\n * ```\r\n *\r\n * @see {@link FieldSetProps} for available props\r\n */\r\nconst FieldSet = React.forwardRef<HTMLFieldSetElement, FieldSetProps>(\r\n ({className, ...props}: Readonly<FieldSetProps>, ref): React.JSX.Element => (\r\n <fieldset\r\n ref={ref}\r\n data-slot='field-set'\r\n className={cn(styles.fieldSet, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Labels a grouped set of controls within {@link FieldSet}.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<legend>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <FieldLegend variant='label'>Billing address</FieldLegend>\r\n * ```\r\n *\r\n * @see {@link FieldLegendProps} for available props\r\n */\r\nconst FieldLegend = React.forwardRef<HTMLLegendElement, FieldLegendProps>(\r\n ({className, variant = \"legend\", ...props}: Readonly<FieldLegendProps>, ref): React.JSX.Element => (\r\n <legend\r\n ref={ref}\r\n data-slot='field-legend'\r\n data-variant={variant}\r\n className={cn(styles.legend, variant === \"label\" ? styles.legendLabel : styles.legendDefault, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Stacks multiple field rows under a shared container.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<div>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <FieldGroup>\r\n * <Field />\r\n * </FieldGroup>\r\n * ```\r\n *\r\n * @see {@link FieldGroupProps} for available props\r\n */\r\nconst FieldGroup = React.forwardRef<HTMLDivElement, FieldGroupProps>(\r\n ({className, ...props}: Readonly<FieldGroupProps>, ref): React.JSX.Element => (\r\n <div\r\n ref={ref}\r\n data-slot='field-group'\r\n className={cn(styles.group, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Creates a styled field row for labels, descriptions, and controls.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<div>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <Field orientation='responsive'>...</Field>\r\n * ```\r\n *\r\n * @see {@link FieldProps} for available props\r\n */\r\nconst Field = React.forwardRef<HTMLDivElement, FieldProps>(\r\n ({className, orientation = \"vertical\", ...props}: Readonly<FieldProps>, ref): React.JSX.Element => (\r\n <div\r\n ref={ref}\r\n role='group'\r\n data-slot='field'\r\n data-orientation={orientation}\r\n className={cn(styles.field, getFieldOrientationClass(orientation), className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Wraps field controls and supporting content.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<div>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <FieldContent>{control}</FieldContent>\r\n * ```\r\n *\r\n * @see {@link FieldContentProps} for available props\r\n */\r\nconst FieldContent = React.forwardRef<HTMLDivElement, FieldContentProps>(\r\n ({className, ...props}: Readonly<FieldContentProps>, ref): React.JSX.Element => (\r\n <div\r\n ref={ref}\r\n data-slot='field-content'\r\n className={cn(styles.content, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Renders the label associated with a form control.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<label>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <FieldLabel htmlFor='email'>Email</FieldLabel>\r\n * ```\r\n *\r\n * @see {@link FieldLabelProps} for available props\r\n */\r\nconst FieldLabel = React.forwardRef<HTMLLabelElement, FieldLabelProps>(\r\n ({className, ...props}: Readonly<FieldLabelProps>, ref): React.JSX.Element => {\r\n return (\r\n <label\r\n ref={ref}\r\n data-slot='field-label'\r\n className={cn(styles.label, className)}\r\n {...props}\r\n />\r\n );\r\n },\r\n);\r\n\r\n/**\r\n * Displays the leading title content for a field row.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<div>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <FieldTitle>Account</FieldTitle>\r\n * ```\r\n *\r\n * @see {@link FieldTitleProps} for available props\r\n */\r\nconst FieldTitle = React.forwardRef<HTMLDivElement, FieldTitleProps>(\r\n ({className, ...props}: Readonly<FieldTitleProps>, ref): React.JSX.Element => (\r\n <div\r\n ref={ref}\r\n data-slot='field-label'\r\n className={cn(styles.title, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Renders supplementary descriptive text for a field.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<p>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <FieldDescription>Used for account recovery.</FieldDescription>\r\n * ```\r\n *\r\n * @see {@link FieldDescriptionProps} for available props\r\n */\r\nconst FieldDescription = React.forwardRef<HTMLParagraphElement, FieldDescriptionProps>(\r\n ({className, ...props}: Readonly<FieldDescriptionProps>, ref): React.JSX.Element => (\r\n <p\r\n ref={ref}\r\n data-slot='field-description'\r\n className={cn(styles.description, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Separates field sections with optional inline content.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<div>` element\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <FieldSeparator>or</FieldSeparator>\r\n * ```\r\n *\r\n * @see {@link FieldSeparatorProps} for available props\r\n */\r\nconst FieldSeparator = React.forwardRef<HTMLDivElement, FieldSeparatorProps>(\r\n ({children, className, ...props}: Readonly<FieldSeparatorProps>, ref): React.JSX.Element => (\r\n <div\r\n ref={ref}\r\n data-slot='field-separator'\r\n data-content={children ? \"true\" : undefined}\r\n className={cn(styles.separator, className)}\r\n {...props}>\r\n <Separator className={styles.separatorLine} />\r\n {children ? <span className={styles.separatorContent}>{children}</span> : null}\r\n </div>\r\n ),\r\n);\r\n\r\n/**\r\n * Presents validation feedback for a field.\r\n *\r\n * @remarks\r\n * - Pure CSS component (no Base UI primitive)\r\n * - Renders a `<div>` element when content exists\r\n * - Styling via CSS Modules with `--ac-*` custom properties\r\n *\r\n * @example\r\n * ```tsx\r\n * <FieldError errors={[{message: \"Required\"}]} />\r\n * ```\r\n *\r\n * @see {@link FieldErrorProps} for available props\r\n */\r\nconst FieldError = React.forwardRef<HTMLDivElement, FieldErrorProps>(\r\n ({className, children, errors, ...props}: Readonly<FieldErrorProps>, ref): React.JSX.Element | null => {\r\n const content = React.useMemo((): React.JSX.Element | null => {\r\n if (children) {\r\n return <span>{children}</span>;\r\n }\r\n\r\n if (!errors) {\r\n return null;\r\n }\r\n\r\n if (errors.length === 1 && errors[0]?.message) {\r\n return <span>{errors[0].message}</span>;\r\n }\r\n\r\n return (\r\n <ul className={styles.errorList}>{errors.map((error, index) => (error?.message ? <li key={index}>{error.message}</li> : null))}</ul>\r\n );\r\n }, [children, errors]);\r\n\r\n if (!content) {\r\n return null;\r\n }\r\n\r\n return (\r\n <div\r\n ref={ref}\r\n role='alert'\r\n data-slot='field-error'\r\n className={cn(styles.error, className)}\r\n {...props}>\r\n {content}\r\n </div>\r\n );\r\n },\r\n);\r\n\r\nFieldSet.displayName = \"FieldSet\";\r\nFieldLegend.displayName = \"FieldLegend\";\r\nFieldGroup.displayName = \"FieldGroup\";\r\nField.displayName = \"Field\";\r\nFieldContent.displayName = \"FieldContent\";\r\nFieldLabel.displayName = \"FieldLabel\";\r\nFieldTitle.displayName = \"FieldTitle\";\r\nFieldDescription.displayName = \"FieldDescription\";\r\nFieldSeparator.displayName = \"FieldSeparator\";\r\nFieldError.displayName = \"FieldError\";\r\n\r\nexport {Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle};\r\n"],"names":["getFieldOrientationClass","orientation","styles","FieldSet","React","className","props","ref","cn","FieldLegend","variant","FieldGroup","Field","FieldContent","FieldLabel","FieldTitle","FieldDescription","FieldSeparator","children","undefined","Separator","FieldError","errors","content","error","index"],"mappings":";;;;;;AAiFA,SAASA,yBAAyBC,WAA6B;IAC7D,OAAQA;QACN,KAAK;YACH,OAAOC,aAAAA,UAAiB;QAE1B,KAAK;YACH,OAAOA,aAAAA,UAAiB;QAE1B;YACE,OAAOA,aAAAA,QAAe;IAE1B;AACF;AAmBA,MAAMC,WAAW,WAAHA,GAAGC,wBAAAA,UAAgB,CAC/B,CAAC,EAACC,SAAS,EAAE,GAAGC,OAA+B,EAAEC,MAAAA,WAAAA,GAC/C,IAAC;QACC,KAAKA;QACL,aAAU;QACV,WAAWC,GAAGN,aAAAA,QAAe,EAAEG;QAC9B,GAAGC,KAAK;;AAoBf,MAAMG,cAAc,WAAHA,GAAGL,wBAAAA,UAAgB,CAClC,CAAC,EAACC,SAAS,EAAEK,UAAU,QAAQ,EAAE,GAAGJ,OAAkC,EAAEC,MAAAA,WAAAA,GACtE,IAAC;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mBAArBC,SAA8B;;IAE5H,GAAG;QAACP;QAAUI;KAAO;IAErB,IAAI,CAACC,SACH,OAAO;IAGT,OAAO,WAAP,GACE,IAAC;QACC,KAAKhB;QACL,MAAK;QACL,aAAU;QACV,WAAWC,GAAGN,aAAAA,KAAY,EAAEG;QAC3B,GAAGC,KAAK;kBACRiB;;AAGP;AAGFpB,SAAS,WAAW,GAAG;AACvBM,YAAY,WAAW,GAAG;AAC1BE,WAAW,WAAW,GAAG;AACzBC,MAAM,WAAW,GAAG;AACpBC,aAAa,WAAW,GAAG;AAC3BC,WAAW,WAAW,GAAG;AACzBC,WAAW,WAAW,GAAG;AACzBC,iBAAiB,WAAW,GAAG;AAC/BC,eAAe,WAAW,GAAG;AAC7BI,WAAW,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/field.module.css","webpack://./src/components/ui/field.module.css"],"names":[],"mappings":"AADA;ECEE,sBAAsB;EACtB,sBAAsB;EACtB,aAAa;AACf;;AAEA;EACE,2BAA2B;EAC3B,gCAAgC;EAChC,gBAAgB;AAClB;;AAEA;EACE,8BAA8B;AAChC;;AAEA;EACE,4BAA4B;AAC9B;;AAEA;EACE,gDAAgD;EAChD,sBAAsB;EACtB,WAAW;EACX,aAAa;AACf;;AAEA;EACE,sBAAsB;AACxB;;AAEA;EACE,sBAAsB;EACtB,WAAW;EACX,aAAa;AACf;;AAEA;EACE,4BAA4B;AAC9B;;AAEA;EACE,sBAAsB;AACxB;;AAEA;EACE,WAAW;AACb;;AAEA;EACE,mBAAmB;EACnB,mBAAmB;AACrB;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,sBAAsB;AACxB;;AAEA;EACE,WAAW;AACb;;AAEA;EACE;IACE,mBAAmB;IACnB,mBAAmB;EACrB;;EAEA;IACE,WAAW;EACb;;EAEA;IACE,UAAU;IACV,gBAAgB;EAClB;AACF;;AAEA;EACE,sBAAsB;EACtB,UAAU;EACV,YAAY;AACd;;AAEA;EACE,sBAAsB;EACtB,gBAAgB;EAChB,aAAa;AACf;;AAEA;EACE,2BAA2B;EAC3B,eAAe;EACf,4BAA4B;EAC5B,yBAAyB;EACzB,iBAAiB;EACjB,kBAAkB;EAClB,gBAAgB;AAClB;;AAEA;EACE,WAAW;AACb;;AAEA;EACE,kCAAkC;EAClC,kCAAkC;EAClC,0BAA0B;EAC1B,sBAAsB;EACtB,WAAW;AACb;;AAEA;EACE,2BAA2B;EAC3B,mBAAmB;EACnB,sBAAsB;EACtB,kBAAkB;EAClB,gBAAgB;EAChB,gBAAgB;EAChB,aAAa;AACf;;AAEA;EACE,4BAA4B;AAC9B;;AAEA;EACE,iCAAiC;EACjC,gBAAgB;AAClB;;AAEA;EACE,cAAc;EACd,0BAA0B;EAC1B,0BAA0B;AAC5B;;AAEA;EACE;IACE,2BAA2B;EAC7B;AACF;;AAEA;EACE,4BAA4B;EAC5B,oCAAoC;EACpC,mBAAmB;EACnB,kBAAkB;AACpB;;AAEA;EACE,kBAAkB;EAClB,iBAAiB;EACjB,2BAA2B;AAC7B;;AAEA;EACE,sCAAsC;EACtC,iCAAiC;EACjC,4BAA4B;EAC5B,kBAAkB;EAClB,cAAc;EACd,cAAc;EACd,kBAAkB;AACpB;;AAEA;EACE,4BAA4B;EAC5B,4BAA4B;AAC9B;;AAEA;EACE,sBAAsB;EACtB,+BAA+B;EAC/B,sBAAsB;EACtB,SAAS;EACT,aAAa;AACf","sourcesContent":[".fieldSet{display:flex;flex-direction:column;gap:var(--ac-space-6)}.legend{color:var(--ac-foreground);font-weight:600;margin-bottom:var(--ac-space-3)}.legendDefault{font-size:var(--ac-text-base)}.legendLabel{font-size:var(--ac-text-sm)}.group{display:flex;flex-direction:column;gap:calc(var(--ac-space-6) + var(--ac-space-1));width:100%}.group>.group{gap:var(--ac-space-4)}.field{display:flex;gap:var(--ac-space-3);width:100%}.field[data-invalid=true]{color:var(--ac-destructive)}.vertical{flex-direction:column}.vertical>*{width:100%}.horizontal{align-items:center;flex-direction:row}.horizontal>[data-slot=field-label]{flex:0 0 auto}.responsive{flex-direction:column}.responsive>*{width:100%}@media (min-width:768px){.responsive{align-items:center;flex-direction:row}.responsive>*{width:auto}.responsive>[data-slot=field-label]{flex:0 0 auto;min-width:10rem}}.content{flex:1 1 auto;flex-direction:column;min-width:0}.content,.label{display:flex;gap:var(--ac-space-2);line-height:1.4}.label{color:var(--ac-foreground);cursor:default;font-size:var(--ac-text-sm);font-weight:500;user-select:none;width:fit-content}.field[data-disabled=true] .label{opacity:.5}.label:has([data-slot=field]){border:1px solid var(--ac-border);border-radius:var(--ac-radius-md);flex-direction:column;padding:var(--ac-space-4);width:100%}.title{align-items:center;color:var(--ac-foreground);display:flex;font-weight:500;gap:var(--ac-space-2);line-height:1.4;width:fit-content}.description,.title{font-size:var(--ac-text-sm)}.description{color:var(--ac-muted-foreground);line-height:1.5}.description a{color:inherit;text-decoration:underline;text-underline-offset:4px}@media (hover:hover){.description a:hover{color:var(--ac-foreground)}}.separator{font-size:var(--ac-text-sm);margin:calc(var(--ac-space-2)*-1) 0;min-height:1.25rem;position:relative}.separatorLine{inset:50% 0 auto;position:absolute;transform:translateY(-50%)}.separatorContent{background-color:var(--ac-background);color:var(--ac-muted-foreground);display:block;margin:0 auto;padding:0 var(--ac-space-2);position:relative;width:fit-content}.error{color:var(--ac-destructive);font-size:var(--ac-text-sm)}.errorList{display:flex;flex-direction:column;gap:var(--ac-space-1);margin:0;padding-left:var(--ac-space-4)}",".fieldSet {\n gap: var(--ac-space-6);\n flex-direction: column;\n display: flex;\n}\n\n.legend {\n color: var(--ac-foreground);\n margin-bottom: var(--ac-space-3);\n font-weight: 600;\n}\n\n.legendDefault {\n font-size: var(--ac-text-base);\n}\n\n.legendLabel {\n font-size: var(--ac-text-sm);\n}\n\n.group {\n gap: calc(var(--ac-space-6) + var(--ac-space-1));\n flex-direction: column;\n width: 100%;\n display: flex;\n}\n\n.group > .group {\n gap: var(--ac-space-4);\n}\n\n.field {\n gap: var(--ac-space-3);\n width: 100%;\n display: flex;\n}\n\n.field[data-invalid=\"true\"] {\n color: var(--ac-destructive);\n}\n\n.vertical {\n flex-direction: column;\n}\n\n.vertical > * {\n width: 100%;\n}\n\n.horizontal {\n flex-direction: row;\n align-items: center;\n}\n\n.horizontal > [data-slot=\"field-label\"] {\n flex: none;\n}\n\n.responsive {\n flex-direction: column;\n}\n\n.responsive > * {\n width: 100%;\n}\n\n@media (width >= 768px) {\n .responsive {\n flex-direction: row;\n align-items: center;\n }\n\n .responsive > * {\n width: auto;\n }\n\n .responsive > [data-slot=\"field-label\"] {\n flex: none;\n min-width: 10rem;\n }\n}\n\n.content {\n flex-direction: column;\n flex: auto;\n min-width: 0;\n}\n\n.content, .label {\n gap: var(--ac-space-2);\n line-height: 1.4;\n display: flex;\n}\n\n.label {\n color: var(--ac-foreground);\n cursor: default;\n font-size: var(--ac-text-sm);\n -webkit-user-select: none;\n user-select: none;\n width: fit-content;\n font-weight: 500;\n}\n\n.field[data-disabled=\"true\"] .label {\n opacity: .5;\n}\n\n.label:has([data-slot=\"field\"]) {\n border: 1px solid var(--ac-border);\n border-radius: var(--ac-radius-md);\n padding: var(--ac-space-4);\n flex-direction: column;\n width: 100%;\n}\n\n.title {\n color: var(--ac-foreground);\n align-items: center;\n gap: var(--ac-space-2);\n width: fit-content;\n font-weight: 500;\n line-height: 1.4;\n display: flex;\n}\n\n.description, .title {\n font-size: var(--ac-text-sm);\n}\n\n.description {\n color: var(--ac-muted-foreground);\n line-height: 1.5;\n}\n\n.description a {\n color: inherit;\n text-underline-offset: 4px;\n text-decoration: underline;\n}\n\n@media (hover: hover) {\n .description a:hover {\n color: var(--ac-foreground);\n }\n}\n\n.separator {\n font-size: var(--ac-text-sm);\n margin: calc(var(--ac-space-2)*-1) 0;\n min-height: 1.25rem;\n position: relative;\n}\n\n.separatorLine {\n position: absolute;\n inset: 50% 0 auto;\n transform: translateY(-50%);\n}\n\n.separatorContent {\n background-color: var(--ac-background);\n color: var(--ac-muted-foreground);\n padding: 0 var(--ac-space-2);\n width: fit-content;\n margin: 0 auto;\n display: block;\n position: relative;\n}\n\n.error {\n color: var(--ac-destructive);\n font-size: var(--ac-text-sm);\n}\n\n.errorList {\n gap: var(--ac-space-1);\n padding-left: var(--ac-space-4);\n flex-direction: column;\n margin: 0;\n display: flex;\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/field.module.css","webpack://./src/components/ui/field.module.css"],"names":[],"mappings":"AAAA;ECCE,sBAAsB;EACtB,sBAAsB;EACtB,aAAa;AACf;;ADJmE;ECOjE,2BAA2B;EAC3B,gCAAgC;EAChC,gBAAgB;AAClB;;ADVsJ;ECapJ,8BAA8B;AAChC;;ADdmM;ECiBjM,4BAA4B;AAC9B;;ADlB4O;ECqB1O,gDAAgD;EAChD,sBAAsB;EACtB,WAAW;EACX,aAAa;AACf;;ADzBiV;EC4B/U,sBAAsB;AACxB;;AD7BqX;ECgCnX,sBAAsB;EACtB,WAAW;EACX,aAAa;AACf;;ADnC0a;ECsCxa,4BAA4B;AAC9B;;ADvCge;EC0C9d,sBAAsB;AACxB;;AD3CggB;EC8C9f,WAAW;AACb;;AD/CuhB;ECkDrhB,mBAAmB;EACnB,mBAAmB;AACrB;;ADpDykB;ECuDvkB,UAAU;AACZ;;ADxD2nB;EC2DznB,sBAAsB;AACxB;;AD5D6pB;EC+D3pB,WAAW;AACb;;ADhEsrB;EAAyB;ICoE3sB,mBAAmB;IACnB,mBAAmB;EACrB;;EDtE+vB;ICyE7vB,WAAW;EACb;;ED1EwxB;IC6EtxB,UAAU;IACV,gBAAgB;EAClB;AACF;;ADhF61B;ECmF31B,sBAAsB;EACtB,UAAU;EACV,YAAY;AACd;;ADtFs5B;ECyFp5B,sBAAsB;EACtB,gBAAgB;EAChB,aAAa;AACf;;AD5Fy9B;EC+Fv9B,2BAA2B;EAC3B,eAAe;EACf,4BAA4B;EAC5B,yBAAyB;EACzB,iBAAiB;EACjB,kBAAkB;EAClB,gBAAgB;AAClB;;ADtGylC;ECyGvlC,WAAW;AACb;;AD1GsoC;EC6GpoC,kCAAkC;EAClC,kCAAkC;EAClC,0BAA0B;EAC1B,sBAAsB;EACtB,WAAW;AACb;;ADlHmyC;ECqHjyC,2BAA2B;EAC3B,mBAAmB;EACnB,sBAAsB;EACtB,kBAAkB;EAClB,gBAAgB;EAChB,gBAAgB;EAChB,aAAa;AACf;;AD5H66C;EC+H36C,4BAA4B;AAC9B;;ADhI69C;ECmI39C,iCAAiC;EACjC,gBAAgB;AAClB;;ADrI2hD;ECwIzhD,cAAc;EACd,0BAA0B;EAC1B,0BAA0B;AAC5B;;AD3I4mD;EAAqB;IC+I7nD,2BAA2B;EAC7B;AACF;;ADjJkrD;ECoJhrD,4BAA4B;EAC5B,oCAAoC;EACpC,mBAAmB;EACnB,kBAAkB;AACpB;;ADxJkyD;EC2JhyD,kBAAkB;EAClB,iBAAiB;EACjB,2BAA2B;AAC7B;;AD9J+2D;ECiK72D,sCAAsC;EACtC,iCAAiC;EACjC,4BAA4B;EAC5B,kBAAkB;EAClB,cAAc;EACd,cAAc;EACd,kBAAkB;AACpB;;ADxKoiE;EC2KliE,4BAA4B;EAC5B,4BAA4B;AAC9B;;AD7KmmE;ECgLjmE,sBAAsB;EACtB,+BAA+B;EAC/B,sBAAsB;EACtB,SAAS;EACT,aAAa;AACf","sourcesContent":[".fieldSet{display:flex;flex-direction:column;gap:var(--ac-space-6)}.legend{color:var(--ac-foreground);font-weight:600;margin-bottom:var(--ac-space-3)}.legendDefault{font-size:var(--ac-text-base)}.legendLabel{font-size:var(--ac-text-sm)}.group{display:flex;flex-direction:column;gap:calc(var(--ac-space-6) + var(--ac-space-1));width:100%}.group>.group{gap:var(--ac-space-4)}.field{display:flex;gap:var(--ac-space-3);width:100%}.field[data-invalid=true]{color:var(--ac-destructive)}.vertical{flex-direction:column}.vertical>*{width:100%}.horizontal{align-items:center;flex-direction:row}.horizontal>[data-slot=field-label]{flex:0 0 auto}.responsive{flex-direction:column}.responsive>*{width:100%}@media (min-width:768px){.responsive{align-items:center;flex-direction:row}.responsive>*{width:auto}.responsive>[data-slot=field-label]{flex:0 0 auto;min-width:10rem}}.content{flex:1 1 auto;flex-direction:column;min-width:0}.content,.label{display:flex;gap:var(--ac-space-2);line-height:1.4}.label{color:var(--ac-foreground);cursor:default;font-size:var(--ac-text-sm);font-weight:500;user-select:none;width:fit-content}.field[data-disabled=true] .label{opacity:.5}.label:has([data-slot=field]){border:1px solid var(--ac-border);border-radius:var(--ac-radius-md);flex-direction:column;padding:var(--ac-space-4);width:100%}.title{align-items:center;color:var(--ac-foreground);display:flex;font-weight:500;gap:var(--ac-space-2);line-height:1.4;width:fit-content}.description,.title{font-size:var(--ac-text-sm)}.description{color:var(--ac-muted-foreground);line-height:1.5}.description a{color:inherit;text-decoration:underline;text-underline-offset:4px}@media (hover:hover){.description a:hover{color:var(--ac-foreground)}}.separator{font-size:var(--ac-text-sm);margin:calc(var(--ac-space-2)*-1) 0;min-height:1.25rem;position:relative}.separatorLine{inset:50% 0 auto;position:absolute;transform:translateY(-50%)}.separatorContent{background-color:var(--ac-background);color:var(--ac-muted-foreground);display:block;margin:0 auto;padding:0 var(--ac-space-2);position:relative;width:fit-content}.error{color:var(--ac-destructive);font-size:var(--ac-text-sm)}.errorList{display:flex;flex-direction:column;gap:var(--ac-space-1);margin:0;padding-left:var(--ac-space-4)}",".fieldSet {\n gap: var(--ac-space-6);\n flex-direction: column;\n display: flex;\n}\n\n.legend {\n color: var(--ac-foreground);\n margin-bottom: var(--ac-space-3);\n font-weight: 600;\n}\n\n.legendDefault {\n font-size: var(--ac-text-base);\n}\n\n.legendLabel {\n font-size: var(--ac-text-sm);\n}\n\n.group {\n gap: calc(var(--ac-space-6) + var(--ac-space-1));\n flex-direction: column;\n width: 100%;\n display: flex;\n}\n\n.group > .group {\n gap: var(--ac-space-4);\n}\n\n.field {\n gap: var(--ac-space-3);\n width: 100%;\n display: flex;\n}\n\n.field[data-invalid=\"true\"] {\n color: var(--ac-destructive);\n}\n\n.vertical {\n flex-direction: column;\n}\n\n.vertical > * {\n width: 100%;\n}\n\n.horizontal {\n flex-direction: row;\n align-items: center;\n}\n\n.horizontal > [data-slot=\"field-label\"] {\n flex: none;\n}\n\n.responsive {\n flex-direction: column;\n}\n\n.responsive > * {\n width: 100%;\n}\n\n@media (width >= 768px) {\n .responsive {\n flex-direction: row;\n align-items: center;\n }\n\n .responsive > * {\n width: auto;\n }\n\n .responsive > [data-slot=\"field-label\"] {\n flex: none;\n min-width: 10rem;\n }\n}\n\n.content {\n flex-direction: column;\n flex: auto;\n min-width: 0;\n}\n\n.content, .label {\n gap: var(--ac-space-2);\n line-height: 1.4;\n display: flex;\n}\n\n.label {\n color: var(--ac-foreground);\n cursor: default;\n font-size: var(--ac-text-sm);\n -webkit-user-select: none;\n user-select: none;\n width: fit-content;\n font-weight: 500;\n}\n\n.field[data-disabled=\"true\"] .label {\n opacity: .5;\n}\n\n.label:has([data-slot=\"field\"]) {\n border: 1px solid var(--ac-border);\n border-radius: var(--ac-radius-md);\n padding: var(--ac-space-4);\n flex-direction: column;\n width: 100%;\n}\n\n.title {\n color: var(--ac-foreground);\n align-items: center;\n gap: var(--ac-space-2);\n width: fit-content;\n font-weight: 500;\n line-height: 1.4;\n display: flex;\n}\n\n.description, .title {\n font-size: var(--ac-text-sm);\n}\n\n.description {\n color: var(--ac-muted-foreground);\n line-height: 1.5;\n}\n\n.description a {\n color: inherit;\n text-underline-offset: 4px;\n text-decoration: underline;\n}\n\n@media (hover: hover) {\n .description a:hover {\n color: var(--ac-foreground);\n }\n}\n\n.separator {\n font-size: var(--ac-text-sm);\n margin: calc(var(--ac-space-2)*-1) 0;\n min-height: 1.25rem;\n position: relative;\n}\n\n.separatorLine {\n position: absolute;\n inset: 50% 0 auto;\n transform: translateY(-50%);\n}\n\n.separatorContent {\n background-color: var(--ac-background);\n color: var(--ac-muted-foreground);\n padding: 0 var(--ac-space-2);\n width: fit-content;\n margin: 0 auto;\n display: block;\n position: relative;\n}\n\n.error {\n color: var(--ac-destructive);\n font-size: var(--ac-text-sm);\n}\n\n.errorList {\n gap: var(--ac-space-1);\n padding-left: var(--ac-space-4);\n flex-direction: column;\n margin: 0;\n display: flex;\n}\n"],"sourceRoot":""}
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { jsx } from "react/jsx-runtime";
3
- import { forwardRef, useEffect, useImperativeHandle, useRef } from "react";
4
3
  import { cn } from "../../lib/utilities.js";
5
4
  import fireworks_background_module from "./fireworks-background.module.js";
5
+ import * as __rspack_external_react from "react";
6
6
  const rand = (min, max)=>Math.random() * (max - min) + min;
7
7
  const randInt = (min, max)=>Math.floor(Math.random() * (max - min) + min);
8
8
  const randColor = ()=>`hsl(${randInt(0, 360)}, 100%, 50%)`;
@@ -118,7 +118,7 @@ const getColor = (color)=>{
118
118
  if ("string" == typeof color) return color;
119
119
  return randColor();
120
120
  };
121
- const FireworksBackground = /*#__PURE__*/ forwardRef(({ className, canvasProps, population = 1, color, fireworkSpeed = {
121
+ const FireworksBackground = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, canvasProps, population = 1, color, fireworkSpeed = {
122
122
  min: 4,
123
123
  max: 8
124
124
  }, fireworkSize = {
@@ -131,10 +131,10 @@ const FireworksBackground = /*#__PURE__*/ forwardRef(({ className, canvasProps,
131
131
  min: 1,
132
132
  max: 5
133
133
  }, ...props }, ref)=>{
134
- const canvasRef = useRef(null);
135
- const containerRef = useRef(null);
136
- useImperativeHandle(ref, ()=>containerRef.current, []);
137
- useEffect(()=>{
134
+ const canvasRef = __rspack_external_react.useRef(null);
135
+ const containerRef = __rspack_external_react.useRef(null);
136
+ __rspack_external_react.useImperativeHandle(ref, ()=>containerRef.current, []);
137
+ __rspack_external_react.useEffect(()=>{
138
138
  const canvas = canvasRef.current;
139
139
  const container = containerRef.current;
140
140
  if (!canvas || !container) return;
@@ -1 +1 @@
1
- {"version":3,"file":"components/ui/fireworks-background.js","sources":["../../../src/components/ui/fireworks-background.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./fireworks-background.module.css\";\r\n\r\nconst rand = (min: number, max: number): number => Math.random() * (max - min) + min;\r\nconst randInt = (min: number, max: number): number => Math.floor(Math.random() * (max - min) + min);\r\nconst randColor = (): string => `hsl(${randInt(0, 360)}, 100%, 50%)`;\r\n\r\ninterface ParticleType {\r\n x: number;\r\n y: number;\r\n color: string;\r\n speed: number;\r\n direction: number;\r\n vx: number;\r\n vy: number;\r\n gravity: number;\r\n friction: number;\r\n alpha: number;\r\n decay: number;\r\n size: number;\r\n update: () => void;\r\n draw: (ctx: CanvasRenderingContext2D) => void;\r\n isAlive: () => boolean;\r\n}\r\n\r\nconst createParticle = (\r\n x: number,\r\n y: number,\r\n color: string,\r\n speed: number,\r\n direction: number,\r\n gravity: number,\r\n friction: number,\r\n size: number,\r\n): ParticleType => {\r\n const vx = Math.cos(direction) * speed;\r\n const vy = Math.sin(direction) * speed;\r\n const alpha = 1;\r\n const decay = rand(0.005, 0.02);\r\n\r\n return {\r\n x,\r\n y,\r\n color,\r\n speed,\r\n direction,\r\n vx,\r\n vy,\r\n gravity,\r\n friction,\r\n alpha,\r\n decay,\r\n size,\r\n update() {\r\n this.vx *= this.friction;\r\n this.vy *= this.friction;\r\n this.vy += this.gravity;\r\n this.x += this.vx;\r\n this.y += this.vy;\r\n this.alpha -= this.decay;\r\n },\r\n draw(ctx: CanvasRenderingContext2D) {\r\n ctx.save();\r\n ctx.globalAlpha = this.alpha;\r\n ctx.beginPath();\r\n ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2);\r\n ctx.fillStyle = this.color;\r\n ctx.fill();\r\n ctx.restore();\r\n },\r\n isAlive() {\r\n return this.alpha > 0;\r\n },\r\n };\r\n};\r\n\r\ninterface FireworkType {\r\n x: number;\r\n y: number;\r\n targetY: number;\r\n color: string;\r\n speed: number;\r\n size: number;\r\n angle: number;\r\n vx: number;\r\n vy: number;\r\n trail: Array<{x: number; y: number}>;\r\n trailLength: number;\r\n exploded: boolean;\r\n update: () => boolean;\r\n explode: () => void;\r\n draw: (ctx: CanvasRenderingContext2D) => void;\r\n}\r\n\r\nconst createFirework = (\r\n x: number,\r\n y: number,\r\n targetY: number,\r\n color: string,\r\n speed: number,\r\n size: number,\r\n particleSpeed: {min: number; max: number} | number,\r\n particleSize: {min: number; max: number} | number,\r\n onExplode: (particles: ReadonlyArray<ParticleType>) => void,\r\n): FireworkType => {\r\n const angle = -Math.PI / 2 + rand(-0.3, 0.3);\r\n const vx = Math.cos(angle) * speed;\r\n const vy = Math.sin(angle) * speed;\r\n const trail: Array<{x: number; y: number}> = [];\r\n const trailLength = randInt(10, 25);\r\n\r\n return {\r\n x,\r\n y,\r\n targetY,\r\n color,\r\n speed,\r\n size,\r\n angle,\r\n vx,\r\n vy,\r\n trail,\r\n trailLength,\r\n exploded: false,\r\n update() {\r\n this.trail.push({x: this.x, y: this.y});\r\n if (this.trail.length > this.trailLength) {\r\n this.trail.shift();\r\n }\r\n this.x += this.vx;\r\n this.y += this.vy;\r\n this.vy += 0.02;\r\n if (this.vy >= 0 || this.y <= this.targetY) {\r\n this.explode();\r\n return false;\r\n }\r\n return true;\r\n },\r\n explode() {\r\n const numberOfParticles = randInt(50, 150);\r\n const particles: Array<ParticleType> = [];\r\n for (let index = 0; index < numberOfParticles; index += 1) {\r\n const particleAngle = rand(0, Math.PI * 2);\r\n const localParticleSpeed = getValueByRange(particleSpeed);\r\n const localParticleSize = getValueByRange(particleSize);\r\n particles.push(createParticle(this.x, this.y, this.color, localParticleSpeed, particleAngle, 0.05, 0.98, localParticleSize));\r\n }\r\n onExplode(particles);\r\n },\r\n draw(ctx: CanvasRenderingContext2D) {\r\n ctx.save();\r\n ctx.beginPath();\r\n if (this.trail.length > 1) {\r\n ctx.moveTo(this.trail[0]!.x, this.trail[0]!.y);\r\n for (const point of this.trail) {\r\n ctx.lineTo(point.x, point.y);\r\n }\r\n } else {\r\n ctx.moveTo(this.x, this.y);\r\n ctx.lineTo(this.x, this.y);\r\n }\r\n ctx.strokeStyle = this.color;\r\n ctx.lineWidth = this.size;\r\n ctx.lineCap = \"round\";\r\n ctx.stroke();\r\n ctx.restore();\r\n },\r\n };\r\n};\r\n\r\nconst getValueByRange = (range: {min: number; max: number} | number): number => {\r\n if (typeof range === \"number\") {\r\n return range;\r\n }\r\n\r\n return rand(range.min, range.max);\r\n};\r\n\r\nconst getColor = (color: string | ReadonlyArray<string> | undefined): string => {\r\n if (Array.isArray(color)) {\r\n return color[randInt(0, color.length)] ?? randColor();\r\n }\r\n\r\n if (typeof color === \"string\") {\r\n return color;\r\n }\r\n\r\n return randColor();\r\n};\r\n\r\n/** Props accepted by {@link FireworksBackground}. */\r\nexport interface FireworksBackgroundProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"color\"> {\r\n /** HTML attributes forwarded to the internal `<canvas>` element. @default undefined */\r\n canvasProps?: React.HTMLAttributes<HTMLCanvasElement>;\r\n /** Relative launch frequency multiplier for automatic fireworks. @default 1 */\r\n population?: number;\r\n /** Fixed color or palette used for generated fireworks and particles. @default undefined */\r\n color?: string | ReadonlyArray<string>;\r\n /** Launch velocity or range used for ascending fireworks. @default {min: 4, max: 8} */\r\n fireworkSpeed?: {min: number; max: number} | number;\r\n /** Stroke width or range used for the ascending firework trail. @default {min: 2, max: 5} */\r\n fireworkSize?: {min: number; max: number} | number;\r\n /** Velocity or range used for explosion particles. @default {min: 2, max: 7} */\r\n particleSpeed?: {min: number; max: number} | number;\r\n /** Size or range used for explosion particles. @default {min: 1, max: 5} */\r\n particleSize?: {min: number; max: number} | number;\r\n}\r\n\r\n/**\r\n * Renders an auto-launching fireworks display inside a clickable background canvas.\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 * <FireworksBackground population={2} />\r\n * ```\r\n *\r\n * @see {@link FireworksBackgroundProps} for available props\r\n */\r\nconst FireworksBackground = React.forwardRef<HTMLDivElement, FireworksBackgroundProps>(\r\n (\r\n {\r\n className,\r\n canvasProps,\r\n population = 1,\r\n color,\r\n fireworkSpeed = {min: 4, max: 8},\r\n fireworkSize = {min: 2, max: 5},\r\n particleSpeed = {min: 2, max: 7},\r\n particleSize = {min: 1, max: 5},\r\n ...props\r\n },\r\n ref,\r\n ) => {\r\n const canvasRef = React.useRef<HTMLCanvasElement>(null);\r\n const containerRef = React.useRef<HTMLDivElement>(null);\r\n\r\n React.useImperativeHandle(ref, () => containerRef.current!, []);\r\n\r\n React.useEffect(() => {\r\n const canvas = canvasRef.current;\r\n const container = containerRef.current;\r\n if (!canvas || !container) {\r\n return;\r\n }\r\n\r\n const context = canvas.getContext(\"2d\");\r\n if (!context) {\r\n return;\r\n }\r\n\r\n let maxX = globalThis.window.innerWidth;\r\n let ratio = container.offsetHeight / Math.max(container.offsetWidth, 1);\r\n let maxY = maxX * ratio;\r\n let launchTimeoutId = 0;\r\n canvas.width = maxX;\r\n canvas.height = maxY;\r\n\r\n const setCanvasSize = (): void => {\r\n maxX = globalThis.window.innerWidth;\r\n ratio = container.offsetHeight / Math.max(container.offsetWidth, 1);\r\n maxY = maxX * ratio;\r\n canvas.width = maxX;\r\n canvas.height = maxY;\r\n };\r\n\r\n globalThis.window.addEventListener(\"resize\", setCanvasSize);\r\n\r\n const explosions: Array<ParticleType> = [];\r\n const fireworks: Array<FireworkType> = [];\r\n\r\n const handleExplosion = (particles: ReadonlyArray<ParticleType>): void => {\r\n explosions.push(...particles);\r\n };\r\n\r\n const launchFirework = (): void => {\r\n const x = rand(maxX * 0.1, maxX * 0.9);\r\n const y = maxY;\r\n const targetY = rand(maxY * 0.1, maxY * 0.4);\r\n const fireworkColor = getColor(color);\r\n const speed = getValueByRange(fireworkSpeed);\r\n const size = getValueByRange(fireworkSize);\r\n fireworks.push(createFirework(x, y, targetY, fireworkColor, speed, size, particleSpeed, particleSize, handleExplosion));\r\n const timeout = rand(300, 800) / population;\r\n launchTimeoutId = globalThis.window.setTimeout(launchFirework, timeout);\r\n };\r\n\r\n launchFirework();\r\n\r\n let animationFrameId = 0;\r\n const animate = (): void => {\r\n context.clearRect(0, 0, maxX, maxY);\r\n\r\n for (let index = fireworks.length - 1; index >= 0; index -= 1) {\r\n const firework = fireworks[index]!;\r\n if (firework.update()) {\r\n firework.draw(context);\r\n } else {\r\n fireworks.splice(index, 1);\r\n }\r\n }\r\n\r\n for (let index = explosions.length - 1; index >= 0; index -= 1) {\r\n const particle = explosions[index]!;\r\n particle.update();\r\n if (particle.isAlive()) {\r\n particle.draw(context);\r\n } else {\r\n explosions.splice(index, 1);\r\n }\r\n }\r\n\r\n animationFrameId = globalThis.requestAnimationFrame(animate);\r\n };\r\n\r\n animate();\r\n\r\n const handleClick = (event: MouseEvent): void => {\r\n const fireworkColor = getColor(color);\r\n const speed = getValueByRange(fireworkSpeed);\r\n const size = getValueByRange(fireworkSize);\r\n fireworks.push(\r\n createFirework(event.clientX, maxY, event.clientY, fireworkColor, speed, size, particleSpeed, particleSize, handleExplosion),\r\n );\r\n };\r\n\r\n container.addEventListener(\"click\", handleClick);\r\n\r\n return () => {\r\n globalThis.window.removeEventListener(\"resize\", setCanvasSize);\r\n container.removeEventListener(\"click\", handleClick);\r\n globalThis.window.clearTimeout(launchTimeoutId);\r\n globalThis.cancelAnimationFrame(animationFrameId);\r\n };\r\n }, [color, fireworkSize, fireworkSpeed, particleSize, particleSpeed, population]);\r\n\r\n return (\r\n <div\r\n ref={containerRef}\r\n className={cn(styles.root, className)}\r\n {...props}>\r\n <canvas\r\n {...canvasProps}\r\n ref={canvasRef}\r\n className={cn(styles.canvas, canvasProps?.className)}\r\n />\r\n </div>\r\n );\r\n },\r\n);\r\n\r\nFireworksBackground.displayName = \"FireworksBackground\";\r\n\r\nexport {FireworksBackground};\r\n"],"names":["rand","min","max","Math","randInt","randColor","createParticle","x","y","color","speed","direction","gravity","friction","size","vx","vy","alpha","decay","ctx","createFirework","targetY","particleSpeed","particleSize","onExplode","angle","trail","trailLength","numberOfParticles","particles","index","particleAngle","localParticleSpeed","getValueByRange","localParticleSize","point","range","getColor","Array","FireworksBackground","React","className","canvasProps","population","fireworkSpeed","fireworkSize","props","ref","canvasRef","containerRef","canvas","container","context","maxX","globalThis","ratio","maxY","launchTimeoutId","setCanvasSize","explosions","fireworks","handleExplosion","launchFirework","fireworkColor","timeout","animationFrameId","animate","firework","particle","handleClick","event","cn","styles"],"mappings":";;;;;AAOA,MAAMA,OAAO,CAACC,KAAaC,MAAwBC,KAAK,MAAM,KAAMD,CAAAA,MAAMD,GAAE,IAAKA;AACjF,MAAMG,UAAU,CAACH,KAAaC,MAAwBC,KAAK,KAAK,CAACA,KAAK,MAAM,KAAMD,CAAAA,MAAMD,GAAE,IAAKA;AAC/F,MAAMI,YAAY,IAAc,CAAC,IAAI,EAAED,QAAQ,GAAG,KAAK,YAAY,CAAC;AAoBpE,MAAME,iBAAiB,CACrBC,GACAC,GACAC,OACAC,OACAC,WACAC,SACAC,UACAC;IAEA,MAAMC,KAAKZ,KAAK,GAAG,CAACQ,aAAaD;IACjC,MAAMM,KAAKb,KAAK,GAAG,CAACQ,aAAaD;IACjC,MAAMO,QAAQ;IACd,MAAMC,QAAQlB,KAAK,OAAO;IAE1B,OAAO;QACLO;QACAC;QACAC;QACAC;QACAC;QACAI;QACA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AAM;gBACjC,IAAIqC,SAAS,MAAM,IACjBA,SAAS,IAAI,CAACf;qBAEdQ,UAAU,MAAM,CAAC9B,OAAO;YAE5B;YAEA,IAAK,IAAIA,QAAQ6B,WAAW,MAAM,GAAG,GAAG7B,SAAS,GAAGA,SAAS,EAAG;gBAC9D,MAAMsC,WAAWT,UAAU,CAAC7B,MAAM;gBAClCsC,SAAS,MAAM;gBACf,IAAIA,SAAS,OAAO,IAClBA,SAAS,IAAI,CAAChB;qBAEdO,WAAW,MAAM,CAAC7B,OAAO;YAE7B;YAEAmC,mBAAmBX,WAAW,qBAAqB,CAACY;QACtD;QAEAA;QAEA,MAAMG,cAAc,CAACC;YACnB,MAAMP,gBAAgB1B,SAAS5B;YAC/B,MAAMC,QAAQuB,gBAAgBW;YAC9B,MAAM9B,OAAOmB,gBAAgBY;YAC7Be,UAAU,IAAI,CACZxC,eAAekD,MAAM,OAAO,EAAEd,MAAMc,MAAM,OAAO,EAAEP,eAAerD,OAAOI,MAAMQ,eAAeC,cAAcsC;QAEhH;QAEAV,UAAU,gBAAgB,CAAC,SAASkB;QAEpC,OAAO;YACLf,WAAW,MAAM,CAAC,mBAAmB,CAAC,UAAUI;YAChDP,UAAU,mBAAmB,CAAC,SAASkB;YACvCf,WAAW,MAAM,CAAC,YAAY,CAACG;YAC/BH,WAAW,oBAAoB,CAACW;QAClC;IACF,GAAG;QAACxD;QAAOoC;QAAcD;QAAerB;QAAcD;QAAeqB;KAAW;IAEhF,OAAO,WAAP,GACE,IAAC;QACC,KAAKM;QACL,WAAWsB,GAAGC,4BAAAA,IAAW,EAAE/B;QAC1B,GAAGK,KAAK;kBACT,kBAAC;YACE,GAAGJ,WAAW;YACf,KAAKM;YACL,WAAWuB,GAAGC,4BAAAA,MAAa,EAAE9B,aAAa;;;AAIlD;AAGFH,oBAAoB,WAAW,GAAG"}
1
+ {"version":3,"file":"components/ui/fireworks-background.js","sources":["../../../src/components/ui/fireworks-background.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./fireworks-background.module.css\";\r\n\r\nconst rand = (min: number, max: number): number => Math.random() * (max - min) + min;\r\nconst randInt = (min: number, max: number): number => Math.floor(Math.random() * (max - min) + min);\r\nconst randColor = (): string => `hsl(${randInt(0, 360)}, 100%, 50%)`;\r\n\r\ninterface ParticleType {\r\n x: number;\r\n y: number;\r\n color: string;\r\n speed: number;\r\n direction: number;\r\n vx: number;\r\n vy: number;\r\n gravity: number;\r\n friction: number;\r\n alpha: number;\r\n decay: number;\r\n size: number;\r\n update: () => void;\r\n draw: (ctx: CanvasRenderingContext2D) => void;\r\n isAlive: () => boolean;\r\n}\r\n\r\nconst createParticle = (\r\n x: number,\r\n y: number,\r\n color: string,\r\n speed: number,\r\n direction: number,\r\n gravity: number,\r\n friction: number,\r\n size: number,\r\n): ParticleType => {\r\n const vx = Math.cos(direction) * speed;\r\n const vy = Math.sin(direction) * speed;\r\n const alpha = 1;\r\n const decay = rand(0.005, 0.02);\r\n\r\n return {\r\n x,\r\n y,\r\n color,\r\n speed,\r\n direction,\r\n vx,\r\n vy,\r\n gravity,\r\n friction,\r\n alpha,\r\n decay,\r\n size,\r\n update() {\r\n this.vx *= this.friction;\r\n this.vy *= this.friction;\r\n this.vy += this.gravity;\r\n this.x += this.vx;\r\n this.y += this.vy;\r\n this.alpha -= this.decay;\r\n },\r\n draw(ctx: CanvasRenderingContext2D) {\r\n ctx.save();\r\n ctx.globalAlpha = this.alpha;\r\n ctx.beginPath();\r\n ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2);\r\n ctx.fillStyle = this.color;\r\n ctx.fill();\r\n ctx.restore();\r\n },\r\n isAlive() {\r\n return this.alpha > 0;\r\n },\r\n };\r\n};\r\n\r\ninterface FireworkType {\r\n x: number;\r\n y: number;\r\n targetY: number;\r\n color: string;\r\n speed: number;\r\n size: number;\r\n angle: number;\r\n vx: number;\r\n vy: number;\r\n trail: Array<{x: number; y: number}>;\r\n trailLength: number;\r\n exploded: boolean;\r\n update: () => boolean;\r\n explode: () => void;\r\n draw: (ctx: CanvasRenderingContext2D) => void;\r\n}\r\n\r\nconst createFirework = (\r\n x: number,\r\n y: number,\r\n targetY: number,\r\n color: string,\r\n speed: number,\r\n size: number,\r\n particleSpeed: {min: number; max: number} | number,\r\n particleSize: {min: number; max: number} | number,\r\n onExplode: (particles: ReadonlyArray<ParticleType>) => void,\r\n): FireworkType => {\r\n const angle = -Math.PI / 2 + rand(-0.3, 0.3);\r\n const vx = Math.cos(angle) * speed;\r\n const vy = Math.sin(angle) * speed;\r\n const trail: Array<{x: number; y: number}> = [];\r\n const trailLength = randInt(10, 25);\r\n\r\n return {\r\n x,\r\n y,\r\n targetY,\r\n color,\r\n speed,\r\n size,\r\n angle,\r\n vx,\r\n vy,\r\n trail,\r\n trailLength,\r\n exploded: false,\r\n update() {\r\n this.trail.push({x: this.x, y: this.y});\r\n if (this.trail.length > this.trailLength) {\r\n this.trail.shift();\r\n }\r\n this.x += this.vx;\r\n this.y += this.vy;\r\n this.vy += 0.02;\r\n if (this.vy >= 0 || this.y <= this.targetY) {\r\n this.explode();\r\n return false;\r\n }\r\n return true;\r\n },\r\n explode() {\r\n const numberOfParticles = randInt(50, 150);\r\n const particles: Array<ParticleType> = [];\r\n for (let index = 0; index < numberOfParticles; index += 1) {\r\n const particleAngle = rand(0, Math.PI * 2);\r\n const localParticleSpeed = getValueByRange(particleSpeed);\r\n const localParticleSize = getValueByRange(particleSize);\r\n particles.push(createParticle(this.x, this.y, this.color, localParticleSpeed, particleAngle, 0.05, 0.98, localParticleSize));\r\n }\r\n onExplode(particles);\r\n },\r\n draw(ctx: CanvasRenderingContext2D) {\r\n ctx.save();\r\n ctx.beginPath();\r\n if (this.trail.length > 1) {\r\n ctx.moveTo(this.trail[0]!.x, this.trail[0]!.y);\r\n for (const point of this.trail) {\r\n ctx.lineTo(point.x, point.y);\r\n }\r\n } else {\r\n ctx.moveTo(this.x, this.y);\r\n ctx.lineTo(this.x, this.y);\r\n }\r\n ctx.strokeStyle = this.color;\r\n ctx.lineWidth = this.size;\r\n ctx.lineCap = \"round\";\r\n ctx.stroke();\r\n ctx.restore();\r\n },\r\n };\r\n};\r\n\r\nconst getValueByRange = (range: {min: number; max: number} | number): number => {\r\n if (typeof range === \"number\") {\r\n return range;\r\n }\r\n\r\n return rand(range.min, range.max);\r\n};\r\n\r\nconst getColor = (color: string | ReadonlyArray<string> | undefined): string => {\r\n if (Array.isArray(color)) {\r\n return color[randInt(0, color.length)] ?? randColor();\r\n }\r\n\r\n if (typeof color === \"string\") {\r\n return color;\r\n }\r\n\r\n return randColor();\r\n};\r\n\r\n/** Props accepted by {@link FireworksBackground}. */\r\nexport interface FireworksBackgroundProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"color\"> {\r\n /** HTML attributes forwarded to the internal `<canvas>` element. @default undefined */\r\n canvasProps?: React.HTMLAttributes<HTMLCanvasElement>;\r\n /** Relative launch frequency multiplier for automatic fireworks. @default 1 */\r\n population?: number;\r\n /** Fixed color or palette used for generated fireworks and particles. @default undefined */\r\n color?: string | ReadonlyArray<string>;\r\n /** Launch velocity or range used for ascending fireworks. @default {min: 4, max: 8} */\r\n fireworkSpeed?: {min: number; max: number} | number;\r\n /** Stroke width or range used for the ascending firework trail. @default {min: 2, max: 5} */\r\n fireworkSize?: {min: number; max: number} | number;\r\n /** Velocity or range used for explosion particles. @default {min: 2, max: 7} */\r\n particleSpeed?: {min: number; max: number} | number;\r\n /** Size or range used for explosion particles. @default {min: 1, max: 5} */\r\n particleSize?: {min: number; max: number} | number;\r\n}\r\n\r\n/**\r\n * Renders an auto-launching fireworks display inside a clickable background canvas.\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 * <FireworksBackground population={2} />\r\n * ```\r\n *\r\n * @see {@link FireworksBackgroundProps} for available props\r\n */\r\nconst FireworksBackground = React.forwardRef<HTMLDivElement, FireworksBackgroundProps>(\r\n (\r\n {\r\n className,\r\n canvasProps,\r\n population = 1,\r\n color,\r\n fireworkSpeed = {min: 4, max: 8},\r\n fireworkSize = {min: 2, max: 5},\r\n particleSpeed = {min: 2, max: 7},\r\n particleSize = {min: 1, max: 5},\r\n ...props\r\n },\r\n ref,\r\n ) => {\r\n const canvasRef = React.useRef<HTMLCanvasElement>(null);\r\n const containerRef = React.useRef<HTMLDivElement>(null);\r\n\r\n React.useImperativeHandle(ref, () => containerRef.current!, []);\r\n\r\n React.useEffect(() => {\r\n const canvas = canvasRef.current;\r\n const container = containerRef.current;\r\n if (!canvas || !container) {\r\n return;\r\n }\r\n\r\n const context = canvas.getContext(\"2d\");\r\n if (!context) {\r\n return;\r\n }\r\n\r\n let maxX = globalThis.window.innerWidth;\r\n let ratio = container.offsetHeight / Math.max(container.offsetWidth, 1);\r\n let maxY = maxX * ratio;\r\n let launchTimeoutId = 0;\r\n canvas.width = maxX;\r\n canvas.height = maxY;\r\n\r\n const setCanvasSize = (): void => {\r\n maxX = globalThis.window.innerWidth;\r\n ratio = container.offsetHeight / Math.max(container.offsetWidth, 1);\r\n maxY = maxX * ratio;\r\n canvas.width = maxX;\r\n canvas.height = maxY;\r\n };\r\n\r\n globalThis.window.addEventListener(\"resize\", setCanvasSize);\r\n\r\n const explosions: Array<ParticleType> = [];\r\n const fireworks: Array<FireworkType> = [];\r\n\r\n const handleExplosion = (particles: ReadonlyArray<ParticleType>): void => {\r\n explosions.push(...particles);\r\n };\r\n\r\n const launchFirework = (): void => {\r\n const x = rand(maxX * 0.1, maxX * 0.9);\r\n const y = maxY;\r\n const targetY = rand(maxY * 0.1, maxY * 0.4);\r\n const fireworkColor = getColor(color);\r\n const speed = getValueByRange(fireworkSpeed);\r\n const size = getValueByRange(fireworkSize);\r\n fireworks.push(createFirework(x, y, targetY, fireworkColor, speed, size, particleSpeed, particleSize, handleExplosion));\r\n const timeout = rand(300, 800) / population;\r\n launchTimeoutId = globalThis.window.setTimeout(launchFirework, timeout);\r\n };\r\n\r\n launchFirework();\r\n\r\n let animationFrameId = 0;\r\n const animate = (): void => {\r\n context.clearRect(0, 0, maxX, maxY);\r\n\r\n for (let index = fireworks.length - 1; index >= 0; index -= 1) {\r\n const firework = fireworks[index]!;\r\n if (firework.update()) {\r\n firework.draw(context);\r\n } else {\r\n fireworks.splice(index, 1);\r\n }\r\n }\r\n\r\n for (let index = explosions.length - 1; index >= 0; index -= 1) {\r\n const particle = explosions[index]!;\r\n particle.update();\r\n if (particle.isAlive()) {\r\n particle.draw(context);\r\n } else {\r\n explosions.splice(index, 1);\r\n }\r\n }\r\n\r\n animationFrameId = globalThis.requestAnimationFrame(animate);\r\n };\r\n\r\n animate();\r\n\r\n const handleClick = (event: MouseEvent): void => {\r\n const fireworkColor = getColor(color);\r\n const speed = getValueByRange(fireworkSpeed);\r\n const size = getValueByRange(fireworkSize);\r\n fireworks.push(\r\n createFirework(event.clientX, maxY, event.clientY, fireworkColor, speed, size, particleSpeed, particleSize, handleExplosion),\r\n );\r\n };\r\n\r\n container.addEventListener(\"click\", handleClick);\r\n\r\n return () => {\r\n globalThis.window.removeEventListener(\"resize\", setCanvasSize);\r\n container.removeEventListener(\"click\", handleClick);\r\n globalThis.window.clearTimeout(launchTimeoutId);\r\n globalThis.cancelAnimationFrame(animationFrameId);\r\n };\r\n }, [color, fireworkSize, fireworkSpeed, particleSize, particleSpeed, population]);\r\n\r\n return (\r\n <div\r\n ref={containerRef}\r\n className={cn(styles.root, className)}\r\n {...props}>\r\n <canvas\r\n {...canvasProps}\r\n ref={canvasRef}\r\n className={cn(styles.canvas, canvasProps?.className)}\r\n />\r\n </div>\r\n );\r\n },\r\n);\r\n\r\nFireworksBackground.displayName = \"FireworksBackground\";\r\n\r\nexport {FireworksBackground};\r\n"],"names":["rand","min","max","Math","randInt","randColor","createParticle","x","y","color","speed","direction","gravity","friction","size","vx","vy","alpha","decay","ctx","createFirework","targetY","particleSpeed","particleSize","onExplode","angle","trail","trailLength","numberOfParticles","particles","index","particleAngle","localParticleSpeed","getValueByRange","localParticleSize","point","range","getColor","Array","FireworksBackground","React","className","canvasProps","population","fireworkSpeed","fireworkSize","props","ref","canvasRef","containerRef","canvas","container","context","maxX","globalThis","ratio","maxY","launchTimeoutId","setCanvasSize","explosions","fireworks","handleExplosion","launchFirework","fireworkColor","timeout","animationFrameId","animate","firework","particle","handleClick","event","cn","styles"],"mappings":";;;;;AAOA,MAAMA,OAAO,CAACC,KAAaC,MAAwBC,KAAK,MAAM,KAAMD,CAAAA,MAAMD,GAAE,IAAKA;AACjF,MAAMG,UAAU,CAACH,KAAaC,MAAwBC,KAAK,KAAK,CAACA,KAAK,MAAM,KAAMD,CAAAA,MAAMD,GAAE,IAAKA;AAC/F,MAAMI,YAAY,IAAc,CAAC,IAAI,EAAED,QAAQ,GAAG,KAAK,YAAY,CAAC;AAoBpE,MAAME,iBAAiB,CACrBC,GACAC,GACAC,OACAC,OACAC,WACAC,SACAC,UACAC;IAEA,MAAMC,KAAKZ,KAAK,GAAG,CAACQ,aAAaD;IACjC,MAAMM,KAAKb,KAAK,GAAG,CAACQ,aAAaD;IACjC,MAAMO,QAAQ;IACd,MAAMC,QAAQlB,KAAK,OAAO;IAE1B,OAAO;QACLO;QACAC;QACAC;QACAC;QACAC;QACAI;QACAC;QACAJ;QACAC;QACAI;QACAC;QACAJ;QACA;YACE,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,QAAQ;YACxB,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,QAAQ;YACxB,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,OAAO;YACvB,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,EAAE;YACjB,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,EAAE;YACjB,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK;Q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,SAAS,OAAO,IAClBA,SAAS,IAAI,CAAChB;qBAEdO,WAAW,MAAM,CAAC7B,OAAO;YAE7B;YAEAmC,mBAAmBX,WAAW,qBAAqB,CAACY;QACtD;QAEAA;QAEA,MAAMG,cAAc,CAACC;YACnB,MAAMP,gBAAgB1B,SAAS5B;YAC/B,MAAMC,QAAQuB,gBAAgBW;YAC9B,MAAM9B,OAAOmB,gBAAgBY;YAC7Be,UAAU,IAAI,CACZxC,eAAekD,MAAM,OAAO,EAAEd,MAAMc,MAAM,OAAO,EAAEP,eAAerD,OAAOI,MAAMQ,eAAeC,cAAcsC;QAEhH;QAEAV,UAAU,gBAAgB,CAAC,SAASkB;QAEpC,OAAO;YACLf,WAAW,MAAM,CAAC,mBAAmB,CAAC,UAAUI;YAChDP,UAAU,mBAAmB,CAAC,SAASkB;YACvCf,WAAW,MAAM,CAAC,YAAY,CAACG;YAC/BH,WAAW,oBAAoB,CAACW;QAClC;IACF,GAAG;QAACxD;QAAOoC;QAAcD;QAAerB;QAAcD;QAAeqB;KAAW;IAEhF,OAAO,WAAP,GACE,IAAC;QACC,KAAKM;QACL,WAAWsB,GAAGC,4BAAAA,IAAW,EAAE/B;QAC1B,GAAGK,KAAK;kBACT,kBAAC;YACE,GAAGJ,WAAW;YACf,KAAKM;YACL,WAAWuB,GAAGC,4BAAAA,MAAa,EAAE9B,aAAa;;;AAIlD;AAGFH,oBAAoB,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/fireworks-background.module.css","webpack://./src/components/ui/fireworks-background.module.css"],"names":[],"mappings":"AADA;ECEE,kBAAkB;EAClB,gBAAgB;AAClB;;AAEA;EACE,WAAW;EACX,YAAY;AACd;;AAEA;EACE,kBAAkB;EAClB,QAAQ;AACV","sourcesContent":[".root{overflow:hidden;position:relative}.canvas,.root{height:100%;width:100%}.canvas{inset:0;position:absolute}",".root {\n position: relative;\n overflow: hidden;\n}\n\n.canvas, .root {\n width: 100%;\n height: 100%;\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/fireworks-background.module.css","webpack://./src/components/ui/fireworks-background.module.css"],"names":[],"mappings":"AAAA;ECCE,kBAAkB;EAClB,gBAAgB;AAClB;;ADHwC;ECMtC,WAAW;EACX,YAAY;AACd;;ADR6E;ECW3E,kBAAkB;EAClB,QAAQ;AACV","sourcesContent":[".root{overflow:hidden;position:relative}.canvas,.root{height:100%;width:100%}.canvas{inset:0;position:absolute}",".root {\n position: relative;\n overflow: hidden;\n}\n\n.canvas, .root {\n width: 100%;\n height: 100%;\n}\n\n.canvas {\n position: absolute;\n inset: 0;\n}\n"],"sourceRoot":""}
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { motion } from "motion/react";
4
- import { forwardRef, useCallback, useMemo } from "react";
5
4
  import { cn } from "../../lib/utilities.js";
6
5
  import flip_button_module from "./flip-button.module.js";
7
- const FlipButton = /*#__PURE__*/ forwardRef(({ frontText, backText, transition = {
6
+ import * as __rspack_external_react from "react";
7
+ const FlipButton = /*#__PURE__*/ __rspack_external_react.forwardRef(({ frontText, backText, transition = {
8
8
  type: "spring",
9
9
  stiffness: 280,
10
10
  damping: 20
@@ -14,7 +14,7 @@ const FlipButton = /*#__PURE__*/ forwardRef(({ frontText, backText, transition =
14
14
  const rotateAxis = isVertical ? "rotateX" : "rotateY";
15
15
  const frontOffset = "top" === from || "left" === from ? "50%" : "-50%";
16
16
  const backOffset = "top" === from || "left" === from ? "-50%" : "50%";
17
- const buildVariant = useCallback((opacity, rotation, offset = null)=>({
17
+ const buildVariant = __rspack_external_react.useCallback((opacity, rotation, offset = null)=>({
18
18
  opacity,
19
19
  [rotateAxis]: rotation,
20
20
  ...isVertical && null !== offset ? {
@@ -27,14 +27,14 @@ const FlipButton = /*#__PURE__*/ forwardRef(({ frontText, backText, transition =
27
27
  isVertical,
28
28
  rotateAxis
29
29
  ]);
30
- const frontVariants = useMemo(()=>({
30
+ const frontVariants = __rspack_external_react.useMemo(()=>({
31
31
  initial: buildVariant(1, 0, "0%"),
32
32
  hover: buildVariant(0, 90, frontOffset)
33
33
  }), [
34
34
  buildVariant,
35
35
  frontOffset
36
36
  ]);
37
- const backVariants = useMemo(()=>({
37
+ const backVariants = __rspack_external_react.useMemo(()=>({
38
38
  initial: buildVariant(0, 90, backOffset),
39
39
  hover: buildVariant(1, 0, "0%")
40
40
  }), [
@@ -1 +1 @@
1
- {"version":3,"file":"components/ui/flip-button.js","sources":["../../../src/components/ui/flip-button.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {type HTMLMotionProps, motion, type Transition, type Variant} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./flip-button.module.css\";\r\n\r\n/** Supported flip origins for the button animation. */\r\nexport type FlipDirection = \"top\" | \"bottom\" | \"left\" | \"righ\";\r\n\r\n/** Props accepted by {@link FlipButton}. */\r\nexport interface FlipButtonProps extends HTMLMotionProps<\"button\"> {\r\n /** Label rendered on the default face of the button. @default undefined */\r\n frontText: string;\r\n /** Label revealed after the flip animation completes. @default undefined */\r\n backText: string;\r\n /** Motion transition applied to both button faces. @default {type: \"spring\", stiffness: 280, damping: 20} */\r\n transition?: Transition;\r\n /** Additional CSS classes merged with the front face. @default undefined */\r\n frontClassName?: string;\r\n /** Additional CSS classes merged with the back face. @default undefined */\r\n backClassName?: string;\r\n /** Direction from which the back face flips into view. @default \"top\" */\r\n from?: FlipDirection;\r\n}\r\n\r\n/**\r\n * Renders a two-sided button that flips between front and back labels on hover.\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 * <FlipButton frontText=\"Learn more\" backText=\"Open\" />\r\n * ```\r\n *\r\n * @see {@link FlipButtonProps} for available props\r\n */\r\nconst FlipButton = React.forwardRef<HTMLButtonElement, FlipButtonProps>(\r\n (\r\n {\r\n frontText,\r\n backText,\r\n transition = {type: \"spring\", stiffness: 280, damping: 20},\r\n className,\r\n frontClassName,\r\n backClassName,\r\n from = \"top\",\r\n ...props\r\n },\r\n ref,\r\n ) => {\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 isVertical = from === \"top\" || from === \"bottom\";\r\n const rotateAxis = isVertical ? \"rotateX\" : \"rotateY\";\r\n\r\n const frontOffset = from === \"top\" || from === \"left\" ? \"50%\" : \"-50%\";\r\n const backOffset = from === \"top\" || from === \"left\" ? \"-50%\" : \"50%\";\r\n\r\n const buildVariant = React.useCallback(\r\n (opacity: number, rotation: number, offset: string | null = null): Variant => ({\r\n opacity,\r\n [rotateAxis]: rotation,\r\n ...(isVertical && offset !== null ? {y: offset} : {}),\r\n ...(!isVertical && offset !== null ? {x: offset} : {}),\r\n }),\r\n [isVertical, rotateAxis],\r\n );\r\n\r\n const frontVariants = React.useMemo(\r\n () => ({\r\n initial: buildVariant(1, 0, \"0%\"),\r\n hover: buildVariant(0, 90, frontOffset),\r\n }),\r\n [buildVariant, frontOffset],\r\n );\r\n\r\n const backVariants = React.useMemo(\r\n () => ({\r\n initial: buildVariant(0, 90, backOffset),\r\n hover: buildVariant(1, 0, \"0%\"),\r\n }),\r\n [backOffset, buildVariant],\r\n );\r\n\r\n return (\r\n <motion.button\r\n ref={ref}\r\n initial='initial'\r\n whileHover='hover'\r\n whileTap={{scale: 0.95}}\r\n className={cn(styles.button, className)}\r\n {...restProps}>\r\n <motion.span\r\n variants={frontVariants}\r\n transition={transition}\r\n className={cn(styles.face, styles.front, frontClassName)}>\r\n {frontText}\r\n </motion.span>\r\n <motion.span\r\n variants={backVariants}\r\n transition={transition}\r\n className={cn(styles.face, styles.back, backClassName)}>\r\n {backText}\r\n </motion.span>\r\n <span className={styles.measure}>{frontText}</span>\r\n </motion.button>\r\n );\r\n },\r\n);\r\n\r\nFlipButton.displayName = \"FlipButton\";\r\n\r\nexport {FlipButton};\r\n"],"names":["FlipButton","React","frontText","backText","transition","className","frontClassName","backClassName","from","props","ref","_ignoredKey","restProps","isVertical","rotateAxis","frontOffset","backOffset","buildVariant","opacity","rotation","offset","frontVariants","backVariants","motion","cn","styles"],"mappings":";;;;;;AA2CA,MAAMA,aAAa,WAAHA,GAAGC,WACjB,CACE,EACEC,SAAS,EACTC,QAAQ,EACRC,aAAa;IAAC,MAAM;IAAU,WAAW;IAAK,SAAS;AAAE,CAAC,EAC1DC,SAAS,EACTC,cAAc,EACdC,aAAa,EACbC,OAAO,KAAK,EACZ,GAAGC,OACJ,EACDC;IAGA,MAAM,EAAC,KAAKC,WAAW,EAAE,GAAGC,WAAU,GAAGH;IACzC,MAAMI,aAAaL,AAAS,UAATA,QAAkBA,AAAS,aAATA;IACrC,MAAMM,aAAaD,aAAa,YAAY;IAE5C,MAAME,cAAcP,AAAS,UAATA,QAAkBA,AAAS,WAATA,OAAkB,QAAQ;IAChE,MAAMQ,aAAaR,AAAS,UAATA,QAAkBA,AAAS,WAATA,OAAkB,SAAS;IAEhE,MAAMS,eAAehB,YACnB,CAACiB,SAAiBC,UAAkBC,SAAwB,IAAI,GAAe;YAC7EF;YACA,CAACJ,WAAW,EAAEK;YACd,GAAIN,cAAcO,AAAW,SAAXA,SAAkB;gBAAC,GAAGA;YAAM,IAAI,CAAC,CAAC;YACpD,GAAI,CAACP,cAAcO,AAAW,SAAXA,SAAkB;gBAAC,GAAGA;YAAM,IAAI,CAAC,CAAC;QACvD,IACA;QAACP;QAAYC;KAAW;IAG1B,MAAMO,gBAAgBpB,QACpB,IAAO;YACL,SAASgB,aAAa,GAAG,GAAG;YAC5B,OAAOA,aAAa,GAAG,IAAIF;QAC7B,IACA;QAACE;QAAcF;KAAY;IAG7B,MAAMO,eAAerB,QACnB,IAAO;YACL,SAASgB,aAAa,GAAG,IAAID;YAC7B,OAAOC,aAAa,GAAG,GAAG;QAC5B,IACA;QAACD;QAAYC;KAAa;IAG5B,OAAO,WAAP,GACE,KAACM,OAAO,MAAM;QACZ,KAAKb;QACL,SAAQ;QACR,YAAW;QACX,UAAU;YAAC,OAAO;QAAI;QACtB,WAAWc,GAAGC,mBAAAA,MAAa,EAAEpB;QAC5B,GAAGO,SAAS;;0BACb,IAACW,OAAO,IAAI;gBACV,UAAUF;gBACV,YAAYjB;gBACZ,WAAWoB,GAAGC,mBAAAA,IAAW,EAAEA,mBAAAA,KAAY,EAAEnB;0BACxCJ;;0BAEH,IAACqB,OAAO,IAAI;gBACV,UAAUD;gBACV,YAAYlB;gBACZ,WAAWoB,GAAGC,mBAAAA,IAAW,EAAEA,mBAAAA,IAAW,EAAElB;0BACvCJ;;0BAEH,IAAC;gBAAK,WAAWsB,mBAAAA,OAAc;0BAAGvB;;;;AAGxC;AAGFF,WAAW,WAAW,GAAG"}
1
+ {"version":3,"file":"components/ui/flip-button.js","sources":["../../../src/components/ui/flip-button.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport {type HTMLMotionProps, motion, type Transition, type Variant} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./flip-button.module.css\";\r\n\r\n/** Supported flip origins for the button animation. */\r\nexport type FlipDirection = \"top\" | \"bottom\" | \"left\" | \"righ\";\r\n\r\n/** Props accepted by {@link FlipButton}. */\r\nexport interface FlipButtonProps extends HTMLMotionProps<\"button\"> {\r\n /** Label rendered on the default face of the button. @default undefined */\r\n frontText: string;\r\n /** Label revealed after the flip animation completes. @default undefined */\r\n backText: string;\r\n /** Motion transition applied to both button faces. @default {type: \"spring\", stiffness: 280, damping: 20} */\r\n transition?: Transition;\r\n /** Additional CSS classes merged with the front face. @default undefined */\r\n frontClassName?: string;\r\n /** Additional CSS classes merged with the back face. @default undefined */\r\n backClassName?: string;\r\n /** Direction from which the back face flips into view. @default \"top\" */\r\n from?: FlipDirection;\r\n}\r\n\r\n/**\r\n * Renders a two-sided button that flips between front and back labels on hover.\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 * <FlipButton frontText=\"Learn more\" backText=\"Open\" />\r\n * ```\r\n *\r\n * @see {@link FlipButtonProps} for available props\r\n */\r\nconst FlipButton = React.forwardRef<HTMLButtonElement, FlipButtonProps>(\r\n (\r\n {\r\n frontText,\r\n backText,\r\n transition = {type: \"spring\", stiffness: 280, damping: 20},\r\n className,\r\n frontClassName,\r\n backClassName,\r\n from = \"top\",\r\n ...props\r\n },\r\n ref,\r\n ) => {\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 isVertical = from === \"top\" || from === \"bottom\";\r\n const rotateAxis = isVertical ? \"rotateX\" : \"rotateY\";\r\n\r\n const frontOffset = from === \"top\" || from === \"left\" ? \"50%\" : \"-50%\";\r\n const backOffset = from === \"top\" || from === \"left\" ? \"-50%\" : \"50%\";\r\n\r\n const buildVariant = React.useCallback(\r\n (opacity: number, rotation: number, offset: string | null = null): Variant => ({\r\n opacity,\r\n [rotateAxis]: rotation,\r\n ...(isVertical && offset !== null ? {y: offset} : {}),\r\n ...(!isVertical && offset !== null ? {x: offset} : {}),\r\n }),\r\n [isVertical, rotateAxis],\r\n );\r\n\r\n const frontVariants = React.useMemo(\r\n () => ({\r\n initial: buildVariant(1, 0, \"0%\"),\r\n hover: buildVariant(0, 90, frontOffset),\r\n }),\r\n [buildVariant, frontOffset],\r\n );\r\n\r\n const backVariants = React.useMemo(\r\n () => ({\r\n initial: buildVariant(0, 90, backOffset),\r\n hover: buildVariant(1, 0, \"0%\"),\r\n }),\r\n [backOffset, buildVariant],\r\n );\r\n\r\n return (\r\n <motion.button\r\n ref={ref}\r\n initial='initial'\r\n whileHover='hover'\r\n whileTap={{scale: 0.95}}\r\n className={cn(styles.button, className)}\r\n {...restProps}>\r\n <motion.span\r\n variants={frontVariants}\r\n transition={transition}\r\n className={cn(styles.face, styles.front, frontClassName)}>\r\n {frontText}\r\n </motion.span>\r\n <motion.span\r\n variants={backVariants}\r\n transition={transition}\r\n className={cn(styles.face, styles.back, backClassName)}>\r\n {backText}\r\n </motion.span>\r\n <span className={styles.measure}>{frontText}</span>\r\n </motion.button>\r\n );\r\n },\r\n);\r\n\r\nFlipButton.displayName = \"FlipButton\";\r\n\r\nexport {FlipButton};\r\n"],"names":["FlipButton","React","frontText","backText","transition","className","frontClassName","backClassName","from","props","ref","_ignoredKey","restProps","isVertical","rotateAxis","frontOffset","backOffset","buildVariant","opacity","rotation","offset","frontVariants","backVariants","motion","cn","styles"],"mappings":";;;;;;AA2CA,MAAMA,aAAa,WAAHA,GAAGC,wBAAAA,UAAgB,CACjC,CACE,EACEC,SAAS,EACTC,QAAQ,EACRC,aAAa;IAAC,MAAM;IAAU,WAAW;IAAK,SAAS;AAAE,CAAC,EAC1DC,SAAS,EACTC,cAAc,EACdC,aAAa,EACbC,OAAO,KAAK,EACZ,GAAGC,OACJ,EACDC;IAGA,MAAM,EAAC,KAAKC,WAAW,EAAE,GAAGC,WAAU,GAAGH;IACzC,MAAMI,aAAaL,AAAS,UAATA,QAAkBA,AAAS,aAATA;IACrC,MAAMM,aAAa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GvB;;;;AAGxC;AAGFF,WAAW,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/flip-button.module.css","webpack://./src/components/ui/flip-button.module.css"],"names":[],"mappings":"AADA;ECEE,cAAc;EACd,eAAe;EACf,4BAA4B;EAC5B,mBAAmB;EACnB,gBAAgB;EAChB,SAAS;EACT,cAAc;EACd,mBAAmB;EACnB,gBAAgB;EAChB,oBAAoB;EACpB,qBAAqB;EACrB,kBAAkB;AACpB;;AAEA;EACE,iCAAiC;EACjC,mBAAmB;AACrB;;AAEA;EACE,2BAA2B;EAC3B,kCAAkC;EAClC,4BAA4B;EAC5B,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;EACb,kBAAkB;EAClB,QAAQ;AACV;;AAEA;EACE,2BAA2B;EAC3B,2BAA2B;AAC7B;;AAEA;EACE,6BAA6B;EAC7B,mCAAmC;AACrC;;AAEA;EACE,kBAAkB;AACpB","sourcesContent":[".button{background:transparent;border:0;color:inherit;cursor:pointer;display:inline-block;font-size:var(--ac-text-sm);font-weight:500;height:2.5rem;line-height:1.25rem;padding:.5rem 1rem;perspective:1000px;position:relative}.button:focus-visible{outline:2px solid var(--ac-ring);outline-offset:2px}.face{align-items:center;backface-visibility:hidden;border-radius:var(--ac-radius-lg);display:flex;inset:0;justify-content:center;position:absolute;transform-style:preserve-3d}.front{background:var(--ac-muted);color:var(--ac-foreground)}.back{background:var(--ac-primary);color:var(--ac-primary-foreground)}.measure{visibility:hidden}",".button {\n color: inherit;\n cursor: pointer;\n font-size: var(--ac-text-sm);\n perspective: 1000px;\n background: none;\n border: 0;\n height: 2.5rem;\n padding: .5rem 1rem;\n font-weight: 500;\n line-height: 1.25rem;\n display: inline-block;\n position: relative;\n}\n\n.button:focus-visible {\n outline: 2px solid var(--ac-ring);\n outline-offset: 2px;\n}\n\n.face {\n backface-visibility: hidden;\n border-radius: var(--ac-radius-lg);\n transform-style: preserve-3d;\n justify-content: center;\n align-items: center;\n display: flex;\n position: absolute;\n inset: 0;\n}\n\n.front {\n background: var(--ac-muted);\n color: var(--ac-foreground);\n}\n\n.back {\n background: var(--ac-primary);\n color: var(--ac-primary-foreground);\n}\n\n.measure {\n visibility: hidden;\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/flip-button.module.css","webpack://./src/components/ui/flip-button.module.css"],"names":[],"mappings":"AAAA;ECCE,cAAc;EACd,eAAe;EACf,4BAA4B;EAC5B,mBAAmB;EACnB,gBAAgB;EAChB,SAAS;EACT,cAAc;EACd,mBAAmB;EACnB,gBAAgB;EAChB,oBAAoB;EACpB,qBAAqB;EACrB,kBAAkB;AACpB;;ADbgO;ECgB9N,iCAAiC;EACjC,mBAAmB;AACrB;;ADlB0S;ECqBxS,2BAA2B;EAC3B,kCAAkC;EAClC,4BAA4B;EAC5B,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;EACb,kBAAkB;EAClB,QAAQ;AACV;;AD7B0d;ECgCxd,2BAA2B;EAC3B,2BAA2B;AAC7B;;ADlCuhB;ECqCrhB,6BAA6B;EAC7B,mCAAmC;AACrC;;ADvC6lB;EC0C3lB,kBAAkB;AACpB","sourcesContent":[".button{background:transparent;border:0;color:inherit;cursor:pointer;display:inline-block;font-size:var(--ac-text-sm);font-weight:500;height:2.5rem;line-height:1.25rem;padding:.5rem 1rem;perspective:1000px;position:relative}.button:focus-visible{outline:2px solid var(--ac-ring);outline-offset:2px}.face{align-items:center;backface-visibility:hidden;border-radius:var(--ac-radius-lg);display:flex;inset:0;justify-content:center;position:absolute;transform-style:preserve-3d}.front{background:var(--ac-muted);color:var(--ac-foreground)}.back{background:var(--ac-primary);color:var(--ac-primary-foreground)}.measure{visibility:hidden}",".button {\n color: inherit;\n cursor: pointer;\n font-size: var(--ac-text-sm);\n perspective: 1000px;\n background: none;\n border: 0;\n height: 2.5rem;\n padding: .5rem 1rem;\n font-weight: 500;\n line-height: 1.25rem;\n display: inline-block;\n position: relative;\n}\n\n.button:focus-visible {\n outline: 2px solid var(--ac-ring);\n outline-offset: 2px;\n}\n\n.face {\n backface-visibility: hidden;\n border-radius: var(--ac-radius-lg);\n transform-style: preserve-3d;\n justify-content: center;\n align-items: center;\n display: flex;\n position: absolute;\n inset: 0;\n}\n\n.front {\n background: var(--ac-muted);\n color: var(--ac-foreground);\n}\n\n.back {\n background: var(--ac-primary);\n color: var(--ac-primary-foreground);\n}\n\n.measure {\n visibility: hidden;\n}\n"],"sourceRoot":""}
@@ -1,18 +1,18 @@
1
1
  "use client";
2
2
  import { jsx } from "react/jsx-runtime";
3
- import { forwardRef, useEffect, useRef } from "react";
4
3
  import { cn } from "../../lib/utilities.js";
5
4
  import focus_scope_module from "./focus-scope.module.js";
5
+ import * as __rspack_external_react from "react";
6
6
  const FOCUSABLE_SELECTOR = 'a[href], button:not(:disabled), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"]), [contenteditable]';
7
7
  function getFocusableElements(container) {
8
8
  return [
9
9
  ...container.querySelectorAll(FOCUSABLE_SELECTOR)
10
10
  ].filter((element)=>!element.hasAttribute("disabled") && element.tabIndex >= 0);
11
11
  }
12
- const FocusScope = /*#__PURE__*/ forwardRef(({ contain = true, restoreFocus = true, autoFocus = false, children, className, ...props }, ref)=>{
13
- const containerRef = useRef(null);
14
- const previousFocusRef = useRef(null);
15
- useEffect(()=>{
12
+ const FocusScope = /*#__PURE__*/ __rspack_external_react.forwardRef(({ contain = true, restoreFocus = true, autoFocus = false, children, className, ...props }, ref)=>{
13
+ const containerRef = __rspack_external_react.useRef(null);
14
+ const previousFocusRef = __rspack_external_react.useRef(null);
15
+ __rspack_external_react.useEffect(()=>{
16
16
  previousFocusRef.current = document.activeElement;
17
17
  if (autoFocus && containerRef.current) {
18
18
  const focusable = getFocusableElements(containerRef.current);
@@ -25,7 +25,7 @@ const FocusScope = /*#__PURE__*/ forwardRef(({ contain = true, restoreFocus = tr
25
25
  autoFocus,
26
26
  restoreFocus
27
27
  ]);
28
- useEffect(()=>{
28
+ __rspack_external_react.useEffect(()=>{
29
29
  const container = containerRef.current;
30
30
  if (!container) return;
31
31
  const handleKeyDown = (event)=>{
@@ -1 +1 @@
1
- {"version":3,"file":"components/ui/focus-scope.js","sources":["../../../src/components/ui/focus-scope.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nimport styles from \"./focus-scope.module.css\";\r\n\r\n/**\r\n * Represents the configurable props for the {@link FocusScope} component.\r\n */\r\ninterface FocusScopeProps extends React.HTMLAttributes<HTMLDivElement> {\r\n /**\r\n * Whether focus should be trapped within the scope.\r\n *\r\n * @defaultValue true\r\n */\r\n contain?: boolean;\r\n /**\r\n * Whether to restore focus to the previously focused element on unmount.\r\n *\r\n * @defaultValue true\r\n */\r\n restoreFocus?: boolean;\r\n /**\r\n * Whether to auto-focus the first focusable element on mount.\r\n *\r\n * @defaultValue false\r\n */\r\n autoFocus?: boolean;\r\n /**\r\n * Content rendered within the focus scope.\r\n */\r\n children: React.ReactNode;\r\n}\r\n\r\nconst FOCUSABLE_SELECTOR = [\r\n \"a[href]\",\r\n \"button:not(:disabled)\",\r\n \"input:not(:disabled)\",\r\n \"select:not(:disabled)\",\r\n \"textarea:not(:disabled)\",\r\n '[tabindex]:not([tabindex=\"-1\"])',\r\n \"[contenteditable]\",\r\n].join(\", \");\r\n\r\nfunction getFocusableElements(container: HTMLElement): HTMLElement[] {\r\n return [...container.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR)].filter(\r\n (element) => !element.hasAttribute(\"disabled\") && element.tabIndex >= 0,\r\n );\r\n}\r\n\r\n/**\r\n * Traps keyboard focus within a container element.\r\n *\r\n * @remarks\r\n * Renders a `<div>` and cycles `Tab` and `Shift+Tab` navigation through its focusable\r\n * descendants without allowing focus to escape the scope. Use it for custom dialogs,\r\n * drawers, and composite widgets that need explicit focus containment and restoration.\r\n *\r\n * Base UI dialog-style primitives already manage focus internally, so prefer those\r\n * built-in mechanisms when available.\r\n *\r\n * @example\r\n * ```tsx\r\n * <FocusScope contain autoFocus>\r\n * <input placeholder='First' />\r\n * <input placeholder='Second' />\r\n * <button type='submit'>Submit</button>\r\n * </FocusScope>\r\n * ```\r\n */\r\nconst FocusScope = React.forwardRef<HTMLDivElement, FocusScopeProps>(\r\n ({contain = true, restoreFocus = true, autoFocus = false, children, className, ...props}, ref) => {\r\n const containerRef = React.useRef<HTMLDivElement | null>(null);\r\n const previousFocusRef = React.useRef<Element | null>(null);\r\n\r\n React.useEffect(() => {\r\n previousFocusRef.current = document.activeElement;\r\n\r\n if (autoFocus && containerRef.current) {\r\n const focusable = getFocusableElements(containerRef.current);\r\n\r\n focusable[0]?.focus();\r\n }\r\n\r\n return () => {\r\n if (restoreFocus && previousFocusRef.current instanceof HTMLElement) {\r\n previousFocusRef.current.focus();\r\n }\r\n };\r\n }, [autoFocus, restoreFocus]);\r\n\r\n React.useEffect(() => {\r\n const container = containerRef.current;\r\n\r\n if (!container) {\r\n return;\r\n }\r\n\r\n const handleKeyDown = (event: KeyboardEvent): void => {\r\n if (!contain || event.key !== \"Tab\") {\r\n return;\r\n }\r\n\r\n const focusable = getFocusableElements(container);\r\n\r\n if (focusable.length === 0) {\r\n return;\r\n }\r\n\r\n const [first] = focusable;\r\n const last = focusable.at(-1);\r\n\r\n if (event.shiftKey && first?.isSameNode(document.activeElement)) {\r\n event.preventDefault();\r\n last?.focus();\r\n return;\r\n }\r\n\r\n if (!event.shiftKey && last?.isSameNode(document.activeElement)) {\r\n event.preventDefault();\r\n first?.focus();\r\n }\r\n };\r\n\r\n container.addEventListener(\"keydown\", handleKeyDown);\r\n\r\n return () => {\r\n container.removeEventListener(\"keydown\", handleKeyDown);\r\n };\r\n }, [contain]);\r\n\r\n return (\r\n <div\r\n ref={(node) => {\r\n containerRef.current = node;\r\n\r\n if (typeof ref === \"function\") {\r\n ref(node);\r\n return;\r\n }\r\n\r\n if (ref) {\r\n ref.current = node;\r\n }\r\n }}\r\n className={cn(styles.scope, className)}\r\n role={props.role ?? \"group\"}\r\n tabIndex={props.tabIndex ?? -1}\r\n {...props}>\r\n {children}\r\n </div>\r\n );\r\n },\r\n);\r\nFocusScope.displayName = \"FocusScope\";\r\n\r\nexport {FocusScope};\r\nexport type {FocusScopeProps};\r\n"],"names":["FOCUSABLE_SELECTOR","getFocusableElements","container","element","FocusScope","React","contain","restoreFocus","autoFocus","children","className","props","ref","containerRef","previousFocusRef","document","focusable","HTMLElement","handleKeyDown","event","first","last","node","cn","styles"],"mappings":";;;;;AAoCA,MAAMA,qBAAqB;AAU3B,SAASC,qBAAqBC,SAAsB;IAClD,OAAO;WAAIA,UAAU,gBAAgB,CAAcF;KAAoB,CAAC,MAAM,CAC5E,CAACG,UAAY,CAACA,QAAQ,YAAY,CAAC,eAAeA,QAAQ,QAAQ,IAAI;AAE1E;AAsBA,MAAMC,aAAa,WAAHA,GAAGC,WACjB,CAAC,EAACC,UAAU,IAAI,EAAEC,eAAe,IAAI,EAAEC,YAAY,KAAK,EAAEC,QAAQ,EAAEC,SAAS,EAAE,GAAGC,OAAM,EAAEC;IACxF,MAAMC,eAAeR,OAAoC;IACzD,MAAMS,mBAAmBT,OAA6B;IAEtDA,UAAgB;QACdS,iBAAiB,OAAO,GAAGC,SAAS,aAAa;QAEjD,IAAIP,aAAaK,aAAa,OAAO,EAAE;YACrC,MAAMG,YAAYf,qBAAqBY,aAAa,OAAO;YAE3DG,SAAS,CAAC,EAAE,EAAE;QAChB;QAEA,OAAO;YACL,IAAIT,gBAAgBO,iBAAiB,OAAO,YAAYG,aACtDH,iBAAiB,OAAO,CAAC,KAAK;QAElC;IACF,GAAG;QAACN;QAAWD;KAAa;IAE5BF,UAAgB;QACd,MAAMH,YAAYW,aAAa,OAAO;QAEtC,IAAI,CAACX,WACH;QAGF,MAAMgB,gBAAgB,CAACC;YACrB,IAAI,CAACb,WAAWa,AAAc,UAAdA,MAAM,GAAG,EACvB;YAGF,MAAMH,YAAYf,qBAAqBC;YAEvC,IAAIc,AAAqB,MAArBA,UAAU,MAAM,EAClB;YAGF,MAAM,CAACI,MAAM,GAAGJ;YAChB,MAAMK,OAAOL,UAAU,EAAE,CAAC;YAE1B,IAAIG,MAAM,QAAQ,IAAIC,OAAO,WAAWL,SAAS,aAAa,GAAG;gBAC/DI,MAAM,cAAc;gBACpBE,MAAM;gBACN;YACF;YAEA,IAAI,CAACF,MAAM,QAAQ,IAAIE,MAAM,WAAWN,SAAS,aAAa,GAAG;gBAC/DI,MAAM,cAAc;gBACpBC,OAAO;YACT;QACF;QAEAlB,UAAU,gBAAgB,CAAC,WAAWgB;QAEtC,OAAO;YACLhB,UAAU,mBAAmB,CAAC,WAAWgB;QAC3C;IACF,GAAG;QAACZ;KAAQ;IAEZ,OAAO,WAAP,GACE,IAAC;QACC,KAAK,CAACgB;YACJT,aAAa,OAAO,GAAGS;YAEvB,IAAI,AAAe,cAAf,OAAOV,KAAoB,YAC7BA,IAAIU;YAIN,IAAIV,KACFA,IAAI,OAAO,GAAGU;QAElB;QACA,WAAWC,GAAGC,mBAAAA,KAAY,EAAEd;QAC5B,MAAMC,MAAM,IAAI,IAAI;QACpB,UAAUA,MAAM,QAAQ,IAAI;QAC3B,GAAGA,KAAK;kBACRF;;AAGP;AAEFL,WAAW,WAAW,GAAG"}
1
+ {"version":3,"file":"components/ui/focus-scope.js","sources":["../../../src/components/ui/focus-scope.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nimport styles from \"./focus-scope.module.css\";\r\n\r\n/**\r\n * Represents the configurable props for the {@link FocusScope} component.\r\n */\r\ninterface FocusScopeProps extends React.HTMLAttributes<HTMLDivElement> {\r\n /**\r\n * Whether focus should be trapped within the scope.\r\n *\r\n * @defaultValue true\r\n */\r\n contain?: boolean;\r\n /**\r\n * Whether to restore focus to the previously focused element on unmount.\r\n *\r\n * @defaultValue true\r\n */\r\n restoreFocus?: boolean;\r\n /**\r\n * Whether to auto-focus the first focusable element on mount.\r\n *\r\n * @defaultValue false\r\n */\r\n autoFocus?: boolean;\r\n /**\r\n * Content rendered within the focus scope.\r\n */\r\n children: React.ReactNode;\r\n}\r\n\r\nconst FOCUSABLE_SELECTOR = [\r\n \"a[href]\",\r\n \"button:not(:disabled)\",\r\n \"input:not(:disabled)\",\r\n \"select:not(:disabled)\",\r\n \"textarea:not(:disabled)\",\r\n '[tabindex]:not([tabindex=\"-1\"])',\r\n \"[contenteditable]\",\r\n].join(\", \");\r\n\r\nfunction getFocusableElements(container: HTMLElement): HTMLElement[] {\r\n return [...container.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR)].filter(\r\n (element) => !element.hasAttribute(\"disabled\") && element.tabIndex >= 0,\r\n );\r\n}\r\n\r\n/**\r\n * Traps keyboard focus within a container element.\r\n *\r\n * @remarks\r\n * Renders a `<div>` and cycles `Tab` and `Shift+Tab` navigation through its focusable\r\n * descendants without allowing focus to escape the scope. Use it for custom dialogs,\r\n * drawers, and composite widgets that need explicit focus containment and restoration.\r\n *\r\n * Base UI dialog-style primitives already manage focus internally, so prefer those\r\n * built-in mechanisms when available.\r\n *\r\n * @example\r\n * ```tsx\r\n * <FocusScope contain autoFocus>\r\n * <input placeholder='First' />\r\n * <input placeholder='Second' />\r\n * <button type='submit'>Submit</button>\r\n * </FocusScope>\r\n * ```\r\n */\r\nconst FocusScope = React.forwardRef<HTMLDivElement, FocusScopeProps>(\r\n ({contain = true, restoreFocus = true, autoFocus = false, children, className, ...props}, ref) => {\r\n const containerRef = React.useRef<HTMLDivElement | null>(null);\r\n const previousFocusRef = React.useRef<Element | null>(null);\r\n\r\n React.useEffect(() => {\r\n previousFocusRef.current = document.activeElement;\r\n\r\n if (autoFocus && containerRef.current) {\r\n const focusable = getFocusableElements(containerRef.current);\r\n\r\n focusable[0]?.focus();\r\n }\r\n\r\n return () => {\r\n if (restoreFocus && previousFocusRef.current instanceof HTMLElement) {\r\n previousFocusRef.current.focus();\r\n }\r\n };\r\n }, [autoFocus, restoreFocus]);\r\n\r\n React.useEffect(() => {\r\n const container = containerRef.current;\r\n\r\n if (!container) {\r\n return;\r\n }\r\n\r\n const handleKeyDown = (event: KeyboardEvent): void => {\r\n if (!contain || event.key !== \"Tab\") {\r\n return;\r\n }\r\n\r\n const focusable = getFocusableElements(container);\r\n\r\n if (focusable.length === 0) {\r\n return;\r\n }\r\n\r\n const [first] = focusable;\r\n const last = focusable.at(-1);\r\n\r\n if (event.shiftKey && first?.isSameNode(document.activeElement)) {\r\n event.preventDefault();\r\n last?.focus();\r\n return;\r\n }\r\n\r\n if (!event.shiftKey && last?.isSameNode(document.activeElement)) {\r\n event.preventDefault();\r\n first?.focus();\r\n }\r\n };\r\n\r\n container.addEventListener(\"keydown\", handleKeyDown);\r\n\r\n return () => {\r\n container.removeEventListener(\"keydown\", handleKeyDown);\r\n };\r\n }, [contain]);\r\n\r\n return (\r\n <div\r\n ref={(node) => {\r\n containerRef.current = node;\r\n\r\n if (typeof ref === \"function\") {\r\n ref(node);\r\n return;\r\n }\r\n\r\n if (ref) {\r\n ref.current = node;\r\n }\r\n }}\r\n className={cn(styles.scope, className)}\r\n role={props.role ?? \"group\"}\r\n tabIndex={props.tabIndex ?? -1}\r\n {...props}>\r\n {children}\r\n </div>\r\n );\r\n },\r\n);\r\nFocusScope.displayName = \"FocusScope\";\r\n\r\nexport {FocusScope};\r\nexport type {FocusScopeProps};\r\n"],"names":["FOCUSABLE_SELECTOR","getFocusableElements","container","element","FocusScope","React","contain","restoreFocus","autoFocus","children","className","props","ref","containerRef","previousFocusRef","document","focusable","HTMLElement","handleKeyDown","event","first","last","node","cn","styles"],"mappings":";;;;;AAoCA,MAAMA,qBAAqB;AAU3B,SAASC,qBAAqBC,SAAsB;IAClD,OAAO;WAAIA,UAAU,gBAAgB,CAAcF;KAAoB,CAAC,MAAM,CAC5E,CAACG,UAAY,CAACA,QAAQ,YAAY,CAAC,eAAeA,QAAQ,QAAQ,IAAI;AAE1E;AAsBA,MAAMC,aAAa,WAAHA,GAAGC,wBAAAA,UAAgB,CACjC,CAAC,EAACC,UAAU,IAAI,EAAEC,eAAe,IAAI,EAAEC,YAAY,KAAK,EAAEC,QAAQ,EAAEC,SAAS,EAAE,GAAGC,OAAM,EAAEC;IACxF,MAAMC,eAAeR,wBAAAA,MAAY,CAAwB;IACzD,MAAMS,mBAAmBT,wBAAAA,MAAY,CAAiB;IAEtDA,wBAAAA,SAAe,CAAC;QACdS,iBAAiB,OAAO,GAAGC,SAAS,aAAa;QAEjD,IAAIP,aAAaK,aAAa,OAAO,EAAE;YACrC,MAAMG,YAAYf,qBAAqBY,aAAa,OAAO;YAE3DG,SAAS,CAAC,EAAE,EAAE;QAChB;QAEA,OAAO;YACL,IAAIT,gBAAgBO,iBAAiB,OAAO,YAAYG,aACtDH,iBAAiB,OAAO,CAAC,KAAK;QAElC;IACF,GAAG;QAACN;QAAWD;KAAa;IAE5BF,wBAAAA,SAAe,CAAC;QACd,MAAMH,YAAYW,aAAa,OAAO;QAEtC,IAAI,CAACX,WACH;QAGF,MAAMgB,gBAAgB,CAACC;YACrB,IAAI,CAACb,WAAWa,AAAc,UAAdA,MAAM,GAAG,EACvB;YAGF,MAAMH,YAAYf,qBAAqBC;YAEvC,IAAIc,AAAqB,MAArBA,UAAU,MAAM,EAClB;YAGF,MAAM,CAACI,MAAM,GAAGJ;YAChB,MAAMK,OAAOL,UAAU,EAAE,CAAC;YAE1B,IAAIG,MAAM,QAAQ,IAAIC,OAAO,WAAWL,SAAS,aAAa,GAAG;gBAC/DI,MAAM,cAAc;gBACpBE,MAAM;gBACN;YACF;YAEA,IAAI,CAACF,MAAM,QAAQ,IAAIE,MAAM,WAAWN,SAAS,aAAa,GAAG;gBAC/DI,MAAM,cAAc;gBACpBC,OAAO;YACT;QACF;QAEAlB,UAAU,gBAAgB,CAAC,WAAWgB;QAEtC,OAAO;YACLhB,UAAU,mBAAmB,CAAC,WAAWgB;QAC3C;IACF,GAAG;QAACZ;KAAQ;IAEZ,OAAO,WAAP,GACE,IAAC;QACC,KAAK,CAACgB;YACJT,aAAa,OAAO,GAAGS;YAEvB,IAAI,AAAe,cAAf,OAAOV,KAAoB,YAC7BA,IAAIU;YAIN,IAAIV,KACFA,IAAI,OAAO,GAAGU;QAElB;QACA,WAAWC,GAAGC,mBAAAA,KAAY,EAAEd;QAC5B,MAAMC,MAAM,IAAI,IAAI;QACpB,UAAUA,MAAM,QAAQ,IAAI;QAC3B,GAAGA,KAAK;kBACRF;;AAGP;AAEFL,WAAW,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/focus-scope.module.css","webpack://./src/components/ui/focus-scope.module.css"],"names":[],"mappings":"AADA;ECEE,aAAa;AACf","sourcesContent":[".scope{outline:none}",".scope {\n outline: none;\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/focus-scope.module.css","webpack://./src/components/ui/focus-scope.module.css"],"names":[],"mappings":"AAAA;ECCE,aAAa;AACf","sourcesContent":[".scope{outline:none}",".scope {\n outline: none;\n}\n"],"sourceRoot":""}
@@ -1,9 +1,9 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
3
2
  import { cn } from "../../lib/utilities.js";
4
3
  import form_skeleton_module from "./form-skeleton.module.js";
5
4
  import { Skeleton } from "./skeleton.js";
6
- const FormSkeleton = /*#__PURE__*/ forwardRef(({ fields = 4, className, ...props }, ref)=>/*#__PURE__*/ jsxs("div", {
5
+ import * as __rspack_external_react from "react";
6
+ const FormSkeleton = /*#__PURE__*/ __rspack_external_react.forwardRef(({ fields = 4, className, ...props }, ref)=>/*#__PURE__*/ jsxs("div", {
7
7
  ref: ref,
8
8
  className: cn(form_skeleton_module.form, className),
9
9
  ...props,
@@ -1 +1 @@
1
- {"version":3,"file":"components/ui/form-skeleton.js","sources":["../../../src/components/ui/form-skeleton.tsx"],"sourcesContent":["import * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nimport styles from \"./form-skeleton.module.css\";\r\nimport {Skeleton} from \"./skeleton\";\r\n\r\n/**\r\n * Represents the configurable props for the {@link FormSkeleton} component.\r\n *\r\n * @remarks\r\n * Extends native `<div>` attributes so form-shaped placeholders can be composed into\r\n * dialogs, cards, and pages while still supporting accessibility annotations.\r\n */\r\ninterface FormSkeletonProps extends React.HTMLAttributes<HTMLDivElement> {\r\n /**\r\n * Number of labeled field placeholders rendered before the submit action.\r\n *\r\n * @default 4\r\n */\r\n fields?: number;\r\n}\r\n\r\n/**\r\n * Renders a skeleton placeholder shaped like a labeled form.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Server- and client-compatible presentational component.\r\n *\r\n * Uses stacked label and input placeholders plus a trailing submit action placeholder to\r\n * preserve form layout during async initialization or schema-driven rendering.\r\n *\r\n * @example\r\n * ```tsx\r\n * <FormSkeleton fields={5} aria-label=\"Loading profile form\" />\r\n * ```\r\n *\r\n * @see {@link FormSkeletonProps} for available props\r\n */\r\nconst FormSkeleton = React.forwardRef<HTMLDivElement, FormSkeletonProps>(\r\n ({fields = 4, className, ...props}: Readonly<FormSkeletonProps>, ref): React.JSX.Element => (\r\n <div\r\n ref={ref}\r\n className={cn(styles.form, className)}\r\n {...props}>\r\n {Array.from({length: fields}, (_, index) => (\r\n <div\r\n key={index}\r\n className={styles.field}>\r\n <Skeleton className={styles.label} />\r\n <Skeleton className={styles.input} />\r\n </div>\r\n ))}\r\n <Skeleton className={styles.submit} />\r\n </div>\r\n ),\r\n);\r\n\r\nFormSkeleton.displayName = \"FormSkeleton\";\r\n\r\nexport {FormSkeleton};\r\nexport type {FormSkeletonProps};\r\n"],"names":["FormSkeleton","React","fields","className","props","ref","cn","styles","Array","_","index","Skeleton"],"mappings":";;;;;AAuCA,MAAMA,eAAe,WAAHA,GAAGC,WACnB,CAAC,EAACC,SAAS,CAAC,EAAEC,SAAS,EAAE,GAAGC,OAAmC,EAAEC,MAAAA,WAAAA,GAC/D,KAAC;QACC,KAAKA;QACL,WAAWC,GAAGC,qBAAAA,IAAW,EAAEJ;QAC1B,GAAGC,KAAK;;YACRI,MAAM,IAAI,CAAC;gBAAC,QAAQN;YAAM,GAAG,CAACO,GAAGC,QAAAA,WAAAA,GAChC,KAAC;oBAEC,WAAWH,qBAAAA,KAAY;;sCACvB,IAACI,UAAQA;4BAAC,WAAWJ,qBAAAA,KAAY;;sCACjC,IAACI,UAAQA;4BAAC,WAAWJ,qBAAAA,KAAY;;;mBAH5BG;0BAMT,IAACC,UAAQA;gBAAC,WAAWJ,qBAAAA,MAAa;;;;AAKxCP,aAAa,WAAW,GAAG"}
1
+ {"version":3,"file":"components/ui/form-skeleton.js","sources":["../../../src/components/ui/form-skeleton.tsx"],"sourcesContent":["import * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nimport styles from \"./form-skeleton.module.css\";\r\nimport {Skeleton} from \"./skeleton\";\r\n\r\n/**\r\n * Represents the configurable props for the {@link FormSkeleton} component.\r\n *\r\n * @remarks\r\n * Extends native `<div>` attributes so form-shaped placeholders can be composed into\r\n * dialogs, cards, and pages while still supporting accessibility annotations.\r\n */\r\ninterface FormSkeletonProps extends React.HTMLAttributes<HTMLDivElement> {\r\n /**\r\n * Number of labeled field placeholders rendered before the submit action.\r\n *\r\n * @default 4\r\n */\r\n fields?: number;\r\n}\r\n\r\n/**\r\n * Renders a skeleton placeholder shaped like a labeled form.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Server- and client-compatible presentational component.\r\n *\r\n * Uses stacked label and input placeholders plus a trailing submit action placeholder to\r\n * preserve form layout during async initialization or schema-driven rendering.\r\n *\r\n * @example\r\n * ```tsx\r\n * <FormSkeleton fields={5} aria-label=\"Loading profile form\" />\r\n * ```\r\n *\r\n * @see {@link FormSkeletonProps} for available props\r\n */\r\nconst FormSkeleton = React.forwardRef<HTMLDivElement, FormSkeletonProps>(\r\n ({fields = 4, className, ...props}: Readonly<FormSkeletonProps>, ref): React.JSX.Element => (\r\n <div\r\n ref={ref}\r\n className={cn(styles.form, className)}\r\n {...props}>\r\n {Array.from({length: fields}, (_, index) => (\r\n <div\r\n key={index}\r\n className={styles.field}>\r\n <Skeleton className={styles.label} />\r\n <Skeleton className={styles.input} />\r\n </div>\r\n ))}\r\n <Skeleton className={styles.submit} />\r\n </div>\r\n ),\r\n);\r\n\r\nFormSkeleton.displayName = \"FormSkeleton\";\r\n\r\nexport {FormSkeleton};\r\nexport type {FormSkeletonProps};\r\n"],"names":["FormSkeleton","React","fields","className","props","ref","cn","styles","Array","_","index","Skeleton"],"mappings":";;;;;AAuCA,MAAMA,eAAe,WAAHA,GAAGC,wBAAAA,UAAgB,CACnC,CAAC,EAACC,SAAS,CAAC,EAAEC,SAAS,EAAE,GAAGC,OAAmC,EAAEC,MAAAA,WAAAA,GAC/D,KAAC;QACC,KAAKA;QACL,WAAWC,GAAGC,qBAAAA,IAAW,EAAEJ;QAC1B,GAAGC,KAAK;;YACRI,MAAM,IAAI,CAAC;gBAAC,QAAQN;YAAM,GAAG,CAACO,GAAGC,QAAAA,WAAAA,GAChC,KAAC;oBAEC,WAAWH,qBAAAA,KAAY;;sCACvB,IAACI,UAAQA;4BAAC,WAAWJ,qBAAAA,KAAY;;sCACjC,IAACI,UAAQA;4BAAC,WAAWJ,qBAAAA,KAAY;;;mBAH5BG;0BAMT,IAACC,UAAQA;gBAAC,WAAWJ,qBAAAA,MAAa;;;;AAKxCP,aAAa,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/form-skeleton.module.css","webpack://./src/components/ui/form-skeleton.module.css"],"names":[],"mappings":"AADA;ECEE,sBAAsB;AACxB;;AAEA;EACE,sBAAsB;EACtB,aAAa;AACf;;AAEA;EACE,sBAAsB;AACxB;;AAEA;EACE,UAAU;EACV,eAAe;AACjB;;AAEA;EACE,kCAAkC;EAClC,cAAc;AAChB;;AAEA;EACE,oBAAoB;EACpB,WAAW;AACb","sourcesContent":[".form{gap:var(--ac-space-4)}.field,.form{display:flex;flex-direction:column}.field{gap:var(--ac-space-1)}.label{height:.875rem;width:30%}.input,.submit{border-radius:var(--ac-radius-md);height:2.5rem}.submit{align-self:flex-end;width:8rem}",".form {\n gap: var(--ac-space-4);\n}\n\n.field, .form {\n flex-direction: column;\n display: flex;\n}\n\n.field {\n gap: var(--ac-space-1);\n}\n\n.label {\n width: 30%;\n height: .875rem;\n}\n\n.input, .submit {\n border-radius: var(--ac-radius-md);\n height: 2.5rem;\n}\n\n.submit {\n align-self: flex-end;\n width: 8rem;\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/form-skeleton.module.css","webpack://./src/components/ui/form-skeleton.module.css"],"names":[],"mappings":"AAAA;ECCE,sBAAsB;AACxB;;ADF4B;ECK1B,sBAAsB;EACtB,aAAa;AACf;;ADP4E;ECU1E,sBAAsB;AACxB;;ADXyG;ECcvG,UAAU;EACV,eAAe;AACjB;;ADhByI;ECmBvI,kCAAkC;EAClC,cAAc;AAChB;;ADrBwM;ECwBtM,oBAAoB;EACpB,WAAW;AACb","sourcesContent":[".form{gap:var(--ac-space-4)}.field,.form{display:flex;flex-direction:column}.field{gap:var(--ac-space-1)}.label{height:.875rem;width:30%}.input,.submit{border-radius:var(--ac-radius-md);height:2.5rem}.submit{align-self:flex-end;width:8rem}",".form {\n gap: var(--ac-space-4);\n}\n\n.field, .form {\n flex-direction: column;\n display: flex;\n}\n\n.field {\n gap: var(--ac-space-1);\n}\n\n.label {\n width: 30%;\n height: .875rem;\n}\n\n.input, .submit {\n border-radius: var(--ac-radius-md);\n height: 2.5rem;\n}\n\n.submit {\n align-self: flex-end;\n width: 8rem;\n}\n"],"sourceRoot":""}
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { useFormContext, type ControllerProps, type FieldPath, type FieldValues } from "react-hook-form";
2
+ import { Controller, useController, useFieldArray, useForm, useFormContext, useFormState, useWatch, type Control, type ControllerFieldState, type ControllerProps, type ControllerRenderProps, type DefaultValues, type FieldError, type FieldErrors, type FieldPath, type FieldValues, type Path, type RegisterOptions, type Resolver, type SubmitHandler, type UseControllerReturn, type UseFieldArrayReturn, type UseFormReturn } from "react-hook-form";
3
3
  /**
4
4
  * Provides the `react-hook-form` context to nested form primitives.
5
5
  *
@@ -147,8 +147,8 @@ declare const FormDescription: React.ForwardRefExoticComponent<React.HTMLAttribu
147
147
  * @see {@link https://developer.mozilla.org/docs/Web/Accessibility/ARIA/Reference/Attributes/aria-invalid | ARIA invalid state}
148
148
  */
149
149
  declare const FormMessage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
150
- export { Controller, useController, useFieldArray, useForm, useFormContext, useFormState, useWatch } from "react-hook-form";
151
- export type { Control, ControllerFieldState, ControllerProps, ControllerRenderProps, DefaultValues, FieldError, FieldErrors, FieldPath, FieldValues, Path, RegisterOptions, Resolver, SubmitHandler, UseControllerReturn, UseFieldArrayReturn, UseFormReturn, } from "react-hook-form";
150
+ export { Controller, useController, useFieldArray, useForm, useFormContext, useFormState, useWatch };
151
+ export type { Control, ControllerFieldState, ControllerProps, ControllerRenderProps, DefaultValues, FieldError, FieldErrors, FieldPath, FieldValues, Path, RegisterOptions, Resolver, SubmitHandler, UseControllerReturn, UseFieldArrayReturn, UseFormReturn, };
152
152
  export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };
153
153
  export type { FormControlProps };
154
154
  //# sourceMappingURL=form.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../src/components/ui/form.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAA2B,cAAc,EAAE,KAAK,eAAe,EAAE,KAAK,SAAS,EAAE,KAAK,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAMjI;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,IAAI;;CAAqD,CAAC;AAMhE,UAAU,gBAAiB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC;IACpF;;;OAGG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAsCD;;;;;;;;;;;;;;;;;GAiBG;AACH,QAAA,MAAM,SAAS;KAAI,YAAY,SAAS,WAAW,gBAAgB,KAAK,SAAS,SAAS,CAAC,YAA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