@jobber/components-native 0.101.1 → 0.101.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components-native",
3
- "version": "0.101.1",
3
+ "version": "0.101.3",
4
4
  "license": "MIT",
5
5
  "description": "React Native implementation of Atlantis",
6
6
  "repository": {
@@ -96,5 +96,5 @@
96
96
  "react-native-screens": ">=4.18.0",
97
97
  "react-native-svg": ">=12.0.0"
98
98
  },
99
- "gitHead": "de49e06759960e32eef9209c8236dca1f12115eb"
99
+ "gitHead": "1f03d859cb80ae90c91107efbd8a057a30a7f720"
100
100
  }
@@ -272,6 +272,19 @@ export function ContentOverlay({
272
272
  ) : null;
273
273
  };
274
274
 
275
+ const backdropComponent = useMemo(
276
+ () =>
277
+ function ContentOverlayBackdrop(props: BottomSheetBackdropProps) {
278
+ return (
279
+ <Backdrop
280
+ {...props}
281
+ pressBehavior={isCloseableOnOverlayTap ? "close" : "none"}
282
+ />
283
+ );
284
+ },
285
+ [isCloseableOnOverlayTap],
286
+ );
287
+
275
288
  return (
276
289
  <BottomSheetModal
277
290
  ref={bottomSheetModalRef}
@@ -281,12 +294,7 @@ export function ContentOverlay({
281
294
  backgroundStyle={backgroundStyle}
282
295
  handleStyle={styles.handleWrapper}
283
296
  handleIndicatorStyle={handleIndicatorStyles}
284
- backdropComponent={props => (
285
- <Backdrop
286
- {...props}
287
- pressBehavior={isCloseableOnOverlayTap ? "close" : "none"}
288
- />
289
- )}
297
+ backdropComponent={backdropComponent}
290
298
  snapPoints={snapPoints}
291
299
  enablePanDownToClose={effectiveIsDraggable}
292
300
  enableContentPanningGesture={effectiveIsDraggable}
@@ -331,7 +339,7 @@ export function ContentOverlay({
331
339
 
332
340
  function Backdrop(
333
341
  bottomSheetBackdropProps: BottomSheetBackdropProps & {
334
- pressBehavior: "none" | "close";
342
+ readonly pressBehavior: "none" | "close";
335
343
  },
336
344
  ) {
337
345
  const styles = useStyles();
@@ -342,7 +350,7 @@ function Backdrop(
342
350
  {...props}
343
351
  appearsOnIndex={0}
344
352
  disappearsOnIndex={-1}
345
- style={styles.backdrop}
353
+ style={[props.style, styles.backdrop]}
346
354
  opacity={1}
347
355
  pressBehavior={pressBehavior}
348
356
  />
@@ -149,7 +149,7 @@ exports[`when Heading called with sub-heading variation and text-color should ma
149
149
  "fontFamily": "inter-semibold",
150
150
  },
151
151
  {
152
- "color": "hsl(197, 15%, 43%)",
152
+ "color": "hsl(197, 21%, 36%)",
153
153
  },
154
154
  {
155
155
  "textAlign": "left",
@@ -263,7 +263,6 @@ describe("Form controlled", () => {
263
263
  expect(clearAction).toBeDefined();
264
264
 
265
265
  fireEvent.press(clearAction);
266
- screen.debug();
267
266
  await waitFor(() => {
268
267
  expect(
269
268
  screen.getByText(requiredError, { includeHiddenElements: true }),
@@ -34,7 +34,7 @@ exports[`StatusLabel alignment when alignment prop set to "end" should match sna
34
34
  "fontFamily": "inter-medium",
35
35
  },
36
36
  {
37
- "color": "hsl(197, 15%, 43%)",
37
+ "color": "hsl(197, 21%, 36%)",
38
38
  },
39
39
  {
40
40
  "textAlign": "right",
@@ -113,7 +113,7 @@ exports[`StatusLabel alignment when alignment prop set to default ("start") shou
113
113
  "fontFamily": "inter-medium",
114
114
  },
115
115
  {
116
- "color": "hsl(197, 15%, 43%)",
116
+ "color": "hsl(197, 21%, 36%)",
117
117
  },
118
118
  {
119
119
  "textAlign": "right",
@@ -192,7 +192,7 @@ exports[`StatusLabel status when status prop set to "critical" should match snap
192
192
  "fontFamily": "inter-medium",
193
193
  },
194
194
  {
195
- "color": "hsl(197, 15%, 43%)",
195
+ "color": "hsl(197, 21%, 36%)",
196
196
  },
197
197
  {
198
198
  "textAlign": "right",
@@ -271,7 +271,7 @@ exports[`StatusLabel status when status prop set to "inactive" should match snap
271
271
  "fontFamily": "inter-medium",
272
272
  },
273
273
  {
274
- "color": "hsl(197, 15%, 43%)",
274
+ "color": "hsl(197, 21%, 36%)",
275
275
  },
276
276
  {
277
277
  "textAlign": "right",
@@ -307,7 +307,7 @@ exports[`StatusLabel status when status prop set to "inactive" should match snap
307
307
  "width": 12,
308
308
  },
309
309
  {
310
- "backgroundColor": "hsl(198, 25%, 33%)",
310
+ "backgroundColor": "hsl(197, 21%, 36%)",
311
311
  },
312
312
  ]
313
313
  }
@@ -350,7 +350,7 @@ exports[`StatusLabel status when status prop set to "informative" should match s
350
350
  "fontFamily": "inter-medium",
351
351
  },
352
352
  {
353
- "color": "hsl(197, 15%, 43%)",
353
+ "color": "hsl(197, 21%, 36%)",
354
354
  },
355
355
  {
356
356
  "textAlign": "right",
@@ -429,7 +429,7 @@ exports[`StatusLabel status when status prop set to "warning" should match snaps
429
429
  "fontFamily": "inter-medium",
430
430
  },
431
431
  {
432
- "color": "hsl(197, 15%, 43%)",
432
+ "color": "hsl(197, 21%, 36%)",
433
433
  },
434
434
  {
435
435
  "textAlign": "right",
@@ -508,7 +508,7 @@ exports[`StatusLabel status when status prop set to default ("success") should m
508
508
  "fontFamily": "inter-medium",
509
509
  },
510
510
  {
511
- "color": "hsl(197, 15%, 43%)",
511
+ "color": "hsl(197, 21%, 36%)",
512
512
  },
513
513
  {
514
514
  "textAlign": "right",
@@ -459,7 +459,7 @@ exports[`renders text with subdued variation 1`] = `
459
459
  "fontFamily": "inter-regular",
460
460
  },
461
461
  {
462
- "color": "hsl(197, 15%, 43%)",
462
+ "color": "hsl(197, 21%, 36%)",
463
463
  },
464
464
  {
465
465
  "textAlign": "left",
@@ -577,7 +577,7 @@ exports[`renders text with underline styling 1`] = `
577
577
  "textDecorationStyle": "dotted",
578
578
  },
579
579
  {
580
- "textDecorationColor": "hsl(197, 15%, 43%)",
580
+ "textDecorationColor": "hsl(197, 21%, 36%)",
581
581
  "textDecorationLine": "underline",
582
582
  },
583
583
  ]
@@ -278,7 +278,7 @@ exports[`renders a thumbnail component with attachments 1`] = `
278
278
  "fontFamily": "inter-semibold",
279
279
  },
280
280
  {
281
- "color": "hsl(197, 15%, 43%)",
281
+ "color": "hsl(197, 21%, 36%)",
282
282
  },
283
283
  {
284
284
  "textAlign": "left",
@@ -1154,7 +1154,7 @@ exports[`underline renders text with dashed underline 1`] = `
1154
1154
  "textDecorationStyle": "dashed",
1155
1155
  },
1156
1156
  {
1157
- "textDecorationColor": "hsl(197, 15%, 43%)",
1157
+ "textDecorationColor": "hsl(197, 21%, 36%)",
1158
1158
  "textDecorationLine": "underline",
1159
1159
  },
1160
1160
  ]
@@ -1194,7 +1194,7 @@ exports[`underline renders text with dotted underline 1`] = `
1194
1194
  "textDecorationStyle": "dotted",
1195
1195
  },
1196
1196
  {
1197
- "textDecorationColor": "hsl(197, 15%, 43%)",
1197
+ "textDecorationColor": "hsl(197, 21%, 36%)",
1198
1198
  "textDecorationLine": "underline",
1199
1199
  },
1200
1200
  ]
@@ -1234,7 +1234,7 @@ exports[`underline renders text with double underline 1`] = `
1234
1234
  "textDecorationStyle": "double",
1235
1235
  },
1236
1236
  {
1237
- "textDecorationColor": "hsl(197, 15%, 43%)",
1237
+ "textDecorationColor": "hsl(197, 21%, 36%)",
1238
1238
  "textDecorationLine": "underline",
1239
1239
  },
1240
1240
  ]
@@ -1274,7 +1274,7 @@ exports[`underline renders text with solid underline 1`] = `
1274
1274
  "textDecorationStyle": "solid",
1275
1275
  },
1276
1276
  {
1277
- "textDecorationColor": "hsl(197, 15%, 43%)",
1277
+ "textDecorationColor": "hsl(197, 21%, 36%)",
1278
1278
  "textDecorationLine": "underline",
1279
1279
  },
1280
1280
  ]