import { MouseEventHandler } from 'react'; import { UploadItemStatus, UploadPictureCardImageFit, UploadPictureCardSize } from '@mezzanine-ui/core/upload'; import type { IconDefinition } from '@mezzanine-ui/icons'; import { NativeElementPropsWithoutKeyAndRef } from '../utils/jsx-types'; export interface UploadPictureCardAriaLabels { /** * Aria label for cancel upload button. * @default 'Cancel upload' */ cancelUpload?: string; /** * Aria label for the click-to-replace overlay label. * @default 'Click to Replace' */ clickToReplace?: string; /** * Aria label for delete button. * @default 'Delete file' */ delete?: string; /** * Aria label for download button. * @default 'Download file' */ download?: string; /** * Aria label for reload/retry button. * @default 'Retry upload' */ reload?: string; /** * Aria label for uploading status. * @default 'Uploading' */ uploading?: string; /** * Aria label for zoom in button. * @default 'Zoom in image' */ zoomIn?: string; } export interface UploadPictureCardProps extends NativeElementPropsWithoutKeyAndRef<'div'> { /** * Aria labels for accessibility. Allows customization for internationalization. */ ariaLabels?: UploadPictureCardAriaLabels; /** * The file to display. * Required when displaying local files (before upload). * Optional when `url` is provided for already uploaded files. */ file?: File; /** * The URL of the uploaded file. * When provided, this will be used instead of creating a blob URL from `file`. * Useful for displaying files that have already been uploaded to the server. * * @note If only `url` is provided (without `file`), the file type will be inferred * from the URL extension. For accurate type detection, provide `file` when available. */ url?: string; /** * The id of the file id to identify the file. */ id?: string; /** * The status of the upload picture card. * @default 'loading' */ status?: UploadItemStatus; /** * The size of the upload picture card. * @default 'main' */ size?: UploadPictureCardSize; /** * The image fit of the upload picture card. * @default 'cover' */ imageFit?: UploadPictureCardImageFit; /** * Whether the upload picture card is disabled. * @default false */ disabled?: boolean; /** * Error message to display when status is 'error'. */ errorMessage?: string; /** * Error icon to display when status is 'error'. */ errorIcon?: IconDefinition; /** * Whether the upload picture card is readable. * @default false */ readable?: boolean; /** * When delete icon is clicked, this callback will be fired. */ onDelete?: MouseEventHandler; /** * When download icon is clicked, this callback will be fired. */ onDownload?: MouseEventHandler; /** * When reload icon is clicked, this callback will be fired. */ onReload?: MouseEventHandler; /** * When provided, the card becomes a replacement trigger in done status. * On hover, shows a "Click to Replace" overlay label. Fired when the card body is clicked. */ onReplace?: MouseEventHandler; /** * When zoom in icon is clicked, this callback will be fired. */ onZoomIn?: MouseEventHandler; } /** * The react component for `mezzanine` upload picture card. */ declare const UploadPictureCard: import("react").ForwardRefExoticComponent>; export default UploadPictureCard;