@vaadin/password-field 23.3.3 → 24.0.0-alpha10

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/password-field",
3
- "version": "23.3.3",
3
+ "version": "24.0.0-alpha10",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -35,12 +35,12 @@
35
35
  ],
36
36
  "dependencies": {
37
37
  "@polymer/polymer": "^3.0.0",
38
- "@vaadin/button": "~23.3.3",
39
- "@vaadin/component-base": "~23.3.3",
40
- "@vaadin/text-field": "~23.3.3",
41
- "@vaadin/vaadin-lumo-styles": "~23.3.3",
42
- "@vaadin/vaadin-material-styles": "~23.3.3",
43
- "@vaadin/vaadin-themable-mixin": "~23.3.3"
38
+ "@vaadin/button": "24.0.0-alpha10",
39
+ "@vaadin/component-base": "24.0.0-alpha10",
40
+ "@vaadin/text-field": "24.0.0-alpha10",
41
+ "@vaadin/vaadin-lumo-styles": "24.0.0-alpha10",
42
+ "@vaadin/vaadin-material-styles": "24.0.0-alpha10",
43
+ "@vaadin/vaadin-themable-mixin": "24.0.0-alpha10"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@esm-bundle/chai": "^4.3.4",
@@ -51,5 +51,5 @@
51
51
  "web-types.json",
52
52
  "web-types.lit.json"
53
53
  ],
54
- "gitHead": "1529ed623e053d28a3c1c66af55ebe402743ddd0"
54
+ "gitHead": "2e04534d8b47bcd216f89b5f849bafef1a73b174"
55
55
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { html } from '@polymer/polymer/polymer-element.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { TextField } from '@vaadin/text-field/src/vaadin-text-field.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import './vaadin-password-field-button.js';
@@ -121,6 +121,13 @@ export class PasswordField extends TextField {
121
121
  return ['__i18nChanged(i18n.*)'];
122
122
  }
123
123
 
124
+ constructor() {
125
+ super();
126
+ this._setType('password');
127
+ this.__boundRevealButtonClick = this._onRevealButtonClick.bind(this);
128
+ this.__boundRevealButtonTouchend = this._onRevealButtonTouchend.bind(this);
129
+ }
130
+
124
131
  /** @protected */
125
132
  get slotStyles() {
126
133
  const tag = this.localName;
@@ -139,30 +146,20 @@ export class PasswordField extends TextField {
139
146
  return this._revealButtonController && this._revealButtonController.node;
140
147
  }
141
148
 
142
- constructor() {
143
- super();
144
- this._setType('password');
145
- this.__boundRevealButtonClick = this._onRevealButtonClick.bind(this);
146
- this.__boundRevealButtonTouchend = this._onRevealButtonTouchend.bind(this);
147
- }
148
-
149
149
  /** @protected */
150
150
  ready() {
151
151
  super.ready();
152
152
 
153
153
  this._revealPart = this.shadowRoot.querySelector('[part="reveal-button"]');
154
154
 
155
- this._revealButtonController = new SlotController(
156
- this,
157
- 'reveal',
158
- () => document.createElement('vaadin-password-field-button'),
159
- (host, btn) => {
160
- btn.disabled = host.disabled;
155
+ this._revealButtonController = new SlotController(this, 'reveal', 'vaadin-password-field-button', {
156
+ initializer: (btn) => {
157
+ btn.disabled = this.disabled;
161
158
 
162
- btn.addEventListener('click', host.__boundRevealButtonClick);
163
- btn.addEventListener('touchend', host.__boundRevealButtonTouchend);
159
+ btn.addEventListener('click', this.__boundRevealButtonClick);
160
+ btn.addEventListener('touchend', this.__boundRevealButtonTouchend);
164
161
  },
165
- );
162
+ });
166
163
  this.addController(this._revealButtonController);
167
164
 
168
165
  this.__updateAriaLabel(this.i18n);
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { button } from '@vaadin/button/theme/lumo/vaadin-button-styles.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import '@vaadin/vaadin-lumo-styles/font-icons.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import '@vaadin/text-field/theme/lumo/vaadin-text-field.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import { button } from '@vaadin/button/theme/material/vaadin-button-styles.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import '@vaadin/vaadin-material-styles/color.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * Copyright (c) 2021 - 2022 Vaadin Ltd.
3
+ * Copyright (c) 2021 - 2023 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
6
  import '@vaadin/text-field/theme/material/vaadin-text-field.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/password-field",
4
- "version": "23.3.3",
4
+ "version": "24.0.0-alpha10",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "elements": [
9
9
  {
10
10
  "name": "vaadin-password-field",
11
- "description": "`<vaadin-password-field>` is an extension of `<vaadin-text-field>` component for entering passwords.\n\n```html\n<vaadin-password-field label=\"Password\"></vaadin-password-field>\n```\n\n### Styling\n\n`<vaadin-password-field>` 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/23.3.3/#/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`reveal-button` | The eye icon which toggles the password visibility\n\nIn addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n\nAttribute | Description\n-------------------|---------------------------------\n`password-visible` | Set when the password is visible\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.",
11
+ "description": "`<vaadin-password-field>` is an extension of `<vaadin-text-field>` component for entering passwords.\n\n```html\n<vaadin-password-field label=\"Password\"></vaadin-password-field>\n```\n\n### Styling\n\n`<vaadin-password-field>` 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.0.0-alpha10/#/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`reveal-button` | The eye icon which toggles the password visibility\n\nIn addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n\nAttribute | Description\n-------------------|---------------------------------\n`password-visible` | Set when the password is visible\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.",
12
12
  "attributes": [
13
13
  {
14
14
  "name": "value",
@@ -54,17 +54,6 @@
54
54
  ]
55
55
  }
56
56
  },
57
- {
58
- "name": "prevent-invalid-input",
59
- "description": "When set to true, user is prevented from typing a value that\nconflicts with the given `pattern`.",
60
- "value": {
61
- "type": [
62
- "boolean",
63
- "null",
64
- "undefined"
65
- ]
66
- }
67
- },
68
57
  {
69
58
  "name": "disabled",
70
59
  "description": "If true, the user cannot interact with this element.",
@@ -321,17 +310,6 @@
321
310
  ]
322
311
  }
323
312
  },
324
- {
325
- "name": "preventInvalidInput",
326
- "description": "When set to true, user is prevented from typing a value that\nconflicts with the given `pattern`.",
327
- "value": {
328
- "type": [
329
- "boolean",
330
- "null",
331
- "undefined"
332
- ]
333
- }
334
- },
335
313
  {
336
314
  "name": "disabled",
337
315
  "description": "If true, the user cannot interact with this element.",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/password-field",
4
- "version": "23.3.3",
4
+ "version": "24.0.0-alpha10",
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-password-field",
19
- "description": "`<vaadin-password-field>` is an extension of `<vaadin-text-field>` component for entering passwords.\n\n```html\n<vaadin-password-field label=\"Password\"></vaadin-password-field>\n```\n\n### Styling\n\n`<vaadin-password-field>` 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/23.3.3/#/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`reveal-button` | The eye icon which toggles the password visibility\n\nIn addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n\nAttribute | Description\n-------------------|---------------------------------\n`password-visible` | Set when the password is visible\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.",
19
+ "description": "`<vaadin-password-field>` is an extension of `<vaadin-text-field>` component for entering passwords.\n\n```html\n<vaadin-password-field label=\"Password\"></vaadin-password-field>\n```\n\n### Styling\n\n`<vaadin-password-field>` 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.0.0-alpha10/#/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`reveal-button` | The eye icon which toggles the password visibility\n\nIn addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n\nAttribute | Description\n-------------------|---------------------------------\n`password-visible` | Set when the password is visible\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/custom-theme/styling-components) documentation.",
20
20
  "extension": true,
21
21
  "attributes": [
22
22
  {
@@ -33,13 +33,6 @@
33
33
  "kind": "expression"
34
34
  }
35
35
  },
36
- {
37
- "name": "?preventInvalidInput",
38
- "description": "When set to true, user is prevented from typing a value that\nconflicts with the given `pattern`.",
39
- "value": {
40
- "kind": "expression"
41
- }
42
- },
43
36
  {
44
37
  "name": "?disabled",
45
38
  "description": "If true, the user cannot interact with this element.",