@jobber/components-native 0.76.1-JOB-116234-6cadae0.33 → 0.76.1-JOB-116234-50e11a8.34

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.
@@ -1,4 +1,4 @@
1
- export declare const useStyles: () => {
1
+ export declare const styles: {
2
2
  overlay: {
3
3
  flex: number;
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components-native",
3
- "version": "0.76.1-JOB-116234-6cadae0.33+6cadae01",
3
+ "version": "0.76.1-JOB-116234-50e11a8.34+50e11a8a",
4
4
  "license": "MIT",
5
5
  "description": "React Native implementation of Atlantis",
6
6
  "repository": {
@@ -80,5 +80,5 @@
80
80
  "react-native-safe-area-context": "^4.5.2",
81
81
  "react-native-svg": ">=12.0.0"
82
82
  },
83
- "gitHead": "6cadae0138cf0633adc31d349b1f03dc50776679"
83
+ "gitHead": "50e11a8ac73483bb0be9fd7b4e9fa72ad637a45a"
84
84
  }
@@ -8,7 +8,7 @@ import {
8
8
  } from "react-native";
9
9
  import { Picker } from "@react-native-picker/picker";
10
10
  import { SafeAreaView } from "react-native-safe-area-context";
11
- import { useStyles } from "./SelectDefaultPicker.style";
11
+ import { styles } from "./SelectDefaultPicker.style";
12
12
  import { SelectInternalPickerProps } from "../../types";
13
13
  import { SelectPressable } from "../SelectPressable/SelectPressable";
14
14
  import { useAtlantisI18n } from "../../../hooks/useAtlantisI18n";
@@ -23,7 +23,6 @@ export function SelectDefaultPicker({
23
23
  const [show, setShow] = useState(false);
24
24
  const { t } = useAtlantisI18n();
25
25
  const selectedLanguage = options.find(option => option.isActive);
26
- const styles = useStyles();
27
26
 
28
27
  return (
29
28
  <>
@@ -1,34 +1,30 @@
1
- import { buildThemedStyles } from "../../../AtlantisThemeContext";
1
+ import { StyleSheet } from "react-native";
2
2
 
3
- export const useStyles = buildThemedStyles(tokens => {
4
- return {
5
- overlay: {
6
- flex: 1,
7
- },
8
- actionBar: {
9
- flexDirection: "row",
10
- height: 45,
11
- justifyContent: "flex-end",
12
- alignItems: "center",
13
- paddingHorizontal: tokens["space-small"],
14
- backgroundColor: tokens["color-surface--background"],
15
- borderTopWidth: tokens["border-base"],
16
- borderTopColor: tokens["color-border"],
17
- zIndex: 2,
18
- },
19
- pickerContainer: {
20
- justifyContent: "center",
21
- backgroundColor: tokens["color-surface--background"],
22
- },
23
- androidPickerContainer: {
24
- position: "absolute",
25
- top: 0,
26
- left: 0,
27
- width: "100%",
28
- height: "100%",
29
- color: "transparent",
30
- backgroundColor: "transparent",
31
- opacity: 0,
32
- },
33
- };
3
+ export const styles = StyleSheet.create({
4
+ overlay: { flex: 1 },
5
+ actionBar: {
6
+ flexDirection: "row",
7
+ height: 45,
8
+ justifyContent: "flex-end",
9
+ alignItems: "center",
10
+ paddingHorizontal: 10,
11
+ backgroundColor: "#f8f8f8",
12
+ borderTopWidth: 1,
13
+ borderTopColor: "#dedede",
14
+ zIndex: 2,
15
+ },
16
+ pickerContainer: {
17
+ justifyContent: "center",
18
+ backgroundColor: "#d0d4da",
19
+ },
20
+ androidPickerContainer: {
21
+ position: "absolute",
22
+ top: 0,
23
+ left: 0,
24
+ width: "100%",
25
+ height: "100%",
26
+ color: "transparent",
27
+ backgroundColor: "transparent",
28
+ opacity: 0,
29
+ },
34
30
  });
@@ -1,6 +1,6 @@
1
1
  import React, { useRef } from "react";
2
2
  import { Picker } from "@react-native-picker/picker";
3
- import { useStyles } from "./SelectDefaultPicker.style";
3
+ import { styles } from "./SelectDefaultPicker.style";
4
4
  import { SelectInternalPickerProps } from "../../types";
5
5
  import { SelectPressable } from "../SelectPressable";
6
6
  import { useAtlantisTheme } from "../../../AtlantisThemeContext";
@@ -15,7 +15,6 @@ export function SelectDefaultPicker({
15
15
  }: SelectDefaultPickerProps): JSX.Element {
16
16
  const selectedItem = options.find(option => option.isActive);
17
17
  const pickerRef = useRef<Picker<string>>(null);
18
- const styles = useStyles();
19
18
  const { tokens } = useAtlantisTheme();
20
19
 
21
20
  return (
@@ -266,7 +266,7 @@ function getTransformedText(text?: string, transform?: TextTransform) {
266
266
  }
267
267
 
268
268
  function getColorStyle(
269
- styles: Record<string, TextStyle>,
269
+ styles: ReturnType<typeof useTypographyStyles>,
270
270
  color?: TextColor,
271
271
  reverseTheme?: boolean,
272
272
  ) {
@@ -279,7 +279,7 @@ function getColorStyle(
279
279
  }
280
280
 
281
281
  function getAlignStyle(
282
- styles: Record<string, TextStyle>,
282
+ styles: ReturnType<typeof useTypographyStyles>,
283
283
  alignStyle: TextAlign = I18nManager.isRTL ? "end" : "start",
284
284
  ) {
285
285
  return styles[`${alignStyle}Align`];
@@ -287,7 +287,7 @@ function getAlignStyle(
287
287
 
288
288
  function getSizeAndHeightStyle(
289
289
  textSize: TextSize,
290
- styles: Record<string, TextStyle>,
290
+ styles: ReturnType<typeof useTypographyStyles>,
291
291
  lineHeightOverwrite?: LineHeight,
292
292
  ) {
293
293
  const fontSize = styles[`${textSize}Size`];
@@ -303,7 +303,7 @@ function getSizeAndHeightStyle(
303
303
 
304
304
  function getLetterSpacingStyle(
305
305
  letterSpacing: LetterSpacing,
306
- styles: Record<string, TextStyle>,
306
+ styles: ReturnType<typeof useTypographyStyles>,
307
307
  ) {
308
308
  return styles[`${letterSpacing}LetterSpacing`];
309
309
  }