{"$schema":"https://ui.logic2b.com/schema/registry-item.json","name":"table","type":"registry:ui","description":"Displays tabular data in rows and columns. Use for lists of structured data with headers, body, footer and captions.","registryDependencies":["utils"],"files":[{"path":"ui/table.tsx","type":"registry:ui","content":"import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype TableProps = React.ComponentProps<\"table\"> & {\n  /** Label and focus a scrolling table region when its content needs overflow. */\n  containerProps?: React.ComponentProps<\"div\">\n}\n\nfunction Table({ className, containerProps, ...props }: TableProps) {\n  return (\n    <div\n      data-slot=\"table-container\"\n      {...containerProps}\n      className={cn(\"relative w-full overflow-x-auto\", containerProps?.className)}\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(\"[&_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(\"[&_tr:last-child]:border-0\", className)}\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        \"bg-muted/50 border-t font-medium [&>tr]:last:border-b-0\",\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        \"hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors\",\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        \"text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\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        \"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\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(\"text-muted-foreground mt-4 text-sm\", className)}\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"}],"categories":["data-display"],"accessibility":{"support":"native","pattern":"data table","primitive":"HTML table elements","keyboard":[],"aria":["Uses native table, row, header and cell elements."],"consumer":["Add a caption, scope headers correctly and provide a non-visual name for interactive controls in cells."]},"api":{"source":"src/ui/table.tsx","exports":[{"name":"Table","kind":"component","propsType":"TableProps","props":[{"name":"containerProps","type":"React.ComponentProps<\"div\">","required":false,"description":"Label and focus a scrolling table region when its content needs overflow."}]},{"name":"TableHeader","kind":"component","propsType":"React.ComponentProps<\"thead\">"},{"name":"TableBody","kind":"component","propsType":"React.ComponentProps<\"tbody\">"},{"name":"TableFooter","kind":"component","propsType":"React.ComponentProps<\"tfoot\">"},{"name":"TableHead","kind":"component","propsType":"React.ComponentProps<\"th\">"},{"name":"TableRow","kind":"component","propsType":"React.ComponentProps<\"tr\">"},{"name":"TableCell","kind":"component","propsType":"React.ComponentProps<\"td\">"},{"name":"TableCaption","kind":"component","propsType":"React.ComponentProps<\"caption\">"}]}}