@vaadin/multi-select-combo-box 23.1.6 → 23.1.8

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
@@ -4,15 +4,19 @@
4
4
 
5
5
  A web component that wraps `<vaadin-combo-box>` and allows selecting multiple items.
6
6
 
7
+ [Documentation + Live Demo ↗](https://vaadin.com/docs/latest/components/multi-select-combo-box)
8
+
7
9
  ```html
8
- <vaadin-multi-select-combo-box id="fruit"></vaadin-multi-select-combo-box>
10
+ <vaadin-multi-select-combo-box style="width: 300px"></vaadin-multi-select-combo-box>
9
11
  <script>
10
- const comboBox = document.querySelector('#fruit');
12
+ const comboBox = document.querySelector('vaadin-multi-select-combo-box');
11
13
  comboBox.items = ['apple', 'banana', 'lemon', 'orange'];
12
- comboBox.selectedItems = ['lemon', 'orange'];
14
+ comboBox.selectedItems = ['apple', 'banana'];
13
15
  </script>
14
16
  ```
15
17
 
18
+ [<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)
19
+
16
20
  ## Installation
17
21
 
18
22
  Install the component:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/multi-select-combo-box",
3
- "version": "23.1.6",
3
+ "version": "23.1.8",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -33,18 +33,18 @@
33
33
  ],
34
34
  "dependencies": {
35
35
  "@polymer/polymer": "^3.0.0",
36
- "@vaadin/combo-box": "^23.1.6",
37
- "@vaadin/component-base": "^23.1.6",
38
- "@vaadin/field-base": "^23.1.6",
39
- "@vaadin/input-container": "^23.1.6",
40
- "@vaadin/vaadin-lumo-styles": "^23.1.6",
41
- "@vaadin/vaadin-material-styles": "^23.1.6",
42
- "@vaadin/vaadin-themable-mixin": "^23.1.6"
36
+ "@vaadin/combo-box": "~23.1.8",
37
+ "@vaadin/component-base": "~23.1.8",
38
+ "@vaadin/field-base": "~23.1.8",
39
+ "@vaadin/input-container": "~23.1.8",
40
+ "@vaadin/vaadin-lumo-styles": "~23.1.8",
41
+ "@vaadin/vaadin-material-styles": "~23.1.8",
42
+ "@vaadin/vaadin-themable-mixin": "~23.1.8"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@esm-bundle/chai": "^4.3.4",
46
46
  "@vaadin/testing-helpers": "^0.3.2",
47
47
  "sinon": "^13.0.2"
48
48
  },
49
- "gitHead": "b356bcba208f6569d3d85ac11795c3e736adce85"
49
+ "gitHead": "297e4e51743751bed97f5400e661529a7d550870"
50
50
  }
@@ -21,6 +21,7 @@ import { InputConstraintsMixinClass } from '@vaadin/field-base/src/input-constra
21
21
  import { InputControlMixinClass } from '@vaadin/field-base/src/input-control-mixin.js';
22
22
  import { InputMixinClass } from '@vaadin/field-base/src/input-mixin.js';
23
23
  import { LabelMixinClass } from '@vaadin/field-base/src/label-mixin.js';
24
+ import { SlotStylesMixinClass } from '@vaadin/field-base/src/slot-styles-mixin.js';
24
25
  import { ValidateMixinClass } from '@vaadin/field-base/src/validate-mixin.js';
25
26
  import { ThemableMixinClass } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
26
27
 
@@ -322,6 +323,7 @@ declare class MultiSelectComboBox<TItem = ComboBoxDefaultItem> extends HTMLEleme
322
323
 
323
324
  interface MultiSelectComboBox
324
325
  extends ValidateMixinClass,
326
+ SlotStylesMixinClass,
325
327
  LabelMixinClass,
326
328
  KeyboardMixinClass,
327
329
  InputMixinClass,
@@ -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);
@@ -460,6 +456,19 @@ class MultiSelectComboBox extends ResizeMixin(InputControlMixin(ThemableMixin(El
460
456
  return ['_selectedItemsChanged(selectedItems, selectedItems.*)'];
461
457
  }
462
458
 
459
+ /** @protected */
460
+ get slotStyles() {
461
+ const tag = this.localName;
462
+ return [
463
+ ...super.slotStyles,
464
+ `
465
+ ${tag}[has-value] input::placeholder {
466
+ color: transparent !important;
467
+ }
468
+ `,
469
+ ];
470
+ }
471
+
463
472
  /**
464
473
  * Used by `InputControlMixin` as a reference to the clear button element.
465
474
  * @protected