@umituz/react-native-design-system 2.9.23 → 2.9.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-design-system",
3
- "version": "2.9.23",
3
+ "version": "2.9.25",
4
4
  "description": "Universal design system for React Native apps - Consolidated package with atoms, molecules, organisms, theme, typography, responsive, safe area, exception, infinite scroll, UUID, image, timezone, offline, onboarding, and loading utilities",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -5,7 +5,7 @@
5
5
  */
6
6
 
7
7
  import React, { useEffect } from 'react';
8
- import { View, Modal, StyleSheet, TouchableOpacity, ViewStyle } from 'react-native';
8
+ import { View, Modal, StyleSheet, TouchableOpacity, ViewStyle, Text } from 'react-native';
9
9
  import { useAppDesignTokens } from '../theme';
10
10
  import { useResponsive } from '../responsive';
11
11
 
@@ -18,6 +18,8 @@ export interface BaseModalProps {
18
18
  dismissOnBackdrop?: boolean;
19
19
  contentStyle?: ViewStyle;
20
20
  testID?: string;
21
+ title?: string;
22
+ subtitle?: string;
21
23
  }
22
24
 
23
25
  export const BaseModal: React.FC<BaseModalProps> = ({
@@ -27,6 +29,8 @@ export const BaseModal: React.FC<BaseModalProps> = ({
27
29
  dismissOnBackdrop = true,
28
30
  contentStyle,
29
31
  testID = 'base-modal',
32
+ title,
33
+ subtitle,
30
34
  }) => {
31
35
  const tokens = useAppDesignTokens();
32
36
  const { modalLayout } = useResponsive();
@@ -89,6 +93,35 @@ export const BaseModal: React.FC<BaseModalProps> = ({
89
93
  ]}
90
94
  testID={`${testID}-content`}
91
95
  >
96
+ {(title || subtitle) && (
97
+ <View style={{
98
+ paddingTop: tokens.spacing.lg,
99
+ paddingHorizontal: tokens.spacing.md,
100
+ paddingBottom: tokens.spacing.md,
101
+ }}>
102
+ {title && (
103
+ <Text style={{
104
+ fontSize: 20,
105
+ fontWeight: '700',
106
+ color: tokens.colors.textPrimary,
107
+ textAlign: 'center',
108
+ marginBottom: subtitle ? tokens.spacing.xs : 0,
109
+ }}>
110
+ {title}
111
+ </Text>
112
+ )}
113
+ {subtitle && (
114
+ <Text style={{
115
+ fontSize: 15,
116
+ color: tokens.colors.textSecondary,
117
+ textAlign: 'center',
118
+ lineHeight: 20,
119
+ }}>
120
+ {subtitle}
121
+ </Text>
122
+ )}
123
+ </View>
124
+ )}
92
125
  {children}
93
126
  </View>
94
127
  </View>
@@ -5,11 +5,10 @@
5
5
 
6
6
  import React from "react";
7
7
  import { View, StyleSheet } from "react-native";
8
-
9
- import { Image } from "expo-image";
10
8
  import type { OnboardingSlide } from "../../domain/entities/OnboardingSlide";
11
9
  import { BackgroundVideo } from "./BackgroundVideo";
12
10
  import { BackgroundImageCollage } from "./BackgroundImageCollage";
11
+ import { AtomicImage } from "../../../atoms/image/AtomicImage";
13
12
 
14
13
  interface OnboardingBackgroundProps {
15
14
  currentSlide: OnboardingSlide | undefined;
@@ -50,11 +49,13 @@ export const OnboardingBackground: React.FC<OnboardingBackgroundProps> = ({
50
49
 
51
50
  if (currentSlide.backgroundImage) {
52
51
  return (
53
- <Image
52
+ <AtomicImage
54
53
  source={currentSlide.backgroundImage}
55
54
  style={StyleSheet.absoluteFill}
56
55
  contentFit="cover"
57
56
  transition={500}
57
+ cachePolicy="memory-disk"
58
+ priority="high"
58
59
  />
59
60
  );
60
61
  }
@@ -11,7 +11,7 @@ import type { OnboardingTheme, OnboardingColors } from "../types/OnboardingTheme
11
11
  export interface OnboardingTranslations {
12
12
  nextButton: string;
13
13
  getStartedButton: string;
14
- of: string;
14
+ of?: string;
15
15
  }
16
16
 
17
17
  interface OnboardingProviderValue {