@umituz/react-native-design-system 2.6.61 → 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
+ }