@jobber/components-native 0.76.1-JOB-116234-c33b316.30 → 0.76.1-JOB-116234-6cadae0.33
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/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/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/Typography/Typography.tsx +3 -3
|
@@ -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-6cadae0.33+6cadae01",
|
|
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": "6cadae0138cf0633adc31d349b1f03dc50776679"
|
|
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,
|
|
@@ -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;
|
|
@@ -302,7 +302,7 @@ function getSizeAndHeightStyle(
|
|
|
302
302
|
}
|
|
303
303
|
|
|
304
304
|
function getLetterSpacingStyle(
|
|
305
|
-
letterSpacing: LetterSpacing
|
|
305
|
+
letterSpacing: LetterSpacing,
|
|
306
306
|
styles: Record<string, TextStyle>,
|
|
307
307
|
) {
|
|
308
308
|
return styles[`${letterSpacing}LetterSpacing`];
|