UNPKG

vue-win-box-next

Version:

Vue 3 wrapper for [WinBox.js](https://github.com/nextapps-de/winBox).

83 lines (78 loc) 3.17 kB
import * as vue from 'vue'; import { VNode, PropType } from 'vue'; import * as winbox from 'winbox'; import { Params } from 'winbox'; interface Options extends Params { background?: string | undefined; body?: HTMLElement | undefined; border?: string | number | undefined; bottom?: string | number | undefined; class?: string | string[] | undefined; height?: string | number | undefined; html?: string | undefined; id?: string | number | undefined; index?: number | undefined; left?: string | number | undefined; max?: boolean | undefined; minheight?: string | number | undefined; minwidth?: string | number | undefined; modal?: boolean | undefined; mount?: Node | undefined; right?: string | number | undefined; root?: Node | undefined; splitscreen?: boolean | undefined; title?: string | undefined; top?: string | number | undefined; url?: string | undefined; width?: string | number | undefined; x?: 'right' | 'center' | string | number | undefined; y?: 'bottom' | 'center' | string | number | undefined; component?: (() => VNode) | string | (() => JSX.Element); oncreate?: ((this: WinBox, options: Options) => void) | undefined; onfullscreen?: ((this: WinBox) => void) | undefined; onminimize?: ((this: WinBox) => void) | undefined; onmaximize?: ((this: WinBox) => void) | undefined; onrestore?: ((this: WinBox) => void) | undefined; onclose?: ((this: WinBox, force?: boolean) => boolean) | undefined; onfocus?: ((this: WinBox) => void) | undefined; onblur?: ((this: WinBox) => void) | undefined; onresize?: ((this: WinBox, width: number, height: number) => void) | undefined; onmove?: ((this: WinBox, x: number, y: number) => void) | undefined; } declare const VueWinBoxNext: vue.DefineComponent<vue.ExtractPropTypes<{ options: { type: PropType<Partial<Options>>; required: true; }; openOnMount: { type: BooleanConstructor; default: boolean; }; }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, { [key: string]: any; }> | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("move" | "resize" | "close" | "focus" | "blur")[], "move" | "resize" | "close" | "focus" | "blur", vue.PublicProps, Readonly<vue.ExtractPropTypes<{ options: { type: PropType<Partial<Options>>; required: true; }; openOnMount: { type: BooleanConstructor; default: boolean; }; }>> & Readonly<{ onMove?: ((...args: any[]) => any) | undefined; onResize?: ((...args: any[]) => any) | undefined; onClose?: ((...args: any[]) => any) | undefined; onFocus?: ((...args: any[]) => any) | undefined; onBlur?: ((...args: any[]) => any) | undefined; }>, { openOnMount: boolean; }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>; declare function useWinBoxNext(): { create: (options: Options) => winbox; getWinBoxInst: () => winbox | null; destroy: () => void; show: () => void; hide: () => void; }; export { Options, VueWinBoxNext, VueWinBoxNext as default, useWinBoxNext };