@momo-kits/foundation 0.168.1-beta.39 → 0.168.1-beta.40
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/Application/BottomSheet.tsx +398 -86
- package/Application/BottomTab/BottomTabBar.tsx +275 -215
- package/Application/BottomTab/CustomBottomTabItem.tsx +107 -131
- package/Application/BottomTab/DuoBarCompression.tsx +28 -14
- package/Application/BottomTab/DuoTabBar.tsx +540 -32
- package/Application/BottomTab/TabBarIcon.tsx +72 -146
- package/Application/BottomTab/index.tsx +353 -89
- package/Application/BottomTab/useLiquidSelection.ts +374 -0
- package/Application/Components/BackgroundImageView.tsx +0 -4
- package/Application/Components/DuoGlassBackground.tsx +5 -7
- package/Application/Components/HeaderAnimated.tsx +13 -41
- package/Application/Components/HeaderBackground.tsx +3 -20
- package/Application/Components/HeaderExtendHeader.tsx +46 -66
- package/Application/Components/HeaderLeft.tsx +18 -5
- package/Application/Components/HeaderRight.tsx +529 -8
- package/Application/Components/HeaderTitle.tsx +579 -16
- package/Application/Components/NavigationButton.tsx +11 -18
- package/Application/Components/SearchHeader.tsx +18 -38
- package/Application/Localize.ts +0 -7
- package/Application/ModalScreen.tsx +18 -41
- package/Application/Navigation.ts +17 -15
- package/Application/NavigationContainer.tsx +21 -23
- package/Application/Navigator.ts +48 -20
- package/Application/ScaleSizeProvider.tsx +6 -13
- package/Application/StackScreen.tsx +172 -27
- package/Application/TooltipPortal.tsx +5 -12
- package/Application/WidgetContainer.tsx +7 -20
- package/Application/device.ts +52 -0
- package/Application/index.ts +1 -23
- package/Application/types.ts +242 -17
- package/Application/utils.tsx +493 -0
- package/Badge/Badge.tsx +0 -5
- package/Badge/BadgeDot.tsx +0 -1
- package/Badge/BadgeDotAnimation.tsx +7 -15
- package/Badge/BadgeRibbon.tsx +39 -47
- package/Badge/Shape.tsx +0 -2
- package/Badge/styles.ts +0 -2
- package/Badge/types.ts +2 -2
- package/Button/index.tsx +152 -21
- package/Button/styles.ts +1 -1
- package/CheckBox/index.tsx +6 -5
- package/Consts/theme.ts +10 -10
- package/Context/index.ts +1 -5
- package/Divider/DashDivider.tsx +11 -11
- package/Divider/index.tsx +7 -21
- package/FoundationList/index.tsx +0 -4
- package/Icon/index.tsx +6 -6
- package/Icon/types.ts +1 -1
- package/IconButton/index.tsx +12 -4
- package/Image/index.tsx +7 -9
- package/Input/Input.tsx +12 -10
- package/Input/InputDropDown.tsx +13 -10
- package/Input/InputMoney.tsx +152 -45
- package/Input/InputOTP.tsx +34 -36
- package/Input/InputPhoneNumber.tsx +5 -8
- package/Input/InputSearch.tsx +111 -19
- package/Input/InputTextArea.tsx +5 -5
- package/Input/SystemTextInput.tsx +2 -7
- package/Input/TextTyping.tsx +0 -4
- package/Input/common.tsx +17 -31
- package/Input/index.tsx +21 -24
- package/Input/styles.ts +5 -25
- package/Input/utils.ts +12 -14
- package/Layout/Card.tsx +4 -7
- package/Layout/FloatingButton.tsx +21 -26
- package/Layout/Item.tsx +2 -6
- package/Layout/ItemList.tsx +7 -9
- package/Layout/ItemSectionList.tsx +1 -2
- package/Layout/ReservedRegions.tsx +17 -34
- package/Layout/Screen.tsx +696 -122
- package/Layout/Section.tsx +7 -9
- package/Layout/TrackingScope.tsx +0 -1
- package/Layout/index.ts +4 -10
- package/Layout/styles.ts +0 -2
- package/Layout/types.ts +4 -2
- package/Layout/utils.ts +181 -40
- package/Loader/DotLoader.tsx +3 -11
- package/Loader/Loader.tsx +0 -4
- package/Loader/ProgressBar.tsx +6 -3
- package/Loader/Spinner.tsx +3 -11
- package/Loader/styles.ts +0 -4
- package/Loader/utils.ts +7 -11
- package/Pagination/Dot.tsx +0 -4
- package/Pagination/PaginationDot.tsx +0 -1
- package/Pagination/PaginationNumber.tsx +3 -5
- package/Pagination/PaginationScroll.tsx +0 -5
- package/Pagination/PaginationWhiteDot.tsx +0 -1
- package/Pagination/index.tsx +0 -4
- package/Pagination/types.ts +2 -2
- package/Popup/PopupNotify.tsx +102 -94
- package/Popup/PopupPromotion.tsx +11 -9
- package/Popup/types.ts +4 -11
- package/Popup/utils.ts +18 -50
- package/Radio/index.tsx +10 -6
- package/Radio/styles.ts +0 -6
- package/Skeleton/index.tsx +9 -9
- package/Skeleton/styles.ts +0 -1
- package/Switch/index.tsx +0 -1
- package/Tag/index.tsx +4 -8
- package/Tag/types.ts +3 -3
- package/Text/index.tsx +5 -25
- package/Text/styles.ts +1 -1
- package/Text/types.ts +6 -1
- package/Text/utils.ts +4 -20
- package/Title/index.tsx +40 -42
- package/Title/styles.ts +0 -6
- package/ViewBoundary/index.tsx +2 -4
- package/index.ts +6 -0
- package/package.json +1 -2
- package/Application/BottomSheet.hooks.ts +0 -195
- package/Application/BottomSheet.parts.tsx +0 -157
- package/Application/BottomSheet.styles.ts +0 -43
- package/Application/BottomTab/ActiveIndicator.tsx +0 -91
- package/Application/BottomTab/BottomTabBar.styles.ts +0 -65
- package/Application/BottomTab/BottomTabInset.tsx +0 -18
- package/Application/BottomTab/CurvedContainer.tsx +0 -155
- package/Application/BottomTab/DuoRailTabBar.tsx +0 -223
- package/Application/BottomTab/DuoTabBar.styles.ts +0 -81
- package/Application/BottomTab/TabScreen.tsx +0 -160
- package/Application/BottomTab/metrics.ts +0 -164
- package/Application/BottomTab/tabItems.ts +0 -46
- package/Application/BottomTab/usePressLift.ts +0 -32
- package/Application/Components/HeaderRight.styles.ts +0 -146
- package/Application/Components/HeaderTitle.shared.ts +0 -44
- package/Application/Components/HeaderTitle.styles.ts +0 -125
- package/Application/Components/HeaderToolkitAction.tsx +0 -180
- package/Application/Components/SwipeBackHaptic.tsx +0 -95
- package/Application/Components/TitleJourney.tsx +0 -110
- package/Application/Components/TitleLocation.tsx +0 -73
- package/Application/Components/TitleUser.tsx +0 -304
- package/Application/Components/useToolkitActions.tsx +0 -218
- package/Application/ModalIconButton.tsx +0 -66
- package/Application/StackScreen.tracking.ts +0 -143
- package/Application/headerLayout.ts +0 -158
- package/Application/hooks.ts +0 -137
- package/Application/modalLayout.ts +0 -176
- package/Application/navigationOptions.tsx +0 -212
- package/Application/types.header.ts +0 -121
- package/Application/types.tabs.ts +0 -48
- package/Application/types.theme.ts +0 -87
- package/Application/utils.ts +0 -107
- package/Button/utils.ts +0 -133
- package/Input/InputMoneyView.tsx +0 -194
- package/Input/SearchTextTyping.tsx +0 -108
- package/Input/moneyUtils.ts +0 -23
- package/Layout/layoutMetrics.ts +0 -58
- package/Layout/layoutTypes.ts +0 -86
- package/Layout/screenContent.tsx +0 -92
- package/Layout/screenFooter.tsx +0 -63
- package/Layout/screenHeader.tsx +0 -321
- package/Layout/screenQuickReturn.tsx +0 -64
- package/Layout/screenScroll.ts +0 -107
- package/Layout/screenTypes.ts +0 -143
package/Layout/Screen.tsx
CHANGED
|
@@ -1,46 +1,192 @@
|
|
|
1
|
+
import { StackNavigationOptions } from '@react-navigation/stack';
|
|
1
2
|
import { useHeaderHeight } from '@react-navigation/elements';
|
|
2
3
|
import React, {
|
|
3
4
|
forwardRef,
|
|
5
|
+
Fragment,
|
|
6
|
+
ReactNode,
|
|
7
|
+
Ref,
|
|
8
|
+
useCallback,
|
|
4
9
|
useContext,
|
|
5
10
|
useEffect,
|
|
6
11
|
useImperativeHandle,
|
|
7
|
-
|
|
12
|
+
useMemo,
|
|
8
13
|
useRef,
|
|
9
14
|
} from 'react';
|
|
10
15
|
import {
|
|
11
16
|
Animated,
|
|
12
17
|
KeyboardAvoidingView,
|
|
18
|
+
NativeScrollEvent,
|
|
19
|
+
NativeSyntheticEvent,
|
|
13
20
|
Platform,
|
|
14
21
|
ScrollView,
|
|
22
|
+
ScrollViewProps,
|
|
23
|
+
StatusBar,
|
|
24
|
+
StatusBarStyle,
|
|
15
25
|
View,
|
|
26
|
+
ViewProps,
|
|
16
27
|
} from 'react-native';
|
|
17
|
-
import {
|
|
28
|
+
import {
|
|
29
|
+
useAnimatedReaction,
|
|
30
|
+
useSharedValue,
|
|
31
|
+
withTiming,
|
|
32
|
+
} from 'react-native-reanimated';
|
|
18
33
|
import {
|
|
19
34
|
useSafeAreaFrame,
|
|
20
35
|
useSafeAreaInsets,
|
|
21
36
|
} from 'react-native-safe-area-context';
|
|
22
37
|
import { ApplicationContext, ScreenContext } from '../Context';
|
|
23
|
-
import
|
|
24
|
-
import {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
import Navigation from '../Application/Navigation';
|
|
39
|
+
import {
|
|
40
|
+
AnimatedHeader,
|
|
41
|
+
NavigationOptions,
|
|
42
|
+
ScreenTrackingParams,
|
|
43
|
+
SearchHeaderProps,
|
|
44
|
+
} from '../Application/types';
|
|
45
|
+
import { Colors, Spacing, Styles } from '../Consts';
|
|
46
|
+
import { FloatingButton, FloatingButtonProps } from './FloatingButton';
|
|
47
|
+
import styles from './styles';
|
|
48
|
+
import { HeaderType } from './types';
|
|
49
|
+
import { InputRef } from '../Input';
|
|
50
|
+
import { exportHeaderTitle, getOptions } from '../Application/utils';
|
|
51
|
+
import { getHeaderMargin, useScreenLayout, validateChildren } from './utils';
|
|
52
|
+
import Section from './Section';
|
|
53
|
+
import {
|
|
54
|
+
HeaderBackground,
|
|
55
|
+
HeaderExtendHeader,
|
|
56
|
+
HeaderLeft,
|
|
57
|
+
HeaderTitle,
|
|
58
|
+
SearchHeader,
|
|
59
|
+
} from '../Application';
|
|
60
|
+
import {
|
|
61
|
+
DuoGlassBackground,
|
|
62
|
+
DuoScrollGradient,
|
|
63
|
+
} from '../Application/Components/DuoGlassBackground';
|
|
64
|
+
import { DuoQuickReturnHeader } from '../Application/Components/DuoQuickReturnHeader';
|
|
65
|
+
import { useDuoTabBarInset } from '../Application/BottomTab/DuoTabBar';
|
|
66
|
+
|
|
67
|
+
const ANIMATED_BANNER_HEIGHT = 210;
|
|
68
|
+
|
|
69
|
+
export interface ScreenProps extends ViewProps {
|
|
70
|
+
/**
|
|
71
|
+
* ReactNode representing the content of the screen.
|
|
72
|
+
*/
|
|
73
|
+
children: React.ReactNode;
|
|
74
|
+
/**
|
|
75
|
+
* Optional. Navigation object for handling navigation actions.
|
|
76
|
+
*/
|
|
77
|
+
navigation?: Navigation;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Optional. If `true`, enable keyboard avoiding view for the screen.
|
|
81
|
+
*/
|
|
82
|
+
enableKeyboardAvoidingView?: boolean;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Optional. If `true`, the screen content is scrollable.
|
|
86
|
+
*/
|
|
87
|
+
scrollable?: boolean;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Optional. Set type of header.
|
|
91
|
+
*/
|
|
92
|
+
headerType?: HeaderType;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Optional. Props for the animated component or bool used top navigation animated.
|
|
96
|
+
*/
|
|
97
|
+
animatedHeader?: AnimatedHeader;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Optional. Props for the underlying ScrollView component when `scrollable` is `true`.
|
|
101
|
+
*/
|
|
102
|
+
scrollViewProps?: ScrollViewProps;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Optional. ReactNode representing the header component of the screen.
|
|
106
|
+
*/
|
|
107
|
+
headerComponent?: ReactNode;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Optional. ReactNode representing the footer component of the screen.
|
|
111
|
+
*/
|
|
112
|
+
footerComponent?: ReactNode;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Optional. If `true`, the footer is inset by the standard horizontal margin
|
|
116
|
+
* (12pt each side). Set `false` for a footer that should span the full width —
|
|
117
|
+
* e.g. one that already carries its own horizontal padding.
|
|
118
|
+
* Defaults to `true`, on every platform.
|
|
119
|
+
*/
|
|
120
|
+
marginFooter?: boolean;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Optional. Background color of the screen.
|
|
124
|
+
*/
|
|
125
|
+
backgroundColor?: string;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Optional. layout card offset overlap header banner.
|
|
129
|
+
*/
|
|
130
|
+
layoutOffset?: -8 | -24 | -56 | number;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Optional. Width of the right header. Defaults to the toolkit width (73), or 0 when
|
|
134
|
+
* iPhone Duo floats the toolkit into its side bar.
|
|
135
|
+
*/
|
|
136
|
+
headerRightWidth?: 0 | 73 | 110 | number;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Optional. Props for the floating action button.
|
|
140
|
+
*/
|
|
141
|
+
floatingButtonProps?: Omit<FloatingButtonProps, 'animatedValue' | 'bottom'>;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Optional. Keyboard vertical offset.
|
|
145
|
+
*/
|
|
146
|
+
keyboardVerticalOffset?: number;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Optional. If `true`, the screen content is using grid layout by span.
|
|
150
|
+
*/
|
|
151
|
+
useGridLayout?: boolean;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Optional. specs for input search.
|
|
155
|
+
*/
|
|
156
|
+
inputSearchProps?: SearchHeaderProps;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Optional. Ref for input search.
|
|
160
|
+
*/
|
|
161
|
+
inputSearchRef?: Ref<InputRef>;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Optional. React Native animated value for header.
|
|
165
|
+
* Internally, Screen mirrors it into a reanimated shared value.
|
|
166
|
+
*/
|
|
167
|
+
animatedValue?: Animated.Value;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Optional. If `true`, use shadow header.
|
|
171
|
+
*/
|
|
172
|
+
useShadowHeader?: boolean;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Optional. Custom header Gradient Color.
|
|
176
|
+
*/
|
|
177
|
+
gradientColor?: string;
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Optional. Custom headerBackground Image
|
|
181
|
+
*/
|
|
182
|
+
headerBackground?: string;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Optional. Custom tracking params
|
|
186
|
+
*/
|
|
187
|
+
trackingParams?: ScreenTrackingParams;
|
|
188
|
+
}
|
|
189
|
+
|
|
44
190
|
const Screen = forwardRef(
|
|
45
191
|
(
|
|
46
192
|
{
|
|
@@ -67,7 +213,6 @@ const Screen = forwardRef(
|
|
|
67
213
|
headerBackground,
|
|
68
214
|
gradientColor,
|
|
69
215
|
trackingParams,
|
|
70
|
-
contentLayout,
|
|
71
216
|
}: ScreenProps,
|
|
72
217
|
ref: any,
|
|
73
218
|
) => {
|
|
@@ -99,56 +244,340 @@ const Screen = forwardRef(
|
|
|
99
244
|
};
|
|
100
245
|
}, [customAnimatedValue, internalShared]);
|
|
101
246
|
|
|
247
|
+
const currentTint = useRef<string | undefined>(undefined);
|
|
248
|
+
|
|
102
249
|
const isTab = !!screen?.bottomTab;
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
useLayoutEffect(() => {
|
|
108
|
-
if (duoTabInset) {
|
|
109
|
-
claimTabBarInset?.();
|
|
110
|
-
}
|
|
111
|
-
}, [duoTabInset, claimTabBarInset]);
|
|
250
|
+
const duoTabInset = useDuoTabBarInset();
|
|
251
|
+
|
|
252
|
+
let handleScroll;
|
|
253
|
+
let Component: any = View;
|
|
112
254
|
|
|
113
255
|
const isIOS = Platform.OS === 'ios';
|
|
114
256
|
const bottomInset = isIOS ? Math.min(insets.bottom, 21) : insets.bottom;
|
|
115
257
|
const hasSideBar = !!layout.sideBar;
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
const
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
258
|
+
const useDuoGlass =
|
|
259
|
+
hasSideBar &&
|
|
260
|
+
(headerType === 'default' || headerType === 'extended') &&
|
|
261
|
+
!animatedHeader &&
|
|
262
|
+
!inputSearchProps;
|
|
263
|
+
|
|
264
|
+
const useQuickReturn =
|
|
265
|
+
hasSideBar && scrollable && (useDuoGlass || !!animatedHeader);
|
|
266
|
+
const headerHide = useSharedValue(0);
|
|
267
|
+
const lastScrollY = useSharedValue(0);
|
|
268
|
+
|
|
269
|
+
useAnimatedReaction(
|
|
270
|
+
() => sharedValue.value,
|
|
271
|
+
y => {
|
|
272
|
+
const delta = y - lastScrollY.value;
|
|
273
|
+
lastScrollY.value = y;
|
|
274
|
+
if (!useQuickReturn || y <= 0) {
|
|
275
|
+
headerHide.value = 0;
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
headerHide.value = Math.min(
|
|
279
|
+
Math.max(headerHide.value + delta, 0),
|
|
280
|
+
heightHeader,
|
|
281
|
+
);
|
|
282
|
+
},
|
|
283
|
+
[useQuickReturn, heightHeader],
|
|
284
|
+
);
|
|
285
|
+
|
|
286
|
+
const quickReturnOptions: StackNavigationOptions = useMemo(
|
|
287
|
+
() =>
|
|
288
|
+
useQuickReturn
|
|
289
|
+
? {
|
|
290
|
+
header: (props: any) => (
|
|
291
|
+
<DuoQuickReturnHeader {...props} offset={headerHide} />
|
|
292
|
+
),
|
|
293
|
+
}
|
|
294
|
+
: { header: undefined },
|
|
295
|
+
[useQuickReturn, headerHide],
|
|
126
296
|
);
|
|
127
297
|
|
|
128
298
|
let keyboardOffset = heightHeader - bottomInset;
|
|
129
|
-
if (
|
|
299
|
+
if (
|
|
300
|
+
headerType === 'extended' ||
|
|
301
|
+
animatedHeader ||
|
|
302
|
+
inputSearchProps ||
|
|
303
|
+
useDuoGlass
|
|
304
|
+
) {
|
|
130
305
|
keyboardOffset = -bottomInset;
|
|
131
306
|
}
|
|
132
307
|
|
|
308
|
+
/**
|
|
309
|
+
* inject params for screen tracking
|
|
310
|
+
*/
|
|
133
311
|
screen?.onSetParams?.(trackingParams);
|
|
134
312
|
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
313
|
+
const appliedHeaderMode = useRef<string | undefined>(undefined);
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* export options for screen
|
|
317
|
+
* @param headerType
|
|
318
|
+
*/
|
|
319
|
+
const setHeaderType = useCallback(
|
|
320
|
+
(headerType: HeaderType, keepTitle = false) => {
|
|
321
|
+
let options: StackNavigationOptions;
|
|
322
|
+
switch (headerType) {
|
|
323
|
+
case 'none':
|
|
324
|
+
options = {
|
|
325
|
+
headerTransparent: true,
|
|
326
|
+
headerBackground: () => null,
|
|
327
|
+
headerShown: false,
|
|
328
|
+
};
|
|
329
|
+
break;
|
|
330
|
+
|
|
331
|
+
case 'extended':
|
|
332
|
+
options = {
|
|
333
|
+
...quickReturnOptions,
|
|
334
|
+
headerShown: true,
|
|
335
|
+
headerTransparent: true,
|
|
336
|
+
headerBackground: () =>
|
|
337
|
+
hasSideBar ? (
|
|
338
|
+
<DuoGlassBackground animatedValue={sharedValue} />
|
|
339
|
+
) : null,
|
|
340
|
+
headerTitle: (props: any) => <HeaderTitle {...props} />,
|
|
341
|
+
};
|
|
342
|
+
if (inputSearchProps) {
|
|
343
|
+
options = {
|
|
344
|
+
headerShown: true,
|
|
345
|
+
headerTransparent: true,
|
|
346
|
+
headerBackground: () => null,
|
|
347
|
+
headerTitle: (props: any) => (
|
|
348
|
+
<HeaderTitle
|
|
349
|
+
{...props}
|
|
350
|
+
interpolate={{
|
|
351
|
+
inputRange: [0, 50],
|
|
352
|
+
outputRange: [1, 0],
|
|
353
|
+
}}
|
|
354
|
+
animatedValue={sharedValue}
|
|
355
|
+
/>
|
|
356
|
+
),
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
break;
|
|
360
|
+
|
|
361
|
+
default:
|
|
362
|
+
if (hasSideBar && !inputSearchProps) {
|
|
363
|
+
options = {
|
|
364
|
+
...quickReturnOptions,
|
|
365
|
+
headerTransparent: true,
|
|
366
|
+
headerTintColor: Colors.black_17,
|
|
367
|
+
headerShown: true,
|
|
368
|
+
headerBackground: () => (
|
|
369
|
+
<DuoGlassBackground animatedValue={sharedValue} />
|
|
370
|
+
),
|
|
371
|
+
headerTitle: (props: any) => <HeaderTitle {...props} />,
|
|
372
|
+
};
|
|
373
|
+
break;
|
|
374
|
+
}
|
|
375
|
+
options = {
|
|
376
|
+
headerTransparent: false,
|
|
377
|
+
headerTintColor: Colors.black_17,
|
|
378
|
+
headerShown: true,
|
|
379
|
+
headerBackground: (props: any) => (
|
|
380
|
+
<HeaderBackground
|
|
381
|
+
{...props}
|
|
382
|
+
animatedValue={sharedValue}
|
|
383
|
+
useShadowHeader={useShadowHeader}
|
|
384
|
+
headerBackground={headerBackground}
|
|
385
|
+
gradientColor={gradientColor}
|
|
386
|
+
/>
|
|
387
|
+
),
|
|
388
|
+
headerTitle: (props: any) => <HeaderTitle {...props} />,
|
|
389
|
+
};
|
|
390
|
+
if (inputSearchProps) {
|
|
391
|
+
options = {
|
|
392
|
+
headerShown: true,
|
|
393
|
+
headerTransparent: true,
|
|
394
|
+
headerBackground: () => null,
|
|
395
|
+
headerTitle: (props: any) => (
|
|
396
|
+
<HeaderTitle
|
|
397
|
+
{...props}
|
|
398
|
+
interpolate={{
|
|
399
|
+
inputRange: [0, 50],
|
|
400
|
+
outputRange: [1, 0],
|
|
401
|
+
}}
|
|
402
|
+
animatedValue={sharedValue}
|
|
403
|
+
/>
|
|
404
|
+
),
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
if (keepTitle) {
|
|
410
|
+
delete options.headerTitle;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
navigation?.instance?.setOptions({ header: undefined, ...options });
|
|
414
|
+
},
|
|
415
|
+
[
|
|
416
|
+
gradientColor,
|
|
417
|
+
headerBackground,
|
|
418
|
+
inputSearchProps,
|
|
419
|
+
navigation?.instance,
|
|
420
|
+
sharedValue,
|
|
421
|
+
useShadowHeader,
|
|
422
|
+
hasSideBar,
|
|
423
|
+
quickReturnOptions,
|
|
424
|
+
],
|
|
425
|
+
);
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* export animatedHeader options for screen
|
|
429
|
+
* @param animatedHeader
|
|
430
|
+
*/
|
|
431
|
+
const setAnimatedHeader = useCallback(
|
|
432
|
+
(animatedHeader: AnimatedHeader) => {
|
|
433
|
+
let options: StackNavigationOptions;
|
|
434
|
+
if (!currentTint.current) {
|
|
435
|
+
currentTint.current = animatedHeader?.headerTintColor;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
options = {
|
|
439
|
+
...quickReturnOptions,
|
|
440
|
+
headerTintColor: currentTint.current ?? Colors.black_17,
|
|
441
|
+
headerTransparent: true,
|
|
442
|
+
headerBackground: (props: any) =>
|
|
443
|
+
hasSideBar ? (
|
|
444
|
+
<DuoGlassBackground
|
|
445
|
+
animatedValue={sharedValue}
|
|
446
|
+
bannerBottom={ANIMATED_BANNER_HEIGHT + layoutOffset}
|
|
447
|
+
/>
|
|
448
|
+
) : (
|
|
449
|
+
<HeaderBackground
|
|
450
|
+
{...props}
|
|
451
|
+
animatedValue={sharedValue}
|
|
452
|
+
useGradient={false}
|
|
453
|
+
useShadowHeader={useShadowHeader}
|
|
454
|
+
headerBackground={headerBackground}
|
|
455
|
+
gradientColor={gradientColor}
|
|
456
|
+
/>
|
|
457
|
+
),
|
|
458
|
+
headerTitle: (props: any) => {
|
|
459
|
+
return <HeaderTitle {...props} />;
|
|
460
|
+
},
|
|
461
|
+
};
|
|
462
|
+
|
|
463
|
+
if (animatedHeader.headerTitle) {
|
|
464
|
+
options = {
|
|
465
|
+
...options,
|
|
466
|
+
...exportHeaderTitle(animatedHeader),
|
|
467
|
+
};
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
navigation?.instance?.setOptions(options);
|
|
471
|
+
},
|
|
472
|
+
[
|
|
473
|
+
gradientColor,
|
|
474
|
+
headerBackground,
|
|
475
|
+
navigation?.instance,
|
|
476
|
+
sharedValue,
|
|
477
|
+
useShadowHeader,
|
|
478
|
+
hasSideBar,
|
|
479
|
+
layoutOffset,
|
|
480
|
+
quickReturnOptions,
|
|
481
|
+
],
|
|
482
|
+
);
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* export animatedHeader options for screen
|
|
486
|
+
*/
|
|
487
|
+
const setAnimatedSearch = useCallback(() => {
|
|
488
|
+
const options: StackNavigationOptions = {
|
|
489
|
+
headerShown: true,
|
|
490
|
+
headerTransparent: true,
|
|
491
|
+
headerBackground: () => null,
|
|
492
|
+
headerTitle: (props: any) => (
|
|
493
|
+
<HeaderTitle
|
|
494
|
+
{...props}
|
|
495
|
+
interpolate={{
|
|
496
|
+
inputRange: [0, 50],
|
|
497
|
+
outputRange: [1, 0],
|
|
498
|
+
}}
|
|
499
|
+
animatedValue={sharedValue}
|
|
500
|
+
/>
|
|
501
|
+
),
|
|
502
|
+
};
|
|
503
|
+
|
|
504
|
+
navigation?.instance?.setOptions({ header: undefined, ...options });
|
|
505
|
+
}, [navigation?.instance, sharedValue]);
|
|
506
|
+
|
|
507
|
+
/**
|
|
508
|
+
* export search header
|
|
509
|
+
*/
|
|
510
|
+
const setSearchHeader = (params: SearchHeaderProps) => {
|
|
511
|
+
let searchWidth = layout.width - 24;
|
|
512
|
+
let searchLeft = Spacing.M;
|
|
513
|
+
if (layout.sideBar) {
|
|
514
|
+
searchWidth = layout.contentWidth - Spacing.M * 2;
|
|
515
|
+
searchLeft = Spacing.M - getHeaderMargin(layout.width);
|
|
516
|
+
}
|
|
517
|
+
if (layout.statusBarClearance) {
|
|
518
|
+
searchWidth -=
|
|
519
|
+
layout.statusBarClearance.left + layout.statusBarClearance.right;
|
|
520
|
+
}
|
|
521
|
+
const options: StackNavigationOptions = {
|
|
522
|
+
headerRight: undefined,
|
|
523
|
+
headerTitleContainerStyle: {
|
|
524
|
+
width: searchWidth,
|
|
525
|
+
maxWidth: searchWidth,
|
|
526
|
+
marginLeft: 0,
|
|
527
|
+
marginEnd: 0,
|
|
528
|
+
marginStart: 0,
|
|
529
|
+
marginHorizontal: 0,
|
|
530
|
+
marginVertical: 0,
|
|
531
|
+
margin: 0,
|
|
532
|
+
left: searchLeft,
|
|
533
|
+
},
|
|
534
|
+
headerLeft: (props: any) =>
|
|
535
|
+
params?.hiddenBack ? null : <HeaderLeft {...props} floating />,
|
|
536
|
+
headerTitle: () => (
|
|
537
|
+
<SearchHeader {...params} animatedValue={sharedValue} />
|
|
538
|
+
),
|
|
539
|
+
};
|
|
540
|
+
|
|
541
|
+
navigation?.instance?.setOptions(options);
|
|
542
|
+
};
|
|
543
|
+
|
|
544
|
+
useEffect(() => {
|
|
545
|
+
const focus = navigation?.instance?.addListener?.('focus', () => {
|
|
546
|
+
let barStyle: StatusBarStyle = 'dark-content';
|
|
547
|
+
if (currentTint.current === Colors.black_01) {
|
|
548
|
+
barStyle = 'light-content';
|
|
549
|
+
}
|
|
550
|
+
StatusBar.setBarStyle(barStyle, true);
|
|
551
|
+
});
|
|
552
|
+
|
|
553
|
+
if (animatedHeader) {
|
|
554
|
+
setAnimatedHeader(animatedHeader);
|
|
555
|
+
appliedHeaderMode.current = 'animated';
|
|
556
|
+
} else if (inputSearchProps) {
|
|
557
|
+
setAnimatedSearch();
|
|
558
|
+
appliedHeaderMode.current = 'search';
|
|
559
|
+
} else {
|
|
560
|
+
setHeaderType(headerType, appliedHeaderMode.current === headerType);
|
|
561
|
+
appliedHeaderMode.current = headerType;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
return () => {
|
|
565
|
+
focus?.();
|
|
566
|
+
};
|
|
567
|
+
}, [
|
|
141
568
|
headerType,
|
|
142
569
|
animatedHeader,
|
|
143
570
|
inputSearchProps,
|
|
144
571
|
useShadowHeader,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
572
|
+
navigation?.instance,
|
|
573
|
+
setAnimatedHeader,
|
|
574
|
+
setAnimatedSearch,
|
|
575
|
+
setHeaderType,
|
|
576
|
+
]);
|
|
150
577
|
|
|
151
|
-
|
|
578
|
+
/**
|
|
579
|
+
* expose ref for screen
|
|
580
|
+
*/
|
|
152
581
|
useImperativeHandle(ref, () => {
|
|
153
582
|
return Object.assign(screenRef.current || {}, {
|
|
154
583
|
setOptions: (params: NavigationOptions) => {
|
|
@@ -159,19 +588,164 @@ const Screen = forwardRef(
|
|
|
159
588
|
});
|
|
160
589
|
});
|
|
161
590
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
591
|
+
/**
|
|
592
|
+
* animated when use scroll && animated value
|
|
593
|
+
*/
|
|
594
|
+
if (scrollable) {
|
|
595
|
+
Component = Animated.ScrollView;
|
|
596
|
+
handleScroll = Animated.event(
|
|
597
|
+
[
|
|
598
|
+
{
|
|
599
|
+
nativeEvent: {
|
|
600
|
+
contentOffset: { y: animatedValue.current as Animated.Value },
|
|
601
|
+
},
|
|
602
|
+
},
|
|
603
|
+
],
|
|
604
|
+
{
|
|
605
|
+
useNativeDriver: true,
|
|
606
|
+
listener: (e: NativeSyntheticEvent<NativeScrollEvent>) => {
|
|
607
|
+
const offsetY = e.nativeEvent.contentOffset.y;
|
|
608
|
+
sharedValue.value = offsetY;
|
|
609
|
+
scrollViewProps?.onScroll?.(e);
|
|
610
|
+
if (animatedHeader) {
|
|
611
|
+
let color = animatedHeader?.headerTintColor ?? Colors.black_17;
|
|
612
|
+
if (offsetY > 50) {
|
|
613
|
+
color = Colors.black_17;
|
|
614
|
+
}
|
|
615
|
+
if (color !== currentTint.current) {
|
|
616
|
+
currentTint.current = color;
|
|
617
|
+
navigation?.setOptions({
|
|
618
|
+
headerTintColor: color,
|
|
619
|
+
});
|
|
620
|
+
|
|
621
|
+
let barStyle: StatusBarStyle = 'dark-content';
|
|
622
|
+
if (currentTint.current === Colors.black_01) {
|
|
623
|
+
barStyle = 'light-content';
|
|
624
|
+
}
|
|
625
|
+
StatusBar.setBarStyle(barStyle, true);
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
},
|
|
629
|
+
},
|
|
630
|
+
);
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
/**
|
|
634
|
+
* handle scroll end
|
|
635
|
+
* @param e
|
|
636
|
+
*/
|
|
637
|
+
/**
|
|
638
|
+
* a half-shown quick return header settles fully in or out
|
|
639
|
+
*/
|
|
640
|
+
const snapQuickReturnHeader = (offsetY: number) => {
|
|
641
|
+
const hide = headerHide.value;
|
|
642
|
+
if (
|
|
643
|
+
!useQuickReturn ||
|
|
644
|
+
offsetY < heightHeader ||
|
|
645
|
+
hide <= 0 ||
|
|
646
|
+
hide >= heightHeader
|
|
647
|
+
) {
|
|
648
|
+
return;
|
|
649
|
+
}
|
|
650
|
+
headerHide.value = withTiming(
|
|
651
|
+
hide > heightHeader / 2 ? heightHeader : 0,
|
|
652
|
+
{ duration: 200 },
|
|
653
|
+
);
|
|
654
|
+
};
|
|
655
|
+
|
|
656
|
+
const handleMomentumScrollEnd = (
|
|
657
|
+
e: NativeSyntheticEvent<NativeScrollEvent>,
|
|
658
|
+
) => {
|
|
659
|
+
snapQuickReturnHeader(e.nativeEvent.contentOffset.y);
|
|
660
|
+
scrollViewProps?.onMomentumScrollEnd?.(e);
|
|
661
|
+
};
|
|
662
|
+
|
|
663
|
+
const handleScrollEnd = (e: NativeSyntheticEvent<NativeScrollEvent>) => {
|
|
664
|
+
const offsetY = e.nativeEvent.contentOffset.y;
|
|
665
|
+
snapQuickReturnHeader(offsetY);
|
|
666
|
+
if (inputSearchProps && offsetY < 100 && offsetY > 0) {
|
|
667
|
+
Animated.timing(animatedValue.current, {
|
|
668
|
+
toValue: 0,
|
|
669
|
+
useNativeDriver: true,
|
|
670
|
+
duration: 300,
|
|
671
|
+
}).start();
|
|
672
|
+
sharedValue.value = withTiming(0, { duration: 300 });
|
|
673
|
+
ref?.scrollTo?.({ y: 0, animated: true });
|
|
674
|
+
}
|
|
675
|
+
scrollViewProps?.onScrollEndDrag?.(e);
|
|
676
|
+
};
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* render top navigation banner
|
|
680
|
+
*/
|
|
681
|
+
const renderAnimatedHeader = () => {
|
|
682
|
+
if (typeof animatedHeader?.component === 'function') {
|
|
683
|
+
return (
|
|
684
|
+
<View
|
|
685
|
+
style={[
|
|
686
|
+
styles.screenBanner,
|
|
687
|
+
{ maxHeight: ANIMATED_BANNER_HEIGHT + layoutOffset },
|
|
688
|
+
]}
|
|
689
|
+
>
|
|
690
|
+
{animatedHeader?.component({
|
|
691
|
+
animatedValue: animatedValue.current,
|
|
692
|
+
sharedValue: sharedValue,
|
|
693
|
+
})}
|
|
694
|
+
</View>
|
|
695
|
+
);
|
|
696
|
+
}
|
|
697
|
+
};
|
|
698
|
+
|
|
699
|
+
/**
|
|
700
|
+
* build content for screen for grid rule
|
|
701
|
+
*/
|
|
702
|
+
const renderContent = (children: any): any => {
|
|
703
|
+
const results = validateChildren(children, [undefined]);
|
|
704
|
+
if (Array.isArray(results)) {
|
|
705
|
+
return results.map((item, index) => {
|
|
706
|
+
const space = item?.props?.useMargin === false ? 0 : Spacing.M;
|
|
707
|
+
if (item?.type === Fragment) {
|
|
708
|
+
return renderContent(item?.props?.children);
|
|
709
|
+
}
|
|
710
|
+
if (item) {
|
|
711
|
+
return (
|
|
712
|
+
<View
|
|
713
|
+
key={`ScreenItem${index}`}
|
|
714
|
+
style={{
|
|
715
|
+
marginTop: space,
|
|
716
|
+
marginLeft: layout.insetLeft,
|
|
717
|
+
marginRight: layout.insetRight,
|
|
718
|
+
flex: item.props?.expanded ? 1 : undefined,
|
|
719
|
+
}}
|
|
720
|
+
onLayout={item.props?.onLayout}
|
|
721
|
+
>
|
|
722
|
+
{item}
|
|
723
|
+
</View>
|
|
724
|
+
);
|
|
725
|
+
}
|
|
726
|
+
});
|
|
727
|
+
} else {
|
|
728
|
+
const item: any = children;
|
|
729
|
+
const space = item?.props?.useMargin === false ? 0 : Spacing.M;
|
|
730
|
+
if (item?.type === Fragment) {
|
|
731
|
+
return renderContent(item?.props?.children);
|
|
732
|
+
}
|
|
733
|
+
return (
|
|
734
|
+
<View
|
|
735
|
+
key={`ScreenItem`}
|
|
736
|
+
style={{
|
|
737
|
+
marginTop: space,
|
|
738
|
+
marginLeft: layout.insetLeft,
|
|
739
|
+
marginRight: layout.insetRight,
|
|
740
|
+
flex: item?.props?.expanded ? 1 : undefined,
|
|
741
|
+
}}
|
|
742
|
+
onLayout={item?.props?.onLayout}
|
|
743
|
+
>
|
|
744
|
+
{children}
|
|
745
|
+
</View>
|
|
746
|
+
);
|
|
747
|
+
}
|
|
748
|
+
};
|
|
175
749
|
|
|
176
750
|
const getHeight = () => {
|
|
177
751
|
let newHeight = frame.height;
|
|
@@ -200,36 +774,6 @@ const Screen = forwardRef(
|
|
|
200
774
|
floatingButtonBottom = 12 + duoTabInset;
|
|
201
775
|
}
|
|
202
776
|
|
|
203
|
-
const renderHeaderLayer = () => {
|
|
204
|
-
if (useDuoGlass) {
|
|
205
|
-
return (
|
|
206
|
-
<DuoScrollGradient
|
|
207
|
-
animatedValue={sharedValue}
|
|
208
|
-
gradientColor={gradientColor}
|
|
209
|
-
headerBackground={headerBackground}
|
|
210
|
-
heightHeader={heightHeader}
|
|
211
|
-
extended={headerType === 'extended'}
|
|
212
|
-
followScroll={useQuickReturn}
|
|
213
|
-
/>
|
|
214
|
-
);
|
|
215
|
-
}
|
|
216
|
-
return (
|
|
217
|
-
<HeaderExtendHeader
|
|
218
|
-
headerType={headerType}
|
|
219
|
-
heightHeader={heightHeader}
|
|
220
|
-
headerRightWidth={headerRightWidth}
|
|
221
|
-
animatedValue={sharedValue}
|
|
222
|
-
inputSearchProps={inputSearchProps}
|
|
223
|
-
navigation={navigation}
|
|
224
|
-
inputSearchRef={inputSearchRef}
|
|
225
|
-
useShadowHeader={useShadowHeader}
|
|
226
|
-
gradientColor={gradientColor}
|
|
227
|
-
headerBackground={headerBackground}
|
|
228
|
-
contentLayout={contentLayout}
|
|
229
|
-
/>
|
|
230
|
-
);
|
|
231
|
-
};
|
|
232
|
-
|
|
233
777
|
return (
|
|
234
778
|
<View
|
|
235
779
|
style={[
|
|
@@ -240,7 +784,29 @@ const Screen = forwardRef(
|
|
|
240
784
|
},
|
|
241
785
|
]}
|
|
242
786
|
>
|
|
243
|
-
{
|
|
787
|
+
{useDuoGlass ? (
|
|
788
|
+
<DuoScrollGradient
|
|
789
|
+
animatedValue={sharedValue}
|
|
790
|
+
gradientColor={gradientColor}
|
|
791
|
+
headerBackground={headerBackground}
|
|
792
|
+
heightHeader={heightHeader}
|
|
793
|
+
extended={headerType === 'extended'}
|
|
794
|
+
followScroll={useQuickReturn}
|
|
795
|
+
/>
|
|
796
|
+
) : (
|
|
797
|
+
<HeaderExtendHeader
|
|
798
|
+
headerType={headerType}
|
|
799
|
+
heightHeader={heightHeader}
|
|
800
|
+
headerRightWidth={headerRightWidth}
|
|
801
|
+
animatedValue={sharedValue}
|
|
802
|
+
inputSearchProps={inputSearchProps}
|
|
803
|
+
navigation={navigation}
|
|
804
|
+
inputSearchRef={inputSearchRef}
|
|
805
|
+
useShadowHeader={useShadowHeader}
|
|
806
|
+
gradientColor={gradientColor}
|
|
807
|
+
headerBackground={headerBackground}
|
|
808
|
+
/>
|
|
809
|
+
)}
|
|
244
810
|
|
|
245
811
|
<KeyboardAvoidingView
|
|
246
812
|
style={[
|
|
@@ -260,9 +826,9 @@ const Screen = forwardRef(
|
|
|
260
826
|
{...scrollViewProps}
|
|
261
827
|
ref={screenRef}
|
|
262
828
|
showsVerticalScrollIndicator={false}
|
|
263
|
-
onScroll={
|
|
264
|
-
onScrollEndDrag={
|
|
265
|
-
onMomentumScrollEnd={
|
|
829
|
+
onScroll={handleScroll}
|
|
830
|
+
onScrollEndDrag={handleScrollEnd}
|
|
831
|
+
onMomentumScrollEnd={handleMomentumScrollEnd}
|
|
266
832
|
scrollEventThrottle={16}
|
|
267
833
|
style={[
|
|
268
834
|
Styles.flex,
|
|
@@ -277,14 +843,9 @@ const Screen = forwardRef(
|
|
|
277
843
|
scrollViewProps?.contentContainerStyle,
|
|
278
844
|
]}
|
|
279
845
|
>
|
|
280
|
-
{renderAnimatedHeader(
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
animatedValue.current,
|
|
284
|
-
sharedValue,
|
|
285
|
-
)}
|
|
286
|
-
|
|
287
|
-
{useGridLayout ? renderContent(children, layout) : children}
|
|
846
|
+
{renderAnimatedHeader()}
|
|
847
|
+
|
|
848
|
+
{useGridLayout ? renderContent(children) : children}
|
|
288
849
|
</Component>
|
|
289
850
|
|
|
290
851
|
{floatingButtonProps && (
|
|
@@ -303,17 +864,30 @@ const Screen = forwardRef(
|
|
|
303
864
|
)}
|
|
304
865
|
|
|
305
866
|
{Footer && (
|
|
306
|
-
<
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
867
|
+
<View
|
|
868
|
+
pointerEvents={'box-none'}
|
|
869
|
+
style={[
|
|
870
|
+
hasContentInset && styles.footerClip,
|
|
871
|
+
{
|
|
872
|
+
marginLeft: layout.insetLeft,
|
|
873
|
+
marginRight: layout.insetRight,
|
|
874
|
+
},
|
|
875
|
+
]}
|
|
876
|
+
>
|
|
877
|
+
<View
|
|
878
|
+
style={[
|
|
879
|
+
styles.shadow,
|
|
880
|
+
{
|
|
881
|
+
paddingBottom:
|
|
882
|
+
(isTab && duoTabInset ? duoTabInset : bottomInset) +
|
|
883
|
+
Spacing.S,
|
|
884
|
+
backgroundColor: theme.colors.background.surface,
|
|
885
|
+
},
|
|
886
|
+
]}
|
|
887
|
+
>
|
|
888
|
+
<Section useMargin={marginFooter}>{Footer}</Section>
|
|
889
|
+
</View>
|
|
890
|
+
</View>
|
|
317
891
|
)}
|
|
318
892
|
</KeyboardAvoidingView>
|
|
319
893
|
</View>
|