@vaadin/time-picker 25.0.0-alpha7 → 25.0.0-alpha9

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.0.0-alpha7",
3
+ "version": "25.0.0-alpha9",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -37,19 +37,19 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "@open-wc/dedupe-mixin": "^1.3.0",
40
- "@vaadin/combo-box": "25.0.0-alpha7",
41
- "@vaadin/component-base": "25.0.0-alpha7",
42
- "@vaadin/field-base": "25.0.0-alpha7",
43
- "@vaadin/input-container": "25.0.0-alpha7",
44
- "@vaadin/item": "25.0.0-alpha7",
45
- "@vaadin/overlay": "25.0.0-alpha7",
46
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha7",
47
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha7",
40
+ "@vaadin/combo-box": "25.0.0-alpha9",
41
+ "@vaadin/component-base": "25.0.0-alpha9",
42
+ "@vaadin/field-base": "25.0.0-alpha9",
43
+ "@vaadin/input-container": "25.0.0-alpha9",
44
+ "@vaadin/item": "25.0.0-alpha9",
45
+ "@vaadin/overlay": "25.0.0-alpha9",
46
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha9",
47
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha9",
48
48
  "lit": "^3.0.0"
49
49
  },
50
50
  "devDependencies": {
51
- "@vaadin/chai-plugins": "25.0.0-alpha7",
52
- "@vaadin/test-runner-commands": "25.0.0-alpha7",
51
+ "@vaadin/chai-plugins": "25.0.0-alpha9",
52
+ "@vaadin/test-runner-commands": "25.0.0-alpha9",
53
53
  "@vaadin/testing-helpers": "^2.0.0",
54
54
  "sinon": "^18.0.0"
55
55
  },
@@ -57,5 +57,5 @@
57
57
  "web-types.json",
58
58
  "web-types.lit.json"
59
59
  ],
60
- "gitHead": "87f72707ce6866892f8be5782fa0da008e87dcbc"
60
+ "gitHead": "bbe4720721e0955ffc87a79b412bee38b1f0eb1e"
61
61
  }
@@ -7,23 +7,21 @@ import '@vaadin/component-base/src/style-props.js';
7
7
  import { css } from 'lit';
8
8
 
9
9
  export const timePickerStyles = css`
10
- @layer base {
11
- :host([opened]) {
12
- pointer-events: auto;
13
- }
10
+ :host([opened]) {
11
+ pointer-events: auto;
12
+ }
14
13
 
15
- [part='toggle-button']::before {
16
- mask-image: var(--_vaadin-icon-clock);
17
- }
14
+ [part='toggle-button']::before {
15
+ mask-image: var(--_vaadin-icon-clock);
16
+ }
18
17
 
19
- /* See https://github.com/vaadin/vaadin-time-picker/issues/145 */
20
- :host([dir='rtl']) [part='input-field'] {
21
- direction: ltr;
22
- }
18
+ /* See https://github.com/vaadin/vaadin-time-picker/issues/145 */
19
+ :host([dir='rtl']) [part='input-field'] {
20
+ direction: ltr;
21
+ }
23
22
 
24
- :host([dir='rtl']) [part='input-field'] ::slotted(input)::placeholder {
25
- direction: rtl;
26
- text-align: left;
27
- }
23
+ :host([dir='rtl']) [part='input-field'] ::slotted(input)::placeholder {
24
+ direction: rtl;
25
+ text-align: left;
28
26
  }
29
27
  `;
@@ -6,19 +6,17 @@
6
6
  import { css } from 'lit';
7
7
 
8
8
  export const timePickerOverlayStyles = css`
9
- @layer base {
10
- :host {
11
- --vaadin-item-checkmark-display: block;
12
- }
9
+ :host {
10
+ --vaadin-item-checkmark-display: block;
11
+ }
13
12
 
14
- #overlay {
15
- width: var(--vaadin-time-picker-overlay-width, var(--_vaadin-time-picker-overlay-default-width, auto));
16
- }
13
+ #overlay {
14
+ width: var(--vaadin-time-picker-overlay-width, var(--_vaadin-time-picker-overlay-default-width, auto));
15
+ }
17
16
 
18
- [part='content'] {
19
- display: flex;
20
- flex-direction: column;
21
- height: 100%;
22
- }
17
+ [part='content'] {
18
+ display: flex;
19
+ flex-direction: column;
20
+ height: 100%;
23
21
  }
24
22
  `;
@@ -40,7 +40,7 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mix
40
40
  * @private
41
41
  */
42
42
  export class TimePickerItem extends ComboBoxItemMixin(
43
- LumoInjectionMixin(ThemableMixin(DirMixin(PolylitMixin(LitElement)))),
43
+ ThemableMixin(DirMixin(PolylitMixin(LumoInjectionMixin(LitElement)))),
44
44
  ) {
45
45
  static get is() {
46
46
  return 'vaadin-time-picker-item';
@@ -59,17 +59,6 @@ export class TimePickerItem extends ComboBoxItemMixin(
59
59
  </div>
60
60
  `;
61
61
  }
62
-
63
- /**
64
- * Override method from `ComboBoxItemMixin` to enforce
65
- * `dir` attribute to be set to `ltr` on the item.
66
- * @protected
67
- * @override
68
- */
69
- _getHostDir() {
70
- // See https://github.com/vaadin/vaadin-time-picker/issues/145
71
- return 'ltr';
72
- }
73
62
  }
74
63
 
75
64
  defineCustomElement(TimePickerItem);
@@ -25,7 +25,7 @@ import { timePickerOverlayStyles } from './styles/vaadin-time-picker-overlay-cor
25
25
  * @private
26
26
  */
27
27
  export class TimePickerOverlay extends ComboBoxOverlayMixin(
28
- OverlayMixin(DirMixin(LumoInjectionMixin(ThemableMixin(PolylitMixin(LitElement))))),
28
+ OverlayMixin(DirMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))))),
29
29
  ) {
30
30
  static get is() {
31
31
  return 'vaadin-time-picker-overlay';
@@ -38,7 +38,6 @@ export class TimePickerOverlay extends ComboBoxOverlayMixin(
38
38
  /** @protected */
39
39
  render() {
40
40
  return html`
41
- <div id="backdrop" part="backdrop" hidden></div>
42
41
  <div part="overlay" id="overlay">
43
42
  <div part="content" id="content">
44
43
  <slot></slot>
@@ -46,17 +45,6 @@ export class TimePickerOverlay extends ComboBoxOverlayMixin(
46
45
  </div>
47
46
  `;
48
47
  }
49
-
50
- /**
51
- * Override method from `ComboBoxOverlayMixin` to enforce
52
- * `dir` attribute to be set to `ltr` on the overlay.
53
- * @protected
54
- * @override
55
- */
56
- _getHostDir() {
57
- // See https://github.com/vaadin/vaadin-time-picker/issues/145
58
- return 'ltr';
59
- }
60
48
  }
61
49
 
62
50
  defineCustomElement(TimePickerOverlay);
@@ -78,9 +78,11 @@ export interface TimePickerEventMap extends HTMLElementEventMap, TimePickerCusto
78
78
  *
79
79
  * In addition to `<vaadin-text-field>` parts, the following parts are available for theming:
80
80
  *
81
- * Part name | Description
82
- * ----------------|----------------
83
- * `toggle-button` | The toggle button
81
+ * Part name | Description
82
+ * -----------------|----------------
83
+ * `toggle-button` | The toggle button
84
+ * `overlay` | The overlay container
85
+ * `content` | The overlay content
84
86
  *
85
87
  * In addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:
86
88
  *
@@ -45,9 +45,11 @@ import { TimePickerMixin } from './vaadin-time-picker-mixin.js';
45
45
  *
46
46
  * In addition to `<vaadin-text-field>` parts, the following parts are available for theming:
47
47
  *
48
- * Part name | Description
49
- * ----------------|----------------
50
- * `toggle-button` | The toggle button
48
+ * Part name | Description
49
+ * -----------------|----------------
50
+ * `toggle-button` | The toggle button
51
+ * `overlay` | The overlay container
52
+ * `content` | The overlay content
51
53
  *
52
54
  * In addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:
53
55
  *
@@ -97,7 +99,7 @@ import { TimePickerMixin } from './vaadin-time-picker-mixin.js';
97
99
  * @mixes ThemableMixin
98
100
  * @mixes TimePickerMixin
99
101
  */
100
- class TimePicker extends TimePickerMixin(LumoInjectionMixin(ThemableMixin(ElementMixin(PolylitMixin(LitElement))))) {
102
+ class TimePicker extends TimePickerMixin(ThemableMixin(ElementMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
101
103
  static get is() {
102
104
  return 'vaadin-time-picker';
103
105
  }
@@ -139,12 +141,16 @@ class TimePicker extends TimePickerMixin(LumoInjectionMixin(ThemableMixin(Elemen
139
141
 
140
142
  <vaadin-time-picker-overlay
141
143
  id="overlay"
144
+ dir="ltr"
142
145
  .owner="${this}"
143
146
  .opened="${this._overlayOpened}"
144
147
  theme="${ifDefined(this._theme)}"
145
148
  .positionTarget="${this._inputContainer}"
146
149
  no-vertical-overlap
147
- ></vaadin-time-picker-overlay>
150
+ exportparts="overlay, content"
151
+ >
152
+ <slot name="overlay"></slot>
153
+ </vaadin-time-picker-overlay>
148
154
 
149
155
  <slot name="tooltip"></slot>
150
156
  `;
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.0.0-alpha7",
4
+ "version": "25.0.0-alpha9",
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-time-picker-overlay-width` | Width of the overlay | `auto`\n`--vaadin-time-picker-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/25.0.0-alpha7/#/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-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha7/#/elements/vaadin-overlay).\n- `<vaadin-time-picker-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha7/#/elements/vaadin-item).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha7/#/elements/vaadin-input-container) - an internal element wrapping the input.\n\nNote: the `theme` attribute value set on `<vaadin-time-picker>` is\npropagated to the internal components listed above.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n\n### Change events\n\nDepending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,\nthe component can fire either a `change` event or an `unparsable-change` event:\n\nValue change | Event\n:------------------------|:------------------\nempty => parsable | change\nempty => unparsable | unparsable-change\nparsable => empty | change\nparsable => parsable | change\nparsable => unparsable | change\nunparsable => empty | unparsable-change\nunparsable => parsable | change\nunparsable => unparsable | unparsable-change",
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-time-picker-overlay-width` | Width of the overlay | `auto`\n`--vaadin-time-picker-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/25.0.0-alpha9/#/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`overlay` | The overlay container\n`content` | The overlay content\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-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha9/#/elements/vaadin-overlay).\n- `<vaadin-time-picker-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha9/#/elements/vaadin-item).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha9/#/elements/vaadin-input-container) - an internal element wrapping the input.\n\nNote: the `theme` attribute value set on `<vaadin-time-picker>` is\npropagated to the internal components listed above.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n\n### Change events\n\nDepending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,\nthe component can fire either a `change` event or an `unparsable-change` event:\n\nValue change | Event\n:------------------------|:------------------\nempty => parsable | change\nempty => unparsable | unparsable-change\nparsable => empty | change\nparsable => parsable | change\nparsable => unparsable | change\nunparsable => empty | unparsable-change\nunparsable => parsable | change\nunparsable => unparsable | unparsable-change",
12
12
  "attributes": [
13
13
  {
14
14
  "name": "disabled",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/time-picker",
4
- "version": "25.0.0-alpha7",
4
+ "version": "25.0.0-alpha9",
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-time-picker-overlay-width` | Width of the overlay | `auto`\n`--vaadin-time-picker-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/25.0.0-alpha7/#/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-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha7/#/elements/vaadin-overlay).\n- `<vaadin-time-picker-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha7/#/elements/vaadin-item).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha7/#/elements/vaadin-input-container) - an internal element wrapping the input.\n\nNote: the `theme` attribute value set on `<vaadin-time-picker>` is\npropagated to the internal components listed above.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n\n### Change events\n\nDepending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,\nthe component can fire either a `change` event or an `unparsable-change` event:\n\nValue change | Event\n:------------------------|:------------------\nempty => parsable | change\nempty => unparsable | unparsable-change\nparsable => empty | change\nparsable => parsable | change\nparsable => unparsable | change\nunparsable => empty | unparsable-change\nunparsable => parsable | change\nunparsable => unparsable | unparsable-change",
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-time-picker-overlay-width` | Width of the overlay | `auto`\n`--vaadin-time-picker-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/25.0.0-alpha9/#/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`overlay` | The overlay container\n`content` | The overlay content\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-overlay>` - has the same API as [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha9/#/elements/vaadin-overlay).\n- `<vaadin-time-picker-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha9/#/elements/vaadin-item).\n- [`<vaadin-input-container>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha9/#/elements/vaadin-input-container) - an internal element wrapping the input.\n\nNote: the `theme` attribute value set on `<vaadin-time-picker>` is\npropagated to the internal components listed above.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n\n### Change events\n\nDepending on the nature of the value change that the user attempts to commit e.g. by pressing Enter,\nthe component can fire either a `change` event or an `unparsable-change` event:\n\nValue change | Event\n:------------------------|:------------------\nempty => parsable | change\nempty => unparsable | unparsable-change\nparsable => empty | change\nparsable => parsable | change\nparsable => unparsable | change\nunparsable => empty | unparsable-change\nunparsable => parsable | change\nunparsable => unparsable | unparsable-change",
20
20
  "extension": true,
21
21
  "attributes": [
22
22
  {