{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "auto-height",
  "title": "Auto Height",
  "description": "Auto height component for dynamic height animations.",
  "dependencies": [
    "motion",
    "clsx",
    "tailwind-merge"
  ],
  "registryDependencies": [
    "https://optics.agusmayol.com.ar/r/use-auto-height.json",
    "https://optics.agusmayol.com.ar/r/slot.json"
  ],
  "files": [
    {
      "path": "registry/optics/helpers/primitives/effects/auto-height.jsx",
      "content": "\"use client\";\nimport * as React from \"react\";\nimport { motion } from \"motion/react\";\n\nimport { useAutoHeight } from \"@/registry/optics/hooks/use-auto-height\";\nimport { Slot } from \"@/registry/optics/helpers/primitives/animate/slot\";\n\nfunction AutoHeight({\n\tchildren,\n\tdeps = [],\n\n\ttransition = {\n\t\ttype: \"spring\",\n\t\tstiffness: 300,\n\t\tdamping: 30,\n\t\tbounce: 0,\n\t\trestDelta: 0.01,\n\t},\n\n\tstyle,\n\tanimate,\n\trender,\n\t...props\n}) {\n\tconst { ref, height } = useAutoHeight(deps);\n\n\tconst motionProps = {\n\t\tstyle: { overflow: \"hidden\", ...style },\n\t\tanimate: { height, ...animate },\n\t\ttransition,\n\t};\n\n\tif (render) {\n\t\treturn (\n\t\t\t<Slot {...motionProps} {...props}>\n\t\t\t\t{React.cloneElement(render, {\n\t\t\t\t\tchildren: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{render.props.children}\n\t\t\t\t\t\t\t<div ref={ref}>{children}</div>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t})}\n\t\t\t</Slot>\n\t\t);\n\t}\n\n\treturn (\n\t\t<motion.div {...motionProps} {...props}>\n\t\t\t<div ref={ref}>{children}</div>\n\t\t</motion.div>\n\t);\n}\n\nexport { AutoHeight };\n",
      "type": "registry:component",
      "target": "components/optics/helpers/primitives/effects/auto-height.jsx"
    }
  ],
  "type": "registry:component"
}