@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
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/context-menu.tsx"],"names":["React","ContextMenuPrimitive","CheckIcon","ChevronRightIcon","DotFilledIcon","jsx","jsxs","ContextMenu","ContextMenuTrigger","ContextMenuGroup","ContextMenuPortal","ContextMenuSub","ContextMenuRadioGroup","ContextMenuSubTrigger","className","inset","children","props","ref","cn","ContextMenuSubContent","ContextMenuContent","ContextMenuItem","ContextMenuCheckboxItem","checked","ContextMenuRadioItem","ContextMenuLabel","ContextMenuSeparator","ContextMenuShortcut"],"mappings":"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","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as ContextMenuPrimitive from \"@radix-ui/react-context-menu\";\nimport {\n CheckIcon,\n ChevronRightIcon,\n DotFilledIcon,\n} from \"@radix-ui/react-icons\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenu\n * -------------------------------------------------------------------------- */\n\nconst ContextMenu = ContextMenuPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuTrigger\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuGroup\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuPortal\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuPortal = ContextMenuPrimitive.Portal;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSub\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuRadioGroup\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>,\n ContextMenuPrimitive.ContextMenuSubTriggerProps & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <ContextMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none\",\n \"data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </ContextMenuPrimitive.SubTrigger>\n));\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSubContent\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuSubContent = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.SubContent>,\n ContextMenuPrimitive.ContextMenuSubContentProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.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));\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuContent\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuContent = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Content>,\n ContextMenuPrimitive.ContextMenuContentProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\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-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 </ContextMenuPrimitive.Portal>\n));\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuItem\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Item>,\n ContextMenuPrimitive.ContextMenuItemProps & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.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\",\n \"aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuCheckboxItem\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>,\n ContextMenuPrimitive.ContextMenuCheckboxItemProps\n>(({ className, children, checked, ...props }, ref) => (\n <ContextMenuPrimitive.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\",\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 <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n));\nContextMenuCheckboxItem.displayName =\n ContextMenuPrimitive.CheckboxItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuRadioItem\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.RadioItem>,\n ContextMenuPrimitive.ContextMenuRadioItemProps\n>(({ className, children, ...props }, ref) => (\n <ContextMenuPrimitive.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\",\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 <ContextMenuPrimitive.ItemIndicator>\n <DotFilledIcon className=\"size-4 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n));\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuLabel\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuLabel = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Label>,\n ContextMenuPrimitive.ContextMenuLabelProps & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.Label\n ref={ref}\n className={cn(\n \"text-foreground px-2 py-1.5 text-sm font-semibold\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSeparator\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuSeparator = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Separator>,\n ContextMenuPrimitive.ContextMenuSeparatorProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Separator\n ref={ref}\n className={cn(\"bg-border -mx-1 my-1 h-px\", className)}\n {...props}\n />\n));\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuShortcut\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuShortcut({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element {\n return (\n <span\n className={cn(\n \"text-muted-foreground ml-auto text-xs tracking-widest\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuContent,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioItem,\n ContextMenuLabel,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuGroup,\n ContextMenuPortal,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuRadioGroup,\n};\n"]}
1
+ {"version":3,"sources":["../src/context-menu.tsx"],"names":[],"mappings":"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","sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as ContextMenuPrimitive from \"@radix-ui/react-context-menu\";\nimport {\n CheckIcon,\n ChevronRightIcon,\n DotFilledIcon,\n} from \"@radix-ui/react-icons\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenu\n * -------------------------------------------------------------------------- */\n\nconst ContextMenu = ContextMenuPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuTrigger\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuGroup\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSub\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuRadioGroup\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>,\n ContextMenuPrimitive.ContextMenuSubTriggerProps & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <ContextMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground 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 </ContextMenuPrimitive.SubTrigger>\n));\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSubContent\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuSubContent = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.SubContent>,\n ContextMenuPrimitive.ContextMenuSubContentProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.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 </ContextMenuPrimitive.Portal>\n));\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuContent\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuContent = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Content>,\n ContextMenuPrimitive.ContextMenuContentProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\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 z-50 min-w-[8rem] rounded-md border p-1 shadow-md focus:outline-none\",\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n));\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuItem\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Item>,\n ContextMenuPrimitive.ContextMenuItemProps & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.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 focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuCheckboxItem\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>,\n ContextMenuPrimitive.ContextMenuCheckboxItemProps\n>(({ className, children, checked, ...props }, ref) => (\n <ContextMenuPrimitive.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 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 <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n));\nContextMenuCheckboxItem.displayName =\n ContextMenuPrimitive.CheckboxItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuRadioItem\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.RadioItem>,\n ContextMenuPrimitive.ContextMenuRadioItemProps\n>(({ className, children, ...props }, ref) => (\n <ContextMenuPrimitive.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 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 <ContextMenuPrimitive.ItemIndicator>\n <DotFilledIcon className=\"size-4 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n));\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuLabel\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuLabel = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Label>,\n ContextMenuPrimitive.ContextMenuLabelProps & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.Label\n ref={ref}\n className={cn(\n \"text-foreground px-2 py-1.5 text-sm font-semibold\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSeparator\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuSeparator = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Separator>,\n ContextMenuPrimitive.ContextMenuSeparatorProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Separator\n ref={ref}\n className={cn(\"bg-border -mx-1 my-1 h-px\", className)}\n {...props}\n />\n));\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuShortcut\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuShortcut({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element {\n return (\n <span\n className={cn(\n \"text-muted-foreground ml-auto text-xs tracking-widest\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuArrow\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuArrow = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Arrow>,\n ContextMenuPrimitive.ContextMenuArrowProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Arrow\n ref={ref}\n className={cn(\"fill-popover\", className)}\n {...props}\n />\n));\nContextMenuArrow.displayName = ContextMenuPrimitive.Arrow.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuContent,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioItem,\n ContextMenuLabel,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuGroup,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuRadioGroup,\n ContextMenuArrow,\n};\n"]}
@@ -1,2 +1,170 @@
1
- "use client";import{b as i}from"./chunk-JTI7KCLO.mjs";import*as s from"react";import*as e from"@radix-ui/react-context-menu";import{CheckIcon as u,ChevronRightIcon as l,DotFilledIcon as c}from"@radix-ui/react-icons";import{jsx as a,jsxs as m}from"react/jsx-runtime";var y=e.Root,N=e.Trigger,I=e.Group,h=e.Portal,S=e.Sub,w=e.RadioGroup,p=s.forwardRef(({className:t,inset:o,children:n,...r},d)=>m(e.SubTrigger,{ref:d,className:i("focus:bg-accent focus:text-accent-foreground flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none","data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",o&&"pl-8",t),...r,children:[n,a(l,{className:"ml-auto size-4"})]}));p.displayName=e.SubTrigger.displayName;var x=s.forwardRef(({className:t,...o},n)=>a(e.SubContent,{ref:n,className:i("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}));x.displayName=e.SubContent.displayName;var f=s.forwardRef(({className:t,...o},n)=>a(e.Portal,{children:a(e.Content,{ref:n,className:i("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),...o})}));f.displayName=e.Content.displayName;var C=s.forwardRef(({className:t,inset:o,...n},r)=>a(e.Item,{ref:r,className:i("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","aria-disabled:pointer-events-none aria-disabled:opacity-50",o&&"pl-8",t),...n}));C.displayName=e.Item.displayName;var M=s.forwardRef(({className:t,children:o,checked:n,...r},d)=>m(e.CheckboxItem,{ref:d,className:i("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","aria-disabled:pointer-events-none aria-disabled:opacity-50",t),checked:n,...r,children:[a("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:a(e.ItemIndicator,{children:a(u,{className:"size-4"})})}),o]}));M.displayName=e.CheckboxItem.displayName;var v=s.forwardRef(({className:t,children:o,...n},r)=>m(e.RadioItem,{ref:r,className:i("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","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(c,{className:"size-4 fill-current"})})}),o]}));v.displayName=e.RadioItem.displayName;var P=s.forwardRef(({className:t,inset:o,...n},r)=>a(e.Label,{ref:r,className:i("text-foreground px-2 py-1.5 text-sm font-semibold",o&&"pl-8",t),...n}));P.displayName=e.Label.displayName;var b=s.forwardRef(({className:t,...o},n)=>a(e.Separator,{ref:n,className:i("bg-border -mx-1 my-1 h-px",t),...o}));b.displayName=e.Separator.displayName;function z({className:t,...o}){return a("span",{className:i("text-muted-foreground ml-auto text-xs tracking-widest",t),...o})}export{y as ContextMenu,M as ContextMenuCheckboxItem,f as ContextMenuContent,I as ContextMenuGroup,C as ContextMenuItem,P as ContextMenuLabel,h as ContextMenuPortal,w as ContextMenuRadioGroup,v as ContextMenuRadioItem,b as ContextMenuSeparator,z as ContextMenuShortcut,S as ContextMenuSub,x as ContextMenuSubContent,p as ContextMenuSubTrigger,N as ContextMenuTrigger};
1
+ "use client";
2
+ import {
3
+ cn
4
+ } from "./chunk-UG3URV2Z.mjs";
5
+
6
+ // src/context-menu.tsx
7
+ import * as React from "react";
8
+ import * as ContextMenuPrimitive from "@radix-ui/react-context-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 ContextMenu = ContextMenuPrimitive.Root;
16
+ var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
17
+ var ContextMenuGroup = ContextMenuPrimitive.Group;
18
+ var ContextMenuSub = ContextMenuPrimitive.Sub;
19
+ var ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
20
+ var ContextMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
21
+ ContextMenuPrimitive.SubTrigger,
22
+ {
23
+ ref,
24
+ className: cn(
25
+ "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground 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
+ ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
37
+ var ContextMenuSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
38
+ ContextMenuPrimitive.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
+ ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
49
+ var ContextMenuContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
50
+ ContextMenuPrimitive.Content,
51
+ {
52
+ ref,
53
+ className: cn(
54
+ "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 z-50 min-w-[8rem] rounded-md border p-1 shadow-md focus:outline-none",
55
+ className
56
+ ),
57
+ ...props
58
+ }
59
+ ) }));
60
+ ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
61
+ var ContextMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
62
+ ContextMenuPrimitive.Item,
63
+ {
64
+ ref,
65
+ className: cn(
66
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default 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",
67
+ inset && "pl-8",
68
+ className
69
+ ),
70
+ ...props
71
+ }
72
+ ));
73
+ ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
74
+ var ContextMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
75
+ ContextMenuPrimitive.CheckboxItem,
76
+ {
77
+ ref,
78
+ className: cn(
79
+ "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 focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50",
80
+ className
81
+ ),
82
+ checked,
83
+ ...props,
84
+ children: [
85
+ /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
86
+ children
87
+ ]
88
+ }
89
+ ));
90
+ ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
91
+ var ContextMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
92
+ ContextMenuPrimitive.RadioItem,
93
+ {
94
+ ref,
95
+ className: cn(
96
+ "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 focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50",
97
+ className
98
+ ),
99
+ ...props,
100
+ children: [
101
+ /* @__PURE__ */ jsx("span", { className: "absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(DotFilledIcon, { className: "size-4 fill-current" }) }) }),
102
+ children
103
+ ]
104
+ }
105
+ ));
106
+ ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
107
+ var ContextMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
108
+ ContextMenuPrimitive.Label,
109
+ {
110
+ ref,
111
+ className: cn(
112
+ "text-foreground px-2 py-1.5 text-sm font-semibold",
113
+ inset && "pl-8",
114
+ className
115
+ ),
116
+ ...props
117
+ }
118
+ ));
119
+ ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
120
+ var ContextMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
121
+ ContextMenuPrimitive.Separator,
122
+ {
123
+ ref,
124
+ className: cn("bg-border -mx-1 my-1 h-px", className),
125
+ ...props
126
+ }
127
+ ));
128
+ ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
129
+ function ContextMenuShortcut({
130
+ className,
131
+ ...props
132
+ }) {
133
+ return /* @__PURE__ */ jsx(
134
+ "span",
135
+ {
136
+ className: cn(
137
+ "text-muted-foreground ml-auto text-xs tracking-widest",
138
+ className
139
+ ),
140
+ ...props
141
+ }
142
+ );
143
+ }
144
+ var ContextMenuArrow = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
145
+ ContextMenuPrimitive.Arrow,
146
+ {
147
+ ref,
148
+ className: cn("fill-popover", className),
149
+ ...props
150
+ }
151
+ ));
152
+ ContextMenuArrow.displayName = ContextMenuPrimitive.Arrow.displayName;
153
+ export {
154
+ ContextMenu,
155
+ ContextMenuArrow,
156
+ ContextMenuCheckboxItem,
157
+ ContextMenuContent,
158
+ ContextMenuGroup,
159
+ ContextMenuItem,
160
+ ContextMenuLabel,
161
+ ContextMenuRadioGroup,
162
+ ContextMenuRadioItem,
163
+ ContextMenuSeparator,
164
+ ContextMenuShortcut,
165
+ ContextMenuSub,
166
+ ContextMenuSubContent,
167
+ ContextMenuSubTrigger,
168
+ ContextMenuTrigger
169
+ };
2
170
  //# sourceMappingURL=context-menu.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/context-menu.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as ContextMenuPrimitive from \"@radix-ui/react-context-menu\";\nimport {\n CheckIcon,\n ChevronRightIcon,\n DotFilledIcon,\n} from \"@radix-ui/react-icons\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenu\n * -------------------------------------------------------------------------- */\n\nconst ContextMenu = ContextMenuPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuTrigger\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuGroup\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuPortal\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuPortal = ContextMenuPrimitive.Portal;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSub\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuRadioGroup\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>,\n ContextMenuPrimitive.ContextMenuSubTriggerProps & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <ContextMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none\",\n \"data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </ContextMenuPrimitive.SubTrigger>\n));\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSubContent\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuSubContent = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.SubContent>,\n ContextMenuPrimitive.ContextMenuSubContentProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.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));\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuContent\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuContent = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Content>,\n ContextMenuPrimitive.ContextMenuContentProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\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-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 </ContextMenuPrimitive.Portal>\n));\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuItem\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Item>,\n ContextMenuPrimitive.ContextMenuItemProps & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.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\",\n \"aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuCheckboxItem\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>,\n ContextMenuPrimitive.ContextMenuCheckboxItemProps\n>(({ className, children, checked, ...props }, ref) => (\n <ContextMenuPrimitive.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\",\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 <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n));\nContextMenuCheckboxItem.displayName =\n ContextMenuPrimitive.CheckboxItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuRadioItem\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.RadioItem>,\n ContextMenuPrimitive.ContextMenuRadioItemProps\n>(({ className, children, ...props }, ref) => (\n <ContextMenuPrimitive.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\",\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 <ContextMenuPrimitive.ItemIndicator>\n <DotFilledIcon className=\"size-4 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n));\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuLabel\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuLabel = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Label>,\n ContextMenuPrimitive.ContextMenuLabelProps & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.Label\n ref={ref}\n className={cn(\n \"text-foreground px-2 py-1.5 text-sm font-semibold\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSeparator\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuSeparator = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Separator>,\n ContextMenuPrimitive.ContextMenuSeparatorProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Separator\n ref={ref}\n className={cn(\"bg-border -mx-1 my-1 h-px\", className)}\n {...props}\n />\n));\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuShortcut\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuShortcut({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element {\n return (\n <span\n className={cn(\n \"text-muted-foreground ml-auto text-xs tracking-widest\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuContent,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioItem,\n ContextMenuLabel,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuGroup,\n ContextMenuPortal,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuRadioGroup,\n};\n"],"mappings":"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","names":["React","ContextMenuPrimitive","CheckIcon","ChevronRightIcon","DotFilledIcon","jsx","jsxs","ContextMenu","ContextMenuTrigger","ContextMenuGroup","ContextMenuPortal","ContextMenuSub","ContextMenuRadioGroup","ContextMenuSubTrigger","className","inset","children","props","ref","cn","ChevronRightIcon","ContextMenuSubContent","ContextMenuContent","ContextMenuItem","ContextMenuCheckboxItem","checked","CheckIcon","ContextMenuRadioItem","DotFilledIcon","ContextMenuLabel","ContextMenuSeparator","ContextMenuShortcut"]}
1
+ {"version":3,"sources":["../src/context-menu.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as ContextMenuPrimitive from \"@radix-ui/react-context-menu\";\nimport {\n CheckIcon,\n ChevronRightIcon,\n DotFilledIcon,\n} from \"@radix-ui/react-icons\";\nimport { cn } from \"./utils\";\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenu\n * -------------------------------------------------------------------------- */\n\nconst ContextMenu = ContextMenuPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuTrigger\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuGroup\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSub\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuRadioGroup\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>,\n ContextMenuPrimitive.ContextMenuSubTriggerProps & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <ContextMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground 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 </ContextMenuPrimitive.SubTrigger>\n));\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSubContent\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuSubContent = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.SubContent>,\n ContextMenuPrimitive.ContextMenuSubContentProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.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 </ContextMenuPrimitive.Portal>\n));\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuContent\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuContent = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Content>,\n ContextMenuPrimitive.ContextMenuContentProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\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 z-50 min-w-[8rem] rounded-md border p-1 shadow-md focus:outline-none\",\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n));\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuItem\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Item>,\n ContextMenuPrimitive.ContextMenuItemProps & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.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 focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuCheckboxItem\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>,\n ContextMenuPrimitive.ContextMenuCheckboxItemProps\n>(({ className, children, checked, ...props }, ref) => (\n <ContextMenuPrimitive.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 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 <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n));\nContextMenuCheckboxItem.displayName =\n ContextMenuPrimitive.CheckboxItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuRadioItem\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.RadioItem>,\n ContextMenuPrimitive.ContextMenuRadioItemProps\n>(({ className, children, ...props }, ref) => (\n <ContextMenuPrimitive.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 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 <ContextMenuPrimitive.ItemIndicator>\n <DotFilledIcon className=\"size-4 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n));\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuLabel\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuLabel = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Label>,\n ContextMenuPrimitive.ContextMenuLabelProps & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.Label\n ref={ref}\n className={cn(\n \"text-foreground px-2 py-1.5 text-sm font-semibold\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSeparator\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuSeparator = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Separator>,\n ContextMenuPrimitive.ContextMenuSeparatorProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Separator\n ref={ref}\n className={cn(\"bg-border -mx-1 my-1 h-px\", className)}\n {...props}\n />\n));\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuShortcut\n * -------------------------------------------------------------------------- */\n\nfunction ContextMenuShortcut({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element {\n return (\n <span\n className={cn(\n \"text-muted-foreground ml-auto text-xs tracking-widest\",\n className,\n )}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuArrow\n * -------------------------------------------------------------------------- */\n\nconst ContextMenuArrow = React.forwardRef<\n React.ElementRef<typeof ContextMenuPrimitive.Arrow>,\n ContextMenuPrimitive.ContextMenuArrowProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Arrow\n ref={ref}\n className={cn(\"fill-popover\", className)}\n {...props}\n />\n));\nContextMenuArrow.displayName = ContextMenuPrimitive.Arrow.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuContent,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioItem,\n ContextMenuLabel,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuGroup,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuRadioGroup,\n ContextMenuArrow,\n};\n"],"mappings":"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","names":[]}
package/dist/dialog.d.mts CHANGED
@@ -3,13 +3,11 @@ import * as DialogPrimitive from '@radix-ui/react-dialog';
3
3
 
4
4
  declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
5
5
  declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
6
- declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
7
6
  declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
8
- declare const DialogOverlay: React.ForwardRefExoticComponent<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>>;
9
7
  declare const DialogContent: React.ForwardRefExoticComponent<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>>;
10
8
  declare function DialogHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
11
9
  declare function DialogFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
12
10
  declare const DialogTitle: React.ForwardRefExoticComponent<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
13
11
  declare const DialogDescription: React.ForwardRefExoticComponent<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
14
12
 
15
- export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
13
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger };
package/dist/dialog.d.ts CHANGED
@@ -3,13 +3,11 @@ import * as DialogPrimitive from '@radix-ui/react-dialog';
3
3
 
4
4
  declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
5
5
  declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
6
- declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
7
6
  declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
8
- declare const DialogOverlay: React.ForwardRefExoticComponent<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>>;
9
7
  declare const DialogContent: React.ForwardRefExoticComponent<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>>;
10
8
  declare function DialogHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
11
9
  declare function DialogFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
12
10
  declare const DialogTitle: React.ForwardRefExoticComponent<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
13
11
  declare const DialogDescription: React.ForwardRefExoticComponent<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
14
12
 
15
- export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
13
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger };
package/dist/dialog.js CHANGED
@@ -1,2 +1,23 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkCAGY2ZSEjs = require('./chunk-CAGY2ZSE.js');require('./chunk-QZCQ42BP.js');exports.Dialog = _chunkCAGY2ZSEjs.a; exports.DialogClose = _chunkCAGY2ZSEjs.d; exports.DialogContent = _chunkCAGY2ZSEjs.f; exports.DialogDescription = _chunkCAGY2ZSEjs.j; exports.DialogFooter = _chunkCAGY2ZSEjs.h; exports.DialogHeader = _chunkCAGY2ZSEjs.g; exports.DialogOverlay = _chunkCAGY2ZSEjs.e; exports.DialogPortal = _chunkCAGY2ZSEjs.c; exports.DialogTitle = _chunkCAGY2ZSEjs.i; exports.DialogTrigger = _chunkCAGY2ZSEjs.b;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+ var _chunkLDYBRDAYjs = require('./chunk-LDYBRDAY.js');
12
+ require('./chunk-G3NP7M2N.js');
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+ exports.Dialog = _chunkLDYBRDAYjs.Dialog; exports.DialogClose = _chunkLDYBRDAYjs.DialogClose; exports.DialogContent = _chunkLDYBRDAYjs.DialogContent; exports.DialogDescription = _chunkLDYBRDAYjs.DialogDescription; exports.DialogFooter = _chunkLDYBRDAYjs.DialogFooter; exports.DialogHeader = _chunkLDYBRDAYjs.DialogHeader; exports.DialogTitle = _chunkLDYBRDAYjs.DialogTitle; exports.DialogTrigger = _chunkLDYBRDAYjs.DialogTrigger;
2
23
  //# sourceMappingURL=dialog.js.map
package/dist/dialog.mjs CHANGED
@@ -1,2 +1,23 @@
1
- "use client";import{a,b,c,d,e,f,g,h,i,j}from"./chunk-YQJHVJVX.mjs";import"./chunk-JTI7KCLO.mjs";export{a as Dialog,d as DialogClose,f as DialogContent,j as DialogDescription,h as DialogFooter,g as DialogHeader,e as DialogOverlay,c as DialogPortal,i as DialogTitle,b as DialogTrigger};
1
+ "use client";
2
+ import {
3
+ Dialog,
4
+ DialogClose,
5
+ DialogContent,
6
+ DialogDescription,
7
+ DialogFooter,
8
+ DialogHeader,
9
+ DialogTitle,
10
+ DialogTrigger
11
+ } from "./chunk-EIHWTXQ4.mjs";
12
+ import "./chunk-UG3URV2Z.mjs";
13
+ export {
14
+ Dialog,
15
+ DialogClose,
16
+ DialogContent,
17
+ DialogDescription,
18
+ DialogFooter,
19
+ DialogHeader,
20
+ DialogTitle,
21
+ DialogTrigger
22
+ };
2
23
  //# sourceMappingURL=dialog.mjs.map
package/dist/drawer.d.mts CHANGED
@@ -4,9 +4,7 @@ import { Drawer as Drawer$1 } from 'vaul';
4
4
 
5
5
  declare function Drawer({ shouldScaleBackground, ...props }: React.ComponentProps<typeof Drawer$1.Root>): React.JSX.Element;
6
6
  declare const DrawerTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
7
- declare const DrawerPortal: React.FC<DialogPrimitive.DialogPortalProps>;
8
7
  declare const DrawerClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
9
- declare const DrawerOverlay: React.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
8
  declare const DrawerContent: React.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
11
9
  onAnimationEnd?: ((open: boolean) => void) | undefined;
12
10
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -15,4 +13,4 @@ declare function DrawerFooter({ className, ...props }: React.HTMLAttributes<HTML
15
13
  declare const DrawerTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
16
14
  declare const DrawerDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
17
15
 
18
- export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger };
16
+ export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger };
package/dist/drawer.d.ts CHANGED
@@ -4,9 +4,7 @@ import { Drawer as Drawer$1 } from 'vaul';
4
4
 
5
5
  declare function Drawer({ shouldScaleBackground, ...props }: React.ComponentProps<typeof Drawer$1.Root>): React.JSX.Element;
6
6
  declare const DrawerTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
7
- declare const DrawerPortal: React.FC<DialogPrimitive.DialogPortalProps>;
8
7
  declare const DrawerClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
9
- declare const DrawerOverlay: React.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
8
  declare const DrawerContent: React.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
11
9
  onAnimationEnd?: ((open: boolean) => void) | undefined;
12
10
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -15,4 +13,4 @@ declare function DrawerFooter({ className, ...props }: React.HTMLAttributes<HTML
15
13
  declare const DrawerTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
16
14
  declare const DrawerDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
17
15
 
18
- export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger };
16
+ export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger };
package/dist/drawer.js CHANGED
@@ -1,2 +1,98 @@
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 n = _interopRequireWildcard(_react);var _vaul = require('vaul');var _jsxruntime = require('react/jsx-runtime');function w({shouldScaleBackground:e=!0,...t}){return _jsxruntime.jsx.call(void 0, _vaul.Drawer.Root,{shouldScaleBackground:e,...t})}var u=_vaul.Drawer.Trigger,s= exports.DrawerPortal =_vaul.Drawer.Portal,v= exports.DrawerClose =_vaul.Drawer.Close,m= exports.DrawerOverlay =n.forwardRef(({className:e,...t},o)=>_jsxruntime.jsx.call(void 0, _vaul.Drawer.Overlay,{ref:o,className:_chunkQZCQ42BPjs.b.call(void 0, "fixed inset-0 z-50 bg-black/80",e),...t}));m.displayName=_vaul.Drawer.Overlay.displayName;var f=n.forwardRef(({className:e,children:t,...o},c)=>_jsxruntime.jsxs.call(void 0, s,{children:[_jsxruntime.jsx.call(void 0, m,{}),_jsxruntime.jsxs.call(void 0, _vaul.Drawer.Content,{ref:c,className:_chunkQZCQ42BPjs.b.call(void 0, "bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border",e),...o,children:[_jsxruntime.jsx.call(void 0, "div",{className:"bg-muted mx-auto mt-4 h-2 w-[100px] rounded-full"}),t]})]}));f.displayName="DrawerContent";function y({className:e,...t}){return _jsxruntime.jsx.call(void 0, "div",{className:_chunkQZCQ42BPjs.b.call(void 0, "grid gap-1.5 p-4 text-center sm:text-left",e),...t})}function P({className:e,...t}){return _jsxruntime.jsx.call(void 0, "div",{className:_chunkQZCQ42BPjs.b.call(void 0, "mt-auto flex flex-col gap-2 p-4",e),...t})}var p=n.forwardRef(({className:e,...t},o)=>_jsxruntime.jsx.call(void 0, _vaul.Drawer.Title,{ref:o,className:_chunkQZCQ42BPjs.b.call(void 0, "text-lg font-semibold leading-none tracking-tight",e),...t}));p.displayName=_vaul.Drawer.Title.displayName;var R=n.forwardRef(({className:e,...t},o)=>_jsxruntime.jsx.call(void 0, _vaul.Drawer.Description,{ref:o,className:_chunkQZCQ42BPjs.b.call(void 0, "text-muted-foreground text-sm",e),...t}));R.displayName=_vaul.Drawer.Description.displayName;exports.Drawer = w; exports.DrawerClose = v; exports.DrawerContent = f; exports.DrawerDescription = R; exports.DrawerFooter = P; exports.DrawerHeader = y; exports.DrawerOverlay = m; exports.DrawerPortal = s; exports.DrawerTitle = p; exports.DrawerTrigger = u;
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/drawer.tsx
7
+ var _react = require('react'); var React = _interopRequireWildcard(_react);
8
+ var _vaul = require('vaul');
9
+ var _jsxruntime = require('react/jsx-runtime');
10
+ function Drawer({
11
+ shouldScaleBackground = true,
12
+ ...props
13
+ }) {
14
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
15
+ _vaul.Drawer.Root,
16
+ {
17
+ shouldScaleBackground,
18
+ ...props
19
+ }
20
+ );
21
+ }
22
+ var DrawerTrigger = _vaul.Drawer.Trigger;
23
+ var DrawerClose = _vaul.Drawer.Close;
24
+ var DrawerContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _vaul.Drawer.Portal, { children: [
25
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _vaul.Drawer.Overlay, { className: "fixed inset-0 z-50 bg-black/80" }),
26
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
27
+ _vaul.Drawer.Content,
28
+ {
29
+ ref,
30
+ className: _chunkG3NP7M2Njs.cn.call(void 0,
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__ */ _jsxruntime.jsx.call(void 0, "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__ */ _jsxruntime.jsx.call(void 0,
48
+ "div",
49
+ {
50
+ className: _chunkG3NP7M2Njs.cn.call(void 0, "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__ */ _jsxruntime.jsx.call(void 0,
60
+ "div",
61
+ {
62
+ className: _chunkG3NP7M2Njs.cn.call(void 0, "mt-auto flex flex-col gap-2 p-4", className),
63
+ ...props
64
+ }
65
+ );
66
+ }
67
+ var DrawerTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
68
+ _vaul.Drawer.Title,
69
+ {
70
+ ref,
71
+ className: _chunkG3NP7M2Njs.cn.call(void 0,
72
+ "text-lg font-semibold leading-none tracking-tight",
73
+ className
74
+ ),
75
+ ...props
76
+ }
77
+ ));
78
+ DrawerTitle.displayName = _vaul.Drawer.Title.displayName;
79
+ var DrawerDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
80
+ _vaul.Drawer.Description,
81
+ {
82
+ ref,
83
+ className: _chunkG3NP7M2Njs.cn.call(void 0, "text-muted-foreground text-sm", className),
84
+ ...props
85
+ }
86
+ ));
87
+ DrawerDescription.displayName = _vaul.Drawer.Description.displayName;
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ exports.Drawer = Drawer; exports.DrawerClose = DrawerClose; exports.DrawerContent = DrawerContent; exports.DrawerDescription = DrawerDescription; exports.DrawerFooter = DrawerFooter; exports.DrawerHeader = DrawerHeader; exports.DrawerTitle = DrawerTitle; exports.DrawerTrigger = DrawerTrigger;
2
98
  //# sourceMappingURL=drawer.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/drawer.tsx"],"names":["React","DrawerPrimitive","jsx","jsxs","Drawer","shouldScaleBackground","props","DrawerTrigger","DrawerPortal","DrawerClose","DrawerOverlay","className","ref","cn","DrawerContent","children","DrawerHeader","DrawerFooter","DrawerTitle","DrawerDescription"],"mappings":"qDAEA,UAAYA,MAAW,QACvB,OAAS,UAAUC,MAAuB,OAYtC,cAAAC,EAmDA,QAAAC,MAnDA,oBALJ,SAASC,EAAO,CACd,sBAAAC,EAAwB,GACxB,GAAGC,CACL,EAAyE,CACvE,OACEJ,EAACD,EAAgB,KAAhB,CACC,sBAAuBI,EACtB,GAAGC,EACN,CAEJ,CAMA,IAAMC,EAAgBN,EAAgB,QAMhCO,EAAeP,EAAgB,OAM/BQ,EAAcR,EAAgB,MAM9BS,EAAsB,aAG1B,CAAC,CAAE,UAAAC,EAAW,GAAGL,CAAM,EAAGM,IAC1BV,EAACD,EAAgB,QAAhB,CACC,IAAKW,EACL,UAAWC,EAAG,iCAAkCF,CAAS,EACxD,GAAGL,EACN,CACD,EACDI,EAAc,YAAcT,EAAgB,QAAQ,YAMpD,IAAMa,EAAsB,aAG1B,CAAC,CAAE,UAAAH,EAAW,SAAAI,EAAU,GAAGT,CAAM,EAAGM,IACpCT,EAACK,EAAA,CACC,UAAAN,EAACQ,EAAA,EAAc,EACfP,EAACF,EAAgB,QAAhB,CACC,IAAKW,EACL,UAAWC,EACT,iGACAF,CACF,EACC,GAAGL,EAEJ,UAAAJ,EAAC,OAAI,UAAU,mDAAmD,EACjEa,GACH,GACF,CACD,EACDD,EAAc,YAAc,gBAM5B,SAASE,EAAa,CACpB,UAAAL,EACA,GAAGL,CACL,EAA4D,CAC1D,OACEJ,EAAC,OACC,UAAWW,EAAG,4CAA6CF,CAAS,EACnE,GAAGL,EACN,CAEJ,CAMA,SAASW,EAAa,CACpB,UAAAN,EACA,GAAGL,CACL,EAA4D,CAC1D,OACEJ,EAAC,OACC,UAAWW,EAAG,kCAAmCF,CAAS,EACzD,GAAGL,EACN,CAEJ,CAMA,IAAMY,EAAoB,aAGxB,CAAC,CAAE,UAAAP,EAAW,GAAGL,CAAM,EAAGM,IAC1BV,EAACD,EAAgB,MAAhB,CACC,IAAKW,EACL,UAAWC,EACT,oDACAF,CACF,EACC,GAAGL,EACN,CACD,EACDY,EAAY,YAAcjB,EAAgB,MAAM,YAMhD,IAAMkB,EAA0B,aAG9B,CAAC,CAAE,UAAAR,EAAW,GAAGL,CAAM,EAAGM,IAC1BV,EAACD,EAAgB,YAAhB,CACC,IAAKW,EACL,UAAWC,EAAG,gCAAiCF,CAAS,EACvD,GAAGL,EACN,CACD,EACDa,EAAkB,YAAclB,EAAgB,YAAY","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"]}
1
+ {"version":3,"sources":["../src/drawer.tsx"],"names":[],"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","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"]}