gov-gui
Version:
Gov UI Component Library Typscript Build
70 lines (69 loc) • 2.36 kB
TypeScript
import { EventEmitter } from '../../stencil-public-runtime';
import { GlobalProps } from '../../global/global-styles-helper';
import { AnimationProps } from '../../global/animation-helpers';
export declare class GovModal implements GlobalProps, AnimationProps {
/** Controls the visibility of the modal (two-way binding) */
isOpen: boolean;
/** Modal header/title */
header: string;
Subheader: string;
/** Cancel button text */
cancelButtonText: string;
/** Confirm button text */
confirmButtonText: string;
/** Show/hide cancel button */
showCancelButton: boolean;
/** Show/hide confirm button */
showConfirmButton: boolean;
/** Cancel button variant */
cancelButtonVariant: string;
/** Confirm button variant */
confirmButtonVariant: string;
/** Allow closing by clicking backdrop */
backdropClose: boolean;
/** Prevent all manual closing */
disableClose: boolean;
/** Modal size variant */
size: 'small' | 'medium' | 'large';
/** Fullscreen modal */
fullscreen: boolean;
/** Close modal on ESC key */
closeOnEsc: boolean;
/** Show header section */
showHeader: boolean;
showSubHeader: boolean;
/** Show footer section */
showFooter: boolean;
visible: boolean;
/** Emitted when modal opens */
opened: EventEmitter<void>;
/** Emitted when modal closes */
closed: EventEmitter<void>;
/** Emitted on confirm button click */
confirm: EventEmitter<void>;
/** Emitted on cancel button click */
cancel: EventEmitter<void>;
/** Emitted for two-way binding */
isOpenChange: EventEmitter<boolean>;
animation?: string;
animationDelay?: '2s' | '3s' | '4s' | '5s';
animationSpeed?: 'slow' | 'slower' | 'fast' | 'faster';
private allClasses;
handleIsOpenChange(newValue: boolean): void;
watchVisibility(newValue: boolean): void;
watchAnimations(): void;
watchAnimationsDelay(): void;
watchAnimationsSpeed(): void;
/** Handles ESC key press */
handleKeyDown(ev: KeyboardEvent): void;
/** Open the modal */
open(): Promise<void>;
/** Close the modal */
close(): Promise<void>;
private handleConfirm;
private handleCancel;
private handleBackdropClick;
componentWillLoad(): void;
provideClass(): void;
render(): any;
}