@umituz/react-native-onboarding 3.6.24 → 3.6.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-onboarding",
3
- "version": "3.6.24",
3
+ "version": "3.6.25",
4
4
  "description": "Advanced onboarding flow for React Native apps with personalization questions, theme-aware colors, animations, and customizable slides. SOLID, DRY, KISS principles applied.",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -87,10 +87,10 @@ export interface OnboardingOptions {
87
87
  showPaywallOnComplete?: boolean;
88
88
 
89
89
  /**
90
- * Use gradient background for all slides (default: false)
91
- * When true, all slides will use gradient backgrounds if available
90
+ * Use custom background for all slides (default: false)
91
+ * When true, all slides will use custom backgrounds if available
92
92
  */
93
- useGradient?: boolean;
93
+ useCustomBackground?: boolean;
94
94
 
95
95
  /**
96
96
  * Visual theme variant (default: "default")
@@ -16,7 +16,7 @@ import type { OnboardingScreenContentProps } from "../types/OnboardingProps";
16
16
 
17
17
  export const OnboardingScreenContent = ({
18
18
  containerStyle,
19
- useGradient,
19
+ useCustomBackground,
20
20
  currentSlide,
21
21
  isFirstSlide,
22
22
  isLastSlide,
@@ -57,7 +57,7 @@ export const OnboardingScreenContent = ({
57
57
  !!currentSlide?.backgroundVideo ||
58
58
  (!!currentSlide?.backgroundImages && currentSlide.backgroundImages.length > 0);
59
59
  const overlayOpacity = currentSlide?.overlayOpacity ?? 0.5;
60
- const effectivelyUseGradient = useGradient || hasMedia;
60
+ const showOverlay = useCustomBackground || hasMedia;
61
61
 
62
62
  return (
63
63
  <View
@@ -66,7 +66,7 @@ export const OnboardingScreenContent = ({
66
66
  >
67
67
  <StatusBar
68
68
  barStyle={
69
- themeMode === "dark" || effectivelyUseGradient
69
+ themeMode === "dark" || showOverlay
70
70
  ? "light-content"
71
71
  : "dark-content"
72
72
  }
@@ -74,8 +74,8 @@ export const OnboardingScreenContent = ({
74
74
 
75
75
  <OnboardingBackground
76
76
  currentSlide={currentSlide}
77
- useGradient={useGradient}
78
- effectivelyUseGradient={effectivelyUseGradient}
77
+ useCustomBackground={useCustomBackground}
78
+ showOverlay={showOverlay}
79
79
  overlayOpacity={overlayOpacity}
80
80
  />
81
81
 
@@ -16,23 +16,23 @@ const OnboardingScope = createContext<OnboardingProviderValue | undefined>(undef
16
16
 
17
17
  export interface OnboardingProviderProps {
18
18
  children: React.ReactNode;
19
- useGradient: boolean;
19
+ useCustomBackground: boolean;
20
20
  colors: OnboardingColors;
21
21
  }
22
22
 
23
23
  export const OnboardingProvider = ({
24
24
  children,
25
- useGradient,
25
+ useCustomBackground,
26
26
  colors,
27
27
  }: OnboardingProviderProps) => {
28
28
  const value = useMemo(
29
29
  () => ({
30
30
  theme: {
31
31
  colors,
32
- useGradient,
32
+ useCustomBackground,
33
33
  },
34
34
  }),
35
- [colors, useGradient]
35
+ [colors, useCustomBackground]
36
36
  );
37
37
 
38
38
  return (
@@ -80,7 +80,7 @@ export const OnboardingScreen = ({
80
80
  renderSlide,
81
81
  onUpgrade,
82
82
  showPaywallOnComplete = false,
83
- useGradient: globalUseGradient = false,
83
+ useCustomBackground: globalUseCustomBackground = false,
84
84
  themeVariant = "default",
85
85
  themeColors: providedThemeColors,
86
86
  }: OnboardingScreenProps) => {
@@ -121,7 +121,7 @@ export const OnboardingScreen = ({
121
121
  isLastSlide,
122
122
  currentAnswer,
123
123
  isAnswerValid,
124
- useGradient,
124
+ useCustomBackground,
125
125
  containerStyle,
126
126
  handleNext,
127
127
  handlePrevious,
@@ -132,7 +132,7 @@ export const OnboardingScreen = ({
132
132
  storageKey,
133
133
  onComplete,
134
134
  onSkip,
135
- globalUseGradient,
135
+ globalUseCustomBackground,
136
136
  });
137
137
 
138
138
  if (__DEV__) {
@@ -148,10 +148,10 @@ export const OnboardingScreen = ({
148
148
  }
149
149
 
150
150
  return (
151
- <OnboardingProvider useGradient={useGradient} colors={themeColors}>
151
+ <OnboardingProvider useCustomBackground={useCustomBackground} colors={themeColors}>
152
152
  <OnboardingScreenContent
153
153
  containerStyle={[styles.container, containerStyle]}
154
- useGradient={useGradient}
154
+ useCustomBackground={useCustomBackground}
155
155
  currentSlide={currentSlide}
156
156
  isFirstSlide={isFirstSlide}
157
157
  isLastSlide={isLastSlide}
@@ -6,7 +6,7 @@ import type { OnboardingSlide } from "../../domain/entities/OnboardingSlide";
6
6
 
7
7
  export interface OnboardingScreenContentProps {
8
8
  containerStyle?: any;
9
- useGradient: boolean;
9
+ useCustomBackground: boolean;
10
10
  currentSlide: OnboardingSlide | undefined;
11
11
  isFirstSlide: boolean;
12
12
  isLastSlide: boolean;
@@ -23,5 +23,5 @@ export interface OnboardingColors {
23
23
 
24
24
  export interface OnboardingTheme {
25
25
  colors: OnboardingColors;
26
- useGradient: boolean;
26
+ useCustomBackground: boolean;
27
27
  }