UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

17 lines (16 loc) 1.26 kB
import { FieldProps } from '../../types'; import { UploadFile, UploadFileNative, UploadProps } from '../../../../components/Upload'; import { SpacingProps } from '../../../../shared/types'; export type { UploadFile, UploadFileNative }; export type UploadValue = Array<UploadFile | UploadFileNative>; export type Props = Omit<FieldProps<UploadValue, UploadValue | undefined>, 'layout' | 'layoutOptions' | 'onBlurValidator' | 'onChangeValidator' | 'contentWidth' | 'labelSize' | 'labelDescriptionInline' | 'labelSrOnly' | 'labelSize'> & SpacingProps & Pick<Partial<UploadProps>, 'children' | 'title' | 'variant' | 'text' | 'acceptedFileTypes' | 'filesAmountLimit' | 'fileMaxSize' | 'onFileDelete' | 'onFileClick' | 'skeleton' | 'download' | 'allowDuplicates' | 'buttonProps' | 'disableDragAndDrop'> & { fileHandler?: (newFiles: UploadValue) => UploadValue | Promise<UploadValue>; onValidationError?: (invalidFiles: UploadValue) => UploadValue | void; width?: 'large' | 'stretch'; }; declare function UploadComponent(props: Props): import("react/jsx-runtime").JSX.Element; declare namespace UploadComponent { var _supportsSpacingProps: boolean; } export default UploadComponent; export declare function transformFiles(value: UploadValue): UploadValue;