@incodetech/prizma-core-screens 0.1.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 +74 -0
- package/dist/CaptureOverlay.css +55 -0
- package/dist/CaptureOverlay.d.ts +34 -0
- package/dist/CaptureOverlay.js +32 -0
- package/dist/CaptureScreen.d.ts +51 -0
- package/dist/CaptureScreen.js +30 -0
- package/dist/CurpConfirmScreen.d.ts +33 -0
- package/dist/CurpConfirmScreen.js +29 -0
- package/dist/CurpEnterScreen.d.ts +51 -0
- package/dist/CurpEnterScreen.js +77 -0
- package/dist/CurpGenerateScreen.d.ts +47 -0
- package/dist/CurpGenerateScreen.js +57 -0
- package/dist/CurpLayout.css +92 -0
- package/dist/CurpProcessingScreen.d.ts +32 -0
- package/dist/CurpProcessingScreen.js +29 -0
- package/dist/CurpResultScreen.d.ts +37 -0
- package/dist/CurpResultScreen.js +36 -0
- package/dist/CurpStrings.d.ts +170 -0
- package/dist/CurpStrings.js +16 -0
- package/dist/DataSharingConsentConsentScreen.d.ts +73 -0
- package/dist/DataSharingConsentConsentScreen.js +120 -0
- package/dist/DataSharingConsentLayout.css +78 -0
- package/dist/DataSharingConsentStrings.d.ts +96 -0
- package/dist/DataSharingConsentStrings.js +38 -0
- package/dist/DemoScreensEndScreen.d.ts +33 -0
- package/dist/DemoScreensEndScreen.js +27 -0
- package/dist/DemoScreensStrings.d.ts +11 -0
- package/dist/DemoScreensStrings.js +19 -0
- package/dist/DocumentCaptureCaptureScreen.d.ts +53 -0
- package/dist/DocumentCaptureCaptureScreen.js +51 -0
- package/dist/DocumentCaptureCommonIssuesScreen.d.ts +32 -0
- package/dist/DocumentCaptureCommonIssuesScreen.js +45 -0
- package/dist/DocumentCaptureConfirmImageScreen.d.ts +38 -0
- package/dist/DocumentCaptureConfirmImageScreen.js +34 -0
- package/dist/DocumentCaptureConfirmUploadScreen.d.ts +43 -0
- package/dist/DocumentCaptureConfirmUploadScreen.js +29 -0
- package/dist/DocumentCaptureGenericErrorScreen.d.ts +36 -0
- package/dist/DocumentCaptureGenericErrorScreen.js +30 -0
- package/dist/DocumentCaptureIllustration.d.ts +45 -0
- package/dist/DocumentCaptureIllustration.js +7 -0
- package/dist/DocumentCaptureLayout.css +226 -0
- package/dist/DocumentCaptureMethodSelectionScreen.d.ts +45 -0
- package/dist/DocumentCaptureMethodSelectionScreen.js +70 -0
- package/dist/DocumentCaptureNextPageScreen.d.ts +33 -0
- package/dist/DocumentCaptureNextPageScreen.js +28 -0
- package/dist/DocumentCaptureNoConnectionScreen.d.ts +28 -0
- package/dist/DocumentCaptureNoConnectionScreen.js +29 -0
- package/dist/DocumentCaptureStrings.d.ts +158 -0
- package/dist/DocumentCaptureStrings.js +21 -0
- package/dist/DocumentCaptureTutorialScreen.d.ts +36 -0
- package/dist/DocumentCaptureTutorialScreen.js +27 -0
- package/dist/EkybAddressDetailsScreen.d.ts +61 -0
- package/dist/EkybAddressDetailsScreen.js +63 -0
- package/dist/EkybBusinessDetailsScreen.d.ts +55 -0
- package/dist/EkybBusinessDetailsScreen.js +57 -0
- package/dist/EkybCountryScreen.d.ts +52 -0
- package/dist/EkybCountryScreen.js +58 -0
- package/dist/EkybErrorScreen.d.ts +30 -0
- package/dist/EkybErrorScreen.js +24 -0
- package/dist/EkybOwnersScreen.d.ts +73 -0
- package/dist/EkybOwnersScreen.js +87 -0
- package/dist/EkybProcessingScreen.d.ts +28 -0
- package/dist/EkybProcessingScreen.js +22 -0
- package/dist/EkybStrings.d.ts +200 -0
- package/dist/EkybStrings.js +27 -0
- package/dist/EkybSuccessScreen.d.ts +28 -0
- package/dist/EkybSuccessScreen.js +22 -0
- package/dist/EkycDetailsScreen.d.ts +65 -0
- package/dist/EkycDetailsScreen.js +81 -0
- package/dist/EkycErrorScreen.d.ts +32 -0
- package/dist/EkycErrorScreen.js +26 -0
- package/dist/EkycLayout.css +39 -0
- package/dist/EkycLicenseScreen.d.ts +21 -0
- package/dist/EkycLicenseScreen.js +68 -0
- package/dist/EkycProcessingScreen.d.ts +26 -0
- package/dist/EkycProcessingScreen.js +20 -0
- package/dist/EkycStrings.d.ts +112 -0
- package/dist/EkycStrings.js +34 -0
- package/dist/EkycSuccessScreen.d.ts +29 -0
- package/dist/EkycSuccessScreen.js +23 -0
- package/dist/ElectronicSignatureDrawScreen.d.ts +57 -0
- package/dist/ElectronicSignatureDrawScreen.js +53 -0
- package/dist/ElectronicSignatureErrorScreen.d.ts +31 -0
- package/dist/ElectronicSignatureErrorScreen.js +25 -0
- package/dist/ElectronicSignatureLayout.css +80 -0
- package/dist/ElectronicSignatureReviewScreen.d.ts +51 -0
- package/dist/ElectronicSignatureReviewScreen.js +36 -0
- package/dist/ElectronicSignatureStrings.d.ts +50 -0
- package/dist/ElectronicSignatureStrings.js +12 -0
- package/dist/ElectronicSignatureSuccessScreen.d.ts +30 -0
- package/dist/ElectronicSignatureSuccessScreen.js +24 -0
- package/dist/EmailInputErrorScreen.d.ts +34 -0
- package/dist/EmailInputErrorScreen.js +28 -0
- package/dist/EmailInputOtpScreen.d.ts +56 -0
- package/dist/EmailInputOtpScreen.js +82 -0
- package/dist/EmailInputProcessingScreen.d.ts +29 -0
- package/dist/EmailInputProcessingScreen.js +23 -0
- package/dist/EmailInputStrings.d.ts +130 -0
- package/dist/EmailInputStrings.js +19 -0
- package/dist/EmailInputSuccessScreen.d.ts +37 -0
- package/dist/EmailInputSuccessScreen.js +31 -0
- package/dist/EmailInputVerifyScreen.d.ts +46 -0
- package/dist/EmailInputVerifyScreen.js +55 -0
- package/dist/ErrorScreensScreen.d.ts +62 -0
- package/dist/ErrorScreensScreen.js +71 -0
- package/dist/ErrorScreensStrings.d.ts +31 -0
- package/dist/ErrorScreensStrings.js +28 -0
- package/dist/FaceCaptureCapturingScreen.d.ts +32 -0
- package/dist/FaceCaptureCapturingScreen.js +53 -0
- package/dist/FaceCaptureLayout.css +18 -0
- package/dist/FaceCaptureLoadingScreen.d.ts +32 -0
- package/dist/FaceCaptureLoadingScreen.js +30 -0
- package/dist/FaceCaptureManualCaptureScreen.d.ts +32 -0
- package/dist/FaceCaptureManualCaptureScreen.js +27 -0
- package/dist/FaceCaptureNoConnectionScreen.d.ts +30 -0
- package/dist/FaceCaptureNoConnectionScreen.js +31 -0
- package/dist/FaceCaptureResultErrorScreen.d.ts +40 -0
- package/dist/FaceCaptureResultErrorScreen.js +32 -0
- package/dist/FaceCaptureResultSuccessScreen.d.ts +25 -0
- package/dist/FaceCaptureResultSuccessScreen.js +27 -0
- package/dist/FaceCaptureStrings.d.ts +62 -0
- package/dist/FaceCaptureStrings.js +14 -0
- package/dist/FaceCaptureTutorialScreen.d.ts +29 -0
- package/dist/FaceCaptureTutorialScreen.js +20 -0
- package/dist/FaceMatchComparisonCompactScreen.d.ts +26 -0
- package/dist/FaceMatchComparisonCompactScreen.js +24 -0
- package/dist/FaceMatchComparisonScreen.d.ts +80 -0
- package/dist/FaceMatchComparisonScreen.js +81 -0
- package/dist/FaceMatchLayout.css +264 -0
- package/dist/FaceMatchResultScreen.d.ts +50 -0
- package/dist/FaceMatchResultScreen.js +52 -0
- package/dist/FaceMatchStrings.d.ts +66 -0
- package/dist/FaceMatchStrings.js +21 -0
- package/dist/FormScreen.css +78 -0
- package/dist/FormScreen.d.ts +101 -0
- package/dist/FormScreen.js +36 -0
- package/dist/FormsChoiceScreen.d.ts +66 -0
- package/dist/FormsChoiceScreen.js +63 -0
- package/dist/FormsErrorScreen.d.ts +28 -0
- package/dist/FormsErrorScreen.js +22 -0
- package/dist/FormsFieldScreen.d.ts +66 -0
- package/dist/FormsFieldScreen.js +85 -0
- package/dist/FormsLayout.css +45 -0
- package/dist/FormsLongFormScreen.d.ts +70 -0
- package/dist/FormsLongFormScreen.js +149 -0
- package/dist/FormsStrings.d.ts +181 -0
- package/dist/FormsStrings.js +36 -0
- package/dist/FormsSuccessScreen.d.ts +32 -0
- package/dist/FormsSuccessScreen.js +26 -0
- package/dist/GeolocationBrowserStepsScreen.d.ts +56 -0
- package/dist/GeolocationBrowserStepsScreen.js +95 -0
- package/dist/GeolocationErrorScreen.d.ts +43 -0
- package/dist/GeolocationErrorScreen.js +56 -0
- package/dist/GeolocationIntroScreen.d.ts +49 -0
- package/dist/GeolocationIntroScreen.js +38 -0
- package/dist/GeolocationPermissionScreen.d.ts +38 -0
- package/dist/GeolocationPermissionScreen.js +30 -0
- package/dist/GeolocationStrings.d.ts +157 -0
- package/dist/GeolocationStrings.js +28 -0
- package/dist/IdCaptureAgeVerificationScreen.d.ts +25 -0
- package/dist/IdCaptureAgeVerificationScreen.js +38 -0
- package/dist/IdCaptureAnalyzingScreen.d.ts +41 -0
- package/dist/IdCaptureAnalyzingScreen.js +30 -0
- package/dist/IdCaptureCommonIssuesScreen.d.ts +31 -0
- package/dist/IdCaptureCommonIssuesScreen.js +49 -0
- package/dist/IdCaptureDocumentErrorScreen.d.ts +37 -0
- package/dist/IdCaptureDocumentErrorScreen.js +30 -0
- package/dist/IdCaptureDocumentSelectionScreen.d.ts +41 -0
- package/dist/IdCaptureDocumentSelectionScreen.js +49 -0
- package/dist/IdCaptureFlipScreen.d.ts +31 -0
- package/dist/IdCaptureFlipScreen.js +26 -0
- package/dist/IdCaptureHoldOnScreen.d.ts +28 -0
- package/dist/IdCaptureHoldOnScreen.js +22 -0
- package/dist/IdCaptureLayout.css +111 -0
- package/dist/IdCaptureNoConnectionScreen.d.ts +28 -0
- package/dist/IdCaptureNoConnectionScreen.js +29 -0
- package/dist/IdCapturePermissionScreen.d.ts +34 -0
- package/dist/IdCapturePermissionScreen.js +45 -0
- package/dist/IdCaptureResultScreen.d.ts +59 -0
- package/dist/IdCaptureResultScreen.js +89 -0
- package/dist/IdCaptureStageScreen.d.ts +69 -0
- package/dist/IdCaptureStageScreen.js +88 -0
- package/dist/IdCaptureStrings.d.ts +199 -0
- package/dist/IdCaptureStrings.js +15 -0
- package/dist/IdCaptureTutorialScreen.d.ts +36 -0
- package/dist/IdCaptureTutorialScreen.js +30 -0
- package/dist/ListScreen.d.ts +95 -0
- package/dist/ListScreen.js +46 -0
- package/dist/LoaderScreen.d.ts +32 -0
- package/dist/LoaderScreen.js +27 -0
- package/dist/LoadersStrings.d.ts +20 -0
- package/dist/LoadersStrings.js +16 -0
- package/dist/NfcCommonIssuesScreen.d.ts +35 -0
- package/dist/NfcCommonIssuesScreen.js +48 -0
- package/dist/NfcErrorScreen.d.ts +41 -0
- package/dist/NfcErrorScreen.js +27 -0
- package/dist/NfcLayout.css +36 -0
- package/dist/NfcProcessingScreen.d.ts +28 -0
- package/dist/NfcProcessingScreen.js +22 -0
- package/dist/NfcScanningScreen.d.ts +66 -0
- package/dist/NfcScanningScreen.js +61 -0
- package/dist/NfcSettingsScreen.d.ts +53 -0
- package/dist/NfcSettingsScreen.js +57 -0
- package/dist/NfcStrings.d.ts +112 -0
- package/dist/NfcStrings.js +7 -0
- package/dist/NfcSuccessScreen.d.ts +28 -0
- package/dist/NfcSuccessScreen.js +22 -0
- package/dist/NfcSymbolScreen.d.ts +39 -0
- package/dist/NfcSymbolScreen.js +32 -0
- package/dist/NfcTryAgainScreen.d.ts +53 -0
- package/dist/NfcTryAgainScreen.js +45 -0
- package/dist/NfcTutorialScreen.d.ts +33 -0
- package/dist/NfcTutorialScreen.js +24 -0
- package/dist/PermissionsAllowScreen.d.ts +44 -0
- package/dist/PermissionsAllowScreen.js +38 -0
- package/dist/PermissionsBrowserStepsScreen.d.ts +42 -0
- package/dist/PermissionsBrowserStepsScreen.js +86 -0
- package/dist/PermissionsRequiredScreen.d.ts +37 -0
- package/dist/PermissionsRequiredScreen.js +51 -0
- package/dist/PermissionsStrings.d.ts +70 -0
- package/dist/PermissionsStrings.js +36 -0
- package/dist/PhoneInputErrorScreen.d.ts +37 -0
- package/dist/PhoneInputErrorScreen.js +47 -0
- package/dist/PhoneInputLayout.css +61 -0
- package/dist/PhoneInputOtpScreen.d.ts +37 -0
- package/dist/PhoneInputOtpScreen.js +44 -0
- package/dist/PhoneInputSnaLoadingScreen.d.ts +23 -0
- package/dist/PhoneInputSnaLoadingScreen.js +17 -0
- package/dist/PhoneInputStrings.d.ts +121 -0
- package/dist/PhoneInputStrings.js +13 -0
- package/dist/PhoneInputSuccessScreen.d.ts +23 -0
- package/dist/PhoneInputSuccessScreen.js +17 -0
- package/dist/PhoneInputVerifyScreen.d.ts +41 -0
- package/dist/PhoneInputVerifyScreen.js +71 -0
- package/dist/ProcessingScreen.d.ts +42 -0
- package/dist/ProcessingScreen.js +21 -0
- package/dist/QualifiedSignatureAcceptScreen.d.ts +71 -0
- package/dist/QualifiedSignatureAcceptScreen.js +86 -0
- package/dist/QualifiedSignatureDocumentScreen.d.ts +62 -0
- package/dist/QualifiedSignatureDocumentScreen.js +56 -0
- package/dist/QualifiedSignatureLayout.css +206 -0
- package/dist/QualifiedSignatureProcessingScreen.d.ts +46 -0
- package/dist/QualifiedSignatureProcessingScreen.js +48 -0
- package/dist/QualifiedSignatureResultScreen.d.ts +65 -0
- package/dist/QualifiedSignatureResultScreen.js +76 -0
- package/dist/QualifiedSignatureReviewScreen.d.ts +49 -0
- package/dist/QualifiedSignatureReviewScreen.js +40 -0
- package/dist/QualifiedSignatureStrings.d.ts +222 -0
- package/dist/QualifiedSignatureStrings.js +25 -0
- package/dist/QualifiedSignatureUploadScreen.d.ts +42 -0
- package/dist/QualifiedSignatureUploadScreen.js +35 -0
- package/dist/ResultScreen.d.ts +93 -0
- package/dist/ResultScreen.js +37 -0
- package/dist/ReviewScreen.d.ts +81 -0
- package/dist/ReviewScreen.js +56 -0
- package/dist/ScreenLayout.css +469 -0
- package/dist/ScreenNav.css +43 -0
- package/dist/ScreenNav.d.ts +26 -0
- package/dist/ScreenNav.js +13 -0
- package/dist/ScreenShell.css +130 -0
- package/dist/ScreenShell.d.ts +45 -0
- package/dist/ScreenShell.js +22 -0
- package/dist/TutorialScreen.d.ts +70 -0
- package/dist/TutorialScreen.js +24 -0
- package/dist/VideoSelfieCameraStepsScreen.d.ts +47 -0
- package/dist/VideoSelfieCameraStepsScreen.js +56 -0
- package/dist/VideoSelfieErrorScreen.d.ts +63 -0
- package/dist/VideoSelfieErrorScreen.js +94 -0
- package/dist/VideoSelfieFlipCameraScreen.d.ts +34 -0
- package/dist/VideoSelfieFlipCameraScreen.js +38 -0
- package/dist/VideoSelfieFlipIdScreen.d.ts +34 -0
- package/dist/VideoSelfieFlipIdScreen.js +29 -0
- package/dist/VideoSelfieIdCaptureScreen.d.ts +75 -0
- package/dist/VideoSelfieIdCaptureScreen.js +86 -0
- package/dist/VideoSelfieLayout.css +259 -0
- package/dist/VideoSelfiePermissionRequiredScreen.d.ts +35 -0
- package/dist/VideoSelfiePermissionRequiredScreen.js +45 -0
- package/dist/VideoSelfiePermissionScreen.d.ts +51 -0
- package/dist/VideoSelfiePermissionScreen.js +44 -0
- package/dist/VideoSelfieProcessingScreen.d.ts +28 -0
- package/dist/VideoSelfieProcessingScreen.js +22 -0
- package/dist/VideoSelfieRetryScreen.d.ts +31 -0
- package/dist/VideoSelfieRetryScreen.js +32 -0
- package/dist/VideoSelfieSelfieCaptureScreen.d.ts +52 -0
- package/dist/VideoSelfieSelfieCaptureScreen.js +58 -0
- package/dist/VideoSelfieSpeakScreen.d.ts +64 -0
- package/dist/VideoSelfieSpeakScreen.js +95 -0
- package/dist/VideoSelfieStrings.d.ts +196 -0
- package/dist/VideoSelfieStrings.js +14 -0
- package/dist/VideoSelfieSuccessScreen.d.ts +25 -0
- package/dist/VideoSelfieSuccessScreen.js +19 -0
- package/dist/VideoSelfieTutorialScreen.d.ts +33 -0
- package/dist/VideoSelfieTutorialScreen.js +41 -0
- package/dist/ViewfinderScreen.css +107 -0
- package/dist/ViewfinderScreen.d.ts +40 -0
- package/dist/ViewfinderScreen.js +26 -0
- package/dist/WatchlistBusinessFormScreen.d.ts +61 -0
- package/dist/WatchlistBusinessFormScreen.js +85 -0
- package/dist/WatchlistBusinessProcessingScreen.d.ts +25 -0
- package/dist/WatchlistBusinessProcessingScreen.js +19 -0
- package/dist/WatchlistBusinessStrings.d.ts +95 -0
- package/dist/WatchlistBusinessStrings.js +19 -0
- package/dist/WatchlistBusinessSuccessScreen.d.ts +29 -0
- package/dist/WatchlistBusinessSuccessScreen.js +23 -0
- package/dist/flows.d.ts +216 -0
- package/dist/flows.js +516 -0
- package/dist/index.d.ts +145 -0
- package/dist/index.js +130 -0
- package/dist/styles.css +33 -0
- package/dist/types.d.ts +56 -0
- package/dist/types.js +8 -0
- package/package.json +689 -0
- package/samples/camera-surface.png +0 -0
- package/samples/document-still.png +0 -0
- package/samples/document-thumbnail.png +0 -0
- package/samples/face-match-bottom.png +0 -0
- package/samples/face-match-left.png +0 -0
- package/samples/face-match-right.png +0 -0
- package/samples/id-back-blur.png +0 -0
- package/samples/id-back-dark.png +0 -0
- package/samples/id-back-glare.png +0 -0
- package/samples/id-back.png +0 -0
- package/samples/id-front-blur.png +0 -0
- package/samples/id-front-dark.png +0 -0
- package/samples/id-front-glare.png +0 -0
- package/samples/id-front.png +0 -0
- package/samples/id-passport.png +0 -0
- package/samples/selfie-glasses.png +0 -0
- package/samples/selfie-hat.png +0 -0
- package/samples/selfie-mask.png +0 -0
- package/samples/selfie.png +0 -0
- package/samples/video-selfie-camera.png +0 -0
- package/src/CaptureOverlay.css +55 -0
- package/src/CaptureOverlay.tsx +56 -0
- package/src/CaptureScreen.tsx +121 -0
- package/src/CurpConfirmScreen.tsx +75 -0
- package/src/CurpEnterScreen.tsx +149 -0
- package/src/CurpGenerateScreen.tsx +172 -0
- package/src/CurpLayout.css +92 -0
- package/src/CurpProcessingScreen.tsx +75 -0
- package/src/CurpResultScreen.tsx +80 -0
- package/src/CurpStrings.ts +178 -0
- package/src/DataSharingConsentConsentScreen.tsx +223 -0
- package/src/DataSharingConsentLayout.css +78 -0
- package/src/DataSharingConsentStrings.ts +144 -0
- package/src/DemoScreensEndScreen.tsx +56 -0
- package/src/DemoScreensStrings.ts +31 -0
- package/src/DocumentCaptureCaptureScreen.tsx +135 -0
- package/src/DocumentCaptureCommonIssuesScreen.tsx +97 -0
- package/src/DocumentCaptureConfirmImageScreen.tsx +112 -0
- package/src/DocumentCaptureConfirmUploadScreen.tsx +113 -0
- package/src/DocumentCaptureGenericErrorScreen.tsx +82 -0
- package/src/DocumentCaptureIllustration.tsx +153 -0
- package/src/DocumentCaptureLayout.css +226 -0
- package/src/DocumentCaptureMethodSelectionScreen.tsx +151 -0
- package/src/DocumentCaptureNextPageScreen.tsx +82 -0
- package/src/DocumentCaptureNoConnectionScreen.tsx +77 -0
- package/src/DocumentCaptureStrings.ts +192 -0
- package/src/DocumentCaptureTutorialScreen.tsx +79 -0
- package/src/EkybAddressDetailsScreen.tsx +200 -0
- package/src/EkybBusinessDetailsScreen.tsx +147 -0
- package/src/EkybCountryScreen.tsx +124 -0
- package/src/EkybErrorScreen.tsx +61 -0
- package/src/EkybOwnersScreen.tsx +230 -0
- package/src/EkybProcessingScreen.tsx +57 -0
- package/src/EkybStrings.ts +239 -0
- package/src/EkybSuccessScreen.tsx +54 -0
- package/src/EkycDetailsScreen.tsx +178 -0
- package/src/EkycErrorScreen.tsx +64 -0
- package/src/EkycLayout.css +39 -0
- package/src/EkycLicenseScreen.tsx +164 -0
- package/src/EkycProcessingScreen.tsx +60 -0
- package/src/EkycStrings.ts +157 -0
- package/src/EkycSuccessScreen.tsx +63 -0
- package/src/ElectronicSignatureDrawScreen.tsx +127 -0
- package/src/ElectronicSignatureErrorScreen.tsx +74 -0
- package/src/ElectronicSignatureLayout.css +80 -0
- package/src/ElectronicSignatureReviewScreen.tsx +106 -0
- package/src/ElectronicSignatureStrings.ts +67 -0
- package/src/ElectronicSignatureSuccessScreen.tsx +67 -0
- package/src/EmailInputErrorScreen.tsx +67 -0
- package/src/EmailInputOtpScreen.tsx +169 -0
- package/src/EmailInputProcessingScreen.tsx +67 -0
- package/src/EmailInputStrings.ts +166 -0
- package/src/EmailInputSuccessScreen.tsx +72 -0
- package/src/EmailInputVerifyScreen.tsx +117 -0
- package/src/ErrorScreensScreen.tsx +149 -0
- package/src/ErrorScreensStrings.ts +66 -0
- package/src/FaceCaptureCapturingScreen.tsx +99 -0
- package/src/FaceCaptureLayout.css +18 -0
- package/src/FaceCaptureLoadingScreen.tsx +65 -0
- package/src/FaceCaptureManualCaptureScreen.tsx +94 -0
- package/src/FaceCaptureNoConnectionScreen.tsx +73 -0
- package/src/FaceCaptureResultErrorScreen.tsx +86 -0
- package/src/FaceCaptureResultSuccessScreen.tsx +49 -0
- package/src/FaceCaptureStrings.ts +92 -0
- package/src/FaceCaptureTutorialScreen.tsx +77 -0
- package/src/FaceMatchComparisonCompactScreen.tsx +51 -0
- package/src/FaceMatchComparisonScreen.tsx +201 -0
- package/src/FaceMatchLayout.css +264 -0
- package/src/FaceMatchResultScreen.tsx +117 -0
- package/src/FaceMatchStrings.ts +95 -0
- package/src/FormScreen.css +78 -0
- package/src/FormScreen.tsx +213 -0
- package/src/FormsChoiceScreen.tsx +150 -0
- package/src/FormsErrorScreen.tsx +61 -0
- package/src/FormsFieldScreen.tsx +198 -0
- package/src/FormsLayout.css +45 -0
- package/src/FormsLongFormScreen.tsx +295 -0
- package/src/FormsStrings.ts +243 -0
- package/src/FormsSuccessScreen.tsx +67 -0
- package/src/GeolocationBrowserStepsScreen.tsx +173 -0
- package/src/GeolocationErrorScreen.tsx +113 -0
- package/src/GeolocationIntroScreen.tsx +100 -0
- package/src/GeolocationPermissionScreen.tsx +88 -0
- package/src/GeolocationStrings.ts +193 -0
- package/src/IdCaptureAgeVerificationScreen.tsx +84 -0
- package/src/IdCaptureAnalyzingScreen.tsx +94 -0
- package/src/IdCaptureCommonIssuesScreen.tsx +109 -0
- package/src/IdCaptureDocumentErrorScreen.tsx +92 -0
- package/src/IdCaptureDocumentSelectionScreen.tsx +100 -0
- package/src/IdCaptureFlipScreen.tsx +66 -0
- package/src/IdCaptureHoldOnScreen.tsx +51 -0
- package/src/IdCaptureLayout.css +111 -0
- package/src/IdCaptureNoConnectionScreen.tsx +68 -0
- package/src/IdCapturePermissionScreen.tsx +102 -0
- package/src/IdCaptureResultScreen.tsx +197 -0
- package/src/IdCaptureStageScreen.tsx +241 -0
- package/src/IdCaptureStrings.ts +228 -0
- package/src/IdCaptureTutorialScreen.tsx +99 -0
- package/src/ListScreen.tsx +213 -0
- package/src/LoaderScreen.tsx +69 -0
- package/src/LoadersStrings.ts +38 -0
- package/src/NfcCommonIssuesScreen.tsx +104 -0
- package/src/NfcErrorScreen.tsx +83 -0
- package/src/NfcLayout.css +36 -0
- package/src/NfcProcessingScreen.tsx +57 -0
- package/src/NfcScanningScreen.tsx +127 -0
- package/src/NfcSettingsScreen.tsx +124 -0
- package/src/NfcStrings.ts +127 -0
- package/src/NfcSuccessScreen.tsx +56 -0
- package/src/NfcSymbolScreen.tsx +85 -0
- package/src/NfcTryAgainScreen.tsx +114 -0
- package/src/NfcTutorialScreen.tsx +76 -0
- package/src/PermissionsAllowScreen.tsx +90 -0
- package/src/PermissionsBrowserStepsScreen.tsx +158 -0
- package/src/PermissionsRequiredScreen.tsx +118 -0
- package/src/PermissionsStrings.ts +129 -0
- package/src/PhoneInputErrorScreen.tsx +104 -0
- package/src/PhoneInputLayout.css +61 -0
- package/src/PhoneInputOtpScreen.tsx +126 -0
- package/src/PhoneInputSnaLoadingScreen.tsx +61 -0
- package/src/PhoneInputStrings.ts +136 -0
- package/src/PhoneInputSuccessScreen.tsx +56 -0
- package/src/PhoneInputVerifyScreen.tsx +153 -0
- package/src/ProcessingScreen.tsx +97 -0
- package/src/QualifiedSignatureAcceptScreen.tsx +198 -0
- package/src/QualifiedSignatureDocumentScreen.tsx +124 -0
- package/src/QualifiedSignatureLayout.css +206 -0
- package/src/QualifiedSignatureProcessingScreen.tsx +112 -0
- package/src/QualifiedSignatureResultScreen.tsx +146 -0
- package/src/QualifiedSignatureReviewScreen.tsx +113 -0
- package/src/QualifiedSignatureStrings.ts +256 -0
- package/src/QualifiedSignatureUploadScreen.tsx +81 -0
- package/src/ResultScreen.tsx +211 -0
- package/src/ReviewScreen.tsx +196 -0
- package/src/ScreenLayout.css +469 -0
- package/src/ScreenNav.css +43 -0
- package/src/ScreenNav.tsx +46 -0
- package/src/ScreenShell.css +130 -0
- package/src/ScreenShell.tsx +66 -0
- package/src/TutorialScreen.tsx +166 -0
- package/src/VideoSelfieCameraStepsScreen.tsx +145 -0
- package/src/VideoSelfieErrorScreen.tsx +168 -0
- package/src/VideoSelfieFlipCameraScreen.tsx +88 -0
- package/src/VideoSelfieFlipIdScreen.tsx +74 -0
- package/src/VideoSelfieIdCaptureScreen.tsx +213 -0
- package/src/VideoSelfieLayout.css +259 -0
- package/src/VideoSelfiePermissionRequiredScreen.tsx +104 -0
- package/src/VideoSelfiePermissionScreen.tsx +102 -0
- package/src/VideoSelfieProcessingScreen.tsx +68 -0
- package/src/VideoSelfieRetryScreen.tsx +92 -0
- package/src/VideoSelfieSelfieCaptureScreen.tsx +122 -0
- package/src/VideoSelfieSpeakScreen.tsx +237 -0
- package/src/VideoSelfieStrings.ts +222 -0
- package/src/VideoSelfieSuccessScreen.tsx +64 -0
- package/src/VideoSelfieTutorialScreen.tsx +129 -0
- package/src/ViewfinderScreen.css +107 -0
- package/src/ViewfinderScreen.tsx +113 -0
- package/src/WatchlistBusinessFormScreen.tsx +176 -0
- package/src/WatchlistBusinessProcessingScreen.tsx +63 -0
- package/src/WatchlistBusinessStrings.ts +121 -0
- package/src/WatchlistBusinessSuccessScreen.tsx +67 -0
- package/src/flows.ts +711 -0
- package/src/index.ts +591 -0
- package/src/styles.css +33 -0
- package/src/types.ts +69 -0
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
import { PrizmaTextField } from '@incodetech/prizma-core-web/text-field';
|
|
3
|
+
import { PrizmaDateField } from '@incodetech/prizma-core-web/date-field';
|
|
4
|
+
import {
|
|
5
|
+
PrizmaDropdown,
|
|
6
|
+
type PrizmaDropdownOption,
|
|
7
|
+
} from '@incodetech/prizma-core-web/dropdown';
|
|
8
|
+
import { PrizmaCountryFlag, type PrizmaCountry } from '@incodetech/prizma-core-web/combined';
|
|
9
|
+
import { PrizmaFormScreen, type PrizmaFormScreenProps } from './FormScreen';
|
|
10
|
+
import type { PrizmaScreenActionHandler, PrizmaScreenOverrides } from './types';
|
|
11
|
+
import type {
|
|
12
|
+
FormsLongFormPreset,
|
|
13
|
+
FormsLongFormState,
|
|
14
|
+
FormsStrings,
|
|
15
|
+
} from './FormsStrings';
|
|
16
|
+
import './ScreenLayout.css';
|
|
17
|
+
import './FormsLayout.css';
|
|
18
|
+
|
|
19
|
+
/** How a row's label is marked. Figma draws all three. */
|
|
20
|
+
type FormsRequirement = 'required' | 'optional' | 'none';
|
|
21
|
+
|
|
22
|
+
/** One row of a multi-field form. STRUCTURE — the words live in the strings. */
|
|
23
|
+
interface FormsLongFormRow {
|
|
24
|
+
key: string;
|
|
25
|
+
kind: 'text' | 'email' | 'date' | 'country' | 'select';
|
|
26
|
+
requirement: FormsRequirement;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The row stacks each purple section draws, in order. Structure belongs to the
|
|
31
|
+
* screen (the archetype and Core own everything visual); only the labels and
|
|
32
|
+
* placeholders come from `FormsStrings`.
|
|
33
|
+
*/
|
|
34
|
+
const PRESET_ROWS: Record<FormsLongFormPreset, FormsLongFormRow[]> = {
|
|
35
|
+
// `forms.name` — the three-name form.
|
|
36
|
+
name: [
|
|
37
|
+
{ key: 'fullName', kind: 'text', requirement: 'required' },
|
|
38
|
+
{ key: 'firstName', kind: 'text', requirement: 'required' },
|
|
39
|
+
{ key: 'lastName', kind: 'text', requirement: 'none' },
|
|
40
|
+
],
|
|
41
|
+
// `longform.customizable` — the five-row customizable form.
|
|
42
|
+
profile: [
|
|
43
|
+
{ key: 'fullName', kind: 'text', requirement: 'required' },
|
|
44
|
+
{ key: 'residence', kind: 'country', requirement: 'required' },
|
|
45
|
+
{ key: 'occupation', kind: 'select', requirement: 'none' },
|
|
46
|
+
{ key: 'dob', kind: 'date', requirement: 'none' },
|
|
47
|
+
{ key: 'referral', kind: 'select', requirement: 'none' },
|
|
48
|
+
],
|
|
49
|
+
// `🧩 Long forms - pre-defined cases` — the four-row eKYC form.
|
|
50
|
+
eKyc: [
|
|
51
|
+
{ key: 'idNumber', kind: 'text', requirement: 'required' },
|
|
52
|
+
{ key: 'email', kind: 'email', requirement: 'required' },
|
|
53
|
+
{ key: 'residence', kind: 'country', requirement: 'required' },
|
|
54
|
+
{ key: 'dob', kind: 'date', requirement: 'required' },
|
|
55
|
+
],
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* The "Forms and data entry - Optional / Required" pair documents the SAME
|
|
60
|
+
* eKYC form with a different marker on each row — that is the whole point of
|
|
61
|
+
* the section, so the override is structure and lives here.
|
|
62
|
+
*/
|
|
63
|
+
const OPTIONAL_VARIANT: Record<string, FormsRequirement> = {
|
|
64
|
+
idNumber: 'none',
|
|
65
|
+
email: 'required',
|
|
66
|
+
residence: 'optional',
|
|
67
|
+
dob: 'optional',
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export interface FormsLongFormScreenProps
|
|
71
|
+
extends Omit<
|
|
72
|
+
PrizmaFormScreenProps,
|
|
73
|
+
'title' | 'subtitle' | 'ctaLabel' | 'verifiedLabel' | 'children' | 'navLabel'
|
|
74
|
+
> {
|
|
75
|
+
/** Module copy — this screen reads one `longForm.*` slice. */
|
|
76
|
+
strings: FormsStrings;
|
|
77
|
+
/** Which multi-field purple section to render. Default `eKyc`. */
|
|
78
|
+
preset?: FormsLongFormPreset;
|
|
79
|
+
/** Which treatment of that section. Default `default`. */
|
|
80
|
+
state?: FormsLongFormState;
|
|
81
|
+
/** Value per row key. Text/date rows take the literal value; `country` rows
|
|
82
|
+
* take an ISO code; `select` rows take an option value. */
|
|
83
|
+
values?: Record<string, string>;
|
|
84
|
+
/** Which row carries the focus ring on the `focused` section. */
|
|
85
|
+
focusedField?: string;
|
|
86
|
+
/** Option rows for the `select` kinds. Runtime data, never copy — the host
|
|
87
|
+
* supplies its own localized list. */
|
|
88
|
+
options?: Record<string, PrizmaDropdownOption[]>;
|
|
89
|
+
/** The selectable countries for `country` rows. */
|
|
90
|
+
countries?: PrizmaCountry[];
|
|
91
|
+
screenId?: string;
|
|
92
|
+
overrides?: PrizmaScreenOverrides;
|
|
93
|
+
onAction?: PrizmaScreenActionHandler;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Forms & Data Entry — the multi-field screen, built on the Form archetype
|
|
98
|
+
* (GUIDELINES.md §6-E, `PrizmaFormScreen`).
|
|
99
|
+
*
|
|
100
|
+
* ONE screen for the module's seven multi-field purple sections: `forms.name`,
|
|
101
|
+
* `longform.customizable` (default + filled) and the whole
|
|
102
|
+
* `🧩 Long forms - pre-defined cases` group (`longform.default` / `.focused` /
|
|
103
|
+
* `.filled` / `.loading` plus the "Optional / Required" documentation pair).
|
|
104
|
+
* They share the identical skeleton — nav → Title (H2 + the "All fields marked
|
|
105
|
+
* with * are required." H5) → Spacing/32 → a stack of labelled Core inputs →
|
|
106
|
+
* primary CTA → tag — and differ in which rows the stack carries and what state
|
|
107
|
+
* each row is in.
|
|
108
|
+
*
|
|
109
|
+
* Four things are deliberate:
|
|
110
|
+
*
|
|
111
|
+
* 1. Rows are UNCONTROLLED (`defaultValue`). `readOnly` would paint Core's
|
|
112
|
+
* DISABLED grey on the six sections Figma draws white (DEVIATIONS #PI-6);
|
|
113
|
+
* `disabled` is set ONLY on `loading`, the one section Figma actually greys
|
|
114
|
+
* — and it greys every row at once, exactly as drawn.
|
|
115
|
+
* 2. The focused row gets Core's OWN `--focused` modifier through `className`
|
|
116
|
+
* (DEVIATIONS #PI-7). Its clear ✕ needs one module rule to appear, because
|
|
117
|
+
* Core reveals the button under a live `:focus-within` a static spec state
|
|
118
|
+
* can never satisfy — see `FormsLayout.css`, which only lifts Core's
|
|
119
|
+
* `display: none` and re-styles nothing (the #CURP-3 idiom).
|
|
120
|
+
* 3. The in-flight spinner rides the CTA (`ctaLoading`), never a field
|
|
121
|
+
* (DEVIATIONS #PI-5) — without it `loading` would render as `filled`.
|
|
122
|
+
* 4. The required marker rides Core's `requiredHint` so it stays localizable.
|
|
123
|
+
* Core has no OPTIONAL counterpart, so "(Optional)" is composed into the
|
|
124
|
+
* label string instead — DEVIATIONS #FDE-4.
|
|
125
|
+
*
|
|
126
|
+
* The stack SCROLLS inside the content column through the archetype's own
|
|
127
|
+
* `scrollFields` prop: the profile preset is five 78px rows plus gaps and does
|
|
128
|
+
* not fit a 390×844 frame, and screens never reflow (#17). The variant carries
|
|
129
|
+
* the `overflow-y: auto` AND the Spacing/16 margin below the clipped stack, so
|
|
130
|
+
* the sliced last row is followed by clear surface instead of running flush
|
|
131
|
+
* into the CTA band — the half a module stylesheet kept losing. It is a no-op
|
|
132
|
+
* on the short `name` preset, whose rows never overflow. DEVIATIONS #DSC-2,
|
|
133
|
+
* restating #CURP-1.
|
|
134
|
+
*/
|
|
135
|
+
export const FormsLongFormScreen = forwardRef<HTMLDivElement, FormsLongFormScreenProps>(
|
|
136
|
+
(
|
|
137
|
+
{
|
|
138
|
+
strings,
|
|
139
|
+
preset = 'eKyc',
|
|
140
|
+
state = 'default',
|
|
141
|
+
values,
|
|
142
|
+
focusedField,
|
|
143
|
+
options,
|
|
144
|
+
countries,
|
|
145
|
+
screenId = `forms-long-form-${preset}-${state}`,
|
|
146
|
+
className,
|
|
147
|
+
overrides,
|
|
148
|
+
onAction,
|
|
149
|
+
...shell
|
|
150
|
+
},
|
|
151
|
+
ref,
|
|
152
|
+
) => {
|
|
153
|
+
const copy = strings.longForm[preset];
|
|
154
|
+
const busy = state === 'loading';
|
|
155
|
+
const countryList = countries ?? [];
|
|
156
|
+
|
|
157
|
+
// The Optional / Required pair documents the eKYC form specifically; no
|
|
158
|
+
// other preset draws it, so the override never leaks to a preset whose
|
|
159
|
+
// Figma has no such section.
|
|
160
|
+
const applyOptional = state === 'optional' && preset === 'eKyc';
|
|
161
|
+
const rows = PRESET_ROWS[preset].map((row) =>
|
|
162
|
+
applyOptional && OPTIONAL_VARIANT[row.key]
|
|
163
|
+
? { ...row, requirement: OPTIONAL_VARIANT[row.key] }
|
|
164
|
+
: row,
|
|
165
|
+
);
|
|
166
|
+
|
|
167
|
+
/** Core appends `requiredHint` itself; "(Optional)" has no Core slot. */
|
|
168
|
+
const labelFor = (row: FormsLongFormRow) => {
|
|
169
|
+
const base = copy.fields[row.key]?.label ?? '';
|
|
170
|
+
return row.requirement === 'optional' ? `${base} ${strings.optionalHint}` : base;
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
const renderRow = (row: FormsLongFormRow) => {
|
|
174
|
+
const fieldCopy = copy.fields[row.key];
|
|
175
|
+
const label = labelFor(row);
|
|
176
|
+
const required = row.requirement === 'required';
|
|
177
|
+
const value = values?.[row.key] ?? '';
|
|
178
|
+
const focused = !busy && focusedField === row.key;
|
|
179
|
+
|
|
180
|
+
switch (row.kind) {
|
|
181
|
+
case 'country':
|
|
182
|
+
return (
|
|
183
|
+
<PrizmaDropdown
|
|
184
|
+
key={row.key}
|
|
185
|
+
label={label}
|
|
186
|
+
required={required}
|
|
187
|
+
requiredHint={strings.requiredHint}
|
|
188
|
+
placeholder={fieldCopy?.placeholder}
|
|
189
|
+
options={countryList.map((c) => ({ value: c.code, label: c.name }))}
|
|
190
|
+
value={value || null}
|
|
191
|
+
searchable
|
|
192
|
+
searchPlaceholder={copy.searchPlaceholder}
|
|
193
|
+
disabled={busy}
|
|
194
|
+
forceState={focused ? 'focused' : undefined}
|
|
195
|
+
renderLeading={(option) => {
|
|
196
|
+
const match = countryList.find((c) => c.code === option.value);
|
|
197
|
+
return match ? <PrizmaCountryFlag country={match} /> : null;
|
|
198
|
+
}}
|
|
199
|
+
/>
|
|
200
|
+
);
|
|
201
|
+
case 'select':
|
|
202
|
+
return (
|
|
203
|
+
<PrizmaDropdown
|
|
204
|
+
key={row.key}
|
|
205
|
+
label={label}
|
|
206
|
+
required={required}
|
|
207
|
+
requiredHint={strings.requiredHint}
|
|
208
|
+
placeholder={fieldCopy?.placeholder}
|
|
209
|
+
options={options?.[row.key] ?? []}
|
|
210
|
+
value={value || null}
|
|
211
|
+
disabled={busy}
|
|
212
|
+
forceState={focused ? 'focused' : undefined}
|
|
213
|
+
/>
|
|
214
|
+
);
|
|
215
|
+
case 'date':
|
|
216
|
+
return (
|
|
217
|
+
<PrizmaDateField
|
|
218
|
+
key={row.key}
|
|
219
|
+
className={focused ? 'prizma-input-datefield--focused' : undefined}
|
|
220
|
+
label={label}
|
|
221
|
+
required={required}
|
|
222
|
+
requiredHint={strings.requiredHint}
|
|
223
|
+
placeholder={fieldCopy?.placeholder}
|
|
224
|
+
defaultValue={value}
|
|
225
|
+
disabled={busy}
|
|
226
|
+
calendarLabel={copy.calendarLabel}
|
|
227
|
+
/>
|
|
228
|
+
);
|
|
229
|
+
default:
|
|
230
|
+
return (
|
|
231
|
+
<PrizmaTextField
|
|
232
|
+
key={row.key}
|
|
233
|
+
className={focused ? 'prizma-input-textfield--focused' : undefined}
|
|
234
|
+
label={label}
|
|
235
|
+
required={required}
|
|
236
|
+
requiredHint={strings.requiredHint}
|
|
237
|
+
placeholder={fieldCopy?.placeholder}
|
|
238
|
+
defaultValue={value}
|
|
239
|
+
type={row.kind === 'email' ? 'email' : 'text'}
|
|
240
|
+
inputMode={row.kind === 'email' ? 'email' : undefined}
|
|
241
|
+
autoComplete={row.kind === 'email' ? 'email' : 'off'}
|
|
242
|
+
autoCapitalize={row.kind === 'email' ? 'none' : undefined}
|
|
243
|
+
spellCheck={false}
|
|
244
|
+
disabled={busy}
|
|
245
|
+
/* Figma draws the clear ✕ only on the focused row of
|
|
246
|
+
`longform.focused`; every other row draws none. */
|
|
247
|
+
clearable={focused}
|
|
248
|
+
clearLabel={copy.clearLabel}
|
|
249
|
+
/>
|
|
250
|
+
);
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
return (
|
|
255
|
+
<PrizmaFormScreen
|
|
256
|
+
ref={ref}
|
|
257
|
+
className={[
|
|
258
|
+
'forms-long-form',
|
|
259
|
+
/* Scopes the ONE rule that lets Core's own clear ✕ paint on the
|
|
260
|
+
statically-focused row. See FormsLayout.css. */
|
|
261
|
+
state === 'focused' ? 'forms-long-form--focused' : '',
|
|
262
|
+
className,
|
|
263
|
+
]
|
|
264
|
+
.filter(Boolean)
|
|
265
|
+
.join(' ')}
|
|
266
|
+
title={copy.title}
|
|
267
|
+
subtitle={copy.subtitle}
|
|
268
|
+
ctaLabel={copy.ctaLabel}
|
|
269
|
+
/* `longform.default` and `longform.customizable`'s default section grey
|
|
270
|
+
the CTA until something is entered; `forms.name` draws it ENABLED on
|
|
271
|
+
the same empty form. Figma contradicts its own "optimistic rule"
|
|
272
|
+
sticky here, so each section is followed literally — DEVIATIONS
|
|
273
|
+
#FDE-3. */
|
|
274
|
+
ctaDisabled={state === 'default' && preset !== 'name'}
|
|
275
|
+
ctaLoading={busy}
|
|
276
|
+
ctaLoadingLabel={copy.ctaLoadingLabel}
|
|
277
|
+
/* The four- and five-row stacks are taller than the 844 frame; the
|
|
278
|
+
archetype's variant pans them and keeps Spacing/16 of clear surface
|
|
279
|
+
above the CTA. No module CSS re-declares this. */
|
|
280
|
+
scrollFields
|
|
281
|
+
verifiedLabel={strings.verifiedLabel}
|
|
282
|
+
navLabel={strings.navLabel}
|
|
283
|
+
screenId={screenId}
|
|
284
|
+
overrides={overrides}
|
|
285
|
+
onAction={onAction}
|
|
286
|
+
{...shell}
|
|
287
|
+
>
|
|
288
|
+
{rows.map(renderRow)}
|
|
289
|
+
</PrizmaFormScreen>
|
|
290
|
+
);
|
|
291
|
+
},
|
|
292
|
+
);
|
|
293
|
+
FormsLongFormScreen.displayName = 'FormsLongFormScreen';
|
|
294
|
+
|
|
295
|
+
export default FormsLongFormScreen;
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
// Forms & Data Entry — copy contract.
|
|
2
|
+
//
|
|
3
|
+
// Figma: `🧩 Forms and Data entry (Input type) - Screens specs + Localization`
|
|
4
|
+
// (N6otHMuY2Hha5eBqRz0uC3, page 1:222). Two top-level groups of purple parent
|
|
5
|
+
// sections:
|
|
6
|
+
//
|
|
7
|
+
// 🧩 Forms and Data entry (Input type)
|
|
8
|
+
// forms.idnumber · forms.cpf · forms.email · forms.phone · forms.text
|
|
9
|
+
// forms.dob (default / typing / iconButton†)
|
|
10
|
+
// forms.country (Residence: default / open / typing†) · Forms.nationality
|
|
11
|
+
// forms.select · forms.yesNo · forms.country (question)
|
|
12
|
+
// forms.name · longform.customizable
|
|
13
|
+
// forms.success · forms.error · forms.inputerror (empty / invalid)
|
|
14
|
+
//
|
|
15
|
+
// 🧩 Long forms - pre-defined cases
|
|
16
|
+
// forms.longform.default / longform.focused / longform.filled /
|
|
17
|
+
// longform.loading / "Forms and data entry - Optional / Required"
|
|
18
|
+
//
|
|
19
|
+
// This is the archetype-E showcase: every section is nav → title block →
|
|
20
|
+
// labelled field stack → CTA → verified tag (GUIDELINES §6-E), and the sections
|
|
21
|
+
// differ only in WHICH Core input sits in the stack and in what state. The
|
|
22
|
+
// module therefore ships four screen families rather than nineteen screens:
|
|
23
|
+
// one for a single field, one for a choice field, one for a multi-field form,
|
|
24
|
+
// plus the two verdicts.
|
|
25
|
+
//
|
|
26
|
+
// † Two sections have no state of their own, because the ONE thing that makes
|
|
27
|
+
// each of them a distinct frame is a piece of Core that does not exist yet: the
|
|
28
|
+
// open date-picker panel (`forms.DOB.iconButton`) and a search bar carrying a
|
|
29
|
+
// typed query (`forms.residencetyping`). Both are logged as Core requests —
|
|
30
|
+
// DEVIATIONS #FDE-5 and #FDE-6 — and neither is faked here: a card that repeats
|
|
31
|
+
// its neighbour is the defect, not the coverage. See the state unions below.
|
|
32
|
+
//
|
|
33
|
+
// No hardcoded English anywhere in a screen: every visible string arrives here,
|
|
34
|
+
// so the host's locale pack drives the module (the Figma file ships ES + PT
|
|
35
|
+
// columns beside the EN one).
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Which single-field section `FormsFieldScreen` renders. Each key names one
|
|
39
|
+
* purple section and picks the Core input the section draws:
|
|
40
|
+
* - `idNumber` · `cpf` — `PrizmaTextField`
|
|
41
|
+
* - `email` — `PrizmaTextField` with e-mail semantics
|
|
42
|
+
* - `dob` — `PrizmaDateField`
|
|
43
|
+
* - `phone` — `PrizmaCombined` (country dial code + number)
|
|
44
|
+
* - `text` — `PrizmaMultiline`
|
|
45
|
+
*/
|
|
46
|
+
export type FormsFieldKey = 'idNumber' | 'cpf' | 'email' | 'dob' | 'phone' | 'text';
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The field treatments the single-field sections draw.
|
|
50
|
+
*
|
|
51
|
+
* `forms.DOB.iconButton` (2:12185) has NO state here, deliberately. That frame
|
|
52
|
+
* draws the date field focused with an OPEN date-picker panel over it — the
|
|
53
|
+
* "March 2024" month grid instanced beside the frame as `Date Picker`
|
|
54
|
+
* (2:5458). Core ships no calendar: `PrizmaDateField`'s contract is that "the
|
|
55
|
+
* date PICKER is the consumer's — the OS picker by contract; the field never
|
|
56
|
+
* renders one", and it exposes no `forceCalendarOpen` hook. Composing a month
|
|
57
|
+
* grid here would be inventing a primitive, and shipping the state without one
|
|
58
|
+
* left a card that was `focused` with a different name. The state returns the
|
|
59
|
+
* day Core gains the panel — DEVIATIONS #FDE-5.
|
|
60
|
+
*
|
|
61
|
+
* - `default` — resting field, placeholder visible, CTA enabled
|
|
62
|
+
* - `focused` — `forms.DOB.typing`: blue focus ring with a partial value
|
|
63
|
+
* - `filled` — a complete value on the resting surface
|
|
64
|
+
* - `emptyError` — `forms.IDnumber.error` (2443:68470): empty NEGATIVE field,
|
|
65
|
+
* "Enter a valid ID number.", CTA greyed. This is the
|
|
66
|
+
* canvas sticky's "optimistic rule": the CTA starts enabled
|
|
67
|
+
* and only greys after a submit with nothing entered.
|
|
68
|
+
* - `invalidError` — `forms.IDnumber.error` (2443:69116): a typed value that
|
|
69
|
+
* failed validation, "Invalid ID number", CTA greyed
|
|
70
|
+
*/
|
|
71
|
+
export type FormsFieldState =
|
|
72
|
+
| 'default'
|
|
73
|
+
| 'focused'
|
|
74
|
+
| 'filled'
|
|
75
|
+
| 'emptyError'
|
|
76
|
+
| 'invalidError';
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Which choice section `FormsChoiceScreen` renders — the label above the
|
|
80
|
+
* dropdown is what separates them:
|
|
81
|
+
* - `residence` — `forms.country` / `forms.Residence` ("Country of residence")
|
|
82
|
+
* - `nationality` — `Forms.nationality` ("Nationality")
|
|
83
|
+
* - `question` — `forms.select` / `forms.yesNo` / `forms.country` question
|
|
84
|
+
* variant ("Enter your question")
|
|
85
|
+
*/
|
|
86
|
+
export type FormsChoiceKey = 'residence' | 'nationality' | 'question';
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Which option list the open menu carries. The three question sections draw an
|
|
90
|
+
* IDENTICAL closed field and differ only here, so the option set is its own
|
|
91
|
+
* axis rather than three screens:
|
|
92
|
+
* - `countries` — flag + country name, searchable (`forms.country`)
|
|
93
|
+
* - `generic` — "Option 1…5", no search (`forms.select`)
|
|
94
|
+
* - `yesNo` — two rows, no search (`forms.yesNo`)
|
|
95
|
+
*/
|
|
96
|
+
export type FormsChoiceOptionSet = 'countries' | 'generic' | 'yesNo';
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* - `closed` — resting trigger with the placeholder
|
|
100
|
+
* - `open` — the menu drawn over the form, nothing selected
|
|
101
|
+
*
|
|
102
|
+
* `forms.residencetyping` (68:31241) has NO state here, deliberately. It is the
|
|
103
|
+
* TYPING frame: the same open menu as `forms.Residenceopen`, distinguished by
|
|
104
|
+
* the search bar holding "Por" with a live caret and an ✕ replacing the
|
|
105
|
+
* magnifier. `PrizmaDropdown` ships documentation-only `forceState` and
|
|
106
|
+
* `forceOpen` but nothing that seeds the query, so the state rendered with an
|
|
107
|
+
* EMPTY search bar — `open` under another name. Faking it would mean
|
|
108
|
+
* hand-rolling a search bar the component already owns. The state returns the
|
|
109
|
+
* day Core gains a `searchValue` — DEVIATIONS #FDE-6.
|
|
110
|
+
*/
|
|
111
|
+
export type FormsChoiceState = 'closed' | 'open';
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* The multi-field sections `FormsLongFormScreen` renders:
|
|
115
|
+
* - `name` — `forms.name`: full / first / last name
|
|
116
|
+
* - `profile` — `longform.customizable`: the five-field customizable form
|
|
117
|
+
* - `eKyc` — the `🧩 Long forms - pre-defined cases` section: ID number,
|
|
118
|
+
* e-mail, country of residence, date of birth
|
|
119
|
+
*/
|
|
120
|
+
export type FormsLongFormPreset = 'name' | 'profile' | 'eKyc';
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* - `default` — every field empty
|
|
124
|
+
* - `focused` — `longform.focused`: one field carries the focus ring, an
|
|
125
|
+
* earlier one is already filled
|
|
126
|
+
* - `filled` — every field carries a value
|
|
127
|
+
* - `loading` — `longform.loading`: the whole form greyed, spinner in the CTA
|
|
128
|
+
* - `optional` — the "Optional / Required" documentation pair: the same form
|
|
129
|
+
* with mixed required and optional markers
|
|
130
|
+
*/
|
|
131
|
+
export type FormsLongFormState =
|
|
132
|
+
| 'default'
|
|
133
|
+
| 'focused'
|
|
134
|
+
| 'filled'
|
|
135
|
+
| 'loading'
|
|
136
|
+
| 'optional';
|
|
137
|
+
|
|
138
|
+
/** Copy for one single-field section. */
|
|
139
|
+
export interface FormsFieldCopy {
|
|
140
|
+
/** H2 ("Enter your title", "Enter your email", "Enter your phone number"). */
|
|
141
|
+
title: string;
|
|
142
|
+
/** H5 below the title, where the section draws one. */
|
|
143
|
+
subtitle?: string;
|
|
144
|
+
/** The VISIBLE label row above the field. Unlike Phone Input and CURP
|
|
145
|
+
* (DEVIATIONS #PI-4, #EI-2), every section in this module draws one. */
|
|
146
|
+
label: string;
|
|
147
|
+
/** Field placeholder. The date field takes Core's own DD/MM/YYYY mask. */
|
|
148
|
+
placeholder?: string;
|
|
149
|
+
/** Primary CTA ("Continue"). */
|
|
150
|
+
ctaLabel: string;
|
|
151
|
+
/** Accessible busy copy, for hosts that put the field behind a request. */
|
|
152
|
+
ctaLoadingLabel?: string;
|
|
153
|
+
/** Accessible name for the clear (✕) affordance. */
|
|
154
|
+
clearLabel?: string;
|
|
155
|
+
/** Accessible name for the date field's calendar button (`dob` only). */
|
|
156
|
+
calendarLabel?: string;
|
|
157
|
+
/** Accessible name for the dial-code listbox (`phone` only). */
|
|
158
|
+
countryListLabel?: string;
|
|
159
|
+
/** Error row on `emptyError` ("Enter a valid ID number."). */
|
|
160
|
+
emptyErrorText?: string;
|
|
161
|
+
/** Error row on `invalidError` ("Invalid ID number"). */
|
|
162
|
+
invalidErrorText?: string;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/** Copy for one choice section. */
|
|
166
|
+
export interface FormsChoiceCopy {
|
|
167
|
+
title: string;
|
|
168
|
+
subtitle?: string;
|
|
169
|
+
/** The visible label above the dropdown. */
|
|
170
|
+
label: string;
|
|
171
|
+
/** Trigger placeholder ("Select an option"). */
|
|
172
|
+
placeholder: string;
|
|
173
|
+
/** Search-bar placeholder inside the menu ("Search for country"). */
|
|
174
|
+
searchPlaceholder?: string;
|
|
175
|
+
/** Accessible name for the search-clear button. */
|
|
176
|
+
clearSearchLabel?: string;
|
|
177
|
+
ctaLabel: string;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/** Copy for one field row of a multi-field form. Which rows a preset carries
|
|
181
|
+
* is STRUCTURE and lives in `FormsLongFormScreen`; only the words are here. */
|
|
182
|
+
export interface FormsLongFormFieldCopy {
|
|
183
|
+
label: string;
|
|
184
|
+
placeholder?: string;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/** Copy for one multi-field section. */
|
|
188
|
+
export interface FormsLongFormCopy {
|
|
189
|
+
title: string;
|
|
190
|
+
/** "All fields marked with * are required." */
|
|
191
|
+
subtitle?: string;
|
|
192
|
+
ctaLabel: string;
|
|
193
|
+
ctaLoadingLabel?: string;
|
|
194
|
+
/** One entry per row the preset draws — see `FormsLongFormScreen`. */
|
|
195
|
+
fields: Record<string, FormsLongFormFieldCopy>;
|
|
196
|
+
/** Accessible name for the clear (✕) affordance on the focused row. */
|
|
197
|
+
clearLabel?: string;
|
|
198
|
+
/** Accessible name for the calendar button on the date row. */
|
|
199
|
+
calendarLabel?: string;
|
|
200
|
+
/** Search-bar placeholder for the country row's menu. */
|
|
201
|
+
searchPlaceholder?: string;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export interface FormsStrings {
|
|
205
|
+
/** "verified by" attribution in the footer tag. */
|
|
206
|
+
verifiedLabel: string;
|
|
207
|
+
/** Accessible name for the logo nav row. */
|
|
208
|
+
navLabel?: string;
|
|
209
|
+
/**
|
|
210
|
+
* The required marker appended to a label ("*"). It rides Core's
|
|
211
|
+
* `requiredHint` prop so it stays localizable and so no module paints its
|
|
212
|
+
* own asterisk — the CURP-4 idiom.
|
|
213
|
+
*/
|
|
214
|
+
requiredHint: string;
|
|
215
|
+
/**
|
|
216
|
+
* The optional marker appended to a label ("(Optional)"). Core has a
|
|
217
|
+
* `requiredHint` but NO optional counterpart, so the marker is composed into
|
|
218
|
+
* the label string by the screen. See DEVIATIONS #FDE-4.
|
|
219
|
+
*/
|
|
220
|
+
optionalHint: string;
|
|
221
|
+
|
|
222
|
+
/** The single-field sections. */
|
|
223
|
+
fields: Record<FormsFieldKey, FormsFieldCopy>;
|
|
224
|
+
|
|
225
|
+
/** The choice sections. */
|
|
226
|
+
choice: Record<FormsChoiceKey, FormsChoiceCopy>;
|
|
227
|
+
|
|
228
|
+
/** The multi-field sections. */
|
|
229
|
+
longForm: Record<FormsLongFormPreset, FormsLongFormCopy>;
|
|
230
|
+
|
|
231
|
+
/** `forms.success` — a bare status mark over an H2, no CTA. */
|
|
232
|
+
success: {
|
|
233
|
+
title: string;
|
|
234
|
+
subtitle?: string;
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
/** `forms.error` — status mark, H2 and a "Try again" CTA. */
|
|
238
|
+
error: {
|
|
239
|
+
title: string;
|
|
240
|
+
subtitle?: string;
|
|
241
|
+
ctaLabel: string;
|
|
242
|
+
};
|
|
243
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
PrizmaProcessingScreen,
|
|
4
|
+
type PrizmaProcessingScreenProps,
|
|
5
|
+
} from './ProcessingScreen';
|
|
6
|
+
import type { PrizmaScreenActionHandler, PrizmaScreenOverrides } from './types';
|
|
7
|
+
import type { FormsStrings } from './FormsStrings';
|
|
8
|
+
import './ScreenLayout.css';
|
|
9
|
+
|
|
10
|
+
export interface FormsSuccessScreenProps
|
|
11
|
+
extends Omit<
|
|
12
|
+
PrizmaProcessingScreenProps,
|
|
13
|
+
'status' | 'title' | 'subtitle' | 'verifiedLabel' | 'navLabel'
|
|
14
|
+
> {
|
|
15
|
+
/** Module copy — this screen reads the `success` slice. */
|
|
16
|
+
strings: FormsStrings;
|
|
17
|
+
screenId?: string;
|
|
18
|
+
overrides?: PrizmaScreenOverrides;
|
|
19
|
+
onAction?: PrizmaScreenActionHandler;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Forms & Data Entry — the success verdict, built on the Processing archetype
|
|
24
|
+
* (GUIDELINES.md §6-C, `PrizmaProcessingScreen`).
|
|
25
|
+
*
|
|
26
|
+
* Figma: the purple `forms.success` section (3:18734). A centred status mark
|
|
27
|
+
* over a bare H2 ("Success!") and then NOTHING — the CTA slot is empty all the
|
|
28
|
+
* way down to the anchored tag, while the sibling `forms.error` section
|
|
29
|
+
* (2014:21506) draws "Try again" in that same slot.
|
|
30
|
+
*
|
|
31
|
+
* §6-F reserves the Result archetype for "every verdict screen that needs a
|
|
32
|
+
* button" and keeps C as the pure no-button case, so the module's two verdicts
|
|
33
|
+
* legitimately sit on two different archetypes — the #EI-4 split, applied
|
|
34
|
+
* unchanged.
|
|
35
|
+
*
|
|
36
|
+
* The mark is Core's outline status icon via `PrizmaTitle`'s icon slot; the
|
|
37
|
+
* module Figma still draws the two-tone filled disc, one icon sweep behind
|
|
38
|
+
* (DEVIATIONS #15, unchanged here).
|
|
39
|
+
*/
|
|
40
|
+
export const FormsSuccessScreen = forwardRef<HTMLDivElement, FormsSuccessScreenProps>(
|
|
41
|
+
(
|
|
42
|
+
{
|
|
43
|
+
strings,
|
|
44
|
+
screenId = 'forms-success',
|
|
45
|
+
overrides,
|
|
46
|
+
onAction,
|
|
47
|
+
...shell
|
|
48
|
+
},
|
|
49
|
+
ref,
|
|
50
|
+
) => (
|
|
51
|
+
<PrizmaProcessingScreen
|
|
52
|
+
ref={ref}
|
|
53
|
+
status="success"
|
|
54
|
+
title={strings.success.title}
|
|
55
|
+
subtitle={strings.success.subtitle}
|
|
56
|
+
verifiedLabel={strings.verifiedLabel}
|
|
57
|
+
navLabel={strings.navLabel}
|
|
58
|
+
screenId={screenId}
|
|
59
|
+
overrides={overrides}
|
|
60
|
+
onAction={onAction}
|
|
61
|
+
{...shell}
|
|
62
|
+
/>
|
|
63
|
+
),
|
|
64
|
+
);
|
|
65
|
+
FormsSuccessScreen.displayName = 'FormsSuccessScreen';
|
|
66
|
+
|
|
67
|
+
export default FormsSuccessScreen;
|