@vaadin/time-picker 24.3.0-alpha1 → 24.3.0-alpha3
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-time-picker.d.ts +16 -8
- package/src/vaadin-time-picker.js +84 -23
- package/theme/lumo/vaadin-time-picker-styles.js +1 -0
- package/theme/lumo/vaadin-time-picker.js +0 -1
- package/theme/material/vaadin-time-picker-styles.js +1 -0
- package/theme/material/vaadin-time-picker.js +0 -1
- package/web-types.json +2 -28
- package/web-types.lit.json +2 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/time-picker",
|
|
3
|
-
"version": "24.3.0-
|
|
3
|
+
"version": "24.3.0-alpha3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@polymer/polymer": "^3.0.0",
|
|
39
|
-
"@vaadin/combo-box": "24.3.0-
|
|
40
|
-
"@vaadin/component-base": "24.3.0-
|
|
41
|
-
"@vaadin/field-base": "24.3.0-
|
|
42
|
-
"@vaadin/input-container": "24.3.0-
|
|
43
|
-
"@vaadin/item": "24.3.0-
|
|
44
|
-
"@vaadin/overlay": "24.3.0-
|
|
45
|
-
"@vaadin/vaadin-lumo-styles": "24.3.0-
|
|
46
|
-
"@vaadin/vaadin-material-styles": "24.3.0-
|
|
47
|
-
"@vaadin/vaadin-themable-mixin": "24.3.0-
|
|
39
|
+
"@vaadin/combo-box": "24.3.0-alpha3",
|
|
40
|
+
"@vaadin/component-base": "24.3.0-alpha3",
|
|
41
|
+
"@vaadin/field-base": "24.3.0-alpha3",
|
|
42
|
+
"@vaadin/input-container": "24.3.0-alpha3",
|
|
43
|
+
"@vaadin/item": "24.3.0-alpha3",
|
|
44
|
+
"@vaadin/overlay": "24.3.0-alpha3",
|
|
45
|
+
"@vaadin/vaadin-lumo-styles": "24.3.0-alpha3",
|
|
46
|
+
"@vaadin/vaadin-material-styles": "24.3.0-alpha3",
|
|
47
|
+
"@vaadin/vaadin-themable-mixin": "24.3.0-alpha3"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@esm-bundle/chai": "^4.3.4",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"web-types.json",
|
|
56
56
|
"web-types.lit.json"
|
|
57
57
|
],
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "9162ca5fb9879dbcc8c68a77c1acb3af2c497a15"
|
|
59
59
|
}
|
|
@@ -37,11 +37,6 @@ export type TimePickerInvalidChangedEvent = CustomEvent<{ value: boolean }>;
|
|
|
37
37
|
*/
|
|
38
38
|
export type TimePickerOpenedChangedEvent = CustomEvent<{ value: boolean }>;
|
|
39
39
|
|
|
40
|
-
/**
|
|
41
|
-
* Fired when the `dirty` property changes.
|
|
42
|
-
*/
|
|
43
|
-
export type TimePickerDirtyChangedEvent = CustomEvent<{ value: boolean }>;
|
|
44
|
-
|
|
45
40
|
/**
|
|
46
41
|
* Fired when the `value` property changes.
|
|
47
42
|
*/
|
|
@@ -57,8 +52,6 @@ export interface TimePickerCustomEventMap {
|
|
|
57
52
|
|
|
58
53
|
'opened-changed': TimePickerOpenedChangedEvent;
|
|
59
54
|
|
|
60
|
-
'dirty-changed': TimePickerDirtyChangedEvent;
|
|
61
|
-
|
|
62
55
|
'value-changed': TimePickerValueChangedEvent;
|
|
63
56
|
|
|
64
57
|
validated: TimePickerValidatedEvent;
|
|
@@ -119,10 +112,25 @@ export interface TimePickerEventMap extends HTMLElementEventMap, TimePickerCusto
|
|
|
119
112
|
*
|
|
120
113
|
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
121
114
|
*
|
|
115
|
+
* ### Change events
|
|
116
|
+
*
|
|
117
|
+
* Depending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,
|
|
118
|
+
* the component can fire either a `change` event or an `unparsable-change` event:
|
|
119
|
+
*
|
|
120
|
+
* Value change | Event
|
|
121
|
+
* :------------------------|:------------------
|
|
122
|
+
* empty => parsable | change
|
|
123
|
+
* empty => unparsable | unparsable-change
|
|
124
|
+
* parsable => empty | change
|
|
125
|
+
* parsable => parsable | change
|
|
126
|
+
* parsable => unparsable | change
|
|
127
|
+
* unparsable => empty | unparsable-change
|
|
128
|
+
* unparsable => parsable | change
|
|
129
|
+
* unparsable => unparsable | unparsable-change
|
|
130
|
+
*
|
|
122
131
|
* @fires {Event} change - Fired when the user commits a value change.
|
|
123
132
|
* @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.
|
|
124
133
|
* @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
|
|
125
|
-
* @fires {CustomEvent} dirty-changed - Fired when the `dirty` property changes.
|
|
126
134
|
* @fires {CustomEvent} value-changed - Fired when the `value` property changes.
|
|
127
135
|
* @fires {CustomEvent} validated - Fired whenever the field is validated.
|
|
128
136
|
*/
|
|
@@ -72,6 +72,22 @@ registerStyles('vaadin-time-picker', inputFieldShared, { moduleId: 'vaadin-time-
|
|
|
72
72
|
*
|
|
73
73
|
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
74
74
|
*
|
|
75
|
+
* ### Change events
|
|
76
|
+
*
|
|
77
|
+
* Depending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,
|
|
78
|
+
* the component can fire either a `change` event or an `unparsable-change` event:
|
|
79
|
+
*
|
|
80
|
+
* Value change | Event
|
|
81
|
+
* :------------------------|:------------------
|
|
82
|
+
* empty => parsable | change
|
|
83
|
+
* empty => unparsable | unparsable-change
|
|
84
|
+
* parsable => empty | change
|
|
85
|
+
* parsable => parsable | change
|
|
86
|
+
* parsable => unparsable | change
|
|
87
|
+
* unparsable => empty | unparsable-change
|
|
88
|
+
* unparsable => parsable | change
|
|
89
|
+
* unparsable => unparsable | unparsable-change
|
|
90
|
+
*
|
|
75
91
|
* @fires {Event} change - Fired when the user commits a value change.
|
|
76
92
|
* @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.
|
|
77
93
|
* @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
|
|
@@ -117,7 +133,6 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
117
133
|
<vaadin-time-picker-combo-box
|
|
118
134
|
id="comboBox"
|
|
119
135
|
filtered-items="[[__dropdownItems]]"
|
|
120
|
-
dirty="{{dirty}}"
|
|
121
136
|
value="{{_comboBoxValue}}"
|
|
122
137
|
opened="{{opened}}"
|
|
123
138
|
disabled="[[disabled]]"
|
|
@@ -128,7 +143,6 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
128
143
|
position-target="[[_inputContainer]]"
|
|
129
144
|
theme$="[[_theme]]"
|
|
130
145
|
on-change="__onComboBoxChange"
|
|
131
|
-
on-validated="__onComboBoxValidated"
|
|
132
146
|
on-has-input-value-changed="__onComboBoxHasInputValueChanged"
|
|
133
147
|
>
|
|
134
148
|
<vaadin-input-container
|
|
@@ -357,6 +371,20 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
357
371
|
return this.$.clearButton;
|
|
358
372
|
}
|
|
359
373
|
|
|
374
|
+
/**
|
|
375
|
+
* The input element's value when it cannot be parsed as a time, and an empty string otherwise.
|
|
376
|
+
*
|
|
377
|
+
* @private
|
|
378
|
+
* @return {string}
|
|
379
|
+
*/
|
|
380
|
+
get __unparsableValue() {
|
|
381
|
+
if (this._inputElementValue && !this.i18n.parseTime(this._inputElementValue)) {
|
|
382
|
+
return this._inputElementValue;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
return '';
|
|
386
|
+
}
|
|
387
|
+
|
|
360
388
|
/** @protected */
|
|
361
389
|
ready() {
|
|
362
390
|
super.ready();
|
|
@@ -422,6 +450,25 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
422
450
|
);
|
|
423
451
|
}
|
|
424
452
|
|
|
453
|
+
/**
|
|
454
|
+
* @param {boolean} focused
|
|
455
|
+
* @override
|
|
456
|
+
* @protected
|
|
457
|
+
*/
|
|
458
|
+
_setFocused(focused) {
|
|
459
|
+
super._setFocused(focused);
|
|
460
|
+
|
|
461
|
+
if (!focused) {
|
|
462
|
+
this.__commitValueChange();
|
|
463
|
+
|
|
464
|
+
// Do not validate when focusout is caused by document
|
|
465
|
+
// losing focus, which happens on browser tab switch.
|
|
466
|
+
if (document.hasFocus()) {
|
|
467
|
+
this.validate();
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
|
|
425
472
|
/** @private */
|
|
426
473
|
__validDayDivisor(step) {
|
|
427
474
|
// Valid if undefined, or exact divides a day, or has millisecond resolution
|
|
@@ -472,21 +519,39 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
472
519
|
this._comboBoxValue = this.i18n.formatTime(objWithStep);
|
|
473
520
|
this.__useMemo = false;
|
|
474
521
|
|
|
475
|
-
this.
|
|
476
|
-
this.__commitPendingValue();
|
|
522
|
+
this.__commitValueChange();
|
|
477
523
|
}
|
|
478
524
|
|
|
479
|
-
/**
|
|
480
|
-
|
|
525
|
+
/**
|
|
526
|
+
* Depending on the nature of the value change that has occurred since
|
|
527
|
+
* the last commit attempt, triggers validation and fires an event:
|
|
528
|
+
*
|
|
529
|
+
* Value change | Event
|
|
530
|
+
* -------------------------|-------------------
|
|
531
|
+
* empty => parsable | change
|
|
532
|
+
* empty => unparsable | unparsable-change
|
|
533
|
+
* parsable => empty | change
|
|
534
|
+
* parsable => parsable | change
|
|
535
|
+
* parsable => unparsable | change
|
|
536
|
+
* unparsable => empty | unparsable-change
|
|
537
|
+
* unparsable => parsable | change
|
|
538
|
+
* unparsable => unparsable | unparsable-change
|
|
539
|
+
*
|
|
540
|
+
* @private
|
|
541
|
+
*/
|
|
542
|
+
__commitValueChange() {
|
|
543
|
+
const unparsableValue = this.__unparsableValue;
|
|
544
|
+
|
|
481
545
|
if (this.__committedValue !== this.value) {
|
|
482
|
-
this.
|
|
483
|
-
this.
|
|
546
|
+
this.validate();
|
|
547
|
+
this.dispatchEvent(new CustomEvent('change', { bubbles: true }));
|
|
548
|
+
} else if (this.__committedUnparsableValue !== unparsableValue) {
|
|
549
|
+
this.validate();
|
|
550
|
+
this.dispatchEvent(new CustomEvent('unparsable-change'));
|
|
484
551
|
}
|
|
485
|
-
}
|
|
486
552
|
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
this.dispatchEvent(new CustomEvent('change', { bubbles: true }));
|
|
553
|
+
this.__committedValue = this.value;
|
|
554
|
+
this.__committedUnparsableValue = unparsableValue;
|
|
490
555
|
}
|
|
491
556
|
|
|
492
557
|
/**
|
|
@@ -603,8 +668,9 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
603
668
|
|
|
604
669
|
// Mark value set programmatically by the user
|
|
605
670
|
// as committed for the change event detection.
|
|
606
|
-
if (!this.
|
|
671
|
+
if (!this.__keepCommittedValue) {
|
|
607
672
|
this.__committedValue = value;
|
|
673
|
+
this.__committedUnparsableValue = '';
|
|
608
674
|
}
|
|
609
675
|
|
|
610
676
|
if (value !== '' && value !== null && !parsedObj) {
|
|
@@ -637,9 +703,9 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
637
703
|
if (value !== newValue) {
|
|
638
704
|
this._comboBoxValue = newValue;
|
|
639
705
|
} else {
|
|
640
|
-
this.
|
|
706
|
+
this.__keepCommittedValue = true;
|
|
641
707
|
this.__updateValue(parsedObj);
|
|
642
|
-
this.
|
|
708
|
+
this.__keepCommittedValue = false;
|
|
643
709
|
}
|
|
644
710
|
} else {
|
|
645
711
|
// If the user input can not be parsed, set a flag
|
|
@@ -649,16 +715,16 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
649
715
|
this.__keepInvalidInput = true;
|
|
650
716
|
}
|
|
651
717
|
|
|
652
|
-
this.
|
|
718
|
+
this.__keepCommittedValue = true;
|
|
653
719
|
this.value = '';
|
|
654
|
-
this.
|
|
720
|
+
this.__keepCommittedValue = false;
|
|
655
721
|
}
|
|
656
722
|
}
|
|
657
723
|
|
|
658
724
|
/** @private */
|
|
659
725
|
__onComboBoxChange(event) {
|
|
660
726
|
event.stopPropagation();
|
|
661
|
-
this.
|
|
727
|
+
this.__commitValueChange();
|
|
662
728
|
}
|
|
663
729
|
|
|
664
730
|
/**
|
|
@@ -670,11 +736,6 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
670
736
|
this._hasInputValue = this.$.comboBox._hasInputValue;
|
|
671
737
|
}
|
|
672
738
|
|
|
673
|
-
/** @private */
|
|
674
|
-
__onComboBoxValidated() {
|
|
675
|
-
this.validate();
|
|
676
|
-
}
|
|
677
|
-
|
|
678
739
|
/** @private */
|
|
679
740
|
__updateValue(obj) {
|
|
680
741
|
const timeString = this.__formatISO(this.__validateTime(obj)) || '';
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Copyright (c) 2018 - 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/input-container/theme/lumo/vaadin-input-container-styles.js';
|
|
6
7
|
import '@vaadin/vaadin-lumo-styles/font-icons.js';
|
|
7
8
|
import { comboBoxItem } from '@vaadin/combo-box/theme/lumo/vaadin-combo-box-item-styles.js';
|
|
8
9
|
import { comboBoxOverlay } from '@vaadin/combo-box/theme/lumo/vaadin-combo-box-overlay-styles.js';
|
|
@@ -3,6 +3,5 @@
|
|
|
3
3
|
* Copyright (c) 2018 - 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/input-container/theme/lumo/vaadin-input-container.js';
|
|
7
6
|
import './vaadin-time-picker-styles.js';
|
|
8
7
|
import '../../src/vaadin-time-picker.js';
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Copyright (c) 2018 - 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/input-container/theme/material/vaadin-input-container-styles.js';
|
|
6
7
|
import '@vaadin/vaadin-material-styles/font-icons.js';
|
|
7
8
|
import { comboBoxItem } from '@vaadin/combo-box/theme/material/vaadin-combo-box-item-styles.js';
|
|
8
9
|
import { comboBoxOverlay } from '@vaadin/combo-box/theme/material/vaadin-combo-box-overlay-styles.js';
|
|
@@ -3,6 +3,5 @@
|
|
|
3
3
|
* Copyright (c) 2018 - 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/input-container/theme/material/vaadin-input-container.js';
|
|
7
6
|
import './vaadin-time-picker-styles.js';
|
|
8
7
|
import '../../src/vaadin-time-picker.js';
|
package/web-types.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/time-picker",
|
|
4
|
-
"version": "24.3.0-
|
|
4
|
+
"version": "24.3.0-alpha3",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"elements": [
|
|
9
9
|
{
|
|
10
10
|
"name": "vaadin-time-picker",
|
|
11
|
-
"description": "`<vaadin-time-picker>` is a Web Component providing a time-selection field.\n\n```html\n<vaadin-time-picker></vaadin-time-picker>\n```\n```js\ntimePicker.value = '14:30';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n----------------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n`--vaadin-combo-box-overlay-max-height` | Max height of the overlay | `65vh`\n\n`<vaadin-time-picker>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-
|
|
11
|
+
"description": "`<vaadin-time-picker>` is a Web Component providing a time-selection field.\n\n```html\n<vaadin-time-picker></vaadin-time-picker>\n```\n```js\ntimePicker.value = '14:30';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n----------------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n`--vaadin-combo-box-overlay-max-height` | Max height of the overlay | `65vh`\n\n`<vaadin-time-picker>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha3/#/elements/vaadin-text-field) for the styling documentation.\n\nIn addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n\nPart name | Description\n----------------|----------------\n`toggle-button` | The toggle button\n\nIn addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n\nAttribute | Description\n----------|------------------------------------------\n`opened` | Set when the time-picker dropdown is open\n\n### Internal components\n\nIn addition to `<vaadin-time-picker>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-time-picker-combo-box>` - has the same API as [`<vaadin-combo-box-light>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha3/#/elements/vaadin-combo-box-light).\n- `<vaadin-time-picker-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha3/#/elements/vaadin-overlay).\n- `<vaadin-time-picker-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha3/#/elements/vaadin-item).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha3/#/elements/vaadin-input-container) - an internal element wrapping the input.\n\nNote: the `theme` attribute value set on `<vaadin-time-picker>` is\npropagated to the internal components listed above.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n\n### Change events\n\nDepending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,\nthe component can fire either a `change` event or an `unparsable-change` event:\n\nValue change | Event\n:------------------------|:------------------\nempty => parsable | change\nempty => unparsable | unparsable-change\nparsable => empty | change\nparsable => parsable | change\nparsable => unparsable | change\nunparsable => empty | unparsable-change\nunparsable => parsable | change\nunparsable => unparsable | unparsable-change",
|
|
12
12
|
"attributes": [
|
|
13
13
|
{
|
|
14
14
|
"name": "disabled",
|
|
@@ -118,17 +118,6 @@
|
|
|
118
118
|
]
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
|
-
{
|
|
122
|
-
"name": "dirty",
|
|
123
|
-
"description": "Whether the field is dirty.\n\nThe field is automatically marked as dirty once the user triggers\nan `input` or `change` event. Additionally, the field can be manually\nmarked as dirty by setting the property to `true`.",
|
|
124
|
-
"value": {
|
|
125
|
-
"type": [
|
|
126
|
-
"boolean",
|
|
127
|
-
"null",
|
|
128
|
-
"undefined"
|
|
129
|
-
]
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
121
|
{
|
|
133
122
|
"name": "clear-button-visible",
|
|
134
123
|
"description": "Set to true to display the clear icon which clears the input.\n\nIt is up to the component to choose where to place the clear icon:\nin the Shadow DOM or in the light DOM. In any way, a reference to\nthe clear icon element should be provided via the `clearElement` getter.",
|
|
@@ -401,17 +390,6 @@
|
|
|
401
390
|
]
|
|
402
391
|
}
|
|
403
392
|
},
|
|
404
|
-
{
|
|
405
|
-
"name": "dirty",
|
|
406
|
-
"description": "Whether the field is dirty.\n\nThe field is automatically marked as dirty once the user triggers\nan `input` or `change` event. Additionally, the field can be manually\nmarked as dirty by setting the property to `true`.",
|
|
407
|
-
"value": {
|
|
408
|
-
"type": [
|
|
409
|
-
"boolean",
|
|
410
|
-
"null",
|
|
411
|
-
"undefined"
|
|
412
|
-
]
|
|
413
|
-
}
|
|
414
|
-
},
|
|
415
393
|
{
|
|
416
394
|
"name": "clearButtonVisible",
|
|
417
395
|
"description": "Set to true to display the clear icon which clears the input.\n\nIt is up to the component to choose where to place the clear icon:\nin the Shadow DOM or in the light DOM. In any way, a reference to\nthe clear icon element should be provided via the `clearElement` getter.",
|
|
@@ -596,10 +574,6 @@
|
|
|
596
574
|
{
|
|
597
575
|
"name": "invalid-changed",
|
|
598
576
|
"description": "Fired when the `invalid` property changes."
|
|
599
|
-
},
|
|
600
|
-
{
|
|
601
|
-
"name": "dirty-changed",
|
|
602
|
-
"description": "Fired when the `dirty` property changes."
|
|
603
577
|
}
|
|
604
578
|
]
|
|
605
579
|
}
|
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/time-picker",
|
|
4
|
-
"version": "24.3.0-
|
|
4
|
+
"version": "24.3.0-alpha3",
|
|
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-time-picker",
|
|
19
|
-
"description": "`<vaadin-time-picker>` is a Web Component providing a time-selection field.\n\n```html\n<vaadin-time-picker></vaadin-time-picker>\n```\n```js\ntimePicker.value = '14:30';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n----------------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n`--vaadin-combo-box-overlay-max-height` | Max height of the overlay | `65vh`\n\n`<vaadin-time-picker>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-
|
|
19
|
+
"description": "`<vaadin-time-picker>` is a Web Component providing a time-selection field.\n\n```html\n<vaadin-time-picker></vaadin-time-picker>\n```\n```js\ntimePicker.value = '14:30';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n----------------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n`--vaadin-combo-box-overlay-max-height` | Max height of the overlay | `65vh`\n\n`<vaadin-time-picker>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha3/#/elements/vaadin-text-field) for the styling documentation.\n\nIn addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n\nPart name | Description\n----------------|----------------\n`toggle-button` | The toggle button\n\nIn addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n\nAttribute | Description\n----------|------------------------------------------\n`opened` | Set when the time-picker dropdown is open\n\n### Internal components\n\nIn addition to `<vaadin-time-picker>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-time-picker-combo-box>` - has the same API as [`<vaadin-combo-box-light>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha3/#/elements/vaadin-combo-box-light).\n- `<vaadin-time-picker-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha3/#/elements/vaadin-overlay).\n- `<vaadin-time-picker-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha3/#/elements/vaadin-item).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha3/#/elements/vaadin-input-container) - an internal element wrapping the input.\n\nNote: the `theme` attribute value set on `<vaadin-time-picker>` is\npropagated to the internal components listed above.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n\n### Change events\n\nDepending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,\nthe component can fire either a `change` event or an `unparsable-change` event:\n\nValue change | Event\n:------------------------|:------------------\nempty => parsable | change\nempty => unparsable | unparsable-change\nparsable => empty | change\nparsable => parsable | change\nparsable => unparsable | change\nunparsable => empty | unparsable-change\nunparsable => parsable | change\nunparsable => unparsable | unparsable-change",
|
|
20
20
|
"extension": true,
|
|
21
21
|
"attributes": [
|
|
22
22
|
{
|
|
@@ -47,13 +47,6 @@
|
|
|
47
47
|
"kind": "expression"
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
|
-
{
|
|
51
|
-
"name": "?dirty",
|
|
52
|
-
"description": "Whether the field is dirty.\n\nThe field is automatically marked as dirty once the user triggers\nan `input` or `change` event. Additionally, the field can be manually\nmarked as dirty by setting the property to `true`.",
|
|
53
|
-
"value": {
|
|
54
|
-
"kind": "expression"
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
50
|
{
|
|
58
51
|
"name": "?clearButtonVisible",
|
|
59
52
|
"description": "Set to true to display the clear icon which clears the input.\n\nIt is up to the component to choose where to place the clear icon:\nin the Shadow DOM or in the light DOM. In any way, a reference to\nthe clear icon element should be provided via the `clearElement` getter.",
|
|
@@ -242,13 +235,6 @@
|
|
|
242
235
|
"value": {
|
|
243
236
|
"kind": "expression"
|
|
244
237
|
}
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
"name": "@dirty-changed",
|
|
248
|
-
"description": "Fired when the `dirty` property changes.",
|
|
249
|
-
"value": {
|
|
250
|
-
"kind": "expression"
|
|
251
|
-
}
|
|
252
238
|
}
|
|
253
239
|
]
|
|
254
240
|
}
|