@vaadin/time-picker 22.0.0-beta1 → 22.0.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/README.md CHANGED
@@ -1,54 +1,54 @@
1
- # <vaadin-time-picker>
1
+ # @vaadin/time-picker
2
2
 
3
- [<vaadin-time-picker>](https://vaadin.com/components/vaadin-time-picker) is a [Web Component](http://webcomponents.org) providing a time-selection field, part of the [Vaadin components](https://vaadin.com/components).
3
+ A web component that allows to enter a time, either by typing, or by selecting from a set of pre-defined options.
4
4
 
5
- [Live Demo ↗](https://vaadin.com/components/vaadin-time-picker/html-examples)
6
- |
7
- [API documentation ↗](https://vaadin.com/components/vaadin-time-picker/html-api)
5
+ [Documentation + Live Demo ↗](https://vaadin.com/docs/latest/ds/components/time-picker)
8
6
 
9
7
  [![npm version](https://badgen.net/npm/v/@vaadin/time-picker)](https://www.npmjs.com/package/@vaadin/time-picker)
10
- [![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20Directory-published-00b4f0.svg)](https://vaadin.com/directory/component/vaadinvaadin-time-picker)
11
8
  [![Discord](https://img.shields.io/discord/732335336448852018?label=discord)](https://discord.gg/PHmkCKC)
12
9
 
13
10
  ```html
14
11
  <vaadin-time-picker label="Delivery Time"></vaadin-time-picker>
15
12
  ```
16
13
 
17
- [<img src="https://raw.githubusercontent.com/vaadin/vaadin-time-picker/master/screenshot.gif" alt="Screenshot of vaadin-time-picker">](https://vaadin.com/components/vaadin-time-picker)
14
+ [<img src="https://raw.githubusercontent.com/vaadin/web-components/master/packages/time-picker/screenshot.png" width="215" alt="Screenshot of vaadin-time-picker">](https://vaadin.com/docs/latest/ds/components/time-picker)
18
15
 
19
16
  ## Installation
20
17
 
21
- Install `vaadin-time-picker`:
18
+ Install the component:
22
19
 
23
20
  ```sh
24
- npm i @vaadin/time-picker --save
21
+ npm i @vaadin/time-picker
25
22
  ```
26
23
 
27
- Once installed, import it in your application:
24
+ Once installed, import the component in your application:
28
25
 
29
26
  ```js
30
- import '@vaadin/time-picker/vaadin-time-picker.js';
27
+ import '@vaadin/time-picker';
31
28
  ```
32
29
 
33
- ## Getting Started
30
+ ## Themes
34
31
 
35
- Vaadin components use the Lumo theme by default.
32
+ Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/ds/customization/using-themes), Lumo and Material.
33
+ The [main entrypoint](https://github.com/vaadin/web-components/blob/master/packages/time-picker/vaadin-time-picker.js) of the package uses the Lumo theme.
36
34
 
37
- To use the Material theme, import the correspondent file from the `theme/material` folder.
35
+ To use the Material theme, import the component from the `theme/material` folder:
38
36
 
39
- ## Entry points
40
-
41
- - The component with the Lumo theme:
42
-
43
- `theme/lumo/vaadin-time-picker.js`
37
+ ```js
38
+ import '@vaadin/time-picker/theme/material/vaadin-time-picker.js';
39
+ ```
44
40
 
45
- - The component with the Material theme:
41
+ You can also import the Lumo version of the component explicitly:
46
42
 
47
- `theme/material/vaadin-time-picker.js`
43
+ ```js
44
+ import '@vaadin/time-picker/theme/lumo/vaadin-time-picker.js';
45
+ ```
48
46
 
49
- - Alias for `theme/lumo/vaadin-time-picker.js`:
47
+ Finally, you can import the un-themed component from the `src` folder to get a minimal starting point:
50
48
 
51
- `vaadin-time-picker.js`
49
+ ```js
50
+ import '@vaadin/time-picker/src/vaadin-time-picker.js';
51
+ ```
52
52
 
53
53
  ## Contributing
54
54
 
@@ -58,4 +58,5 @@ Read the [contributing guide](https://vaadin.com/docs/latest/guide/contributing/
58
58
 
59
59
  Apache License 2.0
60
60
 
61
- Vaadin collects development time usage statistics to improve this product. For details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics.
61
+ Vaadin collects usage statistics at development time to improve this product.
62
+ For details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/time-picker",
3
- "version": "22.0.0-beta1",
3
+ "version": "22.0.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -33,18 +33,18 @@
33
33
  ],
34
34
  "dependencies": {
35
35
  "@polymer/polymer": "^3.0.0",
36
- "@vaadin/combo-box": "22.0.0-beta1",
37
- "@vaadin/component-base": "22.0.0-beta1",
38
- "@vaadin/field-base": "22.0.0-beta1",
39
- "@vaadin/input-container": "22.0.0-beta1",
40
- "@vaadin/vaadin-lumo-styles": "22.0.0-beta1",
41
- "@vaadin/vaadin-material-styles": "22.0.0-beta1",
42
- "@vaadin/vaadin-themable-mixin": "22.0.0-beta1"
36
+ "@vaadin/combo-box": "^22.0.1",
37
+ "@vaadin/component-base": "^22.0.1",
38
+ "@vaadin/field-base": "^22.0.1",
39
+ "@vaadin/input-container": "^22.0.1",
40
+ "@vaadin/vaadin-lumo-styles": "^22.0.1",
41
+ "@vaadin/vaadin-material-styles": "^22.0.1",
42
+ "@vaadin/vaadin-themable-mixin": "^22.0.1"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@esm-bundle/chai": "^4.3.4",
46
- "@vaadin/testing-helpers": "^0.3.0",
46
+ "@vaadin/testing-helpers": "^0.3.2",
47
47
  "sinon": "^9.2.0"
48
48
  },
49
- "gitHead": "4cf8a9d0504994200c610e44b3676114fef49c1e"
49
+ "gitHead": "2b0a2bff0369d6020f7cc33ad35506aa2d1f6f68"
50
50
  }
@@ -3,10 +3,10 @@
3
3
  * Copyright (c) 2021 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import { PolymerElement, html } from '@polymer/polymer/polymer-element.js';
6
+ import './vaadin-time-picker-dropdown.js';
7
+ import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
7
8
  import { ComboBoxMixin } from '@vaadin/combo-box/src/vaadin-combo-box-mixin.js';
8
9
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
9
- import './vaadin-time-picker-dropdown.js';
10
10
 
11
11
  /**
12
12
  * An element used internally by `<vaadin-time-picker>`. Not intended to be used separately.
@@ -3,11 +3,11 @@
3
3
  * Copyright (c) 2021 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 } from '@polymer/polymer/lib/utils/html-tag.js';
7
- import { ComboBoxDropdown } from '@vaadin/combo-box/src/vaadin-combo-box-dropdown.js';
8
6
  import './vaadin-time-picker-item.js';
9
7
  import './vaadin-time-picker-overlay.js';
10
8
  import './vaadin-time-picker-scroller.js';
9
+ import { html } from '@polymer/polymer/lib/utils/html-tag.js';
10
+ import { ComboBoxDropdown } from '@vaadin/combo-box/src/vaadin-combo-box-dropdown.js';
11
11
 
12
12
  /**
13
13
  * An element used internally by `<vaadin-time-picker>`. Not intended to be used separately.
@@ -4,7 +4,7 @@
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { ComboBoxOverlay } from '@vaadin/combo-box/src/vaadin-combo-box-overlay.js';
7
- import { registerStyles, css } from '@vaadin/vaadin-themable-mixin/register-styles.js';
7
+ import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
8
8
 
9
9
  registerStyles(
10
10
  'vaadin-time-picker-overlay',
@@ -3,17 +3,16 @@
3
3
  * Copyright (c) 2021 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import { PolymerElement, html } from '@polymer/polymer/polymer-element.js';
6
+ import '@vaadin/input-container/src/vaadin-input-container.js';
7
+ import './vaadin-time-picker-combo-box.js';
8
+ import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
7
9
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
8
- import { AriaLabelController } from '@vaadin/field-base/src/aria-label-controller.js';
9
- import { InputController } from '@vaadin/field-base/src/input-controller.js';
10
10
  import { InputControlMixin } from '@vaadin/field-base/src/input-control-mixin.js';
11
+ import { InputController } from '@vaadin/field-base/src/input-controller.js';
12
+ import { LabelledInputController } from '@vaadin/field-base/src/labelled-input-controller.js';
11
13
  import { PatternMixin } from '@vaadin/field-base/src/pattern-mixin.js';
12
14
  import { inputFieldShared } from '@vaadin/field-base/src/styles/input-field-shared-styles.js';
13
- import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
14
- import { registerStyles } from '@vaadin/vaadin-themable-mixin/register-styles.js';
15
- import '@vaadin/input-container/src/vaadin-input-container.js';
16
- import './vaadin-time-picker-combo-box.js';
15
+ import { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
17
16
 
18
17
  registerStyles('vaadin-time-picker', inputFieldShared, { moduleId: 'vaadin-time-picker-styles' });
19
18
 
@@ -321,7 +320,7 @@ class TimePicker extends PatternMixin(InputControlMixin(ThemableMixin(ElementMix
321
320
  this.ariaTarget = input;
322
321
  })
323
322
  );
324
- this.addController(new AriaLabelController(this, this.inputElement, this._labelNode));
323
+ this.addController(new LabelledInputController(this.inputElement, this._labelNode));
325
324
  this._inputContainer = this.shadowRoot.querySelector('[part~="input-field"]');
326
325
  }
327
326
 
@@ -3,9 +3,9 @@
3
3
  * Copyright (c) 2021 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import { registerStyles, css } from '@vaadin/vaadin-themable-mixin/register-styles.js';
7
6
  import '@vaadin/vaadin-lumo-styles/font-icons.js';
8
7
  import { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';
8
+ import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
9
9
 
10
10
  const timePicker = css`
11
11
  [part~='toggle-button']::before {
@@ -3,9 +3,9 @@
3
3
  * Copyright (c) 2021 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import { registerStyles, css } from '@vaadin/vaadin-themable-mixin/register-styles.js';
7
6
  import '@vaadin/vaadin-material-styles/font-icons.js';
8
7
  import { inputFieldShared } from '@vaadin/vaadin-material-styles/mixins/input-field-shared.js';
8
+ import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
9
9
 
10
10
  const timePicker = css`
11
11
  [part~='toggle-button']::before {