@jobber/components-native 0.114.10 → 0.114.12
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/docs/EmptyState/EmptyState.md +1 -1
- package/dist/docs/Icon/Icon.md +1 -0
- package/dist/package.json +3 -3
- package/dist/src/Banner/components/BannerIcon/BannerIcon.js +1 -1
- package/dist/src/Button/Button.js +1 -1
- package/dist/src/Disclosure/Disclosure.js +1 -1
- package/dist/src/EmptyState/EmptyState.js +1 -1
- package/dist/src/EmptyState/EmptyState.test.js +2 -1
- package/dist/src/FormatFile/components/ProgressBar/ProgressBar.style.js +1 -1
- package/dist/src/InputFieldWrapper/components/Prefix/Prefix.js +3 -1
- package/dist/src/InputFieldWrapper/components/Suffix/Suffix.js +3 -1
- package/dist/src/Switch/components/BaseSwitch/BaseSwitch.js +1 -1
- package/dist/src/Typography/Typography.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/Banner/components/BannerIcon/BannerIcon.tsx +1 -1
- package/src/Button/Button.tsx +1 -1
- package/src/Disclosure/Disclosure.tsx +1 -1
- package/src/EmptyState/EmptyState.test.tsx +2 -1
- package/src/EmptyState/EmptyState.tsx +1 -1
- package/src/FormatFile/components/ProgressBar/ProgressBar.style.tsx +1 -1
- package/src/InputFieldWrapper/components/Prefix/Prefix.tsx +3 -1
- package/src/InputFieldWrapper/components/Suffix/Suffix.tsx +3 -1
- package/src/Switch/components/BaseSwitch/BaseSwitch.tsx +1 -1
- package/src/Typography/Typography.tsx +1 -1
- package/src/Typography/__snapshots__/Typography.test.tsx.snap +32 -32
|
@@ -66,7 +66,7 @@ reflow to a second line if enough content is provided.
|
|
|
66
66
|
|------|------|----------|---------|-------------|
|
|
67
67
|
| `description` | `string` | No | — | Description of the empty state. |
|
|
68
68
|
| `icon` | `IconNames` | No | — | Icon to display. |
|
|
69
|
-
| `iconColor` | `"task" | "text" | "warning" | "icon" | "iconSecondary" | "white" | "grey" | "greyBlue" | "greyBlueDark" | "greyBlueLighter" | "blue" | "lightBlue" | "green" | "yellow" | "red" | ... 35 more ... | "brandHighlight"` | No | `
|
|
69
|
+
| `iconColor` | `"task" | "text" | "warning" | "icon" | "iconSecondary" | "white" | "grey" | "greyBlue" | "greyBlueDark" | "greyBlueLighter" | "blue" | "lightBlue" | "green" | "yellow" | "red" | ... 35 more ... | "brandHighlight"` | No | `icon` | Color of Icon to display. |
|
|
70
70
|
| `primaryAction` | `Action` | No | — | Handler for the primary action. |
|
|
71
71
|
| `secondaryAction` | `Action` | No | — | Handler for the secondary action. |
|
|
72
72
|
| `title` | `string` | No | — | Title of the empty state. |
|
package/dist/docs/Icon/Icon.md
CHANGED
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components-native",
|
|
3
|
-
"version": "0.114.
|
|
3
|
+
"version": "0.114.12",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "React Native implementation of Atlantis",
|
|
6
6
|
"repository": {
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@babel/runtime": "^7.29.2",
|
|
75
75
|
"@gorhom/bottom-sheet": "^5.2.8",
|
|
76
|
-
"@jobber/design": "0.
|
|
76
|
+
"@jobber/design": "0.119.0",
|
|
77
77
|
"@jobber/hooks": "2.21.1",
|
|
78
78
|
"@react-native-community/datetimepicker": "^8.4.5",
|
|
79
79
|
"@react-native/babel-preset": "^0.82.1",
|
|
@@ -123,5 +123,5 @@
|
|
|
123
123
|
"react-native-screens": ">=4.18.0",
|
|
124
124
|
"react-native-svg": ">=12.0.0"
|
|
125
125
|
},
|
|
126
|
-
"gitHead": "
|
|
126
|
+
"gitHead": "a9ac41dfb966649048fcaf7cce2db45f2569fc29"
|
|
127
127
|
}
|
|
@@ -5,5 +5,5 @@ import { Icon } from "../../../Icon";
|
|
|
5
5
|
export function BannerIcon({ icon, type }) {
|
|
6
6
|
const styles = useStyles();
|
|
7
7
|
return (React.createElement(View, { style: [styles.bannerIcon, styles[type]], testID: "ATL-Banner-Icon" },
|
|
8
|
-
React.createElement(Icon, { name: icon, color: "
|
|
8
|
+
React.createElement(Icon, { name: icon, color: "surface", size: "small" })));
|
|
9
9
|
}
|
|
@@ -22,7 +22,7 @@ export function Button({ label, onPress, variation = "work", type = "primary", f
|
|
|
22
22
|
// an InputText that was focused, it required two presses to activate the
|
|
23
23
|
// Pressable. Using a TouchableHighlight made things register correctly
|
|
24
24
|
// in a single press
|
|
25
|
-
return (React.createElement(TouchableHighlight, { onPress: onPress, testID: buildTestID(testID, label, accessibilityLabel), accessibilityLabel: accessibilityLabel || label, accessibilityHint: accessibilityHint, accessibilityRole: "button", accessibilityState: { disabled, busy: loading }, disabled: disabled || loading, underlayColor: tokens["color-
|
|
25
|
+
return (React.createElement(TouchableHighlight, { onPress: onPress, testID: buildTestID(testID, label, accessibilityLabel), accessibilityLabel: accessibilityLabel || label, accessibilityHint: accessibilityHint, accessibilityRole: "button", accessibilityState: { disabled, busy: loading }, disabled: disabled || loading, underlayColor: tokens["color-interactive--subtle"], activeOpacity: tokens["opacity-pressed"], style: [
|
|
26
26
|
styles.touchable,
|
|
27
27
|
fullWidth && styles.fullWidth,
|
|
28
28
|
fullHeight && styles.fullHeight,
|
|
@@ -30,7 +30,7 @@ function DisclosureHeader({ header, onToggle, isEmpty, open, animationDuration,
|
|
|
30
30
|
React.createElement(View, { style: styles.headerContainer },
|
|
31
31
|
header,
|
|
32
32
|
!isEmpty && (React.createElement(ReanimatedView, { style: [animatedStyle] },
|
|
33
|
-
React.createElement(Icon, { name: "arrowUp", color: "
|
|
33
|
+
React.createElement(Icon, { name: "arrowUp", color: "iconSecondary" }))))));
|
|
34
34
|
}
|
|
35
35
|
function DisclosureContent({ content, open, animationDuration, styles, }) {
|
|
36
36
|
const [maxHeight, setMaxHeight] = useState(0);
|
|
@@ -11,7 +11,7 @@ function ButtonAction({ action, type }) {
|
|
|
11
11
|
return React.createElement(React.Fragment, null);
|
|
12
12
|
return React.createElement(Button, Object.assign({ fullWidth: false, type: type }, action));
|
|
13
13
|
}
|
|
14
|
-
export function EmptyState({ icon, title, description, primaryAction, secondaryAction, iconColor = "
|
|
14
|
+
export function EmptyState({ icon, title, description, primaryAction, secondaryAction, iconColor = "icon", }) {
|
|
15
15
|
const styles = useStyles();
|
|
16
16
|
return (React.createElement(Content, null,
|
|
17
17
|
icon && (React.createElement(View, { style: styles.icon },
|
|
@@ -11,6 +11,7 @@ import React from "react";
|
|
|
11
11
|
import { fireEvent, render, screen } from "@testing-library/react-native";
|
|
12
12
|
import { Path } from "react-native-svg";
|
|
13
13
|
import { EmptyState } from "./EmptyState";
|
|
14
|
+
import { tokens } from "../utils/design";
|
|
14
15
|
const primaryOnPress = jest.fn();
|
|
15
16
|
const secondaryOnPress = jest.fn();
|
|
16
17
|
const defaultProps = {
|
|
@@ -43,7 +44,7 @@ describe("EmptyState", () => {
|
|
|
43
44
|
component();
|
|
44
45
|
const icon = screen.getByTestId(defaultProps.icon);
|
|
45
46
|
const path = icon.findByType(Path);
|
|
46
|
-
expect(path.props.fill).toBe("
|
|
47
|
+
expect(path.props.fill).toBe(tokens["color-icon"]);
|
|
47
48
|
expect(icon.props.style).toEqual(expect.arrayContaining([
|
|
48
49
|
expect.objectContaining({
|
|
49
50
|
width: 32,
|
|
@@ -35,5 +35,7 @@ export function PrefixIcon({ focused, disabled, inputInvalid, icon, }) {
|
|
|
35
35
|
inputInvalid && styles.inputInvalid,
|
|
36
36
|
] },
|
|
37
37
|
React.createElement(View, { style: styles.prefixIcon },
|
|
38
|
-
React.createElement(Icon, { customColor: disabled
|
|
38
|
+
React.createElement(Icon, { customColor: disabled
|
|
39
|
+
? tokens["color-disabled"]
|
|
40
|
+
: tokens["color-icon--secondary"], name: icon }))));
|
|
39
41
|
}
|
|
@@ -36,5 +36,7 @@ export function SuffixIcon({ focused, disabled, inputInvalid, icon, hasLeftMargi
|
|
|
36
36
|
inputInvalid && styles.inputInvalid,
|
|
37
37
|
] },
|
|
38
38
|
React.createElement(Pressable, { style: [styles.suffixIcon, hasLeftMargin && styles.suffixIconMargin], onPress: onPress },
|
|
39
|
-
React.createElement(Icon, { customColor: disabled
|
|
39
|
+
React.createElement(Icon, { customColor: disabled
|
|
40
|
+
? tokens["color-disabled"]
|
|
41
|
+
: tokens["color-icon--secondary"], name: icon }))));
|
|
40
42
|
}
|
|
@@ -30,7 +30,7 @@ export function BaseSwitch({ value, defaultValue, onValueChange, disabled = fals
|
|
|
30
30
|
return {
|
|
31
31
|
true: disabled
|
|
32
32
|
? tokens["color-disabled--secondary"]
|
|
33
|
-
: tokens["color-
|
|
33
|
+
: tokens["color-surface"],
|
|
34
34
|
false: disabled
|
|
35
35
|
? tokens["color-disabled--secondary"]
|
|
36
36
|
: tokens["color-disabled"],
|
|
@@ -102,7 +102,7 @@ function transformChildren(children, transform) {
|
|
|
102
102
|
}
|
|
103
103
|
function getColorStyle(styles, color, reverseTheme) {
|
|
104
104
|
if (color === "default" || !color) {
|
|
105
|
-
return styles.
|
|
105
|
+
return styles.text;
|
|
106
106
|
}
|
|
107
107
|
const colorStyleKey = `${color}${reverseTheme ? "Reverse" : ""}`;
|
|
108
108
|
return styles[`${colorStyleKey}`];
|