@jobber/components-native 0.91.0 → 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 (174) 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/FormatFile/components/MediaView/MediaView.js +22 -5
  7. package/dist/src/Select/components/SelectPressable/SelectPressable.js +1 -1
  8. package/dist/tsconfig.build.tsbuildinfo +1 -1
  9. package/dist/types/src/ActionItem/ActionItem.d.ts +2 -1
  10. package/dist/types/src/ActionItem/ActionItemGroup.d.ts +2 -1
  11. package/dist/types/src/ActionItem/components/ActionItemContainer.d.ts +2 -1
  12. package/dist/types/src/ActionLabel/ActionLabel.d.ts +1 -1
  13. package/dist/types/src/ActivityIndicator/ActivityIndicator.d.ts +2 -1
  14. package/dist/types/src/AutoLink/AutoLink.d.ts +2 -1
  15. package/dist/types/src/AutoLink/components/ComposeTextWithLinks/ComposeTextWithLinks.d.ts +2 -1
  16. package/dist/types/src/AutoLink/components/Link/Link.d.ts +2 -1
  17. package/dist/types/src/Banner/Banner.d.ts +2 -1
  18. package/dist/types/src/Banner/components/BannerIcon/BannerIcon.d.ts +2 -1
  19. package/dist/types/src/BottomSheet/components/BottomSheetOption/BottomSheetOption.d.ts +2 -1
  20. package/dist/types/src/Button/Button.d.ts +2 -1
  21. package/dist/types/src/Button/components/InternalButtonLoading/InternalButtonLoading.d.ts +1 -1
  22. package/dist/types/src/ButtonGroup/ButtonGroup.d.ts +2 -1
  23. package/dist/types/src/ButtonGroup/ButtonGroupAction.d.ts +4 -3
  24. package/dist/types/src/ButtonGroup/components/SecondaryActionSheet/SecondaryActionSheet.d.ts +2 -1
  25. package/dist/types/src/Card/Card.d.ts +2 -1
  26. package/dist/types/src/Card/components/InternalCardHeader.d.ts +2 -1
  27. package/dist/types/src/Checkbox/Checkbox.d.ts +2 -1
  28. package/dist/types/src/Checkbox/CheckboxGroup.d.ts +2 -1
  29. package/dist/types/src/Chip/Chip.d.ts +2 -1
  30. package/dist/types/src/Content/Content.d.ts +2 -1
  31. package/dist/types/src/Disclosure/Disclosure.d.ts +1 -1
  32. package/dist/types/src/Divider/Divider.d.ts +2 -1
  33. package/dist/types/src/EmptyState/EmptyState.d.ts +2 -1
  34. package/dist/types/src/ErrorMessageWrapper/ErrorMessageWrapper.d.ts +2 -1
  35. package/dist/types/src/ErrorMessageWrapper/context/ErrorMessageProvider.d.ts +2 -1
  36. package/dist/types/src/Flex/Flex.d.ts +2 -1
  37. package/dist/types/src/Form/Form.d.ts +2 -1
  38. package/dist/types/src/Form/components/FormActionBar/FormActionBar.d.ts +3 -2
  39. package/dist/types/src/Form/components/FormBody/FormBody.d.ts +3 -2
  40. package/dist/types/src/Form/components/FormCache/FormCache.d.ts +2 -1
  41. package/dist/types/src/Form/components/FormErrorBanner/FormErrorBanner.d.ts +2 -1
  42. package/dist/types/src/Form/components/FormMask/FormMask.d.ts +2 -1
  43. package/dist/types/src/Form/components/FormMessage/FormMessage.d.ts +2 -1
  44. package/dist/types/src/Form/components/FormMessage/components/InternalFormMessage/InternalFormMessage.d.ts +2 -1
  45. package/dist/types/src/Form/components/FormMessageBanner/FormMessageBanner.d.ts +2 -1
  46. package/dist/types/src/Form/components/FormSaveButton/FormSaveButton.d.ts +2 -1
  47. package/dist/types/src/Form/types.d.ts +2 -2
  48. package/dist/types/src/FormField/FormField.d.ts +1 -1
  49. package/dist/types/src/FormatFile/FormatFile.d.ts +2 -1
  50. package/dist/types/src/FormatFile/components/ErrorIcon/ErrorIcon.d.ts +2 -1
  51. package/dist/types/src/FormatFile/components/FileView/FileView.d.ts +2 -1
  52. package/dist/types/src/FormatFile/components/FormatFileBottomSheet/FormatFileBottomSheet.d.ts +2 -1
  53. package/dist/types/src/FormatFile/components/MediaView/MediaView.d.ts +2 -1
  54. package/dist/types/src/FormatFile/components/ProgressBar/ProgressBar.d.ts +2 -1
  55. package/dist/types/src/Heading/Heading.d.ts +1 -1
  56. package/dist/types/src/Icon/Icon.d.ts +2 -1
  57. package/dist/types/src/IconButton/IconButton.d.ts +1 -1
  58. package/dist/types/src/InputCurrency/InputCurrency.d.ts +2 -1
  59. package/dist/types/src/InputDate/InputDate.d.ts +2 -1
  60. package/dist/types/src/InputFieldWrapper/InputFieldWrapper.d.ts +1 -1
  61. package/dist/types/src/InputFieldWrapper/components/ClearAction/ClearAction.d.ts +2 -1
  62. package/dist/types/src/InputFieldWrapper/components/Prefix/Prefix.d.ts +3 -2
  63. package/dist/types/src/InputFieldWrapper/components/Suffix/Suffix.d.ts +3 -2
  64. package/dist/types/src/InputPressable/InputPressable.d.ts +1 -1
  65. package/dist/types/src/InputSearch/components/FilterButton.d.ts +2 -1
  66. package/dist/types/src/InputText/context/InputAccessoriesProvider.d.ts +2 -1
  67. package/dist/types/src/InputTime/InputTime.d.ts +2 -1
  68. package/dist/types/src/Menu/Menu.d.ts +2 -1
  69. package/dist/types/src/Menu/components/MenuOption/MenuOption.d.ts +2 -1
  70. package/dist/types/src/Menu/components/Overlay/Overlay.d.ts +2 -1
  71. package/dist/types/src/Menu/types.d.ts +2 -1
  72. package/dist/types/src/ProgressBar/ProgressBar.d.ts +2 -1
  73. package/dist/types/src/ProgressBar/ProgressBarInner.d.ts +2 -1
  74. package/dist/types/src/Select/Select.d.ts +3 -2
  75. package/dist/types/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.d.ts +2 -1
  76. package/dist/types/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.ios.d.ts +2 -1
  77. package/dist/types/src/Select/components/SelectInternalPicker/SelectInternalPicker.d.ts +2 -1
  78. package/dist/types/src/Select/components/SelectPressable/SelectPressable.d.ts +2 -1
  79. package/dist/types/src/StatusLabel/StatusLabel.d.ts +2 -1
  80. package/dist/types/src/Switch/Switch.d.ts +2 -1
  81. package/dist/types/src/Switch/components/BaseSwitch/BaseSwitch.d.ts +2 -1
  82. package/dist/types/src/Text/Text.d.ts +1 -1
  83. package/dist/types/src/TextList/TextList.d.ts +2 -1
  84. package/dist/types/src/ThumbnailList/ThumbnailList.d.ts +2 -1
  85. package/dist/types/src/Toast/Toast.d.ts +2 -1
  86. package/dist/types/src/Typography/Typography.d.ts +1 -1
  87. package/dist/types/src/Typography/TypographyGestureDetector.d.ts +2 -1
  88. package/dist/types/src/utils/test/MockSafeAreaProvider.d.ts +1 -1
  89. package/package.json +2 -2
  90. package/src/ActionItem/ActionItem.tsx +1 -1
  91. package/src/ActionItem/ActionItemGroup.tsx +1 -3
  92. package/src/ActionItem/components/ActionItemContainer.tsx +1 -1
  93. package/src/ActionLabel/ActionLabel.tsx +1 -1
  94. package/src/ActivityIndicator/ActivityIndicator.tsx +1 -3
  95. package/src/AutoLink/AutoLink.tsx +1 -1
  96. package/src/AutoLink/components/ComposeTextWithLinks/ComposeTextWithLinks.tsx +1 -1
  97. package/src/AutoLink/components/Link/Link.tsx +1 -5
  98. package/src/Banner/Banner.tsx +2 -2
  99. package/src/Banner/components/BannerIcon/BannerIcon.tsx +1 -1
  100. package/src/BottomSheet/components/BottomSheetOption/BottomSheetOption.tsx +1 -1
  101. package/src/Button/Button.tsx +1 -1
  102. package/src/Button/components/InternalButtonLoading/InternalButtonLoading.tsx +1 -1
  103. package/src/ButtonGroup/ButtonGroup.tsx +1 -1
  104. package/src/ButtonGroup/ButtonGroupAction.tsx +4 -4
  105. package/src/ButtonGroup/components/SecondaryActionSheet/SecondaryActionSheet.tsx +1 -1
  106. package/src/Card/Card.tsx +1 -1
  107. package/src/Card/components/InternalCardHeader.tsx +1 -1
  108. package/src/Checkbox/Checkbox.tsx +2 -2
  109. package/src/Checkbox/CheckboxGroup.test.tsx +1 -1
  110. package/src/Checkbox/CheckboxGroup.tsx +2 -2
  111. package/src/Chip/Chip.tsx +1 -1
  112. package/src/Content/Content.tsx +1 -1
  113. package/src/ContentOverlay/ContentOverlay.tsx +1 -1
  114. package/src/Disclosure/Disclosure.tsx +1 -1
  115. package/src/Divider/Divider.tsx +1 -1
  116. package/src/EmptyState/EmptyState.tsx +1 -1
  117. package/src/ErrorMessageWrapper/ErrorMessageWrapper.tsx +1 -1
  118. package/src/ErrorMessageWrapper/context/ErrorMessageProvider.tsx +1 -3
  119. package/src/Flex/Flex.tsx +2 -2
  120. package/src/Form/Form.test.tsx +2 -2
  121. package/src/Form/Form.tsx +1 -1
  122. package/src/Form/components/FormActionBar/FormActionBar.tsx +3 -3
  123. package/src/Form/components/FormBody/FormBody.tsx +3 -3
  124. package/src/Form/components/FormCache/FormCache.tsx +1 -1
  125. package/src/Form/components/FormErrorBanner/FormErrorBanner.tsx +1 -1
  126. package/src/Form/components/FormMask/FormMask.tsx +1 -1
  127. package/src/Form/components/FormMessage/FormMessage.tsx +1 -1
  128. package/src/Form/components/FormMessage/components/InternalFormMessage/InternalFormMessage.tsx +1 -1
  129. package/src/Form/components/FormMessageBanner/FormMessageBanner.tsx +1 -3
  130. package/src/Form/components/FormSaveButton/FormSaveButton.tsx +1 -1
  131. package/src/Form/types.ts +2 -2
  132. package/src/FormField/FormField.tsx +1 -1
  133. package/src/FormatFile/FormatFile.tsx +3 -3
  134. package/src/FormatFile/components/ErrorIcon/ErrorIcon.tsx +1 -1
  135. package/src/FormatFile/components/FileView/FileView.tsx +1 -1
  136. package/src/FormatFile/components/FormatFileBottomSheet/FormatFileBottomSheet.tsx +1 -1
  137. package/src/FormatFile/components/MediaView/MediaView.test.tsx +283 -0
  138. package/src/FormatFile/components/MediaView/MediaView.tsx +28 -7
  139. package/src/FormatFile/components/ProgressBar/ProgressBar.tsx +1 -1
  140. package/src/Heading/Heading.tsx +1 -1
  141. package/src/Icon/Icon.tsx +1 -1
  142. package/src/IconButton/IconButton.tsx +1 -1
  143. package/src/InputCurrency/InputCurrency.tsx +1 -1
  144. package/src/InputDate/InputDate.tsx +2 -2
  145. package/src/InputFieldWrapper/InputFieldWrapper.tsx +1 -1
  146. package/src/InputFieldWrapper/components/ClearAction/ClearAction.tsx +1 -1
  147. package/src/InputFieldWrapper/components/Prefix/Prefix.tsx +2 -2
  148. package/src/InputFieldWrapper/components/Suffix/Suffix.tsx +2 -2
  149. package/src/InputPassword/InputPassword.tsx +1 -1
  150. package/src/InputPressable/InputPressable.tsx +1 -1
  151. package/src/InputSearch/components/FilterButton.tsx +1 -1
  152. package/src/InputText/context/InputAccessoriesProvider.tsx +1 -1
  153. package/src/InputTime/InputTime.tsx +2 -2
  154. package/src/Menu/Menu.tsx +1 -1
  155. package/src/Menu/components/MenuOption/MenuOption.tsx +1 -1
  156. package/src/Menu/components/Overlay/Overlay.tsx +1 -1
  157. package/src/Menu/types.ts +2 -1
  158. package/src/ProgressBar/ProgressBar.tsx +1 -1
  159. package/src/ProgressBar/ProgressBarInner.tsx +1 -1
  160. package/src/Select/Select.tsx +2 -2
  161. package/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.ios.tsx +1 -1
  162. package/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.tsx +1 -1
  163. package/src/Select/components/SelectInternalPicker/SelectInternalPicker.tsx +1 -1
  164. package/src/Select/components/SelectPressable/SelectPressable.tsx +1 -4
  165. package/src/StatusLabel/StatusLabel.tsx +1 -1
  166. package/src/Switch/Switch.tsx +1 -1
  167. package/src/Switch/components/BaseSwitch/BaseSwitch.tsx +1 -1
  168. package/src/Text/Text.tsx +1 -1
  169. package/src/TextList/TextList.tsx +1 -1
  170. package/src/ThumbnailList/ThumbnailList.tsx +1 -1
  171. package/src/Toast/Toast.tsx +2 -2
  172. package/src/Typography/Typography.tsx +1 -1
  173. package/src/Typography/TypographyGestureDetector.tsx +1 -3
  174. package/src/utils/test/MockSafeAreaProvider.tsx +1 -1
@@ -1,3 +1,4 @@
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 {
@@ -10,7 +11,7 @@ export interface PrefixLabelProps {
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, miniLabelActive, 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;
@@ -18,4 +19,4 @@ export interface PrefixIconProps {
18
19
  readonly icon: IconNames;
19
20
  readonly styleOverride?: StyleProp<ViewStyle>;
20
21
  }
21
- 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,3 +1,4 @@
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 {
@@ -11,7 +12,7 @@ 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, miniLabelActive, 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;
@@ -20,4 +21,4 @@ export interface SuffixIconProps {
20
21
  readonly hasLeftMargin?: boolean;
21
22
  readonly onPress?: () => void;
22
23
  }
23
- 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;
@@ -87,5 +87,5 @@ export interface InputPressableProps {
87
87
  }
88
88
  export type InputPressableRef = NativeText;
89
89
  export declare const InputPressable: React.ForwardRefExoticComponent<InputPressableProps & React.RefAttributes<NativeText>>;
90
- export declare function InputPressableInternal({ value, placeholder, disabled, invalid, error, showMiniLabel, 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;
91
91
  export {};
@@ -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,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,3 +1,4 @@
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";
@@ -58,5 +59,5 @@ interface InputTimeDevControlled extends InputTimeBaseProps {
58
59
  readonly onChange: (value?: Date) => void;
59
60
  }
60
61
  export type InputTimeProps = XOR<InputTimeFormControlled, InputTimeDevControlled>;
61
- export declare function InputTime(props: InputTimeProps): JSX.Element;
62
+ export declare function InputTime(props: InputTimeProps): React.JSX.Element;
62
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;
@@ -14,7 +15,7 @@ export interface MenuOptionInternalProps extends MenuOptionProps {
14
15
  }
15
16
  export interface MenuProps {
16
17
  readonly menuOptions?: MenuOptionProps[];
17
- readonly customActivator?: JSX.Element;
18
+ readonly customActivator?: ReactElement;
18
19
  }
19
20
  export interface OverlayProp {
20
21
  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;
@@ -74,4 +74,4 @@ export interface TextProps extends Pick<TypographyProps<"base">, "maxFontScaleSi
74
74
  }
75
75
  export type TextLevel = "text" | "textSupporting";
76
76
  export declare const TEXT_MAX_SCALED_FONT_SIZES: Record<TextLevel, number>;
77
- 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;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { Spacing } from "../Content";
2
3
  import type { TextLevel } from "../Text";
3
4
  interface TextListProps {
@@ -25,5 +26,5 @@ interface TextListProps {
25
26
  */
26
27
  readonly childSpacing?: Spacing;
27
28
  }
28
- export declare function TextList({ items, childSpacing, emphasis, level, spacing, }: TextListProps): JSX.Element;
29
+ export declare function TextList({ items, childSpacing, emphasis, level, spacing, }: TextListProps): React.JSX.Element;
29
30
  export {};
@@ -1,4 +1,5 @@
1
+ import React from "react";
1
2
  import type { ThumbnailListProps } from "./types";
2
3
  import type { File } from "../FormatFile";
3
4
  export declare const filterImages: (files: File[]) => File[];
4
- export declare function ThumbnailList({ files, rowCount, handleOpenFile, createThumbnail, }: ThumbnailListProps): JSX.Element;
5
+ export declare function ThumbnailList({ files, rowCount, handleOpenFile, createThumbnail, }: ThumbnailListProps): React.JSX.Element;
@@ -1,3 +1,4 @@
1
+ import React from "react";
1
2
  import type { ToastPosition } from "react-native-toast-message";
2
3
  export interface JobberToastProps {
3
4
  /**
@@ -7,7 +8,7 @@ export interface JobberToastProps {
7
8
  */
8
9
  readonly bottomOffset?: number;
9
10
  }
10
- export declare function JobberToast({ bottomOffset }: JobberToastProps): JSX.Element;
11
+ export declare function JobberToast({ bottomOffset }: JobberToastProps): React.JSX.Element;
11
12
  export interface ShowToastParams {
12
13
  /**
13
14
  * Message to be displayed in the toast
@@ -105,7 +105,7 @@ export interface TypographyUnsafeStyle {
105
105
  textStyle?: StyleProp<TextStyle>;
106
106
  }
107
107
  export declare const Typography: React.MemoExoticComponent<typeof InternalTypography>;
108
- declare function InternalTypography<T extends FontFamily = "base">({ fontFamily, fontStyle, fontWeight, transform, color, align, size, children, maxLines, allowFontScaling, maxFontScaleSize, adjustsFontSizeToFit, lineHeight, letterSpacing, reverseTheme, hideFromScreenReader, accessibilityRole, strikeThrough, underline, UNSAFE_style, selectable, onTextLayout, }: TypographyProps<T>): JSX.Element;
108
+ declare function InternalTypography<T extends FontFamily = "base">({ fontFamily, fontStyle, fontWeight, transform, color, align, size, children, maxLines, allowFontScaling, maxFontScaleSize, adjustsFontSizeToFit, lineHeight, letterSpacing, reverseTheme, hideFromScreenReader, accessibilityRole, strikeThrough, underline, UNSAFE_style, selectable, onTextLayout, }: TypographyProps<T>): React.JSX.Element;
109
109
  export type FontFamily = "base" | "display";
110
110
  export type FontStyle = "regular" | "italic";
111
111
  export type FontWeight = "regular" | "medium" | "bold" | "semiBold" | "extraBold" | "black";
@@ -1,7 +1,8 @@
1
1
  import type { PropsWithChildren } from "react";
2
+ import React from "react";
2
3
  /**
3
4
  * This is a workaround suggested by react-native-gesture-handler to prevent
4
5
  * accidental highlighting of text in Android devices
5
6
  * https://github.com/software-mansion/react-native-gesture-handler/issues/1372
6
7
  */
7
- export declare function TypographyGestureDetector(props: PropsWithChildren<unknown>): JSX.Element;
8
+ export declare function TypographyGestureDetector(props: PropsWithChildren<unknown>): React.JSX.Element;
@@ -5,5 +5,5 @@ interface MockSafeAreaProviderProps {
5
5
  readonly frame?: Rect;
6
6
  readonly insets?: EdgeInsets;
7
7
  }
8
- export declare function MockSafeAreaProvider({ frame, insets, children, }: MockSafeAreaProviderProps): JSX.Element;
8
+ export declare function MockSafeAreaProvider({ frame, insets, children, }: MockSafeAreaProviderProps): React.JSX.Element;
9
9
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components-native",
3
- "version": "0.91.0",
3
+ "version": "0.91.2",
4
4
  "license": "MIT",
5
5
  "description": "React Native implementation of Atlantis",
6
6
  "repository": {
@@ -94,5 +94,5 @@
94
94
  "react-native-safe-area-context": "^5.4.0",
95
95
  "react-native-svg": ">=12.0.0"
96
96
  },
97
- "gitHead": "29381f7508578c0518fd4cecd07d021df83e08fc"
97
+ "gitHead": "89fec0b77276ec2b2fc80f4fc4ec2f6d207c1ac6"
98
98
  }
@@ -61,7 +61,7 @@ export function ActionItem({
61
61
  actionIconAlignment = "center",
62
62
  onPress,
63
63
  testID = "actionItem",
64
- }: ActionItemProps): JSX.Element {
64
+ }: ActionItemProps) {
65
65
  const actionIconStyle = {
66
66
  justifyContent: actionIconAlignment,
67
67
  };
@@ -18,9 +18,7 @@ interface ActionItemGroupProps {
18
18
  readonly children: ActionItemElement | ActionItemElement[];
19
19
  }
20
20
 
21
- export function ActionItemGroup({
22
- children,
23
- }: ActionItemGroupProps): JSX.Element {
21
+ export function ActionItemGroup({ children }: ActionItemGroupProps) {
24
22
  return <View>{renderChildren(children)}</View>;
25
23
  }
26
24
 
@@ -16,7 +16,7 @@ export function ActionItemContainer({
16
16
  title,
17
17
  children,
18
18
  testID,
19
- }: ActionItemContainerProps): JSX.Element {
19
+ }: ActionItemContainerProps) {
20
20
  const styles = useStyles();
21
21
  const actionItemStyles = useActionItemStyles();
22
22
 
@@ -43,7 +43,7 @@ export function ActionLabel({
43
43
  type = "default",
44
44
  disabled = false,
45
45
  align = "center",
46
- }: ActionLabelProps): JSX.Element {
46
+ }: ActionLabelProps) {
47
47
  return (
48
48
  <Typography
49
49
  color={getColor(variation, disabled)}
@@ -3,9 +3,7 @@ import type { ActivityIndicatorProps } from "react-native";
3
3
  import { ActivityIndicator } from "react-native";
4
4
  import { useAtlantisTheme } from "../AtlantisThemeContext";
5
5
 
6
- export function JobberActivityIndicator(
7
- props: ActivityIndicatorProps,
8
- ): JSX.Element {
6
+ export function JobberActivityIndicator(props: ActivityIndicatorProps) {
9
7
  const { tokens } = useAtlantisTheme();
10
8
 
11
9
  return (
@@ -11,7 +11,7 @@ export function AutoLink({
11
11
  bottomTabsVisible = true,
12
12
  selectable = true,
13
13
  ...rest
14
- }: AutoLinkProps): JSX.Element {
14
+ }: AutoLinkProps) {
15
15
  const { splitText, matches } = useCreateLinkedText({ text, ...rest });
16
16
  const { tokens } = useAtlantisTheme();
17
17
 
@@ -12,7 +12,7 @@ export function ComposeTextWithLinks({
12
12
  match,
13
13
  bottomTabsVisible,
14
14
  selectable = true,
15
- }: ComposeTextWithLinksProps): JSX.Element {
15
+ }: ComposeTextWithLinksProps) {
16
16
  const { t } = useAtlantisI18n();
17
17
 
18
18
  const isLink = match?.getType();
@@ -8,11 +8,7 @@ interface LinkProps {
8
8
  readonly onLongPress?: () => void;
9
9
  }
10
10
 
11
- export function Link({
12
- children,
13
- onPress,
14
- onLongPress,
15
- }: LinkProps): JSX.Element {
11
+ export function Link({ children, onPress, onLongPress }: LinkProps) {
16
12
  return (
17
13
  <RNText onPress={onPress} onLongPress={onLongPress}>
18
14
  <Text variation="interactive">{children}</Text>
@@ -18,7 +18,7 @@ export function Banner({
18
18
  type,
19
19
  children,
20
20
  icon,
21
- }: BannerProps): JSX.Element {
21
+ }: BannerProps) {
22
22
  const bannerIcon = icon || getBannerIcon(type);
23
23
 
24
24
  const shouldFlow =
@@ -60,7 +60,7 @@ export function Banner({
60
60
  );
61
61
  }
62
62
 
63
- function BannerChildren({ children }: PropsWithChildren): JSX.Element {
63
+ function BannerChildren({ children }: PropsWithChildren) {
64
64
  if (!children) return <></>;
65
65
 
66
66
  if (children && typeof children === "string") {
@@ -10,7 +10,7 @@ export interface BannerIconProps {
10
10
  readonly type: BannerTypes;
11
11
  }
12
12
 
13
- export function BannerIcon({ icon, type }: BannerIconProps): JSX.Element {
13
+ export function BannerIcon({ icon, type }: BannerIconProps) {
14
14
  const styles = useStyles();
15
15
 
16
16
  return (
@@ -25,7 +25,7 @@ export function BottomSheetOption({
25
25
  destructive,
26
26
  textTransform = "capitalize",
27
27
  onPress,
28
- }: BottomSheetOptionProps): JSX.Element {
28
+ }: BottomSheetOptionProps) {
29
29
  const destructiveColor = "destructive";
30
30
  const textVariation = destructive ? destructiveColor : "subdued";
31
31
  const styles = useStyles();
@@ -124,7 +124,7 @@ export function Button({
124
124
  icon,
125
125
  testID,
126
126
  UNSAFE_style,
127
- }: ButtonProps): JSX.Element {
127
+ }: ButtonProps) {
128
128
  const { tokens } = useAtlantisTheme();
129
129
  const styles = useStyles();
130
130
 
@@ -28,7 +28,7 @@ const AnimatedImage = Animated.createAnimatedComponent(ImageBackground);
28
28
  function InternalButtonLoadingInternal({
29
29
  variation,
30
30
  type,
31
- }: InternalButtonLoadingProps): JSX.Element {
31
+ }: InternalButtonLoadingProps) {
32
32
  const translateX = useSharedValue(0);
33
33
  translateX.value = withRepeat(
34
34
  withTiming(offset, {
@@ -45,7 +45,7 @@ export function ButtonGroup({
45
45
  onOpenBottomSheet,
46
46
  onCloseBottomSheet,
47
47
  allowTapWhenOffline = false,
48
- }: ButtonGroupProps): JSX.Element {
48
+ }: ButtonGroupProps) {
49
49
  const { t } = useAtlantisI18n();
50
50
  const { handlePress } = usePreventTapWhenOffline();
51
51
  const secondaryActionsRef = useRef<BottomSheetRef>();
@@ -1,5 +1,5 @@
1
1
  import type { IconColorNames, IconNames } from "@jobber/design";
2
- import React from "react";
2
+ import React, { type ReactElement } from "react";
3
3
  import type { ButtonType, ButtonVariation } from "../Button";
4
4
 
5
5
  export interface ButtonGroupActionProps {
@@ -49,18 +49,18 @@ export interface ButtonGroupPrimaryActionProps extends ButtonGroupActionProps {
49
49
  /**
50
50
  * Optional custom button that can be rendered in place of the primary action button
51
51
  */
52
- customButton?: JSX.Element;
52
+ customButton?: ReactElement;
53
53
  loading?: boolean;
54
54
  }
55
55
 
56
56
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
57
- export function PrimaryAction(_: ButtonGroupPrimaryActionProps): JSX.Element {
57
+ export function PrimaryAction(_: ButtonGroupPrimaryActionProps) {
58
58
  return <></>;
59
59
  }
60
60
 
61
61
  export function SecondaryAction(
62
62
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
63
63
  _: ButtonGroupSecondaryActionProps,
64
- ): JSX.Element {
64
+ ) {
65
65
  return <></>;
66
66
  }
@@ -23,7 +23,7 @@ export function SecondaryActionSheet({
23
23
  showCancel,
24
24
  onOpenBottomSheet,
25
25
  onCloseBottomSheet,
26
- }: SecondaryActionSheetProps): JSX.Element {
26
+ }: SecondaryActionSheetProps) {
27
27
  return (
28
28
  <Portal>
29
29
  <BottomSheet
package/src/Card/Card.tsx CHANGED
@@ -80,7 +80,7 @@ export function Card({
80
80
  testID = "card",
81
81
  error,
82
82
  elevation = "none",
83
- }: CardProps): JSX.Element {
83
+ }: CardProps) {
84
84
  const styles = useStyles();
85
85
 
86
86
  return (
@@ -15,7 +15,7 @@ export function InternalCardHeader({
15
15
  children,
16
16
  testID,
17
17
  collapsable,
18
- }: InternalCardHeaderProps): JSX.Element {
18
+ }: InternalCardHeaderProps) {
19
19
  const styles = useStyles();
20
20
 
21
21
  const conditionalChildStyling = collapsable ? undefined : styles.noChildren;
@@ -79,7 +79,7 @@ export type CheckboxProps = XOR<
79
79
  UncontrolledCheckboxProps
80
80
  >;
81
81
 
82
- export function Checkbox(props: CheckboxProps): JSX.Element {
82
+ export function Checkbox(props: CheckboxProps) {
83
83
  if (props.checked !== undefined && props.onChange !== undefined) {
84
84
  return <CheckboxInternal {...props} />;
85
85
  } else if (props.name) {
@@ -113,7 +113,7 @@ function CheckboxInternal({
113
113
  assistiveText,
114
114
  onChange,
115
115
  accessibilityLabel,
116
- }: CheckboxProps): JSX.Element {
116
+ }: CheckboxProps) {
117
117
  const internalValue = checked ?? !!defaultChecked;
118
118
 
119
119
  const iconName = indeterminate ? "minus2" : "checkmark";
@@ -66,7 +66,7 @@ function SetupWithForm({
66
66
  }: {
67
67
  readonly initialValues: CheckboxGroupFormData;
68
68
  readonly onChangeHandlers?: CheckboxGroupFormOnChangeHandlers;
69
- }): JSX.Element {
69
+ }) {
70
70
  const formMethods = useForm({ defaultValues: initialValues });
71
71
 
72
72
  return (
@@ -46,7 +46,7 @@ export function CheckboxGroup({
46
46
  onChange,
47
47
  name,
48
48
  ...rest
49
- }: CheckboxGroupProps): JSX.Element {
49
+ }: CheckboxGroupProps) {
50
50
  if (state !== undefined && onChange !== undefined) {
51
51
  return (
52
52
  <CheckboxGroupInternal
@@ -92,7 +92,7 @@ function CheckboxGroupInternal({
92
92
  accessibilityLabel,
93
93
  onChange,
94
94
  name: parentName,
95
- }: ControlledCheckboxGroupProps): JSX.Element {
95
+ }: ControlledCheckboxGroupProps) {
96
96
  const childrenNames = React.Children.map(children, child => {
97
97
  const name = throwErrorIfItHasNoName(child.props.name);
98
98
 
package/src/Chip/Chip.tsx CHANGED
@@ -68,7 +68,7 @@ export function Chip({
68
68
  accessibilityLabel,
69
69
  accessibilityRole = "radio",
70
70
  accent,
71
- }: ChipProps): JSX.Element {
71
+ }: ChipProps) {
72
72
  const styles = useStyles();
73
73
  const { tokens } = useAtlantisTheme();
74
74
  const defaultAccentColor = tokens["color-surface--reverse"];
@@ -51,7 +51,7 @@ export function Content({
51
51
  childSpacing = "base",
52
52
  direction = "vertical",
53
53
  UNSAFE_style,
54
- }: ContentProps): JSX.Element {
54
+ }: ContentProps) {
55
55
  const horizontalStyles = useHorizontalStyles();
56
56
  const verticalStyles = useVerticalStyles();
57
57
  const spaceAroundStyles = useSpaceAroundStyles();
@@ -57,7 +57,7 @@ function ContentOverlayInternal(
57
57
  avoidKeyboardLikeIOS,
58
58
  }: ContentOverlayProps,
59
59
  ref: Ref<ContentOverlayRef>,
60
- ): JSX.Element {
60
+ ) {
61
61
  isDraggable = onBeforeExit ? false : isDraggable;
62
62
  const isCloseableOnOverlayTap = onBeforeExit ? false : true;
63
63
  const { t } = useAtlantisI18n();
@@ -61,7 +61,7 @@ export function Disclosure({
61
61
  onToggle,
62
62
  isEmpty,
63
63
  animationDuration = staticTokens["timing-slowest"],
64
- }: DisclosureProps): JSX.Element {
64
+ }: DisclosureProps) {
65
65
  const styles = useStyles();
66
66
 
67
67
  return (
@@ -26,7 +26,7 @@ export function Divider({
26
26
  size = "base",
27
27
  direction = "horizontal",
28
28
  testID = "Divider",
29
- }: DividerProps): JSX.Element {
29
+ }: DividerProps) {
30
30
  const horizontalStyles = useHorizontalStyles();
31
31
  const verticalStyles = useVerticalStyles();
32
32