@vaadin/combo-box 24.8.0-alpha9 → 25.0.0-alpha1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +0 -23
  2. package/package.json +14 -18
  3. package/src/vaadin-combo-box-item.js +21 -16
  4. package/src/vaadin-combo-box-mixin.js +1 -25
  5. package/src/vaadin-combo-box-overlay-mixin.js +1 -1
  6. package/src/vaadin-combo-box-overlay.js +12 -8
  7. package/src/vaadin-combo-box-scroller.js +31 -26
  8. package/src/vaadin-combo-box.d.ts +2 -6
  9. package/src/vaadin-combo-box.js +44 -41
  10. package/web-types.json +2 -487
  11. package/web-types.lit.json +2 -247
  12. package/src/vaadin-combo-box-light-mixin.d.ts +0 -26
  13. package/src/vaadin-combo-box-light-mixin.js +0 -129
  14. package/src/vaadin-combo-box-light.d.ts +0 -161
  15. package/src/vaadin-combo-box-light.js +0 -94
  16. package/src/vaadin-lit-combo-box-item.js +0 -50
  17. package/src/vaadin-lit-combo-box-light.js +0 -57
  18. package/src/vaadin-lit-combo-box-overlay.js +0 -60
  19. package/src/vaadin-lit-combo-box-scroller.js +0 -59
  20. package/src/vaadin-lit-combo-box.js +0 -169
  21. package/theme/lumo/vaadin-combo-box-light.d.ts +0 -3
  22. package/theme/lumo/vaadin-combo-box-light.js +0 -3
  23. package/theme/lumo/vaadin-lit-combo-box-light.d.ts +0 -3
  24. package/theme/lumo/vaadin-lit-combo-box-light.js +0 -3
  25. package/theme/lumo/vaadin-lit-combo-box.d.ts +0 -4
  26. package/theme/lumo/vaadin-lit-combo-box.js +0 -4
  27. package/theme/material/vaadin-combo-box-item-styles.d.ts +0 -5
  28. package/theme/material/vaadin-combo-box-item-styles.js +0 -20
  29. package/theme/material/vaadin-combo-box-light.d.ts +0 -3
  30. package/theme/material/vaadin-combo-box-light.js +0 -3
  31. package/theme/material/vaadin-combo-box-overlay-styles.d.ts +0 -4
  32. package/theme/material/vaadin-combo-box-overlay-styles.js +0 -51
  33. package/theme/material/vaadin-combo-box-styles.d.ts +0 -3
  34. package/theme/material/vaadin-combo-box-styles.js +0 -21
  35. package/theme/material/vaadin-combo-box.d.ts +0 -4
  36. package/theme/material/vaadin-combo-box.js +0 -4
  37. package/theme/material/vaadin-lit-combo-box-light.d.ts +0 -3
  38. package/theme/material/vaadin-lit-combo-box-light.js +0 -3
  39. package/theme/material/vaadin-lit-combo-box.d.ts +0 -4
  40. package/theme/material/vaadin-lit-combo-box.js +0 -4
  41. package/vaadin-combo-box-light.d.ts +0 -1
  42. package/vaadin-combo-box-light.js +0 -2
  43. package/vaadin-lit-combo-box-light.d.ts +0 -1
  44. package/vaadin-lit-combo-box-light.js +0 -2
  45. package/vaadin-lit-combo-box.d.ts +0 -1
  46. package/vaadin-lit-combo-box.js +0 -2
package/README.md CHANGED
@@ -39,29 +39,6 @@ Once installed, import the component in your application:
39
39
  import '@vaadin/combo-box';
40
40
  ```
41
41
 
42
- ## Themes
43
-
44
- Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/styling), Lumo and Material.
45
- The [main entrypoint](https://github.com/vaadin/web-components/blob/main/packages/combo-box/vaadin-combo-box.js) of the package uses the Lumo theme.
46
-
47
- To use the Material theme, import the component from the `theme/material` folder:
48
-
49
- ```js
50
- import '@vaadin/combo-box/theme/material/vaadin-combo-box.js';
51
- ```
52
-
53
- You can also import the Lumo version of the component explicitly:
54
-
55
- ```js
56
- import '@vaadin/combo-box/theme/lumo/vaadin-combo-box.js';
57
- ```
58
-
59
- Finally, you can import the un-themed component from the `src` folder to get a minimal starting point:
60
-
61
- ```js
62
- import '@vaadin/combo-box/src/vaadin-combo-box.js';
63
- ```
64
-
65
42
  ## Contributing
66
43
 
67
44
  Read the [contributing guide](https://vaadin.com/docs/latest/contributing) to learn about our development process, how to propose bugfixes and improvements, and how to test your changes to Vaadin components.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/combo-box",
3
- "version": "24.8.0-alpha9",
3
+ "version": "25.0.0-alpha1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -32,34 +32,30 @@
32
32
  "Vaadin",
33
33
  "combo-box",
34
34
  "web-components",
35
- "web-component",
36
- "polymer"
35
+ "web-component"
37
36
  ],
38
37
  "dependencies": {
39
38
  "@open-wc/dedupe-mixin": "^1.3.0",
40
- "@polymer/polymer": "^3.0.0",
41
- "@vaadin/a11y-base": "24.8.0-alpha9",
42
- "@vaadin/component-base": "24.8.0-alpha9",
43
- "@vaadin/field-base": "24.8.0-alpha9",
44
- "@vaadin/input-container": "24.8.0-alpha9",
45
- "@vaadin/item": "24.8.0-alpha9",
46
- "@vaadin/lit-renderer": "24.8.0-alpha9",
47
- "@vaadin/overlay": "24.8.0-alpha9",
48
- "@vaadin/vaadin-lumo-styles": "24.8.0-alpha9",
49
- "@vaadin/vaadin-material-styles": "24.8.0-alpha9",
50
- "@vaadin/vaadin-themable-mixin": "24.8.0-alpha9",
39
+ "@vaadin/a11y-base": "25.0.0-alpha1",
40
+ "@vaadin/component-base": "25.0.0-alpha1",
41
+ "@vaadin/field-base": "25.0.0-alpha1",
42
+ "@vaadin/input-container": "25.0.0-alpha1",
43
+ "@vaadin/item": "25.0.0-alpha1",
44
+ "@vaadin/lit-renderer": "25.0.0-alpha1",
45
+ "@vaadin/overlay": "25.0.0-alpha1",
46
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha1",
47
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha1",
51
48
  "lit": "^3.0.0"
52
49
  },
53
50
  "devDependencies": {
54
- "@vaadin/chai-plugins": "24.8.0-alpha9",
55
- "@vaadin/test-runner-commands": "24.8.0-alpha9",
51
+ "@vaadin/chai-plugins": "25.0.0-alpha1",
52
+ "@vaadin/test-runner-commands": "25.0.0-alpha1",
56
53
  "@vaadin/testing-helpers": "^1.1.0",
57
- "@vaadin/text-field": "24.8.0-alpha9",
58
54
  "sinon": "^18.0.0"
59
55
  },
60
56
  "web-types": [
61
57
  "web-types.json",
62
58
  "web-types.lit.json"
63
59
  ],
64
- "gitHead": "4de3809275ddfd733b0d13fd02af8faf73eb6770"
60
+ "gitHead": "b8c22a4a0c64156210d0daac96b43ae4e5526d49"
65
61
  }
@@ -3,9 +3,10 @@
3
3
  * Copyright (c) 2015 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
6
+ import { css, html, LitElement } from 'lit';
7
7
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
8
8
  import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
9
+ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
9
10
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
10
11
  import { ComboBoxItemMixin } from './vaadin-combo-box-item-mixin.js';
11
12
 
@@ -36,28 +37,32 @@ import { ComboBoxItemMixin } from './vaadin-combo-box-item-mixin.js';
36
37
  * @mixes DirMixin
37
38
  * @private
38
39
  */
39
- export class ComboBoxItem extends ComboBoxItemMixin(ThemableMixin(DirMixin(PolymerElement))) {
40
- static get template() {
41
- return html`
42
- <style>
43
- :host {
44
- display: block;
45
- }
40
+ export class ComboBoxItem extends ComboBoxItemMixin(ThemableMixin(DirMixin(PolylitMixin(LitElement)))) {
41
+ static get is() {
42
+ return 'vaadin-combo-box-item';
43
+ }
46
44
 
47
- :host([hidden]) {
48
- display: none;
49
- }
50
- </style>
45
+ static get styles() {
46
+ return css`
47
+ :host {
48
+ display: block;
49
+ }
50
+
51
+ :host([hidden]) {
52
+ display: none;
53
+ }
54
+ `;
55
+ }
56
+
57
+ /** @protected */
58
+ render() {
59
+ return html`
51
60
  <span part="checkmark" aria-hidden="true"></span>
52
61
  <div part="content">
53
62
  <slot></slot>
54
63
  </div>
55
64
  `;
56
65
  }
57
-
58
- static get is() {
59
- return 'vaadin-combo-box-item';
60
- }
61
66
  }
62
67
 
63
68
  defineCustomElement(ComboBoxItem);
@@ -8,10 +8,8 @@ import { FocusMixin } from '@vaadin/a11y-base/src/focus-mixin.js';
8
8
  import { isElementFocused, isKeyboardActive } from '@vaadin/a11y-base/src/focus-utils.js';
9
9
  import { KeyboardMixin } from '@vaadin/a11y-base/src/keyboard-mixin.js';
10
10
  import { isTouch } from '@vaadin/component-base/src/browser-utils.js';
11
- import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
12
11
  import { OverlayClassMixin } from '@vaadin/component-base/src/overlay-class-mixin.js';
13
12
  import { get } from '@vaadin/component-base/src/path-utils.js';
14
- import { processTemplates } from '@vaadin/component-base/src/templates.js';
15
13
  import { InputMixin } from '@vaadin/field-base/src/input-mixin.js';
16
14
  import { ValidateMixin } from '@vaadin/field-base/src/validate-mixin.js';
17
15
  import { VirtualKeyboardController } from '@vaadin/field-base/src/virtual-keyboard-controller.js';
@@ -47,7 +45,6 @@ function findItemIndex(items, callback) {
47
45
 
48
46
  /**
49
47
  * @polymerMixin
50
- * @mixes ControllerMixin
51
48
  * @mixes ValidateMixin
52
49
  * @mixes DisabledMixin
53
50
  * @mixes InputMixin
@@ -58,7 +55,7 @@ function findItemIndex(items, callback) {
58
55
  */
59
56
  export const ComboBoxMixin = (subclass) =>
60
57
  class ComboBoxMixinClass extends OverlayClassMixin(
61
- ControllerMixin(ValidateMixin(FocusMixin(KeyboardMixin(InputMixin(DisabledMixin(subclass)))))),
58
+ ValidateMixin(FocusMixin(KeyboardMixin(InputMixin(DisabledMixin(subclass))))),
62
59
  ) {
63
60
  static get properties() {
64
61
  return {
@@ -383,8 +380,6 @@ export const ComboBoxMixin = (subclass) =>
383
380
  this.addEventListener('mousedown', bringToFrontListener);
384
381
  this.addEventListener('touchstart', bringToFrontListener);
385
382
 
386
- processTemplates(this);
387
-
388
383
  this.addController(new VirtualKeyboardController(this));
389
384
  }
390
385
 
@@ -431,25 +426,6 @@ export const ComboBoxMixin = (subclass) =>
431
426
  this.opened = false;
432
427
  }
433
428
 
434
- /**
435
- * Override Polymer lifecycle callback to handle `filter` property change after
436
- * the observer for `opened` property is triggered. This is needed when opening
437
- * combo-box on user input to ensure the focused index is set correctly.
438
- *
439
- * @param {!Object} currentProps Current accessor values
440
- * @param {?Object} changedProps Properties changed since the last call
441
- * @param {?Object} oldProps Previous values for each changed property
442
- * @protected
443
- * @override
444
- */
445
- _propertiesChanged(currentProps, changedProps, oldProps) {
446
- super._propertiesChanged(currentProps, changedProps, oldProps);
447
-
448
- if (changedProps.filter !== undefined) {
449
- this._filterChanged(changedProps.filter);
450
- }
451
- }
452
-
453
429
  /**
454
430
  * Override LitElement lifecycle callback to handle filter property change.
455
431
  * @param {Object} props
@@ -64,7 +64,7 @@ export const ComboBoxOverlayMixin = (superClass) =>
64
64
  /** @protected */
65
65
  _updateOverlayWidth() {
66
66
  const propPrefix = this.localName;
67
- this.style.setProperty(`--_${propPrefix}-default-width`, `${this.positionTarget.clientWidth}px`);
67
+ this.style.setProperty(`--_${propPrefix}-default-width`, `${this.positionTarget.offsetWidth}px`);
68
68
 
69
69
  const customWidth = getComputedStyle(this._comboBox).getPropertyValue(`--${propPrefix}-width`);
70
70
 
@@ -3,12 +3,13 @@
3
3
  * Copyright (c) 2015 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
6
+ import { css, html, LitElement } from 'lit';
7
7
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
8
8
  import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
9
+ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
9
10
  import { OverlayMixin } from '@vaadin/overlay/src/vaadin-overlay-mixin.js';
10
11
  import { overlayStyles } from '@vaadin/overlay/src/vaadin-overlay-styles.js';
11
- import { css, registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
12
+ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
12
13
  import { ComboBoxOverlayMixin } from './vaadin-combo-box-overlay-mixin.js';
13
14
 
14
15
  const comboBoxOverlayStyles = css`
@@ -23,10 +24,6 @@ const comboBoxOverlayStyles = css`
23
24
  }
24
25
  `;
25
26
 
26
- registerStyles('vaadin-combo-box-overlay', [overlayStyles, comboBoxOverlayStyles], {
27
- moduleId: 'vaadin-combo-box-overlay-styles',
28
- });
29
-
30
27
  /**
31
28
  * An element used internally by `<vaadin-combo-box>`. Not intended to be used separately.
32
29
  *
@@ -38,12 +35,19 @@ registerStyles('vaadin-combo-box-overlay', [overlayStyles, comboBoxOverlayStyles
38
35
  * @mixes ThemableMixin
39
36
  * @private
40
37
  */
41
- export class ComboBoxOverlay extends ComboBoxOverlayMixin(OverlayMixin(DirMixin(ThemableMixin(PolymerElement)))) {
38
+ export class ComboBoxOverlay extends ComboBoxOverlayMixin(
39
+ OverlayMixin(DirMixin(ThemableMixin(PolylitMixin(LitElement)))),
40
+ ) {
42
41
  static get is() {
43
42
  return 'vaadin-combo-box-overlay';
44
43
  }
45
44
 
46
- static get template() {
45
+ static get styles() {
46
+ return [overlayStyles, comboBoxOverlayStyles];
47
+ }
48
+
49
+ /** @protected */
50
+ render() {
47
51
  return html`
48
52
  <div id="backdrop" part="backdrop" hidden></div>
49
53
  <div part="overlay" id="overlay">
@@ -3,8 +3,9 @@
3
3
  * Copyright (c) 2015 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
6
+ import { css, html, LitElement } from 'lit';
7
7
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
8
+ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
8
9
  import { ComboBoxScrollerMixin } from './vaadin-combo-box-scroller-mixin.js';
9
10
 
10
11
  /**
@@ -15,36 +16,40 @@ import { ComboBoxScrollerMixin } from './vaadin-combo-box-scroller-mixin.js';
15
16
  * @mixes ComboBoxScrollerMixin
16
17
  * @private
17
18
  */
18
- export class ComboBoxScroller extends ComboBoxScrollerMixin(PolymerElement) {
19
+ export class ComboBoxScroller extends ComboBoxScrollerMixin(PolylitMixin(LitElement)) {
19
20
  static get is() {
20
21
  return 'vaadin-combo-box-scroller';
21
22
  }
22
23
 
23
- static get template() {
24
+ static get styles() {
25
+ return css`
26
+ :host {
27
+ display: block;
28
+ min-height: 1px;
29
+ overflow: auto;
30
+
31
+ /* Fixes item background from getting on top of scrollbars on Safari */
32
+ transform: translate3d(0, 0, 0);
33
+
34
+ /* Enable momentum scrolling on iOS */
35
+ -webkit-overflow-scrolling: touch;
36
+
37
+ /* Fixes scrollbar disappearing when 'Show scroll bars: Always' enabled in Safari */
38
+ box-shadow: 0 0 0 white;
39
+ }
40
+
41
+ #selector {
42
+ border-width: var(--_vaadin-combo-box-items-container-border-width);
43
+ border-style: var(--_vaadin-combo-box-items-container-border-style);
44
+ border-color: var(--_vaadin-combo-box-items-container-border-color, transparent);
45
+ position: relative;
46
+ }
47
+ `;
48
+ }
49
+
50
+ /** @protected */
51
+ render() {
24
52
  return html`
25
- <style>
26
- :host {
27
- display: block;
28
- min-height: 1px;
29
- overflow: auto;
30
-
31
- /* Fixes item background from getting on top of scrollbars on Safari */
32
- transform: translate3d(0, 0, 0);
33
-
34
- /* Enable momentum scrolling on iOS */
35
- -webkit-overflow-scrolling: touch;
36
-
37
- /* Fixes scrollbar disappearing when 'Show scroll bars: Always' enabled in Safari */
38
- box-shadow: 0 0 0 white;
39
- }
40
-
41
- #selector {
42
- border-width: var(--_vaadin-combo-box-items-container-border-width);
43
- border-style: var(--_vaadin-combo-box-items-container-border-style);
44
- border-color: var(--_vaadin-combo-box-items-container-border-color, transparent);
45
- position: relative;
46
- }
47
- </style>
48
53
  <div id="selector">
49
54
  <slot></slot>
50
55
  </div>
@@ -7,7 +7,6 @@ import type { DelegateFocusMixinClass } from '@vaadin/a11y-base/src/delegate-foc
7
7
  import type { DisabledMixinClass } from '@vaadin/a11y-base/src/disabled-mixin.js';
8
8
  import type { FocusMixinClass } from '@vaadin/a11y-base/src/focus-mixin.js';
9
9
  import type { KeyboardMixinClass } from '@vaadin/a11y-base/src/keyboard-mixin.js';
10
- import type { ControllerMixinClass } from '@vaadin/component-base/src/controller-mixin.js';
11
10
  import type { DelegateStateMixinClass } from '@vaadin/component-base/src/delegate-state-mixin.js';
12
11
  import type { ElementMixinClass } from '@vaadin/component-base/src/element-mixin.js';
13
12
  import type { OverlayClassMixinClass } from '@vaadin/component-base/src/overlay-class-mixin.js';
@@ -24,6 +23,7 @@ import type { ThemePropertyMixinClass } from '@vaadin/vaadin-themable-mixin/vaad
24
23
  import type { ComboBoxDataProviderMixinClass } from './vaadin-combo-box-data-provider-mixin.js';
25
24
  import type { ComboBoxMixinClass } from './vaadin-combo-box-mixin.js';
26
25
  import type { ComboBoxDefaultItem } from './vaadin-combo-box-mixin.js';
26
+
27
27
  export {
28
28
  ComboBoxDataProvider,
29
29
  ComboBoxDataProviderCallback,
@@ -190,9 +190,6 @@ export interface ComboBoxEventMap<TItem> extends HTMLElementEventMap {
190
190
  * `opened` | Set when the combo box dropdown is open | :host
191
191
  * `loading` | Set when new items are expected | :host
192
192
  *
193
- * If you want to replace the default `<input>` and its container with a custom implementation to get full control
194
- * over the input field, consider using the [`<vaadin-combo-box-light>`](#/elements/vaadin-combo-box-light) element.
195
- *
196
193
  * ### Internal components
197
194
  *
198
195
  * In addition to `<vaadin-combo-box>` itself, the following internal
@@ -249,8 +246,7 @@ interface ComboBox<TItem = ComboBoxDefaultItem>
249
246
  DelegateFocusMixinClass,
250
247
  ThemableMixinClass,
251
248
  ThemePropertyMixinClass,
252
- ElementMixinClass,
253
- ControllerMixinClass {}
249
+ ElementMixinClass {}
254
250
 
255
251
  declare global {
256
252
  interface HTMLElementTagNameMap {
@@ -7,21 +7,21 @@ import '@vaadin/input-container/src/vaadin-input-container.js';
7
7
  import './vaadin-combo-box-item.js';
8
8
  import './vaadin-combo-box-overlay.js';
9
9
  import './vaadin-combo-box-scroller.js';
10
- import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
10
+ import { css, html, LitElement } from 'lit';
11
+ import { ifDefined } from 'lit/directives/if-defined.js';
11
12
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
12
13
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
14
+ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
13
15
  import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
14
16
  import { InputControlMixin } from '@vaadin/field-base/src/input-control-mixin.js';
15
17
  import { InputController } from '@vaadin/field-base/src/input-controller.js';
16
18
  import { LabelledInputController } from '@vaadin/field-base/src/labelled-input-controller.js';
17
19
  import { PatternMixin } from '@vaadin/field-base/src/pattern-mixin.js';
18
20
  import { inputFieldShared } from '@vaadin/field-base/src/styles/input-field-shared-styles.js';
19
- import { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
21
+ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
20
22
  import { ComboBoxDataProviderMixin } from './vaadin-combo-box-data-provider-mixin.js';
21
23
  import { ComboBoxMixin } from './vaadin-combo-box-mixin.js';
22
24
 
23
- registerStyles('vaadin-combo-box', inputFieldShared, { moduleId: 'vaadin-combo-box-styles' });
24
-
25
25
  /**
26
26
  * `<vaadin-combo-box>` is a web component for choosing a value from a filterable list of options
27
27
  * presented in a dropdown overlay. The options can be provided as a list of strings or objects
@@ -121,9 +121,6 @@ registerStyles('vaadin-combo-box', inputFieldShared, { moduleId: 'vaadin-combo-b
121
121
  * `opened` | Set when the combo box dropdown is open | :host
122
122
  * `loading` | Set when new items are expected | :host
123
123
  *
124
- * If you want to replace the default `<input>` and its container with a custom implementation to get full control
125
- * over the input field, consider using the [`<vaadin-combo-box-light>`](#/elements/vaadin-combo-box-light) element.
126
- *
127
124
  * ### Internal components
128
125
  *
129
126
  * In addition to `<vaadin-combo-box>` itself, the following internal
@@ -157,32 +154,58 @@ registerStyles('vaadin-combo-box', inputFieldShared, { moduleId: 'vaadin-combo-b
157
154
  * @mixes ComboBoxMixin
158
155
  */
159
156
  class ComboBox extends ComboBoxDataProviderMixin(
160
- ComboBoxMixin(PatternMixin(InputControlMixin(ThemableMixin(ElementMixin(PolymerElement))))),
157
+ ComboBoxMixin(PatternMixin(InputControlMixin(ThemableMixin(ElementMixin(PolylitMixin(LitElement)))))),
161
158
  ) {
162
159
  static get is() {
163
160
  return 'vaadin-combo-box';
164
161
  }
165
162
 
166
- static get template() {
167
- return html`
168
- <style>
163
+ static get styles() {
164
+ return [
165
+ inputFieldShared,
166
+ css`
169
167
  :host([opened]) {
170
168
  pointer-events: auto;
171
169
  }
172
- </style>
170
+ `,
171
+ ];
172
+ }
173
+
174
+ static get properties() {
175
+ return {
176
+ /**
177
+ * @protected
178
+ */
179
+ _positionTarget: {
180
+ type: Object,
181
+ },
182
+ };
183
+ }
184
+
185
+ /**
186
+ * Used by `InputControlMixin` as a reference to the clear button element.
187
+ * @protected
188
+ * @return {!HTMLElement}
189
+ */
190
+ get clearElement() {
191
+ return this.$.clearButton;
192
+ }
173
193
 
194
+ /** @protected */
195
+ render() {
196
+ return html`
174
197
  <div class="vaadin-combo-box-container">
175
198
  <div part="label">
176
199
  <slot name="label"></slot>
177
- <span part="required-indicator" aria-hidden="true" on-click="focus"></span>
200
+ <span part="required-indicator" aria-hidden="true" @click="${this.focus}"></span>
178
201
  </div>
179
202
 
180
203
  <vaadin-input-container
181
204
  part="input-field"
182
- readonly="[[readonly]]"
183
- disabled="[[disabled]]"
184
- invalid="[[invalid]]"
185
- theme$="[[_theme]]"
205
+ .readonly="${this.readonly}"
206
+ .disabled="${this.disabled}"
207
+ .invalid="${this.invalid}"
208
+ theme="${ifDefined(this._theme)}"
186
209
  >
187
210
  <slot name="prefix" slot="prefix"></slot>
188
211
  <slot name="input"></slot>
@@ -201,10 +224,10 @@ class ComboBox extends ComboBoxDataProviderMixin(
201
224
 
202
225
  <vaadin-combo-box-overlay
203
226
  id="overlay"
204
- opened="[[_overlayOpened]]"
205
- loading$="[[loading]]"
206
- theme$="[[_theme]]"
207
- position-target="[[_positionTarget]]"
227
+ .opened="${this._overlayOpened}"
228
+ ?loading="${this.loading}"
229
+ theme="${ifDefined(this._theme)}"
230
+ .positionTarget="${this._positionTarget}"
208
231
  no-vertical-overlap
209
232
  ></vaadin-combo-box-overlay>
210
233
 
@@ -212,26 +235,6 @@ class ComboBox extends ComboBoxDataProviderMixin(
212
235
  `;
213
236
  }
214
237
 
215
- static get properties() {
216
- return {
217
- /**
218
- * @protected
219
- */
220
- _positionTarget: {
221
- type: Object,
222
- },
223
- };
224
- }
225
-
226
- /**
227
- * Used by `InputControlMixin` as a reference to the clear button element.
228
- * @protected
229
- * @return {!HTMLElement}
230
- */
231
- get clearElement() {
232
- return this.$.clearButton;
233
- }
234
-
235
238
  /** @protected */
236
239
  ready() {
237
240
  super.ready();