@tamagui/react-native-web-lite 1.113.0 → 1.113.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.
Files changed (243) hide show
  1. package/dist/esm/AccessibilityInfo/index.native.js +62 -58
  2. package/dist/esm/AccessibilityInfo/index.native.js.map +6 -1
  3. package/dist/esm/ActivityIndicator/__tests__/index-test.native.js +55 -85
  4. package/dist/esm/ActivityIndicator/__tests__/index-test.native.js.map +6 -1
  5. package/dist/esm/ActivityIndicator/index.native.js +90 -82
  6. package/dist/esm/ActivityIndicator/index.native.js.map +6 -1
  7. package/dist/esm/Alert/index.native.js +18 -14
  8. package/dist/esm/Alert/index.native.js.map +6 -1
  9. package/dist/esm/AppRegistry/AppContainer.native.js +26 -30
  10. package/dist/esm/AppRegistry/AppContainer.native.js.map +6 -1
  11. package/dist/esm/AppRegistry/__tests__/index-test.native.js +13 -13
  12. package/dist/esm/AppRegistry/__tests__/index-test.native.js.map +6 -1
  13. package/dist/esm/AppRegistry/__tests__/index-test.node.native.js +34 -45
  14. package/dist/esm/AppRegistry/__tests__/index-test.node.native.js.map +6 -1
  15. package/dist/esm/AppRegistry/index.native.js +55 -50
  16. package/dist/esm/AppRegistry/index.native.js.map +6 -1
  17. package/dist/esm/AppRegistry/renderApplication.native.js +27 -33
  18. package/dist/esm/AppRegistry/renderApplication.native.js.map +6 -1
  19. package/dist/esm/AppState/__tests__/index-test.native.js +10 -9
  20. package/dist/esm/AppState/__tests__/index-test.native.js.map +6 -1
  21. package/dist/esm/AppState/index.native.js +51 -45
  22. package/dist/esm/AppState/index.native.js.map +6 -1
  23. package/dist/esm/Appearance/index.native.js +24 -27
  24. package/dist/esm/Appearance/index.native.js.map +6 -1
  25. package/dist/esm/BackHandler/index.native.js +13 -11
  26. package/dist/esm/BackHandler/index.native.js.map +6 -1
  27. package/dist/esm/Clipboard/index.native.js +26 -21
  28. package/dist/esm/Clipboard/index.native.js.map +6 -1
  29. package/dist/esm/DeviceEmitter.native.js +5 -3
  30. package/dist/esm/DeviceEmitter.native.js.map +6 -1
  31. package/dist/esm/DeviceInfo/index.native.js +33 -41
  32. package/dist/esm/DeviceInfo/index.native.js.map +6 -1
  33. package/dist/esm/Dimensions/__tests__/index-test.native.js +8 -9
  34. package/dist/esm/Dimensions/__tests__/index-test.native.js.map +6 -1
  35. package/dist/esm/Dimensions/index.native.js +53 -49
  36. package/dist/esm/Dimensions/index.native.js.map +6 -1
  37. package/dist/esm/I18nManager/index.native.js +13 -10
  38. package/dist/esm/I18nManager/index.native.js.map +6 -1
  39. package/dist/esm/Image/index.native.js +149 -174
  40. package/dist/esm/Image/index.native.js.map +6 -1
  41. package/dist/esm/Image/types.native.js +1 -2
  42. package/dist/esm/Image/types.native.js.map +6 -1
  43. package/dist/esm/ImageBackground/__tests__/index-test.native.js +19 -27
  44. package/dist/esm/ImageBackground/__tests__/index-test.native.js.map +6 -1
  45. package/dist/esm/ImageBackground/index.native.js +33 -35
  46. package/dist/esm/ImageBackground/index.native.js.map +6 -1
  47. package/dist/esm/Keyboard/index.native.js +17 -13
  48. package/dist/esm/Keyboard/index.native.js.map +6 -1
  49. package/dist/esm/KeyboardAvoidingView/index.native.js +44 -34
  50. package/dist/esm/KeyboardAvoidingView/index.native.js.map +6 -1
  51. package/dist/esm/Linking/__tests__/index-test.native.js +9 -9
  52. package/dist/esm/Linking/__tests__/index-test.native.js.map +6 -1
  53. package/dist/esm/Linking/index.native.js +49 -42
  54. package/dist/esm/Linking/index.native.js.map +6 -1
  55. package/dist/esm/LogBox/index.native.js +12 -7
  56. package/dist/esm/LogBox/index.native.js.map +6 -1
  57. package/dist/esm/Modal/ModalAnimation.native.js +112 -89
  58. package/dist/esm/Modal/ModalAnimation.native.js.map +6 -1
  59. package/dist/esm/Modal/ModalContent.native.js +54 -52
  60. package/dist/esm/Modal/ModalContent.native.js.map +6 -1
  61. package/dist/esm/Modal/ModalFocusTrap.native.js +52 -49
  62. package/dist/esm/Modal/ModalFocusTrap.native.js.map +6 -1
  63. package/dist/esm/Modal/ModalPortal.native.js +11 -9
  64. package/dist/esm/Modal/ModalPortal.native.js.map +6 -1
  65. package/dist/esm/Modal/index.native.js +45 -53
  66. package/dist/esm/Modal/index.native.js.map +6 -1
  67. package/dist/esm/NativeModules/index.native.js +6 -5
  68. package/dist/esm/NativeModules/index.native.js.map +6 -1
  69. package/dist/esm/PanResponder/Alternative.js +122 -157
  70. package/dist/esm/PanResponder/Alternative.js.map +6 -1
  71. package/dist/esm/PanResponder/index.native.js +5 -3
  72. package/dist/esm/PanResponder/index.native.js.map +6 -1
  73. package/dist/esm/PixelRatio/index.native.js +59 -48
  74. package/dist/esm/PixelRatio/index.native.js.map +6 -1
  75. package/dist/esm/Pressable/index.native.js +67 -70
  76. package/dist/esm/Pressable/index.native.js.map +6 -1
  77. package/dist/esm/RefreshControl/index.native.js +6 -4
  78. package/dist/esm/RefreshControl/index.native.js.map +6 -1
  79. package/dist/esm/SafeAreaView/index.native.js +21 -24
  80. package/dist/esm/SafeAreaView/index.native.js.map +6 -1
  81. package/dist/esm/ScrollView/ScrollViewBase.native.js +50 -61
  82. package/dist/esm/ScrollView/ScrollViewBase.native.js.map +6 -1
  83. package/dist/esm/ScrollView/index.native.js +211 -183
  84. package/dist/esm/ScrollView/index.native.js.map +6 -1
  85. package/dist/esm/Share/index.native.js +36 -29
  86. package/dist/esm/Share/index.native.js.map +6 -1
  87. package/dist/esm/StatusBar/index.native.js +6 -3
  88. package/dist/esm/StatusBar/index.native.js.map +6 -1
  89. package/dist/esm/Text/index.native.js +100 -128
  90. package/dist/esm/Text/index.native.js.map +6 -1
  91. package/dist/esm/Text/types.native.js +1 -2
  92. package/dist/esm/Text/types.native.js.map +6 -1
  93. package/dist/esm/TextInput/__tests__/index-test.native.js +259 -445
  94. package/dist/esm/TextInput/__tests__/index-test.native.js.map +6 -1
  95. package/dist/esm/TextInput/index.native.js +157 -220
  96. package/dist/esm/TextInput/index.native.js.map +6 -1
  97. package/dist/esm/TextInput/types.native.js +1 -2
  98. package/dist/esm/TextInput/types.native.js.map +6 -1
  99. package/dist/esm/TouchableOpacity.native.js +67 -63
  100. package/dist/esm/TouchableOpacity.native.js.map +6 -1
  101. package/dist/esm/TouchableWithoutFeedback.native.js +45 -49
  102. package/dist/esm/TouchableWithoutFeedback.native.js.map +6 -1
  103. package/dist/esm/UnimplementedView.native.js +30 -22
  104. package/dist/esm/UnimplementedView.native.js.map +6 -1
  105. package/dist/esm/Vibration/index.native.js +14 -14
  106. package/dist/esm/Vibration/index.native.js.map +6 -1
  107. package/dist/esm/View/index.native.js +55 -84
  108. package/dist/esm/View/index.native.js.map +6 -1
  109. package/dist/esm/View/types.native.js +1 -2
  110. package/dist/esm/View/types.native.js.map +6 -1
  111. package/dist/esm/createElement/__tests__/index-test.native.js +195 -398
  112. package/dist/esm/createElement/__tests__/index-test.native.js.map +6 -1
  113. package/dist/esm/createElement/index.native.js +14 -16
  114. package/dist/esm/createElement/index.native.js.map +6 -1
  115. package/dist/esm/createReactDOMStyle.native.js +4 -2
  116. package/dist/esm/createReactDOMStyle.native.js.map +6 -1
  117. package/dist/esm/findNodeHandle.native.js +7 -4
  118. package/dist/esm/findNodeHandle.native.js.map +6 -1
  119. package/dist/esm/index.native.js +133 -55
  120. package/dist/esm/index.native.js.map +6 -1
  121. package/dist/esm/render/index.native.js +9 -4
  122. package/dist/esm/render/index.native.js.map +6 -1
  123. package/dist/esm/styleTypes.native.js +1 -2
  124. package/dist/esm/styleTypes.native.js.map +6 -1
  125. package/dist/esm/types.native.js +1 -2
  126. package/dist/esm/types.native.js.map +6 -1
  127. package/dist/esm/useColorScheme/index.native.js +7 -7
  128. package/dist/esm/useColorScheme/index.native.js.map +6 -1
  129. package/dist/esm/useLocaleContext/index.native.js +4 -2
  130. package/dist/esm/useLocaleContext/index.native.js.map +6 -1
  131. package/dist/esm/useWindowDimensions/index.native.js +9 -9
  132. package/dist/esm/useWindowDimensions/index.native.js.map +6 -1
  133. package/dist/esm/vendor/react-native/Animated/Animated.native.js +17 -16
  134. package/dist/esm/vendor/react-native/Animated/Animated.native.js.map +6 -1
  135. package/dist/esm/vendor/react-native/Animated/AnimatedEvent.native.js +99 -72
  136. package/dist/esm/vendor/react-native/Animated/AnimatedEvent.native.js.map +6 -1
  137. package/dist/esm/vendor/react-native/Animated/AnimatedImplementation.native.js +436 -465
  138. package/dist/esm/vendor/react-native/Animated/AnimatedImplementation.native.js.map +6 -1
  139. package/dist/esm/vendor/react-native/Animated/AnimatedMock.native.js +91 -97
  140. package/dist/esm/vendor/react-native/Animated/AnimatedMock.native.js.map +6 -1
  141. package/dist/esm/vendor/react-native/Animated/AnimatedPlatformConfig.native.js +1 -2
  142. package/dist/esm/vendor/react-native/Animated/AnimatedPlatformConfig.native.js.map +6 -1
  143. package/dist/esm/vendor/react-native/Animated/Easing.native.js +231 -194
  144. package/dist/esm/vendor/react-native/Animated/Easing.native.js.map +6 -1
  145. package/dist/esm/vendor/react-native/Animated/NativeAnimatedHelper.native.js +222 -206
  146. package/dist/esm/vendor/react-native/Animated/NativeAnimatedHelper.native.js.map +6 -1
  147. package/dist/esm/vendor/react-native/Animated/NativeAnimatedModule.native.js +5 -3
  148. package/dist/esm/vendor/react-native/Animated/NativeAnimatedModule.native.js.map +6 -1
  149. package/dist/esm/vendor/react-native/Animated/NativeAnimatedTurboModule.native.js +5 -3
  150. package/dist/esm/vendor/react-native/Animated/NativeAnimatedTurboModule.native.js.map +6 -1
  151. package/dist/esm/vendor/react-native/Animated/SpringConfig.native.js +5 -5
  152. package/dist/esm/vendor/react-native/Animated/SpringConfig.native.js.map +6 -1
  153. package/dist/esm/vendor/react-native/Animated/animations/Animation.native.js +37 -25
  154. package/dist/esm/vendor/react-native/Animated/animations/Animation.native.js.map +6 -1
  155. package/dist/esm/vendor/react-native/Animated/animations/DecayAnimation.native.js +54 -42
  156. package/dist/esm/vendor/react-native/Animated/animations/DecayAnimation.native.js.map +6 -1
  157. package/dist/esm/vendor/react-native/Animated/animations/SpringAnimation.native.js +72 -72
  158. package/dist/esm/vendor/react-native/Animated/animations/SpringAnimation.native.js.map +6 -1
  159. package/dist/esm/vendor/react-native/Animated/animations/TimingAnimation.native.js +60 -45
  160. package/dist/esm/vendor/react-native/Animated/animations/TimingAnimation.native.js.map +6 -1
  161. package/dist/esm/vendor/react-native/Animated/bezier.native.js +20 -23
  162. package/dist/esm/vendor/react-native/Animated/bezier.native.js.map +6 -1
  163. package/dist/esm/vendor/react-native/Animated/components/AnimatedImage.native.js +6 -4
  164. package/dist/esm/vendor/react-native/Animated/components/AnimatedImage.native.js.map +6 -1
  165. package/dist/esm/vendor/react-native/Animated/components/AnimatedScrollView.native.js +13 -12
  166. package/dist/esm/vendor/react-native/Animated/components/AnimatedScrollView.native.js.map +6 -1
  167. package/dist/esm/vendor/react-native/Animated/components/AnimatedText.native.js +6 -4
  168. package/dist/esm/vendor/react-native/Animated/components/AnimatedText.native.js.map +6 -1
  169. package/dist/esm/vendor/react-native/Animated/components/AnimatedView.native.js +6 -4
  170. package/dist/esm/vendor/react-native/Animated/components/AnimatedView.native.js.map +6 -1
  171. package/dist/esm/vendor/react-native/Animated/createAnimatedComponent.native.js +11 -17
  172. package/dist/esm/vendor/react-native/Animated/createAnimatedComponent.native.js.map +6 -1
  173. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedAddition.native.js +55 -39
  174. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedAddition.native.js.map +6 -1
  175. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedColor.native.js +197 -180
  176. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedColor.native.js.map +6 -1
  177. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedDiffClamp.native.js +51 -39
  178. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedDiffClamp.native.js.map +6 -1
  179. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedDivision.native.js +57 -42
  180. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedDivision.native.js.map +6 -1
  181. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedInterpolation.native.js +116 -99
  182. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedInterpolation.native.js.map +6 -1
  183. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedModulo.native.js +50 -37
  184. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedModulo.native.js.map +6 -1
  185. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedMultiplication.native.js +55 -39
  186. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedMultiplication.native.js.map +6 -1
  187. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedNode.native.js +89 -61
  188. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedNode.native.js.map +6 -1
  189. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedProps.native.js +70 -52
  190. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedProps.native.js.map +6 -1
  191. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedStyle.native.js +68 -50
  192. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedStyle.native.js.map +6 -1
  193. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedSubtraction.native.js +55 -39
  194. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedSubtraction.native.js.map +6 -1
  195. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedTracking.native.js +53 -41
  196. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedTracking.native.js.map +6 -1
  197. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedTransform.native.js +57 -44
  198. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedTransform.native.js.map +6 -1
  199. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedValue.native.js +99 -70
  200. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedValue.native.js.map +6 -1
  201. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedValueXY.native.js +82 -64
  202. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedValueXY.native.js.map +6 -1
  203. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedWithChildren.native.js +53 -40
  204. package/dist/esm/vendor/react-native/Animated/nodes/AnimatedWithChildren.native.js.map +6 -1
  205. package/dist/esm/vendor/react-native/Animated/useAnimatedProps.native.js +58 -50
  206. package/dist/esm/vendor/react-native/Animated/useAnimatedProps.native.js.map +6 -1
  207. package/dist/esm/vendor/react-native/FeatureFlags.native.js +10 -8
  208. package/dist/esm/vendor/react-native/FeatureFlags.native.js.map +6 -1
  209. package/dist/esm/vendor/react-native/NativeEventEmitter/RCTDeviceEventEmitter.native.js +5 -3
  210. package/dist/esm/vendor/react-native/NativeEventEmitter/RCTDeviceEventEmitter.native.js.map +6 -1
  211. package/dist/esm/vendor/react-native/NativeEventEmitter/index.native.js +55 -46
  212. package/dist/esm/vendor/react-native/NativeEventEmitter/index.native.js.map +6 -1
  213. package/dist/esm/vendor/react-native/PanResponder/index.native.js +219 -224
  214. package/dist/esm/vendor/react-native/PanResponder/index.native.js.map +6 -1
  215. package/dist/esm/vendor/react-native/TouchHistoryMath/index.native.js +81 -58
  216. package/dist/esm/vendor/react-native/TouchHistoryMath/index.native.js.map +6 -1
  217. package/dist/esm/vendor/react-native/TurboModule/RCTExport.native.js +1 -2
  218. package/dist/esm/vendor/react-native/TurboModule/RCTExport.native.js.map +6 -1
  219. package/dist/esm/vendor/react-native/TurboModule/TurboModuleRegistry.native.js +5 -2
  220. package/dist/esm/vendor/react-native/TurboModule/TurboModuleRegistry.native.js.map +6 -1
  221. package/dist/esm/vendor/react-native/Types/CoreEventTypes.native.js +1 -2
  222. package/dist/esm/vendor/react-native/Types/CoreEventTypes.native.js.map +6 -1
  223. package/dist/esm/vendor/react-native/Utilities/setAndForwardRef.native.js +6 -5
  224. package/dist/esm/vendor/react-native/Utilities/setAndForwardRef.native.js.map +6 -1
  225. package/dist/esm/vendor/react-native/emitter/EventEmitter.native.js +5 -3
  226. package/dist/esm/vendor/react-native/emitter/EventEmitter.native.js.map +6 -1
  227. package/dist/esm/vendor/react-native/emitter/EventSubscription.native.js +1 -2
  228. package/dist/esm/vendor/react-native/emitter/EventSubscription.native.js.map +6 -1
  229. package/dist/esm/vendor/react-native/emitter/_EmitterSubscription.native.js +33 -24
  230. package/dist/esm/vendor/react-native/emitter/_EmitterSubscription.native.js.map +6 -1
  231. package/dist/esm/vendor/react-native/emitter/_EventEmitter.native.js +51 -41
  232. package/dist/esm/vendor/react-native/emitter/_EventEmitter.native.js.map +6 -1
  233. package/dist/esm/vendor/react-native/emitter/_EventSubscription.native.js +16 -12
  234. package/dist/esm/vendor/react-native/emitter/_EventSubscription.native.js.map +6 -1
  235. package/dist/esm/vendor/react-native/emitter/_EventSubscriptionVendor.native.js +26 -21
  236. package/dist/esm/vendor/react-native/emitter/_EventSubscriptionVendor.native.js.map +6 -1
  237. package/dist/esm/vendor/react-native/infoLog/index.native.js +6 -3
  238. package/dist/esm/vendor/react-native/infoLog/index.native.js.map +6 -1
  239. package/dist/esm/vendor/react-native/useRefEffect.native.js +8 -4
  240. package/dist/esm/vendor/react-native/useRefEffect.native.js.map +6 -1
  241. package/dist/esm/without-animated.native.js +115 -52
  242. package/dist/esm/without-animated.native.js.map +6 -1
  243. package/package.json +6 -6
@@ -10,13 +10,13 @@ function findInput(container) {
10
10
  function findTextArea(container) {
11
11
  return container.querySelector("textarea");
12
12
  }
13
- var testIfDocumentIsFocused = function (message, fn) {
14
- document.hasFocus && document.hasFocus() ? test(message, fn) : test.skip(`${message} \u2013 document is not focused`, function () {});
13
+ var testIfDocumentIsFocused = function(message, fn) {
14
+ document.hasFocus && document.hasFocus() ? test(message, fn) : test.skip(`${message} \u2013 document is not focused`, function() {
15
+ });
15
16
  };
16
17
  function createEvent(type) {
17
- var data = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {},
18
- event = document.createEvent("CustomEvent");
19
- return event.initCustomEvent(type, !0, !0), data != null && Object.keys(data).forEach(function (key) {
18
+ var data = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, event = document.createEvent("CustomEvent");
19
+ return event.initCustomEvent(type, !0, !0), data != null && Object.keys(data).forEach(function(key) {
20
20
  var value = data[key];
21
21
  key === "timeStamp" && !value || Object.defineProperty(event, key, {
22
22
  value
@@ -24,16 +24,8 @@ function createEvent(type) {
24
24
  }), event;
25
25
  }
26
26
  function createKeyboardEvent(type) {
27
- var {
28
- altKey = !1,
29
- ctrlKey = !1,
30
- isComposing = !1,
31
- key = "",
32
- keyCode = 0,
33
- metaKey = !1,
34
- preventDefault = function () {},
35
- shiftKey = !1
36
- } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
27
+ var { altKey = !1, ctrlKey = !1, isComposing = !1, key = "", keyCode = 0, metaKey = !1, preventDefault = function() {
28
+ }, shiftKey = !1 } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
37
29
  return createEvent(type, {
38
30
  altKey,
39
31
  ctrlKey,
@@ -48,276 +40,185 @@ function createKeyboardEvent(type) {
48
40
  function keydown(payload) {
49
41
  return createKeyboardEvent("keydown", payload);
50
42
  }
51
- describe("components/TextInput", function () {
52
- describe('prop "autoComplete"', function () {
53
- test('value "on"', function () {
54
- var {
55
- container
56
- } = render(/* @__PURE__ */_jsx(TextInput, {})),
57
- input = findInput(container);
43
+ describe("components/TextInput", function() {
44
+ describe('prop "autoComplete"', function() {
45
+ test('value "on"', function() {
46
+ var { container } = render(/* @__PURE__ */ _jsx(TextInput, {})), input = findInput(container);
58
47
  expect(input.getAttribute("autoComplete")).toEqual("on");
59
- }), test('value "off"', function () {
60
- var {
61
- container
62
- } = render(/* @__PURE__ */_jsx(TextInput, {
63
- autoComplete: "off"
64
- })),
65
- input = findInput(container);
48
+ }), test('value "off"', function() {
49
+ var { container } = render(/* @__PURE__ */ _jsx(TextInput, {
50
+ autoComplete: "off"
51
+ })), input = findInput(container);
66
52
  expect(input.getAttribute("autoComplete")).toEqual("off");
67
- }), test("autoCompleteType fallback", function () {
68
- var {
69
- container
70
- } = render(/* @__PURE__ */_jsx(TextInput, {
71
- autoCompleteType: "off"
72
- })),
73
- input = findInput(container);
53
+ }), test("autoCompleteType fallback", function() {
54
+ var { container } = render(/* @__PURE__ */ _jsx(TextInput, {
55
+ autoCompleteType: "off"
56
+ })), input = findInput(container);
74
57
  expect(input.getAttribute("autoComplete")).toEqual("off");
75
58
  });
76
- }), describe('prop "autoFocus"', function () {
77
- test('value "false"', function () {
78
- var {
79
- container
80
- } = render(/* @__PURE__ */_jsx(TextInput, {})),
81
- input = findInput(container);
59
+ }), describe('prop "autoFocus"', function() {
60
+ test('value "false"', function() {
61
+ var { container } = render(/* @__PURE__ */ _jsx(TextInput, {})), input = findInput(container);
82
62
  expect(document.activeElement).not.toBe(input);
83
- }), test('value "true"', function () {
84
- var {
85
- container
86
- } = render(/* @__PURE__ */_jsx(TextInput, {
87
- autoFocus: !0
88
- })),
89
- input = findInput(container);
63
+ }), test('value "true"', function() {
64
+ var { container } = render(/* @__PURE__ */ _jsx(TextInput, {
65
+ autoFocus: !0
66
+ })), input = findInput(container);
90
67
  expect(document.activeElement).toBe(input);
91
68
  });
92
- }), describe('prop "clearTextOnFocus"', function () {
69
+ }), describe('prop "clearTextOnFocus"', function() {
93
70
  var defaultValue = "defaultValue";
94
- testIfDocumentIsFocused('value "false"', function () {
95
- var {
96
- container
97
- } = render(/* @__PURE__ */_jsx(TextInput, {
98
- defaultValue
99
- })),
100
- input = findInput(container);
71
+ testIfDocumentIsFocused('value "false"', function() {
72
+ var { container } = render(/* @__PURE__ */ _jsx(TextInput, {
73
+ defaultValue
74
+ })), input = findInput(container);
101
75
  input.focus(), expect(input.node.value).toEqual(defaultValue);
102
- }), testIfDocumentIsFocused('value "true"', function () {
103
- var {
104
- container
105
- } = render(/* @__PURE__ */_jsx(TextInput, {
106
- clearTextOnFocus: !0,
107
- defaultValue
108
- })),
109
- input = findInput(container);
76
+ }), testIfDocumentIsFocused('value "true"', function() {
77
+ var { container } = render(/* @__PURE__ */ _jsx(TextInput, {
78
+ clearTextOnFocus: !0,
79
+ defaultValue
80
+ })), input = findInput(container);
110
81
  input.focus(), expect(input.node.value).toEqual("");
111
82
  });
112
- }), test('prop "defaultValue"', function () {
113
- var defaultValue = "defaultValue",
114
- {
115
- container
116
- } = render(/* @__PURE__ */_jsx(TextInput, {
117
- defaultValue
118
- })),
119
- input = findInput(container);
83
+ }), test('prop "defaultValue"', function() {
84
+ var defaultValue = "defaultValue", { container } = render(/* @__PURE__ */ _jsx(TextInput, {
85
+ defaultValue
86
+ })), input = findInput(container);
120
87
  expect(input.value).toEqual(defaultValue);
121
- }), describe('prop "disabled"', function () {
122
- test('value "false"', function () {
123
- var {
124
- container
125
- } = render(/* @__PURE__ */_jsx(TextInput, {})),
126
- input = findInput(container);
88
+ }), describe('prop "disabled"', function() {
89
+ test('value "false"', function() {
90
+ var { container } = render(/* @__PURE__ */ _jsx(TextInput, {})), input = findInput(container);
127
91
  expect(input.disabled).toEqual(!1);
128
- }), test('value "true"', function () {
129
- var {
130
- container
131
- } = render(/* @__PURE__ */_jsx(TextInput, {
132
- disabled: !0
133
- })),
134
- input = findInput(container);
92
+ }), test('value "true"', function() {
93
+ var { container } = render(/* @__PURE__ */ _jsx(TextInput, {
94
+ disabled: !0
95
+ })), input = findInput(container);
135
96
  expect(input.disabled).toEqual(!0);
136
97
  });
137
- }), describe('prop "editable"', function () {
138
- test('value "true"', function () {
139
- var {
140
- container
141
- } = render(/* @__PURE__ */_jsx(TextInput, {})),
142
- input = findInput(container);
98
+ }), describe('prop "editable"', function() {
99
+ test('value "true"', function() {
100
+ var { container } = render(/* @__PURE__ */ _jsx(TextInput, {})), input = findInput(container);
143
101
  expect(input.readOnly).toEqual(!1);
144
- }), test('value "false"', function () {
145
- var {
146
- container
147
- } = render(/* @__PURE__ */_jsx(TextInput, {
148
- editable: !1
149
- })),
150
- input = findInput(container);
102
+ }), test('value "false"', function() {
103
+ var { container } = render(/* @__PURE__ */ _jsx(TextInput, {
104
+ editable: !1
105
+ })), input = findInput(container);
151
106
  expect(input.readOnly).toEqual(!0);
152
107
  });
153
- }), describe('prop "keyboardType"', function () {
154
- test("default value", function () {
155
- var {
156
- container
157
- } = render(/* @__PURE__ */_jsx(TextInput, {
158
- keyboardType: "default"
159
- })),
160
- input = findInput(container);
108
+ }), describe('prop "keyboardType"', function() {
109
+ test("default value", function() {
110
+ var { container } = render(/* @__PURE__ */ _jsx(TextInput, {
111
+ keyboardType: "default"
112
+ })), input = findInput(container);
161
113
  expect(input.type).toEqual("text");
162
- }), test('value "email-address"', function () {
163
- var {
164
- container
165
- } = render(/* @__PURE__ */_jsx(TextInput, {
166
- keyboardType: "email-address"
167
- })),
168
- input = findInput(container);
114
+ }), test('value "email-address"', function() {
115
+ var { container } = render(/* @__PURE__ */ _jsx(TextInput, {
116
+ keyboardType: "email-address"
117
+ })), input = findInput(container);
169
118
  expect(input.type).toEqual("email");
170
- }), test('value "decimal-pad"', function () {
171
- var {
172
- container
173
- } = render(/* @__PURE__ */_jsx(TextInput, {
174
- keyboardType: "decimal-pad"
175
- })),
176
- input = findInput(container);
119
+ }), test('value "decimal-pad"', function() {
120
+ var { container } = render(/* @__PURE__ */ _jsx(TextInput, {
121
+ keyboardType: "decimal-pad"
122
+ })), input = findInput(container);
177
123
  expect(input.inputMode).toEqual("decimal");
178
- }), test('value "number-pad"', function () {
179
- var {
180
- container
181
- } = render(/* @__PURE__ */_jsx(TextInput, {
182
- keyboardType: "number-pad"
183
- })),
184
- input = findInput(container);
124
+ }), test('value "number-pad"', function() {
125
+ var { container } = render(/* @__PURE__ */ _jsx(TextInput, {
126
+ keyboardType: "number-pad"
127
+ })), input = findInput(container);
185
128
  expect(input.inputMode).toEqual("numeric");
186
- }), test('value "numeric"', function () {
187
- var {
188
- container
189
- } = render(/* @__PURE__ */_jsx(TextInput, {
190
- keyboardType: "numeric"
191
- })),
192
- input = findInput(container);
129
+ }), test('value "numeric"', function() {
130
+ var { container } = render(/* @__PURE__ */ _jsx(TextInput, {
131
+ keyboardType: "numeric"
132
+ })), input = findInput(container);
193
133
  expect(input.inputMode).toEqual("numeric");
194
- }), test('value "phone-pad"', function () {
195
- var {
196
- container
197
- } = render(/* @__PURE__ */_jsx(TextInput, {
198
- keyboardType: "phone-pad"
199
- })),
200
- input = findInput(container);
134
+ }), test('value "phone-pad"', function() {
135
+ var { container } = render(/* @__PURE__ */ _jsx(TextInput, {
136
+ keyboardType: "phone-pad"
137
+ })), input = findInput(container);
201
138
  expect(input.type).toEqual("tel");
202
- }), test('value "url"', function () {
203
- var {
204
- container
205
- } = render(/* @__PURE__ */_jsx(TextInput, {
206
- keyboardType: "url"
207
- })),
208
- input = findInput(container);
139
+ }), test('value "url"', function() {
140
+ var { container } = render(/* @__PURE__ */ _jsx(TextInput, {
141
+ keyboardType: "url"
142
+ })), input = findInput(container);
209
143
  expect(input.type).toEqual("url");
210
144
  });
211
- }), test('prop "maxLength"', function () {
212
- var {
213
- container
214
- } = render(/* @__PURE__ */_jsx(TextInput, {})),
215
- input = findInput(container);
216
- expect(input.getAttribute("maxLength")).toEqual(null), {
217
- container
218
- } = render(/* @__PURE__ */_jsx(TextInput, {
145
+ }), test('prop "maxLength"', function() {
146
+ var { container } = render(/* @__PURE__ */ _jsx(TextInput, {})), input = findInput(container);
147
+ expect(input.getAttribute("maxLength")).toEqual(null), { container } = render(/* @__PURE__ */ _jsx(TextInput, {
219
148
  maxLength: 10
220
149
  })), input = findInput(container), expect(input.getAttribute("maxLength")).toEqual("10");
221
- }), describe('prop "multiline"', function () {
222
- test('value "false"', function () {
223
- var {
224
- container
225
- } = render(/* @__PURE__ */_jsx(TextInput, {})),
226
- input = findInput(container);
150
+ }), describe('prop "multiline"', function() {
151
+ test('value "false"', function() {
152
+ var { container } = render(/* @__PURE__ */ _jsx(TextInput, {})), input = findInput(container);
227
153
  expect(input).toBeDefined();
228
- }), test('value "true"', function () {
229
- var {
230
- container
231
- } = render(/* @__PURE__ */_jsx(TextInput, {
232
- multiline: !0
233
- })),
234
- textarea = findTextArea(container);
154
+ }), test('value "true"', function() {
155
+ var { container } = render(/* @__PURE__ */ _jsx(TextInput, {
156
+ multiline: !0
157
+ })), textarea = findTextArea(container);
235
158
  expect(textarea).toBeDefined();
236
159
  });
237
- }), describe('prop "numberOfLines"', function () {
238
- test('without "multiline"', function () {
239
- var {
240
- container
241
- } = render(/* @__PURE__ */_jsx(TextInput, {
242
- numberOfLines: 2
243
- })),
244
- input = findInput(container),
245
- textarea = findTextArea(container);
160
+ }), describe('prop "numberOfLines"', function() {
161
+ test('without "multiline"', function() {
162
+ var { container } = render(/* @__PURE__ */ _jsx(TextInput, {
163
+ numberOfLines: 2
164
+ })), input = findInput(container), textarea = findTextArea(container);
246
165
  expect(input).toBeDefined(), expect(textarea).toBeNull();
247
- }), test('with "multiline"', function () {
248
- var {
249
- container
250
- } = render(/* @__PURE__ */_jsx(TextInput, {
251
- multiline: !0,
252
- numberOfLines: 3
253
- })),
254
- textarea = findTextArea(container);
166
+ }), test('with "multiline"', function() {
167
+ var { container } = render(/* @__PURE__ */ _jsx(TextInput, {
168
+ multiline: !0,
169
+ numberOfLines: 3
170
+ })), textarea = findTextArea(container);
255
171
  expect(textarea.getAttribute("rows")).toEqual("3");
256
172
  });
257
- }), test('prop "onBlur"', function () {
258
- var onBlur = jest.fn(),
259
- ref = /* @__PURE__ */React.createRef();
260
- act(function () {
261
- render(/* @__PURE__ */_jsx(TextInput, {
173
+ }), test('prop "onBlur"', function() {
174
+ var onBlur = jest.fn(), ref = /* @__PURE__ */ React.createRef();
175
+ act(function() {
176
+ render(/* @__PURE__ */ _jsx(TextInput, {
262
177
  onBlur,
263
178
  ref
264
179
  }));
265
180
  });
266
- var target = createEventTarget(ref.current),
267
- body = createEventTarget(document.body);
268
- act(function () {
181
+ var target = createEventTarget(ref.current), body = createEventTarget(document.body);
182
+ act(function() {
269
183
  target.focus(), body.focus({
270
184
  relatedTarget: target.node
271
185
  });
272
186
  }), expect(onBlur).toHaveBeenCalledTimes(1), expect(TextInput.State.currentlyFocusedField()).toBe(null);
273
- }), test.skip('prop "onChange"', function () {
274
- var onChange = jest.fn(),
275
- {
276
- container
277
- } = render(/* @__PURE__ */_jsx(TextInput, {
278
- onChange
279
- })),
280
- input = findInput(container);
187
+ }), test.skip('prop "onChange"', function() {
188
+ var onChange = jest.fn(), { container } = render(/* @__PURE__ */ _jsx(TextInput, {
189
+ onChange
190
+ })), input = findInput(container);
281
191
  input.dispatchEvent(new window.Event("change", {
282
192
  bubbles: !0
283
193
  })), expect(onChange).toHaveBeenCalledTimes(1);
284
- }), test.skip('prop "onChangeText"', function () {
285
- var onChangeText = jest.fn(),
286
- {
287
- container
288
- } = render(/* @__PURE__ */_jsx(TextInput, {
289
- onChangeText
290
- })),
291
- input = findInput(container);
194
+ }), test.skip('prop "onChangeText"', function() {
195
+ var onChangeText = jest.fn(), { container } = render(/* @__PURE__ */ _jsx(TextInput, {
196
+ onChangeText
197
+ })), input = findInput(container);
292
198
  input.dispatchEvent(keydown({
293
199
  key: "a"
294
200
  })), input.dispatchEvent(new window.Event("change", {
295
201
  bubbles: !0
296
202
  })), expect(onChangeText).toHaveBeenCalledTimes(1), expect(onChangeText).toBeCalledWith("a");
297
- }), test('prop "onFocus"', function () {
298
- var onFocus = jest.fn(),
299
- ref = /* @__PURE__ */React.createRef();
300
- act(function () {
301
- render(/* @__PURE__ */_jsx(TextInput, {
203
+ }), test('prop "onFocus"', function() {
204
+ var onFocus = jest.fn(), ref = /* @__PURE__ */ React.createRef();
205
+ act(function() {
206
+ render(/* @__PURE__ */ _jsx(TextInput, {
302
207
  onFocus,
303
208
  ref
304
209
  }));
305
210
  });
306
211
  var target = createEventTarget(ref.current);
307
- act(function () {
212
+ act(function() {
308
213
  target.focus();
309
214
  }), expect(onFocus).toHaveBeenCalledTimes(1), target.node.focus(), expect(TextInput.State.currentlyFocusedField()).toBe(target.node);
310
- }), describe('prop "onKeyPress"', function () {
311
- test("arrow key", function () {
312
- var onKeyPress = jest.fn(function (e) {
313
- e.persist();
314
- }),
315
- {
316
- container
317
- } = render(/* @__PURE__ */_jsx(TextInput, {
318
- onKeyPress
319
- })),
320
- input = findInput(container);
215
+ }), describe('prop "onKeyPress"', function() {
216
+ test("arrow key", function() {
217
+ var onKeyPress = jest.fn(function(e) {
218
+ e.persist();
219
+ }), { container } = render(/* @__PURE__ */ _jsx(TextInput, {
220
+ onKeyPress
221
+ })), input = findInput(container);
321
222
  input.dispatchEvent(keydown({
322
223
  key: "ArrowLeft"
323
224
  })), expect(onKeyPress).toHaveBeenCalledTimes(1), expect(onKeyPress).toBeCalledWith(expect.objectContaining({
@@ -330,16 +231,12 @@ describe("components/TextInput", function () {
330
231
  target: expect.anything()
331
232
  })
332
233
  }));
333
- }), test("backspace key", function () {
334
- var onKeyPress = jest.fn(function (e) {
335
- e.persist();
336
- }),
337
- {
338
- container
339
- } = render(/* @__PURE__ */_jsx(TextInput, {
340
- onKeyPress
341
- })),
342
- input = findInput(container);
234
+ }), test("backspace key", function() {
235
+ var onKeyPress = jest.fn(function(e) {
236
+ e.persist();
237
+ }), { container } = render(/* @__PURE__ */ _jsx(TextInput, {
238
+ onKeyPress
239
+ })), input = findInput(container);
343
240
  input.dispatchEvent(keydown({
344
241
  key: "Backspace"
345
242
  })), expect(onKeyPress).toHaveBeenCalledTimes(1), expect(onKeyPress).toBeCalledWith(expect.objectContaining({
@@ -352,16 +249,12 @@ describe("components/TextInput", function () {
352
249
  target: expect.anything()
353
250
  })
354
251
  }));
355
- }), test("enter key", function () {
356
- var onKeyPress = jest.fn(function (e) {
357
- e.persist();
358
- }),
359
- {
360
- container
361
- } = render(/* @__PURE__ */_jsx(TextInput, {
362
- onKeyPress
363
- })),
364
- input = findInput(container);
252
+ }), test("enter key", function() {
253
+ var onKeyPress = jest.fn(function(e) {
254
+ e.persist();
255
+ }), { container } = render(/* @__PURE__ */ _jsx(TextInput, {
256
+ onKeyPress
257
+ })), input = findInput(container);
365
258
  input.dispatchEvent(keydown({
366
259
  key: "Enter"
367
260
  })), expect(onKeyPress).toHaveBeenCalledTimes(1), expect(onKeyPress).toBeCalledWith(expect.objectContaining({
@@ -374,16 +267,12 @@ describe("components/TextInput", function () {
374
267
  target: expect.anything()
375
268
  })
376
269
  }));
377
- }), test("escape key", function () {
378
- var onKeyPress = jest.fn(function (e) {
379
- e.persist();
380
- }),
381
- {
382
- container
383
- } = render(/* @__PURE__ */_jsx(TextInput, {
384
- onKeyPress
385
- })),
386
- input = findInput(container);
270
+ }), test("escape key", function() {
271
+ var onKeyPress = jest.fn(function(e) {
272
+ e.persist();
273
+ }), { container } = render(/* @__PURE__ */ _jsx(TextInput, {
274
+ onKeyPress
275
+ })), input = findInput(container);
387
276
  input.dispatchEvent(keydown({
388
277
  key: "Escape"
389
278
  })), expect(onKeyPress).toHaveBeenCalledTimes(1), expect(onKeyPress).toBeCalledWith(expect.objectContaining({
@@ -396,16 +285,12 @@ describe("components/TextInput", function () {
396
285
  target: expect.anything()
397
286
  })
398
287
  }));
399
- }), test("space key", function () {
400
- var onKeyPress = jest.fn(function (e) {
401
- e.persist();
402
- }),
403
- {
404
- container
405
- } = render(/* @__PURE__ */_jsx(TextInput, {
406
- onKeyPress
407
- })),
408
- input = findInput(container);
288
+ }), test("space key", function() {
289
+ var onKeyPress = jest.fn(function(e) {
290
+ e.persist();
291
+ }), { container } = render(/* @__PURE__ */ _jsx(TextInput, {
292
+ onKeyPress
293
+ })), input = findInput(container);
409
294
  input.dispatchEvent(keydown({
410
295
  key: " "
411
296
  })), expect(onKeyPress).toHaveBeenCalledTimes(1), expect(onKeyPress).toBeCalledWith(expect.objectContaining({
@@ -418,16 +303,12 @@ describe("components/TextInput", function () {
418
303
  target: expect.anything()
419
304
  })
420
305
  }));
421
- }), test("tab key", function () {
422
- var onKeyPress = jest.fn(function (e) {
423
- e.persist();
424
- }),
425
- {
426
- container
427
- } = render(/* @__PURE__ */_jsx(TextInput, {
428
- onKeyPress
429
- })),
430
- input = findInput(container);
306
+ }), test("tab key", function() {
307
+ var onKeyPress = jest.fn(function(e) {
308
+ e.persist();
309
+ }), { container } = render(/* @__PURE__ */ _jsx(TextInput, {
310
+ onKeyPress
311
+ })), input = findInput(container);
431
312
  input.dispatchEvent(keydown({
432
313
  key: "Tab"
433
314
  })), expect(onKeyPress).toHaveBeenCalledTimes(1), expect(onKeyPress).toBeCalledWith(expect.objectContaining({
@@ -440,16 +321,12 @@ describe("components/TextInput", function () {
440
321
  target: expect.anything()
441
322
  })
442
323
  }));
443
- }), test("text key", function () {
444
- var onKeyPress = jest.fn(function (e) {
445
- e.persist();
446
- }),
447
- {
448
- container
449
- } = render(/* @__PURE__ */_jsx(TextInput, {
450
- onKeyPress
451
- })),
452
- input = findInput(container);
324
+ }), test("text key", function() {
325
+ var onKeyPress = jest.fn(function(e) {
326
+ e.persist();
327
+ }), { container } = render(/* @__PURE__ */ _jsx(TextInput, {
328
+ onKeyPress
329
+ })), input = findInput(container);
453
330
  input.dispatchEvent(keydown({
454
331
  key: "a"
455
332
  })), expect(onKeyPress).toHaveBeenCalledTimes(1), expect(onKeyPress).toBeCalledWith(expect.objectContaining({
@@ -462,16 +339,12 @@ describe("components/TextInput", function () {
462
339
  target: expect.anything()
463
340
  })
464
341
  }));
465
- }), test("modifier keys are included", function () {
466
- var onKeyPress = jest.fn(function (e) {
467
- e.persist();
468
- }),
469
- {
470
- container
471
- } = render(/* @__PURE__ */_jsx(TextInput, {
472
- onKeyPress
473
- })),
474
- input = findInput(container);
342
+ }), test("modifier keys are included", function() {
343
+ var onKeyPress = jest.fn(function(e) {
344
+ e.persist();
345
+ }), { container } = render(/* @__PURE__ */ _jsx(TextInput, {
346
+ onKeyPress
347
+ })), input = findInput(container);
475
348
  input.dispatchEvent(keydown({
476
349
  altKey: !0,
477
350
  ctrlKey: !0,
@@ -488,70 +361,52 @@ describe("components/TextInput", function () {
488
361
  target: expect.anything()
489
362
  })
490
363
  }));
491
- }), test('meta key + Enter calls "onKeyPress"', function () {
492
- var onKeyPress = jest.fn(function (e) {
493
- e.persist();
494
- }),
495
- {
496
- container
497
- } = render(/* @__PURE__ */_jsx(TextInput, {
498
- onKeyPress
499
- })),
500
- input = findInput(container);
364
+ }), test('meta key + Enter calls "onKeyPress"', function() {
365
+ var onKeyPress = jest.fn(function(e) {
366
+ e.persist();
367
+ }), { container } = render(/* @__PURE__ */ _jsx(TextInput, {
368
+ onKeyPress
369
+ })), input = findInput(container);
501
370
  input.dispatchEvent(keydown({
502
371
  metaKey: !0,
503
372
  key: "Enter"
504
373
  })), expect(onKeyPress).toHaveBeenCalledTimes(1);
505
374
  });
506
- }), describe('prop "onSelectionChange"', function () {
507
- test("is called on select", function () {
508
- var {
509
- container
510
- } = render(/* @__PURE__ */_jsx(TextInput, {
511
- defaultValue: "12345",
512
- onSelectionChange
513
- })),
514
- input = findInput(container);
375
+ }), describe('prop "onSelectionChange"', function() {
376
+ test("is called on select", function() {
377
+ var { container } = render(/* @__PURE__ */ _jsx(TextInput, {
378
+ defaultValue: "12345",
379
+ onSelectionChange
380
+ })), input = findInput(container);
515
381
  input.selectionStart = 0, input.selectionEnd = 3, input.dispatchEvent(new window.Event("select", {}));
516
382
  function onSelectionChange(e) {
517
383
  expect(e.nativeEvent.selection.end).toEqual(3), expect(e.nativeEvent.selection.start).toEqual(0);
518
384
  }
519
- }), test.skip("is called on change", function () {
520
- var onSelectionChange = jest.fn(),
521
- {
522
- container
523
- } = render(/* @__PURE__ */_jsx(TextInput, {
524
- onSelectionChange
525
- })),
526
- input = findInput(container);
385
+ }), test.skip("is called on change", function() {
386
+ var onSelectionChange = jest.fn(), { container } = render(/* @__PURE__ */ _jsx(TextInput, {
387
+ onSelectionChange
388
+ })), input = findInput(container);
527
389
  input.dispatchEvent(new window.Event("input", {
528
390
  bubbles: !0
529
391
  })), expect(onSelectionChange).toHaveBeenCalledTimes(1);
530
392
  });
531
- }), describe('prop "onSubmitEditing"', function () {
532
- test("single-line input", function (done) {
533
- var {
534
- container
535
- } = render(/* @__PURE__ */_jsx(TextInput, {
536
- defaultValue: "12345",
537
- onSubmitEditing
538
- })),
539
- input = findInput(container);
393
+ }), describe('prop "onSubmitEditing"', function() {
394
+ test("single-line input", function(done) {
395
+ var { container } = render(/* @__PURE__ */ _jsx(TextInput, {
396
+ defaultValue: "12345",
397
+ onSubmitEditing
398
+ })), input = findInput(container);
540
399
  input.dispatchEvent(keydown({
541
400
  key: "Enter"
542
401
  }));
543
402
  function onSubmitEditing(e) {
544
403
  expect(e.nativeEvent.target).toBeDefined(), expect(e.nativeEvent.text).toBe("12345"), done();
545
404
  }
546
- }), test("single-line input while composing", function () {
547
- var onSubmitEditing = jest.fn(),
548
- {
549
- container
550
- } = render(/* @__PURE__ */_jsx(TextInput, {
551
- defaultValue: "12345",
552
- onSubmitEditing
553
- })),
554
- input = findInput(container);
405
+ }), test("single-line input while composing", function() {
406
+ var onSubmitEditing = jest.fn(), { container } = render(/* @__PURE__ */ _jsx(TextInput, {
407
+ defaultValue: "12345",
408
+ onSubmitEditing
409
+ })), input = findInput(container);
555
410
  input.dispatchEvent(keydown({
556
411
  key: "Enter",
557
412
  isComposing: !0,
@@ -561,31 +416,22 @@ describe("components/TextInput", function () {
561
416
  isComposing: !1,
562
417
  keyCode: 229
563
418
  })), expect(onSubmitEditing).not.toHaveBeenCalled();
564
- }), test("multi-line input", function () {
565
- var onSubmitEditing = jest.fn(),
566
- {
567
- container
568
- } = render(/* @__PURE__ */_jsx(TextInput, {
569
- defaultValue: "12345",
570
- multiline: !0,
571
- onSubmitEditing
572
- })),
573
- textarea = findTextArea(container);
419
+ }), test("multi-line input", function() {
420
+ var onSubmitEditing = jest.fn(), { container } = render(/* @__PURE__ */ _jsx(TextInput, {
421
+ defaultValue: "12345",
422
+ multiline: !0,
423
+ onSubmitEditing
424
+ })), textarea = findTextArea(container);
574
425
  textarea.dispatchEvent(keydown({
575
426
  key: "Enter"
576
427
  })), expect(onSubmitEditing).not.toHaveBeenCalled();
577
- }), test('multi-line input with "blurOnSubmit" triggers "onSubmitEditing"', function () {
578
- var onSubmitEditing = jest.fn(),
579
- preventDefault = jest.fn(),
580
- {
581
- container
582
- } = render(/* @__PURE__ */_jsx(TextInput, {
583
- blurOnSubmit: !0,
584
- defaultValue: "12345",
585
- multiline: !0,
586
- onSubmitEditing
587
- })),
588
- textarea = findTextArea(container);
428
+ }), test('multi-line input with "blurOnSubmit" triggers "onSubmitEditing"', function() {
429
+ var onSubmitEditing = jest.fn(), preventDefault = jest.fn(), { container } = render(/* @__PURE__ */ _jsx(TextInput, {
430
+ blurOnSubmit: !0,
431
+ defaultValue: "12345",
432
+ multiline: !0,
433
+ onSubmitEditing
434
+ })), textarea = findTextArea(container);
589
435
  textarea.dispatchEvent(keydown({
590
436
  key: "Enter",
591
437
  preventDefault,
@@ -597,107 +443,75 @@ describe("components/TextInput", function () {
597
443
  preventDefault
598
444
  })), expect(onSubmitEditing).toHaveBeenCalledTimes(1), expect(preventDefault).toHaveBeenCalledTimes(1);
599
445
  });
600
- }), test('prop "returnKeyType"', function () {
601
- var returnKeyType = "previous",
602
- {
603
- container
604
- } = render(/* @__PURE__ */_jsx(TextInput, {
605
- returnKeyType
606
- })),
607
- input = findInput(container);
446
+ }), test('prop "returnKeyType"', function() {
447
+ var returnKeyType = "previous", { container } = render(/* @__PURE__ */ _jsx(TextInput, {
448
+ returnKeyType
449
+ })), input = findInput(container);
608
450
  expect(input.getAttribute("enterkeyhint")).toEqual(returnKeyType);
609
- }), test('prop "secureTextEntry"', function () {
610
- var {
611
- container
612
- } = render(/* @__PURE__ */_jsx(TextInput, {
613
- secureTextEntry: !0
614
- })),
615
- input = findInput(container);
616
- expect(input.getAttribute("type")).toEqual("password"), {
617
- container
618
- } = render(/* @__PURE__ */_jsx(TextInput, {
451
+ }), test('prop "secureTextEntry"', function() {
452
+ var { container } = render(/* @__PURE__ */ _jsx(TextInput, {
453
+ secureTextEntry: !0
454
+ })), input = findInput(container);
455
+ expect(input.getAttribute("type")).toEqual("password"), { container } = render(/* @__PURE__ */ _jsx(TextInput, {
619
456
  multiline: !0,
620
457
  secureTextEntry: !0
621
458
  }));
622
459
  var textarea = findTextArea(container);
623
460
  expect(textarea.getAttribute("type")).toEqual(null);
624
- }), describe('prop "selectTextOnFocus"', function () {
625
- testIfDocumentIsFocused('value "false"', function () {
626
- var {
627
- container
628
- } = render(/* @__PURE__ */_jsx(TextInput, {
629
- defaultValue: "text"
630
- })),
631
- input = findInput(container);
461
+ }), describe('prop "selectTextOnFocus"', function() {
462
+ testIfDocumentIsFocused('value "false"', function() {
463
+ var { container } = render(/* @__PURE__ */ _jsx(TextInput, {
464
+ defaultValue: "text"
465
+ })), input = findInput(container);
632
466
  input.focus(), expect(input.selectionEnd).toEqual(4), expect(input.selectionStart).toEqual(4);
633
467
  });
634
- }), describe('prop "selection"', function () {
635
- test("set cursor location", function () {
468
+ }), describe('prop "selection"', function() {
469
+ test("set cursor location", function() {
636
470
  var cursorLocation = {
637
- start: 3,
638
- end: 3
639
- },
640
- {
641
- container: defaultContainer
642
- } = render(/* @__PURE__ */_jsx(TextInput, {
643
- defaultValue: "12345"
644
- })),
645
- inputDefaultSelection = findInput(defaultContainer);
471
+ start: 3,
472
+ end: 3
473
+ }, { container: defaultContainer } = render(/* @__PURE__ */ _jsx(TextInput, {
474
+ defaultValue: "12345"
475
+ })), inputDefaultSelection = findInput(defaultContainer);
646
476
  expect(inputDefaultSelection.selectionStart).toEqual(5), expect(inputDefaultSelection.selectionEnd).toEqual(5);
647
- var {
648
- container: customContainer
649
- } = render(/* @__PURE__ */_jsx(TextInput, {
650
- defaultValue: "12345",
651
- selection: cursorLocation
652
- })),
653
- inputCustomSelection = findInput(customContainer);
477
+ var { container: customContainer } = render(/* @__PURE__ */ _jsx(TextInput, {
478
+ defaultValue: "12345",
479
+ selection: cursorLocation
480
+ })), inputCustomSelection = findInput(customContainer);
654
481
  expect(inputCustomSelection.selectionStart).toEqual(cursorLocation.start), expect(inputCustomSelection.selectionEnd).toEqual(cursorLocation.end);
655
482
  });
656
- }), describe('prop "spellCheck"', function () {
657
- test("default value", function () {
658
- var {
659
- container
660
- } = render(/* @__PURE__ */_jsx(TextInput, {})),
661
- input = findInput(container);
483
+ }), describe('prop "spellCheck"', function() {
484
+ test("default value", function() {
485
+ var { container } = render(/* @__PURE__ */ _jsx(TextInput, {})), input = findInput(container);
662
486
  expect(input.getAttribute("spellCheck")).toEqual("true");
663
- }), test('inherit from "autoCorrect"', function () {
664
- var {
665
- container
666
- } = render(/* @__PURE__ */_jsx(TextInput, {
667
- autoCorrect: !1
668
- })),
669
- input = findInput(container);
487
+ }), test('inherit from "autoCorrect"', function() {
488
+ var { container } = render(/* @__PURE__ */ _jsx(TextInput, {
489
+ autoCorrect: !1
490
+ })), input = findInput(container);
670
491
  expect(input.getAttribute("spellCheck")).toEqual("false");
671
- }), test('value "false"', function () {
672
- var {
673
- container
674
- } = render(/* @__PURE__ */_jsx(TextInput, {
675
- spellCheck: !1
676
- })),
677
- input = findInput(container);
492
+ }), test('value "false"', function() {
493
+ var { container } = render(/* @__PURE__ */ _jsx(TextInput, {
494
+ spellCheck: !1
495
+ })), input = findInput(container);
678
496
  expect(input.getAttribute("spellCheck")).toEqual("false");
679
497
  });
680
- }), test('prop "value"', function () {
681
- var value = "value",
682
- {
683
- container
684
- } = render(/* @__PURE__ */_jsx(TextInput, {
685
- value
686
- })),
687
- input = findInput(container);
498
+ }), test('prop "value"', function() {
499
+ var value = "value", { container } = render(/* @__PURE__ */ _jsx(TextInput, {
500
+ value
501
+ })), input = findInput(container);
688
502
  expect(input.value).toEqual(value);
689
- }), describe("imperative methods", function () {
690
- test("node.clear()", function () {
691
- var ref = /* @__PURE__ */React.createRef();
692
- render(/* @__PURE__ */_jsx(TextInput, {
503
+ }), describe("imperative methods", function() {
504
+ test("node.clear()", function() {
505
+ var ref = /* @__PURE__ */ React.createRef();
506
+ render(/* @__PURE__ */ _jsx(TextInput, {
693
507
  ref
694
508
  })), expect(typeof ref.current.clear).toBe("function");
695
- }), test("node.isFocused()", function () {
696
- var ref = /* @__PURE__ */React.createRef();
697
- render(/* @__PURE__ */_jsx(TextInput, {
509
+ }), test("node.isFocused()", function() {
510
+ var ref = /* @__PURE__ */ React.createRef();
511
+ render(/* @__PURE__ */ _jsx(TextInput, {
698
512
  ref
699
513
  })), expect(typeof ref.current.isFocused).toBe("function");
700
514
  });
701
515
  });
702
516
  });
703
- //# sourceMappingURL=index-test.native.js.map
517
+ //# sourceMappingURL=index-test.js.map