dgz-ui
Version:
Custom ui library using React.js, Shadcn/ui, TailwindCSS, Typescript
90 lines (89 loc) • 1.97 kB
JavaScript
import { j as t } from "./jsx-runtime-C5mzlN2N.js";
import { c as o } from "./utils-B6fNqzRf.js";
import { forwardRef as l } from "react";
const d = l(
({ className: a, ...e }, s) => /* @__PURE__ */ t.jsx(
"table",
{
ref: s,
className: o("w-full caption-bottom text-sm", a),
...e
}
)
);
d.displayName = "Table";
const r = l(({ className: a, ...e }, s) => /* @__PURE__ */ t.jsx("thead", { ref: s, className: o("[&_tr]:border-b", a), ...e }));
r.displayName = "TableHeader";
const m = l(({ className: a, ...e }, s) => /* @__PURE__ */ t.jsx(
"tbody",
{
ref: s,
className: o("[&_tr:last-child]:border-0", a),
...e
}
));
m.displayName = "TableBody";
const b = l(({ className: a, ...e }, s) => /* @__PURE__ */ t.jsx(
"tfoot",
{
ref: s,
className: o(
"bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",
a
),
...e
}
));
b.displayName = "TableFooter";
const c = l(({ className: a, ...e }, s) => /* @__PURE__ */ t.jsx(
"tr",
{
ref: s,
className: o(
"hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
a
),
...e
}
));
c.displayName = "TableRow";
const i = l(({ className: a, ...e }, s) => /* @__PURE__ */ t.jsx(
"th",
{
ref: s,
className: o(
"text-muted-foreground h-12 px-4 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0",
a
),
...e
}
));
i.displayName = "TableHead";
const n = l(({ className: a, ...e }, s) => /* @__PURE__ */ t.jsx(
"td",
{
ref: s,
className: o("p-4 align-middle [&:has([role=checkbox])]:pr-0", a),
...e
}
));
n.displayName = "TableCell";
const p = l(({ className: a, ...e }, s) => /* @__PURE__ */ t.jsx(
"caption",
{
ref: s,
className: o("text-muted-foreground mt-4 text-sm", a),
...e
}
));
p.displayName = "TableCaption";
export {
d as T,
r as a,
m as b,
b as c,
i as d,
c as e,
n as f,
p as g
};