@vaadin/password-field
Advanced tools
Comparing version 22.0.0-alpha9 to 22.0.0-beta1
{ | ||
"name": "@vaadin/password-field", | ||
"version": "22.0.0-alpha9", | ||
"version": "22.0.0-beta1", | ||
"publishConfig": { | ||
@@ -35,5 +35,5 @@ "access": "public" | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/text-field": "22.0.0-alpha9", | ||
"@vaadin/vaadin-lumo-styles": "22.0.0-alpha9", | ||
"@vaadin/vaadin-material-styles": "22.0.0-alpha9" | ||
"@vaadin/text-field": "22.0.0-beta1", | ||
"@vaadin/vaadin-lumo-styles": "22.0.0-beta1", | ||
"@vaadin/vaadin-material-styles": "22.0.0-beta1" | ||
}, | ||
@@ -45,3 +45,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "6e8c899dc65918f97e3c0acb2076122c4b2ef274" | ||
"gitHead": "4cf8a9d0504994200c610e44b3676114fef49c1e" | ||
} |
@@ -6,2 +6,3 @@ /** | ||
*/ | ||
import { SlotStylesMixin } from '@vaadin/field-base/src/slot-styles-mixin.js'; | ||
import { TextField } from '@vaadin/text-field/src/vaadin-text-field.js'; | ||
@@ -36,5 +37,6 @@ | ||
* | ||
* `<vaadin-password-field>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`. | ||
* See [`<vaadin-text-field>`](#/elements/vaadin-text-field) for the styling documentation. | ||
* | ||
* In addition to `<vaadin-text-field>` parts, here's the list of `<vaadin-password-field>` specific parts: | ||
* In addition to `<vaadin-text-field>` parts, the following parts are available for theming: | ||
* | ||
@@ -45,7 +47,7 @@ * Part name | Description | ||
* | ||
* In addition to `<vaadin-text-field>` state attributes, here's the list of `<vaadin-password-field>` specific attributes: | ||
* In addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming: | ||
* | ||
* Attribute | Description | Part name | ||
* -------------------|-------------|------------ | ||
* `password-visible` | Set when the password is visible | :host | ||
* Attribute | Description | ||
* -------------------|--------------------------------- | ||
* `password-visible` | Set when the password is visible | ||
* | ||
@@ -59,3 +61,3 @@ * See [Styling Components](https://vaadin.com/docs/latest/ds/customization/styling-components) documentation. | ||
*/ | ||
declare class PasswordField extends TextField { | ||
declare class PasswordField extends SlotStylesMixin(TextField) { | ||
/** | ||
@@ -62,0 +64,0 @@ * Set to true to hide the eye icon which toggles the password visibility. |
@@ -7,2 +7,3 @@ /** | ||
import { html } from '@polymer/polymer/lib/utils/html-tag.js'; | ||
import { SlotStylesMixin } from '@vaadin/field-base/src/slot-styles-mixin.js'; | ||
import { TextField } from '@vaadin/text-field/src/vaadin-text-field.js'; | ||
@@ -27,5 +28,6 @@ | ||
* | ||
* `<vaadin-password-field>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`. | ||
* See [`<vaadin-text-field>`](#/elements/vaadin-text-field) for the styling documentation. | ||
* | ||
* In addition to `<vaadin-text-field>` parts, here's the list of `<vaadin-password-field>` specific parts: | ||
* In addition to `<vaadin-text-field>` parts, the following parts are available for theming: | ||
* | ||
@@ -36,7 +38,7 @@ * Part name | Description | ||
* | ||
* In addition to `<vaadin-text-field>` state attributes, here's the list of `<vaadin-password-field>` specific attributes: | ||
* In addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming: | ||
* | ||
* Attribute | Description | Part name | ||
* -------------------|-------------|------------ | ||
* `password-visible` | Set when the password is visible | :host | ||
* Attribute | Description | ||
* -------------------|--------------------------------- | ||
* `password-visible` | Set when the password is visible | ||
* | ||
@@ -51,4 +53,5 @@ * See [Styling Components](https://vaadin.com/docs/latest/ds/customization/styling-components) documentation. | ||
* @extends TextField | ||
* @mixes SlotStylesMixin | ||
*/ | ||
export class PasswordField extends TextField { | ||
export class PasswordField extends SlotStylesMixin(TextField) { | ||
static get is() { | ||
@@ -131,3 +134,3 @@ return 'vaadin-password-field'; | ||
btn.setAttribute('type', 'button'); | ||
btn.setAttribute('tabindex', '0'); | ||
btn.disabled = this.disabled; | ||
return btn; | ||
@@ -139,2 +142,14 @@ } | ||
/** @protected */ | ||
get slotStyles() { | ||
const tag = this.localName; | ||
return [ | ||
` | ||
${tag} [slot="input"]::-ms-reveal { | ||
display: none; | ||
} | ||
` | ||
]; | ||
} | ||
/** @protected */ | ||
get _revealNode() { | ||
@@ -290,4 +305,18 @@ return this._getDirectSlotChild('reveal'); | ||
} | ||
/** | ||
* Override method inherited from `DisabledMixin` to synchronize the reveal button | ||
* disabled state with the password field disabled state. | ||
* @param {boolean} disabled | ||
* @protected | ||
*/ | ||
_disabledChanged(disabled) { | ||
super._disabledChanged(disabled); | ||
if (this._revealNode) { | ||
this._revealNode.disabled = disabled; | ||
} | ||
} | ||
} | ||
customElements.define(PasswordField.is, PasswordField); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30019
500
+ Added@vaadin/component-base@22.0.0-beta1(transitive)
+ Added@vaadin/field-base@22.0.0-beta1(transitive)
+ Added@vaadin/icon@22.0.0-beta1(transitive)
+ Added@vaadin/input-container@22.0.0-beta1(transitive)
+ Added@vaadin/text-field@22.0.0-beta1(transitive)
+ Added@vaadin/vaadin-lumo-styles@22.0.0-beta1(transitive)
+ Added@vaadin/vaadin-material-styles@22.0.0-beta1(transitive)
+ Added@vaadin/vaadin-themable-mixin@22.0.0-beta1(transitive)
- Removed@vaadin/component-base@22.0.0-alpha9(transitive)
- Removed@vaadin/field-base@22.0.0-alpha9(transitive)
- Removed@vaadin/icon@22.0.0-alpha9(transitive)
- Removed@vaadin/input-container@22.0.0-alpha9(transitive)
- Removed@vaadin/text-field@22.0.0-alpha9(transitive)
- Removed@vaadin/vaadin-lumo-styles@22.0.0-alpha9(transitive)
- Removed@vaadin/vaadin-material-styles@22.0.0-alpha9(transitive)
- Removed@vaadin/vaadin-themable-mixin@22.0.0-alpha9(transitive)