@jobber/components-native 0.76.1-JOB-116234-6cadae0.33 → 0.76.1-JOB-116234-180b1c7.36
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 +2 -2
- package/dist/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.ios.js +1 -2
- package/dist/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.js +1 -2
- package/dist/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.style.js +28 -32
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.style.d.ts +1 -1
- package/package.json +2 -2
- package/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.ios.tsx +1 -2
- package/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.style.ts +28 -32
- package/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.tsx +1 -2
- package/src/Typography/Typography.tsx +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-
|
|
3
|
+
"version": "0.76.1-JOB-116234-180b1c7.36+180b1c74",
|
|
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": "
|
|
83
|
+
"gitHead": "180b1c74afc3e9e14b7f9e9fe42f723ff4390b68"
|
|
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 {
|
|
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 {
|
|
1
|
+
import { StyleSheet } from "react-native";
|
|
2
2
|
|
|
3
|
-
export const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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 {
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
306
|
+
styles: ReturnType<typeof useTypographyStyles>,
|
|
307
307
|
) {
|
|
308
308
|
return styles[`${letterSpacing}LetterSpacing`];
|
|
309
309
|
}
|