@jobber/components-native 0.85.1-move-dupli-99be0f8.13 → 0.86.0
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 +10 -2
- package/dist/src/Banner/Banner.js +2 -0
- package/dist/src/Banner/components/BannerIcon/BannerIcon.style.js +3 -0
- package/dist/src/InputFieldWrapper/InputFieldWrapper.style.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/src/Banner/components/BannerIcon/BannerIcon.style.d.ts +3 -0
- package/dist/types/src/Banner/types.d.ts +1 -1
- package/dist/types/src/InputFieldWrapper/InputFieldWrapper.style.d.ts +1 -1
- package/package.json +10 -2
- package/src/Banner/Banner.test.tsx +12 -0
- package/src/Banner/Banner.tsx +2 -0
- package/src/Banner/components/BannerIcon/BannerIcon.style.ts +3 -0
- package/src/Banner/types.ts +1 -1
- package/src/InputFieldWrapper/InputFieldWrapper.style.ts +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IconNames } from "@jobber/design";
|
|
2
2
|
import type { ReactElement } from "react";
|
|
3
3
|
import type { StyleProp, ViewStyle } from "react-native";
|
|
4
|
-
export type BannerTypes = "error" | "warning" | "notice";
|
|
4
|
+
export type BannerTypes = "error" | "warning" | "notice" | "success";
|
|
5
5
|
export interface BannerStyleProps {
|
|
6
6
|
/**
|
|
7
7
|
* Styles applied to the main view of the banner. Styles are grabbed from Banner.style.ts file
|
|
@@ -23,6 +23,7 @@ export declare const useStyles: () => {
|
|
|
23
23
|
right: number;
|
|
24
24
|
bottom: number;
|
|
25
25
|
left: number;
|
|
26
|
+
zIndex: number;
|
|
26
27
|
};
|
|
27
28
|
miniLabel: {
|
|
28
29
|
top: number;
|
|
@@ -30,7 +31,6 @@ export declare const useStyles: () => {
|
|
|
30
31
|
backgroundColor: string;
|
|
31
32
|
marginRight: number;
|
|
32
33
|
maxHeight: number;
|
|
33
|
-
zIndex: number;
|
|
34
34
|
};
|
|
35
35
|
miniLabelShowClearAction: {
|
|
36
36
|
backgroundColor: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.86.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "React Native implementation of Atlantis",
|
|
6
6
|
"repository": {
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"ts-xor": "^1.1.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
+
"@react-native-community/datetimepicker": "^7.1.0",
|
|
56
57
|
"@storybook/addon-a11y": "^9.1.2",
|
|
57
58
|
"@storybook/react": "^9.1.2",
|
|
58
59
|
"@storybook/react-native-web-vite": "^9.1.2",
|
|
@@ -66,6 +67,13 @@
|
|
|
66
67
|
"date-fns": "^2.30.0",
|
|
67
68
|
"date-fns-tz": "^2.0.0",
|
|
68
69
|
"metro-react-native-babel-preset": "^0.76.0",
|
|
70
|
+
"react-native": "^0.77.0",
|
|
71
|
+
"react-native-gesture-handler": "^2.10.2",
|
|
72
|
+
"react-native-modal-datetime-picker": "^15.0.1",
|
|
73
|
+
"react-native-reanimated": "^3.7.1",
|
|
74
|
+
"react-native-safe-area-context": "^5.4.0",
|
|
75
|
+
"react-native-svg": "^15.1.0",
|
|
76
|
+
"react-native-web": "^0.20.0",
|
|
69
77
|
"react-test-renderer": "^18.2.0",
|
|
70
78
|
"storybook": "^9.1.2"
|
|
71
79
|
},
|
|
@@ -87,5 +95,5 @@
|
|
|
87
95
|
"react-native-safe-area-context": "^5.4.0",
|
|
88
96
|
"react-native-svg": ">=12.0.0"
|
|
89
97
|
},
|
|
90
|
-
"gitHead": "
|
|
98
|
+
"gitHead": "712019a3de148ba8511e117278495ced049f331f"
|
|
91
99
|
}
|
|
@@ -35,6 +35,18 @@ describe("Banner", () => {
|
|
|
35
35
|
expect(getByText("Notice me")).toBeDefined();
|
|
36
36
|
expect(icon.props.children.props.name).toBe("starburst");
|
|
37
37
|
});
|
|
38
|
+
|
|
39
|
+
it("renders a success Banner", () => {
|
|
40
|
+
const { getByText, getByTestId } = render(
|
|
41
|
+
<Banner type="success">
|
|
42
|
+
<Text>Your import is complete</Text>
|
|
43
|
+
</Banner>,
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
const icon = getByTestId("ATL-Banner-Icon");
|
|
47
|
+
expect(getByText("Your import is complete")).toBeDefined();
|
|
48
|
+
expect(icon.props.children.props.name).toBe("checkmark");
|
|
49
|
+
});
|
|
38
50
|
});
|
|
39
51
|
|
|
40
52
|
describe("Children", () => {
|
package/src/Banner/Banner.tsx
CHANGED
package/src/Banner/types.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { IconNames } from "@jobber/design";
|
|
|
2
2
|
import type { ReactElement } from "react";
|
|
3
3
|
import type { StyleProp, ViewStyle } from "react-native";
|
|
4
4
|
|
|
5
|
-
export type BannerTypes = "error" | "warning" | "notice";
|
|
5
|
+
export type BannerTypes = "error" | "warning" | "notice" | "success";
|
|
6
6
|
|
|
7
7
|
export interface BannerStyleProps {
|
|
8
8
|
/**
|
|
@@ -43,6 +43,7 @@ export const useStyles = buildThemedStyles(tokens => {
|
|
|
43
43
|
right: 0,
|
|
44
44
|
bottom: 0,
|
|
45
45
|
left: 0,
|
|
46
|
+
zIndex: 1,
|
|
46
47
|
},
|
|
47
48
|
|
|
48
49
|
miniLabel: {
|
|
@@ -53,7 +54,6 @@ export const useStyles = buildThemedStyles(tokens => {
|
|
|
53
54
|
maxHeight:
|
|
54
55
|
(typographyStyles.defaultSize.lineHeight || 0) +
|
|
55
56
|
tokens["space-smaller"],
|
|
56
|
-
zIndex: 1,
|
|
57
57
|
},
|
|
58
58
|
// Prevents the miniLabel from cutting off the ClearAction button
|
|
59
59
|
miniLabelShowClearAction: {
|