@codefast/ui 0.0.65 → 0.0.67

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 (327) hide show
  1. package/dist/{chunk-ZMF2SRE5.js → chunk-26W5NJTU.js} +1 -1
  2. package/dist/chunk-26W5NJTU.js.map +1 -0
  3. package/dist/chunk-3COHZ24E.cjs +2 -0
  4. package/dist/chunk-3COHZ24E.cjs.map +1 -0
  5. package/dist/{chunk-QEWITXOV.cjs → chunk-4MTN7WZ2.cjs} +1 -1
  6. package/dist/chunk-4MTN7WZ2.cjs.map +1 -0
  7. package/dist/chunk-5QETIFO4.js +2 -0
  8. package/dist/chunk-5QETIFO4.js.map +1 -0
  9. package/dist/{chunk-WECV77JD.cjs → chunk-5RJANBDJ.cjs} +1 -1
  10. package/dist/chunk-5RJANBDJ.cjs.map +1 -0
  11. package/dist/chunk-6UQKMUZG.cjs +2 -0
  12. package/dist/chunk-6UQKMUZG.cjs.map +1 -0
  13. package/dist/chunk-AVEDWLNQ.js +2 -0
  14. package/dist/chunk-AVEDWLNQ.js.map +1 -0
  15. package/dist/{chunk-YLE5XFEO.cjs → chunk-EW7DAPDC.cjs} +1 -1
  16. package/dist/chunk-EW7DAPDC.cjs.map +1 -0
  17. package/dist/{chunk-RSNKUKY7.js → chunk-HDHZESSG.js} +1 -1
  18. package/dist/chunk-HDHZESSG.js.map +1 -0
  19. package/dist/{chunk-GCHNSK5O.cjs → chunk-JMM2MTPI.cjs} +1 -1
  20. package/dist/chunk-JMM2MTPI.cjs.map +1 -0
  21. package/dist/{chunk-WRO3QIWH.js → chunk-JNOLIDCD.js} +1 -1
  22. package/dist/chunk-JNOLIDCD.js.map +1 -0
  23. package/dist/{chunk-F5TIIJJJ.cjs → chunk-LOJBMYTH.cjs} +1 -1
  24. package/dist/chunk-LOJBMYTH.cjs.map +1 -0
  25. package/dist/{chunk-A5ILA637.js → chunk-RBP4PBCK.js} +1 -1
  26. package/dist/chunk-RBP4PBCK.js.map +1 -0
  27. package/dist/{chunk-L7IASKCH.js → chunk-RVGKUNXC.js} +1 -1
  28. package/dist/{chunk-L7IASKCH.js.map → chunk-RVGKUNXC.js.map} +1 -1
  29. package/dist/{chunk-72NPDP3X.cjs → chunk-T3G5USVY.cjs} +1 -1
  30. package/dist/chunk-T3G5USVY.cjs.map +1 -0
  31. package/dist/chunk-VDVLCSO4.js +2 -0
  32. package/dist/chunk-VDVLCSO4.js.map +1 -0
  33. package/dist/{chunk-2OBTJ7SD.cjs → chunk-WKKCZQNO.cjs} +2 -2
  34. package/dist/chunk-WKKCZQNO.cjs.map +1 -0
  35. package/dist/{chunk-FNQFZJUG.js → chunk-WQFHFTYS.js} +1 -1
  36. package/dist/chunk-WQFHFTYS.js.map +1 -0
  37. package/dist/react/accordion.cjs.map +1 -1
  38. package/dist/react/accordion.js.map +1 -1
  39. package/dist/react/alert-dialog.cjs +1 -1
  40. package/dist/react/alert-dialog.cjs.map +1 -1
  41. package/dist/react/alert-dialog.js +1 -1
  42. package/dist/react/alert-dialog.js.map +1 -1
  43. package/dist/react/alert.cjs.map +1 -1
  44. package/dist/react/alert.js.map +1 -1
  45. package/dist/react/avatar.cjs.map +1 -1
  46. package/dist/react/avatar.js.map +1 -1
  47. package/dist/react/blockquote.cjs.map +1 -1
  48. package/dist/react/blockquote.js.map +1 -1
  49. package/dist/react/box.cjs.map +1 -1
  50. package/dist/react/box.js.map +1 -1
  51. package/dist/react/breadcrumb.cjs.map +1 -1
  52. package/dist/react/breadcrumb.js.map +1 -1
  53. package/dist/react/button.cjs +1 -1
  54. package/dist/react/button.js +1 -1
  55. package/dist/react/calendar.cjs +1 -1
  56. package/dist/react/calendar.js +1 -1
  57. package/dist/react/card.cjs.map +1 -1
  58. package/dist/react/card.js.map +1 -1
  59. package/dist/react/carousel.cjs +1 -1
  60. package/dist/react/carousel.cjs.map +1 -1
  61. package/dist/react/carousel.js +1 -1
  62. package/dist/react/carousel.js.map +1 -1
  63. package/dist/react/checkbox-cards.cjs +1 -1
  64. package/dist/react/checkbox-cards.cjs.map +1 -1
  65. package/dist/react/checkbox-cards.js +1 -1
  66. package/dist/react/checkbox-cards.js.map +1 -1
  67. package/dist/react/checkbox-group.cjs +1 -1
  68. package/dist/react/checkbox-group.cjs.map +1 -1
  69. package/dist/react/checkbox-group.js +1 -1
  70. package/dist/react/checkbox-group.js.map +1 -1
  71. package/dist/react/checkbox-group.primitive.cjs +1 -1
  72. package/dist/react/checkbox-group.primitive.js +1 -1
  73. package/dist/react/checkbox.cjs +1 -1
  74. package/dist/react/checkbox.cjs.map +1 -1
  75. package/dist/react/checkbox.js +1 -1
  76. package/dist/react/checkbox.js.map +1 -1
  77. package/dist/react/code.cjs.map +1 -1
  78. package/dist/react/code.js.map +1 -1
  79. package/dist/react/collapsible.cjs.map +1 -1
  80. package/dist/react/collapsible.js.map +1 -1
  81. package/dist/react/command.cjs +1 -1
  82. package/dist/react/command.cjs.map +1 -1
  83. package/dist/react/command.js +1 -1
  84. package/dist/react/command.js.map +1 -1
  85. package/dist/react/container.cjs.map +1 -1
  86. package/dist/react/container.js.map +1 -1
  87. package/dist/react/context-menu.cjs.map +1 -1
  88. package/dist/react/context-menu.js.map +1 -1
  89. package/dist/react/data-table.cjs +1 -1
  90. package/dist/react/data-table.js +1 -1
  91. package/dist/react/dialog.cjs +1 -1
  92. package/dist/react/dialog.js +1 -1
  93. package/dist/react/drawer.cjs.map +1 -1
  94. package/dist/react/drawer.js.map +1 -1
  95. package/dist/react/dropdown-menu.cjs +1 -1
  96. package/dist/react/dropdown-menu.js +1 -1
  97. package/dist/react/em.cjs.map +1 -1
  98. package/dist/react/em.js.map +1 -1
  99. package/dist/react/form.cjs +1 -1
  100. package/dist/react/form.cjs.map +1 -1
  101. package/dist/react/form.js +1 -1
  102. package/dist/react/form.js.map +1 -1
  103. package/dist/react/heading.cjs.map +1 -1
  104. package/dist/react/heading.js.map +1 -1
  105. package/dist/react/hover-card.cjs.map +1 -1
  106. package/dist/react/hover-card.js.map +1 -1
  107. package/dist/react/input-otp.cjs +1 -1
  108. package/dist/react/input-otp.cjs.map +1 -1
  109. package/dist/react/input-otp.js +1 -1
  110. package/dist/react/input-otp.js.map +1 -1
  111. package/dist/react/input.cjs +1 -1
  112. package/dist/react/input.cjs.map +1 -1
  113. package/dist/react/input.d.cts +113 -34
  114. package/dist/react/input.d.ts +113 -34
  115. package/dist/react/input.js +1 -1
  116. package/dist/react/input.js.map +1 -1
  117. package/dist/react/kbd.cjs.map +1 -1
  118. package/dist/react/kbd.js.map +1 -1
  119. package/dist/react/label.cjs +1 -1
  120. package/dist/react/label.js +1 -1
  121. package/dist/react/menubar.cjs.map +1 -1
  122. package/dist/react/menubar.js.map +1 -1
  123. package/dist/react/navigation-menu.cjs.map +1 -1
  124. package/dist/react/navigation-menu.js.map +1 -1
  125. package/dist/react/pagination.cjs +1 -1
  126. package/dist/react/pagination.cjs.map +1 -1
  127. package/dist/react/pagination.js +1 -1
  128. package/dist/react/pagination.js.map +1 -1
  129. package/dist/react/popover.cjs.map +1 -1
  130. package/dist/react/popover.js.map +1 -1
  131. package/dist/react/pre.cjs.map +1 -1
  132. package/dist/react/pre.js.map +1 -1
  133. package/dist/react/progress.cjs.map +1 -1
  134. package/dist/react/progress.js.map +1 -1
  135. package/dist/react/quote.cjs.map +1 -1
  136. package/dist/react/quote.js.map +1 -1
  137. package/dist/react/radio-cards.cjs +1 -1
  138. package/dist/react/radio-cards.cjs.map +1 -1
  139. package/dist/react/radio-cards.js +1 -1
  140. package/dist/react/radio-cards.js.map +1 -1
  141. package/dist/react/radio-group.cjs.map +1 -1
  142. package/dist/react/radio-group.js.map +1 -1
  143. package/dist/react/radio.cjs.map +1 -1
  144. package/dist/react/radio.js.map +1 -1
  145. package/dist/react/scroll-area.cjs.map +1 -1
  146. package/dist/react/scroll-area.js.map +1 -1
  147. package/dist/react/section.cjs.map +1 -1
  148. package/dist/react/section.js.map +1 -1
  149. package/dist/react/select.cjs +1 -1
  150. package/dist/react/select.js +1 -1
  151. package/dist/react/separator.cjs.map +1 -1
  152. package/dist/react/separator.js.map +1 -1
  153. package/dist/react/sheet.cjs.map +1 -1
  154. package/dist/react/sheet.js.map +1 -1
  155. package/dist/react/slider.cjs.map +1 -1
  156. package/dist/react/slider.js.map +1 -1
  157. package/dist/react/spinner.cjs +1 -1
  158. package/dist/react/spinner.js +1 -1
  159. package/dist/react/strong.cjs.map +1 -1
  160. package/dist/react/strong.js.map +1 -1
  161. package/dist/react/switch.cjs +1 -1
  162. package/dist/react/switch.cjs.map +1 -1
  163. package/dist/react/switch.js +1 -1
  164. package/dist/react/switch.js.map +1 -1
  165. package/dist/react/table.cjs.map +1 -1
  166. package/dist/react/table.js.map +1 -1
  167. package/dist/react/tabs.cjs.map +1 -1
  168. package/dist/react/tabs.js.map +1 -1
  169. package/dist/react/text-input.cjs +2 -0
  170. package/dist/react/text-input.cjs.map +1 -0
  171. package/dist/react/text-input.d.cts +11 -0
  172. package/dist/react/text-input.d.ts +11 -0
  173. package/dist/react/text-input.js +2 -0
  174. package/dist/react/text-input.js.map +1 -0
  175. package/dist/react/text.cjs.map +1 -1
  176. package/dist/react/text.js.map +1 -1
  177. package/dist/react/textarea.cjs +1 -1
  178. package/dist/react/textarea.cjs.map +1 -1
  179. package/dist/react/textarea.js +1 -1
  180. package/dist/react/textarea.js.map +1 -1
  181. package/dist/react/toggle-group.cjs +1 -1
  182. package/dist/react/toggle-group.cjs.map +1 -1
  183. package/dist/react/toggle-group.js +1 -1
  184. package/dist/react/toggle-group.js.map +1 -1
  185. package/dist/react/toggle.cjs +1 -1
  186. package/dist/react/toggle.js +1 -1
  187. package/dist/react/tooltip.cjs.map +1 -1
  188. package/dist/react/tooltip.js.map +1 -1
  189. package/dist/styles.css +1 -1
  190. package/dist/styles.css.map +1 -1
  191. package/package.json +76 -102
  192. package/dist/chunk-2OBTJ7SD.cjs.map +0 -1
  193. package/dist/chunk-3OEPCFBF.cjs +0 -2
  194. package/dist/chunk-3OEPCFBF.cjs.map +0 -1
  195. package/dist/chunk-6AFJCDFU.js +0 -2
  196. package/dist/chunk-6AFJCDFU.js.map +0 -1
  197. package/dist/chunk-72NPDP3X.cjs.map +0 -1
  198. package/dist/chunk-7CHCTEST.js +0 -2
  199. package/dist/chunk-7CHCTEST.js.map +0 -1
  200. package/dist/chunk-A5ILA637.js.map +0 -1
  201. package/dist/chunk-DH3YP4ZC.cjs +0 -2
  202. package/dist/chunk-DH3YP4ZC.cjs.map +0 -1
  203. package/dist/chunk-DTSAQICV.js +0 -2
  204. package/dist/chunk-DTSAQICV.js.map +0 -1
  205. package/dist/chunk-F5TIIJJJ.cjs.map +0 -1
  206. package/dist/chunk-FNQFZJUG.js.map +0 -1
  207. package/dist/chunk-GCHNSK5O.cjs.map +0 -1
  208. package/dist/chunk-NH6X3FON.js +0 -2
  209. package/dist/chunk-NH6X3FON.js.map +0 -1
  210. package/dist/chunk-P563ILDJ.cjs +0 -2
  211. package/dist/chunk-P563ILDJ.cjs.map +0 -1
  212. package/dist/chunk-QEWITXOV.cjs.map +0 -1
  213. package/dist/chunk-RSNKUKY7.js.map +0 -1
  214. package/dist/chunk-VVA2EE5V.js +0 -2
  215. package/dist/chunk-VVA2EE5V.js.map +0 -1
  216. package/dist/chunk-VZ6P3BCB.cjs +0 -2
  217. package/dist/chunk-VZ6P3BCB.cjs.map +0 -1
  218. package/dist/chunk-WECV77JD.cjs.map +0 -1
  219. package/dist/chunk-WRO3QIWH.js.map +0 -1
  220. package/dist/chunk-YLE5XFEO.cjs.map +0 -1
  221. package/dist/chunk-ZMF2SRE5.js.map +0 -1
  222. package/dist/hooks/use-media-query.cjs +0 -2
  223. package/dist/hooks/use-media-query.cjs.map +0 -1
  224. package/dist/hooks/use-media-query.d.cts +0 -3
  225. package/dist/hooks/use-media-query.d.ts +0 -3
  226. package/dist/hooks/use-media-query.js +0 -2
  227. package/dist/hooks/use-media-query.js.map +0 -1
  228. package/dist/hooks/use-mutation-observer.cjs +0 -2
  229. package/dist/hooks/use-mutation-observer.cjs.map +0 -1
  230. package/dist/hooks/use-mutation-observer.d.cts +0 -5
  231. package/dist/hooks/use-mutation-observer.d.ts +0 -5
  232. package/dist/hooks/use-mutation-observer.js +0 -2
  233. package/dist/hooks/use-mutation-observer.js.map +0 -1
  234. package/dist/lib/colors.cjs +0 -2
  235. package/dist/lib/colors.cjs.map +0 -1
  236. package/dist/lib/colors.d.cts +0 -1759
  237. package/dist/lib/colors.d.ts +0 -1759
  238. package/dist/lib/colors.js +0 -2
  239. package/dist/lib/colors.js.map +0 -1
  240. package/dist/plugin/animate.plugin.cjs +0 -2
  241. package/dist/plugin/animate.plugin.cjs.map +0 -1
  242. package/dist/plugin/animate.plugin.js +0 -2
  243. package/dist/plugin/animate.plugin.js.map +0 -1
  244. package/dist/plugin/base.plugin.cjs +0 -2
  245. package/dist/plugin/base.plugin.cjs.map +0 -1
  246. package/dist/plugin/base.plugin.js +0 -2
  247. package/dist/plugin/base.plugin.js.map +0 -1
  248. package/dist/plugin/perspective.plugin.cjs +0 -2
  249. package/dist/plugin/perspective.plugin.cjs.map +0 -1
  250. package/dist/plugin/perspective.plugin.js +0 -2
  251. package/dist/plugin/perspective.plugin.js.map +0 -1
  252. package/dist/tailwind.config.cjs +0 -2
  253. package/dist/tailwind.config.cjs.map +0 -1
  254. package/dist/tailwind.config.js +0 -2
  255. package/dist/tailwind.config.js.map +0 -1
  256. package/plugin/animate.plugin.ts +0 -319
  257. package/plugin/base.plugin.ts +0 -21
  258. package/plugin/perspective.plugin.ts +0 -11
  259. package/src/hooks/use-media-query.ts +0 -22
  260. package/src/hooks/use-mutation-observer.ts +0 -26
  261. package/src/lib/colors.ts +0 -1757
  262. package/src/lib/utils.ts +0 -6
  263. package/src/react/accordion.tsx +0 -86
  264. package/src/react/alert-dialog.tsx +0 -177
  265. package/src/react/alert.tsx +0 -71
  266. package/src/react/aspect-ratio.tsx +0 -17
  267. package/src/react/avatar.tsx +0 -58
  268. package/src/react/badge.tsx +0 -39
  269. package/src/react/blockquote.tsx +0 -26
  270. package/src/react/box.tsx +0 -34
  271. package/src/react/breadcrumb.tsx +0 -148
  272. package/src/react/button.tsx +0 -95
  273. package/src/react/calendar.tsx +0 -79
  274. package/src/react/card.tsx +0 -103
  275. package/src/react/carousel.tsx +0 -299
  276. package/src/react/checkbox-cards.tsx +0 -59
  277. package/src/react/checkbox-group.primitive.tsx +0 -200
  278. package/src/react/checkbox-group.tsx +0 -53
  279. package/src/react/checkbox.tsx +0 -36
  280. package/src/react/code.tsx +0 -26
  281. package/src/react/collapsible.tsx +0 -54
  282. package/src/react/command.tsx +0 -199
  283. package/src/react/container.tsx +0 -27
  284. package/src/react/context-menu.tsx +0 -302
  285. package/src/react/data-table.tsx +0 -249
  286. package/src/react/dialog.tsx +0 -156
  287. package/src/react/drawer.tsx +0 -132
  288. package/src/react/dropdown-menu.tsx +0 -286
  289. package/src/react/em.tsx +0 -26
  290. package/src/react/form.tsx +0 -218
  291. package/src/react/heading.tsx +0 -27
  292. package/src/react/hover-card.tsx +0 -73
  293. package/src/react/input-otp.tsx +0 -114
  294. package/src/react/input.tsx +0 -42
  295. package/src/react/kbd.tsx +0 -36
  296. package/src/react/label.tsx +0 -31
  297. package/src/react/menubar.tsx +0 -316
  298. package/src/react/navigation-menu.tsx +0 -192
  299. package/src/react/pagination.tsx +0 -150
  300. package/src/react/popover.tsx +0 -82
  301. package/src/react/pre.tsx +0 -26
  302. package/src/react/progress.tsx +0 -35
  303. package/src/react/quote.tsx +0 -26
  304. package/src/react/radio-cards.tsx +0 -46
  305. package/src/react/radio-group.tsx +0 -48
  306. package/src/react/radio.tsx +0 -38
  307. package/src/react/resizable.tsx +0 -62
  308. package/src/react/scroll-area.tsx +0 -106
  309. package/src/react/section.tsx +0 -26
  310. package/src/react/select.tsx +0 -217
  311. package/src/react/separator.tsx +0 -32
  312. package/src/react/sheet.tsx +0 -170
  313. package/src/react/skeleton.tsx +0 -18
  314. package/src/react/slider.tsx +0 -41
  315. package/src/react/sonner.tsx +0 -40
  316. package/src/react/spinner.tsx +0 -68
  317. package/src/react/strong.tsx +0 -26
  318. package/src/react/switch.tsx +0 -33
  319. package/src/react/table.tsx +0 -142
  320. package/src/react/tabs.tsx +0 -87
  321. package/src/react/text.tsx +0 -34
  322. package/src/react/textarea.tsx +0 -30
  323. package/src/react/toggle-group.tsx +0 -81
  324. package/src/react/toggle.tsx +0 -49
  325. package/src/react/tooltip.tsx +0 -81
  326. package/src/styles/styles.css +0 -3
  327. package/tailwind.config.ts +0 -126
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/command.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { MagnifyingGlassIcon } from '@radix-ui/react-icons';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { cn } from '../lib/utils';\nimport { Dialog, DialogContent } from './dialog';\n\n/* -----------------------------------------------------------------------------\n * Component: Command\n * -------------------------------------------------------------------------- */\n\ntype CommandElement = React.ElementRef<typeof CommandPrimitive>;\ntype CommandProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive>;\n\nconst Command = React.forwardRef<CommandElement, CommandProps>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n 'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',\n className,\n )}\n {...props}\n />\n));\n\nCommand.displayName = CommandPrimitive.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandDialog\n * -------------------------------------------------------------------------- */\n\ntype CommandDialogProps = React.ComponentProps<typeof Dialog>;\n\nfunction CommandDialog({ children, ...props }: CommandDialogProps): React.JSX.Element {\n return (\n <Dialog {...props}>\n <DialogContent className=\"p-0\">\n <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: CommandInput\n * -------------------------------------------------------------------------- */\n\ntype CommandInputElement = React.ElementRef<typeof CommandPrimitive.Input>;\ntype CommandInputProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>;\n\nconst CommandInput = React.forwardRef<CommandInputElement, CommandInputProps>(({ className, ...props }, ref) => (\n <div className=\"flex items-center gap-2 border-b px-3\" cmdk-input-wrapper=\"\">\n <MagnifyingGlassIcon className=\"size-5 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n 'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n />\n </div>\n));\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandList\n * -------------------------------------------------------------------------- */\n\ntype CommandListElement = React.ElementRef<typeof CommandPrimitive.List>;\ntype CommandListProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>;\n\nconst CommandList = React.forwardRef<CommandListElement, CommandListProps>(({ className, ...props }, ref) => (\n <CommandPrimitive.List ref={ref} className={cn('max-h-72 overflow-y-auto overflow-x-hidden', className)} {...props} />\n));\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandEmpty\n * -------------------------------------------------------------------------- */\n\ntype CommandEmptyElement = React.ElementRef<typeof CommandPrimitive.Empty>;\ntype CommandEmptyProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>;\n\nconst CommandEmpty = React.forwardRef<CommandEmptyElement, CommandEmptyProps>((props, ref) => (\n <CommandPrimitive.Empty ref={ref} className=\"py-6 text-center text-sm\" {...props} />\n));\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandGroup\n * -------------------------------------------------------------------------- */\n\ntype CommandGroupElement = React.ElementRef<typeof CommandPrimitive.Group>;\ntype CommandGroupProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>;\n\nconst CommandGroup = React.forwardRef<CommandGroupElement, CommandGroupProps>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n 'text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium',\n className,\n )}\n {...props}\n />\n));\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandSeparator\n * -------------------------------------------------------------------------- */\n\ntype CommandSeparatorElement = React.ElementRef<typeof CommandPrimitive.Separator>;\ntype CommandSeparatorProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>;\n\nconst CommandSeparator = React.forwardRef<CommandSeparatorElement, CommandSeparatorProps>(\n ({ className, ...props }, ref) => (\n <CommandPrimitive.Separator ref={ref} className={cn('bg-border -mx-1 h-px', className)} {...props} />\n ),\n);\n\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandItem\n * -------------------------------------------------------------------------- */\n\ntype CommandItemElement = React.ElementRef<typeof CommandPrimitive.Item>;\ntype CommandItemProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>;\n\nconst CommandItem = React.forwardRef<CommandItemElement, CommandItemProps>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n 'aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm aria-disabled:pointer-events-none aria-disabled:opacity-50 aria-selected:outline-none',\n className,\n )}\n {...props}\n />\n));\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandLoading\n * -------------------------------------------------------------------------- */\n\ntype CommandLoadingElement = React.ElementRef<typeof CommandPrimitive.Loading>;\ntype CommandLoadingProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Loading>;\n\nconst CommandLoading = React.forwardRef<CommandLoadingElement, CommandLoadingProps>(({ className, ...props }, ref) => (\n <CommandPrimitive.Loading ref={ref} className={cn('flex justify-center p-2', className)} {...props} />\n));\n\nCommandLoading.displayName = CommandPrimitive.Loading.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandShortcut\n * -------------------------------------------------------------------------- */\n\ntype CommandShortcutProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction CommandShortcut({ className, ...props }: CommandShortcutProps): React.JSX.Element {\n return <span className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandLoading,\n CommandShortcut,\n CommandSeparator,\n type CommandProps,\n type CommandDialogProps,\n type CommandInputProps,\n type CommandListProps,\n type CommandEmptyProps,\n type CommandGroupProps,\n type CommandItemProps,\n type CommandLoadingProps,\n type CommandShortcutProps,\n type CommandSeparatorProps,\n};\n"],"mappings":"iGAEA,UAAYA,MAAW,QACvB,OAAS,uBAAAC,MAA2B,wBACpC,OAAS,WAAWC,MAAwB,OAY1C,cAAAC,EAsCA,QAAAC,MAtCA,oBADF,IAAMC,EAAgB,aAAyC,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACvFL,EAACM,EAAA,CACC,IAAKD,EACL,UAAWE,EACT,4FACAJ,CACF,EACC,GAAGC,EACN,CACD,EAEDF,EAAQ,YAAcI,EAAiB,YAQvC,SAASE,EAAc,CAAE,SAAAC,EAAU,GAAGL,CAAM,EAA0C,CACpF,OACEJ,EAACU,EAAA,CAAQ,GAAGN,EACV,SAAAJ,EAACW,EAAA,CAAc,UAAU,MACvB,SAAAX,EAACE,EAAA,CAAQ,UAAU,2TAChB,SAAAO,EACH,EACF,EACF,CAEJ,CASA,IAAMG,EAAqB,aAAmD,CAAC,CAAE,UAAAT,EAAW,GAAGC,CAAM,EAAGC,IACtGJ,EAAC,OAAI,UAAU,wCAAwC,qBAAmB,GACxE,UAAAD,EAACa,EAAA,CAAoB,UAAU,6BAA6B,EAC5Db,EAACM,EAAiB,MAAjB,CACC,IAAKD,EACL,UAAWE,EACT,oJACAJ,CACF,EACC,GAAGC,EACN,GACF,CACD,EAEDQ,EAAa,YAAcN,EAAiB,MAAM,YASlD,IAAMQ,EAAoB,aAAiD,CAAC,CAAE,UAAAX,EAAW,GAAGC,CAAM,EAAGC,IACnGL,EAACM,EAAiB,KAAjB,CAAsB,IAAKD,EAAK,UAAWE,EAAG,6CAA8CJ,CAAS,EAAI,GAAGC,EAAO,CACrH,EAEDU,EAAY,YAAcR,EAAiB,KAAK,YAShD,IAAMS,EAAqB,aAAmD,CAACX,EAAOC,IACpFL,EAACM,EAAiB,MAAjB,CAAuB,IAAKD,EAAK,UAAU,2BAA4B,GAAGD,EAAO,CACnF,EAEDW,EAAa,YAAcT,EAAiB,MAAM,YASlD,IAAMU,EAAqB,aAAmD,CAAC,CAAE,UAAAb,EAAW,GAAGC,CAAM,EAAGC,IACtGL,EAACM,EAAiB,MAAjB,CACC,IAAKD,EACL,UAAWE,EACT,yNACAJ,CACF,EACC,GAAGC,EACN,CACD,EAEDY,EAAa,YAAcV,EAAiB,MAAM,YASlD,IAAMW,EAAyB,aAC7B,CAAC,CAAE,UAAAd,EAAW,GAAGC,CAAM,EAAGC,IACxBL,EAACM,EAAiB,UAAjB,CAA2B,IAAKD,EAAK,UAAWE,EAAG,uBAAwBJ,CAAS,EAAI,GAAGC,EAAO,CAEvG,EAEAa,EAAiB,YAAcX,EAAiB,UAAU,YAS1D,IAAMY,EAAoB,aAAiD,CAAC,CAAE,UAAAf,EAAW,GAAGC,CAAM,EAAGC,IACnGL,EAACM,EAAiB,KAAjB,CACC,IAAKD,EACL,UAAWE,EACT,0OACAJ,CACF,EACC,GAAGC,EACN,CACD,EAEDc,EAAY,YAAcZ,EAAiB,KAAK,YAShD,IAAMa,EAAuB,aAAuD,CAAC,CAAE,UAAAhB,EAAW,GAAGC,CAAM,EAAGC,IAC5GL,EAACM,EAAiB,QAAjB,CAAyB,IAAKD,EAAK,UAAWE,EAAG,0BAA2BJ,CAAS,EAAI,GAAGC,EAAO,CACrG,EAEDe,EAAe,YAAcb,EAAiB,QAAQ,YAQtD,SAASc,EAAgB,CAAE,UAAAjB,EAAW,GAAGC,CAAM,EAA4C,CACzF,OAAOJ,EAAC,QAAK,UAAWO,EAAG,wDAAyDJ,CAAS,EAAI,GAAGC,EAAO,CAC7G","names":["React","MagnifyingGlassIcon","CommandPrimitive","jsx","jsxs","Command","className","props","ref","CommandPrimitive","cn","CommandDialog","children","Dialog","DialogContent","CommandInput","MagnifyingGlassIcon","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandLoading","CommandShortcut"]}
1
+ {"version":3,"sources":["../../src/react/command.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { MagnifyingGlassIcon } from '@radix-ui/react-icons';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { cn } from '../lib/utils';\nimport { Dialog, DialogContent } from './dialog';\n\n/* -----------------------------------------------------------------------------\n * Component: Command\n * -------------------------------------------------------------------------- */\n\ntype CommandElement = React.ElementRef<typeof CommandPrimitive>;\ntype CommandProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive>;\n\nconst Command = React.forwardRef<CommandElement, CommandProps>(({ className, ...props }, forwardedRef) => (\n <CommandPrimitive\n ref={forwardedRef}\n className={cn(\n 'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',\n className,\n )}\n {...props}\n />\n));\n\nCommand.displayName = CommandPrimitive.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandDialog\n * -------------------------------------------------------------------------- */\n\ntype CommandDialogProps = React.ComponentProps<typeof Dialog>;\n\nfunction CommandDialog({ children, ...props }: CommandDialogProps): React.JSX.Element {\n return (\n <Dialog {...props}>\n <DialogContent className=\"p-0\">\n <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: CommandInput\n * -------------------------------------------------------------------------- */\n\ntype CommandInputElement = React.ElementRef<typeof CommandPrimitive.Input>;\ntype CommandInputProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>;\n\nconst CommandInput = React.forwardRef<CommandInputElement, CommandInputProps>(\n ({ className, ...props }, forwardedRef) => (\n <div className=\"flex items-center gap-2 border-b px-3\" cmdk-input-wrapper=\"\">\n <MagnifyingGlassIcon className=\"size-5 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={forwardedRef}\n className={cn(\n 'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent text-sm outline-none disabled:cursor-default disabled:opacity-50',\n className,\n )}\n {...props}\n />\n </div>\n ),\n);\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandList\n * -------------------------------------------------------------------------- */\n\ntype CommandListElement = React.ElementRef<typeof CommandPrimitive.List>;\ntype CommandListProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>;\n\nconst CommandList = React.forwardRef<CommandListElement, CommandListProps>(({ className, ...props }, forwardedRef) => (\n <CommandPrimitive.List\n ref={forwardedRef}\n className={cn('max-h-72 overflow-y-auto overflow-x-hidden', className)}\n {...props}\n />\n));\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandEmpty\n * -------------------------------------------------------------------------- */\n\ntype CommandEmptyElement = React.ElementRef<typeof CommandPrimitive.Empty>;\ntype CommandEmptyProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>;\n\nconst CommandEmpty = React.forwardRef<CommandEmptyElement, CommandEmptyProps>((props, forwardedRef) => (\n <CommandPrimitive.Empty ref={forwardedRef} className=\"py-6 text-center text-sm\" {...props} />\n));\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandGroup\n * -------------------------------------------------------------------------- */\n\ntype CommandGroupElement = React.ElementRef<typeof CommandPrimitive.Group>;\ntype CommandGroupProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>;\n\nconst CommandGroup = React.forwardRef<CommandGroupElement, CommandGroupProps>(\n ({ className, ...props }, forwardedRef) => (\n <CommandPrimitive.Group\n ref={forwardedRef}\n className={cn(\n 'text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium',\n className,\n )}\n {...props}\n />\n ),\n);\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandSeparator\n * -------------------------------------------------------------------------- */\n\ntype CommandSeparatorElement = React.ElementRef<typeof CommandPrimitive.Separator>;\ntype CommandSeparatorProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>;\n\nconst CommandSeparator = React.forwardRef<CommandSeparatorElement, CommandSeparatorProps>(\n ({ className, ...props }, forwardedRef) => (\n <CommandPrimitive.Separator ref={forwardedRef} className={cn('bg-border -mx-1 h-px', className)} {...props} />\n ),\n);\n\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandItem\n * -------------------------------------------------------------------------- */\n\ntype CommandItemElement = React.ElementRef<typeof CommandPrimitive.Item>;\ntype CommandItemProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>;\n\nconst CommandItem = React.forwardRef<CommandItemElement, CommandItemProps>(({ className, ...props }, forwardedRef) => (\n <CommandPrimitive.Item\n ref={forwardedRef}\n className={cn(\n 'aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm aria-disabled:pointer-events-none aria-disabled:opacity-50 aria-selected:outline-none',\n className,\n )}\n {...props}\n />\n));\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandLoading\n * -------------------------------------------------------------------------- */\n\ntype CommandLoadingElement = React.ElementRef<typeof CommandPrimitive.Loading>;\ntype CommandLoadingProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Loading>;\n\nconst CommandLoading = React.forwardRef<CommandLoadingElement, CommandLoadingProps>(\n ({ className, ...props }, forwardedRef) => (\n <CommandPrimitive.Loading ref={forwardedRef} className={cn('flex justify-center p-2', className)} {...props} />\n ),\n);\n\nCommandLoading.displayName = CommandPrimitive.Loading.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandShortcut\n * -------------------------------------------------------------------------- */\n\ntype CommandShortcutProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction CommandShortcut({ className, ...props }: CommandShortcutProps): React.JSX.Element {\n return <span className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandLoading,\n CommandShortcut,\n CommandSeparator,\n type CommandProps,\n type CommandDialogProps,\n type CommandInputProps,\n type CommandListProps,\n type CommandEmptyProps,\n type CommandGroupProps,\n type CommandItemProps,\n type CommandLoadingProps,\n type CommandShortcutProps,\n type CommandSeparatorProps,\n};\n"],"mappings":"iGAEA,UAAYA,MAAW,QACvB,OAAS,uBAAAC,MAA2B,wBACpC,OAAS,WAAWC,MAAwB,OAY1C,cAAAC,EAuCE,QAAAC,MAvCF,oBADF,IAAMC,EAAgB,aAAyC,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACvFL,EAACM,EAAA,CACC,IAAKD,EACL,UAAWE,EACT,4FACAJ,CACF,EACC,GAAGC,EACN,CACD,EAEDF,EAAQ,YAAcI,EAAiB,YAQvC,SAASE,EAAc,CAAE,SAAAC,EAAU,GAAGL,CAAM,EAA0C,CACpF,OACEJ,EAACU,EAAA,CAAQ,GAAGN,EACV,SAAAJ,EAACW,EAAA,CAAc,UAAU,MACvB,SAAAX,EAACE,EAAA,CAAQ,UAAU,2TAChB,SAAAO,EACH,EACF,EACF,CAEJ,CASA,IAAMG,EAAqB,aACzB,CAAC,CAAE,UAAAT,EAAW,GAAGC,CAAM,EAAGC,IACxBJ,EAAC,OAAI,UAAU,wCAAwC,qBAAmB,GACxE,UAAAD,EAACa,EAAA,CAAoB,UAAU,6BAA6B,EAC5Db,EAACM,EAAiB,MAAjB,CACC,IAAKD,EACL,UAAWE,EACT,gJACAJ,CACF,EACC,GAAGC,EACN,GACF,CAEJ,EAEAQ,EAAa,YAAcN,EAAiB,MAAM,YASlD,IAAMQ,EAAoB,aAAiD,CAAC,CAAE,UAAAX,EAAW,GAAGC,CAAM,EAAGC,IACnGL,EAACM,EAAiB,KAAjB,CACC,IAAKD,EACL,UAAWE,EAAG,6CAA8CJ,CAAS,EACpE,GAAGC,EACN,CACD,EAEDU,EAAY,YAAcR,EAAiB,KAAK,YAShD,IAAMS,EAAqB,aAAmD,CAACX,EAAOC,IACpFL,EAACM,EAAiB,MAAjB,CAAuB,IAAKD,EAAc,UAAU,2BAA4B,GAAGD,EAAO,CAC5F,EAEDW,EAAa,YAAcT,EAAiB,MAAM,YASlD,IAAMU,EAAqB,aACzB,CAAC,CAAE,UAAAb,EAAW,GAAGC,CAAM,EAAGC,IACxBL,EAACM,EAAiB,MAAjB,CACC,IAAKD,EACL,UAAWE,EACT,yNACAJ,CACF,EACC,GAAGC,EACN,CAEJ,EAEAY,EAAa,YAAcV,EAAiB,MAAM,YASlD,IAAMW,EAAyB,aAC7B,CAAC,CAAE,UAAAd,EAAW,GAAGC,CAAM,EAAGC,IACxBL,EAACM,EAAiB,UAAjB,CAA2B,IAAKD,EAAc,UAAWE,EAAG,uBAAwBJ,CAAS,EAAI,GAAGC,EAAO,CAEhH,EAEAa,EAAiB,YAAcX,EAAiB,UAAU,YAS1D,IAAMY,EAAoB,aAAiD,CAAC,CAAE,UAAAf,EAAW,GAAGC,CAAM,EAAGC,IACnGL,EAACM,EAAiB,KAAjB,CACC,IAAKD,EACL,UAAWE,EACT,0OACAJ,CACF,EACC,GAAGC,EACN,CACD,EAEDc,EAAY,YAAcZ,EAAiB,KAAK,YAShD,IAAMa,EAAuB,aAC3B,CAAC,CAAE,UAAAhB,EAAW,GAAGC,CAAM,EAAGC,IACxBL,EAACM,EAAiB,QAAjB,CAAyB,IAAKD,EAAc,UAAWE,EAAG,0BAA2BJ,CAAS,EAAI,GAAGC,EAAO,CAEjH,EAEAe,EAAe,YAAcb,EAAiB,QAAQ,YAQtD,SAASc,EAAgB,CAAE,UAAAjB,EAAW,GAAGC,CAAM,EAA4C,CACzF,OAAOJ,EAAC,QAAK,UAAWO,EAAG,wDAAyDJ,CAAS,EAAI,GAAGC,EAAO,CAC7G","names":["React","MagnifyingGlassIcon","CommandPrimitive","jsx","jsxs","Command","className","props","forwardedRef","CommandPrimitive","cn","CommandDialog","children","Dialog","DialogContent","CommandInput","MagnifyingGlassIcon","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandLoading","CommandShortcut"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/container.tsx"],"names":["React","Slot","jsx","Container","className","asChild","props","ref","cn"],"mappings":"0CAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBAgBZ,cAAAC,MAAA,oBAHT,IAAMC,EAAkB,aAA6C,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,GAAGC,CAAM,EAAGC,IAG/FL,EAFWG,EAAUJ,EAAO,MAE3B,CAAU,IAAKM,EAAK,UAAWC,EAAG,YAAaJ,CAAS,EAAI,GAAGE,EAAO,CAC/E,EAEDH,EAAU,YAAc","sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Container\n * -------------------------------------------------------------------------- */\n\ntype ContainerElement = HTMLDivElement;\n\ninterface ContainerProps extends React.HTMLAttributes<HTMLDivElement> {\n asChild?: boolean;\n}\n\nconst Container = React.forwardRef<ContainerElement, ContainerProps>(({ className, asChild, ...props }, ref) => {\n const Component = asChild ? Slot : 'div';\n\n return <Component ref={ref} className={cn('container', className)} {...props} />;\n});\n\nContainer.displayName = 'Container';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Container, type ContainerProps };\n"]}
1
+ {"version":3,"sources":["../../src/react/container.tsx"],"names":["React","Slot","jsx","Container","className","asChild","props","forwardedRef","cn"],"mappings":"0CAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBAiBV,cAAAC,MAAA,oBAJX,IAAMC,EAAkB,aACtB,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,GAAGC,CAAM,EAAGC,IAG1BL,EAFWG,EAAUJ,EAAO,MAE3B,CAAU,IAAKM,EAAc,UAAWC,EAAG,YAAaJ,CAAS,EAAI,GAAGE,EAAO,CAE3F,EAEAH,EAAU,YAAc","sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Container\n * -------------------------------------------------------------------------- */\n\ntype ContainerElement = HTMLDivElement;\n\ninterface ContainerProps extends React.HTMLAttributes<HTMLDivElement> {\n asChild?: boolean;\n}\n\nconst Container = React.forwardRef<ContainerElement, ContainerProps>(\n ({ className, asChild, ...props }, forwardedRef) => {\n const Component = asChild ? Slot : 'div';\n\n return <Component ref={forwardedRef} className={cn('container', className)} {...props} />;\n },\n);\n\nContainer.displayName = 'Container';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Container, type ContainerProps };\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/container.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Container\n * -------------------------------------------------------------------------- */\n\ntype ContainerElement = HTMLDivElement;\n\ninterface ContainerProps extends React.HTMLAttributes<HTMLDivElement> {\n asChild?: boolean;\n}\n\nconst Container = React.forwardRef<ContainerElement, ContainerProps>(({ className, asChild, ...props }, ref) => {\n const Component = asChild ? Slot : 'div';\n\n return <Component ref={ref} className={cn('container', className)} {...props} />;\n});\n\nContainer.displayName = 'Container';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Container, type ContainerProps };\n"],"mappings":"yCAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBAgBZ,cAAAC,MAAA,oBAHT,IAAMC,EAAkB,aAA6C,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,GAAGC,CAAM,EAAGC,IAG/FL,EAFWG,EAAUG,EAAO,MAE3B,CAAU,IAAKD,EAAK,UAAWE,EAAG,YAAaL,CAAS,EAAI,GAAGE,EAAO,CAC/E,EAEDH,EAAU,YAAc","names":["React","Slot","jsx","Container","className","asChild","props","ref","Slot","cn"]}
1
+ {"version":3,"sources":["../../src/react/container.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Container\n * -------------------------------------------------------------------------- */\n\ntype ContainerElement = HTMLDivElement;\n\ninterface ContainerProps extends React.HTMLAttributes<HTMLDivElement> {\n asChild?: boolean;\n}\n\nconst Container = React.forwardRef<ContainerElement, ContainerProps>(\n ({ className, asChild, ...props }, forwardedRef) => {\n const Component = asChild ? Slot : 'div';\n\n return <Component ref={forwardedRef} className={cn('container', className)} {...props} />;\n },\n);\n\nContainer.displayName = 'Container';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Container, type ContainerProps };\n"],"mappings":"yCAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBAiBV,cAAAC,MAAA,oBAJX,IAAMC,EAAkB,aACtB,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,GAAGC,CAAM,EAAGC,IAG1BL,EAFWG,EAAUG,EAAO,MAE3B,CAAU,IAAKD,EAAc,UAAWE,EAAG,YAAaL,CAAS,EAAI,GAAGE,EAAO,CAE3F,EAEAH,EAAU,YAAc","names":["React","Slot","jsx","Container","className","asChild","props","forwardedRef","Slot","cn"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/context-menu.tsx"],"names":["React","ContextMenuPrimitive","CheckIcon","ChevronRightIcon","DotFilledIcon","jsx","jsxs","ContextMenu","ContextMenuTrigger","ContextMenuGroup","ContextMenuSub","ContextMenuRadioGroup","ContextMenuSubTrigger","children","className","inset","props","ref","cn","ContextMenuSubContent","ContextMenuContent","ContextMenuItem","ContextMenuCheckboxItem","checked","ContextMenuRadioItem","ContextMenuLabel","ContextMenuSeparator","ContextMenuShortcut","ContextMenuArrow"],"mappings":"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","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as ContextMenuPrimitive from '@radix-ui/react-context-menu';\nimport { CheckIcon, ChevronRightIcon, DotFilledIcon } from '@radix-ui/react-icons';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenu\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuProps = React.ComponentProps<typeof ContextMenuPrimitive.Root>;\nconst ContextMenu = ContextMenuPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuTrigger\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuTriggerProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Trigger>;\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuGroup\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuGroupProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Group>;\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSub\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSubProps = React.ComponentProps<typeof ContextMenuPrimitive.Sub>;\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuRadioGroup\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuRadioGroupProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioGroup>;\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSubTriggerElement = React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>;\n\ninterface ContextMenuSubTriggerProps extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> {\n inset?: boolean;\n}\n\nconst ContextMenuSubTrigger = React.forwardRef<ContextMenuSubTriggerElement, ContextMenuSubTriggerProps>(\n ({ children, className, inset, ...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-pointer 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 ),\n);\n\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSubContent\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSubContentElement = React.ElementRef<typeof ContextMenuPrimitive.SubContent>;\ntype ContextMenuSubContentProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>;\n\nconst ContextMenuSubContent = React.forwardRef<ContextMenuSubContentElement, 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 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=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-32 rounded-md border p-1 shadow-md',\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n ),\n);\n\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuContent\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuContentElement = React.ElementRef<typeof ContextMenuPrimitive.Content>;\ntype ContextMenuContentProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>;\n\nconst ContextMenuContent = React.forwardRef<ContextMenuContentElement, 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 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-32 rounded-md border p-1 shadow-md',\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n ),\n);\n\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuItem\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuItemElement = React.ElementRef<typeof ContextMenuPrimitive.Item>;\n\ninterface ContextMenuItemProps extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> {\n inset?: boolean;\n}\n\nconst ContextMenuItem = React.forwardRef<ContextMenuItemElement, ContextMenuItemProps>(\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-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n ),\n);\n\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuCheckboxItem\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuCheckboxItemElement = React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>;\ntype ContextMenuCheckboxItemProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem>;\n\nconst ContextMenuCheckboxItem = React.forwardRef<ContextMenuCheckboxItemElement, ContextMenuCheckboxItemProps>(\n ({ children, className, checked, ...props }, ref) => (\n <ContextMenuPrimitive.CheckboxItem\n ref={ref}\n checked={checked}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\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 ),\n);\n\nContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuRadioItem\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuRadioItemElement = React.ElementRef<typeof ContextMenuPrimitive.RadioItem>;\ntype ContextMenuRadioItemProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem>;\n\nconst ContextMenuRadioItem = React.forwardRef<ContextMenuRadioItemElement, ContextMenuRadioItemProps>(\n ({ children, className, ...props }, ref) => (\n <ContextMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\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 ),\n);\n\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuLabel\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuLabelElement = React.ElementRef<typeof ContextMenuPrimitive.Label>;\n\ninterface ContextMenuLabelProps extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> {\n inset?: boolean;\n}\n\nconst ContextMenuLabel = React.forwardRef<ContextMenuLabelElement, ContextMenuLabelProps>(\n ({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.Label\n ref={ref}\n className={cn('text-foreground px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n ),\n);\n\nContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSeparator\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSeparatorElement = React.ElementRef<typeof ContextMenuPrimitive.Separator>;\ntype ContextMenuSeparatorProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>;\n\nconst ContextMenuSeparator = React.forwardRef<ContextMenuSeparatorElement, ContextMenuSeparatorProps>(\n ({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Separator ref={ref} className={cn('bg-border -mx-1 my-1 h-px', className)} {...props} />\n ),\n);\n\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuShortcut\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuShortcutProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction ContextMenuShortcut({ className, ...props }: ContextMenuShortcutProps): React.JSX.Element {\n return <span className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuArrow\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuArrowElement = React.ElementRef<typeof ContextMenuPrimitive.Arrow>;\ntype ContextMenuArrowProps = ContextMenuPrimitive.ContextMenuArrowProps;\n\nconst ContextMenuArrow = React.forwardRef<ContextMenuArrowElement, ContextMenuArrowProps>(\n ({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Arrow ref={ref} className={cn('fill-popover', className)} {...props} />\n ),\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 type ContextMenuProps,\n type ContextMenuTriggerProps,\n type ContextMenuContentProps,\n type ContextMenuItemProps,\n type ContextMenuCheckboxItemProps,\n type ContextMenuRadioItemProps,\n type ContextMenuLabelProps,\n type ContextMenuSeparatorProps,\n type ContextMenuShortcutProps,\n type ContextMenuGroupProps,\n type ContextMenuSubProps,\n type ContextMenuSubContentProps,\n type ContextMenuSubTriggerProps,\n type ContextMenuRadioGroupProps,\n type ContextMenuArrowProps,\n};\n"]}
1
+ {"version":3,"sources":["../../src/react/context-menu.tsx"],"names":["React","ContextMenuPrimitive","CheckIcon","ChevronRightIcon","DotFilledIcon","jsx","jsxs","ContextMenu","ContextMenuTrigger","ContextMenuGroup","ContextMenuSub","ContextMenuRadioGroup","ContextMenuSubTrigger","children","className","inset","props","forwardedRef","cn","ContextMenuSubContent","ContextMenuContent","ContextMenuItem","ContextMenuCheckboxItem","checked","ContextMenuRadioItem","ContextMenuLabel","ContextMenuSeparator","ContextMenuShortcut","ContextMenuArrow"],"mappings":"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","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as ContextMenuPrimitive from '@radix-ui/react-context-menu';\nimport { CheckIcon, ChevronRightIcon, DotFilledIcon } from '@radix-ui/react-icons';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenu\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuProps = React.ComponentProps<typeof ContextMenuPrimitive.Root>;\nconst ContextMenu = ContextMenuPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuTrigger\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuTriggerProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Trigger>;\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuGroup\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuGroupProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Group>;\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSub\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSubProps = React.ComponentProps<typeof ContextMenuPrimitive.Sub>;\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuRadioGroup\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuRadioGroupProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioGroup>;\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSubTriggerElement = React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>;\n\ninterface ContextMenuSubTriggerProps extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> {\n inset?: boolean;\n}\n\nconst ContextMenuSubTrigger = React.forwardRef<ContextMenuSubTriggerElement, ContextMenuSubTriggerProps>(\n ({ children, className, inset, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.SubTrigger\n ref={forwardedRef}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </ContextMenuPrimitive.SubTrigger>\n ),\n);\n\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSubContent\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSubContentElement = React.ElementRef<typeof ContextMenuPrimitive.SubContent>;\ntype ContextMenuSubContentProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>;\n\nconst ContextMenuSubContent = React.forwardRef<ContextMenuSubContentElement, ContextMenuSubContentProps>(\n ({ className, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.SubContent\n ref={forwardedRef}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=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-32 rounded-md border p-1 shadow-md',\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n ),\n);\n\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuContent\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuContentElement = React.ElementRef<typeof ContextMenuPrimitive.Content>;\ntype ContextMenuContentProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>;\n\nconst ContextMenuContent = React.forwardRef<ContextMenuContentElement, ContextMenuContentProps>(\n ({ className, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n ref={forwardedRef}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 z-50 min-w-32 rounded-md border p-1 shadow-md',\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n ),\n);\n\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuItem\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuItemElement = React.ElementRef<typeof ContextMenuPrimitive.Item>;\n\ninterface ContextMenuItemProps extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> {\n inset?: boolean;\n}\n\nconst ContextMenuItem = React.forwardRef<ContextMenuItemElement, ContextMenuItemProps>(\n ({ className, inset, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.Item\n ref={forwardedRef}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n ),\n);\n\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuCheckboxItem\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuCheckboxItemElement = React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>;\ntype ContextMenuCheckboxItemProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem>;\n\nconst ContextMenuCheckboxItem = React.forwardRef<ContextMenuCheckboxItemElement, ContextMenuCheckboxItemProps>(\n ({ children, className, checked, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.CheckboxItem\n ref={forwardedRef}\n checked={checked}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\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 ),\n);\n\nContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuRadioItem\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuRadioItemElement = React.ElementRef<typeof ContextMenuPrimitive.RadioItem>;\ntype ContextMenuRadioItemProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem>;\n\nconst ContextMenuRadioItem = React.forwardRef<ContextMenuRadioItemElement, ContextMenuRadioItemProps>(\n ({ children, className, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.RadioItem\n ref={forwardedRef}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\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 ),\n);\n\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuLabel\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuLabelElement = React.ElementRef<typeof ContextMenuPrimitive.Label>;\n\ninterface ContextMenuLabelProps extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> {\n inset?: boolean;\n}\n\nconst ContextMenuLabel = React.forwardRef<ContextMenuLabelElement, ContextMenuLabelProps>(\n ({ className, inset, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.Label\n ref={forwardedRef}\n className={cn('text-foreground px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n ),\n);\n\nContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSeparator\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSeparatorElement = React.ElementRef<typeof ContextMenuPrimitive.Separator>;\ntype ContextMenuSeparatorProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>;\n\nconst ContextMenuSeparator = React.forwardRef<ContextMenuSeparatorElement, ContextMenuSeparatorProps>(\n ({ className, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.Separator\n ref={forwardedRef}\n className={cn('bg-border -mx-1 my-1 h-px', className)}\n {...props}\n />\n ),\n);\n\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuShortcut\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuShortcutProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction ContextMenuShortcut({ className, ...props }: ContextMenuShortcutProps): React.JSX.Element {\n return <span className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuArrow\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuArrowElement = React.ElementRef<typeof ContextMenuPrimitive.Arrow>;\ntype ContextMenuArrowProps = ContextMenuPrimitive.ContextMenuArrowProps;\n\nconst ContextMenuArrow = React.forwardRef<ContextMenuArrowElement, ContextMenuArrowProps>(\n ({ className, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.Arrow ref={forwardedRef} className={cn('fill-popover', className)} {...props} />\n ),\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 type ContextMenuProps,\n type ContextMenuTriggerProps,\n type ContextMenuContentProps,\n type ContextMenuItemProps,\n type ContextMenuCheckboxItemProps,\n type ContextMenuRadioItemProps,\n type ContextMenuLabelProps,\n type ContextMenuSeparatorProps,\n type ContextMenuShortcutProps,\n type ContextMenuGroupProps,\n type ContextMenuSubProps,\n type ContextMenuSubContentProps,\n type ContextMenuSubTriggerProps,\n type ContextMenuRadioGroupProps,\n type ContextMenuArrowProps,\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/context-menu.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as ContextMenuPrimitive from '@radix-ui/react-context-menu';\nimport { CheckIcon, ChevronRightIcon, DotFilledIcon } from '@radix-ui/react-icons';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenu\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuProps = React.ComponentProps<typeof ContextMenuPrimitive.Root>;\nconst ContextMenu = ContextMenuPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuTrigger\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuTriggerProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Trigger>;\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuGroup\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuGroupProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Group>;\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSub\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSubProps = React.ComponentProps<typeof ContextMenuPrimitive.Sub>;\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuRadioGroup\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuRadioGroupProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioGroup>;\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSubTriggerElement = React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>;\n\ninterface ContextMenuSubTriggerProps extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> {\n inset?: boolean;\n}\n\nconst ContextMenuSubTrigger = React.forwardRef<ContextMenuSubTriggerElement, ContextMenuSubTriggerProps>(\n ({ children, className, inset, ...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-pointer 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 ),\n);\n\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSubContent\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSubContentElement = React.ElementRef<typeof ContextMenuPrimitive.SubContent>;\ntype ContextMenuSubContentProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>;\n\nconst ContextMenuSubContent = React.forwardRef<ContextMenuSubContentElement, 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 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=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-32 rounded-md border p-1 shadow-md',\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n ),\n);\n\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuContent\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuContentElement = React.ElementRef<typeof ContextMenuPrimitive.Content>;\ntype ContextMenuContentProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>;\n\nconst ContextMenuContent = React.forwardRef<ContextMenuContentElement, 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 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-32 rounded-md border p-1 shadow-md',\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n ),\n);\n\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuItem\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuItemElement = React.ElementRef<typeof ContextMenuPrimitive.Item>;\n\ninterface ContextMenuItemProps extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> {\n inset?: boolean;\n}\n\nconst ContextMenuItem = React.forwardRef<ContextMenuItemElement, ContextMenuItemProps>(\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-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n ),\n);\n\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuCheckboxItem\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuCheckboxItemElement = React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>;\ntype ContextMenuCheckboxItemProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem>;\n\nconst ContextMenuCheckboxItem = React.forwardRef<ContextMenuCheckboxItemElement, ContextMenuCheckboxItemProps>(\n ({ children, className, checked, ...props }, ref) => (\n <ContextMenuPrimitive.CheckboxItem\n ref={ref}\n checked={checked}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\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 ),\n);\n\nContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuRadioItem\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuRadioItemElement = React.ElementRef<typeof ContextMenuPrimitive.RadioItem>;\ntype ContextMenuRadioItemProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem>;\n\nconst ContextMenuRadioItem = React.forwardRef<ContextMenuRadioItemElement, ContextMenuRadioItemProps>(\n ({ children, className, ...props }, ref) => (\n <ContextMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\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 ),\n);\n\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuLabel\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuLabelElement = React.ElementRef<typeof ContextMenuPrimitive.Label>;\n\ninterface ContextMenuLabelProps extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> {\n inset?: boolean;\n}\n\nconst ContextMenuLabel = React.forwardRef<ContextMenuLabelElement, ContextMenuLabelProps>(\n ({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.Label\n ref={ref}\n className={cn('text-foreground px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n ),\n);\n\nContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSeparator\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSeparatorElement = React.ElementRef<typeof ContextMenuPrimitive.Separator>;\ntype ContextMenuSeparatorProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>;\n\nconst ContextMenuSeparator = React.forwardRef<ContextMenuSeparatorElement, ContextMenuSeparatorProps>(\n ({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Separator ref={ref} className={cn('bg-border -mx-1 my-1 h-px', className)} {...props} />\n ),\n);\n\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuShortcut\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuShortcutProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction ContextMenuShortcut({ className, ...props }: ContextMenuShortcutProps): React.JSX.Element {\n return <span className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuArrow\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuArrowElement = React.ElementRef<typeof ContextMenuPrimitive.Arrow>;\ntype ContextMenuArrowProps = ContextMenuPrimitive.ContextMenuArrowProps;\n\nconst ContextMenuArrow = React.forwardRef<ContextMenuArrowElement, ContextMenuArrowProps>(\n ({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Arrow ref={ref} className={cn('fill-popover', className)} {...props} />\n ),\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 type ContextMenuProps,\n type ContextMenuTriggerProps,\n type ContextMenuContentProps,\n type ContextMenuItemProps,\n type ContextMenuCheckboxItemProps,\n type ContextMenuRadioItemProps,\n type ContextMenuLabelProps,\n type ContextMenuSeparatorProps,\n type ContextMenuShortcutProps,\n type ContextMenuGroupProps,\n type ContextMenuSubProps,\n type ContextMenuSubContentProps,\n type ContextMenuSubTriggerProps,\n type ContextMenuRadioGroupProps,\n type ContextMenuArrowProps,\n};\n"],"mappings":"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","names":["React","ContextMenuPrimitive","CheckIcon","ChevronRightIcon","DotFilledIcon","jsx","jsxs","ContextMenu","ContextMenuTrigger","ContextMenuGroup","ContextMenuSub","ContextMenuRadioGroup","ContextMenuSubTrigger","children","className","inset","props","ref","cn","ChevronRightIcon","ContextMenuSubContent","ContextMenuContent","ContextMenuItem","ContextMenuCheckboxItem","checked","CheckIcon","ContextMenuRadioItem","DotFilledIcon","ContextMenuLabel","ContextMenuSeparator","ContextMenuShortcut","ContextMenuArrow"]}
1
+ {"version":3,"sources":["../../src/react/context-menu.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as ContextMenuPrimitive from '@radix-ui/react-context-menu';\nimport { CheckIcon, ChevronRightIcon, DotFilledIcon } from '@radix-ui/react-icons';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenu\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuProps = React.ComponentProps<typeof ContextMenuPrimitive.Root>;\nconst ContextMenu = ContextMenuPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuTrigger\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuTriggerProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Trigger>;\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuGroup\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuGroupProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Group>;\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSub\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSubProps = React.ComponentProps<typeof ContextMenuPrimitive.Sub>;\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuRadioGroup\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuRadioGroupProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioGroup>;\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSubTriggerElement = React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>;\n\ninterface ContextMenuSubTriggerProps extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> {\n inset?: boolean;\n}\n\nconst ContextMenuSubTrigger = React.forwardRef<ContextMenuSubTriggerElement, ContextMenuSubTriggerProps>(\n ({ children, className, inset, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.SubTrigger\n ref={forwardedRef}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </ContextMenuPrimitive.SubTrigger>\n ),\n);\n\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSubContent\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSubContentElement = React.ElementRef<typeof ContextMenuPrimitive.SubContent>;\ntype ContextMenuSubContentProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>;\n\nconst ContextMenuSubContent = React.forwardRef<ContextMenuSubContentElement, ContextMenuSubContentProps>(\n ({ className, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.SubContent\n ref={forwardedRef}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=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-32 rounded-md border p-1 shadow-md',\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n ),\n);\n\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuContent\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuContentElement = React.ElementRef<typeof ContextMenuPrimitive.Content>;\ntype ContextMenuContentProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>;\n\nconst ContextMenuContent = React.forwardRef<ContextMenuContentElement, ContextMenuContentProps>(\n ({ className, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n ref={forwardedRef}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 z-50 min-w-32 rounded-md border p-1 shadow-md',\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n ),\n);\n\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuItem\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuItemElement = React.ElementRef<typeof ContextMenuPrimitive.Item>;\n\ninterface ContextMenuItemProps extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> {\n inset?: boolean;\n}\n\nconst ContextMenuItem = React.forwardRef<ContextMenuItemElement, ContextMenuItemProps>(\n ({ className, inset, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.Item\n ref={forwardedRef}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n ),\n);\n\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuCheckboxItem\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuCheckboxItemElement = React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>;\ntype ContextMenuCheckboxItemProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem>;\n\nconst ContextMenuCheckboxItem = React.forwardRef<ContextMenuCheckboxItemElement, ContextMenuCheckboxItemProps>(\n ({ children, className, checked, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.CheckboxItem\n ref={forwardedRef}\n checked={checked}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\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 ),\n);\n\nContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuRadioItem\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuRadioItemElement = React.ElementRef<typeof ContextMenuPrimitive.RadioItem>;\ntype ContextMenuRadioItemProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem>;\n\nconst ContextMenuRadioItem = React.forwardRef<ContextMenuRadioItemElement, ContextMenuRadioItemProps>(\n ({ children, className, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.RadioItem\n ref={forwardedRef}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\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 ),\n);\n\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuLabel\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuLabelElement = React.ElementRef<typeof ContextMenuPrimitive.Label>;\n\ninterface ContextMenuLabelProps extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> {\n inset?: boolean;\n}\n\nconst ContextMenuLabel = React.forwardRef<ContextMenuLabelElement, ContextMenuLabelProps>(\n ({ className, inset, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.Label\n ref={forwardedRef}\n className={cn('text-foreground px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n ),\n);\n\nContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSeparator\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSeparatorElement = React.ElementRef<typeof ContextMenuPrimitive.Separator>;\ntype ContextMenuSeparatorProps = React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>;\n\nconst ContextMenuSeparator = React.forwardRef<ContextMenuSeparatorElement, ContextMenuSeparatorProps>(\n ({ className, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.Separator\n ref={forwardedRef}\n className={cn('bg-border -mx-1 my-1 h-px', className)}\n {...props}\n />\n ),\n);\n\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuShortcut\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuShortcutProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction ContextMenuShortcut({ className, ...props }: ContextMenuShortcutProps): React.JSX.Element {\n return <span className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuArrow\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuArrowElement = React.ElementRef<typeof ContextMenuPrimitive.Arrow>;\ntype ContextMenuArrowProps = ContextMenuPrimitive.ContextMenuArrowProps;\n\nconst ContextMenuArrow = React.forwardRef<ContextMenuArrowElement, ContextMenuArrowProps>(\n ({ className, ...props }, forwardedRef) => (\n <ContextMenuPrimitive.Arrow ref={forwardedRef} className={cn('fill-popover', className)} {...props} />\n ),\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 type ContextMenuProps,\n type ContextMenuTriggerProps,\n type ContextMenuContentProps,\n type ContextMenuItemProps,\n type ContextMenuCheckboxItemProps,\n type ContextMenuRadioItemProps,\n type ContextMenuLabelProps,\n type ContextMenuSeparatorProps,\n type ContextMenuShortcutProps,\n type ContextMenuGroupProps,\n type ContextMenuSubProps,\n type ContextMenuSubContentProps,\n type ContextMenuSubTriggerProps,\n type ContextMenuRadioGroupProps,\n type ContextMenuArrowProps,\n};\n"],"mappings":"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","names":["React","ContextMenuPrimitive","CheckIcon","ChevronRightIcon","DotFilledIcon","jsx","jsxs","ContextMenu","ContextMenuTrigger","ContextMenuGroup","ContextMenuSub","ContextMenuRadioGroup","ContextMenuSubTrigger","children","className","inset","props","forwardedRef","cn","ChevronRightIcon","ContextMenuSubContent","ContextMenuContent","ContextMenuItem","ContextMenuCheckboxItem","checked","CheckIcon","ContextMenuRadioItem","DotFilledIcon","ContextMenuLabel","ContextMenuSeparator","ContextMenuShortcut","ContextMenuArrow"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunk3OEPCFBFcjs = require('../chunk-3OEPCFBF.cjs');var _chunkGCHNSK5Ocjs = require('../chunk-GCHNSK5O.cjs');var _chunk2OBTJ7SDcjs = require('../chunk-2OBTJ7SD.cjs');require('../chunk-F5TIIJJJ.cjs');var _chunkNU6SK3FCcjs = require('../chunk-NU6SK3FC.cjs');var _reacticons = require('@radix-ui/react-icons');var _jsxruntime = require('react/jsx-runtime');function A({table:a}){return _jsxruntime.jsxs.call(void 0, _chunkGCHNSK5Ocjs.a,{children:[_jsxruntime.jsx.call(void 0, _chunkGCHNSK5Ocjs.b,{asChild:!0,children:_jsxruntime.jsxs.call(void 0, _chunk2OBTJ7SDcjs.b,{className:"ml-auto hidden h-8 lg:flex",size:"sm",variant:"outline",children:[_jsxruntime.jsx.call(void 0, _reacticons.MixerHorizontalIcon,{className:"mr-2 size-4"}),"View"]})}),_jsxruntime.jsxs.call(void 0, _chunkGCHNSK5Ocjs.h,{align:"end",className:"w-36",children:[_jsxruntime.jsx.call(void 0, _chunkGCHNSK5Ocjs.l,{children:"Toggle columns"}),_jsxruntime.jsx.call(void 0, _chunkGCHNSK5Ocjs.m,{}),a.getAllColumns().filter(n=>typeof n.accessorFn<"u"&&n.getCanHide()).map(n=>_jsxruntime.jsx.call(void 0, _chunkGCHNSK5Ocjs.j,{checked:n.getIsVisible(),className:"capitalize",onCheckedChange:s=>{n.toggleVisibility(!!s)},children:n.id},n.id))]})]})}function B({table:a,className:n,...s}){return _jsxruntime.jsxs.call(void 0, "div",{className:_chunkNU6SK3FCcjs.a.call(void 0, "flex items-center justify-between px-2",n),...s,children:[_jsxruntime.jsxs.call(void 0, "div",{className:"text-muted-foreground flex-1 text-sm",children:[a.getFilteredSelectedRowModel().rows.length," of ",a.getFilteredRowModel().rows.length," row(s) selected."]}),_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-center space-x-6 lg:space-x-8",children:[_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-center space-x-2",children:[_jsxruntime.jsx.call(void 0, "p",{className:"text-sm font-medium",children:"Rows per page"}),_jsxruntime.jsxs.call(void 0, _chunk3OEPCFBFcjs.a,{value:String(a.getState().pagination.pageSize),onValueChange:i=>{a.setPageSize(Number(i))},children:[_jsxruntime.jsx.call(void 0, _chunk3OEPCFBFcjs.d,{className:"w-18 h-8",children:_jsxruntime.jsx.call(void 0, _chunk3OEPCFBFcjs.c,{placeholder:a.getState().pagination.pageSize})}),_jsxruntime.jsx.call(void 0, _chunk3OEPCFBFcjs.g,{side:"top",children:[10,20,30,40,50].map(i=>_jsxruntime.jsx.call(void 0, _chunk3OEPCFBFcjs.i,{value:String(i),children:i},i))})]})]}),_jsxruntime.jsxs.call(void 0, "div",{className:"flex w-28 items-center justify-center text-sm font-medium",children:["Page ",a.getState().pagination.pageIndex+1," of ",a.getPageCount()]}),_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-center space-x-2",children:[_jsxruntime.jsxs.call(void 0, _chunk2OBTJ7SDcjs.b,{className:"hidden lg:flex",disabled:!a.getCanPreviousPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.setPageIndex(0)},children:[_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Go to first page"}),_jsxruntime.jsx.call(void 0, _reacticons.DoubleArrowLeftIcon,{className:"size-4"})]}),_jsxruntime.jsxs.call(void 0, _chunk2OBTJ7SDcjs.b,{disabled:!a.getCanPreviousPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.previousPage()},children:[_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Go to previous page"}),_jsxruntime.jsx.call(void 0, _reacticons.ChevronLeftIcon,{className:"size-4"})]}),_jsxruntime.jsxs.call(void 0, _chunk2OBTJ7SDcjs.b,{disabled:!a.getCanNextPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.nextPage()},children:[_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Go to next page"}),_jsxruntime.jsx.call(void 0, _reacticons.ChevronRightIcon,{className:"size-4"})]}),_jsxruntime.jsxs.call(void 0, _chunk2OBTJ7SDcjs.b,{className:"hidden lg:flex",disabled:!a.getCanNextPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.setPageIndex(a.getPageCount()-1)},children:[_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Go to last page"}),_jsxruntime.jsx.call(void 0, _reacticons.DoubleArrowRightIcon,{className:"size-4"})]})]})]})]})}function L({column:a,title:n,className:s}){return a.getCanSort()?_jsxruntime.jsx.call(void 0, "div",{className:_chunkNU6SK3FCcjs.a.call(void 0, "flex items-center space-x-2",s),children:_jsxruntime.jsxs.call(void 0, _chunkGCHNSK5Ocjs.a,{children:[_jsxruntime.jsx.call(void 0, _chunkGCHNSK5Ocjs.b,{asChild:!0,children:_jsxruntime.jsxs.call(void 0, _chunk2OBTJ7SDcjs.b,{className:"data-[state=open]:bg-accent -ml-3",size:"xs",variant:"ghost",children:[_jsxruntime.jsx.call(void 0, "span",{children:n}),_jsxruntime.jsx.call(void 0, z,{sorted:a.getIsSorted()})]})}),_jsxruntime.jsxs.call(void 0, _chunkGCHNSK5Ocjs.h,{align:"start",children:[_jsxruntime.jsxs.call(void 0, _chunkGCHNSK5Ocjs.i,{onClick:()=>{a.toggleSorting(!1)},children:[_jsxruntime.jsx.call(void 0, _reacticons.ArrowUpIcon,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Asc"]}),_jsxruntime.jsxs.call(void 0, _chunkGCHNSK5Ocjs.i,{onClick:()=>{a.toggleSorting(!0)},children:[_jsxruntime.jsx.call(void 0, _reacticons.ArrowDownIcon,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Desc"]}),_jsxruntime.jsx.call(void 0, _chunkGCHNSK5Ocjs.m,{}),_jsxruntime.jsxs.call(void 0, _chunkGCHNSK5Ocjs.i,{onClick:()=>{a.toggleVisibility(!1)},children:[_jsxruntime.jsx.call(void 0, _reacticons.EyeNoneIcon,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Hide"]})]})]})}):_jsxruntime.jsx.call(void 0, "div",{className:s,children:n})}function z({sorted:a}){switch(a){case"desc":return _jsxruntime.jsx.call(void 0, _reacticons.ArrowDownIcon,{className:"ml-2 size-4"});case"asc":return _jsxruntime.jsx.call(void 0, _reacticons.ArrowUpIcon,{className:"ml-2 size-4"});default:return _jsxruntime.jsx.call(void 0, _reacticons.CaretSortIcon,{className:"ml-2 size-4"})}}exports.DataTableColumnHeader = L; exports.DataTablePagination = B; exports.DataTableViewOptions = A;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunk6UQKMUZGcjs = require('../chunk-6UQKMUZG.cjs');var _chunkJMM2MTPIcjs = require('../chunk-JMM2MTPI.cjs');var _chunkWKKCZQNOcjs = require('../chunk-WKKCZQNO.cjs');require('../chunk-LOJBMYTH.cjs');var _chunkNU6SK3FCcjs = require('../chunk-NU6SK3FC.cjs');var _reacticons = require('@radix-ui/react-icons');var _jsxruntime = require('react/jsx-runtime');function A({table:a}){return _jsxruntime.jsxs.call(void 0, _chunkJMM2MTPIcjs.a,{children:[_jsxruntime.jsx.call(void 0, _chunkJMM2MTPIcjs.b,{asChild:!0,children:_jsxruntime.jsxs.call(void 0, _chunkWKKCZQNOcjs.b,{className:"ml-auto hidden h-8 lg:flex",size:"sm",variant:"outline",children:[_jsxruntime.jsx.call(void 0, _reacticons.MixerHorizontalIcon,{className:"mr-2 size-4"}),"View"]})}),_jsxruntime.jsxs.call(void 0, _chunkJMM2MTPIcjs.h,{align:"end",className:"w-36",children:[_jsxruntime.jsx.call(void 0, _chunkJMM2MTPIcjs.l,{children:"Toggle columns"}),_jsxruntime.jsx.call(void 0, _chunkJMM2MTPIcjs.m,{}),a.getAllColumns().filter(n=>typeof n.accessorFn<"u"&&n.getCanHide()).map(n=>_jsxruntime.jsx.call(void 0, _chunkJMM2MTPIcjs.j,{checked:n.getIsVisible(),className:"capitalize",onCheckedChange:s=>{n.toggleVisibility(!!s)},children:n.id},n.id))]})]})}function B({table:a,className:n,...s}){return _jsxruntime.jsxs.call(void 0, "div",{className:_chunkNU6SK3FCcjs.a.call(void 0, "flex items-center justify-between px-2",n),...s,children:[_jsxruntime.jsxs.call(void 0, "div",{className:"text-muted-foreground flex-1 text-sm",children:[a.getFilteredSelectedRowModel().rows.length," of ",a.getFilteredRowModel().rows.length," row(s) selected."]}),_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-center space-x-6 lg:space-x-8",children:[_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-center space-x-2",children:[_jsxruntime.jsx.call(void 0, "p",{className:"text-sm font-medium",children:"Rows per page"}),_jsxruntime.jsxs.call(void 0, _chunk6UQKMUZGcjs.a,{value:String(a.getState().pagination.pageSize),onValueChange:i=>{a.setPageSize(Number(i))},children:[_jsxruntime.jsx.call(void 0, _chunk6UQKMUZGcjs.d,{className:"w-18 h-8",children:_jsxruntime.jsx.call(void 0, _chunk6UQKMUZGcjs.c,{placeholder:a.getState().pagination.pageSize})}),_jsxruntime.jsx.call(void 0, _chunk6UQKMUZGcjs.g,{side:"top",children:[10,20,30,40,50].map(i=>_jsxruntime.jsx.call(void 0, _chunk6UQKMUZGcjs.i,{value:String(i),children:i},i))})]})]}),_jsxruntime.jsxs.call(void 0, "div",{className:"flex w-28 items-center justify-center text-sm font-medium",children:["Page ",a.getState().pagination.pageIndex+1," of ",a.getPageCount()]}),_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-center space-x-2",children:[_jsxruntime.jsxs.call(void 0, _chunkWKKCZQNOcjs.b,{className:"hidden lg:flex",disabled:!a.getCanPreviousPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.setPageIndex(0)},children:[_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Go to first page"}),_jsxruntime.jsx.call(void 0, _reacticons.DoubleArrowLeftIcon,{className:"size-4"})]}),_jsxruntime.jsxs.call(void 0, _chunkWKKCZQNOcjs.b,{disabled:!a.getCanPreviousPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.previousPage()},children:[_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Go to previous page"}),_jsxruntime.jsx.call(void 0, _reacticons.ChevronLeftIcon,{className:"size-4"})]}),_jsxruntime.jsxs.call(void 0, _chunkWKKCZQNOcjs.b,{disabled:!a.getCanNextPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.nextPage()},children:[_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Go to next page"}),_jsxruntime.jsx.call(void 0, _reacticons.ChevronRightIcon,{className:"size-4"})]}),_jsxruntime.jsxs.call(void 0, _chunkWKKCZQNOcjs.b,{className:"hidden lg:flex",disabled:!a.getCanNextPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.setPageIndex(a.getPageCount()-1)},children:[_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Go to last page"}),_jsxruntime.jsx.call(void 0, _reacticons.DoubleArrowRightIcon,{className:"size-4"})]})]})]})]})}function L({column:a,title:n,className:s}){return a.getCanSort()?_jsxruntime.jsx.call(void 0, "div",{className:_chunkNU6SK3FCcjs.a.call(void 0, "flex items-center space-x-2",s),children:_jsxruntime.jsxs.call(void 0, _chunkJMM2MTPIcjs.a,{children:[_jsxruntime.jsx.call(void 0, _chunkJMM2MTPIcjs.b,{asChild:!0,children:_jsxruntime.jsxs.call(void 0, _chunkWKKCZQNOcjs.b,{className:"data-[state=open]:bg-accent -ml-3",size:"xs",variant:"ghost",children:[_jsxruntime.jsx.call(void 0, "span",{children:n}),_jsxruntime.jsx.call(void 0, z,{sorted:a.getIsSorted()})]})}),_jsxruntime.jsxs.call(void 0, _chunkJMM2MTPIcjs.h,{align:"start",children:[_jsxruntime.jsxs.call(void 0, _chunkJMM2MTPIcjs.i,{onClick:()=>{a.toggleSorting(!1)},children:[_jsxruntime.jsx.call(void 0, _reacticons.ArrowUpIcon,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Asc"]}),_jsxruntime.jsxs.call(void 0, _chunkJMM2MTPIcjs.i,{onClick:()=>{a.toggleSorting(!0)},children:[_jsxruntime.jsx.call(void 0, _reacticons.ArrowDownIcon,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Desc"]}),_jsxruntime.jsx.call(void 0, _chunkJMM2MTPIcjs.m,{}),_jsxruntime.jsxs.call(void 0, _chunkJMM2MTPIcjs.i,{onClick:()=>{a.toggleVisibility(!1)},children:[_jsxruntime.jsx.call(void 0, _reacticons.EyeNoneIcon,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Hide"]})]})]})}):_jsxruntime.jsx.call(void 0, "div",{className:s,children:n})}function z({sorted:a}){switch(a){case"desc":return _jsxruntime.jsx.call(void 0, _reacticons.ArrowDownIcon,{className:"ml-2 size-4"});case"asc":return _jsxruntime.jsx.call(void 0, _reacticons.ArrowUpIcon,{className:"ml-2 size-4"});default:return _jsxruntime.jsx.call(void 0, _reacticons.CaretSortIcon,{className:"ml-2 size-4"})}}exports.DataTableColumnHeader = L; exports.DataTablePagination = B; exports.DataTableViewOptions = A;
2
2
  //# sourceMappingURL=data-table.cjs.map
@@ -1,2 +1,2 @@
1
- "use client";import{a as D,c as f,d as T,g as x,i as w}from"../chunk-7CHCTEST.js";import{a as c,b as d,h as m,i as r,j as p,l as u,m as g}from"../chunk-FNQFZJUG.js";import{b as o}from"../chunk-6AFJCDFU.js";import"../chunk-A5ILA637.js";import{a as l}from"../chunk-5UXVZTFG.js";import{ArrowDownIcon as C,ArrowUpIcon as N,CaretSortIcon as v,ChevronLeftIcon as S,ChevronRightIcon as P,DoubleArrowLeftIcon as b,DoubleArrowRightIcon as M,EyeNoneIcon as I,MixerHorizontalIcon as h}from"@radix-ui/react-icons";import{jsx as e,jsxs as t}from"react/jsx-runtime";function A({table:a}){return t(c,{children:[e(d,{asChild:!0,children:t(o,{className:"ml-auto hidden h-8 lg:flex",size:"sm",variant:"outline",children:[e(h,{className:"mr-2 size-4"}),"View"]})}),t(m,{align:"end",className:"w-36",children:[e(u,{children:"Toggle columns"}),e(g,{}),a.getAllColumns().filter(n=>typeof n.accessorFn<"u"&&n.getCanHide()).map(n=>e(p,{checked:n.getIsVisible(),className:"capitalize",onCheckedChange:s=>{n.toggleVisibility(!!s)},children:n.id},n.id))]})]})}function B({table:a,className:n,...s}){return t("div",{className:l("flex items-center justify-between px-2",n),...s,children:[t("div",{className:"text-muted-foreground flex-1 text-sm",children:[a.getFilteredSelectedRowModel().rows.length," of ",a.getFilteredRowModel().rows.length," row(s) selected."]}),t("div",{className:"flex items-center space-x-6 lg:space-x-8",children:[t("div",{className:"flex items-center space-x-2",children:[e("p",{className:"text-sm font-medium",children:"Rows per page"}),t(D,{value:String(a.getState().pagination.pageSize),onValueChange:i=>{a.setPageSize(Number(i))},children:[e(T,{className:"w-18 h-8",children:e(f,{placeholder:a.getState().pagination.pageSize})}),e(x,{side:"top",children:[10,20,30,40,50].map(i=>e(w,{value:String(i),children:i},i))})]})]}),t("div",{className:"flex w-28 items-center justify-center text-sm font-medium",children:["Page ",a.getState().pagination.pageIndex+1," of ",a.getPageCount()]}),t("div",{className:"flex items-center space-x-2",children:[t(o,{className:"hidden lg:flex",disabled:!a.getCanPreviousPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.setPageIndex(0)},children:[e("span",{className:"sr-only",children:"Go to first page"}),e(b,{className:"size-4"})]}),t(o,{disabled:!a.getCanPreviousPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.previousPage()},children:[e("span",{className:"sr-only",children:"Go to previous page"}),e(S,{className:"size-4"})]}),t(o,{disabled:!a.getCanNextPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.nextPage()},children:[e("span",{className:"sr-only",children:"Go to next page"}),e(P,{className:"size-4"})]}),t(o,{className:"hidden lg:flex",disabled:!a.getCanNextPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.setPageIndex(a.getPageCount()-1)},children:[e("span",{className:"sr-only",children:"Go to last page"}),e(M,{className:"size-4"})]})]})]})]})}function L({column:a,title:n,className:s}){return a.getCanSort()?e("div",{className:l("flex items-center space-x-2",s),children:t(c,{children:[e(d,{asChild:!0,children:t(o,{className:"data-[state=open]:bg-accent -ml-3",size:"xs",variant:"ghost",children:[e("span",{children:n}),e(z,{sorted:a.getIsSorted()})]})}),t(m,{align:"start",children:[t(r,{onClick:()=>{a.toggleSorting(!1)},children:[e(N,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Asc"]}),t(r,{onClick:()=>{a.toggleSorting(!0)},children:[e(C,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Desc"]}),e(g,{}),t(r,{onClick:()=>{a.toggleVisibility(!1)},children:[e(I,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Hide"]})]})]})}):e("div",{className:s,children:n})}function z({sorted:a}){switch(a){case"desc":return e(C,{className:"ml-2 size-4"});case"asc":return e(N,{className:"ml-2 size-4"});default:return e(v,{className:"ml-2 size-4"})}}export{L as DataTableColumnHeader,B as DataTablePagination,A as DataTableViewOptions};
1
+ "use client";import{a as D,c as f,d as T,g as x,i as w}from"../chunk-5QETIFO4.js";import{a as c,b as d,h as m,i as r,j as p,l as u,m as g}from"../chunk-WQFHFTYS.js";import{b as o}from"../chunk-VDVLCSO4.js";import"../chunk-RBP4PBCK.js";import{a as l}from"../chunk-5UXVZTFG.js";import{ArrowDownIcon as C,ArrowUpIcon as N,CaretSortIcon as v,ChevronLeftIcon as S,ChevronRightIcon as P,DoubleArrowLeftIcon as b,DoubleArrowRightIcon as M,EyeNoneIcon as I,MixerHorizontalIcon as h}from"@radix-ui/react-icons";import{jsx as e,jsxs as t}from"react/jsx-runtime";function A({table:a}){return t(c,{children:[e(d,{asChild:!0,children:t(o,{className:"ml-auto hidden h-8 lg:flex",size:"sm",variant:"outline",children:[e(h,{className:"mr-2 size-4"}),"View"]})}),t(m,{align:"end",className:"w-36",children:[e(u,{children:"Toggle columns"}),e(g,{}),a.getAllColumns().filter(n=>typeof n.accessorFn<"u"&&n.getCanHide()).map(n=>e(p,{checked:n.getIsVisible(),className:"capitalize",onCheckedChange:s=>{n.toggleVisibility(!!s)},children:n.id},n.id))]})]})}function B({table:a,className:n,...s}){return t("div",{className:l("flex items-center justify-between px-2",n),...s,children:[t("div",{className:"text-muted-foreground flex-1 text-sm",children:[a.getFilteredSelectedRowModel().rows.length," of ",a.getFilteredRowModel().rows.length," row(s) selected."]}),t("div",{className:"flex items-center space-x-6 lg:space-x-8",children:[t("div",{className:"flex items-center space-x-2",children:[e("p",{className:"text-sm font-medium",children:"Rows per page"}),t(D,{value:String(a.getState().pagination.pageSize),onValueChange:i=>{a.setPageSize(Number(i))},children:[e(T,{className:"w-18 h-8",children:e(f,{placeholder:a.getState().pagination.pageSize})}),e(x,{side:"top",children:[10,20,30,40,50].map(i=>e(w,{value:String(i),children:i},i))})]})]}),t("div",{className:"flex w-28 items-center justify-center text-sm font-medium",children:["Page ",a.getState().pagination.pageIndex+1," of ",a.getPageCount()]}),t("div",{className:"flex items-center space-x-2",children:[t(o,{className:"hidden lg:flex",disabled:!a.getCanPreviousPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.setPageIndex(0)},children:[e("span",{className:"sr-only",children:"Go to first page"}),e(b,{className:"size-4"})]}),t(o,{disabled:!a.getCanPreviousPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.previousPage()},children:[e("span",{className:"sr-only",children:"Go to previous page"}),e(S,{className:"size-4"})]}),t(o,{disabled:!a.getCanNextPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.nextPage()},children:[e("span",{className:"sr-only",children:"Go to next page"}),e(P,{className:"size-4"})]}),t(o,{className:"hidden lg:flex",disabled:!a.getCanNextPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.setPageIndex(a.getPageCount()-1)},children:[e("span",{className:"sr-only",children:"Go to last page"}),e(M,{className:"size-4"})]})]})]})]})}function L({column:a,title:n,className:s}){return a.getCanSort()?e("div",{className:l("flex items-center space-x-2",s),children:t(c,{children:[e(d,{asChild:!0,children:t(o,{className:"data-[state=open]:bg-accent -ml-3",size:"xs",variant:"ghost",children:[e("span",{children:n}),e(z,{sorted:a.getIsSorted()})]})}),t(m,{align:"start",children:[t(r,{onClick:()=>{a.toggleSorting(!1)},children:[e(N,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Asc"]}),t(r,{onClick:()=>{a.toggleSorting(!0)},children:[e(C,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Desc"]}),e(g,{}),t(r,{onClick:()=>{a.toggleVisibility(!1)},children:[e(I,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Hide"]})]})]})}):e("div",{className:s,children:n})}function z({sorted:a}){switch(a){case"desc":return e(C,{className:"ml-2 size-4"});case"asc":return e(N,{className:"ml-2 size-4"});default:return e(v,{className:"ml-2 size-4"})}}export{L as DataTableColumnHeader,B as DataTablePagination,A as DataTableViewOptions};
2
2
  //# sourceMappingURL=data-table.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkQEWITXOVcjs = require('../chunk-QEWITXOV.cjs');require('../chunk-NU6SK3FC.cjs');exports.Dialog = _chunkQEWITXOVcjs.a; exports.DialogBody = _chunkQEWITXOVcjs.f; exports.DialogClose = _chunkQEWITXOVcjs.c; exports.DialogContent = _chunkQEWITXOVcjs.d; exports.DialogDescription = _chunkQEWITXOVcjs.i; exports.DialogFooter = _chunkQEWITXOVcjs.g; exports.DialogHeader = _chunkQEWITXOVcjs.e; exports.DialogTitle = _chunkQEWITXOVcjs.h; exports.DialogTrigger = _chunkQEWITXOVcjs.b;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunk4MTN7WZ2cjs = require('../chunk-4MTN7WZ2.cjs');require('../chunk-NU6SK3FC.cjs');exports.Dialog = _chunk4MTN7WZ2cjs.a; exports.DialogBody = _chunk4MTN7WZ2cjs.f; exports.DialogClose = _chunk4MTN7WZ2cjs.c; exports.DialogContent = _chunk4MTN7WZ2cjs.d; exports.DialogDescription = _chunk4MTN7WZ2cjs.i; exports.DialogFooter = _chunk4MTN7WZ2cjs.g; exports.DialogHeader = _chunk4MTN7WZ2cjs.e; exports.DialogTitle = _chunk4MTN7WZ2cjs.h; exports.DialogTrigger = _chunk4MTN7WZ2cjs.b;
2
2
  //# sourceMappingURL=dialog.cjs.map
@@ -1,2 +1,2 @@
1
- "use client";import{a,b,c,d,e,f,g,h,i}from"../chunk-RSNKUKY7.js";import"../chunk-5UXVZTFG.js";export{a as Dialog,f as DialogBody,c as DialogClose,d as DialogContent,i as DialogDescription,g as DialogFooter,e as DialogHeader,h as DialogTitle,b as DialogTrigger};
1
+ "use client";import{a,b,c,d,e,f,g,h,i}from"../chunk-HDHZESSG.js";import"../chunk-5UXVZTFG.js";export{a as Dialog,f as DialogBody,c as DialogClose,d as DialogContent,i as DialogDescription,g as DialogFooter,e as DialogHeader,h as DialogTitle,b as DialogTrigger};
2
2
  //# sourceMappingURL=dialog.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/drawer.tsx"],"names":["React","DrawerPrimitive","jsx","jsxs","Drawer","shouldScaleBackground","props","DrawerTrigger","DrawerClose","DrawerContent","children","className","ref","cn","DrawerHeader","DrawerFooter","DrawerTitle","DrawerDescription"],"mappings":"kDAEA,UAAYA,MAAW,QACvB,OAAS,UAAUC,MAAuB,OAUjC,cAAAC,EA4BH,QAAAC,MA5BG,oBADT,SAASC,EAAO,CAAE,sBAAAC,EAAwB,GAAM,GAAGC,CAAM,EAAmC,CAC1F,OAAOJ,EAACD,EAAgB,KAAhB,CAAqB,sBAAuBI,EAAwB,GAAGC,EAAO,CACxF,CAOA,IAAMC,EAAgBN,EAAgB,QAOhCO,EAAcP,EAAgB,MAS9BQ,EAAsB,aAC1B,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,GAAGL,CAAM,EAAGM,IAClCT,EAACF,EAAgB,OAAhB,CACC,UAAAC,EAACD,EAAgB,QAAhB,CAAwB,UAAU,iCAAiC,EACpEE,EAACF,EAAgB,QAAhB,CACC,IAAKW,EACL,UAAWC,EACT,6FACAF,CACF,EACC,GAAGL,EAEJ,UAAAJ,EAAC,OAAI,UAAU,8CAA8C,EAC5DQ,GACH,GACF,CAEJ,EAEAD,EAAc,YAAc,gBAQ5B,SAASK,EAAa,CAAE,UAAAH,EAAW,GAAGL,CAAM,EAAyC,CACnF,OAAOJ,EAAC,OAAI,UAAWW,EAAG,4CAA6CF,CAAS,EAAI,GAAGL,EAAO,CAChG,CAQA,SAASS,EAAa,CAAE,UAAAJ,EAAW,GAAGL,CAAM,EAAyC,CACnF,OAAOJ,EAAC,OAAI,UAAWW,EAAG,kCAAmCF,CAAS,EAAI,GAAGL,EAAO,CACtF,CASA,IAAMU,EAAoB,aAAiD,CAAC,CAAE,UAAAL,EAAW,GAAGL,CAAM,EAAGM,IACnGV,EAACD,EAAgB,MAAhB,CACC,IAAKW,EACL,UAAWC,EAAG,oDAAqDF,CAAS,EAC3E,GAAGL,EACN,CACD,EAEDU,EAAY,YAAcf,EAAgB,MAAM,YAShD,IAAMgB,EAA0B,aAC9B,CAAC,CAAE,UAAAN,EAAW,GAAGL,CAAM,EAAGM,IACxBV,EAACD,EAAgB,YAAhB,CAA4B,IAAKW,EAAK,UAAWC,EAAG,gCAAiCF,CAAS,EAAI,GAAGL,EAAO,CAEjH,EAEAW,EAAkB,YAAchB,EAAgB,YAAY","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Drawer as DrawerPrimitive } from 'vaul';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Drawer\n * -------------------------------------------------------------------------- */\n\ntype DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root>;\n\nfunction Drawer({ shouldScaleBackground = true, ...props }: DrawerProps): React.JSX.Element {\n return <DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTrigger\n * -------------------------------------------------------------------------- */\n\ntype DrawerTriggerProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Trigger>;\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerClose\n * -------------------------------------------------------------------------- */\n\ntype DrawerCloseProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Close>;\nconst DrawerClose = DrawerPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerContent\n * -------------------------------------------------------------------------- */\n\ntype DrawerContentElement = React.ElementRef<typeof DrawerPrimitive.Content>;\ntype DrawerContentProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>;\n\nconst DrawerContent = React.forwardRef<DrawerContentElement, DrawerContentProps>(\n ({ children, className, ...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-xl border',\n className,\n )}\n {...props}\n >\n <div className=\"bg-muted mx-auto mt-4 h-2 w-24 rounded-full\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n ),\n);\n\nDrawerContent.displayName = 'DrawerContent';\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerHeader\n * -------------------------------------------------------------------------- */\n\ntype DrawerHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerHeader({ className, ...props }: DrawerHeaderProps): React.JSX.Element {\n return <div className={cn('grid gap-1.5 p-4 text-center sm:text-left', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerFooter\n * -------------------------------------------------------------------------- */\n\ntype DrawerFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerFooter({ className, ...props }: DrawerFooterProps): React.JSX.Element {\n return <div className={cn('mt-auto flex flex-col gap-2 p-4', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTitle\n * -------------------------------------------------------------------------- */\n\ntype DrawerTitleElement = React.ElementRef<typeof DrawerPrimitive.Title>;\ntype DrawerTitleProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>;\n\nconst DrawerTitle = React.forwardRef<DrawerTitleElement, DrawerTitleProps>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n));\n\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerDescription\n * -------------------------------------------------------------------------- */\n\ntype DrawerDescriptionElement = React.ElementRef<typeof DrawerPrimitive.Description>;\ntype DrawerDescriptionProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>;\n\nconst DrawerDescription = React.forwardRef<DrawerDescriptionElement, DrawerDescriptionProps>(\n ({ className, ...props }, ref) => (\n <DrawerPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />\n ),\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 type DrawerProps,\n type DrawerTriggerProps,\n type DrawerCloseProps,\n type DrawerContentProps,\n type DrawerHeaderProps,\n type DrawerFooterProps,\n type DrawerTitleProps,\n type DrawerDescriptionProps,\n};\n"]}
1
+ {"version":3,"sources":["../../src/react/drawer.tsx"],"names":["React","DrawerPrimitive","jsx","jsxs","Drawer","shouldScaleBackground","props","DrawerTrigger","DrawerClose","DrawerContent","children","className","forwardedRef","cn","DrawerHeader","DrawerFooter","DrawerTitle","DrawerDescription"],"mappings":"kDAEA,UAAYA,MAAW,QACvB,OAAS,UAAUC,MAAuB,OAUjC,cAAAC,EA4BH,QAAAC,MA5BG,oBADT,SAASC,EAAO,CAAE,sBAAAC,EAAwB,GAAM,GAAGC,CAAM,EAAmC,CAC1F,OAAOJ,EAACD,EAAgB,KAAhB,CAAqB,sBAAuBI,EAAwB,GAAGC,EAAO,CACxF,CAOA,IAAMC,EAAgBN,EAAgB,QAOhCO,EAAcP,EAAgB,MAS9BQ,EAAsB,aAC1B,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,GAAGL,CAAM,EAAGM,IAClCT,EAACF,EAAgB,OAAhB,CACC,UAAAC,EAACD,EAAgB,QAAhB,CAAwB,UAAU,iCAAiC,EACpEE,EAACF,EAAgB,QAAhB,CACC,IAAKW,EACL,UAAWC,EACT,6FACAF,CACF,EACC,GAAGL,EAEJ,UAAAJ,EAAC,OAAI,UAAU,8CAA8C,EAC5DQ,GACH,GACF,CAEJ,EAEAD,EAAc,YAAc,gBAQ5B,SAASK,EAAa,CAAE,UAAAH,EAAW,GAAGL,CAAM,EAAyC,CACnF,OAAOJ,EAAC,OAAI,UAAWW,EAAG,4CAA6CF,CAAS,EAAI,GAAGL,EAAO,CAChG,CAQA,SAASS,EAAa,CAAE,UAAAJ,EAAW,GAAGL,CAAM,EAAyC,CACnF,OAAOJ,EAAC,OAAI,UAAWW,EAAG,kCAAmCF,CAAS,EAAI,GAAGL,EAAO,CACtF,CASA,IAAMU,EAAoB,aAAiD,CAAC,CAAE,UAAAL,EAAW,GAAGL,CAAM,EAAGM,IACnGV,EAACD,EAAgB,MAAhB,CACC,IAAKW,EACL,UAAWC,EAAG,oDAAqDF,CAAS,EAC3E,GAAGL,EACN,CACD,EAEDU,EAAY,YAAcf,EAAgB,MAAM,YAShD,IAAMgB,EAA0B,aAC9B,CAAC,CAAE,UAAAN,EAAW,GAAGL,CAAM,EAAGM,IACxBV,EAACD,EAAgB,YAAhB,CACC,IAAKW,EACL,UAAWC,EAAG,gCAAiCF,CAAS,EACvD,GAAGL,EACN,CAEJ,EAEAW,EAAkB,YAAchB,EAAgB,YAAY","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Drawer as DrawerPrimitive } from 'vaul';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Drawer\n * -------------------------------------------------------------------------- */\n\ntype DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root>;\n\nfunction Drawer({ shouldScaleBackground = true, ...props }: DrawerProps): React.JSX.Element {\n return <DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTrigger\n * -------------------------------------------------------------------------- */\n\ntype DrawerTriggerProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Trigger>;\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerClose\n * -------------------------------------------------------------------------- */\n\ntype DrawerCloseProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Close>;\nconst DrawerClose = DrawerPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerContent\n * -------------------------------------------------------------------------- */\n\ntype DrawerContentElement = React.ElementRef<typeof DrawerPrimitive.Content>;\ntype DrawerContentProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>;\n\nconst DrawerContent = React.forwardRef<DrawerContentElement, DrawerContentProps>(\n ({ children, className, ...props }, forwardedRef) => (\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className=\"fixed inset-0 z-50 bg-black/80\" />\n <DrawerPrimitive.Content\n ref={forwardedRef}\n className={cn(\n 'bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl border',\n className,\n )}\n {...props}\n >\n <div className=\"bg-muted mx-auto mt-4 h-2 w-24 rounded-full\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n ),\n);\n\nDrawerContent.displayName = 'DrawerContent';\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerHeader\n * -------------------------------------------------------------------------- */\n\ntype DrawerHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerHeader({ className, ...props }: DrawerHeaderProps): React.JSX.Element {\n return <div className={cn('grid gap-1.5 p-4 text-center sm:text-left', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerFooter\n * -------------------------------------------------------------------------- */\n\ntype DrawerFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerFooter({ className, ...props }: DrawerFooterProps): React.JSX.Element {\n return <div className={cn('mt-auto flex flex-col gap-2 p-4', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTitle\n * -------------------------------------------------------------------------- */\n\ntype DrawerTitleElement = React.ElementRef<typeof DrawerPrimitive.Title>;\ntype DrawerTitleProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>;\n\nconst DrawerTitle = React.forwardRef<DrawerTitleElement, DrawerTitleProps>(({ className, ...props }, forwardedRef) => (\n <DrawerPrimitive.Title\n ref={forwardedRef}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n));\n\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerDescription\n * -------------------------------------------------------------------------- */\n\ntype DrawerDescriptionElement = React.ElementRef<typeof DrawerPrimitive.Description>;\ntype DrawerDescriptionProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>;\n\nconst DrawerDescription = React.forwardRef<DrawerDescriptionElement, DrawerDescriptionProps>(\n ({ className, ...props }, forwardedRef) => (\n <DrawerPrimitive.Description\n ref={forwardedRef}\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n ),\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 type DrawerProps,\n type DrawerTriggerProps,\n type DrawerCloseProps,\n type DrawerContentProps,\n type DrawerHeaderProps,\n type DrawerFooterProps,\n type DrawerTitleProps,\n type DrawerDescriptionProps,\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/drawer.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Drawer as DrawerPrimitive } from 'vaul';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Drawer\n * -------------------------------------------------------------------------- */\n\ntype DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root>;\n\nfunction Drawer({ shouldScaleBackground = true, ...props }: DrawerProps): React.JSX.Element {\n return <DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTrigger\n * -------------------------------------------------------------------------- */\n\ntype DrawerTriggerProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Trigger>;\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerClose\n * -------------------------------------------------------------------------- */\n\ntype DrawerCloseProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Close>;\nconst DrawerClose = DrawerPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerContent\n * -------------------------------------------------------------------------- */\n\ntype DrawerContentElement = React.ElementRef<typeof DrawerPrimitive.Content>;\ntype DrawerContentProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>;\n\nconst DrawerContent = React.forwardRef<DrawerContentElement, DrawerContentProps>(\n ({ children, className, ...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-xl border',\n className,\n )}\n {...props}\n >\n <div className=\"bg-muted mx-auto mt-4 h-2 w-24 rounded-full\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n ),\n);\n\nDrawerContent.displayName = 'DrawerContent';\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerHeader\n * -------------------------------------------------------------------------- */\n\ntype DrawerHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerHeader({ className, ...props }: DrawerHeaderProps): React.JSX.Element {\n return <div className={cn('grid gap-1.5 p-4 text-center sm:text-left', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerFooter\n * -------------------------------------------------------------------------- */\n\ntype DrawerFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerFooter({ className, ...props }: DrawerFooterProps): React.JSX.Element {\n return <div className={cn('mt-auto flex flex-col gap-2 p-4', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTitle\n * -------------------------------------------------------------------------- */\n\ntype DrawerTitleElement = React.ElementRef<typeof DrawerPrimitive.Title>;\ntype DrawerTitleProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>;\n\nconst DrawerTitle = React.forwardRef<DrawerTitleElement, DrawerTitleProps>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n));\n\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerDescription\n * -------------------------------------------------------------------------- */\n\ntype DrawerDescriptionElement = React.ElementRef<typeof DrawerPrimitive.Description>;\ntype DrawerDescriptionProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>;\n\nconst DrawerDescription = React.forwardRef<DrawerDescriptionElement, DrawerDescriptionProps>(\n ({ className, ...props }, ref) => (\n <DrawerPrimitive.Description ref={ref} className={cn('text-muted-foreground text-sm', className)} {...props} />\n ),\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 type DrawerProps,\n type DrawerTriggerProps,\n type DrawerCloseProps,\n type DrawerContentProps,\n type DrawerHeaderProps,\n type DrawerFooterProps,\n type DrawerTitleProps,\n type DrawerDescriptionProps,\n};\n"],"mappings":"iDAEA,UAAYA,MAAW,QACvB,OAAS,UAAUC,MAAuB,OAUjC,cAAAC,EA4BH,QAAAC,MA5BG,oBADT,SAASC,EAAO,CAAE,sBAAAC,EAAwB,GAAM,GAAGC,CAAM,EAAmC,CAC1F,OAAOJ,EAACK,EAAgB,KAAhB,CAAqB,sBAAuBF,EAAwB,GAAGC,EAAO,CACxF,CAOA,IAAME,EAAgBD,EAAgB,QAOhCE,EAAcF,EAAgB,MAS9BG,EAAsB,aAC1B,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,GAAGN,CAAM,EAAGO,IAClCV,EAACI,EAAgB,OAAhB,CACC,UAAAL,EAACK,EAAgB,QAAhB,CAAwB,UAAU,iCAAiC,EACpEJ,EAACI,EAAgB,QAAhB,CACC,IAAKM,EACL,UAAWC,EACT,6FACAF,CACF,EACC,GAAGN,EAEJ,UAAAJ,EAAC,OAAI,UAAU,8CAA8C,EAC5DS,GACH,GACF,CAEJ,EAEAD,EAAc,YAAc,gBAQ5B,SAASK,EAAa,CAAE,UAAAH,EAAW,GAAGN,CAAM,EAAyC,CACnF,OAAOJ,EAAC,OAAI,UAAWY,EAAG,4CAA6CF,CAAS,EAAI,GAAGN,EAAO,CAChG,CAQA,SAASU,EAAa,CAAE,UAAAJ,EAAW,GAAGN,CAAM,EAAyC,CACnF,OAAOJ,EAAC,OAAI,UAAWY,EAAG,kCAAmCF,CAAS,EAAI,GAAGN,EAAO,CACtF,CASA,IAAMW,EAAoB,aAAiD,CAAC,CAAE,UAAAL,EAAW,GAAGN,CAAM,EAAGO,IACnGX,EAACK,EAAgB,MAAhB,CACC,IAAKM,EACL,UAAWC,EAAG,oDAAqDF,CAAS,EAC3E,GAAGN,EACN,CACD,EAEDW,EAAY,YAAcV,EAAgB,MAAM,YAShD,IAAMW,EAA0B,aAC9B,CAAC,CAAE,UAAAN,EAAW,GAAGN,CAAM,EAAGO,IACxBX,EAACK,EAAgB,YAAhB,CAA4B,IAAKM,EAAK,UAAWC,EAAG,gCAAiCF,CAAS,EAAI,GAAGN,EAAO,CAEjH,EAEAY,EAAkB,YAAcX,EAAgB,YAAY","names":["React","DrawerPrimitive","jsx","jsxs","Drawer","shouldScaleBackground","props","DrawerPrimitive","DrawerTrigger","DrawerClose","DrawerContent","children","className","ref","cn","DrawerHeader","DrawerFooter","DrawerTitle","DrawerDescription"]}
1
+ {"version":3,"sources":["../../src/react/drawer.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Drawer as DrawerPrimitive } from 'vaul';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Drawer\n * -------------------------------------------------------------------------- */\n\ntype DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root>;\n\nfunction Drawer({ shouldScaleBackground = true, ...props }: DrawerProps): React.JSX.Element {\n return <DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTrigger\n * -------------------------------------------------------------------------- */\n\ntype DrawerTriggerProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Trigger>;\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerClose\n * -------------------------------------------------------------------------- */\n\ntype DrawerCloseProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Close>;\nconst DrawerClose = DrawerPrimitive.Close;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerContent\n * -------------------------------------------------------------------------- */\n\ntype DrawerContentElement = React.ElementRef<typeof DrawerPrimitive.Content>;\ntype DrawerContentProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>;\n\nconst DrawerContent = React.forwardRef<DrawerContentElement, DrawerContentProps>(\n ({ children, className, ...props }, forwardedRef) => (\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className=\"fixed inset-0 z-50 bg-black/80\" />\n <DrawerPrimitive.Content\n ref={forwardedRef}\n className={cn(\n 'bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl border',\n className,\n )}\n {...props}\n >\n <div className=\"bg-muted mx-auto mt-4 h-2 w-24 rounded-full\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n ),\n);\n\nDrawerContent.displayName = 'DrawerContent';\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerHeader\n * -------------------------------------------------------------------------- */\n\ntype DrawerHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerHeader({ className, ...props }: DrawerHeaderProps): React.JSX.Element {\n return <div className={cn('grid gap-1.5 p-4 text-center sm:text-left', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerFooter\n * -------------------------------------------------------------------------- */\n\ntype DrawerFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction DrawerFooter({ className, ...props }: DrawerFooterProps): React.JSX.Element {\n return <div className={cn('mt-auto flex flex-col gap-2 p-4', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerTitle\n * -------------------------------------------------------------------------- */\n\ntype DrawerTitleElement = React.ElementRef<typeof DrawerPrimitive.Title>;\ntype DrawerTitleProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>;\n\nconst DrawerTitle = React.forwardRef<DrawerTitleElement, DrawerTitleProps>(({ className, ...props }, forwardedRef) => (\n <DrawerPrimitive.Title\n ref={forwardedRef}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n));\n\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: DrawerDescription\n * -------------------------------------------------------------------------- */\n\ntype DrawerDescriptionElement = React.ElementRef<typeof DrawerPrimitive.Description>;\ntype DrawerDescriptionProps = React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>;\n\nconst DrawerDescription = React.forwardRef<DrawerDescriptionElement, DrawerDescriptionProps>(\n ({ className, ...props }, forwardedRef) => (\n <DrawerPrimitive.Description\n ref={forwardedRef}\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n ),\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 type DrawerProps,\n type DrawerTriggerProps,\n type DrawerCloseProps,\n type DrawerContentProps,\n type DrawerHeaderProps,\n type DrawerFooterProps,\n type DrawerTitleProps,\n type DrawerDescriptionProps,\n};\n"],"mappings":"iDAEA,UAAYA,MAAW,QACvB,OAAS,UAAUC,MAAuB,OAUjC,cAAAC,EA4BH,QAAAC,MA5BG,oBADT,SAASC,EAAO,CAAE,sBAAAC,EAAwB,GAAM,GAAGC,CAAM,EAAmC,CAC1F,OAAOJ,EAACK,EAAgB,KAAhB,CAAqB,sBAAuBF,EAAwB,GAAGC,EAAO,CACxF,CAOA,IAAME,EAAgBD,EAAgB,QAOhCE,EAAcF,EAAgB,MAS9BG,EAAsB,aAC1B,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,GAAGN,CAAM,EAAGO,IAClCV,EAACI,EAAgB,OAAhB,CACC,UAAAL,EAACK,EAAgB,QAAhB,CAAwB,UAAU,iCAAiC,EACpEJ,EAACI,EAAgB,QAAhB,CACC,IAAKM,EACL,UAAWC,EACT,6FACAF,CACF,EACC,GAAGN,EAEJ,UAAAJ,EAAC,OAAI,UAAU,8CAA8C,EAC5DS,GACH,GACF,CAEJ,EAEAD,EAAc,YAAc,gBAQ5B,SAASK,EAAa,CAAE,UAAAH,EAAW,GAAGN,CAAM,EAAyC,CACnF,OAAOJ,EAAC,OAAI,UAAWY,EAAG,4CAA6CF,CAAS,EAAI,GAAGN,EAAO,CAChG,CAQA,SAASU,EAAa,CAAE,UAAAJ,EAAW,GAAGN,CAAM,EAAyC,CACnF,OAAOJ,EAAC,OAAI,UAAWY,EAAG,kCAAmCF,CAAS,EAAI,GAAGN,EAAO,CACtF,CASA,IAAMW,EAAoB,aAAiD,CAAC,CAAE,UAAAL,EAAW,GAAGN,CAAM,EAAGO,IACnGX,EAACK,EAAgB,MAAhB,CACC,IAAKM,EACL,UAAWC,EAAG,oDAAqDF,CAAS,EAC3E,GAAGN,EACN,CACD,EAEDW,EAAY,YAAcV,EAAgB,MAAM,YAShD,IAAMW,EAA0B,aAC9B,CAAC,CAAE,UAAAN,EAAW,GAAGN,CAAM,EAAGO,IACxBX,EAACK,EAAgB,YAAhB,CACC,IAAKM,EACL,UAAWC,EAAG,gCAAiCF,CAAS,EACvD,GAAGN,EACN,CAEJ,EAEAY,EAAkB,YAAcX,EAAgB,YAAY","names":["React","DrawerPrimitive","jsx","jsxs","Drawer","shouldScaleBackground","props","DrawerPrimitive","DrawerTrigger","DrawerClose","DrawerContent","children","className","forwardedRef","cn","DrawerHeader","DrawerFooter","DrawerTitle","DrawerDescription"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkGCHNSK5Ocjs = require('../chunk-GCHNSK5O.cjs');require('../chunk-NU6SK3FC.cjs');exports.DropdownMenu = _chunkGCHNSK5Ocjs.a; exports.DropdownMenuCheckboxItem = _chunkGCHNSK5Ocjs.j; exports.DropdownMenuContent = _chunkGCHNSK5Ocjs.h; exports.DropdownMenuGroup = _chunkGCHNSK5Ocjs.c; exports.DropdownMenuItem = _chunkGCHNSK5Ocjs.i; exports.DropdownMenuLabel = _chunkGCHNSK5Ocjs.l; exports.DropdownMenuRadioGroup = _chunkGCHNSK5Ocjs.e; exports.DropdownMenuRadioItem = _chunkGCHNSK5Ocjs.k; exports.DropdownMenuSeparator = _chunkGCHNSK5Ocjs.m; exports.DropdownMenuShortcut = _chunkGCHNSK5Ocjs.n; exports.DropdownMenuSub = _chunkGCHNSK5Ocjs.d; exports.DropdownMenuSubContent = _chunkGCHNSK5Ocjs.g; exports.DropdownMenuSubTrigger = _chunkGCHNSK5Ocjs.f; exports.DropdownMenuTrigger = _chunkGCHNSK5Ocjs.b;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkJMM2MTPIcjs = require('../chunk-JMM2MTPI.cjs');require('../chunk-NU6SK3FC.cjs');exports.DropdownMenu = _chunkJMM2MTPIcjs.a; exports.DropdownMenuCheckboxItem = _chunkJMM2MTPIcjs.j; exports.DropdownMenuContent = _chunkJMM2MTPIcjs.h; exports.DropdownMenuGroup = _chunkJMM2MTPIcjs.c; exports.DropdownMenuItem = _chunkJMM2MTPIcjs.i; exports.DropdownMenuLabel = _chunkJMM2MTPIcjs.l; exports.DropdownMenuRadioGroup = _chunkJMM2MTPIcjs.e; exports.DropdownMenuRadioItem = _chunkJMM2MTPIcjs.k; exports.DropdownMenuSeparator = _chunkJMM2MTPIcjs.m; exports.DropdownMenuShortcut = _chunkJMM2MTPIcjs.n; exports.DropdownMenuSub = _chunkJMM2MTPIcjs.d; exports.DropdownMenuSubContent = _chunkJMM2MTPIcjs.g; exports.DropdownMenuSubTrigger = _chunkJMM2MTPIcjs.f; exports.DropdownMenuTrigger = _chunkJMM2MTPIcjs.b;
2
2
  //# sourceMappingURL=dropdown-menu.cjs.map
@@ -1,2 +1,2 @@
1
- "use client";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"../chunk-FNQFZJUG.js";import"../chunk-5UXVZTFG.js";export{a as DropdownMenu,j as DropdownMenuCheckboxItem,h as DropdownMenuContent,c as DropdownMenuGroup,i as DropdownMenuItem,l as DropdownMenuLabel,e as DropdownMenuRadioGroup,k as DropdownMenuRadioItem,m as DropdownMenuSeparator,n as DropdownMenuShortcut,d as DropdownMenuSub,g as DropdownMenuSubContent,f as DropdownMenuSubTrigger,b as DropdownMenuTrigger};
1
+ "use client";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n}from"../chunk-WQFHFTYS.js";import"../chunk-5UXVZTFG.js";export{a as DropdownMenu,j as DropdownMenuCheckboxItem,h as DropdownMenuContent,c as DropdownMenuGroup,i as DropdownMenuItem,l as DropdownMenuLabel,e as DropdownMenuRadioGroup,k as DropdownMenuRadioItem,m as DropdownMenuSeparator,n as DropdownMenuShortcut,d as DropdownMenuSub,g as DropdownMenuSubContent,f as DropdownMenuSubTrigger,b as DropdownMenuTrigger};
2
2
  //# sourceMappingURL=dropdown-menu.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/em.tsx"],"names":["React","Slot","jsx","Em","asChild","props","ref"],"mappings":"AAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBAeZ,cAAAC,MAAA,oBAHT,IAAMC,EAAW,aAA+B,CAAC,CAAE,QAAAC,EAAS,GAAGC,CAAM,EAAGC,IAG/DJ,EAFWE,EAAUH,EAAO,KAE3B,CAAU,IAAKK,EAAM,GAAGD,EAAO,CACxC,EAEDF,EAAG,YAAc","sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\n\n/* -----------------------------------------------------------------------------\n * Component: Em\n * -------------------------------------------------------------------------- */\n\ntype EmElement = HTMLElement;\n\ninterface EmProps extends React.HTMLAttributes<HTMLElement> {\n asChild?: boolean;\n}\n\nconst Em = React.forwardRef<EmElement, EmProps>(({ asChild, ...props }, ref) => {\n const Component = asChild ? Slot : 'em';\n\n return <Component ref={ref} {...props} />;\n});\n\nEm.displayName = 'Em';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Em, type EmProps };\n"]}
1
+ {"version":3,"sources":["../../src/react/em.tsx"],"names":["React","Slot","jsx","Em","asChild","props","forwardedRef"],"mappings":"AAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBAeZ,cAAAC,MAAA,oBAHT,IAAMC,EAAW,aAA+B,CAAC,CAAE,QAAAC,EAAS,GAAGC,CAAM,EAAGC,IAG/DJ,EAFWE,EAAUH,EAAO,KAE3B,CAAU,IAAKK,EAAe,GAAGD,EAAO,CACjD,EAEDF,EAAG,YAAc","sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\n\n/* -----------------------------------------------------------------------------\n * Component: Em\n * -------------------------------------------------------------------------- */\n\ntype EmElement = HTMLElement;\n\ninterface EmProps extends React.HTMLAttributes<HTMLElement> {\n asChild?: boolean;\n}\n\nconst Em = React.forwardRef<EmElement, EmProps>(({ asChild, ...props }, forwardedRef) => {\n const Component = asChild ? Slot : 'em';\n\n return <Component ref={forwardedRef} {...props} />;\n});\n\nEm.displayName = 'Em';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Em, type EmProps };\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/em.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\n\n/* -----------------------------------------------------------------------------\n * Component: Em\n * -------------------------------------------------------------------------- */\n\ntype EmElement = HTMLElement;\n\ninterface EmProps extends React.HTMLAttributes<HTMLElement> {\n asChild?: boolean;\n}\n\nconst Em = React.forwardRef<EmElement, EmProps>(({ asChild, ...props }, ref) => {\n const Component = asChild ? Slot : 'em';\n\n return <Component ref={ref} {...props} />;\n});\n\nEm.displayName = 'Em';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Em, type EmProps };\n"],"mappings":"AAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBAeZ,cAAAC,MAAA,oBAHT,IAAMC,EAAW,aAA+B,CAAC,CAAE,QAAAC,EAAS,GAAGC,CAAM,EAAGC,IAG/DJ,EAFWE,EAAUH,EAAO,KAE3B,CAAU,IAAKK,EAAM,GAAGD,EAAO,CACxC,EAEDF,EAAG,YAAc","names":["React","Slot","jsx","Em","asChild","props","ref"]}
1
+ {"version":3,"sources":["../../src/react/em.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\n\n/* -----------------------------------------------------------------------------\n * Component: Em\n * -------------------------------------------------------------------------- */\n\ntype EmElement = HTMLElement;\n\ninterface EmProps extends React.HTMLAttributes<HTMLElement> {\n asChild?: boolean;\n}\n\nconst Em = React.forwardRef<EmElement, EmProps>(({ asChild, ...props }, forwardedRef) => {\n const Component = asChild ? Slot : 'em';\n\n return <Component ref={forwardedRef} {...props} />;\n});\n\nEm.displayName = 'Em';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { Em, type EmProps };\n"],"mappings":"AAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBAeZ,cAAAC,MAAA,oBAHT,IAAMC,EAAW,aAA+B,CAAC,CAAE,QAAAC,EAAS,GAAGC,CAAM,EAAGC,IAG/DJ,EAFWE,EAAUH,EAAO,KAE3B,CAAU,IAAKK,EAAe,GAAGD,EAAO,CACjD,EAEDF,EAAG,YAAc","names":["React","Slot","jsx","Em","asChild","props","forwardedRef"]}
@@ -1,2 +1,2 @@
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; } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";var _chunk72NPDP3Xcjs = require('../chunk-72NPDP3X.cjs');var _chunkNU6SK3FCcjs = require('../chunk-NU6SK3FC.cjs');var _react = require('react'); var t = _interopRequireWildcard(_react);var _reactslot = require('@radix-ui/react-slot');var _reacthookform = require('react-hook-form');var _jsxruntime = require('react/jsx-runtime');var p=t.createContext(null),c=t.createContext(null),n= exports.useFormField =()=>{let e=t.useContext(p),r=t.useContext(c),{getFieldState:o,formState:m}=_reacthookform.useFormContext.call(void 0, );if(!e||!r)throw new Error("useFormField should be used within <FormField>");let s=o(e.name,m),{id:i}=r;return{id:i,name:e.name,formItemId:`form-item-${i}`,formDescriptionId:`form-item-description-${i}`,formMessageId:`form-item-message-${i}`,...s}},b= exports.Form =_reacthookform.FormProvider;function h({...e}){return _jsxruntime.jsx.call(void 0, p.Provider,{value:{name:e.name},children:_jsxruntime.jsx.call(void 0, _reacthookform.Controller,{...e})})}var R=t.forwardRef(({className:e,...r},o)=>{let m=t.useId();return _jsxruntime.jsx.call(void 0, c.Provider,{value:{id:m},children:_jsxruntime.jsx.call(void 0, "div",{ref:o,className:_chunkNU6SK3FCcjs.a.call(void 0, "space-y-2",e),...r})})});R.displayName="FormItem";var g=t.forwardRef(({className:e,...r},o)=>{let{error:m,formItemId:s}=n();return _jsxruntime.jsx.call(void 0, _chunk72NPDP3Xcjs.a,{ref:o,className:_chunkNU6SK3FCcjs.a.call(void 0, m&&"text-destructive",e),htmlFor:s,...r})});g.displayName="FormLabel";var I=t.forwardRef(({...e},r)=>{let{error:o,formItemId:m,formDescriptionId:s,formMessageId:i}=n();return _jsxruntime.jsx.call(void 0, _reactslot.Slot,{ref:r,"aria-describedby":o?`${s} ${i}`:s,"aria-invalid":!!o,id:m,...e})});I.displayName="FormControl";var x=t.forwardRef(({className:e,...r},o)=>{let{formDescriptionId:m}=n();return _jsxruntime.jsx.call(void 0, "p",{ref:o,className:_chunkNU6SK3FCcjs.a.call(void 0, "text-muted-foreground text-xs",e),id:m,...r})});x.displayName="FormDescription";var C=t.forwardRef(({children:e,className:r,...o},m)=>{let{error:s,formMessageId:i}=n(),d=_optionalChain([s, 'optionalAccess', _ => _.message])?String(s.message):e;return d?_jsxruntime.jsx.call(void 0, "p",{ref:m,className:_chunkNU6SK3FCcjs.a.call(void 0, "text-destructive text-xs font-medium",r),id:i,...o,children:d}):null});C.displayName="FormMessage";exports.Form = b; exports.FormControl = I; exports.FormDescription = x; exports.FormField = h; exports.FormItem = R; exports.FormLabel = g; exports.FormMessage = C; exports.useFormField = n;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";var _chunkT3G5USVYcjs = require('../chunk-T3G5USVY.cjs');var _chunkNU6SK3FCcjs = require('../chunk-NU6SK3FC.cjs');var _react = require('react'); var t = _interopRequireWildcard(_react);var _reactslot = require('@radix-ui/react-slot');var _reacthookform = require('react-hook-form');var _jsxruntime = require('react/jsx-runtime');var p=t.createContext(null),c=t.createContext(null),n= exports.useFormField =()=>{let e=t.useContext(p),r=t.useContext(c),{getFieldState:o,formState:m}=_reacthookform.useFormContext.call(void 0, );if(!e||!r)throw new Error("useFormField should be used within <FormField>");let s=o(e.name,m),{id:i}=r;return{id:i,name:e.name,formItemId:`form-item-${i}`,formDescriptionId:`form-item-description-${i}`,formMessageId:`form-item-message-${i}`,...s}},b= exports.Form =_reacthookform.FormProvider;function h({...e}){return _jsxruntime.jsx.call(void 0, p.Provider,{value:{name:e.name},children:_jsxruntime.jsx.call(void 0, _reacthookform.Controller,{...e})})}var R=t.forwardRef(({className:e,...r},o)=>{let m=t.useId();return _jsxruntime.jsx.call(void 0, c.Provider,{value:{id:m},children:_jsxruntime.jsx.call(void 0, "div",{ref:o,className:_chunkNU6SK3FCcjs.a.call(void 0, "space-y-2",e),...r})})});R.displayName="FormItem";var g=t.forwardRef(({className:e,...r},o)=>{let{error:m,formItemId:s}=n();return _jsxruntime.jsx.call(void 0, _chunkT3G5USVYcjs.a,{ref:o,className:_chunkNU6SK3FCcjs.a.call(void 0, m&&"text-destructive",e),htmlFor:s,...r})});g.displayName="FormLabel";var I=t.forwardRef(({...e},r)=>{let{error:o,formItemId:m,formDescriptionId:s,formMessageId:i}=n();return _jsxruntime.jsx.call(void 0, _reactslot.Slot,{ref:r,"aria-describedby":o?`${s} ${i}`:s,"aria-invalid":!!o,id:m,...e})});I.displayName="FormControl";var x=t.forwardRef(({className:e,...r},o)=>{let{formDescriptionId:m}=n();return _jsxruntime.jsx.call(void 0, "p",{ref:o,className:_chunkNU6SK3FCcjs.a.call(void 0, "text-muted-foreground text-xs",e),id:m,...r})});x.displayName="FormDescription";var C=t.forwardRef(({children:e,className:r,...o},m)=>{let{error:s,formMessageId:i}=n(),d=_optionalChain([s, 'optionalAccess', _ => _.message])?String(s.message):e;return d?_jsxruntime.jsx.call(void 0, "p",{ref:m,className:_chunkNU6SK3FCcjs.a.call(void 0, "text-destructive text-xs font-medium",r),id:i,...o,children:d}):null});C.displayName="FormMessage";exports.Form = b; exports.FormControl = I; exports.FormDescription = x; exports.FormField = h; exports.FormItem = R; exports.FormLabel = g; exports.FormMessage = C; exports.useFormField = n;
2
2
  //# sourceMappingURL=form.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/form.tsx"],"names":["React","Slot","Controller","FormProvider","useFormContext","jsx","FormFieldContext","FormItemContext","useFormField","fieldContext","itemContext","getFieldState","formState","fieldState","id","Form","FormField","props","FormItem","className","ref","cn","FormLabel","error","formItemId","Label","FormControl","formDescriptionId","formMessageId","FormDescription","FormMessage","children","body"],"mappings":"4FAEA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBACrB,OACE,cAAAC,EAMA,gBAAAC,EAEA,kBAAAC,MACK,kBAgFD,cAAAC,MAAA,oBA5DN,IAAMC,EAAyB,gBAA4C,IAAI,EAEzEC,EAAwB,gBAA2C,IAAI,EAEvEC,EAAe,IAWhB,CACH,IAAMC,EAAqB,aAAWH,CAAgB,EAChDI,EAAoB,aAAWH,CAAe,EAC9C,CAAE,cAAAI,EAAe,UAAAC,CAAU,EAAIR,EAAe,EAEpD,GAAI,CAACK,GAAgB,CAACC,EACpB,MAAM,IAAI,MAAM,gDAAgD,EAGlE,IAAMG,EAAaF,EAAcF,EAAa,KAAMG,CAAS,EAEvD,CAAE,GAAAE,CAAG,EAAIJ,EAEf,MAAO,CACL,GAAAI,EACA,KAAML,EAAa,KACnB,WAAY,aAAaK,CAAE,GAC3B,kBAAmB,yBAAyBA,CAAE,GAC9C,cAAe,qBAAqBA,CAAE,GACtC,GAAGD,CACL,CACF,EAOME,EAAOZ,EAWb,SAASa,EAGP,CAAE,GAAGC,CAAM,EAA2D,CACtE,OACEZ,EAACC,EAAiB,SAAjB,CAA0B,MAAO,CAAE,KAAMW,EAAM,IAAK,EACnD,SAAAZ,EAACH,EAAA,CAAY,GAAGe,EAAO,EACzB,CAEJ,CASA,IAAMC,EAAiB,aAA2C,CAAC,CAAE,UAAAC,EAAW,GAAGF,CAAM,EAAGG,IAAQ,CAClG,IAAMN,EAAW,QAAM,EAEvB,OACET,EAACE,EAAgB,SAAhB,CAAyB,MAAO,CAAE,GAAAO,CAAG,EACpC,SAAAT,EAAC,OAAI,IAAKe,EAAK,UAAWC,EAAG,YAAaF,CAAS,EAAI,GAAGF,EAAO,EACnE,CAEJ,CAAC,EAEDC,EAAS,YAAc,WASvB,IAAMI,EAAkB,aAA6C,CAAC,CAAE,UAAAH,EAAW,GAAGF,CAAM,EAAGG,IAAQ,CACrG,GAAM,CAAE,MAAAG,EAAO,WAAAC,CAAW,EAAIhB,EAAa,EAE3C,OAAOH,EAACoB,EAAA,CAAM,IAAKL,EAAK,UAAWC,EAAGE,GAAS,mBAAoBJ,CAAS,EAAG,QAASK,EAAa,GAAGP,EAAO,CACjH,CAAC,EAEDK,EAAU,YAAc,YASxB,IAAMI,EAAoB,aAAiD,CAAC,CAAE,GAAGT,CAAM,EAAGG,IAAQ,CAChG,GAAM,CAAE,MAAAG,EAAO,WAAAC,EAAY,kBAAAG,EAAmB,cAAAC,CAAc,EAAIpB,EAAa,EAE7E,OACEH,EAACJ,EAAA,CACC,IAAKmB,EACL,mBAAmBG,EAA4B,GAAGI,CAAiB,IAAIC,CAAa,GAAzDD,EAC3B,eAAc,EAAQJ,EACtB,GAAIC,EACH,GAAGP,EACN,CAEJ,CAAC,EAEDS,EAAY,YAAc,cAS1B,IAAMG,EAAwB,aAC5B,CAAC,CAAE,UAAAV,EAAW,GAAGF,CAAM,EAAGG,IAAQ,CAChC,GAAM,CAAE,kBAAAO,CAAkB,EAAInB,EAAa,EAE3C,OAAOH,EAAC,KAAE,IAAKe,EAAK,UAAWC,EAAG,gCAAiCF,CAAS,EAAG,GAAIQ,EAAoB,GAAGV,EAAO,CACnH,CACF,EAEAY,EAAgB,YAAc,kBAS9B,IAAMC,EAAoB,aAAiD,CAAC,CAAE,SAAAC,EAAU,UAAAZ,EAAW,GAAGF,CAAM,EAAGG,IAAQ,CACrH,GAAM,CAAE,MAAAG,EAAO,cAAAK,CAAc,EAAIpB,EAAa,EACxCwB,EAAOT,GAAO,QAAU,OAAOA,EAAM,OAAO,EAAIQ,EAEtD,OAAKC,EAKH3B,EAAC,KAAE,IAAKe,EAAK,UAAWC,EAAG,uCAAwCF,CAAS,EAAG,GAAIS,EAAgB,GAAGX,EACnG,SAAAe,EACH,EANO,IAQX,CAAC,EAEDF,EAAY,YAAc","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport {\n Controller,\n type ControllerProps,\n type FieldError,\n type FieldErrorsImpl,\n type FieldPath,\n type FieldValues,\n FormProvider,\n type Merge,\n useFormContext,\n} from 'react-hook-form';\nimport type * as LabelPrimitive from '@radix-ui/react-label';\nimport { cn } from '../lib/utils';\nimport { Label } from './label';\n\n/* -----------------------------------------------------------------------------\n * Context: Form\n * -------------------------------------------------------------------------- */\n\ninterface FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> {\n name: TName;\n}\n\ninterface FormItemContextValue {\n id: string;\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue | null>(null);\n\nconst FormItemContext = React.createContext<FormItemContextValue | null>(null);\n\nconst useFormField = (): {\n formDescriptionId: string;\n formItemId: string;\n formMessageId: string;\n id: string;\n invalid: boolean;\n isDirty: boolean;\n isTouched: boolean;\n isValidating: boolean;\n name: string;\n error?: FieldError | Merge<FieldError, FieldErrorsImpl> | undefined;\n} => {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState, formState } = useFormContext();\n\n if (!fieldContext || !itemContext) {\n throw new Error('useFormField should be used within <FormField>');\n }\n\n const fieldState = getFieldState(fieldContext.name, formState);\n\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `form-item-${id}`,\n formDescriptionId: `form-item-description-${id}`,\n formMessageId: `form-item-message-${id}`,\n ...fieldState,\n };\n};\n\n/* -----------------------------------------------------------------------------\n * Component: Form\n * -------------------------------------------------------------------------- */\n\ntype FormProps = React.ComponentProps<typeof FormProvider>;\nconst Form = FormProvider;\n\n/* -----------------------------------------------------------------------------\n * Component: FormField\n * -------------------------------------------------------------------------- */\n\ntype FormFieldProps<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = ControllerProps<TFieldValues, TName>;\n\nfunction FormField<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({ ...props }: FormFieldProps<TFieldValues, TName>): React.JSX.Element {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: FormItem\n * -------------------------------------------------------------------------- */\n\ntype FormItemElement = HTMLDivElement;\ntype FormItemProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst FormItem = React.forwardRef<FormItemElement, FormItemProps>(({ className, ...props }, ref) => {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={cn('space-y-2', className)} {...props} />\n </FormItemContext.Provider>\n );\n});\n\nFormItem.displayName = 'FormItem';\n\n/* -----------------------------------------------------------------------------\n * Component: FormLabel\n * -------------------------------------------------------------------------- */\n\ntype FormFieldElement = React.ElementRef<typeof LabelPrimitive.Root>;\ntype FormLabelProps = React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>;\n\nconst FormLabel = React.forwardRef<FormFieldElement, FormLabelProps>(({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField();\n\n return <Label ref={ref} className={cn(error && 'text-destructive', className)} htmlFor={formItemId} {...props} />;\n});\n\nFormLabel.displayName = 'FormLabel';\n\n/* -----------------------------------------------------------------------------\n * Component: FormControl\n * -------------------------------------------------------------------------- */\n\ntype FormControlElement = React.ElementRef<typeof Slot>;\ntype FormControlProps = React.ComponentPropsWithoutRef<typeof Slot>;\n\nconst FormControl = React.forwardRef<FormControlElement, FormControlProps>(({ ...props }, ref) => {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField();\n\n return (\n <Slot\n ref={ref}\n aria-describedby={!error ? formDescriptionId : `${formDescriptionId} ${formMessageId}`}\n aria-invalid={Boolean(error)}\n id={formItemId}\n {...props}\n />\n );\n});\n\nFormControl.displayName = 'FormControl';\n\n/* -----------------------------------------------------------------------------\n * Component: FormDescription\n * -------------------------------------------------------------------------- */\n\ntype FormDescriptionElement = HTMLParagraphElement;\ntype FormDescriptionProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormDescription = React.forwardRef<FormDescriptionElement, FormDescriptionProps>(\n ({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField();\n\n return <p ref={ref} className={cn('text-muted-foreground text-xs', className)} id={formDescriptionId} {...props} />;\n },\n);\n\nFormDescription.displayName = 'FormDescription';\n\n/* -----------------------------------------------------------------------------\n * Component: FormMessage\n * -------------------------------------------------------------------------- */\n\ntype FormMessageElement = HTMLParagraphElement;\ntype FormMessageProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormMessage = React.forwardRef<FormMessageElement, FormMessageProps>(({ children, className, ...props }, ref) => {\n const { error, formMessageId } = useFormField();\n const body = error?.message ? String(error.message) : children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p ref={ref} className={cn('text-destructive text-xs font-medium', className)} id={formMessageId} {...props}>\n {body}\n </p>\n );\n});\n\nFormMessage.displayName = 'FormMessage';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n type FormProps,\n type FormItemProps,\n type FormLabelProps,\n type FormControlProps,\n type FormDescriptionProps,\n type FormMessageProps,\n type FormFieldProps,\n};\n"]}
1
+ {"version":3,"sources":["../../src/react/form.tsx"],"names":["React","Slot","Controller","FormProvider","useFormContext","jsx","FormFieldContext","FormItemContext","useFormField","fieldContext","itemContext","getFieldState","formState","fieldState","id","Form","FormField","props","FormItem","className","forwardedRef","cn","FormLabel","error","formItemId","Label","FormControl","formDescriptionId","formMessageId","FormDescription","FormMessage","children","body"],"mappings":"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","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport {\n Controller,\n type ControllerProps,\n type FieldError,\n type FieldErrorsImpl,\n type FieldPath,\n type FieldValues,\n FormProvider,\n type Merge,\n useFormContext,\n} from 'react-hook-form';\nimport type * as LabelPrimitive from '@radix-ui/react-label';\nimport { cn } from '../lib/utils';\nimport { Label } from './label';\n\n/* -----------------------------------------------------------------------------\n * Context: Form\n * -------------------------------------------------------------------------- */\n\ninterface FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> {\n name: TName;\n}\n\ninterface FormItemContextValue {\n id: string;\n}\n\nconst FormFieldContext = React.createContext<FormFieldContextValue | null>(null);\n\nconst FormItemContext = React.createContext<FormItemContextValue | null>(null);\n\nconst useFormField = (): {\n formDescriptionId: string;\n formItemId: string;\n formMessageId: string;\n id: string;\n invalid: boolean;\n isDirty: boolean;\n isTouched: boolean;\n isValidating: boolean;\n name: string;\n error?: FieldError | Merge<FieldError, FieldErrorsImpl> | undefined;\n} => {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState, formState } = useFormContext();\n\n if (!fieldContext || !itemContext) {\n throw new Error('useFormField should be used within <FormField>');\n }\n\n const fieldState = getFieldState(fieldContext.name, formState);\n\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `form-item-${id}`,\n formDescriptionId: `form-item-description-${id}`,\n formMessageId: `form-item-message-${id}`,\n ...fieldState,\n };\n};\n\n/* -----------------------------------------------------------------------------\n * Component: Form\n * -------------------------------------------------------------------------- */\n\ntype FormProps = React.ComponentProps<typeof FormProvider>;\nconst Form = FormProvider;\n\n/* -----------------------------------------------------------------------------\n * Component: FormField\n * -------------------------------------------------------------------------- */\n\ntype FormFieldProps<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = ControllerProps<TFieldValues, TName>;\n\nfunction FormField<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({ ...props }: FormFieldProps<TFieldValues, TName>): React.JSX.Element {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: FormItem\n * -------------------------------------------------------------------------- */\n\ntype FormItemElement = HTMLDivElement;\ntype FormItemProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst FormItem = React.forwardRef<FormItemElement, FormItemProps>(({ className, ...props }, forwardedRef) => {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={forwardedRef} className={cn('space-y-2', className)} {...props} />\n </FormItemContext.Provider>\n );\n});\n\nFormItem.displayName = 'FormItem';\n\n/* -----------------------------------------------------------------------------\n * Component: FormLabel\n * -------------------------------------------------------------------------- */\n\ntype FormFieldElement = React.ElementRef<typeof LabelPrimitive.Root>;\ntype FormLabelProps = React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>;\n\nconst FormLabel = React.forwardRef<FormFieldElement, FormLabelProps>(({ className, ...props }, forwardedRef) => {\n const { error, formItemId } = useFormField();\n\n return (\n <Label ref={forwardedRef} className={cn(error && 'text-destructive', className)} htmlFor={formItemId} {...props} />\n );\n});\n\nFormLabel.displayName = 'FormLabel';\n\n/* -----------------------------------------------------------------------------\n * Component: FormControl\n * -------------------------------------------------------------------------- */\n\ntype FormControlElement = React.ElementRef<typeof Slot>;\ntype FormControlProps = React.ComponentPropsWithoutRef<typeof Slot>;\n\nconst FormControl = React.forwardRef<FormControlElement, FormControlProps>(({ ...props }, forwardedRef) => {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField();\n\n return (\n <Slot\n ref={forwardedRef}\n aria-describedby={!error ? formDescriptionId : `${formDescriptionId} ${formMessageId}`}\n aria-invalid={Boolean(error)}\n id={formItemId}\n {...props}\n />\n );\n});\n\nFormControl.displayName = 'FormControl';\n\n/* -----------------------------------------------------------------------------\n * Component: FormDescription\n * -------------------------------------------------------------------------- */\n\ntype FormDescriptionElement = HTMLParagraphElement;\ntype FormDescriptionProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormDescription = React.forwardRef<FormDescriptionElement, FormDescriptionProps>(\n ({ className, ...props }, forwardedRef) => {\n const { formDescriptionId } = useFormField();\n\n return (\n <p\n ref={forwardedRef}\n className={cn('text-muted-foreground text-xs', className)}\n id={formDescriptionId}\n {...props}\n />\n );\n },\n);\n\nFormDescription.displayName = 'FormDescription';\n\n/* -----------------------------------------------------------------------------\n * Component: FormMessage\n * -------------------------------------------------------------------------- */\n\ntype FormMessageElement = HTMLParagraphElement;\ntype FormMessageProps = React.HTMLAttributes<HTMLParagraphElement>;\n\nconst FormMessage = React.forwardRef<FormMessageElement, FormMessageProps>(\n ({ children, className, ...props }, forwardedRef) => {\n const { error, formMessageId } = useFormField();\n const body = error?.message ? String(error.message) : children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p\n ref={forwardedRef}\n className={cn('text-destructive text-xs font-medium', className)}\n id={formMessageId}\n {...props}\n >\n {body}\n </p>\n );\n },\n);\n\nFormMessage.displayName = 'FormMessage';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n type FormProps,\n type FormItemProps,\n type FormLabelProps,\n type FormControlProps,\n type FormDescriptionProps,\n type FormMessageProps,\n type FormFieldProps,\n};\n"]}
@@ -1,2 +1,2 @@
1
- "use client";import{a as F}from"../chunk-WRO3QIWH.js";import{a}from"../chunk-5UXVZTFG.js";import*as t from"react";import{Slot as u}from"@radix-ui/react-slot";import{Controller as f,FormProvider as P,useFormContext as y}from"react-hook-form";import{jsx as l}from"react/jsx-runtime";var p=t.createContext(null),c=t.createContext(null),n=()=>{let e=t.useContext(p),r=t.useContext(c),{getFieldState:o,formState:m}=y();if(!e||!r)throw new Error("useFormField should be used within <FormField>");let s=o(e.name,m),{id:i}=r;return{id:i,name:e.name,formItemId:`form-item-${i}`,formDescriptionId:`form-item-description-${i}`,formMessageId:`form-item-message-${i}`,...s}},b=P;function h({...e}){return l(p.Provider,{value:{name:e.name},children:l(f,{...e})})}var R=t.forwardRef(({className:e,...r},o)=>{let m=t.useId();return l(c.Provider,{value:{id:m},children:l("div",{ref:o,className:a("space-y-2",e),...r})})});R.displayName="FormItem";var g=t.forwardRef(({className:e,...r},o)=>{let{error:m,formItemId:s}=n();return l(F,{ref:o,className:a(m&&"text-destructive",e),htmlFor:s,...r})});g.displayName="FormLabel";var I=t.forwardRef(({...e},r)=>{let{error:o,formItemId:m,formDescriptionId:s,formMessageId:i}=n();return l(u,{ref:r,"aria-describedby":o?`${s} ${i}`:s,"aria-invalid":!!o,id:m,...e})});I.displayName="FormControl";var x=t.forwardRef(({className:e,...r},o)=>{let{formDescriptionId:m}=n();return l("p",{ref:o,className:a("text-muted-foreground text-xs",e),id:m,...r})});x.displayName="FormDescription";var C=t.forwardRef(({children:e,className:r,...o},m)=>{let{error:s,formMessageId:i}=n(),d=s?.message?String(s.message):e;return d?l("p",{ref:m,className:a("text-destructive text-xs font-medium",r),id:i,...o,children:d}):null});C.displayName="FormMessage";export{b as Form,I as FormControl,x as FormDescription,h as FormField,R as FormItem,g as FormLabel,C as FormMessage,n as useFormField};
1
+ "use client";import{a as F}from"../chunk-JNOLIDCD.js";import{a}from"../chunk-5UXVZTFG.js";import*as t from"react";import{Slot as u}from"@radix-ui/react-slot";import{Controller as f,FormProvider as P,useFormContext as y}from"react-hook-form";import{jsx as l}from"react/jsx-runtime";var p=t.createContext(null),c=t.createContext(null),n=()=>{let e=t.useContext(p),r=t.useContext(c),{getFieldState:o,formState:m}=y();if(!e||!r)throw new Error("useFormField should be used within <FormField>");let s=o(e.name,m),{id:i}=r;return{id:i,name:e.name,formItemId:`form-item-${i}`,formDescriptionId:`form-item-description-${i}`,formMessageId:`form-item-message-${i}`,...s}},b=P;function h({...e}){return l(p.Provider,{value:{name:e.name},children:l(f,{...e})})}var R=t.forwardRef(({className:e,...r},o)=>{let m=t.useId();return l(c.Provider,{value:{id:m},children:l("div",{ref:o,className:a("space-y-2",e),...r})})});R.displayName="FormItem";var g=t.forwardRef(({className:e,...r},o)=>{let{error:m,formItemId:s}=n();return l(F,{ref:o,className:a(m&&"text-destructive",e),htmlFor:s,...r})});g.displayName="FormLabel";var I=t.forwardRef(({...e},r)=>{let{error:o,formItemId:m,formDescriptionId:s,formMessageId:i}=n();return l(u,{ref:r,"aria-describedby":o?`${s} ${i}`:s,"aria-invalid":!!o,id:m,...e})});I.displayName="FormControl";var x=t.forwardRef(({className:e,...r},o)=>{let{formDescriptionId:m}=n();return l("p",{ref:o,className:a("text-muted-foreground text-xs",e),id:m,...r})});x.displayName="FormDescription";var C=t.forwardRef(({children:e,className:r,...o},m)=>{let{error:s,formMessageId:i}=n(),d=s?.message?String(s.message):e;return d?l("p",{ref:m,className:a("text-destructive text-xs font-medium",r),id:i,...o,children:d}):null});C.displayName="FormMessage";export{b as Form,I as FormControl,x as FormDescription,h as FormField,R as FormItem,g as FormLabel,C as FormMessage,n as useFormField};
2
2
  //# sourceMappingURL=form.js.map