{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "accordion",
  "title": "Accordion",
  "description": "Accordion component built on Base UI, styled with sc1m tokens.",
  "dependencies": [
    "@base-ui/react"
  ],
  "registryDependencies": [
    "https://sc1m.vercel.app/r/tokens.json",
    "https://sc1m.vercel.app/r/cn.json"
  ],
  "files": [
    {
      "path": "src/components/ui/accordion/accordion.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\nimport { Accordion as BaseAccordion } from \"@base-ui/react/accordion\";\nimport { cn } from \"@/lib/cn\";\n\nexport function Accordion({\n  className,\n  ...props\n}: React.ComponentProps<typeof BaseAccordion.Root>) {\n  return (\n    // Detached expansion: the group owns no box of its own. Each item is its\n    // own card, and the closed ones overlap borders to read as a single stack.\n    // No `overflow-hidden` here — the open item's shadow has to escape.\n    <BaseAccordion.Root className={cn(\"isolate\", className)} {...props} />\n  );\n}\n\nexport function AccordionItem({\n  className,\n  ...props\n}: React.ComponentProps<typeof BaseAccordion.Item>) {\n  return (\n    <BaseAccordion.Item\n      className={cn(\n        \"relative block overflow-hidden border border-line bg-surface-raised\",\n        // Closed neighbours pull up 1px so their touching borders collapse\n        // into one line. Not applied to the first item, and not when the item\n        // above is open — that one has detached, so there is no border to meet.\n        \"[&:not([data-open]):not(:first-child):not([data-open]+*)]:-mt-px\",\n        // Open: leave the stack. 12px of air on both sides, all four corners\n        // rounded, lifted above the neighbours it is now floating over.\n        \"data-open:z-10 data-open:my-3 data-open:rounded-xl data-open:shadow-raised\",\n        // Closed: round only the edges that face the outside of the stack —\n        // the ends of the list, or a gap left by the item that detached.\n        \"first:rounded-t-xl last:rounded-b-xl\",\n        \"[[data-open]+&]:rounded-t-xl [&:has(+[data-open])]:rounded-b-xl\",\n        \"transition-[margin,border-radius,box-shadow] duration-(--acc-expand) ease-(--acc-ease)\",\n        \"motion-reduce:transition-none\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nexport function AccordionTrigger({\n  className,\n  children,\n  ...props\n}: React.ComponentProps<typeof BaseAccordion.Trigger>) {\n  return (\n    <BaseAccordion.Header>\n      <BaseAccordion.Trigger\n        className={cn(\n          \"group flex w-full items-center justify-between px-5 py-4 text-left text-sm font-semibold text-fg transition-colors duration-fast ease-out-quad hover:bg-surface focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring\",\n          // Disabled. Base UI renders this trigger with `aria-disabled` and\n          // keeps it in the tab order (`focusableWhenDisabled`), and blocks\n          // activation in its own handlers — so the usual\n          // `pointer-events-none opacity-50` pair is wrong here on two counts:\n          // an element that takes no pointer events can never show a cursor,\n          // and fading the button fades its focus ring, which this one still\n          // needs because it is still focusable. Mute the contents instead.\n          \"data-disabled:cursor-not-allowed data-disabled:text-fg-subtle\",\n          \"data-disabled:hover:bg-transparent\",\n          className,\n        )}\n        {...props}\n      >\n        {children}\n        {/* the caret rotates 180° rather than flipping: rotation carries the\n            shape through the whole transition, where scaleY(-1) passes through\n            a degenerate flat state at the midpoint. Not a path morph either —\n            CSS `d:` interpolation is Chromium-only.\n\n            translate(0,-8) is what makes the rotation land: Phosphor's caret\n            ink is not centred in its 256 box (round caps put the bbox centre\n            at y=136), so rotating about the element centre would swing it 1px\n            off. The path data itself stays byte-identical to Phosphor. */}\n        {/* phosphor: caret-down regular */}\n        <svg\n          aria-hidden\n          viewBox=\"0 0 256 256\"\n          fill=\"currentColor\"\n          className=\"size-4 shrink-0 text-fg-subtle transition-transform duration-(--acc-chevron) ease-(--acc-ease) group-data-disabled:opacity-50 group-data-panel-open:rotate-180 motion-reduce:transition-none\"\n        >\n          <g transform=\"translate(0,-8)\">\n            <path d=\"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z\" />\n          </g>\n        </svg>\n      </BaseAccordion.Trigger>\n    </BaseAccordion.Header>\n  );\n}\n\nexport function AccordionPanel({\n  className,\n  children,\n  ...props\n}: React.ComponentProps<typeof BaseAccordion.Panel>) {\n  return (\n    <BaseAccordion.Panel\n      className={cn(\n        // Base UI measures the content into --accordion-panel-height;\n        // entering/exiting states pin height to 0 so open/close tweens.\n        \"h-(--accordion-panel-height) overflow-hidden text-sm text-fg-muted\",\n        \"transition-[height,opacity,filter] duration-(--acc-collapse) ease-(--acc-ease) data-open:duration-(--acc-expand)\",\n        \"data-starting-style:h-0 data-starting-style:opacity-0 data-starting-style:blur-[2px]\",\n        \"data-ending-style:h-0 data-ending-style:opacity-0 data-ending-style:blur-[2px]\",\n        \"motion-reduce:transition-none\",\n        className,\n      )}\n      {...props}\n    >\n      {/* padding lives on the inner element, never the measured panel —\n          padding on the collapsing box leaves a residual height strip */}\n      <div className=\"px-5 pb-4\">{children}</div>\n    </BaseAccordion.Panel>\n  );\n}\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}