UNPKG

@stanfordspezi/spezi-web-design-system

Version:

Stanford Biodesign Digital Health Spezi Web Design System

2 lines (1 loc) 1.44 kB
"use strict";const a=require("react/jsx-runtime"),l=require("./index-DwV9MiDB.js"),d=({className:t,...e})=>a.jsx("div",{"data-slot":"table-wrapper",className:"relative w-full overflow-auto",children:a.jsx("table",{"data-slot":"table",className:l.cn("w-full caption-bottom text-sm",t),...e})}),r=({className:t,...e})=>a.jsx("thead",{"data-slot":"table-header",className:l.cn("[&_tr]:border-b",t),...e}),b=({className:t,...e})=>a.jsx("tbody",{"data-slot":"table-body",className:l.cn("[&_tr:last-child]:border-0",t),...e}),c=({className:t,...e})=>a.jsx("tfoot",{"data-slot":"table-footer",className:l.cn("bg-muted/50 border-t font-medium last:[&>tr]:border-b-0",t),...e}),n=({className:t,onClick:e,isHoverable:s=!0,...o})=>a.jsx("tr",{"data-slot":"table-row",className:l.cn("data-[state=selected]:bg-muted border-b transition",s&&"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",{"data-slot":"table-head",className:l.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",{"data-slot":"table-cell",className:l.cn("p-4 text-left align-middle [&:has([role=checkbox])]:pr-0",t),...e});exports.Table=d;exports.TableBody=b;exports.TableCell=m;exports.TableFooter=c;exports.TableHead=i;exports.TableHeader=r;exports.TableRow=n;