UNPKG

@conectate/ct-dialog

Version:

HTML dialog made with Web Components

103 lines (102 loc) 3.31 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 "@conectate/ct-button"; import "@conectate/ct-card"; import { CtLit } from "@conectate/ct-lit"; import { CtDialog } from "./ct-dialog.js"; export declare function showCtConfirm(title: string, body: string, ok?: string, cancel?: string, neutral?: string, options?: { history?: boolean; }): Promise<boolean>; export declare function showCtConfirmCupertino(title: string, body: string, ok?: string, cancel?: string, neutral?: string): Promise<boolean>; export declare class CTConfirm extends CtLit { body: string; ttl: string; ok: string; neutral: string; cancel: string; reject: (reason?: any) => void; solve: (param: boolean | null | undefined) => void; dialog: CtDialog; render(): import("lit").TemplateResult<1>; static get properties(): { body: { type: StringConstructor; }; ttl: { type: StringConstructor; }; ok: { type: StringConstructor; }; neutral: { type: StringConstructor; }; cancel: { type: StringConstructor; }; }; $cancel: HTMLElement; $neutral: HTMLElement; confirmBody: HTMLElement; buttons: HTMLElement; firstUpdated(): void; computeBtns(ok: string, neutral: string, cancel: string): void; computeBody(body: string): string; okbtn(e: Event): Promise<void>; cancelbtn(e: Event): Promise<void>; neutralbtn(e: Event): Promise<void>; onResult(): Promise<boolean | undefined>; } export declare class CTConfirmCupertino extends CtLit { body: string; ttl: string; ok: string; neutral: string; cancel: string; reject: (reason?: any) => void; solve: (param: boolean | null | undefined) => void; dialog: CtDialog; $cancel: HTMLElement; $neutral: HTMLElement; confirmBody: HTMLElement; buttons: HTMLElement; render(): import("lit").TemplateResult<1>; static get properties(): { body: { type: StringConstructor; }; ttl: { type: StringConstructor; }; ok: { type: StringConstructor; }; neutral: { type: StringConstructor; }; cancel: { type: StringConstructor; }; }; firstUpdated(): void; computeBtns(ok: string, neutral: string, cancel: string): void; computeBody(body: string): string; okbtn(e: Event): Promise<void>; cancelbtn(e: Event): Promise<void>; neutralbtn(e: Event): Promise<void>; onResult(): Promise<boolean | undefined>; } declare global { interface HTMLElementTagNameMap { "ct-confirm-cupertino": CTConfirmCupertino; "ct-confirm": CTConfirm; } }