@jobber/components-native 0.48.8 → 0.48.9

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,7 +24,7 @@ export declare const styles: {
24
24
  zIndex: number;
25
25
  borderTopLeftRadius: number;
26
26
  borderTopRightRadius: number;
27
- height: number;
27
+ minHeight: number;
28
28
  };
29
29
  headerShadow: {
30
30
  shadowColor: string;
@@ -45,17 +45,17 @@ export declare const styles: {
45
45
  hiddenContent: {
46
46
  opacity: number;
47
47
  };
48
- titleWithoutDimiss: {
48
+ titleWithoutDismiss: {
49
49
  flex: number;
50
50
  flexDirection: "row";
51
51
  justifyContent: "center";
52
52
  paddingTop: number;
53
+ paddingHorizontal: number;
53
54
  };
54
55
  titleWithDismiss: {
55
56
  flex: number;
56
57
  justifyContent: "center";
57
58
  paddingLeft: number;
58
59
  paddingRight: number;
59
- flexGrow: number;
60
60
  };
61
61
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components-native",
3
- "version": "0.48.8",
3
+ "version": "0.48.9",
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": "969b9462d2a1bc28cc4727434842fff06d2f5547"
87
+ "gitHead": "7f6c0fb7177ea6a47259b962efa9c59ab054feab"
88
88
  }
@@ -34,7 +34,7 @@ export const styles = StyleSheet.create({
34
34
  zIndex: tokens["elevation-base"],
35
35
  borderTopLeftRadius: modalBorderRadius,
36
36
  borderTopRightRadius: modalBorderRadius,
37
- height: tokens["space-extravagant"],
37
+ minHeight: tokens["space-extravagant"],
38
38
  },
39
39
 
40
40
  headerShadow: {
@@ -54,11 +54,12 @@ export const styles = StyleSheet.create({
54
54
  opacity: 0,
55
55
  },
56
56
 
57
- titleWithoutDimiss: {
57
+ titleWithoutDismiss: {
58
58
  flex: 1,
59
59
  flexDirection: "row",
60
60
  justifyContent: "center",
61
61
  paddingTop: tokens["space-base"],
62
+ paddingHorizontal: tokens["space-base"],
62
63
  },
63
64
 
64
65
  titleWithDismiss: {
@@ -66,6 +67,5 @@ export const styles = StyleSheet.create({
66
67
  justifyContent: "center",
67
68
  paddingLeft: tokens["space-base"],
68
69
  paddingRight: tokens["space-smaller"],
69
- flexGrow: 1,
70
70
  },
71
71
  });
@@ -85,6 +85,7 @@ function ContentOverlayInternal(
85
85
  if (!modalizeMethods?.open || !modalizeMethods?.close) {
86
86
  return {};
87
87
  }
88
+
88
89
  return {
89
90
  open: modalizeMethods?.open,
90
91
  close: modalizeMethods?.close,
@@ -110,9 +111,11 @@ function ContentOverlayInternal(
110
111
  return undefined;
111
112
  }
112
113
  const overlayHeight = headerHeight + childrenHeight;
114
+
113
115
  if (overlayHeight >= windowHeight) {
114
116
  return undefined;
115
117
  }
118
+
116
119
  return overlayHeight;
117
120
  }, [
118
121
  fullScreen,
@@ -136,9 +139,11 @@ function ContentOverlayInternal(
136
139
  const onCloseController = () => {
137
140
  if (!onBeforeExit) {
138
141
  internalRef.current?.close();
142
+
139
143
  return true;
140
144
  } else {
141
145
  onBeforeExit();
146
+
142
147
  return false;
143
148
  }
144
149
  };
@@ -169,6 +174,7 @@ function ContentOverlayInternal(
169
174
  onOpened={() => {
170
175
  if (overlayHeader.current) {
171
176
  const reactTag = findNodeHandle(overlayHeader.current);
177
+
172
178
  if (reactTag) {
173
179
  AccessibilityInfo.setAccessibilityFocus(reactTag);
174
180
  }
@@ -217,16 +223,20 @@ function ContentOverlayInternal(
217
223
  <View style={headerStyles}>
218
224
  <View
219
225
  style={
220
- showDismiss ? styles.titleWithDismiss : styles.titleWithoutDimiss
226
+ shouldShowDismiss
227
+ ? styles.titleWithDismiss
228
+ : styles.titleWithoutDismiss
221
229
  }
222
230
  >
223
231
  <Heading
224
232
  level="subtitle"
225
233
  variation={loading ? "subdued" : "heading"}
234
+ align={shouldShowDismiss ? "start" : "center"}
226
235
  >
227
236
  {title}
228
237
  </Heading>
229
238
  </View>
239
+
230
240
  {shouldShowDismiss && (
231
241
  <View
232
242
  style={styles.dismissButton}