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