{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "table", "type": "registry:ui", "title": "Table", "files": [ { "path": "ui/table.tsrx", "type": "registry:ui", "target": "components/ui/table.tsrx", "content": "// Base UI base table — THIS FAMILY IS BASE-INDEPENDENT. Neither Radix nor Base UI publishes a\n// table primitive, so upstream ships the same plain host elements in both bases and this file is\n// the radix base's content unchanged. (The React Aria base is the odd one out: RAC does have a\n// table, so that base runs on real collection components with generic item types.)\n//\n// There is consequently no dialect to get wrong here and nothing to verify against a primitive:\n// `data-[state=selected]` on the row is written by the CONSUMER — a data-table library setting\n// selection state — not emitted by anything underneath, so unlike checkbox or toggle it is not a\n// Radix-ism that needs translating.\nimport { cn } from '@/lib/utils';\n\n// Multi-host family (div/table/thead/tbody/tr/th/td/caption): no single host\n// prop table applies, so the shared alias stays structural.\ntype Props = { className?: string } & Record;\n\nexport function Table({ className, ...props }: Props) @{\n\t
\n\t\t\n\t
\n}\n\nexport function TableHeader({ className, ...props }: Props) @{\n\t\n}\n\nexport function TableBody({ className, ...props }: Props) @{\n\t\n}\n\nexport function TableFooter({ className, ...props }: Props) @{\n\ttr]:last:border-b-0', className)}\n\t\t{...props}\n\t/>\n}\n\nexport function TableRow({ className, ...props }: Props) @{\n\t\n}\n\nexport function TableHead({ className, ...props }: Props) @{\n\t[role=checkbox]]:translate-y-[2px]',\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n}\n\nexport function TableCell({ className, ...props }: Props) @{\n\t[role=checkbox]]:translate-y-[2px]',\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n}\n\nexport function TableCaption({ className, ...props }: Props) @{\n\t\n}\n" } ], "registryDependencies": [ "@octane/utils" ] }