@@ -15,22 +15,22 @@ import { property, state } from 'lit/decorators.js';
1515@defineElement ( 'uui-input-password' )
1616export class UUIInputPasswordElement extends UUIInputElement {
1717 @state ( )
18- private passwordType : InputType = 'password' ;
18+ private inputType : InputType = 'password' ;
1919
2020 // this overrides the inherited type property, and moves the input's type handling to the passwordType state.
2121 @property ( )
2222 get type ( ) {
23- return this . passwordType ;
23+ return this . inputType ;
2424 }
2525 set type ( newValue ) {
26- this . passwordType = newValue ;
26+ this . inputType = newValue ;
2727 }
2828
2929 _onPasswordToggle ( ) {
30- if ( this . passwordType === 'password' ) {
31- this . passwordType = 'text' ;
30+ if ( this . inputType === 'password' ) {
31+ this . inputType = 'text' ;
3232 } else {
33- this . passwordType = 'password' ;
33+ this . inputType = 'password' ;
3434 }
3535 }
3636
@@ -46,7 +46,7 @@ export class UUIInputPasswordElement extends UUIInputElement {
4646 }
4747
4848 renderIcon ( ) {
49- return this . passwordType === 'password'
49+ return this . inputType === 'password'
5050 ? html `<uui- icon name= "see" .fallback = ${ iconSee . strings [ 0 ] } > </ uui- icon> `
5151 : html `<uui- icon
5252 name= "unsee"
@@ -58,7 +58,7 @@ export class UUIInputPasswordElement extends UUIInputElement {
5858 .disabled = ${ this . disabled }
5959 @click = ${ this . _onPasswordToggle }
6060 compact
61- label= "${ this . passwordType === 'password'
61+ label= "${ this . inputType === 'password'
6262 ? 'Show password'
6363 : 'Hide password' } "
6464 id = "eye" >
0 commit comments