import React from 'react'; import '../../styles/base.module.css'; import { InputWrapperProps } from '../../internal/input-wrapper/InputWrapper'; type Language = 'en' | 'fi' | 'sv'; export type FileInputProps = Omit & { /** * A comma-separated list of unique file type specifiers describing file types to allow. If present, the filename extension or filetype property is validated against the list. If the file(s) do not match the acceptance criteria, the component will not add the file(s), and it will show an error message with the file name. */ accept?: string; /** * The label for the file button. Overrides default text. The button is not visible for assistive technology */ buttonLabel?: string; /** * Additional class names to apply to the file input */ className?: string; /** * Default selected files for the input */ defaultValue?: File[]; /** * If `true`, the file input will be disabled */ disabled?: boolean; /** * If `true`, the file input will have a drag and drop area */ dragAndDrop?: boolean; /** * Overrides default drag and drop area text */ dragAndDropLabel?: string; /** * Overrides default label text between the drag and drop area and the input */ dragAndDropInputLabel?: string; /** * The label for the input */ label: string; /** * The language of the component. It affects which language is used to present component-specific messages, labels, and aria-labels * * @default "fi" */ language?: Language; /** * Minimum file size in bytes. If present, the file size is compared to this property. If the file(s) size property is smaller than the min size, the component will not add the file(s), and it will show an error message with the file name. */ minSize?: number; /** * Maximum file size in bytes. If present, the file size is compared to this property. If the file(s) size property is larger than the max size, the component will not add the file(s), and it will show an error message with the file name. */ maxSize?: number; /** * A Boolean that indicates that more than one file can be chosen */ multiple?: boolean; /** * Callback fired when the list of files changes */ onChange: (files: File[]) => void; }; export declare const formatBytes: (bytes: number) => string; export declare const FileInput: ({ id, label, buttonLabel, language, defaultValue, disabled, dragAndDrop, dragAndDropLabel, dragAndDropInputLabel, minSize, maxSize, className, successText, errorText, helperText, infoText, onChange, required, style, accept, multiple, tooltip, ...restWrapperProps }: FileInputProps) => React.JSX.Element; export {};