import { FeedbackTextProps } from '../../../../tedi/components/form/feedback-text/feedback-text'; import { FormLabelProps } from '../../../../tedi/components/form/form-label/form-label'; export interface FileUploadFile extends Partial { id?: string; /** * Is the file currently loading. Used when files are uploaded immediately */ isLoading?: boolean; } export type FileRejectionType = 'size' | 'extension'; export interface RejectedFile { type: FileRejectionType; file: File; } export interface FileUploadProps extends FormLabelProps { /** * Additional classes. */ className?: string; /** * Field name */ name: string; /** * FileUpload helper */ helper?: FeedbackTextProps; /** * The accept attribute value is a string that defines the file types the file input should accept * For example '.pdf,.jpg' */ accept?: string; /** * When the multiple Boolean attribute is true, the file input allows the user to select more than one file. */ multiple?: boolean; /** * onChange handler */ onChange?: (files: FileUploadFile[]) => void; /** * defaultValue */ defaultFiles?: FileUploadFile[]; /** * onDelete handler */ onDelete?: (file: FileUploadFile) => void; /** * Value of input to control input value from outside of component. * Do not use with defaultValue */ files?: FileUploadFile[]; /** * Is the fileUpload read-only */ readOnly?: boolean; /** * If fileUpload is disabled. * @default false */ disabled?: boolean; /** * Size limit in megabytes */ maxSize?: number; } export declare const FileUpload: (props: FileUploadProps) => JSX.Element; export default FileUpload;