@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,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { NetworkOfflineScreenProps } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Network Offline Screen
|
|
5
|
+
*
|
|
6
|
+
* Displayed when the device has no internet connection.
|
|
7
|
+
*/
|
|
8
|
+
export declare const NetworkOfflineScreen: React.FC<NetworkOfflineScreenProps>;
|
|
9
|
+
export default NetworkOfflineScreen;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
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 CheckListItem from '../../components/lists/CheckListItem';
|
|
8
|
+
import AnimatedWifiOff from '../../components/icons/animated/network/AnimatedWifiOff';
|
|
9
|
+
import { getColor } from '../../utils/client';
|
|
10
|
+
/**
|
|
11
|
+
* Network Offline Screen
|
|
12
|
+
*
|
|
13
|
+
* Displayed when the device has no internet connection.
|
|
14
|
+
*/
|
|
15
|
+
export const NetworkOfflineScreen = ({ title = 'No Internet Connection', description = 'Please check your connection and try again.', onRetry, retryButtonText = 'Try Again', support, theme, primaryColor, backgroundColor, }) => {
|
|
16
|
+
const warningColor = primaryColor || theme?.warning || getColor('warning');
|
|
17
|
+
return (_jsxs(ScreenContainer, { backgroundColor: backgroundColor || theme?.background, children: [_jsx(IconWithBadge, { icon: _jsx(AnimatedWifiOff, { size: 48, color: warningColor }), iconBackgroundColor: "#FEF3C7", badge: _jsx(Text, { style: styles.badgeIcon, children: "\u2715" }), badgeBackgroundColor: warningColor }), _jsx(Text, { style: [styles.title, theme?.textPrimary ? { color: theme.textPrimary } : undefined], children: title }), _jsx(Text, { style: [styles.description, theme?.textSecondary ? { color: theme.textSecondary } : undefined], children: description }), _jsxs(ContentCard, { title: "Quick tips", children: [_jsx(CheckListItem, { text: "Check your WiFi or mobile data" }), _jsx(CheckListItem, { text: "Try turning airplane mode off" }), _jsx(CheckListItem, { text: "Move to an area with better signal" })] }), onRetry && (_jsx(PrimaryButton, { onPress: onRetry, backgroundColor: warningColor, children: retryButtonText }))] }));
|
|
18
|
+
};
|
|
19
|
+
const styles = StyleSheet.create({
|
|
20
|
+
title: {
|
|
21
|
+
fontSize: 24,
|
|
22
|
+
fontWeight: '700',
|
|
23
|
+
color: '#1F2937',
|
|
24
|
+
textAlign: 'center',
|
|
25
|
+
marginBottom: 12,
|
|
26
|
+
lineHeight: 32,
|
|
27
|
+
},
|
|
28
|
+
description: {
|
|
29
|
+
fontSize: 16,
|
|
30
|
+
fontWeight: '400',
|
|
31
|
+
color: '#6B7280',
|
|
32
|
+
textAlign: 'center',
|
|
33
|
+
lineHeight: 24,
|
|
34
|
+
marginBottom: 24,
|
|
35
|
+
},
|
|
36
|
+
badgeIcon: {
|
|
37
|
+
color: '#FFFFFF',
|
|
38
|
+
fontSize: 20,
|
|
39
|
+
fontWeight: '700',
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
export default NetworkOfflineScreen;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { NetworkSlowConnectionScreenProps } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Network Slow Connection Screen
|
|
5
|
+
*
|
|
6
|
+
* Displayed when the network connection is slow.
|
|
7
|
+
*/
|
|
8
|
+
export declare const NetworkSlowConnectionScreen: React.FC<NetworkSlowConnectionScreenProps>;
|
|
9
|
+
export default NetworkSlowConnectionScreen;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Text, StyleSheet } from 'react-native';
|
|
3
|
+
import ScreenContainer from '../../components/layout/ScreenContainer';
|
|
4
|
+
import IconWithBadge from '../../components/icons/utilities/IconWithBadge';
|
|
5
|
+
import PrimaryButton from '../../components/buttons/PrimaryButton';
|
|
6
|
+
import SecondaryButton from '../../components/buttons/SecondaryButton';
|
|
7
|
+
import AnimatedSpeedGauge from '../../components/icons/animated/network/AnimatedSpeedGauge';
|
|
8
|
+
import { getColor } from '../../utils/client';
|
|
9
|
+
/**
|
|
10
|
+
* Network Slow Connection Screen
|
|
11
|
+
*
|
|
12
|
+
* Displayed when the network connection is slow.
|
|
13
|
+
*/
|
|
14
|
+
export const NetworkSlowConnectionScreen = ({ title = 'Slow Connection Detected', description = 'Your internet connection is slower than usual. You can continue or wait for a better connection.', onContinue, onRetry, continueButtonText = 'Continue Anyway', retryButtonText = 'Try Again', support, theme, primaryColor, backgroundColor, }) => {
|
|
15
|
+
const warningColor = primaryColor || theme?.warning || getColor('warning');
|
|
16
|
+
return (_jsxs(ScreenContainer, { backgroundColor: backgroundColor || theme?.background, children: [_jsx(IconWithBadge, { icon: _jsx(AnimatedSpeedGauge, { size: 48, color: warningColor }), iconBackgroundColor: "#FEF3C7", badge: _jsx(Text, { style: styles.badgeIcon, children: "!" }), badgeBackgroundColor: warningColor }), _jsx(Text, { style: [styles.title, theme?.textPrimary ? { color: theme.textPrimary } : undefined], children: title }), _jsx(Text, { style: [styles.description, theme?.textSecondary ? { color: theme.textSecondary } : undefined], children: description }), onContinue && (_jsx(PrimaryButton, { onPress: onContinue, backgroundColor: warningColor, children: continueButtonText })), onRetry && (_jsx(SecondaryButton, { onPress: onRetry, children: retryButtonText }))] }));
|
|
17
|
+
};
|
|
18
|
+
const styles = StyleSheet.create({
|
|
19
|
+
title: {
|
|
20
|
+
fontSize: 24,
|
|
21
|
+
fontWeight: '700',
|
|
22
|
+
color: '#1F2937',
|
|
23
|
+
textAlign: 'center',
|
|
24
|
+
marginBottom: 12,
|
|
25
|
+
lineHeight: 32,
|
|
26
|
+
},
|
|
27
|
+
description: {
|
|
28
|
+
fontSize: 16,
|
|
29
|
+
fontWeight: '400',
|
|
30
|
+
color: '#6B7280',
|
|
31
|
+
textAlign: 'center',
|
|
32
|
+
lineHeight: 24,
|
|
33
|
+
marginBottom: 24,
|
|
34
|
+
},
|
|
35
|
+
badgeIcon: {
|
|
36
|
+
color: '#FFFFFF',
|
|
37
|
+
fontSize: 20,
|
|
38
|
+
fontWeight: '700',
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
export default NetworkSlowConnectionScreen;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PermissionDeniedScreenProps } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Permission Denied Screen
|
|
5
|
+
*
|
|
6
|
+
* Displayed when a permission has been denied and needs to be enabled from settings.
|
|
7
|
+
*/
|
|
8
|
+
export declare const PermissionDeniedScreen: React.FC<PermissionDeniedScreenProps>;
|
|
9
|
+
export default PermissionDeniedScreen;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
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
|
+
/**
|
|
11
|
+
* Permission Denied Screen
|
|
12
|
+
*
|
|
13
|
+
* Displayed when a permission has been denied and needs to be enabled from settings.
|
|
14
|
+
*/
|
|
15
|
+
export const PermissionDeniedScreen = ({ title = 'Location Access Blocked', description = 'Find nearby services and stores', permissionType = 'location', reason, steps, onOpenSettings, onContinueWithout, settingsButtonText = 'Open Settings', continueButtonText = 'Continue Without This Feature', support, theme, primaryColor, backgroundColor, }) => {
|
|
16
|
+
const warningColor = primaryColor || theme?.warning || getColor('warning');
|
|
17
|
+
const defaultSteps = [
|
|
18
|
+
'Open your device Settings',
|
|
19
|
+
'Go to Apps or Application Manager',
|
|
20
|
+
'Find and select this app',
|
|
21
|
+
`Tap Permissions and enable ${permissionType}`,
|
|
22
|
+
];
|
|
23
|
+
return (_jsxs(ScreenContainer, { backgroundColor: backgroundColor || theme?.background, children: [_jsx(IconWithBadge, { icon: _jsx(AnimatedPermissionDenied, { size: 48, color: warningColor }), iconBackgroundColor: "#FED7AA", badge: _jsx(Text, { style: styles.badgeIcon, children: "\u2715" }), badgeBackgroundColor: warningColor }), _jsx(Text, { style: [styles.title, theme?.textPrimary ? { color: theme.textPrimary } : undefined], children: title }), _jsx(Text, { style: [styles.description, theme?.textSecondary ? { color: theme.textSecondary } : undefined], children: description }), _jsx(ContentCard, { title: "Why we need this permission", children: _jsx(Text, { style: styles.cardText, children: reason || `We use your ${permissionType} to show nearby options and provide location-based features.` }) }), _jsxs(ContentCard, { style: styles.warningCard, children: [_jsxs(View, { style: styles.warningHeader, children: [_jsx(Text, { style: styles.warningIcon, children: "\u26A0\uFE0F" }), _jsx(Text, { style: styles.warningTitle, children: "Permission Denied" })] }), _jsx(Text, { style: styles.warningText, children: "You previously denied this permission. Please enable it from your device settings:" }), (steps || defaultSteps).map((step, index) => (_jsxs(Text, { style: styles.stepText, children: [index + 1, ". ", step] }, index)))] }), _jsx(ContentCard, { style: styles.securityCard, children: _jsx(Text, { style: styles.securityText, children: "\u2713 Your data is secure. We only use this permission for the stated purpose and never share it with third parties." }) }), onOpenSettings && (_jsx(PrimaryButton, { onPress: onOpenSettings, backgroundColor: warningColor, children: settingsButtonText })), onContinueWithout && (_jsx(SecondaryButton, { onPress: onContinueWithout, children: continueButtonText }))] }));
|
|
24
|
+
};
|
|
25
|
+
const styles = StyleSheet.create({
|
|
26
|
+
title: {
|
|
27
|
+
fontSize: 24,
|
|
28
|
+
fontWeight: '700',
|
|
29
|
+
color: '#1F2937',
|
|
30
|
+
textAlign: 'center',
|
|
31
|
+
marginBottom: 12,
|
|
32
|
+
lineHeight: 32,
|
|
33
|
+
},
|
|
34
|
+
description: {
|
|
35
|
+
fontSize: 16,
|
|
36
|
+
fontWeight: '400',
|
|
37
|
+
color: '#6B7280',
|
|
38
|
+
textAlign: 'center',
|
|
39
|
+
lineHeight: 24,
|
|
40
|
+
marginBottom: 24,
|
|
41
|
+
},
|
|
42
|
+
cardText: {
|
|
43
|
+
fontSize: 14,
|
|
44
|
+
color: '#6B7280',
|
|
45
|
+
lineHeight: 20,
|
|
46
|
+
},
|
|
47
|
+
warningCard: {
|
|
48
|
+
backgroundColor: '#FEF3C7',
|
|
49
|
+
borderColor: '#FCD34D',
|
|
50
|
+
},
|
|
51
|
+
warningHeader: {
|
|
52
|
+
flexDirection: 'row',
|
|
53
|
+
alignItems: 'center',
|
|
54
|
+
marginBottom: 8,
|
|
55
|
+
},
|
|
56
|
+
warningIcon: {
|
|
57
|
+
fontSize: 20,
|
|
58
|
+
marginRight: 8,
|
|
59
|
+
},
|
|
60
|
+
warningTitle: {
|
|
61
|
+
fontSize: 16,
|
|
62
|
+
fontWeight: '600',
|
|
63
|
+
color: '#92400E',
|
|
64
|
+
},
|
|
65
|
+
warningText: {
|
|
66
|
+
fontSize: 14,
|
|
67
|
+
color: '#92400E',
|
|
68
|
+
lineHeight: 20,
|
|
69
|
+
marginBottom: 12,
|
|
70
|
+
},
|
|
71
|
+
stepText: {
|
|
72
|
+
fontSize: 14,
|
|
73
|
+
color: '#92400E',
|
|
74
|
+
lineHeight: 20,
|
|
75
|
+
marginBottom: 4,
|
|
76
|
+
},
|
|
77
|
+
securityCard: {
|
|
78
|
+
backgroundColor: '#D1FAE5',
|
|
79
|
+
borderColor: '#6EE7B7',
|
|
80
|
+
},
|
|
81
|
+
securityText: {
|
|
82
|
+
fontSize: 14,
|
|
83
|
+
color: '#065F46',
|
|
84
|
+
lineHeight: 20,
|
|
85
|
+
},
|
|
86
|
+
badgeIcon: {
|
|
87
|
+
color: '#FFFFFF',
|
|
88
|
+
fontSize: 20,
|
|
89
|
+
fontWeight: '700',
|
|
90
|
+
},
|
|
91
|
+
});
|
|
92
|
+
export default PermissionDeniedScreen;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PermissionScreenProps, MultiPermissionScreenProps } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Permission Request Screen Component
|
|
5
|
+
*
|
|
6
|
+
* Fully customizable permission request screen.
|
|
7
|
+
* All content, icons, actions, and reasons are configurable via props.
|
|
8
|
+
*/
|
|
9
|
+
export declare const PermissionRequestScreen: React.FC<PermissionScreenProps>;
|
|
10
|
+
/**
|
|
11
|
+
* Multi Permission Request Screen Component
|
|
12
|
+
*
|
|
13
|
+
* Fully customizable multi-permission screen.
|
|
14
|
+
* All content and permissions are configurable via props.
|
|
15
|
+
*/
|
|
16
|
+
export declare const MultiPermissionRequestScreen: React.FC<MultiPermissionScreenProps>;
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef } from 'react';
|
|
3
|
+
import { View, Text, TouchableOpacity, StyleSheet, ScrollView, Animated } from 'react-native';
|
|
4
|
+
import { ShieldIcon, SettingsIcon, CheckCircleIcon, AlertTriangleIcon } from '../../components/icons/utilities';
|
|
5
|
+
import { getColor, getColorWithOpacity, isWeb } from '../../utils/client';
|
|
6
|
+
/**
|
|
7
|
+
* Permission Request Screen Component
|
|
8
|
+
*
|
|
9
|
+
* Fully customizable permission request screen.
|
|
10
|
+
* All content, icons, actions, and reasons are configurable via props.
|
|
11
|
+
*/
|
|
12
|
+
export const PermissionRequestScreen = ({
|
|
13
|
+
// Permission type (for default config)
|
|
14
|
+
permissionType,
|
|
15
|
+
// Content customization
|
|
16
|
+
title, description, icon,
|
|
17
|
+
// Reasons (optional)
|
|
18
|
+
reasons, showReasons = true,
|
|
19
|
+
// Actions
|
|
20
|
+
onAllow, onDeny, onOpenSettings, onSkip,
|
|
21
|
+
// Button text
|
|
22
|
+
allowButtonText = 'Allow', denyButtonText = 'Not Now', settingsButtonText = 'Open Settings', skipButtonText = 'Skip',
|
|
23
|
+
// State
|
|
24
|
+
status = 'not_requested', isOptional = false,
|
|
25
|
+
// Styling
|
|
26
|
+
theme, }) => {
|
|
27
|
+
// Animation
|
|
28
|
+
const fadeAnim = useRef(new Animated.Value(0)).current;
|
|
29
|
+
const scaleAnim = useRef(new Animated.Value(0.9)).current;
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
Animated.parallel([
|
|
32
|
+
Animated.timing(fadeAnim, {
|
|
33
|
+
toValue: 1,
|
|
34
|
+
duration: 300,
|
|
35
|
+
useNativeDriver: true,
|
|
36
|
+
}),
|
|
37
|
+
Animated.spring(scaleAnim, {
|
|
38
|
+
toValue: 1,
|
|
39
|
+
tension: 50,
|
|
40
|
+
friction: 7,
|
|
41
|
+
useNativeDriver: true,
|
|
42
|
+
}),
|
|
43
|
+
]).start();
|
|
44
|
+
}, []);
|
|
45
|
+
// Get default config based on status and permission
|
|
46
|
+
const getDefaultConfig = () => {
|
|
47
|
+
const successColor = theme?.success || getColor('success');
|
|
48
|
+
const errorColor = theme?.error || getColor('error');
|
|
49
|
+
const primaryColor = theme?.primary || getColor('primary');
|
|
50
|
+
switch (status) {
|
|
51
|
+
case 'granted':
|
|
52
|
+
return {
|
|
53
|
+
icon: _jsx(CheckCircleIcon, { size: 48, color: successColor }),
|
|
54
|
+
iconBg: getColorWithOpacity(successColor, 0.1),
|
|
55
|
+
title: 'Permission Granted',
|
|
56
|
+
description: `You've granted ${permissionType || 'the requested'} permission.`,
|
|
57
|
+
color: successColor,
|
|
58
|
+
};
|
|
59
|
+
case 'denied':
|
|
60
|
+
case 'blocked':
|
|
61
|
+
return {
|
|
62
|
+
icon: _jsx(AlertTriangleIcon, { size: 48, color: errorColor }),
|
|
63
|
+
iconBg: getColorWithOpacity(errorColor, 0.1),
|
|
64
|
+
title: 'Permission Denied',
|
|
65
|
+
description: `${permissionType || 'This'} permission is required. Please enable it in settings.`,
|
|
66
|
+
color: errorColor,
|
|
67
|
+
};
|
|
68
|
+
default: // not_requested
|
|
69
|
+
return {
|
|
70
|
+
icon: _jsx(ShieldIcon, { size: 48, color: primaryColor }),
|
|
71
|
+
iconBg: getColorWithOpacity(primaryColor, 0.1),
|
|
72
|
+
title: `${permissionType ? permissionType.charAt(0).toUpperCase() + permissionType.slice(1) : 'Permission'} Required`,
|
|
73
|
+
description: `We need ${permissionType || 'this'} permission to provide you with the best experience.`,
|
|
74
|
+
color: primaryColor,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
const defaultConfig = getDefaultConfig();
|
|
79
|
+
// Use custom values or fallback to defaults
|
|
80
|
+
const finalTitle = title || defaultConfig.title;
|
|
81
|
+
const finalDescription = description || defaultConfig.description;
|
|
82
|
+
const finalIcon = icon || defaultConfig.icon;
|
|
83
|
+
const finalColor = defaultConfig.color;
|
|
84
|
+
return (_jsx(View, { style: [styles.container, theme?.background ? { backgroundColor: theme.background } : undefined], children: _jsx(ScrollView, { contentContainerStyle: styles.scrollContent, showsVerticalScrollIndicator: false, children: _jsxs(Animated.View, { style: [
|
|
85
|
+
styles.content,
|
|
86
|
+
{
|
|
87
|
+
opacity: fadeAnim,
|
|
88
|
+
transform: [{ scale: scaleAnim }],
|
|
89
|
+
},
|
|
90
|
+
], children: [_jsx(View, { style: [styles.iconContainer, { backgroundColor: defaultConfig.iconBg }], children: finalIcon }), _jsx(Text, { style: [styles.title, theme?.textPrimary ? { color: theme.textPrimary } : undefined], children: finalTitle }), _jsx(Text, { style: [styles.description, theme?.textSecondary ? { color: theme.textSecondary } : undefined], children: finalDescription }), isOptional && status === 'not_requested' && (_jsx(View, { style: styles.optionalBadge, children: _jsx(Text, { style: styles.optionalText, children: "Optional" }) })), showReasons && reasons && reasons.length > 0 && (_jsxs(View, { style: styles.reasonsContainer, children: [_jsx(Text, { style: styles.reasonsTitle, children: "Why we need this:" }), reasons.map((reason, index) => (_jsxs(View, { style: styles.reasonItem, children: [_jsx(Text, { style: styles.reasonBullet, children: "\u2022" }), _jsx(Text, { style: styles.reasonText, children: reason })] }, index)))] })), _jsxs(View, { style: styles.buttonsContainer, children: [status === 'not_requested' && onAllow && (_jsx(TouchableOpacity, { style: [styles.button, styles.primaryButton, { backgroundColor: finalColor }], onPress: onAllow, activeOpacity: 0.8, children: _jsx(Text, { style: styles.primaryButtonText, children: allowButtonText }) })), (status === 'denied' || status === 'blocked') && onOpenSettings && (_jsxs(TouchableOpacity, { style: [styles.button, styles.primaryButton, { backgroundColor: finalColor }], onPress: onOpenSettings, activeOpacity: 0.8, children: [_jsx(SettingsIcon, { size: 20, color: "#FFFFFF" }), _jsx(Text, { style: styles.primaryButtonText, children: settingsButtonText })] })), status === 'not_requested' && (onDeny || onSkip) && (_jsx(TouchableOpacity, { style: [styles.button, styles.secondaryButton, { borderColor: finalColor }], onPress: onDeny || onSkip, activeOpacity: 0.8, children: _jsx(Text, { style: [styles.secondaryButtonText, { color: finalColor }], children: isOptional ? skipButtonText : denyButtonText }) }))] })] }) }) }));
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Multi Permission Request Screen Component
|
|
94
|
+
*
|
|
95
|
+
* Fully customizable multi-permission screen.
|
|
96
|
+
* All content and permissions are configurable via props.
|
|
97
|
+
*/
|
|
98
|
+
export const MultiPermissionRequestScreen = ({
|
|
99
|
+
// Permissions list
|
|
100
|
+
permissions,
|
|
101
|
+
// Content
|
|
102
|
+
title = 'Permissions Required', description = 'We need the following permissions to provide you with the best experience',
|
|
103
|
+
// Actions
|
|
104
|
+
onContinue, onOpenSettings,
|
|
105
|
+
// Button text
|
|
106
|
+
continueButtonText = 'Continue', settingsButtonText = 'Grant Permissions',
|
|
107
|
+
// Styling
|
|
108
|
+
theme, }) => {
|
|
109
|
+
// Animation
|
|
110
|
+
const fadeAnim = useRef(new Animated.Value(0)).current;
|
|
111
|
+
const scaleAnim = useRef(new Animated.Value(0.9)).current;
|
|
112
|
+
useEffect(() => {
|
|
113
|
+
Animated.parallel([
|
|
114
|
+
Animated.timing(fadeAnim, {
|
|
115
|
+
toValue: 1,
|
|
116
|
+
duration: 300,
|
|
117
|
+
useNativeDriver: true,
|
|
118
|
+
}),
|
|
119
|
+
Animated.spring(scaleAnim, {
|
|
120
|
+
toValue: 1,
|
|
121
|
+
tension: 50,
|
|
122
|
+
friction: 7,
|
|
123
|
+
useNativeDriver: true,
|
|
124
|
+
}),
|
|
125
|
+
]).start();
|
|
126
|
+
}, []);
|
|
127
|
+
const allGranted = permissions.every(p => p.status === 'granted');
|
|
128
|
+
const hasRequired = permissions.some(p => p.required && p.status !== 'granted');
|
|
129
|
+
const primaryColor = theme?.primary || getColor('primary');
|
|
130
|
+
const successColor = theme?.success || getColor('success');
|
|
131
|
+
const errorColor = theme?.error || getColor('error');
|
|
132
|
+
const warningColor = theme?.warning || getColor('warning');
|
|
133
|
+
return (_jsx(View, { style: [styles.container, theme?.background ? { backgroundColor: theme.background } : undefined], children: _jsx(ScrollView, { contentContainerStyle: styles.scrollContent, showsVerticalScrollIndicator: false, children: _jsxs(Animated.View, { style: [
|
|
134
|
+
styles.content,
|
|
135
|
+
{
|
|
136
|
+
opacity: fadeAnim,
|
|
137
|
+
transform: [{ scale: scaleAnim }],
|
|
138
|
+
},
|
|
139
|
+
], children: [_jsx(View, { style: [styles.iconContainer, { backgroundColor: getColorWithOpacity(primaryColor, 0.1) }], children: _jsx(ShieldIcon, { size: 48, color: primaryColor }) }), _jsx(Text, { style: [styles.title, theme?.textPrimary ? { color: theme.textPrimary } : undefined], children: title }), _jsx(Text, { style: [styles.description, theme?.textSecondary ? { color: theme.textSecondary } : undefined], children: description }), _jsx(View, { style: styles.permissionsList, children: permissions.map((perm, index) => (_jsxs(View, { style: styles.permissionItem, children: [_jsxs(View, { style: styles.permissionInfo, children: [perm.icon || (_jsx(Text, { style: styles.permissionName, children: perm.title || (perm.type ? perm.type.charAt(0).toUpperCase() + perm.type.slice(1) : 'Permission') })), perm.description && (_jsx(Text, { style: styles.permissionDesc, children: perm.description })), !perm.required && (_jsx(Text, { style: styles.permissionOptional, children: "Optional" }))] }), _jsx(View, { style: styles.permissionStatus, children: perm.status === 'granted' ? (_jsx(CheckCircleIcon, { size: 24, color: successColor })) : (_jsx(View, { style: [styles.permissionBadge, { backgroundColor: perm.required ? getColorWithOpacity(errorColor, 0.1) : getColorWithOpacity(warningColor, 0.1) }], children: _jsx(Text, { style: [styles.permissionBadgeText, { color: perm.required ? errorColor : warningColor }], children: perm.status === 'denied' || perm.status === 'blocked' ? 'Denied' : 'Required' }) })) })] }, index))) }), _jsxs(View, { style: styles.buttonsContainer, children: [!allGranted && hasRequired && onOpenSettings && (_jsxs(TouchableOpacity, { style: [styles.button, styles.primaryButton, { backgroundColor: primaryColor }], onPress: onOpenSettings, activeOpacity: 0.8, children: [_jsx(SettingsIcon, { size: 20, color: "#FFFFFF" }), _jsx(Text, { style: styles.primaryButtonText, children: settingsButtonText })] })), onContinue && !hasRequired && (_jsx(TouchableOpacity, { style: [styles.button, styles.primaryButton, { backgroundColor: primaryColor }], onPress: onContinue, activeOpacity: 0.8, children: _jsx(Text, { style: styles.primaryButtonText, children: continueButtonText }) }))] })] }) }) }));
|
|
140
|
+
};
|
|
141
|
+
const styles = StyleSheet.create({
|
|
142
|
+
container: {
|
|
143
|
+
flex: 1,
|
|
144
|
+
backgroundColor: '#FFFFFF',
|
|
145
|
+
},
|
|
146
|
+
scrollContent: {
|
|
147
|
+
flexGrow: 1,
|
|
148
|
+
justifyContent: 'center',
|
|
149
|
+
padding: 24,
|
|
150
|
+
},
|
|
151
|
+
content: {
|
|
152
|
+
alignItems: 'center',
|
|
153
|
+
maxWidth: 480,
|
|
154
|
+
width: '100%',
|
|
155
|
+
alignSelf: 'center',
|
|
156
|
+
},
|
|
157
|
+
iconContainer: {
|
|
158
|
+
width: 96,
|
|
159
|
+
height: 96,
|
|
160
|
+
borderRadius: 48,
|
|
161
|
+
justifyContent: 'center',
|
|
162
|
+
alignItems: 'center',
|
|
163
|
+
marginBottom: 24,
|
|
164
|
+
},
|
|
165
|
+
title: {
|
|
166
|
+
fontSize: 24,
|
|
167
|
+
fontWeight: '700',
|
|
168
|
+
color: '#1F2937',
|
|
169
|
+
textAlign: 'center',
|
|
170
|
+
marginBottom: 12,
|
|
171
|
+
},
|
|
172
|
+
description: {
|
|
173
|
+
fontSize: 16,
|
|
174
|
+
color: '#6B7280',
|
|
175
|
+
textAlign: 'center',
|
|
176
|
+
lineHeight: 24,
|
|
177
|
+
marginBottom: 24,
|
|
178
|
+
},
|
|
179
|
+
optionalBadge: {
|
|
180
|
+
paddingHorizontal: 12,
|
|
181
|
+
paddingVertical: 6,
|
|
182
|
+
backgroundColor: '#F3F4F6',
|
|
183
|
+
borderRadius: 12,
|
|
184
|
+
marginBottom: 24,
|
|
185
|
+
},
|
|
186
|
+
optionalText: {
|
|
187
|
+
fontSize: 12,
|
|
188
|
+
fontWeight: '600',
|
|
189
|
+
color: '#6B7280',
|
|
190
|
+
},
|
|
191
|
+
reasonsContainer: {
|
|
192
|
+
width: '100%',
|
|
193
|
+
padding: 16,
|
|
194
|
+
backgroundColor: '#F9FAFB',
|
|
195
|
+
borderRadius: 12,
|
|
196
|
+
marginBottom: 24,
|
|
197
|
+
},
|
|
198
|
+
reasonsTitle: {
|
|
199
|
+
fontSize: 14,
|
|
200
|
+
fontWeight: '600',
|
|
201
|
+
color: '#1F2937',
|
|
202
|
+
marginBottom: 12,
|
|
203
|
+
},
|
|
204
|
+
reasonItem: {
|
|
205
|
+
flexDirection: 'row',
|
|
206
|
+
marginBottom: 8,
|
|
207
|
+
},
|
|
208
|
+
reasonBullet: {
|
|
209
|
+
fontSize: 14,
|
|
210
|
+
color: '#6B7280',
|
|
211
|
+
marginRight: 8,
|
|
212
|
+
},
|
|
213
|
+
reasonText: {
|
|
214
|
+
flex: 1,
|
|
215
|
+
fontSize: 14,
|
|
216
|
+
color: '#6B7280',
|
|
217
|
+
lineHeight: 20,
|
|
218
|
+
},
|
|
219
|
+
buttonsContainer: {
|
|
220
|
+
width: '100%',
|
|
221
|
+
},
|
|
222
|
+
button: {
|
|
223
|
+
flexDirection: 'row',
|
|
224
|
+
alignItems: 'center',
|
|
225
|
+
justifyContent: 'center',
|
|
226
|
+
paddingVertical: 14,
|
|
227
|
+
paddingHorizontal: 32,
|
|
228
|
+
borderRadius: 12,
|
|
229
|
+
width: '100%',
|
|
230
|
+
marginBottom: 12,
|
|
231
|
+
},
|
|
232
|
+
buttonIcon: {
|
|
233
|
+
marginRight: 8,
|
|
234
|
+
},
|
|
235
|
+
primaryButton: {
|
|
236
|
+
...(!isWeb() && {
|
|
237
|
+
shadowColor: '#000',
|
|
238
|
+
shadowOffset: { width: 0, height: 2 },
|
|
239
|
+
shadowOpacity: 0.1,
|
|
240
|
+
shadowRadius: 4,
|
|
241
|
+
elevation: 3,
|
|
242
|
+
}),
|
|
243
|
+
},
|
|
244
|
+
primaryButtonText: {
|
|
245
|
+
fontSize: 16,
|
|
246
|
+
fontWeight: '600',
|
|
247
|
+
color: '#FFFFFF',
|
|
248
|
+
},
|
|
249
|
+
secondaryButton: {
|
|
250
|
+
borderWidth: 2,
|
|
251
|
+
backgroundColor: 'transparent',
|
|
252
|
+
},
|
|
253
|
+
secondaryButtonText: {
|
|
254
|
+
fontSize: 16,
|
|
255
|
+
fontWeight: '600',
|
|
256
|
+
},
|
|
257
|
+
// Multi Permission
|
|
258
|
+
permissionsList: {
|
|
259
|
+
width: '100%',
|
|
260
|
+
marginBottom: 24,
|
|
261
|
+
},
|
|
262
|
+
permissionItem: {
|
|
263
|
+
flexDirection: 'row',
|
|
264
|
+
alignItems: 'center',
|
|
265
|
+
justifyContent: 'space-between',
|
|
266
|
+
padding: 16,
|
|
267
|
+
backgroundColor: '#F9FAFB',
|
|
268
|
+
borderRadius: 12,
|
|
269
|
+
marginBottom: 12,
|
|
270
|
+
},
|
|
271
|
+
permissionInfo: {
|
|
272
|
+
flex: 1,
|
|
273
|
+
marginRight: 12,
|
|
274
|
+
},
|
|
275
|
+
permissionName: {
|
|
276
|
+
fontSize: 16,
|
|
277
|
+
fontWeight: '600',
|
|
278
|
+
color: '#1F2937',
|
|
279
|
+
marginBottom: 4,
|
|
280
|
+
},
|
|
281
|
+
permissionDesc: {
|
|
282
|
+
fontSize: 14,
|
|
283
|
+
color: '#6B7280',
|
|
284
|
+
lineHeight: 20,
|
|
285
|
+
},
|
|
286
|
+
permissionOptional: {
|
|
287
|
+
fontSize: 12,
|
|
288
|
+
color: '#9CA3AF',
|
|
289
|
+
marginTop: 4,
|
|
290
|
+
},
|
|
291
|
+
permissionStatus: {
|
|
292
|
+
alignItems: 'center',
|
|
293
|
+
},
|
|
294
|
+
permissionBadge: {
|
|
295
|
+
paddingHorizontal: 8,
|
|
296
|
+
paddingVertical: 4,
|
|
297
|
+
borderRadius: 6,
|
|
298
|
+
},
|
|
299
|
+
permissionBadgeText: {
|
|
300
|
+
fontSize: 12,
|
|
301
|
+
fontWeight: '600',
|
|
302
|
+
},
|
|
303
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PermissionScreenProps } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Permission Request Screen
|
|
5
|
+
*
|
|
6
|
+
* Displayed when requesting a permission from the user.
|
|
7
|
+
*/
|
|
8
|
+
export declare const PermissionScreen: React.FC<PermissionScreenProps>;
|
|
9
|
+
export default PermissionScreen;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
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 AnimatedPermission from '../../components/icons/animated/permissions/AnimatedPermission';
|
|
9
|
+
import { getColor } from '../../utils/client';
|
|
10
|
+
/**
|
|
11
|
+
* Permission Request Screen
|
|
12
|
+
*
|
|
13
|
+
* Displayed when requesting a permission from the user.
|
|
14
|
+
*/
|
|
15
|
+
export const PermissionScreen = ({ title = 'Permission Required', description = 'We need your permission to provide you with the best experience.', permissionType = 'location', reason, onAllow, onDeny, allowButtonText = 'Allow', denyButtonText = 'Not Now', support, theme, primaryColor, backgroundColor, }) => {
|
|
16
|
+
const infoColor = primaryColor || theme?.primary || getColor('primary');
|
|
17
|
+
return (_jsxs(ScreenContainer, { backgroundColor: backgroundColor || theme?.background, children: [_jsx(IconWithBadge, { icon: _jsx(AnimatedPermission, { size: 48, color: infoColor }), iconBackgroundColor: "#DBEAFE", badge: _jsx(Text, { style: styles.badgeIcon, children: "\uD83D\uDD12" }), badgeBackgroundColor: infoColor }), _jsx(Text, { style: [styles.title, theme?.textPrimary ? { color: theme.textPrimary } : undefined], children: title }), _jsx(Text, { style: [styles.description, theme?.textSecondary ? { color: theme.textSecondary } : undefined], children: description }), _jsx(ContentCard, { title: "Why we need this permission", children: _jsx(Text, { style: styles.cardText, children: reason || `We use your ${permissionType} to show nearby options and provide location-based features.` }) }), onAllow && (_jsx(PrimaryButton, { onPress: onAllow, backgroundColor: infoColor, children: allowButtonText })), onDeny && (_jsx(SecondaryButton, { onPress: onDeny, children: denyButtonText }))] }));
|
|
18
|
+
};
|
|
19
|
+
const styles = StyleSheet.create({
|
|
20
|
+
title: {
|
|
21
|
+
fontSize: 24,
|
|
22
|
+
fontWeight: '700',
|
|
23
|
+
color: '#1F2937',
|
|
24
|
+
textAlign: 'center',
|
|
25
|
+
marginBottom: 12,
|
|
26
|
+
lineHeight: 32,
|
|
27
|
+
},
|
|
28
|
+
description: {
|
|
29
|
+
fontSize: 16,
|
|
30
|
+
fontWeight: '400',
|
|
31
|
+
color: '#6B7280',
|
|
32
|
+
textAlign: 'center',
|
|
33
|
+
lineHeight: 24,
|
|
34
|
+
marginBottom: 24,
|
|
35
|
+
},
|
|
36
|
+
cardText: {
|
|
37
|
+
fontSize: 14,
|
|
38
|
+
color: '#6B7280',
|
|
39
|
+
lineHeight: 20,
|
|
40
|
+
},
|
|
41
|
+
badgeIcon: {
|
|
42
|
+
fontSize: 16,
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
export default PermissionScreen;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AppUpdateScreenProps } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* App Update Screen Component
|
|
5
|
+
*
|
|
6
|
+
* Fully customizable app update screen.
|
|
7
|
+
* All content, actions, and styling are configurable via props.
|
|
8
|
+
*/
|
|
9
|
+
export declare const AppUpdateScreen: React.FC<AppUpdateScreenProps>;
|