import { EventEmitter } from '../../stencil-public-runtime'; import { DropzoneSize } from '../../utils/constants'; /** * @slot icon - Replaces the built-in illustration (`md`) or icon (`sm`). */ export declare class NvDropzone { private readonly uid; private readonly inputId; private readonly instructionId; private readonly helperId; private inputElement?; /** Nested elements fire their own enter / leave; count them to avoid flicker. */ private dragDepth; /****************************************************************************/ /** * Density of the dropzone. `md` shows an illustration and suits primary * upload steps; `sm` shows a small icon and suits dense layouts. */ readonly size: `${DropzoneSize}`; /** * File types offered by the file picker, as a comma-separated list of MIME * types or extensions, for example "application/pdf,.jpg". It only filters * the picker: dropped and pasted files are emitted unfiltered. */ readonly accept?: string; /** * Lets the user select, drop or paste several files at once. When it is * off, only the first file is kept. */ readonly multiple: boolean; /** * Prevents the user from selecting, dropping or pasting files. */ readonly disabled: boolean; /** * Ignores files pasted from the clipboard. Paste is on by default while the * focus is inside the dropzone. */ readonly disablePaste: boolean; /** * Language of the built-in texts, for example "fr" or "nl-BE". If not * provided, the browser language is used. */ readonly locale?: string; /** * Instruction line. `{browse}` is replaced by the browse link; without the * placeholder no link is shown. Defaults to a text in the language set by * `locale`. */ readonly instruction?: string; /** * Text of the browse link inserted in the instruction. Defaults to a text * in the language set by `locale`. */ readonly browseLabel?: string; /** * Instruction shown while files are dragged over the zone, in place of * `instruction`. Defaults to a text in the language set by `locale`, in the * singular or, with `multiple`, in the plural. */ readonly dropInstruction?: string; /** * Line shown under the instruction, usually the constraints on the files, * for example "PDF or JPG ยท up to 25 MB". */ readonly helperText?: string; /** * True while files are dragged over the dropzone. */ dragActive: boolean; /****************************************************************************/ /** * Emitted with the files the user selected, dropped or pasted, in * `detail.files`. The files are not validated. */ filesSelected: EventEmitter<{ /** The files, in the order the user provided them. */ files: File[]; }>; handlePaste(event: ClipboardEvent): void; /****************************************************************************/ handleDisabledChange(disabled: boolean): void; /****************************************************************************/ /** * Opens the file picker, as if the user had clicked the dropzone. * @returns {Promise} Resolves once the picker was requested. */ open(): Promise; /** * Emits the selected files, keeping only the first one in single mode. * @param {File[]} files - The files to emit. */ private emitFiles; /** * Tells whether a drag carries files, as opposed to text or a link. * @param {DragEvent} event - The drag event. * @returns {boolean} True when files are being dragged. */ private hasFiles; private handleInputChange; private handleDragEnter; private handleDragOver; private handleDragLeave; private handleDrop; /****************************************************************************/ render(): any; }