import { ReactNode } from 'react'; /** * Visual variants for the DropZone component */ export type DropZoneVariant = 'default' | 'compact'; /** * Size variants for the DropZone component */ export type DropZoneSize = 'sm' | 'md' | 'lg'; /** * Existing file from URL to display as initial value * (From ib-ui UploadFile) */ export interface ExistingFile { /** URL to the existing file */ url: string; /** File name to display */ name?: string; /** File size in bytes */ size?: number; } /** * Props for the DropZone component */ export interface DropZoneProps { /** Called when files are dropped or selected */ onFilesSelect: (files: File[]) => void; /** Accepted file types (e.g., ['image/*', '.pdf', 'video/*']) */ accept?: string[]; /** Allow multiple file selection */ multiple?: boolean; /** Disabled state */ disabled?: boolean; /** Visual variant */ variant?: DropZoneVariant; /** Size variant */ size?: DropZoneSize; /** Custom content to display in drop zone */ children?: ReactNode; /** Show default icon and text if no children */ showDefaultContent?: boolean; /** Max file size in bytes (for display hint, not validation) */ maxSizeHint?: number; /** Custom size hint text to display instead of computed "Max size: X MB" */ sizeHintText?: string; /** Additional CSS classes */ className?: string; /** Accessible label for the dropzone */ 'aria-label'?: string; /** Test ID for testing (deprecated, use dataTestId) */ 'data-testid'?: string; /** Test identifier for automated testing */ dataTestId?: string; /** Data identifier for ib-ui compatibility */ dataId?: string; /** * Maximum file size in bytes for validation * When exceeded, triggers onError callback */ maxSize?: number; /** * Callback for validation errors (e.g., file too large) */ onError?: (error: string) => void; /** * Custom text to display instead of default "Drag & drop..." */ text?: ReactNode; /** * Custom browse link text instead of default "browse" */ browseText?: ReactNode; /** * Whether to show preview when files are selected */ showPreview?: boolean; /** * Custom change button text for preview mode */ changeButtonText?: ReactNode; /** * Callback when change button is clicked in preview mode * If not provided, clicking change opens file dialog */ onChangeClick?: () => void; /** * Controlled value - files to display in preview */ value?: File[]; /** * Existing file from URL to display as initial value */ existingFile?: ExistingFile; /** * Callback when existing file is cleared */ onClearExisting?: () => void; /** * Whether to allow removing files (show remove button) * @default true */ allowRemove?: boolean; /** * External error message to display */ error?: string; /** * Callback to set external error state */ setError?: (error: string | null) => void; /** * Upload progress percentage (0-100) * When provided, shows a progress indicator */ progress?: number; /** * Whether files are currently being uploaded * Shows loading state on preview */ uploading?: boolean; /** * Callback when files are cleared/removed */ onClear?: () => void; } //# sourceMappingURL=DropZone.types.d.ts.map