UNPKG

@empathyco/x-components

Version:
95 lines 3.88 kB
/** * Base component with no XPlugin dependencies that serves as a utility for constructing more * complex modals. * * @public */ declare const _default: import("vue").DefineComponent<{ /** Determines if the modal is open or not. */ open: { type: BooleanConstructor; required: true; }; /** * Determines if the focused element changes to one inside the modal when it opens. Either the * first element with a positive tabindex or just the first focusable element. */ focusOnOpen: { type: BooleanConstructor; default: boolean; }; /** * The reference selector of a DOM element to use as reference to position the modal. * This selector can be an ID or a class, if it is a class, it will use the first * element that matches. */ referenceSelector: StringConstructor; /** Animation to use for opening/closing the modal.This animation only affects the content. */ animation: { type: (StringConstructor | ObjectConstructor | FunctionConstructor)[]; default: () => import("vue").DefineComponent<{}, {}, any>; }; /** * Animation to use for the overlay (backdrop) part of the modal. By default, it uses * a fade transition. */ overlayAnimation: { type: (StringConstructor | ObjectConstructor | FunctionConstructor)[]; default: () => import("vue").DefineComponent<{}, {}, any>; }; /** Class inherited by content element. */ contentClass: StringConstructor; /** Class inherited by overlay element. */ overlayClass: StringConstructor; }, { emitOverlayClicked: (event: Event) => void; isWaitingForLeave: import("vue").Ref<boolean>; modalContentRef: import("vue").Ref<HTMLDivElement | undefined>; modalRef: import("vue").Ref<HTMLDivElement | undefined>; }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click:overlay" | "focusin:body")[], "click:overlay" | "focusin:body", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ /** Determines if the modal is open or not. */ open: { type: BooleanConstructor; required: true; }; /** * Determines if the focused element changes to one inside the modal when it opens. Either the * first element with a positive tabindex or just the first focusable element. */ focusOnOpen: { type: BooleanConstructor; default: boolean; }; /** * The reference selector of a DOM element to use as reference to position the modal. * This selector can be an ID or a class, if it is a class, it will use the first * element that matches. */ referenceSelector: StringConstructor; /** Animation to use for opening/closing the modal.This animation only affects the content. */ animation: { type: (StringConstructor | ObjectConstructor | FunctionConstructor)[]; default: () => import("vue").DefineComponent<{}, {}, any>; }; /** * Animation to use for the overlay (backdrop) part of the modal. By default, it uses * a fade transition. */ overlayAnimation: { type: (StringConstructor | ObjectConstructor | FunctionConstructor)[]; default: () => import("vue").DefineComponent<{}, {}, any>; }; /** Class inherited by content element. */ contentClass: StringConstructor; /** Class inherited by overlay element. */ overlayClass: StringConstructor; }>> & { "onClick:overlay"?: ((...args: any[]) => any) | undefined; "onFocusin:body"?: ((...args: any[]) => any) | undefined; }, { focusOnOpen: boolean; animation: string | Function | Record<string, any>; overlayAnimation: string | Function | Record<string, any>; }, {}>; export default _default; //# sourceMappingURL=base-modal.vue?vue&type=script&lang.d.ts.map