/** * Copyright (c) Cisco Systems, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ import { LitElement, PropertyValues } from "lit"; import { TooltipEvent } from "../tooltip/Tooltip"; declare global { interface Window { ShadyCSS: { nativeShadow: boolean; prepareTemplate(template: HTMLTemplateElement, elementName: string, typeExtension?: string): void; styleElement(host: HTMLElement): void; ScopingShim: { prepareAdoptedCssText(cssTextArray: string[], elementName: string): void; }; }; } interface ShadowRoot { adoptedStyleSheets?: ThemeStyleSheet[]; } interface ThemeStyleSheet { replaceSync: Function; } } export type ThemeName = "momentum" | "lumos" | "momentumV2"; export declare const ThemeNameValues: ThemeName[]; export declare const BackgroundModeValues: string[]; export type BackgroundMode = (typeof BackgroundModeValues)[number]; export declare namespace Theme { type Attributes = { darkTheme: boolean; mdTheme: boolean; }; /** * Popper.js can't position overlay content correct in * case when element inside container with overflow: hidden. * https://github.com/popperjs/popper-core/issues/112. * To make possible to position such element correctly, we need * move creating popper instance in parent container that guarantee * will not contain overflow property with hidden value; */ class ELEMENT extends LitElement { darkTheme: boolean; lumos: boolean; theme?: ThemeName; private activeTheme; virtualWrapper: HTMLDivElement; virtualReference: HTMLDivElement; private placement; private popperInstance; private activeTooltipTrigger; private positionTrackingId; private setTheme; getStyleElement(): HTMLStyleElement; applyStyle(): void; private removeChildFromVirtualPopper; private setInitStyleToVirtualReference; private setStyleToVirtualReference; private setVirtualReferencePosition; private initVirtualElements; private setVirtualSlotContent; protected willUpdate(changedProperties: PropertyValues): void; protected updated(changedProperties: PropertyValues): void; handleVirtualTooltipCreate(event: CustomEvent): void; private startContinuousPositionTracking; private stopContinuousPositionTracking; handleVirtualTooltipDestroy(event: CustomEvent): void; handleVirtualTooltipChangeMessage(event: CustomEvent): void; handleVirtualTooltipSlotChange(event: CustomEvent): void; handleTooltipRemoved: () => void; private destroyPopperInstance; private createPopperInstance; private get virtualPopper(); private get virtualArrow(); private get virtualTooltipContent(); private showVirtualTooltip; private hideVirtualTooltip; private setupEvents; private teardownEvents; disconnectedCallback(): void; protected firstUpdated(changedProperties: PropertyValues): Promise; static get styles(): import("lit").CSSResult[]; render(): import("lit-html").TemplateResult<1>; } } declare global { interface HTMLElementTagNameMap { "md-theme": Theme.ELEMENT; } }