RCTSinglelineTextInputViewConfig.js 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. /**
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. *
  7. * @flow strict-local
  8. * @format
  9. */
  10. 'use strict';
  11. import ReactNativeViewViewConfig from '../../Components/View/ReactNativeViewViewConfig';
  12. import type {ReactNativeBaseComponentViewConfig} from '../../Renderer/shims/ReactNativeTypes';
  13. const RCTSinglelineTextInputViewConfig = {
  14. uiViewClassName: 'RCTSinglelineTextInputView',
  15. bubblingEventTypes: {
  16. topBlur: {
  17. phasedRegistrationNames: {
  18. bubbled: 'onBlur',
  19. captured: 'onBlurCapture',
  20. },
  21. },
  22. topChange: {
  23. phasedRegistrationNames: {
  24. bubbled: 'onChange',
  25. captured: 'onChangeCapture',
  26. },
  27. },
  28. topEndEditing: {
  29. phasedRegistrationNames: {
  30. bubbled: 'onEndEditing',
  31. captured: 'onEndEditingCapture',
  32. },
  33. },
  34. topFocus: {
  35. phasedRegistrationNames: {
  36. bubbled: 'onFocus',
  37. captured: 'onFocusCapture',
  38. },
  39. },
  40. topKeyPress: {
  41. phasedRegistrationNames: {
  42. bubbled: 'onKeyPress',
  43. captured: 'onKeyPressCapture',
  44. },
  45. },
  46. topSubmitEditing: {
  47. phasedRegistrationNames: {
  48. bubbled: 'onSubmitEditing',
  49. captured: 'onSubmitEditingCapture',
  50. },
  51. },
  52. topTouchCancel: {
  53. phasedRegistrationNames: {
  54. bubbled: 'onTouchCancel',
  55. captured: 'onTouchCancelCapture',
  56. },
  57. },
  58. topTouchEnd: {
  59. phasedRegistrationNames: {
  60. bubbled: 'onTouchEnd',
  61. captured: 'onTouchEndCapture',
  62. },
  63. },
  64. topTouchMove: {
  65. phasedRegistrationNames: {
  66. bubbled: 'onTouchMove',
  67. captured: 'onTouchMoveCapture',
  68. },
  69. },
  70. },
  71. directEventTypes: {},
  72. validAttributes: {
  73. ...ReactNativeViewViewConfig.validAttributes,
  74. fontSize: true,
  75. fontWeight: true,
  76. fontVariant: true,
  77. // flowlint-next-line untyped-import:off
  78. textShadowOffset: {diff: require('../../Utilities/differ/sizesDiffer')},
  79. allowFontScaling: true,
  80. fontStyle: true,
  81. textTransform: true,
  82. textAlign: true,
  83. fontFamily: true,
  84. lineHeight: true,
  85. isHighlighted: true,
  86. writingDirection: true,
  87. textDecorationLine: true,
  88. textShadowRadius: true,
  89. letterSpacing: true,
  90. textDecorationStyle: true,
  91. textDecorationColor: {process: require('../../StyleSheet/processColor')},
  92. color: {process: require('../../StyleSheet/processColor')},
  93. maxFontSizeMultiplier: true,
  94. textShadowColor: {process: require('../../StyleSheet/processColor')},
  95. editable: true,
  96. inputAccessoryViewID: true,
  97. caretHidden: true,
  98. enablesReturnKeyAutomatically: true,
  99. placeholderTextColor: {process: require('../../StyleSheet/processColor')},
  100. onSelectionChange: true,
  101. clearButtonMode: true,
  102. onContentSizeChange: true,
  103. keyboardType: true,
  104. selection: true,
  105. returnKeyType: true,
  106. blurOnSubmit: true,
  107. mostRecentEventCount: true,
  108. onChange: true,
  109. scrollEnabled: true,
  110. selectionColor: {process: require('../../StyleSheet/processColor')},
  111. contextMenuHidden: true,
  112. secureTextEntry: true,
  113. onTextInput: true,
  114. placeholder: true,
  115. autoCorrect: true,
  116. onScroll: true,
  117. multiline: true,
  118. textContentType: true,
  119. maxLength: true,
  120. autoCapitalize: true,
  121. keyboardAppearance: true,
  122. passwordRules: true,
  123. spellCheck: true,
  124. selectTextOnFocus: true,
  125. text: true,
  126. clearTextOnFocus: true,
  127. },
  128. };
  129. module.exports = (RCTSinglelineTextInputViewConfig: ReactNativeBaseComponentViewConfig<>);