@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,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { RetryIndicatorProps, RetryProgressBarProps, BackoffVisualizerProps } from '../types';
|
|
3
|
+
export declare const RetryIndicator: React.FC<RetryIndicatorProps>;
|
|
4
|
+
export declare const RetryProgressBar: React.FC<RetryProgressBarProps>;
|
|
5
|
+
export declare const BackoffVisualizer: React.FC<BackoffVisualizerProps>;
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { View, Text, TouchableOpacity, StyleSheet, Animated } from 'react-native';
|
|
4
|
+
import { RefreshIcon, XIcon, CheckCircleIcon } from './IconLibrary';
|
|
5
|
+
import { getColor, getColorWithOpacity, calculateBackoffDelay, formatDelayTime } from '../client';
|
|
6
|
+
export const RetryIndicator = ({ isRetrying, retryCount, maxRetries, retryDelay = 2, status = 'idle', onCancel, }) => {
|
|
7
|
+
const [rotation] = useState(new Animated.Value(0));
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
if (isRetrying) {
|
|
10
|
+
Animated.loop(Animated.timing(rotation, {
|
|
11
|
+
toValue: 1,
|
|
12
|
+
duration: 1000,
|
|
13
|
+
useNativeDriver: true,
|
|
14
|
+
})).start();
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
rotation.setValue(0);
|
|
18
|
+
}
|
|
19
|
+
}, [isRetrying]);
|
|
20
|
+
const rotate = rotation.interpolate({
|
|
21
|
+
inputRange: [0, 1],
|
|
22
|
+
outputRange: ['0deg', '360deg'],
|
|
23
|
+
});
|
|
24
|
+
if (!isRetrying && status === 'idle')
|
|
25
|
+
return null;
|
|
26
|
+
const getStatusColor = () => {
|
|
27
|
+
switch (status) {
|
|
28
|
+
case 'success':
|
|
29
|
+
return getColor('success');
|
|
30
|
+
case 'failed':
|
|
31
|
+
return getColor('error');
|
|
32
|
+
case 'retrying':
|
|
33
|
+
return getColor('warning');
|
|
34
|
+
default:
|
|
35
|
+
return getColor('primary');
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const getStatusText = () => {
|
|
39
|
+
switch (status) {
|
|
40
|
+
case 'success':
|
|
41
|
+
return 'Success!';
|
|
42
|
+
case 'failed':
|
|
43
|
+
return 'Failed';
|
|
44
|
+
case 'retrying':
|
|
45
|
+
return `Retrying... (${retryCount}/${maxRetries})`;
|
|
46
|
+
default:
|
|
47
|
+
return 'Ready';
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
return (_jsxs(View, { style: [styles.indicatorContainer, { backgroundColor: getColorWithOpacity('primary', 0.95) }], children: [_jsxs(View, { style: styles.indicatorContent, children: [status === 'success' ? (_jsx(CheckCircleIcon, { size: 20, color: "#FFFFFF" })) : (_jsx(Animated.View, { style: { transform: [{ rotate }] }, children: _jsx(RefreshIcon, { size: 20, color: "#FFFFFF" }) })), _jsx(Text, { style: styles.indicatorText, children: getStatusText() })] }), onCancel && isRetrying && (_jsx(TouchableOpacity, { onPress: onCancel, style: styles.cancelButton, activeOpacity: 0.7, children: _jsx(XIcon, { size: 16, color: "#FFFFFF" }) }))] }));
|
|
51
|
+
};
|
|
52
|
+
// ============================================================================
|
|
53
|
+
// Retry Progress Bar
|
|
54
|
+
// ============================================================================
|
|
55
|
+
export const RetryProgressBar = ({ retryCount, maxRetries, isActive, }) => {
|
|
56
|
+
const progress = maxRetries > 0 ? retryCount / maxRetries : 0;
|
|
57
|
+
const percentage = Math.round(progress * 100);
|
|
58
|
+
return (_jsxs(View, { style: styles.progressContainer, children: [_jsxs(View, { style: styles.progressHeader, children: [_jsx(Text, { style: styles.progressLabel, children: "Retry Progress" }), _jsxs(Text, { style: styles.progressCount, children: [retryCount, "/", maxRetries] })] }), _jsxs(View, { style: styles.progressBarContainer, children: [_jsx(View, { style: [
|
|
59
|
+
styles.progressBarFill,
|
|
60
|
+
{
|
|
61
|
+
flex: percentage / 100,
|
|
62
|
+
backgroundColor: isActive ? getColor('primary') : getColor('success'),
|
|
63
|
+
},
|
|
64
|
+
] }), _jsx(View, { style: { flex: (100 - percentage) / 100 } })] }), _jsxs(Text, { style: styles.progressPercentage, children: [percentage, "%"] })] }));
|
|
65
|
+
};
|
|
66
|
+
// ============================================================================
|
|
67
|
+
// Backoff Visualizer
|
|
68
|
+
// ============================================================================
|
|
69
|
+
export const BackoffVisualizer = ({ attempt, baseDelay = 1000, }) => {
|
|
70
|
+
const delays = Array.from({ length: 5 }, (_, i) => calculateBackoffDelay(i + 1, baseDelay));
|
|
71
|
+
return (_jsxs(View, { style: styles.backoffContainer, children: [_jsx(Text, { style: styles.backoffTitle, children: "Exponential Backoff Strategy" }), _jsx(Text, { style: styles.backoffDescription, children: "Retry delays increase exponentially to avoid overwhelming the server" }), _jsx(View, { style: styles.backoffBars, children: delays.map((delay, index) => {
|
|
72
|
+
const isActive = index + 1 === attempt;
|
|
73
|
+
const isPast = index + 1 < attempt;
|
|
74
|
+
const maxDelay = Math.max(...delays);
|
|
75
|
+
const barWidth = (delay / maxDelay) * 100;
|
|
76
|
+
return (_jsxs(View, { style: styles.backoffBarRow, children: [_jsxs(Text, { style: styles.backoffAttemptLabel, children: ["#", index + 1] }), _jsxs(View, { style: styles.backoffBarContainer, children: [_jsx(View, { style: [
|
|
77
|
+
styles.backoffBar,
|
|
78
|
+
{
|
|
79
|
+
flex: barWidth / 100,
|
|
80
|
+
backgroundColor: isActive
|
|
81
|
+
? getColor('warning')
|
|
82
|
+
: isPast
|
|
83
|
+
? getColor('success')
|
|
84
|
+
: getColorWithOpacity('primary', 0.3),
|
|
85
|
+
},
|
|
86
|
+
] }), _jsx(View, { style: { flex: (100 - barWidth) / 100 } })] }), _jsx(Text, { style: styles.backoffDelayLabel, children: formatDelayTime(delay) })] }, index));
|
|
87
|
+
}) })] }));
|
|
88
|
+
};
|
|
89
|
+
const styles = StyleSheet.create({
|
|
90
|
+
// Retry Indicator
|
|
91
|
+
indicatorContainer: {
|
|
92
|
+
position: 'absolute',
|
|
93
|
+
top: 60,
|
|
94
|
+
left: 16,
|
|
95
|
+
right: 16,
|
|
96
|
+
flexDirection: 'row',
|
|
97
|
+
alignItems: 'center',
|
|
98
|
+
justifyContent: 'space-between',
|
|
99
|
+
paddingHorizontal: 16,
|
|
100
|
+
paddingVertical: 12,
|
|
101
|
+
borderRadius: 12,
|
|
102
|
+
shadowColor: '#000',
|
|
103
|
+
shadowOffset: { width: 0, height: 2 },
|
|
104
|
+
shadowOpacity: 0.25,
|
|
105
|
+
shadowRadius: 4,
|
|
106
|
+
elevation: 5,
|
|
107
|
+
zIndex: 1000,
|
|
108
|
+
},
|
|
109
|
+
indicatorContent: {
|
|
110
|
+
flexDirection: 'row',
|
|
111
|
+
alignItems: 'center',
|
|
112
|
+
},
|
|
113
|
+
indicatorIcon: {
|
|
114
|
+
marginRight: 12,
|
|
115
|
+
},
|
|
116
|
+
indicatorText: {
|
|
117
|
+
fontSize: 14,
|
|
118
|
+
fontWeight: '600',
|
|
119
|
+
color: '#FFFFFF',
|
|
120
|
+
},
|
|
121
|
+
cancelButton: {
|
|
122
|
+
padding: 4,
|
|
123
|
+
},
|
|
124
|
+
// Progress Bar
|
|
125
|
+
progressContainer: {
|
|
126
|
+
padding: 16,
|
|
127
|
+
},
|
|
128
|
+
progressHeader: {
|
|
129
|
+
flexDirection: 'row',
|
|
130
|
+
justifyContent: 'space-between',
|
|
131
|
+
marginBottom: 8,
|
|
132
|
+
},
|
|
133
|
+
progressLabel: {
|
|
134
|
+
fontSize: 14,
|
|
135
|
+
fontWeight: '600',
|
|
136
|
+
color: '#1F2937',
|
|
137
|
+
},
|
|
138
|
+
progressCount: {
|
|
139
|
+
fontSize: 14,
|
|
140
|
+
fontWeight: '600',
|
|
141
|
+
color: '#6B7280',
|
|
142
|
+
},
|
|
143
|
+
progressBarContainer: {
|
|
144
|
+
height: 8,
|
|
145
|
+
backgroundColor: '#E5E7EB',
|
|
146
|
+
borderRadius: 4,
|
|
147
|
+
overflow: 'hidden',
|
|
148
|
+
marginBottom: 8,
|
|
149
|
+
flexDirection: 'row',
|
|
150
|
+
},
|
|
151
|
+
progressBarFill: {
|
|
152
|
+
height: '100%',
|
|
153
|
+
borderRadius: 4,
|
|
154
|
+
},
|
|
155
|
+
progressPercentage: {
|
|
156
|
+
fontSize: 12,
|
|
157
|
+
color: '#6B7280',
|
|
158
|
+
textAlign: 'right',
|
|
159
|
+
},
|
|
160
|
+
// Backoff Visualizer
|
|
161
|
+
backoffContainer: {
|
|
162
|
+
padding: 16,
|
|
163
|
+
backgroundColor: '#F9FAFB',
|
|
164
|
+
borderRadius: 12,
|
|
165
|
+
},
|
|
166
|
+
backoffTitle: {
|
|
167
|
+
fontSize: 16,
|
|
168
|
+
fontWeight: '600',
|
|
169
|
+
color: '#1F2937',
|
|
170
|
+
marginBottom: 4,
|
|
171
|
+
},
|
|
172
|
+
backoffDescription: {
|
|
173
|
+
fontSize: 12,
|
|
174
|
+
color: '#6B7280',
|
|
175
|
+
marginBottom: 16,
|
|
176
|
+
},
|
|
177
|
+
backoffBars: {},
|
|
178
|
+
backoffBarRow: {
|
|
179
|
+
flexDirection: 'row',
|
|
180
|
+
alignItems: 'center',
|
|
181
|
+
marginBottom: 8,
|
|
182
|
+
},
|
|
183
|
+
backoffAttemptLabel: {
|
|
184
|
+
fontSize: 12,
|
|
185
|
+
fontWeight: '600',
|
|
186
|
+
color: '#6B7280',
|
|
187
|
+
width: 24,
|
|
188
|
+
},
|
|
189
|
+
backoffBarContainer: {
|
|
190
|
+
flex: 1,
|
|
191
|
+
height: 24,
|
|
192
|
+
backgroundColor: '#E5E7EB',
|
|
193
|
+
borderRadius: 4,
|
|
194
|
+
overflow: 'hidden',
|
|
195
|
+
flexDirection: 'row',
|
|
196
|
+
},
|
|
197
|
+
backoffBar: {
|
|
198
|
+
height: '100%',
|
|
199
|
+
borderRadius: 4,
|
|
200
|
+
},
|
|
201
|
+
backoffDelayLabel: {
|
|
202
|
+
fontSize: 12,
|
|
203
|
+
fontWeight: '600',
|
|
204
|
+
color: '#6B7280',
|
|
205
|
+
width: 40,
|
|
206
|
+
textAlign: 'right',
|
|
207
|
+
},
|
|
208
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SupportContactProps } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* SupportContactCard Component
|
|
5
|
+
*
|
|
6
|
+
* Fully customizable support contact card.
|
|
7
|
+
* Only renders if at least one contact method is provided.
|
|
8
|
+
* All text and styling is customizable via props.
|
|
9
|
+
*/
|
|
10
|
+
export declare const SupportContactCard: React.FC<SupportContactProps>;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { View, Text, StyleSheet, Linking } from 'react-native';
|
|
3
|
+
import { PhoneIcon, MessageCircleIcon, MailIcon } from './IconLibrary';
|
|
4
|
+
import { getColor, getColorWithOpacity } from '../client';
|
|
5
|
+
import { Button } from './ui/Button';
|
|
6
|
+
/**
|
|
7
|
+
* SupportContactCard Component
|
|
8
|
+
*
|
|
9
|
+
* Fully customizable support contact card.
|
|
10
|
+
* Only renders if at least one contact method is provided.
|
|
11
|
+
* All text and styling is customizable via props.
|
|
12
|
+
*/
|
|
13
|
+
export const SupportContactCard = ({ whatsapp, phone, email, title = 'Need Help?', description = 'Contact our support team', variant = 'full', errorContext, theme, }) => {
|
|
14
|
+
// Don't render if no contact methods provided
|
|
15
|
+
const hasAnyContact = whatsapp || phone || email;
|
|
16
|
+
if (!hasAnyContact) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
const primaryColor = theme?.primary || getColor('primary');
|
|
20
|
+
const successColor = theme?.success || getColor('success');
|
|
21
|
+
const handleWhatsAppPress = () => {
|
|
22
|
+
if (whatsapp?.onPress) {
|
|
23
|
+
whatsapp.onPress();
|
|
24
|
+
}
|
|
25
|
+
else if (whatsapp?.number) {
|
|
26
|
+
let message = 'Hello, I need help';
|
|
27
|
+
if (errorContext) {
|
|
28
|
+
message = `Hello, I need help with an error:\n\nError: ${errorContext.errorMessage}\nCode: ${errorContext.errorCode || 'N/A'}\nTime: ${errorContext.timestamp}\nApp Version: ${errorContext.appVersion}`;
|
|
29
|
+
}
|
|
30
|
+
const url = `https://wa.me/${whatsapp.number.replace(/[^0-9]/g, '')}?text=${encodeURIComponent(message)}`;
|
|
31
|
+
Linking.openURL(url).catch(err => console.error('Failed to open WhatsApp:', err));
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const handlePhonePress = () => {
|
|
35
|
+
if (phone?.onPress) {
|
|
36
|
+
phone.onPress();
|
|
37
|
+
}
|
|
38
|
+
else if (phone?.number) {
|
|
39
|
+
const url = `tel:${phone.number}`;
|
|
40
|
+
Linking.openURL(url).catch(err => console.error('Failed to make call:', err));
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
const handleEmailPress = () => {
|
|
44
|
+
if (email?.onPress) {
|
|
45
|
+
email.onPress();
|
|
46
|
+
}
|
|
47
|
+
else if (email?.address) {
|
|
48
|
+
let subject = 'Support Request';
|
|
49
|
+
let body = 'Hello, I need help.';
|
|
50
|
+
if (errorContext) {
|
|
51
|
+
subject = `Support Request - ${errorContext.errorCode || 'Error'}`;
|
|
52
|
+
body = `Error: ${errorContext.errorMessage}\nCode: ${errorContext.errorCode || 'N/A'}\nTime: ${errorContext.timestamp}\nApp Version: ${errorContext.appVersion}\nPlatform: ${errorContext.platform}\n\nPlease describe your issue:`;
|
|
53
|
+
}
|
|
54
|
+
const url = `mailto:${email.address}?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}`;
|
|
55
|
+
Linking.openURL(url).catch(err => console.error('Failed to open email:', err));
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
// Icon-only variant
|
|
59
|
+
if (variant === 'icon-only') {
|
|
60
|
+
return (_jsxs(View, { style: styles.iconOnlyContainer, children: [whatsapp && (_jsx(Button, { variant: "outline", size: "icon", style: [styles.iconButton, { backgroundColor: getColorWithOpacity(successColor, 0.1), borderColor: getColorWithOpacity(successColor, 0.2) }], onPress: handleWhatsAppPress, children: _jsx(MessageCircleIcon, { size: 20, color: successColor }) })), phone && (_jsx(Button, { variant: "outline", size: "icon", style: [styles.iconButton, { backgroundColor: getColorWithOpacity(primaryColor, 0.1), borderColor: getColorWithOpacity(primaryColor, 0.2) }], onPress: handlePhonePress, children: _jsx(PhoneIcon, { size: 20, color: primaryColor }) })), email && (_jsx(Button, { variant: "outline", size: "icon", style: [styles.iconButton, { backgroundColor: getColorWithOpacity(primaryColor, 0.1), borderColor: getColorWithOpacity(primaryColor, 0.2) }], onPress: handleEmailPress, children: _jsx(MailIcon, { size: 20, color: primaryColor }) }))] }));
|
|
61
|
+
}
|
|
62
|
+
// Compact variant
|
|
63
|
+
if (variant === 'compact') {
|
|
64
|
+
return (_jsxs(View, { style: styles.compactContainer, children: [whatsapp && (_jsxs(Button, { variant: "outline", size: "sm", style: [styles.compactButton, { borderColor: getColorWithOpacity(successColor, 0.3) }], onPress: handleWhatsAppPress, textStyle: { color: successColor }, children: [_jsx(MessageCircleIcon, { size: 16, color: successColor }), _jsx(Text, { style: { marginLeft: 8 }, children: whatsapp.label || 'WhatsApp' })] })), phone && (_jsxs(Button, { variant: "outline", size: "sm", style: [styles.compactButton, { borderColor: getColorWithOpacity(primaryColor, 0.3) }], onPress: handlePhonePress, textStyle: { color: primaryColor }, children: [_jsx(PhoneIcon, { size: 16, color: primaryColor }), _jsx(Text, { style: { marginLeft: 8 }, children: phone.label || 'Call' })] })), email && (_jsxs(Button, { variant: "outline", size: "sm", style: [styles.compactButton, { borderColor: getColorWithOpacity(primaryColor, 0.3) }], onPress: handleEmailPress, textStyle: { color: primaryColor }, children: [_jsx(MailIcon, { size: 16, color: primaryColor }), _jsx(Text, { style: { marginLeft: 8 }, children: email.label || 'Email' })] }))] }));
|
|
65
|
+
}
|
|
66
|
+
// Full variant
|
|
67
|
+
return (_jsxs(View, { style: styles.fullContainer, children: [_jsx(Text, { style: [styles.fullTitle, theme?.textPrimary ? { color: theme.textPrimary } : undefined], children: title }), _jsx(Text, { style: [styles.fullDescription, theme?.textSecondary ? { color: theme.textSecondary } : undefined], children: description }), _jsxs(View, { style: styles.fullButtonsContainer, children: [whatsapp && (_jsxs(Button, { variant: "default", style: [styles.fullButton, { backgroundColor: successColor }], onPress: handleWhatsAppPress, children: [_jsx(MessageCircleIcon, { size: 20, color: "#FFFFFF" }), _jsx(Text, { style: [styles.fullButtonText, { marginLeft: 8 }], children: whatsapp.label || 'WhatsApp' })] })), phone && (_jsxs(Button, { variant: "default", style: [styles.fullButton, { backgroundColor: primaryColor }], onPress: handlePhonePress, children: [_jsx(PhoneIcon, { size: 20, color: "#FFFFFF" }), _jsx(Text, { style: [styles.fullButtonText, { marginLeft: 8 }], children: phone.label || 'Call' })] })), email && (_jsxs(Button, { variant: "default", style: [styles.fullButton, { backgroundColor: primaryColor }], onPress: handleEmailPress, children: [_jsx(MailIcon, { size: 20, color: "#FFFFFF" }), _jsx(Text, { style: [styles.fullButtonText, { marginLeft: 8 }], children: email.label || 'Email' })] }))] })] }));
|
|
68
|
+
};
|
|
69
|
+
const styles = StyleSheet.create({
|
|
70
|
+
// Icon-only variant
|
|
71
|
+
iconOnlyContainer: {
|
|
72
|
+
flexDirection: 'row',
|
|
73
|
+
justifyContent: 'center',
|
|
74
|
+
flexWrap: 'wrap',
|
|
75
|
+
},
|
|
76
|
+
iconButton: {
|
|
77
|
+
width: 44,
|
|
78
|
+
height: 44,
|
|
79
|
+
borderRadius: 22,
|
|
80
|
+
justifyContent: 'center',
|
|
81
|
+
alignItems: 'center',
|
|
82
|
+
marginHorizontal: 6,
|
|
83
|
+
},
|
|
84
|
+
// Compact variant
|
|
85
|
+
compactContainer: {
|
|
86
|
+
flexDirection: 'row',
|
|
87
|
+
justifyContent: 'center',
|
|
88
|
+
flexWrap: 'wrap',
|
|
89
|
+
},
|
|
90
|
+
compactButton: {
|
|
91
|
+
flexDirection: 'row',
|
|
92
|
+
alignItems: 'center',
|
|
93
|
+
paddingHorizontal: 16,
|
|
94
|
+
paddingVertical: 10,
|
|
95
|
+
borderRadius: 8,
|
|
96
|
+
borderWidth: 1,
|
|
97
|
+
marginHorizontal: 6,
|
|
98
|
+
},
|
|
99
|
+
compactButtonText: {
|
|
100
|
+
fontSize: 14,
|
|
101
|
+
fontWeight: '600',
|
|
102
|
+
},
|
|
103
|
+
// Full variant
|
|
104
|
+
fullContainer: {
|
|
105
|
+
alignItems: 'center',
|
|
106
|
+
paddingVertical: 16,
|
|
107
|
+
},
|
|
108
|
+
fullTitle: {
|
|
109
|
+
fontSize: 16,
|
|
110
|
+
fontWeight: '600',
|
|
111
|
+
color: '#1F2937',
|
|
112
|
+
marginBottom: 4,
|
|
113
|
+
},
|
|
114
|
+
fullDescription: {
|
|
115
|
+
fontSize: 14,
|
|
116
|
+
color: '#6B7280',
|
|
117
|
+
marginBottom: 16,
|
|
118
|
+
textAlign: 'center',
|
|
119
|
+
},
|
|
120
|
+
fullButtonsContainer: {
|
|
121
|
+
flexDirection: 'row',
|
|
122
|
+
width: '100%',
|
|
123
|
+
flexWrap: 'wrap',
|
|
124
|
+
},
|
|
125
|
+
fullButton: {
|
|
126
|
+
flex: 1,
|
|
127
|
+
minWidth: 120,
|
|
128
|
+
flexDirection: 'row',
|
|
129
|
+
alignItems: 'center',
|
|
130
|
+
justifyContent: 'center',
|
|
131
|
+
paddingVertical: 12,
|
|
132
|
+
borderRadius: 8,
|
|
133
|
+
marginHorizontal: 6,
|
|
134
|
+
},
|
|
135
|
+
fullButtonText: {
|
|
136
|
+
fontSize: 14,
|
|
137
|
+
fontWeight: '600',
|
|
138
|
+
color: '#FFFFFF',
|
|
139
|
+
},
|
|
140
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ViewStyle, TextStyle } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* PrimaryButton Component
|
|
5
|
+
*
|
|
6
|
+
* Blue primary action button with icon support.
|
|
7
|
+
* Full width with consistent styling across all screens.
|
|
8
|
+
*/
|
|
9
|
+
interface PrimaryButtonProps {
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
onPress: () => void;
|
|
12
|
+
icon?: React.ReactNode;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
backgroundColor?: string;
|
|
15
|
+
style?: ViewStyle;
|
|
16
|
+
textStyle?: TextStyle;
|
|
17
|
+
}
|
|
18
|
+
export declare const PrimaryButton: React.FC<PrimaryButtonProps>;
|
|
19
|
+
export default PrimaryButton;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { TouchableOpacity, Text, StyleSheet, Platform } from 'react-native';
|
|
3
|
+
export const PrimaryButton = ({ children, onPress, icon, disabled = false, backgroundColor = '#3B82F6', style, textStyle, }) => {
|
|
4
|
+
return (_jsxs(TouchableOpacity, { style: [
|
|
5
|
+
styles.button,
|
|
6
|
+
{ backgroundColor: disabled ? '#9CA3AF' : backgroundColor },
|
|
7
|
+
style,
|
|
8
|
+
], onPress: onPress, disabled: disabled, activeOpacity: 0.8, children: [icon && _jsx(_Fragment, { children: icon }), _jsx(Text, { style: [styles.text, icon ? styles.textWithIcon : undefined, textStyle], children: children })] }));
|
|
9
|
+
};
|
|
10
|
+
const styles = StyleSheet.create({
|
|
11
|
+
button: {
|
|
12
|
+
width: '100%',
|
|
13
|
+
paddingVertical: 16,
|
|
14
|
+
paddingHorizontal: 24,
|
|
15
|
+
borderRadius: 12,
|
|
16
|
+
flexDirection: 'row',
|
|
17
|
+
alignItems: 'center',
|
|
18
|
+
justifyContent: 'center',
|
|
19
|
+
marginBottom: 12,
|
|
20
|
+
...Platform.select({
|
|
21
|
+
ios: {
|
|
22
|
+
shadowColor: '#000',
|
|
23
|
+
shadowOffset: { width: 0, height: 2 },
|
|
24
|
+
shadowOpacity: 0.1,
|
|
25
|
+
shadowRadius: 4,
|
|
26
|
+
},
|
|
27
|
+
android: {
|
|
28
|
+
elevation: 2,
|
|
29
|
+
},
|
|
30
|
+
}),
|
|
31
|
+
},
|
|
32
|
+
text: {
|
|
33
|
+
fontSize: 16,
|
|
34
|
+
fontWeight: '600',
|
|
35
|
+
color: '#FFFFFF',
|
|
36
|
+
textAlign: 'center',
|
|
37
|
+
},
|
|
38
|
+
textWithIcon: {
|
|
39
|
+
marginLeft: 8,
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
export default PrimaryButton;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ViewStyle, TextStyle } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* SecondaryButton Component
|
|
5
|
+
*
|
|
6
|
+
* White/outline secondary action button with icon support.
|
|
7
|
+
* Full width with consistent styling across all screens.
|
|
8
|
+
*/
|
|
9
|
+
interface SecondaryButtonProps {
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
onPress: () => void;
|
|
12
|
+
icon?: React.ReactNode;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
borderColor?: string;
|
|
15
|
+
textColor?: string;
|
|
16
|
+
style?: ViewStyle;
|
|
17
|
+
textStyle?: TextStyle;
|
|
18
|
+
}
|
|
19
|
+
export declare const SecondaryButton: React.FC<SecondaryButtonProps>;
|
|
20
|
+
export default SecondaryButton;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { TouchableOpacity, Text, StyleSheet } from 'react-native';
|
|
3
|
+
export const SecondaryButton = ({ children, onPress, icon, disabled = false, borderColor = '#E5E7EB', textColor = '#1F2937', style, textStyle, }) => {
|
|
4
|
+
return (_jsxs(TouchableOpacity, { style: [
|
|
5
|
+
styles.button,
|
|
6
|
+
{ borderColor: disabled ? '#E5E7EB' : borderColor },
|
|
7
|
+
style,
|
|
8
|
+
], onPress: onPress, disabled: disabled, activeOpacity: 0.8, children: [icon && _jsx(_Fragment, { children: icon }), _jsx(Text, { style: [
|
|
9
|
+
styles.text,
|
|
10
|
+
{ color: disabled ? '#9CA3AF' : textColor },
|
|
11
|
+
icon ? styles.textWithIcon : undefined,
|
|
12
|
+
textStyle,
|
|
13
|
+
], children: children })] }));
|
|
14
|
+
};
|
|
15
|
+
const styles = StyleSheet.create({
|
|
16
|
+
button: {
|
|
17
|
+
width: '100%',
|
|
18
|
+
backgroundColor: '#FFFFFF',
|
|
19
|
+
paddingVertical: 16,
|
|
20
|
+
paddingHorizontal: 24,
|
|
21
|
+
borderRadius: 12,
|
|
22
|
+
flexDirection: 'row',
|
|
23
|
+
alignItems: 'center',
|
|
24
|
+
justifyContent: 'center',
|
|
25
|
+
borderWidth: 1,
|
|
26
|
+
marginBottom: 12,
|
|
27
|
+
},
|
|
28
|
+
text: {
|
|
29
|
+
fontSize: 16,
|
|
30
|
+
fontWeight: '600',
|
|
31
|
+
textAlign: 'center',
|
|
32
|
+
},
|
|
33
|
+
textWithIcon: {
|
|
34
|
+
marginLeft: 8,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
export default SecondaryButton;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ViewStyle, TextStyle } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* ContentCard Component
|
|
5
|
+
*
|
|
6
|
+
* White card container with border for content sections.
|
|
7
|
+
* Used for grouping related information on screens.
|
|
8
|
+
*/
|
|
9
|
+
interface ContentCardProps {
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
title?: string;
|
|
12
|
+
style?: ViewStyle;
|
|
13
|
+
titleStyle?: TextStyle;
|
|
14
|
+
}
|
|
15
|
+
export declare const ContentCard: React.FC<ContentCardProps>;
|
|
16
|
+
export default ContentCard;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { View, Text, StyleSheet } from 'react-native';
|
|
3
|
+
export const ContentCard = ({ children, title, style, titleStyle, }) => {
|
|
4
|
+
return (_jsxs(View, { style: [styles.card, style], children: [title && (_jsx(Text, { style: [styles.title, titleStyle], children: title })), children] }));
|
|
5
|
+
};
|
|
6
|
+
const styles = StyleSheet.create({
|
|
7
|
+
card: {
|
|
8
|
+
width: '100%',
|
|
9
|
+
backgroundColor: '#FFFFFF',
|
|
10
|
+
borderRadius: 12,
|
|
11
|
+
padding: 20,
|
|
12
|
+
marginBottom: 16,
|
|
13
|
+
borderWidth: 1,
|
|
14
|
+
borderColor: '#E5E7EB',
|
|
15
|
+
},
|
|
16
|
+
title: {
|
|
17
|
+
fontSize: 16,
|
|
18
|
+
fontWeight: '600',
|
|
19
|
+
color: '#1F2937',
|
|
20
|
+
marginBottom: 12,
|
|
21
|
+
lineHeight: 24,
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
export default ContentCard;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef } from 'react';
|
|
3
|
+
import { Text, StyleSheet, Animated } from 'react-native';
|
|
4
|
+
const InfoCard = ({ title = "Why we need this permission", description, backgroundColor = '#FFFFFF', borderColor = '#E5E7EB', }) => {
|
|
5
|
+
const fadeAnim = useRef(new Animated.Value(0)).current;
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
Animated.timing(fadeAnim, {
|
|
8
|
+
toValue: 1,
|
|
9
|
+
duration: 500,
|
|
10
|
+
delay: 200,
|
|
11
|
+
useNativeDriver: true,
|
|
12
|
+
}).start();
|
|
13
|
+
}, []);
|
|
14
|
+
return (_jsxs(Animated.View, { style: [
|
|
15
|
+
styles.container,
|
|
16
|
+
{
|
|
17
|
+
backgroundColor,
|
|
18
|
+
borderColor,
|
|
19
|
+
opacity: fadeAnim,
|
|
20
|
+
transform: [
|
|
21
|
+
{
|
|
22
|
+
translateY: fadeAnim.interpolate({
|
|
23
|
+
inputRange: [0, 1],
|
|
24
|
+
outputRange: [20, 0],
|
|
25
|
+
}),
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
], children: [_jsx(Text, { style: styles.title, children: title }), _jsx(Text, { style: styles.description, children: description })] }));
|
|
30
|
+
};
|
|
31
|
+
const styles = StyleSheet.create({
|
|
32
|
+
container: {
|
|
33
|
+
borderRadius: 12,
|
|
34
|
+
padding: 20,
|
|
35
|
+
marginBottom: 16,
|
|
36
|
+
borderWidth: 1,
|
|
37
|
+
width: '100%',
|
|
38
|
+
},
|
|
39
|
+
title: {
|
|
40
|
+
fontSize: 16,
|
|
41
|
+
fontWeight: '600',
|
|
42
|
+
color: '#1F2937',
|
|
43
|
+
marginBottom: 8,
|
|
44
|
+
},
|
|
45
|
+
description: {
|
|
46
|
+
fontSize: 14,
|
|
47
|
+
color: '#6B7280',
|
|
48
|
+
lineHeight: 20,
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
export default InfoCard;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface TipsCardProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
tips: string[];
|
|
5
|
+
backgroundColor?: string;
|
|
6
|
+
borderColor?: string;
|
|
7
|
+
titleColor?: string;
|
|
8
|
+
textColor?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const TipsCard: React.FC<TipsCardProps>;
|
|
11
|
+
export default TipsCard;
|