@umituz/react-native-design-system 2.6.60 → 2.6.62

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.
@@ -0,0 +1,47 @@
1
+ /**
2
+ * ScreenLayout Styles
3
+ */
4
+
5
+ import { StyleSheet } from 'react-native';
6
+ import type { DesignTokens } from '../../../theme';
7
+
8
+ export interface ScreenLayoutStylesConfig {
9
+ readonly maxWidth?: number;
10
+ readonly horizontalPadding: number;
11
+ readonly verticalPadding: number;
12
+ }
13
+
14
+ export const getScreenLayoutStyles = (
15
+ tokens: DesignTokens,
16
+ config: ScreenLayoutStylesConfig,
17
+ ) => {
18
+ const { maxWidth, horizontalPadding, verticalPadding } = config;
19
+
20
+ return StyleSheet.create({
21
+ container: {
22
+ flex: 1,
23
+ },
24
+ keyboardAvoidingView: {
25
+ flex: 1,
26
+ },
27
+ responsiveWrapper: {
28
+ flex: 1,
29
+ width: '100%',
30
+ ...(maxWidth ? { maxWidth, alignSelf: 'center' as const } : {}),
31
+ },
32
+ content: {
33
+ flex: 1,
34
+ paddingTop: verticalPadding,
35
+ paddingHorizontal: horizontalPadding,
36
+ },
37
+ scrollView: {
38
+ flex: 1,
39
+ },
40
+ scrollContent: {
41
+ flexGrow: 1,
42
+ paddingTop: verticalPadding,
43
+ paddingHorizontal: horizontalPadding,
44
+ paddingBottom: verticalPadding,
45
+ },
46
+ });
47
+ };
@@ -0,0 +1,27 @@
1
+ /**
2
+ * ScreenLayout Type Definitions
3
+ */
4
+
5
+ import type { ViewStyle } from 'react-native';
6
+ import type { Edge } from 'react-native-safe-area-context';
7
+ import type { RefreshControlProps } from 'react-native';
8
+
9
+ export interface ScreenLayoutProps {
10
+ readonly children: React.ReactNode;
11
+ readonly scrollable?: boolean;
12
+ readonly edges?: Edge[];
13
+ readonly header?: React.ReactNode;
14
+ readonly footer?: React.ReactNode;
15
+ readonly backgroundColor?: string;
16
+ readonly containerStyle?: ViewStyle;
17
+ readonly contentContainerStyle?: ViewStyle;
18
+ readonly testID?: string;
19
+ readonly hideScrollIndicator?: boolean;
20
+ readonly keyboardAvoiding?: boolean;
21
+ readonly accessibilityLabel?: string;
22
+ readonly accessibilityHint?: string;
23
+ readonly accessible?: boolean;
24
+ readonly responsiveEnabled?: boolean;
25
+ readonly maxWidth?: number;
26
+ readonly refreshControl?: React.ReactElement<RefreshControlProps>;
27
+ }
@@ -89,17 +89,19 @@ export const BottomSheetModal = forwardRef<BottomSheetModalRef, BottomSheetModal
89
89
  onRequestClose={dismiss}
90
90
  statusBarTranslucent
91
91
  >
92
- <Pressable style={styles.overlay} onPress={dismiss}>
92
+ <View style={styles.overlay}>
93
93
  <Pressable
94
- style={styles.container}
95
- onPress={() => {}} // Consumer to prevent bubbling to overlay
96
- >
94
+ style={StyleSheet.absoluteFill}
95
+ onPress={dismiss}
96
+ accessibilityLabel="Close modal"
97
+ />
98
+ <View style={[styles.container, { width: '100%' }]}>
97
99
  <View style={{ flex: 1 }}>
98
100
  <View style={styles.handle} />
99
101
  {children}
100
102
  </View>
101
- </Pressable>
102
- </Pressable>
103
+ </View>
104
+ </View>
103
105
  </Modal>
104
106
  );
105
107
  }