{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "invoice-list",
  "title": "Invoice List Block",
  "description": "An invoice list with status tabs that show their totals, an aging bar that splits what is outstanding by how late it is, checkboxes for sending reminders or marking invoices paid in bulk, overdue badges and a download button that builds a real PDF.",
  "dependencies": [
    "motion",
    "clsx",
    "tailwind-merge"
  ],
  "files": [
    {
      "path": "registry/new-york/invoice-list/invoice-list.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 type InvoiceStatus = \"draft\" | \"open\" | \"paid\" | \"void\";\n\nexport interface Invoice {\n  id: string;\n  number: string;\n  customer: string;\n  email?: string;\n  /** YYYY-MM-DD */\n  issued: string;\n  /** YYYY-MM-DD */\n  due: string;\n  amount: number;\n  status: InvoiceStatus;\n  /** Line items, used for the PDF. */\n  items?: { description: string; quantity: number; price: number }[];\n}\n\nexport interface InvoiceListProps {\n  title?: string;\n  invoices?: Invoice[];\n  currency?: string;\n  /** Today as YYYY-MM-DD, for overdue days. Defaults to 2026-11-01. */\n  today?: string;\n  /** Your business, printed on the PDF. */\n  seller?: string;\n  /** Called when reminders are sent. Return a promise; the toast waits for it. */\n  onRemind?: (ids: string[]) => void | Promise<void>;\n  /** Called when invoices are marked as paid. */\n  onMarkPaid?: (ids: string[]) => void | Promise<void>;\n  /** Replace the built-in PDF with your own download. */\n  onDownload?: (invoice: Invoice) => void;\n  theme?: \"dark\" | \"light\";\n  className?: string;\n}\n\nconst PALETTES = {\n  dark: { bg: \"#0A0A0A\", text: \"#F5F4F1\", muted: \"rgba(245,244,241,0.6)\", faint: \"rgba(245,244,241,0.36)\", card: \"#111111\", border: \"rgba(255,255,255,0.09)\", row: \"rgba(255,255,255,0.03)\", chip: \"rgba(255,255,255,0.05)\", on: \"#F5F4F1\", onText: \"#0A0A0A\", paid: \"#4ADE80\", open: \"#60A5FA\", late: \"#F87171\", draft: \"rgba(245,244,241,0.5)\", warn: \"#FBBF24\", ring: \"rgba(245,244,241,0.6)\" },\n  light: { bg: \"#FAFAF8\", text: \"#0A0A0A\", muted: \"rgba(10,10,10,0.6)\", faint: \"rgba(10,10,10,0.4)\", card: \"#FFFFFF\", border: \"rgba(10,10,10,0.09)\", row: \"rgba(10,10,10,0.025)\", chip: \"rgba(10,10,10,0.04)\", on: \"#0A0A0A\", onText: \"#FAFAF8\", paid: \"#15803D\", open: \"#2563EB\", late: \"#DC2626\", draft: \"rgba(10,10,10,0.5)\", warn: \"#B45309\", ring: \"rgba(10,10,10,0.5)\" },\n};\n\n/* Seats at 79 plus a support line, so the PDF lines add up to the amount exactly. */\nfunction seatLines(amount: number) {\n  const seats = Math.floor(amount / 79);\n  const rest = amount - seats * 79;\n  return [...(seats ? [{ description: \"Team plan seats\", quantity: seats, price: 79 }] : []), ...(rest ? [{ description: \"Onboarding and support\", quantity: 1, price: rest }] : [])];\n}\n\nconst DEFAULT_INVOICES: Invoice[] = [\n  [\"Halcyon\", \"2026-10-28\", \"2026-11-27\", 8640, \"open\"],\n  [\"Northwind\", \"2026-10-15\", \"2026-10-29\", 3160, \"open\"],\n  [\"Kestrel\", \"2026-09-20\", \"2026-10-04\", 12480, \"open\"],\n  [\"Parallel Studio\", \"2026-08-10\", \"2026-08-24\", 2280, \"open\"],\n  [\"Lumen\", \"2026-10-22\", \"2026-11-21\", 2528, \"paid\"],\n  [\"Brightline\", \"2026-10-01\", \"2026-10-31\", 18240, \"paid\"],\n  [\"Fieldnote\", \"2026-10-30\", \"2026-11-29\", 432, \"draft\"],\n  [\"Oakline\", \"2026-10-05\", \"2026-10-19\", 1740, \"paid\"],\n  [\"Copperleaf\", \"2026-10-10\", \"2026-10-24\", 696, \"open\"],\n  [\"Tessellate\", \"2026-09-12\", \"2026-10-12\", 1422, \"paid\"],\n  [\"Morrow Labs\", \"2026-10-31\", \"2026-11-30\", 5400, \"draft\"],\n  [\"Harbor Health\", \"2026-07-15\", \"2026-08-14\", 24600, \"void\"],\n].map(([customer, issued, due, amount, status], i) => ({\n  id: `inv-${i + 1}`,\n  number: `NX-${2026}-${String(318 + i).padStart(4, \"0\")}`,\n  customer: customer as string,\n  email: `billing@${(customer as string).toLowerCase().replace(/[^a-z]/g, \"\")}.com`,\n  issued: issued as string,\n  due: due as string,\n  amount: amount as number,\n  status: status as InvoiceStatus,\n  items: seatLines(amount as number),\n}));\n\nconst MONTHS = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\nconst short = (d: string) => `${Number(d.slice(8, 10))} ${MONTHS[Number(d.slice(5, 7)) - 1]}`;\nconst daysBetween = (a: string, b: string) => Math.round((Date.parse(b) - Date.parse(a)) / 864e5);\n\n/* A tiny one-page PDF so Download works without a library. ASCII text only. */\nfunction invoicePdf(inv: Invoice, seller: string, currency: string) {\n  const cur = currency === \"$\" ? \"USD \" : currency === \"€\" ? \"EUR \" : currency === \"£\" ? \"GBP \" : `${currency} `;\n  const esc = (s: string) => s.replace(/[^\\x20-\\x7E]/g, \"-\").replace(/([()\\\\])/g, \"\\\\$1\");\n  const lines: [number, number, number, string][] = [\n    [56, 780, 22, seller],\n    [56, 750, 11, `Invoice ${inv.number}`],\n    [56, 734, 11, `Issued ${inv.issued}   Due ${inv.due}`],\n    [56, 700, 11, \"Bill to\"],\n    [56, 684, 13, inv.customer],\n    ...(inv.email ? [[56, 668, 11, inv.email] as [number, number, number, string]] : []),\n    [56, 620, 11, \"Description\"],\n    [360, 620, 11, \"Qty\"],\n    [420, 620, 11, \"Price\"],\n    [490, 620, 11, \"Amount\"],\n  ];\n  let y = 596;\n  for (const it of inv.items ?? [{ description: \"Services\", quantity: 1, price: inv.amount }]) {\n    lines.push([56, y, 11, it.description], [360, y, 11, String(it.quantity)], [420, y, 11, it.price.toFixed(2)], [490, y, 11, (it.quantity * it.price).toFixed(2)]);\n    y -= 18;\n  }\n  lines.push([360, y - 20, 13, \"Total\"], [440, y - 20, 13, `${cur}${inv.amount.toFixed(2)}`], [56, 80, 9, inv.status === \"paid\" ? \"Paid in full. Thank you.\" : \"Please pay by bank transfer before the due date.\"]);\n  const content = `0.85 g 56 ${y - 6} 484 0.6 re f 0 g\\n` + lines.map(([x, yy, size, t]) => `BT /F1 ${size} Tf ${x} ${yy} Td (${esc(t)}) Tj ET`).join(\"\\n\");\n  const objs = [\"<< /Type /Catalog /Pages 2 0 R >>\", \"<< /Type /Pages /Kids [3 0 R] /Count 1 >>\", \"<< /Type /Page /Parent 2 0 R /MediaBox [0 0 595 842] /Contents 4 0 R /Resources << /Font << /F1 5 0 R >> >> >>\", `<< /Length ${content.length} >>\\nstream\\n${content}\\nendstream`, \"<< /Type /Font /Subtype /Type1 /BaseFont /Helvetica >>\"];\n  let pdf = \"%PDF-1.4\\n\";\n  const offsets: number[] = [];\n  objs.forEach((o, i) => {\n    offsets.push(pdf.length);\n    pdf += `${i + 1} 0 obj\\n${o}\\nendobj\\n`;\n  });\n  const xref = pdf.length;\n  pdf += `xref\\n0 ${objs.length + 1}\\n0000000000 65535 f \\n${offsets.map((o) => `${String(o).padStart(10, \"0\")} 00000 n \\n`).join(\"\")}trailer\\n<< /Size ${objs.length + 1} /Root 1 0 R >>\\nstartxref\\n${xref}\\n%%EOF`;\n  return new Blob([pdf], { type: \"application/pdf\" });\n}\n\ntype Tab = \"all\" | \"draft\" | \"outstanding\" | \"overdue\" | \"paid\";\n\nexport function InvoiceList({ title = \"Invoices\", invoices, currency = \"$\", today = \"2026-11-01\", seller = \"Nexora GmbH\", onRemind, onMarkPaid, onDownload, theme = \"dark\", className }: InvoiceListProps) {\n  const p = PALETTES[theme];\n  const reduce = !!useReducedMotion();\n  const uid = React.useId();\n  const [list, setList] = React.useState<Invoice[]>(() => invoices ?? DEFAULT_INVOICES);\n  const [tab, setTab] = React.useState<Tab>(\"all\");\n  const [sel, setSel] = React.useState<string[]>([]);\n  const [toast, setToast] = React.useState<string | null>(null);\n  const [busy, setBusy] = React.useState(false);\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\n  const late = (i: Invoice) => (i.status === \"open\" ? Math.max(0, daysBetween(i.due, today)) : 0);\n  const isOverdue = (i: Invoice) => i.status === \"open\" && late(i) > 0;\n  const match: Record<Tab, (i: Invoice) => boolean> = {\n    all: (i) => i.status !== \"void\",\n    draft: (i) => i.status === \"draft\",\n    outstanding: (i) => i.status === \"open\",\n    overdue: isOverdue,\n    paid: (i) => i.status === \"paid\",\n  };\n  const sum = (f: (i: Invoice) => boolean) => list.filter(f).reduce((s, i) => s + i.amount, 0);\n  const rows = list.filter(match[tab]).sort((a, b) => b.issued.localeCompare(a.issued));\n  const money = (n: number) => `${currency}${n.toLocaleString(\"en-US\", { minimumFractionDigits: n % 1 ? 2 : 0, maximumFractionDigits: 2 })}`;\n\n  const open = list.filter((i) => i.status === \"open\");\n  const buckets = [\n    { label: \"Not due\", f: (i: Invoice) => late(i) === 0, color: p.open },\n    { label: \"1–30 days\", f: (i: Invoice) => late(i) >= 1 && late(i) <= 30, color: p.warn },\n    { label: \"31–60 days\", f: (i: Invoice) => late(i) > 30 && late(i) <= 60, color: \"#FB923C\" },\n    { label: \"60+ days\", f: (i: Invoice) => late(i) > 60, color: p.late },\n  ].map((b) => ({ ...b, total: open.filter(b.f).reduce((s, i) => s + i.amount, 0) }));\n  const openTotal = buckets.reduce((s, b) => s + b.total, 0) || 1;\n\n  const visibleIds = rows.map((r) => r.id);\n  const allOn = visibleIds.length > 0 && visibleIds.every((id) => sel.includes(id));\n  const someOn = visibleIds.some((id) => sel.includes(id));\n  const chosen = list.filter((i) => sel.includes(i.id));\n  const remindable = chosen.filter((i) => i.status === \"open\");\n  const payable = chosen.filter((i) => i.status === \"open\" || i.status === \"draft\");\n\n  const say = (t: string) => {\n    setToast(t);\n    if (timer.current) clearTimeout(timer.current);\n    timer.current = setTimeout(() => setToast(null), 2600);\n  };\n  const remind = async (ids: string[]) => {\n    setBusy(true);\n    await onRemind?.(ids);\n    setBusy(false);\n    setSel([]);\n    say(`Reminder sent to ${ids.length} ${ids.length === 1 ? \"customer\" : \"customers\"}`);\n  };\n  const markPaid = async (ids: string[]) => {\n    setBusy(true);\n    await onMarkPaid?.(ids);\n    setBusy(false);\n    setList((l) => l.map((i) => (ids.includes(i.id) ? { ...i, status: \"paid\" } : i)));\n    setSel([]);\n    say(`${ids.length} ${ids.length === 1 ? \"invoice\" : \"invoices\"} marked as paid`);\n  };\n  const download = (inv: Invoice) => {\n    if (onDownload) return onDownload(inv);\n    const url = URL.createObjectURL(invoicePdf(inv, seller, currency));\n    const a = document.createElement(\"a\");\n    a.href = url;\n    a.download = `${inv.number}.pdf`;\n    a.click();\n    setTimeout(() => URL.revokeObjectURL(url), 1000);\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 tabs: { id: Tab; label: string; total: number; n: number }[] = ([\"all\", \"draft\", \"outstanding\", \"overdue\", \"paid\"] as Tab[]).map((id) => ({ id, label: id === \"all\" ? \"All\" : id === \"outstanding\" ? \"Outstanding\" : id[0].toUpperCase() + id.slice(1), total: sum(match[id]), n: list.filter(match[id]).length }));\n  const pill = (i: Invoice) => {\n    if (isOverdue(i)) return { text: `Overdue ${late(i)}d`, color: p.late };\n    if (i.status === \"open\") return { text: daysBetween(today, i.due) === 0 ? \"Due today\" : `Due in ${daysBetween(today, i.due)}d`, color: p.open };\n    if (i.status === \"paid\") return { text: \"Paid\", color: p.paid };\n    if (i.status === \"void\") return { text: \"Void\", color: p.draft };\n    return { text: \"Draft\", color: p.draft };\n  };\n  const box = (on: boolean, mixed = false) => (\n    <span className=\"flex h-4 w-4 items-center justify-center rounded-[5px] border\" style={{ borderColor: on || mixed ? p.on : p.faint, background: on || mixed ? p.on : \"transparent\", color: p.onText }} aria-hidden=\"true\">\n      {on ? (\n        <svg width=\"10\" height=\"10\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.6\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n          <path d=\"m3 8.5 3 3 7-7\" />\n        </svg>\n      ) : mixed ? (\n        <span className=\"h-0.5 w-2 rounded\" style={{ background: p.onText }} />\n      ) : null}\n    </span>\n  );\n\n  return (\n    <section className={cn(\"@container w-full\", className)} style={{ background: p.bg, color: p.text }}>\n      <div className=\"relative 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          <div className=\"flex items-center justify-between gap-3 border-b p-5\" style={{ borderColor: p.border }}>\n            <h2 className=\"m-0 text-[20px] font-semibold tracking-[-0.02em]\">{title}</h2>\n            <span className=\"text-[13px] tabular-nums\" style={{ color: p.faint }}>\n              {money(sum((i) => i.status === \"open\"))} outstanding\n            </span>\n          </div>\n\n          {/* Status tabs with totals */}\n          <div role=\"tablist\" aria-label=\"Invoice status\" className=\"grid grid-cols-2 border-b @[560px]:grid-cols-5\" style={{ borderColor: p.border }}>\n            {tabs.map((t, i) => {\n              const on = tab === t.id;\n              return (\n                <button\n                  key={t.id}\n                  type=\"button\"\n                  role=\"tab\"\n                  aria-selected={on}\n                  aria-controls={`${uid}-panel`}\n                  onClick={() => {\n                    setTab(t.id);\n                    setSel([]);\n                  }}\n                  className={cn(\"relative cursor-pointer border-0 bg-transparent p-4 text-left\", focus, \"focus-visible:ring-inset\", i % 2 === 0 && i < 4 && \"border-r @[560px]:border-r-0\", i < 4 && \"@[560px]:border-r\", i === 4 && \"col-span-2 @[560px]:col-span-1\")}\n                  style={{ borderColor: p.border, color: p.text, ...ring }}\n                >\n                  <span className=\"flex items-center gap-1.5 text-[12.5px]\" style={{ color: on ? p.text : p.muted }}>\n                    {t.id === \"overdue\" && t.n > 0 && <span className=\"h-1.5 w-1.5 rounded-full\" style={{ background: p.late }} aria-hidden=\"true\" />}\n                    {t.label} <span className=\"tabular-nums\" style={{ color: p.faint }}>{t.n}</span>\n                  </span>\n                  <span className=\"mt-1 block text-[18px] font-semibold tracking-[-0.01em] tabular-nums\" style={{ color: on ? p.text : p.muted }}>\n                    {money(t.total)}\n                  </span>\n                  {on && <motion.span layoutId={`${uid}-tab`} className=\"absolute inset-x-0 bottom-0 h-[2px]\" style={{ background: p.on }} transition={reduce ? { duration: 0 } : { type: \"spring\", stiffness: 420, damping: 34 }} />}\n                </button>\n              );\n            })}\n          </div>\n\n          {/* Aging */}\n          <div className=\"border-b px-5 py-4\" style={{ borderColor: p.border }}>\n            <p className=\"m-0 mb-2 text-[12.5px]\" style={{ color: p.faint }}>\n              Outstanding by age\n            </p>\n            <div className=\"flex h-2.5 gap-0.5 overflow-hidden rounded-full\" role=\"img\" aria-label={buckets.map((b) => `${b.label} ${money(b.total)}`).join(\", \")}>\n              {buckets.map((b) =>\n                b.total ? <motion.span key={b.label} className=\"h-full first:rounded-l-full last:rounded-r-full\" style={{ background: b.color }} initial={false} animate={{ width: `${(b.total / openTotal) * 100}%` }} transition={{ duration: reduce ? 0 : 0.5 }} /> : null,\n              )}\n            </div>\n            <ul className=\"m-0 mt-3 flex list-none flex-wrap gap-x-5 gap-y-1.5 p-0 text-[12.5px]\">\n              {buckets.map((b) => (\n                <li key={b.label} className=\"flex items-center gap-1.5\" style={{ color: p.muted }}>\n                  <span className=\"h-2 w-2 rounded-full\" style={{ background: b.color }} aria-hidden=\"true\" />\n                  {b.label} <span className=\"tabular-nums\" style={{ color: p.text }}>{money(b.total)}</span>\n                </li>\n              ))}\n            </ul>\n          </div>\n\n          {/* Bulk bar */}\n          <AnimatePresence initial={false}>\n            {sel.length > 0 && (\n              <motion.div initial={reduce ? false : { height: 0, opacity: 0 }} animate={{ height: \"auto\", opacity: 1 }} exit={reduce ? undefined : { height: 0, opacity: 0 }} className=\"overflow-hidden border-b\" style={{ borderColor: p.border, background: p.row }}>\n                <div className=\"flex flex-wrap items-center justify-between gap-2 px-5 py-2.5\">\n                  <span className=\"text-[13px] tabular-nums\" aria-live=\"polite\">\n                    {sel.length} selected · {money(chosen.reduce((s, i) => s + i.amount, 0))}\n                  </span>\n                  <div className=\"flex flex-wrap gap-1.5\">\n                    <button type=\"button\" disabled={!remindable.length || busy} onClick={() => remind(remindable.map((i) => i.id))} className={cn(\"h-8 cursor-pointer rounded-lg border px-3 text-[13px] disabled:cursor-not-allowed disabled:opacity-40\", focus)} style={{ borderColor: p.border, background: \"transparent\", color: p.text, ...ring }}>\n                      Send reminder{remindable.length ? ` (${remindable.length})` : \"\"}\n                    </button>\n                    <button type=\"button\" disabled={!payable.length || busy} onClick={() => markPaid(payable.map((i) => i.id))} className={cn(\"h-8 cursor-pointer rounded-lg border-0 px-3 text-[13px] font-medium disabled:cursor-not-allowed disabled:opacity-40\", focus)} style={{ background: p.on, color: p.onText, ...ring }}>\n                      Mark as paid{payable.length ? ` (${payable.length})` : \"\"}\n                    </button>\n                    <button type=\"button\" onClick={() => setSel([])} className={cn(\"h-8 cursor-pointer rounded-lg border-0 bg-transparent px-2 text-[13px]\", focus)} style={{ color: p.muted, ...ring }}>\n                      Clear\n                    </button>\n                  </div>\n                </div>\n              </motion.div>\n            )}\n          </AnimatePresence>\n\n          {/* Table */}\n          <div id={`${uid}-panel`} role=\"tabpanel\" className=\"overflow-x-auto\">\n            <table className=\"w-full border-collapse text-left text-[14px]\">\n              <caption className=\"sr-only\">{tabs.find((t) => t.id === tab)?.label} invoices</caption>\n              <thead>\n                <tr className=\"text-[12px]\" style={{ color: p.faint, background: p.row }}>\n                  <th scope=\"col\" className=\"w-10 py-2.5 pl-5\">\n                    <label className=\"flex cursor-pointer items-center\">\n                      <input type=\"checkbox\" checked={allOn} onChange={() => setSel(allOn ? sel.filter((id) => !visibleIds.includes(id)) : Array.from(new Set([...sel, ...visibleIds])))} className=\"peer sr-only\" aria-label=\"Select all shown invoices\" />\n                      <span className=\"rounded-[5px] peer-focus-visible:ring-2\" style={ring}>\n                        {box(allOn, !allOn && someOn)}\n                      </span>\n                    </label>\n                  </th>\n                  {[\"Customer\", \"Invoice\", \"Issued\", \"Status\", \"Amount\", \"\"].map((h, i) => (\n                    <th key={i} scope=\"col\" className={cn(\"px-3 py-2.5 font-medium whitespace-nowrap\", i === 4 && \"text-right\", i === 5 && \"w-20 @[640px]:w-24\", (i === 1 || i === 2 || i === 3) && \"hidden @[640px]:table-cell\")}>\n                      {h}\n                    </th>\n                  ))}\n                </tr>\n              </thead>\n              <tbody>\n                <AnimatePresence initial={false}>\n                  {rows.map((inv) => {\n                    const on = sel.includes(inv.id);\n                    const st = pill(inv);\n                    return (\n                      <motion.tr key={inv.id} layout={!reduce} initial={reduce ? false : { opacity: 0 }} animate={{ opacity: 1 }} exit={reduce ? undefined : { opacity: 0 }} className=\"border-t\" style={{ borderColor: p.border, background: on ? p.row : \"transparent\" }}>\n                        <td className=\"py-3 pl-5\">\n                          <label className=\"flex cursor-pointer items-center\">\n                            <input type=\"checkbox\" checked={on} onChange={() => setSel((v) => (on ? v.filter((x) => x !== inv.id) : [...v, inv.id]))} className=\"peer sr-only\" aria-label={`Select ${inv.number}, ${inv.customer}`} />\n                            <span className=\"rounded-[5px] peer-focus-visible:ring-2\" style={ring}>\n                              {box(on)}\n                            </span>\n                          </label>\n                        </td>\n                        <td className=\"px-3 py-3\">\n                          <span className=\"block font-medium\">{inv.customer}</span>\n                          <span className=\"hidden truncate text-[12px] @[640px]:block\" style={{ color: p.faint }}>\n                            {inv.email}\n                          </span>\n                          <span className=\"block text-[12px] tabular-nums @[640px]:hidden\" style={{ color: p.faint }}>\n                            {inv.number.slice(-4)} · due {short(inv.due)}\n                          </span>\n                          <span className=\"mt-1.5 inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[11.5px] font-medium @[640px]:hidden\" style={{ background: p.chip, color: st.color }}>\n                            <span className=\"h-1.5 w-1.5 rounded-full\" style={{ background: st.color }} aria-hidden=\"true\" />\n                            {st.text}\n                          </span>\n                        </td>\n                        <td className=\"hidden px-3 py-3 font-mono text-[12.5px] whitespace-nowrap @[640px]:table-cell\" style={{ color: p.muted }}>\n                          {inv.number}\n                        </td>\n                        <td className=\"hidden px-3 py-3 whitespace-nowrap tabular-nums @[640px]:table-cell\" style={{ color: p.muted }}>\n                          {short(inv.issued)}\n                          <span className=\"block text-[12px]\" style={{ color: p.faint }}>\n                            due {short(inv.due)}\n                          </span>\n                        </td>\n                        <td className=\"hidden px-3 py-3 whitespace-nowrap @[640px]:table-cell\">\n                          <span className=\"inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[12px] font-medium\" style={{ background: p.chip, color: st.color }}>\n                            <span className=\"h-1.5 w-1.5 rounded-full\" style={{ background: st.color }} aria-hidden=\"true\" />\n                            {st.text}\n                          </span>\n                        </td>\n                        <td className=\"px-2 py-3 text-right font-medium whitespace-nowrap tabular-nums @[640px]:px-3\" style={{ textDecoration: inv.status === \"void\" ? \"line-through\" : undefined }}>\n                          {money(inv.amount)}\n                        </td>\n                        <td className=\"py-3 pr-3 pl-1 @[640px]:pr-4 @[640px]:pl-3\">\n                          <span className=\"flex justify-end gap-0.5 @[640px]:gap-1\">\n                            {isOverdue(inv) && (\n                              <button type=\"button\" disabled={busy} onClick={() => remind([inv.id])} aria-label={`Send a reminder for ${inv.number}`} title=\"Send reminder\" className={cn(\"flex h-8 w-8 cursor-pointer items-center justify-center rounded-lg border-0 bg-transparent\", focus)} style={{ color: p.late, ...ring }}>\n                                <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                                  <path d=\"M6 9a6 6 0 1 1 12 0c0 6 2.5 7.5 2.5 7.5h-17S6 15 6 9Z\" />\n                                  <path d=\"M10 20a2 2 0 0 0 4 0\" />\n                                </svg>\n                              </button>\n                            )}\n                            <button type=\"button\" onClick={() => download(inv)} aria-label={`Download ${inv.number} as PDF`} title=\"Download PDF\" className={cn(\"flex h-8 w-8 cursor-pointer items-center justify-center rounded-lg border-0 bg-transparent\", focus)} style={{ color: p.muted, ...ring }}>\n                              <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                                <path d=\"M12 4v11m0 0-4-4m4 4 4-4M5 20h14\" />\n                              </svg>\n                            </button>\n                          </span>\n                        </td>\n                      </motion.tr>\n                    );\n                  })}\n                </AnimatePresence>\n              </tbody>\n            </table>\n            {rows.length === 0 && (\n              <p className=\"m-0 px-5 py-12 text-center text-[14px]\" style={{ color: p.muted }}>\n                No {tab === \"all\" ? \"\" : tabs.find((t) => t.id === tab)?.label.toLowerCase()} invoices. Nice.\n              </p>\n            )}\n          </div>\n        </div>\n\n        <div className=\"pointer-events-none absolute inset-x-0 bottom-4 flex justify-center px-4\" aria-live=\"polite\">\n          <AnimatePresence>\n            {toast && (\n              <motion.div key={toast} initial={reduce ? false : { opacity: 0, y: 10 }} animate={{ opacity: 1, y: 0 }} exit={reduce ? undefined : { opacity: 0, y: 6 }} className=\"flex items-center gap-2 rounded-full px-4 py-2 text-[13px] font-medium shadow-lg\" style={{ background: p.on, color: p.onText }}>\n                <svg width=\"13\" height=\"13\" viewBox=\"0 0 16 16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                  <path d=\"m3 8.5 3 3 7-7\" />\n                </svg>\n                {toast}\n              </motion.div>\n            )}\n          </AnimatePresence>\n        </div>\n      </div>\n    </section>\n  );\n}\n\nexport default InvoiceList;\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}