{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "comp-233",
  "type": "registry:component",
  "title": "Comp 233",
  "description": "Comp 233",
  "files": [
    {
      "path": "registry/ui-basic/comp-233.tsx",
      "content": "\"use client\";\n\nimport { useId, useState } from \"react\";\n\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tCommand,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandInput,\n\tCommandItem,\n\tCommandList,\n} from \"@/components/ui/command\";\nimport { Label } from \"@/components/ui/label\";\nimport {\n\tPopover,\n\tPopoverContent,\n\tPopoverTrigger,\n} from \"@/components/ui/popover\";\nimport {\n\tBlocksIcon,\n\tBrainIcon,\n\tChevronDownIcon,\n\tCpuIcon,\n\tDatabaseIcon,\n\tGlobeIcon,\n\tLayoutIcon,\n\tLineChartIcon,\n\tNetworkIcon,\n\tSearchIcon,\n\tServerIcon,\n} from \"lucide-react\";\n\nconst items = [\n\t{\n\t\tvalue: \"analytics platform\",\n\t\tlabel: \"Analytics Platform\",\n\t\ticon: LineChartIcon,\n\t\tnumber: 2451,\n\t},\n\t{\n\t\tvalue: \"ai services\",\n\t\tlabel: \"AI Services\",\n\t\ticon: BrainIcon,\n\t\tnumber: 1832,\n\t},\n\t{\n\t\tvalue: \"database systems\",\n\t\tlabel: \"Database Systems\",\n\t\ticon: DatabaseIcon,\n\t\tnumber: 1654,\n\t},\n\t{\n\t\tvalue: \"compute resources\",\n\t\tlabel: \"Compute Resources\",\n\t\ticon: CpuIcon,\n\t\tnumber: 943,\n\t},\n\t{\n\t\tvalue: \"network services\",\n\t\tlabel: \"Network Services\",\n\t\ticon: NetworkIcon,\n\t\tnumber: 832,\n\t},\n\t{\n\t\tvalue: \"web services\",\n\t\tlabel: \"Web Services\",\n\t\ticon: GlobeIcon,\n\t\tnumber: 654,\n\t},\n\t{\n\t\tvalue: \"monitoring tools\",\n\t\tlabel: \"Monitoring Tools\",\n\t\ticon: SearchIcon,\n\t\tnumber: 432,\n\t},\n\t{\n\t\tvalue: \"server management\",\n\t\tlabel: \"Server Management\",\n\t\ticon: ServerIcon,\n\t\tnumber: 321,\n\t},\n\t{\n\t\tvalue: \"infrastructure\",\n\t\tlabel: \"Infrastructure\",\n\t\ticon: BlocksIcon,\n\t\tnumber: 234,\n\t},\n\t{\n\t\tvalue: \"frontend services\",\n\t\tlabel: \"Frontend Services\",\n\t\ticon: LayoutIcon,\n\t\tnumber: 123,\n\t},\n];\n\nexport default function Component() {\n\tconst id = useId();\n\tconst [open, setOpen] = useState<boolean>(false);\n\tconst [value, setValue] = useState<string>(\"\");\n\n\treturn (\n\t\t<div className=\"not-first:*:mt-2\">\n\t\t\t<Label htmlFor={id}>Options with icon and number</Label>\n\t\t\t<Popover open={open} onOpenChange={setOpen}>\n\t\t\t\t<PopoverTrigger asChild>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tid={id}\n\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\t\taria-expanded={open}\n\t\t\t\t\t\tclassName=\"bg-background hover:bg-background border-input w-full justify-between px-3 font-normal outline-offset-0 outline-hidden focus-visible:outline-[3px]\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{value ? (\n\t\t\t\t\t\t\t<span className=\"flex min-w-0 items-center gap-2\">\n\t\t\t\t\t\t\t\t{(() => {\n\t\t\t\t\t\t\t\t\tconst selectedItem = items.find(\n\t\t\t\t\t\t\t\t\t\t(item) => item.value === value\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tif (selectedItem) {\n\t\t\t\t\t\t\t\t\t\tconst Icon = selectedItem.icon;\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<Icon className=\"text-muted-foreground size-4\" />\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t\t\t})()}\n\t\t\t\t\t\t\t\t<span className=\"truncate\">\n\t\t\t\t\t\t\t\t\t{items.find((item) => item.value === value)?.label}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<span className=\"text-muted-foreground\">\n\t\t\t\t\t\t\t\tSelect service category\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<ChevronDownIcon\n\t\t\t\t\t\t\tsize={16}\n\t\t\t\t\t\t\tclassName=\"text-muted-foreground/80 shrink-0\"\n\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Button>\n\t\t\t\t</PopoverTrigger>\n\t\t\t\t<PopoverContent\n\t\t\t\t\tclassName=\"border-input w-full min-w-(--radix-popper-anchor-width) p-0\"\n\t\t\t\t\talign=\"start\"\n\t\t\t\t>\n\t\t\t\t\t<Command>\n\t\t\t\t\t\t<CommandInput placeholder=\"Search services...\" />\n\t\t\t\t\t\t<CommandList>\n\t\t\t\t\t\t\t<CommandEmpty>No service found.</CommandEmpty>\n\t\t\t\t\t\t\t<CommandGroup>\n\t\t\t\t\t\t\t\t{items.map((item) => (\n\t\t\t\t\t\t\t\t\t<CommandItem\n\t\t\t\t\t\t\t\t\t\tkey={item.value}\n\t\t\t\t\t\t\t\t\t\tvalue={item.value}\n\t\t\t\t\t\t\t\t\t\tonSelect={(currentValue) => {\n\t\t\t\t\t\t\t\t\t\t\tsetValue(\n\t\t\t\t\t\t\t\t\t\t\t\tcurrentValue === value ? \"\" : currentValue\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\tsetOpen(false);\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center justify-between\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t\t\t<item.icon className=\"text-muted-foreground size-4\" />\n\t\t\t\t\t\t\t\t\t\t\t{item.label}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-xs\">\n\t\t\t\t\t\t\t\t\t\t\t{item.number.toLocaleString()}\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t</CommandItem>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</CommandGroup>\n\t\t\t\t\t\t</CommandList>\n\t\t\t\t\t</Command>\n\t\t\t\t</PopoverContent>\n\t\t\t</Popover>\n\t\t</div>\n\t);\n}\n",
      "type": "registry:ui"
    },
    {
      "path": "components/ui/button.tsx",
      "content": "import * as React from \"react\";\r\n\r\nimport { cn } from \"@/registry/utilities/cn\";\r\nimport { Slot } from \"@radix-ui/react-slot\";\r\nimport { cva, type VariantProps } from \"class-variance-authority\";\r\n\r\nconst buttonVariants = cva(\r\n\t\"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm text-white hover:text-gray-400 font-medium ring-offset-background transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\r\n\t{\r\n\t\tvariants: {\r\n\t\t\tvariant: {\r\n\t\t\t\tsimple:\r\n\t\t\t\t\t\"bg-secondary relative z-10 bg-transparent hover:border-secondary hover:bg-secondary/50  border border-transparent dark:text-white text-sm md:text-sm transition font-medium duration-200  rounded-md px-4 py-2  flex items-center justify-center\",\r\n\t\t\t\tdefault: \"bg-primary text-primary-foreground hover:bg-primary/90\",\r\n\t\t\t\tdestructive:\r\n\t\t\t\t\t\"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\r\n\t\t\t\toutline:\r\n\t\t\t\t\t\"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\r\n\t\t\t\tsecondary:\r\n\t\t\t\t\t\"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\r\n\t\t\t\tghost: \"hover:bg-accent hover:text-black hover:stroke-black dark:text-white text-black\",\r\n\t\t\t\tlink: \"text-primary underline-offset-4 hover:underline\",\r\n\t\t\t},\r\n\t\t\tsize: {\r\n\t\t\t\tdefault: \"h-10 px-4 py-2\",\r\n\t\t\t\tsm: \"h-9 rounded-md px-3\",\r\n\t\t\t\tlg: \"h-11 rounded-md px-8\",\r\n\t\t\t\ticon: \"h-10 w-10\",\r\n\t\t\t},\r\n\t\t},\r\n\t\tdefaultVariants: {\r\n\t\t\tvariant: \"default\",\r\n\t\t\tsize: \"default\",\r\n\t\t},\r\n\t}\r\n);\r\n\r\nexport interface ButtonProps\r\n\textends React.ButtonHTMLAttributes<HTMLButtonElement>,\r\n\t\tVariantProps<typeof buttonVariants> {\r\n\tasChild?: boolean;\r\n}\r\n\r\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\r\n\t({ className, variant, size, asChild = false, ...props }, ref) => {\r\n\t\tconst Comp = asChild ? Slot : \"button\";\r\n\t\treturn (\r\n\t\t\t<Comp\r\n\t\t\t\tclassName={cn(buttonVariants({ variant, size, className }))}\r\n\t\t\t\tref={ref}\r\n\t\t\t\t{...props}\r\n\t\t\t/>\r\n\t\t);\r\n\t}\r\n);\r\nButton.displayName = \"Button\";\r\n\r\nexport { Button, buttonVariants };\r\n",
      "type": "registry:ui"
    },
    {
      "path": "registry/utilities/cn.ts",
      "content": "import { ClassValue, clsx } from \"clsx\";\r\nimport { twMerge } from \"tailwind-merge\";\r\n\r\nexport function cn(...inputs: ClassValue[]) {\r\n\treturn twMerge(clsx(inputs));\r\n}\r\n",
      "type": "registry:ui"
    },
    {
      "path": "components/ui/label.tsx",
      "content": "\"use client\";\n\nimport React from \"react\";\n\nimport { cn } from \"@/registry/utilities/cn\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nconst labelVariants = cva(\n\t\"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\n);\n\nconst Label = React.forwardRef<\n\tReact.ElementRef<typeof LabelPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &\n\t\tVariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n\t<LabelPrimitive.Root\n\t\tref={ref}\n\t\tclassName={cn(labelVariants(), className)}\n\t\t{...props}\n\t/>\n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label };\n",
      "type": "registry:ui"
    }
  ]
}