@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
@@ -6,18 +6,18 @@ export const useStyles = buildThemedStyles(tokens => {
6
6
  flexDirection: "row",
7
7
  justifyContent: "flex-end",
8
8
  alignItems: "center",
9
+ alignSelf: "flex-start",
9
10
  flexWrap: "nowrap",
10
11
  flexGrow: 0,
11
12
  flexShrink: 1,
12
13
  gap: tokens["space-smaller"],
13
14
  backgroundColor: tokens["color-success--surface"],
14
15
  borderRadius: tokens["radius-large"],
15
- paddingVertical: tokens["space-smaller"],
16
+ paddingVertical: tokens["space-smallest"] + tokens["space-minuscule"],
16
17
  paddingHorizontal: tokens["space-small"],
17
18
  },
18
19
  statusLabelText: {
19
20
  flexShrink: 1,
20
- marginBottom: -1,
21
21
  },
22
22
  labelTextStartAligned: {
23
23
  flexDirection: "row-reverse",
@@ -38,7 +38,7 @@ export function StatusLabel({
38
38
  text,
39
39
  alignment = "end",
40
40
  status = "success",
41
- }: StatusLabelProps): JSX.Element {
41
+ }: StatusLabelProps) {
42
42
  const styles = useStyles();
43
43
 
44
44
  return (
@@ -6,6 +6,7 @@ exports[`StatusLabel alignment when alignment prop set to "end" should match sna
6
6
  [
7
7
  {
8
8
  "alignItems": "center",
9
+ "alignSelf": "flex-start",
9
10
  "backgroundColor": "hsl(109, 28%, 92%)",
10
11
  "borderRadius": 16,
11
12
  "flexDirection": "row",
@@ -15,7 +16,7 @@ exports[`StatusLabel alignment when alignment prop set to "end" should match sna
15
16
  "gap": 4,
16
17
  "justifyContent": "flex-end",
17
18
  "paddingHorizontal": 8,
18
- "paddingVertical": 4,
19
+ "paddingVertical": 3,
19
20
  },
20
21
  {
21
22
  "backgroundColor": "hsl(109, 28%, 92%)",
@@ -28,7 +29,6 @@ exports[`StatusLabel alignment when alignment prop set to "end" should match sna
28
29
  style={
29
30
  {
30
31
  "flexShrink": 1,
31
- "marginBottom": -1,
32
32
  }
33
33
  }
34
34
  >
@@ -88,6 +88,7 @@ exports[`StatusLabel alignment when alignment prop set to default ("start") shou
88
88
  [
89
89
  {
90
90
  "alignItems": "center",
91
+ "alignSelf": "flex-start",
91
92
  "backgroundColor": "hsl(109, 28%, 92%)",
92
93
  "borderRadius": 16,
93
94
  "flexDirection": "row",
@@ -97,7 +98,7 @@ exports[`StatusLabel alignment when alignment prop set to default ("start") shou
97
98
  "gap": 4,
98
99
  "justifyContent": "flex-end",
99
100
  "paddingHorizontal": 8,
100
- "paddingVertical": 4,
101
+ "paddingVertical": 3,
101
102
  },
102
103
  {
103
104
  "backgroundColor": "hsl(109, 28%, 92%)",
@@ -110,7 +111,6 @@ exports[`StatusLabel alignment when alignment prop set to default ("start") shou
110
111
  style={
111
112
  {
112
113
  "flexShrink": 1,
113
- "marginBottom": -1,
114
114
  }
115
115
  }
116
116
  >
@@ -170,6 +170,7 @@ exports[`StatusLabel status when status prop set to "critical" should match snap
170
170
  [
171
171
  {
172
172
  "alignItems": "center",
173
+ "alignSelf": "flex-start",
173
174
  "backgroundColor": "hsl(109, 28%, 92%)",
174
175
  "borderRadius": 16,
175
176
  "flexDirection": "row",
@@ -179,7 +180,7 @@ exports[`StatusLabel status when status prop set to "critical" should match snap
179
180
  "gap": 4,
180
181
  "justifyContent": "flex-end",
181
182
  "paddingHorizontal": 8,
182
- "paddingVertical": 4,
183
+ "paddingVertical": 3,
183
184
  },
184
185
  {
185
186
  "backgroundColor": "hsl(7, 63%, 95%)",
@@ -192,7 +193,6 @@ exports[`StatusLabel status when status prop set to "critical" should match snap
192
193
  style={
193
194
  {
194
195
  "flexShrink": 1,
195
- "marginBottom": -1,
196
196
  }
197
197
  }
198
198
  >
@@ -252,6 +252,7 @@ exports[`StatusLabel status when status prop set to "inactive" should match snap
252
252
  [
253
253
  {
254
254
  "alignItems": "center",
255
+ "alignSelf": "flex-start",
255
256
  "backgroundColor": "hsl(109, 28%, 92%)",
256
257
  "borderRadius": 16,
257
258
  "flexDirection": "row",
@@ -261,7 +262,7 @@ exports[`StatusLabel status when status prop set to "inactive" should match snap
261
262
  "gap": 4,
262
263
  "justifyContent": "flex-end",
263
264
  "paddingHorizontal": 8,
264
- "paddingVertical": 4,
265
+ "paddingVertical": 3,
265
266
  },
266
267
  {
267
268
  "backgroundColor": "hsl(195, 12%, 94%)",
@@ -274,7 +275,6 @@ exports[`StatusLabel status when status prop set to "inactive" should match snap
274
275
  style={
275
276
  {
276
277
  "flexShrink": 1,
277
- "marginBottom": -1,
278
278
  }
279
279
  }
280
280
  >
@@ -334,6 +334,7 @@ exports[`StatusLabel status when status prop set to "informative" should match s
334
334
  [
335
335
  {
336
336
  "alignItems": "center",
337
+ "alignSelf": "flex-start",
337
338
  "backgroundColor": "hsl(109, 28%, 92%)",
338
339
  "borderRadius": 16,
339
340
  "flexDirection": "row",
@@ -343,7 +344,7 @@ exports[`StatusLabel status when status prop set to "informative" should match s
343
344
  "gap": 4,
344
345
  "justifyContent": "flex-end",
345
346
  "paddingHorizontal": 8,
346
- "paddingVertical": 4,
347
+ "paddingVertical": 3,
347
348
  },
348
349
  {
349
350
  "backgroundColor": "hsl(207, 87%, 94%)",
@@ -356,7 +357,6 @@ exports[`StatusLabel status when status prop set to "informative" should match s
356
357
  style={
357
358
  {
358
359
  "flexShrink": 1,
359
- "marginBottom": -1,
360
360
  }
361
361
  }
362
362
  >
@@ -416,6 +416,7 @@ exports[`StatusLabel status when status prop set to "warning" should match snaps
416
416
  [
417
417
  {
418
418
  "alignItems": "center",
419
+ "alignSelf": "flex-start",
419
420
  "backgroundColor": "hsl(109, 28%, 92%)",
420
421
  "borderRadius": 16,
421
422
  "flexDirection": "row",
@@ -425,7 +426,7 @@ exports[`StatusLabel status when status prop set to "warning" should match snaps
425
426
  "gap": 4,
426
427
  "justifyContent": "flex-end",
427
428
  "paddingHorizontal": 8,
428
- "paddingVertical": 4,
429
+ "paddingVertical": 3,
429
430
  },
430
431
  {
431
432
  "backgroundColor": "hsl(52, 64%, 89%)",
@@ -438,7 +439,6 @@ exports[`StatusLabel status when status prop set to "warning" should match snaps
438
439
  style={
439
440
  {
440
441
  "flexShrink": 1,
441
- "marginBottom": -1,
442
442
  }
443
443
  }
444
444
  >
@@ -498,6 +498,7 @@ exports[`StatusLabel status when status prop set to default ("success") should m
498
498
  [
499
499
  {
500
500
  "alignItems": "center",
501
+ "alignSelf": "flex-start",
501
502
  "backgroundColor": "hsl(109, 28%, 92%)",
502
503
  "borderRadius": 16,
503
504
  "flexDirection": "row",
@@ -507,7 +508,7 @@ exports[`StatusLabel status when status prop set to default ("success") should m
507
508
  "gap": 4,
508
509
  "justifyContent": "flex-end",
509
510
  "paddingHorizontal": 8,
510
- "paddingVertical": 4,
511
+ "paddingVertical": 3,
511
512
  },
512
513
  {
513
514
  "backgroundColor": "hsl(109, 28%, 92%)",
@@ -520,7 +521,6 @@ exports[`StatusLabel status when status prop set to default ("success") should m
520
521
  style={
521
522
  {
522
523
  "flexShrink": 1,
523
- "marginBottom": -1,
524
524
  }
525
525
  }
526
526
  >
@@ -20,7 +20,7 @@ interface WithLabelProps extends BaseSwitchProps {
20
20
 
21
21
  export type SwitchProps = XOR<BaseSwitchProps, WithLabelProps>;
22
22
 
23
- export function Switch(props: SwitchProps): JSX.Element {
23
+ export function Switch(props: SwitchProps) {
24
24
  const switchProps: SwitchProps = {
25
25
  ...props,
26
26
  accessibilityLabel: props.accessibilityLabel || props.label,
@@ -43,7 +43,7 @@ export function BaseSwitch({
43
43
  disabled = false,
44
44
  accessibilityLabel,
45
45
  name,
46
- }: BaseSwitchProps): JSX.Element {
46
+ }: BaseSwitchProps) {
47
47
  const { field } = useFormController({
48
48
  name,
49
49
  value: value ?? defaultValue,
@@ -85,6 +85,12 @@ export function BaseSwitch({
85
85
  };
86
86
  }
87
87
  }
88
+ // Temporary fix for iOS 26. Remove when we upgrade to RN 0.81.
89
+ // https://github.com/facebook/react-native/pull/53389
90
+ const iOSBackgroundColor =
91
+ Platform.OS === "ios" && Platform.Version?.startsWith("26.")
92
+ ? undefined
93
+ : tokens["color-interactive--background"];
88
94
 
89
95
  return (
90
96
  <Switch
@@ -98,7 +104,7 @@ export function BaseSwitch({
98
104
  disabled={disabled}
99
105
  thumbColor={getThumbColor()}
100
106
  trackColor={getTrackColors()}
101
- ios_backgroundColor={tokens["color-interactive--background"]}
107
+ ios_backgroundColor={iOSBackgroundColor}
102
108
  accessibilityLabel={accessibilityLabel}
103
109
  accessibilityRole={"switch"}
104
110
  accessibilityState={{
@@ -151,6 +151,16 @@ it("renders text with underline styling", () => {
151
151
  expect(text.toJSON()).toMatchSnapshot();
152
152
  });
153
153
 
154
+ it("supports nested Text children with mixed styles", () => {
155
+ const { getByText, toJSON } = render(
156
+ <Text>
157
+ Hello <Text emphasis="strong">World</Text>!
158
+ </Text>,
159
+ );
160
+ expect(getByText("World")).toBeDefined();
161
+ expect(toJSON()).toMatchSnapshot();
162
+ });
163
+
154
164
  describe("UNSAFE_style", () => {
155
165
  it("applies custom styles via UNSAFE_style prop", () => {
156
166
  const customStyle = {
package/src/Text/Text.tsx CHANGED
@@ -53,9 +53,9 @@ export interface TextProps
53
53
  readonly align?: TextAlign;
54
54
 
55
55
  /**
56
- * Text to display
56
+ * Text to display. Supports nesting text elements.
57
57
  */
58
- readonly children?: string;
58
+ readonly children?: React.ReactNode;
59
59
 
60
60
  /**
61
61
  * Reverse theme for better display on dark background
@@ -143,7 +143,7 @@ export function Text({
143
143
  underline,
144
144
  selectable,
145
145
  onTextLayout,
146
- }: TextProps): JSX.Element {
146
+ }: TextProps) {
147
147
  const accessibilityRole: TextAccessibilityRole = "text";
148
148
 
149
149
  return (
@@ -694,3 +694,69 @@ exports[`renders with strikethrough styling 1`] = `
694
694
  Test Text
695
695
  </Text>
696
696
  `;
697
+
698
+ exports[`supports nested Text children with mixed styles 1`] = `
699
+ <Text
700
+ accessibilityRole="text"
701
+ adjustsFontSizeToFit={false}
702
+ allowFontScaling={true}
703
+ collapsable={false}
704
+ maxFontSizeMultiplier={3.125}
705
+ selectable={true}
706
+ selectionColor="hsl(86, 100%, 46%)"
707
+ style={
708
+ [
709
+ {
710
+ "fontFamily": "inter-regular",
711
+ },
712
+ {
713
+ "color": "hsl(198, 35%, 21%)",
714
+ },
715
+ {
716
+ "textAlign": "left",
717
+ },
718
+ {
719
+ "fontSize": 16,
720
+ "lineHeight": 20,
721
+ },
722
+ {
723
+ "letterSpacing": 0,
724
+ },
725
+ ]
726
+ }
727
+ >
728
+ Hello
729
+ <Text
730
+ accessibilityRole="text"
731
+ adjustsFontSizeToFit={false}
732
+ allowFontScaling={true}
733
+ collapsable={false}
734
+ maxFontSizeMultiplier={3.125}
735
+ selectable={true}
736
+ selectionColor="hsl(86, 100%, 46%)"
737
+ style={
738
+ [
739
+ {
740
+ "fontFamily": "inter-semibold",
741
+ },
742
+ {
743
+ "color": "hsl(198, 35%, 21%)",
744
+ },
745
+ {
746
+ "textAlign": "left",
747
+ },
748
+ {
749
+ "fontSize": 16,
750
+ "lineHeight": 20,
751
+ },
752
+ {
753
+ "letterSpacing": 0,
754
+ },
755
+ ]
756
+ }
757
+ >
758
+ World
759
+ </Text>
760
+ !
761
+ </Text>
762
+ `;
@@ -44,7 +44,7 @@ export function TextList({
44
44
  emphasis,
45
45
  level = "text",
46
46
  spacing = "none",
47
- }: TextListProps): JSX.Element {
47
+ }: TextListProps) {
48
48
  const styles = useStyles();
49
49
 
50
50
  return (
@@ -1,5 +1,5 @@
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
3
  import { Host } from "react-native-portalize";
4
4
  import { ThumbnailList } from "./ThumbnailList";
5
5
  import type { File } from "../FormatFile/types";
@@ -61,15 +61,15 @@ beforeEach(() => {
61
61
  });
62
62
 
63
63
  it("renders a thumbnail component with attachments", () => {
64
- const tree = setup(true);
65
- expect(tree.toJSON()).toMatchSnapshot();
64
+ setup(true);
65
+ expect(screen.toJSON()).toMatchSnapshot();
66
66
  });
67
67
 
68
68
  describe("when a an array of files is provided", () => {
69
69
  it("calls the previewImages util on pressing a valid file", () => {
70
- const { getByLabelText } = setup();
70
+ setup();
71
71
  fireEvent.press(
72
- getByLabelText(files[0].fileName ? files[0].fileName : "file"),
72
+ screen.getByLabelText(files[0].fileName ? files[0].fileName : "file"),
73
73
  );
74
74
  expect(onOpenFile).toHaveBeenCalledTimes(1);
75
75
  });
@@ -26,7 +26,7 @@ export function ThumbnailList({
26
26
  rowCount = RowCount.TwoRows,
27
27
  handleOpenFile,
28
28
  createThumbnail,
29
- }: ThumbnailListProps): JSX.Element {
29
+ }: ThumbnailListProps) {
30
30
  const imageList = filterImages(files);
31
31
  const styles = useStyles();
32
32
 
@@ -150,6 +150,204 @@ exports[`renders a thumbnail component with attachments 1`] = `
150
150
  "top": 0,
151
151
  }
152
152
  }
153
- />,
153
+ >
154
+ <View
155
+ backdropComponent={[Function]}
156
+ backgroundStyle={
157
+ {
158
+ "borderTopLeftRadius": 24,
159
+ "borderTopRightRadius": 24,
160
+ }
161
+ }
162
+ enablePanDownToClose={true}
163
+ handleStyle={
164
+ {
165
+ "display": "none",
166
+ }
167
+ }
168
+ keyboardBlurBehavior="restore"
169
+ style={
170
+ {
171
+ "display": "none",
172
+ }
173
+ }
174
+ testID="bottom-sheet-mock"
175
+ >
176
+ <View
177
+ style={
178
+ {
179
+ "paddingBottom": 8,
180
+ "paddingTop": 8,
181
+ }
182
+ }
183
+ testID="bottom-sheet-view"
184
+ >
185
+ <View
186
+ accessibilityLabel="Preview "
187
+ accessibilityState={
188
+ {
189
+ "busy": undefined,
190
+ "checked": undefined,
191
+ "disabled": undefined,
192
+ "expanded": undefined,
193
+ "selected": undefined,
194
+ }
195
+ }
196
+ accessibilityValue={
197
+ {
198
+ "max": undefined,
199
+ "min": undefined,
200
+ "now": undefined,
201
+ "text": undefined,
202
+ }
203
+ }
204
+ accessible={true}
205
+ collapsable={false}
206
+ focusable={true}
207
+ onClick={[Function]}
208
+ onResponderGrant={[Function]}
209
+ onResponderMove={[Function]}
210
+ onResponderRelease={[Function]}
211
+ onResponderTerminate={[Function]}
212
+ onResponderTerminationRequest={[Function]}
213
+ onStartShouldSetResponder={[Function]}
214
+ style={
215
+ {
216
+ "alignContent": "center",
217
+ "alignItems": "center",
218
+ "display": "flex",
219
+ "flexDirection": "row",
220
+ "opacity": 1,
221
+ "padding": 8,
222
+ }
223
+ }
224
+ >
225
+ <View
226
+ style={
227
+ {
228
+ "paddingHorizontal": 8,
229
+ }
230
+ }
231
+ >
232
+ <RNSVGSvgView
233
+ align="xMidYMid"
234
+ bbHeight={24}
235
+ bbWidth={24}
236
+ focusable={false}
237
+ meetOrSlice={0}
238
+ minX={0}
239
+ minY={0}
240
+ style={
241
+ [
242
+ {
243
+ "backgroundColor": "transparent",
244
+ "borderWidth": 0,
245
+ },
246
+ {
247
+ "display": "flex",
248
+ "fill": "hsl(198, 35%, 21%)",
249
+ "height": 24,
250
+ "verticalAlign": "middle",
251
+ "width": 24,
252
+ },
253
+ {
254
+ "flex": 0,
255
+ "height": 24,
256
+ "width": 24,
257
+ },
258
+ ]
259
+ }
260
+ testID="eye"
261
+ vbHeight={24}
262
+ vbWidth={24}
263
+ >
264
+ <RNSVGGroup
265
+ fill={
266
+ {
267
+ "payload": 4280499528,
268
+ "type": 0,
269
+ }
270
+ }
271
+ propList={
272
+ [
273
+ "fill",
274
+ ]
275
+ }
276
+ >
277
+ <RNSVGPath
278
+ d="M16 12a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm-2 0a2 2 0 1 0-4 0 2 2 0 0 0 4 0Z"
279
+ fill={
280
+ {
281
+ "payload": 4280499528,
282
+ "type": 0,
283
+ }
284
+ }
285
+ propList={
286
+ [
287
+ "fill",
288
+ ]
289
+ }
290
+ />
291
+ <RNSVGPath
292
+ d="M21.863 12.477C20.794 14.2 16.703 20 12 20c-4.702 0-8.795-5.8-9.863-7.523a.903.903 0 0 1 0-.954C3.205 9.8 7.297 4 12 4c4.703 0 8.794 5.8 9.863 7.523a.903.903 0 0 1 0 .954ZM20 12s-3.582-6-8-6-8 6-8 6 3.582 6 8 6 8-6 8-6Z"
293
+ fill={
294
+ {
295
+ "payload": 4280499528,
296
+ "type": 0,
297
+ }
298
+ }
299
+ propList={
300
+ [
301
+ "fill",
302
+ ]
303
+ }
304
+ />
305
+ </RNSVGGroup>
306
+ </RNSVGSvgView>
307
+ </View>
308
+ <View
309
+ style={
310
+ {
311
+ "flexShrink": 1,
312
+ "paddingHorizontal": 8,
313
+ }
314
+ }
315
+ >
316
+ <Text
317
+ accessibilityRole="text"
318
+ adjustsFontSizeToFit={false}
319
+ allowFontScaling={true}
320
+ collapsable={false}
321
+ maxFontSizeMultiplier={3.125}
322
+ selectable={true}
323
+ selectionColor="hsl(86, 100%, 46%)"
324
+ style={
325
+ [
326
+ {
327
+ "fontFamily": "inter-semibold",
328
+ },
329
+ {
330
+ "color": "hsl(197, 15%, 43%)",
331
+ },
332
+ {
333
+ "textAlign": "left",
334
+ },
335
+ {
336
+ "fontSize": 16,
337
+ "lineHeight": 20,
338
+ },
339
+ {
340
+ "letterSpacing": 0,
341
+ },
342
+ ]
343
+ }
344
+ >
345
+ Preview
346
+ </Text>
347
+ </View>
348
+ </View>
349
+ </View>
350
+ </View>
351
+ </View>,
154
352
  ]
155
353
  `;
@@ -17,7 +17,7 @@ import { tokens as staticTokens } from "../utils/design";
17
17
  const MAX_TOAST_MESSAGE_LENGTH = 60;
18
18
  const ANNOUNCEMENT_DELAY = 100;
19
19
 
20
- function DefaultToast({ text1 }: ToastConfigParams<string>): JSX.Element {
20
+ function DefaultToast({ text1 }: ToastConfigParams<string>) {
21
21
  const { bottom } = useSafeAreaInsets();
22
22
  const { t } = useAtlantisI18n();
23
23
  const styles = useStyles();
@@ -56,7 +56,7 @@ export interface JobberToastProps {
56
56
  readonly bottomOffset?: number;
57
57
  }
58
58
 
59
- export function JobberToast({ bottomOffset }: JobberToastProps): JSX.Element {
59
+ export function JobberToast({ bottomOffset }: JobberToastProps) {
60
60
  return <Toast bottomOffset={bottomOffset} config={toastConfig} />;
61
61
  }
62
62
 
@@ -79,6 +79,67 @@ it("renders text with lowercase transform", () => {
79
79
  expect(typography.toJSON()).toMatchSnapshot();
80
80
  });
81
81
 
82
+ it("supports nested children and applies transform only to string children", () => {
83
+ const typography = render(
84
+ <Typography transform="uppercase">
85
+ before <Typography fontWeight="bold">Inner</Typography> after
86
+ </Typography>,
87
+ );
88
+ expect(typography.toJSON()).toMatchSnapshot();
89
+ });
90
+
91
+ it("allows child Typography to control its own transform", () => {
92
+ const view = render(
93
+ <Typography transform="uppercase">
94
+ {"before "}
95
+ <Typography fontWeight="bold" transform="lowercase">
96
+ Inner
97
+ </Typography>
98
+ {" after"}
99
+ </Typography>,
100
+ ).toJSON();
101
+
102
+ expect(view).toMatchSnapshot();
103
+ });
104
+
105
+ it("supports multi-level nesting across Typography and Text", () => {
106
+ const view = render(
107
+ <Typography transform="uppercase">
108
+ {"level1 "}
109
+ <Typography>
110
+ and <Typography transform="lowercase">INNER</Typography>
111
+ </Typography>
112
+ {" end"}
113
+ </Typography>,
114
+ ).toJSON();
115
+
116
+ expect(view).toMatchSnapshot();
117
+ });
118
+
119
+ it("applies transform to parent strings only", () => {
120
+ const { getByText } = render(
121
+ <Typography transform="uppercase">
122
+ {"test "}
123
+ <Typography>inner</Typography>
124
+ </Typography>,
125
+ );
126
+
127
+ expect(getByText(/TEST/)).toBeDefined();
128
+ expect(getByText("inner")).toBeDefined();
129
+ });
130
+
131
+ it("allows child transform to override parent transform", () => {
132
+ const { getByText } = render(
133
+ <Typography transform="uppercase">
134
+ before <Typography transform="lowercase">INNER</Typography> after
135
+ </Typography>,
136
+ );
137
+
138
+ expect(getByText(/BEFORE/)).toBeDefined();
139
+ expect(getByText("inner")).toBeDefined();
140
+ expect(getByText(/AFTER/)).toBeDefined();
141
+ });
142
+
82
143
  it("renders text with white color", () => {
83
144
  const typography = render(<Typography color="white">Test Text</Typography>);
84
145
  expect(typography.toJSON()).toMatchSnapshot();