@codefast/ui 0.0.50 → 0.0.52

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 (281) hide show
  1. package/dist/{chunk-ZTEJNUH6.js → chunk-46W6RAYD.js} +1 -1
  2. package/dist/chunk-46W6RAYD.js.map +1 -0
  3. package/dist/{chunk-CERSQE5J.js → chunk-4JHGPRLG.js} +1 -1
  4. package/dist/chunk-4JHGPRLG.js.map +1 -0
  5. package/dist/{chunk-I6QCJDIF.mjs → chunk-5RENVAXH.mjs} +1 -1
  6. package/dist/chunk-5RENVAXH.mjs.map +1 -0
  7. package/dist/{chunk-47CSACCM.mjs → chunk-7ABWX5CF.mjs} +2 -2
  8. package/dist/chunk-7ABWX5CF.mjs.map +1 -0
  9. package/dist/{chunk-XHNT6PVI.mjs → chunk-BM5KYF6Y.mjs} +1 -1
  10. package/dist/chunk-BM5KYF6Y.mjs.map +1 -0
  11. package/dist/{chunk-P5AV3QU7.mjs → chunk-BNKSZEF2.mjs} +1 -1
  12. package/dist/chunk-BNKSZEF2.mjs.map +1 -0
  13. package/dist/{chunk-SDGUDONZ.js → chunk-DCDB56BO.js} +1 -1
  14. package/dist/chunk-DCDB56BO.js.map +1 -0
  15. package/dist/{chunk-6FL3EBDQ.mjs → chunk-HMD2ZU33.mjs} +1 -1
  16. package/dist/chunk-HMD2ZU33.mjs.map +1 -0
  17. package/dist/{chunk-JOBEKA4M.mjs → chunk-K63K4LTH.mjs} +2 -2
  18. package/dist/chunk-K63K4LTH.mjs.map +1 -0
  19. package/dist/{chunk-VXPAGNPJ.js → chunk-LJSD47ZL.js} +1 -1
  20. package/dist/chunk-LJSD47ZL.js.map +1 -0
  21. package/dist/{chunk-GDMHMSJ2.mjs → chunk-MFYACCZV.mjs} +1 -1
  22. package/dist/chunk-MFYACCZV.mjs.map +1 -0
  23. package/dist/{chunk-LG7ACTRE.js → chunk-PRCS3RWN.js} +1 -1
  24. package/dist/chunk-PRCS3RWN.js.map +1 -0
  25. package/dist/{chunk-OP6Q7VT5.js → chunk-RHFF4JNH.js} +1 -1
  26. package/dist/chunk-RHFF4JNH.js.map +1 -0
  27. package/dist/{chunk-SCPFGC2X.js → chunk-SCXRD727.js} +1 -1
  28. package/dist/chunk-SCXRD727.js.map +1 -0
  29. package/dist/{chunk-X3LRJQM3.js → chunk-VZVI3OHH.js} +2 -2
  30. package/dist/chunk-VZVI3OHH.js.map +1 -0
  31. package/dist/{chunk-UYRRHPPH.js → chunk-X4BEEJEW.js} +2 -2
  32. package/dist/chunk-X4BEEJEW.js.map +1 -0
  33. package/dist/{chunk-PWF46YXQ.mjs → chunk-Y2GMHG3Z.mjs} +1 -1
  34. package/dist/chunk-Y2GMHG3Z.mjs.map +1 -0
  35. package/dist/{chunk-MU2MZ434.mjs → chunk-ZIB4ZTST.mjs} +1 -1
  36. package/dist/chunk-ZIB4ZTST.mjs.map +1 -0
  37. package/dist/plugin/animate.plugin.js +1 -1
  38. package/dist/plugin/animate.plugin.mjs +1 -1
  39. package/dist/react/accordion.js.map +1 -1
  40. package/dist/react/accordion.mjs.map +1 -1
  41. package/dist/react/alert-dialog.js +1 -1
  42. package/dist/react/alert-dialog.js.map +1 -1
  43. package/dist/react/alert-dialog.mjs +1 -1
  44. package/dist/react/alert-dialog.mjs.map +1 -1
  45. package/dist/react/alert.js.map +1 -1
  46. package/dist/react/alert.mjs.map +1 -1
  47. package/dist/react/aspect-ratio.d.mts +1 -1
  48. package/dist/react/aspect-ratio.d.ts +1 -1
  49. package/dist/react/aspect-ratio.js.map +1 -1
  50. package/dist/react/aspect-ratio.mjs.map +1 -1
  51. package/dist/react/avatar.js.map +1 -1
  52. package/dist/react/avatar.mjs.map +1 -1
  53. package/dist/react/badge.js.map +1 -1
  54. package/dist/react/badge.mjs.map +1 -1
  55. package/dist/react/blockquote.js.map +1 -1
  56. package/dist/react/blockquote.mjs.map +1 -1
  57. package/dist/react/box.js.map +1 -1
  58. package/dist/react/box.mjs.map +1 -1
  59. package/dist/react/breadcrumb.js.map +1 -1
  60. package/dist/react/breadcrumb.mjs.map +1 -1
  61. package/dist/react/button.js +1 -1
  62. package/dist/react/button.mjs +1 -1
  63. package/dist/react/calendar.js +1 -1
  64. package/dist/react/calendar.js.map +1 -1
  65. package/dist/react/calendar.mjs +1 -1
  66. package/dist/react/calendar.mjs.map +1 -1
  67. package/dist/react/card.js.map +1 -1
  68. package/dist/react/card.mjs.map +1 -1
  69. package/dist/react/carousel.js +1 -1
  70. package/dist/react/carousel.js.map +1 -1
  71. package/dist/react/carousel.mjs +1 -1
  72. package/dist/react/carousel.mjs.map +1 -1
  73. package/dist/react/checkbox-cards.js +1 -1
  74. package/dist/react/checkbox-cards.js.map +1 -1
  75. package/dist/react/checkbox-cards.mjs +1 -1
  76. package/dist/react/checkbox-cards.mjs.map +1 -1
  77. package/dist/react/checkbox-group.js +1 -1
  78. package/dist/react/checkbox-group.js.map +1 -1
  79. package/dist/react/checkbox-group.mjs +1 -1
  80. package/dist/react/checkbox-group.mjs.map +1 -1
  81. package/dist/react/checkbox-group.primitive.js +1 -1
  82. package/dist/react/checkbox-group.primitive.mjs +1 -1
  83. package/dist/react/checkbox.js.map +1 -1
  84. package/dist/react/checkbox.mjs.map +1 -1
  85. package/dist/react/code.js.map +1 -1
  86. package/dist/react/code.mjs.map +1 -1
  87. package/dist/react/collapsible.js.map +1 -1
  88. package/dist/react/collapsible.mjs.map +1 -1
  89. package/dist/react/command.d.mts +8 -8
  90. package/dist/react/command.d.ts +8 -8
  91. package/dist/react/command.js +1 -1
  92. package/dist/react/command.js.map +1 -1
  93. package/dist/react/command.mjs +1 -1
  94. package/dist/react/command.mjs.map +1 -1
  95. package/dist/react/container.js.map +1 -1
  96. package/dist/react/container.mjs.map +1 -1
  97. package/dist/react/context-menu.js.map +1 -1
  98. package/dist/react/context-menu.mjs.map +1 -1
  99. package/dist/react/data-table.d.mts +1 -1
  100. package/dist/react/data-table.d.ts +1 -1
  101. package/dist/react/data-table.js +1 -1
  102. package/dist/react/data-table.js.map +1 -1
  103. package/dist/react/data-table.mjs +1 -1
  104. package/dist/react/data-table.mjs.map +1 -1
  105. package/dist/react/dialog.js +1 -1
  106. package/dist/react/dialog.mjs +1 -1
  107. package/dist/react/drawer.js.map +1 -1
  108. package/dist/react/drawer.mjs.map +1 -1
  109. package/dist/react/dropdown-menu.js +1 -1
  110. package/dist/react/dropdown-menu.mjs +1 -1
  111. package/dist/react/em.js.map +1 -1
  112. package/dist/react/em.mjs.map +1 -1
  113. package/dist/react/form.js +1 -1
  114. package/dist/react/form.js.map +1 -1
  115. package/dist/react/form.mjs +1 -1
  116. package/dist/react/form.mjs.map +1 -1
  117. package/dist/react/heading.js.map +1 -1
  118. package/dist/react/heading.mjs.map +1 -1
  119. package/dist/react/hover-card.js.map +1 -1
  120. package/dist/react/hover-card.mjs.map +1 -1
  121. package/dist/react/input-otp.js.map +1 -1
  122. package/dist/react/input-otp.mjs.map +1 -1
  123. package/dist/react/input.js.map +1 -1
  124. package/dist/react/input.mjs.map +1 -1
  125. package/dist/react/kbd.js.map +1 -1
  126. package/dist/react/kbd.mjs.map +1 -1
  127. package/dist/react/label.js +1 -1
  128. package/dist/react/label.mjs +1 -1
  129. package/dist/react/menubar.js.map +1 -1
  130. package/dist/react/menubar.mjs.map +1 -1
  131. package/dist/react/navigation-menu.js.map +1 -1
  132. package/dist/react/navigation-menu.mjs.map +1 -1
  133. package/dist/react/pagination.js +1 -1
  134. package/dist/react/pagination.js.map +1 -1
  135. package/dist/react/pagination.mjs +1 -1
  136. package/dist/react/pagination.mjs.map +1 -1
  137. package/dist/react/popover.js.map +1 -1
  138. package/dist/react/popover.mjs.map +1 -1
  139. package/dist/react/pre.js.map +1 -1
  140. package/dist/react/pre.mjs.map +1 -1
  141. package/dist/react/progress.js.map +1 -1
  142. package/dist/react/progress.mjs.map +1 -1
  143. package/dist/react/quote.js.map +1 -1
  144. package/dist/react/quote.mjs.map +1 -1
  145. package/dist/react/radio-cards.js.map +1 -1
  146. package/dist/react/radio-cards.mjs.map +1 -1
  147. package/dist/react/radio-group.js.map +1 -1
  148. package/dist/react/radio-group.mjs.map +1 -1
  149. package/dist/react/radio.js.map +1 -1
  150. package/dist/react/radio.mjs.map +1 -1
  151. package/dist/react/resizable.js.map +1 -1
  152. package/dist/react/resizable.mjs.map +1 -1
  153. package/dist/react/scroll-area.js.map +1 -1
  154. package/dist/react/scroll-area.mjs.map +1 -1
  155. package/dist/react/section.js.map +1 -1
  156. package/dist/react/section.mjs.map +1 -1
  157. package/dist/react/select.js +1 -1
  158. package/dist/react/select.mjs +1 -1
  159. package/dist/react/separator.js.map +1 -1
  160. package/dist/react/separator.mjs.map +1 -1
  161. package/dist/react/sheet.js +1 -1
  162. package/dist/react/sheet.js.map +1 -1
  163. package/dist/react/sheet.mjs +1 -1
  164. package/dist/react/sheet.mjs.map +1 -1
  165. package/dist/react/skeleton.js.map +1 -1
  166. package/dist/react/skeleton.mjs.map +1 -1
  167. package/dist/react/slider.js.map +1 -1
  168. package/dist/react/slider.mjs.map +1 -1
  169. package/dist/react/sonner.js.map +1 -1
  170. package/dist/react/sonner.mjs.map +1 -1
  171. package/dist/react/spinner.js +1 -1
  172. package/dist/react/spinner.mjs +1 -1
  173. package/dist/react/strong.js.map +1 -1
  174. package/dist/react/strong.mjs.map +1 -1
  175. package/dist/react/switch.js.map +1 -1
  176. package/dist/react/switch.mjs.map +1 -1
  177. package/dist/react/table.js.map +1 -1
  178. package/dist/react/table.mjs.map +1 -1
  179. package/dist/react/tabs.js.map +1 -1
  180. package/dist/react/tabs.mjs.map +1 -1
  181. package/dist/react/text.js.map +1 -1
  182. package/dist/react/text.mjs.map +1 -1
  183. package/dist/react/textarea.js.map +1 -1
  184. package/dist/react/textarea.mjs.map +1 -1
  185. package/dist/react/toggle-group.js +1 -1
  186. package/dist/react/toggle-group.js.map +1 -1
  187. package/dist/react/toggle-group.mjs +1 -1
  188. package/dist/react/toggle-group.mjs.map +1 -1
  189. package/dist/react/toggle.js +1 -1
  190. package/dist/react/toggle.mjs +1 -1
  191. package/dist/react/tooltip.js.map +1 -1
  192. package/dist/react/tooltip.mjs.map +1 -1
  193. package/dist/styles.css.map +1 -1
  194. package/dist/tailwind.config.js +1 -1
  195. package/dist/tailwind.config.js.map +1 -1
  196. package/dist/tailwind.config.mjs +1 -1
  197. package/dist/tailwind.config.mjs.map +1 -1
  198. package/package.json +6 -6
  199. package/plugin/animate.plugin.ts +2 -5
  200. package/src/react/accordion.tsx +36 -60
  201. package/src/react/alert-dialog.tsx +57 -125
  202. package/src/react/alert.tsx +16 -42
  203. package/src/react/aspect-ratio.tsx +2 -4
  204. package/src/react/avatar.tsx +15 -43
  205. package/src/react/badge.tsx +3 -8
  206. package/src/react/blockquote.tsx +5 -8
  207. package/src/react/box.tsx +4 -6
  208. package/src/react/breadcrumb.tsx +17 -50
  209. package/src/react/button.tsx +5 -20
  210. package/src/react/calendar.tsx +5 -22
  211. package/src/react/card.tsx +22 -56
  212. package/src/react/carousel.tsx +20 -76
  213. package/src/react/checkbox-cards.tsx +28 -55
  214. package/src/react/checkbox-group.primitive.tsx +24 -78
  215. package/src/react/checkbox-group.tsx +26 -49
  216. package/src/react/checkbox.tsx +15 -19
  217. package/src/react/code.tsx +4 -6
  218. package/src/react/collapsible.tsx +19 -29
  219. package/src/react/command.tsx +69 -134
  220. package/src/react/container.tsx +5 -9
  221. package/src/react/context-menu.tsx +146 -224
  222. package/src/react/data-table.tsx +16 -44
  223. package/src/react/dialog.tsx +45 -90
  224. package/src/react/drawer.tsx +44 -91
  225. package/src/react/dropdown-menu.tsx +126 -194
  226. package/src/react/em.tsx +4 -6
  227. package/src/react/form.tsx +49 -84
  228. package/src/react/heading.tsx +4 -6
  229. package/src/react/hover-card.tsx +22 -38
  230. package/src/react/input-otp.tsx +26 -37
  231. package/src/react/input.tsx +6 -16
  232. package/src/react/kbd.tsx +14 -16
  233. package/src/react/label.tsx +11 -12
  234. package/src/react/menubar.tsx +129 -208
  235. package/src/react/navigation-menu.tsx +105 -147
  236. package/src/react/pagination.tsx +18 -50
  237. package/src/react/popover.tsx +25 -40
  238. package/src/react/pre.tsx +4 -6
  239. package/src/react/progress.tsx +15 -22
  240. package/src/react/quote.tsx +4 -6
  241. package/src/react/radio-cards.tsx +7 -27
  242. package/src/react/radio-group.tsx +7 -27
  243. package/src/react/radio.tsx +14 -18
  244. package/src/react/resizable.tsx +2 -7
  245. package/src/react/scroll-area.tsx +30 -52
  246. package/src/react/section.tsx +4 -6
  247. package/src/react/select.tsx +108 -161
  248. package/src/react/separator.tsx +3 -12
  249. package/src/react/sheet.tsx +21 -71
  250. package/src/react/skeleton.tsx +1 -6
  251. package/src/react/slider.tsx +20 -27
  252. package/src/react/sonner.tsx +2 -4
  253. package/src/react/spinner.tsx +2 -7
  254. package/src/react/strong.tsx +4 -6
  255. package/src/react/switch.tsx +12 -14
  256. package/src/react/table.tsx +37 -82
  257. package/src/react/tabs.tsx +34 -44
  258. package/src/react/text.tsx +5 -8
  259. package/src/react/textarea.tsx +12 -14
  260. package/src/react/toggle-group.tsx +16 -57
  261. package/src/react/toggle.tsx +8 -15
  262. package/src/react/tooltip.tsx +24 -39
  263. package/tailwind.config.ts +2 -2
  264. package/dist/chunk-47CSACCM.mjs.map +0 -1
  265. package/dist/chunk-6FL3EBDQ.mjs.map +0 -1
  266. package/dist/chunk-CERSQE5J.js.map +0 -1
  267. package/dist/chunk-GDMHMSJ2.mjs.map +0 -1
  268. package/dist/chunk-I6QCJDIF.mjs.map +0 -1
  269. package/dist/chunk-JOBEKA4M.mjs.map +0 -1
  270. package/dist/chunk-LG7ACTRE.js.map +0 -1
  271. package/dist/chunk-MU2MZ434.mjs.map +0 -1
  272. package/dist/chunk-OP6Q7VT5.js.map +0 -1
  273. package/dist/chunk-P5AV3QU7.mjs.map +0 -1
  274. package/dist/chunk-PWF46YXQ.mjs.map +0 -1
  275. package/dist/chunk-SCPFGC2X.js.map +0 -1
  276. package/dist/chunk-SDGUDONZ.js.map +0 -1
  277. package/dist/chunk-UYRRHPPH.js.map +0 -1
  278. package/dist/chunk-VXPAGNPJ.js.map +0 -1
  279. package/dist/chunk-X3LRJQM3.js.map +0 -1
  280. package/dist/chunk-XHNT6PVI.mjs.map +0 -1
  281. package/dist/chunk-ZTEJNUH6.js.map +0 -1
@@ -3,8 +3,8 @@
3
3
  import * as React from 'react';
4
4
  import * as SheetPrimitive from '@radix-ui/react-dialog';
5
5
  import { Cross2Icon } from '@radix-ui/react-icons';
6
- import { type VariantProps } from 'cva';
7
6
  import { cn, cva } from '../lib/utils';
7
+ import type { VariantProps } from 'cva';
8
8
 
9
9
  /* -----------------------------------------------------------------------------
10
10
  * Variant: Sheet
@@ -40,18 +40,14 @@ const Sheet = SheetPrimitive.Root;
40
40
  * Component: SheetTrigger
41
41
  * -------------------------------------------------------------------------- */
42
42
 
43
- type SheetTriggerProps = React.ComponentPropsWithoutRef<
44
- typeof SheetPrimitive.Trigger
45
- >;
43
+ type SheetTriggerProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Trigger>;
46
44
  const SheetTrigger = SheetPrimitive.Trigger;
47
45
 
48
46
  /* -----------------------------------------------------------------------------
49
47
  * Component: SheetClose
50
48
  * -------------------------------------------------------------------------- */
51
49
 
52
- type SheetCloseProps = React.ComponentPropsWithoutRef<
53
- typeof SheetPrimitive.Close
54
- >;
50
+ type SheetCloseProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Close>;
55
51
  const SheetClose = SheetPrimitive.Close;
56
52
 
57
53
  /* -----------------------------------------------------------------------------
@@ -59,20 +55,13 @@ const SheetClose = SheetPrimitive.Close;
59
55
  * -------------------------------------------------------------------------- */
60
56
 
61
57
  type SheetContentElement = React.ElementRef<typeof SheetPrimitive.Content>;
62
- type SheetContentProps = React.ComponentPropsWithoutRef<
63
- typeof SheetPrimitive.Content
64
- > &
65
- SheetVariantsProps;
58
+ type SheetContentProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content> & SheetVariantsProps;
66
59
 
67
60
  const SheetContent = React.forwardRef<SheetContentElement, SheetContentProps>(
68
61
  ({ children, side = 'right', className, ...props }, ref) => (
69
62
  <SheetPrimitive.Portal>
70
63
  <SheetPrimitive.Overlay className="data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 bg-black/80" />
71
- <SheetPrimitive.Content
72
- ref={ref}
73
- className={sheetVariants({ side, className })}
74
- {...props}
75
- >
64
+ <SheetPrimitive.Content ref={ref} className={sheetVariants({ side, className })} {...props}>
76
65
  {children}
77
66
  <SheetPrimitive.Close className="data-[state=open]:bg-secondary absolute right-4 top-4 rounded-sm opacity-70 transition hover:opacity-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none">
78
67
  <Cross2Icon className="size-4" />
@@ -91,19 +80,8 @@ SheetContent.displayName = SheetPrimitive.Content.displayName;
91
80
 
92
81
  type SheetHeaderProps = React.HTMLAttributes<HTMLDivElement>;
93
82
 
94
- function SheetHeader({
95
- className,
96
- ...props
97
- }: SheetHeaderProps): React.JSX.Element {
98
- return (
99
- <div
100
- className={cn(
101
- 'flex flex-col space-y-2 text-center sm:text-left',
102
- className,
103
- )}
104
- {...props}
105
- />
106
- );
83
+ function SheetHeader({ className, ...props }: SheetHeaderProps): React.JSX.Element {
84
+ return <div className={cn('flex flex-col space-y-2 text-center sm:text-left', className)} {...props} />;
107
85
  }
108
86
 
109
87
  /* -----------------------------------------------------------------------------
@@ -112,19 +90,8 @@ function SheetHeader({
112
90
 
113
91
  type SheetFooterProps = React.HTMLAttributes<HTMLDivElement>;
114
92
 
115
- function SheetFooter({
116
- className,
117
- ...props
118
- }: SheetFooterProps): React.JSX.Element {
119
- return (
120
- <div
121
- className={cn(
122
- 'flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2',
123
- className,
124
- )}
125
- {...props}
126
- />
127
- );
93
+ function SheetFooter({ className, ...props }: SheetFooterProps): React.JSX.Element {
94
+ return <div className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)} {...props} />;
128
95
  }
129
96
 
130
97
  SheetFooter.displayName = 'SheetFooter';
@@ -134,19 +101,11 @@ SheetFooter.displayName = 'SheetFooter';
134
101
  * -------------------------------------------------------------------------- */
135
102
 
136
103
  type SheetTitleElement = React.ElementRef<typeof SheetPrimitive.Title>;
137
- type SheetTitleProps = React.ComponentPropsWithoutRef<
138
- typeof SheetPrimitive.Title
139
- >;
104
+ type SheetTitleProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>;
140
105
 
141
- const SheetTitle = React.forwardRef<SheetTitleElement, SheetTitleProps>(
142
- ({ className, ...props }, ref) => (
143
- <SheetPrimitive.Title
144
- ref={ref}
145
- className={cn('text-foreground text-lg font-semibold', className)}
146
- {...props}
147
- />
148
- ),
149
- );
106
+ const SheetTitle = React.forwardRef<SheetTitleElement, SheetTitleProps>(({ className, ...props }, ref) => (
107
+ <SheetPrimitive.Title ref={ref} className={cn('text-foreground text-lg font-semibold', className)} {...props} />
108
+ ));
150
109
 
151
110
  SheetTitle.displayName = SheetPrimitive.Title.displayName;
152
111
 
@@ -154,23 +113,14 @@ SheetTitle.displayName = SheetPrimitive.Title.displayName;
154
113
  * Component: SheetDescription
155
114
  * -------------------------------------------------------------------------- */
156
115
 
157
- type SheetDescriptionElement = React.ElementRef<
158
- typeof SheetPrimitive.Description
159
- >;
160
- type SheetDescriptionProps = React.ComponentPropsWithoutRef<
161
- typeof SheetPrimitive.Description
162
- >;
163
-
164
- const SheetDescription = React.forwardRef<
165
- SheetDescriptionElement,
166
- SheetDescriptionProps
167
- >(({ className, ...props }, ref) => (
168
- <SheetPrimitive.Description
169
- ref={ref}
170
- className={cn('text-muted-foreground text-sm', className)}
171
- {...props}
172
- />
173
- ));
116
+ type SheetDescriptionElement = React.ElementRef<typeof SheetPrimitive.Description>;
117
+ type SheetDescriptionProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>;
118
+
119
+ const SheetDescription = React.forwardRef<SheetDescriptionElement, SheetDescriptionProps>(
120
+ ({ className, ...props }, ref) => (
121
+ <SheetPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />
122
+ ),
123
+ );
174
124
 
175
125
  SheetDescription.displayName = SheetPrimitive.Description.displayName;
176
126
 
@@ -8,12 +8,7 @@ import { cn } from '../lib/utils';
8
8
  type SkeletonProps = React.HTMLAttributes<HTMLDivElement>;
9
9
 
10
10
  function Skeleton({ className, ...props }: SkeletonProps): React.JSX.Element {
11
- return (
12
- <div
13
- className={cn('bg-primary/10 animate-pulse rounded', className)}
14
- {...props}
15
- />
16
- );
11
+ return <div className={cn('bg-primary/10 animate-pulse rounded', className)} {...props} />;
17
12
  }
18
13
 
19
14
  /* -----------------------------------------------------------------------------
@@ -11,33 +11,26 @@ import { cn } from '../lib/utils';
11
11
  type SliderElement = React.ElementRef<typeof SliderPrimitive.Root>;
12
12
  type SliderProps = React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root>;
13
13
 
14
- const Slider = React.forwardRef<SliderElement, SliderProps>(
15
- ({ className, ...props }, ref) => (
16
- <SliderPrimitive.Root
17
- ref={ref}
18
- className={cn(
19
- 'relative flex w-full touch-none select-none items-center',
20
- className,
21
- )}
22
- {...props}
23
- >
24
- <SliderPrimitive.Track className="bg-primary/20 relative h-1.5 w-full grow overflow-hidden rounded-full">
25
- <SliderPrimitive.Range className="bg-primary absolute h-full" />
26
- </SliderPrimitive.Track>
27
-
28
- {(props.value ?? props.defaultValue ?? []).map((value, index) => (
29
- <SliderPrimitive.Thumb
30
- // eslint-disable-next-line react/no-array-index-key -- index is stable
31
- key={index}
32
- className="border-primary/50 bg-background block size-4 rounded-full border shadow transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:opacity-50"
33
- {...(props.tabIndex !== undefined
34
- ? { tabIndex: props.tabIndex }
35
- : undefined)}
36
- />
37
- ))}
38
- </SliderPrimitive.Root>
39
- ),
40
- );
14
+ const Slider = React.forwardRef<SliderElement, SliderProps>(({ className, ...props }, ref) => (
15
+ <SliderPrimitive.Root
16
+ ref={ref}
17
+ className={cn('relative flex w-full touch-none select-none items-center', className)}
18
+ {...props}
19
+ >
20
+ <SliderPrimitive.Track className="bg-primary/20 relative h-1.5 w-full grow overflow-hidden rounded-full">
21
+ <SliderPrimitive.Range className="bg-primary absolute h-full" />
22
+ </SliderPrimitive.Track>
23
+
24
+ {(props.value ?? props.defaultValue ?? []).map((value, index) => (
25
+ <SliderPrimitive.Thumb
26
+ // eslint-disable-next-line react/no-array-index-key -- index is stable
27
+ key={index}
28
+ className="border-primary/50 bg-background block size-4 rounded-full border shadow transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:opacity-50"
29
+ {...(props.tabIndex !== undefined ? { tabIndex: props.tabIndex } : undefined)}
30
+ />
31
+ ))}
32
+ </SliderPrimitive.Root>
33
+ ));
41
34
 
42
35
  Slider.displayName = SliderPrimitive.Root.displayName;
43
36
 
@@ -23,10 +23,8 @@ function Toaster({ ...props }: ToasterProps): React.JSX.Element {
23
23
  toast:
24
24
  'group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg',
25
25
  description: 'group-[.toast]:text-muted-foreground',
26
- actionButton:
27
- 'group-[.toast]:bg-primary group-[.toast]:text-primary-foreground',
28
- cancelButton:
29
- 'group-[.toast]:bg-muted group-[.toast]:text-muted-foreground',
26
+ actionButton: 'group-[.toast]:bg-primary group-[.toast]:text-primary-foreground',
27
+ cancelButton: 'group-[.toast]:bg-muted group-[.toast]:text-muted-foreground',
30
28
  },
31
29
  }}
32
30
  {...props}
@@ -23,10 +23,7 @@ const Spinner = React.forwardRef<SpinnerElement, SpinnerProps>(
23
23
  const spinner = (
24
24
  <span
25
25
  ref={ref}
26
- className={cn(
27
- 'relative flex size-4 items-center justify-center opacity-60',
28
- className,
29
- )}
26
+ className={cn('relative flex size-4 items-center justify-center opacity-60', className)}
30
27
  {...props}
31
28
  >
32
29
  {Array.from({ length: spinnerCount }, (_, i) => (
@@ -56,9 +53,7 @@ const Spinner = React.forwardRef<SpinnerElement, SpinnerProps>(
56
53
  {children}
57
54
  </span>
58
55
  <VisuallyHidden>{children}</VisuallyHidden>
59
- <span className="absolute inset-0 flex items-center justify-center">
60
- {spinner}
61
- </span>
56
+ <span className="absolute inset-0 flex items-center justify-center">{spinner}</span>
62
57
  </span>
63
58
  );
64
59
  },
@@ -11,13 +11,11 @@ interface StrongProps extends React.HTMLAttributes<HTMLElement> {
11
11
  asChild?: boolean;
12
12
  }
13
13
 
14
- const Strong = React.forwardRef<StrongElement, StrongProps>(
15
- ({ asChild, ...props }, ref) => {
16
- const Component = asChild ? Slot : 'strong';
14
+ const Strong = React.forwardRef<StrongElement, StrongProps>(({ asChild, ...props }, ref) => {
15
+ const Component = asChild ? Slot : 'strong';
17
16
 
18
- return <Component ref={ref} {...props} />;
19
- },
20
- );
17
+ return <Component ref={ref} {...props} />;
18
+ });
21
19
 
22
20
  Strong.displayName = 'Strong';
23
21
 
@@ -11,20 +11,18 @@ import { cn } from '../lib/utils';
11
11
  type SwitchElement = React.ElementRef<typeof SwitchPrimitives.Root>;
12
12
  type SwitchProps = React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>;
13
13
 
14
- const Switch = React.forwardRef<SwitchElement, SwitchProps>(
15
- ({ className, ...props }, ref) => (
16
- <SwitchPrimitives.Root
17
- className={cn(
18
- 'data-[state=checked]:bg-primary data-[state=unchecked]:bg-input peer inline-flex h-5 w-9 shrink-0 items-center rounded-full border-2 border-transparent shadow-sm transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
19
- className,
20
- )}
21
- {...props}
22
- ref={ref}
23
- >
24
- <SwitchPrimitives.Thumb className="bg-background pointer-events-none block size-4 rounded-full shadow-lg transition data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0" />
25
- </SwitchPrimitives.Root>
26
- ),
27
- );
14
+ const Switch = React.forwardRef<SwitchElement, SwitchProps>(({ className, ...props }, ref) => (
15
+ <SwitchPrimitives.Root
16
+ className={cn(
17
+ 'data-[state=checked]:bg-primary data-[state=unchecked]:bg-input peer inline-flex h-5 w-9 shrink-0 items-center rounded-full border-2 border-transparent shadow-sm transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
18
+ className,
19
+ )}
20
+ {...props}
21
+ ref={ref}
22
+ >
23
+ <SwitchPrimitives.Thumb className="bg-background pointer-events-none block size-4 rounded-full shadow-lg transition data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0" />
24
+ </SwitchPrimitives.Root>
25
+ ));
28
26
 
29
27
  Switch.displayName = SwitchPrimitives.Root.displayName;
30
28
 
@@ -8,17 +8,11 @@ import { cn } from '../lib/utils';
8
8
  type TableElement = HTMLTableElement;
9
9
  type TableProps = React.HTMLAttributes<HTMLTableElement>;
10
10
 
11
- const Table = React.forwardRef<TableElement, TableProps>(
12
- ({ className, ...props }, ref) => (
13
- <div className="relative w-full overflow-auto">
14
- <table
15
- ref={ref}
16
- className={cn('w-full caption-bottom text-sm', className)}
17
- {...props}
18
- />
19
- </div>
20
- ),
21
- );
11
+ const Table = React.forwardRef<TableElement, TableProps>(({ className, ...props }, ref) => (
12
+ <div className="relative w-full overflow-auto">
13
+ <table ref={ref} className={cn('w-full caption-bottom text-sm', className)} {...props} />
14
+ </div>
15
+ ));
22
16
 
23
17
  Table.displayName = 'Table';
24
18
 
@@ -29,11 +23,9 @@ Table.displayName = 'Table';
29
23
  type TableHeaderElement = HTMLTableSectionElement;
30
24
  type TableHeaderProps = React.HTMLAttributes<HTMLTableSectionElement>;
31
25
 
32
- const TableHeader = React.forwardRef<TableHeaderElement, TableHeaderProps>(
33
- ({ className, ...props }, ref) => (
34
- <thead ref={ref} className={cn('[&_tr]:border-b', className)} {...props} />
35
- ),
36
- );
26
+ const TableHeader = React.forwardRef<TableHeaderElement, TableHeaderProps>(({ className, ...props }, ref) => (
27
+ <thead ref={ref} className={cn('[&_tr]:border-b', className)} {...props} />
28
+ ));
37
29
 
38
30
  TableHeader.displayName = 'TableHeader';
39
31
 
@@ -44,15 +36,9 @@ TableHeader.displayName = 'TableHeader';
44
36
  type TableBodyElement = HTMLTableSectionElement;
45
37
  type TableBodyProps = React.HTMLAttributes<HTMLTableSectionElement>;
46
38
 
47
- const TableBody = React.forwardRef<TableBodyElement, TableBodyProps>(
48
- ({ className, ...props }, ref) => (
49
- <tbody
50
- ref={ref}
51
- className={cn('[&_tr:last-child]:border-0', className)}
52
- {...props}
53
- />
54
- ),
55
- );
39
+ const TableBody = React.forwardRef<TableBodyElement, TableBodyProps>(({ className, ...props }, ref) => (
40
+ <tbody ref={ref} className={cn('[&_tr:last-child]:border-0', className)} {...props} />
41
+ ));
56
42
 
57
43
  TableBody.displayName = 'TableBody';
58
44
 
@@ -63,18 +49,9 @@ TableBody.displayName = 'TableBody';
63
49
  type TableFooterElement = HTMLTableSectionElement;
64
50
  type TableFooterProps = React.HTMLAttributes<HTMLTableSectionElement>;
65
51
 
66
- const TableFooter = React.forwardRef<TableFooterElement, TableFooterProps>(
67
- ({ className, ...props }, ref) => (
68
- <tfoot
69
- ref={ref}
70
- className={cn(
71
- 'bg-muted/50 border-t font-medium [&>tr]:last:border-b-0',
72
- className,
73
- )}
74
- {...props}
75
- />
76
- ),
77
- );
52
+ const TableFooter = React.forwardRef<TableFooterElement, TableFooterProps>(({ className, ...props }, ref) => (
53
+ <tfoot ref={ref} className={cn('bg-muted/50 border-t font-medium [&>tr]:last:border-b-0', className)} {...props} />
54
+ ));
78
55
 
79
56
  TableFooter.displayName = 'TableFooter';
80
57
 
@@ -85,18 +62,13 @@ TableFooter.displayName = 'TableFooter';
85
62
  type TableRowElement = HTMLTableRowElement;
86
63
  type TableRowProps = React.HTMLAttributes<HTMLTableRowElement>;
87
64
 
88
- const TableRow = React.forwardRef<TableRowElement, TableRowProps>(
89
- ({ className, ...props }, ref) => (
90
- <tr
91
- ref={ref}
92
- className={cn(
93
- 'hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition',
94
- className,
95
- )}
96
- {...props}
97
- />
98
- ),
99
- );
65
+ const TableRow = React.forwardRef<TableRowElement, TableRowProps>(({ className, ...props }, ref) => (
66
+ <tr
67
+ ref={ref}
68
+ className={cn('hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition', className)}
69
+ {...props}
70
+ />
71
+ ));
100
72
 
101
73
  TableRow.displayName = 'TableRow';
102
74
 
@@ -107,18 +79,16 @@ TableRow.displayName = 'TableRow';
107
79
  type TableHeadElement = HTMLTableCellElement;
108
80
  type TableHeadProps = React.ThHTMLAttributes<HTMLTableCellElement>;
109
81
 
110
- const TableHead = React.forwardRef<TableHeadElement, TableHeadProps>(
111
- ({ className, ...props }, ref) => (
112
- <th
113
- ref={ref}
114
- className={cn(
115
- 'text-muted-foreground h-12 px-4 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0',
116
- className,
117
- )}
118
- {...props}
119
- />
120
- ),
121
- );
82
+ const TableHead = React.forwardRef<TableHeadElement, TableHeadProps>(({ className, ...props }, ref) => (
83
+ <th
84
+ ref={ref}
85
+ className={cn(
86
+ 'text-muted-foreground h-12 px-4 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0',
87
+ className,
88
+ )}
89
+ {...props}
90
+ />
91
+ ));
122
92
 
123
93
  TableHead.displayName = 'TableHead';
124
94
 
@@ -129,18 +99,9 @@ TableHead.displayName = 'TableHead';
129
99
  type TableCellElement = HTMLTableCellElement;
130
100
  type TableCellProps = React.TdHTMLAttributes<HTMLTableCellElement>;
131
101
 
132
- const TableCell = React.forwardRef<TableCellElement, TableCellProps>(
133
- ({ className, ...props }, ref) => (
134
- <td
135
- ref={ref}
136
- className={cn(
137
- 'p-4 align-middle [&:has([role=checkbox])]:pr-0',
138
- className,
139
- )}
140
- {...props}
141
- />
142
- ),
143
- );
102
+ const TableCell = React.forwardRef<TableCellElement, TableCellProps>(({ className, ...props }, ref) => (
103
+ <td ref={ref} className={cn('p-4 align-middle [&:has([role=checkbox])]:pr-0', className)} {...props} />
104
+ ));
144
105
 
145
106
  TableCell.displayName = 'TableCell';
146
107
 
@@ -151,15 +112,9 @@ TableCell.displayName = 'TableCell';
151
112
  type TableCaptionElement = HTMLTableCaptionElement;
152
113
  type TableCaptionProps = React.HTMLAttributes<HTMLTableCaptionElement>;
153
114
 
154
- const TableCaption = React.forwardRef<TableCaptionElement, TableCaptionProps>(
155
- ({ className, ...props }, ref) => (
156
- <caption
157
- ref={ref}
158
- className={cn('text-muted-foreground mt-4 text-sm', className)}
159
- {...props}
160
- />
161
- ),
162
- );
115
+ const TableCaption = React.forwardRef<TableCaptionElement, TableCaptionProps>(({ className, ...props }, ref) => (
116
+ <caption ref={ref} className={cn('text-muted-foreground mt-4 text-sm', className)} {...props} />
117
+ ));
163
118
 
164
119
  TableCaption.displayName = 'TableCaption';
165
120
 
@@ -18,18 +18,16 @@ const Tabs = TabsPrimitive.Root;
18
18
  type TabsListElement = React.ElementRef<typeof TabsPrimitive.List>;
19
19
  type TabsListProps = React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>;
20
20
 
21
- const TabsList = React.forwardRef<TabsListElement, TabsListProps>(
22
- ({ className, ...props }, ref) => (
23
- <TabsPrimitive.List
24
- ref={ref}
25
- className={cn(
26
- 'bg-muted text-muted-foreground inline-flex h-10 items-center justify-center gap-1 rounded-md p-1',
27
- className,
28
- )}
29
- {...props}
30
- />
31
- ),
32
- );
21
+ const TabsList = React.forwardRef<TabsListElement, TabsListProps>(({ className, ...props }, ref) => (
22
+ <TabsPrimitive.List
23
+ ref={ref}
24
+ className={cn(
25
+ 'bg-muted text-muted-foreground inline-flex h-10 items-center justify-center gap-1 rounded-md p-1',
26
+ className,
27
+ )}
28
+ {...props}
29
+ />
30
+ ));
33
31
 
34
32
  TabsList.displayName = TabsPrimitive.List.displayName;
35
33
 
@@ -38,22 +36,18 @@ TabsList.displayName = TabsPrimitive.List.displayName;
38
36
  * -------------------------------------------------------------------------- */
39
37
 
40
38
  type TabsTriggerElement = React.ElementRef<typeof TabsPrimitive.Trigger>;
41
- type TabsTriggerProps = React.ComponentPropsWithoutRef<
42
- typeof TabsPrimitive.Trigger
43
- >;
44
-
45
- const TabsTrigger = React.forwardRef<TabsTriggerElement, TabsTriggerProps>(
46
- ({ className, ...props }, ref) => (
47
- <TabsPrimitive.Trigger
48
- ref={ref}
49
- className={cn(
50
- 'data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium outline-transparent transition-all focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm',
51
- className,
52
- )}
53
- {...props}
54
- />
55
- ),
56
- );
39
+ type TabsTriggerProps = React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>;
40
+
41
+ const TabsTrigger = React.forwardRef<TabsTriggerElement, TabsTriggerProps>(({ className, ...props }, ref) => (
42
+ <TabsPrimitive.Trigger
43
+ ref={ref}
44
+ className={cn(
45
+ 'data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium outline-transparent transition-all focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm',
46
+ className,
47
+ )}
48
+ {...props}
49
+ />
50
+ ));
57
51
 
58
52
  TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
59
53
 
@@ -62,22 +56,18 @@ TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
62
56
  * -------------------------------------------------------------------------- */
63
57
 
64
58
  type TabsContentElement = React.ElementRef<typeof TabsPrimitive.Content>;
65
- type TabsContentProps = React.ComponentPropsWithoutRef<
66
- typeof TabsPrimitive.Content
67
- >;
68
-
69
- const TabsContent = React.forwardRef<TabsContentElement, TabsContentProps>(
70
- ({ className, ...props }, ref) => (
71
- <TabsPrimitive.Content
72
- ref={ref}
73
- className={cn(
74
- 'mt-2 rounded-md focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2',
75
- className,
76
- )}
77
- {...props}
78
- />
79
- ),
80
- );
59
+ type TabsContentProps = React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>;
60
+
61
+ const TabsContent = React.forwardRef<TabsContentElement, TabsContentProps>(({ className, ...props }, ref) => (
62
+ <TabsPrimitive.Content
63
+ ref={ref}
64
+ className={cn(
65
+ 'mt-2 rounded-md focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2',
66
+ className,
67
+ )}
68
+ {...props}
69
+ />
70
+ ));
81
71
 
82
72
  TabsContent.displayName = TabsPrimitive.Content.displayName;
83
73
 
@@ -7,8 +7,7 @@ import { Slot } from '@radix-ui/react-slot';
7
7
 
8
8
  type TextElement = HTMLParagraphElement;
9
9
 
10
- interface TextParagraphProps
11
- extends React.HTMLAttributes<HTMLParagraphElement> {
10
+ interface TextParagraphProps extends React.HTMLAttributes<HTMLParagraphElement> {
12
11
  as?: 'p';
13
12
  }
14
13
 
@@ -20,13 +19,11 @@ type TextProps = (TextParagraphProps | TextSpanProps) & {
20
19
  asChild?: boolean;
21
20
  };
22
21
 
23
- const Text = React.forwardRef<TextElement, TextProps>(
24
- ({ as: Tag = 'p', asChild, ...props }, ref) => {
25
- const Component = asChild ? Slot : Tag;
22
+ const Text = React.forwardRef<TextElement, TextProps>(({ as: Tag = 'p', asChild, ...props }, ref) => {
23
+ const Component = asChild ? Slot : Tag;
26
24
 
27
- return <Component ref={ref} {...props} />;
28
- },
29
- );
25
+ return <Component ref={ref} {...props} />;
26
+ });
30
27
 
31
28
  Text.displayName = 'Text';
32
29
 
@@ -8,20 +8,18 @@ import { cn } from '../lib/utils';
8
8
  type TextareaElement = HTMLTextAreaElement;
9
9
  type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;
10
10
 
11
- const Textarea = React.forwardRef<TextareaElement, TextareaProps>(
12
- ({ className, ...props }, ref) => {
13
- return (
14
- <textarea
15
- className={cn(
16
- 'border-input placeholder:text-muted-foreground flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
17
- className,
18
- )}
19
- ref={ref}
20
- {...props}
21
- />
22
- );
23
- },
24
- );
11
+ const Textarea = React.forwardRef<TextareaElement, TextareaProps>(({ className, ...props }, ref) => {
12
+ return (
13
+ <textarea
14
+ className={cn(
15
+ 'border-input placeholder:text-muted-foreground flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
16
+ className,
17
+ )}
18
+ ref={ref}
19
+ {...props}
20
+ />
21
+ );
22
+ });
25
23
 
26
24
  Textarea.displayName = 'Textarea';
27
25