@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,318 @@
1
+ "use strict";
2
+
3
+ // @ts-nocheck
4
+ import React from 'react';
5
+ import { View, Text as RNText, Image as RNImage, Pressable } from 'react-native';
6
+ import { cssInterop } from 'nativewind';
7
+ import { Avatar } from "../Avatar/Avatar.js";
8
+ import { Badge } from "../Badge/Badge.js";
9
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
10
+ cssInterop(View, {
11
+ className: 'style'
12
+ });
13
+ cssInterop(RNText, {
14
+ className: 'style'
15
+ });
16
+ cssInterop(RNImage, {
17
+ className: 'style'
18
+ });
19
+ cssInterop(Pressable, {
20
+ className: 'style'
21
+ });
22
+ const View_ = View;
23
+ const Text = RNText;
24
+ const Image = RNImage;
25
+
26
+ /* ============================================================================
27
+ * Types
28
+ * ============================================================================ */
29
+
30
+ /* ============================================================================
31
+ * Component
32
+ * ============================================================================ */
33
+
34
+ /**
35
+ * ChatBubble Component
36
+ *
37
+ * A comprehensive chat message bubble component for chat interfaces.
38
+ * Supports incoming/outgoing messages with default and AI variants.
39
+ *
40
+ * @example
41
+ * ```tsx
42
+ * <ChatBubble
43
+ * type="incoming"
44
+ * variant="default"
45
+ * message="Hello!"
46
+ * userName="John"
47
+ * timestamp="09:10 PM"
48
+ * />
49
+ * ```
50
+ */
51
+ export function ChatBubble({
52
+ type = 'incoming',
53
+ variant = 'default',
54
+ message = 'This is the Message bubble content. This will have truncated content and we can fix the width as 300px.',
55
+ userName = 'User Name',
56
+ _userAvatar,
57
+ timestamp = '09:10 PM',
58
+ showUser = true,
59
+ showMessage = true,
60
+ showEditedIndication = true,
61
+ showQuotedReply = true,
62
+ quotedMessage = {
63
+ author: 'John Doe',
64
+ text: 'This is a quoted reply section'
65
+ },
66
+ showMessageAttachment = true,
67
+ attachment,
68
+ showReactions = true,
69
+ reactions = ['👍', '❤️'],
70
+ showActions = true,
71
+ onCopy,
72
+ onLike,
73
+ onDislike,
74
+ onRegenerate,
75
+ style,
76
+ testID
77
+ }) {
78
+ const isIncoming = type === 'incoming';
79
+ const isOutgoing = type === 'outgoing';
80
+ const isAi = variant === 'ai';
81
+ const isDefault = variant === 'default';
82
+ if (isIncoming && isDefault) {
83
+ return /*#__PURE__*/_jsxs(View_, {
84
+ testID: testID ?? 'chat-bubble',
85
+ style: style,
86
+ className: "flex-row gap-2 px-5 py-2 items-end",
87
+ children: [showUser && /*#__PURE__*/_jsx(Avatar, {
88
+ size: "sm",
89
+ type: "initials",
90
+ initials: userName?.slice(0, 2).toUpperCase() ?? 'AK',
91
+ showRing: true
92
+ }), /*#__PURE__*/_jsxs(View_, {
93
+ className: "flex-1 gap-1",
94
+ children: [/*#__PURE__*/_jsxs(View_, {
95
+ className: "flex-row items-center justify-between px-4",
96
+ children: [/*#__PURE__*/_jsx(Text, {
97
+ className: "text-xs font-medium text-text-secondary",
98
+ children: userName
99
+ }), /*#__PURE__*/_jsxs(View_, {
100
+ className: "flex-row items-center gap-1",
101
+ children: [showEditedIndication && /*#__PURE__*/_jsxs(_Fragment, {
102
+ children: [/*#__PURE__*/_jsx(Text, {
103
+ className: "text-xs font-medium text-text-secondary",
104
+ children: "Edited"
105
+ }), /*#__PURE__*/_jsx(View_, {
106
+ className: "w-0.5 h-0.5 rounded-full bg-text-secondary"
107
+ })]
108
+ }), /*#__PURE__*/_jsx(Text, {
109
+ className: "text-xs font-medium text-text-secondary",
110
+ children: timestamp
111
+ })]
112
+ })]
113
+ }), /*#__PURE__*/_jsxs(View_, {
114
+ className: "rounded-3xl rounded-bl-none bg-white px-4 py-3 gap-3",
115
+ children: [showQuotedReply && quotedMessage && /*#__PURE__*/_jsxs(View_, {
116
+ className: "bg-white rounded-xl border-l-4 border-l-highlight-purple px-3 py-2 gap-0.5",
117
+ children: [/*#__PURE__*/_jsx(Text, {
118
+ className: "text-xs font-semibold text-text-primary",
119
+ children: quotedMessage.author
120
+ }), /*#__PURE__*/_jsx(Text, {
121
+ className: "text-xs font-medium text-text-secondary",
122
+ children: quotedMessage.text
123
+ })]
124
+ }), showMessage && /*#__PURE__*/_jsx(Text, {
125
+ className: "text-sm font-medium text-text-primary leading-5",
126
+ children: message
127
+ }), showMessageAttachment && attachment?.type === 'image' && attachment.uri && /*#__PURE__*/_jsx(Image, {
128
+ source: {
129
+ uri: attachment.uri
130
+ },
131
+ style: {
132
+ width: '100%',
133
+ height: 160,
134
+ borderRadius: 16
135
+ },
136
+ resizeMode: "cover"
137
+ })]
138
+ }), showReactions && reactions && reactions.length > 0 && /*#__PURE__*/_jsx(View_, {
139
+ className: "flex-row gap-1 px-4 pt-1",
140
+ children: reactions.map((reaction, idx) => /*#__PURE__*/_jsx(Badge, {
141
+ variant: "default",
142
+ size: "sm",
143
+ className: "rounded-full",
144
+ children: /*#__PURE__*/_jsx(Text, {
145
+ className: "text-sm",
146
+ children: reaction
147
+ })
148
+ }, idx))
149
+ })]
150
+ })]
151
+ });
152
+ }
153
+ if (isOutgoing && isDefault) {
154
+ return /*#__PURE__*/_jsxs(View_, {
155
+ testID: testID ?? 'chat-bubble',
156
+ style: style,
157
+ className: "flex-row-reverse gap-2 px-5 py-2 items-end",
158
+ children: [showUser && /*#__PURE__*/_jsx(Avatar, {
159
+ size: "sm",
160
+ type: "image",
161
+ initials: userName?.slice(0, 2).toUpperCase() ?? 'AK',
162
+ showRing: true
163
+ }), /*#__PURE__*/_jsxs(View_, {
164
+ className: "flex-1 gap-1",
165
+ children: [/*#__PURE__*/_jsxs(View_, {
166
+ className: "flex-row items-center justify-between px-4",
167
+ children: [/*#__PURE__*/_jsxs(View_, {
168
+ className: "flex-row items-center gap-1",
169
+ children: [/*#__PURE__*/_jsx(Text, {
170
+ className: "text-xs font-medium text-text-secondary",
171
+ children: timestamp
172
+ }), showEditedIndication && /*#__PURE__*/_jsxs(_Fragment, {
173
+ children: [/*#__PURE__*/_jsx(View_, {
174
+ className: "w-0.5 h-0.5 rounded-full bg-text-secondary"
175
+ }), /*#__PURE__*/_jsx(Text, {
176
+ className: "text-xs font-medium text-text-secondary",
177
+ children: "Edited"
178
+ })]
179
+ })]
180
+ }), /*#__PURE__*/_jsx(Text, {
181
+ className: "text-xs font-medium text-text-secondary",
182
+ children: "You"
183
+ })]
184
+ }), /*#__PURE__*/_jsxs(View_, {
185
+ className: "rounded-3xl rounded-br-none bg-surface-subtle px-4 py-3 gap-3",
186
+ children: [showQuotedReply && quotedMessage && /*#__PURE__*/_jsxs(View_, {
187
+ className: "bg-surface-default rounded-xl border-l-4 border-l-white px-3 py-2 gap-0.5",
188
+ children: [/*#__PURE__*/_jsx(Text, {
189
+ className: "text-xs font-semibold text-text-primary",
190
+ children: quotedMessage.author
191
+ }), /*#__PURE__*/_jsx(Text, {
192
+ className: "text-xs font-medium text-text-secondary",
193
+ children: quotedMessage.text
194
+ })]
195
+ }), showMessage && /*#__PURE__*/_jsx(Text, {
196
+ className: "text-sm font-medium text-text-primary leading-5",
197
+ children: message
198
+ }), showMessageAttachment && attachment?.type === 'link' && /*#__PURE__*/_jsxs(View_, {
199
+ className: "gap-2",
200
+ children: [/*#__PURE__*/_jsxs(View_, {
201
+ className: "bg-white rounded-2xl px-3 py-2 gap-1",
202
+ children: [/*#__PURE__*/_jsx(Text, {
203
+ className: "text-xs font-semibold text-text-primary",
204
+ children: attachment.title
205
+ }), /*#__PURE__*/_jsx(Text, {
206
+ className: "text-xs font-medium text-text-muted",
207
+ children: attachment.description
208
+ }), /*#__PURE__*/_jsx(Text, {
209
+ className: "text-xs font-medium text-text-secondary",
210
+ children: attachment.url
211
+ })]
212
+ }), /*#__PURE__*/_jsx(Pressable, {
213
+ children: /*#__PURE__*/_jsx(Text, {
214
+ className: "text-xs font-medium text-highlight-purple underline",
215
+ children: attachment.url && `https://${attachment.url}/home`
216
+ })
217
+ })]
218
+ })]
219
+ }), /*#__PURE__*/_jsxs(View_, {
220
+ className: "flex-row items-center justify-between px-4 pt-1",
221
+ children: [showReactions && reactions && reactions.length > 0 && /*#__PURE__*/_jsx(View_, {
222
+ className: "flex-row gap-1",
223
+ children: reactions.map((reaction, idx) => /*#__PURE__*/_jsx(Badge, {
224
+ variant: "default",
225
+ size: "sm",
226
+ className: "rounded-full",
227
+ children: /*#__PURE__*/_jsx(Text, {
228
+ className: "text-sm",
229
+ children: reaction
230
+ })
231
+ }, idx))
232
+ }), /*#__PURE__*/_jsxs(View_, {
233
+ className: "flex-row items-center gap-1",
234
+ children: [/*#__PURE__*/_jsx(View_, {
235
+ className: "w-3 h-3 rounded-full bg-text-muted"
236
+ }), /*#__PURE__*/_jsx(Text, {
237
+ className: "text-xs font-medium text-text-muted",
238
+ children: "Sent"
239
+ })]
240
+ })]
241
+ })]
242
+ })]
243
+ });
244
+ }
245
+ if (isIncoming && isAi) {
246
+ return /*#__PURE__*/_jsxs(View_, {
247
+ testID: testID ?? 'chat-bubble',
248
+ style: style,
249
+ className: "flex-row gap-2 px-5 py-2 items-end",
250
+ children: [showUser && /*#__PURE__*/_jsx(Avatar, {
251
+ size: "sm",
252
+ type: "icon",
253
+ initials: "AI",
254
+ showRing: true
255
+ }), /*#__PURE__*/_jsxs(View_, {
256
+ className: "flex-1 gap-1",
257
+ children: [/*#__PURE__*/_jsxs(View_, {
258
+ className: "flex-row items-center justify-between px-4",
259
+ children: [/*#__PURE__*/_jsx(Text, {
260
+ className: "text-lg",
261
+ children: "\u2728"
262
+ }), /*#__PURE__*/_jsx(Text, {
263
+ className: "text-xs font-medium text-text-secondary",
264
+ children: timestamp
265
+ })]
266
+ }), /*#__PURE__*/_jsxs(View_, {
267
+ className: "rounded-3xl rounded-bl-none bg-white px-4 py-3 gap-3",
268
+ children: [showMessage && /*#__PURE__*/_jsx(Text, {
269
+ className: "text-sm font-medium text-text-primary leading-5",
270
+ children: message
271
+ }), showMessageAttachment && attachment?.type === 'image' && attachment.uri && /*#__PURE__*/_jsx(Image, {
272
+ source: {
273
+ uri: attachment.uri
274
+ },
275
+ style: {
276
+ width: '100%',
277
+ height: 160,
278
+ borderRadius: 16
279
+ },
280
+ resizeMode: "cover"
281
+ })]
282
+ }), /*#__PURE__*/_jsx(View_, {
283
+ className: "flex-row items-center gap-5 px-4 pt-2",
284
+ children: showActions && /*#__PURE__*/_jsxs(_Fragment, {
285
+ children: [/*#__PURE__*/_jsx(Pressable, {
286
+ onPress: onCopy,
287
+ children: /*#__PURE__*/_jsx(Text, {
288
+ className: "text-base",
289
+ children: "\uD83D\uDCCB"
290
+ })
291
+ }), /*#__PURE__*/_jsx(Pressable, {
292
+ onPress: onLike,
293
+ children: /*#__PURE__*/_jsx(Text, {
294
+ className: "text-base",
295
+ children: "\uD83D\uDC4D"
296
+ })
297
+ }), /*#__PURE__*/_jsx(Pressable, {
298
+ onPress: onDislike,
299
+ children: /*#__PURE__*/_jsx(Text, {
300
+ className: "text-base",
301
+ children: "\uD83D\uDC4E"
302
+ })
303
+ }), /*#__PURE__*/_jsx(Pressable, {
304
+ onPress: onRegenerate,
305
+ children: /*#__PURE__*/_jsx(Text, {
306
+ className: "text-base",
307
+ children: "\uD83D\uDD04"
308
+ })
309
+ })]
310
+ })
311
+ })]
312
+ })]
313
+ });
314
+ }
315
+ return null;
316
+ }
317
+ ChatBubble.displayName = 'ChatBubble';
318
+ //# sourceMappingURL=ChatBubble.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","View","Text","RNText","Image","RNImage","Pressable","cssInterop","Avatar","Badge","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","className","View_","ChatBubble","type","variant","message","userName","_userAvatar","timestamp","showUser","showMessage","showEditedIndication","showQuotedReply","quotedMessage","author","text","showMessageAttachment","attachment","showReactions","reactions","showActions","onCopy","onLike","onDislike","onRegenerate","style","testID","isIncoming","isOutgoing","isAi","isDefault","children","size","initials","slice","toUpperCase","showRing","uri","source","width","height","borderRadius","resizeMode","length","map","reaction","idx","title","description","url","onPress","displayName"],"sourceRoot":"../../../../../src","sources":["components/DataDisplay/ChatBubble/ChatBubble.tsx"],"mappings":";;AAAA;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,IAAI,EACJC,IAAI,IAAIC,MAAM,EACdC,KAAK,IAAIC,OAAO,EAChBC,SAAS,QAIJ,cAAc;AACrB,SAASC,UAAU,QAAQ,YAAY;AAEvC,SAASC,MAAM,QAAQ,qBAAkB;AACzC,SAASC,KAAK,QAAQ,mBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAA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AC;cAAE,CAAM;YAAC,CAC5B,CAAC,eACZpC,IAAA,CAACL,SAAS;cAAC4D,OAAO,EAAE1B,YAAa;cAAAO,QAAA,eAC/BpC,IAAA,CAACT,IAAI;gBAACc,SAAS,EAAC,WAAW;gBAAA+B,QAAA,EAAC;cAAE,CAAM;YAAC,CAC5B,CAAC;UAAA,CACZ;QACH,CACI,CAAC;MAAA,CACH,CAAC;IAAA,CACH,CAAC;EAEZ;EAEA,OAAO,IAAI;AACb;AAEA7B,UAAU,CAACiD,WAAW,GAAG,YAAY","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export { ChatBubble } from "./ChatBubble.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ChatBubble"],"sourceRoot":"../../../../../src","sources":["components/DataDisplay/ChatBubble/index.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,iBAAc","ignoreList":[]}
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+
3
+ // @ts-nocheck
4
+ import { View as RNView, Text as RNTextBase } from 'react-native';
5
+ import { cssInterop } from 'nativewind';
6
+
7
+ // NativeWind interop (className -> style)
8
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ const View = cssInterop(RNView, {
10
+ className: 'style'
11
+ });
12
+ const RNText = cssInterop(RNTextBase, {
13
+ className: 'style'
14
+ });
15
+ /**
16
+ * AttachmentDetails - Displays file attachment metadata
17
+ *
18
+ * Shows file name, pages, size, and file type in a compact card format
19
+ *
20
+ * @component
21
+ * @example
22
+ * ```tsx
23
+ * <AttachmentDetails
24
+ * fileName="Document"
25
+ * pages={27}
26
+ * sizeMB={3}
27
+ * fileType="PDF"
28
+ * />
29
+ * ```
30
+ */
31
+ export function AttachmentDetails({
32
+ fileName = 'File Name',
33
+ pages = 27,
34
+ sizeMB = 3,
35
+ fileType = 'Pdf',
36
+ style,
37
+ testID
38
+ }) {
39
+ return /*#__PURE__*/_jsxs(View, {
40
+ testID: testID ?? 'attachment-details',
41
+ className: "bg-surface-subtle rounded-lg px-4 py-3 flex-col gap-1 w-full",
42
+ style: style,
43
+ children: [/*#__PURE__*/_jsx(RNText, {
44
+ testID: "attachment-file-name",
45
+ numberOfLines: 1,
46
+ className: "text-sm font-semibold text-text-primary",
47
+ children: fileName
48
+ }), /*#__PURE__*/_jsxs(View, {
49
+ testID: "attachment-meta",
50
+ className: "flex-row items-center gap-2",
51
+ children: [/*#__PURE__*/_jsxs(RNText, {
52
+ className: "text-xs font-medium text-text-secondary",
53
+ children: [pages, " Pages"]
54
+ }), /*#__PURE__*/_jsx(View, {
55
+ className: "w-1 h-1 rounded-full bg-text-secondary"
56
+ }), /*#__PURE__*/_jsxs(RNText, {
57
+ className: "text-xs font-medium text-text-secondary",
58
+ children: [sizeMB, " MB"]
59
+ }), /*#__PURE__*/_jsx(View, {
60
+ className: "w-1 h-1 rounded-full bg-text-secondary"
61
+ }), /*#__PURE__*/_jsx(RNText, {
62
+ className: "text-xs font-medium text-text-secondary",
63
+ children: fileType
64
+ })]
65
+ })]
66
+ });
67
+ }
68
+ AttachmentDetails.displayName = 'AttachmentDetails';
69
+ //# sourceMappingURL=AttachmentDetails.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["View","RNView","Text","RNTextBase","cssInterop","jsx","_jsx","jsxs","_jsxs","className","RNText","AttachmentDetails","fileName","pages","sizeMB","fileType","style","testID","children","numberOfLines","displayName"],"sourceRoot":"../../../../../src","sources":["components/DataDisplay/FeedCard/AttachmentDetails.tsx"],"mappings":";;AAAA;AACA,SACEA,IAAI,IAAIC,MAAM,EACdC,IAAI,IAAIC,UAAU,QAGb,cAAc;AACrB,SAASC,UAAU,QAAQ,YAAY;;AAEvC;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AACA,MAAMR,IAAI,GAAGI,UAAU,CAACH,MAAM,EAAE;EAAEQ,SAAS,EAAE;AAAQ,CAAC,CAAC;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BAAmB","ignoreList":[]}
@@ -10,33 +10,35 @@ figma.connect(FeedCard, FIGMA_URL, {
10
10
  post: 'post',
11
11
  announcement: 'announcement'
12
12
  }),
13
- authorName: figma.string('authorName'),
14
- postTitle: figma.string('postTitle'),
15
- subtitle: figma.string('subtitle'),
16
- postContent: figma.string('postContent'),
17
- showHeader: figma.boolean('Show Header'),
18
- showLeading: figma.boolean('Show Leading'),
19
13
  showMedia: figma.boolean('Show Media'),
20
- showPostContent: figma.boolean('Show PostContent'),
21
- showSubtitle: figma.boolean('Show Subtitle'),
14
+ showHeader: figma.boolean('Show Header'),
15
+ showPostContent: figma.boolean('Show Post Content'),
16
+ showBody: figma.boolean('Show Body'),
22
17
  showBadges: figma.boolean('Show Badges'),
23
18
  showFooterActions: figma.boolean('Show FooterActions'),
24
- showSecondaryButton: figma.boolean('Show SecondaryButton')
19
+ showLeading: figma.boolean('Show Leading'),
20
+ showSubtitle: figma.boolean('Show Subtitle'),
21
+ showSecondaryButton: figma.boolean('Show SecondaryButton'),
22
+ authorName: figma.string('Author Name'),
23
+ postTitle: figma.string('Post Title'),
24
+ subtitle: figma.string('Subtitle'),
25
+ postContent: figma.string('Post Content')
25
26
  },
26
27
  example: props => /*#__PURE__*/_jsx(FeedCard, {
27
28
  type: props.type,
28
- authorName: props.authorName,
29
- postTitle: props.postTitle,
30
- subtitle: props.subtitle,
31
- postContent: props.postContent,
32
- showHeader: props.showHeader,
33
- showLeading: props.showLeading,
34
29
  showMedia: props.showMedia,
30
+ showHeader: props.showHeader,
35
31
  showPostContent: props.showPostContent,
36
- showSubtitle: props.showSubtitle,
32
+ showBody: props.showBody,
37
33
  showBadges: props.showBadges,
38
34
  showFooterActions: props.showFooterActions,
39
- showSecondaryButton: props.showSecondaryButton
35
+ showLeading: props.showLeading,
36
+ showSubtitle: props.showSubtitle,
37
+ showSecondaryButton: props.showSecondaryButton,
38
+ authorName: props.authorName,
39
+ postTitle: props.postTitle,
40
+ subtitle: props.subtitle,
41
+ postContent: props.postContent
40
42
  })
41
43
  });
42
44
  //# sourceMappingURL=FeedCard.figma.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["figma","FeedCard","jsx","_jsx","FIGMA_URL","connect","props","type","enum","post","announcement","authorName","string","postTitle","subtitle","postContent","showHeader","boolean","showLeading","showMedia","showPostContent","showSubtitle","showBadges","showFooterActions","showSecondaryButton","example"],"sourceRoot":"../../../../../src","sources":["components/DataDisplay/FeedCard/FeedCard.figma.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,qBAAqB;AACvC,SAASC,QAAQ,QAAQ,eAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEtC,MAAMC,SAAS,GACb,sGAAsG;AAExGJ,KAAK,CAACK,OAAO,CAACJ,QAAQ,EAAEG,SAAS,EAAE;EACjCE,KAAK,EAAE;IACLC,IAAI,EAAEP,KAAK,CAACQ,IAAI,CAAC,MAAM,EAAE;MACvBC,IAAI,EAAE,MAAM;MACZC,YAAY,EAAE;IAChB,CAAC,CAAC;IACFC,UAAU,EAAEX,KAAK,CAACY,MAAM,CAAC,YAAY,CAAC;IACtCC,SAAS,EAAEb,KAAK,CAACY,MAAM,CAAC,WAAW,CAAC;IACpCE,QAAQ,EAAEd,KAAK,CAACY,MAAM,CAAC,UAAU,CAAC;IAClCG,WAAW,EAAEf,KAAK,CAACY,MAAM,CAAC,aAAa,CAAC;IACxCI,UAAU,EAAEhB,KAAK,CAACiB,OAAO,CAAC,aAAa,CAAC;IACxCC,WAAW,EAAElB,KAAK,CAACiB,OAAO,CAAC,cAAc,CAAC;IAC1CE,SAAS,EAAEnB,KAAK,CAACiB,OAAO,CAAC,YAAY,CAAC;IACtCG,eAAe,EAAEpB,KAAK,CAACiB,OAAO,CAAC,kBAAkB,CAAC;IAClDI,YAAY,EAAErB,KAAK,CAACiB,OAAO,CAAC,eAAe,CAAC;IAC5CK,UAAU,EAAEtB,KAAK,CAACiB,OAAO,CAAC,aAAa,CAAC;IACxCM,iBAAiB,EAAEvB,KAAK,CAACiB,OAAO,CAAC,oBAAoB,CAAC;IACtDO,mBAAmB,EAAExB,KAAK,CAACiB,OAAO,CAAC,sBAAsB;EAC3D,CAAC;EACDQ,OAAO,EAAGnB,KAAK,iBACbH,IAAA,CAACF,QAAQ;IACPM,IAAI,EAAED,KAAK,CAACC,IAAK;IACjBI,UAAU,EAAEL,KAAK,CAACK,UAAW;IAC7BE,SAAS,EAAEP,KAAK,CAACO,SAAU;IAC3BC,QAAQ,EAAER,KAAK,CAACQ,QAAS;IACzBC,WAAW,EAAET,KAAK,CAACS,WAAY;IAC/BC,UAAU,EAAEV,KAAK,CAACU,UAAW;IAC7BE,WAAW,EAAEZ,KAAK,CAACY,WAAY;IAC/BC,SAAS,EAAEb,KAAK,CAACa,SAAU;IAC3BC,eAAe,EAAEd,KAAK,CAACc,eAAgB;IACvCC,YAAY,EAAEf,KAAK,CAACe,YAAa;IACjCC,UAAU,EAAEhB,KAAK,CAACgB,UAAW;IAC7BC,iBAAiB,EAAEjB,KAAK,CAACiB,iBAAkB;IAC3CC,mBAAmB,EAAElB,KAAK,CAACkB;EAAoB,CAChD;AAEL,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["figma","FeedCard","jsx","_jsx","FIGMA_URL","connect","props","type","enum","post","announcement","showMedia","boolean","showHeader","showPostContent","showBody","showBadges","showFooterActions","showLeading","showSubtitle","showSecondaryButton","authorName","string","postTitle","subtitle","postContent","example"],"sourceRoot":"../../../../../src","sources":["components/DataDisplay/FeedCard/FeedCard.figma.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,qBAAqB;AACvC,SAASC,QAAQ,QAAQ,eAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEtC,MAAMC,SAAS,GACb,sGAAsG;AAExGJ,KAAK,CAACK,OAAO,CAACJ,QAAQ,EAAEG,SAAS,EAAE;EACjCE,KAAK,EAAE;IACLC,IAAI,EAAEP,KAAK,CAACQ,IAAI,CAAC,MAAM,EAAE;MAC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ACa,YAAa;IACjCC,mBAAmB,EAAEd,KAAK,CAACc,mBAAoB;IAC/CC,UAAU,EAAEf,KAAK,CAACe,UAAW;IAC7BE,SAAS,EAAEjB,KAAK,CAACiB,SAAU;IAC3BC,QAAQ,EAAElB,KAAK,CAACkB,QAAS;IACzBC,WAAW,EAAEnB,KAAK,CAACmB;EAAY,CAChC;AAEL,CAAC,CAAC","ignoreList":[]}
@@ -9,11 +9,11 @@ import { Button } from "../../Input/Button/Button.js";
9
9
  import { Badge } from "../Badge/Badge.js";
10
10
  import { Text } from "../../Input/Text/Text.js";
11
11
  import { Avatar } from "../Avatar/Avatar.js";
12
- import { AspectRatio } from "../../Layout/AspectRatio/Aspect-Ratio.js";
12
+ import { AttachmentDetails } from "./AttachmentDetails.js";
13
13
 
14
- // Default placeholder image
14
+ // Gradient image asset (same as Card demo)
15
15
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
- const DEFAULT_MEDIA_IMAGE = 'https://images.unsplash.com/photo-1470071459604-3b5ec3a7fe3e?w=400&h=224&fit=crop';
16
+ const GRADIENT_IMAGE = require('../../../assets/icons/Image.png');
17
17
 
18
18
  // NativeWind interop (className -> style)
19
19
  const View = cssInterop(RNView, {
@@ -33,30 +33,30 @@ const Image = cssInterop(RNImage, {
33
33
  export const FeedCardVariants = {
34
34
  type: ['post', 'announcement']
35
35
  };
36
- const rootVariants = cva('w-full overflow-hidden rounded-3xl', {
36
+ const rootVariants = cva('w-full overflow-hidden rounded-lg bg-surface-default', {
37
37
  variants: {
38
38
  type: {
39
- post: 'bg-surface-default',
40
- announcement: 'bg-surface-default border border-border-default'
39
+ post: '',
40
+ announcement: 'border border-border-default'
41
41
  }
42
42
  },
43
43
  defaultVariants: {
44
44
  type: 'post'
45
45
  }
46
46
  });
47
- const metaRowVariants = cva('w-full flex-row p-4', {
47
+ const metaRowVariants = cva('w-full flex-row p-4 items-center', {
48
48
  variants: {
49
49
  type: {
50
- post: 'items-center gap-2',
51
- announcement: 'items-center justify-between'
50
+ post: 'gap-2',
51
+ announcement: 'justify-between gap-2'
52
52
  }
53
53
  },
54
54
  defaultVariants: {
55
55
  type: 'post'
56
56
  }
57
57
  });
58
- const mediaWrapVariants = cva('w-full overflow-hidden px-4 pb-4');
59
- const contentWrapVariants = cva('w-full px-4 pb-4 flex-col');
58
+ const mediaWrapVariants = cva('w-full overflow-hidden px-4 pb-0 pt-0');
59
+ const contentWrapVariants = cva('w-full px-4 pb-4 flex-col gap-4');
60
60
  const headerVariants = cva('w-full gap-1 flex-col');
61
61
  const titleVariants = cva('text-base font-semibold text-text-primary');
62
62
  const subtitleVariants = cva('text-xs font-medium text-text-secondary');
@@ -90,12 +90,18 @@ export function FeedCard(props) {
90
90
  subtitle = 'Subtitle of the card goes here',
91
91
  postContent = 'The card may contain body content which can be truncated to 1-2 lines. Swap Content in Props.',
92
92
  image,
93
+ mediaType = 'image',
94
+ fileName = 'File Name',
95
+ filePages = 27,
96
+ fileSizeMB = 3,
97
+ fileType = 'PDF',
93
98
  type = 'post',
94
99
  showHeader = true,
95
100
  showLeading = true,
96
101
  showMedia = true,
97
102
  showPostContent = true,
98
103
  showSubtitle = true,
104
+ showBody = true,
99
105
  showBadges = true,
100
106
  showFooterActions = true,
101
107
  showSecondaryButton = true,
@@ -157,18 +163,22 @@ export function FeedCard(props) {
157
163
  }), showMedia && /*#__PURE__*/_jsx(View, {
158
164
  testID: "feed-card-media-wrap",
159
165
  className: cn(mediaWrapVariants()),
160
- children: /*#__PURE__*/_jsx(AspectRatio, {
161
- variant: "16:9",
162
- children: /*#__PURE__*/_jsx(View, {
163
- className: "w-full h-full bg-surface-subtle rounded-3xl overflow-hidden",
166
+ children: /*#__PURE__*/_jsx(View, {
167
+ className: "w-full pb-4",
168
+ children: mediaType === 'image' ? /*#__PURE__*/_jsx(View, {
169
+ className: "w-full aspect-[16/9] bg-surface-subtle rounded-xl overflow-hidden",
164
170
  children: /*#__PURE__*/_jsx(Image, {
165
171
  testID: "feed-card-media",
166
- source: image || {
167
- uri: DEFAULT_MEDIA_IMAGE
168
- },
172
+ source: image || GRADIENT_IMAGE,
169
173
  resizeMode: "cover",
170
174
  className: "w-full h-full"
171
175
  })
176
+ }) : /*#__PURE__*/_jsx(AttachmentDetails, {
177
+ testID: "feed-card-attachment",
178
+ fileName: fileName,
179
+ pages: filePages,
180
+ sizeMB: fileSizeMB,
181
+ fileType: fileType
172
182
  })
173
183
  })
174
184
  }), showPostContent && /*#__PURE__*/_jsxs(View, {
@@ -180,6 +190,7 @@ export function FeedCard(props) {
180
190
  children: [/*#__PURE__*/_jsx(RNText, {
181
191
  testID: "feed-card-title",
182
192
  numberOfLines: 1,
193
+ ellipsizeMode: "tail",
183
194
  className: cn(titleVariants()),
184
195
  children: postTitle
185
196
  }), showSubtitle && /*#__PURE__*/_jsx(RNText, {
@@ -188,7 +199,7 @@ export function FeedCard(props) {
188
199
  className: cn(subtitleVariants()),
189
200
  children: subtitle
190
201
  })]
191
- }), /*#__PURE__*/_jsx(RNText, {
202
+ }), showBody && /*#__PURE__*/_jsx(RNText, {
192
203
  testID: "feed-card-body",
193
204
  numberOfLines: 2,
194
205
  className: cn(bodyVariants()),