@vaadin/date-time-picker 24.0.0-alpha9 → 24.0.0-beta2
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 +11 -11
- package/src/vaadin-date-time-picker.d.ts +15 -5
- package/src/vaadin-date-time-picker.js +53 -32
- package/theme/lumo/vaadin-date-time-picker-styles.js +14 -47
- package/web-types.json +25 -3
- package/web-types.lit.json +10 -3
- package/src/vaadin-date-time-picker-date-picker.js +0 -20
- package/src/vaadin-date-time-picker-time-picker.js +0 -20
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/date-time-picker",
|
|
3
|
-
"version": "24.0.0-
|
|
3
|
+
"version": "24.0.0-beta2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,23 +36,23 @@
|
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@polymer/polymer": "^3.0.0",
|
|
39
|
-
"@vaadin/component-base": "24.0.0-
|
|
40
|
-
"@vaadin/custom-field": "24.0.0-
|
|
41
|
-
"@vaadin/date-picker": "24.0.0-
|
|
42
|
-
"@vaadin/field-base": "24.0.0-
|
|
43
|
-
"@vaadin/time-picker": "24.0.0-
|
|
44
|
-
"@vaadin/vaadin-lumo-styles": "24.0.0-
|
|
45
|
-
"@vaadin/vaadin-material-styles": "24.0.0-
|
|
46
|
-
"@vaadin/vaadin-themable-mixin": "24.0.0-
|
|
39
|
+
"@vaadin/component-base": "24.0.0-beta2",
|
|
40
|
+
"@vaadin/custom-field": "24.0.0-beta2",
|
|
41
|
+
"@vaadin/date-picker": "24.0.0-beta2",
|
|
42
|
+
"@vaadin/field-base": "24.0.0-beta2",
|
|
43
|
+
"@vaadin/time-picker": "24.0.0-beta2",
|
|
44
|
+
"@vaadin/vaadin-lumo-styles": "24.0.0-beta2",
|
|
45
|
+
"@vaadin/vaadin-material-styles": "24.0.0-beta2",
|
|
46
|
+
"@vaadin/vaadin-themable-mixin": "24.0.0-beta2"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@esm-bundle/chai": "^4.3.4",
|
|
50
|
-
"@vaadin/testing-helpers": "^0.
|
|
50
|
+
"@vaadin/testing-helpers": "^0.4.0",
|
|
51
51
|
"sinon": "^13.0.2"
|
|
52
52
|
},
|
|
53
53
|
"web-types": [
|
|
54
54
|
"web-types.json",
|
|
55
55
|
"web-types.lit.json"
|
|
56
56
|
],
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "00086f1f6d487f042f189c9b9ecd7ba736960888"
|
|
58
58
|
}
|
|
@@ -87,14 +87,13 @@ export interface DateTimePickerEventMap extends DateTimePickerCustomEventMap, HT
|
|
|
87
87
|
*
|
|
88
88
|
* ### Internal components
|
|
89
89
|
*
|
|
90
|
-
*
|
|
91
|
-
* components are themable:
|
|
90
|
+
* The following components are created by `<vaadin-date-time-picker>` and placed in light DOM:
|
|
92
91
|
*
|
|
93
|
-
* -
|
|
94
|
-
* -
|
|
92
|
+
* - [`<vaadin-date-picker>`](#/elements/vaadin-date-picker).
|
|
93
|
+
* - [`<vaadin-time-picker>`](#/elements/vaadin-time-picker).
|
|
95
94
|
*
|
|
96
95
|
* Note: the `theme` attribute value set on `<vaadin-date-time-picker>` is
|
|
97
|
-
* propagated to
|
|
96
|
+
* propagated to these components.
|
|
98
97
|
*
|
|
99
98
|
* See [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.
|
|
100
99
|
*
|
|
@@ -212,6 +211,17 @@ declare class DateTimePicker extends FieldMixin(DisabledMixin(FocusMixin(Themabl
|
|
|
212
211
|
*/
|
|
213
212
|
i18n: DateTimePickerI18n;
|
|
214
213
|
|
|
214
|
+
/**
|
|
215
|
+
* A space-delimited list of CSS class names to set on the overlay elements
|
|
216
|
+
* of the internal components controlled by the `<vaadin-date-time-picker>`:
|
|
217
|
+
*
|
|
218
|
+
* - [`<vaadin-date-picker>`](#/elements/vaadin-date-picker#property-overlayClass)
|
|
219
|
+
* - [`<vaadin-time-picker>`](#/elements/vaadin-time-picker#property-overlayClass)
|
|
220
|
+
*
|
|
221
|
+
* @attr {string} overlay-class
|
|
222
|
+
*/
|
|
223
|
+
overlayClass: string;
|
|
224
|
+
|
|
215
225
|
addEventListener<K extends keyof DateTimePickerEventMap>(
|
|
216
226
|
type: K,
|
|
217
227
|
listener: (this: DateTimePicker, ev: DateTimePickerEventMap[K]) => void,
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
* Copyright (c) 2019 - 2023 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-date-time-picker-date-picker.js';
|
|
7
|
-
import './vaadin-date-time-picker-time-picker.js';
|
|
8
6
|
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|
9
7
|
import { DisabledMixin } from '@vaadin/component-base/src/disabled-mixin.js';
|
|
10
8
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
11
9
|
import { FocusMixin } from '@vaadin/component-base/src/focus-mixin.js';
|
|
12
10
|
import { SlotController } from '@vaadin/component-base/src/slot-controller.js';
|
|
13
11
|
import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
|
|
12
|
+
import { DatePicker } from '@vaadin/date-picker/src/vaadin-date-picker.js';
|
|
14
13
|
import { dateEquals, parseDate } from '@vaadin/date-picker/src/vaadin-date-picker-helper.js';
|
|
15
14
|
import { FieldMixin } from '@vaadin/field-base/src/field-mixin.js';
|
|
16
15
|
import { inputFieldShared } from '@vaadin/field-base/src/styles/input-field-shared-styles.js';
|
|
16
|
+
import { TimePicker } from '@vaadin/time-picker/src/vaadin-time-picker.js';
|
|
17
17
|
import { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
18
18
|
|
|
19
19
|
registerStyles('vaadin-date-time-picker', inputFieldShared, { moduleId: 'vaadin-date-time-picker' });
|
|
@@ -36,10 +36,8 @@ function getPropertyFromPrototype(clazz, prop) {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
const datePickerI18nDefaults = getPropertyFromPrototype(datePickerClass, 'i18n').value();
|
|
42
|
-
const timePickerI18nDefaults = getPropertyFromPrototype(timePickerClass, 'i18n').value();
|
|
39
|
+
const datePickerI18nDefaults = getPropertyFromPrototype(DatePicker, 'i18n').value();
|
|
40
|
+
const timePickerI18nDefaults = getPropertyFromPrototype(TimePicker, 'i18n').value();
|
|
43
41
|
const datePickerI18nProps = Object.keys(datePickerI18nDefaults);
|
|
44
42
|
const timePickerI18nProps = Object.keys(timePickerI18nDefaults);
|
|
45
43
|
|
|
@@ -50,7 +48,7 @@ const timePickerI18nProps = Object.keys(timePickerI18nDefaults);
|
|
|
50
48
|
*/
|
|
51
49
|
class PickerSlotController extends SlotController {
|
|
52
50
|
constructor(host, type) {
|
|
53
|
-
super(host, `${type}-picker`, `vaadin
|
|
51
|
+
super(host, `${type}-picker`, `vaadin-${type}-picker`, {
|
|
54
52
|
initializer: (picker, host) => {
|
|
55
53
|
const prop = `__${type}Picker`;
|
|
56
54
|
host[prop] = picker;
|
|
@@ -99,14 +97,13 @@ class PickerSlotController extends SlotController {
|
|
|
99
97
|
*
|
|
100
98
|
* ### Internal components
|
|
101
99
|
*
|
|
102
|
-
*
|
|
103
|
-
* components are themable:
|
|
100
|
+
* The following components are created by `<vaadin-date-time-picker>` and placed in light DOM:
|
|
104
101
|
*
|
|
105
|
-
* -
|
|
106
|
-
* -
|
|
102
|
+
* - [`<vaadin-date-picker>`](#/elements/vaadin-date-picker).
|
|
103
|
+
* - [`<vaadin-time-picker>`](#/elements/vaadin-time-picker).
|
|
107
104
|
*
|
|
108
105
|
* Note: the `theme` attribute value set on `<vaadin-date-time-picker>` is
|
|
109
|
-
* propagated to
|
|
106
|
+
* propagated to these components.
|
|
110
107
|
*
|
|
111
108
|
* See [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.
|
|
112
109
|
*
|
|
@@ -348,6 +345,19 @@ class DateTimePicker extends FieldMixin(DisabledMixin(FocusMixin(ThemableMixin(E
|
|
|
348
345
|
value: () => ({ ...datePickerI18nDefaults, ...timePickerI18nDefaults }),
|
|
349
346
|
},
|
|
350
347
|
|
|
348
|
+
/**
|
|
349
|
+
* A space-delimited list of CSS class names to set on the overlay elements
|
|
350
|
+
* of the internal components controlled by the `<vaadin-date-time-picker>`:
|
|
351
|
+
*
|
|
352
|
+
* - [`<vaadin-date-picker>`](#/elements/vaadin-date-picker#property-overlayClass)
|
|
353
|
+
* - [`<vaadin-time-picker>`](#/elements/vaadin-time-picker#property-overlayClass)
|
|
354
|
+
*
|
|
355
|
+
* @attr {string} overlay-class
|
|
356
|
+
*/
|
|
357
|
+
overlayClass: {
|
|
358
|
+
type: String,
|
|
359
|
+
},
|
|
360
|
+
|
|
351
361
|
/**
|
|
352
362
|
* The current slotted date picker.
|
|
353
363
|
* @private
|
|
@@ -383,6 +393,7 @@ class DateTimePicker extends FieldMixin(DisabledMixin(FocusMixin(ThemableMixin(E
|
|
|
383
393
|
'__i18nChanged(i18n, __datePicker, __timePicker)',
|
|
384
394
|
'__autoOpenDisabledChanged(autoOpenDisabled, __datePicker, __timePicker)',
|
|
385
395
|
'__themeChanged(_theme, __datePicker, __timePicker)',
|
|
396
|
+
'__overlayClassChanged(overlayClass, __datePicker, __timePicker)',
|
|
386
397
|
'__pickersChanged(__datePicker, __timePicker)',
|
|
387
398
|
];
|
|
388
399
|
}
|
|
@@ -400,6 +411,20 @@ class DateTimePicker extends FieldMixin(DisabledMixin(FocusMixin(ThemableMixin(E
|
|
|
400
411
|
this.__valueChangedEventHandler = this.__valueChangedEventHandler.bind(this);
|
|
401
412
|
}
|
|
402
413
|
|
|
414
|
+
/** @private */
|
|
415
|
+
get __inputs() {
|
|
416
|
+
return [this.__datePicker, this.__timePicker];
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/** @private */
|
|
420
|
+
get __formattedValue() {
|
|
421
|
+
const [dateValue, timeValue] = this.__inputs.map((picker) => picker.value);
|
|
422
|
+
if (dateValue && timeValue) {
|
|
423
|
+
return [dateValue, timeValue].join('T');
|
|
424
|
+
}
|
|
425
|
+
return '';
|
|
426
|
+
}
|
|
427
|
+
|
|
403
428
|
/** @protected */
|
|
404
429
|
ready() {
|
|
405
430
|
super.ready();
|
|
@@ -712,7 +737,7 @@ class DateTimePicker extends FieldMixin(DisabledMixin(FocusMixin(ThemableMixin(E
|
|
|
712
737
|
if (!date) {
|
|
713
738
|
return defaultValue;
|
|
714
739
|
}
|
|
715
|
-
return
|
|
740
|
+
return DatePicker.prototype._formatISO(date);
|
|
716
741
|
}
|
|
717
742
|
|
|
718
743
|
/**
|
|
@@ -807,17 +832,13 @@ class DateTimePicker extends FieldMixin(DisabledMixin(FocusMixin(ThemableMixin(E
|
|
|
807
832
|
*/
|
|
808
833
|
__validateTime(timeObject) {
|
|
809
834
|
if (timeObject) {
|
|
810
|
-
|
|
811
|
-
timeObject.
|
|
835
|
+
const stepSegment = this.__getStepSegment();
|
|
836
|
+
timeObject.seconds = stepSegment < 3 ? undefined : timeObject.seconds;
|
|
837
|
+
timeObject.milliseconds = stepSegment < 4 ? undefined : timeObject.milliseconds;
|
|
812
838
|
}
|
|
813
839
|
return timeObject;
|
|
814
840
|
}
|
|
815
841
|
|
|
816
|
-
/** @private */
|
|
817
|
-
get __inputs() {
|
|
818
|
-
return [this.__datePicker, this.__timePicker];
|
|
819
|
-
}
|
|
820
|
-
|
|
821
842
|
/**
|
|
822
843
|
* Returns true if the current input value satisfies all constraints (if any)
|
|
823
844
|
*
|
|
@@ -836,8 +857,7 @@ class DateTimePicker extends FieldMixin(DisabledMixin(FocusMixin(ThemableMixin(E
|
|
|
836
857
|
|
|
837
858
|
// Copied from vaadin-time-picker
|
|
838
859
|
/** @private */
|
|
839
|
-
|
|
840
|
-
get __stepSegment() {
|
|
860
|
+
__getStepSegment() {
|
|
841
861
|
const step = this.step == null ? 60 : parseFloat(this.step);
|
|
842
862
|
if (step % 3600 === 0) {
|
|
843
863
|
// Accept hours
|
|
@@ -958,16 +978,6 @@ class DateTimePicker extends FieldMixin(DisabledMixin(FocusMixin(ThemableMixin(E
|
|
|
958
978
|
}
|
|
959
979
|
}
|
|
960
980
|
|
|
961
|
-
/** @private */
|
|
962
|
-
get __formattedValue() {
|
|
963
|
-
const dateValue = this.__datePicker.value;
|
|
964
|
-
const timeValue = this.__timePicker.value;
|
|
965
|
-
if (dateValue && timeValue) {
|
|
966
|
-
return [dateValue, timeValue].join('T');
|
|
967
|
-
}
|
|
968
|
-
return '';
|
|
969
|
-
}
|
|
970
|
-
|
|
971
981
|
/** @private */
|
|
972
982
|
__valueChangedEventHandler() {
|
|
973
983
|
if (this.__ignoreInputValueChange) {
|
|
@@ -1018,6 +1028,17 @@ class DateTimePicker extends FieldMixin(DisabledMixin(FocusMixin(ThemableMixin(E
|
|
|
1018
1028
|
});
|
|
1019
1029
|
}
|
|
1020
1030
|
|
|
1031
|
+
/** @private */
|
|
1032
|
+
__overlayClassChanged(overlayClass, datePicker, timePicker) {
|
|
1033
|
+
if (!datePicker || !timePicker) {
|
|
1034
|
+
// Both pickers are not ready yet
|
|
1035
|
+
return;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
datePicker.overlayClass = overlayClass;
|
|
1039
|
+
timePicker.overlayClass = overlayClass;
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1021
1042
|
/** @private */
|
|
1022
1043
|
__pickersChanged(datePicker, timePicker) {
|
|
1023
1044
|
if (!datePicker || !timePicker) {
|
|
@@ -5,52 +5,19 @@ import { helper } from '@vaadin/vaadin-lumo-styles/mixins/helper.js';
|
|
|
5
5
|
import { requiredField } from '@vaadin/vaadin-lumo-styles/mixins/required-field.js';
|
|
6
6
|
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
css`
|
|
15
|
-
:host {
|
|
16
|
-
margin-right: 2px;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/* RTL specific styles */
|
|
20
|
-
:host([dir='rtl']) {
|
|
21
|
-
margin-right: auto;
|
|
22
|
-
margin-left: 2px;
|
|
23
|
-
}
|
|
8
|
+
const dateTimePicker = css`
|
|
9
|
+
::slotted([slot='date-picker']) {
|
|
10
|
+
margin-inline-end: 2px;
|
|
11
|
+
--vaadin-input-container-top-end-radius: 0;
|
|
12
|
+
--vaadin-input-container-bottom-end-radius: 0;
|
|
13
|
+
}
|
|
24
14
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
15
|
+
::slotted([slot='time-picker']) {
|
|
16
|
+
--vaadin-input-container-top-start-radius: 0;
|
|
17
|
+
--vaadin-input-container-bottom-start-radius: 0;
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
29
20
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
border-top-left-radius: 0;
|
|
34
|
-
border-bottom-left-radius: 0;
|
|
35
|
-
}
|
|
36
|
-
`,
|
|
37
|
-
{ moduleId: 'lumo-date-time-picker-date-picker' },
|
|
38
|
-
);
|
|
39
|
-
|
|
40
|
-
registerStyles(
|
|
41
|
-
'vaadin-date-time-picker-time-picker',
|
|
42
|
-
css`
|
|
43
|
-
[part~='input-field'] {
|
|
44
|
-
border-top-left-radius: 0;
|
|
45
|
-
border-bottom-left-radius: 0;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/* RTL specific styles */
|
|
49
|
-
:host([dir='rtl']) [part~='input-field'] {
|
|
50
|
-
border-radius: var(--lumo-border-radius-m);
|
|
51
|
-
border-top-right-radius: 0;
|
|
52
|
-
border-bottom-right-radius: 0;
|
|
53
|
-
}
|
|
54
|
-
`,
|
|
55
|
-
{ moduleId: 'lumo-date-time-picker-time-picker' },
|
|
56
|
-
);
|
|
21
|
+
registerStyles('vaadin-date-time-picker', [dateTimePicker, requiredField, helper, customField], {
|
|
22
|
+
moduleId: 'lumo-date-time-picker',
|
|
23
|
+
});
|
package/web-types.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/date-time-picker",
|
|
4
|
-
"version": "24.0.0-
|
|
4
|
+
"version": "24.0.0-beta2",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"elements": [
|
|
9
9
|
{
|
|
10
10
|
"name": "vaadin-date-time-picker",
|
|
11
|
-
"description": "`<vaadin-date-time-picker>` is a Web Component providing a date time selection field.\n\n```html\n<vaadin-date-time-picker value=\"2019-09-16T15:00\"></vaadin-date-time-picker>\n```\n```js\ndateTimePicker.value = '2019-09-16T15:00';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The slotted label element wrapper\n`helper-text` | The slotted helper text element wrapper\n`error-message` | The slotted error message element wrapper\n`required-indicator` | The `required` state indicator element\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n--------------------|-------------------------------------------|------------\n`disabled` | Set when the element is disabled | :host\n`focused` | Set when the element is focused | :host\n`focus-ring` | Set when the element is keyboard focused | :host\n`readonly` | Set when the element is readonly | :host\n`invalid` | Set when the element is invalid | :host\n`has-label` | Set when the element has a label | :host\n`has-value` | Set when the element has a value | :host\n`has-helper` | Set when the element has helper text | :host\n`has-error-message` | Set when the element has an error message | :host\n\n### Internal components\n\
|
|
11
|
+
"description": "`<vaadin-date-time-picker>` is a Web Component providing a date time selection field.\n\n```html\n<vaadin-date-time-picker value=\"2019-09-16T15:00\"></vaadin-date-time-picker>\n```\n```js\ndateTimePicker.value = '2019-09-16T15:00';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The slotted label element wrapper\n`helper-text` | The slotted helper text element wrapper\n`error-message` | The slotted error message element wrapper\n`required-indicator` | The `required` state indicator element\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n--------------------|-------------------------------------------|------------\n`disabled` | Set when the element is disabled | :host\n`focused` | Set when the element is focused | :host\n`focus-ring` | Set when the element is keyboard focused | :host\n`readonly` | Set when the element is readonly | :host\n`invalid` | Set when the element is invalid | :host\n`has-label` | Set when the element has a label | :host\n`has-value` | Set when the element has a value | :host\n`has-helper` | Set when the element has helper text | :host\n`has-error-message` | Set when the element has an error message | :host\n\n### Internal components\n\nThe following components are created by `<vaadin-date-time-picker>` and placed in light DOM:\n\n- [`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-beta2/#/elements/vaadin-date-picker).\n- [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-beta2/#/elements/vaadin-time-picker).\n\nNote: the `theme` attribute value set on `<vaadin-date-time-picker>` is\npropagated to these components.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.",
|
|
12
12
|
"attributes": [
|
|
13
13
|
{
|
|
14
14
|
"name": "disabled",
|
|
@@ -200,6 +200,17 @@
|
|
|
200
200
|
]
|
|
201
201
|
}
|
|
202
202
|
},
|
|
203
|
+
{
|
|
204
|
+
"name": "overlay-class",
|
|
205
|
+
"description": "A space-delimited list of CSS class names to set on the overlay elements\nof the internal components controlled by the `<vaadin-date-time-picker>`:\n\n- [`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-beta2/#/elements/vaadin-date-picker#property-overlayClass)\n- [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-beta2/#/elements/vaadin-time-picker#property-overlayClass)",
|
|
206
|
+
"value": {
|
|
207
|
+
"type": [
|
|
208
|
+
"string",
|
|
209
|
+
"null",
|
|
210
|
+
"undefined"
|
|
211
|
+
]
|
|
212
|
+
}
|
|
213
|
+
},
|
|
203
214
|
{
|
|
204
215
|
"name": "theme",
|
|
205
216
|
"description": "The theme variants to apply to the component.",
|
|
@@ -406,12 +417,23 @@
|
|
|
406
417
|
},
|
|
407
418
|
{
|
|
408
419
|
"name": "i18n",
|
|
409
|
-
"description": "The object used to localize this component.\nTo change the default localization, replace the entire\n`i18n` object or just the properties you want to modify.\n\nThe object is a combination of the i18n properties supported by\n[`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-
|
|
420
|
+
"description": "The object used to localize this component.\nTo change the default localization, replace the entire\n`i18n` object or just the properties you want to modify.\n\nThe object is a combination of the i18n properties supported by\n[`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-beta2/#/elements/vaadin-date-picker) and\n[`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-beta2/#/elements/vaadin-time-picker).",
|
|
410
421
|
"value": {
|
|
411
422
|
"type": [
|
|
412
423
|
"DateTimePickerI18n"
|
|
413
424
|
]
|
|
414
425
|
}
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
"name": "overlayClass",
|
|
429
|
+
"description": "A space-delimited list of CSS class names to set on the overlay elements\nof the internal components controlled by the `<vaadin-date-time-picker>`:\n\n- [`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-beta2/#/elements/vaadin-date-picker#property-overlayClass)\n- [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-beta2/#/elements/vaadin-time-picker#property-overlayClass)",
|
|
430
|
+
"value": {
|
|
431
|
+
"type": [
|
|
432
|
+
"string",
|
|
433
|
+
"null",
|
|
434
|
+
"undefined"
|
|
435
|
+
]
|
|
436
|
+
}
|
|
415
437
|
}
|
|
416
438
|
],
|
|
417
439
|
"events": [
|
package/web-types.lit.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/date-time-picker",
|
|
4
|
-
"version": "24.0.0-
|
|
4
|
+
"version": "24.0.0-beta2",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"elements": [
|
|
17
17
|
{
|
|
18
18
|
"name": "vaadin-date-time-picker",
|
|
19
|
-
"description": "`<vaadin-date-time-picker>` is a Web Component providing a date time selection field.\n\n```html\n<vaadin-date-time-picker value=\"2019-09-16T15:00\"></vaadin-date-time-picker>\n```\n```js\ndateTimePicker.value = '2019-09-16T15:00';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The slotted label element wrapper\n`helper-text` | The slotted helper text element wrapper\n`error-message` | The slotted error message element wrapper\n`required-indicator` | The `required` state indicator element\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n--------------------|-------------------------------------------|------------\n`disabled` | Set when the element is disabled | :host\n`focused` | Set when the element is focused | :host\n`focus-ring` | Set when the element is keyboard focused | :host\n`readonly` | Set when the element is readonly | :host\n`invalid` | Set when the element is invalid | :host\n`has-label` | Set when the element has a label | :host\n`has-value` | Set when the element has a value | :host\n`has-helper` | Set when the element has helper text | :host\n`has-error-message` | Set when the element has an error message | :host\n\n### Internal components\n\
|
|
19
|
+
"description": "`<vaadin-date-time-picker>` is a Web Component providing a date time selection field.\n\n```html\n<vaadin-date-time-picker value=\"2019-09-16T15:00\"></vaadin-date-time-picker>\n```\n```js\ndateTimePicker.value = '2019-09-16T15:00';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The slotted label element wrapper\n`helper-text` | The slotted helper text element wrapper\n`error-message` | The slotted error message element wrapper\n`required-indicator` | The `required` state indicator element\n\nThe following state attributes are available for styling:\n\nAttribute | Description | Part name\n--------------------|-------------------------------------------|------------\n`disabled` | Set when the element is disabled | :host\n`focused` | Set when the element is focused | :host\n`focus-ring` | Set when the element is keyboard focused | :host\n`readonly` | Set when the element is readonly | :host\n`invalid` | Set when the element is invalid | :host\n`has-label` | Set when the element has a label | :host\n`has-value` | Set when the element has a value | :host\n`has-helper` | Set when the element has helper text | :host\n`has-error-message` | Set when the element has an error message | :host\n\n### Internal components\n\nThe following components are created by `<vaadin-date-time-picker>` and placed in light DOM:\n\n- [`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-beta2/#/elements/vaadin-date-picker).\n- [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-beta2/#/elements/vaadin-time-picker).\n\nNote: the `theme` attribute value set on `<vaadin-date-time-picker>` is\npropagated to these components.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.",
|
|
20
20
|
"extension": true,
|
|
21
21
|
"attributes": [
|
|
22
22
|
{
|
|
@@ -147,7 +147,14 @@
|
|
|
147
147
|
},
|
|
148
148
|
{
|
|
149
149
|
"name": ".i18n",
|
|
150
|
-
"description": "The object used to localize this component.\nTo change the default localization, replace the entire\n`i18n` object or just the properties you want to modify.\n\nThe object is a combination of the i18n properties supported by\n[`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-
|
|
150
|
+
"description": "The object used to localize this component.\nTo change the default localization, replace the entire\n`i18n` object or just the properties you want to modify.\n\nThe object is a combination of the i18n properties supported by\n[`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-beta2/#/elements/vaadin-date-picker) and\n[`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-beta2/#/elements/vaadin-time-picker).",
|
|
151
|
+
"value": {
|
|
152
|
+
"kind": "expression"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": ".overlayClass",
|
|
157
|
+
"description": "A space-delimited list of CSS class names to set on the overlay elements\nof the internal components controlled by the `<vaadin-date-time-picker>`:\n\n- [`<vaadin-date-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-beta2/#/elements/vaadin-date-picker#property-overlayClass)\n- [`<vaadin-time-picker>`](https://cdn.vaadin.com/vaadin-web-components/24.0.0-beta2/#/elements/vaadin-time-picker#property-overlayClass)",
|
|
151
158
|
"value": {
|
|
152
159
|
"kind": "expression"
|
|
153
160
|
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2019 - 2023 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import { DatePicker } from '@vaadin/date-picker/src/vaadin-date-picker.js';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* An element used internally by `<vaadin-date-time-picker>`. Not intended to be used separately.
|
|
10
|
-
*
|
|
11
|
-
* @extends DatePicker
|
|
12
|
-
* @private
|
|
13
|
-
*/
|
|
14
|
-
class DateTimePickerDatePicker extends DatePicker {
|
|
15
|
-
static get is() {
|
|
16
|
-
return 'vaadin-date-time-picker-date-picker';
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
customElements.define(DateTimePickerDatePicker.is, DateTimePickerDatePicker);
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2019 - 2023 Vaadin Ltd.
|
|
4
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
-
*/
|
|
6
|
-
import { TimePicker } from '@vaadin/time-picker/src/vaadin-time-picker.js';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* An element used internally by `<vaadin-date-time-picker>`. Not intended to be used separately.
|
|
10
|
-
*
|
|
11
|
-
* @extends TimePicker
|
|
12
|
-
* @private
|
|
13
|
-
*/
|
|
14
|
-
class DateTimePickerTimePicker extends TimePicker {
|
|
15
|
-
static get is() {
|
|
16
|
-
return 'vaadin-date-time-picker-time-picker';
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
customElements.define(DateTimePickerTimePicker.is, DateTimePickerTimePicker);
|