UNPKG

@stanfordspezi/spezi-web-design-system

Version:

Stanford Biodesign Digital Health Spezi Web Design System

89 lines (88 loc) 1.87 kB
import { jsx as e } from "react/jsx-runtime"; import { c as l } from "./index-2NvaPZWc.mjs"; const b = ({ className: a, ...t }) => /* @__PURE__ */ e("div", { "data-slot": "table-wrapper", className: "relative w-full overflow-auto", children: /* @__PURE__ */ e( "table", { "data-slot": "table", className: l("w-full caption-bottom text-sm", a), ...t } ) }), c = ({ className: a, ...t }) => /* @__PURE__ */ e( "thead", { "data-slot": "table-header", className: l("[&_tr]:border-b", a), ...t } ), m = ({ className: a, ...t }) => /* @__PURE__ */ e( "tbody", { "data-slot": "table-body", className: l("[&_tr:last-child]:border-0", a), ...t } ), i = ({ className: a, ...t }) => /* @__PURE__ */ e( "tfoot", { "data-slot": "table-footer", className: l( "bg-muted/50 border-t font-medium last:[&>tr]:border-b-0", a ), ...t } ), n = ({ className: a, onClick: t, isHoverable: o = !0, ...s }) => /* @__PURE__ */ e( "tr", { "data-slot": "table-row", className: l( "data-[state=selected]:bg-muted border-b transition", o && "hover:bg-muted/50", t && "focus-visible:bg-primary/10 cursor-pointer focus-visible:outline-hidden", a ), onClick: t, ...t ? { tabIndex: 0 } : void 0, ...s } ), f = ({ className: a, ...t }) => /* @__PURE__ */ e( "th", { "data-slot": "table-head", className: l( "text-muted-foreground h-12 px-4 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0", a ), ...t } ), u = ({ className: a, ...t }) => /* @__PURE__ */ e( "td", { "data-slot": "table-cell", className: l( "p-4 text-left align-middle [&:has([role=checkbox])]:pr-0", a ), ...t } ); export { b as T, m as a, u as b, i as c, f as d, c as e, n as f };