@codefast/ui 0.0.40 → 0.0.42

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 (387) 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-UPZHCTQV.js → chunk-ELWITZPX.js} +2 -2
  8. package/dist/chunk-ELWITZPX.js.map +1 -0
  9. package/dist/{chunk-WLMYX3C7.mjs → chunk-GDMHMSJ2.mjs} +2 -2
  10. package/dist/chunk-GDMHMSJ2.mjs.map +1 -0
  11. package/dist/{chunk-UJJZZCAC.js → chunk-HQ4AUOQM.js} +1 -1
  12. package/dist/{chunk-UJJZZCAC.js.map → chunk-HQ4AUOQM.js.map} +1 -1
  13. package/dist/{chunk-HLXU3SQI.mjs → chunk-HWEFQSTC.mjs} +1 -1
  14. package/dist/chunk-HWEFQSTC.mjs.map +1 -0
  15. package/dist/{chunk-JTAXNFUM.mjs → chunk-HX5YKP4E.mjs} +2 -2
  16. package/dist/chunk-HX5YKP4E.mjs.map +1 -0
  17. package/dist/{chunk-PLX35IKX.mjs → chunk-I6QCJDIF.mjs} +1 -1
  18. package/dist/chunk-I6QCJDIF.mjs.map +1 -0
  19. package/dist/{chunk-466PAJCA.mjs → chunk-LEUB3C3L.mjs} +1 -1
  20. package/dist/chunk-LEUB3C3L.mjs.map +1 -0
  21. package/dist/{chunk-KJ77RPJ4.mjs → chunk-M5UKNISJ.mjs} +2 -2
  22. package/dist/chunk-M5UKNISJ.mjs.map +1 -0
  23. package/dist/{chunk-EYERINEJ.js → chunk-MZJL73RI.js} +1 -1
  24. package/dist/chunk-MZJL73RI.js.map +1 -0
  25. package/dist/{chunk-JCMRDCFT.js → chunk-NH6X3FON.js} +1 -1
  26. package/dist/{chunk-JCMRDCFT.js.map → chunk-NH6X3FON.js.map} +1 -1
  27. package/dist/{chunk-UDNWQQ3I.js → chunk-NSK74YTM.js} +2 -2
  28. package/dist/chunk-NSK74YTM.js.map +1 -0
  29. package/dist/{chunk-N6QGG4WS.mjs → chunk-P5AV3QU7.mjs} +2 -2
  30. package/dist/chunk-P5AV3QU7.mjs.map +1 -0
  31. package/dist/{chunk-GRQGCS7U.mjs → chunk-PWF46YXQ.mjs} +2 -2
  32. package/dist/chunk-PWF46YXQ.mjs.map +1 -0
  33. package/dist/{chunk-ZWGC5M4G.js → chunk-SCJ3W2VO.js} +2 -2
  34. package/dist/chunk-SCJ3W2VO.js.map +1 -0
  35. package/dist/{chunk-MSHUAEXI.js → chunk-SCPFGC2X.js} +2 -2
  36. package/dist/chunk-SCPFGC2X.js.map +1 -0
  37. package/dist/{chunk-JIHHUXA5.js → chunk-VXPAGNPJ.js} +2 -2
  38. package/dist/chunk-VXPAGNPJ.js.map +1 -0
  39. package/dist/{chunk-6B2PU2GG.mjs → chunk-WL65TBKJ.mjs} +2 -2
  40. package/dist/chunk-WL65TBKJ.mjs.map +1 -0
  41. package/dist/{chunk-4TJBMO2Y.mjs → chunk-WYYOCZNI.mjs} +2 -2
  42. package/dist/chunk-WYYOCZNI.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.js +1 -1
  52. package/dist/plugin/animate.plugin.mjs +1 -1
  53. package/dist/plugin/base.plugin.js +1 -1
  54. package/dist/plugin/base.plugin.mjs +1 -1
  55. package/dist/plugin/perspective.plugin.js +1 -1
  56. package/dist/plugin/perspective.plugin.mjs +1 -1
  57. package/dist/react/accordion.js +1 -1
  58. package/dist/react/accordion.js.map +1 -1
  59. package/dist/react/accordion.mjs +1 -1
  60. package/dist/react/accordion.mjs.map +1 -1
  61. package/dist/react/alert-dialog.js +1 -1
  62. package/dist/react/alert-dialog.js.map +1 -1
  63. package/dist/react/alert-dialog.mjs +1 -1
  64. package/dist/react/alert-dialog.mjs.map +1 -1
  65. package/dist/react/alert.js +1 -1
  66. package/dist/react/alert.js.map +1 -1
  67. package/dist/react/alert.mjs +1 -1
  68. package/dist/react/alert.mjs.map +1 -1
  69. package/dist/react/aspect-ratio.js.map +1 -1
  70. package/dist/react/aspect-ratio.mjs.map +1 -1
  71. package/dist/react/avatar.js +1 -1
  72. package/dist/react/avatar.js.map +1 -1
  73. package/dist/react/avatar.mjs +1 -1
  74. package/dist/react/avatar.mjs.map +1 -1
  75. package/dist/react/badge.js +1 -1
  76. package/dist/react/badge.js.map +1 -1
  77. package/dist/react/badge.mjs +1 -1
  78. package/dist/react/badge.mjs.map +1 -1
  79. package/dist/react/blockquote.js.map +1 -1
  80. package/dist/react/blockquote.mjs.map +1 -1
  81. package/dist/react/box.d.mts +2 -2
  82. package/dist/react/box.d.ts +2 -2
  83. package/dist/react/box.js.map +1 -1
  84. package/dist/react/box.mjs.map +1 -1
  85. package/dist/react/breadcrumb.js +1 -1
  86. package/dist/react/breadcrumb.js.map +1 -1
  87. package/dist/react/breadcrumb.mjs +1 -1
  88. package/dist/react/breadcrumb.mjs.map +1 -1
  89. package/dist/react/button.js +1 -1
  90. package/dist/react/button.mjs +1 -1
  91. package/dist/react/calendar.js +1 -1
  92. package/dist/react/calendar.js.map +1 -1
  93. package/dist/react/calendar.mjs +1 -1
  94. package/dist/react/calendar.mjs.map +1 -1
  95. package/dist/react/card.js +1 -1
  96. package/dist/react/card.js.map +1 -1
  97. package/dist/react/card.mjs +1 -1
  98. package/dist/react/card.mjs.map +1 -1
  99. package/dist/react/carousel.d.mts +1 -1
  100. package/dist/react/carousel.d.ts +1 -1
  101. package/dist/react/carousel.js +1 -1
  102. package/dist/react/carousel.js.map +1 -1
  103. package/dist/react/carousel.mjs +1 -1
  104. package/dist/react/carousel.mjs.map +1 -1
  105. package/dist/react/checkbox-cards.js +1 -1
  106. package/dist/react/checkbox-cards.js.map +1 -1
  107. package/dist/react/checkbox-cards.mjs +1 -1
  108. package/dist/react/checkbox-cards.mjs.map +1 -1
  109. package/dist/react/checkbox-group.js +1 -1
  110. package/dist/react/checkbox-group.js.map +1 -1
  111. package/dist/react/checkbox-group.mjs +1 -1
  112. package/dist/react/checkbox-group.mjs.map +1 -1
  113. package/dist/react/checkbox-group.primitive.d.mts +8 -8
  114. package/dist/react/checkbox-group.primitive.d.ts +8 -8
  115. package/dist/react/checkbox-group.primitive.js +1 -1
  116. package/dist/react/checkbox-group.primitive.mjs +1 -1
  117. package/dist/react/checkbox.js +1 -1
  118. package/dist/react/checkbox.js.map +1 -1
  119. package/dist/react/checkbox.mjs +1 -1
  120. package/dist/react/checkbox.mjs.map +1 -1
  121. package/dist/react/code.js.map +1 -1
  122. package/dist/react/code.mjs.map +1 -1
  123. package/dist/react/collapsible.js +1 -1
  124. package/dist/react/collapsible.js.map +1 -1
  125. package/dist/react/collapsible.mjs +1 -1
  126. package/dist/react/collapsible.mjs.map +1 -1
  127. package/dist/react/command.js +1 -1
  128. package/dist/react/command.js.map +1 -1
  129. package/dist/react/command.mjs +1 -1
  130. package/dist/react/command.mjs.map +1 -1
  131. package/dist/react/container.js +1 -1
  132. package/dist/react/container.js.map +1 -1
  133. package/dist/react/container.mjs +1 -1
  134. package/dist/react/container.mjs.map +1 -1
  135. package/dist/react/context-menu.js +1 -1
  136. package/dist/react/context-menu.js.map +1 -1
  137. package/dist/react/context-menu.mjs +1 -1
  138. package/dist/react/context-menu.mjs.map +1 -1
  139. package/dist/react/data-table.d.mts +1 -1
  140. package/dist/react/data-table.d.ts +1 -1
  141. package/dist/react/data-table.js +1 -1
  142. package/dist/react/data-table.js.map +1 -1
  143. package/dist/react/data-table.mjs +1 -1
  144. package/dist/react/data-table.mjs.map +1 -1
  145. package/dist/react/dialog.js +1 -1
  146. package/dist/react/dialog.mjs +1 -1
  147. package/dist/react/drawer.js +1 -1
  148. package/dist/react/drawer.js.map +1 -1
  149. package/dist/react/drawer.mjs +1 -1
  150. package/dist/react/drawer.mjs.map +1 -1
  151. package/dist/react/dropdown-menu.js +1 -1
  152. package/dist/react/dropdown-menu.mjs +1 -1
  153. package/dist/react/em.js.map +1 -1
  154. package/dist/react/em.mjs.map +1 -1
  155. package/dist/react/form.js +1 -1
  156. package/dist/react/form.js.map +1 -1
  157. package/dist/react/form.mjs +1 -1
  158. package/dist/react/form.mjs.map +1 -1
  159. package/dist/react/heading.d.mts +1 -1
  160. package/dist/react/heading.d.ts +1 -1
  161. package/dist/react/heading.js.map +1 -1
  162. package/dist/react/heading.mjs.map +1 -1
  163. package/dist/react/hover-card.js +1 -1
  164. package/dist/react/hover-card.js.map +1 -1
  165. package/dist/react/hover-card.mjs +1 -1
  166. package/dist/react/hover-card.mjs.map +1 -1
  167. package/dist/react/input-otp.js +1 -1
  168. package/dist/react/input-otp.js.map +1 -1
  169. package/dist/react/input-otp.mjs +1 -1
  170. package/dist/react/input-otp.mjs.map +1 -1
  171. package/dist/react/input.js +1 -1
  172. package/dist/react/input.js.map +1 -1
  173. package/dist/react/input.mjs +1 -1
  174. package/dist/react/input.mjs.map +1 -1
  175. package/dist/react/kbd.js +1 -1
  176. package/dist/react/kbd.js.map +1 -1
  177. package/dist/react/kbd.mjs +1 -1
  178. package/dist/react/kbd.mjs.map +1 -1
  179. package/dist/react/label.js +1 -1
  180. package/dist/react/label.mjs +1 -1
  181. package/dist/react/menubar.js +1 -1
  182. package/dist/react/menubar.js.map +1 -1
  183. package/dist/react/menubar.mjs +1 -1
  184. package/dist/react/menubar.mjs.map +1 -1
  185. package/dist/react/navigation-menu.js +1 -1
  186. package/dist/react/navigation-menu.js.map +1 -1
  187. package/dist/react/navigation-menu.mjs +1 -1
  188. package/dist/react/navigation-menu.mjs.map +1 -1
  189. package/dist/react/pagination.d.mts +1 -1
  190. package/dist/react/pagination.d.ts +1 -1
  191. package/dist/react/pagination.js +1 -1
  192. package/dist/react/pagination.js.map +1 -1
  193. package/dist/react/pagination.mjs +1 -1
  194. package/dist/react/pagination.mjs.map +1 -1
  195. package/dist/react/popover.js +1 -1
  196. package/dist/react/popover.js.map +1 -1
  197. package/dist/react/popover.mjs +1 -1
  198. package/dist/react/popover.mjs.map +1 -1
  199. package/dist/react/pre.js.map +1 -1
  200. package/dist/react/pre.mjs.map +1 -1
  201. package/dist/react/progress.js +1 -1
  202. package/dist/react/progress.js.map +1 -1
  203. package/dist/react/progress.mjs +1 -1
  204. package/dist/react/progress.mjs.map +1 -1
  205. package/dist/react/quote.js.map +1 -1
  206. package/dist/react/quote.mjs.map +1 -1
  207. package/dist/react/radio-cards.js +1 -1
  208. package/dist/react/radio-cards.js.map +1 -1
  209. package/dist/react/radio-cards.mjs +1 -1
  210. package/dist/react/radio-cards.mjs.map +1 -1
  211. package/dist/react/radio-group.js +1 -1
  212. package/dist/react/radio-group.js.map +1 -1
  213. package/dist/react/radio-group.mjs +1 -1
  214. package/dist/react/radio-group.mjs.map +1 -1
  215. package/dist/react/radio.js +1 -1
  216. package/dist/react/radio.js.map +1 -1
  217. package/dist/react/radio.mjs +1 -1
  218. package/dist/react/radio.mjs.map +1 -1
  219. package/dist/react/resizable.js +1 -1
  220. package/dist/react/resizable.js.map +1 -1
  221. package/dist/react/resizable.mjs +1 -1
  222. package/dist/react/resizable.mjs.map +1 -1
  223. package/dist/react/scroll-area.js +1 -1
  224. package/dist/react/scroll-area.js.map +1 -1
  225. package/dist/react/scroll-area.mjs +1 -1
  226. package/dist/react/scroll-area.mjs.map +1 -1
  227. package/dist/react/section.js.map +1 -1
  228. package/dist/react/section.mjs.map +1 -1
  229. package/dist/react/select.js +1 -1
  230. package/dist/react/select.mjs +1 -1
  231. package/dist/react/separator.js +1 -1
  232. package/dist/react/separator.js.map +1 -1
  233. package/dist/react/separator.mjs +1 -1
  234. package/dist/react/separator.mjs.map +1 -1
  235. package/dist/react/sheet.js +1 -1
  236. package/dist/react/sheet.js.map +1 -1
  237. package/dist/react/sheet.mjs +1 -1
  238. package/dist/react/sheet.mjs.map +1 -1
  239. package/dist/react/skeleton.js +1 -1
  240. package/dist/react/skeleton.js.map +1 -1
  241. package/dist/react/skeleton.mjs +1 -1
  242. package/dist/react/skeleton.mjs.map +1 -1
  243. package/dist/react/slider.js +1 -1
  244. package/dist/react/slider.js.map +1 -1
  245. package/dist/react/slider.mjs +1 -1
  246. package/dist/react/slider.mjs.map +1 -1
  247. package/dist/react/sonner.js.map +1 -1
  248. package/dist/react/sonner.mjs.map +1 -1
  249. package/dist/react/spinner.js +1 -1
  250. package/dist/react/spinner.mjs +1 -1
  251. package/dist/react/strong.js.map +1 -1
  252. package/dist/react/strong.mjs.map +1 -1
  253. package/dist/react/switch.js +1 -1
  254. package/dist/react/switch.js.map +1 -1
  255. package/dist/react/switch.mjs +1 -1
  256. package/dist/react/switch.mjs.map +1 -1
  257. package/dist/react/table.js +1 -1
  258. package/dist/react/table.js.map +1 -1
  259. package/dist/react/table.mjs +1 -1
  260. package/dist/react/table.mjs.map +1 -1
  261. package/dist/react/tabs.js +1 -1
  262. package/dist/react/tabs.js.map +1 -1
  263. package/dist/react/tabs.mjs +1 -1
  264. package/dist/react/tabs.mjs.map +1 -1
  265. package/dist/react/text.d.mts +2 -2
  266. package/dist/react/text.d.ts +2 -2
  267. package/dist/react/text.js.map +1 -1
  268. package/dist/react/text.mjs.map +1 -1
  269. package/dist/react/textarea.js +1 -1
  270. package/dist/react/textarea.js.map +1 -1
  271. package/dist/react/textarea.mjs +1 -1
  272. package/dist/react/textarea.mjs.map +1 -1
  273. package/dist/react/toggle-group.js +1 -1
  274. package/dist/react/toggle-group.js.map +1 -1
  275. package/dist/react/toggle-group.mjs +1 -1
  276. package/dist/react/toggle-group.mjs.map +1 -1
  277. package/dist/react/toggle.js +1 -1
  278. package/dist/react/toggle.mjs +1 -1
  279. package/dist/react/tooltip.js +1 -1
  280. package/dist/react/tooltip.js.map +1 -1
  281. package/dist/react/tooltip.mjs +1 -1
  282. package/dist/react/tooltip.mjs.map +1 -1
  283. package/dist/styles.css +1 -1
  284. package/dist/styles.css.map +1 -1
  285. package/dist/tailwind.config.js +1 -1
  286. package/dist/tailwind.config.js.map +1 -1
  287. package/dist/tailwind.config.mjs +1 -1
  288. package/dist/tailwind.config.mjs.map +1 -1
  289. package/package.json +7 -7
  290. package/plugin/animate.plugin.ts +114 -111
  291. package/plugin/base.plugin.ts +10 -7
  292. package/plugin/perspective.plugin.ts +1 -1
  293. package/src/lib/utils.ts +2 -2
  294. package/src/react/accordion.tsx +65 -41
  295. package/src/react/alert-dialog.tsx +130 -62
  296. package/src/react/alert.tsx +50 -24
  297. package/src/react/aspect-ratio.tsx +6 -4
  298. package/src/react/avatar.tsx +47 -19
  299. package/src/react/badge.tsx +15 -10
  300. package/src/react/blockquote.tsx +11 -8
  301. package/src/react/box.tsx +11 -9
  302. package/src/react/breadcrumb.tsx +62 -29
  303. package/src/react/button.tsx +47 -31
  304. package/src/react/calendar.tsx +54 -37
  305. package/src/react/card.tsx +64 -30
  306. package/src/react/carousel.tsx +101 -43
  307. package/src/react/checkbox-cards.tsx +60 -33
  308. package/src/react/checkbox-group.primitive.tsx +93 -38
  309. package/src/react/checkbox-group.tsx +57 -34
  310. package/src/react/checkbox.tsx +24 -20
  311. package/src/react/code.tsx +9 -7
  312. package/src/react/collapsible.tsx +33 -23
  313. package/src/react/command.tsx +140 -75
  314. package/src/react/container.tsx +12 -8
  315. package/src/react/context-menu.tsx +228 -150
  316. package/src/react/data-table.tsx +51 -21
  317. package/src/react/dialog.tsx +95 -50
  318. package/src/react/drawer.tsx +96 -49
  319. package/src/react/dropdown-menu.tsx +199 -131
  320. package/src/react/em.tsx +9 -7
  321. package/src/react/form.tsx +96 -61
  322. package/src/react/heading.tsx +10 -8
  323. package/src/react/hover-card.tsx +42 -26
  324. package/src/react/input-otp.tsx +48 -37
  325. package/src/react/input.tsx +25 -15
  326. package/src/react/kbd.tsx +21 -19
  327. package/src/react/label.tsx +16 -14
  328. package/src/react/menubar.tsx +214 -135
  329. package/src/react/navigation-menu.tsx +153 -111
  330. package/src/react/pagination.tsx +59 -26
  331. package/src/react/popover.tsx +44 -29
  332. package/src/react/pre.tsx +9 -7
  333. package/src/react/progress.tsx +26 -19
  334. package/src/react/quote.tsx +9 -7
  335. package/src/react/radio-cards.tsx +32 -12
  336. package/src/react/radio-group.tsx +32 -12
  337. package/src/react/radio.tsx +24 -20
  338. package/src/react/resizable.tsx +13 -8
  339. package/src/react/scroll-area.tsx +56 -34
  340. package/src/react/section.tsx +9 -7
  341. package/src/react/select.tsx +167 -114
  342. package/src/react/separator.tsx +16 -7
  343. package/src/react/sheet.tsx +84 -34
  344. package/src/react/skeleton.tsx +8 -3
  345. package/src/react/slider.tsx +31 -24
  346. package/src/react/sonner.tsx +12 -10
  347. package/src/react/spinner.tsx +14 -9
  348. package/src/react/strong.tsx +9 -7
  349. package/src/react/switch.tsx +18 -16
  350. package/src/react/table.tsx +97 -52
  351. package/src/react/tabs.tsx +48 -38
  352. package/src/react/text.tsx +13 -10
  353. package/src/react/textarea.tsx +17 -15
  354. package/src/react/toggle-group.tsx +66 -23
  355. package/src/react/toggle.tsx +26 -18
  356. package/src/react/tooltip.tsx +43 -28
  357. package/tailwind.config.ts +62 -62
  358. package/dist/chunk-466PAJCA.mjs.map +0 -1
  359. package/dist/chunk-4TJBMO2Y.mjs.map +0 -1
  360. package/dist/chunk-5WJB3UAO.js.map +0 -1
  361. package/dist/chunk-6B2PU2GG.mjs.map +0 -1
  362. package/dist/chunk-7PJR4WFR.mjs.map +0 -1
  363. package/dist/chunk-AEWLL6A2.js.map +0 -1
  364. package/dist/chunk-EVN2IB57.js.map +0 -1
  365. package/dist/chunk-EYERINEJ.js.map +0 -1
  366. package/dist/chunk-FEE6PNWV.js.map +0 -1
  367. package/dist/chunk-GRQGCS7U.mjs.map +0 -1
  368. package/dist/chunk-HLXU3SQI.mjs.map +0 -1
  369. package/dist/chunk-JIHHUXA5.js.map +0 -1
  370. package/dist/chunk-JTAXNFUM.mjs.map +0 -1
  371. package/dist/chunk-KJ77RPJ4.mjs.map +0 -1
  372. package/dist/chunk-MSHUAEXI.js.map +0 -1
  373. package/dist/chunk-N6QGG4WS.mjs.map +0 -1
  374. package/dist/chunk-PLX35IKX.mjs.map +0 -1
  375. package/dist/chunk-UDNWQQ3I.js.map +0 -1
  376. package/dist/chunk-UPZHCTQV.js.map +0 -1
  377. package/dist/chunk-WLMYX3C7.mjs.map +0 -1
  378. package/dist/chunk-YR36SVVG.mjs.map +0 -1
  379. package/dist/chunk-ZWGC5M4G.js.map +0 -1
  380. package/dist/plugin/animate.plugin.d.mts +0 -9
  381. package/dist/plugin/animate.plugin.d.ts +0 -9
  382. package/dist/plugin/base.plugin.d.mts +0 -8
  383. package/dist/plugin/base.plugin.d.ts +0 -8
  384. package/dist/plugin/perspective.plugin.d.mts +0 -8
  385. package/dist/plugin/perspective.plugin.d.ts +0 -8
  386. package/dist/tailwind.config.d.mts +0 -5
  387. package/dist/tailwind.config.d.ts +0 -5
@@ -1,8 +1,8 @@
1
- "use client";
1
+ 'use client';
2
2
 
3
- import * as React from "react";
4
- import type * as LabelPrimitive from "@radix-ui/react-label";
5
- import { Slot } from "@radix-ui/react-slot";
3
+ import * as React from 'react';
4
+ import type * as LabelPrimitive from '@radix-ui/react-label';
5
+ import { Slot } from '@radix-ui/react-slot';
6
6
  import {
7
7
  Controller,
8
8
  type ControllerProps,
@@ -11,9 +11,9 @@ import {
11
11
  type FieldValues,
12
12
  FormProvider,
13
13
  useFormContext,
14
- } from "react-hook-form";
15
- import { cn } from "../lib/utils";
16
- import { Label } from "./label";
14
+ } from 'react-hook-form';
15
+ import { cn } from '../lib/utils';
16
+ import { Label } from './label';
17
17
 
18
18
  /* -----------------------------------------------------------------------------
19
19
  * Context: Form
@@ -30,7 +30,9 @@ interface FormItemContextValue {
30
30
  id: string;
31
31
  }
32
32
 
33
- const FormFieldContext = React.createContext<FormFieldContextValue | null>(null);
33
+ const FormFieldContext = React.createContext<FormFieldContextValue | null>(
34
+ null,
35
+ );
34
36
 
35
37
  const FormItemContext = React.createContext<FormItemContextValue | null>(null);
36
38
 
@@ -51,7 +53,7 @@ const useFormField = (): {
51
53
  const { getFieldState, formState } = useFormContext();
52
54
 
53
55
  if (!fieldContext || !itemContext) {
54
- throw new Error("useFormField should be used within <FormField>");
56
+ throw new Error('useFormField should be used within <FormField>');
55
57
  }
56
58
 
57
59
  const fieldState = getFieldState(fieldContext.name, formState);
@@ -102,32 +104,45 @@ function FormField<
102
104
  type FormItemElement = HTMLDivElement;
103
105
  type FormItemProps = React.HTMLAttributes<HTMLDivElement>;
104
106
 
105
- const FormItem = React.forwardRef<FormItemElement, FormItemProps>(({ className, ...props }, ref) => {
106
- const id = React.useId();
107
+ const FormItem = React.forwardRef<FormItemElement, FormItemProps>(
108
+ ({ className, ...props }, ref) => {
109
+ const id = React.useId();
107
110
 
108
- return (
109
- <FormItemContext.Provider value={{ id }}>
110
- <div ref={ref} className={cn("space-y-2", className)} {...props} />
111
- </FormItemContext.Provider>
112
- );
113
- });
111
+ return (
112
+ <FormItemContext.Provider value={{ id }}>
113
+ <div ref={ref} className={cn('space-y-2', className)} {...props} />
114
+ </FormItemContext.Provider>
115
+ );
116
+ },
117
+ );
114
118
 
115
- FormItem.displayName = "FormItem";
119
+ FormItem.displayName = 'FormItem';
116
120
 
117
121
  /* -----------------------------------------------------------------------------
118
122
  * Component: FormLabel
119
123
  * -------------------------------------------------------------------------- */
120
124
 
121
125
  type FormFieldElement = React.ElementRef<typeof LabelPrimitive.Root>;
122
- type FormLabelProps = React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>;
123
-
124
- const FormLabel = React.forwardRef<FormFieldElement, FormLabelProps>(({ className, ...props }, ref) => {
125
- const { error, formItemId } = useFormField();
126
+ type FormLabelProps = React.ComponentPropsWithoutRef<
127
+ typeof LabelPrimitive.Root
128
+ >;
126
129
 
127
- return <Label ref={ref} className={cn(error && "text-destructive", className)} htmlFor={formItemId} {...props} />;
128
- });
130
+ const FormLabel = React.forwardRef<FormFieldElement, FormLabelProps>(
131
+ ({ className, ...props }, ref) => {
132
+ const { error, formItemId } = useFormField();
133
+
134
+ return (
135
+ <Label
136
+ ref={ref}
137
+ className={cn(error && 'text-destructive', className)}
138
+ htmlFor={formItemId}
139
+ {...props}
140
+ />
141
+ );
142
+ },
143
+ );
129
144
 
130
- FormLabel.displayName = "FormLabel";
145
+ FormLabel.displayName = 'FormLabel';
131
146
 
132
147
  /* -----------------------------------------------------------------------------
133
148
  * Component: FormControl
@@ -136,21 +151,26 @@ FormLabel.displayName = "FormLabel";
136
151
  type FormControlElement = React.ElementRef<typeof Slot>;
137
152
  type FormControlProps = React.ComponentPropsWithoutRef<typeof Slot>;
138
153
 
139
- const FormControl = React.forwardRef<FormControlElement, FormControlProps>(({ ...props }, ref) => {
140
- const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
141
-
142
- return (
143
- <Slot
144
- ref={ref}
145
- id={formItemId}
146
- aria-describedby={!error ? formDescriptionId : `${formDescriptionId} ${formMessageId}`}
147
- aria-invalid={Boolean(error)}
148
- {...props}
149
- />
150
- );
151
- });
154
+ const FormControl = React.forwardRef<FormControlElement, FormControlProps>(
155
+ ({ ...props }, ref) => {
156
+ const { error, formItemId, formDescriptionId, formMessageId } =
157
+ useFormField();
158
+
159
+ return (
160
+ <Slot
161
+ ref={ref}
162
+ id={formItemId}
163
+ aria-describedby={
164
+ !error ? formDescriptionId : `${formDescriptionId} ${formMessageId}`
165
+ }
166
+ aria-invalid={Boolean(error)}
167
+ {...props}
168
+ />
169
+ );
170
+ },
171
+ );
152
172
 
153
- FormControl.displayName = "FormControl";
173
+ FormControl.displayName = 'FormControl';
154
174
 
155
175
  /* -----------------------------------------------------------------------------
156
176
  * Component: FormDescription
@@ -159,15 +179,23 @@ FormControl.displayName = "FormControl";
159
179
  type FormDescriptionElement = HTMLParagraphElement;
160
180
  type FormDescriptionProps = React.HTMLAttributes<HTMLParagraphElement>;
161
181
 
162
- const FormDescription = React.forwardRef<FormDescriptionElement, FormDescriptionProps>(
163
- ({ className, ...props }, ref) => {
164
- const { formDescriptionId } = useFormField();
182
+ const FormDescription = React.forwardRef<
183
+ FormDescriptionElement,
184
+ FormDescriptionProps
185
+ >(({ className, ...props }, ref) => {
186
+ const { formDescriptionId } = useFormField();
165
187
 
166
- return <p ref={ref} id={formDescriptionId} className={cn("text-muted-foreground text-xs", className)} {...props} />;
167
- },
168
- );
188
+ return (
189
+ <p
190
+ ref={ref}
191
+ id={formDescriptionId}
192
+ className={cn('text-muted-foreground text-xs', className)}
193
+ {...props}
194
+ />
195
+ );
196
+ });
169
197
 
170
- FormDescription.displayName = "FormDescription";
198
+ FormDescription.displayName = 'FormDescription';
171
199
 
172
200
  /* -----------------------------------------------------------------------------
173
201
  * Component: FormMessage
@@ -176,22 +204,29 @@ FormDescription.displayName = "FormDescription";
176
204
  type FormMessageElement = HTMLParagraphElement;
177
205
  type FormMessageProps = React.HTMLAttributes<HTMLParagraphElement>;
178
206
 
179
- const FormMessage = React.forwardRef<FormMessageElement, FormMessageProps>(({ children, className, ...props }, ref) => {
180
- const { error, formMessageId } = useFormField();
181
- const body = error?.message ? error.message : children;
182
-
183
- if (!body) {
184
- return null;
185
- }
186
-
187
- return (
188
- <p ref={ref} id={formMessageId} className={cn("text-destructive text-xs font-medium", className)} {...props}>
189
- {body}
190
- </p>
191
- );
192
- });
207
+ const FormMessage = React.forwardRef<FormMessageElement, FormMessageProps>(
208
+ ({ children, className, ...props }, ref) => {
209
+ const { error, formMessageId } = useFormField();
210
+ const body = error?.message ? error.message : children;
211
+
212
+ if (!body) {
213
+ return null;
214
+ }
215
+
216
+ return (
217
+ <p
218
+ ref={ref}
219
+ id={formMessageId}
220
+ className={cn('text-destructive text-xs font-medium', className)}
221
+ {...props}
222
+ >
223
+ {body}
224
+ </p>
225
+ );
226
+ },
227
+ );
193
228
 
194
- FormMessage.displayName = "FormMessage";
229
+ FormMessage.displayName = 'FormMessage';
195
230
 
196
231
  /* -----------------------------------------------------------------------------
197
232
  * Exports
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
- import { Slot } from "@radix-ui/react-slot";
1
+ import * as React from 'react';
2
+ import { Slot } from '@radix-ui/react-slot';
3
3
 
4
4
  /* -----------------------------------------------------------------------------
5
5
  * Component: Heading
@@ -8,17 +8,19 @@ import { Slot } from "@radix-ui/react-slot";
8
8
  type HeadingElement = HTMLHeadingElement;
9
9
 
10
10
  interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {
11
- as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
11
+ as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
12
12
  asChild?: boolean;
13
13
  }
14
14
 
15
- const Heading = React.forwardRef<HeadingElement, HeadingProps>(({ asChild, as: Tag = "h1", ...props }, ref) => {
16
- const Component = asChild ? Slot : Tag;
15
+ const Heading = React.forwardRef<HeadingElement, HeadingProps>(
16
+ ({ asChild, as: Tag = 'h1', ...props }, ref) => {
17
+ const Component = asChild ? Slot : Tag;
17
18
 
18
- return <Component ref={ref} {...props} />;
19
- });
19
+ return <Component ref={ref} {...props} />;
20
+ },
21
+ );
20
22
 
21
- Heading.displayName = "Heading";
23
+ Heading.displayName = 'Heading';
22
24
 
23
25
  /* -----------------------------------------------------------------------------
24
26
  * Exports
@@ -1,8 +1,8 @@
1
- "use client";
1
+ 'use client';
2
2
 
3
- import * as React from "react";
4
- import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
5
- import { cn } from "../lib/utils";
3
+ import * as React from 'react';
4
+ import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
5
+ import { cn } from '../lib/utils';
6
6
 
7
7
  /* -----------------------------------------------------------------------------
8
8
  * Component: HoverCard
@@ -15,32 +15,39 @@ const HoverCard = HoverCardPrimitive.Root;
15
15
  * Component: HoverCardTrigger
16
16
  * -------------------------------------------------------------------------- */
17
17
 
18
- type HoverCardTriggerProps = React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Trigger>;
18
+ type HoverCardTriggerProps = React.ComponentPropsWithoutRef<
19
+ typeof HoverCardPrimitive.Trigger
20
+ >;
19
21
  const HoverCardTrigger = HoverCardPrimitive.Trigger;
20
22
 
21
23
  /* -----------------------------------------------------------------------------
22
24
  * Component: HoverCardContent
23
25
  * -------------------------------------------------------------------------- */
24
26
 
25
- type HoverCardContentElement = React.ElementRef<typeof HoverCardPrimitive.Content>;
26
- type HoverCardContentProps = React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>;
27
+ type HoverCardContentElement = React.ElementRef<
28
+ typeof HoverCardPrimitive.Content
29
+ >;
30
+ type HoverCardContentProps = React.ComponentPropsWithoutRef<
31
+ typeof HoverCardPrimitive.Content
32
+ >;
27
33
 
28
- const HoverCardContent = React.forwardRef<HoverCardContentElement, HoverCardContentProps>(
29
- ({ className, align = "center", sideOffset = 6, ...props }, ref) => (
30
- <HoverCardPrimitive.Portal>
31
- <HoverCardPrimitive.Content
32
- ref={ref}
33
- align={align}
34
- sideOffset={sideOffset}
35
- className={cn(
36
- "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-32 rounded-md border p-4 shadow-md",
37
- className,
38
- )}
39
- {...props}
40
- />
41
- </HoverCardPrimitive.Portal>
42
- ),
43
- );
34
+ const HoverCardContent = React.forwardRef<
35
+ HoverCardContentElement,
36
+ HoverCardContentProps
37
+ >(({ className, align = 'center', sideOffset = 6, ...props }, ref) => (
38
+ <HoverCardPrimitive.Portal>
39
+ <HoverCardPrimitive.Content
40
+ ref={ref}
41
+ align={align}
42
+ sideOffset={sideOffset}
43
+ className={cn(
44
+ 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 z-50 min-w-32 rounded-md border p-4 shadow-md',
45
+ className,
46
+ )}
47
+ {...props}
48
+ />
49
+ </HoverCardPrimitive.Portal>
50
+ ));
44
51
 
45
52
  HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
46
53
 
@@ -49,10 +56,19 @@ HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
49
56
  * -------------------------------------------------------------------------- */
50
57
 
51
58
  type HoverCardArrowElement = React.ElementRef<typeof HoverCardPrimitive.Arrow>;
52
- type HoverCardArrowProps = React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Arrow>;
59
+ type HoverCardArrowProps = React.ComponentPropsWithoutRef<
60
+ typeof HoverCardPrimitive.Arrow
61
+ >;
53
62
 
54
- const HoverCardArrow = React.forwardRef<HoverCardArrowElement, HoverCardArrowProps>(({ className, ...props }, ref) => (
55
- <HoverCardPrimitive.Arrow ref={ref} className={cn("fill-popover", className)} {...props} />
63
+ const HoverCardArrow = React.forwardRef<
64
+ HoverCardArrowElement,
65
+ HoverCardArrowProps
66
+ >(({ className, ...props }, ref) => (
67
+ <HoverCardPrimitive.Arrow
68
+ ref={ref}
69
+ className={cn('fill-popover', className)}
70
+ {...props}
71
+ />
56
72
  ));
57
73
 
58
74
  HoverCardArrow.displayName = HoverCardPrimitive.Arrow.displayName;
@@ -1,15 +1,15 @@
1
- "use client";
1
+ 'use client';
2
2
 
3
- import * as React from "react";
4
- import { DotFilledIcon } from "@radix-ui/react-icons";
3
+ import * as React from 'react';
4
+ import { DotFilledIcon } from '@radix-ui/react-icons';
5
5
  import {
6
6
  OTPInput,
7
7
  OTPInputContext,
8
8
  REGEXP_ONLY_CHARS,
9
9
  REGEXP_ONLY_DIGITS,
10
10
  REGEXP_ONLY_DIGITS_AND_CHARS,
11
- } from "input-otp";
12
- import { cn } from "../lib/utils";
11
+ } from 'input-otp';
12
+ import { cn } from '../lib/utils';
13
13
 
14
14
  /* -----------------------------------------------------------------------------
15
15
  * Component: InputOtp
@@ -22,14 +22,17 @@ const InputOTP = React.forwardRef<InputOTPElement, InputOTPProps>(
22
22
  ({ className, containerClassName, ...props }, ref) => (
23
23
  <OTPInput
24
24
  ref={ref}
25
- containerClassName={cn("flex items-center gap-2 has-[:disabled]:opacity-50", containerClassName)}
26
- className={cn("disabled:cursor-not-allowed", className)}
25
+ containerClassName={cn(
26
+ 'flex items-center gap-2 has-[:disabled]:opacity-50',
27
+ containerClassName,
28
+ )}
29
+ className={cn('disabled:cursor-not-allowed', className)}
27
30
  {...props}
28
31
  />
29
32
  ),
30
33
  );
31
34
 
32
- InputOTP.displayName = "InputOTP";
35
+ InputOTP.displayName = 'InputOTP';
33
36
 
34
37
  /* -----------------------------------------------------------------------------
35
38
  * Component: InputOTPGroup
@@ -38,11 +41,14 @@ InputOTP.displayName = "InputOTP";
38
41
  type InputOTPGroupElement = HTMLDivElement;
39
42
  type InputOTPGroupProps = React.HTMLAttributes<HTMLDivElement>;
40
43
 
41
- const InputOTPGroup = React.forwardRef<InputOTPGroupElement, InputOTPGroupProps>(({ className, ...props }, ref) => (
42
- <div ref={ref} className={cn("flex items-center", className)} {...props} />
44
+ const InputOTPGroup = React.forwardRef<
45
+ InputOTPGroupElement,
46
+ InputOTPGroupProps
47
+ >(({ className, ...props }, ref) => (
48
+ <div ref={ref} className={cn('flex items-center', className)} {...props} />
43
49
  ));
44
50
 
45
- InputOTPGroup.displayName = "InputOTPGroup";
51
+ InputOTPGroup.displayName = 'InputOTPGroup';
46
52
 
47
53
  /* -----------------------------------------------------------------------------
48
54
  * Component: InputOTPSlot
@@ -54,31 +60,33 @@ interface InputOTPSlotProps extends React.HTMLAttributes<HTMLDivElement> {
54
60
  index: number;
55
61
  }
56
62
 
57
- const InputOTPSlot = React.forwardRef<InputOTPSlotElement, InputOTPSlotProps>(({ index, className, ...props }, ref) => {
58
- const inputOTPContext = React.useContext(OTPInputContext);
59
- const slot = inputOTPContext.slots[index];
63
+ const InputOTPSlot = React.forwardRef<InputOTPSlotElement, InputOTPSlotProps>(
64
+ ({ index, className, ...props }, ref) => {
65
+ const inputOTPContext = React.useContext(OTPInputContext);
66
+ const slot = inputOTPContext.slots[index];
67
+
68
+ return (
69
+ <div
70
+ ref={ref}
71
+ className={cn(
72
+ 'border-input relative flex size-10 items-center justify-center border-y border-r text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md',
73
+ slot?.isActive && 'z-10 outline outline-2',
74
+ className,
75
+ )}
76
+ {...props}
77
+ >
78
+ {slot?.char}
79
+ {slot?.hasFakeCaret ? (
80
+ <div className="pointer-events-none absolute inset-0 flex items-center justify-center">
81
+ <div className="animate-caret-blink bg-foreground animate-duration-1000 h-4 w-px" />
82
+ </div>
83
+ ) : null}
84
+ </div>
85
+ );
86
+ },
87
+ );
60
88
 
61
- return (
62
- <div
63
- ref={ref}
64
- className={cn(
65
- "border-input relative flex size-10 items-center justify-center border-y border-r text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",
66
- slot?.isActive && "z-10 outline outline-2",
67
- className,
68
- )}
69
- {...props}
70
- >
71
- {slot?.char}
72
- {slot?.hasFakeCaret ? (
73
- <div className="pointer-events-none absolute inset-0 flex items-center justify-center">
74
- <div className="animate-caret-blink bg-foreground animate-duration-1000 h-4 w-px" />
75
- </div>
76
- ) : null}
77
- </div>
78
- );
79
- });
80
-
81
- InputOTPSlot.displayName = "InputOTPSlot";
89
+ InputOTPSlot.displayName = 'InputOTPSlot';
82
90
 
83
91
  /* -----------------------------------------------------------------------------
84
92
  * Component: InputOTPSeparator
@@ -87,13 +95,16 @@ InputOTPSlot.displayName = "InputOTPSlot";
87
95
  type InputOTPSeparatorElement = HTMLDivElement;
88
96
  type InputOTPSeparatorProps = React.HTMLAttributes<HTMLDivElement>;
89
97
 
90
- const InputOTPSeparator = React.forwardRef<InputOTPSeparatorElement, InputOTPSeparatorProps>(({ ...props }, ref) => (
98
+ const InputOTPSeparator = React.forwardRef<
99
+ InputOTPSeparatorElement,
100
+ InputOTPSeparatorProps
101
+ >(({ ...props }, ref) => (
91
102
  <div ref={ref} role="separator" {...props}>
92
103
  <DotFilledIcon />
93
104
  </div>
94
105
  ));
95
106
 
96
- InputOTPSeparator.displayName = "InputOTPSeparator";
107
+ InputOTPSeparator.displayName = 'InputOTPSeparator';
97
108
 
98
109
  /* -----------------------------------------------------------------------------
99
110
  * Exports
@@ -1,23 +1,23 @@
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: Input
7
7
  * -------------------------------------------------------------------------- */
8
8
 
9
9
  const inputVariants = cva({
10
- base: "border-input placeholder:text-muted-foreground flex w-full rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm transition file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
10
+ base: 'border-input placeholder:text-muted-foreground flex w-full rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm transition file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
11
11
  variants: {
12
12
  inputSize: {
13
- default: "h-10",
14
- xs: "h-8",
15
- sm: "h-9",
16
- lg: "h-11",
13
+ default: 'h-10',
14
+ xs: 'h-8',
15
+ sm: 'h-9',
16
+ lg: 'h-11',
17
17
  },
18
18
  },
19
19
  defaultVariants: {
20
- inputSize: "default",
20
+ inputSize: 'default',
21
21
  },
22
22
  });
23
23
 
@@ -28,13 +28,23 @@ type InputVariantsProps = VariantProps<typeof inputVariants>;
28
28
  * -------------------------------------------------------------------------- */
29
29
 
30
30
  type InputElement = HTMLInputElement;
31
- type InputProps = React.InputHTMLAttributes<HTMLInputElement> & InputVariantsProps;
32
-
33
- const Input = React.forwardRef<InputElement, InputProps>(({ className, inputSize, ...props }, ref) => {
34
- return <input type="text" className={inputVariants({ className, inputSize })} ref={ref} {...props} />;
35
- });
31
+ type InputProps = React.InputHTMLAttributes<HTMLInputElement> &
32
+ InputVariantsProps;
33
+
34
+ const Input = React.forwardRef<InputElement, InputProps>(
35
+ ({ className, inputSize, ...props }, ref) => {
36
+ return (
37
+ <input
38
+ type="text"
39
+ className={inputVariants({ className, inputSize })}
40
+ ref={ref}
41
+ {...props}
42
+ />
43
+ );
44
+ },
45
+ );
36
46
 
37
- Input.displayName = "Input";
47
+ Input.displayName = 'Input';
38
48
 
39
49
  /* -----------------------------------------------------------------------------
40
50
  * Exports
package/src/react/kbd.tsx CHANGED
@@ -1,6 +1,6 @@
1
- import * as React from "react";
2
- import { Slot } from "@radix-ui/react-slot";
3
- import { cn } from "../lib/utils";
1
+ import * as React from 'react';
2
+ import { Slot } from '@radix-ui/react-slot';
3
+ import { cn } from '../lib/utils';
4
4
 
5
5
  /* -----------------------------------------------------------------------------
6
6
  * Component: Kbd
@@ -12,22 +12,24 @@ interface KbdProps extends React.HTMLAttributes<HTMLElement> {
12
12
  asChild?: boolean;
13
13
  }
14
14
 
15
- const Kbd = React.forwardRef<KbdElement, KbdProps>(({ asChild, className, ...props }, ref) => {
16
- const Component = asChild ? Slot : "kbd";
17
-
18
- return (
19
- <Component
20
- ref={ref}
21
- className={cn(
22
- "bg-muted text-muted-foreground inline-flex h-5 select-none items-center gap-1 rounded border px-1.5 font-mono text-xs font-medium",
23
- className,
24
- )}
25
- {...props}
26
- />
27
- );
28
- });
29
-
30
- Kbd.displayName = "Kbd";
15
+ const Kbd = React.forwardRef<KbdElement, KbdProps>(
16
+ ({ asChild, className, ...props }, ref) => {
17
+ const Component = asChild ? Slot : 'kbd';
18
+
19
+ return (
20
+ <Component
21
+ ref={ref}
22
+ className={cn(
23
+ 'bg-muted text-muted-foreground inline-flex h-5 select-none items-center gap-1 rounded border px-1.5 font-mono text-xs font-medium',
24
+ className,
25
+ )}
26
+ {...props}
27
+ />
28
+ );
29
+ },
30
+ );
31
+
32
+ Kbd.displayName = 'Kbd';
31
33
 
32
34
  /* -----------------------------------------------------------------------------
33
35
  * Exports
@@ -1,7 +1,7 @@
1
- "use client";
2
- import * as React from "react";
3
- import * as LabelPrimitive from "@radix-ui/react-label";
4
- import { cn } from "../lib/utils";
1
+ 'use client';
2
+ import * as React from 'react';
3
+ import * as LabelPrimitive from '@radix-ui/react-label';
4
+ import { cn } from '../lib/utils';
5
5
 
6
6
  /* -----------------------------------------------------------------------------
7
7
  * Component: Label
@@ -10,16 +10,18 @@ import { cn } from "../lib/utils";
10
10
  type LabelElement = React.ElementRef<typeof LabelPrimitive.Root>;
11
11
  type LabelProps = React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>;
12
12
 
13
- const Label = React.forwardRef<LabelElement, LabelProps>(({ className, ...props }, ref) => (
14
- <LabelPrimitive.Root
15
- ref={ref}
16
- className={cn(
17
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
18
- className,
19
- )}
20
- {...props}
21
- />
22
- ));
13
+ const Label = React.forwardRef<LabelElement, LabelProps>(
14
+ ({ className, ...props }, ref) => (
15
+ <LabelPrimitive.Root
16
+ ref={ref}
17
+ className={cn(
18
+ 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70',
19
+ className,
20
+ )}
21
+ {...props}
22
+ />
23
+ ),
24
+ );
23
25
 
24
26
  Label.displayName = LabelPrimitive.Root.displayName;
25
27