@rocapine/react-native-onboarding-ui 1.1.3 → 1.1.6

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.
Files changed (87) hide show
  1. package/dist/UI/ErrorBoundary/ErrorBoundary.d.ts +1 -1
  2. package/dist/UI/Pages/Carousel/Renderer.d.ts.map +1 -1
  3. package/dist/UI/Pages/Carousel/Renderer.js +5 -1
  4. package/dist/UI/Pages/Carousel/Renderer.js.map +1 -1
  5. package/dist/UI/Pages/Carousel/types.d.ts +4 -0
  6. package/dist/UI/Pages/Carousel/types.d.ts.map +1 -1
  7. package/dist/UI/Pages/Carousel/types.js +1 -0
  8. package/dist/UI/Pages/Carousel/types.js.map +1 -1
  9. package/dist/UI/Pages/Commitment/Renderer.d.ts.map +1 -1
  10. package/dist/UI/Pages/Commitment/Renderer.js +3 -1
  11. package/dist/UI/Pages/Commitment/Renderer.js.map +1 -1
  12. package/dist/UI/Pages/Commitment/types.d.ts +4 -0
  13. package/dist/UI/Pages/Commitment/types.d.ts.map +1 -1
  14. package/dist/UI/Pages/Commitment/types.js +1 -0
  15. package/dist/UI/Pages/Commitment/types.js.map +1 -1
  16. package/dist/UI/Pages/Loader/Renderer.d.ts.map +1 -1
  17. package/dist/UI/Pages/Loader/Renderer.js +7 -1
  18. package/dist/UI/Pages/Loader/Renderer.js.map +1 -1
  19. package/dist/UI/Pages/Loader/types.d.ts +4 -0
  20. package/dist/UI/Pages/Loader/types.d.ts.map +1 -1
  21. package/dist/UI/Pages/Loader/types.js +1 -0
  22. package/dist/UI/Pages/Loader/types.js.map +1 -1
  23. package/dist/UI/Pages/MediaContent/Renderer.d.ts.map +1 -1
  24. package/dist/UI/Pages/MediaContent/Renderer.js +39 -12
  25. package/dist/UI/Pages/MediaContent/Renderer.js.map +1 -1
  26. package/dist/UI/Pages/MediaContent/types.d.ts +19 -0
  27. package/dist/UI/Pages/MediaContent/types.d.ts.map +1 -1
  28. package/dist/UI/Pages/MediaContent/types.js +6 -1
  29. package/dist/UI/Pages/MediaContent/types.js.map +1 -1
  30. package/dist/UI/Pages/Picker/Renderer.d.ts.map +1 -1
  31. package/dist/UI/Pages/Picker/Renderer.js +11 -5
  32. package/dist/UI/Pages/Picker/Renderer.js.map +1 -1
  33. package/dist/UI/Pages/Picker/types.d.ts +4 -0
  34. package/dist/UI/Pages/Picker/types.d.ts.map +1 -1
  35. package/dist/UI/Pages/Picker/types.js +1 -0
  36. package/dist/UI/Pages/Picker/types.js.map +1 -1
  37. package/dist/UI/Pages/Question/Renderer.d.ts.map +1 -1
  38. package/dist/UI/Pages/Question/Renderer.js +5 -1
  39. package/dist/UI/Pages/Question/Renderer.js.map +1 -1
  40. package/dist/UI/Pages/Question/types.d.ts +5 -0
  41. package/dist/UI/Pages/Question/types.d.ts.map +1 -1
  42. package/dist/UI/Pages/Question/types.js +2 -0
  43. package/dist/UI/Pages/Question/types.js.map +1 -1
  44. package/dist/UI/Pages/Ratings/Renderer.d.ts.map +1 -1
  45. package/dist/UI/Pages/Ratings/Renderer.js +3 -1
  46. package/dist/UI/Pages/Ratings/Renderer.js.map +1 -1
  47. package/dist/UI/Pages/Ratings/types.d.ts +4 -0
  48. package/dist/UI/Pages/Ratings/types.d.ts.map +1 -1
  49. package/dist/UI/Pages/Ratings/types.js +1 -0
  50. package/dist/UI/Pages/Ratings/types.js.map +1 -1
  51. package/dist/UI/Pages/types.d.ts +4 -0
  52. package/dist/UI/Pages/types.d.ts.map +1 -1
  53. package/dist/UI/Pages/types.js +5 -1
  54. package/dist/UI/Pages/types.js.map +1 -1
  55. package/dist/UI/Templates/OnboardingTemplate.d.ts +1 -0
  56. package/dist/UI/Templates/OnboardingTemplate.d.ts.map +1 -1
  57. package/dist/UI/Templates/OnboardingTemplate.js +86 -2
  58. package/dist/UI/Templates/OnboardingTemplate.js.map +1 -1
  59. package/package.json +1 -1
  60. package/src/UI/Pages/Carousel/Renderer.tsx +4 -1
  61. package/src/UI/Pages/Carousel/types.ts +2 -1
  62. package/src/UI/Pages/Commitment/Renderer.tsx +2 -1
  63. package/src/UI/Pages/Commitment/types.ts +2 -1
  64. package/src/UI/Pages/Loader/Renderer.tsx +6 -1
  65. package/src/UI/Pages/Loader/types.ts +2 -1
  66. package/src/UI/Pages/MediaContent/Renderer.tsx +4 -1
  67. package/src/UI/Pages/MediaContent/types.ts +2 -0
  68. package/src/UI/Pages/Picker/Renderer.tsx +6 -5
  69. package/src/UI/Pages/Picker/types.ts +2 -1
  70. package/src/UI/Pages/Question/Renderer.tsx +4 -1
  71. package/src/UI/Pages/Question/types.ts +3 -1
  72. package/src/UI/Pages/Ratings/Renderer.tsx +2 -1
  73. package/src/UI/Pages/Ratings/types.ts +2 -1
  74. package/src/UI/Pages/types.ts +5 -0
  75. package/src/UI/Templates/OnboardingTemplate.tsx +73 -10
  76. package/dist/provider/CustomComponentsContext.d.ts +0 -57
  77. package/dist/provider/CustomComponentsContext.d.ts.map +0 -1
  78. package/dist/provider/CustomComponentsContext.js +0 -19
  79. package/dist/provider/CustomComponentsContext.js.map +0 -1
  80. package/dist/provider/OnboardingUIProvider.d.ts +0 -44
  81. package/dist/provider/OnboardingUIProvider.d.ts.map +0 -1
  82. package/dist/provider/OnboardingUIProvider.js +0 -33
  83. package/dist/provider/OnboardingUIProvider.js.map +0 -1
  84. package/dist/provider/OnboardingUIProvider.old.d.ts +0 -60
  85. package/dist/provider/OnboardingUIProvider.old.d.ts.map +0 -1
  86. package/dist/provider/OnboardingUIProvider.old.js +0 -53
  87. package/dist/provider/OnboardingUIProvider.old.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"OnboardingTemplate.js","sourceRoot":"","sources":["../../../src/UI/Templates/OnboardingTemplate.tsx"],"names":[],"mappings":";;;;AAAA,+CAAwE;AAExE,mFAAmE;AACnE,8CAAgD;AAEhD,wDAAqD;AAa9C,MAAM,kBAAkB,GAAG,CAAC,EACjC,QAAQ,EACR,UAAU,EACV,IAAI,EACJ,MAAM,EACN,KAA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,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE;oCACrC,MAAM,CAAC,QAAQ,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE;iCACxD,YAEA,MAAM,CAAC,IAAI,GACP,IACF,CACR,CAAC,CAAC,CAAC,CACF,uBAAC,mBAAI,IACH,KAAK,EAAE;4BACL,IAAA,sBAAY,EAAC,KAAK,EAAE,QAAQ,CAAC;4BAC7B,MAAM,CAAC,aAAa;4BACpB,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE;4BACrC,MAAM,CAAC,QAAQ,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE;yBACxD,YAEA,MAAM,CAAC,IAAI,GACP,CACR,GACgB,GACd,CACR,IACI,CACR,CAAC;AACJ,CAAC,CAAC;AArEW,QAAA,kBAAkB,sBAqE7B;AAEF,MAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,IAAI,EAAE,CAAC;KACR;IACD,aAAa,EAAE;QACb,iBAAiB,EAAE,EAAE;QACrB,GAAG,EAAE,EAAE;QACP,UAAU,EAAE,QAAQ;KACrB;IACD,SAAS,EAAE;QACT,YAAY,EAAE,EAAE;QAChB,eAAe,EAAE,EAAE;QACnB,iBAAiB,EAAE,EAAE;QACrB,QAAQ,EAAE,GAAG;QACb,UAAU,EAAE,QAAQ;KACrB;IACD,aAAa,EAAE,EAAE;IACjB,gBAAgB,EAAE;QAChB,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;QACpB,GAAG,EAAE,CAAC;KACP;CACF,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rocapine/react-native-onboarding-ui",
3
- "version": "1.1.3",
3
+ "version": "1.1.6",
4
4
  "description": "UI components and renderers for Rocapine Onboarding Studio - Built on top of the headless SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -63,7 +63,10 @@ const CarouselRendererBase = ({ step, onContinue, theme = defaultTheme }: Conten
63
63
  onContinue={handleButtonPress}
64
64
  theme={theme}
65
65
  button={{
66
- text: isLastPage ? validatedData.continueButtonLabel : "Next",
66
+ text: isLastPage
67
+ ? (validatedData.buttonSection?.label?.trim() || validatedData.continueButtonLabel)
68
+ : "Next",
69
+ icon: isLastPage ? (validatedData.buttonSection?.icon?.trim() || null) : null,
67
70
  }}
68
71
  >
69
72
  <View style={styles.container}>
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { CustomPayloadSchema } from "../types";
2
+ import { ButtonSectionSchema, CustomPayloadSchema } from "../types";
3
3
 
4
4
  export const CarouselScreenSchema = z.object({
5
5
  mediaUrl: z.string(),
@@ -19,6 +19,7 @@ export const CarouselStepTypeSchema = z.object({
19
19
  payload: CarouselStepPayloadSchema,
20
20
  customPayload: CustomPayloadSchema,
21
21
  continueButtonLabel: z.string().optional().default("Continue"),
22
+ buttonSection: ButtonSectionSchema.optional(),
22
23
  figmaUrl: z.string().nullish(),
23
24
  });
24
25
 
@@ -85,7 +85,8 @@ const CommitmentRendererBase = ({ step, onContinue, theme = defaultTheme }: Cont
85
85
  onContinue={onContinue}
86
86
  theme={theme}
87
87
  button={{
88
- text: validatedData.continueButtonLabel,
88
+ text: validatedData.buttonSection?.label?.trim() || validatedData.continueButtonLabel,
89
+ icon: validatedData.buttonSection?.icon?.trim() || null,
89
90
  disabled: isButtonDisabled,
90
91
  }}
91
92
  >
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { CustomPayloadSchema } from "../types";
2
+ import { ButtonSectionSchema, CustomPayloadSchema } from "../types";
3
3
 
4
4
  export const CommitmentItemSchema = z.object({
5
5
  text: z.string(),
@@ -22,6 +22,7 @@ export const CommitmentStepTypeSchema = z.object({
22
22
  payload: CommitmentStepPayloadSchema,
23
23
  customPayload: CustomPayloadSchema,
24
24
  continueButtonLabel: z.string().optional().default("Continue"),
25
+ buttonSection: ButtonSectionSchema.optional(),
25
26
  figmaUrl: z.string().nullish(),
26
27
  });
27
28
 
@@ -102,7 +102,12 @@ const BarsVariant = ({
102
102
  onContinue={onContinue}
103
103
  theme={theme}
104
104
  button={
105
- isComplete ? { text: validatedData.continueButtonLabel } : undefined
105
+ isComplete
106
+ ? {
107
+ text: validatedData.buttonSection?.label?.trim() || validatedData.continueButtonLabel,
108
+ icon: validatedData.buttonSection?.icon?.trim() || null,
109
+ }
110
+ : undefined
106
111
  }
107
112
  >
108
113
  <ScrollView
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { CustomPayloadSchema, MediaSourceSchema } from "../types";
2
+ import { ButtonSectionSchema, CustomPayloadSchema, MediaSourceSchema } from "../types";
3
3
 
4
4
  export const LoaderStepSchema = z.object({
5
5
  label: z.string(),
@@ -25,6 +25,7 @@ export const LoaderStepTypeSchema = z.object({
25
25
  payload: LoaderStepPayloadSchema,
26
26
  customPayload: CustomPayloadSchema,
27
27
  continueButtonLabel: z.string().optional().default("Continue"),
28
+ buttonSection: ButtonSectionSchema.optional(),
28
29
  figmaUrl: z.string().nullish(),
29
30
  });
30
31
 
@@ -119,7 +119,10 @@ const MediaContentRendererBase = ({ step, onContinue, theme = defaultTheme }: Co
119
119
  step={step}
120
120
  onContinue={onContinue}
121
121
  theme={theme}
122
- button={{ text: validatedData.continueButtonLabel }}
122
+ button={{
123
+ text: validatedData.buttonSection?.label?.trim() || validatedData.continueButtonLabel,
124
+ icon: validatedData.buttonSection?.icon?.trim() || null,
125
+ }}
123
126
  >
124
127
  {renderContent()}
125
128
  </OnboardingTemplate>
@@ -1,5 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import {
3
+ ButtonSectionSchema,
3
4
  CustomPayloadSchema,
4
5
  MediaSourceSchema,
5
6
  SocialProofSchema,
@@ -25,6 +26,7 @@ export const MediaContentStepTypeSchema = z.object({
25
26
  payload: MediaContentStepPayloadSchema,
26
27
  customPayload: CustomPayloadSchema,
27
28
  continueButtonLabel: z.string().optional().default("Continue"),
29
+ buttonSection: ButtonSectionSchema.optional(),
28
30
  figmaUrl: z.string().nullish(),
29
31
  });
30
32
 
@@ -90,7 +90,7 @@ const PickerRendererBase = ({ step, onContinue, theme = defaultTheme }: ContentP
90
90
  step={step}
91
91
  onContinue={() => onContinue()}
92
92
  theme={theme}
93
- button={{ text: validatedData.continueButtonLabel }}
93
+ button={{ text: validatedData.buttonSection?.label?.trim() || validatedData.continueButtonLabel, icon: validatedData.buttonSection?.icon?.trim() || null }}
94
94
  >
95
95
  <View style={styles.container}>
96
96
  <Text style={[getTextStyle(theme, "heading1"), styles.title, { color: theme.colors.text.primary }]}>{title}</Text>
@@ -149,7 +149,7 @@ const WeightPicker = ({
149
149
  step={step}
150
150
  onContinue={handleContinue}
151
151
  theme={theme}
152
- button={{ text: step.continueButtonLabel }}
152
+ button={{ text: step.buttonSection?.label?.trim() || step.continueButtonLabel, icon: step.buttonSection?.icon?.trim() || null }}
153
153
  >
154
154
  <View style={styles.container}>
155
155
  <View style={styles.textContainer}>
@@ -265,7 +265,7 @@ const HeightPicker = ({
265
265
  step={step}
266
266
  onContinue={handleContinue}
267
267
  theme={theme}
268
- button={{ text: step.continueButtonLabel }}
268
+ button={{ text: step.buttonSection?.label?.trim() || step.continueButtonLabel, icon: step.buttonSection?.icon?.trim() || null }}
269
269
  >
270
270
  <View style={styles.container}>
271
271
  <View style={styles.textContainer}>
@@ -372,7 +372,8 @@ const NamePicker = ({
372
372
  onContinue={handleContinue}
373
373
  theme={theme}
374
374
  button={{
375
- text: step.continueButtonLabel,
375
+ text: step.buttonSection?.label?.trim() || step.continueButtonLabel,
376
+ icon: step.buttonSection?.icon?.trim() || null,
376
377
  disabled: !name.trim(),
377
378
  }}
378
379
  >
@@ -479,7 +480,7 @@ const DatePicker = ({
479
480
  step={step}
480
481
  onContinue={handleContinue}
481
482
  theme={theme}
482
- button={{ text: step.continueButtonLabel }}
483
+ button={{ text: step.buttonSection?.label?.trim() || step.continueButtonLabel, icon: step.buttonSection?.icon?.trim() || null }}
483
484
  >
484
485
  <View style={styles.container}>
485
486
  <View style={styles.textContainer}>
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { CustomPayloadSchema } from "../types";
2
+ import { ButtonSectionSchema, CustomPayloadSchema } from "../types";
3
3
 
4
4
  export const PickerTypeEnum = z.enum([
5
5
  "height",
@@ -25,6 +25,7 @@ export const PickerStepTypeSchema = z.object({
25
25
  payload: PickerStepPayloadSchema,
26
26
  customPayload: CustomPayloadSchema,
27
27
  continueButtonLabel: z.string().optional().default("Continue"),
28
+ buttonSection: ButtonSectionSchema.optional(),
28
29
  figmaUrl: z.string().nullish(),
29
30
  });
30
31
 
@@ -90,7 +90,10 @@ const QuestionRendererBase = ({ step, onContinue, theme = defaultTheme, customCo
90
90
  step={step}
91
91
  onContinue={handleContinue || (() => { })}
92
92
  theme={theme}
93
- button={multipleAnswer && isAnySelected ? { text: "Continue" } : undefined}
93
+ button={multipleAnswer && isAnySelected ? {
94
+ text: validatedData.buttonSection?.label?.trim() || validatedData.continueButtonLabel,
95
+ icon: validatedData.buttonSection?.icon?.trim() || null,
96
+ } : undefined}
94
97
  >
95
98
  <View style={styles.container}>
96
99
  {/* Main Content */}
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { CustomPayloadSchema, InfoBoxSchema } from "../types";
2
+ import { ButtonSectionSchema, CustomPayloadSchema, InfoBoxSchema } from "../types";
3
3
 
4
4
  export const AnswerSchema = z.object({
5
5
  label: z.string(),
@@ -23,6 +23,8 @@ export const QuestionStepTypeSchema = z.object({
23
23
  displayProgressHeader: z.boolean(),
24
24
  payload: QuestionStepPayloadSchema,
25
25
  customPayload: CustomPayloadSchema,
26
+ continueButtonLabel: z.string().optional().default("Continue"),
27
+ buttonSection: ButtonSectionSchema.optional(),
26
28
  figmaUrl: z.string().nullish(),
27
29
  });
28
30
 
@@ -83,7 +83,8 @@ const RatingsRendererBase = ({ step, onContinue, theme = defaultTheme }: Ratings
83
83
  button={{
84
84
  text: !hasOpenedRequestReview
85
85
  ? rateTheAppButtonLabel
86
- : validatedData.continueButtonLabel,
86
+ : (validatedData.buttonSection?.label?.trim() || validatedData.continueButtonLabel),
87
+ icon: hasOpenedRequestReview ? (validatedData.buttonSection?.icon?.trim() || null) : null,
87
88
  }}
88
89
  >
89
90
  <View style={styles.container}>
@@ -1,5 +1,5 @@
1
1
  import z from "zod";
2
- import { CustomPayloadSchema, SocialProofSchema } from "../types";
2
+ import { ButtonSectionSchema, CustomPayloadSchema, SocialProofSchema } from "../types";
3
3
 
4
4
  export const RatingsStepPayloadSchema = z.object({
5
5
  title: z.string(),
@@ -16,6 +16,7 @@ export const RatingsStepTypeSchema = z.object({
16
16
  payload: RatingsStepPayloadSchema,
17
17
  customPayload: CustomPayloadSchema,
18
18
  continueButtonLabel: z.string().optional().default("Continue"),
19
+ buttonSection: ButtonSectionSchema.optional(),
19
20
  figmaUrl: z.string().nullish(),
20
21
  });
21
22
 
@@ -23,3 +23,8 @@ export const InfoBoxSchema = z.object({
23
23
  title: z.string(),
24
24
  content: z.string(),
25
25
  });
26
+
27
+ export const ButtonSectionSchema = z.object({
28
+ label: z.string().optional(),
29
+ icon: z.string().nullish(),
30
+ });
@@ -4,6 +4,42 @@ import { useSafeAreaInsets } from "react-native-safe-area-context";
4
4
  import { getTextStyle } from "../Theme/helpers";
5
5
  import { Theme } from "../Theme/types";
6
6
  import { defaultTheme } from "../Theme/defaultTheme";
7
+ import * as LucideIcons from "lucide-react-native";
8
+
9
+ function lucideIconLookupKeys(raw: string): string[] {
10
+ const s = raw.trim();
11
+ if (!s) return [];
12
+ const keys: string[] = [s];
13
+ if (/[-_\s]/.test(s)) {
14
+ const pascal = s
15
+ .split(/[-_\s]+/)
16
+ .filter(Boolean)
17
+ .map((w) => w.charAt(0).toUpperCase() + w.slice(1).toLowerCase())
18
+ .join("");
19
+ if (pascal && !keys.includes(pascal)) keys.push(pascal);
20
+ }
21
+ if (/^[a-z][a-z0-9]*$/.test(s)) {
22
+ const cap = s.charAt(0).toUpperCase() + s.slice(1);
23
+ if (!keys.includes(cap)) keys.push(cap);
24
+ }
25
+ if (/^[A-Z0-9]+$/.test(s) && s.length > 1) {
26
+ const title = s.charAt(0) + s.slice(1).toLowerCase();
27
+ if (!keys.includes(title)) keys.push(title);
28
+ }
29
+ return keys;
30
+ }
31
+
32
+ function resolveIcon(iconName: string, color: string): React.ReactElement | null {
33
+ if (!iconName?.trim()) return null;
34
+ const mod = LucideIcons as Record<string, any>;
35
+ for (const key of lucideIconLookupKeys(iconName)) {
36
+ const IconComponent = mod[key];
37
+ if (IconComponent != null) {
38
+ return <IconComponent size={20} color={color} strokeWidth={2} />;
39
+ }
40
+ }
41
+ return null;
42
+ }
7
43
 
8
44
  type OnboardingTemplateProps = {
9
45
  children: React.ReactNode;
@@ -11,6 +47,7 @@ type OnboardingTemplateProps = {
11
47
  button?: {
12
48
  text: string;
13
49
  disabled?: boolean;
50
+ icon?: string | null;
14
51
  };
15
52
  step: OnboardingStepType;
16
53
  theme?: Theme;
@@ -49,16 +86,37 @@ export const OnboardingTemplate = ({
49
86
  activeOpacity={0.8}
50
87
  disabled={button.disabled}
51
88
  >
52
- <Text
53
- style={[
54
- getTextStyle(theme, "button"),
55
- styles.ctaButtonText,
56
- { color: theme.colors.text.opposite },
57
- button.disabled && { color: theme.colors.text.disable },
58
- ]}
59
- >
60
- {button.text}
61
- </Text>
89
+ {button.icon ? (
90
+ <View style={styles.ctaButtonContent}>
91
+ {resolveIcon(
92
+ button.icon,
93
+ button.disabled
94
+ ? theme.colors.text.disable
95
+ : theme.colors.text.opposite
96
+ )}
97
+ <Text
98
+ style={[
99
+ getTextStyle(theme, "button"),
100
+ styles.ctaButtonText,
101
+ { color: theme.colors.text.opposite },
102
+ button.disabled && { color: theme.colors.text.disable },
103
+ ]}
104
+ >
105
+ {button.text}
106
+ </Text>
107
+ </View>
108
+ ) : (
109
+ <Text
110
+ style={[
111
+ getTextStyle(theme, "button"),
112
+ styles.ctaButtonText,
113
+ { color: theme.colors.text.opposite },
114
+ button.disabled && { color: theme.colors.text.disable },
115
+ ]}
116
+ >
117
+ {button.text}
118
+ </Text>
119
+ )}
62
120
  </TouchableOpacity>
63
121
  </View>
64
122
  )}
@@ -83,4 +141,9 @@ const styles = StyleSheet.create({
83
141
  alignItems: "center",
84
142
  },
85
143
  ctaButtonText: {},
144
+ ctaButtonContent: {
145
+ flexDirection: "row",
146
+ alignItems: "center",
147
+ gap: 8,
148
+ },
86
149
  });
@@ -1,57 +0,0 @@
1
- import React from "react";
2
- import { QuestionAnswerButtonProps, QuestionAnswersListProps } from "../UI/Pages/Question/components";
3
- /**
4
- * Custom components that can be provided to override default implementations.
5
- * Allows full UI customization for specific parts of the onboarding flow.
6
- */
7
- export interface CustomComponents {
8
- /**
9
- * Custom component for individual Question answer buttons.
10
- * Replaces the default button styling while keeping list logic.
11
- *
12
- * @example
13
- * ```tsx
14
- * const MyButton = ({ answer, selected, onPress, theme }) => (
15
- * <TouchableOpacity onPress={onPress} style={{ height: 96 }}>
16
- * <Text>{answer.label}</Text>
17
- * </TouchableOpacity>
18
- * );
19
- *
20
- * <OnboardingProvider customComponents={{ QuestionAnswerButton: MyButton }} />
21
- * ```
22
- */
23
- QuestionAnswerButton?: React.ComponentType<QuestionAnswerButtonProps>;
24
- /**
25
- * Custom component for the entire Question answers list.
26
- * Provides full control over list rendering, animations, and layout.
27
- * Takes priority over QuestionAnswerButton.
28
- *
29
- * @example
30
- * ```tsx
31
- * const MyList = ({ answers, selected, onAnswerPress, theme }) => (
32
- * <Animated.View>
33
- * {answers.map(answer => (
34
- * <MyButton key={answer.value} answer={answer} />
35
- * ))}
36
- * </Animated.View>
37
- * );
38
- *
39
- * <OnboardingProvider customComponents={{ QuestionAnswersList: MyList }} />
40
- * ```
41
- */
42
- QuestionAnswersList?: React.ComponentType<QuestionAnswersListProps>;
43
- }
44
- /**
45
- * Provider for custom components.
46
- * Wraps the app to make custom components available to all renderers.
47
- */
48
- export declare const CustomComponentsProvider: React.FC<{
49
- children: React.ReactNode;
50
- components?: CustomComponents;
51
- }>;
52
- /**
53
- * Hook to access custom components from context.
54
- * Returns empty object if no custom components are provided.
55
- */
56
- export declare const useCustomComponents: () => CustomComponents;
57
- //# sourceMappingURL=CustomComponentsContext.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CustomComponentsContext.d.ts","sourceRoot":"","sources":["../../src/provider/CustomComponentsContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACzB,MAAM,iCAAiC,CAAC;AAEzC;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;;;;;;;;OAcG;IACH,oBAAoB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,yBAAyB,CAAC,CAAC;IAEtE;;;;;;;;;;;;;;;;;OAiBG;IACH,mBAAmB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,wBAAwB,CAAC,CAAC;CAMrE;AAID;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC;IAC9C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B,CAIA,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,wBAA4C,CAAC"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useCustomComponents = exports.CustomComponentsProvider = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("react");
6
- const CustomComponentsContext = (0, react_1.createContext)({});
7
- /**
8
- * Provider for custom components.
9
- * Wraps the app to make custom components available to all renderers.
10
- */
11
- const CustomComponentsProvider = ({ children, components = {} }) => ((0, jsx_runtime_1.jsx)(CustomComponentsContext.Provider, { value: components, children: children }));
12
- exports.CustomComponentsProvider = CustomComponentsProvider;
13
- /**
14
- * Hook to access custom components from context.
15
- * Returns empty object if no custom components are provided.
16
- */
17
- const useCustomComponents = () => (0, react_1.useContext)(CustomComponentsContext);
18
- exports.useCustomComponents = useCustomComponents;
19
- //# sourceMappingURL=CustomComponentsContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CustomComponentsContext.js","sourceRoot":"","sources":["../../src/provider/CustomComponentsContext.tsx"],"names":[],"mappings":";;;;AAAA,iCAAyD;AAsDzD,MAAM,uBAAuB,GAAG,IAAA,qBAAa,EAAmB,EAAE,CAAC,CAAC;AAEpE;;;GAGG;AACI,MAAM,wBAAwB,GAGhC,CAAC,EAAE,QAAQ,EAAE,UAAU,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,CACtC,uBAAC,uBAAuB,CAAC,QAAQ,IAAC,KAAK,EAAE,UAAU,YAChD,QAAQ,GACwB,CACpC,CAAC;AAPW,QAAA,wBAAwB,4BAOnC;AAEF;;;GAGG;AACI,MAAM,mBAAmB,GAAG,GAAG,EAAE,CAAC,IAAA,kBAAU,EAAC,uBAAuB,CAAC,CAAC;AAAhE,QAAA,mBAAmB,uBAA6C"}
@@ -1,44 +0,0 @@
1
- import { ColorScheme, DeepPartial, Theme } from "../UI/Theme/types";
2
- import { CustomComponents } from "./CustomComponentsContext";
3
- interface OnboardingUIProviderProps {
4
- children: React.ReactNode;
5
- initialColorScheme?: ColorScheme;
6
- locale?: string;
7
- customAudienceParams?: Record<string, any>;
8
- /**
9
- * Custom theme to override default theme tokens for both light and dark modes.
10
- * Partial overrides are supported - only provide the tokens you want to customize.
11
- */
12
- theme?: DeepPartial<Theme>;
13
- /**
14
- * Custom theme tokens for light mode only.
15
- * Partial overrides are supported - only provide the tokens you want to customize.
16
- */
17
- lightTheme?: DeepPartial<Theme>;
18
- /**
19
- * Custom theme tokens for dark mode only.
20
- * Partial overrides are supported - only provide the tokens you want to customize.
21
- */
22
- darkTheme?: DeepPartial<Theme>;
23
- /**
24
- * Custom components to replace default implementations.
25
- * Allows full UI customization for specific parts of the onboarding flow.
26
- * @example
27
- * ```tsx
28
- * <OnboardingUIProvider
29
- * customComponents={{
30
- * QuestionAnswerButton: MyCustomButton,
31
- * QuestionAnswersList: MyCustomList
32
- * }}
33
- * />
34
- * ```
35
- */
36
- customComponents?: CustomComponents;
37
- }
38
- /**
39
- * UI Provider that wraps the headless OnboardingProvider with theme, progress tracking, and custom components.
40
- * Use this provider when you want the complete UI experience with all features.
41
- */
42
- export declare const OnboardingUIProvider: ({ children, client, initialColorScheme, locale, customAudienceParams, theme, lightTheme, darkTheme, customComponents, }: OnboardingUIProviderProps) => import("react/jsx-runtime").JSX.Element;
43
- export {};
44
- //# sourceMappingURL=OnboardingUIProvider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OnboardingUIProvider.d.ts","sourceRoot":"","sources":["../../src/provider/OnboardingUIProvider.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAEL,gBAAgB,EACjB,MAAM,2BAA2B,CAAC;AAGnC,UAAU,yBAAyB;IACjC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,kBAAkB,CAAC,EAAE,WAAW,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3C;;;OAGG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAC3B;;;OAGG;IACH,UAAU,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAChC;;;OAGG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAC/B;;;;;;;;;;;;OAYG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAAI,yHAUlC,yBAAyB,4CAwC3B,CAAC"}
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OnboardingUIProvider = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("react");
6
- const react_native_onboarding_1 = require("@rocapine/react-native-onboarding");
7
- const ThemeProvider_1 = require("../UI/Theme/ThemeProvider");
8
- const CustomComponentsContext_1 = require("./CustomComponentsContext");
9
- /**
10
- * UI Provider that wraps the headless OnboardingProvider with theme, progress tracking, and custom components.
11
- * Use this provider when you want the complete UI experience with all features.
12
- */
13
- const OnboardingUIProvider = ({ children, client, initialColorScheme = "light", locale = "en", customAudienceParams = {}, theme, lightTheme, darkTheme, customComponents, }) => {
14
- const [activeStep, setActiveStep] = (0, react_1.useState)({
15
- number: 0,
16
- displayProgressHeader: false,
17
- });
18
- const [totalSteps, setTotalSteps] = (0, react_1.useState)(0);
19
- const [onboarding, setOnboarding] = (0, react_1.useState)(null);
20
- return ((0, jsx_runtime_1.jsx)(react_native_onboarding_1.OnboardingProvider, { client: client, locale: locale, customAudienceParams: customAudienceParams, children: (0, jsx_runtime_1.jsx)(ThemeProvider_1.ThemeProvider, { initialColorScheme: initialColorScheme, customTheme: theme, customLightTheme: lightTheme, customDarkTheme: darkTheme, children: (0, jsx_runtime_1.jsx)(CustomComponentsContext_1.CustomComponentsProvider, { components: customComponents, children: (0, jsx_runtime_1.jsx)(OnboardingProgressContext.Provider, { value: {
21
- activeStep,
22
- setActiveStep,
23
- totalSteps,
24
- setTotalSteps,
25
- client,
26
- locale,
27
- customAudienceParams,
28
- onboarding,
29
- setOnboarding,
30
- }, children: children }) }) }) }));
31
- };
32
- exports.OnboardingUIProvider = OnboardingUIProvider;
33
- //# sourceMappingURL=OnboardingUIProvider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OnboardingUIProvider.js","sourceRoot":"","sources":["../../src/provider/OnboardingUIProvider.tsx"],"names":[],"mappings":";;;;AAAA,iCAAgD;AAChD,+EAK2C;AAC3C,6DAA0D;AAE1D,uEAGmC;AAuCnC;;;GAGG;AACI,MAAM,oBAAoB,GAAG,CAAC,EACnC,QAAQ,EACR,MAAM,EACN,kBAAkB,GAAG,OAAO,EAC5B,MAAM,GAAG,IAAI,EACb,oBAAoB,GAAG,EAAE,EACzB,KAAK,EACL,UAAU,EACV,SAAS,EACT,gBAAgB,GACU,EAAE,EAAE;IAC9B,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAC;QAC3C,MAAM,EAAE,CAAC;QACT,qBAAqB,EAAE,KAAK;KAC7B,CAAC,CAAC;IACH,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAC,CAAC,CAAC,CAAC;IAChD,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAwC,IAAI,CAAC,CAAC;IAE1F,OAAO,CACL,uBAAC,4CAAkB,IACjB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,oBAAoB,EAAE,oBAAoB,YAE1C,uBAAC,6BAAa,IACZ,kBAAkB,EAAE,kBAAkB,EACtC,WAAW,EAAE,KAAK,EAClB,gBAAgB,EAAE,UAAU,EAC5B,eAAe,EAAE,SAAS,YAE1B,uBAAC,kDAAwB,IAAC,UAAU,EAAE,gBAAgB,YACpD,uBAAC,yBAAyB,CAAC,QAAQ,IACjC,KAAK,EAAE;wBACL,UAAU;wBACV,aAAa;wBACb,UAAU;wBACV,aAAa;wBACb,MAAM;wBACN,MAAM;wBACN,oBAAoB;wBACpB,UAAU;wBACV,aAAa;qBACd,YAEA,QAAQ,GAC0B,GACZ,GACb,GACG,CACtB,CAAC;AACJ,CAAC,CAAC;AAlDW,QAAA,oBAAoB,wBAkD/B"}
@@ -1,60 +0,0 @@
1
- import { OnboardingStudioClient, Onboarding } from "@rocapine/react-native-onboarding";
2
- import { ColorScheme, DeepPartial, Theme } from "../UI/Theme/types";
3
- import { CustomComponents } from "./CustomComponentsContext";
4
- import { OnboardingStepType } from "../UI/types";
5
- interface OnboardingProviderProps {
6
- children: React.ReactNode;
7
- client: OnboardingStudioClient;
8
- initialColorScheme?: ColorScheme;
9
- locale?: string;
10
- customAudienceParams?: Record<string, any>;
11
- /**
12
- * Custom theme to override default theme tokens for both light and dark modes.
13
- * Partial overrides are supported - only provide the tokens you want to customize.
14
- */
15
- theme?: DeepPartial<Theme>;
16
- /**
17
- * Custom theme tokens for light mode only.
18
- * Partial overrides are supported - only provide the tokens you want to customize.
19
- */
20
- lightTheme?: DeepPartial<Theme>;
21
- /**
22
- * Custom theme tokens for dark mode only.
23
- * Partial overrides are supported - only provide the tokens you want to customize.
24
- */
25
- darkTheme?: DeepPartial<Theme>;
26
- /**
27
- * Custom components to replace default implementations.
28
- * Allows full UI customization for specific parts of the onboarding flow.
29
- * @example
30
- * ```tsx
31
- * <OnboardingProvider
32
- * customComponents={{
33
- * QuestionAnswerButton: MyCustomButton,
34
- * QuestionAnswersList: MyCustomList
35
- * }}
36
- * />
37
- * ```
38
- */
39
- customComponents?: CustomComponents;
40
- }
41
- export declare const OnboardingProvider: ({ children, client, initialColorScheme, locale, customAudienceParams, theme, lightTheme, darkTheme, customComponents, }: OnboardingProviderProps) => import("react/jsx-runtime").JSX.Element;
42
- export declare const OnboardingProgressContext: import("react").Context<{
43
- activeStep: {
44
- number: number;
45
- displayProgressHeader: boolean;
46
- };
47
- setActiveStep: (step: {
48
- number: number;
49
- displayProgressHeader: boolean;
50
- }) => void;
51
- totalSteps: number;
52
- setTotalSteps: (steps: number) => void;
53
- client: OnboardingStudioClient;
54
- locale: string;
55
- customAudienceParams: Record<string, any>;
56
- onboarding: Onboarding<OnboardingStepType> | null;
57
- setOnboarding: (onboarding: Onboarding<OnboardingStepType>) => void;
58
- }>;
59
- export {};
60
- //# sourceMappingURL=OnboardingUIProvider.old.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OnboardingUIProvider.old.d.ts","sourceRoot":"","sources":["../../src/provider/OnboardingUIProvider.old.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,sBAAsB,EACtB,UAAU,EACX,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAEL,gBAAgB,EACjB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAUjD,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,EAAE,sBAAsB,CAAC;IAC/B,kBAAkB,CAAC,EAAE,WAAW,CAAC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3C;;;OAGG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAC3B;;;OAGG;IACH,UAAU,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAChC;;;OAGG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAC/B;;;;;;;;;;;;OAYG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC;AAED,eAAO,MAAM,kBAAkB,GAAI,yHAUhC,uBAAuB,4CAsCzB,CAAC;AAEF,eAAO,MAAM,yBAAyB;gBACxB;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,qBAAqB,EAAE,OAAO,CAAA;KAAE;mBAC/C,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,qBAAqB,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI;gBACrE,MAAM;mBACH,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