{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "authentication-20",
  "type": "registry:block",
  "description": "Workspace picker with search, a grid of workspace cards showing role and SSO lock, and a create option.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "button"
  ],
  "files": [
    {
      "path": "registry/designali/blocks/authentication/authentication-20.tsx",
      "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport {\n  ArrowRight,\n  Lock,\n  Plus,\n  Search,\n} from \"@designali/icons\"\n\nimport { Button } from \"@workspace/ui/components/button\"\nimport { cn } from \"@workspace/ui/lib/utils\"\n\nconst workspaces = [\n  { name: \"Designali Studio\", slug: \"designali\", role: \"Owner\", members: 42, color: \"from-primary to-chart-2\", sso: true },\n  { name: \"Designali Templates\", slug: \"designali-templates\", role: \"Admin\", members: 9, color: \"from-primary to-chart-2\", sso: false },\n  { name: \"Dalim Works\", slug: \"dalim-works\", role: \"Member\", members: 128, color: \"from-primary to-chart-3\", sso: true },\n  { name: \"Ali Imam Portfolio\", slug: \"aliimam\", role: \"Owner\", members: 3, color: \"from-primary to-chart-2\", sso: false },\n  { name: \"Client Projects\", slug: \"clients\", role: \"Guest\", members: 61, color: \"from-primary to-chart-3\", sso: false },\n]\n\nexport default function Authentication20() {\n  const [query, setQuery] = useState(\"\")\n  const [selected, setSelected] = useState(workspaces[0]!.slug)\n\n  const filtered = workspaces.filter((item) => item.name.toLowerCase().includes(query.toLowerCase()))\n\n  return (\n    <section className=\"w-full bg-background py-20 md:py-24\">\n      <div className=\"mx-auto max-w-4xl px-6\">\n        <div className=\"flex flex-col gap-6 md:flex-row md:items-end md:justify-between\">\n          <div>\n            <p className=\"text-sm text-muted-foreground\">Signed in as ali@designali.com</p>\n            <h2 className=\"mt-1 text-3xl font-semibold tracking-tight\">Pick a workspace</h2>\n          </div>\n          <label className=\"flex h-10 items-center gap-2 border px-3 md:w-64\">\n            <Search className=\"size-4 text-muted-foreground\" />\n            <input\n              value={query}\n              onChange={(event) => setQuery(event.target.value)}\n              placeholder=\"Filter workspaces\"\n              className=\"w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground\"\n            />\n          </label>\n        </div>\n\n        <div role=\"radiogroup\" aria-label=\"Workspaces\" className=\"mt-8 grid gap-3 sm:grid-cols-2 lg:grid-cols-3\">\n          {filtered.map((item) => (\n            <button\n              key={item.slug}\n              type=\"button\"\n              role=\"radio\"\n              aria-checked={selected === item.slug}\n              onClick={() => setSelected(item.slug)}\n              className={cn(\n                \"flex flex-col items-start gap-4 border p-5 text-start transition-colors\",\n                selected === item.slug ? \"border-foreground bg-muted/40\" : \"hover:bg-muted/30\"\n              )}\n            >\n              <span className=\"flex w-full items-start justify-between\">\n                <span className={cn(\"flex size-11 items-center justify-center bg-gradient-to-br text-sm font-bold text-white\", item.color)}>\n                  {item.name.split(\" \").map((word) => word[0]).join(\"\").slice(0, 2)}\n                </span>\n                {item.sso && (\n                  <span className=\"flex items-center gap-1 border px-1.5 py-0.5 text-[10px] text-muted-foreground uppercase\">\n                    <Lock className=\"size-3\" />\n                    SSO\n                  </span>\n                )}\n              </span>\n              <span className=\"min-w-0\">\n                <span className=\"block truncate font-medium\">{item.name}</span>\n                <span className=\"block truncate font-sans text-xs text-muted-foreground\">{item.slug}.designali.com</span>\n              </span>\n              <span className=\"flex w-full justify-between text-xs text-muted-foreground\">\n                <span>{item.role}</span>\n                <span className=\"tabular-nums\">{item.members} members</span>\n              </span>\n            </button>\n          ))}\n          <button\n            type=\"button\"\n            className=\"flex min-h-[176px] flex-col items-center justify-center gap-2 border border-dashed p-5 text-sm text-muted-foreground hover:bg-muted/30 hover:text-foreground\"\n          >\n            <Plus className=\"size-5\" />\n            Create a new workspace\n          </button>\n        </div>\n\n        {filtered.length === 0 && (\n          <p className=\"mt-4 text-sm text-muted-foreground\">No workspaces match &ldquo;{query}&rdquo;.</p>\n        )}\n\n        <div className=\"mt-8 flex flex-col-reverse gap-3 border-t pt-6 sm:flex-row sm:items-center sm:justify-between\">\n          <a href=\"#\" className=\"text-sm text-muted-foreground hover:text-foreground\">Sign in with a different account</a>\n          <Button size=\"lg\" className=\"w-full sm:w-auto\">\n            Continue to {workspaces.find((item) => item.slug === selected)?.name}\n            <ArrowRight />\n          </Button>\n        </div>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "iframeHeight": "650px"
  },
  "categories": [
    "authentication"
  ]
}