@vaadin/multi-select-combo-box 23.1.0-alpha3 → 23.1.0-beta2

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.
@@ -22,7 +22,16 @@ const chip = css`
22
22
  cursor: var(--lumo-clickable-cursor);
23
23
  }
24
24
 
25
- :host(:not([part~='overflow'])) {
25
+ :host([focused]) {
26
+ background-color: var(--lumo-primary-color);
27
+ color: var(--lumo-primary-contrast-color);
28
+ }
29
+
30
+ :host([focused]) [part='remove-button'] {
31
+ color: inherit;
32
+ }
33
+
34
+ :host(:not([part~='overflow']):not([readonly]):not([disabled])) {
26
35
  padding-inline-end: 0;
27
36
  }
28
37
 
@@ -36,19 +45,19 @@ const chip = css`
36
45
  :host([part~='overflow'])::after {
37
46
  position: absolute;
38
47
  content: '';
39
- width: 3px;
40
- height: calc(1.875em - 1px);
41
- border-left: 2px solid;
42
- border-radius: 4px 0 0 4px;
48
+ width: 100%;
49
+ height: 100%;
50
+ border-left: calc(var(--lumo-space-s) / 4) solid;
51
+ border-radius: var(--lumo-border-radius-s);
43
52
  border-color: var(--lumo-contrast-30pct);
44
53
  }
45
54
 
46
55
  :host([part~='overflow'])::before {
47
- left: -4px;
56
+ left: calc(-1 * var(--lumo-space-s) / 2);
48
57
  }
49
58
 
50
59
  :host([part~='overflow'])::after {
51
- left: -8px;
60
+ left: calc(-1 * var(--lumo-space-s));
52
61
  }
53
62
 
54
63
  :host([part~='overflow-two']) {
@@ -79,16 +88,18 @@ const chip = css`
79
88
  justify-content: center;
80
89
  margin-top: -0.3125em;
81
90
  margin-bottom: -0.3125em;
91
+ margin-inline-start: auto;
82
92
  width: 1.25em;
83
93
  height: 1.25em;
84
94
  font-size: 1.5em;
95
+ transition: none;
85
96
  }
86
97
 
87
98
  [part='remove-button']::before {
88
99
  content: var(--lumo-icons-cross);
89
100
  }
90
101
 
91
- :host([disabled]) [part] {
102
+ :host([disabled]) [part='label'] {
92
103
  color: var(--lumo-disabled-text-color);
93
104
  -webkit-text-fill-color: var(--lumo-disabled-text-color);
94
105
  pointer-events: none;
@@ -96,5 +107,5 @@ const chip = css`
96
107
  `;
97
108
 
98
109
  registerStyles('vaadin-multi-select-combo-box-chip', [fieldButton, chip], {
99
- moduleId: 'lumo-multi-select-combo-box-chip'
110
+ moduleId: 'lumo-multi-select-combo-box-chip',
100
111
  });
@@ -10,24 +10,48 @@ import '@vaadin/vaadin-lumo-styles/typography.js';
10
10
  import { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';
11
11
  import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
12
12
 
13
+ registerStyles(
14
+ 'vaadin-multi-select-combo-box-item',
15
+ css`
16
+ @media (any-hover: hover) {
17
+ :host(:hover[readonly]) {
18
+ background-color: transparent;
19
+ cursor: default;
20
+ }
21
+ }
22
+ `,
23
+ {
24
+ moduleId: 'lumo-multi-select-combo-box-item',
25
+ },
26
+ );
27
+
13
28
  const multiSelectComboBox = css`
14
29
  :host([has-value]) {
15
30
  padding-inline-start: 0;
16
31
  }
17
32
 
18
- :host([readonly]) [part~='chip'] {
19
- opacity: 0.7;
33
+ :host([has-value]) ::slotted(input:placeholder-shown) {
34
+ caret-color: var(--lumo-body-text-color) !important;
20
35
  }
21
36
 
22
37
  [part~='chip']:not(:last-of-type) {
23
38
  margin-inline-end: var(--lumo-space-xs);
24
39
  }
25
40
 
41
+ [part~='overflow']:not([hidden]) + :not(:empty) {
42
+ margin-inline-start: var(--lumo-space-xs);
43
+ }
44
+
26
45
  [part='toggle-button']::before {
27
46
  content: var(--lumo-icons-dropdown);
28
47
  }
48
+
49
+ :host([readonly][has-value]) [part='toggle-button'] {
50
+ color: var(--lumo-contrast-60pct);
51
+ cursor: var(--lumo-clickable-cursor);
52
+ }
29
53
  `;
30
54
 
31
55
  registerStyles('vaadin-multi-select-combo-box', [inputFieldShared, multiSelectComboBox], {
32
- moduleId: 'lumo-multi-select-combo-box'
56
+ moduleId: 'lumo-multi-select-combo-box',
33
57
  });
@@ -13,36 +13,43 @@ const chip = css`
13
13
  :host {
14
14
  height: 1.25rem;
15
15
  margin-inline-end: 0.25rem;
16
- padding-inline-start: 0.5rem;
16
+ padding: 0 0.5rem;
17
17
  border-radius: 4px;
18
- background-color: hsla(214, 53%, 23%, 0.1);
18
+ background-color: rgba(0, 0, 0, 0.08);
19
19
  cursor: default;
20
20
  font-family: var(--material-font-family);
21
21
  }
22
22
 
23
+ :host([focused]) {
24
+ background-color: rgba(0, 0, 0, 0.16);
25
+ }
26
+
27
+ :host(:not([part~='overflow']):not([readonly]):not([disabled])) {
28
+ padding-inline-end: 0;
29
+ }
30
+
23
31
  :host([part~='overflow']) {
24
32
  position: relative;
25
33
  margin-inline-start: 0.5rem;
26
- padding-inline-end: 0.5rem;
27
34
  }
28
35
 
29
36
  :host([part~='overflow'])::before,
30
37
  :host([part~='overflow'])::after {
31
38
  position: absolute;
32
39
  content: '';
33
- width: 3px;
34
- height: 20px;
35
- border-left: 2px solid;
36
- border-radius: 4px 0 0 4px;
37
- border-color: hsla(214, 53%, 23%, 0.1);
40
+ width: 100%;
41
+ height: 100%;
42
+ border-left: 0.125rem solid;
43
+ border-radius: 0.25rem;
44
+ border-color: rgba(0, 0, 0, 0.08);
38
45
  }
39
46
 
40
47
  :host([part~='overflow'])::before {
41
- left: -4px;
48
+ left: -0.25rem;
42
49
  }
43
50
 
44
51
  :host([part~='overflow'])::after {
45
- left: -8px;
52
+ left: -0.5rem;
46
53
  }
47
54
 
48
55
  :host([part~='overflow-two']) {
@@ -76,6 +83,7 @@ const chip = css`
76
83
  box-sizing: border-box;
77
84
  width: 20px;
78
85
  height: 20px;
86
+ margin-inline-start: auto;
79
87
  line-height: 20px;
80
88
  padding: 0;
81
89
  font-size: 0.75em;
@@ -85,22 +93,13 @@ const chip = css`
85
93
  content: var(--material-icons-clear);
86
94
  }
87
95
 
88
- /* Disabled */
89
- :host([disabled]) [part] {
90
- pointer-events: none;
91
- }
92
-
93
96
  :host([disabled]) [part='label'] {
94
97
  color: var(--material-disabled-text-color);
95
98
  -webkit-text-fill-color: var(--material-disabled-text-color);
96
- }
97
-
98
- :host([disabled]) [part='remove-button'] {
99
- color: hsla(0, 0%, 100%, 0.75);
100
- -webkit-text-fill-color: hsla(0, 0%, 100%, 0.75);
99
+ pointer-events: none;
101
100
  }
102
101
  `;
103
102
 
104
103
  registerStyles('vaadin-multi-select-combo-box-chip', [fieldButton, chip], {
105
- moduleId: 'material-multi-select-combo-box-chip'
104
+ moduleId: 'material-multi-select-combo-box-chip',
106
105
  });
@@ -9,9 +9,24 @@ import '@vaadin/vaadin-material-styles/typography.js';
9
9
  import { inputFieldShared } from '@vaadin/vaadin-material-styles/mixins/input-field-shared.js';
10
10
  import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
11
11
 
12
+ registerStyles(
13
+ 'vaadin-multi-select-combo-box-item',
14
+ css`
15
+ @media (any-hover: hover) {
16
+ :host(:hover[readonly]) {
17
+ background-color: transparent;
18
+ cursor: default;
19
+ }
20
+ }
21
+ `,
22
+ {
23
+ moduleId: 'material-multi-select-combo-box-item',
24
+ },
25
+ );
26
+
12
27
  const multiSelectComboBox = css`
13
- :host([readonly]) [part~='chip'] {
14
- opacity: 0.5;
28
+ :host([has-value]) ::slotted(input:placeholder-shown) {
29
+ caret-color: var(--material-body-text-color) !important;
15
30
  }
16
31
 
17
32
  [part='input-field'] {
@@ -30,8 +45,12 @@ const multiSelectComboBox = css`
30
45
  :host([opened]) [part='toggle-button'] {
31
46
  transform: rotate(180deg);
32
47
  }
48
+
49
+ :host([readonly][has-value]) [part='toggle-button'] {
50
+ color: var(--material-secondary-text-color);
51
+ }
33
52
  `;
34
53
 
35
54
  registerStyles('vaadin-multi-select-combo-box', [inputFieldShared, multiSelectComboBox], {
36
- moduleId: 'material-multi-select-combo-box'
55
+ moduleId: 'material-multi-select-combo-box',
37
56
  });