{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "member-profile-card",
  "title": "Member Profile Card",
  "description": "A team directory with a rich profile card: pick someone from the list and see their status, local time, bio, stats and skills, follow them, message or copy their email, book a free slot for a meeting, and jump to their manager or teammates.",
  "dependencies": [
    "motion",
    "clsx",
    "tailwind-merge"
  ],
  "files": [
    {
      "path": "registry/new-york/member-profile-card/member-profile-card.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 Member {\n  id: string;\n  name: string;\n  title: string;\n  team: string;\n  location: string;\n  time: string;\n  pronouns?: string;\n  email: string;\n  status: \"online\" | \"away\" | \"offline\";\n  color: string;\n  skills: string[];\n  stats: [string, string][];\n  managerId?: string;\n  bio: string;\n}\n\nexport interface MemberProfileCardProps {\n  members?: Member[];\n  defaultId?: string;\n  onMessage?: (member: Member) => void;\n  onBook?: (member: Member, slot: string) => 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: \"#141414\", row: \"rgba(255,255,255,0.04)\", border: \"rgba(255,255,255,0.09)\", chip: \"rgba(255,255,255,0.07)\", on: \"#F5F4F1\", onText: \"#0A0A0A\", green: \"#4ADE80\", amber: \"#FBBF24\", ring: \"rgba(245,244,241,0.6)\" },\n  light: { bg: \"#F4F4F1\", text: \"#0A0A0A\", muted: \"rgba(10,10,10,0.62)\", faint: \"rgba(10,10,10,0.42)\", card: \"#FFFFFF\", row: \"rgba(10,10,10,0.04)\", border: \"rgba(10,10,10,0.1)\", chip: \"rgba(10,10,10,0.06)\", on: \"#0A0A0A\", onText: \"#FAFAF8\", green: \"#15803D\", amber: \"#B45309\", ring: \"rgba(10,10,10,0.5)\" },\n};\nconst STATUS = { online: { label: \"Online\", color: \"#22C55E\" }, away: { label: \"Away\", color: \"#F59E0B\" }, offline: { label: \"Offline\", color: \"#71717A\" } };\nconst MEMBERS: Member[] = [\n  { id: \"lena\", name: \"Lena Brandt\", title: \"Head of Product\", team: \"Product\", location: \"Berlin\", time: \"10:42\", pronouns: \"she/her\", email: \"lena@nexora.io\", status: \"online\", color: \"#60A5FA\", skills: [\"Roadmaps\", \"Pricing\", \"Discovery\", \"SQL\"], stats: [[\"Projects\", \"12\"], [\"Reviews\", \"48\"], [\"Since\", \"2021\"]], bio: \"Leads product strategy and the roadmap. Ask her about pricing, onboarding and what's shipping next quarter.\" },\n  { id: \"mia\", name: \"Mia Okafor\", title: \"Senior Product Designer\", team: \"Design\", location: \"Lagos\", time: \"09:42\", pronouns: \"she/her\", email: \"mia@nexora.io\", status: \"away\", color: \"#A78BFA\", skills: [\"Design systems\", \"Prototyping\", \"Research\"], stats: [[\"Projects\", \"9\"], [\"Reviews\", \"31\"], [\"Since\", \"2022\"]], managerId: \"lena\", bio: \"Owns the design system and onboarding flows. Happy to pair on prototypes and usability tests.\" },\n  { id: \"daniel\", name: \"Daniel Reyes\", title: \"Finance Lead\", team: \"Finance\", location: \"New York\", time: \"04:42\", pronouns: \"he/him\", email: \"daniel@nexora.io\", status: \"offline\", color: \"#F472B6\", skills: [\"Forecasting\", \"Billing\", \"Board reporting\"], stats: [[\"Projects\", \"6\"], [\"Reviews\", \"14\"], [\"Since\", \"2020\"]], managerId: \"lena\", bio: \"Runs forecasting, billing and board reporting. Send him anything about invoices or revenue numbers.\" },\n  { id: \"tomas\", name: \"Tomás Ferreira\", title: \"Frontend Engineer\", team: \"Engineering\", location: \"Lisbon\", time: \"09:42\", pronouns: \"he/him\", email: \"tomas@nexora.io\", status: \"online\", color: \"#34D399\", skills: [\"React\", \"Performance\", \"Accessibility\", \"Motion\"], stats: [[\"Projects\", \"15\"], [\"Reviews\", \"102\"], [\"Since\", \"2023\"]], managerId: \"lena\", bio: \"Builds the dashboard and editor. Cares a lot about performance budgets and keyboard support.\" },\n];\nconst SLOTS = [\"Today 14:00\", \"Today 16:30\", \"Tomorrow 10:00\", \"Tomorrow 15:00\"];\nconst initials = (n: string) =>\n  n\n    .split(\" \")\n    .map((w) => w[0])\n    .join(\"\");\n\nexport function MemberProfileCard({ members = MEMBERS, defaultId = \"mia\", onMessage, onBook, theme = \"dark\", className }: MemberProfileCardProps) {\n  const p = PALETTES[theme];\n  const reduce = !!useReducedMotion();\n  const uid = React.useId();\n  const [id, setId] = React.useState(defaultId);\n  const [following, setFollowing] = React.useState<Record<string, boolean>>({ lena: true });\n  const [booking, setBooking] = React.useState(false);\n  const [booked, setBooked] = React.useState<Record<string, string>>({});\n  const [toast, setToast] = React.useState<string | null>(null);\n\n  const m = members.find((x) => x.id === id) ?? members[0];\n  const manager = members.find((x) => x.id === m.managerId);\n  const reports = members.filter((x) => x.managerId === m.id);\n  const peers = members.filter((x) => x.id !== m.id && x.managerId === m.managerId && m.managerId);\n\n  React.useEffect(() => {\n    if (!toast) return;\n    const t = setTimeout(() => setToast(null), 2000);\n    return () => clearTimeout(t);\n  }, [toast]);\n\n  const pick = (nid: string) => {\n    setId(nid);\n    setBooking(false);\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 avatar = (x: Member, size: number, dot = true) => (\n    <span className=\"relative grid shrink-0 place-items-center rounded-full font-semibold\" style={{ width: size, height: size, fontSize: size * 0.36, background: `${x.color}2e`, color: x.color }}>\n      {initials(x.name)}\n      {dot && <span className=\"absolute right-0 bottom-0 rounded-full border-2\" style={{ width: Math.max(10, size * 0.24), height: Math.max(10, size * 0.24), borderColor: p.card, background: STATUS[x.status].color }} />}\n    </span>\n  );\n  const iconBtn = cn(\"flex h-9 flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-lg border bg-transparent text-[12.5px] font-medium no-underline\", focus);\n  const person = (x: Member, label: string) => (\n    <button type=\"button\" onClick={() => pick(x.id)} className={cn(\"flex w-full cursor-pointer items-center gap-2.5 rounded-lg border-0 bg-transparent px-2 py-1.5 text-left hover:bg-[var(--h)]\", focus)} style={{ color: p.text, [\"--h\" as string]: p.row, ...ring }} aria-label={`${label}: ${x.name}, open profile`}>\n      {avatar(x, 28)}\n      <span className=\"min-w-0\">\n        <span className=\"block truncate text-[12.5px] font-medium\">{x.name}</span>\n        <span className=\"block truncate text-[11.5px]\" style={{ color: p.faint }}>\n          {x.title}\n        </span>\n      </span>\n    </button>\n  );\n\n  return (\n    <section className={cn(\"@container w-full\", className)} style={{ background: p.bg, color: p.text }}>\n      <div className=\"mx-auto grid max-w-4xl grid-cols-[minmax(0,1fr)] gap-5 px-4 py-10 @[760px]:grid-cols-[240px_minmax(0,1fr)] @[640px]:px-6\">\n        {/* Team list */}\n        <nav aria-label=\"Team\">\n          <p className=\"m-0 mb-2 px-2 text-[11.5px] font-medium tracking-[0.04em] uppercase\" style={{ color: p.faint }}>\n            Product team · {members.length}\n          </p>\n          <ul className=\"m-0 flex list-none gap-1 overflow-x-auto p-0 @[760px]:flex-col\" style={{ scrollbarWidth: \"none\" }}>\n            {members.map((x) => (\n              <li key={x.id} className=\"shrink-0\">\n                <button type=\"button\" onClick={() => pick(x.id)} aria-current={x.id === id ? \"true\" : undefined} className={cn(\"relative flex w-full cursor-pointer items-center gap-2.5 rounded-xl border-0 bg-transparent px-2.5 py-2 text-left\", focus)} style={{ color: p.text, ...ring }}>\n                  <span className=\"absolute inset-0 rounded-xl transition-opacity duration-200\" style={{ background: p.row, opacity: x.id === id ? 1 : 0 }} aria-hidden=\"true\" />\n                  <span className=\"relative\">{avatar(x, 34)}</span>\n                  <span className=\"relative hidden min-w-0 @[760px]:block\">\n                    <span className=\"block truncate text-[13px] font-medium\">{x.name}</span>\n                    <span className=\"block truncate text-[12px]\" style={{ color: p.faint }}>\n                      {x.title}\n                    </span>\n                  </span>\n                </button>\n              </li>\n            ))}\n          </ul>\n        </nav>\n\n        {/* Profile */}\n        <motion.article key={m.id} initial={reduce ? false : { opacity: 0, y: 10 }} animate={{ opacity: 1, y: 0 }} transition={{ duration: 0.25 }} className=\"overflow-hidden rounded-2xl border\" style={{ background: p.card, borderColor: p.border }} aria-labelledby={`${uid}-n`}>\n          <div className=\"relative h-24\" style={{ background: `linear-gradient(120deg, ${m.color}66, ${m.color}14 60%, transparent), radial-gradient(circle at 85% 20%, ${m.color}44, transparent 50%)` }} aria-hidden=\"true\" />\n          <div className=\"px-5 pb-5\">\n            <div className=\"-mt-9 flex items-end justify-between gap-3\">\n              <span className=\"rounded-full border-4\" style={{ borderColor: p.card }}>\n                {avatar(m, 72)}\n              </span>\n              <button\n                type=\"button\"\n                aria-pressed={!!following[m.id]}\n                onClick={() => {\n                  setFollowing((f) => ({ ...f, [m.id]: !f[m.id] }));\n                  setToast(following[m.id] ? `Unfollowed ${m.name.split(\" \")[0]}` : `Following ${m.name.split(\" \")[0]}`);\n                }}\n                className={cn(\"h-8 cursor-pointer rounded-full px-3.5 text-[12.5px] font-medium\", focus, following[m.id] ? \"border bg-transparent\" : \"border-0\")}\n                style={{ borderColor: p.border, background: following[m.id] ? \"transparent\" : p.on, color: following[m.id] ? p.text : p.onText, ...ring }}\n              >\n                {following[m.id] ? \"Following\" : \"Follow\"}\n              </button>\n            </div>\n            <h2 id={`${uid}-n`} className=\"m-0 mt-3 text-[20px] font-semibold tracking-[-0.01em]\">\n              {m.name} {m.pronouns && <span className=\"text-[13px] font-normal\" style={{ color: p.faint }}>({m.pronouns})</span>}\n            </h2>\n            <p className=\"m-0 mt-0.5 text-[13.5px]\" style={{ color: p.muted }}>\n              {m.title} · {m.team}\n            </p>\n            <p className=\"m-0 mt-2 flex flex-wrap items-center gap-x-3 gap-y-1 text-[12.5px]\" style={{ color: p.faint }}>\n              <span className=\"flex items-center gap-1.5\">\n                <span className=\"h-2 w-2 rounded-full\" style={{ background: STATUS[m.status].color }} />\n                {STATUS[m.status].label}\n              </span>\n              <span>\n                {m.location} · {m.time} local\n              </span>\n            </p>\n\n            <div className=\"mt-4 flex gap-2\">\n              <button\n                type=\"button\"\n                onClick={() => {\n                  onMessage?.(m);\n                  setToast(`Opened a chat with ${m.name.split(\" \")[0]}`);\n                }}\n                className={iconBtn}\n                style={{ borderColor: p.border, color: p.text, ...ring }}\n              >\n                <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.9\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                  <path d=\"M4 5h16v11H8l-4 4V5Z\" />\n                </svg>\n                Message\n              </button>\n              <button\n                type=\"button\"\n                onClick={() => {\n                  navigator.clipboard?.writeText(m.email).catch(() => {});\n                  setToast(`Copied ${m.email}`);\n                }}\n                className={iconBtn}\n                style={{ borderColor: p.border, color: p.text, ...ring }}\n              >\n                <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.9\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                  <path d=\"M3 7l9 6 9-6M3 6h18v12H3z\" />\n                </svg>\n                Copy email\n              </button>\n              <button type=\"button\" onClick={() => setBooking((b) => !b)} aria-expanded={booking} className={iconBtn} style={{ borderColor: booking ? p.on : p.border, color: p.text, ...ring }}>\n                <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.9\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                  <path d=\"M4 5h16v15H4zM4 10h16M9 3v4M15 3v4\" />\n                </svg>\n                Meet\n              </button>\n            </div>\n\n            <AnimatePresence initial={false}>\n              {booking && (\n                <motion.div key=\"book\" initial={reduce ? false : { opacity: 0, height: 0 }} animate={{ opacity: 1, height: \"auto\" }} exit={reduce ? undefined : { opacity: 0, height: 0 }} className=\"overflow-hidden\">\n                  <div className=\"mt-3 rounded-xl border p-3\" style={{ borderColor: p.border }}>\n                    <p className=\"m-0 text-[12.5px]\" style={{ color: p.muted }}>\n                      {booked[m.id] ? `Booked ${booked[m.id]}. Invite sent.` : `30 minutes with ${m.name.split(\" \")[0]} · times in your zone`}\n                    </p>\n                    <div role=\"radiogroup\" aria-label=\"Free times\" className=\"mt-2 grid grid-cols-2 gap-1.5 @[480px]:grid-cols-4\">\n                      {SLOTS.map((s, i) => {\n                        const on = booked[m.id] === s;\n                        const busy = (m.id.length + i) % 3 === 0;\n                        return (\n                          <button\n                            key={s}\n                            type=\"button\"\n                            role=\"radio\"\n                            aria-checked={on}\n                            disabled={busy}\n                            onClick={() => {\n                              setBooked((b) => ({ ...b, [m.id]: s }));\n                              onBook?.(m, s);\n                              setToast(`Meeting booked · ${s}`);\n                            }}\n                            className={cn(\"h-8 cursor-pointer rounded-lg border px-2 text-[12px] tabular-nums disabled:cursor-not-allowed disabled:line-through disabled:opacity-40\", focus)}\n                            style={{ borderColor: on ? p.green : p.border, background: on ? `${p.green}1f` : \"transparent\", color: on ? p.green : p.text, ...ring }}\n                          >\n                            {on ? `✓ ${s}` : s}\n                          </button>\n                        );\n                      })}\n                    </div>\n                  </div>\n                </motion.div>\n              )}\n            </AnimatePresence>\n\n            <p className=\"m-0 mt-4 text-[13.5px] leading-[1.6]\" style={{ color: p.muted }}>\n              {m.bio}\n            </p>\n            <dl className=\"m-0 mt-4 grid grid-cols-3 gap-2\">\n              {m.stats.map(([k, val]) => (\n                <div key={k} className=\"rounded-xl px-3 py-2.5\" style={{ background: p.row }}>\n                  <dt className=\"text-[11.5px]\" style={{ color: p.faint }}>\n                    {k}\n                  </dt>\n                  <dd className=\"m-0 mt-0.5 text-[16px] font-semibold tabular-nums\">{val}</dd>\n                </div>\n              ))}\n            </dl>\n            <ul className=\"m-0 mt-4 flex list-none flex-wrap gap-1.5 p-0\" aria-label=\"Skills\">\n              {m.skills.map((s) => (\n                <li key={s} className=\"rounded-full px-2.5 py-1 text-[12px]\" style={{ background: p.chip }}>\n                  {s}\n                </li>\n              ))}\n            </ul>\n\n            {(manager || reports.length > 0 || peers.length > 0) && (\n              <div className=\"mt-5 grid grid-cols-1 gap-3 border-t pt-4 @[520px]:grid-cols-2\" style={{ borderColor: p.border }}>\n                {manager && (\n                  <div>\n                    <p className=\"m-0 mb-1 px-2 text-[11.5px]\" style={{ color: p.faint }}>\n                      Reports to\n                    </p>\n                    {person(manager, \"Manager\")}\n                  </div>\n                )}\n                {(reports.length > 0 || peers.length > 0) && (\n                  <div>\n                    <p className=\"m-0 mb-1 px-2 text-[11.5px]\" style={{ color: p.faint }}>\n                      {reports.length ? `Direct reports · ${reports.length}` : \"Works with\"}\n                    </p>\n                    {(reports.length ? reports : peers).slice(0, 3).map((x) => (\n                      <React.Fragment key={x.id}>{person(x, reports.length ? \"Report\" : \"Teammate\")}</React.Fragment>\n                    ))}\n                  </div>\n                )}\n              </div>\n            )}\n          </div>\n        </motion.article>\n      </div>\n      <AnimatePresence>\n        {toast && (\n          <motion.div key={toast} role=\"status\" initial={reduce ? false : { opacity: 0, y: 8 }} animate={{ opacity: 1, y: 0 }} exit={reduce ? undefined : { opacity: 0 }} className=\"mx-auto mb-6 w-fit rounded-full border px-3.5 py-1.5 text-[12.5px]\" style={{ background: p.card, borderColor: p.border }}>\n            {toast}\n          </motion.div>\n        )}\n      </AnimatePresence>\n    </section>\n  );\n}\n\nexport default MemberProfileCard;\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}