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