@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.
- 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 +18 -89
- package/src/vaadin-multi-select-combo-box-mixin.js +426 -307
- 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 +13 -6
- package/src/vaadin-multi-select-combo-box.js +37 -88
- package/vaadin-multi-select-combo-box.js +1 -1
- package/web-types.json +205 -230
- package/web-types.lit.json +78 -78
- 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 -47
- 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/src/vaadin-multi-select-combo-box-internal-mixin.js +0 -446
- package/src/vaadin-multi-select-combo-box-internal.js +0 -57
- 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
|
@@ -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.
|
|
@@ -8,6 +8,9 @@ import type { DisabledMixinClass } from '@vaadin/a11y-base/src/disabled-mixin.js
|
|
|
8
8
|
import type { FocusMixinClass } from '@vaadin/a11y-base/src/focus-mixin.js';
|
|
9
9
|
import type { KeyboardMixinClass } from '@vaadin/a11y-base/src/keyboard-mixin.js';
|
|
10
10
|
import type { ComboBoxDefaultItem } from '@vaadin/combo-box/src/vaadin-combo-box.js';
|
|
11
|
+
import type { ComboBoxBaseMixinClass } from '@vaadin/combo-box/src/vaadin-combo-box-base-mixin.js';
|
|
12
|
+
import type { ComboBoxDataProviderMixinClass } from '@vaadin/combo-box/src/vaadin-combo-box-data-provider-mixin.js';
|
|
13
|
+
import type { ComboBoxItemsMixinClass } from '@vaadin/combo-box/src/vaadin-combo-box-items-mixin.js';
|
|
11
14
|
import type { DelegateStateMixinClass } from '@vaadin/component-base/src/delegate-state-mixin.js';
|
|
12
15
|
import type { ElementMixinClass } from '@vaadin/component-base/src/element-mixin.js';
|
|
13
16
|
import type { ResizeMixinClass } from '@vaadin/component-base/src/resize-mixin.js';
|
|
@@ -101,11 +104,15 @@ export interface MultiSelectComboBoxEventMap<TItem> extends HTMLElementEventMap
|
|
|
101
104
|
* `chips` | The element that wraps slotted chips for selected items
|
|
102
105
|
* `label` | The label element
|
|
103
106
|
* `input-field` | The element that wraps prefix, value and suffix
|
|
107
|
+
* `field-button` | Set on both clear and toggle buttons
|
|
104
108
|
* `clear-button` | The clear button
|
|
105
109
|
* `error-message` | The error message element
|
|
106
110
|
* `helper-text` | The helper text element wrapper
|
|
107
111
|
* `required-indicator` | The `required` state indicator element
|
|
108
112
|
* `toggle-button` | The toggle button
|
|
113
|
+
* `overlay` | The overlay container
|
|
114
|
+
* `content` | The overlay content
|
|
115
|
+
* `loader` | The loading indicator shown while loading items
|
|
109
116
|
*
|
|
110
117
|
* The following state attributes are available for styling:
|
|
111
118
|
*
|
|
@@ -116,6 +123,7 @@ export interface MultiSelectComboBoxEventMap<TItem> extends HTMLElementEventMap
|
|
|
116
123
|
* `has-label` | Set when the element has a label
|
|
117
124
|
* `has-helper` | Set when the element has helper text or slot
|
|
118
125
|
* `has-error-message` | Set when the element has an error message
|
|
126
|
+
* `has-tooltip` | Set when the element has a slotted tooltip
|
|
119
127
|
* `invalid` | Set when the element is invalid
|
|
120
128
|
* `focused` | Set when the element is focused
|
|
121
129
|
* `focus-ring` | Set when the element is keyboard focused
|
|
@@ -137,12 +145,8 @@ export interface MultiSelectComboBoxEventMap<TItem> extends HTMLElementEventMap
|
|
|
137
145
|
* In addition to `<vaadin-multi-select-combo-box>` itself, the following internal
|
|
138
146
|
* components are themable:
|
|
139
147
|
*
|
|
140
|
-
* - `<vaadin-multi-select-combo-box-
|
|
148
|
+
* - `<vaadin-multi-select-combo-box-chip>`
|
|
141
149
|
* - `<vaadin-multi-select-combo-box-item>` - has the same API as `<vaadin-item>`.
|
|
142
|
-
* - `<vaadin-multi-select-combo-box-container>` - has the same API as `<vaadin-input-container>`.
|
|
143
|
-
*
|
|
144
|
-
* Note: the `theme` attribute value set on `<vaadin-multi-select-combo-box>` is
|
|
145
|
-
* propagated to these components.
|
|
146
150
|
*
|
|
147
151
|
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
148
152
|
*
|
|
@@ -169,7 +173,10 @@ declare class MultiSelectComboBox<TItem = ComboBoxDefaultItem> extends HTMLEleme
|
|
|
169
173
|
}
|
|
170
174
|
|
|
171
175
|
interface MultiSelectComboBox<TItem = ComboBoxDefaultItem>
|
|
172
|
-
extends
|
|
176
|
+
extends ComboBoxBaseMixinClass,
|
|
177
|
+
ComboBoxDataProviderMixinClass<TItem>,
|
|
178
|
+
ComboBoxItemsMixinClass<TItem>,
|
|
179
|
+
ValidateMixinClass,
|
|
173
180
|
SlotStylesMixinClass,
|
|
174
181
|
LabelMixinClass,
|
|
175
182
|
KeyboardMixinClass,
|
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import './vaadin-multi-select-combo-box-chip.js';
|
|
7
7
|
import './vaadin-multi-select-combo-box-container.js';
|
|
8
|
-
import './vaadin-multi-select-combo-box-
|
|
8
|
+
import './vaadin-multi-select-combo-box-item.js';
|
|
9
|
+
import './vaadin-multi-select-combo-box-overlay.js';
|
|
10
|
+
import './vaadin-multi-select-combo-box-scroller.js';
|
|
9
11
|
import { html, LitElement } from 'lit';
|
|
10
12
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
11
13
|
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
@@ -14,7 +16,7 @@ import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
|
14
16
|
import { inputFieldShared } from '@vaadin/field-base/src/styles/input-field-shared-styles.js';
|
|
15
17
|
import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
|
|
16
18
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
17
|
-
import { multiSelectComboBoxStyles } from './styles/vaadin-multi-select-combo-box-
|
|
19
|
+
import { multiSelectComboBoxStyles } from './styles/vaadin-multi-select-combo-box-base-styles.js';
|
|
18
20
|
import { MultiSelectComboBoxMixin } from './vaadin-multi-select-combo-box-mixin.js';
|
|
19
21
|
|
|
20
22
|
/**
|
|
@@ -40,11 +42,15 @@ import { MultiSelectComboBoxMixin } from './vaadin-multi-select-combo-box-mixin.
|
|
|
40
42
|
* `chips` | The element that wraps slotted chips for selected items
|
|
41
43
|
* `label` | The label element
|
|
42
44
|
* `input-field` | The element that wraps prefix, value and suffix
|
|
45
|
+
* `field-button` | Set on both clear and toggle buttons
|
|
43
46
|
* `clear-button` | The clear button
|
|
44
47
|
* `error-message` | The error message element
|
|
45
48
|
* `helper-text` | The helper text element wrapper
|
|
46
49
|
* `required-indicator` | The `required` state indicator element
|
|
47
50
|
* `toggle-button` | The toggle button
|
|
51
|
+
* `overlay` | The overlay container
|
|
52
|
+
* `content` | The overlay content
|
|
53
|
+
* `loader` | The loading indicator shown while loading items
|
|
48
54
|
*
|
|
49
55
|
* The following state attributes are available for styling:
|
|
50
56
|
*
|
|
@@ -55,6 +61,7 @@ import { MultiSelectComboBoxMixin } from './vaadin-multi-select-combo-box-mixin.
|
|
|
55
61
|
* `has-label` | Set when the element has a label
|
|
56
62
|
* `has-helper` | Set when the element has helper text or slot
|
|
57
63
|
* `has-error-message` | Set when the element has an error message
|
|
64
|
+
* `has-tooltip` | Set when the element has a slotted tooltip
|
|
58
65
|
* `invalid` | Set when the element is invalid
|
|
59
66
|
* `focused` | Set when the element is focused
|
|
60
67
|
* `focus-ring` | Set when the element is keyboard focused
|
|
@@ -76,12 +83,8 @@ import { MultiSelectComboBoxMixin } from './vaadin-multi-select-combo-box-mixin.
|
|
|
76
83
|
* In addition to `<vaadin-multi-select-combo-box>` itself, the following internal
|
|
77
84
|
* components are themable:
|
|
78
85
|
*
|
|
79
|
-
* - `<vaadin-multi-select-combo-box-
|
|
86
|
+
* - `<vaadin-multi-select-combo-box-chip>`
|
|
80
87
|
* - `<vaadin-multi-select-combo-box-item>` - has the same API as `<vaadin-item>`.
|
|
81
|
-
* - `<vaadin-multi-select-combo-box-container>` - has the same API as `<vaadin-input-container>`.
|
|
82
|
-
*
|
|
83
|
-
* Note: the `theme` attribute value set on `<vaadin-multi-select-combo-box>` is
|
|
84
|
-
* propagated to these components.
|
|
85
88
|
*
|
|
86
89
|
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
87
90
|
*
|
|
@@ -119,65 +122,22 @@ class MultiSelectComboBox extends MultiSelectComboBoxMixin(
|
|
|
119
122
|
<span part="required-indicator" aria-hidden="true" @click="${this.focus}"></span>
|
|
120
123
|
</div>
|
|
121
124
|
|
|
122
|
-
<vaadin-multi-select-combo-box-
|
|
123
|
-
|
|
124
|
-
.
|
|
125
|
-
.filteredItems="${this.filteredItems}"
|
|
126
|
-
.items="${this.items}"
|
|
127
|
-
.itemIdPath="${this.itemIdPath}"
|
|
128
|
-
.itemLabelPath="${this.itemLabelPath}"
|
|
129
|
-
.itemValuePath="${this.itemValuePath}"
|
|
130
|
-
.disabled="${this.disabled}"
|
|
125
|
+
<vaadin-multi-select-combo-box-container
|
|
126
|
+
part="input-field"
|
|
127
|
+
.autoExpandVertically="${this.autoExpandVertically}"
|
|
131
128
|
.readonly="${this.readonly}"
|
|
132
|
-
.
|
|
133
|
-
.
|
|
134
|
-
.overlayClass="${this.overlayClass}"
|
|
135
|
-
.dataProvider="${this.dataProvider}"
|
|
136
|
-
.filter="${this.filter}"
|
|
137
|
-
.lastFilter="${this._lastFilter}"
|
|
138
|
-
.loading="${this.loading}"
|
|
139
|
-
.size="${this.size}"
|
|
140
|
-
.selectedItems="${this.selectedItems}"
|
|
141
|
-
.selectedItemsOnTop="${this.selectedItemsOnTop}"
|
|
142
|
-
.itemClassNameGenerator="${this.itemClassNameGenerator}"
|
|
143
|
-
.topGroup="${this._topGroup}"
|
|
144
|
-
.opened="${this.opened}"
|
|
145
|
-
.renderer="${this.renderer}"
|
|
146
|
-
.keepFilter="${this.keepFilter}"
|
|
129
|
+
.disabled="${this.disabled}"
|
|
130
|
+
.invalid="${this.invalid}"
|
|
147
131
|
theme="${ifDefined(this._theme)}"
|
|
148
|
-
@combo-box-item-selected="${this._onComboBoxItemSelected}"
|
|
149
|
-
@change="${this._onComboBoxChange}"
|
|
150
|
-
@custom-value-set="${this._onCustomValueSet}"
|
|
151
|
-
@filtered-items-changed="${this._onFilteredItemsChanged}"
|
|
152
|
-
@filter-changed="${this._onComboBoxFilterChanged}"
|
|
153
|
-
@last-filter-changed="${this._onComboBoxLastFilterChanged}"
|
|
154
|
-
@loading-changed="${this._onComboBoxLoadingChanged}"
|
|
155
|
-
@opened-changed="${this._onComboBoxOpenedChanged}"
|
|
156
|
-
@size-changed="${this._onComboBoxSizeChanged}"
|
|
157
132
|
>
|
|
158
|
-
<
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
<slot name="overflow" slot="prefix"></slot>
|
|
167
|
-
<div id="chips" part="chips" slot="prefix">
|
|
168
|
-
<slot name="chip"></slot>
|
|
169
|
-
</div>
|
|
170
|
-
<slot name="input"></slot>
|
|
171
|
-
<div
|
|
172
|
-
id="clearButton"
|
|
173
|
-
part="clear-button"
|
|
174
|
-
slot="suffix"
|
|
175
|
-
@touchend="${this._onClearButtonTouchend}"
|
|
176
|
-
aria-hidden="true"
|
|
177
|
-
></div>
|
|
178
|
-
<div id="toggleButton" class="toggle-button" part="toggle-button" slot="suffix" aria-hidden="true"></div>
|
|
179
|
-
</vaadin-multi-select-combo-box-container>
|
|
180
|
-
</vaadin-multi-select-combo-box-internal>
|
|
133
|
+
<slot name="overflow" slot="prefix"></slot>
|
|
134
|
+
<div id="chips" part="chips" slot="prefix">
|
|
135
|
+
<slot name="chip"></slot>
|
|
136
|
+
</div>
|
|
137
|
+
<slot name="input"></slot>
|
|
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>
|
|
140
|
+
</vaadin-multi-select-combo-box-container>
|
|
181
141
|
|
|
182
142
|
<div part="helper-text">
|
|
183
143
|
<slot name="helper"></slot>
|
|
@@ -188,34 +148,23 @@ class MultiSelectComboBox extends MultiSelectComboBoxMixin(
|
|
|
188
148
|
</div>
|
|
189
149
|
</div>
|
|
190
150
|
|
|
151
|
+
<vaadin-multi-select-combo-box-overlay
|
|
152
|
+
id="overlay"
|
|
153
|
+
exportparts="overlay, content, loader"
|
|
154
|
+
.owner="${this}"
|
|
155
|
+
.dir="${this.dir}"
|
|
156
|
+
.opened="${this._overlayOpened}"
|
|
157
|
+
?loading="${this.loading}"
|
|
158
|
+
theme="${ifDefined(this._theme)}"
|
|
159
|
+
.positionTarget="${this._inputField}"
|
|
160
|
+
no-vertical-overlap
|
|
161
|
+
>
|
|
162
|
+
<slot name="overlay"></slot>
|
|
163
|
+
</vaadin-multi-select-combo-box-overlay>
|
|
164
|
+
|
|
191
165
|
<slot name="tooltip"></slot>
|
|
192
166
|
`;
|
|
193
167
|
}
|
|
194
|
-
|
|
195
|
-
/** @private */
|
|
196
|
-
_onComboBoxFilterChanged(event) {
|
|
197
|
-
this.filter = event.detail.value;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/** @private */
|
|
201
|
-
_onComboBoxLoadingChanged(event) {
|
|
202
|
-
this.loading = event.detail.value;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
/** @private */
|
|
206
|
-
_onComboBoxLastFilterChanged(event) {
|
|
207
|
-
this._lastFilter = event.detail.value;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
/** @private */
|
|
211
|
-
_onComboBoxOpenedChanged(event) {
|
|
212
|
-
this.opened = event.detail.value;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
/** @private */
|
|
216
|
-
_onComboBoxSizeChanged(event) {
|
|
217
|
-
this.size = event.detail.value;
|
|
218
|
-
}
|
|
219
168
|
}
|
|
220
169
|
|
|
221
170
|
defineCustomElement(MultiSelectComboBox);
|
|
@@ -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';
|