{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "table",
  "title": "Table",
  "author": "@fma-ui/ui",
  "description": "Semantic table primitives (header, body, rows, cells, footer, caption) built on react-aria-components' Table for accessible, sorting/selection-ready markup.",
  "dependencies": [
    "cn@^0.4.0",
    "react-aria-components@^1.21.1"
  ],
  "files": [
    {
      "path": "src/core/table/table.tsx",
      "content": "import { cn } from \"cn\";\nimport type * as React from \"react\";\nimport {\n  Cell as CellPrimitive,\n  type CellProps,\n  Column as ColumnPrimitive,\n  type ColumnProps,\n  Row as RowPrimitive,\n  type RowProps,\n  TableBody as TableBodyPrimitive,\n  type TableBodyProps,\n  TableFooter as TableFooterPrimitive,\n  type TableFooterProps,\n  TableHeader as TableHeaderPrimitive,\n  type TableHeaderProps,\n  Table as TablePrimitive,\n  type TableProps,\n} from \"react-aria-components\";\n\nfunction Table({ className, ...props }: TableProps) {\n  return (\n    <div data-slot=\"table-container\" className=\"relative w-full overflow-x-auto\">\n      <TablePrimitive\n        data-slot=\"table\"\n        className={cn(\"w-full caption-bottom text-sm\", className)}\n        {...props}\n      />\n    </div>\n  );\n}\n\nfunction TableHeader<T>({ className, ...props }: TableHeaderProps<T>) {\n  return (\n    <TableHeaderPrimitive\n      data-slot=\"table-header\"\n      className={cn(\"[&_tr]:border-b\", className)}\n      {...props}\n    />\n  );\n}\n\nfunction TableBody<T>({ className, ...props }: TableBodyProps<T>) {\n  return (\n    <TableBodyPrimitive\n      data-slot=\"table-body\"\n      className={cn(\"data-empty:h-24 data-empty:text-center [&_tr:last-child]:border-0\", className)}\n      {...props}\n    />\n  );\n}\n\nfunction TableFooter<T>({ className, ...props }: TableFooterProps<T>) {\n  return (\n    <TableFooterPrimitive\n      data-slot=\"table-footer\"\n      className={cn(\"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0\", className)}\n      {...props}\n    />\n  );\n}\n\nfunction TableRow<T>({ className, ...props }: RowProps<T>) {\n  return (\n    <RowPrimitive\n      data-slot=\"table-row\"\n      className={cn(\n        \"border-b transition-colors hover:bg-accent/50 has-aria-expanded:bg-accent/50 data-[state=selected]:bg-accent data-[state=selected]:text-accent-foreground data-selected:bg-accent data-selected:text-accent-foreground\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction TableHead({ className, ...props }: ColumnProps) {\n  return (\n    <ColumnPrimitive\n      data-slot=\"table-head\"\n      className={cn(\n        \"h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([data-slot=checkbox])]:pr-0 [&:has([role=checkbox])]:pr-0\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction TableCell({ className, ...props }: CellProps) {\n  return (\n    <CellPrimitive\n      data-slot=\"table-cell\"\n      className={cn(\n        \"p-2 align-middle whitespace-nowrap [&:has([data-slot=checkbox])]:pr-0 [&:has([role=checkbox])]:pr-0\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nfunction TableCaption({ className, ...props }: React.ComponentProps<\"figcaption\">) {\n  return (\n    <figcaption\n      data-slot=\"table-caption\"\n      className={cn(\"mt-4 text-center text-sm text-muted-foreground\", className)}\n      {...props}\n    />\n  );\n}\n\nexport { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };\n",
      "type": "registry:component",
      "target": "components/fma-ui/table.tsx"
    }
  ],
  "meta": {
    "status": "stable",
    "source": "customized",
    "tags": [
      "data-display",
      "table",
      "react-aria"
    ]
  },
  "categories": [
    "data-display"
  ],
  "type": "registry:ui"
}