@codefast/ui 0.1.13 → 0.1.14
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.
- package/dist/chunk-AH3OBTDO.cjs +2 -0
- package/dist/chunk-AH3OBTDO.cjs.map +1 -0
- package/dist/chunk-CIMAEJ26.js +2 -0
- package/dist/chunk-CIMAEJ26.js.map +1 -0
- package/dist/chunk-EWFBUJ5V.cjs +2 -0
- package/dist/chunk-EWFBUJ5V.cjs.map +1 -0
- package/dist/chunk-FPCACNPX.cjs +2 -0
- package/dist/chunk-FPCACNPX.cjs.map +1 -0
- package/dist/chunk-O5EAJQGO.js +2 -0
- package/dist/chunk-O5EAJQGO.js.map +1 -0
- package/dist/chunk-SP6TA64U.js +2 -0
- package/dist/chunk-SP6TA64U.js.map +1 -0
- package/dist/components/accordion.cjs +1 -1
- package/dist/components/accordion.cjs.map +1 -1
- package/dist/components/accordion.js +1 -1
- package/dist/components/accordion.js.map +1 -1
- package/dist/components/alert-dialog.cjs +1 -1
- package/dist/components/alert-dialog.cjs.map +1 -1
- package/dist/components/alert-dialog.js +1 -1
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/carousel.cjs +1 -1
- package/dist/components/carousel.cjs.map +1 -1
- package/dist/components/carousel.d.cts +6 -1
- package/dist/components/carousel.d.ts +6 -1
- package/dist/components/carousel.js +1 -1
- package/dist/components/carousel.js.map +1 -1
- package/dist/components/collapsible.cjs +1 -1
- package/dist/components/collapsible.cjs.map +1 -1
- package/dist/components/collapsible.js +1 -1
- package/dist/components/collapsible.js.map +1 -1
- package/dist/components/command.cjs +1 -1
- package/dist/components/command.cjs.map +1 -1
- package/dist/components/command.d.cts +8 -8
- package/dist/components/command.d.ts +8 -8
- package/dist/components/command.js +1 -1
- package/dist/components/command.js.map +1 -1
- package/dist/components/context-menu.cjs +1 -1
- package/dist/components/context-menu.cjs.map +1 -1
- package/dist/components/context-menu.js +1 -1
- package/dist/components/context-menu.js.map +1 -1
- package/dist/components/data-table.cjs +1 -1
- package/dist/components/data-table.cjs.map +1 -1
- package/dist/components/data-table.js +1 -1
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/dialog.cjs +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/dropdown-menu.cjs +1 -1
- package/dist/components/dropdown-menu.cjs.map +1 -1
- package/dist/components/dropdown-menu.d.cts +3 -1
- package/dist/components/dropdown-menu.d.ts +3 -1
- package/dist/components/dropdown-menu.js +1 -1
- package/dist/components/hover-card.cjs +1 -1
- package/dist/components/hover-card.cjs.map +1 -1
- package/dist/components/hover-card.js +1 -1
- package/dist/components/hover-card.js.map +1 -1
- package/dist/components/menubar.cjs +1 -1
- package/dist/components/menubar.cjs.map +1 -1
- package/dist/components/menubar.d.cts +3 -1
- package/dist/components/menubar.d.ts +3 -1
- package/dist/components/menubar.js +1 -1
- package/dist/components/menubar.js.map +1 -1
- package/dist/components/navigation-menu.cjs +1 -1
- package/dist/components/navigation-menu.cjs.map +1 -1
- package/dist/components/navigation-menu.js +1 -1
- package/dist/components/navigation-menu.js.map +1 -1
- package/dist/components/popover.cjs +1 -1
- package/dist/components/popover.cjs.map +1 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/popover.js.map +1 -1
- package/dist/components/select.cjs +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/sheet.cjs +1 -1
- package/dist/components/sheet.cjs.map +1 -1
- package/dist/components/sheet.d.cts +30 -30
- package/dist/components/sheet.d.ts +30 -30
- package/dist/components/sheet.js +1 -1
- package/dist/components/sheet.js.map +1 -1
- package/dist/components/table.cjs +1 -1
- package/dist/components/table.cjs.map +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/table.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +11 -11
- package/dist/chunk-CF44244M.js +0 -2
- package/dist/chunk-CF44244M.js.map +0 -1
- package/dist/chunk-EXOTUGK5.cjs +0 -2
- package/dist/chunk-EXOTUGK5.cjs.map +0 -1
- package/dist/chunk-KH4PSDPI.js +0 -2
- package/dist/chunk-KH4PSDPI.js.map +0 -1
- package/dist/chunk-TY2YG7LH.cjs +0 -2
- package/dist/chunk-TY2YG7LH.cjs.map +0 -1
- package/dist/chunk-XOSPBKAU.cjs +0 -2
- package/dist/chunk-XOSPBKAU.cjs.map +0 -1
- package/dist/chunk-ZBAEU4QU.js +0 -2
- package/dist/chunk-ZBAEU4QU.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/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 '@/components/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 'relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n 'aria-selected:bg-accent aria-selected:text-accent-foreground 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":"mIAEA,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,U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AAiB,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,uFACA,6DACA,0FACAJ,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
|
+
{"version":3,"sources":["../../src/components/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 '@/components/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 'px-2.75 gap-2.75 h-8',\n 'relative flex cursor-pointer select-none items-center rounded-sm text-sm',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n 'aria-selected:bg-accent aria-selected:text-accent-foreground 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":"mIAEA,UAAYA,MAAW,QACvB,OAAS,uBAAAC,MAA2B,wBACpC,OAAS,WAAWC,MAAwB,OAY1C,cAAAC,EAuCE,QAAAC,MAvCF,oBADF,IAAMC,EAAgB,aAAyC,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACvFL,EAACM,EAAA,CACC,IAAKD,EACL,UAAWE,EACT,4FACAJ,CACF,EACC,GAAGC,EACN,CACD,EAEDF,EAAQ,YAAcI,EAAiB,YAQvC,SAASE,EAAc,CAAE,SAAAC,EAAU,GAAGL,CAAM,EAA0C,CACpF,OACEJ,EAACU,EAAA,CAAQ,GAAGN,EACV,SAAAJ,EAACW,EAAA,CAAc,UAAU,MACvB,SAAAX,EAACE,EAAA,CAAQ,UAAU,2TAChB,SAAAO,EACH,EACF,EACF,CAEJ,CASA,IAAMG,EAAqB,aACzB,CAAC,CAAE,UAAAT,EAAW,GAAGC,CAAM,EAAGC,IACxBJ,EAAC,OAAI,UAAU,wCAAwC,qBAAmB,GACxE,UAAAD,EAACa,EAAA,CAAoB,UAAU,6BAA6B,EAC5Db,EAACM,EAAiB,MAAjB,CACC,IAAKD,EACL,UAAWE,EACT,gJACAJ,CACF,EACC,GAAGC,EACN,GACF,CAEJ,EAEAQ,EAAa,YAAcN,EAAiB,MAAM,YASlD,IAAMQ,EAAoB,aAAiD,CAAC,CAAE,UAAAX,EAAW,GAAGC,C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K,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,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var _chunk4XRBMJ5Qcjs = require('../chunk-4XRBMJ5Q.cjs');var _react = require('react'); var a = _interopRequireWildcard(_react);var _reactcontextmenu = require('@radix-ui/react-context-menu'); var e = _interopRequireWildcard(_reactcontextmenu);var _reacticons = require('@radix-ui/react-icons');var _jsxruntime = require('react/jsx-runtime');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var _chunk4XRBMJ5Qcjs = require('../chunk-4XRBMJ5Q.cjs');var _react = require('react'); var a = _interopRequireWildcard(_react);var _reactcontextmenu = require('@radix-ui/react-context-menu'); var e = _interopRequireWildcard(_reactcontextmenu);var _reacticons = require('@radix-ui/react-icons');var _jsxruntime = require('react/jsx-runtime');var h=e.Root,I= exports.ContextMenuTrigger =e.Trigger,S= exports.ContextMenuGroup =e.Group,N= exports.ContextMenuSub =e.Sub,E= exports.ContextMenuRadioGroup =e.RadioGroup,d= exports.ContextMenuSubTrigger =a.forwardRef(({children:t,className:o,inset:n,...s},u)=>_jsxruntime.jsxs.call(void 0, e.SubTrigger,{ref:u,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "px-2.75 gap-2.75 h-8","flex cursor-pointer select-none items-center rounded-sm text-sm","focus:bg-accent focus:text-accent-foreground focus:outline-none","data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",n&&"pl-8",o),...s,children:[t,_jsxruntime.jsx.call(void 0, _reacticons.ChevronRightIcon,{className:"ml-auto size-4"})]}));d.displayName=e.SubTrigger.displayName;var c=a.forwardRef(({className:t,...o},n)=>_jsxruntime.jsx.call(void 0, e.Portal,{children:_jsxruntime.jsx.call(void 0, e.SubContent,{ref:n,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "bg-popover text-popover-foreground z-50 min-w-32 rounded-md border p-1 shadow-md","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",t),...o})}));c.displayName=e.SubContent.displayName;var l=a.forwardRef(({className:t,...o},n)=>_jsxruntime.jsx.call(void 0, e.Portal,{children:_jsxruntime.jsx.call(void 0, e.Content,{ref:n,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "bg-popover text-popover-foreground z-50 min-w-32 rounded-md border p-1 shadow-md","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",t),...o})}));l.displayName=e.Content.displayName;var M=a.forwardRef(({className:t,inset:o,...n},s)=>_jsxruntime.jsx.call(void 0, e.Item,{ref:s,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "px-2.75 gap-2.75 h-8","relative flex cursor-pointer select-none items-center rounded-sm text-sm","focus:bg-accent focus:text-accent-foreground focus:outline-none","aria-disabled:pointer-events-none aria-disabled:opacity-50",o&&"pl-8",t),...n}));M.displayName=e.Item.displayName;var f=a.forwardRef(({children:t,className:o,checked:n,...s},u)=>_jsxruntime.jsxs.call(void 0, e.CheckboxItem,{ref:u,checked:n,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "px-2.75 gap-2.75 h-8","pl-8","relative flex cursor-pointer select-none items-center rounded-sm text-sm","focus:bg-accent focus:text-accent-foreground focus:outline-none","aria-disabled:pointer-events-none aria-disabled:opacity-50",o),...s,children:[_jsxruntime.jsx.call(void 0, "span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:_jsxruntime.jsx.call(void 0, e.ItemIndicator,{children:_jsxruntime.jsx.call(void 0, _reacticons.CheckIcon,{className:"size-4"})})}),t]}));f.displayName=e.CheckboxItem.displayName;var P=a.forwardRef(({children:t,className:o,...n},s)=>_jsxruntime.jsxs.call(void 0, e.RadioItem,{ref:s,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "px-2.75 gap-2.75 h-8","pl-8","relative flex cursor-pointer select-none items-center rounded-sm text-sm","focus:bg-accent focus:text-accent-foreground focus:outline-none","aria-disabled:pointer-events-none aria-disabled:opacity-50",o),...n,children:[_jsxruntime.jsx.call(void 0, "span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:_jsxruntime.jsx.call(void 0, e.ItemIndicator,{children:_jsxruntime.jsx.call(void 0, _reacticons.DotFilledIcon,{className:"size-4 fill-current"})})}),t]}));P.displayName=e.RadioItem.displayName;var y=a.forwardRef(({className:t,inset:o,...n},s)=>_jsxruntime.jsx.call(void 0, e.Label,{ref:s,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "px-2.75 gap-2.75 h-8","flex items-center text-sm font-semibold",o&&"pl-8",t),...n}));y.displayName=e.Label.displayName;var R=a.forwardRef(({className:t,...o},n)=>_jsxruntime.jsx.call(void 0, e.Separator,{ref:n,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "bg-muted mx-2 my-1 h-px",t),...o}));R.displayName=e.Separator.displayName;function w({className:t,...o}){return _jsxruntime.jsx.call(void 0, "span",{className:_chunk4XRBMJ5Qcjs.a.call(void 0, "text-muted-foreground ml-auto text-xs tracking-widest",t),...o})}var b=a.forwardRef(({className:t,...o},n)=>_jsxruntime.jsx.call(void 0, e.Arrow,{ref:n,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "fill-popover",t),...o}));b.displayName=e.Arrow.displayName;exports.ContextMenu = h; exports.ContextMenuArrow = b; exports.ContextMenuCheckboxItem = f; exports.ContextMenuContent = l; exports.ContextMenuGroup = S; exports.ContextMenuItem = M; exports.ContextMenuLabel = y; exports.ContextMenuRadioGroup = E; exports.ContextMenuRadioItem = P; exports.ContextMenuSeparator = R; exports.ContextMenuShortcut = w; exports.ContextMenuSub = N; exports.ContextMenuSubContent = c; exports.ContextMenuSubTrigger = d; exports.ContextMenuTrigger = I;
|
|
2
2
|
//# sourceMappingURL=context-menu.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/components/context-menu.cjs","../../src/components/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","ContextMenuArrow"],"mappings":"AAAA,uWAAY,CAAC,yDAAyC,uECE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AA,CAC5F,GAAGE,CAAAA,CACN,CAEJ,CAAA,CAEAc,CAAAA,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,yBAAG,CAA2BL,CAAS,CAAA,CACjD,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/components/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 'flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'data-[state=open]:bg-accent data-[state=open]:text-accent-foreground',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </ContextMenuPrimitive.SubTrigger>\n ),\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 'relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n '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 'relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <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 'relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <DotFilledIcon className=\"size-4 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n ),\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-muted mx-2 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/components/context-menu.cjs","../../src/components/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","ContextMenuArrow"],"mappings":"AAAA,uWAAY,CA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CAAO,CAExG,CAAA,CAEAiB,CAAAA,CAAiB,WAAA,CAAmC,CAAA,CAAA,KAAA,CAAM,WAAA,CAAA,8dAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/components/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 'px-2.75 gap-2.75 h-8',\n 'flex cursor-pointer select-none items-center rounded-sm text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'data-[state=open]:bg-accent data-[state=open]:text-accent-foreground',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </ContextMenuPrimitive.SubTrigger>\n ),\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 z-50 min-w-32 rounded-md border p-1 shadow-md',\n 'data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95',\n 'data-[state=open]:data-[side=top]:slide-in-from-bottom-2',\n 'data-[state=open]:data-[side=right]:slide-in-from-left-2',\n 'data-[state=open]:data-[side=bottom]:slide-in-from-top-2',\n 'data-[state=open]:data-[side=left]:slide-in-from-right-2',\n 'data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95',\n 'data-[state=closed]:data-[side=top]:slide-out-to-bottom-2',\n 'data-[state=closed]:data-[side=right]:slide-out-to-left-2',\n 'data-[state=closed]:data-[side=bottom]:slide-out-to-top-2',\n 'data-[state=closed]:data-[side=left]:slide-out-to-right-2',\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n ),\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 z-50 min-w-32 rounded-md border p-1 shadow-md',\n 'data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95',\n 'data-[state=open]:data-[side=top]:slide-in-from-bottom-2',\n 'data-[state=open]:data-[side=right]:slide-in-from-left-2',\n 'data-[state=open]:data-[side=bottom]:slide-in-from-top-2',\n 'data-[state=open]:data-[side=left]:slide-in-from-right-2',\n 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 'px-2.75 gap-2.75 h-8',\n 'relative flex cursor-pointer select-none items-center rounded-sm text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n '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 'px-2.75 gap-2.75 h-8',\n 'pl-8',\n 'relative flex cursor-pointer select-none items-center rounded-sm text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <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 'px-2.75 gap-2.75 h-8',\n 'pl-8',\n 'relative flex cursor-pointer select-none items-center rounded-sm text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <DotFilledIcon className=\"size-4 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n ),\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('px-2.75 gap-2.75 h-8', 'flex items-center 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-muted mx-2 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,2 +1,2 @@
|
|
|
1
|
-
"use client";import{a as r}from"../chunk-VRBUDJBH.js";import*as a from"react";import*as e from"@radix-ui/react-context-menu";import{CheckIcon as m,ChevronRightIcon as C,DotFilledIcon as x}from"@radix-ui/react-icons";import{jsx as i,jsxs as p}from"react/jsx-runtime";var
|
|
1
|
+
"use client";import{a as r}from"../chunk-VRBUDJBH.js";import*as a from"react";import*as e from"@radix-ui/react-context-menu";import{CheckIcon as m,ChevronRightIcon as C,DotFilledIcon as x}from"@radix-ui/react-icons";import{jsx as i,jsxs as p}from"react/jsx-runtime";var h=e.Root,I=e.Trigger,S=e.Group,N=e.Sub,E=e.RadioGroup,d=a.forwardRef(({children:t,className:o,inset:n,...s},u)=>p(e.SubTrigger,{ref:u,className:r("px-2.75 gap-2.75 h-8","flex cursor-pointer select-none items-center rounded-sm text-sm","focus:bg-accent focus:text-accent-foreground focus:outline-none","data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",n&&"pl-8",o),...s,children:[t,i(C,{className:"ml-auto size-4"})]}));d.displayName=e.SubTrigger.displayName;var c=a.forwardRef(({className:t,...o},n)=>i(e.Portal,{children:i(e.SubContent,{ref:n,className:r("bg-popover text-popover-foreground z-50 min-w-32 rounded-md border p-1 shadow-md","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",t),...o})}));c.displayName=e.SubContent.displayName;var l=a.forwardRef(({className:t,...o},n)=>i(e.Portal,{children:i(e.Content,{ref:n,className:r("bg-popover text-popover-foreground z-50 min-w-32 rounded-md border p-1 shadow-md","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",t),...o})}));l.displayName=e.Content.displayName;var M=a.forwardRef(({className:t,inset:o,...n},s)=>i(e.Item,{ref:s,className:r("px-2.75 gap-2.75 h-8","relative flex cursor-pointer select-none items-center rounded-sm text-sm","focus:bg-accent focus:text-accent-foreground focus:outline-none","aria-disabled:pointer-events-none aria-disabled:opacity-50",o&&"pl-8",t),...n}));M.displayName=e.Item.displayName;var f=a.forwardRef(({children:t,className:o,checked:n,...s},u)=>p(e.CheckboxItem,{ref:u,checked:n,className:r("px-2.75 gap-2.75 h-8","pl-8","relative flex cursor-pointer select-none items-center rounded-sm text-sm","focus:bg-accent focus:text-accent-foreground focus:outline-none","aria-disabled:pointer-events-none aria-disabled:opacity-50",o),...s,children:[i("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:i(e.ItemIndicator,{children:i(m,{className:"size-4"})})}),t]}));f.displayName=e.CheckboxItem.displayName;var P=a.forwardRef(({children:t,className:o,...n},s)=>p(e.RadioItem,{ref:s,className:r("px-2.75 gap-2.75 h-8","pl-8","relative flex cursor-pointer select-none items-center rounded-sm text-sm","focus:bg-accent focus:text-accent-foreground focus:outline-none","aria-disabled:pointer-events-none aria-disabled:opacity-50",o),...n,children:[i("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:i(e.ItemIndicator,{children:i(x,{className:"size-4 fill-current"})})}),t]}));P.displayName=e.RadioItem.displayName;var y=a.forwardRef(({className:t,inset:o,...n},s)=>i(e.Label,{ref:s,className:r("px-2.75 gap-2.75 h-8","flex items-center text-sm font-semibold",o&&"pl-8",t),...n}));y.displayName=e.Label.displayName;var R=a.forwardRef(({className:t,...o},n)=>i(e.Separator,{ref:n,className:r("bg-muted mx-2 my-1 h-px",t),...o}));R.displayName=e.Separator.displayName;function w({className:t,...o}){return i("span",{className:r("text-muted-foreground ml-auto text-xs tracking-widest",t),...o})}var b=a.forwardRef(({className:t,...o},n)=>i(e.Arrow,{ref:n,className:r("fill-popover",t),...o}));b.displayName=e.Arrow.displayName;export{h as ContextMenu,b as ContextMenuArrow,f as ContextMenuCheckboxItem,l as ContextMenuContent,S as ContextMenuGroup,M as ContextMenuItem,y as ContextMenuLabel,E as ContextMenuRadioGroup,P as ContextMenuRadioItem,R as ContextMenuSeparator,w as ContextMenuShortcut,N as ContextMenuSub,c as ContextMenuSubContent,d as ContextMenuSubTrigger,I as ContextMenuTrigger};
|
|
2
2
|
//# sourceMappingURL=context-menu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/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 'flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'data-[state=open]:bg-accent data-[state=open]:text-accent-foreground',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </ContextMenuPrimitive.SubTrigger>\n ),\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 'relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n '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 'relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <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 'relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <DotFilledIcon className=\"size-4 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n ),\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-muted mx-2 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,OAYE,OAAAC,EAZF,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,8EACA,kEACA,uEACAH,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,aAAW,YASpE,IAAMC,EAA2B,aAC/B,CAAC,CAAE,UAAAP,EAAW,GAAGE,CAAM,EAAGC,IACxBZ,EAAsB,SAArB,CACC,SAAAA,EAAsB,UAArB,CACC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,QAAM,YAS1D,IAAMC,EAA6B,aACjC,CAAC,CAAE,UAAAf,EAAW,GAAGE,CAAM,EAAGC,IACxBZ,EAAsB,YAArB,CACC,IAAKY,EACL,UAAWC,EAAG,0BAA2BJ,CAAS,EACjD,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/components/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 'px-2.75 gap-2.75 h-8',\n 'flex cursor-pointer select-none items-center rounded-sm text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'data-[state=open]:bg-accent data-[state=open]:text-accent-foreground',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </ContextMenuPrimitive.SubTrigger>\n ),\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 z-50 min-w-32 rounded-md border p-1 shadow-md',\n 'data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95',\n 'data-[state=open]:data-[side=top]:slide-in-from-bottom-2',\n 'data-[state=open]:data-[side=right]:slide-in-from-left-2',\n 'data-[state=open]:data-[side=bottom]:slide-in-from-top-2',\n 'data-[state=open]:data-[side=left]:slide-in-from-right-2',\n 'data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95',\n 'data-[state=closed]:data-[side=top]:slide-out-to-bottom-2',\n 'data-[state=closed]:data-[side=right]:slide-out-to-left-2',\n 'data-[state=closed]:data-[side=bottom]:slide-out-to-top-2',\n 'data-[state=closed]:data-[side=left]:slide-out-to-right-2',\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n ),\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 z-50 min-w-32 rounded-md border p-1 shadow-md',\n 'data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95',\n 'data-[state=open]:data-[side=top]:slide-in-from-bottom-2',\n 'data-[state=open]:data-[side=right]:slide-in-from-left-2',\n 'data-[state=open]:data-[side=bottom]:slide-in-from-top-2',\n 'data-[state=open]:data-[side=left]:slide-in-from-right-2',\n 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 'px-2.75 gap-2.75 h-8',\n 'relative flex cursor-pointer select-none items-center rounded-sm text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n '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 'px-2.75 gap-2.75 h-8',\n 'pl-8',\n 'relative flex cursor-pointer select-none items-center rounded-sm text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <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 'px-2.75 gap-2.75 h-8',\n 'pl-8',\n 'relative flex cursor-pointer select-none items-center rounded-sm text-sm',\n 'focus:bg-accent focus:text-accent-foreground focus:outline-none',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <DotFilledIcon className=\"size-4 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n ),\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('px-2.75 gap-2.75 h-8', 'flex items-center 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-muted mx-2 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,OAaE,OAAAC,EAbF,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,uBACA,kEACA,kEACA,uEACAH,GAAS,OACTD,CACF,EACC,GAAGE,E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IAAMG,EAA6B,aACjC,CAAC,CAAE,SAAAb,EAAU,UAAAC,EAAW,GAAGE,CAAM,EAAGC,IAClCX,EAAsB,YAArB,CACC,IAAKW,EACL,UAAWC,EACT,uBACA,OACA,2EACA,kEACA,6DACAJ,CACF,EACC,GAAGE,EAEJ,UAAAX,EAAC,QAAK,UAAU,4DACd,SAAAA,EAAsB,gBAArB,CACC,SAAAA,EAACsB,EAAA,CAAc,UAAU,sBAAsB,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,uBAAwB,0CAA2CH,GAAS,OAAQD,CAAS,EAC1G,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,0BAA2BJ,CAAS,EACjD,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
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkEWFBUJ5Vcjs = require('../chunk-EWFBUJ5V.cjs');var _chunkFPCACNPXcjs = require('../chunk-FPCACNPX.cjs');var _chunkYGWCQ264cjs = require('../chunk-YGWCQ264.cjs');require('../chunk-SL4DH4JN.cjs');var _chunkLSBI35ZEcjs = require('../chunk-LSBI35ZE.cjs');var _chunk4XRBMJ5Qcjs = require('../chunk-4XRBMJ5Q.cjs');var _reacticons = require('@radix-ui/react-icons');var _jsxruntime = require('react/jsx-runtime');function B({table:a}){return _jsxruntime.jsxs.call(void 0, _chunkFPCACNPXcjs.a,{children:[_jsxruntime.jsxs.call(void 0, _chunkFPCACNPXcjs.b,{className:_chunkLSBI35ZEcjs.a.call(void 0, {size:"xs",variant:"outline"}),children:[_jsxruntime.jsx.call(void 0, _reacticons.MixerHorizontalIcon,{className:"size-4"}),"View"]}),_jsxruntime.jsxs.call(void 0, _chunkFPCACNPXcjs.h,{align:"end",className:"w-36",children:[_jsxruntime.jsx.call(void 0, _chunkFPCACNPXcjs.l,{children:"Toggle columns"}),_jsxruntime.jsx.call(void 0, _chunkFPCACNPXcjs.m,{}),a.getAllColumns().filter(n=>typeof n.accessorFn<"u"&&n.getCanHide()).map(n=>_jsxruntime.jsx.call(void 0, _chunkFPCACNPXcjs.j,{checked:n.getIsVisible(),className:"capitalize",onCheckedChange:o=>{n.toggleVisibility(!!o)},children:n.id},n.id))]})]})}function E({table:a,className:n,...o}){return _jsxruntime.jsxs.call(void 0, "div",{className:_chunk4XRBMJ5Qcjs.a.call(void 0, "flex flex-wrap items-center justify-between gap-4 px-2",n),...o,children:[_jsxruntime.jsxs.call(void 0, "div",{className:"text-muted-foreground min-w-max 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 grow flex-wrap items-center justify-between gap-4 md:justify-end md:gap-x-6 lg:gap-x-8",children:[_jsxruntime.jsxs.call(void 0, "div",{className:"flex flex-wrap items-center gap-x-2 gap-y-4",children:[_jsxruntime.jsx.call(void 0, "p",{className:"text-sm font-medium",children:"Rows per page"}),_jsxruntime.jsxs.call(void 0, _chunkEWFBUJ5Vcjs.a,{value:String(a.getState().pagination.pageSize),onValueChange:i=>{a.setPageSize(Number(i))},children:[_jsxruntime.jsx.call(void 0, _chunkEWFBUJ5Vcjs.d,{className:"w-18 h-8",children:_jsxruntime.jsx.call(void 0, _chunkEWFBUJ5Vcjs.c,{placeholder:a.getState().pagination.pageSize})}),_jsxruntime.jsx.call(void 0, _chunkEWFBUJ5Vcjs.g,{side:"top",children:[10,20,30,40,50].map(i=>_jsxruntime.jsx.call(void 0, _chunkEWFBUJ5Vcjs.i,{value:String(i),children:i},i))})]})]}),_jsxruntime.jsxs.call(void 0, "div",{className:"flex flex-wrap 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 flex-wrap items-center gap-x-2 gap-y-4",children:[_jsxruntime.jsxs.call(void 0, _chunkYGWCQ264cjs.a,{icon:!0,className:"max-md:hidden",disabled:!a.getCanPreviousPage(),size:"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, _chunkYGWCQ264cjs.a,{icon:!0,disabled:!a.getCanPreviousPage(),size:"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, _chunkYGWCQ264cjs.a,{icon:!0,disabled:!a.getCanNextPage(),size:"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, _chunkYGWCQ264cjs.a,{icon:!0,className:"max-md:hidden",disabled:!a.getCanNextPage(),size:"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 G({column:a,title:n,className:o}){return a.getCanSort()?_jsxruntime.jsx.call(void 0, "div",{className:_chunk4XRBMJ5Qcjs.a.call(void 0, "flex flex-wrap items-center gap-x-2 gap-y-4",o),children:_jsxruntime.jsxs.call(void 0, _chunkFPCACNPXcjs.a,{children:[_jsxruntime.jsx.call(void 0, _chunkFPCACNPXcjs.b,{asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunkYGWCQ264cjs.a,{className:"data-[state=open]:bg-accent",size:"xs",suffix:_jsxruntime.jsx.call(void 0, R,{sorted:a.getIsSorted()}),variant:"ghost",children:n})}),_jsxruntime.jsxs.call(void 0, _chunkFPCACNPXcjs.h,{align:"start",children:[_jsxruntime.jsxs.call(void 0, _chunkFPCACNPXcjs.i,{onClick:()=>{a.toggleSorting(!1)},children:[_jsxruntime.jsx.call(void 0, _reacticons.ChevronUpIcon,{className:"text-muted-foreground"}),"Asc"]}),_jsxruntime.jsxs.call(void 0, _chunkFPCACNPXcjs.i,{onClick:()=>{a.toggleSorting(!0)},children:[_jsxruntime.jsx.call(void 0, _reacticons.ArrowDownIcon,{className:"text-muted-foreground"}),"Desc"]}),_jsxruntime.jsx.call(void 0, _chunkFPCACNPXcjs.m,{}),_jsxruntime.jsxs.call(void 0, _chunkFPCACNPXcjs.i,{onClick:()=>{a.toggleVisibility(!1)},children:[_jsxruntime.jsx.call(void 0, _reacticons.EyeNoneIcon,{className:"text-muted-foreground"}),"Hide"]})]})]})}):_jsxruntime.jsx.call(void 0, "div",{className:o,children:n})}function R({sorted:a}){switch(a){case"desc":return _jsxruntime.jsx.call(void 0, _reacticons.ArrowDownIcon,{});case"asc":return _jsxruntime.jsx.call(void 0, _reacticons.ChevronUpIcon,{});default:return _jsxruntime.jsx.call(void 0, _reacticons.CaretSortIcon,{})}}exports.DataTableColumnHeader = G; exports.DataTablePagination = E; exports.DataTableViewOptions = B;
|
|
2
2
|
//# sourceMappingURL=data-table.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/components/data-table.cjs","../../src/components/data-table.tsx"],"names":["DataTableViewOptions","table","jsxs","DropdownMenu","DropdownMenuTrigger","buttonVariants","jsx","MixerHorizontalIcon","DropdownMenuContent","DropdownMenuLabel","DropdownMenuSeparator","column","DropdownMenuCheckboxItem","value","DataTablePagination","className","props","cn","Select","SelectTrigger","SelectValue","SelectContent","pageSize","SelectItem","Button","DoubleArrowLeftIcon","ChevronLeftIcon","ChevronRightIcon","DoubleArrowRightIcon","DataTableColumnHeader","title","SortIcon","DropdownMenuItem","ArrowUpIcon","ArrowDownIcon","EyeNoneIcon","sorted","CaretSortIcon"],"mappings":"AAAA,qFAAY,CAAC,yDAAqE,yDAAoF,yDAA0C,iCAA8B,yDAA0C,yDAA0C,mDCa3T,+CA2BD,SAHGA,CAAAA,CAA4B,CAAE,KAAA,CAAAC,CAAM,CAAA,CAAwD,CACnG,OACEC,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C6B,CAAA,CAAY,SAAA,CAAU,wCAAA,CAAyC,CAAA,CAAE,MAAA,CAAA,CAEpE,CAAA,CAAA,CACF,CAAA,CAAA,CACF,CAAA,CACF,CAAA,CAzCO7B,6BAAAA,KAAC,CAAA,CAAI,SAAA,CAAWS,CAAAA,CAAY,QAAA,CAAAe,CAAAA,CAAM,CA2C7C,CAEA,SAASC,CAAAA,CAAS,CAAE,MAAA,CAAAK,CAAO,CAAA,CAAoE,CAC7F,MAAA,CAAQA,CAAAA,CAAQ,CACd,IAAK,MAAA,CACH,OAAO9B,6BAAAA,yBAAC4B,CAAA,CAAc,SAAA,CAAU,aAAA,CAAc,CAAA,CAGhD,IAAK,KAAA,CACH,OAAO5B,6BAAAA,uBAAC2B,CAAA,CAAY,SAAA,CAAU,aAAA,CAAc,CAAA,CAG9C,OAAA,CACE,OAAO3B,6BAAAA,yBAAC+B,CAAA,CAAc,SAAA,CAAU,aAAA,CAAc,CAClD,CACF,CAAA,qGAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/components/data-table.cjs","sourcesContent":[null,"'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 '@/components/dropdown-menu';\nimport { Button } from '@/components/button';\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/select';\nimport { buttonVariants } from '@/styles/button-variants';\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\n className={buttonVariants({ className: 'hidden h-8 lg:flex', size: 'sm', variant: 'outline' })}\n >\n <MixerHorizontalIcon className=\"size-4\" />\n View\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 <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 </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 icon\n className=\"hidden lg:flex\"\n disabled={!table.getCanPreviousPage()}\n size=\"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 icon\n disabled={!table.getCanPreviousPage()}\n size=\"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 icon\n disabled={!table.getCanNextPage()}\n size=\"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 icon\n className=\"hidden lg:flex\"\n disabled={!table.getCanNextPage()}\n size=\"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\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\n case 'asc': {\n return <ArrowUpIcon className=\"ml-2 size-4\" />;\n }\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/components/data-table.cjs","../../src/components/data-table.tsx"],"names":["DataTableViewOptions","table","jsxs","DropdownMenu","DropdownMenuTrigger","buttonVariants","jsx","MixerHorizontalIcon","DropdownMenuContent","DropdownMenuLabel","DropdownMenuSeparator","column","DropdownMenuCheckboxItem","value","DataTablePagination","className","props","cn","Select","SelectTrigger","SelectValue","SelectContent","pageSize","SelectItem","Button","DoubleArrowLeftIcon","ChevronLeftIcon","ChevronRightIcon","DoubleArrowRightIcon","DataTableColumnHeader","title","SortIcon","DropdownMenuItem","ChevronUpIcon","ArrowDownIcon","EyeNoneIcon","sorted","CaretSortIcon"],"mappings":"AAAA,qFAAY,CAAC,yDAAqE,yDAAoF,yDAA0C,iCAA8B,yDAA0C,yDAA0C,mDCa3T,+CA2BD,SAHGA,CAAAA,CAA4B,CAAE,KAAA,CAAAC,CAAM,CAAA,CAAwD,CACnG,OACEC,8BAAAA,mBAACC,CAAA,CACC,QAAA,CAAA,CAAAD,8BAAAA,mBAACE,CAAA,CAAoB,SAAA,CAAWC,iCAAAA,CAAiB,IAAA,CAAM,IAAA,CAAM,OAAA,CAAS,SAAU,CAAC,CAAA,CAC/E,QAAA,CAAA,CAAAC,6BAAAA,+BAACC,CAAA,CAAoB,SAAA,CAAU,QAAA,CAAS,CAAA,CAAE,MAAA,CAAA,CAE5C,CAAA,CACAL,8BAAAA,mBAACM,CAAA,CAAoB,KAAA,CAAM,KAAA,CAAM,SAAA,CAAU,MAAA,CACzC,QAAA,CAAA,CAAAF,6BAAAA,mBAACG,CAAA,CAAkB,QAAA,CAAA,gBAAA,CAAc,CAAA,CACjCH,6BAAAA,mBAACI,CAAA,CAAA,CAAsB,CAAA,CACtBT,CAAAA,CACE,aAAA,CAAc,CAAA,CACd,MAAA,CAAQU,CAAAA,EAAW,OAAOA,CAAAA,CAAO,UAAA,CAAe,GAAA,EAAeA,CAAAA,CAAO,UAAA,CAAW,CAAC,CAAA,CAClF,GAAA,CAAKA,CAAAA,EACJL,6BAAAA,mBAACM,CAAA,CAEC,OAAA,CAASD,CAAAA,CAAO,YAAA,CAAa,CAAA,CAC7B,SAAA,CAAU,YAAA,CACV,eAAA,CAAkBE,CAAAA,EAAU,CAC1BF,CAAAA,CAAO,gBAAA,CAAiB,CAAA,CAAQE,CAAM,CACxC,CAAA,CAEC,QAAA,CAAAF,CAAAA,CAAO,EAAA,CAAA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,MAAA,CAAA,CAErD,CAAA,CACA5B,6BAAAA,mBAACI,CAAA,CAAA,CAAsB,CAAA,CACvBR,8BAAAA,mBAAC8B,CAAA,CACC,OAAA,CAAS,CAAA,CAAA,EAAM,CACbrB,CAAAA,CAAO,gBAAA,CAAiB,CAAA,CAAK,CAC/B,CAAA,CAEA,QAAA,CAAA,CAAAL,6BAAAA,uBAAC6B,CAAA,CAAY,SAAA,CAAU,uBAAA,CAAwB,CAAA,CAAE,MAAA,CAAA,CAEnD,CAAA,CAAA,CACF,CAAA,CAAA,CACF,CAAA,CACF,CAAA,CA7CO7B,6BAAAA,KAAC,CAAA,CAAI,SAAA,CAAWS,CAAAA,CAAY,QAAA,CAAAe,CAAAA,CAAM,CA+C7C,CAEA,SAASC,CAAAA,CAAS,CAAE,MAAA,CAAAK,CAAO,CAAA,CAAoE,CAC7F,MAAA,CAAQA,CAAAA,CAAQ,CACd,IAAK,MAAA,CACH,OAAO9B,6BAAAA,yBAAC4B,CAAA,CAAA,CAAc,CAAA,CAGxB,IAAK,KAAA,CACH,OAAO5B,6BAAAA,yBAAC2B,CAAA,CAAA,CAAc,CAAA,CAGxB,OAAA,CACE,OAAO3B,6BAAAA,yBAAC+B,CAAA,CAAA,CAAc,CAC1B,CACF,CAAA,qGAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/components/data-table.cjs","sourcesContent":[null,"'use client';\n\nimport * as React from 'react';\nimport {\n ArrowDownIcon,\n CaretSortIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n ChevronUpIcon,\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 '@/components/dropdown-menu';\nimport { Button } from '@/components/button';\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/select';\nimport { buttonVariants } from '@/styles/button-variants';\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 className={buttonVariants({ size: 'xs', variant: 'outline' })}>\n <MixerHorizontalIcon className=\"size-4\" />\n View\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 <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 </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 flex-wrap items-center justify-between gap-4 px-2', className)} {...props}>\n <div className=\"text-muted-foreground min-w-max flex-1 text-sm\">\n {table.getFilteredSelectedRowModel().rows.length} of {table.getFilteredRowModel().rows.length} row(s) selected.\n </div>\n\n <div className=\"flex grow flex-wrap items-center justify-between gap-4 md:justify-end md:gap-x-6 lg:gap-x-8\">\n <div className=\"flex flex-wrap items-center gap-x-2 gap-y-4\">\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 flex-wrap items-center justify-center text-sm font-medium\">\n Page {table.getState().pagination.pageIndex + 1} of {table.getPageCount()}\n </div>\n <div className=\"flex flex-wrap items-center gap-x-2 gap-y-4\">\n <Button\n icon\n className=\"max-md:hidden\"\n disabled={!table.getCanPreviousPage()}\n size=\"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 icon\n disabled={!table.getCanPreviousPage()}\n size=\"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 icon\n disabled={!table.getCanNextPage()}\n size=\"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 icon\n className=\"max-md:hidden\"\n disabled={!table.getCanNextPage()}\n size=\"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 flex-wrap items-center gap-x-2 gap-y-4', className)}>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n className=\"data-[state=open]:bg-accent\"\n size=\"xs\"\n suffix={<SortIcon sorted={column.getIsSorted()} />}\n variant=\"ghost\"\n >\n {title}\n </Button>\n </DropdownMenuTrigger>\n\n <DropdownMenuContent align=\"start\">\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(false);\n }}\n >\n <ChevronUpIcon className=\"text-muted-foreground\" />\n Asc\n </DropdownMenuItem>\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(true);\n }}\n >\n <ArrowDownIcon className=\"text-muted-foreground\" />\n Desc\n </DropdownMenuItem>\n <DropdownMenuSeparator />\n <DropdownMenuItem\n onClick={() => {\n column.toggleVisibility(false);\n }}\n >\n <EyeNoneIcon className=\"text-muted-foreground\" />\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 />;\n }\n\n case 'asc': {\n return <ChevronUpIcon />;\n }\n\n default:\n return <CaretSortIcon />;\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
|
|
1
|
+
"use client";import{a as D,c as x,d as w,g as T,i as C}from"../chunk-O5EAJQGO.js";import{a as c,b as d,h as g,i as r,j as u,l as f,m as p}from"../chunk-SP6TA64U.js";import{a as s}from"../chunk-ONMU2LFX.js";import"../chunk-K4DIHWHX.js";import{a as m}from"../chunk-YGPIWXWP.js";import{a as l}from"../chunk-VRBUDJBH.js";import{ArrowDownIcon as v,CaretSortIcon as S,ChevronLeftIcon as b,ChevronRightIcon as P,ChevronUpIcon as N,DoubleArrowLeftIcon as M,DoubleArrowRightIcon as I,EyeNoneIcon as y,MixerHorizontalIcon as h}from"@radix-ui/react-icons";import{jsx as e,jsxs as t}from"react/jsx-runtime";function B({table:a}){return t(c,{children:[t(d,{className:m({size:"xs",variant:"outline"}),children:[e(h,{className:"size-4"}),"View"]}),t(g,{align:"end",className:"w-36",children:[e(f,{children:"Toggle columns"}),e(p,{}),a.getAllColumns().filter(n=>typeof n.accessorFn<"u"&&n.getCanHide()).map(n=>e(u,{checked:n.getIsVisible(),className:"capitalize",onCheckedChange:o=>{n.toggleVisibility(!!o)},children:n.id},n.id))]})]})}function E({table:a,className:n,...o}){return t("div",{className:l("flex flex-wrap items-center justify-between gap-4 px-2",n),...o,children:[t("div",{className:"text-muted-foreground min-w-max flex-1 text-sm",children:[a.getFilteredSelectedRowModel().rows.length," of ",a.getFilteredRowModel().rows.length," row(s) selected."]}),t("div",{className:"flex grow flex-wrap items-center justify-between gap-4 md:justify-end md:gap-x-6 lg:gap-x-8",children:[t("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-4",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(w,{className:"w-18 h-8",children:e(x,{placeholder:a.getState().pagination.pageSize})}),e(T,{side:"top",children:[10,20,30,40,50].map(i=>e(C,{value:String(i),children:i},i))})]})]}),t("div",{className:"flex flex-wrap items-center justify-center text-sm font-medium",children:["Page ",a.getState().pagination.pageIndex+1," of ",a.getPageCount()]}),t("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-4",children:[t(s,{icon:!0,className:"max-md:hidden",disabled:!a.getCanPreviousPage(),size:"xs",variant:"outline",onClick:()=>{a.setPageIndex(0)},children:[e("span",{className:"sr-only",children:"Go to first page"}),e(M,{className:"size-4"})]}),t(s,{icon:!0,disabled:!a.getCanPreviousPage(),size:"xs",variant:"outline",onClick:()=>{a.previousPage()},children:[e("span",{className:"sr-only",children:"Go to previous page"}),e(b,{className:"size-4"})]}),t(s,{icon:!0,disabled:!a.getCanNextPage(),size:"xs",variant:"outline",onClick:()=>{a.nextPage()},children:[e("span",{className:"sr-only",children:"Go to next page"}),e(P,{className:"size-4"})]}),t(s,{icon:!0,className:"max-md:hidden",disabled:!a.getCanNextPage(),size:"xs",variant:"outline",onClick:()=>{a.setPageIndex(a.getPageCount()-1)},children:[e("span",{className:"sr-only",children:"Go to last page"}),e(I,{className:"size-4"})]})]})]})]})}function G({column:a,title:n,className:o}){return a.getCanSort()?e("div",{className:l("flex flex-wrap items-center gap-x-2 gap-y-4",o),children:t(c,{children:[e(d,{asChild:!0,children:e(s,{className:"data-[state=open]:bg-accent",size:"xs",suffix:e(R,{sorted:a.getIsSorted()}),variant:"ghost",children:n})}),t(g,{align:"start",children:[t(r,{onClick:()=>{a.toggleSorting(!1)},children:[e(N,{className:"text-muted-foreground"}),"Asc"]}),t(r,{onClick:()=>{a.toggleSorting(!0)},children:[e(v,{className:"text-muted-foreground"}),"Desc"]}),e(p,{}),t(r,{onClick:()=>{a.toggleVisibility(!1)},children:[e(y,{className:"text-muted-foreground"}),"Hide"]})]})]})}):e("div",{className:o,children:n})}function R({sorted:a}){switch(a){case"desc":return e(v,{});case"asc":return e(N,{});default:return e(S,{})}}export{G as DataTableColumnHeader,E as DataTablePagination,B as DataTableViewOptions};
|
|
2
2
|
//# sourceMappingURL=data-table.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/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 '@/components/dropdown-menu';\nimport { Button } from '@/components/button';\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/select';\nimport { buttonVariants } from '@/styles/button-variants';\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\n className={buttonVariants({ className: 'hidden h-8 lg:flex', size: 'sm', variant: 'outline' })}\n >\n <MixerHorizontalIcon className=\"size-4\" />\n View\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 <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 </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 icon\n className=\"hidden lg:flex\"\n disabled={!table.getCanPreviousPage()}\n size=\"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 icon\n disabled={!table.getCanPreviousPage()}\n size=\"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 icon\n disabled={!table.getCanNextPage()}\n size=\"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 icon\n className=\"hidden lg:flex\"\n disabled={!table.getCanNextPage()}\n size=\"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\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\n case 'asc': {\n return <ArrowUpIcon className=\"ml-2 size-4\" />;\n }\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":"6TAGA,OACE,iBAAAA,EACA,eAAAC,EACA,iBAAAC,EACA,mBAAAC,EACA,oBAAAC,EACA,uBAAAC,EACA,wBAAAC,EACA,eAAAC,EACA,uBAAAC,MACK,wBA2BD,OAGE,OAAAC,EAHF,QAAAC,MAAA,oBAHN,SAASC,EAA4B,CAAE,MAAAC,CAAM,EAAwD,CACnG,OACEF,EAACG,EAAA,CACC,UAAAH,EAACI,EAAA,CACC,UAAWC,EAAe,CAAE,UAAW,qBAAsB,KAAM,KAAM,QAAS,SAAU,CAAC,EAE7F,UAAAN,EAACO,EAAA,CAAoB,UAAU,SAAS,EAAE,QAE5C,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,GACJX,EAACY,EAAA,CAEC,QAASD,EAAO,aAAa,EAC7B,UAAU,aACV,gBAAkBE,GAAU,CAC1BF,EAAO,iBAAiB,EAAQE,CAAM,CACxC,EAEC,SAAAF,EAAO,IAPHA,EAAO,EAQd,CACD,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,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ACbrB,EAAO,iBAAiB,EAAK,CAC/B,EAEA,UAAAX,EAACmC,EAAA,CAAY,UAAU,yCAAyC,EAAE,QAEpE,GACF,GACF,EACF,EAzCOnC,EAAC,OAAI,UAAWe,EAAY,SAAAe,EAAM,CA2C7C,CAEA,SAASC,EAAS,CAAE,OAAAK,CAAO,EAAoE,CAC7F,OAAQA,EAAQ,CACd,IAAK,OACH,OAAOpC,EAACkC,EAAA,CAAc,UAAU,cAAc,EAGhD,IAAK,MACH,OAAOlC,EAACiC,EAAA,CAAY,UAAU,cAAc,EAG9C,QACE,OAAOjC,EAACqC,EAAA,CAAc,UAAU,cAAc,CAClD,CACF","names":["ArrowDownIcon","ArrowUpIcon","CaretSortIcon","ChevronLeftIcon","ChevronRightIcon","DoubleArrowLeftIcon","DoubleArrowRightIcon","EyeNoneIcon","MixerHorizontalIcon","jsx","jsxs","DataTableViewOptions","table","DropdownMenu","DropdownMenuTrigger","buttonVariants","MixerHorizontalIcon","DropdownMenuContent","DropdownMenuLabel","DropdownMenuSeparator","column","DropdownMenuCheckboxItem","value","DataTablePagination","className","props","cn","Select","SelectTrigger","SelectValue","SelectContent","pageSize","SelectItem","Button","DoubleArrowLeftIcon","ChevronLeftIcon","ChevronRightIcon","DoubleArrowRightIcon","DataTableColumnHeader","title","SortIcon","DropdownMenuItem","ArrowUpIcon","ArrowDownIcon","EyeNoneIcon","sorted","CaretSortIcon"]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/data-table.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport {\n ArrowDownIcon,\n CaretSortIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n ChevronUpIcon,\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 '@/components/dropdown-menu';\nimport { Button } from '@/components/button';\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/select';\nimport { buttonVariants } from '@/styles/button-variants';\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 className={buttonVariants({ size: 'xs', variant: 'outline' })}>\n <MixerHorizontalIcon className=\"size-4\" />\n View\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 <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 </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 flex-wrap items-center justify-between gap-4 px-2', className)} {...props}>\n <div className=\"text-muted-foreground min-w-max flex-1 text-sm\">\n {table.getFilteredSelectedRowModel().rows.length} of {table.getFilteredRowModel().rows.length} row(s) selected.\n </div>\n\n <div className=\"flex grow flex-wrap items-center justify-between gap-4 md:justify-end md:gap-x-6 lg:gap-x-8\">\n <div className=\"flex flex-wrap items-center gap-x-2 gap-y-4\">\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 flex-wrap items-center justify-center text-sm font-medium\">\n Page {table.getState().pagination.pageIndex + 1} of {table.getPageCount()}\n </div>\n <div className=\"flex flex-wrap items-center gap-x-2 gap-y-4\">\n <Button\n icon\n className=\"max-md:hidden\"\n disabled={!table.getCanPreviousPage()}\n size=\"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 icon\n disabled={!table.getCanPreviousPage()}\n size=\"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 icon\n disabled={!table.getCanNextPage()}\n size=\"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 icon\n className=\"max-md:hidden\"\n disabled={!table.getCanNextPage()}\n size=\"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 flex-wrap items-center gap-x-2 gap-y-4', className)}>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n className=\"data-[state=open]:bg-accent\"\n size=\"xs\"\n suffix={<SortIcon sorted={column.getIsSorted()} />}\n variant=\"ghost\"\n >\n {title}\n </Button>\n </DropdownMenuTrigger>\n\n <DropdownMenuContent align=\"start\">\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(false);\n }}\n >\n <ChevronUpIcon className=\"text-muted-foreground\" />\n Asc\n </DropdownMenuItem>\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(true);\n }}\n >\n <ArrowDownIcon className=\"text-muted-foreground\" />\n Desc\n </DropdownMenuItem>\n <DropdownMenuSeparator />\n <DropdownMenuItem\n onClick={() => {\n column.toggleVisibility(false);\n }}\n >\n <EyeNoneIcon className=\"text-muted-foreground\" />\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 />;\n }\n\n case 'asc': {\n return <ChevronUpIcon />;\n }\n\n default:\n return <CaretSortIcon />;\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":"6TAGA,OACE,iBAAAA,EACA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AOjC,EAACqC,EAAA,EAAc,CAC1B,CACF","names":["ArrowDownIcon","CaretSortIcon","ChevronLeftIcon","ChevronRightIcon","ChevronUpIcon","DoubleArrowLeftIcon","DoubleArrowRightIcon","EyeNoneIcon","MixerHorizontalIcon","jsx","jsxs","DataTableViewOptions","table","DropdownMenu","DropdownMenuTrigger","buttonVariants","MixerHorizontalIcon","DropdownMenuContent","DropdownMenuLabel","DropdownMenuSeparator","column","DropdownMenuCheckboxItem","value","DataTablePagination","className","props","cn","Select","SelectTrigger","SelectValue","SelectContent","pageSize","SelectItem","Button","DoubleArrowLeftIcon","ChevronLeftIcon","ChevronRightIcon","DoubleArrowRightIcon","DataTableColumnHeader","title","SortIcon","DropdownMenuItem","ChevronUpIcon","ArrowDownIcon","EyeNoneIcon","sorted","CaretSortIcon"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkAH3OBTDOcjs = require('../chunk-AH3OBTDO.cjs');require('../chunk-LSBI35ZE.cjs');require('../chunk-4XRBMJ5Q.cjs');exports.Dialog = _chunkAH3OBTDOcjs.a; exports.DialogBody = _chunkAH3OBTDOcjs.e; exports.DialogClose = _chunkAH3OBTDOcjs.i; exports.DialogContent = _chunkAH3OBTDOcjs.c; exports.DialogDescription = _chunkAH3OBTDOcjs.h; exports.DialogFooter = _chunkAH3OBTDOcjs.f; exports.DialogHeader = _chunkAH3OBTDOcjs.d; exports.DialogTitle = _chunkAH3OBTDOcjs.g; exports.DialogTrigger = _chunkAH3OBTDOcjs.b;
|
|
2
2
|
//# sourceMappingURL=dialog.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{a,b,c,d,e,f,g,h,i}from"../chunk-
|
|
1
|
+
"use client";import{a,b,c,d,e,f,g,h,i}from"../chunk-CIMAEJ26.js";import"../chunk-YGPIWXWP.js";import"../chunk-VRBUDJBH.js";export{a as Dialog,e as DialogBody,i as DialogClose,c as DialogContent,h as DialogDescription,f as DialogFooter,d as DialogHeader,g as DialogTitle,b as DialogTrigger};
|
|
2
2
|
//# sourceMappingURL=dialog.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkFPCACNPXcjs = require('../chunk-FPCACNPX.cjs');require('../chunk-4XRBMJ5Q.cjs');exports.DropdownMenu = _chunkFPCACNPXcjs.a; exports.DropdownMenuArrow = _chunkFPCACNPXcjs.o; exports.DropdownMenuCheckboxItem = _chunkFPCACNPXcjs.j; exports.DropdownMenuContent = _chunkFPCACNPXcjs.h; exports.DropdownMenuGroup = _chunkFPCACNPXcjs.c; exports.DropdownMenuItem = _chunkFPCACNPXcjs.i; exports.DropdownMenuLabel = _chunkFPCACNPXcjs.l; exports.DropdownMenuRadioGroup = _chunkFPCACNPXcjs.e; exports.DropdownMenuRadioItem = _chunkFPCACNPXcjs.k; exports.DropdownMenuSeparator = _chunkFPCACNPXcjs.m; exports.DropdownMenuShortcut = _chunkFPCACNPXcjs.n; exports.DropdownMenuSub = _chunkFPCACNPXcjs.d; exports.DropdownMenuSubContent = _chunkFPCACNPXcjs.g; exports.DropdownMenuSubTrigger = _chunkFPCACNPXcjs.f; exports.DropdownMenuTrigger = _chunkFPCACNPXcjs.b;
|
|
2
2
|
//# sourceMappingURL=dropdown-menu.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/components/dropdown-menu.cjs"],"names":[],"mappings":"AAAA,qFAAY,CAAC,
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/components/dropdown-menu.cjs"],"names":[],"mappings":"AAAA,qFAAY,CAAC,yDAAgE,iCAA8B,2vBAA8X","file":"/home/runner/work/codefast/codefast/packages/ui/dist/components/dropdown-menu.cjs"}
|
|
@@ -35,5 +35,7 @@ type DropdownMenuSeparatorProps = React.ComponentPropsWithoutRef<typeof Dropdown
|
|
|
35
35
|
declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
36
36
|
type DropdownMenuShortcutProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
37
37
|
declare function DropdownMenuShortcut({ className, ...props }: DropdownMenuShortcutProps): React.JSX.Element;
|
|
38
|
+
type DropdownMenuArrowProps = DropdownMenuPrimitive.DropdownMenuArrowProps;
|
|
39
|
+
declare const DropdownMenuArrow: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuArrowProps & React.RefAttributes<SVGSVGElement>>;
|
|
38
40
|
|
|
39
|
-
export { DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps };
|
|
41
|
+
export { DropdownMenu, DropdownMenuArrow, type DropdownMenuArrowProps, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps };
|
|
@@ -35,5 +35,7 @@ type DropdownMenuSeparatorProps = React.ComponentPropsWithoutRef<typeof Dropdown
|
|
|
35
35
|
declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
36
36
|
type DropdownMenuShortcutProps = React.HTMLAttributes<HTMLSpanElement>;
|
|
37
37
|
declare function DropdownMenuShortcut({ className, ...props }: DropdownMenuShortcutProps): React.JSX.Element;
|
|
38
|
+
type DropdownMenuArrowProps = DropdownMenuPrimitive.DropdownMenuArrowProps;
|
|
39
|
+
declare const DropdownMenuArrow: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuArrowProps & React.RefAttributes<SVGSVGElement>>;
|
|
38
40
|
|
|
39
|
-
export { DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps };
|
|
41
|
+
export { DropdownMenu, DropdownMenuArrow, type DropdownMenuArrowProps, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps };
|