import { SvDataError } from "@styloviz/core"; import * as i0 from "@angular/core"; /** * @deprecated The free card has one colour treatment, so this type has one * value and changes nothing. Kept so 1.x code compiles; removed in 2.0. The six * semantic colour variants are Pro: `sv-stat-card-pro [variant]`. */ export type StatCardVariant = 'default'; export type StatCardTrend = 'up' | 'down' | 'neutral'; export type StatCardLayout = 'default' | 'compact' | 'horizontal' | 'minimal'; /** A single point in the inline sparkline (value 0–100 scale, or raw). */ export interface SparkPoint { value: number; label?: string; } /** * All data needed to render a StatCard. * Pass these individually as inputs or compose them into a stats object. */ export interface StatCardData { title: string; value: string | number; previousValue?: string | number; prefix?: string; suffix?: string; trend?: StatCardTrend; trendValue?: number; trendPercent?: number; trendLabel?: string; /** Name of an icon in `@styloviz/icons` (was a raw SVG path + viewBox). */ icon?: string; /** @deprecated Has no effect on the free card; removed in 2.0. See {@link StatCardVariant}. */ variant?: StatCardVariant; sparkline?: SparkPoint[]; loading?: boolean; description?: string; linkLabel?: string; } /** * StatCard — A metric summary card for dashboards. * * Features: * - 4 layout modes: default · compact · horizontal · minimal * - Neutral colour treatment (the six semantic colour variants are Pro: `sv-stat-card-pro [variant]`) * - Trend indicator (up / down / neutral) with % and absolute delta * - Inline SVG sparkline chart (no external lib) * - Skeleton loading state * - Accessible markup (aria-label, role="status") * - Click-through CTA link slot */ export declare class SvStatCardComponent { /** Card title / metric label. */ title: import("@angular/core").InputSignal; /** Primary metric value — string or number, displayed as-is or formatted. */ value: import("@angular/core").InputSignal; /** Optional prefix rendered before the value (e.g. "$", "€"). */ prefix: import("@angular/core").InputSignal; /** Optional suffix rendered after the value (e.g. "K", "%", "ms"). */ suffix: import("@angular/core").InputSignal; /** Short helper text beneath the title (e.g. "Last 30 days"). */ description: import("@angular/core").InputSignal; /** Direction of change. @default 'neutral' */ trend: import("@angular/core").InputSignal; /** Absolute delta value shown alongside the trend icon. */ trendValue: import("@angular/core").InputSignal; /** Percentage change shown in the trend chip. */ trendPercent: import("@angular/core").InputSignal; /** Comparison context label (e.g. "vs last month"). @default '' */ trendLabel: import("@angular/core").InputSignal; /** * When this figure was last refreshed, as `YYYY-MM-DD` or an ISO timestamp. * * ★★★ A CACHED KPI LOOKS IDENTICAL TO A LIVE ONE. A number is a number, and * nothing about a stale one announces itself — so the reader assumes the * dashboard is current, which is exactly the assumption a broken pipeline * exploits. * * ★ This is in the FREE tier deliberately. Telling a reader their figure may * be out of date is an honesty feature, not a premium one, and a free card * that hides staleness is the defect rather than a smaller version of it. * @default '' */ updatedAt: import("@angular/core").InputSignal; /** How many minutes before the figure is called out as possibly stale. @default 60 */ staleAfterMinutes: import("@angular/core").InputSignal; /** Where the figure came from — a warehouse, a job, a service. @default '' */ source: import("@angular/core").InputSignal; /** * Deprecated, and has no effect: the free card has one colour treatment. * * @deprecated Kept so 1.x templates compile; removed in 2.0. For the six * semantic colour variants use `sv-stat-card-pro [variant]`. * @default 'default' */ variant: import("@angular/core").InputSignal<"default">; /** Card layout mode. @default 'default' */ layout: import("@angular/core").InputSignal; /** * Name of an icon in `@styloviz/icons`, e.g. `'trending-up'`. * * This was `iconPath` — a raw `` — with a companion * `iconViewBox` because a pasted path might be 20-box or 24-box. Both are * gone: a library name is always 24-box, and the viewBox binding is what hid * these glyphs from `check:ui` in the first place (a bound `viewBox` does not * match a literal `viewBox="…"` test). */ icon: import("@angular/core").InputSignal; /** SVG viewBox for the icon. @default '0 0 24 24' */ /** * Array of data points for the inline sparkline. * Values should be on a consistent numeric scale; the component * normalises them internally. Empty array hides the sparkline. */ sparkline: import("@angular/core").InputSignal; /** Show skeleton loading shimmer instead of content. @default false */ loading: import("@angular/core").InputSignal; /** * The figure could not be loaded. Rendered in place of the metric, because a * card that keeps showing a stale number after a failed refresh is worse than * one that admits it: the reader has no way to tell the two apart. * * Use `toSvDataError()` from `@styloviz/core` to normalize an `HttpErrorResponse`. * @default null */ error: import("@angular/core").InputSignal; /** Label for the bottom "view more" link. Empty string hides the link. */ linkLabel: import("@angular/core").InputSignal; /** Additional CSS classes merged on the root card element. */ customClass: import("@angular/core").InputSignal; /** * Deprecated, and never emitted: the free card is not interactive. * * @deprecated Kept so 1.x templates compile; removed in 2.0. For a card that * activates on click, Enter or Space use `sv-stat-card-pro [clickable]` * with its `(cardClick)`. */ cardClick: import("@angular/core").OutputEmitterRef; /** Emitted when the "view more" link is clicked. */ linkClick: import("@angular/core").OutputEmitterRef; /** The host should re-run the failed load. */ retry: import("@angular/core").OutputEmitterRef; /** * How old the figure is, in whole minutes, or `null` when it does not say. * * ★ A bare `YYYY-MM-DD` is read as a LOCAL calendar day. `new Date()` on that * form is UTC midnight, which is the previous day west of Greenwich — * enough to report this morning's refresh as a day old. */ readonly ageInMinutes: import("@angular/core").Signal; /** True when the figure is old enough that it should not be read as current. */ readonly isStale: import("@angular/core").Signal; /** The freshness line, in words. */ readonly freshnessLabel: import("@angular/core").Signal; /** True when a trend figure is shown with nothing to compare it against. */ readonly trendPeriodMissing: import("@angular/core").Signal; /** * The trend, as a screen reader should hear it. * * ★★★ "+12%" AGAINST LAST WEEK, LAST MONTH AND LAST YEAR ARE THREE DIFFERENT * CLAIMS. A sighted reader sees the figure in the context of the dashboard * around it; a screen-reader user gets the number alone. */ readonly trendAriaLabel: import("@angular/core").Signal; /** The metric itself is only shown once there is one: not loading, not failed. */ showBody: import("@angular/core").Signal; hasIcon: import("@angular/core").Signal; hasSparkline: import("@angular/core").Signal; hasLink: import("@angular/core").Signal; hasTrend: import("@angular/core").Signal; /** Formatted value — passes numbers through DecimalPipe logic, strings untouched. */ displayValue: import("@angular/core").Signal; /** Formatted trend percent string, e.g. "12.4%". */ displayTrendPercent: import("@angular/core").Signal; /** Icon wrapper background + text. */ iconClasses: import("@angular/core").Signal; /** Border color for the card — subtle gray, no colored accent. */ accentClass: import("@angular/core").Signal; /** Trend chip color classes. */ trendClasses: import("@angular/core").Signal; /** Left accent bar + background tint for the minimal layout. */ minimalAccentClass: import("@angular/core").Signal<{ bar: string; bg: string; }>; /** Plain trend text color used by the minimal layout (no pill). */ minimalTrendColor: import("@angular/core").Signal; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }