UNPKG

maz-ui

Version:

A standalone components library for Vue.Js 3 & Nuxt.Js 3

92 lines (91 loc) 3.39 kB
import { HTMLAttributes } from 'vue'; export interface MazBackdropProps { /** @model Modal's model value */ modelValue?: boolean; /** Teleport selector */ teleportSelector?: string; /** Function called before modal is close */ beforeClose?: () => Promise<void> | void; /** Persistent dialog (not closable by clicking outside and remove close button) */ persistent?: boolean; /** Prevent close on escape key */ closeOnEscape?: boolean; /** Transition name */ transitionName?: string; /** Backdrop class */ backdropClass?: HTMLAttributes['class']; /** Backdrop content class */ backdropContentClass?: HTMLAttributes['class']; /** Add padding to the content */ contentPadding?: boolean; /** Justify content */ justify?: 'center' | 'end' | 'start' | 'space-between' | 'space-around' | 'none'; /** Align content */ align?: 'center' | 'end' | 'start' | 'none'; /** Variant */ variant?: 'bottom-sheet' | 'dialog' | 'drawer'; /** ID for aria-labelledby */ ariaLabelledby?: string; /** ID for aria-describedby */ ariaDescribedby?: string; } declare function close(): void; declare function toggleModal(value?: boolean): Promise<void>; declare function onBackdropAnimationLeave(): void; declare function onKeyPress(event: KeyboardEvent): void; declare function __VLS_template(): { attrs: Partial<{}>; slots: { default?(_: { close: typeof close; }): any; }; refs: {}; rootEl: any; }; type __VLS_TemplateResult = ReturnType<typeof __VLS_template>; declare const __VLS_component: import('vue').DefineComponent<MazBackdropProps, { /** * Animation leave event * @description This is used to handle animation leave events */ onBackdropAnimationLeave: typeof onBackdropAnimationLeave; /** * Close the backdrop * @description This is used to close the backdrop */ close: typeof close; /** * The present state of the backdrop * @description This is used to check if the backdrop is present (open) */ present: import('vue').Ref<boolean, boolean>; /** * Toggle the backdrop * @description This is used to toggle the backdrop * @param {boolean} value - The value to toggle the backdrop (optional) */ toggleModal: typeof toggleModal; /** * Key press event * @description This is used to handle key press events */ onKeyPress: typeof onKeyPress; }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, { close: (value: void) => any; open: (value: void) => any; "update:model-value": (value: boolean) => any; "before-close": (value: void) => any; }, string, import('vue').PublicProps, Readonly<MazBackdropProps> & Readonly<{ onClose?: ((value?: void | undefined) => any) | undefined; onOpen?: ((value?: void | undefined) => any) | undefined; "onUpdate:model-value"?: ((value: boolean) => any) | undefined; "onBefore-close"?: ((value?: void | undefined) => any) | undefined; }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>; declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>; export default _default; type __VLS_WithTemplateSlots<T, S> = T & { new (): { $slots: S; }; };