@jobber/components-native 0.91.4 → 0.92.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components-native",
3
- "version": "0.91.4",
3
+ "version": "0.92.0",
4
4
  "license": "MIT",
5
5
  "description": "React Native implementation of Atlantis",
6
6
  "repository": {
@@ -54,7 +54,7 @@
54
54
  },
55
55
  "devDependencies": {
56
56
  "@react-native-community/datetimepicker": "^8.4.5",
57
- "@react-native/babel-preset": "^0.81.1",
57
+ "@react-native/babel-preset": "^0.82.1",
58
58
  "@storybook/addon-a11y": "^9.1.2",
59
59
  "@storybook/react": "^9.1.2",
60
60
  "@storybook/react-native-web-vite": "^9.1.2",
@@ -66,14 +66,14 @@
66
66
  "@types/react-test-renderer": "19.1.0",
67
67
  "date-fns": "^2.30.0",
68
68
  "date-fns-tz": "^2.0.0",
69
- "react-native": "^0.81.4",
70
- "react-native-gesture-handler": "^2.28.0",
69
+ "react-native": "^0.82.1",
70
+ "react-native-gesture-handler": "^2.29.1",
71
71
  "react-native-modal-datetime-picker": "^18.0.0",
72
72
  "react-native-reanimated": "^3.7.1",
73
73
  "react-native-safe-area-context": "^5.4.0",
74
74
  "react-native-svg": "^15.1.0",
75
75
  "react-native-web": "^0.20.0",
76
- "react-test-renderer": "19.1.0",
76
+ "react-test-renderer": "^19.1.1",
77
77
  "storybook": "^9.1.2"
78
78
  },
79
79
  "peerDependencies": {
@@ -82,7 +82,7 @@
82
82
  "@react-native-community/datetimepicker": ">=6.7.0",
83
83
  "date-fns": "^2.30.0",
84
84
  "date-fns-tz": "^2.0.0",
85
- "react": "^18 || ^19.1.0",
85
+ "react": "^19",
86
86
  "react-intl": "^6 || ^7",
87
87
  "react-native": ">=0.79.5",
88
88
  "react-native-gesture-handler": ">=2.22.0",
@@ -94,5 +94,5 @@
94
94
  "react-native-safe-area-context": "^5.4.0",
95
95
  "react-native-svg": ">=12.0.0"
96
96
  },
97
- "gitHead": "953deb18e2cf5a920ab5e23295e15aefd3865c0f"
97
+ "gitHead": "1ca01305080db58e135d5224ab329a8df4ad92ff"
98
98
  }
@@ -12,7 +12,7 @@ export const useStyles = buildThemedStyles(tokens => {
12
12
  justifyContent: "center",
13
13
  marginHorizontal: tokens["space-smaller"],
14
14
  marginTop: tokens["space-small"],
15
- paddingHorizontal: tokens["space-small"],
15
+ paddingHorizontal: tokens["space-base"],
16
16
  },
17
17
  iconLeft: {
18
18
  marginHorizontal: tokens["space-smallest"],
package/src/Chip/Chip.tsx CHANGED
@@ -5,6 +5,7 @@ import type { IconNames } from "@jobber/design";
5
5
  import { useStyles } from "./Chip.style";
6
6
  import { Icon } from "../Icon";
7
7
  import { Typography } from "../Typography";
8
+ import type { AtlantisThemeContextValue } from "../AtlantisThemeContext";
8
9
  import { useAtlantisTheme } from "../AtlantisThemeContext";
9
10
 
10
11
  export type AccentType = "client" | "invoice" | "job" | "request" | "quote";
@@ -86,6 +87,7 @@ export function Chip({
86
87
  : tokens["color-interactive--background"],
87
88
  },
88
89
  isActive && { backgroundColor: accentColor },
90
+ getBorderStyle(inactiveBackgroundColor, tokens),
89
91
  ];
90
92
  const dismiss =
91
93
  (isActive || inactiveBackgroundColor === "surface") &&
@@ -96,7 +98,7 @@ export function Chip({
96
98
  iconCustomColor: iconColor,
97
99
  dismissColor: dismiss,
98
100
  };
99
- }, [accent, isActive, inactiveBackgroundColor]);
101
+ }, [accent, isActive, inactiveBackgroundColor, getBorderStyle, styles]);
100
102
 
101
103
  const accessibilityState = useMemo(() => {
102
104
  const checkableRoles = ["radio", "switch", "togglebutton", "checkbox"];
@@ -145,3 +147,19 @@ export function Chip({
145
147
  </Pressable>
146
148
  );
147
149
  }
150
+
151
+ function getBorderStyle(
152
+ inactiveBackgroundColor: "surface" | "background",
153
+ tokens: AtlantisThemeContextValue["tokens"],
154
+ ) {
155
+ let borderColor = "transparent";
156
+
157
+ if (inactiveBackgroundColor === "surface") {
158
+ borderColor = tokens["color-border"];
159
+ }
160
+
161
+ return {
162
+ borderColor,
163
+ borderWidth: tokens["border-base"],
164
+ };
165
+ }