All Downloads are FREE. Search and download functionalities are using the official Maven repository.

menu-barpackage.src.vaadin-lit-menu-bar.js Maven / Gradle / Ivy

The newest version!
/**
 * @license
 * Copyright (c) 2019 - 2024 Vaadin Ltd.
 * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
 */
import './vaadin-lit-menu-bar-submenu.js';
import './vaadin-lit-menu-bar-button.js';
import { css, html, LitElement } from 'lit';
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
import { MenuBarMixin } from './vaadin-menu-bar-mixin.js';

/**
 * LitElement based version of `` web component.
 *
 * ## Disclaimer
 *
 * This component is an experiment not intended for publishing to npm.
 * There is no ETA regarding specific Vaadin version where it'll land.
 * Feel free to try this code in your apps as per Apache 2.0 license.
 */
class MenuBar extends MenuBarMixin(ElementMixin(ThemableMixin(PolylitMixin(LitElement)))) {
  static get is() {
    return 'vaadin-menu-bar';
  }

  static get styles() {
    return css`
      :host {
        display: block;
      }

      :host([hidden]) {
        display: none !important;
      }

      [part='container'] {
        position: relative;
        display: flex;
        width: 100%;
        flex-wrap: nowrap;
        overflow: hidden;
      }
    `;
  }

  /** @protected */
  render() {
    return html`
      
`; } /** @protected */ ready() { super.ready(); this._tooltipController = new TooltipController(this); this._tooltipController.setManual(true); this.addController(this._tooltipController); } /** * Fired when either a submenu item or menu bar button without nested children is clicked. * * @event item-selected * @param {Object} detail * @param {Object} detail.value the selected menu bar item */ } defineCustomElement(MenuBar); export { MenuBar };




© 2015 - 2024 Weber Informatics LLC | Privacy Policy