import { type ReactNode } from 'react'; /** A bar's color: the theme's accent, a status, or muted for something stopped. */ export type BarTone = 'accent' | 'info' | 'success' | 'warning' | 'error' | 'muted'; declare const trackHeight: { readonly sm: 'h-1'; readonly md: 'h-1.5'; readonly lg: 'h-2'; }; export type BarSize = keyof typeof trackHeight; /** Where a bar's value shows: `beside` its label, over the bar on `tooltip` when * room is short, at the bar's `end` on the same row (so a column of bars lines up), * or `none`. */ export type BarValuePlacement = 'beside' | 'tooltip' | 'end' | 'none'; interface BarProps { /** Shown above the bar, which it names. */ label?: ReactNode; /** Names the bar when nothing visible does. */ 'aria-label'?: string; /** Shown under the bar, such as the amounts behind it. */ detail?: ReactNode; size?: BarSize; /** On the track, such as a fixed `w-24` so bars in a column line up whatever * the value beside them reads. */ trackClassName?: string | undefined; /** The locale the value is written in; the browser's own without it. */ locale?: string | undefined; className?: string; } /** The tone for `value` against a warning and an error level, for a measure * that's worse the higher it reads; `okTone` below the warning. */ export declare function levelTone(value: number, warnAt: number, errorAt: number, okTone?: BarTone): BarTone; /** How full something is, such as storage used or a quota spent: a reading, * not a task under way (that's `ProgressBar`). The bar is blue, then turns * amber, then red, as it passes `warnAt` and `errorAt`; `tone` overrides that. */ export declare function Meter({ value, min, max, warnAt, errorAt, tone, okTone, format, showValue, valueText, getAriaValueText, minFill, animate, locale, label, 'aria-label': ariaLabel, detail, size, trackClassName, className, }: BarProps & { value: number; min?: number; max?: number; /** Levels in the same units as `value`. */ warnAt?: number; errorAt?: number; tone?: BarTone; /** The tone below `warnAt`. Info by default, so the bar reads the same in every * host whatever its accent. */ okTone?: BarTone | undefined; /** How the value itself reads; without it, as a percentage of the range. */ format?: Intl.NumberFormatOptions; showValue?: BarValuePlacement; /** The value as shown, from its formatted text, such as "45% used". */ valueText?: ((formatted: string, value: number) => ReactNode) | undefined; /** The value as read by assistive technology, such as "82%, near limit", for a * level the bar's color alone shows. */ getAriaValueText?: ((formatted: string, value: number) => string) | undefined; /** The narrowest the fill draws for a value above `min`, as a percent of the * track, so a small reading still shows. */ minFill?: number | undefined; /** Grows the fill in from empty when the bar first shows, and eases it to each new value, for a * reading that arrives with the page, such as a dashboard's. Still for anyone who asks for * less motion. */ animate?: boolean | undefined; }): import("react").JSX.Element; /** A further stretch of a progress bar, drawn after its value, such as work * started but not yet done. */ export interface ProgressSegment { /** In the same units as the bar's `max`. */ value: number; tone?: BarTone | undefined; /** At 60% strength, for a stretch that's less settled than the one before it. */ subtle?: boolean | undefined; } /** How far a task has come, such as an upload, out of `max`; `null` while * that's not known. Name it with `label` or `aria-label`. */ export declare function ProgressBar({ value, max, tone, segments, status, format, showValue, valueText, getAriaValueText, locale, label, 'aria-label': ariaLabel, detail, size, trackClassName, className, }: BarProps & { value: number | null; max?: number; tone?: BarTone; /** Further stretches after `value`, in one bar, such as started work after done * work. `value` alone is what the bar reads as to assistive technology. */ segments?: ReadonlyArray | undefined; /** Beside the label in place of the percentage, such as "Completed". */ status?: ReactNode; /** How the value itself reads; without it, as a percentage of `max`. */ format?: Intl.NumberFormatOptions | undefined; /** `beside` the label, at the bar's `end` on the same row, or `none`. */ showValue?: Exclude | undefined; /** The value as shown, from its formatted text, such as "3 of 8 done, 38%". */ valueText?: ((formatted: string | null, value: number | null) => ReactNode) | undefined; /** The value as read by assistive technology. */ getAriaValueText?: ((formatted: string | null, value: number | null) => string) | undefined; }): import("react").JSX.Element; export {};