@vaadin/time-picker 25.0.0-alpha2 → 25.0.0-alpha21
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 -16
- package/src/styles/vaadin-time-picker-base-styles.js +6 -2
- package/src/vaadin-time-picker-item.js +5 -2
- package/src/vaadin-time-picker-mixin.d.ts +13 -36
- package/src/vaadin-time-picker-mixin.js +213 -132
- package/src/vaadin-time-picker-overlay.js +4 -4
- package/src/vaadin-time-picker-scroller.js +1 -1
- package/src/vaadin-time-picker.d.ts +30 -20
- package/src/vaadin-time-picker.js +59 -59
- package/vaadin-time-picker.js +1 -1
- package/web-types.json +104 -121
- package/web-types.lit.json +33 -40
- package/src/styles/vaadin-time-picker-core-styles.d.ts +0 -8
- package/src/styles/vaadin-time-picker-core-styles.js +0 -22
- package/src/styles/vaadin-time-picker-overlay-core-styles.js +0 -18
- package/src/styles/vaadin-time-picker-scroller-core-styles.js +0 -30
- package/src/vaadin-time-picker-combo-box.js +0 -92
- package/theme/lumo/vaadin-time-picker-styles.d.ts +0 -7
- package/theme/lumo/vaadin-time-picker-styles.js +0 -52
- package/theme/lumo/vaadin-time-picker.d.ts +0 -7
- package/theme/lumo/vaadin-time-picker.js +0 -7
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-alpha21",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -21,9 +21,6 @@
|
|
|
21
21
|
"type": "module",
|
|
22
22
|
"files": [
|
|
23
23
|
"src",
|
|
24
|
-
"!src/styles/*-base-styles.d.ts",
|
|
25
|
-
"!src/styles/*-base-styles.js",
|
|
26
|
-
"theme",
|
|
27
24
|
"vaadin-*.d.ts",
|
|
28
25
|
"vaadin-*.js",
|
|
29
26
|
"web-types.json",
|
|
@@ -37,25 +34,25 @@
|
|
|
37
34
|
],
|
|
38
35
|
"dependencies": {
|
|
39
36
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
40
|
-
"@vaadin/combo-box": "25.0.0-
|
|
41
|
-
"@vaadin/component-base": "25.0.0-
|
|
42
|
-
"@vaadin/field-base": "25.0.0-
|
|
43
|
-
"@vaadin/input-container": "25.0.0-
|
|
44
|
-
"@vaadin/item": "25.0.0-
|
|
45
|
-
"@vaadin/overlay": "25.0.0-
|
|
46
|
-
"@vaadin/vaadin-
|
|
47
|
-
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha2",
|
|
37
|
+
"@vaadin/combo-box": "25.0.0-alpha21",
|
|
38
|
+
"@vaadin/component-base": "25.0.0-alpha21",
|
|
39
|
+
"@vaadin/field-base": "25.0.0-alpha21",
|
|
40
|
+
"@vaadin/input-container": "25.0.0-alpha21",
|
|
41
|
+
"@vaadin/item": "25.0.0-alpha21",
|
|
42
|
+
"@vaadin/overlay": "25.0.0-alpha21",
|
|
43
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha21",
|
|
48
44
|
"lit": "^3.0.0"
|
|
49
45
|
},
|
|
50
46
|
"devDependencies": {
|
|
51
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
52
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
47
|
+
"@vaadin/chai-plugins": "25.0.0-alpha21",
|
|
48
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha21",
|
|
53
49
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
54
|
-
"
|
|
50
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-alpha21",
|
|
51
|
+
"sinon": "^21.0.0"
|
|
55
52
|
},
|
|
56
53
|
"web-types": [
|
|
57
54
|
"web-types.json",
|
|
58
55
|
"web-types.lit.json"
|
|
59
56
|
],
|
|
60
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "8fb9e9710c01449edf623a1aaac4655cdc11a933"
|
|
61
58
|
}
|
|
@@ -3,11 +3,15 @@
|
|
|
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 '@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 timePickerStyles = css`
|
|
10
|
-
[
|
|
10
|
+
:host([opened]) {
|
|
11
|
+
pointer-events: auto;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
[part~='toggle-button']::before {
|
|
11
15
|
mask-image: var(--_vaadin-icon-clock);
|
|
12
16
|
}
|
|
13
17
|
|
|
@@ -8,7 +8,8 @@ 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/vaadin-item-
|
|
11
|
+
import { itemStyles } from '@vaadin/item/src/styles/vaadin-item-base-styles.js';
|
|
12
|
+
import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
|
|
12
13
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -38,7 +39,9 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
|
|
|
38
39
|
* @mixes DirMixin
|
|
39
40
|
* @private
|
|
40
41
|
*/
|
|
41
|
-
export class TimePickerItem extends ComboBoxItemMixin(
|
|
42
|
+
export class TimePickerItem extends ComboBoxItemMixin(
|
|
43
|
+
ThemableMixin(DirMixin(PolylitMixin(LumoInjectionMixin(LitElement)))),
|
|
44
|
+
) {
|
|
42
45
|
static get is() {
|
|
43
46
|
return 'vaadin-time-picker-item';
|
|
44
47
|
}
|
|
@@ -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 { I18nMixinClass } from '@vaadin/component-base/src/i18n-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';
|
|
@@ -21,8 +23,9 @@ import type { ValidateMixinClass } from '@vaadin/field-base/src/validate-mixin.j
|
|
|
21
23
|
import type { TimePickerTime } from './vaadin-time-picker-helper.js';
|
|
22
24
|
|
|
23
25
|
export interface TimePickerI18n {
|
|
24
|
-
parseTime(time: string): TimePickerTime | undefined;
|
|
25
|
-
|
|
26
|
+
parseTime?(time: string): TimePickerTime | undefined;
|
|
27
|
+
|
|
28
|
+
formatTime?(time: TimePickerTime | undefined): string;
|
|
26
29
|
}
|
|
27
30
|
|
|
28
31
|
/**
|
|
@@ -31,11 +34,13 @@ export interface TimePickerI18n {
|
|
|
31
34
|
export declare function TimePickerMixin<T extends Constructor<HTMLElement>>(
|
|
32
35
|
base: T,
|
|
33
36
|
): Constructor<ClearButtonMixinClass> &
|
|
37
|
+
Constructor<ComboBoxBaseMixinClass> &
|
|
34
38
|
Constructor<DelegateFocusMixinClass> &
|
|
35
39
|
Constructor<DelegateStateMixinClass> &
|
|
36
40
|
Constructor<DisabledMixinClass> &
|
|
37
41
|
Constructor<FieldMixinClass> &
|
|
38
42
|
Constructor<FocusMixinClass> &
|
|
43
|
+
Constructor<I18nMixinClass<TimePickerI18n>> &
|
|
39
44
|
Constructor<InputConstraintsMixinClass> &
|
|
40
45
|
Constructor<InputControlMixinClass> &
|
|
41
46
|
Constructor<InputMixinClass> &
|
|
@@ -58,11 +63,6 @@ export declare class TimePickerMixinClass {
|
|
|
58
63
|
*/
|
|
59
64
|
value: string;
|
|
60
65
|
|
|
61
|
-
/**
|
|
62
|
-
* True if the dropdown is open, false otherwise.
|
|
63
|
-
*/
|
|
64
|
-
opened: boolean;
|
|
65
|
-
|
|
66
66
|
/**
|
|
67
67
|
* Minimum time allowed.
|
|
68
68
|
*
|
|
@@ -102,26 +102,13 @@ export declare class TimePickerMixinClass {
|
|
|
102
102
|
step: number | null | undefined;
|
|
103
103
|
|
|
104
104
|
/**
|
|
105
|
-
*
|
|
106
|
-
*
|
|
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
|
-
/**
|
|
118
|
-
* The object used to localize this component.
|
|
119
|
-
* To change the default localization, replace the entire
|
|
120
|
-
* _i18n_ object or just the property you want to modify.
|
|
105
|
+
* The object used to localize this component. To change the default
|
|
106
|
+
* localization, replace this with an object that provides both the
|
|
107
|
+
* time parsing and formatting functions.
|
|
121
108
|
*
|
|
122
109
|
* The object has the following JSON structure:
|
|
123
110
|
*
|
|
124
|
-
* ```
|
|
111
|
+
* ```js
|
|
125
112
|
* {
|
|
126
113
|
* // A function to format given `Object` as
|
|
127
114
|
* // time string. Object is in the format `{ hours: ..., minutes: ..., seconds: ..., milliseconds: ... }`
|
|
@@ -140,18 +127,8 @@ export declare class TimePickerMixinClass {
|
|
|
140
127
|
* }
|
|
141
128
|
* ```
|
|
142
129
|
*
|
|
143
|
-
*
|
|
144
|
-
* to ensure the component works properly.
|
|
130
|
+
* NOTE: `formatTime` and `parseTime` must be implemented in a
|
|
131
|
+
* compatible manner to ensure the component works properly.
|
|
145
132
|
*/
|
|
146
133
|
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
134
|
}
|