@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
@@ -1,11 +1,7 @@
1
1
  'use client';
2
2
 
3
3
  import * as React from 'react';
4
- import {
5
- CheckIcon,
6
- ChevronRightIcon,
7
- DotFilledIcon,
8
- } from '@radix-ui/react-icons';
4
+ import { CheckIcon, ChevronRightIcon, DotFilledIcon } from '@radix-ui/react-icons';
9
5
  import * as MenubarPrimitive from '@radix-ui/react-menubar';
10
6
  import { cn } from '../lib/utils';
11
7
 
@@ -20,27 +16,21 @@ const MenubarMenu = MenubarPrimitive.Menu;
20
16
  * Component: MenubarGroup
21
17
  * -------------------------------------------------------------------------- */
22
18
 
23
- type MenubarGroupProps = React.ComponentPropsWithoutRef<
24
- typeof MenubarPrimitive.Group
25
- >;
19
+ type MenubarGroupProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Group>;
26
20
  const MenubarGroup = MenubarPrimitive.Group;
27
21
 
28
22
  /* -----------------------------------------------------------------------------
29
23
  * Component: MenubarSub
30
24
  * -------------------------------------------------------------------------- */
31
25
 
32
- type MenubarSubProps = React.ComponentPropsWithoutRef<
33
- typeof MenubarPrimitive.Sub
34
- >;
26
+ type MenubarSubProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Sub>;
35
27
  const MenubarSub = MenubarPrimitive.Sub;
36
28
 
37
29
  /* -----------------------------------------------------------------------------
38
30
  * Component: MenubarRadioGroup
39
31
  * -------------------------------------------------------------------------- */
40
32
 
41
- type MenubarRadioGroupProps = React.ComponentPropsWithoutRef<
42
- typeof MenubarPrimitive.RadioGroup
43
- >;
33
+ type MenubarRadioGroupProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioGroup>;
44
34
  const MenubarRadioGroup = MenubarPrimitive.RadioGroup;
45
35
 
46
36
  /* -----------------------------------------------------------------------------
@@ -48,22 +38,15 @@ const MenubarRadioGroup = MenubarPrimitive.RadioGroup;
48
38
  * -------------------------------------------------------------------------- */
49
39
 
50
40
  type MenubarElement = React.ElementRef<typeof MenubarPrimitive.Root>;
51
- type MenubarProps = React.ComponentPropsWithoutRef<
52
- typeof MenubarPrimitive.Root
53
- >;
41
+ type MenubarProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>;
54
42
 
55
- const Menubar = React.forwardRef<MenubarElement, MenubarProps>(
56
- ({ className, ...props }, ref) => (
57
- <MenubarPrimitive.Root
58
- ref={ref}
59
- className={cn(
60
- 'bg-background flex h-10 items-center space-x-1 rounded-md border p-1 shadow-sm',
61
- className,
62
- )}
63
- {...props}
64
- />
65
- ),
66
- );
43
+ const Menubar = React.forwardRef<MenubarElement, MenubarProps>(({ className, ...props }, ref) => (
44
+ <MenubarPrimitive.Root
45
+ ref={ref}
46
+ className={cn('bg-background flex h-10 items-center space-x-1 rounded-md border p-1 shadow-sm', className)}
47
+ {...props}
48
+ />
49
+ ));
67
50
 
68
51
  Menubar.displayName = MenubarPrimitive.Root.displayName;
69
52
 
@@ -72,14 +55,9 @@ Menubar.displayName = MenubarPrimitive.Root.displayName;
72
55
  * -------------------------------------------------------------------------- */
73
56
 
74
57
  type MenubarTriggerElement = React.ElementRef<typeof MenubarPrimitive.Trigger>;
75
- type MenubarTriggerProps = React.ComponentPropsWithoutRef<
76
- typeof MenubarPrimitive.Trigger
77
- >;
78
-
79
- const MenubarTrigger = React.forwardRef<
80
- MenubarTriggerElement,
81
- MenubarTriggerProps
82
- >(({ className, ...props }, ref) => (
58
+ type MenubarTriggerProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>;
59
+
60
+ const MenubarTrigger = React.forwardRef<MenubarTriggerElement, MenubarTriggerProps>(({ className, ...props }, ref) => (
83
61
  <MenubarPrimitive.Trigger
84
62
  ref={ref}
85
63
  className={cn(
@@ -96,32 +74,28 @@ MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
96
74
  * Component: MenubarSubTrigger
97
75
  * -------------------------------------------------------------------------- */
98
76
 
99
- type MenubarSubTriggerElement = React.ElementRef<
100
- typeof MenubarPrimitive.SubTrigger
101
- >;
77
+ type MenubarSubTriggerElement = React.ElementRef<typeof MenubarPrimitive.SubTrigger>;
102
78
 
103
- interface MenubarSubTriggerProps
104
- extends React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> {
79
+ interface MenubarSubTriggerProps extends React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> {
105
80
  inset?: boolean;
106
81
  }
107
82
 
108
- const MenubarSubTrigger = React.forwardRef<
109
- MenubarSubTriggerElement,
110
- MenubarSubTriggerProps
111
- >(({ children, className, inset, ...props }, ref) => (
112
- <MenubarPrimitive.SubTrigger
113
- ref={ref}
114
- className={cn(
115
- 'focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none',
116
- inset && 'pl-8',
117
- className,
118
- )}
119
- {...props}
120
- >
121
- {children}
122
- <ChevronRightIcon className="ml-auto size-4" />
123
- </MenubarPrimitive.SubTrigger>
124
- ));
83
+ const MenubarSubTrigger = React.forwardRef<MenubarSubTriggerElement, MenubarSubTriggerProps>(
84
+ ({ children, className, inset, ...props }, ref) => (
85
+ <MenubarPrimitive.SubTrigger
86
+ ref={ref}
87
+ className={cn(
88
+ 'focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none',
89
+ inset && 'pl-8',
90
+ className,
91
+ )}
92
+ {...props}
93
+ >
94
+ {children}
95
+ <ChevronRightIcon className="ml-auto size-4" />
96
+ </MenubarPrimitive.SubTrigger>
97
+ ),
98
+ );
125
99
 
126
100
  MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
127
101
 
@@ -129,28 +103,23 @@ MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
129
103
  * Component: MenubarSubContent
130
104
  * -------------------------------------------------------------------------- */
131
105
 
132
- type MenubarSubContentElement = React.ElementRef<
133
- typeof MenubarPrimitive.SubContent
134
- >;
135
- type MenubarSubContentProps = React.ComponentPropsWithoutRef<
136
- typeof MenubarPrimitive.SubContent
137
- >;
138
-
139
- const MenubarSubContent = React.forwardRef<
140
- MenubarSubContentElement,
141
- MenubarSubContentProps
142
- >(({ className, ...props }, ref) => (
143
- <MenubarPrimitive.Portal>
144
- <MenubarPrimitive.SubContent
145
- ref={ref}
146
- className={cn(
147
- '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=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-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-1 shadow-md',
148
- className,
149
- )}
150
- {...props}
151
- />
152
- </MenubarPrimitive.Portal>
153
- ));
106
+ type MenubarSubContentElement = React.ElementRef<typeof MenubarPrimitive.SubContent>;
107
+ type MenubarSubContentProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>;
108
+
109
+ const MenubarSubContent = React.forwardRef<MenubarSubContentElement, MenubarSubContentProps>(
110
+ ({ className, ...props }, ref) => (
111
+ <MenubarPrimitive.Portal>
112
+ <MenubarPrimitive.SubContent
113
+ ref={ref}
114
+ className={cn(
115
+ '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=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-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-1 shadow-md',
116
+ className,
117
+ )}
118
+ {...props}
119
+ />
120
+ </MenubarPrimitive.Portal>
121
+ ),
122
+ );
154
123
 
155
124
  MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
156
125
 
@@ -159,18 +128,10 @@ MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
159
128
  * -------------------------------------------------------------------------- */
160
129
 
161
130
  type MenubarContentElement = React.ElementRef<typeof MenubarPrimitive.Content>;
162
- type MenubarContentProps = React.ComponentPropsWithoutRef<
163
- typeof MenubarPrimitive.Content
164
- >;
165
-
166
- const MenubarContent = React.forwardRef<
167
- MenubarContentElement,
168
- MenubarContentProps
169
- >(
170
- (
171
- { className, align = 'start', alignOffset = -4, sideOffset = 8, ...props },
172
- ref,
173
- ) => (
131
+ type MenubarContentProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>;
132
+
133
+ const MenubarContent = React.forwardRef<MenubarContentElement, MenubarContentProps>(
134
+ ({ className, align = 'start', alignOffset = -4, sideOffset = 8, ...props }, ref) => (
174
135
  <MenubarPrimitive.Portal>
175
136
  <MenubarPrimitive.Content
176
137
  ref={ref}
@@ -195,145 +156,116 @@ MenubarContent.displayName = MenubarPrimitive.Content.displayName;
195
156
 
196
157
  type MenubarItemElement = React.ElementRef<typeof MenubarPrimitive.Item>;
197
158
 
198
- interface MenubarItemProps
199
- extends React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> {
159
+ interface MenubarItemProps extends React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> {
200
160
  inset?: boolean;
201
161
  }
202
162
 
203
- const MenubarItem = React.forwardRef<MenubarItemElement, MenubarItemProps>(
204
- ({ className, inset, ...props }, ref) => (
205
- <MenubarPrimitive.Item
206
- ref={ref}
207
- className={cn(
208
- 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',
209
- inset && 'pl-8',
210
- className,
211
- )}
212
- {...props}
213
- />
214
- ),
215
- );
216
-
217
- MenubarItem.displayName = MenubarPrimitive.Item.displayName;
218
-
219
- /* -----------------------------------------------------------------------------
220
- * Component: MenubarCheckboxItem
221
- * -------------------------------------------------------------------------- */
222
-
223
- type MenubarCheckboxItemElement = React.ElementRef<
224
- typeof MenubarPrimitive.CheckboxItem
225
- >;
226
- type MenubarCheckboxItemProps = React.ComponentPropsWithoutRef<
227
- typeof MenubarPrimitive.CheckboxItem
228
- >;
229
-
230
- const MenubarCheckboxItem = React.forwardRef<
231
- MenubarCheckboxItemElement,
232
- MenubarCheckboxItemProps
233
- >(({ children, className, checked, ...props }, ref) => (
234
- <MenubarPrimitive.CheckboxItem
163
+ const MenubarItem = React.forwardRef<MenubarItemElement, MenubarItemProps>(({ className, inset, ...props }, ref) => (
164
+ <MenubarPrimitive.Item
235
165
  ref={ref}
236
166
  className={cn(
237
- 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',
167
+ 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',
168
+ inset && 'pl-8',
238
169
  className,
239
170
  )}
240
- checked={checked}
241
171
  {...props}
242
- >
243
- <span className="absolute left-2 flex size-3.5 items-center justify-center">
244
- <MenubarPrimitive.ItemIndicator>
245
- <CheckIcon className="size-4" />
246
- </MenubarPrimitive.ItemIndicator>
247
- </span>
248
- {children}
249
- </MenubarPrimitive.CheckboxItem>
172
+ />
250
173
  ));
251
174
 
252
- MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
175
+ MenubarItem.displayName = MenubarPrimitive.Item.displayName;
253
176
 
254
177
  /* -----------------------------------------------------------------------------
255
- * Component: MenubarRadioItem
178
+ * Component: MenubarCheckboxItem
256
179
  * -------------------------------------------------------------------------- */
257
180
 
258
- type MenubarRadioItemElement = React.ElementRef<
259
- typeof MenubarPrimitive.RadioItem
260
- >;
261
- type MenubarRadioItemProps = React.ComponentPropsWithoutRef<
262
- typeof MenubarPrimitive.RadioItem
263
- >;
264
-
265
- const MenubarRadioItem = React.forwardRef<
266
- MenubarRadioItemElement,
267
- MenubarRadioItemProps
268
- >(({ children, className, ...props }, ref) => (
269
- <MenubarPrimitive.RadioItem
270
- ref={ref}
271
- className={cn(
272
- 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',
273
- className,
274
- )}
275
- {...props}
276
- >
277
- <span className="absolute left-2 flex size-3.5 items-center justify-center">
278
- <MenubarPrimitive.ItemIndicator>
279
- <DotFilledIcon className="size-4 fill-current" />
280
- </MenubarPrimitive.ItemIndicator>
281
- </span>
282
- {children}
283
- </MenubarPrimitive.RadioItem>
284
- ));
181
+ type MenubarCheckboxItemElement = React.ElementRef<typeof MenubarPrimitive.CheckboxItem>;
182
+ type MenubarCheckboxItemProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>;
285
183
 
286
- MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
184
+ const MenubarCheckboxItem = React.forwardRef<MenubarCheckboxItemElement, MenubarCheckboxItemProps>(
185
+ ({ children, className, checked, ...props }, ref) => (
186
+ <MenubarPrimitive.CheckboxItem
187
+ ref={ref}
188
+ className={cn(
189
+ 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',
190
+ className,
191
+ )}
192
+ checked={checked}
193
+ {...props}
194
+ >
195
+ <span className="absolute left-2 flex size-3.5 items-center justify-center">
196
+ <MenubarPrimitive.ItemIndicator>
197
+ <CheckIcon className="size-4" />
198
+ </MenubarPrimitive.ItemIndicator>
199
+ </span>
200
+ {children}
201
+ </MenubarPrimitive.CheckboxItem>
202
+ ),
203
+ );
204
+
205
+ MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
287
206
 
288
207
  /* -----------------------------------------------------------------------------
289
- * Component: MenubarLabel
208
+ * Component: MenubarRadioItem
290
209
  * -------------------------------------------------------------------------- */
291
210
 
292
- type MenubarLabelElement = React.ElementRef<typeof MenubarPrimitive.Label>;
211
+ type MenubarRadioItemElement = React.ElementRef<typeof MenubarPrimitive.RadioItem>;
212
+ type MenubarRadioItemProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>;
293
213
 
294
- interface MenubarLabelProps
295
- extends React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> {
296
- inset?: boolean;
297
- }
298
-
299
- const MenubarLabel = React.forwardRef<MenubarLabelElement, MenubarLabelProps>(
300
- ({ className, inset, ...props }, ref) => (
301
- <MenubarPrimitive.Label
214
+ const MenubarRadioItem = React.forwardRef<MenubarRadioItemElement, MenubarRadioItemProps>(
215
+ ({ children, className, ...props }, ref) => (
216
+ <MenubarPrimitive.RadioItem
302
217
  ref={ref}
303
218
  className={cn(
304
- 'px-2 py-1.5 text-sm font-semibold',
305
- inset && 'pl-8',
219
+ 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',
306
220
  className,
307
221
  )}
308
222
  {...props}
309
- />
223
+ >
224
+ <span className="absolute left-2 flex size-3.5 items-center justify-center">
225
+ <MenubarPrimitive.ItemIndicator>
226
+ <DotFilledIcon className="size-4 fill-current" />
227
+ </MenubarPrimitive.ItemIndicator>
228
+ </span>
229
+ {children}
230
+ </MenubarPrimitive.RadioItem>
310
231
  ),
311
232
  );
312
233
 
313
- MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
234
+ MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
314
235
 
315
236
  /* -----------------------------------------------------------------------------
316
- * Component: MenubarSeparator
237
+ * Component: MenubarLabel
317
238
  * -------------------------------------------------------------------------- */
318
239
 
319
- type MenubarSeparatorElement = React.ElementRef<
320
- typeof MenubarPrimitive.Separator
321
- >;
322
- type MenubarSeparatorProps = React.ComponentPropsWithoutRef<
323
- typeof MenubarPrimitive.Separator
324
- >;
325
-
326
- const MenubarSeparator = React.forwardRef<
327
- MenubarSeparatorElement,
328
- MenubarSeparatorProps
329
- >(({ className, ...props }, ref) => (
330
- <MenubarPrimitive.Separator
240
+ type MenubarLabelElement = React.ElementRef<typeof MenubarPrimitive.Label>;
241
+
242
+ interface MenubarLabelProps extends React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> {
243
+ inset?: boolean;
244
+ }
245
+
246
+ const MenubarLabel = React.forwardRef<MenubarLabelElement, MenubarLabelProps>(({ className, inset, ...props }, ref) => (
247
+ <MenubarPrimitive.Label
331
248
  ref={ref}
332
- className={cn('bg-muted -mx-1 my-1 h-px', className)}
249
+ className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}
333
250
  {...props}
334
251
  />
335
252
  ));
336
253
 
254
+ MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
255
+
256
+ /* -----------------------------------------------------------------------------
257
+ * Component: MenubarSeparator
258
+ * -------------------------------------------------------------------------- */
259
+
260
+ type MenubarSeparatorElement = React.ElementRef<typeof MenubarPrimitive.Separator>;
261
+ type MenubarSeparatorProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>;
262
+
263
+ const MenubarSeparator = React.forwardRef<MenubarSeparatorElement, MenubarSeparatorProps>(
264
+ ({ className, ...props }, ref) => (
265
+ <MenubarPrimitive.Separator ref={ref} className={cn('bg-muted -mx-1 my-1 h-px', className)} {...props} />
266
+ ),
267
+ );
268
+
337
269
  MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;
338
270
 
339
271
  /* -----------------------------------------------------------------------------
@@ -342,19 +274,8 @@ MenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;
342
274
 
343
275
  type MenubarShortcutProps = React.HTMLAttributes<HTMLSpanElement>;
344
276
 
345
- function MenubarShortcut({
346
- className,
347
- ...props
348
- }: MenubarShortcutProps): React.JSX.Element {
349
- return (
350
- <span
351
- className={cn(
352
- 'text-muted-foreground ml-auto text-xs tracking-widest',
353
- className,
354
- )}
355
- {...props}
356
- />
357
- );
277
+ function MenubarShortcut({ className, ...props }: MenubarShortcutProps): React.JSX.Element {
278
+ return <span className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)} {...props} />;
358
279
  }
359
280
 
360
281
  /* -----------------------------------------------------------------------------