{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "collapsible",
  "type": "registry:ui",
  "title": "Collapsible",
  "description": "A block shown and hidden under the row that names it, with a turning chevron.",
  "dependencies": [
    "radix-ui",
    "lucide-react"
  ],
  "registryDependencies": [
    "@wibo/utils"
  ],
  "files": [
    {
      "path": "src/components/collapsible.tsx",
      "type": "registry:ui",
      "content": "import type { ComponentProps } from \"react\";\nimport { Collapsible as CollapsiblePrimitive } from \"radix-ui\";\nimport { ChevronRight } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\n\n/*\n * A block shown and hidden under the row that names it: a run's steps, a\n * trace's spans, a long JSON payload. Radix Collapsible (the trigger carries\n * `aria-expanded` and `aria-controls`); the row is a full-width list row with\n * a chevron that turns when open. Holds state: render it from client\n * components.\n */\n\nfunction Collapsible(props: ComponentProps<typeof CollapsiblePrimitive.Root>) {\n  return <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />;\n}\n\n/** The row that opens and closes the block: the chevron, then whatever summary it is given. */\nfunction CollapsibleTrigger({\n  className,\n  children,\n  ...props\n}: ComponentProps<typeof CollapsiblePrimitive.Trigger>) {\n  return (\n    <CollapsiblePrimitive.Trigger\n      data-slot=\"collapsible-trigger\"\n      className={cn(\n        \"press-item group/collapsible flex w-full min-w-0 cursor-pointer items-center gap-2 rounded-lg px-2 py-2 text-left text-label text-foreground outline-none transition-colors duration-150 hover:bg-foreground/4 focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-default disabled:hover:bg-transparent\",\n        className,\n      )}\n      {...props}\n    >\n      <ChevronRight\n        aria-hidden=\"true\"\n        className=\"size-4 shrink-0 text-muted-foreground transition-transform duration-150 group-disabled/collapsible:invisible group-data-[state=open]/collapsible:rotate-90 motion-reduce:transition-none\"\n      />\n      {children}\n    </CollapsiblePrimitive.Trigger>\n  );\n}\n\n/** The block the trigger shows. */\nfunction CollapsibleContent({\n  className,\n  ...props\n}: ComponentProps<typeof CollapsiblePrimitive.Content>) {\n  return (\n    <CollapsiblePrimitive.Content\n      data-slot=\"collapsible-content\"\n      className={cn(\"min-w-0\", className)}\n      {...props}\n    />\n  );\n}\n\nexport { Collapsible, CollapsibleContent, CollapsibleTrigger };\n"
    }
  ]
}
