nextuiq
Version:
NextUIQ is a modern, lightweight, and developer-friendly UI component library for React and Next.js. Built with TypeScript and Tailwind CSS, it offers customizable, accessible, and performance-optimized components with built-in dark mode, theme customizat
71 lines (68 loc) • 2.2 kB
JavaScript
import { j as jsxRuntimeExports } from './index46.mjs';
import React__default from 'react';
import { cn } from './index38.mjs';
const Table = React__default.forwardRef(
({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
"table",
{
ref,
className: cn(
"w-full caption-bottom text-sm",
className
),
...props,
children
}
) })
);
Table.displayName = "Table";
const TableHeader = React__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
TableHeader.displayName = "TableHeader";
const TableBody = React__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
"tbody",
{
ref,
className: cn("[&_tr:last-child]:border-0", className),
...props
}
));
TableBody.displayName = "TableBody";
const TableRow = React__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
"tr",
{
ref,
className: cn(
"border-b transition-colors hover:bg-[oklch(var(--theme-muted)/0.5)] data-[state=selected]:bg-[oklch(var(--theme-muted))]",
className
),
...props
}
));
TableRow.displayName = "TableRow";
const TableHead = React__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
"th",
{
ref,
className: cn(
"h-12 px-4 text-left align-middle font-medium text-[oklch(var(--theme-muted-foreground))]",
"[&:has([role=checkbox])]:pr-0",
className
),
...props
}
));
TableHead.displayName = "TableHead";
const TableCell = React__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntimeExports.jsx(
"td",
{
ref,
className: cn(
"p-4 align-middle [&:has([role=checkbox])]:pr-0",
"text-[oklch(var(--theme-foreground))]",
className
),
...props
}
));
TableCell.displayName = "TableCell";
export { Table, TableBody, TableCell, TableHead, TableHeader, TableRow };