@conectate/ct-dialog
Version:
HTML dialog made with Web Components
59 lines (58 loc) • 2.05 kB
TypeScript
/**
@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 "@conectate/ct-input";
import { CtLit } from "@conectate/ct-lit";
import { TemplateResult } from "lit";
import { CtDialog } from "./ct-dialog.js";
export declare function showCtPrompt(title: string, body: string | TemplateResult, ok?: string, cancel?: string, neutral?: string, options?: {
wordwrap?: boolean;
value?: string;
label?: string;
placeholder?: string;
rawplaceholder?: string;
}): Promise<string | undefined>;
declare class CTPromp extends CtLit {
body: string | TemplateResult;
ttl: string;
ok: string;
neutral?: string;
cancel?: string;
wordwrap: boolean;
options?: {
wordwrap?: boolean;
value?: string;
label?: string;
placeholder?: string;
rawplaceholder?: string;
};
$buttons: HTMLDivElement;
$neutral: HTMLButtonElement;
$cancel: HTMLButtonElement;
$in: HTMLElementTagNameMap["ct-input"];
reject: (reason?: any) => void;
solve: (param?: string | null) => void;
dialog: CtDialog;
static styles: import("lit").CSSResult[];
render(): TemplateResult<1>;
firstUpdated(): void;
computeBtns(ok: string, neutral?: string, cancel?: string): void;
okbtn(e: Event): Promise<void>;
cancelbtn(e: Event): Promise<void>;
onResult(): Promise<string | undefined>;
}
declare global {
interface HTMLElementTagNameMap {
"ct-promp": CTPromp;
}
}
export {};