@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.
- package/README.md +144 -0
- package/dist/adapters/index.d.ts +1 -0
- package/dist/adapters/index.js +2 -0
- package/dist/adapters/supportAdapter.d.ts +87 -0
- package/dist/adapters/supportAdapter.js +99 -0
- package/dist/client.d.ts +55 -0
- package/dist/client.js +229 -0
- package/dist/components/IconLibrary.d.ts +23 -0
- package/dist/components/IconLibrary.js +19 -0
- package/dist/components/RetryIndicator.d.ts +5 -0
- package/dist/components/RetryIndicator.js +208 -0
- package/dist/components/SupportContactCard.d.ts +10 -0
- package/dist/components/SupportContactCard.js +140 -0
- package/dist/components/buttons/PrimaryButton.d.ts +19 -0
- package/dist/components/buttons/PrimaryButton.js +42 -0
- package/dist/components/buttons/SecondaryButton.d.ts +20 -0
- package/dist/components/buttons/SecondaryButton.js +37 -0
- package/dist/components/buttons/index.d.ts +2 -0
- package/dist/components/buttons/index.js +3 -0
- package/dist/components/cards/ContentCard.d.ts +16 -0
- package/dist/components/cards/ContentCard.js +24 -0
- package/dist/components/cards/InfoCard.d.ts +9 -0
- package/dist/components/cards/InfoCard.js +51 -0
- package/dist/components/cards/TipsCard.d.ts +11 -0
- package/dist/components/cards/TipsCard.js +70 -0
- package/dist/components/cards/WarningCard.d.ts +11 -0
- package/dist/components/cards/WarningCard.js +80 -0
- package/dist/components/cards/WhatsNewCard.d.ts +15 -0
- package/dist/components/cards/WhatsNewCard.js +79 -0
- package/dist/components/cards/index.d.ts +5 -0
- package/dist/components/cards/index.js +6 -0
- package/dist/components/feedback/ExpandableSection.d.ts +8 -0
- package/dist/components/feedback/ExpandableSection.js +44 -0
- package/dist/components/feedback/SecurityBanner.d.ts +9 -0
- package/dist/components/feedback/SecurityBanner.js +49 -0
- package/dist/components/feedback/SpeedBadge.d.ts +9 -0
- package/dist/components/feedback/SpeedBadge.js +41 -0
- package/dist/components/feedback/StatusBadge.d.ts +17 -0
- package/dist/components/feedback/StatusBadge.js +20 -0
- package/dist/components/feedback/TopBanner.d.ts +7 -0
- package/dist/components/feedback/TopBanner.js +74 -0
- package/dist/components/feedback/index.d.ts +5 -0
- package/dist/components/feedback/index.js +6 -0
- package/dist/components/icons/AnimatedAlert.d.ts +11 -0
- package/dist/components/icons/AnimatedAlert.js +27 -0
- package/dist/components/icons/AnimatedCalendar.d.ts +7 -0
- package/dist/components/icons/AnimatedCalendar.js +34 -0
- package/dist/components/icons/AnimatedCamera.d.ts +7 -0
- package/dist/components/icons/AnimatedCamera.js +34 -0
- package/dist/components/icons/AnimatedClientError.d.ts +11 -0
- package/dist/components/icons/AnimatedClientError.js +20 -0
- package/dist/components/icons/AnimatedClock.d.ts +7 -0
- package/dist/components/icons/AnimatedClock.js +53 -0
- package/dist/components/icons/AnimatedCrash.d.ts +11 -0
- package/dist/components/icons/AnimatedCrash.js +36 -0
- package/dist/components/icons/AnimatedDocument.d.ts +7 -0
- package/dist/components/icons/AnimatedDocument.js +34 -0
- package/dist/components/icons/AnimatedDownload.d.ts +7 -0
- package/dist/components/icons/AnimatedDownload.js +23 -0
- package/dist/components/icons/AnimatedEmergency.d.ts +11 -0
- package/dist/components/icons/AnimatedEmergency.js +26 -0
- package/dist/components/icons/AnimatedInvalidData.d.ts +11 -0
- package/dist/components/icons/AnimatedInvalidData.js +24 -0
- package/dist/components/icons/AnimatedLightning.d.ts +7 -0
- package/dist/components/icons/AnimatedLightning.js +34 -0
- package/dist/components/icons/AnimatedLocationPin.d.ts +7 -0
- package/dist/components/icons/AnimatedLocationPin.js +34 -0
- package/dist/components/icons/AnimatedPermission.d.ts +11 -0
- package/dist/components/icons/AnimatedPermission.js +21 -0
- package/dist/components/icons/AnimatedPermissionDenied.d.ts +11 -0
- package/dist/components/icons/AnimatedPermissionDenied.js +27 -0
- package/dist/components/icons/AnimatedServerError.d.ts +7 -0
- package/dist/components/icons/AnimatedServerError.js +60 -0
- package/dist/components/icons/AnimatedShield.d.ts +7 -0
- package/dist/components/icons/AnimatedShield.js +34 -0
- package/dist/components/icons/AnimatedSparkle.d.ts +7 -0
- package/dist/components/icons/AnimatedSparkle.js +53 -0
- package/dist/components/icons/AnimatedSpeedGauge.d.ts +7 -0
- package/dist/components/icons/AnimatedSpeedGauge.js +50 -0
- package/dist/components/icons/AnimatedTimeout.d.ts +11 -0
- package/dist/components/icons/AnimatedTimeout.js +27 -0
- package/dist/components/icons/AnimatedWarning.d.ts +7 -0
- package/dist/components/icons/AnimatedWarning.js +50 -0
- package/dist/components/icons/AnimatedWifiOff.d.ts +7 -0
- package/dist/components/icons/AnimatedWifiOff.js +65 -0
- package/dist/components/icons/AnimatedWrench.d.ts +7 -0
- package/dist/components/icons/AnimatedWrench.js +43 -0
- package/dist/components/icons/ClockBadge.d.ts +8 -0
- package/dist/components/icons/ClockBadge.js +28 -0
- package/dist/components/icons/DownloadBadge.d.ts +8 -0
- package/dist/components/icons/DownloadBadge.js +28 -0
- package/dist/components/icons/IconWithBadge.d.ts +12 -0
- package/dist/components/icons/IconWithBadge.js +120 -0
- package/dist/components/icons/SimpleIcons.d.ts +12 -0
- package/dist/components/icons/SimpleIcons.js +8 -0
- package/dist/components/icons/XBadge.d.ts +8 -0
- package/dist/components/icons/XBadge.js +28 -0
- package/dist/components/icons/animated/errors/AnimatedClientError.d.ts +11 -0
- package/dist/components/icons/animated/errors/AnimatedClientError.js +20 -0
- package/dist/components/icons/animated/errors/AnimatedCrash.d.ts +11 -0
- package/dist/components/icons/animated/errors/AnimatedCrash.js +36 -0
- package/dist/components/icons/animated/errors/AnimatedInvalidData.d.ts +11 -0
- package/dist/components/icons/animated/errors/AnimatedInvalidData.js +24 -0
- package/dist/components/icons/animated/errors/AnimatedServerError.d.ts +7 -0
- package/dist/components/icons/animated/errors/AnimatedServerError.js +60 -0
- package/dist/components/icons/animated/errors/index.d.ts +4 -0
- package/dist/components/icons/animated/errors/index.js +5 -0
- package/dist/components/icons/animated/general/AnimatedCalendar.d.ts +7 -0
- package/dist/components/icons/animated/general/AnimatedCalendar.js +34 -0
- package/dist/components/icons/animated/general/AnimatedCamera.d.ts +7 -0
- package/dist/components/icons/animated/general/AnimatedCamera.js +34 -0
- package/dist/components/icons/animated/general/AnimatedClock.d.ts +7 -0
- package/dist/components/icons/animated/general/AnimatedClock.js +53 -0
- package/dist/components/icons/animated/general/AnimatedDocument.d.ts +7 -0
- package/dist/components/icons/animated/general/AnimatedDocument.js +34 -0
- package/dist/components/icons/animated/general/AnimatedDownload.d.ts +7 -0
- package/dist/components/icons/animated/general/AnimatedDownload.js +23 -0
- package/dist/components/icons/animated/general/AnimatedLightning.d.ts +7 -0
- package/dist/components/icons/animated/general/AnimatedLightning.js +34 -0
- package/dist/components/icons/animated/general/AnimatedLocationPin.d.ts +7 -0
- package/dist/components/icons/animated/general/AnimatedLocationPin.js +34 -0
- package/dist/components/icons/animated/general/AnimatedShield.d.ts +7 -0
- package/dist/components/icons/animated/general/AnimatedShield.js +34 -0
- package/dist/components/icons/animated/general/AnimatedSparkle.d.ts +7 -0
- package/dist/components/icons/animated/general/AnimatedSparkle.js +53 -0
- package/dist/components/icons/animated/general/AnimatedWarning.d.ts +7 -0
- package/dist/components/icons/animated/general/AnimatedWarning.js +50 -0
- package/dist/components/icons/animated/general/index.d.ts +10 -0
- package/dist/components/icons/animated/general/index.js +11 -0
- package/dist/components/icons/animated/index.d.ts +5 -0
- package/dist/components/icons/animated/index.js +6 -0
- package/dist/components/icons/animated/maintenance/AnimatedAlert.d.ts +11 -0
- package/dist/components/icons/animated/maintenance/AnimatedAlert.js +27 -0
- package/dist/components/icons/animated/maintenance/AnimatedEmergency.d.ts +11 -0
- package/dist/components/icons/animated/maintenance/AnimatedEmergency.js +26 -0
- package/dist/components/icons/animated/maintenance/AnimatedWrench.d.ts +7 -0
- package/dist/components/icons/animated/maintenance/AnimatedWrench.js +43 -0
- package/dist/components/icons/animated/maintenance/index.d.ts +3 -0
- package/dist/components/icons/animated/maintenance/index.js +4 -0
- package/dist/components/icons/animated/network/AnimatedSpeedGauge.d.ts +7 -0
- package/dist/components/icons/animated/network/AnimatedSpeedGauge.js +50 -0
- package/dist/components/icons/animated/network/AnimatedTimeout.d.ts +11 -0
- package/dist/components/icons/animated/network/AnimatedTimeout.js +27 -0
- package/dist/components/icons/animated/network/AnimatedWifiOff.d.ts +7 -0
- package/dist/components/icons/animated/network/AnimatedWifiOff.js +65 -0
- package/dist/components/icons/animated/network/index.d.ts +3 -0
- package/dist/components/icons/animated/network/index.js +4 -0
- package/dist/components/icons/animated/permissions/AnimatedPermission.d.ts +11 -0
- package/dist/components/icons/animated/permissions/AnimatedPermission.js +21 -0
- package/dist/components/icons/animated/permissions/AnimatedPermissionDenied.d.ts +11 -0
- package/dist/components/icons/animated/permissions/AnimatedPermissionDenied.js +27 -0
- package/dist/components/icons/animated/permissions/index.d.ts +2 -0
- package/dist/components/icons/animated/permissions/index.js +3 -0
- package/dist/components/icons/badges/ClockBadge.d.ts +8 -0
- package/dist/components/icons/badges/ClockBadge.js +28 -0
- package/dist/components/icons/badges/DownloadBadge.d.ts +8 -0
- package/dist/components/icons/badges/DownloadBadge.js +28 -0
- package/dist/components/icons/badges/XBadge.d.ts +8 -0
- package/dist/components/icons/badges/XBadge.js +28 -0
- package/dist/components/icons/badges/index.d.ts +3 -0
- package/dist/components/icons/badges/index.js +4 -0
- package/dist/components/icons/index.d.ts +3 -0
- package/dist/components/icons/index.js +4 -0
- package/dist/components/icons/utilities/AlertTriangleIcon.d.ts +7 -0
- package/dist/components/icons/utilities/AlertTriangleIcon.js +4 -0
- package/dist/components/icons/utilities/CheckCircleIcon.d.ts +7 -0
- package/dist/components/icons/utilities/CheckCircleIcon.js +4 -0
- package/dist/components/icons/utilities/DownloadIcon.d.ts +7 -0
- package/dist/components/icons/utilities/DownloadIcon.js +4 -0
- package/dist/components/icons/utilities/IconWithBadge.d.ts +12 -0
- package/dist/components/icons/utilities/IconWithBadge.js +120 -0
- package/dist/components/icons/utilities/SettingsIcon.d.ts +7 -0
- package/dist/components/icons/utilities/SettingsIcon.js +4 -0
- package/dist/components/icons/utilities/ShieldIcon.d.ts +7 -0
- package/dist/components/icons/utilities/ShieldIcon.js +4 -0
- package/dist/components/icons/utilities/SimpleIcons.d.ts +12 -0
- package/dist/components/icons/utilities/SimpleIcons.js +8 -0
- package/dist/components/icons/utilities/XIcon.d.ts +7 -0
- package/dist/components/icons/utilities/XIcon.js +4 -0
- package/dist/components/icons/utilities/index.d.ts +7 -0
- package/dist/components/icons/utilities/index.js +8 -0
- package/dist/components/index.d.ts +9 -0
- package/dist/components/index.js +10 -0
- package/dist/components/layout/DualButtonLayout.d.ts +14 -0
- package/dist/components/layout/DualButtonLayout.js +73 -0
- package/dist/components/layout/ResponsiveLayout.d.ts +25 -0
- package/dist/components/layout/ResponsiveLayout.js +76 -0
- package/dist/components/layout/SafeAreaWrapper.d.ts +21 -0
- package/dist/components/layout/SafeAreaWrapper.js +45 -0
- package/dist/components/layout/ScreenContainer.d.ts +15 -0
- package/dist/components/layout/ScreenContainer.js +21 -0
- package/dist/components/layout/index.d.ts +4 -0
- package/dist/components/layout/index.js +5 -0
- package/dist/components/lists/CheckListItem.d.ts +14 -0
- package/dist/components/lists/CheckListItem.js +40 -0
- package/dist/components/lists/StatusCheckList.d.ts +10 -0
- package/dist/components/lists/StatusCheckList.js +69 -0
- package/dist/components/lists/index.d.ts +2 -0
- package/dist/components/lists/index.js +3 -0
- package/dist/components/shared/CheckListItem.d.ts +14 -0
- package/dist/components/shared/CheckListItem.js +40 -0
- package/dist/components/shared/ConnectionStatus.d.ts +8 -0
- package/dist/components/shared/ConnectionStatus.js +57 -0
- package/dist/components/shared/ContentCard.d.ts +16 -0
- package/dist/components/shared/ContentCard.js +24 -0
- package/dist/components/shared/CountdownTimer.d.ts +9 -0
- package/dist/components/shared/CountdownTimer.js +91 -0
- package/dist/components/shared/DualButtonLayout.d.ts +14 -0
- package/dist/components/shared/DualButtonLayout.js +73 -0
- package/dist/components/shared/ExpandableSection.d.ts +8 -0
- package/dist/components/shared/ExpandableSection.js +44 -0
- package/dist/components/shared/IconWithBadge.d.ts +17 -0
- package/dist/components/shared/IconWithBadge.js +38 -0
- package/dist/components/shared/InfoCard.d.ts +9 -0
- package/dist/components/shared/InfoCard.js +51 -0
- package/dist/components/shared/PrimaryButton.d.ts +19 -0
- package/dist/components/shared/PrimaryButton.js +42 -0
- package/dist/components/shared/ResponsiveLayout.d.ts +25 -0
- package/dist/components/shared/ResponsiveLayout.js +76 -0
- package/dist/components/shared/RetryCounter.d.ts +8 -0
- package/dist/components/shared/RetryCounter.js +17 -0
- package/dist/components/shared/SafeAreaWrapper.d.ts +21 -0
- package/dist/components/shared/SafeAreaWrapper.js +45 -0
- package/dist/components/shared/ScreenContainer.d.ts +15 -0
- package/dist/components/shared/ScreenContainer.js +21 -0
- package/dist/components/shared/SecondaryButton.d.ts +20 -0
- package/dist/components/shared/SecondaryButton.js +37 -0
- package/dist/components/shared/SecurityBanner.d.ts +9 -0
- package/dist/components/shared/SecurityBanner.js +49 -0
- package/dist/components/shared/SpeedBadge.d.ts +9 -0
- package/dist/components/shared/SpeedBadge.js +41 -0
- package/dist/components/shared/StatusBadge.d.ts +17 -0
- package/dist/components/shared/StatusBadge.js +20 -0
- package/dist/components/shared/StatusCheckList.d.ts +10 -0
- package/dist/components/shared/StatusCheckList.js +69 -0
- package/dist/components/shared/SupportButtons.d.ts +9 -0
- package/dist/components/shared/SupportButtons.js +138 -0
- package/dist/components/shared/TipsCard.d.ts +11 -0
- package/dist/components/shared/TipsCard.js +70 -0
- package/dist/components/shared/TopBanner.d.ts +7 -0
- package/dist/components/shared/TopBanner.js +74 -0
- package/dist/components/shared/VersionDisplay.d.ts +14 -0
- package/dist/components/shared/VersionDisplay.js +30 -0
- package/dist/components/shared/WarningCard.d.ts +11 -0
- package/dist/components/shared/WarningCard.js +80 -0
- package/dist/components/shared/WhatsNewCard.d.ts +15 -0
- package/dist/components/shared/WhatsNewCard.js +79 -0
- package/dist/components/status/ConnectionStatus.d.ts +8 -0
- package/dist/components/status/ConnectionStatus.js +57 -0
- package/dist/components/status/VersionDisplay.d.ts +14 -0
- package/dist/components/status/VersionDisplay.js +30 -0
- package/dist/components/status/index.d.ts +2 -0
- package/dist/components/status/index.js +3 -0
- package/dist/components/support/SupportButtons.d.ts +9 -0
- package/dist/components/support/SupportButtons.js +138 -0
- package/dist/components/support/index.d.ts +1 -0
- package/dist/components/support/index.js +2 -0
- package/dist/components/timers/CountdownTimer.d.ts +9 -0
- package/dist/components/timers/CountdownTimer.js +91 -0
- package/dist/components/timers/RetryCounter.d.ts +8 -0
- package/dist/components/timers/RetryCounter.js +17 -0
- package/dist/components/timers/index.d.ts +2 -0
- package/dist/components/timers/index.js +3 -0
- package/dist/components/ui/Button.d.ts +38 -0
- package/dist/components/ui/Button.js +96 -0
- package/dist/components/ui/OfflineBanner.d.ts +15 -0
- package/dist/components/ui/OfflineBanner.js +42 -0
- package/dist/index.d.ts +68 -0
- package/dist/index.js +103 -0
- package/dist/screens/errors/ApiErrorScreen.d.ts +7 -0
- package/dist/screens/errors/ApiErrorScreen.js +166 -0
- package/dist/screens/errors/ClientErrorScreen.d.ts +9 -0
- package/dist/screens/errors/ClientErrorScreen.js +75 -0
- package/dist/screens/errors/ErrorBoundaryScreen.d.ts +9 -0
- package/dist/screens/errors/ErrorBoundaryScreen.js +43 -0
- package/dist/screens/errors/InvalidResponseScreen.d.ts +9 -0
- package/dist/screens/errors/InvalidResponseScreen.js +47 -0
- package/dist/screens/errors/ServerErrorScreen.d.ts +9 -0
- package/dist/screens/errors/ServerErrorScreen.js +72 -0
- package/dist/screens/errors/index.d.ts +5 -0
- package/dist/screens/errors/index.js +6 -0
- package/dist/screens/index.d.ts +4 -0
- package/dist/screens/index.js +5 -0
- package/dist/screens/network/ApiTimeoutScreen.d.ts +9 -0
- package/dist/screens/network/ApiTimeoutScreen.js +47 -0
- package/dist/screens/network/NetworkOfflineScreen.d.ts +9 -0
- package/dist/screens/network/NetworkOfflineScreen.js +42 -0
- package/dist/screens/network/NetworkSlowConnectionScreen.d.ts +9 -0
- package/dist/screens/network/NetworkSlowConnectionScreen.js +41 -0
- package/dist/screens/network/index.d.ts +3 -0
- package/dist/screens/network/index.js +4 -0
- package/dist/screens/permissions/PermissionDeniedScreen.d.ts +9 -0
- package/dist/screens/permissions/PermissionDeniedScreen.js +92 -0
- package/dist/screens/permissions/PermissionRequestScreen.d.ts +16 -0
- package/dist/screens/permissions/PermissionRequestScreen.js +303 -0
- package/dist/screens/permissions/PermissionScreen.d.ts +9 -0
- package/dist/screens/permissions/PermissionScreen.js +45 -0
- package/dist/screens/permissions/index.d.ts +3 -0
- package/dist/screens/permissions/index.js +4 -0
- package/dist/screens/system/AppUpdateScreen.d.ts +9 -0
- package/dist/screens/system/AppUpdateScreen.js +296 -0
- package/dist/screens/system/EmergencyOutageScreen.d.ts +9 -0
- package/dist/screens/system/EmergencyOutageScreen.js +48 -0
- package/dist/screens/system/ForceUpdateScreen.d.ts +9 -0
- package/dist/screens/system/ForceUpdateScreen.js +49 -0
- package/dist/screens/system/OptionalUpdateScreen.d.ts +9 -0
- package/dist/screens/system/OptionalUpdateScreen.js +47 -0
- package/dist/screens/system/PlannedMaintenanceScreen.d.ts +9 -0
- package/dist/screens/system/PlannedMaintenanceScreen.js +41 -0
- package/dist/screens/system/SecurityUpdateScreen.d.ts +9 -0
- package/dist/screens/system/SecurityUpdateScreen.js +64 -0
- package/dist/screens/system/ServiceUnavailableScreen.d.ts +15 -0
- package/dist/screens/system/ServiceUnavailableScreen.js +53 -0
- package/dist/screens/system/SoftUpdateScreen.d.ts +9 -0
- package/dist/screens/system/SoftUpdateScreen.js +55 -0
- package/dist/screens/system/SystemMaintenanceScreen.d.ts +9 -0
- package/dist/screens/system/SystemMaintenanceScreen.js +228 -0
- package/dist/screens/system/UnplannedOutageScreen.d.ts +9 -0
- package/dist/screens/system/UnplannedOutageScreen.js +42 -0
- package/dist/screens/system/index.d.ts +2 -0
- package/dist/screens/system/index.js +3 -0
- package/dist/screens/system/maintenance/EmergencyOutageScreen.d.ts +9 -0
- package/dist/screens/system/maintenance/EmergencyOutageScreen.js +48 -0
- package/dist/screens/system/maintenance/PlannedMaintenanceScreen.d.ts +9 -0
- package/dist/screens/system/maintenance/PlannedMaintenanceScreen.js +41 -0
- package/dist/screens/system/maintenance/ServiceUnavailableScreen.d.ts +15 -0
- package/dist/screens/system/maintenance/ServiceUnavailableScreen.js +53 -0
- package/dist/screens/system/maintenance/SystemMaintenanceScreen.d.ts +9 -0
- package/dist/screens/system/maintenance/SystemMaintenanceScreen.js +228 -0
- package/dist/screens/system/maintenance/UnplannedOutageScreen.d.ts +9 -0
- package/dist/screens/system/maintenance/UnplannedOutageScreen.js +42 -0
- package/dist/screens/system/maintenance/index.d.ts +5 -0
- package/dist/screens/system/maintenance/index.js +6 -0
- package/dist/screens/system/updates/AppUpdateScreen.d.ts +9 -0
- package/dist/screens/system/updates/AppUpdateScreen.js +296 -0
- package/dist/screens/system/updates/ForceUpdateScreen.d.ts +9 -0
- package/dist/screens/system/updates/ForceUpdateScreen.js +49 -0
- package/dist/screens/system/updates/OptionalUpdateScreen.d.ts +9 -0
- package/dist/screens/system/updates/OptionalUpdateScreen.js +47 -0
- package/dist/screens/system/updates/SecurityUpdateScreen.d.ts +9 -0
- package/dist/screens/system/updates/SecurityUpdateScreen.js +64 -0
- package/dist/screens/system/updates/SoftUpdateScreen.d.ts +9 -0
- package/dist/screens/system/updates/SoftUpdateScreen.js +55 -0
- package/dist/screens/system/updates/index.d.ts +5 -0
- package/dist/screens/system/updates/index.js +6 -0
- package/dist/types/common.d.ts +139 -0
- package/dist/types/common.js +4 -0
- package/dist/types/components.d.ts +52 -0
- package/dist/types/components.js +4 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.js +8 -0
- package/dist/types/screens.d.ts +390 -0
- package/dist/types/screens.js +4 -0
- package/dist/types/support.d.ts +16 -0
- package/dist/types/support.js +4 -0
- package/dist/types.d.ts +580 -0
- package/dist/types.js +4 -0
- package/dist/utils/client.d.ts +55 -0
- package/dist/utils/client.js +229 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +2 -0
- package/package.json +72 -0
- package/src/adapters/index.ts +2 -0
- package/src/adapters/supportAdapter.ts +167 -0
- package/src/components/buttons/PrimaryButton.tsx +82 -0
- package/src/components/buttons/SecondaryButton.tsx +81 -0
- package/src/components/buttons/index.ts +3 -0
- package/src/components/cards/ContentCard.tsx +53 -0
- package/src/components/cards/InfoCard.tsx +74 -0
- package/src/components/cards/TipsCard.tsx +106 -0
- package/src/components/cards/WarningCard.tsx +118 -0
- package/src/components/cards/WhatsNewCard.tsx +121 -0
- package/src/components/cards/index.ts +6 -0
- package/src/components/feedback/ExpandableSection.tsx +71 -0
- package/src/components/feedback/SecurityBanner.tsx +74 -0
- package/src/components/feedback/SpeedBadge.tsx +64 -0
- package/src/components/feedback/StatusBadge.tsx +50 -0
- package/src/components/feedback/TopBanner.tsx +104 -0
- package/src/components/feedback/index.ts +6 -0
- package/src/components/icons/animated/errors/AnimatedClientError.tsx +94 -0
- package/src/components/icons/animated/errors/AnimatedCrash.tsx +133 -0
- package/src/components/icons/animated/errors/AnimatedInvalidData.tsx +127 -0
- package/src/components/icons/animated/errors/AnimatedServerError.tsx +85 -0
- package/src/components/icons/animated/errors/index.ts +5 -0
- package/src/components/icons/animated/general/AnimatedCalendar.tsx +54 -0
- package/src/components/icons/animated/general/AnimatedCamera.tsx +54 -0
- package/src/components/icons/animated/general/AnimatedClock.tsx +78 -0
- package/src/components/icons/animated/general/AnimatedDocument.tsx +54 -0
- package/src/components/icons/animated/general/AnimatedDownload.tsx +61 -0
- package/src/components/icons/animated/general/AnimatedLightning.tsx +54 -0
- package/src/components/icons/animated/general/AnimatedLocationPin.tsx +54 -0
- package/src/components/icons/animated/general/AnimatedShield.tsx +54 -0
- package/src/components/icons/animated/general/AnimatedSparkle.tsx +74 -0
- package/src/components/icons/animated/general/AnimatedWarning.tsx +75 -0
- package/src/components/icons/animated/general/index.ts +11 -0
- package/src/components/icons/animated/index.ts +6 -0
- package/src/components/icons/animated/maintenance/AnimatedAlert.tsx +110 -0
- package/src/components/icons/animated/maintenance/AnimatedEmergency.tsx +112 -0
- package/src/components/icons/animated/maintenance/AnimatedWrench.tsx +64 -0
- package/src/components/icons/animated/maintenance/index.ts +4 -0
- package/src/components/icons/animated/network/AnimatedSpeedGauge.tsx +75 -0
- package/src/components/icons/animated/network/AnimatedTimeout.tsx +115 -0
- package/src/components/icons/animated/network/AnimatedWifiOff.tsx +93 -0
- package/src/components/icons/animated/network/index.ts +4 -0
- package/src/components/icons/animated/permissions/AnimatedPermission.tsx +74 -0
- package/src/components/icons/animated/permissions/AnimatedPermissionDenied.tsx +92 -0
- package/src/components/icons/animated/permissions/index.ts +3 -0
- package/src/components/icons/badges/ClockBadge.tsx +49 -0
- package/src/components/icons/badges/DownloadBadge.tsx +49 -0
- package/src/components/icons/badges/XBadge.tsx +49 -0
- package/src/components/icons/badges/index.ts +4 -0
- package/src/components/icons/index.ts +4 -0
- package/src/components/icons/utilities/AlertTriangleIcon.tsx +17 -0
- package/src/components/icons/utilities/CheckCircleIcon.tsx +16 -0
- package/src/components/icons/utilities/DownloadIcon.tsx +17 -0
- package/src/components/icons/utilities/IconWithBadge.tsx +166 -0
- package/src/components/icons/utilities/SettingsIcon.tsx +16 -0
- package/src/components/icons/utilities/ShieldIcon.tsx +15 -0
- package/src/components/icons/utilities/XIcon.tsx +16 -0
- package/src/components/icons/utilities/index.ts +8 -0
- package/src/components/index.ts +10 -0
- package/src/components/layout/DualButtonLayout.tsx +118 -0
- package/src/components/layout/ResponsiveLayout.tsx +118 -0
- package/src/components/layout/SafeAreaWrapper.tsx +72 -0
- package/src/components/layout/ScreenContainer.tsx +53 -0
- package/src/components/layout/index.ts +5 -0
- package/src/components/lists/CheckListItem.tsx +72 -0
- package/src/components/lists/StatusCheckList.tsx +101 -0
- package/src/components/lists/index.ts +3 -0
- package/src/components/status/ConnectionStatus.tsx +90 -0
- package/src/components/status/VersionDisplay.tsx +60 -0
- package/src/components/status/index.ts +3 -0
- package/src/components/support/SupportButtons.tsx +311 -0
- package/src/components/support/index.ts +2 -0
- package/src/components/timers/CountdownTimer.tsx +136 -0
- package/src/components/timers/RetryCounter.tsx +33 -0
- package/src/components/timers/index.ts +3 -0
- package/src/index.ts +125 -0
- package/src/screens/errors/ApiErrorScreen.tsx +276 -0
- package/src/screens/errors/ClientErrorScreen.tsx +135 -0
- package/src/screens/errors/ErrorBoundaryScreen.tsx +98 -0
- package/src/screens/errors/InvalidResponseScreen.tsx +104 -0
- package/src/screens/errors/ServerErrorScreen.tsx +139 -0
- package/src/screens/errors/index.ts +6 -0
- package/src/screens/index.ts +5 -0
- package/src/screens/network/ApiTimeoutScreen.tsx +104 -0
- package/src/screens/network/NetworkOfflineScreen.tsx +92 -0
- package/src/screens/network/NetworkSlowConnectionScreen.tsx +92 -0
- package/src/screens/network/index.ts +4 -0
- package/src/screens/permissions/PermissionDeniedScreen.tsx +176 -0
- package/src/screens/permissions/PermissionRequestScreen.tsx +506 -0
- package/src/screens/permissions/PermissionScreen.tsx +104 -0
- package/src/screens/permissions/index.ts +4 -0
- package/src/screens/system/index.ts +3 -0
- package/src/screens/system/maintenance/EmergencyOutageScreen.tsx +113 -0
- package/src/screens/system/maintenance/PlannedMaintenanceScreen.tsx +98 -0
- package/src/screens/system/maintenance/ServiceUnavailableScreen.tsx +133 -0
- package/src/screens/system/maintenance/SystemMaintenanceScreen.tsx +334 -0
- package/src/screens/system/maintenance/UnplannedOutageScreen.tsx +106 -0
- package/src/screens/system/maintenance/index.ts +6 -0
- package/src/screens/system/updates/AppUpdateScreen.tsx +440 -0
- package/src/screens/system/updates/ForceUpdateScreen.tsx +121 -0
- package/src/screens/system/updates/OptionalUpdateScreen.tsx +120 -0
- package/src/screens/system/updates/SecurityUpdateScreen.tsx +152 -0
- package/src/screens/system/updates/SoftUpdateScreen.tsx +137 -0
- package/src/screens/system/updates/index.ts +6 -0
- package/src/types/common.ts +203 -0
- package/src/types/components.ts +65 -0
- package/src/types/index.ts +9 -0
- package/src/types/reanimated.d.ts +38 -0
- package/src/types/screens.ts +428 -0
- package/src/types/support.ts +23 -0
- package/src/utils/client.ts +273 -0
- package/src/utils/index.ts +2 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text, StyleSheet } from 'react-native';
|
|
3
|
+
import ScreenContainer from '../../components/layout/ScreenContainer';
|
|
4
|
+
import IconWithBadge from '../../components/icons/utilities/IconWithBadge';
|
|
5
|
+
import StatusBadge from '../../components/feedback/StatusBadge';
|
|
6
|
+
import ContentCard from '../../components/cards/ContentCard';
|
|
7
|
+
import PrimaryButton from '../../components/buttons/PrimaryButton';
|
|
8
|
+
import SecondaryButton from '../../components/buttons/SecondaryButton';
|
|
9
|
+
import CheckListItem from '../../components/lists/CheckListItem';
|
|
10
|
+
import AnimatedServerError from '../../components/icons/animated/errors/AnimatedServerError';
|
|
11
|
+
import { getColor } from '../../utils/client';
|
|
12
|
+
import type { ServerErrorScreenProps } from '../../types';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Server Error Screen (5xx errors)
|
|
16
|
+
*
|
|
17
|
+
* Displayed when the server encounters an error.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
export const ServerErrorScreen: React.FC<ServerErrorScreenProps> = ({
|
|
21
|
+
title,
|
|
22
|
+
description,
|
|
23
|
+
statusCode = 500,
|
|
24
|
+
onRetry,
|
|
25
|
+
onHome,
|
|
26
|
+
retryButtonText = 'Try Again',
|
|
27
|
+
homeButtonText = 'Go Home',
|
|
28
|
+
support,
|
|
29
|
+
theme,
|
|
30
|
+
primaryColor,
|
|
31
|
+
backgroundColor,
|
|
32
|
+
}) => {
|
|
33
|
+
const errorColor = primaryColor || theme?.error || getColor('error');
|
|
34
|
+
|
|
35
|
+
// Get default content based on status code
|
|
36
|
+
const getDefaultContent = () => {
|
|
37
|
+
switch (statusCode) {
|
|
38
|
+
case 502:
|
|
39
|
+
return {
|
|
40
|
+
title: 'Bad Gateway',
|
|
41
|
+
description: 'The server received an invalid response. Please try again in a moment.',
|
|
42
|
+
};
|
|
43
|
+
case 503:
|
|
44
|
+
return {
|
|
45
|
+
title: 'Service Unavailable',
|
|
46
|
+
description: 'The server is temporarily unable to handle your request. Please try again later.',
|
|
47
|
+
};
|
|
48
|
+
case 504:
|
|
49
|
+
return {
|
|
50
|
+
title: 'Gateway Timeout',
|
|
51
|
+
description: 'The server took too long to respond. Please try again.',
|
|
52
|
+
};
|
|
53
|
+
default:
|
|
54
|
+
return {
|
|
55
|
+
title: 'Server Error',
|
|
56
|
+
description: 'Something went wrong on our end. We\'re working to fix it.',
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const defaultContent = getDefaultContent();
|
|
62
|
+
const finalTitle = title || defaultContent.title;
|
|
63
|
+
const finalDescription = description || defaultContent.description;
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<ScreenContainer backgroundColor={backgroundColor || theme?.background}>
|
|
67
|
+
{/* Icon with badge */}
|
|
68
|
+
<IconWithBadge
|
|
69
|
+
icon={<AnimatedServerError size={48} color={errorColor} />}
|
|
70
|
+
iconBackgroundColor="#FEE2E2"
|
|
71
|
+
badge={<Text style={styles.badgeIcon}>!</Text>}
|
|
72
|
+
badgeBackgroundColor={errorColor}
|
|
73
|
+
/>
|
|
74
|
+
|
|
75
|
+
{/* Status code badge */}
|
|
76
|
+
<StatusBadge
|
|
77
|
+
text={`Error ${statusCode}`}
|
|
78
|
+
backgroundColor="#FEE2E2"
|
|
79
|
+
textColor={errorColor}
|
|
80
|
+
/>
|
|
81
|
+
|
|
82
|
+
{/* Title */}
|
|
83
|
+
<Text style={[styles.title, theme?.textPrimary ? { color: theme.textPrimary } : undefined]}>
|
|
84
|
+
{finalTitle}
|
|
85
|
+
</Text>
|
|
86
|
+
|
|
87
|
+
{/* Description */}
|
|
88
|
+
<Text style={[styles.description, theme?.textSecondary ? { color: theme.textSecondary } : undefined]}>
|
|
89
|
+
{finalDescription}
|
|
90
|
+
</Text>
|
|
91
|
+
|
|
92
|
+
{/* What's happening card */}
|
|
93
|
+
<ContentCard title="What's happening?">
|
|
94
|
+
<CheckListItem text="Our team is actively working on this" />
|
|
95
|
+
<CheckListItem text="Your data is safe and secure" />
|
|
96
|
+
<CheckListItem text="We'll be back as soon as possible" />
|
|
97
|
+
</ContentCard>
|
|
98
|
+
|
|
99
|
+
{/* Action buttons */}
|
|
100
|
+
{onRetry && (
|
|
101
|
+
<PrimaryButton onPress={onRetry} backgroundColor={errorColor}>
|
|
102
|
+
{retryButtonText}
|
|
103
|
+
</PrimaryButton>
|
|
104
|
+
)}
|
|
105
|
+
|
|
106
|
+
{onHome && (
|
|
107
|
+
<SecondaryButton onPress={onHome}>
|
|
108
|
+
{homeButtonText}
|
|
109
|
+
</SecondaryButton>
|
|
110
|
+
)}
|
|
111
|
+
</ScreenContainer>
|
|
112
|
+
);
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
const styles = StyleSheet.create({
|
|
116
|
+
title: {
|
|
117
|
+
fontSize: 24,
|
|
118
|
+
fontWeight: '700',
|
|
119
|
+
color: '#1F2937',
|
|
120
|
+
textAlign: 'center',
|
|
121
|
+
marginBottom: 12,
|
|
122
|
+
lineHeight: 32,
|
|
123
|
+
},
|
|
124
|
+
description: {
|
|
125
|
+
fontSize: 16,
|
|
126
|
+
fontWeight: '400',
|
|
127
|
+
color: '#6B7280',
|
|
128
|
+
textAlign: 'center',
|
|
129
|
+
lineHeight: 24,
|
|
130
|
+
marginBottom: 24,
|
|
131
|
+
},
|
|
132
|
+
badgeIcon: {
|
|
133
|
+
color: '#FFFFFF',
|
|
134
|
+
fontSize: 20,
|
|
135
|
+
fontWeight: '700',
|
|
136
|
+
},
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
export default ServerErrorScreen;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Error Screens - Barrel Export
|
|
2
|
+
export { ErrorBoundaryScreen } from './ErrorBoundaryScreen';
|
|
3
|
+
export { ServerErrorScreen } from './ServerErrorScreen';
|
|
4
|
+
export { ClientErrorScreen } from './ClientErrorScreen';
|
|
5
|
+
export { InvalidResponseScreen } from './InvalidResponseScreen';
|
|
6
|
+
export { ApiErrorScreen } from './ApiErrorScreen';
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text, StyleSheet } from 'react-native';
|
|
3
|
+
import ScreenContainer from '../../components/layout/ScreenContainer';
|
|
4
|
+
import IconWithBadge from '../../components/icons/utilities/IconWithBadge';
|
|
5
|
+
import ContentCard from '../../components/cards/ContentCard';
|
|
6
|
+
import PrimaryButton from '../../components/buttons/PrimaryButton';
|
|
7
|
+
import SecondaryButton from '../../components/buttons/SecondaryButton';
|
|
8
|
+
import AnimatedTimeout from '../../components/icons/animated/network/AnimatedTimeout';
|
|
9
|
+
import { getColor } from '../../utils/client';
|
|
10
|
+
import type { ApiTimeoutScreenProps } from '../../types';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* API Timeout Screen
|
|
14
|
+
*
|
|
15
|
+
* Displayed when an API request times out.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
export const ApiTimeoutScreen: React.FC<ApiTimeoutScreenProps> = ({
|
|
19
|
+
title = 'Request Timed Out',
|
|
20
|
+
description = 'The server took too long to respond. Please try again.',
|
|
21
|
+
onRetry,
|
|
22
|
+
onHome,
|
|
23
|
+
retryButtonText = 'Try Again',
|
|
24
|
+
homeButtonText = 'Go Home',
|
|
25
|
+
support,
|
|
26
|
+
theme,
|
|
27
|
+
primaryColor,
|
|
28
|
+
backgroundColor,
|
|
29
|
+
}) => {
|
|
30
|
+
const warningColor = primaryColor || theme?.warning || getColor('warning');
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<ScreenContainer backgroundColor={backgroundColor || theme?.background}>
|
|
34
|
+
{/* Icon with badge */}
|
|
35
|
+
<IconWithBadge
|
|
36
|
+
icon={<AnimatedTimeout size={48} color={warningColor} />}
|
|
37
|
+
iconBackgroundColor="#FED7AA"
|
|
38
|
+
badge={<Text style={styles.badgeIcon}>!</Text>}
|
|
39
|
+
badgeBackgroundColor={warningColor}
|
|
40
|
+
/>
|
|
41
|
+
|
|
42
|
+
{/* Title */}
|
|
43
|
+
<Text style={[styles.title, theme?.textPrimary ? { color: theme.textPrimary } : undefined]}>
|
|
44
|
+
{title}
|
|
45
|
+
</Text>
|
|
46
|
+
|
|
47
|
+
{/* Description */}
|
|
48
|
+
<Text style={[styles.description, theme?.textSecondary ? { color: theme.textSecondary } : undefined]}>
|
|
49
|
+
{description}
|
|
50
|
+
</Text>
|
|
51
|
+
|
|
52
|
+
{/* What happened card */}
|
|
53
|
+
<ContentCard title="What happened?">
|
|
54
|
+
<Text style={styles.cardText}>
|
|
55
|
+
The request took longer than expected. This could be due to slow network or server issues.
|
|
56
|
+
</Text>
|
|
57
|
+
</ContentCard>
|
|
58
|
+
|
|
59
|
+
{/* Action buttons */}
|
|
60
|
+
{onRetry && (
|
|
61
|
+
<PrimaryButton onPress={onRetry} backgroundColor={warningColor}>
|
|
62
|
+
{retryButtonText}
|
|
63
|
+
</PrimaryButton>
|
|
64
|
+
)}
|
|
65
|
+
|
|
66
|
+
{onHome && (
|
|
67
|
+
<SecondaryButton onPress={onHome}>
|
|
68
|
+
{homeButtonText}
|
|
69
|
+
</SecondaryButton>
|
|
70
|
+
)}
|
|
71
|
+
</ScreenContainer>
|
|
72
|
+
);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const styles = StyleSheet.create({
|
|
76
|
+
title: {
|
|
77
|
+
fontSize: 24,
|
|
78
|
+
fontWeight: '700',
|
|
79
|
+
color: '#1F2937',
|
|
80
|
+
textAlign: 'center',
|
|
81
|
+
marginBottom: 12,
|
|
82
|
+
lineHeight: 32,
|
|
83
|
+
},
|
|
84
|
+
description: {
|
|
85
|
+
fontSize: 16,
|
|
86
|
+
fontWeight: '400',
|
|
87
|
+
color: '#6B7280',
|
|
88
|
+
textAlign: 'center',
|
|
89
|
+
lineHeight: 24,
|
|
90
|
+
marginBottom: 24,
|
|
91
|
+
},
|
|
92
|
+
cardText: {
|
|
93
|
+
fontSize: 14,
|
|
94
|
+
color: '#6B7280',
|
|
95
|
+
lineHeight: 20,
|
|
96
|
+
},
|
|
97
|
+
badgeIcon: {
|
|
98
|
+
color: '#FFFFFF',
|
|
99
|
+
fontSize: 20,
|
|
100
|
+
fontWeight: '700',
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
export default ApiTimeoutScreen;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text, StyleSheet } from 'react-native';
|
|
3
|
+
import ScreenContainer from '../../components/layout/ScreenContainer';
|
|
4
|
+
import IconWithBadge from '../../components/icons/utilities/IconWithBadge';
|
|
5
|
+
import ContentCard from '../../components/cards/ContentCard';
|
|
6
|
+
import PrimaryButton from '../../components/buttons/PrimaryButton';
|
|
7
|
+
import SecondaryButton from '../../components/buttons/SecondaryButton';
|
|
8
|
+
import CheckListItem from '../../components/lists/CheckListItem';
|
|
9
|
+
import AnimatedWifiOff from '../../components/icons/animated/network/AnimatedWifiOff';
|
|
10
|
+
import { getColor } from '../../utils/client';
|
|
11
|
+
import type { NetworkOfflineScreenProps } from '../../types';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Network Offline Screen
|
|
15
|
+
*
|
|
16
|
+
* Displayed when the device has no internet connection.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
export const NetworkOfflineScreen: React.FC<NetworkOfflineScreenProps> = ({
|
|
20
|
+
title = 'No Internet Connection',
|
|
21
|
+
description = 'Please check your connection and try again.',
|
|
22
|
+
onRetry,
|
|
23
|
+
retryButtonText = 'Try Again',
|
|
24
|
+
support,
|
|
25
|
+
theme,
|
|
26
|
+
primaryColor,
|
|
27
|
+
backgroundColor,
|
|
28
|
+
}) => {
|
|
29
|
+
const warningColor = primaryColor || theme?.warning || getColor('warning');
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<ScreenContainer backgroundColor={backgroundColor || theme?.background}>
|
|
33
|
+
{/* Icon with badge */}
|
|
34
|
+
<IconWithBadge
|
|
35
|
+
icon={<AnimatedWifiOff size={48} color={warningColor} />}
|
|
36
|
+
iconBackgroundColor="#FEF3C7"
|
|
37
|
+
badge={<Text style={styles.badgeIcon}>✕</Text>}
|
|
38
|
+
badgeBackgroundColor={warningColor}
|
|
39
|
+
/>
|
|
40
|
+
|
|
41
|
+
{/* Title */}
|
|
42
|
+
<Text style={[styles.title, theme?.textPrimary ? { color: theme.textPrimary } : undefined]}>
|
|
43
|
+
{title}
|
|
44
|
+
</Text>
|
|
45
|
+
|
|
46
|
+
{/* Description */}
|
|
47
|
+
<Text style={[styles.description, theme?.textSecondary ? { color: theme.textSecondary } : undefined]}>
|
|
48
|
+
{description}
|
|
49
|
+
</Text>
|
|
50
|
+
|
|
51
|
+
{/* Quick tips card */}
|
|
52
|
+
<ContentCard title="Quick tips">
|
|
53
|
+
<CheckListItem text="Check your WiFi or mobile data" />
|
|
54
|
+
<CheckListItem text="Try turning airplane mode off" />
|
|
55
|
+
<CheckListItem text="Move to an area with better signal" />
|
|
56
|
+
</ContentCard>
|
|
57
|
+
|
|
58
|
+
{/* Action button */}
|
|
59
|
+
{onRetry && (
|
|
60
|
+
<PrimaryButton onPress={onRetry} backgroundColor={warningColor}>
|
|
61
|
+
{retryButtonText}
|
|
62
|
+
</PrimaryButton>
|
|
63
|
+
)}
|
|
64
|
+
</ScreenContainer>
|
|
65
|
+
);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const styles = StyleSheet.create({
|
|
69
|
+
title: {
|
|
70
|
+
fontSize: 24,
|
|
71
|
+
fontWeight: '700',
|
|
72
|
+
color: '#1F2937',
|
|
73
|
+
textAlign: 'center',
|
|
74
|
+
marginBottom: 12,
|
|
75
|
+
lineHeight: 32,
|
|
76
|
+
},
|
|
77
|
+
description: {
|
|
78
|
+
fontSize: 16,
|
|
79
|
+
fontWeight: '400',
|
|
80
|
+
color: '#6B7280',
|
|
81
|
+
textAlign: 'center',
|
|
82
|
+
lineHeight: 24,
|
|
83
|
+
marginBottom: 24,
|
|
84
|
+
},
|
|
85
|
+
badgeIcon: {
|
|
86
|
+
color: '#FFFFFF',
|
|
87
|
+
fontSize: 20,
|
|
88
|
+
fontWeight: '700',
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
export default NetworkOfflineScreen;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text, StyleSheet } from 'react-native';
|
|
3
|
+
import ScreenContainer from '../../components/layout/ScreenContainer';
|
|
4
|
+
import IconWithBadge from '../../components/icons/utilities/IconWithBadge';
|
|
5
|
+
import ContentCard from '../../components/cards/ContentCard';
|
|
6
|
+
import PrimaryButton from '../../components/buttons/PrimaryButton';
|
|
7
|
+
import SecondaryButton from '../../components/buttons/SecondaryButton';
|
|
8
|
+
import AnimatedSpeedGauge from '../../components/icons/animated/network/AnimatedSpeedGauge';
|
|
9
|
+
import { getColor } from '../../utils/client';
|
|
10
|
+
import type { NetworkSlowConnectionScreenProps } from '../../types';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Network Slow Connection Screen
|
|
14
|
+
*
|
|
15
|
+
* Displayed when the network connection is slow.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
export const NetworkSlowConnectionScreen: React.FC<NetworkSlowConnectionScreenProps> = ({
|
|
19
|
+
title = 'Slow Connection Detected',
|
|
20
|
+
description = 'Your internet connection is slower than usual. You can continue or wait for a better connection.',
|
|
21
|
+
onContinue,
|
|
22
|
+
onRetry,
|
|
23
|
+
continueButtonText = 'Continue Anyway',
|
|
24
|
+
retryButtonText = 'Try Again',
|
|
25
|
+
support,
|
|
26
|
+
theme,
|
|
27
|
+
primaryColor,
|
|
28
|
+
backgroundColor,
|
|
29
|
+
}) => {
|
|
30
|
+
const warningColor = primaryColor || theme?.warning || getColor('warning');
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<ScreenContainer backgroundColor={backgroundColor || theme?.background}>
|
|
34
|
+
{/* Icon with badge */}
|
|
35
|
+
<IconWithBadge
|
|
36
|
+
icon={<AnimatedSpeedGauge size={48} color={warningColor} />}
|
|
37
|
+
iconBackgroundColor="#FEF3C7"
|
|
38
|
+
badge={<Text style={styles.badgeIcon}>!</Text>}
|
|
39
|
+
badgeBackgroundColor={warningColor}
|
|
40
|
+
/>
|
|
41
|
+
|
|
42
|
+
{/* Title */}
|
|
43
|
+
<Text style={[styles.title, theme?.textPrimary ? { color: theme.textPrimary } : undefined]}>
|
|
44
|
+
{title}
|
|
45
|
+
</Text>
|
|
46
|
+
|
|
47
|
+
{/* Description */}
|
|
48
|
+
<Text style={[styles.description, theme?.textSecondary ? { color: theme.textSecondary } : undefined]}>
|
|
49
|
+
{description}
|
|
50
|
+
</Text>
|
|
51
|
+
|
|
52
|
+
{/* Action buttons */}
|
|
53
|
+
{onContinue && (
|
|
54
|
+
<PrimaryButton onPress={onContinue} backgroundColor={warningColor}>
|
|
55
|
+
{continueButtonText}
|
|
56
|
+
</PrimaryButton>
|
|
57
|
+
)}
|
|
58
|
+
|
|
59
|
+
{onRetry && (
|
|
60
|
+
<SecondaryButton onPress={onRetry}>
|
|
61
|
+
{retryButtonText}
|
|
62
|
+
</SecondaryButton>
|
|
63
|
+
)}
|
|
64
|
+
</ScreenContainer>
|
|
65
|
+
);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const styles = StyleSheet.create({
|
|
69
|
+
title: {
|
|
70
|
+
fontSize: 24,
|
|
71
|
+
fontWeight: '700',
|
|
72
|
+
color: '#1F2937',
|
|
73
|
+
textAlign: 'center',
|
|
74
|
+
marginBottom: 12,
|
|
75
|
+
lineHeight: 32,
|
|
76
|
+
},
|
|
77
|
+
description: {
|
|
78
|
+
fontSize: 16,
|
|
79
|
+
fontWeight: '400',
|
|
80
|
+
color: '#6B7280',
|
|
81
|
+
textAlign: 'center',
|
|
82
|
+
lineHeight: 24,
|
|
83
|
+
marginBottom: 24,
|
|
84
|
+
},
|
|
85
|
+
badgeIcon: {
|
|
86
|
+
color: '#FFFFFF',
|
|
87
|
+
fontSize: 20,
|
|
88
|
+
fontWeight: '700',
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
export default NetworkSlowConnectionScreen;
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text, StyleSheet, View } from 'react-native';
|
|
3
|
+
import ScreenContainer from '../../components/layout/ScreenContainer';
|
|
4
|
+
import IconWithBadge from '../../components/icons/utilities/IconWithBadge';
|
|
5
|
+
import ContentCard from '../../components/cards/ContentCard';
|
|
6
|
+
import PrimaryButton from '../../components/buttons/PrimaryButton';
|
|
7
|
+
import SecondaryButton from '../../components/buttons/SecondaryButton';
|
|
8
|
+
import AnimatedPermissionDenied from '../../components/icons/animated/permissions/AnimatedPermissionDenied';
|
|
9
|
+
import { getColor } from '../../utils/client';
|
|
10
|
+
import type { PermissionDeniedScreenProps } from '../../types';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Permission Denied Screen
|
|
14
|
+
*
|
|
15
|
+
* Displayed when a permission has been denied and needs to be enabled from settings.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
export const PermissionDeniedScreen: React.FC<PermissionDeniedScreenProps> = ({
|
|
19
|
+
title = 'Location Access Blocked',
|
|
20
|
+
description = 'Find nearby services and stores',
|
|
21
|
+
permissionType = 'location',
|
|
22
|
+
reason,
|
|
23
|
+
steps,
|
|
24
|
+
onOpenSettings,
|
|
25
|
+
onContinueWithout,
|
|
26
|
+
settingsButtonText = 'Open Settings',
|
|
27
|
+
continueButtonText = 'Continue Without This Feature',
|
|
28
|
+
support,
|
|
29
|
+
theme,
|
|
30
|
+
primaryColor,
|
|
31
|
+
backgroundColor,
|
|
32
|
+
}) => {
|
|
33
|
+
const warningColor = primaryColor || theme?.warning || getColor('warning');
|
|
34
|
+
|
|
35
|
+
const defaultSteps = [
|
|
36
|
+
'Open your device Settings',
|
|
37
|
+
'Go to Apps or Application Manager',
|
|
38
|
+
'Find and select this app',
|
|
39
|
+
`Tap Permissions and enable ${permissionType}`,
|
|
40
|
+
];
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<ScreenContainer backgroundColor={backgroundColor || theme?.background}>
|
|
44
|
+
{/* Icon with badge */}
|
|
45
|
+
<IconWithBadge
|
|
46
|
+
icon={<AnimatedPermissionDenied size={48} color={warningColor} />}
|
|
47
|
+
iconBackgroundColor="#FED7AA"
|
|
48
|
+
badge={<Text style={styles.badgeIcon}>✕</Text>}
|
|
49
|
+
badgeBackgroundColor={warningColor}
|
|
50
|
+
/>
|
|
51
|
+
|
|
52
|
+
{/* Title */}
|
|
53
|
+
<Text style={[styles.title, theme?.textPrimary ? { color: theme.textPrimary } : undefined]}>
|
|
54
|
+
{title}
|
|
55
|
+
</Text>
|
|
56
|
+
|
|
57
|
+
{/* Description */}
|
|
58
|
+
<Text style={[styles.description, theme?.textSecondary ? { color: theme.textSecondary } : undefined]}>
|
|
59
|
+
{description}
|
|
60
|
+
</Text>
|
|
61
|
+
|
|
62
|
+
{/* Why we need this card */}
|
|
63
|
+
<ContentCard title="Why we need this permission">
|
|
64
|
+
<Text style={styles.cardText}>
|
|
65
|
+
{reason || `We use your ${permissionType} to show nearby options and provide location-based features.`}
|
|
66
|
+
</Text>
|
|
67
|
+
</ContentCard>
|
|
68
|
+
|
|
69
|
+
{/* Permission Denied card */}
|
|
70
|
+
<ContentCard style={styles.warningCard}>
|
|
71
|
+
<View style={styles.warningHeader}>
|
|
72
|
+
<Text style={styles.warningIcon}>⚠️</Text>
|
|
73
|
+
<Text style={styles.warningTitle}>Permission Denied</Text>
|
|
74
|
+
</View>
|
|
75
|
+
<Text style={styles.warningText}>
|
|
76
|
+
You previously denied this permission. Please enable it from your device settings:
|
|
77
|
+
</Text>
|
|
78
|
+
{(steps || defaultSteps).map((step, index) => (
|
|
79
|
+
<Text key={index} style={styles.stepText}>
|
|
80
|
+
{index + 1}. {step}
|
|
81
|
+
</Text>
|
|
82
|
+
))}
|
|
83
|
+
</ContentCard>
|
|
84
|
+
|
|
85
|
+
{/* Security assurance card */}
|
|
86
|
+
<ContentCard style={styles.securityCard}>
|
|
87
|
+
<Text style={styles.securityText}>
|
|
88
|
+
✓ Your data is secure. We only use this permission for the stated purpose and never share it with third parties.
|
|
89
|
+
</Text>
|
|
90
|
+
</ContentCard>
|
|
91
|
+
|
|
92
|
+
{/* Action buttons */}
|
|
93
|
+
{onOpenSettings && (
|
|
94
|
+
<PrimaryButton onPress={onOpenSettings} backgroundColor={warningColor}>
|
|
95
|
+
{settingsButtonText}
|
|
96
|
+
</PrimaryButton>
|
|
97
|
+
)}
|
|
98
|
+
|
|
99
|
+
{onContinueWithout && (
|
|
100
|
+
<SecondaryButton onPress={onContinueWithout}>
|
|
101
|
+
{continueButtonText}
|
|
102
|
+
</SecondaryButton>
|
|
103
|
+
)}
|
|
104
|
+
</ScreenContainer>
|
|
105
|
+
);
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
const styles = StyleSheet.create({
|
|
109
|
+
title: {
|
|
110
|
+
fontSize: 24,
|
|
111
|
+
fontWeight: '700',
|
|
112
|
+
color: '#1F2937',
|
|
113
|
+
textAlign: 'center',
|
|
114
|
+
marginBottom: 12,
|
|
115
|
+
lineHeight: 32,
|
|
116
|
+
},
|
|
117
|
+
description: {
|
|
118
|
+
fontSize: 16,
|
|
119
|
+
fontWeight: '400',
|
|
120
|
+
color: '#6B7280',
|
|
121
|
+
textAlign: 'center',
|
|
122
|
+
lineHeight: 24,
|
|
123
|
+
marginBottom: 24,
|
|
124
|
+
},
|
|
125
|
+
cardText: {
|
|
126
|
+
fontSize: 14,
|
|
127
|
+
color: '#6B7280',
|
|
128
|
+
lineHeight: 20,
|
|
129
|
+
},
|
|
130
|
+
warningCard: {
|
|
131
|
+
backgroundColor: '#FEF3C7',
|
|
132
|
+
borderColor: '#FCD34D',
|
|
133
|
+
},
|
|
134
|
+
warningHeader: {
|
|
135
|
+
flexDirection: 'row',
|
|
136
|
+
alignItems: 'center',
|
|
137
|
+
marginBottom: 8,
|
|
138
|
+
},
|
|
139
|
+
warningIcon: {
|
|
140
|
+
fontSize: 20,
|
|
141
|
+
marginRight: 8,
|
|
142
|
+
},
|
|
143
|
+
warningTitle: {
|
|
144
|
+
fontSize: 16,
|
|
145
|
+
fontWeight: '600',
|
|
146
|
+
color: '#92400E',
|
|
147
|
+
},
|
|
148
|
+
warningText: {
|
|
149
|
+
fontSize: 14,
|
|
150
|
+
color: '#92400E',
|
|
151
|
+
lineHeight: 20,
|
|
152
|
+
marginBottom: 12,
|
|
153
|
+
},
|
|
154
|
+
stepText: {
|
|
155
|
+
fontSize: 14,
|
|
156
|
+
color: '#92400E',
|
|
157
|
+
lineHeight: 20,
|
|
158
|
+
marginBottom: 4,
|
|
159
|
+
},
|
|
160
|
+
securityCard: {
|
|
161
|
+
backgroundColor: '#D1FAE5',
|
|
162
|
+
borderColor: '#6EE7B7',
|
|
163
|
+
},
|
|
164
|
+
securityText: {
|
|
165
|
+
fontSize: 14,
|
|
166
|
+
color: '#065F46',
|
|
167
|
+
lineHeight: 20,
|
|
168
|
+
},
|
|
169
|
+
badgeIcon: {
|
|
170
|
+
color: '#FFFFFF',
|
|
171
|
+
fontSize: 20,
|
|
172
|
+
fontWeight: '700',
|
|
173
|
+
},
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
export default PermissionDeniedScreen;
|