@codefast/ui 0.0.39 → 0.0.41

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 (385) hide show
  1. package/dist/{chunk-EVN2IB57.js → chunk-6EAQQBWG.js} +2 -2
  2. package/dist/chunk-6EAQQBWG.js.map +1 -0
  3. package/dist/{chunk-YR36SVVG.mjs → chunk-7HJV22OF.mjs} +1 -1
  4. package/dist/chunk-7HJV22OF.mjs.map +1 -0
  5. package/dist/{chunk-5WJB3UAO.js → chunk-CERSQE5J.js} +1 -1
  6. package/dist/chunk-CERSQE5J.js.map +1 -0
  7. package/dist/{chunk-ZWGC5M4G.js → chunk-DTSAQICV.js} +1 -1
  8. package/dist/chunk-DTSAQICV.js.map +1 -0
  9. package/dist/{chunk-UPZHCTQV.js → chunk-ELWITZPX.js} +2 -2
  10. package/dist/chunk-ELWITZPX.js.map +1 -0
  11. package/dist/{chunk-WLMYX3C7.mjs → chunk-GDMHMSJ2.mjs} +2 -2
  12. package/dist/chunk-GDMHMSJ2.mjs.map +1 -0
  13. package/dist/{chunk-UJJZZCAC.js → chunk-HQ4AUOQM.js} +1 -1
  14. package/dist/{chunk-UJJZZCAC.js.map → chunk-HQ4AUOQM.js.map} +1 -1
  15. package/dist/{chunk-HLXU3SQI.mjs → chunk-HWEFQSTC.mjs} +1 -1
  16. package/dist/chunk-HWEFQSTC.mjs.map +1 -0
  17. package/dist/{chunk-JTAXNFUM.mjs → chunk-HX5YKP4E.mjs} +2 -2
  18. package/dist/chunk-HX5YKP4E.mjs.map +1 -0
  19. package/dist/{chunk-PLX35IKX.mjs → chunk-I6QCJDIF.mjs} +1 -1
  20. package/dist/chunk-I6QCJDIF.mjs.map +1 -0
  21. package/dist/{chunk-4TJBMO2Y.mjs → chunk-KZ3CIZTP.mjs} +1 -1
  22. package/dist/chunk-KZ3CIZTP.mjs.map +1 -0
  23. package/dist/{chunk-466PAJCA.mjs → chunk-LEUB3C3L.mjs} +1 -1
  24. package/dist/chunk-LEUB3C3L.mjs.map +1 -0
  25. package/dist/{chunk-KJ77RPJ4.mjs → chunk-M5UKNISJ.mjs} +2 -2
  26. package/dist/chunk-M5UKNISJ.mjs.map +1 -0
  27. package/dist/{chunk-EYERINEJ.js → chunk-MZJL73RI.js} +1 -1
  28. package/dist/chunk-MZJL73RI.js.map +1 -0
  29. package/dist/{chunk-JCMRDCFT.js → chunk-NH6X3FON.js} +1 -1
  30. package/dist/{chunk-JCMRDCFT.js.map → chunk-NH6X3FON.js.map} +1 -1
  31. package/dist/{chunk-UDNWQQ3I.js → chunk-NSK74YTM.js} +2 -2
  32. package/dist/chunk-NSK74YTM.js.map +1 -0
  33. package/dist/{chunk-N6QGG4WS.mjs → chunk-P5AV3QU7.mjs} +2 -2
  34. package/dist/chunk-P5AV3QU7.mjs.map +1 -0
  35. package/dist/{chunk-GRQGCS7U.mjs → chunk-PWF46YXQ.mjs} +2 -2
  36. package/dist/chunk-PWF46YXQ.mjs.map +1 -0
  37. package/dist/{chunk-MSHUAEXI.js → chunk-SCPFGC2X.js} +2 -2
  38. package/dist/chunk-SCPFGC2X.js.map +1 -0
  39. package/dist/{chunk-JIHHUXA5.js → chunk-VXPAGNPJ.js} +2 -2
  40. package/dist/chunk-VXPAGNPJ.js.map +1 -0
  41. package/dist/{chunk-6B2PU2GG.mjs → chunk-WL65TBKJ.mjs} +2 -2
  42. package/dist/chunk-WL65TBKJ.mjs.map +1 -0
  43. package/dist/{chunk-FEE6PNWV.js → chunk-XM4Y2S5E.js} +2 -2
  44. package/dist/chunk-XM4Y2S5E.js.map +1 -0
  45. package/dist/{chunk-7PJR4WFR.mjs → chunk-ZEYIBYZP.mjs} +2 -2
  46. package/dist/chunk-ZEYIBYZP.mjs.map +1 -0
  47. package/dist/{chunk-AEWLL6A2.js → chunk-ZTEJNUH6.js} +2 -2
  48. package/dist/chunk-ZTEJNUH6.js.map +1 -0
  49. package/dist/lib/utils.js +1 -1
  50. package/dist/lib/utils.mjs +1 -1
  51. package/dist/plugin/animate.plugin.d.mts +9 -0
  52. package/dist/plugin/animate.plugin.d.ts +9 -0
  53. package/dist/plugin/animate.plugin.js +1 -1
  54. package/dist/plugin/animate.plugin.mjs +1 -1
  55. package/dist/plugin/base.plugin.d.mts +8 -0
  56. package/dist/plugin/base.plugin.d.ts +8 -0
  57. package/dist/plugin/base.plugin.js +1 -1
  58. package/dist/plugin/base.plugin.mjs +1 -1
  59. package/dist/plugin/perspective.plugin.d.mts +8 -0
  60. package/dist/plugin/perspective.plugin.d.ts +8 -0
  61. package/dist/plugin/perspective.plugin.js +1 -1
  62. package/dist/plugin/perspective.plugin.mjs +1 -1
  63. package/dist/react/accordion.js +1 -1
  64. package/dist/react/accordion.js.map +1 -1
  65. package/dist/react/accordion.mjs +1 -1
  66. package/dist/react/accordion.mjs.map +1 -1
  67. package/dist/react/alert-dialog.js +1 -1
  68. package/dist/react/alert-dialog.js.map +1 -1
  69. package/dist/react/alert-dialog.mjs +1 -1
  70. package/dist/react/alert-dialog.mjs.map +1 -1
  71. package/dist/react/alert.js +1 -1
  72. package/dist/react/alert.js.map +1 -1
  73. package/dist/react/alert.mjs +1 -1
  74. package/dist/react/alert.mjs.map +1 -1
  75. package/dist/react/aspect-ratio.js.map +1 -1
  76. package/dist/react/aspect-ratio.mjs.map +1 -1
  77. package/dist/react/avatar.js +1 -1
  78. package/dist/react/avatar.js.map +1 -1
  79. package/dist/react/avatar.mjs +1 -1
  80. package/dist/react/avatar.mjs.map +1 -1
  81. package/dist/react/badge.js +1 -1
  82. package/dist/react/badge.js.map +1 -1
  83. package/dist/react/badge.mjs +1 -1
  84. package/dist/react/badge.mjs.map +1 -1
  85. package/dist/react/blockquote.js.map +1 -1
  86. package/dist/react/blockquote.mjs.map +1 -1
  87. package/dist/react/box.d.mts +2 -2
  88. package/dist/react/box.d.ts +2 -2
  89. package/dist/react/box.js.map +1 -1
  90. package/dist/react/box.mjs.map +1 -1
  91. package/dist/react/breadcrumb.js +1 -1
  92. package/dist/react/breadcrumb.js.map +1 -1
  93. package/dist/react/breadcrumb.mjs +1 -1
  94. package/dist/react/breadcrumb.mjs.map +1 -1
  95. package/dist/react/button.js +1 -1
  96. package/dist/react/button.mjs +1 -1
  97. package/dist/react/calendar.js +1 -1
  98. package/dist/react/calendar.js.map +1 -1
  99. package/dist/react/calendar.mjs +1 -1
  100. package/dist/react/calendar.mjs.map +1 -1
  101. package/dist/react/card.js +1 -1
  102. package/dist/react/card.js.map +1 -1
  103. package/dist/react/card.mjs +1 -1
  104. package/dist/react/card.mjs.map +1 -1
  105. package/dist/react/carousel.d.mts +1 -1
  106. package/dist/react/carousel.d.ts +1 -1
  107. package/dist/react/carousel.js +1 -1
  108. package/dist/react/carousel.js.map +1 -1
  109. package/dist/react/carousel.mjs +1 -1
  110. package/dist/react/carousel.mjs.map +1 -1
  111. package/dist/react/checkbox-cards.js +1 -1
  112. package/dist/react/checkbox-cards.js.map +1 -1
  113. package/dist/react/checkbox-cards.mjs +1 -1
  114. package/dist/react/checkbox-cards.mjs.map +1 -1
  115. package/dist/react/checkbox-group.js +1 -1
  116. package/dist/react/checkbox-group.js.map +1 -1
  117. package/dist/react/checkbox-group.mjs +1 -1
  118. package/dist/react/checkbox-group.mjs.map +1 -1
  119. package/dist/react/checkbox-group.primitive.d.mts +8 -8
  120. package/dist/react/checkbox-group.primitive.d.ts +8 -8
  121. package/dist/react/checkbox-group.primitive.js +1 -1
  122. package/dist/react/checkbox-group.primitive.mjs +1 -1
  123. package/dist/react/checkbox.js +1 -1
  124. package/dist/react/checkbox.js.map +1 -1
  125. package/dist/react/checkbox.mjs +1 -1
  126. package/dist/react/checkbox.mjs.map +1 -1
  127. package/dist/react/code.js.map +1 -1
  128. package/dist/react/code.mjs.map +1 -1
  129. package/dist/react/collapsible.js +1 -1
  130. package/dist/react/collapsible.js.map +1 -1
  131. package/dist/react/collapsible.mjs +1 -1
  132. package/dist/react/collapsible.mjs.map +1 -1
  133. package/dist/react/command.js +1 -1
  134. package/dist/react/command.js.map +1 -1
  135. package/dist/react/command.mjs +1 -1
  136. package/dist/react/command.mjs.map +1 -1
  137. package/dist/react/container.js +1 -1
  138. package/dist/react/container.js.map +1 -1
  139. package/dist/react/container.mjs +1 -1
  140. package/dist/react/container.mjs.map +1 -1
  141. package/dist/react/context-menu.js +1 -1
  142. package/dist/react/context-menu.js.map +1 -1
  143. package/dist/react/context-menu.mjs +1 -1
  144. package/dist/react/context-menu.mjs.map +1 -1
  145. package/dist/react/data-table.d.mts +1 -1
  146. package/dist/react/data-table.d.ts +1 -1
  147. package/dist/react/data-table.js +1 -1
  148. package/dist/react/data-table.js.map +1 -1
  149. package/dist/react/data-table.mjs +1 -1
  150. package/dist/react/data-table.mjs.map +1 -1
  151. package/dist/react/dialog.js +1 -1
  152. package/dist/react/dialog.mjs +1 -1
  153. package/dist/react/drawer.js +1 -1
  154. package/dist/react/drawer.js.map +1 -1
  155. package/dist/react/drawer.mjs +1 -1
  156. package/dist/react/drawer.mjs.map +1 -1
  157. package/dist/react/dropdown-menu.js +1 -1
  158. package/dist/react/dropdown-menu.mjs +1 -1
  159. package/dist/react/em.js.map +1 -1
  160. package/dist/react/em.mjs.map +1 -1
  161. package/dist/react/form.js +1 -1
  162. package/dist/react/form.js.map +1 -1
  163. package/dist/react/form.mjs +1 -1
  164. package/dist/react/form.mjs.map +1 -1
  165. package/dist/react/heading.d.mts +1 -1
  166. package/dist/react/heading.d.ts +1 -1
  167. package/dist/react/heading.js.map +1 -1
  168. package/dist/react/heading.mjs.map +1 -1
  169. package/dist/react/hover-card.js +1 -1
  170. package/dist/react/hover-card.js.map +1 -1
  171. package/dist/react/hover-card.mjs +1 -1
  172. package/dist/react/hover-card.mjs.map +1 -1
  173. package/dist/react/input-otp.js +1 -1
  174. package/dist/react/input-otp.js.map +1 -1
  175. package/dist/react/input-otp.mjs +1 -1
  176. package/dist/react/input-otp.mjs.map +1 -1
  177. package/dist/react/input.js +1 -1
  178. package/dist/react/input.js.map +1 -1
  179. package/dist/react/input.mjs +1 -1
  180. package/dist/react/input.mjs.map +1 -1
  181. package/dist/react/kbd.js +1 -1
  182. package/dist/react/kbd.js.map +1 -1
  183. package/dist/react/kbd.mjs +1 -1
  184. package/dist/react/kbd.mjs.map +1 -1
  185. package/dist/react/label.js +1 -1
  186. package/dist/react/label.mjs +1 -1
  187. package/dist/react/menubar.js +1 -1
  188. package/dist/react/menubar.js.map +1 -1
  189. package/dist/react/menubar.mjs +1 -1
  190. package/dist/react/menubar.mjs.map +1 -1
  191. package/dist/react/navigation-menu.js +1 -1
  192. package/dist/react/navigation-menu.js.map +1 -1
  193. package/dist/react/navigation-menu.mjs +1 -1
  194. package/dist/react/navigation-menu.mjs.map +1 -1
  195. package/dist/react/pagination.d.mts +1 -1
  196. package/dist/react/pagination.d.ts +1 -1
  197. package/dist/react/pagination.js +1 -1
  198. package/dist/react/pagination.js.map +1 -1
  199. package/dist/react/pagination.mjs +1 -1
  200. package/dist/react/pagination.mjs.map +1 -1
  201. package/dist/react/popover.js +1 -1
  202. package/dist/react/popover.js.map +1 -1
  203. package/dist/react/popover.mjs +1 -1
  204. package/dist/react/popover.mjs.map +1 -1
  205. package/dist/react/pre.js.map +1 -1
  206. package/dist/react/pre.mjs.map +1 -1
  207. package/dist/react/progress.js +1 -1
  208. package/dist/react/progress.js.map +1 -1
  209. package/dist/react/progress.mjs +1 -1
  210. package/dist/react/progress.mjs.map +1 -1
  211. package/dist/react/quote.js.map +1 -1
  212. package/dist/react/quote.mjs.map +1 -1
  213. package/dist/react/radio-cards.js +1 -1
  214. package/dist/react/radio-cards.js.map +1 -1
  215. package/dist/react/radio-cards.mjs +1 -1
  216. package/dist/react/radio-cards.mjs.map +1 -1
  217. package/dist/react/radio-group.js +1 -1
  218. package/dist/react/radio-group.js.map +1 -1
  219. package/dist/react/radio-group.mjs +1 -1
  220. package/dist/react/radio-group.mjs.map +1 -1
  221. package/dist/react/radio.js +1 -1
  222. package/dist/react/radio.js.map +1 -1
  223. package/dist/react/radio.mjs +1 -1
  224. package/dist/react/radio.mjs.map +1 -1
  225. package/dist/react/resizable.js +1 -1
  226. package/dist/react/resizable.js.map +1 -1
  227. package/dist/react/resizable.mjs +1 -1
  228. package/dist/react/resizable.mjs.map +1 -1
  229. package/dist/react/scroll-area.js +1 -1
  230. package/dist/react/scroll-area.js.map +1 -1
  231. package/dist/react/scroll-area.mjs +1 -1
  232. package/dist/react/scroll-area.mjs.map +1 -1
  233. package/dist/react/section.js.map +1 -1
  234. package/dist/react/section.mjs.map +1 -1
  235. package/dist/react/select.js +1 -1
  236. package/dist/react/select.mjs +1 -1
  237. package/dist/react/separator.js +1 -1
  238. package/dist/react/separator.js.map +1 -1
  239. package/dist/react/separator.mjs +1 -1
  240. package/dist/react/separator.mjs.map +1 -1
  241. package/dist/react/sheet.js +1 -1
  242. package/dist/react/sheet.js.map +1 -1
  243. package/dist/react/sheet.mjs +1 -1
  244. package/dist/react/sheet.mjs.map +1 -1
  245. package/dist/react/skeleton.js +1 -1
  246. package/dist/react/skeleton.js.map +1 -1
  247. package/dist/react/skeleton.mjs +1 -1
  248. package/dist/react/skeleton.mjs.map +1 -1
  249. package/dist/react/slider.js +1 -1
  250. package/dist/react/slider.js.map +1 -1
  251. package/dist/react/slider.mjs +1 -1
  252. package/dist/react/slider.mjs.map +1 -1
  253. package/dist/react/sonner.js.map +1 -1
  254. package/dist/react/sonner.mjs.map +1 -1
  255. package/dist/react/spinner.js +1 -1
  256. package/dist/react/spinner.mjs +1 -1
  257. package/dist/react/strong.js.map +1 -1
  258. package/dist/react/strong.mjs.map +1 -1
  259. package/dist/react/switch.js +1 -1
  260. package/dist/react/switch.js.map +1 -1
  261. package/dist/react/switch.mjs +1 -1
  262. package/dist/react/switch.mjs.map +1 -1
  263. package/dist/react/table.js +1 -1
  264. package/dist/react/table.js.map +1 -1
  265. package/dist/react/table.mjs +1 -1
  266. package/dist/react/table.mjs.map +1 -1
  267. package/dist/react/tabs.js +1 -1
  268. package/dist/react/tabs.js.map +1 -1
  269. package/dist/react/tabs.mjs +1 -1
  270. package/dist/react/tabs.mjs.map +1 -1
  271. package/dist/react/text.d.mts +2 -2
  272. package/dist/react/text.d.ts +2 -2
  273. package/dist/react/text.js.map +1 -1
  274. package/dist/react/text.mjs.map +1 -1
  275. package/dist/react/textarea.js +1 -1
  276. package/dist/react/textarea.js.map +1 -1
  277. package/dist/react/textarea.mjs +1 -1
  278. package/dist/react/textarea.mjs.map +1 -1
  279. package/dist/react/toggle-group.js +1 -1
  280. package/dist/react/toggle-group.js.map +1 -1
  281. package/dist/react/toggle-group.mjs +1 -1
  282. package/dist/react/toggle-group.mjs.map +1 -1
  283. package/dist/react/toggle.js +1 -1
  284. package/dist/react/toggle.mjs +1 -1
  285. package/dist/react/tooltip.js +1 -1
  286. package/dist/react/tooltip.js.map +1 -1
  287. package/dist/react/tooltip.mjs +1 -1
  288. package/dist/react/tooltip.mjs.map +1 -1
  289. package/dist/tailwind.config.d.mts +5 -0
  290. package/dist/tailwind.config.d.ts +5 -0
  291. package/dist/tailwind.config.js +1 -1
  292. package/dist/tailwind.config.js.map +1 -1
  293. package/dist/tailwind.config.mjs +1 -1
  294. package/dist/tailwind.config.mjs.map +1 -1
  295. package/package.json +6 -6
  296. package/plugin/animate.plugin.ts +114 -111
  297. package/plugin/base.plugin.ts +7 -7
  298. package/plugin/perspective.plugin.ts +1 -1
  299. package/src/lib/utils.ts +2 -2
  300. package/src/react/accordion.tsx +65 -41
  301. package/src/react/alert-dialog.tsx +130 -62
  302. package/src/react/alert.tsx +50 -24
  303. package/src/react/aspect-ratio.tsx +6 -4
  304. package/src/react/avatar.tsx +47 -19
  305. package/src/react/badge.tsx +15 -10
  306. package/src/react/blockquote.tsx +11 -8
  307. package/src/react/box.tsx +11 -9
  308. package/src/react/breadcrumb.tsx +62 -29
  309. package/src/react/button.tsx +47 -31
  310. package/src/react/calendar.tsx +54 -37
  311. package/src/react/card.tsx +64 -30
  312. package/src/react/carousel.tsx +101 -43
  313. package/src/react/checkbox-cards.tsx +60 -33
  314. package/src/react/checkbox-group.primitive.tsx +93 -38
  315. package/src/react/checkbox-group.tsx +57 -34
  316. package/src/react/checkbox.tsx +24 -20
  317. package/src/react/code.tsx +9 -7
  318. package/src/react/collapsible.tsx +33 -23
  319. package/src/react/command.tsx +140 -75
  320. package/src/react/container.tsx +12 -8
  321. package/src/react/context-menu.tsx +228 -150
  322. package/src/react/data-table.tsx +51 -21
  323. package/src/react/dialog.tsx +95 -50
  324. package/src/react/drawer.tsx +96 -49
  325. package/src/react/dropdown-menu.tsx +199 -131
  326. package/src/react/em.tsx +9 -7
  327. package/src/react/form.tsx +96 -61
  328. package/src/react/heading.tsx +10 -8
  329. package/src/react/hover-card.tsx +42 -26
  330. package/src/react/input-otp.tsx +48 -37
  331. package/src/react/input.tsx +25 -15
  332. package/src/react/kbd.tsx +21 -19
  333. package/src/react/label.tsx +16 -14
  334. package/src/react/menubar.tsx +214 -135
  335. package/src/react/navigation-menu.tsx +153 -111
  336. package/src/react/pagination.tsx +59 -26
  337. package/src/react/popover.tsx +44 -29
  338. package/src/react/pre.tsx +9 -7
  339. package/src/react/progress.tsx +26 -19
  340. package/src/react/quote.tsx +9 -7
  341. package/src/react/radio-cards.tsx +32 -12
  342. package/src/react/radio-group.tsx +32 -12
  343. package/src/react/radio.tsx +24 -20
  344. package/src/react/resizable.tsx +13 -8
  345. package/src/react/scroll-area.tsx +56 -34
  346. package/src/react/section.tsx +9 -7
  347. package/src/react/select.tsx +167 -114
  348. package/src/react/separator.tsx +16 -7
  349. package/src/react/sheet.tsx +84 -34
  350. package/src/react/skeleton.tsx +8 -3
  351. package/src/react/slider.tsx +31 -24
  352. package/src/react/sonner.tsx +12 -10
  353. package/src/react/spinner.tsx +14 -9
  354. package/src/react/strong.tsx +9 -7
  355. package/src/react/switch.tsx +18 -16
  356. package/src/react/table.tsx +97 -52
  357. package/src/react/tabs.tsx +48 -38
  358. package/src/react/text.tsx +13 -10
  359. package/src/react/textarea.tsx +17 -15
  360. package/src/react/toggle-group.tsx +66 -23
  361. package/src/react/toggle.tsx +26 -18
  362. package/src/react/tooltip.tsx +43 -28
  363. package/tailwind.config.ts +62 -62
  364. package/dist/chunk-466PAJCA.mjs.map +0 -1
  365. package/dist/chunk-4TJBMO2Y.mjs.map +0 -1
  366. package/dist/chunk-5WJB3UAO.js.map +0 -1
  367. package/dist/chunk-6B2PU2GG.mjs.map +0 -1
  368. package/dist/chunk-7PJR4WFR.mjs.map +0 -1
  369. package/dist/chunk-AEWLL6A2.js.map +0 -1
  370. package/dist/chunk-EVN2IB57.js.map +0 -1
  371. package/dist/chunk-EYERINEJ.js.map +0 -1
  372. package/dist/chunk-FEE6PNWV.js.map +0 -1
  373. package/dist/chunk-GRQGCS7U.mjs.map +0 -1
  374. package/dist/chunk-HLXU3SQI.mjs.map +0 -1
  375. package/dist/chunk-JIHHUXA5.js.map +0 -1
  376. package/dist/chunk-JTAXNFUM.mjs.map +0 -1
  377. package/dist/chunk-KJ77RPJ4.mjs.map +0 -1
  378. package/dist/chunk-MSHUAEXI.js.map +0 -1
  379. package/dist/chunk-N6QGG4WS.mjs.map +0 -1
  380. package/dist/chunk-PLX35IKX.mjs.map +0 -1
  381. package/dist/chunk-UDNWQQ3I.js.map +0 -1
  382. package/dist/chunk-UPZHCTQV.js.map +0 -1
  383. package/dist/chunk-WLMYX3C7.mjs.map +0 -1
  384. package/dist/chunk-YR36SVVG.mjs.map +0 -1
  385. package/dist/chunk-ZWGC5M4G.js.map +0 -1
@@ -1,15 +1,17 @@
1
- "use client";
1
+ 'use client';
2
2
 
3
- import * as React from "react";
4
- import * as AccordionPrimitive from "@radix-ui/react-accordion";
5
- import { ChevronDownIcon } from "@radix-ui/react-icons";
6
- import { cn } from "../lib/utils";
3
+ import * as React from 'react';
4
+ import * as AccordionPrimitive from '@radix-ui/react-accordion';
5
+ import { ChevronDownIcon } from '@radix-ui/react-icons';
6
+ import { cn } from '../lib/utils';
7
7
 
8
8
  /* -----------------------------------------------------------------------------
9
9
  * Component: Accordion
10
10
  * -------------------------------------------------------------------------- */
11
11
 
12
- type AccordionProps = React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Root>;
12
+ type AccordionProps = React.ComponentPropsWithoutRef<
13
+ typeof AccordionPrimitive.Root
14
+ >;
13
15
  const Accordion = AccordionPrimitive.Root;
14
16
 
15
17
  /* -----------------------------------------------------------------------------
@@ -17,10 +19,19 @@ const Accordion = AccordionPrimitive.Root;
17
19
  * -------------------------------------------------------------------------- */
18
20
 
19
21
  type AccordionItemElement = React.ElementRef<typeof AccordionPrimitive.Item>;
20
- type AccordionItemProps = React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>;
21
-
22
- const AccordionItem = React.forwardRef<AccordionItemElement, AccordionItemProps>(({ className, ...props }, ref) => (
23
- <AccordionPrimitive.Item ref={ref} className={cn("border-b", className)} {...props} />
22
+ type AccordionItemProps = React.ComponentPropsWithoutRef<
23
+ typeof AccordionPrimitive.Item
24
+ >;
25
+
26
+ const AccordionItem = React.forwardRef<
27
+ AccordionItemElement,
28
+ AccordionItemProps
29
+ >(({ className, ...props }, ref) => (
30
+ <AccordionPrimitive.Item
31
+ ref={ref}
32
+ className={cn('border-b', className)}
33
+ {...props}
34
+ />
24
35
  ));
25
36
 
26
37
  AccordionItem.displayName = AccordionPrimitive.Item.displayName;
@@ -29,23 +40,31 @@ AccordionItem.displayName = AccordionPrimitive.Item.displayName;
29
40
  * Component: AccordionTrigger
30
41
  * -------------------------------------------------------------------------- */
31
42
 
32
- type AccordionTriggerElement = React.ElementRef<typeof AccordionPrimitive.Trigger>;
33
- type AccordionTriggerProps = React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>;
34
-
35
- const AccordionTrigger = React.forwardRef<AccordionTriggerElement, AccordionTriggerProps>(
36
- ({ children, className, ...props }, ref) => (
37
- <AccordionPrimitive.Header className="flex">
38
- <AccordionPrimitive.Trigger
39
- ref={ref}
40
- className={cn("group flex flex-1 items-center justify-between py-4 text-sm font-medium", className)}
41
- {...props}
42
- >
43
- {children}
44
- <ChevronDownIcon className="text-muted-foreground size-4 shrink-0 transition group-data-[state=open]:rotate-180" />
45
- </AccordionPrimitive.Trigger>
46
- </AccordionPrimitive.Header>
47
- ),
48
- );
43
+ type AccordionTriggerElement = React.ElementRef<
44
+ typeof AccordionPrimitive.Trigger
45
+ >;
46
+ type AccordionTriggerProps = React.ComponentPropsWithoutRef<
47
+ typeof AccordionPrimitive.Trigger
48
+ >;
49
+
50
+ const AccordionTrigger = React.forwardRef<
51
+ AccordionTriggerElement,
52
+ AccordionTriggerProps
53
+ >(({ children, className, ...props }, ref) => (
54
+ <AccordionPrimitive.Header className="flex">
55
+ <AccordionPrimitive.Trigger
56
+ ref={ref}
57
+ className={cn(
58
+ 'group flex flex-1 items-center justify-between py-4 text-sm font-medium',
59
+ className,
60
+ )}
61
+ {...props}
62
+ >
63
+ {children}
64
+ <ChevronDownIcon className="text-muted-foreground size-4 shrink-0 transition group-data-[state=open]:rotate-180" />
65
+ </AccordionPrimitive.Trigger>
66
+ </AccordionPrimitive.Header>
67
+ ));
49
68
 
50
69
  AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
51
70
 
@@ -53,20 +72,25 @@ AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
53
72
  * Component: AccordionContent
54
73
  * -------------------------------------------------------------------------- */
55
74
 
56
- type AccordionContentElement = React.ElementRef<typeof AccordionPrimitive.Content>;
57
- type AccordionContentProps = React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>;
58
-
59
- const AccordionContent = React.forwardRef<AccordionContentElement, AccordionContentProps>(
60
- ({ children, className, ...props }, ref) => (
61
- <AccordionPrimitive.Content
62
- ref={ref}
63
- className="data-[state=open]:animate-collapsible-open data-[state=closed]:animate-collapsible-closed overflow-hidden text-sm"
64
- {...props}
65
- >
66
- <div className={cn("pb-4 pt-0", className)}>{children}</div>
67
- </AccordionPrimitive.Content>
68
- ),
69
- );
75
+ type AccordionContentElement = React.ElementRef<
76
+ typeof AccordionPrimitive.Content
77
+ >;
78
+ type AccordionContentProps = React.ComponentPropsWithoutRef<
79
+ typeof AccordionPrimitive.Content
80
+ >;
81
+
82
+ const AccordionContent = React.forwardRef<
83
+ AccordionContentElement,
84
+ AccordionContentProps
85
+ >(({ children, className, ...props }, ref) => (
86
+ <AccordionPrimitive.Content
87
+ ref={ref}
88
+ className="data-[state=open]:animate-collapsible-open data-[state=closed]:animate-collapsible-closed overflow-hidden text-sm"
89
+ {...props}
90
+ >
91
+ <div className={cn('pb-4 pt-0', className)}>{children}</div>
92
+ </AccordionPrimitive.Content>
93
+ ));
70
94
 
71
95
  AccordionContent.displayName = AccordionPrimitive.Content.displayName;
72
96
 
@@ -1,9 +1,9 @@
1
- "use client";
1
+ 'use client';
2
2
 
3
- import * as React from "react";
4
- import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
5
- import { cn } from "../lib/utils";
6
- import { buttonVariants } from "./button";
3
+ import * as React from 'react';
4
+ import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
5
+ import { cn } from '../lib/utils';
6
+ import { buttonVariants } from './button';
7
7
 
8
8
  /* -----------------------------------------------------------------------------
9
9
  * Component: AlertDialog
@@ -16,31 +16,38 @@ const AlertDialog = AlertDialogPrimitive.Root;
16
16
  * Component: AlertDialogTrigger
17
17
  * -------------------------------------------------------------------------- */
18
18
 
19
- type AlertDialogTriggerProps = React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Trigger>;
19
+ type AlertDialogTriggerProps = React.ComponentPropsWithoutRef<
20
+ typeof AlertDialogPrimitive.Trigger
21
+ >;
20
22
  const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
21
23
 
22
24
  /* -----------------------------------------------------------------------------
23
25
  * Component: AlertDialogContent
24
26
  * -------------------------------------------------------------------------- */
25
27
 
26
- type AlertDialogContentElement = React.ElementRef<typeof AlertDialogPrimitive.Content>;
27
- type AlertDialogContentProps = React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>;
28
-
29
- const AlertDialogContent = React.forwardRef<AlertDialogContentElement, AlertDialogContentProps>(
30
- ({ className, ...props }, ref) => (
31
- <AlertDialogPrimitive.Portal>
32
- <AlertDialogPrimitive.Overlay className="data-[state=open]:animate-duration-200 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 bg-black/80" />
33
- <AlertDialogPrimitive.Content
34
- ref={ref}
35
- className={cn(
36
- "bg-background data-[state=open]:animate-in data-[state=open]:animate-duration-200 data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg",
37
- className,
38
- )}
39
- {...props}
40
- />
41
- </AlertDialogPrimitive.Portal>
42
- ),
43
- );
28
+ type AlertDialogContentElement = React.ElementRef<
29
+ typeof AlertDialogPrimitive.Content
30
+ >;
31
+ type AlertDialogContentProps = React.ComponentPropsWithoutRef<
32
+ typeof AlertDialogPrimitive.Content
33
+ >;
34
+
35
+ const AlertDialogContent = React.forwardRef<
36
+ AlertDialogContentElement,
37
+ AlertDialogContentProps
38
+ >(({ className, ...props }, ref) => (
39
+ <AlertDialogPrimitive.Portal>
40
+ <AlertDialogPrimitive.Overlay className="data-[state=open]:animate-duration-200 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 bg-black/80" />
41
+ <AlertDialogPrimitive.Content
42
+ ref={ref}
43
+ className={cn(
44
+ 'bg-background data-[state=open]:animate-in data-[state=open]:animate-duration-200 data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg',
45
+ className,
46
+ )}
47
+ {...props}
48
+ />
49
+ </AlertDialogPrimitive.Portal>
50
+ ));
44
51
 
45
52
  AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
46
53
 
@@ -50,8 +57,20 @@ AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
50
57
 
51
58
  type AlertDialogHeaderProps = React.HTMLAttributes<HTMLDivElement>;
52
59
 
53
- function AlertDialogHeader({ className, ...props }: AlertDialogHeaderProps): React.JSX.Element {
54
- return <div className={cn("flex flex-col space-y-2 text-center", "sm:text-left", className)} {...props} />;
60
+ function AlertDialogHeader({
61
+ className,
62
+ ...props
63
+ }: AlertDialogHeaderProps): React.JSX.Element {
64
+ return (
65
+ <div
66
+ className={cn(
67
+ 'flex flex-col space-y-2 text-center',
68
+ 'sm:text-left',
69
+ className,
70
+ )}
71
+ {...props}
72
+ />
73
+ );
55
74
  }
56
75
 
57
76
  /* -----------------------------------------------------------------------------
@@ -60,22 +79,43 @@ function AlertDialogHeader({ className, ...props }: AlertDialogHeaderProps): Rea
60
79
 
61
80
  type AlertDialogFooterProps = React.HTMLAttributes<HTMLDivElement>;
62
81
 
63
- function AlertDialogFooter({ className, ...props }: AlertDialogFooterProps): React.JSX.Element {
64
- return <div className={cn("flex flex-col-reverse gap-2", "sm:flex-row sm:justify-end", className)} {...props} />;
82
+ function AlertDialogFooter({
83
+ className,
84
+ ...props
85
+ }: AlertDialogFooterProps): React.JSX.Element {
86
+ return (
87
+ <div
88
+ className={cn(
89
+ 'flex flex-col-reverse gap-2',
90
+ 'sm:flex-row sm:justify-end',
91
+ className,
92
+ )}
93
+ {...props}
94
+ />
95
+ );
65
96
  }
66
97
 
67
98
  /* -----------------------------------------------------------------------------
68
99
  * Component: AlertDialogTitle
69
100
  * -------------------------------------------------------------------------- */
70
101
 
71
- type AlertDialogTitleElement = React.ElementRef<typeof AlertDialogPrimitive.Title>;
72
- type AlertDialogTitleProps = React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>;
73
-
74
- const AlertDialogTitle = React.forwardRef<AlertDialogTitleElement, AlertDialogTitleProps>(
75
- ({ className, ...props }, ref) => (
76
- <AlertDialogPrimitive.Title ref={ref} className={cn("text-lg font-semibold", className)} {...props} />
77
- ),
78
- );
102
+ type AlertDialogTitleElement = React.ElementRef<
103
+ typeof AlertDialogPrimitive.Title
104
+ >;
105
+ type AlertDialogTitleProps = React.ComponentPropsWithoutRef<
106
+ typeof AlertDialogPrimitive.Title
107
+ >;
108
+
109
+ const AlertDialogTitle = React.forwardRef<
110
+ AlertDialogTitleElement,
111
+ AlertDialogTitleProps
112
+ >(({ className, ...props }, ref) => (
113
+ <AlertDialogPrimitive.Title
114
+ ref={ref}
115
+ className={cn('text-lg font-semibold', className)}
116
+ {...props}
117
+ />
118
+ ));
79
119
 
80
120
  AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
81
121
 
@@ -83,29 +123,48 @@ AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
83
123
  * Component: AlertDialogDescription
84
124
  * -------------------------------------------------------------------------- */
85
125
 
86
- type AlertDialogDescriptionElement = React.ElementRef<typeof AlertDialogPrimitive.Description>;
87
- type AlertDialogDescriptionProps = React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>;
88
-
89
- const AlertDialogDescription = React.forwardRef<AlertDialogDescriptionElement, AlertDialogDescriptionProps>(
90
- ({ className, ...props }, ref) => (
91
- <AlertDialogPrimitive.Description ref={ref} className={cn("text-muted-foreground text-sm", className)} {...props} />
92
- ),
93
- );
94
-
95
- AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
126
+ type AlertDialogDescriptionElement = React.ElementRef<
127
+ typeof AlertDialogPrimitive.Description
128
+ >;
129
+ type AlertDialogDescriptionProps = React.ComponentPropsWithoutRef<
130
+ typeof AlertDialogPrimitive.Description
131
+ >;
132
+
133
+ const AlertDialogDescription = React.forwardRef<
134
+ AlertDialogDescriptionElement,
135
+ AlertDialogDescriptionProps
136
+ >(({ className, ...props }, ref) => (
137
+ <AlertDialogPrimitive.Description
138
+ ref={ref}
139
+ className={cn('text-muted-foreground text-sm', className)}
140
+ {...props}
141
+ />
142
+ ));
143
+
144
+ AlertDialogDescription.displayName =
145
+ AlertDialogPrimitive.Description.displayName;
96
146
 
97
147
  /* -----------------------------------------------------------------------------
98
148
  * Component: AlertDialogAction
99
149
  * -------------------------------------------------------------------------- */
100
150
 
101
- type AlertDialogActionElement = React.ElementRef<typeof AlertDialogPrimitive.Action>;
102
- type AlertDialogActionProps = React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>;
103
-
104
- const AlertDialogAction = React.forwardRef<AlertDialogActionElement, AlertDialogActionProps>(
105
- ({ className, ...props }, ref) => (
106
- <AlertDialogPrimitive.Action ref={ref} className={buttonVariants({ className })} {...props} />
107
- ),
108
- );
151
+ type AlertDialogActionElement = React.ElementRef<
152
+ typeof AlertDialogPrimitive.Action
153
+ >;
154
+ type AlertDialogActionProps = React.ComponentPropsWithoutRef<
155
+ typeof AlertDialogPrimitive.Action
156
+ >;
157
+
158
+ const AlertDialogAction = React.forwardRef<
159
+ AlertDialogActionElement,
160
+ AlertDialogActionProps
161
+ >(({ className, ...props }, ref) => (
162
+ <AlertDialogPrimitive.Action
163
+ ref={ref}
164
+ className={buttonVariants({ className })}
165
+ {...props}
166
+ />
167
+ ));
109
168
 
110
169
  AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
111
170
 
@@ -113,14 +172,23 @@ AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
113
172
  * Component: AlertDialogCancel
114
173
  * -------------------------------------------------------------------------- */
115
174
 
116
- type AlertDialogCancelElement = React.ElementRef<typeof AlertDialogPrimitive.Cancel>;
117
- type AlertDialogCancelProps = React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>;
118
-
119
- const AlertDialogCancel = React.forwardRef<AlertDialogCancelElement, AlertDialogCancelProps>(
120
- ({ className, ...props }, ref) => (
121
- <AlertDialogPrimitive.Cancel ref={ref} className={buttonVariants({ variant: "outline", className })} {...props} />
122
- ),
123
- );
175
+ type AlertDialogCancelElement = React.ElementRef<
176
+ typeof AlertDialogPrimitive.Cancel
177
+ >;
178
+ type AlertDialogCancelProps = React.ComponentPropsWithoutRef<
179
+ typeof AlertDialogPrimitive.Cancel
180
+ >;
181
+
182
+ const AlertDialogCancel = React.forwardRef<
183
+ AlertDialogCancelElement,
184
+ AlertDialogCancelProps
185
+ >(({ className, ...props }, ref) => (
186
+ <AlertDialogPrimitive.Cancel
187
+ ref={ref}
188
+ className={buttonVariants({ variant: 'outline', className })}
189
+ {...props}
190
+ />
191
+ ));
124
192
  AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
125
193
 
126
194
  /* -----------------------------------------------------------------------------
@@ -1,21 +1,22 @@
1
- import * as React from "react";
2
- import { type VariantProps } from "cva";
3
- import { cn, cva } from "../lib/utils";
1
+ import * as React from 'react';
2
+ import { type VariantProps } from 'cva';
3
+ import { cn, cva } from '../lib/utils';
4
4
 
5
5
  /* -----------------------------------------------------------------------------
6
6
  * Variant: Alert
7
7
  * -------------------------------------------------------------------------- */
8
8
 
9
9
  const alertVariants = cva({
10
- base: "[&>svg+div]:-translate-y-0.75 relative w-full rounded-lg border p-4 text-sm [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg~*]:pl-7",
10
+ base: '[&>svg+div]:-translate-y-0.75 relative w-full rounded-lg border p-4 text-sm [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg~*]:pl-7',
11
11
  variants: {
12
12
  variant: {
13
- default: "bg-background text-foreground [&>svg]:text-foreground",
14
- destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",
13
+ default: 'bg-background text-foreground [&>svg]:text-foreground',
14
+ destructive:
15
+ 'border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive',
15
16
  },
16
17
  },
17
18
  defaultVariants: {
18
- variant: "default",
19
+ variant: 'default',
19
20
  },
20
21
  });
21
22
 
@@ -28,11 +29,18 @@ type AlertVariantsProps = VariantProps<typeof alertVariants>;
28
29
  type AlertElement = HTMLDivElement;
29
30
  type AlertProps = React.HTMLAttributes<HTMLDivElement> & AlertVariantsProps;
30
31
 
31
- const Alert = React.forwardRef<AlertElement, AlertProps>(({ className, variant, ...props }, ref) => (
32
- <div ref={ref} role="alert" className={alertVariants({ variant, className })} {...props} />
33
- ));
32
+ const Alert = React.forwardRef<AlertElement, AlertProps>(
33
+ ({ className, variant, ...props }, ref) => (
34
+ <div
35
+ ref={ref}
36
+ role="alert"
37
+ className={alertVariants({ variant, className })}
38
+ {...props}
39
+ />
40
+ ),
41
+ );
34
42
 
35
- Alert.displayName = "Alert";
43
+ Alert.displayName = 'Alert';
36
44
 
37
45
  /* -----------------------------------------------------------------------------
38
46
  * Component: AlertTitle
@@ -41,13 +49,19 @@ Alert.displayName = "Alert";
41
49
  type AlertTitleElement = HTMLHeadingElement;
42
50
  type AlertTitleProps = React.HTMLAttributes<HTMLHeadingElement>;
43
51
 
44
- const AlertTitle = React.forwardRef<AlertTitleElement, AlertTitleProps>(({ children, className, ...props }, ref) => (
45
- <h5 ref={ref} className={cn("mb-1 font-medium leading-none tracking-tight", className)} {...props}>
46
- {children}
47
- </h5>
48
- ));
52
+ const AlertTitle = React.forwardRef<AlertTitleElement, AlertTitleProps>(
53
+ ({ children, className, ...props }, ref) => (
54
+ <h5
55
+ ref={ref}
56
+ className={cn('mb-1 font-medium leading-none tracking-tight', className)}
57
+ {...props}
58
+ >
59
+ {children}
60
+ </h5>
61
+ ),
62
+ );
49
63
 
50
- AlertTitle.displayName = "AlertTitle";
64
+ AlertTitle.displayName = 'AlertTitle';
51
65
 
52
66
  /* -----------------------------------------------------------------------------
53
67
  * Component: AlertDescription
@@ -56,16 +70,28 @@ AlertTitle.displayName = "AlertTitle";
56
70
  type AlertDescriptionElement = HTMLDivElement;
57
71
  type AlertDescriptionProps = React.HTMLAttributes<HTMLDivElement>;
58
72
 
59
- const AlertDescription = React.forwardRef<AlertDescriptionElement, AlertDescriptionProps>(
60
- ({ className, ...props }, ref) => (
61
- <div ref={ref} className={cn("text-sm [&_p]:leading-relaxed", className)} {...props} />
62
- ),
63
- );
73
+ const AlertDescription = React.forwardRef<
74
+ AlertDescriptionElement,
75
+ AlertDescriptionProps
76
+ >(({ className, ...props }, ref) => (
77
+ <div
78
+ ref={ref}
79
+ className={cn('text-sm [&_p]:leading-relaxed', className)}
80
+ {...props}
81
+ />
82
+ ));
64
83
 
65
- AlertDescription.displayName = "AlertDescription";
84
+ AlertDescription.displayName = 'AlertDescription';
66
85
 
67
86
  /* -----------------------------------------------------------------------------
68
87
  * Exports
69
88
  * -------------------------------------------------------------------------- */
70
89
 
71
- export { Alert, AlertTitle, AlertDescription, type AlertProps, type AlertTitleProps, type AlertDescriptionProps };
90
+ export {
91
+ Alert,
92
+ AlertTitle,
93
+ AlertDescription,
94
+ type AlertProps,
95
+ type AlertTitleProps,
96
+ type AlertDescriptionProps,
97
+ };
@@ -1,13 +1,15 @@
1
- "use client";
1
+ 'use client';
2
2
 
3
- import type * as React from "react";
4
- import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio";
3
+ import type * as React from 'react';
4
+ import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
5
5
 
6
6
  /* -----------------------------------------------------------------------------
7
7
  * Component: AspectRatio
8
8
  * -------------------------------------------------------------------------- */
9
9
 
10
- type AspectRatioProps = React.ComponentPropsWithoutRef<typeof AspectRatioPrimitive.Root>;
10
+ type AspectRatioProps = React.ComponentPropsWithoutRef<
11
+ typeof AspectRatioPrimitive.Root
12
+ >;
11
13
  const AspectRatio = AspectRatioPrimitive.Root;
12
14
 
13
15
  /* -----------------------------------------------------------------------------
@@ -1,8 +1,8 @@
1
- "use client";
1
+ 'use client';
2
2
 
3
- import * as React from "react";
4
- import * as AvatarPrimitive from "@radix-ui/react-avatar";
5
- import { cn } from "../lib/utils";
3
+ import * as React from 'react';
4
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
5
+ import { cn } from '../lib/utils';
6
6
 
7
7
  /* -----------------------------------------------------------------------------
8
8
  * Component: Avatar
@@ -11,13 +11,18 @@ import { cn } from "../lib/utils";
11
11
  type AvatarElement = React.ElementRef<typeof AvatarPrimitive.Root>;
12
12
  type AvatarProps = React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>;
13
13
 
14
- const Avatar = React.forwardRef<AvatarElement, AvatarProps>(({ className, ...props }, ref) => (
15
- <AvatarPrimitive.Root
16
- ref={ref}
17
- className={cn("relative flex size-10 shrink-0 overflow-hidden rounded-full", className)}
18
- {...props}
19
- />
20
- ));
14
+ const Avatar = React.forwardRef<AvatarElement, AvatarProps>(
15
+ ({ className, ...props }, ref) => (
16
+ <AvatarPrimitive.Root
17
+ ref={ref}
18
+ className={cn(
19
+ 'relative flex size-10 shrink-0 overflow-hidden rounded-full',
20
+ className,
21
+ )}
22
+ {...props}
23
+ />
24
+ ),
25
+ );
21
26
 
22
27
  Avatar.displayName = AvatarPrimitive.Root.displayName;
23
28
 
@@ -26,11 +31,19 @@ Avatar.displayName = AvatarPrimitive.Root.displayName;
26
31
  * -------------------------------------------------------------------------- */
27
32
 
28
33
  type AvatarImageElement = React.ElementRef<typeof AvatarPrimitive.Image>;
29
- type AvatarImageProps = React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>;
34
+ type AvatarImageProps = React.ComponentPropsWithoutRef<
35
+ typeof AvatarPrimitive.Image
36
+ >;
30
37
 
31
- const AvatarImage = React.forwardRef<AvatarImageElement, AvatarImageProps>(({ className, ...props }, ref) => (
32
- <AvatarPrimitive.Image ref={ref} className={cn("aspect-square size-full", className)} {...props} />
33
- ));
38
+ const AvatarImage = React.forwardRef<AvatarImageElement, AvatarImageProps>(
39
+ ({ className, ...props }, ref) => (
40
+ <AvatarPrimitive.Image
41
+ ref={ref}
42
+ className={cn('aspect-square size-full', className)}
43
+ {...props}
44
+ />
45
+ ),
46
+ );
34
47
 
35
48
  AvatarImage.displayName = AvatarPrimitive.Image.displayName;
36
49
 
@@ -39,12 +52,20 @@ AvatarImage.displayName = AvatarPrimitive.Image.displayName;
39
52
  * -------------------------------------------------------------------------- */
40
53
 
41
54
  type AvatarFallbackElement = React.ElementRef<typeof AvatarPrimitive.Fallback>;
42
- type AvatarFallbackProps = React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>;
55
+ type AvatarFallbackProps = React.ComponentPropsWithoutRef<
56
+ typeof AvatarPrimitive.Fallback
57
+ >;
43
58
 
44
- const AvatarFallback = React.forwardRef<AvatarFallbackElement, AvatarFallbackProps>(({ className, ...props }, ref) => (
59
+ const AvatarFallback = React.forwardRef<
60
+ AvatarFallbackElement,
61
+ AvatarFallbackProps
62
+ >(({ className, ...props }, ref) => (
45
63
  <AvatarPrimitive.Fallback
46
64
  ref={ref}
47
- className={cn("bg-muted flex size-full items-center justify-center rounded-full", className)}
65
+ className={cn(
66
+ 'bg-muted flex size-full items-center justify-center rounded-full',
67
+ className,
68
+ )}
48
69
  {...props}
49
70
  />
50
71
  ));
@@ -55,4 +76,11 @@ AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
55
76
  * Exports
56
77
  * -------------------------------------------------------------------------- */
57
78
 
58
- export { Avatar, AvatarImage, AvatarFallback, type AvatarProps, type AvatarImageProps, type AvatarFallbackProps };
79
+ export {
80
+ Avatar,
81
+ AvatarImage,
82
+ AvatarFallback,
83
+ type AvatarProps,
84
+ type AvatarImageProps,
85
+ type AvatarFallbackProps,
86
+ };
@@ -1,23 +1,24 @@
1
- import * as React from "react";
2
- import { type VariantProps } from "cva";
3
- import { cva } from "../lib/utils";
1
+ import * as React from 'react';
2
+ import { type VariantProps } from 'cva';
3
+ import { cva } from '../lib/utils';
4
4
 
5
5
  /* -----------------------------------------------------------------------------
6
6
  * Variant: Badge
7
7
  * -------------------------------------------------------------------------- */
8
8
 
9
9
  const badgeVariants = cva({
10
- base: "inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition",
10
+ base: 'inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition',
11
11
  variants: {
12
12
  variant: {
13
- default: "bg-primary text-primary-foreground border-transparent shadow",
14
- secondary: "bg-secondary text-secondary-foreground border-transparent",
15
- destructive: "bg-destructive text-destructive-foreground border-transparent shadow",
16
- outline: "text-foreground",
13
+ default: 'bg-primary text-primary-foreground border-transparent shadow',
14
+ secondary: 'bg-secondary text-secondary-foreground border-transparent',
15
+ destructive:
16
+ 'bg-destructive text-destructive-foreground border-transparent shadow',
17
+ outline: 'text-foreground',
17
18
  },
18
19
  },
19
20
  defaultVariants: {
20
- variant: "default",
21
+ variant: 'default',
21
22
  },
22
23
  });
23
24
 
@@ -29,7 +30,11 @@ type BadgeVariantsProps = VariantProps<typeof badgeVariants>;
29
30
 
30
31
  type BadgeProps = React.HTMLAttributes<HTMLDivElement> & BadgeVariantsProps;
31
32
 
32
- function Badge({ className, variant, ...props }: BadgeProps): React.JSX.Element {
33
+ function Badge({
34
+ className,
35
+ variant,
36
+ ...props
37
+ }: BadgeProps): React.JSX.Element {
33
38
  return <div className={badgeVariants({ variant, className })} {...props} />;
34
39
  }
35
40