tooltippackage.src.vaadin-tooltip.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vaadin-webcomponents Show documentation
Show all versions of vaadin-webcomponents Show documentation
Mvnpm composite: Vaadin webcomponents
The newest version!
/**
* @license
* Copyright (c) 2022 - 2024 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
*/
import './vaadin-tooltip-overlay.js';
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
import { ThemePropertyMixin } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js';
import { TooltipMixin } from './vaadin-tooltip-mixin.js';
/**
* `` is a Web Component for creating tooltips.
*
* ```html
*
*
* ```
*
* ### Styling
*
* `` uses `` internal
* themable component as the actual visible overlay.
*
* See [``](#/elements/vaadin-overlay) documentation
* for `` parts.
*
* The following state attributes are available for styling:
*
* Attribute | Description
* -----------------|----------------------------------------
* `position` | Reflects the `position` property value.
*
* Note: the `theme` attribute value set on `` is
* propagated to the internal `` component.
*
* ### Custom CSS Properties
*
* The following custom CSS properties are available on the `` element:
*
* Custom CSS property | Description
* ---------------------------------|-------------
* `--vaadin-tooltip-offset-top` | Used as an offset when the tooltip is aligned vertically below the target
* `--vaadin-tooltip-offset-bottom` | Used as an offset when the tooltip is aligned vertically above the target
* `--vaadin-tooltip-offset-start` | Used as an offset when the tooltip is aligned horizontally after the target
* `--vaadin-tooltip-offset-end` | Used as an offset when the tooltip is aligned horizontally before the target
*
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
*
* @customElement
* @extends HTMLElement
* @mixes ControllerMixin
* @mixes ElementMixin
* @mixes ThemePropertyMixin
* @mixes TooltipMixin
*/
class Tooltip extends TooltipMixin(ThemePropertyMixin(ElementMixin(ControllerMixin(PolymerElement)))) {
static get is() {
return 'vaadin-tooltip';
}
static get template() {
return html`
`;
}
}
defineCustomElement(Tooltip);
export { Tooltip };