import type { CSSProperties, ReactNode } from 'react'; import type { SxProp } from '../Layout/sx.js'; import type { FileRejection, UseFileDropOptions } from './useFileDrop.js'; export interface FileUploaderItem { /** Stable identifier for the row. */ id: string; file: File; /** Upload progress, 0–100. Omit for no bar. */ progress?: number; /** Row state. Default: `'uploading'` while `progress < 100`, else `'done'`. */ status?: 'uploading' | 'done' | 'error'; /** Message shown on a failed row. */ error?: ReactNode; } export interface FileUploaderProps extends Omit { /** Fired with `(accepted, rejected)` after each drop or browse. */ onDrop?: (accepted: File[], rejected: FileRejection[]) => void; /** Primary call-to-action line. */ label?: ReactNode; /** Secondary hint under the label (e.g. accepted types / max size). */ hint?: ReactNode; /** Replace the leading icon. */ icon?: ReactNode; /** Custom body; overrides the default icon + text. */ children?: ReactNode; /** * Render a list of files below the dropzone with per-file progress, errors * and retry. The consumer owns upload state and updates `progress` / `status`. */ files?: FileUploaderItem[]; /** Show a Retry button on `status: 'error'` rows. */ onRetry?: (item: FileUploaderItem) => void; /** Show a remove (×) button on each row. */ onRemove?: (item: FileUploaderItem) => void; /** Show image thumbnails for image files in the list. */ showPreviews?: boolean; /** Accept files pasted from the clipboard while the dropzone is focused. */ allowPaste?: boolean; /** Browse-button label. Set to `false` to hide the button. */ buttonLabel?: ReactNode | false; size?: 'sm' | 'md'; className?: string; /** Inline style applied to the dropzone root. */ style?: CSSProperties; /** * One-off CSS, same as `Box`'s `sx`: each value may be a scalar or a * responsive breakpoint map (`{ base, sm, md, lg, xl }`). Scalar-only sx * merges into inline style; responsive sx injects a scoped class. */ sx?: SxProp; } export declare const FileUploader: import("react").ForwardRefExoticComponent>;