import { default as React } from 'react'; import { FormRowProps } from '../../FormRow/FormRow'; import { FileItemProps } from '../../Inputs/FileInput/FileItem'; import { FileInputItem, FileInputOptions, StoredFile } from '../../Inputs/FileInput/hooks'; export type { FileInputItem as FileFieldItem, StoredFile } from '../../Inputs/FileInput/hooks'; /** @inheritdoc */ export interface FileFieldProps extends Omit, FileInputOptions, Pick { /** * Id of the input button * @default undefined * */ id?: string; /** * The error message to display. * If an array is provided, the error message will be displayed per file. * @default undefined */ error?: string | string[]; /** * The warning message to display. * If an array is provided, the warning message will be displayed per file. * @default undefined */ warning?: string | string[]; /** * The hint message to display. * If an array is provided, the hint message will be displayed per file. * @default undefined */ hint?: string | string[]; /** * The label after an uploaded file. * If a function is provided, it will be called for each uploaded file. * If a React node is provided, it will be displayed for each uploaded file. * @default undefined */ labelAfter?: React.ReactNode | ((file: FileInputItem) => React.ReactNode); /** * The label for the file input field. */ label: string; /** * Function to provide an image preview URL for a stored file or a URL string. * Called only for `StoredFile` and `string` items — local `File` objects * always use their own `createObjectURL` preview. * Defaults to `FileField.getPreviewSrc`, which delegates to `getImagePreviewSource`: * it returns the value as-is for `string` items that look like an image URL and * always returns `undefined` for `StoredFile`. Provide a custom implementation if you * need previews for `StoredFile` items. */ getPreviewSrc?: (file: StoredFile | string) => string | undefined; } export declare const FileField: React.ForwardRefExoticComponent>;