@velion-la/onboarding-sdk-react-native 1.0.0-beta.10
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/CHANGELOG.md +66 -0
- package/LICENSE +12 -0
- package/README.md +888 -0
- package/app.plugin.js +101 -0
- package/lib/commonjs/camera/AddressSearchBar.js +304 -0
- package/lib/commonjs/camera/AddressSearchBar.js.map +1 -0
- package/lib/commonjs/camera/DocumentCapture.js +513 -0
- package/lib/commonjs/camera/DocumentCapture.js.map +1 -0
- package/lib/commonjs/camera/LivenessCamera.js +628 -0
- package/lib/commonjs/camera/LivenessCamera.js.map +1 -0
- package/lib/commonjs/camera/MapAddressPicker.js +331 -0
- package/lib/commonjs/camera/MapAddressPicker.js.map +1 -0
- package/lib/commonjs/core/VelionOnboarding.js +1113 -0
- package/lib/commonjs/core/VelionOnboarding.js.map +1 -0
- package/lib/commonjs/core/retryStepCopy.js +43 -0
- package/lib/commonjs/core/retryStepCopy.js.map +1 -0
- package/lib/commonjs/core/routingCommands.js +62 -0
- package/lib/commonjs/core/routingCommands.js.map +1 -0
- package/lib/commonjs/core/sessionDeclinedCopy.js +56 -0
- package/lib/commonjs/core/sessionDeclinedCopy.js.map +1 -0
- package/lib/commonjs/core/sessionStateMapper.js +200 -0
- package/lib/commonjs/core/sessionStateMapper.js.map +1 -0
- package/lib/commonjs/core/sseReasonMessages.js +450 -0
- package/lib/commonjs/core/sseReasonMessages.js.map +1 -0
- package/lib/commonjs/data/iso3166Alpha2Codes.json +1 -0
- package/lib/commonjs/data/iso3166CountryNames.json +251 -0
- package/lib/commonjs/i18n/index.js +30 -0
- package/lib/commonjs/i18n/index.js.map +1 -0
- package/lib/commonjs/i18n/strings/en.js +301 -0
- package/lib/commonjs/i18n/strings/en.js.map +1 -0
- package/lib/commonjs/i18n/strings/es.js +306 -0
- package/lib/commonjs/i18n/strings/es.js.map +1 -0
- package/lib/commonjs/index.js +225 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/steps/AddressInfoStep.js +662 -0
- package/lib/commonjs/steps/AddressInfoStep.js.map +1 -0
- package/lib/commonjs/steps/DocumentsOcrStep.js +405 -0
- package/lib/commonjs/steps/DocumentsOcrStep.js.map +1 -0
- package/lib/commonjs/steps/EconomicActivityStep.js +214 -0
- package/lib/commonjs/steps/EconomicActivityStep.js.map +1 -0
- package/lib/commonjs/steps/EmailContactStep.js +150 -0
- package/lib/commonjs/steps/EmailContactStep.js.map +1 -0
- package/lib/commonjs/steps/EmailOtpStep.js +225 -0
- package/lib/commonjs/steps/EmailOtpStep.js.map +1 -0
- package/lib/commonjs/steps/FaceMatchStep.js +169 -0
- package/lib/commonjs/steps/FaceMatchStep.js.map +1 -0
- package/lib/commonjs/steps/FingerprintStep.js +92 -0
- package/lib/commonjs/steps/FingerprintStep.js.map +1 -0
- package/lib/commonjs/steps/HumanBasicInfoStep.js +251 -0
- package/lib/commonjs/steps/HumanBasicInfoStep.js.map +1 -0
- package/lib/commonjs/steps/HumanExtendedInfoStep.js +275 -0
- package/lib/commonjs/steps/HumanExtendedInfoStep.js.map +1 -0
- package/lib/commonjs/steps/LegalBasicInfoStep.js +195 -0
- package/lib/commonjs/steps/LegalBasicInfoStep.js.map +1 -0
- package/lib/commonjs/steps/LegalExtendedInfoStep.js +173 -0
- package/lib/commonjs/steps/LegalExtendedInfoStep.js.map +1 -0
- package/lib/commonjs/steps/LivenessMatchStep.js +1184 -0
- package/lib/commonjs/steps/LivenessMatchStep.js.map +1 -0
- package/lib/commonjs/steps/PhoneContactStep.js +151 -0
- package/lib/commonjs/steps/PhoneContactStep.js.map +1 -0
- package/lib/commonjs/steps/PhoneOtpStep.js +224 -0
- package/lib/commonjs/steps/PhoneOtpStep.js.map +1 -0
- package/lib/commonjs/steps/SwornDeclarationStep.js +206 -0
- package/lib/commonjs/steps/SwornDeclarationStep.js.map +1 -0
- package/lib/commonjs/steps/TaxInfoStep.js +251 -0
- package/lib/commonjs/steps/TaxInfoStep.js.map +1 -0
- package/lib/commonjs/steps/TermsAndConditionsStep.js +245 -0
- package/lib/commonjs/steps/TermsAndConditionsStep.js.map +1 -0
- package/lib/commonjs/steps/_shared.js +61 -0
- package/lib/commonjs/steps/_shared.js.map +1 -0
- package/lib/commonjs/steps/types.js +6 -0
- package/lib/commonjs/steps/types.js.map +1 -0
- package/lib/commonjs/transport/api.js +176 -0
- package/lib/commonjs/transport/api.js.map +1 -0
- package/lib/commonjs/transport/irisWebSocket.js +121 -0
- package/lib/commonjs/transport/irisWebSocket.js.map +1 -0
- package/lib/commonjs/transport/secureUrl.js +50 -0
- package/lib/commonjs/transport/secureUrl.js.map +1 -0
- package/lib/commonjs/transport/sse.js +248 -0
- package/lib/commonjs/transport/sse.js.map +1 -0
- package/lib/commonjs/types/index.js +458 -0
- package/lib/commonjs/types/index.js.map +1 -0
- package/lib/commonjs/ui/MapFallbackBoundary.js +42 -0
- package/lib/commonjs/ui/MapFallbackBoundary.js.map +1 -0
- package/lib/commonjs/ui/StepShell.js +251 -0
- package/lib/commonjs/ui/StepShell.js.map +1 -0
- package/lib/commonjs/ui/VelionOnboardingScreen.js +276 -0
- package/lib/commonjs/ui/VelionOnboardingScreen.js.map +1 -0
- package/lib/commonjs/ui/forms/index.js +38 -0
- package/lib/commonjs/ui/forms/index.js.map +1 -0
- package/lib/commonjs/ui/forms/useInlineValidation.js +88 -0
- package/lib/commonjs/ui/forms/useInlineValidation.js.map +1 -0
- package/lib/commonjs/ui/forms/validators.js +34 -0
- package/lib/commonjs/ui/forms/validators.js.map +1 -0
- package/lib/commonjs/ui/icons/HomeHeartIcon.js +38 -0
- package/lib/commonjs/ui/icons/HomeHeartIcon.js.map +1 -0
- package/lib/commonjs/ui/icons/StepIcon.js +59 -0
- package/lib/commonjs/ui/icons/StepIcon.js.map +1 -0
- package/lib/commonjs/ui/overlays/AnalyzingOverlay.js +284 -0
- package/lib/commonjs/ui/overlays/AnalyzingOverlay.js.map +1 -0
- package/lib/commonjs/ui/overlays/LoadingOverlay.js +108 -0
- package/lib/commonjs/ui/overlays/LoadingOverlay.js.map +1 -0
- package/lib/commonjs/ui/overlays/ProgressBar.js +101 -0
- package/lib/commonjs/ui/overlays/ProgressBar.js.map +1 -0
- package/lib/commonjs/ui/overlays/RetryDialog.js +125 -0
- package/lib/commonjs/ui/overlays/RetryDialog.js.map +1 -0
- package/lib/commonjs/ui/overlays/index.js +33 -0
- package/lib/commonjs/ui/overlays/index.js.map +1 -0
- package/lib/commonjs/ui/primitives/BackButton.js +75 -0
- package/lib/commonjs/ui/primitives/BackButton.js.map +1 -0
- package/lib/commonjs/ui/primitives/Banner.js +81 -0
- package/lib/commonjs/ui/primitives/Banner.js.map +1 -0
- package/lib/commonjs/ui/primitives/Button.js +142 -0
- package/lib/commonjs/ui/primitives/Button.js.map +1 -0
- package/lib/commonjs/ui/primitives/Card.js +50 -0
- package/lib/commonjs/ui/primitives/Card.js.map +1 -0
- package/lib/commonjs/ui/primitives/Checkbox.js +139 -0
- package/lib/commonjs/ui/primitives/Checkbox.js.map +1 -0
- package/lib/commonjs/ui/primitives/CountrySelect.js +288 -0
- package/lib/commonjs/ui/primitives/CountrySelect.js.map +1 -0
- package/lib/commonjs/ui/primitives/DatePicker.js +245 -0
- package/lib/commonjs/ui/primitives/DatePicker.js.map +1 -0
- package/lib/commonjs/ui/primitives/Input.js +101 -0
- package/lib/commonjs/ui/primitives/Input.js.map +1 -0
- package/lib/commonjs/ui/primitives/SearchableSingleSelectList.js +162 -0
- package/lib/commonjs/ui/primitives/SearchableSingleSelectList.js.map +1 -0
- package/lib/commonjs/ui/primitives/Select.js +209 -0
- package/lib/commonjs/ui/primitives/Select.js.map +1 -0
- package/lib/commonjs/ui/primitives/Spinner.js +25 -0
- package/lib/commonjs/ui/primitives/Spinner.js.map +1 -0
- package/lib/commonjs/ui/primitives/index.js +89 -0
- package/lib/commonjs/ui/primitives/index.js.map +1 -0
- package/lib/commonjs/ui/primitives/searchableSingleSelectFilter.js +31 -0
- package/lib/commonjs/ui/primitives/searchableSingleSelectFilter.js.map +1 -0
- package/lib/commonjs/ui/theme/ThemeProvider.js +74 -0
- package/lib/commonjs/ui/theme/ThemeProvider.js.map +1 -0
- package/lib/commonjs/ui/theme/index.js +68 -0
- package/lib/commonjs/ui/theme/index.js.map +1 -0
- package/lib/commonjs/ui/theme/tokens.js +154 -0
- package/lib/commonjs/ui/theme/tokens.js.map +1 -0
- package/lib/commonjs/utils/EventEmitter.js +144 -0
- package/lib/commonjs/utils/EventEmitter.js.map +1 -0
- package/lib/commonjs/utils/base64.js +53 -0
- package/lib/commonjs/utils/base64.js.map +1 -0
- package/lib/commonjs/utils/deviceFingerprint.js +132 -0
- package/lib/commonjs/utils/deviceFingerprint.js.map +1 -0
- package/lib/commonjs/utils/documentTypeOptions.js +35 -0
- package/lib/commonjs/utils/documentTypeOptions.js.map +1 -0
- package/lib/commonjs/utils/googleMapsPreflight.js +88 -0
- package/lib/commonjs/utils/googleMapsPreflight.js.map +1 -0
- package/lib/commonjs/utils/hmac.js +58 -0
- package/lib/commonjs/utils/hmac.js.map +1 -0
- package/lib/commonjs/utils/iso3166Countries.js +98 -0
- package/lib/commonjs/utils/iso3166Countries.js.map +1 -0
- package/lib/commonjs/utils/jpegFromUri.js +44 -0
- package/lib/commonjs/utils/jpegFromUri.js.map +1 -0
- package/lib/commonjs/utils/keepAwake.js +58 -0
- package/lib/commonjs/utils/keepAwake.js.map +1 -0
- package/lib/commonjs/utils/log.js +42 -0
- package/lib/commonjs/utils/log.js.map +1 -0
- package/lib/commonjs/utils/osGeocoder.js +70 -0
- package/lib/commonjs/utils/osGeocoder.js.map +1 -0
- package/lib/commonjs/utils/parseGoogleAddressComponents.js +74 -0
- package/lib/commonjs/utils/parseGoogleAddressComponents.js.map +1 -0
- package/lib/commonjs/utils/personNameNormalize.js +24 -0
- package/lib/commonjs/utils/personNameNormalize.js.map +1 -0
- package/lib/commonjs/utils/sdkError.js +34 -0
- package/lib/commonjs/utils/sdkError.js.map +1 -0
- package/lib/commonjs/utils/sdkVersion.js +13 -0
- package/lib/commonjs/utils/sdkVersion.js.map +1 -0
- package/lib/commonjs/utils/stepConfig.js +65 -0
- package/lib/commonjs/utils/stepConfig.js.map +1 -0
- package/lib/commonjs/utils/taxInfoConfig.js +19 -0
- package/lib/commonjs/utils/taxInfoConfig.js.map +1 -0
- package/lib/commonjs/utils/useSafeAreaInsets.js +41 -0
- package/lib/commonjs/utils/useSafeAreaInsets.js.map +1 -0
- package/lib/commonjs/utils/velionExtra.js +48 -0
- package/lib/commonjs/utils/velionExtra.js.map +1 -0
- package/lib/module/camera/AddressSearchBar.js +299 -0
- package/lib/module/camera/AddressSearchBar.js.map +1 -0
- package/lib/module/camera/DocumentCapture.js +508 -0
- package/lib/module/camera/DocumentCapture.js.map +1 -0
- package/lib/module/camera/LivenessCamera.js +623 -0
- package/lib/module/camera/LivenessCamera.js.map +1 -0
- package/lib/module/camera/MapAddressPicker.js +326 -0
- package/lib/module/camera/MapAddressPicker.js.map +1 -0
- package/lib/module/core/VelionOnboarding.js +1109 -0
- package/lib/module/core/VelionOnboarding.js.map +1 -0
- package/lib/module/core/retryStepCopy.js +39 -0
- package/lib/module/core/retryStepCopy.js.map +1 -0
- package/lib/module/core/routingCommands.js +57 -0
- package/lib/module/core/routingCommands.js.map +1 -0
- package/lib/module/core/sessionDeclinedCopy.js +52 -0
- package/lib/module/core/sessionDeclinedCopy.js.map +1 -0
- package/lib/module/core/sessionStateMapper.js +189 -0
- package/lib/module/core/sessionStateMapper.js.map +1 -0
- package/lib/module/core/sseReasonMessages.js +446 -0
- package/lib/module/core/sseReasonMessages.js.map +1 -0
- package/lib/module/data/iso3166Alpha2Codes.json +1 -0
- package/lib/module/data/iso3166CountryNames.json +251 -0
- package/lib/module/i18n/index.js +25 -0
- package/lib/module/i18n/index.js.map +1 -0
- package/lib/module/i18n/strings/en.js +297 -0
- package/lib/module/i18n/strings/en.js.map +1 -0
- package/lib/module/i18n/strings/es.js +302 -0
- package/lib/module/i18n/strings/es.js.map +1 -0
- package/lib/module/index.js +36 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/steps/AddressInfoStep.js +658 -0
- package/lib/module/steps/AddressInfoStep.js.map +1 -0
- package/lib/module/steps/DocumentsOcrStep.js +399 -0
- package/lib/module/steps/DocumentsOcrStep.js.map +1 -0
- package/lib/module/steps/EconomicActivityStep.js +209 -0
- package/lib/module/steps/EconomicActivityStep.js.map +1 -0
- package/lib/module/steps/EmailContactStep.js +145 -0
- package/lib/module/steps/EmailContactStep.js.map +1 -0
- package/lib/module/steps/EmailOtpStep.js +220 -0
- package/lib/module/steps/EmailOtpStep.js.map +1 -0
- package/lib/module/steps/FaceMatchStep.js +164 -0
- package/lib/module/steps/FaceMatchStep.js.map +1 -0
- package/lib/module/steps/FingerprintStep.js +87 -0
- package/lib/module/steps/FingerprintStep.js.map +1 -0
- package/lib/module/steps/HumanBasicInfoStep.js +246 -0
- package/lib/module/steps/HumanBasicInfoStep.js.map +1 -0
- package/lib/module/steps/HumanExtendedInfoStep.js +270 -0
- package/lib/module/steps/HumanExtendedInfoStep.js.map +1 -0
- package/lib/module/steps/LegalBasicInfoStep.js +190 -0
- package/lib/module/steps/LegalBasicInfoStep.js.map +1 -0
- package/lib/module/steps/LegalExtendedInfoStep.js +168 -0
- package/lib/module/steps/LegalExtendedInfoStep.js.map +1 -0
- package/lib/module/steps/LivenessMatchStep.js +1177 -0
- package/lib/module/steps/LivenessMatchStep.js.map +1 -0
- package/lib/module/steps/PhoneContactStep.js +146 -0
- package/lib/module/steps/PhoneContactStep.js.map +1 -0
- package/lib/module/steps/PhoneOtpStep.js +219 -0
- package/lib/module/steps/PhoneOtpStep.js.map +1 -0
- package/lib/module/steps/SwornDeclarationStep.js +203 -0
- package/lib/module/steps/SwornDeclarationStep.js.map +1 -0
- package/lib/module/steps/TaxInfoStep.js +246 -0
- package/lib/module/steps/TaxInfoStep.js.map +1 -0
- package/lib/module/steps/TermsAndConditionsStep.js +240 -0
- package/lib/module/steps/TermsAndConditionsStep.js.map +1 -0
- package/lib/module/steps/_shared.js +52 -0
- package/lib/module/steps/_shared.js.map +1 -0
- package/lib/module/steps/types.js +4 -0
- package/lib/module/steps/types.js.map +1 -0
- package/lib/module/transport/api.js +173 -0
- package/lib/module/transport/api.js.map +1 -0
- package/lib/module/transport/irisWebSocket.js +115 -0
- package/lib/module/transport/irisWebSocket.js.map +1 -0
- package/lib/module/transport/secureUrl.js +45 -0
- package/lib/module/transport/secureUrl.js.map +1 -0
- package/lib/module/transport/sse.js +242 -0
- package/lib/module/transport/sse.js.map +1 -0
- package/lib/module/types/index.js +532 -0
- package/lib/module/types/index.js.map +1 -0
- package/lib/module/ui/MapFallbackBoundary.js +37 -0
- package/lib/module/ui/MapFallbackBoundary.js.map +1 -0
- package/lib/module/ui/StepShell.js +246 -0
- package/lib/module/ui/StepShell.js.map +1 -0
- package/lib/module/ui/VelionOnboardingScreen.js +273 -0
- package/lib/module/ui/VelionOnboardingScreen.js.map +1 -0
- package/lib/module/ui/forms/index.js +5 -0
- package/lib/module/ui/forms/index.js.map +1 -0
- package/lib/module/ui/forms/useInlineValidation.js +84 -0
- package/lib/module/ui/forms/useInlineValidation.js.map +1 -0
- package/lib/module/ui/forms/validators.js +27 -0
- package/lib/module/ui/forms/validators.js.map +1 -0
- package/lib/module/ui/icons/HomeHeartIcon.js +33 -0
- package/lib/module/ui/icons/HomeHeartIcon.js.map +1 -0
- package/lib/module/ui/icons/StepIcon.js +55 -0
- package/lib/module/ui/icons/StepIcon.js.map +1 -0
- package/lib/module/ui/overlays/AnalyzingOverlay.js +279 -0
- package/lib/module/ui/overlays/AnalyzingOverlay.js.map +1 -0
- package/lib/module/ui/overlays/LoadingOverlay.js +104 -0
- package/lib/module/ui/overlays/LoadingOverlay.js.map +1 -0
- package/lib/module/ui/overlays/ProgressBar.js +97 -0
- package/lib/module/ui/overlays/ProgressBar.js.map +1 -0
- package/lib/module/ui/overlays/RetryDialog.js +121 -0
- package/lib/module/ui/overlays/RetryDialog.js.map +1 -0
- package/lib/module/ui/overlays/index.js +6 -0
- package/lib/module/ui/overlays/index.js.map +1 -0
- package/lib/module/ui/primitives/BackButton.js +71 -0
- package/lib/module/ui/primitives/BackButton.js.map +1 -0
- package/lib/module/ui/primitives/Banner.js +77 -0
- package/lib/module/ui/primitives/Banner.js.map +1 -0
- package/lib/module/ui/primitives/Button.js +138 -0
- package/lib/module/ui/primitives/Button.js.map +1 -0
- package/lib/module/ui/primitives/Card.js +46 -0
- package/lib/module/ui/primitives/Card.js.map +1 -0
- package/lib/module/ui/primitives/Checkbox.js +136 -0
- package/lib/module/ui/primitives/Checkbox.js.map +1 -0
- package/lib/module/ui/primitives/CountrySelect.js +284 -0
- package/lib/module/ui/primitives/CountrySelect.js.map +1 -0
- package/lib/module/ui/primitives/DatePicker.js +241 -0
- package/lib/module/ui/primitives/DatePicker.js.map +1 -0
- package/lib/module/ui/primitives/Input.js +97 -0
- package/lib/module/ui/primitives/Input.js.map +1 -0
- package/lib/module/ui/primitives/SearchableSingleSelectList.js +153 -0
- package/lib/module/ui/primitives/SearchableSingleSelectList.js.map +1 -0
- package/lib/module/ui/primitives/Select.js +205 -0
- package/lib/module/ui/primitives/Select.js.map +1 -0
- package/lib/module/ui/primitives/Spinner.js +21 -0
- package/lib/module/ui/primitives/Spinner.js.map +1 -0
- package/lib/module/ui/primitives/index.js +14 -0
- package/lib/module/ui/primitives/index.js.map +1 -0
- package/lib/module/ui/primitives/searchableSingleSelectFilter.js +27 -0
- package/lib/module/ui/primitives/searchableSingleSelectFilter.js.map +1 -0
- package/lib/module/ui/theme/ThemeProvider.js +67 -0
- package/lib/module/ui/theme/ThemeProvider.js.map +1 -0
- package/lib/module/ui/theme/index.js +5 -0
- package/lib/module/ui/theme/index.js.map +1 -0
- package/lib/module/ui/theme/tokens.js +145 -0
- package/lib/module/ui/theme/tokens.js.map +1 -0
- package/lib/module/utils/EventEmitter.js +139 -0
- package/lib/module/utils/EventEmitter.js.map +1 -0
- package/lib/module/utils/base64.js +47 -0
- package/lib/module/utils/base64.js.map +1 -0
- package/lib/module/utils/deviceFingerprint.js +129 -0
- package/lib/module/utils/deviceFingerprint.js.map +1 -0
- package/lib/module/utils/documentTypeOptions.js +31 -0
- package/lib/module/utils/documentTypeOptions.js.map +1 -0
- package/lib/module/utils/googleMapsPreflight.js +84 -0
- package/lib/module/utils/googleMapsPreflight.js.map +1 -0
- package/lib/module/utils/hmac.js +53 -0
- package/lib/module/utils/hmac.js.map +1 -0
- package/lib/module/utils/iso3166Countries.js +92 -0
- package/lib/module/utils/iso3166Countries.js.map +1 -0
- package/lib/module/utils/jpegFromUri.js +40 -0
- package/lib/module/utils/jpegFromUri.js.map +1 -0
- package/lib/module/utils/keepAwake.js +53 -0
- package/lib/module/utils/keepAwake.js.map +1 -0
- package/lib/module/utils/log.js +37 -0
- package/lib/module/utils/log.js.map +1 -0
- package/lib/module/utils/osGeocoder.js +65 -0
- package/lib/module/utils/osGeocoder.js.map +1 -0
- package/lib/module/utils/parseGoogleAddressComponents.js +69 -0
- package/lib/module/utils/parseGoogleAddressComponents.js.map +1 -0
- package/lib/module/utils/personNameNormalize.js +20 -0
- package/lib/module/utils/personNameNormalize.js.map +1 -0
- package/lib/module/utils/sdkError.js +29 -0
- package/lib/module/utils/sdkError.js.map +1 -0
- package/lib/module/utils/sdkVersion.js +9 -0
- package/lib/module/utils/sdkVersion.js.map +1 -0
- package/lib/module/utils/stepConfig.js +59 -0
- package/lib/module/utils/stepConfig.js.map +1 -0
- package/lib/module/utils/taxInfoConfig.js +15 -0
- package/lib/module/utils/taxInfoConfig.js.map +1 -0
- package/lib/module/utils/useSafeAreaInsets.js +37 -0
- package/lib/module/utils/useSafeAreaInsets.js.map +1 -0
- package/lib/module/utils/velionExtra.js +44 -0
- package/lib/module/utils/velionExtra.js.map +1 -0
- package/lib/typescript/camera/AddressSearchBar.d.ts +37 -0
- package/lib/typescript/camera/AddressSearchBar.d.ts.map +1 -0
- package/lib/typescript/camera/DocumentCapture.d.ts +34 -0
- package/lib/typescript/camera/DocumentCapture.d.ts.map +1 -0
- package/lib/typescript/camera/LivenessCamera.d.ts +67 -0
- package/lib/typescript/camera/LivenessCamera.d.ts.map +1 -0
- package/lib/typescript/camera/MapAddressPicker.d.ts +57 -0
- package/lib/typescript/camera/MapAddressPicker.d.ts.map +1 -0
- package/lib/typescript/core/VelionOnboarding.d.ts +169 -0
- package/lib/typescript/core/VelionOnboarding.d.ts.map +1 -0
- package/lib/typescript/core/retryStepCopy.d.ts +27 -0
- package/lib/typescript/core/retryStepCopy.d.ts.map +1 -0
- package/lib/typescript/core/routingCommands.d.ts +39 -0
- package/lib/typescript/core/routingCommands.d.ts.map +1 -0
- package/lib/typescript/core/sessionDeclinedCopy.d.ts +16 -0
- package/lib/typescript/core/sessionDeclinedCopy.d.ts.map +1 -0
- package/lib/typescript/core/sessionStateMapper.d.ts +52 -0
- package/lib/typescript/core/sessionStateMapper.d.ts.map +1 -0
- package/lib/typescript/core/sseReasonMessages.d.ts +20 -0
- package/lib/typescript/core/sseReasonMessages.d.ts.map +1 -0
- package/lib/typescript/i18n/index.d.ts +13 -0
- package/lib/typescript/i18n/index.d.ts.map +1 -0
- package/lib/typescript/i18n/strings/en.d.ts +3 -0
- package/lib/typescript/i18n/strings/en.d.ts.map +1 -0
- package/lib/typescript/i18n/strings/es.d.ts +297 -0
- package/lib/typescript/i18n/strings/es.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +26 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/steps/AddressInfoStep.d.ts +26 -0
- package/lib/typescript/steps/AddressInfoStep.d.ts.map +1 -0
- package/lib/typescript/steps/DocumentsOcrStep.d.ts +26 -0
- package/lib/typescript/steps/DocumentsOcrStep.d.ts.map +1 -0
- package/lib/typescript/steps/EconomicActivityStep.d.ts +29 -0
- package/lib/typescript/steps/EconomicActivityStep.d.ts.map +1 -0
- package/lib/typescript/steps/EmailContactStep.d.ts +15 -0
- package/lib/typescript/steps/EmailContactStep.d.ts.map +1 -0
- package/lib/typescript/steps/EmailOtpStep.d.ts +21 -0
- package/lib/typescript/steps/EmailOtpStep.d.ts.map +1 -0
- package/lib/typescript/steps/FaceMatchStep.d.ts +27 -0
- package/lib/typescript/steps/FaceMatchStep.d.ts.map +1 -0
- package/lib/typescript/steps/FingerprintStep.d.ts +25 -0
- package/lib/typescript/steps/FingerprintStep.d.ts.map +1 -0
- package/lib/typescript/steps/HumanBasicInfoStep.d.ts +25 -0
- package/lib/typescript/steps/HumanBasicInfoStep.d.ts.map +1 -0
- package/lib/typescript/steps/HumanExtendedInfoStep.d.ts +23 -0
- package/lib/typescript/steps/HumanExtendedInfoStep.d.ts.map +1 -0
- package/lib/typescript/steps/LegalBasicInfoStep.d.ts +17 -0
- package/lib/typescript/steps/LegalBasicInfoStep.d.ts.map +1 -0
- package/lib/typescript/steps/LegalExtendedInfoStep.d.ts +17 -0
- package/lib/typescript/steps/LegalExtendedInfoStep.d.ts.map +1 -0
- package/lib/typescript/steps/LivenessMatchStep.d.ts +26 -0
- package/lib/typescript/steps/LivenessMatchStep.d.ts.map +1 -0
- package/lib/typescript/steps/PhoneContactStep.d.ts +15 -0
- package/lib/typescript/steps/PhoneContactStep.d.ts.map +1 -0
- package/lib/typescript/steps/PhoneOtpStep.d.ts +19 -0
- package/lib/typescript/steps/PhoneOtpStep.d.ts.map +1 -0
- package/lib/typescript/steps/SwornDeclarationStep.d.ts +20 -0
- package/lib/typescript/steps/SwornDeclarationStep.d.ts.map +1 -0
- package/lib/typescript/steps/TaxInfoStep.d.ts +19 -0
- package/lib/typescript/steps/TaxInfoStep.d.ts.map +1 -0
- package/lib/typescript/steps/TermsAndConditionsStep.d.ts +21 -0
- package/lib/typescript/steps/TermsAndConditionsStep.d.ts.map +1 -0
- package/lib/typescript/steps/_shared.d.ts +22 -0
- package/lib/typescript/steps/_shared.d.ts.map +1 -0
- package/lib/typescript/steps/types.d.ts +89 -0
- package/lib/typescript/steps/types.d.ts.map +1 -0
- package/lib/typescript/transport/api.d.ts +35 -0
- package/lib/typescript/transport/api.d.ts.map +1 -0
- package/lib/typescript/transport/irisWebSocket.d.ts +72 -0
- package/lib/typescript/transport/irisWebSocket.d.ts.map +1 -0
- package/lib/typescript/transport/secureUrl.d.ts +14 -0
- package/lib/typescript/transport/secureUrl.d.ts.map +1 -0
- package/lib/typescript/transport/sse.d.ts +54 -0
- package/lib/typescript/transport/sse.d.ts.map +1 -0
- package/lib/typescript/types/index.d.ts +1219 -0
- package/lib/typescript/types/index.d.ts.map +1 -0
- package/lib/typescript/ui/MapFallbackBoundary.d.ts +28 -0
- package/lib/typescript/ui/MapFallbackBoundary.d.ts.map +1 -0
- package/lib/typescript/ui/StepShell.d.ts +29 -0
- package/lib/typescript/ui/StepShell.d.ts.map +1 -0
- package/lib/typescript/ui/VelionOnboardingScreen.d.ts +26 -0
- package/lib/typescript/ui/VelionOnboardingScreen.d.ts.map +1 -0
- package/lib/typescript/ui/forms/index.d.ts +3 -0
- package/lib/typescript/ui/forms/index.d.ts.map +1 -0
- package/lib/typescript/ui/forms/useInlineValidation.d.ts +30 -0
- package/lib/typescript/ui/forms/useInlineValidation.d.ts.map +1 -0
- package/lib/typescript/ui/forms/validators.d.ts +11 -0
- package/lib/typescript/ui/forms/validators.d.ts.map +1 -0
- package/lib/typescript/ui/icons/HomeHeartIcon.d.ts +14 -0
- package/lib/typescript/ui/icons/HomeHeartIcon.d.ts.map +1 -0
- package/lib/typescript/ui/icons/StepIcon.d.ts +26 -0
- package/lib/typescript/ui/icons/StepIcon.d.ts.map +1 -0
- package/lib/typescript/ui/overlays/AnalyzingOverlay.d.ts +24 -0
- package/lib/typescript/ui/overlays/AnalyzingOverlay.d.ts.map +1 -0
- package/lib/typescript/ui/overlays/LoadingOverlay.d.ts +19 -0
- package/lib/typescript/ui/overlays/LoadingOverlay.d.ts.map +1 -0
- package/lib/typescript/ui/overlays/ProgressBar.d.ts +32 -0
- package/lib/typescript/ui/overlays/ProgressBar.d.ts.map +1 -0
- package/lib/typescript/ui/overlays/RetryDialog.d.ts +17 -0
- package/lib/typescript/ui/overlays/RetryDialog.d.ts.map +1 -0
- package/lib/typescript/ui/overlays/index.d.ts +4 -0
- package/lib/typescript/ui/overlays/index.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/BackButton.d.ts +20 -0
- package/lib/typescript/ui/primitives/BackButton.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/Banner.d.ts +11 -0
- package/lib/typescript/ui/primitives/Banner.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/Button.d.ts +27 -0
- package/lib/typescript/ui/primitives/Button.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/Card.d.ts +10 -0
- package/lib/typescript/ui/primitives/Card.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/Checkbox.d.ts +25 -0
- package/lib/typescript/ui/primitives/Checkbox.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/CountrySelect.d.ts +31 -0
- package/lib/typescript/ui/primitives/CountrySelect.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/DatePicker.d.ts +42 -0
- package/lib/typescript/ui/primitives/DatePicker.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/Input.d.ts +17 -0
- package/lib/typescript/ui/primitives/Input.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/SearchableSingleSelectList.d.ts +33 -0
- package/lib/typescript/ui/primitives/SearchableSingleSelectList.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/Select.d.ts +26 -0
- package/lib/typescript/ui/primitives/Select.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/Spinner.d.ts +10 -0
- package/lib/typescript/ui/primitives/Spinner.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/index.d.ts +12 -0
- package/lib/typescript/ui/primitives/index.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/searchableSingleSelectFilter.d.ts +25 -0
- package/lib/typescript/ui/primitives/searchableSingleSelectFilter.d.ts.map +1 -0
- package/lib/typescript/ui/theme/ThemeProvider.d.ts +23 -0
- package/lib/typescript/ui/theme/ThemeProvider.d.ts.map +1 -0
- package/lib/typescript/ui/theme/index.d.ts +3 -0
- package/lib/typescript/ui/theme/index.d.ts.map +1 -0
- package/lib/typescript/ui/theme/tokens.d.ts +42 -0
- package/lib/typescript/ui/theme/tokens.d.ts.map +1 -0
- package/lib/typescript/utils/EventEmitter.d.ts +98 -0
- package/lib/typescript/utils/EventEmitter.d.ts.map +1 -0
- package/lib/typescript/utils/base64.d.ts +19 -0
- package/lib/typescript/utils/base64.d.ts.map +1 -0
- package/lib/typescript/utils/deviceFingerprint.d.ts +42 -0
- package/lib/typescript/utils/deviceFingerprint.d.ts.map +1 -0
- package/lib/typescript/utils/documentTypeOptions.d.ts +13 -0
- package/lib/typescript/utils/documentTypeOptions.d.ts.map +1 -0
- package/lib/typescript/utils/googleMapsPreflight.d.ts +52 -0
- package/lib/typescript/utils/googleMapsPreflight.d.ts.map +1 -0
- package/lib/typescript/utils/hmac.d.ts +39 -0
- package/lib/typescript/utils/hmac.d.ts.map +1 -0
- package/lib/typescript/utils/iso3166Countries.d.ts +27 -0
- package/lib/typescript/utils/iso3166Countries.d.ts.map +1 -0
- package/lib/typescript/utils/jpegFromUri.d.ts +29 -0
- package/lib/typescript/utils/jpegFromUri.d.ts.map +1 -0
- package/lib/typescript/utils/keepAwake.d.ts +16 -0
- package/lib/typescript/utils/keepAwake.d.ts.map +1 -0
- package/lib/typescript/utils/log.d.ts +18 -0
- package/lib/typescript/utils/log.d.ts.map +1 -0
- package/lib/typescript/utils/osGeocoder.d.ts +38 -0
- package/lib/typescript/utils/osGeocoder.d.ts.map +1 -0
- package/lib/typescript/utils/parseGoogleAddressComponents.d.ts +43 -0
- package/lib/typescript/utils/parseGoogleAddressComponents.d.ts.map +1 -0
- package/lib/typescript/utils/personNameNormalize.d.ts +10 -0
- package/lib/typescript/utils/personNameNormalize.d.ts.map +1 -0
- package/lib/typescript/utils/sdkError.d.ts +14 -0
- package/lib/typescript/utils/sdkError.d.ts.map +1 -0
- package/lib/typescript/utils/sdkVersion.d.ts +7 -0
- package/lib/typescript/utils/sdkVersion.d.ts.map +1 -0
- package/lib/typescript/utils/stepConfig.d.ts +8 -0
- package/lib/typescript/utils/stepConfig.d.ts.map +1 -0
- package/lib/typescript/utils/taxInfoConfig.d.ts +7 -0
- package/lib/typescript/utils/taxInfoConfig.d.ts.map +1 -0
- package/lib/typescript/utils/useSafeAreaInsets.d.ts +26 -0
- package/lib/typescript/utils/useSafeAreaInsets.d.ts.map +1 -0
- package/lib/typescript/utils/velionExtra.d.ts +24 -0
- package/lib/typescript/utils/velionExtra.d.ts.map +1 -0
- package/package.json +107 -0
- package/src/camera/AddressSearchBar.tsx +363 -0
- package/src/camera/DocumentCapture.tsx +514 -0
- package/src/camera/LivenessCamera.tsx +706 -0
- package/src/camera/MapAddressPicker.tsx +391 -0
- package/src/core/VelionOnboarding.ts +1291 -0
- package/src/core/retryStepCopy.ts +54 -0
- package/src/core/routingCommands.ts +63 -0
- package/src/core/sessionDeclinedCopy.ts +76 -0
- package/src/core/sessionStateMapper.ts +232 -0
- package/src/core/sseReasonMessages.ts +531 -0
- package/src/data/iso3166Alpha2Codes.json +1 -0
- package/src/data/iso3166CountryNames.json +251 -0
- package/src/i18n/index.ts +26 -0
- package/src/i18n/strings/en.ts +335 -0
- package/src/i18n/strings/es.ts +337 -0
- package/src/index.ts +146 -0
- package/src/steps/AddressInfoStep.tsx +744 -0
- package/src/steps/DocumentsOcrStep.tsx +481 -0
- package/src/steps/EconomicActivityStep.tsx +230 -0
- package/src/steps/EmailContactStep.tsx +165 -0
- package/src/steps/EmailOtpStep.tsx +256 -0
- package/src/steps/FaceMatchStep.tsx +176 -0
- package/src/steps/FingerprintStep.tsx +99 -0
- package/src/steps/HumanBasicInfoStep.tsx +286 -0
- package/src/steps/HumanExtendedInfoStep.tsx +362 -0
- package/src/steps/LegalBasicInfoStep.tsx +214 -0
- package/src/steps/LegalExtendedInfoStep.tsx +184 -0
- package/src/steps/LivenessMatchStep.tsx +1351 -0
- package/src/steps/PhoneContactStep.tsx +166 -0
- package/src/steps/PhoneOtpStep.tsx +255 -0
- package/src/steps/SwornDeclarationStep.tsx +237 -0
- package/src/steps/TaxInfoStep.tsx +288 -0
- package/src/steps/TermsAndConditionsStep.tsx +269 -0
- package/src/steps/_shared.ts +69 -0
- package/src/steps/types.ts +93 -0
- package/src/transport/api.ts +257 -0
- package/src/transport/irisWebSocket.ts +186 -0
- package/src/transport/secureUrl.ts +47 -0
- package/src/transport/sse.ts +310 -0
- package/src/types/index.ts +1421 -0
- package/src/ui/MapFallbackBoundary.tsx +46 -0
- package/src/ui/StepShell.tsx +273 -0
- package/src/ui/VelionOnboardingScreen.tsx +297 -0
- package/src/ui/forms/index.ts +12 -0
- package/src/ui/forms/useInlineValidation.ts +115 -0
- package/src/ui/forms/validators.ts +29 -0
- package/src/ui/icons/HomeHeartIcon.tsx +34 -0
- package/src/ui/icons/StepIcon.tsx +78 -0
- package/src/ui/overlays/AnalyzingOverlay.tsx +323 -0
- package/src/ui/overlays/LoadingOverlay.tsx +115 -0
- package/src/ui/overlays/ProgressBar.tsx +106 -0
- package/src/ui/overlays/RetryDialog.tsx +128 -0
- package/src/ui/overlays/index.ts +3 -0
- package/src/ui/primitives/BackButton.tsx +65 -0
- package/src/ui/primitives/Banner.tsx +81 -0
- package/src/ui/primitives/Button.tsx +164 -0
- package/src/ui/primitives/Card.tsx +55 -0
- package/src/ui/primitives/Checkbox.tsx +153 -0
- package/src/ui/primitives/CountrySelect.tsx +356 -0
- package/src/ui/primitives/DatePicker.tsx +266 -0
- package/src/ui/primitives/Input.tsx +110 -0
- package/src/ui/primitives/SearchableSingleSelectList.tsx +195 -0
- package/src/ui/primitives/Select.tsx +259 -0
- package/src/ui/primitives/Spinner.tsx +17 -0
- package/src/ui/primitives/index.ts +16 -0
- package/src/ui/primitives/searchableSingleSelectFilter.ts +38 -0
- package/src/ui/theme/ThemeProvider.tsx +102 -0
- package/src/ui/theme/index.ts +17 -0
- package/src/ui/theme/tokens.ts +159 -0
- package/src/utils/EventEmitter.ts +155 -0
- package/src/utils/base64.ts +44 -0
- package/src/utils/deviceFingerprint.ts +184 -0
- package/src/utils/documentTypeOptions.ts +31 -0
- package/src/utils/googleMapsPreflight.ts +89 -0
- package/src/utils/hmac.ts +61 -0
- package/src/utils/iso3166Countries.ts +111 -0
- package/src/utils/jpegFromUri.ts +42 -0
- package/src/utils/keepAwake.ts +62 -0
- package/src/utils/log.ts +37 -0
- package/src/utils/osGeocoder.ts +75 -0
- package/src/utils/parseGoogleAddressComponents.ts +123 -0
- package/src/utils/personNameNormalize.ts +17 -0
- package/src/utils/sdkError.ts +40 -0
- package/src/utils/sdkVersion.ts +6 -0
- package/src/utils/stepConfig.ts +75 -0
- package/src/utils/taxInfoConfig.ts +14 -0
- package/src/utils/useSafeAreaInsets.ts +37 -0
- package/src/utils/velionExtra.ts +46 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Top-of-screen progress bar. Trickling model:
|
|
3
|
+
* - `tick()` advances 12% per step, soft-cap at 90%.
|
|
4
|
+
* - `complete()` jumps to 100% and fades out.
|
|
5
|
+
*
|
|
6
|
+
* Animated with `Animated.timing` (driver: native) so we don't pull in
|
|
7
|
+
* Reanimated yet; respects `useReducedMotion()`.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { useEffect, useRef } from 'react';
|
|
11
|
+
import { Animated, StyleSheet } from 'react-native';
|
|
12
|
+
import { mixHex, useReducedMotion, useTheme } from '../theme';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Height of the progress track, in px. Exported so layout-aware chrome (e.g.
|
|
16
|
+
* `StepShell`'s fixed back-button strip) can sit flush below the bar without
|
|
17
|
+
* duplicating the magic number.
|
|
18
|
+
*/
|
|
19
|
+
export const PROGRESS_BAR_HEIGHT = 4;
|
|
20
|
+
|
|
21
|
+
export interface ProgressBarProps {
|
|
22
|
+
/** 0–100. Components compute the trickling logic externally and pass it in. */
|
|
23
|
+
value: number;
|
|
24
|
+
/** When true, the bar fades out (used after `complete()`). */
|
|
25
|
+
hidden?: boolean;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function ProgressBar({ value, hidden = false }: ProgressBarProps) {
|
|
29
|
+
const theme = useTheme();
|
|
30
|
+
const reduceMotion = useReducedMotion();
|
|
31
|
+
const widthAnim = useRef(new Animated.Value(value)).current;
|
|
32
|
+
const opacityAnim = useRef(new Animated.Value(hidden ? 0 : 1)).current;
|
|
33
|
+
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
Animated.timing(widthAnim, {
|
|
36
|
+
toValue: value,
|
|
37
|
+
duration: reduceMotion ? 0 : 360,
|
|
38
|
+
useNativeDriver: false,
|
|
39
|
+
}).start();
|
|
40
|
+
}, [value, reduceMotion, widthAnim]);
|
|
41
|
+
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
Animated.timing(opacityAnim, {
|
|
44
|
+
toValue: hidden ? 0 : 1,
|
|
45
|
+
duration: reduceMotion ? 0 : 240,
|
|
46
|
+
useNativeDriver: true,
|
|
47
|
+
}).start();
|
|
48
|
+
}, [hidden, reduceMotion, opacityAnim]);
|
|
49
|
+
|
|
50
|
+
const trackColor = mixHex(theme.borderColor, theme.backgroundColor, 50);
|
|
51
|
+
|
|
52
|
+
return (
|
|
53
|
+
<Animated.View
|
|
54
|
+
accessibilityRole="progressbar"
|
|
55
|
+
accessibilityValue={{ now: Math.round(value), min: 0, max: 100 }}
|
|
56
|
+
style={[
|
|
57
|
+
styles.track,
|
|
58
|
+
{ backgroundColor: trackColor, opacity: opacityAnim },
|
|
59
|
+
]}
|
|
60
|
+
>
|
|
61
|
+
<Animated.View
|
|
62
|
+
style={[
|
|
63
|
+
styles.bar,
|
|
64
|
+
{
|
|
65
|
+
backgroundColor: theme.primaryColor,
|
|
66
|
+
width: widthAnim.interpolate({
|
|
67
|
+
inputRange: [0, 100],
|
|
68
|
+
outputRange: ['0%', '100%'],
|
|
69
|
+
}),
|
|
70
|
+
},
|
|
71
|
+
]}
|
|
72
|
+
/>
|
|
73
|
+
</Animated.View>
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const STEP_INCREMENT_PCT = 12;
|
|
78
|
+
const SOFT_CAP_PCT = 90;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Helper that encapsulates the trickling logic. Exposed so step modules /
|
|
82
|
+
* the orchestrator hold the value in plain state and pass it down to
|
|
83
|
+
* `<ProgressBar value={...} />`.
|
|
84
|
+
*/
|
|
85
|
+
export const PROGRESS_BAR = {
|
|
86
|
+
tick(current: number): number {
|
|
87
|
+
return Math.min(SOFT_CAP_PCT, current + STEP_INCREMENT_PCT);
|
|
88
|
+
},
|
|
89
|
+
complete(): number {
|
|
90
|
+
return 100;
|
|
91
|
+
},
|
|
92
|
+
reset(): number {
|
|
93
|
+
return 0;
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
const styles = StyleSheet.create({
|
|
98
|
+
track: {
|
|
99
|
+
height: PROGRESS_BAR_HEIGHT,
|
|
100
|
+
width: '100%',
|
|
101
|
+
overflow: 'hidden',
|
|
102
|
+
},
|
|
103
|
+
bar: {
|
|
104
|
+
height: '100%',
|
|
105
|
+
},
|
|
106
|
+
});
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* In-flow recoverable error dialog. Solid backdrop (no transparency), warning
|
|
3
|
+
* accent, "Try again / Cancel" buttons, primary focus on retry.
|
|
4
|
+
*
|
|
5
|
+
* Used by every step module's POST catch handler — gives the user a chance to
|
|
6
|
+
* recover without losing their inputs.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
10
|
+
import { Button } from '../primitives/Button';
|
|
11
|
+
import { mixHex, useTheme, withAlpha } from '../theme';
|
|
12
|
+
|
|
13
|
+
export interface RetryDialogProps {
|
|
14
|
+
title: string;
|
|
15
|
+
message: string;
|
|
16
|
+
retryLabel: string;
|
|
17
|
+
cancelLabel: string;
|
|
18
|
+
onRetry: () => void;
|
|
19
|
+
onCancel: () => void;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function RetryDialog({
|
|
23
|
+
title,
|
|
24
|
+
message,
|
|
25
|
+
retryLabel,
|
|
26
|
+
cancelLabel,
|
|
27
|
+
onRetry,
|
|
28
|
+
onCancel,
|
|
29
|
+
}: RetryDialogProps) {
|
|
30
|
+
const theme = useTheme();
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<View
|
|
34
|
+
accessibilityViewIsModal
|
|
35
|
+
accessibilityRole="alert"
|
|
36
|
+
accessibilityLiveRegion="assertive"
|
|
37
|
+
style={[
|
|
38
|
+
styles.root,
|
|
39
|
+
{ backgroundColor: theme.backgroundColor },
|
|
40
|
+
]}
|
|
41
|
+
>
|
|
42
|
+
<View style={styles.card}>
|
|
43
|
+
<View
|
|
44
|
+
style={[
|
|
45
|
+
styles.iconWrap,
|
|
46
|
+
{
|
|
47
|
+
backgroundColor: mixHex(theme.warningColor, theme.backgroundColor, 16),
|
|
48
|
+
borderColor: withAlpha(theme.warningColor, 0.35),
|
|
49
|
+
},
|
|
50
|
+
]}
|
|
51
|
+
>
|
|
52
|
+
<Text style={[styles.iconText, { color: theme.warningColor }]}>!</Text>
|
|
53
|
+
</View>
|
|
54
|
+
<Text style={[styles.title, { color: theme.textColor }]}>{title}</Text>
|
|
55
|
+
<Text
|
|
56
|
+
style={[styles.body, { color: theme.textSecondaryColor }]}
|
|
57
|
+
numberOfLines={6}
|
|
58
|
+
>
|
|
59
|
+
{message}
|
|
60
|
+
</Text>
|
|
61
|
+
<View style={styles.actions}>
|
|
62
|
+
<Button
|
|
63
|
+
variant="ghost"
|
|
64
|
+
label={cancelLabel}
|
|
65
|
+
onPress={onCancel}
|
|
66
|
+
fullWidth={false}
|
|
67
|
+
style={styles.btn}
|
|
68
|
+
/>
|
|
69
|
+
<Button
|
|
70
|
+
variant="primary"
|
|
71
|
+
label={retryLabel}
|
|
72
|
+
onPress={onRetry}
|
|
73
|
+
fullWidth={false}
|
|
74
|
+
style={styles.btn}
|
|
75
|
+
/>
|
|
76
|
+
</View>
|
|
77
|
+
</View>
|
|
78
|
+
</View>
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const styles = StyleSheet.create({
|
|
83
|
+
root: {
|
|
84
|
+
...StyleSheet.absoluteFillObject,
|
|
85
|
+
alignItems: 'center',
|
|
86
|
+
justifyContent: 'center',
|
|
87
|
+
padding: 24,
|
|
88
|
+
zIndex: 1100,
|
|
89
|
+
},
|
|
90
|
+
card: {
|
|
91
|
+
width: '100%',
|
|
92
|
+
maxWidth: 420,
|
|
93
|
+
alignItems: 'center',
|
|
94
|
+
gap: 14,
|
|
95
|
+
},
|
|
96
|
+
iconWrap: {
|
|
97
|
+
width: 64,
|
|
98
|
+
height: 64,
|
|
99
|
+
borderRadius: 32,
|
|
100
|
+
alignItems: 'center',
|
|
101
|
+
justifyContent: 'center',
|
|
102
|
+
borderWidth: 1,
|
|
103
|
+
},
|
|
104
|
+
iconText: {
|
|
105
|
+
fontSize: 28,
|
|
106
|
+
fontWeight: '800',
|
|
107
|
+
lineHeight: 32,
|
|
108
|
+
},
|
|
109
|
+
title: {
|
|
110
|
+
fontSize: 17,
|
|
111
|
+
fontWeight: '700',
|
|
112
|
+
textAlign: 'center',
|
|
113
|
+
},
|
|
114
|
+
body: {
|
|
115
|
+
fontSize: 14,
|
|
116
|
+
lineHeight: 20,
|
|
117
|
+
textAlign: 'center',
|
|
118
|
+
},
|
|
119
|
+
actions: {
|
|
120
|
+
flexDirection: 'row',
|
|
121
|
+
gap: 10,
|
|
122
|
+
marginTop: 6,
|
|
123
|
+
alignSelf: 'stretch',
|
|
124
|
+
},
|
|
125
|
+
btn: {
|
|
126
|
+
flex: 1,
|
|
127
|
+
},
|
|
128
|
+
});
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview BackButton — the "Atrás" / "Back" control for reversible steps.
|
|
3
|
+
*
|
|
4
|
+
* A small, top-left chevron-back pill rendered by `StepShell` only when the
|
|
5
|
+
* current step is reversible (the backend's `reversible` flag drives this; the
|
|
6
|
+
* SDK never decides reversibility on its own). Tapping it asks the orchestrator
|
|
7
|
+
* to navigate to the previous reversible step — the actual transition is driven
|
|
8
|
+
* by the backend's `ROUTING_COMMAND / PREVIOUS_STEP` over SSE.
|
|
9
|
+
*
|
|
10
|
+
* The chevron uses `MaterialIcons` (via `StepIcon`); when `@expo/vector-icons`
|
|
11
|
+
* is unavailable the icon falls back gracefully and only the label shows.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { Pressable, StyleSheet, Text } from 'react-native';
|
|
15
|
+
import { useTheme, withAlpha } from '../theme';
|
|
16
|
+
import { StepIcon } from '../icons/StepIcon';
|
|
17
|
+
|
|
18
|
+
export interface BackButtonProps {
|
|
19
|
+
label: string;
|
|
20
|
+
onPress: () => void;
|
|
21
|
+
/** Disables the control (e.g. while a back request is already in flight). */
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function BackButton({ label, onPress, disabled = false }: BackButtonProps) {
|
|
26
|
+
const theme = useTheme();
|
|
27
|
+
return (
|
|
28
|
+
<Pressable
|
|
29
|
+
accessibilityRole="button"
|
|
30
|
+
accessibilityLabel={label}
|
|
31
|
+
accessibilityState={{ disabled }}
|
|
32
|
+
disabled={disabled}
|
|
33
|
+
onPress={onPress}
|
|
34
|
+
hitSlop={8}
|
|
35
|
+
style={({ pressed }) => [
|
|
36
|
+
styles.base,
|
|
37
|
+
pressed && !disabled && { backgroundColor: withAlpha(theme.textColor, 0.06) },
|
|
38
|
+
disabled && styles.disabled,
|
|
39
|
+
]}
|
|
40
|
+
>
|
|
41
|
+
<StepIcon name="chevron-left" size={20} color={theme.textColor} />
|
|
42
|
+
<Text style={[styles.label, { color: theme.textColor }]}>{label}</Text>
|
|
43
|
+
</Pressable>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const styles = StyleSheet.create({
|
|
48
|
+
base: {
|
|
49
|
+
flexDirection: 'row',
|
|
50
|
+
alignItems: 'center',
|
|
51
|
+
alignSelf: 'flex-start',
|
|
52
|
+
minHeight: 44,
|
|
53
|
+
paddingRight: 10,
|
|
54
|
+
paddingVertical: 6,
|
|
55
|
+
marginLeft: -4,
|
|
56
|
+
},
|
|
57
|
+
disabled: {
|
|
58
|
+
opacity: 0.45,
|
|
59
|
+
},
|
|
60
|
+
label: {
|
|
61
|
+
fontSize: 15,
|
|
62
|
+
fontWeight: '600',
|
|
63
|
+
marginLeft: 2,
|
|
64
|
+
},
|
|
65
|
+
});
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Form-level error banner. Tinted background, error text, paired with an
|
|
3
|
+
* inline warning icon (single "!" character to keep zero asset dependencies).
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
7
|
+
import { mixHex, useTheme } from '../theme';
|
|
8
|
+
|
|
9
|
+
export interface BannerProps {
|
|
10
|
+
message: string;
|
|
11
|
+
variant?: 'error' | 'warning';
|
|
12
|
+
testID?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function Banner({
|
|
16
|
+
message,
|
|
17
|
+
variant = 'error',
|
|
18
|
+
testID,
|
|
19
|
+
}: BannerProps) {
|
|
20
|
+
const theme = useTheme();
|
|
21
|
+
const accent = variant === 'warning' ? theme.warningColor : theme.errorColor;
|
|
22
|
+
const tint = mixHex(accent, theme.backgroundColor, 12);
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<View
|
|
26
|
+
accessibilityRole="alert"
|
|
27
|
+
accessibilityLiveRegion="polite"
|
|
28
|
+
testID={testID}
|
|
29
|
+
style={[
|
|
30
|
+
styles.box,
|
|
31
|
+
{
|
|
32
|
+
backgroundColor: tint,
|
|
33
|
+
borderColor: theme.borderColor,
|
|
34
|
+
borderRadius: theme.borderRadiusPx,
|
|
35
|
+
},
|
|
36
|
+
]}
|
|
37
|
+
>
|
|
38
|
+
<View
|
|
39
|
+
style={[
|
|
40
|
+
styles.icon,
|
|
41
|
+
{ borderColor: accent, backgroundColor: theme.backgroundColor },
|
|
42
|
+
]}
|
|
43
|
+
>
|
|
44
|
+
<Text style={[styles.iconText, { color: accent }]}>!</Text>
|
|
45
|
+
</View>
|
|
46
|
+
<Text style={[styles.message, { color: accent }]} numberOfLines={4}>
|
|
47
|
+
{message}
|
|
48
|
+
</Text>
|
|
49
|
+
</View>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const styles = StyleSheet.create({
|
|
54
|
+
box: {
|
|
55
|
+
flexDirection: 'row',
|
|
56
|
+
alignItems: 'flex-start',
|
|
57
|
+
gap: 8,
|
|
58
|
+
padding: 10,
|
|
59
|
+
borderWidth: 1,
|
|
60
|
+
marginTop: 4,
|
|
61
|
+
},
|
|
62
|
+
icon: {
|
|
63
|
+
width: 18,
|
|
64
|
+
height: 18,
|
|
65
|
+
borderRadius: 9,
|
|
66
|
+
alignItems: 'center',
|
|
67
|
+
justifyContent: 'center',
|
|
68
|
+
marginTop: 2,
|
|
69
|
+
borderWidth: 1,
|
|
70
|
+
},
|
|
71
|
+
iconText: {
|
|
72
|
+
fontWeight: '700',
|
|
73
|
+
fontSize: 12,
|
|
74
|
+
lineHeight: 14,
|
|
75
|
+
},
|
|
76
|
+
message: {
|
|
77
|
+
flex: 1,
|
|
78
|
+
fontSize: 13,
|
|
79
|
+
lineHeight: 18,
|
|
80
|
+
},
|
|
81
|
+
});
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Themed button — primary / secondary / ghost variants.
|
|
3
|
+
*
|
|
4
|
+
* Matches the visual language of `.vl-btn--primary` / `.vl-retry-dialog__btn--ghost`:
|
|
5
|
+
* - Primary: filled with `primaryColor`, white text.
|
|
6
|
+
* - Secondary: filled with `secondaryColor`.
|
|
7
|
+
* - Ghost: transparent with border + text in `textColor`.
|
|
8
|
+
*
|
|
9
|
+
* 44 px min tap target (Apple HIG / WCAG 2.5.5). Disabled state dims at 0.45
|
|
10
|
+
* opacity (matches `.vl-btn:disabled`).
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { useMemo } from 'react';
|
|
14
|
+
import {
|
|
15
|
+
ActivityIndicator,
|
|
16
|
+
Pressable,
|
|
17
|
+
StyleSheet,
|
|
18
|
+
Text,
|
|
19
|
+
View,
|
|
20
|
+
type GestureResponderEvent,
|
|
21
|
+
type StyleProp,
|
|
22
|
+
type ViewStyle,
|
|
23
|
+
} from 'react-native';
|
|
24
|
+
import { useTheme, withAlpha } from '../theme';
|
|
25
|
+
|
|
26
|
+
export type ButtonVariant = 'primary' | 'secondary' | 'ghost';
|
|
27
|
+
|
|
28
|
+
export interface ButtonProps {
|
|
29
|
+
label: string;
|
|
30
|
+
onPress?: (event: GestureResponderEvent) => void;
|
|
31
|
+
variant?: ButtonVariant;
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
loading?: boolean;
|
|
34
|
+
/** Fills the parent's width — most form CTAs want this. */
|
|
35
|
+
fullWidth?: boolean;
|
|
36
|
+
style?: StyleProp<ViewStyle>;
|
|
37
|
+
accessibilityLabel?: string;
|
|
38
|
+
testID?: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function Button({
|
|
42
|
+
label,
|
|
43
|
+
onPress,
|
|
44
|
+
variant = 'primary',
|
|
45
|
+
disabled = false,
|
|
46
|
+
loading = false,
|
|
47
|
+
fullWidth = true,
|
|
48
|
+
style,
|
|
49
|
+
accessibilityLabel,
|
|
50
|
+
testID,
|
|
51
|
+
}: ButtonProps) {
|
|
52
|
+
const theme = useTheme();
|
|
53
|
+
const variantStyles = useMemo(() => buildVariantStyles(theme, variant), [
|
|
54
|
+
theme,
|
|
55
|
+
variant,
|
|
56
|
+
]);
|
|
57
|
+
const isDisabled = disabled || loading;
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<Pressable
|
|
61
|
+
accessibilityRole="button"
|
|
62
|
+
accessibilityState={{ disabled: isDisabled, busy: loading }}
|
|
63
|
+
accessibilityLabel={accessibilityLabel ?? label}
|
|
64
|
+
disabled={isDisabled}
|
|
65
|
+
onPress={onPress}
|
|
66
|
+
testID={testID}
|
|
67
|
+
style={({ pressed }) => [
|
|
68
|
+
styles.base,
|
|
69
|
+
{ borderRadius: theme.borderRadiusPx },
|
|
70
|
+
variantStyles.container,
|
|
71
|
+
fullWidth && styles.fullWidth,
|
|
72
|
+
pressed && !isDisabled && variantStyles.pressed,
|
|
73
|
+
isDisabled && styles.disabled,
|
|
74
|
+
style,
|
|
75
|
+
]}
|
|
76
|
+
>
|
|
77
|
+
{loading ? (
|
|
78
|
+
<View style={styles.row}>
|
|
79
|
+
<ActivityIndicator color={variantStyles.activityColor} size="small" />
|
|
80
|
+
<Text style={[styles.label, variantStyles.label, styles.labelGap]}>
|
|
81
|
+
{label}
|
|
82
|
+
</Text>
|
|
83
|
+
</View>
|
|
84
|
+
) : (
|
|
85
|
+
<Text style={[styles.label, variantStyles.label]}>{label}</Text>
|
|
86
|
+
)}
|
|
87
|
+
</Pressable>
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
interface VariantStyleSet {
|
|
92
|
+
container: ViewStyle;
|
|
93
|
+
pressed: ViewStyle;
|
|
94
|
+
label: { color: string };
|
|
95
|
+
activityColor: string;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function buildVariantStyles(
|
|
99
|
+
theme: ReturnType<typeof useTheme>,
|
|
100
|
+
variant: ButtonVariant,
|
|
101
|
+
): VariantStyleSet {
|
|
102
|
+
switch (variant) {
|
|
103
|
+
case 'secondary':
|
|
104
|
+
return {
|
|
105
|
+
container: {
|
|
106
|
+
backgroundColor: theme.secondaryColor,
|
|
107
|
+
borderColor: theme.secondaryColor,
|
|
108
|
+
},
|
|
109
|
+
pressed: { opacity: 0.85 },
|
|
110
|
+
label: { color: '#FFFFFF' },
|
|
111
|
+
activityColor: '#FFFFFF',
|
|
112
|
+
};
|
|
113
|
+
case 'ghost':
|
|
114
|
+
return {
|
|
115
|
+
container: {
|
|
116
|
+
backgroundColor: 'transparent',
|
|
117
|
+
borderColor: theme.borderColor,
|
|
118
|
+
},
|
|
119
|
+
pressed: { backgroundColor: withAlpha(theme.textColor, 0.06) },
|
|
120
|
+
label: { color: theme.textColor },
|
|
121
|
+
activityColor: theme.textColor,
|
|
122
|
+
};
|
|
123
|
+
case 'primary':
|
|
124
|
+
default:
|
|
125
|
+
return {
|
|
126
|
+
container: {
|
|
127
|
+
backgroundColor: theme.primaryColor,
|
|
128
|
+
borderColor: theme.primaryColor,
|
|
129
|
+
},
|
|
130
|
+
pressed: { opacity: 0.85 },
|
|
131
|
+
label: { color: '#FFFFFF' },
|
|
132
|
+
activityColor: '#FFFFFF',
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const styles = StyleSheet.create({
|
|
138
|
+
base: {
|
|
139
|
+
minHeight: 44,
|
|
140
|
+
paddingHorizontal: 16,
|
|
141
|
+
paddingVertical: 10,
|
|
142
|
+
borderWidth: 1,
|
|
143
|
+
alignItems: 'center',
|
|
144
|
+
justifyContent: 'center',
|
|
145
|
+
},
|
|
146
|
+
fullWidth: {
|
|
147
|
+
alignSelf: 'stretch',
|
|
148
|
+
},
|
|
149
|
+
disabled: {
|
|
150
|
+
opacity: 0.45,
|
|
151
|
+
},
|
|
152
|
+
label: {
|
|
153
|
+
fontSize: 15,
|
|
154
|
+
fontWeight: '600',
|
|
155
|
+
textAlign: 'center',
|
|
156
|
+
},
|
|
157
|
+
labelGap: {
|
|
158
|
+
marginLeft: 8,
|
|
159
|
+
},
|
|
160
|
+
row: {
|
|
161
|
+
flexDirection: 'row',
|
|
162
|
+
alignItems: 'center',
|
|
163
|
+
},
|
|
164
|
+
});
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plain themed surface used by step shells, dialog cards, etc. Adds the
|
|
3
|
+
* standard radius + shadow elevation pair without forcing a specific layout.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { Platform, StyleSheet, View, type ViewProps } from 'react-native';
|
|
7
|
+
import { useTheme } from '../theme';
|
|
8
|
+
|
|
9
|
+
export interface CardProps extends ViewProps {
|
|
10
|
+
elevated?: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function Card({
|
|
14
|
+
elevated = false,
|
|
15
|
+
style,
|
|
16
|
+
children,
|
|
17
|
+
...rest
|
|
18
|
+
}: CardProps) {
|
|
19
|
+
const theme = useTheme();
|
|
20
|
+
return (
|
|
21
|
+
<View
|
|
22
|
+
{...rest}
|
|
23
|
+
style={[
|
|
24
|
+
styles.card,
|
|
25
|
+
{
|
|
26
|
+
backgroundColor: theme.backgroundColor,
|
|
27
|
+
borderColor: theme.borderColor,
|
|
28
|
+
borderRadius: theme.borderRadiusPx,
|
|
29
|
+
},
|
|
30
|
+
elevated && (Platform.OS === 'android' ? androidElevation : iosShadow),
|
|
31
|
+
style,
|
|
32
|
+
]}
|
|
33
|
+
>
|
|
34
|
+
{children}
|
|
35
|
+
</View>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const styles = StyleSheet.create({
|
|
40
|
+
card: {
|
|
41
|
+
borderWidth: 1,
|
|
42
|
+
padding: 16,
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
const iosShadow = {
|
|
47
|
+
shadowColor: '#000',
|
|
48
|
+
shadowOpacity: 0.1,
|
|
49
|
+
shadowRadius: 6,
|
|
50
|
+
shadowOffset: { width: 0, height: 4 },
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const androidElevation = {
|
|
54
|
+
elevation: 3,
|
|
55
|
+
};
|