@rocapine/react-native-onboarding-ui 1.14.0 → 1.15.0
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/UI/Pages/Carousel/Renderer.d.ts.map +1 -1
- package/dist/UI/Pages/Carousel/Renderer.js +13 -12
- package/dist/UI/Pages/Carousel/Renderer.js.map +1 -1
- package/dist/UI/Pages/Commitment/Renderer.d.ts.map +1 -1
- package/dist/UI/Pages/Commitment/Renderer.js +31 -30
- package/dist/UI/Pages/Commitment/Renderer.js.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/SafeAreaViewElement.d.ts +114 -0
- package/dist/UI/Pages/ComposableScreen/elements/SafeAreaViewElement.d.ts.map +1 -0
- package/dist/UI/Pages/ComposableScreen/elements/SafeAreaViewElement.js +62 -0
- package/dist/UI/Pages/ComposableScreen/elements/SafeAreaViewElement.js.map +1 -0
- package/dist/UI/Pages/ComposableScreen/elements/renderElement.d.ts.map +1 -1
- package/dist/UI/Pages/ComposableScreen/elements/renderElement.js +4 -0
- package/dist/UI/Pages/ComposableScreen/elements/renderElement.js.map +1 -1
- package/dist/UI/Pages/ComposableScreen/types.d.ts +8 -0
- package/dist/UI/Pages/ComposableScreen/types.d.ts.map +1 -1
- package/dist/UI/Pages/ComposableScreen/types.js +8 -0
- package/dist/UI/Pages/ComposableScreen/types.js.map +1 -1
- package/dist/UI/Pages/Loader/Renderer.d.ts.map +1 -1
- package/dist/UI/Pages/Loader/Renderer.js +8 -7
- package/dist/UI/Pages/Loader/Renderer.js.map +1 -1
- package/dist/UI/Pages/MediaContent/Renderer.d.ts.map +1 -1
- package/dist/UI/Pages/MediaContent/Renderer.js +5 -4
- package/dist/UI/Pages/MediaContent/Renderer.js.map +1 -1
- package/dist/UI/Pages/Picker/Renderer.d.ts.map +1 -1
- package/dist/UI/Pages/Picker/Renderer.js +24 -23
- package/dist/UI/Pages/Picker/Renderer.js.map +1 -1
- package/dist/UI/Pages/Question/Renderer.d.ts.map +1 -1
- package/dist/UI/Pages/Question/Renderer.js +13 -12
- package/dist/UI/Pages/Question/Renderer.js.map +1 -1
- package/dist/UI/Pages/Ratings/Renderer.d.ts.map +1 -1
- package/dist/UI/Pages/Ratings/Renderer.js +15 -14
- package/dist/UI/Pages/Ratings/Renderer.js.map +1 -1
- package/dist/UI/Templates/OnboardingTemplate.d.ts.map +1 -1
- package/dist/UI/Templates/OnboardingTemplate.js +1 -4
- package/dist/UI/Templates/OnboardingTemplate.js.map +1 -1
- package/package.json +2 -2
- package/src/UI/Pages/Carousel/Renderer.tsx +3 -0
- package/src/UI/Pages/Commitment/Renderer.tsx +3 -0
- package/src/UI/Pages/ComposableScreen/elements/SafeAreaViewElement.tsx +93 -0
- package/src/UI/Pages/ComposableScreen/elements/renderElement.tsx +5 -0
- package/src/UI/Pages/ComposableScreen/types.ts +16 -0
- package/src/UI/Pages/Loader/Renderer.tsx +7 -0
- package/src/UI/Pages/MediaContent/Renderer.tsx +3 -0
- package/src/UI/Pages/Picker/Renderer.tsx +11 -0
- package/src/UI/Pages/Question/Renderer.tsx +4 -0
- package/src/UI/Pages/Ratings/Renderer.tsx +4 -0
- package/src/UI/Templates/OnboardingTemplate.tsx +1 -5
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OnboardingTemplate } from "../../Templates/OnboardingTemplate";
|
|
2
|
+
import { SafeAreaView } from "react-native-safe-area-context";
|
|
2
3
|
import {
|
|
3
4
|
CarouselStepType,
|
|
4
5
|
CarouselStepTypeSchema,
|
|
@@ -58,6 +59,7 @@ const CarouselRendererBase = ({ step, onContinue, theme = defaultTheme }: Conten
|
|
|
58
59
|
const isLastPage = currentPage === screens.length - 1;
|
|
59
60
|
|
|
60
61
|
return (
|
|
62
|
+
<SafeAreaView style={{ flex: 1 }} edges={["top", "bottom"]}>
|
|
61
63
|
<OnboardingTemplate
|
|
62
64
|
step={step}
|
|
63
65
|
onContinue={handleButtonPress}
|
|
@@ -101,6 +103,7 @@ const CarouselRendererBase = ({ step, onContinue, theme = defaultTheme }: Conten
|
|
|
101
103
|
</View>
|
|
102
104
|
</View>
|
|
103
105
|
</OnboardingTemplate>
|
|
106
|
+
</SafeAreaView>
|
|
104
107
|
);
|
|
105
108
|
};
|
|
106
109
|
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
} from "react-native";
|
|
9
9
|
import { CommitmentStepType, CommitmentStepTypeSchema } from "./types";
|
|
10
10
|
import { OnboardingTemplate } from "../../Templates/OnboardingTemplate";
|
|
11
|
+
import { SafeAreaView } from "react-native-safe-area-context";
|
|
11
12
|
import {
|
|
12
13
|
Gesture,
|
|
13
14
|
GestureDetector,
|
|
@@ -80,6 +81,7 @@ const CommitmentRendererBase = ({ step, onContinue, theme = defaultTheme }: Cont
|
|
|
80
81
|
const isButtonDisabled = payload.variant === "signature" && !hasSignature;
|
|
81
82
|
|
|
82
83
|
return (
|
|
84
|
+
<SafeAreaView style={{ flex: 1 }} edges={["top", "bottom"]}>
|
|
83
85
|
<OnboardingTemplate
|
|
84
86
|
step={validatedData}
|
|
85
87
|
onContinue={onContinue}
|
|
@@ -219,6 +221,7 @@ const CommitmentRendererBase = ({ step, onContinue, theme = defaultTheme }: Cont
|
|
|
219
221
|
</View>
|
|
220
222
|
</ScrollView>
|
|
221
223
|
</OnboardingTemplate>
|
|
224
|
+
</SafeAreaView>
|
|
222
225
|
);
|
|
223
226
|
};
|
|
224
227
|
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { SafeAreaView } from "react-native-safe-area-context";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { BaseBoxProps, BaseBoxPropsSchema } from "./BaseBoxProps";
|
|
5
|
+
import { GradientBox } from "./GradientBox";
|
|
6
|
+
import { UIElement } from "../types";
|
|
7
|
+
import { RenderContext, dim } from "./shared";
|
|
8
|
+
|
|
9
|
+
export type SafeAreaEdge = "top" | "right" | "bottom" | "left";
|
|
10
|
+
export type SafeAreaEdgeMode = "off" | "additive" | "maximum";
|
|
11
|
+
|
|
12
|
+
export type SafeAreaViewElementProps = BaseBoxProps & {
|
|
13
|
+
mode?: "padding" | "margin";
|
|
14
|
+
edges?: SafeAreaEdge[] | Partial<Record<SafeAreaEdge, SafeAreaEdgeMode>>;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const EdgeSchema = z.enum(["top", "right", "bottom", "left"]);
|
|
18
|
+
const EdgeModeSchema = z.enum(["off", "additive", "maximum"]);
|
|
19
|
+
|
|
20
|
+
export const SafeAreaViewElementPropsSchema = BaseBoxPropsSchema.extend({
|
|
21
|
+
mode: z.enum(["padding", "margin"]).optional(),
|
|
22
|
+
edges: z
|
|
23
|
+
.union([
|
|
24
|
+
z.array(EdgeSchema),
|
|
25
|
+
z.object({
|
|
26
|
+
top: EdgeModeSchema.optional(),
|
|
27
|
+
right: EdgeModeSchema.optional(),
|
|
28
|
+
bottom: EdgeModeSchema.optional(),
|
|
29
|
+
left: EdgeModeSchema.optional(),
|
|
30
|
+
}),
|
|
31
|
+
])
|
|
32
|
+
.optional(),
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
type SafeAreaViewUIElement = Extract<UIElement, { type: "SafeAreaView" }>;
|
|
36
|
+
|
|
37
|
+
type Props = {
|
|
38
|
+
element: SafeAreaViewUIElement;
|
|
39
|
+
ctx: RenderContext;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const SafeAreaViewElementComponent = ({ element, ctx }: Props): React.ReactElement => {
|
|
43
|
+
const p = element.props;
|
|
44
|
+
const hasGradient = !!p.backgroundGradient;
|
|
45
|
+
const frameStyle = {
|
|
46
|
+
flex: p.flex,
|
|
47
|
+
flexShrink: p.flexShrink,
|
|
48
|
+
flexGrow: p.flexGrow,
|
|
49
|
+
alignSelf: p.alignSelf,
|
|
50
|
+
width: dim(p.width),
|
|
51
|
+
height: dim(p.height),
|
|
52
|
+
minWidth: p.minWidth,
|
|
53
|
+
maxWidth: p.maxWidth,
|
|
54
|
+
minHeight: p.minHeight,
|
|
55
|
+
maxHeight: p.maxHeight,
|
|
56
|
+
margin: p.margin,
|
|
57
|
+
marginHorizontal: p.marginHorizontal,
|
|
58
|
+
marginVertical: p.marginVertical,
|
|
59
|
+
backgroundColor: hasGradient ? undefined : p.backgroundColor,
|
|
60
|
+
borderWidth: p.borderWidth,
|
|
61
|
+
borderRadius: p.borderRadius,
|
|
62
|
+
borderColor: p.borderColor,
|
|
63
|
+
overflow: hasGradient ? "hidden" as const : p.overflow,
|
|
64
|
+
opacity: p.opacity,
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const safeAreaStyle = {
|
|
68
|
+
flex: hasGradient ? 1 : p.flex,
|
|
69
|
+
padding: p.padding,
|
|
70
|
+
paddingHorizontal: p.paddingHorizontal,
|
|
71
|
+
paddingVertical: p.paddingVertical,
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
if (hasGradient) {
|
|
75
|
+
return (
|
|
76
|
+
<GradientBox gradient={p.backgroundGradient} style={frameStyle}>
|
|
77
|
+
<SafeAreaView mode={p.mode} edges={p.edges as any} style={safeAreaStyle}>
|
|
78
|
+
{ctx.renderChildren(element.children, "YStack")}
|
|
79
|
+
</SafeAreaView>
|
|
80
|
+
</GradientBox>
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return (
|
|
85
|
+
<SafeAreaView
|
|
86
|
+
mode={p.mode}
|
|
87
|
+
edges={p.edges as any}
|
|
88
|
+
style={{ ...frameStyle, ...safeAreaStyle }}
|
|
89
|
+
>
|
|
90
|
+
{ctx.renderChildren(element.children, "YStack")}
|
|
91
|
+
</SafeAreaView>
|
|
92
|
+
);
|
|
93
|
+
};
|
|
@@ -15,6 +15,7 @@ import { ButtonElementComponent } from "./ButtonElement";
|
|
|
15
15
|
import { DatePickerElementComponent } from "./DatePickerElement";
|
|
16
16
|
import { CarouselElementComponent } from "./CarouselElement";
|
|
17
17
|
import { ZStackElementComponent } from "./ZStackElement";
|
|
18
|
+
import { SafeAreaViewElementComponent } from "./SafeAreaViewElement";
|
|
18
19
|
|
|
19
20
|
export const renderElement = (
|
|
20
21
|
element: UIElement,
|
|
@@ -77,5 +78,9 @@ export const renderElement = (
|
|
|
77
78
|
return <ZStackElementComponent key={element.id} element={element} ctx={ctx} />;
|
|
78
79
|
}
|
|
79
80
|
|
|
81
|
+
if (element.type === "SafeAreaView") {
|
|
82
|
+
return <SafeAreaViewElementComponent key={element.id} element={element} ctx={ctx} />;
|
|
83
|
+
}
|
|
84
|
+
|
|
80
85
|
return null;
|
|
81
86
|
};
|
|
@@ -14,6 +14,7 @@ import { type CheckboxGroupElementProps, CheckboxGroupElementPropsSchema } from
|
|
|
14
14
|
import { type DatePickerElementProps, DatePickerElementPropsSchema } from "./elements/DatePickerElement";
|
|
15
15
|
import { type CarouselElementProps, CarouselElementPropsSchema } from "./elements/CarouselElement";
|
|
16
16
|
import { type ZStackElementProps, ZStackElementPropsSchema } from "./elements/ZStackElement";
|
|
17
|
+
import { type SafeAreaViewElementProps, SafeAreaViewElementPropsSchema } from "./elements/SafeAreaViewElement";
|
|
17
18
|
|
|
18
19
|
export type { BaseBoxProps } from "./elements/BaseBoxProps";
|
|
19
20
|
export { BaseBoxPropsSchema } from "./elements/BaseBoxProps";
|
|
@@ -31,6 +32,7 @@ export type { CheckboxGroupElementProps } from "./elements/CheckboxGroupElement"
|
|
|
31
32
|
export type { DatePickerElementProps } from "./elements/DatePickerElement";
|
|
32
33
|
export type { CarouselElementProps } from "./elements/CarouselElement";
|
|
33
34
|
export type { ZStackElementProps } from "./elements/ZStackElement";
|
|
35
|
+
export type { SafeAreaViewElementProps, SafeAreaEdge, SafeAreaEdgeMode } from "./elements/SafeAreaViewElement";
|
|
34
36
|
|
|
35
37
|
// UIElement union — must live here (not in elements/) to avoid circular deps
|
|
36
38
|
// because the Stack variant's children: UIElement[] references itself.
|
|
@@ -121,6 +123,13 @@ export type UIElement =
|
|
|
121
123
|
type: "ZStack";
|
|
122
124
|
props: ZStackElementProps;
|
|
123
125
|
children: UIElement[];
|
|
126
|
+
}
|
|
127
|
+
| {
|
|
128
|
+
id: string;
|
|
129
|
+
name?: string;
|
|
130
|
+
type: "SafeAreaView";
|
|
131
|
+
props: SafeAreaViewElementProps;
|
|
132
|
+
children: UIElement[];
|
|
124
133
|
};
|
|
125
134
|
|
|
126
135
|
export const UIElementSchema: z.ZodType<UIElement> = z.lazy(() =>
|
|
@@ -212,6 +221,13 @@ export const UIElementSchema: z.ZodType<UIElement> = z.lazy(() =>
|
|
|
212
221
|
props: ZStackElementPropsSchema,
|
|
213
222
|
children: z.array(UIElementSchema),
|
|
214
223
|
}),
|
|
224
|
+
z.object({
|
|
225
|
+
id: z.string(),
|
|
226
|
+
name: z.string().optional(),
|
|
227
|
+
type: z.literal("SafeAreaView"),
|
|
228
|
+
props: SafeAreaViewElementPropsSchema,
|
|
229
|
+
children: z.array(UIElementSchema),
|
|
230
|
+
}),
|
|
215
231
|
])
|
|
216
232
|
);
|
|
217
233
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OnboardingTemplate } from "../../Templates/OnboardingTemplate";
|
|
2
|
+
import { SafeAreaView } from "react-native-safe-area-context";
|
|
2
3
|
import { LoaderStepType, LoaderStepTypeSchema, LoaderStep } from "./types";
|
|
3
4
|
import {
|
|
4
5
|
View,
|
|
@@ -97,6 +98,7 @@ const BarsVariant = ({
|
|
|
97
98
|
const styles = createStyles(theme);
|
|
98
99
|
|
|
99
100
|
return (
|
|
101
|
+
<SafeAreaView style={{ flex: 1 }} edges={["top", "bottom"]}>
|
|
100
102
|
<OnboardingTemplate
|
|
101
103
|
step={step}
|
|
102
104
|
onContinue={onContinue}
|
|
@@ -113,6 +115,7 @@ const BarsVariant = ({
|
|
|
113
115
|
<ScrollView
|
|
114
116
|
contentContainerStyle={styles.scrollContent}
|
|
115
117
|
showsVerticalScrollIndicator={false}
|
|
118
|
+
alwaysBounceVertical={false}
|
|
116
119
|
>
|
|
117
120
|
<View style={styles.container}>
|
|
118
121
|
{/* Title */}
|
|
@@ -147,6 +150,7 @@ const BarsVariant = ({
|
|
|
147
150
|
/>
|
|
148
151
|
)}
|
|
149
152
|
</OnboardingTemplate>
|
|
153
|
+
</SafeAreaView>
|
|
150
154
|
);
|
|
151
155
|
};
|
|
152
156
|
|
|
@@ -171,10 +175,12 @@ const CircleVariant = ({
|
|
|
171
175
|
const styles = createStyles(theme);
|
|
172
176
|
|
|
173
177
|
return (
|
|
178
|
+
<SafeAreaView style={{ flex: 1 }} edges={["top", "bottom"]}>
|
|
174
179
|
<OnboardingTemplate step={step} onContinue={onContinue} theme={theme}>
|
|
175
180
|
<ScrollView
|
|
176
181
|
contentContainerStyle={styles.scrollContent}
|
|
177
182
|
showsVerticalScrollIndicator={false}
|
|
183
|
+
alwaysBounceVertical={false}
|
|
178
184
|
>
|
|
179
185
|
<View style={styles.container}>
|
|
180
186
|
{/* Circular Progress */}
|
|
@@ -201,6 +207,7 @@ const CircleVariant = ({
|
|
|
201
207
|
</View>
|
|
202
208
|
</ScrollView>
|
|
203
209
|
</OnboardingTemplate>
|
|
210
|
+
</SafeAreaView>
|
|
204
211
|
);
|
|
205
212
|
};
|
|
206
213
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OnboardingTemplate } from "../../Templates/OnboardingTemplate";
|
|
2
|
+
import { SafeAreaView } from "react-native-safe-area-context";
|
|
2
3
|
import { MediaContentStepType, MediaContentStepTypeSchema } from "./types";
|
|
3
4
|
import { View, Text, StyleSheet, Image, ScrollView } from "react-native";
|
|
4
5
|
import { Theme } from "../../Theme/types";
|
|
@@ -115,6 +116,7 @@ const MediaContentRendererBase = ({ step, onContinue, theme = defaultTheme }: Co
|
|
|
115
116
|
};
|
|
116
117
|
|
|
117
118
|
return (
|
|
119
|
+
<SafeAreaView style={{ flex: 1 }} edges={["top", "bottom"]}>
|
|
118
120
|
<OnboardingTemplate
|
|
119
121
|
step={step}
|
|
120
122
|
onContinue={onContinue}
|
|
@@ -126,6 +128,7 @@ const MediaContentRendererBase = ({ step, onContinue, theme = defaultTheme }: Co
|
|
|
126
128
|
>
|
|
127
129
|
{renderContent()}
|
|
128
130
|
</OnboardingTemplate>
|
|
131
|
+
</SafeAreaView>
|
|
129
132
|
);
|
|
130
133
|
};
|
|
131
134
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OnboardingTemplate } from "../../Templates/OnboardingTemplate";
|
|
2
|
+
import { SafeAreaView } from "react-native-safe-area-context";
|
|
2
3
|
import { PickerStepType, PickerStepTypeSchema, WeightUnit, HeightUnit } from "./types";
|
|
3
4
|
import { View, Text, StyleSheet, TextInput, KeyboardAvoidingView, Platform, TouchableWithoutFeedback, Keyboard } from "react-native";
|
|
4
5
|
import { useState } from "react";
|
|
@@ -86,6 +87,7 @@ const PickerRendererBase = ({ step, onContinue, theme = defaultTheme }: ContentP
|
|
|
86
87
|
|
|
87
88
|
// Fallback for other picker types (to be implemented)
|
|
88
89
|
return (
|
|
90
|
+
<SafeAreaView style={{ flex: 1 }} edges={["top", "bottom", "left", "right"]}>
|
|
89
91
|
<OnboardingTemplate
|
|
90
92
|
step={step}
|
|
91
93
|
onContinue={() => onContinue()}
|
|
@@ -102,6 +104,7 @@ const PickerRendererBase = ({ step, onContinue, theme = defaultTheme }: ContentP
|
|
|
102
104
|
</View>
|
|
103
105
|
</View>
|
|
104
106
|
</OnboardingTemplate>
|
|
107
|
+
</SafeAreaView>
|
|
105
108
|
);
|
|
106
109
|
};
|
|
107
110
|
|
|
@@ -145,6 +148,7 @@ const WeightPicker = ({
|
|
|
145
148
|
};
|
|
146
149
|
|
|
147
150
|
return (
|
|
151
|
+
<SafeAreaView style={{ flex: 1 }} edges={["top", "bottom", "left", "right"]}>
|
|
148
152
|
<OnboardingTemplate
|
|
149
153
|
step={step}
|
|
150
154
|
onContinue={handleContinue}
|
|
@@ -189,6 +193,7 @@ const WeightPicker = ({
|
|
|
189
193
|
</View>
|
|
190
194
|
</View>
|
|
191
195
|
</OnboardingTemplate>
|
|
196
|
+
</SafeAreaView>
|
|
192
197
|
);
|
|
193
198
|
};
|
|
194
199
|
|
|
@@ -261,6 +266,7 @@ const HeightPicker = ({
|
|
|
261
266
|
};
|
|
262
267
|
|
|
263
268
|
return (
|
|
269
|
+
<SafeAreaView style={{ flex: 1 }} edges={["top", "bottom", "left", "right"]}>
|
|
264
270
|
<OnboardingTemplate
|
|
265
271
|
step={step}
|
|
266
272
|
onContinue={handleContinue}
|
|
@@ -330,6 +336,7 @@ const HeightPicker = ({
|
|
|
330
336
|
</View>
|
|
331
337
|
</View>
|
|
332
338
|
</OnboardingTemplate>
|
|
339
|
+
</SafeAreaView>
|
|
333
340
|
);
|
|
334
341
|
};
|
|
335
342
|
|
|
@@ -361,6 +368,7 @@ const NamePicker = ({
|
|
|
361
368
|
};
|
|
362
369
|
|
|
363
370
|
return (
|
|
371
|
+
<SafeAreaView style={{ flex: 1 }} edges={["top", "bottom", "left", "right"]}>
|
|
364
372
|
<KeyboardAvoidingView
|
|
365
373
|
behavior={Platform.OS === "ios" ? "padding" : "height"}
|
|
366
374
|
style={{ flex: 1 }}
|
|
@@ -412,6 +420,7 @@ const NamePicker = ({
|
|
|
412
420
|
</View>
|
|
413
421
|
</TouchableWithoutFeedback>
|
|
414
422
|
</KeyboardAvoidingView>
|
|
423
|
+
</SafeAreaView>
|
|
415
424
|
);
|
|
416
425
|
};
|
|
417
426
|
|
|
@@ -476,6 +485,7 @@ const DatePicker = ({
|
|
|
476
485
|
};
|
|
477
486
|
|
|
478
487
|
return (
|
|
488
|
+
<SafeAreaView style={{ flex: 1 }} edges={["top", "bottom", "left", "right"]}>
|
|
479
489
|
<OnboardingTemplate
|
|
480
490
|
step={step}
|
|
481
491
|
onContinue={handleContinue}
|
|
@@ -531,6 +541,7 @@ const DatePicker = ({
|
|
|
531
541
|
</View>
|
|
532
542
|
</View>
|
|
533
543
|
</OnboardingTemplate>
|
|
544
|
+
</SafeAreaView>
|
|
534
545
|
);
|
|
535
546
|
};
|
|
536
547
|
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
StyleSheet,
|
|
9
9
|
} from "react-native";
|
|
10
10
|
import { OnboardingTemplate } from "../../Templates/OnboardingTemplate";
|
|
11
|
+
import { SafeAreaView } from "react-native-safe-area-context";
|
|
11
12
|
import { getTextStyle } from "../../Theme/helpers";
|
|
12
13
|
import { Theme } from "../../Theme/types";
|
|
13
14
|
import { defaultTheme } from "../../Theme/defaultTheme";
|
|
@@ -86,6 +87,7 @@ const QuestionRendererBase = ({ step, onContinue, theme = defaultTheme, customCo
|
|
|
86
87
|
customComponents?.QuestionAnswerButton || DefaultQuestionAnswerButton;
|
|
87
88
|
|
|
88
89
|
return (
|
|
90
|
+
<SafeAreaView style={{ flex: 1 }} edges={["top", "bottom"]}>
|
|
89
91
|
<OnboardingTemplate
|
|
90
92
|
step={step}
|
|
91
93
|
onContinue={handleContinue || (() => { })}
|
|
@@ -127,6 +129,7 @@ const QuestionRendererBase = ({ step, onContinue, theme = defaultTheme, customCo
|
|
|
127
129
|
style={styles.scrollView}
|
|
128
130
|
contentContainerStyle={styles.scrollContent}
|
|
129
131
|
showsVerticalScrollIndicator={false}
|
|
132
|
+
alwaysBounceVertical={false}
|
|
130
133
|
>
|
|
131
134
|
<AnswersList
|
|
132
135
|
answers={answers}
|
|
@@ -139,6 +142,7 @@ const QuestionRendererBase = ({ step, onContinue, theme = defaultTheme, customCo
|
|
|
139
142
|
</View>
|
|
140
143
|
</View>
|
|
141
144
|
</OnboardingTemplate>
|
|
145
|
+
</SafeAreaView>
|
|
142
146
|
);
|
|
143
147
|
};
|
|
144
148
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Image, ScrollView, StyleSheet, Text, View } from "react-native";
|
|
2
2
|
import Svg, { Path } from "react-native-svg";
|
|
3
3
|
import { OnboardingTemplate } from "../../Templates/OnboardingTemplate";
|
|
4
|
+
import { SafeAreaView } from "react-native-safe-area-context";
|
|
4
5
|
import { RatingsStepType, RatingsStepTypeSchema } from "./types";
|
|
5
6
|
import { useState } from "react";
|
|
6
7
|
import { Theme } from "../../Theme/types";
|
|
@@ -76,6 +77,7 @@ const RatingsRendererBase = ({ step, onContinue, theme = defaultTheme }: Ratings
|
|
|
76
77
|
};
|
|
77
78
|
|
|
78
79
|
return (
|
|
80
|
+
<SafeAreaView style={{ flex: 1 }} edges={["top", "bottom"]}>
|
|
79
81
|
<OnboardingTemplate
|
|
80
82
|
step={step}
|
|
81
83
|
onContinue={handlePress}
|
|
@@ -92,6 +94,7 @@ const RatingsRendererBase = ({ step, onContinue, theme = defaultTheme }: Ratings
|
|
|
92
94
|
<ScrollView
|
|
93
95
|
contentContainerStyle={styles.scrollContent}
|
|
94
96
|
showsVerticalScrollIndicator={false}
|
|
97
|
+
alwaysBounceVertical={false}
|
|
95
98
|
>
|
|
96
99
|
{/* Award Section */}
|
|
97
100
|
<View style={styles.awardSection}>
|
|
@@ -168,6 +171,7 @@ const RatingsRendererBase = ({ step, onContinue, theme = defaultTheme }: Ratings
|
|
|
168
171
|
</ScrollView>
|
|
169
172
|
</View>
|
|
170
173
|
</OnboardingTemplate>
|
|
174
|
+
</SafeAreaView>
|
|
171
175
|
);
|
|
172
176
|
};
|
|
173
177
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
|
|
2
2
|
import { OnboardingStepType } from "../types";
|
|
3
|
-
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
4
3
|
import { getTextStyle } from "../Theme/helpers";
|
|
5
4
|
import { Theme } from "../Theme/types";
|
|
6
5
|
import { defaultTheme } from "../Theme/defaultTheme";
|
|
@@ -60,16 +59,13 @@ export const OnboardingTemplate = ({
|
|
|
60
59
|
button,
|
|
61
60
|
theme = defaultTheme,
|
|
62
61
|
}: OnboardingTemplateProps) => {
|
|
63
|
-
const { top, bottom } = useSafeAreaInsets();
|
|
64
|
-
|
|
65
62
|
return (
|
|
66
63
|
<View
|
|
67
64
|
style={[
|
|
68
65
|
styles.container,
|
|
69
66
|
{
|
|
70
67
|
backgroundColor: theme.colors.neutral.lowest,
|
|
71
|
-
paddingTop: step.displayProgressHeader ?
|
|
72
|
-
paddingBottom: bottom
|
|
68
|
+
paddingTop: step.displayProgressHeader ? 40 : 0,
|
|
73
69
|
},
|
|
74
70
|
]}
|
|
75
71
|
>
|