@jobber/components-native 0.76.1-JOB-116234-63c4467.27 → 0.76.1-JOB-116234-c33b316.30
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/InputFieldWrapper/CommonInputStyles.style.js +8 -6
- package/dist/src/InputFieldWrapper/InputFieldWrapper.style.js +8 -8
- package/dist/src/InputFieldWrapper/index.js +1 -1
- package/dist/src/InputPressable/InputPressable.style.js +6 -6
- package/dist/src/InputText/InputText.style.js +6 -6
- package/dist/src/Select/Select.style.js +6 -6
- package/dist/src/Typography/Typography.style.js +4 -4
- package/dist/src/Typography/index.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/src/InputFieldWrapper/CommonInputStyles.style.d.ts +1 -0
- package/dist/types/src/InputFieldWrapper/index.d.ts +1 -1
- package/dist/types/src/Typography/Typography.style.d.ts +2 -2
- package/dist/types/src/Typography/index.d.ts +1 -1
- package/package.json +2 -2
- package/src/AtlantisThemeContext/buildThemedStyles.test.tsx +0 -26
- package/src/InputFieldWrapper/CommonInputStyles.style.ts +10 -7
- package/src/InputFieldWrapper/InputFieldWrapper.style.ts +8 -8
- package/src/InputFieldWrapper/components/Prefix/Prefix.test.tsx +0 -2
- package/src/InputFieldWrapper/index.ts +4 -1
- package/src/InputPressable/InputPressable.style.ts +6 -6
- package/src/InputText/InputText.style.ts +6 -6
- package/src/Select/Select.style.ts +6 -6
- package/src/Typography/Typography.style.ts +4 -4
- package/src/Typography/index.ts +1 -1
package/dist/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-c33b316.30+c33b3167",
|
|
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": "c33b3167c0b220f060d1fe7ad6f48db97af8ea15"
|
|
84
84
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { buildThemedStyles, } from "../AtlantisThemeContext";
|
|
3
|
-
import {
|
|
3
|
+
import { getTypographyStyles,
|
|
4
4
|
// eslint-disable-next-line import/no-deprecated
|
|
5
|
-
typographyStyles as staticTypographyStyles,
|
|
5
|
+
typographyStyles as staticTypographyStyles, } from "../Typography";
|
|
6
6
|
import { tokens as staticTokens } from "../utils/design";
|
|
7
7
|
export const createCommonInputTokens = (tokens, typographyStyles) => ({
|
|
8
8
|
input: {
|
|
@@ -42,8 +42,10 @@ export const createCommonInputTokens = (tokens, typographyStyles) => ({
|
|
|
42
42
|
export const commonInputStyles = StyleSheet.create(
|
|
43
43
|
// eslint-disable-next-line import/no-deprecated
|
|
44
44
|
createCommonInputTokens(staticTokens, staticTypographyStyles));
|
|
45
|
-
export const
|
|
46
|
-
const typographyStyles =
|
|
47
|
-
|
|
48
|
-
return themedStyles;
|
|
45
|
+
export const getCommonInputStyles = (tokens) => {
|
|
46
|
+
const typographyStyles = getTypographyStyles(tokens);
|
|
47
|
+
return createCommonInputTokens(tokens, typographyStyles);
|
|
49
48
|
};
|
|
49
|
+
export const useCommonInputStyles = buildThemedStyles(tokens => {
|
|
50
|
+
return getCommonInputStyles(tokens);
|
|
51
|
+
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
|
-
import {
|
|
2
|
+
import { getCommonInputStyles } from "./CommonInputStyles.style";
|
|
3
3
|
import { buildThemedStyles } from "../AtlantisThemeContext";
|
|
4
|
-
import {
|
|
5
|
-
export const useStyles = (
|
|
6
|
-
const commonInputStyles =
|
|
7
|
-
const typographyStyles =
|
|
8
|
-
return
|
|
4
|
+
import { getTypographyStyles } from "../Typography";
|
|
5
|
+
export const useStyles = buildThemedStyles(tokens => {
|
|
6
|
+
const commonInputStyles = getCommonInputStyles(tokens);
|
|
7
|
+
const typographyStyles = getTypographyStyles(tokens);
|
|
8
|
+
return {
|
|
9
9
|
container: StyleSheet.flatten([
|
|
10
10
|
commonInputStyles.container,
|
|
11
11
|
{
|
|
@@ -119,5 +119,5 @@ export const useStyles = () => {
|
|
|
119
119
|
paddingTop: tokens["space-base"] - tokens["space-smaller"],
|
|
120
120
|
bottom: tokens["space-smaller"],
|
|
121
121
|
},
|
|
122
|
-
}
|
|
123
|
-
};
|
|
122
|
+
};
|
|
123
|
+
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { useCommonInputStyles } from "./CommonInputStyles.style";
|
|
1
|
+
export { getCommonInputStyles, useCommonInputStyles, } from "./CommonInputStyles.style";
|
|
2
2
|
export { InputFieldWrapper } from "./InputFieldWrapper";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { buildThemedStyles } from "../AtlantisThemeContext";
|
|
2
|
-
import {
|
|
3
|
-
export const useStyles = (
|
|
4
|
-
const typographyStyles =
|
|
5
|
-
return
|
|
2
|
+
import { getTypographyStyles } from "../Typography";
|
|
3
|
+
export const useStyles = buildThemedStyles(tokens => {
|
|
4
|
+
const typographyStyles = getTypographyStyles(tokens);
|
|
5
|
+
return {
|
|
6
6
|
pressable: {
|
|
7
7
|
flex: 1,
|
|
8
8
|
},
|
|
@@ -21,5 +21,5 @@ export const useStyles = () => {
|
|
|
21
21
|
inputInvalid: {
|
|
22
22
|
borderColor: tokens["color-critical"],
|
|
23
23
|
},
|
|
24
|
-
}
|
|
25
|
-
};
|
|
24
|
+
};
|
|
25
|
+
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { buildThemedStyles } from "../AtlantisThemeContext";
|
|
2
|
-
import {
|
|
3
|
-
export const useStyles = (
|
|
4
|
-
const typographyStyles =
|
|
5
|
-
return
|
|
2
|
+
import { getTypographyStyles } from "../Typography";
|
|
3
|
+
export const useStyles = buildThemedStyles(tokens => {
|
|
4
|
+
const typographyStyles = getTypographyStyles(tokens);
|
|
5
|
+
return {
|
|
6
6
|
inputPaddingTop: {
|
|
7
7
|
paddingTop: (typographyStyles.smallSize.fontSize || 0) +
|
|
8
8
|
tokens["space-smaller"] +
|
|
@@ -20,5 +20,5 @@ export const useStyles = () => {
|
|
|
20
20
|
multilineInputiOS: {
|
|
21
21
|
paddingTop: (typographyStyles.defaultSize.fontSize || 0) + tokens["space-smallest"],
|
|
22
22
|
},
|
|
23
|
-
}
|
|
24
|
-
};
|
|
23
|
+
};
|
|
24
|
+
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
|
-
import {
|
|
2
|
+
import { getCommonInputStyles } from "../InputFieldWrapper";
|
|
3
3
|
import { buildThemedStyles } from "../AtlantisThemeContext";
|
|
4
|
-
export const useStyles = (
|
|
5
|
-
const commonInputStyles =
|
|
6
|
-
return
|
|
4
|
+
export const useStyles = buildThemedStyles(tokens => {
|
|
5
|
+
const commonInputStyles = getCommonInputStyles(tokens);
|
|
6
|
+
return {
|
|
7
7
|
container: StyleSheet.flatten([
|
|
8
8
|
commonInputStyles.container,
|
|
9
9
|
{
|
|
@@ -47,5 +47,5 @@ export const useStyles = () => {
|
|
|
47
47
|
paddingTop: tokens["space-smaller"],
|
|
48
48
|
flexDirection: "row",
|
|
49
49
|
},
|
|
50
|
-
}
|
|
51
|
-
};
|
|
50
|
+
};
|
|
51
|
+
});
|
|
@@ -62,9 +62,9 @@ const fonts = Platform.select({
|
|
|
62
62
|
default: deviceFonts,
|
|
63
63
|
});
|
|
64
64
|
/**
|
|
65
|
-
* Reusable typography
|
|
65
|
+
* Reusable typography styles to ensure consistency for any client facing texts.
|
|
66
66
|
*/
|
|
67
|
-
export const
|
|
67
|
+
export const getTypographyStyles = (tokens) => (Object.assign(Object.assign({}, fonts), { italic: {
|
|
68
68
|
fontStyle: "italic",
|
|
69
69
|
}, underline: {
|
|
70
70
|
textDecorationColor: tokens["color-text--secondary"],
|
|
@@ -356,5 +356,5 @@ export const createTypographyTokens = (tokens) => (Object.assign(Object.assign({
|
|
|
356
356
|
/**
|
|
357
357
|
* @deprecated Use useTypographyStyles instead
|
|
358
358
|
*/
|
|
359
|
-
export const typographyStyles = StyleSheet.create(
|
|
360
|
-
export const useTypographyStyles = buildThemedStyles(
|
|
359
|
+
export const typographyStyles = StyleSheet.create(getTypographyStyles(staticTokens));
|
|
360
|
+
export const useTypographyStyles = buildThemedStyles(getTypographyStyles);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { Typography } from "./Typography";
|
|
2
|
-
export { useTypographyStyles } from "./Typography.style";
|
|
2
|
+
export { getTypographyStyles, useTypographyStyles } from "./Typography.style";
|
|
3
3
|
export { typographyStyles } from "./Typography.style";
|
|
4
4
|
export { TypographyGestureDetector } from "./TypographyGestureDetector";
|