/** BarChart — recharts internals, data props only, the screen's own text (W2 §The Kit). */ import { Bar } from "recharts"; import type { ComponentProps, ReactNode } from "react"; import { type KitStyled, type KitEngine, type KitRendered } from "../tokens.js"; import { type ChartFormat } from "./sanitize.js"; import type { SeriesInput } from "./line.js"; /** Plus `format`: a bar carries its VALUE as a label, and the formatter lives on * the SERIES rather than on the chart, because two series in different units (an * amount and a count) have no one text a chart-level formatter could write for * both. */ type BarSeriesInput = SeriesInput, "format"> & { format?: ChartFormat; }>; interface BarChartOwnProps extends KitStyled { data: Array>; xKey: string; series: BarSeriesInput[]; /** Stack the series into one bar per category. */ stacked?: boolean; /** Horizontal bars (good for ranked lists). */ horizontal?: boolean; height?: number; emptyState?: string; /** Kit elements shown in place of `emptyState` when there is nothing to plot. */ empty?: ReactNode; /** Kit value components composed for the hovered bar, in place of the default * tooltip. Written as a function of the bar's row, it arrives as ONE element * per row in `data` order. */ tooltip?: ReactNode | readonly ReactNode[]; /** A series key drawn under the chart. */ legend?: ReactNode; } /** Plus any recharts `` prop, handed to EVERY bar. It arrives AFTER the * Kit's own defaults, so `fill` wins, and BEFORE `dataKey`/`name`, which the * component owns — an overridden one would plot a field that is not there. */ export type BarChartProps = BarChartOwnProps & KitEngine, BarChartOwnProps, "dataKey" | "name">; export declare function BarChart({ data, xKey, series, stacked, horizontal, height, emptyState, empty, tooltip, legend, style, children, pending, ...engine }: BarChartProps & KitRendered): import("react").JSX.Element; export {};