import { FC } from 'react'; import { ButtonProps } from '../Button'; export interface FileDescriptor { /** File name to display to user in case you want to override file.name */ displayName?: string; /** Direct link to file download */ downloadLink?: string; /** Original file descriptor or at least file name (in case you've got file somewhere not from user input) */ file: File | string; /** A number from 0-100 range used to show upload progress. Undefined if no upload is going on. */ uploadProgress?: number; } export declare const isFileDescriptor: (toBeDetermined: any) => toBeDetermined is FileDescriptor; export interface FilePickerPropsStrict { /** Specifiers for file types allowed to upload. Can be any value valid for accept attribute */ accept?: string; /** Aligns the content within the page */ align?: 'left' | 'center'; /** Button label */ buttonLabel?: string; /** Property options for the button */ buttonProps?: ButtonProps; /** Disabled and unclickable */ disabled?: boolean; /** Layout type for a list of uploaded files */ layout?: 'grid' | 'list'; /** Indicates FilePickerMulti that no more files are allowed to add */ limitReached?: boolean; /** Allow more then one file to be selected */ multiple?: boolean; /** Delete file event; file === one from value */ onDelete?(file: FileDescriptor): void; /** Download file(???) event; file === one from value */ onDownload?(file: FileDescriptor): void; /** Event fired when user wants to replace one file with another; file === one from value */ onReplace?({ file, newFile, }: { file: FileDescriptor; newFile: File; }): void; /** Event fired when file(s) are selected by user */ onSelected(files: FileList): void; /** Types note text */ typesNote?: string | null; /** @deprecated - Use flex box display for the items */ useFlex?: boolean; /** FileDescriptor or array of FileDescriptors */ value?: FileDescriptor | FileDescriptor[]; } export interface FilePickerProps extends FilePickerPropsStrict { /** Unstrict Props */ [propName: string]: any; } export declare const FilePicker: FC;