@umituz/react-native-onboarding 2.0.0 → 2.0.2

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": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "Advanced onboarding flow for React Native apps with personalization questions, gradient backgrounds, animations, and customizable slides. SOLID, DRY, KISS principles applied.",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -38,6 +38,7 @@
38
38
  "@umituz/react-native-design-system-atoms": "latest",
39
39
  "@react-native-community/slider": "^4.5.0",
40
40
  "expo-linear-gradient": "^15.0.0",
41
+ "lucide-react-native": "^0.344.0",
41
42
  "react": ">=18.2.0",
42
43
  "react-native": ">=0.74.0",
43
44
  "react-native-safe-area-context": "^5.0.0",
@@ -52,6 +53,7 @@
52
53
  "@umituz/react-native-design-system-atoms": "latest",
53
54
  "@react-native-community/slider": "^4.5.0",
54
55
  "expo-linear-gradient": "^15.0.7",
56
+ "lucide-react-native": "^0.344.0",
55
57
  "react": "^18.2.0",
56
58
  "react-native": "^0.74.0",
57
59
  "react-native-safe-area-context": "^5.6.0",
@@ -6,7 +6,7 @@
6
6
 
7
7
  import React, { useMemo } from "react";
8
8
  import { View, Text, StyleSheet, ScrollView } from "react-native";
9
- import { AtomicIcon } from "@umituz/react-native-design-system-atoms";
9
+ import * as LucideIcons from "lucide-react-native";
10
10
  import type { OnboardingSlide as OnboardingSlideType } from "../../domain/entities/OnboardingSlide";
11
11
 
12
12
  export interface OnboardingSlideProps {
@@ -19,52 +19,56 @@ export const OnboardingSlide: React.FC<OnboardingSlideProps> = ({ slide }) => {
19
19
  // Check if icon is an emoji (contains emoji characters) or Lucide icon name
20
20
  const isEmoji = /[\u{1F300}-\u{1F9FF}]|[\u{2600}-\u{26FF}]|[\u{2700}-\u{27BF}]/u.test(slide.icon);
21
21
 
22
+ // Get Lucide icon component
23
+ const IconComponent = !isEmoji ? (LucideIcons as any)[slide.icon] : null;
24
+
22
25
  return (
23
- <ScrollView
24
- contentContainerStyle={styles.content}
25
- showsVerticalScrollIndicator={false}
26
- scrollEnabled={false}
27
- >
28
- <View style={styles.slideContent}>
29
- <View style={styles.iconContainer}>
30
- {isEmoji ? (
31
- <Text style={styles.icon}>{slide.icon}</Text>
32
- ) : (
33
- <AtomicIcon
34
- name={slide.icon as any}
35
- customSize={60}
36
- customColor="#FFFFFF"
37
- />
26
+ <View style={styles.container}>
27
+ <View style={styles.content}>
28
+ <View style={styles.slideContent}>
29
+ <View style={styles.iconContainer}>
30
+ {isEmoji ? (
31
+ <Text style={styles.icon}>{slide.icon}</Text>
32
+ ) : IconComponent ? (
33
+ <IconComponent size={60} color="#FFFFFF" />
34
+ ) : (
35
+ <Text style={styles.icon}>📱</Text>
36
+ )}
37
+ </View>
38
+ <Text style={styles.title}>{slide.title}</Text>
39
+ <Text style={styles.description}>{slide.description}</Text>
40
+ {slide.features && slide.features.length > 0 && (
41
+ <View style={styles.featuresContainer}>
42
+ {slide.features.map((feature, index) => (
43
+ <View key={index} style={styles.featureItem}>
44
+ <Text style={styles.featureBullet}>•</Text>
45
+ <Text style={styles.featureText}>{feature}</Text>
46
+ </View>
47
+ ))}
48
+ </View>
38
49
  )}
39
50
  </View>
40
- <Text style={styles.title}>{slide.title}</Text>
41
- <Text style={styles.description}>{slide.description}</Text>
42
- {slide.features && slide.features.length > 0 && (
43
- <View style={styles.featuresContainer}>
44
- {slide.features.map((feature, index) => (
45
- <View key={index} style={styles.featureItem}>
46
- <Text style={styles.featureBullet}>•</Text>
47
- <Text style={styles.featureText}>{feature}</Text>
48
- </View>
49
- ))}
50
- </View>
51
- )}
52
51
  </View>
53
- </ScrollView>
52
+ </View>
54
53
  );
55
54
  };
56
55
 
57
56
  const getStyles = () =>
58
57
  StyleSheet.create({
58
+ container: {
59
+ flex: 1,
60
+ },
59
61
  content: {
60
62
  flex: 1,
61
63
  justifyContent: "center",
62
64
  alignItems: "center",
63
65
  paddingHorizontal: 30,
66
+ paddingVertical: 40,
64
67
  },
65
68
  slideContent: {
66
69
  alignItems: "center",
67
70
  maxWidth: 400,
71
+ width: "100%",
68
72
  },
69
73
  iconContainer: {
70
74
  width: 120,