eletrotupi / tcc/ frontend/constants/theme.ts85d0e3103a3d31cb1f0649b97146ef256c944fdf
4.1 KB | 188 lines Raw
1
/**
2
 * Below are the colors that are used in the app. The colors are defined in the light and dark mode.
3
 * There are many other ways to style your app. For example, [Nativewind](https://www.nativewind.dev/), [Tamagui](https://tamagui.dev/), [unistyles](https://reactnativeunistyles.vercel.app), etc.
4
 */
5

6
import { Platform } from 'react-native';
7

8
// Primary Colors
9
const NEON_GREEN = '#13ec5b';
10
const PRIMARY_DARK = '#0f172a';
11

12
// Surface & Background
13
const BACKGROUND_LIGHT = '#f6f8f6';
14
const SURFACE_LIGHT = '#ffffff';
15

16
// Text Colors
17
const TEXT_PRIMARY = '#0f172a';
18
const TEXT_SECONDARY = '#64748b';
19
const TEXT_PLACEHOLDER = '#94A3B8';
20

21
// Borders & Accents
22
const BORDER_SUBTLE = '#f1f5f9';
23
const BORDER_SUBTLE_GRAY = '#E5E7EB';
24
const STATUS_ACTIVE_BG = 'rgba(19, 236, 91, 0.1)';
25

26
// Semantic Color Pills and stuff
27
const PILL_BLUE = '#dbeafe';
28
const PILL_INDIGO = '#e0e7ff';
29
const PILL_PURPLE = '#f3e8ff';
30

31
const tintColorLight = '#12ED5C';
32
const tintColorSecondary = '#618A70';
33
const black = '#0F172A';
34
const gray = '#475569';
35
const lightGray = '#64748B'
36

37
export const Colors = {
38
  light: {
39
    // Primary Actions & Focus
40
    text: TEXT_PRIMARY,
41
    textSecondary: TEXT_SECONDARY,
42
    background: BACKGROUND_LIGHT,
43
    surface: SURFACE_LIGHT,
44
    tint: NEON_GREEN,
45

46
    // Interactive States
47
    icon: TEXT_SECONDARY,
48
    tabIconDefault: TEXT_SECONDARY,
49
    tabIconSelected: NEON_GREEN,
50

51
    // Form Inputs
52
    inputBackgroundColor: SURFACE_LIGHT,
53
    inputBorderColor: BORDER_SUBTLE_GRAY,
54
    inputFocusBorderColor: NEON_GREEN,
55
    inputPlaceholderColor: TEXT_PLACEHOLDER,
56

57
    // Cards & Containers
58
    cardBackground: SURFACE_LIGHT,
59
    cardBorder: BORDER_SUBTLE,
60
    cardShadow: 'rgba(0, 0, 0, 0.05)',
61

62
    // Active / Inactive States
63
    activeBackground: STATUS_ACTIVE_BG,
64
    inactiveOpacity: 0.7,
65

66
    // Semantic Accents (for categorization)
67
    accentBlue: PILL_BLUE,
68
    accentIndigo: PILL_INDIGO,
69
    accentPurple: PILL_PURPLE,
70

71
    // Disabled / Secondary
72
    disabled: '#cbd5e1',
73
    divider: BORDER_SUBTLE,
74
  },
75
};
76

77
export const Typography = {
78
  // Headlines
79
  headlineXg: {
80
    fontFamily: Platform.select({
81
      android: 'Inter_900Black',
82
      default: 'Inter',
83
    }),
84
    fontSize: 36,
85
    fontWeight: '900' as const,
86
    lineHeight: 40,
87
  },
88
  headlineLg: {
89
    fontFamily: Platform.select({
90
      android: 'Inter_900Black',
91
      default: 'Inter',
92
    }),
93
    fontSize: 20,
94
    fontWeight: '900' as const,
95
    lineHeight: 28,
96
    letterSpacing: -0.02,
97
  },
98
  headlineMd: {
99
    fontFamily: Platform.select({
100
      android: 'Inter',
101
      default: 'Inter',
102
    }),
103
    fontSize: 18,
104
    fontWeight: '700' as const,
105
    lineHeight: 24,
106
  },
107

108
  // Body
109
  bodyLg: {
110
    fontFamily: Platform.select({
111
      android: 'Inter',
112
      default: 'Inter',
113
    }),
114
    fontSize: 16,
115
    fontWeight: '700' as const,
116
    lineHeight: 20,
117
  },
118
  bodyMd: {
119
    fontFamily: Platform.select({
120
      android: 'Inter',
121
      default: 'Inter',
122
    }),
123
    fontSize: 14,
124
    fontWeight: '500' as const,
125
    lineHeight: 20,
126
  },
127
  
128
  // Labels
129
  labelSm: {
130
    fontFamily: Platform.select({
131
      android: 'Inter',
132
      default: 'Inter',
133
    }),
134
    fontSize: 12,
135
    fontWeight: '600' as const,
136
    lineHeight: 16,
137
    letterSpacing: 0.05,
138
  },
139
};
140

141
export const Spacing = {
142
  containerPadding: 16, // 1rem
143
  sectionGap: 32, // 2rem
144
  inlineGapSm: 8, // 0.5rem
145
  cardGap: 12 // 0.75rem
146
};
147

148
export const BorderRadius = {
149
  sm: 4, // 0.25rem
150
  default: 8, // 0.5rem
151
  md: 12, // 0.75rem
152
  lg: 16, // 1rem
153
  xl: 24, // 1.5rem
154
  full: 9999, // pill-shaped
155
};
156

157
export const Shadows = {
158
  sm: {
159
    shadowColor: '#000000',
160
    shadowOffset: { width: 0, height: 1 },
161
    shadowOpacity: 0.05,
162
    shadowRadius: 2,
163
    elevation: 2,
164
  },
165
  md: {
166
    shadowColor: '#000000',
167
    shadowOffset: { width: 0, height: 4 },
168
    shadowOpacity: 0.1,
169
    shadowRadius: 8,
170
    elevation: 4,
171
  },
172
  lg: {
173
    shadowColor: NEON_GREEN,
174
    shadowOffset: { width: 0, height: 8 },
175
    shadowOpacity: 0.15,
176
    shadowRadius: 16,
177
    elevation: 8,
178
  },
179
};
180

181
export const Fonts = Platform.select({
182
  default: {
183
    sans: 'Inter',
184
    serif: 'serif',
185
    rounded: 'Inter',
186
    mono: 'monospace',
187
  },
188
});