import { LangProps, TPAComponentProps } from '../../types'; export type FileUploadFileState = 'idle' | 'uploading' | 'uploaded' | 'error'; export interface FileUploadFile { file: File; state: FileUploadFileState; errorMessage?: string; } export interface FileUploadProps extends TPAComponentProps, LangProps { /** * The accept attribute takes as its value a comma-separated list of one or more file types, or unique file type specifiers, describing which file types to allow. */ accept?: string; /** * Label for the input. */ label?: string; /** * If passed, an error will be shown below the input. */ errorMessage?: string; /** * Enhanced list of files. Each file has its state and error. */ files?: FileUploadFile[]; /** * Sets whether the input should accept multiple files. */ multiple?: boolean; /** * Text for the button. */ buttonText?: string; /** * Text which appears below the input when no file is selected. */ explanationText?: string; /** * Callback function fired after files have been selected. */ onChange?(files: FileList): void; /** * Callback function called with index of the file to be removed. Fires when the delete button is clicked next to a file. */ onDeleteClick?(index: number): void; /** * Text shown in the popover of delete button. */ deleteText?: string; /** * Disables the button. */ disabled?: boolean; 'aria-describedby'?: string; 'aria-label'?: string; } export interface FileUploadDefaultProps { multiple: boolean; } //# sourceMappingURL=types.d.ts.map