@vaadin/time-picker 24.2.0-dev.f254716fe → 24.2.0
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.js +34 -5
- package/web-types.json +584 -0
- package/web-types.lit.json +244 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/time-picker",
|
|
3
|
-
"version": "24.2.0
|
|
3
|
+
"version": "24.2.0",
|
|
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.2.0
|
|
40
|
-
"@vaadin/component-base": "24.2.0
|
|
41
|
-
"@vaadin/field-base": "24.2.0
|
|
42
|
-
"@vaadin/input-container": "24.2.0
|
|
43
|
-
"@vaadin/item": "24.2.0
|
|
44
|
-
"@vaadin/overlay": "24.2.0
|
|
45
|
-
"@vaadin/vaadin-lumo-styles": "24.2.0
|
|
46
|
-
"@vaadin/vaadin-material-styles": "24.2.0
|
|
47
|
-
"@vaadin/vaadin-themable-mixin": "24.2.0
|
|
39
|
+
"@vaadin/combo-box": "~24.2.0",
|
|
40
|
+
"@vaadin/component-base": "~24.2.0",
|
|
41
|
+
"@vaadin/field-base": "~24.2.0",
|
|
42
|
+
"@vaadin/input-container": "~24.2.0",
|
|
43
|
+
"@vaadin/item": "~24.2.0",
|
|
44
|
+
"@vaadin/overlay": "~24.2.0",
|
|
45
|
+
"@vaadin/vaadin-lumo-styles": "~24.2.0",
|
|
46
|
+
"@vaadin/vaadin-material-styles": "~24.2.0",
|
|
47
|
+
"@vaadin/vaadin-themable-mixin": "~24.2.0"
|
|
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": "8b9e860d53fc0132d05d3e8701eeded2dca74eba"
|
|
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);
|
|
@@ -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
|
|
@@ -372,6 +374,7 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
372
374
|
this._tooltipController = new TooltipController(this);
|
|
373
375
|
this._tooltipController.setShouldShow((timePicker) => !timePicker.opened);
|
|
374
376
|
this._tooltipController.setPosition('top');
|
|
377
|
+
this._tooltipController.setAriaTarget(this.inputElement);
|
|
375
378
|
this.addController(this._tooltipController);
|
|
376
379
|
}
|
|
377
380
|
|
|
@@ -460,8 +463,24 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
460
463
|
__onArrowPressWithStep(step) {
|
|
461
464
|
const objWithStep = this.__addStep(this.__getMsec(this.__memoValue), step, true);
|
|
462
465
|
this.__memoValue = objWithStep;
|
|
463
|
-
|
|
464
|
-
|
|
466
|
+
|
|
467
|
+
// Setting `_comboBoxValue` property triggers the synchronous
|
|
468
|
+
// observer where the value can be parsed again, so we set
|
|
469
|
+
// this flag to ensure it does not alter the value.
|
|
470
|
+
this.__useMemo = true;
|
|
471
|
+
this._comboBoxValue = this.i18n.formatTime(objWithStep);
|
|
472
|
+
this.__useMemo = false;
|
|
473
|
+
|
|
474
|
+
this.validate();
|
|
475
|
+
this.__commitPendingValue();
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
/** @private */
|
|
479
|
+
__commitPendingValue() {
|
|
480
|
+
if (this.__committedValue !== this.value) {
|
|
481
|
+
this.__dispatchChange();
|
|
482
|
+
this.__committedValue = this.value;
|
|
483
|
+
}
|
|
465
484
|
}
|
|
466
485
|
|
|
467
486
|
/** @private */
|
|
@@ -581,6 +600,12 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
581
600
|
const parsedObj = (this.__memoValue = this.__parseISO(value));
|
|
582
601
|
const newValue = this.__formatISO(parsedObj) || '';
|
|
583
602
|
|
|
603
|
+
// Mark value set programmatically by the user
|
|
604
|
+
// as committed for the change event detection.
|
|
605
|
+
if (!this.__skipCommittedValueUpdate) {
|
|
606
|
+
this.__committedValue = value;
|
|
607
|
+
}
|
|
608
|
+
|
|
584
609
|
if (value !== '' && value !== null && !parsedObj) {
|
|
585
610
|
// Value can not be parsed, reset to the old one.
|
|
586
611
|
this.value = oldValue === undefined ? '' : oldValue;
|
|
@@ -604,14 +629,16 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
604
629
|
return;
|
|
605
630
|
}
|
|
606
631
|
|
|
607
|
-
const parsedObj = this.i18n.parseTime(value);
|
|
632
|
+
const parsedObj = this.__useMemo ? this.__memoValue : this.i18n.parseTime(value);
|
|
608
633
|
const newValue = this.i18n.formatTime(parsedObj) || '';
|
|
609
634
|
|
|
610
635
|
if (parsedObj) {
|
|
611
636
|
if (value !== newValue) {
|
|
612
637
|
this._comboBoxValue = newValue;
|
|
613
638
|
} else {
|
|
639
|
+
this.__skipCommittedValueUpdate = true;
|
|
614
640
|
this.__updateValue(parsedObj);
|
|
641
|
+
this.__skipCommittedValueUpdate = false;
|
|
615
642
|
}
|
|
616
643
|
} else {
|
|
617
644
|
// If the user input can not be parsed, set a flag
|
|
@@ -621,14 +648,16 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
621
648
|
this.__keepInvalidInput = true;
|
|
622
649
|
}
|
|
623
650
|
|
|
651
|
+
this.__skipCommittedValueUpdate = true;
|
|
624
652
|
this.value = '';
|
|
653
|
+
this.__skipCommittedValueUpdate = false;
|
|
625
654
|
}
|
|
626
655
|
}
|
|
627
656
|
|
|
628
657
|
/** @private */
|
|
629
658
|
__onComboBoxChange(event) {
|
|
630
659
|
event.stopPropagation();
|
|
631
|
-
this.
|
|
660
|
+
this.__commitPendingValue();
|
|
632
661
|
}
|
|
633
662
|
|
|
634
663
|
/**
|
|
@@ -741,6 +770,6 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
741
770
|
*/
|
|
742
771
|
}
|
|
743
772
|
|
|
744
|
-
|
|
773
|
+
defineCustomElement(TimePicker);
|
|
745
774
|
|
|
746
775
|
export { TimePicker };
|
package/web-types.json
ADDED
|
@@ -0,0 +1,584 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/web-types",
|
|
3
|
+
"name": "@vaadin/time-picker",
|
|
4
|
+
"version": "24.2.0",
|
|
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.2.0/#/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.2.0/#/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.2.0/#/elements/vaadin-overlay).\n- `<vaadin-time-picker-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0/#/elements/vaadin-item).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0/#/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": "clear-button-visible",
|
|
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.",
|
|
124
|
+
"value": {
|
|
125
|
+
"type": [
|
|
126
|
+
"boolean",
|
|
127
|
+
"null",
|
|
128
|
+
"undefined"
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"name": "allowed-char-pattern",
|
|
134
|
+
"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-]\"`",
|
|
135
|
+
"value": {
|
|
136
|
+
"type": [
|
|
137
|
+
"string",
|
|
138
|
+
"null",
|
|
139
|
+
"undefined"
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "autoselect",
|
|
145
|
+
"description": "If true, the input text gets fully selected when the field is focused using click or touch / tap.",
|
|
146
|
+
"value": {
|
|
147
|
+
"type": [
|
|
148
|
+
"boolean",
|
|
149
|
+
"null",
|
|
150
|
+
"undefined"
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"name": "name",
|
|
156
|
+
"description": "The name of this field.",
|
|
157
|
+
"value": {
|
|
158
|
+
"type": [
|
|
159
|
+
"string",
|
|
160
|
+
"null",
|
|
161
|
+
"undefined"
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"name": "placeholder",
|
|
167
|
+
"description": "A hint to the user of what can be entered in the field.",
|
|
168
|
+
"value": {
|
|
169
|
+
"type": [
|
|
170
|
+
"string",
|
|
171
|
+
"null",
|
|
172
|
+
"undefined"
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"name": "readonly",
|
|
178
|
+
"description": "When present, it specifies that the field is read-only.",
|
|
179
|
+
"value": {
|
|
180
|
+
"type": [
|
|
181
|
+
"boolean",
|
|
182
|
+
"null",
|
|
183
|
+
"undefined"
|
|
184
|
+
]
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"name": "title",
|
|
189
|
+
"description": "The text usually displayed in a tooltip popup when the mouse is over the field.",
|
|
190
|
+
"value": {
|
|
191
|
+
"type": [
|
|
192
|
+
"string",
|
|
193
|
+
"null",
|
|
194
|
+
"undefined"
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"name": "pattern",
|
|
200
|
+
"description": "A regular expression that the value is checked against.\nThe pattern must match the entire value, not just some subset.",
|
|
201
|
+
"value": {
|
|
202
|
+
"type": [
|
|
203
|
+
"string",
|
|
204
|
+
"null",
|
|
205
|
+
"undefined"
|
|
206
|
+
]
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"name": "opened",
|
|
211
|
+
"description": "True if the dropdown is open, false otherwise.",
|
|
212
|
+
"value": {
|
|
213
|
+
"type": [
|
|
214
|
+
"boolean",
|
|
215
|
+
"null",
|
|
216
|
+
"undefined"
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"name": "min",
|
|
222
|
+
"description": "Minimum time allowed.\n\nSupported time formats are in ISO 8601:\n- `hh:mm`\n- `hh:mm:ss`\n- `hh:mm:ss.fff`",
|
|
223
|
+
"value": {
|
|
224
|
+
"type": [
|
|
225
|
+
"string"
|
|
226
|
+
]
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"name": "max",
|
|
231
|
+
"description": "Maximum time allowed.\n\nSupported time formats are in ISO 8601:\n- `hh:mm`\n- `hh:mm:ss`\n- `hh:mm:ss.fff`",
|
|
232
|
+
"value": {
|
|
233
|
+
"type": [
|
|
234
|
+
"string"
|
|
235
|
+
]
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"name": "step",
|
|
240
|
+
"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.",
|
|
241
|
+
"value": {
|
|
242
|
+
"type": [
|
|
243
|
+
"number",
|
|
244
|
+
"null",
|
|
245
|
+
"undefined"
|
|
246
|
+
]
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"name": "auto-open-disabled",
|
|
251
|
+
"description": "Set true to prevent the overlay from opening automatically.",
|
|
252
|
+
"value": {
|
|
253
|
+
"type": [
|
|
254
|
+
"boolean",
|
|
255
|
+
"null",
|
|
256
|
+
"undefined"
|
|
257
|
+
]
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"name": "overlay-class",
|
|
262
|
+
"description": "A space-delimited list of CSS class names to set on the overlay element.",
|
|
263
|
+
"value": {
|
|
264
|
+
"type": [
|
|
265
|
+
"string",
|
|
266
|
+
"null",
|
|
267
|
+
"undefined"
|
|
268
|
+
]
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"name": "theme",
|
|
273
|
+
"description": "The theme variants to apply to the component.",
|
|
274
|
+
"value": {
|
|
275
|
+
"type": [
|
|
276
|
+
"string",
|
|
277
|
+
"null",
|
|
278
|
+
"undefined"
|
|
279
|
+
]
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
],
|
|
283
|
+
"js": {
|
|
284
|
+
"properties": [
|
|
285
|
+
{
|
|
286
|
+
"name": "disabled",
|
|
287
|
+
"description": "If true, the user cannot interact with this element.",
|
|
288
|
+
"value": {
|
|
289
|
+
"type": [
|
|
290
|
+
"boolean",
|
|
291
|
+
"null",
|
|
292
|
+
"undefined"
|
|
293
|
+
]
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"name": "autofocus",
|
|
298
|
+
"description": "Specify that this control should have input focus when the page loads.",
|
|
299
|
+
"value": {
|
|
300
|
+
"type": [
|
|
301
|
+
"boolean",
|
|
302
|
+
"null",
|
|
303
|
+
"undefined"
|
|
304
|
+
]
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"name": "label",
|
|
309
|
+
"description": "The label text for the input node.\nWhen no light dom defined via [slot=label], this value will be used.",
|
|
310
|
+
"value": {
|
|
311
|
+
"type": [
|
|
312
|
+
"string",
|
|
313
|
+
"null",
|
|
314
|
+
"undefined"
|
|
315
|
+
]
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"name": "invalid",
|
|
320
|
+
"description": "Set to true when the field is invalid.",
|
|
321
|
+
"value": {
|
|
322
|
+
"type": [
|
|
323
|
+
"boolean",
|
|
324
|
+
"null",
|
|
325
|
+
"undefined"
|
|
326
|
+
]
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"name": "required",
|
|
331
|
+
"description": "Specifies that the user must fill in a value.",
|
|
332
|
+
"value": {
|
|
333
|
+
"type": [
|
|
334
|
+
"boolean",
|
|
335
|
+
"null",
|
|
336
|
+
"undefined"
|
|
337
|
+
]
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"name": "errorMessage",
|
|
342
|
+
"description": "Error to show when the field is invalid.",
|
|
343
|
+
"value": {
|
|
344
|
+
"type": [
|
|
345
|
+
"string",
|
|
346
|
+
"null",
|
|
347
|
+
"undefined"
|
|
348
|
+
]
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"name": "helperText",
|
|
353
|
+
"description": "String used for the helper text.",
|
|
354
|
+
"value": {
|
|
355
|
+
"type": [
|
|
356
|
+
"string",
|
|
357
|
+
"null",
|
|
358
|
+
"undefined"
|
|
359
|
+
]
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"name": "accessibleName",
|
|
364
|
+
"description": "String used to label the component to screen reader users.",
|
|
365
|
+
"value": {
|
|
366
|
+
"type": [
|
|
367
|
+
"string",
|
|
368
|
+
"null",
|
|
369
|
+
"undefined"
|
|
370
|
+
]
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"name": "accessibleNameRef",
|
|
375
|
+
"description": "Id of the element used as label of the component to screen reader users.",
|
|
376
|
+
"value": {
|
|
377
|
+
"type": [
|
|
378
|
+
"string",
|
|
379
|
+
"null",
|
|
380
|
+
"undefined"
|
|
381
|
+
]
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
"name": "value",
|
|
386
|
+
"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`",
|
|
387
|
+
"value": {
|
|
388
|
+
"type": [
|
|
389
|
+
"string"
|
|
390
|
+
]
|
|
391
|
+
}
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
"name": "clearButtonVisible",
|
|
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.",
|
|
396
|
+
"value": {
|
|
397
|
+
"type": [
|
|
398
|
+
"boolean",
|
|
399
|
+
"null",
|
|
400
|
+
"undefined"
|
|
401
|
+
]
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"name": "allowedCharPattern",
|
|
406
|
+
"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-]\"`",
|
|
407
|
+
"value": {
|
|
408
|
+
"type": [
|
|
409
|
+
"string",
|
|
410
|
+
"null",
|
|
411
|
+
"undefined"
|
|
412
|
+
]
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
"name": "autoselect",
|
|
417
|
+
"description": "If true, the input text gets fully selected when the field is focused using click or touch / tap.",
|
|
418
|
+
"value": {
|
|
419
|
+
"type": [
|
|
420
|
+
"boolean",
|
|
421
|
+
"null",
|
|
422
|
+
"undefined"
|
|
423
|
+
]
|
|
424
|
+
}
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
"name": "name",
|
|
428
|
+
"description": "The name of this field.",
|
|
429
|
+
"value": {
|
|
430
|
+
"type": [
|
|
431
|
+
"string",
|
|
432
|
+
"null",
|
|
433
|
+
"undefined"
|
|
434
|
+
]
|
|
435
|
+
}
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
"name": "placeholder",
|
|
439
|
+
"description": "A hint to the user of what can be entered in the field.",
|
|
440
|
+
"value": {
|
|
441
|
+
"type": [
|
|
442
|
+
"string",
|
|
443
|
+
"null",
|
|
444
|
+
"undefined"
|
|
445
|
+
]
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
"name": "readonly",
|
|
450
|
+
"description": "When present, it specifies that the field is read-only.",
|
|
451
|
+
"value": {
|
|
452
|
+
"type": [
|
|
453
|
+
"boolean",
|
|
454
|
+
"null",
|
|
455
|
+
"undefined"
|
|
456
|
+
]
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
"name": "title",
|
|
461
|
+
"description": "The text usually displayed in a tooltip popup when the mouse is over the field.",
|
|
462
|
+
"value": {
|
|
463
|
+
"type": [
|
|
464
|
+
"string",
|
|
465
|
+
"null",
|
|
466
|
+
"undefined"
|
|
467
|
+
]
|
|
468
|
+
}
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
"name": "pattern",
|
|
472
|
+
"description": "A regular expression that the value is checked against.\nThe pattern must match the entire value, not just some subset.",
|
|
473
|
+
"value": {
|
|
474
|
+
"type": [
|
|
475
|
+
"string",
|
|
476
|
+
"null",
|
|
477
|
+
"undefined"
|
|
478
|
+
]
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
"name": "opened",
|
|
483
|
+
"description": "True if the dropdown is open, false otherwise.",
|
|
484
|
+
"value": {
|
|
485
|
+
"type": [
|
|
486
|
+
"boolean",
|
|
487
|
+
"null",
|
|
488
|
+
"undefined"
|
|
489
|
+
]
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
"name": "min",
|
|
494
|
+
"description": "Minimum time allowed.\n\nSupported time formats are in ISO 8601:\n- `hh:mm`\n- `hh:mm:ss`\n- `hh:mm:ss.fff`",
|
|
495
|
+
"value": {
|
|
496
|
+
"type": [
|
|
497
|
+
"string"
|
|
498
|
+
]
|
|
499
|
+
}
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
"name": "max",
|
|
503
|
+
"description": "Maximum time allowed.\n\nSupported time formats are in ISO 8601:\n- `hh:mm`\n- `hh:mm:ss`\n- `hh:mm:ss.fff`",
|
|
504
|
+
"value": {
|
|
505
|
+
"type": [
|
|
506
|
+
"string"
|
|
507
|
+
]
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
"name": "step",
|
|
512
|
+
"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.",
|
|
513
|
+
"value": {
|
|
514
|
+
"type": [
|
|
515
|
+
"number",
|
|
516
|
+
"null",
|
|
517
|
+
"undefined"
|
|
518
|
+
]
|
|
519
|
+
}
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
"name": "autoOpenDisabled",
|
|
523
|
+
"description": "Set true to prevent the overlay from opening automatically.",
|
|
524
|
+
"value": {
|
|
525
|
+
"type": [
|
|
526
|
+
"boolean",
|
|
527
|
+
"null",
|
|
528
|
+
"undefined"
|
|
529
|
+
]
|
|
530
|
+
}
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
"name": "overlayClass",
|
|
534
|
+
"description": "A space-delimited list of CSS class names to set on the overlay element.",
|
|
535
|
+
"value": {
|
|
536
|
+
"type": [
|
|
537
|
+
"string",
|
|
538
|
+
"null",
|
|
539
|
+
"undefined"
|
|
540
|
+
]
|
|
541
|
+
}
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
"name": "i18n",
|
|
545
|
+
"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.",
|
|
546
|
+
"value": {
|
|
547
|
+
"type": [
|
|
548
|
+
"TimePickerI18n"
|
|
549
|
+
]
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
],
|
|
553
|
+
"events": [
|
|
554
|
+
{
|
|
555
|
+
"name": "validated",
|
|
556
|
+
"description": "Fired whenever the field is validated."
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
"name": "change",
|
|
560
|
+
"description": "Fired when the user commits a value change."
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
"name": "input",
|
|
564
|
+
"description": "Fired when the value is changed by the user: on every typing keystroke,\nand the value is cleared using the clear button."
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
"name": "value-changed",
|
|
568
|
+
"description": "Fired when the `value` property changes."
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
"name": "opened-changed",
|
|
572
|
+
"description": "Fired when the `opened` property changes."
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
"name": "invalid-changed",
|
|
576
|
+
"description": "Fired when the `invalid` property changes."
|
|
577
|
+
}
|
|
578
|
+
]
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
]
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/web-types",
|
|
3
|
+
"name": "@vaadin/time-picker",
|
|
4
|
+
"version": "24.2.0",
|
|
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.2.0/#/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.2.0/#/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.2.0/#/elements/vaadin-overlay).\n- `<vaadin-time-picker-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0/#/elements/vaadin-item).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0/#/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": "?clearButtonVisible",
|
|
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.",
|
|
53
|
+
"value": {
|
|
54
|
+
"kind": "expression"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "?autoselect",
|
|
59
|
+
"description": "If true, the input text gets fully selected when the field is focused using click or touch / tap.",
|
|
60
|
+
"value": {
|
|
61
|
+
"kind": "expression"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "?readonly",
|
|
66
|
+
"description": "When present, it specifies that the field is read-only.",
|
|
67
|
+
"value": {
|
|
68
|
+
"kind": "expression"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "?opened",
|
|
73
|
+
"description": "True if the dropdown is open, false otherwise.",
|
|
74
|
+
"value": {
|
|
75
|
+
"kind": "expression"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": "?autoOpenDisabled",
|
|
80
|
+
"description": "Set true to prevent the overlay from opening automatically.",
|
|
81
|
+
"value": {
|
|
82
|
+
"kind": "expression"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": ".label",
|
|
87
|
+
"description": "The label text for the input node.\nWhen no light dom defined via [slot=label], this value will be used.",
|
|
88
|
+
"value": {
|
|
89
|
+
"kind": "expression"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": ".errorMessage",
|
|
94
|
+
"description": "Error to show when the field is invalid.",
|
|
95
|
+
"value": {
|
|
96
|
+
"kind": "expression"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": ".helperText",
|
|
101
|
+
"description": "String used for the helper text.",
|
|
102
|
+
"value": {
|
|
103
|
+
"kind": "expression"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": ".accessibleName",
|
|
108
|
+
"description": "String used to label the component to screen reader users.",
|
|
109
|
+
"value": {
|
|
110
|
+
"kind": "expression"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": ".accessibleNameRef",
|
|
115
|
+
"description": "Id of the element used as label of the component to screen reader users.",
|
|
116
|
+
"value": {
|
|
117
|
+
"kind": "expression"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": ".value",
|
|
122
|
+
"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`",
|
|
123
|
+
"value": {
|
|
124
|
+
"kind": "expression"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": ".allowedCharPattern",
|
|
129
|
+
"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-]\"`",
|
|
130
|
+
"value": {
|
|
131
|
+
"kind": "expression"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": ".name",
|
|
136
|
+
"description": "The name of this field.",
|
|
137
|
+
"value": {
|
|
138
|
+
"kind": "expression"
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": ".placeholder",
|
|
143
|
+
"description": "A hint to the user of what can be entered in the field.",
|
|
144
|
+
"value": {
|
|
145
|
+
"kind": "expression"
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": ".title",
|
|
150
|
+
"description": "The text usually displayed in a tooltip popup when the mouse is over the field.",
|
|
151
|
+
"value": {
|
|
152
|
+
"kind": "expression"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": ".pattern",
|
|
157
|
+
"description": "A regular expression that the value is checked against.\nThe pattern must match the entire value, not just some subset.",
|
|
158
|
+
"value": {
|
|
159
|
+
"kind": "expression"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": ".min",
|
|
164
|
+
"description": "Minimum time allowed.\n\nSupported time formats are in ISO 8601:\n- `hh:mm`\n- `hh:mm:ss`\n- `hh:mm:ss.fff`",
|
|
165
|
+
"value": {
|
|
166
|
+
"kind": "expression"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"name": ".max",
|
|
171
|
+
"description": "Maximum 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": ".step",
|
|
178
|
+
"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.",
|
|
179
|
+
"value": {
|
|
180
|
+
"kind": "expression"
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": ".overlayClass",
|
|
185
|
+
"description": "A space-delimited list of CSS class names to set on the overlay element.",
|
|
186
|
+
"value": {
|
|
187
|
+
"kind": "expression"
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"name": ".i18n",
|
|
192
|
+
"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.",
|
|
193
|
+
"value": {
|
|
194
|
+
"kind": "expression"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": "@validated",
|
|
199
|
+
"description": "Fired whenever the field is validated.",
|
|
200
|
+
"value": {
|
|
201
|
+
"kind": "expression"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"name": "@change",
|
|
206
|
+
"description": "Fired when the user commits a value change.",
|
|
207
|
+
"value": {
|
|
208
|
+
"kind": "expression"
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"name": "@input",
|
|
213
|
+
"description": "Fired when the value is changed by the user: on every typing keystroke,\nand the value is cleared using the clear button.",
|
|
214
|
+
"value": {
|
|
215
|
+
"kind": "expression"
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"name": "@value-changed",
|
|
220
|
+
"description": "Fired when the `value` property changes.",
|
|
221
|
+
"value": {
|
|
222
|
+
"kind": "expression"
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"name": "@opened-changed",
|
|
227
|
+
"description": "Fired when the `opened` property changes.",
|
|
228
|
+
"value": {
|
|
229
|
+
"kind": "expression"
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"name": "@invalid-changed",
|
|
234
|
+
"description": "Fired when the `invalid` property changes.",
|
|
235
|
+
"value": {
|
|
236
|
+
"kind": "expression"
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
]
|
|
240
|
+
}
|
|
241
|
+
]
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|