@jobber/components-native 0.91.1 → 0.91.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/dist/package.json +2 -2
  2. package/dist/src/ActionItem/ActionItemGroup.js +1 -1
  3. package/dist/src/AutoLink/components/Link/Link.js +1 -1
  4. package/dist/src/ErrorMessageWrapper/context/ErrorMessageProvider.js +1 -1
  5. package/dist/src/Form/components/FormMessageBanner/FormMessageBanner.js +1 -1
  6. package/dist/src/Select/components/SelectPressable/SelectPressable.js +1 -1
  7. package/dist/tsconfig.build.tsbuildinfo +1 -1
  8. package/dist/types/src/ActionItem/ActionItem.d.ts +2 -1
  9. package/dist/types/src/ActionItem/ActionItemGroup.d.ts +2 -1
  10. package/dist/types/src/ActionItem/components/ActionItemContainer.d.ts +2 -1
  11. package/dist/types/src/ActionLabel/ActionLabel.d.ts +1 -1
  12. package/dist/types/src/ActivityIndicator/ActivityIndicator.d.ts +2 -1
  13. package/dist/types/src/AutoLink/AutoLink.d.ts +2 -1
  14. package/dist/types/src/AutoLink/components/ComposeTextWithLinks/ComposeTextWithLinks.d.ts +2 -1
  15. package/dist/types/src/AutoLink/components/Link/Link.d.ts +2 -1
  16. package/dist/types/src/Banner/Banner.d.ts +2 -1
  17. package/dist/types/src/Banner/components/BannerIcon/BannerIcon.d.ts +2 -1
  18. package/dist/types/src/BottomSheet/components/BottomSheetOption/BottomSheetOption.d.ts +2 -1
  19. package/dist/types/src/Button/Button.d.ts +2 -1
  20. package/dist/types/src/Button/components/InternalButtonLoading/InternalButtonLoading.d.ts +1 -1
  21. package/dist/types/src/ButtonGroup/ButtonGroup.d.ts +2 -1
  22. package/dist/types/src/ButtonGroup/ButtonGroupAction.d.ts +4 -3
  23. package/dist/types/src/ButtonGroup/components/SecondaryActionSheet/SecondaryActionSheet.d.ts +2 -1
  24. package/dist/types/src/Card/Card.d.ts +2 -1
  25. package/dist/types/src/Card/components/InternalCardHeader.d.ts +2 -1
  26. package/dist/types/src/Checkbox/Checkbox.d.ts +2 -1
  27. package/dist/types/src/Checkbox/CheckboxGroup.d.ts +2 -1
  28. package/dist/types/src/Chip/Chip.d.ts +2 -1
  29. package/dist/types/src/Content/Content.d.ts +2 -1
  30. package/dist/types/src/Disclosure/Disclosure.d.ts +1 -1
  31. package/dist/types/src/Divider/Divider.d.ts +2 -1
  32. package/dist/types/src/EmptyState/EmptyState.d.ts +2 -1
  33. package/dist/types/src/ErrorMessageWrapper/ErrorMessageWrapper.d.ts +2 -1
  34. package/dist/types/src/ErrorMessageWrapper/context/ErrorMessageProvider.d.ts +2 -1
  35. package/dist/types/src/Flex/Flex.d.ts +2 -1
  36. package/dist/types/src/Form/Form.d.ts +2 -1
  37. package/dist/types/src/Form/components/FormActionBar/FormActionBar.d.ts +3 -2
  38. package/dist/types/src/Form/components/FormBody/FormBody.d.ts +3 -2
  39. package/dist/types/src/Form/components/FormCache/FormCache.d.ts +2 -1
  40. package/dist/types/src/Form/components/FormErrorBanner/FormErrorBanner.d.ts +2 -1
  41. package/dist/types/src/Form/components/FormMask/FormMask.d.ts +2 -1
  42. package/dist/types/src/Form/components/FormMessage/FormMessage.d.ts +2 -1
  43. package/dist/types/src/Form/components/FormMessage/components/InternalFormMessage/InternalFormMessage.d.ts +2 -1
  44. package/dist/types/src/Form/components/FormMessageBanner/FormMessageBanner.d.ts +2 -1
  45. package/dist/types/src/Form/components/FormSaveButton/FormSaveButton.d.ts +2 -1
  46. package/dist/types/src/Form/types.d.ts +2 -2
  47. package/dist/types/src/FormField/FormField.d.ts +1 -1
  48. package/dist/types/src/FormatFile/FormatFile.d.ts +2 -1
  49. package/dist/types/src/FormatFile/components/ErrorIcon/ErrorIcon.d.ts +2 -1
  50. package/dist/types/src/FormatFile/components/FileView/FileView.d.ts +2 -1
  51. package/dist/types/src/FormatFile/components/FormatFileBottomSheet/FormatFileBottomSheet.d.ts +2 -1
  52. package/dist/types/src/FormatFile/components/MediaView/MediaView.d.ts +2 -1
  53. package/dist/types/src/FormatFile/components/ProgressBar/ProgressBar.d.ts +2 -1
  54. package/dist/types/src/Heading/Heading.d.ts +1 -1
  55. package/dist/types/src/Icon/Icon.d.ts +2 -1
  56. package/dist/types/src/IconButton/IconButton.d.ts +1 -1
  57. package/dist/types/src/InputCurrency/InputCurrency.d.ts +2 -1
  58. package/dist/types/src/InputDate/InputDate.d.ts +2 -1
  59. package/dist/types/src/InputFieldWrapper/InputFieldWrapper.d.ts +1 -1
  60. package/dist/types/src/InputFieldWrapper/components/ClearAction/ClearAction.d.ts +2 -1
  61. package/dist/types/src/InputFieldWrapper/components/Prefix/Prefix.d.ts +3 -2
  62. package/dist/types/src/InputFieldWrapper/components/Suffix/Suffix.d.ts +3 -2
  63. package/dist/types/src/InputPressable/InputPressable.d.ts +1 -1
  64. package/dist/types/src/InputSearch/components/FilterButton.d.ts +2 -1
  65. package/dist/types/src/InputText/context/InputAccessoriesProvider.d.ts +2 -1
  66. package/dist/types/src/InputTime/InputTime.d.ts +2 -1
  67. package/dist/types/src/Menu/Menu.d.ts +2 -1
  68. package/dist/types/src/Menu/components/MenuOption/MenuOption.d.ts +2 -1
  69. package/dist/types/src/Menu/components/Overlay/Overlay.d.ts +2 -1
  70. package/dist/types/src/Menu/types.d.ts +2 -1
  71. package/dist/types/src/ProgressBar/ProgressBar.d.ts +2 -1
  72. package/dist/types/src/ProgressBar/ProgressBarInner.d.ts +2 -1
  73. package/dist/types/src/Select/Select.d.ts +3 -2
  74. package/dist/types/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.d.ts +2 -1
  75. package/dist/types/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.ios.d.ts +2 -1
  76. package/dist/types/src/Select/components/SelectInternalPicker/SelectInternalPicker.d.ts +2 -1
  77. package/dist/types/src/Select/components/SelectPressable/SelectPressable.d.ts +2 -1
  78. package/dist/types/src/StatusLabel/StatusLabel.d.ts +2 -1
  79. package/dist/types/src/Switch/Switch.d.ts +2 -1
  80. package/dist/types/src/Switch/components/BaseSwitch/BaseSwitch.d.ts +2 -1
  81. package/dist/types/src/Text/Text.d.ts +1 -1
  82. package/dist/types/src/TextList/TextList.d.ts +2 -1
  83. package/dist/types/src/ThumbnailList/ThumbnailList.d.ts +2 -1
  84. package/dist/types/src/Toast/Toast.d.ts +2 -1
  85. package/dist/types/src/Typography/Typography.d.ts +1 -1
  86. package/dist/types/src/Typography/TypographyGestureDetector.d.ts +2 -1
  87. package/dist/types/src/utils/test/MockSafeAreaProvider.d.ts +1 -1
  88. package/package.json +2 -2
  89. package/src/ActionItem/ActionItem.tsx +1 -1
  90. package/src/ActionItem/ActionItemGroup.tsx +1 -3
  91. package/src/ActionItem/components/ActionItemContainer.tsx +1 -1
  92. package/src/ActionLabel/ActionLabel.tsx +1 -1
  93. package/src/ActivityIndicator/ActivityIndicator.tsx +1 -3
  94. package/src/AutoLink/AutoLink.tsx +1 -1
  95. package/src/AutoLink/components/ComposeTextWithLinks/ComposeTextWithLinks.tsx +1 -1
  96. package/src/AutoLink/components/Link/Link.tsx +1 -5
  97. package/src/Banner/Banner.tsx +2 -2
  98. package/src/Banner/components/BannerIcon/BannerIcon.tsx +1 -1
  99. package/src/BottomSheet/components/BottomSheetOption/BottomSheetOption.tsx +1 -1
  100. package/src/Button/Button.tsx +1 -1
  101. package/src/Button/components/InternalButtonLoading/InternalButtonLoading.tsx +1 -1
  102. package/src/ButtonGroup/ButtonGroup.tsx +1 -1
  103. package/src/ButtonGroup/ButtonGroupAction.tsx +4 -4
  104. package/src/ButtonGroup/components/SecondaryActionSheet/SecondaryActionSheet.tsx +1 -1
  105. package/src/Card/Card.tsx +1 -1
  106. package/src/Card/components/InternalCardHeader.tsx +1 -1
  107. package/src/Checkbox/Checkbox.tsx +2 -2
  108. package/src/Checkbox/CheckboxGroup.test.tsx +1 -1
  109. package/src/Checkbox/CheckboxGroup.tsx +2 -2
  110. package/src/Chip/Chip.tsx +1 -1
  111. package/src/Content/Content.tsx +1 -1
  112. package/src/ContentOverlay/ContentOverlay.tsx +1 -1
  113. package/src/Disclosure/Disclosure.tsx +1 -1
  114. package/src/Divider/Divider.tsx +1 -1
  115. package/src/EmptyState/EmptyState.tsx +1 -1
  116. package/src/ErrorMessageWrapper/ErrorMessageWrapper.tsx +1 -1
  117. package/src/ErrorMessageWrapper/context/ErrorMessageProvider.tsx +1 -3
  118. package/src/Flex/Flex.tsx +2 -2
  119. package/src/Form/Form.test.tsx +2 -2
  120. package/src/Form/Form.tsx +1 -1
  121. package/src/Form/components/FormActionBar/FormActionBar.tsx +3 -3
  122. package/src/Form/components/FormBody/FormBody.tsx +3 -3
  123. package/src/Form/components/FormCache/FormCache.tsx +1 -1
  124. package/src/Form/components/FormErrorBanner/FormErrorBanner.tsx +1 -1
  125. package/src/Form/components/FormMask/FormMask.tsx +1 -1
  126. package/src/Form/components/FormMessage/FormMessage.tsx +1 -1
  127. package/src/Form/components/FormMessage/components/InternalFormMessage/InternalFormMessage.tsx +1 -1
  128. package/src/Form/components/FormMessageBanner/FormMessageBanner.tsx +1 -3
  129. package/src/Form/components/FormSaveButton/FormSaveButton.tsx +1 -1
  130. package/src/Form/types.ts +2 -2
  131. package/src/FormField/FormField.tsx +1 -1
  132. package/src/FormatFile/FormatFile.tsx +3 -3
  133. package/src/FormatFile/components/ErrorIcon/ErrorIcon.tsx +1 -1
  134. package/src/FormatFile/components/FileView/FileView.tsx +1 -1
  135. package/src/FormatFile/components/FormatFileBottomSheet/FormatFileBottomSheet.tsx +1 -1
  136. package/src/FormatFile/components/MediaView/MediaView.tsx +1 -1
  137. package/src/FormatFile/components/ProgressBar/ProgressBar.tsx +1 -1
  138. package/src/Heading/Heading.tsx +1 -1
  139. package/src/Icon/Icon.tsx +1 -1
  140. package/src/IconButton/IconButton.tsx +1 -1
  141. package/src/InputCurrency/InputCurrency.tsx +1 -1
  142. package/src/InputDate/InputDate.tsx +2 -2
  143. package/src/InputFieldWrapper/InputFieldWrapper.tsx +1 -1
  144. package/src/InputFieldWrapper/components/ClearAction/ClearAction.tsx +1 -1
  145. package/src/InputFieldWrapper/components/Prefix/Prefix.tsx +2 -2
  146. package/src/InputFieldWrapper/components/Suffix/Suffix.tsx +2 -2
  147. package/src/InputPassword/InputPassword.tsx +1 -1
  148. package/src/InputPressable/InputPressable.tsx +1 -1
  149. package/src/InputSearch/components/FilterButton.tsx +1 -1
  150. package/src/InputText/context/InputAccessoriesProvider.tsx +1 -1
  151. package/src/InputTime/InputTime.tsx +2 -2
  152. package/src/Menu/Menu.tsx +1 -1
  153. package/src/Menu/components/MenuOption/MenuOption.tsx +1 -1
  154. package/src/Menu/components/Overlay/Overlay.tsx +1 -1
  155. package/src/Menu/types.ts +2 -1
  156. package/src/ProgressBar/ProgressBar.tsx +1 -1
  157. package/src/ProgressBar/ProgressBarInner.tsx +1 -1
  158. package/src/Select/Select.tsx +2 -2
  159. package/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.ios.tsx +1 -1
  160. package/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.tsx +1 -1
  161. package/src/Select/components/SelectInternalPicker/SelectInternalPicker.tsx +1 -1
  162. package/src/Select/components/SelectPressable/SelectPressable.tsx +1 -4
  163. package/src/StatusLabel/StatusLabel.tsx +1 -1
  164. package/src/Switch/Switch.tsx +1 -1
  165. package/src/Switch/components/BaseSwitch/BaseSwitch.tsx +1 -1
  166. package/src/Text/Text.tsx +1 -1
  167. package/src/TextList/TextList.tsx +1 -1
  168. package/src/ThumbnailList/ThumbnailList.tsx +1 -1
  169. package/src/Toast/Toast.tsx +2 -2
  170. package/src/Typography/Typography.tsx +1 -1
  171. package/src/Typography/TypographyGestureDetector.tsx +1 -3
  172. package/src/utils/test/MockSafeAreaProvider.tsx +1 -1
@@ -65,7 +65,7 @@ export function EmptyState({
65
65
  primaryAction,
66
66
  secondaryAction,
67
67
  iconColor = "blue",
68
- }: EmptyStateProps): JSX.Element {
68
+ }: EmptyStateProps) {
69
69
  const styles = useStyles();
70
70
 
71
71
  return (
@@ -34,7 +34,7 @@ export function ErrorMessageWrapper({
34
34
  message,
35
35
  wrapFor = "default",
36
36
  children,
37
- }: ErrorMessageWrapperProps): JSX.Element {
37
+ }: ErrorMessageWrapperProps) {
38
38
  const errorMessageContext = useErrorMessageContext();
39
39
  const register = errorMessageContext?.register;
40
40
  const unregister = errorMessageContext?.unregister;
@@ -13,9 +13,7 @@ interface ErrorMessageProviderProps {
13
13
  readonly children: ReactNode;
14
14
  }
15
15
 
16
- export function ErrorMessageProvider({
17
- children,
18
- }: ErrorMessageProviderProps): JSX.Element {
16
+ export function ErrorMessageProvider({ children }: ErrorMessageProviderProps) {
19
17
  const [elements, setElements] = useState<
20
18
  ErrorMessageContextProps["elements"]
21
19
  >({});
package/src/Flex/Flex.tsx CHANGED
@@ -11,7 +11,7 @@ export function Flex({
11
11
  align = "center",
12
12
  gap = "base",
13
13
  children,
14
- }: PropsWithChildren<FlexProps>): JSX.Element {
14
+ }: PropsWithChildren<FlexProps>) {
15
15
  if (template.length === 1) {
16
16
  console.warn("Please use <Content /> component for a stacked layout");
17
17
  }
@@ -54,7 +54,7 @@ function Row({
54
54
  align = "center",
55
55
  gap = "base",
56
56
  children,
57
- }: PropsWithChildren<FlexProps>): JSX.Element {
57
+ }: PropsWithChildren<FlexProps>) {
58
58
  return (
59
59
  <View testID="ATL-Flex-Row" style={[styles.row, { alignItems: align }]}>
60
60
  {Children.map(children, (child, index) => (
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React, { type ReactElement } from "react";
2
2
  import { act, fireEvent, render, waitFor } from "@testing-library/react-native";
3
3
  import { Alert, Keyboard } from "react-native";
4
4
  import { Host } from "react-native-portalize";
@@ -94,7 +94,7 @@ interface FormTestProps {
94
94
  onSubmit: () => void,
95
95
  label: string | undefined,
96
96
  isSubmitting: boolean,
97
- ) => JSX.Element;
97
+ ) => ReactElement;
98
98
  readonly initialLoading?: boolean;
99
99
  readonly initialValues?: FormFields;
100
100
  readonly bannerMessages?: FormBannerMessage[];
package/src/Form/Form.tsx CHANGED
@@ -34,7 +34,7 @@ import { ErrorMessageProvider } from "../ErrorMessageWrapper";
34
34
  export function Form<T extends FieldValues, S>({
35
35
  initialLoading,
36
36
  ...rest
37
- }: FormProps<T, S>): JSX.Element {
37
+ }: FormProps<T, S>) {
38
38
  const child = initialLoading ? <FormMask /> : <InternalForm {...rest} />;
39
39
 
40
40
  return (
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React, { type ReactElement } from "react";
2
2
  import type { LayoutChangeEvent } from "react-native";
3
3
  import { StyleSheet } from "react-native";
4
4
  import Reanimated from "react-native-reanimated";
@@ -18,7 +18,7 @@ export interface FormActionBarProps {
18
18
  onSubmit: () => void,
19
19
  label: string | undefined,
20
20
  isSubmitting: boolean,
21
- ) => JSX.Element;
21
+ ) => ReactElement;
22
22
  readonly secondaryActions?: SecondaryActionProp[];
23
23
  readonly setSecondaryActionLoading?: (bool: boolean) => void;
24
24
  }
@@ -32,7 +32,7 @@ export function FormActionBar({
32
32
  setSaveButtonHeight,
33
33
  secondaryActions,
34
34
  setSecondaryActionLoading,
35
- }: FormActionBarProps): JSX.Element {
35
+ }: FormActionBarProps) {
36
36
  const styles = useStyles();
37
37
 
38
38
  const buttonStyle = StyleSheet.flatten([
@@ -1,4 +1,4 @@
1
- import React, { useMemo } from "react";
1
+ import React, { type ReactElement, useMemo } from "react";
2
2
  import { View } from "react-native";
3
3
  import { useStyles } from "./FormBody.style";
4
4
  import { useScreenInformation } from "../../hooks/useScreenInformation";
@@ -7,7 +7,7 @@ import { FormActionBar } from "../FormActionBar";
7
7
  import { tokens } from "../../../utils/design";
8
8
 
9
9
  interface FormBodyProps extends FormActionBarProps {
10
- readonly children: JSX.Element;
10
+ readonly children: ReactElement;
11
11
  readonly shouldRenderActionBar?: boolean;
12
12
  readonly saveButtonOffset?: number;
13
13
  }
@@ -24,7 +24,7 @@ export function FormBody({
24
24
  setSecondaryActionLoading,
25
25
  setSaveButtonHeight,
26
26
  saveButtonOffset,
27
- }: FormBodyProps): JSX.Element {
27
+ }: FormBodyProps) {
28
28
  const paddingBottom = useBottomPadding();
29
29
  const fullViewPadding = useMemo(() => ({ paddingBottom }), [paddingBottom]);
30
30
  const styles = useStyles();
@@ -14,7 +14,7 @@ export function FormCache<T extends FieldValues>({
14
14
  localCacheExclude,
15
15
  localCacheKey,
16
16
  setLocalCache,
17
- }: FormCacheProps<T>): JSX.Element {
17
+ }: FormCacheProps<T>) {
18
18
  const { control, formState } = useFormContext<T>();
19
19
  const { isDirty } = formState;
20
20
 
@@ -6,7 +6,7 @@ import { useAtlantisI18n } from "../../../hooks/useAtlantisI18n";
6
6
  export function FormErrorBanner({
7
7
  networkError,
8
8
  bannerError,
9
- }: FormBannerErrors): JSX.Element {
9
+ }: FormBannerErrors) {
10
10
  const { t } = useAtlantisI18n();
11
11
 
12
12
  if (networkError) {
@@ -4,7 +4,7 @@ import { useStyles } from "./FormMask.style";
4
4
  import { ActivityIndicator } from "../../../ActivityIndicator";
5
5
  import { useAtlantisI18n } from "../../../hooks/useAtlantisI18n";
6
6
 
7
- export function FormMask(): JSX.Element {
7
+ export function FormMask() {
8
8
  const { t } = useAtlantisI18n();
9
9
  const styles = useStyles();
10
10
 
@@ -17,7 +17,7 @@ let close: (() => void) | undefined;
17
17
  * message to the user. Use `FormMessage.close()` to close the most
18
18
  * recent message.
19
19
  */
20
- export const FormMessage = (): JSX.Element => {
20
+ export const FormMessage = () => {
21
21
  const [data, setData] = useState<FormMessageData[]>([]);
22
22
 
23
23
  open = useCallback(
@@ -15,7 +15,7 @@ interface FormMessageProps {
15
15
  export function InternalFormMessage({
16
16
  data,
17
17
  onRequestClose,
18
- }: FormMessageProps): JSX.Element {
18
+ }: FormMessageProps) {
19
19
  const { t } = useAtlantisI18n();
20
20
  const styles = useStyles();
21
21
  const emptyStateData: EmptyStateProps = useMemo(() => {
@@ -8,9 +8,7 @@ interface FormMessageBannerProps {
8
8
  readonly bannerMessages?: FormBannerMessage[];
9
9
  }
10
10
 
11
- export function FormMessageBanner({
12
- bannerMessages,
13
- }: FormMessageBannerProps): JSX.Element {
11
+ export function FormMessageBanner({ bannerMessages }: FormMessageBannerProps) {
14
12
  return (
15
13
  <>
16
14
  {bannerMessages?.map((message, index) => (
@@ -13,7 +13,7 @@ export function FormSaveButton({
13
13
  setSecondaryActionLoading,
14
14
  onOpenBottomSheet,
15
15
  onCloseBottomSheet,
16
- }: FormSaveButtonProps): JSX.Element {
16
+ }: FormSaveButtonProps) {
17
17
  const { t } = useAtlantisI18n();
18
18
  const formContext = useFormContext();
19
19
  const buttonActions = useButtonGroupAction(secondaryActions);
package/src/Form/types.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { MutableRefObject, RefObject } from "react";
1
+ import type { MutableRefObject, ReactElement, RefObject } from "react";
2
2
  import type {
3
3
  ControllerProps,
4
4
  DefaultValues,
@@ -142,7 +142,7 @@ export interface FormProps<T extends FieldValues, SubmitResponseType> {
142
142
  onSubmit: () => void,
143
143
  label: string | undefined,
144
144
  isSubmitting: boolean,
145
- ) => JSX.Element;
145
+ ) => ReactElement;
146
146
 
147
147
  /**
148
148
  * Adding a key will save a local copy of the form data that will be used to
@@ -39,7 +39,7 @@ export function FormField<T>({
39
39
  children,
40
40
  defaultValue: value,
41
41
  validations,
42
- }: FormFieldProps<T>): JSX.Element {
42
+ }: FormFieldProps<T>) {
43
43
  const { error, field } = useFormController({
44
44
  name,
45
45
  value,
@@ -88,7 +88,7 @@ function FormatFileContent({
88
88
  styleInGrid,
89
89
  onUploadComplete,
90
90
  isMedia,
91
- }: FormatFileContentProps): JSX.Element {
91
+ }: FormatFileContentProps) {
92
92
  const styles = useStyles();
93
93
 
94
94
  return (
@@ -204,7 +204,7 @@ export function FormatFile<T extends File | FileUpload>({
204
204
  showFileTypeIndicator = true,
205
205
  createThumbnail,
206
206
  onPreviewPress,
207
- }: FormatFileProps<T>): JSX.Element {
207
+ }: FormatFileProps<T>) {
208
208
  const onTapModified = onTap ? () => onTap(file) : () => undefined;
209
209
 
210
210
  const formattedFile = parseFile(file, showFileTypeIndicator);
@@ -236,7 +236,7 @@ function FormatFileInternal({
236
236
  onPreviewPress,
237
237
  testID,
238
238
  createThumbnail: createThumbnailProp,
239
- }: FormatFileInternalProps): JSX.Element {
239
+ }: FormatFileInternalProps) {
240
240
  const [showOverlay, setShowOverlay] = useState<boolean>(
241
241
  file.status !== StatusCode.Completed,
242
242
  );
@@ -3,7 +3,7 @@ import { View } from "react-native";
3
3
  import { useStyles } from "./ErrorIcon.style";
4
4
  import { Icon } from "../../../Icon";
5
5
 
6
- export function ErrorIcon(): JSX.Element {
6
+ export function ErrorIcon() {
7
7
  const styles = useStyles();
8
8
 
9
9
  return (
@@ -27,7 +27,7 @@ export function FileView({
27
27
  showOverlay,
28
28
  showError,
29
29
  onUploadComplete,
30
- }: FileViewProps): JSX.Element {
30
+ }: FileViewProps) {
31
31
  const { t } = useAtlantisI18n();
32
32
  const styles = useStyles();
33
33
 
@@ -20,7 +20,7 @@ export const FormatFileBottomSheet = ({
20
20
  onPreviewPress,
21
21
  onRemovePress,
22
22
  bottomSheetOptionsSuffix,
23
- }: FormatFileBottomSheetProps): JSX.Element => {
23
+ }: FormatFileBottomSheetProps) => {
24
24
  const { t } = useAtlantisI18n();
25
25
 
26
26
  const handlePress = (onPressAction: () => void) => {
@@ -27,7 +27,7 @@ export function MediaView({
27
27
  file,
28
28
  styleInGrid,
29
29
  onUploadComplete,
30
- }: MediaViewProps): JSX.Element {
30
+ }: MediaViewProps) {
31
31
  const { t } = useAtlantisI18n();
32
32
  const { useCreateThumbnail } = useAtlantisFormatFileContext();
33
33
  const { thumbnail, error } = useCreateThumbnail(file);
@@ -22,7 +22,7 @@ export const ProgressBar = ({
22
22
  progress,
23
23
  status,
24
24
  onComplete,
25
- }: ProgressBarProps): JSX.Element => {
25
+ }: ProgressBarProps) => {
26
26
  const barWidth = useRef(new Animated.Value(0)).current;
27
27
  const progressPercentage = barWidth.interpolate({
28
28
  inputRange: [0, 1],
@@ -71,7 +71,7 @@ export function Heading<T extends HeadingLevel = "heading">({
71
71
  maxLines = "unlimited",
72
72
  allowFontScaling = true,
73
73
  selectable,
74
- }: HeadingProps<T>): JSX.Element {
74
+ }: HeadingProps<T>) {
75
75
  const headingStyle = getHeadingStyle(level, variation);
76
76
  const accessibilityRole = "header";
77
77
 
package/src/Icon/Icon.tsx CHANGED
@@ -37,7 +37,7 @@ export function Icon({
37
37
  size = "base",
38
38
  customColor,
39
39
  testID,
40
- }: IconProps): JSX.Element {
40
+ }: IconProps) {
41
41
  const { svgStyle, paths, viewBox } = getIcon({
42
42
  name,
43
43
  color,
@@ -50,7 +50,7 @@ export function IconButton({
50
50
  onPress,
51
51
  accessibilityLabel,
52
52
  testID,
53
- }: IconButtonProps): JSX.Element {
53
+ }: IconButtonProps) {
54
54
  const styles = useStyles();
55
55
 
56
56
  return (
@@ -130,7 +130,7 @@ const computeDisplayFromNumericInput = (
130
130
  }
131
131
  };
132
132
 
133
- export function InputCurrency(props: InputCurrencyProps): JSX.Element {
133
+ export function InputCurrency(props: InputCurrencyProps) {
134
134
  const {
135
135
  showCurrencySymbol = true,
136
136
  maxDecimalPlaces = 5,
@@ -111,7 +111,7 @@ const display = Platform.OS === "ios" ? "inline" : "default";
111
111
  /**
112
112
  * Allow users to select a date using the device date picker.
113
113
  */
114
- export function InputDate(props: InputDateProps): JSX.Element {
114
+ export function InputDate(props: InputDateProps) {
115
115
  if (props.name) {
116
116
  return (
117
117
  <FormField<Date>
@@ -152,7 +152,7 @@ function InternalInputDate({
152
152
  onChange,
153
153
  accessibilityLabel,
154
154
  accessibilityHint,
155
- }: InputDateProps): JSX.Element {
155
+ }: InputDateProps) {
156
156
  const [showPicker, setShowPicker] = useState(false);
157
157
  const { t, locale, formatDate } = useAtlantisI18n();
158
158
 
@@ -138,7 +138,7 @@ export function InputFieldWrapper({
138
138
  toolbarVisibility = "while-editing",
139
139
  loading = false,
140
140
  loadingType = "spinner",
141
- }: InputFieldWrapperProps): JSX.Element {
141
+ }: InputFieldWrapperProps) {
142
142
  fieldAffixRequiredPropsCheck([prefix, suffix]);
143
143
  const handleClear = onClear ?? noopClear;
144
144
  warnIfClearActionWithNoOnClear(onClear, showClearAction);
@@ -15,7 +15,7 @@ interface ClearActionProps {
15
15
  export function ClearAction({
16
16
  onPress,
17
17
  hasMarginRight = false,
18
- }: ClearActionProps): JSX.Element {
18
+ }: ClearActionProps) {
19
19
  const { t } = useAtlantisI18n();
20
20
  const styles = useStyles();
21
21
 
@@ -27,7 +27,7 @@ export function PrefixLabel({
27
27
  inputInvalid,
28
28
  label,
29
29
  styleOverride,
30
- }: PrefixLabelProps): JSX.Element {
30
+ }: PrefixLabelProps) {
31
31
  const styles = useStyles();
32
32
  const typographyStyles = useTypographyStyles();
33
33
 
@@ -80,7 +80,7 @@ export function PrefixIcon({
80
80
  disabled,
81
81
  inputInvalid,
82
82
  icon,
83
- }: PrefixIconProps): JSX.Element {
83
+ }: PrefixIconProps) {
84
84
  const styles = useStyles();
85
85
  const { tokens } = useAtlantisTheme();
86
86
 
@@ -29,7 +29,7 @@ export function SuffixLabel({
29
29
  label,
30
30
  hasLeftMargin = true,
31
31
  styleOverride,
32
- }: SuffixLabelProps): JSX.Element {
32
+ }: SuffixLabelProps) {
33
33
  const styles = useStyles();
34
34
  const typographyStyles = useTypographyStyles();
35
35
 
@@ -86,7 +86,7 @@ export function SuffixIcon({
86
86
  icon,
87
87
  hasLeftMargin = false,
88
88
  onPress,
89
- }: SuffixIconProps): JSX.Element {
89
+ }: SuffixIconProps) {
90
90
  const styles = useStyles();
91
91
  const { tokens } = useAtlantisTheme();
92
92
 
@@ -23,7 +23,7 @@ export interface InputPasswordProps
23
23
  function InputPasswordInternal(
24
24
  { usePrivacyEye = true, ...props }: InputPasswordProps,
25
25
  ref: Ref<InputTextRef>,
26
- ): JSX.Element {
26
+ ) {
27
27
  const { t } = useAtlantisI18n();
28
28
  const [passwordHidden, setPasswordHidden] = useState(true);
29
29
  const [privacyEye, setPrivacyEye] = useState<IconNames>("eye");
@@ -126,7 +126,7 @@ export function InputPressableInternal(
126
126
  focused,
127
127
  }: InputPressableProps,
128
128
  ref: Ref<InputPressableRef>,
129
- ): JSX.Element {
129
+ ) {
130
130
  const hasValue = !!value;
131
131
 
132
132
  const placeholderMode = getPlaceholderMode(showMiniLabel, value);
@@ -10,7 +10,7 @@ interface FilterButtonProps {
10
10
  export function FilterButton({
11
11
  accessibilityLabel,
12
12
  onClick,
13
- }: FilterButtonProps): JSX.Element {
13
+ }: FilterButtonProps) {
14
14
  return (
15
15
  <IconButton
16
16
  onPress={() => {
@@ -16,7 +16,7 @@ export function InputAccessoriesProvider({
16
16
  children,
17
17
  }: {
18
18
  readonly children: ReactNode;
19
- }): JSX.Element {
19
+ }) {
20
20
  const inputAccessoryID = useRef(v4()).current;
21
21
  const {
22
22
  focusedInput,
@@ -99,7 +99,7 @@ function formatInvalidState(
99
99
  return Boolean(error);
100
100
  }
101
101
 
102
- export function InputTime(props: InputTimeProps): JSX.Element {
102
+ export function InputTime(props: InputTimeProps) {
103
103
  if (props.name) {
104
104
  return (
105
105
  <FormField name={props.name} validations={props.validations}>
@@ -134,7 +134,7 @@ function InternalInputTime({
134
134
  showMiniLabel = true,
135
135
  onChange,
136
136
  showIcon = true,
137
- }: InputTimeProps): JSX.Element {
137
+ }: InputTimeProps) {
138
138
  const [showPicker, setShowPicker] = useState(false);
139
139
  const { t, formatTime } = useAtlantisI18n();
140
140
  const { timeZone, timeFormat } = useAtlantisContext();
package/src/Menu/Menu.tsx CHANGED
@@ -20,7 +20,7 @@ import { useAtlantisContext } from "../AtlantisContext";
20
20
  import { useAtlantisI18n } from "../hooks/useAtlantisI18n";
21
21
  import { useAtlantisTheme } from "../AtlantisThemeContext";
22
22
 
23
- export function Menu({ menuOptions, customActivator }: MenuProps): JSX.Element {
23
+ export function Menu({ menuOptions, customActivator }: MenuProps) {
24
24
  const [open, setOpen] = useState<boolean>(false);
25
25
  const [menuPosition, setMenuPosition] = useState<object>();
26
26
  const activatorLayout = useRef<LayoutRectangle>();
@@ -17,7 +17,7 @@ export function MenuOption({
17
17
  textTransform = "capitalize",
18
18
  onPress,
19
19
  setOpen,
20
- }: MenuOptionInternalProps): JSX.Element {
20
+ }: MenuOptionInternalProps) {
21
21
  const destructiveColor = "destructive";
22
22
  const textVariation = destructive ? destructiveColor : "heading";
23
23
  const styles = useStyles();
@@ -3,7 +3,7 @@ import { Pressable, View } from "react-native";
3
3
  import { useStyles } from "./Overlay.style";
4
4
  import type { OverlayProp } from "../../types";
5
5
 
6
- export function Overlay({ setOpen }: OverlayProp): JSX.Element {
6
+ export function Overlay({ setOpen }: OverlayProp) {
7
7
  const styles = useStyles();
8
8
 
9
9
  return (
package/src/Menu/types.ts CHANGED
@@ -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
 
4
5
  export interface MenuOptionProps {
@@ -17,7 +18,7 @@ export interface MenuOptionInternalProps extends MenuOptionProps {
17
18
 
18
19
  export interface MenuProps {
19
20
  readonly menuOptions?: MenuOptionProps[];
20
- readonly customActivator?: JSX.Element;
21
+ readonly customActivator?: ReactElement;
21
22
  }
22
23
 
23
24
  export interface OverlayProp {
@@ -17,7 +17,7 @@ export function ProgressBar({
17
17
  header,
18
18
  variation = "progress",
19
19
  size = "base",
20
- }: ProgressBarProps): JSX.Element {
20
+ }: ProgressBarProps) {
21
21
  const { t } = useAtlantisI18n();
22
22
  const styles = useStyles();
23
23
  const { tokens } = useAtlantisTheme();
@@ -14,7 +14,7 @@ export function ProgressBarInner({
14
14
  width,
15
15
  // animationDuration = 0,
16
16
  color,
17
- }: ProgressBarInnerProps): JSX.Element {
17
+ }: ProgressBarInnerProps) {
18
18
  // Animation breaking on Android
19
19
  // const [animatedOpacity] = useTiming({
20
20
  // duration: animationDuration,
@@ -110,7 +110,7 @@ export function Select({
110
110
  accessibilityLabel,
111
111
  name,
112
112
  testID,
113
- }: SelectProps): JSX.Element {
113
+ }: SelectProps) {
114
114
  const { field, error } = useFormController({
115
115
  name,
116
116
  validations,
@@ -243,6 +243,6 @@ function getTestID(testID?: string): string {
243
243
  return "ATL-Select";
244
244
  }
245
245
 
246
- export function Option({ children }: SelectOption): JSX.Element {
246
+ export function Option({ children }: SelectOption) {
247
247
  return <>{children}</>;
248
248
  }
@@ -19,7 +19,7 @@ export function SelectDefaultPicker({
19
19
  children,
20
20
  options,
21
21
  onChange,
22
- }: SelectDefaultPickerProps): JSX.Element {
22
+ }: SelectDefaultPickerProps) {
23
23
  const [show, setShow] = useState(false);
24
24
  const { t } = useAtlantisI18n();
25
25
  const selectedLanguage = options.find(option => option.isActive);
@@ -12,7 +12,7 @@ export function SelectDefaultPicker({
12
12
  options,
13
13
  disabled,
14
14
  onChange,
15
- }: SelectDefaultPickerProps): JSX.Element {
15
+ }: SelectDefaultPickerProps) {
16
16
  const selectedItem = options.find(option => option.isActive);
17
17
  const pickerRef = useRef<Picker<string>>(null);
18
18
  const { tokens } = useAtlantisTheme();
@@ -10,7 +10,7 @@ export function SelectInternalPicker({
10
10
  options,
11
11
  disabled,
12
12
  onChange,
13
- }: SelectInternalPickerProps): JSX.Element {
13
+ }: SelectInternalPickerProps) {
14
14
  if (disabled) return <>{children}</>;
15
15
 
16
16
  if (isIOS14AndUp()) {
@@ -13,10 +13,7 @@ type SelectPressableProps = Pick<SelectInternalPickerProps, "children"> &
13
13
  * screen-reader is being used to avoid screen-readers from ignoring the press
14
14
  * on the MenuView
15
15
  */
16
- export function SelectPressable({
17
- children,
18
- onPress,
19
- }: SelectPressableProps): JSX.Element {
16
+ export function SelectPressable({ children, onPress }: SelectPressableProps) {
20
17
  const isScreenReaderEnabled = useIsScreenReaderEnabled();
21
18
  const styles = useStyles();
22
19
  if (isScreenReaderEnabled) return <>{children}</>;
@@ -37,7 +37,7 @@ export function StatusLabel({
37
37
  text,
38
38
  alignment = "end",
39
39
  status = "success",
40
- }: StatusLabelProps): JSX.Element {
40
+ }: StatusLabelProps) {
41
41
  const styles = useStyles();
42
42
 
43
43
  return (
@@ -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,