@vaadin/combo-box 24.3.4 → 24.4.0-alpha10

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 (36) hide show
  1. package/package.json +13 -13
  2. package/src/lit/renderer-directives.d.ts +1 -1
  3. package/src/lit/renderer-directives.js +1 -1
  4. package/src/vaadin-combo-box-data-provider-mixin.d.ts +1 -1
  5. package/src/vaadin-combo-box-data-provider-mixin.js +1 -1
  6. package/src/vaadin-combo-box-item-mixin.d.ts +1 -1
  7. package/src/vaadin-combo-box-item-mixin.js +1 -1
  8. package/src/vaadin-combo-box-item.d.ts +1 -1
  9. package/src/vaadin-combo-box-item.js +1 -1
  10. package/src/vaadin-combo-box-light.d.ts +1 -1
  11. package/src/vaadin-combo-box-light.js +1 -1
  12. package/src/vaadin-combo-box-mixin.d.ts +1 -1
  13. package/src/vaadin-combo-box-mixin.js +43 -33
  14. package/src/vaadin-combo-box-overlay-mixin.d.ts +1 -1
  15. package/src/vaadin-combo-box-overlay-mixin.js +1 -1
  16. package/src/vaadin-combo-box-overlay.d.ts +1 -1
  17. package/src/vaadin-combo-box-overlay.js +1 -1
  18. package/src/vaadin-combo-box-placeholder.js +1 -1
  19. package/src/vaadin-combo-box-scroller-mixin.d.ts +1 -1
  20. package/src/vaadin-combo-box-scroller-mixin.js +1 -1
  21. package/src/vaadin-combo-box-scroller.d.ts +1 -1
  22. package/src/vaadin-combo-box-scroller.js +1 -1
  23. package/src/vaadin-combo-box.d.ts +1 -1
  24. package/src/vaadin-combo-box.js +1 -1
  25. package/theme/lumo/vaadin-combo-box-item-styles.d.ts +5 -0
  26. package/theme/lumo/vaadin-combo-box-light.d.ts +3 -0
  27. package/theme/lumo/vaadin-combo-box-overlay-styles.d.ts +6 -0
  28. package/theme/lumo/vaadin-combo-box-styles.d.ts +2 -0
  29. package/theme/lumo/vaadin-combo-box.d.ts +4 -0
  30. package/theme/material/vaadin-combo-box-item-styles.d.ts +5 -0
  31. package/theme/material/vaadin-combo-box-light.d.ts +3 -0
  32. package/theme/material/vaadin-combo-box-overlay-styles.d.ts +4 -0
  33. package/theme/material/vaadin-combo-box-styles.d.ts +3 -0
  34. package/theme/material/vaadin-combo-box.d.ts +4 -0
  35. package/web-types.json +2 -2
  36. package/web-types.lit.json +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/combo-box",
3
- "version": "24.3.4",
3
+ "version": "24.4.0-alpha10",
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.3.4",
42
- "@vaadin/component-base": "~24.3.4",
43
- "@vaadin/field-base": "~24.3.4",
44
- "@vaadin/input-container": "~24.3.4",
45
- "@vaadin/item": "~24.3.4",
46
- "@vaadin/lit-renderer": "~24.3.4",
47
- "@vaadin/overlay": "~24.3.4",
48
- "@vaadin/vaadin-lumo-styles": "~24.3.4",
49
- "@vaadin/vaadin-material-styles": "~24.3.4",
50
- "@vaadin/vaadin-themable-mixin": "~24.3.4"
41
+ "@vaadin/a11y-base": "24.4.0-alpha10",
42
+ "@vaadin/component-base": "24.4.0-alpha10",
43
+ "@vaadin/field-base": "24.4.0-alpha10",
44
+ "@vaadin/input-container": "24.4.0-alpha10",
45
+ "@vaadin/item": "24.4.0-alpha10",
46
+ "@vaadin/lit-renderer": "24.4.0-alpha10",
47
+ "@vaadin/overlay": "24.4.0-alpha10",
48
+ "@vaadin/vaadin-lumo-styles": "24.4.0-alpha10",
49
+ "@vaadin/vaadin-material-styles": "24.4.0-alpha10",
50
+ "@vaadin/vaadin-themable-mixin": "24.4.0-alpha10"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@esm-bundle/chai": "^4.3.4",
54
54
  "@vaadin/testing-helpers": "^0.6.0",
55
- "@vaadin/text-field": "~24.3.4",
55
+ "@vaadin/text-field": "24.4.0-alpha10",
56
56
  "lit": "^3.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": "dc5d3fd1d0f11a130b3574c455b62ce6b5706ffc"
63
+ "gitHead": "c563c01d6ac5157f5a5885c8f6048d1cf4c727b4"
64
64
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2017 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import type { DirectiveResult } from 'lit/directive.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2017 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { directive } from 'lit/directive.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2015 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2015 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import type { Constructor } from '@open-wc/dedupe-mixin';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2015 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2015 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { ComboBoxPlaceholder } from './vaadin-combo-box-placeholder.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2015 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2015 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import type { Constructor } from '@open-wc/dedupe-mixin';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2015 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2015 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2015 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2015 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import type { DirMixinClass } from '@vaadin/component-base/src/dir-mixin.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2015 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2015 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2015 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2015 - 2024 Vaadin Ltd.
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';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2015 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2015 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import './vaadin-combo-box-item.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2015 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2015 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import type { Constructor } from '@open-wc/dedupe-mixin';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2015 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2015 - 2024 Vaadin Ltd.
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';
@@ -875,6 +875,15 @@ export const ComboBoxMixin = (subclass) =>
875
875
  this._detectAndDispatchChange();
876
876
  }
877
877
 
878
+ /**
879
+ * Clears the current filter. Should be used instead of setting the property
880
+ * directly in order to allow overriding this in multi-select combo box.
881
+ * @protected
882
+ */
883
+ _clearFilter() {
884
+ this.filter = '';
885
+ }
886
+
878
887
  /**
879
888
  * Reverts back to original value.
880
889
  */
@@ -946,7 +955,7 @@ export const ComboBoxMixin = (subclass) =>
946
955
  this.value = this._getItemValue(itemMatchingInputValue);
947
956
  } else {
948
957
  // Revert the input value
949
- this._inputElementValue = this.selectedItem ? this._getItemLabel(this.selectedItem) : this.value || '';
958
+ this._revertInputValueToValue();
950
959
  }
951
960
  }
952
961
 
@@ -954,7 +963,7 @@ export const ComboBoxMixin = (subclass) =>
954
963
 
955
964
  this._clearSelectionRange();
956
965
 
957
- this.filter = '';
966
+ this._clearFilter();
958
967
  }
959
968
 
960
969
  /**
@@ -1095,7 +1104,7 @@ export const ComboBoxMixin = (subclass) =>
1095
1104
  this.selectedItem = null;
1096
1105
  }
1097
1106
 
1098
- this.filter = '';
1107
+ this._clearFilter();
1099
1108
 
1100
1109
  // In the next _detectAndDispatchChange() call, the change detection should pass
1101
1110
  this._lastCommittedValue = undefined;
@@ -1130,34 +1139,8 @@ export const ComboBoxMixin = (subclass) =>
1130
1139
  }
1131
1140
 
1132
1141
  /** @private */
1133
- _filteredItemsChanged(filteredItems, oldFilteredItems) {
1142
+ _filteredItemsChanged(filteredItems) {
1134
1143
  this._setDropdownItems(filteredItems);
1135
-
1136
- // Store the currently focused item if any. The focused index preserves
1137
- // in the case when more filtered items are loading but it is reset
1138
- // when the user types in a filter query.
1139
- const focusedItem = oldFilteredItems ? oldFilteredItems[this._focusedIndex] : null;
1140
-
1141
- // Try to sync `selectedItem` based on `value` once a new set of `filteredItems` is available
1142
- // (as a result of external filtering or when they have been loaded by the data provider).
1143
- // When `value` is specified but `selectedItem` is not, it means that there was no item
1144
- // matching `value` at the moment `value` was set, so `selectedItem` has remained unsynced.
1145
- const valueIndex = this.__getItemIndexByValue(filteredItems, this.value);
1146
- if ((this.selectedItem === null || this.selectedItem === undefined) && valueIndex >= 0) {
1147
- this.selectedItem = filteredItems[valueIndex];
1148
- }
1149
-
1150
- // Try to first set focus on the item that had been focused before `filteredItems` were updated
1151
- // if it is still present in the `filteredItems` array. Otherwise, set the focused index
1152
- // depending on the selected item or the filter query.
1153
- const focusedItemIndex = this.__getItemIndexByValue(filteredItems, this._getItemValue(focusedItem));
1154
- if (focusedItemIndex > -1) {
1155
- this._focusedIndex = focusedItemIndex;
1156
- } else {
1157
- // When the user filled in something that is different from the current value = filtering is enabled,
1158
- // set the focused index to the item that matches the filter query.
1159
- this._focusedIndex = this.__getItemIndexByLabel(this.filteredItems, this.filter);
1160
- }
1161
1144
  }
1162
1145
 
1163
1146
  /** @private */
@@ -1199,8 +1182,35 @@ export const ComboBoxMixin = (subclass) =>
1199
1182
  *
1200
1183
  * @protected
1201
1184
  */
1202
- _setDropdownItems(items) {
1203
- this._dropdownItems = items;
1185
+ _setDropdownItems(newItems) {
1186
+ const oldItems = this._dropdownItems;
1187
+ this._dropdownItems = newItems;
1188
+
1189
+ // Store the currently focused item if any. The focused index preserves
1190
+ // in the case when more filtered items are loading but it is reset
1191
+ // when the user types in a filter query.
1192
+ const focusedItem = oldItems ? oldItems[this._focusedIndex] : null;
1193
+
1194
+ // Try to sync `selectedItem` based on `value` once a new set of `filteredItems` is available
1195
+ // (as a result of external filtering or when they have been loaded by the data provider).
1196
+ // When `value` is specified but `selectedItem` is not, it means that there was no item
1197
+ // matching `value` at the moment `value` was set, so `selectedItem` has remained unsynced.
1198
+ const valueIndex = this.__getItemIndexByValue(newItems, this.value);
1199
+ if ((this.selectedItem === null || this.selectedItem === undefined) && valueIndex >= 0) {
1200
+ this.selectedItem = newItems[valueIndex];
1201
+ }
1202
+
1203
+ // Try to first set focus on the item that had been focused before `newItems` were updated
1204
+ // if it is still present in the `newItems` array. Otherwise, set the focused index
1205
+ // depending on the selected item or the filter query.
1206
+ const focusedItemIndex = this.__getItemIndexByValue(newItems, this._getItemValue(focusedItem));
1207
+ if (focusedItemIndex > -1) {
1208
+ this._focusedIndex = focusedItemIndex;
1209
+ } else {
1210
+ // When the user filled in something that is different from the current value = filtering is enabled,
1211
+ // set the focused index to the item that matches the filter query.
1212
+ this._focusedIndex = this.__getItemIndexByLabel(newItems, this.filter);
1213
+ }
1204
1214
  }
1205
1215
 
1206
1216
  /** @private */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2015 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2015 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import type { Constructor } from '@open-wc/dedupe-mixin';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2015 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2015 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { PositionMixin } from '@vaadin/overlay/src/vaadin-overlay-position-mixin.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2015 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2015 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2015 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2015 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2015 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2015 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2015 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2015 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import type { Constructor } from '@open-wc/dedupe-mixin';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2015 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2015 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { get } from '@vaadin/component-base/src/path-utils.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2015 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2015 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { ComboBoxScrollerMixin } from './vaadin-combo-box-overlay-mixin.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2015 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2015 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2015 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2015 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import type { DelegateFocusMixinClass } from '@vaadin/a11y-base/src/delegate-focus-mixin.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2015 - 2023 Vaadin Ltd.
3
+ * Copyright (c) 2015 - 2024 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import '@vaadin/input-container/src/vaadin-input-container.js';
@@ -0,0 +1,5 @@
1
+ import '@vaadin/vaadin-lumo-styles/color.js';
2
+ import '@vaadin/vaadin-lumo-styles/spacing.js';
3
+ import '@vaadin/vaadin-lumo-styles/style.js';
4
+ declare const comboBoxItem: import("lit").CSSResult;
5
+ export { comboBoxItem };
@@ -0,0 +1,3 @@
1
+ import './vaadin-combo-box-item-styles.js';
2
+ import './vaadin-combo-box-overlay-styles.js';
3
+ import '../../src/vaadin-combo-box-light.js';
@@ -0,0 +1,6 @@
1
+ import '@vaadin/vaadin-lumo-styles/color.js';
2
+ import '@vaadin/vaadin-lumo-styles/spacing.js';
3
+ import '@vaadin/vaadin-lumo-styles/style.js';
4
+ declare const comboBoxOverlay: import("lit").CSSResult;
5
+ declare const comboBoxLoader: import("lit").CSSResult;
6
+ export { comboBoxLoader, comboBoxOverlay };
@@ -0,0 +1,2 @@
1
+ import '@vaadin/input-container/theme/lumo/vaadin-input-container-styles.js';
2
+ import '@vaadin/vaadin-lumo-styles/font-icons.js';
@@ -0,0 +1,4 @@
1
+ import './vaadin-combo-box-item-styles.js';
2
+ import './vaadin-combo-box-overlay-styles.js';
3
+ import './vaadin-combo-box-styles.js';
4
+ import '../../src/vaadin-combo-box.js';
@@ -0,0 +1,5 @@
1
+ import '@vaadin/vaadin-material-styles/color.js';
2
+ import '@vaadin/vaadin-material-styles/font-icons.js';
3
+ import '@vaadin/vaadin-material-styles/typography.js';
4
+ declare const comboBoxItem: import("lit").CSSResult;
5
+ export { comboBoxItem };
@@ -0,0 +1,3 @@
1
+ import './vaadin-combo-box-item-styles.js';
2
+ import './vaadin-combo-box-overlay-styles.js';
3
+ import '../../src/vaadin-combo-box-light.js';
@@ -0,0 +1,4 @@
1
+ import '@vaadin/vaadin-material-styles/color.js';
2
+ declare const comboBoxOverlay: import("lit").CSSResult;
3
+ declare const comboBoxLoader: import("lit").CSSResult;
4
+ export { comboBoxLoader, comboBoxOverlay };
@@ -0,0 +1,3 @@
1
+ import '@vaadin/input-container/theme/material/vaadin-input-container-styles.js';
2
+ import '@vaadin/vaadin-material-styles/color.js';
3
+ import '@vaadin/vaadin-material-styles/font-icons.js';
@@ -0,0 +1,4 @@
1
+ import './vaadin-combo-box-item-styles.js';
2
+ import './vaadin-combo-box-overlay-styles.js';
3
+ import './vaadin-combo-box-styles.js';
4
+ import '../../src/vaadin-combo-box.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.3.4",
4
+ "version": "24.4.0-alpha10",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -460,7 +460,7 @@
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.3.4/#/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.3.4/#/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.3.4/#/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.3.4/#/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.3.4/#/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.3.4/#/elements/vaadin-overlay).\n- `<vaadin-combo-box-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/24.3.4/#/elements/vaadin-item).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/24.3.4/#/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.4.0-alpha10/#/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.4.0-alpha10/#/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.4.0-alpha10/#/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.4.0-alpha10/#/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.4.0-alpha10/#/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.4.0-alpha10/#/elements/vaadin-overlay).\n- `<vaadin-combo-box-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/24.4.0-alpha10/#/elements/vaadin-item).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/24.4.0-alpha10/#/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.3.4",
4
+ "version": "24.4.0-alpha10",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -247,7 +247,7 @@
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.3.4/#/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.3.4/#/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.3.4/#/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.3.4/#/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.3.4/#/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.3.4/#/elements/vaadin-overlay).\n- `<vaadin-combo-box-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/24.3.4/#/elements/vaadin-item).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/24.3.4/#/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.4.0-alpha10/#/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.4.0-alpha10/#/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.4.0-alpha10/#/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.4.0-alpha10/#/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.4.0-alpha10/#/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.4.0-alpha10/#/elements/vaadin-overlay).\n- `<vaadin-combo-box-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/24.4.0-alpha10/#/elements/vaadin-item).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/24.4.0-alpha10/#/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
  {