import { EventEmitter } from '../../stencil-public-runtime'; import { CornersType, MarginType, PaddingType, ResponsiveType, SizeType } from '../../types/ui.type'; import { BreakpointsTokenType } from '../../types/design-token.type'; import { VegaModalBackdrop, VegaModalBackdropColor, VegaModalSectionPadding } from './types'; import { GlobalSlimmers } from '../../vega-slimmer/vega-slimmer-core'; import { EventEmitSlimmerBase } from '../../helpers/event-manager/slimmers/event-emit-slimmer'; import { ChildNodesEventPreventSlimmer } from '../../helpers/event-manager/slimmers/child-nodes-event-prevent-slimmer'; import { ComponentGlobalStyleSlimmer } from '../../helpers/slimmers/component-global-style-slimmer'; import { DeprecatedPropertySlimmerBase } from '../../helpers/slimmers/deprecated-property-slimmer'; import { VegaComponentUsageRuntimeMetricsSlimmer } from '../../helpers/slimmers/component-usage-runtime-metrics'; import { VegaNestedModalController } from './slimmers/controllers/vega-nested-modal-controller'; import { VegaModalRenderer } from './slimmers/renderers/vega-modal-renderer'; import { VegaModalMobileController } from './slimmers/controllers/vega-modal-mobile-controller'; import { VegaModalScrollController } from './slimmers/controllers/vega-modal-scroll-controller'; import { VegaModalOpenStateController } from './slimmers/controllers/vega-modal-open-state-controller'; import { VegaModalBackdropManager } from './slimmers/controllers/vega-modal-backdrop-manager'; import { VegaModalOpenedModalStackController } from './slimmers/controllers/vega-modal-opened-modal-stack-controller'; import { VegaModalZIndexController } from './slimmers/controllers/vega-modal-z-index-controller'; import { VegaModalOpenState } from './slimmers/models/vega-modal-open-state'; import { VegaModalSectionPaddingState } from './slimmers/models/vega-modal-section-padding-state'; import { VegaModalPaddingStateController } from './slimmers/controllers/vega-modal-padding-state-controller'; /** * @vegaVersion 1.0.6 */ export declare class VegaModal { protected readonly globalSlimmers: GlobalSlimmers; protected readonly nestedModalController: VegaNestedModalController; protected readonly openStateController: VegaModalOpenStateController; protected readonly mobileController: VegaModalMobileController; protected readonly scrollController: VegaModalScrollController; protected readonly backdropManager: VegaModalBackdropManager; protected readonly openedModalStackController: VegaModalOpenedModalStackController; protected readonly zIndexController: VegaModalZIndexController; protected readonly paddingStateController: VegaModalPaddingStateController; protected readonly renderer: VegaModalRenderer; protected openEventEmitter: EventEmitSlimmerBase; protected closeEventEmitter: EventEmitSlimmerBase; protected childNodesEventPrevent: ChildNodesEventPreventSlimmer; protected readonly componentGlobalStyleSlimmer: ComponentGlobalStyleSlimmer; protected readonly deprecatedPropertySlimmer: DeprecatedPropertySlimmerBase; protected readonly sizeDeprecatedPropertySlimmer: DeprecatedPropertySlimmerBase>; protected vegaComponentUsageRuntimeMetricsSlimmer: VegaComponentUsageRuntimeMetricsSlimmer; host: HTMLVegaModalElement; currentBreakpoint: BreakpointsTokenType; openState: VegaModalOpenState; sectionPaddingState: VegaModalSectionPaddingState; watchOpenState(): void; /** * Provides options for controlling the behavior of the backdrop. * - `default`: * indicates that the user can close the modal * by clicking on the backdrop. * - `static`: * means that the user cannot close the modal by * clicking on the backdrop. * - `none`: * specifies that the backdrop will not be rendered. * * @vegaVersion 1.0.6 */ backdrop: VegaModalBackdrop; /** * The below method is e2e-test covered in * @see{module:vega-modal-default-e2e} */ watchBackdrop(): void; /** * Determines the size of the modal. * * It can be specified as a number, a percentage string ending with "%", * or a ResponsiveType. * * It is important to note that there are different maximum widths * for modal windows based on the viewport size. If the specified size exceeds * the maximum width, the maximum modal width will be used instead. * * @deprecated This property will be removed soon and replaced by prop width * @vegaVersion 1.0.6 */ size: ResponsiveType; /** * The below method is e2e-test covered in * @see{module:vega-modal-size-number-e2e} * @see{module:vega-modal-size-responsive-e2e} */ watchSize(): void; /** * Determines the width of the modal. * * It can be specified as a number or a percentage string ending with "%". * ResponsiveType can also be used for responsive configurations. * * Note: There are different maximum widths for modal windows based on viewport size. * If the specified width exceeds the maximum width, the maximum modal width will be used instead. * * @vegaVersion 2.95.0 */ width: ResponsiveType; /** * The below method is e2e-test covered in * @see{module:vega-modal-width-number-e2e} * @see{module:vega-modal-width-responsive-e2e} */ watchWidth(): void; /** * Determines the height of the modal. * * It accepts numeric values (interpreted as pixels), string values (e.g., "100%", "100vh"), * or ResponsiveType for responsive configurations. * * @vegaVersion 2.81.0 */ height: ResponsiveType; /** * The below method is e2e-test covered in * @see{module:vega-modal-height-e2e} */ watchHeight(): void; /** * Determines whether the modal is initially open. * * @vegaVersion 1.0.6 */ open: boolean; watchOpen(): void; /** * Specifies whether the modal uses an animated transition * when it appears. * * @vegaVersion 1.0.11 */ animation: boolean; /** * Represents the title displayed within the modal. * * @vegaVersion 1.3.0 */ modalTitle: string; /** * Specifies the background color of the modal's backdrop. * * @vegaVersion 1.3.0 */ backdropColor: VegaModalBackdropColor; /** * The below method is e2e-test covered in * @see{module:vega-modal-backdrop-color-default-e2e} * @see{module:vega-modal-backdrop-color-semi-e2e} * @see{module:vega-modal-backdrop-color-none-e2e} */ watchBackdropColor(): void; /** * Determines whether the modal is vertically centered * on the screen. * @deprecated This property will be removed soon and replaced by prop isVerticallyCentered * * @vegaVersion 1.3.0 */ isVerticallyCenter: boolean; /** * Determines whether the modal is vertically centered * on the screen. * * @vegaVersion 2.2.0 */ isVerticallyCentered: boolean; /** * Determines whether the modal displays a close button to * allow hiding or closing of the modal. * * @vegaVersion 1.3.0 */ showCloseButton: boolean; /** * Specifies the amount of space or padding within the modal. * * It can be set as a ResponsiveType or any size value. * * @vegaVersion 1.0.10 */ padding: ResponsiveType | VegaModalSectionPadding; watchPadding(): void; /** * Specifies the margin around the modal dialog. * * It accepts a ResponsiveType or size values. * Set `x` to `auto` to horizontally center the modal. * * @vegaVersion 2.81.0 */ margin: ResponsiveType; /** * Defines the maximum height of the content within * the modal element. * * It accepts values in numeric, string and ResponsiveType. * Numeric values represent maximum height of the content in pixels * (e.g., 100 translates to 100px). * String values allow the use of CSS units like 'vh' or 'calc' expressions. * (e.g., '100vh' or 'calc(100vh - 20px)'). * * @vegaVersion 1.4.0 */ contentMaxHeight: ResponsiveType; watchContentMaxHeight(): void; /** * Defines the corner of the modal dialog. * It accepts a string value representing a valid * border radius token. * * @vegaVersion 2.93.0 */ corners: ResponsiveType; /** * Provides a callback function that is triggered when a user clicks the * close button located in the top right corner of the modal. * * If the callback function returns `true`, the modal will be closed. * * If the callback function returns `false` or does not return any value, the modal will remain open. * * @vegaVersion 1.22.0 */ handleClose: (() => boolean) | undefined; /** * An event emitter notifying the modal close event. If a method is defined for this event, invoking event.preventDefault() prevents the modal from closing. * * @vegaVersion 1.0.10 */ vegaClose: EventEmitter; /** * An event emitter notifying the modal close event. * * @eventSemantics namespace:native * @vegaVersion 2.0.0 */ close: EventEmitter; /** * An event emitter notifying the modal open event. * * @vegaVersion 1.0.10 */ vegaOpen: EventEmitter; /** * An event emitter notifying the modal open event. The event name is not `open` because already has a property `open` * * @eventSemantics namespace:native * @vegaVersion 2.0.0 */ modalOpen: EventEmitter; /** * Clicking on a non-static current modal should close this modal, not other modals. * The below method is e2e-test covered in * @see{module:vega-modal-toggle-interactive-e2e} */ listenDataTarget(e: MouseEvent): void; /** * The below method is e2e-test covered in * @see{module:vega-modal-toggle-interactive-e2e} */ listenDataDismiss(e: MouseEvent): void; /** * The below method is e2e-test covered in * @see{module:vega-modal-backdrop-mousedown-mouseup-e2e} */ listenMouseDown(e: MouseEvent): void; /** * The below method is e2e-test covered in * @see{module:vega-modal-backdrop-mousedown-mouseup-e2e} */ listenMouseUp(e: MouseEvent): void; /** * Invoke this method to show or hide the modal. * * @vegaVersion 1.0.6 */ modal(option: 'show' | 'hide'): Promise; render(): VegaModal; /** * Returns the initial open state of the modal. */ private initOpenState; }