@jobber/components-native 0.74.1-node22-3bf0edd.11 → 0.75.1

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 (86) hide show
  1. package/dist/package.json +2 -2
  2. package/dist/src/Disclosure/Disclosure.js +2 -2
  3. package/dist/src/Divider/Divider.js +9 -6
  4. package/dist/src/Divider/{Divider.style.js → DividerHorizontal.style.js} +9 -4
  5. package/dist/src/Divider/DividerVertical.style.js +26 -0
  6. package/dist/src/Form/components/FormCache/FormCache.js +0 -2
  7. package/dist/src/FormatFile/components/_mocks/mockFiles.js +1 -1
  8. package/dist/src/Heading/Heading.js +2 -2
  9. package/dist/src/Text/Text.js +2 -2
  10. package/dist/src/Typography/Typography.js +2 -4
  11. package/dist/src/utils/test/wait.js +2 -2
  12. package/dist/tsconfig.tsbuildinfo +1 -1
  13. package/dist/types/src/ActionLabel/ActionLabel.d.ts +0 -1
  14. package/dist/types/src/ActivityIndicator/ActivityIndicator.d.ts +0 -1
  15. package/dist/types/src/AtlantisContext/AtlantisContext.d.ts +0 -1
  16. package/dist/types/src/AutoLink/AutoLink.d.ts +0 -1
  17. package/dist/types/src/AutoLink/components/ComposeTextWithLinks/ComposeTextWithLinks.d.ts +0 -1
  18. package/dist/types/src/AutoLink/components/Link/Link.d.ts +0 -1
  19. package/dist/types/src/Banner/Banner.d.ts +0 -1
  20. package/dist/types/src/Banner/components/BannerIcon/BannerIcon.d.ts +0 -1
  21. package/dist/types/src/BottomSheet/components/BottomSheetOption/BottomSheetOption.d.ts +0 -1
  22. package/dist/types/src/Button/Button.d.ts +0 -1
  23. package/dist/types/src/ButtonGroup/ButtonGroup.d.ts +0 -1
  24. package/dist/types/src/ButtonGroup/ButtonGroupAction.d.ts +0 -1
  25. package/dist/types/src/Checkbox/Checkbox.d.ts +0 -1
  26. package/dist/types/src/Checkbox/CheckboxGroup.d.ts +0 -1
  27. package/dist/types/src/Chip/Chip.d.ts +0 -1
  28. package/dist/types/src/ContentOverlay/ContentOverlay.d.ts +3 -2
  29. package/dist/types/src/Divider/Divider.d.ts +12 -4
  30. package/dist/types/src/Divider/{Divider.style.d.ts → DividerHorizontal.style.d.ts} +7 -2
  31. package/dist/types/src/Divider/DividerVertical.style.d.ts +24 -0
  32. package/dist/types/src/EmptyState/EmptyState.d.ts +0 -1
  33. package/dist/types/src/ErrorMessageWrapper/context/ErrorMessageContext.d.ts +0 -1
  34. package/dist/types/src/Form/Form.d.ts +0 -1
  35. package/dist/types/src/Form/components/FormActionBar/FormActionBar.d.ts +0 -1
  36. package/dist/types/src/Form/components/FormBody/FormBody.d.ts +0 -1
  37. package/dist/types/src/Form/components/FormCache/FormCache.d.ts +0 -1
  38. package/dist/types/src/Form/components/FormErrorBanner/FormErrorBanner.d.ts +0 -1
  39. package/dist/types/src/Form/components/FormMask/FormMask.d.ts +0 -1
  40. package/dist/types/src/Form/components/FormMessage/FormMessage.d.ts +0 -2
  41. package/dist/types/src/Form/components/FormMessage/components/InternalFormMessage/InternalFormMessage.d.ts +0 -1
  42. package/dist/types/src/Form/components/FormMessageBanner/FormMessageBanner.d.ts +0 -1
  43. package/dist/types/src/Form/components/FormSaveButton/FormSaveButton.d.ts +0 -1
  44. package/dist/types/src/Form/context/AtlantisFormContext.d.ts +0 -1
  45. package/dist/types/src/FormatFile/FormatFile.d.ts +0 -1
  46. package/dist/types/src/FormatFile/components/ErrorIcon/ErrorIcon.d.ts +0 -1
  47. package/dist/types/src/FormatFile/components/FileView/FileView.d.ts +0 -1
  48. package/dist/types/src/FormatFile/components/MediaView/MediaView.d.ts +0 -1
  49. package/dist/types/src/FormatFile/components/ProgressBar/ProgressBar.d.ts +0 -2
  50. package/dist/types/src/FormatFile/components/_mocks/mockFiles.d.ts +4 -4
  51. package/dist/types/src/FormatFile/context/FormatFileContext.d.ts +0 -1
  52. package/dist/types/src/Glimmer/Glimmer.d.ts +0 -1
  53. package/dist/types/src/Heading/Heading.d.ts +0 -1
  54. package/dist/types/src/Icon/Icon.d.ts +0 -1
  55. package/dist/types/src/InputCurrency/InputCurrency.d.ts +0 -1
  56. package/dist/types/src/InputDate/InputDate.d.ts +0 -1
  57. package/dist/types/src/InputFieldWrapper/components/ClearAction/ClearAction.d.ts +0 -1
  58. package/dist/types/src/InputFieldWrapper/components/Prefix/Prefix.d.ts +0 -1
  59. package/dist/types/src/InputFieldWrapper/components/Suffix/Suffix.d.ts +0 -1
  60. package/dist/types/src/InputSearch/components/FilterButton.d.ts +0 -1
  61. package/dist/types/src/InputText/context/InputAccessoriesContext.d.ts +0 -1
  62. package/dist/types/src/InputTime/InputTime.d.ts +0 -1
  63. package/dist/types/src/Menu/Menu.d.ts +0 -1
  64. package/dist/types/src/Menu/components/MenuOption/MenuOption.d.ts +0 -1
  65. package/dist/types/src/Menu/components/Overlay/Overlay.d.ts +0 -1
  66. package/dist/types/src/Menu/types.d.ts +0 -1
  67. package/dist/types/src/ProgressBar/ProgressBar.d.ts +0 -1
  68. package/dist/types/src/ProgressBar/ProgressBarInner.d.ts +0 -1
  69. package/dist/types/src/ProgressBar/ProgressBarStepped.d.ts +0 -1
  70. package/dist/types/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.d.ts +0 -1
  71. package/dist/types/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.ios.d.ts +0 -1
  72. package/dist/types/src/Select/components/SelectInternalPicker/SelectInternalPicker.d.ts +0 -1
  73. package/dist/types/src/Select/components/SelectPressable/SelectPressable.d.ts +0 -1
  74. package/dist/types/src/StatusLabel/StatusLabel.d.ts +0 -1
  75. package/dist/types/src/Switch/Switch.d.ts +0 -1
  76. package/dist/types/src/Switch/components/BaseSwitch/BaseSwitch.d.ts +0 -1
  77. package/dist/types/src/Text/Text.d.ts +0 -1
  78. package/dist/types/src/TextList/TextList.d.ts +0 -1
  79. package/dist/types/src/ThumbnailList/ThumbnailList.d.ts +0 -1
  80. package/dist/types/src/Toast/Toast.d.ts +0 -1
  81. package/package.json +2 -2
  82. package/src/Divider/Divider.test.tsx +58 -19
  83. package/src/Divider/Divider.tsx +25 -7
  84. package/src/Divider/{Divider.style.ts → DividerHorizontal.style.ts} +9 -4
  85. package/src/Divider/DividerVertical.style.ts +27 -0
  86. package/src/Form/components/FormCache/FormCache.tsx +0 -2
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
2
  import { View } from "react-native";
3
- import { styles } from "./Divider.style";
3
+ import { horizontalStyles } from "./DividerHorizontal.style";
4
+ import { verticalStyles } from "./DividerVertical.style";
4
5
 
5
6
  interface DividerProps {
6
7
  /**
@@ -8,15 +9,32 @@ interface DividerProps {
8
9
  *
9
10
  * @default "base"
10
11
  */
11
- readonly size?: keyof typeof styles;
12
+ readonly size?: "base" | "large" | "larger" | "largest";
13
+ /**
14
+ * The direction of the divider
15
+ *
16
+ * @default "horizontal"
17
+ */
18
+ readonly direction?: "horizontal" | "vertical";
19
+ /**
20
+ * Used to locate this view in end-to-end tests.
21
+ */
22
+ readonly testID?: string;
12
23
  }
13
24
 
14
- export function Divider({ size = "base" }: DividerProps): JSX.Element {
25
+ export function Divider({
26
+ size = "base",
27
+ direction = "horizontal",
28
+ testID = "Divider",
29
+ }: DividerProps): JSX.Element {
30
+ const directionalStyles =
31
+ direction === "horizontal" ? horizontalStyles : verticalStyles;
15
32
  const style = [
16
- styles.base,
17
- size === "large" && styles.large,
18
- size === "largest" && styles.largest,
33
+ directionalStyles.base,
34
+ size === "large" && directionalStyles.large,
35
+ size === "larger" && directionalStyles.larger,
36
+ size === "largest" && directionalStyles.largest,
19
37
  ];
20
38
 
21
- return <View testID="Divider" style={style} />;
39
+ return <View testID={testID} style={style} />;
22
40
  }
@@ -1,19 +1,24 @@
1
1
  import { StyleSheet } from "react-native";
2
2
  import { tokens } from "../utils/design";
3
3
 
4
- export const styles = StyleSheet.create({
4
+ export const horizontalStyles = StyleSheet.create({
5
5
  base: {
6
- height: tokens["space-minuscule"],
6
+ height: 1,
7
7
  margin: 0,
8
- borderBottomWidth: tokens["border-base"],
8
+ width: "auto",
9
9
  borderBottomColor: tokens["color-border"],
10
+ borderBottomWidth: tokens["border-base"],
10
11
  },
11
12
  large: {
12
13
  borderBottomWidth: tokens["border-thick"],
13
14
  opacity: 0.875,
14
15
  },
16
+ larger: {
17
+ borderBottomWidth: tokens["border-thicker"],
18
+ opacity: 0.625,
19
+ },
15
20
  largest: {
16
- borderBottomWidth: tokens["space-small"],
21
+ borderBottomWidth: tokens["border-thickest"],
17
22
  opacity: 0.375,
18
23
  },
19
24
  });
@@ -0,0 +1,27 @@
1
+ import { StyleSheet } from "react-native";
2
+ import { tokens } from "../utils/design";
3
+
4
+ export const verticalStyles = StyleSheet.create({
5
+ base: {
6
+ margin: 0,
7
+ height: "100%",
8
+ width: 1,
9
+ borderRightWidth: tokens["border-base"],
10
+ borderRightColor: tokens["color-border"],
11
+ },
12
+ large: {
13
+ borderRightWidth: tokens["border-thick"],
14
+ opacity: 0.875,
15
+ },
16
+ larger: {
17
+ borderRightWidth: tokens["border-thicker"],
18
+ opacity: 0.625,
19
+ },
20
+ largest: {
21
+ borderRightWidth: tokens["border-thickest"],
22
+ opacity: 0.375,
23
+ },
24
+ vertical: {
25
+ borderRightColor: tokens["color-border"],
26
+ },
27
+ });
@@ -41,8 +41,6 @@ export function FormCache<T extends FieldValues>({
41
41
  // https://github.com/react-hook-form/react-hook-form/issues/2978
42
42
  setLocalCache(omit(formData, localCacheExclude));
43
43
  } else {
44
- // @ts-expect-error Typescript thinks that the FieldValues defined in useWatch is different
45
- // from the one in useFormContext
46
44
  setLocalCache(formData);
47
45
  }
48
46
  }, [formData, isDirty, localCacheExclude, setLocalCache, shouldExclude]);