@codefast/ui 0.0.69 → 0.0.71

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 (182) hide show
  1. package/dist/{chunk-3COHZ24E.cjs → chunk-4OVSEUWU.cjs} +2 -2
  2. package/dist/chunk-4OVSEUWU.cjs.map +1 -0
  3. package/dist/chunk-5RJANBDJ.cjs.map +1 -1
  4. package/dist/{chunk-T3G5USVY.cjs → chunk-7A3KHJJC.cjs} +1 -1
  5. package/dist/chunk-7A3KHJJC.cjs.map +1 -0
  6. package/dist/{chunk-WKKCZQNO.cjs → chunk-AZBLH63J.cjs} +2 -2
  7. package/dist/chunk-AZBLH63J.cjs.map +1 -0
  8. package/dist/{chunk-AVEDWLNQ.js → chunk-E3N5D7SZ.js} +2 -2
  9. package/dist/chunk-E3N5D7SZ.js.map +1 -0
  10. package/dist/{chunk-WQFHFTYS.js → chunk-EAV2D4D7.js} +1 -1
  11. package/dist/chunk-EAV2D4D7.js.map +1 -0
  12. package/dist/{chunk-LOJBMYTH.cjs → chunk-EIQS2H2C.cjs} +1 -1
  13. package/dist/chunk-EIQS2H2C.cjs.map +1 -0
  14. package/dist/chunk-EW7DAPDC.cjs.map +1 -1
  15. package/dist/{chunk-4MTN7WZ2.cjs → chunk-FXS5BSTC.cjs} +1 -1
  16. package/dist/chunk-FXS5BSTC.cjs.map +1 -0
  17. package/dist/{chunk-JMM2MTPI.cjs → chunk-HHCUGAQW.cjs} +1 -1
  18. package/dist/chunk-HHCUGAQW.cjs.map +1 -0
  19. package/dist/{chunk-RBP4PBCK.js → chunk-LGVR62JW.js} +1 -1
  20. package/dist/chunk-LGVR62JW.js.map +1 -0
  21. package/dist/{chunk-VDVLCSO4.js → chunk-MH6I6OV5.js} +2 -2
  22. package/dist/chunk-MH6I6OV5.js.map +1 -0
  23. package/dist/chunk-NU6SK3FC.cjs.map +1 -1
  24. package/dist/{chunk-HDHZESSG.js → chunk-S5JZF45Z.js} +1 -1
  25. package/dist/chunk-S5JZF45Z.js.map +1 -0
  26. package/dist/{chunk-JNOLIDCD.js → chunk-UIYLYEVW.js} +1 -1
  27. package/dist/chunk-UIYLYEVW.js.map +1 -0
  28. package/dist/{chunk-5QETIFO4.js → chunk-WSAUKCX6.js} +1 -1
  29. package/dist/chunk-WSAUKCX6.js.map +1 -0
  30. package/dist/{chunk-6UQKMUZG.cjs → chunk-Z35GXHKF.cjs} +1 -1
  31. package/dist/{chunk-6UQKMUZG.cjs.map → chunk-Z35GXHKF.cjs.map} +1 -1
  32. package/dist/lib/utils.cjs.map +1 -1
  33. package/dist/react/accordion.cjs.map +1 -1
  34. package/dist/react/accordion.js.map +1 -1
  35. package/dist/react/alert-dialog.cjs +1 -1
  36. package/dist/react/alert-dialog.cjs.map +1 -1
  37. package/dist/react/alert-dialog.js +1 -1
  38. package/dist/react/alert-dialog.js.map +1 -1
  39. package/dist/react/alert.cjs.map +1 -1
  40. package/dist/react/alert.js.map +1 -1
  41. package/dist/react/aspect-ratio.cjs.map +1 -1
  42. package/dist/react/avatar.cjs.map +1 -1
  43. package/dist/react/avatar.js.map +1 -1
  44. package/dist/react/badge.cjs.map +1 -1
  45. package/dist/react/blockquote.cjs.map +1 -1
  46. package/dist/react/box.cjs.map +1 -1
  47. package/dist/react/breadcrumb.cjs.map +1 -1
  48. package/dist/react/breadcrumb.js.map +1 -1
  49. package/dist/react/button.cjs +1 -1
  50. package/dist/react/button.cjs.map +1 -1
  51. package/dist/react/button.js +1 -1
  52. package/dist/react/calendar.cjs +1 -1
  53. package/dist/react/calendar.cjs.map +1 -1
  54. package/dist/react/calendar.js +1 -1
  55. package/dist/react/calendar.js.map +1 -1
  56. package/dist/react/card.cjs.map +1 -1
  57. package/dist/react/card.js.map +1 -1
  58. package/dist/react/carousel.cjs +1 -1
  59. package/dist/react/carousel.cjs.map +1 -1
  60. package/dist/react/carousel.js +1 -1
  61. package/dist/react/carousel.js.map +1 -1
  62. package/dist/react/checkbox-cards.cjs.map +1 -1
  63. package/dist/react/checkbox-cards.js.map +1 -1
  64. package/dist/react/checkbox-group.cjs.map +1 -1
  65. package/dist/react/checkbox-group.js.map +1 -1
  66. package/dist/react/checkbox-group.primitive.cjs.map +1 -1
  67. package/dist/react/checkbox.cjs.map +1 -1
  68. package/dist/react/checkbox.js.map +1 -1
  69. package/dist/react/code.cjs.map +1 -1
  70. package/dist/react/collapsible.cjs.map +1 -1
  71. package/dist/react/collapsible.js.map +1 -1
  72. package/dist/react/command.cjs +1 -1
  73. package/dist/react/command.cjs.map +1 -1
  74. package/dist/react/command.js +1 -1
  75. package/dist/react/command.js.map +1 -1
  76. package/dist/react/container.cjs.map +1 -1
  77. package/dist/react/container.js.map +1 -1
  78. package/dist/react/context-menu.cjs.map +1 -1
  79. package/dist/react/context-menu.js.map +1 -1
  80. package/dist/react/data-table.cjs +1 -1
  81. package/dist/react/data-table.cjs.map +1 -1
  82. package/dist/react/data-table.js +1 -1
  83. package/dist/react/data-table.js.map +1 -1
  84. package/dist/react/dialog.cjs +1 -1
  85. package/dist/react/dialog.cjs.map +1 -1
  86. package/dist/react/dialog.js +1 -1
  87. package/dist/react/drawer.cjs.map +1 -1
  88. package/dist/react/drawer.js.map +1 -1
  89. package/dist/react/dropdown-menu.cjs +1 -1
  90. package/dist/react/dropdown-menu.cjs.map +1 -1
  91. package/dist/react/dropdown-menu.js +1 -1
  92. package/dist/react/em.cjs.map +1 -1
  93. package/dist/react/form.cjs +1 -1
  94. package/dist/react/form.cjs.map +1 -1
  95. package/dist/react/form.js +1 -1
  96. package/dist/react/form.js.map +1 -1
  97. package/dist/react/heading.cjs.map +1 -1
  98. package/dist/react/hover-card.cjs.map +1 -1
  99. package/dist/react/hover-card.js.map +1 -1
  100. package/dist/react/input-otp.cjs.map +1 -1
  101. package/dist/react/input-otp.js.map +1 -1
  102. package/dist/react/input.cjs +1 -1
  103. package/dist/react/input.cjs.map +1 -1
  104. package/dist/react/input.js +1 -1
  105. package/dist/react/kbd.cjs.map +1 -1
  106. package/dist/react/kbd.js.map +1 -1
  107. package/dist/react/label.cjs +1 -1
  108. package/dist/react/label.cjs.map +1 -1
  109. package/dist/react/label.js +1 -1
  110. package/dist/react/menubar.cjs.map +1 -1
  111. package/dist/react/menubar.js.map +1 -1
  112. package/dist/react/navigation-menu.cjs.map +1 -1
  113. package/dist/react/navigation-menu.js.map +1 -1
  114. package/dist/react/pagination.cjs +1 -1
  115. package/dist/react/pagination.cjs.map +1 -1
  116. package/dist/react/pagination.js +1 -1
  117. package/dist/react/pagination.js.map +1 -1
  118. package/dist/react/popover.cjs.map +1 -1
  119. package/dist/react/popover.js.map +1 -1
  120. package/dist/react/pre.cjs.map +1 -1
  121. package/dist/react/progress.cjs.map +1 -1
  122. package/dist/react/progress.js.map +1 -1
  123. package/dist/react/quote.cjs.map +1 -1
  124. package/dist/react/radio-cards.cjs.map +1 -1
  125. package/dist/react/radio-cards.js.map +1 -1
  126. package/dist/react/radio-group.cjs.map +1 -1
  127. package/dist/react/radio-group.js.map +1 -1
  128. package/dist/react/radio.cjs.map +1 -1
  129. package/dist/react/radio.js.map +1 -1
  130. package/dist/react/resizable.cjs.map +1 -1
  131. package/dist/react/resizable.js.map +1 -1
  132. package/dist/react/scroll-area.cjs.map +1 -1
  133. package/dist/react/scroll-area.js.map +1 -1
  134. package/dist/react/section.cjs.map +1 -1
  135. package/dist/react/select.cjs +1 -1
  136. package/dist/react/select.cjs.map +1 -1
  137. package/dist/react/select.js +1 -1
  138. package/dist/react/separator.cjs.map +1 -1
  139. package/dist/react/separator.js.map +1 -1
  140. package/dist/react/sheet.cjs.map +1 -1
  141. package/dist/react/sheet.js.map +1 -1
  142. package/dist/react/skeleton.cjs.map +1 -1
  143. package/dist/react/skeleton.js.map +1 -1
  144. package/dist/react/slider.cjs.map +1 -1
  145. package/dist/react/slider.js.map +1 -1
  146. package/dist/react/sonner.cjs.map +1 -1
  147. package/dist/react/spinner.cjs +1 -1
  148. package/dist/react/spinner.cjs.map +1 -1
  149. package/dist/react/spinner.js +1 -1
  150. package/dist/react/strong.cjs.map +1 -1
  151. package/dist/react/switch.cjs.map +1 -1
  152. package/dist/react/switch.js.map +1 -1
  153. package/dist/react/table.cjs.map +1 -1
  154. package/dist/react/table.js.map +1 -1
  155. package/dist/react/tabs.cjs.map +1 -1
  156. package/dist/react/tabs.js.map +1 -1
  157. package/dist/react/text-input.cjs +1 -1
  158. package/dist/react/text-input.cjs.map +1 -1
  159. package/dist/react/text-input.js +1 -1
  160. package/dist/react/text-input.js.map +1 -1
  161. package/dist/react/text.cjs.map +1 -1
  162. package/dist/react/textarea.cjs.map +1 -1
  163. package/dist/react/textarea.js.map +1 -1
  164. package/dist/react/toggle-group.cjs.map +1 -1
  165. package/dist/react/toggle-group.js.map +1 -1
  166. package/dist/react/toggle.cjs.map +1 -1
  167. package/dist/react/tooltip.cjs.map +1 -1
  168. package/dist/react/tooltip.js.map +1 -1
  169. package/package.json +3 -3
  170. package/dist/chunk-3COHZ24E.cjs.map +0 -1
  171. package/dist/chunk-4MTN7WZ2.cjs.map +0 -1
  172. package/dist/chunk-5QETIFO4.js.map +0 -1
  173. package/dist/chunk-AVEDWLNQ.js.map +0 -1
  174. package/dist/chunk-HDHZESSG.js.map +0 -1
  175. package/dist/chunk-JMM2MTPI.cjs.map +0 -1
  176. package/dist/chunk-JNOLIDCD.js.map +0 -1
  177. package/dist/chunk-LOJBMYTH.cjs.map +0 -1
  178. package/dist/chunk-RBP4PBCK.js.map +0 -1
  179. package/dist/chunk-T3G5USVY.cjs.map +0 -1
  180. package/dist/chunk-VDVLCSO4.js.map +0 -1
  181. package/dist/chunk-WKKCZQNO.cjs.map +0 -1
  182. package/dist/chunk-WQFHFTYS.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/command.tsx"],"names":["React","MagnifyingGlassIcon","CommandPrimitive","jsx","jsxs","Command","className","props","forwardedRef","cn","CommandDialog","children","Dialog","DialogContent","CommandInput","CommandList","CommandEmpty","CommandGroup","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zB,CAAC,CAAE,UAAAX,EAAW,GAAGC,CAAM,EAAGC,IACxBL,EAACD,EAAiB,MAAjB,CACC,IAAKM,EACL,UAAWC,EACT,yNACAH,CACF,EACC,GAAGC,EACN,CAEJ,EAEAU,EAAa,YAAcf,EAAiB,MAAM,YASlD,IAAMgB,EAAyB,aAC7B,CAAC,CAAE,UAAAZ,EAAW,GAAGC,CAAM,EAAGC,IACxBL,EAACD,EAAiB,UAAjB,CAA2B,IAAKM,EAAc,UAAWC,EAAG,uBAAwBH,CAAS,EAAI,GAAGC,EAAO,CAEhH,EAEAW,EAAiB,YAAchB,EAAiB,UAAU,YAS1D,IAAMiB,EAAoB,aAAiD,CAAC,CAAE,UAAAb,EAAW,GAAGC,CAAM,EAAGC,IACnGL,EAACD,EAAiB,KAAjB,CACC,IAAKM,EACL,UAAWC,EACT,0OACAH,CACF,EACC,GAAGC,EACN,CACD,EAEDY,EAAY,YAAcjB,EAAiB,KAAK,YAShD,IAAMkB,EAAuB,aAC3B,CAAC,CAAE,UAAAd,EAAW,GAAGC,CAAM,EAAGC,IACxBL,EAACD,EAAiB,QAAjB,CAAyB,IAAKM,EAAc,UAAWC,EAAG,0BAA2BH,CAAS,EAAI,GAAGC,EAAO,CAEjH,EAEAa,EAAe,YAAclB,EAAiB,QAAQ,YAQtD,SAASmB,EAAgB,CAAE,UAAAf,EAAW,GAAGC,CAAM,EAA4C,CACzF,OAAOJ,EAAC,QAAK,UAAWM,EAAG,wDAAyDH,CAAS,EAAI,GAAGC,EAAO,CAC7G","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"]}
1
+ {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/react/command.cjs","../../src/react/command.tsx"],"names":["Command","className","props","forwardedRef","jsx","CommandPrimitive","cn","CommandDialog","children","Dialog","DialogContent","CommandInput","jsxs","MagnifyingGlassIcon","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandLoading","CommandShortcut"],"mappings":"AAAA,uWAAY,CAAC,yDAA2C,yDAA0C,uECE3E,mDACa,4BACQ,+CAY1C,IADIA,CAAAA,CAAgB,CAAA,CAAA,UAAA,CAAyC,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACvFC,6BAAAA,aAACC,CAAA,CACC,GAAA,CAAKF,CAAAA,CACL,SAAA,CAAWG,iCAAAA,2FACT,CACAL,CACF,CAAA,CACC,GAAGC,CAAAA,CACN,CACD,CAAA,CAEDF,CAAAA,CAAQ,WAAA,CAAcK,aAAAA,CAAiB,WAAA,CAQvC,SAASE,CAAAA,CAAc,CAAE,QAAA,CAAAC,CAAAA,CAAU,GAAGN,CAAM,CAAA,CAA0C,CACpF,OACEE,6BAAAA,mBAACK,CAAA,CAAQ,GAAGP,CAAAA,CACV,QAAA,CAAAE,6BAAAA,mBAACM,CAAA,CAAc,SAAA,CAAU,KAAA,CACvB,QAAA,CAAAN,6BAAAA,CAACJ,CAAA,CAAQ,SAAA,C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BC,6BAAAA,aAACC,CAAiB,OAAA,CAAjB,CAAyB,GAAA,CAAKF,CAAAA,CAAc,SAAA,CAAWG,iCAAAA,yBAAG,CAA2BL,CAAS,CAAA,CAAI,GAAGC,CAAAA,CAAO,CAEjH,CAAA,CAEAiB,CAAAA,CAAe,WAAA,CAAcd,aAAAA,CAAiB,OAAA,CAAQ,WAAA,CAQtD,SAASe,CAAAA,CAAgB,CAAE,SAAA,CAAAnB,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAA4C,CACzF,OAAOE,6BAAAA,MAAC,CAAA,CAAK,SAAA,CAAWE,iCAAAA,uDAAG,CAAyDL,CAAS,CAAA,CAAI,GAAGC,CAAAA,CAAO,CAC7G,CAAA,sQAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/react/command.cjs","sourcesContent":[null,"'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 '@/react/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"]}
@@ -1,2 +1,2 @@
1
- "use client";import{a as r,d}from"../chunk-HDHZESSG.js";import{a as n}from"../chunk-5UXVZTFG.js";import*as p from"react";import{MagnifyingGlassIcon as s}from"@radix-ui/react-icons";import{Command as o}from"cmdk";import{jsx as a,jsxs as g}from"react/jsx-runtime";var i=p.forwardRef(({className:e,...m},t)=>a(o,{ref:t,className:n("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...m}));i.displayName=o.displayName;function v({children:e,...m}){return a(r,{...m,children:a(d,{className:"p-0",children:a(i,{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",children:e})})})}var l=p.forwardRef(({className:e,...m},t)=>g("div",{className:"flex items-center gap-2 border-b px-3","cmdk-input-wrapper":"",children:[a(s,{className:"size-5 shrink-0 opacity-50"}),a(o.Input,{ref:t,className:n("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent text-sm outline-none disabled:cursor-default disabled:opacity-50",e),...m})]}));l.displayName=o.Input.displayName;var c=p.forwardRef(({className:e,...m},t)=>a(o.List,{ref:t,className:n("max-h-72 overflow-y-auto overflow-x-hidden",e),...m}));c.displayName=o.List.displayName;var f=p.forwardRef((e,m)=>a(o.Empty,{ref:m,className:"py-6 text-center text-sm",...e}));f.displayName=o.Empty.displayName;var C=p.forwardRef(({className:e,...m},t)=>a(o.Group,{ref:t,className: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",e),...m}));C.displayName=o.Group.displayName;var y=p.forwardRef(({className:e,...m},t)=>a(o.Separator,{ref:t,className:n("bg-border -mx-1 h-px",e),...m}));y.displayName=o.Separator.displayName;var u=p.forwardRef(({className:e,...m},t)=>a(o.Item,{ref:t,className: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",e),...m}));u.displayName=o.Item.displayName;var P=p.forwardRef(({className:e,...m},t)=>a(o.Loading,{ref:t,className:n("flex justify-center p-2",e),...m}));P.displayName=o.Loading.displayName;function N({className:e,...m}){return a("span",{className:n("text-muted-foreground ml-auto text-xs tracking-widest",e),...m})}export{i as Command,v as CommandDialog,f as CommandEmpty,C as CommandGroup,l as CommandInput,u as CommandItem,c as CommandList,P as CommandLoading,y as CommandSeparator,N as CommandShortcut};
1
+ "use client";import{a as r,d}from"../chunk-S5JZF45Z.js";import{a as n}from"../chunk-5UXVZTFG.js";import*as p from"react";import{MagnifyingGlassIcon as s}from"@radix-ui/react-icons";import{Command as o}from"cmdk";import{jsx as a,jsxs as g}from"react/jsx-runtime";var i=p.forwardRef(({className:e,...m},t)=>a(o,{ref:t,className:n("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...m}));i.displayName=o.displayName;function v({children:e,...m}){return a(r,{...m,children:a(d,{className:"p-0",children:a(i,{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",children:e})})})}var l=p.forwardRef(({className:e,...m},t)=>g("div",{className:"flex items-center gap-2 border-b px-3","cmdk-input-wrapper":"",children:[a(s,{className:"size-5 shrink-0 opacity-50"}),a(o.Input,{ref:t,className:n("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent text-sm outline-none disabled:cursor-default disabled:opacity-50",e),...m})]}));l.displayName=o.Input.displayName;var c=p.forwardRef(({className:e,...m},t)=>a(o.List,{ref:t,className:n("max-h-72 overflow-y-auto overflow-x-hidden",e),...m}));c.displayName=o.List.displayName;var f=p.forwardRef((e,m)=>a(o.Empty,{ref:m,className:"py-6 text-center text-sm",...e}));f.displayName=o.Empty.displayName;var C=p.forwardRef(({className:e,...m},t)=>a(o.Group,{ref:t,className: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",e),...m}));C.displayName=o.Group.displayName;var y=p.forwardRef(({className:e,...m},t)=>a(o.Separator,{ref:t,className:n("bg-border -mx-1 h-px",e),...m}));y.displayName=o.Separator.displayName;var u=p.forwardRef(({className:e,...m},t)=>a(o.Item,{ref:t,className: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",e),...m}));u.displayName=o.Item.displayName;var P=p.forwardRef(({className:e,...m},t)=>a(o.Loading,{ref:t,className:n("flex justify-center p-2",e),...m}));P.displayName=o.Loading.displayName;function N({className:e,...m}){return a("span",{className:n("text-muted-foreground ml-auto text-xs tracking-widest",e),...m})}export{i as Command,v as CommandDialog,f as CommandEmpty,C as CommandGroup,l as CommandInput,u as CommandItem,c as CommandList,P as CommandLoading,y as CommandSeparator,N as CommandShortcut};
2
2
  //# sourceMappingURL=command.js.map
@@ -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 }, 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,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cb,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
+ {"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 '@/react/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,E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,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","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
+ {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/react/container.cjs","../../src/react/container.tsx"],"names":["Container","className","asChild","props","forwardedRef","jsx","Slot","cn"],"mappings":"AAAA,oZAAyC,uECAlB,iDACF,+CAiBV,IAJLA,CAAAA,CAAkB,CAAA,CAAA,UAAA,CACtB,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,OAAA,CAAAC,CAAAA,CAAS,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAG1BC,6BAAAA,CAFWH,CAAUI,eAAAA,CAAO,KAAA,CAE3B,CAAU,GAAA,CAAKF,CAAAA,CAAc,SAAA,CAAWG,iCAAAA,WAAG,CAAaN,CAAS,CAAA,CAAI,GAAGE,CAAAA,CAAO,CAE3F,CAAA,CAEAH,CAAAA,CAAU,WAAA,CAAc,WAAA,CAAA,sBAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/react/container.cjs","sourcesContent":[null,"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>(\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
+ {"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","forwardedRef","cn","ContextMenuSubContent","ContextMenuContent","ContextMenuItem","ContextMenuCheckboxItem","checked","ContextMenuRadioItem","ContextMenuLabel","ContextMenuSeparator","ContextMenuShortcut","ContextMenuArrow"],"mappings":"uDAEA,UAAYA,MAAW,QACvB,UAAYC,MAA0B,+BACtC,OAAS,aAAAC,EAAW,oBAAAC,EAAkB,iBAAAC,MAAqB,wBAkDvD,OAUE,OAAAC,EAVF,QAAAC,MAAA,oBA1CJ,IAAMC,EAAm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imitive 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
+ {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/react/context-menu.cjs","../../src/react/context-menu.tsx"],"names":["ContextMenu","ContextMenuTrigger","ContextMenuGroup","ContextMenuSub","ContextMenuRadioGroup","ContextMenuSubTrigger","children","className","inset","props","forwardedRef","jsxs","cn","jsx","ChevronRightIcon","ContextMenuSubContent","ContextMenuContent","ContextMenuItem","ContextMenuCheckboxItem","checked","CheckIcon","ContextMenuRadioItem","DotFilledIcon","ContextMenuLabel","ContextMenuSeparator","ContextMenuShortcut","ContextMenuArr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AA,CAAiB,WAAA,CAAmC,CAAA,CAAA,KAAA,CAAM,WAAA,CAS1D,IAAMC,CAAAA,CAA6B,CAAA,CAAA,UAAA,CACjC,CAAC,CAAE,SAAA,CAAAjB,CAAAA,CAAW,GAAGE,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACxBG,6BAAAA,CAAsB,CAAA,SAAA,CAArB,CACC,GAAA,CAAKH,CAAAA,CACL,SAAA,CAAWE,iCAAAA,2BAAG,CAA6BL,CAAS,CAAA,CACnD,GAAGE,CAAAA,CACN,CAEJ,CAAA,CAEAe,CAAAA,CAAqB,WAAA,CAAmC,CAAA,CAAA,SAAA,CAAU,WAAA,CAQlE,SAASC,CAAAA,CAAoB,CAAE,SAAA,CAAAlB,CAAAA,CAAW,GAAGE,CAAM,CAAA,CAAgD,CACjG,OAAOI,6BAAAA,MAAC,CAAA,CAAK,SAAA,CAAWD,iCAAAA,uDAAG,CAAyDL,CAAS,CAAA,CAAI,GAAGE,CAAAA,CAAO,CAC7G,CASA,IAAMiB,CAAAA,CAAyB,CAAA,CAAA,UAAA,CAC7B,CAAC,CAAE,SAAA,CAAAnB,CAAAA,CAAW,GAAGE,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACxBG,6BAAAA,CAAsB,CAAA,KAAA,CAArB,CAA2B,GAAA,CAAKH,CAAAA,CAAc,SAAA,CAAWE,iCAAAA,cAAG,CAAgBL,CAAS,CAAA,CAAI,GAAGE,CAAAA,CAAO,CAExG,CAAA,CAEAiB,CAAAA,CAAiB,WAAA,CAAmC,CAAA,CAAA,KAAA,CAAM,WAAA,CAAA,8dAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/react/context-menu.cjs","sourcesContent":[null,"'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 }, 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":"sDAEA,UAAYA,MAAW,QACvB,UAAYC,MAA0B,+BACtC,OAAS,aAAAC,EAAW,oBAAAC,EAAkB,iBAAAC,MAAqB,wBAkDvD,OAUE,OAAAC,EAVF,QAAAC,MAAA,oBA1CJ,IAAMC,EAAmC,OAOnCC,EAA0C,UAO1CC,EAAwC,QAOxCC,EAAsC,MAOtCC,EAA6C,aAY7CC,EAA8B,aAClC,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,MAAAC,EAAO,GAAGC,CAAM,EAAGC,IACzCX,EAAsB,aAArB,CACC,IAAKW,EACL,UAAWC,EACT,mNACAH,GAAS,OACTD,CACF,EACC,GAAGE,EAEH,UAAAH,EACDR,EAACc,EAAA,CAAiB,UAAU,iBAAiB,GAC/C,CAEJ,EAEAP,EAAsB,YAAmC,aAAW,YASpE,IAAMQ,EAA8B,aAClC,CAAC,CAAE,UAAAN,EAAW,GAAGE,CAAM,EAAGC,IACxBZ,EAAsB,SAArB,CACC,SAAAA,EAAsB,aAArB,CACC,IAAKY,EACL,UAAWC,EACT,gtBACAJ,CACF,EACC,GAAGE,EACN,EACF,CAEJ,EAEAI,EAAsB,YAAmC,aAA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,UAAWC,EAAG,oDAAqDH,GAAS,OAAQD,CAAS,EAC5F,GAAGE,EACN,CAEJ,EAEAY,EAAiB,YAAmC,QAAM,YAS1D,IAAMC,EAA6B,aACjC,CAAC,CAAE,UAAAf,EAAW,GAAGE,CAAM,EAAGC,IACxBZ,EAAsB,YAArB,CACC,IAAKY,EACL,UAAWC,EAAG,4BAA6BJ,CAAS,EACnD,GAAGE,EACN,CAEJ,EAEAa,EAAqB,YAAmC,YAAU,YAQlE,SAASC,EAAoB,CAAE,UAAAhB,EAAW,GAAGE,CAAM,EAAgD,CACjG,OAAOX,EAAC,QAAK,UAAWa,EAAG,wDAAyDJ,CAAS,EAAI,GAAGE,EAAO,CAC7G,CASA,IAAMe,EAAyB,aAC7B,CAAC,CAAE,UAAAjB,EAAW,GAAGE,CAAM,EAAGC,IACxBZ,EAAsB,QAArB,CAA2B,IAAKY,EAAc,UAAWC,EAAG,eAAgBJ,CAAS,EAAI,GAAGE,EAAO,CAExG,EAEAe,EAAiB,YAAmC,QAAM","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
+ {"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":"sDAEA,UAAYA,MAAW,QACvB,UAAYC,MAA0B,+BACtC,OAAS,aAAAC,EAAW,oBAAAC,EAAkB,iBAAAC,MAAqB,wBAkDvD,OAUE,OAAAC,EAVF,QAAAC,MAAA,oBA1CJ,IAAMC,EAAmC,OAOnCC,EAA0C,UAO1CC,EAAwC,QAOxCC,EAAsC,MAOtCC,EAA6C,aAY7CC,EAA8B,aAClC,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,MAAAC,EAAO,GAAGC,CAAM,EAAGC,IACzCX,EAAsB,aAArB,CACC,IAAKW,EACL,UAAWC,EACT,mNACAH,GAAS,OACTD,CACF,EACC,GAAGE,EAEH,UAAAH,EACDR,EAACc,EAAA,CAAiB,UAAU,iBAAiB,GAC/C,CAEJ,EAEAP,EAAsB,YAAmC,aAAW,YASpE,IAAMQ,EAA8B,aAClC,CAAC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sB,EACjD,EACF,EACCd,GACH,CAEJ,EAEAa,EAAqB,YAAmC,YAAU,YAYlE,IAAME,EAAyB,aAC7B,CAAC,CAAE,UAAAd,EAAW,MAAAC,EAAO,GAAGC,CAAM,EAAGC,IAC/BZ,EAAsB,QAArB,CACC,IAAKY,EACL,UAAWC,EAAG,oDAAqDH,GAAS,OAAQD,CAAS,EAC5F,GAAGE,EACN,CAEJ,EAEAY,EAAiB,YAAmC,QAAM,YAS1D,IAAMC,EAA6B,aACjC,CAAC,CAAE,UAAAf,EAAW,GAAGE,CAAM,EAAGC,IACxBZ,EAAsB,YAArB,CACC,IAAKY,EACL,UAAWC,EAAG,4BAA6BJ,CAAS,EACnD,GAAGE,EACN,CAEJ,EAEAa,EAAqB,YAAmC,YAAU,YAQlE,SAASC,EAAoB,CAAE,UAAAhB,EAAW,GAAGE,CAAM,EAAgD,CACjG,OAAOX,EAAC,QAAK,UAAWa,EAAG,wDAAyDJ,CAAS,EAAI,GAAGE,EAAO,CAC7G,CASA,IAAMe,EAAyB,aAC7B,CAAC,CAAE,UAAAjB,EAAW,GAAGE,CAAM,EAAGC,IACxBZ,EAAsB,QAArB,CAA2B,IAAKY,EAAc,UAAWC,EAAG,eAAgBJ,CAAS,EAAI,GAAGE,EAAO,CAExG,EAEAe,EAAiB,YAAmC,QAAM","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 _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;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkZ35GXHKFcjs = require('../chunk-Z35GXHKF.cjs');var _chunkHHCUGAQWcjs = require('../chunk-HHCUGAQW.cjs');var _chunkAZBLH63Jcjs = require('../chunk-AZBLH63J.cjs');require('../chunk-EIQS2H2C.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, _chunkHHCUGAQWcjs.a,{children:[_jsxruntime.jsx.call(void 0, _chunkHHCUGAQWcjs.b,{asChild:!0,children:_jsxruntime.jsxs.call(void 0, _chunkAZBLH63Jcjs.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, _chunkHHCUGAQWcjs.h,{align:"end",className:"w-36",children:[_jsxruntime.jsx.call(void 0, _chunkHHCUGAQWcjs.l,{children:"Toggle columns"}),_jsxruntime.jsx.call(void 0, _chunkHHCUGAQWcjs.m,{}),a.getAllColumns().filter(n=>typeof n.accessorFn<"u"&&n.getCanHide()).map(n=>_jsxruntime.jsx.call(void 0, _chunkHHCUGAQWcjs.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, _chunkZ35GXHKFcjs.a,{value:String(a.getState().pagination.pageSize),onValueChange:i=>{a.setPageSize(Number(i))},children:[_jsxruntime.jsx.call(void 0, _chunkZ35GXHKFcjs.d,{className:"w-18 h-8",children:_jsxruntime.jsx.call(void 0, _chunkZ35GXHKFcjs.c,{placeholder:a.getState().pagination.pageSize})}),_jsxruntime.jsx.call(void 0, _chunkZ35GXHKFcjs.g,{side:"top",children:[10,20,30,40,50].map(i=>_jsxruntime.jsx.call(void 0, _chunkZ35GXHKFcjs.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, _chunkAZBLH63Jcjs.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, _chunkAZBLH63Jcjs.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, _chunkAZBLH63Jcjs.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, _chunkAZBLH63Jcjs.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, _chunkHHCUGAQWcjs.a,{children:[_jsxruntime.jsx.call(void 0, _chunkHHCUGAQWcjs.b,{asChild:!0,children:_jsxruntime.jsxs.call(void 0, _chunkAZBLH63Jcjs.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, _chunkHHCUGAQWcjs.h,{align:"start",children:[_jsxruntime.jsxs.call(void 0, _chunkHHCUGAQWcjs.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, _chunkHHCUGAQWcjs.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, _chunkHHCUGAQWcjs.m,{}),_jsxruntime.jsxs.call(void 0, _chunkHHCUGAQWcjs.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 +1 @@
1
- {"version":3,"sources":["../../src/react/data-table.tsx"],"names":["ArrowDownIcon","ArrowUpIcon","CaretSortIcon","ChevronLeftIcon","ChevronRightIcon","DoubleArrowLeftIcon","DoubleArrowRightIcon","EyeNoneIcon","MixerHorizontalIcon","jsx","jsxs","DataTableViewOptions","table","DropdownMenu","DropdownMenuTrigger","Button","DropdownMenuContent","DropdownMenuLabel","DropdownMenuSeparator","column","DropdownMenuCheckboxItem","value","DataTablePagination","className","props","cn","Select","SelectTrigger","SelectValue","SelectContent","pageSize","SelectItem","DataTableColumnHeader","title","SortIcon","DropdownMenuItem","sorted"],"mappings":"yRAGA,OACE,iBAAAA,EACA,eAAAC,EACA,iBAAAC,EACA,mBAAAC,EACA,oBAAAC,EACA,uBAAAC,EACA,wBAAAC,EACA,eAAAC,EACA,uBAAAC,MACK,wBA2BC,OACE,OAAAC,EADF,QAAAC,MAAA,oBAJR,SAASC,EAA4B,CAAE,MAAAC,CAAM,EAAwD,CACnG,OACEF,EAACG,EAAA,CACC,UAAAJ,EAAC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,EAKrBV,EAAC,OAAI,UAAWgB,EAAG,8BAA+BF,CAAS,EACzD,SAAAb,EAACG,EAAA,CACC,UAAAJ,EAACK,EAAA,CAAoB,QAAO,GAC1B,SAAAJ,EAACK,EAAA,CAAO,UAAU,oCAAoC,KAAK,KAAK,QAAQ,QACtE,UAAAN,EAAC,QAAM,SAAAwB,EAAM,EACbxB,EAACyB,EAAA,CAAS,OAAQf,EAAO,YAAY,EAAG,GAC1C,EACF,EACAT,EAACM,EAAA,CAAoB,MAAM,QACzB,UAAAN,EAACyB,EAAA,CACC,QAAS,IAAM,CACbhB,EAAO,cAAc,EAAK,CAC5B,EAEA,UAAAV,EAACR,EAAA,CAAY,UAAU,yCAAyC,EAAE,OAEpE,EACAS,EAACyB,EAAA,CACC,QAAS,IAAM,CACbhB,EAAO,cAAc,EAAI,CAC3B,EAEA,UAAAV,EAACT,EAAA,CAAc,UAAU,yCAAyC,EAAE,QAEtE,EACAS,EAACS,EAAA,EAAsB,EACvBR,EAACyB,EAAA,CACC,QAAS,IAAM,CACbhB,EAAO,iBAAiB,EAAK,CAC/B,EAEA,UAAAV,EAACF,EAAA,CAAY,UAAU,yCAAyC,EAAE,QAEpE,GACF,GACF,EACF,EAxCOE,EAAC,OAAI,UAAWc,EAAY,SAAAU,EAAM,CA0C7C,CAEA,SAASC,EAAS,CAAE,OAAAE,CAAO,EAAoE,CAC7F,OAAQA,EAAQ,CACd,IAAK,OACH,OAAO3B,EAACT,EAAA,CAAc,UAAU,cAAc,EAEhD,IAAK,MACH,OAAOS,EAACR,EAAA,CAAY,UAAU,cAAc,EAE9C,QACE,OAAOQ,EAACP,EAAA,CAAc,UAAU,cAAc,CAClD,CACF","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport {\n ArrowDownIcon,\n ArrowUpIcon,\n CaretSortIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n DoubleArrowLeftIcon,\n DoubleArrowRightIcon,\n EyeNoneIcon,\n MixerHorizontalIcon,\n} from '@radix-ui/react-icons';\nimport type * as ReactTable from '@tanstack/react-table';\nimport { cn } from '../lib/utils';\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from './dropdown-menu';\nimport { Button } from './button';\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from './select';\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableViewOptions\n * -------------------------------------------------------------------------- */\n\ninterface DataTableViewOptionsProps<TData> {\n table: ReactTable.Table<TData>;\n}\n\nfunction DataTableViewOptions<TData>({ table }: DataTableViewOptionsProps<TData>): React.JSX.Element {\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button className=\"ml-auto hidden h-8 lg:flex\" size=\"sm\" variant=\"outline\">\n <MixerHorizontalIcon className=\"mr-2 size-4\" />\n View\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-36\">\n <DropdownMenuLabel>Toggle columns</DropdownMenuLabel>\n <DropdownMenuSeparator />\n {table\n .getAllColumns()\n .filter((column) => typeof column.accessorFn !== 'undefined' && column.getCanHide())\n .map((column) => {\n return (\n <DropdownMenuCheckboxItem\n key={column.id}\n checked={column.getIsVisible()}\n className=\"capitalize\"\n onCheckedChange={(value) => {\n column.toggleVisibility(Boolean(value));\n }}\n >\n {column.id}\n </DropdownMenuCheckboxItem>\n );\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTablePagination\n * -------------------------------------------------------------------------- */\n\ninterface DataTablePaginationProps<TData> extends React.HTMLAttributes<HTMLDivElement> {\n table: ReactTable.Table<TData>;\n}\n\nfunction DataTablePagination<TData>({\n table,\n className,\n ...props\n}: DataTablePaginationProps<TData>): React.JSX.Element {\n return (\n <div className={cn('flex items-center justify-between px-2', className)} {...props}>\n <div className=\"text-muted-foreground flex-1 text-sm\">\n {table.getFilteredSelectedRowModel().rows.length} of {table.getFilteredRowModel().rows.length} row(s) selected.\n </div>\n <div className=\"flex items-center space-x-6 lg:space-x-8\">\n <div className=\"flex items-center space-x-2\">\n <p className=\"text-sm font-medium\">Rows per page</p>\n <Select\n value={String(table.getState().pagination.pageSize)}\n onValueChange={(value) => {\n table.setPageSize(Number(value));\n }}\n >\n <SelectTrigger className=\"w-18 h-8\">\n <SelectValue placeholder={table.getState().pagination.pageSize} />\n </SelectTrigger>\n <SelectContent side=\"top\">\n {[10, 20, 30, 40, 50].map((pageSize) => (\n <SelectItem key={pageSize} value={String(pageSize)}>\n {pageSize}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <div className=\"flex w-28 items-center justify-center text-sm font-medium\">\n Page {table.getState().pagination.pageIndex + 1} of {table.getPageCount()}\n </div>\n <div className=\"flex items-center space-x-2\">\n <Button\n className=\"hidden lg:flex\"\n disabled={!table.getCanPreviousPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.setPageIndex(0);\n }}\n >\n <span className=\"sr-only\">Go to first page</span>\n <DoubleArrowLeftIcon className=\"size-4\" />\n </Button>\n <Button\n disabled={!table.getCanPreviousPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.previousPage();\n }}\n >\n <span className=\"sr-only\">Go to previous page</span>\n <ChevronLeftIcon className=\"size-4\" />\n </Button>\n <Button\n disabled={!table.getCanNextPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.nextPage();\n }}\n >\n <span className=\"sr-only\">Go to next page</span>\n <ChevronRightIcon className=\"size-4\" />\n </Button>\n <Button\n className=\"hidden lg:flex\"\n disabled={!table.getCanNextPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.setPageIndex(table.getPageCount() - 1);\n }}\n >\n <span className=\"sr-only\">Go to last page</span>\n <DoubleArrowRightIcon className=\"size-4\" />\n </Button>\n </div>\n </div>\n </div>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableColumnHeader\n * -------------------------------------------------------------------------- */\n\ninterface DataTableColumnHeaderProps<TData, TValue> extends React.HTMLAttributes<HTMLDivElement> {\n column: ReactTable.Column<TData, TValue>;\n title: string;\n}\n\nfunction DataTableColumnHeader<TData, TValue>({\n column,\n title,\n className,\n}: DataTableColumnHeaderProps<TData, TValue>): React.JSX.Element {\n if (!column.getCanSort()) {\n return <div className={className}>{title}</div>;\n }\n\n return (\n <div className={cn('flex items-center space-x-2', className)}>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button className=\"data-[state=open]:bg-accent -ml-3\" size=\"xs\" variant=\"ghost\">\n <span>{title}</span>\n <SortIcon sorted={column.getIsSorted()} />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\">\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(false);\n }}\n >\n <ArrowUpIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Asc\n </DropdownMenuItem>\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(true);\n }}\n >\n <ArrowDownIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Desc\n </DropdownMenuItem>\n <DropdownMenuSeparator />\n <DropdownMenuItem\n onClick={() => {\n column.toggleVisibility(false);\n }}\n >\n <EyeNoneIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Hide\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n );\n}\n\nfunction SortIcon({ sorted }: { sorted: false | ReactTable.SortDirection }): React.JSX.Element {\n switch (sorted) {\n case 'desc':\n return <ArrowDownIcon className=\"ml-2 size-4\" />;\n\n case 'asc':\n return <ArrowUpIcon className=\"ml-2 size-4\" />;\n\n default:\n return <CaretSortIcon className=\"ml-2 size-4\" />;\n }\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n DataTableViewOptions,\n DataTablePagination,\n DataTableColumnHeader,\n type DataTableViewOptionsProps,\n type DataTablePaginationProps,\n type DataTableColumnHeaderProps,\n};\n"]}
1
+ {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/react/data-table.cjs","../../src/react/data-table.tsx"],"names":["DataTableViewOptions","table","jsxs","DropdownMenu","jsx","DropdownMenuTrigger","Button","MixerHorizontalIcon","DropdownMenuContent","DropdownMenuLabel","DropdownMenuSeparator","column","DropdownMenuCheckboxItem","value","DataTablePagination","className","props","cn","Select","SelectTrigger","SelectValue","SelectContent","pageSize","SelectItem","DoubleArrowLeftIcon","ChevronLeftIcon","ChevronRightIcon","DoubleArrowRightIcon","DataTableColumnHeader","title","SortIcon","DropdownMenuItem","ArrowUpIcon","ArrowDownIcon","EyeNoneIcon","sorted","CaretSortIcon"],"mappings":"AAAA,qFAAY,CAAC,yDAAqE,yDAAoF,yDAA0C,iCAA8B,yDAA0C,mDCajR,+CA2BC,SAJCA,CAAAA,CAA4B,CAAE,KAAA,CAAAC,CAAM,CAAA,CAAwD,CACnG,OACEC,8BAAAA,mBAACC,CAAA,CACC,QAAA,CAAA,CAAAC,6BAAAA,mBAACC,CAAA,CAAoB,OAAA,CAAO,CAAA,CAAA,CAC1B,QAAA,CAAAH,8BAAAA,mBAACI,CAAA,CAAO,SAAA,CAAU,4BAAA,CAA6B,IAAA,CAAK,IAAA,CAAK,OAAA,CAAQ,SAAA,CAC/D,QAAA,CAAA,CAAAF,6BAAAA,+BAACG,CAAA,CAAoB,SAAA,CAAU,aAAA,CAAc,CAAA,CAAE,MAAA,CAAA,CAEjD,CAAA,CACF,CAAA,CACAL,8BAAAA,mBAACM,CAAA,CAAoB,KAAA,CAAM,KAAA,CAAM,SAAA,CAAU,MAAA,CACzC,QAAA,CAAA,CAAAJ,6BAAAA,mBAACK,CAAA,CAAkB,QAAA,CAAA,gBAAA,CAAc,CAAA,CACjCL,6BAAAA,mBAACM,CAAA,CAAA,CAAsB,CAAA,CACtBT,CAAAA,CACE,aAAA,CAAc,CA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';\n\nimport * as React from 'react';\nimport {\n ArrowDownIcon,\n ArrowUpIcon,\n CaretSortIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n DoubleArrowLeftIcon,\n DoubleArrowRightIcon,\n EyeNoneIcon,\n MixerHorizontalIcon,\n} from '@radix-ui/react-icons';\nimport type * as ReactTable from '@tanstack/react-table';\nimport { cn } from '@/lib/utils';\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from '@/react/dropdown-menu';\nimport { Button } from '@/react/button';\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/react/select';\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableViewOptions\n * -------------------------------------------------------------------------- */\n\ninterface DataTableViewOptionsProps<TData> {\n table: ReactTable.Table<TData>;\n}\n\nfunction DataTableViewOptions<TData>({ table }: DataTableViewOptionsProps<TData>): React.JSX.Element {\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button className=\"ml-auto hidden h-8 lg:flex\" size=\"sm\" variant=\"outline\">\n <MixerHorizontalIcon className=\"mr-2 size-4\" />\n View\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-36\">\n <DropdownMenuLabel>Toggle columns</DropdownMenuLabel>\n <DropdownMenuSeparator />\n {table\n .getAllColumns()\n .filter((column) => typeof column.accessorFn !== 'undefined' && column.getCanHide())\n .map((column) => {\n return (\n <DropdownMenuCheckboxItem\n key={column.id}\n checked={column.getIsVisible()}\n className=\"capitalize\"\n onCheckedChange={(value) => {\n column.toggleVisibility(Boolean(value));\n }}\n >\n {column.id}\n </DropdownMenuCheckboxItem>\n );\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTablePagination\n * -------------------------------------------------------------------------- */\n\ninterface DataTablePaginationProps<TData> extends React.HTMLAttributes<HTMLDivElement> {\n table: ReactTable.Table<TData>;\n}\n\nfunction DataTablePagination<TData>({\n table,\n className,\n ...props\n}: DataTablePaginationProps<TData>): React.JSX.Element {\n return (\n <div className={cn('flex items-center justify-between px-2', className)} {...props}>\n <div className=\"text-muted-foreground flex-1 text-sm\">\n {table.getFilteredSelectedRowModel().rows.length} of {table.getFilteredRowModel().rows.length} row(s) selected.\n </div>\n <div className=\"flex items-center space-x-6 lg:space-x-8\">\n <div className=\"flex items-center space-x-2\">\n <p className=\"text-sm font-medium\">Rows per page</p>\n <Select\n value={String(table.getState().pagination.pageSize)}\n onValueChange={(value) => {\n table.setPageSize(Number(value));\n }}\n >\n <SelectTrigger className=\"w-18 h-8\">\n <SelectValue placeholder={table.getState().pagination.pageSize} />\n </SelectTrigger>\n <SelectContent side=\"top\">\n {[10, 20, 30, 40, 50].map((pageSize) => (\n <SelectItem key={pageSize} value={String(pageSize)}>\n {pageSize}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <div className=\"flex w-28 items-center justify-center text-sm font-medium\">\n Page {table.getState().pagination.pageIndex + 1} of {table.getPageCount()}\n </div>\n <div className=\"flex items-center space-x-2\">\n <Button\n className=\"hidden lg:flex\"\n disabled={!table.getCanPreviousPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.setPageIndex(0);\n }}\n >\n <span className=\"sr-only\">Go to first page</span>\n <DoubleArrowLeftIcon className=\"size-4\" />\n </Button>\n <Button\n disabled={!table.getCanPreviousPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.previousPage();\n }}\n >\n <span className=\"sr-only\">Go to previous page</span>\n <ChevronLeftIcon className=\"size-4\" />\n </Button>\n <Button\n disabled={!table.getCanNextPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.nextPage();\n }}\n >\n <span className=\"sr-only\">Go to next page</span>\n <ChevronRightIcon className=\"size-4\" />\n </Button>\n <Button\n className=\"hidden lg:flex\"\n disabled={!table.getCanNextPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.setPageIndex(table.getPageCount() - 1);\n }}\n >\n <span className=\"sr-only\">Go to last page</span>\n <DoubleArrowRightIcon className=\"size-4\" />\n </Button>\n </div>\n </div>\n </div>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableColumnHeader\n * -------------------------------------------------------------------------- */\n\ninterface DataTableColumnHeaderProps<TData, TValue> extends React.HTMLAttributes<HTMLDivElement> {\n column: ReactTable.Column<TData, TValue>;\n title: string;\n}\n\nfunction DataTableColumnHeader<TData, TValue>({\n column,\n title,\n className,\n}: DataTableColumnHeaderProps<TData, TValue>): React.JSX.Element {\n if (!column.getCanSort()) {\n return <div className={className}>{title}</div>;\n }\n\n return (\n <div className={cn('flex items-center space-x-2', className)}>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button className=\"data-[state=open]:bg-accent -ml-3\" size=\"xs\" variant=\"ghost\">\n <span>{title}</span>\n <SortIcon sorted={column.getIsSorted()} />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\">\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(false);\n }}\n >\n <ArrowUpIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Asc\n </DropdownMenuItem>\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(true);\n }}\n >\n <ArrowDownIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Desc\n </DropdownMenuItem>\n <DropdownMenuSeparator />\n <DropdownMenuItem\n onClick={() => {\n column.toggleVisibility(false);\n }}\n >\n <EyeNoneIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Hide\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n );\n}\n\nfunction SortIcon({ sorted }: { sorted: false | ReactTable.SortDirection }): React.JSX.Element {\n switch (sorted) {\n case 'desc':\n return <ArrowDownIcon className=\"ml-2 size-4\" />;\n\n case 'asc':\n return <ArrowUpIcon className=\"ml-2 size-4\" />;\n\n default:\n return <CaretSortIcon className=\"ml-2 size-4\" />;\n }\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n DataTableViewOptions,\n DataTablePagination,\n DataTableColumnHeader,\n type DataTableViewOptionsProps,\n type DataTablePaginationProps,\n type DataTableColumnHeaderProps,\n};\n"]}
@@ -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-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};
1
+ "use client";import{a as D,c as f,d as T,g as x,i as w}from"../chunk-WSAUKCX6.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-EAV2D4D7.js";import{b as o}from"../chunk-MH6I6OV5.js";import"../chunk-LGVR62JW.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 +1 @@
1
- {"version":3,"sources":["../../src/react/data-table.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport {\n ArrowDownIcon,\n ArrowUpIcon,\n CaretSortIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n DoubleArrowLeftIcon,\n DoubleArrowRightIcon,\n EyeNoneIcon,\n MixerHorizontalIcon,\n} from '@radix-ui/react-icons';\nimport type * as ReactTable from '@tanstack/react-table';\nimport { cn } from '../lib/utils';\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from './dropdown-menu';\nimport { Button } from './button';\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from './select';\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableViewOptions\n * -------------------------------------------------------------------------- */\n\ninterface DataTableViewOptionsProps<TData> {\n table: ReactTable.Table<TData>;\n}\n\nfunction DataTableViewOptions<TData>({ table }: DataTableViewOptionsProps<TData>): React.JSX.Element {\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button className=\"ml-auto hidden h-8 lg:flex\" size=\"sm\" variant=\"outline\">\n <MixerHorizontalIcon className=\"mr-2 size-4\" />\n View\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-36\">\n <DropdownMenuLabel>Toggle columns</DropdownMenuLabel>\n <DropdownMenuSeparator />\n {table\n .getAllColumns()\n .filter((column) => typeof column.accessorFn !== 'undefined' && column.getCanHide())\n .map((column) => {\n return (\n <DropdownMenuCheckboxItem\n key={column.id}\n checked={column.getIsVisible()}\n className=\"capitalize\"\n onCheckedChange={(value) => {\n column.toggleVisibility(Boolean(value));\n }}\n >\n {column.id}\n </DropdownMenuCheckboxItem>\n );\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTablePagination\n * -------------------------------------------------------------------------- */\n\ninterface DataTablePaginationProps<TData> extends React.HTMLAttributes<HTMLDivElement> {\n table: ReactTable.Table<TData>;\n}\n\nfunction DataTablePagination<TData>({\n table,\n className,\n ...props\n}: DataTablePaginationProps<TData>): React.JSX.Element {\n return (\n <div className={cn('flex items-center justify-between px-2', className)} {...props}>\n <div className=\"text-muted-foreground flex-1 text-sm\">\n {table.getFilteredSelectedRowModel().rows.length} of {table.getFilteredRowModel().rows.length} row(s) selected.\n </div>\n <div className=\"flex items-center space-x-6 lg:space-x-8\">\n <div className=\"flex items-center space-x-2\">\n <p className=\"text-sm font-medium\">Rows per page</p>\n <Select\n value={String(table.getState().pagination.pageSize)}\n onValueChange={(value) => {\n table.setPageSize(Number(value));\n }}\n >\n <SelectTrigger className=\"w-18 h-8\">\n <SelectValue placeholder={table.getState().pagination.pageSize} />\n </SelectTrigger>\n <SelectContent side=\"top\">\n {[10, 20, 30, 40, 50].map((pageSize) => (\n <SelectItem key={pageSize} value={String(pageSize)}>\n {pageSize}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <div className=\"flex w-28 items-center justify-center text-sm font-medium\">\n Page {table.getState().pagination.pageIndex + 1} of {table.getPageCount()}\n </div>\n <div className=\"flex items-center space-x-2\">\n <Button\n className=\"hidden lg:flex\"\n disabled={!table.getCanPreviousPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.setPageIndex(0);\n }}\n >\n <span className=\"sr-only\">Go to first page</span>\n <DoubleArrowLeftIcon className=\"size-4\" />\n </Button>\n <Button\n disabled={!table.getCanPreviousPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.previousPage();\n }}\n >\n <span className=\"sr-only\">Go to previous page</span>\n <ChevronLeftIcon className=\"size-4\" />\n </Button>\n <Button\n disabled={!table.getCanNextPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.nextPage();\n }}\n >\n <span className=\"sr-only\">Go to next page</span>\n <ChevronRightIcon className=\"size-4\" />\n </Button>\n <Button\n className=\"hidden lg:flex\"\n disabled={!table.getCanNextPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.setPageIndex(table.getPageCount() - 1);\n }}\n >\n <span className=\"sr-only\">Go to last page</span>\n <DoubleArrowRightIcon className=\"size-4\" />\n </Button>\n </div>\n </div>\n </div>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableColumnHeader\n * -------------------------------------------------------------------------- */\n\ninterface DataTableColumnHeaderProps<TData, TValue> extends React.HTMLAttributes<HTMLDivElement> {\n column: ReactTable.Column<TData, TValue>;\n title: string;\n}\n\nfunction DataTableColumnHeader<TData, TValue>({\n column,\n title,\n className,\n}: DataTableColumnHeaderProps<TData, TValue>): React.JSX.Element {\n if (!column.getCanSort()) {\n return <div className={className}>{title}</div>;\n }\n\n return (\n <div className={cn('flex items-center space-x-2', className)}>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button className=\"data-[state=open]:bg-accent -ml-3\" size=\"xs\" variant=\"ghost\">\n <span>{title}</span>\n <SortIcon sorted={column.getIsSorted()} />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\">\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(false);\n }}\n >\n <ArrowUpIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Asc\n </DropdownMenuItem>\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(true);\n }}\n >\n <ArrowDownIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Desc\n </DropdownMenuItem>\n <DropdownMenuSeparator />\n <DropdownMenuItem\n onClick={() => {\n column.toggleVisibility(false);\n }}\n >\n <EyeNoneIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Hide\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n );\n}\n\nfunction SortIcon({ sorted }: { sorted: false | ReactTable.SortDirection }): React.JSX.Element {\n switch (sorted) {\n case 'desc':\n return <ArrowDownIcon className=\"ml-2 size-4\" />;\n\n case 'asc':\n return <ArrowUpIcon className=\"ml-2 size-4\" />;\n\n default:\n return <CaretSortIcon className=\"ml-2 size-4\" />;\n }\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n DataTableViewOptions,\n DataTablePagination,\n DataTableColumnHeader,\n type DataTableViewOptionsProps,\n type DataTablePaginationProps,\n type DataTableColumnHeaderProps,\n};\n"],"mappings":"oRAGA,OACE,iBAAAA,EACA,eAAAC,EACA,iBAAAC,EACA,mBAAAC,EACA,oBAAAC,EACA,uBAAAC,EACA,wBAAAC,EACA,eAAAC,EACA,uBAAAC,MACK,wBA2BC,OACE,OAAAC,EADF,QAAAC,MAAA,oBAJR,SAASC,EAA4B,CAAE,MAAAC,CAAM,EAAwD,CACnG,OACEF,EAACG,EAAA,CACC,UAAAJ,EAACK,EAAA,CAAoB,QAAO,GAC1B,SAAAJ,EAACK,EAAA,CAAO,UAAU,6BAA6B,KAAK,KAAK,QAAQ,UAC/D,UAAAN,EAACO,EAAA,CAAoB,UAAU,cAAc,EAAE,QAEjD,EACF,EACAN,EAACO,EAAA,CAAoB,MAAM,MAAM,UAAU,OACzC,UAAAR,EAACS,EAAA,CAAkB,0BAAc,EACjCT,EAACU,EAAA,EAAsB,EACtBP,EACE,cAAc,EACd,OAAQQ,GAAW,OAAOA,EAAO,WAAe,KAAeA,EAAO,WAAW,CAAC,EAClF,IAAKA,GAEFX,EAACY,EAAA,CAEC,QAASD,EAAO,aAAa,EAC7B,UAAU,aACV,gBAAkBE,GAAU,CAC1BF,EAAO,iBAAiB,EAAQE,CAAM,CACxC,EAEC,SAAAF,EAAO,IAPHA,EAAO,EAQd,CAEH,GACL,GACF,CA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C3B,EAEA,UAAAX,EAACiC,EAAA,CAAc,UAAU,yCAAyC,EAAE,QAEtE,EACAjC,EAACU,EAAA,EAAsB,EACvBT,EAAC8B,EAAA,CACC,QAAS,IAAM,CACbpB,EAAO,iBAAiB,EAAK,CAC/B,EAEA,UAAAX,EAACkC,EAAA,CAAY,UAAU,yCAAyC,EAAE,QAEpE,GACF,GACF,EACF,EAxCOlC,EAAC,OAAI,UAAWe,EAAY,SAAAc,EAAM,CA0C7C,CAEA,SAASC,EAAS,CAAE,OAAAK,CAAO,EAAoE,CAC7F,OAAQA,EAAQ,CACd,IAAK,OACH,OAAOnC,EAACiC,EAAA,CAAc,UAAU,cAAc,EAEhD,IAAK,MACH,OAAOjC,EAACgC,EAAA,CAAY,UAAU,cAAc,EAE9C,QACE,OAAOhC,EAACoC,EAAA,CAAc,UAAU,cAAc,CAClD,CACF","names":["ArrowDownIcon","ArrowUpIcon","CaretSortIcon","ChevronLeftIcon","ChevronRightIcon","DoubleArrowLeftIcon","DoubleArrowRightIcon","EyeNoneIcon","MixerHorizontalIcon","jsx","jsxs","DataTableViewOptions","table","DropdownMenu","DropdownMenuTrigger","Button","MixerHorizontalIcon","DropdownMenuContent","DropdownMenuLabel","DropdownMenuSeparator","column","DropdownMenuCheckboxItem","value","DataTablePagination","className","props","cn","Select","SelectTrigger","SelectValue","SelectContent","pageSize","SelectItem","DoubleArrowLeftIcon","ChevronLeftIcon","ChevronRightIcon","DoubleArrowRightIcon","DataTableColumnHeader","title","SortIcon","DropdownMenuItem","ArrowUpIcon","ArrowDownIcon","EyeNoneIcon","sorted","CaretSortIcon"]}
1
+ {"version":3,"sources":["../../src/react/data-table.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport {\n ArrowDownIcon,\n ArrowUpIcon,\n CaretSortIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n DoubleArrowLeftIcon,\n DoubleArrowRightIcon,\n EyeNoneIcon,\n MixerHorizontalIcon,\n} from '@radix-ui/react-icons';\nimport type * as ReactTable from '@tanstack/react-table';\nimport { cn } from '@/lib/utils';\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from '@/react/dropdown-menu';\nimport { Button } from '@/react/button';\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/react/select';\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableViewOptions\n * -------------------------------------------------------------------------- */\n\ninterface DataTableViewOptionsProps<TData> {\n table: ReactTable.Table<TData>;\n}\n\nfunction DataTableViewOptions<TData>({ table }: DataTableViewOptionsProps<TData>): React.JSX.Element {\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button className=\"ml-auto hidden h-8 lg:flex\" size=\"sm\" variant=\"outline\">\n <MixerHorizontalIcon className=\"mr-2 size-4\" />\n View\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-36\">\n <DropdownMenuLabel>Toggle columns</DropdownMenuLabel>\n <DropdownMenuSeparator />\n {table\n .getAllColumns()\n .filter((column) => typeof column.accessorFn !== 'undefined' && column.getCanHide())\n .map((column) => {\n return (\n <DropdownMenuCheckboxItem\n key={column.id}\n checked={column.getIsVisible()}\n className=\"capitalize\"\n onCheckedChange={(value) => {\n column.toggleVisibility(Boolean(value));\n }}\n >\n {column.id}\n </DropdownMenuCheckboxItem>\n );\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTablePagination\n * -------------------------------------------------------------------------- */\n\ninterface DataTablePaginationProps<TData> extends React.HTMLAttributes<HTMLDivElement> {\n table: ReactTable.Table<TData>;\n}\n\nfunction DataTablePagination<TData>({\n table,\n className,\n ...props\n}: DataTablePaginationProps<TData>): React.JSX.Element {\n return (\n <div className={cn('flex items-center justify-between px-2', className)} {...props}>\n <div className=\"text-muted-foreground flex-1 text-sm\">\n {table.getFilteredSelectedRowModel().rows.length} of {table.getFilteredRowModel().rows.length} row(s) selected.\n </div>\n <div className=\"flex items-center space-x-6 lg:space-x-8\">\n <div className=\"flex items-center space-x-2\">\n <p className=\"text-sm font-medium\">Rows per page</p>\n <Select\n value={String(table.getState().pagination.pageSize)}\n onValueChange={(value) => {\n table.setPageSize(Number(value));\n }}\n >\n <SelectTrigger className=\"w-18 h-8\">\n <SelectValue placeholder={table.getState().pagination.pageSize} />\n </SelectTrigger>\n <SelectContent side=\"top\">\n {[10, 20, 30, 40, 50].map((pageSize) => (\n <SelectItem key={pageSize} value={String(pageSize)}>\n {pageSize}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <div className=\"flex w-28 items-center justify-center text-sm font-medium\">\n Page {table.getState().pagination.pageIndex + 1} of {table.getPageCount()}\n </div>\n <div className=\"flex items-center space-x-2\">\n <Button\n className=\"hidden lg:flex\"\n disabled={!table.getCanPreviousPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.setPageIndex(0);\n }}\n >\n <span className=\"sr-only\">Go to first page</span>\n <DoubleArrowLeftIcon className=\"size-4\" />\n </Button>\n <Button\n disabled={!table.getCanPreviousPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.previousPage();\n }}\n >\n <span className=\"sr-only\">Go to previous page</span>\n <ChevronLeftIcon className=\"size-4\" />\n </Button>\n <Button\n disabled={!table.getCanNextPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.nextPage();\n }}\n >\n <span className=\"sr-only\">Go to next page</span>\n <ChevronRightIcon className=\"size-4\" />\n </Button>\n <Button\n className=\"hidden lg:flex\"\n disabled={!table.getCanNextPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.setPageIndex(table.getPageCount() - 1);\n }}\n >\n <span className=\"sr-only\">Go to last page</span>\n <DoubleArrowRightIcon className=\"size-4\" />\n </Button>\n </div>\n </div>\n </div>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableColumnHeader\n * -------------------------------------------------------------------------- */\n\ninterface DataTableColumnHeaderProps<TData, TValue> extends React.HTMLAttributes<HTMLDivElement> {\n column: ReactTable.Column<TData, TValue>;\n title: string;\n}\n\nfunction DataTableColumnHeader<TData, TValue>({\n column,\n title,\n className,\n}: DataTableColumnHeaderProps<TData, TValue>): React.JSX.Element {\n if (!column.getCanSort()) {\n return <div className={className}>{title}</div>;\n }\n\n return (\n <div className={cn('flex items-center space-x-2', className)}>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button className=\"data-[state=open]:bg-accent -ml-3\" size=\"xs\" variant=\"ghost\">\n <span>{title}</span>\n <SortIcon sorted={column.getIsSorted()} />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\">\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(false);\n }}\n >\n <ArrowUpIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Asc\n </DropdownMenuItem>\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(true);\n }}\n >\n <ArrowDownIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Desc\n </DropdownMenuItem>\n <DropdownMenuSeparator />\n <DropdownMenuItem\n onClick={() => {\n column.toggleVisibility(false);\n }}\n >\n <EyeNoneIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Hide\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n );\n}\n\nfunction SortIcon({ sorted }: { sorted: false | ReactTable.SortDirection }): React.JSX.Element {\n switch (sorted) {\n case 'desc':\n return <ArrowDownIcon className=\"ml-2 size-4\" />;\n\n case 'asc':\n return <ArrowUpIcon className=\"ml-2 size-4\" />;\n\n default:\n return <CaretSortIcon className=\"ml-2 size-4\" />;\n }\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n DataTableViewOptions,\n DataTablePagination,\n DataTableColumnHeader,\n type DataTableViewOptionsProps,\n type DataTablePaginationProps,\n type DataTableColumnHeaderProps,\n};\n"],"mappings":"oRAGA,OACE,iBAAAA,EACA,eAAAC,EACA,iBAAAC,EACA,mBAAAC,EACA,oBAAAC,EACA,uBAAAC,EACA,wBAAAC,EACA,eAAAC,EACA,uBAAAC,MACK,wBA2BC,OACE,OAAAC,EADF,QAAAC,MAAA,oBAJR,SAASC,EAA4B,CAAE,MAAAC,CAAM,EAAwD,CACnG,OACEF,EAACG,EAAA,CACC,UAAAJ,EAACK,EAAA,CAAoB,QAAO,GAC1B,SAAAJ,EAACK,EAAA,CAAO,UAAU,6BAA6B,KAAK,KAAK,QAAQ,UAC/D,UAAAN,EAACO,EAAA,CAAoB,UAAU,cAAc,EAAE,QAEjD,EACF,EACAN,EAACO,EAAA,CAAoB,MAAM,MAAM,UAAU,OACzC,UAAAR,EAACS,EAAA,CAAkB,0BAAc,EACjCT,EAACU,EAAA,EAAsB,EACtBP,EACE,cAAc,EACd,OAAQQ,GAAW,OAAOA,EAAO,WAAe,KAAeA,EAAO,WAAW,CAAC,EAClF,IAAKA,GAEFX,EAACY,EAAA,CAEC,QAASD,EAAO,aAAa,EAC7B,UAAU,aACV,gBAAkBE,GAAU,CAC1BF,EAAO,iBAAiB,EAAQE,CAAM,CACxC,EAEC,SAAAF,EAAO,IAPHA,EAAO,EAQd,CAEH,GACL,GACF,CAEJ,CAUA,SAASG,EAA2B,CAClC,MAAAX,EACA,UAAAY,EACA,GAAGC,CACL,EAAuD,CACrD,OACEf,EAAC,OAAI,UAAWgB,EAAG,yCAA0CF,CAAS,EAAI,GAAGC,EAC3E,UAAAf,EAAC,OAAI,UAAU,uCACZ,UAAAE,EAAM,4BAA4B,EAAE,KAAK,OAAO,OAAKA,EAAM,oBAAoB,EAAE,KAAK,OAAO,qBAChG,EACAF,EAAC,OAAI,UAAU,2CACb,UAAAA,EAAC,OAAI,UAAU,8BACb,UAAAD,EAAC,KAAE,UAAU,sBAAsB,y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ACd,IAAK,OACH,OAAOnC,EAACiC,EAAA,CAAc,UAAU,cAAc,EAEhD,IAAK,MACH,OAAOjC,EAACgC,EAAA,CAAY,UAAU,cAAc,EAE9C,QACE,OAAOhC,EAACoC,EAAA,CAAc,UAAU,cAAc,CAClD,CACF","names":["ArrowDownIcon","ArrowUpIcon","CaretSortIcon","ChevronLeftIcon","ChevronRightIcon","DoubleArrowLeftIcon","DoubleArrowRightIcon","EyeNoneIcon","MixerHorizontalIcon","jsx","jsxs","DataTableViewOptions","table","DropdownMenu","DropdownMenuTrigger","Button","MixerHorizontalIcon","DropdownMenuContent","DropdownMenuLabel","DropdownMenuSeparator","column","DropdownMenuCheckboxItem","value","DataTablePagination","className","props","cn","Select","SelectTrigger","SelectValue","SelectContent","pageSize","SelectItem","DoubleArrowLeftIcon","ChevronLeftIcon","ChevronRightIcon","DoubleArrowRightIcon","DataTableColumnHeader","title","SortIcon","DropdownMenuItem","ArrowUpIcon","ArrowDownIcon","EyeNoneIcon","sorted","CaretSortIcon"]}
@@ -1,2 +1,2 @@
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;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkFXS5BSTCcjs = require('../chunk-FXS5BSTC.cjs');require('../chunk-NU6SK3FC.cjs');exports.Dialog = _chunkFXS5BSTCcjs.a; exports.DialogBody = _chunkFXS5BSTCcjs.f; exports.DialogClose = _chunkFXS5BSTCcjs.c; exports.DialogContent = _chunkFXS5BSTCcjs.d; exports.DialogDescription = _chunkFXS5BSTCcjs.i; exports.DialogFooter = _chunkFXS5BSTCcjs.g; exports.DialogHeader = _chunkFXS5BSTCcjs.e; exports.DialogTitle = _chunkFXS5BSTCcjs.h; exports.DialogTrigger = _chunkFXS5BSTCcjs.b;
2
2
  //# sourceMappingURL=dialog.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":""}
1
+ {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/react/dialog.cjs"],"names":[],"mappings":"AAAA,qFAAY,CAAC,yDAAoD,iCAA8B,wYAAuK","file":"/home/runner/work/codefast/codefast/packages/ui/dist/react/dialog.cjs"}
@@ -1,2 +1,2 @@
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};
1
+ "use client";import{a,b,c,d,e,f,g,h,i}from"../chunk-S5JZF45Z.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