import * as React from 'react'; export interface FileUploadItem { file: File; status: 'selected' | 'uploading' | 'complete' | 'error'; /** 0..1 while uploading (driven by onUpload's onProgress). */ progress?: number; error?: string; } export interface FileUploadRejection { file: File; reason: 'type' | 'size' | 'count'; } export type FileUploadChangeReason = 'accept' | 'reject' | 'remove' | 'progress' | 'complete' | 'error'; export interface FileUploadChangeDetails { reason: FileUploadChangeReason; rejections?: readonly FileUploadRejection[]; } export interface FileUploadProps extends Omit, 'onError'> { /** Accepted file types, in the native `accept` attribute format. */ accept?: string; /** Allows selecting more than one file. */ multiple?: boolean; /** Maximum size of one file, in bytes. */ maxSize?: number; /** Maximum admitted files. */ maxFiles?: number; /** @deprecated use maxFiles */ /** Maximum number of files. */ maxCount?: number; /** Disables interaction. */ disabled?: boolean; /** Pre-populated file list (stories, controlled seeding). */ defaultItems?: readonly FileUploadItem[]; /** Called on every list mutation with the reason + rejections. */ onValueChange?: (items: FileUploadItem[], details: FileUploadChangeDetails) => void; /** Called with the files that passed the type, size and count checks. */ onFilesAccepted?: (items: FileUploadItem[]) => void; /** Called with the files that failed a check, each with its reason. */ onFilesRejected?: (rejections: FileUploadRejection[]) => void; /** Optional async upload; aborts via signal, drives item.progress via onProgress. */ onUpload?: (file: File, ctx: { signal: AbortSignal; onProgress: (progress: number) => void; }) => Promise; /** Content rendered inside the component. */ children?: React.ReactNode; } export declare function FileUpload({ accept, multiple, maxSize, maxFiles, maxCount, disabled, defaultItems, onValueChange, onFilesAccepted, onFilesRejected, onUpload, children, className, ref, ...rest }: FileUploadProps & { /** Ref to the rendered root element. */ ref?: React.Ref | undefined; }): React.JSX.Element; //# sourceMappingURL=FileUpload.client.d.ts.map