import { type HTMLAttributes, type ReactNode } from "react"; /** * MetricCard — dashboard metric tile (composite). * * Recurring pattern "Card + CardHeader + value + delta + trend icon" promoted * to a first-class composite per ADR-0007 community-best-practices plan. * * Trend → token mapping (default `invertTrend=false`): * up → text-success (positive growth) * down → text-destructive (negative growth) * neutral → text-muted-foreground * * EC-17 absorbed: pass `invertTrend` for metrics where "up is bad" (cost, * churn, latency). The mapping inverts cleanly: * up → text-destructive (cost growing = bad) * down → text-success (cost dropping = good) * * @example * * */ export type MetricCardTrend = "up" | "down" | "neutral"; export interface MetricCardDelta { /** Display text (e.g., `"+12%"`, `"-3.4 pp"`, `"unchanged"`). */ value: string; /** Trend direction — drives icon and color (subject to `invertTrend`). */ trend: MetricCardTrend; } export interface MetricCardProps extends Omit, "children"> { /** Metric label (e.g., "Revenue", "Active Users"). */ title: string; /** Headline value (e.g., "$12,345", "1,234"). */ value: ReactNode; /** Optional delta with trend direction. */ delta?: MetricCardDelta; /** Optional subtle context line below the value (e.g., "vs last month"). */ hint?: ReactNode; /** Optional icon rendered top-right (e.g., ``). */ icon?: ReactNode; /** * EC-17: invert default trend semantics. Use for Cost / Churn / Latency * metrics where "up" is bad. Default `false` (Revenue / Users / Conversions). */ invertTrend?: boolean; } export declare const MetricCard: import("react").ForwardRefExoticComponent>;