webmotors-webinput
Advanced tools
Comparing version
125
index.js
@@ -628,13 +628,14 @@ const React = require('react'); | ||
}, | ||
this.renderPlaceholder(), | ||
React.createElement( | ||
'div', | ||
{ | ||
className: 'inputtext__input', | ||
ref: this.input, | ||
id: this.state.id, | ||
}, | ||
value | ||
( | ||
React.createElement( | ||
'div', | ||
{ | ||
className: 'inputtext__input', | ||
ref: this.input, | ||
id: this.state.id, | ||
}, | ||
value | ||
), | ||
this.renderDescription() | ||
), | ||
// this.renderDescription() | ||
) | ||
@@ -650,61 +651,59 @@ ) | ||
}, | ||
this.renderPlaceholder(), | ||
React.createElement( | ||
'input', | ||
{ | ||
type: props.type === 'password' ? 'password' : 'text', | ||
className: 'inputtext__input', | ||
ref: this.input, | ||
id: this.state.id, | ||
name: props.name, | ||
defaultValue: value, | ||
readOnly: this.state.readOnly, | ||
onFocus: (e) => { | ||
this.handlerFocus(e); | ||
if (props.onFocus) this.handlerCustomEvent('onFocus', e); | ||
}, | ||
onBlur: (e) => { | ||
this.handlerBlur(e); | ||
if (props.onBlur) this.handlerCustomEvent('onBlur', e); | ||
}, | ||
onInput: (e) => { | ||
this.handlerInput(e); | ||
if (props.onInput) this.handlerCustomEvent('onInput', e); | ||
}, | ||
'data-type': this.props['data-type'], | ||
}, | ||
), | ||
( | ||
this.renderPlaceholder(), | ||
React.createElement( | ||
'input', | ||
{ | ||
type: props.type === 'password' ? 'password' : 'text', | ||
className: 'inputtext__input', | ||
ref: this.input, | ||
id: this.state.id, | ||
name: props.name, | ||
defaultValue: value, | ||
readOnly: this.state.readOnly, | ||
onFocus: (e) => { | ||
this.handlerFocus(e); | ||
if (props.onFocus) this.handlerCustomEvent('onFocus', e); | ||
props.type === 'password' && ( | ||
React.createElement( | ||
'button', | ||
{ | ||
tabIndex: '-1', | ||
'aria-hidden': 'true', | ||
className: `inputtext__button ${this.state.passwordClass}`, | ||
type: 'button', | ||
onClick: () => this.handlerPasswordToggle() | ||
}, | ||
onBlur: (e) => { | ||
this.handlerBlur(e); | ||
if (props.onBlur) this.handlerCustomEvent('onBlur', e); | ||
}, | ||
onInput: (e) => { | ||
this.handlerInput(e); | ||
if (props.onInput) this.handlerCustomEvent('onInput', e); | ||
}, | ||
'data-type': this.props['data-type'], | ||
}, | ||
), | ||
( | ||
props.type === 'password' && ( | ||
React.createElement( | ||
'button', | ||
{ | ||
tabIndex: '-1', | ||
'aria-hidden': 'true', | ||
className: `inputtext__button ${this.state.passwordClass}`, | ||
type: 'button', | ||
onClick: () => this.handlerPasswordToggle() | ||
}, | ||
( | ||
React.createElement( | ||
SVG, | ||
{ | ||
className: 'inputtext__password--show', | ||
src: '/assets/img/icons/eye-view.svg', | ||
} | ||
), | ||
React.createElement( | ||
SVG, | ||
{ | ||
className: 'inputtext__password--hide', | ||
src: '/assets/img/icons/eye-hide.svg', | ||
} | ||
) | ||
( | ||
React.createElement( | ||
SVG, | ||
{ | ||
className: 'inputtext__password--show', | ||
src: '/assets/img/icons/eye-view.svg', | ||
} | ||
), | ||
React.createElement( | ||
SVG, | ||
{ | ||
className: 'inputtext__password--hide', | ||
src: '/assets/img/icons/eye-hide.svg', | ||
} | ||
) | ||
) | ||
) | ||
), | ||
this.renderDescription() | ||
) | ||
), | ||
// this.renderDescription() | ||
) | ||
@@ -711,0 +710,0 @@ ) |
{ | ||
"name": "webmotors-webinput", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "Component Webmotors Web Input types", | ||
@@ -5,0 +5,0 @@ "dependencies" : { |
30956
-0.79%699
-0.14%