@umituz/react-native-design-system 1.5.33 → 1.5.35

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.
Files changed (67) hide show
  1. package/package.json +4 -1
  2. package/src/presentation/atoms/AtomicDatePicker.tsx +7 -3
  3. package/src/presentation/atoms/AtomicInput.tsx +19 -12
  4. package/src/index.js +0 -100
  5. package/src/presentation/atoms/AtomicAvatar.js +0 -84
  6. package/src/presentation/atoms/AtomicAvatarGroup.js +0 -82
  7. package/src/presentation/atoms/AtomicBadge.js +0 -167
  8. package/src/presentation/atoms/AtomicButton.js +0 -171
  9. package/src/presentation/atoms/AtomicCard.js +0 -69
  10. package/src/presentation/atoms/AtomicChip.js +0 -130
  11. package/src/presentation/atoms/AtomicDatePicker.js +0 -245
  12. package/src/presentation/atoms/AtomicDivider.js +0 -57
  13. package/src/presentation/atoms/AtomicFab.js +0 -67
  14. package/src/presentation/atoms/AtomicFilter.js +0 -103
  15. package/src/presentation/atoms/AtomicFormError.js +0 -63
  16. package/src/presentation/atoms/AtomicIcon.js +0 -29
  17. package/src/presentation/atoms/AtomicImage.js +0 -91
  18. package/src/presentation/atoms/AtomicInput.js +0 -201
  19. package/src/presentation/atoms/AtomicNumberInput.js +0 -124
  20. package/src/presentation/atoms/AtomicPicker.js +0 -298
  21. package/src/presentation/atoms/AtomicProgress.js +0 -79
  22. package/src/presentation/atoms/AtomicSearchBar.js +0 -45
  23. package/src/presentation/atoms/AtomicSort.js +0 -76
  24. package/src/presentation/atoms/AtomicSwitch.js +0 -103
  25. package/src/presentation/atoms/AtomicText.js +0 -22
  26. package/src/presentation/atoms/AtomicTextArea.js +0 -195
  27. package/src/presentation/atoms/AtomicTouchable.js +0 -137
  28. package/src/presentation/atoms/fab/styles/fabStyles.js +0 -62
  29. package/src/presentation/atoms/fab/types/index.js +0 -1
  30. package/src/presentation/atoms/filter/styles/filterStyles.js +0 -28
  31. package/src/presentation/atoms/filter/types/index.js +0 -1
  32. package/src/presentation/atoms/index.js +0 -145
  33. package/src/presentation/atoms/input/hooks/useInputState.js +0 -12
  34. package/src/presentation/atoms/input/styles/inputStyles.js +0 -58
  35. package/src/presentation/atoms/input/types/index.js +0 -1
  36. package/src/presentation/atoms/picker/styles/pickerStyles.js +0 -176
  37. package/src/presentation/atoms/picker/types/index.js +0 -1
  38. package/src/presentation/atoms/touchable/styles/touchableStyles.js +0 -53
  39. package/src/presentation/atoms/touchable/types/index.js +0 -1
  40. package/src/presentation/hooks/useResponsive.js +0 -81
  41. package/src/presentation/molecules/AtomicConfirmationModal.js +0 -153
  42. package/src/presentation/molecules/EmptyState.js +0 -67
  43. package/src/presentation/molecules/FormField.js +0 -75
  44. package/src/presentation/molecules/GridContainer.js +0 -76
  45. package/src/presentation/molecules/IconContainer.js +0 -59
  46. package/src/presentation/molecules/ListItem.js +0 -23
  47. package/src/presentation/molecules/ScreenHeader.js +0 -93
  48. package/src/presentation/molecules/SearchBar.js +0 -46
  49. package/src/presentation/molecules/SectionCard.js +0 -46
  50. package/src/presentation/molecules/SectionContainer.js +0 -63
  51. package/src/presentation/molecules/SectionHeader.js +0 -72
  52. package/src/presentation/molecules/confirmation-modal/styles/confirmationModalStyles.js +0 -114
  53. package/src/presentation/molecules/confirmation-modal/types/index.js +0 -6
  54. package/src/presentation/molecules/index.js +0 -16
  55. package/src/presentation/molecules/listitem/styles/listItemStyles.js +0 -14
  56. package/src/presentation/molecules/listitem/types/index.js +0 -1
  57. package/src/presentation/organisms/AppHeader.js +0 -77
  58. package/src/presentation/organisms/FormContainer.js +0 -126
  59. package/src/presentation/organisms/ScreenLayout.js +0 -68
  60. package/src/presentation/organisms/index.js +0 -13
  61. package/src/presentation/tokens/commonStyles.js +0 -219
  62. package/src/presentation/utils/platformConstants.js +0 -113
  63. package/src/presentation/utils/responsive.js +0 -451
  64. package/src/presentation/utils/variants/compound.js +0 -15
  65. package/src/presentation/utils/variants/core.js +0 -22
  66. package/src/presentation/utils/variants/helpers.js +0 -9
  67. package/src/presentation/utils/variants.js +0 -3
@@ -1,59 +0,0 @@
1
- /**
2
- * IconContainer Molecule Component
3
- *
4
- * Standardized icon container with consistent sizing and styling.
5
- * Used throughout app for icon displays in lists, cards, and settings.
6
- *
7
- * Features:
8
- * - Consistent sizing system
9
- * - Optional background circle
10
- * - Optional gradient background
11
- * - Theme-aware colors
12
- * - Accessibility support
13
- *
14
- * Atomic Design: Molecule (View + Icon)
15
- */
16
- import React from 'react';
17
- import { View, StyleSheet } from 'react-native';
18
- import { useAppDesignTokens } from '@umituz/react-native-theme';
19
- import { LinearGradient } from 'expo-linear-gradient';
20
- const getSizeMap = (tokens) => ({
21
- sm: tokens.iconSizes.sm,
22
- md: tokens.iconSizes.md,
23
- lg: tokens.iconSizes.lg,
24
- xl: tokens.iconSizes.xl,
25
- });
26
- export const IconContainer = ({ icon, size = 'md', backgroundColor, gradient, withBorder = false, borderColor, style, testID, }) => {
27
- const tokens = useAppDesignTokens();
28
- const sizeMap = getSizeMap(tokens);
29
- const containerSize = sizeMap[size];
30
- const borderRadius = containerSize / 2;
31
- const containerStyle = [
32
- styles.container,
33
- {
34
- width: containerSize,
35
- height: containerSize,
36
- borderRadius,
37
- backgroundColor: backgroundColor || (gradient ? undefined : tokens.colors.surfaceVariant),
38
- },
39
- withBorder && {
40
- borderWidth: 1,
41
- borderColor: borderColor || tokens.colors.border,
42
- },
43
- style,
44
- ];
45
- if (gradient) {
46
- return (<LinearGradient colors={gradient} style={containerStyle} testID={testID}>
47
- {icon}
48
- </LinearGradient>);
49
- }
50
- return (<View style={containerStyle} testID={testID}>
51
- {icon}
52
- </View>);
53
- };
54
- const styles = StyleSheet.create({
55
- container: {
56
- alignItems: 'center',
57
- justifyContent: 'center',
58
- },
59
- });
@@ -1,23 +0,0 @@
1
- import React from 'react';
2
- import { TouchableOpacity, View } from 'react-native';
3
- import { useAppDesignTokens } from '@umituz/react-native-theme';
4
- import { AtomicText } from '../atoms/AtomicText';
5
- import { AtomicIcon } from '../atoms/AtomicIcon';
6
- import { getListItemStyles } from './listitem/styles/listItemStyles';
7
- export const ListItem = ({ title, subtitle, leftIcon, rightIcon = 'forward', onPress, disabled = false, style, }) => {
8
- const tokens = useAppDesignTokens();
9
- const listItemStyles = getListItemStyles(tokens);
10
- const Component = onPress ? TouchableOpacity : View;
11
- return (<Component style={[listItemStyles.container, disabled ? listItemStyles.disabled : undefined, style]} onPress={onPress} disabled={disabled} activeOpacity={0.7}>
12
- {leftIcon && (<View style={listItemStyles.iconContainer}>
13
- <AtomicIcon name={leftIcon} color={disabled ? 'surfaceVariant' : 'primary'}/>
14
- </View>)}
15
- <View style={listItemStyles.content}>
16
- <AtomicText type="bodyLarge" color={disabled ? 'surfaceVariant' : 'onSurface'} numberOfLines={1}>{title}</AtomicText>
17
- {subtitle && <AtomicText type="bodySmall" color="surfaceVariant" numberOfLines={2} style={listItemStyles.subtitle}>{subtitle}</AtomicText>}
18
- </View>
19
- {rightIcon && onPress && (<View style={listItemStyles.iconContainer}>
20
- <AtomicIcon name={rightIcon} color="surfaceVariant"/>
21
- </View>)}
22
- </Component>);
23
- };
@@ -1,93 +0,0 @@
1
- /**
2
- * ScreenHeader Component - {{APP_NAME}}
3
- *
4
- * Reusable screen header with consistent back button placement
5
- * Theme: {{THEME_NAME}} ({{CATEGORY}} category)
6
- *
7
- * Features:
8
- * - Top-left back button (arrow-back icon)
9
- * - Centered title text
10
- * - Optional right action button
11
- * - Consistent spacing and layout
12
- * - Works with all 100+ generated apps
13
- *
14
- * CRITICAL: Back button MUST ALWAYS be top-left (never bottom, never center)
15
- */
16
- import React from 'react';
17
- import { View, TouchableOpacity } from 'react-native';
18
- import { useNavigation } from '@react-navigation/native';
19
- import { AtomicIcon } from '../atoms/AtomicIcon';
20
- import { AtomicText } from '../atoms/AtomicText';
21
- import { useAppDesignTokens } from '@umituz/react-native-theme';
22
- /**
23
- * ScreenHeader Component
24
- *
25
- * @example
26
- * // Basic usage (most common)
27
- * <ScreenHeader title="Settings" />
28
- *
29
- * @example
30
- * // With right action
31
- * <ScreenHeader
32
- * title="Edit Profile"
33
- * rightAction={<TouchableOpacity onPress={handleSave}><Text>Save</Text></TouchableOpacity>}
34
- * />
35
- *
36
- * @example
37
- * // Custom back action
38
- * <ScreenHeader
39
- * title="Unsaved Changes"
40
- * onBackPress={handleUnsavedChanges}
41
- * />
42
- */
43
- export const ScreenHeader = ({ title, rightAction, onBackPress, hideBackButton = false, style, testID = 'screen-header', }) => {
44
- const navigation = useNavigation();
45
- const tokens = useAppDesignTokens();
46
- const handleBackPress = () => {
47
- if (onBackPress) {
48
- onBackPress();
49
- }
50
- else {
51
- navigation.goBack();
52
- }
53
- };
54
- return (<View style={[
55
- {
56
- flexDirection: 'row',
57
- alignItems: 'center',
58
- justifyContent: 'space-between',
59
- paddingHorizontal: tokens.spacing.screenPadding,
60
- paddingVertical: tokens.spacing.md,
61
- borderBottomWidth: 0.5,
62
- backgroundColor: tokens.colors.backgroundPrimary,
63
- borderBottomColor: tokens.colors.border,
64
- },
65
- style
66
- ]} testID={testID}>
67
- {/* Left: Back Button (ALWAYS top-left when visible) */}
68
- <View style={{ width: 40, alignItems: 'flex-start' }}>
69
- {!hideBackButton && (<TouchableOpacity onPress={handleBackPress} hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }} testID={`${testID}-back-button`}>
70
- <AtomicIcon name="arrow-back" color="primary"/>
71
- </TouchableOpacity>)}
72
- </View>
73
-
74
- {/* Center: Title */}
75
- <View style={{ flex: 1, alignItems: 'center', paddingHorizontal: tokens.spacing.sm }}>
76
- <AtomicText type="headlineMedium" style={[
77
- {
78
- fontWeight: tokens.typography.bold,
79
- textAlign: 'center',
80
- color: tokens.colors.textPrimary,
81
- }
82
- ]} numberOfLines={1} testID={`${testID}-title`}>
83
- {title}
84
- </AtomicText>
85
- </View>
86
-
87
- {/* Right: Optional Action or Placeholder */}
88
- <View style={{ width: 40, alignItems: 'flex-start' }}>
89
- {rightAction || <View style={{ width: 40 }}/>}
90
- </View>
91
- </View>);
92
- };
93
- export default ScreenHeader;
@@ -1,46 +0,0 @@
1
- /**
2
- * SearchBar Molecule - Search Input with Icon and Clear Button
3
- *
4
- * Combines AtomicInput + AtomicIcon + AtomicButton
5
- * Theme: {{THEME_NAME}} ({{CATEGORY}} category)
6
- *
7
- * Atomic Design Level: MOLECULE
8
- * Composition: AtomicInput + AtomicIcon + TouchableOpacity
9
- */
10
- import React from 'react';
11
- import { View } from 'react-native';
12
- import { useAppDesignTokens } from '@umituz/react-native-theme';
13
- import { AtomicInput } from '../atoms/AtomicInput';
14
- // =============================================================================
15
- // COMPONENT IMPLEMENTATION
16
- // =============================================================================
17
- export const SearchBar = ({ value, onChangeText, onClear, placeholder = 'Search...', containerStyle, ...inputProps }) => {
18
- const tokens = useAppDesignTokens();
19
- const handleClear = () => {
20
- if (onChangeText) {
21
- onChangeText('');
22
- }
23
- if (onClear) {
24
- onClear();
25
- }
26
- };
27
- const styles = getStyles(tokens);
28
- return (<View style={[styles.container, containerStyle]}>
29
- <AtomicInput {...inputProps} value={value} onChangeText={onChangeText} placeholder={placeholder} variant="filled" style={styles.input} leadingIcon="Search" trailingIcon={value && value.length > 0 ? "X" : undefined} onTrailingIconPress={value && value.length > 0 ? handleClear : undefined}/>
30
- </View>);
31
- };
32
- // =============================================================================
33
- // STYLES
34
- // =============================================================================
35
- const getStyles = (tokens) => ({
36
- container: {
37
- width: '100%',
38
- marginVertical: tokens.spacing.sm,
39
- },
40
- input: {
41
- backgroundColor: tokens.colors.surfaceVariant,
42
- },
43
- });
44
- // =============================================================================
45
- // EXPORTS
46
- // =============================================================================
@@ -1,46 +0,0 @@
1
- /**
2
- * SectionCard Molecule Component
3
- *
4
- * Reusable section card with title and content area.
5
- * Used throughout settings screens for consistent grouping.
6
- *
7
- * Features:
8
- * - Automatic theme-aware styling
9
- * - Uppercase section titles with proper spacing
10
- * - Built on AtomicCard for consistency
11
- * - Flexible content area
12
- *
13
- * Atomic Design: Molecule (Card + Text)
14
- */
15
- import React from 'react';
16
- import { View, StyleSheet } from 'react-native';
17
- import { useAppDesignTokens } from '@umituz/react-native-theme';
18
- import { AtomicCard } from '../atoms/AtomicCard';
19
- import { AtomicText } from '../atoms/AtomicText';
20
- export const SectionCard = ({ title, children, style, contentStyle, testID, }) => {
21
- const tokens = useAppDesignTokens();
22
- const styles = getStyles(tokens);
23
- return (<AtomicCard variant="outlined" style={StyleSheet.flatten([styles.card, style])} testID={testID}>
24
- <AtomicText type="labelLarge" color={tokens.colors.textSecondary} style={styles.title}>
25
- {title.toUpperCase()}
26
- </AtomicText>
27
- <View style={contentStyle}>
28
- {children}
29
- </View>
30
- </AtomicCard>);
31
- };
32
- const getStyles = (tokens) => StyleSheet.create({
33
- card: {
34
- paddingVertical: tokens.spacing.md,
35
- paddingHorizontal: 0,
36
- marginHorizontal: tokens.spacing.md,
37
- marginBottom: tokens.spacing.lg,
38
- },
39
- title: {
40
- fontSize: tokens.typography.labelLarge.fontSize,
41
- fontWeight: tokens.typography.labelLarge.fontWeight,
42
- letterSpacing: 0.5,
43
- paddingHorizontal: tokens.spacing.md,
44
- marginBottom: tokens.spacing.sm,
45
- },
46
- });
@@ -1,63 +0,0 @@
1
- /**
2
- * SectionContainer Molecule - Universal Section Wrapper
3
- *
4
- * Provides consistent section layout with optional title
5
- * Theme: {{THEME_NAME}} ({{CATEGORY}} category)
6
- *
7
- * Atomic Design Level: MOLECULE
8
- * Composition: View + AtomicText + Layout
9
- *
10
- * Usage:
11
- * - Home screen sections
12
- * - Dashboard sections
13
- * - Settings groups
14
- * - Content sections
15
- */
16
- import React from 'react';
17
- import { View, StyleSheet } from 'react-native';
18
- import { AtomicText } from '../atoms/AtomicText';
19
- import { useAppDesignTokens } from '@umituz/react-native-theme';
20
- // =============================================================================
21
- // COMPONENT IMPLEMENTATION
22
- // =============================================================================
23
- export const SectionContainer = ({ title, titleColor, titleStyle, style, children, rightAction, }) => {
24
- const tokens = useAppDesignTokens();
25
- const styles = getStyles(tokens);
26
- return (<View style={[styles.section, style]}>
27
- {title && (<View style={styles.header}>
28
- <AtomicText type="titleLarge" color={titleColor || "primary"} style={StyleSheet.flatten([
29
- styles.sectionTitle,
30
- titleStyle,
31
- ])}>
32
- {title}
33
- </AtomicText>
34
- {rightAction && <View style={styles.rightAction}>{rightAction}</View>}
35
- </View>)}
36
- {children}
37
- </View>);
38
- };
39
- // =============================================================================
40
- // STYLES
41
- // =============================================================================
42
- const getStyles = (tokens) => StyleSheet.create({
43
- section: {
44
- marginBottom: tokens.spacing.lg,
45
- paddingHorizontal: tokens.spacing.md,
46
- },
47
- header: {
48
- flexDirection: 'row',
49
- justifyContent: 'space-between',
50
- alignItems: 'center',
51
- marginBottom: tokens.spacing.md,
52
- },
53
- sectionTitle: {
54
- fontSize: tokens.typography.titleLarge.fontSize,
55
- fontWeight: tokens.typography.titleLarge.fontWeight,
56
- },
57
- rightAction: {
58
- marginLeft: tokens.spacing.sm,
59
- },
60
- });
61
- // =============================================================================
62
- // EXPORTS
63
- // =============================================================================
@@ -1,72 +0,0 @@
1
- /**
2
- * SectionHeader Molecule - Universal Section Header
3
- *
4
- * Displays section title with optional subtitle
5
- * Theme: {{THEME_NAME}} ({{CATEGORY}} category)
6
- *
7
- * Atomic Design Level: MOLECULE
8
- * Composition: AtomicText + Layout
9
- *
10
- * Usage:
11
- * - List headers
12
- * - Grid headers
13
- * - Section dividers
14
- * - Screen headers
15
- */
16
- import React from 'react';
17
- import { View, StyleSheet } from 'react-native';
18
- import { AtomicText } from '../atoms/AtomicText';
19
- import { useAppDesignTokens } from '@umituz/react-native-theme';
20
- // =============================================================================
21
- // COMPONENT IMPLEMENTATION
22
- // =============================================================================
23
- export const SectionHeader = ({ title, subtitle, titleColor, subtitleColor, style, titleStyle, subtitleStyle, rightAction, }) => {
24
- const tokens = useAppDesignTokens();
25
- const styles = getStyles(tokens);
26
- return (<View style={[styles.container, style]}>
27
- <View style={styles.textContainer}>
28
- <AtomicText type="headlineLarge" color={titleColor || "primary"} style={StyleSheet.flatten([
29
- styles.title,
30
- titleStyle,
31
- ])}>
32
- {title}
33
- </AtomicText>
34
- {subtitle && (<AtomicText type="bodyMedium" color={subtitleColor || "secondary"} style={StyleSheet.flatten([
35
- styles.subtitle,
36
- subtitleStyle,
37
- ])}>
38
- {subtitle}
39
- </AtomicText>)}
40
- </View>
41
- {rightAction && <View style={styles.rightAction}>{rightAction}</View>}
42
- </View>);
43
- };
44
- // =============================================================================
45
- // STYLES
46
- // =============================================================================
47
- const getStyles = (tokens) => StyleSheet.create({
48
- container: {
49
- flexDirection: 'row',
50
- justifyContent: 'space-between',
51
- alignItems: 'center',
52
- paddingHorizontal: tokens.spacing.md,
53
- paddingVertical: tokens.spacing.sm,
54
- },
55
- textContainer: {
56
- flex: 1,
57
- },
58
- title: {
59
- fontSize: tokens.typography.headlineLarge.fontSize,
60
- fontWeight: tokens.typography.headlineLarge.fontWeight,
61
- marginBottom: tokens.spacing.xs,
62
- },
63
- subtitle: {
64
- fontSize: tokens.typography.bodyMedium.fontSize,
65
- },
66
- rightAction: {
67
- marginLeft: tokens.spacing.sm,
68
- },
69
- });
70
- // =============================================================================
71
- // EXPORTS
72
- // =============================================================================
@@ -1,114 +0,0 @@
1
- /**
2
- * AtomicConfirmationModal Style Utilities
3
- *
4
- * Styling functions for confirmation modal component
5
- */
6
- /**
7
- * Get variant configuration (icon and color only)
8
- * Note: Confirm text is handled in component with translations
9
- */
10
- export const getVariantConfig = (variant, tokens) => {
11
- switch (variant) {
12
- case 'destructive':
13
- return {
14
- icon: 'warning',
15
- iconColor: 'error',
16
- };
17
- case 'warning':
18
- return {
19
- icon: 'warning',
20
- iconColor: 'warning',
21
- };
22
- case 'success':
23
- return {
24
- icon: 'check-circle',
25
- iconColor: 'success',
26
- };
27
- case 'default':
28
- default:
29
- return {
30
- icon: 'help-circle',
31
- iconColor: 'primary',
32
- };
33
- }
34
- };
35
- /**
36
- * Get modal overlay style
37
- */
38
- export const getModalOverlayStyle = (tokens) => ({
39
- flex: 1,
40
- justifyContent: 'center',
41
- alignItems: 'center',
42
- backgroundColor: 'rgba(0, 0, 0, 0.5)',
43
- });
44
- /**
45
- * Get backdrop style (invisible layer for dismissing)
46
- */
47
- export const getBackdropStyle = () => ({
48
- position: 'absolute',
49
- top: 0,
50
- left: 0,
51
- right: 0,
52
- bottom: 0,
53
- });
54
- /**
55
- * Get modal container style
56
- */
57
- export const getModalContainerStyle = (tokens) => ({
58
- width: '85%',
59
- maxWidth: 400,
60
- backgroundColor: tokens.colors.surface,
61
- borderRadius: 16,
62
- padding: 24,
63
- alignItems: 'center',
64
- borderWidth: 1,
65
- borderColor: tokens.colors.outline,
66
- });
67
- /**
68
- * Get icon container style
69
- */
70
- export const getIconContainerStyle = (tokens) => ({
71
- marginBottom: 16,
72
- });
73
- /**
74
- * Get title container style
75
- */
76
- export const getTitleContainerStyle = (tokens) => ({
77
- marginBottom: 8,
78
- });
79
- /**
80
- * Get message container style
81
- */
82
- export const getMessageContainerStyle = (tokens) => ({
83
- marginBottom: 24,
84
- });
85
- /**
86
- * Get button container style
87
- */
88
- export const getButtonContainerStyle = (tokens) => ({
89
- flexDirection: 'row',
90
- gap: 12,
91
- width: '100%',
92
- });
93
- /**
94
- * Get button style
95
- */
96
- export const getButtonStyle = () => ({
97
- flex: 1,
98
- });
99
- /**
100
- * Get confirm button variant based on modal variant
101
- */
102
- export const getConfirmButtonVariant = (variant) => {
103
- switch (variant) {
104
- case 'destructive':
105
- return 'primary'; // Will use error color
106
- case 'warning':
107
- return 'primary'; // Will use warning color
108
- case 'success':
109
- return 'primary'; // Will use success color
110
- case 'default':
111
- default:
112
- return 'primary';
113
- }
114
- };
@@ -1,6 +0,0 @@
1
- /**
2
- * AtomicConfirmationModal Type Definitions
3
- *
4
- * Type-safe interfaces for confirmation modal component
5
- */
6
- export {};
@@ -1,16 +0,0 @@
1
- /**
2
- * Molecule Components Export Index
3
- *
4
- * Molecules are combinations of atoms that form more complex UI components
5
- * Theme: {{THEME_NAME}} ({{CATEGORY}} category)
6
- *
7
- * Atomic Design Level: MOLECULES
8
- */
9
- // Component exports
10
- export { FormField } from './FormField';
11
- export { ListItem } from './ListItem';
12
- export { SearchBar } from './SearchBar';
13
- export { SectionCard } from './SectionCard';
14
- export { IconContainer } from './IconContainer';
15
- export { ScreenHeader } from './ScreenHeader';
16
- export { AtomicConfirmationModal, useConfirmationModal } from './AtomicConfirmationModal';
@@ -1,14 +0,0 @@
1
- export const getListItemStyles = (tokens) => ({
2
- container: {
3
- flexDirection: 'row',
4
- alignItems: 'center',
5
- padding: tokens.spacing.md,
6
- backgroundColor: tokens.colors.surface,
7
- borderRadius: tokens.borders.radius.lg,
8
- marginBottom: tokens.spacing.sm,
9
- },
10
- disabled: { opacity: 0.6 },
11
- iconContainer: { marginHorizontal: tokens.spacing.sm },
12
- content: { flex: 1 },
13
- subtitle: { marginTop: tokens.spacing.xs },
14
- });
@@ -1 +0,0 @@
1
- export {};
@@ -1,77 +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 { View, SafeAreaView } from 'react-native';
12
- import { useAppDesignTokens } from '@umituz/react-native-theme';
13
- import { AtomicText } from '../atoms/AtomicText';
14
- import { AtomicButton } from '../atoms/AtomicButton';
15
- // =============================================================================
16
- // COMPONENT IMPLEMENTATION
17
- // =============================================================================
18
- export const AppHeader = ({ title, subtitle, leftIcon, onLeftPress, rightIcon, onRightPress, showShadow = true, backgroundColor, style, }) => {
19
- const tokens = useAppDesignTokens();
20
- const bgColor = backgroundColor || tokens.colors.surface;
21
- const styles = getStyles(tokens);
22
- return (<SafeAreaView style={[styles.safeArea, { backgroundColor: bgColor }]}>
23
- <View style={[styles.container, { backgroundColor: bgColor }, style]}>
24
- {/* Left Action */}
25
- <View style={styles.leftContainer}>
26
- {leftIcon && onLeftPress && (<AtomicButton variant="text" size="sm" onPress={onLeftPress} icon={leftIcon}/>)}
27
- </View>
28
-
29
- {/* Title Section */}
30
- <View style={styles.titleContainer}>
31
- <AtomicText type="titleLarge" color="primary" numberOfLines={1}>
32
- {title}
33
- </AtomicText>
34
- {subtitle && (<AtomicText type="bodySmall" color="secondary" numberOfLines={1}>
35
- {subtitle}
36
- </AtomicText>)}
37
- </View>
38
-
39
- {/* Right Action */}
40
- <View style={styles.rightContainer}>
41
- {rightIcon && onRightPress && (<AtomicButton variant="text" size="sm" onPress={onRightPress} icon={rightIcon}/>)}
42
- </View>
43
- </View>
44
- </SafeAreaView>);
45
- };
46
- // =============================================================================
47
- // STYLES
48
- // =============================================================================
49
- const getStyles = (tokens) => ({
50
- safeArea: {
51
- backgroundColor: tokens.colors.surface,
52
- },
53
- container: {
54
- flexDirection: 'row',
55
- alignItems: 'center',
56
- justifyContent: 'space-between',
57
- paddingHorizontal: tokens.spacing.md,
58
- paddingVertical: tokens.spacing.sm,
59
- minHeight: tokens.iconSizes.xl + tokens.spacing.md,
60
- },
61
- leftContainer: {
62
- width: tokens.iconSizes.xl + tokens.spacing.sm,
63
- alignItems: 'flex-start',
64
- },
65
- titleContainer: {
66
- flex: 1,
67
- alignItems: 'center',
68
- paddingHorizontal: tokens.spacing.sm,
69
- },
70
- rightContainer: {
71
- width: tokens.iconSizes.xl + tokens.spacing.sm,
72
- alignItems: 'flex-start',
73
- },
74
- });
75
- // =============================================================================
76
- // EXPORTS
77
- // =============================================================================