import { ComponentInterface, EventEmitter } from '../../stencil-public-runtime'; import { Placement, Props } from 'tippy.js'; import { TippyThemes, TooltipTrigger } from '../types'; /** * A Popover is a dialog which is bound to a specific element and appears next to it. Under the * hood, [tippy.js](https://atomiks.github.io/tippyjs/) is used. * * The Popover * and [Tooltip](https://elements.inovex.de/dist/latest/storybook/?path=/story/notification-ino-tooltip--default-usage) * components are very similar. However, popovers are complex dialogs consisting of several HTML elements, while tooltips * can only display plain text. * * @slot popover-trigger - The target element to attach the triggers to * @slot default - Content of the popover */ export declare class Popover implements ComponentInterface { el: HTMLInoPopoverElement; private tippyInstance?; private popoverContainer; private popoverContent; /** * The placement of this popover. * Accepted values: `top(-start, -end)`, `right(-start, -end)`, * `bottom(-start, -end)`, `left(-start, -end)` */ placement: Placement; placementChanged(): void; /** * Shows an arrow pointing towards its trigger-element */ arrow: boolean; /** * If set, attaches the popover element to the body. * Useful to avoid overflow or z-index issues. */ attachToBody: boolean; bodyChanged(): void; /** * The target id the popover belongs to. * If not given, the popover is attached to the element provided in the named slot (`popover-trigger`) * or the parent component if a slot element does not exist. */ for?: string; forChanged(): void; /** * If true, hides the popper on blur. */ hideOnBlur?: boolean; hideOnBlurChanged(): void; /** * If true, hides the popper on esc. */ hideOnEsc?: boolean; hideOnEscChanged(): void; /** * Displaces the popover away from, or toward, the anchor element in the direction of its placement. * A positive number displaces it further away, while a negative number lets it overlap the anchor. */ distance?: number; distanceChanged(): void; /** * Sets the color scheme of the popup. * * Valid options include: `primary`, `light` and `dark`. */ colorScheme: TippyThemes; /** * Use this if you want to interact with the popover content (e.g. button clicks) */ interactive?: boolean; interactiveChanged(): void; /** * Determines if and how the popover follows the user's mouse cursor. */ followCursor: Props['followCursor']; followCursorChanged(): void; /** * The trigger to show the tooltip - either click, hover or focus. * Multiple triggers are possible by separating them with a space. */ trigger: Exclude; triggerChanged(): void; /** * The delay in milliseconds before `ino-popover` shows up or hides. * * If only one number is given, the show and hide delay get the given delay duration. * * If two numbers are given e.g. `[500, 200]` the show delay is 500ms and the hide delay is 200ms. * * Defaults to 0ms. * */ delay?: number | [number, number]; onDelayChange(): void; /** * Returns the internally used tippy.js instance * For more informations see: https://atomiks.github.io/tippyjs/ */ getTippyInstance(): Promise; /** * Used to indicate if the popover should be controlled by itself (`false`) or manually by the `visible` property (`true`) */ controlled: boolean; controlledChanged(): void; /** * Programmatically show or hide the popover. * Can only be used in controlled mode (see property `controlled`). * Use the `visibleChanged` to sync the popovers' visibility state with yours. */ visible?: boolean; visibleChangeHandler(show: boolean): void; /** * Emits when the popover wants to show (`true`) or hide (`false`) itself. * This is depended on the `trigger` property. * Use this event in controlled-mode (see `controlled`). * * e.g.: `trigger = 'click'` - This events emits with `true` * when the user clicks on the target (slot/`for`/parent-element) * and emits with `false` when the target or the outside is clicked. */ visibleChanged: EventEmitter; componentDidLoad(): void; private create; private get target(); private handlePopoverClick; render(): any; }