UNPKG

@sandlada/mdc

Version:

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

46 lines 1.89 kB
import { LitElement, type PropertyValues, type TemplateResult } from 'lit'; export type TPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end'; export type TPopupControllerAnimationConfig = { keyframes: Array<Keyframe>; options: KeyframeAnimationOptions; }; export type TPopupControllerAnimation = TPopupControllerAnimationConfig | ((placement: TPlacement) => TPopupControllerAnimationConfig); export type TPopupControllerCustomAnimations = { open?: TPopupControllerAnimation; close?: TPopupControllerAnimation; }; export declare class MDCPopupController extends LitElement { open: boolean; /** * Control whether the animation is enabled or not. */ quick: boolean; placement: TPlacement; disableFlip: boolean; customAnimations?: TPopupControllerCustomAnimations; private cleanup?; constructor(); private getDirectionFromPlacement; private readonly getDefaultAnimation; private surfaceAnimation; private animateSurface; private readonly surfaceElements; private readonly triggerElements; private get triggerElement(); private get surfaceElement(); protected render(): TemplateResult; protected renderSurfaceSlot(): TemplateResult<1>; protected renderTriggerSlot(): TemplateResult<1>; private handleSlotChange; private handleOpenChange; show(): Promise<void>; hide(): Promise<void>; private readonly handleTriggerClick; private readonly handleDocumentClick; private readonly handleDocumentKeyDown; connectedCallback(): void; disconnectedCallback(): void; protected firstUpdated(_changedProperties: PropertyValues): void; protected updated(changedProperties: Map<string, unknown>): void; } //# sourceMappingURL=popup-controller.d.ts.map