@umituz/react-native-design-system 1.14.0 → 2.0.0

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 (87) hide show
  1. package/package.json +26 -19
  2. package/src/atoms/AtomicAvatar.tsx +161 -0
  3. package/src/atoms/AtomicButton.tsx +241 -0
  4. package/src/atoms/AtomicChip.tsx +226 -0
  5. package/src/atoms/AtomicDatePicker.tsx +255 -0
  6. package/src/atoms/AtomicFab.tsx +99 -0
  7. package/src/atoms/AtomicIcon.tsx +149 -0
  8. package/src/atoms/AtomicInput.tsx +308 -0
  9. package/src/atoms/AtomicPicker.tsx +310 -0
  10. package/src/atoms/AtomicProgress.tsx +149 -0
  11. package/src/atoms/AtomicText.tsx +55 -0
  12. package/src/atoms/__tests__/AtomicButton.test.tsx +107 -0
  13. package/src/atoms/__tests__/AtomicIcon.test.tsx +110 -0
  14. package/src/atoms/__tests__/AtomicInput.test.tsx +195 -0
  15. package/src/atoms/datepicker/components/DatePickerButton.tsx +112 -0
  16. package/src/atoms/datepicker/components/DatePickerModal.tsx +143 -0
  17. package/src/atoms/fab/styles/fabStyles.ts +98 -0
  18. package/src/atoms/fab/types/index.ts +88 -0
  19. package/src/atoms/index.ts +70 -0
  20. package/src/atoms/input/hooks/useInputState.ts +63 -0
  21. package/src/atoms/input/styles/inputStylesHelper.ts +120 -0
  22. package/src/atoms/picker/components/PickerChips.tsx +57 -0
  23. package/src/atoms/picker/components/PickerModal.tsx +214 -0
  24. package/src/atoms/picker/styles/pickerStyles.ts +223 -0
  25. package/src/atoms/picker/types/index.ts +42 -0
  26. package/src/index.ts +148 -79
  27. package/src/molecules/ConfirmationModal.tsx +42 -0
  28. package/src/molecules/ConfirmationModalContent.tsx +87 -0
  29. package/src/molecules/ConfirmationModalMain.tsx +91 -0
  30. package/src/molecules/FormField.tsx +155 -0
  31. package/src/molecules/IconContainer.tsx +79 -0
  32. package/src/molecules/ListItem.tsx +35 -0
  33. package/src/molecules/ScreenHeader.tsx +171 -0
  34. package/src/molecules/SearchBar.tsx +198 -0
  35. package/src/molecules/confirmation-modal/components.tsx +94 -0
  36. package/src/molecules/confirmation-modal/index.ts +7 -0
  37. package/src/molecules/confirmation-modal/styles/confirmationModalStyles.ts +133 -0
  38. package/src/molecules/confirmation-modal/types/index.ts +41 -0
  39. package/src/molecules/confirmation-modal/useConfirmationModal.ts +50 -0
  40. package/src/molecules/index.ts +19 -0
  41. package/src/molecules/listitem/index.ts +6 -0
  42. package/src/molecules/listitem/styles/listItemStyles.ts +37 -0
  43. package/src/molecules/listitem/types/index.ts +21 -0
  44. package/src/organisms/AppHeader.tsx +136 -0
  45. package/src/organisms/FormContainer.tsx +169 -0
  46. package/src/organisms/ScreenLayout.tsx +183 -0
  47. package/src/organisms/index.ts +31 -0
  48. package/src/responsive/config.ts +139 -0
  49. package/src/responsive/deviceDetection.ts +155 -0
  50. package/src/responsive/gridUtils.ts +79 -0
  51. package/src/responsive/index.ts +52 -0
  52. package/src/responsive/platformConstants.ts +98 -0
  53. package/src/responsive/responsive.ts +61 -0
  54. package/src/responsive/responsiveLayout.ts +137 -0
  55. package/src/responsive/responsiveSizing.ts +134 -0
  56. package/src/responsive/useResponsive.ts +140 -0
  57. package/src/responsive/validation.ts +158 -0
  58. package/src/theme/core/BaseTokens.ts +42 -0
  59. package/src/theme/core/ColorPalette.ts +29 -0
  60. package/src/theme/core/CustomColors.ts +122 -0
  61. package/src/theme/core/NavigationTheme.ts +72 -0
  62. package/src/theme/core/TokenFactory.ts +103 -0
  63. package/src/theme/core/colors/ColorUtils.ts +53 -0
  64. package/src/theme/core/colors/DarkColors.ts +146 -0
  65. package/src/theme/core/colors/LightColors.ts +146 -0
  66. package/src/theme/core/constants/DesignConstants.ts +31 -0
  67. package/src/theme/core/themes.ts +118 -0
  68. package/src/theme/core/tokens/BaseTokens.ts +144 -0
  69. package/src/theme/core/tokens/Borders.ts +43 -0
  70. package/src/theme/core/tokens/Sizes.ts +51 -0
  71. package/src/theme/core/tokens/Spacing.ts +38 -0
  72. package/src/theme/core/tokens/Typography.ts +143 -0
  73. package/src/theme/hooks/useAppDesignTokens.ts +45 -0
  74. package/src/theme/hooks/useCommonStyles.ts +248 -0
  75. package/src/theme/hooks/useThemedStyles.ts +68 -0
  76. package/src/theme/index.ts +94 -0
  77. package/src/theme/infrastructure/globalThemeStore.ts +69 -0
  78. package/src/theme/infrastructure/storage/ThemeStorage.ts +93 -0
  79. package/src/theme/infrastructure/stores/themeStore.ts +109 -0
  80. package/src/typography/__tests__/colorValidationUtils.test.ts +180 -0
  81. package/src/typography/__tests__/textColorUtils.test.ts +185 -0
  82. package/src/typography/__tests__/textStyleUtils.test.ts +168 -0
  83. package/src/typography/domain/entities/TypographyTypes.ts +88 -0
  84. package/src/typography/index.ts +53 -0
  85. package/src/typography/presentation/utils/colorValidationUtils.ts +133 -0
  86. package/src/typography/presentation/utils/textColorUtils.ts +205 -0
  87. package/src/typography/presentation/utils/textStyleUtils.ts +159 -0
@@ -0,0 +1,103 @@
1
+ /**
2
+ * TOKEN FACTORY - THEME INJECTION LOGIC
3
+ *
4
+ * ✅ Factory Pattern for creating complete design tokens
5
+ * ✅ Combines static tokens (BaseTokens) + dynamic colors (ColorPalette)
6
+ * ✅ Type-safe token generation
7
+ * ✅ Zero duplication - SINGLE SOURCE OF TRUTH
8
+ *
9
+ * @module TokenFactory
10
+ */
11
+
12
+ import { BASE_TOKENS } from './BaseTokens';
13
+ import { getColorPalette, withAlpha, type ThemeMode, type ColorPalette } from './ColorPalette';
14
+ import { applyCustomColors, type CustomThemeColors } from './CustomColors';
15
+
16
+ // =============================================================================
17
+ // DESIGN TOKENS TYPE
18
+ // =============================================================================
19
+
20
+ /**
21
+ * Complete design tokens shape
22
+ * Combines static tokens (spacing, typography, borders) + dynamic colors
23
+ */
24
+ export type DesignTokens = {
25
+ colors: ColorPalette;
26
+ spacing: typeof BASE_TOKENS.spacing;
27
+ typography: typeof BASE_TOKENS.typography;
28
+ iconSizes: typeof BASE_TOKENS.iconSizes;
29
+ opacity: typeof BASE_TOKENS.opacity;
30
+ avatarSizes: typeof BASE_TOKENS.avatarSizes;
31
+ borders: typeof BASE_TOKENS.borders & {
32
+ card: typeof BASE_TOKENS.borders.card & { borderColor: string };
33
+ input: typeof BASE_TOKENS.borders.input & { borderColor: string };
34
+ };
35
+ };
36
+
37
+ // =============================================================================
38
+ // TOKEN FACTORY FUNCTION
39
+ // =============================================================================
40
+
41
+ /**
42
+ * Create complete design tokens for a specific theme mode
43
+ *
44
+ * @param mode - Theme mode ('light' or 'dark')
45
+ * @param customColors - Optional custom colors to override default colors
46
+ * @returns Complete design tokens object
47
+ *
48
+ * @example
49
+ * ```typescript
50
+ * const lightTokens = createDesignTokens('light');
51
+ * const darkTokens = createDesignTokens('dark');
52
+ * const customTokens = createDesignTokens('dark', { primary: '#FF6B35' });
53
+ *
54
+ * // Use in components
55
+ * <View style={{ backgroundColor: lightTokens.colors.primary }}>
56
+ * <Text style={lightTokens.typography.bodyLarge}>Hello!</Text>
57
+ * </View>
58
+ * ```
59
+ */
60
+ export const createDesignTokens = (
61
+ mode: ThemeMode,
62
+ customColors?: CustomThemeColors,
63
+ ): DesignTokens => {
64
+ // Get color palette for theme mode
65
+ const baseColors = getColorPalette(mode);
66
+
67
+ // Apply custom colors if provided
68
+ const colors = applyCustomColors(baseColors, customColors);
69
+
70
+ // Combine static tokens + dynamic colors
71
+ return {
72
+ // ✅ DYNAMIC: Colors from theme mode + custom overrides
73
+ colors,
74
+
75
+ // ✅ STATIC: These don't change with theme
76
+ spacing: BASE_TOKENS.spacing,
77
+ typography: BASE_TOKENS.typography,
78
+ iconSizes: BASE_TOKENS.iconSizes,
79
+ opacity: BASE_TOKENS.opacity,
80
+ avatarSizes: BASE_TOKENS.avatarSizes,
81
+
82
+ // ✅ BORDERS: Static + injected border colors from theme
83
+ borders: {
84
+ ...BASE_TOKENS.borders,
85
+ card: {
86
+ ...BASE_TOKENS.borders.card,
87
+ borderColor: colors.border,
88
+ },
89
+ input: {
90
+ ...BASE_TOKENS.borders.input,
91
+ borderColor: colors.border,
92
+ },
93
+ },
94
+ };
95
+ };
96
+
97
+ // =============================================================================
98
+ // UTILITY EXPORTS
99
+ // =============================================================================
100
+
101
+ export { withAlpha };
102
+ export type { ThemeMode, ColorPalette };
103
+
@@ -0,0 +1,53 @@
1
+ /**
2
+ * COLOR UTILITIES
3
+ *
4
+ * Color manipulation and validation utilities
5
+ */
6
+
7
+ import { DESIGN_CONSTANTS } from '../constants/DesignConstants';
8
+
9
+ /**
10
+ * Validate hex color format
11
+ * @param hexColor - Hex color string to validate
12
+ * @returns true if valid hex color
13
+ */
14
+ export const isValidHexColor = (hexColor: string): boolean => {
15
+ if (!hexColor || typeof hexColor !== 'string') {
16
+ return false;
17
+ }
18
+
19
+ return DESIGN_CONSTANTS.HEX_COLOR_REGEX.test(hexColor);
20
+ };
21
+
22
+ /**
23
+ * Add alpha transparency to hex color
24
+ * @param hexColor - Hex color string (#RRGGBB or #RGB)
25
+ * @param alpha - Alpha value 0-1
26
+ * @returns Hex color with alpha (#RRGGBBAA)
27
+ */
28
+ export const withAlpha = (hexColor: string, alpha: number): string => {
29
+ if (!isValidHexColor(hexColor)) {
30
+ if (__DEV__) {
31
+ console.warn('[withAlpha] Invalid hex color format:', hexColor);
32
+ }
33
+ return hexColor;
34
+ }
35
+
36
+ if (typeof alpha !== 'number' || alpha < 0 || alpha > 1) {
37
+ if (__DEV__) {
38
+ console.warn('[withAlpha] Invalid alpha value, must be 0-1:', alpha);
39
+ }
40
+ return hexColor;
41
+ }
42
+
43
+ // Convert 3-digit hex to 6-digit
44
+ const hex = hexColor.length === 4
45
+ ? hexColor.split('').map(c => c + c).join('')
46
+ : hexColor;
47
+
48
+ const alphaHex = Math.round(alpha * 255)
49
+ .toString(16)
50
+ .padStart(2, '0');
51
+
52
+ return hex + alphaHex;
53
+ };
@@ -0,0 +1,146 @@
1
+ /**
2
+ * DARK THEME COLORS
3
+ *
4
+ * Dark theme color palette with warm orange harmony
5
+ */
6
+
7
+ export const darkColors = {
8
+ // PRIMARY BRAND COLORS - Warm Orange & Harmony Bloom (Dark Mode)
9
+ primary: '#FF8C42', // Warm Orange for dark backgrounds
10
+ primaryLight: '#FFA07A', // Light Salmon
11
+ primaryDark: '#FF6B35', // Vibrant Orange
12
+
13
+ secondary: '#FFCC99', // Light Peach for dark backgrounds
14
+ secondaryLight: '#FFD4A3', // Warm Beige
15
+ secondaryDark: '#FFB88C', // Soft Peach
16
+
17
+ accent: '#FFB6C1', // Light Pink (Bloom) for dark backgrounds
18
+ accentLight: '#FFA07A', // Light Salmon
19
+ accentDark: '#FF8C69', // Salmon
20
+
21
+ // MATERIAL DESIGN 3 - ON COLORS (Dark mode text colors)
22
+ onPrimary: '#000000', // Dark text on light primary
23
+ onSecondary: '#000000', // Dark text on light secondary
24
+ onSuccess: '#000000', // Dark text on light success
25
+ onError: '#FFFFFF', // Light text on dark error
26
+ onWarning: '#000000', // Dark text on light warning
27
+ onInfo: '#000000', // Dark text on light info
28
+ onSurface: '#E2E8F0', // Light text on dark surface
29
+ onBackground: '#F1F5F9', // Light text on dark background
30
+ onSurfaceDisabled: '#64748B', // Disabled dark mode text
31
+
32
+ // MATERIAL DESIGN 3 - CONTAINER COLORS (Dark mode containers)
33
+ primaryContainer: '#CC4A1F', // Dark orange container
34
+ onPrimaryContainer: '#FFE4CD', // Light text on dark primary container
35
+ secondaryContainer: '#CC8C5F', // Dark peach container
36
+ onSecondaryContainer: '#FFF8DC', // Light text on dark secondary container
37
+ errorContainer: '#7F1D1D', // Dark red container
38
+ onErrorContainer: '#FEE2E2', // Light text on dark error container
39
+
40
+ // MATERIAL DESIGN 3 - OUTLINE (Dark mode outlines)
41
+ outline: '#475569', // Medium gray outline for dark mode
42
+ outlineVariant: '#334155', // Darker outline variant
43
+ outlineDisabled: '#334155', // Disabled outline
44
+
45
+ // SEMANTIC UI COLORS (slightly lighter for dark backgrounds)
46
+ success: '#34D399', // Lighter green for dark mode
47
+ successLight: '#34D399',
48
+ successDark: '#059669',
49
+
50
+ error: '#EF4444',
51
+ errorLight: '#F87171',
52
+ errorDark: '#DC2626',
53
+
54
+ warning: '#F59E0B',
55
+ warningLight: '#FBBF24',
56
+ warningDark: '#D97706',
57
+
58
+ info: '#FF8C42', // Warm Orange for info (dark mode)
59
+ infoLight: '#FFA07A', // Light Salmon
60
+ infoDark: '#FF6347', // Tomato
61
+
62
+ // SEMANTIC CONTAINER COLORS (Same as light mode for type consistency)
63
+ successContainer: '#D1FAE5', // Same as light mode for type consistency
64
+ onSuccessContainer: '#065F46', // Same as light mode for type consistency
65
+ warningContainer: '#FEF3C7', // Same as light mode for type consistency
66
+ onWarningContainer: '#92400E', // Same as light mode for type consistency
67
+ infoContainer: '#FFE4CD', // Light orange container
68
+ onInfoContainer: '#CC4A1F', // Text on info container
69
+
70
+ // GRAYSCALE PALETTE (Same as light mode for type consistency)
71
+ gray50: '#FAFAFA',
72
+ gray100: '#F4F4F5',
73
+ gray200: '#E4E4E7',
74
+ gray300: '#D4D4D8',
75
+ gray400: '#A1A1AA',
76
+ gray500: '#71717A',
77
+ gray600: '#52525B',
78
+ gray700: '#3F3F46',
79
+ gray800: '#27272A',
80
+ gray900: '#18181B',
81
+
82
+ // BACKGROUND COLORS (dark mode - true dark backgrounds)
83
+ backgroundPrimary: '#0F172A', // Slate 900 - Deep dark background
84
+ backgroundSecondary: '#1E293B', // Slate 800 - Slightly lighter
85
+
86
+ surface: '#1E293B', // Slate 800 - Card/surface backgrounds
87
+ surfaceVariant: '#334155', // Slate 700 - Variant surfaces
88
+ surfaceSecondary: '#334155', // Alias for surfaceVariant
89
+ surfaceDisabled: '#475569', // Slate 600 - Disabled surfaces
90
+
91
+ // TEXT COLORS (dark mode - light text on dark backgrounds)
92
+ textPrimary: '#F1F5F9', // Slate 100 - Primary text (very light)
93
+ textSecondary: '#CBD5E1', // Slate 300 - Secondary text
94
+ textTertiary: '#94A3B8', // Slate 400 - Tertiary text
95
+ textDisabled: '#64748B', // Slate 500 - Disabled text
96
+ textInverse: '#0F172A', // Dark text for light backgrounds
97
+
98
+ // BORDER COLORS (dark mode - subtle borders)
99
+ border: '#334155', // Slate 700 - Default border
100
+ borderLight: '#475569', // Slate 600 - Light border
101
+ borderMedium: '#64748B', // Slate 500 - Medium border
102
+ borderFocus: '#60A5FA', // Blue 400 - Focus border (lighter)
103
+ borderDisabled: '#475569', // Slate 600 - Disabled border
104
+
105
+ // COMPONENT-SPECIFIC COLORS (dark mode specific)
106
+ buttonPrimary: '#FF8C42', // Warm Orange for dark mode
107
+ buttonSecondary: '#FFCC99', // Light Peach for dark mode
108
+
109
+ inputBackground: '#1E293B', // Dark input background
110
+ inputBorder: '#475569', // Subtle input border
111
+
112
+ cardBackground: '#1E293B', // Dark card background
113
+
114
+ // COLOR ALIASES (for backward compatibility and convenience)
115
+ text: '#F1F5F9', // Alias for textPrimary
116
+ background: '#0F172A', // Alias for backgroundPrimary
117
+ card: '#1E293B', // Alias for cardBackground
118
+
119
+ // SPECIAL COLORS
120
+ transparent: 'transparent',
121
+ black: '#000000',
122
+ white: '#FFFFFF',
123
+
124
+ // RGBA OVERLAY COLORS (Same as light mode for type consistency)
125
+ modalOverlay: 'rgba(0, 0, 0, 0.5)',
126
+ overlaySubtle: 'rgba(0, 0, 0, 0.05)',
127
+ overlayLight: 'rgba(0, 0, 0, 0.1)',
128
+ overlayMedium: 'rgba(0, 0, 0, 0.3)',
129
+ overlayBackground: 'rgba(0, 0, 0, 0.05)',
130
+
131
+ whiteOverlay: 'rgba(255, 255, 255, 0.2)',
132
+ whiteOverlayStrong: 'rgba(255, 255, 255, 0.95)',
133
+ whiteOverlayBorder: 'rgba(255, 255, 255, 0.5)',
134
+
135
+ textWhiteOpacity: 'rgba(255, 255, 255, 0.8)',
136
+
137
+ errorBackground: 'rgba(239, 68, 68, 0.1)',
138
+ primaryBackground: 'rgba(255, 140, 66, 0.1)', // Orange background (dark mode)
139
+
140
+ cardOverlay: 'rgba(0, 0, 0, 0.15)',
141
+
142
+ inputBackground_RGBA: 'rgba(248, 250, 252, 0.9)',
143
+
144
+ // GRADIENTS - Warm Orange Harmony (Dark Mode)
145
+ gradient: ['#FF8C42', '#FFCC99'], // Orange to Peach gradient
146
+ };
@@ -0,0 +1,146 @@
1
+ /**
2
+ * LIGHT THEME COLORS
3
+ *
4
+ * Light theme color palette with warm orange harmony
5
+ */
6
+
7
+ export const lightColors = {
8
+ // PRIMARY BRAND COLORS - Warm Orange & Harmony Bloom
9
+ primary: '#FF6B35', // Vibrant Orange
10
+ primaryLight: '#FF8C42', // Warm Orange
11
+ primaryDark: '#FF4500', // Orange Red
12
+
13
+ secondary: '#FFB88C', // Soft Peach
14
+ secondaryLight: '#FFCC99', // Light Peach
15
+ secondaryDark: '#FF8C69', // Salmon
16
+
17
+ accent: '#FFB6C1', // Light Pink (Bloom)
18
+ accentLight: '#FFA07A', // Light Salmon
19
+ accentDark: '#FF8C69', // Salmon
20
+
21
+ // MATERIAL DESIGN 3 - ON COLORS (Text on colored backgrounds)
22
+ onPrimary: '#FFFFFF', // Text on primary background
23
+ onSecondary: '#FFFFFF', // Text on secondary background
24
+ onSuccess: '#FFFFFF', // Text on success background
25
+ onError: '#FFFFFF', // Text on error background
26
+ onWarning: '#000000', // Text on warning background
27
+ onInfo: '#FFFFFF', // Text on info background
28
+ onSurface: '#1E293B', // Text on surface
29
+ onBackground: '#1E293B', // Text on background
30
+ onSurfaceDisabled: '#CBD5E1', // Disabled text color
31
+
32
+ // MATERIAL DESIGN 3 - CONTAINER COLORS (Lighter versions for containers)
33
+ primaryContainer: '#FFE4CD', // Light orange container
34
+ onPrimaryContainer: '#CC4A1F', // Text on primary container
35
+ secondaryContainer: '#FFF8DC', // Light peach container
36
+ onSecondaryContainer: '#CC8C5F', // Text on secondary container
37
+ errorContainer: '#FEE2E2', // Light container using error
38
+ onErrorContainer: '#991B1B', // Text on error container
39
+
40
+ // MATERIAL DESIGN 3 - OUTLINE
41
+ outline: '#CBD5E1', // Default outline color
42
+ outlineVariant: '#E2E8F0', // Lighter outline variant
43
+ outlineDisabled: '#E2E8F0', // Disabled outline color
44
+
45
+ // SEMANTIC UI COLORS
46
+ success: '#10B981',
47
+ successLight: '#34D399',
48
+ successDark: '#059669',
49
+
50
+ error: '#EF4444',
51
+ errorLight: '#F87171',
52
+ errorDark: '#DC2626',
53
+
54
+ warning: '#F59E0B',
55
+ warningLight: '#FBBF24',
56
+ warningDark: '#D97706',
57
+
58
+ info: '#FF8C42', // Warm Orange for info
59
+ infoLight: '#FFA07A', // Light Salmon
60
+ infoDark: '#FF6347', // Tomato
61
+
62
+ // SEMANTIC CONTAINER COLORS (Light mode)
63
+ successContainer: '#D1FAE5', // Light container for success states
64
+ onSuccessContainer: '#065F46', // Text on success container
65
+ warningContainer: '#FEF3C7', // Light container for warning states
66
+ onWarningContainer: '#92400E', // Text on warning container
67
+ infoContainer: '#FFE4CD', // Light orange container for info states
68
+ onInfoContainer: '#CC4A1F', // Text on info container
69
+
70
+ // GRAYSCALE PALETTE
71
+ gray50: '#FAFAFA',
72
+ gray100: '#F4F4F5',
73
+ gray200: '#E4E4E7',
74
+ gray300: '#D4D4D8',
75
+ gray400: '#A1A1AA',
76
+ gray500: '#71717A',
77
+ gray600: '#52525B',
78
+ gray700: '#3F3F46',
79
+ gray800: '#27272A',
80
+ gray900: '#18181B',
81
+
82
+ // BACKGROUND COLORS
83
+ backgroundPrimary: '#FFFFFF',
84
+ backgroundSecondary: '#F8FAFC',
85
+
86
+ surface: '#FFFFFF',
87
+ surfaceVariant: '#F1F5F9',
88
+ surfaceSecondary: '#F1F5F9', // Alias
89
+ surfaceDisabled: '#F4F4F5', // Disabled surface color
90
+
91
+ // TEXT COLORS
92
+ textPrimary: '#1E293B',
93
+ textSecondary: '#64748B',
94
+ textTertiary: '#94A3B8',
95
+ textDisabled: '#CBD5E1',
96
+ textInverse: '#FFFFFF',
97
+
98
+ // BORDER COLORS
99
+ border: '#E2E8F0',
100
+ borderLight: '#F1F5F9',
101
+ borderMedium: '#CBD5E1',
102
+ borderFocus: '#3B82F6',
103
+ borderDisabled: '#F1F5F9',
104
+
105
+ // COMPONENT-SPECIFIC COLORS
106
+ buttonPrimary: '#FF6B35', // Vibrant Orange
107
+ buttonSecondary: '#FFB88C', // Soft Peach
108
+
109
+ inputBackground: '#FFFFFF',
110
+ inputBorder: '#E2E8F0',
111
+
112
+ cardBackground: '#FFFFFF',
113
+
114
+ // COLOR ALIASES (for backward compatibility and convenience)
115
+ text: '#1E293B', // Alias for textPrimary
116
+ background: '#FFFFFF', // Alias for backgroundPrimary
117
+ card: '#FFFFFF', // Alias for cardBackground
118
+
119
+ // SPECIAL COLORS
120
+ transparent: 'transparent',
121
+ black: '#000000',
122
+ white: '#FFFFFF',
123
+
124
+ // RGBA OVERLAY COLORS (for modals, cards, etc.)
125
+ modalOverlay: 'rgba(0, 0, 0, 0.5)',
126
+ overlaySubtle: 'rgba(0, 0, 0, 0.05)',
127
+ overlayLight: 'rgba(0, 0, 0, 0.1)',
128
+ overlayMedium: 'rgba(0, 0, 0, 0.3)',
129
+ overlayBackground: 'rgba(0, 0, 0, 0.05)',
130
+
131
+ whiteOverlay: 'rgba(255, 255, 255, 0.2)',
132
+ whiteOverlayStrong: 'rgba(255, 255, 255, 0.95)',
133
+ whiteOverlayBorder: 'rgba(255, 255, 255, 0.5)',
134
+
135
+ textWhiteOpacity: 'rgba(255, 255, 255, 0.8)',
136
+
137
+ errorBackground: 'rgba(239, 68, 68, 0.1)',
138
+ primaryBackground: 'rgba(255, 107, 53, 0.1)', // Orange background
139
+
140
+ cardOverlay: 'rgba(0, 0, 0, 0.15)',
141
+
142
+ inputBackground_RGBA: 'rgba(248, 250, 252, 0.9)',
143
+
144
+ // GRADIENTS - Warm Orange Harmony
145
+ gradient: ['#FF6B35', '#FFB88C'], // Orange to Peach gradient
146
+ };
@@ -0,0 +1,31 @@
1
+ /**
2
+ * DESIGN SYSTEM CONSTANTS
3
+ *
4
+ * Magic numbers and constants used throughout the design system
5
+ */
6
+
7
+ export const DESIGN_CONSTANTS = {
8
+ // Border radius
9
+ FULL_BORDER_RADIUS: 9999,
10
+
11
+ // Alpha values
12
+ ALPHA_TRANSPARENT: 0,
13
+ ALPHA_MINIMUM: 0,
14
+ ALPHA_MAXIMUM: 1,
15
+
16
+ // Spacing base unit (4px scale)
17
+ SPACING_BASE_UNIT: 4,
18
+
19
+ // Touch targets
20
+ MINIMUM_TOUCH_TARGET: 44,
21
+
22
+ // Storage keys
23
+ STORAGE_NAMESPACE: '@umituz/react-native-design-system-theme',
24
+
25
+ // Validation
26
+ HEX_COLOR_REGEX: /^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6})$/,
27
+
28
+ // Typography
29
+ MINIMUM_FONT_SIZE: 10,
30
+ MAXIMUM_FONT_SIZE: 57,
31
+ } as const;
@@ -0,0 +1,118 @@
1
+ /**
2
+ * Theme Objects - Light and Dark Themes
3
+ *
4
+ * Combines BASE_TOKENS + ColorPalette into complete theme objects
5
+ */
6
+
7
+ import { BASE_TOKENS } from './BaseTokens';
8
+ import { lightColors, darkColors } from './ColorPalette';
9
+ import type { ColorPalette } from './ColorPalette';
10
+
11
+ /**
12
+ * Extended color palette for theme customization
13
+ */
14
+ export interface ExtendedColorPalette extends ColorPalette {
15
+ customGradients?: Record<string, [string, string]>;
16
+ }
17
+
18
+ /**
19
+ * Complete Theme Object
20
+ * Combines colors, spacing, typography, borders, and design tokens
21
+ */
22
+ export interface Theme {
23
+ colors: ExtendedColorPalette;
24
+ spacing: typeof BASE_TOKENS.spacing;
25
+ typography: typeof BASE_TOKENS.typography;
26
+ borders: typeof BASE_TOKENS.borders;
27
+ borderRadius: {
28
+ sm: number;
29
+ md: number;
30
+ lg: number;
31
+ xl: number;
32
+ full: number;
33
+ };
34
+ iconSizes: {
35
+ xs: number;
36
+ sm: number;
37
+ md: number;
38
+ lg: number;
39
+ xl: number;
40
+ xxl: number;
41
+ hero: number;
42
+ };
43
+ opacity: {
44
+ disabled: number;
45
+ inactive: number;
46
+ subtle: number;
47
+ medium: number;
48
+ full: number;
49
+ };
50
+ }
51
+
52
+ /**
53
+ * Light Theme
54
+ * Combines static BASE_TOKENS + lightColors
55
+ */
56
+ export const lightTheme: Theme = {
57
+ colors: {
58
+ ...lightColors,
59
+ },
60
+ spacing: BASE_TOKENS.spacing,
61
+ typography: BASE_TOKENS.typography,
62
+ borders: BASE_TOKENS.borders,
63
+
64
+ // Legacy compatibility mappings
65
+ borderRadius: {
66
+ sm: BASE_TOKENS.borders.radius.sm,
67
+ md: BASE_TOKENS.borders.radius.md,
68
+ lg: BASE_TOKENS.borders.radius.lg,
69
+ xl: BASE_TOKENS.borders.radius.xl,
70
+ full: BASE_TOKENS.borders.radius.full,
71
+ },
72
+
73
+ // Icon sizes from spacing
74
+ iconSizes: {
75
+ xs: BASE_TOKENS.spacing.iconSizeSmall,
76
+ sm: BASE_TOKENS.spacing.iconSizeSmall,
77
+ md: BASE_TOKENS.spacing.iconSizeMedium,
78
+ lg: BASE_TOKENS.spacing.iconSizeLarge,
79
+ xl: BASE_TOKENS.spacing.iconSizeXLarge,
80
+ xxl: BASE_TOKENS.spacing.iconSizeXLarge,
81
+ hero: BASE_TOKENS.spacing.iconSizeHero,
82
+ },
83
+
84
+ // Opacity levels (static values)
85
+ opacity: {
86
+ disabled: 0.6,
87
+ inactive: 0.7,
88
+ subtle: 0.8,
89
+ medium: 0.9,
90
+ full: 1.0,
91
+ },
92
+ } as const;
93
+
94
+ /**
95
+ * Dark Theme
96
+ * Combines static BASE_TOKENS + darkColors
97
+ */
98
+ export const darkTheme: Theme = {
99
+ ...lightTheme,
100
+ colors: {
101
+ ...darkColors,
102
+ },
103
+ } as const;
104
+
105
+ /**
106
+ * Utility function for responsive design
107
+ */
108
+ export const createResponsiveValue = <T>(
109
+ _theme: Theme,
110
+ values: Partial<Record<string, T>>,
111
+ ): T => {
112
+ const value = values.xs || values.sm || Object.values(values)[0];
113
+ if (value === undefined) {
114
+ throw new Error('createResponsiveValue: No valid value found');
115
+ }
116
+ return value;
117
+ };
118
+