@arolariu/components 0.0.35 → 0.0.37

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 (293) hide show
  1. package/changelog.md +13 -0
  2. package/dist/cjs/components/ui/accordion.cjs +1 -1
  3. package/dist/cjs/components/ui/accordion.cjs.map +1 -1
  4. package/dist/cjs/components/ui/alert-dialog.cjs +1 -1
  5. package/dist/cjs/components/ui/alert-dialog.cjs.map +1 -1
  6. package/dist/cjs/components/ui/alert.cjs +1 -1
  7. package/dist/cjs/components/ui/alert.cjs.map +1 -1
  8. package/dist/cjs/components/ui/aspect-ratio.cjs.map +1 -1
  9. package/dist/cjs/components/ui/avatar.cjs.map +1 -1
  10. package/dist/cjs/components/ui/background-beams.cjs +210 -0
  11. package/dist/cjs/components/ui/background-beams.cjs.map +1 -0
  12. package/dist/cjs/components/ui/badge.cjs +1 -1
  13. package/dist/cjs/components/ui/badge.cjs.map +1 -1
  14. package/dist/cjs/components/ui/breadcrumb.cjs.map +1 -1
  15. package/dist/cjs/components/ui/bubble-background.cjs +214 -0
  16. package/dist/cjs/components/ui/bubble-background.cjs.map +1 -0
  17. package/dist/cjs/components/ui/button.cjs +6 -6
  18. package/dist/cjs/components/ui/button.cjs.map +1 -1
  19. package/dist/cjs/components/ui/card.cjs +13 -3
  20. package/dist/cjs/components/ui/card.cjs.map +1 -1
  21. package/dist/cjs/components/ui/carousel.cjs.map +1 -1
  22. package/dist/cjs/components/ui/chart.cjs.map +1 -1
  23. package/dist/cjs/components/ui/checkbox.cjs +1 -1
  24. package/dist/cjs/components/ui/checkbox.cjs.map +1 -1
  25. package/dist/cjs/components/ui/collapsible.cjs +1 -1
  26. package/dist/cjs/components/ui/collapsible.cjs.map +1 -1
  27. package/dist/cjs/components/ui/command.cjs +2 -2
  28. package/dist/cjs/components/ui/command.cjs.map +1 -1
  29. package/dist/cjs/components/ui/context-menu.cjs +7 -7
  30. package/dist/cjs/components/ui/context-menu.cjs.map +1 -1
  31. package/dist/cjs/components/ui/counting-number.cjs +95 -0
  32. package/dist/cjs/components/ui/counting-number.cjs.map +1 -0
  33. package/dist/cjs/components/ui/dialog.cjs +1 -1
  34. package/dist/cjs/components/ui/dialog.cjs.map +1 -1
  35. package/dist/cjs/components/ui/dot-background.cjs +131 -0
  36. package/dist/cjs/components/ui/dot-background.cjs.map +1 -0
  37. package/dist/cjs/components/ui/drawer.cjs +3 -3
  38. package/dist/cjs/components/ui/drawer.cjs.map +1 -1
  39. package/dist/cjs/components/ui/dropdown-menu.cjs +7 -7
  40. package/dist/cjs/components/ui/dropdown-menu.cjs.map +1 -1
  41. package/dist/cjs/components/ui/fireworks-background.cjs +259 -0
  42. package/dist/cjs/components/ui/fireworks-background.cjs.map +1 -0
  43. package/dist/cjs/components/ui/flip-button.cjs +100 -0
  44. package/dist/cjs/components/ui/flip-button.cjs.map +1 -0
  45. package/dist/cjs/components/ui/form.cjs +2 -2
  46. package/dist/cjs/components/ui/form.cjs.map +1 -1
  47. package/dist/cjs/components/ui/gradient-background.cjs +60 -0
  48. package/dist/cjs/components/ui/gradient-background.cjs.map +1 -0
  49. package/dist/cjs/components/ui/gradient-text.cjs +83 -0
  50. package/dist/cjs/components/ui/gradient-text.cjs.map +1 -0
  51. package/dist/cjs/components/ui/highlight-text.cjs +74 -0
  52. package/dist/cjs/components/ui/highlight-text.cjs.map +1 -0
  53. package/dist/cjs/components/ui/hole-background.cjs +361 -0
  54. package/dist/cjs/components/ui/hole-background.cjs.map +1 -0
  55. package/dist/cjs/components/ui/hover-card.cjs +9 -6
  56. package/dist/cjs/components/ui/hover-card.cjs.map +1 -1
  57. package/dist/cjs/components/ui/input-otp.cjs +2 -3
  58. package/dist/cjs/components/ui/input-otp.cjs.map +1 -1
  59. package/dist/cjs/components/ui/input.cjs +1 -1
  60. package/dist/cjs/components/ui/input.cjs.map +1 -1
  61. package/dist/cjs/components/ui/label.cjs.map +1 -1
  62. package/dist/cjs/components/ui/menubar.cjs +9 -9
  63. package/dist/cjs/components/ui/menubar.cjs.map +1 -1
  64. package/dist/cjs/components/ui/navigation-menu.cjs +5 -5
  65. package/dist/cjs/components/ui/navigation-menu.cjs.map +1 -1
  66. package/dist/cjs/components/ui/pagination.cjs.map +1 -1
  67. package/dist/cjs/components/ui/popover.cjs +1 -1
  68. package/dist/cjs/components/ui/popover.cjs.map +1 -1
  69. package/dist/cjs/components/ui/progress.cjs.map +1 -1
  70. package/dist/cjs/components/ui/radio-group.cjs +1 -1
  71. package/dist/cjs/components/ui/radio-group.cjs.map +1 -1
  72. package/dist/cjs/components/ui/resizable.cjs.map +1 -1
  73. package/dist/cjs/components/ui/ripple-button.cjs +108 -0
  74. package/dist/cjs/components/ui/ripple-button.cjs.map +1 -0
  75. package/dist/cjs/components/ui/scratcher.cjs +179 -0
  76. package/dist/cjs/components/ui/scratcher.cjs.map +1 -0
  77. package/dist/cjs/components/ui/scroll-area.cjs +1 -1
  78. package/dist/cjs/components/ui/scroll-area.cjs.map +1 -1
  79. package/dist/cjs/components/ui/select.cjs +6 -5
  80. package/dist/cjs/components/ui/select.cjs.map +1 -1
  81. package/dist/cjs/components/ui/separator.cjs.map +1 -1
  82. package/dist/cjs/components/ui/sheet.cjs +1 -1
  83. package/dist/cjs/components/ui/sheet.cjs.map +1 -1
  84. package/dist/cjs/components/ui/sidebar.cjs +14 -11
  85. package/dist/cjs/components/ui/sidebar.cjs.map +1 -1
  86. package/dist/cjs/components/ui/skeleton.cjs +2 -1
  87. package/dist/cjs/components/ui/skeleton.cjs.map +1 -1
  88. package/dist/cjs/components/ui/slider.cjs +2 -2
  89. package/dist/cjs/components/ui/slider.cjs.map +1 -1
  90. package/dist/cjs/components/ui/sonner.cjs +5 -7
  91. package/dist/cjs/components/ui/sonner.cjs.map +1 -1
  92. package/dist/cjs/components/ui/switch.cjs +2 -2
  93. package/dist/cjs/components/ui/switch.cjs.map +1 -1
  94. package/dist/cjs/components/ui/table.cjs +2 -2
  95. package/dist/cjs/components/ui/table.cjs.map +1 -1
  96. package/dist/cjs/components/ui/tabs.cjs +3 -3
  97. package/dist/cjs/components/ui/tabs.cjs.map +1 -1
  98. package/dist/cjs/components/ui/textarea.cjs +1 -1
  99. package/dist/cjs/components/ui/textarea.cjs.map +1 -1
  100. package/dist/cjs/components/ui/toggle-group.cjs +2 -2
  101. package/dist/cjs/components/ui/toggle-group.cjs.map +1 -1
  102. package/dist/cjs/components/ui/toggle.cjs +2 -2
  103. package/dist/cjs/components/ui/toggle.cjs.map +1 -1
  104. package/dist/cjs/components/ui/tooltip.cjs +1 -1
  105. package/dist/cjs/components/ui/tooltip.cjs.map +1 -1
  106. package/dist/cjs/index.cjs +55 -4
  107. package/dist/cjs/index.css +1013 -258
  108. package/dist/esm/components/ui/accordion.js +1 -1
  109. package/dist/esm/components/ui/accordion.js.map +1 -1
  110. package/dist/esm/components/ui/alert-dialog.js +1 -1
  111. package/dist/esm/components/ui/alert-dialog.js.map +1 -1
  112. package/dist/esm/components/ui/alert.js +1 -1
  113. package/dist/esm/components/ui/alert.js.map +1 -1
  114. package/dist/esm/components/ui/aspect-ratio.js.map +1 -1
  115. package/dist/esm/components/ui/avatar.js.map +1 -1
  116. package/dist/esm/components/ui/background-beams.js +166 -0
  117. package/dist/esm/components/ui/background-beams.js.map +1 -0
  118. package/dist/esm/components/ui/badge.js +1 -1
  119. package/dist/esm/components/ui/badge.js.map +1 -1
  120. package/dist/esm/components/ui/breadcrumb.js.map +1 -1
  121. package/dist/esm/components/ui/bubble-background.js +180 -0
  122. package/dist/esm/components/ui/bubble-background.js.map +1 -0
  123. package/dist/esm/components/ui/button.js +6 -6
  124. package/dist/esm/components/ui/button.js.map +1 -1
  125. package/dist/esm/components/ui/card.js +11 -4
  126. package/dist/esm/components/ui/card.js.map +1 -1
  127. package/dist/esm/components/ui/carousel.js.map +1 -1
  128. package/dist/esm/components/ui/chart.js.map +1 -1
  129. package/dist/esm/components/ui/checkbox.js +1 -1
  130. package/dist/esm/components/ui/checkbox.js.map +1 -1
  131. package/dist/esm/components/ui/collapsible.js +1 -1
  132. package/dist/esm/components/ui/collapsible.js.map +1 -1
  133. package/dist/esm/components/ui/command.js +2 -2
  134. package/dist/esm/components/ui/command.js.map +1 -1
  135. package/dist/esm/components/ui/context-menu.js +7 -7
  136. package/dist/esm/components/ui/context-menu.js.map +1 -1
  137. package/dist/esm/components/ui/counting-number.js +61 -0
  138. package/dist/esm/components/ui/counting-number.js.map +1 -0
  139. package/dist/esm/components/ui/dialog.js +1 -1
  140. package/dist/esm/components/ui/dialog.js.map +1 -1
  141. package/dist/esm/components/ui/dot-background.js +97 -0
  142. package/dist/esm/components/ui/dot-background.js.map +1 -0
  143. package/dist/esm/components/ui/drawer.js +3 -3
  144. package/dist/esm/components/ui/drawer.js.map +1 -1
  145. package/dist/esm/components/ui/dropdown-menu.js +7 -7
  146. package/dist/esm/components/ui/dropdown-menu.js.map +1 -1
  147. package/dist/esm/components/ui/fireworks-background.js +225 -0
  148. package/dist/esm/components/ui/fireworks-background.js.map +1 -0
  149. package/dist/esm/components/ui/flip-button.js +66 -0
  150. package/dist/esm/components/ui/flip-button.js.map +1 -0
  151. package/dist/esm/components/ui/form.js +2 -2
  152. package/dist/esm/components/ui/form.js.map +1 -1
  153. package/dist/esm/components/ui/gradient-background.js +26 -0
  154. package/dist/esm/components/ui/gradient-background.js.map +1 -0
  155. package/dist/esm/components/ui/gradient-text.js +49 -0
  156. package/dist/esm/components/ui/gradient-text.js.map +1 -0
  157. package/dist/esm/components/ui/highlight-text.js +40 -0
  158. package/dist/esm/components/ui/highlight-text.js.map +1 -0
  159. package/dist/esm/components/ui/hole-background.js +327 -0
  160. package/dist/esm/components/ui/hole-background.js.map +1 -0
  161. package/dist/esm/components/ui/hover-card.js +9 -6
  162. package/dist/esm/components/ui/hover-card.js.map +1 -1
  163. package/dist/esm/components/ui/input-otp.js +2 -3
  164. package/dist/esm/components/ui/input-otp.js.map +1 -1
  165. package/dist/esm/components/ui/input.js +1 -1
  166. package/dist/esm/components/ui/input.js.map +1 -1
  167. package/dist/esm/components/ui/label.js.map +1 -1
  168. package/dist/esm/components/ui/menubar.js +9 -9
  169. package/dist/esm/components/ui/menubar.js.map +1 -1
  170. package/dist/esm/components/ui/navigation-menu.js +5 -5
  171. package/dist/esm/components/ui/navigation-menu.js.map +1 -1
  172. package/dist/esm/components/ui/pagination.js.map +1 -1
  173. package/dist/esm/components/ui/popover.js +1 -1
  174. package/dist/esm/components/ui/popover.js.map +1 -1
  175. package/dist/esm/components/ui/progress.js.map +1 -1
  176. package/dist/esm/components/ui/radio-group.js +1 -1
  177. package/dist/esm/components/ui/radio-group.js.map +1 -1
  178. package/dist/esm/components/ui/resizable.js.map +1 -1
  179. package/dist/esm/components/ui/ripple-button.js +74 -0
  180. package/dist/esm/components/ui/ripple-button.js.map +1 -0
  181. package/dist/esm/components/ui/scratcher.js +145 -0
  182. package/dist/esm/components/ui/scratcher.js.map +1 -0
  183. package/dist/esm/components/ui/scroll-area.js +1 -1
  184. package/dist/esm/components/ui/scroll-area.js.map +1 -1
  185. package/dist/esm/components/ui/select.js +6 -5
  186. package/dist/esm/components/ui/select.js.map +1 -1
  187. package/dist/esm/components/ui/separator.js.map +1 -1
  188. package/dist/esm/components/ui/sheet.js +1 -1
  189. package/dist/esm/components/ui/sheet.js.map +1 -1
  190. package/dist/esm/components/ui/sidebar.js +14 -11
  191. package/dist/esm/components/ui/sidebar.js.map +1 -1
  192. package/dist/esm/components/ui/skeleton.js +2 -1
  193. package/dist/esm/components/ui/skeleton.js.map +1 -1
  194. package/dist/esm/components/ui/slider.js +2 -2
  195. package/dist/esm/components/ui/slider.js.map +1 -1
  196. package/dist/esm/components/ui/sonner.js +5 -7
  197. package/dist/esm/components/ui/sonner.js.map +1 -1
  198. package/dist/esm/components/ui/switch.js +2 -2
  199. package/dist/esm/components/ui/switch.js.map +1 -1
  200. package/dist/esm/components/ui/table.js +2 -2
  201. package/dist/esm/components/ui/table.js.map +1 -1
  202. package/dist/esm/components/ui/tabs.js +3 -3
  203. package/dist/esm/components/ui/tabs.js.map +1 -1
  204. package/dist/esm/components/ui/textarea.js +1 -1
  205. package/dist/esm/components/ui/textarea.js.map +1 -1
  206. package/dist/esm/components/ui/toggle-group.js +2 -2
  207. package/dist/esm/components/ui/toggle-group.js.map +1 -1
  208. package/dist/esm/components/ui/toggle.js +2 -2
  209. package/dist/esm/components/ui/toggle.js.map +1 -1
  210. package/dist/esm/components/ui/tooltip.js +1 -1
  211. package/dist/esm/components/ui/tooltip.js.map +1 -1
  212. package/dist/esm/index.css +1013 -258
  213. package/dist/esm/index.js +26 -1
  214. package/dist/index.css +1013 -258
  215. package/dist/index.js +26 -1
  216. package/dist/types/components/ui/background-beams.d.ts +4 -0
  217. package/dist/types/components/ui/bubble-background.d.ts +16 -0
  218. package/dist/types/components/ui/card.d.ts +2 -1
  219. package/dist/types/components/ui/counting-number.d.ts +15 -0
  220. package/dist/types/components/ui/dot-background.d.ts +57 -0
  221. package/dist/types/components/ui/fireworks-background.d.ts +24 -0
  222. package/dist/types/components/ui/flip-button.d.ts +13 -0
  223. package/dist/types/components/ui/form.d.ts +1 -1
  224. package/dist/types/components/ui/gradient-background.d.ts +7 -0
  225. package/dist/types/components/ui/gradient-text.d.ts +10 -0
  226. package/dist/types/components/ui/highlight-text.d.ts +11 -0
  227. package/dist/types/components/ui/hole-background.d.ts +9 -0
  228. package/dist/types/components/ui/ripple-button.d.ts +10 -0
  229. package/dist/types/components/ui/scratcher.d.ts +12 -0
  230. package/dist/types/components/ui/select.d.ts +3 -1
  231. package/dist/types/components/ui/sidebar.d.ts +5 -6
  232. package/dist/types/index.d.ts +13 -1
  233. package/package.json +536 -461
  234. package/readme.md +10 -6
  235. package/src/components/ui/accordion.tsx +3 -2
  236. package/src/components/ui/alert-dialog.tsx +160 -160
  237. package/src/components/ui/alert.tsx +3 -2
  238. package/src/components/ui/aspect-ratio.tsx +12 -12
  239. package/src/components/ui/avatar.tsx +53 -52
  240. package/src/components/ui/background-beams.tsx +142 -0
  241. package/src/components/ui/badge.tsx +48 -47
  242. package/src/components/ui/breadcrumb.tsx +117 -116
  243. package/src/components/ui/bubble-background.tsx +187 -0
  244. package/src/components/ui/button.tsx +61 -60
  245. package/src/components/ui/card.tsx +97 -79
  246. package/src/components/ui/carousel.tsx +241 -240
  247. package/src/components/ui/chart.tsx +353 -352
  248. package/src/components/ui/checkbox.tsx +32 -31
  249. package/src/components/ui/collapsible.tsx +34 -34
  250. package/src/components/ui/command.tsx +177 -176
  251. package/src/components/ui/context-menu.tsx +255 -254
  252. package/src/components/ui/counting-number.tsx +108 -0
  253. package/src/components/ui/dialog.tsx +3 -2
  254. package/src/components/ui/dot-background.tsx +158 -0
  255. package/src/components/ui/drawer.tsx +138 -137
  256. package/src/components/ui/dropdown-menu.tsx +260 -259
  257. package/src/components/ui/fireworks-background.tsx +378 -0
  258. package/src/components/ui/flip-button.tsx +110 -0
  259. package/src/components/ui/form.tsx +174 -173
  260. package/src/components/ui/gradient-background.tsx +43 -0
  261. package/src/components/ui/gradient-text.tsx +65 -0
  262. package/src/components/ui/highlight-text.tsx +71 -0
  263. package/src/components/ui/hole-background.tsx +361 -0
  264. package/src/components/ui/hover-card.tsx +44 -41
  265. package/src/components/ui/input-otp.tsx +77 -77
  266. package/src/components/ui/input.tsx +23 -22
  267. package/src/components/ui/label.tsx +24 -23
  268. package/src/components/ui/menubar.tsx +279 -278
  269. package/src/components/ui/navigation-menu.tsx +171 -170
  270. package/src/components/ui/pagination.tsx +129 -128
  271. package/src/components/ui/popover.tsx +48 -47
  272. package/src/components/ui/progress.tsx +31 -30
  273. package/src/components/ui/radio-group.tsx +45 -44
  274. package/src/components/ui/resizable.tsx +56 -55
  275. package/src/components/ui/ripple-button.tsx +111 -0
  276. package/src/components/ui/scratcher.tsx +171 -0
  277. package/src/components/ui/scroll-area.tsx +58 -57
  278. package/src/components/ui/select.tsx +191 -183
  279. package/src/components/ui/separator.tsx +28 -27
  280. package/src/components/ui/sheet.tsx +145 -144
  281. package/src/components/ui/sidebar.tsx +729 -725
  282. package/src/components/ui/skeleton.tsx +19 -17
  283. package/src/components/ui/slider.tsx +63 -62
  284. package/src/components/ui/sonner.tsx +8 -12
  285. package/src/components/ui/switch.tsx +31 -30
  286. package/src/components/ui/table.tsx +119 -118
  287. package/src/components/ui/tabs.tsx +66 -65
  288. package/src/components/ui/textarea.tsx +20 -19
  289. package/src/components/ui/toggle-group.tsx +73 -72
  290. package/src/components/ui/toggle.tsx +47 -46
  291. package/src/components/ui/tooltip.tsx +61 -60
  292. package/src/index.css +75 -42
  293. package/src/index.ts +385 -330
@@ -1,47 +1,48 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import * as PopoverPrimitive from "@radix-ui/react-popover";
5
- import { cn } from "./../../lib/utils";
6
-
7
- function Popover({
8
- ...props
9
- }: React.ComponentProps<typeof PopoverPrimitive.Root>) {
10
- return <PopoverPrimitive.Root data-slot="popover" {...props} />;
11
- }
12
-
13
- function PopoverTrigger({
14
- ...props
15
- }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {
16
- return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />;
17
- }
18
-
19
- function PopoverContent({
20
- className,
21
- align = "center",
22
- sideOffset = 4,
23
- ...props
24
- }: React.ComponentProps<typeof PopoverPrimitive.Content>) {
25
- return (
26
- <PopoverPrimitive.Portal>
27
- <PopoverPrimitive.Content
28
- data-slot="popover-content"
29
- align={align}
30
- sideOffset={sideOffset}
31
- className={cn(
32
- "bg-white text-neutral-950 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border border-neutral-200 p-4 shadow-md outline-hidden dark:bg-neutral-950 dark:text-neutral-50 dark:border-neutral-800",
33
- className
34
- )}
35
- {...props}
36
- />
37
- </PopoverPrimitive.Portal>
38
- );
39
- }
40
-
41
- function PopoverAnchor({
42
- ...props
43
- }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {
44
- return <PopoverPrimitive.Anchor data-slot="popover-anchor" {...props} />;
45
- }
46
-
47
- export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
1
+ "use client";
2
+
3
+ import * as React from "react";
4
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
5
+
6
+ import { cn } from "@/lib/utils";
7
+
8
+ function Popover({
9
+ ...props
10
+ }: React.ComponentProps<typeof PopoverPrimitive.Root>) {
11
+ return <PopoverPrimitive.Root data-slot="popover" {...props} />;
12
+ }
13
+
14
+ function PopoverTrigger({
15
+ ...props
16
+ }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {
17
+ return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />;
18
+ }
19
+
20
+ function PopoverContent({
21
+ className,
22
+ align = "center",
23
+ sideOffset = 4,
24
+ ...props
25
+ }: React.ComponentProps<typeof PopoverPrimitive.Content>) {
26
+ return (
27
+ <PopoverPrimitive.Portal>
28
+ <PopoverPrimitive.Content
29
+ data-slot="popover-content"
30
+ align={align}
31
+ sideOffset={sideOffset}
32
+ className={cn(
33
+ "bg-white text-neutral-950 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border border-neutral-200 p-4 shadow-md outline-hidden dark:bg-neutral-950 dark:text-neutral-50 dark:border-neutral-800",
34
+ className
35
+ )}
36
+ {...props}
37
+ />
38
+ </PopoverPrimitive.Portal>
39
+ );
40
+ }
41
+
42
+ function PopoverAnchor({
43
+ ...props
44
+ }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {
45
+ return <PopoverPrimitive.Anchor data-slot="popover-anchor" {...props} />;
46
+ }
47
+
48
+ export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
@@ -1,30 +1,31 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import * as ProgressPrimitive from "@radix-ui/react-progress";
5
- import { cn } from "./../../lib/utils";
6
-
7
- function Progress({
8
- className,
9
- value,
10
- ...props
11
- }: React.ComponentProps<typeof ProgressPrimitive.Root>) {
12
- return (
13
- <ProgressPrimitive.Root
14
- data-slot="progress"
15
- className={cn(
16
- "bg-neutral-900/20 relative h-2 w-full overflow-hidden rounded-full dark:bg-neutral-50/20",
17
- className
18
- )}
19
- {...props}
20
- >
21
- <ProgressPrimitive.Indicator
22
- data-slot="progress-indicator"
23
- className="bg-neutral-900 h-full w-full flex-1 transition-all dark:bg-neutral-50"
24
- style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
25
- />
26
- </ProgressPrimitive.Root>
27
- );
28
- }
29
-
30
- export { Progress };
1
+ "use client";
2
+
3
+ import * as React from "react";
4
+ import * as ProgressPrimitive from "@radix-ui/react-progress";
5
+
6
+ import { cn } from "@/lib/utils";
7
+
8
+ function Progress({
9
+ className,
10
+ value,
11
+ ...props
12
+ }: React.ComponentProps<typeof ProgressPrimitive.Root>) {
13
+ return (
14
+ <ProgressPrimitive.Root
15
+ data-slot="progress"
16
+ className={cn(
17
+ "bg-neutral-900/20 relative h-2 w-full overflow-hidden rounded-full dark:bg-neutral-50/20",
18
+ className
19
+ )}
20
+ {...props}
21
+ >
22
+ <ProgressPrimitive.Indicator
23
+ data-slot="progress-indicator"
24
+ className="bg-neutral-900 h-full w-full flex-1 transition-all dark:bg-neutral-50"
25
+ style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
26
+ />
27
+ </ProgressPrimitive.Root>
28
+ );
29
+ }
30
+
31
+ export { Progress };
@@ -1,44 +1,45 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
5
- import { CircleIcon } from "lucide-react";
6
- import { cn } from "./../../lib/utils";
7
-
8
- function RadioGroup({
9
- className,
10
- ...props
11
- }: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {
12
- return (
13
- <RadioGroupPrimitive.Root
14
- data-slot="radio-group"
15
- className={cn("grid gap-3", className)}
16
- {...props}
17
- />
18
- );
19
- }
20
-
21
- function RadioGroupItem({
22
- className,
23
- ...props
24
- }: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {
25
- return (
26
- <RadioGroupPrimitive.Item
27
- data-slot="radio-group-item"
28
- className={cn(
29
- "border-neutral-200 text-neutral-900 focus-visible:border-neutral-950 focus-visible:ring-neutral-950/50 aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 aspect-square size-4 shrink-0 rounded-full border shadow-2xs transition-[color,box-shadow] outline-hidden focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-800 dark:text-neutral-50 dark:focus-visible:border-neutral-300 dark:focus-visible:ring-neutral-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900",
30
- className
31
- )}
32
- {...props}
33
- >
34
- <RadioGroupPrimitive.Indicator
35
- data-slot="radio-group-indicator"
36
- className="relative flex items-center justify-center"
37
- >
38
- <CircleIcon className="fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" />
39
- </RadioGroupPrimitive.Indicator>
40
- </RadioGroupPrimitive.Item>
41
- );
42
- }
43
-
44
- export { RadioGroup, RadioGroupItem };
1
+ "use client";
2
+
3
+ import * as React from "react";
4
+ import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
5
+ import { CircleIcon } from "lucide-react";
6
+
7
+ import { cn } from "@/lib/utils";
8
+
9
+ function RadioGroup({
10
+ className,
11
+ ...props
12
+ }: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {
13
+ return (
14
+ <RadioGroupPrimitive.Root
15
+ data-slot="radio-group"
16
+ className={cn("grid gap-3", className)}
17
+ {...props}
18
+ />
19
+ );
20
+ }
21
+
22
+ function RadioGroupItem({
23
+ className,
24
+ ...props
25
+ }: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {
26
+ return (
27
+ <RadioGroupPrimitive.Item
28
+ data-slot="radio-group-item"
29
+ className={cn(
30
+ "border-neutral-200 text-neutral-900 focus-visible:border-neutral-950 focus-visible:ring-neutral-950/50 aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 dark:bg-neutral-200/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-800 dark:text-neutral-50 dark:focus-visible:border-neutral-300 dark:focus-visible:ring-neutral-300/50 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900 dark:dark:bg-neutral-800/30",
31
+ className
32
+ )}
33
+ {...props}
34
+ >
35
+ <RadioGroupPrimitive.Indicator
36
+ data-slot="radio-group-indicator"
37
+ className="relative flex items-center justify-center"
38
+ >
39
+ <CircleIcon className="fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" />
40
+ </RadioGroupPrimitive.Indicator>
41
+ </RadioGroupPrimitive.Item>
42
+ );
43
+ }
44
+
45
+ export { RadioGroup, RadioGroupItem };
@@ -1,55 +1,56 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import { GripVerticalIcon } from "lucide-react";
5
- import * as ResizablePrimitive from "react-resizable-panels";
6
- import { cn } from "./../../lib/utils";
7
-
8
- function ResizablePanelGroup({
9
- className,
10
- ...props
11
- }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) {
12
- return (
13
- <ResizablePrimitive.PanelGroup
14
- data-slot="resizable-panel-group"
15
- className={cn(
16
- "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
17
- className
18
- )}
19
- {...props}
20
- />
21
- );
22
- }
23
-
24
- function ResizablePanel({
25
- ...props
26
- }: React.ComponentProps<typeof ResizablePrimitive.Panel>) {
27
- return <ResizablePrimitive.Panel data-slot="resizable-panel" {...props} />;
28
- }
29
-
30
- function ResizableHandle({
31
- withHandle,
32
- className,
33
- ...props
34
- }: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
35
- withHandle?: boolean;
36
- }) {
37
- return (
38
- <ResizablePrimitive.PanelResizeHandle
39
- data-slot="resizable-handle"
40
- className={cn(
41
- "bg-neutral-200 focus-visible:ring-neutral-950 relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90 dark:bg-neutral-800 dark:focus-visible:ring-neutral-300",
42
- className
43
- )}
44
- {...props}
45
- >
46
- {withHandle && (
47
- <div className="bg-neutral-200 z-10 flex h-4 w-3 items-center justify-center rounded-xs border dark:bg-neutral-800">
48
- <GripVerticalIcon className="size-2.5" />
49
- </div>
50
- )}
51
- </ResizablePrimitive.PanelResizeHandle>
52
- );
53
- }
54
-
55
- export { ResizablePanelGroup, ResizablePanel, ResizableHandle };
1
+ "use client";
2
+
3
+ import * as React from "react";
4
+ import { GripVerticalIcon } from "lucide-react";
5
+ import * as ResizablePrimitive from "react-resizable-panels";
6
+
7
+ import { cn } from "@/lib/utils";
8
+
9
+ function ResizablePanelGroup({
10
+ className,
11
+ ...props
12
+ }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) {
13
+ return (
14
+ <ResizablePrimitive.PanelGroup
15
+ data-slot="resizable-panel-group"
16
+ className={cn(
17
+ "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
18
+ className
19
+ )}
20
+ {...props}
21
+ />
22
+ );
23
+ }
24
+
25
+ function ResizablePanel({
26
+ ...props
27
+ }: React.ComponentProps<typeof ResizablePrimitive.Panel>) {
28
+ return <ResizablePrimitive.Panel data-slot="resizable-panel" {...props} />;
29
+ }
30
+
31
+ function ResizableHandle({
32
+ withHandle,
33
+ className,
34
+ ...props
35
+ }: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
36
+ withHandle?: boolean;
37
+ }) {
38
+ return (
39
+ <ResizablePrimitive.PanelResizeHandle
40
+ data-slot="resizable-handle"
41
+ className={cn(
42
+ "bg-neutral-200 focus-visible:ring-neutral-950 relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90 dark:bg-neutral-800 dark:focus-visible:ring-neutral-300",
43
+ className
44
+ )}
45
+ {...props}
46
+ >
47
+ {withHandle && (
48
+ <div className="bg-neutral-200 z-10 flex h-4 w-3 items-center justify-center rounded-xs border dark:bg-neutral-800">
49
+ <GripVerticalIcon className="size-2.5" />
50
+ </div>
51
+ )}
52
+ </ResizablePrimitive.PanelResizeHandle>
53
+ );
54
+ }
55
+
56
+ export { ResizablePanelGroup, ResizablePanel, ResizableHandle };
@@ -0,0 +1,111 @@
1
+ "use client";
2
+
3
+ import * as React from "react";
4
+ import { type HTMLMotionProps, motion, type Transition } from "motion/react";
5
+
6
+ import { cn } from "@/lib/utils";
7
+
8
+ interface Ripple {
9
+ id: number;
10
+ x: number;
11
+ y: number;
12
+ }
13
+
14
+ interface RippleButtonProps extends HTMLMotionProps<"button"> {
15
+ children: React.ReactNode;
16
+ rippleClassName?: string;
17
+ scale?: number;
18
+ transition?: Transition;
19
+ }
20
+
21
+ const RippleButton = React.forwardRef<HTMLButtonElement, RippleButtonProps>(
22
+ (
23
+ {
24
+ children,
25
+ onClick,
26
+ className,
27
+ rippleClassName,
28
+ scale = 10,
29
+ transition = { duration: 0.6, ease: "easeOut" },
30
+ ...props
31
+ },
32
+ ref
33
+ ) => {
34
+ const [ripples, setRipples] = React.useState<Ripple[]>([]);
35
+ const buttonRef = React.useRef<HTMLButtonElement>(null);
36
+ React.useImperativeHandle(
37
+ ref,
38
+ () => buttonRef.current as HTMLButtonElement
39
+ );
40
+
41
+ const createRipple = React.useCallback(
42
+ (event: React.MouseEvent<HTMLButtonElement>) => {
43
+ const button = buttonRef.current;
44
+ if (!button) return;
45
+
46
+ const rect = button.getBoundingClientRect();
47
+ const x = event.clientX - rect.left;
48
+ const y = event.clientY - rect.top;
49
+
50
+ const newRipple: Ripple = {
51
+ id: Date.now(),
52
+ x,
53
+ y,
54
+ };
55
+
56
+ setRipples((prev) => [...prev, newRipple]);
57
+
58
+ setTimeout(() => {
59
+ setRipples((prev) => prev.filter((r) => r.id !== newRipple.id));
60
+ }, 600);
61
+ },
62
+ []
63
+ );
64
+
65
+ const handleClick = React.useCallback(
66
+ (event: React.MouseEvent<HTMLButtonElement>) => {
67
+ createRipple(event);
68
+ if (onClick) {
69
+ onClick(event);
70
+ }
71
+ },
72
+ [createRipple, onClick]
73
+ );
74
+
75
+ return (
76
+ <motion.button
77
+ ref={buttonRef}
78
+ onClick={handleClick}
79
+ whileTap={{ scale: 0.95 }}
80
+ whileHover={{ scale: 1.05 }}
81
+ className={cn(
82
+ "relative h-10 px-4 py-2 text-sm font-medium text-primary-foreground overflow-hidden bg-primary cursor-pointer rounded-lg focus:outline-none",
83
+ className
84
+ )}
85
+ {...props}
86
+ >
87
+ {children}
88
+ {ripples.map((ripple) => (
89
+ <motion.span
90
+ key={ripple.id}
91
+ initial={{ scale: 0, opacity: 0.5 }}
92
+ animate={{ scale, opacity: 0 }}
93
+ transition={transition}
94
+ className={cn(
95
+ "absolute bg-primary-foreground rounded-full size-5 pointer-events-none",
96
+ rippleClassName
97
+ )}
98
+ style={{
99
+ top: ripple.y - 10,
100
+ left: ripple.x - 10,
101
+ }}
102
+ />
103
+ ))}
104
+ </motion.button>
105
+ );
106
+ }
107
+ );
108
+
109
+ RippleButton.displayName = "RippleButton";
110
+
111
+ export { RippleButton, type RippleButtonProps };
@@ -0,0 +1,171 @@
1
+ "use client";
2
+
3
+ import { cn } from "@/lib/utils";
4
+ import { motion, useAnimation } from "motion/react";
5
+ import React, { useEffect, useRef, useState } from "react";
6
+
7
+ interface ScratcherProps {
8
+ children: React.ReactNode;
9
+ width: number;
10
+ height: number;
11
+ minScratchPercentage?: number;
12
+ className?: string;
13
+ onComplete?: () => void;
14
+ gradientColors?: [string, string, string];
15
+ }
16
+
17
+ export const Scratcher: React.FC<ScratcherProps> = ({
18
+ width,
19
+ height,
20
+ minScratchPercentage = 50,
21
+ onComplete,
22
+ children,
23
+ className,
24
+ gradientColors = ["#A97CF8", "#F38CB8", "#FDCC92"],
25
+ }) => {
26
+ const canvasRef = useRef<HTMLCanvasElement>(null);
27
+ const [isScratching, setIsScratching] = useState(false);
28
+ const [isComplete, setIsComplete] = useState(false);
29
+
30
+ const controls = useAnimation();
31
+
32
+ useEffect(() => {
33
+ const canvas = canvasRef.current;
34
+ const ctx = canvas?.getContext("2d");
35
+ if (canvas && ctx) {
36
+ ctx.fillStyle = "#ccc";
37
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
38
+ const gradient = ctx.createLinearGradient(
39
+ 0,
40
+ 0,
41
+ canvas.width,
42
+ canvas.height
43
+ );
44
+ gradient.addColorStop(0, gradientColors[0]);
45
+ gradient.addColorStop(0.5, gradientColors[1]);
46
+ gradient.addColorStop(1, gradientColors[2]);
47
+ ctx.fillStyle = gradient;
48
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
49
+ }
50
+ }, [gradientColors]);
51
+
52
+ useEffect(() => {
53
+ const handleDocumentMouseMove = (event: MouseEvent) => {
54
+ if (!isScratching) return;
55
+ scratch(event.clientX, event.clientY);
56
+ };
57
+
58
+ const handleDocumentTouchMove = (event: TouchEvent) => {
59
+ if (!isScratching) return;
60
+ const touch = event.touches[0];
61
+ scratch(touch.clientX, touch.clientY);
62
+ };
63
+
64
+ const handleDocumentMouseUp = () => {
65
+ setIsScratching(false);
66
+ checkCompletion();
67
+ };
68
+
69
+ const handleDocumentTouchEnd = () => {
70
+ setIsScratching(false);
71
+ checkCompletion();
72
+ };
73
+
74
+ document.addEventListener("mousedown", handleDocumentMouseMove);
75
+ document.addEventListener("mousemove", handleDocumentMouseMove);
76
+ document.addEventListener("touchstart", handleDocumentTouchMove);
77
+ document.addEventListener("touchmove", handleDocumentTouchMove);
78
+ document.addEventListener("mouseup", handleDocumentMouseUp);
79
+ document.addEventListener("touchend", handleDocumentTouchEnd);
80
+ document.addEventListener("touchcancel", handleDocumentTouchEnd);
81
+
82
+ return () => {
83
+ document.removeEventListener("mousedown", handleDocumentMouseMove);
84
+ document.removeEventListener("mousemove", handleDocumentMouseMove);
85
+ document.removeEventListener("touchstart", handleDocumentTouchMove);
86
+ document.removeEventListener("touchmove", handleDocumentTouchMove);
87
+ document.removeEventListener("mouseup", handleDocumentMouseUp);
88
+ document.removeEventListener("touchend", handleDocumentTouchEnd);
89
+ document.removeEventListener("touchcancel", handleDocumentTouchEnd);
90
+ };
91
+ }, [isScratching]);
92
+
93
+ const handleMouseDown = () => setIsScratching(true);
94
+
95
+ const handleTouchStart = () => setIsScratching(true);
96
+
97
+ const scratch = (clientX: number, clientY: number) => {
98
+ const canvas = canvasRef.current;
99
+ const ctx = canvas?.getContext("2d");
100
+ if (canvas && ctx) {
101
+ const rect = canvas.getBoundingClientRect();
102
+ const x = clientX - rect.left + 16;
103
+ const y = clientY - rect.top + 16;
104
+ ctx.globalCompositeOperation = "destination-out";
105
+ ctx.beginPath();
106
+ ctx.arc(x, y, 30, 0, Math.PI * 2);
107
+ ctx.fill();
108
+ }
109
+ };
110
+
111
+ const startAnimation = async () => {
112
+ await controls.start({
113
+ scale: [1, 1.5, 1],
114
+ rotate: [0, 10, -10, 10, -10, 0],
115
+ transition: { duration: 0.5 },
116
+ });
117
+
118
+ // Call onComplete after animation finishes
119
+ if (onComplete) {
120
+ onComplete();
121
+ }
122
+ };
123
+
124
+ const checkCompletion = () => {
125
+ if (isComplete) return;
126
+
127
+ const canvas = canvasRef.current;
128
+ const ctx = canvas?.getContext("2d");
129
+ if (canvas && ctx) {
130
+ const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
131
+ const pixels = imageData.data;
132
+ const totalPixels = pixels.length / 4;
133
+ let clearPixels = 0;
134
+
135
+ for (let i = 3; i < pixels.length; i += 4) {
136
+ if (pixels[i] === 0) clearPixels++;
137
+ }
138
+
139
+ const percentage = (clearPixels / totalPixels) * 100;
140
+
141
+ if (percentage >= minScratchPercentage) {
142
+ setIsComplete(true);
143
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
144
+ startAnimation();
145
+ }
146
+ }
147
+ };
148
+
149
+ return (
150
+ <motion.div
151
+ className={cn("relative select-none", className)}
152
+ style={{
153
+ width,
154
+ height,
155
+ cursor:
156
+ "url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDMyIDMyIj4KICA8Y2lyY2xlIGN4PSIxNiIgY3k9IjE2IiByPSIxNSIgc3R5bGU9ImZpbGw6I2ZmZjtzdHJva2U6IzAwMDtzdHJva2Utd2lkdGg6MXB4OyIgLz4KPC9zdmc+'), auto",
157
+ }}
158
+ animate={controls}
159
+ >
160
+ <canvas
161
+ ref={canvasRef}
162
+ width={width}
163
+ height={height}
164
+ className="absolute left-0 top-0"
165
+ onMouseDown={handleMouseDown}
166
+ onTouchStart={handleTouchStart}
167
+ ></canvas>
168
+ {children}
169
+ </motion.div>
170
+ );
171
+ };