@vaadin/time-picker 24.2.0-dev.e9803eea7 → 24.3.0-alpha1
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 +12 -12
- package/src/vaadin-time-picker-combo-box.js +4 -2
- package/src/vaadin-time-picker-item.js +3 -1
- package/src/vaadin-time-picker-overlay.js +2 -1
- package/src/vaadin-time-picker-scroller.js +4 -1
- package/src/vaadin-time-picker.d.ts +8 -0
- package/src/vaadin-time-picker.js +35 -5
- package/web-types.json +610 -0
- package/web-types.lit.json +258 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/time-picker",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.3.0-alpha1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,24 +36,24 @@
|
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@polymer/polymer": "^3.0.0",
|
|
39
|
-
"@vaadin/combo-box": "24.
|
|
40
|
-
"@vaadin/component-base": "24.
|
|
41
|
-
"@vaadin/field-base": "24.
|
|
42
|
-
"@vaadin/input-container": "24.
|
|
43
|
-
"@vaadin/item": "24.
|
|
44
|
-
"@vaadin/overlay": "24.
|
|
45
|
-
"@vaadin/vaadin-lumo-styles": "24.
|
|
46
|
-
"@vaadin/vaadin-material-styles": "24.
|
|
47
|
-
"@vaadin/vaadin-themable-mixin": "24.
|
|
39
|
+
"@vaadin/combo-box": "24.3.0-alpha1",
|
|
40
|
+
"@vaadin/component-base": "24.3.0-alpha1",
|
|
41
|
+
"@vaadin/field-base": "24.3.0-alpha1",
|
|
42
|
+
"@vaadin/input-container": "24.3.0-alpha1",
|
|
43
|
+
"@vaadin/item": "24.3.0-alpha1",
|
|
44
|
+
"@vaadin/overlay": "24.3.0-alpha1",
|
|
45
|
+
"@vaadin/vaadin-lumo-styles": "24.3.0-alpha1",
|
|
46
|
+
"@vaadin/vaadin-material-styles": "24.3.0-alpha1",
|
|
47
|
+
"@vaadin/vaadin-themable-mixin": "24.3.0-alpha1"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@esm-bundle/chai": "^4.3.4",
|
|
51
|
-
"@vaadin/testing-helpers": "^0.
|
|
51
|
+
"@vaadin/testing-helpers": "^0.5.0",
|
|
52
52
|
"sinon": "^13.0.2"
|
|
53
53
|
},
|
|
54
54
|
"web-types": [
|
|
55
55
|
"web-types.json",
|
|
56
56
|
"web-types.lit.json"
|
|
57
57
|
],
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "9ca6f3ca220a777e8eea181a1f5717e39a732240"
|
|
59
59
|
}
|
|
@@ -4,15 +4,17 @@
|
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import './vaadin-time-picker-item.js';
|
|
7
|
-
import './vaadin-time-picker-scroller.js';
|
|
8
7
|
import './vaadin-time-picker-overlay.js';
|
|
8
|
+
import './vaadin-time-picker-scroller.js';
|
|
9
9
|
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|
10
10
|
import { ComboBoxMixin } from '@vaadin/combo-box/src/vaadin-combo-box-mixin.js';
|
|
11
|
+
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
11
12
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* An element used internally by `<vaadin-time-picker>`. Not intended to be used separately.
|
|
15
16
|
*
|
|
17
|
+
* @customElement
|
|
16
18
|
* @extends HTMLElement
|
|
17
19
|
* @mixes ComboBoxMixin
|
|
18
20
|
* @mixes ThemableMixin
|
|
@@ -104,4 +106,4 @@ class TimePickerComboBox extends ComboBoxMixin(ThemableMixin(PolymerElement)) {
|
|
|
104
106
|
}
|
|
105
107
|
}
|
|
106
108
|
|
|
107
|
-
|
|
109
|
+
defineCustomElement(TimePickerComboBox);
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|
7
7
|
import { ComboBoxItemMixin } from '@vaadin/combo-box/src/vaadin-combo-box-item-mixin.js';
|
|
8
|
+
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
8
9
|
import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
|
|
9
10
|
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
10
11
|
|
|
@@ -29,6 +30,7 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
|
|
|
29
30
|
*
|
|
30
31
|
* See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.
|
|
31
32
|
*
|
|
33
|
+
* @customElement
|
|
32
34
|
* @mixes ComboBoxItemMixin
|
|
33
35
|
* @mixes ThemableMixin
|
|
34
36
|
* @mixes DirMixin
|
|
@@ -58,4 +60,4 @@ export class TimePickerItem extends ComboBoxItemMixin(ThemableMixin(DirMixin(Pol
|
|
|
58
60
|
}
|
|
59
61
|
}
|
|
60
62
|
|
|
61
|
-
|
|
63
|
+
defineCustomElement(TimePickerItem);
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|
7
7
|
import { ComboBoxOverlayMixin } from '@vaadin/combo-box/src/vaadin-combo-box-overlay-mixin.js';
|
|
8
|
+
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
8
9
|
import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
|
|
9
10
|
import { OverlayMixin } from '@vaadin/overlay/src/vaadin-overlay-mixin.js';
|
|
10
11
|
import { overlayStyles } from '@vaadin/overlay/src/vaadin-overlay-styles.js';
|
|
@@ -53,4 +54,4 @@ export class TimePickerOverlay extends ComboBoxOverlayMixin(OverlayMixin(DirMixi
|
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
56
|
|
|
56
|
-
|
|
57
|
+
defineCustomElement(TimePickerOverlay);
|
|
@@ -5,9 +5,12 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|
7
7
|
import { ComboBoxScrollerMixin } from '@vaadin/combo-box/src/vaadin-combo-box-scroller-mixin.js';
|
|
8
|
+
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
9
|
+
|
|
8
10
|
/**
|
|
9
11
|
* An element used internally by `<vaadin-time-picker>`. Not intended to be used separately.
|
|
10
12
|
*
|
|
13
|
+
* @customElement
|
|
11
14
|
* @extends HTMLElement
|
|
12
15
|
* @mixes ComboBoxScrollerMixin
|
|
13
16
|
* @private
|
|
@@ -49,4 +52,4 @@ export class TimePickerScroller extends ComboBoxScrollerMixin(PolymerElement) {
|
|
|
49
52
|
}
|
|
50
53
|
}
|
|
51
54
|
|
|
52
|
-
|
|
55
|
+
defineCustomElement(TimePickerScroller);
|
|
@@ -37,6 +37,11 @@ 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
|
+
|
|
40
45
|
/**
|
|
41
46
|
* Fired when the `value` property changes.
|
|
42
47
|
*/
|
|
@@ -52,6 +57,8 @@ export interface TimePickerCustomEventMap {
|
|
|
52
57
|
|
|
53
58
|
'opened-changed': TimePickerOpenedChangedEvent;
|
|
54
59
|
|
|
60
|
+
'dirty-changed': TimePickerDirtyChangedEvent;
|
|
61
|
+
|
|
55
62
|
'value-changed': TimePickerValueChangedEvent;
|
|
56
63
|
|
|
57
64
|
validated: TimePickerValidatedEvent;
|
|
@@ -115,6 +122,7 @@ export interface TimePickerEventMap extends HTMLElementEventMap, TimePickerCusto
|
|
|
115
122
|
* @fires {Event} change - Fired when the user commits a value change.
|
|
116
123
|
* @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.
|
|
117
124
|
* @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
|
|
125
|
+
* @fires {CustomEvent} dirty-changed - Fired when the `dirty` property changes.
|
|
118
126
|
* @fires {CustomEvent} value-changed - Fired when the `value` property changes.
|
|
119
127
|
* @fires {CustomEvent} validated - Fired whenever the field is validated.
|
|
120
128
|
*/
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import '@vaadin/input-container/src/vaadin-input-container.js';
|
|
7
7
|
import './vaadin-time-picker-combo-box.js';
|
|
8
8
|
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|
9
|
+
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
9
10
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
10
11
|
import { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';
|
|
11
12
|
import { InputControlMixin } from '@vaadin/field-base/src/input-control-mixin.js';
|
|
@@ -77,6 +78,7 @@ registerStyles('vaadin-time-picker', inputFieldShared, { moduleId: 'vaadin-time-
|
|
|
77
78
|
* @fires {CustomEvent} value-changed - Fired when the `value` property changes.
|
|
78
79
|
* @fires {CustomEvent} validated - Fired whenever the field is validated.
|
|
79
80
|
*
|
|
81
|
+
* @customElement
|
|
80
82
|
* @extends HTMLElement
|
|
81
83
|
* @mixes ElementMixin
|
|
82
84
|
* @mixes ThemableMixin
|
|
@@ -115,6 +117,7 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
115
117
|
<vaadin-time-picker-combo-box
|
|
116
118
|
id="comboBox"
|
|
117
119
|
filtered-items="[[__dropdownItems]]"
|
|
120
|
+
dirty="{{dirty}}"
|
|
118
121
|
value="{{_comboBoxValue}}"
|
|
119
122
|
opened="{{opened}}"
|
|
120
123
|
disabled="[[disabled]]"
|
|
@@ -372,6 +375,7 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
372
375
|
this._tooltipController = new TooltipController(this);
|
|
373
376
|
this._tooltipController.setShouldShow((timePicker) => !timePicker.opened);
|
|
374
377
|
this._tooltipController.setPosition('top');
|
|
378
|
+
this._tooltipController.setAriaTarget(this.inputElement);
|
|
375
379
|
this.addController(this._tooltipController);
|
|
376
380
|
}
|
|
377
381
|
|
|
@@ -460,8 +464,24 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
460
464
|
__onArrowPressWithStep(step) {
|
|
461
465
|
const objWithStep = this.__addStep(this.__getMsec(this.__memoValue), step, true);
|
|
462
466
|
this.__memoValue = objWithStep;
|
|
463
|
-
|
|
464
|
-
|
|
467
|
+
|
|
468
|
+
// Setting `_comboBoxValue` property triggers the synchronous
|
|
469
|
+
// observer where the value can be parsed again, so we set
|
|
470
|
+
// this flag to ensure it does not alter the value.
|
|
471
|
+
this.__useMemo = true;
|
|
472
|
+
this._comboBoxValue = this.i18n.formatTime(objWithStep);
|
|
473
|
+
this.__useMemo = false;
|
|
474
|
+
|
|
475
|
+
this.validate();
|
|
476
|
+
this.__commitPendingValue();
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
/** @private */
|
|
480
|
+
__commitPendingValue() {
|
|
481
|
+
if (this.__committedValue !== this.value) {
|
|
482
|
+
this.__dispatchChange();
|
|
483
|
+
this.__committedValue = this.value;
|
|
484
|
+
}
|
|
465
485
|
}
|
|
466
486
|
|
|
467
487
|
/** @private */
|
|
@@ -581,6 +601,12 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
581
601
|
const parsedObj = (this.__memoValue = this.__parseISO(value));
|
|
582
602
|
const newValue = this.__formatISO(parsedObj) || '';
|
|
583
603
|
|
|
604
|
+
// Mark value set programmatically by the user
|
|
605
|
+
// as committed for the change event detection.
|
|
606
|
+
if (!this.__skipCommittedValueUpdate) {
|
|
607
|
+
this.__committedValue = value;
|
|
608
|
+
}
|
|
609
|
+
|
|
584
610
|
if (value !== '' && value !== null && !parsedObj) {
|
|
585
611
|
// Value can not be parsed, reset to the old one.
|
|
586
612
|
this.value = oldValue === undefined ? '' : oldValue;
|
|
@@ -604,14 +630,16 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
604
630
|
return;
|
|
605
631
|
}
|
|
606
632
|
|
|
607
|
-
const parsedObj = this.i18n.parseTime(value);
|
|
633
|
+
const parsedObj = this.__useMemo ? this.__memoValue : this.i18n.parseTime(value);
|
|
608
634
|
const newValue = this.i18n.formatTime(parsedObj) || '';
|
|
609
635
|
|
|
610
636
|
if (parsedObj) {
|
|
611
637
|
if (value !== newValue) {
|
|
612
638
|
this._comboBoxValue = newValue;
|
|
613
639
|
} else {
|
|
640
|
+
this.__skipCommittedValueUpdate = true;
|
|
614
641
|
this.__updateValue(parsedObj);
|
|
642
|
+
this.__skipCommittedValueUpdate = false;
|
|
615
643
|
}
|
|
616
644
|
} else {
|
|
617
645
|
// If the user input can not be parsed, set a flag
|
|
@@ -621,14 +649,16 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
621
649
|
this.__keepInvalidInput = true;
|
|
622
650
|
}
|
|
623
651
|
|
|
652
|
+
this.__skipCommittedValueUpdate = true;
|
|
624
653
|
this.value = '';
|
|
654
|
+
this.__skipCommittedValueUpdate = false;
|
|
625
655
|
}
|
|
626
656
|
}
|
|
627
657
|
|
|
628
658
|
/** @private */
|
|
629
659
|
__onComboBoxChange(event) {
|
|
630
660
|
event.stopPropagation();
|
|
631
|
-
this.
|
|
661
|
+
this.__commitPendingValue();
|
|
632
662
|
}
|
|
633
663
|
|
|
634
664
|
/**
|
|
@@ -741,6 +771,6 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
741
771
|
*/
|
|
742
772
|
}
|
|
743
773
|
|
|
744
|
-
|
|
774
|
+
defineCustomElement(TimePicker);
|
|
745
775
|
|
|
746
776
|
export { TimePicker };
|
package/web-types.json
ADDED
|
@@ -0,0 +1,610 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/web-types",
|
|
3
|
+
"name": "@vaadin/time-picker",
|
|
4
|
+
"version": "24.3.0-alpha1",
|
|
5
|
+
"description-markup": "markdown",
|
|
6
|
+
"contributions": {
|
|
7
|
+
"html": {
|
|
8
|
+
"elements": [
|
|
9
|
+
{
|
|
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-alpha1/#/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-alpha1/#/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-alpha1/#/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-alpha1/#/elements/vaadin-item).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha1/#/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.",
|
|
12
|
+
"attributes": [
|
|
13
|
+
{
|
|
14
|
+
"name": "disabled",
|
|
15
|
+
"description": "If true, the user cannot interact with this element.",
|
|
16
|
+
"value": {
|
|
17
|
+
"type": [
|
|
18
|
+
"boolean",
|
|
19
|
+
"null",
|
|
20
|
+
"undefined"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "autofocus",
|
|
26
|
+
"description": "Specify that this control should have input focus when the page loads.",
|
|
27
|
+
"value": {
|
|
28
|
+
"type": [
|
|
29
|
+
"boolean",
|
|
30
|
+
"null",
|
|
31
|
+
"undefined"
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"name": "label",
|
|
37
|
+
"description": "The label text for the input node.\nWhen no light dom defined via [slot=label], this value will be used.",
|
|
38
|
+
"value": {
|
|
39
|
+
"type": [
|
|
40
|
+
"string",
|
|
41
|
+
"null",
|
|
42
|
+
"undefined"
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "invalid",
|
|
48
|
+
"description": "Set to true when the field is invalid.",
|
|
49
|
+
"value": {
|
|
50
|
+
"type": [
|
|
51
|
+
"boolean",
|
|
52
|
+
"null",
|
|
53
|
+
"undefined"
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "required",
|
|
59
|
+
"description": "Specifies that the user must fill in a value.",
|
|
60
|
+
"value": {
|
|
61
|
+
"type": [
|
|
62
|
+
"boolean",
|
|
63
|
+
"null",
|
|
64
|
+
"undefined"
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "error-message",
|
|
70
|
+
"description": "Error to show when the field is invalid.",
|
|
71
|
+
"value": {
|
|
72
|
+
"type": [
|
|
73
|
+
"string",
|
|
74
|
+
"null",
|
|
75
|
+
"undefined"
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "helper-text",
|
|
81
|
+
"description": "String used for the helper text.",
|
|
82
|
+
"value": {
|
|
83
|
+
"type": [
|
|
84
|
+
"string",
|
|
85
|
+
"null",
|
|
86
|
+
"undefined"
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"name": "accessible-name",
|
|
92
|
+
"description": "String used to label the component to screen reader users.",
|
|
93
|
+
"value": {
|
|
94
|
+
"type": [
|
|
95
|
+
"string",
|
|
96
|
+
"null",
|
|
97
|
+
"undefined"
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "accessible-name-ref",
|
|
103
|
+
"description": "Id of the element used as label of the component to screen reader users.",
|
|
104
|
+
"value": {
|
|
105
|
+
"type": [
|
|
106
|
+
"string",
|
|
107
|
+
"null",
|
|
108
|
+
"undefined"
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "value",
|
|
114
|
+
"description": "The time value for this element.\n\nSupported time formats are in ISO 8601:\n- `hh:mm` (default)\n- `hh:mm:ss`\n- `hh:mm:ss.fff`",
|
|
115
|
+
"value": {
|
|
116
|
+
"type": [
|
|
117
|
+
"string"
|
|
118
|
+
]
|
|
119
|
+
}
|
|
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
|
+
{
|
|
133
|
+
"name": "clear-button-visible",
|
|
134
|
+
"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.",
|
|
135
|
+
"value": {
|
|
136
|
+
"type": [
|
|
137
|
+
"boolean",
|
|
138
|
+
"null",
|
|
139
|
+
"undefined"
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "allowed-char-pattern",
|
|
145
|
+
"description": "A pattern matched against individual characters the user inputs.\n\nWhen set, the field will prevent:\n- `keydown` events if the entered key doesn't match `/^allowedCharPattern$/`\n- `paste` events if the pasted text doesn't match `/^allowedCharPattern*$/`\n- `drop` events if the dropped text doesn't match `/^allowedCharPattern*$/`\n\nFor example, to allow entering only numbers and minus signs, use:\n`allowedCharPattern = \"[\\\\d-]\"`",
|
|
146
|
+
"value": {
|
|
147
|
+
"type": [
|
|
148
|
+
"string",
|
|
149
|
+
"null",
|
|
150
|
+
"undefined"
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"name": "autoselect",
|
|
156
|
+
"description": "If true, the input text gets fully selected when the field is focused using click or touch / tap.",
|
|
157
|
+
"value": {
|
|
158
|
+
"type": [
|
|
159
|
+
"boolean",
|
|
160
|
+
"null",
|
|
161
|
+
"undefined"
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"name": "name",
|
|
167
|
+
"description": "The name of this field.",
|
|
168
|
+
"value": {
|
|
169
|
+
"type": [
|
|
170
|
+
"string",
|
|
171
|
+
"null",
|
|
172
|
+
"undefined"
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"name": "placeholder",
|
|
178
|
+
"description": "A hint to the user of what can be entered in the field.",
|
|
179
|
+
"value": {
|
|
180
|
+
"type": [
|
|
181
|
+
"string",
|
|
182
|
+
"null",
|
|
183
|
+
"undefined"
|
|
184
|
+
]
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"name": "readonly",
|
|
189
|
+
"description": "When present, it specifies that the field is read-only.",
|
|
190
|
+
"value": {
|
|
191
|
+
"type": [
|
|
192
|
+
"boolean",
|
|
193
|
+
"null",
|
|
194
|
+
"undefined"
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"name": "title",
|
|
200
|
+
"description": "The text usually displayed in a tooltip popup when the mouse is over the field.",
|
|
201
|
+
"value": {
|
|
202
|
+
"type": [
|
|
203
|
+
"string",
|
|
204
|
+
"null",
|
|
205
|
+
"undefined"
|
|
206
|
+
]
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"name": "pattern",
|
|
211
|
+
"description": "A regular expression that the value is checked against.\nThe pattern must match the entire value, not just some subset.",
|
|
212
|
+
"value": {
|
|
213
|
+
"type": [
|
|
214
|
+
"string",
|
|
215
|
+
"null",
|
|
216
|
+
"undefined"
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"name": "opened",
|
|
222
|
+
"description": "True if the dropdown is open, false otherwise.",
|
|
223
|
+
"value": {
|
|
224
|
+
"type": [
|
|
225
|
+
"boolean",
|
|
226
|
+
"null",
|
|
227
|
+
"undefined"
|
|
228
|
+
]
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"name": "min",
|
|
233
|
+
"description": "Minimum time allowed.\n\nSupported time formats are in ISO 8601:\n- `hh:mm`\n- `hh:mm:ss`\n- `hh:mm:ss.fff`",
|
|
234
|
+
"value": {
|
|
235
|
+
"type": [
|
|
236
|
+
"string"
|
|
237
|
+
]
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"name": "max",
|
|
242
|
+
"description": "Maximum time allowed.\n\nSupported time formats are in ISO 8601:\n- `hh:mm`\n- `hh:mm:ss`\n- `hh:mm:ss.fff`",
|
|
243
|
+
"value": {
|
|
244
|
+
"type": [
|
|
245
|
+
"string"
|
|
246
|
+
]
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"name": "step",
|
|
251
|
+
"description": "Defines the time interval (in seconds) between the items displayed\nin the time selection box. The default is 1 hour (i.e. `3600`).\n\nIt also configures the precision of the value string. By default\nthe component formats values as `hh:mm` but setting a step value\nlower than one minute or one second, format resolution changes to\n`hh:mm:ss` and `hh:mm:ss.fff` respectively.\n\nUnit must be set in seconds, and for correctly configuring intervals\nin the dropdown, it need to evenly divide a day.\n\nNote: it is possible to define step that is dividing an hour in inexact\nfragments (i.e. 5760 seconds which equals 1 hour 36 minutes), but it is\nnot recommended to use it for better UX experience.",
|
|
252
|
+
"value": {
|
|
253
|
+
"type": [
|
|
254
|
+
"number",
|
|
255
|
+
"null",
|
|
256
|
+
"undefined"
|
|
257
|
+
]
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"name": "auto-open-disabled",
|
|
262
|
+
"description": "Set true to prevent the overlay from opening automatically.",
|
|
263
|
+
"value": {
|
|
264
|
+
"type": [
|
|
265
|
+
"boolean",
|
|
266
|
+
"null",
|
|
267
|
+
"undefined"
|
|
268
|
+
]
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"name": "overlay-class",
|
|
273
|
+
"description": "A space-delimited list of CSS class names to set on the overlay element.",
|
|
274
|
+
"value": {
|
|
275
|
+
"type": [
|
|
276
|
+
"string",
|
|
277
|
+
"null",
|
|
278
|
+
"undefined"
|
|
279
|
+
]
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"name": "theme",
|
|
284
|
+
"description": "The theme variants to apply to the component.",
|
|
285
|
+
"value": {
|
|
286
|
+
"type": [
|
|
287
|
+
"string",
|
|
288
|
+
"null",
|
|
289
|
+
"undefined"
|
|
290
|
+
]
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
],
|
|
294
|
+
"js": {
|
|
295
|
+
"properties": [
|
|
296
|
+
{
|
|
297
|
+
"name": "disabled",
|
|
298
|
+
"description": "If true, the user cannot interact with this element.",
|
|
299
|
+
"value": {
|
|
300
|
+
"type": [
|
|
301
|
+
"boolean",
|
|
302
|
+
"null",
|
|
303
|
+
"undefined"
|
|
304
|
+
]
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"name": "autofocus",
|
|
309
|
+
"description": "Specify that this control should have input focus when the page loads.",
|
|
310
|
+
"value": {
|
|
311
|
+
"type": [
|
|
312
|
+
"boolean",
|
|
313
|
+
"null",
|
|
314
|
+
"undefined"
|
|
315
|
+
]
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"name": "label",
|
|
320
|
+
"description": "The label text for the input node.\nWhen no light dom defined via [slot=label], this value will be used.",
|
|
321
|
+
"value": {
|
|
322
|
+
"type": [
|
|
323
|
+
"string",
|
|
324
|
+
"null",
|
|
325
|
+
"undefined"
|
|
326
|
+
]
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"name": "invalid",
|
|
331
|
+
"description": "Set to true when the field is invalid.",
|
|
332
|
+
"value": {
|
|
333
|
+
"type": [
|
|
334
|
+
"boolean",
|
|
335
|
+
"null",
|
|
336
|
+
"undefined"
|
|
337
|
+
]
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"name": "required",
|
|
342
|
+
"description": "Specifies that the user must fill in a value.",
|
|
343
|
+
"value": {
|
|
344
|
+
"type": [
|
|
345
|
+
"boolean",
|
|
346
|
+
"null",
|
|
347
|
+
"undefined"
|
|
348
|
+
]
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"name": "errorMessage",
|
|
353
|
+
"description": "Error to show when the field is invalid.",
|
|
354
|
+
"value": {
|
|
355
|
+
"type": [
|
|
356
|
+
"string",
|
|
357
|
+
"null",
|
|
358
|
+
"undefined"
|
|
359
|
+
]
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"name": "helperText",
|
|
364
|
+
"description": "String used for the helper text.",
|
|
365
|
+
"value": {
|
|
366
|
+
"type": [
|
|
367
|
+
"string",
|
|
368
|
+
"null",
|
|
369
|
+
"undefined"
|
|
370
|
+
]
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"name": "accessibleName",
|
|
375
|
+
"description": "String used to label the component to screen reader users.",
|
|
376
|
+
"value": {
|
|
377
|
+
"type": [
|
|
378
|
+
"string",
|
|
379
|
+
"null",
|
|
380
|
+
"undefined"
|
|
381
|
+
]
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
"name": "accessibleNameRef",
|
|
386
|
+
"description": "Id of the element used as label of the component to screen reader users.",
|
|
387
|
+
"value": {
|
|
388
|
+
"type": [
|
|
389
|
+
"string",
|
|
390
|
+
"null",
|
|
391
|
+
"undefined"
|
|
392
|
+
]
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"name": "value",
|
|
397
|
+
"description": "The time value for this element.\n\nSupported time formats are in ISO 8601:\n- `hh:mm` (default)\n- `hh:mm:ss`\n- `hh:mm:ss.fff`",
|
|
398
|
+
"value": {
|
|
399
|
+
"type": [
|
|
400
|
+
"string"
|
|
401
|
+
]
|
|
402
|
+
}
|
|
403
|
+
},
|
|
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
|
+
{
|
|
416
|
+
"name": "clearButtonVisible",
|
|
417
|
+
"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.",
|
|
418
|
+
"value": {
|
|
419
|
+
"type": [
|
|
420
|
+
"boolean",
|
|
421
|
+
"null",
|
|
422
|
+
"undefined"
|
|
423
|
+
]
|
|
424
|
+
}
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
"name": "allowedCharPattern",
|
|
428
|
+
"description": "A pattern matched against individual characters the user inputs.\n\nWhen set, the field will prevent:\n- `keydown` events if the entered key doesn't match `/^allowedCharPattern$/`\n- `paste` events if the pasted text doesn't match `/^allowedCharPattern*$/`\n- `drop` events if the dropped text doesn't match `/^allowedCharPattern*$/`\n\nFor example, to allow entering only numbers and minus signs, use:\n`allowedCharPattern = \"[\\\\d-]\"`",
|
|
429
|
+
"value": {
|
|
430
|
+
"type": [
|
|
431
|
+
"string",
|
|
432
|
+
"null",
|
|
433
|
+
"undefined"
|
|
434
|
+
]
|
|
435
|
+
}
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
"name": "autoselect",
|
|
439
|
+
"description": "If true, the input text gets fully selected when the field is focused using click or touch / tap.",
|
|
440
|
+
"value": {
|
|
441
|
+
"type": [
|
|
442
|
+
"boolean",
|
|
443
|
+
"null",
|
|
444
|
+
"undefined"
|
|
445
|
+
]
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
"name": "name",
|
|
450
|
+
"description": "The name of this field.",
|
|
451
|
+
"value": {
|
|
452
|
+
"type": [
|
|
453
|
+
"string",
|
|
454
|
+
"null",
|
|
455
|
+
"undefined"
|
|
456
|
+
]
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
"name": "placeholder",
|
|
461
|
+
"description": "A hint to the user of what can be entered in the field.",
|
|
462
|
+
"value": {
|
|
463
|
+
"type": [
|
|
464
|
+
"string",
|
|
465
|
+
"null",
|
|
466
|
+
"undefined"
|
|
467
|
+
]
|
|
468
|
+
}
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
"name": "readonly",
|
|
472
|
+
"description": "When present, it specifies that the field is read-only.",
|
|
473
|
+
"value": {
|
|
474
|
+
"type": [
|
|
475
|
+
"boolean",
|
|
476
|
+
"null",
|
|
477
|
+
"undefined"
|
|
478
|
+
]
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
"name": "title",
|
|
483
|
+
"description": "The text usually displayed in a tooltip popup when the mouse is over the field.",
|
|
484
|
+
"value": {
|
|
485
|
+
"type": [
|
|
486
|
+
"string",
|
|
487
|
+
"null",
|
|
488
|
+
"undefined"
|
|
489
|
+
]
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
"name": "pattern",
|
|
494
|
+
"description": "A regular expression that the value is checked against.\nThe pattern must match the entire value, not just some subset.",
|
|
495
|
+
"value": {
|
|
496
|
+
"type": [
|
|
497
|
+
"string",
|
|
498
|
+
"null",
|
|
499
|
+
"undefined"
|
|
500
|
+
]
|
|
501
|
+
}
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
"name": "opened",
|
|
505
|
+
"description": "True if the dropdown is open, false otherwise.",
|
|
506
|
+
"value": {
|
|
507
|
+
"type": [
|
|
508
|
+
"boolean",
|
|
509
|
+
"null",
|
|
510
|
+
"undefined"
|
|
511
|
+
]
|
|
512
|
+
}
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
"name": "min",
|
|
516
|
+
"description": "Minimum time allowed.\n\nSupported time formats are in ISO 8601:\n- `hh:mm`\n- `hh:mm:ss`\n- `hh:mm:ss.fff`",
|
|
517
|
+
"value": {
|
|
518
|
+
"type": [
|
|
519
|
+
"string"
|
|
520
|
+
]
|
|
521
|
+
}
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
"name": "max",
|
|
525
|
+
"description": "Maximum time allowed.\n\nSupported time formats are in ISO 8601:\n- `hh:mm`\n- `hh:mm:ss`\n- `hh:mm:ss.fff`",
|
|
526
|
+
"value": {
|
|
527
|
+
"type": [
|
|
528
|
+
"string"
|
|
529
|
+
]
|
|
530
|
+
}
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
"name": "step",
|
|
534
|
+
"description": "Defines the time interval (in seconds) between the items displayed\nin the time selection box. The default is 1 hour (i.e. `3600`).\n\nIt also configures the precision of the value string. By default\nthe component formats values as `hh:mm` but setting a step value\nlower than one minute or one second, format resolution changes to\n`hh:mm:ss` and `hh:mm:ss.fff` respectively.\n\nUnit must be set in seconds, and for correctly configuring intervals\nin the dropdown, it need to evenly divide a day.\n\nNote: it is possible to define step that is dividing an hour in inexact\nfragments (i.e. 5760 seconds which equals 1 hour 36 minutes), but it is\nnot recommended to use it for better UX experience.",
|
|
535
|
+
"value": {
|
|
536
|
+
"type": [
|
|
537
|
+
"number",
|
|
538
|
+
"null",
|
|
539
|
+
"undefined"
|
|
540
|
+
]
|
|
541
|
+
}
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
"name": "autoOpenDisabled",
|
|
545
|
+
"description": "Set true to prevent the overlay from opening automatically.",
|
|
546
|
+
"value": {
|
|
547
|
+
"type": [
|
|
548
|
+
"boolean",
|
|
549
|
+
"null",
|
|
550
|
+
"undefined"
|
|
551
|
+
]
|
|
552
|
+
}
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
"name": "overlayClass",
|
|
556
|
+
"description": "A space-delimited list of CSS class names to set on the overlay element.",
|
|
557
|
+
"value": {
|
|
558
|
+
"type": [
|
|
559
|
+
"string",
|
|
560
|
+
"null",
|
|
561
|
+
"undefined"
|
|
562
|
+
]
|
|
563
|
+
}
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
"name": "i18n",
|
|
567
|
+
"description": "The object used to localize this component.\nTo change the default localization, replace the entire\n_i18n_ object or just the property you want to modify.\n\nThe object has the following JSON structure:\n\n```\n{\n // A function to format given `Object` as\n // time string. Object is in the format `{ hours: ..., minutes: ..., seconds: ..., milliseconds: ... }`\n formatTime: (time) => {\n // returns a string representation of the given\n // object in `hh` / 'hh:mm' / 'hh:mm:ss' / 'hh:mm:ss.fff' - formats\n },\n\n // A function to parse the given text to an `Object` in the format\n // `{ hours: ..., minutes: ..., seconds: ..., milliseconds: ... }`.\n // Must properly parse (at least) text\n // formatted by `formatTime`.\n parseTime: text => {\n // Parses a string in object/string that can be formatted by`formatTime`.\n }\n}\n```\n\nBoth `formatTime` and `parseTime` need to be implemented\nto ensure the component works properly.",
|
|
568
|
+
"value": {
|
|
569
|
+
"type": [
|
|
570
|
+
"TimePickerI18n"
|
|
571
|
+
]
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
],
|
|
575
|
+
"events": [
|
|
576
|
+
{
|
|
577
|
+
"name": "validated",
|
|
578
|
+
"description": "Fired whenever the field is validated."
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
"name": "change",
|
|
582
|
+
"description": "Fired when the user commits a value change."
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
"name": "input",
|
|
586
|
+
"description": "Fired when the value is changed by the user: on every typing keystroke,\nand the value is cleared using the clear button."
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
"name": "value-changed",
|
|
590
|
+
"description": "Fired when the `value` property changes."
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
"name": "opened-changed",
|
|
594
|
+
"description": "Fired when the `opened` property changes."
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
"name": "invalid-changed",
|
|
598
|
+
"description": "Fired when the `invalid` property changes."
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
"name": "dirty-changed",
|
|
602
|
+
"description": "Fired when the `dirty` property changes."
|
|
603
|
+
}
|
|
604
|
+
]
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
]
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
}
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/web-types",
|
|
3
|
+
"name": "@vaadin/time-picker",
|
|
4
|
+
"version": "24.3.0-alpha1",
|
|
5
|
+
"description-markup": "markdown",
|
|
6
|
+
"framework": "lit",
|
|
7
|
+
"framework-config": {
|
|
8
|
+
"enable-when": {
|
|
9
|
+
"node-packages": [
|
|
10
|
+
"lit"
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"contributions": {
|
|
15
|
+
"html": {
|
|
16
|
+
"elements": [
|
|
17
|
+
{
|
|
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-alpha1/#/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-alpha1/#/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-alpha1/#/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-alpha1/#/elements/vaadin-item).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/24.3.0-alpha1/#/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.",
|
|
20
|
+
"extension": true,
|
|
21
|
+
"attributes": [
|
|
22
|
+
{
|
|
23
|
+
"name": "?disabled",
|
|
24
|
+
"description": "If true, the user cannot interact with this element.",
|
|
25
|
+
"value": {
|
|
26
|
+
"kind": "expression"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "?autofocus",
|
|
31
|
+
"description": "Specify that this control should have input focus when the page loads.",
|
|
32
|
+
"value": {
|
|
33
|
+
"kind": "expression"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "?invalid",
|
|
38
|
+
"description": "Set to true when the field is invalid.",
|
|
39
|
+
"value": {
|
|
40
|
+
"kind": "expression"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "?required",
|
|
45
|
+
"description": "Specifies that the user must fill in a value.",
|
|
46
|
+
"value": {
|
|
47
|
+
"kind": "expression"
|
|
48
|
+
}
|
|
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
|
+
{
|
|
58
|
+
"name": "?clearButtonVisible",
|
|
59
|
+
"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.",
|
|
60
|
+
"value": {
|
|
61
|
+
"kind": "expression"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "?autoselect",
|
|
66
|
+
"description": "If true, the input text gets fully selected when the field is focused using click or touch / tap.",
|
|
67
|
+
"value": {
|
|
68
|
+
"kind": "expression"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "?readonly",
|
|
73
|
+
"description": "When present, it specifies that the field is read-only.",
|
|
74
|
+
"value": {
|
|
75
|
+
"kind": "expression"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": "?opened",
|
|
80
|
+
"description": "True if the dropdown is open, false otherwise.",
|
|
81
|
+
"value": {
|
|
82
|
+
"kind": "expression"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "?autoOpenDisabled",
|
|
87
|
+
"description": "Set true to prevent the overlay from opening automatically.",
|
|
88
|
+
"value": {
|
|
89
|
+
"kind": "expression"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": ".label",
|
|
94
|
+
"description": "The label text for the input node.\nWhen no light dom defined via [slot=label], this value will be used.",
|
|
95
|
+
"value": {
|
|
96
|
+
"kind": "expression"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": ".errorMessage",
|
|
101
|
+
"description": "Error to show when the field is invalid.",
|
|
102
|
+
"value": {
|
|
103
|
+
"kind": "expression"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": ".helperText",
|
|
108
|
+
"description": "String used for the helper text.",
|
|
109
|
+
"value": {
|
|
110
|
+
"kind": "expression"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": ".accessibleName",
|
|
115
|
+
"description": "String used to label the component to screen reader users.",
|
|
116
|
+
"value": {
|
|
117
|
+
"kind": "expression"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": ".accessibleNameRef",
|
|
122
|
+
"description": "Id of the element used as label of the component to screen reader users.",
|
|
123
|
+
"value": {
|
|
124
|
+
"kind": "expression"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": ".value",
|
|
129
|
+
"description": "The time value for this element.\n\nSupported time formats are in ISO 8601:\n- `hh:mm` (default)\n- `hh:mm:ss`\n- `hh:mm:ss.fff`",
|
|
130
|
+
"value": {
|
|
131
|
+
"kind": "expression"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": ".allowedCharPattern",
|
|
136
|
+
"description": "A pattern matched against individual characters the user inputs.\n\nWhen set, the field will prevent:\n- `keydown` events if the entered key doesn't match `/^allowedCharPattern$/`\n- `paste` events if the pasted text doesn't match `/^allowedCharPattern*$/`\n- `drop` events if the dropped text doesn't match `/^allowedCharPattern*$/`\n\nFor example, to allow entering only numbers and minus signs, use:\n`allowedCharPattern = \"[\\\\d-]\"`",
|
|
137
|
+
"value": {
|
|
138
|
+
"kind": "expression"
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": ".name",
|
|
143
|
+
"description": "The name of this field.",
|
|
144
|
+
"value": {
|
|
145
|
+
"kind": "expression"
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": ".placeholder",
|
|
150
|
+
"description": "A hint to the user of what can be entered in the field.",
|
|
151
|
+
"value": {
|
|
152
|
+
"kind": "expression"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": ".title",
|
|
157
|
+
"description": "The text usually displayed in a tooltip popup when the mouse is over the field.",
|
|
158
|
+
"value": {
|
|
159
|
+
"kind": "expression"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": ".pattern",
|
|
164
|
+
"description": "A regular expression that the value is checked against.\nThe pattern must match the entire value, not just some subset.",
|
|
165
|
+
"value": {
|
|
166
|
+
"kind": "expression"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"name": ".min",
|
|
171
|
+
"description": "Minimum time allowed.\n\nSupported time formats are in ISO 8601:\n- `hh:mm`\n- `hh:mm:ss`\n- `hh:mm:ss.fff`",
|
|
172
|
+
"value": {
|
|
173
|
+
"kind": "expression"
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"name": ".max",
|
|
178
|
+
"description": "Maximum time allowed.\n\nSupported time formats are in ISO 8601:\n- `hh:mm`\n- `hh:mm:ss`\n- `hh:mm:ss.fff`",
|
|
179
|
+
"value": {
|
|
180
|
+
"kind": "expression"
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": ".step",
|
|
185
|
+
"description": "Defines the time interval (in seconds) between the items displayed\nin the time selection box. The default is 1 hour (i.e. `3600`).\n\nIt also configures the precision of the value string. By default\nthe component formats values as `hh:mm` but setting a step value\nlower than one minute or one second, format resolution changes to\n`hh:mm:ss` and `hh:mm:ss.fff` respectively.\n\nUnit must be set in seconds, and for correctly configuring intervals\nin the dropdown, it need to evenly divide a day.\n\nNote: it is possible to define step that is dividing an hour in inexact\nfragments (i.e. 5760 seconds which equals 1 hour 36 minutes), but it is\nnot recommended to use it for better UX experience.",
|
|
186
|
+
"value": {
|
|
187
|
+
"kind": "expression"
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"name": ".overlayClass",
|
|
192
|
+
"description": "A space-delimited list of CSS class names to set on the overlay element.",
|
|
193
|
+
"value": {
|
|
194
|
+
"kind": "expression"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": ".i18n",
|
|
199
|
+
"description": "The object used to localize this component.\nTo change the default localization, replace the entire\n_i18n_ object or just the property you want to modify.\n\nThe object has the following JSON structure:\n\n```\n{\n // A function to format given `Object` as\n // time string. Object is in the format `{ hours: ..., minutes: ..., seconds: ..., milliseconds: ... }`\n formatTime: (time) => {\n // returns a string representation of the given\n // object in `hh` / 'hh:mm' / 'hh:mm:ss' / 'hh:mm:ss.fff' - formats\n },\n\n // A function to parse the given text to an `Object` in the format\n // `{ hours: ..., minutes: ..., seconds: ..., milliseconds: ... }`.\n // Must properly parse (at least) text\n // formatted by `formatTime`.\n parseTime: text => {\n // Parses a string in object/string that can be formatted by`formatTime`.\n }\n}\n```\n\nBoth `formatTime` and `parseTime` need to be implemented\nto ensure the component works properly.",
|
|
200
|
+
"value": {
|
|
201
|
+
"kind": "expression"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"name": "@validated",
|
|
206
|
+
"description": "Fired whenever the field is validated.",
|
|
207
|
+
"value": {
|
|
208
|
+
"kind": "expression"
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"name": "@change",
|
|
213
|
+
"description": "Fired when the user commits a value change.",
|
|
214
|
+
"value": {
|
|
215
|
+
"kind": "expression"
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"name": "@input",
|
|
220
|
+
"description": "Fired when the value is changed by the user: on every typing keystroke,\nand the value is cleared using the clear button.",
|
|
221
|
+
"value": {
|
|
222
|
+
"kind": "expression"
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"name": "@value-changed",
|
|
227
|
+
"description": "Fired when the `value` property changes.",
|
|
228
|
+
"value": {
|
|
229
|
+
"kind": "expression"
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"name": "@opened-changed",
|
|
234
|
+
"description": "Fired when the `opened` property changes.",
|
|
235
|
+
"value": {
|
|
236
|
+
"kind": "expression"
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"name": "@invalid-changed",
|
|
241
|
+
"description": "Fired when the `invalid` property changes.",
|
|
242
|
+
"value": {
|
|
243
|
+
"kind": "expression"
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"name": "@dirty-changed",
|
|
248
|
+
"description": "Fired when the `dirty` property changes.",
|
|
249
|
+
"value": {
|
|
250
|
+
"kind": "expression"
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
]
|
|
254
|
+
}
|
|
255
|
+
]
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|