/** * Copyright 2019, SumUp Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { type HTMLAttributes } from 'react'; import type { ReturnType } from '../../types/return-type.js'; interface BaseProps extends HTMLAttributes { /** * Choose from 3 sizes. Default: 'm'. */ size?: 's' | 'm' | 'l' /** * @deprecated */ | 'byte' /** * @deprecated */ | 'kilo' /** * @deprecated */ | 'mega'; /** * A descriptive label that is used by screen readers. */ label: string; /** * Visually hide the label. This should only be used in rare cases and only * if the purpose of the field can be inferred from other context. */ hideLabel?: boolean; } interface StepProgressProps { /** * A number greater than zero, indicating how much work the task requires. */ max?: number; /** * A number between 0 and max, indicating how much of the task has been * completed. */ value?: number; } interface TimeProgressProps { /** * The time it takes the progress bar to fill up in milliseconds. */ duration?: number; /** * Whether the progress animation should loop indefinitely. */ loop?: boolean; /** * Whether the animation should the paused. */ paused?: boolean; } export type ProgressBarProps = BaseProps & StepProgressProps & TimeProgressProps; /** * The ProgressBar component communicates the progress of a task or timer * to the user. */ export declare function ProgressBar(props: BaseProps & StepProgressProps): ReturnType; export declare function ProgressBar(props: BaseProps & TimeProgressProps): ReturnType; export {};