{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "multi-step-form",
  "title": "Multi-step Form Block",
  "description": "A complete create-a-workspace wizard: a step rail with checks, a name field that writes the web address with a live availability check, plan cards with a monthly or annual switch, email invites, a review page with Edit links and a success screen. Each step validates before moving on and slides in from the direction you are going.",
  "dependencies": [
    "motion",
    "clsx",
    "tailwind-merge"
  ],
  "files": [
    {
      "path": "registry/new-york/multi-step-form/multi-step-form.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\nimport { AnimatePresence, motion, useReducedMotion } from \"motion/react\";\nimport { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nfunction cn(...inputs: ClassValue[]) {\n  return twMerge(clsx(inputs));\n}\n\nexport interface WorkspaceDraft {\n  name: string;\n  slug: string;\n  industry: string;\n  size: string;\n  plan: \"starter\" | \"team\" | \"business\";\n  billing: \"monthly\" | \"annual\";\n  invites: string[];\n}\n\nexport interface MultiStepFormProps {\n  title?: string;\n  /** Base URL shown before the slug. */\n  domain?: string;\n  /** Slugs that are already taken (demo availability check). */\n  taken?: string[];\n  onSubmit?: (draft: WorkspaceDraft) => Promise<void> | void;\n  theme?: \"dark\" | \"light\";\n  className?: string;\n}\n\nconst PALETTES = {\n  dark: { bg: \"#0A0A0A\", text: \"#F5F4F1\", muted: \"rgba(245,244,241,0.62)\", faint: \"rgba(245,244,241,0.36)\", card: \"#121212\", border: \"rgba(255,255,255,0.09)\", chip: \"rgba(255,255,255,0.06)\", input: \"#0D0D0D\", on: \"#F5F4F1\", onText: \"#0A0A0A\", green: \"#4ADE80\", red: \"#F87171\", accent: \"#FB923C\", track: \"rgba(255,255,255,0.08)\", ring: \"rgba(245,244,241,0.6)\" },\n  light: { bg: \"#FAFAF8\", text: \"#0A0A0A\", muted: \"rgba(10,10,10,0.62)\", faint: \"rgba(10,10,10,0.4)\", card: \"#FFFFFF\", border: \"rgba(10,10,10,0.1)\", chip: \"rgba(10,10,10,0.05)\", input: \"#FAFAF8\", on: \"#0A0A0A\", onText: \"#FAFAF8\", green: \"#15803D\", red: \"#DC2626\", accent: \"#EA580C\", track: \"rgba(10,10,10,0.08)\", ring: \"rgba(10,10,10,0.5)\" },\n};\n\nconst STEPS = [\n  { id: \"details\", title: \"Workspace\", hint: \"Name and address\" },\n  { id: \"plan\", title: \"Plan\", hint: \"Pick what fits\" },\n  { id: \"team\", title: \"Team\", hint: \"Invite people\" },\n  { id: \"review\", title: \"Review\", hint: \"Check and create\" },\n] as const;\nconst PLANS = [\n  { id: \"starter\" as const, name: \"Starter\", price: 0, blurb: \"For trying things out\", features: [\"3 projects\", \"1 GB storage\"] },\n  { id: \"team\" as const, name: \"Team\", price: 12, blurb: \"For growing teams\", features: [\"Unlimited projects\", \"50 GB storage\", \"Guest access\"] },\n  { id: \"business\" as const, name: \"Business\", price: 24, blurb: \"For companies\", features: [\"SSO and audit log\", \"1 TB storage\", \"Priority support\"] },\n];\nconst SIZES = [\"Just me\", \"2–10\", \"11–50\", \"51–200\", \"200+\"];\nconst EMAIL = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\nconst slugify = (s: string) =>\n  s\n    .toLowerCase()\n    .normalize(\"NFD\")\n    .replace(/[̀-ͯ]/g, \"\")\n    .replace(/[^a-z0-9]+/g, \"-\")\n    .replace(/^-+|-+$/g, \"\")\n    .slice(0, 32);\n\nexport function MultiStepForm({ title = \"Create a workspace\", domain = \"nexora.app/\", taken = [\"acme\", \"studio\", \"demo\", \"nexora\"], onSubmit, theme = \"dark\", className }: MultiStepFormProps) {\n  const p = PALETTES[theme];\n  const reduce = !!useReducedMotion();\n  const uid = React.useId();\n  const [step, setStep] = React.useState(0);\n  const [dir, setDir] = React.useState(1);\n  const [visited, setVisited] = React.useState(0);\n  const [draft, setDraft] = React.useState<WorkspaceDraft>({ name: \"\", slug: \"\", industry: \"\", size: \"2–10\", plan: \"team\", billing: \"annual\", invites: [] });\n  const [slugTouched, setSlugTouched] = React.useState(false);\n  const [errors, setErrors] = React.useState<Record<string, string>>({});\n  const [inviteText, setInviteText] = React.useState(\"\");\n  const [status, setStatus] = React.useState<\"idle\" | \"saving\" | \"done\">(\"idle\");\n  const [savedAt, setSavedAt] = React.useState<string | null>(null);\n  const draftTimer = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n  React.useEffect(\n    () => () => {\n      if (draftTimer.current) clearTimeout(draftTimer.current);\n    },\n    [],\n  );\n\n  const set = <K extends keyof WorkspaceDraft>(k: K, v: WorkspaceDraft[K]) => {\n    setDraft((d) => ({ ...d, [k]: v }));\n    setErrors((e) => ({ ...e, [k]: \"\" }));\n    if (draftTimer.current) clearTimeout(draftTimer.current);\n    setSavedAt(\"Saving draft…\");\n    draftTimer.current = setTimeout(() => setSavedAt(\"Draft saved\"), 700);\n  };\n  const slugState = !draft.slug ? \"empty\" : draft.slug.length < 3 ? \"short\" : taken.includes(draft.slug) ? \"taken\" : \"free\";\n\n  const validate = (i: number) => {\n    const e: Record<string, string> = {};\n    if (i === 0) {\n      if (draft.name.trim().length < 2) e.name = \"Give your workspace a name.\";\n      if (slugState === \"empty\" || slugState === \"short\") e.slug = \"Use at least 3 letters or numbers.\";\n      if (slugState === \"taken\") e.slug = `${domain}${draft.slug} is taken. Try another.`;\n    }\n    if (i === 2) {\n      const bad = draft.invites.filter((x) => !EMAIL.test(x));\n      if (bad.length) e.invites = `Check ${bad.join(\", \")}`;\n    }\n    setErrors(e);\n    return Object.keys(e).length === 0;\n  };\n  const go = (to: number) => {\n    if (to > step) {\n      for (let i = step; i < to; i++) if (!validate(i)) return setStep(i);\n    }\n    navigated.current = true;\n    setDir(to > step ? 1 : -1);\n    setStep(to);\n    setVisited((v) => Math.max(v, to));\n  };\n  const submit = async () => {\n    if (!validate(0) || !validate(2)) return;\n    setStatus(\"saving\");\n    if (onSubmit) await onSubmit(draft);\n    else await new Promise((r) => setTimeout(r, reduce ? 200 : 1100));\n    setStatus(\"done\");\n  };\n  const addInvites = (raw: string) => {\n    const list = raw\n      .split(/[\\s,;]+/)\n      .map((s) => s.trim().toLowerCase())\n      .filter(Boolean);\n    if (list.length) set(\"invites\", Array.from(new Set([...draft.invites, ...list])));\n    setInviteText(\"\");\n  };\n  // Focus the first field of each step, but only after the user has moved between steps (not on page load).\n  const navigated = React.useRef(false);\n  const focusFirst = React.useCallback((el: HTMLElement | null) => {\n    if (el && navigated.current && el.dataset.autofocus !== \"done\") {\n      el.dataset.autofocus = \"done\";\n      el.focus({ preventScroll: true });\n    }\n  }, []);\n\n  const ring = { [\"--tw-ring-color\" as string]: p.ring, [\"--tw-ring-offset-color\" as string]: p.card } as React.CSSProperties;\n  const focus = \"outline-none focus-visible:ring-2 focus-visible:ring-offset-2\";\n  const field = cn(\"h-10 w-full rounded-lg border px-3 text-[14px]\", focus);\n  const fs = (bad?: string) => ({ borderColor: bad ? p.red : p.border, background: p.input, color: p.text, ...ring }) as React.CSSProperties;\n  const label = \"mb-1.5 block text-[12.5px] font-medium\";\n  const err = (k: string) =>\n    errors[k] ? (\n      <p id={`${uid}-${k}-err`} className=\"m-0 mt-1.5 text-[12px]\" style={{ color: p.red }} role=\"alert\">\n        {errors[k]}\n      </p>\n    ) : null;\n  const plan = PLANS.find((x) => x.id === draft.plan)!;\n  const price = draft.billing === \"annual\" ? Math.round(plan.price * 0.8) : plan.price;\n  const seats = draft.invites.length + 1;\n\n  const panels = [\n    <div key=\"details\" className=\"flex flex-col gap-4\">\n      <div>\n        <label htmlFor={`${uid}-name`} className={label}>\n          Workspace name\n        </label>\n        <input\n          id={`${uid}-name`}\n          ref={focusFirst}\n          value={draft.name}\n          onChange={(e) => {\n            set(\"name\", e.target.value);\n            if (!slugTouched) {\n              setDraft((d) => ({ ...d, name: e.target.value, slug: slugify(e.target.value) }));\n              setErrors((er) => ({ ...er, slug: \"\" }));\n            }\n          }}\n          placeholder=\"Halcyon Studio\"\n          aria-invalid={!!errors.name}\n          aria-describedby={errors.name ? `${uid}-name-err` : undefined}\n          className={field}\n          style={fs(errors.name)}\n        />\n        {err(\"name\")}\n      </div>\n      <div>\n        <label htmlFor={`${uid}-slug`} className={label}>\n          Web address\n        </label>\n        <div className=\"flex h-10 items-center overflow-hidden rounded-lg border focus-within:ring-2\" style={fs(errors.slug)}>\n          <span className=\"pl-3 text-[14px]\" style={{ color: p.faint }}>\n            {domain}\n          </span>\n          <input\n            id={`${uid}-slug`}\n            value={draft.slug}\n            onChange={(e) => {\n              setSlugTouched(true);\n              set(\"slug\", slugify(e.target.value));\n            }}\n            aria-invalid={!!errors.slug}\n            aria-describedby={`${uid}-slug-hint`}\n            className=\"h-full min-w-0 flex-1 border-0 bg-transparent pr-3 text-[14px] outline-none\"\n            style={{ color: p.text }}\n          />\n          <span className=\"pr-3\" aria-hidden=\"true\">\n            {slugState === \"free\" && (\n              <motion.svg initial={reduce ? false : { scale: 0 }} animate={{ scale: 1 }} width=\"15\" height=\"15\" viewBox=\"0 0 16 16\" fill=\"none\" stroke={p.green} strokeWidth=\"2.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n                <path d=\"m3 8.5 3 3 7-7\" />\n              </motion.svg>\n            )}\n            {slugState === \"taken\" && (\n              <svg width=\"14\" height=\"14\" viewBox=\"0 0 16 16\" fill=\"none\" stroke={p.red} strokeWidth=\"2.2\" strokeLinecap=\"round\">\n                <path d=\"m4 4 8 8M12 4l-8 8\" />\n              </svg>\n            )}\n          </span>\n        </div>\n        <p id={`${uid}-slug-hint`} className=\"m-0 mt-1.5 text-[12px]\" style={{ color: errors.slug || slugState === \"taken\" ? p.red : slugState === \"free\" ? p.green : p.faint }} aria-live=\"polite\">\n          {errors.slug || (slugState === \"free\" ? `${domain}${draft.slug} is available` : slugState === \"taken\" ? \"That address is taken\" : \"Letters, numbers and dashes\")}\n        </p>\n      </div>\n      <div className=\"grid gap-4 @[560px]:grid-cols-2\">\n        <div>\n          <label htmlFor={`${uid}-ind`} className={label}>\n            Industry <span style={{ color: p.faint }}>(optional)</span>\n          </label>\n          <select id={`${uid}-ind`} value={draft.industry} onChange={(e) => set(\"industry\", e.target.value)} className={cn(field, \"cursor-pointer\")} style={fs()}>\n            <option value=\"\">Choose one</option>\n            {[\"Design and creative\", \"Software\", \"Marketing\", \"Education\", \"Retail\", \"Other\"].map((x) => (\n              <option key={x}>{x}</option>\n            ))}\n          </select>\n        </div>\n        <fieldset className=\"m-0 border-0 p-0\">\n          <legend className={label}>Team size</legend>\n          <div className=\"flex flex-wrap gap-1.5\">\n            {SIZES.map((s) => (\n              <label key={s} className=\"cursor-pointer\">\n                <input type=\"radio\" name={`${uid}-size`} checked={draft.size === s} onChange={() => set(\"size\", s)} className=\"peer sr-only\" />\n                <span className=\"flex h-8 items-center rounded-full border px-3 text-[12.5px] peer-focus-visible:ring-2\" style={{ borderColor: draft.size === s ? p.text : p.border, background: draft.size === s ? p.chip : \"transparent\", ...ring }}>\n                  {s}\n                </span>\n              </label>\n            ))}\n          </div>\n        </fieldset>\n      </div>\n    </div>,\n    <div key=\"plan\" className=\"flex flex-col gap-4\">\n      <div className=\"flex items-center justify-between\">\n        <p className=\"m-0 text-[13px]\" style={{ color: p.muted }}>\n          Change plans any time.\n        </p>\n        <div role=\"radiogroup\" aria-label=\"Billing\" className=\"flex rounded-lg border p-0.5\" style={{ borderColor: p.border }}>\n          {([\"monthly\", \"annual\"] as const).map((b) => (\n            <button key={b} type=\"button\" role=\"radio\" aria-checked={draft.billing === b} onClick={() => set(\"billing\", b)} className={cn(\"relative h-7 cursor-pointer rounded-md border-0 bg-transparent px-2.5 text-[12.5px] capitalize\", focus)} style={{ color: draft.billing === b ? p.text : p.faint, ...ring }}>\n              {draft.billing === b && <motion.span layoutId={`${uid}-bill`} className=\"absolute inset-0 rounded-md\" style={{ background: p.chip }} transition={reduce ? { duration: 0 } : { type: \"spring\", stiffness: 500, damping: 38 }} />}\n              <span className=\"relative\">\n                {b}\n                {b === \"annual\" ? <span style={{ color: p.accent }}> −20%</span> : null}\n              </span>\n            </button>\n          ))}\n        </div>\n      </div>\n      <fieldset className=\"m-0 grid gap-2.5 border-0 p-0 @[560px]:grid-cols-3\">\n        <legend className=\"sr-only\">Plan</legend>\n        {PLANS.map((pl, i) => {\n          const on = draft.plan === pl.id;\n          const pr = draft.billing === \"annual\" ? Math.round(pl.price * 0.8) : pl.price;\n          return (\n            <label key={pl.id} className=\"relative cursor-pointer\">\n              <input ref={i === 0 ? focusFirst : undefined} type=\"radio\" name={`${uid}-plan`} checked={on} onChange={() => set(\"plan\", pl.id)} className=\"peer sr-only\" />\n              <span className=\"flex h-full flex-col rounded-xl border p-4 transition-colors peer-focus-visible:ring-2\" style={{ borderColor: on ? p.text : p.border, background: on ? p.chip : \"transparent\", ...ring }}>\n                <span className=\"flex items-center justify-between\">\n                  <span className=\"text-[14px] font-semibold\">{pl.name}</span>\n                  <motion.span className=\"flex h-4 w-4 items-center justify-center rounded-full border\" initial={false} animate={{ borderColor: on ? p.text : p.faint }}>\n                    {on && <motion.span layoutId={reduce ? undefined : `${uid}-dot`} className=\"h-2 w-2 rounded-full\" style={{ background: p.text }} />}\n                  </motion.span>\n                </span>\n                <span className=\"mt-1 text-[12px]\" style={{ color: p.faint }}>\n                  {pl.blurb}\n                </span>\n                <span className=\"mt-3 text-[22px] font-semibold tracking-[-0.02em] tabular-nums\">\n                  ${pr}\n                  <span className=\"text-[12px] font-normal\" style={{ color: p.faint }}>\n                    {\" \"}\n                    / seat / mo\n                  </span>\n                </span>\n                <span className=\"mt-3 flex flex-col gap-1\">\n                  {pl.features.map((f) => (\n                    <span key={f} className=\"flex items-center gap-1.5 text-[12.5px]\" style={{ color: p.muted }}>\n                      <svg width=\"11\" height=\"11\" viewBox=\"0 0 16 16\" fill=\"none\" stroke={p.green} strokeWidth=\"2.4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                        <path d=\"m3 8.5 3 3 7-7\" />\n                      </svg>\n                      {f}\n                    </span>\n                  ))}\n                </span>\n              </span>\n            </label>\n          );\n        })}\n      </fieldset>\n    </div>,\n    <div key=\"team\" className=\"flex flex-col gap-3\">\n      <label htmlFor={`${uid}-inv`} className={label}>\n        Invite by email <span style={{ color: p.faint }}>(optional)</span>\n      </label>\n      <div className=\"flex gap-2\">\n        <input\n          id={`${uid}-inv`}\n          ref={focusFirst}\n          value={inviteText}\n          onChange={(e) => setInviteText(e.target.value)}\n          onKeyDown={(e) => {\n            if (e.key === \"Enter\" || e.key === \",\") {\n              e.preventDefault();\n              addInvites(inviteText);\n            }\n          }}\n          onPaste={(e) => {\n            e.preventDefault();\n            addInvites(e.clipboardData.getData(\"text\"));\n          }}\n          placeholder=\"name@company.com\"\n          aria-describedby={errors.invites ? `${uid}-invites-err` : undefined}\n          className={field}\n          style={fs(errors.invites)}\n        />\n        <button type=\"button\" onClick={() => addInvites(inviteText)} disabled={!inviteText.trim()} className={cn(\"h-10 shrink-0 cursor-pointer rounded-lg border bg-transparent px-3.5 text-[13px] disabled:cursor-not-allowed disabled:opacity-40\", focus)} style={{ borderColor: p.border, color: p.text, ...ring }}>\n          Add\n        </button>\n      </div>\n      {err(\"invites\")}\n      <ul className=\"m-0 flex list-none flex-col gap-1.5 p-0\">\n        <AnimatePresence initial={false}>\n          {draft.invites.map((x) => (\n            <motion.li key={x} initial={reduce ? false : { opacity: 0, height: 0 }} animate={{ opacity: 1, height: \"auto\" }} exit={reduce ? undefined : { opacity: 0, height: 0 }} className=\"overflow-hidden\">\n              <span className=\"flex items-center gap-3 rounded-lg border px-3 py-2\" style={{ borderColor: EMAIL.test(x) ? p.border : p.red }}>\n                <span className=\"flex h-7 w-7 items-center justify-center rounded-full text-[11px] font-semibold uppercase\" style={{ background: p.chip, color: p.muted }} aria-hidden=\"true\">\n                  {x[0]}\n                </span>\n                <span className=\"min-w-0 flex-1 truncate text-[13.5px]\" style={{ color: EMAIL.test(x) ? p.text : p.red }}>\n                  {x}\n                </span>\n                <span className=\"text-[12px]\" style={{ color: p.faint }}>\n                  Member\n                </span>\n                <button type=\"button\" aria-label={`Remove ${x}`} onClick={() => set(\"invites\", draft.invites.filter((y) => y !== x))} className={cn(\"flex h-7 w-7 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent\", focus)} style={{ color: p.faint, ...ring }}>\n                  ×\n                </button>\n              </span>\n            </motion.li>\n          ))}\n        </AnimatePresence>\n      </ul>\n      {!draft.invites.length && (\n        <p className=\"m-0 rounded-lg border border-dashed px-4 py-6 text-center text-[13px]\" style={{ borderColor: p.border, color: p.faint }}>\n          No one yet. You can always invite people later.\n        </p>\n      )}\n    </div>,\n    <div key=\"review\" className=\"flex flex-col gap-3\">\n      {[\n        { step: 0, k: \"Workspace\", v: draft.name || \"—\", sub: `${domain}${draft.slug}${draft.industry ? ` · ${draft.industry}` : \"\"} · ${draft.size}` },\n        { step: 1, k: \"Plan\", v: `${plan.name} · $${price} / seat / month`, sub: draft.billing === \"annual\" ? \"Billed yearly, 20% off\" : \"Billed monthly\" },\n        { step: 2, k: \"Team\", v: `${seats} ${seats === 1 ? \"seat\" : \"seats\"}`, sub: draft.invites.length ? draft.invites.join(\", \") : \"Just you for now\" },\n      ].map((r, i) => (\n        <div key={r.k} className=\"flex items-start justify-between gap-3 rounded-xl border p-4\" style={{ borderColor: p.border }}>\n          <div className=\"min-w-0\">\n            <p className=\"m-0 text-[12px]\" style={{ color: p.faint }}>\n              {r.k}\n            </p>\n            <p className=\"m-0 mt-0.5 text-[14px] font-medium\">{r.v}</p>\n            <p className=\"m-0 mt-0.5 truncate text-[12.5px]\" style={{ color: p.muted }}>\n              {r.sub}\n            </p>\n          </div>\n          <button type=\"button\" ref={i === 0 ? focusFirst : undefined} onClick={() => go(r.step)} className={cn(\"shrink-0 cursor-pointer rounded border-0 bg-transparent px-1 text-[12.5px] underline-offset-2 hover:underline\", focus)} style={{ color: p.text, ...ring }} aria-label={`Edit ${r.k.toLowerCase()}`}>\n            Edit\n          </button>\n        </div>\n      ))}\n      <div className=\"flex items-center justify-between rounded-xl px-4 py-3 text-[13.5px]\" style={{ background: p.chip }}>\n        <span style={{ color: p.muted }}>Due today</span>\n        <span className=\"font-semibold tabular-nums\">{plan.price === 0 ? \"$0 · free forever\" : `$0 · 14-day trial, then $${price * seats * (draft.billing === \"annual\" ? 12 : 1)}`}</span>\n      </div>\n    </div>,\n  ];\n\n  return (\n    <section className={cn(\"@container w-full\", className)} style={{ background: p.bg, color: p.text }}>\n      <div className=\"mx-auto max-w-4xl px-4 py-10 @[640px]:px-6 @[640px]:py-14\">\n        <div className=\"overflow-hidden rounded-2xl border\" style={{ background: p.card, borderColor: p.border }}>\n          <AnimatePresence mode=\"wait\" initial={false}>\n            {status === \"done\" ? (\n              <motion.div key=\"done\" initial={reduce ? false : { opacity: 0, scale: 0.97 }} animate={{ opacity: 1, scale: 1 }} className=\"flex flex-col items-center px-6 py-16 text-center\" role=\"status\">\n                <motion.span className=\"flex h-14 w-14 items-center justify-center rounded-full\" style={{ background: p.green }} initial={reduce ? false : { scale: 0 }} animate={{ scale: 1 }} transition={{ type: \"spring\", stiffness: 300, damping: 18 }}>\n                  <svg width=\"26\" height=\"26\" viewBox=\"0 0 16 16\" fill=\"none\" stroke={p.onText} strokeWidth=\"2.4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                    <motion.path d=\"m3 8.5 3 3 7-7\" initial={reduce ? false : { pathLength: 0 }} animate={{ pathLength: 1 }} transition={{ delay: 0.2, duration: 0.4 }} />\n                  </svg>\n                </motion.span>\n                <h2 className=\"m-0 mt-5 text-[22px] font-semibold tracking-[-0.02em]\">{draft.name} is ready</h2>\n                <p className=\"m-0 mt-2 max-w-sm text-[14px]\" style={{ color: p.muted }}>\n                  {draft.invites.length ? `We sent ${draft.invites.length} ${draft.invites.length === 1 ? \"invite\" : \"invites\"}. ` : \"\"}Your workspace lives at {domain}\n                  {draft.slug}.\n                </p>\n                <button\n                  type=\"button\"\n                  onClick={() => {\n                    setStatus(\"idle\");\n                    setStep(0);\n                    setVisited(0);\n                    setDraft({ name: \"\", slug: \"\", industry: \"\", size: \"2–10\", plan: \"team\", billing: \"annual\", invites: [] });\n                    setSlugTouched(false);\n                    setSavedAt(null);\n                  }}\n                  className={cn(\"mt-6 h-10 cursor-pointer rounded-lg border-0 px-5 text-[14px] font-medium\", focus)}\n                  style={{ background: p.on, color: p.onText, ...ring }}\n                >\n                  Open workspace\n                </button>\n              </motion.div>\n            ) : (\n              <motion.div key=\"form\" exit={reduce ? undefined : { opacity: 0 }} className=\"grid @[720px]:grid-cols-[230px_1fr]\">\n                {/* Step rail */}\n                <nav aria-label=\"Steps\" className=\"border-b p-5 @[720px]:border-r @[720px]:border-b-0 @[720px]:p-6\" style={{ borderColor: p.border }}>\n                  <p className=\"m-0 text-[15px] font-semibold tracking-[-0.01em]\">{title}</p>\n                  <p className=\"m-0 mt-0.5 text-[12px] @[720px]:mb-6\" style={{ color: p.faint }}>\n                    Step {step + 1} of {STEPS.length}\n                  </p>\n                  <div className=\"mt-3 h-1 overflow-hidden rounded-full @[720px]:hidden\" style={{ background: p.track }}>\n                    <motion.div className=\"h-full rounded-full\" style={{ background: p.on }} initial={false} animate={{ width: `${((step + 1) / STEPS.length) * 100}%` }} />\n                  </div>\n                  <ol className=\"m-0 hidden list-none flex-col gap-1 p-0 @[720px]:flex\">\n                    {STEPS.map((s, i) => {\n                      const state = i < step ? \"done\" : i === step ? \"current\" : \"todo\";\n                      return (\n                        <li key={s.id}>\n                          <button type=\"button\" disabled={i > visited} onClick={() => go(i)} aria-current={state === \"current\" ? \"step\" : undefined} className={cn(\"flex w-full cursor-pointer items-center gap-3 rounded-lg border-0 bg-transparent px-2 py-2 text-left disabled:cursor-default\", focus)} style={{ background: state === \"current\" ? p.chip : \"transparent\", ...ring }}>\n                            <motion.span className=\"flex h-6 w-6 shrink-0 items-center justify-center rounded-full border text-[11px] font-semibold tabular-nums\" initial={false} animate={{ background: state === \"done\" ? p.green : \"rgba(0,0,0,0)\", borderColor: state === \"todo\" ? p.border : state === \"done\" ? p.green : p.text, color: state === \"done\" ? p.onText : state === \"current\" ? p.text : p.faint }}>\n                              {state === \"done\" ? (\n                                <svg width=\"11\" height=\"11\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                                  <path d=\"m3 8.5 3 3 7-7\" />\n                                </svg>\n                              ) : (\n                                i + 1\n                              )}\n                            </motion.span>\n                            <span className=\"min-w-0\">\n                              <span className=\"block text-[13.5px] font-medium\" style={{ color: state === \"todo\" ? p.faint : p.text }}>\n                                {s.title}\n                              </span>\n                              <span className=\"block text-[11.5px]\" style={{ color: p.faint }}>\n                                {s.hint}\n                              </span>\n                            </span>\n                          </button>\n                        </li>\n                      );\n                    })}\n                  </ol>\n                </nav>\n\n                {/* Panel */}\n                <form\n                  className=\"flex min-h-[460px] flex-col p-5 @[640px]:p-7\"\n                  onSubmit={(e) => {\n                    e.preventDefault();\n                    if (step < STEPS.length - 1) go(step + 1);\n                    else submit();\n                  }}\n                  noValidate\n                >\n                  <h3 className=\"m-0 text-[19px] font-semibold tracking-[-0.015em]\">{STEPS[step].title === \"Workspace\" ? \"Name your workspace\" : STEPS[step].title === \"Plan\" ? \"Choose a plan\" : STEPS[step].title === \"Team\" ? \"Invite your team\" : \"Review and create\"}</h3>\n                  <p className=\"m-0 mt-1 mb-6 text-[13.5px]\" style={{ color: p.muted }}>\n                    {[\"This is where your projects and people live.\", \"Start with a free trial on paid plans.\", \"They get an email to join right away.\", \"Make sure everything looks right.\"][step]}\n                  </p>\n                  <div className=\"relative flex-1\">\n                    <AnimatePresence mode=\"wait\" initial={false} custom={dir}>\n                      <motion.div key={step} custom={dir} initial={reduce ? false : { opacity: 0, x: 24 * dir }} animate={{ opacity: 1, x: 0 }} exit={reduce ? undefined : { opacity: 0, x: -24 * dir }} transition={{ duration: 0.22 }}>\n                        {panels[step]}\n                      </motion.div>\n                    </AnimatePresence>\n                  </div>\n                  <div className=\"mt-6 flex items-center justify-between gap-3 border-t pt-5\" style={{ borderColor: p.border }}>\n                    <span className=\"text-[12px]\" style={{ color: p.faint }} aria-live=\"polite\">\n                      {savedAt}\n                    </span>\n                    <div className=\"flex gap-2\">\n                      {step > 0 && (\n                        <button type=\"button\" onClick={() => go(step - 1)} className={cn(\"h-10 cursor-pointer rounded-lg border bg-transparent px-4 text-[14px]\", focus)} style={{ borderColor: p.border, color: p.text, ...ring }}>\n                          Back\n                        </button>\n                      )}\n                      <button type=\"submit\" disabled={status === \"saving\"} className={cn(\"flex h-10 cursor-pointer items-center gap-2 rounded-lg border-0 px-5 text-[14px] font-medium disabled:cursor-wait\", focus)} style={{ background: p.on, color: p.onText, ...ring }}>\n                        {status === \"saving\" && <motion.span className=\"h-3.5 w-3.5 rounded-full border-2\" style={{ borderTopColor: \"transparent\", borderRightColor: p.onText, borderBottomColor: p.onText, borderLeftColor: p.onText }} animate={reduce ? undefined : { rotate: 360 }} transition={{ duration: 0.7, repeat: Infinity, ease: \"linear\" }} aria-hidden=\"true\" />}\n                        {step < STEPS.length - 1 ? \"Continue\" : status === \"saving\" ? \"Creating…\" : \"Create workspace\"}\n                      </button>\n                    </div>\n                  </div>\n                </form>\n              </motion.div>\n            )}\n          </AnimatePresence>\n        </div>\n      </div>\n    </section>\n  );\n}\n\nexport default MultiStepForm;\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}