{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"table","title":"Table","description":"A styled HTML table for presenting structured data in rows and columns, with header, body, footer, and caption parts and a built-in horizontal-scroll container.","dependencies":["cn"],"files":[{"path":"components/ui/table.tsx","content":"\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"cn\"\n\nfunction Table({ className, ...props }: React.ComponentProps<\"table\">) {\n  return (\n    <div\n      data-slot=\"table-container\"\n      className=\"relative w-full overflow-x-auto\"\n    >\n      <table\n        data-slot=\"table\"\n        className={cn(\"w-full caption-bottom text-sm\", className)}\n        {...props}\n      />\n    </div>\n  )\n}\n\nfunction TableHeader({ className, ...props }: React.ComponentProps<\"thead\">) {\n  return (\n    <thead\n      data-slot=\"table-header\"\n      className={cn(\"[:where(&)_tr]:border-b\", className)}\n      {...props}\n    />\n  )\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<\"tbody\">) {\n  return (\n    <tbody\n      data-slot=\"table-body\"\n      className={cn(\n        \"[&_tr:last-child]:border-0 [&_tr:last-child]:[--table-divider:0px]\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction TableFooter({ className, ...props }: React.ComponentProps<\"tfoot\">) {\n  return (\n    <tfoot\n      data-slot=\"table-footer\"\n      className={cn(\n        \"border-t bg-fill-1 font-medium [&>tr]:last:border-b-0 [&>tr]:last:[--table-divider:0px] [&.border-t>tr:first-child]:[--table-divider-top:1px]\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction TableRow({ className, ...props }: React.ComponentProps<\"tr\">) {\n  return (\n    <tr\n      data-slot=\"table-row\"\n      className={cn(\n        \"border-b transition-colors [--table-divider-top:0px] [--table-divider:0px] hover:bg-fill-1 has-aria-expanded:bg-fill-1 data-[state=selected]:bg-fill-2 [&.border-b]:[--table-divider:1px]\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction TableHead({ className, ...props }: React.ComponentProps<\"th\">) {\n  return (\n    <th\n      data-slot=\"table-head\"\n      className={cn(\n        \"h-[calc(--spacing(10)-var(--table-divider,0px))] px-3 pt-2.5 pb-[calc(--spacing(2.5)-var(--table-divider,0px))] text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction TableCell({ className, ...props }: React.ComponentProps<\"td\">) {\n  return (\n    <td\n      data-slot=\"table-cell\"\n      className={cn(\n        \"px-3 pt-[calc(--spacing(2)-var(--table-divider-top,0px))] pb-[calc(--spacing(2)-var(--table-divider,0px))] align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction TableCaption({\n  className,\n  ...props\n}: React.ComponentProps<\"caption\">) {\n  return (\n    <caption\n      data-slot=\"table-caption\"\n      className={cn(\n        \"mt-4 px-3 text-left text-sm text-muted-foreground\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nexport {\n  Table,\n  TableHeader,\n  TableBody,\n  TableFooter,\n  TableHead,\n  TableRow,\n  TableCell,\n  TableCaption,\n}\n","type":"registry:ui"}],"cssVars":{"theme":{"color-fill-1":"var(--fill-1)","color-fill-2":"var(--fill-2)","text-sm--letter-spacing":"-0.005em"},"light":{"fill-1":"oklch(0.556 0 0 / 5%)","fill-2":"oklch(0.556 0 0 / 8%)"},"dark":{"fill-1":"oklch(1 0 0 / 5%)","fill-2":"oklch(1 0 0 / 10%)"}},"categories":["content"],"type":"registry:ui"}