/** @jsxImportSource react */ import { StyledContainerBase, StyledContainerConfig } from "../../ui/Container"; import { DragEvent } from "./ops"; import { Instance } from "../../ui/Instance"; import { StyleProp, ClassProp, StructuredProp } from "../../ui/Prop"; import { RenderingContext } from "../../ui/RenderingContext"; export interface DropZoneConfig extends StyledContainerConfig { /** CSS styles to be applied when drag cursor is over the drop zone. */ overStyle?: StyleProp; /** CSS styles to be applied when drag cursor is near the drop zone. */ nearStyle?: StyleProp; /** CSS styles to be applied when drag operations begin used to highlight drop zones. */ farStyle?: StyleProp; /** Additional CSS class to be applied when drag cursor is over the drop zone. */ overClass?: ClassProp; /** Additional CSS class to be applied when drag cursor is near the drop zone. */ nearClass?: ClassProp; /** Additional CSS class to be applied when drag operations begin used to highlight drop zones. */ farClass?: ClassProp; /** Distance in `px` used to determine if cursor is near the dropzone. If not configured, cursor is never considered near. Set to false to disable. */ nearDistance?: number | false; /** Bindable data related to the DropZone that might be useful inside onDrop operations. */ data?: StructuredProp; /** * Inflate the drop zone's bounding box so it activates on cursor proximity. * Useful for invisible drop-zones that are only a few pixels tall/wide. */ inflate?: number; /** * Inflate the drop zone's bounding box horizontally so it activates on cursor proximity. * Useful for invisible drop-zones that are only a few pixels tall/wide. */ hinflate?: number; /** * Inflate the drop zone's bounding box vertically so it activates on cursor proximity. * Useful for invisible drop-zones that are only a few pixels tall/wide. */ vinflate?: number; /** Base CSS class to be applied to the element. Defaults to 'dropzone'. */ baseClass?: string; /** A callback method invoked when dragged item is finally dropped. The callback takes two arguments: * dragDropEvent - An object containing information related to the source * instance Return value is written into dragDropEvent.result and can be passed to the source's onDragEnd callback. */ onDrop?: string | ((event: DragEvent, instance: Instance) => any); /** A callback method used to test if dragged item (source) is compatible with the drop zone. */ onDropTest?: string | ((event: DragEvent, instance: Instance) => boolean); /** A callback method invoked when the dragged item gets close to the drop zone. See also `nearDistance`. */ onDragNear?: string | ((event: DragEvent, instance: Instance) => void); /** A callback method invoked when the dragged item is dragged away. */ onDragAway?: string | ((event: DragEvent, instance: Instance) => void); /** A callback method invoked when the dragged item is dragged over the drop zone. The callback is called for each `mousemove` or `touchmove` event. */ onDragOver?: string | ((event: DragEvent, instance: Instance) => void); /** A callback method invoked when the dragged item is dragged over the drop zone for the first time. */ onDragEnter?: string | ((event: DragEvent, instance: Instance) => void); /** A callback method invoked when the dragged item leaves the drop zone area. */ onDragLeave?: string | ((event: DragEvent, instance: Instance) => void); /** A callback method invoked when at the beginning of the drag & drop operation. */ onDragStart?: string | ((event: DragEvent, instance: Instance) => void); /** A callback method invoked when at the end of the drag & drop operation. */ onDragEnd?: string | ((event: DragEvent, instance: Instance) => void); /** Match height of the item being dragged */ matchHeight?: boolean; /** Match width of the item being dragged */ matchWidth?: boolean; /** Match margin of the item being dragged */ matchMargin?: boolean; } export interface DropZoneInstance extends Instance { } export declare class DropZone extends StyledContainerBase { styled: boolean; nearDistance: number | false; hinflate: number; vinflate: number; baseClass: string; overStyle: any; nearStyle: any; farStyle: any; inflate?: number; matchHeight?: boolean; matchWidth?: boolean; matchMargin?: boolean; onDrop?: string | ((event?: DragEvent, instance?: Instance) => any); onDropTest?: string | ((event?: DragEvent, instance?: Instance) => boolean); onDragNear?: string | ((event?: DragEvent, instance?: Instance) => void); onDragAway?: string | ((event?: DragEvent, instance?: Instance) => void); onDragOver?: string | ((event?: DragEvent, instance?: Instance) => void); onDragEnter?: string | ((event?: DragEvent, instance?: Instance) => void); onDragLeave?: string | ((event?: DragEvent, instance?: Instance) => void); onDragStart?: string | ((event?: DragEvent, instance?: Instance) => void); onDragEnd?: string | ((event?: DragEvent, instance?: Instance) => void); constructor(config?: DropZoneConfig); init(): void; declareData(): void; render(context: RenderingContext, instance: DropZoneInstance, key: string): import("react/jsx-runtime").JSX.Element; } //# sourceMappingURL=DropZone.d.ts.map