{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "mail-shell",
  "title": "Mail inbox shell",
  "description": "A two-pane mail client shell — a searchable message list and a reading pane with toolbar and inline reply.",
  "registryDependencies": [
    "badge",
    "button",
    "input",
    "label",
    "separator",
    "avatar",
    "https://www.quilldesignsystem.com/r/icon.json"
  ],
  "files": [
    {
      "path": "registry/blocks/mail-shell.tsx",
      "content": "import { Badge } from '@/components/ui/badge'\nimport { Button } from '@/components/ui/button'\nimport { Input } from '@/components/ui/input'\nimport { Label } from '@/components/ui/label'\nimport { Separator } from '@/components/ui/separator'\nimport { Avatar, AvatarFallback } from '@/components/ui/avatar'\nimport { Icon } from '@/components/ui/icon'\n\nconst messages = [\n  {\n    from: 'Ada Lovelace',\n    initials: 'AL',\n    subject: 'Scope for the Q3 engagement',\n    preview: 'Revised deliverables are in the shared folder — see the summary…',\n    time: '9:12',\n    unread: true,\n    tag: 'Client',\n  },\n  {\n    from: 'Nadia Okonjo',\n    initials: 'NO',\n    subject: 'Component API revisions',\n    preview: 'I reworked the variant props so they compose cleanly at three scales…',\n    time: 'Yesterday',\n    unread: true,\n    tag: 'Design',\n  },\n  {\n    from: 'Marcus Reed',\n    initials: 'MR',\n    subject: 'Discovery findings, second pass',\n    preview: 'Interview notes are synthesised — summary tomorrow morning…',\n    time: 'Tue',\n    unread: false,\n    tag: 'Research',\n  },\n] as const\n\n/** A two-pane mail client shell — a searchable message list and a reading pane with toolbar and inline reply. */\nexport function MailShell() {\n  return (\n    <div className=\"grid h-frame w-full grid-cols-[var(--size-card-sm)_minmax(0,1fr)] bg-background max-lg:grid-cols-1\">\n      {/* Message list */}\n      <div className=\"flex min-h-0 flex-col border-r border-border\">\n        <div className=\"flex items-center justify-between gap-2 px-4 py-3\">\n          <h2 className=\"font-heading text-base font-medium text-foreground\">Inbox</h2>\n          <Badge variant=\"secondary\">2 unread</Badge>\n        </div>\n        <div className=\"px-4 pb-3\">\n          <Label htmlFor=\"mail-search\" className=\"sr-only\">\n            Search mail\n          </Label>\n          <Input id=\"mail-search\" placeholder=\"Search mail…\" />\n        </div>\n        <Separator />\n        <ul className=\"min-h-0 flex-1 overflow-auto\" aria-label=\"Messages\">\n          {messages.map((m) => (\n            <li key={m.subject}>\n              <button\n                type=\"button\"\n                // Each row fills the scrolling list, which would cut off an outline drawn outside it. The theme's forced-colours rule (Windows High Contrast) draws it inside elements marked this way.\n                data-focus-inset=\"\"\n                className=\"flex w-full flex-col gap-1 border-b border-border px-4 py-3 text-left transition-colors hover:bg-accent focus-visible:outline-none focus-visible:-outline-offset-2 focus-visible:outline-ring aria-[current=true]:bg-muted\"\n                aria-current={m.subject === messages[0].subject}\n              >\n                <div className=\"flex items-baseline justify-between gap-2\">\n                  <span className={`text-sm ${m.unread ? 'font-semibold text-foreground' : 'font-medium text-muted-foreground'}`}>\n                    {m.from}\n                  </span>\n                  <span className=\"shrink-0 text-xs text-muted-foreground\">{m.time}</span>\n                </div>\n                <span className=\"text-sm font-medium text-foreground\">{m.subject}</span>\n                <span className=\"line-clamp-1 text-xs text-muted-foreground\">{m.preview}</span>\n              </button>\n            </li>\n          ))}\n        </ul>\n      </div>\n      {/* Reading pane */}\n      <div className=\"flex min-h-0 flex-col max-lg:hidden\">\n        <div className=\"flex items-center gap-1 border-b border-border px-4 py-2\">\n          <Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"Archive\">\n            <Icon name=\"archive\" />\n          </Button>\n          <Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"Delete\">\n            <Icon name=\"delete\" />\n          </Button>\n          <Separator orientation=\"vertical\" className=\"mx-1 h-4 data-vertical:self-center\" />\n          <Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"Reply\">\n            <Icon name=\"reply\" />\n          </Button>\n          <Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"Forward\">\n            <Icon name=\"forward\" />\n          </Button>\n          <span className=\"ml-auto text-xs text-muted-foreground\">1 of 24</span>\n        </div>\n        <div className=\"flex items-start gap-3 px-6 py-4\">\n          <Avatar>\n            <AvatarFallback>AL</AvatarFallback>\n          </Avatar>\n          <div className=\"flex flex-col gap-0.5\">\n            <span className=\"text-sm font-medium text-foreground\">Ada Lovelace</span>\n            <span className=\"text-xs text-muted-foreground\">to Client · 9:12</span>\n          </div>\n          <Badge variant=\"outline\" className=\"ml-auto\">\n            Client\n          </Badge>\n        </div>\n        <Separator />\n        <div className=\"min-h-0 flex-1 overflow-auto px-6 py-5\">\n          <h3 className=\"font-heading text-lg text-foreground\">Scope for the Q3 engagement</h3>\n          <div className=\"mt-3 flex flex-col gap-3 text-sm leading-reading text-muted-foreground\">\n            <p>\n              Revised deliverables are in the shared folder — the component inventory held up\n              even at the smallest breakpoint, and the dark variants read exactly as we hoped.\n            </p>\n            <p>\n              I&rsquo;ve queued the remaining two flows for tomorrow. If review lands on time we\n              should have the full set ready by Thursday.\n            </p>\n            <p>— A.</p>\n          </div>\n        </div>\n        <Separator />\n        <div className=\"flex items-center gap-2 px-6 py-3\">\n          <Label htmlFor=\"mail-reply\" className=\"sr-only\">\n            Reply\n          </Label>\n          <Input id=\"mail-reply\" placeholder=\"Reply to Ada…\" className=\"flex-1\" />\n          {/* Default size, so Send matches the 32px field beside it. */}\n          <Button>\n            Send <Icon name=\"send\" />\n          </Button>\n        </div>\n      </div>\n    </div>\n  )\n}\n",
      "type": "registry:component",
      "target": "components/quill/mail-shell.tsx"
    }
  ],
  "meta": {
    "intent": [
      "messaging",
      "app-shell"
    ],
    "use_when": "You need a two-pane mail client — searchable list plus a reading pane with toolbar and reply.",
    "not_for": "you need the simpler read-and-select pattern with no search, toolbar, or reply composer → list-detail; the messaging is a live conversational thread, not discrete emails with subjects → chat"
  },
  "docs": "A two-pane mail client shell — a searchable message list and a reading pane with toolbar and inline reply. Do: Hide the reading pane on narrow viewports so the message list gets the full width instead of squeezing both panes. Don't: Force the two-pane layout at phone widths where neither pane has room to be usable. Use list-detail when you need the simpler read-and-select pattern with no search, toolbar, or reply composer. Use chat when the messaging is a live conversational thread, not discrete emails with subjects.",
  "categories": [
    "messaging",
    "app-shell"
  ],
  "type": "registry:block"
}