@jobber/components-native 0.84.4-JOB-134681-8086ad4.25 → 0.84.4-JOB-138679-b1552ab.68

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 (278) hide show
  1. package/dist/package.json +23 -14
  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 +2 -2
  7. package/dist/src/Button/components/InternalButtonLoading/InternalButtonLoading.js +0 -1
  8. package/dist/src/ButtonGroup/ButtonGroup.js +1 -1
  9. package/dist/src/ContentOverlay/ContentOverlay.js +5 -7
  10. package/dist/src/ContentOverlay/UNSAFE_WrappedModalize.js +23 -0
  11. package/dist/src/ErrorMessageWrapper/context/ErrorMessageProvider.js +1 -1
  12. package/dist/src/Form/Form.js +5 -2
  13. package/dist/src/Form/components/FormCache/FormCache.js +1 -0
  14. package/dist/src/Form/components/FormMessageBanner/FormMessageBanner.js +1 -1
  15. package/dist/src/Form/context/AtlantisFormContext.js +1 -0
  16. package/dist/src/Form/hooks/useInternalForm.js +6 -3
  17. package/dist/src/FormatFile/components/MediaView/MediaView.js +22 -5
  18. package/dist/src/FormatFile/utils/createUseCreateThumbnail.js +1 -1
  19. package/dist/src/InputCurrency/InputCurrency.js +42 -30
  20. package/dist/src/InputDate/InputDate.js +2 -2
  21. package/dist/src/InputEmail/InputEmail.js +12 -4
  22. package/dist/src/InputFieldWrapper/InputFieldWrapper.js +14 -12
  23. package/dist/src/InputFieldWrapper/InputFieldWrapper.style.js +1 -1
  24. package/dist/src/InputFieldWrapper/components/Prefix/Prefix.js +5 -2
  25. package/dist/src/InputFieldWrapper/components/Suffix/Suffix.js +5 -2
  26. package/dist/src/InputNumber/InputNumber.js +10 -4
  27. package/dist/src/InputPressable/InputPressable.js +20 -8
  28. package/dist/src/InputPressable/InputPressable.style.js +3 -0
  29. package/dist/src/InputSearch/InputSearch.js +1 -1
  30. package/dist/src/InputText/InputText.js +22 -11
  31. package/dist/src/InputText/InputText.style.js +4 -0
  32. package/dist/src/InputTime/InputTime.js +2 -2
  33. package/dist/src/Menu/Menu.js +2 -2
  34. package/dist/src/Select/Select.style.js +1 -0
  35. package/dist/src/Select/components/SelectPressable/SelectPressable.js +1 -1
  36. package/dist/src/Switch/components/BaseSwitch/BaseSwitch.js +7 -1
  37. package/dist/src/Typography/Typography.js +16 -5
  38. package/dist/src/hooks/useAtlantisI18n/locales/en.json +1 -0
  39. package/dist/src/hooks/useAtlantisI18n/locales/es.json +1 -0
  40. package/dist/src/hooks/useFormController.js +5 -14
  41. package/dist/tsconfig.build.json +7 -0
  42. package/dist/tsconfig.build.tsbuildinfo +1 -0
  43. package/dist/tsconfig.json +4 -6
  44. package/dist/types/src/ActionItem/ActionItem.d.ts +2 -1
  45. package/dist/types/src/ActionItem/ActionItemGroup.d.ts +2 -1
  46. package/dist/types/src/ActionItem/components/ActionItemContainer.d.ts +2 -1
  47. package/dist/types/src/ActionLabel/ActionLabel.d.ts +4 -3
  48. package/dist/types/src/ActivityIndicator/ActivityIndicator.d.ts +2 -1
  49. package/dist/types/src/AutoLink/AutoLink.d.ts +2 -1
  50. package/dist/types/src/AutoLink/components/ComposeTextWithLinks/ComposeTextWithLinks.d.ts +2 -1
  51. package/dist/types/src/AutoLink/components/Link/Link.d.ts +2 -1
  52. package/dist/types/src/Banner/Banner.d.ts +2 -1
  53. package/dist/types/src/Banner/components/BannerIcon/BannerIcon.d.ts +2 -1
  54. package/dist/types/src/Banner/components/BannerIcon/BannerIcon.style.d.ts +3 -0
  55. package/dist/types/src/Banner/types.d.ts +1 -1
  56. package/dist/types/src/BottomSheet/BottomSheet.d.ts +1 -1
  57. package/dist/types/src/BottomSheet/components/BottomSheetOption/BottomSheetOption.d.ts +2 -1
  58. package/dist/types/src/Button/Button.d.ts +2 -1
  59. package/dist/types/src/Button/components/InternalButtonLoading/InternalButtonLoading.d.ts +1 -1
  60. package/dist/types/src/ButtonGroup/ButtonGroup.d.ts +2 -1
  61. package/dist/types/src/ButtonGroup/ButtonGroupAction.d.ts +4 -3
  62. package/dist/types/src/ButtonGroup/components/SecondaryActionSheet/SecondaryActionSheet.d.ts +3 -2
  63. package/dist/types/src/Card/Card.d.ts +2 -1
  64. package/dist/types/src/Card/components/InternalCardHeader.d.ts +2 -1
  65. package/dist/types/src/Checkbox/Checkbox.d.ts +2 -1
  66. package/dist/types/src/Checkbox/CheckboxGroup.d.ts +2 -1
  67. package/dist/types/src/Chip/Chip.d.ts +2 -1
  68. package/dist/types/src/Content/Content.d.ts +2 -1
  69. package/dist/types/src/ContentOverlay/ContentOverlay.d.ts +1 -1
  70. package/dist/types/src/ContentOverlay/UNSAFE_WrappedModalize.d.ts +3 -0
  71. package/dist/types/src/Disclosure/Disclosure.d.ts +1 -1
  72. package/dist/types/src/Divider/Divider.d.ts +2 -1
  73. package/dist/types/src/EmptyState/EmptyState.d.ts +2 -1
  74. package/dist/types/src/ErrorMessageWrapper/ErrorMessageWrapper.d.ts +2 -1
  75. package/dist/types/src/ErrorMessageWrapper/context/ErrorMessageProvider.d.ts +2 -1
  76. package/dist/types/src/ErrorMessageWrapper/context/types.d.ts +1 -1
  77. package/dist/types/src/Flex/Flex.d.ts +2 -1
  78. package/dist/types/src/Form/Form.d.ts +2 -1
  79. package/dist/types/src/Form/components/FormActionBar/FormActionBar.d.ts +3 -2
  80. package/dist/types/src/Form/components/FormBody/FormBody.d.ts +3 -2
  81. package/dist/types/src/Form/components/FormCache/FormCache.d.ts +4 -3
  82. package/dist/types/src/Form/components/FormErrorBanner/FormErrorBanner.d.ts +2 -1
  83. package/dist/types/src/Form/components/FormMask/FormMask.d.ts +2 -1
  84. package/dist/types/src/Form/components/FormMessage/FormMessage.d.ts +2 -1
  85. package/dist/types/src/Form/components/FormMessage/components/InternalFormMessage/InternalFormMessage.d.ts +2 -1
  86. package/dist/types/src/Form/components/FormMessageBanner/FormMessageBanner.d.ts +2 -1
  87. package/dist/types/src/Form/components/FormSaveButton/FormSaveButton.d.ts +2 -1
  88. package/dist/types/src/Form/context/AtlantisFormContext.d.ts +2 -1
  89. package/dist/types/src/Form/context/types.d.ts +3 -2
  90. package/dist/types/src/Form/hooks/useFormViewRefs.d.ts +2 -2
  91. package/dist/types/src/Form/hooks/useInternalForm.d.ts +5 -5
  92. package/dist/types/src/Form/types.d.ts +13 -7
  93. package/dist/types/src/FormField/FormField.d.ts +1 -1
  94. package/dist/types/src/FormatFile/FormatFile.d.ts +2 -1
  95. package/dist/types/src/FormatFile/components/ErrorIcon/ErrorIcon.d.ts +2 -1
  96. package/dist/types/src/FormatFile/components/FileView/FileView.d.ts +2 -1
  97. package/dist/types/src/FormatFile/components/FormatFileBottomSheet/FormatFileBottomSheet.d.ts +3 -2
  98. package/dist/types/src/FormatFile/components/MediaView/MediaView.d.ts +2 -1
  99. package/dist/types/src/FormatFile/components/ProgressBar/ProgressBar.d.ts +2 -1
  100. package/dist/types/src/Heading/Heading.d.ts +4 -3
  101. package/dist/types/src/Icon/Icon.d.ts +2 -1
  102. package/dist/types/src/IconButton/IconButton.d.ts +1 -1
  103. package/dist/types/src/InputCurrency/InputCurrency.d.ts +2 -1
  104. package/dist/types/src/InputDate/InputDate.d.ts +4 -2
  105. package/dist/types/src/InputFieldWrapper/InputFieldWrapper.d.ts +9 -2
  106. package/dist/types/src/InputFieldWrapper/InputFieldWrapper.style.d.ts +1 -1
  107. package/dist/types/src/InputFieldWrapper/components/ClearAction/ClearAction.d.ts +2 -1
  108. package/dist/types/src/InputFieldWrapper/components/Prefix/Prefix.d.ts +4 -4
  109. package/dist/types/src/InputFieldWrapper/components/Suffix/Suffix.d.ts +4 -4
  110. package/dist/types/src/InputPressable/InputPressable.d.ts +9 -1
  111. package/dist/types/src/InputPressable/InputPressable.style.d.ts +3 -0
  112. package/dist/types/src/InputSearch/InputSearch.d.ts +1 -1
  113. package/dist/types/src/InputSearch/components/FilterButton.d.ts +2 -1
  114. package/dist/types/src/InputText/InputText.d.ts +10 -2
  115. package/dist/types/src/InputText/InputText.style.d.ts +4 -0
  116. package/dist/types/src/InputText/context/InputAccessoriesProvider.d.ts +2 -1
  117. package/dist/types/src/InputTime/InputTime.d.ts +4 -2
  118. package/dist/types/src/Menu/Menu.d.ts +2 -1
  119. package/dist/types/src/Menu/components/MenuOption/MenuOption.d.ts +2 -1
  120. package/dist/types/src/Menu/components/Overlay/Overlay.d.ts +2 -1
  121. package/dist/types/src/Menu/types.d.ts +6 -1
  122. package/dist/types/src/ProgressBar/ProgressBar.d.ts +2 -1
  123. package/dist/types/src/ProgressBar/ProgressBarInner.d.ts +2 -1
  124. package/dist/types/src/Select/Select.d.ts +3 -2
  125. package/dist/types/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.d.ts +2 -1
  126. package/dist/types/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.ios.d.ts +2 -1
  127. package/dist/types/src/Select/components/SelectInternalPicker/SelectInternalPicker.d.ts +2 -1
  128. package/dist/types/src/Select/components/SelectPressable/SelectPressable.d.ts +2 -1
  129. package/dist/types/src/StatusLabel/StatusLabel.d.ts +2 -1
  130. package/dist/types/src/Switch/Switch.d.ts +2 -1
  131. package/dist/types/src/Switch/components/BaseSwitch/BaseSwitch.d.ts +2 -1
  132. package/dist/types/src/Text/Text.d.ts +4 -3
  133. package/dist/types/src/TextList/TextList.d.ts +2 -1
  134. package/dist/types/src/ThumbnailList/ThumbnailList.d.ts +2 -1
  135. package/dist/types/src/Toast/Toast.d.ts +2 -1
  136. package/dist/types/src/Typography/Typography.d.ts +3 -3
  137. package/dist/types/src/Typography/TypographyGestureDetector.d.ts +2 -1
  138. package/dist/types/src/utils/test/MockSafeAreaProvider.d.ts +1 -1
  139. package/package.json +23 -14
  140. package/src/ActionItem/ActionItem.tsx +1 -1
  141. package/src/ActionItem/ActionItemGroup.tsx +1 -3
  142. package/src/ActionItem/components/ActionItemContainer.tsx +1 -1
  143. package/src/ActionLabel/ActionLabel.test.tsx +12 -0
  144. package/src/ActionLabel/ActionLabel.tsx +3 -3
  145. package/src/ActionLabel/__snapshots__/ActionLabel.test.tsx.snap +66 -0
  146. package/src/ActivityIndicator/ActivityIndicator.tsx +1 -3
  147. package/src/AtlantisContext/AtlantisContext.test.tsx +1 -1
  148. package/src/AtlantisThemeContext/AtlantisThemeContext.test.tsx +5 -5
  149. package/src/AutoLink/AutoLink.test.tsx +2 -4
  150. package/src/AutoLink/AutoLink.tsx +1 -1
  151. package/src/AutoLink/components/ComposeTextWithLinks/ComposeTextWithLinks.tsx +1 -1
  152. package/src/AutoLink/components/Link/Link.tsx +1 -5
  153. package/src/Banner/Banner.test.tsx +12 -0
  154. package/src/Banner/Banner.tsx +4 -2
  155. package/src/Banner/components/BannerIcon/BannerIcon.style.ts +3 -0
  156. package/src/Banner/components/BannerIcon/BannerIcon.tsx +1 -1
  157. package/src/Banner/types.ts +1 -1
  158. package/src/BottomSheet/BottomSheet.test.tsx +17 -17
  159. package/src/BottomSheet/BottomSheet.tsx +4 -3
  160. package/src/BottomSheet/components/BottomSheetOption/BottomSheetOption.tsx +1 -1
  161. package/src/Button/Button.tsx +1 -1
  162. package/src/Button/components/InternalButtonLoading/InternalButtonLoading.tsx +1 -2
  163. package/src/ButtonGroup/ButtonGroup.test.tsx +13 -11
  164. package/src/ButtonGroup/ButtonGroup.tsx +2 -2
  165. package/src/ButtonGroup/ButtonGroupAction.tsx +4 -4
  166. package/src/ButtonGroup/components/SecondaryActionSheet/SecondaryActionSheet.tsx +2 -2
  167. package/src/Card/Card.tsx +1 -1
  168. package/src/Card/components/InternalCardHeader.tsx +1 -1
  169. package/src/Checkbox/Checkbox.tsx +2 -2
  170. package/src/Checkbox/CheckboxGroup.test.tsx +3 -7
  171. package/src/Checkbox/CheckboxGroup.tsx +2 -2
  172. package/src/Chip/Chip.tsx +1 -1
  173. package/src/Content/Content.tsx +1 -1
  174. package/src/ContentOverlay/ContentOverlay.test.tsx +34 -27
  175. package/src/ContentOverlay/ContentOverlay.tsx +7 -7
  176. package/src/ContentOverlay/UNSAFE_WrappedModalize.tsx +41 -0
  177. package/src/ContentOverlay/hooks/useKeyboardVisibility.test.ts +7 -7
  178. package/src/ContentOverlay/hooks/useViewLayoutHeight.test.ts +1 -1
  179. package/src/Disclosure/Disclosure.tsx +1 -1
  180. package/src/Divider/Divider.tsx +1 -1
  181. package/src/EmptyState/EmptyState.test.tsx +29 -42
  182. package/src/EmptyState/EmptyState.tsx +1 -1
  183. package/src/ErrorMessageWrapper/ErrorMessageWrapper.tsx +1 -1
  184. package/src/ErrorMessageWrapper/context/ErrorMessageProvider.tsx +3 -5
  185. package/src/ErrorMessageWrapper/context/types.ts +1 -1
  186. package/src/Flex/Flex.tsx +2 -2
  187. package/src/Form/Form.test.tsx +145 -2
  188. package/src/Form/Form.tsx +8 -1
  189. package/src/Form/components/FormActionBar/FormActionBar.tsx +3 -3
  190. package/src/Form/components/FormBody/FormBody.tsx +3 -3
  191. package/src/Form/components/FormCache/FormCache.tsx +5 -4
  192. package/src/Form/components/FormErrorBanner/FormErrorBanner.tsx +1 -1
  193. package/src/Form/components/FormMask/FormMask.tsx +1 -1
  194. package/src/Form/components/FormMessage/FormMessage.test.tsx +40 -27
  195. package/src/Form/components/FormMessage/FormMessage.tsx +1 -1
  196. package/src/Form/components/FormMessage/components/InternalFormMessage/InternalFormMessage.tsx +1 -1
  197. package/src/Form/components/FormMessageBanner/FormMessageBanner.tsx +1 -3
  198. package/src/Form/components/FormSaveButton/FormSaveButton.test.tsx +2 -2
  199. package/src/Form/components/FormSaveButton/FormSaveButton.tsx +1 -1
  200. package/src/Form/context/AtlantisFormContext.test.tsx +1 -1
  201. package/src/Form/context/AtlantisFormContext.tsx +1 -0
  202. package/src/Form/context/types.ts +3 -2
  203. package/src/Form/hooks/useFormViewRefs.ts +4 -5
  204. package/src/Form/hooks/useInternalForm.ts +12 -4
  205. package/src/Form/hooks/useScrollToError/useScrollToError.test.tsx +2 -1
  206. package/src/Form/types.ts +14 -8
  207. package/src/FormField/FormField.tsx +1 -1
  208. package/src/FormatFile/FormatFile.test.tsx +21 -21
  209. package/src/FormatFile/FormatFile.tsx +3 -3
  210. package/src/FormatFile/components/ErrorIcon/ErrorIcon.tsx +1 -1
  211. package/src/FormatFile/components/FileView/FileView.tsx +1 -1
  212. package/src/FormatFile/components/FormatFileBottomSheet/FormatFileBottomSheet.test.tsx +14 -14
  213. package/src/FormatFile/components/FormatFileBottomSheet/FormatFileBottomSheet.tsx +2 -2
  214. package/src/FormatFile/components/MediaView/MediaView.test.tsx +283 -0
  215. package/src/FormatFile/components/MediaView/MediaView.tsx +28 -7
  216. package/src/FormatFile/components/ProgressBar/ProgressBar.tsx +1 -1
  217. package/src/FormatFile/utils/createUseCreateThumbnail.ts +1 -1
  218. package/src/Glimmer/Glimmer.test.tsx +2 -2
  219. package/src/Heading/Heading.test.tsx +13 -0
  220. package/src/Heading/Heading.tsx +3 -3
  221. package/src/Heading/__snapshots__/Heading.test.tsx.snap +65 -0
  222. package/src/Icon/Icon.tsx +1 -1
  223. package/src/Icon/__snapshots__/Icon.test.tsx.snap +7 -0
  224. package/src/IconButton/IconButton.tsx +1 -1
  225. package/src/InputCurrency/InputCurrency.tsx +72 -58
  226. package/src/InputDate/InputDate.tsx +7 -3
  227. package/src/InputEmail/InputEmail.tsx +15 -8
  228. package/src/InputFieldWrapper/InputFieldWrapper.style.ts +1 -1
  229. package/src/InputFieldWrapper/InputFieldWrapper.test.tsx +48 -1
  230. package/src/InputFieldWrapper/InputFieldWrapper.tsx +39 -29
  231. package/src/InputFieldWrapper/components/ClearAction/ClearAction.tsx +1 -1
  232. package/src/InputFieldWrapper/components/Prefix/Prefix.test.tsx +8 -16
  233. package/src/InputFieldWrapper/components/Prefix/Prefix.tsx +8 -6
  234. package/src/InputFieldWrapper/components/Suffix/Suffix.test.tsx +2 -4
  235. package/src/InputFieldWrapper/components/Suffix/Suffix.tsx +8 -6
  236. package/src/InputNumber/InputNumber.tsx +11 -7
  237. package/src/InputPassword/InputPassword.tsx +1 -1
  238. package/src/InputPressable/InputPressable.style.ts +4 -0
  239. package/src/InputPressable/InputPressable.test.tsx +75 -1
  240. package/src/InputPressable/InputPressable.tsx +34 -8
  241. package/src/InputSearch/InputSearch.tsx +2 -1
  242. package/src/InputSearch/components/FilterButton.tsx +1 -1
  243. package/src/InputText/InputText.style.ts +5 -0
  244. package/src/InputText/InputText.test.tsx +75 -0
  245. package/src/InputText/InputText.tsx +34 -17
  246. package/src/InputText/context/InputAccessoriesProvider.tsx +1 -1
  247. package/src/InputTime/InputTime.tsx +7 -3
  248. package/src/Menu/Menu.tsx +3 -3
  249. package/src/Menu/components/MenuOption/MenuOption.tsx +1 -1
  250. package/src/Menu/components/Overlay/Overlay.tsx +1 -1
  251. package/src/Menu/types.ts +7 -1
  252. package/src/ProgressBar/ProgressBar.tsx +1 -1
  253. package/src/ProgressBar/ProgressBarInner.tsx +1 -1
  254. package/src/Select/Select.style.ts +1 -0
  255. package/src/Select/Select.tsx +2 -2
  256. package/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.ios.tsx +1 -1
  257. package/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.tsx +1 -1
  258. package/src/Select/components/SelectInternalPicker/SelectInternalPicker.tsx +1 -1
  259. package/src/Select/components/SelectPressable/SelectPressable.tsx +1 -4
  260. package/src/StatusLabel/StatusLabel.tsx +1 -1
  261. package/src/Switch/Switch.tsx +1 -1
  262. package/src/Switch/components/BaseSwitch/BaseSwitch.tsx +8 -2
  263. package/src/Text/Text.test.tsx +10 -0
  264. package/src/Text/Text.tsx +3 -3
  265. package/src/Text/__snapshots__/Text.test.tsx.snap +66 -0
  266. package/src/TextList/TextList.tsx +1 -1
  267. package/src/ThumbnailList/ThumbnailList.test.tsx +5 -5
  268. package/src/ThumbnailList/ThumbnailList.tsx +1 -1
  269. package/src/Toast/Toast.tsx +2 -2
  270. package/src/Typography/Typography.test.tsx +61 -0
  271. package/src/Typography/Typography.tsx +25 -9
  272. package/src/Typography/TypographyGestureDetector.tsx +1 -3
  273. package/src/Typography/__snapshots__/Typography.test.tsx.snap +222 -0
  274. package/src/hooks/useAtlantisI18n/locales/en.json +1 -0
  275. package/src/hooks/useAtlantisI18n/locales/es.json +1 -0
  276. package/src/hooks/useFormController.ts +6 -13
  277. package/src/utils/test/MockSafeAreaProvider.tsx +1 -1
  278. package/dist/tsconfig.tsbuildinfo +0 -1
@@ -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
 
@@ -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();
@@ -41,9 +41,9 @@ export interface TypographyProps<T extends FontFamily> {
41
41
  readonly size?: TextSize;
42
42
 
43
43
  /**
44
- * Text to display
44
+ * Text to display. Supports nesting text elements.
45
45
  */
46
- readonly children?: string;
46
+ readonly children?: React.ReactNode;
47
47
 
48
48
  /**
49
49
  * The maximum amount of lines the text can occupy before being truncated with "...".
@@ -174,7 +174,7 @@ function InternalTypography<T extends FontFamily = "base">({
174
174
  UNSAFE_style,
175
175
  selectable = true,
176
176
  onTextLayout,
177
- }: TypographyProps<T>): JSX.Element {
177
+ }: TypographyProps<T>) {
178
178
  const styles = useTypographyStyles();
179
179
  const sizeAndHeight = getSizeAndHeightStyle(size, styles, lineHeight);
180
180
  const style: StyleProp<ViewStyle>[] = [
@@ -204,7 +204,7 @@ function InternalTypography<T extends FontFamily = "base">({
204
204
 
205
205
  const numberOfLinesForNativeText = maxNumberOfLines[maxLines];
206
206
 
207
- const text = getTransformedText(children, transform);
207
+ const content = transformChildren(children, transform);
208
208
  const accessibilityProps: AccessibilityProps = hideFromScreenReader
209
209
  ? {
210
210
  accessibilityRole: "none",
@@ -232,7 +232,7 @@ function InternalTypography<T extends FontFamily = "base">({
232
232
  selectionColor={tokens["color-brand--highlight"]}
233
233
  onTextLayout={onTextLayout}
234
234
  >
235
- {text}
235
+ {content}
236
236
  </Text>
237
237
  );
238
238
 
@@ -273,19 +273,35 @@ function getFontStyle(
273
273
  }
274
274
  }
275
275
 
276
- function getTransformedText(text?: string, transform?: TextTransform) {
276
+ function getTransformedText(text: string, transform?: TextTransform) {
277
277
  switch (transform) {
278
278
  case "lowercase":
279
- return text?.toLocaleLowerCase();
279
+ return text.toLocaleLowerCase();
280
280
  case "uppercase":
281
- return text?.toLocaleUpperCase();
281
+ return text.toLocaleUpperCase();
282
282
  case "capitalize":
283
- return capitalize(text || "");
283
+ return capitalize(text);
284
284
  default:
285
285
  return text;
286
286
  }
287
287
  }
288
288
 
289
+ function transformChildren(
290
+ children: React.ReactNode,
291
+ transform?: TextTransform,
292
+ ): React.ReactNode {
293
+ if (children == null || !transform || transform === "none") return children;
294
+
295
+ return React.Children.map(children, child => {
296
+ if (typeof child === "string") {
297
+ return getTransformedText(child, transform);
298
+ }
299
+
300
+ // Keep non-string children (numbers, elements, fragments) unchanged
301
+ return child;
302
+ });
303
+ }
304
+
289
305
  function getColorStyle(
290
306
  styles: ReturnType<typeof useTypographyStyles>,
291
307
  color?: TextColor,
@@ -7,8 +7,6 @@ import { Gesture, GestureDetector } from "react-native-gesture-handler";
7
7
  * accidental highlighting of text in Android devices
8
8
  * https://github.com/software-mansion/react-native-gesture-handler/issues/1372
9
9
  */
10
- export function TypographyGestureDetector(
11
- props: PropsWithChildren<unknown>,
12
- ): JSX.Element {
10
+ export function TypographyGestureDetector(props: PropsWithChildren<unknown>) {
13
11
  return <GestureDetector {...props} gesture={Gesture.Native()} />;
14
12
  }
@@ -1,5 +1,69 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
+ exports[`allows child Typography to control its own transform 1`] = `
4
+ <Text
5
+ accessibilityRole="text"
6
+ adjustsFontSizeToFit={false}
7
+ allowFontScaling={true}
8
+ collapsable={false}
9
+ selectable={true}
10
+ selectionColor="hsl(86, 100%, 46%)"
11
+ style={
12
+ [
13
+ {
14
+ "fontFamily": "inter-regular",
15
+ },
16
+ {
17
+ "color": "hsl(197, 15%, 43%)",
18
+ },
19
+ {
20
+ "textAlign": "left",
21
+ },
22
+ {
23
+ "fontSize": 16,
24
+ "lineHeight": 20,
25
+ },
26
+ {
27
+ "letterSpacing": 0,
28
+ },
29
+ ]
30
+ }
31
+ >
32
+ BEFORE
33
+ <Text
34
+ accessibilityRole="text"
35
+ adjustsFontSizeToFit={false}
36
+ allowFontScaling={true}
37
+ collapsable={false}
38
+ selectable={true}
39
+ selectionColor="hsl(86, 100%, 46%)"
40
+ style={
41
+ [
42
+ {
43
+ "fontFamily": "inter-bold",
44
+ },
45
+ {
46
+ "color": "hsl(197, 15%, 43%)",
47
+ },
48
+ {
49
+ "textAlign": "left",
50
+ },
51
+ {
52
+ "fontSize": 16,
53
+ "lineHeight": 20,
54
+ },
55
+ {
56
+ "letterSpacing": 0,
57
+ },
58
+ ]
59
+ }
60
+ >
61
+ inner
62
+ </Text>
63
+ AFTER
64
+ </Text>
65
+ `;
66
+
3
67
  exports[`renders text respecting the text direction 1`] = `
4
68
  <Text
5
69
  accessibilityRole="text"
@@ -902,6 +966,164 @@ exports[`renders text with white color 1`] = `
902
966
  </Text>
903
967
  `;
904
968
 
969
+ exports[`supports multi-level nesting across Typography and Text 1`] = `
970
+ <Text
971
+ accessibilityRole="text"
972
+ adjustsFontSizeToFit={false}
973
+ allowFontScaling={true}
974
+ collapsable={false}
975
+ selectable={true}
976
+ selectionColor="hsl(86, 100%, 46%)"
977
+ style={
978
+ [
979
+ {
980
+ "fontFamily": "inter-regular",
981
+ },
982
+ {
983
+ "color": "hsl(197, 15%, 43%)",
984
+ },
985
+ {
986
+ "textAlign": "left",
987
+ },
988
+ {
989
+ "fontSize": 16,
990
+ "lineHeight": 20,
991
+ },
992
+ {
993
+ "letterSpacing": 0,
994
+ },
995
+ ]
996
+ }
997
+ >
998
+ LEVEL1
999
+ <Text
1000
+ accessibilityRole="text"
1001
+ adjustsFontSizeToFit={false}
1002
+ allowFontScaling={true}
1003
+ collapsable={false}
1004
+ selectable={true}
1005
+ selectionColor="hsl(86, 100%, 46%)"
1006
+ style={
1007
+ [
1008
+ {
1009
+ "fontFamily": "inter-regular",
1010
+ },
1011
+ {
1012
+ "color": "hsl(197, 15%, 43%)",
1013
+ },
1014
+ {
1015
+ "textAlign": "left",
1016
+ },
1017
+ {
1018
+ "fontSize": 16,
1019
+ "lineHeight": 20,
1020
+ },
1021
+ {
1022
+ "letterSpacing": 0,
1023
+ },
1024
+ ]
1025
+ }
1026
+ >
1027
+ and
1028
+ <Text
1029
+ accessibilityRole="text"
1030
+ adjustsFontSizeToFit={false}
1031
+ allowFontScaling={true}
1032
+ collapsable={false}
1033
+ selectable={true}
1034
+ selectionColor="hsl(86, 100%, 46%)"
1035
+ style={
1036
+ [
1037
+ {
1038
+ "fontFamily": "inter-regular",
1039
+ },
1040
+ {
1041
+ "color": "hsl(197, 15%, 43%)",
1042
+ },
1043
+ {
1044
+ "textAlign": "left",
1045
+ },
1046
+ {
1047
+ "fontSize": 16,
1048
+ "lineHeight": 20,
1049
+ },
1050
+ {
1051
+ "letterSpacing": 0,
1052
+ },
1053
+ ]
1054
+ }
1055
+ >
1056
+ inner
1057
+ </Text>
1058
+ </Text>
1059
+ END
1060
+ </Text>
1061
+ `;
1062
+
1063
+ exports[`supports nested children and applies transform only to string children 1`] = `
1064
+ <Text
1065
+ accessibilityRole="text"
1066
+ adjustsFontSizeToFit={false}
1067
+ allowFontScaling={true}
1068
+ collapsable={false}
1069
+ selectable={true}
1070
+ selectionColor="hsl(86, 100%, 46%)"
1071
+ style={
1072
+ [
1073
+ {
1074
+ "fontFamily": "inter-regular",
1075
+ },
1076
+ {
1077
+ "color": "hsl(197, 15%, 43%)",
1078
+ },
1079
+ {
1080
+ "textAlign": "left",
1081
+ },
1082
+ {
1083
+ "fontSize": 16,
1084
+ "lineHeight": 20,
1085
+ },
1086
+ {
1087
+ "letterSpacing": 0,
1088
+ },
1089
+ ]
1090
+ }
1091
+ >
1092
+ BEFORE
1093
+ <Text
1094
+ accessibilityRole="text"
1095
+ adjustsFontSizeToFit={false}
1096
+ allowFontScaling={true}
1097
+ collapsable={false}
1098
+ selectable={true}
1099
+ selectionColor="hsl(86, 100%, 46%)"
1100
+ style={
1101
+ [
1102
+ {
1103
+ "fontFamily": "inter-bold",
1104
+ },
1105
+ {
1106
+ "color": "hsl(197, 15%, 43%)",
1107
+ },
1108
+ {
1109
+ "textAlign": "left",
1110
+ },
1111
+ {
1112
+ "fontSize": 16,
1113
+ "lineHeight": 20,
1114
+ },
1115
+ {
1116
+ "letterSpacing": 0,
1117
+ },
1118
+ ]
1119
+ }
1120
+ >
1121
+ Inner
1122
+ </Text>
1123
+ AFTER
1124
+ </Text>
1125
+ `;
1126
+
905
1127
  exports[`underline renders text with dashed underline 1`] = `
906
1128
  <Text
907
1129
  accessibilityRole="text"
@@ -18,6 +18,7 @@
18
18
  "goBack": "Go back",
19
19
  "InputFieldWrapper.clear": "Clear input",
20
20
  "InputPassword.enterPassword": "Enter a password",
21
+ "InputEmail.enterEmail": "Enter a valid email address (email@example.com)",
21
22
  "loading": "Loading",
22
23
  "menu": "Menu",
23
24
  "more": "More",
@@ -18,6 +18,7 @@
18
18
  "goBack": "Volver",
19
19
  "InputFieldWrapper.clear": "Borrar",
20
20
  "InputPassword.enterPassword": "Escriba una contraseña",
21
+ "InputEmail.enterEmail": "Introduzca una dirección de correo electrónico válida (email@example.com)",
21
22
  "loading": "Cargando",
22
23
  "menu": "Menú",
23
24
  "more": "Más",
@@ -4,7 +4,7 @@ import type {
4
4
  RegisterOptions,
5
5
  UseControllerReturn,
6
6
  } from "react-hook-form";
7
- import { useController, useForm, useFormContext } from "react-hook-form";
7
+ import { get, useController, useForm, useFormContext } from "react-hook-form";
8
8
  import { useState } from "react";
9
9
 
10
10
  interface UseFormControllerProps<T> {
@@ -44,18 +44,11 @@ export function useFormController<T>({
44
44
  });
45
45
 
46
46
  // The naming convention established by react-hook-form for arrays of fields is, for example, "emails.0.description".
47
- // This corresponds to the structure of the error object, e.g. { emails: { 0: { description: "foobar" } } }
48
- // We assume here that fields will either follow this period-delimited three-part convention, or else that they are simple and indivisible (e.g. "city").
49
- // TODO: Add support for two-part identifiers (e.g. "property.province")
50
- const fieldIdentifiers = fieldName.split(".");
51
- let error: FieldError | undefined;
52
-
53
- if (fieldIdentifiers.length === 3) {
54
- const [section, item, identifier] = fieldIdentifiers;
55
- error = errors[section]?.[item]?.[identifier];
56
- } else {
57
- error = errors[fieldName];
58
- }
47
+ // Preserve original behavior: only treat three-part names as nested paths.
48
+ // For anything else, perform a flat lookup to avoid behavioral changes.
49
+ const identifiers = fieldName.split(".");
50
+ const error =
51
+ identifiers.length === 3 ? get(errors, fieldName) : errors[fieldName];
59
52
 
60
53
  return { error, field };
61
54
  }
@@ -12,7 +12,7 @@ export function MockSafeAreaProvider({
12
12
  frame,
13
13
  insets,
14
14
  children,
15
- }: MockSafeAreaProviderProps): JSX.Element {
15
+ }: MockSafeAreaProviderProps) {
16
16
  const initialFrame: Rect = { x: 0, y: 0, width: 0, height: 0 };
17
17
  const initialInsets: EdgeInsets = { bottom: 50, top: 50, left: 0, right: 0 };
18
18