@codefast/ui 0.0.4 → 0.0.6

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 (270) hide show
  1. package/dist/accordion.js +52 -1
  2. package/dist/accordion.js.map +1 -1
  3. package/dist/accordion.mjs +52 -1
  4. package/dist/accordion.mjs.map +1 -1
  5. package/dist/alert-dialog.d.mts +1 -3
  6. package/dist/alert-dialog.d.ts +1 -3
  7. package/dist/alert-dialog.js +106 -1
  8. package/dist/alert-dialog.js.map +1 -1
  9. package/dist/alert-dialog.mjs +106 -1
  10. package/dist/alert-dialog.mjs.map +1 -1
  11. package/dist/alert.js +54 -1
  12. package/dist/alert.js.map +1 -1
  13. package/dist/alert.mjs +54 -1
  14. package/dist/alert.mjs.map +1 -1
  15. package/dist/aspect-ratio.js +8 -1
  16. package/dist/aspect-ratio.js.map +1 -1
  17. package/dist/aspect-ratio.mjs +8 -1
  18. package/dist/aspect-ratio.mjs.map +1 -1
  19. package/dist/avatar.js +47 -1
  20. package/dist/avatar.js.map +1 -1
  21. package/dist/avatar.mjs +47 -1
  22. package/dist/avatar.mjs.map +1 -1
  23. package/dist/badge.js +30 -1
  24. package/dist/badge.js.map +1 -1
  25. package/dist/badge.mjs +30 -1
  26. package/dist/badge.mjs.map +1 -1
  27. package/dist/breadcrumb.js +99 -1
  28. package/dist/breadcrumb.js.map +1 -1
  29. package/dist/breadcrumb.mjs +99 -1
  30. package/dist/breadcrumb.mjs.map +1 -1
  31. package/dist/button.d.mts +1 -1
  32. package/dist/button.d.ts +1 -1
  33. package/dist/button.js +9 -1
  34. package/dist/button.mjs +9 -1
  35. package/dist/calendar.js +82 -1
  36. package/dist/calendar.js.map +1 -1
  37. package/dist/calendar.mjs +82 -1
  38. package/dist/calendar.mjs.map +1 -1
  39. package/dist/card.js +66 -1
  40. package/dist/card.js.map +1 -1
  41. package/dist/card.mjs +66 -1
  42. package/dist/card.mjs.map +1 -1
  43. package/dist/carousel.js +193 -1
  44. package/dist/carousel.js.map +1 -1
  45. package/dist/carousel.mjs +193 -1
  46. package/dist/carousel.mjs.map +1 -1
  47. package/dist/checkbox.js +26 -1
  48. package/dist/checkbox.js.map +1 -1
  49. package/dist/checkbox.mjs +26 -1
  50. package/dist/checkbox.mjs.map +1 -1
  51. package/dist/chunk-4K26QLS2.js +52 -0
  52. package/dist/chunk-4K26QLS2.js.map +1 -0
  53. package/dist/chunk-5GHZ6EXI.js +41 -0
  54. package/dist/chunk-5GHZ6EXI.js.map +1 -0
  55. package/dist/chunk-EIHWTXQ4.mjs +112 -0
  56. package/dist/chunk-EIHWTXQ4.mjs.map +1 -0
  57. package/dist/chunk-G3NP7M2N.js +19 -0
  58. package/dist/chunk-G3NP7M2N.js.map +1 -0
  59. package/dist/chunk-LDYBRDAY.js +112 -0
  60. package/dist/chunk-LDYBRDAY.js.map +1 -0
  61. package/dist/chunk-PTD4AMHI.mjs +25 -0
  62. package/dist/{chunk-76AASLTX.mjs.map → chunk-PTD4AMHI.mjs.map} +1 -1
  63. package/dist/chunk-RTKEO347.js +25 -0
  64. package/dist/chunk-RTKEO347.js.map +1 -0
  65. package/dist/chunk-T52N6ZBP.mjs +41 -0
  66. package/dist/chunk-T52N6ZBP.mjs.map +1 -0
  67. package/dist/chunk-UG3URV2Z.mjs +19 -0
  68. package/dist/chunk-UG3URV2Z.mjs.map +1 -0
  69. package/dist/chunk-Z524G4RY.mjs +52 -0
  70. package/dist/chunk-Z524G4RY.mjs.map +1 -0
  71. package/dist/collapsible.js +12 -1
  72. package/dist/collapsible.js.map +1 -1
  73. package/dist/collapsible.mjs +12 -1
  74. package/dist/collapsible.mjs.map +1 -1
  75. package/dist/command.js +131 -1
  76. package/dist/command.js.map +1 -1
  77. package/dist/command.mjs +131 -1
  78. package/dist/command.mjs.map +1 -1
  79. package/dist/context-menu.d.mts +2 -2
  80. package/dist/context-menu.d.ts +2 -2
  81. package/dist/context-menu.js +169 -1
  82. package/dist/context-menu.js.map +1 -1
  83. package/dist/context-menu.mjs +169 -1
  84. package/dist/context-menu.mjs.map +1 -1
  85. package/dist/dialog.d.mts +1 -3
  86. package/dist/dialog.d.ts +1 -3
  87. package/dist/dialog.js +22 -1
  88. package/dist/dialog.mjs +22 -1
  89. package/dist/drawer.d.mts +1 -3
  90. package/dist/drawer.d.ts +1 -3
  91. package/dist/drawer.js +97 -1
  92. package/dist/drawer.js.map +1 -1
  93. package/dist/drawer.mjs +97 -1
  94. package/dist/drawer.mjs.map +1 -1
  95. package/dist/dropdown-menu.d.mts +1 -2
  96. package/dist/dropdown-menu.d.ts +1 -2
  97. package/dist/dropdown-menu.js +157 -1
  98. package/dist/dropdown-menu.js.map +1 -1
  99. package/dist/dropdown-menu.mjs +157 -1
  100. package/dist/dropdown-menu.mjs.map +1 -1
  101. package/dist/form.js +117 -1
  102. package/dist/form.js.map +1 -1
  103. package/dist/form.mjs +117 -1
  104. package/dist/form.mjs.map +1 -1
  105. package/dist/hover-card.js +30 -1
  106. package/dist/hover-card.js.map +1 -1
  107. package/dist/hover-card.mjs +30 -1
  108. package/dist/hover-card.mjs.map +1 -1
  109. package/dist/input-otp.js +59 -1
  110. package/dist/input-otp.js.map +1 -1
  111. package/dist/input-otp.mjs +59 -1
  112. package/dist/input-otp.mjs.map +1 -1
  113. package/dist/input.js +25 -1
  114. package/dist/input.js.map +1 -1
  115. package/dist/input.mjs +25 -1
  116. package/dist/input.mjs.map +1 -1
  117. package/dist/label.js +8 -1
  118. package/dist/label.mjs +8 -1
  119. package/dist/menubar.d.mts +1 -2
  120. package/dist/menubar.d.ts +1 -2
  121. package/dist/menubar.js +188 -1
  122. package/dist/menubar.js.map +1 -1
  123. package/dist/menubar.mjs +188 -1
  124. package/dist/menubar.mjs.map +1 -1
  125. package/dist/navigation-menu.js +124 -1
  126. package/dist/navigation-menu.js.map +1 -1
  127. package/dist/navigation-menu.mjs +124 -1
  128. package/dist/navigation-menu.mjs.map +1 -1
  129. package/dist/pagination.js +123 -1
  130. package/dist/pagination.js.map +1 -1
  131. package/dist/pagination.mjs +123 -1
  132. package/dist/pagination.mjs.map +1 -1
  133. package/dist/popover.d.mts +2 -1
  134. package/dist/popover.d.ts +2 -1
  135. package/dist/popover.js +42 -1
  136. package/dist/popover.js.map +1 -1
  137. package/dist/popover.mjs +42 -1
  138. package/dist/popover.mjs.map +1 -1
  139. package/dist/progress.js +33 -1
  140. package/dist/progress.js.map +1 -1
  141. package/dist/progress.mjs +33 -1
  142. package/dist/progress.mjs.map +1 -1
  143. package/dist/radio-group.js +46 -1
  144. package/dist/radio-group.js.map +1 -1
  145. package/dist/radio-group.mjs +46 -1
  146. package/dist/radio-group.mjs.map +1 -1
  147. package/dist/resizable.js +47 -1
  148. package/dist/resizable.js.map +1 -1
  149. package/dist/resizable.mjs +47 -1
  150. package/dist/resizable.mjs.map +1 -1
  151. package/dist/scroll-area.js +44 -1
  152. package/dist/scroll-area.js.map +1 -1
  153. package/dist/scroll-area.mjs +44 -1
  154. package/dist/scroll-area.mjs.map +1 -1
  155. package/dist/select.js +134 -1
  156. package/dist/select.js.map +1 -1
  157. package/dist/select.mjs +134 -1
  158. package/dist/select.mjs.map +1 -1
  159. package/dist/separator.js +29 -1
  160. package/dist/separator.js.map +1 -1
  161. package/dist/separator.mjs +29 -1
  162. package/dist/separator.mjs.map +1 -1
  163. package/dist/sheet.d.mts +1 -3
  164. package/dist/sheet.d.ts +1 -3
  165. package/dist/sheet.js +121 -1
  166. package/dist/sheet.js.map +1 -1
  167. package/dist/sheet.mjs +121 -1
  168. package/dist/sheet.mjs.map +1 -1
  169. package/dist/skeleton.js +21 -1
  170. package/dist/skeleton.js.map +1 -1
  171. package/dist/skeleton.mjs +21 -1
  172. package/dist/skeleton.mjs.map +1 -1
  173. package/dist/slider.js +28 -1
  174. package/dist/slider.js.map +1 -1
  175. package/dist/slider.mjs +28 -1
  176. package/dist/slider.mjs.map +1 -1
  177. package/dist/sonner.js +34 -1
  178. package/dist/sonner.js.map +1 -1
  179. package/dist/sonner.mjs +34 -1
  180. package/dist/sonner.mjs.map +1 -1
  181. package/dist/styles.css +1 -1
  182. package/dist/styles.css.map +1 -1
  183. package/dist/switch.js +25 -1
  184. package/dist/switch.js.map +1 -1
  185. package/dist/switch.mjs +25 -1
  186. package/dist/switch.mjs.map +1 -1
  187. package/dist/table.js +94 -1
  188. package/dist/table.js.map +1 -1
  189. package/dist/table.mjs +94 -1
  190. package/dist/table.mjs.map +1 -1
  191. package/dist/tabs.js +52 -1
  192. package/dist/tabs.js.map +1 -1
  193. package/dist/tabs.mjs +52 -1
  194. package/dist/tabs.mjs.map +1 -1
  195. package/dist/textarea.js +24 -1
  196. package/dist/textarea.js.map +1 -1
  197. package/dist/textarea.mjs +24 -1
  198. package/dist/textarea.mjs.map +1 -1
  199. package/dist/toggle-group.js +49 -1
  200. package/dist/toggle-group.js.map +1 -1
  201. package/dist/toggle-group.mjs +49 -1
  202. package/dist/toggle-group.mjs.map +1 -1
  203. package/dist/toggle.d.mts +1 -1
  204. package/dist/toggle.d.ts +1 -1
  205. package/dist/toggle.js +10 -1
  206. package/dist/toggle.mjs +10 -1
  207. package/dist/tooltip.d.mts +2 -3
  208. package/dist/tooltip.d.ts +2 -3
  209. package/dist/tooltip.js +41 -1
  210. package/dist/tooltip.js.map +1 -1
  211. package/dist/tooltip.mjs +41 -1
  212. package/dist/tooltip.mjs.map +1 -1
  213. package/dist/utils.js +10 -1
  214. package/dist/utils.mjs +10 -1
  215. package/package.json +6 -6
  216. package/src/accordion.tsx +2 -6
  217. package/src/alert-dialog.tsx +4 -35
  218. package/src/alert.tsx +1 -1
  219. package/src/avatar.tsx +1 -1
  220. package/src/badge.tsx +1 -1
  221. package/src/breadcrumb.tsx +1 -1
  222. package/src/button.tsx +5 -5
  223. package/src/calendar.tsx +6 -7
  224. package/src/card.tsx +1 -1
  225. package/src/checkbox.tsx +1 -2
  226. package/src/command.tsx +6 -17
  227. package/src/context-menu.tsx +32 -44
  228. package/src/dialog.tsx +9 -37
  229. package/src/drawer.tsx +3 -27
  230. package/src/dropdown-menu.tsx +15 -44
  231. package/src/form.tsx +0 -1
  232. package/src/hover-card.tsx +12 -20
  233. package/src/input-otp.tsx +2 -2
  234. package/src/input.tsx +1 -1
  235. package/src/menubar.tsx +17 -42
  236. package/src/navigation-menu.tsx +6 -19
  237. package/src/pagination.tsx +2 -4
  238. package/src/popover.tsx +18 -12
  239. package/src/progress.tsx +3 -1
  240. package/src/radio-group.tsx +6 -4
  241. package/src/resizable.tsx +2 -5
  242. package/src/select.tsx +13 -22
  243. package/src/sheet.tsx +15 -59
  244. package/src/slider.tsx +1 -1
  245. package/src/sonner.tsx +4 -2
  246. package/src/switch.tsx +2 -8
  247. package/src/table.tsx +2 -2
  248. package/src/tabs.tsx +3 -4
  249. package/src/textarea.tsx +1 -1
  250. package/src/toggle.tsx +4 -7
  251. package/src/tooltip.tsx +23 -34
  252. package/dist/chunk-4ZL55G6C.js +0 -2
  253. package/dist/chunk-4ZL55G6C.js.map +0 -1
  254. package/dist/chunk-76AASLTX.mjs +0 -2
  255. package/dist/chunk-7UVSBFQU.js +0 -2
  256. package/dist/chunk-7UVSBFQU.js.map +0 -1
  257. package/dist/chunk-BP7PEVLB.js +0 -2
  258. package/dist/chunk-BP7PEVLB.js.map +0 -1
  259. package/dist/chunk-BPCLLQ62.mjs +0 -2
  260. package/dist/chunk-BPCLLQ62.mjs.map +0 -1
  261. package/dist/chunk-CAGY2ZSE.js +0 -2
  262. package/dist/chunk-CAGY2ZSE.js.map +0 -1
  263. package/dist/chunk-JTI7KCLO.mjs +0 -2
  264. package/dist/chunk-JTI7KCLO.mjs.map +0 -1
  265. package/dist/chunk-QZCQ42BP.js +0 -2
  266. package/dist/chunk-QZCQ42BP.js.map +0 -1
  267. package/dist/chunk-WZ4XIF6U.mjs +0 -2
  268. package/dist/chunk-WZ4XIF6U.mjs.map +0 -1
  269. package/dist/chunk-YQJHVJVX.mjs +0 -2
  270. package/dist/chunk-YQJHVJVX.mjs.map +0 -1
package/dist/drawer.mjs CHANGED
@@ -1,2 +1,98 @@
1
- "use client";import{b as i}from"./chunk-JTI7KCLO.mjs";import*as n from"react";import{Drawer as r}from"vaul";import{jsx as a,jsxs as l}from"react/jsx-runtime";function w({shouldScaleBackground:e=!0,...t}){return a(r.Root,{shouldScaleBackground:e,...t})}var u=r.Trigger,s=r.Portal,v=r.Close,m=n.forwardRef(({className:e,...t},o)=>a(r.Overlay,{ref:o,className:i("fixed inset-0 z-50 bg-black/80",e),...t}));m.displayName=r.Overlay.displayName;var f=n.forwardRef(({className:e,children:t,...o},c)=>l(s,{children:[a(m,{}),l(r.Content,{ref:c,className:i("bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border",e),...o,children:[a("div",{className:"bg-muted mx-auto mt-4 h-2 w-[100px] rounded-full"}),t]})]}));f.displayName="DrawerContent";function y({className:e,...t}){return a("div",{className:i("grid gap-1.5 p-4 text-center sm:text-left",e),...t})}function P({className:e,...t}){return a("div",{className:i("mt-auto flex flex-col gap-2 p-4",e),...t})}var p=n.forwardRef(({className:e,...t},o)=>a(r.Title,{ref:o,className:i("text-lg font-semibold leading-none tracking-tight",e),...t}));p.displayName=r.Title.displayName;var R=n.forwardRef(({className:e,...t},o)=>a(r.Description,{ref:o,className:i("text-muted-foreground text-sm",e),...t}));R.displayName=r.Description.displayName;export{w as Drawer,v as DrawerClose,f as DrawerContent,R as DrawerDescription,P as DrawerFooter,y as DrawerHeader,m as DrawerOverlay,s as DrawerPortal,p as DrawerTitle,u as DrawerTrigger};
1
+ "use client";
2
+ import {
3
+ cn
4
+ } from "./chunk-UG3URV2Z.mjs";
5
+
6
+ // src/drawer.tsx
7
+ import * as React from "react";
8
+ import { Drawer as DrawerPrimitive } from "vaul";
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+ function Drawer({
11
+ shouldScaleBackground = true,
12
+ ...props
13
+ }) {
14
+ return /* @__PURE__ */ jsx(
15
+ DrawerPrimitive.Root,
16
+ {
17
+ shouldScaleBackground,
18
+ ...props
19
+ }
20
+ );
21
+ }
22
+ var DrawerTrigger = DrawerPrimitive.Trigger;
23
+ var DrawerClose = DrawerPrimitive.Close;
24
+ var DrawerContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DrawerPrimitive.Portal, { children: [
25
+ /* @__PURE__ */ jsx(DrawerPrimitive.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
26
+ /* @__PURE__ */ jsxs(
27
+ DrawerPrimitive.Content,
28
+ {
29
+ ref,
30
+ className: cn(
31
+ "bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border",
32
+ className
33
+ ),
34
+ ...props,
35
+ children: [
36
+ /* @__PURE__ */ jsx("div", { className: "bg-muted mx-auto mt-4 h-2 w-[100px] rounded-full" }),
37
+ children
38
+ ]
39
+ }
40
+ )
41
+ ] }));
42
+ DrawerContent.displayName = "DrawerContent";
43
+ function DrawerHeader({
44
+ className,
45
+ ...props
46
+ }) {
47
+ return /* @__PURE__ */ jsx(
48
+ "div",
49
+ {
50
+ className: cn("grid gap-1.5 p-4 text-center sm:text-left", className),
51
+ ...props
52
+ }
53
+ );
54
+ }
55
+ function DrawerFooter({
56
+ className,
57
+ ...props
58
+ }) {
59
+ return /* @__PURE__ */ jsx(
60
+ "div",
61
+ {
62
+ className: cn("mt-auto flex flex-col gap-2 p-4", className),
63
+ ...props
64
+ }
65
+ );
66
+ }
67
+ var DrawerTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
68
+ DrawerPrimitive.Title,
69
+ {
70
+ ref,
71
+ className: cn(
72
+ "text-lg font-semibold leading-none tracking-tight",
73
+ className
74
+ ),
75
+ ...props
76
+ }
77
+ ));
78
+ DrawerTitle.displayName = DrawerPrimitive.Title.displayName;
79
+ var DrawerDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
80
+ DrawerPrimitive.Description,
81
+ {
82
+ ref,
83
+ className: cn("text-muted-foreground text-sm", className),
84
+ ...props
85
+ }
86
+ ));
87
+ DrawerDescription.displayName = DrawerPrimitive.Description.displayName;
88
+ export {
89
+ Drawer,
90
+ DrawerClose,
91
+ DrawerContent,
92
+ DrawerDescription,
93
+ DrawerFooter,
94
+ DrawerHeader,
95
+ DrawerTitle,
96
+ DrawerTrigger
97
+ };
2
98
  //# sourceMappingURL=drawer.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/drawer.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Drawer as DrawerPrimitive } from \"vaul\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Drawer\n * -------------------------------------------------------------------------- */\n\nfunction Drawer({\n shouldScaleBackground = true,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root>): React.JSX.Element {\n return (\n <DrawerPrimitive.Root\n shouldScaleBackground={shouldScaleBackground}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTrigger\n * -------------------------------------------------------------------------- */\n\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerPortal\n * -------------------------------------------------------------------------- */\n\nconst DrawerPortal = DrawerPrimitive.Portal;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerClose\n * -------------------------------------------------------------------------- */\n\nconst DrawerClose = DrawerPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerOverlay\n * -------------------------------------------------------------------------- */\n\nconst DrawerOverlay = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Overlay\n ref={ref}\n className={cn(\"fixed inset-0 z-50 bg-black/80\", className)}\n {...props}\n />\n));\nDrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerContent\n * -------------------------------------------------------------------------- */\n\nconst DrawerContent = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DrawerPortal>\n <DrawerOverlay />\n <DrawerPrimitive.Content\n ref={ref}\n className={cn(\n \"bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border\",\n className,\n )}\n {...props}\n >\n <div className=\"bg-muted mx-auto mt-4 h-2 w-[100px] rounded-full\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n));\nDrawerContent.displayName = \"DrawerContent\";\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerHeader\n * -------------------------------------------------------------------------- */\n\nfunction DrawerHeader({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element {\n return (\n <div\n className={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerFooter\n * -------------------------------------------------------------------------- */\n\nfunction DrawerFooter({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element {\n return (\n <div\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTitle\n * -------------------------------------------------------------------------- */\n\nconst DrawerTitle = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className,\n )}\n {...props}\n />\n));\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerDescription\n * -------------------------------------------------------------------------- */\n\nconst DrawerDescription = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Description\n ref={ref}\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n));\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n};\n"],"mappings":"sDAEA,UAAYA,MAAW,QACvB,OAAS,UAAUC,MAAuB,OAYtC,cAAAC,EAmDA,QAAAC,MAnDA,oBALJ,SAASC,EAAO,CACd,sBAAAC,EAAwB,GACxB,GAAGC,CACL,EAAyE,CACvE,OACEJ,EAACK,EAAgB,KAAhB,CACC,sBAAuBF,EACtB,GAAGC,EACN,CAEJ,CAMA,IAAME,EAAgBD,EAAgB,QAMhCE,EAAeF,EAAgB,OAM/BG,EAAcH,EAAgB,MAM9BI,EAAsB,aAG1B,CAAC,CAAE,UAAAC,EAAW,GAAGN,CAAM,EAAGO,IAC1BX,EAACK,EAAgB,QAAhB,CACC,IAAKM,EACL,UAAWC,EAAG,iCAAkCF,CAAS,EACxD,GAAGN,EACN,CACD,EACDK,EAAc,YAAcJ,EAAgB,QAAQ,YAMpD,IAAMQ,EAAsB,aAG1B,CAAC,CAAE,UAAAH,EAAW,SAAAI,EAAU,GAAGV,CAAM,EAAGO,IACpCV,EAACM,EAAA,CACC,UAAAP,EAACS,EAAA,EAAc,EACfR,EAACI,EAAgB,QAAhB,CACC,IAAKM,EACL,UAAWC,EACT,iGACAF,CACF,EACC,GAAGN,EAEJ,UAAAJ,EAAC,OAAI,UAAU,mDAAmD,EACjEc,GACH,GACF,CACD,EACDD,EAAc,YAAc,gBAM5B,SAASE,EAAa,CACpB,UAAAL,EACA,GAAGN,CACL,EAA4D,CAC1D,OACEJ,EAAC,OACC,UAAWY,EAAG,4CAA6CF,CAAS,EACnE,GAAGN,EACN,CAEJ,CAMA,SAASY,EAAa,CACpB,UAAAN,EACA,GAAGN,CACL,EAA4D,CAC1D,OACEJ,EAAC,OACC,UAAWY,EAAG,kCAAmCF,CAAS,EACzD,GAAGN,EACN,CAEJ,CAMA,IAAMa,EAAoB,aAGxB,CAAC,CAAE,UAAAP,EAAW,GAAGN,CAAM,EAAGO,IAC1BX,EAACK,EAAgB,MAAhB,CACC,IAAKM,EACL,UAAWC,EACT,oDACAF,CACF,EACC,GAAGN,EACN,CACD,EACDa,EAAY,YAAcZ,EAAgB,MAAM,YAMhD,IAAMa,EAA0B,aAG9B,CAAC,CAAE,UAAAR,EAAW,GAAGN,CAAM,EAAGO,IAC1BX,EAACK,EAAgB,YAAhB,CACC,IAAKM,EACL,UAAWC,EAAG,gCAAiCF,CAAS,EACvD,GAAGN,EACN,CACD,EACDc,EAAkB,YAAcb,EAAgB,YAAY","names":["React","DrawerPrimitive","jsx","jsxs","Drawer","shouldScaleBackground","props","DrawerPrimitive","DrawerTrigger","DrawerPortal","DrawerClose","DrawerOverlay","className","ref","cn","DrawerContent","children","DrawerHeader","DrawerFooter","DrawerTitle","DrawerDescription"]}
1
+ {"version":3,"sources":["../src/drawer.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Drawer as DrawerPrimitive } from \"vaul\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: Drawer\n * -------------------------------------------------------------------------- */\n\nfunction Drawer({\n shouldScaleBackground = true,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root>): React.JSX.Element {\n return (\n <DrawerPrimitive.Root\n shouldScaleBackground={shouldScaleBackground}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTrigger\n * -------------------------------------------------------------------------- */\n\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerClose\n * -------------------------------------------------------------------------- */\n\nconst DrawerClose = DrawerPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerContent\n * -------------------------------------------------------------------------- */\n\nconst DrawerContent = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className=\"fixed inset-0 z-50 bg-black/80\" />\n <DrawerPrimitive.Content\n ref={ref}\n className={cn(\n \"bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border\",\n className,\n )}\n {...props}\n >\n <div className=\"bg-muted mx-auto mt-4 h-2 w-[100px] rounded-full\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n));\nDrawerContent.displayName = \"DrawerContent\";\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerHeader\n * -------------------------------------------------------------------------- */\n\nfunction DrawerHeader({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element {\n return (\n <div\n className={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerFooter\n * -------------------------------------------------------------------------- */\n\nfunction DrawerFooter({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element {\n return (\n <div\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTitle\n * -------------------------------------------------------------------------- */\n\nconst DrawerTitle = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className,\n )}\n {...props}\n />\n));\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerDescription\n * -------------------------------------------------------------------------- */\n\nconst DrawerDescription = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Description\n ref={ref}\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n));\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Drawer,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n};\n"],"mappings":";;;;;;AAEA,YAAY,WAAW;AACvB,SAAS,UAAU,uBAAuB;AAYtC,cA6BA,YA7BA;AALJ,SAAS,OAAO;AAAA,EACd,wBAAwB;AAAA,EACxB,GAAG;AACL,GAAyE;AACvE,SACE;AAAA,IAAC,gBAAgB;AAAA,IAAhB;AAAA,MACC;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAMA,IAAM,gBAAgB,gBAAgB;AAMtC,IAAM,cAAc,gBAAgB;AAMpC,IAAM,gBAAsB,iBAG1B,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QACpC,qBAAC,gBAAgB,QAAhB,EACC;AAAA,sBAAC,gBAAgB,SAAhB,EAAwB,WAAU,kCAAiC;AAAA,EACpE;AAAA,IAAC,gBAAgB;AAAA,IAAhB;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEJ;AAAA,4BAAC,SAAI,WAAU,oDAAmD;AAAA,QACjE;AAAA;AAAA;AAAA,EACH;AAAA,GACF,CACD;AACD,cAAc,cAAc;AAM5B,SAAS,aAAa;AAAA,EACpB;AAAA,EACA,GAAG;AACL,GAA4D;AAC1D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,GAAG,6CAA6C,SAAS;AAAA,MACnE,GAAG;AAAA;AAAA,EACN;AAEJ;AAMA,SAAS,aAAa;AAAA,EACpB;AAAA,EACA,GAAG;AACL,GAA4D;AAC1D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,GAAG,mCAAmC,SAAS;AAAA,MACzD,GAAG;AAAA;AAAA,EACN;AAEJ;AAMA,IAAM,cAAoB,iBAGxB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC,gBAAgB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,YAAY,cAAc,gBAAgB,MAAM;AAMhD,IAAM,oBAA0B,iBAG9B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC,gBAAgB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,iCAAiC,SAAS;AAAA,IACvD,GAAG;AAAA;AACN,CACD;AACD,kBAAkB,cAAc,gBAAgB,YAAY;","names":[]}
@@ -4,7 +4,6 @@ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
4
4
  declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
5
5
  declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
6
6
  declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
7
- declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
8
7
  declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
9
8
  declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
10
9
  declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & {
@@ -23,4 +22,4 @@ declare const DropdownMenuLabel: React.ForwardRefExoticComponent<DropdownMenuPri
23
22
  declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>>;
24
23
  declare function DropdownMenuShortcut({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
25
24
 
26
- export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
25
+ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
@@ -4,7 +4,6 @@ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
4
4
  declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
5
5
  declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
6
6
  declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
7
- declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
8
7
  declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
9
8
  declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
10
9
  declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & {
@@ -23,4 +22,4 @@ declare const DropdownMenuLabel: React.ForwardRefExoticComponent<DropdownMenuPri
23
22
  declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>>;
24
23
  declare function DropdownMenuShortcut({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
25
24
 
26
- export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
25
+ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
@@ -1,2 +1,158 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var _chunkQZCQ42BPjs = require('./chunk-QZCQ42BP.js');var _react = require('react'); var d = _interopRequireWildcard(_react);var _reactdropdownmenu = require('@radix-ui/react-dropdown-menu'); var e = _interopRequireWildcard(_reactdropdownmenu);var _reacticons = require('@radix-ui/react-icons');var _jsxruntime = require('react/jsx-runtime');var y=e.Root,N= exports.DropdownMenuTrigger =e.Trigger,x= exports.DropdownMenuGroup =e.Group,I= exports.DropdownMenuPortal =e.Portal,h= exports.DropdownMenuSub =e.Sub,S= exports.DropdownMenuRadioGroup =e.RadioGroup,c= exports.DropdownMenuSubTrigger =d.forwardRef(({className:t,inset:o,children:n,...i},s)=>_jsxruntime.jsxs.call(void 0, e.SubTrigger,{ref:s,className:_chunkQZCQ42BPjs.b.call(void 0, "focus:bg-accent flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none","data-[state=open]:bg-accent",o&&"pl-8",t),...i,children:[n,_jsxruntime.jsx.call(void 0, _reacticons.ChevronRightIcon,{className:"ml-auto size-4"})]}));c.displayName=e.SubTrigger.displayName;var f=d.forwardRef(({className:t,...o},n)=>_jsxruntime.jsx.call(void 0, e.SubContent,{ref:n,className:_chunkQZCQ42BPjs.b.call(void 0, "bg-popover text-popover-foreground z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg","data-[state=open]:animate-in data-[state=open]:fade-in-0 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-0 data-[state=closed]:zoom-out-95","data-[state=closed]:data-[side=top]:slide-out-to-bottom-2","data-[state=closed]:data-[side=right]:slide-out-to-left-2","data-[state=closed]:data-[side=bottom]:slide-out-to-top-2","data-[state=closed]:data-[side=left]:slide-out-to-right-2",t),...o}));f.displayName=e.SubContent.displayName;var w=d.forwardRef(({className:t,sideOffset:o=4,...n},i)=>_jsxruntime.jsx.call(void 0, e.Portal,{children:_jsxruntime.jsx.call(void 0, e.Content,{ref:i,sideOffset:o,className:_chunkQZCQ42BPjs.b.call(void 0, "bg-popover text-popover-foreground z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md","data-[state=open]:animate-in data-[state=open]:fade-in-0 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-0 data-[state=closed]:zoom-out-95","data-[state=closed]:data-[side=top]:slide-out-to-bottom-2","data-[state=closed]:data-[side=right]:slide-out-to-left-2","data-[state=closed]:data-[side=bottom]:slide-out-to-top-2","data-[state=closed]:data-[side=left]:slide-out-to-right-2",t),...n})}));w.displayName=e.Content.displayName;var M=d.forwardRef(({className:t,inset:o,...n},i)=>_jsxruntime.jsx.call(void 0, e.Item,{ref:i,className:_chunkQZCQ42BPjs.b.call(void 0, "focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors","aria-disabled:pointer-events-none aria-disabled:opacity-50",o&&"pl-8",t),...n}));M.displayName=e.Item.displayName;var D=d.forwardRef(({className:t,children:o,checked:n,...i},s)=>_jsxruntime.jsxs.call(void 0, e.CheckboxItem,{ref:s,className:_chunkQZCQ42BPjs.b.call(void 0, "focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors","aria-disabled:pointer-events-none aria-disabled:opacity-50",t),checked:n,...i,children:[_jsxruntime.jsx.call(void 0, "span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:_jsxruntime.jsx.call(void 0, e.ItemIndicator,{children:_jsxruntime.jsx.call(void 0, _reacticons.CheckIcon,{className:"size-4"})})}),o]}));D.displayName=e.CheckboxItem.displayName;var v=d.forwardRef(({className:t,children:o,...n},i)=>_jsxruntime.jsxs.call(void 0, e.RadioItem,{ref:i,className:_chunkQZCQ42BPjs.b.call(void 0, "focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors","aria-disabled:pointer-events-none aria-disabled:opacity-50",t),...n,children:[_jsxruntime.jsx.call(void 0, "span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:_jsxruntime.jsx.call(void 0, e.ItemIndicator,{children:_jsxruntime.jsx.call(void 0, _reacticons.DotFilledIcon,{className:"size-4 fill-current"})})}),o]}));v.displayName=e.RadioItem.displayName;var P=d.forwardRef(({className:t,inset:o,...n},i)=>_jsxruntime.jsx.call(void 0, e.Label,{ref:i,className:_chunkQZCQ42BPjs.b.call(void 0, "px-2 py-1.5 text-sm font-semibold",o&&"pl-8",t),...n}));P.displayName=e.Label.displayName;var b=d.forwardRef(({className:t,...o},n)=>_jsxruntime.jsx.call(void 0, e.Separator,{ref:n,className:_chunkQZCQ42BPjs.b.call(void 0, "bg-muted -mx-1 my-1 h-px",t),...o}));b.displayName=e.Separator.displayName;function C({className:t,...o}){return _jsxruntime.jsx.call(void 0, "span",{className:_chunkQZCQ42BPjs.b.call(void 0, "ml-auto text-xs tracking-widest opacity-60",t),...o})}exports.DropdownMenu = y; exports.DropdownMenuCheckboxItem = D; exports.DropdownMenuContent = w; exports.DropdownMenuGroup = x; exports.DropdownMenuItem = M; exports.DropdownMenuLabel = P; exports.DropdownMenuPortal = I; exports.DropdownMenuRadioGroup = S; exports.DropdownMenuRadioItem = v; exports.DropdownMenuSeparator = b; exports.DropdownMenuShortcut = C; exports.DropdownMenuSub = h; exports.DropdownMenuSubContent = f; exports.DropdownMenuSubTrigger = c; exports.DropdownMenuTrigger = N;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";
2
+
3
+
4
+ var _chunkG3NP7M2Njs = require('./chunk-G3NP7M2N.js');
5
+
6
+ // src/dropdown-menu.tsx
7
+ var _react = require('react'); var React = _interopRequireWildcard(_react);
8
+ var _reactdropdownmenu = require('@radix-ui/react-dropdown-menu'); var DropdownMenuPrimitive = _interopRequireWildcard(_reactdropdownmenu);
9
+
10
+
11
+
12
+
13
+ var _reacticons = require('@radix-ui/react-icons');
14
+ var _jsxruntime = require('react/jsx-runtime');
15
+ var DropdownMenu = DropdownMenuPrimitive.Root;
16
+ var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
17
+ var DropdownMenuGroup = DropdownMenuPrimitive.Group;
18
+ var DropdownMenuSub = DropdownMenuPrimitive.Sub;
19
+ var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
20
+ var DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
21
+ DropdownMenuPrimitive.SubTrigger,
22
+ {
23
+ ref,
24
+ className: _chunkG3NP7M2Njs.cn.call(void 0,
25
+ "focus:bg-accent data-[state=open]:bg-accent flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none",
26
+ inset && "pl-8",
27
+ className
28
+ ),
29
+ ...props,
30
+ children: [
31
+ children,
32
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reacticons.ChevronRightIcon, { className: "ml-auto size-4" })
33
+ ]
34
+ }
35
+ ));
36
+ DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
37
+ var DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
38
+ DropdownMenuPrimitive.SubContent,
39
+ {
40
+ ref,
41
+ className: _chunkG3NP7M2Njs.cn.call(void 0,
42
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 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-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-[8rem] rounded-md border p-1 shadow-md focus:outline-none",
43
+ className
44
+ ),
45
+ ...props
46
+ }
47
+ ) }));
48
+ DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
49
+ var DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
50
+ DropdownMenuPrimitive.Content,
51
+ {
52
+ ref,
53
+ sideOffset,
54
+ className: _chunkG3NP7M2Njs.cn.call(void 0,
55
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 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-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-[8rem] rounded-md border p-1 shadow-md focus:outline-none",
56
+ className
57
+ ),
58
+ ...props
59
+ }
60
+ ) }));
61
+ DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
62
+ var DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
63
+ DropdownMenuPrimitive.Item,
64
+ {
65
+ ref,
66
+ className: _chunkG3NP7M2Njs.cn.call(void 0,
67
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm transition-colors focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50",
68
+ inset && "pl-8",
69
+ className
70
+ ),
71
+ ...props
72
+ }
73
+ ));
74
+ DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
75
+ var DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
76
+ DropdownMenuPrimitive.CheckboxItem,
77
+ {
78
+ ref,
79
+ className: _chunkG3NP7M2Njs.cn.call(void 0,
80
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm transition-colors focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50",
81
+ className
82
+ ),
83
+ checked,
84
+ ...props,
85
+ children: [
86
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reacticons.CheckIcon, { className: "size-4" }) }) }),
87
+ children
88
+ ]
89
+ }
90
+ ));
91
+ DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
92
+ var DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
93
+ DropdownMenuPrimitive.RadioItem,
94
+ {
95
+ ref,
96
+ className: _chunkG3NP7M2Njs.cn.call(void 0,
97
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm transition-colors focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50",
98
+ className
99
+ ),
100
+ ...props,
101
+ children: [
102
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reacticons.DotFilledIcon, { className: "size-4 fill-current" }) }) }),
103
+ children
104
+ ]
105
+ }
106
+ ));
107
+ DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
108
+ var DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
109
+ DropdownMenuPrimitive.Label,
110
+ {
111
+ ref,
112
+ className: _chunkG3NP7M2Njs.cn.call(void 0,
113
+ "px-2 py-1.5 text-sm font-semibold",
114
+ inset && "pl-8",
115
+ className
116
+ ),
117
+ ...props
118
+ }
119
+ ));
120
+ DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
121
+ var DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
122
+ DropdownMenuPrimitive.Separator,
123
+ {
124
+ ref,
125
+ className: _chunkG3NP7M2Njs.cn.call(void 0, "bg-muted -mx-1 my-1 h-px", className),
126
+ ...props
127
+ }
128
+ ));
129
+ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
130
+ function DropdownMenuShortcut({
131
+ className,
132
+ ...props
133
+ }) {
134
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
135
+ "span",
136
+ {
137
+ className: _chunkG3NP7M2Njs.cn.call(void 0, "ml-auto text-xs tracking-widest opacity-60", className),
138
+ ...props
139
+ }
140
+ );
141
+ }
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+ exports.DropdownMenu = DropdownMenu; exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem; exports.DropdownMenuContent = DropdownMenuContent; exports.DropdownMenuGroup = DropdownMenuGroup; exports.DropdownMenuItem = DropdownMenuItem; exports.DropdownMenuLabel = DropdownMenuLabel; exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup; exports.DropdownMenuRadioItem = DropdownMenuRadioItem; exports.DropdownMenuSeparator = DropdownMenuSeparator; exports.DropdownMenuShortcut = DropdownMenuShortcut; exports.DropdownMenuSub = DropdownMenuSub; exports.DropdownMenuSubContent = DropdownMenuSubContent; exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger; exports.DropdownMenuTrigger = DropdownMenuTrigger;
2
158
  //# sourceMappingURL=dropdown-menu.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/dropdown-menu.tsx"],"names":["React","DropdownMenuPrimitive","CheckIcon","ChevronRightIcon","DotFilledIcon","jsx","jsxs","DropdownMenu","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuPortal","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","className","inset","children","props","ref","cn","DropdownMenuSubContent","DropdownMenuContent","sideOffset","DropdownMenuItem","DropdownMenuCheckboxItem","checked","DropdownMenuRadioItem","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut"],"mappings":"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","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport {\n CheckIcon,\n ChevronRightIcon,\n DotFilledIcon,\n} from \"@radix-ui/react-icons\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenu\n * -------------------------------------------------------------------------- */\n\nconst DropdownMenu = DropdownMenuPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuTrigger\n * -------------------------------------------------------------------------- */\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuGroup\n * -------------------------------------------------------------------------- */\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuPortal\n * -------------------------------------------------------------------------- */\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSub\n * -------------------------------------------------------------------------- */\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n DropdownMenuPrimitive.DropdownMenuSubTriggerProps & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"focus:bg-accent flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none\",\n \"data-[state=open]:bg-accent\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName =\n DropdownMenuPrimitive.SubTrigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSubContent\n * -------------------------------------------------------------------------- */\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n DropdownMenuPrimitive.DropdownMenuSubContentProps\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"bg-popover text-popover-foreground z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg\",\n \"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n \"data-[state=open]:data-[side=top]:slide-in-from-bottom-2\",\n \"data-[state=open]:data-[side=right]:slide-in-from-left-2\",\n \"data-[state=open]:data-[side=bottom]:slide-in-from-top-2\",\n \"data-[state=open]:data-[side=left]:slide-in-from-right-2\",\n \"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95\",\n \"data-[state=closed]:data-[side=top]:slide-out-to-bottom-2\",\n \"data-[state=closed]:data-[side=right]:slide-out-to-left-2\",\n \"data-[state=closed]:data-[side=bottom]:slide-out-to-top-2\",\n \"data-[state=closed]:data-[side=left]:slide-out-to-right-2\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuSubContent.displayName =\n DropdownMenuPrimitive.SubContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuContent\n * -------------------------------------------------------------------------- */\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n DropdownMenuPrimitive.DropdownMenuContentProps\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"bg-popover text-popover-foreground z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md\",\n \"data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95\",\n \"data-[state=open]:data-[side=top]:slide-in-from-bottom-2\",\n \"data-[state=open]:data-[side=right]:slide-in-from-left-2\",\n \"data-[state=open]:data-[side=bottom]:slide-in-from-top-2\",\n \"data-[state=open]:data-[side=left]:slide-in-from-right-2\",\n \"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95\",\n \"data-[state=closed]:data-[side=top]:slide-out-to-bottom-2\",\n \"data-[state=closed]:data-[side=right]:slide-out-to-left-2\",\n \"data-[state=closed]:data-[side=bottom]:slide-out-to-top-2\",\n \"data-[state=closed]:data-[side=left]:slide-out-to-right-2\",\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuItem\n * -------------------------------------------------------------------------- */\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n DropdownMenuPrimitive.DropdownMenuItemProps & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors\",\n \"aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuCheckboxItem\n * -------------------------------------------------------------------------- */\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n DropdownMenuPrimitive.DropdownMenuCheckboxItemProps\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors\",\n \"aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuRadioItem\n * -------------------------------------------------------------------------- */\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n DropdownMenuPrimitive.DropdownMenuRadioItemProps\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors\",\n \"aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <DotFilledIcon className=\"size-4 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuLabel\n * -------------------------------------------------------------------------- */\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n DropdownMenuPrimitive.DropdownMenuLabelProps & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-sm font-semibold\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSeparator\n * -------------------------------------------------------------------------- */\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n DropdownMenuPrimitive.DropdownMenuSeparatorProps\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"bg-muted -mx-1 my-1 h-px\", className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuShortcut\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenuShortcut({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element {\n return (\n <span\n className={cn(\"ml-auto text-xs tracking-widest opacity-60\", className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n};\n"]}
1
+ {"version":3,"sources":["../src/dropdown-menu.tsx"],"names":[],"mappings":";;;;;;AAEA,YAAY,WAAW;AACvB,YAAY,2BAA2B;AACvC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AA2CL,SAUE,KAVF;AApCF,IAAM,eAAqC;AAM3C,IAAM,sBAA4C;AAMlD,IAAM,oBAA0C;AAMhD,IAAM,kBAAwC;AAM9C,IAAM,yBAA+C;AAMrD,IAAM,yBAA+B,iBAKnC,CAAC,EAAE,WAAW,OAAO,UAAU,GAAG,MAAM,GAAG,QAC3C;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA,SAAS;AAAA,MACT;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEH;AAAA;AAAA,MACD,oBAAC,oBAAiB,WAAU,kBAAiB;AAAA;AAAA;AAC/C,CACD;AACD,uBAAuB,cACC,iCAAW;AAMnC,IAAM,yBAA+B,iBAGnC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,oBAAuB,8BAAtB,EACC;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,GACF,CACD;AACD,uBAAuB,cACC,iCAAW;AAMnC,IAAM,sBAA4B,iBAGhC,CAAC,EAAE,WAAW,aAAa,GAAG,GAAG,MAAM,GAAG,QAC1C,oBAAuB,8BAAtB,EACC;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,GACF,CACD;AACD,oBAAoB,cAAoC,8BAAQ;AAMhE,IAAM,mBAAyB,iBAK7B,CAAC,EAAE,WAAW,OAAO,GAAG,MAAM,GAAG,QACjC;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA,SAAS;AAAA,MACT;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,iBAAiB,cAAoC,2BAAK;AAM1D,IAAM,2BAAiC,iBAGrC,CAAC,EAAE,WAAW,UAAU,SAAS,GAAG,MAAM,GAAG,QAC7C;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,IACC,GAAG;AAAA,IAEJ;AAAA,0BAAC,UAAK,WAAU,6DACd,8BAAuB,qCAAtB,EACC,8BAAC,aAAU,WAAU,UAAS,GAChC,GACF;AAAA,MACC;AAAA;AAAA;AACH,CACD;AACD,yBAAyB,cACD,mCAAa;AAMrC,IAAM,wBAA8B,iBAGlC,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QACpC;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEJ;AAAA,0BAAC,UAAK,WAAU,6DACd,8BAAuB,qCAAtB,EACC,8BAAC,iBAAc,WAAU,uBAAsB,GACjD,GACF;AAAA,MACC;AAAA;AAAA;AACH,CACD;AACD,sBAAsB,cAAoC,gCAAU;AAMpE,IAAM,oBAA0B,iBAK9B,CAAC,EAAE,WAAW,OAAO,GAAG,MAAM,GAAG,QACjC;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA,SAAS;AAAA,MACT;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,kBAAkB,cAAoC,4BAAM;AAM5D,IAAM,wBAA8B,iBAGlC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAuB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,4BAA4B,SAAS;AAAA,IAClD,GAAG;AAAA;AACN,CACD;AACD,sBAAsB,cAAoC,gCAAU;AAMpE,SAAS,qBAAqB;AAAA,EAC5B;AAAA,EACA,GAAG;AACL,GAA6D;AAC3D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,GAAG,8CAA8C,SAAS;AAAA,MACpE,GAAG;AAAA;AAAA,EACN;AAEJ","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport {\n CheckIcon,\n ChevronRightIcon,\n DotFilledIcon,\n} from \"@radix-ui/react-icons\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenu\n * -------------------------------------------------------------------------- */\n\nconst DropdownMenu = DropdownMenuPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuTrigger\n * -------------------------------------------------------------------------- */\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuGroup\n * -------------------------------------------------------------------------- */\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSub\n * -------------------------------------------------------------------------- */\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n DropdownMenuPrimitive.DropdownMenuSubTriggerProps & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"focus:bg-accent data-[state=open]:bg-accent flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName =\n DropdownMenuPrimitive.SubTrigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSubContent\n * -------------------------------------------------------------------------- */\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n DropdownMenuPrimitive.DropdownMenuSubContentProps\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 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-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-[8rem] rounded-md border p-1 shadow-md focus:outline-none\",\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuSubContent.displayName =\n DropdownMenuPrimitive.SubContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuContent\n * -------------------------------------------------------------------------- */\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n DropdownMenuPrimitive.DropdownMenuContentProps\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 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-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-[8rem] rounded-md border p-1 shadow-md focus:outline-none\",\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuItem\n * -------------------------------------------------------------------------- */\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n DropdownMenuPrimitive.DropdownMenuItemProps & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm transition-colors focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuCheckboxItem\n * -------------------------------------------------------------------------- */\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n DropdownMenuPrimitive.DropdownMenuCheckboxItemProps\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm transition-colors focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuRadioItem\n * -------------------------------------------------------------------------- */\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n DropdownMenuPrimitive.DropdownMenuRadioItemProps\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm transition-colors focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <DotFilledIcon className=\"size-4 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuLabel\n * -------------------------------------------------------------------------- */\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n DropdownMenuPrimitive.DropdownMenuLabelProps & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-sm font-semibold\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuSeparator\n * -------------------------------------------------------------------------- */\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n DropdownMenuPrimitive.DropdownMenuSeparatorProps\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"bg-muted -mx-1 my-1 h-px\", className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DropdownMenuShortcut\n * -------------------------------------------------------------------------- */\n\nfunction DropdownMenuShortcut({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element {\n return (\n <span\n className={cn(\"ml-auto text-xs tracking-widest opacity-60\", className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n};\n"]}
@@ -1,2 +1,158 @@
1
- "use client";import{b as r}from"./chunk-JTI7KCLO.mjs";import*as d from"react";import*as e from"@radix-ui/react-dropdown-menu";import{CheckIcon as m,ChevronRightIcon as u,DotFilledIcon as l}from"@radix-ui/react-icons";import{jsx as a,jsxs as p}from"react/jsx-runtime";var y=e.Root,N=e.Trigger,x=e.Group,I=e.Portal,h=e.Sub,S=e.RadioGroup,c=d.forwardRef(({className:t,inset:o,children:n,...i},s)=>p(e.SubTrigger,{ref:s,className:r("focus:bg-accent flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none","data-[state=open]:bg-accent",o&&"pl-8",t),...i,children:[n,a(u,{className:"ml-auto size-4"})]}));c.displayName=e.SubTrigger.displayName;var f=d.forwardRef(({className:t,...o},n)=>a(e.SubContent,{ref:n,className:r("bg-popover text-popover-foreground z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg","data-[state=open]:animate-in data-[state=open]:fade-in-0 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-0 data-[state=closed]:zoom-out-95","data-[state=closed]:data-[side=top]:slide-out-to-bottom-2","data-[state=closed]:data-[side=right]:slide-out-to-left-2","data-[state=closed]:data-[side=bottom]:slide-out-to-top-2","data-[state=closed]:data-[side=left]:slide-out-to-right-2",t),...o}));f.displayName=e.SubContent.displayName;var w=d.forwardRef(({className:t,sideOffset:o=4,...n},i)=>a(e.Portal,{children:a(e.Content,{ref:i,sideOffset:o,className:r("bg-popover text-popover-foreground z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md","data-[state=open]:animate-in data-[state=open]:fade-in-0 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-0 data-[state=closed]:zoom-out-95","data-[state=closed]:data-[side=top]:slide-out-to-bottom-2","data-[state=closed]:data-[side=right]:slide-out-to-left-2","data-[state=closed]:data-[side=bottom]:slide-out-to-top-2","data-[state=closed]:data-[side=left]:slide-out-to-right-2",t),...n})}));w.displayName=e.Content.displayName;var M=d.forwardRef(({className:t,inset:o,...n},i)=>a(e.Item,{ref:i,className:r("focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors","aria-disabled:pointer-events-none aria-disabled:opacity-50",o&&"pl-8",t),...n}));M.displayName=e.Item.displayName;var D=d.forwardRef(({className:t,children:o,checked:n,...i},s)=>p(e.CheckboxItem,{ref:s,className:r("focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors","aria-disabled:pointer-events-none aria-disabled:opacity-50",t),checked:n,...i,children:[a("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:a(e.ItemIndicator,{children:a(m,{className:"size-4"})})}),o]}));D.displayName=e.CheckboxItem.displayName;var v=d.forwardRef(({className:t,children:o,...n},i)=>p(e.RadioItem,{ref:i,className:r("focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors","aria-disabled:pointer-events-none aria-disabled:opacity-50",t),...n,children:[a("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:a(e.ItemIndicator,{children:a(l,{className:"size-4 fill-current"})})}),o]}));v.displayName=e.RadioItem.displayName;var P=d.forwardRef(({className:t,inset:o,...n},i)=>a(e.Label,{ref:i,className:r("px-2 py-1.5 text-sm font-semibold",o&&"pl-8",t),...n}));P.displayName=e.Label.displayName;var b=d.forwardRef(({className:t,...o},n)=>a(e.Separator,{ref:n,className:r("bg-muted -mx-1 my-1 h-px",t),...o}));b.displayName=e.Separator.displayName;function C({className:t,...o}){return a("span",{className:r("ml-auto text-xs tracking-widest opacity-60",t),...o})}export{y as DropdownMenu,D as DropdownMenuCheckboxItem,w as DropdownMenuContent,x as DropdownMenuGroup,M as DropdownMenuItem,P as DropdownMenuLabel,I as DropdownMenuPortal,S as DropdownMenuRadioGroup,v as DropdownMenuRadioItem,b as DropdownMenuSeparator,C as DropdownMenuShortcut,h as DropdownMenuSub,f as DropdownMenuSubContent,c as DropdownMenuSubTrigger,N as DropdownMenuTrigger};
1
+ "use client";
2
+ import {
3
+ cn
4
+ } from "./chunk-UG3URV2Z.mjs";
5
+
6
+ // src/dropdown-menu.tsx
7
+ import * as React from "react";
8
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
9
+ import {
10
+ CheckIcon,
11
+ ChevronRightIcon,
12
+ DotFilledIcon
13
+ } from "@radix-ui/react-icons";
14
+ import { jsx, jsxs } from "react/jsx-runtime";
15
+ var DropdownMenu = DropdownMenuPrimitive.Root;
16
+ var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
17
+ var DropdownMenuGroup = DropdownMenuPrimitive.Group;
18
+ var DropdownMenuSub = DropdownMenuPrimitive.Sub;
19
+ var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
20
+ var DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
21
+ DropdownMenuPrimitive.SubTrigger,
22
+ {
23
+ ref,
24
+ className: cn(
25
+ "focus:bg-accent data-[state=open]:bg-accent flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none",
26
+ inset && "pl-8",
27
+ className
28
+ ),
29
+ ...props,
30
+ children: [
31
+ children,
32
+ /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto size-4" })
33
+ ]
34
+ }
35
+ ));
36
+ DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
37
+ var DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
38
+ DropdownMenuPrimitive.SubContent,
39
+ {
40
+ ref,
41
+ className: cn(
42
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 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-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-[8rem] rounded-md border p-1 shadow-md focus:outline-none",
43
+ className
44
+ ),
45
+ ...props
46
+ }
47
+ ) }));
48
+ DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
49
+ var DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
50
+ DropdownMenuPrimitive.Content,
51
+ {
52
+ ref,
53
+ sideOffset,
54
+ className: cn(
55
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in-0 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-0 data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-[8rem] rounded-md border p-1 shadow-md focus:outline-none",
56
+ className
57
+ ),
58
+ ...props
59
+ }
60
+ ) }));
61
+ DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
62
+ var DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
63
+ DropdownMenuPrimitive.Item,
64
+ {
65
+ ref,
66
+ className: cn(
67
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm transition-colors focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50",
68
+ inset && "pl-8",
69
+ className
70
+ ),
71
+ ...props
72
+ }
73
+ ));
74
+ DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
75
+ var DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
76
+ DropdownMenuPrimitive.CheckboxItem,
77
+ {
78
+ ref,
79
+ className: cn(
80
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm transition-colors focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50",
81
+ className
82
+ ),
83
+ checked,
84
+ ...props,
85
+ children: [
86
+ /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
87
+ children
88
+ ]
89
+ }
90
+ ));
91
+ DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
92
+ var DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
93
+ DropdownMenuPrimitive.RadioItem,
94
+ {
95
+ ref,
96
+ className: cn(
97
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm transition-colors focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50",
98
+ className
99
+ ),
100
+ ...props,
101
+ children: [
102
+ /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(DotFilledIcon, { className: "size-4 fill-current" }) }) }),
103
+ children
104
+ ]
105
+ }
106
+ ));
107
+ DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
108
+ var DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
109
+ DropdownMenuPrimitive.Label,
110
+ {
111
+ ref,
112
+ className: cn(
113
+ "px-2 py-1.5 text-sm font-semibold",
114
+ inset && "pl-8",
115
+ className
116
+ ),
117
+ ...props
118
+ }
119
+ ));
120
+ DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
121
+ var DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
122
+ DropdownMenuPrimitive.Separator,
123
+ {
124
+ ref,
125
+ className: cn("bg-muted -mx-1 my-1 h-px", className),
126
+ ...props
127
+ }
128
+ ));
129
+ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
130
+ function DropdownMenuShortcut({
131
+ className,
132
+ ...props
133
+ }) {
134
+ return /* @__PURE__ */ jsx(
135
+ "span",
136
+ {
137
+ className: cn("ml-auto text-xs tracking-widest opacity-60", className),
138
+ ...props
139
+ }
140
+ );
141
+ }
142
+ export {
143
+ DropdownMenu,
144
+ DropdownMenuCheckboxItem,
145
+ DropdownMenuContent,
146
+ DropdownMenuGroup,
147
+ DropdownMenuItem,
148
+ DropdownMenuLabel,
149
+ DropdownMenuRadioGroup,
150
+ DropdownMenuRadioItem,
151
+ DropdownMenuSeparator,
152
+ DropdownMenuShortcut,
153
+ DropdownMenuSub,
154
+ DropdownMenuSubContent,
155
+ DropdownMenuSubTrigger,
156
+ DropdownMenuTrigger
157
+ };
2
158
  //# sourceMappingURL=dropdown-menu.mjs.map