@office-iss/react-native-win32 0.0.0-canary.291 → 0.0.0-canary.293

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.
Files changed (191) hide show
  1. package/.flowconfig +1 -1
  2. package/CHANGELOG.json +43 -1
  3. package/CHANGELOG.md +22 -4
  4. package/Libraries/Alert/RCTAlertManager.js +17 -0
  5. package/Libraries/Animated/AnimatedEvent.js +4 -3
  6. package/Libraries/Animated/AnimatedExports.js.flow +2 -0
  7. package/Libraries/Animated/AnimatedImplementation.js +2 -2
  8. package/Libraries/Animated/components/AnimatedScrollView.js +48 -43
  9. package/Libraries/Animated/nodes/AnimatedValue.js +2 -1
  10. package/Libraries/BatchedBridge/MessageQueue.js +2 -2
  11. package/Libraries/Blob/FileReader.js +219 -8
  12. package/Libraries/Blob/URL.js +13 -1
  13. package/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.js +17 -0
  14. package/Libraries/Components/Button.js +1 -1
  15. package/Libraries/Components/Button.win32.js +1 -1
  16. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +1 -3
  17. package/Libraries/{Utilities/__mocks__/GlobalPerformanceLogger.js → Components/DrawerAndroid/DrawerLayoutAndroid.ios.js} +3 -4
  18. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js +6 -66
  19. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js.flow +18 -0
  20. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidFallback.js +71 -0
  21. package/Libraries/Components/Keyboard/Keyboard.js +4 -2
  22. package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +6 -3
  23. package/Libraries/Components/Pressable/Pressable.js +6 -1
  24. package/Libraries/Components/Pressable/Pressable.win32.js +6 -1
  25. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js +12 -2
  26. package/Libraries/Components/RefreshControl/RefreshControl.js +1 -1
  27. package/Libraries/Components/ScrollView/ScrollView.d.ts +1 -1
  28. package/Libraries/Components/ScrollView/ScrollView.js +128 -116
  29. package/Libraries/Components/StaticRenderer.js +1 -1
  30. package/Libraries/Components/Switch/Switch.js +7 -3
  31. package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +2 -1
  32. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +2 -4
  33. package/Libraries/Components/TextInput/TextInput.flow.js +59 -42
  34. package/Libraries/Components/TextInput/TextInput.flow.win32.js +1208 -0
  35. package/Libraries/Components/TextInput/TextInput.js +67 -1005
  36. package/Libraries/Components/TextInput/TextInput.win32.js +69 -1037
  37. package/Libraries/{Blob/__mocks__/BlobModule.js → Components/ToastAndroid/ToastAndroid.ios.js} +3 -6
  38. package/Libraries/Components/ToastAndroid/ToastAndroid.js +4 -32
  39. package/Libraries/Components/ToastAndroid/ToastAndroid.js.flow +109 -0
  40. package/Libraries/Components/ToastAndroid/ToastAndroid.win32.js +4 -32
  41. package/Libraries/Components/ToastAndroid/ToastAndroidFallback.js +45 -0
  42. package/Libraries/Components/Touchable/Touchable.js +5 -5
  43. package/Libraries/Components/Touchable/Touchable.win32.js +5 -5
  44. package/Libraries/Components/Touchable/TouchableBounce.js +12 -6
  45. package/Libraries/Components/Touchable/TouchableHighlight.js +9 -6
  46. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +4 -4
  47. package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js +4 -4
  48. package/Libraries/Components/Touchable/TouchableOpacity.js +11 -5
  49. package/Libraries/Components/View/View.js +18 -21
  50. package/Libraries/Components/View/View.win32.js +21 -24
  51. package/Libraries/Components/View/ViewAccessibility.js +7 -0
  52. package/Libraries/Components/View/ViewAccessibility.win32.js +7 -0
  53. package/Libraries/Components/View/ViewPropTypes.js +1 -1
  54. package/Libraries/Components/View/ViewPropTypes.win32.js +1 -1
  55. package/Libraries/Core/ReactNativeVersion.js +1 -1
  56. package/Libraries/Core/setUpReactDevTools.js +5 -5
  57. package/Libraries/EventEmitter/NativeEventEmitter.js +4 -1
  58. package/Libraries/Image/Image.js +17 -0
  59. package/Libraries/Image/Image.js.flow +2 -2
  60. package/Libraries/Image/ImageInjection.js +1 -1
  61. package/Libraries/Image/ImageProps.js +5 -5
  62. package/Libraries/Image/ImageSource.js +3 -1
  63. package/Libraries/Image/ImageSourceUtils.js +4 -2
  64. package/Libraries/Image/ImageTypes.flow.js +1 -1
  65. package/Libraries/Lists/FlatList.d.ts +2 -2
  66. package/Libraries/Lists/FlatList.js +1 -1
  67. package/Libraries/Lists/SectionList.js +1 -1
  68. package/Libraries/Lists/SectionListModern.js +3 -3
  69. package/Libraries/LogBox/Data/LogBoxData.js +1 -1
  70. package/Libraries/LogBox/LogBoxNotificationContainer.js +1 -1
  71. package/Libraries/Modal/Modal.js +3 -3
  72. package/Libraries/NativeComponent/BaseViewConfig.js +17 -0
  73. package/Libraries/NativeComponent/PlatformBaseViewConfig.js +2 -2
  74. package/Libraries/NativeModules/specs/NativeDevMenu.js +2 -2
  75. package/Libraries/Network/RCTNetworking.js +17 -0
  76. package/Libraries/Network/XMLHttpRequest.js +781 -10
  77. package/Libraries/NewAppScreen/components/DebugInstructions.js +1 -1
  78. package/Libraries/NewAppScreen/components/Header.js +1 -1
  79. package/Libraries/NewAppScreen/components/HermesBadge.js +1 -1
  80. package/Libraries/NewAppScreen/components/LearnMoreLinks.js +3 -3
  81. package/Libraries/NewAppScreen/components/ReloadInstructions.js +1 -1
  82. package/Libraries/Performance/Systrace.js +7 -7
  83. package/Libraries/ReactNative/AppContainer-dev.js +3 -2
  84. package/Libraries/ReactNative/RendererImplementation.js +6 -5
  85. package/Libraries/ReactNative/renderApplication.js +9 -0
  86. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +2 -2
  87. package/Libraries/Renderer/implementations/ReactFabric-dev.js +4840 -4748
  88. package/Libraries/Renderer/implementations/ReactFabric-prod.js +4947 -4829
  89. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +3998 -3888
  90. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +5005 -4948
  91. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +2744 -2652
  92. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +5020 -4933
  93. package/Libraries/Renderer/shims/ReactFabric.js +3 -1
  94. package/Libraries/Renderer/shims/ReactFeatureFlags.js +3 -1
  95. package/Libraries/Renderer/shims/ReactNative.js +3 -1
  96. package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +3 -1
  97. package/Libraries/Renderer/shims/createReactNativeComponentClass.js +3 -1
  98. package/Libraries/Settings/Settings.js +13 -19
  99. package/Libraries/Settings/Settings.win32.js +19 -20
  100. package/Libraries/Settings/SettingsFallback.js +33 -0
  101. package/Libraries/StyleSheet/PlatformColorValueTypes.js +15 -0
  102. package/Libraries/StyleSheet/Rect.js +1 -0
  103. package/Libraries/StyleSheet/StyleSheet.js.flow +3 -3
  104. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -1
  105. package/Libraries/StyleSheet/StyleSheetTypes.js +75 -33
  106. package/Libraries/StyleSheet/flattenStyle.js +7 -1
  107. package/Libraries/StyleSheet/processBackgroundImage.js +670 -214
  108. package/Libraries/Text/Text.js +3 -3
  109. package/Libraries/Text/Text.win32.js +3 -3
  110. package/Libraries/Text/TextNativeComponent.js +0 -4
  111. package/Libraries/Text/TextNativeComponent.win32.js +0 -4
  112. package/Libraries/Text/TextProps.js +1 -1
  113. package/Libraries/Text/TextProps.win32.js +1 -1
  114. package/Libraries/Utilities/Appearance.js +2 -0
  115. package/Libraries/Utilities/BackHandler.js +17 -0
  116. package/Libraries/Utilities/Platform.js +17 -0
  117. package/Libraries/Utilities/PlatformTypes.js +2 -0
  118. package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
  119. package/Libraries/WebSocket/WebSocket.js +313 -8
  120. package/flow/global.js +0 -2
  121. package/index.js +1 -288
  122. package/index.win32.js +8 -297
  123. package/overrides.json +29 -23
  124. package/package.json +16 -16
  125. package/src/private/animated/NativeAnimatedHelper.js +1 -1
  126. package/src/private/animated/NativeAnimatedHelper.win32.js +1 -1
  127. package/src/private/animated/createAnimatedPropsHook.js +2 -27
  128. package/src/private/components/{SafeAreaView_INTERNAL_DO_NOT_USE.js → safeareaview/SafeAreaView_INTERNAL_DO_NOT_USE.js} +6 -6
  129. package/src/private/components/{HScrollViewNativeComponents.js → scrollview/HScrollViewNativeComponents.js} +8 -8
  130. package/src/private/components/scrollview/VScrollViewNativeComponents.js +25 -0
  131. package/src/private/{devmenu → devsupport/devmenu}/DevMenu.js +1 -1
  132. package/src/private/{inspector → devsupport/devmenu/elementinspector}/BorderBox.js +3 -3
  133. package/src/private/{inspector → devsupport/devmenu/elementinspector}/BoxInspector.js +6 -5
  134. package/src/private/{inspector → devsupport/devmenu/elementinspector}/ElementBox.js +8 -6
  135. package/src/private/{inspector → devsupport/devmenu/elementinspector}/ElementProperties.js +11 -10
  136. package/src/private/{inspector → devsupport/devmenu/elementinspector}/Inspector.js +14 -12
  137. package/src/private/{inspector → devsupport/devmenu/elementinspector}/InspectorOverlay.js +5 -4
  138. package/src/private/{inspector → devsupport/devmenu/elementinspector}/InspectorPanel.js +9 -8
  139. package/src/private/{inspector → devsupport/devmenu/elementinspector}/NetworkOverlay.js +10 -9
  140. package/src/private/{inspector → devsupport/devmenu/elementinspector}/ReactDevToolsOverlay.js +7 -7
  141. package/src/private/{inspector → devsupport/devmenu/elementinspector}/StyleInspector.js +7 -6
  142. package/src/private/{inspector → devsupport/devmenu/elementinspector}/XHRInterceptor.js +2 -2
  143. package/src/private/{inspector → devsupport/devmenu/elementinspector}/getInspectorDataForViewAtPoint.js +2 -2
  144. package/src/private/{inspector → devsupport/devmenu/elementinspector}/resolveBoxStyle.js +1 -1
  145. package/src/private/{inspector → devsupport/devmenu/perfmonitor}/PerformanceOverlay.js +6 -5
  146. package/src/private/{specs_DEPRECATED/modules → devsupport/devmenu/specs}/NativeDevMenu.js +2 -2
  147. package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.android.js +1 -1
  148. package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.ios.js +1 -1
  149. package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.win32.js +1 -1
  150. package/src/private/{debugging → devsupport/rndevtools}/setUpFuseboxReactDevToolsDispatcher.js +1 -1
  151. package/src/private/{fusebox → devsupport/rndevtools}/specs/NativeReactDevToolsRuntimeSettingsModule.js +2 -2
  152. package/src/private/{specs_DEPRECATED/modules → devsupport/rndevtools/specs}/NativeReactDevToolsSettingsManager.js +2 -2
  153. package/src/private/featureflags/ReactNativeFeatureFlags.js +37 -43
  154. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +8 -8
  155. package/src/private/renderer/errorhandling/ErrorHandlers.js +2 -2
  156. package/src/private/specs_DEPRECATED/modules/NativeSampleTurboModule.js +3 -0
  157. package/src/private/types/HostComponent.js +1 -1
  158. package/src/private/types/HostInstance.js +12 -4
  159. package/src/private/webapis/performance/Performance.js +1 -3
  160. package/types/index.d.ts +1 -1
  161. package/types/public/ReactNativeTypes.d.ts +2 -2
  162. package/Libraries/BatchedBridge/__mocks__/MessageQueueTestConfig.js +0 -38
  163. package/Libraries/BatchedBridge/__mocks__/MessageQueueTestModule.js +0 -22
  164. package/Libraries/Blob/FileReader_new.js +0 -231
  165. package/Libraries/Blob/FileReader_old.js +0 -186
  166. package/Libraries/Blob/__mocks__/FileReaderModule.js +0 -20
  167. package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +0 -32
  168. package/Libraries/Core/__mocks__/ErrorUtils.js +0 -33
  169. package/Libraries/Core/__mocks__/NativeExceptionsManager.js +0 -19
  170. package/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +0 -49
  171. package/Libraries/Events/CustomEvent.js +0 -32
  172. package/Libraries/Events/EventPolyfill.js +0 -239
  173. package/Libraries/Lists/__flowtests__/FlatList-flowtest.js +0 -118
  174. package/Libraries/Lists/__flowtests__/SectionList-flowtest.js +0 -134
  175. package/Libraries/Network/XMLHttpRequest_new.js +0 -794
  176. package/Libraries/Network/XMLHttpRequest_old.js +0 -701
  177. package/Libraries/StyleSheet/__flowtests__/StyleSheet-flowtest.js +0 -58
  178. package/Libraries/Utilities/__mocks__/BackHandler.js +0 -45
  179. package/Libraries/Utilities/__mocks__/PixelRatio.js +0 -25
  180. package/Libraries/WebSocket/WebSocketEvent.js +0 -30
  181. package/Libraries/WebSocket/WebSocket_new.js +0 -325
  182. package/Libraries/WebSocket/WebSocket_old.js +0 -297
  183. package/Libraries/WebSocket/__mocks__/event-target-shim.js +0 -27
  184. package/Libraries/__flowtests__/ReactNativeTypes-flowtest.js +0 -30
  185. package/Libraries/vendor/emitter/__flowtests__/EventEmitter-flowtest.js +0 -81
  186. package/jest/__tests__/setup-test.js +0 -18
  187. package/src/private/components/VScrollViewNativeComponents.js +0 -25
  188. package/src/private/webapis/performance/specs/__mocks__/NativePerformanceMock.js +0 -267
  189. package/src/types/third_party/event-target-shim.d.ts +0 -392
  190. /package/src/private/{devmenu → devsupport/devmenu}/DevMenu.d.ts +0 -0
  191. /package/src/private/{debugging → devsupport/rndevtools}/FuseboxSessionObserver.js +0 -0
@@ -12,19 +12,46 @@ import type {HostInstance} from '../../../src/private/types/HostInstance';
12
12
  import type {____TextStyle_Internal as TextStyleInternal} from '../../StyleSheet/StyleSheetTypes';
13
13
  import type {
14
14
  GestureResponderEvent,
15
- NativeSyntheticEvent,
16
15
  ScrollEvent,
17
16
  } from '../../Types/CoreEventTypes';
18
- import type {ViewProps} from '../View/ViewPropTypes';
19
- import type {TextInputInstance, TextInputType} from './TextInput.flow';
17
+ import type {
18
+ AutoCapitalize,
19
+ EnterKeyHintType,
20
+ EnterKeyHintTypeAndroid,
21
+ EnterKeyHintTypeIOS,
22
+ EnterKeyHintTypeOptions,
23
+ InputModeOptions,
24
+ KeyboardType,
25
+ KeyboardTypeAndroid,
26
+ KeyboardTypeIOS,
27
+ KeyboardTypeOptions,
28
+ ReturnKeyType,
29
+ ReturnKeyTypeAndroid,
30
+ ReturnKeyTypeIOS,
31
+ ReturnKeyTypeOptions,
32
+ Selection,
33
+ SubmitBehavior,
34
+ TextContentType,
35
+ TextInputAndroidProps,
36
+ TextInputBlurEvent,
37
+ TextInputChangeEvent,
38
+ TextInputContentSizeChangeEvent,
39
+ TextInputEditingEvent,
40
+ TextInputEndEditingEvent,
41
+ TextInputEvent,
42
+ TextInputFocusEvent,
43
+ TextInputInstance,
44
+ TextInputIOSProps,
45
+ TextInputKeyPressEvent,
46
+ TextInputProps,
47
+ TextInputSelectionChangeEvent,
48
+ TextInputSubmitEditingEvent,
49
+ TextInputType,
50
+ } from './TextInput.flow';
20
51
 
21
52
  import usePressability from '../../Pressability/usePressability';
22
53
  import flattenStyle from '../../StyleSheet/flattenStyle';
23
- import StyleSheet, {
24
- type ColorValue,
25
- type TextStyleProp,
26
- type ViewStyleProp,
27
- } from '../../StyleSheet/StyleSheet';
54
+ import StyleSheet, {type TextStyleProp} from '../../StyleSheet/StyleSheet';
28
55
  import Text from '../../Text/Text';
29
56
  import TextAncestor from '../../Text/TextAncestor';
30
57
  import Platform from '../../Utilities/Platform';
@@ -57,1005 +84,38 @@ if (Platform.OS === 'android') {
57
84
  require('./RCTMultilineTextInputNativeComponent').Commands;
58
85
  }
59
86
 
60
- /**
61
- * @see TextInputProps.onChange
62
- */
63
- type TextInputChangeEventData = $ReadOnly<{
64
- eventCount: number,
65
- target: number,
66
- text: string,
67
- }>;
68
-
69
- export type TextInputChangeEvent =
70
- NativeSyntheticEvent<TextInputChangeEventData>;
71
-
72
- export type TextInputEvent = NativeSyntheticEvent<
73
- $ReadOnly<{
74
- eventCount: number,
75
- previousText: string,
76
- range: $ReadOnly<{
77
- start: number,
78
- end: number,
79
- }>,
80
- target: number,
81
- text: string,
82
- }>,
83
- >;
84
-
85
- type TextInputContentSizeChangeEventData = $ReadOnly<{
86
- target: number,
87
- contentSize: $ReadOnly<{
88
- width: number,
89
- height: number,
90
- }>,
91
- }>;
92
-
93
- /**
94
- * @see TextInputProps.onContentSizeChange
95
- */
96
- export type TextInputContentSizeChangeEvent =
97
- NativeSyntheticEvent<TextInputContentSizeChangeEventData>;
98
-
99
- export type TargetEvent = $ReadOnly<{
100
- target: number,
101
- }>;
102
-
103
- type TextInputFocusEventData = TargetEvent;
104
-
105
- /**
106
- * @see TextInputProps.onBlur
107
- */
108
- export type TextInputBlurEvent = NativeSyntheticEvent<TextInputFocusEventData>;
109
-
110
- /**
111
- * @see TextInputProps.onFocus
112
- */
113
- export type TextInputFocusEvent = NativeSyntheticEvent<TextInputFocusEventData>;
114
-
115
- type TextInputScrollEventData = {
116
- contentOffset: {x: number, y: number},
87
+ export type {
88
+ AutoCapitalize,
89
+ EnterKeyHintType,
90
+ EnterKeyHintTypeAndroid,
91
+ EnterKeyHintTypeIOS,
92
+ EnterKeyHintTypeOptions,
93
+ InputModeOptions,
94
+ KeyboardType,
95
+ KeyboardTypeAndroid,
96
+ KeyboardTypeIOS,
97
+ KeyboardTypeOptions,
98
+ ReturnKeyType,
99
+ ReturnKeyTypeAndroid,
100
+ ReturnKeyTypeIOS,
101
+ ReturnKeyTypeOptions,
102
+ SubmitBehavior,
103
+ TextContentType,
104
+ TextInputAndroidProps,
105
+ TextInputBlurEvent,
106
+ TextInputChangeEvent,
107
+ TextInputContentSizeChangeEvent,
108
+ TextInputEditingEvent,
109
+ TextInputEndEditingEvent,
110
+ TextInputEvent,
111
+ TextInputFocusEvent,
112
+ TextInputIOSProps,
113
+ TextInputKeyPressEvent,
114
+ TextInputProps,
115
+ TextInputSelectionChangeEvent,
116
+ TextInputSubmitEditingEvent,
117
117
  };
118
118
 
119
- /**
120
- * @see TextInputProps.onScroll
121
- */
122
- export type TextInputScrollEvent =
123
- NativeSyntheticEvent<TextInputScrollEventData>;
124
-
125
- type Selection = $ReadOnly<{
126
- start: number,
127
- end: number,
128
- }>;
129
-
130
- type TextInputSelectionChangeEventData = $ReadOnly<{
131
- ...TargetEvent,
132
- selection: Selection,
133
- }>;
134
-
135
- /**
136
- * @see TextInputProps.onSelectionChange
137
- */
138
- export type TextInputSelectionChangeEvent =
139
- NativeSyntheticEvent<TextInputSelectionChangeEventData>;
140
-
141
- type TextInputKeyPressEventData = $ReadOnly<{
142
- ...TargetEvent,
143
- key: string,
144
- target?: ?number,
145
- eventCount?: ?number,
146
- }>;
147
-
148
- /**
149
- * @see TextInputProps.onKeyPress
150
- */
151
- export type TextInputKeyPressEvent =
152
- NativeSyntheticEvent<TextInputKeyPressEventData>;
153
-
154
- type TextInputEndEditingEventData = $ReadOnly<{
155
- ...TargetEvent,
156
- eventCount: number,
157
- text: string,
158
- }>;
159
-
160
- /**
161
- * @see TextInputProps.onEndEditing
162
- */
163
- export type TextInputEndEditingEvent =
164
- NativeSyntheticEvent<TextInputEndEditingEventData>;
165
-
166
- type TextInputSubmitEditingEventData = $ReadOnly<{
167
- ...TargetEvent,
168
- eventCount: number,
169
- text: string,
170
- }>;
171
-
172
- /**
173
- * @see TextInputProps.onSubmitEditing
174
- */
175
- export type TextInputSubmitEditingEvent =
176
- NativeSyntheticEvent<TextInputSubmitEditingEventData>;
177
-
178
- export type TextInputEditingEvent =
179
- NativeSyntheticEvent<TextInputEndEditingEventData>;
180
-
181
- type DataDetectorTypesType =
182
- | 'phoneNumber'
183
- | 'link'
184
- | 'address'
185
- | 'calendarEvent'
186
- | 'trackingNumber'
187
- | 'flightNumber'
188
- | 'lookupSuggestion'
189
- | 'none'
190
- | 'all';
191
-
192
- export type KeyboardType =
193
- | 'default'
194
- | 'email-address'
195
- | 'numeric'
196
- | 'phone-pad'
197
- | 'number-pad'
198
- | 'decimal-pad'
199
- | 'url';
200
-
201
- export type KeyboardTypeIOS =
202
- | 'ascii-capable'
203
- | 'numbers-and-punctuation'
204
- | 'name-phone-pad'
205
- | 'twitter'
206
- | 'web-search'
207
- // iOS 10+ only
208
- | 'ascii-capable-number-pad';
209
-
210
- export type KeyboardTypeAndroid = 'visible-password';
211
-
212
- export type KeyboardTypeOptions =
213
- | KeyboardType
214
- | KeyboardTypeIOS
215
- | KeyboardTypeAndroid;
216
-
217
- export type InputModeOptions =
218
- | 'none'
219
- | 'text'
220
- | 'decimal'
221
- | 'numeric'
222
- | 'tel'
223
- | 'search'
224
- | 'email'
225
- | 'url';
226
-
227
- export type ReturnKeyType = 'done' | 'go' | 'next' | 'search' | 'send';
228
-
229
- export type ReturnKeyTypeIOS =
230
- | 'default'
231
- | 'emergency-call'
232
- | 'google'
233
- | 'join'
234
- | 'route'
235
- | 'yahoo';
236
-
237
- export type ReturnKeyTypeAndroid = 'none' | 'previous';
238
-
239
- export type ReturnKeyTypeOptions =
240
- | ReturnKeyType
241
- | ReturnKeyTypeIOS
242
- | ReturnKeyTypeAndroid;
243
-
244
- export type SubmitBehavior = 'submit' | 'blurAndSubmit' | 'newline';
245
-
246
- export type AutoCapitalize = 'none' | 'sentences' | 'words' | 'characters';
247
-
248
- export type TextContentType =
249
- | 'none'
250
- | 'URL'
251
- | 'addressCity'
252
- | 'addressCityAndState'
253
- | 'addressState'
254
- | 'countryName'
255
- | 'creditCardNumber'
256
- | 'creditCardExpiration'
257
- | 'creditCardExpirationMonth'
258
- | 'creditCardExpirationYear'
259
- | 'creditCardSecurityCode'
260
- | 'creditCardType'
261
- | 'creditCardName'
262
- | 'creditCardGivenName'
263
- | 'creditCardMiddleName'
264
- | 'creditCardFamilyName'
265
- | 'emailAddress'
266
- | 'familyName'
267
- | 'fullStreetAddress'
268
- | 'givenName'
269
- | 'jobTitle'
270
- | 'location'
271
- | 'middleName'
272
- | 'name'
273
- | 'namePrefix'
274
- | 'nameSuffix'
275
- | 'nickname'
276
- | 'organizationName'
277
- | 'postalCode'
278
- | 'streetAddressLine1'
279
- | 'streetAddressLine2'
280
- | 'sublocality'
281
- | 'telephoneNumber'
282
- | 'username'
283
- | 'password'
284
- | 'newPassword'
285
- | 'oneTimeCode'
286
- | 'birthdate'
287
- | 'birthdateDay'
288
- | 'birthdateMonth'
289
- | 'birthdateYear'
290
- | 'cellularEID'
291
- | 'cellularIMEI'
292
- | 'dateTime'
293
- | 'flightNumber'
294
- | 'shipmentTrackingNumber';
295
-
296
- export type EnterKeyHintTypeAndroid = 'previous';
297
-
298
- export type EnterKeyHintTypeIOS = 'enter';
299
-
300
- export type EnterKeyHintType = 'done' | 'go' | 'next' | 'search' | 'send';
301
-
302
- export type EnterKeyHintTypeOptions =
303
- | EnterKeyHintType
304
- | EnterKeyHintTypeAndroid
305
- | EnterKeyHintTypeIOS;
306
-
307
- type PasswordRules = string;
308
-
309
- export type TextInputIOSProps = $ReadOnly<{
310
- /**
311
- * If true, the keyboard shortcuts (undo/redo and copy buttons) are disabled. The default value is false.
312
- * @platform ios
313
- */
314
- disableKeyboardShortcuts?: ?boolean,
315
-
316
- /**
317
- * When the clear button should appear on the right side of the text view.
318
- * This property is supported only for single-line TextInput component.
319
- * @platform ios
320
- */
321
- clearButtonMode?: ?('never' | 'while-editing' | 'unless-editing' | 'always'),
322
-
323
- /**
324
- * If `true`, clears the text field automatically when editing begins.
325
- * @platform ios
326
- */
327
- clearTextOnFocus?: ?boolean,
328
-
329
- /**
330
- * Determines the types of data converted to clickable URLs in the text input.
331
- * Only valid if `multiline={true}` and `editable={false}`.
332
- * By default no data types are detected.
333
- *
334
- * You can provide one type or an array of many types.
335
- *
336
- * Possible values for `dataDetectorTypes` are:
337
- *
338
- * - `'phoneNumber'`
339
- * - `'link'`
340
- * - `'address'`
341
- * - `'calendarEvent'`
342
- * - `'none'`
343
- * - `'all'`
344
- *
345
- * @platform ios
346
- */
347
- dataDetectorTypes?:
348
- | ?DataDetectorTypesType
349
- | $ReadOnlyArray<DataDetectorTypesType>,
350
-
351
- /**
352
- * If `true`, the keyboard disables the return key when there is no text and
353
- * automatically enables it when there is text. The default value is `false`.
354
- * @platform ios
355
- */
356
- enablesReturnKeyAutomatically?: ?boolean,
357
-
358
- /**
359
- * An optional identifier which links a custom InputAccessoryView to
360
- * this text input. The InputAccessoryView is rendered above the
361
- * keyboard when this text input is focused.
362
- * @platform ios
363
- */
364
- inputAccessoryViewID?: ?string,
365
-
366
- /**
367
- * An optional label that overrides the default input accessory view button label.
368
- * @platform ios
369
- */
370
- inputAccessoryViewButtonLabel?: ?string,
371
-
372
- /**
373
- * Determines the color of the keyboard.
374
- * @platform ios
375
- */
376
- keyboardAppearance?: ?('default' | 'light' | 'dark'),
377
-
378
- /**
379
- * Provide rules for your password.
380
- * For example, say you want to require a password with at least eight characters consisting of a mix of uppercase and lowercase letters, at least one number, and at most two consecutive characters.
381
- * "required: upper; required: lower; required: digit; max-consecutive: 2; minlength: 8;"
382
- * @platform ios
383
- */
384
- passwordRules?: ?PasswordRules,
385
-
386
- /*
387
- * If `true`, allows TextInput to pass touch events to the parent component.
388
- * This allows components to be swipeable from the TextInput on iOS,
389
- * as is the case on Android by default.
390
- * If `false`, TextInput always asks to handle the input (except when disabled).
391
- * @platform ios
392
- */
393
- rejectResponderTermination?: ?boolean,
394
-
395
- /**
396
- * If `false`, scrolling of the text view will be disabled.
397
- * The default value is `true`. Does only work with 'multiline={true}'.
398
- * @platform ios
399
- */
400
- scrollEnabled?: ?boolean,
401
-
402
- /**
403
- * If `false`, disables spell-check style (i.e. red underlines).
404
- * The default value is inherited from `autoCorrect`.
405
- * @platform ios
406
- */
407
- spellCheck?: ?boolean,
408
-
409
- /**
410
- * Give the keyboard and the system information about the
411
- * expected semantic meaning for the content that users enter.
412
- * `autoComplete` property accomplishes same behavior and is recommended as its supported by both platforms.
413
- * Avoid using both `autoComplete` and `textContentType`, you can use `Platform.select` for differing platform behaviors.
414
- * For backwards compatibility, when both set, `textContentType` takes precedence on iOS.
415
- * @platform ios
416
- */
417
- textContentType?: ?TextContentType,
418
-
419
- /**
420
- * Set line break strategy on iOS.
421
- * @platform ios
422
- */
423
- lineBreakStrategyIOS?: ?('none' | 'standard' | 'hangul-word' | 'push-out'),
424
-
425
- /**
426
- * Set line break mode on iOS.
427
- * @platform ios
428
- */
429
- lineBreakModeIOS?: ?(
430
- | 'wordWrapping'
431
- | 'char'
432
- | 'clip'
433
- | 'head'
434
- | 'middle'
435
- | 'tail'
436
- ),
437
-
438
- /**
439
- * If `false`, the iOS system will not insert an extra space after a paste operation
440
- * neither delete one or two spaces after a cut or delete operation.
441
- *
442
- * The default value is `true`.
443
- *
444
- * @platform ios
445
- */
446
- smartInsertDelete?: ?boolean,
447
- }>;
448
-
449
- export type TextInputAndroidProps = $ReadOnly<{
450
- /**
451
- * When provided it will set the color of the cursor (or "caret") in the component.
452
- * Unlike the behavior of `selectionColor` the cursor color will be set independently
453
- * from the color of the text selection box.
454
- * @platform android
455
- */
456
- cursorColor?: ?ColorValue,
457
-
458
- /**
459
- * When `false`, if there is a small amount of space available around a text input
460
- * (e.g. landscape orientation on a phone), the OS may choose to have the user edit
461
- * the text inside of a full screen text input mode. When `true`, this feature is
462
- * disabled and users will always edit the text directly inside of the text input.
463
- * Defaults to `false`.
464
- * @platform android
465
- */
466
- disableFullscreenUI?: ?boolean,
467
-
468
- /**
469
- * Determines whether the individual fields in your app should be included in a
470
- * view structure for autofill purposes on Android API Level 26+. Defaults to auto.
471
- * To disable auto complete, use `off`.
472
- *
473
- * *Android Only*
474
- *
475
- * The following values work on Android only:
476
- *
477
- * - `auto` - let Android decide
478
- * - `no` - not important for autofill
479
- * - `noExcludeDescendants` - this view and its children aren't important for autofill
480
- * - `yes` - is important for autofill
481
- * - `yesExcludeDescendants` - this view is important for autofill but its children aren't
482
- */
483
- importantForAutofill?: ?(
484
- | 'auto'
485
- | 'no'
486
- | 'noExcludeDescendants'
487
- | 'yes'
488
- | 'yesExcludeDescendants'
489
- ),
490
-
491
- /**
492
- * If defined, the provided image resource will be rendered on the left.
493
- * The image resource must be inside `/android/app/src/main/res/drawable` and referenced
494
- * like
495
- * ```
496
- * <TextInput
497
- * inlineImageLeft='search_icon'
498
- * />
499
- * ```
500
- * @platform android
501
- */
502
- inlineImageLeft?: ?string,
503
-
504
- /**
505
- * Padding between the inline image, if any, and the text input itself.
506
- * @platform android
507
- */
508
- inlineImagePadding?: ?number,
509
-
510
- /**
511
- * Sets the number of lines for a `TextInput`. Use it with multiline set to
512
- * `true` to be able to fill the lines.
513
- * @platform android
514
- */
515
- numberOfLines?: ?number,
516
-
517
- /**
518
- * Sets the return key to the label. Use it instead of `returnKeyType`.
519
- * @platform android
520
- */
521
- returnKeyLabel?: ?string,
522
-
523
- /**
524
- * Sets the number of rows for a `TextInput`. Use it with multiline set to
525
- * `true` to be able to fill the lines.
526
- * @platform android
527
- */
528
- rows?: ?number,
529
-
530
- /**
531
- * When `false`, it will prevent the soft keyboard from showing when the field is focused.
532
- * Defaults to `true`.
533
- */
534
- showSoftInputOnFocus?: ?boolean,
535
-
536
- /**
537
- * Set text break strategy on Android API Level 23+, possible values are `simple`, `highQuality`, `balanced`
538
- * The default value is `simple`.
539
- * @platform android
540
- */
541
- textBreakStrategy?: ?('simple' | 'highQuality' | 'balanced'),
542
-
543
- /**
544
- * The color of the `TextInput` underline.
545
- * @platform android
546
- */
547
- underlineColorAndroid?: ?ColorValue,
548
- }>;
549
-
550
- type TextInputBaseProps = $ReadOnly<{
551
- /**
552
- * Can tell `TextInput` to automatically capitalize certain characters.
553
- *
554
- * - `characters`: all characters.
555
- * - `words`: first letter of each word.
556
- * - `sentences`: first letter of each sentence (*default*).
557
- * - `none`: don't auto capitalize anything.
558
- */
559
- autoCapitalize?: ?AutoCapitalize,
560
-
561
- /**
562
- * Specifies autocomplete hints for the system, so it can provide autofill.
563
- * On Android, the system will always attempt to offer autofill by using heuristics to identify the type of content.
564
- * To disable autocomplete, set autoComplete to off.
565
- *
566
- * The following values work across platforms:
567
- *
568
- * - `additional-name`
569
- * - `address-line1`
570
- * - `address-line2`
571
- * - `birthdate-day` (iOS 17+)
572
- * - `birthdate-full` (iOS 17+)
573
- * - `birthdate-month` (iOS 17+)
574
- * - `birthdate-year` (iOS 17+)
575
- * - `cc-number`
576
- * - `cc-csc` (iOS 17+)
577
- * - `cc-exp` (iOS 17+)
578
- * - `cc-exp-day` (iOS 17+)
579
- * - `cc-exp-month` (iOS 17+)
580
- * - `cc-exp-year` (iOS 17+)
581
- * - `country`
582
- * - `current-password`
583
- * - `email`
584
- * - `family-name`
585
- * - `given-name`
586
- * - `honorific-prefix`
587
- * - `honorific-suffix`
588
- * - `name`
589
- * - `new-password`
590
- * - `off`
591
- * - `one-time-code`
592
- * - `postal-code`
593
- * - `street-address`
594
- * - `tel`
595
- * - `username`
596
- *
597
- * The following values work on iOS only:
598
- *
599
- * - `cc-name` (iOS 17+)
600
- * - `cc-given-name` (iOS 17+)
601
- * - `cc-middle-name` (iOS 17+)
602
- * - `cc-family-name` (iOS 17+)
603
- * - `cc-type` (iOS 17+)
604
- * - `nickname`
605
- * - `organization`
606
- * - `organization-title`
607
- * - `url`
608
- *
609
- * The following values work on Android only:
610
- *
611
- * - `gender`
612
- * - `name-family`
613
- * - `name-given`
614
- * - `name-middle`
615
- * - `name-middle-initial`
616
- * - `name-prefix`
617
- * - `name-suffix`
618
- * - `password`
619
- * - `password-new`
620
- * - `postal-address`
621
- * - `postal-address-country`
622
- * - `postal-address-extended`
623
- * - `postal-address-extended-postal-code`
624
- * - `postal-address-locality`
625
- * - `postal-address-region`
626
- * - `sms-otp`
627
- * - `tel-country-code`
628
- * - `tel-national`
629
- * - `tel-device`
630
- * - `username-new`
631
- */
632
- autoComplete?: ?(
633
- | 'additional-name'
634
- | 'address-line1'
635
- | 'address-line2'
636
- | 'birthdate-day'
637
- | 'birthdate-full'
638
- | 'birthdate-month'
639
- | 'birthdate-year'
640
- | 'cc-csc'
641
- | 'cc-exp'
642
- | 'cc-exp-day'
643
- | 'cc-exp-month'
644
- | 'cc-exp-year'
645
- | 'cc-number'
646
- | 'cc-name'
647
- | 'cc-given-name'
648
- | 'cc-middle-name'
649
- | 'cc-family-name'
650
- | 'cc-type'
651
- | 'country'
652
- | 'current-password'
653
- | 'email'
654
- | 'family-name'
655
- | 'gender'
656
- | 'given-name'
657
- | 'honorific-prefix'
658
- | 'honorific-suffix'
659
- | 'name'
660
- | 'name-family'
661
- | 'name-given'
662
- | 'name-middle'
663
- | 'name-middle-initial'
664
- | 'name-prefix'
665
- | 'name-suffix'
666
- | 'new-password'
667
- | 'nickname'
668
- | 'one-time-code'
669
- | 'organization'
670
- | 'organization-title'
671
- | 'password'
672
- | 'password-new'
673
- | 'postal-address'
674
- | 'postal-address-country'
675
- | 'postal-address-extended'
676
- | 'postal-address-extended-postal-code'
677
- | 'postal-address-locality'
678
- | 'postal-address-region'
679
- | 'postal-code'
680
- | 'street-address'
681
- | 'sms-otp'
682
- | 'tel'
683
- | 'tel-country-code'
684
- | 'tel-national'
685
- | 'tel-device'
686
- | 'url'
687
- | 'username'
688
- | 'username-new'
689
- | 'off'
690
- ),
691
-
692
- /**
693
- * If `false`, disables auto-correct. The default value is `true`.
694
- */
695
- autoCorrect?: ?boolean,
696
-
697
- /**
698
- * If `true`, focuses the input on `componentDidMount`.
699
- * The default value is `false`.
700
- */
701
- autoFocus?: ?boolean,
702
-
703
- /**
704
- * Specifies whether fonts should scale to respect Text Size accessibility settings. The
705
- * default is `true`.
706
- */
707
- allowFontScaling?: ?boolean,
708
-
709
- /**
710
- * If `true`, caret is hidden. The default value is `false`.
711
- *
712
- * On Android devices manufactured by Xiaomi with Android Q,
713
- * when keyboardType equals 'email-address'this will be set
714
- * in native to 'true' to prevent a system related crash. This
715
- * will cause cursor to be disabled as a side-effect.
716
- *
717
- */
718
- caretHidden?: ?boolean,
719
-
720
- /*
721
- * If `true`, contextMenuHidden is hidden. The default value is `false`.
722
- */
723
- contextMenuHidden?: ?boolean,
724
-
725
- /**
726
- * Provides an initial value that will change when the user starts typing.
727
- * Useful for simple use-cases where you do not want to deal with listening
728
- * to events and updating the value prop to keep the controlled state in sync.
729
- */
730
- defaultValue?: ?Stringish,
731
-
732
- /**
733
- * If `false`, text is not editable. The default value is `true`.
734
- */
735
- editable?: ?boolean,
736
-
737
- forwardedRef?: ?React.RefSetter<TextInputInstance>,
738
-
739
- /**
740
- * `enterKeyHint` defines what action label (or icon) to present for the enter key on virtual keyboards.
741
- *
742
- * The following values is supported:
743
- *
744
- * - `enter`
745
- * - `done`
746
- * - `go`
747
- * - `next`
748
- * - `previous`
749
- * - `search`
750
- * - `send`
751
- */
752
- enterKeyHint?: ?EnterKeyHintTypeOptions,
753
-
754
- /**
755
- * `inputMode` works like the `inputmode` attribute in HTML, it determines which
756
- * keyboard to open, e.g.`numeric` and has precedence over keyboardType
757
- *
758
- * Support the following values:
759
- *
760
- * - `none`
761
- * - `text`
762
- * - `decimal`
763
- * - `numeric`
764
- * - `tel`
765
- * - `search`
766
- * - `email`
767
- * - `url`
768
- */
769
- inputMode?: ?InputModeOptions,
770
-
771
- /**
772
- * Determines which keyboard to open, e.g.`numeric`.
773
- *
774
- * The following values work across platforms:
775
- *
776
- * - `default`
777
- * - `numeric`
778
- * - `number-pad`
779
- * - `decimal-pad`
780
- * - `email-address`
781
- * - `phone-pad`
782
- * - `url`
783
- *
784
- * *iOS Only*
785
- *
786
- * The following values work on iOS only:
787
- *
788
- * - `ascii-capable`
789
- * - `numbers-and-punctuation`
790
- * - `name-phone-pad`
791
- * - `twitter`
792
- * - `web-search`
793
- *
794
- * *Android Only*
795
- *
796
- * The following values work on Android only:
797
- *
798
- * - `visible-password`
799
- *
800
- */
801
- keyboardType?: ?KeyboardTypeOptions,
802
-
803
- /**
804
- * Specifies largest possible scale a font can reach when `allowFontScaling` is enabled.
805
- * Possible values:
806
- * `null/undefined` (default): inherit from the parent node or the global default (0)
807
- * `0`: no max, ignore parent/global default
808
- * `>= 1`: sets the maxFontSizeMultiplier of this node to this value
809
- */
810
- maxFontSizeMultiplier?: ?number,
811
-
812
- /**
813
- * Limits the maximum number of characters that can be entered. Use this
814
- * instead of implementing the logic in JS to avoid flicker.
815
- */
816
- maxLength?: ?number,
817
-
818
- /**
819
- * If `true`, the text input can be multiple lines.
820
- * The default value is `false`.
821
- */
822
- multiline?: ?boolean,
823
-
824
- /**
825
- * Callback that is called when the text input is blurred.
826
- */
827
- onBlur?: ?(e: TextInputBlurEvent) => mixed,
828
-
829
- /**
830
- * Callback that is called when the text input's text changes.
831
- */
832
- onChange?: ?(e: TextInputChangeEvent) => mixed,
833
-
834
- /**
835
- * Callback that is called when the text input's text changes.
836
- * Changed text is passed as an argument to the callback handler.
837
- */
838
- onChangeText?: ?(text: string) => mixed,
839
-
840
- /**
841
- * Callback that is called when the text input's content size changes.
842
- * This will be called with
843
- * `{ nativeEvent: { contentSize: { width, height } } }`.
844
- *
845
- * Only called for multiline text inputs.
846
- */
847
- onContentSizeChange?: ?(e: TextInputContentSizeChangeEvent) => mixed,
848
-
849
- /**
850
- * Callback that is called when text input ends.
851
- */
852
- onEndEditing?: ?(e: TextInputEndEditingEvent) => mixed,
853
-
854
- /**
855
- * Callback that is called when the text input is focused.
856
- */
857
- onFocus?: ?(e: TextInputFocusEvent) => mixed,
858
-
859
- /**
860
- * Callback that is called when a key is pressed.
861
- * This will be called with `{ nativeEvent: { key: keyValue } }`
862
- * where `keyValue` is `'Enter'` or `'Backspace'` for respective keys and
863
- * the typed-in character otherwise including `' '` for space.
864
- * Fires before `onChange` callbacks.
865
- */
866
- onKeyPress?: ?(e: TextInputKeyPressEvent) => mixed,
867
-
868
- /**
869
- * Called when a single tap gesture is detected.
870
- */
871
- onPress?: ?(event: GestureResponderEvent) => mixed,
872
-
873
- /**
874
- * Called when a touch is engaged.
875
- */
876
- onPressIn?: ?(event: GestureResponderEvent) => mixed,
877
-
878
- /**
879
- * Called when a touch is released.
880
- */
881
- onPressOut?: ?(event: GestureResponderEvent) => mixed,
882
-
883
- /**
884
- * Callback that is called when the text input selection is changed.
885
- * This will be called with
886
- * `{ nativeEvent: { selection: { start, end } } }`.
887
- */
888
- onSelectionChange?: ?(e: TextInputSelectionChangeEvent) => mixed,
889
-
890
- /**
891
- * Callback that is called when the text input's submit button is pressed.
892
- * Invalid if `multiline={true}` is specified.
893
- */
894
- onSubmitEditing?: ?(e: TextInputSubmitEditingEvent) => mixed,
895
-
896
- /**
897
- * Invoked on content scroll with `{ nativeEvent: { contentOffset: { x, y } } }`.
898
- * May also contain other properties from ScrollEvent but on Android contentSize
899
- * is not provided for performance reasons.
900
- */
901
- onScroll?: ?(e: ScrollEvent) => mixed,
902
-
903
- /**
904
- * The string that will be rendered before text input has been entered.
905
- */
906
- placeholder?: ?Stringish,
907
-
908
- /**
909
- * The text color of the placeholder string.
910
- */
911
- placeholderTextColor?: ?ColorValue,
912
-
913
- /** `readOnly` works like the `readonly` attribute in HTML.
914
- * If `true`, text is not editable. The default value is `false`.
915
- * See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly
916
- * for more details.
917
- */
918
- readOnly?: ?boolean,
919
-
920
- /**
921
- * Determines how the return key should look. On Android you can also use
922
- * `returnKeyLabel`.
923
- *
924
- * *Cross platform*
925
- *
926
- * The following values work across platforms:
927
- *
928
- * - `done`
929
- * - `go`
930
- * - `next`
931
- * - `search`
932
- * - `send`
933
- *
934
- * *Android Only*
935
- *
936
- * The following values work on Android only:
937
- *
938
- * - `none`
939
- * - `previous`
940
- *
941
- * *iOS Only*
942
- *
943
- * The following values work on iOS only:
944
- *
945
- * - `default`
946
- * - `emergency-call`
947
- * - `google`
948
- * - `join`
949
- * - `route`
950
- * - `yahoo`
951
- */
952
- returnKeyType?: ?ReturnKeyTypeOptions,
953
-
954
- /**
955
- * If `true`, the text input obscures the text entered so that sensitive text
956
- * like passwords stay secure. The default value is `false`. Does not work with 'multiline={true}'.
957
- */
958
- secureTextEntry?: ?boolean,
959
-
960
- /**
961
- * The start and end of the text input's selection. Set start and end to
962
- * the same value to position the cursor.
963
- */
964
- selection?: ?$ReadOnly<{
965
- start: number,
966
- end?: ?number,
967
- }>,
968
-
969
- /**
970
- * The highlight and cursor color of the text input.
971
- */
972
- selectionColor?: ?ColorValue,
973
-
974
- /**
975
- * When provided it will set the color of the selection handles when highlighting text.
976
- * Unlike the behavior of `selectionColor` the handle color will be set independently
977
- * from the color of the text selection box.
978
- * @platform android
979
- */
980
- selectionHandleColor?: ?ColorValue,
981
-
982
- /**
983
- * If `true`, all text will automatically be selected on focus.
984
- */
985
- selectTextOnFocus?: ?boolean,
986
-
987
- /**
988
- * If `true`, the text field will blur when submitted.
989
- * The default value is true for single-line fields and false for
990
- * multiline fields. Note that for multiline fields, setting `blurOnSubmit`
991
- * to `true` means that pressing return will blur the field and trigger the
992
- * `onSubmitEditing` event instead of inserting a newline into the field.
993
- *
994
- * @deprecated
995
- * Note that `submitBehavior` now takes the place of `blurOnSubmit` and will
996
- * override any behavior defined by `blurOnSubmit`.
997
- * @see submitBehavior
998
- */
999
- blurOnSubmit?: ?boolean,
1000
-
1001
- /**
1002
- * When the return key is pressed,
1003
- *
1004
- * For single line inputs:
1005
- *
1006
- * - `'newline`' defaults to `'blurAndSubmit'`
1007
- * - `undefined` defaults to `'blurAndSubmit'`
1008
- *
1009
- * For multiline inputs:
1010
- *
1011
- * - `'newline'` adds a newline
1012
- * - `undefined` defaults to `'newline'`
1013
- *
1014
- * For both single line and multiline inputs:
1015
- *
1016
- * - `'submit'` will only send a submit event and not blur the input
1017
- * - `'blurAndSubmit`' will both blur the input and send a submit event
1018
- */
1019
- submitBehavior?: ?SubmitBehavior,
1020
-
1021
- /**
1022
- * Note that not all Text styles are supported, an incomplete list of what is not supported includes:
1023
- *
1024
- * - `borderLeftWidth`
1025
- * - `borderTopWidth`
1026
- * - `borderRightWidth`
1027
- * - `borderBottomWidth`
1028
- * - `borderTopLeftRadius`
1029
- * - `borderTopRightRadius`
1030
- * - `borderBottomRightRadius`
1031
- * - `borderBottomLeftRadius`
1032
- *
1033
- * see [Issue#7070](https://github.com/facebook/react-native/issues/7070)
1034
- * for more detail.
1035
- *
1036
- * [Styles](docs/style.html)
1037
- */
1038
- style?: ?TextStyleProp,
1039
-
1040
- /**
1041
- * The value to show for the text input. `TextInput` is a controlled
1042
- * component, which means the native value will be forced to match this
1043
- * value prop if provided. For most uses, this works great, but in some
1044
- * cases this may cause flickering - one common cause is preventing edits
1045
- * by keeping value the same. In addition to simply setting the same value,
1046
- * either set `editable={false}`, or set/update `maxLength` to prevent
1047
- * unwanted edits without flicker.
1048
- */
1049
- value?: ?Stringish,
1050
- }>;
1051
-
1052
- export type TextInputProps = $ReadOnly<{
1053
- ...$Diff<ViewProps, $ReadOnly<{style: ?ViewStyleProp}>>,
1054
- ...TextInputIOSProps,
1055
- ...TextInputAndroidProps,
1056
- ...TextInputBaseProps,
1057
- }>;
1058
-
1059
119
  type TextInputStateType = $ReadOnly<{
1060
120
  /**
1061
121
  * @deprecated Use currentlyFocusedInput
@@ -1615,6 +675,7 @@ function InternalTextInput(props: TextInputProps): React.Node {
1615
675
  ref={(ref: $FlowFixMe)}
1616
676
  {...otherProps}
1617
677
  {...eventHandlers}
678
+ acceptDragAndDropTypes={props.experimental_acceptDragAndDropTypes}
1618
679
  accessibilityState={_accessibilityState}
1619
680
  accessible={accessible}
1620
681
  submitBehavior={submitBehavior}
@@ -1681,6 +742,7 @@ function InternalTextInput(props: TextInputProps): React.Node {
1681
742
  accessibilityState={_accessibilityState}
1682
743
  accessibilityLabelledBy={_accessibilityLabelledBy}
1683
744
  accessible={accessible}
745
+ acceptDragAndDropTypes={props.experimental_acceptDragAndDropTypes}
1684
746
  autoCapitalize={autoCapitalize}
1685
747
  submitBehavior={submitBehavior}
1686
748
  caretHidden={caretHidden}