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

package.src.vaadin-multi-select-combo-box-chip.js Maven / Gradle / Ivy

There is a newer version: 24.4.10
Show newest version
/**
 * @license
 * Copyright (c) 2021 - 2024 Vaadin Ltd.
 * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
 */
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';

/**
 * An element used by `` to display selected items.
 *
 * ### Styling
 *
 * The following shadow DOM parts are available for styling:
 *
 * Part name        | Description
 * -----------------|-------------
 * `label`          | Element containing the label
 * `remove-button`  | Remove button
 *
 * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
 *
 * @customElement
 * @extends HTMLElement
 * @private
 */
class MultiSelectComboBoxChip extends ThemableMixin(PolymerElement) {
  static get is() {
    return 'vaadin-multi-select-combo-box-chip';
  }

  static get properties() {
    return {
      disabled: {
        type: Boolean,
        reflectToAttribute: true,
      },

      readonly: {
        type: Boolean,
        reflectToAttribute: true,
      },

      label: {
        type: String,
      },

      item: {
        type: Object,
      },
    };
  }

  static get template() {
    return html`
      
      
[[label]]
`; } /** @private */ _onRemoveClick(event) { event.stopPropagation(); this.dispatchEvent( new CustomEvent('item-removed', { detail: { item: this.item, }, bubbles: true, composed: true, }), ); } } defineCustomElement(MultiSelectComboBoxChip);




© 2015 - 2024 Weber Informatics LLC | Privacy Policy