{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "command-radix",
  "type": "registry:ui",
  "title": "Command based on Lina's Radix UI variant",
  "description": "A command component built using Lina's Radix UI",
  "dependencies": [
    "lucide-react",
    "cmdk"
  ],
  "registryDependencies": [
    "button",
    "dialog",
    "https://lina.sameer.sh/r/lina-radix.json"
  ],
  "files": [
    {
      "path": "registry/radix-ui/examples/command.tsx",
      "content": "\"use client\";\r\n\r\nimport * as React from \"react\";\r\nimport { ScrollArea } from \"@/registry/radix-ui/scroll-area\";\r\n\r\nimport { Command as CommandPrimitive } from \"cmdk\";\r\nimport { SearchIcon } from \"lucide-react\";\r\n\r\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from \"@/components/ui/dialog\";\r\n\r\nimport { cn } from \"@/lib/utils\";\r\n\r\nfunction Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>) {\r\n  return (\r\n    <CommandPrimitive\r\n      data-slot=\"command\"\r\n      className={cn(\"bg-popover text-popover-foreground flex size-full flex-col overflow-hidden rounded-md\", className)}\r\n      {...props}\r\n    />\r\n  );\r\n}\r\n\r\nfunction CommandDialog({\r\n  title = \"Command Palette\",\r\n  description = \"Search for a command to run...\",\r\n  children,\r\n  ...props\r\n}: React.ComponentProps<typeof Dialog> & {\r\n  title?: string;\r\n  description?: string;\r\n}) {\r\n  return (\r\n    <Dialog {...props}>\r\n      <DialogHeader className=\"sr-only\">\r\n        <DialogTitle>{title}</DialogTitle>\r\n        <DialogDescription>{description}</DialogDescription>\r\n      </DialogHeader>\r\n      <DialogContent className=\"overflow-hidden p-0 sm:max-w-lg [&>button:last-child]:hidden\">\r\n        <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground max-h-[100svh] **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-3 [&_[cmdk-item]]:py-2\">\r\n          {children}\r\n        </Command>\r\n      </DialogContent>\r\n    </Dialog>\r\n  );\r\n}\r\n\r\nfunction CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>) {\r\n  return (\r\n    <div className=\"border-input flex items-center border-b px-5\" cmdk-input-wrapper=\"\">\r\n      <SearchIcon size={20} className=\"text-muted-foreground/80 me-3\" />\r\n      <CommandPrimitive.Input\r\n        data-slot=\"command-input-wrapper\"\r\n        className={cn(\r\n          \"placeholder:text-muted-foreground/70 flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50\",\r\n          className\r\n        )}\r\n        {...props}\r\n      />\r\n    </div>\r\n  );\r\n}\r\n\r\nfunction CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>) {\r\n  return (\r\n    <ScrollArea\r\n      maskClassName=\"before:from-popover after:from-popover\"\r\n      className=\"flex max-h-full flex-col overflow-hidden\"\r\n    >\r\n      <CommandPrimitive.List data-slot=\"command-list\" className={cn(\"max-h-80 flex-1\", className)} {...props} />\r\n    </ScrollArea>\r\n  );\r\n}\r\n\r\nfunction CommandEmpty({ ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>) {\r\n  return <CommandPrimitive.Empty data-slot=\"command-empty\" className=\"py-6 text-center text-sm\" {...props} />;\r\n}\r\n\r\nfunction CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>) {\r\n  return (\r\n    <CommandPrimitive.Group\r\n      data-slot=\"command-group\"\r\n      className={cn(\r\n        \"text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-2 [&_[cmdk-group-heading]]:px-3 [&_[cmdk-group-heading]]:py-2 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium\",\r\n        className\r\n      )}\r\n      {...props}\r\n    />\r\n  );\r\n}\r\n\r\nfunction CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>) {\r\n  return (\r\n    <CommandPrimitive.Separator\r\n      data-slot=\"command-separator\"\r\n      className={cn(\"bg-border -mx-1 h-px\", className)}\r\n      {...props}\r\n    />\r\n  );\r\n}\r\n\r\nfunction CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>) {\r\n  return (\r\n    <CommandPrimitive.Item\r\n      data-slot=\"command-item\"\r\n      className={cn(\r\n        \"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground relative flex cursor-default items-center gap-3 rounded-md px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\r\n        className\r\n      )}\r\n      {...props}\r\n    />\r\n  );\r\n}\r\n\r\nfunction CommandShortcut({ className, ...props }: React.ComponentProps<\"span\">) {\r\n  return (\r\n    <kbd\r\n      data-slot=\"command-shortcut\"\r\n      className={cn(\r\n        \"bg-background text-muted-foreground/70 ms-auto -me-1 inline-flex h-5 max-h-full items-center rounded border px-1 font-[inherit] text-[0.625rem] font-medium\",\r\n        className\r\n      )}\r\n      {...props}\r\n    />\r\n  );\r\n}\r\n\r\nexport {\r\n  Command,\r\n  CommandDialog,\r\n  CommandEmpty,\r\n  CommandGroup,\r\n  CommandInput,\r\n  CommandItem,\r\n  CommandList,\r\n  CommandSeparator,\r\n  CommandShortcut,\r\n};\r\n",
      "type": "registry:ui"
    }
  ]
}