@vaadin/multi-select-combo-box 25.0.0-alpha19 → 25.0.0-alpha20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +14 -14
- package/src/styles/vaadin-multi-select-combo-box-chip-base-styles.js +21 -8
- package/src/vaadin-multi-select-combo-box-container.js +1 -0
- package/src/vaadin-multi-select-combo-box.d.ts +1 -0
- package/src/vaadin-multi-select-combo-box.js +3 -2
- package/web-types.json +2 -2
- package/web-types.lit.json +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/multi-select-combo-box",
|
|
3
|
-
"version": "25.0.0-
|
|
3
|
+
"version": "25.0.0-alpha20",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,27 +36,27 @@
|
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
39
|
-
"@vaadin/a11y-base": "25.0.0-
|
|
40
|
-
"@vaadin/combo-box": "25.0.0-
|
|
41
|
-
"@vaadin/component-base": "25.0.0-
|
|
42
|
-
"@vaadin/field-base": "25.0.0-
|
|
43
|
-
"@vaadin/input-container": "25.0.0-
|
|
44
|
-
"@vaadin/item": "25.0.0-
|
|
45
|
-
"@vaadin/lit-renderer": "25.0.0-
|
|
46
|
-
"@vaadin/overlay": "25.0.0-
|
|
47
|
-
"@vaadin/vaadin-themable-mixin": "25.0.0-
|
|
39
|
+
"@vaadin/a11y-base": "25.0.0-alpha20",
|
|
40
|
+
"@vaadin/combo-box": "25.0.0-alpha20",
|
|
41
|
+
"@vaadin/component-base": "25.0.0-alpha20",
|
|
42
|
+
"@vaadin/field-base": "25.0.0-alpha20",
|
|
43
|
+
"@vaadin/input-container": "25.0.0-alpha20",
|
|
44
|
+
"@vaadin/item": "25.0.0-alpha20",
|
|
45
|
+
"@vaadin/lit-renderer": "25.0.0-alpha20",
|
|
46
|
+
"@vaadin/overlay": "25.0.0-alpha20",
|
|
47
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha20",
|
|
48
48
|
"lit": "^3.0.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
52
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
51
|
+
"@vaadin/chai-plugins": "25.0.0-alpha20",
|
|
52
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha20",
|
|
53
53
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
54
|
-
"@vaadin/vaadin-lumo-styles": "25.0.0-
|
|
54
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-alpha20",
|
|
55
55
|
"sinon": "^21.0.0"
|
|
56
56
|
},
|
|
57
57
|
"web-types": [
|
|
58
58
|
"web-types.json",
|
|
59
59
|
"web-types.lit.json"
|
|
60
60
|
],
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "c948aae591a30b432f3784000d4677674cae56e0"
|
|
62
62
|
}
|
|
@@ -13,17 +13,17 @@ export const multiSelectComboBoxChipStyles = css`
|
|
|
13
13
|
justify-content: center;
|
|
14
14
|
white-space: nowrap;
|
|
15
15
|
box-sizing: border-box;
|
|
16
|
-
gap: var(--vaadin-chip-gap,
|
|
16
|
+
gap: var(--vaadin-chip-gap, 0);
|
|
17
17
|
background: var(--vaadin-chip-background, var(--vaadin-background-container));
|
|
18
|
-
color: var(--vaadin-chip-color, var(--vaadin-color));
|
|
19
|
-
font-size: var(--vaadin-chip-font-size, 0.875em);
|
|
18
|
+
color: var(--vaadin-chip-color, var(--vaadin-text-color));
|
|
19
|
+
font-size: max(11px, var(--vaadin-chip-font-size, 0.875em));
|
|
20
20
|
font-weight: var(--vaadin-chip-font-weight, 500);
|
|
21
21
|
line-height: var(--vaadin-input-field-value-line-height, inherit);
|
|
22
22
|
padding: 0 var(--vaadin-chip-padding, 0.3em);
|
|
23
23
|
height: var(--vaadin-chip-height, calc(1lh / 0.875));
|
|
24
24
|
border-radius: var(--vaadin-chip-border-radius, var(--vaadin-radius-m));
|
|
25
25
|
border: var(--vaadin-chip-border-width, 1px) solid
|
|
26
|
-
var(--vaadin-chip-border-color, var(--vaadin-border-color-
|
|
26
|
+
var(--vaadin-chip-border-color, var(--vaadin-border-color-secondary));
|
|
27
27
|
cursor: default;
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -42,14 +42,17 @@ export const multiSelectComboBoxChipStyles = css`
|
|
|
42
42
|
[part='label'] {
|
|
43
43
|
overflow: hidden;
|
|
44
44
|
text-overflow: ellipsis;
|
|
45
|
+
margin-block: calc(var(--vaadin-chip-border-width, 1px) * -1);
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
[part='remove-button'] {
|
|
48
49
|
flex: none;
|
|
49
50
|
display: block;
|
|
50
|
-
margin-inline: auto
|
|
51
|
-
|
|
51
|
+
margin-inline-start: auto;
|
|
52
|
+
margin-block: calc(var(--vaadin-chip-border-width, 1px) * -1);
|
|
53
|
+
color: var(--vaadin-chip-remove-button-color, var(--vaadin-text-color-secondary));
|
|
52
54
|
cursor: var(--vaadin-clickable-cursor);
|
|
55
|
+
translate: 25%;
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
[part='remove-button']::before {
|
|
@@ -66,7 +69,7 @@ export const multiSelectComboBoxChipStyles = css`
|
|
|
66
69
|
}
|
|
67
70
|
|
|
68
71
|
:host([disabled]) [part='label'] {
|
|
69
|
-
--vaadin-chip-color: var(--vaadin-color-disabled);
|
|
72
|
+
--vaadin-chip-color: var(--vaadin-text-color-disabled);
|
|
70
73
|
}
|
|
71
74
|
|
|
72
75
|
:host([hidden]),
|
|
@@ -85,7 +88,7 @@ export const multiSelectComboBoxChipStyles = css`
|
|
|
85
88
|
content: '';
|
|
86
89
|
position: absolute;
|
|
87
90
|
inset: calc(var(--vaadin-chip-border-width, 1px) * -1);
|
|
88
|
-
border-inline-start: 2px solid var(--vaadin-chip-border-color, var(--vaadin-border-color-
|
|
91
|
+
border-inline-start: 2px solid var(--vaadin-chip-border-color, var(--vaadin-border-color-secondary));
|
|
89
92
|
border-radius: inherit;
|
|
90
93
|
}
|
|
91
94
|
|
|
@@ -110,4 +113,14 @@ export const multiSelectComboBoxChipStyles = css`
|
|
|
110
113
|
:host([count='1'])::after {
|
|
111
114
|
display: none;
|
|
112
115
|
}
|
|
116
|
+
|
|
117
|
+
@media (forced-colors: active) {
|
|
118
|
+
:host {
|
|
119
|
+
border: 1px solid !important;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
[part='remove-button']::before {
|
|
123
|
+
background: CanvasText;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
113
126
|
`;
|
|
@@ -104,6 +104,7 @@ export interface MultiSelectComboBoxEventMap<TItem> extends HTMLElementEventMap
|
|
|
104
104
|
* `chips` | The element that wraps slotted chips for selected items
|
|
105
105
|
* `label` | The label element
|
|
106
106
|
* `input-field` | The element that wraps prefix, value and suffix
|
|
107
|
+
* `field-button` | Set on both clear and toggle buttons
|
|
107
108
|
* `clear-button` | The clear button
|
|
108
109
|
* `error-message` | The error message element
|
|
109
110
|
* `helper-text` | The helper text element wrapper
|
|
@@ -42,6 +42,7 @@ import { MultiSelectComboBoxMixin } from './vaadin-multi-select-combo-box-mixin.
|
|
|
42
42
|
* `chips` | The element that wraps slotted chips for selected items
|
|
43
43
|
* `label` | The label element
|
|
44
44
|
* `input-field` | The element that wraps prefix, value and suffix
|
|
45
|
+
* `field-button` | Set on both clear and toggle buttons
|
|
45
46
|
* `clear-button` | The clear button
|
|
46
47
|
* `error-message` | The error message element
|
|
47
48
|
* `helper-text` | The helper text element wrapper
|
|
@@ -134,8 +135,8 @@ class MultiSelectComboBox extends MultiSelectComboBoxMixin(
|
|
|
134
135
|
<slot name="chip"></slot>
|
|
135
136
|
</div>
|
|
136
137
|
<slot name="input"></slot>
|
|
137
|
-
<div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
|
|
138
|
-
<div id="toggleButton" part="toggle-button" slot="suffix" aria-hidden="true"></div>
|
|
138
|
+
<div id="clearButton" part="field-button clear-button" slot="suffix" aria-hidden="true"></div>
|
|
139
|
+
<div id="toggleButton" part="field-button toggle-button" slot="suffix" aria-hidden="true"></div>
|
|
139
140
|
</vaadin-multi-select-combo-box-container>
|
|
140
141
|
|
|
141
142
|
<div part="helper-text">
|
package/web-types.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/multi-select-combo-box",
|
|
4
|
-
"version": "25.0.0-
|
|
4
|
+
"version": "25.0.0-alpha20",
|
|
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`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 | Description | Default\n-----------------------------------------------------|----------------------------|--------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n`--vaadin-multi-select-combo-box-overlay-width` | Width of the overlay | `auto`\n`--vaadin-multi-select-combo-box-overlay-max-height` | Max height of the overlay | `65vh`\n`--vaadin-multi-select-combo-box-input-min-width` | Min width of the input | `4em`\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.",
|
|
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 | Description | Default\n-----------------------------------------------------|----------------------------|--------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n`--vaadin-multi-select-combo-box-overlay-width` | Width of the overlay | `auto`\n`--vaadin-multi-select-combo-box-overlay-max-height` | Max height of the overlay | `65vh`\n`--vaadin-multi-select-combo-box-input-min-width` | Min width of the input | `4em`\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
13
|
{
|
|
14
14
|
"name": "page-size",
|
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.0.0-
|
|
4
|
+
"version": "25.0.0-alpha20",
|
|
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-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`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 | Description | Default\n-----------------------------------------------------|----------------------------|--------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n`--vaadin-multi-select-combo-box-overlay-width` | Width of the overlay | `auto`\n`--vaadin-multi-select-combo-box-overlay-max-height` | Max height of the overlay | `65vh`\n`--vaadin-multi-select-combo-box-input-min-width` | Min width of the input | `4em`\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.",
|
|
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 | Description | Default\n-----------------------------------------------------|----------------------------|--------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n`--vaadin-multi-select-combo-box-overlay-width` | Width of the overlay | `auto`\n`--vaadin-multi-select-combo-box-overlay-max-height` | Max height of the overlay | `65vh`\n`--vaadin-multi-select-combo-box-input-min-width` | Min width of the input | `4em`\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
22
|
{
|