@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
package/README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# @incodetech/prizma-core-screens
|
|
2
|
+
|
|
3
|
+
SDK module screens — composed, **responsive**, brand-themeable React screens
|
|
4
|
+
(Face Capture, ID Capture, Phone Input, …) built entirely from
|
|
5
|
+
`@incodetech/prizma-core-web` components and `@incodetech/prizma-core-tokens`.
|
|
6
|
+
|
|
7
|
+
This package is the **pattern/product tier** of Prizma Core: screens are
|
|
8
|
+
web-only compositions and deliberately do NOT enter the three-platform parity
|
|
9
|
+
regime that governs `prizma-core-web` components.
|
|
10
|
+
|
|
11
|
+
## What a screen is
|
|
12
|
+
|
|
13
|
+
- A pure, stateless React component: `({ strings, overrides?, onAction? }) => JSX`.
|
|
14
|
+
- Copy always arrives via `strings` props — nothing hardcoded (i18n-ready).
|
|
15
|
+
- Styled with plain CSS bound to `--prizma-*` token variables; zero `!important`.
|
|
16
|
+
- Brand-reactive through `applyPrizmaTheme({ seed })` from `prizma-core-web` —
|
|
17
|
+
no bespoke theming layer.
|
|
18
|
+
- Dark mode via `[data-prizma-theme='dark']`, same as every Core component.
|
|
19
|
+
- Sizing: screens are authored at the **390×844** design reference and the HOST
|
|
20
|
+
scales them to fit its container (`transform: scale()`), the way Studio's
|
|
21
|
+
device frames and the hub's preview cards already work. Height is fluid and
|
|
22
|
+
width grows/re-centers above 390, but layout never reflows below it — Core's
|
|
23
|
+
fixed-width `PrizmaTag` (340) and `PrizmaSelfieCapture` (335) make ~388px a
|
|
24
|
+
hard floor, and scaling means nothing ever clips. Owner decision 2026-08-17
|
|
25
|
+
(DEVIATIONS.md #17). Do NOT add fixed-width breakpoint variants of a screen.
|
|
26
|
+
- All visual assets (rings, silhouettes, frames) are inline SVG components —
|
|
27
|
+
vector, tintable, no host-app `public/` dependencies.
|
|
28
|
+
|
|
29
|
+
## Structure
|
|
30
|
+
|
|
31
|
+
`src/` is **flat** — `scripts/exports-map.mjs` globs top-level `src/*.tsx` and
|
|
32
|
+
`src/*.css` to generate the package's `exports` map and aggregate stylesheet, so
|
|
33
|
+
subfolders would be published as nothing. Files group by name prefix instead:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
src/
|
|
37
|
+
ScreenShell/ScreenNav + the archetype *Screen.tsx templates
|
|
38
|
+
the foundation: shell, nav, CTA/footer spacing, vignette
|
|
39
|
+
ScreenLayout.css THE archetype spacing layer (§5) — nothing else declares it
|
|
40
|
+
<Module><X>Screen.tsx one file per module screen, flat PascalCase
|
|
41
|
+
<Module>Strings.ts the module's copy contract (props, no English)
|
|
42
|
+
<Module>Layout.css module-only layout additions, if any
|
|
43
|
+
flows.ts per-module screen sequences (powers the FlowPlayer prototypes)
|
|
44
|
+
GUIDELINES.md the compiled screen-construction rulebook (from Incode Studio)
|
|
45
|
+
DEVIATIONS.md every guidelines-vs-design-system conflict and its resolution
|
|
46
|
+
FIGMA-SOURCES.md the authoritative design file per SDK module
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Rules for adding screens
|
|
50
|
+
|
|
51
|
+
1. Compose ONLY from `src/foundation/` templates + `prizma-core-web` components
|
|
52
|
+
+ `prizma-core-icons`. Never invent a new primitive in a module folder.
|
|
53
|
+
2. Every capture screen composes Core's capture components — `PrizmaSelfieCapture`,
|
|
54
|
+
or `PrizmaIdCapture` (`mode="overlay"`, `scrim`) inside a dark `ScreenShell`.
|
|
55
|
+
NEVER re-create a window, scrim, overlay geometry or encrypted row. The local
|
|
56
|
+
`CaptureOverlay` / `ViewfinderScreen` are deprecated re-implementations kept
|
|
57
|
+
only until the wave completes (DEVIATIONS #F-26).
|
|
58
|
+
3. Spacing/typography come from the archetype templates, never re-declared.
|
|
59
|
+
4. Where `GUIDELINES.md` and the Prizma design system disagree, the design
|
|
60
|
+
system wins — and the conflict is logged in `DEVIATIONS.md`. Never silently.
|
|
61
|
+
5. Build only the screens inside the **purple parent section** of the module's
|
|
62
|
+
Figma file.
|
|
63
|
+
|
|
64
|
+
## Build
|
|
65
|
+
|
|
66
|
+
`npm run build` = `tsc` → `dist/` + CSS/asset copy + exports-map & aggregate
|
|
67
|
+
drift checks (same contract as `prizma-core-web`). Consumers import tokens once
|
|
68
|
+
(`@incodetech/prizma-core-tokens/css`), then `styles.css` or per-screen sheets.
|
|
69
|
+
|
|
70
|
+
The build also stamps `'use client'` onto every `src/*.tsx`-derived module in
|
|
71
|
+
`dist/`, so screens import straight into a Next App Router page. `flows.ts`,
|
|
72
|
+
`types.ts` and the `*Strings.ts` deliberately do NOT get it — they are data, and
|
|
73
|
+
the build fails if one of them ends up carrying it. See `prizma-core-web`'s
|
|
74
|
+
README § React Server Components.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/* CaptureOverlay — the one shared capture vignette (GUIDELINES.md §6-D, §7).
|
|
2
|
+
*
|
|
3
|
+
* The transparent window carries the scrim as an oversized box-shadow, so the
|
|
4
|
+
* dimmed surround always hugs the window's rounded geometry. Hardcoded values
|
|
5
|
+
* below are geometry fixed by design (verified absent from the token set):
|
|
6
|
+
* the 2000px scrim spread, the rgba(0,0,0,.8) scrim, the 35%-white default
|
|
7
|
+
* border, and the ID-1 card aspect ratio.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
.prizma-capture-overlay {
|
|
11
|
+
position: relative;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
flex-shrink: 0;
|
|
14
|
+
border-radius: var(--prizma-border-radius-medium);
|
|
15
|
+
border: 4px solid rgba(255, 255, 255, 0.35); /* hardcoded — Figma overlay frame, no token */
|
|
16
|
+
box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.8); /* hardcoded — the vignette scrim, no token */
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Ring (face): 342×342 at the 390 reference → 87.7cqw, capped at design size. */
|
|
20
|
+
.prizma-capture-overlay--ring {
|
|
21
|
+
width: min(87.7cqw, 342px);
|
|
22
|
+
aspect-ratio: 1;
|
|
23
|
+
border-radius: var(--prizma-border-radius-full);
|
|
24
|
+
margin-inline: auto;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Landscape (ID card): full content width, ID-1 card ratio. */
|
|
28
|
+
.prizma-capture-overlay--landscape {
|
|
29
|
+
width: 100%;
|
|
30
|
+
aspect-ratio: 1.586; /* hardcoded — ISO/IEC 7810 ID-1 card ratio */
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* Portrait (document / proof of address): full content width, letter-ish ratio. */
|
|
34
|
+
.prizma-capture-overlay--portrait {
|
|
35
|
+
width: 100%;
|
|
36
|
+
aspect-ratio: 0.72; /* hardcoded — Studio portrait document frame ratio */
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.prizma-capture-overlay--focused {
|
|
40
|
+
border-color: var(--prizma-border-status-focus);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.prizma-capture-overlay--success {
|
|
44
|
+
border-color: var(--prizma-border-status-positive-static);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Window content (camera feed / captured still) fills the window. */
|
|
48
|
+
.prizma-capture-overlay > img,
|
|
49
|
+
.prizma-capture-overlay > video {
|
|
50
|
+
position: absolute;
|
|
51
|
+
inset: 0;
|
|
52
|
+
width: 100%;
|
|
53
|
+
height: 100%;
|
|
54
|
+
object-fit: cover;
|
|
55
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React, { type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
2
|
+
import './CaptureOverlay.css';
|
|
3
|
+
export type PrizmaCaptureOverlayShape = 'ring' | 'portrait' | 'landscape';
|
|
4
|
+
export type PrizmaCaptureOverlayState = 'default' | 'focused' | 'success';
|
|
5
|
+
export interface PrizmaCaptureOverlayProps extends ComponentPropsWithoutRef<'div'> {
|
|
6
|
+
/** Window geometry: `ring` (face, circular), `landscape` (ID card),
|
|
7
|
+
* `portrait` (document / proof of address). */
|
|
8
|
+
shape: PrizmaCaptureOverlayShape;
|
|
9
|
+
/** Border treatment: `default` (35% white), `focused` (focus token),
|
|
10
|
+
* `success` (positive token). */
|
|
11
|
+
state?: PrizmaCaptureOverlayState;
|
|
12
|
+
/** Content inside the transparent window (camera feed / captured still). */
|
|
13
|
+
children?: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated DO NOT USE — scheduled for removal. Use Core instead:
|
|
17
|
+
* `PrizmaIdCapture` (`type="id" | "passport" | "poa"`, `mode="overlay"`,
|
|
18
|
+
* `scrim`) or `PrizmaSelfieCapture`.
|
|
19
|
+
*
|
|
20
|
+
* This component was written from the Studio-era guidelines' description of the
|
|
21
|
+
* capture vignette without first checking that the design system already ships
|
|
22
|
+
* it. It does, and better: Core's scrim is
|
|
23
|
+
* `box-shadow: 0 0 0 200vmax var(--prizma-surface-neutral-900-80-static)`
|
|
24
|
+
* (tokenized, viewport-relative) and it carries the real id-h / id-v /
|
|
25
|
+
* passport-h / passport-v / glare geometry, while this file hardcodes
|
|
26
|
+
* `rgba(0,0,0,.8)` at a fixed 2000px spread over three generic shapes.
|
|
27
|
+
*
|
|
28
|
+
* Keeping a local re-implementation of a Core primitive is exactly the drift
|
|
29
|
+
* this package exists to end. Zero modules use it (face-capture and face-match
|
|
30
|
+
* use `PrizmaSelfieCapture`; document-capture uses `PrizmaIdCapture`).
|
|
31
|
+
* DEVIATIONS.md #F-26.
|
|
32
|
+
*/
|
|
33
|
+
export declare const PrizmaCaptureOverlay: React.ForwardRefExoticComponent<PrizmaCaptureOverlayProps & React.RefAttributes<HTMLDivElement>>;
|
|
34
|
+
export default PrizmaCaptureOverlay;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import './CaptureOverlay.css';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated DO NOT USE — scheduled for removal. Use Core instead:
|
|
7
|
+
* `PrizmaIdCapture` (`type="id" | "passport" | "poa"`, `mode="overlay"`,
|
|
8
|
+
* `scrim`) or `PrizmaSelfieCapture`.
|
|
9
|
+
*
|
|
10
|
+
* This component was written from the Studio-era guidelines' description of the
|
|
11
|
+
* capture vignette without first checking that the design system already ships
|
|
12
|
+
* it. It does, and better: Core's scrim is
|
|
13
|
+
* `box-shadow: 0 0 0 200vmax var(--prizma-surface-neutral-900-80-static)`
|
|
14
|
+
* (tokenized, viewport-relative) and it carries the real id-h / id-v /
|
|
15
|
+
* passport-h / passport-v / glare geometry, while this file hardcodes
|
|
16
|
+
* `rgba(0,0,0,.8)` at a fixed 2000px spread over three generic shapes.
|
|
17
|
+
*
|
|
18
|
+
* Keeping a local re-implementation of a Core primitive is exactly the drift
|
|
19
|
+
* this package exists to end. Zero modules use it (face-capture and face-match
|
|
20
|
+
* use `PrizmaSelfieCapture`; document-capture uses `PrizmaIdCapture`).
|
|
21
|
+
* DEVIATIONS.md #F-26.
|
|
22
|
+
*/
|
|
23
|
+
export const PrizmaCaptureOverlay = forwardRef(({ shape, state = 'default', className, children, ...rest }, ref) => (_jsx("div", { ref: ref, className: [
|
|
24
|
+
'prizma-capture-overlay',
|
|
25
|
+
`prizma-capture-overlay--${shape}`,
|
|
26
|
+
`prizma-capture-overlay--${state}`,
|
|
27
|
+
className ?? '',
|
|
28
|
+
]
|
|
29
|
+
.filter(Boolean)
|
|
30
|
+
.join(' '), ...rest, children: children })));
|
|
31
|
+
PrizmaCaptureOverlay.displayName = 'PrizmaCaptureOverlay';
|
|
32
|
+
export default PrizmaCaptureOverlay;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
import { type PrizmaSelfieCaptureState } from '@incodetech/prizma-core-web/selfie-capture';
|
|
3
|
+
import { type PrizmaScreenShellProps } from './ScreenShell';
|
|
4
|
+
import type { PrizmaScreenActionHandler, PrizmaScreenChromeProps, PrizmaScreenOverrides } from './types';
|
|
5
|
+
import './ScreenLayout.css';
|
|
6
|
+
export interface PrizmaCaptureScreenProps extends Omit<PrizmaScreenShellProps, 'dark' | 'title'>, PrizmaScreenChromeProps {
|
|
7
|
+
/** Where the selfie flow is — forwarded to PrizmaSelfieCapture. */
|
|
8
|
+
state?: PrizmaSelfieCaptureState;
|
|
9
|
+
/**
|
|
10
|
+
* Is the LIVE CAMERA FEED open? Default `true`.
|
|
11
|
+
*
|
|
12
|
+
* Only feed-open screens count as "capture screens" (owner rule 2026-08-18):
|
|
13
|
+
* `uploading` / `processing` / `success` reuse this archetype's geometry —
|
|
14
|
+
* Core dissolves the stage into a spinner or status mark (DEVIATIONS #11) —
|
|
15
|
+
* but the camera is closed, so they are ordinary screens: header shown, and
|
|
16
|
+
* they follow the app theme instead of pinning light.
|
|
17
|
+
*/
|
|
18
|
+
cameraOpen?: boolean;
|
|
19
|
+
/** Live camera feed (<video>) or captured still (<img>). */
|
|
20
|
+
camera?: ReactNode;
|
|
21
|
+
/** Instruction line under the ring (e.g. "Look at the camera"). Rendered by
|
|
22
|
+
* PrizmaSelfieCapture as Headline/H4 at the designed offset — this is the
|
|
23
|
+
* ONLY place a capture instruction belongs (DEVIATIONS #12, #14). */
|
|
24
|
+
feedbackText?: string;
|
|
25
|
+
/** Manual capture mode — shutter button + manual instruction copy. */
|
|
26
|
+
isManual?: boolean;
|
|
27
|
+
manualFeedbackText?: string;
|
|
28
|
+
/** Per-state status copy (uploading / success / error / warning). */
|
|
29
|
+
statusLabels?: Partial<Record<PrizmaSelfieCaptureState, string>>;
|
|
30
|
+
/** "verified by" attribution copy for the footer tag. */
|
|
31
|
+
verifiedLabel: string;
|
|
32
|
+
navLabel?: string;
|
|
33
|
+
screenId?: string;
|
|
34
|
+
overrides?: PrizmaScreenOverrides;
|
|
35
|
+
onAction?: PrizmaScreenActionHandler;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Archetype B — Capture / Liveness ring (GUIDELINES.md §6-B).
|
|
39
|
+
* Nav → capture stage → tag pinned to the bottom. The ring offset (40), the
|
|
40
|
+
* instruction gap (32), the instruction typography (H4), the silhouette,
|
|
41
|
+
* and every verdict state live INSIDE Core's PrizmaSelfieCapture — this
|
|
42
|
+
* archetype adds no offsets of its own (DEVIATIONS #12, #14) and never
|
|
43
|
+
* re-implements any of it (§7).
|
|
44
|
+
*
|
|
45
|
+
* Core also models `uploading` / `success` as capture STATES (the stage
|
|
46
|
+
* dissolves into the spinner / status title in the ring's own slot), so
|
|
47
|
+
* loading and result screens of a capture module use this archetype too —
|
|
48
|
+
* not the centered Processing archetype (DEVIATIONS #11).
|
|
49
|
+
*/
|
|
50
|
+
export declare const PrizmaCaptureScreen: React.ForwardRefExoticComponent<PrizmaCaptureScreenProps & React.RefAttributes<HTMLDivElement>>;
|
|
51
|
+
export default PrizmaCaptureScreen;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { PrizmaSelfieCapture, } from '@incodetech/prizma-core-web/selfie-capture';
|
|
5
|
+
import { PrizmaTag } from '@incodetech/prizma-core-web/tag';
|
|
6
|
+
import { PrizmaScreenShell } from './ScreenShell';
|
|
7
|
+
import { PrizmaScreenNav } from './ScreenNav';
|
|
8
|
+
import './ScreenLayout.css';
|
|
9
|
+
/**
|
|
10
|
+
* Archetype B — Capture / Liveness ring (GUIDELINES.md §6-B).
|
|
11
|
+
* Nav → capture stage → tag pinned to the bottom. The ring offset (40), the
|
|
12
|
+
* instruction gap (32), the instruction typography (H4), the silhouette,
|
|
13
|
+
* and every verdict state live INSIDE Core's PrizmaSelfieCapture — this
|
|
14
|
+
* archetype adds no offsets of its own (DEVIATIONS #12, #14) and never
|
|
15
|
+
* re-implements any of it (§7).
|
|
16
|
+
*
|
|
17
|
+
* Core also models `uploading` / `success` as capture STATES (the stage
|
|
18
|
+
* dissolves into the spinner / status title in the ring's own slot), so
|
|
19
|
+
* loading and result screens of a capture module use this archetype too —
|
|
20
|
+
* not the centered Processing archetype (DEVIATIONS #11).
|
|
21
|
+
*/
|
|
22
|
+
export const PrizmaCaptureScreen = forwardRef(({ showHeader, showFooter = true, cameraOpen = true, state, camera, feedbackText, isManual, manualFeedbackText, statusLabels, verifiedLabel, navLabel, screenId, overrides, onAction, ...shell }, ref) => (
|
|
23
|
+
// Pin light ONLY while the camera feed is open: Core paints the live
|
|
24
|
+
// capture area with Static inks because "the capture screen stays WHITE in
|
|
25
|
+
// both modes — light is needed for the shot" (SelfieCapture.css, owner
|
|
26
|
+
// 2026-07-14). Feed-closed screens are ordinary screens and follow the app.
|
|
27
|
+
// DEVIATIONS #F-27.
|
|
28
|
+
_jsxs(PrizmaScreenShell, { ref: ref, theme: cameraOpen ? 'light' : undefined, ...shell, children: [_jsx(PrizmaScreenNav, { reserved: !(showHeader ?? (cameraOpen ? Boolean(overrides?.logo) : true)), logo: overrides?.logo, navLabel: navLabel }), _jsxs("div", { className: "prizma-screen-layout__content prizma-screen-layout__content--capture", children: [_jsx(PrizmaSelfieCapture, { state: state, camera: camera, showFeedback: Boolean(feedbackText ?? manualFeedbackText), feedbackText: feedbackText, isManual: isManual, manualFeedbackText: manualFeedbackText, statusLabels: statusLabels }), showFooter ? (_jsx("div", { className: "prizma-screen-layout__footer prizma-screen-layout__footer--pinned", children: _jsx(PrizmaTag, { label: verifiedLabel }) })) : null] })] })));
|
|
29
|
+
PrizmaCaptureScreen.displayName = 'PrizmaCaptureScreen';
|
|
30
|
+
export default PrizmaCaptureScreen;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type PrizmaFormScreenProps } from './FormScreen';
|
|
3
|
+
import type { PrizmaScreenActionHandler, PrizmaScreenOverrides } from './types';
|
|
4
|
+
import type { CurpStrings } from './CurpStrings';
|
|
5
|
+
import './ScreenLayout.css';
|
|
6
|
+
export interface CurpConfirmScreenProps extends Omit<PrizmaFormScreenProps, 'title' | 'subtitle' | 'ctaLabel' | 'verifiedLabel' | 'children' | 'navLabel'> {
|
|
7
|
+
/** Module copy — this screen reads the `confirm` slice. */
|
|
8
|
+
strings: CurpStrings;
|
|
9
|
+
/** The CURP the generator produced, read back for confirmation. */
|
|
10
|
+
value?: string;
|
|
11
|
+
screenId?: string;
|
|
12
|
+
overrides?: PrizmaScreenOverrides;
|
|
13
|
+
onAction?: PrizmaScreenActionHandler;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* CURP — the generated-CURP confirmation, built on the Form archetype
|
|
17
|
+
* (GUIDELINES.md §6-E, `PrizmaFormScreen`).
|
|
18
|
+
*
|
|
19
|
+
* Figma: the purple `CURP.Gene.confirm` section. Structurally it is
|
|
20
|
+
* `CurpEnterScreen` with one field and one CTA — nav → Title → Spacing/32 →
|
|
21
|
+
* field → CTA → tag — but the field is a READ-BACK of what the generator
|
|
22
|
+
* produced rather than an input, and there is no secondary action, so it stays
|
|
23
|
+
* its own screen rather than a sixth state of the entry form.
|
|
24
|
+
*
|
|
25
|
+
* The field is the one place in this module where Core's disabled surface is
|
|
26
|
+
* correct: Figma paints it `input/surface/disabled` grey with the value in full
|
|
27
|
+
* ink, which is exactly what `disabled` renders. (`readOnly` would paint the
|
|
28
|
+
* same grey and is the semantically better match, but it is the prop the pilot
|
|
29
|
+
* was told not to reach for by reflex — DEVIATIONS #PI-6 — and on a static spec
|
|
30
|
+
* screen the two are visually identical, so the plainer one is used.)
|
|
31
|
+
*/
|
|
32
|
+
export declare const CurpConfirmScreen: React.ForwardRefExoticComponent<CurpConfirmScreenProps & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
+
export default CurpConfirmScreen;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { PrizmaTextField } from '@incodetech/prizma-core-web/text-field';
|
|
5
|
+
import { PrizmaFormScreen } from './FormScreen';
|
|
6
|
+
import './ScreenLayout.css';
|
|
7
|
+
/**
|
|
8
|
+
* CURP — the generated-CURP confirmation, built on the Form archetype
|
|
9
|
+
* (GUIDELINES.md §6-E, `PrizmaFormScreen`).
|
|
10
|
+
*
|
|
11
|
+
* Figma: the purple `CURP.Gene.confirm` section. Structurally it is
|
|
12
|
+
* `CurpEnterScreen` with one field and one CTA — nav → Title → Spacing/32 →
|
|
13
|
+
* field → CTA → tag — but the field is a READ-BACK of what the generator
|
|
14
|
+
* produced rather than an input, and there is no secondary action, so it stays
|
|
15
|
+
* its own screen rather than a sixth state of the entry form.
|
|
16
|
+
*
|
|
17
|
+
* The field is the one place in this module where Core's disabled surface is
|
|
18
|
+
* correct: Figma paints it `input/surface/disabled` grey with the value in full
|
|
19
|
+
* ink, which is exactly what `disabled` renders. (`readOnly` would paint the
|
|
20
|
+
* same grey and is the semantically better match, but it is the prop the pilot
|
|
21
|
+
* was told not to reach for by reflex — DEVIATIONS #PI-6 — and on a static spec
|
|
22
|
+
* screen the two are visually identical, so the plainer one is used.)
|
|
23
|
+
*/
|
|
24
|
+
export const CurpConfirmScreen = forwardRef(({ strings, value, screenId = 'curp-confirm', overrides, onAction, ...shell }, ref) => (_jsx(PrizmaFormScreen, { ref: ref, title: strings.confirm.title, subtitle: strings.confirm.subtitle, ctaLabel: strings.confirm.ctaLabel, verifiedLabel: strings.verifiedLabel, navLabel: strings.navLabel, screenId: screenId, overrides: overrides, onAction: onAction, ...shell, children: _jsx(PrizmaTextField
|
|
25
|
+
/* No visible label row in the section — the title carries the meaning
|
|
26
|
+
(DEVIATIONS #PI-4). */
|
|
27
|
+
, { "aria-label": strings.confirm.fieldLabel, defaultValue: value ?? '', disabled: true }) })));
|
|
28
|
+
CurpConfirmScreen.displayName = 'CurpConfirmScreen';
|
|
29
|
+
export default CurpConfirmScreen;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type PrizmaFormScreenProps } from './FormScreen';
|
|
3
|
+
import type { PrizmaScreenActionHandler, PrizmaScreenOverrides } from './types';
|
|
4
|
+
import type { CurpEnterState, CurpStrings } from './CurpStrings';
|
|
5
|
+
import './ScreenLayout.css';
|
|
6
|
+
import './CurpLayout.css';
|
|
7
|
+
export interface CurpEnterScreenProps extends Omit<PrizmaFormScreenProps, 'title' | 'subtitle' | 'ctaLabel' | 'verifiedLabel' | 'children' | 'navLabel' | 'linkContent'> {
|
|
8
|
+
/** Module copy — this screen reads the `enter` slice. */
|
|
9
|
+
strings: CurpStrings;
|
|
10
|
+
/** Which purple `CURP.EnterCURP.*` section to render. Default `default`. */
|
|
11
|
+
state?: CurpEnterState;
|
|
12
|
+
/** The CURP as typed. Empty renders the placeholder. */
|
|
13
|
+
value?: string;
|
|
14
|
+
screenId?: string;
|
|
15
|
+
overrides?: PrizmaScreenOverrides;
|
|
16
|
+
onAction?: PrizmaScreenActionHandler;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* CURP — the CURP-entry screen, built on the Form archetype
|
|
20
|
+
* (GUIDELINES.md §6-E, `PrizmaFormScreen`).
|
|
21
|
+
*
|
|
22
|
+
* ONE screen for all five purple `CURP.EnterCURP.*` input sections
|
|
23
|
+
* (`default` / `focused` / `filled` / `error` / `loading`): measured against the
|
|
24
|
+
* 390 frames they share an identical skeleton — nav → Title (H2, no subtitle)
|
|
25
|
+
* → Spacing/32 → a single text field → primary CTA → secondary CTA → tag — and
|
|
26
|
+
* differ ONLY in field content, field treatment and CTA state.
|
|
27
|
+
*
|
|
28
|
+
* Three things are deliberate, each a lesson the Phone Input pilot paid for:
|
|
29
|
+
*
|
|
30
|
+
* 1. The field is UNCONTROLLED (`defaultValue`). A screen is one static spec
|
|
31
|
+
* state, so no `onChange` is needed — and Core's `readOnly`, the other way
|
|
32
|
+
* to make a field inert, paints the DISABLED grey surface on states Figma
|
|
33
|
+
* draws white (DEVIATIONS #PI-6). `disabled` is set ONLY on `loading`, the
|
|
34
|
+
* one section Figma actually greys.
|
|
35
|
+
* 2. `focused` and `filled` get Core's OWN `--focused` modifier through
|
|
36
|
+
* `className` — the class its CSS already implements beside `:focus-within`.
|
|
37
|
+
* `PrizmaTextField` has no `forceState` prop yet, unlike `PrizmaDropdown`
|
|
38
|
+
* (DEVIATIONS #PI-7); nothing is re-styled here.
|
|
39
|
+
* 3. The in-flight spinner rides the CTA (`ctaLoading`), never the field
|
|
40
|
+
* (DEVIATIONS #PI-5).
|
|
41
|
+
*
|
|
42
|
+
* The secondary action, "I don't have a CURP", is drawn by every section as a
|
|
43
|
+
* full-width OUTLINED button — Core's `PrizmaButton variant="secondary"` — sat
|
|
44
|
+
* Spacing/16 under the primary. Archetype E has no `secondaryCtaLabel` slot
|
|
45
|
+
* (archetype F does), so the button is composed into the archetype's
|
|
46
|
+
* `linkContent` slot: no primitive is invented, no layout is declared, and the
|
|
47
|
+
* two actions stay distinguishable (`cta` vs `secondary`, the #PI-10 rule).
|
|
48
|
+
* The gap is reported for promotion — see the module's DEVIATIONS rows.
|
|
49
|
+
*/
|
|
50
|
+
export declare const CurpEnterScreen: React.ForwardRefExoticComponent<CurpEnterScreenProps & React.RefAttributes<HTMLDivElement>>;
|
|
51
|
+
export default CurpEnterScreen;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { PrizmaTextField } from '@incodetech/prizma-core-web/text-field';
|
|
5
|
+
import { PrizmaButton } from '@incodetech/prizma-core-web/button';
|
|
6
|
+
import { PrizmaFormScreen } from './FormScreen';
|
|
7
|
+
import './ScreenLayout.css';
|
|
8
|
+
import './CurpLayout.css';
|
|
9
|
+
/**
|
|
10
|
+
* CURP — the CURP-entry screen, built on the Form archetype
|
|
11
|
+
* (GUIDELINES.md §6-E, `PrizmaFormScreen`).
|
|
12
|
+
*
|
|
13
|
+
* ONE screen for all five purple `CURP.EnterCURP.*` input sections
|
|
14
|
+
* (`default` / `focused` / `filled` / `error` / `loading`): measured against the
|
|
15
|
+
* 390 frames they share an identical skeleton — nav → Title (H2, no subtitle)
|
|
16
|
+
* → Spacing/32 → a single text field → primary CTA → secondary CTA → tag — and
|
|
17
|
+
* differ ONLY in field content, field treatment and CTA state.
|
|
18
|
+
*
|
|
19
|
+
* Three things are deliberate, each a lesson the Phone Input pilot paid for:
|
|
20
|
+
*
|
|
21
|
+
* 1. The field is UNCONTROLLED (`defaultValue`). A screen is one static spec
|
|
22
|
+
* state, so no `onChange` is needed — and Core's `readOnly`, the other way
|
|
23
|
+
* to make a field inert, paints the DISABLED grey surface on states Figma
|
|
24
|
+
* draws white (DEVIATIONS #PI-6). `disabled` is set ONLY on `loading`, the
|
|
25
|
+
* one section Figma actually greys.
|
|
26
|
+
* 2. `focused` and `filled` get Core's OWN `--focused` modifier through
|
|
27
|
+
* `className` — the class its CSS already implements beside `:focus-within`.
|
|
28
|
+
* `PrizmaTextField` has no `forceState` prop yet, unlike `PrizmaDropdown`
|
|
29
|
+
* (DEVIATIONS #PI-7); nothing is re-styled here.
|
|
30
|
+
* 3. The in-flight spinner rides the CTA (`ctaLoading`), never the field
|
|
31
|
+
* (DEVIATIONS #PI-5).
|
|
32
|
+
*
|
|
33
|
+
* The secondary action, "I don't have a CURP", is drawn by every section as a
|
|
34
|
+
* full-width OUTLINED button — Core's `PrizmaButton variant="secondary"` — sat
|
|
35
|
+
* Spacing/16 under the primary. Archetype E has no `secondaryCtaLabel` slot
|
|
36
|
+
* (archetype F does), so the button is composed into the archetype's
|
|
37
|
+
* `linkContent` slot: no primitive is invented, no layout is declared, and the
|
|
38
|
+
* two actions stay distinguishable (`cta` vs `secondary`, the #PI-10 rule).
|
|
39
|
+
* The gap is reported for promotion — see the module's DEVIATIONS rows.
|
|
40
|
+
*/
|
|
41
|
+
export const CurpEnterScreen = forwardRef(({ strings, state = 'default', value, screenId = `curp-enter-${state}`, className, overrides, onAction, ...shell }, ref) => {
|
|
42
|
+
// Figma treats the five sections as four distinct field treatments:
|
|
43
|
+
// `loading` greys the field and both actions (the lookup is in flight and
|
|
44
|
+
// the form is inert); `error` paints the negative surface with the clear ✕
|
|
45
|
+
// and the "Invalid CURP" row; `focused` / `filled` draw the blue focus ring
|
|
46
|
+
// with the caret; `default` is the plain resting field on the white
|
|
47
|
+
// surface.
|
|
48
|
+
const busy = state === 'loading';
|
|
49
|
+
const invalid = state === 'error';
|
|
50
|
+
const focused = state === 'focused' || state === 'filled';
|
|
51
|
+
return (_jsx(PrizmaFormScreen, { ref: ref,
|
|
52
|
+
/* Scopes the one module rule that lets the `error` section keep the
|
|
53
|
+
clear ✕ Figma draws inside the invalid field — Core renders the
|
|
54
|
+
button but hides it behind a `:focus-within:not(--error)` guard a
|
|
55
|
+
static spec state can never satisfy. See CurpLayout.css and the Core
|
|
56
|
+
request recorded there. Nothing is hand-rolled: the rule only lifts
|
|
57
|
+
Core's `display: none`. */
|
|
58
|
+
className: [
|
|
59
|
+
'curp-enter',
|
|
60
|
+
invalid ? 'curp-enter--error' : '',
|
|
61
|
+
className,
|
|
62
|
+
]
|
|
63
|
+
.filter(Boolean)
|
|
64
|
+
.join(' '), title: strings.enter.title, subtitle: strings.enter.subtitle, ctaLabel: strings.enter.ctaLabel,
|
|
65
|
+
/* The `loading` section swaps the CTA label for Core's spinner. */
|
|
66
|
+
ctaLoading: busy, ctaLoadingLabel: strings.enter.ctaLoadingLabel, linkContent: _jsx(PrizmaButton, { variant: "secondary", size: "L",
|
|
67
|
+
/* Figma greys this action too while the lookup runs. */
|
|
68
|
+
disabled: busy, onClick: () => onAction?.({ type: 'secondary', screenId }), children: strings.enter.noCurpLabel }), verifiedLabel: strings.verifiedLabel, navLabel: strings.navLabel, screenId: screenId, overrides: overrides, onAction: onAction, ...shell, children: _jsx(PrizmaTextField, { className: focused ? 'prizma-input-textfield--focused' : undefined, "aria-label": strings.enter.fieldLabel, placeholder: strings.enter.placeholder, defaultValue: value ?? '',
|
|
69
|
+
/* A CURP is an 18-character uppercase key. */
|
|
70
|
+
autoCapitalize: "characters", autoComplete: "off", spellCheck: false, disabled: busy, error: invalid, errorText: invalid ? strings.enter.errorText : undefined,
|
|
71
|
+
/* The clear ✕ is drawn only on the error section (76:36434); the
|
|
72
|
+
`filled` section (79:1553) draws none. Core still owns WHEN it
|
|
73
|
+
shows — its `--show` state needs a value in the field. */
|
|
74
|
+
clearable: invalid, clearLabel: strings.enter.clearLabel }) }));
|
|
75
|
+
});
|
|
76
|
+
CurpEnterScreen.displayName = 'CurpEnterScreen';
|
|
77
|
+
export default CurpEnterScreen;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type PrizmaFormScreenProps } from './FormScreen';
|
|
3
|
+
import type { PrizmaScreenActionHandler, PrizmaScreenOverrides } from './types';
|
|
4
|
+
import type { CurpGenerateState, CurpGenerateValues, CurpOption, CurpStrings } from './CurpStrings';
|
|
5
|
+
import './ScreenLayout.css';
|
|
6
|
+
import './CurpLayout.css';
|
|
7
|
+
export interface CurpGenerateScreenProps extends Omit<PrizmaFormScreenProps, 'title' | 'subtitle' | 'ctaLabel' | 'verifiedLabel' | 'children' | 'navLabel'> {
|
|
8
|
+
/** Module copy — this screen reads the `generate` slice. */
|
|
9
|
+
strings: CurpStrings;
|
|
10
|
+
/** Which purple `CURP.Gene.*` section to render. Default `default`. */
|
|
11
|
+
state?: CurpGenerateState;
|
|
12
|
+
/** The six field values. Empty fields fall back to their placeholders. */
|
|
13
|
+
values?: CurpGenerateValues;
|
|
14
|
+
/** Selectable genders. Runtime data, not copy — the host owns the set. */
|
|
15
|
+
genders?: CurpOption[];
|
|
16
|
+
/** Selectable birth states (the 32 Mexican entities plus "born abroad").
|
|
17
|
+
* Runtime data — a catalogue, never a string table. */
|
|
18
|
+
states?: CurpOption[];
|
|
19
|
+
screenId?: string;
|
|
20
|
+
overrides?: PrizmaScreenOverrides;
|
|
21
|
+
onAction?: PrizmaScreenActionHandler;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* CURP — the generator form, built on the Form archetype
|
|
25
|
+
* (GUIDELINES.md §6-E, `PrizmaFormScreen`).
|
|
26
|
+
*
|
|
27
|
+
* ONE screen for the three purple `CURP.Gene.*` form sections
|
|
28
|
+
* (`default` / `dropdown` / `filled`): identical layout — nav → Title (H2 +
|
|
29
|
+
* H5) → Spacing/32 → six labelled fields at Spacing/16 → CTA → tag — differing
|
|
30
|
+
* only in field content and whether the Gender menu is open.
|
|
31
|
+
*
|
|
32
|
+
* Unlike `CurpEnterScreen`, these fields DO carry visible labels: Figma draws
|
|
33
|
+
* "First name *", "Gender *" and so on above every field, which is Core's
|
|
34
|
+
* `label` slot exactly. The required `*` is Core's `requiredHint` suffix rather
|
|
35
|
+
* than part of the label string, so a locale can move or replace the marker.
|
|
36
|
+
*
|
|
37
|
+
* The date field is Core's `PrizmaDateField` (the `Input / Date` kind, with its
|
|
38
|
+
* DD/MM/YYYY mask and trailing calendar affordance) — the picker itself belongs
|
|
39
|
+
* to the OS by Core's contract, so no `onCalendarClick` is wired on a static
|
|
40
|
+
* spec screen and the icon stays decorative.
|
|
41
|
+
*
|
|
42
|
+
* The `dropdown` section IS the open-menu spec state, which Core exposes as the
|
|
43
|
+
* documentation-only `forceOpen` (a screen is one static state, never a live
|
|
44
|
+
* interaction) — the same mechanism Phone Input's `countryCode` section uses.
|
|
45
|
+
*/
|
|
46
|
+
export declare const CurpGenerateScreen: React.ForwardRefExoticComponent<CurpGenerateScreenProps & React.RefAttributes<HTMLDivElement>>;
|
|
47
|
+
export default CurpGenerateScreen;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { PrizmaTextField } from '@incodetech/prizma-core-web/text-field';
|
|
5
|
+
import { PrizmaDateField } from '@incodetech/prizma-core-web/date-field';
|
|
6
|
+
import { PrizmaDropdown } from '@incodetech/prizma-core-web/dropdown';
|
|
7
|
+
import { PrizmaFormScreen } from './FormScreen';
|
|
8
|
+
import './ScreenLayout.css';
|
|
9
|
+
import './CurpLayout.css';
|
|
10
|
+
/**
|
|
11
|
+
* CURP — the generator form, built on the Form archetype
|
|
12
|
+
* (GUIDELINES.md §6-E, `PrizmaFormScreen`).
|
|
13
|
+
*
|
|
14
|
+
* ONE screen for the three purple `CURP.Gene.*` form sections
|
|
15
|
+
* (`default` / `dropdown` / `filled`): identical layout — nav → Title (H2 +
|
|
16
|
+
* H5) → Spacing/32 → six labelled fields at Spacing/16 → CTA → tag — differing
|
|
17
|
+
* only in field content and whether the Gender menu is open.
|
|
18
|
+
*
|
|
19
|
+
* Unlike `CurpEnterScreen`, these fields DO carry visible labels: Figma draws
|
|
20
|
+
* "First name *", "Gender *" and so on above every field, which is Core's
|
|
21
|
+
* `label` slot exactly. The required `*` is Core's `requiredHint` suffix rather
|
|
22
|
+
* than part of the label string, so a locale can move or replace the marker.
|
|
23
|
+
*
|
|
24
|
+
* The date field is Core's `PrizmaDateField` (the `Input / Date` kind, with its
|
|
25
|
+
* DD/MM/YYYY mask and trailing calendar affordance) — the picker itself belongs
|
|
26
|
+
* to the OS by Core's contract, so no `onCalendarClick` is wired on a static
|
|
27
|
+
* spec screen and the icon stays decorative.
|
|
28
|
+
*
|
|
29
|
+
* The `dropdown` section IS the open-menu spec state, which Core exposes as the
|
|
30
|
+
* documentation-only `forceOpen` (a screen is one static state, never a live
|
|
31
|
+
* interaction) — the same mechanism Phone Input's `countryCode` section uses.
|
|
32
|
+
*/
|
|
33
|
+
export const CurpGenerateScreen = forwardRef(({ strings, state = 'default', values, genders = [], states = [], screenId = `curp-generate-${state}`, className, overrides, onAction, ...shell }, ref) => {
|
|
34
|
+
const copy = strings.generate;
|
|
35
|
+
return (_jsxs(PrizmaFormScreen, { ref: ref,
|
|
36
|
+
/* Scopes the two module rules in CurpLayout.css (see the foundation and
|
|
37
|
+
Core requests recorded there):
|
|
38
|
+
- `--scroll` lets the six-field stack scroll inside the 844 frame
|
|
39
|
+
instead of overflowing its box and painting over the CTA. EVERY
|
|
40
|
+
section gets it, `dropdown` included — Figma draws "Generate"
|
|
41
|
+
clear and unobstructed under the open menu.
|
|
42
|
+
- `--menu-open` flips Core's absolutely-positioned menu above its
|
|
43
|
+
trigger on the one section that forces it open, so the three
|
|
44
|
+
gender rows stay inside the scrolling column. */
|
|
45
|
+
className: [
|
|
46
|
+
'curp-generate',
|
|
47
|
+
'curp-generate--scroll',
|
|
48
|
+
state === 'dropdown' ? 'curp-generate--menu-open' : '',
|
|
49
|
+
className,
|
|
50
|
+
]
|
|
51
|
+
.filter(Boolean)
|
|
52
|
+
.join(' '), title: copy.title, subtitle: copy.subtitle, ctaLabel: copy.ctaLabel, ctaLoadingLabel: copy.ctaLoadingLabel, verifiedLabel: strings.verifiedLabel, navLabel: strings.navLabel, screenId: screenId, overrides: overrides, onAction: onAction, ...shell, children: [_jsx(PrizmaTextField, { label: copy.firstName.label, placeholder: copy.firstName.placeholder, required: true, requiredHint: strings.requiredHint, autoComplete: "off", defaultValue: values?.firstName ?? '' }), _jsx(PrizmaTextField, { label: copy.firstLastName.label, placeholder: copy.firstLastName.placeholder, required: true, requiredHint: strings.requiredHint, autoComplete: "off", defaultValue: values?.firstLastName ?? '' }), _jsx(PrizmaTextField, { label: copy.secondLastName.label, placeholder: copy.secondLastName.placeholder, required: true, requiredHint: strings.requiredHint, autoComplete: "off", defaultValue: values?.secondLastName ?? '' }), _jsx(PrizmaDropdown, { label: copy.gender.label, placeholder: copy.gender.placeholder, required: true, requiredHint: strings.requiredHint, options: genders, defaultValue: values?.gender ?? null, searchPlaceholder: copy.gender.searchPlaceholder,
|
|
53
|
+
/* The `dropdown` section is the open Gender menu. */
|
|
54
|
+
forceOpen: state === 'dropdown' }), _jsx(PrizmaDateField, { label: copy.dateOfBirth.label, placeholder: copy.dateOfBirth.placeholder, required: true, requiredHint: strings.requiredHint, calendarLabel: copy.dateOfBirth.calendarLabel, defaultValue: values?.dateOfBirth ?? '' }), _jsx(PrizmaDropdown, { label: copy.birthState.label, placeholder: copy.birthState.placeholder, required: true, requiredHint: strings.requiredHint, options: states, defaultValue: values?.birthState ?? null, searchable: true, searchPlaceholder: copy.birthState.searchPlaceholder })] }));
|
|
55
|
+
});
|
|
56
|
+
CurpGenerateScreen.displayName = 'CurpGenerateScreen';
|
|
57
|
+
export default CurpGenerateScreen;
|