{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "table-2",
  "title": "Filterable Invoices Table",
  "description": "Invoices table with a client filter, row selection, bulk mark as paid, payment method and due date columns, status badges, and pagination.",
  "dependencies": [
    "@tanstack/react-table",
    "@base-ui/react"
  ],
  "registryDependencies": [
    "avatar",
    "badge",
    "button",
    "checkbox",
    "dropdown-menu",
    "input",
    "separator",
    "sonner",
    "table"
  ],
  "files": [
    {
      "path": "registry/blocks/table/2/table-block.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport {\n  sortFn_basic,\n  sortFn_datetime,\n  columnVisibilityFeature,\n  type ColumnDef,\n  type ColumnFiltersState,\n  type SortingState,\n  flexRender,\n  tableFeatures,\n  useTable,\n  createSortedRowModel,\n  rowSortingFeature,\n  columnFilteringFeature,\n  createFilteredRowModel,\n  createPaginatedRowModel,\n  rowPaginationFeature,\n  rowSelectionFeature,\n} from \"@tanstack/react-table\"\n\nconst TABLE_FEATURES = tableFeatures({\n  columnVisibilityFeature,\n  rowSortingFeature,\n  columnFilteringFeature,\n  rowPaginationFeature,\n  rowSelectionFeature,\n  sortedRowModel: createSortedRowModel(),\n  filteredRowModel: createFilteredRowModel(),\n  paginatedRowModel: createPaginatedRowModel(),\n  sortFns: {\n    datetime: sortFn_datetime,\n    basic: sortFn_basic,\n  },\n})\nimport { toast } from \"sonner\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\"\nimport { Badge } from \"@/components/ui/badge\"\nimport { Button } from \"@/components/ui/button\"\nimport { Checkbox } from \"@/components/ui/checkbox\"\nimport {\n  DropdownMenu,\n  DropdownMenuContent,\n  DropdownMenuItem,\n  DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\"\nimport { Input } from \"@/components/ui/input\"\nimport { Separator } from \"@/components/ui/separator\"\nimport { Toaster } from \"@/components/ui/sonner\"\nimport {\n  Table,\n  TableBody,\n  TableCell,\n  TableHead,\n  TableHeader,\n  TableRow,\n} from \"@/components/ui/table\"\nimport { IconPlaceholder } from \"@/components/icons/icon-placeholder\"\n\ntype PaymentStatus = \"Paid\" | \"Pending\" | \"Overdue\" | \"Refunded\"\n\ntype Invoice = {\n  id: string\n  client: string\n  initials: string\n  avatar: string\n  project: string\n  amount: number\n  method: string\n  due: string\n  status: PaymentStatus\n}\n\nconst statusConfig: Record<\n  PaymentStatus,\n  { variant: \"default\" | \"secondary\" | \"destructive\" | \"outline\"; dot: string }\n> = {\n  Paid: { variant: \"default\", dot: \"bg-primary-foreground\" },\n  Pending: { variant: \"secondary\", dot: \"bg-muted-foreground\" },\n  Overdue: { variant: \"destructive\", dot: \"bg-destructive\" },\n  Refunded: { variant: \"outline\", dot: \"bg-muted-foreground\" },\n}\n\nconst invoices: Invoice[] = [\n  {\n    id: \"INV-0041\",\n    client: \"Miriam Okafor\",\n    initials: \"MO\",\n    avatar: \"https://i.pravatar.cc/80?img=1\",\n    project: \"Brand Refresh\",\n    amount: 4200,\n    method: \"Wire Transfer\",\n    due: \"2026-06-30\",\n    status: \"Pending\",\n  },\n  {\n    id: \"INV-0040\",\n    client: \"Theo Hartmann\",\n    initials: \"TH\",\n    avatar: \"https://i.pravatar.cc/80?img=12\",\n    project: \"API Integration\",\n    amount: 1850,\n    method: \"Credit Card\",\n    due: \"2026-06-15\",\n    status: \"Paid\",\n  },\n  {\n    id: \"INV-0039\",\n    client: \"Suki Nakamura\",\n    initials: \"SN\",\n    avatar: \"https://i.pravatar.cc/80?img=5\",\n    project: \"Dashboard UI\",\n    amount: 6500,\n    method: \"ACH\",\n    due: \"2026-06-01\",\n    status: \"Overdue\",\n  },\n  {\n    id: \"INV-0038\",\n    client: \"Elias Ferreira\",\n    initials: \"EF\",\n    avatar: \"https://i.pravatar.cc/80?img=3\",\n    project: \"Mobile App MVP\",\n    amount: 9000,\n    method: \"Wire Transfer\",\n    due: \"2026-05-28\",\n    status: \"Paid\",\n  },\n  {\n    id: \"INV-0037\",\n    client: \"Priya Menon\",\n    initials: \"PM\",\n    avatar: \"https://i.pravatar.cc/80?img=9\",\n    project: \"SEO Audit\",\n    amount: 780,\n    method: \"Credit Card\",\n    due: \"2026-05-10\",\n    status: \"Refunded\",\n  },\n  {\n    id: \"INV-0036\",\n    client: \"Dmitri Volkov\",\n    initials: \"DV\",\n    avatar: \"https://i.pravatar.cc/80?img=11\",\n    project: \"Data Pipeline\",\n    amount: 3350,\n    method: \"ACH\",\n    due: \"2026-04-25\",\n    status: \"Paid\",\n  },\n  {\n    id: \"INV-0035\",\n    client: \"Amara Diallo\",\n    initials: \"AD\",\n    avatar: \"https://i.pravatar.cc/80?img=16\",\n    project: \"Design System\",\n    amount: 5400,\n    method: \"Wire Transfer\",\n    due: \"2026-06-22\",\n    status: \"Pending\",\n  },\n  {\n    id: \"INV-0034\",\n    client: \"Noah Bergström\",\n    initials: \"NB\",\n    avatar: \"https://i.pravatar.cc/80?img=14\",\n    project: \"Marketing Site\",\n    amount: 2100,\n    method: \"Credit Card\",\n    due: \"2026-04-18\",\n    status: \"Paid\",\n  },\n  {\n    id: \"INV-0033\",\n    client: \"Lucia Romano\",\n    initials: \"LR\",\n    avatar: \"https://i.pravatar.cc/80?img=20\",\n    project: \"Onboarding Flow\",\n    amount: 3950,\n    method: \"ACH\",\n    due: \"2026-05-31\",\n    status: \"Overdue\",\n  },\n  {\n    id: \"INV-0032\",\n    client: \"Kwame Mensah\",\n    initials: \"KM\",\n    avatar: \"https://i.pravatar.cc/80?img=15\",\n    project: \"Analytics Setup\",\n    amount: 1280,\n    method: \"Credit Card\",\n    due: \"2026-04-09\",\n    status: \"Paid\",\n  },\n  {\n    id: \"INV-0031\",\n    client: \"Ingrid Larsen\",\n    initials: \"IL\",\n    avatar: \"https://i.pravatar.cc/80?img=24\",\n    project: \"Accessibility Pass\",\n    amount: 2650,\n    method: \"Wire Transfer\",\n    due: \"2026-06-12\",\n    status: \"Pending\",\n  },\n  {\n    id: \"INV-0030\",\n    client: \"Mateo Castillo\",\n    initials: \"MC\",\n    avatar: \"https://i.pravatar.cc/80?img=33\",\n    project: \"Checkout Rebuild\",\n    amount: 7300,\n    method: \"ACH\",\n    due: \"2026-03-30\",\n    status: \"Refunded\",\n  },\n  {\n    id: \"INV-0029\",\n    client: \"Yuki Tanaka\",\n    initials: \"YT\",\n    avatar: \"https://i.pravatar.cc/80?img=26\",\n    project: \"Email Templates\",\n    amount: 940,\n    method: \"Credit Card\",\n    due: \"2026-03-22\",\n    status: \"Paid\",\n  },\n  {\n    id: \"INV-0028\",\n    client: \"Fatima Zahra\",\n    initials: \"FZ\",\n    avatar: \"https://i.pravatar.cc/80?img=44\",\n    project: \"Localization\",\n    amount: 4880,\n    method: \"Wire Transfer\",\n    due: \"2026-05-19\",\n    status: \"Overdue\",\n  },\n  {\n    id: \"INV-0027\",\n    client: \"Oscar Lindqvist\",\n    initials: \"OL\",\n    avatar: \"https://i.pravatar.cc/80?img=51\",\n    project: \"CMS Migration\",\n    amount: 6150,\n    method: \"ACH\",\n    due: \"2026-06-05\",\n    status: \"Pending\",\n  },\n  {\n    id: \"INV-0026\",\n    client: \"Hana Novak\",\n    initials: \"HN\",\n    avatar: \"https://i.pravatar.cc/80?img=45\",\n    project: \"Component Audit\",\n    amount: 1720,\n    method: \"Credit Card\",\n    due: \"2026-03-14\",\n    status: \"Paid\",\n  },\n  {\n    id: \"INV-0025\",\n    client: \"Bilal Haddad\",\n    initials: \"BH\",\n    avatar: \"https://i.pravatar.cc/80?img=59\",\n    project: \"Search Revamp\",\n    amount: 5230,\n    method: \"Wire Transfer\",\n    due: \"2026-05-02\",\n    status: \"Overdue\",\n  },\n  {\n    id: \"INV-0024\",\n    client: \"Sienna Walsh\",\n    initials: \"SW\",\n    avatar: \"https://i.pravatar.cc/80?img=32\",\n    project: \"Pricing Page\",\n    amount: 1360,\n    method: \"Credit Card\",\n    due: \"2026-02-26\",\n    status: \"Paid\",\n  },\n]\n\nconst fmt = new Intl.NumberFormat(\"en-US\", {\n  style: \"currency\",\n  currency: \"USD\",\n  minimumFractionDigits: 2,\n})\n\nconst dateFmt = new Intl.DateTimeFormat(\"en-US\", {\n  month: \"short\",\n  day: \"2-digit\",\n  year: \"numeric\",\n})\n\nfunction formatDate(value: string) {\n  const parsed = new Date(value)\n  return Number.isNaN(parsed.getTime()) ? value : dateFmt.format(parsed)\n}\n\nconst outstanding = invoices\n  .filter((i) => i.status === \"Pending\" || i.status === \"Overdue\")\n  .reduce((sum, i) => sum + i.amount, 0)\n\nfunction SortIcon({ sorted }: { sorted: false | \"asc\" | \"desc\" }) {\n  if (sorted === \"asc\")\n    return (\n      <IconPlaceholder\n        lucide=\"ArrowUp\"\n        tabler=\"IconArrowUp\"\n        hugeicons=\"ArrowUpIcon\"\n        phosphor=\"ArrowUp\"\n        remixicon=\"RiArrowUpLine\"\n        className=\"size-3.5\"\n        aria-hidden=\"true\"\n      />\n    )\n  if (sorted === \"desc\")\n    return (\n      <IconPlaceholder\n        lucide=\"ArrowDown\"\n        tabler=\"IconArrowDown\"\n        hugeicons=\"ArrowDownIcon\"\n        phosphor=\"ArrowDown\"\n        remixicon=\"RiArrowDownLine\"\n        className=\"size-3.5\"\n        aria-hidden=\"true\"\n      />\n    )\n  return (\n    <IconPlaceholder\n      lucide=\"ChevronsUpDown\"\n      tabler=\"IconArrowsVertical\"\n      hugeicons=\"ArrowUpDownIcon\"\n      phosphor=\"CaretUpDown\"\n      remixicon=\"RiExpandUpDownLine\"\n      className=\"size-3.5 text-muted-foreground/60\"\n      aria-hidden=\"true\"\n    />\n  )\n}\n\nconst headLabel =\n  \"text-xs font-semibold tracking-wider text-muted-foreground uppercase\"\nconst sortButton =\n  \"-mx-1 inline-flex items-center gap-1 rounded-md px-1 text-xs font-semibold tracking-wider text-muted-foreground uppercase transition-colors hover:text-foreground\"\n\nconst columns: ColumnDef<typeof TABLE_FEATURES, Invoice>[] = [\n  {\n    id: \"select\",\n    enableSorting: false,\n    enableHiding: false,\n    header: ({ table }) => (\n      <Checkbox\n        checked={table.getIsAllPageRowsSelected()}\n        indeterminate={\n          table.getIsSomePageRowsSelected() && !table.getIsAllPageRowsSelected()\n        }\n        onCheckedChange={(checked) =>\n          table.toggleAllPageRowsSelected(checked === true)\n        }\n        aria-label=\"Select all invoices on this page\"\n      />\n    ),\n    cell: ({ row }) => (\n      <Checkbox\n        checked={row.getIsSelected()}\n        onCheckedChange={(checked) => row.toggleSelected(checked === true)}\n        aria-label={`Select ${row.original.id}`}\n      />\n    ),\n  },\n  {\n    accessorKey: \"id\",\n    header: () => <span className={headLabel}>Invoice</span>,\n    cell: ({ row }) => (\n      <span className=\"font-mono text-xs text-muted-foreground\">\n        {row.original.id}\n      </span>\n    ),\n  },\n  {\n    accessorKey: \"client\",\n    filterFn: (row, _id, value: string) =>\n      row.original.client.toLowerCase().includes(value.toLowerCase()),\n    header: ({ column }) => (\n      <button\n        type=\"button\"\n        onClick={() => column.toggleSorting(column.getIsSorted() === \"asc\")}\n        className={sortButton}\n      >\n        Client\n        <SortIcon sorted={column.getIsSorted()} />\n      </button>\n    ),\n    cell: ({ row }) => {\n      const invoice = row.original\n      return (\n        <div className=\"flex min-w-0 items-center gap-2.5\">\n          <Avatar size=\"sm\" className=\"shrink-0 border border-border\">\n            <AvatarImage\n              src={invoice.avatar}\n              alt={invoice.client}\n              className=\"grayscale\"\n            />\n            <AvatarFallback className=\"text-[10px]\">\n              {invoice.initials}\n            </AvatarFallback>\n          </Avatar>\n          <span className=\"truncate text-sm font-medium text-foreground\">\n            {invoice.client}\n          </span>\n        </div>\n      )\n    },\n  },\n  {\n    accessorKey: \"project\",\n    enableSorting: false,\n    header: () => <span className={headLabel}>Project</span>,\n    cell: ({ row }) => (\n      <span className=\"block max-w-[140px] truncate text-sm text-muted-foreground\">\n        {row.original.project}\n      </span>\n    ),\n  },\n  {\n    accessorKey: \"method\",\n    enableSorting: false,\n    header: () => <span className={headLabel}>Method</span>,\n    cell: ({ row }) => (\n      <span className=\"text-sm text-muted-foreground\">\n        {row.original.method}\n      </span>\n    ),\n  },\n  {\n    accessorKey: \"due\",\n    sortFn: \"datetime\",\n    header: ({ column }) => (\n      <button\n        type=\"button\"\n        onClick={() => column.toggleSorting(column.getIsSorted() === \"asc\")}\n        className={sortButton}\n      >\n        Due\n        <SortIcon sorted={column.getIsSorted()} />\n      </button>\n    ),\n    cell: ({ row }) => (\n      <span className=\"text-sm text-muted-foreground tabular-nums\">\n        {formatDate(row.original.due)}\n      </span>\n    ),\n  },\n  {\n    accessorKey: \"status\",\n    enableSorting: false,\n    header: () => <span className={headLabel}>Status</span>,\n    cell: ({ row }) => {\n      const cfg = statusConfig[row.original.status]\n      return (\n        <Badge\n          variant={cfg.variant}\n          className=\"gap-1.5 text-[11px] font-medium\"\n        >\n          <span\n            className={cn(\"inline-block size-1.5 shrink-0\", cfg.dot)}\n            aria-hidden=\"true\"\n          />\n          {row.original.status}\n        </Badge>\n      )\n    },\n  },\n  {\n    accessorKey: \"amount\",\n    sortFn: \"basic\",\n    header: ({ column }) => (\n      <div className=\"flex justify-end\">\n        <button\n          type=\"button\"\n          onClick={() => column.toggleSorting(column.getIsSorted() === \"asc\")}\n          className={sortButton}\n        >\n          Amount\n          <SortIcon sorted={column.getIsSorted()} />\n        </button>\n      </div>\n    ),\n    cell: ({ row }) => (\n      <span className=\"block text-right text-sm font-semibold text-foreground tabular-nums\">\n        {fmt.format(row.original.amount)}\n      </span>\n    ),\n  },\n  {\n    id: \"actions\",\n    enableSorting: false,\n    enableHiding: false,\n    header: () => <span className=\"sr-only\">Actions</span>,\n    cell: ({ row }) => (\n      <div className=\"flex justify-end\">\n        <DropdownMenu>\n          <DropdownMenuTrigger\n            render={\n              <Button\n                variant=\"ghost\"\n                size=\"icon-sm\"\n                aria-label={`Actions for ${row.original.id}`}\n              >\n                <IconPlaceholder\n                  lucide=\"Ellipsis\"\n                  tabler=\"IconDots\"\n                  hugeicons=\"MoreHorizontalIcon\"\n                  phosphor=\"DotsThree\"\n                  remixicon=\"RiMoreLine\"\n                  className=\"size-4\"\n                  aria-hidden=\"true\"\n                />\n              </Button>\n            }\n          />\n          <DropdownMenuContent align=\"end\" className=\"w-36\">\n            <DropdownMenuItem>\n              <IconPlaceholder\n                lucide=\"Eye\"\n                tabler=\"IconEye\"\n                hugeicons=\"EyeIcon\"\n                phosphor=\"Eye\"\n                remixicon=\"RiEyeLine\"\n                aria-hidden=\"true\"\n              />\n              View\n            </DropdownMenuItem>\n            <DropdownMenuItem>\n              <IconPlaceholder\n                lucide=\"Download\"\n                tabler=\"IconDownload\"\n                hugeicons=\"DownloadIcon\"\n                phosphor=\"Download\"\n                remixicon=\"RiDownloadLine\"\n                aria-hidden=\"true\"\n              />\n              Download\n            </DropdownMenuItem>\n          </DropdownMenuContent>\n        </DropdownMenu>\n      </div>\n    ),\n  },\n]\n\nexport default function TableBlock() {\n  const [sorting, setSorting] = React.useState<SortingState>([\n    { id: \"due\", desc: true },\n  ])\n  const [columnFilters, setColumnFilters] = React.useState<ColumnFiltersState>(\n    []\n  )\n  const [rowSelection, setRowSelection] = React.useState({})\n\n  const table = useTable({\n    features: TABLE_FEATURES,\n    data: invoices,\n    columns,\n    getRowId: (row) => row.id,\n    state: { sorting, columnFilters, rowSelection },\n    onSortingChange: setSorting,\n    onColumnFiltersChange: setColumnFilters,\n    onRowSelectionChange: setRowSelection,\n    initialState: { pagination: { pageIndex: 0, pageSize: 7 } },\n  })\n\n  const clientFilter =\n    (table.getColumn(\"client\")?.getFilterValue() as string) ?? \"\"\n  const selectedCount = table.getFilteredSelectedRowModel().rows.length\n  const totalCount = table.getFilteredRowModel().rows.length\n  const pageCount = table.getPageCount()\n\n  return (\n    <section className=\"flex min-h-svh w-full items-start justify-center bg-background px-6 py-12 text-foreground\">\n      <div className=\"w-full max-w-3xl\">\n        <div className=\"flex items-end justify-between gap-4\">\n          <div className=\"flex flex-col gap-1\">\n            <p className=\"text-[10px] font-semibold tracking-widest text-muted-foreground uppercase\">\n              Acme Inc.\n            </p>\n            <h1 className=\"font-heading text-xl font-semibold tracking-tight text-foreground\">\n              Invoices\n            </h1>\n            <p className=\"text-sm text-muted-foreground\">\n              Recent billing activity across all client projects.\n            </p>\n          </div>\n          <div className=\"flex flex-col items-end gap-0.5\">\n            <span className=\"text-[10px] tracking-widest text-muted-foreground uppercase\">\n              Outstanding\n            </span>\n            <span className=\"text-lg font-semibold text-foreground tabular-nums\">\n              {fmt.format(outstanding)}\n            </span>\n          </div>\n        </div>\n\n        <Separator className=\"my-5\" />\n\n        <div className=\"mb-3 flex items-center justify-between gap-3\">\n          <div className=\"relative\">\n            <IconPlaceholder\n              lucide=\"Search\"\n              tabler=\"IconSearch\"\n              hugeicons=\"SearchIcon\"\n              phosphor=\"MagnifyingGlass\"\n              remixicon=\"RiSearchLine\"\n              className=\"pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2 text-muted-foreground\"\n              aria-hidden=\"true\"\n            />\n            <Input\n              type=\"search\"\n              value={clientFilter}\n              onChange={(event) =>\n                table.getColumn(\"client\")?.setFilterValue(event.target.value)\n              }\n              placeholder=\"Filter by client...\"\n              className=\"w-52 pl-8 text-sm\"\n              aria-label=\"Filter invoices by client\"\n            />\n          </div>\n          <p className=\"text-xs text-muted-foreground\">\n            <span className=\"font-medium text-foreground\">{totalCount}</span>{\" \"}\n            {totalCount === 1 ? \"Result\" : \"Results\"}\n          </p>\n        </div>\n\n        {selectedCount > 0 && (\n          <div className=\"mb-3 flex flex-wrap items-center justify-between gap-3 rounded-lg border border-border bg-muted/40 px-4 py-2.5\">\n            <div className=\"flex items-center gap-2\">\n              <span className=\"text-sm font-medium text-foreground tabular-nums\">\n                {selectedCount} Selected\n              </span>\n              <Button\n                variant=\"ghost\"\n                size=\"xs\"\n                className=\"text-muted-foreground hover:text-foreground\"\n                onClick={() => table.resetRowSelection()}\n              >\n                Clear\n              </Button>\n            </div>\n            <div className=\"flex flex-wrap items-center gap-2\">\n              <Button\n                variant=\"outline\"\n                size=\"sm\"\n                onClick={() =>\n                  toast(\"Download started\", {\n                    description: `Preparing ${selectedCount} invoices as PDF.`,\n                  })\n                }\n              >\n                <IconPlaceholder\n                  lucide=\"Download\"\n                  tabler=\"IconDownload\"\n                  hugeicons=\"DownloadIcon\"\n                  phosphor=\"Download\"\n                  remixicon=\"RiDownloadLine\"\n                  className=\"size-3.5\"\n                  aria-hidden=\"true\"\n                />\n                Download\n              </Button>\n              <Button\n                variant=\"outline\"\n                size=\"sm\"\n                onClick={() =>\n                  toast(\"Reminders sent\", {\n                    description: `Payment reminders sent for ${selectedCount} invoices.`,\n                  })\n                }\n              >\n                <IconPlaceholder\n                  lucide=\"Mail\"\n                  tabler=\"IconMail\"\n                  hugeicons=\"MailIcon\"\n                  phosphor=\"Envelope\"\n                  remixicon=\"RiMailLine\"\n                  className=\"size-3.5\"\n                  aria-hidden=\"true\"\n                />\n                Send reminder\n              </Button>\n              <Button\n                variant=\"outline\"\n                size=\"sm\"\n                onClick={() =>\n                  toast(\"Marked as paid\", {\n                    description: `${selectedCount} invoices marked as paid.`,\n                  })\n                }\n              >\n                <IconPlaceholder\n                  lucide=\"Check\"\n                  tabler=\"IconCheck\"\n                  hugeicons=\"Tick02Icon\"\n                  phosphor=\"Check\"\n                  remixicon=\"RiCheckLine\"\n                  className=\"size-3.5\"\n                  aria-hidden=\"true\"\n                />\n                Mark as paid\n              </Button>\n            </div>\n          </div>\n        )}\n\n        <div className=\"overflow-hidden rounded-xl border border-border bg-card\">\n          <Table>\n            <TableHeader>\n              {table.getHeaderGroups().map((headerGroup) => (\n                <TableRow\n                  key={headerGroup.id}\n                  className=\"bg-muted/40 hover:bg-muted/40\"\n                >\n                  {headerGroup.headers.map((header) => {\n                    const id = header.column.id\n                    return (\n                      <TableHead\n                        key={header.id}\n                        className={cn(\n                          \"h-9\",\n                          id === \"select\" && \"w-10 pl-4\",\n                          id === \"project\" && \"hidden sm:table-cell\",\n                          (id === \"method\" || id === \"due\") &&\n                            \"hidden md:table-cell\",\n                          id === \"amount\" && \"text-right\",\n                          id === \"actions\" && \"w-10 pr-4\"\n                        )}\n                      >\n                        {header.isPlaceholder\n                          ? null\n                          : flexRender(\n                              header.column.columnDef.header,\n                              header.getContext()\n                            )}\n                      </TableHead>\n                    )\n                  })}\n                </TableRow>\n              ))}\n            </TableHeader>\n            <TableBody>\n              {table.getRowModel().rows.length ? (\n                table.getRowModel().rows.map((row) => (\n                  <TableRow\n                    key={row.id}\n                    data-state={row.getIsSelected() ? \"selected\" : undefined}\n                    className=\"border-b border-border/60 transition-colors last:border-b-0 hover:bg-muted/30\"\n                  >\n                    {row.getVisibleCells().map((cell) => {\n                      const id = cell.column.id\n                      return (\n                        <TableCell\n                          key={cell.id}\n                          className={cn(\n                            id === \"select\" && \"pl-4\",\n                            id === \"project\" && \"hidden sm:table-cell\",\n                            (id === \"method\" || id === \"due\") &&\n                              \"hidden md:table-cell\",\n                            id === \"actions\" && \"pr-4\"\n                          )}\n                        >\n                          {flexRender(\n                            cell.column.columnDef.cell,\n                            cell.getContext()\n                          )}\n                        </TableCell>\n                      )\n                    })}\n                  </TableRow>\n                ))\n              ) : (\n                <TableRow className=\"hover:bg-transparent\">\n                  <TableCell\n                    colSpan={columns.length}\n                    className=\"h-24 text-center text-sm text-muted-foreground\"\n                  >\n                    No invoices match your filter.\n                  </TableCell>\n                </TableRow>\n              )}\n            </TableBody>\n          </Table>\n\n          <div className=\"flex items-center justify-between gap-4 border-t border-border bg-muted/20 px-4 py-2.5\">\n            <p className=\"text-xs font-semibold tracking-wider text-muted-foreground uppercase\">\n              {totalCount} invoices\n            </p>\n            <div className=\"flex items-center gap-1.5\">\n              <Button\n                variant=\"outline\"\n                size=\"icon\"\n                className=\"size-7\"\n                onClick={() => table.previousPage()}\n                disabled={!table.getCanPreviousPage()}\n                aria-label=\"Previous page\"\n              >\n                <IconPlaceholder\n                  lucide=\"ChevronLeft\"\n                  tabler=\"IconChevronLeft\"\n                  hugeicons=\"ArrowLeft01Icon\"\n                  phosphor=\"CaretLeft\"\n                  remixicon=\"RiArrowLeftSLine\"\n                  className=\"size-3.5\"\n                  aria-hidden=\"true\"\n                />\n              </Button>\n              <span className=\"px-1 text-xs text-muted-foreground tabular-nums\">\n                Page {table.state.pagination.pageIndex + 1} of{\" \"}\n                {Math.max(pageCount, 1)}\n              </span>\n              <Button\n                variant=\"outline\"\n                size=\"icon\"\n                className=\"size-7\"\n                onClick={() => table.nextPage()}\n                disabled={!table.getCanNextPage()}\n                aria-label=\"Next page\"\n              >\n                <IconPlaceholder\n                  lucide=\"ChevronRight\"\n                  tabler=\"IconChevronRight\"\n                  hugeicons=\"ArrowRight01Icon\"\n                  phosphor=\"CaretRight\"\n                  remixicon=\"RiArrowRightSLine\"\n                  className=\"size-3.5\"\n                  aria-hidden=\"true\"\n                />\n              </Button>\n            </div>\n          </div>\n        </div>\n\n        <p className=\"mt-3 text-[11px] text-muted-foreground\">\n          Figures shown in USD. Last updated Jun 17, 2026.\n        </p>\n      </div>\n      <Toaster />\n    </section>\n  )\n}\n",
      "type": "registry:component",
      "target": "components/blocks/table-2.tsx"
    }
  ],
  "meta": {
    "height": "776px",
    "tier": "free"
  },
  "docs": "Requires a `base-*` style in components.json (the `shadcn init` default). Legacy `new-york`/`radix-*` styles install Radix primitives, which reject the `render` prop this block uses.",
  "categories": [
    "table"
  ],
  "type": "registry:block"
}