@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.
@@ -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 | `blue` | Color of Icon to display. |
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. |
@@ -213,6 +213,7 @@ export function IconSizesExample() {
213
213
  | | `calendar` |
214
214
  | | `calendarCheck` |
215
215
  | | `clearFilters` |
216
+ | | `dueDate` |
216
217
  | | `event` |
217
218
  | | `onlineBooking` |
218
219
  | | `orientationHorizontal` |
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components-native",
3
- "version": "0.114.10",
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.118.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": "3b0b1abca8a868037f4b189dbbf663c10c0c3b7b"
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: "white", size: "small" })));
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-greyBlue--dark"], activeOpacity: tokens["opacity-pressed"], style: [
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: "grey" }))))));
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 = "blue", }) {
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("hsl(197, 90%, 12%)");
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,
@@ -10,7 +10,7 @@ export const useStyles = buildThemedStyles(tokens => {
10
10
  },
11
11
  progress: {
12
12
  height: "100%",
13
- backgroundColor: tokens["color-green"],
13
+ backgroundColor: tokens["color-interactive"],
14
14
  },
15
15
  };
16
16
  });
@@ -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 ? tokens["color-disabled"] : tokens["color-greyBlue"], name: icon }))));
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 ? tokens["color-disabled"] : tokens["color-greyBlue"], name: icon }))));
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-green--lighter"],
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.greyBlue;
105
+ return styles.text;
106
106
  }
107
107
  const colorStyleKey = `${color}${reverseTheme ? "Reverse" : ""}`;
108
108
  return styles[`${colorStyleKey}`];