@vaadin/password-field 25.0.0-alpha19 → 25.0.0-alpha20
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": "25.0.0-
|
|
3
|
+
"version": "25.0.0-alpha20",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -34,24 +34,24 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
37
|
-
"@vaadin/a11y-base": "25.0.0-
|
|
38
|
-
"@vaadin/button": "25.0.0-
|
|
39
|
-
"@vaadin/component-base": "25.0.0-
|
|
40
|
-
"@vaadin/field-base": "25.0.0-
|
|
41
|
-
"@vaadin/text-field": "25.0.0-
|
|
42
|
-
"@vaadin/vaadin-themable-mixin": "25.0.0-
|
|
37
|
+
"@vaadin/a11y-base": "25.0.0-alpha20",
|
|
38
|
+
"@vaadin/button": "25.0.0-alpha20",
|
|
39
|
+
"@vaadin/component-base": "25.0.0-alpha20",
|
|
40
|
+
"@vaadin/field-base": "25.0.0-alpha20",
|
|
41
|
+
"@vaadin/text-field": "25.0.0-alpha20",
|
|
42
|
+
"@vaadin/vaadin-themable-mixin": "25.0.0-alpha20",
|
|
43
43
|
"lit": "^3.0.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
47
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
46
|
+
"@vaadin/chai-plugins": "25.0.0-alpha20",
|
|
47
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha20",
|
|
48
48
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
49
|
-
"@vaadin/vaadin-lumo-styles": "25.0.0-
|
|
49
|
+
"@vaadin/vaadin-lumo-styles": "25.0.0-alpha20",
|
|
50
50
|
"sinon": "^21.0.0"
|
|
51
51
|
},
|
|
52
52
|
"web-types": [
|
|
53
53
|
"web-types.json",
|
|
54
54
|
"web-types.lit.json"
|
|
55
55
|
],
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "c948aae591a30b432f3784000d4677674cae56e0"
|
|
57
57
|
}
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
import { css } from 'lit';
|
|
7
7
|
|
|
8
8
|
export const passwordFieldStyles = css`
|
|
9
|
-
[part
|
|
9
|
+
[part~='reveal-button']::before {
|
|
10
10
|
display: none;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
[part='input-field']:has([part
|
|
13
|
+
[part='input-field']:has([part~='reveal-button']:focus-within) {
|
|
14
14
|
outline: none;
|
|
15
15
|
--vaadin-input-field-border-color: inherit;
|
|
16
16
|
}
|
|
@@ -93,7 +93,7 @@ export const PasswordFieldMixin = (superClass) =>
|
|
|
93
93
|
ready() {
|
|
94
94
|
super.ready();
|
|
95
95
|
|
|
96
|
-
this._revealPart = this.shadowRoot.querySelector('[part
|
|
96
|
+
this._revealPart = this.shadowRoot.querySelector('[part~="reveal-button"]');
|
|
97
97
|
|
|
98
98
|
this._revealButtonController = new SlotController(this, 'reveal', 'vaadin-password-field-button', {
|
|
99
99
|
initializer: (btn) => {
|
|
@@ -55,6 +55,7 @@ export interface PasswordFieldEventMap extends HTMLElementEventMap, PasswordFiel
|
|
|
55
55
|
* ---------------------|----------------
|
|
56
56
|
* `label` | The label element
|
|
57
57
|
* `input-field` | The element that wraps prefix, value and suffix
|
|
58
|
+
* `field-button` | Set on both clear and reveal buttons
|
|
58
59
|
* `clear-button` | The clear button
|
|
59
60
|
* `error-message` | The error message element
|
|
60
61
|
* `helper-text` | The helper text element wrapper
|
|
@@ -25,6 +25,7 @@ import { PasswordFieldMixin } from './vaadin-password-field-mixin.js';
|
|
|
25
25
|
* ---------------------|----------------
|
|
26
26
|
* `label` | The label element
|
|
27
27
|
* `input-field` | The element that wraps prefix, value and suffix
|
|
28
|
+
* `field-button` | Set on both clear and reveal buttons
|
|
28
29
|
* `clear-button` | The clear button
|
|
29
30
|
* `error-message` | The error message element
|
|
30
31
|
* `helper-text` | The helper text element wrapper
|
|
@@ -78,7 +79,7 @@ export class PasswordField extends PasswordFieldMixin(TextField) {
|
|
|
78
79
|
_renderSuffix() {
|
|
79
80
|
return html`
|
|
80
81
|
${super._renderSuffix()}
|
|
81
|
-
<div part="reveal-button" slot="suffix">
|
|
82
|
+
<div part="field-button reveal-button" slot="suffix">
|
|
82
83
|
<slot name="reveal"></slot>
|
|
83
84
|
</div>
|
|
84
85
|
`;
|
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": "25.0.0-
|
|
4
|
+
"version": "25.0.0-alpha20",
|
|
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\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 suffix\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`reveal-button` | The eye icon which toggles the password visibility\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`input-prevented` | Temporarily set when invalid input is prevented\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`password-visible` | Set when the password is visible\n\nNote, the `input-prevented` state attribute is only supported when `allowedCharPattern` is set.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/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\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 suffix\n`field-button` | Set on both clear and reveal 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`reveal-button` | The eye icon which toggles the password visibility\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`input-prevented` | Temporarily set when invalid input is prevented\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`password-visible` | Set when the password is visible\n\nNote, the `input-prevented` state attribute is only supported when `allowedCharPattern` is set.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
12
12
|
"attributes": [
|
|
13
13
|
{
|
|
14
14
|
"name": "disabled",
|
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/password-field",
|
|
4
|
-
"version": "25.0.0-
|
|
4
|
+
"version": "25.0.0-alpha20",
|
|
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\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 suffix\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`reveal-button` | The eye icon which toggles the password visibility\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`input-prevented` | Temporarily set when invalid input is prevented\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`password-visible` | Set when the password is visible\n\nNote, the `input-prevented` state attribute is only supported when `allowedCharPattern` is set.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/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\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 suffix\n`field-button` | Set on both clear and reveal 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`reveal-button` | The eye icon which toggles the password visibility\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`input-prevented` | Temporarily set when invalid input is prevented\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`password-visible` | Set when the password is visible\n\nNote, the `input-prevented` state attribute is only supported when `allowedCharPattern` is set.\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
|
|
20
20
|
"extension": true,
|
|
21
21
|
"attributes": [
|
|
22
22
|
{
|