@vaadin/password-field 24.4.0-dev.223e39f050 → 24.4.0-dev.4b20a0c55
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 +0 -1
- package/package.json +11 -10
- package/src/vaadin-lit-password-field-button.js +39 -0
- package/src/vaadin-lit-password-field.d.ts +6 -0
- package/src/vaadin-lit-password-field.js +40 -0
- package/src/vaadin-password-field-button.js +1 -1
- package/src/vaadin-password-field-mixin.d.ts +1 -1
- package/src/vaadin-password-field-mixin.js +4 -4
- package/src/vaadin-password-field.d.ts +1 -1
- package/src/vaadin-password-field.js +1 -1
- package/theme/lumo/vaadin-lit-password-field.js +9 -0
- package/theme/lumo/vaadin-password-field-button-styles.js +1 -1
- package/theme/lumo/vaadin-password-field-styles.js +1 -1
- package/theme/lumo/vaadin-password-field.js +1 -1
- package/theme/material/vaadin-lit-password-field.js +9 -0
- package/theme/material/vaadin-password-field-button-styles.js +1 -1
- package/theme/material/vaadin-password-field-styles.js +1 -1
- package/theme/material/vaadin-password-field.js +1 -1
- package/vaadin-lit-password-field.d.ts +1 -0
- package/vaadin-lit-password-field.js +3 -0
package/README.md
CHANGED
|
@@ -5,7 +5,6 @@ An extension of [`<vaadin-text-field>`](https://www.npmjs.com/package/@vaadin/te
|
|
|
5
5
|
[Documentation + Live Demo ↗](https://vaadin.com/docs/latest/components/password-field)
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/@vaadin/password-field)
|
|
8
|
-
[](https://discord.gg/PHmkCKC)
|
|
9
8
|
|
|
10
9
|
```html
|
|
11
10
|
<vaadin-password-field label="Password"></vaadin-password-field>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/password-field",
|
|
3
|
-
"version": "24.4.0-dev.
|
|
3
|
+
"version": "24.4.0-dev.4b20a0c55",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,14 +36,15 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
38
|
"@polymer/polymer": "^3.0.0",
|
|
39
|
-
"@vaadin/a11y-base": "24.4.0-dev.
|
|
40
|
-
"@vaadin/button": "24.4.0-dev.
|
|
41
|
-
"@vaadin/component-base": "24.4.0-dev.
|
|
42
|
-
"@vaadin/field-base": "24.4.0-dev.
|
|
43
|
-
"@vaadin/text-field": "24.4.0-dev.
|
|
44
|
-
"@vaadin/vaadin-lumo-styles": "24.4.0-dev.
|
|
45
|
-
"@vaadin/vaadin-material-styles": "24.4.0-dev.
|
|
46
|
-
"@vaadin/vaadin-themable-mixin": "24.4.0-dev.
|
|
39
|
+
"@vaadin/a11y-base": "24.4.0-dev.4b20a0c55",
|
|
40
|
+
"@vaadin/button": "24.4.0-dev.4b20a0c55",
|
|
41
|
+
"@vaadin/component-base": "24.4.0-dev.4b20a0c55",
|
|
42
|
+
"@vaadin/field-base": "24.4.0-dev.4b20a0c55",
|
|
43
|
+
"@vaadin/text-field": "24.4.0-dev.4b20a0c55",
|
|
44
|
+
"@vaadin/vaadin-lumo-styles": "24.4.0-dev.4b20a0c55",
|
|
45
|
+
"@vaadin/vaadin-material-styles": "24.4.0-dev.4b20a0c55",
|
|
46
|
+
"@vaadin/vaadin-themable-mixin": "24.4.0-dev.4b20a0c55",
|
|
47
|
+
"lit": "^3.0.0"
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|
|
49
50
|
"@esm-bundle/chai": "^4.3.4",
|
|
@@ -54,5 +55,5 @@
|
|
|
54
55
|
"web-types.json",
|
|
55
56
|
"web-types.lit.json"
|
|
56
57
|
],
|
|
57
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "b79c81e5f6fd24684b34ee0dc434e94d943ea13e"
|
|
58
59
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
+
*/
|
|
6
|
+
import { html, LitElement } from 'lit';
|
|
7
|
+
import { buttonStyles } from '@vaadin/button/src/vaadin-button-base.js';
|
|
8
|
+
import { ButtonMixin } from '@vaadin/button/src/vaadin-button-mixin.js';
|
|
9
|
+
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
10
|
+
import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
|
|
11
|
+
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
12
|
+
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* An element used internally by `<vaadin-password-field>`. Not intended to be used separately.
|
|
16
|
+
*
|
|
17
|
+
* @customElement
|
|
18
|
+
* @extends HTMLElement
|
|
19
|
+
* @mixes ButtonMixin
|
|
20
|
+
* @mixes DirMixin
|
|
21
|
+
* @mixes ThemableMixin
|
|
22
|
+
* @private
|
|
23
|
+
*/
|
|
24
|
+
class PasswordFieldButton extends ButtonMixin(DirMixin(ThemableMixin(PolylitMixin(LitElement)))) {
|
|
25
|
+
static get is() {
|
|
26
|
+
return 'vaadin-password-field-button';
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
static get styles() {
|
|
30
|
+
return buttonStyles;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** @protected */
|
|
34
|
+
render() {
|
|
35
|
+
return html``;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
defineCustomElement(PasswordFieldButton);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
+
*/
|
|
6
|
+
import './vaadin-lit-password-field-button.js';
|
|
7
|
+
import { html } from 'lit';
|
|
8
|
+
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
9
|
+
import { TextField } from '@vaadin/text-field/src/vaadin-lit-text-field.js';
|
|
10
|
+
import { PasswordFieldMixin } from './vaadin-password-field-mixin.js';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* LitElement based version of `<vaadin-password-field>` web component.
|
|
14
|
+
*
|
|
15
|
+
* ## Disclaimer
|
|
16
|
+
*
|
|
17
|
+
* This component is an experiment and not yet a part of Vaadin platform.
|
|
18
|
+
* There is no ETA regarding specific Vaadin version where it'll land.
|
|
19
|
+
* Feel free to try this code in your apps as per Apache 2.0 license.
|
|
20
|
+
*/
|
|
21
|
+
export class PasswordField extends PasswordFieldMixin(TextField) {
|
|
22
|
+
static get is() {
|
|
23
|
+
return 'vaadin-password-field';
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @protected
|
|
28
|
+
* @override
|
|
29
|
+
*/
|
|
30
|
+
_renderSuffix() {
|
|
31
|
+
return html`
|
|
32
|
+
${super._renderSuffix()}
|
|
33
|
+
<div part="reveal-button" slot="suffix">
|
|
34
|
+
<slot name="reveal"></slot>
|
|
35
|
+
</div>
|
|
36
|
+
`;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
defineCustomElement(PasswordField);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2021 -
|
|
3
|
+
* Copyright (c) 2021 - 2024 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, PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2021 -
|
|
3
|
+
* Copyright (c) 2021 - 2024 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 type { Constructor } from '@open-wc/dedupe-mixin';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2021 -
|
|
3
|
+
* Copyright (c) 2021 - 2024 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 { DisabledMixin } from '@vaadin/a11y-base/src/disabled-mixin.js';
|
|
@@ -65,7 +65,7 @@ export const PasswordFieldMixin = (superClass) =>
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
static get observers() {
|
|
68
|
-
return ['__i18nChanged(i18n
|
|
68
|
+
return ['__i18nChanged(i18n)'];
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
constructor() {
|
|
@@ -184,14 +184,14 @@ export const PasswordFieldMixin = (superClass) =>
|
|
|
184
184
|
|
|
185
185
|
/** @private */
|
|
186
186
|
__updateAriaLabel(i18n) {
|
|
187
|
-
if (i18n.reveal && this._revealNode) {
|
|
187
|
+
if (i18n && i18n.reveal && this._revealNode) {
|
|
188
188
|
this._revealNode.setAttribute('aria-label', i18n.reveal);
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
/** @private */
|
|
193
193
|
__i18nChanged(i18n) {
|
|
194
|
-
this.__updateAriaLabel(i18n
|
|
194
|
+
this.__updateAriaLabel(i18n);
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
/** @private */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2021 -
|
|
3
|
+
* Copyright (c) 2021 - 2024 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';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
+
*/
|
|
6
|
+
import '@vaadin/text-field/theme/lumo/vaadin-text-field-styles.js';
|
|
7
|
+
import './vaadin-password-field-button-styles.js';
|
|
8
|
+
import './vaadin-password-field-styles.js';
|
|
9
|
+
import '../../src/vaadin-lit-password-field.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2021 -
|
|
3
|
+
* Copyright (c) 2021 - 2024 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 -
|
|
3
|
+
* Copyright (c) 2021 - 2024 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';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
+
*/
|
|
6
|
+
import '@vaadin/text-field/theme/material/vaadin-text-field-styles.js';
|
|
7
|
+
import './vaadin-password-field-button-styles.js';
|
|
8
|
+
import './vaadin-password-field-styles.js';
|
|
9
|
+
import '../../src/vaadin-lit-password-field.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* Copyright (c) 2021 -
|
|
3
|
+
* Copyright (c) 2021 - 2024 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 -
|
|
3
|
+
* Copyright (c) 2021 - 2024 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';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/vaadin-password-field.js';
|