UNPKG

1.2 kBTypeScriptView Raw
1import { EventEmitter } from '../stencil-public-runtime';
2import { AnimationBuilder, HTMLStencilElement } from '../interface';
3export interface OverlayEventDetail<T = any> {
4 data?: T;
5 role?: string;
6}
7export interface OverlayInterface {
8 el: HTMLElement;
9 animated: boolean;
10 keyboardClose: boolean;
11 overlayIndex: number;
12 presented: boolean;
13 enterAnimation?: AnimationBuilder;
14 leaveAnimation?: AnimationBuilder;
15 didPresent: EventEmitter<void>;
16 willPresent: EventEmitter<void>;
17 willDismiss: EventEmitter<OverlayEventDetail>;
18 didDismiss: EventEmitter<OverlayEventDetail>;
19 present(): Promise<void>;
20 dismiss(data?: any, role?: string): Promise<boolean>;
21}
22export interface OverlayController {
23 create(opts?: any): Promise<HTMLElement>;
24 dismiss(data?: any, role?: string, id?: string): Promise<boolean>;
25 getTop(): Promise<HTMLIonOverlayElement | undefined>;
26}
27export interface HTMLIonOverlayElement extends HTMLStencilElement {
28 overlayIndex: number;
29 backdropDismiss?: boolean;
30 lastFocus?: HTMLElement;
31 dismiss(data?: any, role?: string): Promise<boolean>;
32}
33export declare type OverlaySelect = HTMLIonActionSheetElement | HTMLIonAlertElement | HTMLIonPopoverElement;