@jobber/components-native 0.91.4 → 0.93.0
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 +7 -7
- package/dist/src/Chip/Chip.js +12 -1
- package/dist/src/Chip/Chip.style.js +1 -1
- package/dist/src/Content/ContentHorizontal.style.js +15 -0
- package/dist/src/Content/ContentSpaceAround.style.js +15 -0
- package/dist/src/Content/ContentVertical.style.js +15 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/src/Content/Content.d.ts +1 -1
- package/dist/types/src/Content/ContentHorizontal.style.d.ts +15 -0
- package/dist/types/src/Content/ContentSpaceAround.style.d.ts +15 -0
- package/dist/types/src/Content/ContentVertical.style.d.ts +15 -0
- package/package.json +7 -7
- package/src/Chip/Chip.style.ts +1 -1
- package/src/Chip/Chip.tsx +19 -1
- package/src/Content/Content.tsx +6 -1
- package/src/Content/ContentHorizontal.style.ts +20 -0
- package/src/Content/ContentSpaceAround.style.ts +20 -0
- package/src/Content/ContentVertical.style.ts +20 -0
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.93.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "React Native implementation of Atlantis",
|
|
6
6
|
"repository": {
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@react-native-community/datetimepicker": "^8.4.5",
|
|
57
|
-
"@react-native/babel-preset": "^0.
|
|
57
|
+
"@react-native/babel-preset": "^0.82.1",
|
|
58
58
|
"@storybook/addon-a11y": "^9.1.2",
|
|
59
59
|
"@storybook/react": "^9.1.2",
|
|
60
60
|
"@storybook/react-native-web-vite": "^9.1.2",
|
|
@@ -66,14 +66,14 @@
|
|
|
66
66
|
"@types/react-test-renderer": "19.1.0",
|
|
67
67
|
"date-fns": "^2.30.0",
|
|
68
68
|
"date-fns-tz": "^2.0.0",
|
|
69
|
-
"react-native": "^0.
|
|
70
|
-
"react-native-gesture-handler": "^2.
|
|
69
|
+
"react-native": "^0.82.1",
|
|
70
|
+
"react-native-gesture-handler": "^2.29.1",
|
|
71
71
|
"react-native-modal-datetime-picker": "^18.0.0",
|
|
72
72
|
"react-native-reanimated": "^3.7.1",
|
|
73
73
|
"react-native-safe-area-context": "^5.4.0",
|
|
74
74
|
"react-native-svg": "^15.1.0",
|
|
75
75
|
"react-native-web": "^0.20.0",
|
|
76
|
-
"react-test-renderer": "19.1.
|
|
76
|
+
"react-test-renderer": "^19.1.1",
|
|
77
77
|
"storybook": "^9.1.2"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"@react-native-community/datetimepicker": ">=6.7.0",
|
|
83
83
|
"date-fns": "^2.30.0",
|
|
84
84
|
"date-fns-tz": "^2.0.0",
|
|
85
|
-
"react": "^
|
|
85
|
+
"react": "^19",
|
|
86
86
|
"react-intl": "^6 || ^7",
|
|
87
87
|
"react-native": ">=0.79.5",
|
|
88
88
|
"react-native-gesture-handler": ">=2.22.0",
|
|
@@ -94,5 +94,5 @@
|
|
|
94
94
|
"react-native-safe-area-context": "^5.4.0",
|
|
95
95
|
"react-native-svg": ">=12.0.0"
|
|
96
96
|
},
|
|
97
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "a84b7d122f13b650fd7f77cda794d71f1d25317b"
|
|
98
98
|
}
|
package/dist/src/Chip/Chip.js
CHANGED
|
@@ -19,6 +19,7 @@ export function Chip({ icon, label, onPress, isDismissible, isActive, inactiveBa
|
|
|
19
19
|
: tokens["color-interactive--background"],
|
|
20
20
|
},
|
|
21
21
|
isActive && { backgroundColor: accentColor },
|
|
22
|
+
getBorderStyle(inactiveBackgroundColor, tokens),
|
|
22
23
|
];
|
|
23
24
|
const dismiss = (isActive || inactiveBackgroundColor === "surface") &&
|
|
24
25
|
styles.activeDismissIcon;
|
|
@@ -27,7 +28,7 @@ export function Chip({ icon, label, onPress, isDismissible, isActive, inactiveBa
|
|
|
27
28
|
iconCustomColor: iconColor,
|
|
28
29
|
dismissColor: dismiss,
|
|
29
30
|
};
|
|
30
|
-
}, [accent, isActive, inactiveBackgroundColor]);
|
|
31
|
+
}, [accent, isActive, inactiveBackgroundColor, getBorderStyle, styles]);
|
|
31
32
|
const accessibilityState = useMemo(() => {
|
|
32
33
|
const checkableRoles = ["radio", "switch", "togglebutton", "checkbox"];
|
|
33
34
|
if (checkableRoles.includes(accessibilityRole)) {
|
|
@@ -43,3 +44,13 @@ export function Chip({ icon, label, onPress, isDismissible, isActive, inactiveBa
|
|
|
43
44
|
isDismissible && (React.createElement(View, { style: [styles.dismissIcon, dismissColor] },
|
|
44
45
|
React.createElement(Icon, { name: "remove", size: "small" })))));
|
|
45
46
|
}
|
|
47
|
+
function getBorderStyle(inactiveBackgroundColor, tokens) {
|
|
48
|
+
let borderColor = "transparent";
|
|
49
|
+
if (inactiveBackgroundColor === "surface") {
|
|
50
|
+
borderColor = tokens["color-border"];
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
borderColor,
|
|
54
|
+
borderWidth: tokens["border-base"],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
@@ -10,7 +10,7 @@ export const useStyles = buildThemedStyles(tokens => {
|
|
|
10
10
|
justifyContent: "center",
|
|
11
11
|
marginHorizontal: tokens["space-smaller"],
|
|
12
12
|
marginTop: tokens["space-small"],
|
|
13
|
-
paddingHorizontal: tokens["space-
|
|
13
|
+
paddingHorizontal: tokens["space-base"],
|
|
14
14
|
},
|
|
15
15
|
iconLeft: {
|
|
16
16
|
marginHorizontal: tokens["space-smallest"],
|
|
@@ -12,6 +12,9 @@ export const useHorizontalStyles = buildThemedStyles(tokens => {
|
|
|
12
12
|
noneChildSpace: {
|
|
13
13
|
padding: 0,
|
|
14
14
|
},
|
|
15
|
+
minusculeChildSpace: {
|
|
16
|
+
paddingLeft: tokens["space-minuscule"],
|
|
17
|
+
},
|
|
15
18
|
smallestChildSpace: {
|
|
16
19
|
paddingLeft: tokens["space-smallest"],
|
|
17
20
|
},
|
|
@@ -21,11 +24,23 @@ export const useHorizontalStyles = buildThemedStyles(tokens => {
|
|
|
21
24
|
smallChildSpace: {
|
|
22
25
|
paddingLeft: tokens["space-small"],
|
|
23
26
|
},
|
|
27
|
+
slimChildSpace: {
|
|
28
|
+
paddingLeft: tokens["space-slim"],
|
|
29
|
+
},
|
|
24
30
|
baseChildSpace: {
|
|
25
31
|
paddingLeft: tokens["space-base"],
|
|
26
32
|
},
|
|
27
33
|
largeChildSpace: {
|
|
28
34
|
paddingLeft: tokens["space-large"],
|
|
29
35
|
},
|
|
36
|
+
largerChildSpace: {
|
|
37
|
+
paddingLeft: tokens["space-larger"],
|
|
38
|
+
},
|
|
39
|
+
largestChildSpace: {
|
|
40
|
+
paddingLeft: tokens["space-largest"],
|
|
41
|
+
},
|
|
42
|
+
extravagantChildSpace: {
|
|
43
|
+
paddingLeft: tokens["space-extravagant"],
|
|
44
|
+
},
|
|
30
45
|
};
|
|
31
46
|
});
|
|
@@ -4,6 +4,9 @@ export const useSpaceAroundStyles = buildThemedStyles(tokens => {
|
|
|
4
4
|
noneSpace: {
|
|
5
5
|
padding: 0,
|
|
6
6
|
},
|
|
7
|
+
minusculeSpace: {
|
|
8
|
+
padding: tokens["space-minuscule"],
|
|
9
|
+
},
|
|
7
10
|
smallestSpace: {
|
|
8
11
|
padding: tokens["space-smallest"],
|
|
9
12
|
},
|
|
@@ -13,11 +16,23 @@ export const useSpaceAroundStyles = buildThemedStyles(tokens => {
|
|
|
13
16
|
smallSpace: {
|
|
14
17
|
padding: tokens["space-small"],
|
|
15
18
|
},
|
|
19
|
+
slimSpace: {
|
|
20
|
+
padding: tokens["space-slim"],
|
|
21
|
+
},
|
|
16
22
|
baseSpace: {
|
|
17
23
|
padding: tokens["space-base"],
|
|
18
24
|
},
|
|
19
25
|
largeSpace: {
|
|
20
26
|
padding: tokens["space-large"],
|
|
21
27
|
},
|
|
28
|
+
largerSpace: {
|
|
29
|
+
padding: tokens["space-larger"],
|
|
30
|
+
},
|
|
31
|
+
largestSpace: {
|
|
32
|
+
padding: tokens["space-largest"],
|
|
33
|
+
},
|
|
34
|
+
extravagantSpace: {
|
|
35
|
+
padding: tokens["space-extravagant"],
|
|
36
|
+
},
|
|
22
37
|
};
|
|
23
38
|
});
|
|
@@ -12,6 +12,9 @@ export const useVerticalStyles = buildThemedStyles(tokens => {
|
|
|
12
12
|
noneChildSpace: {
|
|
13
13
|
padding: 0,
|
|
14
14
|
},
|
|
15
|
+
minusculeChildSpace: {
|
|
16
|
+
paddingTop: tokens["space-minuscule"],
|
|
17
|
+
},
|
|
15
18
|
smallestChildSpace: {
|
|
16
19
|
paddingTop: tokens["space-smallest"],
|
|
17
20
|
},
|
|
@@ -21,11 +24,23 @@ export const useVerticalStyles = buildThemedStyles(tokens => {
|
|
|
21
24
|
smallChildSpace: {
|
|
22
25
|
paddingTop: tokens["space-small"],
|
|
23
26
|
},
|
|
27
|
+
slimChildSpace: {
|
|
28
|
+
paddingTop: tokens["space-slim"],
|
|
29
|
+
},
|
|
24
30
|
baseChildSpace: {
|
|
25
31
|
paddingTop: tokens["space-base"],
|
|
26
32
|
},
|
|
27
33
|
largeChildSpace: {
|
|
28
34
|
paddingTop: tokens["space-large"],
|
|
29
35
|
},
|
|
36
|
+
largerChildSpace: {
|
|
37
|
+
paddingTop: tokens["space-larger"],
|
|
38
|
+
},
|
|
39
|
+
largestChildSpace: {
|
|
40
|
+
paddingTop: tokens["space-largest"],
|
|
41
|
+
},
|
|
42
|
+
extravagantChildSpace: {
|
|
43
|
+
paddingTop: tokens["space-extravagant"],
|
|
44
|
+
},
|
|
30
45
|
};
|
|
31
46
|
});
|