@umituz/react-native-design-system 2.9.68 → 2.9.70

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.68",
3
+ "version": "2.9.70",
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",
@@ -124,17 +124,22 @@
124
124
  "eslint-plugin-react": "^7.37.5",
125
125
  "eslint-plugin-react-hooks": "^7.0.1",
126
126
  "eslint-plugin-react-native": "^5.0.0",
127
- "expo-application": "~5.9.1",
128
- "expo-clipboard": "~8.0.7",
129
- "expo-crypto": "~14.0.8",
130
- "expo-device": "~7.0.2",
131
- "expo-file-system": "^19.0.21",
132
- "expo-font": "~14.0.9",
133
- "expo-haptics": "~14.0.8",
127
+ "expo-application": "~7.0.8",
128
+ "expo-clipboard": "~8.0.8",
129
+ "expo-constants": "~18.0.13",
130
+ "expo-crypto": "~15.0.8",
131
+ "expo-device": "~8.0.10",
132
+ "expo-file-system": "~19.0.21",
133
+ "expo-font": "~14.0.10",
134
+ "expo-haptics": "~15.0.8",
134
135
  "expo-image": "~3.0.11",
135
- "expo-localization": "~17.0.7",
136
- "expo-network": "~8.0.0",
137
- "expo-secure-store": "~14.0.8",
136
+ "expo-image-manipulator": "~14.0.8",
137
+ "expo-image-picker": "~17.0.10",
138
+ "expo-localization": "~17.0.8",
139
+ "expo-media-library": "~18.2.1",
140
+ "expo-modules-core": "~3.0.29",
141
+ "expo-network": "~8.0.8",
142
+ "expo-secure-store": "~15.0.8",
138
143
  "expo-sharing": "~14.0.8",
139
144
  "expo-video": "~3.0.15",
140
145
  "i18next": "^25.0.0",
@@ -3,7 +3,7 @@
3
3
  * Utilities for handling media files (base64, downloads, file operations)
4
4
  */
5
5
 
6
- import { File, Paths } from "expo-file-system/next";
6
+ import { File as ExpoFile, Paths } from "expo-file-system/next";
7
7
 
8
8
  interface FileWithType {
9
9
  readonly type: string;
@@ -52,7 +52,7 @@ export const toDataUrl = (str: string): string => {
52
52
  export const saveBase64ToFile = async (base64Data: string): Promise<string> => {
53
53
  const timestamp = Date.now();
54
54
  const filename = `media_${timestamp}.jpg`;
55
- const file = new File(Paths.cache, filename);
55
+ const file = new ExpoFile(Paths.cache, filename);
56
56
 
57
57
  const pureBase64 = base64Data.replace(/^data:image\/\w+;base64,/, "");
58
58
  const binaryString = atob(pureBase64);
@@ -72,7 +72,7 @@ export const downloadMediaToFile = async (url: string, isVideo: boolean): Promis
72
72
  const timestamp = Date.now();
73
73
  const extension = isVideo ? "mp4" : "jpg";
74
74
  const filename = `media_${timestamp}.${extension}`;
75
- const file = new File(Paths.cache, filename);
75
+ const file = new ExpoFile(Paths.cache, filename);
76
76
 
77
77
  const response = await fetch(url);
78
78
  if (!response.ok) {
@@ -2,6 +2,7 @@
2
2
  * OfflineBanner Component
3
3
  *
4
4
  * Displays a banner when the device is offline.
5
+ * Respects safe area insets for proper display on all devices.
5
6
  * Simple conditional rendering - NO animations per CLAUDE.md
6
7
  *
7
8
  * @example
@@ -22,7 +23,8 @@
22
23
 
23
24
  import React, { memo } from 'react';
24
25
  import { View, StyleSheet, type ViewStyle, type TextStyle } from 'react-native';
25
- import { AtomicText } from '../../../atoms';
26
+ import { useSafeAreaInsets } from '../../../safe-area';
27
+ import { AtomicText, AtomicIcon } from '../../../atoms';
26
28
 
27
29
  export interface OfflineBannerProps {
28
30
  /** Whether the banner is visible */
@@ -33,53 +35,58 @@ export interface OfflineBannerProps {
33
35
  backgroundColor?: string;
34
36
  /** Text color */
35
37
  textColor?: string;
36
- /** Icon to display (emoji or custom element) */
37
- icon?: string | React.ReactNode;
38
+ /** Icon name from design system icons */
39
+ iconName?: string;
38
40
  /** Position of the banner */
39
41
  position?: 'top' | 'bottom';
40
42
  /** Custom container style */
41
43
  style?: ViewStyle;
42
44
  /** Custom text style */
43
45
  textStyle?: TextStyle;
44
- /** Height of the banner */
45
- height?: number;
46
46
  }
47
47
 
48
- const DEFAULT_HEIGHT = 44;
48
+ const CONTENT_HEIGHT = 44;
49
+ const HORIZONTAL_PADDING = 16;
50
+ const ICON_SIZE = 18;
49
51
 
50
52
  export const OfflineBanner: React.FC<OfflineBannerProps> = memo(({
51
53
  visible,
52
54
  message = 'No internet connection',
53
- backgroundColor = '#FF6B6B',
55
+ backgroundColor = '#DC2626',
54
56
  textColor = '#FFFFFF',
55
- icon = '📡',
57
+ iconName = 'wifi-off',
56
58
  position = 'top',
57
59
  style,
58
60
  textStyle,
59
- height = DEFAULT_HEIGHT,
60
61
  }) => {
61
- // Simple conditional rendering - no animations
62
+ const insets = useSafeAreaInsets();
63
+
62
64
  if (!visible) {
63
65
  return null;
64
66
  }
65
67
 
66
- const positionStyle: ViewStyle = position === 'top' ? { top: 0 } : { bottom: 0 };
68
+ const isTop = position === 'top';
69
+ const safeAreaPadding = isTop ? insets.top : insets.bottom;
67
70
 
68
71
  return (
69
72
  <View
70
73
  style={[
71
74
  styles.container,
72
- positionStyle,
73
- { backgroundColor, height },
75
+ isTop ? styles.positionTop : styles.positionBottom,
76
+ {
77
+ backgroundColor,
78
+ paddingTop: isTop ? safeAreaPadding : 0,
79
+ paddingBottom: isTop ? 0 : safeAreaPadding,
80
+ },
74
81
  style,
75
82
  ]}
76
83
  >
77
84
  <View style={styles.content}>
78
- {typeof icon === 'string' ? (
79
- <AtomicText style={styles.icon}>{icon}</AtomicText>
80
- ) : (
81
- icon
82
- )}
85
+ <AtomicIcon
86
+ name={iconName}
87
+ customSize={ICON_SIZE}
88
+ customColor={textColor}
89
+ />
83
90
  <AtomicText
84
91
  style={[styles.message, { color: textColor }, textStyle]}
85
92
  numberOfLines={1}
@@ -100,19 +107,22 @@ const styles = StyleSheet.create({
100
107
  right: 0,
101
108
  zIndex: 9999,
102
109
  },
110
+ positionTop: {
111
+ top: 0,
112
+ },
113
+ positionBottom: {
114
+ bottom: 0,
115
+ },
103
116
  content: {
104
- flex: 1,
117
+ height: CONTENT_HEIGHT,
105
118
  flexDirection: 'row',
106
119
  alignItems: 'center',
107
120
  justifyContent: 'center',
108
- paddingHorizontal: 16,
121
+ paddingHorizontal: HORIZONTAL_PADDING,
109
122
  gap: 8,
110
123
  },
111
- icon: {
112
- fontSize: 16,
113
- },
114
124
  message: {
115
125
  fontSize: 14,
116
- fontWeight: '500',
126
+ fontWeight: '600',
117
127
  },
118
128
  });