/** * Official Type definitions for LemonadeJS plugins * https://lemonadejs.net * Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped */ declare function Modal(el: HTMLElement, options?: Modal.Options): Modal.Instance; declare namespace Modal { interface Options { /** Activate the backdrop when the modal is opened */ backdrop?: boolean; /** Current visibility state of the modal */ closed?: boolean; /** Current state of the modal */ minimized?: boolean; /** Modal can be closed. Default: false */ closable?: boolean; /** Modal can be minimized. Default: false */ minimizable?: boolean; /** Modal can be resized. Default: false */ resizable?: boolean; /** Modal can be moved from its original position. Default: false */ draggable?: boolean; /** Modal is automatic align during initialization. Absolute change the CSS position to absolute position to respect the screen position */ position?: 'center' | 'left' | 'right' | 'bottom' | 'absolute' | undefined; /** Title of the modal */ title?: string; /** Width of the modal */ width?: number; /** Height of the modal */ height?: number; /** Position top */ top?: number; /** Position Left */ left?: number; /** Load the content from a remote URL during initialization */ url?: string; /** Responsive mode. Default is true */ responsive?: boolean; /** Bring to front on focus */ layers?: boolean; /** Close the modal when it loses the focus. Default: false */ 'auto-close'?: boolean; /** Ensures modal will be visible on screen. Default: false */ 'auto-adjust'?: boolean; /** Focus on the modal when open it. Default: true */ focus?: boolean; /** Create scroll when the content is larger than the modal. Default: false */ overflow?: boolean; /** onopen event */ onopen?: (self: Modal.Instance) => void; /** onclose event. */ onclose?: (self: Modal.Instance, origin?: 'button' | 'backdrop' | 'focusout' | 'escape') => void; /** onload event */ onload?: (self: Modal.Instance) => void; /** Move event */ onmove?: (self: Modal.Instance, x: number, y: number) => void; /** Resize event */ onresize?: (self: Modal.Instance, w: number, h: number) => void; /** Import content from DOM reference */ content?: HTMLElement; } interface Instance { /** Backdrop is shown when the modal is opened */ backdrop?: boolean; /** Current visibility state of the modal */ closed: boolean; /** Current state of the modal */ minimized?: boolean; /** Modal can be closed. */ closable?: boolean; /** Modal can be minimized. */ minimizable?: boolean; /** Modal can be resized. */ resizable?: boolean; /** Modal can be moved from its original position. */ draggable?: boolean; /** Modal is automatic align center during initialization */ position?: 'center' | 'left' | 'right' | 'bottom' | 'absolute' | undefined; /** Title of the modal */ title?: string; /** Width of the modal */ width?: number; /** Height of the modal */ height?: number; /** Position top */ top?: number; /** Position Left */ left?: number; /** Load the content from a remote URL during initialization */ url?: string; /** Responsive mode is active */ responsive?: boolean; /** Bring to front on focus */ layers?: boolean; /** Close the modal when it loses the focus. */ 'auto-close'?: boolean; /** Ensures modal will be visible on screen. */ 'auto-adjust'?: boolean; /** Focus on the modal when open it. */ focus?: boolean; /** Create scroll when the content is larger than the modal. Default: false */ overflow?: boolean; /** Open the modal */ open: () => void; /** Close the modal */ close: () => void; /** Send to front when layers is activated */ front: () => void; /** Send to back when layers is activated */ back: () => void; /** onopen event */ onopen?: (self: Modal.Instance) => void; /** onclose event */ onclose?: (self: Modal.Instance, origin?: 'button' | 'backdrop' | 'focusout' | 'escape') => void; /** onload event */ onload?: (self: Modal.Instance) => void; /** Move event */ onmove?: (self: Modal.Instance, x: number, y: number) => void; /** Resize event */ onresize?: (self: Modal.Instance, w: number, h: number) => void; /** Import content from DOM reference */ content?: HTMLElement; } } export default Modal;