@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
package/README.md
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# @codeimplants/ui-kit
|
|
2
|
+
|
|
3
|
+
> Enterprise-grade error UI screens and components for React Native
|
|
4
|
+
|
|
5
|
+
[]()
|
|
6
|
+
[]()
|
|
7
|
+
[]()
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
`@codeimplants/ui-kit` provides beautiful, production-ready error screens and UI components for React Native applications. Designed with 100% customizability in mind, every pixel, color, and text can be controlled via props.
|
|
12
|
+
|
|
13
|
+
This package contains **22 unique screens** categorized into four main domains: Errors, Network, Permissions, and System.
|
|
14
|
+
|
|
15
|
+
## Project Structure
|
|
16
|
+
|
|
17
|
+
The package is organized into a modular structure for better maintainability and discoverability:
|
|
18
|
+
```
|
|
19
|
+
src/
|
|
20
|
+
├── components/ # Shared UI components (buttons, cards, icons, etc.)
|
|
21
|
+
├── screens/ # Full-screen views (errors, system, permissions)
|
|
22
|
+
├── types/ # Modular type definitions
|
|
23
|
+
├── utils/ # Utility functions
|
|
24
|
+
└── index.ts # Public API export
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Common Configuration
|
|
28
|
+
|
|
29
|
+
All screens share a set of common configuration props that unify the design and behavior across your app.
|
|
30
|
+
|
|
31
|
+
### 🎨 Theme & Styling
|
|
32
|
+
Customize the look and feel globally or per-screen using the `theme` prop.
|
|
33
|
+
```tsx
|
|
34
|
+
<Screen
|
|
35
|
+
theme={{
|
|
36
|
+
primary: '#6200EE', // Main brand color
|
|
37
|
+
background: '#FFFFFF', // Screen background
|
|
38
|
+
surface: '#F5F5F5', // Card/Input background
|
|
39
|
+
textPrimary: '#000000', // Main text color
|
|
40
|
+
textSecondary: '#757575', // Subtitle text color
|
|
41
|
+
error: '#B00020', // Error state color
|
|
42
|
+
success: '#00C853', // Success state color
|
|
43
|
+
warning: '#FFAB00', // Warning state color
|
|
44
|
+
}}
|
|
45
|
+
/>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### 🛠 Support Integration
|
|
49
|
+
Integrates seamlessly with `@codeimplants/support`. All screens accept a `support` prop to display contact options.
|
|
50
|
+
```tsx
|
|
51
|
+
<Screen
|
|
52
|
+
support={{
|
|
53
|
+
whatsapp: { number: '1234567890', label: 'Chat Support' },
|
|
54
|
+
phone: { number: '1800-123-456', label: 'Call Us' },
|
|
55
|
+
email: { address: 'support@example.com', label: 'Email Us' }
|
|
56
|
+
}}
|
|
57
|
+
supportVariant="icon-only" // 'icon-only' | 'compact' | 'full'
|
|
58
|
+
/>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### 🔄 Retry Logic
|
|
62
|
+
For error and network screens, the optional `retryInfo` prop displays attempt counts and limits.
|
|
63
|
+
```tsx
|
|
64
|
+
<Screen
|
|
65
|
+
onRetry={handleRetry}
|
|
66
|
+
retryInfo={{
|
|
67
|
+
attempt: 2,
|
|
68
|
+
maxAttempts: 5
|
|
69
|
+
}} // Displays "Retrying (2/5)..."
|
|
70
|
+
/>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Screen Reference
|
|
74
|
+
|
|
75
|
+
### 1. Error Screens (5 Screens)
|
|
76
|
+
*Generic and specific handlers for API and runtime errors.*
|
|
77
|
+
|
|
78
|
+
| Screen | Description | Key Props |
|
|
79
|
+
|--------|-------------|-----------|
|
|
80
|
+
| `ApiErrorScreen` | General API error handler. | `onRetry`, `errorCode`, `statusCode` |
|
|
81
|
+
| `ClientErrorScreen` | Handler for 4xx series errors (e.g., 404). | `statusCode`, `onGoBack` |
|
|
82
|
+
| `ServerErrorScreen` | Handler for 5xx series errors (e.g., 500). | `statusCode`, `onRetry`, `retryInfo` |
|
|
83
|
+
| `ErrorBoundaryScreen` | Global fallback for app crashes. | `error`, `errorDetails`, `onReset` |
|
|
84
|
+
| `InvalidResponseScreen` | For malformed/unexpected server data. | `errorDetails`, `onReportError` |
|
|
85
|
+
|
|
86
|
+
### 2. Network Screens (3 Screens)
|
|
87
|
+
*Connectivity states handling.*
|
|
88
|
+
|
|
89
|
+
| Screen | Description | Key Props |
|
|
90
|
+
|--------|-------------|-----------|
|
|
91
|
+
| `NetworkOfflineScreen` | No internet connection. | `onRetry`, `tips` (troubleshooting steps) |
|
|
92
|
+
| `NetworkSlowConnectionScreen` | High latency / poor connection. | `connectionSpeed`, `onContinue` (ignore warning) |
|
|
93
|
+
| `ApiTimeoutScreen` | Request timeout. | `timeoutDuration`, `onRetry` |
|
|
94
|
+
|
|
95
|
+
### 3. Permission Screens (4 Screens)
|
|
96
|
+
*OS permission request flows.*
|
|
97
|
+
|
|
98
|
+
| Screen | Description | Key Props |
|
|
99
|
+
|--------|-------------|-----------|
|
|
100
|
+
| `PermissionScreen` | Simple single-permission request. | `permissionType`, `onAllow`, `onDeny` |
|
|
101
|
+
| `PermissionRequestScreen` | Detailed request with "Why we need this". | `reasons` (array), `icon` |
|
|
102
|
+
| `PermissionDeniedScreen` | Help screen when permission is permanently denied. | `steps` (how to enable in settings), `onOpenSettings` |
|
|
103
|
+
| `MultiPermissionRequestScreen`| Request multiple permissions in one flow. | `permissions` (array of status objects) |
|
|
104
|
+
|
|
105
|
+
### 4. System Screens (10 Screens)
|
|
106
|
+
*App lifecycle and maintenance events.*
|
|
107
|
+
|
|
108
|
+
**Update Screens:**
|
|
109
|
+
| Screen | Description | Key Props |
|
|
110
|
+
|--------|-------------|-----------|
|
|
111
|
+
| `AppUpdateScreen` | Unified update handler (soft/force/security). | `updateType`, `newVersion`, `releaseNotes` |
|
|
112
|
+
| `SoftUpdateScreen` | Optional update with "Skip" option. | `features`, `onSkip` |
|
|
113
|
+
| `OptionalUpdateScreen` | Standard update with "Remind Later". | `onMaybeLater` |
|
|
114
|
+
| `ForceUpdateScreen` | Mandatory blocking update. | `onUpdate` (no skip option) |
|
|
115
|
+
| `SecurityUpdateScreen` | Critical security patch alert. | `features` (security fixes details) |
|
|
116
|
+
|
|
117
|
+
**Maintenance Screens:**
|
|
118
|
+
| Screen | Description | Key Props |
|
|
119
|
+
|--------|-------------|-----------|
|
|
120
|
+
| `SystemMaintenanceScreen` | Unified maintenance handler. | `type` (planned/emergency), `estimatedEndTime` |
|
|
121
|
+
| `PlannedMaintenanceScreen` | Scheduled maintenance with countdown. | `onNotifyWhenBack` |
|
|
122
|
+
| `UnplannedOutageScreen` | Unexpected downtime apology. | `onCheckAgain` |
|
|
123
|
+
| `EmergencyOutageScreen` | Critical service failure. | `incidentDetails`, `onGetUpdates` |
|
|
124
|
+
| `ServiceUnavailableScreen` | 503 Service Unavailable fallback. | `onRetry` |
|
|
125
|
+
|
|
126
|
+
## Installation
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
npm install @codeimplants/ui-kit @codeimplants/support
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Platform Compatibility
|
|
133
|
+
|
|
134
|
+
| Platform | Status |
|
|
135
|
+
|----------|--------|
|
|
136
|
+
| iOS | ✅ |
|
|
137
|
+
| Android | ✅ |
|
|
138
|
+
| Web (React Native Web) | ✅ |
|
|
139
|
+
| Expo | ✅ |
|
|
140
|
+
| Bare React Native | ✅ |
|
|
141
|
+
|
|
142
|
+
## License
|
|
143
|
+
|
|
144
|
+
MIT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './supportAdapter';
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Support Adapter
|
|
3
|
+
*
|
|
4
|
+
* Clean adapter layer that connects UI Kit screens to Support package.
|
|
5
|
+
* UI screens remain agnostic of support implementation details.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Error Context Type
|
|
9
|
+
* Shared between ui-kit and support packages
|
|
10
|
+
*/
|
|
11
|
+
export interface ErrorContext {
|
|
12
|
+
errorMessage: string;
|
|
13
|
+
errorCode?: string;
|
|
14
|
+
screenName?: string;
|
|
15
|
+
timestamp: string;
|
|
16
|
+
appVersion: string;
|
|
17
|
+
platform: 'web' | 'ios' | 'android';
|
|
18
|
+
os: string;
|
|
19
|
+
userId?: string;
|
|
20
|
+
retryCount?: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Retry Handler Type
|
|
24
|
+
*
|
|
25
|
+
* Future-proof interface for retry logic.
|
|
26
|
+
* Even if retry implementation changes internally, UI remains stable.
|
|
27
|
+
*/
|
|
28
|
+
export type RetryHandler = () => Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Support Callback Handler
|
|
31
|
+
*
|
|
32
|
+
* Returns a callback function that can be passed to UI screens.
|
|
33
|
+
* The callback will be invoked with the support hook methods.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```tsx
|
|
37
|
+
* const supportHandler = createSupportHandler('ApiErrorScreen', errorContext);
|
|
38
|
+
*
|
|
39
|
+
* <ApiErrorScreen
|
|
40
|
+
* onRetry={retryHandler}
|
|
41
|
+
* support={{
|
|
42
|
+
* onWhatsApp: () => supportHandler((support) => support.openWhatsApp()),
|
|
43
|
+
* onEmail: () => supportHandler((support) => support.sendEmail()),
|
|
44
|
+
* onCall: () => supportHandler((support) => support.makeCall()),
|
|
45
|
+
* }}
|
|
46
|
+
* />
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export interface SupportHandler {
|
|
50
|
+
/**
|
|
51
|
+
* Execute a support action using the support hook
|
|
52
|
+
* @param action - Function that receives the support hook and executes an action
|
|
53
|
+
*/
|
|
54
|
+
(action: (support: any) => Promise<any>): Promise<void>;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Create a support handler for a specific screen
|
|
58
|
+
*
|
|
59
|
+
* This function is meant to be used in test apps to connect UI screens
|
|
60
|
+
* to the support package. In production apps, you would implement this
|
|
61
|
+
* based on your specific requirements.
|
|
62
|
+
*
|
|
63
|
+
* @param screenName - Name of the screen (for logging/debugging)
|
|
64
|
+
* @param errorContext - Error context to pass to support methods
|
|
65
|
+
* @returns A handler function that can execute support actions
|
|
66
|
+
*/
|
|
67
|
+
export declare function createSupportHandler(screenName: string, errorContext: ErrorContext): SupportHandler;
|
|
68
|
+
/**
|
|
69
|
+
* Create a retry handler for a specific screen
|
|
70
|
+
*
|
|
71
|
+
* Placeholder for future retry logic implementation.
|
|
72
|
+
* UI screens can use this type without knowing retry implementation details.
|
|
73
|
+
*
|
|
74
|
+
* @param screenName - Name of the screen (for logging/debugging)
|
|
75
|
+
* @param retryAction - The actual retry logic to execute
|
|
76
|
+
* @returns A retry handler function
|
|
77
|
+
*/
|
|
78
|
+
export declare function createRetryHandler(screenName: string, retryAction: () => Promise<void>): RetryHandler;
|
|
79
|
+
/**
|
|
80
|
+
* Utility to create error context from screen data
|
|
81
|
+
*
|
|
82
|
+
* @param screenName - Name of the screen
|
|
83
|
+
* @param errorMessage - Error message to include
|
|
84
|
+
* @param errorCode - Optional error code
|
|
85
|
+
* @returns ErrorContext object
|
|
86
|
+
*/
|
|
87
|
+
export declare function createErrorContext(screenName: string, errorMessage: string, errorCode?: string): ErrorContext;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Support Adapter
|
|
3
|
+
*
|
|
4
|
+
* Clean adapter layer that connects UI Kit screens to Support package.
|
|
5
|
+
* UI screens remain agnostic of support implementation details.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Create a support handler for a specific screen
|
|
9
|
+
*
|
|
10
|
+
* This function is meant to be used in test apps to connect UI screens
|
|
11
|
+
* to the support package. In production apps, you would implement this
|
|
12
|
+
* based on your specific requirements.
|
|
13
|
+
*
|
|
14
|
+
* @param screenName - Name of the screen (for logging/debugging)
|
|
15
|
+
* @param errorContext - Error context to pass to support methods
|
|
16
|
+
* @returns A handler function that can execute support actions
|
|
17
|
+
*/
|
|
18
|
+
export function createSupportHandler(screenName, errorContext) {
|
|
19
|
+
return async (action) => {
|
|
20
|
+
try {
|
|
21
|
+
// In a real implementation, you would get the support hook here
|
|
22
|
+
// For now, this is a placeholder that test apps will override
|
|
23
|
+
console.log(`[${screenName}] Support action triggered`, {
|
|
24
|
+
errorContext,
|
|
25
|
+
timestamp: new Date().toISOString(),
|
|
26
|
+
});
|
|
27
|
+
// The test app will provide the actual support hook
|
|
28
|
+
await action({ errorContext });
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
console.error(`[${screenName}] Support action failed:`, error);
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Create a retry handler for a specific screen
|
|
38
|
+
*
|
|
39
|
+
* Placeholder for future retry logic implementation.
|
|
40
|
+
* UI screens can use this type without knowing retry implementation details.
|
|
41
|
+
*
|
|
42
|
+
* @param screenName - Name of the screen (for logging/debugging)
|
|
43
|
+
* @param retryAction - The actual retry logic to execute
|
|
44
|
+
* @returns A retry handler function
|
|
45
|
+
*/
|
|
46
|
+
export function createRetryHandler(screenName, retryAction) {
|
|
47
|
+
return async () => {
|
|
48
|
+
try {
|
|
49
|
+
console.log(`[${screenName}] Retry triggered`, {
|
|
50
|
+
timestamp: new Date().toISOString(),
|
|
51
|
+
});
|
|
52
|
+
await retryAction();
|
|
53
|
+
console.log(`[${screenName}] Retry completed successfully`);
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
console.error(`[${screenName}] Retry failed:`, error);
|
|
57
|
+
throw error;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Utility to create error context from screen data
|
|
63
|
+
*
|
|
64
|
+
* @param screenName - Name of the screen
|
|
65
|
+
* @param errorMessage - Error message to include
|
|
66
|
+
* @param errorCode - Optional error code
|
|
67
|
+
* @returns ErrorContext object
|
|
68
|
+
*/
|
|
69
|
+
export function createErrorContext(screenName, errorMessage, errorCode) {
|
|
70
|
+
return {
|
|
71
|
+
errorMessage,
|
|
72
|
+
errorCode,
|
|
73
|
+
screenName,
|
|
74
|
+
timestamp: new Date().toISOString(),
|
|
75
|
+
appVersion: '1.0.0', // Should be replaced with actual app version
|
|
76
|
+
platform: getPlatform(),
|
|
77
|
+
os: getOS(),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Get current platform
|
|
82
|
+
*/
|
|
83
|
+
function getPlatform() {
|
|
84
|
+
// This is a simplified version - in production use proper platform detection
|
|
85
|
+
if (typeof window !== 'undefined') {
|
|
86
|
+
return 'web';
|
|
87
|
+
}
|
|
88
|
+
// For React Native, you would use Platform.OS
|
|
89
|
+
return 'web';
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Get OS information
|
|
93
|
+
*/
|
|
94
|
+
function getOS() {
|
|
95
|
+
if (typeof window !== 'undefined' && window.navigator) {
|
|
96
|
+
return window.navigator.userAgent;
|
|
97
|
+
}
|
|
98
|
+
return 'Unknown';
|
|
99
|
+
}
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ErrorContext, UIKitConfig } from './types';
|
|
2
|
+
export declare const initializeUIKit: (customConfig: UIKitConfig) => void;
|
|
3
|
+
export declare const getConfig: () => UIKitConfig;
|
|
4
|
+
export declare const isWeb: () => boolean;
|
|
5
|
+
export declare const isIOS: () => boolean;
|
|
6
|
+
export declare const isAndroid: () => boolean;
|
|
7
|
+
export declare const getPlatformName: () => "web" | "ios" | "android";
|
|
8
|
+
export declare const getOSInfo: () => string;
|
|
9
|
+
export declare const buildErrorContext: (errorMessage: string, options?: Partial<ErrorContext>) => ErrorContext;
|
|
10
|
+
export declare const formatErrorForSupport: (context: ErrorContext) => string;
|
|
11
|
+
export declare const getWhatsAppUrl: (context?: ErrorContext) => string;
|
|
12
|
+
/**
|
|
13
|
+
* Get phone URL for support
|
|
14
|
+
*/
|
|
15
|
+
export declare const getPhoneUrl: () => string;
|
|
16
|
+
/**
|
|
17
|
+
* Calculate exponential backoff delay
|
|
18
|
+
*/
|
|
19
|
+
export declare const calculateBackoffDelay: (attempt: number, baseDelay?: number, maxDelay?: number) => number;
|
|
20
|
+
/**
|
|
21
|
+
* Format delay time for display
|
|
22
|
+
*/
|
|
23
|
+
export declare const formatDelayTime: (milliseconds: number) => string;
|
|
24
|
+
/**
|
|
25
|
+
* Get connection speed label (UI only)
|
|
26
|
+
*/
|
|
27
|
+
export declare const getConnectionSpeedLabel: (speed: string) => string;
|
|
28
|
+
/**
|
|
29
|
+
* Get connection tips based on speed (UI only)
|
|
30
|
+
*/
|
|
31
|
+
export declare const getConnectionTips: (speed: string) => string[];
|
|
32
|
+
/**
|
|
33
|
+
* Get permission display name
|
|
34
|
+
*/
|
|
35
|
+
export declare const getPermissionDisplayName: (permission: string) => string;
|
|
36
|
+
/**
|
|
37
|
+
* Get permission description
|
|
38
|
+
*/
|
|
39
|
+
export declare const getPermissionDescription: (permission: string) => string;
|
|
40
|
+
/**
|
|
41
|
+
* Get color by type
|
|
42
|
+
*/
|
|
43
|
+
export declare const getColor: (type: keyof NonNullable<UIKitConfig["colors"]>) => string;
|
|
44
|
+
/**
|
|
45
|
+
* Get color with opacity
|
|
46
|
+
*/
|
|
47
|
+
export declare const getColorWithOpacity: (colorOrKey: keyof NonNullable<UIKitConfig["colors"]> | string, opacity: number) => string;
|
|
48
|
+
/**
|
|
49
|
+
* Get responsive padding based on platform
|
|
50
|
+
*/
|
|
51
|
+
export declare const getResponsivePadding: () => number;
|
|
52
|
+
/**
|
|
53
|
+
* Get responsive font size
|
|
54
|
+
*/
|
|
55
|
+
export declare const getResponsiveFontSize: (base: number) => number;
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { Platform } from 'react-native';
|
|
2
|
+
let config = {
|
|
3
|
+
appVersion: '1.0.0',
|
|
4
|
+
supportPhone: '+919850929690',
|
|
5
|
+
colors: {
|
|
6
|
+
error: '#EF4444',
|
|
7
|
+
warning: '#F59E0B',
|
|
8
|
+
success: '#10B981',
|
|
9
|
+
offline: '#6B7280',
|
|
10
|
+
primary: '#3B82F6',
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
export const initializeUIKit = (customConfig) => {
|
|
14
|
+
config = { ...config, ...customConfig };
|
|
15
|
+
};
|
|
16
|
+
export const getConfig = () => config;
|
|
17
|
+
export const isWeb = () => {
|
|
18
|
+
return Platform.OS === 'web';
|
|
19
|
+
};
|
|
20
|
+
export const isIOS = () => {
|
|
21
|
+
return Platform.OS === 'ios';
|
|
22
|
+
};
|
|
23
|
+
export const isAndroid = () => {
|
|
24
|
+
return Platform.OS === 'android';
|
|
25
|
+
};
|
|
26
|
+
export const getPlatformName = () => {
|
|
27
|
+
return Platform.OS;
|
|
28
|
+
};
|
|
29
|
+
export const getOSInfo = () => {
|
|
30
|
+
if (isIOS())
|
|
31
|
+
return `iOS ${Platform.Version || 'Unknown'}`;
|
|
32
|
+
if (isAndroid())
|
|
33
|
+
return `Android ${Platform.Version || 'Unknown'}`;
|
|
34
|
+
if (isWeb()) {
|
|
35
|
+
// For web, we can try to detect from user agent
|
|
36
|
+
if (typeof navigator !== 'undefined') {
|
|
37
|
+
const ua = navigator.userAgent;
|
|
38
|
+
if (/Macintosh/.test(ua))
|
|
39
|
+
return 'macOS';
|
|
40
|
+
if (/Windows/.test(ua))
|
|
41
|
+
return 'Windows';
|
|
42
|
+
if (/Linux/.test(ua))
|
|
43
|
+
return 'Linux';
|
|
44
|
+
}
|
|
45
|
+
return 'Web';
|
|
46
|
+
}
|
|
47
|
+
return 'Unknown';
|
|
48
|
+
};
|
|
49
|
+
export const buildErrorContext = (errorMessage, options) => {
|
|
50
|
+
return {
|
|
51
|
+
errorMessage,
|
|
52
|
+
timestamp: new Date().toISOString(),
|
|
53
|
+
appVersion: config.appVersion || '1.0.0',
|
|
54
|
+
platform: getPlatformName(),
|
|
55
|
+
os: getOSInfo(),
|
|
56
|
+
...options,
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
export const formatErrorForSupport = (context) => {
|
|
60
|
+
const maskedUserId = context.userId
|
|
61
|
+
? `${context.userId.slice(0, 4)}****${context.userId.slice(-4)}`
|
|
62
|
+
: 'Guest';
|
|
63
|
+
return `
|
|
64
|
+
🚨 *Support Request*
|
|
65
|
+
|
|
66
|
+
📱 *App Version:* ${context.appVersion}
|
|
67
|
+
💻 *Platform:* ${context.platform}
|
|
68
|
+
🖥️ *OS:* ${context.os}
|
|
69
|
+
👤 *User:* ${maskedUserId}
|
|
70
|
+
⏰ *Time:* ${new Date(context.timestamp).toLocaleString()}
|
|
71
|
+
|
|
72
|
+
❌ *Error:* ${context.errorMessage}
|
|
73
|
+
${context.errorCode ? `📋 *Code:* ${context.errorCode}` : ''}
|
|
74
|
+
${context.screenName ? `📍 *Screen:* ${context.screenName}` : ''}
|
|
75
|
+
${context.retryCount ? `🔄 *Retry Count:* ${context.retryCount}` : ''}
|
|
76
|
+
`.trim();
|
|
77
|
+
};
|
|
78
|
+
export const getWhatsAppUrl = (context) => {
|
|
79
|
+
const phone = config.supportPhone?.replace(/[^0-9]/g, '') || '919850929690';
|
|
80
|
+
if (context) {
|
|
81
|
+
const message = encodeURIComponent(formatErrorForSupport(context));
|
|
82
|
+
return `https://wa.me/${phone}?text=${message}`;
|
|
83
|
+
}
|
|
84
|
+
return `https://wa.me/${phone}`;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Get phone URL for support
|
|
88
|
+
*/
|
|
89
|
+
export const getPhoneUrl = () => {
|
|
90
|
+
return `tel:${config.supportPhone || '+919850929690'}`;
|
|
91
|
+
};
|
|
92
|
+
// ============================================================================
|
|
93
|
+
// Retry Logic Utilities
|
|
94
|
+
// ============================================================================
|
|
95
|
+
/**
|
|
96
|
+
* Calculate exponential backoff delay
|
|
97
|
+
*/
|
|
98
|
+
export const calculateBackoffDelay = (attempt, baseDelay = 1000, maxDelay = 30000) => {
|
|
99
|
+
const delay = Math.min(baseDelay * Math.pow(2, attempt), maxDelay);
|
|
100
|
+
// Add jitter (±20%)
|
|
101
|
+
const jitter = delay * 0.2 * (Math.random() - 0.5);
|
|
102
|
+
return Math.round(delay + jitter);
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* Format delay time for display
|
|
106
|
+
*/
|
|
107
|
+
export const formatDelayTime = (milliseconds) => {
|
|
108
|
+
const seconds = Math.ceil(milliseconds / 1000);
|
|
109
|
+
if (seconds < 60)
|
|
110
|
+
return `${seconds}s`;
|
|
111
|
+
const minutes = Math.floor(seconds / 60);
|
|
112
|
+
const remainingSeconds = seconds % 60;
|
|
113
|
+
return `${minutes}m ${remainingSeconds}s`;
|
|
114
|
+
};
|
|
115
|
+
// ============================================================================
|
|
116
|
+
// Network Utilities (UI Only - for display purposes)
|
|
117
|
+
// ============================================================================
|
|
118
|
+
/**
|
|
119
|
+
* Get connection speed label (UI only)
|
|
120
|
+
*/
|
|
121
|
+
export const getConnectionSpeedLabel = (speed) => {
|
|
122
|
+
const labels = {
|
|
123
|
+
'2G': 'Very Slow (2G)',
|
|
124
|
+
'3G': 'Slow (3G)',
|
|
125
|
+
'4G': 'Good (4G)',
|
|
126
|
+
'5G': 'Excellent (5G)',
|
|
127
|
+
slow: 'Slow Connection',
|
|
128
|
+
fast: 'Fast Connection',
|
|
129
|
+
};
|
|
130
|
+
return labels[speed] || 'Unknown';
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* Get connection tips based on speed (UI only)
|
|
134
|
+
*/
|
|
135
|
+
export const getConnectionTips = (speed) => {
|
|
136
|
+
const tips = {
|
|
137
|
+
'2G': [
|
|
138
|
+
'Try moving to an area with better signal',
|
|
139
|
+
'Connect to Wi-Fi if available',
|
|
140
|
+
'Close other apps using internet',
|
|
141
|
+
],
|
|
142
|
+
'3G': [
|
|
143
|
+
'Consider switching to Wi-Fi',
|
|
144
|
+
'Some features may load slowly',
|
|
145
|
+
'Try again in a moment',
|
|
146
|
+
],
|
|
147
|
+
slow: [
|
|
148
|
+
'Check your internet connection',
|
|
149
|
+
'Try moving closer to your router',
|
|
150
|
+
'Restart your device if needed',
|
|
151
|
+
],
|
|
152
|
+
};
|
|
153
|
+
return tips[speed] || tips.slow;
|
|
154
|
+
};
|
|
155
|
+
// ============================================================================
|
|
156
|
+
// Permission Utilities (UI Only)
|
|
157
|
+
// ============================================================================
|
|
158
|
+
/**
|
|
159
|
+
* Get permission display name
|
|
160
|
+
*/
|
|
161
|
+
export const getPermissionDisplayName = (permission) => {
|
|
162
|
+
const names = {
|
|
163
|
+
camera: 'Camera',
|
|
164
|
+
location: 'Location',
|
|
165
|
+
notifications: 'Notifications',
|
|
166
|
+
storage: 'Storage',
|
|
167
|
+
microphone: 'Microphone',
|
|
168
|
+
contacts: 'Contacts',
|
|
169
|
+
calendar: 'Calendar',
|
|
170
|
+
};
|
|
171
|
+
return names[permission] || permission;
|
|
172
|
+
};
|
|
173
|
+
/**
|
|
174
|
+
* Get permission description
|
|
175
|
+
*/
|
|
176
|
+
export const getPermissionDescription = (permission) => {
|
|
177
|
+
const descriptions = {
|
|
178
|
+
camera: 'Take photos and videos',
|
|
179
|
+
location: 'Access your location for better experience',
|
|
180
|
+
notifications: 'Receive important updates and alerts',
|
|
181
|
+
storage: 'Save and access files on your device',
|
|
182
|
+
microphone: 'Record audio and voice messages',
|
|
183
|
+
contacts: 'Find and connect with friends',
|
|
184
|
+
calendar: 'Sync events and reminders',
|
|
185
|
+
};
|
|
186
|
+
return descriptions[permission] || 'Required for app functionality';
|
|
187
|
+
};
|
|
188
|
+
// ============================================================================
|
|
189
|
+
// Color Utilities
|
|
190
|
+
// ============================================================================
|
|
191
|
+
/**
|
|
192
|
+
* Get color by type
|
|
193
|
+
*/
|
|
194
|
+
export const getColor = (type) => {
|
|
195
|
+
return config.colors?.[type] || '#3B82F6';
|
|
196
|
+
};
|
|
197
|
+
/**
|
|
198
|
+
* Get color with opacity
|
|
199
|
+
*/
|
|
200
|
+
export const getColorWithOpacity = (colorOrKey, opacity) => {
|
|
201
|
+
// Check if it's a hex color (starts with #) or a color key
|
|
202
|
+
const color = colorOrKey.startsWith('#') ? colorOrKey : getColor(colorOrKey);
|
|
203
|
+
const hex = color.replace('#', '');
|
|
204
|
+
const r = parseInt(hex.substring(0, 2), 16);
|
|
205
|
+
const g = parseInt(hex.substring(2, 4), 16);
|
|
206
|
+
const b = parseInt(hex.substring(4, 6), 16);
|
|
207
|
+
return `rgba(${r}, ${g}, ${b}, ${opacity})`;
|
|
208
|
+
};
|
|
209
|
+
// ============================================================================
|
|
210
|
+
// Dimension Utilities
|
|
211
|
+
// ============================================================================
|
|
212
|
+
/**
|
|
213
|
+
* Get responsive padding based on platform
|
|
214
|
+
*/
|
|
215
|
+
export const getResponsivePadding = () => {
|
|
216
|
+
if (isWeb())
|
|
217
|
+
return 24;
|
|
218
|
+
if (isIOS())
|
|
219
|
+
return 20;
|
|
220
|
+
return 16; // Android
|
|
221
|
+
};
|
|
222
|
+
/**
|
|
223
|
+
* Get responsive font size
|
|
224
|
+
*/
|
|
225
|
+
export const getResponsiveFontSize = (base) => {
|
|
226
|
+
if (isWeb())
|
|
227
|
+
return base;
|
|
228
|
+
return base; // Can be adjusted based on platform needs
|
|
229
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface IconProps {
|
|
3
|
+
size?: number;
|
|
4
|
+
color?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const AlertTriangleIcon: React.FC<IconProps>;
|
|
7
|
+
export declare const WifiOffIcon: React.FC<IconProps>;
|
|
8
|
+
export declare const ServerCrashIcon: React.FC<IconProps>;
|
|
9
|
+
export declare const ClockIcon: React.FC<IconProps>;
|
|
10
|
+
export declare const RefreshIcon: React.FC<IconProps>;
|
|
11
|
+
export declare const CheckCircleIcon: React.FC<IconProps>;
|
|
12
|
+
export declare const DownloadIcon: React.FC<IconProps>;
|
|
13
|
+
export declare const WrenchIcon: React.FC<IconProps>;
|
|
14
|
+
export declare const ShieldIcon: React.FC<IconProps>;
|
|
15
|
+
export declare const HomeIcon: React.FC<IconProps>;
|
|
16
|
+
export declare const PhoneIcon: React.FC<IconProps>;
|
|
17
|
+
export declare const MessageCircleIcon: React.FC<IconProps>;
|
|
18
|
+
export declare const GaugeIcon: React.FC<IconProps>;
|
|
19
|
+
export declare const SettingsIcon: React.FC<IconProps>;
|
|
20
|
+
export declare const XIcon: React.FC<IconProps>;
|
|
21
|
+
export declare const ChevronRightIcon: React.FC<IconProps>;
|
|
22
|
+
export declare const MailIcon: React.FC<IconProps>;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Svg, { Path, Circle, Line, Polyline } from 'react-native-svg';
|
|
3
|
+
export const AlertTriangleIcon = ({ size = 24, color = '#000' }) => (_jsxs(Svg, { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [_jsx(Path, { d: "M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z", stroke: color, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }), _jsx(Line, { x1: "12", y1: "9", x2: "12", y2: "13", stroke: color, strokeWidth: 2, strokeLinecap: "round" }), _jsx(Circle, { cx: "12", cy: "17", r: "1", fill: color })] }));
|
|
4
|
+
export const WifiOffIcon = ({ size = 24, color = '#000' }) => (_jsxs(Svg, { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [_jsx(Line, { x1: "1", y1: "1", x2: "23", y2: "23", stroke: color, strokeWidth: 2, strokeLinecap: "round" }), _jsx(Path, { d: "M16.72 11.06A10.94 10.94 0 0119 12.55M5 12.55a10.94 10.94 0 015.17-2.39M10.71 5.05A16 16 0 0122.58 9M1.42 9a15.91 15.91 0 014.7-2.88M8.53 16.11a6 6 0 016.95 0", stroke: color, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }), _jsx(Circle, { cx: "12", cy: "20", r: "1", fill: color })] }));
|
|
5
|
+
export const ServerCrashIcon = ({ size = 24, color = '#000' }) => (_jsxs(Svg, { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [_jsx(Path, { d: "M4 2h16a2 2 0 012 2v4a2 2 0 01-2 2H4a2 2 0 01-2-2V4a2 2 0 012-2zM4 14h16a2 2 0 012 2v4a2 2 0 01-2 2H4a2 2 0 01-2-2v-4a2 2 0 012-2z", stroke: color, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }), _jsx(Line, { x1: "6", y1: "6", x2: "6.01", y2: "6", stroke: color, strokeWidth: 2, strokeLinecap: "round" }), _jsx(Line, { x1: "6", y1: "18", x2: "6.01", y2: "18", stroke: color, strokeWidth: 2, strokeLinecap: "round" }), _jsx(Line, { x1: "10", y1: "6", x2: "14", y2: "6", stroke: color, strokeWidth: 2, strokeLinecap: "round" }), _jsx(Line, { x1: "10", y1: "18", x2: "14", y2: "18", stroke: color, strokeWidth: 2, strokeLinecap: "round" })] }));
|
|
6
|
+
export const ClockIcon = ({ size = 24, color = '#000' }) => (_jsxs(Svg, { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [_jsx(Circle, { cx: "12", cy: "12", r: "10", stroke: color, strokeWidth: 2 }), _jsx(Polyline, { points: "12 6 12 12 16 14", stroke: color, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })] }));
|
|
7
|
+
export const RefreshIcon = ({ size = 24, color = '#000' }) => (_jsxs(Svg, { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [_jsx(Polyline, { points: "23 4 23 10 17 10", stroke: color, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }), _jsx(Polyline, { points: "1 20 1 14 7 14", stroke: color, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }), _jsx(Path, { d: "M3.51 9a9 9 0 0114.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0020.49 15", stroke: color, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })] }));
|
|
8
|
+
export const CheckCircleIcon = ({ size = 24, color = '#000' }) => (_jsxs(Svg, { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [_jsx(Circle, { cx: "12", cy: "12", r: "10", stroke: color, strokeWidth: 2 }), _jsx(Polyline, { points: "9 12 11 14 15 10", stroke: color, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })] }));
|
|
9
|
+
export const DownloadIcon = ({ size = 24, color = '#000' }) => (_jsxs(Svg, { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [_jsx(Path, { d: "M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4", stroke: color, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }), _jsx(Polyline, { points: "7 10 12 15 17 10", stroke: color, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }), _jsx(Line, { x1: "12", y1: "15", x2: "12", y2: "3", stroke: color, strokeWidth: 2, strokeLinecap: "round" })] }));
|
|
10
|
+
export const WrenchIcon = ({ size = 24, color = '#000' }) => (_jsx(Svg, { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: _jsx(Path, { d: "M14.7 6.3a1 1 0 000 1.4l1.6 1.6a1 1 0 001.4 0l3.77-3.77a6 6 0 01-7.94 7.94l-6.91 6.91a2.12 2.12 0 01-3-3l6.91-6.91a6 6 0 017.94-7.94l-3.76 3.76z", stroke: color, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
11
|
+
export const ShieldIcon = ({ size = 24, color = '#000' }) => (_jsx(Svg, { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: _jsx(Path, { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z", stroke: color, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
12
|
+
export const HomeIcon = ({ size = 24, color = '#000' }) => (_jsxs(Svg, { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [_jsx(Path, { d: "M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2z", stroke: color, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }), _jsx(Polyline, { points: "9 22 9 12 15 12 15 22", stroke: color, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })] }));
|
|
13
|
+
export const PhoneIcon = ({ size = 24, color = '#000' }) => (_jsx(Svg, { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: _jsx(Path, { d: "M22 16.92v3a2 2 0 01-2.18 2 19.79 19.79 0 01-8.63-3.07 19.5 19.5 0 01-6-6 19.79 19.79 0 01-3.07-8.67A2 2 0 014.11 2h3a2 2 0 012 1.72 12.84 12.84 0 00.7 2.81 2 2 0 01-.45 2.11L8.09 9.91a16 16 0 006 6l1.27-1.27a2 2 0 012.11-.45 12.84 12.84 0 002.81.7A2 2 0 0122 16.92z", stroke: color, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
14
|
+
export const MessageCircleIcon = ({ size = 24, color = '#000' }) => (_jsx(Svg, { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: _jsx(Path, { d: "M21 11.5a8.38 8.38 0 01-.9 3.8 8.5 8.5 0 01-7.6 4.7 8.38 8.38 0 01-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 01-.9-3.8 8.5 8.5 0 014.7-7.6 8.38 8.38 0 013.8-.9h.5a8.48 8.48 0 018 8v.5z", stroke: color, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
15
|
+
export const GaugeIcon = ({ size = 24, color = '#000' }) => (_jsxs(Svg, { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [_jsx(Path, { d: "M12 2a10 10 0 0110 10h-4a6 6 0 00-6-6V2z", stroke: color, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }), _jsx(Circle, { cx: "12", cy: "12", r: "10", stroke: color, strokeWidth: 2 }), _jsx(Polyline, { points: "12 6 12 12 16 14", stroke: color, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })] }));
|
|
16
|
+
export const SettingsIcon = ({ size = 24, color = '#000' }) => (_jsxs(Svg, { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [_jsx(Circle, { cx: "12", cy: "12", r: "3", stroke: color, strokeWidth: 2 }), _jsx(Path, { d: "M12 1v6m0 6v6M5.64 5.64l4.24 4.24m4.24 4.24l4.24 4.24M1 12h6m6 0h6M5.64 18.36l4.24-4.24m4.24-4.24l4.24-4.24", stroke: color, strokeWidth: 2, strokeLinecap: "round" })] }));
|
|
17
|
+
export const XIcon = ({ size = 24, color = '#000' }) => (_jsxs(Svg, { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [_jsx(Line, { x1: "18", y1: "6", x2: "6", y2: "18", stroke: color, strokeWidth: 2, strokeLinecap: "round" }), _jsx(Line, { x1: "6", y1: "6", x2: "18", y2: "18", stroke: color, strokeWidth: 2, strokeLinecap: "round" })] }));
|
|
18
|
+
export const ChevronRightIcon = ({ size = 24, color = '#000' }) => (_jsx(Svg, { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: _jsx(Polyline, { points: "9 18 15 12 9 6", stroke: color, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
19
|
+
export const MailIcon = ({ size = 24, color = '#000' }) => (_jsxs(Svg, { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [_jsx(Path, { d: "M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z", stroke: color, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }), _jsx(Polyline, { points: "22,6 12,13 2,6", stroke: color, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })] }));
|