@undp/design-system-react
Version:
React based design system for UNDP
67 lines (66 loc) • 2.08 kB
JavaScript
import { t as e } from "./utils-ca9as9Ye.js";
import { jsx as t } from "react/jsx-runtime";
//#region src/components/ui/table.tsx
function n({ className: n, ...r }) {
return /* @__PURE__ */ t("div", {
"data-slot": "table-container",
className: "relative w-full overflow-x-auto",
children: /* @__PURE__ */ t("table", {
"data-slot": "table",
className: e("w-full caption-bottom", n),
...r
})
});
}
function r({ className: n, ...r }) {
return /* @__PURE__ */ t("thead", {
"data-slot": "table-header",
className: e("[&>tr]:border-b-0", n),
...r
});
}
function i({ className: n, ...r }) {
return /* @__PURE__ */ t("tbody", {
"data-slot": "table-body",
className: e("[&>tr]:border-stroke [&>tr]:border-b", n),
...r
});
}
function a({ className: n, ...r }) {
return /* @__PURE__ */ t("tfoot", {
"data-slot": "table-footer",
className: e("border-stroke border-b font-medium", n),
...r
});
}
function o({ className: e, ...n }) {
return /* @__PURE__ */ t("tr", {
"data-slot": "table-row",
className: e,
...n
});
}
function s({ className: n, ...r }) {
return /* @__PURE__ */ t("th", {
"data-slot": "table-head",
className: e("whitespace-nowrap bg-surface py-3 pr-10 pl-3 text-left align-middle font-semibold text-p-xs md:text-p-sm lg:text-p rtl:pr-3 rtl:pl-10 rtl:text-right [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", n),
...r
});
}
function c({ className: n, ...r }) {
return /* @__PURE__ */ t("td", {
"data-slot": "table-cell",
className: e("whitespace-nowrap py-3 pr-10 pl-3 align-middle text-p-xs md:text-p-sm lg:text-p rtl:pr-3 rtl:pl-10 [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", n),
...r
});
}
function l({ className: n, ...r }) {
return /* @__PURE__ */ t("caption", {
"data-slot": "table-caption",
className: e("mt-4 text-content-tertiary text-sm", n),
...r
});
}
//#endregion
export { n as Table, i as TableBody, l as TableCaption, c as TableCell, a as TableFooter, s as TableHead, r as TableHeader, o as TableRow };
//# sourceMappingURL=Table.js.map