react-native-elearn-ui 0.1.0 → 0.1.2

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