import { BoxProps, ElementProps, Factory, MantineColor, MantineSpacing, StylesApiProps } from '@mantine/core'; export type BarsListStylesNames = 'root' | 'bar' | 'barLabel' | 'barValue' | 'labelsRow'; export type BarsListCssVariables = { root: '--bars-list-gap' | '--bars-list-min-bar-size' | '--bars-list-bar-height'; }; export interface BarsListBarData { /** Name of the bar, displayed inside the bar */ name: string; /** Numeric value of the bar */ value: number; /** Bar background color */ color?: MantineColor; /** Bar text color, overrides barTextColor and autoContrast for this specific bar */ textColor?: MantineColor; /** Bar variant, used to calculate text color when autoContrast is enabled */ variant?: 'light' | 'filled'; } export interface BarsListProps extends BoxProps, StylesApiProps, ElementProps<'div'> { /** Data for bars */ data: BarsListBarData[]; /** Function to format value display */ valueFormatter?: (value: number) => string; /** Label displayed above the bars column */ barsLabel?: string; /** Label displayed above the values column */ valueLabel?: string; /** Function to pass props down to the bar depending on the bar data payload */ getBarProps?: (data: BarsListBarData) => React.ComponentProps<'div'>; /** Function to completely customize bar rendering */ renderBar?: (data: BarsListBarData, defaultBar: React.ReactNode) => React.ReactNode; /** Controls gap between bars @default 5 */ barGap?: MantineSpacing; /** Minimum bar width @default 100 */ minBarSize?: number | string; /** Bar height @default 32 */ barHeight?: number | string; /** Default bar background color, used when item does not have color specified */ barColor?: MantineColor; /** Bar text color, overrides autoContrast */ barTextColor?: MantineColor; /** If set, adjusts text color based on background color */ autoContrast?: boolean; } export type BarsListFactory = Factory<{ props: BarsListProps; ref: HTMLDivElement; stylesNames: BarsListStylesNames; vars: BarsListCssVariables; }>; export declare const BarsList: import("@mantine/core").MantineComponent<{ props: BarsListProps; ref: HTMLDivElement; stylesNames: BarsListStylesNames; vars: BarsListCssVariables; }>; export declare namespace BarsList { type Props = BarsListProps; type StylesNames = BarsListStylesNames; type Factory = BarsListFactory; type BarData = BarsListBarData; }