muba-input-text 5.0.0 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/InputText.js CHANGED
@@ -250,10 +250,10 @@ export default class InputText extends React.Component {
250
250
  <View style={{ marginTop: 10 }} />
251
251
  }
252
252
 
253
- <View style={inputTextStyles.row} collapsable={false}>
253
+ <View style={(isRTL() && (this.props.language == null || this.props.language == 'AR')) || (!isRTL() && (this.props.language == null || this.props.language != 'AR')) ? inputTextStyles.row : inputTextStyles.rowReverse} collapsable={false}>
254
254
  <TextInput
255
255
  ref={(input) => { this.input = input; }}
256
- style={[inputTextStyles.textInputField, inputTextStyles.textField, this.props.style, { textAlign: isRTL() || this.props.language == 'AR' ? 'right' : 'left' }, this.state.fieldError && !this.props.label ? inputTextStyles.fieldError : '', this.props.disabled ? inputTextStyles.disabled : '', this.props.multiline ? { paddingTop: 5 } : '']}
256
+ style={[inputTextStyles.textInputField, inputTextStyles.textField, this.props.style, { textAlign: (isRTL() && (this.props.language == null || this.props.language == 'AR')) || this.props.language == 'AR' ? 'right' : 'left' }, this.state.fieldError && !this.props.label ? inputTextStyles.fieldError : '', this.props.disabled ? inputTextStyles.disabled : '', this.props.multiline ? { paddingTop: 5 } : '']}
257
257
  underlineColorAndroid='transparent'
258
258
  keyboardType={this.props.keyboardType ? this.props.keyboardType : keyboardTypeMap[this.props.type ? this.props.type : 'default']}
259
259
  onChangeText={(text) => this.onChangeText(text)}
@@ -271,7 +271,9 @@ export default class InputText extends React.Component {
271
271
  selection={this.props.selection}
272
272
  selectionColor={this.props.selectionColor}
273
273
  numberOfLines={this.props.numberOfLines}
274
- maxLength={this.props.maxLength} />
274
+ maxLength={this.props.maxLength}
275
+ onFocus={this.props.onFocus}
276
+ onBlur={this.props.onBlur} />
275
277
  {this.props.children}
276
278
 
277
279
  {this.props.value != null && !this.props.hideCancel ?
@@ -11,6 +11,10 @@ export const inputTextStyles = StyleSheet.create({
11
11
  flexDirection: 'row'
12
12
  },
13
13
 
14
+ rowReverse: {
15
+ flexDirection: 'row-reverse'
16
+ },
17
+
14
18
  progressbarField: {
15
19
  fontFamily: Fonts.Note,
16
20
  fontSize: 12,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muba-input-text",
3
- "version": "5.0.0",
3
+ "version": "5.0.2",
4
4
  "description": "Input text",
5
5
  "main": "InputText.js",
6
6
  "scripts": {