@vaadin/combo-box 25.0.0-alpha2 → 25.0.0-alpha4
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 +13 -13
- package/src/styles/vaadin-combo-box-base-styles.js +7 -5
- package/src/styles/vaadin-combo-box-overlay-base-styles.js +45 -43
- package/src/styles/vaadin-combo-box-scroller-base-styles.js +19 -17
- package/src/vaadin-combo-box-base-mixin.d.ts +56 -0
- package/src/vaadin-combo-box-base-mixin.js +786 -0
- package/src/vaadin-combo-box-data-provider-mixin.js +16 -11
- package/src/vaadin-combo-box-item-mixin.js +6 -1
- package/src/vaadin-combo-box-item.js +5 -2
- package/src/vaadin-combo-box-mixin.d.ts +3 -32
- package/src/vaadin-combo-box-mixin.js +91 -661
- package/src/vaadin-combo-box-overlay-mixin.js +6 -3
- package/src/vaadin-combo-box-overlay.js +3 -2
- package/src/vaadin-combo-box-scroller.js +2 -1
- package/src/vaadin-combo-box.d.ts +2 -0
- package/src/vaadin-combo-box.js +4 -1
- package/web-types.json +2 -2
- package/web-types.lit.json +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/combo-box",
|
|
3
|
-
"version": "25.0.0-
|
|
3
|
+
"version": "25.0.0-alpha4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -38,20 +38,20 @@
|
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
41
|
-
"@vaadin/a11y-base": "25.0.0-
|
|
42
|
-
"@vaadin/component-base": "25.0.0-
|
|
43
|
-
"@vaadin/field-base": "25.0.0-
|
|
44
|
-
"@vaadin/input-container": "25.0.0-
|
|
45
|
-
"@vaadin/item": "25.0.0-
|
|
46
|
-
"@vaadin/lit-renderer": "25.0.0-
|
|
47
|
-
"@vaadin/overlay": "25.0.0-
|
|
48
|
-
"@vaadin/vaadin-lumo-styles": "25.0.0-
|
|
49
|
-
"@vaadin/vaadin-themable-mixin": "25.0.0-
|
|
41
|
+
"@vaadin/a11y-base": "25.0.0-alpha4",
|
|
42
|
+
"@vaadin/component-base": "25.0.0-alpha4",
|
|
43
|
+
"@vaadin/field-base": "25.0.0-alpha4",
|
|
44
|
+
"@vaadin/input-container": "25.0.0-alpha4",
|
|
45
|
+
"@vaadin/item": "25.0.0-alpha4",
|
|
46
|
+
"@vaadin/lit-renderer": "25.0.0-alpha4",
|
|
47
|
+
"@vaadin/overlay": "25.0.0-alpha4",
|
|
48
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-alpha4",
|
|
49
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha4",
|
|
50
50
|
"lit": "^3.0.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
54
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
53
|
+
"@vaadin/chai-plugins": "25.0.0-alpha4",
|
|
54
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha4",
|
|
55
55
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
56
56
|
"sinon": "^18.0.0"
|
|
57
57
|
},
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"web-types.json",
|
|
60
60
|
"web-types.lit.json"
|
|
61
61
|
],
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "ce4421f0daf26027b863b91787a474e4cc264344"
|
|
63
63
|
}
|
|
@@ -7,11 +7,13 @@ import '@vaadin/component-base/src/style-props.js';
|
|
|
7
7
|
import { css } from 'lit';
|
|
8
8
|
|
|
9
9
|
export const comboBoxStyles = css`
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
@layer base {
|
|
11
|
+
:host([opened]) {
|
|
12
|
+
pointer-events: auto;
|
|
13
|
+
}
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
[part='toggle-button']::before {
|
|
16
|
+
mask-image: var(--_vaadin-icon-chevron-down);
|
|
17
|
+
}
|
|
16
18
|
}
|
|
17
19
|
`;
|
|
@@ -7,57 +7,59 @@ import '@vaadin/component-base/src/style-props.js';
|
|
|
7
7
|
import { css } from 'lit';
|
|
8
8
|
|
|
9
9
|
export const comboBoxOverlayStyles = css`
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
@layer base {
|
|
11
|
+
:host {
|
|
12
|
+
--vaadin-item-checkmark-display: block;
|
|
13
|
+
}
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
[part='overlay'] {
|
|
16
|
+
position: relative;
|
|
17
|
+
width: var(--vaadin-combo-box-overlay-width, var(--_vaadin-combo-box-overlay-default-width, auto));
|
|
18
|
+
}
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
20
|
+
[part='loader'] {
|
|
21
|
+
animation: spin 1s linear infinite;
|
|
22
|
+
border: 2px solid;
|
|
23
|
+
--_spinner-color: var(--vaadin-combo-box-spinner-color, var(--_vaadin-color-strong));
|
|
24
|
+
border-color: var(--_spinner-color) var(--_spinner-color) hsl(from var(--_spinner-color) h s l / 0.2)
|
|
25
|
+
hsl(from var(--_spinner-color) h s l / 0.2);
|
|
26
|
+
border-radius: var(--_vaadin-radius-full);
|
|
27
|
+
box-sizing: border-box;
|
|
28
|
+
display: none;
|
|
29
|
+
height: var(--vaadin-icon-size, 1lh);
|
|
30
|
+
inset: calc(var(--vaadin-item-overlay-padding, 4px) + 2px);
|
|
31
|
+
inset-block-end: auto;
|
|
32
|
+
inset-inline-start: auto;
|
|
33
|
+
pointer-events: none;
|
|
34
|
+
position: absolute;
|
|
35
|
+
width: var(--vaadin-icon-size, 1lh);
|
|
36
|
+
}
|
|
36
37
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
[part='content'] {
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
height: 100%;
|
|
42
|
+
}
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
:host([loading]) [part='loader'] {
|
|
45
|
+
display: block;
|
|
46
|
+
}
|
|
46
47
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
:host([loading]) [part='content'] {
|
|
49
|
+
--_items-min-height: calc(var(--vaadin-icon-size, 1lh) + 4px);
|
|
50
|
+
}
|
|
50
51
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
@keyframes spin {
|
|
53
|
+
to {
|
|
54
|
+
rotate: 1turn;
|
|
55
|
+
}
|
|
54
56
|
}
|
|
55
|
-
}
|
|
56
57
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
@media (forced-colors: active) {
|
|
59
|
+
[part='loader'] {
|
|
60
|
+
forced-color-adjust: none;
|
|
61
|
+
--vaadin-combo-box-spinner-color: CanvasText;
|
|
62
|
+
}
|
|
61
63
|
}
|
|
62
64
|
}
|
|
63
65
|
`;
|
|
@@ -6,24 +6,26 @@
|
|
|
6
6
|
import { css } from 'lit';
|
|
7
7
|
|
|
8
8
|
export const comboBoxScrollerStyles = css`
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
@layer base {
|
|
10
|
+
:host {
|
|
11
|
+
/* Fixes scrollbar disappearing when 'Show scroll bars: Always' enabled in Safari */
|
|
12
|
+
box-shadow: 0 0 0 white;
|
|
13
|
+
display: block;
|
|
14
|
+
min-height: 1px;
|
|
15
|
+
overflow: auto;
|
|
16
|
+
/* Fixes item background from getting on top of scrollbars on Safari */
|
|
17
|
+
transform: translate3d(0, 0, 0);
|
|
18
|
+
}
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
#selector {
|
|
21
|
+
border: var(--vaadin-item-overlay-padding, 4px) solid transparent;
|
|
22
|
+
position: relative;
|
|
23
|
+
forced-color-adjust: none;
|
|
24
|
+
min-height: var(--_items-min-height, auto);
|
|
25
|
+
}
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
#selector > * {
|
|
28
|
+
forced-color-adjust: auto;
|
|
29
|
+
}
|
|
28
30
|
}
|
|
29
31
|
`;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
+
*/
|
|
6
|
+
import type { Constructor } from '@open-wc/dedupe-mixin';
|
|
7
|
+
import type { DisabledMixinClass } from '@vaadin/a11y-base/src/disabled-mixin.js';
|
|
8
|
+
import type { FocusMixinClass } from '@vaadin/a11y-base/src/focus-mixin.js';
|
|
9
|
+
import type { KeyboardMixinClass } from '@vaadin/a11y-base/src/keyboard-mixin.js';
|
|
10
|
+
import type { OverlayClassMixinClass } from '@vaadin/component-base/src/overlay-class-mixin.js';
|
|
11
|
+
import type { InputMixinClass } from '@vaadin/field-base/src/input-mixin.js';
|
|
12
|
+
import type { ValidateMixinClass } from '@vaadin/field-base/src/validate-mixin.js';
|
|
13
|
+
|
|
14
|
+
export declare function ComboBoxBaseMixin<T extends Constructor<HTMLElement>>(
|
|
15
|
+
base: T,
|
|
16
|
+
): Constructor<ComboBoxBaseMixinClass> &
|
|
17
|
+
Constructor<DisabledMixinClass> &
|
|
18
|
+
Constructor<FocusMixinClass> &
|
|
19
|
+
Constructor<InputMixinClass> &
|
|
20
|
+
Constructor<KeyboardMixinClass> &
|
|
21
|
+
Constructor<OverlayClassMixinClass> &
|
|
22
|
+
Constructor<ValidateMixinClass> &
|
|
23
|
+
T;
|
|
24
|
+
|
|
25
|
+
export declare class ComboBoxBaseMixinClass {
|
|
26
|
+
/**
|
|
27
|
+
* True if the dropdown is open, false otherwise.
|
|
28
|
+
*/
|
|
29
|
+
opened: boolean;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Set true to prevent the overlay from opening automatically.
|
|
33
|
+
* @attr {boolean} auto-open-disabled
|
|
34
|
+
*/
|
|
35
|
+
autoOpenDisabled: boolean | null | undefined;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* When present, it specifies that the field is read-only.
|
|
39
|
+
*/
|
|
40
|
+
readonly: boolean;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Tag name prefix used by scroller and items.
|
|
44
|
+
*/
|
|
45
|
+
protected readonly _tagNamePrefix: string;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Opens the dropdown list.
|
|
49
|
+
*/
|
|
50
|
+
open(): void;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Closes the dropdown list.
|
|
54
|
+
*/
|
|
55
|
+
close(): void;
|
|
56
|
+
}
|