@jobber/components-native 0.52.0 → 0.53.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components-native",
3
- "version": "0.52.0",
3
+ "version": "0.53.0",
4
4
  "license": "MIT",
5
5
  "description": "React Native implementation of Atlantis",
6
6
  "repository": {
@@ -84,5 +84,5 @@
84
84
  "react-native-reanimated": "^2.17.0",
85
85
  "react-native-safe-area-context": "^4.5.2"
86
86
  },
87
- "gitHead": "5554661baa9482140012e2e67c609484974fd12d"
87
+ "gitHead": "5e1ab691f54f32589367e99fc60cd05b749f5df6"
88
88
  }
@@ -17,7 +17,7 @@ function getFontWeight(type) {
17
17
  if (type === "cardTitle") {
18
18
  return "bold";
19
19
  }
20
- return "extraBold";
20
+ return "semiBold";
21
21
  }
22
22
  function getLetterSpacing(type) {
23
23
  if (type === "cardTitle") {
@@ -8,12 +8,13 @@ import { tokens } from "../utils/design";
8
8
  export function Button({ label, onPress, variation = "work", type = "primary", fullHeight = false, fullWidth = true, disabled = false, loading = false, size = "base", accessibilityLabel, accessibilityHint, icon, testID, }) {
9
9
  const buttonStyle = [
10
10
  styles.button,
11
+ styles[size],
11
12
  styles[variation],
12
13
  styles[type],
13
- styles[size],
14
+ type === "secondary" && variation === "cancel" && styles.cancelSecondary,
14
15
  disabled && styles.disabled,
15
- fullHeight && styles.fullHeight,
16
16
  fullWidth && styles.reducedPaddingForFullWidth,
17
+ fullHeight && styles.fullHeight,
17
18
  ];
18
19
  // attempts to use Pressable caused problems. When a ScrollView contained
19
20
  // an InputText that was focused, it required two presses to activate the
@@ -1,9 +1,9 @@
1
1
  import { StyleSheet } from "react-native";
2
2
  import { tokens } from "../utils/design";
3
3
  const iconTranslateY = tokens["space-large"] / 2;
4
- const buttonRadius = tokens["radius-large"];
5
- export const baseButtonHeight = tokens["space-base"] * 3.5;
6
- export const smallButtonHeight = tokens["space-base"] * 2.25;
4
+ const buttonRadius = tokens["radius-base"];
5
+ export const baseButtonHeight = tokens["space-base"] * 3;
6
+ export const smallButtonHeight = tokens["space-base"] * 2.5;
7
7
  export const styles = StyleSheet.create({
8
8
  fullHeight: {
9
9
  flexGrow: 1,
@@ -73,16 +73,20 @@ export const styles = StyleSheet.create({
73
73
  /* Cancel is special because, by default, it's styled as a secondary button */
74
74
  cancel: {
75
75
  backgroundColor: tokens["color-surface"],
76
- borderColor: tokens["color-interactive--subtle"],
76
+ borderColor: tokens["color-border"],
77
+ },
78
+ cancelSecondary: {
79
+ borderColor: "transparent",
77
80
  },
78
81
  /* Types */
79
82
  primary: {},
80
83
  secondary: {
81
84
  backgroundColor: tokens["color-surface"],
85
+ borderColor: tokens["color-border"],
82
86
  },
83
87
  tertiary: {
84
88
  backgroundColor: tokens["color-surface"],
85
- borderColor: tokens["color-surface"],
89
+ borderColor: "transparent",
86
90
  },
87
91
  /* Disabled */
88
92
  disabled: {