UNPKG

laif-ds

Version:

Design System di Laif con componenti React basati su principi di Atomic Design

112 lines (111 loc) 2.3 kB
"use client"; import { jsx as a } from "react/jsx-runtime"; import { cn as o } from "../../lib/utils.js"; function d({ className: e, ...t }) { return /* @__PURE__ */ a( "table", { "data-slot": "table-container", className: o( "relative w-full caption-bottom overflow-x-auto text-sm", e ), ...t } ); } function n({ className: e, ...t }) { return /* @__PURE__ */ a( "thead", { "data-slot": "table-header", className: o("[&_tr]:border-b", e), ...t } ); } function s({ className: e, ...t }) { return /* @__PURE__ */ a( "tbody", { "data-slot": "table-body", className: o("[&_tr:last-child]:border-0", e), ...t } ); } function c({ className: e, ...t }) { return /* @__PURE__ */ a( "tfoot", { "data-slot": "table-footer", className: o( "bg-d-secondary/50 border-t font-medium [&>tr]:last:border-b-0", e ), ...t } ); } function b({ className: e, ...t }) { return /* @__PURE__ */ a( "tr", { "data-slot": "table-row", className: o( "hover:bg-d-secondary/50 data-[state=selected]:bg-d-secondary border-d-border border-b transition-colors", e ), ...t } ); } function i({ className: e, ...t }) { return /* @__PURE__ */ a( "th", { "data-slot": "table-head", className: o( "text-d-foreground border-d-border h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", e ), ...t } ); } function u({ className: e, ...t }) { return /* @__PURE__ */ a( "td", { "data-slot": "table-cell", className: o( "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", e ), ...t } ); } function m({ className: e, ...t }) { return /* @__PURE__ */ a( "caption", { "data-slot": "table-caption", className: o("text-d-secondary-foreground mt-4 text-sm", e), ...t } ); } export { d as Table, s as TableBody, m as TableCaption, u as TableCell, c as TableFooter, i as TableHead, n as TableHeader, b as TableRow };