@vaadin/multi-select-combo-box 25.0.0-alpha8 → 25.0.0-beta1

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.
Files changed (28) hide show
  1. package/package.json +15 -18
  2. package/src/styles/vaadin-multi-select-combo-box-base-styles.js +1 -1
  3. package/src/styles/vaadin-multi-select-combo-box-chip-base-styles.js +23 -9
  4. package/src/vaadin-multi-select-combo-box-chip.js +1 -1
  5. package/src/vaadin-multi-select-combo-box-container.js +1 -0
  6. package/src/vaadin-multi-select-combo-box-item.js +1 -1
  7. package/src/vaadin-multi-select-combo-box-mixin.d.ts +18 -89
  8. package/src/vaadin-multi-select-combo-box-mixin.js +426 -307
  9. package/src/vaadin-multi-select-combo-box-overlay.js +2 -2
  10. package/src/vaadin-multi-select-combo-box-scroller.js +1 -1
  11. package/src/vaadin-multi-select-combo-box.d.ts +13 -6
  12. package/src/vaadin-multi-select-combo-box.js +37 -88
  13. package/vaadin-multi-select-combo-box.js +1 -1
  14. package/web-types.json +205 -230
  15. package/web-types.lit.json +78 -78
  16. package/src/styles/vaadin-multi-select-combo-box-chip-core-styles.js +0 -33
  17. package/src/styles/vaadin-multi-select-combo-box-core-styles.d.ts +0 -8
  18. package/src/styles/vaadin-multi-select-combo-box-core-styles.js +0 -47
  19. package/src/styles/vaadin-multi-select-combo-box-overlay-core-styles.js +0 -21
  20. package/src/styles/vaadin-multi-select-combo-box-scroller-core-styles.js +0 -27
  21. package/src/vaadin-multi-select-combo-box-internal-mixin.js +0 -446
  22. package/src/vaadin-multi-select-combo-box-internal.js +0 -57
  23. package/theme/lumo/vaadin-multi-select-combo-box-chip-styles.d.ts +0 -10
  24. package/theme/lumo/vaadin-multi-select-combo-box-chip-styles.js +0 -107
  25. package/theme/lumo/vaadin-multi-select-combo-box-styles.d.ts +0 -10
  26. package/theme/lumo/vaadin-multi-select-combo-box-styles.js +0 -121
  27. package/theme/lumo/vaadin-multi-select-combo-box.d.ts +0 -8
  28. 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-alpha8",
3
+ "version": "25.0.0-beta1",
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-alpha8",
43
- "@vaadin/combo-box": "25.0.0-alpha8",
44
- "@vaadin/component-base": "25.0.0-alpha8",
45
- "@vaadin/field-base": "25.0.0-alpha8",
46
- "@vaadin/input-container": "25.0.0-alpha8",
47
- "@vaadin/item": "25.0.0-alpha8",
48
- "@vaadin/lit-renderer": "25.0.0-alpha8",
49
- "@vaadin/overlay": "25.0.0-alpha8",
50
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha8",
51
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha8",
39
+ "@vaadin/a11y-base": "25.0.0-beta1",
40
+ "@vaadin/combo-box": "25.0.0-beta1",
41
+ "@vaadin/component-base": "25.0.0-beta1",
42
+ "@vaadin/field-base": "25.0.0-beta1",
43
+ "@vaadin/input-container": "25.0.0-beta1",
44
+ "@vaadin/item": "25.0.0-beta1",
45
+ "@vaadin/lit-renderer": "25.0.0-beta1",
46
+ "@vaadin/overlay": "25.0.0-beta1",
47
+ "@vaadin/vaadin-themable-mixin": "25.0.0-beta1",
52
48
  "lit": "^3.0.0"
53
49
  },
54
50
  "devDependencies": {
55
- "@vaadin/chai-plugins": "25.0.0-alpha8",
56
- "@vaadin/test-runner-commands": "25.0.0-alpha8",
51
+ "@vaadin/chai-plugins": "25.0.0-beta1",
52
+ "@vaadin/test-runner-commands": "25.0.0-beta1",
57
53
  "@vaadin/testing-helpers": "^2.0.0",
58
- "sinon": "^18.0.0"
54
+ "@vaadin/vaadin-lumo-styles": "25.0.0-beta1",
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": "ebf53673d5f639d2b1b6f2b31f640f530643ee2f"
61
+ "gitHead": "1d20cf54e582d1f2e209126d4586f8b4c01c50e0"
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, var(--vaadin-chip-padding, 0.3em));
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 var(--vaadin-chip-border-color, var(--vaadin-border-color));
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 calc(var(--vaadin-chip-padding, 0.3em) * -1);
50
- color: var(--vaadin-chip-remove-button-color, var(--vaadin-color-subtle));
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-core-styles.js';
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.
@@ -28,6 +28,7 @@ class MultiSelectComboBoxContainer extends InputContainer {
28
28
  width: 100%;
29
29
  min-width: 0;
30
30
  gap: var(--_wrapper-gap);
31
+ align-self: start;
31
32
  }
32
33
 
33
34
  :host([auto-expand-vertically]) #wrapper {
@@ -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-core-styles.js';
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
 
@@ -8,8 +8,12 @@ import type { DelegateFocusMixinClass } from '@vaadin/a11y-base/src/delegate-foc
8
8
  import type { DisabledMixinClass } from '@vaadin/a11y-base/src/disabled-mixin.js';
9
9
  import type { FocusMixinClass } from '@vaadin/a11y-base/src/focus-mixin.js';
10
10
  import type { KeyboardMixinClass } from '@vaadin/a11y-base/src/keyboard-mixin.js';
11
- import type { ComboBoxDataProvider, ComboBoxItemModel } from '@vaadin/combo-box/src/vaadin-combo-box.js';
11
+ import type { ComboBoxItemModel } from '@vaadin/combo-box/src/vaadin-combo-box.js';
12
+ import type { ComboBoxBaseMixinClass } from '@vaadin/combo-box/src/vaadin-combo-box-base-mixin.js';
13
+ import type { ComboBoxDataProviderMixinClass } from '@vaadin/combo-box/src/vaadin-combo-box-data-provider-mixin.js';
14
+ import type { ComboBoxItemsMixinClass } from '@vaadin/combo-box/src/vaadin-combo-box-items-mixin.js';
12
15
  import type { DelegateStateMixinClass } from '@vaadin/component-base/src/delegate-state-mixin.js';
16
+ import type { I18nMixinClass } from '@vaadin/component-base/src/i18n-mixin.js';
13
17
  import type { ResizeMixinClass } from '@vaadin/component-base/src/resize-mixin.js';
14
18
  import type { SlotStylesMixinClass } from '@vaadin/component-base/src/slot-styles-mixin.js';
15
19
  import type { ClearButtonMixinClass } from '@vaadin/field-base/src/clear-button-mixin.js';
@@ -28,21 +32,25 @@ export type MultiSelectComboBoxRenderer<TItem> = (
28
32
  ) => void;
29
33
 
30
34
  export interface MultiSelectComboBoxI18n {
31
- cleared: string;
32
- focused: string;
33
- selected: string;
34
- deselected: string;
35
- total: string;
35
+ cleared?: string;
36
+ focused?: string;
37
+ selected?: string;
38
+ deselected?: string;
39
+ total?: string;
36
40
  }
37
41
 
38
42
  export declare function MultiSelectComboBoxMixin<TItem, T extends Constructor<HTMLElement>>(
39
43
  base: T,
40
44
  ): Constructor<ClearButtonMixinClass> &
45
+ Constructor<ComboBoxBaseMixinClass> &
46
+ Constructor<ComboBoxDataProviderMixinClass<TItem>> &
47
+ Constructor<ComboBoxItemsMixinClass<TItem>> &
41
48
  Constructor<DelegateFocusMixinClass> &
42
49
  Constructor<DelegateStateMixinClass> &
43
50
  Constructor<DisabledMixinClass> &
44
51
  Constructor<FieldMixinClass> &
45
52
  Constructor<FocusMixinClass> &
53
+ Constructor<I18nMixinClass<MultiSelectComboBoxI18n>> &
46
54
  Constructor<InputConstraintsMixinClass> &
47
55
  Constructor<InputControlMixinClass> &
48
56
  Constructor<InputMixinClass> &
@@ -76,44 +84,6 @@ export declare class MultiSelectComboBoxMixinClass<TItem> {
76
84
  */
77
85
  allowCustomValue: boolean;
78
86
 
79
- /**
80
- * Set true to prevent the overlay from opening automatically.
81
- * @attr {boolean} auto-open-disabled
82
- */
83
- autoOpenDisabled: boolean;
84
-
85
- /**
86
- * Function that provides items lazily. Receives two arguments:
87
- *
88
- * - `params` - Object with the following properties:
89
- * - `params.page` Requested page index
90
- * - `params.pageSize` Current page size
91
- * - `params.filter` Currently applied filter
92
- *
93
- * - `callback(items, size)` - Callback function with arguments:
94
- * - `items` Current page of items
95
- * - `size` Total number of items.
96
- */
97
- dataProvider: ComboBoxDataProvider<TItem> | null | undefined;
98
-
99
- /**
100
- * A subset of items, filtered based on the user input. Filtered items
101
- * can be assigned directly to omit the internal filtering functionality.
102
- * The items can be of either `String` or `Object` type.
103
- */
104
- filteredItems: TItem[] | undefined;
105
-
106
- /**
107
- * Filtering string the user has typed into the input field.
108
- */
109
- filter: string;
110
-
111
- /**
112
- * A full set of items to filter the visible options from.
113
- * The items can be of either `String` or `Object` type.
114
- */
115
- items: TItem[] | undefined;
116
-
117
87
  /**
118
88
  * A function used to generate CSS class names for dropdown
119
89
  * items and selected chips based on the item. The return
@@ -122,12 +92,6 @@ export declare class MultiSelectComboBoxMixinClass<TItem> {
122
92
  */
123
93
  itemClassNameGenerator: (item: TItem) => string;
124
94
 
125
- /**
126
- * The item property used for a visual representation of the item.
127
- * @attr {string} item-label-path
128
- */
129
- itemLabelPath: string;
130
-
131
95
  /**
132
96
  * Path for the id of the item, used to detect whether the item is selected.
133
97
  * @attr {string} item-id-path
@@ -135,19 +99,12 @@ export declare class MultiSelectComboBoxMixinClass<TItem> {
135
99
  itemIdPath: string;
136
100
 
137
101
  /**
138
- * Path for the value of the item. If `items` is an array of objects,
139
- * this property is used as a string value for the selected item.
140
- * @attr {string} item-value-path
141
- */
142
- itemValuePath: string;
143
-
144
- /**
145
- * The object used to localize this component.
146
- * To change the default localization, replace the entire
147
- * _i18n_ object or just the property you want to modify.
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.
148
105
  *
149
106
  * The object has the following JSON structure and default values:
150
- * ```
107
+ * ```js
151
108
  * {
152
109
  * // Screen reader announcement on clear button click.
153
110
  * cleared: 'Selection cleared',
@@ -176,24 +133,6 @@ export declare class MultiSelectComboBoxMixinClass<TItem> {
176
133
  */
177
134
  loading: boolean;
178
135
 
179
- /**
180
- * A space-delimited list of CSS class names to set on the overlay element.
181
- *
182
- * @attr {string} overlay-class
183
- */
184
- overlayClass: string;
185
-
186
- /**
187
- * True if the dropdown is open, false otherwise.
188
- */
189
- opened: boolean;
190
-
191
- /**
192
- * Number of items fetched at a time from the data provider.
193
- * @attr {number} page-size
194
- */
195
- pageSize: number;
196
-
197
136
  /**
198
137
  * A hint to the user of what can be entered in the control.
199
138
  * The placeholder will be only displayed in the case when
@@ -226,16 +165,6 @@ export declare class MultiSelectComboBoxMixinClass<TItem> {
226
165
  */
227
166
  selectedItemsOnTop: boolean;
228
167
 
229
- /**
230
- * Total number of items.
231
- */
232
- size: number | undefined;
233
-
234
- /**
235
- * Clears the cached pages and reloads data from data provider when needed.
236
- */
237
- clearCache(): void;
238
-
239
168
  /**
240
169
  * Clears the selected items.
241
170
  */