SPB Git

spb/vquant Public MIT

VibeQuant — AI-powered institutional-grade financial intelligence platform.

TypeScript 84.3% Python 11.7% JavaScript 1.6% CSS 1.5% HTML 0.7%
3.3 KB · 134 lines tsx
Raw Blame History
1/*2 * =============================================================================3 *  VibeQuant (vquant) — AI-Powered Financial Intelligence Platform4 * -----------------------------------------------------------------------------5 *  File:      client/src/components/ui/table.tsx6 *7 *  Author:    Simon-Pierre Boucher8 *  Contact:   contact@spboucher.ai9 *  Website:   https://www.spboucher.ai10 *  Demo:      https://www.vquant.ai11 *  License:   MIT (see LICENSE)12 *13 *  Copyright © 2026 Simon-Pierre Boucher. All rights reserved.14 * =============================================================================15 */1617import * as React from "react"1819import { cn } from "@/lib/utils"2021const Table = React.forwardRef<22  HTMLTableElement,23  React.HTMLAttributes<HTMLTableElement>24>(({ className, ...props }, ref) => (25  <div className="relative w-full overflow-auto">26    <table27      ref={ref}28      className={cn("w-full caption-bottom text-sm", className)}29      {...props}30    />31  </div>32))33Table.displayName = "Table"3435const TableHeader = React.forwardRef<36  HTMLTableSectionElement,37  React.HTMLAttributes<HTMLTableSectionElement>38>(({ className, ...props }, ref) => (39  <thead ref={ref} className={cn("[&_tr]:border-b", className)} {...props} />40))41TableHeader.displayName = "TableHeader"4243const TableBody = React.forwardRef<44  HTMLTableSectionElement,45  React.HTMLAttributes<HTMLTableSectionElement>46>(({ className, ...props }, ref) => (47  <tbody48    ref={ref}49    className={cn("[&_tr:last-child]:border-0", className)}50    {...props}51  />52))53TableBody.displayName = "TableBody"5455const TableFooter = React.forwardRef<56  HTMLTableSectionElement,57  React.HTMLAttributes<HTMLTableSectionElement>58>(({ className, ...props }, ref) => (59  <tfoot60    ref={ref}61    className={cn(62      "border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",63      className64    )}65    {...props}66  />67))68TableFooter.displayName = "TableFooter"6970const TableRow = React.forwardRef<71  HTMLTableRowElement,72  React.HTMLAttributes<HTMLTableRowElement>73>(({ className, ...props }, ref) => (74  <tr75    ref={ref}76    className={cn(77      "border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",78      className79    )}80    {...props}81  />82))83TableRow.displayName = "TableRow"8485const TableHead = React.forwardRef<86  HTMLTableCellElement,87  React.ThHTMLAttributes<HTMLTableCellElement>88>(({ className, ...props }, ref) => (89  <th90    ref={ref}91    className={cn(92      "h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",93      className94    )}95    {...props}96  />97))98TableHead.displayName = "TableHead"99100const TableCell = React.forwardRef<101  HTMLTableCellElement,102  React.TdHTMLAttributes<HTMLTableCellElement>103>(({ className, ...props }, ref) => (104  <td105    ref={ref}106    className={cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className)}107    {...props}108  />109))110TableCell.displayName = "TableCell"111112const TableCaption = React.forwardRef<113  HTMLTableCaptionElement,114  React.HTMLAttributes<HTMLTableCaptionElement>115>(({ className, ...props }, ref) => (116  <caption117    ref={ref}118    className={cn("mt-4 text-sm text-muted-foreground", className)}119    {...props}120  />121))122TableCaption.displayName = "TableCaption"123124export {125  Table,126  TableHeader,127  TableBody,128  TableFooter,129  TableHead,130  TableRow,131  TableCell,132  TableCaption,133}134