@arolariu/components 0.1.2 → 0.2.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 (323) hide show
  1. package/DEBUGGING.md +396 -396
  2. package/LICENSE.md +21 -21
  3. package/changelog.md +109 -118
  4. package/dist/components/ui/accordion.d.ts +2 -2
  5. package/dist/components/ui/accordion.d.ts.map +1 -1
  6. package/dist/components/ui/accordion.js +4 -4
  7. package/dist/components/ui/accordion.js.map +1 -1
  8. package/dist/components/ui/alert-dialog.d.ts +13 -13
  9. package/dist/components/ui/alert-dialog.d.ts.map +1 -1
  10. package/dist/components/ui/alert-dialog.js +4 -4
  11. package/dist/components/ui/alert-dialog.js.map +1 -1
  12. package/dist/components/ui/alert.d.ts +5 -5
  13. package/dist/components/ui/alert.d.ts.map +1 -1
  14. package/dist/components/ui/alert.js +3 -3
  15. package/dist/components/ui/alert.js.map +1 -1
  16. package/dist/components/ui/aspect-ratio.d.ts +1 -1
  17. package/dist/components/ui/aspect-ratio.d.ts.map +1 -1
  18. package/dist/components/ui/aspect-ratio.js +1 -1
  19. package/dist/components/ui/aspect-ratio.js.map +1 -1
  20. package/dist/components/ui/avatar.d.ts +2 -2
  21. package/dist/components/ui/avatar.d.ts.map +1 -1
  22. package/dist/components/ui/avatar.js +3 -3
  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 +4 -4
  28. package/dist/components/ui/badge.d.ts.map +1 -1
  29. package/dist/components/ui/badge.js +2 -2
  30. package/dist/components/ui/badge.js.map +1 -1
  31. package/dist/components/ui/breadcrumb.d.ts +6 -6
  32. package/dist/components/ui/breadcrumb.d.ts.map +1 -1
  33. package/dist/components/ui/breadcrumb.js +5 -5
  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.d.ts +5 -5
  40. package/dist/components/ui/button.d.ts.map +1 -1
  41. package/dist/components/ui/button.js +2 -2
  42. package/dist/components/ui/button.js.map +1 -1
  43. package/dist/components/ui/calendar.d.ts.map +1 -1
  44. package/dist/components/ui/calendar.js +4 -4
  45. package/dist/components/ui/calendar.js.map +1 -1
  46. package/dist/components/ui/card.d.ts +1 -1
  47. package/dist/components/ui/card.d.ts.map +1 -1
  48. package/dist/components/ui/card.js +3 -3
  49. package/dist/components/ui/card.js.map +1 -1
  50. package/dist/components/ui/carousel.d.ts +2 -2
  51. package/dist/components/ui/carousel.d.ts.map +1 -1
  52. package/dist/components/ui/carousel.js +3 -3
  53. package/dist/components/ui/carousel.js.map +1 -1
  54. package/dist/components/ui/chart.d.ts +4 -4
  55. package/dist/components/ui/chart.d.ts.map +1 -1
  56. package/dist/components/ui/chart.js +1 -1
  57. package/dist/components/ui/chart.js.map +1 -1
  58. package/dist/components/ui/checkbox.d.ts +1 -1
  59. package/dist/components/ui/checkbox.d.ts.map +1 -1
  60. package/dist/components/ui/checkbox.js +3 -3
  61. package/dist/components/ui/checkbox.js.map +1 -1
  62. package/dist/components/ui/collapsible.d.ts +2 -2
  63. package/dist/components/ui/collapsible.d.ts.map +1 -1
  64. package/dist/components/ui/collapsible.js +1 -1
  65. package/dist/components/ui/collapsible.js.map +1 -1
  66. package/dist/components/ui/command.d.ts +2 -2
  67. package/dist/components/ui/command.d.ts.map +1 -1
  68. package/dist/components/ui/command.js +9 -9
  69. package/dist/components/ui/command.js.map +1 -1
  70. package/dist/components/ui/context-menu.d.ts +2 -2
  71. package/dist/components/ui/context-menu.d.ts.map +1 -1
  72. package/dist/components/ui/context-menu.js +11 -11
  73. package/dist/components/ui/context-menu.js.map +1 -1
  74. package/dist/components/ui/counting-number.d.ts +1 -1
  75. package/dist/components/ui/counting-number.d.ts.map +1 -1
  76. package/dist/components/ui/counting-number.js +4 -3
  77. package/dist/components/ui/counting-number.js.map +1 -1
  78. package/dist/components/ui/dialog.d.ts +1 -1
  79. package/dist/components/ui/dialog.d.ts.map +1 -1
  80. package/dist/components/ui/dialog.js +6 -6
  81. package/dist/components/ui/dialog.js.map +1 -1
  82. package/dist/components/ui/dot-background.d.ts +10 -17
  83. package/dist/components/ui/dot-background.d.ts.map +1 -1
  84. package/dist/components/ui/dot-background.js +2 -2
  85. package/dist/components/ui/dot-background.js.map +1 -1
  86. package/dist/components/ui/drawer.d.ts +1 -1
  87. package/dist/components/ui/drawer.d.ts.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/dropdown-menu.d.ts +2 -2
  91. package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
  92. package/dist/components/ui/dropdown-menu.js +10 -10
  93. package/dist/components/ui/dropdown-menu.js.map +1 -1
  94. package/dist/components/ui/dropdrawer.d.ts +2 -2
  95. package/dist/components/ui/dropdrawer.d.ts.map +1 -1
  96. package/dist/components/ui/dropdrawer.js +12 -12
  97. package/dist/components/ui/dropdrawer.js.map +1 -1
  98. package/dist/components/ui/fireworks-background.d.ts.map +1 -1
  99. package/dist/components/ui/fireworks-background.js +1 -1
  100. package/dist/components/ui/fireworks-background.js.map +1 -1
  101. package/dist/components/ui/flip-button.d.ts +1 -1
  102. package/dist/components/ui/flip-button.d.ts.map +1 -1
  103. package/dist/components/ui/flip-button.js +3 -3
  104. package/dist/components/ui/flip-button.js.map +1 -1
  105. package/dist/components/ui/form.d.ts +3 -3
  106. package/dist/components/ui/form.d.ts.map +1 -1
  107. package/dist/components/ui/form.js +4 -4
  108. package/dist/components/ui/form.js.map +1 -1
  109. package/dist/components/ui/gradient-background.d.ts +1 -1
  110. package/dist/components/ui/gradient-background.d.ts.map +1 -1
  111. package/dist/components/ui/gradient-background.js +2 -2
  112. package/dist/components/ui/gradient-background.js.map +1 -1
  113. package/dist/components/ui/gradient-text.d.ts +1 -1
  114. package/dist/components/ui/gradient-text.d.ts.map +1 -1
  115. package/dist/components/ui/gradient-text.js +5 -5
  116. package/dist/components/ui/gradient-text.js.map +1 -1
  117. package/dist/components/ui/highlight-text.d.ts +1 -1
  118. package/dist/components/ui/highlight-text.d.ts.map +1 -1
  119. package/dist/components/ui/highlight-text.js +3 -3
  120. package/dist/components/ui/highlight-text.js.map +1 -1
  121. package/dist/components/ui/hole-background.d.ts.map +1 -1
  122. package/dist/components/ui/hole-background.js +11 -10
  123. package/dist/components/ui/hole-background.js.map +1 -1
  124. package/dist/components/ui/hover-card.d.ts +2 -2
  125. package/dist/components/ui/hover-card.d.ts.map +1 -1
  126. package/dist/components/ui/hover-card.js +3 -3
  127. package/dist/components/ui/hover-card.js.map +1 -1
  128. package/dist/components/ui/input-otp.d.ts +2 -2
  129. package/dist/components/ui/input-otp.d.ts.map +1 -1
  130. package/dist/components/ui/input-otp.js +5 -5
  131. package/dist/components/ui/input-otp.js.map +1 -1
  132. package/dist/components/ui/input.d.ts.map +1 -1
  133. package/dist/components/ui/input.js +2 -2
  134. package/dist/components/ui/input.js.map +1 -1
  135. package/dist/components/ui/label.d.ts +1 -1
  136. package/dist/components/ui/label.d.ts.map +1 -1
  137. package/dist/components/ui/label.js +2 -2
  138. package/dist/components/ui/label.js.map +1 -1
  139. package/dist/components/ui/menubar.d.ts +2 -2
  140. package/dist/components/ui/menubar.d.ts.map +1 -1
  141. package/dist/components/ui/menubar.js +12 -12
  142. package/dist/components/ui/menubar.js.map +1 -1
  143. package/dist/components/ui/navigation-menu.d.ts +3 -3
  144. package/dist/components/ui/navigation-menu.d.ts.map +1 -1
  145. package/dist/components/ui/navigation-menu.js +6 -7
  146. package/dist/components/ui/navigation-menu.js.map +1 -1
  147. package/dist/components/ui/pagination.d.ts +2 -2
  148. package/dist/components/ui/pagination.d.ts.map +1 -1
  149. package/dist/components/ui/pagination.js +8 -4
  150. package/dist/components/ui/pagination.js.map +1 -1
  151. package/dist/components/ui/popover.d.ts +2 -2
  152. package/dist/components/ui/popover.d.ts.map +1 -1
  153. package/dist/components/ui/popover.js +3 -3
  154. package/dist/components/ui/popover.js.map +1 -1
  155. package/dist/components/ui/progress.d.ts +1 -1
  156. package/dist/components/ui/progress.d.ts.map +1 -1
  157. package/dist/components/ui/progress.js +4 -4
  158. package/dist/components/ui/progress.js.map +1 -1
  159. package/dist/components/ui/radio-group.d.ts +1 -1
  160. package/dist/components/ui/radio-group.d.ts.map +1 -1
  161. package/dist/components/ui/radio-group.js +3 -3
  162. package/dist/components/ui/radio-group.js.map +1 -1
  163. package/dist/components/ui/resizable.d.ts +1 -1
  164. package/dist/components/ui/resizable.d.ts.map +1 -1
  165. package/dist/components/ui/resizable.js +5 -5
  166. package/dist/components/ui/resizable.js.map +1 -1
  167. package/dist/components/ui/ripple-button.d.ts +1 -1
  168. package/dist/components/ui/ripple-button.d.ts.map +1 -1
  169. package/dist/components/ui/ripple-button.js +4 -4
  170. package/dist/components/ui/ripple-button.js.map +1 -1
  171. package/dist/components/ui/scratcher.d.ts.map +1 -1
  172. package/dist/components/ui/scratcher.js +7 -5
  173. package/dist/components/ui/scratcher.js.map +1 -1
  174. package/dist/components/ui/scroll-area.d.ts +1 -1
  175. package/dist/components/ui/scroll-area.d.ts.map +1 -1
  176. package/dist/components/ui/scroll-area.js +4 -4
  177. package/dist/components/ui/scroll-area.js.map +1 -1
  178. package/dist/components/ui/select.d.ts +1 -1
  179. package/dist/components/ui/select.d.ts.map +1 -1
  180. package/dist/components/ui/select.js +7 -7
  181. package/dist/components/ui/select.js.map +1 -1
  182. package/dist/components/ui/separator.d.ts +1 -1
  183. package/dist/components/ui/separator.d.ts.map +1 -1
  184. package/dist/components/ui/separator.js +3 -3
  185. package/dist/components/ui/separator.js.map +1 -1
  186. package/dist/components/ui/sheet.d.ts +2 -2
  187. package/dist/components/ui/sheet.d.ts.map +1 -1
  188. package/dist/components/ui/sheet.js +6 -6
  189. package/dist/components/ui/sheet.js.map +1 -1
  190. package/dist/components/ui/sidebar.d.ts +5 -5
  191. package/dist/components/ui/sidebar.d.ts.map +1 -1
  192. package/dist/components/ui/sidebar.js +5 -5
  193. package/dist/components/ui/sidebar.js.map +1 -1
  194. package/dist/components/ui/skeleton.d.ts.map +1 -1
  195. package/dist/components/ui/skeleton.js +2 -2
  196. package/dist/components/ui/skeleton.js.map +1 -1
  197. package/dist/components/ui/slider.d.ts +1 -1
  198. package/dist/components/ui/slider.d.ts.map +1 -1
  199. package/dist/components/ui/slider.js +5 -5
  200. package/dist/components/ui/slider.js.map +1 -1
  201. package/dist/components/ui/sonner.d.ts +1 -1
  202. package/dist/components/ui/sonner.d.ts.map +1 -1
  203. package/dist/components/ui/sonner.js +1 -1
  204. package/dist/components/ui/sonner.js.map +1 -1
  205. package/dist/components/ui/switch.d.ts +1 -1
  206. package/dist/components/ui/switch.d.ts.map +1 -1
  207. package/dist/components/ui/switch.js +4 -4
  208. package/dist/components/ui/switch.js.map +1 -1
  209. package/dist/components/ui/table.d.ts +1 -1
  210. package/dist/components/ui/table.d.ts.map +1 -1
  211. package/dist/components/ui/table.js +5 -5
  212. package/dist/components/ui/table.js.map +1 -1
  213. package/dist/components/ui/tabs.d.ts +2 -2
  214. package/dist/components/ui/tabs.d.ts.map +1 -1
  215. package/dist/components/ui/tabs.js +4 -4
  216. package/dist/components/ui/tabs.js.map +1 -1
  217. package/dist/components/ui/textarea.d.ts +1 -1
  218. package/dist/components/ui/textarea.d.ts.map +1 -1
  219. package/dist/components/ui/textarea.js +2 -2
  220. package/dist/components/ui/textarea.js.map +1 -1
  221. package/dist/components/ui/toggle-group.d.ts +3 -3
  222. package/dist/components/ui/toggle-group.d.ts.map +1 -1
  223. package/dist/components/ui/toggle-group.js +2 -2
  224. package/dist/components/ui/toggle-group.js.map +1 -1
  225. package/dist/components/ui/toggle.d.ts +6 -6
  226. package/dist/components/ui/toggle.d.ts.map +1 -1
  227. package/dist/components/ui/toggle.js +2 -2
  228. package/dist/components/ui/toggle.js.map +1 -1
  229. package/dist/components/ui/tooltip.d.ts +6 -6
  230. package/dist/components/ui/tooltip.d.ts.map +1 -1
  231. package/dist/components/ui/tooltip.js +4 -4
  232. package/dist/components/ui/tooltip.js.map +1 -1
  233. package/dist/components/ui/typewriter.d.ts.map +1 -1
  234. package/dist/components/ui/typewriter.js +15 -11
  235. package/dist/components/ui/typewriter.js.map +1 -1
  236. package/dist/hooks/useIsMobile.d.ts +2 -5
  237. package/dist/hooks/useIsMobile.d.ts.map +1 -1
  238. package/dist/hooks/useIsMobile.js +1 -1
  239. package/dist/hooks/useIsMobile.js.map +1 -1
  240. package/dist/hooks/useWindowSize.d.ts +0 -1
  241. package/dist/hooks/useWindowSize.d.ts.map +1 -1
  242. package/dist/hooks/useWindowSize.js +1 -1
  243. package/dist/hooks/useWindowSize.js.map +1 -1
  244. package/dist/index.css +2 -2
  245. package/dist/index.css.map +1 -1
  246. package/dist/index.d.ts +37 -37
  247. package/dist/index.d.ts.map +1 -1
  248. package/dist/index.js +2 -2
  249. package/dist/lib/utilities.d.ts +9 -0
  250. package/dist/lib/utilities.d.ts.map +1 -0
  251. package/dist/lib/{utils.js → utilities.js} +1 -1
  252. package/dist/lib/utilities.js.map +1 -0
  253. package/package.json +85 -89
  254. package/{README.md → readme.md} +627 -627
  255. package/src/components/ui/accordion.tsx +56 -66
  256. package/src/components/ui/alert-dialog.tsx +135 -160
  257. package/src/components/ui/alert.tsx +58 -69
  258. package/src/components/ui/aspect-ratio.tsx +15 -12
  259. package/src/components/ui/avatar.tsx +38 -53
  260. package/src/components/ui/background-beams.tsx +145 -142
  261. package/src/components/ui/badge.tsx +47 -48
  262. package/src/components/ui/breadcrumb.tsx +97 -117
  263. package/src/components/ui/bubble-background.tsx +170 -189
  264. package/src/components/ui/button.tsx +61 -61
  265. package/src/components/ui/calendar.tsx +177 -216
  266. package/src/components/ui/card.tsx +83 -97
  267. package/src/components/ui/carousel.tsx +204 -241
  268. package/src/components/ui/chart.tsx +303 -385
  269. package/src/components/ui/checkbox.tsx +27 -32
  270. package/src/components/ui/collapsible.tsx +33 -34
  271. package/src/components/ui/command.tsx +137 -184
  272. package/src/components/ui/context-menu.tsx +229 -255
  273. package/src/components/ui/counting-number.tsx +92 -108
  274. package/src/components/ui/dialog.tsx +141 -146
  275. package/src/components/ui/dot-background.tsx +153 -158
  276. package/src/components/ui/drawer.tsx +133 -141
  277. package/src/components/ui/dropdown-menu.tsx +235 -260
  278. package/src/components/ui/dropdrawer.tsx +870 -973
  279. package/src/components/ui/fireworks-background.tsx +325 -378
  280. package/src/components/ui/flip-button.tsx +89 -110
  281. package/src/components/ui/form.tsx +145 -174
  282. package/src/components/ui/gradient-background.tsx +30 -43
  283. package/src/components/ui/gradient-text.tsx +62 -65
  284. package/src/components/ui/highlight-text.tsx +54 -71
  285. package/src/components/ui/hole-background.tsx +326 -361
  286. package/src/components/ui/hover-card.tsx +48 -44
  287. package/src/components/ui/input-otp.tsx +76 -77
  288. package/src/components/ui/input.tsx +22 -22
  289. package/src/components/ui/label.tsx +21 -24
  290. package/src/components/ui/menubar.tsx +256 -279
  291. package/src/components/ui/navigation-menu.tsx +135 -171
  292. package/src/components/ui/pagination.tsx +103 -129
  293. package/src/components/ui/popover.tsx +52 -48
  294. package/src/components/ui/progress.tsx +23 -31
  295. package/src/components/ui/radio-group.tsx +37 -45
  296. package/src/components/ui/resizable.tsx +52 -56
  297. package/src/components/ui/ripple-button.tsx +90 -111
  298. package/src/components/ui/scratcher.tsx +167 -171
  299. package/src/components/ui/scroll-area.tsx +45 -58
  300. package/src/components/ui/select.tsx +160 -191
  301. package/src/components/ui/separator.tsx +28 -28
  302. package/src/components/ui/sheet.tsx +133 -145
  303. package/src/components/ui/sidebar.tsx +673 -729
  304. package/src/components/ui/skeleton.tsx +16 -19
  305. package/src/components/ui/slider.tsx +49 -63
  306. package/src/components/ui/sonner.tsx +30 -26
  307. package/src/components/ui/switch.tsx +27 -31
  308. package/src/components/ui/table.tsx +98 -119
  309. package/src/components/ui/tabs.tsx +54 -66
  310. package/src/components/ui/textarea.tsx +20 -20
  311. package/src/components/ui/toggle-group.tsx +66 -73
  312. package/src/components/ui/toggle.tsx +46 -47
  313. package/src/components/ui/tooltip.tsx +56 -61
  314. package/src/components/ui/typewriter.tsx +174 -188
  315. package/src/hooks/useIsMobile.tsx +42 -45
  316. package/src/hooks/useWindowSize.tsx +66 -72
  317. package/src/index.css +73 -73
  318. package/src/index.ts +303 -408
  319. package/src/lib/utilities.ts +12 -0
  320. package/dist/lib/utils.d.ts +0 -7
  321. package/dist/lib/utils.d.ts.map +0 -1
  322. package/dist/lib/utils.js.map +0 -1
  323. package/src/lib/utils.ts +0 -10
@@ -1,117 +1,97 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import { Slot } from "@radix-ui/react-slot";
5
- import { ChevronRight, MoreHorizontal } from "lucide-react";
6
-
7
- import { cn } from "@/lib/utils";
8
-
9
- function Breadcrumb({ ...props }: React.ComponentProps<"nav">) {
10
- return <nav aria-label="breadcrumb" data-slot="breadcrumb" {...props} />;
11
- }
12
-
13
- function BreadcrumbList({ className, ...props }: React.ComponentProps<"ol">) {
14
- return (
15
- <ol
16
- data-slot="breadcrumb-list"
17
- className={cn(
18
- "text-neutral-500 flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5 dark:text-neutral-400",
19
- className,
20
- )}
21
- {...props}
22
- />
23
- );
24
- }
25
-
26
- function BreadcrumbItem({ className, ...props }: React.ComponentProps<"li">) {
27
- return (
28
- <li
29
- data-slot="breadcrumb-item"
30
- className={cn("inline-flex items-center gap-1.5", className)}
31
- {...props}
32
- />
33
- );
34
- }
35
-
36
- function BreadcrumbLink({
37
- asChild,
38
- className,
39
- ...props
40
- }: React.ComponentProps<"a"> & {
41
- asChild?: boolean;
42
- }) {
43
- const Comp = asChild ? Slot : "a";
44
-
45
- return (
46
- <Comp
47
- data-slot="breadcrumb-link"
48
- className={cn(
49
- "hover:text-neutral-950 transition-colors dark:hover:text-neutral-50",
50
- className,
51
- )}
52
- {...props}
53
- />
54
- );
55
- }
56
-
57
- function BreadcrumbPage({ className, ...props }: React.ComponentProps<"span">) {
58
- return (
59
- <span
60
- data-slot="breadcrumb-page"
61
- role="link"
62
- aria-disabled="true"
63
- aria-current="page"
64
- className={cn(
65
- "text-neutral-950 font-normal dark:text-neutral-50",
66
- className,
67
- )}
68
- {...props}
69
- />
70
- );
71
- }
72
-
73
- function BreadcrumbSeparator({
74
- children,
75
- className,
76
- ...props
77
- }: React.ComponentProps<"li">) {
78
- return (
79
- <li
80
- data-slot="breadcrumb-separator"
81
- role="presentation"
82
- aria-hidden="true"
83
- className={cn("[&>svg]:size-3.5", className)}
84
- {...props}
85
- >
86
- {children ?? <ChevronRight />}
87
- </li>
88
- );
89
- }
90
-
91
- function BreadcrumbEllipsis({
92
- className,
93
- ...props
94
- }: React.ComponentProps<"span">) {
95
- return (
96
- <span
97
- data-slot="breadcrumb-ellipsis"
98
- role="presentation"
99
- aria-hidden="true"
100
- className={cn("flex size-9 items-center justify-center", className)}
101
- {...props}
102
- >
103
- <MoreHorizontal className="size-4" />
104
- <span className="sr-only">More</span>
105
- </span>
106
- );
107
- }
108
-
109
- export {
110
- Breadcrumb,
111
- BreadcrumbList,
112
- BreadcrumbItem,
113
- BreadcrumbLink,
114
- BreadcrumbPage,
115
- BreadcrumbSeparator,
116
- BreadcrumbEllipsis,
117
- };
1
+ "use client";
2
+
3
+ import {Slot} from "@radix-ui/react-slot";
4
+ import {ChevronRight, MoreHorizontal} from "lucide-react";
5
+ import * as React from "react";
6
+
7
+ import {cn} from "@/lib/utilities";
8
+
9
+ function Breadcrumb({...props}: Readonly<React.ComponentProps<"nav">>) {
10
+ return (
11
+ <nav
12
+ aria-label='breadcrumb'
13
+ data-slot='breadcrumb'
14
+ {...props}
15
+ />
16
+ );
17
+ }
18
+
19
+ function BreadcrumbList({className, ...props}: Readonly<React.ComponentProps<"ol">>) {
20
+ return (
21
+ <ol
22
+ data-slot='breadcrumb-list'
23
+ className={cn("flex flex-wrap items-center gap-1.5 text-sm break-words text-neutral-500 sm:gap-2.5 dark:text-neutral-400", className)}
24
+ {...props}
25
+ />
26
+ );
27
+ }
28
+
29
+ function BreadcrumbItem({className, ...props}: Readonly<React.ComponentProps<"li">>) {
30
+ return (
31
+ <li
32
+ data-slot='breadcrumb-item'
33
+ className={cn("inline-flex items-center gap-1.5", className)}
34
+ {...props}
35
+ />
36
+ );
37
+ }
38
+
39
+ function BreadcrumbLink({
40
+ asChild,
41
+ className,
42
+ ...props
43
+ }: React.ComponentProps<"a"> & {
44
+ asChild?: boolean;
45
+ }) {
46
+ const Comp = asChild ? Slot : "a";
47
+
48
+ return (
49
+ <Comp
50
+ data-slot='breadcrumb-link'
51
+ className={cn("transition-colors hover:text-neutral-950 dark:hover:text-neutral-50", className)}
52
+ {...props}
53
+ />
54
+ );
55
+ }
56
+
57
+ function BreadcrumbPage({className, ...props}: React.ComponentProps<"span">) {
58
+ return (
59
+ <span
60
+ data-slot='breadcrumb-page'
61
+ role='link'
62
+ aria-disabled='true'
63
+ aria-current='page'
64
+ className={cn("font-normal text-neutral-950 dark:text-neutral-50", className)}
65
+ {...props}
66
+ />
67
+ );
68
+ }
69
+
70
+ function BreadcrumbSeparator({children, className, ...props}: Readonly<React.ComponentProps<"li">>) {
71
+ return (
72
+ <li
73
+ data-slot='breadcrumb-separator'
74
+ role='presentation'
75
+ aria-hidden='true'
76
+ className={cn("[&>svg]:size-3.5", className)}
77
+ {...props}>
78
+ {children ?? <ChevronRight />}
79
+ </li>
80
+ );
81
+ }
82
+
83
+ function BreadcrumbEllipsis({className, ...props}: Readonly<React.ComponentProps<"span">>) {
84
+ return (
85
+ <span
86
+ data-slot='breadcrumb-ellipsis'
87
+ role='presentation'
88
+ aria-hidden='true'
89
+ className={cn("flex size-9 items-center justify-center", className)}
90
+ {...props}>
91
+ <MoreHorizontal className='size-4' />
92
+ <span className='sr-only'>More</span>
93
+ </span>
94
+ );
95
+ }
96
+
97
+ export {Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator};
@@ -1,189 +1,170 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import {
5
- motion,
6
- type SpringOptions,
7
- Transition,
8
- useMotionValue,
9
- useSpring,
10
- } from "motion/react";
11
-
12
- import { cn } from "@/lib/utils";
13
-
14
- interface BubbleBackgroundProps extends React.HTMLAttributes<HTMLDivElement> {
15
- interactive?: boolean;
16
- transition?: SpringOptions;
17
- colors?: {
18
- first: string;
19
- second: string;
20
- third: string;
21
- fourth: string;
22
- fifth: string;
23
- sixth: string;
24
- };
25
- }
26
-
27
- const BubbleBackground = React.forwardRef<
28
- HTMLDivElement,
29
- BubbleBackgroundProps
30
- >(
31
- (
32
- {
33
- className,
34
- children,
35
- interactive = false,
36
- transition = { stiffness: 100, damping: 20 },
37
- colors = {
38
- first: "18,113,255",
39
- second: "221,74,255",
40
- third: "0,220,255",
41
- fourth: "200,50,50",
42
- fifth: "180,180,50",
43
- sixth: "140,100,255",
44
- },
45
- ...props
46
- },
47
- ref,
48
- ) => {
49
- const containerRef = React.useRef<HTMLDivElement>(null);
50
- React.useImperativeHandle(
51
- ref,
52
- () => containerRef.current as HTMLDivElement,
53
- );
54
-
55
- const mouseX = useMotionValue(0);
56
- const mouseY = useMotionValue(0);
57
- const springX = useSpring(mouseX, transition);
58
- const springY = useSpring(mouseY, transition);
59
-
60
- React.useEffect(() => {
61
- if (!interactive) return;
62
-
63
- const currentContainer = containerRef.current;
64
- if (!currentContainer) return;
65
-
66
- const handleMouseMove = (e: MouseEvent) => {
67
- const rect = currentContainer.getBoundingClientRect();
68
- const centerX = rect.left + rect.width / 2;
69
- const centerY = rect.top + rect.height / 2;
70
- mouseX.set(e.clientX - centerX);
71
- mouseY.set(e.clientY - centerY);
72
- };
73
-
74
- currentContainer?.addEventListener("mousemove", handleMouseMove);
75
- return () =>
76
- currentContainer?.removeEventListener("mousemove", handleMouseMove);
77
- }, [interactive, mouseX, mouseY]);
78
-
79
- return (
80
- <div
81
- ref={containerRef}
82
- className={cn(
83
- "relative size-full overflow-hidden bg-gradient-to-br from-violet-900 to-blue-900",
84
- className,
85
- )}
86
- {...props}
87
- >
88
- <style>
89
- {`
90
- :root {
91
- --first-color: ${colors.first};
92
- --second-color: ${colors.second};
93
- --third-color: ${colors.third};
94
- --fourth-color: ${colors.fourth};
95
- --fifth-color: ${colors.fifth};
96
- --sixth-color: ${colors.sixth};
97
- }
98
- `}
99
- </style>
100
-
101
- <svg
102
- xmlns="http://www.w3.org/2000/svg"
103
- className="absolute top-0 left-0 w-0 h-0"
104
- >
105
- <defs>
106
- <filter id="goo">
107
- <feGaussianBlur
108
- in="SourceGraphic"
109
- stdDeviation="10"
110
- result="blur"
111
- />
112
- <feColorMatrix
113
- in="blur"
114
- mode="matrix"
115
- values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -8"
116
- result="goo"
117
- />
118
- <feBlend in="SourceGraphic" in2="goo" />
119
- </filter>
120
- </defs>
121
- </svg>
122
-
123
- <div
124
- className="absolute inset-0"
125
- style={{ filter: "url(#goo) blur(40px)" }}
126
- >
127
- <motion.div
128
- className="absolute rounded-full size-[80%] top-[10%] left-[10%] mix-blend-hard-light bg-[radial-gradient(circle_at_center,rgba(var(--first-color),0.8)_0%,rgba(var(--first-color),0)_50%)]"
129
- animate={{ y: [-50, 50, -50] }}
130
- transition={{ duration: 30, ease: "easeInOut", repeat: Infinity }}
131
- />
132
-
133
- <motion.div
134
- className="absolute inset-0 flex justify-center items-center origin-[calc(50%-400px)]"
135
- animate={{ rotate: 360 }}
136
- transition={
137
- {
138
- duration: 20,
139
- ease: "linear",
140
- repeat: Infinity,
141
- repeatType: "reverse",
142
- } satisfies Transition
143
- }
144
- >
145
- <div className="rounded-full size-[80%] top-[10%] left-[10%] mix-blend-hard-light bg-[radial-gradient(circle_at_center,rgba(var(--second-color),0.8)_0%,rgba(var(--second-color),0)_50%)]" />
146
- </motion.div>
147
-
148
- <motion.div
149
- className="absolute inset-0 flex justify-center items-center origin-[calc(50%+400px)]"
150
- animate={{ rotate: 360 }}
151
- transition={{ duration: 40, ease: "linear", repeat: Infinity }}
152
- >
153
- <div className="absolute rounded-full size-[80%] bg-[radial-gradient(circle_at_center,rgba(var(--third-color),0.8)_0%,rgba(var(--third-color),0)_50%)] mix-blend-hard-light top-[calc(50%+200px)] left-[calc(50%-500px)]" />
154
- </motion.div>
155
-
156
- <motion.div
157
- className="absolute rounded-full size-[80%] top-[10%] left-[10%] mix-blend-hard-light bg-[radial-gradient(circle_at_center,rgba(var(--fourth-color),0.8)_0%,rgba(var(--fourth-color),0)_50%)] opacity-70"
158
- animate={{ x: [-50, 50, -50] }}
159
- transition={{ duration: 40, ease: "easeInOut", repeat: Infinity }}
160
- />
161
-
162
- <motion.div
163
- className="absolute inset-0 flex justify-center items-center origin-[calc(50%_-_800px)_calc(50%_+_200px)]"
164
- animate={{ rotate: 360 }}
165
- transition={{ duration: 20, ease: "linear", repeat: Infinity }}
166
- >
167
- <div className="absolute rounded-full size-[160%] mix-blend-hard-light bg-[radial-gradient(circle_at_center,rgba(var(--fifth-color),0.8)_0%,rgba(var(--fifth-color),0)_50%)] top-[calc(50%-80%)] left-[calc(50%-80%)]" />
168
- </motion.div>
169
-
170
- {interactive && (
171
- <motion.div
172
- className="absolute rounded-full size-full mix-blend-hard-light bg-[radial-gradient(circle_at_center,rgba(var(--sixth-color),0.8)_0%,rgba(var(--sixth-color),0)_50%)] opacity-70"
173
- style={{
174
- x: springX,
175
- y: springY,
176
- }}
177
- />
178
- )}
179
- </div>
180
-
181
- {children}
182
- </div>
183
- );
184
- },
185
- );
186
-
187
- BubbleBackground.displayName = "BubbleBackground";
188
-
189
- export { BubbleBackground, type BubbleBackgroundProps };
1
+ "use client";
2
+
3
+ import {motion, type SpringOptions, Transition, useMotionValue, useSpring} from "motion/react";
4
+ import * as React from "react";
5
+
6
+ import {cn} from "@/lib/utilities";
7
+
8
+ interface BubbleBackgroundProps extends React.HTMLAttributes<HTMLDivElement> {
9
+ interactive?: boolean;
10
+ transition?: SpringOptions;
11
+ colors?: {
12
+ first: string;
13
+ second: string;
14
+ third: string;
15
+ fourth: string;
16
+ fifth: string;
17
+ sixth: string;
18
+ };
19
+ }
20
+
21
+ const BubbleBackground = React.forwardRef<HTMLDivElement, BubbleBackgroundProps>(
22
+ (
23
+ {
24
+ className,
25
+ children,
26
+ interactive = false,
27
+ transition = {stiffness: 100, damping: 20},
28
+ colors = {
29
+ first: "18,113,255",
30
+ second: "221,74,255",
31
+ third: "0,220,255",
32
+ fourth: "200,50,50",
33
+ fifth: "180,180,50",
34
+ sixth: "140,100,255",
35
+ },
36
+ ...props
37
+ },
38
+ ref,
39
+ ) => {
40
+ const containerRef = React.useRef<HTMLDivElement>(null);
41
+ React.useImperativeHandle(ref, () => containerRef.current as HTMLDivElement);
42
+
43
+ const mouseX = useMotionValue(0);
44
+ const mouseY = useMotionValue(0);
45
+ const springX = useSpring(mouseX, transition);
46
+ const springY = useSpring(mouseY, transition);
47
+
48
+ React.useEffect(() => {
49
+ if (!interactive) return;
50
+
51
+ const currentContainer = containerRef.current;
52
+ if (!currentContainer) return;
53
+
54
+ const handleMouseMove = (e: MouseEvent) => {
55
+ const rect = currentContainer.getBoundingClientRect();
56
+ const centerX = rect.left + rect.width / 2;
57
+ const centerY = rect.top + rect.height / 2;
58
+ mouseX.set(e.clientX - centerX);
59
+ mouseY.set(e.clientY - centerY);
60
+ };
61
+
62
+ currentContainer?.addEventListener("mousemove", handleMouseMove);
63
+ return () => currentContainer?.removeEventListener("mousemove", handleMouseMove);
64
+ }, [interactive, mouseX, mouseY]);
65
+
66
+ return (
67
+ <div
68
+ ref={containerRef}
69
+ className={cn("relative size-full overflow-hidden bg-gradient-to-br from-violet-900 to-blue-900", className)}
70
+ {...props}>
71
+ <style>
72
+ {`
73
+ :root {
74
+ --first-color: ${colors.first};
75
+ --second-color: ${colors.second};
76
+ --third-color: ${colors.third};
77
+ --fourth-color: ${colors.fourth};
78
+ --fifth-color: ${colors.fifth};
79
+ --sixth-color: ${colors.sixth};
80
+ }
81
+ `}
82
+ </style>
83
+
84
+ <svg
85
+ xmlns='http://www.w3.org/2000/svg'
86
+ className='absolute top-0 left-0 h-0 w-0'>
87
+ <defs>
88
+ <filter id='goo'>
89
+ <feGaussianBlur
90
+ in='SourceGraphic'
91
+ stdDeviation='10'
92
+ result='blur'
93
+ />
94
+ <feColorMatrix
95
+ in='blur'
96
+ mode='matrix'
97
+ values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -8'
98
+ result='goo'
99
+ />
100
+ <feBlend
101
+ in='SourceGraphic'
102
+ in2='goo'
103
+ />
104
+ </filter>
105
+ </defs>
106
+ </svg>
107
+
108
+ <div
109
+ className='absolute inset-0'
110
+ style={{filter: "url(#goo) blur(40px)"}}>
111
+ <motion.div
112
+ className='absolute top-[10%] left-[10%] size-[80%] rounded-full bg-[radial-gradient(circle_at_center,rgba(var(--first-color),0.8)_0%,rgba(var(--first-color),0)_50%)] mix-blend-hard-light'
113
+ animate={{y: [-50, 50, -50]}}
114
+ transition={{duration: 30, ease: "easeInOut", repeat: Infinity}}
115
+ />
116
+
117
+ <motion.div
118
+ className='absolute inset-0 flex origin-[calc(50%-400px)] items-center justify-center'
119
+ animate={{rotate: 360}}
120
+ transition={
121
+ {
122
+ duration: 20,
123
+ ease: "linear",
124
+ repeat: Infinity,
125
+ repeatType: "reverse",
126
+ } satisfies Transition
127
+ }>
128
+ <div className='top-[10%] left-[10%] size-[80%] rounded-full bg-[radial-gradient(circle_at_center,rgba(var(--second-color),0.8)_0%,rgba(var(--second-color),0)_50%)] mix-blend-hard-light' />
129
+ </motion.div>
130
+
131
+ <motion.div
132
+ className='absolute inset-0 flex origin-[calc(50%+400px)] items-center justify-center'
133
+ animate={{rotate: 360}}
134
+ transition={{duration: 40, ease: "linear", repeat: Infinity}}>
135
+ <div className='absolute top-[calc(50%+200px)] left-[calc(50%-500px)] size-[80%] rounded-full bg-[radial-gradient(circle_at_center,rgba(var(--third-color),0.8)_0%,rgba(var(--third-color),0)_50%)] mix-blend-hard-light' />
136
+ </motion.div>
137
+
138
+ <motion.div
139
+ className='absolute top-[10%] left-[10%] size-[80%] rounded-full bg-[radial-gradient(circle_at_center,rgba(var(--fourth-color),0.8)_0%,rgba(var(--fourth-color),0)_50%)] opacity-70 mix-blend-hard-light'
140
+ animate={{x: [-50, 50, -50]}}
141
+ transition={{duration: 40, ease: "easeInOut", repeat: Infinity}}
142
+ />
143
+
144
+ <motion.div
145
+ className='absolute inset-0 flex origin-[calc(50%_-_800px)_calc(50%_+_200px)] items-center justify-center'
146
+ animate={{rotate: 360}}
147
+ transition={{duration: 20, ease: "linear", repeat: Infinity}}>
148
+ <div className='absolute top-[calc(50%-80%)] left-[calc(50%-80%)] size-[160%] rounded-full bg-[radial-gradient(circle_at_center,rgba(var(--fifth-color),0.8)_0%,rgba(var(--fifth-color),0)_50%)] mix-blend-hard-light' />
149
+ </motion.div>
150
+
151
+ {Boolean(interactive) && (
152
+ <motion.div
153
+ className='absolute size-full rounded-full bg-[radial-gradient(circle_at_center,rgba(var(--sixth-color),0.8)_0%,rgba(var(--sixth-color),0)_50%)] opacity-70 mix-blend-hard-light'
154
+ style={{
155
+ x: springX,
156
+ y: springY,
157
+ }}
158
+ />
159
+ )}
160
+ </div>
161
+
162
+ {children}
163
+ </div>
164
+ );
165
+ },
166
+ );
167
+
168
+ BubbleBackground.displayName = "BubbleBackground";
169
+
170
+ export {BubbleBackground, type BubbleBackgroundProps};