@codefast/ui 0.0.8 → 0.0.9

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 (377) hide show
  1. package/dist/accordion.d.mts +5 -1
  2. package/dist/accordion.d.ts +5 -1
  3. package/dist/accordion.js.map +1 -1
  4. package/dist/accordion.mjs.map +1 -1
  5. package/dist/alert-dialog.d.mts +12 -3
  6. package/dist/alert-dialog.d.ts +12 -3
  7. package/dist/alert-dialog.js +3 -3
  8. package/dist/alert-dialog.js.map +1 -1
  9. package/dist/alert-dialog.mjs +1 -1
  10. package/dist/alert-dialog.mjs.map +1 -1
  11. package/dist/alert.d.mts +10 -5
  12. package/dist/alert.d.ts +10 -5
  13. package/dist/alert.js +22 -18
  14. package/dist/alert.js.map +1 -1
  15. package/dist/alert.mjs +22 -18
  16. package/dist/alert.mjs.map +1 -1
  17. package/dist/aspect-ratio.d.mts +2 -1
  18. package/dist/aspect-ratio.d.ts +2 -1
  19. package/dist/aspect-ratio.js.map +1 -1
  20. package/dist/aspect-ratio.mjs.map +1 -1
  21. package/dist/avatar.d.mts +4 -1
  22. package/dist/avatar.d.ts +4 -1
  23. package/dist/avatar.js.map +1 -1
  24. package/dist/avatar.mjs.map +1 -1
  25. package/dist/badge.d.mts +5 -2
  26. package/dist/badge.d.ts +5 -2
  27. package/dist/badge.js.map +1 -1
  28. package/dist/badge.mjs.map +1 -1
  29. package/dist/blockquote.d.mts +5 -4
  30. package/dist/blockquote.d.ts +5 -4
  31. package/dist/blockquote.js +6 -4
  32. package/dist/blockquote.js.map +1 -1
  33. package/dist/blockquote.mjs +6 -4
  34. package/dist/blockquote.mjs.map +1 -1
  35. package/dist/box.d.mts +1 -1
  36. package/dist/box.d.ts +1 -1
  37. package/dist/box.js.map +1 -1
  38. package/dist/box.mjs.map +1 -1
  39. package/dist/breadcrumb.d.mts +18 -11
  40. package/dist/breadcrumb.d.ts +18 -11
  41. package/dist/breadcrumb.js +49 -39
  42. package/dist/breadcrumb.js.map +1 -1
  43. package/dist/breadcrumb.mjs +49 -39
  44. package/dist/breadcrumb.mjs.map +1 -1
  45. package/dist/button.d.mts +3 -2
  46. package/dist/button.d.ts +3 -2
  47. package/dist/button.js +2 -2
  48. package/dist/button.mjs +1 -1
  49. package/dist/calendar.d.mts +3 -2
  50. package/dist/calendar.d.ts +3 -2
  51. package/dist/calendar.js +3 -3
  52. package/dist/calendar.js.map +1 -1
  53. package/dist/calendar.mjs +1 -1
  54. package/dist/calendar.mjs.map +1 -1
  55. package/dist/card.d.mts +13 -7
  56. package/dist/card.d.ts +13 -7
  57. package/dist/card.js +47 -37
  58. package/dist/card.js.map +1 -1
  59. package/dist/card.mjs +47 -37
  60. package/dist/card.mjs.map +1 -1
  61. package/dist/carousel.d.mts +13 -8
  62. package/dist/carousel.d.ts +13 -8
  63. package/dist/carousel.js +63 -57
  64. package/dist/carousel.js.map +1 -1
  65. package/dist/carousel.mjs +62 -56
  66. package/dist/carousel.mjs.map +1 -1
  67. package/dist/checkbox.d.mts +2 -1
  68. package/dist/checkbox.d.ts +2 -1
  69. package/dist/checkbox.js.map +1 -1
  70. package/dist/checkbox.mjs.map +1 -1
  71. package/dist/{chunk-OCLLX7EY.js → chunk-3BDLWZ3W.js} +1 -1
  72. package/dist/chunk-3BDLWZ3W.js.map +1 -0
  73. package/dist/{chunk-2D7SRYKN.js → chunk-43YGVOCO.js} +1 -1
  74. package/dist/chunk-43YGVOCO.js.map +1 -0
  75. package/dist/{chunk-EIHWTXQ4.mjs → chunk-AJLEALVP.mjs} +1 -1
  76. package/dist/chunk-AJLEALVP.mjs.map +1 -0
  77. package/dist/{chunk-LDYBRDAY.js → chunk-D6NQEMTJ.js} +1 -1
  78. package/dist/chunk-D6NQEMTJ.js.map +1 -0
  79. package/dist/{chunk-KW5FJ62U.mjs → chunk-FATZHRHR.mjs} +1 -1
  80. package/dist/chunk-FATZHRHR.mjs.map +1 -0
  81. package/dist/{chunk-RTKEO347.js → chunk-GRKABVK4.js} +1 -1
  82. package/dist/chunk-GRKABVK4.js.map +1 -0
  83. package/dist/{chunk-U2WDUCW3.js → chunk-JOJW7BBY.js} +1 -1
  84. package/dist/{chunk-U2WDUCW3.js.map → chunk-JOJW7BBY.js.map} +1 -1
  85. package/dist/{chunk-ESWGFN3R.mjs → chunk-KV4VL2ZF.mjs} +1 -1
  86. package/dist/chunk-KV4VL2ZF.mjs.map +1 -0
  87. package/dist/{chunk-T52N6ZBP.mjs → chunk-MJDKD2K4.mjs} +1 -1
  88. package/dist/{chunk-T52N6ZBP.mjs.map → chunk-MJDKD2K4.mjs.map} +1 -1
  89. package/dist/{chunk-EDVCMWDT.mjs → chunk-NCEN3XBK.mjs} +1 -1
  90. package/dist/chunk-NCEN3XBK.mjs.map +1 -0
  91. package/dist/{chunk-PTD4AMHI.mjs → chunk-PIU627A3.mjs} +1 -1
  92. package/dist/chunk-PIU627A3.mjs.map +1 -0
  93. package/dist/{chunk-5GHZ6EXI.js → chunk-PKB2G726.js} +1 -1
  94. package/dist/{chunk-5GHZ6EXI.js.map → chunk-PKB2G726.js.map} +1 -1
  95. package/dist/code.d.mts +5 -4
  96. package/dist/code.d.ts +5 -4
  97. package/dist/code.js +6 -4
  98. package/dist/code.js.map +1 -1
  99. package/dist/code.mjs +6 -4
  100. package/dist/code.mjs.map +1 -1
  101. package/dist/collapsible.d.mts +4 -1
  102. package/dist/collapsible.d.ts +4 -1
  103. package/dist/collapsible.js.map +1 -1
  104. package/dist/collapsible.mjs.map +1 -1
  105. package/dist/command.d.mts +14 -3
  106. package/dist/command.d.ts +14 -3
  107. package/dist/command.js +6 -3
  108. package/dist/command.js.map +1 -1
  109. package/dist/command.mjs +5 -2
  110. package/dist/command.mjs.map +1 -1
  111. package/dist/container.d.mts +5 -4
  112. package/dist/container.d.ts +5 -4
  113. package/dist/container.js +6 -4
  114. package/dist/container.js.map +1 -1
  115. package/dist/container.mjs +6 -4
  116. package/dist/container.mjs.map +1 -1
  117. package/dist/context-menu.d.mts +26 -11
  118. package/dist/context-menu.d.ts +26 -11
  119. package/dist/context-menu.js.map +1 -1
  120. package/dist/context-menu.mjs.map +1 -1
  121. package/dist/data-table.d.mts +10 -7
  122. package/dist/data-table.d.ts +10 -7
  123. package/dist/data-table.js +25 -25
  124. package/dist/data-table.js.map +1 -1
  125. package/dist/data-table.mjs +3 -3
  126. package/dist/data-table.mjs.map +1 -1
  127. package/dist/dialog.d.mts +11 -3
  128. package/dist/dialog.d.ts +11 -3
  129. package/dist/dialog.js +2 -2
  130. package/dist/dialog.mjs +1 -1
  131. package/dist/drawer.d.mts +12 -4
  132. package/dist/drawer.d.ts +12 -4
  133. package/dist/drawer.js.map +1 -1
  134. package/dist/drawer.mjs.map +1 -1
  135. package/dist/dropdown-menu.d.mts +25 -11
  136. package/dist/dropdown-menu.d.ts +25 -11
  137. package/dist/dropdown-menu.js +2 -2
  138. package/dist/dropdown-menu.mjs +1 -1
  139. package/dist/em.d.mts +5 -4
  140. package/dist/em.d.ts +5 -4
  141. package/dist/em.js +6 -4
  142. package/dist/em.js.map +1 -1
  143. package/dist/em.mjs +6 -4
  144. package/dist/em.mjs.map +1 -1
  145. package/dist/form.d.mts +14 -6
  146. package/dist/form.d.ts +14 -6
  147. package/dist/form.js +26 -22
  148. package/dist/form.js.map +1 -1
  149. package/dist/form.mjs +25 -21
  150. package/dist/form.mjs.map +1 -1
  151. package/dist/heading.d.mts +6 -5
  152. package/dist/heading.d.ts +6 -5
  153. package/dist/heading.js +6 -4
  154. package/dist/heading.js.map +1 -1
  155. package/dist/heading.mjs +6 -4
  156. package/dist/heading.mjs.map +1 -1
  157. package/dist/hover-card.d.mts +4 -1
  158. package/dist/hover-card.d.ts +4 -1
  159. package/dist/hover-card.js.map +1 -1
  160. package/dist/hover-card.mjs.map +1 -1
  161. package/dist/input-otp.d.mts +12 -32
  162. package/dist/input-otp.d.ts +12 -32
  163. package/dist/input-otp.js +30 -22
  164. package/dist/input-otp.js.map +1 -1
  165. package/dist/input-otp.mjs +29 -21
  166. package/dist/input-otp.mjs.map +1 -1
  167. package/dist/input.d.mts +6 -3
  168. package/dist/input.d.ts +6 -3
  169. package/dist/input.js +13 -11
  170. package/dist/input.js.map +1 -1
  171. package/dist/input.mjs +13 -11
  172. package/dist/input.mjs.map +1 -1
  173. package/dist/kbd.d.mts +5 -4
  174. package/dist/kbd.d.ts +5 -4
  175. package/dist/kbd.js +16 -14
  176. package/dist/kbd.js.map +1 -1
  177. package/dist/kbd.mjs +16 -14
  178. package/dist/kbd.mjs.map +1 -1
  179. package/dist/label.d.mts +2 -1
  180. package/dist/label.d.ts +2 -1
  181. package/dist/label.js +2 -2
  182. package/dist/label.mjs +1 -1
  183. package/dist/menubar.d.mts +27 -12
  184. package/dist/menubar.d.ts +27 -12
  185. package/dist/menubar.js.map +1 -1
  186. package/dist/menubar.mjs.map +1 -1
  187. package/dist/navigation-menu.d.mts +9 -1
  188. package/dist/navigation-menu.d.ts +9 -1
  189. package/dist/navigation-menu.js.map +1 -1
  190. package/dist/navigation-menu.mjs.map +1 -1
  191. package/dist/pagination.d.mts +13 -7
  192. package/dist/pagination.d.ts +13 -7
  193. package/dist/pagination.js +5 -3
  194. package/dist/pagination.js.map +1 -1
  195. package/dist/pagination.mjs +4 -2
  196. package/dist/pagination.mjs.map +1 -1
  197. package/dist/popover.d.mts +6 -1
  198. package/dist/popover.d.ts +6 -1
  199. package/dist/popover.js.map +1 -1
  200. package/dist/popover.mjs.map +1 -1
  201. package/dist/pre.d.mts +5 -4
  202. package/dist/pre.d.ts +5 -4
  203. package/dist/pre.js +6 -4
  204. package/dist/pre.js.map +1 -1
  205. package/dist/pre.mjs +6 -4
  206. package/dist/pre.mjs.map +1 -1
  207. package/dist/progress.d.mts +2 -1
  208. package/dist/progress.d.ts +2 -1
  209. package/dist/progress.js +1 -1
  210. package/dist/progress.js.map +1 -1
  211. package/dist/progress.mjs +1 -1
  212. package/dist/progress.mjs.map +1 -1
  213. package/dist/quote.d.mts +5 -4
  214. package/dist/quote.d.ts +5 -4
  215. package/dist/quote.js +6 -4
  216. package/dist/quote.js.map +1 -1
  217. package/dist/quote.mjs +6 -4
  218. package/dist/quote.mjs.map +1 -1
  219. package/dist/radio-group.d.mts +3 -1
  220. package/dist/radio-group.d.ts +3 -1
  221. package/dist/radio-group.js.map +1 -1
  222. package/dist/radio-group.mjs.map +1 -1
  223. package/dist/resizable.d.mts +4 -4
  224. package/dist/resizable.d.ts +4 -4
  225. package/dist/resizable.js +1 -1
  226. package/dist/resizable.js.map +1 -1
  227. package/dist/resizable.mjs +1 -1
  228. package/dist/resizable.mjs.map +1 -1
  229. package/dist/scroll-area.d.mts +4 -2
  230. package/dist/scroll-area.d.ts +4 -2
  231. package/dist/scroll-area.js +6 -6
  232. package/dist/scroll-area.js.map +1 -1
  233. package/dist/scroll-area.mjs +6 -6
  234. package/dist/scroll-area.mjs.map +1 -1
  235. package/dist/section.d.mts +5 -4
  236. package/dist/section.d.ts +5 -4
  237. package/dist/section.js +6 -4
  238. package/dist/section.js.map +1 -1
  239. package/dist/section.mjs +6 -4
  240. package/dist/section.mjs.map +1 -1
  241. package/dist/select.d.mts +11 -1
  242. package/dist/select.d.ts +11 -1
  243. package/dist/select.js +2 -2
  244. package/dist/select.mjs +1 -1
  245. package/dist/separator.d.mts +2 -1
  246. package/dist/separator.d.ts +2 -1
  247. package/dist/separator.js.map +1 -1
  248. package/dist/separator.mjs.map +1 -1
  249. package/dist/sheet.d.mts +18 -8
  250. package/dist/sheet.d.ts +18 -8
  251. package/dist/sheet.js.map +1 -1
  252. package/dist/sheet.mjs.map +1 -1
  253. package/dist/skeleton.d.mts +3 -2
  254. package/dist/skeleton.d.ts +3 -2
  255. package/dist/skeleton.js +1 -4
  256. package/dist/skeleton.js.map +1 -1
  257. package/dist/skeleton.mjs +1 -4
  258. package/dist/skeleton.mjs.map +1 -1
  259. package/dist/slider.d.mts +2 -1
  260. package/dist/slider.d.ts +2 -1
  261. package/dist/slider.js.map +1 -1
  262. package/dist/slider.mjs.map +1 -1
  263. package/dist/sonner.d.mts +1 -1
  264. package/dist/sonner.d.ts +1 -1
  265. package/dist/sonner.js.map +1 -1
  266. package/dist/sonner.mjs.map +1 -1
  267. package/dist/strong.d.mts +5 -4
  268. package/dist/strong.d.ts +5 -4
  269. package/dist/strong.js +6 -4
  270. package/dist/strong.js.map +1 -1
  271. package/dist/strong.mjs +6 -4
  272. package/dist/strong.mjs.map +1 -1
  273. package/dist/switch.d.mts +2 -1
  274. package/dist/switch.d.ts +2 -1
  275. package/dist/switch.js.map +1 -1
  276. package/dist/switch.mjs.map +1 -1
  277. package/dist/table.d.mts +17 -9
  278. package/dist/table.d.ts +17 -9
  279. package/dist/table.js +75 -58
  280. package/dist/table.js.map +1 -1
  281. package/dist/table.mjs +75 -58
  282. package/dist/table.mjs.map +1 -1
  283. package/dist/tabs.d.mts +5 -1
  284. package/dist/tabs.d.ts +5 -1
  285. package/dist/tabs.js.map +1 -1
  286. package/dist/tabs.mjs.map +1 -1
  287. package/dist/text.d.mts +1 -1
  288. package/dist/text.d.ts +1 -1
  289. package/dist/text.js.map +1 -1
  290. package/dist/text.mjs.map +1 -1
  291. package/dist/textarea.d.mts +3 -2
  292. package/dist/textarea.d.ts +3 -2
  293. package/dist/textarea.js +15 -13
  294. package/dist/textarea.js.map +1 -1
  295. package/dist/textarea.mjs +15 -13
  296. package/dist/textarea.mjs.map +1 -1
  297. package/dist/toggle-group.d.mts +4 -2
  298. package/dist/toggle-group.d.ts +4 -2
  299. package/dist/toggle-group.js +2 -2
  300. package/dist/toggle-group.js.map +1 -1
  301. package/dist/toggle-group.mjs +1 -1
  302. package/dist/toggle-group.mjs.map +1 -1
  303. package/dist/toggle.d.mts +2 -1
  304. package/dist/toggle.d.ts +2 -1
  305. package/dist/toggle.js +2 -2
  306. package/dist/toggle.mjs +1 -1
  307. package/dist/tooltip.d.mts +6 -1
  308. package/dist/tooltip.d.ts +6 -1
  309. package/dist/tooltip.js.map +1 -1
  310. package/dist/tooltip.mjs.map +1 -1
  311. package/package.json +6 -6
  312. package/src/accordion.tsx +17 -4
  313. package/src/alert-dialog.tsx +26 -7
  314. package/src/alert.tsx +35 -25
  315. package/src/aspect-ratio.tsx +2 -1
  316. package/src/avatar.tsx +13 -3
  317. package/src/badge.tsx +6 -3
  318. package/src/blockquote.tsx +11 -10
  319. package/src/box.tsx +1 -1
  320. package/src/breadcrumb.tsx +70 -60
  321. package/src/button.tsx +4 -2
  322. package/src/calendar.tsx +3 -2
  323. package/src/card.tsx +59 -52
  324. package/src/carousel.tsx +76 -72
  325. package/src/checkbox.tsx +3 -2
  326. package/src/code.tsx +10 -8
  327. package/src/collapsible.tsx +11 -1
  328. package/src/command.tsx +47 -10
  329. package/src/container.tsx +10 -10
  330. package/src/context-menu.tsx +52 -16
  331. package/src/data-table.tsx +23 -11
  332. package/src/dialog.tsx +21 -5
  333. package/src/drawer.tsx +28 -6
  334. package/src/dropdown-menu.tsx +51 -15
  335. package/src/em.tsx +10 -8
  336. package/src/form.tsx +55 -38
  337. package/src/heading.tsx +11 -11
  338. package/src/hover-card.tsx +12 -2
  339. package/src/input-otp.tsx +45 -33
  340. package/src/input.tsx +17 -15
  341. package/src/kbd.tsx +19 -17
  342. package/src/label.tsx +3 -2
  343. package/src/menubar.tsx +48 -17
  344. package/src/navigation-menu.tsx +25 -5
  345. package/src/pagination.tsx +21 -9
  346. package/src/popover.tsx +18 -2
  347. package/src/pre.tsx +10 -8
  348. package/src/progress.tsx +4 -3
  349. package/src/quote.tsx +10 -8
  350. package/src/radio-group.tsx +10 -3
  351. package/src/resizable.tsx +2 -1
  352. package/src/scroll-area.tsx +18 -11
  353. package/src/section.tsx +10 -10
  354. package/src/select.tsx +27 -7
  355. package/src/separator.tsx +3 -2
  356. package/src/sheet.tsx +23 -5
  357. package/src/skeleton.tsx +3 -5
  358. package/src/slider.tsx +3 -2
  359. package/src/sonner.tsx +1 -1
  360. package/src/strong.tsx +10 -8
  361. package/src/switch.tsx +3 -2
  362. package/src/table.tsx +90 -78
  363. package/src/tabs.tsx +17 -4
  364. package/src/text.tsx +1 -1
  365. package/src/textarea.tsx +16 -16
  366. package/src/toggle-group.tsx +14 -4
  367. package/src/toggle.tsx +3 -2
  368. package/src/tooltip.tsx +12 -2
  369. package/dist/chunk-2D7SRYKN.js.map +0 -1
  370. package/dist/chunk-EDVCMWDT.mjs.map +0 -1
  371. package/dist/chunk-EIHWTXQ4.mjs.map +0 -1
  372. package/dist/chunk-ESWGFN3R.mjs.map +0 -1
  373. package/dist/chunk-KW5FJ62U.mjs.map +0 -1
  374. package/dist/chunk-LDYBRDAY.js.map +0 -1
  375. package/dist/chunk-OCLLX7EY.js.map +0 -1
  376. package/dist/chunk-PTD4AMHI.mjs.map +0 -1
  377. package/dist/chunk-RTKEO347.js.map +0 -1
@@ -13,41 +13,49 @@ import { cn } from "./utils";
13
13
  * Component: DropdownMenu
14
14
  * -------------------------------------------------------------------------- */
15
15
 
16
+ type DropdownMenuProps = DropdownMenuPrimitive.DropdownMenuProps;
16
17
  const DropdownMenu = DropdownMenuPrimitive.Root;
17
18
 
18
19
  /* -----------------------------------------------------------------------------
19
20
  * Component: DropdownMenuTrigger
20
21
  * -------------------------------------------------------------------------- */
21
22
 
23
+ type DropdownMenuTriggerProps = DropdownMenuPrimitive.DropdownMenuTriggerProps;
22
24
  const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
23
25
 
24
26
  /* -----------------------------------------------------------------------------
25
27
  * Component: DropdownMenuGroup
26
28
  * -------------------------------------------------------------------------- */
27
29
 
30
+ type DropdownMenuGroupProps = DropdownMenuPrimitive.DropdownMenuGroupProps;
28
31
  const DropdownMenuGroup = DropdownMenuPrimitive.Group;
29
32
 
30
33
  /* -----------------------------------------------------------------------------
31
34
  * Component: DropdownMenuSub
32
35
  * -------------------------------------------------------------------------- */
33
36
 
37
+ type DropdownMenuSubProps = DropdownMenuPrimitive.DropdownMenuSubProps;
34
38
  const DropdownMenuSub = DropdownMenuPrimitive.Sub;
35
39
 
36
40
  /* -----------------------------------------------------------------------------
37
41
  * Component: DropdownMenuSubTrigger
38
42
  * -------------------------------------------------------------------------- */
39
43
 
44
+ type DropdownMenuRadioGroupProps =
45
+ DropdownMenuPrimitive.DropdownMenuRadioGroupProps;
40
46
  const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
41
47
 
42
48
  /* -----------------------------------------------------------------------------
43
49
  * Component: DropdownMenuSubTrigger
44
50
  * -------------------------------------------------------------------------- */
45
51
 
52
+ interface DropdownMenuSubTriggerProps
53
+ extends DropdownMenuPrimitive.DropdownMenuSubTriggerProps {
54
+ inset?: boolean;
55
+ }
46
56
  const DropdownMenuSubTrigger = React.forwardRef<
47
57
  React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,
48
- DropdownMenuPrimitive.DropdownMenuSubTriggerProps & {
49
- inset?: boolean;
50
- }
58
+ DropdownMenuSubTriggerProps
51
59
  >(({ className, inset, children, ...props }, ref) => (
52
60
  <DropdownMenuPrimitive.SubTrigger
53
61
  ref={ref}
@@ -69,9 +77,11 @@ DropdownMenuSubTrigger.displayName =
69
77
  * Component: DropdownMenuSubContent
70
78
  * -------------------------------------------------------------------------- */
71
79
 
80
+ type DropdownMenuSubContentProps =
81
+ DropdownMenuPrimitive.DropdownMenuSubContentProps;
72
82
  const DropdownMenuSubContent = React.forwardRef<
73
83
  React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,
74
- DropdownMenuPrimitive.DropdownMenuSubContentProps
84
+ DropdownMenuSubContentProps
75
85
  >(({ className, ...props }, ref) => (
76
86
  <DropdownMenuPrimitive.Portal>
77
87
  <DropdownMenuPrimitive.SubContent
@@ -91,9 +101,10 @@ DropdownMenuSubContent.displayName =
91
101
  * Component: DropdownMenuContent
92
102
  * -------------------------------------------------------------------------- */
93
103
 
104
+ type DropdownMenuContentProps = DropdownMenuPrimitive.DropdownMenuContentProps;
94
105
  const DropdownMenuContent = React.forwardRef<
95
106
  React.ElementRef<typeof DropdownMenuPrimitive.Content>,
96
- DropdownMenuPrimitive.DropdownMenuContentProps
107
+ DropdownMenuContentProps
97
108
  >(({ className, sideOffset = 4, ...props }, ref) => (
98
109
  <DropdownMenuPrimitive.Portal>
99
110
  <DropdownMenuPrimitive.Content
@@ -113,11 +124,13 @@ DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
113
124
  * Component: DropdownMenuItem
114
125
  * -------------------------------------------------------------------------- */
115
126
 
127
+ interface DropdownMenuItemProps
128
+ extends DropdownMenuPrimitive.DropdownMenuItemProps {
129
+ inset?: boolean;
130
+ }
116
131
  const DropdownMenuItem = React.forwardRef<
117
132
  React.ElementRef<typeof DropdownMenuPrimitive.Item>,
118
- DropdownMenuPrimitive.DropdownMenuItemProps & {
119
- inset?: boolean;
120
- }
133
+ DropdownMenuItemProps
121
134
  >(({ className, inset, ...props }, ref) => (
122
135
  <DropdownMenuPrimitive.Item
123
136
  ref={ref}
@@ -135,9 +148,11 @@ DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
135
148
  * Component: DropdownMenuCheckboxItem
136
149
  * -------------------------------------------------------------------------- */
137
150
 
151
+ type DropdownMenuCheckboxItemProps =
152
+ DropdownMenuPrimitive.DropdownMenuCheckboxItemProps;
138
153
  const DropdownMenuCheckboxItem = React.forwardRef<
139
154
  React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,
140
- DropdownMenuPrimitive.DropdownMenuCheckboxItemProps
155
+ DropdownMenuCheckboxItemProps
141
156
  >(({ className, children, checked, ...props }, ref) => (
142
157
  <DropdownMenuPrimitive.CheckboxItem
143
158
  ref={ref}
@@ -163,9 +178,11 @@ DropdownMenuCheckboxItem.displayName =
163
178
  * Component: DropdownMenuRadioItem
164
179
  * -------------------------------------------------------------------------- */
165
180
 
181
+ type DropdownMenuRadioItemProps =
182
+ DropdownMenuPrimitive.DropdownMenuRadioItemProps;
166
183
  const DropdownMenuRadioItem = React.forwardRef<
167
184
  React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,
168
- DropdownMenuPrimitive.DropdownMenuRadioItemProps
185
+ DropdownMenuRadioItemProps
169
186
  >(({ className, children, ...props }, ref) => (
170
187
  <DropdownMenuPrimitive.RadioItem
171
188
  ref={ref}
@@ -189,11 +206,13 @@ DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
189
206
  * Component: DropdownMenuLabel
190
207
  * -------------------------------------------------------------------------- */
191
208
 
209
+ interface DropdownMenuLabelProps
210
+ extends DropdownMenuPrimitive.DropdownMenuLabelProps {
211
+ inset?: boolean;
212
+ }
192
213
  const DropdownMenuLabel = React.forwardRef<
193
214
  React.ElementRef<typeof DropdownMenuPrimitive.Label>,
194
- DropdownMenuPrimitive.DropdownMenuLabelProps & {
195
- inset?: boolean;
196
- }
215
+ DropdownMenuLabelProps
197
216
  >(({ className, inset, ...props }, ref) => (
198
217
  <DropdownMenuPrimitive.Label
199
218
  ref={ref}
@@ -211,9 +230,11 @@ DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
211
230
  * Component: DropdownMenuSeparator
212
231
  * -------------------------------------------------------------------------- */
213
232
 
233
+ type DropdownMenuSeparatorProps =
234
+ DropdownMenuPrimitive.DropdownMenuSeparatorProps;
214
235
  const DropdownMenuSeparator = React.forwardRef<
215
236
  React.ElementRef<typeof DropdownMenuPrimitive.Separator>,
216
- DropdownMenuPrimitive.DropdownMenuSeparatorProps
237
+ DropdownMenuSeparatorProps
217
238
  >(({ className, ...props }, ref) => (
218
239
  <DropdownMenuPrimitive.Separator
219
240
  ref={ref}
@@ -227,10 +248,11 @@ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
227
248
  * Component: DropdownMenuShortcut
228
249
  * -------------------------------------------------------------------------- */
229
250
 
251
+ type DropdownMenuShortcutProps = React.HTMLAttributes<HTMLSpanElement>;
230
252
  function DropdownMenuShortcut({
231
253
  className,
232
254
  ...props
233
- }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element {
255
+ }: DropdownMenuShortcutProps): React.JSX.Element {
234
256
  return (
235
257
  <span
236
258
  className={cn("ml-auto text-xs tracking-widest opacity-60", className)}
@@ -258,4 +280,18 @@ export {
258
280
  DropdownMenuSubContent,
259
281
  DropdownMenuSubTrigger,
260
282
  DropdownMenuRadioGroup,
283
+ type DropdownMenuProps,
284
+ type DropdownMenuTriggerProps,
285
+ type DropdownMenuContentProps,
286
+ type DropdownMenuItemProps,
287
+ type DropdownMenuCheckboxItemProps,
288
+ type DropdownMenuRadioItemProps,
289
+ type DropdownMenuLabelProps,
290
+ type DropdownMenuSeparatorProps,
291
+ type DropdownMenuShortcutProps,
292
+ type DropdownMenuGroupProps,
293
+ type DropdownMenuSubProps,
294
+ type DropdownMenuSubContentProps,
295
+ type DropdownMenuSubTriggerProps,
296
+ type DropdownMenuRadioGroupProps,
261
297
  };
package/src/em.tsx CHANGED
@@ -5,18 +5,20 @@ import { Slot } from "@radix-ui/react-slot";
5
5
  * Component: Em
6
6
  * -------------------------------------------------------------------------- */
7
7
 
8
- const Em = React.forwardRef<
9
- HTMLElement,
10
- React.HTMLAttributes<HTMLElement> & { asChild?: boolean }
11
- >(({ asChild, ...props }, ref) => {
12
- const Comp = asChild ? Slot : "em";
8
+ interface EmProps extends React.HTMLAttributes<HTMLElement> {
9
+ asChild?: boolean;
10
+ }
11
+ const Em = React.forwardRef<HTMLElement, EmProps>(
12
+ ({ asChild, ...props }, ref) => {
13
+ const Comp = asChild ? Slot : "em";
13
14
 
14
- return <Comp ref={ref} {...props} />;
15
- });
15
+ return <Comp ref={ref} {...props} />;
16
+ },
17
+ );
16
18
  Em.displayName = "Em";
17
19
 
18
20
  /* -----------------------------------------------------------------------------
19
21
  * Exports
20
22
  * -------------------------------------------------------------------------- */
21
23
 
22
- export { Em };
24
+ export { Em, type EmProps };
package/src/form.tsx CHANGED
@@ -78,16 +78,21 @@ const useFormField = (): {
78
78
  * Component: Form
79
79
  * -------------------------------------------------------------------------- */
80
80
 
81
+ type FormProps = React.ComponentProps<typeof FormProvider>;
81
82
  const Form = FormProvider;
82
83
 
83
84
  /* -----------------------------------------------------------------------------
84
85
  * Component: FormField
85
86
  * -------------------------------------------------------------------------- */
86
87
 
88
+ type FormFieldProps<
89
+ TFieldValues extends FieldValues = FieldValues,
90
+ TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
91
+ > = ControllerProps<TFieldValues, TName>;
87
92
  function FormField<
88
93
  TFieldValues extends FieldValues = FieldValues,
89
94
  TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
90
- >({ ...props }: ControllerProps<TFieldValues, TName>): React.JSX.Element {
95
+ >({ ...props }: FormFieldProps<TFieldValues, TName>): React.JSX.Element {
91
96
  return (
92
97
  <FormFieldContext.Provider value={{ name: props.name }}>
93
98
  <Controller {...props} />
@@ -99,27 +104,30 @@ function FormField<
99
104
  * Component: FormItem
100
105
  * -------------------------------------------------------------------------- */
101
106
 
102
- const FormItem = React.forwardRef<
103
- HTMLDivElement,
104
- React.HTMLAttributes<HTMLDivElement>
105
- >(({ className, ...props }, ref) => {
106
- const id = React.useId();
107
-
108
- return (
109
- <FormItemContext.Provider value={{ id }}>
110
- <div ref={ref} className={cn("space-y-2", className)} {...props} />
111
- </FormItemContext.Provider>
112
- );
113
- });
107
+ type FormItemProps = React.HTMLAttributes<HTMLDivElement>;
108
+ const FormItem = React.forwardRef<HTMLDivElement, FormItemProps>(
109
+ ({ className, ...props }, ref) => {
110
+ const id = React.useId();
111
+
112
+ return (
113
+ <FormItemContext.Provider value={{ id }}>
114
+ <div ref={ref} className={cn("space-y-2", className)} {...props} />
115
+ </FormItemContext.Provider>
116
+ );
117
+ },
118
+ );
114
119
  FormItem.displayName = "FormItem";
115
120
 
116
121
  /* -----------------------------------------------------------------------------
117
122
  * Component: FormLabel
118
123
  * -------------------------------------------------------------------------- */
119
124
 
125
+ type FormLabelProps = React.ComponentPropsWithoutRef<
126
+ typeof LabelPrimitive.Root
127
+ >;
120
128
  const FormLabel = React.forwardRef<
121
129
  React.ElementRef<typeof LabelPrimitive.Root>,
122
- React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>
130
+ FormLabelProps
123
131
  >(({ className, ...props }, ref) => {
124
132
  const { error, formItemId } = useFormField();
125
133
 
@@ -138,9 +146,10 @@ FormLabel.displayName = "FormLabel";
138
146
  * Component: FormControl
139
147
  * -------------------------------------------------------------------------- */
140
148
 
149
+ type FormControlProps = React.ComponentPropsWithoutRef<typeof Slot>;
141
150
  const FormControl = React.forwardRef<
142
151
  React.ElementRef<typeof Slot>,
143
- React.ComponentPropsWithoutRef<typeof Slot>
152
+ FormControlProps
144
153
  >(({ ...props }, ref) => {
145
154
  const { error, formItemId, formDescriptionId, formMessageId } =
146
155
  useFormField();
@@ -163,9 +172,10 @@ FormControl.displayName = "FormControl";
163
172
  * Component: FormDescription
164
173
  * -------------------------------------------------------------------------- */
165
174
 
175
+ type FormDescriptionProps = React.HTMLAttributes<HTMLParagraphElement>;
166
176
  const FormDescription = React.forwardRef<
167
177
  HTMLParagraphElement,
168
- React.HTMLAttributes<HTMLParagraphElement>
178
+ FormDescriptionProps
169
179
  >(({ className, ...props }, ref) => {
170
180
  const { formDescriptionId } = useFormField();
171
181
 
@@ -184,28 +194,28 @@ FormDescription.displayName = "FormDescription";
184
194
  * Component: FormMessage
185
195
  * -------------------------------------------------------------------------- */
186
196
 
187
- const FormMessage = React.forwardRef<
188
- HTMLParagraphElement,
189
- React.HTMLAttributes<HTMLParagraphElement>
190
- >(({ className, children, ...props }, ref) => {
191
- const { error, formMessageId } = useFormField();
192
- const body = error ? String(error.message) : children;
193
-
194
- if (!body) {
195
- return null;
196
- }
197
-
198
- return (
199
- <p
200
- ref={ref}
201
- id={formMessageId}
202
- className={cn("text-destructive text-[0.8rem] font-medium", className)}
203
- {...props}
204
- >
205
- {body}
206
- </p>
207
- );
208
- });
197
+ type FormMessageProps = React.HTMLAttributes<HTMLParagraphElement>;
198
+ const FormMessage = React.forwardRef<HTMLParagraphElement, FormMessageProps>(
199
+ ({ className, children, ...props }, ref) => {
200
+ const { error, formMessageId } = useFormField();
201
+ const body = error ? String(error.message) : children;
202
+
203
+ if (!body) {
204
+ return null;
205
+ }
206
+
207
+ return (
208
+ <p
209
+ ref={ref}
210
+ id={formMessageId}
211
+ className={cn("text-destructive text-[0.8rem] font-medium", className)}
212
+ {...props}
213
+ >
214
+ {body}
215
+ </p>
216
+ );
217
+ },
218
+ );
209
219
  FormMessage.displayName = "FormMessage";
210
220
 
211
221
  /* -----------------------------------------------------------------------------
@@ -221,4 +231,11 @@ export {
221
231
  FormDescription,
222
232
  FormMessage,
223
233
  FormField,
234
+ type FormProps,
235
+ type FormItemProps,
236
+ type FormLabelProps,
237
+ type FormControlProps,
238
+ type FormDescriptionProps,
239
+ type FormMessageProps,
240
+ type FormFieldProps,
224
241
  };
package/src/heading.tsx CHANGED
@@ -5,21 +5,21 @@ import { Slot } from "@radix-ui/react-slot";
5
5
  * Component: Heading
6
6
  * -------------------------------------------------------------------------- */
7
7
 
8
- const Heading = React.forwardRef<
9
- HTMLHeadingElement,
10
- React.HTMLAttributes<HTMLHeadingElement> & {
11
- as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
12
- asChild?: boolean;
13
- }
14
- >(({ asChild, as: Tag = "h1", ...props }, ref) => {
15
- const Com = asChild ? Slot : Tag;
8
+ interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {
9
+ as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
10
+ asChild?: boolean;
11
+ }
12
+ const Heading = React.forwardRef<HTMLHeadingElement, HeadingProps>(
13
+ ({ asChild, as: Tag = "h1", ...props }, ref) => {
14
+ const Com = asChild ? Slot : Tag;
16
15
 
17
- return <Com ref={ref} {...props} />;
18
- });
16
+ return <Com ref={ref} {...props} />;
17
+ },
18
+ );
19
19
  Heading.displayName = "Heading";
20
20
 
21
21
  /* -----------------------------------------------------------------------------
22
22
  * Exports
23
23
  * -------------------------------------------------------------------------- */
24
24
 
25
- export { Heading };
25
+ export { Heading, type HeadingProps };
@@ -8,21 +8,24 @@ import { cn } from "./utils";
8
8
  * Component: HoverCard
9
9
  * -------------------------------------------------------------------------- */
10
10
 
11
+ type HoverCardProps = HoverCardPrimitive.HoverCardProps;
11
12
  const HoverCard = HoverCardPrimitive.Root;
12
13
 
13
14
  /* -----------------------------------------------------------------------------
14
15
  * Component: HoverCardTrigger
15
16
  * -------------------------------------------------------------------------- */
16
17
 
18
+ type HoverCardTriggerProps = HoverCardPrimitive.HoverCardTriggerProps;
17
19
  const HoverCardTrigger = HoverCardPrimitive.Trigger;
18
20
 
19
21
  /* -----------------------------------------------------------------------------
20
22
  * Component: HoverCardContent
21
23
  * -------------------------------------------------------------------------- */
22
24
 
25
+ type HoverCardContentProps = HoverCardPrimitive.HoverCardContentProps;
23
26
  const HoverCardContent = React.forwardRef<
24
27
  React.ElementRef<typeof HoverCardPrimitive.Content>,
25
- HoverCardPrimitive.HoverCardContentProps
28
+ HoverCardContentProps
26
29
  >(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
27
30
  <HoverCardPrimitive.Portal>
28
31
  <HoverCardPrimitive.Content
@@ -43,4 +46,11 @@ HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
43
46
  * Exports
44
47
  * -------------------------------------------------------------------------- */
45
48
 
46
- export { HoverCard, HoverCardTrigger, HoverCardContent };
49
+ export {
50
+ HoverCard,
51
+ HoverCardTrigger,
52
+ HoverCardContent,
53
+ type HoverCardProps,
54
+ type HoverCardTriggerProps,
55
+ type HoverCardContentProps,
56
+ };
package/src/input-otp.tsx CHANGED
@@ -5,6 +5,8 @@ import { DotFilledIcon } from "@radix-ui/react-icons";
5
5
  import {
6
6
  OTPInput,
7
7
  OTPInputContext,
8
+ REGEXP_ONLY_CHARS,
9
+ REGEXP_ONLY_DIGITS,
8
10
  REGEXP_ONLY_DIGITS_AND_CHARS,
9
11
  } from "input-otp";
10
12
  import { cn } from "./utils";
@@ -13,9 +15,10 @@ import { cn } from "./utils";
13
15
  * Component: InputOtp
14
16
  * -------------------------------------------------------------------------- */
15
17
 
18
+ type InputOTPProps = React.ComponentPropsWithoutRef<typeof OTPInput>;
16
19
  const InputOTP = React.forwardRef<
17
20
  React.ElementRef<typeof OTPInput>,
18
- React.ComponentPropsWithoutRef<typeof OTPInput>
21
+ InputOTPProps
19
22
  >(({ className, containerClassName, ...props }, ref) => (
20
23
  <OTPInput
21
24
  ref={ref}
@@ -33,53 +36,56 @@ InputOTP.displayName = "InputOTP";
33
36
  * Component: InputOTPGroup
34
37
  * -------------------------------------------------------------------------- */
35
38
 
36
- const InputOTPGroup = React.forwardRef<
37
- HTMLDivElement,
38
- React.HTMLAttributes<HTMLDivElement>
39
- >(({ className, ...props }, ref) => (
40
- <div ref={ref} className={cn("flex items-center", className)} {...props} />
41
- ));
39
+ type InputOTPGroupProps = React.HTMLAttributes<HTMLDivElement>;
40
+ const InputOTPGroup = React.forwardRef<HTMLDivElement, InputOTPGroupProps>(
41
+ ({ className, ...props }, ref) => (
42
+ <div ref={ref} className={cn("flex items-center", className)} {...props} />
43
+ ),
44
+ );
42
45
  InputOTPGroup.displayName = "InputOTPGroup";
43
46
 
44
47
  /* -----------------------------------------------------------------------------
45
48
  * Component: InputOTPSlot
46
49
  * -------------------------------------------------------------------------- */
47
50
 
48
- const InputOTPSlot = React.forwardRef<
49
- HTMLDivElement,
50
- React.HTMLAttributes<HTMLDivElement> & { index: number }
51
- >(({ index, className, ...props }, ref) => {
52
- const inputOTPContext = React.useContext(OTPInputContext);
53
- const slot = inputOTPContext.slots[index];
51
+ interface InputOTPSlotProps extends React.HTMLAttributes<HTMLDivElement> {
52
+ index: number;
53
+ }
54
+ const InputOTPSlot = React.forwardRef<HTMLDivElement, InputOTPSlotProps>(
55
+ ({ index, className, ...props }, ref) => {
56
+ const inputOTPContext = React.useContext(OTPInputContext);
57
+ const slot = inputOTPContext.slots[index];
54
58
 
55
- return (
56
- <div
57
- ref={ref}
58
- className={cn(
59
- "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",
60
- slot?.isActive && "ring-ring z-10 ring-2",
61
- className,
62
- )}
63
- {...props}
64
- >
65
- {slot?.char}
66
- {slot?.hasFakeCaret ? (
67
- <div className="pointer-events-none absolute inset-0 flex items-center justify-center">
68
- <div className="animate-caret-blink bg-foreground h-4 w-px duration-1000" />
69
- </div>
70
- ) : null}
71
- </div>
72
- );
73
- });
59
+ return (
60
+ <div
61
+ ref={ref}
62
+ className={cn(
63
+ "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",
64
+ slot?.isActive && "ring-ring z-10 ring-2",
65
+ className,
66
+ )}
67
+ {...props}
68
+ >
69
+ {slot?.char}
70
+ {slot?.hasFakeCaret ? (
71
+ <div className="pointer-events-none absolute inset-0 flex items-center justify-center">
72
+ <div className="animate-caret-blink bg-foreground h-4 w-px duration-1000" />
73
+ </div>
74
+ ) : null}
75
+ </div>
76
+ );
77
+ },
78
+ );
74
79
  InputOTPSlot.displayName = "InputOTPSlot";
75
80
 
76
81
  /* -----------------------------------------------------------------------------
77
82
  * Component: InputOTPSeparator
78
83
  * -------------------------------------------------------------------------- */
79
84
 
85
+ type InputOTPSeparatorProps = React.HTMLAttributes<HTMLDivElement>;
80
86
  const InputOTPSeparator = React.forwardRef<
81
87
  HTMLDivElement,
82
- React.HTMLAttributes<HTMLDivElement>
88
+ InputOTPSeparatorProps
83
89
  >(({ ...props }, ref) => (
84
90
  <div ref={ref} role="separator" {...props}>
85
91
  <DotFilledIcon />
@@ -96,5 +102,11 @@ export {
96
102
  InputOTPGroup,
97
103
  InputOTPSlot,
98
104
  InputOTPSeparator,
105
+ type InputOTPProps,
106
+ type InputOTPGroupProps,
107
+ type InputOTPSlotProps,
108
+ type InputOTPSeparatorProps,
99
109
  REGEXP_ONLY_DIGITS_AND_CHARS,
110
+ REGEXP_ONLY_CHARS,
111
+ REGEXP_ONLY_DIGITS,
100
112
  };
package/src/input.tsx CHANGED
@@ -21,28 +21,30 @@ const inputVariants = cva({
21
21
  },
22
22
  });
23
23
 
24
+ type InputVariantsProps = VariantProps<typeof inputVariants>;
25
+
24
26
  /* -----------------------------------------------------------------------------
25
27
  * Component: Input
26
28
  * -------------------------------------------------------------------------- */
27
29
 
28
- const Input = React.forwardRef<
29
- HTMLInputElement,
30
- Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> &
31
- VariantProps<typeof inputVariants>
32
- >(({ className, inputSize, ...props }, ref) => {
33
- return (
34
- <input
35
- type="text"
36
- className={inputVariants({ className, inputSize })}
37
- ref={ref}
38
- {...props}
39
- />
40
- );
41
- });
30
+ type InputProps = React.InputHTMLAttributes<HTMLInputElement> &
31
+ InputVariantsProps;
32
+ const Input = React.forwardRef<HTMLInputElement, InputProps>(
33
+ ({ className, inputSize, ...props }, ref) => {
34
+ return (
35
+ <input
36
+ type="text"
37
+ className={inputVariants({ className, inputSize })}
38
+ ref={ref}
39
+ {...props}
40
+ />
41
+ );
42
+ },
43
+ );
42
44
  Input.displayName = "Input";
43
45
 
44
46
  /* -----------------------------------------------------------------------------
45
47
  * Exports
46
48
  * -------------------------------------------------------------------------- */
47
49
 
48
- export { Input };
50
+ export { Input, type InputProps };
package/src/kbd.tsx CHANGED
@@ -6,27 +6,29 @@ import { cn } from "./utils";
6
6
  * Component: Kbd
7
7
  * -------------------------------------------------------------------------- */
8
8
 
9
- const Kbd = React.forwardRef<
10
- HTMLElement,
11
- React.HTMLAttributes<HTMLElement> & { asChild?: boolean }
12
- >(({ asChild, className, ...props }, ref) => {
13
- const Comp = asChild ? Slot : "kbd";
9
+ interface KbdProps extends React.HTMLAttributes<HTMLElement> {
10
+ asChild?: boolean;
11
+ }
12
+ const Kbd = React.forwardRef<HTMLElement, KbdProps>(
13
+ ({ asChild, className, ...props }, ref) => {
14
+ const Comp = asChild ? Slot : "kbd";
14
15
 
15
- return (
16
- <Comp
17
- ref={ref}
18
- className={cn(
19
- "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",
20
- className,
21
- )}
22
- {...props}
23
- />
24
- );
25
- });
16
+ return (
17
+ <Comp
18
+ ref={ref}
19
+ className={cn(
20
+ "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",
21
+ className,
22
+ )}
23
+ {...props}
24
+ />
25
+ );
26
+ },
27
+ );
26
28
  Kbd.displayName = "Kbd";
27
29
 
28
30
  /* -----------------------------------------------------------------------------
29
31
  * Exports
30
32
  * -------------------------------------------------------------------------- */
31
33
 
32
- export { Kbd };
34
+ export { Kbd, type KbdProps };
package/src/label.tsx CHANGED
@@ -7,9 +7,10 @@ import { cn } from "./utils";
7
7
  * Component: Label
8
8
  * -------------------------------------------------------------------------- */
9
9
 
10
+ type LabelProps = LabelPrimitive.LabelProps;
10
11
  const Label = React.forwardRef<
11
12
  React.ElementRef<typeof LabelPrimitive.Root>,
12
- LabelPrimitive.LabelProps
13
+ LabelProps
13
14
  >(({ className, ...props }, ref) => (
14
15
  <LabelPrimitive.Root
15
16
  ref={ref}
@@ -26,4 +27,4 @@ Label.displayName = LabelPrimitive.Root.displayName;
26
27
  * Exports
27
28
  * -------------------------------------------------------------------------- */
28
29
 
29
- export { Label };
30
+ export { Label, type LabelProps };