@vaadin/combo-box 23.2.0-alpha2 → 23.2.0-alpha5
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 +20 -14
- package/src/lit/renderer-directives.d.ts +3 -3
- package/src/vaadin-combo-box-data-provider-mixin.d.ts +3 -3
- package/src/vaadin-combo-box-data-provider-mixin.js +29 -31
- package/src/vaadin-combo-box-light.d.ts +21 -10
- package/src/vaadin-combo-box-light.js +4 -2
- package/src/vaadin-combo-box-mixin.d.ts +8 -24
- package/src/vaadin-combo-box-mixin.js +53 -69
- package/src/vaadin-combo-box.d.ts +31 -20
- package/src/vaadin-combo-box.js +2 -1
- package/web-types.json +1054 -0
- package/web-types.lit.json +496 -0
|
@@ -3,24 +3,25 @@
|
|
|
3
3
|
* Copyright (c) 2015 - 2022 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import { ControllerMixinClass } from '@vaadin/component-base/src/controller-mixin.js';
|
|
7
|
-
import { DisabledMixinClass } from '@vaadin/component-base/src/disabled-mixin.js';
|
|
8
|
-
import { ElementMixinClass } from '@vaadin/component-base/src/element-mixin.js';
|
|
9
|
-
import { FocusMixinClass } from '@vaadin/component-base/src/focus-mixin.js';
|
|
10
|
-
import { KeyboardMixinClass } from '@vaadin/component-base/src/keyboard-mixin.js';
|
|
11
|
-
import { DelegateFocusMixinClass } from '@vaadin/field-base/src/delegate-focus-mixin.js';
|
|
12
|
-
import { DelegateStateMixinClass } from '@vaadin/field-base/src/delegate-state-mixin.js';
|
|
13
|
-
import { FieldMixinClass } from '@vaadin/field-base/src/field-mixin.js';
|
|
14
|
-
import { InputConstraintsMixinClass } from '@vaadin/field-base/src/input-constraints-mixin.js';
|
|
15
|
-
import { InputControlMixinClass } from '@vaadin/field-base/src/input-control-mixin.js';
|
|
16
|
-
import { InputMixinClass } from '@vaadin/field-base/src/input-mixin.js';
|
|
17
|
-
import { LabelMixinClass } from '@vaadin/field-base/src/label-mixin.js';
|
|
18
|
-
import { PatternMixinClass } from '@vaadin/field-base/src/pattern-mixin.js';
|
|
19
|
-
import { ValidateMixinClass } from '@vaadin/field-base/src/validate-mixin.js';
|
|
20
|
-
import { ThemableMixinClass } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
6
|
+
import type { ControllerMixinClass } from '@vaadin/component-base/src/controller-mixin.js';
|
|
7
|
+
import type { DisabledMixinClass } from '@vaadin/component-base/src/disabled-mixin.js';
|
|
8
|
+
import type { ElementMixinClass } from '@vaadin/component-base/src/element-mixin.js';
|
|
9
|
+
import type { FocusMixinClass } from '@vaadin/component-base/src/focus-mixin.js';
|
|
10
|
+
import type { KeyboardMixinClass } from '@vaadin/component-base/src/keyboard-mixin.js';
|
|
11
|
+
import type { DelegateFocusMixinClass } from '@vaadin/field-base/src/delegate-focus-mixin.js';
|
|
12
|
+
import type { DelegateStateMixinClass } from '@vaadin/field-base/src/delegate-state-mixin.js';
|
|
13
|
+
import type { FieldMixinClass } from '@vaadin/field-base/src/field-mixin.js';
|
|
14
|
+
import type { InputConstraintsMixinClass } from '@vaadin/field-base/src/input-constraints-mixin.js';
|
|
15
|
+
import type { InputControlMixinClass } from '@vaadin/field-base/src/input-control-mixin.js';
|
|
16
|
+
import type { InputMixinClass } from '@vaadin/field-base/src/input-mixin.js';
|
|
17
|
+
import type { LabelMixinClass } from '@vaadin/field-base/src/label-mixin.js';
|
|
18
|
+
import type { PatternMixinClass } from '@vaadin/field-base/src/pattern-mixin.js';
|
|
19
|
+
import type { ValidateMixinClass } from '@vaadin/field-base/src/validate-mixin.js';
|
|
20
|
+
import type { ThemableMixinClass } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
21
|
+
import type { ThemePropertyMixinClass } from '@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js';
|
|
22
|
+
import type { ComboBoxDataProviderMixinClass } from './vaadin-combo-box-data-provider-mixin.js';
|
|
23
|
+
import type { ComboBoxMixinClass } from './vaadin-combo-box-mixin.js';
|
|
24
|
+
import type { ComboBoxDefaultItem } from './vaadin-combo-box-mixin.js';
|
|
24
25
|
export {
|
|
25
26
|
ComboBoxDataProvider,
|
|
26
27
|
ComboBoxDataProviderCallback,
|
|
@@ -65,6 +66,11 @@ export type ComboBoxFilterChangedEvent = CustomEvent<{ value: string }>;
|
|
|
65
66
|
*/
|
|
66
67
|
export type ComboBoxSelectedItemChangedEvent<TItem> = CustomEvent<{ value: TItem | null | undefined }>;
|
|
67
68
|
|
|
69
|
+
/**
|
|
70
|
+
* Fired whenever the field is validated.
|
|
71
|
+
*/
|
|
72
|
+
export type ComboBoxValidatedEvent = CustomEvent<{ valid: boolean }>;
|
|
73
|
+
|
|
68
74
|
export interface ComboBoxEventMap<TItem> extends HTMLElementEventMap {
|
|
69
75
|
change: ComboBoxChangeEvent<TItem>;
|
|
70
76
|
|
|
@@ -79,6 +85,8 @@ export interface ComboBoxEventMap<TItem> extends HTMLElementEventMap {
|
|
|
79
85
|
'value-changed': ComboBoxValueChangedEvent;
|
|
80
86
|
|
|
81
87
|
'selected-item-changed': ComboBoxSelectedItemChangedEvent<TItem>;
|
|
88
|
+
|
|
89
|
+
validated: ComboBoxValidatedEvent;
|
|
82
90
|
}
|
|
83
91
|
|
|
84
92
|
/**
|
|
@@ -165,6 +173,7 @@ export interface ComboBoxEventMap<TItem> extends HTMLElementEventMap {
|
|
|
165
173
|
* Custom property | Description | Default
|
|
166
174
|
* ----------------------------------------|----------------------------|---------
|
|
167
175
|
* `--vaadin-field-default-width` | Default width of the field | `12em`
|
|
176
|
+
* `--vaadin-combo-box-overlay-width` | Width of the overlay | `auto`
|
|
168
177
|
* `--vaadin-combo-box-overlay-max-height` | Max height of the overlay | `65vh`
|
|
169
178
|
*
|
|
170
179
|
* `<vaadin-combo-box>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.
|
|
@@ -207,18 +216,19 @@ export interface ComboBoxEventMap<TItem> extends HTMLElementEventMap {
|
|
|
207
216
|
* @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
|
|
208
217
|
* @fires {CustomEvent} selected-item-changed - Fired when the `selectedItem` property changes.
|
|
209
218
|
* @fires {CustomEvent} value-changed - Fired when the `value` property changes.
|
|
219
|
+
* @fires {CustomEvent} validated - Fired whenever the field is validated.
|
|
210
220
|
*/
|
|
211
221
|
declare class ComboBox<TItem = ComboBoxDefaultItem> extends HTMLElement {
|
|
212
222
|
addEventListener<K extends keyof ComboBoxEventMap<TItem>>(
|
|
213
223
|
type: K,
|
|
214
224
|
listener: (this: ComboBox<TItem>, ev: ComboBoxEventMap<TItem>[K]) => void,
|
|
215
|
-
options?:
|
|
225
|
+
options?: AddEventListenerOptions | boolean,
|
|
216
226
|
): void;
|
|
217
227
|
|
|
218
228
|
removeEventListener<K extends keyof ComboBoxEventMap<TItem>>(
|
|
219
229
|
type: K,
|
|
220
230
|
listener: (this: ComboBox<TItem>, ev: ComboBoxEventMap<TItem>[K]) => void,
|
|
221
|
-
options?:
|
|
231
|
+
options?: EventListenerOptions | boolean,
|
|
222
232
|
): void;
|
|
223
233
|
}
|
|
224
234
|
|
|
@@ -238,6 +248,7 @@ interface ComboBox<TItem = ComboBoxDefaultItem>
|
|
|
238
248
|
DelegateStateMixinClass,
|
|
239
249
|
DelegateFocusMixinClass,
|
|
240
250
|
ThemableMixinClass,
|
|
251
|
+
ThemePropertyMixinClass,
|
|
241
252
|
ElementMixinClass,
|
|
242
253
|
ControllerMixinClass {}
|
|
243
254
|
|
package/src/vaadin-combo-box.js
CHANGED
|
@@ -104,6 +104,7 @@ registerStyles('vaadin-combo-box', inputFieldShared, { moduleId: 'vaadin-combo-b
|
|
|
104
104
|
* Custom property | Description | Default
|
|
105
105
|
* ----------------------------------------|----------------------------|---------
|
|
106
106
|
* `--vaadin-field-default-width` | Default width of the field | `12em`
|
|
107
|
+
* `--vaadin-combo-box-overlay-width` | Width of the overlay | `auto`
|
|
107
108
|
* `--vaadin-combo-box-overlay-max-height` | Max height of the overlay | `65vh`
|
|
108
109
|
*
|
|
109
110
|
* `<vaadin-combo-box>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.
|
|
@@ -146,6 +147,7 @@ registerStyles('vaadin-combo-box', inputFieldShared, { moduleId: 'vaadin-combo-b
|
|
|
146
147
|
* @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
|
|
147
148
|
* @fires {CustomEvent} selected-item-changed - Fired when the `selectedItem` property changes.
|
|
148
149
|
* @fires {CustomEvent} value-changed - Fired when the `value` property changes.
|
|
150
|
+
* @fires {CustomEvent} validated - Fired whenever the field is validated.
|
|
149
151
|
*
|
|
150
152
|
* @extends HTMLElement
|
|
151
153
|
* @mixes ElementMixin
|
|
@@ -200,7 +202,6 @@ class ComboBox extends ComboBoxDataProviderMixin(
|
|
|
200
202
|
|
|
201
203
|
<vaadin-combo-box-overlay
|
|
202
204
|
id="overlay"
|
|
203
|
-
hidden$="[[_isOverlayHidden(filteredItems, loading)]]"
|
|
204
205
|
opened="[[_overlayOpened]]"
|
|
205
206
|
loading$="[[loading]]"
|
|
206
207
|
theme$="[[_theme]]"
|