@vaadin/password-field 25.0.0-alpha1 → 25.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": "25.0.0-alpha1",
3
+ "version": "25.0.0-alpha10",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -21,8 +21,8 @@
21
21
  "type": "module",
22
22
  "files": [
23
23
  "src",
24
- "!src/*-base-styles.d.ts",
25
- "!src/*-base-styles.js",
24
+ "!src/styles/*-base-styles.d.ts",
25
+ "!src/styles/*-base-styles.js",
26
26
  "theme",
27
27
  "vaadin-*.d.ts",
28
28
  "vaadin-*.js",
@@ -37,24 +37,24 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "@open-wc/dedupe-mixin": "^1.3.0",
40
- "@vaadin/a11y-base": "25.0.0-alpha1",
41
- "@vaadin/button": "25.0.0-alpha1",
42
- "@vaadin/component-base": "25.0.0-alpha1",
43
- "@vaadin/field-base": "25.0.0-alpha1",
44
- "@vaadin/text-field": "25.0.0-alpha1",
45
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha1",
46
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha1",
40
+ "@vaadin/a11y-base": "25.0.0-alpha10",
41
+ "@vaadin/button": "25.0.0-alpha10",
42
+ "@vaadin/component-base": "25.0.0-alpha10",
43
+ "@vaadin/field-base": "25.0.0-alpha10",
44
+ "@vaadin/text-field": "25.0.0-alpha10",
45
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha10",
46
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha10",
47
47
  "lit": "^3.0.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@vaadin/chai-plugins": "25.0.0-alpha1",
51
- "@vaadin/test-runner-commands": "25.0.0-alpha1",
52
- "@vaadin/testing-helpers": "^1.1.0",
50
+ "@vaadin/chai-plugins": "25.0.0-alpha10",
51
+ "@vaadin/test-runner-commands": "25.0.0-alpha10",
52
+ "@vaadin/testing-helpers": "^2.0.0",
53
53
  "sinon": "^18.0.0"
54
54
  },
55
55
  "web-types": [
56
56
  "web-types.json",
57
57
  "web-types.lit.json"
58
58
  ],
59
- "gitHead": "b8c22a4a0c64156210d0daac96b43ae4e5526d49"
59
+ "gitHead": "6cc6c94079e805fa5b2f0af4dbf3b2a7485e57d0"
60
60
  }
@@ -6,14 +6,12 @@
6
6
  import { css } from 'lit';
7
7
 
8
8
  export const passwordFieldStyles = css`
9
- @layer base {
10
- [part='reveal-button']::before {
11
- display: none;
12
- }
9
+ [part='reveal-button']::before {
10
+ display: none;
11
+ }
13
12
 
14
- [part='input-field']:has([part='reveal-button']:focus-within) {
15
- outline: none;
16
- --vaadin-input-field-border-color: inherit;
17
- }
13
+ [part='input-field']:has([part='reveal-button']:focus-within) {
14
+ outline: none;
15
+ --vaadin-input-field-border-color: inherit;
18
16
  }
19
17
  `;
@@ -0,0 +1,44 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2021 - 2025 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
6
+ import '@vaadin/component-base/src/style-props.js';
7
+ import { css } from 'lit';
8
+ import { buttonStyles } from '@vaadin/button/src/styles/vaadin-button-base-styles.js';
9
+
10
+ const passwordFieldBase = css`
11
+ :host {
12
+ --vaadin-button-background: transparent;
13
+ --vaadin-button-border: none;
14
+ --vaadin-button-padding: 0;
15
+ color: var(--vaadin-input-field-button-color, inherit);
16
+ display: block;
17
+ cursor: var(--vaadin-clickable-cursor);
18
+ }
19
+
20
+ :host::before {
21
+ background: currentColor;
22
+ content: '';
23
+ display: block;
24
+ height: var(--vaadin-icon-size, 1lh);
25
+ mask-image: var(--_vaadin-icon-eye);
26
+ width: var(--vaadin-icon-size, 1lh);
27
+ }
28
+
29
+ :host([aria-pressed='true'])::before {
30
+ mask-image: var(--_vaadin-icon-eye-slash);
31
+ }
32
+
33
+ @media (forced-colors: active) {
34
+ :host::before {
35
+ background: CanvasText;
36
+ }
37
+
38
+ :host([disabled])::before {
39
+ background: GrayText;
40
+ }
41
+ }
42
+ `;
43
+
44
+ export const passwordFieldButton = [buttonStyles, passwordFieldBase];
@@ -3,6 +3,6 @@
3
3
  * Copyright (c) 2021 - 2025 Vaadin Ltd.
4
4
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
5
  */
6
- import { buttonStyles } from '@vaadin/button/src/vaadin-button-core-styles.js';
6
+ import { buttonStyles } from '@vaadin/button/src/styles/vaadin-button-core-styles.js';
7
7
 
8
8
  export const passwordFieldButton = [buttonStyles];
@@ -8,8 +8,9 @@ import { ButtonMixin } from '@vaadin/button/src/vaadin-button-mixin.js';
8
8
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
9
9
  import { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';
10
10
  import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
11
+ import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
11
12
  import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
12
- import { passwordFieldButton } from './vaadin-password-field-button-core-styles.js';
13
+ import { passwordFieldButton } from './styles/vaadin-password-field-button-core-styles.js';
13
14
 
14
15
  /**
15
16
  * An element used internally by `<vaadin-password-field>`. Not intended to be used separately.
@@ -21,7 +22,7 @@ import { passwordFieldButton } from './vaadin-password-field-button-core-styles.
21
22
  * @mixes ThemableMixin
22
23
  * @private
23
24
  */
24
- class PasswordFieldButton extends ButtonMixin(DirMixin(ThemableMixin(PolylitMixin(LitElement)))) {
25
+ class PasswordFieldButton extends ButtonMixin(DirMixin(ThemableMixin(PolylitMixin(LumoInjectionMixin(LitElement))))) {
25
26
  static get is() {
26
27
  return 'vaadin-password-field-button';
27
28
  }
@@ -7,7 +7,7 @@ import './vaadin-password-field-button.js';
7
7
  import { html } from 'lit';
8
8
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
9
9
  import { TextField } from '@vaadin/text-field/src/vaadin-text-field.js';
10
- import { passwordFieldStyles } from './vaadin-password-field-core-styles.js';
10
+ import { passwordFieldStyles } from './styles/vaadin-password-field-core-styles.js';
11
11
  import { PasswordFieldMixin } from './vaadin-password-field-mixin.js';
12
12
 
13
13
  /**
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-alpha1",
4
+ "version": "25.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/25.0.0-alpha1/#/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/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/25.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/styling-components) documentation.",
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/password-field",
4
- "version": "25.0.0-alpha1",
4
+ "version": "25.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/25.0.0-alpha1/#/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/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/25.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/styling-components) documentation.",
20
20
  "extension": true,
21
21
  "attributes": [
22
22
  {
@@ -1,46 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright (c) 2021 - 2025 Vaadin Ltd.
4
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
- */
6
- import '@vaadin/component-base/src/style-props.js';
7
- import { css } from 'lit';
8
- import { buttonStyles } from '@vaadin/button/src/vaadin-button-base-styles.js';
9
-
10
- const passwordFieldBase = css`
11
- @layer base {
12
- :host {
13
- --vaadin-button-background: transparent;
14
- --vaadin-button-border: none;
15
- --vaadin-button-padding: 0;
16
- color: inherit;
17
- display: block;
18
- cursor: var(--vaadin-clickable-cursor);
19
- }
20
-
21
- :host::before {
22
- background: currentColor;
23
- content: '';
24
- display: block;
25
- height: var(--vaadin-icon-size, 1lh);
26
- mask-image: var(--_vaadin-icon-eye);
27
- width: var(--vaadin-icon-size, 1lh);
28
- }
29
-
30
- :host([aria-pressed='true'])::before {
31
- mask-image: var(--_vaadin-icon-eye-slash);
32
- }
33
-
34
- @media (forced-colors: active) {
35
- :host::before {
36
- background: CanvasText;
37
- }
38
-
39
- :host([disabled])::before {
40
- background: GrayText;
41
- }
42
- }
43
- }
44
- `;
45
-
46
- export const passwordFieldButton = [buttonStyles, passwordFieldBase];