@vaadin/combo-box 25.3.0-alpha13 → 25.3.0-alpha14

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.
@@ -453,16 +453,6 @@
453
453
  "description": "",
454
454
  "name": "ComboBoxItemsMixin",
455
455
  "members": [
456
- {
457
- "kind": "field",
458
- "name": "autoFocusPartialMatch",
459
- "privacy": "public",
460
- "type": {
461
- "text": "string"
462
- },
463
- "description": "Controls whether an item whose label partially matches the typed\nfilter is automatically focused. The focused item is highlighted\nin the dropdown while typing and is selected when committing the\nvalue, for example on Enter press:\n\n- `none` (default): do not focus partial matches.\n- `first-match`: focus the first item in the filtered results.\n- `only-match`: focus the item when filtering narrows the results to a single item.\n\nAn item whose label matches the filter exactly is always focused,\nregardless of this property. Matching is case-insensitive. A partial\nmatch is not focused when `allowCustomValue` is enabled, or while\nthe dropdown is closed. For example, with `autoOpenDisabled`, typing\ndoes not focus or select a match until the dropdown is opened.",
464
- "attribute": "auto-focus-partial-match"
465
- },
466
456
  {
467
457
  "kind": "field",
468
458
  "name": "autoOpenDisabled",
@@ -592,6 +582,16 @@
592
582
  "module": "src/vaadin-combo-box-base-mixin.js"
593
583
  }
594
584
  },
585
+ {
586
+ "kind": "field",
587
+ "name": "partialMatchMode",
588
+ "privacy": "public",
589
+ "type": {
590
+ "text": "string"
591
+ },
592
+ "description": "Controls which item is automatically set to be selected, for\nexample on Enter, when the typed filter only partially matches\nits label. The item that will be selected is highlighted in the\ndropdown while typing:\n\n- `none` (default): an item is automatically set to be selected only when the filter matches its label exactly.\n- `first-match`: the first item in the filtered results is automatically set to be selected.\n- `only-match`: the item is automatically set to be selected when filtering narrows the results to a single item.\n\nIn general, an exact match is always set to be selected and takes\nprecedence over partial matches, regardless of the mode.\n\nA partial match is only applied while the dropdown is open. For\nexample, when auto-open is disabled with `autoOpenDisabled`, typing\ndoes not highlight a match or set it to be selected until the\ndropdown is opened.\n\nThis feature cannot be used together with custom values, because a\npartial match is also a valid custom value. A partial match is not\napplied when custom values are allowed with `allowCustomValue`.",
593
+ "attribute": "partial-match-mode"
594
+ },
595
595
  {
596
596
  "kind": "field",
597
597
  "name": "readonly",
@@ -622,14 +622,6 @@
622
622
  }
623
623
  ],
624
624
  "attributes": [
625
- {
626
- "name": "auto-focus-partial-match",
627
- "type": {
628
- "text": "string"
629
- },
630
- "description": "Controls whether an item whose label partially matches the typed\nfilter is automatically focused. The focused item is highlighted\nin the dropdown while typing and is selected when committing the\nvalue, for example on Enter press:\n\n- `none` (default): do not focus partial matches.\n- `first-match`: focus the first item in the filtered results.\n- `only-match`: focus the item when filtering narrows the results to a single item.\n\nAn item whose label matches the filter exactly is always focused,\nregardless of this property. Matching is case-insensitive. A partial\nmatch is not focused when `allowCustomValue` is enabled, or while\nthe dropdown is closed. For example, with `autoOpenDisabled`, typing\ndoes not focus or select a match until the dropdown is opened.",
631
- "fieldName": "autoFocusPartialMatch"
632
- },
633
625
  {
634
626
  "name": "auto-open-disabled",
635
627
  "type": {
@@ -690,6 +682,14 @@
690
682
  "module": "src/vaadin-combo-box-base-mixin.js"
691
683
  }
692
684
  },
685
+ {
686
+ "name": "partial-match-mode",
687
+ "type": {
688
+ "text": "string"
689
+ },
690
+ "description": "Controls which item is automatically set to be selected, for\nexample on Enter, when the typed filter only partially matches\nits label. The item that will be selected is highlighted in the\ndropdown while typing:\n\n- `none` (default): an item is automatically set to be selected only when the filter matches its label exactly.\n- `first-match`: the first item in the filtered results is automatically set to be selected.\n- `only-match`: the item is automatically set to be selected when filtering narrows the results to a single item.\n\nIn general, an exact match is always set to be selected and takes\nprecedence over partial matches, regardless of the mode.\n\nA partial match is only applied while the dropdown is open. For\nexample, when auto-open is disabled with `autoOpenDisabled`, typing\ndoes not highlight a match or set it to be selected until the\ndropdown is opened.\n\nThis feature cannot be used together with custom values, because a\npartial match is also a valid custom value. A partial match is not\napplied when custom values are allowed with `allowCustomValue`.",
691
+ "fieldName": "partialMatchMode"
692
+ },
693
693
  {
694
694
  "name": "readonly",
695
695
  "type": {
@@ -758,20 +758,6 @@
758
758
  "description": "If `true`, the user can input a value that is not present in the items list.\n`value` property will be set to the input value in this case.\nAlso, when `value` is set programmatically, the input value will be set\nto reflect that value.",
759
759
  "attribute": "allow-custom-value"
760
760
  },
761
- {
762
- "kind": "field",
763
- "name": "autoFocusPartialMatch",
764
- "privacy": "public",
765
- "type": {
766
- "text": "string"
767
- },
768
- "description": "Controls whether an item whose label partially matches the typed\nfilter is automatically focused. The focused item is highlighted\nin the dropdown while typing and is selected when committing the\nvalue, for example on Enter press:\n\n- `none` (default): do not focus partial matches.\n- `first-match`: focus the first item in the filtered results.\n- `only-match`: focus the item when filtering narrows the results to a single item.\n\nAn item whose label matches the filter exactly is always focused,\nregardless of this property. Matching is case-insensitive. A partial\nmatch is not focused when `allowCustomValue` is enabled, or while\nthe dropdown is closed. For example, with `autoOpenDisabled`, typing\ndoes not focus or select a match until the dropdown is opened.",
769
- "attribute": "auto-focus-partial-match",
770
- "inheritedFrom": {
771
- "name": "ComboBoxItemsMixin",
772
- "module": "src/vaadin-combo-box-items-mixin.js"
773
- }
774
- },
775
761
  {
776
762
  "kind": "field",
777
763
  "name": "autoOpenDisabled",
@@ -1002,6 +988,20 @@
1002
988
  "module": "src/vaadin-combo-box-base-mixin.js"
1003
989
  }
1004
990
  },
991
+ {
992
+ "kind": "field",
993
+ "name": "partialMatchMode",
994
+ "privacy": "public",
995
+ "type": {
996
+ "text": "string"
997
+ },
998
+ "description": "Controls which item is automatically set to be selected, for\nexample on Enter, when the typed filter only partially matches\nits label. The item that will be selected is highlighted in the\ndropdown while typing:\n\n- `none` (default): an item is automatically set to be selected only when the filter matches its label exactly.\n- `first-match`: the first item in the filtered results is automatically set to be selected.\n- `only-match`: the item is automatically set to be selected when filtering narrows the results to a single item.\n\nIn general, an exact match is always set to be selected and takes\nprecedence over partial matches, regardless of the mode.\n\nA partial match is only applied while the dropdown is open. For\nexample, when auto-open is disabled with `autoOpenDisabled`, typing\ndoes not highlight a match or set it to be selected until the\ndropdown is opened.\n\nThis feature cannot be used together with custom values, because a\npartial match is also a valid custom value. A partial match is not\napplied when custom values are allowed with `allowCustomValue`.",
999
+ "attribute": "partial-match-mode",
1000
+ "inheritedFrom": {
1001
+ "name": "ComboBoxItemsMixin",
1002
+ "module": "src/vaadin-combo-box-items-mixin.js"
1003
+ }
1004
+ },
1005
1005
  {
1006
1006
  "kind": "field",
1007
1007
  "name": "readonly",
@@ -1123,18 +1123,6 @@
1123
1123
  "description": "If `true`, the user can input a value that is not present in the items list.\n`value` property will be set to the input value in this case.\nAlso, when `value` is set programmatically, the input value will be set\nto reflect that value.",
1124
1124
  "fieldName": "allowCustomValue"
1125
1125
  },
1126
- {
1127
- "name": "auto-focus-partial-match",
1128
- "type": {
1129
- "text": "string"
1130
- },
1131
- "description": "Controls whether an item whose label partially matches the typed\nfilter is automatically focused. The focused item is highlighted\nin the dropdown while typing and is selected when committing the\nvalue, for example on Enter press:\n\n- `none` (default): do not focus partial matches.\n- `first-match`: focus the first item in the filtered results.\n- `only-match`: focus the item when filtering narrows the results to a single item.\n\nAn item whose label matches the filter exactly is always focused,\nregardless of this property. Matching is case-insensitive. A partial\nmatch is not focused when `allowCustomValue` is enabled, or while\nthe dropdown is closed. For example, with `autoOpenDisabled`, typing\ndoes not focus or select a match until the dropdown is opened.",
1132
- "fieldName": "autoFocusPartialMatch",
1133
- "inheritedFrom": {
1134
- "name": "ComboBoxItemsMixin",
1135
- "module": "src/vaadin-combo-box-items-mixin.js"
1136
- }
1137
- },
1138
1126
  {
1139
1127
  "name": "auto-open-disabled",
1140
1128
  "type": {
@@ -1247,6 +1235,18 @@
1247
1235
  "module": "src/vaadin-combo-box-base-mixin.js"
1248
1236
  }
1249
1237
  },
1238
+ {
1239
+ "name": "partial-match-mode",
1240
+ "type": {
1241
+ "text": "string"
1242
+ },
1243
+ "description": "Controls which item is automatically set to be selected, for\nexample on Enter, when the typed filter only partially matches\nits label. The item that will be selected is highlighted in the\ndropdown while typing:\n\n- `none` (default): an item is automatically set to be selected only when the filter matches its label exactly.\n- `first-match`: the first item in the filtered results is automatically set to be selected.\n- `only-match`: the item is automatically set to be selected when filtering narrows the results to a single item.\n\nIn general, an exact match is always set to be selected and takes\nprecedence over partial matches, regardless of the mode.\n\nA partial match is only applied while the dropdown is open. For\nexample, when auto-open is disabled with `autoOpenDisabled`, typing\ndoes not highlight a match or set it to be selected until the\ndropdown is opened.\n\nThis feature cannot be used together with custom values, because a\npartial match is also a valid custom value. A partial match is not\napplied when custom values are allowed with `allowCustomValue`.",
1244
+ "fieldName": "partialMatchMode",
1245
+ "inheritedFrom": {
1246
+ "name": "ComboBoxItemsMixin",
1247
+ "module": "src/vaadin-combo-box-items-mixin.js"
1248
+ }
1249
+ },
1250
1250
  {
1251
1251
  "name": "readonly",
1252
1252
  "type": {
@@ -1851,20 +1851,6 @@
1851
1851
  "package": "@vaadin/a11y-base/src/delegate-focus-mixin.js"
1852
1852
  }
1853
1853
  },
1854
- {
1855
- "kind": "field",
1856
- "name": "autoFocusPartialMatch",
1857
- "privacy": "public",
1858
- "type": {
1859
- "text": "string"
1860
- },
1861
- "description": "Controls whether an item whose label partially matches the typed\nfilter is automatically focused. The focused item is highlighted\nin the dropdown while typing and is selected when committing the\nvalue, for example on Enter press:\n\n- `none` (default): do not focus partial matches.\n- `first-match`: focus the first item in the filtered results.\n- `only-match`: focus the item when filtering narrows the results to a single item.\n\nAn item whose label matches the filter exactly is always focused,\nregardless of this property. Matching is case-insensitive. A partial\nmatch is not focused when `allowCustomValue` is enabled, or while\nthe dropdown is closed. For example, with `autoOpenDisabled`, typing\ndoes not focus or select a match until the dropdown is opened.",
1862
- "attribute": "auto-focus-partial-match",
1863
- "inheritedFrom": {
1864
- "name": "ComboBoxItemsMixin",
1865
- "module": "src/vaadin-combo-box-items-mixin.js"
1866
- }
1867
- },
1868
1854
  {
1869
1855
  "kind": "field",
1870
1856
  "name": "autoOpenDisabled",
@@ -2232,6 +2218,20 @@
2232
2218
  "module": "src/vaadin-combo-box-data-provider-mixin.js"
2233
2219
  }
2234
2220
  },
2221
+ {
2222
+ "kind": "field",
2223
+ "name": "partialMatchMode",
2224
+ "privacy": "public",
2225
+ "type": {
2226
+ "text": "string"
2227
+ },
2228
+ "description": "Controls which item is automatically set to be selected, for\nexample on Enter, when the typed filter only partially matches\nits label. The item that will be selected is highlighted in the\ndropdown while typing:\n\n- `none` (default): an item is automatically set to be selected only when the filter matches its label exactly.\n- `first-match`: the first item in the filtered results is automatically set to be selected.\n- `only-match`: the item is automatically set to be selected when filtering narrows the results to a single item.\n\nIn general, an exact match is always set to be selected and takes\nprecedence over partial matches, regardless of the mode.\n\nA partial match is only applied while the dropdown is open. For\nexample, when auto-open is disabled with `autoOpenDisabled`, typing\ndoes not highlight a match or set it to be selected until the\ndropdown is opened.\n\nThis feature cannot be used together with custom values, because a\npartial match is also a valid custom value. A partial match is not\napplied when custom values are allowed with `allowCustomValue`.",
2229
+ "attribute": "partial-match-mode",
2230
+ "inheritedFrom": {
2231
+ "name": "ComboBoxItemsMixin",
2232
+ "module": "src/vaadin-combo-box-items-mixin.js"
2233
+ }
2234
+ },
2235
2235
  {
2236
2236
  "kind": "field",
2237
2237
  "name": "pattern",
@@ -2531,18 +2531,6 @@
2531
2531
  "package": "@vaadin/field-base/src/input-control-mixin.js"
2532
2532
  }
2533
2533
  },
2534
- {
2535
- "name": "auto-focus-partial-match",
2536
- "type": {
2537
- "text": "string"
2538
- },
2539
- "description": "Controls whether an item whose label partially matches the typed\nfilter is automatically focused. The focused item is highlighted\nin the dropdown while typing and is selected when committing the\nvalue, for example on Enter press:\n\n- `none` (default): do not focus partial matches.\n- `first-match`: focus the first item in the filtered results.\n- `only-match`: focus the item when filtering narrows the results to a single item.\n\nAn item whose label matches the filter exactly is always focused,\nregardless of this property. Matching is case-insensitive. A partial\nmatch is not focused when `allowCustomValue` is enabled, or while\nthe dropdown is closed. For example, with `autoOpenDisabled`, typing\ndoes not focus or select a match until the dropdown is opened.",
2540
- "fieldName": "autoFocusPartialMatch",
2541
- "inheritedFrom": {
2542
- "name": "ComboBoxItemsMixin",
2543
- "module": "src/vaadin-combo-box-items-mixin.js"
2544
- }
2545
- },
2546
2534
  {
2547
2535
  "name": "auto-open-disabled",
2548
2536
  "type": {
@@ -2771,6 +2759,18 @@
2771
2759
  "module": "src/vaadin-combo-box-data-provider-mixin.js"
2772
2760
  }
2773
2761
  },
2762
+ {
2763
+ "name": "partial-match-mode",
2764
+ "type": {
2765
+ "text": "string"
2766
+ },
2767
+ "description": "Controls which item is automatically set to be selected, for\nexample on Enter, when the typed filter only partially matches\nits label. The item that will be selected is highlighted in the\ndropdown while typing:\n\n- `none` (default): an item is automatically set to be selected only when the filter matches its label exactly.\n- `first-match`: the first item in the filtered results is automatically set to be selected.\n- `only-match`: the item is automatically set to be selected when filtering narrows the results to a single item.\n\nIn general, an exact match is always set to be selected and takes\nprecedence over partial matches, regardless of the mode.\n\nA partial match is only applied while the dropdown is open. For\nexample, when auto-open is disabled with `autoOpenDisabled`, typing\ndoes not highlight a match or set it to be selected until the\ndropdown is opened.\n\nThis feature cannot be used together with custom values, because a\npartial match is also a valid custom value. A partial match is not\napplied when custom values are allowed with `allowCustomValue`.",
2768
+ "fieldName": "partialMatchMode",
2769
+ "inheritedFrom": {
2770
+ "name": "ComboBoxItemsMixin",
2771
+ "module": "src/vaadin-combo-box-items-mixin.js"
2772
+ }
2773
+ },
2774
2774
  {
2775
2775
  "name": "pattern",
2776
2776
  "type": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/combo-box",
3
- "version": "25.3.0-alpha13",
3
+ "version": "25.3.0-alpha14",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,22 +36,22 @@
36
36
  ],
37
37
  "dependencies": {
38
38
  "@open-wc/dedupe-mixin": "^1.3.0",
39
- "@vaadin/a11y-base": "25.3.0-alpha13",
40
- "@vaadin/component-base": "25.3.0-alpha13",
41
- "@vaadin/field-base": "25.3.0-alpha13",
42
- "@vaadin/input-container": "25.3.0-alpha13",
43
- "@vaadin/item": "25.3.0-alpha13",
44
- "@vaadin/lit-renderer": "25.3.0-alpha13",
45
- "@vaadin/overlay": "25.3.0-alpha13",
46
- "@vaadin/vaadin-themable-mixin": "25.3.0-alpha13",
39
+ "@vaadin/a11y-base": "25.3.0-alpha14",
40
+ "@vaadin/component-base": "25.3.0-alpha14",
41
+ "@vaadin/field-base": "25.3.0-alpha14",
42
+ "@vaadin/input-container": "25.3.0-alpha14",
43
+ "@vaadin/item": "25.3.0-alpha14",
44
+ "@vaadin/lit-renderer": "25.3.0-alpha14",
45
+ "@vaadin/overlay": "25.3.0-alpha14",
46
+ "@vaadin/vaadin-themable-mixin": "25.3.0-alpha14",
47
47
  "lit": "^3.0.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@vaadin/aura": "25.3.0-alpha13",
51
- "@vaadin/chai-plugins": "25.3.0-alpha13",
52
- "@vaadin/test-runner-commands": "25.3.0-alpha13",
50
+ "@vaadin/aura": "25.3.0-alpha14",
51
+ "@vaadin/chai-plugins": "25.3.0-alpha14",
52
+ "@vaadin/test-runner-commands": "25.3.0-alpha14",
53
53
  "@vaadin/testing-helpers": "^2.0.0",
54
- "@vaadin/vaadin-lumo-styles": "25.3.0-alpha13",
54
+ "@vaadin/vaadin-lumo-styles": "25.3.0-alpha14",
55
55
  "sinon": "^22.0.0"
56
56
  },
57
57
  "customElements": "custom-elements.json",
@@ -59,5 +59,5 @@
59
59
  "web-types.json",
60
60
  "web-types.lit.json"
61
61
  ],
62
- "gitHead": "e23e44d29e6bc1e47245d5e2cc0e4b022ec61818"
62
+ "gitHead": "10a01ae7a1e278af50eda7255dbb68dafc0e4caf"
63
63
  }
@@ -6,33 +6,13 @@
6
6
  import type { Constructor } from '@open-wc/dedupe-mixin';
7
7
  import type { ComboBoxBaseMixinClass } from './vaadin-combo-box-base-mixin.js';
8
8
 
9
- export type ComboBoxAutoFocusPartialMatch = 'first-match' | 'none' | 'only-match';
9
+ export type ComboBoxPartialMatchMode = 'first-match' | 'none' | 'only-match';
10
10
 
11
11
  export declare function ComboBoxItemsMixin<TItem, T extends Constructor<HTMLElement>>(
12
12
  base: T,
13
13
  ): Constructor<ComboBoxBaseMixinClass> & Constructor<ComboBoxItemsMixinClass<TItem>> & T;
14
14
 
15
15
  export declare class ComboBoxItemsMixinClass<TItem> {
16
- /**
17
- * Controls whether an item whose label partially matches the typed
18
- * filter is automatically focused. The focused item is highlighted
19
- * in the dropdown while typing and is selected when committing the
20
- * value, for example on Enter press:
21
- *
22
- * - `none` (default): do not focus partial matches.
23
- * - `first-match`: focus the first item in the filtered results.
24
- * - `only-match`: focus the item when filtering narrows the results to a single item.
25
- *
26
- * An item whose label matches the filter exactly is always focused,
27
- * regardless of this property. Matching is case-insensitive. A partial
28
- * match is not focused when `allowCustomValue` is enabled, or while
29
- * the dropdown is closed. For example, with `autoOpenDisabled`, typing
30
- * does not focus or select a match until the dropdown is opened.
31
- *
32
- * @attr {none|first-match|only-match} auto-focus-partial-match
33
- */
34
- autoFocusPartialMatch: ComboBoxAutoFocusPartialMatch;
35
-
36
16
  /**
37
17
  * A full set of items to filter the visible options from.
38
18
  * The items can be of either `String` or `Object` type.
@@ -79,4 +59,30 @@ export declare class ComboBoxItemsMixinClass<TItem> {
79
59
  * @attr {string} item-value-path
80
60
  */
81
61
  itemValuePath: string;
62
+
63
+ /**
64
+ * Controls which item is automatically set to be selected, for
65
+ * example on Enter, when the typed filter only partially matches
66
+ * its label. The item that will be selected is highlighted in the
67
+ * dropdown while typing:
68
+ *
69
+ * - `none` (default): an item is automatically set to be selected only when the filter matches its label exactly.
70
+ * - `first-match`: the first item in the filtered results is automatically set to be selected.
71
+ * - `only-match`: the item is automatically set to be selected when filtering narrows the results to a single item.
72
+ *
73
+ * In general, an exact match is always set to be selected and takes
74
+ * precedence over partial matches, regardless of the mode.
75
+ *
76
+ * A partial match is only applied while the dropdown is open. For
77
+ * example, when auto-open is disabled with `autoOpenDisabled`, typing
78
+ * does not highlight a match or set it to be selected until the
79
+ * dropdown is opened.
80
+ *
81
+ * This feature cannot be used together with custom values, because a
82
+ * partial match is also a valid custom value. A partial match is not
83
+ * applied when custom values are allowed with `allowCustomValue`.
84
+ *
85
+ * @attr {none|first-match|only-match} partial-match-mode
86
+ */
87
+ partialMatchMode: ComboBoxPartialMatchMode;
82
88
  }
@@ -62,29 +62,6 @@ export const ComboBoxItemsMixin = (superClass) =>
62
62
  sync: true,
63
63
  },
64
64
 
65
- /**
66
- * Controls whether an item whose label partially matches the typed
67
- * filter is automatically focused. The focused item is highlighted
68
- * in the dropdown while typing and is selected when committing the
69
- * value, for example on Enter press:
70
- *
71
- * - `none` (default): do not focus partial matches.
72
- * - `first-match`: focus the first item in the filtered results.
73
- * - `only-match`: focus the item when filtering narrows the results to a single item.
74
- *
75
- * An item whose label matches the filter exactly is always focused,
76
- * regardless of this property. Matching is case-insensitive. A partial
77
- * match is not focused when `allowCustomValue` is enabled, or while
78
- * the dropdown is closed. For example, with `autoOpenDisabled`, typing
79
- * does not focus or select a match until the dropdown is opened.
80
- *
81
- * @attr {none|first-match|only-match} auto-focus-partial-match
82
- */
83
- autoFocusPartialMatch: {
84
- type: String,
85
- value: 'none',
86
- },
87
-
88
65
  /**
89
66
  * Filtering string the user has typed into the input field.
90
67
  */
@@ -134,6 +111,35 @@ export const ComboBoxItemsMixin = (superClass) =>
134
111
  value: 'value',
135
112
  sync: true,
136
113
  },
114
+
115
+ /**
116
+ * Controls which item is automatically set to be selected, for
117
+ * example on Enter, when the typed filter only partially matches
118
+ * its label. The item that will be selected is highlighted in the
119
+ * dropdown while typing:
120
+ *
121
+ * - `none` (default): an item is automatically set to be selected only when the filter matches its label exactly.
122
+ * - `first-match`: the first item in the filtered results is automatically set to be selected.
123
+ * - `only-match`: the item is automatically set to be selected when filtering narrows the results to a single item.
124
+ *
125
+ * In general, an exact match is always set to be selected and takes
126
+ * precedence over partial matches, regardless of the mode.
127
+ *
128
+ * A partial match is only applied while the dropdown is open. For
129
+ * example, when auto-open is disabled with `autoOpenDisabled`, typing
130
+ * does not highlight a match or set it to be selected until the
131
+ * dropdown is opened.
132
+ *
133
+ * This feature cannot be used together with custom values, because a
134
+ * partial match is also a valid custom value. A partial match is not
135
+ * applied when custom values are allowed with `allowCustomValue`.
136
+ *
137
+ * @attr {none|first-match|only-match} partial-match-mode
138
+ */
139
+ partialMatchMode: {
140
+ type: String,
141
+ value: 'none',
142
+ },
137
143
  };
138
144
  }
139
145
 
@@ -334,10 +340,7 @@ export const ComboBoxItemsMixin = (superClass) =>
334
340
  return -1;
335
341
  }
336
342
 
337
- if (
338
- this.autoFocusPartialMatch === 'first-match' ||
339
- (this.autoFocusPartialMatch === 'only-match' && items.length === 1)
340
- ) {
343
+ if (this.partialMatchMode === 'first-match' || (this.partialMatchMode === 'only-match' && items.length === 1)) {
341
344
  // Skip an item that is not yet loaded. Once the item is loaded,
342
345
  // the focused index is updated again.
343
346
  return items[0] instanceof ComboBoxPlaceholder ? -1 : 0;
@@ -30,7 +30,7 @@ export {
30
30
  ComboBoxDataProviderCallback,
31
31
  ComboBoxDataProviderParams,
32
32
  } from './vaadin-combo-box-data-provider-mixin.js';
33
- export { ComboBoxAutoFocusPartialMatch } from './vaadin-combo-box-items-mixin.js';
33
+ export { ComboBoxPartialMatchMode } from './vaadin-combo-box-items-mixin.js';
34
34
  export { ComboBoxDefaultItem, ComboBoxItemModel, ComboBoxRenderer } from './vaadin-combo-box-mixin.js';
35
35
 
36
36
  /**
package/web-types.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/combo-box",
4
- "version": "25.3.0-alpha13",
4
+ "version": "25.3.0-alpha14",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "elements": [
9
9
  {
10
10
  "name": "vaadin-combo-box",
11
- "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/25.3.0-alpha13/#/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/25.3.0-alpha13/#/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/25.3.0-alpha13/#/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\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and buttons\n`field-button` | Set on both clear and toggle buttons\n`clear-button` | The clear button\n`error-message` | The error message element\n`helper-text` | The helper text element wrapper\n`required-indicator` | The `required` state indicator element\n`toggle-button` | The toggle button\n`overlay` | The overlay container\n`content` | The overlay content\n`loader` | The loading indicator shown while loading items\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-value` | Set when the element has a value\n`has-label` | Set when the element has a label\n`has-helper` | Set when the element has helper text or slot\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n`invalid` | Set when the element is invalid\n`focused` | Set when the element is focused\n`focus-ring` | Set when the element is keyboard focused\n`readonly` | Set when the element is readonly\n`opened` | Set when the overlay is opened\n`loading` | Set when loading items from the data provider\n\n### Internal components\n\nIn addition to `<vaadin-combo-box>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-combo-box-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha13/#/elements/vaadin-item).\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
11
+ "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/25.3.0-alpha14/#/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/25.3.0-alpha14/#/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/25.3.0-alpha14/#/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\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and buttons\n`field-button` | Set on both clear and toggle buttons\n`clear-button` | The clear button\n`error-message` | The error message element\n`helper-text` | The helper text element wrapper\n`required-indicator` | The `required` state indicator element\n`toggle-button` | The toggle button\n`overlay` | The overlay container\n`content` | The overlay content\n`loader` | The loading indicator shown while loading items\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-value` | Set when the element has a value\n`has-label` | Set when the element has a label\n`has-helper` | Set when the element has helper text or slot\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n`invalid` | Set when the element is invalid\n`focused` | Set when the element is focused\n`focus-ring` | Set when the element is keyboard focused\n`readonly` | Set when the element is readonly\n`opened` | Set when the overlay is opened\n`loading` | Set when loading items from the data provider\n\n### Internal components\n\nIn addition to `<vaadin-combo-box>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-combo-box-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha14/#/elements/vaadin-item).\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
12
12
  "attributes": [
13
13
  {
14
14
  "name": "accessible-description-ref",
@@ -55,15 +55,6 @@
55
55
  ]
56
56
  }
57
57
  },
58
- {
59
- "name": "auto-focus-partial-match",
60
- "description": "Controls whether an item whose label partially matches the typed\nfilter is automatically focused. The focused item is highlighted\nin the dropdown while typing and is selected when committing the\nvalue, for example on Enter press:\n\n- `none` (default): do not focus partial matches.\n- `first-match`: focus the first item in the filtered results.\n- `only-match`: focus the item when filtering narrows the results to a single item.\n\nAn item whose label matches the filter exactly is always focused,\nregardless of this property. Matching is case-insensitive. A partial\nmatch is not focused when `allowCustomValue` is enabled, or while\nthe dropdown is closed. For example, with `autoOpenDisabled`, typing\ndoes not focus or select a match until the dropdown is opened.",
61
- "value": {
62
- "type": [
63
- "string"
64
- ]
65
- }
66
- },
67
58
  {
68
59
  "name": "auto-open-disabled",
69
60
  "description": "Set true to prevent the overlay from opening automatically.",
@@ -226,6 +217,15 @@
226
217
  ]
227
218
  }
228
219
  },
220
+ {
221
+ "name": "partial-match-mode",
222
+ "description": "Controls which item is automatically set to be selected, for\nexample on Enter, when the typed filter only partially matches\nits label. The item that will be selected is highlighted in the\ndropdown while typing:\n\n- `none` (default): an item is automatically set to be selected only when the filter matches its label exactly.\n- `first-match`: the first item in the filtered results is automatically set to be selected.\n- `only-match`: the item is automatically set to be selected when filtering narrows the results to a single item.\n\nIn general, an exact match is always set to be selected and takes\nprecedence over partial matches, regardless of the mode.\n\nA partial match is only applied while the dropdown is open. For\nexample, when auto-open is disabled with `autoOpenDisabled`, typing\ndoes not highlight a match or set it to be selected until the\ndropdown is opened.\n\nThis feature cannot be used together with custom values, because a\npartial match is also a valid custom value. A partial match is not\napplied when custom values are allowed with `allowCustomValue`.",
223
+ "value": {
224
+ "type": [
225
+ "string"
226
+ ]
227
+ }
228
+ },
229
229
  {
230
230
  "name": "pattern",
231
231
  "description": "A regular expression that the value is checked against.\nThe pattern must match the entire value, not just some subset.",
@@ -355,15 +355,6 @@
355
355
  ]
356
356
  }
357
357
  },
358
- {
359
- "name": "autoFocusPartialMatch",
360
- "description": "Controls whether an item whose label partially matches the typed\nfilter is automatically focused. The focused item is highlighted\nin the dropdown while typing and is selected when committing the\nvalue, for example on Enter press:\n\n- `none` (default): do not focus partial matches.\n- `first-match`: focus the first item in the filtered results.\n- `only-match`: focus the item when filtering narrows the results to a single item.\n\nAn item whose label matches the filter exactly is always focused,\nregardless of this property. Matching is case-insensitive. A partial\nmatch is not focused when `allowCustomValue` is enabled, or while\nthe dropdown is closed. For example, with `autoOpenDisabled`, typing\ndoes not focus or select a match until the dropdown is opened.",
361
- "value": {
362
- "type": [
363
- "string"
364
- ]
365
- }
366
- },
367
358
  {
368
359
  "name": "autoOpenDisabled",
369
360
  "description": "Set true to prevent the overlay from opening automatically.",
@@ -567,6 +558,15 @@
567
558
  ]
568
559
  }
569
560
  },
561
+ {
562
+ "name": "partialMatchMode",
563
+ "description": "Controls which item is automatically set to be selected, for\nexample on Enter, when the typed filter only partially matches\nits label. The item that will be selected is highlighted in the\ndropdown while typing:\n\n- `none` (default): an item is automatically set to be selected only when the filter matches its label exactly.\n- `first-match`: the first item in the filtered results is automatically set to be selected.\n- `only-match`: the item is automatically set to be selected when filtering narrows the results to a single item.\n\nIn general, an exact match is always set to be selected and takes\nprecedence over partial matches, regardless of the mode.\n\nA partial match is only applied while the dropdown is open. For\nexample, when auto-open is disabled with `autoOpenDisabled`, typing\ndoes not highlight a match or set it to be selected until the\ndropdown is opened.\n\nThis feature cannot be used together with custom values, because a\npartial match is also a valid custom value. A partial match is not\napplied when custom values are allowed with `allowCustomValue`.",
564
+ "value": {
565
+ "type": [
566
+ "string"
567
+ ]
568
+ }
569
+ },
570
570
  {
571
571
  "name": "pattern",
572
572
  "description": "A regular expression that the value is checked against.\nThe pattern must match the entire value, not just some subset.",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/combo-box",
4
- "version": "25.3.0-alpha13",
4
+ "version": "25.3.0-alpha14",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -16,7 +16,7 @@
16
16
  "elements": [
17
17
  {
18
18
  "name": "vaadin-combo-box",
19
- "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/25.3.0-alpha13/#/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/25.3.0-alpha13/#/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/25.3.0-alpha13/#/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\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and buttons\n`field-button` | Set on both clear and toggle buttons\n`clear-button` | The clear button\n`error-message` | The error message element\n`helper-text` | The helper text element wrapper\n`required-indicator` | The `required` state indicator element\n`toggle-button` | The toggle button\n`overlay` | The overlay container\n`content` | The overlay content\n`loader` | The loading indicator shown while loading items\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-value` | Set when the element has a value\n`has-label` | Set when the element has a label\n`has-helper` | Set when the element has helper text or slot\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n`invalid` | Set when the element is invalid\n`focused` | Set when the element is focused\n`focus-ring` | Set when the element is keyboard focused\n`readonly` | Set when the element is readonly\n`opened` | Set when the overlay is opened\n`loading` | Set when loading items from the data provider\n\n### Internal components\n\nIn addition to `<vaadin-combo-box>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-combo-box-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha13/#/elements/vaadin-item).\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
19
+ "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/25.3.0-alpha14/#/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/25.3.0-alpha14/#/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/25.3.0-alpha14/#/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\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and buttons\n`field-button` | Set on both clear and toggle buttons\n`clear-button` | The clear button\n`error-message` | The error message element\n`helper-text` | The helper text element wrapper\n`required-indicator` | The `required` state indicator element\n`toggle-button` | The toggle button\n`overlay` | The overlay container\n`content` | The overlay content\n`loader` | The loading indicator shown while loading items\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-value` | Set when the element has a value\n`has-label` | Set when the element has a label\n`has-helper` | Set when the element has helper text or slot\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n`invalid` | Set when the element is invalid\n`focused` | Set when the element is focused\n`focus-ring` | Set when the element is keyboard focused\n`readonly` | Set when the element is readonly\n`opened` | Set when the overlay is opened\n`loading` | Set when loading items from the data provider\n\n### Internal components\n\nIn addition to `<vaadin-combo-box>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-combo-box-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-alpha14/#/elements/vaadin-item).\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
20
20
  "extension": true,
21
21
  "attributes": [
22
22
  {
@@ -61,13 +61,6 @@
61
61
  "kind": "expression"
62
62
  }
63
63
  },
64
- {
65
- "name": ".autoFocusPartialMatch",
66
- "description": "Controls whether an item whose label partially matches the typed\nfilter is automatically focused. The focused item is highlighted\nin the dropdown while typing and is selected when committing the\nvalue, for example on Enter press:\n\n- `none` (default): do not focus partial matches.\n- `first-match`: focus the first item in the filtered results.\n- `only-match`: focus the item when filtering narrows the results to a single item.\n\nAn item whose label matches the filter exactly is always focused,\nregardless of this property. Matching is case-insensitive. A partial\nmatch is not focused when `allowCustomValue` is enabled, or while\nthe dropdown is closed. For example, with `autoOpenDisabled`, typing\ndoes not focus or select a match until the dropdown is opened.",
67
- "value": {
68
- "kind": "expression"
69
- }
70
- },
71
64
  {
72
65
  "name": "?autoOpenDisabled",
73
66
  "description": "Set true to prevent the overlay from opening automatically.",
@@ -222,6 +215,13 @@
222
215
  "kind": "expression"
223
216
  }
224
217
  },
218
+ {
219
+ "name": ".partialMatchMode",
220
+ "description": "Controls which item is automatically set to be selected, for\nexample on Enter, when the typed filter only partially matches\nits label. The item that will be selected is highlighted in the\ndropdown while typing:\n\n- `none` (default): an item is automatically set to be selected only when the filter matches its label exactly.\n- `first-match`: the first item in the filtered results is automatically set to be selected.\n- `only-match`: the item is automatically set to be selected when filtering narrows the results to a single item.\n\nIn general, an exact match is always set to be selected and takes\nprecedence over partial matches, regardless of the mode.\n\nA partial match is only applied while the dropdown is open. For\nexample, when auto-open is disabled with `autoOpenDisabled`, typing\ndoes not highlight a match or set it to be selected until the\ndropdown is opened.\n\nThis feature cannot be used together with custom values, because a\npartial match is also a valid custom value. A partial match is not\napplied when custom values are allowed with `allowCustomValue`.",
221
+ "value": {
222
+ "kind": "expression"
223
+ }
224
+ },
225
225
  {
226
226
  "name": ".pattern",
227
227
  "description": "A regular expression that the value is checked against.\nThe pattern must match the entire value, not just some subset.",