UNPKG

@loadsmart/miranda-wc

Version:

Miranda Web Components component library

65 lines (64 loc) 2.13 kB
import type { PropertyValues } from 'lit'; import { Popover } from '../popover'; import type { PopoverProps, PopoverPlacement } from '../popover'; /** * TODO: a bit verbose, but it represents what we need for the time being. * A PR with improvements or simplifications is welcome. */ export type TooltipTrigger = 'click' | 'focus' | 'hover' | 'click,focus' | 'click,hover' | 'focus,hover' | 'click,focus,hover'; export type TooltipPlacement = PopoverPlacement; export interface TooltipProps extends PopoverProps { trigger?: TooltipTrigger; anchor: string; } declare const Tooltip_base: typeof Popover; export declare class Tooltip extends Tooltip_base implements TooltipProps { #private; static styles: (import("lit").CSSResult | import("lit").CSSResult[])[][]; static get properties(): { trigger: { type: StringConstructor; }; anchor: { type: StringConstructor; reflect: boolean; }; position: { type: StringConstructor; reflect: boolean; }; placement: { type: StringConstructor; }; open: { type: BooleanConstructor; reflect: boolean; }; asPopover: { type: BooleanConstructor; attribute: string; }; }; /** * Controls how the tooltip is activated. Possible options include `click`, `hover`, `focus`. Multiple * options can be passed by separating them with a comma, e.g., `'click,hover'`. */ trigger: TooltipProps['trigger']; anchor: TooltipProps['anchor']; static define(): void; constructor(); connectedCallback(): Promise<void>; disconnectedCallback(): void; firstUpdated(): void; update(changedProperties: PropertyValues<this>): void; getReferenceElement(): HTMLElement | null; getFloatingElement(): HTMLElement | null; getArrowElement(): HTMLElement | null; render(): import("lit-html").TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { 'm-tooltip': Tooltip; } } export {};