Skip to content

Commit

Permalink
fixed 2 minor migration issues
Browse files Browse the repository at this point in the history
  • Loading branch information
MeTaNoV committed Oct 3, 2017
1 parent a03c21c commit 6236124
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gold-password-input",
"version": "2.0.0",
"version": "2.0.1",
"description": "[Polymer 2.x] Input element with Material Design that allows password with an optional strength meter.",
"authors": [
"Pascal Gula aka MeTaNoV <[email protected]>"
Expand Down
7 changes: 6 additions & 1 deletion demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,14 @@

<script src="../../webcomponentsjs/webcomponents-lite.js"></script>

<link rel="import" href="../../paper-styles/color.html">
<link rel="import" href="../../paper-styles/default-theme.html">
<link rel="import" href="../../paper-styles/demo-pages.html">
<link rel="import" href="../../paper-styles/typography.html">
<link rel="import" href="../../paper-styles/shadow.html">

<link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
<link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
<link rel="import" href="../../paper-styles/color.html">

<link rel="import" href="../gold-password-input.html">
<link rel="import" href="../gold-password-input-validator.html">
Expand Down
12 changes: 6 additions & 6 deletions gold-password-input-strength-meter.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,22 @@

/* FIXME PG: remove !important used as current workaround before getting the proper explanation... cf. ( https://github.com/Polymer/polymer/issues/3059 )*/
.None {
color: var(--gold-password-input-strength-meter-none-color, --paper-grey-700) !important;
color: var(--gold-password-input-strength-meter-none-color, var(--paper-grey-700)) !important;
}
.VeryWeak {
color: var(--gold-password-input-strength-meter-veryweak-color, --paper-red-700) !important;
color: var(--gold-password-input-strength-meter-veryweak-color, var(--paper-red-700)) !important;
}
.Weak {
color: var(--gold-password-input-strength-meter-weak-color, --paper-orange-700) !important;
color: var(--gold-password-input-strength-meter-weak-color, var(--paper-orange-700)) !important;
}
.Medium {
color: var(--gold-password-input-strength-meter-medium-color, --paper-yellow-700) !important;
color: var(--gold-password-input-strength-meter-medium-color, var(--paper-yellow-700)) !important;
}
.Strong {
color: var(--gold-password-input-strength-meter-strong-color, --paper-blue-700) !important;
color: var(--gold-password-input-strength-meter-strong-color, var(--paper-blue-700)) !important;
}
.VeryStrong {
color: var(--gold-password-input-strength-meter-verystrong-color, --paper-green-700) !important;
color: var(--gold-password-input-strength-meter-verystrong-color, var(--paper-green-700)) !important;
}

#strengthLabel iron-icon {
Expand Down
12 changes: 8 additions & 4 deletions gold-password-input.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@
<paper-input-error slot="add-on" id="error">[[errorMessage]]</paper-input-error>
</template>

<!-- TODO PG: check if we need a slot here too! -->
<template is="dom-if" if="[[strengthMeter]]">
<gold-password-input-strength-meter
slot="add-on"
Expand Down Expand Up @@ -356,9 +355,14 @@
},

attached: function() {
// this prevent tabbing issue since paperInputBehavior is forcing focus on input element...
this.$.reveal.$.checked.tabIndex = -1;
this.$.reveal.$.unchecked.tabIndex = -1;
Polymer.RenderStatus.beforeNextRender(this, function() {
// this prevent tabbing issue since paperInputBehavior is forcing focus on input element...
if (this.reveal) {
let revealElement = this.shadowRoot.querySelector('#reveal')
revealElement.$.unchecked.tabIndex = -1;
revealElement.$.checked.tabIndex = -1;
}
});
},

_checkedChanged: function(checked) {
Expand Down

0 comments on commit 6236124

Please sign in to comment.