@vaadin/time-picker 24.2.0-alpha1 → 24.2.0-alpha11
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-overlay.d.ts +4 -2
- package/src/vaadin-time-picker-overlay.js +32 -25
- package/src/vaadin-time-picker.d.ts +8 -0
- package/src/vaadin-time-picker.js +41 -18
- package/theme/lumo/vaadin-time-picker.js +0 -1
- package/theme/material/vaadin-time-picker.js +0 -1
- package/web-types.json +28 -2
- package/web-types.lit.json +16 -2
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-alpha11",
|
|
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-alpha11",
|
|
40
|
+
"@vaadin/component-base": "24.2.0-alpha11",
|
|
41
|
+
"@vaadin/field-base": "24.2.0-alpha11",
|
|
42
|
+
"@vaadin/input-container": "24.2.0-alpha11",
|
|
43
|
+
"@vaadin/item": "24.2.0-alpha11",
|
|
44
|
+
"@vaadin/overlay": "24.2.0-alpha11",
|
|
45
|
+
"@vaadin/vaadin-lumo-styles": "24.2.0-alpha11",
|
|
46
|
+
"@vaadin/vaadin-material-styles": "24.2.0-alpha11",
|
|
47
|
+
"@vaadin/vaadin-themable-mixin": "24.2.0-alpha11"
|
|
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": "a958207d5f6a09ca0e2dcf9f62194b3f92c8766a"
|
|
59
59
|
}
|
|
@@ -4,12 +4,14 @@
|
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import { ComboBoxOverlayMixin } from '@vaadin/combo-box/src/vaadin-combo-box-overlay-mixin.js';
|
|
7
|
-
import {
|
|
7
|
+
import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
|
|
8
|
+
import { OverlayMixin } from '@vaadin/overlay/src/vaadin-overlay-mixin.js';
|
|
9
|
+
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
8
10
|
|
|
9
11
|
/**
|
|
10
12
|
* An element used internally by `<vaadin-time-picker>`. Not intended to be used separately.
|
|
11
13
|
*/
|
|
12
|
-
declare class TimePickerOverlay extends ComboBoxOverlayMixin(
|
|
14
|
+
declare class TimePickerOverlay extends ComboBoxOverlayMixin(OverlayMixin(DirMixin(ThemableMixin(HTMLElement)))) {}
|
|
13
15
|
|
|
14
16
|
declare global {
|
|
15
17
|
interface HTMLElementTagNameMap {
|
|
@@ -3,46 +3,53 @@
|
|
|
3
3
|
* Copyright (c) 2018 - 2023 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
+
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|
6
7
|
import { ComboBoxOverlayMixin } from '@vaadin/combo-box/src/vaadin-combo-box-overlay-mixin.js';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
8
|
+
import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
|
|
9
|
+
import { OverlayMixin } from '@vaadin/overlay/src/vaadin-overlay-mixin.js';
|
|
10
|
+
import { overlayStyles } from '@vaadin/overlay/src/vaadin-overlay-styles.js';
|
|
11
|
+
import { css, registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
9
12
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
width: var(--vaadin-time-picker-overlay-width, var(--_vaadin-time-picker-overlay-default-width, auto));
|
|
15
|
-
}
|
|
13
|
+
const timePickerOverlayStyles = css`
|
|
14
|
+
#overlay {
|
|
15
|
+
width: var(--vaadin-time-picker-overlay-width, var(--_vaadin-time-picker-overlay-default-width, auto));
|
|
16
|
+
}
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
{ moduleId: 'vaadin-time-picker-overlay-styles' },
|
|
24
|
-
);
|
|
18
|
+
[part='content'] {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
height: 100%;
|
|
22
|
+
}
|
|
23
|
+
`;
|
|
25
24
|
|
|
26
|
-
|
|
25
|
+
registerStyles('vaadin-time-picker-overlay', [overlayStyles, timePickerOverlayStyles], {
|
|
26
|
+
moduleId: 'vaadin-time-picker-overlay-styles',
|
|
27
|
+
});
|
|
27
28
|
|
|
28
29
|
/**
|
|
29
30
|
* An element used internally by `<vaadin-time-picker>`. Not intended to be used separately.
|
|
30
31
|
*
|
|
31
|
-
* @extends
|
|
32
|
+
* @extends HTMLElement
|
|
33
|
+
* @mixes ComboBoxOverlayMixin
|
|
34
|
+
* @mixes DirMixin
|
|
35
|
+
* @mixes OverlayMixin
|
|
36
|
+
* @mixes ThemableMixin
|
|
32
37
|
* @private
|
|
33
38
|
*/
|
|
34
|
-
class TimePickerOverlay extends ComboBoxOverlayMixin(
|
|
39
|
+
export class TimePickerOverlay extends ComboBoxOverlayMixin(OverlayMixin(DirMixin(ThemableMixin(PolymerElement)))) {
|
|
35
40
|
static get is() {
|
|
36
41
|
return 'vaadin-time-picker-overlay';
|
|
37
42
|
}
|
|
38
43
|
|
|
39
44
|
static get template() {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
return html`
|
|
46
|
+
<div id="backdrop" part="backdrop" hidden></div>
|
|
47
|
+
<div part="overlay" id="overlay">
|
|
48
|
+
<div part="content" id="content">
|
|
49
|
+
<slot></slot>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
`;
|
|
46
53
|
}
|
|
47
54
|
}
|
|
48
55
|
|
|
@@ -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
|
*/
|
|
@@ -115,6 +115,7 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
115
115
|
<vaadin-time-picker-combo-box
|
|
116
116
|
id="comboBox"
|
|
117
117
|
filtered-items="[[__dropdownItems]]"
|
|
118
|
+
dirty="{{dirty}}"
|
|
118
119
|
value="{{_comboBoxValue}}"
|
|
119
120
|
opened="{{opened}}"
|
|
120
121
|
disabled="[[disabled]]"
|
|
@@ -125,6 +126,7 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
125
126
|
position-target="[[_inputContainer]]"
|
|
126
127
|
theme$="[[_theme]]"
|
|
127
128
|
on-change="__onComboBoxChange"
|
|
129
|
+
on-validated="__onComboBoxValidated"
|
|
128
130
|
on-has-input-value-changed="__onComboBoxHasInputValueChanged"
|
|
129
131
|
>
|
|
130
132
|
<vaadin-input-container
|
|
@@ -371,6 +373,7 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
371
373
|
this._tooltipController = new TooltipController(this);
|
|
372
374
|
this._tooltipController.setShouldShow((timePicker) => !timePicker.opened);
|
|
373
375
|
this._tooltipController.setPosition('top');
|
|
376
|
+
this._tooltipController.setAriaTarget(this.inputElement);
|
|
374
377
|
this.addController(this._tooltipController);
|
|
375
378
|
}
|
|
376
379
|
|
|
@@ -417,19 +420,6 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
417
420
|
);
|
|
418
421
|
}
|
|
419
422
|
|
|
420
|
-
/**
|
|
421
|
-
* Override method inherited from `FocusMixin` to validate on blur.
|
|
422
|
-
* @param {boolean} focused
|
|
423
|
-
* @protected
|
|
424
|
-
*/
|
|
425
|
-
_setFocused(focused) {
|
|
426
|
-
super._setFocused(focused);
|
|
427
|
-
|
|
428
|
-
if (!focused) {
|
|
429
|
-
this.validate();
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
|
|
433
423
|
/** @private */
|
|
434
424
|
__validDayDivisor(step) {
|
|
435
425
|
// Valid if undefined, or exact divides a day, or has millisecond resolution
|
|
@@ -472,10 +462,26 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
472
462
|
__onArrowPressWithStep(step) {
|
|
473
463
|
const objWithStep = this.__addStep(this.__getMsec(this.__memoValue), step, true);
|
|
474
464
|
this.__memoValue = objWithStep;
|
|
475
|
-
|
|
465
|
+
|
|
466
|
+
// Setting `value` property triggers the synchronous observer
|
|
467
|
+
// that in turn updates `_comboBoxValue` (actual input value)
|
|
468
|
+
// with its own observer where the value can be parsed again,
|
|
469
|
+
// so we set this flag to ensure it does not alter the value.
|
|
470
|
+
this.__useMemo = true;
|
|
471
|
+
this.value = this.__formatISO(objWithStep);
|
|
472
|
+
this.__useMemo = false;
|
|
473
|
+
|
|
476
474
|
this.__dispatchChange();
|
|
477
475
|
}
|
|
478
476
|
|
|
477
|
+
/** @private */
|
|
478
|
+
__commitPendingValue() {
|
|
479
|
+
if (this.__committedValue !== this.value) {
|
|
480
|
+
this.__dispatchChange();
|
|
481
|
+
this.__committedValue = this.value;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
|
|
479
485
|
/** @private */
|
|
480
486
|
__dispatchChange() {
|
|
481
487
|
this.dispatchEvent(new CustomEvent('change', { bubbles: true }));
|
|
@@ -607,6 +613,12 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
607
613
|
this.__updateInputValue(parsedObj);
|
|
608
614
|
}
|
|
609
615
|
|
|
616
|
+
// Mark value set programmatically by the user
|
|
617
|
+
// as committed for the change event detection.
|
|
618
|
+
if (!this.__skipCommittedValueUpdate) {
|
|
619
|
+
this.__committedValue = this.value;
|
|
620
|
+
}
|
|
621
|
+
|
|
610
622
|
this._toggleHasValue(this._hasValue);
|
|
611
623
|
}
|
|
612
624
|
|
|
@@ -616,14 +628,16 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
616
628
|
return;
|
|
617
629
|
}
|
|
618
630
|
|
|
619
|
-
const parsedObj = this.i18n.parseTime(value);
|
|
631
|
+
const parsedObj = this.__useMemo ? this.__memoValue : this.i18n.parseTime(value);
|
|
620
632
|
const newValue = this.i18n.formatTime(parsedObj) || '';
|
|
621
633
|
|
|
622
634
|
if (parsedObj) {
|
|
623
635
|
if (value !== newValue) {
|
|
624
636
|
this._comboBoxValue = newValue;
|
|
625
637
|
} else {
|
|
638
|
+
this.__skipCommittedValueUpdate = true;
|
|
626
639
|
this.__updateValue(parsedObj);
|
|
640
|
+
this.__skipCommittedValueUpdate = false;
|
|
627
641
|
}
|
|
628
642
|
} else {
|
|
629
643
|
// If the user input can not be parsed, set a flag
|
|
@@ -633,7 +647,9 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
633
647
|
this.__keepInvalidInput = true;
|
|
634
648
|
}
|
|
635
649
|
|
|
650
|
+
this.__skipCommittedValueUpdate = true;
|
|
636
651
|
this.value = '';
|
|
652
|
+
this.__skipCommittedValueUpdate = false;
|
|
637
653
|
}
|
|
638
654
|
}
|
|
639
655
|
|
|
@@ -641,9 +657,11 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
641
657
|
__onComboBoxChange(event) {
|
|
642
658
|
event.stopPropagation();
|
|
643
659
|
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
this.
|
|
660
|
+
const { value } = event.target;
|
|
661
|
+
// Do not fire change for bad input.
|
|
662
|
+
if (value === '' || this.i18n.parseTime(value)) {
|
|
663
|
+
this.__commitPendingValue();
|
|
664
|
+
}
|
|
647
665
|
}
|
|
648
666
|
|
|
649
667
|
/**
|
|
@@ -655,6 +673,11 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
|
|
|
655
673
|
this._hasInputValue = this.$.comboBox._hasInputValue;
|
|
656
674
|
}
|
|
657
675
|
|
|
676
|
+
/** @private */
|
|
677
|
+
__onComboBoxValidated() {
|
|
678
|
+
this.validate();
|
|
679
|
+
}
|
|
680
|
+
|
|
658
681
|
/** @private */
|
|
659
682
|
__updateValue(obj) {
|
|
660
683
|
const timeString = this.__formatISO(this.__validateTime(obj)) || '';
|
|
@@ -4,6 +4,5 @@
|
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import '@vaadin/input-container/theme/lumo/vaadin-input-container.js';
|
|
7
|
-
import '@vaadin/overlay/theme/lumo/vaadin-overlay.js';
|
|
8
7
|
import './vaadin-time-picker-styles.js';
|
|
9
8
|
import '../../src/vaadin-time-picker.js';
|
|
@@ -4,6 +4,5 @@
|
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
6
|
import '@vaadin/input-container/theme/material/vaadin-input-container.js';
|
|
7
|
-
import '@vaadin/overlay/theme/material/vaadin-overlay.js';
|
|
8
7
|
import './vaadin-time-picker-styles.js';
|
|
9
8
|
import '../../src/vaadin-time-picker.js';
|
package/web-types.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/time-picker",
|
|
4
|
-
"version": "24.2.0-
|
|
4
|
+
"version": "24.2.0-alpha11",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"elements": [
|
|
9
9
|
{
|
|
10
10
|
"name": "vaadin-time-picker",
|
|
11
|
-
"description": "`<vaadin-time-picker>` is a Web Component providing a time-selection field.\n\n```html\n<vaadin-time-picker></vaadin-time-picker>\n```\n```js\ntimePicker.value = '14:30';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n----------------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n`--vaadin-combo-box-overlay-max-height` | Max height of the overlay | `65vh`\n\n`<vaadin-time-picker>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-
|
|
11
|
+
"description": "`<vaadin-time-picker>` is a Web Component providing a time-selection field.\n\n```html\n<vaadin-time-picker></vaadin-time-picker>\n```\n```js\ntimePicker.value = '14:30';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n----------------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n`--vaadin-combo-box-overlay-max-height` | Max height of the overlay | `65vh`\n\n`<vaadin-time-picker>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha11/#/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-alpha11/#/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-alpha11/#/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-alpha11/#/elements/vaadin-item).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha11/#/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
12
|
"attributes": [
|
|
13
13
|
{
|
|
14
14
|
"name": "disabled",
|
|
@@ -118,6 +118,17 @@
|
|
|
118
118
|
]
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
|
+
{
|
|
122
|
+
"name": "dirty",
|
|
123
|
+
"description": "Whether the field is dirty.\n\nThe field is automatically marked as dirty once the user triggers\nan `input` or `change` event. Additionally, the field can be manually\nmarked as dirty by setting the property to `true`.",
|
|
124
|
+
"value": {
|
|
125
|
+
"type": [
|
|
126
|
+
"boolean",
|
|
127
|
+
"null",
|
|
128
|
+
"undefined"
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
},
|
|
121
132
|
{
|
|
122
133
|
"name": "clear-button-visible",
|
|
123
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.",
|
|
@@ -390,6 +401,17 @@
|
|
|
390
401
|
]
|
|
391
402
|
}
|
|
392
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
|
+
},
|
|
393
415
|
{
|
|
394
416
|
"name": "clearButtonVisible",
|
|
395
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.",
|
|
@@ -574,6 +596,10 @@
|
|
|
574
596
|
{
|
|
575
597
|
"name": "invalid-changed",
|
|
576
598
|
"description": "Fired when the `invalid` property changes."
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
"name": "dirty-changed",
|
|
602
|
+
"description": "Fired when the `dirty` property changes."
|
|
577
603
|
}
|
|
578
604
|
]
|
|
579
605
|
}
|
package/web-types.lit.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"name": "@vaadin/time-picker",
|
|
4
|
-
"version": "24.2.0-
|
|
4
|
+
"version": "24.2.0-alpha11",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"framework": "lit",
|
|
7
7
|
"framework-config": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"elements": [
|
|
17
17
|
{
|
|
18
18
|
"name": "vaadin-time-picker",
|
|
19
|
-
"description": "`<vaadin-time-picker>` is a Web Component providing a time-selection field.\n\n```html\n<vaadin-time-picker></vaadin-time-picker>\n```\n```js\ntimePicker.value = '14:30';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n----------------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n`--vaadin-combo-box-overlay-max-height` | Max height of the overlay | `65vh`\n\n`<vaadin-time-picker>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-
|
|
19
|
+
"description": "`<vaadin-time-picker>` is a Web Component providing a time-selection field.\n\n```html\n<vaadin-time-picker></vaadin-time-picker>\n```\n```js\ntimePicker.value = '14:30';\n```\n\nWhen the selected `value` is changed, a `value-changed` event is triggered.\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n----------------------------------------|----------------------------|---------\n`--vaadin-field-default-width` | Default width of the field | `12em`\n`--vaadin-combo-box-overlay-max-height` | Max height of the overlay | `65vh`\n\n`<vaadin-time-picker>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\nSee [`<vaadin-text-field>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha11/#/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-alpha11/#/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-alpha11/#/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-alpha11/#/elements/vaadin-item).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/24.2.0-alpha11/#/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
20
|
"extension": true,
|
|
21
21
|
"attributes": [
|
|
22
22
|
{
|
|
@@ -47,6 +47,13 @@
|
|
|
47
47
|
"kind": "expression"
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
|
+
{
|
|
51
|
+
"name": "?dirty",
|
|
52
|
+
"description": "Whether the field is dirty.\n\nThe field is automatically marked as dirty once the user triggers\nan `input` or `change` event. Additionally, the field can be manually\nmarked as dirty by setting the property to `true`.",
|
|
53
|
+
"value": {
|
|
54
|
+
"kind": "expression"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
50
57
|
{
|
|
51
58
|
"name": "?clearButtonVisible",
|
|
52
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.",
|
|
@@ -235,6 +242,13 @@
|
|
|
235
242
|
"value": {
|
|
236
243
|
"kind": "expression"
|
|
237
244
|
}
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"name": "@dirty-changed",
|
|
248
|
+
"description": "Fired when the `dirty` property changes.",
|
|
249
|
+
"value": {
|
|
250
|
+
"kind": "expression"
|
|
251
|
+
}
|
|
238
252
|
}
|
|
239
253
|
]
|
|
240
254
|
}
|