@codeimplants/ui-kit 1.0.0

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 (474) hide show
  1. package/README.md +144 -0
  2. package/dist/adapters/index.d.ts +1 -0
  3. package/dist/adapters/index.js +2 -0
  4. package/dist/adapters/supportAdapter.d.ts +87 -0
  5. package/dist/adapters/supportAdapter.js +99 -0
  6. package/dist/client.d.ts +55 -0
  7. package/dist/client.js +229 -0
  8. package/dist/components/IconLibrary.d.ts +23 -0
  9. package/dist/components/IconLibrary.js +19 -0
  10. package/dist/components/RetryIndicator.d.ts +5 -0
  11. package/dist/components/RetryIndicator.js +208 -0
  12. package/dist/components/SupportContactCard.d.ts +10 -0
  13. package/dist/components/SupportContactCard.js +140 -0
  14. package/dist/components/buttons/PrimaryButton.d.ts +19 -0
  15. package/dist/components/buttons/PrimaryButton.js +42 -0
  16. package/dist/components/buttons/SecondaryButton.d.ts +20 -0
  17. package/dist/components/buttons/SecondaryButton.js +37 -0
  18. package/dist/components/buttons/index.d.ts +2 -0
  19. package/dist/components/buttons/index.js +3 -0
  20. package/dist/components/cards/ContentCard.d.ts +16 -0
  21. package/dist/components/cards/ContentCard.js +24 -0
  22. package/dist/components/cards/InfoCard.d.ts +9 -0
  23. package/dist/components/cards/InfoCard.js +51 -0
  24. package/dist/components/cards/TipsCard.d.ts +11 -0
  25. package/dist/components/cards/TipsCard.js +70 -0
  26. package/dist/components/cards/WarningCard.d.ts +11 -0
  27. package/dist/components/cards/WarningCard.js +80 -0
  28. package/dist/components/cards/WhatsNewCard.d.ts +15 -0
  29. package/dist/components/cards/WhatsNewCard.js +79 -0
  30. package/dist/components/cards/index.d.ts +5 -0
  31. package/dist/components/cards/index.js +6 -0
  32. package/dist/components/feedback/ExpandableSection.d.ts +8 -0
  33. package/dist/components/feedback/ExpandableSection.js +44 -0
  34. package/dist/components/feedback/SecurityBanner.d.ts +9 -0
  35. package/dist/components/feedback/SecurityBanner.js +49 -0
  36. package/dist/components/feedback/SpeedBadge.d.ts +9 -0
  37. package/dist/components/feedback/SpeedBadge.js +41 -0
  38. package/dist/components/feedback/StatusBadge.d.ts +17 -0
  39. package/dist/components/feedback/StatusBadge.js +20 -0
  40. package/dist/components/feedback/TopBanner.d.ts +7 -0
  41. package/dist/components/feedback/TopBanner.js +74 -0
  42. package/dist/components/feedback/index.d.ts +5 -0
  43. package/dist/components/feedback/index.js +6 -0
  44. package/dist/components/icons/AnimatedAlert.d.ts +11 -0
  45. package/dist/components/icons/AnimatedAlert.js +27 -0
  46. package/dist/components/icons/AnimatedCalendar.d.ts +7 -0
  47. package/dist/components/icons/AnimatedCalendar.js +34 -0
  48. package/dist/components/icons/AnimatedCamera.d.ts +7 -0
  49. package/dist/components/icons/AnimatedCamera.js +34 -0
  50. package/dist/components/icons/AnimatedClientError.d.ts +11 -0
  51. package/dist/components/icons/AnimatedClientError.js +20 -0
  52. package/dist/components/icons/AnimatedClock.d.ts +7 -0
  53. package/dist/components/icons/AnimatedClock.js +53 -0
  54. package/dist/components/icons/AnimatedCrash.d.ts +11 -0
  55. package/dist/components/icons/AnimatedCrash.js +36 -0
  56. package/dist/components/icons/AnimatedDocument.d.ts +7 -0
  57. package/dist/components/icons/AnimatedDocument.js +34 -0
  58. package/dist/components/icons/AnimatedDownload.d.ts +7 -0
  59. package/dist/components/icons/AnimatedDownload.js +23 -0
  60. package/dist/components/icons/AnimatedEmergency.d.ts +11 -0
  61. package/dist/components/icons/AnimatedEmergency.js +26 -0
  62. package/dist/components/icons/AnimatedInvalidData.d.ts +11 -0
  63. package/dist/components/icons/AnimatedInvalidData.js +24 -0
  64. package/dist/components/icons/AnimatedLightning.d.ts +7 -0
  65. package/dist/components/icons/AnimatedLightning.js +34 -0
  66. package/dist/components/icons/AnimatedLocationPin.d.ts +7 -0
  67. package/dist/components/icons/AnimatedLocationPin.js +34 -0
  68. package/dist/components/icons/AnimatedPermission.d.ts +11 -0
  69. package/dist/components/icons/AnimatedPermission.js +21 -0
  70. package/dist/components/icons/AnimatedPermissionDenied.d.ts +11 -0
  71. package/dist/components/icons/AnimatedPermissionDenied.js +27 -0
  72. package/dist/components/icons/AnimatedServerError.d.ts +7 -0
  73. package/dist/components/icons/AnimatedServerError.js +60 -0
  74. package/dist/components/icons/AnimatedShield.d.ts +7 -0
  75. package/dist/components/icons/AnimatedShield.js +34 -0
  76. package/dist/components/icons/AnimatedSparkle.d.ts +7 -0
  77. package/dist/components/icons/AnimatedSparkle.js +53 -0
  78. package/dist/components/icons/AnimatedSpeedGauge.d.ts +7 -0
  79. package/dist/components/icons/AnimatedSpeedGauge.js +50 -0
  80. package/dist/components/icons/AnimatedTimeout.d.ts +11 -0
  81. package/dist/components/icons/AnimatedTimeout.js +27 -0
  82. package/dist/components/icons/AnimatedWarning.d.ts +7 -0
  83. package/dist/components/icons/AnimatedWarning.js +50 -0
  84. package/dist/components/icons/AnimatedWifiOff.d.ts +7 -0
  85. package/dist/components/icons/AnimatedWifiOff.js +65 -0
  86. package/dist/components/icons/AnimatedWrench.d.ts +7 -0
  87. package/dist/components/icons/AnimatedWrench.js +43 -0
  88. package/dist/components/icons/ClockBadge.d.ts +8 -0
  89. package/dist/components/icons/ClockBadge.js +28 -0
  90. package/dist/components/icons/DownloadBadge.d.ts +8 -0
  91. package/dist/components/icons/DownloadBadge.js +28 -0
  92. package/dist/components/icons/IconWithBadge.d.ts +12 -0
  93. package/dist/components/icons/IconWithBadge.js +120 -0
  94. package/dist/components/icons/SimpleIcons.d.ts +12 -0
  95. package/dist/components/icons/SimpleIcons.js +8 -0
  96. package/dist/components/icons/XBadge.d.ts +8 -0
  97. package/dist/components/icons/XBadge.js +28 -0
  98. package/dist/components/icons/animated/errors/AnimatedClientError.d.ts +11 -0
  99. package/dist/components/icons/animated/errors/AnimatedClientError.js +20 -0
  100. package/dist/components/icons/animated/errors/AnimatedCrash.d.ts +11 -0
  101. package/dist/components/icons/animated/errors/AnimatedCrash.js +36 -0
  102. package/dist/components/icons/animated/errors/AnimatedInvalidData.d.ts +11 -0
  103. package/dist/components/icons/animated/errors/AnimatedInvalidData.js +24 -0
  104. package/dist/components/icons/animated/errors/AnimatedServerError.d.ts +7 -0
  105. package/dist/components/icons/animated/errors/AnimatedServerError.js +60 -0
  106. package/dist/components/icons/animated/errors/index.d.ts +4 -0
  107. package/dist/components/icons/animated/errors/index.js +5 -0
  108. package/dist/components/icons/animated/general/AnimatedCalendar.d.ts +7 -0
  109. package/dist/components/icons/animated/general/AnimatedCalendar.js +34 -0
  110. package/dist/components/icons/animated/general/AnimatedCamera.d.ts +7 -0
  111. package/dist/components/icons/animated/general/AnimatedCamera.js +34 -0
  112. package/dist/components/icons/animated/general/AnimatedClock.d.ts +7 -0
  113. package/dist/components/icons/animated/general/AnimatedClock.js +53 -0
  114. package/dist/components/icons/animated/general/AnimatedDocument.d.ts +7 -0
  115. package/dist/components/icons/animated/general/AnimatedDocument.js +34 -0
  116. package/dist/components/icons/animated/general/AnimatedDownload.d.ts +7 -0
  117. package/dist/components/icons/animated/general/AnimatedDownload.js +23 -0
  118. package/dist/components/icons/animated/general/AnimatedLightning.d.ts +7 -0
  119. package/dist/components/icons/animated/general/AnimatedLightning.js +34 -0
  120. package/dist/components/icons/animated/general/AnimatedLocationPin.d.ts +7 -0
  121. package/dist/components/icons/animated/general/AnimatedLocationPin.js +34 -0
  122. package/dist/components/icons/animated/general/AnimatedShield.d.ts +7 -0
  123. package/dist/components/icons/animated/general/AnimatedShield.js +34 -0
  124. package/dist/components/icons/animated/general/AnimatedSparkle.d.ts +7 -0
  125. package/dist/components/icons/animated/general/AnimatedSparkle.js +53 -0
  126. package/dist/components/icons/animated/general/AnimatedWarning.d.ts +7 -0
  127. package/dist/components/icons/animated/general/AnimatedWarning.js +50 -0
  128. package/dist/components/icons/animated/general/index.d.ts +10 -0
  129. package/dist/components/icons/animated/general/index.js +11 -0
  130. package/dist/components/icons/animated/index.d.ts +5 -0
  131. package/dist/components/icons/animated/index.js +6 -0
  132. package/dist/components/icons/animated/maintenance/AnimatedAlert.d.ts +11 -0
  133. package/dist/components/icons/animated/maintenance/AnimatedAlert.js +27 -0
  134. package/dist/components/icons/animated/maintenance/AnimatedEmergency.d.ts +11 -0
  135. package/dist/components/icons/animated/maintenance/AnimatedEmergency.js +26 -0
  136. package/dist/components/icons/animated/maintenance/AnimatedWrench.d.ts +7 -0
  137. package/dist/components/icons/animated/maintenance/AnimatedWrench.js +43 -0
  138. package/dist/components/icons/animated/maintenance/index.d.ts +3 -0
  139. package/dist/components/icons/animated/maintenance/index.js +4 -0
  140. package/dist/components/icons/animated/network/AnimatedSpeedGauge.d.ts +7 -0
  141. package/dist/components/icons/animated/network/AnimatedSpeedGauge.js +50 -0
  142. package/dist/components/icons/animated/network/AnimatedTimeout.d.ts +11 -0
  143. package/dist/components/icons/animated/network/AnimatedTimeout.js +27 -0
  144. package/dist/components/icons/animated/network/AnimatedWifiOff.d.ts +7 -0
  145. package/dist/components/icons/animated/network/AnimatedWifiOff.js +65 -0
  146. package/dist/components/icons/animated/network/index.d.ts +3 -0
  147. package/dist/components/icons/animated/network/index.js +4 -0
  148. package/dist/components/icons/animated/permissions/AnimatedPermission.d.ts +11 -0
  149. package/dist/components/icons/animated/permissions/AnimatedPermission.js +21 -0
  150. package/dist/components/icons/animated/permissions/AnimatedPermissionDenied.d.ts +11 -0
  151. package/dist/components/icons/animated/permissions/AnimatedPermissionDenied.js +27 -0
  152. package/dist/components/icons/animated/permissions/index.d.ts +2 -0
  153. package/dist/components/icons/animated/permissions/index.js +3 -0
  154. package/dist/components/icons/badges/ClockBadge.d.ts +8 -0
  155. package/dist/components/icons/badges/ClockBadge.js +28 -0
  156. package/dist/components/icons/badges/DownloadBadge.d.ts +8 -0
  157. package/dist/components/icons/badges/DownloadBadge.js +28 -0
  158. package/dist/components/icons/badges/XBadge.d.ts +8 -0
  159. package/dist/components/icons/badges/XBadge.js +28 -0
  160. package/dist/components/icons/badges/index.d.ts +3 -0
  161. package/dist/components/icons/badges/index.js +4 -0
  162. package/dist/components/icons/index.d.ts +3 -0
  163. package/dist/components/icons/index.js +4 -0
  164. package/dist/components/icons/utilities/AlertTriangleIcon.d.ts +7 -0
  165. package/dist/components/icons/utilities/AlertTriangleIcon.js +4 -0
  166. package/dist/components/icons/utilities/CheckCircleIcon.d.ts +7 -0
  167. package/dist/components/icons/utilities/CheckCircleIcon.js +4 -0
  168. package/dist/components/icons/utilities/DownloadIcon.d.ts +7 -0
  169. package/dist/components/icons/utilities/DownloadIcon.js +4 -0
  170. package/dist/components/icons/utilities/IconWithBadge.d.ts +12 -0
  171. package/dist/components/icons/utilities/IconWithBadge.js +120 -0
  172. package/dist/components/icons/utilities/SettingsIcon.d.ts +7 -0
  173. package/dist/components/icons/utilities/SettingsIcon.js +4 -0
  174. package/dist/components/icons/utilities/ShieldIcon.d.ts +7 -0
  175. package/dist/components/icons/utilities/ShieldIcon.js +4 -0
  176. package/dist/components/icons/utilities/SimpleIcons.d.ts +12 -0
  177. package/dist/components/icons/utilities/SimpleIcons.js +8 -0
  178. package/dist/components/icons/utilities/XIcon.d.ts +7 -0
  179. package/dist/components/icons/utilities/XIcon.js +4 -0
  180. package/dist/components/icons/utilities/index.d.ts +7 -0
  181. package/dist/components/icons/utilities/index.js +8 -0
  182. package/dist/components/index.d.ts +9 -0
  183. package/dist/components/index.js +10 -0
  184. package/dist/components/layout/DualButtonLayout.d.ts +14 -0
  185. package/dist/components/layout/DualButtonLayout.js +73 -0
  186. package/dist/components/layout/ResponsiveLayout.d.ts +25 -0
  187. package/dist/components/layout/ResponsiveLayout.js +76 -0
  188. package/dist/components/layout/SafeAreaWrapper.d.ts +21 -0
  189. package/dist/components/layout/SafeAreaWrapper.js +45 -0
  190. package/dist/components/layout/ScreenContainer.d.ts +15 -0
  191. package/dist/components/layout/ScreenContainer.js +21 -0
  192. package/dist/components/layout/index.d.ts +4 -0
  193. package/dist/components/layout/index.js +5 -0
  194. package/dist/components/lists/CheckListItem.d.ts +14 -0
  195. package/dist/components/lists/CheckListItem.js +40 -0
  196. package/dist/components/lists/StatusCheckList.d.ts +10 -0
  197. package/dist/components/lists/StatusCheckList.js +69 -0
  198. package/dist/components/lists/index.d.ts +2 -0
  199. package/dist/components/lists/index.js +3 -0
  200. package/dist/components/shared/CheckListItem.d.ts +14 -0
  201. package/dist/components/shared/CheckListItem.js +40 -0
  202. package/dist/components/shared/ConnectionStatus.d.ts +8 -0
  203. package/dist/components/shared/ConnectionStatus.js +57 -0
  204. package/dist/components/shared/ContentCard.d.ts +16 -0
  205. package/dist/components/shared/ContentCard.js +24 -0
  206. package/dist/components/shared/CountdownTimer.d.ts +9 -0
  207. package/dist/components/shared/CountdownTimer.js +91 -0
  208. package/dist/components/shared/DualButtonLayout.d.ts +14 -0
  209. package/dist/components/shared/DualButtonLayout.js +73 -0
  210. package/dist/components/shared/ExpandableSection.d.ts +8 -0
  211. package/dist/components/shared/ExpandableSection.js +44 -0
  212. package/dist/components/shared/IconWithBadge.d.ts +17 -0
  213. package/dist/components/shared/IconWithBadge.js +38 -0
  214. package/dist/components/shared/InfoCard.d.ts +9 -0
  215. package/dist/components/shared/InfoCard.js +51 -0
  216. package/dist/components/shared/PrimaryButton.d.ts +19 -0
  217. package/dist/components/shared/PrimaryButton.js +42 -0
  218. package/dist/components/shared/ResponsiveLayout.d.ts +25 -0
  219. package/dist/components/shared/ResponsiveLayout.js +76 -0
  220. package/dist/components/shared/RetryCounter.d.ts +8 -0
  221. package/dist/components/shared/RetryCounter.js +17 -0
  222. package/dist/components/shared/SafeAreaWrapper.d.ts +21 -0
  223. package/dist/components/shared/SafeAreaWrapper.js +45 -0
  224. package/dist/components/shared/ScreenContainer.d.ts +15 -0
  225. package/dist/components/shared/ScreenContainer.js +21 -0
  226. package/dist/components/shared/SecondaryButton.d.ts +20 -0
  227. package/dist/components/shared/SecondaryButton.js +37 -0
  228. package/dist/components/shared/SecurityBanner.d.ts +9 -0
  229. package/dist/components/shared/SecurityBanner.js +49 -0
  230. package/dist/components/shared/SpeedBadge.d.ts +9 -0
  231. package/dist/components/shared/SpeedBadge.js +41 -0
  232. package/dist/components/shared/StatusBadge.d.ts +17 -0
  233. package/dist/components/shared/StatusBadge.js +20 -0
  234. package/dist/components/shared/StatusCheckList.d.ts +10 -0
  235. package/dist/components/shared/StatusCheckList.js +69 -0
  236. package/dist/components/shared/SupportButtons.d.ts +9 -0
  237. package/dist/components/shared/SupportButtons.js +138 -0
  238. package/dist/components/shared/TipsCard.d.ts +11 -0
  239. package/dist/components/shared/TipsCard.js +70 -0
  240. package/dist/components/shared/TopBanner.d.ts +7 -0
  241. package/dist/components/shared/TopBanner.js +74 -0
  242. package/dist/components/shared/VersionDisplay.d.ts +14 -0
  243. package/dist/components/shared/VersionDisplay.js +30 -0
  244. package/dist/components/shared/WarningCard.d.ts +11 -0
  245. package/dist/components/shared/WarningCard.js +80 -0
  246. package/dist/components/shared/WhatsNewCard.d.ts +15 -0
  247. package/dist/components/shared/WhatsNewCard.js +79 -0
  248. package/dist/components/status/ConnectionStatus.d.ts +8 -0
  249. package/dist/components/status/ConnectionStatus.js +57 -0
  250. package/dist/components/status/VersionDisplay.d.ts +14 -0
  251. package/dist/components/status/VersionDisplay.js +30 -0
  252. package/dist/components/status/index.d.ts +2 -0
  253. package/dist/components/status/index.js +3 -0
  254. package/dist/components/support/SupportButtons.d.ts +9 -0
  255. package/dist/components/support/SupportButtons.js +138 -0
  256. package/dist/components/support/index.d.ts +1 -0
  257. package/dist/components/support/index.js +2 -0
  258. package/dist/components/timers/CountdownTimer.d.ts +9 -0
  259. package/dist/components/timers/CountdownTimer.js +91 -0
  260. package/dist/components/timers/RetryCounter.d.ts +8 -0
  261. package/dist/components/timers/RetryCounter.js +17 -0
  262. package/dist/components/timers/index.d.ts +2 -0
  263. package/dist/components/timers/index.js +3 -0
  264. package/dist/components/ui/Button.d.ts +38 -0
  265. package/dist/components/ui/Button.js +96 -0
  266. package/dist/components/ui/OfflineBanner.d.ts +15 -0
  267. package/dist/components/ui/OfflineBanner.js +42 -0
  268. package/dist/index.d.ts +68 -0
  269. package/dist/index.js +103 -0
  270. package/dist/screens/errors/ApiErrorScreen.d.ts +7 -0
  271. package/dist/screens/errors/ApiErrorScreen.js +166 -0
  272. package/dist/screens/errors/ClientErrorScreen.d.ts +9 -0
  273. package/dist/screens/errors/ClientErrorScreen.js +75 -0
  274. package/dist/screens/errors/ErrorBoundaryScreen.d.ts +9 -0
  275. package/dist/screens/errors/ErrorBoundaryScreen.js +43 -0
  276. package/dist/screens/errors/InvalidResponseScreen.d.ts +9 -0
  277. package/dist/screens/errors/InvalidResponseScreen.js +47 -0
  278. package/dist/screens/errors/ServerErrorScreen.d.ts +9 -0
  279. package/dist/screens/errors/ServerErrorScreen.js +72 -0
  280. package/dist/screens/errors/index.d.ts +5 -0
  281. package/dist/screens/errors/index.js +6 -0
  282. package/dist/screens/index.d.ts +4 -0
  283. package/dist/screens/index.js +5 -0
  284. package/dist/screens/network/ApiTimeoutScreen.d.ts +9 -0
  285. package/dist/screens/network/ApiTimeoutScreen.js +47 -0
  286. package/dist/screens/network/NetworkOfflineScreen.d.ts +9 -0
  287. package/dist/screens/network/NetworkOfflineScreen.js +42 -0
  288. package/dist/screens/network/NetworkSlowConnectionScreen.d.ts +9 -0
  289. package/dist/screens/network/NetworkSlowConnectionScreen.js +41 -0
  290. package/dist/screens/network/index.d.ts +3 -0
  291. package/dist/screens/network/index.js +4 -0
  292. package/dist/screens/permissions/PermissionDeniedScreen.d.ts +9 -0
  293. package/dist/screens/permissions/PermissionDeniedScreen.js +92 -0
  294. package/dist/screens/permissions/PermissionRequestScreen.d.ts +16 -0
  295. package/dist/screens/permissions/PermissionRequestScreen.js +303 -0
  296. package/dist/screens/permissions/PermissionScreen.d.ts +9 -0
  297. package/dist/screens/permissions/PermissionScreen.js +45 -0
  298. package/dist/screens/permissions/index.d.ts +3 -0
  299. package/dist/screens/permissions/index.js +4 -0
  300. package/dist/screens/system/AppUpdateScreen.d.ts +9 -0
  301. package/dist/screens/system/AppUpdateScreen.js +296 -0
  302. package/dist/screens/system/EmergencyOutageScreen.d.ts +9 -0
  303. package/dist/screens/system/EmergencyOutageScreen.js +48 -0
  304. package/dist/screens/system/ForceUpdateScreen.d.ts +9 -0
  305. package/dist/screens/system/ForceUpdateScreen.js +49 -0
  306. package/dist/screens/system/OptionalUpdateScreen.d.ts +9 -0
  307. package/dist/screens/system/OptionalUpdateScreen.js +47 -0
  308. package/dist/screens/system/PlannedMaintenanceScreen.d.ts +9 -0
  309. package/dist/screens/system/PlannedMaintenanceScreen.js +41 -0
  310. package/dist/screens/system/SecurityUpdateScreen.d.ts +9 -0
  311. package/dist/screens/system/SecurityUpdateScreen.js +64 -0
  312. package/dist/screens/system/ServiceUnavailableScreen.d.ts +15 -0
  313. package/dist/screens/system/ServiceUnavailableScreen.js +53 -0
  314. package/dist/screens/system/SoftUpdateScreen.d.ts +9 -0
  315. package/dist/screens/system/SoftUpdateScreen.js +55 -0
  316. package/dist/screens/system/SystemMaintenanceScreen.d.ts +9 -0
  317. package/dist/screens/system/SystemMaintenanceScreen.js +228 -0
  318. package/dist/screens/system/UnplannedOutageScreen.d.ts +9 -0
  319. package/dist/screens/system/UnplannedOutageScreen.js +42 -0
  320. package/dist/screens/system/index.d.ts +2 -0
  321. package/dist/screens/system/index.js +3 -0
  322. package/dist/screens/system/maintenance/EmergencyOutageScreen.d.ts +9 -0
  323. package/dist/screens/system/maintenance/EmergencyOutageScreen.js +48 -0
  324. package/dist/screens/system/maintenance/PlannedMaintenanceScreen.d.ts +9 -0
  325. package/dist/screens/system/maintenance/PlannedMaintenanceScreen.js +41 -0
  326. package/dist/screens/system/maintenance/ServiceUnavailableScreen.d.ts +15 -0
  327. package/dist/screens/system/maintenance/ServiceUnavailableScreen.js +53 -0
  328. package/dist/screens/system/maintenance/SystemMaintenanceScreen.d.ts +9 -0
  329. package/dist/screens/system/maintenance/SystemMaintenanceScreen.js +228 -0
  330. package/dist/screens/system/maintenance/UnplannedOutageScreen.d.ts +9 -0
  331. package/dist/screens/system/maintenance/UnplannedOutageScreen.js +42 -0
  332. package/dist/screens/system/maintenance/index.d.ts +5 -0
  333. package/dist/screens/system/maintenance/index.js +6 -0
  334. package/dist/screens/system/updates/AppUpdateScreen.d.ts +9 -0
  335. package/dist/screens/system/updates/AppUpdateScreen.js +296 -0
  336. package/dist/screens/system/updates/ForceUpdateScreen.d.ts +9 -0
  337. package/dist/screens/system/updates/ForceUpdateScreen.js +49 -0
  338. package/dist/screens/system/updates/OptionalUpdateScreen.d.ts +9 -0
  339. package/dist/screens/system/updates/OptionalUpdateScreen.js +47 -0
  340. package/dist/screens/system/updates/SecurityUpdateScreen.d.ts +9 -0
  341. package/dist/screens/system/updates/SecurityUpdateScreen.js +64 -0
  342. package/dist/screens/system/updates/SoftUpdateScreen.d.ts +9 -0
  343. package/dist/screens/system/updates/SoftUpdateScreen.js +55 -0
  344. package/dist/screens/system/updates/index.d.ts +5 -0
  345. package/dist/screens/system/updates/index.js +6 -0
  346. package/dist/types/common.d.ts +139 -0
  347. package/dist/types/common.js +4 -0
  348. package/dist/types/components.d.ts +52 -0
  349. package/dist/types/components.js +4 -0
  350. package/dist/types/index.d.ts +4 -0
  351. package/dist/types/index.js +8 -0
  352. package/dist/types/screens.d.ts +390 -0
  353. package/dist/types/screens.js +4 -0
  354. package/dist/types/support.d.ts +16 -0
  355. package/dist/types/support.js +4 -0
  356. package/dist/types.d.ts +580 -0
  357. package/dist/types.js +4 -0
  358. package/dist/utils/client.d.ts +55 -0
  359. package/dist/utils/client.js +229 -0
  360. package/dist/utils/index.d.ts +1 -0
  361. package/dist/utils/index.js +2 -0
  362. package/package.json +72 -0
  363. package/src/adapters/index.ts +2 -0
  364. package/src/adapters/supportAdapter.ts +167 -0
  365. package/src/components/buttons/PrimaryButton.tsx +82 -0
  366. package/src/components/buttons/SecondaryButton.tsx +81 -0
  367. package/src/components/buttons/index.ts +3 -0
  368. package/src/components/cards/ContentCard.tsx +53 -0
  369. package/src/components/cards/InfoCard.tsx +74 -0
  370. package/src/components/cards/TipsCard.tsx +106 -0
  371. package/src/components/cards/WarningCard.tsx +118 -0
  372. package/src/components/cards/WhatsNewCard.tsx +121 -0
  373. package/src/components/cards/index.ts +6 -0
  374. package/src/components/feedback/ExpandableSection.tsx +71 -0
  375. package/src/components/feedback/SecurityBanner.tsx +74 -0
  376. package/src/components/feedback/SpeedBadge.tsx +64 -0
  377. package/src/components/feedback/StatusBadge.tsx +50 -0
  378. package/src/components/feedback/TopBanner.tsx +104 -0
  379. package/src/components/feedback/index.ts +6 -0
  380. package/src/components/icons/animated/errors/AnimatedClientError.tsx +94 -0
  381. package/src/components/icons/animated/errors/AnimatedCrash.tsx +133 -0
  382. package/src/components/icons/animated/errors/AnimatedInvalidData.tsx +127 -0
  383. package/src/components/icons/animated/errors/AnimatedServerError.tsx +85 -0
  384. package/src/components/icons/animated/errors/index.ts +5 -0
  385. package/src/components/icons/animated/general/AnimatedCalendar.tsx +54 -0
  386. package/src/components/icons/animated/general/AnimatedCamera.tsx +54 -0
  387. package/src/components/icons/animated/general/AnimatedClock.tsx +78 -0
  388. package/src/components/icons/animated/general/AnimatedDocument.tsx +54 -0
  389. package/src/components/icons/animated/general/AnimatedDownload.tsx +61 -0
  390. package/src/components/icons/animated/general/AnimatedLightning.tsx +54 -0
  391. package/src/components/icons/animated/general/AnimatedLocationPin.tsx +54 -0
  392. package/src/components/icons/animated/general/AnimatedShield.tsx +54 -0
  393. package/src/components/icons/animated/general/AnimatedSparkle.tsx +74 -0
  394. package/src/components/icons/animated/general/AnimatedWarning.tsx +75 -0
  395. package/src/components/icons/animated/general/index.ts +11 -0
  396. package/src/components/icons/animated/index.ts +6 -0
  397. package/src/components/icons/animated/maintenance/AnimatedAlert.tsx +110 -0
  398. package/src/components/icons/animated/maintenance/AnimatedEmergency.tsx +112 -0
  399. package/src/components/icons/animated/maintenance/AnimatedWrench.tsx +64 -0
  400. package/src/components/icons/animated/maintenance/index.ts +4 -0
  401. package/src/components/icons/animated/network/AnimatedSpeedGauge.tsx +75 -0
  402. package/src/components/icons/animated/network/AnimatedTimeout.tsx +115 -0
  403. package/src/components/icons/animated/network/AnimatedWifiOff.tsx +93 -0
  404. package/src/components/icons/animated/network/index.ts +4 -0
  405. package/src/components/icons/animated/permissions/AnimatedPermission.tsx +74 -0
  406. package/src/components/icons/animated/permissions/AnimatedPermissionDenied.tsx +92 -0
  407. package/src/components/icons/animated/permissions/index.ts +3 -0
  408. package/src/components/icons/badges/ClockBadge.tsx +49 -0
  409. package/src/components/icons/badges/DownloadBadge.tsx +49 -0
  410. package/src/components/icons/badges/XBadge.tsx +49 -0
  411. package/src/components/icons/badges/index.ts +4 -0
  412. package/src/components/icons/index.ts +4 -0
  413. package/src/components/icons/utilities/AlertTriangleIcon.tsx +17 -0
  414. package/src/components/icons/utilities/CheckCircleIcon.tsx +16 -0
  415. package/src/components/icons/utilities/DownloadIcon.tsx +17 -0
  416. package/src/components/icons/utilities/IconWithBadge.tsx +166 -0
  417. package/src/components/icons/utilities/SettingsIcon.tsx +16 -0
  418. package/src/components/icons/utilities/ShieldIcon.tsx +15 -0
  419. package/src/components/icons/utilities/XIcon.tsx +16 -0
  420. package/src/components/icons/utilities/index.ts +8 -0
  421. package/src/components/index.ts +10 -0
  422. package/src/components/layout/DualButtonLayout.tsx +118 -0
  423. package/src/components/layout/ResponsiveLayout.tsx +118 -0
  424. package/src/components/layout/SafeAreaWrapper.tsx +72 -0
  425. package/src/components/layout/ScreenContainer.tsx +53 -0
  426. package/src/components/layout/index.ts +5 -0
  427. package/src/components/lists/CheckListItem.tsx +72 -0
  428. package/src/components/lists/StatusCheckList.tsx +101 -0
  429. package/src/components/lists/index.ts +3 -0
  430. package/src/components/status/ConnectionStatus.tsx +90 -0
  431. package/src/components/status/VersionDisplay.tsx +60 -0
  432. package/src/components/status/index.ts +3 -0
  433. package/src/components/support/SupportButtons.tsx +311 -0
  434. package/src/components/support/index.ts +2 -0
  435. package/src/components/timers/CountdownTimer.tsx +136 -0
  436. package/src/components/timers/RetryCounter.tsx +33 -0
  437. package/src/components/timers/index.ts +3 -0
  438. package/src/index.ts +125 -0
  439. package/src/screens/errors/ApiErrorScreen.tsx +276 -0
  440. package/src/screens/errors/ClientErrorScreen.tsx +135 -0
  441. package/src/screens/errors/ErrorBoundaryScreen.tsx +98 -0
  442. package/src/screens/errors/InvalidResponseScreen.tsx +104 -0
  443. package/src/screens/errors/ServerErrorScreen.tsx +139 -0
  444. package/src/screens/errors/index.ts +6 -0
  445. package/src/screens/index.ts +5 -0
  446. package/src/screens/network/ApiTimeoutScreen.tsx +104 -0
  447. package/src/screens/network/NetworkOfflineScreen.tsx +92 -0
  448. package/src/screens/network/NetworkSlowConnectionScreen.tsx +92 -0
  449. package/src/screens/network/index.ts +4 -0
  450. package/src/screens/permissions/PermissionDeniedScreen.tsx +176 -0
  451. package/src/screens/permissions/PermissionRequestScreen.tsx +506 -0
  452. package/src/screens/permissions/PermissionScreen.tsx +104 -0
  453. package/src/screens/permissions/index.ts +4 -0
  454. package/src/screens/system/index.ts +3 -0
  455. package/src/screens/system/maintenance/EmergencyOutageScreen.tsx +113 -0
  456. package/src/screens/system/maintenance/PlannedMaintenanceScreen.tsx +98 -0
  457. package/src/screens/system/maintenance/ServiceUnavailableScreen.tsx +133 -0
  458. package/src/screens/system/maintenance/SystemMaintenanceScreen.tsx +334 -0
  459. package/src/screens/system/maintenance/UnplannedOutageScreen.tsx +106 -0
  460. package/src/screens/system/maintenance/index.ts +6 -0
  461. package/src/screens/system/updates/AppUpdateScreen.tsx +440 -0
  462. package/src/screens/system/updates/ForceUpdateScreen.tsx +121 -0
  463. package/src/screens/system/updates/OptionalUpdateScreen.tsx +120 -0
  464. package/src/screens/system/updates/SecurityUpdateScreen.tsx +152 -0
  465. package/src/screens/system/updates/SoftUpdateScreen.tsx +137 -0
  466. package/src/screens/system/updates/index.ts +6 -0
  467. package/src/types/common.ts +203 -0
  468. package/src/types/components.ts +65 -0
  469. package/src/types/index.ts +9 -0
  470. package/src/types/reanimated.d.ts +38 -0
  471. package/src/types/screens.ts +428 -0
  472. package/src/types/support.ts +23 -0
  473. package/src/utils/client.ts +273 -0
  474. package/src/utils/index.ts +2 -0
@@ -0,0 +1,229 @@
1
+ import { Platform } from 'react-native';
2
+ let config = {
3
+ appVersion: '1.0.0',
4
+ supportPhone: '+919850929690',
5
+ colors: {
6
+ error: '#EF4444',
7
+ warning: '#F59E0B',
8
+ success: '#10B981',
9
+ offline: '#6B7280',
10
+ primary: '#3B82F6',
11
+ },
12
+ };
13
+ export const initializeUIKit = (customConfig) => {
14
+ config = { ...config, ...customConfig };
15
+ };
16
+ export const getConfig = () => config;
17
+ export const isWeb = () => {
18
+ return Platform.OS === 'web';
19
+ };
20
+ export const isIOS = () => {
21
+ return Platform.OS === 'ios';
22
+ };
23
+ export const isAndroid = () => {
24
+ return Platform.OS === 'android';
25
+ };
26
+ export const getPlatformName = () => {
27
+ return Platform.OS;
28
+ };
29
+ export const getOSInfo = () => {
30
+ if (isIOS())
31
+ return `iOS ${Platform.Version || 'Unknown'}`;
32
+ if (isAndroid())
33
+ return `Android ${Platform.Version || 'Unknown'}`;
34
+ if (isWeb()) {
35
+ // For web, we can try to detect from user agent
36
+ if (typeof navigator !== 'undefined') {
37
+ const ua = navigator.userAgent;
38
+ if (/Macintosh/.test(ua))
39
+ return 'macOS';
40
+ if (/Windows/.test(ua))
41
+ return 'Windows';
42
+ if (/Linux/.test(ua))
43
+ return 'Linux';
44
+ }
45
+ return 'Web';
46
+ }
47
+ return 'Unknown';
48
+ };
49
+ export const buildErrorContext = (errorMessage, options) => {
50
+ return {
51
+ errorMessage,
52
+ timestamp: new Date().toISOString(),
53
+ appVersion: config.appVersion || '1.0.0',
54
+ platform: getPlatformName(),
55
+ os: getOSInfo(),
56
+ ...options,
57
+ };
58
+ };
59
+ export const formatErrorForSupport = (context) => {
60
+ const maskedUserId = context.userId
61
+ ? `${context.userId.slice(0, 4)}****${context.userId.slice(-4)}`
62
+ : 'Guest';
63
+ return `
64
+ 🚨 *Support Request*
65
+
66
+ 📱 *App Version:* ${context.appVersion}
67
+ 💻 *Platform:* ${context.platform}
68
+ 🖥️ *OS:* ${context.os}
69
+ 👤 *User:* ${maskedUserId}
70
+ ⏰ *Time:* ${new Date(context.timestamp).toLocaleString()}
71
+
72
+ ❌ *Error:* ${context.errorMessage}
73
+ ${context.errorCode ? `📋 *Code:* ${context.errorCode}` : ''}
74
+ ${context.screenName ? `📍 *Screen:* ${context.screenName}` : ''}
75
+ ${context.retryCount ? `🔄 *Retry Count:* ${context.retryCount}` : ''}
76
+ `.trim();
77
+ };
78
+ export const getWhatsAppUrl = (context) => {
79
+ const phone = config.supportPhone?.replace(/[^0-9]/g, '') || '919850929690';
80
+ if (context) {
81
+ const message = encodeURIComponent(formatErrorForSupport(context));
82
+ return `https://wa.me/${phone}?text=${message}`;
83
+ }
84
+ return `https://wa.me/${phone}`;
85
+ };
86
+ /**
87
+ * Get phone URL for support
88
+ */
89
+ export const getPhoneUrl = () => {
90
+ return `tel:${config.supportPhone || '+919850929690'}`;
91
+ };
92
+ // ============================================================================
93
+ // Retry Logic Utilities
94
+ // ============================================================================
95
+ /**
96
+ * Calculate exponential backoff delay
97
+ */
98
+ export const calculateBackoffDelay = (attempt, baseDelay = 1000, maxDelay = 30000) => {
99
+ const delay = Math.min(baseDelay * Math.pow(2, attempt), maxDelay);
100
+ // Add jitter (±20%)
101
+ const jitter = delay * 0.2 * (Math.random() - 0.5);
102
+ return Math.round(delay + jitter);
103
+ };
104
+ /**
105
+ * Format delay time for display
106
+ */
107
+ export const formatDelayTime = (milliseconds) => {
108
+ const seconds = Math.ceil(milliseconds / 1000);
109
+ if (seconds < 60)
110
+ return `${seconds}s`;
111
+ const minutes = Math.floor(seconds / 60);
112
+ const remainingSeconds = seconds % 60;
113
+ return `${minutes}m ${remainingSeconds}s`;
114
+ };
115
+ // ============================================================================
116
+ // Network Utilities (UI Only - for display purposes)
117
+ // ============================================================================
118
+ /**
119
+ * Get connection speed label (UI only)
120
+ */
121
+ export const getConnectionSpeedLabel = (speed) => {
122
+ const labels = {
123
+ '2G': 'Very Slow (2G)',
124
+ '3G': 'Slow (3G)',
125
+ '4G': 'Good (4G)',
126
+ '5G': 'Excellent (5G)',
127
+ slow: 'Slow Connection',
128
+ fast: 'Fast Connection',
129
+ };
130
+ return labels[speed] || 'Unknown';
131
+ };
132
+ /**
133
+ * Get connection tips based on speed (UI only)
134
+ */
135
+ export const getConnectionTips = (speed) => {
136
+ const tips = {
137
+ '2G': [
138
+ 'Try moving to an area with better signal',
139
+ 'Connect to Wi-Fi if available',
140
+ 'Close other apps using internet',
141
+ ],
142
+ '3G': [
143
+ 'Consider switching to Wi-Fi',
144
+ 'Some features may load slowly',
145
+ 'Try again in a moment',
146
+ ],
147
+ slow: [
148
+ 'Check your internet connection',
149
+ 'Try moving closer to your router',
150
+ 'Restart your device if needed',
151
+ ],
152
+ };
153
+ return tips[speed] || tips.slow;
154
+ };
155
+ // ============================================================================
156
+ // Permission Utilities (UI Only)
157
+ // ============================================================================
158
+ /**
159
+ * Get permission display name
160
+ */
161
+ export const getPermissionDisplayName = (permission) => {
162
+ const names = {
163
+ camera: 'Camera',
164
+ location: 'Location',
165
+ notifications: 'Notifications',
166
+ storage: 'Storage',
167
+ microphone: 'Microphone',
168
+ contacts: 'Contacts',
169
+ calendar: 'Calendar',
170
+ };
171
+ return names[permission] || permission;
172
+ };
173
+ /**
174
+ * Get permission description
175
+ */
176
+ export const getPermissionDescription = (permission) => {
177
+ const descriptions = {
178
+ camera: 'Take photos and videos',
179
+ location: 'Access your location for better experience',
180
+ notifications: 'Receive important updates and alerts',
181
+ storage: 'Save and access files on your device',
182
+ microphone: 'Record audio and voice messages',
183
+ contacts: 'Find and connect with friends',
184
+ calendar: 'Sync events and reminders',
185
+ };
186
+ return descriptions[permission] || 'Required for app functionality';
187
+ };
188
+ // ============================================================================
189
+ // Color Utilities
190
+ // ============================================================================
191
+ /**
192
+ * Get color by type
193
+ */
194
+ export const getColor = (type) => {
195
+ return config.colors?.[type] || '#3B82F6';
196
+ };
197
+ /**
198
+ * Get color with opacity
199
+ */
200
+ export const getColorWithOpacity = (colorOrKey, opacity) => {
201
+ // Check if it's a hex color (starts with #) or a color key
202
+ const color = colorOrKey.startsWith('#') ? colorOrKey : getColor(colorOrKey);
203
+ const hex = color.replace('#', '');
204
+ const r = parseInt(hex.substring(0, 2), 16);
205
+ const g = parseInt(hex.substring(2, 4), 16);
206
+ const b = parseInt(hex.substring(4, 6), 16);
207
+ return `rgba(${r}, ${g}, ${b}, ${opacity})`;
208
+ };
209
+ // ============================================================================
210
+ // Dimension Utilities
211
+ // ============================================================================
212
+ /**
213
+ * Get responsive padding based on platform
214
+ */
215
+ export const getResponsivePadding = () => {
216
+ if (isWeb())
217
+ return 24;
218
+ if (isIOS())
219
+ return 20;
220
+ return 16; // Android
221
+ };
222
+ /**
223
+ * Get responsive font size
224
+ */
225
+ export const getResponsiveFontSize = (base) => {
226
+ if (isWeb())
227
+ return base;
228
+ return base; // Can be adjusted based on platform needs
229
+ };
@@ -0,0 +1 @@
1
+ export * from './client';
@@ -0,0 +1,2 @@
1
+ // Utils - Barrel Export
2
+ export * from './client';
package/package.json ADDED
@@ -0,0 +1,72 @@
1
+ {
2
+ "name": "@codeimplants/ui-kit",
3
+ "version": "1.0.0",
4
+ "description": "Enterprise-grade cross-platform UI components for error handling, network states, and user feedback",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.js",
11
+ "default": "./dist/index.js"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist",
16
+ "src"
17
+ ],
18
+ "publishConfig": {
19
+ "access": "public"
20
+ },
21
+ "scripts": {
22
+ "build": "tsc",
23
+ "dev": "tsc -w",
24
+ "clean": "rm -rf dist",
25
+ "start": "node dist/index.js",
26
+ "lint": "eslint src/",
27
+ "format": "prettier --write src/",
28
+ "prepublishOnly": "npm run build"
29
+ },
30
+ "keywords": [
31
+ "react-native",
32
+ "ui-components",
33
+ "error-handling",
34
+ "network-states",
35
+ "cross-platform",
36
+ "enterprise",
37
+ "ui-kit",
38
+ "error-screens",
39
+ "offline-handling",
40
+ "permissions",
41
+ "maintenance-screens",
42
+ "typescript"
43
+ ],
44
+ "author": "Code Implants Software Technologies Pvt. Ltd.",
45
+ "license": "MIT",
46
+ "peerDependencies": {
47
+ "react": ">=16.8.0",
48
+ "react-native": ">=0.60.0"
49
+ },
50
+ "peerDependenciesMeta": {
51
+ "react-native": {
52
+ "optional": true
53
+ }
54
+ },
55
+ "dependencies": {
56
+ "react-native-reanimated": "^3.6.0",
57
+ "react-native-svg": "^14.1.0"
58
+ },
59
+ "devDependencies": {
60
+ "@types/node": "^25.0.10",
61
+ "@types/react": "^19.2.10",
62
+ "@types/react-dom": "^19.2.3",
63
+ "@types/react-native": "^0.73.0",
64
+ "react": "^19.0.0",
65
+ "react-native": "^0.72.0",
66
+ "typescript": "^5.9.3"
67
+ },
68
+ "repository": {
69
+ "type": "git",
70
+ "url": "git+https://github.com/codeimplants/ui-kit.git"
71
+ }
72
+ }
@@ -0,0 +1,2 @@
1
+ // Adapters - Barrel Export
2
+ export * from './supportAdapter';
@@ -0,0 +1,167 @@
1
+ /**
2
+ * Support Adapter
3
+ *
4
+ * Clean adapter layer that connects UI Kit screens to Support package.
5
+ * UI screens remain agnostic of support implementation details.
6
+ */
7
+
8
+ /**
9
+ * Error Context Type
10
+ * Shared between ui-kit and support packages
11
+ */
12
+ export interface ErrorContext {
13
+ errorMessage: string;
14
+ errorCode?: string;
15
+ screenName?: string;
16
+ timestamp: string;
17
+ appVersion: string;
18
+ platform: 'web' | 'ios' | 'android';
19
+ os: string;
20
+ userId?: string;
21
+ retryCount?: number;
22
+ }
23
+
24
+ /**
25
+ * Retry Handler Type
26
+ *
27
+ * Future-proof interface for retry logic.
28
+ * Even if retry implementation changes internally, UI remains stable.
29
+ */
30
+ export type RetryHandler = () => Promise<void>;
31
+
32
+ /**
33
+ * Support Callback Handler
34
+ *
35
+ * Returns a callback function that can be passed to UI screens.
36
+ * The callback will be invoked with the support hook methods.
37
+ *
38
+ * @example
39
+ * ```tsx
40
+ * const supportHandler = createSupportHandler('ApiErrorScreen', errorContext);
41
+ *
42
+ * <ApiErrorScreen
43
+ * onRetry={retryHandler}
44
+ * support={{
45
+ * onWhatsApp: () => supportHandler((support) => support.openWhatsApp()),
46
+ * onEmail: () => supportHandler((support) => support.sendEmail()),
47
+ * onCall: () => supportHandler((support) => support.makeCall()),
48
+ * }}
49
+ * />
50
+ * ```
51
+ */
52
+ export interface SupportHandler {
53
+ /**
54
+ * Execute a support action using the support hook
55
+ * @param action - Function that receives the support hook and executes an action
56
+ */
57
+ (action: (support: any) => Promise<any>): Promise<void>;
58
+ }
59
+
60
+ /**
61
+ * Create a support handler for a specific screen
62
+ *
63
+ * This function is meant to be used in test apps to connect UI screens
64
+ * to the support package. In production apps, you would implement this
65
+ * based on your specific requirements.
66
+ *
67
+ * @param screenName - Name of the screen (for logging/debugging)
68
+ * @param errorContext - Error context to pass to support methods
69
+ * @returns A handler function that can execute support actions
70
+ */
71
+ export function createSupportHandler(
72
+ screenName: string,
73
+ errorContext: ErrorContext
74
+ ): SupportHandler {
75
+ return async (action: (support: any) => Promise<any>) => {
76
+ try {
77
+ // In a real implementation, you would get the support hook here
78
+ // For now, this is a placeholder that test apps will override
79
+ console.log(`[${screenName}] Support action triggered`, {
80
+ errorContext,
81
+ timestamp: new Date().toISOString(),
82
+ });
83
+
84
+ // The test app will provide the actual support hook
85
+ await action({ errorContext });
86
+ } catch (error) {
87
+ console.error(`[${screenName}] Support action failed:`, error);
88
+ throw error;
89
+ }
90
+ };
91
+ }
92
+
93
+ /**
94
+ * Create a retry handler for a specific screen
95
+ *
96
+ * Placeholder for future retry logic implementation.
97
+ * UI screens can use this type without knowing retry implementation details.
98
+ *
99
+ * @param screenName - Name of the screen (for logging/debugging)
100
+ * @param retryAction - The actual retry logic to execute
101
+ * @returns A retry handler function
102
+ */
103
+ export function createRetryHandler(
104
+ screenName: string,
105
+ retryAction: () => Promise<void>
106
+ ): RetryHandler {
107
+ return async () => {
108
+ try {
109
+ console.log(`[${screenName}] Retry triggered`, {
110
+ timestamp: new Date().toISOString(),
111
+ });
112
+
113
+ await retryAction();
114
+
115
+ console.log(`[${screenName}] Retry completed successfully`);
116
+ } catch (error) {
117
+ console.error(`[${screenName}] Retry failed:`, error);
118
+ throw error;
119
+ }
120
+ };
121
+ }
122
+
123
+ /**
124
+ * Utility to create error context from screen data
125
+ *
126
+ * @param screenName - Name of the screen
127
+ * @param errorMessage - Error message to include
128
+ * @param errorCode - Optional error code
129
+ * @returns ErrorContext object
130
+ */
131
+ export function createErrorContext(
132
+ screenName: string,
133
+ errorMessage: string,
134
+ errorCode?: string
135
+ ): ErrorContext {
136
+ return {
137
+ errorMessage,
138
+ errorCode,
139
+ screenName,
140
+ timestamp: new Date().toISOString(),
141
+ appVersion: '1.0.0', // Should be replaced with actual app version
142
+ platform: getPlatform(),
143
+ os: getOS(),
144
+ };
145
+ }
146
+
147
+ /**
148
+ * Get current platform
149
+ */
150
+ function getPlatform(): 'web' | 'ios' | 'android' {
151
+ // This is a simplified version - in production use proper platform detection
152
+ if (typeof window !== 'undefined') {
153
+ return 'web';
154
+ }
155
+ // For React Native, you would use Platform.OS
156
+ return 'web';
157
+ }
158
+
159
+ /**
160
+ * Get OS information
161
+ */
162
+ function getOS(): string {
163
+ if (typeof window !== 'undefined' && window.navigator) {
164
+ return window.navigator.userAgent;
165
+ }
166
+ return 'Unknown';
167
+ }
@@ -0,0 +1,82 @@
1
+ import React from 'react';
2
+ import { TouchableOpacity, Text, StyleSheet, ViewStyle, TextStyle, Platform } from 'react-native';
3
+
4
+ /**
5
+ * PrimaryButton Component
6
+ *
7
+ * Blue primary action button with icon support.
8
+ * Full width with consistent styling across all screens.
9
+ */
10
+
11
+ interface PrimaryButtonProps {
12
+ children: React.ReactNode;
13
+ onPress: () => void;
14
+ icon?: React.ReactNode;
15
+ disabled?: boolean;
16
+ backgroundColor?: string;
17
+ style?: ViewStyle;
18
+ textStyle?: TextStyle;
19
+ }
20
+
21
+ export const PrimaryButton: React.FC<PrimaryButtonProps> = ({
22
+ children,
23
+ onPress,
24
+ icon,
25
+ disabled = false,
26
+ backgroundColor = '#3B82F6',
27
+ style,
28
+ textStyle,
29
+ }) => {
30
+ return (
31
+ <TouchableOpacity
32
+ style={[
33
+ styles.button,
34
+ { backgroundColor: disabled ? '#9CA3AF' : backgroundColor },
35
+ style,
36
+ ]}
37
+ onPress={onPress}
38
+ disabled={disabled}
39
+ activeOpacity={0.8}
40
+ >
41
+ {icon && <>{icon}</>}
42
+ <Text style={[styles.text, icon ? styles.textWithIcon : undefined, textStyle]}>
43
+ {children}
44
+ </Text>
45
+ </TouchableOpacity>
46
+ );
47
+ };
48
+
49
+ const styles = StyleSheet.create({
50
+ button: {
51
+ width: '100%',
52
+ paddingVertical: 16,
53
+ paddingHorizontal: 24,
54
+ borderRadius: 12,
55
+ flexDirection: 'row',
56
+ alignItems: 'center',
57
+ justifyContent: 'center',
58
+ marginBottom: 12,
59
+ ...Platform.select({
60
+ ios: {
61
+ shadowColor: '#000',
62
+ shadowOffset: { width: 0, height: 2 },
63
+ shadowOpacity: 0.1,
64
+ shadowRadius: 4,
65
+ },
66
+ android: {
67
+ elevation: 2,
68
+ },
69
+ }),
70
+ },
71
+ text: {
72
+ fontSize: 16,
73
+ fontWeight: '600',
74
+ color: '#FFFFFF',
75
+ textAlign: 'center',
76
+ },
77
+ textWithIcon: {
78
+ marginLeft: 8,
79
+ },
80
+ });
81
+
82
+ export default PrimaryButton;
@@ -0,0 +1,81 @@
1
+ import React from 'react';
2
+ import { TouchableOpacity, Text, StyleSheet, ViewStyle, TextStyle } from 'react-native';
3
+
4
+ /**
5
+ * SecondaryButton Component
6
+ *
7
+ * White/outline secondary action button with icon support.
8
+ * Full width with consistent styling across all screens.
9
+ */
10
+
11
+ interface SecondaryButtonProps {
12
+ children: React.ReactNode;
13
+ onPress: () => void;
14
+ icon?: React.ReactNode;
15
+ disabled?: boolean;
16
+ borderColor?: string;
17
+ textColor?: string;
18
+ style?: ViewStyle;
19
+ textStyle?: TextStyle;
20
+ }
21
+
22
+ export const SecondaryButton: React.FC<SecondaryButtonProps> = ({
23
+ children,
24
+ onPress,
25
+ icon,
26
+ disabled = false,
27
+ borderColor = '#E5E7EB',
28
+ textColor = '#1F2937',
29
+ style,
30
+ textStyle,
31
+ }) => {
32
+ return (
33
+ <TouchableOpacity
34
+ style={[
35
+ styles.button,
36
+ { borderColor: disabled ? '#E5E7EB' : borderColor },
37
+ style,
38
+ ]}
39
+ onPress={onPress}
40
+ disabled={disabled}
41
+ activeOpacity={0.8}
42
+ >
43
+ {icon && <>{icon}</>}
44
+ <Text
45
+ style={[
46
+ styles.text,
47
+ { color: disabled ? '#9CA3AF' : textColor },
48
+ icon ? styles.textWithIcon : undefined,
49
+ textStyle,
50
+ ]}
51
+ >
52
+ {children}
53
+ </Text>
54
+ </TouchableOpacity>
55
+ );
56
+ };
57
+
58
+ const styles = StyleSheet.create({
59
+ button: {
60
+ width: '100%',
61
+ backgroundColor: '#FFFFFF',
62
+ paddingVertical: 16,
63
+ paddingHorizontal: 24,
64
+ borderRadius: 12,
65
+ flexDirection: 'row',
66
+ alignItems: 'center',
67
+ justifyContent: 'center',
68
+ borderWidth: 1,
69
+ marginBottom: 12,
70
+ },
71
+ text: {
72
+ fontSize: 16,
73
+ fontWeight: '600',
74
+ textAlign: 'center',
75
+ },
76
+ textWithIcon: {
77
+ marginLeft: 8,
78
+ },
79
+ });
80
+
81
+ export default SecondaryButton;
@@ -0,0 +1,3 @@
1
+ // Buttons - Barrel Export
2
+ export { default as PrimaryButton } from './PrimaryButton';
3
+ export { default as SecondaryButton } from './SecondaryButton';
@@ -0,0 +1,53 @@
1
+ import React from 'react';
2
+ import { View, Text, StyleSheet, ViewStyle, TextStyle } from 'react-native';
3
+
4
+ /**
5
+ * ContentCard Component
6
+ *
7
+ * White card container with border for content sections.
8
+ * Used for grouping related information on screens.
9
+ */
10
+
11
+ interface ContentCardProps {
12
+ children: React.ReactNode;
13
+ title?: string;
14
+ style?: ViewStyle;
15
+ titleStyle?: TextStyle;
16
+ }
17
+
18
+ export const ContentCard: React.FC<ContentCardProps> = ({
19
+ children,
20
+ title,
21
+ style,
22
+ titleStyle,
23
+ }) => {
24
+ return (
25
+ <View style={[styles.card, style]}>
26
+ {title && (
27
+ <Text style={[styles.title, titleStyle]}>{title}</Text>
28
+ )}
29
+ {children}
30
+ </View>
31
+ );
32
+ };
33
+
34
+ const styles = StyleSheet.create({
35
+ card: {
36
+ width: '100%',
37
+ backgroundColor: '#FFFFFF',
38
+ borderRadius: 12,
39
+ padding: 20,
40
+ marginBottom: 16,
41
+ borderWidth: 1,
42
+ borderColor: '#E5E7EB',
43
+ },
44
+ title: {
45
+ fontSize: 16,
46
+ fontWeight: '600',
47
+ color: '#1F2937',
48
+ marginBottom: 12,
49
+ lineHeight: 24,
50
+ },
51
+ });
52
+
53
+ export default ContentCard;