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