@arolariu/components 1.1.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 (325) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/components/ui/accordion.js +3 -3
  3. package/dist/components/ui/accordion.js.map +1 -1
  4. package/dist/components/ui/accordion_module.css.map +1 -1
  5. package/dist/components/ui/alert-dialog.js +8 -8
  6. package/dist/components/ui/alert-dialog.js.map +1 -1
  7. package/dist/components/ui/alert-dialog_module.css +1 -1
  8. package/dist/components/ui/alert-dialog_module.css.map +1 -1
  9. package/dist/components/ui/alert.js +4 -4
  10. package/dist/components/ui/alert.js.map +1 -1
  11. package/dist/components/ui/alert_module.css.map +1 -1
  12. package/dist/components/ui/aspect-ratio.js +2 -2
  13. package/dist/components/ui/aspect-ratio.js.map +1 -1
  14. package/dist/components/ui/aspect-ratio_module.css.map +1 -1
  15. package/dist/components/ui/async-boundary.js +2 -2
  16. package/dist/components/ui/async-boundary.js.map +1 -1
  17. package/dist/components/ui/avatar.js +4 -4
  18. package/dist/components/ui/avatar.js.map +1 -1
  19. package/dist/components/ui/avatar_module.css.map +1 -1
  20. package/dist/components/ui/background-beams.js +3 -3
  21. package/dist/components/ui/background-beams.js.map +1 -1
  22. package/dist/components/ui/background-beams_module.css.map +1 -1
  23. package/dist/components/ui/badge.js +2 -2
  24. package/dist/components/ui/badge.js.map +1 -1
  25. package/dist/components/ui/badge_module.css.map +1 -1
  26. package/dist/components/ui/breadcrumb.js +10 -10
  27. package/dist/components/ui/breadcrumb.js.map +1 -1
  28. package/dist/components/ui/breadcrumb_module.css.map +1 -1
  29. package/dist/components/ui/bubble-background.js +5 -5
  30. package/dist/components/ui/bubble-background.js.map +1 -1
  31. package/dist/components/ui/bubble-background_module.css.map +1 -1
  32. package/dist/components/ui/button-group.js +6 -6
  33. package/dist/components/ui/button-group.js.map +1 -1
  34. package/dist/components/ui/button-group_module.css.map +1 -1
  35. package/dist/components/ui/button.js +4 -4
  36. package/dist/components/ui/button.js.map +1 -1
  37. package/dist/components/ui/button_module.css.map +1 -1
  38. package/dist/components/ui/calendar.d.ts +2 -1
  39. package/dist/components/ui/calendar.d.ts.map +1 -1
  40. package/dist/components/ui/calendar.js +4 -4
  41. package/dist/components/ui/calendar.js.map +1 -1
  42. package/dist/components/ui/calendar_module.css.map +1 -1
  43. package/dist/components/ui/card-skeleton.js +2 -2
  44. package/dist/components/ui/card-skeleton.js.map +1 -1
  45. package/dist/components/ui/card-skeleton_module.css.map +1 -1
  46. package/dist/components/ui/card.js +8 -8
  47. package/dist/components/ui/card.js.map +1 -1
  48. package/dist/components/ui/card_module.css.map +1 -1
  49. package/dist/components/ui/carousel.js +16 -16
  50. package/dist/components/ui/carousel.js.map +1 -1
  51. package/dist/components/ui/carousel_module.css +1 -1
  52. package/dist/components/ui/carousel_module.css.map +1 -1
  53. package/dist/components/ui/chart.d.ts +6 -3
  54. package/dist/components/ui/chart.d.ts.map +1 -1
  55. package/dist/components/ui/chart.js +70 -136
  56. package/dist/components/ui/chart.js.map +1 -1
  57. package/dist/components/ui/chart_module.css.map +1 -1
  58. package/dist/components/ui/checkbox-group.js +2 -2
  59. package/dist/components/ui/checkbox-group.js.map +1 -1
  60. package/dist/components/ui/checkbox-group_module.css.map +1 -1
  61. package/dist/components/ui/checkbox.js +2 -2
  62. package/dist/components/ui/checkbox.js.map +1 -1
  63. package/dist/components/ui/checkbox_module.css.map +1 -1
  64. package/dist/components/ui/collapsible.js +4 -4
  65. package/dist/components/ui/collapsible.js.map +1 -1
  66. package/dist/components/ui/collapsible_module.css.map +1 -1
  67. package/dist/components/ui/combobox.js +13 -13
  68. package/dist/components/ui/combobox.js.map +1 -1
  69. package/dist/components/ui/combobox_module.css.map +1 -1
  70. package/dist/components/ui/command.js +40 -40
  71. package/dist/components/ui/command.js.map +1 -1
  72. package/dist/components/ui/command_module.css +1 -1
  73. package/dist/components/ui/command_module.css.map +1 -1
  74. package/dist/components/ui/context-menu.js +6 -6
  75. package/dist/components/ui/context-menu.js.map +1 -1
  76. package/dist/components/ui/context-menu_module.css.map +1 -1
  77. package/dist/components/ui/copy-button.js +6 -6
  78. package/dist/components/ui/copy-button.js.map +1 -1
  79. package/dist/components/ui/copy-button_module.css.map +1 -1
  80. package/dist/components/ui/counting-number.js +6 -6
  81. package/dist/components/ui/counting-number.js.map +1 -1
  82. package/dist/components/ui/counting-number_module.css.map +1 -1
  83. package/dist/components/ui/dialog.js +6 -6
  84. package/dist/components/ui/dialog.js.map +1 -1
  85. package/dist/components/ui/dialog_module.css +1 -1
  86. package/dist/components/ui/dialog_module.css.map +1 -1
  87. package/dist/components/ui/dot-background_module.css.map +1 -1
  88. package/dist/components/ui/drawer.js +5 -5
  89. package/dist/components/ui/drawer.js.map +1 -1
  90. package/dist/components/ui/drawer_module.css.map +1 -1
  91. package/dist/components/ui/dropdown-menu.js +6 -6
  92. package/dist/components/ui/dropdown-menu.js.map +1 -1
  93. package/dist/components/ui/dropdown-menu_module.css.map +1 -1
  94. package/dist/components/ui/dropdrawer.js +52 -52
  95. package/dist/components/ui/dropdrawer.js.map +1 -1
  96. package/dist/components/ui/dropdrawer_module.css.map +1 -1
  97. package/dist/components/ui/empty.js +7 -7
  98. package/dist/components/ui/empty.js.map +1 -1
  99. package/dist/components/ui/empty_module.css.map +1 -1
  100. package/dist/components/ui/error-boundary.js +2 -2
  101. package/dist/components/ui/error-boundary.js.map +1 -1
  102. package/dist/components/ui/error-boundary_module.css.map +1 -1
  103. package/dist/components/ui/field.js +12 -12
  104. package/dist/components/ui/field.js.map +1 -1
  105. package/dist/components/ui/field_module.css.map +1 -1
  106. package/dist/components/ui/fireworks-background.js +6 -6
  107. package/dist/components/ui/fireworks-background.js.map +1 -1
  108. package/dist/components/ui/fireworks-background_module.css.map +1 -1
  109. package/dist/components/ui/flip-button.js +5 -5
  110. package/dist/components/ui/flip-button.js.map +1 -1
  111. package/dist/components/ui/flip-button_module.css.map +1 -1
  112. package/dist/components/ui/focus-scope.js +6 -6
  113. package/dist/components/ui/focus-scope.js.map +1 -1
  114. package/dist/components/ui/focus-scope_module.css.map +1 -1
  115. package/dist/components/ui/form-skeleton.js +2 -2
  116. package/dist/components/ui/form-skeleton.js.map +1 -1
  117. package/dist/components/ui/form-skeleton_module.css.map +1 -1
  118. package/dist/components/ui/form.d.ts +3 -3
  119. package/dist/components/ui/form.d.ts.map +1 -1
  120. package/dist/components/ui/form.js +13 -13
  121. package/dist/components/ui/form.js.map +1 -1
  122. package/dist/components/ui/form_module.css.map +1 -1
  123. package/dist/components/ui/gradient-background.js +2 -2
  124. package/dist/components/ui/gradient-background.js.map +1 -1
  125. package/dist/components/ui/gradient-background_module.css.map +1 -1
  126. package/dist/components/ui/gradient-text.js +2 -2
  127. package/dist/components/ui/gradient-text.js.map +1 -1
  128. package/dist/components/ui/gradient-text_module.css.map +1 -1
  129. package/dist/components/ui/highlight-text.js +4 -4
  130. package/dist/components/ui/highlight-text.js.map +1 -1
  131. package/dist/components/ui/highlight-text_module.css.map +1 -1
  132. package/dist/components/ui/hole-background.js +21 -21
  133. package/dist/components/ui/hole-background.js.map +1 -1
  134. package/dist/components/ui/hole-background_module.css.map +1 -1
  135. package/dist/components/ui/hover-card.js +3 -3
  136. package/dist/components/ui/hover-card.js.map +1 -1
  137. package/dist/components/ui/hover-card_module.css.map +1 -1
  138. package/dist/components/ui/input-group.js +7 -7
  139. package/dist/components/ui/input-group.js.map +1 -1
  140. package/dist/components/ui/input-group_module.css.map +1 -1
  141. package/dist/components/ui/input-otp.d.ts +3 -3
  142. package/dist/components/ui/input-otp.d.ts.map +1 -1
  143. package/dist/components/ui/input-otp.js +6 -6
  144. package/dist/components/ui/input-otp.js.map +1 -1
  145. package/dist/components/ui/input-otp_module.css.map +1 -1
  146. package/dist/components/ui/input.js +2 -2
  147. package/dist/components/ui/input.js.map +1 -1
  148. package/dist/components/ui/input_module.css.map +1 -1
  149. package/dist/components/ui/item.js +13 -13
  150. package/dist/components/ui/item.js.map +1 -1
  151. package/dist/components/ui/item_module.css.map +1 -1
  152. package/dist/components/ui/kbd.js +3 -3
  153. package/dist/components/ui/kbd.js.map +1 -1
  154. package/dist/components/ui/kbd_module.css.map +1 -1
  155. package/dist/components/ui/label.js +2 -2
  156. package/dist/components/ui/label.js.map +1 -1
  157. package/dist/components/ui/label_module.css.map +1 -1
  158. package/dist/components/ui/list-skeleton.js +2 -2
  159. package/dist/components/ui/list-skeleton.js.map +1 -1
  160. package/dist/components/ui/list-skeleton_module.css.map +1 -1
  161. package/dist/components/ui/loading-overlay.js +2 -2
  162. package/dist/components/ui/loading-overlay.js.map +1 -1
  163. package/dist/components/ui/loading-overlay_module.css.map +1 -1
  164. package/dist/components/ui/menubar.js +4 -4
  165. package/dist/components/ui/menubar.js.map +1 -1
  166. package/dist/components/ui/menubar_module.css.map +1 -1
  167. package/dist/components/ui/meter.js +5 -5
  168. package/dist/components/ui/meter.js.map +1 -1
  169. package/dist/components/ui/meter_module.css.map +1 -1
  170. package/dist/components/ui/navigation-menu.js +5 -5
  171. package/dist/components/ui/navigation-menu.js.map +1 -1
  172. package/dist/components/ui/navigation-menu_module.css +1 -1
  173. package/dist/components/ui/navigation-menu_module.css.map +1 -1
  174. package/dist/components/ui/number-field.js +3 -3
  175. package/dist/components/ui/number-field.js.map +1 -1
  176. package/dist/components/ui/number-field_module.css.map +1 -1
  177. package/dist/components/ui/pagination.js +8 -8
  178. package/dist/components/ui/pagination.js.map +1 -1
  179. package/dist/components/ui/pagination_module.css.map +1 -1
  180. package/dist/components/ui/popover.js +5 -5
  181. package/dist/components/ui/popover.js.map +1 -1
  182. package/dist/components/ui/popover_module.css.map +1 -1
  183. package/dist/components/ui/progress.js +2 -2
  184. package/dist/components/ui/progress.js.map +1 -1
  185. package/dist/components/ui/progress_module.css.map +1 -1
  186. package/dist/components/ui/radio-group.js +3 -3
  187. package/dist/components/ui/radio-group.js.map +1 -1
  188. package/dist/components/ui/radio-group_module.css.map +1 -1
  189. package/dist/components/ui/resizable.d.ts +13 -29
  190. package/dist/components/ui/resizable.d.ts.map +1 -1
  191. package/dist/components/ui/resizable.js +8 -7
  192. package/dist/components/ui/resizable.js.map +1 -1
  193. package/dist/components/ui/resizable_module.css.map +1 -1
  194. package/dist/components/ui/ripple-button.js +9 -9
  195. package/dist/components/ui/ripple-button.js.map +1 -1
  196. package/dist/components/ui/ripple-button_module.css.map +1 -1
  197. package/dist/components/ui/scratcher_module.css.map +1 -1
  198. package/dist/components/ui/scroll-area.js +2 -2
  199. package/dist/components/ui/scroll-area.js.map +1 -1
  200. package/dist/components/ui/scroll-area_module.css.map +1 -1
  201. package/dist/components/ui/select.js +4 -4
  202. package/dist/components/ui/select.js.map +1 -1
  203. package/dist/components/ui/select_module.css.map +1 -1
  204. package/dist/components/ui/separator.js +2 -2
  205. package/dist/components/ui/separator.js.map +1 -1
  206. package/dist/components/ui/separator_module.css.map +1 -1
  207. package/dist/components/ui/sheet.js +6 -6
  208. package/dist/components/ui/sheet.js.map +1 -1
  209. package/dist/components/ui/sheet_module.css.map +1 -1
  210. package/dist/components/ui/sidebar.js +36 -36
  211. package/dist/components/ui/sidebar.js.map +1 -1
  212. package/dist/components/ui/sidebar_module.css.map +1 -1
  213. package/dist/components/ui/skeleton.js +2 -2
  214. package/dist/components/ui/skeleton.js.map +1 -1
  215. package/dist/components/ui/skeleton_module.css.map +1 -1
  216. package/dist/components/ui/slider.js +2 -2
  217. package/dist/components/ui/slider.js.map +1 -1
  218. package/dist/components/ui/slider_module.css.map +1 -1
  219. package/dist/components/ui/spinner.js +2 -2
  220. package/dist/components/ui/spinner.js.map +1 -1
  221. package/dist/components/ui/spinner_module.css.map +1 -1
  222. package/dist/components/ui/stepper.js +2 -2
  223. package/dist/components/ui/stepper.js.map +1 -1
  224. package/dist/components/ui/stepper_module.css.map +1 -1
  225. package/dist/components/ui/switch.js +2 -2
  226. package/dist/components/ui/switch.js.map +1 -1
  227. package/dist/components/ui/switch_module.css.map +1 -1
  228. package/dist/components/ui/table-skeleton.js +2 -2
  229. package/dist/components/ui/table-skeleton.js.map +1 -1
  230. package/dist/components/ui/table-skeleton_module.css.map +1 -1
  231. package/dist/components/ui/table.js +9 -9
  232. package/dist/components/ui/table.js.map +1 -1
  233. package/dist/components/ui/table_module.css.map +1 -1
  234. package/dist/components/ui/tabs.js +3 -3
  235. package/dist/components/ui/tabs.js.map +1 -1
  236. package/dist/components/ui/tabs_module.css.map +1 -1
  237. package/dist/components/ui/textarea.js +2 -2
  238. package/dist/components/ui/textarea.js.map +1 -1
  239. package/dist/components/ui/textarea_module.css.map +1 -1
  240. package/dist/components/ui/timeline.js +5 -5
  241. package/dist/components/ui/timeline.js.map +1 -1
  242. package/dist/components/ui/timeline_module.css.map +1 -1
  243. package/dist/components/ui/{sonner.d.ts → toast.d.ts} +10 -2
  244. package/dist/components/ui/toast.d.ts.map +1 -0
  245. package/dist/components/ui/{sonner.js → toast.js} +40 -40
  246. package/dist/components/ui/toast.js.map +1 -0
  247. package/dist/components/ui/toast.module.js +34 -0
  248. package/dist/components/ui/toast.module.js.map +1 -0
  249. package/dist/components/ui/{sonner_module.css → toast_module.css} +35 -35
  250. package/dist/components/ui/toast_module.css.map +1 -0
  251. package/dist/components/ui/toggle-group.js +5 -5
  252. package/dist/components/ui/toggle-group.js.map +1 -1
  253. package/dist/components/ui/toggle-group_module.css.map +1 -1
  254. package/dist/components/ui/toggle.js +2 -2
  255. package/dist/components/ui/toggle.js.map +1 -1
  256. package/dist/components/ui/toggle_module.css.map +1 -1
  257. package/dist/components/ui/toolbar.js +6 -6
  258. package/dist/components/ui/toolbar.js.map +1 -1
  259. package/dist/components/ui/toolbar_module.css.map +1 -1
  260. package/dist/components/ui/tooltip.js +4 -4
  261. package/dist/components/ui/tooltip.js.map +1 -1
  262. package/dist/components/ui/tooltip_module.css.map +1 -1
  263. package/dist/components/ui/typewriter.js +4 -4
  264. package/dist/components/ui/typewriter.js.map +1 -1
  265. package/dist/components/ui/typewriter_module.css.map +1 -1
  266. package/dist/components/ui/visually-hidden.js +2 -2
  267. package/dist/components/ui/visually-hidden.js.map +1 -1
  268. package/dist/components/ui/visually-hidden_module.css.map +1 -1
  269. package/dist/hooks/useAnnounce.js +5 -5
  270. package/dist/hooks/useAnnounce.js.map +1 -1
  271. package/dist/hooks/useClipboard.js +6 -6
  272. package/dist/hooks/useClipboard.js.map +1 -1
  273. package/dist/hooks/useControllableState.js +3 -3
  274. package/dist/hooks/useControllableState.js.map +1 -1
  275. package/dist/hooks/useDebounce.js +3 -3
  276. package/dist/hooks/useDebounce.js.map +1 -1
  277. package/dist/hooks/useEventCallback.js +4 -4
  278. package/dist/hooks/useEventCallback.js.map +1 -1
  279. package/dist/hooks/useFocusManager.js +6 -6
  280. package/dist/hooks/useFocusManager.js.map +1 -1
  281. package/dist/hooks/useFocusVisible.js +5 -5
  282. package/dist/hooks/useFocusVisible.js.map +1 -1
  283. package/dist/hooks/useId.js +4 -4
  284. package/dist/hooks/useId.js.map +1 -1
  285. package/dist/hooks/useIntersectionObserver.js +3 -3
  286. package/dist/hooks/useIntersectionObserver.js.map +1 -1
  287. package/dist/hooks/useInterval.js +4 -4
  288. package/dist/hooks/useInterval.js.map +1 -1
  289. package/dist/hooks/useLocalStorage.js +4 -4
  290. package/dist/hooks/useLocalStorage.js.map +1 -1
  291. package/dist/hooks/useMediaQuery.js +3 -3
  292. package/dist/hooks/useMediaQuery.js.map +1 -1
  293. package/dist/hooks/useMergedRefs.js +2 -2
  294. package/dist/hooks/useMergedRefs.js.map +1 -1
  295. package/dist/hooks/useOnClickOutside.js +2 -2
  296. package/dist/hooks/useOnClickOutside.js.map +1 -1
  297. package/dist/hooks/usePrevious.js +3 -3
  298. package/dist/hooks/usePrevious.js.map +1 -1
  299. package/dist/hooks/useThrottle.js +7 -7
  300. package/dist/hooks/useThrottle.js.map +1 -1
  301. package/dist/hooks/useTimeout.js +4 -4
  302. package/dist/hooks/useTimeout.js.map +1 -1
  303. package/dist/index.css.map +1 -1
  304. package/dist/index.d.ts +3 -3
  305. package/dist/index.d.ts.map +1 -1
  306. package/dist/index.js +1 -1
  307. package/dist/motion/Collapse.js +2 -2
  308. package/dist/motion/Collapse.js.map +1 -1
  309. package/dist/motion/Collapse_module.css.map +1 -1
  310. package/package.json +7 -8
  311. package/src/components/ui/calendar.tsx +2 -1
  312. package/src/components/ui/chart.tsx +2 -2
  313. package/src/components/ui/form.tsx +28 -3
  314. package/src/components/ui/input-otp.tsx +3 -3
  315. package/src/components/ui/resizable.tsx +15 -18
  316. package/src/components/ui/{sonner.module.css → toast.module.css} +1 -1
  317. package/src/components/ui/{sonner.tsx → toast.tsx} +2 -2
  318. package/src/index.ts +4 -4
  319. package/dist/components/ui/sonner.d.ts.map +0 -1
  320. package/dist/components/ui/sonner.js.map +0 -1
  321. package/dist/components/ui/sonner.module.js +0 -34
  322. package/dist/components/ui/sonner.module.js.map +0 -1
  323. package/dist/components/ui/sonner_module.css.map +0 -1
  324. package/dist/rslib-runtime.js +0 -39
  325. package/dist/rslib-runtime.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/dropdrawer.module.css","webpack://./src/components/ui/dropdrawer.module.css"],"names":[],"mappings":"AADA;ECEE,+CAA+C;EAC/C,WAAW;EACX,qBAAqB;EACrB,eAAe;EACf,QAAQ;;EAER;IACE,kBAAkB;EACpB;AACF;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,oBAAoB;EACpB,WAAW;EACX,uBAAuB;EACvB,qBAAqB;EACrB,aAAa;EACb,eAAe;EACf,QAAQ;AACV;;AAEA;EACE,6BAA6B;EAC7B,kCAAkC;EAClC,0DAA0D;EAC1D,mCAAmC;EACnC,oBAAoB;EACpB,gBAAgB;EAChB,qFAAqF;EACrF,gBAAgB;EAChB,sBAAsB;EACtB,uBAAuB;EACvB,gBAAgB;EAChB,yBAAyB;EACzB,aAAa;EACb,kBAAkB;EAClB,eAAe;E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BAAmB;EACnB,WAAW;EACX,YAAY;EACZ,eAAe;EACf,oBAAoB;AACtB;;AAEA;EACE,+DAA+D;AACjE;;AAEA;EACE,iCAAiC;EACjC,mBAAmB;AACrB;;AAEA;EACE,gBAAgB;AAClB;;AAEA;EACE,OAAO;EACP,gBAAgB;EAChB,kBAAkB;AACpB;;AAEA;EACE,gBAAgB;AAClB;;AAEA;EACE,WAAW;EACX,gBAAgB;EAChB,sBAAsB;AACxB;;AAEA;EACE,mBAAmB;EACnB,mBAAmB;EACnB,SAAS;EACT,UAAU;EACV,WAAW;EACX,YAAY;EACZ,UAAU;EACV,kBAAkB;EAClB,gBAAgB;AAClB;;AAEA;EACE,cAAc;EACd,eAAe;EACf,gBAAgB;EAChB,gBAAgB;EAChB,SAAS;EACT,8BAA8B;EAC9B,mBAAmB;EACnB,WAAW;EACX,aAAa;EACb,aAAa;AACf;;AAEA;EACE,2BAA2B;EAC3B,kCAAkC;EAClC,qBAAqB;AACvB;;AAEA;EACE,gBAAgB;AAClB;;AAEA;EACE,UAAU;AACZ;;AAEA;EACE,iCAAiC;EACjC,4BAA4B;EAC5B,mBAAmB;EACnB,gBAAgB;AAClB;;AAEA;EACE,2BAA2B;EAC3B,kCAAkC;EAClC,oBAAoB;EACpB,gBAAgB;AAClB;;AAEA;EACE,4BAA4B;EAC5B,WAAW;AACb;;AAEA;EACE,mBAAmB;EACnB,UAAU;EACV,aAAa;AACf;;AAEA;EACE,8BAA8B;EAC9B,WAAW;AACb;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,WAAW;EACX,YAAY;AACd;;AAEA;EACE,kBAAkB;AACpB;;AAEA;EACE,WAAW;EACX,oBAAoB;AACtB;;AAEA;EACE;IACE,gBAAgB;EAClB;AACF","sourcesContent":[".drawerOverlay{background:rgba(0,0,0,.55);inset:0;position:fixed;transition:opacity var(--ac-transition-normal);z-index:50;@supports (-webkit-touch-callout:none){position:absolute}}.drawerOverlay[data-ending-style],.drawerOverlay[data-starting-style]{opacity:0}.drawerViewport{align-items:flex-end;display:flex;inset:0;justify-content:center;pointer-events:none;position:fixed;z-index:51}.drawerContent{background:var(--ac-popover);border:1px solid var(--ac-border);border-bottom:0;border-radius:var(--ac-radius-lg) var(--ac-radius-lg) 0 0;box-shadow:0 -16px 40px -16px rgba(0,0,0,.35);color:var(--ac-popover-foreground);display:flex;flex-direction:column;inset-inline:0;margin-top:6rem;max-height:95vh;padding:1rem 1rem 1.5rem;pointer-events:auto;position:relative;transition:opacity var(--ac-transition-normal),transform var(--ac-transition-normal);width:min(100%,48rem)}.drawerContent[data-ending-style],.drawerContent[data-starting-style]{opacity:0;transform:translateY(1rem)}.drawerInnerContent{display:flex;flex:1;flex-direction:column;min-height:0}.drawerHandle{background:var(--ac-border);border-radius:9999px;height:.25rem;margin:0 auto 1rem;width:4rem}.drawerHeader{display:grid;gap:.375rem;padding:0 0 1rem;text-align:center}.drawerTitle{font-size:var(--ac-text-lg);font-weight:600;letter-spacing:-.02em;line-height:1.2}.drawerFooter,.mobileFooter{display:flex;flex-direction:column;gap:.5rem;margin-top:auto;padding-top:1rem}.desktopFooter{padding:.5rem}.dropdownPositioner{z-index:50}.desktopContent,.dropdownContent,.dropdownSubContent{background:var(--ac-popover);border:1px solid var(--ac-border);border-radius:var(--ac-radius-md);box-shadow:0 16px 40px -16px rgba(0,0,0,.35);color:var(--ac-popover-foreground);min-width:13.75rem;overflow:hidden auto;transition:opacity var(--ac-transition-normal),transform var(--ac-transition-normal)}.desktopContent[data-ending-style],.desktopContent[data-starting-style],.dropdownContent[data-ending-style],.dropdownContent[data-starting-style],.dropdownSubContent[data-ending-style],.dropdownSubContent[data-starting-style]{opacity:0;transform:scale(.96)}.desktopContent,.dropdownContent{max-height:min(70vh,var(--available-height,70vh));padding:.25rem}.dropdownSubContent{max-height:min(60vh,var(--available-height,60vh));padding:.25rem}.desktopItem,.desktopSubTrigger{align-items:center;border-radius:var(--ac-radius-sm);color:inherit;cursor:default;display:flex;font-size:var(--ac-text-sm);gap:.5rem;min-height:2rem;outline:none;padding:.375rem .5rem;position:relative;user-select:none;width:100%}.desktopItem[data-highlighted],.desktopSubTrigger[data-highlighted],.desktopSubTrigger[data-popup-open]{background:var(--ac-accent);color:var(--ac-accent-foreground)}.desktopItem[data-disabled],.desktopSubTrigger[data-disabled]{opacity:.5;pointer-events:none}.desktopLabel{font-size:var(--ac-text-sm);font-weight:600;padding:.375rem .5rem}.desktopSeparator{background:var(--ac-border);height:1px;margin:.25rem -.25rem}.mobileContent{max-height:90vh}.mobileHeaderRow{align-items:center;display:flex;gap:.5rem}.backButton{align-items:center;background:transparent;border:0;border-radius:9999px;color:inherit;display:inline-flex;height:2rem;justify-content:center;padding:.25rem;width:2rem}.backButton:hover{background:color-mix(in oklch,var(--ac-muted),transparent 50%)}.backButton:focus-visible,.mobileItem:focus-visible{outline:2px solid var(--ac-ring);outline-offset:2px}.mobileMainViewport,.mobileViewport{overflow-y:auto}.mobileViewport{flex:1;max-height:70vh;position:relative}.mobileMainViewport{max-height:70vh}.mobileMotionPanel{min-height:100%;padding-bottom:1.5rem;width:100%}.screenReaderOnlyHeader{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border:0;white-space:nowrap}.mobileItem{align-items:center;background:transparent;border:0;color:inherit;cursor:pointer;display:flex;justify-content:space-between;padding:1rem;text-align:left;width:100%}.mobileStandaloneItem{background:var(--ac-muted);border-radius:var(--ac-radius-md);margin:.375rem .5rem}.mobileGroupedItem{background:transparent}.mobileLabelWrapper{padding:0}.mobileLabel{color:var(--ac-muted-foreground);font-size:var(--ac-text-sm);font-weight:500;padding:.5rem 1rem}.mobileGroup{background:var(--ac-muted);border-radius:var(--ac-radius-xl);margin:.75rem .5rem;overflow:hidden}.mobileGroupSeparator{background:var(--ac-border);height:1px}.itemChildren,.itemRow{align-items:center;display:flex;gap:.5rem}.itemRow{justify-content:space-between;width:100%}.chevron,.itemIcon{flex-shrink:0}.chevron{height:1rem;width:1rem}.inset{padding-left:2rem}.mobileItem[data-disabled=true]{opacity:.5;pointer-events:none}@media (min-width:640px){.drawerHeader{text-align:left}}",".drawerOverlay {\n transition: opacity var(--ac-transition-normal);\n z-index: 50;\n background: #0000008c;\n position: fixed;\n inset: 0;\n\n @supports (-webkit-touch-callout: none) {\n position: absolute;\n }\n}\n\n.drawerOverlay[data-ending-style], .drawerOverlay[data-starting-style] {\n opacity: 0;\n}\n\n.drawerViewport {\n pointer-events: none;\n z-index: 51;\n justify-content: center;\n align-items: flex-end;\n display: flex;\n position: fixed;\n inset: 0;\n}\n\n.drawerContent {\n background: var(--ac-popover);\n border: 1px solid var(--ac-border);\n border-radius: var(--ac-radius-lg) var(--ac-radius-lg) 0 0;\n color: var(--ac-popover-foreground);\n pointer-events: auto;\n max-height: 95vh;\n transition: opacity var(--ac-transition-normal),transform var(--ac-transition-normal);\n border-bottom: 0;\n flex-direction: column;\n width: min(100%, 48rem);\n margin-top: 6rem;\n padding: 1rem 1rem 1.5rem;\n display: flex;\n position: relative;\n inset-inline: 0;\n box-shadow: 0 -16px 40px -16px #00000059;\n}\n\n.drawerContent[data-ending-style], .drawerContent[data-starting-style] {\n opacity: 0;\n transform: translateY(1rem);\n}\n\n.drawerInnerContent {\n flex-direction: column;\n flex: 1;\n min-height: 0;\n display: flex;\n}\n\n.drawerHandle {\n background: var(--ac-border);\n border-radius: 9999px;\n width: 4rem;\n height: .25rem;\n margin: 0 auto 1rem;\n}\n\n.drawerHeader {\n text-align: center;\n gap: .375rem;\n padding: 0 0 1rem;\n display: grid;\n}\n\n.drawerTitle {\n font-size: var(--ac-text-lg);\n letter-spacing: -.02em;\n font-weight: 600;\n line-height: 1.2;\n}\n\n.drawerFooter, .mobileFooter {\n flex-direction: column;\n gap: .5rem;\n margin-top: auto;\n padding-top: 1rem;\n display: flex;\n}\n\n.desktopFooter {\n padding: .5rem;\n}\n\n.dropdownPositioner {\n z-index: 50;\n}\n\n.desktopContent, .dropdownContent, .dropdownSubContent {\n background: var(--ac-popover);\n border: 1px solid var(--ac-border);\n border-radius: var(--ac-radius-md);\n color: var(--ac-popover-foreground);\n min-width: 13.75rem;\n transition: opacity var(--ac-transition-normal),transform var(--ac-transition-normal);\n overflow: hidden auto;\n box-shadow: 0 16px 40px -16px #00000059;\n}\n\n.desktopContent[data-ending-style], .desktopContent[data-starting-style], .dropdownContent[data-ending-style], .dropdownContent[data-starting-style], .dropdownSubContent[data-ending-style], .dropdownSubContent[data-starting-style] {\n opacity: 0;\n transform: scale(.96);\n}\n\n.desktopContent, .dropdownContent {\n max-height: min(70vh,var(--available-height, 70vh));\n padding: .25rem;\n}\n\n.dropdownSubContent {\n max-height: min(60vh,var(--available-height, 60vh));\n padding: .25rem;\n}\n\n.desktopItem, .desktopSubTrigger {\n border-radius: var(--ac-radius-sm);\n color: inherit;\n cursor: default;\n font-size: var(--ac-text-sm);\n -webkit-user-select: none;\n user-select: none;\n outline: none;\n align-items: center;\n gap: .5rem;\n width: 100%;\n min-height: 2rem;\n padding: .375rem .5rem;\n display: flex;\n position: relative;\n}\n\n.desktopItem[data-highlighted], .desktopSubTrigger[data-highlighted], .desktopSubTrigger[data-popup-open] {\n background: var(--ac-accent);\n color: var(--ac-accent-foreground);\n}\n\n.desktopItem[data-disabled], .desktopSubTrigger[data-disabled] {\n opacity: .5;\n pointer-events: none;\n}\n\n.desktopLabel {\n font-size: var(--ac-text-sm);\n padding: .375rem .5rem;\n font-weight: 600;\n}\n\n.desktopSeparator {\n background: var(--ac-border);\n height: 1px;\n margin: .25rem -.25rem;\n}\n\n.mobileContent {\n max-height: 90vh;\n}\n\n.mobileHeaderRow {\n align-items: center;\n gap: .5rem;\n display: flex;\n}\n\n.backButton {\n color: inherit;\n background: none;\n border: 0;\n border-radius: 9999px;\n justify-content: center;\n align-items: center;\n width: 2rem;\n height: 2rem;\n padding: .25rem;\n display: inline-flex;\n}\n\n.backButton:hover {\n background: color-mix(in oklch,var(--ac-muted),transparent 50%);\n}\n\n.backButton:focus-visible, .mobileItem:focus-visible {\n outline: 2px solid var(--ac-ring);\n outline-offset: 2px;\n}\n\n.mobileMainViewport, .mobileViewport {\n overflow-y: auto;\n}\n\n.mobileViewport {\n flex: 1;\n max-height: 70vh;\n position: relative;\n}\n\n.mobileMainViewport {\n max-height: 70vh;\n}\n\n.mobileMotionPanel {\n width: 100%;\n min-height: 100%;\n padding-bottom: 1.5rem;\n}\n\n.screenReaderOnlyHeader {\n clip: rect(0,0,0,0);\n white-space: nowrap;\n border: 0;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n position: absolute;\n overflow: hidden;\n}\n\n.mobileItem {\n color: inherit;\n cursor: pointer;\n text-align: left;\n background: none;\n border: 0;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n padding: 1rem;\n display: flex;\n}\n\n.mobileStandaloneItem {\n background: var(--ac-muted);\n border-radius: var(--ac-radius-md);\n margin: .375rem .5rem;\n}\n\n.mobileGroupedItem {\n background: none;\n}\n\n.mobileLabelWrapper {\n padding: 0;\n}\n\n.mobileLabel {\n color: var(--ac-muted-foreground);\n font-size: var(--ac-text-sm);\n padding: .5rem 1rem;\n font-weight: 500;\n}\n\n.mobileGroup {\n background: var(--ac-muted);\n border-radius: var(--ac-radius-xl);\n margin: .75rem .5rem;\n overflow: hidden;\n}\n\n.mobileGroupSeparator {\n background: var(--ac-border);\n height: 1px;\n}\n\n.itemChildren, .itemRow {\n align-items: center;\n gap: .5rem;\n display: flex;\n}\n\n.itemRow {\n justify-content: space-between;\n width: 100%;\n}\n\n.chevron, .itemIcon {\n flex-shrink: 0;\n}\n\n.chevron {\n width: 1rem;\n height: 1rem;\n}\n\n.inset {\n padding-left: 2rem;\n}\n\n.mobileItem[data-disabled=\"true\"] {\n opacity: .5;\n pointer-events: none;\n}\n\n@media (width >= 640px) {\n .drawerHeader {\n text-align: left;\n }\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/dropdrawer.module.css","webpack://./src/components/ui/dropdrawer.module.css"],"names":[],"mappings":"AAAA;ECCE,+CAA+C;EAC/C,WAAW;EACX,qBAAqB;EACrB,eAAe;EACf,QAAQ;;EDLiH;IAAuC,kBAAA;ECShK;AACF;;ADVqL;ECanL,UAAU;AACZ;;ADdqQ;ECiBnQ,oBAAoB;EACpB,WAAW;EACX,uBAAuB;EACvB,qBAAqB;EACrB,aAAa;EACb,eAAe;EACf,QAAQ;AACV;;ADxBoY;EC2BlY,6BAA6B;EAC7B,kCAAkC;EAClC,0DAA0D;EAC1D,mCAAmC;EACnC,oBAAoB;EACpB,gBAAgB;EAChB,qFAAqF;EACrF,gBAAgB;EAChB,sBAAsB;EACtB,uBAAuB;EACvB,gBAAgB;EAChB,yBAAyB;EACzB,aAAa;EACb,kBAAkB;EAClB,eAAe;EACf,wCAAwC;AAC1C;;AD3Cy2B;EC8Cv2B,UAAU;EACV,2BAA2B;AAC7B;;ADhDo9B;ECmDl9B,sBAAsB;EACtB,OAAO;EACP,aAAa;EACb,aAAa;AACf;;ADvD+hC;EC0D7hC,4BAA4B;EAC5B,qBAAqB;EACrB,WAAW;EACX,cAAc;EACd,mBAAmB;AACrB;;AD/D0oC;ECkExoC,kBAAkB;EAClB,YAAY;EACZ,iBAAiB;EACjB,aAAa;AACf;;ADtEotC;ECyEltC,4BAA4B;EAC5B,sBAAsB;EACtB,gBAAgB;EAChB,gBAAgB;AAClB;;AD7EmzC;ECgFjzC,sBAAsB;EACtB,UAAU;EACV,gBAAgB;EAChB,iBAAiB;EACjB,aAAa;AACf;;ADrF65C;ECwF35C,cAAc;AAChB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AChB,sBAAsB;AACxB;;ADlNujH;ECqNrjH,mBAAmB;EACnB,mBAAmB;EACnB,SAAS;EACT,UAAU;EACV,WAAW;EACX,YAAY;EACZ,UAAU;EACV,kBAAkB;EAClB,gBAAgB;AAClB;;AD9N2sH;ECiOzsH,cAAc;EACd,eAAe;EACf,gBAAgB;EAChB,gBAAgB;EAChB,SAAS;EACT,8BAA8B;EAC9B,mBAAmB;EACnB,WAAW;EACX,aAAa;EACb,aAAa;AACf;;AD3O03H;EC8Ox3H,2BAA2B;EAC3B,kCAAkC;EAClC,qBAAqB;AACvB;;ADjPk+H;ECoPh+H,gBAAgB;AAClB;;ADrP4gI;ECwP1gI,UAAU;AACZ;;ADzP0iI;EC4PxiI,iCAAiC;EACjC,4BAA4B;EAC5B,mBAAmB;EACnB,gBAAgB;AAClB;;ADhQupI;ECmQrpI,2BAA2B;EAC3B,kCAAkC;EAClC,oBAAoB;EACpB,gBAAgB;AAClB;;ADvQqwI;EC0QnwI,4BAA4B;EAC5B,WAAW;AACb;;AD5Qk0I;EC+Qh0I,mBAAmB;EACnB,UAAU;EACV,aAAa;AACf;;ADlRm4I;ECqRj4I,8BAA8B;EAC9B,WAAW;AACb;;ADvRq7I;EC0Rn7I,cAAc;AAChB;;AD3Rs9I;EC8Rp9I,WAAW;EACX,YAAY;AACd;;ADhSs/I;ECmSp/I,kBAAkB;AACpB;;ADpS+gJ;ECuS7gJ,WAAW;EACX,oBAAoB;AACtB;;ADzS8kJ;EAAyB;IC6SnmJ,gBAAgB;EAClB;AACF","sourcesContent":[".drawerOverlay{background:rgba(0,0,0,.55);inset:0;position:fixed;transition:opacity var(--ac-transition-normal);z-index:50;@supports (-webkit-touch-callout:none){position:absolute}}.drawerOverlay[data-ending-style],.drawerOverlay[data-starting-style]{opacity:0}.drawerViewport{align-items:flex-end;display:flex;inset:0;justify-content:center;pointer-events:none;position:fixed;z-index:51}.drawerContent{background:var(--ac-popover);border:1px solid var(--ac-border);border-bottom:0;border-radius:var(--ac-radius-lg) var(--ac-radius-lg) 0 0;box-shadow:0 -16px 40px -16px rgba(0,0,0,.35);color:var(--ac-popover-foreground);display:flex;flex-direction:column;inset-inline:0;margin-top:6rem;max-height:95vh;padding:1rem 1rem 1.5rem;pointer-events:auto;position:relative;transition:opacity var(--ac-transition-normal),transform var(--ac-transition-normal);width:min(100%,48rem)}.drawerContent[data-ending-style],.drawerContent[data-starting-style]{opacity:0;transform:translateY(1rem)}.drawerInnerContent{display:flex;flex:1;flex-direction:column;min-height:0}.drawerHandle{background:var(--ac-border);border-radius:9999px;height:.25rem;margin:0 auto 1rem;width:4rem}.drawerHeader{display:grid;gap:.375rem;padding:0 0 1rem;text-align:center}.drawerTitle{font-size:var(--ac-text-lg);font-weight:600;letter-spacing:-.02em;line-height:1.2}.drawerFooter,.mobileFooter{display:flex;flex-direction:column;gap:.5rem;margin-top:auto;padding-top:1rem}.desktopFooter{padding:.5rem}.dropdownPositioner{z-index:50}.desktopContent,.dropdownContent,.dropdownSubContent{background:var(--ac-popover);border:1px solid var(--ac-border);border-radius:var(--ac-radius-md);box-shadow:0 16px 40px -16px rgba(0,0,0,.35);color:var(--ac-popover-foreground);min-width:13.75rem;overflow:hidden auto;transition:opacity var(--ac-transition-normal),transform var(--ac-transition-normal)}.desktopContent[data-ending-style],.desktopContent[data-starting-style],.dropdownContent[data-ending-style],.dropdownContent[data-starting-style],.dropdownSubContent[data-ending-style],.dropdownSubContent[data-starting-style]{opacity:0;transform:scale(.96)}.desktopContent,.dropdownContent{max-height:min(70vh,var(--available-height,70vh));padding:.25rem}.dropdownSubContent{max-height:min(60vh,var(--available-height,60vh));padding:.25rem}.desktopItem,.desktopSubTrigger{align-items:center;border-radius:var(--ac-radius-sm);color:inherit;cursor:default;display:flex;font-size:var(--ac-text-sm);gap:.5rem;min-height:2rem;outline:none;padding:.375rem .5rem;position:relative;user-select:none;width:100%}.desktopItem[data-highlighted],.desktopSubTrigger[data-highlighted],.desktopSubTrigger[data-popup-open]{background:var(--ac-accent);color:var(--ac-accent-foreground)}.desktopItem[data-disabled],.desktopSubTrigger[data-disabled]{opacity:.5;pointer-events:none}.desktopLabel{font-size:var(--ac-text-sm);font-weight:600;padding:.375rem .5rem}.desktopSeparator{background:var(--ac-border);height:1px;margin:.25rem -.25rem}.mobileContent{max-height:90vh}.mobileHeaderRow{align-items:center;display:flex;gap:.5rem}.backButton{align-items:center;background:transparent;border:0;border-radius:9999px;color:inherit;display:inline-flex;height:2rem;justify-content:center;padding:.25rem;width:2rem}.backButton:hover{background:color-mix(in oklch,var(--ac-muted),transparent 50%)}.backButton:focus-visible,.mobileItem:focus-visible{outline:2px solid var(--ac-ring);outline-offset:2px}.mobileMainViewport,.mobileViewport{overflow-y:auto}.mobileViewport{flex:1;max-height:70vh;position:relative}.mobileMainViewport{max-height:70vh}.mobileMotionPanel{min-height:100%;padding-bottom:1.5rem;width:100%}.screenReaderOnlyHeader{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border:0;white-space:nowrap}.mobileItem{align-items:center;background:transparent;border:0;color:inherit;cursor:pointer;display:flex;justify-content:space-between;padding:1rem;text-align:left;width:100%}.mobileStandaloneItem{background:var(--ac-muted);border-radius:var(--ac-radius-md);margin:.375rem .5rem}.mobileGroupedItem{background:transparent}.mobileLabelWrapper{padding:0}.mobileLabel{color:var(--ac-muted-foreground);font-size:var(--ac-text-sm);font-weight:500;padding:.5rem 1rem}.mobileGroup{background:var(--ac-muted);border-radius:var(--ac-radius-xl);margin:.75rem .5rem;overflow:hidden}.mobileGroupSeparator{background:var(--ac-border);height:1px}.itemChildren,.itemRow{align-items:center;display:flex;gap:.5rem}.itemRow{justify-content:space-between;width:100%}.chevron,.itemIcon{flex-shrink:0}.chevron{height:1rem;width:1rem}.inset{padding-left:2rem}.mobileItem[data-disabled=true]{opacity:.5;pointer-events:none}@media (min-width:640px){.drawerHeader{text-align:left}}",".drawerOverlay {\n transition: opacity var(--ac-transition-normal);\n z-index: 50;\n background: #0000008c;\n position: fixed;\n inset: 0;\n\n @supports (-webkit-touch-callout: none) {\n position: absolute;\n }\n}\n\n.drawerOverlay[data-ending-style], .drawerOverlay[data-starting-style] {\n opacity: 0;\n}\n\n.drawerViewport {\n pointer-events: none;\n z-index: 51;\n justify-content: center;\n align-items: flex-end;\n display: flex;\n position: fixed;\n inset: 0;\n}\n\n.drawerContent {\n background: var(--ac-popover);\n border: 1px solid var(--ac-border);\n border-radius: var(--ac-radius-lg) var(--ac-radius-lg) 0 0;\n color: var(--ac-popover-foreground);\n pointer-events: auto;\n max-height: 95vh;\n transition: opacity var(--ac-transition-normal),transform var(--ac-transition-normal);\n border-bottom: 0;\n flex-direction: column;\n width: min(100%, 48rem);\n margin-top: 6rem;\n padding: 1rem 1rem 1.5rem;\n display: flex;\n position: relative;\n inset-inline: 0;\n box-shadow: 0 -16px 40px -16px #00000059;\n}\n\n.drawerContent[data-ending-style], .drawerContent[data-starting-style] {\n opacity: 0;\n transform: translateY(1rem);\n}\n\n.drawerInnerContent {\n flex-direction: column;\n flex: 1;\n min-height: 0;\n display: flex;\n}\n\n.drawerHandle {\n background: var(--ac-border);\n border-radius: 9999px;\n width: 4rem;\n height: .25rem;\n margin: 0 auto 1rem;\n}\n\n.drawerHeader {\n text-align: center;\n gap: .375rem;\n padding: 0 0 1rem;\n display: grid;\n}\n\n.drawerTitle {\n font-size: var(--ac-text-lg);\n letter-spacing: -.02em;\n font-weight: 600;\n line-height: 1.2;\n}\n\n.drawerFooter, .mobileFooter {\n flex-direction: column;\n gap: .5rem;\n margin-top: auto;\n padding-top: 1rem;\n display: flex;\n}\n\n.desktopFooter {\n padding: .5rem;\n}\n\n.dropdownPositioner {\n z-index: 50;\n}\n\n.desktopContent, .dropdownContent, .dropdownSubContent {\n background: var(--ac-popover);\n border: 1px solid var(--ac-border);\n border-radius: var(--ac-radius-md);\n color: var(--ac-popover-foreground);\n min-width: 13.75rem;\n transition: opacity var(--ac-transition-normal),transform var(--ac-transition-normal);\n overflow: hidden auto;\n box-shadow: 0 16px 40px -16px #00000059;\n}\n\n.desktopContent[data-ending-style], .desktopContent[data-starting-style], .dropdownContent[data-ending-style], .dropdownContent[data-starting-style], .dropdownSubContent[data-ending-style], .dropdownSubContent[data-starting-style] {\n opacity: 0;\n transform: scale(.96);\n}\n\n.desktopContent, .dropdownContent {\n max-height: min(70vh,var(--available-height, 70vh));\n padding: .25rem;\n}\n\n.dropdownSubContent {\n max-height: min(60vh,var(--available-height, 60vh));\n padding: .25rem;\n}\n\n.desktopItem, .desktopSubTrigger {\n border-radius: var(--ac-radius-sm);\n color: inherit;\n cursor: default;\n font-size: var(--ac-text-sm);\n -webkit-user-select: none;\n user-select: none;\n outline: none;\n align-items: center;\n gap: .5rem;\n width: 100%;\n min-height: 2rem;\n padding: .375rem .5rem;\n display: flex;\n position: relative;\n}\n\n.desktopItem[data-highlighted], .desktopSubTrigger[data-highlighted], .desktopSubTrigger[data-popup-open] {\n background: var(--ac-accent);\n color: var(--ac-accent-foreground);\n}\n\n.desktopItem[data-disabled], .desktopSubTrigger[data-disabled] {\n opacity: .5;\n pointer-events: none;\n}\n\n.desktopLabel {\n font-size: var(--ac-text-sm);\n padding: .375rem .5rem;\n font-weight: 600;\n}\n\n.desktopSeparator {\n background: var(--ac-border);\n height: 1px;\n margin: .25rem -.25rem;\n}\n\n.mobileContent {\n max-height: 90vh;\n}\n\n.mobileHeaderRow {\n align-items: center;\n gap: .5rem;\n display: flex;\n}\n\n.backButton {\n color: inherit;\n background: none;\n border: 0;\n border-radius: 9999px;\n justify-content: center;\n align-items: center;\n width: 2rem;\n height: 2rem;\n padding: .25rem;\n display: inline-flex;\n}\n\n.backButton:hover {\n background: color-mix(in oklch,var(--ac-muted),transparent 50%);\n}\n\n.backButton:focus-visible, .mobileItem:focus-visible {\n outline: 2px solid var(--ac-ring);\n outline-offset: 2px;\n}\n\n.mobileMainViewport, .mobileViewport {\n overflow-y: auto;\n}\n\n.mobileViewport {\n flex: 1;\n max-height: 70vh;\n position: relative;\n}\n\n.mobileMainViewport {\n max-height: 70vh;\n}\n\n.mobileMotionPanel {\n width: 100%;\n min-height: 100%;\n padding-bottom: 1.5rem;\n}\n\n.screenReaderOnlyHeader {\n clip: rect(0,0,0,0);\n white-space: nowrap;\n border: 0;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n position: absolute;\n overflow: hidden;\n}\n\n.mobileItem {\n color: inherit;\n cursor: pointer;\n text-align: left;\n background: none;\n border: 0;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n padding: 1rem;\n display: flex;\n}\n\n.mobileStandaloneItem {\n background: var(--ac-muted);\n border-radius: var(--ac-radius-md);\n margin: .375rem .5rem;\n}\n\n.mobileGroupedItem {\n background: none;\n}\n\n.mobileLabelWrapper {\n padding: 0;\n}\n\n.mobileLabel {\n color: var(--ac-muted-foreground);\n font-size: var(--ac-text-sm);\n padding: .5rem 1rem;\n font-weight: 500;\n}\n\n.mobileGroup {\n background: var(--ac-muted);\n border-radius: var(--ac-radius-xl);\n margin: .75rem .5rem;\n overflow: hidden;\n}\n\n.mobileGroupSeparator {\n background: var(--ac-border);\n height: 1px;\n}\n\n.itemChildren, .itemRow {\n align-items: center;\n gap: .5rem;\n display: flex;\n}\n\n.itemRow {\n justify-content: space-between;\n width: 100%;\n}\n\n.chevron, .itemIcon {\n flex-shrink: 0;\n}\n\n.chevron {\n width: 1rem;\n height: 1rem;\n}\n\n.inset {\n padding-left: 2rem;\n}\n\n.mobileItem[data-disabled=\"true\"] {\n opacity: .5;\n pointer-events: none;\n}\n\n@media (width >= 640px) {\n .drawerHeader {\n text-align: left;\n }\n}\n"],"sourceRoot":""}
@@ -1,39 +1,39 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
3
2
  import { cn } from "../../lib/utilities.js";
4
3
  import empty_module from "./empty.module.js";
5
- const Empty = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
4
+ import * as __rspack_external_react from "react";
5
+ const Empty = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
6
6
  ref: ref,
7
7
  "data-slot": "empty",
8
8
  className: cn(empty_module.empty, className),
9
9
  ...props
10
10
  }));
11
- const EmptyHeader = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
11
+ const EmptyHeader = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
12
12
  ref: ref,
13
13
  "data-slot": "empty-header",
14
14
  className: cn(empty_module.header, className),
15
15
  ...props
16
16
  }));
17
- const EmptyMedia = /*#__PURE__*/ forwardRef(({ className, variant = "default", ...props }, ref)=>/*#__PURE__*/ jsx("div", {
17
+ const EmptyMedia = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, variant = "default", ...props }, ref)=>/*#__PURE__*/ jsx("div", {
18
18
  ref: ref,
19
19
  "data-slot": "empty-icon",
20
20
  "data-variant": variant,
21
21
  className: cn(empty_module.media, "icon" === variant && empty_module.mediaIcon, className),
22
22
  ...props
23
23
  }));
24
- const EmptyTitle = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
24
+ const EmptyTitle = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
25
25
  ref: ref,
26
26
  "data-slot": "empty-title",
27
27
  className: cn(empty_module.title, className),
28
28
  ...props
29
29
  }));
30
- const EmptyDescription = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("p", {
30
+ const EmptyDescription = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("p", {
31
31
  ref: ref,
32
32
  "data-slot": "empty-description",
33
33
  className: cn(empty_module.description, className),
34
34
  ...props
35
35
  }));
36
- const EmptyContent = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
36
+ const EmptyContent = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
37
37
  ref: ref,
38
38
  "data-slot": "empty-content",
39
39
  className: cn(empty_module.content, className),
@@ -1 +1 @@
1
- {"version":3,"file":"components/ui/empty.js","sources":["../../../src/components/ui/empty.tsx"],"sourcesContent":["import * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./empty.module.css\";\r\n\r\n/** Supported visual treatments for {@link EmptyMedia}. */\r\nexport type EmptyMediaVariant = \"default\" | \"icon\";\r\n\r\n/**\r\n * Props for the {@link Empty} component.\r\n */\r\nexport type EmptyProps = React.ComponentPropsWithoutRef<\"div\">;\r\n\r\n/**\r\n * Props for the {@link EmptyHeader} component.\r\n */\r\nexport type EmptyHeaderProps = React.ComponentPropsWithoutRef<\"div\">;\r\n\r\n/**\r\n * Props for the {@link EmptyMedia} component.\r\n */\r\nexport interface EmptyMediaProps extends React.ComponentPropsWithoutRef<\"div\"> {\r\n /** Visual presentation applied to the media container. @default \"default\" */\r\n variant?: EmptyMediaVariant;\r\n}\r\n\r\n/**\r\n * Props for the {@link EmptyTitle} component.\r\n */\r\nexport type EmptyTitleProps = React.ComponentPropsWithoutRef<\"div\">;\r\n\r\n/**\r\n * Props for the {@link EmptyDescription} component.\r\n */\r\nexport type EmptyDescriptionProps = React.ComponentPropsWithoutRef<\"p\">;\r\n\r\n/**\r\n * Props for the {@link EmptyContent} component.\r\n */\r\nexport type EmptyContentProps = React.ComponentPropsWithoutRef<\"div\">;\r\n\r\n/**\r\n * Creates a structured empty-state 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 * <Empty>\r\n * <EmptyHeader />\r\n * </Empty>\r\n * ```\r\n *\r\n * @see {@link EmptyProps} for available props\r\n */\r\nconst Empty = React.forwardRef<HTMLDivElement, EmptyProps>(\r\n ({className, ...props}: Readonly<EmptyProps>, ref): React.JSX.Element => (\r\n <div\r\n ref={ref}\r\n data-slot='empty'\r\n className={cn(styles.empty, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Groups the leading header content for an empty state.\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 * <EmptyHeader>Nothing here yet</EmptyHeader>\r\n * ```\r\n *\r\n * @see {@link EmptyHeaderProps} for available props\r\n */\r\nconst EmptyHeader = React.forwardRef<HTMLDivElement, EmptyHeaderProps>(\r\n ({className, ...props}: Readonly<EmptyHeaderProps>, ref): React.JSX.Element => (\r\n <div\r\n ref={ref}\r\n data-slot='empty-header'\r\n className={cn(styles.header, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Hosts media or icon content for an empty state.\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 * <EmptyMedia variant='icon'>📭</EmptyMedia>\r\n * ```\r\n *\r\n * @see {@link EmptyMediaProps} for available props\r\n */\r\nconst EmptyMedia = React.forwardRef<HTMLDivElement, EmptyMediaProps>(\r\n ({className, variant = \"default\", ...props}: Readonly<EmptyMediaProps>, ref): React.JSX.Element => (\r\n <div\r\n ref={ref}\r\n data-slot='empty-icon'\r\n data-variant={variant}\r\n className={cn(styles.media, variant === \"icon\" && styles.mediaIcon, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Renders the primary title for an empty state.\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 * <EmptyTitle>No results found</EmptyTitle>\r\n * ```\r\n *\r\n * @see {@link EmptyTitleProps} for available props\r\n */\r\nconst EmptyTitle = React.forwardRef<HTMLDivElement, EmptyTitleProps>(\r\n ({className, ...props}: Readonly<EmptyTitleProps>, ref): React.JSX.Element => (\r\n <div\r\n ref={ref}\r\n data-slot='empty-title'\r\n className={cn(styles.title, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Renders supporting copy for an empty state.\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 * <EmptyDescription>Try adjusting your filters.</EmptyDescription>\r\n * ```\r\n *\r\n * @see {@link EmptyDescriptionProps} for available props\r\n */\r\nconst EmptyDescription = React.forwardRef<HTMLParagraphElement, EmptyDescriptionProps>(\r\n ({className, ...props}: Readonly<EmptyDescriptionProps>, ref): React.JSX.Element => (\r\n <p\r\n ref={ref}\r\n data-slot='empty-description'\r\n className={cn(styles.description, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Hosts trailing actions or supplemental content for an empty state.\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 * <EmptyContent>\r\n * <button type='button'>Create item</button>\r\n * </EmptyContent>\r\n * ```\r\n *\r\n * @see {@link EmptyContentProps} for available props\r\n */\r\nconst EmptyContent = React.forwardRef<HTMLDivElement, EmptyContentProps>(\r\n ({className, ...props}: Readonly<EmptyContentProps>, ref): React.JSX.Element => (\r\n <div\r\n ref={ref}\r\n data-slot='empty-content'\r\n className={cn(styles.content, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\nEmpty.displayName = \"Empty\";\r\nEmptyHeader.displayName = \"EmptyHeader\";\r\nEmptyMedia.displayName = \"EmptyMedia\";\r\nEmptyTitle.displayName = \"EmptyTitle\";\r\nEmptyDescription.displayName = \"EmptyDescription\";\r\nEmptyContent.displayName = \"EmptyContent\";\r\n\r\nexport {Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle};\r\n"],"names":["Empty","React","className","props","ref","cn","styles","EmptyHeader","EmptyMedia","variant","EmptyTitle","EmptyDescription","EmptyContent"],"mappings":";;;;AA0DA,MAAMA,QAAQ,WAAHA,GAAGC,WACZ,CAAC,EAACC,SAAS,EAAE,GAAGC,OAA4B,EAAEC,MAAAA,WAAAA,GAC5C,IAAC;QACC,KAAKA;QACL,aAAU;QACV,WAAWC,GAAGC,aAAAA,KAAY,EAAEJ;QAC3B,GAAGC,KAAK;;AAoBf,MAAMI,cAAc,WAAHA,GAAGN,WAClB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAkC,EAAEC,MAAAA,WAAAA,GAClD,IAAC;QACC,KAAKA;QACL,aAAU;QACV,WAAWC,GAAGC,aAAAA,MAAa,EAAEJ;QAC5B,GAAGC,KAAK;;AAoBf,MAAMK,aAAa,WAAHA,GAAGP,WACjB,CAAC,EAACC,SAAS,EAAEO,UAAU,SAAS,EAAE,GAAGN,OAAiC,EAAEC,MAAAA,WAAAA,GACtE,IAAC;QACC,KAAKA;QACL,aAAU;QACV,gBAAcK;QACd,WAAWJ,GAAGC,aAAAA,KAAY,EAAEG,AAAY,WAAZA,WAAsBH,aAAAA,SAAgB,EAAEJ;QACnE,GAAGC,KAAK;;AAoBf,MAAMO,aAAa,WAAHA,GAAGT,WACjB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAiC,EAAEC,MAAAA,WAAAA,GACjD,IAAC;QACC,KAAKA;QACL,aAAU;QACV,WAAWC,GAAGC,aAAAA,KAAY,EAAEJ;QAC3B,GAAGC,KAAK;;AAoBf,MAAMQ,mBAAmB,WAAHA,GAAGV,WACvB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAuC,EAAEC,MAAAA,WAAAA,GACvD,IAAC;QACC,KAAKA;QACL,aAAU;QACV,WAAWC,GAAGC,aAAAA,WAAkB,EAAEJ;QACjC,GAAGC,KAAK;;AAsBf,MAAMS,eAAe,WAAHA,GAAGX,WACnB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAmC,EAAEC,MAAAA,WAAAA,GACnD,IAAC;QACC,KAAKA;QACL,aAAU;QACV,WAAWC,GAAGC,aAAAA,OAAc,EAAEJ;QAC7B,GAAGC,KAAK;;AAKfH,MAAM,WAAW,GAAG;AACpBO,YAAY,WAAW,GAAG;AAC1BC,WAAW,WAAW,GAAG;AACzBE,WAAW,WAAW,GAAG;AACzBC,iBAAiB,WAAW,GAAG;AAC/BC,aAAa,WAAW,GAAG"}
1
+ {"version":3,"file":"components/ui/empty.js","sources":["../../../src/components/ui/empty.tsx"],"sourcesContent":["import * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport styles from \"./empty.module.css\";\r\n\r\n/** Supported visual treatments for {@link EmptyMedia}. */\r\nexport type EmptyMediaVariant = \"default\" | \"icon\";\r\n\r\n/**\r\n * Props for the {@link Empty} component.\r\n */\r\nexport type EmptyProps = React.ComponentPropsWithoutRef<\"div\">;\r\n\r\n/**\r\n * Props for the {@link EmptyHeader} component.\r\n */\r\nexport type EmptyHeaderProps = React.ComponentPropsWithoutRef<\"div\">;\r\n\r\n/**\r\n * Props for the {@link EmptyMedia} component.\r\n */\r\nexport interface EmptyMediaProps extends React.ComponentPropsWithoutRef<\"div\"> {\r\n /** Visual presentation applied to the media container. @default \"default\" */\r\n variant?: EmptyMediaVariant;\r\n}\r\n\r\n/**\r\n * Props for the {@link EmptyTitle} component.\r\n */\r\nexport type EmptyTitleProps = React.ComponentPropsWithoutRef<\"div\">;\r\n\r\n/**\r\n * Props for the {@link EmptyDescription} component.\r\n */\r\nexport type EmptyDescriptionProps = React.ComponentPropsWithoutRef<\"p\">;\r\n\r\n/**\r\n * Props for the {@link EmptyContent} component.\r\n */\r\nexport type EmptyContentProps = React.ComponentPropsWithoutRef<\"div\">;\r\n\r\n/**\r\n * Creates a structured empty-state 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 * <Empty>\r\n * <EmptyHeader />\r\n * </Empty>\r\n * ```\r\n *\r\n * @see {@link EmptyProps} for available props\r\n */\r\nconst Empty = React.forwardRef<HTMLDivElement, EmptyProps>(\r\n ({className, ...props}: Readonly<EmptyProps>, ref): React.JSX.Element => (\r\n <div\r\n ref={ref}\r\n data-slot='empty'\r\n className={cn(styles.empty, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Groups the leading header content for an empty state.\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 * <EmptyHeader>Nothing here yet</EmptyHeader>\r\n * ```\r\n *\r\n * @see {@link EmptyHeaderProps} for available props\r\n */\r\nconst EmptyHeader = React.forwardRef<HTMLDivElement, EmptyHeaderProps>(\r\n ({className, ...props}: Readonly<EmptyHeaderProps>, ref): React.JSX.Element => (\r\n <div\r\n ref={ref}\r\n data-slot='empty-header'\r\n className={cn(styles.header, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Hosts media or icon content for an empty state.\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 * <EmptyMedia variant='icon'>📭</EmptyMedia>\r\n * ```\r\n *\r\n * @see {@link EmptyMediaProps} for available props\r\n */\r\nconst EmptyMedia = React.forwardRef<HTMLDivElement, EmptyMediaProps>(\r\n ({className, variant = \"default\", ...props}: Readonly<EmptyMediaProps>, ref): React.JSX.Element => (\r\n <div\r\n ref={ref}\r\n data-slot='empty-icon'\r\n data-variant={variant}\r\n className={cn(styles.media, variant === \"icon\" && styles.mediaIcon, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Renders the primary title for an empty state.\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 * <EmptyTitle>No results found</EmptyTitle>\r\n * ```\r\n *\r\n * @see {@link EmptyTitleProps} for available props\r\n */\r\nconst EmptyTitle = React.forwardRef<HTMLDivElement, EmptyTitleProps>(\r\n ({className, ...props}: Readonly<EmptyTitleProps>, ref): React.JSX.Element => (\r\n <div\r\n ref={ref}\r\n data-slot='empty-title'\r\n className={cn(styles.title, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Renders supporting copy for an empty state.\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 * <EmptyDescription>Try adjusting your filters.</EmptyDescription>\r\n * ```\r\n *\r\n * @see {@link EmptyDescriptionProps} for available props\r\n */\r\nconst EmptyDescription = React.forwardRef<HTMLParagraphElement, EmptyDescriptionProps>(\r\n ({className, ...props}: Readonly<EmptyDescriptionProps>, ref): React.JSX.Element => (\r\n <p\r\n ref={ref}\r\n data-slot='empty-description'\r\n className={cn(styles.description, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\n/**\r\n * Hosts trailing actions or supplemental content for an empty state.\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 * <EmptyContent>\r\n * <button type='button'>Create item</button>\r\n * </EmptyContent>\r\n * ```\r\n *\r\n * @see {@link EmptyContentProps} for available props\r\n */\r\nconst EmptyContent = React.forwardRef<HTMLDivElement, EmptyContentProps>(\r\n ({className, ...props}: Readonly<EmptyContentProps>, ref): React.JSX.Element => (\r\n <div\r\n ref={ref}\r\n data-slot='empty-content'\r\n className={cn(styles.content, className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\n\r\nEmpty.displayName = \"Empty\";\r\nEmptyHeader.displayName = \"EmptyHeader\";\r\nEmptyMedia.displayName = \"EmptyMedia\";\r\nEmptyTitle.displayName = \"EmptyTitle\";\r\nEmptyDescription.displayName = \"EmptyDescription\";\r\nEmptyContent.displayName = \"EmptyContent\";\r\n\r\nexport {Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle};\r\n"],"names":["Empty","React","className","props","ref","cn","styles","EmptyHeader","EmptyMedia","variant","EmptyTitle","EmptyDescription","EmptyContent"],"mappings":";;;;AA0DA,MAAMA,QAAQ,WAAHA,GAAGC,wBAAAA,UAAgB,CAC5B,CAAC,EAACC,SAAS,EAAE,GAAGC,OAA4B,EAAEC,MAAAA,WAAAA,GAC5C,IAAC;QACC,KAAKA;QACL,aAAU;QACV,WAAWC,GAAGC,aAAAA,KAAY,EAAEJ;QAC3B,GAAGC,KAAK;;AAoBf,MAAMI,cAAc,WAAHA,GAAGN,wBAAAA,UAAgB,CAClC,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAkC,EAAEC,MAAAA,WAAAA,GAClD,IAAC;QACC,KAAKA;QACL,aAAU;QACV,WAAWC,GAAGC,aAAAA,MAAa,EAAEJ;QAC5B,GAAGC,KAAK;;AAoBf,MAAMK,aAAa,WAAHA,GAAGP,wBAAAA,UAAgB,CACjC,CAAC,EAACC,SAAS,EAAEO,UAAU,SAAS,EAAE,GAAGN,OAAiC,EAAEC,MAAAA,WAAAA,GACtE,IAAC;QACC,KAAKA;QACL,aAAU;QACV,gBAAcK;QACd,WAAWJ,GAAGC,aAAAA,KAAY,EAAEG,AAAY,WAAZA,WAAsBH,aAAAA,SAAgB,EAAEJ;QACnE,GAAGC,KAAK;;AAoBf,MAAMO,aAAa,WAAHA,GAAGT,wBAAAA,UAAgB,CACjC,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAiC,EAAEC,MAAAA,WAAAA,GACjD,IAAC;QACC,KAAKA;QACL,aAAU;QACV,WAAWC,GAAGC,aAAAA,KAAY,EAAEJ;QAC3B,GAAGC,KAAK;;AAoBf,MAAMQ,mBAAmB,WAAHA,GAAGV,wBAAAA,UAAgB,CACvC,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAuC,EAAEC,MAAAA,WAAAA,GACvD,IAAC;QACC,KAAKA;QACL,aAAU;QACV,WAAWC,GAAGC,aAAAA,WAAkB,EAAEJ;QACjC,GAAGC,KAAK;;AAsBf,MAAMS,eAAe,WAAHA,GAAGX,wBAAAA,UAAgB,CACnC,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAmC,EAAEC,MAAAA,WAAAA,GACnD,IAAC;QACC,KAAKA;QACL,aAAU;QACV,WAAWC,GAAGC,aAAAA,OAAc,EAAEJ;QAC7B,GAAGC,KAAK;;AAKfH,MAAM,WAAW,GAAG;AACpBO,YAAY,WAAW,GAAG;AAC1BC,WAAW,WAAW,GAAG;AACzBE,WAAW,WAAW,GAAG;AACzBC,iBAAiB,WAAW,GAAG;AAC/BC,aAAa,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/empty.module.css","webpack://./src/components/ui/empty.module.css"],"names":[],"mappings":"AADA;ECEE,mCAAmC;EACnC,kCAAkC;EAClC,sBAAsB;EACtB,YAAY;EACZ,0BAA0B;EAC1B,UAAU;EACV,uBAAuB;AACzB;;AAEA;EACE,kBAAkB;EAClB,sBAAsB;EACtB,mBAAmB;EACnB,aAAa;AACf;;AAEA;EACE,sBAAsB;EACtB,gBAAgB;AAClB;;AAEA;EACE,gCAAgC;EAChC,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;AACf;;AAEA;EACE,cAAc;AAChB;;AAEA;EACE,iCAAiC;EACjC,kCAAkC;EAClC,kCAAkC;EAClC,2BAA2B;EAC3B,aAAa;EACb,cAAc;AAChB;;AAEA;EACE,aAAa;EACb,cAAc;AAChB;;AAEA;EACE,2BAA2B;EAC3B,4BAA4B;EAC5B,sBAAsB;EACtB,gBAAgB;AAClB;;AAEA;EACE,iCAAiC;EACjC,4BAA4B;EAC5B,gBAAgB;AAClB;;AAEA;EACE,cAAc;EACd,0BAA0B;EAC1B,0BAA0B;AAC5B;;AAEA;EACE;IACE,2BAA2B;EAC7B;AACF;;AAEA;EACE,4BAA4B;EAC5B,mBAAmB;EACnB,sBAAsB;EACtB,sBAAsB;EACtB,WAAW;EACX,YAAY;EACZ,gBAAgB;EAChB,aAAa;AACf","sourcesContent":[".empty{border:1px dashed var(--ac-border);border-radius:var(--ac-radius-lg);flex:1 1 auto;gap:var(--ac-space-6);justify-content:center;min-width:0;padding:var(--ac-space-6)}.empty,.header{align-items:center;display:flex;flex-direction:column;text-align:center}.header{gap:var(--ac-space-2);max-width:24rem}.media{align-items:center;display:flex;justify-content:center;margin-bottom:var(--ac-space-2)}.media,.media svg{flex-shrink:0}.mediaIcon{background-color:var(--ac-muted);border:1px solid var(--ac-border);border-radius:var(--ac-radius-lg);color:var(--ac-foreground);height:2.5rem;width:2.5rem}.mediaIcon svg{height:1.5rem;width:1.5rem}.title{color:var(--ac-foreground);font-size:var(--ac-text-lg);font-weight:600;letter-spacing:-.01em}.description{color:var(--ac-muted-foreground);font-size:var(--ac-text-sm);line-height:1.6}.description a{color:inherit;text-decoration:underline;text-underline-offset:4px}@media (hover:hover){.description a:hover{color:var(--ac-foreground)}}.content{align-items:center;display:flex;flex-direction:column;font-size:var(--ac-text-sm);gap:var(--ac-space-4);max-width:24rem;min-width:0;width:100%}",".empty {\n border: 1px dashed var(--ac-border);\n border-radius: var(--ac-radius-lg);\n gap: var(--ac-space-6);\n min-width: 0;\n padding: var(--ac-space-6);\n flex: auto;\n justify-content: center;\n}\n\n.empty, .header {\n text-align: center;\n flex-direction: column;\n align-items: center;\n display: flex;\n}\n\n.header {\n gap: var(--ac-space-2);\n max-width: 24rem;\n}\n\n.media {\n margin-bottom: var(--ac-space-2);\n justify-content: center;\n align-items: center;\n display: flex;\n}\n\n.media, .media svg {\n flex-shrink: 0;\n}\n\n.mediaIcon {\n background-color: var(--ac-muted);\n border: 1px solid var(--ac-border);\n border-radius: var(--ac-radius-lg);\n color: var(--ac-foreground);\n width: 2.5rem;\n height: 2.5rem;\n}\n\n.mediaIcon svg {\n width: 1.5rem;\n height: 1.5rem;\n}\n\n.title {\n color: var(--ac-foreground);\n font-size: var(--ac-text-lg);\n letter-spacing: -.01em;\n font-weight: 600;\n}\n\n.description {\n color: var(--ac-muted-foreground);\n font-size: var(--ac-text-sm);\n line-height: 1.6;\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.content {\n font-size: var(--ac-text-sm);\n align-items: center;\n gap: var(--ac-space-4);\n flex-direction: column;\n width: 100%;\n min-width: 0;\n max-width: 24rem;\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/empty.module.css","webpack://./src/components/ui/empty.module.css"],"names":[],"mappings":"AAAA;ECCE,mCAAmC;EACnC,kCAAkC;EAClC,sBAAsB;EACtB,YAAY;EACZ,0BAA0B;EAC1B,UAAU;EACV,uBAAuB;AACzB;;ADR6K;ECW3K,kBAAkB;EAClB,sBAAsB;EACtB,mBAAmB;EACnB,aAAa;AACf;;ADfoQ;ECkBlQ,sBAAsB;EACtB,gBAAgB;AAClB;;ADpBkT;ECuBhT,gCAAgC;EAChC,uBAAuB;EACvB,mBAAmB;EACnB,aAAa;AACf;;AD3BgZ;EC8B9Y,cAAc;AAChB;;AD/Bgb;ECkC9a,iCAAiC;EACjC,kCAAkC;EAClC,kCAAkC;EAClC,2BAA2B;EAC3B,aAAa;EACb,cAAc;AAChB;;ADxCslB;EC2CplB,aAAa;EACb,cAAc;AAChB;;AD7CgoB;ECgD9nB,2BAA2B;EAC3B,4BAA4B;EAC5B,sBAAsB;EACtB,gBAAgB;AAClB;;ADpDouB;ECuDluB,iCAAiC;EACjC,4BAA4B;EAC5B,gBAAgB;AAClB;;AD1D8zB;EC6D5zB,cAAc;EACd,0BAA0B;EAC1B,0BAA0B;AAC5B;;ADhE+4B;EAAqB;ICoEh6B,2BAA2B;EAC7B;AACF;;ADtEq9B;ECyEn9B,4BAA4B;EAC5B,mBAAmB;EACnB,sBAAsB;EACtB,sBAAsB;EACtB,WAAW;EACX,YAAY;EACZ,gBAAgB;EAChB,aAAa;AACf","sourcesContent":[".empty{border:1px dashed var(--ac-border);border-radius:var(--ac-radius-lg);flex:1 1 auto;gap:var(--ac-space-6);justify-content:center;min-width:0;padding:var(--ac-space-6)}.empty,.header{align-items:center;display:flex;flex-direction:column;text-align:center}.header{gap:var(--ac-space-2);max-width:24rem}.media{align-items:center;display:flex;justify-content:center;margin-bottom:var(--ac-space-2)}.media,.media svg{flex-shrink:0}.mediaIcon{background-color:var(--ac-muted);border:1px solid var(--ac-border);border-radius:var(--ac-radius-lg);color:var(--ac-foreground);height:2.5rem;width:2.5rem}.mediaIcon svg{height:1.5rem;width:1.5rem}.title{color:var(--ac-foreground);font-size:var(--ac-text-lg);font-weight:600;letter-spacing:-.01em}.description{color:var(--ac-muted-foreground);font-size:var(--ac-text-sm);line-height:1.6}.description a{color:inherit;text-decoration:underline;text-underline-offset:4px}@media (hover:hover){.description a:hover{color:var(--ac-foreground)}}.content{align-items:center;display:flex;flex-direction:column;font-size:var(--ac-text-sm);gap:var(--ac-space-4);max-width:24rem;min-width:0;width:100%}",".empty {\n border: 1px dashed var(--ac-border);\n border-radius: var(--ac-radius-lg);\n gap: var(--ac-space-6);\n min-width: 0;\n padding: var(--ac-space-6);\n flex: auto;\n justify-content: center;\n}\n\n.empty, .header {\n text-align: center;\n flex-direction: column;\n align-items: center;\n display: flex;\n}\n\n.header {\n gap: var(--ac-space-2);\n max-width: 24rem;\n}\n\n.media {\n margin-bottom: var(--ac-space-2);\n justify-content: center;\n align-items: center;\n display: flex;\n}\n\n.media, .media svg {\n flex-shrink: 0;\n}\n\n.mediaIcon {\n background-color: var(--ac-muted);\n border: 1px solid var(--ac-border);\n border-radius: var(--ac-radius-lg);\n color: var(--ac-foreground);\n width: 2.5rem;\n height: 2.5rem;\n}\n\n.mediaIcon svg {\n width: 1.5rem;\n height: 1.5rem;\n}\n\n.title {\n color: var(--ac-foreground);\n font-size: var(--ac-text-lg);\n letter-spacing: -.01em;\n font-weight: 600;\n}\n\n.description {\n color: var(--ac-muted-foreground);\n font-size: var(--ac-text-sm);\n line-height: 1.6;\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.content {\n font-size: var(--ac-text-sm);\n align-items: center;\n gap: var(--ac-space-4);\n flex-direction: column;\n width: 100%;\n min-width: 0;\n max-width: 24rem;\n display: flex;\n}\n"],"sourceRoot":""}
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { Component } from "react";
4
3
  import error_boundary_module from "./error-boundary.module.js";
5
- class ErrorBoundary extends Component {
4
+ import * as __rspack_external_react from "react";
5
+ class ErrorBoundary extends __rspack_external_react.Component {
6
6
  static getDerivedStateFromError(error) {
7
7
  return {
8
8
  error
@@ -1 +1 @@
1
- {"version":3,"file":"components/ui/error-boundary.js","sources":["../../../src/components/ui/error-boundary.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as React from \"react\";\r\n\r\nimport styles from \"./error-boundary.module.css\";\r\n\r\n/**\r\n * Represents the configurable props for the {@link ErrorBoundary} component.\r\n *\r\n * @remarks\r\n * Accepts child content plus an optional fallback renderer and error callback for\r\n * recovery-oriented error handling in React client trees.\r\n */\r\ninterface ErrorBoundaryProps {\r\n /**\r\n * Content rendered when no error has been captured.\r\n */\r\n children: React.ReactNode;\r\n /**\r\n * Custom fallback UI or render function invoked with the current error and reset action.\r\n */\r\n fallback?: React.ReactNode | ((error: Error, reset: () => void) => React.ReactNode);\r\n /**\r\n * Callback invoked after an error has been captured.\r\n */\r\n onError?: (error: Error, errorInfo: React.ErrorInfo) => void;\r\n}\r\n\r\n/**\r\n * Represents the tracked state for the {@link ErrorBoundary} component.\r\n *\r\n * @remarks\r\n * Stores the most recent rendering error so the boundary can swap to fallback UI and\r\n * later clear that error when `reset()` is invoked.\r\n */\r\ninterface ErrorBoundaryState {\r\n /**\r\n * The latest captured error, or `null` when the subtree is healthy.\r\n */\r\n error: Error | null;\r\n}\r\n\r\n/**\r\n * Catches JavaScript errors in descendant client components and renders fallback UI.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Client component.\r\n *\r\n * React currently requires class components for error boundaries. This implementation\r\n * captures render-time and lifecycle errors, not asynchronous event handler exceptions,\r\n * and exposes a `reset()` pathway so callers can retry the failed subtree.\r\n *\r\n * @example\r\n * ```tsx\r\n * <ErrorBoundary\r\n * fallback={(error, reset) => (\r\n * <div>\r\n * <p>Error: {error.message}</p>\r\n * <button onClick={reset}>Try again</button>\r\n * </div>\r\n * )}>\r\n * <DashboardPanel />\r\n * </ErrorBoundary>\r\n * ```\r\n *\r\n * @see {@link ErrorBoundaryProps} for available props\r\n */\r\nclass ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {\r\n static getDerivedStateFromError(error: Error): ErrorBoundaryState {\r\n return {error};\r\n }\r\n\r\n static readonly displayName = \"ErrorBoundary\";\r\n\r\n constructor(props: ErrorBoundaryProps) {\r\n super(props);\r\n this.state = {error: null};\r\n }\r\n\r\n override shouldComponentUpdate(nextProps: Readonly<ErrorBoundaryProps>, nextState: Readonly<ErrorBoundaryState>): boolean {\r\n const {children, fallback, onError} = this.props;\r\n const {error} = this.state;\r\n\r\n return nextProps.children !== children || nextProps.fallback !== fallback || nextProps.onError !== onError || nextState.error !== error;\r\n }\r\n\r\n override componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void {\r\n const {onError} = this.props;\r\n\r\n onError?.(error, errorInfo);\r\n }\r\n\r\n handleReset = (): void => {\r\n // eslint-disable-next-line react/no-set-state -- Error boundaries must clear internal error state to retry rendering.\r\n this.setState({error: null});\r\n };\r\n\r\n // eslint-disable-next-line sonarjs/function-return-type -- Error boundary render paths intentionally return generic ReactNode content.\r\n override render(): React.ReactNode {\r\n const {error} = this.state;\r\n const {children, fallback} = this.props;\r\n const content: React.ReactNode =\r\n error === null\r\n ? children\r\n : typeof fallback === \"function\"\r\n ? fallback(error, this.handleReset)\r\n : (fallback ?? (\r\n <div\r\n className={styles.fallback}\r\n role='alert'>\r\n <p className={styles.title}>Something went wrong</p>\r\n <p className={styles.message}>{error.message}</p>\r\n <button\r\n type='button'\r\n className={styles.retry}\r\n onClick={this.handleReset}>\r\n Try again\r\n </button>\r\n </div>\r\n ));\r\n\r\n return content;\r\n }\r\n}\r\n\r\nexport {ErrorBoundary};\r\nexport type {ErrorBoundaryProps};\r\n"],"names":["ErrorBoundary","React","error","props","nextProps","nextState","children","fallback","onError","errorInfo","content","styles"],"mappings":";;;;AAmEA,MAAMA,sBAAsBC;IAC1B,OAAO,yBAAyBC,KA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+ {"version":3,"file":"components/ui/error-boundary.js","sources":["../../../src/components/ui/error-boundary.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport * as React from \"react\";\r\n\r\nimport styles from \"./error-boundary.module.css\";\r\n\r\n/**\r\n * Represents the configurable props for the {@link ErrorBoundary} component.\r\n *\r\n * @remarks\r\n * Accepts child content plus an optional fallback renderer and error callback for\r\n * recovery-oriented error handling in React client trees.\r\n */\r\ninterface ErrorBoundaryProps {\r\n /**\r\n * Content rendered when no error has been captured.\r\n */\r\n children: React.ReactNode;\r\n /**\r\n * Custom fallback UI or render function invoked with the current error and reset action.\r\n */\r\n fallback?: React.ReactNode | ((error: Error, reset: () => void) => React.ReactNode);\r\n /**\r\n * Callback invoked after an error has been captured.\r\n */\r\n onError?: (error: Error, errorInfo: React.ErrorInfo) => void;\r\n}\r\n\r\n/**\r\n * Represents the tracked state for the {@link ErrorBoundary} component.\r\n *\r\n * @remarks\r\n * Stores the most recent rendering error so the boundary can swap to fallback UI and\r\n * later clear that error when `reset()` is invoked.\r\n */\r\ninterface ErrorBoundaryState {\r\n /**\r\n * The latest captured error, or `null` when the subtree is healthy.\r\n */\r\n error: Error | null;\r\n}\r\n\r\n/**\r\n * Catches JavaScript errors in descendant client components and renders fallback UI.\r\n *\r\n * @remarks\r\n * **Rendering Context**: Client component.\r\n *\r\n * React currently requires class components for error boundaries. This implementation\r\n * captures render-time and lifecycle errors, not asynchronous event handler exceptions,\r\n * and exposes a `reset()` pathway so callers can retry the failed subtree.\r\n *\r\n * @example\r\n * ```tsx\r\n * <ErrorBoundary\r\n * fallback={(error, reset) => (\r\n * <div>\r\n * <p>Error: {error.message}</p>\r\n * <button onClick={reset}>Try again</button>\r\n * </div>\r\n * )}>\r\n * <DashboardPanel />\r\n * </ErrorBoundary>\r\n * ```\r\n *\r\n * @see {@link ErrorBoundaryProps} for available props\r\n */\r\nclass ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {\r\n static getDerivedStateFromError(error: Error): ErrorBoundaryState {\r\n return {error};\r\n }\r\n\r\n static readonly displayName = \"ErrorBoundary\";\r\n\r\n constructor(props: ErrorBoundaryProps) {\r\n super(props);\r\n this.state = {error: null};\r\n }\r\n\r\n override shouldComponentUpdate(nextProps: Readonly<ErrorBoundaryProps>, nextState: Readonly<ErrorBoundaryState>): boolean {\r\n const {children, fallback, onError} = this.props;\r\n const {error} = this.state;\r\n\r\n return nextProps.children !== children || nextProps.fallback !== fallback || nextProps.onError !== onError || nextState.error !== error;\r\n }\r\n\r\n override componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void {\r\n const {onError} = this.props;\r\n\r\n onError?.(error, errorInfo);\r\n }\r\n\r\n handleReset = (): void => {\r\n // eslint-disable-next-line react/no-set-state -- Error boundaries must clear internal error state to retry rendering.\r\n this.setState({error: null});\r\n };\r\n\r\n // eslint-disable-next-line sonarjs/function-return-type -- Error boundary render paths intentionally return generic ReactNode content.\r\n override render(): React.ReactNode {\r\n const {error} = this.state;\r\n const {children, fallback} = this.props;\r\n const content: React.ReactNode =\r\n error === null\r\n ? children\r\n : typeof fallback === \"function\"\r\n ? fallback(error, this.handleReset)\r\n : (fallback ?? (\r\n <div\r\n className={styles.fallback}\r\n role='alert'>\r\n <p className={styles.title}>Something went wrong</p>\r\n <p className={styles.message}>{error.message}</p>\r\n <button\r\n type='button'\r\n className={styles.retry}\r\n onClick={this.handleReset}>\r\n Try again\r\n </button>\r\n </div>\r\n ));\r\n\r\n return content;\r\n }\r\n}\r\n\r\nexport {ErrorBoundary};\r\nexport type {ErrorBoundaryProps};\r\n"],"names":["ErrorBoundary","React","error","props","nextProps","nextState","children","fallback","onError","errorInfo","content","styles"],"mappings":";;;;AAmEA,MAAMA,sBAAsBC,wBAAAA,SAAe;IACzC,OAAO,yBAAyBC,KAAY,EAAsB;QAChE,OAAO;YAACA;QAAK;IACf;;aAEgB,WAAW,GAAG;;IAE9B,YAAYC,KAAyB,CAAE;QACrC,KAAK,CAACA,QAAAA,IAAAA,CAiBR,WAAW,GAAG;YAEZ,IAAI,CAAC,QAAQ,CAAC;gBAAC,OAAO;YAAI;QAC5B;QAnBE,IAAI,CAAC,KAAK,GAAG;YAAC,OAAO;QAAI;IAC3B;IAES,sBAAsBC,SAAuC,EAAEC,SAAuC,EAAW;QACxH,MAAM,EAACC,QAAQ,EAAEC,QAAQ,EAAEC,OAAO,EAAC,GAAG,IAAI,CAAC,KAAK;QAChD,MAAM,EAACN,KAAK,EAAC,GAAG,IAAI,CAAC,KAAK;QAE1B,OAAOE,UAAU,QAAQ,KAAKE,YAAYF,UAAU,QAAQ,KAAKG,YAAYH,UAAU,OAAO,KAAKI,WAAWH,UAAU,KAAK,KAAKH;IACpI;IAES,kBAAkBA,KAAY,EAAEO,SAA0B,EAAQ;QACzE,MAAM,EAACD,OAAO,EAAC,GAAG,IAAI,CAAC,KAAK;QAE5BA,UAAUN,OAAOO;IACnB;IAQS,SAA0B;QACjC,MAAM,EAACP,KAAK,EAAC,GAAG,IAAI,CAAC,KAAK;QAC1B,MAAM,EAACI,QAAQ,EAAEC,QAAQ,EAAC,GAAG,IAAI,CAAC,KAAK;QACvC,MAAMG,UACJR,AAAU,SAAVA,QACII,WACA,AAAoB,cAApB,OAAOC,WACLA,SAASL,OAAO,IAAI,CAAC,WAAW,IAC/BK,YAAY,WAAZA,GACC,KAAC;YACC,WAAWI,sBAAAA,QAAe;YAC1B,MAAK;;8BACL,IAAC;oBAAE,WAAWA,sBAAAA,KAAY;8BAAE;;8BAC5B,IAAC;oBAAE,WAAWA,sBAAAA,OAAc;8BAAGT,MAAM,OAAO;;8BAC5C,IAAC;oBACC,MAAK;oBACL,WAAWS,sBAAAA,KAAY;oBACvB,SAAS,IAAI,CAAC,WAAW;8BAAE;;;;QAMzC,OAAOD;IACT;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://./home/runner/work/arolariu.ro/arolariu.ro/packages/components/src/components/ui/error-boundary.module.css","webpack://./src/components/ui/error-boundary.module.css"],"names":[],"mappings":"AADA;ECEE,mBAAmB;EACnB,sBAAsB;EACtB,0BAA0B;EAC1B,kBAAkB;EAClB,sBAAsB;EACtB,uBAAuB;EACvB,aAAa;AACf;;AAEA;EACE,4BAA4B;EAC5B,4BAA4B;EAC5B,gBAAgB;AAClB;;AAEA;EACE,iCAAiC;EACjC,gBAAgB;AAClB;;AAEA;EACE,4BAA4B;AAC9B;;AAEA;EACE,sCAAsC;EACtC,kCAAkC;EAClC,kCAAkC;EAClC,2BAA2B;EAC3B,eAAe;EACf,4CAA4C;EAC5C,sDAAsD;AACxD;;AAEA;EACE,kCAAkC;AACpC","sourcesContent":[".fallback{align-items:center;display:flex;flex-direction:column;gap:var(--ac-space-3);justify-content:center;padding:var(--ac-space-8);text-align:center}.title{color:var(--ac-destructive);font-size:var(--ac-text-lg);font-weight:600}.message{color:var(--ac-muted-foreground);max-width:32rem}.message,.retry{font-size:var(--ac-text-sm)}.retry{background-color:var(--ac-background);border:1px solid var(--ac-border);border-radius:var(--ac-radius-md);color:var(--ac-foreground);cursor:pointer;padding:var(--ac-space-2) var(--ac-space-4);transition:background-color var(--ac-transition-fast)}.retry:hover{background-color:var(--ac-accent)}",".fallback {\n align-items: center;\n gap: var(--ac-space-3);\n padding: var(--ac-space-8);\n text-align: center;\n flex-direction: column;\n justify-content: center;\n display: flex;\n}\n\n.title {\n color: var(--ac-destructive);\n font-size: var(--ac-text-lg);\n font-weight: 600;\n}\n\n.message {\n color: var(--ac-muted-foreground);\n max-width: 32rem;\n}\n\n.message, .retry {\n font-size: var(--ac-text-sm);\n}\n\n.retry {\n background-color: var(--ac-background);\n border: 1px solid var(--ac-border);\n border-radius: var(--ac-radius-md);\n color: var(--ac-foreground);\n cursor: pointer;\n padding: var(--ac-space-2) var(--ac-space-4);\n transition: background-color var(--ac-transition-fast);\n}\n\n.retry:hover {\n background-color: var(--ac-accent);\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/error-boundary.module.css","webpack://./src/components/ui/error-boundary.module.css"],"names":[],"mappings":"AAAA;ECCE,mBAAmB;EACnB,sBAAsB;EACtB,0BAA0B;EAC1B,kBAAkB;EAClB,sBAAsB;EACtB,uBAAuB;EACvB,aAAa;AACf;;ADRyJ;ECWvJ,4BAA4B;EAC5B,4BAA4B;EAC5B,gBAAgB;AAClB;;ADdwO;ECiBtO,iCAAiC;EACjC,gBAAgB;AAClB;;ADnBkS;ECsBhS,4BAA4B;AAC9B;;ADvB8U;EC0B5U,sCAAsC;EACtC,kCAAkC;EAClC,kCAAkC;EAClC,2BAA2B;EAC3B,eAAe;EACf,4CAA4C;EAC5C,sDAAsD;AACxD;;ADjC2kB;ECoCzkB,kCAAkC;AACpC","sourcesContent":[".fallback{align-items:center;display:flex;flex-direction:column;gap:var(--ac-space-3);justify-content:center;padding:var(--ac-space-8);text-align:center}.title{color:var(--ac-destructive);font-size:var(--ac-text-lg);font-weight:600}.message{color:var(--ac-muted-foreground);max-width:32rem}.message,.retry{font-size:var(--ac-text-sm)}.retry{background-color:var(--ac-background);border:1px solid var(--ac-border);border-radius:var(--ac-radius-md);color:var(--ac-foreground);cursor:pointer;padding:var(--ac-space-2) var(--ac-space-4);transition:background-color var(--ac-transition-fast)}.retry:hover{background-color:var(--ac-accent)}",".fallback {\n align-items: center;\n gap: var(--ac-space-3);\n padding: var(--ac-space-8);\n text-align: center;\n flex-direction: column;\n justify-content: center;\n display: flex;\n}\n\n.title {\n color: var(--ac-destructive);\n font-size: var(--ac-text-lg);\n font-weight: 600;\n}\n\n.message {\n color: var(--ac-muted-foreground);\n max-width: 32rem;\n}\n\n.message, .retry {\n font-size: var(--ac-text-sm);\n}\n\n.retry {\n background-color: var(--ac-background);\n border: 1px solid var(--ac-border);\n border-radius: var(--ac-radius-md);\n color: var(--ac-foreground);\n cursor: pointer;\n padding: var(--ac-space-2) var(--ac-space-4);\n transition: background-color var(--ac-transition-fast);\n}\n\n.retry:hover {\n background-color: var(--ac-accent);\n}\n"],"sourceRoot":""}
@@ -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,EA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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,G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AMA;;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 +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,aAA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AAS;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;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K72D,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,MAAM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AeqB;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;QACA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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":""}