@vaadin/combo-box 24.2.0-alpha4 → 24.2.0-alpha6

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/combo-box",
3
- "version": "24.2.0-alpha4",
3
+ "version": "24.2.0-alpha6",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -38,21 +38,21 @@
38
38
  "dependencies": {
39
39
  "@open-wc/dedupe-mixin": "^1.3.0",
40
40
  "@polymer/polymer": "^3.0.0",
41
- "@vaadin/a11y-base": "24.2.0-alpha4",
42
- "@vaadin/component-base": "24.2.0-alpha4",
43
- "@vaadin/field-base": "24.2.0-alpha4",
44
- "@vaadin/input-container": "24.2.0-alpha4",
45
- "@vaadin/item": "24.2.0-alpha4",
46
- "@vaadin/lit-renderer": "24.2.0-alpha4",
47
- "@vaadin/overlay": "24.2.0-alpha4",
48
- "@vaadin/vaadin-lumo-styles": "24.2.0-alpha4",
49
- "@vaadin/vaadin-material-styles": "24.2.0-alpha4",
50
- "@vaadin/vaadin-themable-mixin": "24.2.0-alpha4"
41
+ "@vaadin/a11y-base": "24.2.0-alpha6",
42
+ "@vaadin/component-base": "24.2.0-alpha6",
43
+ "@vaadin/field-base": "24.2.0-alpha6",
44
+ "@vaadin/input-container": "24.2.0-alpha6",
45
+ "@vaadin/item": "24.2.0-alpha6",
46
+ "@vaadin/lit-renderer": "24.2.0-alpha6",
47
+ "@vaadin/overlay": "24.2.0-alpha6",
48
+ "@vaadin/vaadin-lumo-styles": "24.2.0-alpha6",
49
+ "@vaadin/vaadin-material-styles": "24.2.0-alpha6",
50
+ "@vaadin/vaadin-themable-mixin": "24.2.0-alpha6"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@esm-bundle/chai": "^4.3.4",
54
- "@vaadin/testing-helpers": "^0.4.2",
55
- "@vaadin/text-field": "24.2.0-alpha4",
54
+ "@vaadin/testing-helpers": "^0.4.3",
55
+ "@vaadin/text-field": "24.2.0-alpha6",
56
56
  "lit": "^2.0.0",
57
57
  "sinon": "^13.0.2"
58
58
  },
@@ -60,5 +60,5 @@
60
60
  "web-types.json",
61
61
  "web-types.lit.json"
62
62
  ],
63
- "gitHead": "aaf7c5ebfea62628210eead4229be1718ac6b129"
63
+ "gitHead": "3ef6e6cd66919b3ef7637e42916e4c54656beb51"
64
64
  }
@@ -3,8 +3,8 @@
3
3
  * Copyright (c) 2017 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import type { TemplateResult } from 'lit';
7
6
  import type { DirectiveResult } from 'lit/directive.js';
7
+ import type { LitRendererResult } from '@vaadin/lit-renderer';
8
8
  import { LitRendererDirective } from '@vaadin/lit-renderer';
9
9
  import type { ComboBox, ComboBoxItemModel } from '../vaadin-combo-box.js';
10
10
 
@@ -12,7 +12,7 @@ export type ComboBoxLitRenderer<TItem> = (
12
12
  item: TItem,
13
13
  model: ComboBoxItemModel<TItem>,
14
14
  comboBox: ComboBox<TItem>,
15
- ) => TemplateResult;
15
+ ) => LitRendererResult;
16
16
 
17
17
  export class ComboBoxRendererDirective<TItem> extends LitRendererDirective<ComboBox, ComboBoxLitRenderer<TItem>> {
18
18
  /**
@@ -4,6 +4,7 @@
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import type { DisabledMixinClass } from '@vaadin/a11y-base/src/disabled-mixin.js';
7
+ import type { FocusMixinClass } from '@vaadin/a11y-base/src/focus-mixin.js';
7
8
  import type { KeyboardMixinClass } from '@vaadin/a11y-base/src/keyboard-mixin.js';
8
9
  import type { InputMixinClass } from '@vaadin/field-base/src/input-mixin.js';
9
10
  import type { ValidateMixinClass } from '@vaadin/field-base/src/validate-mixin.js';
@@ -152,6 +153,7 @@ interface ComboBoxLight<TItem = ComboBoxDefaultItem>
152
153
  InputMixinClass,
153
154
  DisabledMixinClass,
154
155
  ThemableMixinClass,
156
+ FocusMixinClass,
155
157
  ThemePropertyMixinClass,
156
158
  ValidateMixinClass {}
157
159
 
@@ -180,7 +180,7 @@ class ComboBoxLight extends ComboBoxDataProviderMixin(ComboBoxMixin(ValidateMixi
180
180
  * @return {boolean}
181
181
  */
182
182
  checkValidity() {
183
- if (this.inputElement.validate) {
183
+ if (this.inputElement && this.inputElement.validate) {
184
184
  return this.inputElement.validate();
185
185
  }
186
186
  return super.checkValidity();
@@ -199,16 +199,16 @@ class ComboBoxLight extends ComboBoxDataProviderMixin(ComboBoxMixin(ValidateMixi
199
199
  * @protected
200
200
  * @override
201
201
  */
202
- _onFocusout(event) {
202
+ _shouldRemoveFocus(event) {
203
203
  const isBlurringControlButtons = event.target === this._toggleElement || event.target === this.clearElement;
204
204
  const isFocusingInputElement = event.relatedTarget && event.relatedTarget === this._nativeInput;
205
205
 
206
206
  // prevent closing the overlay when moving focus from clear or toggle buttons to the internal input
207
207
  if (isBlurringControlButtons && isFocusingInputElement) {
208
- return;
208
+ return false;
209
209
  }
210
210
 
211
- super._onFocusout(event);
211
+ return super._shouldRemoveFocus(event);
212
212
  }
213
213
  }
214
214
 
@@ -5,9 +5,11 @@
5
5
  */
6
6
  import type { Constructor } from '@open-wc/dedupe-mixin';
7
7
  import type { DisabledMixinClass } from '@vaadin/a11y-base/src/disabled-mixin.js';
8
+ import type { FocusMixinClass } from '@vaadin/a11y-base/src/focus-mixin.js';
8
9
  import type { KeyboardMixinClass } from '@vaadin/a11y-base/src/keyboard-mixin.js';
9
10
  import type { OverlayClassMixinClass } from '@vaadin/component-base/src/overlay-class-mixin.js';
10
11
  import type { InputMixinClass } from '@vaadin/field-base/src/input-mixin.js';
12
+ import type { ValidateMixinClass } from '@vaadin/field-base/src/validate-mixin.js';
11
13
  import type { ComboBox } from './vaadin-combo-box.js';
12
14
  import type { ComboBoxDefaultItem, ComboBoxItemModel, ComboBoxItemRenderer } from './vaadin-combo-box-item-mixin.js';
13
15
 
@@ -19,9 +21,11 @@ export declare function ComboBoxMixin<TItem, T extends Constructor<HTMLElement>>
19
21
  base: T,
20
22
  ): Constructor<ComboBoxMixinClass<TItem>> &
21
23
  Constructor<DisabledMixinClass> &
24
+ Constructor<FocusMixinClass> &
22
25
  Constructor<InputMixinClass> &
23
26
  Constructor<KeyboardMixinClass> &
24
27
  Constructor<OverlayClassMixinClass> &
28
+ Constructor<ValidateMixinClass> &
25
29
  T;
26
30
 
27
31
  export declare class ComboBoxMixinClass<TItem> {
@@ -4,6 +4,7 @@
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { DisabledMixin } from '@vaadin/a11y-base/src/disabled-mixin.js';
7
+ import { FocusMixin } from '@vaadin/a11y-base/src/focus-mixin.js';
7
8
  import { isElementFocused } from '@vaadin/a11y-base/src/focus-utils.js';
8
9
  import { KeyboardMixin } from '@vaadin/a11y-base/src/keyboard-mixin.js';
9
10
  import { isTouch } from '@vaadin/component-base/src/browser-utils.js';
@@ -11,6 +12,7 @@ import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js'
11
12
  import { OverlayClassMixin } from '@vaadin/component-base/src/overlay-class-mixin.js';
12
13
  import { processTemplates } from '@vaadin/component-base/src/templates.js';
13
14
  import { InputMixin } from '@vaadin/field-base/src/input-mixin.js';
15
+ import { ValidateMixin } from '@vaadin/field-base/src/validate-mixin.js';
14
16
  import { VirtualKeyboardController } from '@vaadin/field-base/src/virtual-keyboard-controller.js';
15
17
  import { ComboBoxPlaceholder } from './vaadin-combo-box-placeholder.js';
16
18
 
@@ -45,15 +47,17 @@ function findItemIndex(items, callback) {
45
47
  /**
46
48
  * @polymerMixin
47
49
  * @mixes ControllerMixin
50
+ * @mixes ValidateMixin
48
51
  * @mixes DisabledMixin
49
52
  * @mixes InputMixin
50
53
  * @mixes KeyboardMixin
54
+ * @mixes FocusMixin
51
55
  * @mixes OverlayClassMixin
52
56
  * @param {function(new:HTMLElement)} subclass
53
57
  */
54
58
  export const ComboBoxMixin = (subclass) =>
55
59
  class ComboBoxMixinClass extends OverlayClassMixin(
56
- ControllerMixin(KeyboardMixin(InputMixin(DisabledMixin(subclass)))),
60
+ ControllerMixin(ValidateMixin(FocusMixin(KeyboardMixin(InputMixin(DisabledMixin(subclass)))))),
57
61
  ) {
58
62
  static get properties() {
59
63
  return {
@@ -253,7 +257,6 @@ export const ComboBoxMixin = (subclass) =>
253
257
 
254
258
  constructor() {
255
259
  super();
256
- this._boundOnFocusout = this._onFocusout.bind(this);
257
260
  this._boundOverlaySelectedItemChanged = this._overlaySelectedItemChanged.bind(this);
258
261
  this._boundOnClearButtonMouseDown = this.__onClearButtonMouseDown.bind(this);
259
262
  this._boundOnClick = this._onClick.bind(this);
@@ -320,8 +323,6 @@ export const ComboBoxMixin = (subclass) =>
320
323
  this._initOverlay();
321
324
  this._initScroller();
322
325
 
323
- this.addEventListener('focusout', this._boundOnFocusout);
324
-
325
326
  this._lastCommittedValue = this.value;
326
327
 
327
328
  this.addEventListener('click', this._boundOnClick);
@@ -1085,6 +1086,12 @@ export const ComboBoxMixin = (subclass) =>
1085
1086
 
1086
1087
  /** @private */
1087
1088
  _detectAndDispatchChange() {
1089
+ // Do not validate when focusout is caused by document
1090
+ // losing focus, which happens on browser tab switch.
1091
+ if (document.hasFocus()) {
1092
+ this.validate();
1093
+ }
1094
+
1088
1095
  if (this.value !== this._lastCommittedValue) {
1089
1096
  this.dispatchEvent(new CustomEvent('change', { bubbles: true }));
1090
1097
  this._lastCommittedValue = this.value;
@@ -1227,20 +1234,18 @@ export const ComboBoxMixin = (subclass) =>
1227
1234
  }
1228
1235
  }
1229
1236
 
1230
- /** @private */
1231
- _onFocusout(event) {
1232
- // VoiceOver on iOS fires `focusout` event when moving focus to the item in the dropdown.
1233
- // Do not focus the input in this case, because it would break announcement for the item.
1234
- if (event.relatedTarget && event.relatedTarget.localName === `${this._tagNamePrefix}-item`) {
1235
- return;
1236
- }
1237
+ /**
1238
+ * Override method inherited from `FocusMixin`
1239
+ * to close the overlay on blur and commit the value.
1240
+ *
1241
+ * @param {boolean} focused
1242
+ * @protected
1243
+ * @override
1244
+ */
1245
+ _setFocused(focused) {
1246
+ super._setFocused(focused);
1237
1247
 
1238
- // Fixes the problem with `focusout` happening when clicking on the scroll bar on Edge
1239
- if (event.relatedTarget === this._overlayElement) {
1240
- event.composedPath()[0].focus();
1241
- return;
1242
- }
1243
- if (!this.readonly && !this._closeOnBlurIsPrevented) {
1248
+ if (!focused && !this.readonly && !this._closeOnBlurIsPrevented) {
1244
1249
  // User's logic in `custom-value-set` event listener might cause input to blur,
1245
1250
  // which will result in attempting to commit the same custom value once again.
1246
1251
  if (!this.opened && this.allowCustomValue && this._inputElementValue === this._lastCustomValue) {
@@ -1252,6 +1257,32 @@ export const ComboBoxMixin = (subclass) =>
1252
1257
  }
1253
1258
  }
1254
1259
 
1260
+ /**
1261
+ * Override method inherited from `FocusMixin` to not remove focused
1262
+ * state when focus moves to the overlay.
1263
+ *
1264
+ * @param {FocusEvent} event
1265
+ * @return {boolean}
1266
+ * @protected
1267
+ * @override
1268
+ */
1269
+ _shouldRemoveFocus(event) {
1270
+ // VoiceOver on iOS fires `focusout` event when moving focus to the item in the dropdown.
1271
+ // Do not focus the input in this case, because it would break announcement for the item.
1272
+ if (event.relatedTarget && event.relatedTarget.localName === `${this._tagNamePrefix}-item`) {
1273
+ return false;
1274
+ }
1275
+
1276
+ // Do not blur when focus moves to the overlay
1277
+ // Also, fixes the problem with `focusout` happening when clicking on the scroll bar on Edge
1278
+ if (event.relatedTarget === this._overlayElement) {
1279
+ event.composedPath()[0].focus();
1280
+ return false;
1281
+ }
1282
+
1283
+ return true;
1284
+ }
1285
+
1255
1286
  /** @private */
1256
1287
  _onTouchend(event) {
1257
1288
  if (!this.clearElement || event.composedPath()[0] !== this.clearElement) {
@@ -3,13 +3,15 @@
3
3
  * Copyright (c) 2015 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import { Overlay } from '@vaadin/overlay/src/vaadin-overlay.js';
6
+ import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
7
+ import { OverlayMixin } from '@vaadin/overlay/src/vaadin-overlay-mixin.js';
8
+ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
7
9
  import { ComboBoxOverlayMixin } from './vaadin-combo-box-overlay-mixin.js';
8
10
 
9
11
  /**
10
12
  * An element used internally by `<vaadin-combo-box>`. Not intended to be used separately.
11
13
  */
12
- declare class ComboBoxOverlay extends ComboBoxOverlayMixin(Overlay) {}
14
+ declare class ComboBoxOverlay extends ComboBoxOverlayMixin(OverlayMixin(DirMixin(ThemableMixin(HTMLElement)))) {}
13
15
 
14
16
  declare global {
15
17
  interface HTMLElementTagNameMap {
@@ -3,54 +3,52 @@
3
3
  * Copyright (c) 2015 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import { Overlay } from '@vaadin/overlay/src/vaadin-overlay.js';
7
- import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
6
+ import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
7
+ import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
8
+ import { OverlayMixin } from '@vaadin/overlay/src/vaadin-overlay-mixin.js';
9
+ import { overlayStyles } from '@vaadin/overlay/src/vaadin-overlay-styles.js';
10
+ import { css, registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
8
11
  import { ComboBoxOverlayMixin } from './vaadin-combo-box-overlay-mixin.js';
9
12
 
10
- registerStyles(
11
- 'vaadin-combo-box-overlay',
12
- css`
13
- #overlay {
14
- width: var(--vaadin-combo-box-overlay-width, var(--_vaadin-combo-box-overlay-default-width, auto));
15
- }
13
+ const comboBoxOverlayStyles = css`
14
+ #overlay {
15
+ width: var(--vaadin-combo-box-overlay-width, var(--_vaadin-combo-box-overlay-default-width, auto));
16
+ }
16
17
 
17
- [part='content'] {
18
- display: flex;
19
- flex-direction: column;
20
- height: 100%;
21
- }
22
- `,
23
- { moduleId: 'vaadin-combo-box-overlay-styles' },
24
- );
18
+ [part='content'] {
19
+ display: flex;
20
+ flex-direction: column;
21
+ height: 100%;
22
+ }
23
+ `;
25
24
 
26
- let memoizedTemplate;
25
+ registerStyles('vaadin-combo-box-overlay', [overlayStyles, comboBoxOverlayStyles], {
26
+ moduleId: 'vaadin-combo-box-overlay-styles',
27
+ });
27
28
 
28
29
  /**
29
30
  * An element used internally by `<vaadin-combo-box>`. Not intended to be used separately.
30
31
  *
31
- * @extends Overlay
32
+ * @extends HTMLElement
32
33
  * @mixes ComboBoxOverlayMixin
34
+ * @mixes DirMixin
35
+ * @mixes OverlayMixin
36
+ * @mixes ThemableMixin
33
37
  * @private
34
38
  */
35
- export class ComboBoxOverlay extends ComboBoxOverlayMixin(Overlay) {
39
+ export class ComboBoxOverlay extends ComboBoxOverlayMixin(OverlayMixin(DirMixin(ThemableMixin(PolymerElement)))) {
36
40
  static get is() {
37
41
  return 'vaadin-combo-box-overlay';
38
42
  }
39
43
 
40
44
  static get template() {
41
- if (!memoizedTemplate) {
42
- memoizedTemplate = super.template.cloneNode(true);
43
-
44
- const overlay = memoizedTemplate.content.querySelector('[part~="overlay"]');
45
- overlay.removeAttribute('tabindex');
46
-
47
- const loader = document.createElement('div');
48
- loader.setAttribute('part', 'loader');
49
-
50
- overlay.insertBefore(loader, overlay.firstElementChild);
51
- }
52
-
53
- return memoizedTemplate;
45
+ return html`
46
+ <div id="backdrop" part="backdrop" hidden></div>
47
+ <div part="overlay" id="overlay">
48
+ <div part="loader"></div>
49
+ <div part="content" id="content"><slot></slot></div>
50
+ </div>
51
+ `;
54
52
  }
55
53
  }
56
54
 
@@ -254,40 +254,6 @@ class ComboBox extends ComboBoxDataProviderMixin(
254
254
  this._toggleElement = this.$.toggleButton;
255
255
  }
256
256
 
257
- /**
258
- * Override method inherited from `FocusMixin` to validate on blur.
259
- * @param {boolean} focused
260
- * @protected
261
- * @override
262
- */
263
- _setFocused(focused) {
264
- super._setFocused(focused);
265
-
266
- // Do not validate when focusout is caused by document
267
- // losing focus, which happens on browser tab switch.
268
- if (!focused && document.hasFocus()) {
269
- this.validate();
270
- }
271
- }
272
-
273
- /**
274
- * Override method inherited from `FocusMixin` to not remove focused
275
- * state when focus moves to the overlay.
276
- * @param {FocusEvent} event
277
- * @return {boolean}
278
- * @protected
279
- * @override
280
- */
281
- _shouldRemoveFocus(event) {
282
- // Do not blur when focus moves to the overlay
283
- if (event.relatedTarget === this._overlayElement) {
284
- event.composedPath()[0].focus();
285
- return false;
286
- }
287
-
288
- return true;
289
- }
290
-
291
257
  /**
292
258
  * Override the method from `InputControlMixin`
293
259
  * to stop event propagation to prevent `ComboBoxMixin`
@@ -1,7 +1,6 @@
1
1
  import '@vaadin/vaadin-lumo-styles/color.js';
2
2
  import '@vaadin/vaadin-lumo-styles/spacing.js';
3
3
  import '@vaadin/vaadin-lumo-styles/style.js';
4
- import '@vaadin/overlay/theme/lumo/vaadin-overlay.js';
5
4
  import { loader } from '@vaadin/vaadin-lumo-styles/mixins/loader.js';
6
5
  import { menuOverlayCore } from '@vaadin/vaadin-lumo-styles/mixins/menu-overlay.js';
7
6
  import { overlay } from '@vaadin/vaadin-lumo-styles/mixins/overlay.js';
@@ -1,5 +1,4 @@
1
1
  import '@vaadin/vaadin-material-styles/color.js';
2
- import '@vaadin/overlay/theme/material/vaadin-overlay.js';
3
2
  import { loader } from '@vaadin/vaadin-material-styles/mixins/loader.js';
4
3
  import { menuOverlay } from '@vaadin/vaadin-material-styles/mixins/menu-overlay.js';
5
4
  import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/combo-box",
4
- "version": "24.2.0-alpha4",
4
+ "version": "24.2.0-alpha6",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -29,6 +29,28 @@
29
29
  ]
30
30
  }
31
31
  },
32
+ {
33
+ "name": "invalid",
34
+ "description": "Set to true when the field is invalid.",
35
+ "value": {
36
+ "type": [
37
+ "boolean",
38
+ "null",
39
+ "undefined"
40
+ ]
41
+ }
42
+ },
43
+ {
44
+ "name": "required",
45
+ "description": "Specifies that the user must fill in a value.",
46
+ "value": {
47
+ "type": [
48
+ "boolean",
49
+ "null",
50
+ "undefined"
51
+ ]
52
+ }
53
+ },
32
54
  {
33
55
  "name": "disabled",
34
56
  "description": "If true, the user cannot interact with this element.",
@@ -147,28 +169,6 @@
147
169
  ]
148
170
  }
149
171
  },
150
- {
151
- "name": "invalid",
152
- "description": "Set to true when the field is invalid.",
153
- "value": {
154
- "type": [
155
- "boolean",
156
- "null",
157
- "undefined"
158
- ]
159
- }
160
- },
161
- {
162
- "name": "required",
163
- "description": "Specifies that the user must fill in a value.",
164
- "value": {
165
- "type": [
166
- "boolean",
167
- "null",
168
- "undefined"
169
- ]
170
- }
171
- },
172
172
  {
173
173
  "name": "attr-for-value",
174
174
  "description": "Name of the two-way data-bindable property representing the\nvalue of the custom input field.",
@@ -221,6 +221,28 @@
221
221
  ]
222
222
  }
223
223
  },
224
+ {
225
+ "name": "invalid",
226
+ "description": "Set to true when the field is invalid.",
227
+ "value": {
228
+ "type": [
229
+ "boolean",
230
+ "null",
231
+ "undefined"
232
+ ]
233
+ }
234
+ },
235
+ {
236
+ "name": "required",
237
+ "description": "Specifies that the user must fill in a value.",
238
+ "value": {
239
+ "type": [
240
+ "boolean",
241
+ "null",
242
+ "undefined"
243
+ ]
244
+ }
245
+ },
224
246
  {
225
247
  "name": "disabled",
226
248
  "description": "If true, the user cannot interact with this element.",
@@ -382,28 +404,6 @@
382
404
  ]
383
405
  }
384
406
  },
385
- {
386
- "name": "invalid",
387
- "description": "Set to true when the field is invalid.",
388
- "value": {
389
- "type": [
390
- "boolean",
391
- "null",
392
- "undefined"
393
- ]
394
- }
395
- },
396
- {
397
- "name": "required",
398
- "description": "Specifies that the user must fill in a value.",
399
- "value": {
400
- "type": [
401
- "boolean",
402
- "null",
403
- "undefined"
404
- ]
405
- }
406
- },
407
407
  {
408
408
  "name": "attrForValue",
409
409
  "description": "Name of the two-way data-bindable property representing the\nvalue of the custom input field.",
@@ -415,6 +415,10 @@
415
415
  }
416
416
  ],
417
417
  "events": [
418
+ {
419
+ "name": "validated",
420
+ "description": "Fired whenever the field is validated."
421
+ },
418
422
  {
419
423
  "name": "change",
420
424
  "description": "Fired when value changes.\nTo comply with https://developer.mozilla.org/en-US/docs/Web/Events/change"
@@ -440,8 +444,8 @@
440
444
  "description": "Fired when the value changes."
441
445
  },
442
446
  {
443
- "name": "validated",
444
- "description": "Fired whenever the field is validated."
447
+ "name": "invalid-changed",
448
+ "description": "Fired when the `invalid` property changes."
445
449
  },
446
450
  {
447
451
  "name": "opened-changed",
@@ -450,17 +454,13 @@
450
454
  {
451
455
  "name": "filter-changed",
452
456
  "description": "Fired when the `filter` property changes."
453
- },
454
- {
455
- "name": "invalid-changed",
456
- "description": "Fired when the `invalid` property changes."
457
457
  }
458
458
  ]
459
459
  }
460
460
  },
461
461
  {
462
462
  "name": "vaadin-combo-box",
463
- "description": "`<vaadin-combo-box>` is a web component for choosing a value from a filterable list of options\npresented in a dropdown overlay. The options can be provided as a list of strings or objects\nby setting [`items`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha4/#/elements/vaadin-combo-box#property-items) property on the element.\n\n```html\n<vaadin-combo-box id=\"combo-box\"></vaadin-combo-box>\n```\n```js\ndocument.querySelector('#combo-box').items = ['apple', 'orange', 'banana'];\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Item rendering\n\nTo customize the content of the `<vaadin-combo-box-item>` elements placed in the dropdown, use\n[`renderer`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha4/#/elements/vaadin-combo-box#property-renderer) property which accepts a function.\nThe renderer function is called with `root`, `comboBox`, and `model` as arguments.\n\nGenerate DOM content by using `model` object properties if needed, and append it to the `root`\nelement. The `comboBox` reference is provided to access the combo-box element state. Do not\nset combo-box properties in a `renderer` function.\n\n```js\nconst comboBox = document.querySelector('#combo-box');\ncomboBox.items = [{'label': 'Hydrogen', 'value': 'H'}];\ncomboBox.renderer = (root, comboBox, model) => {\n const item = model.item;\n root.innerHTML = `${model.index}: ${item.label} <b>${item.value}</b>`;\n};\n```\n\nRenderer is called on the opening of the combo-box and each time the related model is updated.\nBefore creating new content, it is recommended to check if there is already an existing DOM\nelement in `root` from a previous renderer call for reusing it. Even though combo-box uses\ninfinite scrolling, reducing DOM operations might improve performance.\n\nThe following properties are available in the `model` argument:\n\nProperty | Type | Description\n-----------|------------------|-------------\n`index` | Number | Index of the item in the `items` array\n`item` | String or Object | The item reference\n`selected` | Boolean | True when item is selected\n`focused` | Boolean | True when item is focused\n\n### Lazy Loading with Function Data Provider\n\nIn addition to assigning an array to the items property, you can alternatively use the\n[`dataProvider`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha4/#/elements/vaadin-combo-box#property-dataProvider) function property.\nThe `<vaadin-combo-box>` calls this function lazily, only when it needs more data\nto be displayed.\n\n__Note that when using function data providers, the total number of items\nneeds to be set manually. The total number of items can be returned\nin the second argument of the data provider callback:__\n\n```js\ncomboBox.dataProvider = async (params, callback) => {\n const API = 'https://demo.vaadin.com/demo-data/1.0/filtered-countries';\n const { filter, page, pageSize } = params;\n const index = page * pageSize;\n\n const res = await fetch(`${API}?index=${index}&count=${pageSize}&filter=${filter}`);\n if (res.ok) {\n const { result, size } = await res.json();\n callback(result, size);\n }\n};\n```\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n----------------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n`--vaadin-combo-box-overlay-width` | Width of the overlay | `auto`\n`--vaadin-combo-box-overlay-max-height` | Max height of the overlay | `65vh`\n\n`<vaadin-combo-box>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha4/#/elements/vaadin-text-field) for the styling documentation.\n\nIn addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n\nPart name | Description\n----------------|----------------\n`toggle-button` | The toggle button\n\nIn addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n\nAttribute | Description | Part name\n----------|-------------|------------\n`opened` | Set when the combo box dropdown is open | :host\n`loading` | Set when new items are expected | :host\n\nIf you want to replace the default `<input>` and its container with a custom implementation to get full control\nover the input field, consider using the [`<vaadin-combo-box-light>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha4/#/elements/vaadin-combo-box-light) element.\n\n### Internal components\n\nIn addition to `<vaadin-combo-box>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-combo-box-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha4/#/elements/vaadin-overlay).\n- `<vaadin-combo-box-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha4/#/elements/vaadin-item).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha4/#/elements/vaadin-input-container) - an internal element wrapping the input.\n\nNote: the `theme` attribute value set on `<vaadin-combo-box>` is\npropagated to the internal components listed above.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
463
+ "description": "`<vaadin-combo-box>` is a web component for choosing a value from a filterable list of options\npresented in a dropdown overlay. The options can be provided as a list of strings or objects\nby setting [`items`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha6/#/elements/vaadin-combo-box#property-items) property on the element.\n\n```html\n<vaadin-combo-box id=\"combo-box\"></vaadin-combo-box>\n```\n```js\ndocument.querySelector('#combo-box').items = ['apple', 'orange', 'banana'];\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Item rendering\n\nTo customize the content of the `<vaadin-combo-box-item>` elements placed in the dropdown, use\n[`renderer`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha6/#/elements/vaadin-combo-box#property-renderer) property which accepts a function.\nThe renderer function is called with `root`, `comboBox`, and `model` as arguments.\n\nGenerate DOM content by using `model` object properties if needed, and append it to the `root`\nelement. The `comboBox` reference is provided to access the combo-box element state. Do not\nset combo-box properties in a `renderer` function.\n\n```js\nconst comboBox = document.querySelector('#combo-box');\ncomboBox.items = [{'label': 'Hydrogen', 'value': 'H'}];\ncomboBox.renderer = (root, comboBox, model) => {\n const item = model.item;\n root.innerHTML = `${model.index}: ${item.label} <b>${item.value}</b>`;\n};\n```\n\nRenderer is called on the opening of the combo-box and each time the related model is updated.\nBefore creating new content, it is recommended to check if there is already an existing DOM\nelement in `root` from a previous renderer call for reusing it. Even though combo-box uses\ninfinite scrolling, reducing DOM operations might improve performance.\n\nThe following properties are available in the `model` argument:\n\nProperty | Type | Description\n-----------|------------------|-------------\n`index` | Number | Index of the item in the `items` array\n`item` | String or Object | The item reference\n`selected` | Boolean | True when item is selected\n`focused` | Boolean | True when item is focused\n\n### Lazy Loading with Function Data Provider\n\nIn addition to assigning an array to the items property, you can alternatively use the\n[`dataProvider`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha6/#/elements/vaadin-combo-box#property-dataProvider) function property.\nThe `<vaadin-combo-box>` calls this function lazily, only when it needs more data\nto be displayed.\n\n__Note that when using function data providers, the total number of items\nneeds to be set manually. The total number of items can be returned\nin the second argument of the data provider callback:__\n\n```js\ncomboBox.dataProvider = async (params, callback) => {\n const API = 'https://demo.vaadin.com/demo-data/1.0/filtered-countries';\n const { filter, page, pageSize } = params;\n const index = page * pageSize;\n\n const res = await fetch(`${API}?index=${index}&count=${pageSize}&filter=${filter}`);\n if (res.ok) {\n const { result, size } = await res.json();\n callback(result, size);\n }\n};\n```\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n----------------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n`--vaadin-combo-box-overlay-width` | Width of the overlay | `auto`\n`--vaadin-combo-box-overlay-max-height` | Max height of the overlay | `65vh`\n\n`<vaadin-combo-box>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha6/#/elements/vaadin-text-field) for the styling documentation.\n\nIn addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n\nPart name | Description\n----------------|----------------\n`toggle-button` | The toggle button\n\nIn addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n\nAttribute | Description | Part name\n----------|-------------|------------\n`opened` | Set when the combo box dropdown is open | :host\n`loading` | Set when new items are expected | :host\n\nIf you want to replace the default `<input>` and its container with a custom implementation to get full control\nover the input field, consider using the [`<vaadin-combo-box-light>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha6/#/elements/vaadin-combo-box-light) element.\n\n### Internal components\n\nIn addition to `<vaadin-combo-box>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-combo-box-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha6/#/elements/vaadin-overlay).\n- `<vaadin-combo-box-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha6/#/elements/vaadin-item).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha6/#/elements/vaadin-input-container) - an internal element wrapping the input.\n\nNote: the `theme` attribute value set on `<vaadin-combo-box>` is\npropagated to the internal components listed above.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
464
464
  "attributes": [
465
465
  {
466
466
  "name": "disabled",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/combo-box",
4
- "version": "24.2.0-alpha4",
4
+ "version": "24.2.0-alpha6",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -19,6 +19,20 @@
19
19
  "description": "`<vaadin-combo-box-light>` is a customizable version of the `<vaadin-combo-box>` providing\nonly the dropdown functionality and leaving the input field definition to the user.\n\nThe element has the same API as `<vaadin-combo-box>`.\n\nTo create a custom input field, you need to add a child element which has a two-way\ndata-bindable property representing the input value. The property name is expected\nto be `value` by default. For example, you can use `<vaadin-text-field>` element:\n\n```html\n<vaadin-combo-box-light>\n <vaadin-text-field></vaadin-text-field>\n</vaadin-combo-box-light>\n```\n\nIf you are using custom input field that has other property for value,\nset `class=\"input\"` to enable corresponding logic, and use `attr-for-value`\nattribute to specify which property to use:\n\n```html\n<vaadin-combo-box-light attr-for-value=\"input-value\">\n <custom-input class=\"input\"></custom-input>\n</vaadin-combo-box-light>\n```\n\nYou can also pass custom toggle and clear buttons with corresponding classes:\n\n```html\n<vaadin-combo-box-light>\n <custom-input class=\"input\" attr-for-value=\"input-value\">\n <button slot=\"suffix\" class=\"clear-button\">Clear</button>\n <button slot=\"suffix\" class=\"toggle-button\">Toggle</button>\n </custom-input>\n</vaadin-combo-box-light>\n```",
20
20
  "extension": true,
21
21
  "attributes": [
22
+ {
23
+ "name": "?invalid",
24
+ "description": "Set to true when the field is invalid.",
25
+ "value": {
26
+ "kind": "expression"
27
+ }
28
+ },
29
+ {
30
+ "name": "?required",
31
+ "description": "Specifies that the user must fill in a value.",
32
+ "value": {
33
+ "kind": "expression"
34
+ }
35
+ },
22
36
  {
23
37
  "name": "?disabled",
24
38
  "description": "If true, the user cannot interact with this element.",
@@ -61,20 +75,6 @@
61
75
  "kind": "expression"
62
76
  }
63
77
  },
64
- {
65
- "name": "?invalid",
66
- "description": "Set to true when the field is invalid.",
67
- "value": {
68
- "kind": "expression"
69
- }
70
- },
71
- {
72
- "name": "?required",
73
- "description": "Specifies that the user must fill in a value.",
74
- "value": {
75
- "kind": "expression"
76
- }
77
- },
78
78
  {
79
79
  "name": ".pageSize",
80
80
  "description": "Number of items fetched at a time from the dataprovider.",
@@ -173,6 +173,13 @@
173
173
  "kind": "expression"
174
174
  }
175
175
  },
176
+ {
177
+ "name": "@validated",
178
+ "description": "Fired whenever the field is validated.",
179
+ "value": {
180
+ "kind": "expression"
181
+ }
182
+ },
176
183
  {
177
184
  "name": "@change",
178
185
  "description": "Fired when value changes.\nTo comply with https://developer.mozilla.org/en-US/docs/Web/Events/change",
@@ -216,8 +223,8 @@
216
223
  }
217
224
  },
218
225
  {
219
- "name": "@validated",
220
- "description": "Fired whenever the field is validated.",
226
+ "name": "@invalid-changed",
227
+ "description": "Fired when the `invalid` property changes.",
221
228
  "value": {
222
229
  "kind": "expression"
223
230
  }
@@ -235,19 +242,12 @@
235
242
  "value": {
236
243
  "kind": "expression"
237
244
  }
238
- },
239
- {
240
- "name": "@invalid-changed",
241
- "description": "Fired when the `invalid` property changes.",
242
- "value": {
243
- "kind": "expression"
244
- }
245
245
  }
246
246
  ]
247
247
  },
248
248
  {
249
249
  "name": "vaadin-combo-box",
250
- "description": "`<vaadin-combo-box>` is a web component for choosing a value from a filterable list of options\npresented in a dropdown overlay. The options can be provided as a list of strings or objects\nby setting [`items`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha4/#/elements/vaadin-combo-box#property-items) property on the element.\n\n```html\n<vaadin-combo-box id=\"combo-box\"></vaadin-combo-box>\n```\n```js\ndocument.querySelector('#combo-box').items = ['apple', 'orange', 'banana'];\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Item rendering\n\nTo customize the content of the `<vaadin-combo-box-item>` elements placed in the dropdown, use\n[`renderer`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha4/#/elements/vaadin-combo-box#property-renderer) property which accepts a function.\nThe renderer function is called with `root`, `comboBox`, and `model` as arguments.\n\nGenerate DOM content by using `model` object properties if needed, and append it to the `root`\nelement. The `comboBox` reference is provided to access the combo-box element state. Do not\nset combo-box properties in a `renderer` function.\n\n```js\nconst comboBox = document.querySelector('#combo-box');\ncomboBox.items = [{'label': 'Hydrogen', 'value': 'H'}];\ncomboBox.renderer = (root, comboBox, model) => {\n const item = model.item;\n root.innerHTML = `${model.index}: ${item.label} <b>${item.value}</b>`;\n};\n```\n\nRenderer is called on the opening of the combo-box and each time the related model is updated.\nBefore creating new content, it is recommended to check if there is already an existing DOM\nelement in `root` from a previous renderer call for reusing it. Even though combo-box uses\ninfinite scrolling, reducing DOM operations might improve performance.\n\nThe following properties are available in the `model` argument:\n\nProperty | Type | Description\n-----------|------------------|-------------\n`index` | Number | Index of the item in the `items` array\n`item` | String or Object | The item reference\n`selected` | Boolean | True when item is selected\n`focused` | Boolean | True when item is focused\n\n### Lazy Loading with Function Data Provider\n\nIn addition to assigning an array to the items property, you can alternatively use the\n[`dataProvider`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha4/#/elements/vaadin-combo-box#property-dataProvider) function property.\nThe `<vaadin-combo-box>` calls this function lazily, only when it needs more data\nto be displayed.\n\n__Note that when using function data providers, the total number of items\nneeds to be set manually. The total number of items can be returned\nin the second argument of the data provider callback:__\n\n```js\ncomboBox.dataProvider = async (params, callback) => {\n const API = 'https://demo.vaadin.com/demo-data/1.0/filtered-countries';\n const { filter, page, pageSize } = params;\n const index = page * pageSize;\n\n const res = await fetch(`${API}?index=${index}&count=${pageSize}&filter=${filter}`);\n if (res.ok) {\n const { result, size } = await res.json();\n callback(result, size);\n }\n};\n```\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n----------------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n`--vaadin-combo-box-overlay-width` | Width of the overlay | `auto`\n`--vaadin-combo-box-overlay-max-height` | Max height of the overlay | `65vh`\n\n`<vaadin-combo-box>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha4/#/elements/vaadin-text-field) for the styling documentation.\n\nIn addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n\nPart name | Description\n----------------|----------------\n`toggle-button` | The toggle button\n\nIn addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n\nAttribute | Description | Part name\n----------|-------------|------------\n`opened` | Set when the combo box dropdown is open | :host\n`loading` | Set when new items are expected | :host\n\nIf you want to replace the default `<input>` and its container with a custom implementation to get full control\nover the input field, consider using the [`<vaadin-combo-box-light>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha4/#/elements/vaadin-combo-box-light) element.\n\n### Internal components\n\nIn addition to `<vaadin-combo-box>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-combo-box-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha4/#/elements/vaadin-overlay).\n- `<vaadin-combo-box-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha4/#/elements/vaadin-item).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha4/#/elements/vaadin-input-container) - an internal element wrapping the input.\n\nNote: the `theme` attribute value set on `<vaadin-combo-box>` is\npropagated to the internal components listed above.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
250
+ "description": "`<vaadin-combo-box>` is a web component for choosing a value from a filterable list of options\npresented in a dropdown overlay. The options can be provided as a list of strings or objects\nby setting [`items`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha6/#/elements/vaadin-combo-box#property-items) property on the element.\n\n```html\n<vaadin-combo-box id=\"combo-box\"></vaadin-combo-box>\n```\n```js\ndocument.querySelector('#combo-box').items = ['apple', 'orange', 'banana'];\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Item rendering\n\nTo customize the content of the `<vaadin-combo-box-item>` elements placed in the dropdown, use\n[`renderer`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha6/#/elements/vaadin-combo-box#property-renderer) property which accepts a function.\nThe renderer function is called with `root`, `comboBox`, and `model` as arguments.\n\nGenerate DOM content by using `model` object properties if needed, and append it to the `root`\nelement. The `comboBox` reference is provided to access the combo-box element state. Do not\nset combo-box properties in a `renderer` function.\n\n```js\nconst comboBox = document.querySelector('#combo-box');\ncomboBox.items = [{'label': 'Hydrogen', 'value': 'H'}];\ncomboBox.renderer = (root, comboBox, model) => {\n const item = model.item;\n root.innerHTML = `${model.index}: ${item.label} <b>${item.value}</b>`;\n};\n```\n\nRenderer is called on the opening of the combo-box and each time the related model is updated.\nBefore creating new content, it is recommended to check if there is already an existing DOM\nelement in `root` from a previous renderer call for reusing it. Even though combo-box uses\ninfinite scrolling, reducing DOM operations might improve performance.\n\nThe following properties are available in the `model` argument:\n\nProperty | Type | Description\n-----------|------------------|-------------\n`index` | Number | Index of the item in the `items` array\n`item` | String or Object | The item reference\n`selected` | Boolean | True when item is selected\n`focused` | Boolean | True when item is focused\n\n### Lazy Loading with Function Data Provider\n\nIn addition to assigning an array to the items property, you can alternatively use the\n[`dataProvider`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha6/#/elements/vaadin-combo-box#property-dataProvider) function property.\nThe `<vaadin-combo-box>` calls this function lazily, only when it needs more data\nto be displayed.\n\n__Note that when using function data providers, the total number of items\nneeds to be set manually. The total number of items can be returned\nin the second argument of the data provider callback:__\n\n```js\ncomboBox.dataProvider = async (params, callback) => {\n const API = 'https://demo.vaadin.com/demo-data/1.0/filtered-countries';\n const { filter, page, pageSize } = params;\n const index = page * pageSize;\n\n const res = await fetch(`${API}?index=${index}&count=${pageSize}&filter=${filter}`);\n if (res.ok) {\n const { result, size } = await res.json();\n callback(result, size);\n }\n};\n```\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n----------------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n`--vaadin-combo-box-overlay-width` | Width of the overlay | `auto`\n`--vaadin-combo-box-overlay-max-height` | Max height of the overlay | `65vh`\n\n`<vaadin-combo-box>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha6/#/elements/vaadin-text-field) for the styling documentation.\n\nIn addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n\nPart name | Description\n----------------|----------------\n`toggle-button` | The toggle button\n\nIn addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n\nAttribute | Description | Part name\n----------|-------------|------------\n`opened` | Set when the combo box dropdown is open | :host\n`loading` | Set when new items are expected | :host\n\nIf you want to replace the default `<input>` and its container with a custom implementation to get full control\nover the input field, consider using the [`<vaadin-combo-box-light>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha6/#/elements/vaadin-combo-box-light) element.\n\n### Internal components\n\nIn addition to `<vaadin-combo-box>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-combo-box-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha6/#/elements/vaadin-overlay).\n- `<vaadin-combo-box-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha6/#/elements/vaadin-item).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha6/#/elements/vaadin-input-container) - an internal element wrapping the input.\n\nNote: the `theme` attribute value set on `<vaadin-combo-box>` is\npropagated to the internal components listed above.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
251
251
  "extension": true,
252
252
  "attributes": [
253
253
  {