@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.
@@ -24,6 +24,7 @@ export declare const useStyles: () => {
24
24
  };
25
25
  base: {
26
26
  minHeight: number;
27
+ paddingHorizontal: number;
27
28
  };
28
29
  small: {
29
30
  minHeight: number;
@@ -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, typographyStyles: Record<string, TextStyle>) => Record<string, ViewStyle | TextStyle>;
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-c33b316.30+c33b3167",
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": "c33b3167c0b220f060d1fe7ad6f48db97af8ea15"
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",
@@ -35,7 +35,7 @@ export const useStyles = buildThemedStyles(tokens => {
35
35
 
36
36
  base: {
37
37
  minHeight: baseButtonHeight,
38
- // paddingHorizontal: tokens["space-base"],
38
+ paddingHorizontal: tokens["space-base"],
39
39
  },
40
40
 
41
41
  small: {
@@ -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%",
@@ -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
- typographyStyles: Record<string, TextStyle>,
16
- ): Record<string, ViewStyle | TextStyle> => ({
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
- inputEmpty: {
30
- paddingTop: 0,
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
- inputDisabled: {
34
- color: typographyStyles.disabled.color,
35
- },
27
+ inputEmpty: {
28
+ paddingTop: 0,
29
+ },
36
30
 
37
- container: {
38
- paddingLeft: tokens["space-base"],
39
- marginVertical: tokens["space-smaller"],
40
- backgroundColor: tokens["color-surface"],
41
- minHeight: tokens["space-largest"] + tokens["space-small"],
42
- flexDirection: "row",
43
- justifyContent: "space-between",
44
- width: "100%",
45
- borderColor: tokens["color-border"],
46
- borderStyle: "solid",
47
- borderWidth: tokens["border-base"],
48
- borderRadius: tokens["radius-base"],
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
- // eslint-disable-next-line import/no-deprecated
57
- createCommonInputTokens(staticTokens, staticTypographyStyles),
55
+ createCommonInputTokens(staticTokens),
58
56
  );
59
57
 
60
58
  export const getCommonInputStyles = (
61
59
  tokens: AtlantisThemeContextValue["tokens"],
62
60
  ) => {
63
- const typographyStyles = getTypographyStyles(tokens);
64
-
65
- return createCommonInputTokens(tokens, typographyStyles);
61
+ return createCommonInputTokens(tokens);
66
62
  };
67
63
 
68
64
  export const useCommonInputStyles = buildThemedStyles(tokens => {
@@ -14,6 +14,7 @@ export const useStyles = buildThemedStyles(tokens => {
14
14
  flexDirection: "column",
15
15
  },
16
16
  ]),
17
+
17
18
  field: {
18
19
  flexDirection: "row",
19
20
  alignItems: "center",
@@ -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
- position: "absolute",
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
- flexDirection: "row",
22
- flexGrow: 0,
23
- paddingTop: tokens["space-smaller"],
24
- minHeight: 0,
25
- minWidth: "100%",
26
- paddingRight: tokens["space-small"],
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: Record<string, TextStyle>,
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 = "base",
305
+ letterSpacing: LetterSpacing,
306
306
  styles: Record<string, TextStyle>,
307
307
  ) {
308
308
  return styles[`${letterSpacing}LetterSpacing`];