@vaadin/time-picker 25.3.0-rc1 → 25.3.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/time-picker",
3
- "version": "25.3.0-rc1",
3
+ "version": "25.3.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -35,22 +35,22 @@
35
35
  ],
36
36
  "dependencies": {
37
37
  "@open-wc/dedupe-mixin": "^1.3.0",
38
- "@vaadin/a11y-base": "25.3.0-rc1",
39
- "@vaadin/combo-box": "25.3.0-rc1",
40
- "@vaadin/component-base": "25.3.0-rc1",
41
- "@vaadin/field-base": "25.3.0-rc1",
42
- "@vaadin/input-container": "25.3.0-rc1",
43
- "@vaadin/item": "25.3.0-rc1",
44
- "@vaadin/overlay": "25.3.0-rc1",
45
- "@vaadin/vaadin-themable-mixin": "25.3.0-rc1",
38
+ "@vaadin/a11y-base": "~25.3.1",
39
+ "@vaadin/combo-box": "~25.3.1",
40
+ "@vaadin/component-base": "~25.3.1",
41
+ "@vaadin/field-base": "~25.3.1",
42
+ "@vaadin/input-container": "~25.3.1",
43
+ "@vaadin/item": "~25.3.1",
44
+ "@vaadin/overlay": "~25.3.1",
45
+ "@vaadin/vaadin-themable-mixin": "~25.3.1",
46
46
  "lit": "^3.0.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@vaadin/aura": "25.3.0-rc1",
50
- "@vaadin/chai-plugins": "25.3.0-rc1",
51
- "@vaadin/test-runner-commands": "25.3.0-rc1",
49
+ "@vaadin/aura": "~25.3.1",
50
+ "@vaadin/chai-plugins": "~25.3.1",
51
+ "@vaadin/test-runner-commands": "~25.3.1",
52
52
  "@vaadin/testing-helpers": "^2.0.0",
53
- "@vaadin/vaadin-lumo-styles": "25.3.0-rc1",
53
+ "@vaadin/vaadin-lumo-styles": "~25.3.1",
54
54
  "sinon": "^22.0.0"
55
55
  },
56
56
  "customElements": "custom-elements.json",
@@ -58,5 +58,5 @@
58
58
  "web-types.json",
59
59
  "web-types.lit.json"
60
60
  ],
61
- "gitHead": "d4809590b2f61bd607e376ab3dec84f4bfb059a7"
61
+ "gitHead": "a652d6071d7ad5add8465772f14f3efe633066a8"
62
62
  }
@@ -12,6 +12,10 @@ import { LabelledInputController } from '@vaadin/field-base/src/labelled-input-c
12
12
  import { PatternMixin } from '@vaadin/field-base/src/pattern-mixin.js';
13
13
  import { formatISOTime, parseISOTime, validateTime } from './vaadin-time-picker-helper.js';
14
14
 
15
+ /**
16
+ * @typedef {import('./vaadin-time-picker-helper.js').TimePickerTime} TimePickerTime
17
+ */
18
+
15
19
  export const timePickerI18nDefaults = Object.freeze({
16
20
  formatTime: formatISOTime,
17
21
  parseTime: parseISOTime,
@@ -381,7 +385,7 @@ export const TimePickerMixin = (superClass) =>
381
385
 
382
386
  /** @private */
383
387
  __onArrowPressWithStep(step) {
384
- const objWithStep = this.__addStep(this.__getMsec(this.__memoValue), step, true);
388
+ const objWithStep = this.__addStep(this.__getMsec(this.__memoValue), step);
385
389
  this.__memoValue = objWithStep;
386
390
 
387
391
  // Only commit when the formatted text changes, so that a step finer than
@@ -427,7 +431,8 @@ export const TimePickerMixin = (superClass) =>
427
431
  }
428
432
 
429
433
  /**
430
- * Returning milliseconds from Object in the format `{ hours: ..., minutes: ..., seconds: ..., milliseconds: ... }`
434
+ * @param {TimePickerTime | undefined} obj Time object
435
+ * @return {number} milliseconds
431
436
  * @private
432
437
  */
433
438
  __getMsec(obj) {
@@ -440,34 +445,46 @@ export const TimePickerMixin = (superClass) =>
440
445
  }
441
446
 
442
447
  /**
443
- * Returning Object in the format `{ hours: ..., minutes: ..., seconds: ..., milliseconds: ... }`
444
- * from an ISO 8601 time, stripped to the resolution defined by the step.
448
+ * @param {TimePickerTime | undefined} time Time object
449
+ * @return {TimePickerTime | undefined} time object truncated to the step resolution
450
+ * @private
451
+ */
452
+ __truncateTime(time) {
453
+ return validateTime(time, this.step);
454
+ }
455
+
456
+ /**
457
+ * @param {string} timeString ISO 8601 time string
458
+ * @return {TimePickerTime | undefined} time object truncated to the step resolution
445
459
  * @private
446
460
  */
447
461
  __getTimeObject(timeString) {
448
- return validateTime(parseISOTime(timeString), this.step);
462
+ return this.__truncateTime(parseISOTime(timeString));
449
463
  }
450
464
 
451
465
  /**
452
- * Returning seconds from Object in the format `{ hours: ..., minutes: ..., seconds: ..., milliseconds: ... }`
466
+ * @param {number} msec Milliseconds since midnight, `24:00` becomes `00:00`
467
+ * @return {!TimePickerTime} time object
453
468
  * @private
454
469
  */
455
- __getSec(obj) {
456
- let result = (obj?.hours || 0) * 60 * 60;
457
- result += (obj?.minutes || 0) * 60;
458
- result += obj?.seconds || 0;
459
- result += (obj?.milliseconds || 0) / 1000;
470
+ __getTimeFromMsec(msec) {
471
+ const hh = Math.floor(msec / 1000 / 60 / 60);
472
+ msec -= hh * 1000 * 60 * 60;
473
+ const mm = Math.floor(msec / 1000 / 60);
474
+ msec -= mm * 1000 * 60;
475
+ const ss = Math.floor(msec / 1000);
476
+ msec -= ss * 1000;
460
477
 
461
- return result;
478
+ return { hours: hh < 24 ? hh : 0, minutes: mm, seconds: ss, milliseconds: msec };
462
479
  }
463
480
 
464
481
  /**
465
- * Returning Object in the format `{ hours: ..., minutes: ..., seconds: ..., milliseconds: ... }`
466
- * from the result of adding step value in milliseconds to the milliseconds amount.
467
- * With `precision` parameter rounding the value to the closest step valid interval.
482
+ * @param {number} msec Milliseconds since midnight
483
+ * @param {number} step Step in seconds, negative to subtract
484
+ * @return {!TimePickerTime} time object moved to the next step interval
468
485
  * @private
469
486
  */
470
- __addStep(msec, step, precision) {
487
+ __addStep(msec, step) {
471
488
  // If the time is `00:00` and step changes value downwards, it should be considered as `24:00`
472
489
  if (msec === 0 && step < 0) {
473
490
  msec = 24 * 60 * 60 * 1000;
@@ -475,30 +492,23 @@ export const TimePickerMixin = (superClass) =>
475
492
 
476
493
  const stepMsec = step * 1000;
477
494
  const diffToNext = msec % stepMsec;
478
- if (stepMsec < 0 && diffToNext && precision) {
495
+ if (stepMsec < 0 && diffToNext) {
479
496
  msec -= diffToNext;
480
- } else if (stepMsec > 0 && diffToNext && precision) {
497
+ } else if (stepMsec > 0 && diffToNext) {
481
498
  msec -= diffToNext - stepMsec;
482
499
  } else {
483
500
  msec += stepMsec;
484
501
  }
485
502
 
486
- const hh = Math.floor(msec / 1000 / 60 / 60);
487
- msec -= hh * 1000 * 60 * 60;
488
- const mm = Math.floor(msec / 1000 / 60);
489
- msec -= mm * 1000 * 60;
490
- const ss = Math.floor(msec / 1000);
491
- msec -= ss * 1000;
492
-
493
- return { hours: hh < 24 ? hh : 0, minutes: mm, seconds: ss, milliseconds: msec };
503
+ return this.__getTimeFromMsec(msec);
494
504
  }
495
505
 
496
506
  /** @private */
497
507
  __updateDropdownItems() {
498
- const minSec = this.__getSec(this.__getTimeObject(this.min || MIN_ALLOWED_TIME));
499
- const maxSec = this.__getSec(this.__getTimeObject(this.max || MAX_ALLOWED_TIME));
508
+ const minMsec = this.__getMsec(this.__getTimeObject(this.min || MIN_ALLOWED_TIME));
509
+ const maxMsec = this.__getMsec(this.__getTimeObject(this.max || MAX_ALLOWED_TIME));
500
510
 
501
- this._dropdownItems = this.__generateDropdownList(minSec, maxSec, this.step);
511
+ this._dropdownItems = this.__generateDropdownList(minMsec, maxMsec, this.step);
502
512
  }
503
513
 
504
514
  /** @private */
@@ -517,22 +527,18 @@ export const TimePickerMixin = (superClass) =>
517
527
  }
518
528
 
519
529
  /** @private */
520
- __generateDropdownList(minSec, maxSec, step) {
530
+ __generateDropdownList(minMsec, maxMsec, step) {
521
531
  if (step < 15 * 60 || !this.__validDayDivisor(step)) {
522
532
  return [];
523
533
  }
524
534
 
525
- const generatedList = [];
526
-
527
535
  // Default step in overlay items is 1 hour
528
- if (!step) {
529
- step = 3600;
530
- }
536
+ const stepMsec = (step || 3600) * 1000;
537
+
538
+ const generatedList = [];
531
539
 
532
- let time = -step + minSec;
533
- while (time + step >= minSec && time + step <= maxSec) {
534
- const timeObj = validateTime(this.__addStep(time * 1000, step), step);
535
- time += step;
540
+ for (let msec = minMsec; msec <= maxMsec; msec += stepMsec) {
541
+ const timeObj = validateTime(this.__getTimeFromMsec(msec), step);
536
542
  const formatted = this.__effectiveI18n.formatTime(timeObj);
537
543
  generatedList.push({ label: formatted, value: formatISOTime(timeObj) });
538
544
  }
@@ -546,7 +552,7 @@ export const TimePickerMixin = (superClass) =>
546
552
  * @override
547
553
  */
548
554
  _valueChanged(value, oldValue) {
549
- // Strip value to the step resolution before marking as committed.
555
+ // Truncate value to the step resolution before marking as committed.
550
556
  const parsedObj = (this.__memoValue = this.__getTimeObject(value));
551
557
  const newValue = formatISOTime(parsedObj);
552
558
 
@@ -586,15 +592,15 @@ export const TimePickerMixin = (superClass) =>
586
592
 
587
593
  /**
588
594
  * Sets the value and the input text from the given time,
589
- * stripped to the resolution defined by the step.
595
+ * truncated to the resolution defined by the step.
590
596
  *
591
597
  * @param {!TimePickerTime} time
592
598
  * @private
593
599
  */
594
600
  __setValueFromTime(time) {
595
- const stripped = validateTime(time, this.step);
596
- this.__setUncommittedValue(formatISOTime(stripped));
597
- this.__updateInputValue(stripped);
601
+ const truncated = this.__truncateTime(time);
602
+ this.__setUncommittedValue(formatISOTime(truncated));
603
+ this.__updateInputValue(truncated);
598
604
  }
599
605
 
600
606
  /**
@@ -619,7 +625,10 @@ export const TimePickerMixin = (superClass) =>
619
625
  this._comboBoxValue = text;
620
626
  }
621
627
 
622
- /** @private */
628
+ /**
629
+ * @param {TimePickerTime | undefined} obj Time object
630
+ * @private
631
+ */
623
632
  __updateInputValue(obj) {
624
633
  const text = this.__effectiveI18n.formatTime(obj) || '';
625
634
  this._inputElementValue = text;
@@ -627,8 +636,6 @@ export const TimePickerMixin = (superClass) =>
627
636
  }
628
637
 
629
638
  /**
630
- * Returns true if `time` satisfies the `min` and `max` constraints (if any).
631
- *
632
639
  * @param {!TimePickerTime} time Value to check against constraints
633
640
  * @return {boolean} True if `time` satisfies the constraints
634
641
  * @protected
@@ -659,13 +666,14 @@ export const TimePickerMixin = (superClass) =>
659
666
  }
660
667
 
661
668
  /**
669
+ * Override method inherited from `ComboBoxBaseMixin` to only
670
+ * open overlay when clicking on label or the input container.
662
671
  * @param {Event} event
663
672
  * @protected
664
673
  */
665
674
  _onHostClick(event) {
666
675
  const path = event.composedPath();
667
676
 
668
- // Open dropdown only when clicking on the label or input field
669
677
  if (path.includes(this._labelNode) || path.includes(this._inputContainer)) {
670
678
  super._onHostClick(event);
671
679
  }
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": "25.3.0-rc1",
4
+ "version": "25.3.1",
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 shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and buttons\n`field-button` | Set on both clear and toggle buttons\n`clear-button` | The clear button\n`error-message` | The error message element\n`helper-text` | The helper text element wrapper\n`required-indicator` | The `required` state indicator element\n`toggle-button` | The toggle button\n`overlay` | The overlay container\n`content` | The overlay content\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-value` | Set when the element has a value\n`has-label` | Set when the element has a label\n`has-helper` | Set when the element has helper text or slot\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n`invalid` | Set when the element is invalid\n`focused` | Set when the element is focused\n`focus-ring` | Set when the element is keyboard focused\n`readonly` | Set when the element is readonly\n`opened` | Set when the overlay is opened\n\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:--------------------------------------------------|\n| `--vaadin-field-default-width` |\n| `--vaadin-input-field-background` |\n| `--vaadin-input-field-border-color` |\n| `--vaadin-input-field-border-radius` |\n| `--vaadin-input-field-border-width` |\n| `--vaadin-input-field-bottom-end-radius` |\n| `--vaadin-input-field-bottom-start-radius` |\n| `--vaadin-input-field-button-text-color` |\n| `--vaadin-input-field-container-gap` |\n| `--vaadin-input-field-disabled-background` |\n| `--vaadin-input-field-disabled-text-color` |\n| `--vaadin-input-field-error-color` |\n| `--vaadin-input-field-error-font-size` |\n| `--vaadin-input-field-error-font-weight` |\n| `--vaadin-input-field-error-line-height` |\n| `--vaadin-input-field-gap` |\n| `--vaadin-input-field-helper-color` |\n| `--vaadin-input-field-helper-font-size` |\n| `--vaadin-input-field-helper-font-weight` |\n| `--vaadin-input-field-helper-line-height` |\n| `--vaadin-input-field-label-color` |\n| `--vaadin-input-field-label-font-size` |\n| `--vaadin-input-field-label-font-weight` |\n| `--vaadin-input-field-label-line-height` |\n| `--vaadin-input-field-padding` |\n| `--vaadin-input-field-placeholder-color` |\n| `--vaadin-input-field-required-indicator` |\n| `--vaadin-input-field-required-indicator-color` |\n| `--vaadin-input-field-top-end-radius` |\n| `--vaadin-input-field-top-start-radius` |\n| `--vaadin-input-field-value-color` |\n| `--vaadin-input-field-value-font-size` |\n| `--vaadin-input-field-value-font-weight` |\n| `--vaadin-input-field-value-line-height` |\n| `--vaadin-item-overlay-padding` |\n| `--vaadin-time-picker-overlay-max-height` |\n| `--vaadin-time-picker-overlay-width` |\n\n### Internal components\n\nIn addition to `<vaadin-time-picker>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-time-picker-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-rc1/#/elements/vaadin-item).\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n\n### Change events\n\nDepending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,\nthe component can fire either a `change` event or an `unparsable-change` event:\n\nValue change | Event\n:------------------------|:------------------\nempty => parsable | change\nempty => unparsable | unparsable-change\nparsable => empty | change\nparsable => parsable | change\nparsable => unparsable | change\nunparsable => empty | unparsable-change\nunparsable => parsable | change\nunparsable => unparsable | unparsable-change",
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 shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and buttons\n`field-button` | Set on both clear and toggle buttons\n`clear-button` | The clear button\n`error-message` | The error message element\n`helper-text` | The helper text element wrapper\n`required-indicator` | The `required` state indicator element\n`toggle-button` | The toggle button\n`overlay` | The overlay container\n`content` | The overlay content\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-value` | Set when the element has a value\n`has-label` | Set when the element has a label\n`has-helper` | Set when the element has helper text or slot\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n`invalid` | Set when the element is invalid\n`focused` | Set when the element is focused\n`focus-ring` | Set when the element is keyboard focused\n`readonly` | Set when the element is readonly\n`opened` | Set when the overlay is opened\n\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:--------------------------------------------------|\n| `--vaadin-field-default-width` |\n| `--vaadin-input-field-background` |\n| `--vaadin-input-field-border-color` |\n| `--vaadin-input-field-border-radius` |\n| `--vaadin-input-field-border-width` |\n| `--vaadin-input-field-bottom-end-radius` |\n| `--vaadin-input-field-bottom-start-radius` |\n| `--vaadin-input-field-button-text-color` |\n| `--vaadin-input-field-container-gap` |\n| `--vaadin-input-field-disabled-background` |\n| `--vaadin-input-field-disabled-text-color` |\n| `--vaadin-input-field-error-color` |\n| `--vaadin-input-field-error-font-size` |\n| `--vaadin-input-field-error-font-weight` |\n| `--vaadin-input-field-error-line-height` |\n| `--vaadin-input-field-gap` |\n| `--vaadin-input-field-helper-color` |\n| `--vaadin-input-field-helper-font-size` |\n| `--vaadin-input-field-helper-font-weight` |\n| `--vaadin-input-field-helper-line-height` |\n| `--vaadin-input-field-label-color` |\n| `--vaadin-input-field-label-font-size` |\n| `--vaadin-input-field-label-font-weight` |\n| `--vaadin-input-field-label-line-height` |\n| `--vaadin-input-field-padding` |\n| `--vaadin-input-field-placeholder-color` |\n| `--vaadin-input-field-required-indicator` |\n| `--vaadin-input-field-required-indicator-color` |\n| `--vaadin-input-field-top-end-radius` |\n| `--vaadin-input-field-top-start-radius` |\n| `--vaadin-input-field-value-color` |\n| `--vaadin-input-field-value-font-size` |\n| `--vaadin-input-field-value-font-weight` |\n| `--vaadin-input-field-value-line-height` |\n| `--vaadin-item-overlay-padding` |\n| `--vaadin-time-picker-overlay-max-height` |\n| `--vaadin-time-picker-overlay-width` |\n\n### Internal components\n\nIn addition to `<vaadin-time-picker>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-time-picker-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/25.3.1/#/elements/vaadin-item).\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n\n### Change events\n\nDepending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,\nthe component can fire either a `change` event or an `unparsable-change` event:\n\nValue change | Event\n:------------------------|:------------------\nempty => parsable | change\nempty => unparsable | unparsable-change\nparsable => empty | change\nparsable => parsable | change\nparsable => unparsable | change\nunparsable => empty | unparsable-change\nunparsable => parsable | change\nunparsable => unparsable | unparsable-change",
12
12
  "attributes": [
13
13
  {
14
14
  "name": "accessible-description-ref",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/time-picker",
4
- "version": "25.3.0-rc1",
4
+ "version": "25.3.1",
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 shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and buttons\n`field-button` | Set on both clear and toggle buttons\n`clear-button` | The clear button\n`error-message` | The error message element\n`helper-text` | The helper text element wrapper\n`required-indicator` | The `required` state indicator element\n`toggle-button` | The toggle button\n`overlay` | The overlay container\n`content` | The overlay content\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-value` | Set when the element has a value\n`has-label` | Set when the element has a label\n`has-helper` | Set when the element has helper text or slot\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n`invalid` | Set when the element is invalid\n`focused` | Set when the element is focused\n`focus-ring` | Set when the element is keyboard focused\n`readonly` | Set when the element is readonly\n`opened` | Set when the overlay is opened\n\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:--------------------------------------------------|\n| `--vaadin-field-default-width` |\n| `--vaadin-input-field-background` |\n| `--vaadin-input-field-border-color` |\n| `--vaadin-input-field-border-radius` |\n| `--vaadin-input-field-border-width` |\n| `--vaadin-input-field-bottom-end-radius` |\n| `--vaadin-input-field-bottom-start-radius` |\n| `--vaadin-input-field-button-text-color` |\n| `--vaadin-input-field-container-gap` |\n| `--vaadin-input-field-disabled-background` |\n| `--vaadin-input-field-disabled-text-color` |\n| `--vaadin-input-field-error-color` |\n| `--vaadin-input-field-error-font-size` |\n| `--vaadin-input-field-error-font-weight` |\n| `--vaadin-input-field-error-line-height` |\n| `--vaadin-input-field-gap` |\n| `--vaadin-input-field-helper-color` |\n| `--vaadin-input-field-helper-font-size` |\n| `--vaadin-input-field-helper-font-weight` |\n| `--vaadin-input-field-helper-line-height` |\n| `--vaadin-input-field-label-color` |\n| `--vaadin-input-field-label-font-size` |\n| `--vaadin-input-field-label-font-weight` |\n| `--vaadin-input-field-label-line-height` |\n| `--vaadin-input-field-padding` |\n| `--vaadin-input-field-placeholder-color` |\n| `--vaadin-input-field-required-indicator` |\n| `--vaadin-input-field-required-indicator-color` |\n| `--vaadin-input-field-top-end-radius` |\n| `--vaadin-input-field-top-start-radius` |\n| `--vaadin-input-field-value-color` |\n| `--vaadin-input-field-value-font-size` |\n| `--vaadin-input-field-value-font-weight` |\n| `--vaadin-input-field-value-line-height` |\n| `--vaadin-item-overlay-padding` |\n| `--vaadin-time-picker-overlay-max-height` |\n| `--vaadin-time-picker-overlay-width` |\n\n### Internal components\n\nIn addition to `<vaadin-time-picker>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-time-picker-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/25.3.0-rc1/#/elements/vaadin-item).\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n\n### Change events\n\nDepending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,\nthe component can fire either a `change` event or an `unparsable-change` event:\n\nValue change | Event\n:------------------------|:------------------\nempty => parsable | change\nempty => unparsable | unparsable-change\nparsable => empty | change\nparsable => parsable | change\nparsable => unparsable | change\nunparsable => empty | unparsable-change\nunparsable => parsable | change\nunparsable => unparsable | unparsable-change",
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 shadow DOM parts are available for styling:\n\nPart name | Description\n---------------------|----------------\n`label` | The label element\n`input-field` | The element that wraps prefix, value and buttons\n`field-button` | Set on both clear and toggle buttons\n`clear-button` | The clear button\n`error-message` | The error message element\n`helper-text` | The helper text element wrapper\n`required-indicator` | The `required` state indicator element\n`toggle-button` | The toggle button\n`overlay` | The overlay container\n`content` | The overlay content\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n---------------------|---------------------------------\n`disabled` | Set when the element is disabled\n`has-value` | Set when the element has a value\n`has-label` | Set when the element has a label\n`has-helper` | Set when the element has helper text or slot\n`has-error-message` | Set when the element has an error message\n`has-tooltip` | Set when the element has a slotted tooltip\n`invalid` | Set when the element is invalid\n`focused` | Set when the element is focused\n`focus-ring` | Set when the element is keyboard focused\n`readonly` | Set when the element is readonly\n`opened` | Set when the overlay is opened\n\nThe following custom CSS properties are available for styling:\n\nCustom CSS property |\n:--------------------------------------------------|\n| `--vaadin-field-default-width` |\n| `--vaadin-input-field-background` |\n| `--vaadin-input-field-border-color` |\n| `--vaadin-input-field-border-radius` |\n| `--vaadin-input-field-border-width` |\n| `--vaadin-input-field-bottom-end-radius` |\n| `--vaadin-input-field-bottom-start-radius` |\n| `--vaadin-input-field-button-text-color` |\n| `--vaadin-input-field-container-gap` |\n| `--vaadin-input-field-disabled-background` |\n| `--vaadin-input-field-disabled-text-color` |\n| `--vaadin-input-field-error-color` |\n| `--vaadin-input-field-error-font-size` |\n| `--vaadin-input-field-error-font-weight` |\n| `--vaadin-input-field-error-line-height` |\n| `--vaadin-input-field-gap` |\n| `--vaadin-input-field-helper-color` |\n| `--vaadin-input-field-helper-font-size` |\n| `--vaadin-input-field-helper-font-weight` |\n| `--vaadin-input-field-helper-line-height` |\n| `--vaadin-input-field-label-color` |\n| `--vaadin-input-field-label-font-size` |\n| `--vaadin-input-field-label-font-weight` |\n| `--vaadin-input-field-label-line-height` |\n| `--vaadin-input-field-padding` |\n| `--vaadin-input-field-placeholder-color` |\n| `--vaadin-input-field-required-indicator` |\n| `--vaadin-input-field-required-indicator-color` |\n| `--vaadin-input-field-top-end-radius` |\n| `--vaadin-input-field-top-start-radius` |\n| `--vaadin-input-field-value-color` |\n| `--vaadin-input-field-value-font-size` |\n| `--vaadin-input-field-value-font-weight` |\n| `--vaadin-input-field-value-line-height` |\n| `--vaadin-item-overlay-padding` |\n| `--vaadin-time-picker-overlay-max-height` |\n| `--vaadin-time-picker-overlay-width` |\n\n### Internal components\n\nIn addition to `<vaadin-time-picker>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-time-picker-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/25.3.1/#/elements/vaadin-item).\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n\n### Change events\n\nDepending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,\nthe component can fire either a `change` event or an `unparsable-change` event:\n\nValue change | Event\n:------------------------|:------------------\nempty => parsable | change\nempty => unparsable | unparsable-change\nparsable => empty | change\nparsable => parsable | change\nparsable => unparsable | change\nunparsable => empty | unparsable-change\nunparsable => parsable | change\nunparsable => unparsable | unparsable-change",
20
20
  "extension": true,
21
21
  "attributes": [
22
22
  {