UNPKG

@coconut-software/ui

Version:

React components for faster and easier web development.

55 lines (54 loc) 1.77 kB
import type { PropsWithChildren } from 'react'; import type { AriaLiveRole } from '../utilities/aria'; type DescriptionProps = { inverse?: boolean; role?: AriaLiveRole; }; type BaseProgressProps = { 'aria-label'?: string; 'aria-labelledby'?: string; 'aria-valuetext'?: string; color?: ProgressColor; id?: string; size?: ProgressSize; variant?: ProgressVariant; }; type DeterminateProgressProps = BaseProgressProps & { value: number; }; type IndeterminateProgressProps = BaseProgressProps & { value?: never; }; type ProgressColor = 'info' | 'inverse' | 'primary' | 'secondary'; type ProgressColors = { [key in ProgressColor]: { bar: { circular: string; linear: string; }; track: { linear: string; }; }; }; type ProgressProps = DeterminateProgressProps | IndeterminateProgressProps; type ProgressVariant = 'circular' | 'linear'; export type ProgressSize = 'large' | 'medium' | 'small'; export type ProgressVariantProps = { 'aria-label'?: string; 'aria-labelledby'?: string; 'aria-valuetext'?: string; 'aria-valuemax'?: number; 'aria-valuemin'?: number; 'aria-valuenow'?: number; color: ProgressColor; id?: string; size?: ProgressSize; value?: number; }; export declare const colors: ProgressColors; declare function Progress({ 'aria-label': label, 'aria-labelledby': labelledBy, 'aria-valuetext': valueText, children, color, id, size, value, variant, }: PropsWithChildren<ProgressProps>): JSX.Element; declare namespace Progress { var Description: ({ children, inverse, role, }: PropsWithChildren<DescriptionProps>) => JSX.Element; } export default Progress;