{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"vertical-stepper-with-step-descriptions","type":"registry:component","title":"Vertical Stepper With Step Descriptions","description":"","dependencies":[],"files":[{"path":"components/we-inc/vertical-stepper-with-step-descriptions.tsx","type":"registry:component","content":"import { useState } from \"react\";\n\n// Steps of a garden design commission. The current step shows its detail and a button.\nconst steps = [\n  { title: \"Site visit\", text: \"We walk the garden with you, measure it and note soil, light and drainage.\", action: \"Visit booked\" },\n  { title: \"Concept sketches\", text: \"Two hand-drawn layouts with planting moods. Pick one or mix them.\", action: \"Approve a concept\" },\n  { title: \"Planting plan\", text: \"A scaled plan with every plant named, plus a cost for materials.\", action: \"Approve the plan\" },\n  { title: \"Build and planting\", text: \"Our crew builds the hard landscaping first, then plants in a single week.\", action: \"Mark as finished\" },\n];\n\nexport default function VerticalStepperWithStepDescriptions() {\n  const [current, setCurrent] = useState(1);\n\n  return (\n    <div className=\"bg-emerald-950 px-4 py-12 sm:px-8\">\n      <div className=\"mx-auto max-w-lg rounded-2xl bg-[#f6f3ea] p-6 sm:p-8\">\n        <p className=\"text-xs font-semibold uppercase tracking-widest text-emerald-800\">Commission #2081</p>\n        <h2 className=\"mt-1 font-serif text-2xl text-emerald-950\">Your garden, step by step</h2>\n        <ol className=\"mt-6\">\n          {steps.map((s, i) => {\n            const done = i < current;\n            const now = i === current;\n            return (\n              <li key={s.title} aria-current={now ? \"step\" : undefined} className=\"relative flex gap-4 pb-6 last:pb-0\">\n                {i < steps.length - 1 && (\n                  <span aria-hidden=\"true\" className={`absolute left-[15px] top-9 bottom-1 w-0.5 rounded ${done ? \"bg-emerald-700\" : \"bg-emerald-900/15\"}`} />\n                )}\n                <span aria-hidden=\"true\" className={`relative grid h-8 w-8 shrink-0 place-items-center rounded-full text-sm font-semibold ${done ? \"bg-emerald-700 text-white\" : now ? \"bg-emerald-950 text-[#f6f3ea]\" : \"border-2 border-emerald-900/20 text-emerald-900/70\"}`}>\n                  {done ? <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"3\" strokeLinecap=\"round\" strokeLinejoin=\"round\"><path d=\"M5 12l5 5 9-10\" /></svg> : i + 1}\n                </span>\n                <div className=\"min-w-0 pt-1\">\n                  <h3 className={`text-[15px] font-semibold ${now || done ? \"text-emerald-950\" : \"text-stone-600\"}`}>\n                    {s.title}\n                    <span className=\"sr-only\">{done ? \", completed\" : now ? \", current step\" : \", upcoming\"}</span>\n                  </h3>\n                  {(now || done) && <p className=\"mt-1 text-sm leading-6 text-stone-700\">{s.text}</p>}\n                  {now && (\n                    <div className=\"mt-3 flex flex-wrap gap-2\">\n                      <button type=\"button\" onClick={() => setCurrent(i + 1)} className=\"h-10 rounded-full bg-emerald-800 px-4 text-sm font-semibold text-white hover:bg-emerald-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-emerald-700 focus-visible:ring-offset-2 focus-visible:ring-offset-[#f6f3ea]\">{s.action}</button>\n                      {i > 0 && <button type=\"button\" onClick={() => setCurrent(i - 1)} className=\"h-10 rounded-full px-4 text-sm font-medium text-emerald-900 hover:bg-emerald-900/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-emerald-700\">Back</button>}\n                    </div>\n                  )}\n                </div>\n              </li>\n            );\n          })}\n        </ol>\n        {current === steps.length && (\n          <div className=\"mt-6 flex items-center justify-between rounded-xl bg-emerald-800 p-4 text-sm text-white\">\n            <span>All done. Enjoy the garden.</span>\n            <button type=\"button\" onClick={() => setCurrent(0)} className=\"h-10 rounded-full bg-white/15 px-3 font-medium hover:bg-white/25 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white\">Start over</button>\n          </div>\n        )}\n      </div>\n    </div>\n  );\n}\n"}]}
