mirror of
https://github.com/hanzoai/bootnode.git
synced 2026-10-25 02:31:30 +00:00
Names the two halves for what they are. The repo already holds both (12407e9 merged bootnode/bootnode into this history); this makes the frontend directory say so, so the layout reads the way the owner describes the system: backend and frontend separate, one repo. git mv throughout — 187 renames, history preserved. Every path reference follows: hanzo.yml build context and dockerfile, compose.yml, compose.prod.yml, start.sh, LLM.md, infra/k8s/web-deployments.yaml, infra/cloud/deploy.sh, and the Dockerfile's own COPY paths. Image and container names (bootnode-web, the -web tag suffix) are deliberately NOT renamed here: those are a deploy contract the App CR and ingress bind to on port 3001, and breaking them is a separate, staged change. Console builds green after the move; the Go tree builds. Co-authored-by: Hanzo Dev <[email protected]>
92 lines
3.3 KiB
TypeScript
92 lines
3.3 KiB
TypeScript
"use client"
|
|
|
|
import * as React from "react"
|
|
|
|
import { cn } from "@/lib/utils"
|
|
|
|
// Table == lux.cloud's `.vtable`. Two decisions carry the look:
|
|
//
|
|
// 1. Column heads are 12px uppercase with 0.04em tracking in muted ink — a
|
|
// label, not a row of data. They own no rule of their own.
|
|
// 2. Separation is a border on the TOP of every row, so the header is divided
|
|
// from the body by the first row's own line and the table ends flush with
|
|
// no trailing rule. (The stock shadcn table draws border-b on each row and
|
|
// then has to special-case the last one away.)
|
|
|
|
const Table = React.forwardRef<HTMLTableElement, React.HTMLAttributes<HTMLTableElement>>(
|
|
({ className, ...props }, ref) => (
|
|
<div className="relative w-full overflow-x-auto">
|
|
<table ref={ref} className={cn("w-full caption-bottom text-sm", className)} {...props} />
|
|
</div>
|
|
)
|
|
)
|
|
Table.displayName = "Table"
|
|
|
|
const TableHeader = React.forwardRef<HTMLTableSectionElement, React.HTMLAttributes<HTMLTableSectionElement>>(
|
|
({ className, ...props }, ref) => <thead ref={ref} className={className} {...props} />
|
|
)
|
|
TableHeader.displayName = "TableHeader"
|
|
|
|
const TableBody = React.forwardRef<HTMLTableSectionElement, React.HTMLAttributes<HTMLTableSectionElement>>(
|
|
({ className, ...props }, ref) => <tbody ref={ref} className={className} {...props} />
|
|
)
|
|
TableBody.displayName = "TableBody"
|
|
|
|
const TableFooter = React.forwardRef<HTMLTableSectionElement, React.HTMLAttributes<HTMLTableSectionElement>>(
|
|
({ className, ...props }, ref) => (
|
|
<tfoot ref={ref} className={cn("border-t border-border font-medium", className)} {...props} />
|
|
)
|
|
)
|
|
TableFooter.displayName = "TableFooter"
|
|
|
|
const TableRow = React.forwardRef<HTMLTableRowElement, React.HTMLAttributes<HTMLTableRowElement>>(
|
|
({ className, ...props }, ref) => (
|
|
<tr
|
|
ref={ref}
|
|
className={cn(
|
|
"border-t border-border transition-colors hover:bg-foreground/[0.03] data-[state=selected]:bg-accent",
|
|
className
|
|
)}
|
|
{...props}
|
|
/>
|
|
)
|
|
)
|
|
TableRow.displayName = "TableRow"
|
|
|
|
const TableHead = React.forwardRef<HTMLTableCellElement, React.ThHTMLAttributes<HTMLTableCellElement>>(
|
|
({ className, ...props }, ref) => (
|
|
<th
|
|
ref={ref}
|
|
className={cn(
|
|
"whitespace-nowrap px-4 py-3 text-left align-middle text-xs font-medium uppercase tracking-[0.04em] text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
className
|
|
)}
|
|
{...props}
|
|
/>
|
|
)
|
|
)
|
|
TableHead.displayName = "TableHead"
|
|
|
|
const TableCell = React.forwardRef<HTMLTableCellElement, React.TdHTMLAttributes<HTMLTableCellElement>>(
|
|
({ className, ...props }, ref) => (
|
|
<td
|
|
ref={ref}
|
|
className={cn(
|
|
"px-4 py-3.5 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
className
|
|
)}
|
|
{...props}
|
|
/>
|
|
)
|
|
)
|
|
TableCell.displayName = "TableCell"
|
|
|
|
const TableCaption = React.forwardRef<HTMLTableCaptionElement, React.HTMLAttributes<HTMLTableCaptionElement>>(
|
|
({ className, ...props }, ref) => (
|
|
<caption ref={ref} className={cn("mt-4 text-sm text-muted-foreground", className)} {...props} />
|
|
)
|
|
)
|
|
TableCaption.displayName = "TableCaption"
|
|
|
|
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption }
|