-
Notifications
You must be signed in to change notification settings - Fork 87
/
Copy pathvaadin-lit-combo-box-item.js
43 lines (39 loc) · 1.37 KB
/
vaadin-lit-combo-box-item.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/**
* @license
* Copyright (c) 2015 - 2025 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
*/
import { html, LitElement } from 'lit';
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
import { itemStyles } from '@vaadin/item/src/vaadin-item-styles.js';
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
import { ComboBoxItemMixin } from './vaadin-combo-box-item-mixin.js';
/**
* LitElement based version of `<vaadin-combo-box-item>` web component.
*
* ## Disclaimer
*
* This component is an experiment and not yet a part of Vaadin platform.
* 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.
*/
export class ComboBoxItem extends ComboBoxItemMixin(ThemableMixin(DirMixin(PolylitMixin(LitElement)))) {
static get is() {
return 'vaadin-combo-box-item';
}
static get styles() {
return itemStyles;
}
/** @protected */
render() {
return html`
<span part="checkmark" aria-hidden="true"></span>
<div part="content">
<slot></slot>
</div>
`;
}
}
defineCustomElement(ComboBoxItem);