react-native-elearn-ui 0.1.0 → 0.1.1

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.
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { useState } from 'react';
2
2
  import {
3
3
  View,
4
4
  ScrollView,
@@ -8,153 +8,407 @@ import {
8
8
  StatusBar,
9
9
  Image,
10
10
  } from 'react-native';
11
- import { useElearnConfig } from '../context/ElearnConfigContext';
12
11
  import { useTheme } from '../context/ThemeContext';
13
- import { Typography, Card, CircularProgress, Icon } from '../components';
12
+ import { Typography, Card, ProgressBar, Icon } from '../components';
13
+ import type { IconName } from '../components';
14
+ import type { HomeScreenParams } from '../types';
14
15
 
15
- export const HomeScreen: React.FC = () => {
16
- const { config, callbacks, getString } = useElearnConfig();
16
+ interface HomeScreenProps {
17
+ params?: HomeScreenParams;
18
+ onPressNotification?: () => void;
19
+ onPressAvatar?: () => void;
20
+ onPressTrackQbank?: () => void;
21
+ onPressPearls?: () => void;
22
+ onPressUpdates?: () => void;
23
+ onPressQuickLink?: (linkId: string) => void;
24
+ onPressGetStarted?: () => void;
25
+ onPressContinueLearning?: (subjectId: string) => void;
26
+ onPressShareApp?: () => void;
27
+ onPressMcqViewDetails?: () => void;
28
+ }
29
+
30
+ export const HomeScreen: React.FC<HomeScreenProps> = ({
31
+ params,
32
+ onPressNotification,
33
+ onPressAvatar,
34
+ onPressTrackQbank,
35
+ onPressPearls,
36
+ onPressUpdates,
37
+ onPressQuickLink,
38
+ onPressGetStarted,
39
+ onPressContinueLearning,
40
+ onPressShareApp,
41
+ onPressMcqViewDetails,
42
+ }) => {
17
43
  const theme = useTheme();
18
44
 
19
- const dailyQuiz = config.dailyQuiz;
20
- const courses = config.courses || [];
21
-
22
- const handleDailyQuizPress = () => {
23
- if (dailyQuiz && callbacks.onStartQuiz) {
24
- callbacks.onStartQuiz(
25
- dailyQuiz.id,
26
- dailyQuiz.questions,
27
- dailyQuiz.title
28
- );
29
- }
45
+ // Selected state for the daily teaser MCQ
46
+ const [selectedTeaserOption, setSelectedTeaserOption] = useState<number | null>(null);
47
+
48
+ // Fallbacks to default configs if params are not passed
49
+ const headerData = params?.header || {
50
+ appName: 'Residency',
51
+ subName: 'Pathology',
52
+ notificationCount: 2,
53
+ avatarUrl: 'https://images.unsplash.com/photo-1559839734-2b71ea197ec2?q=80&w=200&auto=format&fit=crop',
54
+ };
55
+
56
+ const bannerData = params?.banner || {
57
+ title: 'Test Your Knowledge – Daily',
58
+ subtitle: 'Smart Learning for Future Doctors',
59
+ imageUrl: 'https://images.unsplash.com/photo-1576091160550-2173dba999ef?q=80&w=400&auto=format&fit=crop',
60
+ };
61
+
62
+ const progressData = params?.progress || {
63
+ percentage: 25,
64
+ text: 'Modules Completed of 829',
65
+ totalModules: 829,
66
+ buttonText: 'Track Qbank',
67
+ };
68
+
69
+ const actionsData = params?.actions || {
70
+ pearlsLabel: 'Pearls',
71
+ updatesLabel: 'Updates',
72
+ };
73
+
74
+ const quickLinksData = params?.quickLinks || [
75
+ { id: 'bookmarks', label: 'Bookmarks', icon: 'bookmark', color: '#3B82F6' },
76
+ { id: 'custom_module', label: 'Custom Module', icon: 'file-text', color: '#10B981' },
77
+ { id: 'videos_saved', label: 'Videos Saved', icon: 'download', color: '#EF4444' },
78
+ { id: 'qbank', label: 'QBank', icon: 'book-open', color: '#8B5CF6' },
79
+ ];
80
+
81
+ const dailyMcqData = params?.dailyMcq || {
82
+ id: 'teaser_1',
83
+ imageUrl: 'https://images.unsplash.com/photo-1576086213369-97a306d36557?q=80&w=500&auto=format&fit=crop',
84
+ question: 'Discuss the causes, radiological features, and management of a solitary pulmonary nodule.',
85
+ options: [
86
+ 'A. Used for Hepatitis B',
87
+ 'B. Used for chickenpox prophylaxis',
88
+ 'C. Obtained from random donors',
89
+ 'D. They are hyperimmune human immunoglobulins',
90
+ ],
91
+ correctIndex: 0,
92
+ };
93
+
94
+ const getStartedData = params?.getStarted || {
95
+ title: 'Anatomy',
96
+ subtitle: 'Dr. Dharma Shanker',
97
+ avatarUrl: 'https://images.unsplash.com/photo-1622253692010-333f2da6031d?q=80&w=200&auto=format&fit=crop',
98
+ };
99
+
100
+ const continueLearningData = params?.continueLearning || [
101
+ { id: 'subj_anatomy', title: 'Anatomy', progressPercentage: 20, completedModules: 2, totalModules: 63, icon: 'atom' },
102
+ { id: 'subj_biochem', title: 'Biochemistry', progressPercentage: 60, completedModules: 45, totalModules: 53, icon: 'dna' },
103
+ { id: 'subj_physio', title: 'Physiology', progressPercentage: 88, completedModules: 59, totalModules: 63, icon: 'flask' },
104
+ ];
105
+
106
+ const referralData = params?.referralBanner || {
107
+ text: 'Invite a friend to RXDX, learn together, grow together.',
108
+ buttonText: 'Share App',
30
109
  };
31
110
 
32
111
  return (
33
112
  <SafeAreaView style={[styles.safeArea, { backgroundColor: theme.background }]}>
34
113
  <StatusBar barStyle="dark-content" />
35
-
36
- {/* Header */}
37
- <View style={styles.header}>
38
- <View style={styles.headerLeft}>
39
- <TouchableOpacity style={styles.avatarContainer}>
40
- <View style={[styles.avatarPlaceholder, { backgroundColor: theme.secondary }]}>
41
- <Icon name="user" size={20} color={theme.primary} />
42
- </View>
43
- </TouchableOpacity>
114
+
115
+ {/* Header Panel */}
116
+ <View style={[styles.header, { borderBottomColor: theme.border }]}>
117
+ <TouchableOpacity style={styles.headerDropdown}>
118
+ <View style={[styles.appLogo, { backgroundColor: theme.primary }]}>
119
+ <Typography variant="label" bold color="#FFFFFF">R</Typography>
120
+ </View>
44
121
  <View>
45
- <Typography variant="bodyLight" color={theme.textSecondary}>
46
- {getString('homeHeaderTitle')}
47
- </Typography>
48
- <Typography variant="h2" bold>
49
- Dr. Kimberly
122
+ <View style={styles.appNameRow}>
123
+ <Typography variant="h2" bold color={theme.textPrimary}>
124
+ {headerData.appName}
125
+ </Typography>
126
+ <View style={styles.chevronWrap}>
127
+ <Icon name="chevron-left" size={12} color={theme.textSecondary} />
128
+ </View>
129
+ </View>
130
+ <Typography variant="caption" color={theme.textSecondary} style={styles.appSubName}>
131
+ {headerData.subName}
50
132
  </Typography>
51
133
  </View>
52
- </View>
53
- <TouchableOpacity style={[styles.iconButton, { borderColor: theme.border }]}>
54
- <Icon name="bell" size={20} color={theme.textPrimary} />
55
- <View style={[styles.badge, { backgroundColor: theme.danger }]} />
56
134
  </TouchableOpacity>
135
+
136
+ <View style={styles.headerRight}>
137
+ <TouchableOpacity onPress={onPressNotification} style={[styles.iconBtn, { borderColor: theme.border }]}>
138
+ <Icon name="bell" size={20} color={theme.textPrimary} />
139
+ {headerData.notificationCount && headerData.notificationCount > 0 ? (
140
+ <View style={[styles.badge, { backgroundColor: theme.danger }]}>
141
+ <Typography variant="caption" style={styles.badgeText} color="#FFFFFF">
142
+ {headerData.notificationCount}
143
+ </Typography>
144
+ </View>
145
+ ) : null}
146
+ </TouchableOpacity>
147
+
148
+ <TouchableOpacity onPress={onPressAvatar} style={styles.profileContainer}>
149
+ <Image source={{ uri: headerData.avatarUrl }} style={styles.profileAvatar} />
150
+ </TouchableOpacity>
151
+ </View>
57
152
  </View>
58
153
 
59
154
  <ScrollView contentContainerStyle={styles.scrollContent} showsVerticalScrollIndicator={false}>
60
155
 
61
- {/* Daily Quiz Card */}
62
- {dailyQuiz && (
63
- <TouchableOpacity activeOpacity={0.9} onPress={handleDailyQuizPress}>
64
- <Card style={[styles.dailyQuizCard, { backgroundColor: '#0284C7' }]}>
65
- <View style={styles.dailyQuizRow}>
66
- <View style={styles.dailyQuizLeft}>
67
- <Typography variant="h3" color="#FFFFFF" bold>
68
- {getString('dailyQuizTitle')}
69
- </Typography>
70
- <Typography variant="caption" color="#E0F2FE" style={styles.dailyQuizDesc}>
71
- {getString('dailyQuizSubtitle')}
72
- </Typography>
73
- <View style={styles.trackQuickBadge}>
74
- <Typography variant="caption" color="#0284C7" bold>
75
- {getString('trackQuickLabel')}
76
- </Typography>
77
- </View>
78
- </View>
79
-
80
- <View style={styles.dailyQuizRight}>
81
- <CircularProgress
82
- progress={dailyQuiz.progressPercentage / 100}
83
- size={68}
84
- strokeWidth={6}
85
- color="#FFFFFF"
86
- backgroundColor="rgba(255, 255, 255, 0.25)"
87
- textStyle={{ color: '#FFFFFF', fontSize: 13 }}
88
- />
89
- </View>
90
- </View>
91
- </Card>
156
+ {/* Banner Section */}
157
+ <TouchableOpacity activeOpacity={0.9}>
158
+ <View style={[styles.promoBanner, { backgroundColor: '#15803D' }]}>
159
+ <View style={styles.promoTextColumn}>
160
+ <Typography variant="h2" bold color="#FFFFFF" style={styles.promoTitle}>
161
+ {bannerData.title}
162
+ </Typography>
163
+ <Typography variant="caption" color="#D1FAE5" style={styles.promoSubtitle}>
164
+ {bannerData.subtitle}
165
+ </Typography>
166
+ </View>
167
+ <Image
168
+ source={{ uri: bannerData.imageUrl }}
169
+ style={styles.promoBannerImage}
170
+ resizeMode="cover"
171
+ />
172
+ </View>
173
+ </TouchableOpacity>
174
+
175
+ {/* QBank Progress Card */}
176
+ <Card bordered style={styles.qbankProgressCard}>
177
+ <View style={styles.qbankProgressRow}>
178
+ <View style={styles.qbankProgressTextContainer}>
179
+ <Typography variant="h1" bold color={theme.textPrimary} style={styles.percentageText}>
180
+ {progressData.percentage}%
181
+ </Typography>
182
+ <Typography variant="caption" color={theme.textSecondary}>
183
+ {progressData.text}
184
+ </Typography>
185
+ </View>
186
+ <TouchableOpacity onPress={onPressTrackQbank}>
187
+ <Typography variant="h3" bold color={theme.primary}>
188
+ {progressData.buttonText}
189
+ </Typography>
190
+ </TouchableOpacity>
191
+ </View>
192
+ <ProgressBar
193
+ progress={progressData.percentage / 100}
194
+ color="#F97316"
195
+ height={8}
196
+ style={styles.qbankProgressBar}
197
+ />
198
+ </Card>
199
+
200
+ {/* Stacked Quick Access Actions */}
201
+ <View style={styles.actionsContainer}>
202
+ <TouchableOpacity
203
+ activeOpacity={0.9}
204
+ onPress={onPressPearls}
205
+ style={[styles.actionPill, { backgroundColor: '#5F85E5' }]}
206
+ >
207
+ <View style={styles.actionPillIconContainer}>
208
+ <Icon name="diamond" size={18} color="#5F85E5" />
209
+ </View>
210
+ <Typography variant="h3" bold color="#FFFFFF" style={styles.actionPillText}>
211
+ {actionsData.pearlsLabel}
212
+ </Typography>
92
213
  </TouchableOpacity>
93
- )}
94
214
 
95
- {/* Subjects Tabs */}
215
+ <TouchableOpacity
216
+ activeOpacity={0.9}
217
+ onPress={onPressUpdates}
218
+ style={[styles.actionPill, { backgroundColor: '#1A7B60' }]}
219
+ >
220
+ <View style={styles.actionPillIconContainer}>
221
+ <Icon name="megaphone" size={18} color="#1A7B60" />
222
+ </View>
223
+ <Typography variant="h3" bold color="#FFFFFF" style={styles.actionPillText}>
224
+ {actionsData.updatesLabel}
225
+ </Typography>
226
+ </TouchableOpacity>
227
+ </View>
228
+
229
+ {/* Quick Links Section */}
96
230
  <View style={styles.sectionHeader}>
97
- <Typography variant="h2" bold>
98
- {getString('subjectsTitle')}
231
+ <Typography variant="caption" bold color={theme.textSecondary} style={styles.sectionTitle}>
232
+ QUICK LINKS
99
233
  </Typography>
100
234
  </View>
101
235
 
102
- <ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={styles.subjectsContainer}>
103
- {courses.map((course) => {
104
- let iconName: any = 'flask';
105
- if (course.title.toLowerCase().includes('physic')) iconName = 'atom';
106
- if (course.title.toLowerCase().includes('biolog')) iconName = 'dna';
107
- if (course.title.toLowerCase().includes('anatom')) iconName = 'book-open';
108
-
109
- return (
110
- <TouchableOpacity
111
- key={course.id}
112
- style={[
113
- styles.subjectTab,
114
- { backgroundColor: theme.cardBackground, borderColor: theme.border },
115
- ]}
116
- onPress={() => callbacks.onSelectCourse?.(course)}
117
- >
118
- <View style={[styles.subjectIconWrap, { backgroundColor: theme.secondary }]}>
119
- <Icon name={iconName} size={20} color={theme.primary} />
120
- </View>
121
- <Typography variant="label" bold style={styles.subjectText}>
122
- {course.title}
123
- </Typography>
124
- </TouchableOpacity>
125
- );
126
- })}
236
+ <ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={styles.quickLinksScroll}>
237
+ {quickLinksData.map((link) => (
238
+ <TouchableOpacity
239
+ key={link.id}
240
+ style={styles.quickLinkItem}
241
+ onPress={() => {
242
+ link.onPress?.();
243
+ onPressQuickLink?.(link.id);
244
+ }}
245
+ >
246
+ <View style={[styles.quickLinkCircle, { backgroundColor: `${link.color}15` }]}>
247
+ <Icon name={link.icon as IconName} size={20} color={link.color} />
248
+ </View>
249
+ <Typography variant="caption" color={theme.textPrimary} bold style={styles.quickLinkLabel}>
250
+ {link.label}
251
+ </Typography>
252
+ </TouchableOpacity>
253
+ ))}
127
254
  </ScrollView>
128
255
 
129
- {/* Popular Topics Section */}
256
+ {/* Brain Teasers Section */}
130
257
  <View style={styles.sectionHeader}>
131
- <Typography variant="h2" bold>
132
- {getString('popularTopicsTitle')}
258
+ <Typography variant="caption" bold color={theme.textSecondary} style={styles.sectionTitle}>
259
+ BRAIN TEASERS OF THE DAY
133
260
  </Typography>
134
261
  </View>
135
262
 
136
- {/* Mocking a beautiful content card as shown in the UI mockup */}
137
- <Card bordered style={styles.infoCard}>
138
- <Image
139
- source={{ uri: 'https://images.unsplash.com/photo-1576086213369-97a306d36557?q=80&w=600&auto=format&fit=crop' }}
140
- style={styles.infoCardImage}
141
- resizeMode="cover"
142
- />
143
- <View style={styles.infoCardContent}>
144
- <View style={styles.infoCardHeader}>
145
- <Typography variant="caption" color={theme.primary} bold>
146
- HISTOLOGY
263
+ <Card bordered style={styles.mcqCard}>
264
+ {dailyMcqData.imageUrl && (
265
+ <Image source={{ uri: dailyMcqData.imageUrl }} style={styles.mcqImage} />
266
+ )}
267
+ <Typography variant="body" color={theme.textPrimary} style={styles.mcqQuestion}>
268
+ {dailyMcqData.question}
269
+ </Typography>
270
+
271
+ {/* Interactive Radio Options */}
272
+ <View style={styles.mcqOptionsList}>
273
+ {dailyMcqData.options.map((option, idx) => {
274
+ const isSelected = selectedTeaserOption === idx;
275
+ const isCorrectAnswer = idx === dailyMcqData.correctIndex;
276
+ const isTeaserAnswered = selectedTeaserOption !== null;
277
+
278
+ let circleBorder = theme.border;
279
+ let circleFill = 'transparent';
280
+ let rowBg = 'transparent';
281
+
282
+ if (isTeaserAnswered) {
283
+ if (isCorrectAnswer) {
284
+ circleBorder = theme.success;
285
+ circleFill = theme.success;
286
+ rowBg = 'rgba(16, 185, 129, 0.04)';
287
+ } else if (isSelected) {
288
+ circleBorder = theme.danger;
289
+ circleFill = theme.danger;
290
+ rowBg = 'rgba(239, 68, 68, 0.04)';
291
+ }
292
+ } else if (isSelected) {
293
+ circleBorder = theme.primary;
294
+ circleFill = theme.primary;
295
+ }
296
+
297
+ return (
298
+ <TouchableOpacity
299
+ key={idx}
300
+ activeOpacity={0.8}
301
+ disabled={isTeaserAnswered}
302
+ style={[styles.mcqOptionRow, { backgroundColor: rowBg }]}
303
+ onPress={() => setSelectedTeaserOption(idx)}
304
+ >
305
+ <View style={[styles.mcqRadioOuter, { borderColor: circleBorder }]}>
306
+ {isSelected || (isTeaserAnswered && isCorrectAnswer) ? (
307
+ <View style={[styles.mcqRadioInner, { backgroundColor: circleFill }]} />
308
+ ) : null}
309
+ </View>
310
+ <Typography variant="body" color={theme.textPrimary} style={styles.mcqOptionText}>
311
+ {option}
312
+ </Typography>
313
+ </TouchableOpacity>
314
+ );
315
+ })}
316
+ </View>
317
+
318
+ <TouchableOpacity onPress={onPressMcqViewDetails} style={styles.mcqViewDetailsBtn}>
319
+ <Typography variant="h3" color={theme.primary} bold>
320
+ View Details
321
+ </Typography>
322
+ </TouchableOpacity>
323
+ </Card>
324
+
325
+ {/* Get Started Section */}
326
+ <View style={styles.sectionHeader}>
327
+ <Typography variant="caption" bold color={theme.textSecondary} style={styles.sectionTitle}>
328
+ GET STARTED
329
+ </Typography>
330
+ </View>
331
+
332
+ <Card bordered onPress={onPressGetStarted} style={styles.getStartedCard}>
333
+ <View style={styles.getStartedRow}>
334
+ <Image source={{ uri: getStartedData.avatarUrl }} style={styles.doctorAvatar} />
335
+ <View style={styles.getStartedInfo}>
336
+ <Typography variant="h3" bold color={theme.textPrimary}>
337
+ {getStartedData.title}
147
338
  </Typography>
148
339
  <Typography variant="caption" color={theme.textSecondary}>
149
- 12 min read
340
+ {getStartedData.subtitle}
150
341
  </Typography>
151
342
  </View>
152
- <Typography variant="h3" bold style={styles.infoCardTitle}>
153
- Tissue structures under microscope examination
154
- </Typography>
155
- <Typography variant="body" color={theme.textSecondary} numberOfLines={2}>
156
- Learn the identification of epithelial tissues, connective tissues, and muscle structures for medical examination prep.
157
- </Typography>
343
+ <Icon name="chevron-right" size={16} color={theme.textSecondary} />
344
+ </View>
345
+ </Card>
346
+
347
+ {/* Continue Learning Section */}
348
+ <View style={styles.sectionHeader}>
349
+ <Typography variant="caption" bold color={theme.textSecondary} style={styles.sectionTitle}>
350
+ CONTINUE LEARNING
351
+ </Typography>
352
+ </View>
353
+
354
+ <View style={styles.continueLearningList}>
355
+ {continueLearningData.map((item) => (
356
+ <TouchableOpacity
357
+ key={item.id}
358
+ activeOpacity={0.8}
359
+ onPress={() => onPressContinueLearning?.(item.id)}
360
+ >
361
+ <Card bordered style={styles.continueLearningCard}>
362
+ <View style={styles.continueLearningRow}>
363
+ <View style={[styles.subjectIconBox, { backgroundColor: theme.secondary }]}>
364
+ <Icon name={item.icon as IconName} size={20} color={theme.primary} />
365
+ </View>
366
+ <View style={styles.continueLearningInfo}>
367
+ <View style={styles.continueLearningTextRow}>
368
+ <Typography variant="h3" bold color={theme.textPrimary}>
369
+ {item.title}
370
+ </Typography>
371
+ </View>
372
+ <ProgressBar
373
+ progress={item.progressPercentage / 100}
374
+ color="#0891B2"
375
+ height={6}
376
+ style={styles.continueProgressBar}
377
+ />
378
+ <View style={styles.continueStatsRow}>
379
+ <Typography variant="caption" color={theme.textSecondary}>
380
+ {item.completedModules} / {item.totalModules} Modules
381
+ </Typography>
382
+ <Typography variant="caption" bold color={theme.textPrimary}>
383
+ {item.progressPercentage}%
384
+ </Typography>
385
+ </View>
386
+ </View>
387
+ </View>
388
+ </Card>
389
+ </TouchableOpacity>
390
+ ))}
391
+ </View>
392
+
393
+ {/* Referral Card Banner */}
394
+ <Card style={styles.referralCard}>
395
+ <View style={styles.referralRow}>
396
+ <View style={styles.referralLeft}>
397
+ <View style={styles.referralIconContainer}>
398
+ <Icon name="share" size={16} color="#FFFFFF" />
399
+ </View>
400
+ <Typography variant="body" bold color="#1E293B" style={styles.referralText}>
401
+ {referralData.text}
402
+ </Typography>
403
+ </View>
404
+ <TouchableOpacity
405
+ onPress={onPressShareApp}
406
+ style={styles.referralButton}
407
+ >
408
+ <Typography variant="caption" bold color="#1E293B">
409
+ {referralData.buttonText}
410
+ </Typography>
411
+ </TouchableOpacity>
158
412
  </View>
159
413
  </Card>
160
414
 
@@ -171,121 +425,328 @@ const styles = StyleSheet.create({
171
425
  flexDirection: 'row',
172
426
  justifyContent: 'space-between',
173
427
  alignItems: 'center',
174
- paddingHorizontal: 20,
175
- paddingVertical: 16,
428
+ paddingHorizontal: 16,
429
+ paddingVertical: 10,
430
+ backgroundColor: '#FFFFFF',
431
+ borderBottomWidth: 1,
176
432
  },
177
- headerLeft: {
433
+ headerDropdown: {
178
434
  flexDirection: 'row',
179
435
  alignItems: 'center',
180
436
  },
181
- avatarContainer: {
182
- marginRight: 12,
183
- },
184
- avatarPlaceholder: {
185
- width: 40,
186
- height: 40,
187
- borderRadius: 20,
437
+ appLogo: {
438
+ width: 32,
439
+ height: 32,
440
+ borderRadius: 8,
188
441
  justifyContent: 'center',
189
442
  alignItems: 'center',
443
+ marginRight: 10,
190
444
  },
191
- iconButton: {
192
- width: 40,
193
- height: 40,
194
- borderRadius: 20,
445
+ appNameRow: {
446
+ flexDirection: 'row',
447
+ alignItems: 'center',
448
+ },
449
+ chevronWrap: {
450
+ transform: [{ rotate: '-90deg' }],
451
+ marginLeft: 6,
452
+ },
453
+ appSubName: {
454
+ fontSize: 11,
455
+ marginTop: 1,
456
+ },
457
+ headerRight: {
458
+ flexDirection: 'row',
459
+ alignItems: 'center',
460
+ },
461
+ iconBtn: {
462
+ width: 36,
463
+ height: 36,
464
+ borderRadius: 18,
195
465
  borderWidth: 1,
196
466
  justifyContent: 'center',
197
467
  alignItems: 'center',
198
468
  position: 'relative',
469
+ marginRight: 10,
199
470
  },
200
471
  badge: {
201
472
  position: 'absolute',
202
- top: 10,
203
- right: 10,
204
- width: 8,
205
- height: 8,
206
- borderRadius: 4,
473
+ top: -4,
474
+ right: -4,
475
+ width: 16,
476
+ height: 16,
477
+ borderRadius: 8,
478
+ justifyContent: 'center',
479
+ alignItems: 'center',
480
+ },
481
+ badgeText: {
482
+ fontSize: 9,
483
+ fontWeight: '700',
484
+ },
485
+ profileContainer: {
486
+ width: 36,
487
+ height: 36,
488
+ borderRadius: 18,
489
+ overflow: 'hidden',
490
+ },
491
+ profileAvatar: {
492
+ width: '100%',
493
+ height: '100%',
207
494
  },
208
495
  scrollContent: {
209
- paddingHorizontal: 20,
210
- paddingBottom: 24,
496
+ paddingHorizontal: 16,
497
+ paddingBottom: 32,
211
498
  },
212
- dailyQuizCard: {
213
- marginVertical: 12,
214
- padding: 20,
499
+ promoBanner: {
500
+ flexDirection: 'row',
215
501
  borderRadius: 20,
502
+ padding: 16,
503
+ marginTop: 12,
504
+ justifyContent: 'space-between',
505
+ overflow: 'hidden',
506
+ height: 120,
507
+ },
508
+ promoTextColumn: {
509
+ flex: 1.2,
510
+ justifyContent: 'center',
511
+ },
512
+ promoTitle: {
513
+ fontSize: 18,
514
+ lineHeight: 22,
515
+ marginBottom: 6,
216
516
  },
217
- dailyQuizRow: {
517
+ promoSubtitle: {
518
+ fontSize: 11,
519
+ opacity: 0.9,
520
+ },
521
+ promoBannerImage: {
522
+ flex: 0.8,
523
+ height: '100%',
524
+ width: '100%',
525
+ alignSelf: 'flex-end',
526
+ borderRadius: 10,
527
+ },
528
+ qbankProgressCard: {
529
+ padding: 16,
530
+ marginTop: 12,
531
+ borderRadius: 16,
532
+ },
533
+ qbankProgressRow: {
218
534
  flexDirection: 'row',
219
535
  justifyContent: 'space-between',
220
536
  alignItems: 'center',
537
+ marginBottom: 12,
221
538
  },
222
- dailyQuizLeft: {
539
+ qbankProgressTextContainer: {
223
540
  flex: 1,
224
- paddingRight: 16,
225
541
  },
226
- dailyQuizDesc: {
227
- marginTop: 6,
228
- opacity: 0.9,
542
+ percentageText: {
543
+ fontSize: 24,
544
+ lineHeight: 28,
229
545
  },
230
- trackQuickBadge: {
231
- backgroundColor: '#FFFFFF',
232
- paddingHorizontal: 12,
233
- paddingVertical: 6,
234
- borderRadius: 16,
235
- alignSelf: 'flex-start',
236
- marginTop: 14,
546
+ qbankProgressBar: {
547
+ marginTop: 4,
237
548
  },
238
- dailyQuizRight: {
549
+ actionsContainer: {
550
+ flexDirection: 'row',
551
+ justifyContent: 'space-between',
552
+ marginTop: 12,
553
+ },
554
+ actionPill: {
555
+ flex: 1,
556
+ flexDirection: 'row',
557
+ alignItems: 'center',
558
+ padding: 14,
559
+ borderRadius: 14,
560
+ marginHorizontal: 4,
561
+ },
562
+ actionPillIconContainer: {
563
+ width: 28,
564
+ height: 28,
565
+ borderRadius: 14,
566
+ backgroundColor: '#FFFFFF',
239
567
  justifyContent: 'center',
240
568
  alignItems: 'center',
569
+ marginRight: 10,
570
+ },
571
+ actionPillText: {
572
+ fontSize: 15,
241
573
  },
242
574
  sectionHeader: {
243
575
  marginTop: 20,
244
- marginBottom: 12,
576
+ marginBottom: 8,
577
+ },
578
+ sectionTitle: {
579
+ fontSize: 12,
580
+ letterSpacing: 0.8,
245
581
  },
246
- subjectsContainer: {
582
+ quickLinksScroll: {
247
583
  paddingVertical: 4,
248
584
  },
249
- subjectTab: {
585
+ quickLinkItem: {
586
+ alignItems: 'center',
587
+ marginRight: 20,
588
+ width: 72,
589
+ },
590
+ quickLinkCircle: {
591
+ width: 48,
592
+ height: 48,
593
+ borderRadius: 24,
594
+ justifyContent: 'center',
595
+ alignItems: 'center',
596
+ marginBottom: 6,
597
+ },
598
+ quickLinkLabel: {
599
+ textAlign: 'center',
600
+ fontSize: 11,
601
+ },
602
+ mcqCard: {
603
+ padding: 16,
604
+ borderRadius: 16,
605
+ overflow: 'hidden',
606
+ },
607
+ mcqImage: {
608
+ width: '100%',
609
+ height: 140,
610
+ borderRadius: 12,
611
+ marginBottom: 12,
612
+ },
613
+ mcqQuestion: {
614
+ fontSize: 14,
615
+ lineHeight: 20,
616
+ fontWeight: '500',
617
+ marginBottom: 12,
618
+ },
619
+ mcqOptionsList: {
620
+ marginBottom: 8,
621
+ },
622
+ mcqOptionRow: {
250
623
  flexDirection: 'row',
251
624
  alignItems: 'center',
252
- paddingHorizontal: 16,
253
625
  paddingVertical: 10,
254
- borderRadius: 20,
255
- borderWidth: 1,
256
- marginRight: 12,
626
+ paddingHorizontal: 8,
627
+ borderRadius: 8,
628
+ marginBottom: 6,
257
629
  },
258
- subjectIconWrap: {
259
- width: 32,
260
- height: 32,
261
- borderRadius: 16,
630
+ mcqRadioOuter: {
631
+ width: 18,
632
+ height: 18,
633
+ borderRadius: 9,
634
+ borderWidth: 1.5,
262
635
  justifyContent: 'center',
263
636
  alignItems: 'center',
264
- marginRight: 8,
637
+ marginRight: 10,
265
638
  },
266
- subjectText: {
267
- fontSize: 14,
639
+ mcqRadioInner: {
640
+ width: 10,
641
+ height: 10,
642
+ borderRadius: 5,
268
643
  },
269
- infoCard: {
270
- padding: 0,
271
- overflow: 'hidden',
644
+ mcqOptionText: {
645
+ fontSize: 13,
646
+ flex: 1,
647
+ },
648
+ mcqViewDetailsBtn: {
649
+ alignItems: 'center',
650
+ borderTopWidth: 1,
651
+ borderTopColor: '#E2E8F0',
652
+ paddingTop: 12,
272
653
  marginTop: 8,
273
654
  },
274
- infoCardImage: {
275
- width: '100%',
276
- height: 160,
655
+ getStartedCard: {
656
+ padding: 12,
657
+ borderRadius: 16,
277
658
  },
278
- infoCardContent: {
279
- padding: 16,
659
+ getStartedRow: {
660
+ flexDirection: 'row',
661
+ alignItems: 'center',
662
+ },
663
+ doctorAvatar: {
664
+ width: 44,
665
+ height: 44,
666
+ borderRadius: 22,
667
+ marginRight: 12,
668
+ },
669
+ getStartedInfo: {
670
+ flex: 1,
671
+ },
672
+ continueLearningList: {
673
+ marginTop: 4,
674
+ },
675
+ continueLearningCard: {
676
+ padding: 12,
677
+ marginBottom: 10,
678
+ borderRadius: 16,
280
679
  },
281
- infoCardHeader: {
680
+ continueLearningRow: {
681
+ flexDirection: 'row',
682
+ alignItems: 'center',
683
+ },
684
+ subjectIconBox: {
685
+ width: 40,
686
+ height: 40,
687
+ borderRadius: 10,
688
+ justifyContent: 'center',
689
+ alignItems: 'center',
690
+ marginRight: 12,
691
+ },
692
+ continueLearningInfo: {
693
+ flex: 1,
694
+ },
695
+ continueLearningTextRow: {
282
696
  flexDirection: 'row',
283
697
  justifyContent: 'space-between',
284
698
  alignItems: 'center',
285
699
  marginBottom: 6,
286
700
  },
287
- infoCardTitle: {
288
- marginBottom: 8,
289
- lineHeight: 22,
701
+ continueProgressBar: {
702
+ height: 4,
703
+ marginBottom: 6,
704
+ },
705
+ continueStatsRow: {
706
+ flexDirection: 'row',
707
+ justifyContent: 'space-between',
708
+ alignItems: 'center',
709
+ },
710
+ referralCard: {
711
+ marginTop: 16,
712
+ padding: 14,
713
+ borderRadius: 16,
714
+ backgroundColor: '#FDE047', // RxDx Amber
715
+ },
716
+ referralRow: {
717
+ flexDirection: 'row',
718
+ justifyContent: 'space-between',
719
+ alignItems: 'center',
720
+ },
721
+ referralLeft: {
722
+ flexDirection: 'row',
723
+ alignItems: 'center',
724
+ flex: 1,
725
+ paddingRight: 12,
726
+ },
727
+ referralIconContainer: {
728
+ width: 28,
729
+ height: 28,
730
+ borderRadius: 14,
731
+ backgroundColor: '#EA580C', // Orange sharing accent
732
+ justifyContent: 'center',
733
+ alignItems: 'center',
734
+ marginRight: 10,
735
+ },
736
+ referralText: {
737
+ fontSize: 12,
738
+ lineHeight: 16,
739
+ flex: 1,
740
+ },
741
+ referralButton: {
742
+ backgroundColor: '#FFFFFF',
743
+ paddingHorizontal: 12,
744
+ paddingVertical: 6,
745
+ borderRadius: 12,
746
+ shadowColor: '#000000',
747
+ shadowOffset: { width: 0, height: 1 },
748
+ shadowOpacity: 0.1,
749
+ shadowRadius: 1,
750
+ elevation: 1,
290
751
  },
291
752
  });