@jobber/components-native 0.84.4-match-mobi-55ef4ec.7 → 0.84.4-match-mobi-540af48.10

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 (313) hide show
  1. package/dist/package.json +26 -15
  2. package/dist/src/ActionItem/ActionItemGroup.js +1 -1
  3. package/dist/src/AutoLink/components/Link/Link.js +1 -1
  4. package/dist/src/Banner/Banner.js +2 -0
  5. package/dist/src/Banner/components/BannerIcon/BannerIcon.style.js +3 -0
  6. package/dist/src/BottomSheet/BottomSheet.js +58 -32
  7. package/dist/src/BottomSheet/BottomSheet.style.js +8 -9
  8. package/dist/src/BottomSheet/hooks/useBottomSheetBackHandler.js +26 -0
  9. package/dist/src/Button/components/InternalButtonLoading/InternalButtonLoading.js +0 -1
  10. package/dist/src/ButtonGroup/ButtonGroup.js +1 -1
  11. package/dist/src/Chip/Chip.js +12 -1
  12. package/dist/src/Chip/Chip.style.js +1 -1
  13. package/dist/src/Content/ContentHorizontal.style.js +15 -0
  14. package/dist/src/Content/ContentSpaceAround.style.js +15 -0
  15. package/dist/src/Content/ContentVertical.style.js +15 -0
  16. package/dist/src/ContentOverlay/ContentOverlay.js +5 -7
  17. package/dist/src/ContentOverlay/UNSAFE_WrappedModalize.js +23 -0
  18. package/dist/src/ErrorMessageWrapper/context/ErrorMessageProvider.js +1 -1
  19. package/dist/src/Form/Form.js +5 -2
  20. package/dist/src/Form/components/FormCache/FormCache.js +1 -0
  21. package/dist/src/Form/components/FormMessageBanner/FormMessageBanner.js +1 -1
  22. package/dist/src/Form/context/AtlantisFormContext.js +1 -0
  23. package/dist/src/Form/hooks/useInternalForm.js +6 -3
  24. package/dist/src/FormatFile/components/MediaView/MediaView.js +22 -5
  25. package/dist/src/FormatFile/utils/createUseCreateThumbnail.js +1 -1
  26. package/dist/src/InputCurrency/InputCurrency.js +42 -30
  27. package/dist/src/InputDate/InputDate.js +2 -2
  28. package/dist/src/InputEmail/InputEmail.js +12 -4
  29. package/dist/src/InputFieldWrapper/InputFieldWrapper.js +14 -12
  30. package/dist/src/InputFieldWrapper/InputFieldWrapper.style.js +1 -1
  31. package/dist/src/InputFieldWrapper/components/Prefix/Prefix.js +5 -2
  32. package/dist/src/InputFieldWrapper/components/Suffix/Suffix.js +5 -2
  33. package/dist/src/InputNumber/InputNumber.js +10 -4
  34. package/dist/src/InputPressable/InputPressable.js +20 -8
  35. package/dist/src/InputPressable/InputPressable.style.js +3 -0
  36. package/dist/src/InputSearch/InputSearch.js +1 -1
  37. package/dist/src/InputText/InputText.js +24 -13
  38. package/dist/src/InputText/InputText.style.js +4 -0
  39. package/dist/src/InputTime/InputTime.js +2 -2
  40. package/dist/src/Menu/Menu.js +2 -2
  41. package/dist/src/ProgressBar/ProgressBar.js +10 -6
  42. package/dist/src/ProgressBar/ProgressBarInner.js +3 -12
  43. package/dist/src/ProgressBar/ProgressBarStepped.js +7 -2
  44. package/dist/src/Select/Select.style.js +1 -0
  45. package/dist/src/Select/components/SelectPressable/SelectPressable.js +1 -1
  46. package/dist/src/StatusLabel/StatusLabel.style.js +2 -2
  47. package/dist/src/Switch/components/BaseSwitch/BaseSwitch.js +7 -1
  48. package/dist/src/Typography/Typography.js +16 -5
  49. package/dist/src/hooks/useAtlantisI18n/locales/en.json +1 -0
  50. package/dist/src/hooks/useAtlantisI18n/locales/es.json +1 -0
  51. package/dist/src/hooks/useFormController.js +6 -15
  52. package/dist/tsconfig.build.json +7 -0
  53. package/dist/tsconfig.build.tsbuildinfo +1 -0
  54. package/dist/tsconfig.json +4 -6
  55. package/dist/types/src/ActionItem/ActionItem.d.ts +2 -1
  56. package/dist/types/src/ActionItem/ActionItemGroup.d.ts +2 -1
  57. package/dist/types/src/ActionItem/components/ActionItemContainer.d.ts +2 -1
  58. package/dist/types/src/ActionLabel/ActionLabel.d.ts +4 -3
  59. package/dist/types/src/ActivityIndicator/ActivityIndicator.d.ts +2 -1
  60. package/dist/types/src/AutoLink/AutoLink.d.ts +2 -1
  61. package/dist/types/src/AutoLink/components/ComposeTextWithLinks/ComposeTextWithLinks.d.ts +2 -1
  62. package/dist/types/src/AutoLink/components/Link/Link.d.ts +2 -1
  63. package/dist/types/src/Banner/Banner.d.ts +2 -1
  64. package/dist/types/src/Banner/components/BannerIcon/BannerIcon.d.ts +2 -1
  65. package/dist/types/src/Banner/components/BannerIcon/BannerIcon.style.d.ts +3 -0
  66. package/dist/types/src/Banner/types.d.ts +1 -1
  67. package/dist/types/src/BottomSheet/BottomSheet.d.ts +7 -3
  68. package/dist/types/src/BottomSheet/BottomSheet.style.d.ts +7 -14
  69. package/dist/types/src/BottomSheet/components/BottomSheetOption/BottomSheetOption.d.ts +2 -1
  70. package/dist/types/src/BottomSheet/hooks/useBottomSheetBackHandler.d.ts +8 -0
  71. package/dist/types/src/Button/Button.d.ts +2 -1
  72. package/dist/types/src/Button/components/InternalButtonLoading/InternalButtonLoading.d.ts +1 -1
  73. package/dist/types/src/ButtonGroup/ButtonGroup.d.ts +2 -1
  74. package/dist/types/src/ButtonGroup/ButtonGroupAction.d.ts +4 -3
  75. package/dist/types/src/ButtonGroup/components/SecondaryActionSheet/SecondaryActionSheet.d.ts +3 -2
  76. package/dist/types/src/Card/Card.d.ts +2 -1
  77. package/dist/types/src/Card/components/InternalCardHeader.d.ts +2 -1
  78. package/dist/types/src/Checkbox/Checkbox.d.ts +2 -1
  79. package/dist/types/src/Checkbox/CheckboxGroup.d.ts +2 -1
  80. package/dist/types/src/Chip/Chip.d.ts +2 -1
  81. package/dist/types/src/Content/Content.d.ts +3 -2
  82. package/dist/types/src/Content/ContentHorizontal.style.d.ts +15 -0
  83. package/dist/types/src/Content/ContentSpaceAround.style.d.ts +15 -0
  84. package/dist/types/src/Content/ContentVertical.style.d.ts +15 -0
  85. package/dist/types/src/ContentOverlay/ContentOverlay.d.ts +1 -1
  86. package/dist/types/src/ContentOverlay/UNSAFE_WrappedModalize.d.ts +3 -0
  87. package/dist/types/src/Disclosure/Disclosure.d.ts +1 -1
  88. package/dist/types/src/Divider/Divider.d.ts +2 -1
  89. package/dist/types/src/EmptyState/EmptyState.d.ts +2 -1
  90. package/dist/types/src/ErrorMessageWrapper/ErrorMessageWrapper.d.ts +2 -1
  91. package/dist/types/src/ErrorMessageWrapper/context/ErrorMessageProvider.d.ts +2 -1
  92. package/dist/types/src/ErrorMessageWrapper/context/types.d.ts +1 -1
  93. package/dist/types/src/Flex/Flex.d.ts +2 -1
  94. package/dist/types/src/Form/Form.d.ts +2 -1
  95. package/dist/types/src/Form/components/FormActionBar/FormActionBar.d.ts +3 -2
  96. package/dist/types/src/Form/components/FormBody/FormBody.d.ts +3 -2
  97. package/dist/types/src/Form/components/FormCache/FormCache.d.ts +4 -3
  98. package/dist/types/src/Form/components/FormErrorBanner/FormErrorBanner.d.ts +2 -1
  99. package/dist/types/src/Form/components/FormMask/FormMask.d.ts +2 -1
  100. package/dist/types/src/Form/components/FormMessage/FormMessage.d.ts +2 -1
  101. package/dist/types/src/Form/components/FormMessage/components/InternalFormMessage/InternalFormMessage.d.ts +2 -1
  102. package/dist/types/src/Form/components/FormMessageBanner/FormMessageBanner.d.ts +2 -1
  103. package/dist/types/src/Form/components/FormSaveButton/FormSaveButton.d.ts +2 -1
  104. package/dist/types/src/Form/context/AtlantisFormContext.d.ts +2 -1
  105. package/dist/types/src/Form/context/types.d.ts +5 -4
  106. package/dist/types/src/Form/hooks/useFormViewRefs.d.ts +2 -2
  107. package/dist/types/src/Form/hooks/useInternalForm.d.ts +7 -7
  108. package/dist/types/src/Form/types.d.ts +13 -7
  109. package/dist/types/src/FormField/FormField.d.ts +1 -1
  110. package/dist/types/src/FormatFile/FormatFile.d.ts +2 -1
  111. package/dist/types/src/FormatFile/components/ErrorIcon/ErrorIcon.d.ts +2 -1
  112. package/dist/types/src/FormatFile/components/FileView/FileView.d.ts +2 -1
  113. package/dist/types/src/FormatFile/components/FormatFileBottomSheet/FormatFileBottomSheet.d.ts +3 -2
  114. package/dist/types/src/FormatFile/components/MediaView/MediaView.d.ts +2 -1
  115. package/dist/types/src/FormatFile/components/ProgressBar/ProgressBar.d.ts +2 -1
  116. package/dist/types/src/Heading/Heading.d.ts +4 -3
  117. package/dist/types/src/Icon/Icon.d.ts +2 -1
  118. package/dist/types/src/IconButton/IconButton.d.ts +1 -1
  119. package/dist/types/src/InputCurrency/InputCurrency.d.ts +2 -1
  120. package/dist/types/src/InputDate/InputDate.d.ts +4 -2
  121. package/dist/types/src/InputFieldWrapper/InputFieldWrapper.d.ts +9 -2
  122. package/dist/types/src/InputFieldWrapper/InputFieldWrapper.style.d.ts +1 -1
  123. package/dist/types/src/InputFieldWrapper/components/ClearAction/ClearAction.d.ts +2 -1
  124. package/dist/types/src/InputFieldWrapper/components/Prefix/Prefix.d.ts +4 -4
  125. package/dist/types/src/InputFieldWrapper/components/Suffix/Suffix.d.ts +4 -4
  126. package/dist/types/src/InputPressable/InputPressable.d.ts +9 -1
  127. package/dist/types/src/InputPressable/InputPressable.style.d.ts +3 -0
  128. package/dist/types/src/InputSearch/InputSearch.d.ts +1 -1
  129. package/dist/types/src/InputSearch/components/FilterButton.d.ts +2 -1
  130. package/dist/types/src/InputText/InputText.d.ts +11 -3
  131. package/dist/types/src/InputText/InputText.style.d.ts +4 -0
  132. package/dist/types/src/InputText/context/InputAccessoriesProvider.d.ts +2 -1
  133. package/dist/types/src/InputTime/InputTime.d.ts +4 -2
  134. package/dist/types/src/Menu/Menu.d.ts +2 -1
  135. package/dist/types/src/Menu/components/MenuOption/MenuOption.d.ts +2 -1
  136. package/dist/types/src/Menu/components/Overlay/Overlay.d.ts +2 -1
  137. package/dist/types/src/Menu/types.d.ts +6 -1
  138. package/dist/types/src/ProgressBar/ProgressBar.d.ts +2 -1
  139. package/dist/types/src/ProgressBar/ProgressBarInner.d.ts +5 -1
  140. package/dist/types/src/ProgressBar/ProgressBarStepped.d.ts +3 -1
  141. package/dist/types/src/ProgressBar/types.d.ts +20 -0
  142. package/dist/types/src/Select/Select.d.ts +3 -2
  143. package/dist/types/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.d.ts +2 -1
  144. package/dist/types/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.ios.d.ts +2 -1
  145. package/dist/types/src/Select/components/SelectInternalPicker/SelectInternalPicker.d.ts +2 -1
  146. package/dist/types/src/Select/components/SelectPressable/SelectPressable.d.ts +2 -1
  147. package/dist/types/src/StatusLabel/StatusLabel.d.ts +2 -1
  148. package/dist/types/src/StatusLabel/StatusLabel.style.d.ts +1 -1
  149. package/dist/types/src/Switch/Switch.d.ts +2 -1
  150. package/dist/types/src/Switch/components/BaseSwitch/BaseSwitch.d.ts +2 -1
  151. package/dist/types/src/Text/Text.d.ts +4 -3
  152. package/dist/types/src/TextList/TextList.d.ts +2 -1
  153. package/dist/types/src/ThumbnailList/ThumbnailList.d.ts +2 -1
  154. package/dist/types/src/Toast/Toast.d.ts +2 -1
  155. package/dist/types/src/Typography/Typography.d.ts +3 -3
  156. package/dist/types/src/Typography/TypographyGestureDetector.d.ts +2 -1
  157. package/dist/types/src/utils/test/MockSafeAreaProvider.d.ts +1 -1
  158. package/package.json +26 -15
  159. package/src/ActionItem/ActionItem.tsx +1 -1
  160. package/src/ActionItem/ActionItemGroup.tsx +1 -3
  161. package/src/ActionItem/components/ActionItemContainer.tsx +1 -1
  162. package/src/ActionLabel/ActionLabel.test.tsx +12 -0
  163. package/src/ActionLabel/ActionLabel.tsx +3 -3
  164. package/src/ActionLabel/__snapshots__/ActionLabel.test.tsx.snap +66 -0
  165. package/src/ActivityIndicator/ActivityIndicator.tsx +1 -3
  166. package/src/AtlantisContext/AtlantisContext.test.tsx +1 -1
  167. package/src/AtlantisThemeContext/AtlantisThemeContext.test.tsx +5 -5
  168. package/src/AutoLink/AutoLink.test.tsx +2 -4
  169. package/src/AutoLink/AutoLink.tsx +1 -1
  170. package/src/AutoLink/components/ComposeTextWithLinks/ComposeTextWithLinks.tsx +1 -1
  171. package/src/AutoLink/components/Link/Link.tsx +1 -5
  172. package/src/Banner/Banner.test.tsx +12 -0
  173. package/src/Banner/Banner.tsx +4 -2
  174. package/src/Banner/components/BannerIcon/BannerIcon.style.ts +3 -0
  175. package/src/Banner/components/BannerIcon/BannerIcon.tsx +1 -1
  176. package/src/Banner/types.ts +1 -1
  177. package/src/BottomSheet/BottomSheet.stories.tsx +128 -0
  178. package/src/BottomSheet/BottomSheet.style.ts +7 -14
  179. package/src/BottomSheet/BottomSheet.test.tsx +34 -39
  180. package/src/BottomSheet/BottomSheet.tsx +112 -92
  181. package/src/BottomSheet/components/BottomSheetOption/BottomSheetOption.tsx +1 -1
  182. package/src/BottomSheet/hooks/useBottomSheetBackHandler.test.ts +90 -0
  183. package/src/BottomSheet/hooks/useBottomSheetBackHandler.ts +41 -0
  184. package/src/Button/Button.tsx +1 -1
  185. package/src/Button/components/InternalButtonLoading/InternalButtonLoading.tsx +1 -2
  186. package/src/ButtonGroup/ButtonGroup.test.tsx +13 -11
  187. package/src/ButtonGroup/ButtonGroup.tsx +2 -2
  188. package/src/ButtonGroup/ButtonGroupAction.tsx +4 -4
  189. package/src/ButtonGroup/components/SecondaryActionSheet/SecondaryActionSheet.tsx +2 -2
  190. package/src/Card/Card.tsx +1 -1
  191. package/src/Card/components/InternalCardHeader.tsx +1 -1
  192. package/src/Checkbox/Checkbox.test.tsx +118 -1
  193. package/src/Checkbox/Checkbox.tsx +2 -2
  194. package/src/Checkbox/CheckboxGroup.test.tsx +3 -7
  195. package/src/Checkbox/CheckboxGroup.tsx +2 -2
  196. package/src/Chip/Chip.style.ts +1 -1
  197. package/src/Chip/Chip.tsx +20 -2
  198. package/src/Content/Content.tsx +7 -2
  199. package/src/Content/ContentHorizontal.style.ts +20 -0
  200. package/src/Content/ContentSpaceAround.style.ts +20 -0
  201. package/src/Content/ContentVertical.style.ts +20 -0
  202. package/src/ContentOverlay/ContentOverlay.test.tsx +34 -27
  203. package/src/ContentOverlay/ContentOverlay.tsx +7 -7
  204. package/src/ContentOverlay/UNSAFE_WrappedModalize.tsx +41 -0
  205. package/src/ContentOverlay/hooks/useKeyboardVisibility.test.ts +7 -7
  206. package/src/ContentOverlay/hooks/useViewLayoutHeight.test.ts +1 -1
  207. package/src/Disclosure/Disclosure.tsx +1 -1
  208. package/src/Divider/Divider.tsx +1 -1
  209. package/src/EmptyState/EmptyState.test.tsx +29 -42
  210. package/src/EmptyState/EmptyState.tsx +1 -1
  211. package/src/ErrorMessageWrapper/ErrorMessageWrapper.tsx +1 -1
  212. package/src/ErrorMessageWrapper/context/ErrorMessageProvider.tsx +3 -5
  213. package/src/ErrorMessageWrapper/context/types.ts +1 -1
  214. package/src/Flex/Flex.tsx +2 -2
  215. package/src/Form/Form.test.tsx +145 -2
  216. package/src/Form/Form.tsx +8 -1
  217. package/src/Form/components/FormActionBar/FormActionBar.tsx +3 -3
  218. package/src/Form/components/FormBody/FormBody.tsx +3 -3
  219. package/src/Form/components/FormCache/FormCache.tsx +5 -4
  220. package/src/Form/components/FormErrorBanner/FormErrorBanner.tsx +1 -1
  221. package/src/Form/components/FormMask/FormMask.tsx +1 -1
  222. package/src/Form/components/FormMessage/FormMessage.test.tsx +40 -27
  223. package/src/Form/components/FormMessage/FormMessage.tsx +1 -1
  224. package/src/Form/components/FormMessage/components/InternalFormMessage/InternalFormMessage.tsx +1 -1
  225. package/src/Form/components/FormMessageBanner/FormMessageBanner.tsx +1 -3
  226. package/src/Form/components/FormSaveButton/FormSaveButton.test.tsx +2 -2
  227. package/src/Form/components/FormSaveButton/FormSaveButton.tsx +1 -1
  228. package/src/Form/context/AtlantisFormContext.test.tsx +1 -1
  229. package/src/Form/context/AtlantisFormContext.tsx +1 -0
  230. package/src/Form/context/types.ts +5 -4
  231. package/src/Form/hooks/useFormViewRefs.ts +4 -5
  232. package/src/Form/hooks/useInternalForm.ts +14 -6
  233. package/src/Form/hooks/useScrollToError/useScrollToError.test.tsx +2 -1
  234. package/src/Form/types.ts +14 -8
  235. package/src/FormField/FormField.tsx +1 -1
  236. package/src/FormatFile/FormatFile.test.tsx +21 -21
  237. package/src/FormatFile/FormatFile.tsx +3 -3
  238. package/src/FormatFile/components/ErrorIcon/ErrorIcon.tsx +1 -1
  239. package/src/FormatFile/components/FileView/FileView.tsx +1 -1
  240. package/src/FormatFile/components/FormatFileBottomSheet/FormatFileBottomSheet.test.tsx +14 -14
  241. package/src/FormatFile/components/FormatFileBottomSheet/FormatFileBottomSheet.tsx +2 -2
  242. package/src/FormatFile/components/MediaView/MediaView.test.tsx +283 -0
  243. package/src/FormatFile/components/MediaView/MediaView.tsx +28 -7
  244. package/src/FormatFile/components/ProgressBar/ProgressBar.tsx +1 -1
  245. package/src/FormatFile/utils/createUseCreateThumbnail.ts +1 -1
  246. package/src/Glimmer/Glimmer.test.tsx +2 -2
  247. package/src/Heading/Heading.test.tsx +13 -0
  248. package/src/Heading/Heading.tsx +3 -3
  249. package/src/Heading/__snapshots__/Heading.test.tsx.snap +65 -0
  250. package/src/Icon/Icon.tsx +1 -1
  251. package/src/Icon/__snapshots__/Icon.test.tsx.snap +7 -0
  252. package/src/IconButton/IconButton.tsx +1 -1
  253. package/src/InputCurrency/InputCurrency.tsx +72 -58
  254. package/src/InputDate/InputDate.tsx +7 -3
  255. package/src/InputEmail/InputEmail.tsx +15 -8
  256. package/src/InputFieldWrapper/InputFieldWrapper.style.ts +1 -1
  257. package/src/InputFieldWrapper/InputFieldWrapper.test.tsx +48 -1
  258. package/src/InputFieldWrapper/InputFieldWrapper.tsx +39 -29
  259. package/src/InputFieldWrapper/components/ClearAction/ClearAction.tsx +1 -1
  260. package/src/InputFieldWrapper/components/Prefix/Prefix.test.tsx +8 -16
  261. package/src/InputFieldWrapper/components/Prefix/Prefix.tsx +8 -6
  262. package/src/InputFieldWrapper/components/Suffix/Suffix.test.tsx +2 -4
  263. package/src/InputFieldWrapper/components/Suffix/Suffix.tsx +8 -6
  264. package/src/InputNumber/InputNumber.tsx +11 -7
  265. package/src/InputPassword/InputPassword.tsx +1 -1
  266. package/src/InputPressable/InputPressable.style.ts +4 -0
  267. package/src/InputPressable/InputPressable.test.tsx +75 -1
  268. package/src/InputPressable/InputPressable.tsx +34 -8
  269. package/src/InputSearch/InputSearch.tsx +2 -1
  270. package/src/InputSearch/components/FilterButton.tsx +1 -1
  271. package/src/InputText/InputText.style.ts +5 -0
  272. package/src/InputText/InputText.test.tsx +190 -1
  273. package/src/InputText/InputText.tsx +37 -20
  274. package/src/InputText/context/InputAccessoriesProvider.tsx +1 -1
  275. package/src/InputTime/InputTime.tsx +7 -3
  276. package/src/Menu/Menu.tsx +3 -3
  277. package/src/Menu/components/MenuOption/MenuOption.tsx +1 -1
  278. package/src/Menu/components/Overlay/Overlay.tsx +1 -1
  279. package/src/Menu/types.ts +7 -1
  280. package/src/ProgressBar/ProgressBar.test.tsx +109 -0
  281. package/src/ProgressBar/ProgressBar.tsx +18 -2
  282. package/src/ProgressBar/ProgressBarInner.tsx +8 -11
  283. package/src/ProgressBar/ProgressBarStepped.tsx +12 -1
  284. package/src/ProgressBar/__snapshots__/ProgressBar.test.tsx.snap +14 -0
  285. package/src/ProgressBar/types.ts +22 -0
  286. package/src/Select/Select.style.ts +1 -0
  287. package/src/Select/Select.tsx +2 -2
  288. package/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.ios.tsx +1 -1
  289. package/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.tsx +1 -1
  290. package/src/Select/components/SelectInternalPicker/SelectInternalPicker.tsx +1 -1
  291. package/src/Select/components/SelectPressable/SelectPressable.tsx +1 -4
  292. package/src/StatusLabel/StatusLabel.style.ts +2 -2
  293. package/src/StatusLabel/StatusLabel.tsx +1 -1
  294. package/src/StatusLabel/__snapshots__/StatusLabel.test.tsx.snap +14 -14
  295. package/src/Switch/Switch.tsx +1 -1
  296. package/src/Switch/components/BaseSwitch/BaseSwitch.tsx +8 -2
  297. package/src/Text/Text.test.tsx +10 -0
  298. package/src/Text/Text.tsx +3 -3
  299. package/src/Text/__snapshots__/Text.test.tsx.snap +66 -0
  300. package/src/TextList/TextList.tsx +1 -1
  301. package/src/ThumbnailList/ThumbnailList.test.tsx +5 -5
  302. package/src/ThumbnailList/ThumbnailList.tsx +1 -1
  303. package/src/ThumbnailList/__snapshots__/ThumbnailList.test.tsx.snap +199 -1
  304. package/src/Toast/Toast.tsx +2 -2
  305. package/src/Typography/Typography.test.tsx +61 -0
  306. package/src/Typography/Typography.tsx +25 -9
  307. package/src/Typography/TypographyGestureDetector.tsx +1 -3
  308. package/src/Typography/__snapshots__/Typography.test.tsx.snap +222 -0
  309. package/src/hooks/useAtlantisI18n/locales/en.json +1 -0
  310. package/src/hooks/useAtlantisI18n/locales/es.json +1 -0
  311. package/src/hooks/useFormController.ts +7 -14
  312. package/src/utils/test/MockSafeAreaProvider.tsx +1 -1
  313. package/dist/tsconfig.tsbuildinfo +0 -1
@@ -16,6 +16,10 @@ export const useVerticalStyles = buildThemedStyles(tokens => {
16
16
  padding: 0,
17
17
  },
18
18
 
19
+ minusculeChildSpace: {
20
+ paddingTop: tokens["space-minuscule"],
21
+ },
22
+
19
23
  smallestChildSpace: {
20
24
  paddingTop: tokens["space-smallest"],
21
25
  },
@@ -28,6 +32,10 @@ export const useVerticalStyles = buildThemedStyles(tokens => {
28
32
  paddingTop: tokens["space-small"],
29
33
  },
30
34
 
35
+ slimChildSpace: {
36
+ paddingTop: tokens["space-slim"],
37
+ },
38
+
31
39
  baseChildSpace: {
32
40
  paddingTop: tokens["space-base"],
33
41
  },
@@ -35,5 +43,17 @@ export const useVerticalStyles = buildThemedStyles(tokens => {
35
43
  largeChildSpace: {
36
44
  paddingTop: tokens["space-large"],
37
45
  },
46
+
47
+ largerChildSpace: {
48
+ paddingTop: tokens["space-larger"],
49
+ },
50
+
51
+ largestChildSpace: {
52
+ paddingTop: tokens["space-largest"],
53
+ },
54
+
55
+ extravagantChildSpace: {
56
+ paddingTop: tokens["space-extravagant"],
57
+ },
38
58
  };
39
59
  });
@@ -4,7 +4,7 @@ import { AccessibilityInfo, View } from "react-native";
4
4
  import { Host } from "react-native-portalize";
5
5
  import type { ReactTestInstance } from "react-test-renderer";
6
6
  import { act } from "react-test-renderer";
7
- import type { ContentOverlayRef, ModalBackgroundColor } from "./ContentOverlay";
7
+ import type { ContentOverlayRef, ModalBackgroundColor } from "./types";
8
8
  import { ContentOverlay } from "./ContentOverlay";
9
9
  import { tokens } from "../utils/design";
10
10
  import { Button } from "../Button";
@@ -106,23 +106,30 @@ function renderContentOverlay(
106
106
  return renderResult;
107
107
  }
108
108
 
109
- function renderAndOpenContentOverlay(defaultOptions = getDefaultOptions()) {
109
+ async function renderAndOpenContentOverlay(
110
+ defaultOptions = getDefaultOptions(),
111
+ ) {
110
112
  const rendered = renderContentOverlay(defaultOptions);
111
113
 
112
- act(() => {
114
+ await act(async () => {
113
115
  fireEvent.press(rendered.getByLabelText(defaultOptions.buttonLabel));
114
116
  });
115
117
 
118
+ // Wait for the modal to open asynchronously (due to requestAnimationFrame)
119
+ await waitFor(() => {
120
+ expect(rendered.getByTestId("ATL-Overlay-Header")).toBeDefined();
121
+ });
122
+
116
123
  return rendered;
117
124
  }
118
125
 
119
126
  describe("when open is called on the content overlay ref", () => {
120
- it("should open the content overlay, exposing the content to the user", () => {
127
+ it("should open the content overlay, exposing the content to the user", async () => {
121
128
  const options: testRendererOptions = {
122
129
  ...getDefaultOptions(),
123
130
  text: "I am text within the content overlay",
124
131
  };
125
- const contentOverlayScreen = renderAndOpenContentOverlay(options);
132
+ const contentOverlayScreen = await renderAndOpenContentOverlay(options);
126
133
 
127
134
  expect(contentOverlayScreen.getByText(options.text)).toBeDefined();
128
135
  });
@@ -135,9 +142,9 @@ describe("when the close button is clicked on an open content overlay", () => {
135
142
  text: "I am text within the content overlay",
136
143
  showDismiss: true,
137
144
  };
138
- const contentOverlayScreen = renderAndOpenContentOverlay(options);
145
+ const contentOverlayScreen = await renderAndOpenContentOverlay(options);
139
146
 
140
- act(() => {
147
+ await act(async () => {
141
148
  fireEvent.press(
142
149
  contentOverlayScreen.getByTestId("ATL-Overlay-CloseButton"),
143
150
  );
@@ -156,9 +163,9 @@ describe("when the close button is clicked on an open content overlay with a def
156
163
  onCloseCallback: jest.fn(),
157
164
  showDismiss: true,
158
165
  };
159
- const contentOverlayScreen = renderAndOpenContentOverlay(options);
166
+ const contentOverlayScreen = await renderAndOpenContentOverlay(options);
160
167
 
161
- act(() => {
168
+ await act(async () => {
162
169
  fireEvent.press(
163
170
  contentOverlayScreen.getByTestId("ATL-Overlay-CloseButton"),
164
171
  );
@@ -191,7 +198,7 @@ describe("when the content overlay is created with a defined onOpen prop", () =>
191
198
  ...getDefaultOptions(),
192
199
  onOpenCallback: jest.fn(),
193
200
  };
194
- renderAndOpenContentOverlay(options);
201
+ await renderAndOpenContentOverlay(options);
195
202
 
196
203
  await waitFor(() => {
197
204
  expect(options.onOpenCallback).toHaveBeenCalled();
@@ -201,25 +208,25 @@ describe("when the content overlay is created with a defined onOpen prop", () =>
201
208
  });
202
209
 
203
210
  describe("when title prop passed to content overlay", () => {
204
- it("should set the header title", () => {
211
+ it("should set the header title", async () => {
205
212
  const options: testRendererOptions = {
206
213
  ...getDefaultOptions(),
207
214
  title: "Awesome Title",
208
215
  };
209
- const contentOverlayScreen = renderAndOpenContentOverlay(options);
216
+ const contentOverlayScreen = await renderAndOpenContentOverlay(options);
210
217
 
211
218
  expect(contentOverlayScreen.getByText(options.title)).toBeDefined();
212
219
  });
213
220
  });
214
221
 
215
222
  describe("when accessibilityLabel prop passed to content overlay", () => {
216
- it("should set the header accessibilityLabel", () => {
223
+ it("should set the header accessibilityLabel", async () => {
217
224
  const options: testRendererOptions = {
218
225
  ...getDefaultOptions(),
219
226
  a11yLabel: "Awesome a11y Label",
220
227
  showDismiss: true,
221
228
  };
222
- const contentOverlayScreen = renderAndOpenContentOverlay(options);
229
+ const contentOverlayScreen = await renderAndOpenContentOverlay(options);
223
230
 
224
231
  expect(
225
232
  contentOverlayScreen.getByLabelText(options.a11yLabel || "ohno"),
@@ -228,13 +235,13 @@ describe("when accessibilityLabel prop passed to content overlay", () => {
228
235
  });
229
236
 
230
237
  describe("when accessibilityLabel prop NOT passed to content overlay", () => {
231
- it("should use default accessibilityLabel", () => {
238
+ it("should use default accessibilityLabel", async () => {
232
239
  const options: testRendererOptions = {
233
240
  ...getDefaultOptions(),
234
241
  title: "Awesome Title",
235
242
  showDismiss: true,
236
243
  };
237
- const contentOverlayScreen = renderAndOpenContentOverlay(options);
244
+ const contentOverlayScreen = await renderAndOpenContentOverlay(options);
238
245
 
239
246
  expect(
240
247
  contentOverlayScreen.getAllByLabelText(`Close ${options.title} modal`),
@@ -251,7 +258,7 @@ describe("when there is a screen reader enabled", () => {
251
258
  const options: testRendererOptions = {
252
259
  ...getDefaultOptions(),
253
260
  };
254
- const contentOverlayScreen = renderAndOpenContentOverlay(options);
261
+ const contentOverlayScreen = await renderAndOpenContentOverlay(options);
255
262
 
256
263
  expect(
257
264
  await contentOverlayScreen.findByTestId("ATL-Overlay-CloseButton"),
@@ -260,12 +267,12 @@ describe("when there is a screen reader enabled", () => {
260
267
  });
261
268
 
262
269
  describe("when fullScreen is set to true", () => {
263
- it("should show the dismiss button", () => {
270
+ it("should show the dismiss button", async () => {
264
271
  const options: testRendererOptions = {
265
272
  ...getDefaultOptions(),
266
273
  fullScreen: true,
267
274
  };
268
- const contentOverlayScreen = renderAndOpenContentOverlay(options);
275
+ const contentOverlayScreen = await renderAndOpenContentOverlay(options);
269
276
  expect(
270
277
  contentOverlayScreen.getByTestId("ATL-Overlay-CloseButton"),
271
278
  ).toBeDefined();
@@ -273,12 +280,12 @@ describe("when fullScreen is set to true", () => {
273
280
  });
274
281
 
275
282
  describe("when showDismiss is set to true", () => {
276
- it("should show the dismiss button", () => {
283
+ it("should show the dismiss button", async () => {
277
284
  const options: testRendererOptions = {
278
285
  ...getDefaultOptions(),
279
286
  showDismiss: true,
280
287
  };
281
- const contentOverlayScreen = renderAndOpenContentOverlay(options);
288
+ const contentOverlayScreen = await renderAndOpenContentOverlay(options);
282
289
  expect(
283
290
  contentOverlayScreen.getByTestId("ATL-Overlay-CloseButton"),
284
291
  ).toBeDefined();
@@ -292,9 +299,9 @@ describe("when the close button is clicked on an open content overlay with a def
292
299
  onBeforeExitCallback: jest.fn(),
293
300
  showDismiss: true,
294
301
  };
295
- const contentOverlayScreen = renderAndOpenContentOverlay(options);
302
+ const contentOverlayScreen = await renderAndOpenContentOverlay(options);
296
303
 
297
- act(() => {
304
+ await act(async () => {
298
305
  fireEvent.press(
299
306
  contentOverlayScreen.getByTestId("ATL-Overlay-CloseButton"),
300
307
  );
@@ -308,11 +315,11 @@ describe("when the close button is clicked on an open content overlay with a def
308
315
 
309
316
  describe("modalBackgroundColor prop", () => {
310
317
  describe("when using the default surface value", () => {
311
- it("renders the component with the color-surface color", () => {
318
+ it("renders the component with the color-surface color", async () => {
312
319
  const options: testRendererOptions = {
313
320
  ...getDefaultOptions(),
314
321
  };
315
- const contentOverlayScreen = renderAndOpenContentOverlay(options);
322
+ const contentOverlayScreen = await renderAndOpenContentOverlay(options);
316
323
  const OverlayHeader = contentOverlayScreen.getByTestId(
317
324
  "ATL-Overlay-Header",
318
325
  ).children[0] as ReactTestInstance;
@@ -337,12 +344,12 @@ describe("modalBackgroundColor prop", () => {
337
344
  });
338
345
 
339
346
  describe("when set to background", () => {
340
- it("changes the backround color of the modal to color-surface--background", () => {
347
+ it("changes the backround color of the modal to color-surface--background", async () => {
341
348
  const options: testRendererOptions = {
342
349
  ...getDefaultOptions(),
343
350
  modalBackgroundColor: "background",
344
351
  };
345
- const contentOverlayScreen = renderAndOpenContentOverlay(options);
352
+ const contentOverlayScreen = await renderAndOpenContentOverlay(options);
346
353
  const OverlayHeader = contentOverlayScreen.getByTestId(
347
354
  "ATL-Overlay-Header",
348
355
  ).children[0] as ReactTestInstance;
@@ -7,7 +7,7 @@ import React, {
7
7
  useRef,
8
8
  useState,
9
9
  } from "react";
10
- import { Modalize } from "react-native-modalize";
10
+ import type { Modalize } from "react-native-modalize";
11
11
  import { useSafeAreaInsets } from "react-native-safe-area-context";
12
12
  import type { NativeScrollEvent, NativeSyntheticEvent } from "react-native";
13
13
  import {
@@ -26,6 +26,7 @@ import type {
26
26
  ContentOverlayRef,
27
27
  ModalBackgroundColor,
28
28
  } from "./types";
29
+ import { UNSAFE_WrappedModalize } from "./UNSAFE_WrappedModalize";
29
30
  import { useIsScreenReaderEnabled } from "../hooks";
30
31
  import { IconButton } from "../IconButton";
31
32
  import { Heading } from "../Heading";
@@ -56,7 +57,7 @@ function ContentOverlayInternal(
56
57
  avoidKeyboardLikeIOS,
57
58
  }: ContentOverlayProps,
58
59
  ref: Ref<ContentOverlayRef>,
59
- ): JSX.Element {
60
+ ) {
60
61
  isDraggable = onBeforeExit ? false : isDraggable;
61
62
  const isCloseableOnOverlayTap = onBeforeExit ? false : true;
62
63
  const { t } = useAtlantisI18n();
@@ -70,9 +71,9 @@ function ContentOverlayInternal(
70
71
  const shouldShowDismiss =
71
72
  showDismiss || isScreenReaderEnabled || isFullScreenOrTopPosition;
72
73
  const [showHeaderShadow, setShowHeaderShadow] = useState<boolean>(false);
73
- const overlayHeader = useRef<View>();
74
+ const overlayHeader = useRef<View>(null);
74
75
 
75
- const internalRef = useRef<Modalize>();
76
+ const internalRef = useRef<Modalize>(null);
76
77
  const [modalizeMethods, setModalizeMethods] = useState<ContentOverlayRef>();
77
78
  const callbackInternalRef = useCallback((instance: Modalize) => {
78
79
  if (instance && !internalRef.current) {
@@ -153,7 +154,7 @@ function ContentOverlayInternal(
153
154
  return (
154
155
  <>
155
156
  {headerHeightKnown && childrenHeightKnown && (
156
- <Modalize
157
+ <UNSAFE_WrappedModalize
157
158
  ref={callbackInternalRef}
158
159
  overlayStyle={styles.overlay}
159
160
  handleStyle={styles.handle}
@@ -196,7 +197,7 @@ function ContentOverlayInternal(
196
197
  >
197
198
  {Platform.OS === "android" ? renderedHeader : undefined}
198
199
  {renderedChildren}
199
- </Modalize>
200
+ </UNSAFE_WrappedModalize>
200
201
  )}
201
202
  {!childrenHeightKnown && (
202
203
  <View style={[styles.hiddenContent, modalStyle]}>
@@ -243,7 +244,6 @@ function ContentOverlayInternal(
243
244
  {shouldShowDismiss && (
244
245
  <View
245
246
  style={styles.dismissButton}
246
- // @ts-expect-error tsc-ci
247
247
  ref={overlayHeader}
248
248
  accessibilityLabel={accessibilityLabel || closeOverlayA11YLabel}
249
249
  accessible={true}
@@ -0,0 +1,41 @@
1
+ import React, {
2
+ forwardRef,
3
+ useImperativeHandle,
4
+ useRef,
5
+ useState,
6
+ } from "react";
7
+ import { Modalize } from "react-native-modalize";
8
+ import type { IHandles } from "react-native-modalize/lib/options";
9
+
10
+ type Props = React.ComponentProps<typeof Modalize>;
11
+
12
+ export const UNSAFE_WrappedModalize = forwardRef<IHandles | undefined, Props>(
13
+ (props, ref) => {
14
+ const innerRef = useRef<IHandles | null>(null);
15
+ const [openRenderId, setOpenRenderId] = useState(0);
16
+
17
+ useImperativeHandle(
18
+ ref,
19
+ () => ({
20
+ open(dest) {
21
+ setOpenRenderId(id => id + 1);
22
+ // Open on a fresh tick for additional safety
23
+ requestAnimationFrame(() => {
24
+ innerRef.current?.open(dest);
25
+ });
26
+ },
27
+ close(dest) {
28
+ innerRef.current?.close(dest);
29
+ },
30
+ }),
31
+ [],
32
+ );
33
+
34
+ // Use a unique key to force a remount, ensuring we get fresh gesture handler nodes within modalize
35
+ return (
36
+ <Modalize key={`modalize-${openRenderId}`} ref={innerRef} {...props} />
37
+ );
38
+ },
39
+ );
40
+
41
+ UNSAFE_WrappedModalize.displayName = "UNSAFE_WrappedModalize";
@@ -1,4 +1,4 @@
1
- import { act, renderHook } from "@testing-library/react-hooks";
1
+ import { act, renderHook } from "@testing-library/react-native";
2
2
  import type { KeyboardEvent } from "react-native";
3
3
  import { DeviceEventEmitter } from "react-native";
4
4
  import { useKeyboardVisibility } from "./useKeyboardVisibility";
@@ -8,19 +8,19 @@ const keyboardEvent: Partial<KeyboardEvent> = {
8
8
  };
9
9
 
10
10
  describe("when the user is typing", () => {
11
- it("sets the isKeyboardVisible to true", () => {
11
+ it("sets the isKeyboardVisible to true", async () => {
12
12
  const { result } = renderHook(() => useKeyboardVisibility());
13
13
 
14
- act(() => {
14
+ await act(async () => {
15
15
  DeviceEventEmitter.emit("keyboardDidShow", keyboardEvent);
16
16
  });
17
17
 
18
18
  expect(result.current.isKeyboardVisible).toBe(true);
19
19
  });
20
- it("the keyboardDidShow event emits the keyboard height", () => {
20
+ it("the keyboardDidShow event emits the keyboard height", async () => {
21
21
  const { result } = renderHook(() => useKeyboardVisibility());
22
22
 
23
- act(() => {
23
+ await act(async () => {
24
24
  DeviceEventEmitter.emit("keyboardDidShow", keyboardEvent);
25
25
  });
26
26
 
@@ -31,10 +31,10 @@ describe("when the user is typing", () => {
31
31
  });
32
32
 
33
33
  describe("when the user not typing", () => {
34
- it("sets the isKeyboardVisible to false", () => {
34
+ it("sets the isKeyboardVisible to false", async () => {
35
35
  const { result } = renderHook(() => useKeyboardVisibility());
36
36
 
37
- act(() => {
37
+ await act(async () => {
38
38
  DeviceEventEmitter.emit("keyboardDidHide");
39
39
  });
40
40
 
@@ -1,4 +1,4 @@
1
- import { act, renderHook } from "@testing-library/react-hooks";
1
+ import { act, renderHook } from "@testing-library/react-native";
2
2
  import type { LayoutChangeEvent } from "react-native";
3
3
  import { useViewLayoutHeight } from "./useViewLayoutHeight";
4
4
 
@@ -61,7 +61,7 @@ export function Disclosure({
61
61
  onToggle,
62
62
  isEmpty,
63
63
  animationDuration = staticTokens["timing-slowest"],
64
- }: DisclosureProps): JSX.Element {
64
+ }: DisclosureProps) {
65
65
  const styles = useStyles();
66
66
 
67
67
  return (
@@ -26,7 +26,7 @@ export function Divider({
26
26
  size = "base",
27
27
  direction = "horizontal",
28
28
  testID = "Divider",
29
- }: DividerProps): JSX.Element {
29
+ }: DividerProps) {
30
30
  const horizontalStyles = useHorizontalStyles();
31
31
  const verticalStyles = useVerticalStyles();
32
32
 
@@ -1,8 +1,8 @@
1
1
  import React from "react";
2
- import { fireEvent, render } from "@testing-library/react-native";
2
+ import { fireEvent, render, screen } from "@testing-library/react-native";
3
+ import { Path } from "react-native-svg";
3
4
  import type { EmptyStateProps } from "./EmptyState";
4
5
  import { EmptyState } from "./EmptyState";
5
- import * as IconComponent from "../Icon/Icon";
6
6
 
7
7
  const primaryOnPress = jest.fn();
8
8
  const secondaryOnPress = jest.fn();
@@ -27,83 +27,70 @@ const component = (overrideProps?: Partial<EmptyStateProps>) => {
27
27
  ...overrideProps,
28
28
  };
29
29
 
30
- return render(<EmptyState {...props} />);
30
+ render(<EmptyState {...props} />);
31
31
  };
32
32
 
33
- const iconSpy = jest.spyOn(IconComponent, "Icon");
34
-
35
- afterEach(() => jest.clearAllMocks());
36
-
37
33
  describe("EmptyState", () => {
38
34
  it("renders the title", () => {
39
- const { getByText } = component();
35
+ component();
40
36
 
41
- expect(getByText(defaultProps.title)).toBeDefined();
37
+ expect(screen.getByText(defaultProps.title)).toBeDefined();
42
38
  });
43
39
 
44
40
  it("renders the description", () => {
45
- const { getByText } = component();
46
-
47
- expect(getByText(defaultProps.description)).toBeDefined();
48
- });
49
-
50
- it("renders the icon", () => {
51
- const { getByTestId } = component();
41
+ component();
52
42
 
53
- expect(getByTestId(defaultProps.icon)).toBeDefined();
43
+ expect(screen.getByText(defaultProps.description)).toBeDefined();
54
44
  });
55
45
 
56
- it("calls icon with correct default params", () => {
46
+ it("renders the icon with default color and large size", () => {
57
47
  component();
58
-
59
- expect(iconSpy).toHaveBeenCalledWith(
60
- {
61
- color: "blue",
62
- name: defaultProps.icon,
63
- size: "large",
64
- },
65
- {},
48
+ const icon = screen.getByTestId(defaultProps.icon);
49
+ const path = icon.findByType(Path);
50
+ expect(path.props.fill).toBe("hsl(197, 90%, 12%)");
51
+ expect(icon.props.style).toEqual(
52
+ expect.arrayContaining([
53
+ expect.objectContaining({
54
+ width: 32,
55
+ height: 32,
56
+ }),
57
+ ]),
66
58
  );
67
59
  });
68
60
 
69
- it("calls icon with correct params", () => {
70
- component({ iconColor: "greyBlue", icon: "link" });
61
+ it("renders the correct icon color when specified", async () => {
62
+ component({ iconColor: "warning" });
71
63
 
72
- expect(iconSpy).toHaveBeenCalledWith(
73
- {
74
- color: "greyBlue",
75
- name: "link",
76
- size: "large",
77
- },
78
- {},
79
- );
64
+ const icon = screen.getByTestId(defaultProps.icon);
65
+ const pathElement = icon.findByType(Path);
66
+ expect(pathElement.props.fill).toBe("hsl(51, 64%, 49%)");
80
67
  });
81
68
 
82
69
  it("renders the primary action and allows users to interact with it by clicking", () => {
83
- const { getByLabelText } = component();
70
+ component();
84
71
 
85
- const button = getByLabelText(defaultProps.primaryAction.label);
72
+ const button = screen.getByLabelText(defaultProps.primaryAction.label);
86
73
  expect(button).toBeDefined();
87
74
  fireEvent.press(button);
88
75
  expect(primaryOnPress).toHaveBeenCalledTimes(1);
89
76
  });
90
77
 
91
78
  it("renders the secondary action and allows users to interact with it by clicking", () => {
92
- const { getByLabelText } = component();
79
+ component();
93
80
 
94
- const button = getByLabelText(defaultProps.secondaryAction.label);
81
+ const button = screen.getByLabelText(defaultProps.secondaryAction.label);
95
82
  expect(button).toBeDefined();
96
83
  fireEvent.press(button);
97
84
  expect(secondaryOnPress).toHaveBeenCalledTimes(1);
98
85
  });
99
86
 
100
87
  it("does render buttons if neither primary nor secondary action is passed in", () => {
101
- const { queryAllByRole } = component({
88
+ component({
102
89
  description: "No buttons",
103
90
  primaryAction: undefined,
104
91
  secondaryAction: undefined,
105
92
  });
106
93
 
107
- expect(queryAllByRole("button")).toHaveLength(0);
94
+ expect(screen.queryAllByRole("button")).toHaveLength(0);
108
95
  });
109
96
  });
@@ -65,7 +65,7 @@ export function EmptyState({
65
65
  primaryAction,
66
66
  secondaryAction,
67
67
  iconColor = "blue",
68
- }: EmptyStateProps): JSX.Element {
68
+ }: EmptyStateProps) {
69
69
  const styles = useStyles();
70
70
 
71
71
  return (
@@ -34,7 +34,7 @@ export function ErrorMessageWrapper({
34
34
  message,
35
35
  wrapFor = "default",
36
36
  children,
37
- }: ErrorMessageWrapperProps): JSX.Element {
37
+ }: ErrorMessageWrapperProps) {
38
38
  const errorMessageContext = useErrorMessageContext();
39
39
  const register = errorMessageContext?.register;
40
40
  const unregister = errorMessageContext?.unregister;
@@ -13,9 +13,7 @@ interface ErrorMessageProviderProps {
13
13
  readonly children: ReactNode;
14
14
  }
15
15
 
16
- export function ErrorMessageProvider({
17
- children,
18
- }: ErrorMessageProviderProps): JSX.Element {
16
+ export function ErrorMessageProvider({ children }: ErrorMessageProviderProps) {
19
17
  const [elements, setElements] = useState<
20
18
  ErrorMessageContextProps["elements"]
21
19
  >({});
@@ -51,13 +49,13 @@ export function ErrorMessageProvider({
51
49
  }
52
50
  }
53
51
 
54
- function getMeasure(ref: RefObject<View>) {
52
+ function getMeasure(ref: RefObject<View | null>) {
55
53
  return function measure(...args: Parameters<NativeMethods["measureLayout"]>) {
56
54
  ref.current?.measureLayout(...args);
57
55
  };
58
56
  }
59
57
 
60
- function getAccessibilityFocus(ref: RefObject<View>) {
58
+ function getAccessibilityFocus(ref: RefObject<View | null>) {
61
59
  return function accessibilityFocus() {
62
60
  const reactTag = findNodeHandle(ref.current);
63
61
  reactTag &&
@@ -50,7 +50,7 @@ type ElementID = Element["id"];
50
50
  export interface ErrorMessageContextRegisterParams {
51
51
  readonly id: ElementID;
52
52
  readonly hasErrorMessage: Methods["hasErrorMessage"];
53
- readonly ref: RefObject<View>;
53
+ readonly ref: RefObject<View | null>;
54
54
  }
55
55
 
56
56
  export interface ErrorMessageContextProps {
package/src/Flex/Flex.tsx CHANGED
@@ -11,7 +11,7 @@ export function Flex({
11
11
  align = "center",
12
12
  gap = "base",
13
13
  children,
14
- }: PropsWithChildren<FlexProps>): JSX.Element {
14
+ }: PropsWithChildren<FlexProps>) {
15
15
  if (template.length === 1) {
16
16
  console.warn("Please use <Content /> component for a stacked layout");
17
17
  }
@@ -54,7 +54,7 @@ function Row({
54
54
  align = "center",
55
55
  gap = "base",
56
56
  children,
57
- }: PropsWithChildren<FlexProps>): JSX.Element {
57
+ }: PropsWithChildren<FlexProps>) {
58
58
  return (
59
59
  <View testID="ATL-Flex-Row" style={[styles.row, { alignItems: align }]}>
60
60
  {Children.map(children, (child, index) => (