"use client"; import { Loader2, X } from "lucide-react"; import { useEffect, useId, type ReactNode } from "react"; export const cx = (...a: (string | false | null | undefined)[]) => a.filter(Boolean).join(" "); export function Card({ title, subtitle, actions, children, className, id }: { title?: ReactNode; subtitle?: ReactNode; actions?: ReactNode; children: ReactNode; className?: string; id?: string }) { return (
{(title || actions) && (
{title &&

{title}

} {subtitle &&

{subtitle}

}
{actions &&
{actions}
}
)}
{children}
); } export function Tile({ label, value, sub, tone }: { label: string; value: ReactNode; sub?: ReactNode; tone?: "up" | "down" | "warn" | "muted" }) { const t = tone === "up" ? "text-up" : tone === "down" ? "text-down" : tone === "warn" ? "text-warn" : tone === "muted" ? "text-fg-muted" : "text-fg"; return (
{label}
{value}
{sub &&
{sub}
}
); } type BtnProps = React.ButtonHTMLAttributes & { variant?: "primary" | "ghost" | "danger" | "outline"; size?: "sm" | "md"; loading?: boolean }; export function Button({ variant = "outline", size = "md", loading, className, children, disabled, ...rest }: BtnProps) { const v = variant === "primary" ? "bg-accent text-white hover:bg-accent/90 border-transparent" : variant === "danger" ? "bg-down text-white hover:bg-down/90 border-transparent" : variant === "ghost" ? "border-transparent hover:bg-bg-sub text-fg-muted hover:text-fg" : "border-line-strong bg-bg-sub hover:bg-line text-fg"; const s = size === "sm" ? "h-7 px-2.5 text-xs" : "h-9 px-3.5 text-sm"; return ( ); } export function Field({ label, hint, children, htmlFor }: { label: ReactNode; hint?: ReactNode; children: ReactNode; htmlFor?: string }) { return ( ); } const inputCls = "h-9 w-full rounded-md border border-line-strong bg-bg px-2.5 text-sm text-fg placeholder:text-fg-dim focus:border-accent"; export function Input(props: React.InputHTMLAttributes) { return ; } export function Select(props: React.SelectHTMLAttributes) { return