Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vaadin/password-field

Package Overview
Dependencies
Maintainers
19
Versions
411
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vaadin/password-field - npm Package Compare versions

Comparing version 22.0.0-alpha9 to 22.0.0-beta1

10

package.json
{
"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);
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc