UNPKG

@conectate/ct-dialog

Version:

HTML dialog made with Web Components

103 lines (102 loc) 3.65 kB
/** @license Copyright (c) 2020 Herberth Obregón. All rights reserved. This code may only be used under the BSD style license found at https://open.grupoconectate.com/LICENSE.txt The complete set of authors may be found at https://open.grupoconectate.com/AUTHORS.txt The complete set of contributors may be found at https://open.grupoconectate.com/CONTRIBUTORS.txt Code distributed by Herberth Obregón as part of the Conectate Open Source Project is also subject to an additional IP rights grant found at https://open.grupoconectate.com/PATENTS.txt */ import { CtLit } from "@conectate/ct-lit"; export declare function showCtDialog(el: HTMLElement, id?: string, history?: ConectateHistory): CtDialog; export declare function closeCtDialog(id?: CtDialog): Promise<unknown>; type typeDialog = "alert" | "cupertino" | "slide-right" | "slide-left" | "bottom-sheet"; export declare enum DialogSizePreferences { /** Para pantalla completa */ fullsreen = 0, /** Para que se muestre al 80% de la ventada y 21cm de ancho */ fullsize = 1 } export interface ConectateHistory { title: string; href: string; } /** * @cssProp --ct-dialog-width - Ancho del dialogo * @cssProp --ct-dialog-height - Alto del dialogo * @fires close - Se dispara cuando se cierra el dialogo * @fires open - Se dispara cuando se abre el dialogo */ export declare class CtDialog extends CtLit { /** En algunas version */ static checkForCriOS: boolean; static hiddenOverflow: HTMLElement | null; static styles: import("lit").CSSResult[]; dialogID?: string; interactiveDismissDisabled: boolean; role: string; type: typeDialog; ariaModal: string; disableHistoryAPI: boolean; _closeViaPopState: any; _clseDialogESC: any; /** Esto es para esperar que efectivamente se haya hecho el push state */ mappingContainer?: Promise<any>; history: ConectateHistory; _element?: HTMLElement; preferences: any[]; resolveMapping: (value?: {} | PromiseLike<{}>) => void; finish: () => void; get element(): HTMLElement; set element(val: HTMLElement); render(): import("lit").TemplateResult<1>; getStylesPref(pref: DialogSizePreferences[]): import("lit").TemplateResult<1>[]; disconnectedCallback(): void; computeAnimation(anim: typeDialog): "anim-normal" | "anim-cupertino" | "anim-slide-left" | "anim-slide-right" | "anim-bottom-sheet"; constructor(); firstUpdated(): void; enableHistoryAPI(value?: boolean): this; fullscreenMode(): this; fullsizeMode(): this; setAnimation(anim: typeDialog): this; show(): void; waitForDefined(param: () => any, timeout?: number): Promise<any>; close(e?: Event | null, type?: "click" | "keyup" | "popstate"): Promise<unknown>; getAnimOut(type: typeDialog): { transform: string; opacity: number; }[]; destroy(): void; /** * @deprecated Use close() instead. The method will be removed in the next major version. */ closeDialog(e?: Event | null): Promise<unknown>; static get properties(): { /** * */ dialogID: { type: StringConstructor; reflect: boolean; }; /** * Entrada para el History API de tipe {title,href} */ history: { type: ObjectConstructor; }; element: { type: ObjectConstructor; }; free: { type: ObjectConstructor; }; }; } declare global { interface HTMLElementTagNameMap { "ct-dialog": CtDialog; } } export {};