-
Notifications
You must be signed in to change notification settings - Fork 42
/
index.d.ts
34 lines (34 loc) · 1013 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
interface RModalOptions {
afterClose?(): void;
afterOpen?(): void;
beforeClose?(callback: () => any): void;
beforeOpen?(callback: () => any): void;
bodyClass?: string;
closeTimeout?: number;
content?: string;
dialogClass?: string;
dialogOpenClass?: string;
dialogCloseClass?: string;
escapeClose?: boolean;
focus?: boolean;
focusElements?: string[];
}
declare class RModal {
static version: string;
version: string;
overlay: HTMLElement;
dialog: HTMLElement;
focusOutElement: HTMLElement | null;
opened: boolean;
opts: RModalOptions;
constructor(el: HTMLElement, opts?: RModalOptions);
open(content: string): void;
_doOpen(): void;
close(): void;
_doClose(): void;
content(html?: string): string | void;
elements(selector: string | string[], fallback?: boolean): HTMLElement[];
focus(el?: HTMLElement | null): void;
keydown(ev: KeyboardEvent): void;
}
export { RModal as default, RModalOptions };