UNPKG

@stanfordspezi/spezi-web-design-system

Version:

Stanford Biodesign Digital Health Spezi Web Design System

2 lines (1 loc) 1.25 kB
"use strict";const a=require("react/jsx-runtime"),s=require("./index-DwV9MiDB.js"),r=({className:t,...e})=>a.jsx("div",{className:"relative w-full overflow-auto",children:a.jsx("table",{className:s.cn("w-full caption-bottom text-sm",t),...e})}),c=({className:t,...e})=>a.jsx("thead",{className:s.cn("[&_tr]:border-b",t),...e}),b=({className:t,...e})=>a.jsx("tbody",{className:s.cn("[&_tr:last-child]:border-0",t),...e}),d=({className:t,...e})=>a.jsx("tfoot",{className:s.cn("bg-muted/50 border-t font-medium last:[&>tr]:border-b-0",t),...e}),n=({className:t,onClick:e,isHoverable:l=!0,...o})=>a.jsx("tr",{className:s.cn("data-[state=selected]:bg-muted border-b transition-colors",l&&"hover:bg-muted/50",e&&"focus-visible:bg-primary/10 cursor-pointer focus-visible:outline-hidden",t),onClick:e,...e?{tabIndex:0}:void 0,...o}),i=({className:t,...e})=>a.jsx("th",{className:s.cn("text-muted-foreground h-12 px-4 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0",t),...e}),m=({className:t,...e})=>a.jsx("td",{className:s.cn("p-4 text-left align-middle [&:has([role=checkbox])]:pr-0",t),...e});exports.Table=r;exports.TableBody=b;exports.TableCell=m;exports.TableFooter=d;exports.TableHead=i;exports.TableHeader=c;exports.TableRow=n;