{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "authentication-09",
  "type": "registry:block",
  "description": "Three-step onboarding flow to pick a work type, name the workspace and invite teammates.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "button",
    "input",
    "label"
  ],
  "files": [
    {
      "path": "registry/designali/blocks/authentication/authentication-09.tsx",
      "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport {\n  ArrowLeft,\n  ArrowRight,\n  Check,\n  CodeXml as Code2,\n  Megaphone,\n  Palette,\n  Plus,\n  X,\n} from \"@designali/icons\"\n\nimport { Button } from \"@workspace/ui/components/button\"\nimport { Input } from \"@workspace/ui/components/input\"\nimport { Label } from \"@workspace/ui/components/label\"\nimport { cn } from \"@workspace/ui/lib/utils\"\n\nconst roles = [\n  { id: \"design\", icon: Palette, label: \"Design\", text: \"UI/UX, brand identity, Figma\" },\n  { id: \"engineering\", icon: Code2, label: \"Engineering\", text: \"Next.js, React, Tailwind CSS\" },\n  { id: \"marketing\", icon: Megaphone, label: \"Marketing\", text: \"Launches, blogs and socials\" },\n]\n\nconst sizes = [\"Just me\", \"2-10\", \"11-50\", \"51-200\", \"200+\"]\n\nexport default function Authentication09() {\n  const [step, setStep] = useState(0)\n  const [role, setRole] = useState(\"design\")\n  const [size, setSize] = useState(\"2-10\")\n  const [workspace, setWorkspace] = useState(\"Designali Studio\")\n  const [invites, setInvites] = useState<string[]>([\"ali@designali.com\"])\n  const [draft, setDraft] = useState(\"\")\n\n  const total = 3\n  const slug = workspace.toLowerCase().replace(/[^a-z0-9]+/g, \"-\").replace(/^-|-$/g, \"\") || \"your-team\"\n\n  return (\n    <section className=\"w-full bg-background\">\n      <div className=\"h-1 bg-muted\">\n        <div className=\"h-full bg-foreground transition-all duration-500\" style={{ width: `${((step + 1) / total) * 100}%` }} />\n      </div>\n      <div className=\"mx-auto flex min-h-[680px] max-w-xl flex-col px-6 py-12\">\n        <div className=\"flex items-center justify-between text-sm text-muted-foreground\">\n          <span className=\"font-semibold text-foreground\">Designali</span>\n          <span className=\"tabular-nums\">Step {step + 1} of {total}</span>\n        </div>\n\n        <div className=\"flex-1 py-12\">\n          {step === 0 && (\n            <div className=\"space-y-8\">\n              <div>\n                <h2 className=\"text-3xl font-semibold tracking-tight\">What kind of work do you do?</h2>\n                <p className=\"mt-2 text-muted-foreground\">We&apos;ll pick Designali templates and blocks that fit how you work.</p>\n              </div>\n              <div className=\"grid gap-3\">\n                {roles.map((item) => (\n                  <button\n                    key={item.id}\n                    type=\"button\"\n                    onClick={() => setRole(item.id)}\n                    aria-pressed={role === item.id}\n                    className={cn(\n                      \"flex items-center gap-4 border p-4 text-start transition-colors\",\n                      role === item.id ? \"border-foreground bg-muted/50\" : \"hover:bg-muted/30\"\n                    )}\n                  >\n                    <span className=\"flex size-10 shrink-0 items-center justify-center border bg-background\">\n                      <item.icon className=\"size-4\" />\n                    </span>\n                    <span className=\"flex-1\">\n                      <span className=\"block font-medium\">{item.label}</span>\n                      <span className=\"block text-sm text-muted-foreground\">{item.text}</span>\n                    </span>\n                    <span className={cn(\"flex size-5 items-center justify-center border\", role === item.id && \"border-foreground bg-foreground text-background\")}>\n                      {role === item.id && <Check className=\"size-3\" />}\n                    </span>\n                  </button>\n                ))}\n              </div>\n            </div>\n          )}\n\n          {step === 1 && (\n            <div className=\"space-y-8\">\n              <div>\n                <h2 className=\"text-3xl font-semibold tracking-tight\">Name your workspace</h2>\n                <p className=\"mt-2 text-muted-foreground\">Usually your company or team name.</p>\n              </div>\n              <div className=\"space-y-2\">\n                <Label htmlFor=\"auth-09-workspace\">Workspace name</Label>\n                <Input id=\"auth-09-workspace\" value={workspace} onChange={(event) => setWorkspace(event.target.value)} className=\"h-11\" />\n                <p className=\"text-xs text-muted-foreground\">\n                  designali.com/<span className=\"text-foreground\">{slug}</span>\n                </p>\n              </div>\n              <div className=\"space-y-3\">\n                <p className=\"text-sm font-medium\">Team size</p>\n                <div className=\"flex flex-wrap gap-2\">\n                  {sizes.map((item) => (\n                    <button\n                      key={item}\n                      type=\"button\"\n                      onClick={() => setSize(item)}\n                      className={cn(\n                        \"h-9 border px-4 text-sm transition-colors\",\n                        size === item ? \"border-foreground bg-foreground text-background\" : \"text-muted-foreground hover:text-foreground\"\n                      )}\n                    >\n                      {item}\n                    </button>\n                  ))}\n                </div>\n              </div>\n            </div>\n          )}\n\n          {step === 2 && (\n            <div className=\"space-y-8\">\n              <div>\n                <h2 className=\"text-3xl font-semibold tracking-tight\">Invite your teammates</h2>\n                <p className=\"mt-2 text-muted-foreground\">Designali works best with your whole team. You can skip this.</p>\n              </div>\n              <form\n                className=\"flex gap-2\"\n                onSubmit={(event) => {\n                  event.preventDefault()\n                  if (draft.includes(\"@\") && !invites.includes(draft)) setInvites([...invites, draft])\n                  setDraft(\"\")\n                }}\n              >\n                <Input type=\"email\" value={draft} onChange={(event) => setDraft(event.target.value)} placeholder=\"name@designali.com\" className=\"h-11\" />\n                <Button type=\"submit\" variant=\"outline\" className=\"h-11\">\n                  <Plus />\n                  Add\n                </Button>\n              </form>\n              <ul className=\"divide-y border\">\n                {invites.length === 0 && <li className=\"p-4 text-sm text-muted-foreground\">No invites yet.</li>}\n                {invites.map((invite) => (\n                  <li key={invite} className=\"flex items-center gap-3 p-3 text-sm\">\n                    <span className=\"flex size-8 items-center justify-center bg-muted text-xs font-medium uppercase\">{invite[0]}</span>\n                    <span className=\"min-w-0 flex-1 truncate\">{invite}</span>\n                    <span className=\"text-xs text-muted-foreground\">Member</span>\n                    <button type=\"button\" aria-label={`Remove ${invite}`} onClick={() => setInvites(invites.filter((item) => item !== invite))} className=\"text-muted-foreground hover:text-foreground\">\n                      <X className=\"size-4\" />\n                    </button>\n                  </li>\n                ))}\n              </ul>\n            </div>\n          )}\n        </div>\n\n        <div className=\"flex items-center justify-between border-t pt-6\">\n          <Button variant=\"ghost\" disabled={step === 0} onClick={() => setStep(step - 1)}>\n            <ArrowLeft />\n            Back\n          </Button>\n          <div className=\"flex gap-2\">\n            {step === 2 && <Button variant=\"ghost\">Skip</Button>}\n            <Button onClick={() => setStep(Math.min(step + 1, total - 1))}>\n              {step === total - 1 ? \"Finish setup\" : \"Continue\"}\n              <ArrowRight />\n            </Button>\n          </div>\n        </div>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "iframeHeight": "750px"
  },
  "categories": [
    "authentication"
  ]
}