{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "command",
  "title": "Command",
  "description": "Tetsu command on @ui-sdk/react, styled with the @tetsustudio/tokens variables.",
  "dependencies": [
    "@ui-sdk/react@0.1.0-beta.5",
    "cn@^0.4.0",
    "lucide-react@^1.16.0"
  ],
  "registryDependencies": [
    "https://library.tetsustudio.com/r/dialog.json"
  ],
  "files": [
    {
      "path": "registry/ui/command.tsx",
      "content": "'use client'\n\nimport * as React from 'react'\nimport { cn } from 'cn'\nimport {\n  Command as CommandPrimitive,\n  CommandEmpty as CommandEmptyPrimitive,\n  CommandGroup as CommandGroupPrimitive,\n  CommandGroupLabel as CommandGroupLabelPrimitive,\n  CommandInput as CommandInputPrimitive,\n  CommandItem as CommandItemPrimitive,\n  CommandList as CommandListPrimitive,\n  CommandSeparator as CommandSeparatorPrimitive,\n} from '@ui-sdk/react/command'\nimport { SearchIcon } from 'lucide-react'\n\nimport {\n  Dialog,\n  DialogContent,\n  DialogDescription,\n  DialogHeader,\n  DialogTitle,\n} from '@/components/ui/dialog'\n\ntype WithClassName<T extends React.ElementType> = Omit<React.ComponentProps<T>, 'className'> & {\n  className?: string\n}\n\nfunction Command({ className, ...props }: WithClassName<typeof CommandPrimitive>) {\n  return (\n    <CommandPrimitive\n      className={cn(\n        'flex size-full flex-col overflow-hidden rounded-xl bg-popover p-1 text-popover-foreground',\n        className,\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction CommandDialog({\n  title = 'Command Palette',\n  description = 'Search for a command to run...',\n  children,\n  className,\n  showCloseButton = false,\n  ...props\n}: React.ComponentProps<typeof Dialog> & {\n  title?: string\n  description?: string\n  className?: string\n  showCloseButton?: boolean\n}) {\n  return (\n    <Dialog {...props}>\n      <DialogContent\n        className={cn('top-1/3 translate-y-0 overflow-hidden p-0', className)}\n        showCloseButton={showCloseButton}\n      >\n        <DialogHeader className=\"sr-only\">\n          <DialogTitle>{title}</DialogTitle>\n          <DialogDescription>{description}</DialogDescription>\n        </DialogHeader>\n        {children}\n      </DialogContent>\n    </Dialog>\n  )\n}\n\nfunction CommandInput({ className, ...props }: WithClassName<typeof CommandInputPrimitive>) {\n  return (\n    <div className=\"p-1 pb-0\">\n      <div className=\"flex h-8 items-center gap-2 rounded-lg bg-input/30 px-2\">\n        <SearchIcon className=\"size-4 shrink-0 opacity-50\" aria-hidden=\"true\" />\n        <CommandInputPrimitive\n          className={cn(\n            'w-full bg-transparent text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50',\n            className,\n          )}\n          {...props}\n        />\n      </div>\n    </div>\n  )\n}\n\nfunction CommandList({ className, ...props }: WithClassName<typeof CommandListPrimitive>) {\n  return (\n    <CommandListPrimitive\n      className={cn(\n        'no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none',\n        className,\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction CommandEmpty({ className, ...props }: WithClassName<typeof CommandEmptyPrimitive>) {\n  return (\n    <CommandEmptyPrimitive\n      className={cn('py-6 text-center text-sm not-data-empty:hidden', className)}\n      {...props}\n    />\n  )\n}\n\nfunction CommandGroup({\n  className,\n  heading,\n  children,\n  ...props\n}: Omit<WithClassName<typeof CommandGroupPrimitive>, 'children'> & {\n  heading?: React.ReactNode\n  children?: React.ReactNode\n}) {\n  return (\n    <CommandGroupPrimitive\n      className={cn('overflow-hidden p-1 text-foreground', className)}\n      {...props}\n    >\n      {heading && (\n        <CommandGroupLabelPrimitive className=\"px-2 py-1.5 text-xs font-medium text-muted-foreground\">\n          {heading}\n        </CommandGroupLabelPrimitive>\n      )}\n      {children}\n    </CommandGroupPrimitive>\n  )\n}\n\nfunction CommandSeparator({\n  className,\n  ...props\n}: WithClassName<typeof CommandSeparatorPrimitive>) {\n  return <CommandSeparatorPrimitive className={cn('-mx-1 h-px bg-border', className)} {...props} />\n}\n\nfunction CommandItem({ className, ...props }: WithClassName<typeof CommandItemPrimitive>) {\n  return (\n    <CommandItemPrimitive\n      className={cn(\n        \"group/command-item relative flex cursor-default items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-highlighted:bg-muted data-highlighted:text-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n        className,\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction CommandShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n  return (\n    <span\n      data-slot=\"command-shortcut\"\n      className={cn(\n        'ml-auto text-xs tracking-widest text-muted-foreground group-data-highlighted/command-item:text-foreground',\n        className,\n      )}\n      {...props}\n    />\n  )\n}\n\nexport {\n  Command,\n  CommandDialog,\n  CommandInput,\n  CommandList,\n  CommandEmpty,\n  CommandGroup,\n  CommandItem,\n  CommandShortcut,\n  CommandSeparator,\n}\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}