/** * @fileoverview Saasflare Dropzone — drag-and-drop file upload area. * @author Saasflare™ * * Self-contained dropzone: handles drag-over highlight, drop, click-to-open * (via {@link useFileDialog}), and disabled / max-size / accept filtering. * Calls back with the accepted + rejected file lists; rendering of the * accepted file UI is left to the consumer (or the default body slot). * * Saasflare does not bundle `react-dropzone`; this is a ~150-line replacement * that integrates with the surface/radius/animated system. * * @module packages/ui/components/ui/dropzone * @package ui * @layer core * * @example * upload(accepted)} * /> */ import { type ReactNode } from "react"; import { type SaasflareComponentProps } from "../../providers"; /** Reason a file was rejected by the dropzone's built-in validation. */ export type DropzoneRejectionReason = "too-large" | "type-mismatch"; /** A rejected file with the reason. */ export interface DropzoneRejection { file: File; reason: DropzoneRejectionReason; } /** Props for the Dropzone component. */ export interface DropzoneProps extends SaasflareComponentProps { /** Called with `(accepted, rejected)` when the user drops or picks files. */ onDrop?: (accepted: File[], rejected: DropzoneRejection[]) => void; /** MIME types or extensions to accept (matches ``). */ accept?: string; /** Maximum file size in bytes. */ maxSize?: number; /** Allow multiple file selection. Default: `true`. */ multiple?: boolean; /** Disable the dropzone. */ disabled?: boolean; /** Render-prop body. Receives `isDragActive`. Falls back to the default UI. */ children?: ReactNode | ((state: { isDragActive: boolean; }) => ReactNode); /** Additional class names. */ className?: string; } /** * Drag-and-drop file upload area with click-to-open fallback. * * @component * @layer core */ export declare function Dropzone({ onDrop, accept, maxSize, multiple, disabled, children, className, surface, radius, animated, iconWeight, }: DropzoneProps): import("react/jsx-runtime").JSX.Element;