Socket
Socket
Sign inDemoInstall

@vaadin/password-field

Package Overview
Dependencies
Maintainers
14
Versions
363
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 23.0.0-rc1 to 23.0.0

12

package.json
{
"name": "@vaadin/password-field",
"version": "23.0.0-rc1",
"version": "23.0.0",
"publishConfig": {

@@ -36,6 +36,6 @@ "access": "public"

"@polymer/polymer": "^3.0.0",
"@vaadin/button": "23.0.0-rc1",
"@vaadin/text-field": "23.0.0-rc1",
"@vaadin/vaadin-lumo-styles": "23.0.0-rc1",
"@vaadin/vaadin-material-styles": "23.0.0-rc1"
"@vaadin/button": "^23.0.0",
"@vaadin/text-field": "^23.0.0",
"@vaadin/vaadin-lumo-styles": "^23.0.0",
"@vaadin/vaadin-material-styles": "^23.0.0"
},

@@ -47,3 +47,3 @@ "devDependencies": {

},
"gitHead": "d241fd5b3627efd671e6db25f33f2e69795011d3"
"gitHead": "e5ce38429a14de1448d732614e359fb32b2c42e0"
}

@@ -8,3 +8,3 @@ /**

import { html } from '@polymer/polymer/lib/utils/html-tag.js';
import { SlotMixin } from '@vaadin/component-base/src/slot-mixin.js';
import { SlotController } from '@vaadin/component-base/src/slot-controller.js';
import { SlotStylesMixin } from '@vaadin/field-base/src/slot-styles-mixin.js';

@@ -55,3 +55,3 @@ import { TextField } from '@vaadin/text-field/src/vaadin-text-field.js';

*/
export class PasswordField extends SlotStylesMixin(SlotMixin(TextField)) {
export class PasswordField extends SlotStylesMixin(TextField) {
static get is() {

@@ -128,14 +128,2 @@ return 'vaadin-password-field';

/** @protected */
get slots() {
return {
...super.slots,
reveal: () => {
const btn = document.createElement('vaadin-password-field-button');
btn.disabled = this.disabled;
return btn;
}
};
}
/** @protected */
get slotStyles() {

@@ -154,3 +142,3 @@ const tag = this.localName;

get _revealNode() {
return this._getDirectSlotChild('reveal');
return this._revealButtonController && this._revealButtonController.node;
}

@@ -170,29 +158,23 @@

this._revealPart = this.shadowRoot.querySelector('[part="reveal-button"]');
}
/** @protected */
connectedCallback() {
super.connectedCallback();
this._revealButtonController = new SlotController(
this,
'reveal',
() => document.createElement('vaadin-password-field-button'),
(host, btn) => {
btn.disabled = host.disabled;
if (this._revealNode) {
this.__updateAriaLabel(this.i18n);
this._revealNode.addEventListener('click', this.__boundRevealButtonClick);
this._revealNode.addEventListener('touchend', this.__boundRevealButtonTouchend);
}
btn.addEventListener('click', host.__boundRevealButtonClick);
btn.addEventListener('touchend', host.__boundRevealButtonTouchend);
}
);
this.addController(this._revealButtonController);
if (this.inputElement) {
this.inputElement.autocapitalize = 'off';
}
this.__updateAriaLabel(this.i18n);
this._updateToggleState(false);
this._toggleRevealHidden(this.revealButtonHidden);
this._updateToggleState(false);
}
/** @protected */
disconnectedCallback() {
super.disconnectedCallback();
if (this._revealNode) {
this._revealNode.removeEventListener('click', this.__boundRevealButtonClick);
this._revealNode.removeEventListener('touchend', this.__boundRevealButtonTouchend);
if (this.inputElement) {
this.inputElement.autocapitalize = 'off';
}

@@ -314,6 +296,7 @@ }

* @param {boolean} disabled
* @param {boolean} oldDisabled
* @protected
*/
_disabledChanged(disabled) {
super._disabledChanged(disabled);
_disabledChanged(disabled, oldDisabled) {
super._disabledChanged(disabled, oldDisabled);

@@ -320,0 +303,0 @@ if (this._revealNode) {

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc