@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,138 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { View, Text, TouchableOpacity, StyleSheet, Linking } from 'react-native';
|
|
3
|
+
const SupportButtons = ({ support, variant = 'icon-only', theme, }) => {
|
|
4
|
+
const primaryColor = theme?.primary || '#2563EB';
|
|
5
|
+
const whatsappColor = '#25D366';
|
|
6
|
+
const phoneColor = '#2563EB';
|
|
7
|
+
const emailColor = '#6B7280';
|
|
8
|
+
const handleWhatsApp = () => {
|
|
9
|
+
if (support.whatsapp) {
|
|
10
|
+
const url = `https://wa.me/${support.whatsapp.number.replace(/[^0-9]/g, '')}`;
|
|
11
|
+
Linking.openURL(url);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
const handlePhone = () => {
|
|
15
|
+
if (support.phone) {
|
|
16
|
+
const url = `tel:${support.phone.number}`;
|
|
17
|
+
Linking.openURL(url);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
const handleEmail = () => {
|
|
21
|
+
if (support.email) {
|
|
22
|
+
const url = `mailto:${support.email.address}`;
|
|
23
|
+
Linking.openURL(url);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
const renderIconOnly = () => (_jsxs(View, { style: styles.iconOnlyContainer, children: [support.whatsapp && (_jsx(TouchableOpacity, { style: [styles.iconButton, { backgroundColor: whatsappColor }], onPress: handleWhatsApp, activeOpacity: 0.8, children: _jsx(Text, { style: styles.iconText, children: "\uD83D\uDCAC" }) })), support.phone && (_jsx(TouchableOpacity, { style: [styles.iconButton, { backgroundColor: phoneColor }], onPress: handlePhone, activeOpacity: 0.8, children: _jsx(Text, { style: styles.iconText, children: "\uD83D\uDCDE" }) })), support.email && (_jsx(TouchableOpacity, { style: [styles.iconButton, { backgroundColor: emailColor }], onPress: handleEmail, activeOpacity: 0.8, children: _jsx(Text, { style: styles.iconText, children: "\u2709\uFE0F" }) }))] }));
|
|
27
|
+
const renderTextOnly = () => (_jsxs(View, { style: styles.textOnlyContainer, children: [support.whatsapp && (_jsx(TouchableOpacity, { style: [styles.textButton, { borderColor: whatsappColor }], onPress: handleWhatsApp, activeOpacity: 0.8, children: _jsx(Text, { style: [styles.textButtonLabel, { color: whatsappColor }], children: support.whatsapp.label || 'WhatsApp' }) })), support.phone && (_jsx(TouchableOpacity, { style: [styles.textButton, { borderColor: phoneColor }], onPress: handlePhone, activeOpacity: 0.8, children: _jsx(Text, { style: [styles.textButtonLabel, { color: phoneColor }], children: support.phone.label || 'Call' }) })), support.email && (_jsx(TouchableOpacity, { style: [styles.textButton, { borderColor: emailColor }], onPress: handleEmail, activeOpacity: 0.8, children: _jsx(Text, { style: [styles.textButtonLabel, { color: emailColor }], children: support.email.label || 'Email' }) }))] }));
|
|
28
|
+
const renderCombined = () => (_jsxs(View, { style: styles.combinedContainer, children: [support.whatsapp && (_jsxs(TouchableOpacity, { style: [styles.combinedButton, { backgroundColor: whatsappColor }], onPress: handleWhatsApp, activeOpacity: 0.8, children: [_jsx(Text, { style: styles.combinedIcon, children: "\uD83D\uDCAC" }), _jsx(Text, { style: styles.combinedLabel, children: support.whatsapp.label || 'WhatsApp' })] })), support.phone && (_jsxs(TouchableOpacity, { style: [styles.combinedButton, { backgroundColor: phoneColor }], onPress: handlePhone, activeOpacity: 0.8, children: [_jsx(Text, { style: styles.combinedIcon, children: "\uD83D\uDCDE" }), _jsx(Text, { style: styles.combinedLabel, children: support.phone.label || 'Call' })] })), support.email && (_jsxs(TouchableOpacity, { style: [styles.combinedButton, { backgroundColor: emailColor }], onPress: handleEmail, activeOpacity: 0.8, children: [_jsx(Text, { style: styles.combinedIcon, children: "\u2709\uFE0F" }), _jsx(Text, { style: styles.combinedLabel, children: support.email.label || 'Email' })] }))] }));
|
|
29
|
+
const renderCompact = () => (_jsxs(View, { style: styles.compactContainer, children: [support.whatsapp && (_jsxs(TouchableOpacity, { style: [styles.compactButton, { backgroundColor: whatsappColor }], onPress: handleWhatsApp, activeOpacity: 0.8, children: [_jsx(Text, { style: styles.compactIcon, children: "\uD83D\uDCAC" }), _jsx(Text, { style: styles.compactLabel, children: support.whatsapp.label || 'WhatsApp' })] })), support.phone && (_jsxs(TouchableOpacity, { style: [styles.compactButton, { backgroundColor: phoneColor }], onPress: handlePhone, activeOpacity: 0.8, children: [_jsx(Text, { style: styles.compactIcon, children: "\uD83D\uDCDE" }), _jsx(Text, { style: styles.compactLabel, children: support.phone.label || 'Call' })] })), support.email && (_jsxs(TouchableOpacity, { style: [styles.compactButton, { backgroundColor: emailColor }], onPress: handleEmail, activeOpacity: 0.8, children: [_jsx(Text, { style: styles.compactIcon, children: "\u2709\uFE0F" }), _jsx(Text, { style: styles.compactLabel, children: support.email.label || 'Email' })] }))] }));
|
|
30
|
+
return (_jsxs(View, { style: styles.container, children: [variant === 'icon-only' && renderIconOnly(), variant === 'text-only' && renderTextOnly(), variant === 'combined' && renderCombined(), variant === 'compact' && renderCompact()] }));
|
|
31
|
+
};
|
|
32
|
+
const styles = StyleSheet.create({
|
|
33
|
+
container: {
|
|
34
|
+
marginTop: 20,
|
|
35
|
+
},
|
|
36
|
+
// Icon-only variant
|
|
37
|
+
iconOnlyContainer: {
|
|
38
|
+
flexDirection: 'row',
|
|
39
|
+
justifyContent: 'center',
|
|
40
|
+
alignItems: 'center',
|
|
41
|
+
gap: 12,
|
|
42
|
+
backgroundColor: '#FFFFFF',
|
|
43
|
+
paddingVertical: 12,
|
|
44
|
+
paddingHorizontal: 20,
|
|
45
|
+
borderRadius: 30,
|
|
46
|
+
shadowColor: '#000',
|
|
47
|
+
shadowOffset: { width: 0, height: 2 },
|
|
48
|
+
shadowOpacity: 0.1,
|
|
49
|
+
shadowRadius: 8,
|
|
50
|
+
elevation: 3,
|
|
51
|
+
alignSelf: 'center',
|
|
52
|
+
},
|
|
53
|
+
iconButton: {
|
|
54
|
+
width: 48,
|
|
55
|
+
height: 48,
|
|
56
|
+
borderRadius: 24,
|
|
57
|
+
justifyContent: 'center',
|
|
58
|
+
alignItems: 'center',
|
|
59
|
+
shadowColor: '#000',
|
|
60
|
+
shadowOffset: { width: 0, height: 2 },
|
|
61
|
+
shadowOpacity: 0.15,
|
|
62
|
+
shadowRadius: 4,
|
|
63
|
+
elevation: 2,
|
|
64
|
+
},
|
|
65
|
+
iconText: {
|
|
66
|
+
fontSize: 24,
|
|
67
|
+
},
|
|
68
|
+
// Text-only variant
|
|
69
|
+
textOnlyContainer: {
|
|
70
|
+
flexDirection: 'row',
|
|
71
|
+
justifyContent: 'center',
|
|
72
|
+
alignItems: 'center',
|
|
73
|
+
gap: 12,
|
|
74
|
+
},
|
|
75
|
+
textButton: {
|
|
76
|
+
paddingVertical: 12,
|
|
77
|
+
paddingHorizontal: 24,
|
|
78
|
+
borderRadius: 8,
|
|
79
|
+
borderWidth: 1.5,
|
|
80
|
+
backgroundColor: '#FFFFFF',
|
|
81
|
+
},
|
|
82
|
+
textButtonLabel: {
|
|
83
|
+
fontSize: 15,
|
|
84
|
+
fontWeight: '600',
|
|
85
|
+
},
|
|
86
|
+
// Combined variant
|
|
87
|
+
combinedContainer: {
|
|
88
|
+
gap: 12,
|
|
89
|
+
},
|
|
90
|
+
combinedButton: {
|
|
91
|
+
flexDirection: 'row',
|
|
92
|
+
alignItems: 'center',
|
|
93
|
+
justifyContent: 'center',
|
|
94
|
+
paddingVertical: 14,
|
|
95
|
+
paddingHorizontal: 20,
|
|
96
|
+
borderRadius: 12,
|
|
97
|
+
gap: 10,
|
|
98
|
+
},
|
|
99
|
+
combinedIcon: {
|
|
100
|
+
fontSize: 20,
|
|
101
|
+
},
|
|
102
|
+
combinedLabel: {
|
|
103
|
+
color: '#FFFFFF',
|
|
104
|
+
fontSize: 16,
|
|
105
|
+
fontWeight: '600',
|
|
106
|
+
},
|
|
107
|
+
// Compact variant
|
|
108
|
+
compactContainer: {
|
|
109
|
+
flexDirection: 'row',
|
|
110
|
+
justifyContent: 'center',
|
|
111
|
+
alignItems: 'center',
|
|
112
|
+
gap: 12,
|
|
113
|
+
},
|
|
114
|
+
compactButton: {
|
|
115
|
+
flexDirection: 'row',
|
|
116
|
+
alignItems: 'center',
|
|
117
|
+
justifyContent: 'center',
|
|
118
|
+
paddingVertical: 12,
|
|
119
|
+
paddingHorizontal: 20,
|
|
120
|
+
borderRadius: 12,
|
|
121
|
+
gap: 8,
|
|
122
|
+
flex: 1,
|
|
123
|
+
shadowColor: '#000',
|
|
124
|
+
shadowOffset: { width: 0, height: 2 },
|
|
125
|
+
shadowOpacity: 0.1,
|
|
126
|
+
shadowRadius: 4,
|
|
127
|
+
elevation: 2,
|
|
128
|
+
},
|
|
129
|
+
compactIcon: {
|
|
130
|
+
fontSize: 18,
|
|
131
|
+
},
|
|
132
|
+
compactLabel: {
|
|
133
|
+
color: '#FFFFFF',
|
|
134
|
+
fontSize: 15,
|
|
135
|
+
fontWeight: '600',
|
|
136
|
+
},
|
|
137
|
+
});
|
|
138
|
+
export default SupportButtons;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SupportButtons } from './SupportButtons';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface CountdownTimerProps {
|
|
3
|
+
estimatedEndTime: Date;
|
|
4
|
+
onComplete?: () => void;
|
|
5
|
+
backgroundColor?: string;
|
|
6
|
+
borderColor?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const CountdownTimer: React.FC<CountdownTimerProps>;
|
|
9
|
+
export default CountdownTimer;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect } from 'react';
|
|
3
|
+
import { View, Text, StyleSheet } from 'react-native';
|
|
4
|
+
const CountdownTimer = ({ estimatedEndTime, onComplete, backgroundColor = '#FFFFFF', borderColor = '#E5E7EB', }) => {
|
|
5
|
+
const [timeRemaining, setTimeRemaining] = useState({
|
|
6
|
+
hours: 0,
|
|
7
|
+
minutes: 0,
|
|
8
|
+
seconds: 0,
|
|
9
|
+
});
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
const updateCountdown = () => {
|
|
12
|
+
const now = new Date().getTime();
|
|
13
|
+
const end = new Date(estimatedEndTime).getTime();
|
|
14
|
+
const distance = end - now;
|
|
15
|
+
if (distance < 0) {
|
|
16
|
+
setTimeRemaining({ hours: 0, minutes: 0, seconds: 0 });
|
|
17
|
+
onComplete?.();
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const hours = Math.floor(distance / (1000 * 60 * 60));
|
|
21
|
+
const minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
|
|
22
|
+
const seconds = Math.floor((distance % (1000 * 60)) / 1000);
|
|
23
|
+
setTimeRemaining({ hours, minutes, seconds });
|
|
24
|
+
};
|
|
25
|
+
updateCountdown();
|
|
26
|
+
const interval = setInterval(updateCountdown, 1000);
|
|
27
|
+
return () => clearInterval(interval);
|
|
28
|
+
}, [estimatedEndTime, onComplete]);
|
|
29
|
+
const formatTime = (value) => {
|
|
30
|
+
return value.toString().padStart(2, '0');
|
|
31
|
+
};
|
|
32
|
+
const formatDate = () => {
|
|
33
|
+
const date = new Date(estimatedEndTime);
|
|
34
|
+
const hours = date.getHours();
|
|
35
|
+
const minutes = date.getMinutes();
|
|
36
|
+
const day = date.toLocaleDateString('en-US', { weekday: 'short' });
|
|
37
|
+
const dayNum = date.getDate();
|
|
38
|
+
const month = date.toLocaleDateString('en-US', { month: 'short' });
|
|
39
|
+
return `Expected to be back by ${hours}:${formatTime(minutes)} on ${day} ${dayNum} ${month}`;
|
|
40
|
+
};
|
|
41
|
+
return (_jsxs(View, { style: [
|
|
42
|
+
styles.container,
|
|
43
|
+
{
|
|
44
|
+
backgroundColor,
|
|
45
|
+
borderColor,
|
|
46
|
+
},
|
|
47
|
+
], children: [_jsx(Text, { style: styles.title, children: "Estimated Time Remaining" }), _jsxs(View, { style: styles.timerContainer, children: [_jsxs(View, { style: styles.timeBox, children: [_jsx(Text, { style: styles.timeValue, children: formatTime(timeRemaining.hours) }), _jsx(Text, { style: styles.timeLabel, children: "Hours" })] }), _jsxs(View, { style: styles.timeBox, children: [_jsx(Text, { style: styles.timeValue, children: formatTime(timeRemaining.minutes) }), _jsx(Text, { style: styles.timeLabel, children: "Min" })] }), _jsxs(View, { style: styles.timeBox, children: [_jsx(Text, { style: styles.timeValue, children: formatTime(timeRemaining.seconds) }), _jsx(Text, { style: styles.timeLabel, children: "Sec" })] })] }), _jsx(Text, { style: styles.expectedText, children: formatDate() })] }));
|
|
48
|
+
};
|
|
49
|
+
const styles = StyleSheet.create({
|
|
50
|
+
container: {
|
|
51
|
+
borderRadius: 12,
|
|
52
|
+
padding: 24,
|
|
53
|
+
marginBottom: 24,
|
|
54
|
+
borderWidth: 1,
|
|
55
|
+
width: '100%',
|
|
56
|
+
},
|
|
57
|
+
title: {
|
|
58
|
+
fontSize: 16,
|
|
59
|
+
fontWeight: '600',
|
|
60
|
+
color: '#1F2937',
|
|
61
|
+
textAlign: 'center',
|
|
62
|
+
marginBottom: 20,
|
|
63
|
+
},
|
|
64
|
+
timerContainer: {
|
|
65
|
+
flexDirection: 'row',
|
|
66
|
+
justifyContent: 'center',
|
|
67
|
+
gap: 16,
|
|
68
|
+
marginBottom: 16,
|
|
69
|
+
},
|
|
70
|
+
timeBox: {
|
|
71
|
+
alignItems: 'center',
|
|
72
|
+
minWidth: 70,
|
|
73
|
+
},
|
|
74
|
+
timeValue: {
|
|
75
|
+
fontSize: 48,
|
|
76
|
+
fontWeight: '700',
|
|
77
|
+
color: '#1F2937',
|
|
78
|
+
lineHeight: 56,
|
|
79
|
+
},
|
|
80
|
+
timeLabel: {
|
|
81
|
+
fontSize: 14,
|
|
82
|
+
color: '#6B7280',
|
|
83
|
+
marginTop: 4,
|
|
84
|
+
},
|
|
85
|
+
expectedText: {
|
|
86
|
+
fontSize: 13,
|
|
87
|
+
color: '#9CA3AF',
|
|
88
|
+
textAlign: 'center',
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
export default CountdownTimer;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { View, Text, StyleSheet } from 'react-native';
|
|
3
|
+
const RetryCounter = ({ retryInfo, theme }) => {
|
|
4
|
+
const textColor = theme?.textSecondary || '#6B7280';
|
|
5
|
+
return (_jsx(View, { style: styles.container, children: _jsxs(Text, { style: [styles.text, { color: textColor }], children: ["Retry attempt ", retryInfo.attempt, " of ", retryInfo.maxAttempts] }) }));
|
|
6
|
+
};
|
|
7
|
+
const styles = StyleSheet.create({
|
|
8
|
+
container: {
|
|
9
|
+
marginVertical: 12,
|
|
10
|
+
},
|
|
11
|
+
text: {
|
|
12
|
+
fontSize: 14,
|
|
13
|
+
textAlign: 'center',
|
|
14
|
+
fontWeight: '500',
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
export default RetryCounter;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ViewStyle, TextStyle, TouchableOpacityProps } from 'react-native';
|
|
3
|
+
export type ButtonVariant = 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost' | 'link';
|
|
4
|
+
export type ButtonSize = 'default' | 'sm' | 'lg' | 'icon';
|
|
5
|
+
export interface ButtonProps extends TouchableOpacityProps {
|
|
6
|
+
/**
|
|
7
|
+
* Visual style of the button
|
|
8
|
+
* @default 'default'
|
|
9
|
+
*/
|
|
10
|
+
variant?: ButtonVariant;
|
|
11
|
+
/**
|
|
12
|
+
* Size of the button
|
|
13
|
+
* @default 'default'
|
|
14
|
+
*/
|
|
15
|
+
size?: ButtonSize;
|
|
16
|
+
/**
|
|
17
|
+
* Show loading spinner instead of content
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
loading?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Button content (text or icons)
|
|
23
|
+
*/
|
|
24
|
+
children?: React.ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Additional style for the text (if children is a string)
|
|
27
|
+
*/
|
|
28
|
+
textStyle?: TextStyle;
|
|
29
|
+
/**
|
|
30
|
+
* Internal container style for complex layouts
|
|
31
|
+
*/
|
|
32
|
+
containerStyle?: ViewStyle;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Enterprise-grade customizable Button component
|
|
36
|
+
* Matches the logic and variants of shadcn/ui but for React Native
|
|
37
|
+
*/
|
|
38
|
+
export declare const Button: React.FC<ButtonProps>;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { TouchableOpacity, Text, StyleSheet, ActivityIndicator, View, } from 'react-native';
|
|
3
|
+
import { getColor } from '../../client';
|
|
4
|
+
/**
|
|
5
|
+
* Enterprise-grade customizable Button component
|
|
6
|
+
* Matches the logic and variants of shadcn/ui but for React Native
|
|
7
|
+
*/
|
|
8
|
+
export const Button = (props) => {
|
|
9
|
+
const { variant = 'default', size = 'default', loading = false, children, style, textStyle, containerStyle, disabled, ...rest } = props;
|
|
10
|
+
const isDisabled = disabled || loading;
|
|
11
|
+
const getVariantStyles = () => {
|
|
12
|
+
switch (variant) {
|
|
13
|
+
case 'destructive':
|
|
14
|
+
return { backgroundColor: getColor('error') };
|
|
15
|
+
case 'outline':
|
|
16
|
+
return {
|
|
17
|
+
backgroundColor: 'transparent',
|
|
18
|
+
borderWidth: 1,
|
|
19
|
+
borderColor: '#E5E7EB', // default border color
|
|
20
|
+
};
|
|
21
|
+
case 'secondary':
|
|
22
|
+
return { backgroundColor: '#F3F4F6' };
|
|
23
|
+
case 'ghost':
|
|
24
|
+
return { backgroundColor: 'transparent' };
|
|
25
|
+
case 'link':
|
|
26
|
+
return { backgroundColor: 'transparent' };
|
|
27
|
+
case 'default':
|
|
28
|
+
default:
|
|
29
|
+
return { backgroundColor: getColor('primary') };
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const getTextStyles = () => {
|
|
33
|
+
switch (variant) {
|
|
34
|
+
case 'destructive':
|
|
35
|
+
case 'default':
|
|
36
|
+
return { color: '#FFFFFF' };
|
|
37
|
+
case 'outline':
|
|
38
|
+
case 'ghost':
|
|
39
|
+
case 'secondary':
|
|
40
|
+
return { color: '#111827' };
|
|
41
|
+
case 'link':
|
|
42
|
+
return { color: getColor('primary'), textDecorationLine: 'underline' };
|
|
43
|
+
default:
|
|
44
|
+
return { color: '#FFFFFF' };
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const getSizeStyles = () => {
|
|
48
|
+
switch (size) {
|
|
49
|
+
case 'sm':
|
|
50
|
+
return { height: 36, paddingHorizontal: 12, borderRadius: 6 };
|
|
51
|
+
case 'lg':
|
|
52
|
+
return { height: 44, paddingHorizontal: 32, borderRadius: 8 };
|
|
53
|
+
case 'icon':
|
|
54
|
+
return { height: 40, width: 40, borderRadius: 6, paddingHorizontal: 0 };
|
|
55
|
+
case 'default':
|
|
56
|
+
default:
|
|
57
|
+
return { height: 40, paddingHorizontal: 16, borderRadius: 6 };
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const renderContent = () => {
|
|
61
|
+
if (loading) {
|
|
62
|
+
return (_jsx(ActivityIndicator, { size: "small", color: variant === 'default' || variant === 'destructive' ? '#FFFFFF' : getColor('primary') }));
|
|
63
|
+
}
|
|
64
|
+
if (typeof children === 'string') {
|
|
65
|
+
return (_jsx(Text, { style: [styles.text, getTextStyles(), textStyle], numberOfLines: 1, children: children }));
|
|
66
|
+
}
|
|
67
|
+
return children;
|
|
68
|
+
};
|
|
69
|
+
return (_jsx(TouchableOpacity, { activeOpacity: 0.7, disabled: isDisabled, style: [
|
|
70
|
+
styles.base,
|
|
71
|
+
getVariantStyles(),
|
|
72
|
+
getSizeStyles(),
|
|
73
|
+
isDisabled && styles.disabled,
|
|
74
|
+
style,
|
|
75
|
+
], ...rest, children: _jsx(View, { style: [styles.container, containerStyle], children: renderContent() }) }));
|
|
76
|
+
};
|
|
77
|
+
const styles = StyleSheet.create({
|
|
78
|
+
base: {
|
|
79
|
+
alignItems: 'center',
|
|
80
|
+
justifyContent: 'center',
|
|
81
|
+
flexDirection: 'row',
|
|
82
|
+
},
|
|
83
|
+
container: {
|
|
84
|
+
flexDirection: 'row',
|
|
85
|
+
alignItems: 'center',
|
|
86
|
+
justifyContent: 'center',
|
|
87
|
+
},
|
|
88
|
+
text: {
|
|
89
|
+
fontSize: 14,
|
|
90
|
+
fontWeight: '500',
|
|
91
|
+
textAlign: 'center',
|
|
92
|
+
},
|
|
93
|
+
disabled: {
|
|
94
|
+
opacity: 0.5,
|
|
95
|
+
},
|
|
96
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ViewStyle, TextStyle } from 'react-native';
|
|
3
|
+
import type { ThemeColors } from '../../types';
|
|
4
|
+
export interface OfflineBannerProps {
|
|
5
|
+
title?: string;
|
|
6
|
+
position?: 'top' | 'bottom';
|
|
7
|
+
theme?: ThemeColors;
|
|
8
|
+
containerStyle?: ViewStyle;
|
|
9
|
+
textStyle?: TextStyle;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* A non-blocking banner to indicate offline status
|
|
13
|
+
* Ported to React Native for cross-platform support (Expo/CLI)
|
|
14
|
+
*/
|
|
15
|
+
export declare const OfflineBanner: React.FC<OfflineBannerProps>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
3
|
+
import { WifiOffIcon } from '../IconLibrary';
|
|
4
|
+
import { getColor } from '../../client';
|
|
5
|
+
/**
|
|
6
|
+
* A non-blocking banner to indicate offline status
|
|
7
|
+
* Ported to React Native for cross-platform support (Expo/CLI)
|
|
8
|
+
*/
|
|
9
|
+
export const OfflineBanner = ({ title = 'You are currently offline', position = 'top', theme, containerStyle, textStyle, }) => {
|
|
10
|
+
const backgroundColor = theme?.offline || getColor('offline');
|
|
11
|
+
return (_jsx(View, { style: [
|
|
12
|
+
styles.container,
|
|
13
|
+
position === 'top' ? styles.top : styles.bottom,
|
|
14
|
+
{ backgroundColor },
|
|
15
|
+
containerStyle,
|
|
16
|
+
], children: _jsxs(View, { style: styles.content, children: [_jsx(WifiOffIcon, { size: 16, color: "#FFFFFF" }), _jsx(Text, { style: [styles.text, textStyle], children: title })] }) }));
|
|
17
|
+
};
|
|
18
|
+
const styles = StyleSheet.create({
|
|
19
|
+
container: {
|
|
20
|
+
paddingVertical: 8,
|
|
21
|
+
paddingHorizontal: 16,
|
|
22
|
+
width: '100%',
|
|
23
|
+
zIndex: 9999,
|
|
24
|
+
},
|
|
25
|
+
top: {
|
|
26
|
+
top: 0,
|
|
27
|
+
},
|
|
28
|
+
bottom: {
|
|
29
|
+
bottom: 0,
|
|
30
|
+
},
|
|
31
|
+
content: {
|
|
32
|
+
flexDirection: 'row',
|
|
33
|
+
alignItems: 'center',
|
|
34
|
+
justifyContent: 'center',
|
|
35
|
+
},
|
|
36
|
+
text: {
|
|
37
|
+
color: '#FFFFFF',
|
|
38
|
+
fontSize: 12,
|
|
39
|
+
fontWeight: '600',
|
|
40
|
+
marginLeft: 8,
|
|
41
|
+
},
|
|
42
|
+
});
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export * from './types';
|
|
2
|
+
export * from './utils';
|
|
3
|
+
export { ErrorBoundaryScreen } from './screens/errors/ErrorBoundaryScreen';
|
|
4
|
+
export { ServerErrorScreen } from './screens/errors/ServerErrorScreen';
|
|
5
|
+
export { ClientErrorScreen } from './screens/errors/ClientErrorScreen';
|
|
6
|
+
export { InvalidResponseScreen } from './screens/errors/InvalidResponseScreen';
|
|
7
|
+
export { ApiErrorScreen } from './screens/errors/ApiErrorScreen';
|
|
8
|
+
export { NetworkOfflineScreen } from './screens/network/NetworkOfflineScreen';
|
|
9
|
+
export { NetworkSlowConnectionScreen } from './screens/network/NetworkSlowConnectionScreen';
|
|
10
|
+
export { ApiTimeoutScreen } from './screens/network/ApiTimeoutScreen';
|
|
11
|
+
export { PermissionScreen } from './screens/permissions/PermissionScreen';
|
|
12
|
+
export { PermissionDeniedScreen } from './screens/permissions/PermissionDeniedScreen';
|
|
13
|
+
export { PermissionRequestScreen, MultiPermissionRequestScreen } from './screens/permissions/PermissionRequestScreen';
|
|
14
|
+
export { SoftUpdateScreen } from './screens/system/updates/SoftUpdateScreen';
|
|
15
|
+
export { OptionalUpdateScreen } from './screens/system/updates/OptionalUpdateScreen';
|
|
16
|
+
export { ForceUpdateScreen } from './screens/system/updates/ForceUpdateScreen';
|
|
17
|
+
export { SecurityUpdateScreen } from './screens/system/updates/SecurityUpdateScreen';
|
|
18
|
+
export { AppUpdateScreen } from './screens/system/updates/AppUpdateScreen';
|
|
19
|
+
export { PlannedMaintenanceScreen } from './screens/system/maintenance/PlannedMaintenanceScreen';
|
|
20
|
+
export { UnplannedOutageScreen } from './screens/system/maintenance/UnplannedOutageScreen';
|
|
21
|
+
export { EmergencyOutageScreen } from './screens/system/maintenance/EmergencyOutageScreen';
|
|
22
|
+
export { SystemMaintenanceScreen } from './screens/system/maintenance/SystemMaintenanceScreen';
|
|
23
|
+
export { default as ServiceUnavailableScreen } from './screens/system/maintenance/ServiceUnavailableScreen';
|
|
24
|
+
export { default as ScreenContainer } from './components/layout/ScreenContainer';
|
|
25
|
+
export { default as IconWithBadge } from './components/icons/utilities/IconWithBadge';
|
|
26
|
+
export { default as ContentCard } from './components/cards/ContentCard';
|
|
27
|
+
export { default as PrimaryButton } from './components/buttons/PrimaryButton';
|
|
28
|
+
export { default as SecondaryButton } from './components/buttons/SecondaryButton';
|
|
29
|
+
export { default as CheckListItem } from './components/lists/CheckListItem';
|
|
30
|
+
export { default as StatusBadge } from './components/feedback/StatusBadge';
|
|
31
|
+
export { default as VersionDisplay } from './components/status/VersionDisplay';
|
|
32
|
+
export { default as SupportButtons } from './components/support/SupportButtons';
|
|
33
|
+
export { default as RetryCounter } from './components/timers/RetryCounter';
|
|
34
|
+
export { default as DualButtonLayout } from './components/layout/DualButtonLayout';
|
|
35
|
+
export { default as TopBanner } from './components/feedback/TopBanner';
|
|
36
|
+
export { default as ExpandableSection } from './components/feedback/ExpandableSection';
|
|
37
|
+
export { default as WhatsNewCard } from './components/cards/WhatsNewCard';
|
|
38
|
+
export { default as StatusCheckList } from './components/lists/StatusCheckList';
|
|
39
|
+
export { default as CountdownTimer } from './components/timers/CountdownTimer';
|
|
40
|
+
export { default as InfoCard } from './components/cards/InfoCard';
|
|
41
|
+
export { default as WarningCard } from './components/cards/WarningCard';
|
|
42
|
+
export { default as SecurityBanner } from './components/feedback/SecurityBanner';
|
|
43
|
+
export { default as AnimatedWifiOff } from './components/icons/animated/network/AnimatedWifiOff';
|
|
44
|
+
export { default as AnimatedSpeedGauge } from './components/icons/animated/network/AnimatedSpeedGauge';
|
|
45
|
+
export { default as AnimatedTimeout } from './components/icons/animated/network/AnimatedTimeout';
|
|
46
|
+
export { default as AnimatedCrash } from './components/icons/animated/errors/AnimatedCrash';
|
|
47
|
+
export { default as AnimatedServerError } from './components/icons/animated/errors/AnimatedServerError';
|
|
48
|
+
export { default as AnimatedClientError } from './components/icons/animated/errors/AnimatedClientError';
|
|
49
|
+
export { default as AnimatedInvalidData } from './components/icons/animated/errors/AnimatedInvalidData';
|
|
50
|
+
export { default as AnimatedPermission } from './components/icons/animated/permissions/AnimatedPermission';
|
|
51
|
+
export { default as AnimatedPermissionDenied } from './components/icons/animated/permissions/AnimatedPermissionDenied';
|
|
52
|
+
export { default as AnimatedAlert } from './components/icons/animated/maintenance/AnimatedAlert';
|
|
53
|
+
export { default as AnimatedEmergency } from './components/icons/animated/maintenance/AnimatedEmergency';
|
|
54
|
+
export { default as AnimatedWrench } from './components/icons/animated/maintenance/AnimatedWrench';
|
|
55
|
+
export { default as AnimatedClock } from './components/icons/animated/general/AnimatedClock';
|
|
56
|
+
export { default as AnimatedWarning } from './components/icons/animated/general/AnimatedWarning';
|
|
57
|
+
export { default as AnimatedShield } from './components/icons/animated/general/AnimatedShield';
|
|
58
|
+
export { default as AnimatedCalendar } from './components/icons/animated/general/AnimatedCalendar';
|
|
59
|
+
export { default as AnimatedDocument } from './components/icons/animated/general/AnimatedDocument';
|
|
60
|
+
export { default as AnimatedCamera } from './components/icons/animated/general/AnimatedCamera';
|
|
61
|
+
export { default as AnimatedLightning } from './components/icons/animated/general/AnimatedLightning';
|
|
62
|
+
export { default as AnimatedLocationPin } from './components/icons/animated/general/AnimatedLocationPin';
|
|
63
|
+
export { default as AnimatedSparkle } from './components/icons/animated/general/AnimatedSparkle';
|
|
64
|
+
export { default as AnimatedDownload } from './components/icons/animated/general/AnimatedDownload';
|
|
65
|
+
export { default as DownloadBadge } from './components/icons/badges/DownloadBadge';
|
|
66
|
+
export { default as ClockBadge } from './components/icons/badges/ClockBadge';
|
|
67
|
+
export { default as XBadge } from './components/icons/badges/XBadge';
|
|
68
|
+
export { createSupportHandler, createRetryHandler, createErrorContext, type RetryHandler, type SupportHandler, } from './adapters/supportAdapter';
|