@jobber/components-native 0.84.4-JOB-124066-166e539.11 → 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 +24 -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 +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 +24 -15
  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
@@ -1,8 +1,8 @@
1
- import type { MutableRefObject, RefObject } from "react";
2
- import type { ControllerProps, DeepPartial, FieldPath, FieldValues, Mode, UnpackNestedValue, UseFormReturn } from "react-hook-form";
1
+ import type { ReactElement, RefObject } from "react";
2
+ import type { ControllerProps, DefaultValues, FieldPath, FieldValues, Mode, UseFormReturn } from "react-hook-form";
3
3
  import type { IconNames } from "@jobber/design";
4
4
  import type { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";
5
- export type FormValues<T> = UnpackNestedValue<T>;
5
+ export type FormValues<T> = T;
6
6
  export type FormErrors = FormNetworkErrors | FormUserErrors;
7
7
  export type FormBannerMessage = FormWarningMessage | FormNoticeMessage;
8
8
  export declare enum FormSubmitErrorType {
@@ -37,7 +37,7 @@ interface FormNoticeMessage {
37
37
  message: string;
38
38
  }
39
39
  export type FormRef<T extends FieldValues = FieldValues> = (UseFormReturn<T> & {
40
- scrollViewRef?: RefObject<KeyboardAwareScrollView>;
40
+ scrollViewRef?: RefObject<KeyboardAwareScrollView | null>;
41
41
  saveButtonHeight?: number;
42
42
  messageBannerHeight?: number;
43
43
  }) | undefined;
@@ -81,7 +81,7 @@ export interface FormProps<T extends FieldValues, SubmitResponseType> {
81
81
  * The initial values of the form inputs
82
82
  * This should be available as soon as initialLoading is set to false
83
83
  */
84
- initialValues?: FormValues<DeepPartial<T>>;
84
+ initialValues?: DefaultValues<T>;
85
85
  /**
86
86
  * When the validation should happen.
87
87
  * Possible values are "onBlur", "onChange", "onSubmit", "onTouched", and "all".
@@ -97,7 +97,7 @@ export interface FormProps<T extends FieldValues, SubmitResponseType> {
97
97
  /**
98
98
  * ref object to access react hook form methods and state
99
99
  */
100
- formRef?: MutableRefObject<FormRef<T> | undefined>;
100
+ formRef?: RefObject<FormRef<T> | undefined>;
101
101
  /**
102
102
  * Label to be displayed for the save button
103
103
  */
@@ -106,7 +106,7 @@ export interface FormProps<T extends FieldValues, SubmitResponseType> {
106
106
  * @deprecated use `secondaryAction` instead.
107
107
  * Override default save button in the sticky section of the form with another element.
108
108
  */
109
- renderStickySection?: (onSubmit: () => void, label: string | undefined, isSubmitting: boolean) => JSX.Element;
109
+ renderStickySection?: (onSubmit: () => void, label: string | undefined, isSubmitting: boolean) => ReactElement;
110
110
  /**
111
111
  * Adding a key will save a local copy of the form data that will be used to
112
112
  * recover values when the app is backgrounded or has crashed.
@@ -131,6 +131,12 @@ export interface FormProps<T extends FieldValues, SubmitResponseType> {
131
131
  * If a user opens the same form the data will only be loaded if the `localCacheId` matches
132
132
  */
133
133
  localCacheId?: string | string[];
134
+ /**
135
+ * If true, the local cache will be removed when the user navigates away from
136
+ * the dirty form even when offline. By default, cache is only removed on back when online.
137
+ * Defaults to false.
138
+ */
139
+ UNSAFE_allowDiscardLocalCacheWhenOffline?: boolean;
134
140
  /**
135
141
  * Secondary Action for ButtonGroup
136
142
  */
@@ -20,5 +20,5 @@ interface FormFieldProps<T> {
20
20
  */
21
21
  readonly validations?: RegisterOptions;
22
22
  }
23
- export declare function FormField<T>({ name, children, defaultValue: value, validations, }: FormFieldProps<T>): JSX.Element;
23
+ export declare function FormField<T>({ name, children, defaultValue: value, validations, }: FormFieldProps<T>): React.JSX.Element;
24
24
  export {};
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { BottomSheetOptionsSuffix } from "./components/FormatFileBottomSheet";
2
3
  import type { CreateThumbnail, File, FileUpload, FormattedFile } from "./types";
3
4
  export interface FormatFileProps<T> {
@@ -43,4 +44,4 @@ export interface FormatFileProps<T> {
43
44
  readonly showFileTypeIndicator?: boolean;
44
45
  readonly createThumbnail?: CreateThumbnail;
45
46
  }
46
- export declare function FormatFile<T extends File | FileUpload>({ file, accessibilityLabel, accessibilityHint, onTap, onRemove, bottomSheetOptionsSuffix, styleInGrid, testID, showFileTypeIndicator, createThumbnail, onPreviewPress, }: FormatFileProps<T>): JSX.Element;
47
+ export declare function FormatFile<T extends File | FileUpload>({ file, accessibilityLabel, accessibilityHint, onTap, onRemove, bottomSheetOptionsSuffix, styleInGrid, testID, showFileTypeIndicator, createThumbnail, onPreviewPress, }: FormatFileProps<T>): React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare function ErrorIcon(): JSX.Element;
1
+ import React from "react";
2
+ export declare function ErrorIcon(): React.JSX.Element;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { FormattedFile } from "../../types";
2
3
  interface FileViewProps {
3
4
  readonly accessibilityLabel?: string;
@@ -7,5 +8,5 @@ interface FileViewProps {
7
8
  readonly styleInGrid: boolean;
8
9
  readonly onUploadComplete: () => void;
9
10
  }
10
- export declare function FileView({ accessibilityLabel, styleInGrid, file, showOverlay, showError, onUploadComplete, }: FileViewProps): JSX.Element;
11
+ export declare function FileView({ accessibilityLabel, styleInGrid, file, showOverlay, showError, onUploadComplete, }: FileViewProps): React.JSX.Element;
11
12
  export {};
@@ -1,11 +1,12 @@
1
1
  import type { RefObject } from "react";
2
+ import React from "react";
2
3
  import type { BottomSheetRef } from "../../../BottomSheet/BottomSheet";
3
4
  export type BottomSheetOptionsSuffix = "receipt" | "image" | "file" | "video";
4
5
  interface FormatFileBottomSheetProps {
5
- readonly bottomSheetRef: RefObject<BottomSheetRef>;
6
+ readonly bottomSheetRef: RefObject<BottomSheetRef | null>;
6
7
  readonly onPreviewPress?: () => void;
7
8
  readonly onRemovePress?: () => void;
8
9
  readonly bottomSheetOptionsSuffix?: BottomSheetOptionsSuffix;
9
10
  }
10
- export declare const FormatFileBottomSheet: ({ bottomSheetRef, onPreviewPress, onRemovePress, bottomSheetOptionsSuffix, }: FormatFileBottomSheetProps) => JSX.Element;
11
+ export declare const FormatFileBottomSheet: ({ bottomSheetRef, onPreviewPress, onRemovePress, bottomSheetOptionsSuffix, }: FormatFileBottomSheetProps) => React.JSX.Element;
11
12
  export {};
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { FormattedFile } from "../../types";
2
3
  interface MediaViewProps {
3
4
  readonly accessibilityLabel?: string;
@@ -7,5 +8,5 @@ interface MediaViewProps {
7
8
  readonly styleInGrid: boolean;
8
9
  readonly onUploadComplete: () => void;
9
10
  }
10
- export declare function MediaView({ accessibilityLabel, showOverlay, showError, file, styleInGrid, onUploadComplete, }: MediaViewProps): JSX.Element;
11
+ export declare function MediaView({ accessibilityLabel, showOverlay, showError, file, styleInGrid, onUploadComplete, }: MediaViewProps): React.JSX.Element;
11
12
  export {};
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import { StatusCode } from "../../types";
2
3
  interface ProgressBarProps {
3
4
  /**
@@ -13,5 +14,5 @@ interface ProgressBarProps {
13
14
  */
14
15
  readonly onComplete?: () => void;
15
16
  }
16
- export declare const ProgressBar: ({ progress, status, onComplete, }: ProgressBarProps) => JSX.Element;
17
+ export declare const ProgressBar: ({ progress, status, onComplete, }: ProgressBarProps) => React.JSX.Element;
17
18
  export {};
@@ -1,11 +1,12 @@
1
+ import React from "react";
1
2
  import type { TextAlign, TextColor, TruncateLength, TypographyProps } from "../Typography";
2
3
  type HeadingColor = Extract<TextColor, "text" | "subdued" | "heading">;
3
4
  export type HeadingLevel = "title" | "subtitle" | "heading" | "subHeading";
4
5
  interface HeadingProps<T extends HeadingLevel> extends Pick<TypographyProps<"base">, "selectable"> {
5
6
  /**
6
- * Text to display.
7
+ * Text to display. Supports nesting text elements.
7
8
  */
8
- readonly children: string;
9
+ readonly children: React.ReactNode;
9
10
  /**
10
11
  * The type of heading, e.g., "Title"
11
12
  */
@@ -33,5 +34,5 @@ interface HeadingProps<T extends HeadingLevel> extends Pick<TypographyProps<"bas
33
34
  readonly allowFontScaling?: boolean;
34
35
  }
35
36
  export declare const HEADING_MAX_SCALED_FONT_SIZE: Record<HeadingLevel, number>;
36
- export declare function Heading<T extends HeadingLevel = "heading">({ children, level, variation, reverseTheme, align, maxLines, allowFontScaling, selectable, }: HeadingProps<T>): JSX.Element;
37
+ export declare function Heading<T extends HeadingLevel = "heading">({ children, level, variation, reverseTheme, align, maxLines, allowFontScaling, selectable, }: HeadingProps<T>): React.JSX.Element;
37
38
  export {};
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { IconColorNames, IconNames, IconSizes } from "@jobber/design";
2
3
  export interface IconProps {
3
4
  /** The icon to show. */
@@ -22,4 +23,4 @@ export interface IconProps {
22
23
  */
23
24
  readonly testID?: string;
24
25
  }
25
- export declare function Icon({ name, color, size, customColor, testID, }: IconProps): JSX.Element;
26
+ export declare function Icon({ name, color, size, customColor, testID, }: IconProps): React.JSX.Element;
@@ -31,5 +31,5 @@ interface IconButtonProps {
31
31
  */
32
32
  readonly testID?: string;
33
33
  }
34
- export declare function IconButton({ badge, name, color, customColor, onPress, accessibilityLabel, testID, }: IconButtonProps): JSX.Element;
34
+ export declare function IconButton({ badge, name, color, customColor, onPress, accessibilityLabel, testID, }: IconButtonProps): React.JSX.Element;
35
35
  export {};
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { FormatNumberOptions } from "react-intl";
2
3
  import type { ControllerRenderProps, FieldValues } from "react-hook-form";
3
4
  import type { InputTextProps } from "../InputText";
@@ -28,4 +29,4 @@ export interface InputCurrencyProps extends Omit<InputTextProps, "keyboard" | "o
28
29
  readonly keyboard?: "decimal-pad" | "numbers-and-punctuation";
29
30
  }
30
31
  export declare const getInternalValue: (props: InputCurrencyProps, field: ControllerRenderProps<FieldValues, string>, formatNumber: (value: number, opts?: FormatNumberOptions | undefined) => string) => string;
31
- export declare function InputCurrency(props: InputCurrencyProps): JSX.Element;
32
+ export declare function InputCurrency(props: InputCurrencyProps): React.JSX.Element;
@@ -1,8 +1,10 @@
1
+ import React from "react";
1
2
  import type { UseControllerProps } from "react-hook-form";
2
3
  import type { XOR } from "ts-xor";
3
4
  import type { Clearable } from "@jobber/hooks";
4
5
  import type { InputFieldWrapperProps } from "../InputFieldWrapper";
5
- interface BaseInputDateProps extends Pick<InputFieldWrapperProps, "invalid" | "disabled" | "placeholder"> {
6
+ import type { InputPressableProps } from "../InputPressable/InputPressable";
7
+ interface BaseInputDateProps extends Pick<InputFieldWrapperProps, "invalid" | "disabled" | "placeholder">, Pick<InputPressableProps, "showMiniLabel"> {
6
8
  /**
7
9
  * Defaulted to "always" so user can clear the dates whenever there's a value.
8
10
  */
@@ -70,5 +72,5 @@ export type InputDateProps = XOR<FormControlledInputDate, DevControlledInputDate
70
72
  /**
71
73
  * Allow users to select a date using the device date picker.
72
74
  */
73
- export declare function InputDate(props: InputDateProps): JSX.Element;
75
+ export declare function InputDate(props: InputDateProps): React.JSX.Element;
74
76
  export {};
@@ -26,7 +26,14 @@ export interface InputFieldWrapperProps {
26
26
  * Text that goes below the input to help the user understand the input
27
27
  */
28
28
  readonly assistiveText?: string;
29
- readonly hasMiniLabel?: boolean;
29
+ /**
30
+ * Controls how the placeholder text is displayed.
31
+ * - normal: the placeholder text will be displayed in the normal placeholder position
32
+ * - mini: the placeholder text will float above the input value
33
+ * - hidden: the placeholder text will not be displayed
34
+ * @default "normal"
35
+ */
36
+ readonly placeholderMode?: "normal" | "mini" | "hidden";
30
37
  readonly hasValue?: boolean;
31
38
  /**
32
39
  * Symbol to display before the text input
@@ -78,4 +85,4 @@ export interface InputFieldWrapperProps {
78
85
  }
79
86
  export declare const INPUT_FIELD_WRAPPER_GLIMMERS_TEST_ID = "ATL-InputFieldWrapper-Glimmers";
80
87
  export declare const INPUT_FIELD_WRAPPER_SPINNER_TEST_ID = "ATL-InputFieldWrapper-Spinner";
81
- export declare function InputFieldWrapper({ invalid, disabled, placeholder, assistiveText, prefix, suffix, hasMiniLabel, hasValue, error, focused, children, onClear, showClearAction, styleOverride, toolbar, toolbarVisibility, loading, loadingType, }: InputFieldWrapperProps): JSX.Element;
88
+ export declare function InputFieldWrapper({ invalid, disabled, placeholder, assistiveText, prefix, suffix, placeholderMode, hasValue, error, focused, children, onClear, showClearAction, styleOverride, toolbar, toolbarVisibility, loading, loadingType, }: InputFieldWrapperProps): React.JSX.Element;
@@ -23,6 +23,7 @@ export declare const useStyles: () => {
23
23
  right: number;
24
24
  bottom: number;
25
25
  left: number;
26
+ zIndex: number;
26
27
  };
27
28
  miniLabel: {
28
29
  top: number;
@@ -30,7 +31,6 @@ export declare const useStyles: () => {
30
31
  backgroundColor: string;
31
32
  marginRight: number;
32
33
  maxHeight: number;
33
- zIndex: number;
34
34
  };
35
35
  miniLabelShowClearAction: {
36
36
  backgroundColor: string;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  interface ClearActionProps {
2
3
  /**
3
4
  * Press handler
@@ -5,5 +6,5 @@ interface ClearActionProps {
5
6
  readonly onPress: () => void;
6
7
  readonly hasMarginRight?: boolean;
7
8
  }
8
- export declare function ClearAction({ onPress, hasMarginRight, }: ClearActionProps): JSX.Element;
9
+ export declare function ClearAction({ onPress, hasMarginRight, }: ClearActionProps): React.JSX.Element;
9
10
  export {};
@@ -1,22 +1,22 @@
1
+ import React from "react";
1
2
  import type { StyleProp, TextStyle, ViewStyle } from "react-native";
2
3
  import type { IconNames } from "@jobber/design";
3
4
  export interface PrefixLabelProps {
4
5
  readonly focused: boolean;
5
6
  readonly disabled?: boolean;
6
- readonly hasMiniLabel: boolean;
7
+ readonly miniLabelActive: boolean;
7
8
  readonly inputInvalid: boolean;
8
9
  readonly label: string;
9
10
  readonly styleOverride?: StyleProp<TextStyle>;
10
11
  }
11
12
  export declare const prefixLabelTestId = "ATL-InputFieldWrapper-PrefixLabel";
12
13
  export declare const prefixIconTestId = "ATL-InputFieldWrapper-PrefixIcon";
13
- export declare function PrefixLabel({ focused, disabled, hasMiniLabel, inputInvalid, label, styleOverride, }: PrefixLabelProps): JSX.Element;
14
+ export declare function PrefixLabel({ focused, disabled, miniLabelActive, inputInvalid, label, styleOverride, }: PrefixLabelProps): React.JSX.Element;
14
15
  export interface PrefixIconProps {
15
16
  readonly focused: boolean;
16
17
  readonly disabled?: boolean;
17
- readonly hasMiniLabel: boolean;
18
18
  readonly inputInvalid?: boolean;
19
19
  readonly icon: IconNames;
20
20
  readonly styleOverride?: StyleProp<ViewStyle>;
21
21
  }
22
- export declare function PrefixIcon({ focused, disabled, inputInvalid, icon, }: PrefixIconProps): JSX.Element;
22
+ export declare function PrefixIcon({ focused, disabled, inputInvalid, icon, }: PrefixIconProps): React.JSX.Element;
@@ -1,9 +1,10 @@
1
+ import React from "react";
1
2
  import type { StyleProp, TextStyle } from "react-native";
2
3
  import type { IconNames } from "@jobber/design";
3
4
  export interface SuffixLabelProps {
4
5
  readonly focused: boolean;
5
6
  readonly disabled?: boolean;
6
- readonly hasMiniLabel: boolean;
7
+ readonly miniLabelActive: boolean;
7
8
  readonly inputInvalid?: boolean;
8
9
  readonly label: string;
9
10
  readonly hasLeftMargin?: boolean;
@@ -11,14 +12,13 @@ export interface SuffixLabelProps {
11
12
  }
12
13
  export declare const suffixLabelTestId = "ATL-InputFieldWrapper-SuffixLabel";
13
14
  export declare const suffixIconTestId = "ATL-InputFieldWrapper-SuffixIcon";
14
- export declare function SuffixLabel({ focused, disabled, hasMiniLabel, inputInvalid, label, hasLeftMargin, styleOverride, }: SuffixLabelProps): JSX.Element;
15
+ export declare function SuffixLabel({ focused, disabled, miniLabelActive, inputInvalid, label, hasLeftMargin, styleOverride, }: SuffixLabelProps): React.JSX.Element;
15
16
  export interface SuffixIconProps {
16
17
  readonly focused: boolean;
17
18
  readonly disabled?: boolean;
18
- readonly hasMiniLabel: boolean;
19
19
  readonly inputInvalid?: boolean;
20
20
  readonly icon: IconNames;
21
21
  readonly hasLeftMargin?: boolean;
22
22
  readonly onPress?: () => void;
23
23
  }
24
- export declare function SuffixIcon({ focused, disabled, inputInvalid, icon, hasLeftMargin, onPress, }: SuffixIconProps): JSX.Element;
24
+ export declare function SuffixIcon({ focused, disabled, inputInvalid, icon, hasLeftMargin, onPress, }: SuffixIconProps): React.JSX.Element;
@@ -39,6 +39,14 @@ export interface InputPressableProps {
39
39
  * Indicates the current selection is invalid
40
40
  */
41
41
  readonly invalid?: boolean | string;
42
+ /**
43
+ * Controls the visibility of the mini label that appears inside the input
44
+ * when a value is entered. By default, the placeholder text moves up to
45
+ * become a mini label. Set to false to disable this behavior.
46
+ *
47
+ * @default true
48
+ */
49
+ readonly showMiniLabel?: boolean;
42
50
  /**
43
51
  * Callback that is called when the text input is focused
44
52
  * @param event
@@ -79,5 +87,5 @@ export interface InputPressableProps {
79
87
  }
80
88
  export type InputPressableRef = NativeText;
81
89
  export declare const InputPressable: React.ForwardRefExoticComponent<InputPressableProps & React.RefAttributes<NativeText>>;
82
- export declare function InputPressableInternal({ value, placeholder, disabled, invalid, error, onPress, accessibilityLabel, accessibilityHint, prefix, suffix, clearable, onClear, focused, }: InputPressableProps, ref: Ref<InputPressableRef>): JSX.Element;
90
+ export declare function InputPressableInternal({ value, placeholder, disabled, invalid, error, showMiniLabel, onPress, accessibilityLabel, accessibilityHint, prefix, suffix, clearable, onClear, focused, }: InputPressableProps, ref: Ref<InputPressableRef>): React.JSX.Element;
83
91
  export {};
@@ -15,4 +15,7 @@ export declare const useStyles: () => {
15
15
  inputInvalid: {
16
16
  borderColor: string;
17
17
  };
18
+ withoutMiniLabel: {
19
+ paddingTop: number;
20
+ };
18
21
  };
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import type { InputTextProps, InputTextRef } from "../InputText";
3
3
  export declare const InputSearch: React.ForwardRefExoticComponent<InputSearchProps & React.RefAttributes<InputTextRef>>;
4
- export interface InputSearchProps extends Pick<InputTextProps, "accessibilityHint" | "accessibilityLabel" | "autoFocus" | "placeholder" | "prefix"> {
4
+ export interface InputSearchProps extends Pick<InputTextProps, "accessibilityHint" | "accessibilityLabel" | "autoFocus" | "placeholder" | "prefix" | "showMiniLabel"> {
5
5
  /**
6
6
  * A callback function that handles the update of the new value of the property value.
7
7
  */
@@ -1,6 +1,7 @@
1
+ import React from "react";
1
2
  interface FilterButtonProps {
2
3
  readonly accessibilityLabel: string;
3
4
  readonly onClick: () => void;
4
5
  }
5
- export declare function FilterButton({ accessibilityLabel, onClick, }: FilterButtonProps): JSX.Element;
6
+ export declare function FilterButton({ accessibilityLabel, onClick, }: FilterButtonProps): React.JSX.Element;
6
7
  export {};
@@ -1,6 +1,6 @@
1
1
  import type { SyntheticEvent } from "react";
2
2
  import React from "react";
3
- import type { NativeSyntheticEvent, StyleProp, TextInputFocusEventData, TextInputProps, TextStyle } from "react-native";
3
+ import type { FocusEvent, StyleProp, TextInputProps, TextStyle } from "react-native";
4
4
  import { TextInput } from "react-native";
5
5
  import type { RegisterOptions } from "react-hook-form";
6
6
  import type { IconNames } from "@jobber/design";
@@ -31,6 +31,14 @@ export interface InputTextProps extends Pick<InputFieldWrapperProps, "toolbar" |
31
31
  * Text that helps the user understand the input
32
32
  */
33
33
  readonly assistiveText?: string;
34
+ /**
35
+ * Controls the visibility of the mini label that appears inside the input
36
+ * when a value is entered. By default, the placeholder text moves up to
37
+ * become a mini label. Set to false to disable this behavior.
38
+ *
39
+ * @default true
40
+ */
41
+ readonly showMiniLabel?: boolean;
34
42
  /**
35
43
  * Determines what keyboard is shown
36
44
  */
@@ -65,7 +73,7 @@ export interface InputTextProps extends Pick<InputFieldWrapperProps, "toolbar" |
65
73
  * Callback that is called when the text input is focused
66
74
  * @param event
67
75
  */
68
- readonly onFocus?: (event?: NativeSyntheticEvent<TextInputFocusEventData>) => void;
76
+ readonly onFocus?: (event?: FocusEvent) => void;
69
77
  /**
70
78
  * Callback that is called when the text input is blurred
71
79
  */
@@ -14,4 +14,8 @@ export declare const useStyles: () => {
14
14
  multilineInputiOS: {
15
15
  paddingTop: number;
16
16
  };
17
+ multilineWithoutMiniLabel: {
18
+ paddingTop: number;
19
+ paddingBottom: number;
20
+ };
17
21
  };
@@ -1,4 +1,5 @@
1
1
  import type { ReactNode } from "react";
2
+ import React from "react";
2
3
  export declare function InputAccessoriesProvider({ children, }: {
3
4
  readonly children: ReactNode;
4
- }): JSX.Element;
5
+ }): React.JSX.Element;
@@ -1,8 +1,10 @@
1
+ import React from "react";
1
2
  import type { UseControllerProps } from "react-hook-form";
2
3
  import type { XOR } from "ts-xor";
3
4
  import type { Clearable } from "@jobber/hooks";
4
5
  import type { InputFieldWrapperProps } from "../InputFieldWrapper";
5
- interface InputTimeBaseProps extends Pick<InputFieldWrapperProps, "invalid" | "disabled" | "placeholder"> {
6
+ import type { InputPressableProps } from "../InputPressable/InputPressable";
7
+ interface InputTimeBaseProps extends Pick<InputFieldWrapperProps, "invalid" | "disabled" | "placeholder">, Pick<InputPressableProps, "showMiniLabel"> {
6
8
  /**
7
9
  * Defaulted to "always" so user can clear the time whenever there's a value.
8
10
  */
@@ -57,5 +59,5 @@ interface InputTimeDevControlled extends InputTimeBaseProps {
57
59
  readonly onChange: (value?: Date) => void;
58
60
  }
59
61
  export type InputTimeProps = XOR<InputTimeFormControlled, InputTimeDevControlled>;
60
- export declare function InputTime(props: InputTimeProps): JSX.Element;
62
+ export declare function InputTime(props: InputTimeProps): React.JSX.Element;
61
63
  export {};
@@ -1,2 +1,3 @@
1
+ import React from "react";
1
2
  import type { MenuProps } from "./types";
2
- export declare function Menu({ menuOptions, customActivator }: MenuProps): JSX.Element;
3
+ export declare function Menu({ menuOptions, customActivator }: MenuProps): React.JSX.Element;
@@ -1,2 +1,3 @@
1
+ import React from "react";
1
2
  import type { MenuOptionInternalProps } from "../../types";
2
- export declare function MenuOption({ label, icon, iconColor, textAlign, destructive, textTransform, onPress, setOpen, }: MenuOptionInternalProps): JSX.Element;
3
+ export declare function MenuOption({ label, icon, iconColor, textAlign, destructive, textTransform, onPress, setOpen, }: MenuOptionInternalProps): React.JSX.Element;
@@ -1,2 +1,3 @@
1
+ import React from "react";
1
2
  import type { OverlayProp } from "../../types";
2
- export declare function Overlay({ setOpen }: OverlayProp): JSX.Element;
3
+ export declare function Overlay({ setOpen }: OverlayProp): React.JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import type { IconColorNames, IconNames } from "@jobber/design";
2
+ import type { ReactElement } from "react";
2
3
  import type { TextAlign } from "../Typography";
3
4
  export interface MenuOptionProps {
4
5
  readonly label: string;
@@ -12,9 +13,13 @@ export interface MenuOptionProps {
12
13
  export interface MenuOptionInternalProps extends MenuOptionProps {
13
14
  setOpen: (bool: boolean) => void;
14
15
  }
16
+ export interface CustomActivatorProps {
17
+ readonly onPress?: () => void;
18
+ readonly onLongPress?: () => void;
19
+ }
15
20
  export interface MenuProps {
16
21
  readonly menuOptions?: MenuOptionProps[];
17
- readonly customActivator?: JSX.Element;
22
+ readonly customActivator?: ReactElement<CustomActivatorProps>;
18
23
  }
19
24
  export interface OverlayProp {
20
25
  setOpen: (bool: boolean) => void;
@@ -1,2 +1,3 @@
1
+ import React from "react";
1
2
  import type { ProgressBarProps } from "./types";
2
- export declare function ProgressBar({ loading, total, current, inProgress, reverseTheme, header, variation, size, }: ProgressBarProps): JSX.Element;
3
+ export declare function ProgressBar({ loading, total, current, inProgress, reverseTheme, header, variation, size, }: ProgressBarProps): React.JSX.Element;
@@ -1,8 +1,9 @@
1
+ import React from "react";
1
2
  interface ProgressBarInnerProps {
2
3
  readonly width: number;
3
4
  readonly animationDuration?: number;
4
5
  readonly color?: string;
5
6
  }
6
- export declare function ProgressBarInner({ width, color, }: ProgressBarInnerProps): JSX.Element;
7
+ export declare function ProgressBarInner({ width, color, }: ProgressBarInnerProps): React.JSX.Element;
7
8
  export declare function calculateWidth(total: number, current: number): number;
8
9
  export {};
@@ -1,4 +1,5 @@
1
1
  import type { ReactElement } from "react";
2
+ import React from "react";
2
3
  import type { RegisterOptions } from "react-hook-form";
3
4
  export interface SelectOption {
4
5
  /**
@@ -69,5 +70,5 @@ export interface SelectProps {
69
70
  */
70
71
  readonly testID?: string;
71
72
  }
72
- export declare function Select({ value, defaultValue, onChange, children, placeholder, label, assistiveText, disabled, invalid, validations, accessibilityLabel, name, testID, }: SelectProps): JSX.Element;
73
- export declare function Option({ children }: SelectOption): JSX.Element;
73
+ export declare function Select({ value, defaultValue, onChange, children, placeholder, label, assistiveText, disabled, invalid, validations, accessibilityLabel, name, testID, }: SelectProps): React.JSX.Element;
74
+ export declare function Option({ children }: SelectOption): React.JSX.Element;
@@ -1,4 +1,5 @@
1
+ import React from "react";
1
2
  import type { SelectInternalPickerProps } from "../../types";
2
3
  type SelectDefaultPickerProps = SelectInternalPickerProps;
3
- export declare function SelectDefaultPicker({ children, options, disabled, onChange, }: SelectDefaultPickerProps): JSX.Element;
4
+ export declare function SelectDefaultPicker({ children, options, disabled, onChange, }: SelectDefaultPickerProps): React.JSX.Element;
4
5
  export {};
@@ -1,4 +1,5 @@
1
+ import React from "react";
1
2
  import type { SelectInternalPickerProps } from "../../types";
2
3
  type SelectDefaultPickerProps = SelectInternalPickerProps;
3
- export declare function SelectDefaultPicker({ children, options, onChange, }: SelectDefaultPickerProps): JSX.Element;
4
+ export declare function SelectDefaultPicker({ children, options, onChange, }: SelectDefaultPickerProps): React.JSX.Element;
4
5
  export {};
@@ -1,2 +1,3 @@
1
+ import React from "react";
1
2
  import type { SelectInternalPickerProps } from "../../types";
2
- export declare function SelectInternalPicker({ children, options, disabled, onChange, }: SelectInternalPickerProps): JSX.Element;
3
+ export declare function SelectInternalPicker({ children, options, disabled, onChange, }: SelectInternalPickerProps): React.JSX.Element;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { PressableProps } from "react-native";
2
3
  import type { SelectInternalPickerProps } from "../../types";
3
4
  type SelectPressableProps = Pick<SelectInternalPickerProps, "children"> & Pick<PressableProps, "onPress">;
@@ -6,5 +7,5 @@ type SelectPressableProps = Pick<SelectInternalPickerProps, "children"> & Pick<P
6
7
  * screen-reader is being used to avoid screen-readers from ignoring the press
7
8
  * on the MenuView
8
9
  */
9
- export declare function SelectPressable({ children, onPress, }: SelectPressableProps): JSX.Element;
10
+ export declare function SelectPressable({ children, onPress }: SelectPressableProps): React.JSX.Element;
10
11
  export {};
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  export type StatusType = "success" | "warning" | "critical" | "inactive" | "informative";
2
3
  export interface StatusLabelType {
3
4
  readonly statusLabel: string;
@@ -17,5 +18,5 @@ interface StatusLabelProps {
17
18
  */
18
19
  readonly status?: StatusType;
19
20
  }
20
- export declare function StatusLabel({ text, alignment, status, }: StatusLabelProps): JSX.Element;
21
+ export declare function StatusLabel({ text, alignment, status, }: StatusLabelProps): React.JSX.Element;
21
22
  export {};
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { XOR } from "ts-xor";
2
3
  import type { BaseSwitchProps } from "./components/BaseSwitch";
3
4
  interface WithLabelProps extends BaseSwitchProps {
@@ -11,5 +12,5 @@ interface WithLabelProps extends BaseSwitchProps {
11
12
  readonly description?: string;
12
13
  }
13
14
  export type SwitchProps = XOR<BaseSwitchProps, WithLabelProps>;
14
- export declare function Switch(props: SwitchProps): JSX.Element;
15
+ export declare function Switch(props: SwitchProps): React.JSX.Element;
15
16
  export {};
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  export interface BaseSwitchProps {
2
3
  /**
3
4
  * Value of the switch
@@ -24,4 +25,4 @@ export interface BaseSwitchProps {
24
25
  */
25
26
  readonly name?: string;
26
27
  }
27
- export declare function BaseSwitch({ value, defaultValue, onValueChange, disabled, accessibilityLabel, name, }: BaseSwitchProps): JSX.Element;
28
+ export declare function BaseSwitch({ value, defaultValue, onValueChange, disabled, accessibilityLabel, name, }: BaseSwitchProps): React.JSX.Element;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { OnTextLayoutEvent, TextAlign, TextVariation, TruncateLength, TypographyProps } from "../Typography";
2
3
  import type { TypographyUnsafeStyle } from "../Typography/Typography";
3
4
  export interface TextProps extends Pick<TypographyProps<"base">, "maxFontScaleSize" | "selectable"> {
@@ -31,9 +32,9 @@ export interface TextProps extends Pick<TypographyProps<"base">, "maxFontScaleSi
31
32
  */
32
33
  readonly align?: TextAlign;
33
34
  /**
34
- * Text to display
35
+ * Text to display. Supports nesting text elements.
35
36
  */
36
- readonly children?: string;
37
+ readonly children?: React.ReactNode;
37
38
  /**
38
39
  * Reverse theme for better display on dark background
39
40
  */
@@ -73,4 +74,4 @@ export interface TextProps extends Pick<TypographyProps<"base">, "maxFontScaleSi
73
74
  }
74
75
  export type TextLevel = "text" | "textSupporting";
75
76
  export declare const TEXT_MAX_SCALED_FONT_SIZES: Record<TextLevel, number>;
76
- export declare function Text({ level, variation, emphasis, allowFontScaling, adjustsFontSizeToFit, maxLines, align, children, reverseTheme, strikeThrough, italic, hideFromScreenReader, maxFontScaleSize, UNSAFE_style, underline, selectable, onTextLayout, }: TextProps): JSX.Element;
77
+ export declare function Text({ level, variation, emphasis, allowFontScaling, adjustsFontSizeToFit, maxLines, align, children, reverseTheme, strikeThrough, italic, hideFromScreenReader, maxFontScaleSize, UNSAFE_style, underline, selectable, onTextLayout, }: TextProps): React.JSX.Element;