@jobber/components-native 0.108.0 → 0.108.1
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/docs/InputTime/InputTime.md +8 -0
- package/dist/docs/ProgressBar/ProgressBar.md +9 -0
- package/dist/package.json +2 -2
- package/dist/src/ContentOverlay/ContentOverlay.js +8 -7
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/ContentOverlay/ContentOverlay.tsx +40 -29
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components-native",
|
|
3
|
-
"version": "0.108.
|
|
3
|
+
"version": "0.108.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "React Native implementation of Atlantis",
|
|
6
6
|
"repository": {
|
|
@@ -124,5 +124,5 @@
|
|
|
124
124
|
"react-native-screens": ">=4.18.0",
|
|
125
125
|
"react-native-svg": ">=12.0.0"
|
|
126
126
|
},
|
|
127
|
-
"gitHead": "
|
|
127
|
+
"gitHead": "7d8b08e91839f535411288b03a8603f2df310a8e"
|
|
128
128
|
}
|
|
@@ -36,7 +36,10 @@ import { useIsScreenReaderEnabled } from "../hooks";
|
|
|
36
36
|
import { IconButton } from "../IconButton";
|
|
37
37
|
import { Heading } from "../Heading";
|
|
38
38
|
import { useAtlantisI18n } from "../hooks/useAtlantisI18n";
|
|
39
|
-
import {
|
|
39
|
+
import {
|
|
40
|
+
AtlantisThemeContextProvider,
|
|
41
|
+
useAtlantisTheme,
|
|
42
|
+
} from "../AtlantisThemeContext";
|
|
40
43
|
|
|
41
44
|
/**
|
|
42
45
|
* Signals whether keyboard handling inside a ContentOverlay is delegated to
|
|
@@ -96,7 +99,7 @@ export function ContentOverlay({
|
|
|
96
99
|
|
|
97
100
|
const styles = useStyles();
|
|
98
101
|
const { t } = useAtlantisI18n();
|
|
99
|
-
const { tokens } = useAtlantisTheme();
|
|
102
|
+
const { theme, tokens } = useAtlantisTheme();
|
|
100
103
|
const isScreenReaderEnabled = useIsScreenReaderEnabled();
|
|
101
104
|
|
|
102
105
|
const behavior = computeContentOverlayBehavior(
|
|
@@ -318,34 +321,42 @@ export function ContentOverlay({
|
|
|
318
321
|
topInset={topInset}
|
|
319
322
|
onDismiss={() => onClose?.()}
|
|
320
323
|
>
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
<View
|
|
341
|
-
style={{ paddingBottom: insets.bottom }}
|
|
342
|
-
testID="ATL-Overlay-Children"
|
|
324
|
+
{/*
|
|
325
|
+
BottomSheetModal renders its children through a portal mounted outside
|
|
326
|
+
this component's subtree, so the AtlantisThemeContext is lost. Re-apply
|
|
327
|
+
the active theme here so descendants (e.g. the header title) resolve the
|
|
328
|
+
correct themed tokens.
|
|
329
|
+
*/}
|
|
330
|
+
<AtlantisThemeContextProvider dangerouslyOverrideTheme={theme}>
|
|
331
|
+
<ContentOverlayKeyboardContext.Provider value={scrollEnabled}>
|
|
332
|
+
{scrollEnabled ? (
|
|
333
|
+
<BottomSheetKeyboardAwareScrollView
|
|
334
|
+
ref={scrollViewRef}
|
|
335
|
+
contentContainerStyle={{ paddingBottom: insets.bottom }}
|
|
336
|
+
keyboardShouldPersistTaps={
|
|
337
|
+
keyboardShouldPersistTaps ? "handled" : "never"
|
|
338
|
+
}
|
|
339
|
+
showsVerticalScrollIndicator={false}
|
|
340
|
+
onScroll={handleOnScroll}
|
|
341
|
+
stickyHeaderIndices={[0]}
|
|
342
|
+
bottomOffset={KEYBOARD_TOP_PADDING_AUTO_SCROLL}
|
|
343
343
|
>
|
|
344
|
-
{
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
344
|
+
{renderHeader()}
|
|
345
|
+
<View testID="ATL-Overlay-Children">{children}</View>
|
|
346
|
+
</BottomSheetKeyboardAwareScrollView>
|
|
347
|
+
) : (
|
|
348
|
+
<BottomSheetView>
|
|
349
|
+
{renderHeader()}
|
|
350
|
+
<View
|
|
351
|
+
style={{ paddingBottom: insets.bottom }}
|
|
352
|
+
testID="ATL-Overlay-Children"
|
|
353
|
+
>
|
|
354
|
+
{children}
|
|
355
|
+
</View>
|
|
356
|
+
</BottomSheetView>
|
|
357
|
+
)}
|
|
358
|
+
</ContentOverlayKeyboardContext.Provider>
|
|
359
|
+
</AtlantisThemeContextProvider>
|
|
349
360
|
</BottomSheetModal>
|
|
350
361
|
);
|
|
351
362
|
}
|