import React from 'react'; import type { EitherInclusive } from '../../util/utility-types'; export type ProgressBarProps = { /** * CSS class names that can be appended to the component. */ className?: string; /** * CSS properties defined for the progress bar track. Includes the component's CSS Custom Properties: * * - `--progress-bar__bg` * - `--progress-bar__fg` */ style?: ProgressBarCSSProperties; /** * Determines the usage context of the progress bar. * * Labels and value strings are only valid for `context`=`standalone`. * * Never use `context`=`embedded` unless as a child of a container. * * **Default is `"standalone"`**. */ context?: 'embedded' | 'standalone'; /** * Determine whether the labels sit above or to the left of the progress bar * * **Default is `"vertical"`**. */ labelLayout?: 'horizontal' | 'vertical'; /** * The maximum numeric value allowed for the progress bar. * * ** Default is `1`**. */ max?: number; /** * The “filled” portion of the progressBar is determined by the relationship between the minValue, maxValue, and Value. The var fills to a percentage = (value)/(maxValue–minValue). * * Value used by component is a number between 0 and 1. */ value: number; /** * Human-readable representation of the progress shown in the bar. */ valueLabel?: string; } & EitherInclusive<{ /** * Visible text label for the component. */ descriptionLabel: string; }, { /** * Aria-label to provide an accesible name for the text input if no visible label is provided. */ 'aria-label': string; }>; export interface ProgressBarCSSProperties extends React.CSSProperties { /** * Custom property to customize the background color of this component (e.g., background color) */ '--progress-bar__bg'?: string; /** * Custom property to customize the foreground color of this component (e.g., text, icon, etc.) */ '--progress-bar__fg'?: string; } /** * BETA: This component is still a work in progress and is subject to change. * * ## Usage * * Show the level of completeness for a given task or process. Indicate the percentage of * completion for a discrete number of steps. Not to be confused with the `LoadingIndicator`, which * covers waiting rather than measured progress. * * | Type/Use | Description | Example | * |----------|-------------|---------| * | Standalone | The default. Shows the bar with its labels above or beside it, set by `labelLayout`. | Page-level progress after a user action. | * | Embedded | `context="embedded"` drops the labels and lets the bar sit flush with its container's edges. | A bar along the edge of a `Modal` or `Card`. | * * `ProgressBar` can be the child of a container like `Modal` or `Card`. When used in such a * container, `context`=`embedded` should be used to ensure the left and right edges of the * progressBar sit flush within the edges of the container. * * `value` is read against `max` (default `1`) and clamped to that range, so the bar cannot report * below zero or above 100%. Supply `valueLabel` to replace the computed percentage with your own * text, or pass an empty string to suppress it. * * ## Content & Accessibility * * ### Do's * * * Use `ProgressBar` when content can be progressively completed and is triggered by user action (e.g., a click of a button) at the page level. * * Use `ProgressBar` to show a measure within a form or other display, where the bar is static and reflects useful details. * * Give every bar a name. The type requires either a visible `descriptionLabel` or an `aria-label`, which matters most for `context="embedded"`, where no visible label renders. * * ### Don'ts * * * Avoid using `ProgressBar` when you have a wizard-like, paginated experience. Use `VisualPageIndicator` instead. * * Avoid `ProgressBar` without labels for user feedback. */ export declare const ProgressBar: { ({ className, context, descriptionLabel, labelLayout, max, style, value, valueLabel, ...other }: ProgressBarProps): React.JSX.Element; displayName: string; };