@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.
- package/dist/package.json +2 -2
- package/dist/src/Divider/Divider.js +9 -6
- package/dist/src/Divider/{Divider.style.js → DividerHorizontal.style.js} +7 -2
- package/dist/src/Divider/DividerVertical.style.js +23 -0
- package/dist/src/InputFieldWrapper/InputFieldWrapper.js +1 -3
- package/dist/src/InputFieldWrapper/components/Prefix/Prefix.js +1 -3
- package/dist/src/InputFieldWrapper/components/Suffix/Suffix.js +1 -3
- package/dist/src/InputText/context/InputAccessoriesProvider.js +1 -3
- package/dist/src/ProgressBar/ProgressBar.js +2 -4
- package/dist/src/ProgressBar/ProgressBar.size.style.js +6 -0
- package/dist/src/ProgressBar/ProgressBar.style.js +0 -1
- package/dist/src/Typography/Typography.js +1 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/src/Divider/Divider.d.ts +12 -3
- package/dist/types/src/Divider/{Divider.style.d.ts → DividerHorizontal.style.d.ts} +7 -2
- package/dist/types/src/Divider/DividerVertical.style.d.ts +21 -0
- package/dist/types/src/ProgressBar/ProgressBar.size.style.d.ts +11 -0
- package/dist/types/src/ProgressBar/ProgressBar.style.d.ts +0 -1
- package/dist/types/src/ProgressBar/types.d.ts +1 -1
- package/package.json +2 -2
- package/src/Divider/Divider.test.tsx +58 -19
- package/src/Divider/Divider.tsx +25 -7
- package/src/Divider/{Divider.style.ts → DividerHorizontal.style.ts} +7 -2
- package/src/Divider/DividerVertical.style.ts +24 -0
- package/src/InputFieldWrapper/InputFieldWrapper.test.tsx +0 -1
- package/src/InputFieldWrapper/InputFieldWrapper.tsx +0 -1
- package/src/InputFieldWrapper/components/Prefix/Prefix.tsx +0 -1
- package/src/InputFieldWrapper/components/Suffix/Suffix.tsx +0 -1
- package/src/InputText/context/InputAccessoriesProvider.tsx +0 -1
- package/src/ProgressBar/ProgressBar.size.style.ts +7 -0
- package/src/ProgressBar/ProgressBar.style.ts +0 -1
- package/src/ProgressBar/ProgressBar.tsx +2 -6
- package/src/ProgressBar/__snapshots__/ProgressBar.test.tsx.snap +6 -4
- package/src/ProgressBar/types.ts +1 -1
- 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.
|
|
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": "
|
|
82
|
+
"gitHead": "ac441a7b169aceadaad1e902affbcd547634b9d7"
|
|
83
83
|
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import {
|
|
4
|
-
|
|
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
|
-
|
|
7
|
-
size === "large" &&
|
|
8
|
-
size === "
|
|
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:
|
|
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
|
|
3
|
+
export const horizontalStyles = StyleSheet.create({
|
|
4
4
|
base: {
|
|
5
5
|
height: tokens["space-minuscule"],
|
|
6
6
|
margin: 0,
|
|
7
|
-
|
|
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)),
|
|
@@ -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";
|