= {
neutral: 'bg-inset text-muted',
gain: 'bg-gain-bg text-gain',
loss: 'bg-loss-bg text-loss',
index: 'bg-index-bg text-index',
rarity: 'bg-rarity-bg text-rarity',
alert: 'bg-alert-bg text-alert',
gold: 'bg-alert-bg text-gold',
};
return {children};
}
export function Stat({ label, value, sub, className }: { label: ReactNode; value: ReactNode; sub?: ReactNode; className?: string }) {
return (
{label}
{value}
{sub ? {sub} : null}
);
}
export function EmptyState({ title, description, action, className }: { title: ReactNode; description?: ReactNode; action?: ReactNode; className?: string }) {
return (
{title}
{description ?
{description}
: null}
{action ?
{action}
: null}
);
}
/** Honest placeholder for metrics without enough evidence (§191–§192). */
export function Unavailable({ reason = 'Data unavailable', className }: { reason?: string; className?: string }) {
return —;
}
export function SectionTitle({ children, href, hrefLabel = 'View all', className }: { children: ReactNode; href?: string; hrefLabel?: string; className?: string }) {
return (
{children}
{href ? (
{hrefLabel} →
) : null}
);
}
export function Skeleton({ className }: { className?: string }) {
return ;
}
export function Table({ children, className, dense = true }: { children: ReactNode; className?: string; dense?: boolean }) {
return (
);
}
export const th = 'sticky top-0 z-[1] whitespace-nowrap border-b border-border bg-elevated px-3 py-2 text-[11px] font-medium uppercase tracking-wider text-subtle';
export const td = 'whitespace-nowrap border-b border-border px-3 py-2 align-middle';
export const tdNum = `${td} num text-right`;