ivt
Version:
Ivt Components Library
63 lines (60 loc) • 2.54 kB
JavaScript
import React__default from 'react';
import { c as cn } from './utils-05LlW3Cl.mjs';
function Table({ className, ...props }) {
return /*#__PURE__*/ React__default.createElement("table", {
"data-slot": "table",
className: cn("w-full caption-bottom text-sm", className),
...props
});
}
function TableHeader({ className, ...props }) {
return /*#__PURE__*/ React__default.createElement("thead", {
"data-slot": "table-header",
className: cn("[&_tr]:border-b", className),
...props
});
}
function TableBody({ className, ...props }) {
return /*#__PURE__*/ React__default.createElement("tbody", {
"data-slot": "table-body",
className: cn("[&_tr:last-child]:border-0", className),
...props
});
}
function TableFooter({ className, ...props }) {
return /*#__PURE__*/ React__default.createElement("tfoot", {
"data-slot": "table-footer",
className: cn("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", className),
...props
});
}
function TableRow({ className, ...props }) {
return /*#__PURE__*/ React__default.createElement("tr", {
"data-slot": "table-row",
className: cn("border-b-border-grid-container hover:bg-muted data-[disabled=true]:bg-muted data-[state=selected]:bg-body border-b transition-colors *:data-[disabled=true]:pointer-events-none *:data-[disabled=true]:opacity-50", className),
...props
});
}
function TableHead({ className, ...props }) {
return /*#__PURE__*/ React__default.createElement("th", {
"data-slot": "table-head",
className: cn("text-foreground h-12 px-2 text-left align-middle font-medium *:data-[disabled=true]:pointer-events-none *:data-[disabled=true]:opacity-50 [&:has([role=checkbox])]:pr-0", className),
...props
});
}
function TableCell({ className, ...props }) {
return /*#__PURE__*/ React__default.createElement("td", {
"data-slot": "table-cell",
className: cn("p-2 align-middle [&:has([role=checkbox])]:pr-0", className),
...props
});
}
function TableCaption({ className, ...props }) {
return /*#__PURE__*/ React__default.createElement("caption", {
"data-slot": "table-caption",
className: cn("text-muted-foreground mt-4 text-sm", className),
...props
});
}
export { Table as T, TableHeader as a, TableBody as b, TableFooter as c, TableHead as d, TableRow as e, TableCell as f, TableCaption as g };
//# sourceMappingURL=table-Bxaxu8Lu.mjs.map