@jobber/components-native 0.76.1-JOB-116234-c33b316.30 → 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.
- package/dist/package.json +2 -2
- package/dist/src/BottomSheet/BottomSheet.style.js +1 -2
- package/dist/src/Button/Button.style.js +1 -1
- package/dist/src/Checkbox/Checkbox.style.js +1 -2
- package/dist/src/Chip/Chip.style.js +1 -2
- package/dist/src/ContentOverlay/ContentOverlay.style.js +2 -3
- package/dist/src/InputFieldWrapper/CommonInputStyles.style.js +38 -40
- package/dist/src/Menu/components/Overlay/Overlay.style.js +2 -11
- package/dist/src/Select/Select.style.js +11 -8
- 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/src/Typography/Typography.js +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/src/Button/Button.style.d.ts +1 -0
- package/dist/types/src/InputFieldWrapper/CommonInputStyles.style.d.ts +1 -1
- package/dist/types/src/Menu/components/Overlay/Overlay.style.d.ts +5 -5
- package/dist/types/src/Select/Select.style.d.ts +1 -8
- package/dist/types/src/Select/components/SelectDefaultPicker/SelectDefaultPicker.style.d.ts +1 -1
- package/package.json +2 -2
- package/src/BottomSheet/BottomSheet.style.ts +2 -2
- package/src/Button/Button.style.ts +1 -1
- package/src/Checkbox/Checkbox.style.ts +2 -4
- package/src/Chip/Chip.style.ts +2 -3
- package/src/ContentOverlay/ContentOverlay.style.ts +3 -4
- package/src/InputFieldWrapper/CommonInputStyles.style.ts +39 -43
- package/src/InputFieldWrapper/InputFieldWrapper.style.ts +1 -0
- package/src/Menu/components/Overlay/Overlay.style.ts +2 -6
- package/src/Select/Select.style.ts +11 -8
- 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 +7 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TextStyle, ViewStyle } from "react-native";
|
|
2
2
|
import { AtlantisThemeContextValue } from "../AtlantisThemeContext";
|
|
3
3
|
import { tokens as staticTokens } from "../utils/design";
|
|
4
|
-
export declare const createCommonInputTokens: (tokens: AtlantisThemeContextValue["tokens"] | typeof staticTokens
|
|
4
|
+
export declare const createCommonInputTokens: (tokens: AtlantisThemeContextValue["tokens"] | typeof staticTokens) => Record<string, ViewStyle | TextStyle>;
|
|
5
5
|
/**
|
|
6
6
|
* @deprecated Use useCommonInputStyles instead
|
|
7
7
|
*/
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export declare const useStyles: () => {
|
|
2
2
|
overlay: {
|
|
3
|
-
position: "absolute";
|
|
4
|
-
top: number;
|
|
5
|
-
left: number;
|
|
6
|
-
right: number;
|
|
7
|
-
bottom: number;
|
|
8
3
|
backgroundColor: string;
|
|
9
4
|
opacity: number;
|
|
10
5
|
height: number;
|
|
6
|
+
position: "absolute";
|
|
7
|
+
left: 0;
|
|
8
|
+
right: 0;
|
|
9
|
+
top: 0;
|
|
10
|
+
bottom: 0;
|
|
11
11
|
};
|
|
12
12
|
};
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
export declare const useStyles: () => {
|
|
2
2
|
container: import("react-native").ViewStyle;
|
|
3
|
-
input:
|
|
4
|
-
flexDirection: "row";
|
|
5
|
-
flexGrow: number;
|
|
6
|
-
paddingTop: number;
|
|
7
|
-
minHeight: number;
|
|
8
|
-
minWidth: "100%";
|
|
9
|
-
paddingRight: number;
|
|
10
|
-
};
|
|
3
|
+
input: import("react-native").ViewStyle;
|
|
11
4
|
value: {
|
|
12
5
|
flexGrow: number;
|
|
13
6
|
flexShrink: number;
|
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-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": "
|
|
83
|
+
"gitHead": "50e11a8ac73483bb0be9fd7b4e9fa72ad637a45a"
|
|
84
84
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Dimensions, StyleSheet } from "react-native";
|
|
2
|
-
import { tokens as staticTokens } from "../utils/design";
|
|
3
2
|
import { buildThemedStyles } from "../AtlantisThemeContext";
|
|
4
3
|
|
|
5
4
|
const { height } = Dimensions.get("window");
|
|
6
|
-
const modalBorderRadius = staticTokens["radius-larger"];
|
|
7
5
|
|
|
8
6
|
export const useStyles = buildThemedStyles(tokens => {
|
|
7
|
+
const modalBorderRadius = tokens["radius-larger"];
|
|
8
|
+
|
|
9
9
|
return {
|
|
10
10
|
overlayModalize: {
|
|
11
11
|
backgroundColor: "transparent",
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { tokens as staticTokens } from "../utils/design";
|
|
2
1
|
import { buildThemedStyles } from "../AtlantisThemeContext";
|
|
3
2
|
|
|
4
|
-
const checkboxDimensions =
|
|
5
|
-
staticTokens["space-large"] + staticTokens["space-smaller"];
|
|
6
|
-
|
|
7
3
|
export const useStyles = buildThemedStyles(tokens => {
|
|
4
|
+
const checkboxDimensions = tokens["space-large"] + tokens["space-smaller"];
|
|
5
|
+
|
|
8
6
|
return {
|
|
9
7
|
container: {
|
|
10
8
|
width: "100%",
|
package/src/Chip/Chip.style.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { tokens as staticTokens } from "../utils/design";
|
|
2
1
|
import { buildThemedStyles } from "../AtlantisThemeContext";
|
|
3
2
|
|
|
4
|
-
const chipHeight = staticTokens["space-larger"] + staticTokens["space-small"];
|
|
5
|
-
|
|
6
3
|
export const useStyles = buildThemedStyles(tokens => {
|
|
4
|
+
const chipHeight = tokens["space-larger"] + tokens["space-small"];
|
|
5
|
+
|
|
7
6
|
return {
|
|
8
7
|
container: {
|
|
9
8
|
alignItems: "center",
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { tokens as staticTokens } from "../utils/design";
|
|
2
1
|
import { buildThemedStyles } from "../AtlantisThemeContext";
|
|
3
2
|
|
|
4
|
-
const modalBorderRadius = staticTokens["radius-larger"];
|
|
5
|
-
const titleOffsetFromHandle = staticTokens["space-base"];
|
|
6
|
-
|
|
7
3
|
export const useStyles = buildThemedStyles(tokens => {
|
|
4
|
+
const modalBorderRadius = tokens["radius-larger"];
|
|
5
|
+
const titleOffsetFromHandle = tokens["space-base"];
|
|
6
|
+
|
|
8
7
|
return {
|
|
9
8
|
handle: {
|
|
10
9
|
width: tokens["space-largest"],
|
|
@@ -3,66 +3,62 @@ import {
|
|
|
3
3
|
AtlantisThemeContextValue,
|
|
4
4
|
buildThemedStyles,
|
|
5
5
|
} from "../AtlantisThemeContext";
|
|
6
|
-
import {
|
|
7
|
-
getTypographyStyles,
|
|
8
|
-
// eslint-disable-next-line import/no-deprecated
|
|
9
|
-
typographyStyles as staticTypographyStyles,
|
|
10
|
-
} from "../Typography";
|
|
6
|
+
import { getTypographyStyles } from "../Typography";
|
|
11
7
|
import { tokens as staticTokens } from "../utils/design";
|
|
12
8
|
|
|
13
9
|
export const createCommonInputTokens = (
|
|
14
10
|
tokens: AtlantisThemeContextValue["tokens"] | typeof staticTokens,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
input: {
|
|
18
|
-
width: "100%" as const,
|
|
19
|
-
flexShrink: 1,
|
|
20
|
-
flexGrow: 1,
|
|
21
|
-
color: tokens["color-text"],
|
|
22
|
-
fontFamily: typographyStyles.baseRegularRegular.fontFamily,
|
|
23
|
-
fontSize: typographyStyles.defaultSize.fontSize,
|
|
24
|
-
letterSpacing: typographyStyles.baseLetterSpacing.letterSpacing,
|
|
25
|
-
minHeight: tokens["space-largest"] + tokens["space-small"],
|
|
26
|
-
padding: 0,
|
|
27
|
-
},
|
|
11
|
+
): Record<string, ViewStyle | TextStyle> => {
|
|
12
|
+
const typographyStyles = getTypographyStyles(tokens);
|
|
28
13
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
14
|
+
return {
|
|
15
|
+
input: {
|
|
16
|
+
width: "100%",
|
|
17
|
+
flexShrink: 1,
|
|
18
|
+
flexGrow: 1,
|
|
19
|
+
color: tokens["color-text"],
|
|
20
|
+
fontFamily: typographyStyles.baseRegularRegular.fontFamily,
|
|
21
|
+
fontSize: typographyStyles.defaultSize.fontSize,
|
|
22
|
+
letterSpacing: typographyStyles.baseLetterSpacing.letterSpacing,
|
|
23
|
+
minHeight: tokens["space-largest"] + tokens["space-small"],
|
|
24
|
+
padding: 0,
|
|
25
|
+
},
|
|
32
26
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
inputEmpty: {
|
|
28
|
+
paddingTop: 0,
|
|
29
|
+
},
|
|
36
30
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
31
|
+
inputDisabled: {
|
|
32
|
+
color: typographyStyles.disabled.color,
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
container: {
|
|
36
|
+
paddingLeft: tokens["space-base"],
|
|
37
|
+
marginVertical: tokens["space-smaller"],
|
|
38
|
+
backgroundColor: tokens["color-surface"],
|
|
39
|
+
minHeight: tokens["space-largest"] + tokens["space-small"],
|
|
40
|
+
flexDirection: "row",
|
|
41
|
+
justifyContent: "space-between",
|
|
42
|
+
width: "100%",
|
|
43
|
+
borderColor: tokens["color-border"],
|
|
44
|
+
borderStyle: "solid",
|
|
45
|
+
borderWidth: tokens["border-base"],
|
|
46
|
+
borderRadius: tokens["radius-base"],
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
};
|
|
51
50
|
|
|
52
51
|
/**
|
|
53
52
|
* @deprecated Use useCommonInputStyles instead
|
|
54
53
|
*/
|
|
55
54
|
export const commonInputStyles = StyleSheet.create(
|
|
56
|
-
|
|
57
|
-
createCommonInputTokens(staticTokens, staticTypographyStyles),
|
|
55
|
+
createCommonInputTokens(staticTokens),
|
|
58
56
|
);
|
|
59
57
|
|
|
60
58
|
export const getCommonInputStyles = (
|
|
61
59
|
tokens: AtlantisThemeContextValue["tokens"],
|
|
62
60
|
) => {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
return createCommonInputTokens(tokens, typographyStyles);
|
|
61
|
+
return createCommonInputTokens(tokens);
|
|
66
62
|
};
|
|
67
63
|
|
|
68
64
|
export const useCommonInputStyles = buildThemedStyles(tokens => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Dimensions } from "react-native";
|
|
1
|
+
import { Dimensions, StyleSheet } from "react-native";
|
|
2
2
|
import { buildThemedStyles } from "../../../AtlantisThemeContext";
|
|
3
3
|
|
|
4
4
|
const { height } = Dimensions.get("window");
|
|
@@ -6,11 +6,7 @@ const { height } = Dimensions.get("window");
|
|
|
6
6
|
export const useStyles = buildThemedStyles(tokens => {
|
|
7
7
|
return {
|
|
8
8
|
overlay: {
|
|
9
|
-
|
|
10
|
-
top: 0,
|
|
11
|
-
left: 0,
|
|
12
|
-
right: 0,
|
|
13
|
-
bottom: 0,
|
|
9
|
+
...StyleSheet.absoluteFillObject,
|
|
14
10
|
backgroundColor: tokens["color-overlay"],
|
|
15
11
|
opacity: 0,
|
|
16
12
|
height,
|
|
@@ -17,14 +17,17 @@ export const useStyles = buildThemedStyles(tokens => {
|
|
|
17
17
|
},
|
|
18
18
|
]),
|
|
19
19
|
|
|
20
|
-
input:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
input: StyleSheet.flatten([
|
|
21
|
+
commonInputStyles.input,
|
|
22
|
+
{
|
|
23
|
+
flexDirection: "row",
|
|
24
|
+
flexGrow: 0,
|
|
25
|
+
paddingTop: tokens["space-smaller"],
|
|
26
|
+
minHeight: 0,
|
|
27
|
+
minWidth: "100%",
|
|
28
|
+
paddingRight: tokens["space-small"],
|
|
29
|
+
},
|
|
30
|
+
]),
|
|
28
31
|
|
|
29
32
|
value: {
|
|
30
33
|
flexGrow: 1,
|
|
@@ -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 (
|
|
@@ -152,7 +152,7 @@ function InternalTypography<T extends FontFamily = "base">({
|
|
|
152
152
|
maxFontScaleSize,
|
|
153
153
|
adjustsFontSizeToFit = false,
|
|
154
154
|
lineHeight,
|
|
155
|
-
letterSpacing,
|
|
155
|
+
letterSpacing = "base",
|
|
156
156
|
reverseTheme = false,
|
|
157
157
|
hideFromScreenReader = false,
|
|
158
158
|
accessibilityRole = "text",
|
|
@@ -234,7 +234,7 @@ function getFontStyle(
|
|
|
234
234
|
fontFamily: FontFamily = "base",
|
|
235
235
|
fontStyle: FontStyle = "regular",
|
|
236
236
|
fontWeight: FontWeight = "regular",
|
|
237
|
-
styles:
|
|
237
|
+
styles: ReturnType<typeof useTypographyStyles>,
|
|
238
238
|
) {
|
|
239
239
|
const defaultBaseFontStyling = styles.baseRegularRegular;
|
|
240
240
|
const defaultDisplayFontStyling = styles.displayRegularBold;
|
|
@@ -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`];
|
|
@@ -302,8 +302,8 @@ function getSizeAndHeightStyle(
|
|
|
302
302
|
}
|
|
303
303
|
|
|
304
304
|
function getLetterSpacingStyle(
|
|
305
|
-
letterSpacing: LetterSpacing
|
|
306
|
-
styles:
|
|
305
|
+
letterSpacing: LetterSpacing,
|
|
306
|
+
styles: ReturnType<typeof useTypographyStyles>,
|
|
307
307
|
) {
|
|
308
308
|
return styles[`${letterSpacing}LetterSpacing`];
|
|
309
309
|
}
|