@vaadin/password-field
Advanced tools
Comparing version 23.0.0-rc1 to 23.0.0
{ | ||
"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) { |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
32034
536
+ Added@vaadin/button@23.5.3(transitive)
+ Added@vaadin/component-base@23.5.3(transitive)
+ Added@vaadin/field-base@23.5.3(transitive)
+ Added@vaadin/icon@23.5.3(transitive)
+ Added@vaadin/input-container@23.5.3(transitive)
+ Added@vaadin/text-field@23.5.3(transitive)
+ Added@vaadin/vaadin-lumo-styles@23.5.3(transitive)
+ Added@vaadin/vaadin-material-styles@23.5.3(transitive)
+ Added@vaadin/vaadin-themable-mixin@23.5.3(transitive)
- Removed@vaadin/button@23.0.0-rc1(transitive)
- Removed@vaadin/component-base@23.0.0-rc1(transitive)
- Removed@vaadin/field-base@23.0.0-rc1(transitive)
- Removed@vaadin/icon@23.0.0-rc1(transitive)
- Removed@vaadin/input-container@23.0.0-rc1(transitive)
- Removed@vaadin/text-field@23.0.0-rc1(transitive)
- Removed@vaadin/vaadin-lumo-styles@23.0.0-rc1(transitive)
- Removed@vaadin/vaadin-material-styles@23.0.0-rc1(transitive)
- Removed@vaadin/vaadin-themable-mixin@23.0.0-rc1(transitive)
Updated@vaadin/button@^23.0.0
Updated@vaadin/text-field@^23.0.0