@jobber/components-native 0.101.3 → 0.101.4

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 (182) hide show
  1. package/dist/package.json +19 -11
  2. package/dist/src/ActionItem/ActionItem.test.js +81 -0
  3. package/dist/src/ActionItem/ActionItemGroup.test.js +25 -0
  4. package/dist/src/ActionItem/components/ActionItemContainer.test.js +24 -0
  5. package/dist/src/ActionLabel/ActionLabel.test.js +81 -0
  6. package/dist/src/ActivityIndicator/ActivityIndicator.test.js +23 -0
  7. package/dist/src/AtlantisContext/AtlantisContext.test.js +35 -0
  8. package/dist/src/AtlantisThemeContext/AtlantisThemeContext.test.js +65 -0
  9. package/dist/src/AtlantisThemeContext/buildThemedStyles.test.js +43 -0
  10. package/dist/src/AutoLink/AutoLink.test.js +133 -0
  11. package/dist/src/AutoLink/components/Link/Link.test.js +18 -0
  12. package/dist/src/Banner/Banner.test.js +98 -0
  13. package/dist/src/BottomSheet/BottomSheet.test.js +105 -0
  14. package/dist/src/BottomSheet/components/BottomSheetOption/BottomSheetOption.test.js +19 -0
  15. package/dist/src/BottomSheet/hooks/useBottomSheetBackHandler.test.js +68 -0
  16. package/dist/src/Button/Button.test.js +228 -0
  17. package/dist/src/Button/components/InternalButtonLoading/InternalButtonLoading.test.js +25 -0
  18. package/dist/src/ButtonGroup/ButtonGroup.test.js +153 -0
  19. package/dist/src/Card/Card.test.js +80 -0
  20. package/dist/src/Card/components/InternalCardHeader.test.js +18 -0
  21. package/dist/src/Checkbox/Checkbox.test.js +135 -0
  22. package/dist/src/Checkbox/CheckboxGroup.test.js +197 -0
  23. package/dist/src/Checkbox/CheckboxGroupReducer.test.js +25 -0
  24. package/dist/src/Chip/Chip.test.js +69 -0
  25. package/dist/src/Content/Content.test.js +250 -0
  26. package/dist/src/ContentOverlay/ContentOverlay.test.js +297 -0
  27. package/dist/src/ContentOverlay/computeContentOverlayBehavior.test.js +197 -0
  28. package/dist/src/ContentOverlay/hooks/useBottomSheetModalBackHandler.test.js +62 -0
  29. package/dist/src/ContentOverlay/hooks/useKeyboardVisibility.test.js +41 -0
  30. package/dist/src/ContentOverlay/hooks/useViewLayoutHeight.test.js +62 -0
  31. package/dist/src/Disclosure/Disclosure.test.js +64 -0
  32. package/dist/src/Divider/Divider.test.js +65 -0
  33. package/dist/src/EmptyState/EmptyState.test.js +82 -0
  34. package/dist/src/ErrorMessageWrapper/ErrorMessageWrapper.test.js +29 -0
  35. package/dist/src/Flex/Flex.test.js +104 -0
  36. package/dist/src/Form/Form.test.js +393 -0
  37. package/dist/src/Form/components/FormErrorBanner/FormErrorBanner.test.js +41 -0
  38. package/dist/src/Form/components/FormMessage/FormMessage.test.js +73 -0
  39. package/dist/src/Form/components/FormMessageBanner/FormMessageBanner.test.js +30 -0
  40. package/dist/src/Form/components/FormSaveButton/FormSaveButton.test.js +82 -0
  41. package/dist/src/Form/context/AtlantisFormContext.test.js +28 -0
  42. package/dist/src/Form/hooks/useScrollToError/useScrollToError.test.js +89 -0
  43. package/dist/src/FormField/FormField.test.js +81 -0
  44. package/dist/src/FormatFile/FormatFile.test.js +212 -0
  45. package/dist/src/FormatFile/FormatFileThumbnail.test.js +192 -0
  46. package/dist/src/FormatFile/components/FormatFileBottomSheet/FormatFileBottomSheet.test.js +74 -0
  47. package/dist/src/FormatFile/components/MediaView/MediaView.test.js +202 -0
  48. package/dist/src/FormatFile/utils/parseFile.test.js +188 -0
  49. package/dist/src/Glimmer/Glimmer.test.js +61 -0
  50. package/dist/src/Heading/Heading.test.js +61 -0
  51. package/dist/src/Icon/Icon.test.js +40 -0
  52. package/dist/src/IconButton/IconButton.test.js +38 -0
  53. package/dist/src/InputCurrency/InputCurrency.test.js +106 -0
  54. package/dist/src/InputDate/InputDate.test.js +184 -0
  55. package/dist/src/InputEmail/InputEmail.test.js +27 -0
  56. package/dist/src/InputFieldWrapper/InputFieldWrapper.test.js +279 -0
  57. package/dist/src/InputFieldWrapper/components/ClearAction/ClearAction.test.js +9 -0
  58. package/dist/src/InputFieldWrapper/components/Prefix/Prefix.test.js +130 -0
  59. package/dist/src/InputFieldWrapper/components/Suffix/Suffix.test.js +51 -0
  60. package/dist/src/InputNumber/InputNumber.test.js +220 -0
  61. package/dist/src/InputPassword/InputPassword.test.js +63 -0
  62. package/dist/src/InputPressable/InputPressable.test.js +138 -0
  63. package/dist/src/InputSearch/InputSearch.test.js +54 -0
  64. package/dist/src/InputText/InputText.test.js +652 -0
  65. package/dist/src/InputText/context/InputAccessoriesProvider.test.js +71 -0
  66. package/dist/src/InputTime/InputTime.test.js +199 -0
  67. package/dist/src/InputTime/utils/utils.test.js +32 -0
  68. package/dist/src/ProgressBar/ProgressBar.test.js +89 -0
  69. package/dist/src/Select/Select.test.js +183 -0
  70. package/dist/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.test.js +51 -0
  71. package/dist/src/Select/components/SelectInternalPicker/SelectInternalPicker.test.js +72 -0
  72. package/dist/src/StatusLabel/StatusLabel.test.js +51 -0
  73. package/dist/src/Switch/Switch.test.js +60 -0
  74. package/dist/src/Switch/components/BaseSwitch/BaseSwitch.test.js +61 -0
  75. package/dist/src/Text/Text.test.js +161 -0
  76. package/dist/src/TextList/TextList.test.js +16 -0
  77. package/dist/src/ThumbnailList/ThumbnailList.test.js +72 -0
  78. package/dist/src/Toast/Toast.test.js +51 -0
  79. package/dist/src/Typography/Typography.test.js +225 -0
  80. package/dist/src/hooks/useAtlantisI18n/useAtlantisI18n.test.js +103 -0
  81. package/dist/src/utils/meta/meta.test.js +83 -0
  82. package/dist/tsconfig.build.json +5 -1
  83. package/dist/tsconfig.build.tsbuildinfo +1 -1
  84. package/dist/tsconfig.eslint.json +14 -0
  85. package/dist/tsconfig.json +3 -4
  86. package/dist/types/src/ActionItem/ActionItem.test.d.ts +1 -0
  87. package/dist/types/src/ActionItem/ActionItemGroup.test.d.ts +1 -0
  88. package/dist/types/src/ActionItem/components/ActionItemContainer.test.d.ts +1 -0
  89. package/dist/types/src/ActionLabel/ActionLabel.test.d.ts +1 -0
  90. package/dist/types/src/ActivityIndicator/ActivityIndicator.test.d.ts +1 -0
  91. package/dist/types/src/AtlantisContext/AtlantisContext.test.d.ts +1 -0
  92. package/dist/types/src/AtlantisThemeContext/AtlantisThemeContext.test.d.ts +1 -0
  93. package/dist/types/src/AtlantisThemeContext/buildThemedStyles.test.d.ts +1 -0
  94. package/dist/types/src/AutoLink/AutoLink.test.d.ts +1 -0
  95. package/dist/types/src/AutoLink/components/Link/Link.test.d.ts +1 -0
  96. package/dist/types/src/Banner/Banner.test.d.ts +1 -0
  97. package/dist/types/src/BottomSheet/BottomSheet.test.d.ts +1 -0
  98. package/dist/types/src/BottomSheet/components/BottomSheetOption/BottomSheetOption.test.d.ts +1 -0
  99. package/dist/types/src/BottomSheet/hooks/useBottomSheetBackHandler.test.d.ts +1 -0
  100. package/dist/types/src/Button/Button.test.d.ts +1 -0
  101. package/dist/types/src/Button/components/InternalButtonLoading/InternalButtonLoading.test.d.ts +1 -0
  102. package/dist/types/src/ButtonGroup/ButtonGroup.test.d.ts +1 -0
  103. package/dist/types/src/Card/Card.test.d.ts +1 -0
  104. package/dist/types/src/Card/components/InternalCardHeader.test.d.ts +1 -0
  105. package/dist/types/src/Checkbox/Checkbox.test.d.ts +1 -0
  106. package/dist/types/src/Checkbox/CheckboxGroup.test.d.ts +1 -0
  107. package/dist/types/src/Checkbox/CheckboxGroupReducer.test.d.ts +1 -0
  108. package/dist/types/src/Chip/Chip.test.d.ts +1 -0
  109. package/dist/types/src/Content/Content.test.d.ts +1 -0
  110. package/dist/types/src/ContentOverlay/BottomSheetKeyboardAwareScrollView.d.ts +2 -1
  111. package/dist/types/src/ContentOverlay/ContentOverlay.test.d.ts +1 -0
  112. package/dist/types/src/ContentOverlay/computeContentOverlayBehavior.test.d.ts +1 -0
  113. package/dist/types/src/ContentOverlay/hooks/useBottomSheetModalBackHandler.test.d.ts +1 -0
  114. package/dist/types/src/ContentOverlay/hooks/useKeyboardVisibility.test.d.ts +1 -0
  115. package/dist/types/src/ContentOverlay/hooks/useViewLayoutHeight.test.d.ts +1 -0
  116. package/dist/types/src/Disclosure/Disclosure.test.d.ts +1 -0
  117. package/dist/types/src/Divider/Divider.test.d.ts +1 -0
  118. package/dist/types/src/EmptyState/EmptyState.test.d.ts +1 -0
  119. package/dist/types/src/ErrorMessageWrapper/ErrorMessageWrapper.test.d.ts +1 -0
  120. package/dist/types/src/Flex/Flex.test.d.ts +1 -0
  121. package/dist/types/src/Form/Form.test.d.ts +1 -0
  122. package/dist/types/src/Form/components/FormErrorBanner/FormErrorBanner.test.d.ts +1 -0
  123. package/dist/types/src/Form/components/FormMessage/FormMessage.test.d.ts +1 -0
  124. package/dist/types/src/Form/components/FormMessageBanner/FormMessageBanner.test.d.ts +1 -0
  125. package/dist/types/src/Form/components/FormSaveButton/FormSaveButton.test.d.ts +1 -0
  126. package/dist/types/src/Form/context/AtlantisFormContext.test.d.ts +1 -0
  127. package/dist/types/src/Form/hooks/useScrollToError/useScrollToError.test.d.ts +1 -0
  128. package/dist/types/src/FormField/FormField.test.d.ts +1 -0
  129. package/dist/types/src/FormatFile/FormatFile.test.d.ts +1 -0
  130. package/dist/types/src/FormatFile/FormatFileThumbnail.test.d.ts +1 -0
  131. package/dist/types/src/FormatFile/components/FormatFileBottomSheet/FormatFileBottomSheet.test.d.ts +1 -0
  132. package/dist/types/src/FormatFile/components/MediaView/MediaView.test.d.ts +1 -0
  133. package/dist/types/src/FormatFile/utils/parseFile.test.d.ts +1 -0
  134. package/dist/types/src/Glimmer/Glimmer.test.d.ts +1 -0
  135. package/dist/types/src/Heading/Heading.test.d.ts +1 -0
  136. package/dist/types/src/Icon/Icon.test.d.ts +1 -0
  137. package/dist/types/src/IconButton/IconButton.test.d.ts +1 -0
  138. package/dist/types/src/InputCurrency/InputCurrency.test.d.ts +1 -0
  139. package/dist/types/src/InputDate/InputDate.test.d.ts +1 -0
  140. package/dist/types/src/InputEmail/InputEmail.test.d.ts +1 -0
  141. package/dist/types/src/InputFieldWrapper/InputFieldWrapper.test.d.ts +1 -0
  142. package/dist/types/src/InputFieldWrapper/components/ClearAction/ClearAction.test.d.ts +1 -0
  143. package/dist/types/src/InputFieldWrapper/components/Prefix/Prefix.test.d.ts +1 -0
  144. package/dist/types/src/InputFieldWrapper/components/Suffix/Suffix.test.d.ts +1 -0
  145. package/dist/types/src/InputNumber/InputNumber.test.d.ts +1 -0
  146. package/dist/types/src/InputPassword/InputPassword.test.d.ts +1 -0
  147. package/dist/types/src/InputPressable/InputPressable.test.d.ts +1 -0
  148. package/dist/types/src/InputSearch/InputSearch.test.d.ts +1 -0
  149. package/dist/types/src/InputText/InputText.test.d.ts +1 -0
  150. package/dist/types/src/InputText/context/InputAccessoriesProvider.test.d.ts +1 -0
  151. package/dist/types/src/InputTime/InputTime.test.d.ts +1 -0
  152. package/dist/types/src/InputTime/utils/utils.test.d.ts +1 -0
  153. package/dist/types/src/ProgressBar/ProgressBar.test.d.ts +1 -0
  154. package/dist/types/src/Select/Select.test.d.ts +1 -0
  155. package/dist/types/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.test.d.ts +1 -0
  156. package/dist/types/src/Select/components/SelectInternalPicker/SelectInternalPicker.test.d.ts +1 -0
  157. package/dist/types/src/StatusLabel/StatusLabel.test.d.ts +1 -0
  158. package/dist/types/src/Switch/Switch.test.d.ts +1 -0
  159. package/dist/types/src/Switch/components/BaseSwitch/BaseSwitch.test.d.ts +1 -0
  160. package/dist/types/src/Text/Text.test.d.ts +1 -0
  161. package/dist/types/src/TextList/TextList.test.d.ts +1 -0
  162. package/dist/types/src/ThumbnailList/ThumbnailList.test.d.ts +1 -0
  163. package/dist/types/src/Toast/Toast.test.d.ts +1 -0
  164. package/dist/types/src/Typography/Typography.test.d.ts +1 -0
  165. package/dist/types/src/hooks/useAtlantisI18n/useAtlantisI18n.test.d.ts +1 -0
  166. package/dist/types/src/utils/meta/meta.test.d.ts +1 -0
  167. package/package.json +19 -11
  168. package/src/Button/Button.test.tsx +6 -2
  169. package/src/ContentOverlay/hooks/useViewLayoutHeight.test.ts +3 -3
  170. package/src/Divider/Divider.stories.tsx +1 -1
  171. package/src/Flex/Flex.test.tsx +1 -1
  172. package/src/Form/Form.test.tsx +3 -1
  173. package/src/FormField/FormField.test.tsx +5 -1
  174. package/src/Heading/__snapshots__/Heading.test.tsx.snap +1 -1
  175. package/src/InputDate/InputDate.test.tsx +7 -1
  176. package/src/InputText/InputText.test.tsx +2 -1
  177. package/src/InputTime/InputTime.test.tsx +7 -1
  178. package/src/Select/Select.test.tsx +1 -1
  179. package/src/StatusLabel/__snapshots__/StatusLabel.test.tsx.snap +8 -8
  180. package/src/Text/__snapshots__/Text.test.tsx.snap +2 -2
  181. package/src/ThumbnailList/__snapshots__/ThumbnailList.test.tsx.snap +1 -1
  182. package/src/Typography/__snapshots__/Typography.test.tsx.snap +4 -4
@@ -0,0 +1,14 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "include": [
4
+ "*.ts",
5
+ ".storybook/**/*.ts",
6
+ ".storybook/**/*.tsx",
7
+ "src",
8
+ "**/*.json"
9
+ ],
10
+ "exclude": [
11
+ "node_modules",
12
+ "dist/**/*"
13
+ ]
14
+ }
@@ -17,7 +17,8 @@
17
17
  },
18
18
  "types": [
19
19
  "react-native",
20
- "jest"
20
+ "jest",
21
+ "node",
21
22
  ],
22
23
  "lib": [
23
24
  "es2019"
@@ -32,8 +33,6 @@
32
33
  "node_modules",
33
34
  "dist/**/*",
34
35
  "tsconfig.eslint.json",
35
- "**/*.stories.tsx",
36
- "**/*.test.ts",
37
- "**/*.test.tsx",
36
+ "**/*.stories.tsx"
38
37
  ]
39
38
  }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -5,7 +5,8 @@ declare const BottomSheetKeyboardAwareScrollView: import("react").NamedExoticCom
5
5
  disableScrollOnKeyboardHide?: boolean;
6
6
  enabled?: boolean;
7
7
  extraKeyboardSpace?: number;
8
- ScrollViewComponent?: React.ComponentType<import("react-native").ScrollViewProps>;
8
+ mode?: import("react-native-keyboard-controller").KeyboardAwareScrollViewMode;
9
+ ScrollViewComponent?: import("react-native-keyboard-controller/lib/typescript/components/ScrollViewWithBottomPadding").AnimatedScrollViewComponent;
9
10
  } & import("react-native").ScrollViewProps & import("react").RefAttributes<BottomSheetScrollViewMethods>>;
10
11
  export { BottomSheetKeyboardAwareScrollView };
11
12
  export type { KeyboardAwareScrollViewProps };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components-native",
3
- "version": "0.101.3",
3
+ "version": "0.101.4",
4
4
  "license": "MIT",
5
5
  "description": "React Native implementation of Atlantis",
6
6
  "repository": {
@@ -29,9 +29,9 @@
29
29
  ],
30
30
  "scripts": {
31
31
  "clean": "rm -rf dist/* tsconfig.tsbuildinfo",
32
- "build": "npm run build:clean && npm run compile",
33
- "bootstrap": "npm run build",
34
- "prepack": "npm run build",
32
+ "build": "pnpm run build:clean && pnpm run compile",
33
+ "bootstrap": "pnpm run build",
34
+ "prepack": "pnpm run build",
35
35
  "watch": "tsc -p tsconfig.build.json --watch --preserveWatchOutput",
36
36
  "compile": "tsc -p tsconfig.build.json",
37
37
  "build:clean": "rm -rf ./dist",
@@ -52,20 +52,26 @@
52
52
  "ts-xor": "^1.1.0"
53
53
  },
54
54
  "devDependencies": {
55
+ "@babel/runtime": "^7.29.2",
55
56
  "@gorhom/bottom-sheet": "^5.2.8",
57
+ "@jobber/hooks": "2.19.4",
56
58
  "@react-native-community/datetimepicker": "^8.4.5",
57
59
  "@react-native/babel-preset": "^0.82.1",
58
- "@storybook/addon-a11y": "9.1.19",
59
- "@storybook/react": "9.1.19",
60
- "@storybook/react-native-web-vite": "9.1.19",
60
+ "@storybook/addon-a11y": "10.3.5",
61
+ "@storybook/addon-mcp": "^0.4.2",
62
+ "@storybook/react-native-web-vite": "10.3.5",
61
63
  "@testing-library/react-native": "^13.3.3",
64
+ "@types/jest": "^29.5.14",
62
65
  "@types/lodash.chunk": "^4.2.7",
63
66
  "@types/lodash.debounce": "^4.0.7",
64
67
  "@types/lodash.identity": "^3.0.7",
68
+ "@types/node": "^22.19.17",
65
69
  "@types/react-native-uuid": "^1.4.0",
66
70
  "@types/react-test-renderer": "19.1.0",
67
71
  "date-fns": "^2.30.0",
68
72
  "date-fns-tz": "^2.0.0",
73
+ "react": "19.1.1",
74
+ "react-dom": "19.1.1",
69
75
  "react-native": "^0.82.1",
70
76
  "react-native-gesture-handler": "^2.29.1",
71
77
  "react-native-keyboard-controller": "^1.12.0",
@@ -75,17 +81,19 @@
75
81
  "react-native-screens": "^4.18.0",
76
82
  "react-native-svg": "^15.1.0",
77
83
  "react-native-web": "^0.20.0",
78
- "react-test-renderer": "^19.1.1",
79
- "storybook": "9.1.19"
84
+ "react-test-renderer": "19.1.1",
85
+ "storybook": "10.3.5",
86
+ "vite": "^8.0.9"
80
87
  },
81
88
  "peerDependencies": {
82
89
  "@babel/core": "^7.4.5",
83
90
  "@gorhom/bottom-sheet": "^5.2.8",
84
91
  "@jobber/design": "*",
92
+ "@jobber/hooks": ">=2",
85
93
  "@react-native-community/datetimepicker": ">=6.7.0",
86
94
  "date-fns": "^2.30.0",
87
95
  "date-fns-tz": "^2.0.0",
88
- "react": "^19",
96
+ "react": "^19.1.0",
89
97
  "react-intl": "^6 || ^7",
90
98
  "react-native": ">=0.79.5",
91
99
  "react-native-gesture-handler": ">=2.22.0",
@@ -96,5 +104,5 @@
96
104
  "react-native-screens": ">=4.18.0",
97
105
  "react-native-svg": ">=12.0.0"
98
106
  },
99
- "gitHead": "1f03d859cb80ae90c91107efbd8a057a30a7f720"
107
+ "gitHead": "2306bc5ca1ed0a56871602085cc3c4223b9d08d8"
100
108
  }
@@ -41,9 +41,13 @@ function getIconAndTextColorFromRender({
41
41
  function renderButton(element: ReactElement) {
42
42
  const instance = render(element);
43
43
 
44
- const button = instance.getByLabelText(element.props.label);
44
+ const button = instance.getByLabelText(
45
+ (element.props as { label: string }).label,
46
+ );
45
47
  expect(button).toBeDefined();
46
- expect(instance.getByText(element.props.label)).toBeDefined();
48
+ expect(
49
+ instance.getByText((element.props as { label: string }).label),
50
+ ).toBeDefined();
47
51
 
48
52
  const buttonStyleEl = button.children[0] as ReactTestInstance;
49
53
  const buttonStyle = buttonStyleEl.props.style.flat().reduce(
@@ -1,5 +1,5 @@
1
1
  import { act, renderHook } from "@testing-library/react-native";
2
- import type { LayoutChangeEvent } from "react-native";
2
+ import type { LayoutChangeEvent, NativeMethods } from "react-native";
3
3
  import { useViewLayoutHeight } from "./useViewLayoutHeight";
4
4
 
5
5
  describe("useViewLayoutHeight", () => {
@@ -20,8 +20,8 @@ describe("useViewLayoutHeight", () => {
20
20
  y: 0,
21
21
  },
22
22
  },
23
- currentTarget: 0,
24
- target: 0,
23
+ currentTarget: 0 as unknown as NativeMethods,
24
+ target: 0 as unknown as NativeMethods,
25
25
  bubbles: false,
26
26
  cancelable: false,
27
27
  defaultPrevented: false,
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { View } from "react-native";
3
- import type { Meta, StoryObj } from "@storybook/react";
3
+ import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
4
4
  import { Content, Divider, Heading, Text } from "@jobber/components-native";
5
5
 
6
6
  const meta = {
@@ -3,7 +3,7 @@ import { render } from "@testing-library/react-native";
3
3
  import type { ViewStyle } from "react-native";
4
4
  import { View } from "react-native";
5
5
  import type { ReactTestInstance } from "react-test-renderer";
6
- import { tokens } from "@jobber/design/foundation";
6
+ import { tokens } from "@jobber/design";
7
7
  import { Flex } from "./Flex";
8
8
  import type { FlexProps, Spacing } from "./types";
9
9
  import { columnStyles } from "./Flex.styles";
@@ -203,7 +203,9 @@ const testPresetValues = {
203
203
  };
204
204
 
205
205
  async function wait(milliseconds = 0): Promise<void> {
206
- await new Promise(resolve => setTimeout(resolve, milliseconds));
206
+ await new Promise(resolve =>
207
+ setTimeout(resolve as unknown as () => void, milliseconds),
208
+ );
207
209
  }
208
210
 
209
211
  afterEach(() => {
@@ -10,7 +10,11 @@ const inputAccessibilityLabel = "textInput";
10
10
  const saveButtonText = "Save Me";
11
11
 
12
12
  describe("when a component is wrapped in a FormField within a Form", () => {
13
- function SimpleFormWithProvider({ children }) {
13
+ function SimpleFormWithProvider({
14
+ children,
15
+ }: {
16
+ readonly children: React.ReactNode;
17
+ }) {
14
18
  const formMethods = useForm();
15
19
 
16
20
  return (
@@ -149,7 +149,7 @@ exports[`when Heading called with sub-heading variation and text-color should ma
149
149
  "fontFamily": "inter-semibold",
150
150
  },
151
151
  {
152
- "color": "hsl(197, 21%, 36%)",
152
+ "color": "hsl(197, 15%, 43%)",
153
153
  },
154
154
  {
155
155
  "textAlign": "left",
@@ -147,7 +147,13 @@ describe("InputDate", () => {
147
147
 
148
148
  const requiredError = "This is required";
149
149
 
150
- function SimpleFormWithProvider({ children, defaultValues }) {
150
+ function SimpleFormWithProvider({
151
+ children,
152
+ defaultValues,
153
+ }: {
154
+ readonly children: React.ReactNode;
155
+ readonly defaultValues?: Record<string, unknown>;
156
+ }) {
151
157
  const formMethods = useForm({
152
158
  reValidateMode: "onChange",
153
159
  defaultValues,
@@ -10,10 +10,11 @@ import {
10
10
  import type { TextStyle } from "react-native";
11
11
  import { Button, Platform } from "react-native";
12
12
  import { FormProvider, useForm } from "react-hook-form";
13
+ import type { Clearable } from "@jobber/hooks";
13
14
  import type { InputTextProps } from "./InputText";
14
15
  import { InputText } from "./InputText";
15
16
  import { InputAccessoriesProvider } from "./context";
16
- import type { Clearable, InputFieldWrapperProps } from "../InputFieldWrapper";
17
+ import type { InputFieldWrapperProps } from "../InputFieldWrapper";
17
18
  import { useCommonInputStyles } from "../InputFieldWrapper";
18
19
 
19
20
  const MockInputFieldWrapper = jest.fn();
@@ -194,7 +194,13 @@ const saveButtonText = "Submit";
194
194
 
195
195
  const requiredError = "This is required";
196
196
 
197
- function SimpleFormWithProvider({ children, defaultValues }) {
197
+ function SimpleFormWithProvider({
198
+ children,
199
+ defaultValues,
200
+ }: {
201
+ readonly children: React.ReactNode;
202
+ readonly defaultValues?: Record<string, unknown>;
203
+ }) {
198
204
  const formMethods = useForm({
199
205
  reValidateMode: "onChange",
200
206
  defaultValues,
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import type { RenderAPI } from "@testing-library/react-native";
3
3
  import { fireEvent, render } from "@testing-library/react-native";
4
- import { tokens } from "@jobber/design/foundation";
4
+ import { tokens } from "@jobber/design";
5
5
  import { AccessibilityInfo } from "react-native";
6
6
  import { Option, Select } from ".";
7
7
  import { SelectInternalPicker } from "./components/SelectInternalPicker";
@@ -34,7 +34,7 @@ exports[`StatusLabel alignment when alignment prop set to "end" should match sna
34
34
  "fontFamily": "inter-medium",
35
35
  },
36
36
  {
37
- "color": "hsl(197, 21%, 36%)",
37
+ "color": "hsl(197, 15%, 43%)",
38
38
  },
39
39
  {
40
40
  "textAlign": "right",
@@ -113,7 +113,7 @@ exports[`StatusLabel alignment when alignment prop set to default ("start") shou
113
113
  "fontFamily": "inter-medium",
114
114
  },
115
115
  {
116
- "color": "hsl(197, 21%, 36%)",
116
+ "color": "hsl(197, 15%, 43%)",
117
117
  },
118
118
  {
119
119
  "textAlign": "right",
@@ -192,7 +192,7 @@ exports[`StatusLabel status when status prop set to "critical" should match snap
192
192
  "fontFamily": "inter-medium",
193
193
  },
194
194
  {
195
- "color": "hsl(197, 21%, 36%)",
195
+ "color": "hsl(197, 15%, 43%)",
196
196
  },
197
197
  {
198
198
  "textAlign": "right",
@@ -271,7 +271,7 @@ exports[`StatusLabel status when status prop set to "inactive" should match snap
271
271
  "fontFamily": "inter-medium",
272
272
  },
273
273
  {
274
- "color": "hsl(197, 21%, 36%)",
274
+ "color": "hsl(197, 15%, 43%)",
275
275
  },
276
276
  {
277
277
  "textAlign": "right",
@@ -307,7 +307,7 @@ exports[`StatusLabel status when status prop set to "inactive" should match snap
307
307
  "width": 12,
308
308
  },
309
309
  {
310
- "backgroundColor": "hsl(197, 21%, 36%)",
310
+ "backgroundColor": "hsl(198, 25%, 33%)",
311
311
  },
312
312
  ]
313
313
  }
@@ -350,7 +350,7 @@ exports[`StatusLabel status when status prop set to "informative" should match s
350
350
  "fontFamily": "inter-medium",
351
351
  },
352
352
  {
353
- "color": "hsl(197, 21%, 36%)",
353
+ "color": "hsl(197, 15%, 43%)",
354
354
  },
355
355
  {
356
356
  "textAlign": "right",
@@ -429,7 +429,7 @@ exports[`StatusLabel status when status prop set to "warning" should match snaps
429
429
  "fontFamily": "inter-medium",
430
430
  },
431
431
  {
432
- "color": "hsl(197, 21%, 36%)",
432
+ "color": "hsl(197, 15%, 43%)",
433
433
  },
434
434
  {
435
435
  "textAlign": "right",
@@ -508,7 +508,7 @@ exports[`StatusLabel status when status prop set to default ("success") should m
508
508
  "fontFamily": "inter-medium",
509
509
  },
510
510
  {
511
- "color": "hsl(197, 21%, 36%)",
511
+ "color": "hsl(197, 15%, 43%)",
512
512
  },
513
513
  {
514
514
  "textAlign": "right",