muba-input-text 9.0.3 → 9.0.5

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
@@ -15,6 +15,8 @@ const keyboardTypeMap = {
15
15
  phone: 'phone-pad'
16
16
  };
17
17
 
18
+ const VALID_RETURN_KEYS = ['default', 'go', 'google', 'join', 'next', 'route', 'search', 'send', 'yahoo', 'done', 'emergency-call'];
19
+
18
20
  export default class InputText extends React.Component {
19
21
  constructor(props) {
20
22
  super(props);
@@ -257,7 +259,7 @@ export default class InputText extends React.Component {
257
259
  value={this.props.value != null ? this.props.value.toString() : this.props.value}
258
260
  placeholder={this.props.placeholder ? (this.props.required && this.props.turnRequiredSign && isRTL() ? '* ' : '') + this.props.placeholder + (this.props.required && !this.props.turnRequiredSign ? ' *' : '') : ''}
259
261
  placeholderTextColor={this.props.placeholderTextColor ? this.props.placeholderTextColor : inputTextStyles.placeholderTextColor.color}
260
- returnKeyType={this.props.returnKeyType}
262
+ returnKeyType={(typeof incomingKeyType === 'string' && VALID_RETURN_KEYS.includes(incomingKeyType)) ? incomingKeyType : 'default'}
261
263
  onSubmitEditing={() => { this.onSubmitEditing() }}
262
264
  autoCapitalize={this.props.autoCapitalize ? this.props.autoCapitalize : null}
263
265
  secureTextEntry={this.props.secureTextEntry ? this.props.secureTextEntry : false}
@@ -54,9 +54,9 @@ export const inputTextStyles = StyleSheet.create({
54
54
 
55
55
  deleteTextInput: {
56
56
  position: 'absolute',
57
- paddingRight: 10,
58
- paddingLeft: 10,
59
- right: 0,
57
+ paddingEnd: 10,
58
+ paddingStart: 10,
59
+ end: 0,
60
60
  top: 8
61
61
  },
62
62
 
@@ -77,13 +77,13 @@ export const inputTextStyles = StyleSheet.create({
77
77
  height: 35,
78
78
  backgroundColor: '#eff0f1',
79
79
  color: '#333',
80
- paddingLeft: 15,
80
+ paddingStart: 15,
81
81
  borderRadius: 5,
82
82
  padding: 0
83
83
  },
84
84
 
85
85
  textInputField: {
86
- paddingRight: 25,
86
+ paddingEnd: 25,
87
87
  }
88
88
  });
89
89
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muba-input-text",
3
- "version": "9.0.3",
3
+ "version": "9.0.5",
4
4
  "description": "Input text",
5
5
  "main": "InputText.js",
6
6
  "scripts": {