import{type TemplateResult}from'lit';import{LyraElement}from'../../../internal/lyra-element.js'; /** One ordered step of a conversion funnel. */ export interface LyraFunnelStage{ /** Stage name, rendered beside the bar and read as the row's own text. Caller-owned copy. */ readonly label:string; /** Absolute count or measure for the stage. Non-finite input is treated as 0. */ readonly value:number; /** CSS color for this stage's bar. Unparseable values fall back to the shared bar color. */ readonly color?:string;} /** * `` — a dependency-free conversion funnel: an ordered set of stages, each drawn as a * bar whose length is that stage's share of the FIRST stage, read top-to-bottom as progressive * drop-off. * * This is an analytics primitive rather than a general chart type — a sibling of `` and * `` rather than of the Chart.js-backed chart family, and it pulls no charting peer. * It renders plain HTML, so stage names, absolute values, shares and drop-off percentages are real * text in the DOM rather than a sighted-only drawing with a separate transcript bolted on. * * A funnel is deliberately not a sorted bar chart: it normalizes to the first stage instead of the * data maximum, draws no value axis, and reads as stage-to-stage retention rather than category * comparison. * * Degenerate inputs are defined rather than avoided: * * - An empty series renders the localized empty state and no list. * - A single stage renders one full-length bar and no drop-off row. * - A zero or negative first stage cannot define a share, so shares and drop-off percentages are * omitted, every bar is zero-length, and the absolute values still render. * - A stage larger than its predecessor (funnel re-entry) reports its true share above 100% in * text while its bar clamps to the track, carrying the extra bar-overflow part token. * Finite values whose positive ratio overflows also fill the main or comparison track. * - A comparison series of a different length pairs by index: extra comparison entries are * ignored, and stages past its end simply get no comparison bar. * - Malformed/non-record entries and records without a string `label` are omitted while later * valid neighbors remain in either series; caller-owned arrays are never rewritten. * * @customElement lr-funnel * @csspart base - The container element. * @csspart stages - The ordered list of stages. * @csspart stage - One stage row. * @csspart dropoff - The change from the previous stage, above each stage after the first. * @csspart stage-header - The text row above a stage's bar. * @csspart stage-label - A stage's name. * @csspart stage-value - A stage's absolute value. * @csspart stage-share - A stage's share of the first stage. * @csspart comparison-value - The comparison series' share for a stage. * @csspart track - The full-length groove a stage's bar is drawn in. * @csspart bar - A stage's bar. * @csspart bar-overflow - Added to bar when the stage exceeds the first stage. * @csspart comparison-bar - The comparison series' outline drawn behind a stage's bar. * @csspart empty - The empty state shown when there are no stages. * @cssprop [--lr-funnel-bar-color=var(--lr-color-brand)] - Fill of every stage bar that has no own color. * @cssprop [--lr-funnel-comparison-color=var(--lr-color-border-strong)] - Outline of the comparison bars. * @cssprop [--lr-funnel-track-color=var(--lr-color-surface-raised)] - Background of the bar track. * @cssprop [--lr-funnel-bar-size=var(--lr-size-1-5rem)] - Thickness of a stage's track. * @status experimental * @since 12.0.0 */ export declare class LyraFunnel extends LyraElement{static styles:import("lit").CSSResultGroup[]; /** The ordered stages, first to last. Every share is measured against the first entry. */ stages:readonly LyraFunnelStage[]; /** * An optional baseline/peer cohort drawn behind each bar as an outline. It is normalized to its * OWN first stage, so a funnel's shape stays comparable against a baseline whose absolute * volumes are not comparable at all. */ comparison:readonly LyraFunnelStage[]; /** Name for the comparison series. Falls back to a localized generic label. */ comparisonLabel:string; /** Accessible name for the stage list. A host `aria-label` wins over it. */ label:string; /** Whether the change from the previous stage is rendered above each later stage. */ dropoff:boolean; /** Fraction digits used for every share and drop-off percentage. */ sharePrecision:number;private get precision();private formatValue;private formatShare;private validStages; /** Resolves every stage's geometry and text inputs in one pass so render stays declarative. */ private resolveStages; /** Clamped bar length as a CSS percentage; a share above 1 fills the track without spilling. */ private barLength;private changeText;private renderStage;render():TemplateResult;}declare global{interface HTMLElementTagNameMap{'lr-funnel':LyraFunnel;}}