{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "detail-screen",
  "title": "Detail Screen",
  "description": "A full record page for a customer, project or account: header with status, Follow, a primary action and a More menu, a stats strip, Overview, Activity and Notes tabs, fields you edit in place with Enter or Escape and a Saved tick, plus a sidebar with owner, removable tags and open deals.",
  "dependencies": [
    "motion",
    "clsx",
    "tailwind-merge"
  ],
  "files": [
    {
      "path": "registry/new-york/detail-screen/detail-screen.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 DetailField {\n  key: string;\n  label: string;\n  value: string;\n  editable?: boolean;\n  type?: \"text\" | \"email\" | \"url\" | \"select\";\n  options?: string[];\n}\n\nexport interface DetailEvent {\n  id: string;\n  who: string;\n  what: string;\n  when: string;\n}\n\nexport interface DetailScreenProps {\n  record?: { name: string; subtitle: string; avatar?: string; status: string; since: string };\n  stats?: { label: string; value: string }[];\n  fields?: DetailField[];\n  tags?: string[];\n  owner?: { name: string; avatar?: string };\n  events?: DetailEvent[];\n  onFieldChange?: (key: string, value: 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: \"#121212\", side: \"#0F0F0F\", border: \"rgba(255,255,255,0.09)\", chip: \"rgba(255,255,255,0.06)\", hover: \"rgba(255,255,255,0.035)\", input: \"#0D0D0D\", on: \"#F5F4F1\", onText: \"#0A0A0A\", green: \"#4ADE80\", accent: \"#FB923C\", ring: \"rgba(245,244,241,0.6)\", pop: \"#181818\", shadow: \"0 20px 50px -16px rgba(0,0,0,0.8)\" },\n  light: { bg: \"#FAFAF8\", text: \"#0A0A0A\", muted: \"rgba(10,10,10,0.62)\", faint: \"rgba(10,10,10,0.4)\", card: \"#FFFFFF\", side: \"#FAFAF8\", border: \"rgba(10,10,10,0.09)\", chip: \"rgba(10,10,10,0.05)\", hover: \"rgba(10,10,10,0.025)\", input: \"#FAFAF8\", on: \"#0A0A0A\", onText: \"#FAFAF8\", green: \"#15803D\", accent: \"#EA580C\", ring: \"rgba(10,10,10,0.5)\", pop: \"#FFFFFF\", shadow: \"0 20px 50px -20px rgba(0,0,0,0.25)\" },\n};\nconst TAG_COLORS = [\"#FB923C\", \"#60A5FA\", \"#A78BFA\", \"#4ADE80\", \"#F472B6\", \"#FBBF24\"];\n\nconst DEFAULT_RECORD = { name: \"Halcyon Studio\", subtitle: \"Design agency · Berlin, Germany\", avatar: undefined, status: \"Customer\", since: \"Customer since Mar 2023\" };\nconst DEFAULT_STATS = [\n  { label: \"Lifetime value\", value: \"$184,200\" },\n  { label: \"Open deals\", value: \"3\" },\n  { label: \"Seats\", value: \"42\" },\n  { label: \"Health\", value: \"92 / 100\" },\n];\nconst DEFAULT_FIELDS: DetailField[] = [\n  { key: \"contact\", label: \"Main contact\", value: \"Priya Nair\", editable: true },\n  { key: \"email\", label: \"Email\", value: \"priya@halcyon.app\", editable: true, type: \"email\" },\n  { key: \"website\", label: \"Website\", value: \"halcyon.app\", editable: true, type: \"url\" },\n  { key: \"plan\", label: \"Plan\", value: \"Enterprise\", editable: true, type: \"select\", options: [\"Team\", \"Business\", \"Enterprise\"] },\n  { key: \"industry\", label: \"Industry\", value: \"Design and creative\", editable: true },\n  { key: \"size\", label: \"Company size\", value: \"51–200 people\", editable: true, type: \"select\", options: [\"1–10 people\", \"11–50 people\", \"51–200 people\", \"200+ people\"] },\n  { key: \"id\", label: \"Account ID\", value: \"acc_7Q2XH9\" },\n  { key: \"renewal\", label: \"Renewal\", value: \"14 Mar 2027\" },\n];\nconst DEFAULT_EVENTS: DetailEvent[] = [\n  { id: \"e1\", who: \"Mara Okafor\", what: \"upgraded the plan to Enterprise\", when: \"2 days ago\" },\n  { id: \"e2\", who: \"Priya Nair\", what: \"added 6 seats\", when: \"Last week\" },\n  { id: \"e3\", who: \"Daniel Reyes\", what: \"logged a call: renewal looks safe\", when: \"Oct 18\" },\n  { id: \"e4\", who: \"System\", what: \"sent invoice NX-2026-0298\", when: \"Oct 1\" },\n];\n\ntype Tab = \"overview\" | \"activity\" | \"notes\";\n\nexport function DetailScreen({ record = DEFAULT_RECORD, stats = DEFAULT_STATS, fields: fieldsProp = DEFAULT_FIELDS, tags: tagsProp = [\"Enterprise\", \"Design\", \"Priority\"], owner = { name: \"Mara Okafor\", avatar: \"/demo/44.webp\" }, events = DEFAULT_EVENTS, onFieldChange, theme = \"dark\", className }: DetailScreenProps) {\n  const p = PALETTES[theme];\n  const reduce = !!useReducedMotion();\n  const uid = React.useId();\n  const [fields, setFields] = React.useState(fieldsProp);\n  const [editing, setEditing] = React.useState<string | null>(null);\n  const [draft, setDraft] = React.useState(\"\");\n  const [saved, setSaved] = React.useState<string | null>(null);\n  const [tab, setTab] = React.useState<Tab>(\"overview\");\n  const [tags, setTags] = React.useState(tagsProp);\n  const [tagDraft, setTagDraft] = React.useState(\"\");\n  const [addingTag, setAddingTag] = React.useState(false);\n  const [notes, setNotes] = React.useState<{ id: string; text: string; when: string }[]>([{ id: \"n0\", text: \"Wants SSO for their contractors before renewal.\", when: \"Oct 22\" }]);\n  const [noteDraft, setNoteDraft] = React.useState(\"\");\n  const [more, setMore] = React.useState(false);\n  const [following, setFollowing] = React.useState(false);\n  const seq = React.useRef(0);\n  const timer = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n  React.useEffect(\n    () => () => {\n      if (timer.current) clearTimeout(timer.current);\n    },\n    [],\n  );\n  React.useEffect(() => {\n    if (!more) return;\n    const down = (e: MouseEvent) => !(e.target as HTMLElement).closest(\"[data-more]\") && setMore(false);\n    const key = (e: KeyboardEvent) => e.key === \"Escape\" && setMore(false);\n    document.addEventListener(\"mousedown\", down);\n    document.addEventListener(\"keydown\", key);\n    return () => {\n      document.removeEventListener(\"mousedown\", down);\n      document.removeEventListener(\"keydown\", key);\n    };\n  }, [more]);\n\n  const startEdit = (f: DetailField) => {\n    setEditing(f.key);\n    setDraft(f.value);\n  };\n  const commit = (f: DetailField) => {\n    const v = draft.trim();\n    setEditing(null);\n    if (!v || v === f.value) return;\n    setFields((fs) => fs.map((x) => (x.key === f.key ? { ...x, value: v } : x)));\n    onFieldChange?.(f.key, v);\n    setSaved(f.key);\n    if (timer.current) clearTimeout(timer.current);\n    timer.current = setTimeout(() => setSaved(null), 1600);\n  };\n  const focusInput = React.useCallback((el: HTMLInputElement | HTMLSelectElement | null) => {\n    if (!el) return;\n    el.focus();\n    if (el instanceof HTMLInputElement) el.select();\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 tagColor = (t: string) => TAG_COLORS[[...t].reduce((s, c) => s + c.charCodeAt(0), 0) % TAG_COLORS.length];\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-6xl 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          {/* Header */}\n          <div className=\"border-b p-5 @[640px]:p-6\" style={{ borderColor: p.border }}>\n            <div className=\"flex flex-wrap items-start justify-between gap-4\">\n              <div className=\"flex min-w-0 items-center gap-4\">\n                <span className=\"flex h-14 w-14 shrink-0 items-center justify-center rounded-2xl text-[22px] font-bold\" style={{ background: \"linear-gradient(135deg,#FB923C,#F472B6)\", color: \"#0A0A0A\" }} aria-hidden=\"true\">\n                  {record.name[0]}\n                </span>\n                <div className=\"min-w-0\">\n                  <h1 className=\"m-0 flex flex-wrap items-center gap-2 text-[22px] font-semibold tracking-[-0.02em]\">\n                    {record.name}\n                    <span className=\"rounded-full px-2 py-0.5 text-[11.5px] font-semibold\" style={{ background: p.chip, color: p.green }}>\n                      {record.status}\n                    </span>\n                  </h1>\n                  <p className=\"m-0 mt-0.5 text-[13.5px]\" style={{ color: p.muted }}>\n                    {record.subtitle}\n                  </p>\n                  <p className=\"m-0 mt-0.5 text-[12px]\" style={{ color: p.faint }}>\n                    {record.since}\n                  </p>\n                </div>\n              </div>\n              <div className=\"flex items-center gap-2\">\n                <button type=\"button\" aria-pressed={following} onClick={() => setFollowing((f) => !f)} className={cn(\"h-9 cursor-pointer rounded-lg border bg-transparent px-3.5 text-[13px]\", focus)} style={{ borderColor: p.border, color: following ? p.green : p.text, ...ring }}>\n                  {following ? \"✓ Following\" : \"Follow\"}\n                </button>\n                <button type=\"button\" className={cn(\"h-9 cursor-pointer rounded-lg border-0 px-3.5 text-[13px] font-medium\", focus)} style={{ background: p.on, color: p.onText, ...ring }}>\n                  New deal\n                </button>\n                <div className=\"relative\" data-more>\n                  <button type=\"button\" aria-label=\"More actions\" aria-haspopup=\"menu\" aria-expanded={more} onClick={() => setMore((m) => !m)} className={cn(\"flex h-9 w-9 cursor-pointer items-center justify-center rounded-lg border bg-transparent\", focus)} style={{ borderColor: p.border, color: p.muted, ...ring }}>\n                    <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\">\n                      <circle cx=\"5\" cy=\"12\" r=\"1.8\" />\n                      <circle cx=\"12\" cy=\"12\" r=\"1.8\" />\n                      <circle cx=\"19\" cy=\"12\" r=\"1.8\" />\n                    </svg>\n                  </button>\n                  <AnimatePresence>\n                    {more && (\n                      <motion.div initial={reduce ? false : { opacity: 0, y: -4 }} animate={{ opacity: 1, y: 0 }} exit={reduce ? undefined : { opacity: 0, y: -4 }} transition={{ duration: 0.14 }} className=\"absolute right-0 z-20 mt-1.5 w-48 rounded-xl border p-1.5\" style={{ background: p.pop, borderColor: p.border, boxShadow: p.shadow }} role=\"menu\">\n                        {[\"Merge with…\", \"Export as CSV\", \"Copy account ID\", \"Archive\"].map((l) => (\n                          <button\n                            key={l}\n                            type=\"button\"\n                            role=\"menuitem\"\n                            onClick={() => {\n                              if (l === \"Copy account ID\") navigator.clipboard?.writeText(fields.find((f) => f.key === \"id\")?.value ?? \"\").catch(() => {});\n                              setMore(false);\n                            }}\n                            className={cn(\"flex w-full cursor-pointer rounded-lg border-0 bg-transparent px-2.5 py-1.5 text-left text-[13px] hover:bg-[var(--ds-h)]\", focus)}\n                            style={{ color: l === \"Archive\" ? \"#F87171\" : p.text, [\"--ds-h\" as string]: p.hover, ...ring }}\n                          >\n                            {l}\n                          </button>\n                        ))}\n                      </motion.div>\n                    )}\n                  </AnimatePresence>\n                </div>\n              </div>\n            </div>\n            <dl className=\"m-0 mt-5 grid grid-cols-2 gap-3 @[720px]:grid-cols-4\">\n              {stats.map((s) => (\n                <div key={s.label} className=\"rounded-xl px-3.5 py-3\" style={{ background: p.chip }}>\n                  <dt className=\"text-[12px]\" style={{ color: p.faint }}>\n                    {s.label}\n                  </dt>\n                  <dd className=\"m-0 mt-0.5 text-[17px] font-semibold tabular-nums\">{s.value}</dd>\n                </div>\n              ))}\n            </dl>\n            <div role=\"tablist\" aria-label=\"Record sections\" className=\"mt-5 -mb-5 flex gap-1 @[640px]:-mb-6\">\n              {(\n                [\n                  [\"overview\", \"Overview\"],\n                  [\"activity\", \"Activity\"],\n                  [\"notes\", `Notes ${notes.length}`],\n                ] as [Tab, string][]\n              ).map(([id, l]) => (\n                <button key={id} type=\"button\" role=\"tab\" aria-selected={tab === id} aria-controls={`${uid}-panel`} onClick={() => setTab(id)} className={cn(\"relative cursor-pointer border-0 bg-transparent px-3 pt-1 pb-3 text-[13px]\", focus)} style={{ color: tab === id ? p.text : p.muted, ...ring }}>\n                  {l}\n                  {tab === id && <motion.span layoutId={`${uid}-tab`} className=\"absolute inset-x-2 bottom-0 h-[2px] rounded-full\" style={{ background: p.on }} transition={reduce ? { duration: 0 } : { type: \"spring\", stiffness: 500, damping: 38 }} />}\n                </button>\n              ))}\n            </div>\n          </div>\n\n          <div className=\"grid @[880px]:grid-cols-[1fr_300px]\">\n            <div id={`${uid}-panel`} role=\"tabpanel\" className=\"min-w-0 p-5 @[640px]:p-6\">\n              <AnimatePresence mode=\"wait\" initial={false}>\n                <motion.div key={tab} initial={reduce ? false : { opacity: 0, y: 6 }} animate={{ opacity: 1, y: 0 }} exit={reduce ? undefined : { opacity: 0 }} transition={{ duration: 0.16 }}>\n                  {tab === \"overview\" && (\n                    <>\n                      <div className=\"flex items-center justify-between\">\n                        <h2 className=\"m-0 text-[14px] font-semibold\">Details</h2>\n                        <span className=\"text-[12px]\" style={{ color: p.faint }}>\n                          Click a value to edit\n                        </span>\n                      </div>\n                      <dl className=\"m-0 mt-3 grid @[560px]:grid-cols-2\">\n                        {fields.map((f) => (\n                          <div key={f.key} className=\"border-t py-3 @[560px]:pr-4\" style={{ borderColor: p.border }}>\n                            <dt className=\"flex items-center gap-2 text-[12px]\" style={{ color: p.faint }}>\n                              {f.label}\n                              <AnimatePresence>\n                                {saved === f.key && (\n                                  <motion.span initial={reduce ? false : { opacity: 0, x: -4 }} animate={{ opacity: 1, x: 0 }} exit={reduce ? undefined : { opacity: 0 }} style={{ color: p.green }} role=\"status\">\n                                    Saved\n                                  </motion.span>\n                                )}\n                              </AnimatePresence>\n                            </dt>\n                            <dd className=\"m-0 mt-1\">\n                              {editing === f.key ? (\n                                f.type === \"select\" ? (\n                                  <select\n                                    ref={focusInput}\n                                    value={draft}\n                                    aria-label={f.label}\n                                    onChange={(e) => setDraft(e.target.value)}\n                                    onBlur={() => commit(f)}\n                                    onKeyDown={(e) => {\n                                      if (e.key === \"Enter\") commit(f);\n                                      if (e.key === \"Escape\") setEditing(null);\n                                    }}\n                                    className={cn(\"h-8 w-full rounded-md border px-2 text-[13.5px]\", focus)}\n                                    style={{ borderColor: p.ring, background: p.input, color: p.text, ...ring }}\n                                  >\n                                    {f.options?.map((o) => (\n                                      <option key={o}>{o}</option>\n                                    ))}\n                                  </select>\n                                ) : (\n                                  <input\n                                    ref={focusInput}\n                                    type={f.type === \"email\" ? \"email\" : \"text\"}\n                                    value={draft}\n                                    aria-label={f.label}\n                                    onChange={(e) => setDraft(e.target.value)}\n                                    onBlur={() => commit(f)}\n                                    onKeyDown={(e) => {\n                                      if (e.key === \"Enter\") commit(f);\n                                      if (e.key === \"Escape\") {\n                                        e.preventDefault();\n                                        setEditing(null);\n                                      }\n                                    }}\n                                    className={cn(\"h-8 w-full rounded-md border px-2 text-[13.5px]\", focus)}\n                                    style={{ borderColor: p.ring, background: p.input, color: p.text, ...ring }}\n                                  />\n                                )\n                              ) : f.editable ? (\n                                <button type=\"button\" onClick={() => startEdit(f)} aria-label={`${f.label}: ${f.value}. Edit`} className={cn(\"group -mx-1.5 flex w-full cursor-text items-center justify-between gap-2 rounded-md border-0 bg-transparent px-1.5 py-1 text-left text-[13.5px] hover:bg-[var(--ds-h)]\", focus)} style={{ color: f.type === \"url\" || f.type === \"email\" ? p.accent : p.text, [\"--ds-h\" as string]: p.hover, ...ring }}>\n                                  <span className=\"truncate\">{f.value}</span>\n                                  <svg className=\"shrink-0 opacity-0 transition-opacity group-hover:opacity-100\" width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke={p.faint} strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                                    <path d=\"M4 20h4L19 9a2.8 2.8 0 0 0-4-4L4 16v4Z\" />\n                                  </svg>\n                                </button>\n                              ) : (\n                                <span className=\"block py-1 font-mono text-[13px]\" style={{ color: p.muted }}>\n                                  {f.value}\n                                </span>\n                              )}\n                            </dd>\n                          </div>\n                        ))}\n                      </dl>\n                    </>\n                  )}\n                  {tab === \"activity\" && (\n                    <ol className=\"m-0 list-none p-0\">\n                      {events.map((e, i) => (\n                        <motion.li key={e.id} initial={reduce ? false : { opacity: 0, x: -6 }} animate={{ opacity: 1, x: 0 }} transition={{ delay: reduce ? 0 : i * 0.05 }} className=\"relative flex gap-3 pb-5\">\n                          {i < events.length - 1 && <span className=\"absolute top-6 bottom-0 left-[11px] w-px\" style={{ background: p.border }} aria-hidden=\"true\" />}\n                          <span className=\"flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-[10px] font-semibold\" style={{ background: p.chip, color: p.muted }} aria-hidden=\"true\">\n                            {e.who[0]}\n                          </span>\n                          <p className=\"m-0 text-[13.5px]\" style={{ color: p.muted }}>\n                            <span className=\"font-medium\" style={{ color: p.text }}>\n                              {e.who}\n                            </span>{\" \"}\n                            {e.what}\n                            <span className=\"block text-[12px]\" style={{ color: p.faint }}>\n                              {e.when}\n                            </span>\n                          </p>\n                        </motion.li>\n                      ))}\n                    </ol>\n                  )}\n                  {tab === \"notes\" && (\n                    <div>\n                      <form\n                        onSubmit={(e) => {\n                          e.preventDefault();\n                          if (!noteDraft.trim()) return;\n                          seq.current += 1;\n                          setNotes((n) => [{ id: `n${seq.current}`, text: noteDraft.trim(), when: \"Just now\" }, ...n]);\n                          setNoteDraft(\"\");\n                        }}\n                      >\n                        <label htmlFor={`${uid}-note`} className=\"sr-only\">\n                          Add a note\n                        </label>\n                        <textarea id={`${uid}-note`} rows={3} value={noteDraft} onChange={(e) => setNoteDraft(e.target.value)} placeholder=\"Add a note for your team…\" className={cn(\"w-full resize-none rounded-xl border p-3 text-[13.5px]\", focus)} style={{ borderColor: p.border, background: p.input, color: p.text, ...ring }} />\n                        <div className=\"mt-2 flex justify-end\">\n                          <button type=\"submit\" disabled={!noteDraft.trim()} className={cn(\"h-8 cursor-pointer rounded-lg border-0 px-3.5 text-[12.5px] font-medium disabled:cursor-not-allowed disabled:opacity-40\", focus)} style={{ background: p.on, color: p.onText, ...ring }}>\n                            Save note\n                          </button>\n                        </div>\n                      </form>\n                      <ul className=\"m-0 mt-3 flex list-none flex-col gap-2 p-0\">\n                        <AnimatePresence initial={false}>\n                          {notes.map((n) => (\n                            <motion.li key={n.id} layout={!reduce} initial={reduce ? false : { opacity: 0, y: -6 }} animate={{ opacity: 1, y: 0 }} className=\"rounded-xl border p-3.5\" style={{ borderColor: p.border }}>\n                              <p className=\"m-0 text-[13.5px] leading-[1.55]\">{n.text}</p>\n                              <p className=\"m-0 mt-1.5 text-[11.5px]\" style={{ color: p.faint }}>\n                                {owner.name} · {n.when}\n                              </p>\n                            </motion.li>\n                          ))}\n                        </AnimatePresence>\n                      </ul>\n                    </div>\n                  )}\n                </motion.div>\n              </AnimatePresence>\n            </div>\n\n            {/* Sidebar */}\n            <aside className=\"border-t p-5 @[640px]:p-6 @[880px]:border-t-0 @[880px]:border-l\" style={{ borderColor: p.border, background: p.side }} aria-label=\"About this record\">\n              <h3 className=\"m-0 text-[12px] font-medium tracking-wide uppercase\" style={{ color: p.faint }}>\n                Owner\n              </h3>\n              <div className=\"mt-2 flex items-center gap-2.5\">\n                {owner.avatar ? (\n                  // eslint-disable-next-line @next/next/no-img-element\n                  <img src={owner.avatar} alt=\"\" className=\"h-8 w-8 rounded-full object-cover\" />\n                ) : (\n                  <span className=\"flex h-8 w-8 items-center justify-center rounded-full text-[12px] font-semibold\" style={{ background: p.chip }}>\n                    {owner.name[0]}\n                  </span>\n                )}\n                <span className=\"text-[13.5px] font-medium\">{owner.name}</span>\n              </div>\n\n              <h3 className=\"m-0 mt-6 text-[12px] font-medium tracking-wide uppercase\" style={{ color: p.faint }}>\n                Tags\n              </h3>\n              <ul className=\"m-0 mt-2 flex list-none flex-wrap gap-1.5 p-0\">\n                <AnimatePresence initial={false} mode=\"popLayout\">\n                  {tags.map((t) => (\n                    <motion.li key={t} layout={!reduce} initial={reduce ? false : { opacity: 0, scale: 0.8 }} animate={{ opacity: 1, scale: 1 }} exit={reduce ? undefined : { opacity: 0, scale: 0.8 }}>\n                      <span className=\"flex h-7 items-center gap-1.5 rounded-full border pr-1 pl-2.5 text-[12.5px]\" style={{ borderColor: p.border }}>\n                        <span className=\"h-1.5 w-1.5 rounded-full\" style={{ background: tagColor(t) }} aria-hidden=\"true\" />\n                        {t}\n                        <button type=\"button\" aria-label={`Remove tag ${t}`} onClick={() => setTags((x) => x.filter((y) => y !== t))} className={cn(\"flex h-5 w-5 cursor-pointer items-center justify-center rounded-full border-0 bg-transparent text-[13px]\", focus)} style={{ color: p.faint, ...ring }}>\n                          ×\n                        </button>\n                      </span>\n                    </motion.li>\n                  ))}\n                  <motion.li key=\"__add\" layout={!reduce}>\n                    {addingTag ? (\n                      <form\n                        onSubmit={(e) => {\n                          e.preventDefault();\n                          const t = tagDraft.trim();\n                          if (t && !tags.includes(t)) setTags((x) => [...x, t]);\n                          setTagDraft(\"\");\n                          setAddingTag(false);\n                        }}\n                      >\n                        <input ref={focusInput} value={tagDraft} onChange={(e) => setTagDraft(e.target.value)} onBlur={() => setAddingTag(false)} onKeyDown={(e) => e.key === \"Escape\" && setAddingTag(false)} aria-label=\"New tag\" placeholder=\"Tag name\" className={cn(\"h-7 w-28 rounded-full border px-2.5 text-[12.5px]\", focus)} style={{ borderColor: p.ring, background: p.input, color: p.text, ...ring }} />\n                      </form>\n                    ) : (\n                      <button type=\"button\" onClick={() => setAddingTag(true)} className={cn(\"h-7 cursor-pointer rounded-full border border-dashed bg-transparent px-2.5 text-[12.5px]\", focus)} style={{ borderColor: p.faint, color: p.muted, ...ring }}>\n                        + Add tag\n                      </button>\n                    )}\n                  </motion.li>\n                </AnimatePresence>\n              </ul>\n\n              <h3 className=\"m-0 mt-6 text-[12px] font-medium tracking-wide uppercase\" style={{ color: p.faint }}>\n                Open deals\n              </h3>\n              <ul className=\"m-0 mt-2 flex list-none flex-col gap-1.5 p-0\">\n                {[\n                  [\"Expansion: 20 seats\", \"$9,600\", \"Proposal\"],\n                  [\"SSO add-on\", \"$4,800\", \"Negotiation\"],\n                  [\"Training package\", \"$2,400\", \"Qualified\"],\n                ].map(([n, v, s]) => (\n                  <li key={n} className=\"rounded-lg border px-3 py-2\" style={{ borderColor: p.border }}>\n                    <span className=\"flex items-center justify-between gap-2 text-[13px]\">\n                      <span className=\"truncate\">{n}</span>\n                      <span className=\"font-medium tabular-nums\">{v}</span>\n                    </span>\n                    <span className=\"text-[11.5px]\" style={{ color: p.faint }}>\n                      {s}\n                    </span>\n                  </li>\n                ))}\n              </ul>\n            </aside>\n          </div>\n        </div>\n      </div>\n    </section>\n  );\n}\n\nexport default DetailScreen;\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}