@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
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-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,9 +1,8 @@
|
|
|
1
1
|
import { Dimensions, StyleSheet } from "react-native";
|
|
2
|
-
import { tokens as staticTokens } from "../utils/design";
|
|
3
2
|
import { buildThemedStyles } from "../AtlantisThemeContext";
|
|
4
3
|
const { height } = Dimensions.get("window");
|
|
5
|
-
const modalBorderRadius = staticTokens["radius-larger"];
|
|
6
4
|
export const useStyles = buildThemedStyles(tokens => {
|
|
5
|
+
const modalBorderRadius = tokens["radius-larger"];
|
|
7
6
|
return {
|
|
8
7
|
overlayModalize: {
|
|
9
8
|
backgroundColor: "transparent",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { tokens as staticTokens } from "../utils/design";
|
|
2
1
|
import { buildThemedStyles } from "../AtlantisThemeContext";
|
|
3
|
-
const checkboxDimensions = staticTokens["space-large"] + staticTokens["space-smaller"];
|
|
4
2
|
export const useStyles = buildThemedStyles(tokens => {
|
|
3
|
+
const checkboxDimensions = tokens["space-large"] + tokens["space-smaller"];
|
|
5
4
|
return {
|
|
6
5
|
container: {
|
|
7
6
|
width: "100%",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { tokens as staticTokens } from "../utils/design";
|
|
2
1
|
import { buildThemedStyles } from "../AtlantisThemeContext";
|
|
3
|
-
const chipHeight = staticTokens["space-larger"] + staticTokens["space-small"];
|
|
4
2
|
export const useStyles = buildThemedStyles(tokens => {
|
|
3
|
+
const chipHeight = tokens["space-larger"] + tokens["space-small"];
|
|
5
4
|
return {
|
|
6
5
|
container: {
|
|
7
6
|
alignItems: "center",
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { tokens as staticTokens } from "../utils/design";
|
|
2
1
|
import { buildThemedStyles } from "../AtlantisThemeContext";
|
|
3
|
-
const modalBorderRadius = staticTokens["radius-larger"];
|
|
4
|
-
const titleOffsetFromHandle = staticTokens["space-base"];
|
|
5
2
|
export const useStyles = buildThemedStyles(tokens => {
|
|
3
|
+
const modalBorderRadius = tokens["radius-larger"];
|
|
4
|
+
const titleOffsetFromHandle = tokens["space-base"];
|
|
6
5
|
return {
|
|
7
6
|
handle: {
|
|
8
7
|
width: tokens["space-largest"],
|
|
@@ -1,50 +1,48 @@
|
|
|
1
1
|
import { StyleSheet } from "react-native";
|
|
2
2
|
import { buildThemedStyles, } from "../AtlantisThemeContext";
|
|
3
|
-
import { getTypographyStyles
|
|
4
|
-
// eslint-disable-next-line import/no-deprecated
|
|
5
|
-
typographyStyles as staticTypographyStyles, } from "../Typography";
|
|
3
|
+
import { getTypographyStyles } from "../Typography";
|
|
6
4
|
import { tokens as staticTokens } from "../utils/design";
|
|
7
|
-
export const createCommonInputTokens = (tokens
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
5
|
+
export const createCommonInputTokens = (tokens) => {
|
|
6
|
+
const typographyStyles = getTypographyStyles(tokens);
|
|
7
|
+
return {
|
|
8
|
+
input: {
|
|
9
|
+
width: "100%",
|
|
10
|
+
flexShrink: 1,
|
|
11
|
+
flexGrow: 1,
|
|
12
|
+
color: tokens["color-text"],
|
|
13
|
+
fontFamily: typographyStyles.baseRegularRegular.fontFamily,
|
|
14
|
+
fontSize: typographyStyles.defaultSize.fontSize,
|
|
15
|
+
letterSpacing: typographyStyles.baseLetterSpacing.letterSpacing,
|
|
16
|
+
minHeight: tokens["space-largest"] + tokens["space-small"],
|
|
17
|
+
padding: 0,
|
|
18
|
+
},
|
|
19
|
+
inputEmpty: {
|
|
20
|
+
paddingTop: 0,
|
|
21
|
+
},
|
|
22
|
+
inputDisabled: {
|
|
23
|
+
color: typographyStyles.disabled.color,
|
|
24
|
+
},
|
|
25
|
+
container: {
|
|
26
|
+
paddingLeft: tokens["space-base"],
|
|
27
|
+
marginVertical: tokens["space-smaller"],
|
|
28
|
+
backgroundColor: tokens["color-surface"],
|
|
29
|
+
minHeight: tokens["space-largest"] + tokens["space-small"],
|
|
30
|
+
flexDirection: "row",
|
|
31
|
+
justifyContent: "space-between",
|
|
32
|
+
width: "100%",
|
|
33
|
+
borderColor: tokens["color-border"],
|
|
34
|
+
borderStyle: "solid",
|
|
35
|
+
borderWidth: tokens["border-base"],
|
|
36
|
+
borderRadius: tokens["radius-base"],
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
};
|
|
39
40
|
/**
|
|
40
41
|
* @deprecated Use useCommonInputStyles instead
|
|
41
42
|
*/
|
|
42
|
-
export const commonInputStyles = StyleSheet.create(
|
|
43
|
-
// eslint-disable-next-line import/no-deprecated
|
|
44
|
-
createCommonInputTokens(staticTokens, staticTypographyStyles));
|
|
43
|
+
export const commonInputStyles = StyleSheet.create(createCommonInputTokens(staticTokens));
|
|
45
44
|
export const getCommonInputStyles = (tokens) => {
|
|
46
|
-
|
|
47
|
-
return createCommonInputTokens(tokens, typographyStyles);
|
|
45
|
+
return createCommonInputTokens(tokens);
|
|
48
46
|
};
|
|
49
47
|
export const useCommonInputStyles = buildThemedStyles(tokens => {
|
|
50
48
|
return getCommonInputStyles(tokens);
|
|
@@ -1,17 +1,8 @@
|
|
|
1
|
-
import { Dimensions } from "react-native";
|
|
1
|
+
import { Dimensions, StyleSheet } from "react-native";
|
|
2
2
|
import { buildThemedStyles } from "../../../AtlantisThemeContext";
|
|
3
3
|
const { height } = Dimensions.get("window");
|
|
4
4
|
export const useStyles = buildThemedStyles(tokens => {
|
|
5
5
|
return {
|
|
6
|
-
overlay: {
|
|
7
|
-
position: "absolute",
|
|
8
|
-
top: 0,
|
|
9
|
-
left: 0,
|
|
10
|
-
right: 0,
|
|
11
|
-
bottom: 0,
|
|
12
|
-
backgroundColor: tokens["color-overlay"],
|
|
13
|
-
opacity: 0,
|
|
14
|
-
height,
|
|
15
|
-
},
|
|
6
|
+
overlay: Object.assign(Object.assign({}, StyleSheet.absoluteFillObject), { backgroundColor: tokens["color-overlay"], opacity: 0, height }),
|
|
16
7
|
};
|
|
17
8
|
});
|
|
@@ -14,14 +14,17 @@ export const useStyles = buildThemedStyles(tokens => {
|
|
|
14
14
|
borderWidth: 0,
|
|
15
15
|
},
|
|
16
16
|
]),
|
|
17
|
-
input:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
input: StyleSheet.flatten([
|
|
18
|
+
commonInputStyles.input,
|
|
19
|
+
{
|
|
20
|
+
flexDirection: "row",
|
|
21
|
+
flexGrow: 0,
|
|
22
|
+
paddingTop: tokens["space-smaller"],
|
|
23
|
+
minHeight: 0,
|
|
24
|
+
minWidth: "100%",
|
|
25
|
+
paddingRight: tokens["space-small"],
|
|
26
|
+
},
|
|
27
|
+
]),
|
|
25
28
|
value: {
|
|
26
29
|
flexGrow: 1,
|
|
27
30
|
flexShrink: 1,
|
|
@@ -14,7 +14,7 @@ const maxNumberOfLines = {
|
|
|
14
14
|
};
|
|
15
15
|
export const Typography = React.memo(InternalTypography);
|
|
16
16
|
// eslint-disable-next-line max-statements
|
|
17
|
-
function InternalTypography({ fontFamily, fontStyle, fontWeight, transform, color, align, size = "default", children, maxLines = "unlimited", allowFontScaling = true, maxFontScaleSize, adjustsFontSizeToFit = false, lineHeight, letterSpacing, reverseTheme = false, hideFromScreenReader = false, accessibilityRole = "text", strikeThrough = false, underline, UNSAFE_style, selectable = true, }) {
|
|
17
|
+
function InternalTypography({ fontFamily, fontStyle, fontWeight, transform, color, align, size = "default", children, maxLines = "unlimited", allowFontScaling = true, maxFontScaleSize, adjustsFontSizeToFit = false, lineHeight, letterSpacing = "base", reverseTheme = false, hideFromScreenReader = false, accessibilityRole = "text", strikeThrough = false, underline, UNSAFE_style, selectable = true, }) {
|
|
18
18
|
const styles = useTypographyStyles();
|
|
19
19
|
const sizeAndHeight = getSizeAndHeightStyle(size, styles, lineHeight);
|
|
20
20
|
const style = [
|
|
@@ -102,6 +102,6 @@ function getSizeAndHeightStyle(textSize, styles, lineHeightOverwrite) {
|
|
|
102
102
|
}
|
|
103
103
|
return fontSize;
|
|
104
104
|
}
|
|
105
|
-
function getLetterSpacingStyle(letterSpacing
|
|
105
|
+
function getLetterSpacingStyle(letterSpacing, styles) {
|
|
106
106
|
return styles[`${letterSpacing}LetterSpacing`];
|
|
107
107
|
}
|