igniteui-webcomponents
Version:
Ignite UI for Web Components is a complete library of UI components, giving you the ability to build modern web applications using encapsulation and the concept of reusable components in a dependency-free approach.
73 lines (72 loc) • 2.36 kB
TypeScript
import { LitElement } from 'lit';
/**
* Describes the preferred placement of a toggle component.
*/
export type IgcPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end';
/**
* @element igc-popover
*
* @slot - Content of the popover.
* @slot anchor - The element the popover will be anchored to.
*
* @csspart container - The container wrapping the slotted content in the popover.
*/
export default class IgcPopoverComponent extends LitElement {
static readonly tagName = "igc-popover";
static styles: import("lit").CSSResult;
static register(): void;
private dispose?;
private target?;
private _container;
private _anchors;
/**
* Pass an IDREF or an DOM element reference to use as the
* anchor target for the floating element.
*/
anchor?: Element | string;
/**
* When enabled this changes the placement of the floating element in order to keep it
* in view along the main axis.
*/
flip: boolean;
/**
* Placement modifier which translates the floating element along the main axis.
*/
offset: number;
/**
* The visibility state of the popover component.
*/
open: boolean;
/**
* Where to place the floating element relative to the parent anchor element.
*/
placement: IgcPlacement;
/**
* When enabled the floating element will match the width of its parent anchor element.
*/
sameWidth: boolean;
/**
* When enabled this tries to shift the floating element along the main axis
* keeping it in view, preventing overflow while maintaining the desired placement.
*/
shift: boolean;
protected anchorChange(): Promise<void>;
protected openChange(): void;
protected floatingPropChange(): void;
connectedCallback(): Promise<void>;
disconnectedCallback(): void;
protected show(): void;
protected hide(): Promise<void>;
private _showPopover;
private _hidePopover;
private _createMiddleware;
private _updateState;
private _updatePosition;
private _anchorSlotChange;
protected render(): import("lit-html").TemplateResult<1>;
}
declare global {
interface HTMLElementTagNameMap {
'igc-popover': IgcPopoverComponent;
}
}