feeddo-react-native 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +401 -2
  3. package/android/build.gradle +39 -0
  4. package/android/src/main/AndroidManifest.xml +1 -0
  5. package/android/src/main/java/dev/feeddo/reactnative/FeeddoReactNativeModule.java +380 -0
  6. package/android/src/main/java/dev/feeddo/reactnative/FeeddoReactNativePackage.java +25 -0
  7. package/dist/Feeddo.d.ts +131 -0
  8. package/dist/Feeddo.d.ts.map +1 -0
  9. package/dist/Feeddo.js +176 -0
  10. package/dist/Feeddo.js.map +1 -0
  11. package/dist/FeeddoClient.d.ts +151 -0
  12. package/dist/FeeddoClient.d.ts.map +1 -0
  13. package/dist/FeeddoClient.js +690 -0
  14. package/dist/FeeddoClient.js.map +1 -0
  15. package/dist/FeeddoProvider.d.ts +23 -0
  16. package/dist/FeeddoProvider.d.ts.map +1 -0
  17. package/dist/FeeddoProvider.js +76 -0
  18. package/dist/FeeddoProvider.js.map +1 -0
  19. package/dist/config/FeeddoConfig.d.ts +10 -0
  20. package/dist/config/FeeddoConfig.d.ts.map +1 -0
  21. package/dist/config/FeeddoConfig.js +10 -0
  22. package/dist/config/FeeddoConfig.js.map +1 -0
  23. package/dist/index.d.ts +36 -0
  24. package/dist/index.d.ts.map +1 -0
  25. package/dist/index.js +38 -0
  26. package/dist/index.js.map +1 -0
  27. package/dist/models/Conversation.d.ts +27 -0
  28. package/dist/models/Conversation.d.ts.map +1 -0
  29. package/dist/models/Conversation.js +24 -0
  30. package/dist/models/Conversation.js.map +1 -0
  31. package/dist/models/EndUser.d.ts +49 -0
  32. package/dist/models/EndUser.d.ts.map +1 -0
  33. package/dist/models/EndUser.js +2 -0
  34. package/dist/models/EndUser.js.map +1 -0
  35. package/dist/models/FeeddoNotification.d.ts +15 -0
  36. package/dist/models/FeeddoNotification.d.ts.map +1 -0
  37. package/dist/models/FeeddoNotification.js +15 -0
  38. package/dist/models/FeeddoNotification.js.map +1 -0
  39. package/dist/models/HomeData.d.ts +16 -0
  40. package/dist/models/HomeData.d.ts.map +1 -0
  41. package/dist/models/HomeData.js +19 -0
  42. package/dist/models/HomeData.js.map +1 -0
  43. package/dist/models/Message.d.ts +12 -0
  44. package/dist/models/Message.d.ts.map +1 -0
  45. package/dist/models/Message.js +25 -0
  46. package/dist/models/Message.js.map +1 -0
  47. package/dist/models/PushProvider.d.ts +14 -0
  48. package/dist/models/PushProvider.d.ts.map +1 -0
  49. package/dist/models/PushProvider.js +9 -0
  50. package/dist/models/PushProvider.js.map +1 -0
  51. package/dist/models/Task.d.ts +17 -0
  52. package/dist/models/Task.d.ts.map +1 -0
  53. package/dist/models/Task.js +22 -0
  54. package/dist/models/Task.js.map +1 -0
  55. package/dist/models/TaskComment.d.ts +11 -0
  56. package/dist/models/TaskComment.d.ts.map +1 -0
  57. package/dist/models/TaskComment.js +27 -0
  58. package/dist/models/TaskComment.js.map +1 -0
  59. package/dist/models/Ticket.d.ts +13 -0
  60. package/dist/models/Ticket.d.ts.map +1 -0
  61. package/dist/models/Ticket.js +14 -0
  62. package/dist/models/Ticket.js.map +1 -0
  63. package/dist/native/FeeddoNative.d.ts +58 -0
  64. package/dist/native/FeeddoNative.d.ts.map +1 -0
  65. package/dist/native/FeeddoNative.js +22 -0
  66. package/dist/native/FeeddoNative.js.map +1 -0
  67. package/dist/push/FeeddoPushNotificationApns.d.ts +73 -0
  68. package/dist/push/FeeddoPushNotificationApns.d.ts.map +1 -0
  69. package/dist/push/FeeddoPushNotificationApns.js +301 -0
  70. package/dist/push/FeeddoPushNotificationApns.js.map +1 -0
  71. package/dist/services/ApiService.d.ts +64 -0
  72. package/dist/services/ApiService.d.ts.map +1 -0
  73. package/dist/services/ApiService.js +406 -0
  74. package/dist/services/ApiService.js.map +1 -0
  75. package/dist/services/ConversationService.d.ts +45 -0
  76. package/dist/services/ConversationService.d.ts.map +1 -0
  77. package/dist/services/ConversationService.js +259 -0
  78. package/dist/services/ConversationService.js.map +1 -0
  79. package/dist/services/WebSocketService.d.ts +26 -0
  80. package/dist/services/WebSocketService.d.ts.map +1 -0
  81. package/dist/services/WebSocketService.js +157 -0
  82. package/dist/services/WebSocketService.js.map +1 -0
  83. package/dist/theme/FeeddoTheme.d.ts +31 -0
  84. package/dist/theme/FeeddoTheme.d.ts.map +1 -0
  85. package/dist/theme/FeeddoTheme.js +60 -0
  86. package/dist/theme/FeeddoTheme.js.map +1 -0
  87. package/dist/ui/FeeddoFeedbackCard.d.ts +15 -0
  88. package/dist/ui/FeeddoFeedbackCard.d.ts.map +1 -0
  89. package/dist/ui/FeeddoFeedbackCard.js +188 -0
  90. package/dist/ui/FeeddoFeedbackCard.js.map +1 -0
  91. package/dist/ui/FeeddoModal.d.ts +20 -0
  92. package/dist/ui/FeeddoModal.d.ts.map +1 -0
  93. package/dist/ui/FeeddoModal.js +180 -0
  94. package/dist/ui/FeeddoModal.js.map +1 -0
  95. package/dist/ui/components/AttachmentPreview.d.ts +10 -0
  96. package/dist/ui/components/AttachmentPreview.d.ts.map +1 -0
  97. package/dist/ui/components/AttachmentPreview.js +143 -0
  98. package/dist/ui/components/AttachmentPreview.js.map +1 -0
  99. package/dist/ui/components/ChatInputArea.d.ts +16 -0
  100. package/dist/ui/components/ChatInputArea.d.ts.map +1 -0
  101. package/dist/ui/components/ChatInputArea.js +85 -0
  102. package/dist/ui/components/ChatInputArea.js.map +1 -0
  103. package/dist/ui/components/FeeddoIcon.d.ts +10 -0
  104. package/dist/ui/components/FeeddoIcon.d.ts.map +1 -0
  105. package/dist/ui/components/FeeddoIcon.js +690 -0
  106. package/dist/ui/components/FeeddoIcon.js.map +1 -0
  107. package/dist/ui/components/FeeddoNotificationBadge.d.ts +14 -0
  108. package/dist/ui/components/FeeddoNotificationBadge.d.ts.map +1 -0
  109. package/dist/ui/components/FeeddoNotificationBadge.js +171 -0
  110. package/dist/ui/components/FeeddoNotificationBadge.js.map +1 -0
  111. package/dist/ui/components/MessageBubble.d.ts +13 -0
  112. package/dist/ui/components/MessageBubble.d.ts.map +1 -0
  113. package/dist/ui/components/MessageBubble.js +163 -0
  114. package/dist/ui/components/MessageBubble.js.map +1 -0
  115. package/dist/ui/components/NotificationsSheet.d.ts +10 -0
  116. package/dist/ui/components/NotificationsSheet.d.ts.map +1 -0
  117. package/dist/ui/components/NotificationsSheet.js +252 -0
  118. package/dist/ui/components/NotificationsSheet.js.map +1 -0
  119. package/dist/ui/components/RatingWidget.d.ts +11 -0
  120. package/dist/ui/components/RatingWidget.d.ts.map +1 -0
  121. package/dist/ui/components/RatingWidget.js +34 -0
  122. package/dist/ui/components/RatingWidget.js.map +1 -0
  123. package/dist/ui/components/TaskCard.d.ts +12 -0
  124. package/dist/ui/components/TaskCard.d.ts.map +1 -0
  125. package/dist/ui/components/TaskCard.js +210 -0
  126. package/dist/ui/components/TaskCard.js.map +1 -0
  127. package/dist/ui/components/TaskDetailsSheet.d.ts +15 -0
  128. package/dist/ui/components/TaskDetailsSheet.d.ts.map +1 -0
  129. package/dist/ui/components/TaskDetailsSheet.js +577 -0
  130. package/dist/ui/components/TaskDetailsSheet.js.map +1 -0
  131. package/dist/ui/components/TicketCard.d.ts +11 -0
  132. package/dist/ui/components/TicketCard.d.ts.map +1 -0
  133. package/dist/ui/components/TicketCard.js +100 -0
  134. package/dist/ui/components/TicketCard.js.map +1 -0
  135. package/dist/ui/components/TicketDetailsSheet.d.ts +14 -0
  136. package/dist/ui/components/TicketDetailsSheet.d.ts.map +1 -0
  137. package/dist/ui/components/TicketDetailsSheet.js +254 -0
  138. package/dist/ui/components/TicketDetailsSheet.js.map +1 -0
  139. package/dist/ui/components/TypingIndicator.d.ts +10 -0
  140. package/dist/ui/components/TypingIndicator.d.ts.map +1 -0
  141. package/dist/ui/components/TypingIndicator.js +77 -0
  142. package/dist/ui/components/TypingIndicator.js.map +1 -0
  143. package/dist/ui/screens/FeeddoChatScreen.d.ts +13 -0
  144. package/dist/ui/screens/FeeddoChatScreen.d.ts.map +1 -0
  145. package/dist/ui/screens/FeeddoChatScreen.js +681 -0
  146. package/dist/ui/screens/FeeddoChatScreen.js.map +1 -0
  147. package/dist/ui/screens/FeeddoHomeScreen.d.ts +15 -0
  148. package/dist/ui/screens/FeeddoHomeScreen.d.ts.map +1 -0
  149. package/dist/ui/screens/FeeddoHomeScreen.js +653 -0
  150. package/dist/ui/screens/FeeddoHomeScreen.js.map +1 -0
  151. package/dist/ui/screens/FeeddoMessagesScreen.d.ts +12 -0
  152. package/dist/ui/screens/FeeddoMessagesScreen.d.ts.map +1 -0
  153. package/dist/ui/screens/FeeddoMessagesScreen.js +326 -0
  154. package/dist/ui/screens/FeeddoMessagesScreen.js.map +1 -0
  155. package/dist/ui/screens/FeeddoTasksScreen.d.ts +13 -0
  156. package/dist/ui/screens/FeeddoTasksScreen.d.ts.map +1 -0
  157. package/dist/ui/screens/FeeddoTasksScreen.js +517 -0
  158. package/dist/ui/screens/FeeddoTasksScreen.js.map +1 -0
  159. package/dist/ui/screens/FeeddoTicketsScreen.d.ts +10 -0
  160. package/dist/ui/screens/FeeddoTicketsScreen.d.ts.map +1 -0
  161. package/dist/ui/screens/FeeddoTicketsScreen.js +112 -0
  162. package/dist/ui/screens/FeeddoTicketsScreen.js.map +1 -0
  163. package/dist/utils/DeviceInfoHelper.d.ts +29 -0
  164. package/dist/utils/DeviceInfoHelper.d.ts.map +1 -0
  165. package/dist/utils/DeviceInfoHelper.js +190 -0
  166. package/dist/utils/DeviceInfoHelper.js.map +1 -0
  167. package/dist/utils/MediaHelper.d.ts +20 -0
  168. package/dist/utils/MediaHelper.d.ts.map +1 -0
  169. package/dist/utils/MediaHelper.js +92 -0
  170. package/dist/utils/MediaHelper.js.map +1 -0
  171. package/dist/utils/NotificationSupport.d.ts +22 -0
  172. package/dist/utils/NotificationSupport.d.ts.map +1 -0
  173. package/dist/utils/NotificationSupport.js +211 -0
  174. package/dist/utils/NotificationSupport.js.map +1 -0
  175. package/dist/utils/StorageHelper.d.ts +65 -0
  176. package/dist/utils/StorageHelper.d.ts.map +1 -0
  177. package/dist/utils/StorageHelper.js +273 -0
  178. package/dist/utils/StorageHelper.js.map +1 -0
  179. package/feeddo-react-native.podspec +26 -0
  180. package/ios/FeeddoReactNativeModule.h +8 -0
  181. package/ios/FeeddoReactNativeModule.m +831 -0
  182. package/package.json +56 -4
  183. package/src/Feeddo.ts +247 -0
  184. package/src/FeeddoClient.ts +895 -0
  185. package/src/FeeddoProvider.tsx +139 -0
  186. package/src/config/FeeddoConfig.ts +9 -0
  187. package/src/index.ts +67 -0
  188. package/src/models/Conversation.ts +50 -0
  189. package/src/models/EndUser.ts +65 -0
  190. package/src/models/FeeddoNotification.ts +29 -0
  191. package/src/models/HomeData.ts +33 -0
  192. package/src/models/Message.ts +36 -0
  193. package/src/models/PushProvider.ts +15 -0
  194. package/src/models/Task.ts +40 -0
  195. package/src/models/TaskComment.ts +36 -0
  196. package/src/models/Ticket.ts +25 -0
  197. package/src/native/FeeddoNative.ts +80 -0
  198. package/src/push/FeeddoPushNotificationApns.ts +362 -0
  199. package/src/services/ApiService.ts +456 -0
  200. package/src/services/ConversationService.ts +305 -0
  201. package/src/services/WebSocketService.ts +185 -0
  202. package/src/theme/FeeddoTheme.ts +85 -0
  203. package/src/ui/FeeddoFeedbackCard.tsx +245 -0
  204. package/src/ui/FeeddoModal.tsx +309 -0
  205. package/src/ui/components/AttachmentPreview.tsx +192 -0
  206. package/src/ui/components/ChatInputArea.tsx +154 -0
  207. package/src/ui/components/FeeddoIcon.tsx +903 -0
  208. package/src/ui/components/FeeddoNotificationBadge.tsx +234 -0
  209. package/src/ui/components/MessageBubble.tsx +223 -0
  210. package/src/ui/components/NotificationsSheet.tsx +324 -0
  211. package/src/ui/components/RatingWidget.tsx +64 -0
  212. package/src/ui/components/TaskCard.tsx +259 -0
  213. package/src/ui/components/TaskDetailsSheet.tsx +747 -0
  214. package/src/ui/components/TicketCard.tsx +128 -0
  215. package/src/ui/components/TicketDetailsSheet.tsx +324 -0
  216. package/src/ui/components/TypingIndicator.tsx +104 -0
  217. package/src/ui/screens/FeeddoChatScreen.tsx +877 -0
  218. package/src/ui/screens/FeeddoHomeScreen.tsx +824 -0
  219. package/src/ui/screens/FeeddoMessagesScreen.tsx +414 -0
  220. package/src/ui/screens/FeeddoTasksScreen.tsx +671 -0
  221. package/src/ui/screens/FeeddoTicketsScreen.tsx +164 -0
  222. package/src/utils/DeviceInfoHelper.ts +209 -0
  223. package/src/utils/MediaHelper.ts +105 -0
  224. package/src/utils/NotificationSupport.ts +233 -0
  225. package/src/utils/StorageHelper.ts +305 -0
@@ -0,0 +1,903 @@
1
+ import React from 'react';
2
+ import { View, Text, StyleSheet } from 'react-native';
3
+
4
+ export type FeeddoIconName =
5
+ | 'edit'
6
+ | 'send'
7
+ | 'arrow_up'
8
+ | 'arrow_down'
9
+ | 'arrow_back'
10
+ | 'arrow_forward'
11
+ | 'chevron_right'
12
+ | 'close'
13
+ | 'notifications'
14
+ | 'chat'
15
+ | 'lightbulb'
16
+ | 'ticket'
17
+ | 'bug'
18
+ | 'tune'
19
+ | 'add'
20
+ | 'star'
21
+ | 'star_border'
22
+ | 'check'
23
+ | 'check_circle'
24
+ | 'attach'
25
+ | 'person'
26
+ | 'code'
27
+ | 'inbox'
28
+ | 'error'
29
+ | 'info'
30
+ | 'pending'
31
+ | 'play'
32
+ | 'add_comment';
33
+
34
+ interface FeeddoIconProps {
35
+ name: FeeddoIconName;
36
+ size?: number;
37
+ color?: string;
38
+ }
39
+
40
+ // -------------------------------------------------------------
41
+ // Real Vector Icon Implementations matching Flutter Material UI
42
+ // -------------------------------------------------------------
43
+
44
+ const BellIcon = ({ size, color }: { size: number; color: string }) => {
45
+ const stroke = Math.max(1.5, size * 0.08);
46
+ const w = size * 0.65;
47
+ const h = size * 0.7;
48
+ return (
49
+ <View style={{ width: size, height: size, alignItems: 'center', justifyContent: 'center' }}>
50
+ {/* Top hanger loop */}
51
+ <View
52
+ style={{
53
+ width: size * 0.16,
54
+ height: size * 0.12,
55
+ borderTopLeftRadius: size * 0.08,
56
+ borderTopRightRadius: size * 0.08,
57
+ borderWidth: stroke,
58
+ borderBottomWidth: 0,
59
+ borderColor: color,
60
+ }}
61
+ />
62
+ {/* Dome body */}
63
+ <View
64
+ style={{
65
+ width: w,
66
+ height: h * 0.68,
67
+ borderTopLeftRadius: w / 2,
68
+ borderTopRightRadius: w / 2,
69
+ borderBottomLeftRadius: 2,
70
+ borderBottomRightRadius: 2,
71
+ borderWidth: stroke,
72
+ borderColor: color,
73
+ borderBottomWidth: 0,
74
+ }}
75
+ />
76
+ {/* Bottom lip */}
77
+ <View
78
+ style={{
79
+ width: size * 0.76,
80
+ height: stroke,
81
+ backgroundColor: color,
82
+ borderRadius: stroke / 2,
83
+ }}
84
+ />
85
+ {/* Clapper */}
86
+ <View
87
+ style={{
88
+ width: size * 0.2,
89
+ height: size * 0.1,
90
+ borderBottomLeftRadius: size * 0.1,
91
+ borderBottomRightRadius: size * 0.1,
92
+ backgroundColor: color,
93
+ marginTop: 1,
94
+ }}
95
+ />
96
+ </View>
97
+ );
98
+ };
99
+
100
+ const ChatIcon = ({ size, color }: { size: number; color: string }) => {
101
+ const stroke = Math.max(1.5, size * 0.08);
102
+ const w = size * 0.82;
103
+ const h = size * 0.64;
104
+ return (
105
+ <View style={{ width: size, height: size, alignItems: 'center', justifyContent: 'center' }}>
106
+ <View
107
+ style={{
108
+ width: w,
109
+ height: h,
110
+ borderRadius: size * 0.18,
111
+ borderWidth: stroke,
112
+ borderColor: color,
113
+ position: 'relative',
114
+ }}
115
+ >
116
+ {/* Tail */}
117
+ <View
118
+ style={{
119
+ position: 'absolute',
120
+ bottom: -stroke * 2.2,
121
+ left: size * 0.1,
122
+ width: 0,
123
+ height: 0,
124
+ borderTopWidth: size * 0.18,
125
+ borderTopColor: color,
126
+ borderRightWidth: size * 0.16,
127
+ borderRightColor: 'transparent',
128
+ }}
129
+ />
130
+ </View>
131
+ </View>
132
+ );
133
+ };
134
+
135
+ const LightbulbIcon = ({ size, color }: { size: number; color: string }) => {
136
+ const stroke = Math.max(1.5, size * 0.08);
137
+ const radius = size * 0.28;
138
+ return (
139
+ <View style={{ width: size, height: size, alignItems: 'center', justifyContent: 'center' }}>
140
+ {/* Bulb globe */}
141
+ <View
142
+ style={{
143
+ width: radius * 2,
144
+ height: radius * 2,
145
+ borderRadius: radius,
146
+ borderWidth: stroke,
147
+ borderColor: color,
148
+ }}
149
+ />
150
+ {/* Base neck */}
151
+ <View
152
+ style={{
153
+ width: size * 0.28,
154
+ height: size * 0.14,
155
+ borderLeftWidth: stroke,
156
+ borderRightWidth: stroke,
157
+ borderColor: color,
158
+ marginTop: -stroke,
159
+ }}
160
+ />
161
+ {/* Contact tip */}
162
+ <View
163
+ style={{
164
+ width: size * 0.2,
165
+ height: size * 0.08,
166
+ borderBottomLeftRadius: 2,
167
+ borderBottomRightRadius: 2,
168
+ backgroundColor: color,
169
+ marginTop: 1,
170
+ }}
171
+ />
172
+ </View>
173
+ );
174
+ };
175
+
176
+ const TicketIcon = ({ size, color }: { size: number; color: string }) => {
177
+ const stroke = Math.max(1.5, size * 0.08);
178
+ const w = size * 0.86;
179
+ const h = size * 0.58;
180
+ const notch = size * 0.14;
181
+ return (
182
+ <View style={{ width: size, height: size, alignItems: 'center', justifyContent: 'center' }}>
183
+ <View
184
+ style={{
185
+ width: w,
186
+ height: h,
187
+ borderRadius: 3,
188
+ borderWidth: stroke,
189
+ borderColor: color,
190
+ flexDirection: 'row',
191
+ alignItems: 'center',
192
+ justifyContent: 'space-between',
193
+ overflow: 'hidden',
194
+ }}
195
+ >
196
+ {/* Left notch cutout */}
197
+ <View
198
+ style={{
199
+ width: notch,
200
+ height: notch * 2,
201
+ borderRadius: notch,
202
+ borderWidth: stroke,
203
+ borderColor: color,
204
+ marginLeft: -notch - stroke,
205
+ }}
206
+ />
207
+ {/* Perforated center divider */}
208
+ <View
209
+ style={{
210
+ width: stroke,
211
+ height: '60%',
212
+ borderStyle: 'dashed',
213
+ borderLeftWidth: stroke,
214
+ borderLeftColor: color,
215
+ }}
216
+ />
217
+ {/* Right notch cutout */}
218
+ <View
219
+ style={{
220
+ width: notch,
221
+ height: notch * 2,
222
+ borderRadius: notch,
223
+ borderWidth: stroke,
224
+ borderColor: color,
225
+ marginRight: -notch - stroke,
226
+ }}
227
+ />
228
+ </View>
229
+ </View>
230
+ );
231
+ };
232
+
233
+ const BugIcon = ({ size, color }: { size: number; color: string }) => {
234
+ const stroke = Math.max(1.5, size * 0.08);
235
+ return (
236
+ <View style={{ width: size, height: size, alignItems: 'center', justifyContent: 'center' }}>
237
+ {/* Antennae */}
238
+ <View style={{ flexDirection: 'row', width: size * 0.44, justifyContent: 'space-between' }}>
239
+ <View style={{ width: stroke, height: size * 0.14, backgroundColor: color, transform: [{ rotate: '-30deg' }] }} />
240
+ <View style={{ width: stroke, height: size * 0.14, backgroundColor: color, transform: [{ rotate: '30deg' }] }} />
241
+ </View>
242
+ {/* Head */}
243
+ <View
244
+ style={{
245
+ width: size * 0.36,
246
+ height: size * 0.14,
247
+ borderTopLeftRadius: size * 0.18,
248
+ borderTopRightRadius: size * 0.18,
249
+ backgroundColor: color,
250
+ marginTop: -1,
251
+ }}
252
+ />
253
+ {/* Body with legs */}
254
+ <View style={{ flexDirection: 'row', alignItems: 'center', marginTop: 1 }}>
255
+ <View style={{ gap: 3, marginRight: 2 }}>
256
+ <View style={{ width: size * 0.12, height: stroke, backgroundColor: color }} />
257
+ <View style={{ width: size * 0.12, height: stroke, backgroundColor: color }} />
258
+ </View>
259
+ <View
260
+ style={{
261
+ width: size * 0.44,
262
+ height: size * 0.44,
263
+ borderRadius: size * 0.22,
264
+ borderWidth: stroke,
265
+ borderColor: color,
266
+ alignItems: 'center',
267
+ }}
268
+ >
269
+ <View style={{ width: stroke, height: '100%', backgroundColor: color }} />
270
+ </View>
271
+ <View style={{ gap: 3, marginLeft: 2 }}>
272
+ <View style={{ width: size * 0.12, height: stroke, backgroundColor: color }} />
273
+ <View style={{ width: size * 0.12, height: stroke, backgroundColor: color }} />
274
+ </View>
275
+ </View>
276
+ </View>
277
+ );
278
+ };
279
+
280
+ const InboxIcon = ({ size, color }: { size: number; color: string }) => {
281
+ const stroke = Math.max(1.5, size * 0.08);
282
+ const w = size * 0.84;
283
+ const h = size * 0.64;
284
+ return (
285
+ <View style={{ width: size, height: size, alignItems: 'center', justifyContent: 'center' }}>
286
+ <View
287
+ style={{
288
+ width: w,
289
+ height: h,
290
+ borderRadius: 3,
291
+ borderWidth: stroke,
292
+ borderColor: color,
293
+ justifyContent: 'flex-end',
294
+ }}
295
+ >
296
+ <View
297
+ style={{
298
+ height: h * 0.44,
299
+ borderTopWidth: stroke,
300
+ borderTopColor: color,
301
+ flexDirection: 'row',
302
+ alignItems: 'flex-start',
303
+ justifyContent: 'center',
304
+ }}
305
+ >
306
+ <View
307
+ style={{
308
+ width: w * 0.42,
309
+ height: stroke * 2.4,
310
+ borderBottomLeftRadius: 3,
311
+ borderBottomRightRadius: 3,
312
+ borderWidth: stroke,
313
+ borderTopWidth: 0,
314
+ borderColor: color,
315
+ }}
316
+ />
317
+ </View>
318
+ </View>
319
+ </View>
320
+ );
321
+ };
322
+
323
+ const CloseIcon = ({ size, color }: { size: number; color: string }) => {
324
+ const stroke = Math.max(1.5, size * 0.09);
325
+ const length = size * 0.65;
326
+ return (
327
+ <View style={{ width: size, height: size, alignItems: 'center', justifyContent: 'center' }}>
328
+ <View
329
+ style={{
330
+ position: 'absolute',
331
+ width: length,
332
+ height: stroke,
333
+ backgroundColor: color,
334
+ borderRadius: stroke / 2,
335
+ transform: [{ rotate: '45deg' }],
336
+ }}
337
+ />
338
+ <View
339
+ style={{
340
+ position: 'absolute',
341
+ width: length,
342
+ height: stroke,
343
+ backgroundColor: color,
344
+ borderRadius: stroke / 2,
345
+ transform: [{ rotate: '-45deg' }],
346
+ }}
347
+ />
348
+ </View>
349
+ );
350
+ };
351
+
352
+ const ArrowBackIcon = ({ size, color }: { size: number; color: string }) => {
353
+ const stroke = Math.max(1.5, size * 0.09);
354
+ const arm = size * 0.32;
355
+ return (
356
+ <View style={{ width: size, height: size, alignItems: 'center', justifyContent: 'center' }}>
357
+ <View
358
+ style={{
359
+ width: size * 0.62,
360
+ height: stroke,
361
+ backgroundColor: color,
362
+ borderRadius: stroke / 2,
363
+ marginLeft: size * 0.1,
364
+ }}
365
+ />
366
+ <View
367
+ style={{
368
+ position: 'absolute',
369
+ left: size * 0.16,
370
+ width: arm,
371
+ height: arm,
372
+ borderLeftWidth: stroke,
373
+ borderTopWidth: stroke,
374
+ borderColor: color,
375
+ borderTopLeftRadius: 1,
376
+ transform: [{ rotate: '-45deg' }],
377
+ }}
378
+ />
379
+ </View>
380
+ );
381
+ };
382
+
383
+ const ArrowForwardIcon = ({ size, color }: { size: number; color: string }) => {
384
+ const stroke = Math.max(1.5, size * 0.09);
385
+ const arm = size * 0.32;
386
+ return (
387
+ <View style={{ width: size, height: size, alignItems: 'center', justifyContent: 'center' }}>
388
+ <View
389
+ style={{
390
+ width: size * 0.62,
391
+ height: stroke,
392
+ backgroundColor: color,
393
+ borderRadius: stroke / 2,
394
+ marginRight: size * 0.1,
395
+ }}
396
+ />
397
+ <View
398
+ style={{
399
+ position: 'absolute',
400
+ right: size * 0.16,
401
+ width: arm,
402
+ height: arm,
403
+ borderRightWidth: stroke,
404
+ borderTopWidth: stroke,
405
+ borderColor: color,
406
+ borderTopRightRadius: 1,
407
+ transform: [{ rotate: '45deg' }],
408
+ }}
409
+ />
410
+ </View>
411
+ );
412
+ };
413
+
414
+ const ArrowUpIcon = ({ size, color }: { size: number; color: string }) => {
415
+ const stroke = Math.max(1.5, size * 0.09);
416
+ const arm = size * 0.32;
417
+ return (
418
+ <View style={{ width: size, height: size, alignItems: 'center', justifyContent: 'center' }}>
419
+ <View
420
+ style={{
421
+ width: stroke,
422
+ height: size * 0.62,
423
+ backgroundColor: color,
424
+ borderRadius: stroke / 2,
425
+ marginTop: size * 0.1,
426
+ }}
427
+ />
428
+ <View
429
+ style={{
430
+ position: 'absolute',
431
+ top: size * 0.16,
432
+ width: arm,
433
+ height: arm,
434
+ borderLeftWidth: stroke,
435
+ borderTopWidth: stroke,
436
+ borderColor: color,
437
+ transform: [{ rotate: '45deg' }],
438
+ }}
439
+ />
440
+ </View>
441
+ );
442
+ };
443
+
444
+ const ArrowDownIcon = ({ size, color }: { size: number; color: string }) => {
445
+ const stroke = Math.max(1.5, size * 0.09);
446
+ const arm = size * 0.32;
447
+ return (
448
+ <View style={{ width: size, height: size, alignItems: 'center', justifyContent: 'center' }}>
449
+ <View
450
+ style={{
451
+ width: stroke,
452
+ height: size * 0.62,
453
+ backgroundColor: color,
454
+ borderRadius: stroke / 2,
455
+ marginBottom: size * 0.1,
456
+ }}
457
+ />
458
+ <View
459
+ style={{
460
+ position: 'absolute',
461
+ bottom: size * 0.16,
462
+ width: arm,
463
+ height: arm,
464
+ borderRightWidth: stroke,
465
+ borderBottomWidth: stroke,
466
+ borderColor: color,
467
+ transform: [{ rotate: '45deg' }],
468
+ }}
469
+ />
470
+ </View>
471
+ );
472
+ };
473
+
474
+ const ChevronRightIcon = ({ size, color }: { size: number; color: string }) => {
475
+ const stroke = Math.max(1.5, size * 0.1);
476
+ const arm = size * 0.34;
477
+ return (
478
+ <View style={{ width: size, height: size, alignItems: 'center', justifyContent: 'center' }}>
479
+ <View
480
+ style={{
481
+ width: arm,
482
+ height: arm,
483
+ borderRightWidth: stroke,
484
+ borderTopWidth: stroke,
485
+ borderColor: color,
486
+ borderTopRightRadius: 2,
487
+ transform: [{ rotate: '45deg' }],
488
+ marginRight: size * 0.08,
489
+ }}
490
+ />
491
+ </View>
492
+ );
493
+ };
494
+
495
+ const SendIcon = ({ size, color }: { size: number; color: string }) => {
496
+ const arm = size * 0.38;
497
+ return (
498
+ <View style={{ width: size, height: size, alignItems: 'center', justifyContent: 'center' }}>
499
+ <View
500
+ style={{
501
+ width: 0,
502
+ height: 0,
503
+ borderStyle: 'solid',
504
+ borderTopWidth: arm,
505
+ borderRightWidth: 0,
506
+ borderBottomWidth: arm,
507
+ borderLeftWidth: arm * 1.5,
508
+ borderTopColor: 'transparent',
509
+ borderRightColor: 'transparent',
510
+ borderBottomColor: 'transparent',
511
+ borderLeftColor: color,
512
+ marginLeft: size * 0.08,
513
+ }}
514
+ />
515
+ </View>
516
+ );
517
+ };
518
+
519
+ const EditIcon = ({ size, color }: { size: number; color: string }) => {
520
+ const stroke = Math.max(1.5, size * 0.08);
521
+ return (
522
+ <View style={{ width: size, height: size, alignItems: 'center', justifyContent: 'center' }}>
523
+ <View
524
+ style={{
525
+ width: size * 0.2,
526
+ height: size * 0.58,
527
+ borderRadius: 2,
528
+ borderWidth: stroke,
529
+ borderColor: color,
530
+ transform: [{ rotate: '45deg' }],
531
+ alignItems: 'center',
532
+ justifyContent: 'flex-start',
533
+ }}
534
+ >
535
+ <View style={{ width: '100%', height: size * 0.1, borderBottomWidth: stroke, borderColor: color }} />
536
+ </View>
537
+ </View>
538
+ );
539
+ };
540
+
541
+ const TuneIcon = ({ size, color }: { size: number; color: string }) => {
542
+ const stroke = Math.max(1.5, size * 0.08);
543
+ const knob = size * 0.22;
544
+ return (
545
+ <View style={{ width: size, height: size, justifyContent: 'space-around', paddingVertical: size * 0.15 }}>
546
+ <View style={{ flexDirection: 'row', alignItems: 'center', width: size }}>
547
+ <View style={{ flex: 1, height: stroke, backgroundColor: color }} />
548
+ <View style={{ width: knob, height: knob, borderRadius: knob / 2, backgroundColor: color, marginHorizontal: 2 }} />
549
+ <View style={{ width: size * 0.2, height: stroke, backgroundColor: color }} />
550
+ </View>
551
+ <View style={{ flexDirection: 'row', alignItems: 'center', width: size }}>
552
+ <View style={{ width: size * 0.25, height: stroke, backgroundColor: color }} />
553
+ <View style={{ width: knob, height: knob, borderRadius: knob / 2, backgroundColor: color, marginHorizontal: 2 }} />
554
+ <View style={{ flex: 1, height: stroke, backgroundColor: color }} />
555
+ </View>
556
+ </View>
557
+ );
558
+ };
559
+
560
+ const AddIcon = ({ size, color }: { size: number; color: string }) => {
561
+ const stroke = Math.max(1.5, size * 0.09);
562
+ const len = size * 0.65;
563
+ return (
564
+ <View style={{ width: size, height: size, alignItems: 'center', justifyContent: 'center' }}>
565
+ <View style={{ position: 'absolute', width: len, height: stroke, backgroundColor: color, borderRadius: stroke / 2 }} />
566
+ <View style={{ position: 'absolute', width: stroke, height: len, backgroundColor: color, borderRadius: stroke / 2 }} />
567
+ </View>
568
+ );
569
+ };
570
+
571
+ const CheckIcon = ({ size, color }: { size: number; color: string }) => {
572
+ const stroke = Math.max(1.5, size * 0.09);
573
+ return (
574
+ <View style={{ width: size, height: size, alignItems: 'center', justifyContent: 'center' }}>
575
+ <View
576
+ style={{
577
+ width: size * 0.5,
578
+ height: size * 0.28,
579
+ borderLeftWidth: stroke,
580
+ borderBottomWidth: stroke,
581
+ borderColor: color,
582
+ borderRadius: 1,
583
+ transform: [{ rotate: '-45deg' }],
584
+ marginBottom: size * 0.08,
585
+ }}
586
+ />
587
+ </View>
588
+ );
589
+ };
590
+
591
+ const CheckCircleIcon = ({ size, color }: { size: number; color: string }) => {
592
+ const stroke = Math.max(1.5, size * 0.08);
593
+ return (
594
+ <View
595
+ style={{
596
+ width: size,
597
+ height: size,
598
+ borderRadius: size / 2,
599
+ borderWidth: stroke,
600
+ borderColor: color,
601
+ alignItems: 'center',
602
+ justifyContent: 'center',
603
+ }}
604
+ >
605
+ <View
606
+ style={{
607
+ width: size * 0.42,
608
+ height: size * 0.24,
609
+ borderLeftWidth: stroke,
610
+ borderBottomWidth: stroke,
611
+ borderColor: color,
612
+ borderRadius: 1,
613
+ transform: [{ rotate: '-45deg' }],
614
+ marginBottom: size * 0.06,
615
+ }}
616
+ />
617
+ </View>
618
+ );
619
+ };
620
+
621
+ const AttachIcon = ({ size, color }: { size: number; color: string }) => {
622
+ const stroke = Math.max(1.5, size * 0.08);
623
+ return (
624
+ <View style={{ width: size, height: size, alignItems: 'center', justifyContent: 'center' }}>
625
+ <View
626
+ style={{
627
+ width: size * 0.36,
628
+ height: size * 0.65,
629
+ borderRadius: size * 0.18,
630
+ borderWidth: stroke,
631
+ borderColor: color,
632
+ transform: [{ rotate: '45deg' }],
633
+ justifyContent: 'flex-start',
634
+ alignItems: 'center',
635
+ paddingTop: 2,
636
+ }}
637
+ >
638
+ <View
639
+ style={{
640
+ width: size * 0.18,
641
+ height: size * 0.32,
642
+ borderRadius: size * 0.09,
643
+ borderWidth: stroke,
644
+ borderBottomWidth: 0,
645
+ borderColor: color,
646
+ }}
647
+ />
648
+ </View>
649
+ </View>
650
+ );
651
+ };
652
+
653
+ const PersonIcon = ({ size, color }: { size: number; color: string }) => {
654
+ const stroke = Math.max(1.5, size * 0.08);
655
+ const headSize = size * 0.36;
656
+ return (
657
+ <View style={{ width: size, height: size, alignItems: 'center', justifyContent: 'center' }}>
658
+ <View
659
+ style={{
660
+ width: headSize,
661
+ height: headSize,
662
+ borderRadius: headSize / 2,
663
+ borderWidth: stroke,
664
+ borderColor: color,
665
+ }}
666
+ />
667
+ <View
668
+ style={{
669
+ width: size * 0.72,
670
+ height: size * 0.32,
671
+ borderTopLeftRadius: size * 0.36,
672
+ borderTopRightRadius: size * 0.36,
673
+ borderWidth: stroke,
674
+ borderBottomWidth: 0,
675
+ borderColor: color,
676
+ marginTop: 2,
677
+ }}
678
+ />
679
+ </View>
680
+ );
681
+ };
682
+
683
+ const CodeIcon = ({ size, color }: { size: number; color: string }) => {
684
+ const stroke = Math.max(1.5, size * 0.08);
685
+ const arm = size * 0.22;
686
+ return (
687
+ <View style={{ width: size, height: size, flexDirection: 'row', alignItems: 'center', justifyContent: 'center', gap: 3 }}>
688
+ <View style={{ width: arm, height: arm, borderLeftWidth: stroke, borderBottomWidth: stroke, borderColor: color, transform: [{ rotate: '45deg' }] }} />
689
+ <View style={{ width: arm * 1.5, height: stroke, backgroundColor: color, transform: [{ rotate: '-65deg' }] }} />
690
+ <View style={{ width: arm, height: arm, borderRightWidth: stroke, borderTopWidth: stroke, borderColor: color, transform: [{ rotate: '45deg' }] }} />
691
+ </View>
692
+ );
693
+ };
694
+
695
+ const ErrorIcon = ({ size, color }: { size: number; color: string }) => {
696
+ const stroke = Math.max(1.5, size * 0.08);
697
+ return (
698
+ <View
699
+ style={{
700
+ width: size,
701
+ height: size,
702
+ borderRadius: size / 2,
703
+ borderWidth: stroke,
704
+ borderColor: color,
705
+ alignItems: 'center',
706
+ justifyContent: 'center',
707
+ }}
708
+ >
709
+ <View style={{ width: stroke, height: size * 0.32, backgroundColor: color, borderRadius: stroke / 2 }} />
710
+ <View style={{ width: stroke, height: stroke, backgroundColor: color, borderRadius: stroke / 2, marginTop: 2 }} />
711
+ </View>
712
+ );
713
+ };
714
+
715
+ const InfoIcon = ({ size, color }: { size: number; color: string }) => {
716
+ const stroke = Math.max(1.5, size * 0.08);
717
+ return (
718
+ <View
719
+ style={{
720
+ width: size,
721
+ height: size,
722
+ borderRadius: size / 2,
723
+ borderWidth: stroke,
724
+ borderColor: color,
725
+ alignItems: 'center',
726
+ justifyContent: 'center',
727
+ }}
728
+ >
729
+ <View style={{ width: stroke, height: stroke, backgroundColor: color, borderRadius: stroke / 2, marginBottom: 2 }} />
730
+ <View style={{ width: stroke, height: size * 0.32, backgroundColor: color, borderRadius: stroke / 2 }} />
731
+ </View>
732
+ );
733
+ };
734
+
735
+ const PendingIcon = ({ size, color }: { size: number; color: string }) => {
736
+ const stroke = Math.max(1.5, size * 0.08);
737
+ return (
738
+ <View
739
+ style={{
740
+ width: size,
741
+ height: size,
742
+ borderRadius: size / 2,
743
+ borderWidth: stroke,
744
+ borderColor: color,
745
+ alignItems: 'center',
746
+ justifyContent: 'center',
747
+ }}
748
+ >
749
+ <View style={{ position: 'absolute', width: stroke, height: size * 0.3, backgroundColor: color, top: size * 0.2 }} />
750
+ <View style={{ position: 'absolute', width: size * 0.24, height: stroke, backgroundColor: color, right: size * 0.25 }} />
751
+ </View>
752
+ );
753
+ };
754
+
755
+ const StarIcon = ({ size, color, filled }: { size: number; color: string; filled: boolean }) => {
756
+ return (
757
+ <View style={{ width: size, height: size, alignItems: 'center', justifyContent: 'center' }}>
758
+ <Text style={{ fontSize: size * 0.9, color, textAlign: 'center', lineHeight: size }}>
759
+ {filled ? '★' : '☆'}
760
+ </Text>
761
+ </View>
762
+ );
763
+ };
764
+
765
+ const PlayIcon = ({ size, color }: { size: number; color: string }) => {
766
+ const half = size * 0.34;
767
+ return (
768
+ <View style={{ width: size, height: size, alignItems: 'center', justifyContent: 'center' }}>
769
+ <View
770
+ style={{
771
+ width: 0,
772
+ height: 0,
773
+ borderStyle: 'solid',
774
+ borderTopWidth: half,
775
+ borderBottomWidth: half,
776
+ borderLeftWidth: half * 1.6,
777
+ borderTopColor: 'transparent',
778
+ borderBottomColor: 'transparent',
779
+ borderLeftColor: color,
780
+ marginLeft: size * 0.08,
781
+ }}
782
+ />
783
+ </View>
784
+ );
785
+ };
786
+
787
+ const AddCommentIcon = ({ size, color }: { size: number; color: string }) => {
788
+ const stroke = Math.max(1.5, size * 0.08);
789
+ const w = size * 0.82;
790
+ const h = size * 0.64;
791
+ const plus = size * 0.28;
792
+ return (
793
+ <View style={{ width: size, height: size, alignItems: 'center', justifyContent: 'center' }}>
794
+ <View
795
+ style={{
796
+ width: w,
797
+ height: h,
798
+ borderRadius: size * 0.16,
799
+ borderWidth: stroke,
800
+ borderColor: color,
801
+ alignItems: 'center',
802
+ justifyContent: 'center',
803
+ position: 'relative',
804
+ }}
805
+ >
806
+ <View style={{ width: plus, height: stroke, backgroundColor: color, borderRadius: stroke / 2 }} />
807
+ <View
808
+ style={{
809
+ position: 'absolute',
810
+ width: stroke,
811
+ height: plus,
812
+ backgroundColor: color,
813
+ borderRadius: stroke / 2,
814
+ }}
815
+ />
816
+ <View
817
+ style={{
818
+ position: 'absolute',
819
+ bottom: -stroke * 2.2,
820
+ left: size * 0.1,
821
+ width: 0,
822
+ height: 0,
823
+ borderTopWidth: size * 0.18,
824
+ borderTopColor: color,
825
+ borderRightWidth: size * 0.16,
826
+ borderRightColor: 'transparent',
827
+ }}
828
+ />
829
+ </View>
830
+ </View>
831
+ );
832
+ };
833
+
834
+ // -------------------------------------------------------------
835
+ // FeeddoIcon Main Component
836
+ // -------------------------------------------------------------
837
+
838
+ export const FeeddoIcon: React.FC<FeeddoIconProps> = ({
839
+ name,
840
+ size = 20,
841
+ color = '#FFFFFF',
842
+ }) => {
843
+ switch (name) {
844
+ case 'notifications':
845
+ return <BellIcon size={size} color={color} />;
846
+ case 'chat':
847
+ return <ChatIcon size={size} color={color} />;
848
+ case 'lightbulb':
849
+ return <LightbulbIcon size={size} color={color} />;
850
+ case 'ticket':
851
+ return <TicketIcon size={size} color={color} />;
852
+ case 'bug':
853
+ return <BugIcon size={size} color={color} />;
854
+ case 'inbox':
855
+ return <InboxIcon size={size} color={color} />;
856
+ case 'close':
857
+ return <CloseIcon size={size} color={color} />;
858
+ case 'arrow_back':
859
+ return <ArrowBackIcon size={size} color={color} />;
860
+ case 'arrow_forward':
861
+ return <ArrowForwardIcon size={size} color={color} />;
862
+ case 'arrow_up':
863
+ return <ArrowUpIcon size={size} color={color} />;
864
+ case 'arrow_down':
865
+ return <ArrowDownIcon size={size} color={color} />;
866
+ case 'chevron_right':
867
+ return <ChevronRightIcon size={size} color={color} />;
868
+ case 'send':
869
+ return <SendIcon size={size} color={color} />;
870
+ case 'edit':
871
+ return <EditIcon size={size} color={color} />;
872
+ case 'tune':
873
+ return <TuneIcon size={size} color={color} />;
874
+ case 'add':
875
+ return <AddIcon size={size} color={color} />;
876
+ case 'check':
877
+ return <CheckIcon size={size} color={color} />;
878
+ case 'check_circle':
879
+ return <CheckCircleIcon size={size} color={color} />;
880
+ case 'attach':
881
+ return <AttachIcon size={size} color={color} />;
882
+ case 'person':
883
+ return <PersonIcon size={size} color={color} />;
884
+ case 'code':
885
+ return <CodeIcon size={size} color={color} />;
886
+ case 'error':
887
+ return <ErrorIcon size={size} color={color} />;
888
+ case 'info':
889
+ return <InfoIcon size={size} color={color} />;
890
+ case 'pending':
891
+ return <PendingIcon size={size} color={color} />;
892
+ case 'star':
893
+ return <StarIcon size={size} color={color} filled={true} />;
894
+ case 'star_border':
895
+ return <StarIcon size={size} color={color} filled={false} />;
896
+ case 'play':
897
+ return <PlayIcon size={size} color={color} />;
898
+ case 'add_comment':
899
+ return <AddCommentIcon size={size} color={color} />;
900
+ default:
901
+ return <View style={{ width: size, height: size }} />;
902
+ }
903
+ };