{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "accordion",
  "title": "Accordion",
  "description": "Panels open to their real height on a spring while their contents rise in one after another.",
  "dependencies": [
    "@ui-sdk/core@0.1.0-beta.2",
    "@ui-sdk/react@0.1.0-beta.2"
  ],
  "registryDependencies": [
    "@keyframery/motion"
  ],
  "files": [
    {
      "path": "registry/components/keyframery/primitives/accordion.tsx",
      "content": "\"use client\"\n\n/* Animated drop-in for `@ui-sdk/react/accordion`: same parts, same props. Swap the import and keep your code.\n   This file adds motion only. Colours, radii, shadows and spacing stay yours. */\n\nimport { AccordionPanel as AccordionPanelPart } from \"@ui-sdk/react/accordion\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nexport * from \"@ui-sdk/react/accordion\"\n\n/* Height: the panel grows to its measured height over 380ms. Cascade: each direct child\n   rises 8px out of a 4px blur, 32ms after the one before, so the content arrives as the space\n   opens (the children jump to their start while the panel has data-starting-style, otherwise\n   their own delay would hold them visible through that first frame). On close everything\n   leaves together, quickly. Only opacity, translate and filter\n   transition on the children, so the stagger never slows their own hover states. */\nfunction AccordionPanel({ className, ...props }: React.ComponentProps<typeof AccordionPanelPart>) {\n  return (\n    <AccordionPanelPart\n      className={cn(\n        \"h-(--accordion-panel-height) overflow-hidden\",\n        \"transition-[height] duration-[calc(380ms*var(--kf-speed,1))] ease-house\",\n        \"data-starting-style:h-0 data-ending-style:h-0 data-ending-style:duration-[calc(260ms*var(--kf-speed,1))]\",\n        \"*:transition-[opacity,translate,filter] *:duration-[calc(420ms*var(--kf-speed,1))] *:ease-spring\",\n        \"*:[transition-delay:calc((min(sibling-index(),10)-1)*calc(32ms*var(--kf-speed,1))+calc(40ms*var(--kf-speed,1)))]\",\n        \"data-starting-style:*:translate-y-2 data-starting-style:*:opacity-0 data-starting-style:*:blur-[4px] data-starting-style:*:transition-none\",\n        \"data-ending-style:*:opacity-0 data-ending-style:*:blur-[4px] data-ending-style:*:duration-[calc(150ms*var(--kf-speed,1))] data-ending-style:*:ease-house data-ending-style:*:[transition-delay:0ms]\",\n        \"motion-reduce:transition-none! motion-reduce:*:transition-none\",\n        className,\n      )}\n      {...props}\n    />\n  )\n}\n\nexport { AccordionPanel }\n",
      "type": "registry:component",
      "target": "components/keyframery/primitives/accordion.tsx"
    },
    {
      "path": "registry/components/keyframery/accordion.tsx",
      "content": "\"use client\"\n\n/* Styled accordion: the animated primitive plus the Keyframery look. */\n\nimport * as React from \"react\"\n\nimport {\n  Accordion as AccordionRoot,\n  AccordionHeader as AccordionHeaderPart,\n  AccordionItem as AccordionItemPart,\n  AccordionPanel as AccordionPanelPart,\n  AccordionTrigger as AccordionTriggerPart,\n} from \"@/components/keyframery/primitives/accordion\"\nimport { cn } from \"@/lib/utils\"\n\nfunction Accordion({ className, ...props }: React.ComponentProps<typeof AccordionRoot>) {\n  return <AccordionRoot className={cn(\"flex w-full flex-col\", className)} {...props} />\n}\n\n/* Rows are separated by one hairline; the last row has none. */\nfunction AccordionItem({\n  className,\n  ...props\n}: React.ComponentProps<typeof AccordionItemPart>) {\n  return (\n    <AccordionItemPart\n      className={cn(\"border-b border-border last:border-b-0\", className)}\n      {...props}\n    />\n  )\n}\n\nfunction AccordionHeader({\n  className,\n  ...props\n}: React.ComponentProps<typeof AccordionHeaderPart>) {\n  return <AccordionHeaderPart className={cn(\"m-0 flex\", className)} {...props} />\n}\n\nfunction AccordionTrigger({\n  className,\n  children,\n  ...props\n}: React.ComponentProps<typeof AccordionTriggerPart>) {\n  return (\n    <AccordionTriggerPart\n      className={cn(\n        \"group/accordion-trigger flex w-full cursor-pointer items-center gap-4 rounded-[8px] py-3.5 text-left text-[14px] leading-5 font-medium text-foreground outline-none select-none\",\n        \"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\",\n        \"aria-disabled:cursor-default data-disabled:cursor-not-allowed data-disabled:opacity-40\",\n        className,\n      )}\n      {...props}\n    >\n      {(state) => (\n        <>\n          <span className=\"min-w-0 flex-1\">\n            {typeof children === \"function\" ? children(state) : children}\n          </span>\n          {/* The chevron sits on a small disc that answers hover and press, and turns half a circle when the row opens. */}\n          <span\n            aria-hidden\n            className={cn(\n              \"grid size-6 shrink-0 place-items-center rounded-full text-muted-foreground\",\n              \"[transition:background-color_calc(150ms*var(--kf-speed,1)),color_calc(150ms*var(--kf-speed,1)),scale_calc(220ms*var(--kf-speed,1))_var(--ease-pop)]\",\n              \"group-hover/accordion-trigger:bg-foreground/[0.06] group-hover/accordion-trigger:text-foreground\",\n              \"group-active/accordion-trigger:scale-90 group-active/accordion-trigger:bg-foreground/[0.1]\",\n              \"group-data-open/accordion-trigger:text-foreground\",\n              \"group-data-disabled/accordion-trigger:bg-transparent group-data-disabled/accordion-trigger:scale-100 group-data-disabled/accordion-trigger:text-muted-foreground\",\n              \"motion-reduce:transition-none!\",\n            )}\n          >\n            <svg\n              viewBox=\"0 0 16 16\"\n              fill=\"none\"\n              stroke=\"currentColor\"\n              strokeWidth=\"1.5\"\n              strokeLinecap=\"round\"\n              strokeLinejoin=\"round\"\n              className=\"size-4 transition-[rotate] duration-[calc(480ms*var(--kf-speed,1))] ease-spring group-data-open/accordion-trigger:rotate-180 motion-reduce:transition-none!\"\n            >\n              <path d=\"m4 6 4 4 4-4\" />\n            </svg>\n          </span>\n        </>\n      )}\n    </AccordionTriggerPart>\n  )\n}\n\n/* The motion (height and the cascade of the content) comes from the primitive. Plain text is\n   wrapped in a paragraph so it has an element to cascade; the padding sits on the children so\n   the panel can close to zero. */\nfunction AccordionPanel({\n  className,\n  children,\n  ...props\n}: Omit<React.ComponentProps<typeof AccordionPanelPart>, \"children\"> & {\n  children?: React.ReactNode\n}) {\n  return (\n    <AccordionPanelPart\n      className={cn(\n        \"text-[13px] leading-[1.55] text-muted-foreground *:pr-10 [&>:last-child]:pb-4\",\n        className,\n      )}\n      {...props}\n    >\n      {React.Children.map(children, (child) =>\n        typeof child === \"string\" || typeof child === \"number\" ? <p>{child}</p> : child,\n      )}\n    </AccordionPanelPart>\n  )\n}\n\nexport { Accordion, AccordionHeader, AccordionItem, AccordionPanel, AccordionTrigger }\n",
      "type": "registry:component",
      "target": "components/keyframery/accordion.tsx"
    }
  ],
  "type": "registry:component"
}