@arolariu/components 0.1.2 → 0.3.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 (360) hide show
  1. package/DEBUGGING.md +396 -396
  2. package/LICENSE.md +21 -21
  3. package/changelog.md +120 -118
  4. package/dist/components/ui/accordion.d.ts +6 -6
  5. package/dist/components/ui/accordion.d.ts.map +1 -1
  6. package/dist/components/ui/accordion.js +20 -28
  7. package/dist/components/ui/accordion.js.map +1 -1
  8. package/dist/components/ui/alert-dialog.d.ts +19 -13
  9. package/dist/components/ui/alert-dialog.d.ts.map +1 -1
  10. package/dist/components/ui/alert-dialog.js +40 -63
  11. package/dist/components/ui/alert-dialog.js.map +1 -1
  12. package/dist/components/ui/alert.d.ts +7 -8
  13. package/dist/components/ui/alert.d.ts.map +1 -1
  14. package/dist/components/ui/alert.js +18 -21
  15. package/dist/components/ui/alert.js.map +1 -1
  16. package/dist/components/ui/aspect-ratio.d.ts +1 -2
  17. package/dist/components/ui/aspect-ratio.d.ts.map +1 -1
  18. package/dist/components/ui/aspect-ratio.js +1 -8
  19. package/dist/components/ui/aspect-ratio.js.map +1 -1
  20. package/dist/components/ui/avatar.d.ts +5 -5
  21. package/dist/components/ui/avatar.d.ts.map +1 -1
  22. package/dist/components/ui/avatar.js +17 -20
  23. package/dist/components/ui/avatar.js.map +1 -1
  24. package/dist/components/ui/background-beams.d.ts.map +1 -1
  25. package/dist/components/ui/background-beams.js +6 -6
  26. package/dist/components/ui/background-beams.js.map +1 -1
  27. package/dist/components/ui/badge.d.ts +7 -7
  28. package/dist/components/ui/badge.d.ts.map +1 -1
  29. package/dist/components/ui/badge.js +9 -12
  30. package/dist/components/ui/badge.js.map +1 -1
  31. package/dist/components/ui/breadcrumb.d.ts +17 -9
  32. package/dist/components/ui/breadcrumb.d.ts.map +1 -1
  33. package/dist/components/ui/breadcrumb.js +32 -39
  34. package/dist/components/ui/breadcrumb.js.map +1 -1
  35. package/dist/components/ui/bubble-background.d.ts +1 -1
  36. package/dist/components/ui/bubble-background.d.ts.map +1 -1
  37. package/dist/components/ui/bubble-background.js +13 -13
  38. package/dist/components/ui/bubble-background.js.map +1 -1
  39. package/dist/components/ui/button-group.d.ts +13 -0
  40. package/dist/components/ui/button-group.d.ts.map +1 -0
  41. package/dist/components/ui/button-group.js +47 -0
  42. package/dist/components/ui/button-group.js.map +1 -0
  43. package/dist/components/ui/button.d.ts +8 -7
  44. package/dist/components/ui/button.d.ts.map +1 -1
  45. package/dist/components/ui/button.js +16 -15
  46. package/dist/components/ui/button.js.map +1 -1
  47. package/dist/components/ui/calendar.d.ts.map +1 -1
  48. package/dist/components/ui/calendar.js +22 -22
  49. package/dist/components/ui/calendar.js.map +1 -1
  50. package/dist/components/ui/card.d.ts +7 -8
  51. package/dist/components/ui/card.d.ts.map +1 -1
  52. package/dist/components/ui/card.js +33 -46
  53. package/dist/components/ui/card.js.map +1 -1
  54. package/dist/components/ui/carousel.d.ts +7 -8
  55. package/dist/components/ui/carousel.d.ts.map +1 -1
  56. package/dist/components/ui/carousel.js +30 -21
  57. package/dist/components/ui/carousel.js.map +1 -1
  58. package/dist/components/ui/chart.d.ts +37 -29
  59. package/dist/components/ui/chart.d.ts.map +1 -1
  60. package/dist/components/ui/chart.js +29 -27
  61. package/dist/components/ui/chart.js.map +1 -1
  62. package/dist/components/ui/checkbox.d.ts +2 -2
  63. package/dist/components/ui/checkbox.d.ts.map +1 -1
  64. package/dist/components/ui/checkbox.js +11 -13
  65. package/dist/components/ui/checkbox.js.map +1 -1
  66. package/dist/components/ui/collapsible.d.ts +4 -5
  67. package/dist/components/ui/collapsible.d.ts.map +1 -1
  68. package/dist/components/ui/collapsible.js +3 -20
  69. package/dist/components/ui/collapsible.js.map +1 -1
  70. package/dist/components/ui/command.d.ts +79 -17
  71. package/dist/components/ui/command.d.ts.map +1 -1
  72. package/dist/components/ui/command.js +52 -77
  73. package/dist/components/ui/command.js.map +1 -1
  74. package/dist/components/ui/context-menu.d.ts +23 -21
  75. package/dist/components/ui/context-menu.d.ts.map +1 -1
  76. package/dist/components/ui/context-menu.js +60 -104
  77. package/dist/components/ui/context-menu.js.map +1 -1
  78. package/dist/components/ui/counting-number.d.ts +1 -1
  79. package/dist/components/ui/counting-number.d.ts.map +1 -1
  80. package/dist/components/ui/counting-number.js +4 -3
  81. package/dist/components/ui/counting-number.js.map +1 -1
  82. package/dist/components/ui/dialog.d.ts +17 -13
  83. package/dist/components/ui/dialog.d.ts.map +1 -1
  84. package/dist/components/ui/dialog.js +38 -66
  85. package/dist/components/ui/dialog.js.map +1 -1
  86. package/dist/components/ui/dot-background.d.ts +10 -17
  87. package/dist/components/ui/dot-background.d.ts.map +1 -1
  88. package/dist/components/ui/dot-background.js +2 -2
  89. package/dist/components/ui/dot-background.js.map +1 -1
  90. package/dist/components/ui/drawer.d.ts +20 -11
  91. package/dist/components/ui/drawer.d.ts.map +1 -1
  92. package/dist/components/ui/drawer.js +37 -62
  93. package/dist/components/ui/drawer.js.map +1 -1
  94. package/dist/components/ui/dropdown-menu.d.ts +23 -21
  95. package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
  96. package/dist/components/ui/dropdown-menu.js +65 -109
  97. package/dist/components/ui/dropdown-menu.js.map +1 -1
  98. package/dist/components/ui/dropdrawer.d.ts +3 -3
  99. package/dist/components/ui/dropdrawer.d.ts.map +1 -1
  100. package/dist/components/ui/dropdrawer.js +13 -16
  101. package/dist/components/ui/dropdrawer.js.map +1 -1
  102. package/dist/components/ui/empty.d.ts +13 -0
  103. package/dist/components/ui/empty.d.ts.map +1 -0
  104. package/dist/components/ui/empty.js +65 -0
  105. package/dist/components/ui/empty.js.map +1 -0
  106. package/dist/components/ui/field.d.ts +25 -0
  107. package/dist/components/ui/field.d.ts.map +1 -0
  108. package/dist/components/ui/field.js +135 -0
  109. package/dist/components/ui/field.js.map +1 -0
  110. package/dist/components/ui/fireworks-background.d.ts.map +1 -1
  111. package/dist/components/ui/fireworks-background.js +1 -1
  112. package/dist/components/ui/fireworks-background.js.map +1 -1
  113. package/dist/components/ui/flip-button.d.ts +1 -1
  114. package/dist/components/ui/flip-button.d.ts.map +1 -1
  115. package/dist/components/ui/flip-button.js +3 -3
  116. package/dist/components/ui/flip-button.js.map +1 -1
  117. package/dist/components/ui/form.d.ts +7 -8
  118. package/dist/components/ui/form.d.ts.map +1 -1
  119. package/dist/components/ui/form.js +29 -28
  120. package/dist/components/ui/form.js.map +1 -1
  121. package/dist/components/ui/gradient-background.d.ts +1 -1
  122. package/dist/components/ui/gradient-background.d.ts.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-text.d.ts +1 -1
  126. package/dist/components/ui/gradient-text.d.ts.map +1 -1
  127. package/dist/components/ui/gradient-text.js +5 -5
  128. package/dist/components/ui/gradient-text.js.map +1 -1
  129. package/dist/components/ui/highlight-text.d.ts +1 -1
  130. package/dist/components/ui/highlight-text.d.ts.map +1 -1
  131. package/dist/components/ui/highlight-text.js +3 -3
  132. package/dist/components/ui/highlight-text.js.map +1 -1
  133. package/dist/components/ui/hole-background.d.ts.map +1 -1
  134. package/dist/components/ui/hole-background.js +11 -10
  135. package/dist/components/ui/hole-background.js.map +1 -1
  136. package/dist/components/ui/hover-card.d.ts +5 -5
  137. package/dist/components/ui/hover-card.d.ts.map +1 -1
  138. package/dist/components/ui/hover-card.js +12 -26
  139. package/dist/components/ui/hover-card.js.map +1 -1
  140. package/dist/components/ui/input-group.d.ts +17 -0
  141. package/dist/components/ui/input-group.d.ts.map +1 -0
  142. package/dist/components/ui/input-group.js +91 -0
  143. package/dist/components/ui/input-group.js.map +1 -0
  144. package/dist/components/ui/input-otp.d.ts +31 -8
  145. package/dist/components/ui/input-otp.d.ts.map +1 -1
  146. package/dist/components/ui/input-otp.js +24 -27
  147. package/dist/components/ui/input-otp.js.map +1 -1
  148. package/dist/components/ui/input.d.ts +1 -1
  149. package/dist/components/ui/input.d.ts.map +1 -1
  150. package/dist/components/ui/input.js +7 -8
  151. package/dist/components/ui/input.js.map +1 -1
  152. package/dist/components/ui/item.d.ts +24 -0
  153. package/dist/components/ui/item.d.ts.map +1 -0
  154. package/dist/components/ui/item.js +122 -0
  155. package/dist/components/ui/item.js.map +1 -0
  156. package/dist/components/ui/kbd.d.ts +5 -0
  157. package/dist/components/ui/kbd.d.ts.map +1 -0
  158. package/dist/components/ui/kbd.js +21 -0
  159. package/dist/components/ui/kbd.js.map +1 -0
  160. package/dist/components/ui/label.d.ts +3 -2
  161. package/dist/components/ui/label.d.ts.map +1 -1
  162. package/dist/components/ui/label.js +9 -8
  163. package/dist/components/ui/label.js.map +1 -1
  164. package/dist/components/ui/menubar.d.ts +20 -18
  165. package/dist/components/ui/menubar.d.ts.map +1 -1
  166. package/dist/components/ui/menubar.js +75 -95
  167. package/dist/components/ui/menubar.js.map +1 -1
  168. package/dist/components/ui/navigation-menu.d.ts +11 -13
  169. package/dist/components/ui/navigation-menu.d.ts.map +1 -1
  170. package/dist/components/ui/navigation-menu.js +39 -58
  171. package/dist/components/ui/navigation-menu.js.map +1 -1
  172. package/dist/components/ui/pagination.d.ts +25 -10
  173. package/dist/components/ui/pagination.d.ts.map +1 -1
  174. package/dist/components/ui/pagination.js +33 -41
  175. package/dist/components/ui/pagination.js.map +1 -1
  176. package/dist/components/ui/popover.d.ts +6 -6
  177. package/dist/components/ui/popover.d.ts.map +1 -1
  178. package/dist/components/ui/popover.js +10 -26
  179. package/dist/components/ui/popover.js.map +1 -1
  180. package/dist/components/ui/progress.d.ts +2 -2
  181. package/dist/components/ui/progress.d.ts.map +1 -1
  182. package/dist/components/ui/progress.js +8 -10
  183. package/dist/components/ui/progress.js.map +1 -1
  184. package/dist/components/ui/radio-group.d.ts +3 -3
  185. package/dist/components/ui/radio-group.d.ts.map +1 -1
  186. package/dist/components/ui/radio-group.js +17 -20
  187. package/dist/components/ui/radio-group.js.map +1 -1
  188. package/dist/components/ui/resizable.d.ts +21 -6
  189. package/dist/components/ui/resizable.d.ts.map +1 -1
  190. package/dist/components/ui/resizable.js +9 -21
  191. package/dist/components/ui/resizable.js.map +1 -1
  192. package/dist/components/ui/ripple-button.d.ts +1 -1
  193. package/dist/components/ui/ripple-button.d.ts.map +1 -1
  194. package/dist/components/ui/ripple-button.js +4 -4
  195. package/dist/components/ui/ripple-button.js.map +1 -1
  196. package/dist/components/ui/scratcher.d.ts.map +1 -1
  197. package/dist/components/ui/scratcher.js +7 -5
  198. package/dist/components/ui/scratcher.js.map +1 -1
  199. package/dist/components/ui/scroll-area.d.ts +3 -3
  200. package/dist/components/ui/scroll-area.d.ts.map +1 -1
  201. package/dist/components/ui/scroll-area.js +14 -18
  202. package/dist/components/ui/scroll-area.js.map +1 -1
  203. package/dist/components/ui/select.d.ts +11 -13
  204. package/dist/components/ui/select.d.ts.map +1 -1
  205. package/dist/components/ui/select.js +55 -78
  206. package/dist/components/ui/select.js.map +1 -1
  207. package/dist/components/ui/separator.d.ts +2 -2
  208. package/dist/components/ui/separator.d.ts.map +1 -1
  209. package/dist/components/ui/separator.js +7 -8
  210. package/dist/components/ui/separator.js.map +1 -1
  211. package/dist/components/ui/sheet.d.ts +24 -12
  212. package/dist/components/ui/sheet.d.ts.map +1 -1
  213. package/dist/components/ui/sheet.js +56 -68
  214. package/dist/components/ui/sheet.js.map +1 -1
  215. package/dist/components/ui/sidebar.d.ts +35 -39
  216. package/dist/components/ui/sidebar.d.ts.map +1 -1
  217. package/dist/components/ui/sidebar.js +115 -124
  218. package/dist/components/ui/sidebar.js.map +1 -1
  219. package/dist/components/ui/skeleton.d.ts +1 -1
  220. package/dist/components/ui/skeleton.d.ts.map +1 -1
  221. package/dist/components/ui/skeleton.js +2 -3
  222. package/dist/components/ui/skeleton.js.map +1 -1
  223. package/dist/components/ui/slider.d.ts +2 -2
  224. package/dist/components/ui/slider.d.ts.map +1 -1
  225. package/dist/components/ui/slider.js +12 -31
  226. package/dist/components/ui/slider.js.map +1 -1
  227. package/dist/components/ui/sonner.d.ts +4 -2
  228. package/dist/components/ui/sonner.d.ts.map +1 -1
  229. package/dist/components/ui/sonner.js +8 -5
  230. package/dist/components/ui/sonner.js.map +1 -1
  231. package/dist/components/ui/spinner.d.ts +4 -0
  232. package/dist/components/ui/spinner.d.ts.map +1 -0
  233. package/dist/components/ui/spinner.js +16 -0
  234. package/dist/components/ui/spinner.js.map +1 -0
  235. package/dist/components/ui/switch.d.ts +2 -2
  236. package/dist/components/ui/switch.d.ts.map +1 -1
  237. package/dist/components/ui/switch.js +8 -10
  238. package/dist/components/ui/switch.js.map +1 -1
  239. package/dist/components/ui/table.d.ts +9 -9
  240. package/dist/components/ui/table.d.ts.map +1 -1
  241. package/dist/components/ui/table.js +40 -49
  242. package/dist/components/ui/table.js.map +1 -1
  243. package/dist/components/ui/tabs.d.ts +6 -6
  244. package/dist/components/ui/tabs.d.ts.map +1 -1
  245. package/dist/components/ui/tabs.js +18 -27
  246. package/dist/components/ui/tabs.js.map +1 -1
  247. package/dist/components/ui/textarea.d.ts +1 -1
  248. package/dist/components/ui/textarea.d.ts.map +1 -1
  249. package/dist/components/ui/textarea.js +7 -8
  250. package/dist/components/ui/textarea.js.map +1 -1
  251. package/dist/components/ui/toggle-group.d.ts +9 -4
  252. package/dist/components/ui/toggle-group.d.ts.map +1 -1
  253. package/dist/components/ui/toggle-group.js +12 -16
  254. package/dist/components/ui/toggle-group.js.map +1 -1
  255. package/dist/components/ui/toggle.d.ts +9 -6
  256. package/dist/components/ui/toggle.d.ts.map +1 -1
  257. package/dist/components/ui/toggle.js +8 -9
  258. package/dist/components/ui/toggle.js.map +1 -1
  259. package/dist/components/ui/tooltip.d.ts +6 -6
  260. package/dist/components/ui/tooltip.d.ts.map +1 -1
  261. package/dist/components/ui/tooltip.js +14 -39
  262. package/dist/components/ui/tooltip.js.map +1 -1
  263. package/dist/components/ui/typewriter.d.ts.map +1 -1
  264. package/dist/components/ui/typewriter.js +9 -9
  265. package/dist/components/ui/typewriter.js.map +1 -1
  266. package/dist/hooks/useIsMobile.d.ts +2 -5
  267. package/dist/hooks/useIsMobile.d.ts.map +1 -1
  268. package/dist/hooks/useIsMobile.js +1 -1
  269. package/dist/hooks/useIsMobile.js.map +1 -1
  270. package/dist/hooks/useWindowSize.d.ts +0 -1
  271. package/dist/hooks/useWindowSize.d.ts.map +1 -1
  272. package/dist/hooks/useWindowSize.js +1 -1
  273. package/dist/hooks/useWindowSize.js.map +1 -1
  274. package/dist/index.css +841 -1128
  275. package/dist/index.css.map +1 -1
  276. package/dist/index.d.ts +43 -37
  277. package/dist/index.d.ts.map +1 -1
  278. package/dist/index.js +11 -5
  279. package/dist/lib/utilities.d.ts +9 -0
  280. package/dist/lib/utilities.d.ts.map +1 -0
  281. package/dist/lib/{utils.js → utilities.js} +1 -1
  282. package/dist/lib/utilities.js.map +1 -0
  283. package/package.json +121 -90
  284. package/{README.md → readme.md} +627 -627
  285. package/src/components/ui/accordion.tsx +55 -66
  286. package/src/components/ui/alert-dialog.tsx +124 -160
  287. package/src/components/ui/alert.tsx +56 -69
  288. package/src/components/ui/aspect-ratio.tsx +7 -12
  289. package/src/components/ui/avatar.tsx +43 -53
  290. package/src/components/ui/background-beams.tsx +145 -142
  291. package/src/components/ui/badge.tsx +39 -48
  292. package/src/components/ui/breadcrumb.tsx +94 -117
  293. package/src/components/ui/bubble-background.tsx +170 -189
  294. package/src/components/ui/button-group.tsx +69 -0
  295. package/src/components/ui/button.tsx +55 -61
  296. package/src/components/ui/calendar.tsx +175 -216
  297. package/src/components/ui/card.tsx +64 -97
  298. package/src/components/ui/carousel.tsx +216 -241
  299. package/src/components/ui/chart.tsx +293 -385
  300. package/src/components/ui/checkbox.tsx +27 -32
  301. package/src/components/ui/collapsible.tsx +11 -34
  302. package/src/components/ui/command.tsx +138 -184
  303. package/src/components/ui/context-menu.tsx +186 -255
  304. package/src/components/ui/counting-number.tsx +92 -108
  305. package/src/components/ui/dialog.tsx +106 -146
  306. package/src/components/ui/dot-background.tsx +153 -158
  307. package/src/components/ui/drawer.tsx +105 -141
  308. package/src/components/ui/dropdown-menu.tsx +188 -260
  309. package/src/components/ui/dropdrawer.tsx +865 -973
  310. package/src/components/ui/empty.tsx +86 -0
  311. package/src/components/ui/field.tsx +198 -0
  312. package/src/components/ui/fireworks-background.tsx +325 -378
  313. package/src/components/ui/flip-button.tsx +89 -110
  314. package/src/components/ui/form.tsx +144 -174
  315. package/src/components/ui/gradient-background.tsx +30 -43
  316. package/src/components/ui/gradient-text.tsx +62 -65
  317. package/src/components/ui/highlight-text.tsx +54 -71
  318. package/src/components/ui/hole-background.tsx +326 -361
  319. package/src/components/ui/hover-card.tsx +29 -44
  320. package/src/components/ui/input-group.tsx +145 -0
  321. package/src/components/ui/input-otp.tsx +66 -77
  322. package/src/components/ui/input.tsx +21 -22
  323. package/src/components/ui/item.tsx +163 -0
  324. package/src/components/ui/kbd.tsx +31 -0
  325. package/src/components/ui/label.tsx +23 -24
  326. package/src/components/ui/menubar.tsx +233 -279
  327. package/src/components/ui/navigation-menu.tsx +120 -171
  328. package/src/components/ui/pagination.tsx +92 -129
  329. package/src/components/ui/popover.tsx +33 -48
  330. package/src/components/ui/progress.tsx +24 -31
  331. package/src/components/ui/radio-group.tsx +43 -45
  332. package/src/components/ui/resizable.tsx +38 -56
  333. package/src/components/ui/ripple-button.tsx +90 -111
  334. package/src/components/ui/scratcher.tsx +167 -171
  335. package/src/components/ui/scroll-area.tsx +42 -58
  336. package/src/components/ui/select.tsx +145 -191
  337. package/src/components/ui/separator.tsx +26 -28
  338. package/src/components/ui/sheet.tsx +112 -145
  339. package/src/components/ui/sidebar.tsx +664 -729
  340. package/src/components/ui/skeleton.tsx +15 -19
  341. package/src/components/ui/slider.tsx +23 -63
  342. package/src/components/ui/sonner.tsx +36 -26
  343. package/src/components/ui/spinner.tsx +18 -0
  344. package/src/components/ui/switch.tsx +28 -31
  345. package/src/components/ui/table.tsx +93 -119
  346. package/src/components/ui/tabs.tsx +54 -66
  347. package/src/components/ui/textarea.tsx +21 -20
  348. package/src/components/ui/toggle-group.tsx +53 -73
  349. package/src/components/ui/toggle.tsx +44 -47
  350. package/src/components/ui/tooltip.tsx +32 -61
  351. package/src/components/ui/typewriter.tsx +173 -188
  352. package/src/hooks/useIsMobile.tsx +42 -45
  353. package/src/hooks/useWindowSize.tsx +66 -72
  354. package/src/index.css +67 -67
  355. package/src/index.ts +342 -408
  356. package/src/lib/utilities.ts +12 -0
  357. package/dist/lib/utils.d.ts +0 -7
  358. package/dist/lib/utils.d.ts.map +0 -1
  359. package/dist/lib/utils.js.map +0 -1
  360. package/src/lib/utils.ts +0 -10
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
1
  import { type HTMLMotionProps, type Transition } from "motion/react";
2
+ import * as React from "react";
3
3
  type FlipDirection = "top" | "bottom" | "left" | "righ";
4
4
  interface FlipButtonProps extends HTMLMotionProps<"button"> {
5
5
  frontText: string;
@@ -1 +1 @@
1
- {"version":3,"file":"flip-button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/flip-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,UAAU,EAGhB,MAAM,cAAc,CAAC;AAItB,KAAK,aAAa,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAExD,UAAU,eAAgB,SAAQ,eAAe,CAAC,QAAQ,CAAC;IACzD,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAKD,QAAA,MAAM,UAAU,wGA+Ef,CAAC;AAIF,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,KAAK,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"flip-button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/flip-button.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,KAAK,eAAe,EAAE,KAAK,UAAU,EAAuB,MAAM,cAAc,CAAC;AACzF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,KAAK,aAAa,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAExD,UAAU,eAAgB,SAAQ,eAAe,CAAC,QAAQ,CAAC;IACzD,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAID,QAAA,MAAM,UAAU,wGAgEf,CAAC;AAIF,OAAO,EAAC,UAAU,EAAE,KAAK,eAAe,EAAE,KAAK,aAAa,EAAC,CAAC"}
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { forwardRef } from "react";
4
3
  import { motion } from "motion/react";
5
- import { cn } from "../../lib/utils.js";
4
+ import { forwardRef } from "react";
5
+ import { cn } from "../../lib/utilities.js";
6
6
  const defaultSpanClassName = "absolute inset-0 flex items-center justify-center rounded-lg";
7
7
  const FlipButton = /*#__PURE__*/ forwardRef(({ frontText, backText, transition = {
8
8
  type: "spring",
@@ -38,7 +38,7 @@ const FlipButton = /*#__PURE__*/ forwardRef(({ frontText, backText, transition =
38
38
  whileTap: {
39
39
  scale: 0.95
40
40
  },
41
- className: cn("relative inline-block h-10 px-4 py-2 text-sm font-medium cursor-pointer perspective-[1000px] focus:outline-none", className),
41
+ className: cn("relative inline-block h-10 cursor-pointer px-4 py-2 text-sm font-medium perspective-[1000px] focus:outline-none", className),
42
42
  ...props,
43
43
  children: [
44
44
  /*#__PURE__*/ jsx(motion.span, {
@@ -1 +1 @@
1
- {"version":3,"file":"components\\ui\\flip-button.js","sources":["webpack://@arolariu/components/./src/components/ui/flip-button.tsx"],"sourcesContent":["\n\nimport * as React from \"react\";\nimport {\n type HTMLMotionProps,\n type Transition,\n type Variant,\n motion,\n} from \"motion/react\";\n\nimport { cn } from \"@/lib/utils\";\n\ntype FlipDirection = \"top\" | \"bottom\" | \"left\" | \"righ\";\n\ninterface FlipButtonProps extends HTMLMotionProps<\"button\"> {\n frontText: string;\n backText: string;\n transition?: Transition;\n frontClassName?: string;\n backClassName?: string;\n from?: FlipDirection;\n}\n\nconst defaultSpanClassName =\n \"absolute inset-0 flex items-center justify-center rounded-lg\";\n\nconst FlipButton = React.forwardRef<HTMLButtonElement, FlipButtonProps>(\n (\n {\n frontText,\n backText,\n transition = { type: \"spring\", stiffness: 280, damping: 20 },\n className,\n frontClassName,\n backClassName,\n from = \"top\",\n ...props\n },\n ref,\n ) => {\n const isVertical = from === \"top\" || from === \"bottom\";\n const rotateAxis = isVertical ? \"rotateX\" : \"rotateY\";\n\n const frontOffset = from === \"top\" || from === \"left\" ? \"50%\" : \"-50%\";\n const backOffset = from === \"top\" || from === \"left\" ? \"-50%\" : \"50%\";\n\n const buildVariant = (\n opacity: number,\n rotation: number,\n offset: string | null = null,\n ): Variant => ({\n opacity,\n [rotateAxis]: rotation,\n ...(isVertical && offset !== null ? { y: offset } : {}),\n ...(!isVertical && offset !== null ? { x: offset } : {}),\n });\n\n const frontVariants = {\n initial: buildVariant(1, 0, \"0%\"),\n hover: buildVariant(0, 90, frontOffset),\n };\n\n const backVariants = {\n initial: buildVariant(0, 90, backOffset),\n hover: buildVariant(1, 0, \"0%\"),\n };\n\n return (\n <motion.button\n ref={ref}\n initial=\"initial\"\n whileHover=\"hover\"\n whileTap={{ scale: 0.95 }}\n className={cn(\n \"relative inline-block h-10 px-4 py-2 text-sm font-medium cursor-pointer perspective-[1000px] focus:outline-none\",\n className,\n )}\n {...props}\n >\n <motion.span\n variants={frontVariants}\n transition={transition}\n className={cn(\n defaultSpanClassName,\n \"bg-muted text-black dark:text-white\",\n frontClassName,\n )}\n >\n {frontText}\n </motion.span>\n <motion.span\n variants={backVariants}\n transition={transition}\n className={cn(\n defaultSpanClassName,\n \"bg-primary text-primary-foreground\",\n backClassName,\n )}\n >\n {backText}\n </motion.span>\n <span className=\"invisible\">{frontText}</span>\n </motion.button>\n );\n },\n);\n\nFlipButton.displayName = \"FlipButton\";\n\nexport { FlipButton, type FlipButtonProps, type FlipDirection };\n"],"names":["defaultSpanClassName","FlipButton","React","frontText","backText","transition","className","frontClassName","backClassName","from","props","ref","isVertical","rotateAxis","frontOffset","backOffset","buildVariant","opacity","rotation","offset","frontVariants","backVariants","motion","cn"],"mappings":";;;;;AAuBA,MAAMA,uBACJ;AAEF,MAAMC,aAAa,WAAbA,GAAaC,WACjB,CACE,EACEC,SAAS,EACTC,QAAQ,EACRC,aAAa;IAAE,MAAM;IAAU,WAAW;IAAK,SAAS;AAAG,CAAC,EAC5DC,SAAS,EACTC,cAAc,EACdC,aAAa,EACbC,OAAO,KAAK,EACZ,GAAGC,OACJ,EACDC;IAEA,MAAMC,aAAaH,UAAAA,QAAkBA,aAAAA;IACrC,MAAMI,aAAaD,aAAa,YAAY;IAE5C,MAAME,cAAcL,UAAAA,QAAkBA,WAAAA,OAAkB,QAAQ;IAChE,MAAMM,aAAaN,UAAAA,QAAkBA,WAAAA,OAAkB,SAAS;IAEhE,MAAMO,eAAe,CACnBC,SACAC,UACAC,SAAwB,IAAI,GACf;YACbF;YACA,CAACJ,WAAW,EAAEK;YACd,GAAIN,cAAcO,SAAAA,SAAkB;gBAAE,GAAGA;YAAO,IAAI,CAAC,CAAC;YACtD,GAAI,CAACP,cAAcO,SAAAA,SAAkB;gBAAE,GAAGA;YAAO,IAAI,CAAC,CAAC;QACzD;IAEA,MAAMC,gBAAgB;QACpB,SAASJ,aAAa,GAAG,GAAG;QAC5B,OAAOA,aAAa,GAAG,IAAIF;IAC7B;IAEA,MAAMO,eAAe;QACnB,SAASL,aAAa,GAAG,IAAID;QAC7B,OAAOC,aAAa,GAAG,GAAG;IAC5B;IAEA,OAAO,WAAP,GACE,KAACM,OAAO,MAAM;QACZ,KAAKX;QACL,SAAQ;QACR,YAAW;QACX,UAAU;YAAE,OAAO;QAAK;QACxB,WAAWY,GACT,mHACAjB;QAED,GAAGI,KAAK;;0BAET,IAACY,OAAO,IAAI;gBACV,UAAUF;gBACV,YAAYf;gBACZ,WAAWkB,GACTvB,sBACA,uCACAO;0BAGDJ;;0BAEH,IAACmB,OAAO,IAAI;gBACV,UAAUD;gBACV,YAAYhB;gBACZ,WAAWkB,GACTvB,sBACA,sCACAQ;0BAGDJ;;0BAEH,IAAC;gBAAK,WAAU;0BAAaD;;;;AAGnC;AAGFF,WAAW,WAAW,GAAG"}
1
+ {"version":3,"file":"components\\ui\\flip-button.js","sources":["webpack://@arolariu/components/./src/components/ui/flip-button.tsx"],"sourcesContent":["\r\n\r\nimport {type HTMLMotionProps, type Transition, type Variant, motion} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\ntype FlipDirection = \"top\" | \"bottom\" | \"left\" | \"righ\";\r\n\r\ninterface FlipButtonProps extends HTMLMotionProps<\"button\"> {\r\n frontText: string;\r\n backText: string;\r\n transition?: Transition;\r\n frontClassName?: string;\r\n backClassName?: string;\r\n from?: FlipDirection;\r\n}\r\n\r\nconst defaultSpanClassName = \"absolute inset-0 flex items-center justify-center rounded-lg\";\r\n\r\nconst FlipButton = React.forwardRef<HTMLButtonElement, FlipButtonProps>(\r\n (\r\n {\r\n frontText,\r\n backText,\r\n transition = {type: \"spring\", stiffness: 280, damping: 20},\r\n className,\r\n frontClassName,\r\n backClassName,\r\n from = \"top\",\r\n ...props\r\n },\r\n ref,\r\n ) => {\r\n const isVertical = from === \"top\" || from === \"bottom\";\r\n const rotateAxis = isVertical ? \"rotateX\" : \"rotateY\";\r\n\r\n const frontOffset = from === \"top\" || from === \"left\" ? \"50%\" : \"-50%\";\r\n const backOffset = from === \"top\" || from === \"left\" ? \"-50%\" : \"50%\";\r\n\r\n const buildVariant = (opacity: number, rotation: number, offset: string | null = null): Variant => ({\r\n opacity,\r\n [rotateAxis]: rotation,\r\n ...(isVertical && offset !== null ? {y: offset} : {}),\r\n ...(!isVertical && offset !== null ? {x: offset} : {}),\r\n });\r\n\r\n const frontVariants = {\r\n initial: buildVariant(1, 0, \"0%\"),\r\n hover: buildVariant(0, 90, frontOffset),\r\n };\r\n\r\n const backVariants = {\r\n initial: buildVariant(0, 90, backOffset),\r\n hover: buildVariant(1, 0, \"0%\"),\r\n };\r\n\r\n return (\r\n <motion.button\r\n ref={ref}\r\n initial='initial'\r\n whileHover='hover'\r\n whileTap={{scale: 0.95}}\r\n className={cn(\r\n \"relative inline-block h-10 cursor-pointer px-4 py-2 text-sm font-medium perspective-[1000px] focus:outline-none\",\r\n className,\r\n )}\r\n {...props}>\r\n <motion.span\r\n variants={frontVariants}\r\n transition={transition}\r\n className={cn(defaultSpanClassName, \"bg-muted text-black dark:text-white\", frontClassName)}>\r\n {frontText}\r\n </motion.span>\r\n <motion.span\r\n variants={backVariants}\r\n transition={transition}\r\n className={cn(defaultSpanClassName, \"bg-primary text-primary-foreground\", backClassName)}>\r\n {backText}\r\n </motion.span>\r\n <span className='invisible'>{frontText}</span>\r\n </motion.button>\r\n );\r\n },\r\n);\r\n\r\nFlipButton.displayName = \"FlipButton\";\r\n\r\nexport {FlipButton, type FlipButtonProps, type FlipDirection};\r\n"],"names":["defaultSpanClassName","FlipButton","React","frontText","backText","transition","className","frontClassName","backClassName","from","props","ref","isVertical","rotateAxis","frontOffset","backOffset","buildVariant","opacity","rotation","offset","frontVariants","backVariants","motion","cn"],"mappings":";;;;;AAkBA,MAAMA,uBAAuB;AAE7B,MAAMC,aAAa,WAAbA,GAAaC,WACjB,CACE,EACEC,SAAS,EACTC,QAAQ,EACRC,aAAa;IAAC,MAAM;IAAU,WAAW;IAAK,SAAS;AAAE,CAAC,EAC1DC,SAAS,EACTC,cAAc,EACdC,aAAa,EACbC,OAAO,KAAK,EACZ,GAAGC,OACJ,EACDC;IAEA,MAAMC,aAAaH,UAAAA,QAAkBA,aAAAA;IACrC,MAAMI,aAAaD,aAAa,YAAY;IAE5C,MAAME,cAAcL,UAAAA,QAAkBA,WAAAA,OAAkB,QAAQ;IAChE,MAAMM,aAAaN,UAAAA,QAAkBA,WAAAA,OAAkB,SAAS;IAEhE,MAAMO,eAAe,CAACC,SAAiBC,UAAkBC,SAAwB,IAAI,GAAe;YAClGF;YACA,CAACJ,WAAW,EAAEK;YACd,GAAIN,cAAcO,SAAAA,SAAkB;gBAAC,GAAGA;YAAM,IAAI,CAAC,CAAC;YACpD,GAAI,CAACP,cAAcO,SAAAA,SAAkB;gBAAC,GAAGA;YAAM,IAAI,CAAC,CAAC;QACvD;IAEA,MAAMC,gBAAgB;QACpB,SAASJ,aAAa,GAAG,GAAG;QAC5B,OAAOA,aAAa,GAAG,IAAIF;IAC7B;IAEA,MAAMO,eAAe;QACnB,SAASL,aAAa,GAAG,IAAID;QAC7B,OAAOC,aAAa,GAAG,GAAG;IAC5B;IAEA,OAAO,WAAP,GACE,KAACM,OAAO,MAAM;QACZ,KAAKX;QACL,SAAQ;QACR,YAAW;QACX,UAAU;YAAC,OAAO;QAAI;QACtB,WAAWY,GACT,mHACAjB;QAED,GAAGI,KAAK;;0BACT,IAACY,OAAO,IAAI;gBACV,UAAUF;gBACV,YAAYf;gBACZ,WAAWkB,GAAGvB,sBAAsB,uCAAuCO;0BAC1EJ;;0BAEH,IAACmB,OAAO,IAAI;gBACV,UAAUD;gBACV,YAAYhB;gBACZ,WAAWkB,GAAGvB,sBAAsB,sCAAsCQ;0BACzEJ;;0BAEH,IAAC;gBAAK,WAAU;0BAAaD;;;;AAGnC;AAGFF,WAAW,WAAW,GAAG"}
@@ -1,6 +1,5 @@
1
- import * as React from "react";
2
1
  import * as LabelPrimitive from "@radix-ui/react-label";
3
- import { Slot } from "@radix-ui/react-slot";
2
+ import * as React from "react";
4
3
  import { type ControllerProps, type FieldPath, type FieldValues } from "react-hook-form";
5
4
  declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
6
5
  declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => import("react/jsx-runtime").JSX.Element;
@@ -16,10 +15,10 @@ declare const useFormField: () => {
16
15
  formDescriptionId: string;
17
16
  formMessageId: string;
18
17
  };
19
- declare function FormItem({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
20
- declare function FormLabel({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
21
- declare function FormControl({ ...props }: React.ComponentProps<typeof Slot>): import("react/jsx-runtime").JSX.Element;
22
- declare function FormDescription({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element;
23
- declare function FormMessage({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element | null;
24
- export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
18
+ declare const FormItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
19
+ declare const FormLabel: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
20
+ declare const FormControl: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-slot").SlotProps & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
21
+ declare const FormDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
22
+ declare const FormMessage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
23
+ export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };
25
24
  //# sourceMappingURL=form.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../src/components/ui/form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAKL,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,iBAAiB,CAAC;AAKzB,QAAA,MAAM,IAAI,4MAAe,CAAC;AAa1B,QAAA,MAAM,SAAS,GACb,YAAY,SAAS,WAAW,GAAG,WAAW,EAC9C,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,EAC/D,cAEC,eAAe,CAAC,YAAY,EAAE,KAAK,CAAC,4CAMtC,CAAC;AAEF,QAAA,MAAM,YAAY;;;;;;;;;;;CAqBjB,CAAC;AAUF,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAYrE;AAED,iBAAS,SAAS,CAAC,EACjB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,2CAelD;AAED,iBAAS,WAAW,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,2CAiBnE;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,2CAc1E;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,kDAkBtE;AAED,OAAO,EACL,YAAY,EACZ,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,WAAW,EACX,eAAe,EACf,WAAW,EACX,SAAS,GACV,CAAC"}
1
+ {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../src/components/ui/form.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAA2C,KAAK,eAAe,EAAE,KAAK,SAAS,EAAE,KAAK,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAKjI,QAAA,MAAM,IAAI,4MAAe,CAAC;AAW1B,QAAA,MAAM,SAAS,GAAI,YAAY,SAAS,WAAW,GAAG,WAAW,EAAE,KAAK,SAAS,SAAS,CAAC,YAAY,CAAC,GAAG,SAAS,CAAC,YAAY,CAAC,EAAE,cAEjI,eAAe,CAAC,YAAY,EAAE,KAAK,CAAC,4CAMtC,CAAC;AAEF,QAAA,MAAM,YAAY;;;;;;;;;;;CAqBjB,CAAC;AAQF,QAAA,MAAM,QAAQ,6GAYZ,CAAC;AAGH,QAAA,MAAM,SAAS,yJAcb,CAAC;AAGH,QAAA,MAAM,WAAW,8JAYf,CAAC;AAGH,QAAA,MAAM,eAAe,yHAWnB,CAAC;AAGH,QAAA,MAAM,WAAW,yHAmBhB,CAAC;AAGF,OAAO,EAAC,IAAI,EAAE,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAC,CAAC"}
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { jsx } from "react/jsx-runtime";
3
- import { createContext, useContext, useId } from "react";
4
3
  import { Slot } from "@radix-ui/react-slot";
5
- import { Controller, FormProvider, useFormContext, useFormState } from "react-hook-form";
6
- import { cn } from "../../lib/utils.js";
4
+ import { createContext, forwardRef, useContext, useId } from "react";
5
+ import { Controller, FormProvider, useFormContext } from "react-hook-form";
7
6
  import { Label } from "./label.js";
7
+ import { cn } from "../../lib/utilities.js";
8
8
  const Form = FormProvider;
9
9
  const FormFieldContext = /*#__PURE__*/ createContext({});
10
10
  const FormField = ({ ...props })=>/*#__PURE__*/ jsx(FormFieldContext.Provider, {
@@ -18,10 +18,7 @@ const FormField = ({ ...props })=>/*#__PURE__*/ jsx(FormFieldContext.Provider, {
18
18
  const useFormField = ()=>{
19
19
  const fieldContext = useContext(FormFieldContext);
20
20
  const itemContext = useContext(FormItemContext);
21
- const { getFieldState } = useFormContext();
22
- const formState = useFormState({
23
- name: fieldContext.name
24
- });
21
+ const { getFieldState, formState } = useFormContext();
25
22
  const fieldState = getFieldState(fieldContext.name, formState);
26
23
  if (!fieldContext) throw new Error("useFormField should be used within <FormField>");
27
24
  const { id } = itemContext;
@@ -35,60 +32,64 @@ const useFormField = ()=>{
35
32
  };
36
33
  };
37
34
  const FormItemContext = /*#__PURE__*/ createContext({});
38
- function FormItem({ className, ...props }) {
35
+ const FormItem = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
39
36
  const id = useId();
40
37
  return /*#__PURE__*/ jsx(FormItemContext.Provider, {
41
38
  value: {
42
39
  id
43
40
  },
44
41
  children: /*#__PURE__*/ jsx("div", {
45
- "data-slot": "form-item",
46
- className: cn("grid gap-2", className),
42
+ ref: ref,
43
+ className: cn("space-y-2", className),
47
44
  ...props
48
45
  })
49
46
  });
50
- }
51
- function FormLabel({ className, ...props }) {
47
+ });
48
+ FormItem.displayName = "FormItem";
49
+ const FormLabel = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
52
50
  const { error, formItemId } = useFormField();
53
51
  return /*#__PURE__*/ jsx(Label, {
54
- "data-slot": "form-label",
55
- "data-error": !!error,
56
- className: cn("data-[error=true]:text-red-500 dark:data-[error=true]:text-red-900", className),
52
+ ref: ref,
53
+ className: cn(error && "text-red-500 dark:text-red-900", className),
57
54
  htmlFor: formItemId,
58
55
  ...props
59
56
  });
60
- }
61
- function FormControl({ ...props }) {
57
+ });
58
+ FormLabel.displayName = "FormLabel";
59
+ const FormControl = /*#__PURE__*/ forwardRef(({ ...props }, ref)=>{
62
60
  const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
63
61
  return /*#__PURE__*/ jsx(Slot, {
64
- "data-slot": "form-control",
62
+ ref: ref,
65
63
  id: formItemId,
66
64
  "aria-describedby": error ? `${formDescriptionId} ${formMessageId}` : `${formDescriptionId}`,
67
65
  "aria-invalid": !!error,
68
66
  ...props
69
67
  });
70
- }
71
- function FormDescription({ className, ...props }) {
68
+ });
69
+ FormControl.displayName = "FormControl";
70
+ const FormDescription = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>{
72
71
  const { formDescriptionId } = useFormField();
73
72
  return /*#__PURE__*/ jsx("p", {
74
- "data-slot": "form-description",
73
+ ref: ref,
75
74
  id: formDescriptionId,
76
- className: cn("text-neutral-500 text-sm dark:text-neutral-400", className),
75
+ className: cn("text-[0.8rem] text-neutral-500 dark:text-neutral-400", className),
77
76
  ...props
78
77
  });
79
- }
80
- function FormMessage({ className, ...props }) {
78
+ });
79
+ FormDescription.displayName = "FormDescription";
80
+ const FormMessage = /*#__PURE__*/ forwardRef(({ className, children, ...props }, ref)=>{
81
81
  const { error, formMessageId } = useFormField();
82
- const body = error ? String(error?.message ?? "") : props.children;
82
+ const body = error ? String(error?.message ?? "") : children;
83
83
  if (!body) return null;
84
84
  return /*#__PURE__*/ jsx("p", {
85
- "data-slot": "form-message",
85
+ ref: ref,
86
86
  id: formMessageId,
87
- className: cn("text-red-500 text-sm dark:text-red-900", className),
87
+ className: cn("text-[0.8rem] font-medium text-red-500 dark:text-red-900", className),
88
88
  ...props,
89
89
  children: body
90
90
  });
91
- }
91
+ });
92
+ FormMessage.displayName = "FormMessage";
92
93
  export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };
93
94
 
94
95
  //# sourceMappingURL=form.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components\\ui\\form.js","sources":["webpack://@arolariu/components/./src/components/ui/form.tsx"],"sourcesContent":["\n\nimport * as React from \"react\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport {\n Controller,\n FormProvider,\n useFormContext,\n useFormState,\n type ControllerProps,\n type FieldPath,\n type FieldValues,\n} from \"react-hook-form\";\n\nimport { cn } from \"@/lib/utils\";\nimport { Label } from \"@/components/ui/label\";\n\nconst Form = FormProvider;\n\ntype FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = {\n name: TName;\n};\n\nconst FormFieldContext = React.createContext<FormFieldContextValue>(\n {} as FormFieldContextValue,\n);\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n};\n\nconst useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState } = useFormContext();\n const formState = useFormState({ name: fieldContext.name });\n const fieldState = getFieldState(fieldContext.name, formState);\n\n if (!fieldContext) {\n throw new Error(\"useFormField should be used within <FormField>\");\n }\n\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n };\n};\n\ntype FormItemContextValue = {\n id: string;\n};\n\nconst FormItemContext = React.createContext<FormItemContextValue>(\n {} as FormItemContextValue,\n);\n\nfunction FormItem({ className, ...props }: React.ComponentProps<\"div\">) {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div\n data-slot=\"form-item\"\n className={cn(\"grid gap-2\", className)}\n {...props}\n />\n </FormItemContext.Provider>\n );\n}\n\nfunction FormLabel({\n className,\n ...props\n}: React.ComponentProps<typeof LabelPrimitive.Root>) {\n const { error, formItemId } = useFormField();\n\n return (\n <Label\n data-slot=\"form-label\"\n data-error={!!error}\n className={cn(\n \"data-[error=true]:text-red-500 dark:data-[error=true]:text-red-900\",\n className,\n )}\n htmlFor={formItemId}\n {...props}\n />\n );\n}\n\nfunction FormControl({ ...props }: React.ComponentProps<typeof Slot>) {\n const { error, formItemId, formDescriptionId, formMessageId } =\n useFormField();\n\n return (\n <Slot\n data-slot=\"form-control\"\n id={formItemId}\n aria-describedby={\n !error\n ? `${formDescriptionId}`\n : `${formDescriptionId} ${formMessageId}`\n }\n aria-invalid={!!error}\n {...props}\n />\n );\n}\n\nfunction FormDescription({ className, ...props }: React.ComponentProps<\"p\">) {\n const { formDescriptionId } = useFormField();\n\n return (\n <p\n data-slot=\"form-description\"\n id={formDescriptionId}\n className={cn(\n \"text-neutral-500 text-sm dark:text-neutral-400\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction FormMessage({ className, ...props }: React.ComponentProps<\"p\">) {\n const { error, formMessageId } = useFormField();\n const body = error ? String(error?.message ?? \"\") : props.children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p\n data-slot=\"form-message\"\n id={formMessageId}\n className={cn(\"text-red-500 text-sm dark:text-red-900\", className)}\n {...props}\n >\n {body}\n </p>\n );\n}\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n};\n"],"names":["Form","FormProvider","FormFieldContext","React","FormField","props","Controller","useFormField","fieldContext","itemContext","FormItemContext","getFieldState","useFormContext","formState","useFormState","fieldState","Error","id","FormItem","className","cn","FormLabel","error","formItemId","Label","FormControl","formDescriptionId","formMessageId","Slot","FormDescription","FormMessage","body","String"],"mappings":";;;;;;;AAkBA,MAAMA,OAAOC;AASb,MAAMC,mBAAmB,WAAnBA,GAAmBC,cACvB,CAAC;AAGH,MAAMC,YAAY,CAGhB,EACA,GAAGC,OACkC,GAC9B,WAAP,GACE,IAACH,iBAAiB,QAAQ;QAAC,OAAO;YAAE,MAAMG,MAAM,IAAI;QAAC;kBACnD,kBAACC,YAAUA;YAAE,GAAGD,KAAK;;;AAK3B,MAAME,eAAe;IACnB,MAAMC,eAAeL,WAAiBD;IACtC,MAAMO,cAAcN,WAAiBO;IACrC,MAAM,EAAEC,aAAa,EAAE,GAAGC;IAC1B,MAAMC,YAAYC,aAAa;QAAE,MAAMN,aAAa,IAAI;IAAC;IACzD,MAAMO,aAAaJ,cAAcH,aAAa,IAAI,EAAEK;IAEpD,IAAI,CAACL,cACH,MAAM,IAAIQ,MAAM;IAGlB,MAAM,EAAEC,EAAE,EAAE,GAAGR;IAEf,OAAO;QACLQ;QACA,MAAMT,aAAa,IAAI;QACvB,YAAY,GAAGS,GAAG,UAAU,CAAC;QAC7B,mBAAmB,GAAGA,GAAG,sBAAsB,CAAC;QAChD,eAAe,GAAGA,GAAG,kBAAkB,CAAC;QACxC,GAAGF,UAAU;IACf;AACF;AAMA,MAAML,kBAAkB,WAAlBA,GAAkBP,cACtB,CAAC;AAGH,SAASe,SAAS,EAAEC,SAAS,EAAE,GAAGd,OAAoC;IACpE,MAAMY,KAAKd;IAEX,OAAO,WAAP,GACE,IAACO,gBAAgB,QAAQ;QAAC,OAAO;YAAEO;QAAG;kBACpC,kBAAC;YACC,aAAU;YACV,WAAWG,GAAG,cAAcD;YAC3B,GAAGd,KAAK;;;AAIjB;AAEA,SAASgB,UAAU,EACjBF,SAAS,EACT,GAAGd,OAC8C;IACjD,MAAM,EAAEiB,KAAK,EAAEC,UAAU,EAAE,GAAGhB;IAE9B,OAAO,WAAP,GACE,IAACiB,OAAKA;QACJ,aAAU;QACV,cAAY,CAAC,CAACF;QACd,WAAWF,GACT,sEACAD;QAEF,SAASI;QACR,GAAGlB,KAAK;;AAGf;AAEA,SAASoB,YAAY,EAAE,GAAGpB,OAA0C;IAClE,MAAM,EAAEiB,KAAK,EAAEC,UAAU,EAAEG,iBAAiB,EAAEC,aAAa,EAAE,GAC3DpB;IAEF,OAAO,WAAP,GACE,IAACqB,MAAIA;QACH,aAAU;QACV,IAAIL;QACJ,oBACE,QAEI,GAAGG,kBAAkB,CAAC,EAAEC,eAAe,GADvC,GAAGD,mBAAmB;QAG5B,gBAAc,CAAC,CAACJ;QACf,GAAGjB,KAAK;;AAGf;AAEA,SAASwB,gBAAgB,EAAEV,SAAS,EAAE,GAAGd,OAAkC;IACzE,MAAM,EAAEqB,iBAAiB,EAAE,GAAGnB;IAE9B,OAAO,WAAP,GACE,IAAC;QACC,aAAU;QACV,IAAImB;QACJ,WAAWN,GACT,kDACAD;QAED,GAAGd,KAAK;;AAGf;AAEA,SAASyB,YAAY,EAAEX,SAAS,EAAE,GAAGd,OAAkC;IACrE,MAAM,EAAEiB,KAAK,EAAEK,aAAa,EAAE,GAAGpB;IACjC,MAAMwB,OAAOT,QAAQU,OAAOV,OAAO,WAAW,MAAMjB,MAAM,QAAQ;IAElE,IAAI,CAAC0B,MACH,OAAO;IAGT,OAAO,WAAP,GACE,IAAC;QACC,aAAU;QACV,IAAIJ;QACJ,WAAWP,GAAG,0CAA0CD;QACvD,GAAGd,KAAK;kBAER0B;;AAGP"}
1
+ {"version":3,"file":"components\\ui\\form.js","sources":["webpack://@arolariu/components/./src/components/ui/form.tsx"],"sourcesContent":["\r\n\r\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\r\nimport {Slot} from \"@radix-ui/react-slot\";\r\nimport * as React from \"react\";\r\nimport {Controller, FormProvider, useFormContext, type ControllerProps, type FieldPath, type FieldValues} from \"react-hook-form\";\r\n\r\nimport {Label} from \"@/components/ui/label\";\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst Form = FormProvider;\r\n\r\ntype FormFieldContextValue<\r\n TFieldValues extends FieldValues = FieldValues,\r\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\r\n> = {\r\n name: TName;\r\n};\r\n\r\nconst FormFieldContext = React.createContext<FormFieldContextValue>({} as FormFieldContextValue);\r\n\r\nconst FormField = <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({\r\n ...props\r\n}: ControllerProps<TFieldValues, TName>) => {\r\n return (\r\n <FormFieldContext.Provider value={{name: props.name}}>\r\n <Controller {...props} />\r\n </FormFieldContext.Provider>\r\n );\r\n};\r\n\r\nconst useFormField = () => {\r\n const fieldContext = React.useContext(FormFieldContext);\r\n const itemContext = React.useContext(FormItemContext);\r\n const {getFieldState, formState} = useFormContext();\r\n\r\n const fieldState = getFieldState(fieldContext.name, formState);\r\n\r\n if (!fieldContext) {\r\n throw new Error(\"useFormField should be used within <FormField>\");\r\n }\r\n\r\n const {id} = itemContext;\r\n\r\n return {\r\n id,\r\n name: fieldContext.name,\r\n formItemId: `${id}-form-item`,\r\n formDescriptionId: `${id}-form-item-description`,\r\n formMessageId: `${id}-form-item-message`,\r\n ...fieldState,\r\n };\r\n};\r\n\r\ntype FormItemContextValue = {\r\n id: string;\r\n};\r\n\r\nconst FormItemContext = React.createContext<FormItemContextValue>({} as FormItemContextValue);\r\n\r\nconst FormItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({className, ...props}, ref) => {\r\n const id = React.useId();\r\n\r\n return (\r\n <FormItemContext.Provider value={{id}}>\r\n <div\r\n ref={ref}\r\n className={cn(\"space-y-2\", className)}\r\n {...props}\r\n />\r\n </FormItemContext.Provider>\r\n );\r\n});\r\nFormItem.displayName = \"FormItem\";\r\n\r\nconst FormLabel = React.forwardRef<\r\n React.ElementRef<typeof LabelPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>\r\n>(({className, ...props}, ref) => {\r\n const {error, formItemId} = useFormField();\r\n\r\n return (\r\n <Label\r\n ref={ref}\r\n className={cn(error && \"text-red-500 dark:text-red-900\", className)}\r\n htmlFor={formItemId}\r\n {...props}\r\n />\r\n );\r\n});\r\nFormLabel.displayName = \"FormLabel\";\r\n\r\nconst FormControl = React.forwardRef<React.ElementRef<typeof Slot>, React.ComponentPropsWithoutRef<typeof Slot>>(({...props}, ref) => {\r\n const {error, formItemId, formDescriptionId, formMessageId} = useFormField();\r\n\r\n return (\r\n <Slot\r\n ref={ref}\r\n id={formItemId}\r\n aria-describedby={!error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`}\r\n aria-invalid={!!error}\r\n {...props}\r\n />\r\n );\r\n});\r\nFormControl.displayName = \"FormControl\";\r\n\r\nconst FormDescription = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(({className, ...props}, ref) => {\r\n const {formDescriptionId} = useFormField();\r\n\r\n return (\r\n <p\r\n ref={ref}\r\n id={formDescriptionId}\r\n className={cn(\"text-[0.8rem] text-neutral-500 dark:text-neutral-400\", className)}\r\n {...props}\r\n />\r\n );\r\n});\r\nFormDescription.displayName = \"FormDescription\";\r\n\r\nconst FormMessage = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(\r\n ({className, children, ...props}, ref) => {\r\n const {error, formMessageId} = useFormField();\r\n const body = error ? String(error?.message ?? \"\") : children;\r\n\r\n if (!body) {\r\n return null;\r\n }\r\n\r\n return (\r\n <p\r\n ref={ref}\r\n id={formMessageId}\r\n className={cn(\"text-[0.8rem] font-medium text-red-500 dark:text-red-900\", className)}\r\n {...props}>\r\n {body}\r\n </p>\r\n );\r\n },\r\n);\r\nFormMessage.displayName = \"FormMessage\";\r\n\r\nexport {Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField};\r\n"],"names":["Form","FormProvider","FormFieldContext","React","FormField","props","Controller","useFormField","fieldContext","itemContext","FormItemContext","getFieldState","formState","useFormContext","fieldState","Error","id","FormItem","className","ref","cn","FormLabel","error","formItemId","Label","FormControl","formDescriptionId","formMessageId","Slot","FormDescription","FormMessage","children","body","String"],"mappings":";;;;;;;AAUA,MAAMA,OAAOC;AASb,MAAMC,mBAAmB,WAAnBA,GAAmBC,cAA2C,CAAC;AAErE,MAAMC,YAAY,CAAkH,EAClI,GAAGC,OACkC,GAC9B,WAAP,GACE,IAACH,iBAAiB,QAAQ;QAAC,OAAO;YAAC,MAAMG,MAAM,IAAI;QAAA;kBACjD,kBAACC,YAAUA;YAAE,GAAGD,KAAK;;;AAK3B,MAAME,eAAe;IACnB,MAAMC,eAAeL,WAAiBD;IACtC,MAAMO,cAAcN,WAAiBO;IACrC,MAAM,EAACC,aAAa,EAAEC,SAAS,EAAC,GAAGC;IAEnC,MAAMC,aAAaH,cAAcH,aAAa,IAAI,EAAEI;IAEpD,IAAI,CAACJ,cACH,MAAM,IAAIO,MAAM;IAGlB,MAAM,EAACC,EAAE,EAAC,GAAGP;IAEb,OAAO;QACLO;QACA,MAAMR,aAAa,IAAI;QACvB,YAAY,GAAGQ,GAAG,UAAU,CAAC;QAC7B,mBAAmB,GAAGA,GAAG,sBAAsB,CAAC;QAChD,eAAe,GAAGA,GAAG,kBAAkB,CAAC;QACxC,GAAGF,UAAU;IACf;AACF;AAMA,MAAMJ,kBAAkB,WAAlBA,GAAkBP,cAA0C,CAAC;AAEnE,MAAMc,WAAW,WAAXA,GAAWd,WAAuE,CAAC,EAACe,SAAS,EAAE,GAAGb,OAAM,EAAEc;IAC9G,MAAMH,KAAKb;IAEX,OAAO,WAAP,GACE,IAACO,gBAAgB,QAAQ;QAAC,OAAO;YAACM;QAAE;kBAClC,kBAAC;YACC,KAAKG;YACL,WAAWC,GAAG,aAAaF;YAC1B,GAAGb,KAAK;;;AAIjB;AACAY,SAAS,WAAW,GAAG;AAEvB,MAAMI,YAAY,WAAZA,GAAYlB,WAGhB,CAAC,EAACe,SAAS,EAAE,GAAGb,OAAM,EAAEc;IACxB,MAAM,EAACG,KAAK,EAAEC,UAAU,EAAC,GAAGhB;IAE5B,OAAO,WAAP,GACE,IAACiB,OAAKA;QACJ,KAAKL;QACL,WAAWC,GAAGE,SAAS,kCAAkCJ;QACzD,SAASK;QACR,GAAGlB,KAAK;;AAGf;AACAgB,UAAU,WAAW,GAAG;AAExB,MAAMI,cAAc,WAAdA,GAActB,WAA6F,CAAC,EAAC,GAAGE,OAAM,EAAEc;IAC5H,MAAM,EAACG,KAAK,EAAEC,UAAU,EAAEG,iBAAiB,EAAEC,aAAa,EAAC,GAAGpB;IAE9D,OAAO,WAAP,GACE,IAACqB,MAAIA;QACH,KAAKT;QACL,IAAII;QACJ,oBAAkB,QAAkC,GAAGG,kBAAkB,CAAC,EAAEC,eAAe,GAAhE,GAAGD,mBAAmB;QACjD,gBAAc,CAAC,CAACJ;QACf,GAAGjB,KAAK;;AAGf;AACAoB,YAAY,WAAW,GAAG;AAE1B,MAAMI,kBAAkB,WAAlBA,GAAkB1B,WAAmF,CAAC,EAACe,SAAS,EAAE,GAAGb,OAAM,EAAEc;IACjI,MAAM,EAACO,iBAAiB,EAAC,GAAGnB;IAE5B,OAAO,WAAP,GACE,IAAC;QACC,KAAKY;QACL,IAAIO;QACJ,WAAWN,GAAG,wDAAwDF;QACrE,GAAGb,KAAK;;AAGf;AACAwB,gBAAgB,WAAW,GAAG;AAE9B,MAAMC,cAAc,WAAdA,GAAc3B,WAClB,CAAC,EAACe,SAAS,EAAEa,QAAQ,EAAE,GAAG1B,OAAM,EAAEc;IAChC,MAAM,EAACG,KAAK,EAAEK,aAAa,EAAC,GAAGpB;IAC/B,MAAMyB,OAAOV,QAAQW,OAAOX,OAAO,WAAW,MAAMS;IAEpD,IAAI,CAACC,MACH,OAAO;IAGT,OAAO,WAAP,GACE,IAAC;QACC,KAAKb;QACL,IAAIQ;QACJ,WAAWP,GAAG,4DAA4DF;QACzE,GAAGb,KAAK;kBACR2B;;AAGP;AAEFF,YAAY,WAAW,GAAG"}
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
1
  import { HTMLMotionProps, type Transition } from "motion/react";
2
+ import * as React from "react";
3
3
  interface GradientBackgroundProps extends HTMLMotionProps<"div"> {
4
4
  transition?: Transition;
5
5
  }
@@ -1 +1 @@
1
- {"version":3,"file":"gradient-background.d.ts","sourceRoot":"","sources":["../../../src/components/ui/gradient-background.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAU,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAIxE,UAAU,uBAAwB,SAAQ,eAAe,CAAC,KAAK,CAAC;IAC9D,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,QAAA,MAAM,kBAAkB,6GA2BvB,CAAC;AAIF,OAAO,EAAE,kBAAkB,EAAE,KAAK,uBAAuB,EAAE,CAAC"}
1
+ {"version":3,"file":"gradient-background.d.ts","sourceRoot":"","sources":["../../../src/components/ui/gradient-background.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,eAAe,EAAU,KAAK,UAAU,EAAC,MAAM,cAAc,CAAC;AACtE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,UAAU,uBAAwB,SAAQ,eAAe,CAAC,KAAK,CAAC;IAC9D,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,QAAA,MAAM,kBAAkB,6GAcvB,CAAC;AAIF,OAAO,EAAC,kBAAkB,EAAE,KAAK,uBAAuB,EAAC,CAAC"}
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { jsx } from "react/jsx-runtime";
3
- import { forwardRef } from "react";
4
3
  import { motion } from "motion/react";
5
- import { cn } from "../../lib/utils.js";
4
+ import { forwardRef } from "react";
5
+ import { cn } from "../../lib/utilities.js";
6
6
  const GradientBackground = /*#__PURE__*/ forwardRef(({ className, transition = {
7
7
  duration: 15,
8
8
  ease: "easeInOut",
@@ -1 +1 @@
1
- {"version":3,"file":"components\\ui\\gradient-background.js","sources":["webpack://@arolariu/components/./src/components/ui/gradient-background.tsx"],"sourcesContent":["\n\nimport * as React from \"react\";\nimport { HTMLMotionProps, motion, type Transition } from \"motion/react\";\n\nimport { cn } from \"@/lib/utils\";\n\ninterface GradientBackgroundProps extends HTMLMotionProps<\"div\"> {\n transition?: Transition;\n}\n\nconst GradientBackground = React.forwardRef<\n HTMLDivElement,\n GradientBackgroundProps\n>(\n (\n {\n className,\n transition = { duration: 15, ease: \"easeInOut\", repeat: Infinity },\n ...props\n },\n ref,\n ) => {\n return (\n <motion.div\n ref={ref}\n className={cn(\n \"size-full bg-gradient-to-br from-blue-500 via-purple-500 to-pink-500 bg-[length:400%_400%]\",\n className,\n )}\n animate={{\n backgroundPosition: [\"0% 50%\", \"100% 50%\", \"0% 50%\"],\n }}\n transition={transition}\n {...props}\n />\n );\n },\n);\n\nGradientBackground.displayName = \"GradientBackground\";\n\nexport { GradientBackground, type GradientBackgroundProps };\n"],"names":["GradientBackground","React","className","transition","Infinity","props","ref","motion","cn"],"mappings":";;;;;AAWA,MAAMA,qBAAqB,WAArBA,GAAqBC,WAIzB,CACE,EACEC,SAAS,EACTC,aAAa;IAAE,UAAU;IAAI,MAAM;IAAa,QAAQC;AAAS,CAAC,EAClE,GAAGC,OACJ,EACDC,MAEO,WAAP,GACE,IAACC,OAAO,GAAG;QACT,KAAKD;QACL,WAAWE,GACT,8FACAN;QAEF,SAAS;YACP,oBAAoB;gBAAC;gBAAU;gBAAY;aAAS;QACtD;QACA,YAAYC;QACX,GAAGE,KAAK;;AAMjBL,mBAAmB,WAAW,GAAG"}
1
+ {"version":3,"file":"components\\ui\\gradient-background.js","sources":["webpack://@arolariu/components/./src/components/ui/gradient-background.tsx"],"sourcesContent":["\r\n\r\nimport {HTMLMotionProps, motion, type Transition} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\ninterface GradientBackgroundProps extends HTMLMotionProps<\"div\"> {\r\n transition?: Transition;\r\n}\r\n\r\nconst GradientBackground = React.forwardRef<HTMLDivElement, GradientBackgroundProps>(\r\n ({className, transition = {duration: 15, ease: \"easeInOut\", repeat: Infinity}, ...props}, ref) => {\r\n return (\r\n <motion.div\r\n ref={ref}\r\n className={cn(\"size-full bg-gradient-to-br from-blue-500 via-purple-500 to-pink-500 bg-[length:400%_400%]\", className)}\r\n animate={{\r\n backgroundPosition: [\"0% 50%\", \"100% 50%\", \"0% 50%\"],\r\n }}\r\n transition={transition}\r\n {...props}\r\n />\r\n );\r\n },\r\n);\r\n\r\nGradientBackground.displayName = \"GradientBackground\";\r\n\r\nexport {GradientBackground, type GradientBackgroundProps};\r\n"],"names":["GradientBackground","React","className","transition","Infinity","props","ref","motion","cn"],"mappings":";;;;;AAWA,MAAMA,qBAAqB,WAArBA,GAAqBC,WACzB,CAAC,EAACC,SAAS,EAAEC,aAAa;IAAC,UAAU;IAAI,MAAM;IAAa,QAAQC;AAAQ,CAAC,EAAE,GAAGC,OAAM,EAAEC,MACjF,WAAP,GACE,IAACC,OAAO,GAAG;QACT,KAAKD;QACL,WAAWE,GAAG,8FAA8FN;QAC5G,SAAS;YACP,oBAAoB;gBAAC;gBAAU;gBAAY;aAAS;QACtD;QACA,YAAYC;QACX,GAAGE,KAAK;;AAMjBL,mBAAmB,WAAW,GAAG"}
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
1
  import { type Transition } from "motion/react";
2
+ import * as React from "react";
3
3
  interface GradientTextProps extends React.HTMLAttributes<HTMLSpanElement> {
4
4
  text: string;
5
5
  gradient?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"gradient-text.d.ts","sourceRoot":"","sources":["../../../src/components/ui/gradient-text.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAU,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAIvD,UAAU,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;IACvE,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,QAAA,MAAM,YAAY,2FA8CjB,CAAC;AAIF,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,CAAC"}
1
+ {"version":3,"file":"gradient-text.d.ts","sourceRoot":"","sources":["../../../src/components/ui/gradient-text.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAS,KAAK,UAAU,EAAC,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,UAAU,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;IACvE,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,QAAA,MAAM,YAAY,2FA2CjB,CAAC;AAIF,OAAO,EAAC,YAAY,EAAE,KAAK,iBAAiB,EAAC,CAAC"}
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { forwardRef } from "react";
4
3
  import { motion } from "motion/react";
5
- import { cn } from "../../lib/utils.js";
4
+ import { forwardRef } from "react";
5
+ import { cn } from "../../lib/utilities.js";
6
6
  const GradientText = /*#__PURE__*/ forwardRef(({ text, className, gradient = "linear-gradient(90deg, #3b82f6 0%, #a855f7 20%, #ec4899 50%, #a855f7 80%, #3b82f6 100%)", neon = false, transition = {
7
7
  duration: 50,
8
8
  repeat: 1 / 0,
@@ -17,7 +17,7 @@ const GradientText = /*#__PURE__*/ forwardRef(({ text, className, gradient = "li
17
17
  ...props,
18
18
  children: [
19
19
  /*#__PURE__*/ jsx(motion.span, {
20
- className: "m-0 text-transparent bg-clip-text bg-[length:700%_100%] bg-[position:0%_0%]",
20
+ className: "m-0 bg-[length:700%_100%] bg-clip-text bg-[position:0%_0%] text-transparent",
21
21
  style: baseStyle,
22
22
  initial: {
23
23
  backgroundPosition: "0% 0%"
@@ -28,8 +28,8 @@ const GradientText = /*#__PURE__*/ forwardRef(({ text, className, gradient = "li
28
28
  transition: transition,
29
29
  children: text
30
30
  }),
31
- neon && /*#__PURE__*/ jsx(motion.span, {
32
- className: "m-0 absolute top-0 left-0 text-transparent bg-clip-text blur-[8px] mix-blend-plus-lighter bg-[length:700%_100%] bg-[position:0%_0%]",
31
+ Boolean(neon) && /*#__PURE__*/ jsx(motion.span, {
32
+ className: "absolute top-0 left-0 m-0 bg-[length:700%_100%] bg-clip-text bg-[position:0%_0%] text-transparent mix-blend-plus-lighter blur-[8px]",
33
33
  style: baseStyle,
34
34
  initial: {
35
35
  backgroundPosition: "0% 0%"
@@ -1 +1 @@
1
- {"version":3,"file":"components\\ui\\gradient-text.js","sources":["webpack://@arolariu/components/./src/components/ui/gradient-text.tsx"],"sourcesContent":["\n\nimport * as React from \"react\";\nimport { motion, type Transition } from \"motion/react\";\n\nimport { cn } from \"@/lib/utils\";\n\ninterface GradientTextProps extends React.HTMLAttributes<HTMLSpanElement> {\n text: string;\n gradient?: string;\n neon?: boolean;\n transition?: Transition;\n}\n\nconst GradientText = React.forwardRef<HTMLSpanElement, GradientTextProps>(\n (\n {\n text,\n className,\n gradient = \"linear-gradient(90deg, #3b82f6 0%, #a855f7 20%, #ec4899 50%, #a855f7 80%, #3b82f6 100%)\",\n neon = false,\n transition = { duration: 50, repeat: Infinity, ease: \"linear\" },\n ...props\n },\n ref,\n ) => {\n const baseStyle: React.CSSProperties = {\n backgroundImage: gradient,\n };\n\n return (\n <span\n ref={ref}\n className={cn(\"relative inline-block\", className)}\n {...props}\n >\n <motion.span\n className=\"m-0 text-transparent bg-clip-text bg-[length:700%_100%] bg-[position:0%_0%]\"\n style={baseStyle}\n initial={{ backgroundPosition: \"0% 0%\" }}\n animate={{ backgroundPosition: \"500% 100%\" }}\n transition={transition}\n >\n {text}\n </motion.span>\n\n {neon && (\n <motion.span\n className=\"m-0 absolute top-0 left-0 text-transparent bg-clip-text blur-[8px] mix-blend-plus-lighter bg-[length:700%_100%] bg-[position:0%_0%]\"\n style={baseStyle}\n initial={{ backgroundPosition: \"0% 0%\" }}\n animate={{ backgroundPosition: \"500% 100%\" }}\n transition={transition}\n >\n {text}\n </motion.span>\n )}\n </span>\n );\n },\n);\n\nGradientText.displayName = \"GradientText\";\n\nexport { GradientText, type GradientTextProps };\n"],"names":["GradientText","React","text","className","gradient","neon","transition","Infinity","props","ref","baseStyle","cn","motion"],"mappings":";;;;;AAcA,MAAMA,eAAe,WAAfA,GAAeC,WACnB,CACE,EACEC,IAAI,EACJC,SAAS,EACTC,WAAW,yFAAyF,EACpGC,OAAO,KAAK,EACZC,aAAa;IAAE,UAAU;IAAI,QAAQC;IAAU,MAAM;AAAS,CAAC,EAC/D,GAAGC,OACJ,EACDC;IAEA,MAAMC,YAAiC;QACrC,iBAAiBN;IACnB;IAEA,OAAO,WAAP,GACE,KAAC;QACC,KAAKK;QACL,WAAWE,GAAG,yBAAyBR;QACtC,GAAGK,KAAK;;0BAET,IAACI,OAAO,IAAI;gBACV,WAAU;gBACV,OAAOF;gBACP,SAAS;oBAAE,oBAAoB;gBAAQ;gBACvC,SAAS;oBAAE,oBAAoB;gBAAY;gBAC3C,YAAYJ;0BAEXJ;;YAGFG,QAAQ,WAARA,GACC,IAACO,OAAO,IAAI;gBACV,WAAU;gBACV,OAAOF;gBACP,SAAS;oBAAE,oBAAoB;gBAAQ;gBACvC,SAAS;oBAAE,oBAAoB;gBAAY;gBAC3C,YAAYJ;0BAEXJ;;;;AAKX;AAGFF,aAAa,WAAW,GAAG"}
1
+ {"version":3,"file":"components\\ui\\gradient-text.js","sources":["webpack://@arolariu/components/./src/components/ui/gradient-text.tsx"],"sourcesContent":["\r\n\r\nimport {motion, type Transition} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\ninterface GradientTextProps extends React.HTMLAttributes<HTMLSpanElement> {\r\n text: string;\r\n gradient?: string;\r\n neon?: boolean;\r\n transition?: Transition;\r\n}\r\n\r\nconst GradientText = React.forwardRef<HTMLSpanElement, GradientTextProps>(\r\n (\r\n {\r\n text,\r\n className,\r\n gradient = \"linear-gradient(90deg, #3b82f6 0%, #a855f7 20%, #ec4899 50%, #a855f7 80%, #3b82f6 100%)\",\r\n neon = false,\r\n transition = {duration: 50, repeat: Infinity, ease: \"linear\"},\r\n ...props\r\n },\r\n ref,\r\n ) => {\r\n const baseStyle: React.CSSProperties = {\r\n backgroundImage: gradient,\r\n };\r\n\r\n return (\r\n <span\r\n ref={ref}\r\n className={cn(\"relative inline-block\", className)}\r\n {...props}>\r\n <motion.span\r\n className='m-0 bg-[length:700%_100%] bg-clip-text bg-[position:0%_0%] text-transparent'\r\n style={baseStyle}\r\n initial={{backgroundPosition: \"0% 0%\"}}\r\n animate={{backgroundPosition: \"500% 100%\"}}\r\n transition={transition}>\r\n {text}\r\n </motion.span>\r\n\r\n {Boolean(neon) && (\r\n <motion.span\r\n className='absolute top-0 left-0 m-0 bg-[length:700%_100%] bg-clip-text bg-[position:0%_0%] text-transparent mix-blend-plus-lighter blur-[8px]'\r\n style={baseStyle}\r\n initial={{backgroundPosition: \"0% 0%\"}}\r\n animate={{backgroundPosition: \"500% 100%\"}}\r\n transition={transition}>\r\n {text}\r\n </motion.span>\r\n )}\r\n </span>\r\n );\r\n },\r\n);\r\n\r\nGradientText.displayName = \"GradientText\";\r\n\r\nexport {GradientText, type GradientTextProps};\r\n"],"names":["GradientText","React","text","className","gradient","neon","transition","Infinity","props","ref","baseStyle","cn","motion","Boolean"],"mappings":";;;;;AAcA,MAAMA,eAAe,WAAfA,GAAeC,WACnB,CACE,EACEC,IAAI,EACJC,SAAS,EACTC,WAAW,yFAAyF,EACpGC,OAAO,KAAK,EACZC,aAAa;IAAC,UAAU;IAAI,QAAQC;IAAU,MAAM;AAAQ,CAAC,EAC7D,GAAGC,OACJ,EACDC;IAEA,MAAMC,YAAiC;QACrC,iBAAiBN;IACnB;IAEA,OAAO,WAAP,GACE,KAAC;QACC,KAAKK;QACL,WAAWE,GAAG,yBAAyBR;QACtC,GAAGK,KAAK;;0BACT,IAACI,OAAO,IAAI;gBACV,WAAU;gBACV,OAAOF;gBACP,SAAS;oBAAC,oBAAoB;gBAAO;gBACrC,SAAS;oBAAC,oBAAoB;gBAAW;gBACzC,YAAYJ;0BACXJ;;YAGFW,QAAQR,SAAS,WAATA,GACP,IAACO,OAAO,IAAI;gBACV,WAAU;gBACV,OAAOF;gBACP,SAAS;oBAAC,oBAAoB;gBAAO;gBACrC,SAAS;oBAAC,oBAAoB;gBAAW;gBACzC,YAAYJ;0BACXJ;;;;AAKX;AAGFF,aAAa,WAAW,GAAG"}
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
1
  import { type HTMLMotionProps, type Transition, type UseInViewOptions } from "motion/react";
2
+ import * as React from "react";
3
3
  interface HighlightTextProps extends HTMLMotionProps<"span"> {
4
4
  text: string;
5
5
  inView?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"highlight-text.d.ts","sourceRoot":"","sources":["../../../src/components/ui/highlight-text.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACtB,MAAM,cAAc,CAAC;AAItB,UAAU,kBAAmB,SAAQ,eAAe,CAAC,MAAM,CAAC;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC1C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAID,QAAA,MAAM,aAAa,yGA4ClB,CAAC;AAGF,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,CAAC"}
1
+ {"version":3,"file":"highlight-text.d.ts","sourceRoot":"","sources":["../../../src/components/ui/highlight-text.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAoB,KAAK,eAAe,EAAE,KAAK,UAAU,EAAE,KAAK,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAC7G,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,UAAU,kBAAmB,SAAQ,eAAe,CAAC,MAAM,CAAC;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC1C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAID,QAAA,MAAM,aAAa,yGAiClB,CAAC;AAGF,OAAO,EAAC,aAAa,EAAE,KAAK,kBAAkB,EAAC,CAAC"}
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { jsx } from "react/jsx-runtime";
3
- import { forwardRef, useImperativeHandle, useRef } from "react";
4
3
  import { motion, useInView } from "motion/react";
5
- import { cn } from "../../lib/utils.js";
4
+ import { forwardRef, useImperativeHandle, useRef } from "react";
5
+ import { cn } from "../../lib/utilities.js";
6
6
  const animation = {
7
7
  backgroundSize: "100% 100%"
8
8
  };
@@ -29,7 +29,7 @@ const HighlightText = /*#__PURE__*/ forwardRef(({ text, className, inView = fals
29
29
  backgroundPosition: "left center",
30
30
  display: "inline"
31
31
  },
32
- className: cn("relative inline-block px-2 py-1 rounded-lg bg-gradient-to-r from-blue-100 to-purple-100 dark:from-blue-500 dark:to-purple-500", className),
32
+ className: cn("relative inline-block rounded-lg bg-gradient-to-r from-blue-100 to-purple-100 px-2 py-1 dark:from-blue-500 dark:to-purple-500", className),
33
33
  ...props,
34
34
  children: text
35
35
  });
@@ -1 +1 @@
1
- {"version":3,"file":"components\\ui\\highlight-text.js","sources":["webpack://@arolariu/components/./src/components/ui/highlight-text.tsx"],"sourcesContent":["\n\nimport * as React from \"react\";\nimport {\n motion,\n useInView,\n type HTMLMotionProps,\n type Transition,\n type UseInViewOptions,\n} from \"motion/react\";\n\nimport { cn } from \"@/lib/utils\";\n\ninterface HighlightTextProps extends HTMLMotionProps<\"span\"> {\n text: string;\n inView?: boolean;\n inViewMargin?: UseInViewOptions[\"margin\"];\n inViewOnce?: boolean;\n transition?: Transition;\n}\n\nconst animation = { backgroundSize: \"100% 100%\" };\n\nconst HighlightText = React.forwardRef<HTMLSpanElement, HighlightTextProps>(\n (\n {\n text,\n className,\n inView = false,\n inViewMargin = \"0px\",\n transition = { duration: 2, ease: \"easeInOut\" },\n ...props\n },\n ref,\n ) => {\n const localRef = React.useRef<HTMLSpanElement>(null);\n React.useImperativeHandle(ref, () => localRef.current as HTMLSpanElement);\n\n const inViewResult = useInView(localRef, {\n once: true,\n margin: inViewMargin,\n });\n const isInView = !inView || inViewResult;\n\n return (\n <motion.span\n ref={localRef}\n initial={{\n backgroundSize: \"0% 100%\",\n }}\n animate={isInView ? animation : undefined}\n transition={transition}\n style={{\n backgroundRepeat: \"no-repeat\",\n backgroundPosition: \"left center\",\n display: \"inline\",\n }}\n className={cn(\n `relative inline-block px-2 py-1 rounded-lg bg-gradient-to-r from-blue-100 to-purple-100 dark:from-blue-500 dark:to-purple-500`,\n className,\n )}\n {...props}\n >\n {text}\n </motion.span>\n );\n },\n);\nHighlightText.displayName = \"HighlightText\";\n\nexport { HighlightText, type HighlightTextProps };\n"],"names":["animation","HighlightText","React","text","className","inView","inViewMargin","transition","props","ref","localRef","inViewResult","useInView","isInView","motion","undefined","cn"],"mappings":";;;;;AAqBA,MAAMA,YAAY;IAAE,gBAAgB;AAAY;AAEhD,MAAMC,gBAAgB,WAAhBA,GAAgBC,WACpB,CACE,EACEC,IAAI,EACJC,SAAS,EACTC,SAAS,KAAK,EACdC,eAAe,KAAK,EACpBC,aAAa;IAAE,UAAU;IAAG,MAAM;AAAY,CAAC,EAC/C,GAAGC,OACJ,EACDC;IAEA,MAAMC,WAAWR,OAA8B;IAC/CA,oBAA0BO,KAAK,IAAMC,SAAS,OAAO;IAErD,MAAMC,eAAeC,UAAUF,UAAU;QACvC,MAAM;QACN,QAAQJ;IACV;IACA,MAAMO,WAAW,CAACR,UAAUM;IAE5B,OAAO,WAAP,GACE,IAACG,OAAO,IAAI;QACV,KAAKJ;QACL,SAAS;YACP,gBAAgB;QAClB;QACA,SAASG,WAAWb,YAAYe;QAChC,YAAYR;QACZ,OAAO;YACL,kBAAkB;YAClB,oBAAoB;YACpB,SAAS;QACX;QACA,WAAWS,GACT,iIACAZ;QAED,GAAGI,KAAK;kBAERL;;AAGP;AAEFF,cAAc,WAAW,GAAG"}
1
+ {"version":3,"file":"components\\ui\\highlight-text.js","sources":["webpack://@arolariu/components/./src/components/ui/highlight-text.tsx"],"sourcesContent":["\r\n\r\nimport {motion, useInView, type HTMLMotionProps, type Transition, type UseInViewOptions} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\ninterface HighlightTextProps extends HTMLMotionProps<\"span\"> {\r\n text: string;\r\n inView?: boolean;\r\n inViewMargin?: UseInViewOptions[\"margin\"];\r\n inViewOnce?: boolean;\r\n transition?: Transition;\r\n}\r\n\r\nconst animation = {backgroundSize: \"100% 100%\"};\r\n\r\nconst HighlightText = React.forwardRef<HTMLSpanElement, HighlightTextProps>(\r\n ({text, className, inView = false, inViewMargin = \"0px\", transition = {duration: 2, ease: \"easeInOut\"}, ...props}, ref) => {\r\n const localRef = React.useRef<HTMLSpanElement>(null);\r\n React.useImperativeHandle(ref, () => localRef.current as HTMLSpanElement);\r\n\r\n const inViewResult = useInView(localRef, {\r\n once: true,\r\n margin: inViewMargin,\r\n });\r\n const isInView = !inView || inViewResult;\r\n\r\n return (\r\n <motion.span\r\n ref={localRef}\r\n initial={{\r\n backgroundSize: \"0% 100%\",\r\n }}\r\n animate={isInView ? animation : undefined}\r\n transition={transition}\r\n style={{\r\n backgroundRepeat: \"no-repeat\",\r\n backgroundPosition: \"left center\",\r\n display: \"inline\",\r\n }}\r\n className={cn(\r\n `relative inline-block rounded-lg bg-gradient-to-r from-blue-100 to-purple-100 px-2 py-1 dark:from-blue-500 dark:to-purple-500`,\r\n className,\r\n )}\r\n {...props}>\r\n {text}\r\n </motion.span>\r\n );\r\n },\r\n);\r\nHighlightText.displayName = \"HighlightText\";\r\n\r\nexport {HighlightText, type HighlightTextProps};\r\n"],"names":["animation","HighlightText","React","text","className","inView","inViewMargin","transition","props","ref","localRef","inViewResult","useInView","isInView","motion","undefined","cn"],"mappings":";;;;;AAeA,MAAMA,YAAY;IAAC,gBAAgB;AAAW;AAE9C,MAAMC,gBAAgB,WAAhBA,GAAgBC,WACpB,CAAC,EAACC,IAAI,EAAEC,SAAS,EAAEC,SAAS,KAAK,EAAEC,eAAe,KAAK,EAAEC,aAAa;IAAC,UAAU;IAAG,MAAM;AAAW,CAAC,EAAE,GAAGC,OAAM,EAAEC;IACjH,MAAMC,WAAWR,OAA8B;IAC/CA,oBAA0BO,KAAK,IAAMC,SAAS,OAAO;IAErD,MAAMC,eAAeC,UAAUF,UAAU;QACvC,MAAM;QACN,QAAQJ;IACV;IACA,MAAMO,WAAW,CAACR,UAAUM;IAE5B,OAAO,WAAP,GACE,IAACG,OAAO,IAAI;QACV,KAAKJ;QACL,SAAS;YACP,gBAAgB;QAClB;QACA,SAASG,WAAWb,YAAYe;QAChC,YAAYR;QACZ,OAAO;YACL,kBAAkB;YAClB,oBAAoB;YACpB,SAAS;QACX;QACA,WAAWS,GACT,iIACAZ;QAED,GAAGI,KAAK;kBACRL;;AAGP;AAEFF,cAAc,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"hole-background.d.ts","sourceRoot":"","sources":["../../../src/components/ui/hole-background.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,UAAU,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC;IAC3E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7C;AAED,QAAA,MAAM,cAAc,+FAwVnB,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,CAAC"}
1
+ {"version":3,"file":"hole-background.d.ts","sourceRoot":"","sources":["../../../src/components/ui/hole-background.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,UAAU,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC;IAC3E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7C;AAKD,QAAA,MAAM,cAAc,+FAiTnB,CAAC;AAGF,OAAO,EAAC,cAAc,EAAE,KAAK,mBAAmB,EAAC,CAAC"}
@@ -1,8 +1,10 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
- import { forwardRef, useCallback, useEffect, useImperativeHandle, useRef } from "react";
4
3
  import { motion } from "motion/react";
5
- import { cn } from "../../lib/utils.js";
4
+ import { forwardRef, useCallback, useEffect, useImperativeHandle, useRef } from "react";
5
+ import { cn } from "../../lib/utilities.js";
6
+ const linear = (p)=>p;
7
+ const easeInExpo = (p)=>0 === p ? 0 : 2 ** (10 * (p - 1));
6
8
  const HoleBackground = /*#__PURE__*/ forwardRef(({ strokeColor = "#737373", numberOfLines = 50, numberOfDiscs = 50, particleRGBColor = [
7
9
  255,
8
10
  255,
@@ -30,8 +32,6 @@ const HoleBackground = /*#__PURE__*/ forwardRef(({ strokeColor = "#737373", numb
30
32
  particleArea: {},
31
33
  linesCanvas: null
32
34
  });
33
- const linear = (p)=>p;
34
- const easeInExpo = (p)=>0 === p ? 0 : Math.pow(2, 10 * (p - 1));
35
35
  const tweenValue = useCallback((start, end, p, ease = null)=>{
36
36
  const delta = end - start;
37
37
  const easeFn = "inExpo" === ease ? easeInExpo : linear;
@@ -100,7 +100,7 @@ const HoleBackground = /*#__PURE__*/ forwardRef(({ strokeColor = "#737373", numb
100
100
  stateRef.current.discs.push(disc);
101
101
  }
102
102
  const clipPath = new Path2D();
103
- const disc = stateRef.current.clip.disc;
103
+ const { disc } = stateRef.current.clip;
104
104
  clipPath.ellipse(disc.x, disc.y, disc.w, disc.h, 0, 0, 2 * Math.PI);
105
105
  clipPath.rect(disc.x - disc.w, 0, 2 * disc.w, disc.y);
106
106
  stateRef.current.clip.path = clipPath;
@@ -170,7 +170,7 @@ const HoleBackground = /*#__PURE__*/ forwardRef(({ strokeColor = "#737373", numb
170
170
  const setParticles = useCallback(()=>{
171
171
  const { width, height } = stateRef.current.rect;
172
172
  stateRef.current.particles = [];
173
- const disc = stateRef.current.clip.disc;
173
+ const { disc } = stateRef.current.clip;
174
174
  stateRef.current.particleArea = {
175
175
  sw: 0.5 * disc.w,
176
176
  ew: 2 * disc.w,
@@ -297,16 +297,16 @@ const HoleBackground = /*#__PURE__*/ forwardRef(({ strokeColor = "#737373", numb
297
297
  setParticles
298
298
  ]);
299
299
  return /*#__PURE__*/ jsxs("div", {
300
- className: cn("relative size-full overflow-hidden", 'before:content-[""] before:absolute before:top-1/2 before:left-1/2 before:block before:size-[140%] dark:before:[background:radial-gradient(ellipse_at_50%_55%,transparent_10%,black_50%)] before:[background:radial-gradient(ellipse_at_50%_55%,transparent_10%,white_50%)] before:[transform:translate3d(-50%,-50%,0)]', 'after:content-[""] after:absolute after:z-[5] after:top-1/2 after:left-1/2 after:block after:size-full after:[background:radial-gradient(ellipse_at_50%_75%,#a900ff_20%,transparent_75%)] after:[transform:translate3d(-50%,-50%,0)] after:mix-blend-overlay', className),
300
+ className: cn("relative size-full overflow-hidden", 'before:absolute before:top-1/2 before:left-1/2 before:block before:size-[140%] before:[transform:translate3d(-50%,-50%,0)] before:content-[""] before:[background:radial-gradient(ellipse_at_50%_55%,transparent_10%,white_50%)] dark:before:[background:radial-gradient(ellipse_at_50%_55%,transparent_10%,black_50%)]', 'after:absolute after:top-1/2 after:left-1/2 after:z-[5] after:block after:size-full after:[transform:translate3d(-50%,-50%,0)] after:mix-blend-overlay after:content-[""] after:[background:radial-gradient(ellipse_at_50%_75%,#a900ff_20%,transparent_75%)]', className),
301
301
  children: [
302
302
  children,
303
303
  /*#__PURE__*/ jsx("canvas", {
304
304
  ref: canvasRef,
305
- className: "absolute inset-0 block size-full dark:opacity-20 opacity-10",
305
+ className: "absolute inset-0 block size-full opacity-10 dark:opacity-20",
306
306
  ...props
307
307
  }),
308
308
  /*#__PURE__*/ jsx(motion.div, {
309
- className: cn("absolute top-[-71.5%] left-1/2 z-[3] w-[30%] h-[140%] rounded-b-full blur-3xl opacity-75 dark:mix-blend-plus-lighter mix-blend-plus-darker [transform:translate3d(-50%,0,0)] [background-position:0%_100%] [background-size:100%_200%]", "dark:[background:linear-gradient(20deg,#00f8f1,#ffbd1e20_16.5%,#fe848f_33%,#fe848f20_49.5%,#00f8f1_66%,#00f8f160_85.5%,#ffbd1e_100%)_0_100%_/_100%_200%] [background:linear-gradient(20deg,#00f8f1,#ffbd1e40_16.5%,#fe848f_33%,#fe848f40_49.5%,#00f8f1_66%,#00f8f180_85.5%,#ffbd1e_100%)_0_100%_/_100%_200%]"),
309
+ className: cn("absolute top-[-71.5%] left-1/2 z-[3] h-[140%] w-[30%] [transform:translate3d(-50%,0,0)] rounded-b-full [background-size:100%_200%] [background-position:0%_100%] opacity-75 mix-blend-plus-darker blur-3xl dark:mix-blend-plus-lighter", "[background:linear-gradient(20deg,#00f8f1,#ffbd1e40_16.5%,#fe848f_33%,#fe848f40_49.5%,#00f8f1_66%,#00f8f180_85.5%,#ffbd1e_100%)_0_100%_/_100%_200%] dark:[background:linear-gradient(20deg,#00f8f1,#ffbd1e20_16.5%,#fe848f_33%,#fe848f20_49.5%,#00f8f1_66%,#00f8f160_85.5%,#ffbd1e_100%)_0_100%_/_100%_200%]"),
310
310
  animate: {
311
311
  backgroundPosition: "0% 300%"
312
312
  },
@@ -317,11 +317,12 @@ const HoleBackground = /*#__PURE__*/ forwardRef(({ strokeColor = "#737373", numb
317
317
  }
318
318
  }),
319
319
  /*#__PURE__*/ jsx("div", {
320
- className: "absolute top-0 left-0 z-[7] size-full dark:[background:repeating-linear-gradient(transparent,transparent_1px,white_1px,white_2px)] mix-blend-overlay opacity-50"
320
+ className: "absolute top-0 left-0 z-[7] size-full opacity-50 mix-blend-overlay dark:[background:repeating-linear-gradient(transparent,transparent_1px,white_1px,white_2px)]"
321
321
  })
322
322
  ]
323
323
  });
324
324
  });
325
+ HoleBackground.displayName = "HoleBackground";
325
326
  export { HoleBackground };
326
327
 
327
328
  //# sourceMappingURL=hole-background.js.map