import { FormGroupProps } from "../FormGroup/FormGroup"; import { UploadInputProps } from "../UploadInput/UploadInput"; type FormGroupExposedProps = Pick; export interface UploadFieldProps extends UploadInputProps, FormGroupExposedProps { /** * If a value is set, the field is rendered in its invalid state. */ errorMessage?: string; } /** * The `` component enables users to upload files through a form field. * It wraps the UploadInput with FormGroup for consistent form styling including label, * help text, and error handling. * * ### When to use * - Single file upload in forms (documents, images) * - When you need form field styling (label, validation messages) * - File attachments in form submissions * * ### When not to use * - Drag and drop file uploads - use `DropZone` instead * - Multiple file uploads with preview - consider specialized upload component * - Large file uploads requiring progress indication * * @example Basic usage * ```tsx * import { UploadField } from "@trackunit/react-form-components"; * * handleFileUpload(file)} * /> * ``` * @example With validation * ```tsx * import { UploadField } from "@trackunit/react-form-components"; * * * ``` * @example In a form context * ```tsx * import { UploadField } from "@trackunit/react-form-components"; * * setAttachment(file)} * /> * ``` */ export declare const UploadField: { ({ label, id, tip, helpText, errorMessage, isInvalid, className, value, "data-testid": dataTestId, ref, disabled, required, ...rest }: UploadFieldProps): import("react/jsx-runtime").JSX.Element; displayName: string; }; export {};