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

combo-boxpackage.src.vaadin-combo-box-light.js Maven / Gradle / Ivy

The newest version!
/**
 * @license
 * Copyright (c) 2015 - 2024 Vaadin Ltd.
 * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
 */
import './vaadin-combo-box-item.js';
import './vaadin-combo-box-overlay.js';
import './vaadin-combo-box-scroller.js';
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';
import { ComboBoxLightMixin } from './vaadin-combo-box-light-mixin.js';

/**
 * `` is a customizable version of the `` providing
 * only the dropdown functionality and leaving the input field definition to the user.
 *
 * The element has the same API as ``.
 *
 * To create a custom input field, you need to add a child element which has a two-way
 * data-bindable property representing the input value. The property name is expected
 * to be `value` by default. For example, you can use `` element:
 *
 * ```html
 * 
 *   
 * 
 * ```
 *
 * If you are using custom input field that has other property for value,
 * set `class="input"` to enable corresponding logic, and use `attr-for-value`
 * attribute to specify which property to use:
 *
 * ```html
 * 
 *   
 * 
 * ```
 *
 * You can also pass custom toggle and clear buttons with corresponding classes:
 *
 * ```html
 * 
 *   
 *     
 *     
 *   
 * 
 * ```
 *
 * @fires {Event} change - Fired when the user commits a value change.
 * @fires {CustomEvent} custom-value-set - Fired when the user sets a custom value.
 * @fires {CustomEvent} filter-changed - Fired when the `filter` property changes.
 * @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.
 * @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
 * @fires {CustomEvent} selected-item-changed - Fired when the `selectedItem` property changes.
 * @fires {CustomEvent} value-changed - Fired when the `value` property changes.
 * @fires {CustomEvent} validated - Fired whenever the field is validated.
 *
 * @customElement
 * @extends HTMLElement
 * @mixes ComboBoxLightMixin
 * @mixes ThemableMixin
 */
class ComboBoxLight extends ComboBoxLightMixin(ThemableMixin(PolymerElement)) {
  static get is() {
    return 'vaadin-combo-box-light';
  }

  static get template() {
    return html`
      

      

      
    `;
  }
}

defineCustomElement(ComboBoxLight);

export { ComboBoxLight };




© 2015 - 2024 Weber Informatics LLC | Privacy Policy