@vaadin/time-picker 25.0.0-alpha1 → 25.0.0-alpha10
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 -13
- package/src/styles/vaadin-time-picker-base-styles.d.ts +8 -0
- package/src/styles/vaadin-time-picker-base-styles.js +27 -0
- package/src/styles/vaadin-time-picker-core-styles.d.ts +8 -0
- package/src/styles/vaadin-time-picker-core-styles.js +26 -0
- package/src/styles/vaadin-time-picker-overlay-base-styles.js +22 -0
- package/src/styles/vaadin-time-picker-overlay-core-styles.js +18 -0
- package/src/styles/vaadin-time-picker-scroller-base-styles.js +8 -0
- package/src/styles/vaadin-time-picker-scroller-core-styles.js +27 -0
- package/src/vaadin-time-picker-item.js +7 -11
- package/src/vaadin-time-picker-mixin.d.ts +4 -28
- package/src/vaadin-time-picker-mixin.js +158 -84
- package/src/vaadin-time-picker-overlay.js +5 -16
- package/src/vaadin-time-picker-scroller.js +3 -24
- package/src/vaadin-time-picker.d.ts +5 -4
- package/src/vaadin-time-picker.js +36 -61
- package/web-types.json +108 -112
- package/web-types.lit.json +33 -33
- package/src/vaadin-time-picker-combo-box.js +0 -92
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/time-picker",
|
|
3
|
-
"version": "25.0.0-
|
|
3
|
+
"version": "25.0.0-alpha10",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -21,6 +21,8 @@
|
|
|
21
21
|
"type": "module",
|
|
22
22
|
"files": [
|
|
23
23
|
"src",
|
|
24
|
+
"!src/styles/*-base-styles.d.ts",
|
|
25
|
+
"!src/styles/*-base-styles.js",
|
|
24
26
|
"theme",
|
|
25
27
|
"vaadin-*.d.ts",
|
|
26
28
|
"vaadin-*.js",
|
|
@@ -35,25 +37,25 @@
|
|
|
35
37
|
],
|
|
36
38
|
"dependencies": {
|
|
37
39
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
|
-
"@vaadin/combo-box": "25.0.0-
|
|
39
|
-
"@vaadin/component-base": "25.0.0-
|
|
40
|
-
"@vaadin/field-base": "25.0.0-
|
|
41
|
-
"@vaadin/input-container": "25.0.0-
|
|
42
|
-
"@vaadin/item": "25.0.0-
|
|
43
|
-
"@vaadin/overlay": "25.0.0-
|
|
44
|
-
"@vaadin/vaadin-lumo-styles": "25.0.0-
|
|
45
|
-
"@vaadin/vaadin-themable-mixin": "25.0.0-
|
|
40
|
+
"@vaadin/combo-box": "25.0.0-alpha10",
|
|
41
|
+
"@vaadin/component-base": "25.0.0-alpha10",
|
|
42
|
+
"@vaadin/field-base": "25.0.0-alpha10",
|
|
43
|
+
"@vaadin/input-container": "25.0.0-alpha10",
|
|
44
|
+
"@vaadin/item": "25.0.0-alpha10",
|
|
45
|
+
"@vaadin/overlay": "25.0.0-alpha10",
|
|
46
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-alpha10",
|
|
47
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha10",
|
|
46
48
|
"lit": "^3.0.0"
|
|
47
49
|
},
|
|
48
50
|
"devDependencies": {
|
|
49
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
50
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
51
|
-
"@vaadin/testing-helpers": "^
|
|
51
|
+
"@vaadin/chai-plugins": "25.0.0-alpha10",
|
|
52
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha10",
|
|
53
|
+
"@vaadin/testing-helpers": "^2.0.0",
|
|
52
54
|
"sinon": "^18.0.0"
|
|
53
55
|
},
|
|
54
56
|
"web-types": [
|
|
55
57
|
"web-types.json",
|
|
56
58
|
"web-types.lit.json"
|
|
57
59
|
],
|
|
58
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "6cc6c94079e805fa5b2f0af4dbf3b2a7485e57d0"
|
|
59
61
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2018 - 2025 Vaadin Ltd.
|
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
+
*/
|
|
6
|
+
import '@vaadin/component-base/src/style-props.js';
|
|
7
|
+
import { css } from 'lit';
|
|
8
|
+
|
|
9
|
+
export const timePickerStyles = css`
|
|
10
|
+
:host([opened]) {
|
|
11
|
+
pointer-events: auto;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
[part='toggle-button']::before {
|
|
15
|
+
mask-image: var(--_vaadin-icon-clock);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* See https://github.com/vaadin/vaadin-time-picker/issues/145 */
|
|
19
|
+
:host([dir='rtl']) [part='input-field'] {
|
|
20
|
+
direction: ltr;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:host([dir='rtl']) [part='input-field'] ::slotted(input)::placeholder {
|
|
24
|
+
direction: rtl;
|
|
25
|
+
text-align: left;
|
|
26
|
+
}
|
|
27
|
+
`;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2018 - 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 timePickerStyles = css`
|
|
9
|
+
:host([opened]) {
|
|
10
|
+
pointer-events: auto;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* See https://github.com/vaadin/vaadin-time-picker/issues/145 */
|
|
14
|
+
:host([dir='rtl']) [part='input-field'] {
|
|
15
|
+
direction: ltr;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
:host([dir='rtl']) [part='input-field'] ::slotted(input)::placeholder {
|
|
19
|
+
direction: rtl;
|
|
20
|
+
text-align: left;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
[part~='toggle-button'] {
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2018 - 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 timePickerOverlayStyles = css`
|
|
9
|
+
:host {
|
|
10
|
+
--vaadin-item-checkmark-display: block;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
#overlay {
|
|
14
|
+
width: var(--vaadin-time-picker-overlay-width, var(--_vaadin-time-picker-overlay-default-width, auto));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
[part='content'] {
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
height: 100%;
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2018 - 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 timePickerOverlayStyles = css`
|
|
9
|
+
#overlay {
|
|
10
|
+
width: var(--vaadin-time-picker-overlay-width, var(--_vaadin-time-picker-overlay-default-width, auto));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
[part='content'] {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
height: 100%;
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2018 - 2025 Vaadin Ltd.
|
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
+
*/
|
|
6
|
+
import { comboBoxScrollerStyles } from '@vaadin/combo-box/src/styles/vaadin-combo-box-scroller-base-styles.js';
|
|
7
|
+
|
|
8
|
+
export { comboBoxScrollerStyles as timePickerScrollerStyles };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2018 - 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 timePickerScrollerStyles = 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-time-picker-items-container-border-width);
|
|
23
|
+
border-style: var(--_vaadin-time-picker-items-container-border-style);
|
|
24
|
+
border-color: var(--_vaadin-time-picker-items-container-border-color, transparent);
|
|
25
|
+
position: relative;
|
|
26
|
+
}
|
|
27
|
+
`;
|
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
* Copyright (c) 2018 - 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 {
|
|
6
|
+
import { html, LitElement } from 'lit';
|
|
7
7
|
import { ComboBoxItemMixin } from '@vaadin/combo-box/src/vaadin-combo-box-item-mixin.js';
|
|
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';
|
|
12
|
+
import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
|
|
11
13
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
12
14
|
|
|
13
15
|
/**
|
|
@@ -37,21 +39,15 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
|
|
|
37
39
|
* @mixes DirMixin
|
|
38
40
|
* @private
|
|
39
41
|
*/
|
|
40
|
-
export class TimePickerItem extends ComboBoxItemMixin(
|
|
42
|
+
export class TimePickerItem extends ComboBoxItemMixin(
|
|
43
|
+
ThemableMixin(DirMixin(PolylitMixin(LumoInjectionMixin(LitElement)))),
|
|
44
|
+
) {
|
|
41
45
|
static get is() {
|
|
42
46
|
return 'vaadin-time-picker-item';
|
|
43
47
|
}
|
|
44
48
|
|
|
45
49
|
static get styles() {
|
|
46
|
-
return
|
|
47
|
-
:host {
|
|
48
|
-
display: block;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
:host([hidden]) {
|
|
52
|
-
display: none !important;
|
|
53
|
-
}
|
|
54
|
-
`;
|
|
50
|
+
return itemStyles;
|
|
55
51
|
}
|
|
56
52
|
|
|
57
53
|
/** @protected */
|
|
@@ -8,7 +8,9 @@ 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 { ComboBoxBaseMixinClass } from '@vaadin/combo-box/src/vaadin-combo-box-base-mixin.js';
|
|
11
12
|
import type { DelegateStateMixinClass } from '@vaadin/component-base/src/delegate-state-mixin.js';
|
|
13
|
+
import type { OverlayClassMixinClass } from '@vaadin/component-base/src/overlay-class-mixin.js';
|
|
12
14
|
import type { SlotStylesMixinClass } from '@vaadin/component-base/src/slot-styles-mixin.js';
|
|
13
15
|
import type { ClearButtonMixinClass } from '@vaadin/field-base/src/clear-button-mixin.js';
|
|
14
16
|
import type { FieldMixinClass } from '@vaadin/field-base/src/field-mixin.js';
|
|
@@ -31,6 +33,7 @@ export interface TimePickerI18n {
|
|
|
31
33
|
export declare function TimePickerMixin<T extends Constructor<HTMLElement>>(
|
|
32
34
|
base: T,
|
|
33
35
|
): Constructor<ClearButtonMixinClass> &
|
|
36
|
+
Constructor<ComboBoxBaseMixinClass> &
|
|
34
37
|
Constructor<DelegateFocusMixinClass> &
|
|
35
38
|
Constructor<DelegateStateMixinClass> &
|
|
36
39
|
Constructor<DisabledMixinClass> &
|
|
@@ -41,6 +44,7 @@ export declare function TimePickerMixin<T extends Constructor<HTMLElement>>(
|
|
|
41
44
|
Constructor<InputMixinClass> &
|
|
42
45
|
Constructor<KeyboardMixinClass> &
|
|
43
46
|
Constructor<LabelMixinClass> &
|
|
47
|
+
Constructor<OverlayClassMixinClass> &
|
|
44
48
|
Constructor<PatternMixinClass> &
|
|
45
49
|
Constructor<SlotStylesMixinClass> &
|
|
46
50
|
Constructor<TimePickerMixinClass> &
|
|
@@ -58,11 +62,6 @@ export declare class TimePickerMixinClass {
|
|
|
58
62
|
*/
|
|
59
63
|
value: string;
|
|
60
64
|
|
|
61
|
-
/**
|
|
62
|
-
* True if the dropdown is open, false otherwise.
|
|
63
|
-
*/
|
|
64
|
-
opened: boolean;
|
|
65
|
-
|
|
66
65
|
/**
|
|
67
66
|
* Minimum time allowed.
|
|
68
67
|
*
|
|
@@ -101,19 +100,6 @@ export declare class TimePickerMixinClass {
|
|
|
101
100
|
*/
|
|
102
101
|
step: number | null | undefined;
|
|
103
102
|
|
|
104
|
-
/**
|
|
105
|
-
* Set true to prevent the overlay from opening automatically.
|
|
106
|
-
* @attr {boolean} auto-open-disabled
|
|
107
|
-
*/
|
|
108
|
-
autoOpenDisabled: boolean | null | undefined;
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* A space-delimited list of CSS class names to set on the overlay element.
|
|
112
|
-
*
|
|
113
|
-
* @attr {string} overlay-class
|
|
114
|
-
*/
|
|
115
|
-
overlayClass: string;
|
|
116
|
-
|
|
117
103
|
/**
|
|
118
104
|
* The object used to localize this component.
|
|
119
105
|
* To change the default localization, replace the entire
|
|
@@ -144,14 +130,4 @@ export declare class TimePickerMixinClass {
|
|
|
144
130
|
* to ensure the component works properly.
|
|
145
131
|
*/
|
|
146
132
|
i18n: TimePickerI18n;
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Opens the dropdown list.
|
|
150
|
-
*/
|
|
151
|
-
open(): void;
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Closes the dropdown list.
|
|
155
|
-
*/
|
|
156
|
-
close(): void;
|
|
157
133
|
}
|