@vaadin/multi-select-combo-box 25.0.0-alpha9 → 25.0.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.
- package/package.json +15 -18
- package/src/styles/vaadin-multi-select-combo-box-base-styles.js +1 -1
- package/src/styles/vaadin-multi-select-combo-box-chip-base-styles.js +23 -9
- package/src/vaadin-multi-select-combo-box-chip.js +1 -1
- package/src/vaadin-multi-select-combo-box-container.js +1 -0
- package/src/vaadin-multi-select-combo-box-item.js +1 -1
- package/src/vaadin-multi-select-combo-box-mixin.d.ts +11 -11
- package/src/vaadin-multi-select-combo-box-mixin.js +48 -43
- package/src/vaadin-multi-select-combo-box-overlay.js +2 -2
- package/src/vaadin-multi-select-combo-box-scroller.js +1 -1
- package/src/vaadin-multi-select-combo-box.d.ts +2 -2
- package/src/vaadin-multi-select-combo-box.js +5 -3
- package/vaadin-multi-select-combo-box.js +1 -1
- package/web-types.json +31 -33
- package/web-types.lit.json +16 -16
- package/src/styles/vaadin-multi-select-combo-box-chip-core-styles.js +0 -33
- package/src/styles/vaadin-multi-select-combo-box-core-styles.d.ts +0 -8
- package/src/styles/vaadin-multi-select-combo-box-core-styles.js +0 -51
- package/src/styles/vaadin-multi-select-combo-box-overlay-core-styles.js +0 -21
- package/src/styles/vaadin-multi-select-combo-box-scroller-core-styles.js +0 -27
- package/theme/lumo/vaadin-multi-select-combo-box-chip-styles.d.ts +0 -10
- package/theme/lumo/vaadin-multi-select-combo-box-chip-styles.js +0 -107
- package/theme/lumo/vaadin-multi-select-combo-box-styles.d.ts +0 -10
- package/theme/lumo/vaadin-multi-select-combo-box-styles.js +0 -121
- package/theme/lumo/vaadin-multi-select-combo-box.d.ts +0 -8
- package/theme/lumo/vaadin-multi-select-combo-box.js +0 -8
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-beta2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -23,9 +23,6 @@
|
|
|
23
23
|
"lit.d.ts",
|
|
24
24
|
"lit.js",
|
|
25
25
|
"src",
|
|
26
|
-
"!src/styles/*-base-styles.d.ts",
|
|
27
|
-
"!src/styles/*-base-styles.js",
|
|
28
|
-
"theme",
|
|
29
26
|
"vaadin-*.d.ts",
|
|
30
27
|
"vaadin-*.js",
|
|
31
28
|
"web-types.json",
|
|
@@ -39,27 +36,27 @@
|
|
|
39
36
|
],
|
|
40
37
|
"dependencies": {
|
|
41
38
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
42
|
-
"@vaadin/a11y-base": "25.0.0-
|
|
43
|
-
"@vaadin/combo-box": "25.0.0-
|
|
44
|
-
"@vaadin/component-base": "25.0.0-
|
|
45
|
-
"@vaadin/field-base": "25.0.0-
|
|
46
|
-
"@vaadin/input-container": "25.0.0-
|
|
47
|
-
"@vaadin/item": "25.0.0-
|
|
48
|
-
"@vaadin/lit-renderer": "25.0.0-
|
|
49
|
-
"@vaadin/overlay": "25.0.0-
|
|
50
|
-
"@vaadin/vaadin-
|
|
51
|
-
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha9",
|
|
39
|
+
"@vaadin/a11y-base": "25.0.0-beta2",
|
|
40
|
+
"@vaadin/combo-box": "25.0.0-beta2",
|
|
41
|
+
"@vaadin/component-base": "25.0.0-beta2",
|
|
42
|
+
"@vaadin/field-base": "25.0.0-beta2",
|
|
43
|
+
"@vaadin/input-container": "25.0.0-beta2",
|
|
44
|
+
"@vaadin/item": "25.0.0-beta2",
|
|
45
|
+
"@vaadin/lit-renderer": "25.0.0-beta2",
|
|
46
|
+
"@vaadin/overlay": "25.0.0-beta2",
|
|
47
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-beta2",
|
|
52
48
|
"lit": "^3.0.0"
|
|
53
49
|
},
|
|
54
50
|
"devDependencies": {
|
|
55
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
56
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
51
|
+
"@vaadin/chai-plugins": "25.0.0-beta2",
|
|
52
|
+
"@vaadin/test-runner-commands": "25.0.0-beta2",
|
|
57
53
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
58
|
-
"
|
|
54
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-beta2",
|
|
55
|
+
"sinon": "^21.0.0"
|
|
59
56
|
},
|
|
60
57
|
"web-types": [
|
|
61
58
|
"web-types.json",
|
|
62
59
|
"web-types.lit.json"
|
|
63
60
|
],
|
|
64
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "e078f8371ae266f05c7ca1ec25686cc489c83f24"
|
|
65
62
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import '@vaadin/component-base/src/style-props.js';
|
|
6
|
+
import '@vaadin/component-base/src/styles/style-props.js';
|
|
7
7
|
import { css } from 'lit';
|
|
8
8
|
import { comboBoxStyles } from '@vaadin/combo-box/src/styles/vaadin-combo-box-base-styles.js';
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import '@vaadin/component-base/src/style-props.js';
|
|
6
|
+
import '@vaadin/component-base/src/styles/style-props.js';
|
|
7
7
|
import { css } from 'lit';
|
|
8
8
|
|
|
9
9
|
export const multiSelectComboBoxChipStyles = css`
|
|
@@ -13,16 +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-text-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
|
-
border: var(--vaadin-chip-border-width, 1px) solid
|
|
25
|
+
border: var(--vaadin-chip-border-width, 1px) solid
|
|
26
|
+
var(--vaadin-chip-border-color, var(--vaadin-border-color-secondary));
|
|
26
27
|
cursor: default;
|
|
27
28
|
}
|
|
28
29
|
|
|
@@ -41,14 +42,17 @@ export const multiSelectComboBoxChipStyles = css`
|
|
|
41
42
|
[part='label'] {
|
|
42
43
|
overflow: hidden;
|
|
43
44
|
text-overflow: ellipsis;
|
|
45
|
+
margin-block: calc(var(--vaadin-chip-border-width, 1px) * -1);
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
[part='remove-button'] {
|
|
47
49
|
flex: none;
|
|
48
50
|
display: block;
|
|
49
|
-
margin-inline: auto
|
|
50
|
-
|
|
51
|
+
margin-inline-start: auto;
|
|
52
|
+
margin-block: calc(var(--vaadin-chip-border-width, 1px) * -1);
|
|
53
|
+
color: var(--vaadin-chip-remove-button-text-color, var(--vaadin-text-color-secondary));
|
|
51
54
|
cursor: var(--vaadin-clickable-cursor);
|
|
55
|
+
translate: 25%;
|
|
52
56
|
}
|
|
53
57
|
|
|
54
58
|
[part='remove-button']::before {
|
|
@@ -65,7 +69,7 @@ export const multiSelectComboBoxChipStyles = css`
|
|
|
65
69
|
}
|
|
66
70
|
|
|
67
71
|
:host([disabled]) [part='label'] {
|
|
68
|
-
--vaadin-chip-color: var(--vaadin-color-disabled);
|
|
72
|
+
--vaadin-chip-text-color: var(--vaadin-text-color-disabled);
|
|
69
73
|
}
|
|
70
74
|
|
|
71
75
|
:host([hidden]),
|
|
@@ -84,7 +88,7 @@ export const multiSelectComboBoxChipStyles = css`
|
|
|
84
88
|
content: '';
|
|
85
89
|
position: absolute;
|
|
86
90
|
inset: calc(var(--vaadin-chip-border-width, 1px) * -1);
|
|
87
|
-
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));
|
|
88
92
|
border-radius: inherit;
|
|
89
93
|
}
|
|
90
94
|
|
|
@@ -109,4 +113,14 @@ export const multiSelectComboBoxChipStyles = css`
|
|
|
109
113
|
:host([count='1'])::after {
|
|
110
114
|
display: none;
|
|
111
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
|
+
}
|
|
112
126
|
`;
|
|
@@ -8,7 +8,7 @@ import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
|
8
8
|
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
9
9
|
import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
|
|
10
10
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
11
|
-
import { multiSelectComboBoxChipStyles } from './styles/vaadin-multi-select-combo-box-chip-
|
|
11
|
+
import { multiSelectComboBoxChipStyles } from './styles/vaadin-multi-select-combo-box-chip-base-styles.js';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* An element used by `<vaadin-multi-select-combo-box>` to display selected items.
|
|
@@ -8,7 +8,7 @@ import { ComboBoxItemMixin } from '@vaadin/combo-box/src/vaadin-combo-box-item-m
|
|
|
8
8
|
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
9
9
|
import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
|
|
10
10
|
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
11
|
-
import { itemStyles } from '@vaadin/item/src/styles/vaadin-item-
|
|
11
|
+
import { itemStyles } from '@vaadin/item/src/styles/vaadin-item-base-styles.js';
|
|
12
12
|
import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
|
|
13
13
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
14
14
|
|
|
@@ -13,7 +13,7 @@ import type { ComboBoxBaseMixinClass } from '@vaadin/combo-box/src/vaadin-combo-
|
|
|
13
13
|
import type { ComboBoxDataProviderMixinClass } from '@vaadin/combo-box/src/vaadin-combo-box-data-provider-mixin.js';
|
|
14
14
|
import type { ComboBoxItemsMixinClass } from '@vaadin/combo-box/src/vaadin-combo-box-items-mixin.js';
|
|
15
15
|
import type { DelegateStateMixinClass } from '@vaadin/component-base/src/delegate-state-mixin.js';
|
|
16
|
-
import type {
|
|
16
|
+
import type { I18nMixinClass } from '@vaadin/component-base/src/i18n-mixin.js';
|
|
17
17
|
import type { ResizeMixinClass } from '@vaadin/component-base/src/resize-mixin.js';
|
|
18
18
|
import type { SlotStylesMixinClass } from '@vaadin/component-base/src/slot-styles-mixin.js';
|
|
19
19
|
import type { ClearButtonMixinClass } from '@vaadin/field-base/src/clear-button-mixin.js';
|
|
@@ -32,11 +32,11 @@ export type MultiSelectComboBoxRenderer<TItem> = (
|
|
|
32
32
|
) => void;
|
|
33
33
|
|
|
34
34
|
export interface MultiSelectComboBoxI18n {
|
|
35
|
-
cleared
|
|
36
|
-
focused
|
|
37
|
-
selected
|
|
38
|
-
deselected
|
|
39
|
-
total
|
|
35
|
+
cleared?: string;
|
|
36
|
+
focused?: string;
|
|
37
|
+
selected?: string;
|
|
38
|
+
deselected?: string;
|
|
39
|
+
total?: string;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
export declare function MultiSelectComboBoxMixin<TItem, T extends Constructor<HTMLElement>>(
|
|
@@ -50,13 +50,13 @@ export declare function MultiSelectComboBoxMixin<TItem, T extends Constructor<HT
|
|
|
50
50
|
Constructor<DisabledMixinClass> &
|
|
51
51
|
Constructor<FieldMixinClass> &
|
|
52
52
|
Constructor<FocusMixinClass> &
|
|
53
|
+
Constructor<I18nMixinClass<MultiSelectComboBoxI18n>> &
|
|
53
54
|
Constructor<InputConstraintsMixinClass> &
|
|
54
55
|
Constructor<InputControlMixinClass> &
|
|
55
56
|
Constructor<InputMixinClass> &
|
|
56
57
|
Constructor<KeyboardMixinClass> &
|
|
57
58
|
Constructor<LabelMixinClass> &
|
|
58
59
|
Constructor<MultiSelectComboBoxMixinClass<TItem>> &
|
|
59
|
-
Constructor<OverlayClassMixinClass> &
|
|
60
60
|
Constructor<ResizeMixinClass> &
|
|
61
61
|
Constructor<SlotStylesMixinClass> &
|
|
62
62
|
Constructor<ValidateMixinClass> &
|
|
@@ -99,12 +99,12 @@ export declare class MultiSelectComboBoxMixinClass<TItem> {
|
|
|
99
99
|
itemIdPath: string;
|
|
100
100
|
|
|
101
101
|
/**
|
|
102
|
-
* The object used to localize this component.
|
|
103
|
-
*
|
|
104
|
-
*
|
|
102
|
+
* The object used to localize this component. To change the default
|
|
103
|
+
* localization, replace this with an object that provides all properties, or
|
|
104
|
+
* just the individual properties you want to change.
|
|
105
105
|
*
|
|
106
106
|
* The object has the following JSON structure and default values:
|
|
107
|
-
* ```
|
|
107
|
+
* ```js
|
|
108
108
|
* {
|
|
109
109
|
* // Screen reader announcement on clear button click.
|
|
110
110
|
* cleared: 'Selection cleared',
|
|
@@ -7,6 +7,7 @@ import { announce } from '@vaadin/a11y-base/src/announce.js';
|
|
|
7
7
|
import { ComboBoxDataProviderMixin } from '@vaadin/combo-box/src/vaadin-combo-box-data-provider-mixin.js';
|
|
8
8
|
import { ComboBoxItemsMixin } from '@vaadin/combo-box/src/vaadin-combo-box-items-mixin.js';
|
|
9
9
|
import { ComboBoxPlaceholder } from '@vaadin/combo-box/src/vaadin-combo-box-placeholder.js';
|
|
10
|
+
import { I18nMixin } from '@vaadin/component-base/src/i18n-mixin.js';
|
|
10
11
|
import { ResizeMixin } from '@vaadin/component-base/src/resize-mixin.js';
|
|
11
12
|
import { SlotController } from '@vaadin/component-base/src/slot-controller.js';
|
|
12
13
|
import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
|
|
@@ -14,16 +15,26 @@ import { InputControlMixin } from '@vaadin/field-base/src/input-control-mixin.js
|
|
|
14
15
|
import { InputController } from '@vaadin/field-base/src/input-controller.js';
|
|
15
16
|
import { LabelledInputController } from '@vaadin/field-base/src/labelled-input-controller.js';
|
|
16
17
|
|
|
18
|
+
const DEFAULT_I18N = {
|
|
19
|
+
cleared: 'Selection cleared',
|
|
20
|
+
focused: 'focused. Press Backspace to remove',
|
|
21
|
+
selected: 'added to selection',
|
|
22
|
+
deselected: 'removed from selection',
|
|
23
|
+
total: '{count} items selected',
|
|
24
|
+
};
|
|
25
|
+
|
|
17
26
|
/**
|
|
18
27
|
* @polymerMixin
|
|
19
28
|
* @mixes ComboBoxDataProviderMixin
|
|
20
29
|
* @mixes ComboBoxItemsMixin
|
|
30
|
+
* @mixes I18nMixin
|
|
21
31
|
* @mixes InputControlMixin
|
|
22
32
|
* @mixes ResizeMixin
|
|
23
33
|
*/
|
|
24
34
|
export const MultiSelectComboBoxMixin = (superClass) =>
|
|
25
|
-
class MultiSelectComboBoxMixinClass extends
|
|
26
|
-
|
|
35
|
+
class MultiSelectComboBoxMixinClass extends I18nMixin(
|
|
36
|
+
DEFAULT_I18N,
|
|
37
|
+
ComboBoxDataProviderMixin(ComboBoxItemsMixin(InputControlMixin(ResizeMixin(superClass)))),
|
|
27
38
|
) {
|
|
28
39
|
static get properties() {
|
|
29
40
|
return {
|
|
@@ -72,43 +83,6 @@ export const MultiSelectComboBoxMixin = (superClass) =>
|
|
|
72
83
|
sync: true,
|
|
73
84
|
},
|
|
74
85
|
|
|
75
|
-
/**
|
|
76
|
-
* The object used to localize this component.
|
|
77
|
-
* To change the default localization, replace the entire
|
|
78
|
-
* _i18n_ object or just the property you want to modify.
|
|
79
|
-
*
|
|
80
|
-
* The object has the following JSON structure and default values:
|
|
81
|
-
* ```
|
|
82
|
-
* {
|
|
83
|
-
* // Screen reader announcement on clear button click.
|
|
84
|
-
* cleared: 'Selection cleared',
|
|
85
|
-
* // Screen reader announcement when a chip is focused.
|
|
86
|
-
* focused: ' focused. Press Backspace to remove',
|
|
87
|
-
* // Screen reader announcement when item is selected.
|
|
88
|
-
* selected: 'added to selection',
|
|
89
|
-
* // Screen reader announcement when item is deselected.
|
|
90
|
-
* deselected: 'removed from selection',
|
|
91
|
-
* // Screen reader announcement of the selected items count.
|
|
92
|
-
* // {count} is replaced with the actual count of items.
|
|
93
|
-
* total: '{count} items selected',
|
|
94
|
-
* }
|
|
95
|
-
* ```
|
|
96
|
-
* @type {!MultiSelectComboBoxI18n}
|
|
97
|
-
* @default {English/US}
|
|
98
|
-
*/
|
|
99
|
-
i18n: {
|
|
100
|
-
type: Object,
|
|
101
|
-
value: () => {
|
|
102
|
-
return {
|
|
103
|
-
cleared: 'Selection cleared',
|
|
104
|
-
focused: 'focused. Press Backspace to remove',
|
|
105
|
-
selected: 'added to selection',
|
|
106
|
-
deselected: 'removed from selection',
|
|
107
|
-
total: '{count} items selected',
|
|
108
|
-
};
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
|
|
112
86
|
/**
|
|
113
87
|
* When true, filter string isn't cleared after selecting an item.
|
|
114
88
|
*/
|
|
@@ -244,6 +218,37 @@ export const MultiSelectComboBoxMixin = (superClass) =>
|
|
|
244
218
|
];
|
|
245
219
|
}
|
|
246
220
|
|
|
221
|
+
/**
|
|
222
|
+
* The object used to localize this component. To change the default
|
|
223
|
+
* localization, replace this with an object that provides all properties, or
|
|
224
|
+
* just the individual properties you want to change.
|
|
225
|
+
*
|
|
226
|
+
* The object has the following JSON structure and default values:
|
|
227
|
+
* ```js
|
|
228
|
+
* {
|
|
229
|
+
* // Screen reader announcement on clear button click.
|
|
230
|
+
* cleared: 'Selection cleared',
|
|
231
|
+
* // Screen reader announcement when a chip is focused.
|
|
232
|
+
* focused: ' focused. Press Backspace to remove',
|
|
233
|
+
* // Screen reader announcement when item is selected.
|
|
234
|
+
* selected: 'added to selection',
|
|
235
|
+
* // Screen reader announcement when item is deselected.
|
|
236
|
+
* deselected: 'removed from selection',
|
|
237
|
+
* // Screen reader announcement of the selected items count.
|
|
238
|
+
* // {count} is replaced with the actual count of items.
|
|
239
|
+
* total: '{count} items selected',
|
|
240
|
+
* }
|
|
241
|
+
* ```
|
|
242
|
+
* @return {!MultiSelectComboBoxI18n}
|
|
243
|
+
*/
|
|
244
|
+
get i18n() {
|
|
245
|
+
return super.i18n;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
set i18n(value) {
|
|
249
|
+
super.i18n = value;
|
|
250
|
+
}
|
|
251
|
+
|
|
247
252
|
/** @protected */
|
|
248
253
|
get slotStyles() {
|
|
249
254
|
const tag = this.localName;
|
|
@@ -384,7 +389,7 @@ export const MultiSelectComboBoxMixin = (superClass) =>
|
|
|
384
389
|
clear() {
|
|
385
390
|
this.__updateSelection([]);
|
|
386
391
|
|
|
387
|
-
announce(this.
|
|
392
|
+
announce(this.__effectiveI18n.cleared);
|
|
388
393
|
}
|
|
389
394
|
|
|
390
395
|
/**
|
|
@@ -750,8 +755,8 @@ export const MultiSelectComboBoxMixin = (superClass) =>
|
|
|
750
755
|
/** @private */
|
|
751
756
|
__announceItem(itemLabel, isSelected, itemCount) {
|
|
752
757
|
const state = isSelected ? 'selected' : 'deselected';
|
|
753
|
-
const total = this.
|
|
754
|
-
announce(`${itemLabel} ${this.
|
|
758
|
+
const total = this.__effectiveI18n.total.replace('{count}', itemCount || 0);
|
|
759
|
+
announce(`${itemLabel} ${this.__effectiveI18n[state]} ${total}`);
|
|
755
760
|
}
|
|
756
761
|
|
|
757
762
|
/** @private */
|
|
@@ -1218,7 +1223,7 @@ export const MultiSelectComboBoxMixin = (superClass) =>
|
|
|
1218
1223
|
if (focusedIndex > -1) {
|
|
1219
1224
|
const item = chips[focusedIndex].item;
|
|
1220
1225
|
const itemLabel = this._getItemLabel(item);
|
|
1221
|
-
announce(`${itemLabel} ${this.
|
|
1226
|
+
announce(`${itemLabel} ${this.__effectiveI18n.focused}`);
|
|
1222
1227
|
}
|
|
1223
1228
|
}
|
|
1224
1229
|
}
|
|
@@ -8,11 +8,11 @@ import { ComboBoxOverlayMixin } from '@vaadin/combo-box/src/vaadin-combo-box-ove
|
|
|
8
8
|
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
9
9
|
import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
|
|
10
10
|
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
11
|
-
import { overlayStyles } from '@vaadin/overlay/src/styles/vaadin-overlay-
|
|
11
|
+
import { overlayStyles } from '@vaadin/overlay/src/styles/vaadin-overlay-base-styles.js';
|
|
12
12
|
import { OverlayMixin } from '@vaadin/overlay/src/vaadin-overlay-mixin.js';
|
|
13
13
|
import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
|
|
14
14
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
15
|
-
import { multiSelectComboBoxOverlayStyles } from './styles/vaadin-multi-select-combo-box-overlay-
|
|
15
|
+
import { multiSelectComboBoxOverlayStyles } from './styles/vaadin-multi-select-combo-box-overlay-base-styles.js';
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* An element used internally by `<vaadin-multi-select-combo-box>`. Not intended to be used separately.
|
|
@@ -8,7 +8,7 @@ import { ComboBoxPlaceholder } from '@vaadin/combo-box/src/vaadin-combo-box-plac
|
|
|
8
8
|
import { ComboBoxScrollerMixin } from '@vaadin/combo-box/src/vaadin-combo-box-scroller-mixin.js';
|
|
9
9
|
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
10
10
|
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
11
|
-
import { multiSelectComboBoxScrollerStyles } from './styles/vaadin-multi-select-combo-box-scroller-
|
|
11
|
+
import { multiSelectComboBoxScrollerStyles } from './styles/vaadin-multi-select-combo-box-scroller-base-styles.js';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* An element used internally by `<vaadin-multi-select-combo-box>`. Not intended to be used separately.
|
|
@@ -13,7 +13,6 @@ import type { ComboBoxDataProviderMixinClass } from '@vaadin/combo-box/src/vaadi
|
|
|
13
13
|
import type { ComboBoxItemsMixinClass } from '@vaadin/combo-box/src/vaadin-combo-box-items-mixin.js';
|
|
14
14
|
import type { DelegateStateMixinClass } from '@vaadin/component-base/src/delegate-state-mixin.js';
|
|
15
15
|
import type { ElementMixinClass } from '@vaadin/component-base/src/element-mixin.js';
|
|
16
|
-
import type { OverlayClassMixinClass } from '@vaadin/component-base/src/overlay-class-mixin.js';
|
|
17
16
|
import type { ResizeMixinClass } from '@vaadin/component-base/src/resize-mixin.js';
|
|
18
17
|
import type { SlotStylesMixinClass } from '@vaadin/component-base/src/slot-styles-mixin.js';
|
|
19
18
|
import type { ClearButtonMixinClass } from '@vaadin/field-base/src/clear-button-mixin.js';
|
|
@@ -105,6 +104,7 @@ export interface MultiSelectComboBoxEventMap<TItem> extends HTMLElementEventMap
|
|
|
105
104
|
* `chips` | The element that wraps slotted chips for selected items
|
|
106
105
|
* `label` | The label element
|
|
107
106
|
* `input-field` | The element that wraps prefix, value and suffix
|
|
107
|
+
* `field-button` | Set on both clear and toggle buttons
|
|
108
108
|
* `clear-button` | The clear button
|
|
109
109
|
* `error-message` | The error message element
|
|
110
110
|
* `helper-text` | The helper text element wrapper
|
|
@@ -123,6 +123,7 @@ export interface MultiSelectComboBoxEventMap<TItem> extends HTMLElementEventMap
|
|
|
123
123
|
* `has-label` | Set when the element has a label
|
|
124
124
|
* `has-helper` | Set when the element has helper text or slot
|
|
125
125
|
* `has-error-message` | Set when the element has an error message
|
|
126
|
+
* `has-tooltip` | Set when the element has a slotted tooltip
|
|
126
127
|
* `invalid` | Set when the element is invalid
|
|
127
128
|
* `focused` | Set when the element is focused
|
|
128
129
|
* `focus-ring` | Set when the element is keyboard focused
|
|
@@ -189,7 +190,6 @@ interface MultiSelectComboBox<TItem = ComboBoxDefaultItem>
|
|
|
189
190
|
DelegateStateMixinClass,
|
|
190
191
|
DelegateFocusMixinClass,
|
|
191
192
|
MultiSelectComboBoxMixinClass<TItem>,
|
|
192
|
-
OverlayClassMixinClass,
|
|
193
193
|
ResizeMixinClass,
|
|
194
194
|
ThemableMixinClass,
|
|
195
195
|
ThemePropertyMixinClass,
|
|
@@ -16,7 +16,7 @@ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
|
16
16
|
import { inputFieldShared } from '@vaadin/field-base/src/styles/input-field-shared-styles.js';
|
|
17
17
|
import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
|
|
18
18
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
19
|
-
import { multiSelectComboBoxStyles } from './styles/vaadin-multi-select-combo-box-
|
|
19
|
+
import { multiSelectComboBoxStyles } from './styles/vaadin-multi-select-combo-box-base-styles.js';
|
|
20
20
|
import { MultiSelectComboBoxMixin } from './vaadin-multi-select-combo-box-mixin.js';
|
|
21
21
|
|
|
22
22
|
/**
|
|
@@ -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
|
|
@@ -60,6 +61,7 @@ import { MultiSelectComboBoxMixin } from './vaadin-multi-select-combo-box-mixin.
|
|
|
60
61
|
* `has-label` | Set when the element has a label
|
|
61
62
|
* `has-helper` | Set when the element has helper text or slot
|
|
62
63
|
* `has-error-message` | Set when the element has an error message
|
|
64
|
+
* `has-tooltip` | Set when the element has a slotted tooltip
|
|
63
65
|
* `invalid` | Set when the element is invalid
|
|
64
66
|
* `focused` | Set when the element is focused
|
|
65
67
|
* `focus-ring` | Set when the element is keyboard focused
|
|
@@ -133,8 +135,8 @@ class MultiSelectComboBox extends MultiSelectComboBoxMixin(
|
|
|
133
135
|
<slot name="chip"></slot>
|
|
134
136
|
</div>
|
|
135
137
|
<slot name="input"></slot>
|
|
136
|
-
<div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
|
|
137
|
-
<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>
|
|
138
140
|
</vaadin-multi-select-combo-box-container>
|
|
139
141
|
|
|
140
142
|
<div part="helper-text">
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import './
|
|
1
|
+
import './src/vaadin-multi-select-combo-box.js';
|
|
2
2
|
export * from './src/vaadin-multi-select-combo-box.js';
|
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-beta2",
|
|
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`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",
|
|
@@ -51,17 +51,6 @@
|
|
|
51
51
|
]
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
|
-
{
|
|
55
|
-
"name": "overlay-class",
|
|
56
|
-
"description": "A space-delimited list of CSS class names to set on the overlay element.\nThis property does not affect other CSS class names set manually via JS.\n\nNote, if the CSS class name was set with this property, clearing it will\nremove it from the overlay, even if the same class name was also added\nmanually, e.g. by using `classList.add()` in the `renderer` function.",
|
|
57
|
-
"value": {
|
|
58
|
-
"type": [
|
|
59
|
-
"string",
|
|
60
|
-
"null",
|
|
61
|
-
"undefined"
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
54
|
{
|
|
66
55
|
"name": "opened",
|
|
67
56
|
"description": "True if the dropdown is open, false otherwise.",
|
|
@@ -120,6 +109,15 @@
|
|
|
120
109
|
]
|
|
121
110
|
}
|
|
122
111
|
},
|
|
112
|
+
{
|
|
113
|
+
"name": "i18n",
|
|
114
|
+
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nShould be overridden by subclasses to provide a custom JSDoc with the\ndefault I18N properties.",
|
|
115
|
+
"value": {
|
|
116
|
+
"type": [
|
|
117
|
+
"Object"
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
},
|
|
123
121
|
{
|
|
124
122
|
"name": "autofocus",
|
|
125
123
|
"description": "Specify that this control should have input focus when the page loads.",
|
|
@@ -416,17 +414,6 @@
|
|
|
416
414
|
]
|
|
417
415
|
}
|
|
418
416
|
},
|
|
419
|
-
{
|
|
420
|
-
"name": "overlayClass",
|
|
421
|
-
"description": "A space-delimited list of CSS class names to set on the overlay element.\nThis property does not affect other CSS class names set manually via JS.\n\nNote, if the CSS class name was set with this property, clearing it will\nremove it from the overlay, even if the same class name was also added\nmanually, e.g. by using `classList.add()` in the `renderer` function.",
|
|
422
|
-
"value": {
|
|
423
|
-
"type": [
|
|
424
|
-
"string",
|
|
425
|
-
"null",
|
|
426
|
-
"undefined"
|
|
427
|
-
]
|
|
428
|
-
}
|
|
429
|
-
},
|
|
430
417
|
{
|
|
431
418
|
"name": "opened",
|
|
432
419
|
"description": "True if the dropdown is open, false otherwise.",
|
|
@@ -489,6 +476,17 @@
|
|
|
489
476
|
]
|
|
490
477
|
}
|
|
491
478
|
},
|
|
479
|
+
{
|
|
480
|
+
"name": "itemLabelGenerator",
|
|
481
|
+
"description": "A function that is used to generate the label for dropdown\nitems based on the item. Receives one argument:\n- `item` The item to generate the label for.",
|
|
482
|
+
"value": {
|
|
483
|
+
"type": [
|
|
484
|
+
"Object",
|
|
485
|
+
"null",
|
|
486
|
+
"undefined"
|
|
487
|
+
]
|
|
488
|
+
}
|
|
489
|
+
},
|
|
492
490
|
{
|
|
493
491
|
"name": "itemLabelPath",
|
|
494
492
|
"description": "Path for label of the item. If `items` is an array of objects, the\n`itemLabelPath` is used to fetch the displayed string label for each\nitem.\n\nThe item label is also used for matching items when processing user\ninput, i.e., for filtering and selecting items.",
|
|
@@ -507,6 +505,15 @@
|
|
|
507
505
|
]
|
|
508
506
|
}
|
|
509
507
|
},
|
|
508
|
+
{
|
|
509
|
+
"name": "i18n",
|
|
510
|
+
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure and default values:\n```js\n{\n // Screen reader announcement on clear button click.\n cleared: 'Selection cleared',\n // Screen reader announcement when a chip is focused.\n focused: ' focused. Press Backspace to remove',\n // Screen reader announcement when item is selected.\n selected: 'added to selection',\n // Screen reader announcement when item is deselected.\n deselected: 'removed from selection',\n // Screen reader announcement of the selected items count.\n // {count} is replaced with the actual count of items.\n total: '{count} items selected',\n}\n```",
|
|
511
|
+
"value": {
|
|
512
|
+
"type": [
|
|
513
|
+
"MultiSelectComboBoxI18n"
|
|
514
|
+
]
|
|
515
|
+
}
|
|
516
|
+
},
|
|
510
517
|
{
|
|
511
518
|
"name": "autofocus",
|
|
512
519
|
"description": "Specify that this control should have input focus when the page loads.",
|
|
@@ -716,15 +723,6 @@
|
|
|
716
723
|
]
|
|
717
724
|
}
|
|
718
725
|
},
|
|
719
|
-
{
|
|
720
|
-
"name": "i18n",
|
|
721
|
-
"description": "The object used to localize this component.\nTo change the default localization, replace the entire\n_i18n_ object or just the property you want to modify.\n\nThe object has the following JSON structure and default values:\n```\n{\n // Screen reader announcement on clear button click.\n cleared: 'Selection cleared',\n // Screen reader announcement when a chip is focused.\n focused: ' focused. Press Backspace to remove',\n // Screen reader announcement when item is selected.\n selected: 'added to selection',\n // Screen reader announcement when item is deselected.\n deselected: 'removed from selection',\n // Screen reader announcement of the selected items count.\n // {count} is replaced with the actual count of items.\n total: '{count} items selected',\n}\n```",
|
|
722
|
-
"value": {
|
|
723
|
-
"type": [
|
|
724
|
-
"MultiSelectComboBoxI18n"
|
|
725
|
-
]
|
|
726
|
-
}
|
|
727
|
-
},
|
|
728
726
|
{
|
|
729
727
|
"name": "keepFilter",
|
|
730
728
|
"description": "When true, filter string isn't cleared after selecting an item.",
|
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-beta2",
|
|
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`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
|
{
|
|
@@ -152,13 +152,6 @@
|
|
|
152
152
|
"kind": "expression"
|
|
153
153
|
}
|
|
154
154
|
},
|
|
155
|
-
{
|
|
156
|
-
"name": ".overlayClass",
|
|
157
|
-
"description": "A space-delimited list of CSS class names to set on the overlay element.\nThis property does not affect other CSS class names set manually via JS.\n\nNote, if the CSS class name was set with this property, clearing it will\nremove it from the overlay, even if the same class name was also added\nmanually, e.g. by using `classList.add()` in the `renderer` function.",
|
|
158
|
-
"value": {
|
|
159
|
-
"kind": "expression"
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
155
|
{
|
|
163
156
|
"name": ".items",
|
|
164
157
|
"description": "A full set of items to filter the visible options from.\nThe items can be of either `String` or `Object` type.",
|
|
@@ -180,6 +173,13 @@
|
|
|
180
173
|
"kind": "expression"
|
|
181
174
|
}
|
|
182
175
|
},
|
|
176
|
+
{
|
|
177
|
+
"name": ".itemLabelGenerator",
|
|
178
|
+
"description": "A function that is used to generate the label for dropdown\nitems based on the item. Receives one argument:\n- `item` The item to generate the label for.",
|
|
179
|
+
"value": {
|
|
180
|
+
"kind": "expression"
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
183
|
{
|
|
184
184
|
"name": ".itemLabelPath",
|
|
185
185
|
"description": "Path for label of the item. If `items` is an array of objects, the\n`itemLabelPath` is used to fetch the displayed string label for each\nitem.\n\nThe item label is also used for matching items when processing user\ninput, i.e., for filtering and selecting items.",
|
|
@@ -194,6 +194,13 @@
|
|
|
194
194
|
"kind": "expression"
|
|
195
195
|
}
|
|
196
196
|
},
|
|
197
|
+
{
|
|
198
|
+
"name": ".i18n",
|
|
199
|
+
"description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure and default values:\n```js\n{\n // Screen reader announcement on clear button click.\n cleared: 'Selection cleared',\n // Screen reader announcement when a chip is focused.\n focused: ' focused. Press Backspace to remove',\n // Screen reader announcement when item is selected.\n selected: 'added to selection',\n // Screen reader announcement when item is deselected.\n deselected: 'removed from selection',\n // Screen reader announcement of the selected items count.\n // {count} is replaced with the actual count of items.\n total: '{count} items selected',\n}\n```",
|
|
200
|
+
"value": {
|
|
201
|
+
"kind": "expression"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
197
204
|
{
|
|
198
205
|
"name": ".label",
|
|
199
206
|
"description": "The label text for the input node.\nWhen no light dom defined via [slot=label], this value will be used.",
|
|
@@ -271,13 +278,6 @@
|
|
|
271
278
|
"kind": "expression"
|
|
272
279
|
}
|
|
273
280
|
},
|
|
274
|
-
{
|
|
275
|
-
"name": ".i18n",
|
|
276
|
-
"description": "The object used to localize this component.\nTo change the default localization, replace the entire\n_i18n_ object or just the property you want to modify.\n\nThe object has the following JSON structure and default values:\n```\n{\n // Screen reader announcement on clear button click.\n cleared: 'Selection cleared',\n // Screen reader announcement when a chip is focused.\n focused: ' focused. Press Backspace to remove',\n // Screen reader announcement when item is selected.\n selected: 'added to selection',\n // Screen reader announcement when item is deselected.\n deselected: 'removed from selection',\n // Screen reader announcement of the selected items count.\n // {count} is replaced with the actual count of items.\n total: '{count} items selected',\n}\n```",
|
|
277
|
-
"value": {
|
|
278
|
-
"kind": "expression"
|
|
279
|
-
}
|
|
280
|
-
},
|
|
281
281
|
{
|
|
282
282
|
"name": ".selectedItems",
|
|
283
283
|
"description": "The list of selected items.\nNote: modifying the selected items creates a new array each time.",
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import { css } from 'lit';
|
|
7
|
-
|
|
8
|
-
export const multiSelectComboBoxChipStyles = css`
|
|
9
|
-
:host {
|
|
10
|
-
display: inline-flex;
|
|
11
|
-
align-items: center;
|
|
12
|
-
align-self: center;
|
|
13
|
-
white-space: nowrap;
|
|
14
|
-
box-sizing: border-box;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
[part='label'] {
|
|
18
|
-
overflow: hidden;
|
|
19
|
-
text-overflow: ellipsis;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
:host([hidden]),
|
|
23
|
-
:host(:is([readonly], [disabled], [slot='overflow'])) [part='remove-button'] {
|
|
24
|
-
display: none !important;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
@media (forced-colors: active) {
|
|
28
|
-
:host {
|
|
29
|
-
outline: 1px solid;
|
|
30
|
-
outline-offset: -1px;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
`;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import { css } from 'lit';
|
|
7
|
-
|
|
8
|
-
export const multiSelectComboBoxStyles = css`
|
|
9
|
-
:host {
|
|
10
|
-
max-width: 100%;
|
|
11
|
-
--input-min-width: var(--vaadin-multi-select-combo-box-input-min-width, 4em);
|
|
12
|
-
--_chip-min-width: var(--vaadin-multi-select-combo-box-chip-min-width, 50px);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
:host([opened]) {
|
|
16
|
-
pointer-events: auto;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
#chips {
|
|
20
|
-
display: flex;
|
|
21
|
-
align-items: center;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
::slotted(input) {
|
|
25
|
-
box-sizing: border-box;
|
|
26
|
-
flex: 1 0 var(--input-min-width);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
::slotted([slot='chip']),
|
|
30
|
-
::slotted([slot='overflow']) {
|
|
31
|
-
flex: 0 1 auto;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
::slotted([slot='chip']) {
|
|
35
|
-
overflow: hidden;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
:host(:is([readonly], [disabled])) ::slotted(input) {
|
|
39
|
-
flex-grow: 0;
|
|
40
|
-
flex-basis: 0;
|
|
41
|
-
padding: 0;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
:host([auto-expand-vertically]) #chips {
|
|
45
|
-
display: contents;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
:host([auto-expand-horizontally]) [class$='container'] {
|
|
49
|
-
width: auto;
|
|
50
|
-
}
|
|
51
|
-
`;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import { css } from 'lit';
|
|
7
|
-
|
|
8
|
-
export const multiSelectComboBoxOverlayStyles = css`
|
|
9
|
-
#overlay {
|
|
10
|
-
width: var(
|
|
11
|
-
--vaadin-multi-select-combo-box-overlay-width,
|
|
12
|
-
var(--_vaadin-multi-select-combo-box-overlay-default-width, auto)
|
|
13
|
-
);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
[part='content'] {
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
height: 100%;
|
|
20
|
-
}
|
|
21
|
-
`;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import { css } from 'lit';
|
|
7
|
-
|
|
8
|
-
export const multiSelectComboBoxScrollerStyles = css`
|
|
9
|
-
:host {
|
|
10
|
-
display: block;
|
|
11
|
-
min-height: 1px;
|
|
12
|
-
overflow: auto;
|
|
13
|
-
|
|
14
|
-
/* Fixes item background from getting on top of scrollbars on Safari */
|
|
15
|
-
transform: translate3d(0, 0, 0);
|
|
16
|
-
|
|
17
|
-
/* Fixes scrollbar disappearing when 'Show scroll bars: Always' enabled in Safari */
|
|
18
|
-
box-shadow: 0 0 0 white;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
#selector {
|
|
22
|
-
border-width: var(--_vaadin-multi-select-combo-box-items-container-border-width);
|
|
23
|
-
border-style: var(--_vaadin-multi-select-combo-box-items-container-border-style);
|
|
24
|
-
border-color: var(--_vaadin-multi-select-combo-box-items-container-border-color, transparent);
|
|
25
|
-
position: relative;
|
|
26
|
-
}
|
|
27
|
-
`;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import '@vaadin/vaadin-lumo-styles/color.js';
|
|
7
|
-
import '@vaadin/vaadin-lumo-styles/font-icons.js';
|
|
8
|
-
import '@vaadin/vaadin-lumo-styles/spacing.js';
|
|
9
|
-
import '@vaadin/vaadin-lumo-styles/style.js';
|
|
10
|
-
import '@vaadin/vaadin-lumo-styles/typography.js';
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import '@vaadin/vaadin-lumo-styles/color.js';
|
|
7
|
-
import '@vaadin/vaadin-lumo-styles/font-icons.js';
|
|
8
|
-
import '@vaadin/vaadin-lumo-styles/spacing.js';
|
|
9
|
-
import '@vaadin/vaadin-lumo-styles/style.js';
|
|
10
|
-
import '@vaadin/vaadin-lumo-styles/typography.js';
|
|
11
|
-
import { fieldButton } from '@vaadin/vaadin-lumo-styles/mixins/field-button.js';
|
|
12
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
13
|
-
|
|
14
|
-
const chip = css`
|
|
15
|
-
:host {
|
|
16
|
-
font-size: var(--lumo-font-size-xxs);
|
|
17
|
-
line-height: 1;
|
|
18
|
-
color: var(--lumo-body-text-color);
|
|
19
|
-
border-radius: var(--lumo-border-radius-s);
|
|
20
|
-
background-color: var(--lumo-contrast-20pct);
|
|
21
|
-
cursor: var(--lumo-clickable-cursor);
|
|
22
|
-
-webkit-font-smoothing: antialiased;
|
|
23
|
-
-moz-osx-font-smoothing: grayscale;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
:host([disabled]) {
|
|
27
|
-
background-color: var(--lumo-contrast-10pct);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
:host([focused]) [part='remove-button'] {
|
|
31
|
-
color: inherit;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
:host([slot='overflow']) {
|
|
35
|
-
position: relative;
|
|
36
|
-
min-width: var(--lumo-size-xxs);
|
|
37
|
-
margin-inline-start: var(--lumo-space-s);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
:host([slot='overflow'])::before,
|
|
41
|
-
:host([slot='overflow'])::after {
|
|
42
|
-
position: absolute;
|
|
43
|
-
content: '';
|
|
44
|
-
width: 100%;
|
|
45
|
-
height: 100%;
|
|
46
|
-
border-left: calc(var(--lumo-space-s) / 4) solid;
|
|
47
|
-
border-radius: var(--lumo-border-radius-s);
|
|
48
|
-
border-color: var(--lumo-contrast-30pct);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
:host([slot='overflow'])::before {
|
|
52
|
-
left: calc(-1 * var(--lumo-space-s) / 2);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
:host([slot='overflow'])::after {
|
|
56
|
-
left: calc(-1 * var(--lumo-space-s));
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
:host([count='2']) {
|
|
60
|
-
margin-inline-start: calc(var(--lumo-space-s) / 2);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
:host([count='2'])::after {
|
|
64
|
-
display: none;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
:host([count='1']) {
|
|
68
|
-
margin-inline-start: 0;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
:host([count='1'])::before,
|
|
72
|
-
:host([count='1'])::after {
|
|
73
|
-
display: none;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
[part='label'] {
|
|
77
|
-
font-weight: 500;
|
|
78
|
-
line-height: 1.25;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
[part='remove-button'] {
|
|
82
|
-
display: flex;
|
|
83
|
-
align-items: center;
|
|
84
|
-
justify-content: center;
|
|
85
|
-
margin-top: -0.3125em;
|
|
86
|
-
margin-bottom: -0.3125em;
|
|
87
|
-
margin-inline-start: auto;
|
|
88
|
-
width: 1.25em;
|
|
89
|
-
height: 1.25em;
|
|
90
|
-
font-size: 1.5em;
|
|
91
|
-
transition: none;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
[part='remove-button']::before {
|
|
95
|
-
content: var(--lumo-icons-cross);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
:host([disabled]) [part='label'] {
|
|
99
|
-
color: var(--lumo-disabled-text-color);
|
|
100
|
-
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
101
|
-
pointer-events: none;
|
|
102
|
-
}
|
|
103
|
-
`;
|
|
104
|
-
|
|
105
|
-
registerStyles('vaadin-multi-select-combo-box-chip', [fieldButton, chip], {
|
|
106
|
-
moduleId: 'lumo-multi-select-combo-box-chip',
|
|
107
|
-
});
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import '@vaadin/input-container/theme/lumo/vaadin-input-container-styles.js';
|
|
7
|
-
import '@vaadin/vaadin-lumo-styles/color.js';
|
|
8
|
-
import '@vaadin/vaadin-lumo-styles/font-icons.js';
|
|
9
|
-
import '@vaadin/vaadin-lumo-styles/style.js';
|
|
10
|
-
import '@vaadin/vaadin-lumo-styles/typography.js';
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import '@vaadin/input-container/theme/lumo/vaadin-input-container-styles.js';
|
|
7
|
-
import '@vaadin/vaadin-lumo-styles/color.js';
|
|
8
|
-
import '@vaadin/vaadin-lumo-styles/font-icons.js';
|
|
9
|
-
import '@vaadin/vaadin-lumo-styles/style.js';
|
|
10
|
-
import '@vaadin/vaadin-lumo-styles/typography.js';
|
|
11
|
-
import { comboBoxItem } from '@vaadin/combo-box/theme/lumo/vaadin-combo-box-item-styles.js';
|
|
12
|
-
import { comboBoxLoader, comboBoxOverlay } from '@vaadin/combo-box/theme/lumo/vaadin-combo-box-overlay-styles.js';
|
|
13
|
-
import { item } from '@vaadin/item/theme/lumo/vaadin-item-styles.js';
|
|
14
|
-
import { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';
|
|
15
|
-
import { loader } from '@vaadin/vaadin-lumo-styles/mixins/loader.js';
|
|
16
|
-
import { menuOverlayCore } from '@vaadin/vaadin-lumo-styles/mixins/menu-overlay.js';
|
|
17
|
-
import { overlay } from '@vaadin/vaadin-lumo-styles/mixins/overlay.js';
|
|
18
|
-
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
19
|
-
|
|
20
|
-
const multiSelectComboBoxItem = css`
|
|
21
|
-
@media (any-hover: hover) {
|
|
22
|
-
:host(:hover[readonly]) {
|
|
23
|
-
background-color: transparent;
|
|
24
|
-
cursor: default;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
`;
|
|
28
|
-
|
|
29
|
-
registerStyles('vaadin-multi-select-combo-box-item', [item, comboBoxItem, multiSelectComboBoxItem], {
|
|
30
|
-
moduleId: 'lumo-multi-select-combo-box-item',
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
registerStyles(
|
|
34
|
-
'vaadin-multi-select-combo-box-overlay',
|
|
35
|
-
[
|
|
36
|
-
overlay,
|
|
37
|
-
menuOverlayCore,
|
|
38
|
-
comboBoxOverlay,
|
|
39
|
-
loader,
|
|
40
|
-
comboBoxLoader,
|
|
41
|
-
css`
|
|
42
|
-
:host {
|
|
43
|
-
--_vaadin-multi-select-combo-box-items-container-border-width: var(--lumo-space-xs);
|
|
44
|
-
--_vaadin-multi-select-combo-box-items-container-border-style: solid;
|
|
45
|
-
}
|
|
46
|
-
`,
|
|
47
|
-
],
|
|
48
|
-
{ moduleId: 'lumo-multi-select-combo-box-overlay' },
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
registerStyles(
|
|
52
|
-
'vaadin-multi-select-combo-box-container',
|
|
53
|
-
css`
|
|
54
|
-
:host([auto-expand-vertically]) {
|
|
55
|
-
padding-block: var(--lumo-space-xs);
|
|
56
|
-
}
|
|
57
|
-
`,
|
|
58
|
-
{ moduleId: 'lumo-multi-select-combo-box-container' },
|
|
59
|
-
);
|
|
60
|
-
|
|
61
|
-
const multiSelectComboBox = css`
|
|
62
|
-
:host {
|
|
63
|
-
--_wrapper-gap: 0;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
:host([has-value]) {
|
|
67
|
-
padding-inline-start: 0;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
:host([has-value]) ::slotted(input:placeholder-shown) {
|
|
71
|
-
caret-color: var(--lumo-body-text-color) !important;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
[part='label'] {
|
|
75
|
-
flex-shrink: 0;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/* Override input-container styles */
|
|
79
|
-
[part='input-field'] ::slotted([slot='chip']),
|
|
80
|
-
[part='input-field'] ::slotted([slot='overflow']) {
|
|
81
|
-
min-height: auto;
|
|
82
|
-
padding: 0.3125em calc(0.5em + var(--lumo-border-radius-s) / 4);
|
|
83
|
-
color: var(--lumo-body-text-color);
|
|
84
|
-
mask-image: none;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
:host([auto-expand-vertically]) ::slotted([slot='chip']) {
|
|
88
|
-
margin-block: calc(var(--lumo-space-xs) / 2);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
::slotted([slot='chip']:not([readonly]):not([disabled])) {
|
|
92
|
-
padding-inline-end: 0;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
:host([auto-expand-vertically]) ::slotted([slot='input']) {
|
|
96
|
-
min-height: calc(var(--lumo-text-field-size, var(--lumo-size-m)) - 2 * var(--lumo-space-xs));
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
::slotted([slot='chip']:not(:last-of-type)),
|
|
100
|
-
::slotted([slot='overflow']:not(:last-of-type)) {
|
|
101
|
-
margin-inline-end: var(--lumo-space-xs);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
::slotted([slot='chip'][focused]) {
|
|
105
|
-
background-color: var(--vaadin-selection-color, var(--lumo-primary-color));
|
|
106
|
-
color: var(--lumo-primary-contrast-color);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
[part='toggle-button']::before {
|
|
110
|
-
content: var(--lumo-icons-dropdown);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
:host([readonly][has-value]) [part='toggle-button'] {
|
|
114
|
-
color: var(--lumo-contrast-60pct);
|
|
115
|
-
cursor: var(--lumo-clickable-cursor);
|
|
116
|
-
}
|
|
117
|
-
`;
|
|
118
|
-
|
|
119
|
-
registerStyles('vaadin-multi-select-combo-box', [inputFieldShared, multiSelectComboBox], {
|
|
120
|
-
moduleId: 'lumo-multi-select-combo-box',
|
|
121
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import './vaadin-multi-select-combo-box-chip-styles.js';
|
|
7
|
-
import './vaadin-multi-select-combo-box-styles.js';
|
|
8
|
-
import '../../src/vaadin-multi-select-combo-box.js';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import './vaadin-multi-select-combo-box-chip-styles.js';
|
|
7
|
-
import './vaadin-multi-select-combo-box-styles.js';
|
|
8
|
-
import '../../src/vaadin-multi-select-combo-box.js';
|