{
  "$schema": "https://blode.co/ui/schema/registry-item.json",
  "name": "table",
  "title": "Table",
  "author": "Matthew Blode",
  "description": "A responsive table for displaying structured data in rows and columns.",
  "files": [
    {
      "path": "ui/table.tsx",
      "content": "\"use client\";\n\nimport type * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Table = ({ className, ...props }: React.ComponentProps<\"table\">) => (\n  <div className=\"relative w-full overflow-x-auto\" data-slot=\"table-container\">\n    <table\n      className={cn(\"w-full caption-bottom text-sm\", className)}\n      data-slot=\"table\"\n      {...props}\n    />\n  </div>\n);\n\nconst TableHeader = ({ className, ...props }: React.ComponentProps<\"thead\">) => (\n  <thead className={cn(\"[&_tr]:border-b\", className)} data-slot=\"table-header\" {...props} />\n);\n\nconst TableBody = ({ className, ...props }: React.ComponentProps<\"tbody\">) => (\n  <tbody\n    className={cn(\"[&_tr:last-child]:border-0\", className)}\n    data-slot=\"table-body\"\n    {...props}\n  />\n);\n\nconst TableFooter = ({ className, ...props }: React.ComponentProps<\"tfoot\">) => (\n  <tfoot\n    className={cn(\"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0\", className)}\n    data-slot=\"table-footer\"\n    {...props}\n  />\n);\n\nconst TableRow = ({ className, ...props }: React.ComponentProps<\"tr\">) => (\n  <tr\n    className={cn(\n      \"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted\",\n      className,\n    )}\n    data-slot=\"table-row\"\n    {...props}\n  />\n);\n\nconst TableHead = ({ className, ...props }: React.ComponentProps<\"th\">) => (\n  <th\n    className={cn(\n      \"h-10 whitespace-nowrap px-2 text-left align-middle font-medium text-foreground [&:has([role=checkbox])]:min-w-[56px] [&:has([role=checkbox])]:pr-0 [&:has([role=checkbox])]:text-center [&>[role=checkbox]]:mx-auto\",\n      className,\n    )}\n    data-slot=\"table-head\"\n    {...props}\n  />\n);\n\nconst TableCell = ({ className, ...props }: React.ComponentProps<\"td\">) => (\n  <td\n    className={cn(\n      \"whitespace-nowrap p-2 align-middle [&:has([role=checkbox])]:min-w-[56px] [&:has([role=checkbox])]:pr-0 [&:has([role=checkbox])]:text-center [&>[role=checkbox]]:mx-auto\",\n      className,\n    )}\n    data-slot=\"table-cell\"\n    {...props}\n  />\n);\n\nconst TableCaption = ({ className, ...props }: React.ComponentProps<\"caption\">) => (\n  <caption\n    className={cn(\"mt-4 text-muted-foreground text-sm\", className)}\n    data-slot=\"table-caption\"\n    {...props}\n  />\n);\n\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };\n",
      "type": "registry:ui",
      "target": ""
    }
  ],
  "type": "registry:ui"
}
