@vaadin/multi-select-combo-box 23.2.0 → 23.2.1

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/README.md CHANGED
@@ -2,15 +2,19 @@
2
2
 
3
3
  A web component that wraps `<vaadin-combo-box>` and allows selecting multiple items.
4
4
 
5
+ [Documentation + Live Demo ↗](https://vaadin.com/docs/latest/components/multi-select-combo-box)
6
+
5
7
  ```html
6
- <vaadin-multi-select-combo-box id="fruit"></vaadin-multi-select-combo-box>
8
+ <vaadin-multi-select-combo-box style="width: 300px"></vaadin-multi-select-combo-box>
7
9
  <script>
8
- const comboBox = document.querySelector('#fruit');
10
+ const comboBox = document.querySelector('vaadin-multi-select-combo-box');
9
11
  comboBox.items = ['apple', 'banana', 'lemon', 'orange'];
10
- comboBox.selectedItems = ['lemon', 'orange'];
12
+ comboBox.selectedItems = ['apple', 'banana'];
11
13
  </script>
12
14
  ```
13
15
 
16
+ [<img src="https://raw.githubusercontent.com/vaadin/web-components/master/packages/multi-select-combo-box/screenshot.png" width="300" alt="Screenshot of vaadin-multi-select-combo-box">](https://vaadin.com/docs/latest/components/multi-select-combo-box)
17
+
14
18
  ## Installation
15
19
 
16
20
  Install the component:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/multi-select-combo-box",
3
- "version": "23.2.0",
3
+ "version": "23.2.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -37,14 +37,14 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "@polymer/polymer": "^3.0.0",
40
- "@vaadin/combo-box": "^23.2.0",
41
- "@vaadin/component-base": "^23.2.0",
42
- "@vaadin/field-base": "^23.2.0",
43
- "@vaadin/input-container": "^23.2.0",
44
- "@vaadin/lit-renderer": "^23.2.0",
45
- "@vaadin/vaadin-lumo-styles": "^23.2.0",
46
- "@vaadin/vaadin-material-styles": "^23.2.0",
47
- "@vaadin/vaadin-themable-mixin": "^23.2.0"
40
+ "@vaadin/combo-box": "~23.2.1",
41
+ "@vaadin/component-base": "~23.2.1",
42
+ "@vaadin/field-base": "~23.2.1",
43
+ "@vaadin/input-container": "~23.2.1",
44
+ "@vaadin/lit-renderer": "~23.2.1",
45
+ "@vaadin/vaadin-lumo-styles": "~23.2.1",
46
+ "@vaadin/vaadin-material-styles": "~23.2.1",
47
+ "@vaadin/vaadin-themable-mixin": "~23.2.1"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@esm-bundle/chai": "^4.3.4",
@@ -55,5 +55,5 @@
55
55
  "web-types.json",
56
56
  "web-types.lit.json"
57
57
  ],
58
- "gitHead": "8b1f5941f26ac41ca038e75e24c8584e331bc7a8"
58
+ "gitHead": "a6c314f6927bfd3309fc735eae6c6dc72ab8367a"
59
59
  }
@@ -21,6 +21,7 @@ import type { InputConstraintsMixinClass } from '@vaadin/field-base/src/input-co
21
21
  import type { InputControlMixinClass } from '@vaadin/field-base/src/input-control-mixin.js';
22
22
  import type { InputMixinClass } from '@vaadin/field-base/src/input-mixin.js';
23
23
  import type { LabelMixinClass } from '@vaadin/field-base/src/label-mixin.js';
24
+ import type { SlotStylesMixinClass } from '@vaadin/field-base/src/slot-styles-mixin.js';
24
25
  import type { ValidateMixinClass } from '@vaadin/field-base/src/validate-mixin.js';
25
26
  import type { ThemableMixinClass } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
26
27
  import type { ThemePropertyMixinClass } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js';
@@ -332,6 +333,7 @@ declare class MultiSelectComboBox<TItem = ComboBoxDefaultItem> extends HTMLEleme
332
333
 
333
334
  interface MultiSelectComboBox
334
335
  extends ValidateMixinClass,
336
+ SlotStylesMixinClass,
335
337
  LabelMixinClass,
336
338
  KeyboardMixinClass,
337
339
  Omit<InputMixinClass, 'value'>,
@@ -31,10 +31,6 @@ const multiSelectComboBox = css`
31
31
  align-items: center;
32
32
  }
33
33
 
34
- :host([has-value]) ::slotted(input:placeholder-shown) {
35
- color: transparent !important;
36
- }
37
-
38
34
  ::slotted(input) {
39
35
  box-sizing: border-box;
40
36
  flex: 1 0 var(--input-min-width);
@@ -473,6 +469,19 @@ class MultiSelectComboBox extends ResizeMixin(InputControlMixin(ThemableMixin(El
473
469
  return ['_selectedItemsChanged(selectedItems, selectedItems.*)'];
474
470
  }
475
471
 
472
+ /** @protected */
473
+ get slotStyles() {
474
+ const tag = this.localName;
475
+ return [
476
+ ...super.slotStyles,
477
+ `
478
+ ${tag}[has-value] input::placeholder {
479
+ color: transparent !important;
480
+ }
481
+ `,
482
+ ];
483
+ }
484
+
476
485
  /**
477
486
  * Used by `InputControlMixin` as a reference to the clear button element.
478
487
  * @protected
package/web-types.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": "23.2.0",
4
+ "version": "23.2.1",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -652,6 +652,14 @@
652
652
  {
653
653
  "name": "filter-changed",
654
654
  "description": "Fired when the `filter` property changes."
655
+ },
656
+ {
657
+ "name": "invalid-changed",
658
+ "description": "Fired when the `invalid` property changes."
659
+ },
660
+ {
661
+ "name": "selectedItems-changed",
662
+ "description": "Fired when the `selectedItems` property changes."
655
663
  }
656
664
  ]
657
665
  }
@@ -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": "23.2.0",
4
+ "version": "23.2.1",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -270,6 +270,20 @@
270
270
  "value": {
271
271
  "kind": "expression"
272
272
  }
273
+ },
274
+ {
275
+ "name": "@invalid-changed",
276
+ "description": "Fired when the `invalid` property changes.",
277
+ "value": {
278
+ "kind": "expression"
279
+ }
280
+ },
281
+ {
282
+ "name": "@selectedItems-changed",
283
+ "description": "Fired when the `selectedItems` property changes.",
284
+ "value": {
285
+ "kind": "expression"
286
+ }
273
287
  }
274
288
  ]
275
289
  }