@jobber/components-native 0.48.8-add-paddin.3 → 0.48.8
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/ContentOverlay/ContentOverlay.js +1 -1
- package/dist/src/ContentOverlay/ContentOverlay.style.js +2 -3
- package/dist/src/InputText/InputText.js +4 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/src/ContentOverlay/ContentOverlay.style.d.ts +2 -3
- package/dist/types/src/InputText/InputText.d.ts +1 -1
- package/package.json +2 -2
- package/src/ContentOverlay/ContentOverlay.style.ts +2 -3
- package/src/ContentOverlay/ContentOverlay.tsx +1 -7
- package/src/InputCurrency/InputCurrency.test.tsx +0 -6
- package/src/InputText/InputText.test.tsx +37 -13
- package/src/InputText/InputText.tsx +8 -1
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components-native",
|
|
3
|
-
"version": "0.48.8
|
|
3
|
+
"version": "0.48.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "React Native implementation of Atlantis",
|
|
6
6
|
"repository": {
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"react-native-reanimated": "^2.17.0",
|
|
85
85
|
"react-native-safe-area-context": "^4.5.2"
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "969b9462d2a1bc28cc4727434842fff06d2f5547"
|
|
88
88
|
}
|
|
@@ -115,7 +115,7 @@ function ContentOverlayInternal({ children, title, accessibilityLabel, fullScree
|
|
|
115
115
|
];
|
|
116
116
|
return (React.createElement(View, { onLayout: handleHeaderLayout, testID: "ATL-Overlay-Header" },
|
|
117
117
|
React.createElement(View, { style: headerStyles },
|
|
118
|
-
React.createElement(View, { style: showDismiss ? styles.titleWithDismiss : styles.
|
|
118
|
+
React.createElement(View, { style: showDismiss ? styles.titleWithDismiss : styles.titleWithoutDimiss },
|
|
119
119
|
React.createElement(Heading, { level: "subtitle", variation: loading ? "subdued" : "heading" }, title)),
|
|
120
120
|
shouldShowDismiss && (React.createElement(View, { style: styles.dismissButton,
|
|
121
121
|
// @ts-expect-error tsc-ci
|
|
@@ -28,7 +28,7 @@ export const styles = StyleSheet.create({
|
|
|
28
28
|
zIndex: tokens["elevation-base"],
|
|
29
29
|
borderTopLeftRadius: modalBorderRadius,
|
|
30
30
|
borderTopRightRadius: modalBorderRadius,
|
|
31
|
-
|
|
31
|
+
height: tokens["space-extravagant"],
|
|
32
32
|
},
|
|
33
33
|
headerShadow: Object.assign({}, tokens["shadow-base"]),
|
|
34
34
|
childrenStyle: {
|
|
@@ -41,12 +41,11 @@ export const styles = StyleSheet.create({
|
|
|
41
41
|
hiddenContent: {
|
|
42
42
|
opacity: 0,
|
|
43
43
|
},
|
|
44
|
-
|
|
44
|
+
titleWithoutDimiss: {
|
|
45
45
|
flex: 1,
|
|
46
46
|
flexDirection: "row",
|
|
47
47
|
justifyContent: "center",
|
|
48
48
|
paddingTop: tokens["space-base"],
|
|
49
|
-
paddingHorizontal: tokens["space-base"],
|
|
50
49
|
},
|
|
51
50
|
titleWithDismiss: {
|
|
52
51
|
flex: 1,
|
|
@@ -124,6 +124,10 @@ function trimWhitespace(field, onChangeText) {
|
|
|
124
124
|
return;
|
|
125
125
|
}
|
|
126
126
|
const trimmedInput = field.value.trim();
|
|
127
|
+
if (trimmedInput === field.value) {
|
|
128
|
+
// avoid re-renders when nothing changed
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
127
131
|
onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(trimmedInput);
|
|
128
132
|
field.onChange(trimmedInput);
|
|
129
133
|
}
|