UNPKG

@empathyco/x-components

Version:
63 lines 3.01 kB
import type { PropType } from 'vue'; import type { XEvent } from '../../wiring/events.types'; /** * Component containing a modal that emits a {@link XEventsTypes.UserClickedCloseEventsModal} when * clicking outside the content rendered in the default slot and can receive, through the * eventsToCloseModal prop, a list of {@link XEvent} to listen to in order to close * also the modal, eventsToOpenModal prop, another list of {@link XEvent} to customize * the events to listen to open the modal and a prop, displayOverlay, to display an * overlay over the rest of the html. The default slot offers the possibility to customize the * modal content. * * @public */ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{ /** Array of {@link XEvent} to listen to open the modal. */ eventsToOpenModal: { type: PropType<XEvent[]>; default: () => XEvent[]; }; /** Array of {@link XEvent} to listen to close the modal. */ eventsToCloseModal: { type: PropType<XEvent[]>; default: () => XEvent[]; }; /** Event to emit when any part of the website out of the modal has been clicked. */ bodyClickEvent: { type: PropType<XEvent>; default: string; }; /** Animation to use for opening/closing the modal. */ animation: (StringConstructor | ObjectConstructor | FunctionConstructor)[]; }>, { isOpen: import("vue").Ref<boolean, boolean>; openerElement: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>; baseModalEl: import("vue").Ref<HTMLElement | undefined, HTMLElement | undefined>; emitBodyClickEvent: (event: MouseEvent | FocusEvent) => void; }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{ /** Array of {@link XEvent} to listen to open the modal. */ eventsToOpenModal: { type: PropType<XEvent[]>; default: () => XEvent[]; }; /** Array of {@link XEvent} to listen to close the modal. */ eventsToCloseModal: { type: PropType<XEvent[]>; default: () => XEvent[]; }; /** Event to emit when any part of the website out of the modal has been clicked. */ bodyClickEvent: { type: PropType<XEvent>; default: string; }; /** Animation to use for opening/closing the modal. */ animation: (StringConstructor | ObjectConstructor | FunctionConstructor)[]; }>> & Readonly<{}>, { eventsToOpenModal: (keyof import("../../wiring/events.types").XEventsTypes)[]; eventsToCloseModal: (keyof import("../../wiring/events.types").XEventsTypes)[]; bodyClickEvent: keyof import("../../wiring/events.types").XEventsTypes; }, {}, { BaseModal: import("vue").DefineComponent<{}, {}, any>; }, {}, string, import("vue").ComponentProvideOptions, true, {}, any>; export default _default; //# sourceMappingURL=base-events-modal.vue?vue&type=script&lang.d.ts.map