@vaadin/multi-select-combo-box 25.3.0-dev.1fa5a51482 → 25.3.0-rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +138 -22
- package/package.json +15 -15
- package/src/vaadin-multi-select-combo-box-item.js +3 -1
- package/src/vaadin-multi-select-combo-box-mixin.d.ts +0 -14
- package/src/vaadin-multi-select-combo-box-mixin.js +55 -124
- package/src/vaadin-multi-select-combo-box-scroller.js +7 -3
- package/src/vaadin-multi-select-combo-box.d.ts +53 -6
- package/src/vaadin-multi-select-combo-box.js +53 -6
- package/web-types.json +44 -8
- package/web-types.lit.json +19 -5
package/custom-elements.json
CHANGED
|
@@ -26,6 +26,20 @@
|
|
|
26
26
|
"description": "",
|
|
27
27
|
"name": "MultiSelectComboBoxMixin",
|
|
28
28
|
"members": [
|
|
29
|
+
{
|
|
30
|
+
"kind": "field",
|
|
31
|
+
"name": "accessibleDescriptionRef",
|
|
32
|
+
"privacy": "public",
|
|
33
|
+
"type": {
|
|
34
|
+
"text": "string"
|
|
35
|
+
},
|
|
36
|
+
"description": "A space-separated list of IDs referencing the elements that\ndescribe the component for screen reader users. The referenced\nelements are announced in addition to the helper text and\nthe error message.",
|
|
37
|
+
"attribute": "accessible-description-ref",
|
|
38
|
+
"inheritedFrom": {
|
|
39
|
+
"name": "FieldMixin",
|
|
40
|
+
"package": "@vaadin/field-base/src/field-mixin.js"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
29
43
|
{
|
|
30
44
|
"kind": "field",
|
|
31
45
|
"name": "accessibleName",
|
|
@@ -33,7 +47,7 @@
|
|
|
33
47
|
"type": {
|
|
34
48
|
"text": "string"
|
|
35
49
|
},
|
|
36
|
-
"description": "String used to label the component
|
|
50
|
+
"description": "String used to label the component for screen reader users.",
|
|
37
51
|
"attribute": "accessible-name",
|
|
38
52
|
"inheritedFrom": {
|
|
39
53
|
"name": "FieldMixin",
|
|
@@ -47,7 +61,7 @@
|
|
|
47
61
|
"type": {
|
|
48
62
|
"text": "string"
|
|
49
63
|
},
|
|
50
|
-
"description": "
|
|
64
|
+
"description": "A space-separated list of IDs referencing the elements that\nlabel the component for screen reader users.",
|
|
51
65
|
"attribute": "accessible-name-ref",
|
|
52
66
|
"inheritedFrom": {
|
|
53
67
|
"name": "FieldMixin",
|
|
@@ -334,8 +348,12 @@
|
|
|
334
348
|
"type": {
|
|
335
349
|
"text": "string"
|
|
336
350
|
},
|
|
337
|
-
"description": "Path for the id of the item
|
|
338
|
-
"attribute": "item-id-path"
|
|
351
|
+
"description": "Path for the id of the item. If `items` is an array of objects,\nthe `itemIdPath` is used to compare and identify the same item\nin the selection and in `filteredItems` (items given by the\n`dataProvider` callback).",
|
|
352
|
+
"attribute": "item-id-path",
|
|
353
|
+
"inheritedFrom": {
|
|
354
|
+
"name": "ComboBoxItemsMixin",
|
|
355
|
+
"package": "@vaadin/combo-box/src/vaadin-combo-box-items-mixin.js"
|
|
356
|
+
}
|
|
339
357
|
},
|
|
340
358
|
{
|
|
341
359
|
"kind": "field",
|
|
@@ -492,6 +510,20 @@
|
|
|
492
510
|
"package": "@vaadin/combo-box/src/vaadin-combo-box-data-provider-mixin.js"
|
|
493
511
|
}
|
|
494
512
|
},
|
|
513
|
+
{
|
|
514
|
+
"kind": "field",
|
|
515
|
+
"name": "partialMatchMode",
|
|
516
|
+
"privacy": "public",
|
|
517
|
+
"type": {
|
|
518
|
+
"text": "string"
|
|
519
|
+
},
|
|
520
|
+
"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`.",
|
|
521
|
+
"attribute": "partial-match-mode",
|
|
522
|
+
"inheritedFrom": {
|
|
523
|
+
"name": "ComboBoxItemsMixin",
|
|
524
|
+
"package": "@vaadin/combo-box/src/vaadin-combo-box-items-mixin.js"
|
|
525
|
+
}
|
|
526
|
+
},
|
|
495
527
|
{
|
|
496
528
|
"kind": "field",
|
|
497
529
|
"name": "placeholder",
|
|
@@ -533,7 +565,11 @@
|
|
|
533
565
|
{
|
|
534
566
|
"kind": "method",
|
|
535
567
|
"name": "requestContentUpdate",
|
|
536
|
-
"description": "Requests an update for the content of items.\nWhile performing the update, it invokes the renderer (passed in the `renderer` property) once an item.\n\nIt is not guaranteed that the update happens immediately (synchronously) after it is requested."
|
|
568
|
+
"description": "Requests an update for the content of items.\nWhile performing the update, it invokes the renderer (passed in the `renderer` property) once an item.\n\nIt is not guaranteed that the update happens immediately (synchronously) after it is requested.",
|
|
569
|
+
"inheritedFrom": {
|
|
570
|
+
"name": "ComboBoxItemsMixin",
|
|
571
|
+
"package": "@vaadin/combo-box/src/vaadin-combo-box-items-mixin.js"
|
|
572
|
+
}
|
|
537
573
|
},
|
|
538
574
|
{
|
|
539
575
|
"kind": "field",
|
|
@@ -655,12 +691,24 @@
|
|
|
655
691
|
}
|
|
656
692
|
],
|
|
657
693
|
"attributes": [
|
|
694
|
+
{
|
|
695
|
+
"name": "accessible-description-ref",
|
|
696
|
+
"type": {
|
|
697
|
+
"text": "string"
|
|
698
|
+
},
|
|
699
|
+
"description": "A space-separated list of IDs referencing the elements that\ndescribe the component for screen reader users. The referenced\nelements are announced in addition to the helper text and\nthe error message.",
|
|
700
|
+
"fieldName": "accessibleDescriptionRef",
|
|
701
|
+
"inheritedFrom": {
|
|
702
|
+
"name": "FieldMixin",
|
|
703
|
+
"package": "@vaadin/field-base/src/field-mixin.js"
|
|
704
|
+
}
|
|
705
|
+
},
|
|
658
706
|
{
|
|
659
707
|
"name": "accessible-name",
|
|
660
708
|
"type": {
|
|
661
709
|
"text": "string"
|
|
662
710
|
},
|
|
663
|
-
"description": "String used to label the component
|
|
711
|
+
"description": "String used to label the component for screen reader users.",
|
|
664
712
|
"fieldName": "accessibleName",
|
|
665
713
|
"inheritedFrom": {
|
|
666
714
|
"name": "FieldMixin",
|
|
@@ -672,7 +720,7 @@
|
|
|
672
720
|
"type": {
|
|
673
721
|
"text": "string"
|
|
674
722
|
},
|
|
675
|
-
"description": "
|
|
723
|
+
"description": "A space-separated list of IDs referencing the elements that\nlabel the component for screen reader users.",
|
|
676
724
|
"fieldName": "accessibleNameRef",
|
|
677
725
|
"inheritedFrom": {
|
|
678
726
|
"name": "FieldMixin",
|
|
@@ -860,8 +908,12 @@
|
|
|
860
908
|
"type": {
|
|
861
909
|
"text": "string"
|
|
862
910
|
},
|
|
863
|
-
"description": "Path for the id of the item
|
|
864
|
-
"fieldName": "itemIdPath"
|
|
911
|
+
"description": "Path for the id of the item. If `items` is an array of objects,\nthe `itemIdPath` is used to compare and identify the same item\nin the selection and in `filteredItems` (items given by the\n`dataProvider` callback).",
|
|
912
|
+
"fieldName": "itemIdPath",
|
|
913
|
+
"inheritedFrom": {
|
|
914
|
+
"name": "ComboBoxItemsMixin",
|
|
915
|
+
"package": "@vaadin/combo-box/src/vaadin-combo-box-items-mixin.js"
|
|
916
|
+
}
|
|
865
917
|
},
|
|
866
918
|
{
|
|
867
919
|
"name": "item-label-path",
|
|
@@ -963,6 +1015,18 @@
|
|
|
963
1015
|
"package": "@vaadin/combo-box/src/vaadin-combo-box-data-provider-mixin.js"
|
|
964
1016
|
}
|
|
965
1017
|
},
|
|
1018
|
+
{
|
|
1019
|
+
"name": "partial-match-mode",
|
|
1020
|
+
"type": {
|
|
1021
|
+
"text": "string"
|
|
1022
|
+
},
|
|
1023
|
+
"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`.",
|
|
1024
|
+
"fieldName": "partialMatchMode",
|
|
1025
|
+
"inheritedFrom": {
|
|
1026
|
+
"name": "ComboBoxItemsMixin",
|
|
1027
|
+
"package": "@vaadin/combo-box/src/vaadin-combo-box-items-mixin.js"
|
|
1028
|
+
}
|
|
1029
|
+
},
|
|
966
1030
|
{
|
|
967
1031
|
"name": "placeholder",
|
|
968
1032
|
"type": {
|
|
@@ -1110,9 +1174,23 @@
|
|
|
1110
1174
|
"declarations": [
|
|
1111
1175
|
{
|
|
1112
1176
|
"kind": "class",
|
|
1113
|
-
"description": "`<vaadin-multi-select-combo-box>` is a web component that wraps `<vaadin-combo-box>` and extends\nits functionality to allow selecting multiple items, in addition to basic features.\n\n```html\n<vaadin-multi-select-combo-box id=\"comboBox\"></vaadin-multi-select-combo-box>\n```\n\n```js\nconst comboBox = document.querySelector('#comboBox');\ncomboBox.items = ['apple', 'banana', 'lemon', 'orange'];\ncomboBox.selectedItems = ['lemon', 'orange'];\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n-----------------------|----------------\n`chips` | The element that wraps slotted chips for selected items\n`label` | The label element\n`input-field` | The element that wraps prefix, value and suffix\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 to a disabled element\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`loading` | Set when loading items from the data provider\n`opened` | Set when the dropdown is open\n`readonly` | Set to a readonly element\n\nThe following custom CSS properties are available for styling:\n\nCustom property
|
|
1177
|
+
"description": "`<vaadin-multi-select-combo-box>` is a web component that wraps `<vaadin-combo-box>` and extends\nits functionality to allow selecting multiple items, in addition to basic features.\n\n```html\n<vaadin-multi-select-combo-box id=\"comboBox\"></vaadin-multi-select-combo-box>\n```\n\n```js\nconst comboBox = document.querySelector('#comboBox');\ncomboBox.items = ['apple', 'banana', 'lemon', 'orange'];\ncomboBox.selectedItems = ['lemon', 'orange'];\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n-----------------------|----------------\n`chips` | The element that wraps slotted chips for selected items\n`label` | The label element\n`input-field` | The element that wraps prefix, value and suffix\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 to a disabled element\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`loading` | Set when loading items from the data provider\n`opened` | Set when the dropdown is open\n`readonly` | Set to a readonly element\n\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:-------------------------------------------------------|\n| `--vaadin-chip-background` |\n| `--vaadin-chip-border-color` |\n| `--vaadin-chip-border-radius` |\n| `--vaadin-chip-border-width` |\n| `--vaadin-chip-font-size` |\n| `--vaadin-chip-font-weight` |\n| `--vaadin-chip-gap` |\n| `--vaadin-chip-height` |\n| `--vaadin-chip-padding` |\n| `--vaadin-chip-remove-button-text-color` |\n| `--vaadin-chip-text-color` |\n| `--vaadin-field-default-width` |\n| `--vaadin-input-field-background` |\n| `--vaadin-input-field-border-color` |\n| `--vaadin-input-field-border-radius` |\n| `--vaadin-input-field-border-width` |\n| `--vaadin-input-field-bottom-end-radius` |\n| `--vaadin-input-field-bottom-start-radius` |\n| `--vaadin-input-field-button-text-color` |\n| `--vaadin-input-field-container-gap` |\n| `--vaadin-input-field-disabled-background` |\n| `--vaadin-input-field-disabled-text-color` |\n| `--vaadin-input-field-error-color` |\n| `--vaadin-input-field-error-font-size` |\n| `--vaadin-input-field-error-font-weight` |\n| `--vaadin-input-field-error-line-height` |\n| `--vaadin-input-field-gap` |\n| `--vaadin-input-field-helper-color` |\n| `--vaadin-input-field-helper-font-size` |\n| `--vaadin-input-field-helper-font-weight` |\n| `--vaadin-input-field-helper-line-height` |\n| `--vaadin-input-field-label-color` |\n| `--vaadin-input-field-label-font-size` |\n| `--vaadin-input-field-label-font-weight` |\n| `--vaadin-input-field-label-line-height` |\n| `--vaadin-input-field-padding` |\n| `--vaadin-input-field-placeholder-color` |\n| `--vaadin-input-field-required-indicator` |\n| `--vaadin-input-field-required-indicator-color` |\n| `--vaadin-input-field-top-end-radius` |\n| `--vaadin-input-field-top-start-radius` |\n| `--vaadin-input-field-value-color` |\n| `--vaadin-input-field-value-font-size` |\n| `--vaadin-input-field-value-font-weight` |\n| `--vaadin-input-field-value-line-height` |\n| `--vaadin-item-overlay-padding` |\n| `--vaadin-multi-select-combo-box-chip-min-width` |\n| `--vaadin-multi-select-combo-box-chips-gap` |\n| `--vaadin-multi-select-combo-box-input-min-width` |\n| `--vaadin-multi-select-combo-box-overlay-max-height` |\n| `--vaadin-multi-select-combo-box-overlay-width` |\n\n### Internal components\n\nIn addition to `<vaadin-multi-select-combo-box>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-multi-select-combo-box-chip>`\n- `<vaadin-multi-select-combo-box-item>` - has the same API as `<vaadin-item>`.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
1114
1178
|
"name": "MultiSelectComboBox",
|
|
1115
1179
|
"members": [
|
|
1180
|
+
{
|
|
1181
|
+
"kind": "field",
|
|
1182
|
+
"name": "accessibleDescriptionRef",
|
|
1183
|
+
"privacy": "public",
|
|
1184
|
+
"type": {
|
|
1185
|
+
"text": "string"
|
|
1186
|
+
},
|
|
1187
|
+
"description": "A space-separated list of IDs referencing the elements that\ndescribe the component for screen reader users. The referenced\nelements are announced in addition to the helper text and\nthe error message.",
|
|
1188
|
+
"attribute": "accessible-description-ref",
|
|
1189
|
+
"inheritedFrom": {
|
|
1190
|
+
"name": "FieldMixin",
|
|
1191
|
+
"package": "@vaadin/field-base/src/field-mixin.js"
|
|
1192
|
+
}
|
|
1193
|
+
},
|
|
1116
1194
|
{
|
|
1117
1195
|
"kind": "field",
|
|
1118
1196
|
"name": "accessibleName",
|
|
@@ -1120,7 +1198,7 @@
|
|
|
1120
1198
|
"type": {
|
|
1121
1199
|
"text": "string"
|
|
1122
1200
|
},
|
|
1123
|
-
"description": "String used to label the component
|
|
1201
|
+
"description": "String used to label the component for screen reader users.",
|
|
1124
1202
|
"attribute": "accessible-name",
|
|
1125
1203
|
"inheritedFrom": {
|
|
1126
1204
|
"name": "FieldMixin",
|
|
@@ -1134,7 +1212,7 @@
|
|
|
1134
1212
|
"type": {
|
|
1135
1213
|
"text": "string"
|
|
1136
1214
|
},
|
|
1137
|
-
"description": "
|
|
1215
|
+
"description": "A space-separated list of IDs referencing the elements that\nlabel the component for screen reader users.",
|
|
1138
1216
|
"attribute": "accessible-name-ref",
|
|
1139
1217
|
"inheritedFrom": {
|
|
1140
1218
|
"name": "FieldMixin",
|
|
@@ -1441,11 +1519,11 @@
|
|
|
1441
1519
|
"type": {
|
|
1442
1520
|
"text": "string"
|
|
1443
1521
|
},
|
|
1444
|
-
"description": "Path for the id of the item
|
|
1522
|
+
"description": "Path for the id of the item. If `items` is an array of objects,\nthe `itemIdPath` is used to compare and identify the same item\nin the selection and in `filteredItems` (items given by the\n`dataProvider` callback).",
|
|
1445
1523
|
"attribute": "item-id-path",
|
|
1446
1524
|
"inheritedFrom": {
|
|
1447
|
-
"name": "
|
|
1448
|
-
"
|
|
1525
|
+
"name": "ComboBoxItemsMixin",
|
|
1526
|
+
"package": "@vaadin/combo-box/src/vaadin-combo-box-items-mixin.js"
|
|
1449
1527
|
}
|
|
1450
1528
|
},
|
|
1451
1529
|
{
|
|
@@ -1611,6 +1689,20 @@
|
|
|
1611
1689
|
"package": "@vaadin/combo-box/src/vaadin-combo-box-data-provider-mixin.js"
|
|
1612
1690
|
}
|
|
1613
1691
|
},
|
|
1692
|
+
{
|
|
1693
|
+
"kind": "field",
|
|
1694
|
+
"name": "partialMatchMode",
|
|
1695
|
+
"privacy": "public",
|
|
1696
|
+
"type": {
|
|
1697
|
+
"text": "string"
|
|
1698
|
+
},
|
|
1699
|
+
"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`.",
|
|
1700
|
+
"attribute": "partial-match-mode",
|
|
1701
|
+
"inheritedFrom": {
|
|
1702
|
+
"name": "ComboBoxItemsMixin",
|
|
1703
|
+
"package": "@vaadin/combo-box/src/vaadin-combo-box-items-mixin.js"
|
|
1704
|
+
}
|
|
1705
|
+
},
|
|
1614
1706
|
{
|
|
1615
1707
|
"kind": "field",
|
|
1616
1708
|
"name": "placeholder",
|
|
@@ -1658,8 +1750,8 @@
|
|
|
1658
1750
|
"name": "requestContentUpdate",
|
|
1659
1751
|
"description": "Requests an update for the content of items.\nWhile performing the update, it invokes the renderer (passed in the `renderer` property) once an item.\n\nIt is not guaranteed that the update happens immediately (synchronously) after it is requested.",
|
|
1660
1752
|
"inheritedFrom": {
|
|
1661
|
-
"name": "
|
|
1662
|
-
"
|
|
1753
|
+
"name": "ComboBoxItemsMixin",
|
|
1754
|
+
"package": "@vaadin/combo-box/src/vaadin-combo-box-items-mixin.js"
|
|
1663
1755
|
}
|
|
1664
1756
|
},
|
|
1665
1757
|
{
|
|
@@ -1807,12 +1899,24 @@
|
|
|
1807
1899
|
}
|
|
1808
1900
|
],
|
|
1809
1901
|
"attributes": [
|
|
1902
|
+
{
|
|
1903
|
+
"name": "accessible-description-ref",
|
|
1904
|
+
"type": {
|
|
1905
|
+
"text": "string"
|
|
1906
|
+
},
|
|
1907
|
+
"description": "A space-separated list of IDs referencing the elements that\ndescribe the component for screen reader users. The referenced\nelements are announced in addition to the helper text and\nthe error message.",
|
|
1908
|
+
"fieldName": "accessibleDescriptionRef",
|
|
1909
|
+
"inheritedFrom": {
|
|
1910
|
+
"name": "FieldMixin",
|
|
1911
|
+
"package": "@vaadin/field-base/src/field-mixin.js"
|
|
1912
|
+
}
|
|
1913
|
+
},
|
|
1810
1914
|
{
|
|
1811
1915
|
"name": "accessible-name",
|
|
1812
1916
|
"type": {
|
|
1813
1917
|
"text": "string"
|
|
1814
1918
|
},
|
|
1815
|
-
"description": "String used to label the component
|
|
1919
|
+
"description": "String used to label the component for screen reader users.",
|
|
1816
1920
|
"fieldName": "accessibleName",
|
|
1817
1921
|
"inheritedFrom": {
|
|
1818
1922
|
"name": "FieldMixin",
|
|
@@ -1824,7 +1928,7 @@
|
|
|
1824
1928
|
"type": {
|
|
1825
1929
|
"text": "string"
|
|
1826
1930
|
},
|
|
1827
|
-
"description": "
|
|
1931
|
+
"description": "A space-separated list of IDs referencing the elements that\nlabel the component for screen reader users.",
|
|
1828
1932
|
"fieldName": "accessibleNameRef",
|
|
1829
1933
|
"inheritedFrom": {
|
|
1830
1934
|
"name": "FieldMixin",
|
|
@@ -2028,11 +2132,11 @@
|
|
|
2028
2132
|
"type": {
|
|
2029
2133
|
"text": "string"
|
|
2030
2134
|
},
|
|
2031
|
-
"description": "Path for the id of the item
|
|
2135
|
+
"description": "Path for the id of the item. If `items` is an array of objects,\nthe `itemIdPath` is used to compare and identify the same item\nin the selection and in `filteredItems` (items given by the\n`dataProvider` callback).",
|
|
2032
2136
|
"fieldName": "itemIdPath",
|
|
2033
2137
|
"inheritedFrom": {
|
|
2034
|
-
"name": "
|
|
2035
|
-
"
|
|
2138
|
+
"name": "ComboBoxItemsMixin",
|
|
2139
|
+
"package": "@vaadin/combo-box/src/vaadin-combo-box-items-mixin.js"
|
|
2036
2140
|
}
|
|
2037
2141
|
},
|
|
2038
2142
|
{
|
|
@@ -2143,6 +2247,18 @@
|
|
|
2143
2247
|
"package": "@vaadin/combo-box/src/vaadin-combo-box-data-provider-mixin.js"
|
|
2144
2248
|
}
|
|
2145
2249
|
},
|
|
2250
|
+
{
|
|
2251
|
+
"name": "partial-match-mode",
|
|
2252
|
+
"type": {
|
|
2253
|
+
"text": "string"
|
|
2254
|
+
},
|
|
2255
|
+
"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`.",
|
|
2256
|
+
"fieldName": "partialMatchMode",
|
|
2257
|
+
"inheritedFrom": {
|
|
2258
|
+
"name": "ComboBoxItemsMixin",
|
|
2259
|
+
"package": "@vaadin/combo-box/src/vaadin-combo-box-items-mixin.js"
|
|
2260
|
+
}
|
|
2261
|
+
},
|
|
2146
2262
|
{
|
|
2147
2263
|
"name": "placeholder",
|
|
2148
2264
|
"type": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/multi-select-combo-box",
|
|
3
|
-
"version": "25.3.0-
|
|
3
|
+
"version": "25.3.0-rc1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -37,23 +37,23 @@
|
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
40
|
-
"@vaadin/a11y-base": "25.3.0-
|
|
41
|
-
"@vaadin/combo-box": "25.3.0-
|
|
42
|
-
"@vaadin/component-base": "25.3.0-
|
|
43
|
-
"@vaadin/field-base": "25.3.0-
|
|
44
|
-
"@vaadin/input-container": "25.3.0-
|
|
45
|
-
"@vaadin/item": "25.3.0-
|
|
46
|
-
"@vaadin/lit-renderer": "25.3.0-
|
|
47
|
-
"@vaadin/overlay": "25.3.0-
|
|
48
|
-
"@vaadin/vaadin-themable-mixin": "25.3.0-
|
|
40
|
+
"@vaadin/a11y-base": "25.3.0-rc1",
|
|
41
|
+
"@vaadin/combo-box": "25.3.0-rc1",
|
|
42
|
+
"@vaadin/component-base": "25.3.0-rc1",
|
|
43
|
+
"@vaadin/field-base": "25.3.0-rc1",
|
|
44
|
+
"@vaadin/input-container": "25.3.0-rc1",
|
|
45
|
+
"@vaadin/item": "25.3.0-rc1",
|
|
46
|
+
"@vaadin/lit-renderer": "25.3.0-rc1",
|
|
47
|
+
"@vaadin/overlay": "25.3.0-rc1",
|
|
48
|
+
"@vaadin/vaadin-themable-mixin": "25.3.0-rc1",
|
|
49
49
|
"lit": "^3.0.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@vaadin/aura": "25.3.0-
|
|
53
|
-
"@vaadin/chai-plugins": "25.3.0-
|
|
54
|
-
"@vaadin/test-runner-commands": "25.3.0-
|
|
52
|
+
"@vaadin/aura": "25.3.0-rc1",
|
|
53
|
+
"@vaadin/chai-plugins": "25.3.0-rc1",
|
|
54
|
+
"@vaadin/test-runner-commands": "25.3.0-rc1",
|
|
55
55
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
56
|
-
"@vaadin/vaadin-lumo-styles": "25.3.0-
|
|
56
|
+
"@vaadin/vaadin-lumo-styles": "25.3.0-rc1",
|
|
57
57
|
"sinon": "^22.0.0"
|
|
58
58
|
},
|
|
59
59
|
"customElements": "custom-elements.json",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"web-types.json",
|
|
62
62
|
"web-types.lit.json"
|
|
63
63
|
],
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "d4809590b2f61bd607e376ab3dec84f4bfb059a7"
|
|
65
65
|
}
|
|
@@ -38,7 +38,7 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
|
|
|
38
38
|
* @customElement vaadin-multi-select-combo-box-item
|
|
39
39
|
* @private
|
|
40
40
|
*/
|
|
41
|
-
|
|
41
|
+
class MultiSelectComboBoxItem extends ComboBoxItemMixin(
|
|
42
42
|
ThemableMixin(DirMixin(PolylitMixin(LumoInjectionMixin(LitElement)))),
|
|
43
43
|
) {
|
|
44
44
|
static get is() {
|
|
@@ -61,3 +61,5 @@ export class MultiSelectComboBoxItem extends ComboBoxItemMixin(
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
defineCustomElement(MultiSelectComboBoxItem);
|
|
64
|
+
|
|
65
|
+
export { MultiSelectComboBoxItem };
|
|
@@ -100,12 +100,6 @@ export declare class MultiSelectComboBoxMixinClass<TItem> {
|
|
|
100
100
|
*/
|
|
101
101
|
itemClassNameGenerator: (item: TItem) => string;
|
|
102
102
|
|
|
103
|
-
/**
|
|
104
|
-
* Path for the id of the item, used to detect whether the item is selected.
|
|
105
|
-
* @attr {string} item-id-path
|
|
106
|
-
*/
|
|
107
|
-
itemIdPath: string;
|
|
108
|
-
|
|
109
103
|
/**
|
|
110
104
|
* The object used to localize this component. To change the default
|
|
111
105
|
* localization, replace this with an object that provides all properties, or
|
|
@@ -177,12 +171,4 @@ export declare class MultiSelectComboBoxMixinClass<TItem> {
|
|
|
177
171
|
* Clears the selected items.
|
|
178
172
|
*/
|
|
179
173
|
clear(): void;
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* Requests an update for the content of items.
|
|
183
|
-
* While performing the update, it invokes the renderer (passed in the `renderer` property) once an item.
|
|
184
|
-
*
|
|
185
|
-
* It is not guaranteed that the update happens immediately (synchronously) after it is requested.
|
|
186
|
-
*/
|
|
187
|
-
requestContentUpdate(): void;
|
|
188
174
|
}
|
|
@@ -79,15 +79,6 @@ export const MultiSelectComboBoxMixin = (superClass) =>
|
|
|
79
79
|
sync: true,
|
|
80
80
|
},
|
|
81
81
|
|
|
82
|
-
/**
|
|
83
|
-
* Path for the id of the item, used to detect whether the item is selected.
|
|
84
|
-
* @attr {string} item-id-path
|
|
85
|
-
*/
|
|
86
|
-
itemIdPath: {
|
|
87
|
-
type: String,
|
|
88
|
-
sync: true,
|
|
89
|
-
},
|
|
90
|
-
|
|
91
82
|
/**
|
|
92
83
|
* When true, filter string isn't cleared after selecting an item.
|
|
93
84
|
*/
|
|
@@ -216,9 +207,7 @@ export const MultiSelectComboBoxMixin = (superClass) =>
|
|
|
216
207
|
static get observers() {
|
|
217
208
|
return [
|
|
218
209
|
'_selectedItemsChanged(selectedItems)',
|
|
219
|
-
'__openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)',
|
|
220
210
|
'__updateOverflowChip(_overflow, _overflowItems, disabled, readonly)',
|
|
221
|
-
'__updateScroller(opened, _dropdownItems, _focusedIndex, _theme)',
|
|
222
211
|
'__updateTopGroup(selectedItemsOnTop, selectedItems, opened)',
|
|
223
212
|
];
|
|
224
213
|
}
|
|
@@ -342,7 +331,7 @@ export const MultiSelectComboBoxMixin = (superClass) =>
|
|
|
342
331
|
updated(props) {
|
|
343
332
|
super.updated(props);
|
|
344
333
|
|
|
345
|
-
['loading', '
|
|
334
|
+
['loading', 'itemClassNameGenerator', 'renderer'].forEach((prop) => {
|
|
346
335
|
if (props.has(prop)) {
|
|
347
336
|
this._scroller[prop] = this[prop];
|
|
348
337
|
}
|
|
@@ -433,21 +422,18 @@ export const MultiSelectComboBoxMixin = (superClass) =>
|
|
|
433
422
|
}
|
|
434
423
|
|
|
435
424
|
/**
|
|
436
|
-
*
|
|
437
|
-
*
|
|
438
|
-
*
|
|
439
|
-
*
|
|
425
|
+
* Override method from `ComboBoxBaseMixin` to only open the dropdown
|
|
426
|
+
* when clicking on the label or the input field.
|
|
427
|
+
* @param {Event} event
|
|
428
|
+
* @protected
|
|
429
|
+
* @override
|
|
440
430
|
*/
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
return;
|
|
444
|
-
}
|
|
431
|
+
_onHostClick(event) {
|
|
432
|
+
const path = event.composedPath();
|
|
445
433
|
|
|
446
|
-
this.
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
item.requestContentUpdate();
|
|
450
|
-
});
|
|
434
|
+
if (path.includes(this._labelNode) || path.includes(this._inputField)) {
|
|
435
|
+
super._onHostClick(event);
|
|
436
|
+
}
|
|
451
437
|
}
|
|
452
438
|
|
|
453
439
|
/**
|
|
@@ -474,39 +460,15 @@ export const MultiSelectComboBoxMixin = (superClass) =>
|
|
|
474
460
|
}
|
|
475
461
|
}
|
|
476
462
|
|
|
477
|
-
/** @private */
|
|
478
|
-
__updateScroller(opened, items, focusedIndex, theme) {
|
|
479
|
-
if (opened) {
|
|
480
|
-
this._scroller.style.maxHeight =
|
|
481
|
-
getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`) || '65vh';
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
const isClosing = this.hasAttribute('closing');
|
|
485
|
-
|
|
486
|
-
this._scroller.setProperties({
|
|
487
|
-
items: opened || isClosing ? items : [],
|
|
488
|
-
opened,
|
|
489
|
-
focusedIndex,
|
|
490
|
-
theme,
|
|
491
|
-
});
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
/** @private */
|
|
495
|
-
__openedOrItemsChanged(opened, items, loading, keepOverlayOpened) {
|
|
496
|
-
// Close the overlay if there are no items to display.
|
|
497
|
-
// See https://github.com/vaadin/vaadin-combo-box/pull/964
|
|
498
|
-
this._overlayOpened = opened && (keepOverlayOpened || loading || !!items?.length);
|
|
499
|
-
}
|
|
500
|
-
|
|
501
463
|
/**
|
|
464
|
+
* Override method from `ComboBoxBaseMixin` to revert the input to the
|
|
465
|
+
* filter, as this component does not use `value` for the input text.
|
|
502
466
|
* @protected
|
|
467
|
+
* @override
|
|
503
468
|
*/
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
} else {
|
|
508
|
-
this.close();
|
|
509
|
-
}
|
|
469
|
+
_revertInputValue() {
|
|
470
|
+
this._inputElementValue = this.filter;
|
|
471
|
+
this._clearSelectionRange();
|
|
510
472
|
}
|
|
511
473
|
|
|
512
474
|
/**
|
|
@@ -537,6 +499,16 @@ export const MultiSelectComboBoxMixin = (superClass) =>
|
|
|
537
499
|
__commitUserInput() {
|
|
538
500
|
if (this._focusedIndex > -1) {
|
|
539
501
|
const focusedItem = this._dropdownItems[this._focusedIndex];
|
|
502
|
+
// Do not unselect an already selected item when it was focused by
|
|
503
|
+
// filtering, in which case the input value still equals the filter.
|
|
504
|
+
if (
|
|
505
|
+
this._lastFilter &&
|
|
506
|
+
this._lastFilter === this._inputElementValue &&
|
|
507
|
+
this._findIndex(focusedItem, this.selectedItems) !== -1
|
|
508
|
+
) {
|
|
509
|
+
this.__clearInternalValue();
|
|
510
|
+
return;
|
|
511
|
+
}
|
|
540
512
|
this.__selectItem(focusedItem);
|
|
541
513
|
} else if (this._inputElementValue) {
|
|
542
514
|
// Detect if input value doesn't match an existing item
|
|
@@ -574,7 +546,11 @@ export const MultiSelectComboBoxMixin = (superClass) =>
|
|
|
574
546
|
* @protected
|
|
575
547
|
*/
|
|
576
548
|
_setFocused(focused) {
|
|
577
|
-
|
|
549
|
+
// Do not validate, commit or close on internal blur triggered
|
|
550
|
+
// on overlay touch action needed to hide the virtual keyboard.
|
|
551
|
+
const blurred = !focused && !this._closeOnBlurIsPrevented;
|
|
552
|
+
|
|
553
|
+
if (blurred) {
|
|
578
554
|
this._ignoreCommitValue = true;
|
|
579
555
|
}
|
|
580
556
|
|
|
@@ -582,12 +558,12 @@ export const MultiSelectComboBoxMixin = (superClass) =>
|
|
|
582
558
|
|
|
583
559
|
// Do not validate when focusout is caused by document
|
|
584
560
|
// losing focus, which happens on browser tab switch.
|
|
585
|
-
if (
|
|
561
|
+
if (blurred && document.hasFocus()) {
|
|
586
562
|
this._focusedChipIndex = -1;
|
|
587
563
|
this._requestValidation();
|
|
588
564
|
}
|
|
589
565
|
|
|
590
|
-
if (
|
|
566
|
+
if (blurred && this.readonly) {
|
|
591
567
|
this.close();
|
|
592
568
|
}
|
|
593
569
|
}
|
|
@@ -691,67 +667,34 @@ export const MultiSelectComboBoxMixin = (superClass) =>
|
|
|
691
667
|
}
|
|
692
668
|
|
|
693
669
|
/**
|
|
694
|
-
* Override
|
|
695
|
-
* items
|
|
670
|
+
* Override method from `ComboBoxItemsMixin` to show only selected
|
|
671
|
+
* items when read-only, and to group selected items at the top
|
|
672
|
+
* of the overlay when `selectedItemsOnTop` is set.
|
|
696
673
|
*
|
|
697
674
|
* @protected
|
|
698
675
|
* @override
|
|
699
676
|
*/
|
|
700
677
|
_setDropdownItems(items) {
|
|
678
|
+
super._setDropdownItems(this.__generateDropdownItems(items));
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
/** @private */
|
|
682
|
+
__generateDropdownItems(items) {
|
|
701
683
|
if (this.readonly) {
|
|
702
|
-
this.
|
|
703
|
-
return;
|
|
684
|
+
return this.selectedItems;
|
|
704
685
|
}
|
|
705
686
|
|
|
706
687
|
if (this.filter || !this.selectedItemsOnTop) {
|
|
707
|
-
|
|
708
|
-
return;
|
|
688
|
+
return items;
|
|
709
689
|
}
|
|
710
690
|
|
|
711
691
|
if (items?.length && this._topGroup?.length) {
|
|
712
692
|
// Filter out items included to the top group.
|
|
713
|
-
const filteredItems = items.filter((item) => this._findIndex(item, this._topGroup
|
|
714
|
-
|
|
715
|
-
this.__setDropdownItems(this._topGroup.concat(filteredItems));
|
|
716
|
-
return;
|
|
717
|
-
}
|
|
718
|
-
|
|
719
|
-
this.__setDropdownItems(items);
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
/** @private */
|
|
723
|
-
__setDropdownItems(newItems) {
|
|
724
|
-
const oldItems = this._dropdownItems;
|
|
725
|
-
this._dropdownItems = newItems;
|
|
726
|
-
|
|
727
|
-
// Store the currently focused item if any. The focused index preserves
|
|
728
|
-
// in the case when more filtered items are loading but it is reset
|
|
729
|
-
// when the user types in a filter query.
|
|
730
|
-
const focusedItem = oldItems ? oldItems[this._focusedIndex] : null;
|
|
731
|
-
|
|
732
|
-
// When both the previously-focused entry and the new entry at the
|
|
733
|
-
// same index are placeholders (e.g. the Flow connector mid-scroll
|
|
734
|
-
// re-pushing `__setDropdownItems`), preserve `_focusedIndex` until
|
|
735
|
-
// a follow-up call lands a real item at that position.
|
|
736
|
-
if (
|
|
737
|
-
oldItems &&
|
|
738
|
-
oldItems[this._focusedIndex] instanceof ComboBoxPlaceholder &&
|
|
739
|
-
newItems[this._focusedIndex] instanceof ComboBoxPlaceholder
|
|
740
|
-
) {
|
|
741
|
-
return;
|
|
693
|
+
const filteredItems = items.filter((item) => this._findIndex(item, this._topGroup) === -1);
|
|
694
|
+
return this._topGroup.concat(filteredItems);
|
|
742
695
|
}
|
|
743
696
|
|
|
744
|
-
|
|
745
|
-
// if it is still present in the `newItems` array. Otherwise, set the focused index
|
|
746
|
-
// depending on the selected item or the filter query.
|
|
747
|
-
const focusedItemIndex = this.__getItemIndexByValue(newItems, this._getItemValue(focusedItem));
|
|
748
|
-
if (focusedItemIndex > -1) {
|
|
749
|
-
this._focusedIndex = focusedItemIndex;
|
|
750
|
-
} else {
|
|
751
|
-
// When the user filled in something that is different from the current value = filtering is enabled,
|
|
752
|
-
// set the focused index to the item that matches the filter query.
|
|
753
|
-
this._focusedIndex = this.__getItemIndexByLabel(newItems, this.filter);
|
|
754
|
-
}
|
|
697
|
+
return items;
|
|
755
698
|
}
|
|
756
699
|
|
|
757
700
|
/** @private */
|
|
@@ -760,17 +703,8 @@ export const MultiSelectComboBoxMixin = (superClass) =>
|
|
|
760
703
|
}
|
|
761
704
|
|
|
762
705
|
/** @private */
|
|
763
|
-
_findIndex(item,
|
|
764
|
-
|
|
765
|
-
for (let index = 0; index < selectedItems.length; index++) {
|
|
766
|
-
if (selectedItems[index] && selectedItems[index][itemIdPath] === item[itemIdPath]) {
|
|
767
|
-
return index;
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
return -1;
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
return selectedItems.indexOf(item);
|
|
706
|
+
_findIndex(item, items) {
|
|
707
|
+
return items.findIndex((other) => this._isSameItem(item, other));
|
|
774
708
|
}
|
|
775
709
|
|
|
776
710
|
/**
|
|
@@ -803,7 +737,7 @@ export const MultiSelectComboBoxMixin = (superClass) =>
|
|
|
803
737
|
/** @private */
|
|
804
738
|
__removeItem(item) {
|
|
805
739
|
const itemsCopy = [...this.selectedItems];
|
|
806
|
-
itemsCopy.splice(
|
|
740
|
+
itemsCopy.splice(this._findIndex(item, itemsCopy), 1);
|
|
807
741
|
this.__updateSelection(itemsCopy);
|
|
808
742
|
const itemLabel = this._getItemLabel(item);
|
|
809
743
|
this.__announceItem(itemLabel, false, itemsCopy.length);
|
|
@@ -813,7 +747,7 @@ export const MultiSelectComboBoxMixin = (superClass) =>
|
|
|
813
747
|
__selectItem(item) {
|
|
814
748
|
const itemsCopy = [...this.selectedItems];
|
|
815
749
|
|
|
816
|
-
const index = this._findIndex(item, itemsCopy
|
|
750
|
+
const index = this._findIndex(item, itemsCopy);
|
|
817
751
|
const itemLabel = this._getItemLabel(item);
|
|
818
752
|
|
|
819
753
|
let isSelected = false;
|
|
@@ -867,7 +801,7 @@ export const MultiSelectComboBoxMixin = (superClass) =>
|
|
|
867
801
|
return (
|
|
868
802
|
this._topGroup &&
|
|
869
803
|
this._topGroup.some((item) => {
|
|
870
|
-
const selectedItem = this.selectedItems[this._findIndex(item, this.selectedItems
|
|
804
|
+
const selectedItem = this.selectedItems[this._findIndex(item, this.selectedItems)];
|
|
871
805
|
return selectedItem && item !== selectedItem;
|
|
872
806
|
})
|
|
873
807
|
);
|
|
@@ -1062,19 +996,16 @@ export const MultiSelectComboBoxMixin = (superClass) =>
|
|
|
1062
996
|
}
|
|
1063
997
|
|
|
1064
998
|
/**
|
|
1065
|
-
* Override method from `
|
|
1066
|
-
*
|
|
999
|
+
* Override method from `ComboBoxItemsMixin` to stop
|
|
1000
|
+
* propagation of the clear button click event.
|
|
1067
1001
|
* @param {Event} event
|
|
1068
1002
|
* @protected
|
|
1003
|
+
* @override
|
|
1069
1004
|
*/
|
|
1070
1005
|
_onClearButtonClick(event) {
|
|
1071
1006
|
event.stopPropagation();
|
|
1072
1007
|
|
|
1073
1008
|
super._onClearButtonClick(event);
|
|
1074
|
-
|
|
1075
|
-
if (this.opened) {
|
|
1076
|
-
this.requestContentUpdate();
|
|
1077
|
-
}
|
|
1078
1009
|
}
|
|
1079
1010
|
|
|
1080
1011
|
/**
|
|
@@ -17,7 +17,7 @@ import { multiSelectComboBoxScrollerStyles } from './styles/vaadin-multi-select-
|
|
|
17
17
|
* @extends HTMLElement
|
|
18
18
|
* @private
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
class MultiSelectComboBoxScroller extends ComboBoxScrollerMixin(PolylitMixin(LitElement)) {
|
|
21
21
|
static get is() {
|
|
22
22
|
return 'vaadin-multi-select-combo-box-scroller';
|
|
23
23
|
}
|
|
@@ -43,10 +43,12 @@ export class MultiSelectComboBoxScroller extends ComboBoxScrollerMixin(PolylitMi
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
|
+
* Override method from `ComboBoxScrollerMixin` to check
|
|
47
|
+
* the item against the selected items of the owner.
|
|
46
48
|
* @protected
|
|
47
49
|
* @override
|
|
48
50
|
*/
|
|
49
|
-
_isItemSelected(item
|
|
51
|
+
_isItemSelected(item) {
|
|
50
52
|
if (item instanceof ComboBoxPlaceholder) {
|
|
51
53
|
return false;
|
|
52
54
|
}
|
|
@@ -55,7 +57,7 @@ export class MultiSelectComboBoxScroller extends ComboBoxScrollerMixin(PolylitMi
|
|
|
55
57
|
return false;
|
|
56
58
|
}
|
|
57
59
|
|
|
58
|
-
return this.owner.
|
|
60
|
+
return this.owner.selectedItems.some((selectedItem) => this.owner._isSameItem(item, selectedItem));
|
|
59
61
|
}
|
|
60
62
|
|
|
61
63
|
/**
|
|
@@ -72,3 +74,5 @@ export class MultiSelectComboBoxScroller extends ComboBoxScrollerMixin(PolylitMi
|
|
|
72
74
|
}
|
|
73
75
|
|
|
74
76
|
defineCustomElement(MultiSelectComboBoxScroller);
|
|
77
|
+
|
|
78
|
+
export { MultiSelectComboBoxScroller };
|
|
@@ -133,12 +133,59 @@ export interface MultiSelectComboBoxEventMap<TItem> extends HTMLElementEventMap
|
|
|
133
133
|
*
|
|
134
134
|
* The following custom CSS properties are available for styling:
|
|
135
135
|
*
|
|
136
|
-
* Custom property
|
|
137
|
-
*
|
|
138
|
-
* `--vaadin-
|
|
139
|
-
* `--vaadin-
|
|
140
|
-
* `--vaadin-
|
|
141
|
-
* `--vaadin-
|
|
136
|
+
* Custom CSS property |
|
|
137
|
+
* :-------------------------------------------------------|
|
|
138
|
+
* | `--vaadin-chip-background` |
|
|
139
|
+
* | `--vaadin-chip-border-color` |
|
|
140
|
+
* | `--vaadin-chip-border-radius` |
|
|
141
|
+
* | `--vaadin-chip-border-width` |
|
|
142
|
+
* | `--vaadin-chip-font-size` |
|
|
143
|
+
* | `--vaadin-chip-font-weight` |
|
|
144
|
+
* | `--vaadin-chip-gap` |
|
|
145
|
+
* | `--vaadin-chip-height` |
|
|
146
|
+
* | `--vaadin-chip-padding` |
|
|
147
|
+
* | `--vaadin-chip-remove-button-text-color` |
|
|
148
|
+
* | `--vaadin-chip-text-color` |
|
|
149
|
+
* | `--vaadin-field-default-width` |
|
|
150
|
+
* | `--vaadin-input-field-background` |
|
|
151
|
+
* | `--vaadin-input-field-border-color` |
|
|
152
|
+
* | `--vaadin-input-field-border-radius` |
|
|
153
|
+
* | `--vaadin-input-field-border-width` |
|
|
154
|
+
* | `--vaadin-input-field-bottom-end-radius` |
|
|
155
|
+
* | `--vaadin-input-field-bottom-start-radius` |
|
|
156
|
+
* | `--vaadin-input-field-button-text-color` |
|
|
157
|
+
* | `--vaadin-input-field-container-gap` |
|
|
158
|
+
* | `--vaadin-input-field-disabled-background` |
|
|
159
|
+
* | `--vaadin-input-field-disabled-text-color` |
|
|
160
|
+
* | `--vaadin-input-field-error-color` |
|
|
161
|
+
* | `--vaadin-input-field-error-font-size` |
|
|
162
|
+
* | `--vaadin-input-field-error-font-weight` |
|
|
163
|
+
* | `--vaadin-input-field-error-line-height` |
|
|
164
|
+
* | `--vaadin-input-field-gap` |
|
|
165
|
+
* | `--vaadin-input-field-helper-color` |
|
|
166
|
+
* | `--vaadin-input-field-helper-font-size` |
|
|
167
|
+
* | `--vaadin-input-field-helper-font-weight` |
|
|
168
|
+
* | `--vaadin-input-field-helper-line-height` |
|
|
169
|
+
* | `--vaadin-input-field-label-color` |
|
|
170
|
+
* | `--vaadin-input-field-label-font-size` |
|
|
171
|
+
* | `--vaadin-input-field-label-font-weight` |
|
|
172
|
+
* | `--vaadin-input-field-label-line-height` |
|
|
173
|
+
* | `--vaadin-input-field-padding` |
|
|
174
|
+
* | `--vaadin-input-field-placeholder-color` |
|
|
175
|
+
* | `--vaadin-input-field-required-indicator` |
|
|
176
|
+
* | `--vaadin-input-field-required-indicator-color` |
|
|
177
|
+
* | `--vaadin-input-field-top-end-radius` |
|
|
178
|
+
* | `--vaadin-input-field-top-start-radius` |
|
|
179
|
+
* | `--vaadin-input-field-value-color` |
|
|
180
|
+
* | `--vaadin-input-field-value-font-size` |
|
|
181
|
+
* | `--vaadin-input-field-value-font-weight` |
|
|
182
|
+
* | `--vaadin-input-field-value-line-height` |
|
|
183
|
+
* | `--vaadin-item-overlay-padding` |
|
|
184
|
+
* | `--vaadin-multi-select-combo-box-chip-min-width` |
|
|
185
|
+
* | `--vaadin-multi-select-combo-box-chips-gap` |
|
|
186
|
+
* | `--vaadin-multi-select-combo-box-input-min-width` |
|
|
187
|
+
* | `--vaadin-multi-select-combo-box-overlay-max-height` |
|
|
188
|
+
* | `--vaadin-multi-select-combo-box-overlay-width` |
|
|
142
189
|
*
|
|
143
190
|
* ### Internal components
|
|
144
191
|
*
|
|
@@ -71,12 +71,59 @@ import { MultiSelectComboBoxMixin } from './vaadin-multi-select-combo-box-mixin.
|
|
|
71
71
|
*
|
|
72
72
|
* The following custom CSS properties are available for styling:
|
|
73
73
|
*
|
|
74
|
-
* Custom property
|
|
75
|
-
*
|
|
76
|
-
* `--vaadin-
|
|
77
|
-
* `--vaadin-
|
|
78
|
-
* `--vaadin-
|
|
79
|
-
* `--vaadin-
|
|
74
|
+
* Custom CSS property |
|
|
75
|
+
* :-------------------------------------------------------|
|
|
76
|
+
* | `--vaadin-chip-background` |
|
|
77
|
+
* | `--vaadin-chip-border-color` |
|
|
78
|
+
* | `--vaadin-chip-border-radius` |
|
|
79
|
+
* | `--vaadin-chip-border-width` |
|
|
80
|
+
* | `--vaadin-chip-font-size` |
|
|
81
|
+
* | `--vaadin-chip-font-weight` |
|
|
82
|
+
* | `--vaadin-chip-gap` |
|
|
83
|
+
* | `--vaadin-chip-height` |
|
|
84
|
+
* | `--vaadin-chip-padding` |
|
|
85
|
+
* | `--vaadin-chip-remove-button-text-color` |
|
|
86
|
+
* | `--vaadin-chip-text-color` |
|
|
87
|
+
* | `--vaadin-field-default-width` |
|
|
88
|
+
* | `--vaadin-input-field-background` |
|
|
89
|
+
* | `--vaadin-input-field-border-color` |
|
|
90
|
+
* | `--vaadin-input-field-border-radius` |
|
|
91
|
+
* | `--vaadin-input-field-border-width` |
|
|
92
|
+
* | `--vaadin-input-field-bottom-end-radius` |
|
|
93
|
+
* | `--vaadin-input-field-bottom-start-radius` |
|
|
94
|
+
* | `--vaadin-input-field-button-text-color` |
|
|
95
|
+
* | `--vaadin-input-field-container-gap` |
|
|
96
|
+
* | `--vaadin-input-field-disabled-background` |
|
|
97
|
+
* | `--vaadin-input-field-disabled-text-color` |
|
|
98
|
+
* | `--vaadin-input-field-error-color` |
|
|
99
|
+
* | `--vaadin-input-field-error-font-size` |
|
|
100
|
+
* | `--vaadin-input-field-error-font-weight` |
|
|
101
|
+
* | `--vaadin-input-field-error-line-height` |
|
|
102
|
+
* | `--vaadin-input-field-gap` |
|
|
103
|
+
* | `--vaadin-input-field-helper-color` |
|
|
104
|
+
* | `--vaadin-input-field-helper-font-size` |
|
|
105
|
+
* | `--vaadin-input-field-helper-font-weight` |
|
|
106
|
+
* | `--vaadin-input-field-helper-line-height` |
|
|
107
|
+
* | `--vaadin-input-field-label-color` |
|
|
108
|
+
* | `--vaadin-input-field-label-font-size` |
|
|
109
|
+
* | `--vaadin-input-field-label-font-weight` |
|
|
110
|
+
* | `--vaadin-input-field-label-line-height` |
|
|
111
|
+
* | `--vaadin-input-field-padding` |
|
|
112
|
+
* | `--vaadin-input-field-placeholder-color` |
|
|
113
|
+
* | `--vaadin-input-field-required-indicator` |
|
|
114
|
+
* | `--vaadin-input-field-required-indicator-color` |
|
|
115
|
+
* | `--vaadin-input-field-top-end-radius` |
|
|
116
|
+
* | `--vaadin-input-field-top-start-radius` |
|
|
117
|
+
* | `--vaadin-input-field-value-color` |
|
|
118
|
+
* | `--vaadin-input-field-value-font-size` |
|
|
119
|
+
* | `--vaadin-input-field-value-font-weight` |
|
|
120
|
+
* | `--vaadin-input-field-value-line-height` |
|
|
121
|
+
* | `--vaadin-item-overlay-padding` |
|
|
122
|
+
* | `--vaadin-multi-select-combo-box-chip-min-width` |
|
|
123
|
+
* | `--vaadin-multi-select-combo-box-chips-gap` |
|
|
124
|
+
* | `--vaadin-multi-select-combo-box-input-min-width` |
|
|
125
|
+
* | `--vaadin-multi-select-combo-box-overlay-max-height` |
|
|
126
|
+
* | `--vaadin-multi-select-combo-box-overlay-width` |
|
|
80
127
|
*
|
|
81
128
|
* ### Internal components
|
|
82
129
|
*
|
package/web-types.json
CHANGED
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/multi-select-combo-box",
|
|
4
|
-
"version": "25.3.0-
|
|
4
|
+
"version": "25.3.0-rc1",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"elements": [
|
|
9
9
|
{
|
|
10
10
|
"name": "vaadin-multi-select-combo-box",
|
|
11
|
-
"description": "`<vaadin-multi-select-combo-box>` is a web component that wraps `<vaadin-combo-box>` and extends\nits functionality to allow selecting multiple items, in addition to basic features.\n\n```html\n<vaadin-multi-select-combo-box id=\"comboBox\"></vaadin-multi-select-combo-box>\n```\n```js\nconst comboBox = document.querySelector('#comboBox');\ncomboBox.items = ['apple', 'banana', 'lemon', 'orange'];\ncomboBox.selectedItems = ['lemon', 'orange'];\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n-----------------------|----------------\n`chips` | The element that wraps slotted chips for selected items\n`label` | The label element\n`input-field` | The element that wraps prefix, value and suffix\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 to a disabled element\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`loading` | Set when loading items from the data provider\n`opened` | Set when the dropdown is open\n`readonly` | Set to a readonly element\n\nThe following custom CSS properties are available for styling:\n\nCustom property
|
|
11
|
+
"description": "`<vaadin-multi-select-combo-box>` is a web component that wraps `<vaadin-combo-box>` and extends\nits functionality to allow selecting multiple items, in addition to basic features.\n\n```html\n<vaadin-multi-select-combo-box id=\"comboBox\"></vaadin-multi-select-combo-box>\n```\n```js\nconst comboBox = document.querySelector('#comboBox');\ncomboBox.items = ['apple', 'banana', 'lemon', 'orange'];\ncomboBox.selectedItems = ['lemon', 'orange'];\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n-----------------------|----------------\n`chips` | The element that wraps slotted chips for selected items\n`label` | The label element\n`input-field` | The element that wraps prefix, value and suffix\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 to a disabled element\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`loading` | Set when loading items from the data provider\n`opened` | Set when the dropdown is open\n`readonly` | Set to a readonly element\n\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:-------------------------------------------------------|\n| `--vaadin-chip-background` |\n| `--vaadin-chip-border-color` |\n| `--vaadin-chip-border-radius` |\n| `--vaadin-chip-border-width` |\n| `--vaadin-chip-font-size` |\n| `--vaadin-chip-font-weight` |\n| `--vaadin-chip-gap` |\n| `--vaadin-chip-height` |\n| `--vaadin-chip-padding` |\n| `--vaadin-chip-remove-button-text-color` |\n| `--vaadin-chip-text-color` |\n| `--vaadin-field-default-width` |\n| `--vaadin-input-field-background` |\n| `--vaadin-input-field-border-color` |\n| `--vaadin-input-field-border-radius` |\n| `--vaadin-input-field-border-width` |\n| `--vaadin-input-field-bottom-end-radius` |\n| `--vaadin-input-field-bottom-start-radius` |\n| `--vaadin-input-field-button-text-color` |\n| `--vaadin-input-field-container-gap` |\n| `--vaadin-input-field-disabled-background` |\n| `--vaadin-input-field-disabled-text-color` |\n| `--vaadin-input-field-error-color` |\n| `--vaadin-input-field-error-font-size` |\n| `--vaadin-input-field-error-font-weight` |\n| `--vaadin-input-field-error-line-height` |\n| `--vaadin-input-field-gap` |\n| `--vaadin-input-field-helper-color` |\n| `--vaadin-input-field-helper-font-size` |\n| `--vaadin-input-field-helper-font-weight` |\n| `--vaadin-input-field-helper-line-height` |\n| `--vaadin-input-field-label-color` |\n| `--vaadin-input-field-label-font-size` |\n| `--vaadin-input-field-label-font-weight` |\n| `--vaadin-input-field-label-line-height` |\n| `--vaadin-input-field-padding` |\n| `--vaadin-input-field-placeholder-color` |\n| `--vaadin-input-field-required-indicator` |\n| `--vaadin-input-field-required-indicator-color` |\n| `--vaadin-input-field-top-end-radius` |\n| `--vaadin-input-field-top-start-radius` |\n| `--vaadin-input-field-value-color` |\n| `--vaadin-input-field-value-font-size` |\n| `--vaadin-input-field-value-font-weight` |\n| `--vaadin-input-field-value-line-height` |\n| `--vaadin-item-overlay-padding` |\n| `--vaadin-multi-select-combo-box-chip-min-width` |\n| `--vaadin-multi-select-combo-box-chips-gap` |\n| `--vaadin-multi-select-combo-box-input-min-width` |\n| `--vaadin-multi-select-combo-box-overlay-max-height` |\n| `--vaadin-multi-select-combo-box-overlay-width` |\n\n### Internal components\n\nIn addition to `<vaadin-multi-select-combo-box>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-multi-select-combo-box-chip>`\n- `<vaadin-multi-select-combo-box-item>` - has the same API as `<vaadin-item>`.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
12
12
|
"attributes": [
|
|
13
|
+
{
|
|
14
|
+
"name": "accessible-description-ref",
|
|
15
|
+
"description": "A space-separated list of IDs referencing the elements that\ndescribe the component for screen reader users. The referenced\nelements are announced in addition to the helper text and\nthe error message.",
|
|
16
|
+
"value": {
|
|
17
|
+
"type": [
|
|
18
|
+
"string"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
13
22
|
{
|
|
14
23
|
"name": "accessible-name",
|
|
15
|
-
"description": "String used to label the component
|
|
24
|
+
"description": "String used to label the component for screen reader users.",
|
|
16
25
|
"value": {
|
|
17
26
|
"type": [
|
|
18
27
|
"string"
|
|
@@ -21,7 +30,7 @@
|
|
|
21
30
|
},
|
|
22
31
|
{
|
|
23
32
|
"name": "accessible-name-ref",
|
|
24
|
-
"description": "
|
|
33
|
+
"description": "A space-separated list of IDs referencing the elements that\nlabel the component for screen reader users.",
|
|
25
34
|
"value": {
|
|
26
35
|
"type": [
|
|
27
36
|
"string"
|
|
@@ -156,7 +165,7 @@
|
|
|
156
165
|
},
|
|
157
166
|
{
|
|
158
167
|
"name": "item-id-path",
|
|
159
|
-
"description": "Path for the id of the item
|
|
168
|
+
"description": "Path for the id of the item. If `items` is an array of objects,\nthe `itemIdPath` is used to compare and identify the same item\nin the selection and in `filteredItems` (items given by the\n`dataProvider` callback).",
|
|
160
169
|
"value": {
|
|
161
170
|
"type": [
|
|
162
171
|
"string"
|
|
@@ -244,6 +253,15 @@
|
|
|
244
253
|
]
|
|
245
254
|
}
|
|
246
255
|
},
|
|
256
|
+
{
|
|
257
|
+
"name": "partial-match-mode",
|
|
258
|
+
"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`.",
|
|
259
|
+
"value": {
|
|
260
|
+
"type": [
|
|
261
|
+
"string"
|
|
262
|
+
]
|
|
263
|
+
}
|
|
264
|
+
},
|
|
247
265
|
{
|
|
248
266
|
"name": "placeholder",
|
|
249
267
|
"description": "A hint to the user of what can be entered in the control.\nThe placeholder will be only displayed in the case when\nthere is no item selected.",
|
|
@@ -310,9 +328,18 @@
|
|
|
310
328
|
],
|
|
311
329
|
"js": {
|
|
312
330
|
"properties": [
|
|
331
|
+
{
|
|
332
|
+
"name": "accessibleDescriptionRef",
|
|
333
|
+
"description": "A space-separated list of IDs referencing the elements that\ndescribe the component for screen reader users. The referenced\nelements are announced in addition to the helper text and\nthe error message.",
|
|
334
|
+
"value": {
|
|
335
|
+
"type": [
|
|
336
|
+
"string"
|
|
337
|
+
]
|
|
338
|
+
}
|
|
339
|
+
},
|
|
313
340
|
{
|
|
314
341
|
"name": "accessibleName",
|
|
315
|
-
"description": "String used to label the component
|
|
342
|
+
"description": "String used to label the component for screen reader users.",
|
|
316
343
|
"value": {
|
|
317
344
|
"type": [
|
|
318
345
|
"string"
|
|
@@ -321,7 +348,7 @@
|
|
|
321
348
|
},
|
|
322
349
|
{
|
|
323
350
|
"name": "accessibleNameRef",
|
|
324
|
-
"description": "
|
|
351
|
+
"description": "A space-separated list of IDs referencing the elements that\nlabel the component for screen reader users.",
|
|
325
352
|
"value": {
|
|
326
353
|
"type": [
|
|
327
354
|
"string"
|
|
@@ -495,7 +522,7 @@
|
|
|
495
522
|
},
|
|
496
523
|
{
|
|
497
524
|
"name": "itemIdPath",
|
|
498
|
-
"description": "Path for the id of the item
|
|
525
|
+
"description": "Path for the id of the item. If `items` is an array of objects,\nthe `itemIdPath` is used to compare and identify the same item\nin the selection and in `filteredItems` (items given by the\n`dataProvider` callback).",
|
|
499
526
|
"value": {
|
|
500
527
|
"type": [
|
|
501
528
|
"string"
|
|
@@ -603,6 +630,15 @@
|
|
|
603
630
|
]
|
|
604
631
|
}
|
|
605
632
|
},
|
|
633
|
+
{
|
|
634
|
+
"name": "partialMatchMode",
|
|
635
|
+
"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`.",
|
|
636
|
+
"value": {
|
|
637
|
+
"type": [
|
|
638
|
+
"string"
|
|
639
|
+
]
|
|
640
|
+
}
|
|
641
|
+
},
|
|
606
642
|
{
|
|
607
643
|
"name": "placeholder",
|
|
608
644
|
"description": "A hint to the user of what can be entered in the control.\nThe placeholder will be only displayed in the case when\nthere is no item selected.",
|
package/web-types.lit.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/multi-select-combo-box",
|
|
4
|
-
"version": "25.3.0-
|
|
4
|
+
"version": "25.3.0-rc1",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -16,19 +16,26 @@
|
|
|
16
16
|
"elements": [
|
|
17
17
|
{
|
|
18
18
|
"name": "vaadin-multi-select-combo-box",
|
|
19
|
-
"description": "`<vaadin-multi-select-combo-box>` is a web component that wraps `<vaadin-combo-box>` and extends\nits functionality to allow selecting multiple items, in addition to basic features.\n\n```html\n<vaadin-multi-select-combo-box id=\"comboBox\"></vaadin-multi-select-combo-box>\n```\n```js\nconst comboBox = document.querySelector('#comboBox');\ncomboBox.items = ['apple', 'banana', 'lemon', 'orange'];\ncomboBox.selectedItems = ['lemon', 'orange'];\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n-----------------------|----------------\n`chips` | The element that wraps slotted chips for selected items\n`label` | The label element\n`input-field` | The element that wraps prefix, value and suffix\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 to a disabled element\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`loading` | Set when loading items from the data provider\n`opened` | Set when the dropdown is open\n`readonly` | Set to a readonly element\n\nThe following custom CSS properties are available for styling:\n\nCustom property
|
|
19
|
+
"description": "`<vaadin-multi-select-combo-box>` is a web component that wraps `<vaadin-combo-box>` and extends\nits functionality to allow selecting multiple items, in addition to basic features.\n\n```html\n<vaadin-multi-select-combo-box id=\"comboBox\"></vaadin-multi-select-combo-box>\n```\n```js\nconst comboBox = document.querySelector('#comboBox');\ncomboBox.items = ['apple', 'banana', 'lemon', 'orange'];\ncomboBox.selectedItems = ['lemon', 'orange'];\n```\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n-----------------------|----------------\n`chips` | The element that wraps slotted chips for selected items\n`label` | The label element\n`input-field` | The element that wraps prefix, value and suffix\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 to a disabled element\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`loading` | Set when loading items from the data provider\n`opened` | Set when the dropdown is open\n`readonly` | Set to a readonly element\n\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:-------------------------------------------------------|\n| `--vaadin-chip-background` |\n| `--vaadin-chip-border-color` |\n| `--vaadin-chip-border-radius` |\n| `--vaadin-chip-border-width` |\n| `--vaadin-chip-font-size` |\n| `--vaadin-chip-font-weight` |\n| `--vaadin-chip-gap` |\n| `--vaadin-chip-height` |\n| `--vaadin-chip-padding` |\n| `--vaadin-chip-remove-button-text-color` |\n| `--vaadin-chip-text-color` |\n| `--vaadin-field-default-width` |\n| `--vaadin-input-field-background` |\n| `--vaadin-input-field-border-color` |\n| `--vaadin-input-field-border-radius` |\n| `--vaadin-input-field-border-width` |\n| `--vaadin-input-field-bottom-end-radius` |\n| `--vaadin-input-field-bottom-start-radius` |\n| `--vaadin-input-field-button-text-color` |\n| `--vaadin-input-field-container-gap` |\n| `--vaadin-input-field-disabled-background` |\n| `--vaadin-input-field-disabled-text-color` |\n| `--vaadin-input-field-error-color` |\n| `--vaadin-input-field-error-font-size` |\n| `--vaadin-input-field-error-font-weight` |\n| `--vaadin-input-field-error-line-height` |\n| `--vaadin-input-field-gap` |\n| `--vaadin-input-field-helper-color` |\n| `--vaadin-input-field-helper-font-size` |\n| `--vaadin-input-field-helper-font-weight` |\n| `--vaadin-input-field-helper-line-height` |\n| `--vaadin-input-field-label-color` |\n| `--vaadin-input-field-label-font-size` |\n| `--vaadin-input-field-label-font-weight` |\n| `--vaadin-input-field-label-line-height` |\n| `--vaadin-input-field-padding` |\n| `--vaadin-input-field-placeholder-color` |\n| `--vaadin-input-field-required-indicator` |\n| `--vaadin-input-field-required-indicator-color` |\n| `--vaadin-input-field-top-end-radius` |\n| `--vaadin-input-field-top-start-radius` |\n| `--vaadin-input-field-value-color` |\n| `--vaadin-input-field-value-font-size` |\n| `--vaadin-input-field-value-font-weight` |\n| `--vaadin-input-field-value-line-height` |\n| `--vaadin-item-overlay-padding` |\n| `--vaadin-multi-select-combo-box-chip-min-width` |\n| `--vaadin-multi-select-combo-box-chips-gap` |\n| `--vaadin-multi-select-combo-box-input-min-width` |\n| `--vaadin-multi-select-combo-box-overlay-max-height` |\n| `--vaadin-multi-select-combo-box-overlay-width` |\n\n### Internal components\n\nIn addition to `<vaadin-multi-select-combo-box>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-multi-select-combo-box-chip>`\n- `<vaadin-multi-select-combo-box-item>` - has the same API as `<vaadin-item>`.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
20
20
|
"extension": true,
|
|
21
21
|
"attributes": [
|
|
22
|
+
{
|
|
23
|
+
"name": ".accessibleDescriptionRef",
|
|
24
|
+
"description": "A space-separated list of IDs referencing the elements that\ndescribe the component for screen reader users. The referenced\nelements are announced in addition to the helper text and\nthe error message.",
|
|
25
|
+
"value": {
|
|
26
|
+
"kind": "expression"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
22
29
|
{
|
|
23
30
|
"name": ".accessibleName",
|
|
24
|
-
"description": "String used to label the component
|
|
31
|
+
"description": "String used to label the component for screen reader users.",
|
|
25
32
|
"value": {
|
|
26
33
|
"kind": "expression"
|
|
27
34
|
}
|
|
28
35
|
},
|
|
29
36
|
{
|
|
30
37
|
"name": ".accessibleNameRef",
|
|
31
|
-
"description": "
|
|
38
|
+
"description": "A space-separated list of IDs referencing the elements that\nlabel the component for screen reader users.",
|
|
32
39
|
"value": {
|
|
33
40
|
"kind": "expression"
|
|
34
41
|
}
|
|
@@ -161,7 +168,7 @@
|
|
|
161
168
|
},
|
|
162
169
|
{
|
|
163
170
|
"name": ".itemIdPath",
|
|
164
|
-
"description": "Path for the id of the item
|
|
171
|
+
"description": "Path for the id of the item. If `items` is an array of objects,\nthe `itemIdPath` is used to compare and identify the same item\nin the selection and in `filteredItems` (items given by the\n`dataProvider` callback).",
|
|
165
172
|
"value": {
|
|
166
173
|
"kind": "expression"
|
|
167
174
|
}
|
|
@@ -243,6 +250,13 @@
|
|
|
243
250
|
"kind": "expression"
|
|
244
251
|
}
|
|
245
252
|
},
|
|
253
|
+
{
|
|
254
|
+
"name": ".partialMatchMode",
|
|
255
|
+
"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`.",
|
|
256
|
+
"value": {
|
|
257
|
+
"kind": "expression"
|
|
258
|
+
}
|
|
259
|
+
},
|
|
246
260
|
{
|
|
247
261
|
"name": ".placeholder",
|
|
248
262
|
"description": "A hint to the user of what can be entered in the control.\nThe placeholder will be only displayed in the case when\nthere is no item selected.",
|