import { ChevronRight } from "lucide-react"; import Link from "next/link"; export function Card({ title, icon, action, children, className = "", bodyClassName = "", }: { title?: React.ReactNode; icon?: React.ReactNode; action?: React.ReactNode; children: React.ReactNode; className?: string; bodyClassName?: string; }) { return (
{(title || action) && (
{icon && {icon}} {title &&

{title}

} {action &&
{action}
}
)}
{children}
); } /** Plain page header: breadcrumb, title with status pills, one-line description. */ export function Banner({ crumbs, title, pills, meta, right, children, }: { crumbs: { label: string; href?: string }[]; title: React.ReactNode; pills?: React.ReactNode; meta?: React.ReactNode; right?: React.ReactNode; children?: React.ReactNode; }) { return (

{title}

{pills &&
{pills}
} {right &&
{right}
}
{meta &&
{meta}
} {children}
); } const PILL_TONES = { dark: "bg-accent-soft text-accent-deep", light: "bg-surface-solid text-ink border border-line", good: "bg-good-soft text-good", warn: "bg-warn-soft text-warn", info: "bg-info-soft text-info", accent: "accent-fill text-white", } as const; export function Pill({ tone = "light", children, className = "" }: { tone?: keyof typeof PILL_TONES; children: React.ReactNode; className?: string }) { return ( {children} ); } export function Stat({ label, before, after, note }: { label: string; before: string; after: string; note?: string }) { return (

{label}

{before} → {after}

{note &&

{note}

}
); } export function Segmented({ options, value, onChange, label, }: { options: { value: T; label: string }[]; value: T; onChange: (v: T) => void; label: string; }) { return (
{options.map((o) => ( ))}
); } export function Button({ children, onClick, tone = "light", href, disabled, className = "", }: { children: React.ReactNode; onClick?: () => void; tone?: "dark" | "light" | "accent"; href?: string; disabled?: boolean; className?: string; }) { const styles = { dark: "bg-nav text-white hover:bg-ink", light: "bg-surface-solid text-ink border border-line hover:border-accent", accent: "bg-accent text-white hover:bg-accent-deep", }[tone]; const cls = `inline-flex items-center justify-center gap-2 rounded-lg px-4 py-2.5 text-[14px] font-medium shadow-card transition disabled:opacity-50 ${styles} ${className}`; if (href) { return ( {children} ); } return ( ); }