{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "stepper-morph",
  "title": "Stepper Morph",
  "type": "registry:component",
  "description": "Step line morphs into a check",
  "dependencies": [
    "motion@^12.43.0"
  ],
  "files": [
    {
      "path": "src/kavyn/stepper-morph.jsx",
      "type": "registry:file",
      "target": "@components/kavyn/stepper-morph.jsx",
      "content": "'use client'\n\nimport { useState } from 'react'\nimport { motion, AnimatePresence } from 'motion/react'\n\nconst STEPS = ['Account', 'Workspace', 'Invite', 'Done']\n\nexport default function StepperMorph({ steps = STEPS }) {\n  const [s, setS] = useState(1)\n  return (\n    <div className=\"w-full max-w-md\">\n      <div className=\"flex items-center\">\n        {steps.map((st, i) => (\n          <div key={st} className=\"flex flex-1 items-center last:flex-none\">\n            <motion.div animate={{ backgroundColor: i < s ? 'var(--acc)' : 'var(--panel)', borderColor: i <= s ? 'var(--acc)' : 'var(--line2)', scale: i === s ? 1.12 : 1 }} transition={{ type: 'spring', stiffness: 400, damping: 24 }} className=\"grid size-8 shrink-0 place-items-center rounded-full border text-xs\">\n              <AnimatePresence mode=\"wait\" initial={false}>\n                {i < s ? (\n                  <motion.svg key=\"c\" viewBox=\"0 0 24 24\" className=\"size-4\" initial={{ scale: 0, rotate: -40 }} animate={{ scale: 1, rotate: 0 }} exit={{ scale: 0 }}><motion.path d=\"M5 12l5 5 9-10\" fill=\"none\" stroke=\"var(--acc-fg)\" strokeWidth=\"3\" strokeLinecap=\"round\" initial={{ pathLength: 0 }} animate={{ pathLength: 1 }} /></motion.svg>\n                ) : (\n                  <motion.span key=\"n\" initial={{ scale: 0 }} animate={{ scale: 1 }} exit={{ scale: 0 }} className={i === s ? 'text-acc' : 'text-faint'}>{i + 1}</motion.span>\n                )}\n              </AnimatePresence>\n            </motion.div>\n            {i < steps.length - 1 && <div className=\"mx-1.5 h-0.5 flex-1 overflow-hidden rounded bg-line2\"><motion.div className=\"h-full bg-acc\" animate={{ width: i < s ? '100%' : '0%' }} transition={{ type: 'spring', stiffness: 160, damping: 24 }} /></div>}\n          </div>\n        ))}\n      </div>\n      <div className=\"mt-3 flex justify-between text-[11px] text-faint\">{steps.map((st, i) => <span key={st} className={i === s ? 'text-tx' : ''}>{st}</span>)}</div>\n      <div className=\"mt-5 flex gap-2\">\n        <button onClick={() => setS(Math.max(0, s - 1))} className=\"rounded-lg border border-line2 px-3 py-1.5 text-xs text-mute\">Back</button>\n        <button onClick={() => setS(s >= steps.length - 1 ? 0 : s + 1)} className=\"rounded-lg bg-tx px-3 py-1.5 text-xs font-medium text-bg\">{s >= steps.length - 1 ? 'Restart' : 'Continue'}</button>\n      </div>\n    </div>\n  )\n}\n"
    }
  ],
  "cssVars": {
    "theme": {
      "color-bg": "var(--bg)",
      "color-panel": "var(--panel)",
      "color-panel2": "var(--panel2)",
      "color-line": "var(--line)",
      "color-line2": "var(--line2)",
      "color-tx": "var(--tx)",
      "color-mute": "var(--mute)",
      "color-faint": "var(--faint)",
      "color-acc": "var(--acc)",
      "color-acc-fg": "var(--acc-fg)"
    },
    "light": {
      "bg": "#ffffff",
      "panel": "#f5f5f7",
      "panel2": "#e8e8ed",
      "line": "#e5e5ea",
      "line2": "#d2d2d7",
      "tx": "#1d1d1f",
      "mute": "#6e6e73",
      "faint": "#a1a1a6",
      "acc": "#1d1d1f",
      "acc-fg": "#ffffff"
    },
    "dark": {
      "bg": "#000000",
      "panel": "#141416",
      "panel2": "#1f1f22",
      "line": "#262628",
      "line2": "#3a3a3d",
      "tx": "#f5f5f7",
      "mute": "#a1a1a6",
      "faint": "#6e6e73",
      "acc": "#f5f5f7",
      "acc-fg": "#000000"
    }
  },
  "css": {
    ".light": {
      "--bg": "#ffffff",
      "--panel": "#f5f5f7",
      "--panel2": "#e8e8ed",
      "--line": "#e5e5ea",
      "--line2": "#d2d2d7",
      "--tx": "#1d1d1f",
      "--mute": "#6e6e73",
      "--faint": "#a1a1a6",
      "--acc": "#1d1d1f",
      "--acc-fg": "#ffffff"
    }
  }
}
