UNPKG

@sandlada/mdc

Version:

@sandlada/mdc is an open source component library that follows the Material Design 3 design specifications.

62 lines 2.62 kB
/** * @license * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 * * [Modified by Kai-Orion & Sandlada] */ import { LitElement } from 'lit'; declare const DialogAction_base: import("../../utils/behaviors/mixin").MixinReturn<typeof LitElement>; export declare abstract class DialogAction extends DialogAction_base { returnValue: string; quick: boolean; protected readonly dialog: HTMLDialogElement | null; protected readonly scrim: HTMLDialogElement | null; protected readonly container: HTMLDialogElement | null; protected readonly headline: HTMLDialogElement | null; protected readonly content: HTMLDialogElement | null; protected readonly actions: HTMLDialogElement | null; protected readonly scroller: HTMLElement | null; protected readonly topAnchor: HTMLElement | null; protected readonly bottomAnchor: HTMLElement | null; protected readonly firstFocusTrap: HTMLElement | null; get open(): boolean; set open(value: boolean); protected isAtScrollTop: boolean; protected isAtScrollBottom: boolean; protected isOpen: boolean; protected isOpening: boolean; protected isConnectedPromiseResolve: () => void; protected isConnectedPromise: Promise<void>; protected nextClickIsFromContent: boolean; protected intersectionObserver?: IntersectionObserver; protected cancelAnimations?: AbortController; protected escapePressedWithoutCancel: boolean; protected getIsConnectedPromise(): Promise<void>; private get getCloseAnimation(); private get getOpenAnimation(); constructor(); protected firstUpdated(): void; show(): Promise<void>; /** * Closes the dialog and fires a cancelable `close` event. After a dialog's * animation, a `closed` event is fired. * * @param returnValue A return value usually indicating which button was used * to close a dialog. If a dialog is canceled by clicking the scrim or * pressing Escape, it will not change the return value after closing. * @return A Promise that resolves after the animation is finished and the * `closed` event was fired. */ close(returnValue?: string): Promise<void>; private animateDialog; protected handleDialogClick(): void; protected handleContentClick(): void; protected handleSubmit(event: SubmitEvent): void; protected handleCancel(event: Event): void; protected handleClose(): void; protected handleKeydown(event: KeyboardEvent): void; private handleAnchorIntersection; } export {}; //# sourceMappingURL=dialog-action.d.ts.map