import { CSSProperties, ReactElement, ReactNode } from 'react'; import { ChartLoadingStyle, ChartEmptyState, ChartMotion, ChartPalette, ChartStyle, ChartSurface, CardLegend, ChartLegendSwatch } from '../types'; import { CardRange } from './cartesian-card'; import { NumericKey, TextKey } from './keys'; import { AnimatedNumberVariant } from '../motion/animated-number'; export interface FunnelChartCardProps> { /** Optional visible title. Use aria-label to name an embedded chart. */ title?: string; /** Show the header, including headline and period controls. Defaults to true. */ header?: boolean; /** Accessible name, independent of the visible title. */ 'aria-label'?: string; /** One row per stage, in funnel order. Omit when `ranges` supplies the data. */ data?: readonly Row[]; /** Text field that names each stage. Names must be unique. */ category: TextKey; /** How many reached each stage. Counts never rise from one stage to the next. */ value: Key; /** `smooth` (default) eases each stage into the next; `linear` tapers in straight lines. */ curve?: 'smooth' | 'linear'; /** `stages` (default) gives each stage its own palette color; `single` uses one color. */ colors?: 'stages' | 'single'; /** A quiet full-height lane behind each stage, marking where 100% sits. Defaults to false. */ tracks?: boolean; /** * Gives the funnel depth: a pipe seen a little from the right, every stage shaded as a cylinder * of its own thickness, with curved seams and elliptical ends. Band heights still read true. */ depth?: boolean; /** Plot height in pixels. Defaults to 180. */ height?: number; /** Resting headline. Defaults to the first stage. */ headline?: number; /** Fractional change shown as a chip, e.g. 0.052 → +5.2%. */ delta?: number; deltaTone?: 'default' | 'inverse' | 'neutral'; /** Static period label, e.g. "Last 7 days". */ range?: string; /** Period select. Each range replaces data, delta, and headline; bands ease to their new size. */ ranges?: readonly CardRange[]; defaultRange?: string; /** * How the legend lays out: value `tiles` (default), compact `inline` labels, `list` rows, tinted * `pills`, or `bars` that also draw each value against the largest. * False removes the legend without changing the data or marks. */ legend?: CardLegend | false; /** The mark beside each legend label: `square` (default), `dot`, or `line`. */ legendSwatch?: ChartLegendSwatch; valueFormat?: Intl.NumberFormatOptions; locale?: string; formatValue?: (value: number) => string; /** Any CSS color for `colors="single"`. Defaults to the palette's first color. */ color?: string; surface?: ChartSurface; /** A glass tab tucked behind the card's top edge, e.g. a caption, a command, or actions. */ badge?: ReactNode; /** Headline motion: `count` (default), `pop`, `slide`, `roll`, `flow`, or `scramble`. */ numberStyle?: AnimatedNumberVariant; /** * The pinned stage, by name, for a selection you own: external filters and a click on the * chart then share it. `null` pins nothing. Omit it and the card keeps its own pin. */ selected?: string | null; /** Asked when a click, tap, or Escape pins or releases a stage. */ onSelectedChange?: (stage: string | null) => void; palette?: ChartPalette; loading?: boolean; loadingStyle?: ChartLoadingStyle; /** * What the card shows when the period has no data: `dots` (default), the chart's own `shape`, * your own element such as `No visits yet`, or `null` for nothing. */ empty?: ChartEmptyState; /** `none` turns off decorative motion; reduced-motion users get this automatically. */ motion?: ChartMotion; className?: string; style?: CSSProperties | ChartStyle; } /** Share of the first stage as text; anything above zero but under 1% says so. */ export declare function stageShare(share: number | null): string; /** * The band of one stage in a 100-wide column of a 100-tall plot: it holds its own height, then * reaches the next stage's height at the column edge. The last stage and stages before a gap * stay level. */ export declare function stagePath(index: number, height: number, next: number | null, curve: 'smooth' | 'linear'): string; /** * Upright strips that tile one stage's band from left to right, each as tall as the band where * it stands, so a gradient mapped to each strip shades the band like a cylinder of that local * thickness. Strips overlap a little; the stage's own outline trims them. */ export declare function pipeStrips(index: number, height: number, next: number | null, curve: 'smooth' | 'linear'): { x: number; width: number; half: number; }[]; /** Half of a pipe's elliptical cross-section at `x`: the side facing `right` or left. */ export declare function pipeEnd(x: number, half: number, rx: number, side: 'left' | 'right'): string; /** * A funnel card: stages left to right, each band sized by its share of the first stage, with * its percentage on the band and its count in a tile beneath. Hovering a stage reads it in the * headline with the conversion from the step before. */ export declare function FunnelChartCard>({ title, header, 'aria-label': ariaLabel, data: suppliedData, category, value, curve, colors, tracks, depth, height, headline: suppliedHeadline, delta: suppliedDelta, deltaTone, range, ranges, defaultRange, valueFormat, legend, legendSwatch, locale, formatValue: suppliedFormatValue, color, surface, badge, numberStyle, palette, selected, onSelectedChange, loading, loadingStyle, empty: emptyState, motion: motionMode, className, style, }: FunnelChartCardProps): ReactElement;