{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "accordion",
  "title": "Accordion",
  "description": "Vertically stacked sections that expand and collapse, built on Radix.",
  "dependencies": [
    "lucide-react@^1.27.0",
    "radix-ui@^1.6.7"
  ],
  "registryDependencies": [
    "@pestoui/style",
    "@pestoui/utils"
  ],
  "files": [
    {
      "path": "pestoui/ui/accordion.tsx",
      "content": "import * as React from \"react\"\nimport { Accordion as AccordionPrimitive } from \"radix-ui\"\n\nimport { cn } from \"@/lib/utils\"\nimport { ChevronDownIcon } from \"lucide-react\"\n\nfunction Accordion({\n  className,\n  ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Root>) {\n  return (\n    <AccordionPrimitive.Root\n      data-slot=\"accordion\"\n      className={cn(\"flex w-full flex-col\", className)}\n      {...props}\n    />\n  )\n}\n\nfunction AccordionItem({\n  className,\n  ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Item>) {\n  return (\n    <AccordionPrimitive.Item\n      data-slot=\"accordion-item\"\n      className={cn(\"not-last:border-b\", className)}\n      {...props}\n    />\n  )\n}\n\nfunction AccordionTrigger({\n  className,\n  children,\n  ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Trigger>) {\n  return (\n    <AccordionPrimitive.Header className=\"flex\">\n      <AccordionPrimitive.Trigger\n        data-slot=\"accordion-trigger\"\n        className={cn(\n          \"group/accordion-trigger relative flex flex-1 items-center justify-between rounded-lg border border-transparent py-4 text-left text-body font-medium transition-all outline-none hover:text-foreground/70 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring disabled:pointer-events-none disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4.5 **:data-[slot=accordion-trigger-icon]:text-muted-foreground\",\n          className\n        )}\n        {...props}\n      >\n        {children}\n        {/* One chevron that turns rather than two that swap: a half turn of the\n            down chevron lands exactly on the up chevron, so the resting shape is\n            unchanged in both states and the change between them can be seen.\n\n            The turn is the Switch's travel (`turn-travel`: past the half turn\n            and back) and the press is its squeeze-and-lean, on the chevron\n            rather than the row — 4% of a full-width row is a visible lurch.\n            Held, it leans toward where it is about to turn: forwards when\n            closed, back when open. The open item of a non-collapsible single\n            accordion is `aria-disabled` and cannot close, so a lean there would\n            promise a turn that never comes; it squeezes only. The two\n            `--turn-dir` rules are made exclusive with `not-` instead of being\n            left to variant order, which sorts aria-expanded after aria-disabled\n            and would let the lean win. */}\n        <ChevronDownIcon\n          data-slot=\"accordion-trigger-icon\"\n          className=\"pointer-events-none shrink-0 turn-travel group-active/accordion-trigger:press-turn group-aria-expanded/accordion-trigger:rotate-180 group-aria-expanded/accordion-trigger:group-not-aria-disabled/accordion-trigger:[--turn-dir:-1] group-aria-disabled/accordion-trigger:[--turn-dir:0]\"\n        />\n      </AccordionPrimitive.Trigger>\n    </AccordionPrimitive.Header>\n  )\n}\n\n/* Open and close are deliberately not mirror images. Opening springs — a\n   disclosure is the one place in the system where real overshoot earns its keep,\n   since it happens rarely and the panel arriving with weight is the whole point.\n   Closing is a short tween instead: a bouncy close reads as the panel failing to\n   shut. The height itself is the shipped keyframe pair; `ease-*` reaches it\n   through `--tw-ease` and `duration-*` through `--tw-duration`, so no number is\n   typed here. */\nfunction AccordionContent({\n  className,\n  children,\n  ...props\n}: React.ComponentProps<typeof AccordionPrimitive.Content>) {\n  return (\n    <AccordionPrimitive.Content\n      data-slot=\"accordion-content\"\n      className=\"group/accordion-content overflow-hidden text-body text-muted-foreground data-open:animate-accordion-down data-open:duration-spring-bouncy data-open:ease-spring-bouncy data-closed:animate-accordion-up data-closed:duration-slow data-closed:ease-out-expo\"\n      {...props}\n    >\n      <div\n        className={cn(\n          /* The copy fades under the height change rather than with it, so it\n             is never caught mid-squash against the closing edge. Radix remounts\n             this wrapper on every open, so the way in is `starting:` — a plain\n             transition has nothing to travel from on a fresh mount. */\n          \"h-(--radix-accordion-content-height) pt-0 pb-4 leading-relaxed transition-opacity duration-base ease-out-expo starting:opacity-0 group-data-closed/accordion-content:opacity-0 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4\",\n          className\n        )}\n      >\n        {children}\n      </div>\n    </AccordionPrimitive.Content>\n  )\n}\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}