import { type HTMLAttributes, type ReactNode } from 'react'; import { type VariantProps } from 'class-variance-authority'; declare const statVariants: (props?: ({ variant?: "elevated" | "default" | "compact" | "outlined" | null | undefined; size?: "sm" | "md" | "lg" | null | undefined; align?: "center" | "end" | "start" | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined) => string; /** * Which way is good news for a metric's trend. `neutral` is for a metric * where neither direction is good or bad news (a patient mix, a share). */ export type StatTrendPolarity = 'higher-is-better' | 'lower-is-better' | 'neutral'; export interface StatProps extends HTMLAttributes, VariantProps { /** Metric label rendered above the value. */ label: string; /** Numeric or pre-formatted string value. */ value: number | string; /** Number formatting style. Omit to use default decimal formatting. */ format?: 'decimal' | 'currency' | 'percent'; /** ISO 4217 currency code — required when format="currency". */ currency?: string; /** BCP 47 locale override. Defaults to the active i18n language. */ locale?: string; /** Trend direction. Requires `delta` to render the trend row. */ trend?: 'up' | 'down' | 'flat'; /** Trend delta magnitude, e.g. 12 for "↑ 12%". */ delta?: number | string; /** * Which way is good news. `higher-is-better` (default) shows a rise in * the success colour; `lower-is-better` (a no-show or cancellation rate, * a waiting time) shows a fall in it instead. The arrow always points the * way the number moved, and screen readers hear "better" or "worse". * `neutral` keeps the arrow and delta in the muted colour, and screen * readers hear only the direction ("Increased by +3.4 pts"). */ trendPolarity?: StatTrendPolarity; /** Number formatting style for the delta. Default "decimal". */ deltaFormat?: 'decimal' | 'percent'; /** Optional leading icon rendered at the start of the label row. */ icon?: ReactNode; /** * Optional trailing affordance at the end of the label row, vertically * centred with the label. Intended for `` so the * figure can explain how it is calculated. Interactive content is allowed: * it sits outside the label element, so it never becomes part of the * group's accessible name. Omit for the unchanged render. */ info?: ReactNode; /** * Optional trailing affordance at the end of the trend row, for an * `` that explains the change ("how is this * compared?"). Renders only with the trend row (`trend` and `delta`). * Like `info`, it sits outside the label, so it never joins the group's * accessible name. Omit for the unchanged render. */ trendInfo?: ReactNode; /** * Colour of the headline value. Defaults to `foreground`. Brand * intents (`primary`, `accent`) are for hero / marketing stats where * the number is the visual marker. Semantic intents * (`success`, `destructive`, `info`, `warning`) signal status via * the value colour itself — e.g. revenue green, debt red on KPI * tiles. Trend chevron and label colour are independent. */ intent?: 'foreground' | 'primary' | 'accent' | 'success' | 'destructive' | 'info' | 'warning'; /** Renders animated skeleton placeholders instead of content. */ loading?: boolean; /** * Animate the numeric value from 0 (or from the captured leading * sign) to the final value when the Stat first scrolls into view. * Default `false`. Marketing surfaces opt in; dashboards leave it * off so live metrics render immediately. */ animate?: boolean; /** * When `true`, the count-up re-plays every time the Stat scrolls * out of view and back in. Default `false` — animate once per * element per session, matching the booking-website hero pattern. * Ignored under `prefers-reduced-motion: reduce`. */ animateOnEveryView?: boolean; /** Animation duration in milliseconds. Default 1600. */ animateDurationMs?: number; /** * BCP 47 locale used for the per-frame count-up formatting. Falls * back to `locale`, then to the active i18n language. */ animateLocale?: string; /** * Override the locale's thousand / decimal glyphs for the count-up. * Wins over locale defaults. Pass partial overrides — `decimal` * alone is valid; the unspecified separator stays at the locale * default. */ animateSeparators?: { thousand?: string; decimal?: string; }; } export declare const Stat: import("react").ForwardRefExoticComponent>; export {}; //# sourceMappingURL=stat.d.ts.map