@umituz/react-native-design-system 1.5.28 → 1.5.29
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 +1 -1
- package/src/presentation/atoms/AtomicInput.tsx +5 -7
- package/dist/AtomicIcon.d.ts +0 -34
- package/dist/index.d.ts +0 -60
- package/dist/presentation/atoms/AtomicAvatar.d.ts +0 -47
- package/dist/presentation/atoms/AtomicAvatarGroup.d.ts +0 -55
- package/dist/presentation/atoms/AtomicBadge.d.ts +0 -41
- package/dist/presentation/atoms/AtomicButton.d.ts +0 -20
- package/dist/presentation/atoms/AtomicCard.d.ts +0 -14
- package/dist/presentation/atoms/AtomicChip.d.ts +0 -52
- package/dist/presentation/atoms/AtomicDatePicker.d.ts +0 -74
- package/dist/presentation/atoms/AtomicDivider.d.ts +0 -44
- package/dist/presentation/atoms/AtomicFab.d.ts +0 -36
- package/dist/presentation/atoms/AtomicFilter.d.ts +0 -36
- package/dist/presentation/atoms/AtomicFormError.d.ts +0 -29
- package/dist/presentation/atoms/AtomicIcon.d.ts +0 -34
- package/dist/presentation/atoms/AtomicImage.d.ts +0 -39
- package/dist/presentation/atoms/AtomicInput.d.ts +0 -70
- package/dist/presentation/atoms/AtomicNumberInput.d.ts +0 -68
- package/dist/presentation/atoms/AtomicPicker.d.ts +0 -51
- package/dist/presentation/atoms/AtomicProgress.d.ts +0 -43
- package/dist/presentation/atoms/AtomicSearchBar.d.ts +0 -18
- package/dist/presentation/atoms/AtomicSort.d.ts +0 -71
- package/dist/presentation/atoms/AtomicSwitch.d.ts +0 -42
- package/dist/presentation/atoms/AtomicText.d.ts +0 -33
- package/dist/presentation/atoms/AtomicTextArea.d.ts +0 -84
- package/dist/presentation/atoms/AtomicTouchable.d.ts +0 -76
- package/dist/presentation/atoms/fab/styles/fabStyles.d.ts +0 -22
- package/dist/presentation/atoms/fab/types/index.d.ts +0 -70
- package/dist/presentation/atoms/filter/styles/filterStyles.d.ts +0 -14
- package/dist/presentation/atoms/filter/types/index.d.ts +0 -75
- package/dist/presentation/atoms/index.d.ts +0 -272
- package/dist/presentation/atoms/picker/styles/pickerStyles.d.ts +0 -84
- package/dist/presentation/atoms/picker/types/index.d.ts +0 -37
- package/dist/presentation/atoms/touchable/styles/touchableStyles.d.ts +0 -30
- package/dist/presentation/atoms/touchable/types/index.d.ts +0 -133
- package/dist/presentation/hooks/useResponsive.d.ts +0 -79
- package/dist/presentation/molecules/AtomicConfirmationModal.d.ts +0 -72
- package/dist/presentation/molecules/EmptyState.d.ts +0 -40
- package/dist/presentation/molecules/FormField.d.ts +0 -21
- package/dist/presentation/molecules/GridContainer.d.ts +0 -39
- package/dist/presentation/molecules/IconContainer.d.ts +0 -28
- package/dist/presentation/molecules/ListItem.d.ts +0 -4
- package/dist/presentation/molecules/ScreenHeader.d.ts +0 -54
- package/dist/presentation/molecules/SearchBar.d.ts +0 -17
- package/dist/presentation/molecules/SectionCard.d.ts +0 -24
- package/dist/presentation/molecules/SectionContainer.d.ts +0 -32
- package/dist/presentation/molecules/SectionHeader.d.ts +0 -36
- package/dist/presentation/molecules/confirmation-modal/styles/confirmationModalStyles.d.ts +0 -49
- package/dist/presentation/molecules/confirmation-modal/types/index.d.ts +0 -85
- package/dist/presentation/molecules/listitem/styles/listItemStyles.d.ts +0 -11
- package/dist/presentation/molecules/listitem/types/index.d.ts +0 -16
- package/dist/presentation/organisms/AppHeader.d.ts +0 -30
- package/dist/presentation/organisms/FormContainer.d.ts +0 -75
- package/dist/presentation/organisms/ScreenLayout.d.ts +0 -83
- package/dist/presentation/tokens/commonStyles.d.ts +0 -121
- package/dist/presentation/utils/platformConstants.d.ts +0 -99
- package/dist/presentation/utils/responsive.d.ts +0 -217
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AtomicConfirmationModal Type Definitions
|
|
3
|
-
*
|
|
4
|
-
* Type-safe interfaces for confirmation modal component
|
|
5
|
-
*/
|
|
6
|
-
import { StyleProp, ViewStyle } from 'react-native';
|
|
7
|
-
import type { AtomicIconColor } from '../../../atoms/AtomicIcon';
|
|
8
|
-
/**
|
|
9
|
-
* Confirmation modal variant
|
|
10
|
-
* Determines the visual style and default behavior
|
|
11
|
-
*/
|
|
12
|
-
export type ConfirmationModalVariant = 'default' | 'destructive' | 'warning' | 'success';
|
|
13
|
-
/**
|
|
14
|
-
* Props for AtomicConfirmationModal component
|
|
15
|
-
*/
|
|
16
|
-
export interface AtomicConfirmationModalProps {
|
|
17
|
-
/**
|
|
18
|
-
* Whether the modal is visible
|
|
19
|
-
*/
|
|
20
|
-
visible: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Modal title (required)
|
|
23
|
-
* e.g., "Delete Item?", "Confirm Action", "Are you sure?"
|
|
24
|
-
*/
|
|
25
|
-
title: string;
|
|
26
|
-
/**
|
|
27
|
-
* Modal message/description (required)
|
|
28
|
-
* e.g., "This action cannot be undone."
|
|
29
|
-
*/
|
|
30
|
-
message: string;
|
|
31
|
-
/**
|
|
32
|
-
* Variant determines visual style
|
|
33
|
-
* @default 'default'
|
|
34
|
-
*/
|
|
35
|
-
variant?: ConfirmationModalVariant;
|
|
36
|
-
/**
|
|
37
|
-
* Confirm button text (required)
|
|
38
|
-
*/
|
|
39
|
-
confirmText: string;
|
|
40
|
-
/**
|
|
41
|
-
* Cancel button text (required)
|
|
42
|
-
*/
|
|
43
|
-
cancelText: string;
|
|
44
|
-
/**
|
|
45
|
-
* Icon name to display at top (MaterialIcons name)
|
|
46
|
-
* If not provided, uses variant-specific default icon
|
|
47
|
-
* @see https://fonts.google.com/icons
|
|
48
|
-
*/
|
|
49
|
-
icon?: string;
|
|
50
|
-
/**
|
|
51
|
-
* Callback when user confirms
|
|
52
|
-
*/
|
|
53
|
-
onConfirm: () => void;
|
|
54
|
-
/**
|
|
55
|
-
* Callback when user cancels or dismisses
|
|
56
|
-
*/
|
|
57
|
-
onCancel: () => void;
|
|
58
|
-
/**
|
|
59
|
-
* Whether to show backdrop (tap outside to close)
|
|
60
|
-
* @default true
|
|
61
|
-
*/
|
|
62
|
-
showBackdrop?: boolean;
|
|
63
|
-
/**
|
|
64
|
-
* Whether backdrop is dismissible
|
|
65
|
-
* @default true
|
|
66
|
-
*/
|
|
67
|
-
backdropDismissible?: boolean;
|
|
68
|
-
/**
|
|
69
|
-
* Custom style for modal container
|
|
70
|
-
*/
|
|
71
|
-
style?: StyleProp<ViewStyle>;
|
|
72
|
-
/**
|
|
73
|
-
* Test ID for testing
|
|
74
|
-
*/
|
|
75
|
-
testID?: string;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Variant configuration
|
|
79
|
-
* Maps variant to icon, colors, and default text
|
|
80
|
-
*/
|
|
81
|
-
export interface ConfirmationModalVariantConfig {
|
|
82
|
-
icon: string;
|
|
83
|
-
confirmText: string;
|
|
84
|
-
iconColor: AtomicIconColor;
|
|
85
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ViewStyle } from 'react-native';
|
|
2
|
-
import { useAppDesignTokens } from '@umituz/react-native-theme';
|
|
3
|
-
type DesignTokens = ReturnType<typeof useAppDesignTokens>;
|
|
4
|
-
export declare const getListItemStyles: (tokens: DesignTokens) => {
|
|
5
|
-
container: ViewStyle;
|
|
6
|
-
disabled: ViewStyle;
|
|
7
|
-
iconContainer: ViewStyle;
|
|
8
|
-
content: ViewStyle;
|
|
9
|
-
subtitle: ViewStyle;
|
|
10
|
-
};
|
|
11
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ViewStyle } from 'react-native';
|
|
2
|
-
/**
|
|
3
|
-
* ListItem component props
|
|
4
|
-
*
|
|
5
|
-
* leftIcon/rightIcon: Any MaterialIcons name
|
|
6
|
-
* @see https://fonts.google.com/icons
|
|
7
|
-
*/
|
|
8
|
-
export interface ListItemProps {
|
|
9
|
-
title: string;
|
|
10
|
-
subtitle?: string;
|
|
11
|
-
leftIcon?: string;
|
|
12
|
-
rightIcon?: string;
|
|
13
|
-
onPress?: () => void;
|
|
14
|
-
disabled?: boolean;
|
|
15
|
-
style?: ViewStyle;
|
|
16
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AppHeader Organism - Application Header Component
|
|
3
|
-
*
|
|
4
|
-
* Complex header combining atoms and molecules
|
|
5
|
-
* Theme: {{THEME_NAME}} ({{CATEGORY}} category)
|
|
6
|
-
*
|
|
7
|
-
* Atomic Design Level: ORGANISM
|
|
8
|
-
* Composition: AtomicIcon + AtomicText + AtomicButton + SearchBar
|
|
9
|
-
*/
|
|
10
|
-
import React from 'react';
|
|
11
|
-
import { ViewStyle } from 'react-native';
|
|
12
|
-
import type { IconName } from '@umituz/react-native-icon';
|
|
13
|
-
/**
|
|
14
|
-
* AppHeader component props
|
|
15
|
-
*
|
|
16
|
-
* leftIcon/rightIcon: Any MaterialIcons name
|
|
17
|
-
* @see https://fonts.google.com/icons
|
|
18
|
-
*/
|
|
19
|
-
export interface AppHeaderProps {
|
|
20
|
-
title: string;
|
|
21
|
-
subtitle?: string;
|
|
22
|
-
leftIcon?: IconName;
|
|
23
|
-
onLeftPress?: () => void;
|
|
24
|
-
rightIcon?: IconName;
|
|
25
|
-
onRightPress?: () => void;
|
|
26
|
-
showShadow?: boolean;
|
|
27
|
-
backgroundColor?: string;
|
|
28
|
-
style?: ViewStyle;
|
|
29
|
-
}
|
|
30
|
-
export declare const AppHeader: React.FC<AppHeaderProps>;
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* FormContainer Component
|
|
3
|
-
*
|
|
4
|
-
* A reusable container for forms with proper keyboard handling and responsive layout.
|
|
5
|
-
*
|
|
6
|
-
* Features:
|
|
7
|
-
* - Pure React Native implementation (no Paper dependency)
|
|
8
|
-
* - Universal keyboard handling (no platform-specific code)
|
|
9
|
-
* - ScrollView with automatic content padding
|
|
10
|
-
* - Safe area insets for bottom tab navigation overlap
|
|
11
|
-
* - Responsive max width for large screens (tablets)
|
|
12
|
-
* - Consistent vertical spacing between form elements
|
|
13
|
-
* - Theme-aware surface colors
|
|
14
|
-
* - Optimized performance with memoized styles
|
|
15
|
-
*
|
|
16
|
-
* Usage:
|
|
17
|
-
* ```tsx
|
|
18
|
-
* <FormContainer>
|
|
19
|
-
* <AtomicInput label="Name" value={name} onChangeText={setName} />
|
|
20
|
-
* <AtomicTextArea label="Description" value={desc} onChangeText={setDesc} />
|
|
21
|
-
* <AtomicButton variant="primary" onPress={handleSubmit}>
|
|
22
|
-
* Submit
|
|
23
|
-
* </AtomicButton>
|
|
24
|
-
* </FormContainer>
|
|
25
|
-
* ```
|
|
26
|
-
*
|
|
27
|
-
* Why This Component:
|
|
28
|
-
* - Prevents keyboard from covering input fields (universal solution)
|
|
29
|
-
* - Handles safe area (notch, bottom tabs) automatically
|
|
30
|
-
* - Consistent form layout across all 100+ generated apps
|
|
31
|
-
* - Responsive design for tablets (max 700px) and phones (full width)
|
|
32
|
-
* - Automatic vertical spacing between form elements (no manual marginBottom)
|
|
33
|
-
* - Reduces boilerplate in form screens
|
|
34
|
-
* - Universal code - no platform checks, works on iOS, Android, Web
|
|
35
|
-
*
|
|
36
|
-
* Technical Details:
|
|
37
|
-
* - Uses ScrollView with contentContainerStyle for keyboard handling
|
|
38
|
-
* - Pure React Native View for surface (lightweight)
|
|
39
|
-
* - Vertical spacing via Children.map() wrapping (universal compatibility)
|
|
40
|
-
* - Safe area insets from react-native-safe-area-context
|
|
41
|
-
* - Responsive values from useResponsive hook
|
|
42
|
-
*
|
|
43
|
-
* @module FormContainer
|
|
44
|
-
*/
|
|
45
|
-
import React from 'react';
|
|
46
|
-
import { StyleProp, ViewStyle } from 'react-native';
|
|
47
|
-
/**
|
|
48
|
-
* Props for FormContainer component
|
|
49
|
-
*/
|
|
50
|
-
export interface FormContainerProps {
|
|
51
|
-
/** Form content (inputs, buttons, etc.) */
|
|
52
|
-
children: React.ReactNode;
|
|
53
|
-
/** Container style override (for outer View) */
|
|
54
|
-
containerStyle?: StyleProp<ViewStyle>;
|
|
55
|
-
/** Content container style override (for ScrollView content) */
|
|
56
|
-
contentContainerStyle?: StyleProp<ViewStyle>;
|
|
57
|
-
/** Show vertical scroll indicator */
|
|
58
|
-
showsVerticalScrollIndicator?: boolean;
|
|
59
|
-
/** Optional test ID for E2E testing */
|
|
60
|
-
testID?: string;
|
|
61
|
-
/** Show surface border (default: true) */
|
|
62
|
-
showBorder?: boolean;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* FormContainer - Universal form wrapper component
|
|
66
|
-
*
|
|
67
|
-
* Wraps forms with:
|
|
68
|
-
* - Pure React Native surface
|
|
69
|
-
* - Universal keyboard handling (no platform checks)
|
|
70
|
-
* - ScrollView for content overflow
|
|
71
|
-
* - Safe area insets (bottom tabs, notch)
|
|
72
|
-
* - Responsive max width (tablets)
|
|
73
|
-
* - Theme integration
|
|
74
|
-
*/
|
|
75
|
-
export declare const FormContainer: React.FC<FormContainerProps>;
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ScreenLayout - Universal Screen Container Component
|
|
3
|
-
*
|
|
4
|
-
* Provides consistent layout structure for all screens:
|
|
5
|
-
* - SafeAreaView with configurable edges
|
|
6
|
-
* - Optional ScrollView for content
|
|
7
|
-
* - Theme-aware background colors
|
|
8
|
-
* - Optional header/footer slots
|
|
9
|
-
* - Consistent spacing and padding
|
|
10
|
-
*
|
|
11
|
-
* Usage:
|
|
12
|
-
* <ScreenLayout>
|
|
13
|
-
* <View>Your content here</View>
|
|
14
|
-
* </ScreenLayout>
|
|
15
|
-
*
|
|
16
|
-
* Advanced:
|
|
17
|
-
* <ScreenLayout
|
|
18
|
-
* scrollable={false}
|
|
19
|
-
* edges={['top', 'bottom']}
|
|
20
|
-
* header={<CustomHeader />}
|
|
21
|
-
* >
|
|
22
|
-
* <View>Content</View>
|
|
23
|
-
* </ScreenLayout>
|
|
24
|
-
*/
|
|
25
|
-
import React from 'react';
|
|
26
|
-
import { ViewStyle } from 'react-native';
|
|
27
|
-
import { Edge } from 'react-native-safe-area-context';
|
|
28
|
-
export interface ScreenLayoutProps {
|
|
29
|
-
/**
|
|
30
|
-
* Content to render inside the layout
|
|
31
|
-
*/
|
|
32
|
-
children: React.ReactNode;
|
|
33
|
-
/**
|
|
34
|
-
* Enable scrolling (default: true)
|
|
35
|
-
* Set to false for screens with custom scroll logic
|
|
36
|
-
*/
|
|
37
|
-
scrollable?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Safe area edges to apply (default: ['top'])
|
|
40
|
-
* Common values:
|
|
41
|
-
* - ['top'] - For screens with bottom tabs
|
|
42
|
-
* - ['top', 'bottom'] - For modal screens
|
|
43
|
-
* - [] - No safe area (use cautiously)
|
|
44
|
-
*/
|
|
45
|
-
edges?: Edge[];
|
|
46
|
-
/**
|
|
47
|
-
* Optional header component
|
|
48
|
-
* Rendered above scrollable content
|
|
49
|
-
*/
|
|
50
|
-
header?: React.ReactNode;
|
|
51
|
-
/**
|
|
52
|
-
* Optional footer component
|
|
53
|
-
* Rendered below scrollable content
|
|
54
|
-
*/
|
|
55
|
-
footer?: React.ReactNode;
|
|
56
|
-
/**
|
|
57
|
-
* Override background color
|
|
58
|
-
* If not provided, uses theme's backgroundPrimary
|
|
59
|
-
*/
|
|
60
|
-
backgroundColor?: string;
|
|
61
|
-
/**
|
|
62
|
-
* Custom container style
|
|
63
|
-
*/
|
|
64
|
-
containerStyle?: ViewStyle;
|
|
65
|
-
/**
|
|
66
|
-
* Custom content container style (for ScrollView)
|
|
67
|
-
*/
|
|
68
|
-
contentContainerStyle?: ViewStyle;
|
|
69
|
-
/**
|
|
70
|
-
* Test ID for automation
|
|
71
|
-
*/
|
|
72
|
-
testID?: string;
|
|
73
|
-
/**
|
|
74
|
-
* Hide vertical scroll indicator (default: false)
|
|
75
|
-
*/
|
|
76
|
-
hideScrollIndicator?: boolean;
|
|
77
|
-
/**
|
|
78
|
-
* Enable keyboard avoiding behavior (default: false)
|
|
79
|
-
* Useful for screens with inputs
|
|
80
|
-
*/
|
|
81
|
-
keyboardAvoiding?: boolean;
|
|
82
|
-
}
|
|
83
|
-
export declare const ScreenLayout: React.FC<ScreenLayoutProps>;
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Common Styles - Reusable Style Patterns
|
|
3
|
-
*
|
|
4
|
-
* Centralized style utilities to reduce duplication across screens.
|
|
5
|
-
* These styles are composable and follow DRY principles.
|
|
6
|
-
*
|
|
7
|
-
* Usage:
|
|
8
|
-
* ```typescript
|
|
9
|
-
* import { useCommonStyles } from '@domains/design-system/commonStyles';
|
|
10
|
-
*
|
|
11
|
-
* const MyComponent = () => {
|
|
12
|
-
* const commonStyles = useCommonStyles();
|
|
13
|
-
* return <View style={commonStyles.screenContainer}>...</View>;
|
|
14
|
-
* };
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
import { ViewStyle, TextStyle } from 'react-native';
|
|
18
|
-
/**
|
|
19
|
-
* Hook to get common styles with dynamic theme support
|
|
20
|
-
*/
|
|
21
|
-
export declare const useCommonStyles: () => {
|
|
22
|
-
/**
|
|
23
|
-
* Standard full-screen container
|
|
24
|
-
* Most common pattern: flex: 1 with background color
|
|
25
|
-
*/
|
|
26
|
-
screenContainer: ViewStyle;
|
|
27
|
-
/**
|
|
28
|
-
* Basic flex container without background
|
|
29
|
-
* Use when background is set elsewhere or not needed
|
|
30
|
-
*/
|
|
31
|
-
flexContainer: ViewStyle;
|
|
32
|
-
/**
|
|
33
|
-
* Screen container with secondary background
|
|
34
|
-
*/
|
|
35
|
-
screenContainerSecondary: ViewStyle;
|
|
36
|
-
/**
|
|
37
|
-
* Standard ScrollView wrapper
|
|
38
|
-
*/
|
|
39
|
-
scrollView: ViewStyle;
|
|
40
|
-
/**
|
|
41
|
-
* ScrollView content container with standard padding
|
|
42
|
-
*/
|
|
43
|
-
scrollContent: ViewStyle;
|
|
44
|
-
/**
|
|
45
|
-
* ScrollView content that grows to fill available space
|
|
46
|
-
*/
|
|
47
|
-
scrollContentGrow: ViewStyle;
|
|
48
|
-
/**
|
|
49
|
-
* Centered scroll content (for forms, onboarding screens)
|
|
50
|
-
*/
|
|
51
|
-
scrollContentCentered: ViewStyle;
|
|
52
|
-
/**
|
|
53
|
-
* Centered container - both horizontal and vertical
|
|
54
|
-
* Perfect for empty states, splash screens
|
|
55
|
-
*/
|
|
56
|
-
centerContainer: ViewStyle;
|
|
57
|
-
/**
|
|
58
|
-
* Centered container with padding
|
|
59
|
-
*/
|
|
60
|
-
centerContainerPadded: ViewStyle;
|
|
61
|
-
/**
|
|
62
|
-
* Horizontal row layout
|
|
63
|
-
*/
|
|
64
|
-
row: ViewStyle;
|
|
65
|
-
/**
|
|
66
|
-
* Horizontal row with space between
|
|
67
|
-
*/
|
|
68
|
-
rowBetween: ViewStyle;
|
|
69
|
-
/**
|
|
70
|
-
* Horizontal row centered
|
|
71
|
-
*/
|
|
72
|
-
rowCenter: ViewStyle;
|
|
73
|
-
/**
|
|
74
|
-
* Standard horizontal padding
|
|
75
|
-
*/
|
|
76
|
-
paddedHorizontal: ViewStyle;
|
|
77
|
-
/**
|
|
78
|
-
* Standard vertical padding
|
|
79
|
-
*/
|
|
80
|
-
paddedVertical: ViewStyle;
|
|
81
|
-
/**
|
|
82
|
-
* Standard padding all sides
|
|
83
|
-
*/
|
|
84
|
-
padded: ViewStyle;
|
|
85
|
-
/**
|
|
86
|
-
* Standard section container
|
|
87
|
-
*/
|
|
88
|
-
section: ViewStyle;
|
|
89
|
-
/**
|
|
90
|
-
* Section with padding
|
|
91
|
-
*/
|
|
92
|
-
sectionPadded: ViewStyle;
|
|
93
|
-
/**
|
|
94
|
-
* Screen title - primary heading
|
|
95
|
-
*/
|
|
96
|
-
screenTitle: TextStyle;
|
|
97
|
-
/**
|
|
98
|
-
* Section title
|
|
99
|
-
*/
|
|
100
|
-
sectionTitle: TextStyle;
|
|
101
|
-
/**
|
|
102
|
-
* Subtitle/description text
|
|
103
|
-
*/
|
|
104
|
-
subtitle: TextStyle;
|
|
105
|
-
/**
|
|
106
|
-
* Body text
|
|
107
|
-
*/
|
|
108
|
-
bodyText: TextStyle;
|
|
109
|
-
/**
|
|
110
|
-
* Secondary text (muted)
|
|
111
|
-
*/
|
|
112
|
-
secondaryText: TextStyle;
|
|
113
|
-
/**
|
|
114
|
-
* Form container
|
|
115
|
-
*/
|
|
116
|
-
form: ViewStyle;
|
|
117
|
-
/**
|
|
118
|
-
* Form header section
|
|
119
|
-
*/
|
|
120
|
-
formHeader: ViewStyle;
|
|
121
|
-
};
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Platform-Specific Constants
|
|
3
|
-
*
|
|
4
|
-
* Design system constants that ensure compliance with platform guidelines.
|
|
5
|
-
* These values are based on official Human Interface Guidelines (HIG) from Apple and Material Design from Google.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* iOS Human Interface Guidelines (HIG) Constants
|
|
9
|
-
*
|
|
10
|
-
* @see https://developer.apple.com/design/human-interface-guidelines/layout
|
|
11
|
-
*/
|
|
12
|
-
export declare const IOS_HIG: {
|
|
13
|
-
/**
|
|
14
|
-
* Minimum Touch Target Size
|
|
15
|
-
*
|
|
16
|
-
* Apple requires a minimum tappable area of 44pt x 44pt for ALL interactive controls.
|
|
17
|
-
* This is enforced during App Store review.
|
|
18
|
-
*
|
|
19
|
-
* @critical Violating this can result in App Store rejection
|
|
20
|
-
*/
|
|
21
|
-
readonly MIN_TOUCH_TARGET: 44;
|
|
22
|
-
/**
|
|
23
|
-
* Recommended Minimum Touch Target Size
|
|
24
|
-
*
|
|
25
|
-
* For better accessibility and usability, Apple recommends 48pt x 48pt.
|
|
26
|
-
*/
|
|
27
|
-
readonly RECOMMENDED_TOUCH_TARGET: 48;
|
|
28
|
-
/**
|
|
29
|
-
* Minimum Text Size
|
|
30
|
-
*
|
|
31
|
-
* Minimum font size for body text to ensure readability.
|
|
32
|
-
*/
|
|
33
|
-
readonly MIN_TEXT_SIZE: 17;
|
|
34
|
-
/**
|
|
35
|
-
* Minimum Contrast Ratio
|
|
36
|
-
*
|
|
37
|
-
* WCAG AA compliance requires 4.5:1 for normal text.
|
|
38
|
-
*/
|
|
39
|
-
readonly MIN_CONTRAST_RATIO: 4.5;
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* Android Material Design Guidelines Constants
|
|
43
|
-
*
|
|
44
|
-
* @see https://m3.material.io/foundations/layout/applying-layout/window-size-classes
|
|
45
|
-
*/
|
|
46
|
-
export declare const ANDROID_MATERIAL: {
|
|
47
|
-
/**
|
|
48
|
-
* Minimum Touch Target Size
|
|
49
|
-
*
|
|
50
|
-
* Material Design 3 recommends a minimum of 48dp x 48dp.
|
|
51
|
-
*/
|
|
52
|
-
readonly MIN_TOUCH_TARGET: 48;
|
|
53
|
-
/**
|
|
54
|
-
* Minimum Text Size
|
|
55
|
-
*
|
|
56
|
-
* Minimum font size for body text.
|
|
57
|
-
*/
|
|
58
|
-
readonly MIN_TEXT_SIZE: 14;
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* Universal Platform Constants
|
|
62
|
-
*
|
|
63
|
-
* These values work across both iOS and Android, taking the more restrictive requirement.
|
|
64
|
-
*/
|
|
65
|
-
export declare const PLATFORM_CONSTANTS: {
|
|
66
|
-
/**
|
|
67
|
-
* Minimum Touch Target Size
|
|
68
|
-
*
|
|
69
|
-
* Uses iOS requirement (44pt) as it's more restrictive than Android (48dp).
|
|
70
|
-
* This ensures compliance on both platforms.
|
|
71
|
-
*/
|
|
72
|
-
readonly MIN_TOUCH_TARGET: number;
|
|
73
|
-
/**
|
|
74
|
-
* Recommended Touch Target Size
|
|
75
|
-
*
|
|
76
|
-
* Uses the higher value between iOS and Android recommendations.
|
|
77
|
-
*/
|
|
78
|
-
readonly RECOMMENDED_TOUCH_TARGET: 48;
|
|
79
|
-
/**
|
|
80
|
-
* Minimum Text Size
|
|
81
|
-
*
|
|
82
|
-
* Uses iOS requirement as it's larger.
|
|
83
|
-
*/
|
|
84
|
-
readonly MIN_TEXT_SIZE: number;
|
|
85
|
-
};
|
|
86
|
-
/**
|
|
87
|
-
* Helper function to validate touch target size
|
|
88
|
-
*
|
|
89
|
-
* @param size - The size to validate (in pt/dp)
|
|
90
|
-
* @returns true if size meets platform requirements
|
|
91
|
-
*/
|
|
92
|
-
export declare const isValidTouchTarget: (size: number) => boolean;
|
|
93
|
-
/**
|
|
94
|
-
* Helper function to get minimum touch target for component
|
|
95
|
-
*
|
|
96
|
-
* @param componentType - The type of component ('button' | 'input' | 'icon' | 'generic')
|
|
97
|
-
* @returns The minimum touch target size for that component type
|
|
98
|
-
*/
|
|
99
|
-
export declare const getMinTouchTarget: (componentType?: "button" | "input" | "icon" | "generic") => number;
|