UNPKG

@llamaindex/ui

Version:

A comprehensive UI component library built with React, TypeScript, and Tailwind CSS for LlamaIndex applications

99 lines (96 loc) 3.12 kB
import { cn } from './chunk-MG2ARK3A.mjs'; import { __objRest, __spreadValues } from './chunk-FWCSY2DS.mjs'; import * as React from 'react'; import { jsx } from 'react/jsx-runtime'; var Table = React.forwardRef((_a, ref) => { var _b = _a, { className } = _b, props = __objRest(_b, ["className"]); return /* @__PURE__ */ jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx( "table", __spreadValues({ ref, className: cn("w-full caption-bottom text-sm", className) }, props) ) }); }); Table.displayName = "Table"; var TableHeader = React.forwardRef((_a, ref) => { var _b = _a, { className } = _b, props = __objRest(_b, ["className"]); return /* @__PURE__ */ jsx("thead", __spreadValues({ ref, className: cn("[&_tr]:border-b", className) }, props)); }); TableHeader.displayName = "TableHeader"; var TableBody = React.forwardRef((_a, ref) => { var _b = _a, { className } = _b, props = __objRest(_b, ["className"]); return /* @__PURE__ */ jsx( "tbody", __spreadValues({ ref, className: cn("[&_tr:last-child]:border-0", className) }, props) ); }); TableBody.displayName = "TableBody"; var TableFooter = React.forwardRef((_a, ref) => { var _b = _a, { className } = _b, props = __objRest(_b, ["className"]); return /* @__PURE__ */ jsx( "tfoot", __spreadValues({ ref, className: cn( "border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className ) }, props) ); }); TableFooter.displayName = "TableFooter"; var TableRow = React.forwardRef((_a, ref) => { var _b = _a, { className } = _b, props = __objRest(_b, ["className"]); return /* @__PURE__ */ jsx( "tr", __spreadValues({ ref, className: cn( "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", className ) }, props) ); }); TableRow.displayName = "TableRow"; var TableHead = React.forwardRef((_a, ref) => { var _b = _a, { className } = _b, props = __objRest(_b, ["className"]); return /* @__PURE__ */ jsx( "th", __spreadValues({ ref, className: cn( "h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0", className ) }, props) ); }); TableHead.displayName = "TableHead"; var TableCell = React.forwardRef((_a, ref) => { var _b = _a, { className } = _b, props = __objRest(_b, ["className"]); return /* @__PURE__ */ jsx( "td", __spreadValues({ ref, className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className) }, props) ); }); TableCell.displayName = "TableCell"; var TableCaption = React.forwardRef((_a, ref) => { var _b = _a, { className } = _b, props = __objRest(_b, ["className"]); return /* @__PURE__ */ jsx( "caption", __spreadValues({ ref, className: cn("mt-4 text-sm text-muted-foreground", className) }, props) ); }); TableCaption.displayName = "TableCaption"; export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };