@campxdev/react-native-blueprint 0.1.23 → 0.1.24

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.
Files changed (126) hide show
  1. package/global.css +3 -3
  2. package/lib/global.css +1 -1
  3. package/lib/module/assets/icons/Image.png +0 -0
  4. package/lib/module/components/DataDisplay/Avatar/Avatar.js +1 -1
  5. package/lib/module/components/DataDisplay/Avatar/Avatar.js.map +1 -1
  6. package/lib/module/components/DataDisplay/Banner/Banner.figma.js +17 -3
  7. package/lib/module/components/DataDisplay/Banner/Banner.figma.js.map +1 -1
  8. package/lib/module/components/DataDisplay/Banner/Banner.js +138 -34
  9. package/lib/module/components/DataDisplay/Banner/Banner.js.map +1 -1
  10. package/lib/module/components/DataDisplay/CalendarItem/CalendarItem.js +2 -2
  11. package/lib/module/components/DataDisplay/CalendarItem/CalendarItem.js.map +1 -1
  12. package/lib/module/components/DataDisplay/Card/Card.figma.js +11 -4
  13. package/lib/module/components/DataDisplay/Card/Card.figma.js.map +1 -1
  14. package/lib/module/components/DataDisplay/Card/Card.js +119 -65
  15. package/lib/module/components/DataDisplay/Card/Card.js.map +1 -1
  16. package/lib/module/components/DataDisplay/ChatBubble/ChatBubble.figma.js +54 -0
  17. package/lib/module/components/DataDisplay/ChatBubble/ChatBubble.figma.js.map +1 -0
  18. package/lib/module/components/DataDisplay/ChatBubble/ChatBubble.js +318 -0
  19. package/lib/module/components/DataDisplay/ChatBubble/ChatBubble.js.map +1 -0
  20. package/lib/module/components/DataDisplay/ChatBubble/index.js +4 -0
  21. package/lib/module/components/DataDisplay/ChatBubble/index.js.map +1 -0
  22. package/lib/module/components/DataDisplay/FeedCard/AttachmentDetails.js +69 -0
  23. package/lib/module/components/DataDisplay/FeedCard/AttachmentDetails.js.map +1 -0
  24. package/lib/module/components/DataDisplay/FeedCard/FeedCard.figma.js +19 -17
  25. package/lib/module/components/DataDisplay/FeedCard/FeedCard.figma.js.map +1 -1
  26. package/lib/module/components/DataDisplay/FeedCard/FeedCard.js +30 -19
  27. package/lib/module/components/DataDisplay/FeedCard/FeedCard.js.map +1 -1
  28. package/lib/module/components/DataDisplay/Greeting/Greeting.figma.js +5 -5
  29. package/lib/module/components/DataDisplay/Greeting/Greeting.figma.js.map +1 -1
  30. package/lib/module/components/DataDisplay/Greeting/Greeting.js +46 -70
  31. package/lib/module/components/DataDisplay/Greeting/Greeting.js.map +1 -1
  32. package/lib/module/components/DataDisplay/ProfileCard/ProfileCard.figma.js +16 -0
  33. package/lib/module/components/DataDisplay/ProfileCard/ProfileCard.figma.js.map +1 -0
  34. package/lib/module/components/DataDisplay/ProfileCard/ProfileCard.js +111 -0
  35. package/lib/module/components/DataDisplay/ProfileCard/ProfileCard.js.map +1 -0
  36. package/lib/module/components/DataDisplay/ProfileCard/index.js +4 -0
  37. package/lib/module/components/DataDisplay/ProfileCard/index.js.map +1 -0
  38. package/lib/module/components/Input/Button/Button.js +77 -129
  39. package/lib/module/components/Input/Button/Button.js.map +1 -1
  40. package/lib/module/components/Navigation/Appbar/AppBar.figma.js +18 -6
  41. package/lib/module/components/Navigation/Appbar/AppBar.figma.js.map +1 -1
  42. package/lib/module/components/Navigation/Appbar/AppBar.js +36 -9
  43. package/lib/module/components/Navigation/Appbar/AppBar.js.map +1 -1
  44. package/lib/module/components/Navigation/Popover/Popover.js +1 -1
  45. package/lib/module/components/Navigation/Popover/Popover.js.map +1 -1
  46. package/lib/module/components/ui/index.js +2 -0
  47. package/lib/module/components/ui/index.js.map +1 -1
  48. package/lib/module/lib/theme.js +2 -2
  49. package/lib/module/patterns/pattern-components/AccountPattern/AccountPattern.figma.js +196 -0
  50. package/lib/module/patterns/pattern-components/AccountPattern/AccountPattern.figma.js.map +1 -0
  51. package/lib/module/patterns/pattern-components/AccountPattern/AccountPattern.js +255 -0
  52. package/lib/module/patterns/pattern-components/AccountPattern/AccountPattern.js.map +1 -0
  53. package/lib/module/patterns/pattern-components/AccountPattern/index.js +4 -0
  54. package/lib/module/patterns/pattern-components/AccountPattern/index.js.map +1 -0
  55. package/lib/module/patterns/pattern-components/CalendarPattern/CalendarPattern.figma.js +1 -1
  56. package/lib/module/patterns/pattern-components/CardListPattern/CardListPattern.js +2 -4
  57. package/lib/module/patterns/pattern-components/CardListPattern/CardListPattern.js.map +1 -1
  58. package/lib/module/patterns/pattern-components/FeedPattern/FeedPattern.figma.js +144 -0
  59. package/lib/module/patterns/pattern-components/FeedPattern/FeedPattern.figma.js.map +1 -0
  60. package/lib/module/patterns/pattern-components/FeedPattern/FeedPattern.js +213 -0
  61. package/lib/module/patterns/pattern-components/FeedPattern/FeedPattern.js.map +1 -0
  62. package/lib/module/patterns/pattern-components/FeedPattern/index.js +4 -0
  63. package/lib/module/patterns/pattern-components/FeedPattern/index.js.map +1 -0
  64. package/lib/module/patterns/pattern-components/HomeFacultyPattern/HomeFacultyPattern.figma.js +70 -0
  65. package/lib/module/patterns/pattern-components/HomeFacultyPattern/HomeFacultyPattern.figma.js.map +1 -0
  66. package/lib/module/patterns/pattern-components/HomeFacultyPattern/HomeFacultyPattern.js +260 -0
  67. package/lib/module/patterns/pattern-components/HomeFacultyPattern/HomeFacultyPattern.js.map +1 -0
  68. package/lib/module/patterns/pattern-components/HomeFacultyPattern/index.js +4 -0
  69. package/lib/module/patterns/pattern-components/HomeFacultyPattern/index.js.map +1 -0
  70. package/lib/module/patterns/pattern-components/HomeParentPattern/HomeParentPattern.figma.js +82 -0
  71. package/lib/module/patterns/pattern-components/HomeParentPattern/HomeParentPattern.figma.js.map +1 -0
  72. package/lib/module/patterns/pattern-components/HomeParentPattern/HomeParentPattern.js +256 -0
  73. package/lib/module/patterns/pattern-components/HomeParentPattern/HomeParentPattern.js.map +1 -0
  74. package/lib/module/patterns/pattern-components/HomeParentPattern/index.js +4 -0
  75. package/lib/module/patterns/pattern-components/HomeParentPattern/index.js.map +1 -0
  76. package/lib/module/patterns/pattern-components/HomeStudentPattern/HomeStudentPattern.figma.js +73 -0
  77. package/lib/module/patterns/pattern-components/HomeStudentPattern/HomeStudentPattern.figma.js.map +1 -0
  78. package/lib/module/patterns/pattern-components/HomeStudentPattern/HomeStudentPattern.js +283 -0
  79. package/lib/module/patterns/pattern-components/HomeStudentPattern/HomeStudentPattern.js.map +1 -0
  80. package/lib/module/patterns/pattern-components/HomeStudentPattern/index.js +4 -0
  81. package/lib/module/patterns/pattern-components/HomeStudentPattern/index.js.map +1 -0
  82. package/lib/module/patterns/pattern-components/index.js +5 -0
  83. package/lib/module/patterns/pattern-components/index.js.map +1 -1
  84. package/package.json +27 -1
  85. package/src/assets/icons/Image.png +0 -0
  86. package/src/components/DataDisplay/Avatar/Avatar.tsx +24 -21
  87. package/src/components/DataDisplay/Banner/Banner.figma.tsx +18 -3
  88. package/src/components/DataDisplay/Banner/Banner.tsx +153 -26
  89. package/src/components/DataDisplay/CalendarItem/CalendarItem.tsx +2 -2
  90. package/src/components/DataDisplay/Card/Card.figma.tsx +7 -3
  91. package/src/components/DataDisplay/Card/Card.tsx +152 -101
  92. package/src/components/DataDisplay/ChatBubble/ChatBubble.figma.tsx +54 -0
  93. package/src/components/DataDisplay/ChatBubble/ChatBubble.tsx +404 -0
  94. package/src/components/DataDisplay/ChatBubble/index.ts +8 -0
  95. package/src/components/DataDisplay/FeedCard/AttachmentDetails.tsx +96 -0
  96. package/src/components/DataDisplay/FeedCard/FeedCard.figma.tsx +17 -15
  97. package/src/components/DataDisplay/FeedCard/FeedCard.tsx +66 -35
  98. package/src/components/DataDisplay/Greeting/Greeting.figma.tsx +5 -5
  99. package/src/components/DataDisplay/Greeting/Greeting.tsx +58 -96
  100. package/src/components/DataDisplay/ProfileCard/ProfileCard.figma.tsx +17 -0
  101. package/src/components/DataDisplay/ProfileCard/ProfileCard.tsx +173 -0
  102. package/src/components/DataDisplay/ProfileCard/index.ts +1 -0
  103. package/src/components/Input/Button/Button.tsx +71 -157
  104. package/src/components/Navigation/Appbar/AppBar.figma.tsx +18 -6
  105. package/src/components/Navigation/Appbar/AppBar.tsx +58 -13
  106. package/src/components/Navigation/Popover/Popover.tsx +3 -3
  107. package/src/components/ui/index.ts +2 -0
  108. package/src/lib/theme.ts +2 -2
  109. package/src/patterns/pattern-components/AccountPattern/AccountPattern.figma.tsx +193 -0
  110. package/src/patterns/pattern-components/AccountPattern/AccountPattern.tsx +301 -0
  111. package/src/patterns/pattern-components/AccountPattern/index.ts +1 -0
  112. package/src/patterns/pattern-components/CalendarPattern/CalendarPattern.figma.tsx +1 -1
  113. package/src/patterns/pattern-components/CardListPattern/CardListPattern.tsx +4 -9
  114. package/src/patterns/pattern-components/FeedPattern/FeedPattern.figma.tsx +146 -0
  115. package/src/patterns/pattern-components/FeedPattern/FeedPattern.tsx +264 -0
  116. package/src/patterns/pattern-components/FeedPattern/index.ts +2 -0
  117. package/src/patterns/pattern-components/HomeFacultyPattern/HomeFacultyPattern.figma.tsx +66 -0
  118. package/src/patterns/pattern-components/HomeFacultyPattern/HomeFacultyPattern.tsx +326 -0
  119. package/src/patterns/pattern-components/HomeFacultyPattern/index.ts +2 -0
  120. package/src/patterns/pattern-components/HomeParentPattern/HomeParentPattern.figma.tsx +75 -0
  121. package/src/patterns/pattern-components/HomeParentPattern/HomeParentPattern.tsx +328 -0
  122. package/src/patterns/pattern-components/HomeParentPattern/index.ts +2 -0
  123. package/src/patterns/pattern-components/HomeStudentPattern/HomeStudentPattern.figma.tsx +66 -0
  124. package/src/patterns/pattern-components/HomeStudentPattern/HomeStudentPattern.tsx +355 -0
  125. package/src/patterns/pattern-components/HomeStudentPattern/index.ts +2 -0
  126. package/src/patterns/pattern-components/index.ts +5 -0
@@ -0,0 +1,75 @@
1
+ import figma from '@figma/code-connect';
2
+ import { HomeParentPattern } from './HomeParentPattern';
3
+
4
+ const FIGMA_URL =
5
+ 'https://www.figma.com/design/YTb27Onq7Zk8OV16fHptxJ/Campx-App?node-id=283-22416';
6
+
7
+ /**
8
+ * HomeParentPattern - Parent home screen layout pattern
9
+ *
10
+ * Use cases:
11
+ * - Parent portal home screens
12
+ * - Parental monitoring dashboards
13
+ * - Student progress tracking interfaces
14
+ * - Parent notification and update screens
15
+ *
16
+ * Features:
17
+ * - Personalized greeting with student info and overview
18
+ * - Overview metrics (Attendance, Fees status)
19
+ * - Action center for pending items and alerts
20
+ * - Academics section with semester and course information
21
+ * - Quick access dashboard (Attendance, Payments, Exam Scores, Services)
22
+ * - Teacher/Mentor information card
23
+ * - Announcements feed with file attachments for important documents
24
+ * - All sections are independently configurable
25
+ *
26
+ * Customization:
27
+ * - Show/hide individual sections
28
+ * - Customize titles, subtitles, and content
29
+ * - Configure button callbacks
30
+ * - Customize student/academic information
31
+ * - Add attachment details for announcements
32
+ * - Adapt data based on backend responses
33
+ */
34
+ figma.connect(HomeParentPattern, FIGMA_URL, {
35
+ example: () => (
36
+ <HomeParentPattern
37
+ showGreeting={true}
38
+ greetingUserName="Mathers"
39
+ greetingText="Good Morning"
40
+ greetingSubtitle="Viewing : Marshall, CSE - B"
41
+ greetingOverviewText="Attendance : 84.6 % • Fees : Due in 3 days"
42
+ showScheduleButton={true}
43
+ showActionCenter={true}
44
+ actionCenterTitle="Action Center"
45
+ actionCenterSubtitle="Actions that need your attention"
46
+ actionCenterItems={['Fee Due']}
47
+ showAcademics={true}
48
+ academicsTitle="Academics"
49
+ semesterTitle="Semester 4"
50
+ courseCount="5 Courses"
51
+ showViewCoursesButton={true}
52
+ showCalendarButton={true}
53
+ showQuickAccess={true}
54
+ quickAccessItems={[
55
+ { title: 'Attendance', subtitle: '84.6 %' },
56
+ { title: 'Payments', subtitle: 'No Dues' },
57
+ { title: 'Exam Scores', subtitle: 'CGPA : 7.2' },
58
+ { title: 'Services', subtitle: '1 Active' },
59
+ ]}
60
+ showMentor={true}
61
+ mentorName="Dr. Dre"
62
+ mentorTitle="Professor, CSE Department"
63
+ showAnnouncements={true}
64
+ announcementTitle="Examination Timetable Out"
65
+ announcementAuthor="CSE HOD"
66
+ announcementSubtitle="CSE : Batch 2023-24"
67
+ announcementContent="Examination Timetable has been updated and Published. Students are requested to register before 24th of this Month."
68
+ showAttachmentDetails={true}
69
+ attachmentFileName="File Name"
70
+ attachmentPages="27 Pages"
71
+ attachmentSizeMB="3 MB"
72
+ attachmentType="PDF"
73
+ />
74
+ ),
75
+ });
@@ -0,0 +1,328 @@
1
+ // @ts-nocheck
2
+ import { View, ScrollView, type StyleProp, type ViewStyle } from 'react-native';
3
+
4
+ import { Greeting } from '../../../components/DataDisplay/Greeting/Greeting';
5
+ import { Banner } from '../../../components/DataDisplay/Banner/Banner';
6
+ import { Card } from '../../../components/DataDisplay/Card/Card';
7
+ import { FeedCard } from '../../../components/DataDisplay/FeedCard/FeedCard';
8
+ import { Text } from '../../../components/Input/Text/Text';
9
+ import { Button } from '../../../components/Input/Button/Button';
10
+
11
+ /* ============================================================================
12
+ * Types
13
+ * ============================================================================ */
14
+
15
+ export type HomeParentPatternProps = {
16
+ // Header section
17
+ showGreeting?: boolean;
18
+ greetingUserName?: string;
19
+ greetingText?: string;
20
+ greetingSubtitle?: string;
21
+ greetingOverviewText?: string;
22
+ showScheduleButton?: boolean;
23
+ onSchedulePress?: () => void;
24
+
25
+ // Action Center section
26
+ showActionCenter?: boolean;
27
+ actionCenterTitle?: string;
28
+ actionCenterSubtitle?: string;
29
+ actionCenterItems?: string[];
30
+
31
+ // Academics section
32
+ showAcademics?: boolean;
33
+ academicsTitle?: string;
34
+ semesterTitle?: string;
35
+ courseCount?: string;
36
+ showViewCoursesButton?: boolean;
37
+ showCalendarButton?: boolean;
38
+
39
+ // Quick Access section
40
+ showQuickAccess?: boolean;
41
+ quickAccessItems?: Array<{
42
+ title: string;
43
+ subtitle: string;
44
+ }>;
45
+
46
+ // Mentor section
47
+ showMentor?: boolean;
48
+ mentorName?: string;
49
+ mentorTitle?: string;
50
+
51
+ // Announcements section
52
+ showAnnouncements?: boolean;
53
+ announcementTitle?: string;
54
+ announcementAuthor?: string;
55
+ announcementSubtitle?: string;
56
+ announcementContent?: string;
57
+ showAttachmentDetails?: boolean;
58
+ attachmentFileName?: string;
59
+ attachmentPages?: string;
60
+ attachmentSizeMB?: string;
61
+ attachmentType?: string;
62
+
63
+ // Styling
64
+ style?: StyleProp<ViewStyle>;
65
+ testID?: string;
66
+ className?: never;
67
+ };
68
+
69
+ /* ============================================================================
70
+ * Component
71
+ * ============================================================================ */
72
+
73
+ /**
74
+ * HomeParentPattern Component
75
+ *
76
+ * A comprehensive parent home screen layout pattern that displays:
77
+ * - Personalized greeting with attendance overview and schedule
78
+ * - Action center for pending items and alerts
79
+ * - Academics section with semester and course information
80
+ * - Quick access dashboard (Attendance, Payments, Exam Scores, Services)
81
+ * - Mentor/Teacher information card
82
+ * - Announcements feed with file attachments
83
+ *
84
+ * @example
85
+ * ```tsx
86
+ * <HomeParentPattern
87
+ * showGreeting={true}
88
+ * showActionCenter={true}
89
+ * showAcademics={true}
90
+ * showQuickAccess={true}
91
+ * showAnnouncements={true}
92
+ * />
93
+ * ```
94
+ */
95
+ export function HomeParentPattern({
96
+ // Header section
97
+ showGreeting = true,
98
+ greetingUserName = 'Mathers',
99
+ greetingText = 'Good Morning',
100
+ greetingSubtitle = 'Viewing : Marshall, CSE - B',
101
+ greetingOverviewText = 'Attendance : 84.6 % • Fees : Due in 3 days',
102
+ _showScheduleButton = true,
103
+ onSchedulePress,
104
+
105
+ // Action Center section
106
+ showActionCenter = true,
107
+ actionCenterTitle = 'Action Center',
108
+ actionCenterSubtitle = 'Actions that need your attention',
109
+ actionCenterItems = ['Fee Due'],
110
+
111
+ // Academics section
112
+ showAcademics = true,
113
+ academicsTitle = 'Academics',
114
+ semesterTitle = 'Semester 4',
115
+ courseCount = '5 Courses',
116
+ showViewCoursesButton = true,
117
+ showCalendarButton = true,
118
+
119
+ // Quick Access section
120
+ showQuickAccess = true,
121
+ quickAccessItems = [
122
+ { title: 'Attendance', subtitle: '84.6 %' },
123
+ { title: 'Payments', subtitle: 'No Dues' },
124
+ { title: 'Exam Scores', subtitle: 'CGPA : 7.2' },
125
+ { title: 'Services', subtitle: '1 Active' },
126
+ ],
127
+
128
+ // Mentor section
129
+ showMentor = true,
130
+ mentorName = 'Dr. Dre',
131
+ mentorTitle = 'Professor, CSE Department',
132
+
133
+ // Announcements section
134
+ showAnnouncements = true,
135
+ announcementTitle = 'Examination Timetable Out',
136
+ announcementAuthor = 'CSE HOD',
137
+ announcementSubtitle = 'CSE : Batch 2023-24',
138
+ announcementContent = 'Examination Timetable has been updated and Published. Students are requested to register before 24th of this Month.',
139
+ showAttachmentDetails = true,
140
+ attachmentFileName = 'File Name',
141
+ attachmentPages = '27 Pages',
142
+ attachmentSizeMB = '3 MB',
143
+ attachmentType = 'PDF',
144
+
145
+ // Styling
146
+ style,
147
+ testID,
148
+ }: HomeParentPatternProps) {
149
+ return (
150
+ <ScrollView
151
+ testID={testID ?? 'home-parent-pattern'}
152
+ style={style}
153
+ className="flex-1 bg-surface-page"
154
+ showsVerticalScrollIndicator={false}
155
+ >
156
+ <View className="gap-8 py-5 px-5">
157
+ {/* Header Section: Greeting with Overview */}
158
+ {showGreeting && (
159
+ <View className="gap-4">
160
+ <View className="gap-2">
161
+ <Greeting
162
+ userName={greetingUserName}
163
+ greetingText={greetingText}
164
+ subtitle={greetingSubtitle}
165
+ ctaLayout="icon"
166
+ showNextUp={true}
167
+ onSchedulePress={onSchedulePress}
168
+ />
169
+ <Text className="text-xs text-text-secondary px-0">
170
+ {greetingOverviewText}
171
+ </Text>
172
+ </View>
173
+ </View>
174
+ )}
175
+
176
+ {/* Action Center Section */}
177
+ {showActionCenter && (
178
+ <View className="gap-4">
179
+ <Banner
180
+ style="solid"
181
+ title={actionCenterTitle}
182
+ subtitle={actionCenterSubtitle}
183
+ showBadge={true}
184
+ badge1Text={`${actionCenterItems.length}`}
185
+ actionItem1={actionCenterItems[0] || 'Fee Due'}
186
+ showActionItem2={actionCenterItems.length > 1}
187
+ actionItem2={actionCenterItems[1] || ''}
188
+ showMoreLabel={actionCenterItems.length > 2}
189
+ moreLabel={`+ ${actionCenterItems.length - 2} more`}
190
+ showActionItems={true}
191
+ showTrailing={true}
192
+ />
193
+ </View>
194
+ )}
195
+
196
+ {/* Academics Section */}
197
+ {showAcademics && (
198
+ <View className="gap-2">
199
+ <Text className="text-sm font-semibold text-text-secondary px-5">
200
+ {academicsTitle}
201
+ </Text>
202
+
203
+ <View className="gap-2 px-5">
204
+ <Card
205
+ size="lg"
206
+ title={semesterTitle}
207
+ subtitle={courseCount}
208
+ showSubtitle={true}
209
+ showMedia={false}
210
+ showLeading={false}
211
+ showBadges={false}
212
+ showFooterActions={false}
213
+ />
214
+
215
+ <View className="flex-row gap-2">
216
+ {showViewCoursesButton && (
217
+ <Button variant="default" size="default" className="flex-1">
218
+ View Courses
219
+ </Button>
220
+ )}
221
+ {showCalendarButton && (
222
+ <Button variant="secondary" size="default" className="flex-1">
223
+ Calendar
224
+ </Button>
225
+ )}
226
+ </View>
227
+ </View>
228
+ </View>
229
+ )}
230
+
231
+ {/* Quick Access Section */}
232
+ {showQuickAccess && (
233
+ <View className="gap-2">
234
+ <Text className="text-sm font-semibold text-text-secondary px-5">
235
+ Quick Access
236
+ </Text>
237
+
238
+ <View className="flex-row flex-wrap gap-2 px-5 justify-between">
239
+ {quickAccessItems.map((item, index) => (
240
+ <View key={index} style={{ width: '48%' }}>
241
+ <Card
242
+ size="sm"
243
+ title={item.title}
244
+ subtitle={item.subtitle}
245
+ showSubtitle={true}
246
+ showMedia={false}
247
+ showLeading={true}
248
+ showBadges={false}
249
+ showFooterActions={false}
250
+ leadingType="avatar"
251
+ avatarInitials={item.title.slice(0, 2).toUpperCase()}
252
+ />
253
+ </View>
254
+ ))}
255
+ </View>
256
+ </View>
257
+ )}
258
+
259
+ {/* Mentor Section */}
260
+ {showMentor && (
261
+ <View className="gap-2">
262
+ <Text className="text-sm font-semibold text-text-secondary px-5">
263
+ Mentor
264
+ </Text>
265
+
266
+ <View className="px-5">
267
+ <Card
268
+ size="sm"
269
+ title={mentorName}
270
+ subtitle={mentorTitle}
271
+ showSubtitle={true}
272
+ showMedia={false}
273
+ showLeading={true}
274
+ showBadges={false}
275
+ showFooterActions={false}
276
+ leadingType="avatar"
277
+ avatarInitials={mentorName.slice(0, 2).toUpperCase()}
278
+ />
279
+ </View>
280
+ </View>
281
+ )}
282
+
283
+ {/* Announcements Section */}
284
+ {showAnnouncements && (
285
+ <View className="gap-2">
286
+ <View className="flex-row justify-between items-center px-5">
287
+ <Text className="text-sm font-semibold text-text-secondary">
288
+ Announcements
289
+ </Text>
290
+ <Text className="text-xs">→</Text>
291
+ </View>
292
+
293
+ <View className="px-5">
294
+ <FeedCard
295
+ type="announcement"
296
+ authorName={announcementAuthor}
297
+ postTitle={announcementTitle}
298
+ subtitle={announcementSubtitle}
299
+ postContent={announcementContent}
300
+ mediaType={showAttachmentDetails ? 'file' : 'image'}
301
+ fileName={attachmentFileName}
302
+ filePages={attachmentPages}
303
+ fileSizeMB={attachmentSizeMB}
304
+ fileType={attachmentType}
305
+ showMedia={showAttachmentDetails}
306
+ showHeader={true}
307
+ showPostContent={true}
308
+ showBody={true}
309
+ showFooterActions={true}
310
+ showLeading={true}
311
+ showSubtitle={true}
312
+ showBadges={false}
313
+ showSecondaryButton={false}
314
+ />
315
+ </View>
316
+ </View>
317
+ )}
318
+
319
+ {/* Bottom Spacer */}
320
+ <View style={{ height: 96 }} />
321
+ </View>
322
+ </ScrollView>
323
+ );
324
+ }
325
+
326
+ HomeParentPattern.displayName = 'HomeParentPattern';
327
+
328
+ export type { HomeParentPatternProps };
@@ -0,0 +1,2 @@
1
+ export { HomeParentPattern } from './HomeParentPattern';
2
+ export type { HomeParentPatternProps } from './HomeParentPattern';
@@ -0,0 +1,66 @@
1
+ import figma from '@figma/code-connect';
2
+ import { HomeStudentPattern } from './HomeStudentPattern';
3
+
4
+ const FIGMA_URL =
5
+ 'https://www.figma.com/design/YTb27Onq7Zk8OV16fHptxJ/Campx-App?node-id=178-2147';
6
+
7
+ /**
8
+ * HomeStudentPattern - Student home screen layout pattern
9
+ *
10
+ * Use cases:
11
+ * - Student dashboard home screens
12
+ * - Educational app main screens
13
+ * - Course management interfaces
14
+ * - Campus life discovery screens
15
+ *
16
+ * Features:
17
+ * - Personalized greeting with schedule quick access
18
+ * - Action center for pending items and alerts
19
+ * - Next class preparation section with course details
20
+ * - Quick access dashboard (Attendance, Payments, Scores, Services)
21
+ * - Campus life shortcuts (Clubs, Events)
22
+ * - Mentor information card
23
+ * - Announcements feed with latest updates
24
+ * - All sections are independently configurable
25
+ *
26
+ * Customization:
27
+ * - Show/hide individual sections
28
+ * - Customize titles, subtitles, and content
29
+ * - Configure button callbacks
30
+ * - Adapt data based on backend responses
31
+ */
32
+ figma.connect(HomeStudentPattern, FIGMA_URL, {
33
+ example: () => (
34
+ <HomeStudentPattern
35
+ showGreeting={true}
36
+ greetingUserName="Marshall"
37
+ greetingText="Good Morning"
38
+ greetingSubtitle="You have 3 Classes today"
39
+ showScheduleButton={true}
40
+ showActionCenter={true}
41
+ actionCenterTitle="Action Center"
42
+ actionCenterSubtitle="Actions that need your attention"
43
+ actionCenterItems={['Fee Due', 'Feedback Submission Pending']}
44
+ showNextClass={true}
45
+ nextClassTitle="Microprocessors Lab"
46
+ nextClassTime="10:00 AM - 11:00 AM"
47
+ showCourseButton={true}
48
+ showResourcesButton={true}
49
+ showQuickAccess={true}
50
+ quickAccessItems={[
51
+ { title: 'Attendance', subtitle: '84.6 %' },
52
+ { title: 'Payments', subtitle: 'No Dues' },
53
+ { title: 'Exam Scores', subtitle: 'CGPA : 7.2' },
54
+ { title: 'Services', subtitle: '1 Active' },
55
+ ]}
56
+ showCampusLife={true}
57
+ showMentor={true}
58
+ mentorName="Dr. Dre"
59
+ mentorTitle="Professor, CSE Department"
60
+ showAnnouncements={true}
61
+ announcementTitle="Examination Timetable Out"
62
+ announcementAuthor="CSE HOD"
63
+ announcementContent="Examination Timetable has been updated and Published. Students are requested to register before 24th of this Month."
64
+ />
65
+ ),
66
+ });