@jobber/components-native 0.87.0 → 0.87.1

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.87.0",
3
+ "version": "0.87.1",
4
4
  "license": "MIT",
5
5
  "description": "React Native implementation of Atlantis",
6
6
  "repository": {
@@ -95,5 +95,5 @@
95
95
  "react-native-safe-area-context": "^5.4.0",
96
96
  "react-native-svg": ">=12.0.0"
97
97
  },
98
- "gitHead": "1277fa27082aa0506ee96f21cb02a05eea472027"
98
+ "gitHead": "a26eb1f7a5e8759d3ffbecbf81f846895c47aad4"
99
99
  }
@@ -4,6 +4,7 @@ import { Switch } from "react-native-gesture-handler";
4
4
  import { useFormController } from "../../../hooks";
5
5
  import { useAtlantisTheme } from "../../../AtlantisThemeContext";
6
6
  export function BaseSwitch({ value, defaultValue, onValueChange, disabled = false, accessibilityLabel, name, }) {
7
+ var _a;
7
8
  const { field } = useFormController({
8
9
  name,
9
10
  value: value !== null && value !== void 0 ? value : defaultValue,
@@ -43,12 +44,17 @@ export function BaseSwitch({ value, defaultValue, onValueChange, disabled = fals
43
44
  };
44
45
  }
45
46
  }
47
+ // Temporary fix for iOS 26. Remove when we upgrade to RN 0.81.
48
+ // https://github.com/facebook/react-native/pull/53389
49
+ const iOSBackgroundColor = Platform.OS === "ios" && ((_a = Platform.Version) === null || _a === void 0 ? void 0 : _a.startsWith("26."))
50
+ ? undefined
51
+ : tokens["color-interactive--background"];
46
52
  return (React.createElement(Switch, { value: internalValue, onValueChange: (val) => {
47
53
  if (!disabled) {
48
54
  onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(val);
49
55
  field.onChange(val);
50
56
  }
51
- }, disabled: disabled, thumbColor: getThumbColor(), trackColor: getTrackColors(), ios_backgroundColor: tokens["color-interactive--background"], accessibilityLabel: accessibilityLabel, accessibilityRole: "switch", accessibilityState: {
57
+ }, disabled: disabled, thumbColor: getThumbColor(), trackColor: getTrackColors(), ios_backgroundColor: iOSBackgroundColor, accessibilityLabel: accessibilityLabel, accessibilityRole: "switch", accessibilityState: {
52
58
  disabled: disabled,
53
59
  checked: internalValue,
54
60
  } }));