@umituz/react-native-design-system 4.25.41 → 4.25.43

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": "4.25.41",
3
+ "version": "4.25.43",
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",
@@ -225,39 +225,6 @@
225
225
  "expo-application": {
226
226
  "optional": true
227
227
  },
228
- "expo-clipboard": {
229
- "optional": true
230
- },
231
- "expo-crypto": {
232
- "optional": true
233
- },
234
- "expo-device": {
235
- "optional": true
236
- },
237
- "expo-haptics": {
238
- "optional": true
239
- },
240
- "expo-image": {
241
- "optional": true
242
- },
243
- "expo-image-manipulator": {
244
- "optional": true
245
- },
246
- "expo-image-picker": {
247
- "optional": true
248
- },
249
- "expo-network": {
250
- "optional": true
251
- },
252
- "expo-secure-store": {
253
- "optional": true
254
- },
255
- "expo-sharing": {
256
- "optional": true
257
- },
258
- "expo-video": {
259
- "optional": true
260
- },
261
228
  "@react-native-community/datetimepicker": {
262
229
  "optional": true
263
230
  }
@@ -275,7 +242,7 @@
275
242
  "@testing-library/react": "^16.3.1",
276
243
  "@testing-library/react-native": "^13.3.3",
277
244
  "@types/jest": "^30.0.0",
278
- "@types/react": "~19.2.4",
245
+ "@types/react": "~19.0.0",
279
246
  "@types/react-native": "^0.73.0",
280
247
  "@typescript-eslint/eslint-plugin": "^8.50.1",
281
248
  "@typescript-eslint/parser": "^8.50.1",
@@ -12,21 +12,22 @@ import { AtomicKeyboardAvoidingView } from '../../atoms';
12
12
  import { getScreenLayoutStyles } from './styles/screenLayoutStyles';
13
13
  import type { ScreenLayoutProps } from './types';
14
14
 
15
- export const ScreenLayout: React.FC<ScreenLayoutProps> = ({
16
- children,
17
- scrollable = true,
18
- edges = ['top'],
19
- header,
20
- footer,
21
- backgroundColor,
22
- containerStyle,
23
- contentContainerStyle,
24
- testID,
25
- hideScrollIndicator = false,
26
- keyboardAvoiding = false,
27
- maxWidth,
28
- refreshControl,
29
- }) => {
15
+ export const ScreenLayout: React.FC<ScreenLayoutProps> = (props: ScreenLayoutProps) => {
16
+ const {
17
+ children,
18
+ scrollable = true,
19
+ edges = ['top', 'bottom', 'left', 'right'],
20
+ header,
21
+ footer,
22
+ backgroundColor,
23
+ containerStyle,
24
+ contentContainerStyle,
25
+ testID,
26
+ hideScrollIndicator = false,
27
+ keyboardAvoiding = false,
28
+ maxWidth,
29
+ refreshControl,
30
+ } = props;
30
31
  const tokens = useAppDesignTokens();
31
32
  const insets = useSafeAreaInsets();
32
33
 
@@ -49,13 +50,30 @@ export const ScreenLayout: React.FC<ScreenLayoutProps> = ({
49
50
 
50
51
  const bgColor = backgroundColor || tokens.colors.backgroundPrimary;
51
52
 
53
+ // Robust safe area handling
54
+ const paddingTop = edges.includes('top') ? insets.top : 0;
55
+ const paddingBottom = edges.includes('bottom') ? insets.bottom : 0;
56
+ const paddingLeft = edges.includes('left') ? insets.left : 0;
57
+ const paddingRight = edges.includes('right') ? insets.right : 0;
58
+
52
59
  const content = (
53
- <View style={styles.responsiveWrapper}>
60
+ <View style={[
61
+ styles.responsiveWrapper,
62
+ {
63
+ paddingTop,
64
+ paddingBottom: footer ? 0 : paddingBottom,
65
+ paddingLeft,
66
+ paddingRight,
67
+ }
68
+ ]}>
54
69
  {header}
55
70
  {scrollable ? (
56
71
  <ScrollView
57
72
  style={styles.scrollView}
58
- contentContainerStyle={[styles.scrollContent, contentContainerStyle]}
73
+ contentContainerStyle={[
74
+ styles.scrollContent,
75
+ contentContainerStyle,
76
+ ]}
59
77
  showsVerticalScrollIndicator={!hideScrollIndicator}
60
78
  keyboardShouldPersistTaps={keyboardAvoiding ? 'handled' : 'never'}
61
79
  refreshControl={refreshControl}
@@ -67,14 +85,17 @@ export const ScreenLayout: React.FC<ScreenLayoutProps> = ({
67
85
  {children}
68
86
  </View>
69
87
  )}
70
- {footer}
88
+ {footer && (
89
+ <View style={{ paddingBottom }}>
90
+ {footer}
91
+ </View>
92
+ )}
71
93
  </View>
72
94
  );
73
95
 
74
96
  return (
75
- <SafeAreaView
97
+ <View
76
98
  style={[styles.container, { backgroundColor: bgColor }, containerStyle]}
77
- edges={edges}
78
99
  testID={testID}
79
100
  >
80
101
  {keyboardAvoiding ? (
@@ -86,7 +107,7 @@ export const ScreenLayout: React.FC<ScreenLayoutProps> = ({
86
107
  {content}
87
108
  </View>
88
109
  )}
89
- </SafeAreaView>
110
+ </View>
90
111
  );
91
112
  };
92
113
 
@@ -25,7 +25,7 @@ export const getScreenLayoutStyles = (
25
25
  responsiveWrapper: {
26
26
  flex: 1,
27
27
  width: '100%',
28
- ...(maxWidth ? { maxWidth, alignSelf: 'flex-start' as const } : {}),
28
+ ...(maxWidth ? { maxWidth, alignSelf: 'center' as const } : {}),
29
29
  },
30
30
  content: {
31
31
  flex: 1,
@@ -27,8 +27,8 @@ export const getResponsiveVerticalPadding = (
27
27
  // Apply spacing multiplier for consistency
28
28
  const adjustedPadding = basePadding * spacingMultiplier;
29
29
 
30
- // Ensure minimum padding respects safe area
31
- return Math.max(adjustedPadding, top > 0 ? 8 : adjustedPadding);
30
+ // We now return the base padding; safe areas are handled by ScreenLayout
31
+ return adjustedPadding;
32
32
  } catch {
33
33
  return LAYOUT_CONSTANTS.VERTICAL_PADDING_STANDARD;
34
34
  }