import { CSSProperties, ReactElement, ReactNode } from 'react'; import { ChartLoadingStyle, ChartEmptyState, ChartMotion, ChartPalette, ChartStyle, ChartSurface, RankingOrder } from '../types'; import { CardRange } from './cartesian-card'; import { NumericKey, TextKey } from './keys'; import { AnimatedNumberVariant } from '../motion/animated-number'; export { rankRows } from './rank'; export interface HorizontalBarChartCardProps> { /** 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 category. Omit when `ranges` supplies the data. */ data?: readonly Row[]; /** Text field that names each row. Names must be unique. */ category: TextKey; /** Numeric field to rank by. `null` rows show "No data" and sort last. */ value: Key; /** Resting headline. Defaults to the total of every row. */ headline?: number; /** Fractional change shown as a chip, e.g. 0.082 → +8.2%. */ delta?: number; deltaTone?: 'default' | 'inverse' | 'neutral'; /** Static period label, e.g. "This month". */ range?: string; /** Period select. Each range replaces data, delta, and headline; rows re-rank smoothly. */ ranges?: readonly CardRange[]; defaultRange?: string; /** `descending` (default) puts the largest first; `input` keeps your order. */ sort?: RankingOrder; /** Show the first rows only and add the rest together as one "Other" row. */ limit?: number; /** Label of the combined row. Defaults to "Other". */ otherLabel?: string; /** Each row's share of the total. Defaults to true; hidden when values are negative. */ share?: boolean; /** Number each row by rank. Defaults to false. */ rank?: boolean; /** * `inline` (default) sets each label on a soft bar; `track` draws a slim bar under the label; * `isometric` draws a solid block under the label whose front ends at the value, with a lit * roof and a shaded end receding behind it. */ barStyle?: 'inline' | 'track' | 'isometric' | 'lollipop'; /** Shorthand for depth across every card family: here it makes `barStyle` default to `isometric`. */ depth?: boolean; valueFormat?: Intl.NumberFormatOptions; locale?: string; formatValue?: (value: number) => string; /** Any CSS color for the bars. 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 category, 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 category. */ onSelectedChange?: (category: 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; } /** * A ranked list card: each row carries a bar, its value, and its share of the total. Hovering a * row reads it in the headline; click pins it and the arrow keys move through the list. */ export declare function HorizontalBarChartCard>({ title, header, 'aria-label': ariaLabel, data: suppliedData, category, value, headline: suppliedHeadline, delta: suppliedDelta, deltaTone, range, ranges, defaultRange, sort, limit, otherLabel, share, rank, depth, barStyle, valueFormat, locale, formatValue: suppliedFormatValue, color, surface, badge, numberStyle, palette, selected, onSelectedChange, loading, loadingStyle, empty: emptyState, motion: motionMode, className, style, }: HorizontalBarChartCardProps): ReactElement;