@jobber/components-native 0.73.4-add-progre-0e7ddb0.7 → 0.74.1-JOB-97734-ac441a7.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 (35) hide show
  1. package/dist/package.json +2 -2
  2. package/dist/src/Divider/Divider.js +9 -6
  3. package/dist/src/Divider/{Divider.style.js → DividerHorizontal.style.js} +7 -2
  4. package/dist/src/Divider/DividerVertical.style.js +23 -0
  5. package/dist/src/InputFieldWrapper/InputFieldWrapper.js +1 -3
  6. package/dist/src/InputFieldWrapper/components/Prefix/Prefix.js +1 -3
  7. package/dist/src/InputFieldWrapper/components/Suffix/Suffix.js +1 -3
  8. package/dist/src/InputText/context/InputAccessoriesProvider.js +1 -3
  9. package/dist/src/ProgressBar/ProgressBar.js +2 -4
  10. package/dist/src/ProgressBar/ProgressBar.size.style.js +6 -0
  11. package/dist/src/ProgressBar/ProgressBar.style.js +0 -1
  12. package/dist/src/Typography/Typography.js +1 -3
  13. package/dist/tsconfig.tsbuildinfo +1 -1
  14. package/dist/types/src/Divider/Divider.d.ts +12 -3
  15. package/dist/types/src/Divider/{Divider.style.d.ts → DividerHorizontal.style.d.ts} +7 -2
  16. package/dist/types/src/Divider/DividerVertical.style.d.ts +21 -0
  17. package/dist/types/src/ProgressBar/ProgressBar.size.style.d.ts +11 -0
  18. package/dist/types/src/ProgressBar/ProgressBar.style.d.ts +0 -1
  19. package/dist/types/src/ProgressBar/types.d.ts +1 -1
  20. package/package.json +2 -2
  21. package/src/Divider/Divider.test.tsx +58 -19
  22. package/src/Divider/Divider.tsx +25 -7
  23. package/src/Divider/{Divider.style.ts → DividerHorizontal.style.ts} +7 -2
  24. package/src/Divider/DividerVertical.style.ts +24 -0
  25. package/src/InputFieldWrapper/InputFieldWrapper.test.tsx +0 -1
  26. package/src/InputFieldWrapper/InputFieldWrapper.tsx +0 -1
  27. package/src/InputFieldWrapper/components/Prefix/Prefix.tsx +0 -1
  28. package/src/InputFieldWrapper/components/Suffix/Suffix.tsx +0 -1
  29. package/src/InputText/context/InputAccessoriesProvider.tsx +0 -1
  30. package/src/ProgressBar/ProgressBar.size.style.ts +7 -0
  31. package/src/ProgressBar/ProgressBar.style.ts +0 -1
  32. package/src/ProgressBar/ProgressBar.tsx +2 -6
  33. package/src/ProgressBar/__snapshots__/ProgressBar.test.tsx.snap +6 -4
  34. package/src/ProgressBar/types.ts +1 -1
  35. package/src/Typography/Typography.tsx +0 -1
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components-native",
3
- "version": "0.73.4-add-progre-0e7ddb0.7+0e7ddb06",
3
+ "version": "0.74.1-JOB-97734-ac441a7.1+ac441a7b",
4
4
  "license": "MIT",
5
5
  "description": "React Native implementation of Atlantis",
6
6
  "repository": {
@@ -79,5 +79,5 @@
79
79
  "react-native-safe-area-context": "^4.5.2",
80
80
  "react-native-svg": ">=12.0.0"
81
81
  },
82
- "gitHead": "0e7ddb0673b03d9863a56f86c79d0cac6cdfaa61"
82
+ "gitHead": "ac441a7b169aceadaad1e902affbcd547634b9d7"
83
83
  }
@@ -1,11 +1,14 @@
1
1
  import React from "react";
2
2
  import { View } from "react-native";
3
- import { styles } from "./Divider.style";
4
- export function Divider({ size = "base" }) {
3
+ import { horizontalStyles } from "./DividerHorizontal.style";
4
+ import { verticalStyles } from "./DividerVertical.style";
5
+ export function Divider({ size = "base", direction = "horizontal", testID = "Divider", }) {
6
+ const directionalStyles = direction === "horizontal" ? horizontalStyles : verticalStyles;
5
7
  const style = [
6
- styles.base,
7
- size === "large" && styles.large,
8
- size === "largest" && styles.largest,
8
+ directionalStyles.base,
9
+ size === "large" && directionalStyles.large,
10
+ size === "larger" && directionalStyles.larger,
11
+ size === "largest" && directionalStyles.largest,
9
12
  ];
10
- return React.createElement(View, { testID: "Divider", style: style });
13
+ return React.createElement(View, { testID: testID, style: style });
11
14
  }
@@ -1,16 +1,21 @@
1
1
  import { StyleSheet } from "react-native";
2
2
  import { tokens } from "../utils/design";
3
- export const styles = StyleSheet.create({
3
+ export const horizontalStyles = StyleSheet.create({
4
4
  base: {
5
5
  height: tokens["space-minuscule"],
6
6
  margin: 0,
7
- borderBottomWidth: tokens["border-base"],
7
+ width: "auto",
8
8
  borderBottomColor: tokens["color-border"],
9
+ borderBottomWidth: tokens["space-minuscule"],
9
10
  },
10
11
  large: {
11
12
  borderBottomWidth: tokens["border-thick"],
12
13
  opacity: 0.875,
13
14
  },
15
+ larger: {
16
+ borderBottomWidth: tokens["border-thicker"],
17
+ opacity: 0.625,
18
+ },
14
19
  largest: {
15
20
  borderBottomWidth: tokens["space-small"],
16
21
  opacity: 0.375,
@@ -0,0 +1,23 @@
1
+ import { StyleSheet } from "react-native";
2
+ import { tokens } from "../utils/design";
3
+ export const verticalStyles = StyleSheet.create({
4
+ base: {
5
+ margin: 0,
6
+ height: "100%",
7
+ width: tokens["space-minuscule"],
8
+ borderRightWidth: tokens["border-base"],
9
+ borderRightColor: tokens["color-border"],
10
+ },
11
+ large: {
12
+ borderRightWidth: tokens["border-thick"],
13
+ opacity: 0.875,
14
+ },
15
+ larger: {
16
+ borderRightWidth: tokens["border-thicker"],
17
+ opacity: 0.625,
18
+ },
19
+ largest: {
20
+ borderRightWidth: tokens["space-small"],
21
+ opacity: 0.375,
22
+ },
23
+ });
@@ -1,7 +1,5 @@
1
1
  import React from "react";
2
- import {
3
- // eslint-disable-next-line no-restricted-imports
4
- Text as RNText, View, } from "react-native";
2
+ import { Text as RNText, View, } from "react-native";
5
3
  import { styles } from "./InputFieldWrapper.style";
6
4
  import { PrefixIcon, PrefixLabel } from "./components/Prefix/Prefix";
7
5
  import { SuffixIcon, SuffixLabel } from "./components/Suffix/Suffix";
@@ -1,7 +1,5 @@
1
1
  import React from "react";
2
- import {
3
- // eslint-disable-next-line no-restricted-imports
4
- Text as RNText, View, } from "react-native";
2
+ import { Text as RNText, View, } from "react-native";
5
3
  import { Icon } from "../../../Icon";
6
4
  import { Text } from "../../../Text";
7
5
  import { tokens } from "../../../utils/design";
@@ -1,7 +1,5 @@
1
1
  import React from "react";
2
- import { Pressable,
3
- // eslint-disable-next-line no-restricted-imports
4
- Text as RNText, View, } from "react-native";
2
+ import { Pressable, Text as RNText, View, } from "react-native";
5
3
  import { tokens } from "../../../utils/design";
6
4
  import { Icon } from "../../../Icon";
7
5
  import { Text } from "../../../Text";
@@ -1,7 +1,5 @@
1
1
  import React, { useEffect, useRef, useState } from "react";
2
- import { InputAccessoryView, Keyboard, Platform,
3
- // eslint-disable-next-line no-restricted-imports
4
- Button as RNButton, View, useColorScheme, } from "react-native";
2
+ import { InputAccessoryView, Keyboard, Platform, Button as RNButton, View, useColorScheme, } from "react-native";
5
3
  import { v4 } from "react-native-uuid";
6
4
  import { InputAccessoriesContext } from "./InputAccessoriesContext";
7
5
  import { styles } from "./InputAccessoriesProvider.style";
@@ -3,16 +3,14 @@ import { View } from "react-native";
3
3
  import { styles } from "./ProgressBar.style";
4
4
  import { ProgressBarInner, calculateWidth } from "./ProgressBarInner";
5
5
  import { ProgressBarStepped } from "./ProgressBarStepped";
6
+ import { sizeStyles } from "./ProgressBar.size.style";
6
7
  import { tokens } from "../utils/design";
7
8
  import { useAtlantisI18n } from "../hooks/useAtlantisI18n";
8
9
  export function ProgressBar({ loading, total, current, inProgress = 0, reverseTheme = false, header, variation = "progress", size = "base", }) {
9
10
  const { t } = useAtlantisI18n();
10
11
  return (React.createElement(View, { accessible: true, accessibilityRole: "progressbar", accessibilityLabel: getA11yLabel() },
11
12
  header,
12
- variation === "stepped" ? (React.createElement(ProgressBarStepped, { total: total, current: current, color: reverseTheme ? undefined : tokens["color-surface--background"], loading: loading, inProgress: inProgress })) : (React.createElement(View, { style: [
13
- styles.progressBarContainer,
14
- size === "small" && { height: 10 },
15
- ] },
13
+ variation === "stepped" ? (React.createElement(ProgressBarStepped, { total: total, current: current, color: reverseTheme ? undefined : tokens["color-surface--background"], loading: loading, inProgress: inProgress })) : (React.createElement(View, { style: [styles.progressBarContainer, sizeStyles[size]] },
16
14
  React.createElement(ProgressBarInner, { width: 100, animationDuration: 0, color: reverseTheme ? undefined : tokens["color-surface--background"] }),
17
15
  !loading && (React.createElement(React.Fragment, null,
18
16
  inProgress && inProgress > 0 ? (React.createElement(ProgressBarInner, { width: calculateWidth(total, current + inProgress), color: tokens["color-informative"], animationDuration: 800 })) : (React.createElement(React.Fragment, null)),
@@ -0,0 +1,6 @@
1
+ import { StyleSheet } from "react-native";
2
+ export const sizeStyles = StyleSheet.create({
3
+ smaller: { height: 4 },
4
+ small: { height: 8 },
5
+ base: { height: 16 },
6
+ });
@@ -4,7 +4,6 @@ export const styles = StyleSheet.create({
4
4
  progressBarContainer: {
5
5
  marginTop: tokens["space-small"],
6
6
  marginBottom: tokens["space-small"],
7
- height: 20,
8
7
  position: "relative",
9
8
  flexDirection: "row",
10
9
  },
@@ -1,7 +1,5 @@
1
1
  import React from "react";
2
- import { I18nManager, StyleSheet,
3
- // eslint-disable-next-line no-restricted-imports
4
- Text, } from "react-native";
2
+ import { I18nManager, StyleSheet, Text, } from "react-native";
5
3
  import { TypographyGestureDetector } from "./TypographyGestureDetector";
6
4
  import { typographyStyles as styles } from "./Typography.style";
7
5
  import { tokens } from "../utils/design";