@incodetech/prizma-core-screens 0.2.7 → 0.2.14
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/dist/BiometricConsentScreen.d.ts +95 -0
- package/dist/BiometricConsentScreen.js +91 -0
- package/dist/BiometricConsentStrings.d.ts +84 -0
- package/dist/BiometricConsentStrings.js +31 -0
- package/dist/CaptureScreen.d.ts +13 -0
- package/dist/CaptureScreen.js +2 -2
- package/dist/DemoScreensLayout.css +16 -0
- package/dist/DemoScreensRedirectScreen.d.ts +6 -1
- package/dist/DemoScreensRedirectScreen.js +3 -2
- package/dist/DemoScreensStrings.d.ts +5 -0
- package/dist/DigitalIdDeviceWalletsDocumentSelectionScreen.d.ts +34 -0
- package/dist/DigitalIdDeviceWalletsDocumentSelectionScreen.js +47 -0
- package/dist/DigitalIdDeviceWalletsResultScreen.d.ts +28 -0
- package/dist/DigitalIdDeviceWalletsResultScreen.js +23 -0
- package/dist/DigitalIdDeviceWalletsStrings.d.ts +55 -0
- package/dist/DigitalIdDeviceWalletsStrings.js +19 -0
- package/dist/DigitalIdProvidersDocumentSelectionScreen.d.ts +31 -0
- package/dist/DigitalIdProvidersDocumentSelectionScreen.js +37 -0
- package/dist/DigitalIdProvidersErrorScreen.d.ts +33 -0
- package/dist/DigitalIdProvidersErrorScreen.js +33 -0
- package/dist/DigitalIdProvidersLayout.css +59 -0
- package/dist/DigitalIdProvidersRedirectScreen.d.ts +24 -0
- package/dist/DigitalIdProvidersRedirectScreen.js +18 -0
- package/dist/DigitalIdProvidersStrings.d.ts +72 -0
- package/dist/DigitalIdProvidersStrings.js +15 -0
- package/dist/DigitalIdUploadErrorScreen.d.ts +31 -0
- package/dist/DigitalIdUploadErrorScreen.js +26 -0
- package/dist/DigitalIdUploadFileTooLargeScreen.d.ts +27 -0
- package/dist/DigitalIdUploadFileTooLargeScreen.js +21 -0
- package/dist/DigitalIdUploadReviewScreen.d.ts +57 -0
- package/dist/DigitalIdUploadReviewScreen.js +44 -0
- package/dist/DigitalIdUploadStrings.d.ts +64 -0
- package/dist/DigitalIdUploadStrings.js +19 -0
- package/dist/DigitalIdUploadTutorialScreen.d.ts +28 -0
- package/dist/DigitalIdUploadTutorialScreen.js +23 -0
- package/dist/DocumentCaptureIllustration.d.ts +1 -1
- package/dist/EkybCountryScreen.d.ts +6 -6
- package/dist/EkybCountryScreen.js +20 -7
- package/dist/EkybStrings.d.ts +6 -1
- package/dist/ErrorScreensScreen.d.ts +5 -2
- package/dist/ErrorScreensScreen.js +15 -4
- package/dist/ErrorScreensStrings.d.ts +17 -2
- package/dist/ErrorScreensStrings.js +18 -10
- package/dist/FaceCaptureCapturingScreen.d.ts +63 -0
- package/dist/FaceCaptureCapturingScreen.js +62 -2
- package/dist/FaceCaptureLayout.css +69 -4
- package/dist/FaceCaptureStrings.d.ts +23 -0
- package/dist/FormScreen.css +14 -0
- package/dist/FormScreen.d.ts +28 -0
- package/dist/FormScreen.js +3 -2
- package/dist/IdCaptureLayout.css +165 -2
- package/dist/IdCaptureStageScreen.d.ts +47 -0
- package/dist/IdCaptureStageScreen.js +39 -3
- package/dist/IdCaptureStrings.d.ts +19 -0
- package/dist/ListScreen.d.ts +19 -0
- package/dist/ListScreen.js +7 -2
- package/dist/LoaderScreen.d.ts +7 -5
- package/dist/LoaderScreen.js +7 -5
- package/dist/LoadersStrings.d.ts +18 -5
- package/dist/OcrReviewErrorScreen.d.ts +30 -0
- package/dist/OcrReviewErrorScreen.js +24 -0
- package/dist/OcrReviewLayout.css +24 -0
- package/dist/OcrReviewLoadingScreen.d.ts +25 -0
- package/dist/OcrReviewLoadingScreen.js +19 -0
- package/dist/OcrReviewScreen.d.ts +76 -0
- package/dist/OcrReviewScreen.js +65 -0
- package/dist/OcrReviewStrings.d.ts +47 -0
- package/dist/OcrReviewStrings.js +17 -0
- package/dist/OcrReviewSuccessScreen.d.ts +30 -0
- package/dist/OcrReviewSuccessScreen.js +24 -0
- package/dist/PermissionsAllowScreen.d.ts +8 -11
- package/dist/PermissionsAllowScreen.js +8 -11
- package/dist/PermissionsAskScreen.d.ts +41 -0
- package/dist/PermissionsAskScreen.js +43 -0
- package/dist/PermissionsBrowserStepsScreen.d.ts +9 -2
- package/dist/PermissionsBrowserStepsScreen.js +12 -3
- package/dist/PermissionsLayout.css +47 -0
- package/dist/PermissionsStrings.d.ts +20 -9
- package/dist/PermissionsStrings.js +10 -4
- package/dist/PhoneInputOtpScreen.d.ts +8 -0
- package/dist/PhoneInputOtpScreen.js +26 -19
- package/dist/PhoneInputStrings.d.ts +11 -3
- package/dist/PhoneInputVerifyScreen.js +21 -5
- package/dist/QualifiedSignatureDocumentScreen.d.ts +8 -5
- package/dist/QualifiedSignatureDocumentScreen.js +9 -6
- package/dist/QualifiedSignatureResultScreen.d.ts +16 -13
- package/dist/QualifiedSignatureResultScreen.js +17 -18
- package/dist/QualifiedSignatureStrings.d.ts +11 -4
- package/dist/ResultScreen.d.ts +8 -0
- package/dist/ResultScreen.js +14 -3
- package/dist/ReusabilityCredentialSelectionScreen.d.ts +95 -0
- package/dist/ReusabilityCredentialSelectionScreen.js +94 -0
- package/dist/ReusabilityLayout.css +241 -0
- package/dist/ReusabilityPrivacyPolicyScreen.d.ts +55 -0
- package/dist/ReusabilityPrivacyPolicyScreen.js +44 -0
- package/dist/ReusabilityStrings.d.ts +85 -0
- package/dist/ReusabilityStrings.js +37 -0
- package/dist/ReviewScreen.d.ts +38 -12
- package/dist/ReviewScreen.js +41 -8
- package/dist/ScreenLayout.css +382 -6
- package/dist/VideoSelfieErrorScreen.js +1 -1
- package/dist/VideoSelfieIdCaptureScreen.js +1 -1
- package/dist/VideoSelfieLayout.css +304 -2
- package/dist/VideoSelfieSelfieCaptureScreen.js +1 -1
- package/dist/VideoSelfieSpeakScreen.js +1 -1
- package/dist/VideoSelfieStrings.d.ts +4 -1
- package/dist/VideoSelfieTurnHeadScreen.js +14 -11
- package/dist/VideoSelfieTutorialScreen.d.ts +9 -0
- package/dist/VideoSelfieTutorialScreen.js +10 -1
- package/dist/VideoSelfieWaveScreen.js +1 -1
- package/dist/ViewfinderScreen.css +36 -0
- package/dist/flows.d.ts +8 -0
- package/dist/flows.js +17 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +17 -0
- package/dist/styles.css +4 -0
- package/package.json +94 -3
- package/samples/video-selfie-camera-wide.jpg +0 -0
- package/samples/video-selfie-room-wide.jpg +0 -0
- package/src/BiometricConsentScreen.tsx +192 -0
- package/src/BiometricConsentStrings.ts +119 -0
- package/src/CaptureScreen.tsx +17 -0
- package/src/DemoScreensLayout.css +16 -0
- package/src/DemoScreensRedirectScreen.tsx +14 -6
- package/src/DemoScreensStrings.ts +5 -0
- package/src/DigitalIdDeviceWalletsDocumentSelectionScreen.tsx +108 -0
- package/src/DigitalIdDeviceWalletsResultScreen.tsx +76 -0
- package/src/DigitalIdDeviceWalletsStrings.ts +80 -0
- package/src/DigitalIdProvidersDocumentSelectionScreen.tsx +112 -0
- package/src/DigitalIdProvidersErrorScreen.tsx +104 -0
- package/src/DigitalIdProvidersLayout.css +59 -0
- package/src/DigitalIdProvidersRedirectScreen.tsx +65 -0
- package/src/DigitalIdProvidersStrings.ts +98 -0
- package/src/DigitalIdUploadErrorScreen.tsx +83 -0
- package/src/DigitalIdUploadFileTooLargeScreen.tsx +67 -0
- package/src/DigitalIdUploadReviewScreen.tsx +119 -0
- package/src/DigitalIdUploadStrings.ts +88 -0
- package/src/DigitalIdUploadTutorialScreen.tsx +59 -0
- package/src/DocumentCaptureIllustration.tsx +1 -1
- package/src/EkybCountryScreen.tsx +23 -6
- package/src/EkybStrings.ts +6 -1
- package/src/ErrorScreensScreen.tsx +15 -4
- package/src/ErrorScreensStrings.ts +37 -12
- package/src/FaceCaptureCapturingScreen.tsx +102 -13
- package/src/FaceCaptureLayout.css +69 -4
- package/src/FaceCaptureStrings.ts +24 -0
- package/src/FormScreen.css +14 -0
- package/src/FormScreen.tsx +34 -0
- package/src/IdCaptureLayout.css +165 -2
- package/src/IdCaptureStageScreen.tsx +75 -0
- package/src/IdCaptureStrings.ts +19 -0
- package/src/ListScreen.tsx +48 -9
- package/src/LoaderScreen.tsx +7 -5
- package/src/LoadersStrings.ts +18 -5
- package/src/OcrReviewErrorScreen.tsx +53 -0
- package/src/OcrReviewLayout.css +24 -0
- package/src/OcrReviewLoadingScreen.tsx +48 -0
- package/src/OcrReviewScreen.tsx +190 -0
- package/src/OcrReviewStrings.ts +69 -0
- package/src/OcrReviewSuccessScreen.tsx +52 -0
- package/src/PermissionsAllowScreen.tsx +9 -10
- package/src/PermissionsAskScreen.tsx +105 -0
- package/src/PermissionsBrowserStepsScreen.tsx +11 -3
- package/src/PermissionsLayout.css +47 -0
- package/src/PermissionsStrings.ts +42 -12
- package/src/PhoneInputOtpScreen.tsx +23 -3
- package/src/PhoneInputStrings.ts +11 -3
- package/src/PhoneInputVerifyScreen.tsx +24 -4
- package/src/QualifiedSignatureDocumentScreen.tsx +9 -7
- package/src/QualifiedSignatureResultScreen.tsx +28 -26
- package/src/QualifiedSignatureStrings.ts +11 -4
- package/src/ResultScreen.tsx +33 -2
- package/src/ReusabilityCredentialSelectionScreen.tsx +246 -0
- package/src/ReusabilityLayout.css +241 -0
- package/src/ReusabilityPrivacyPolicyScreen.tsx +109 -0
- package/src/ReusabilityStrings.ts +127 -0
- package/src/ReviewScreen.tsx +96 -27
- package/src/ScreenLayout.css +382 -6
- package/src/VideoSelfieErrorScreen.tsx +1 -1
- package/src/VideoSelfieIdCaptureScreen.tsx +9 -1
- package/src/VideoSelfieLayout.css +304 -2
- package/src/VideoSelfieSelfieCaptureScreen.tsx +9 -1
- package/src/VideoSelfieSpeakScreen.tsx +9 -1
- package/src/VideoSelfieStrings.ts +4 -2
- package/src/VideoSelfieTurnHeadScreen.tsx +25 -14
- package/src/VideoSelfieTutorialScreen.tsx +11 -0
- package/src/VideoSelfieWaveScreen.tsx +9 -1
- package/src/ViewfinderScreen.css +36 -0
- package/src/flows.ts +25 -0
- package/src/index.ts +116 -3
- package/src/styles.css +4 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Digital ID Device Wallets module — copy contract.
|
|
2
|
+
//
|
|
3
|
+
// Every Digital ID Device Wallets screen receives the SAME `strings:
|
|
4
|
+
// DigitalIdDeviceWalletsStrings` object (rule: all copy via props, no hardcoded
|
|
5
|
+
// English — GUIDELINES.md §9).
|
|
6
|
+
//
|
|
7
|
+
// Authoritative screens: the `iOS Apple Wallet` section of the Digital IDs -
|
|
8
|
+
// Latest Design Figma file (u7N5Zq4bfOwiVbpKHKmSPE, node 26103:3689) —
|
|
9
|
+
// `1-1-1-how to verify` (26106:12647, the chooser with the Apple Wallet row)
|
|
10
|
+
// and `Digital ID Generic Error` (26540:5685). Two frames of the section are
|
|
11
|
+
// NOT part of this contract: `Apple Wallet System Modal` (26597:14667) is the
|
|
12
|
+
// OS's own sheet — OS chrome, DEVIATIONS.md #DC-20 precedent, mocked on the
|
|
13
|
+
// Core Lab canvas instead — and `1-2-1-id` / `2-2-1-id` are ID Capture's own
|
|
14
|
+
// tutorials, which the Identity Card and Passport rows hand off to.
|
|
15
|
+
//
|
|
16
|
+
// The success state has no frame: the section's `Success?` decision goes
|
|
17
|
+
// straight to `Next module/screen`. It is built as the error's mirror on the
|
|
18
|
+
// same archetype and recorded as added, not traced (DEVIATIONS.md #DIW-1).
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type PrizmaListScreenProps } from './ListScreen';
|
|
3
|
+
import type { PrizmaScreenActionHandler, PrizmaScreenOverrides } from './types';
|
|
4
|
+
import type { DigitalIdProvidersSelection, DigitalIdProvidersStrings } from './DigitalIdProvidersStrings';
|
|
5
|
+
import './ScreenLayout.css';
|
|
6
|
+
import './DigitalIdProvidersLayout.css';
|
|
7
|
+
export interface DigitalIdProvidersDocumentSelectionScreenProps extends Omit<PrizmaListScreenProps, 'title' | 'subtitle' | 'children' | 'listAlign' | 'verifiedLabel' | 'navLabel'> {
|
|
8
|
+
/** Module copy — this screen reads the `documentSelection` slice. */
|
|
9
|
+
strings: DigitalIdProvidersStrings;
|
|
10
|
+
/** How many providers to list; all of them when absent. The frame's first
|
|
11
|
+
* state (27753:8099) shows six, the full list (27703:4895) scrolls. */
|
|
12
|
+
providerCount?: number;
|
|
13
|
+
/** Fired with what was picked; `onAction` still reports the tap. */
|
|
14
|
+
onOptionSelect?: (selection: DigitalIdProvidersSelection) => void;
|
|
15
|
+
screenId?: string;
|
|
16
|
+
overrides?: PrizmaScreenOverrides;
|
|
17
|
+
onAction?: PrizmaScreenActionHandler;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Digital ID Providers — choose how to verify: your own ID, or a Digital ID
|
|
21
|
+
* provider, on the `PrizmaListScreen` archetype (GUIDELINES.md §6-G).
|
|
22
|
+
* Figma: `Document Chooser` (27753:8099) and the full list (27703:4895).
|
|
23
|
+
*
|
|
24
|
+
* Two of Core's card lists, each under a section label, after a "Viewing
|
|
25
|
+
* options for" country line with Core's flag. Every row is Core's; the
|
|
26
|
+
* providers carry Core's generic `digital-id-web` card icon until their logos
|
|
27
|
+
* arrive from the backend catalog (DEVIATIONS #DIP-1), and the Identity Card
|
|
28
|
+
* row has no second line, which Core's row cannot draw (#DIP-3).
|
|
29
|
+
*/
|
|
30
|
+
export declare const DigitalIdProvidersDocumentSelectionScreen: React.ForwardRefExoticComponent<DigitalIdProvidersDocumentSelectionScreenProps & React.RefAttributes<HTMLDivElement>>;
|
|
31
|
+
export default DigitalIdProvidersDocumentSelectionScreen;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { PrizmaCardListVerificationOptions } from '@incodetech/prizma-core-web/card-list';
|
|
5
|
+
import { PrizmaCountryFlag } from '@incodetech/prizma-core-web/combined';
|
|
6
|
+
import { PrizmaListScreen } from './ListScreen';
|
|
7
|
+
import './ScreenLayout.css';
|
|
8
|
+
import './DigitalIdProvidersLayout.css';
|
|
9
|
+
/**
|
|
10
|
+
* Digital ID Providers — choose how to verify: your own ID, or a Digital ID
|
|
11
|
+
* provider, on the `PrizmaListScreen` archetype (GUIDELINES.md §6-G).
|
|
12
|
+
* Figma: `Document Chooser` (27753:8099) and the full list (27703:4895).
|
|
13
|
+
*
|
|
14
|
+
* Two of Core's card lists, each under a section label, after a "Viewing
|
|
15
|
+
* options for" country line with Core's flag. Every row is Core's; the
|
|
16
|
+
* providers carry Core's generic `digital-id-web` card icon until their logos
|
|
17
|
+
* arrive from the backend catalog (DEVIATIONS #DIP-1), and the Identity Card
|
|
18
|
+
* row has no second line, which Core's row cannot draw (#DIP-3).
|
|
19
|
+
*/
|
|
20
|
+
export const DigitalIdProvidersDocumentSelectionScreen = forwardRef(({ strings, providerCount, onOptionSelect, screenId = 'digital-id-providers-document-selection', overrides, onAction, ...shell }, ref) => {
|
|
21
|
+
const copy = strings.documentSelection;
|
|
22
|
+
const providers = providerCount === undefined ? copy.providers : copy.providers.slice(0, providerCount);
|
|
23
|
+
const choose = (selection) => {
|
|
24
|
+
onOptionSelect?.(selection);
|
|
25
|
+
onAction?.({ type: 'cta', screenId });
|
|
26
|
+
};
|
|
27
|
+
return (_jsx(PrizmaListScreen, { ref: ref, title: copy.title, listAlign: "start", scrollList: true, verifiedLabel: strings.verifiedLabel, navLabel: strings.navLabel, screenId: screenId, overrides: overrides, onAction: onAction, ...shell, children: _jsxs("div", { className: "digital-id-providers-chooser", children: [_jsxs("p", { className: "digital-id-providers-country", children: [copy.countryLabel, _jsx(PrizmaCountryFlag, { country: { code: copy.countryCode, name: copy.countryName, dialCode: '', flag: '' } }), _jsx("span", { className: "digital-id-providers-country__name", children: copy.countryName })] }), _jsxs("section", { className: "digital-id-providers-section", children: [_jsx("p", { className: "digital-id-providers-section__label", children: copy.idSectionLabel }), _jsx(PrizmaCardListVerificationOptions, { items: [
|
|
28
|
+
{ icon: 'id', title: copy.idLabel, onClick: () => choose({ kind: 'id' }) },
|
|
29
|
+
{ icon: 'passport', title: copy.passportLabel, onClick: () => choose({ kind: 'passport' }) },
|
|
30
|
+
] })] }), _jsxs("section", { className: "digital-id-providers-section", children: [_jsx("p", { className: "digital-id-providers-section__label", children: copy.providersSectionLabel }), _jsx(PrizmaCardListVerificationOptions, { items: providers.map(provider => ({
|
|
31
|
+
icon: 'digital-id-web',
|
|
32
|
+
title: provider.label,
|
|
33
|
+
onClick: () => choose({ kind: 'provider', providerId: provider.id }),
|
|
34
|
+
})) })] })] }) }));
|
|
35
|
+
});
|
|
36
|
+
DigitalIdProvidersDocumentSelectionScreen.displayName = 'DigitalIdProvidersDocumentSelectionScreen';
|
|
37
|
+
export default DigitalIdProvidersDocumentSelectionScreen;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type PrizmaResultScreenProps } from './ResultScreen';
|
|
3
|
+
import type { PrizmaScreenActionHandler, PrizmaScreenOverrides } from './types';
|
|
4
|
+
import type { DigitalIdProvidersErrorState, DigitalIdProvidersStrings } from './DigitalIdProvidersStrings';
|
|
5
|
+
import './ScreenLayout.css';
|
|
6
|
+
export interface DigitalIdProvidersErrorScreenProps extends Omit<PrizmaResultScreenProps, 'status' | 'title' | 'subtitle' | 'children' | 'ctaLabel' | 'secondaryCtaLabel' | 'verifiedLabel' | 'navLabel'> {
|
|
7
|
+
/** Module copy — this screen reads the `errors` slice for its `state`, and
|
|
8
|
+
* `acceptedDocuments` on the two document states. */
|
|
9
|
+
strings: DigitalIdProvidersStrings;
|
|
10
|
+
state: DigitalIdProvidersErrorState;
|
|
11
|
+
screenId?: string;
|
|
12
|
+
overrides?: PrizmaScreenOverrides;
|
|
13
|
+
onAction?: PrizmaScreenActionHandler;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Digital ID Providers — the five failures of a provider run, on the
|
|
17
|
+
* `PrizmaResultScreen` archetype (GUIDELINES.md §6-F). Figma: `Errors`
|
|
18
|
+
* (27707:9338).
|
|
19
|
+
*
|
|
20
|
+
* unavailable the provider could not be reached — Scan ID instead
|
|
21
|
+
* consent-denied the person did not grant sharing at the provider
|
|
22
|
+
* timed-out the provider session did not finish in time
|
|
23
|
+
* not-accepted the ID behind the provider is not one the flow accepts
|
|
24
|
+
* expired the ID behind the provider has expired
|
|
25
|
+
*
|
|
26
|
+
* Every state has two buttons, the second "Choose another method" (#DIP-4).
|
|
27
|
+
* The two document states carry Core's `PrizmaCardDocumentList` in the
|
|
28
|
+
* archetype's `children` slot, the same recipe ID Capture's document error
|
|
29
|
+
* uses. The first three keep the footer tag as drawn; the two document states
|
|
30
|
+
* drop it, as drawn.
|
|
31
|
+
*/
|
|
32
|
+
export declare const DigitalIdProvidersErrorScreen: React.ForwardRefExoticComponent<DigitalIdProvidersErrorScreenProps & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
+
export default DigitalIdProvidersErrorScreen;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { PrizmaCardDocumentList } from '@incodetech/prizma-core-web/card';
|
|
5
|
+
import { PrizmaResultScreen } from './ResultScreen';
|
|
6
|
+
import './ScreenLayout.css';
|
|
7
|
+
/** The two states that list the documents accepted instead. */
|
|
8
|
+
const LISTS_DOCUMENTS = new Set(['not-accepted', 'expired']);
|
|
9
|
+
/**
|
|
10
|
+
* Digital ID Providers — the five failures of a provider run, on the
|
|
11
|
+
* `PrizmaResultScreen` archetype (GUIDELINES.md §6-F). Figma: `Errors`
|
|
12
|
+
* (27707:9338).
|
|
13
|
+
*
|
|
14
|
+
* unavailable the provider could not be reached — Scan ID instead
|
|
15
|
+
* consent-denied the person did not grant sharing at the provider
|
|
16
|
+
* timed-out the provider session did not finish in time
|
|
17
|
+
* not-accepted the ID behind the provider is not one the flow accepts
|
|
18
|
+
* expired the ID behind the provider has expired
|
|
19
|
+
*
|
|
20
|
+
* Every state has two buttons, the second "Choose another method" (#DIP-4).
|
|
21
|
+
* The two document states carry Core's `PrizmaCardDocumentList` in the
|
|
22
|
+
* archetype's `children` slot, the same recipe ID Capture's document error
|
|
23
|
+
* uses. The first three keep the footer tag as drawn; the two document states
|
|
24
|
+
* drop it, as drawn.
|
|
25
|
+
*/
|
|
26
|
+
export const DigitalIdProvidersErrorScreen = forwardRef(({ strings, state, screenId = `digital-id-providers-error-${state}`, showHeader = false, showFooter, overrides, onAction, ...shell }, ref) => {
|
|
27
|
+
const copy = strings.errors[state];
|
|
28
|
+
const listsDocuments = LISTS_DOCUMENTS.has(state);
|
|
29
|
+
const docs = strings.acceptedDocuments;
|
|
30
|
+
return (_jsx(PrizmaResultScreen, { ref: ref, status: "error", title: copy.title, subtitle: copy.subtitle, ctaLabel: copy.ctaLabel, secondaryCtaLabel: copy.secondaryCtaLabel, verifiedLabel: strings.verifiedLabel, navLabel: strings.navLabel, showHeader: showHeader, showFooter: showFooter ?? !listsDocuments, screenId: screenId, overrides: overrides, onAction: onAction, ...shell, children: listsDocuments ? (_jsx(PrizmaCardDocumentList, { state: "default", countryCode: docs.countryCode, flag: docs.flag, country: docs.country, documents: docs.documents })) : null }));
|
|
31
|
+
});
|
|
32
|
+
DigitalIdProvidersErrorScreen.displayName = 'DigitalIdProvidersErrorScreen';
|
|
33
|
+
export default DigitalIdProvidersErrorScreen;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/* Digital ID Providers — the chooser's country line and section labels.
|
|
2
|
+
*
|
|
3
|
+
* Archetype G has one list slot and no section-label recipe; the provider
|
|
4
|
+
* chooser (27753:8099) groups two Core card lists under labels ("Use your ID",
|
|
5
|
+
* "Digital ID verification") with a "Viewing options for 🇺🇸 US" line under the
|
|
6
|
+
* title. Composed here from tokens only, like Reusability's rows (#RU-1);
|
|
7
|
+
* DEVIATIONS #DIP-2 asks for a foundation recipe. */
|
|
8
|
+
|
|
9
|
+
.digital-id-providers-chooser {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
gap: var(--prizma-spacing-24);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.digital-id-providers-country {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
gap: var(--prizma-spacing-8);
|
|
20
|
+
color: var(--prizma-text-body-500-secondary);
|
|
21
|
+
font-family: var(--prizma-body-family);
|
|
22
|
+
font-size: var(--prizma-body-m-regular-font-size);
|
|
23
|
+
font-weight: var(--prizma-body-m-regular-font-weight);
|
|
24
|
+
line-height: var(--prizma-body-m-regular-line-height);
|
|
25
|
+
letter-spacing: var(--prizma-body-m-regular-letter-spacing);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.digital-id-providers-country__name {
|
|
29
|
+
color: var(--prizma-text-body-800-primary);
|
|
30
|
+
text-decoration: underline;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.digital-id-providers-section {
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
gap: var(--prizma-spacing-8);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.digital-id-providers-section__label {
|
|
40
|
+
margin: 0;
|
|
41
|
+
color: var(--prizma-text-body-500-secondary);
|
|
42
|
+
font-family: var(--prizma-body-family);
|
|
43
|
+
font-size: var(--prizma-body-m-regular-font-size);
|
|
44
|
+
font-weight: var(--prizma-body-m-regular-font-weight);
|
|
45
|
+
line-height: var(--prizma-body-m-regular-line-height);
|
|
46
|
+
letter-spacing: var(--prizma-body-m-regular-letter-spacing);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* Redirecting — the spinner and its copy sit at the middle of the screen.
|
|
50
|
+
* With the header hidden, archetype C still reserves the nav row above the
|
|
51
|
+
* content and centres the column in what is left, so the block lands ~63px
|
|
52
|
+
* low. Mirroring that reserve below — status bar, the nav's gap and height,
|
|
53
|
+
* the column's own top padding (ScreenNav.css, ScreenLayout.css) — balances
|
|
54
|
+
* it on the shell's midline. */
|
|
55
|
+
.digital-id-providers-redirect .prizma-screen-layout__content--centered {
|
|
56
|
+
padding-bottom: calc(
|
|
57
|
+
var(--pcs-status-bar, 47px) + var(--prizma-spacing-12) + 44px + var(--prizma-spacing-24)
|
|
58
|
+
);
|
|
59
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type PrizmaProcessingScreenProps } from './ProcessingScreen';
|
|
3
|
+
import type { PrizmaScreenActionHandler, PrizmaScreenOverrides } from './types';
|
|
4
|
+
import type { DigitalIdProvidersStrings } from './DigitalIdProvidersStrings';
|
|
5
|
+
import './ScreenLayout.css';
|
|
6
|
+
import './DigitalIdProvidersLayout.css';
|
|
7
|
+
export interface DigitalIdProvidersRedirectScreenProps extends Omit<PrizmaProcessingScreenProps, 'status' | 'title' | 'subtitle' | 'verifiedLabel' | 'navLabel'> {
|
|
8
|
+
/** Module copy — this screen reads the `redirecting` slice. */
|
|
9
|
+
strings: DigitalIdProvidersStrings;
|
|
10
|
+
screenId?: string;
|
|
11
|
+
overrides?: PrizmaScreenOverrides;
|
|
12
|
+
onAction?: PrizmaScreenActionHandler;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Digital ID Providers — "Redirecting for verification…", the wait before the
|
|
16
|
+
* browser leaves for the provider's site, on the `PrizmaProcessingScreen`
|
|
17
|
+
* archetype (GUIDELINES.md §6-C). Figma: the `1-18-1-id-hold-on` instance in
|
|
18
|
+
* the web full flow (27707:9281), with the module's own copy. The Web SDK's
|
|
19
|
+
* `digitalIdRedirect` phases `loading` and `redirecting` both look like this.
|
|
20
|
+
* The block is centred on the whole screen, not below the hidden nav's
|
|
21
|
+
* reserved row (DigitalIdProvidersLayout.css).
|
|
22
|
+
*/
|
|
23
|
+
export declare const DigitalIdProvidersRedirectScreen: React.ForwardRefExoticComponent<DigitalIdProvidersRedirectScreenProps & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
export default DigitalIdProvidersRedirectScreen;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { PrizmaProcessingScreen } from './ProcessingScreen';
|
|
5
|
+
import './ScreenLayout.css';
|
|
6
|
+
import './DigitalIdProvidersLayout.css';
|
|
7
|
+
/**
|
|
8
|
+
* Digital ID Providers — "Redirecting for verification…", the wait before the
|
|
9
|
+
* browser leaves for the provider's site, on the `PrizmaProcessingScreen`
|
|
10
|
+
* archetype (GUIDELINES.md §6-C). Figma: the `1-18-1-id-hold-on` instance in
|
|
11
|
+
* the web full flow (27707:9281), with the module's own copy. The Web SDK's
|
|
12
|
+
* `digitalIdRedirect` phases `loading` and `redirecting` both look like this.
|
|
13
|
+
* The block is centred on the whole screen, not below the hidden nav's
|
|
14
|
+
* reserved row (DigitalIdProvidersLayout.css).
|
|
15
|
+
*/
|
|
16
|
+
export const DigitalIdProvidersRedirectScreen = forwardRef(({ strings, screenId = 'digital-id-providers-redirecting', showHeader = false, showFooter = false, overrides, onAction, className, ...shell }, ref) => (_jsx(PrizmaProcessingScreen, { ref: ref, status: "loading", title: strings.redirecting.title, subtitle: strings.redirecting.subtitle, verifiedLabel: strings.verifiedLabel, navLabel: strings.navLabel, showHeader: showHeader, showFooter: showFooter, screenId: screenId, overrides: overrides, onAction: onAction, className: ['digital-id-providers-redirect', className].filter(Boolean).join(' '), ...shell })));
|
|
17
|
+
DigitalIdProvidersRedirectScreen.displayName = 'DigitalIdProvidersRedirectScreen';
|
|
18
|
+
export default DigitalIdProvidersRedirectScreen;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/** The five ways a provider run can fail (`27707:9338`). */
|
|
2
|
+
export type DigitalIdProvidersErrorState = 'unavailable' | 'consent-denied' | 'timed-out' | 'not-accepted' | 'expired';
|
|
3
|
+
/** One provider row on the chooser. `id` is what `onOptionSelect` reports. */
|
|
4
|
+
export interface DigitalIdProvidersOption {
|
|
5
|
+
id: string;
|
|
6
|
+
/** "iDIN", "itsme", "CA DMV Wallet"… */
|
|
7
|
+
label: string;
|
|
8
|
+
}
|
|
9
|
+
/** What the person picked: a physical document, or a provider by its id. */
|
|
10
|
+
export type DigitalIdProvidersSelection = {
|
|
11
|
+
kind: 'id';
|
|
12
|
+
} | {
|
|
13
|
+
kind: 'passport';
|
|
14
|
+
} | {
|
|
15
|
+
kind: 'provider';
|
|
16
|
+
providerId: string;
|
|
17
|
+
};
|
|
18
|
+
export interface DigitalIdProvidersStrings {
|
|
19
|
+
/** Accessible name for the logo nav region (i18n — no baked-in English). */
|
|
20
|
+
navLabel?: string;
|
|
21
|
+
/** "verified by" attribution copy for the footer tag. */
|
|
22
|
+
verifiedLabel: string;
|
|
23
|
+
/** `Document Chooser` (27753:8099). */
|
|
24
|
+
documentSelection: {
|
|
25
|
+
/** "Select how to verify" — the module's one chooser title (owner call,
|
|
26
|
+
* 2026-10-28; the frame says "Verify your identity"). */
|
|
27
|
+
title: string;
|
|
28
|
+
/** "Viewing options for" — before the country. */
|
|
29
|
+
countryLabel: string;
|
|
30
|
+
/** ISO code of the country the options are for, e.g. "US" (the flag). */
|
|
31
|
+
countryCode: string;
|
|
32
|
+
/** The country as shown, e.g. "US". */
|
|
33
|
+
countryName: string;
|
|
34
|
+
/** "Use your ID" */
|
|
35
|
+
idSectionLabel: string;
|
|
36
|
+
/** "Identity Card" */
|
|
37
|
+
idLabel: string;
|
|
38
|
+
/** "Passport" */
|
|
39
|
+
passportLabel: string;
|
|
40
|
+
/** "Digital ID verification" */
|
|
41
|
+
providersSectionLabel: string;
|
|
42
|
+
/** The providers the flow offers, in order. */
|
|
43
|
+
providers: DigitalIdProvidersOption[];
|
|
44
|
+
};
|
|
45
|
+
/** `Redirecting` (1-18-1-id-hold-on, 27707:9281). */
|
|
46
|
+
redirecting: {
|
|
47
|
+
/** "Redirecting for verification…" */
|
|
48
|
+
title: string;
|
|
49
|
+
/** "You'll be redirected to complete verification" */
|
|
50
|
+
subtitle?: string;
|
|
51
|
+
};
|
|
52
|
+
/** `Errors` (27707:9338), one slice per state. */
|
|
53
|
+
errors: Record<DigitalIdProvidersErrorState, {
|
|
54
|
+
title: string;
|
|
55
|
+
subtitle?: string;
|
|
56
|
+
/** "Try again", or "Scan ID" when the provider is unavailable. */
|
|
57
|
+
ctaLabel: string;
|
|
58
|
+
/** "Choose another method" — one wording on every error (owner call,
|
|
59
|
+
* 2026-10-28; the frame says "Change verification method" on two). */
|
|
60
|
+
secondaryCtaLabel: string;
|
|
61
|
+
}>;
|
|
62
|
+
/** The accepted-documents card on `not-accepted` and `expired`. */
|
|
63
|
+
acceptedDocuments: {
|
|
64
|
+
/** ISO code for the flag, e.g. "IN". */
|
|
65
|
+
countryCode: string;
|
|
66
|
+
/** "India" */
|
|
67
|
+
country: string;
|
|
68
|
+
/** Emoji fallback when the flag is outside Core's raster bank. */
|
|
69
|
+
flag?: string;
|
|
70
|
+
documents: string[];
|
|
71
|
+
};
|
|
72
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Digital ID Providers — copy contract.
|
|
2
|
+
//
|
|
3
|
+
// Every Digital ID Providers screen receives the SAME `strings:
|
|
4
|
+
// DigitalIdProvidersStrings` object (rule: all copy via props, no hardcoded
|
|
5
|
+
// English — GUIDELINES.md §9).
|
|
6
|
+
//
|
|
7
|
+
// Authoritative screens: `Digital ID Providers - Latest Designs` Figma file
|
|
8
|
+
// (q0wiyQkLXxGQ2jkPEutxR8) — the chooser `Document Chooser` (27753:8099) and its
|
|
9
|
+
// full provider list (27703:4895), and the section `🪪 Digital ID Verification
|
|
10
|
+
// Flow - 🌐 Web - Full flow` (27707:9237): Redirecting, the provider's own pages
|
|
11
|
+
// (OS chrome, not built), success and five errors. Web only: the providers
|
|
12
|
+
// redirect out of the browser to the provider's site and back (Web SDK,
|
|
13
|
+
// `digitalIdRedirect`). These screens sit in the Digital IDs module beside the
|
|
14
|
+
// device wallets (`DigitalIdDeviceWallets*`), and share its success screen.
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type PrizmaReviewScreenProps } from './ReviewScreen';
|
|
3
|
+
import type { PrizmaScreenActionHandler, PrizmaScreenOverrides } from './types';
|
|
4
|
+
import type { DigitalIdUploadStrings } from './DigitalIdUploadStrings';
|
|
5
|
+
import './ScreenLayout.css';
|
|
6
|
+
export interface DigitalIdUploadErrorScreenProps extends Omit<PrizmaReviewScreenProps, 'stage' | 'title' | 'subtitle' | 'successTitle' | 'analyzingLabel' | 'primaryLabel' | 'secondaryLabel' | 'verifiedLabel' | 'children'> {
|
|
7
|
+
/** Module copy — this screen reads the `error` slice. */
|
|
8
|
+
strings: DigitalIdUploadStrings;
|
|
9
|
+
screenId?: string;
|
|
10
|
+
overrides?: PrizmaScreenOverrides;
|
|
11
|
+
onAction?: PrizmaScreenActionHandler;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Digital ID Upload — the uploaded file was rejected, built on the
|
|
15
|
+
* `PrizmaReviewScreen` archetype's `error` stage (GUIDELINES.md §6-H). Figma:
|
|
16
|
+
* `Upload Digital ID` file (wxFsHRvllern4VnjRqM4JO), `Errors` section,
|
|
17
|
+
* `Error` frame (node 25874:11957).
|
|
18
|
+
*
|
|
19
|
+
* Kept separate from `DigitalIdUploadReviewScreen` (the confirm flow) rather
|
|
20
|
+
* than folded into it as a fourth stage of that wrapper — same split Document
|
|
21
|
+
* Capture draws between its confirm screens and
|
|
22
|
+
* `DocumentCaptureGenericErrorScreen`, even though here both wrappers happen
|
|
23
|
+
* to share the same archetype under the hood. The media is
|
|
24
|
+
* `PrizmaCaptureDigitalId state="error"` (red 4px border) — the same managed
|
|
25
|
+
* component every other stage uses, not a bespoke verdict illustration — and
|
|
26
|
+
* the header/footer are hidden exactly like `analyzing`/`success`
|
|
27
|
+
* (`centeredWhenNoNav`, since this Figma frame draws the identical symmetric
|
|
28
|
+
* header/media/CTA skeleton).
|
|
29
|
+
*/
|
|
30
|
+
export declare const DigitalIdUploadErrorScreen: React.ForwardRefExoticComponent<DigitalIdUploadErrorScreenProps & React.RefAttributes<HTMLDivElement>>;
|
|
31
|
+
export default DigitalIdUploadErrorScreen;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { PrizmaCaptureDigitalId } from '@incodetech/prizma-core-web/capture-digital-id';
|
|
5
|
+
import { PrizmaReviewScreen } from './ReviewScreen';
|
|
6
|
+
import './ScreenLayout.css';
|
|
7
|
+
/**
|
|
8
|
+
* Digital ID Upload — the uploaded file was rejected, built on the
|
|
9
|
+
* `PrizmaReviewScreen` archetype's `error` stage (GUIDELINES.md §6-H). Figma:
|
|
10
|
+
* `Upload Digital ID` file (wxFsHRvllern4VnjRqM4JO), `Errors` section,
|
|
11
|
+
* `Error` frame (node 25874:11957).
|
|
12
|
+
*
|
|
13
|
+
* Kept separate from `DigitalIdUploadReviewScreen` (the confirm flow) rather
|
|
14
|
+
* than folded into it as a fourth stage of that wrapper — same split Document
|
|
15
|
+
* Capture draws between its confirm screens and
|
|
16
|
+
* `DocumentCaptureGenericErrorScreen`, even though here both wrappers happen
|
|
17
|
+
* to share the same archetype under the hood. The media is
|
|
18
|
+
* `PrizmaCaptureDigitalId state="error"` (red 4px border) — the same managed
|
|
19
|
+
* component every other stage uses, not a bespoke verdict illustration — and
|
|
20
|
+
* the header/footer are hidden exactly like `analyzing`/`success`
|
|
21
|
+
* (`centeredWhenNoNav`, since this Figma frame draws the identical symmetric
|
|
22
|
+
* header/media/CTA skeleton).
|
|
23
|
+
*/
|
|
24
|
+
export const DigitalIdUploadErrorScreen = forwardRef(({ strings, screenId = 'digital-id-upload-error', showHeader = false, showFooter = false, overrides, onAction, ...shell }, ref) => (_jsx(PrizmaReviewScreen, { ref: ref, stage: "error", title: strings.error.title, subtitle: strings.error.subtitle, primaryLabel: strings.error.ctaLabel, centeredWhenNoNav: true, verifiedLabel: strings.verifiedLabel, navLabel: strings.navLabel, showHeader: showHeader, showFooter: showFooter, screenId: screenId, overrides: overrides, onAction: onAction, ...shell, children: _jsx(PrizmaCaptureDigitalId, { state: "error" }) })));
|
|
25
|
+
DigitalIdUploadErrorScreen.displayName = 'DigitalIdUploadErrorScreen';
|
|
26
|
+
export default DigitalIdUploadErrorScreen;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type PrizmaResultScreenProps } from './ResultScreen';
|
|
3
|
+
import type { PrizmaScreenActionHandler, PrizmaScreenOverrides } from './types';
|
|
4
|
+
import type { DigitalIdUploadStrings } from './DigitalIdUploadStrings';
|
|
5
|
+
import './ScreenLayout.css';
|
|
6
|
+
export interface DigitalIdUploadFileTooLargeScreenProps extends Omit<PrizmaResultScreenProps, 'status' | 'title' | 'subtitle' | 'ctaLabel' | 'verifiedLabel' | 'navLabel'> {
|
|
7
|
+
/** Module copy — this screen reads the `fileTooLarge` slice. */
|
|
8
|
+
strings: DigitalIdUploadStrings;
|
|
9
|
+
screenId?: string;
|
|
10
|
+
overrides?: PrizmaScreenOverrides;
|
|
11
|
+
onAction?: PrizmaScreenActionHandler;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Digital ID Upload — the selected file exceeds the size limit, built on the
|
|
15
|
+
* `PrizmaResultScreen` archetype (GUIDELINES.md §6-F). Figma: `Upload Digital
|
|
16
|
+
* ID` file (wxFsHRvllern4VnjRqM4JO), `Errors` section, `File Limit Error`
|
|
17
|
+
* frame (node 26083:3981).
|
|
18
|
+
*
|
|
19
|
+
* Unlike `DigitalIdUploadErrorScreen` (the rejected-document verdict, built on
|
|
20
|
+
* the Review archetype because it reuses `PrizmaCaptureDigitalId`), this
|
|
21
|
+
* screen never had a file to show — the size check runs before anything
|
|
22
|
+
* uploads — so Figma draws the plain F recipe: status icon + title + subtitle
|
|
23
|
+
* centred in the full height, one CTA pinned near the bottom. No media slot,
|
|
24
|
+
* no card, nothing to reuse from the capture component.
|
|
25
|
+
*/
|
|
26
|
+
export declare const DigitalIdUploadFileTooLargeScreen: React.ForwardRefExoticComponent<DigitalIdUploadFileTooLargeScreenProps & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
export default DigitalIdUploadFileTooLargeScreen;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { PrizmaResultScreen } from './ResultScreen';
|
|
5
|
+
import './ScreenLayout.css';
|
|
6
|
+
/**
|
|
7
|
+
* Digital ID Upload — the selected file exceeds the size limit, built on the
|
|
8
|
+
* `PrizmaResultScreen` archetype (GUIDELINES.md §6-F). Figma: `Upload Digital
|
|
9
|
+
* ID` file (wxFsHRvllern4VnjRqM4JO), `Errors` section, `File Limit Error`
|
|
10
|
+
* frame (node 26083:3981).
|
|
11
|
+
*
|
|
12
|
+
* Unlike `DigitalIdUploadErrorScreen` (the rejected-document verdict, built on
|
|
13
|
+
* the Review archetype because it reuses `PrizmaCaptureDigitalId`), this
|
|
14
|
+
* screen never had a file to show — the size check runs before anything
|
|
15
|
+
* uploads — so Figma draws the plain F recipe: status icon + title + subtitle
|
|
16
|
+
* centred in the full height, one CTA pinned near the bottom. No media slot,
|
|
17
|
+
* no card, nothing to reuse from the capture component.
|
|
18
|
+
*/
|
|
19
|
+
export const DigitalIdUploadFileTooLargeScreen = forwardRef(({ strings, screenId = 'digital-id-upload-file-too-large', showHeader = false, showFooter = false, overrides, onAction, ...shell }, ref) => (_jsx(PrizmaResultScreen, { ref: ref, status: "error", title: strings.fileTooLarge.title, subtitle: strings.fileTooLarge.subtitle, ctaLabel: strings.fileTooLarge.ctaLabel, verifiedLabel: strings.verifiedLabel, navLabel: strings.navLabel, showHeader: showHeader, showFooter: showFooter, screenId: screenId, overrides: overrides, onAction: onAction, ...shell })));
|
|
20
|
+
DigitalIdUploadFileTooLargeScreen.displayName = 'DigitalIdUploadFileTooLargeScreen';
|
|
21
|
+
export default DigitalIdUploadFileTooLargeScreen;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type PrizmaReviewScreenProps } from './ReviewScreen';
|
|
3
|
+
import type { PrizmaScreenActionHandler, PrizmaScreenOverrides } from './types';
|
|
4
|
+
import type { DigitalIdUploadConfirmStage, DigitalIdUploadStrings } from './DigitalIdUploadStrings';
|
|
5
|
+
import './ScreenLayout.css';
|
|
6
|
+
export interface DigitalIdUploadReviewScreenProps extends Omit<PrizmaReviewScreenProps, 'title' | 'subtitle' | 'successTitle' | 'analyzingLabel' | 'primaryLabel' | 'secondaryLabel' | 'verifiedLabel' | 'children' | 'stage'> {
|
|
7
|
+
/** Module copy — this screen reads the `review` slice. */
|
|
8
|
+
strings: DigitalIdUploadStrings;
|
|
9
|
+
/** Which stage of the confirm flow to render. Default `review`. */
|
|
10
|
+
stage?: DigitalIdUploadConfirmStage;
|
|
11
|
+
/** The uploaded file's name, shown under the card on `review` only. Not
|
|
12
|
+
* copy — it is runtime data from the picker, so it stays out of
|
|
13
|
+
* `strings` (same contract as `DocumentCaptureConfirmUploadScreen`). */
|
|
14
|
+
filename?: string;
|
|
15
|
+
/** Loading-bar progress on `analyzing`, 0–100. */
|
|
16
|
+
progress?: number;
|
|
17
|
+
screenId?: string;
|
|
18
|
+
overrides?: PrizmaScreenOverrides;
|
|
19
|
+
onAction?: PrizmaScreenActionHandler;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Digital ID Upload — review / analyzing / success, built on the
|
|
23
|
+
* `PrizmaReviewScreen` archetype (GUIDELINES.md §6-H). Figma: `Upload Digital
|
|
24
|
+
* ID` file (wxFsHRvllern4VnjRqM4JO), "Web Happy Path - Light Mode" section —
|
|
25
|
+
* `Review Document` / `Analyzing` / `Success` (nodes 25351:14725/6/7).
|
|
26
|
+
*
|
|
27
|
+
* The media stage is Core's `PrizmaCaptureDigitalId` across all three stages
|
|
28
|
+
* — its own state enum (`review` / `analyzing` / `success`) maps directly
|
|
29
|
+
* onto the archetype's stage axis, so it already owns the border treatment
|
|
30
|
+
* (neutral on review, green 4px on analyzing/success), the scan-flash sweep
|
|
31
|
+
* and the filename row. Nothing is hand-built here, unlike
|
|
32
|
+
* `DocumentCaptureConfirmUploadScreen`'s bespoke file-card — Core ships a
|
|
33
|
+
* purpose-built component for this module.
|
|
34
|
+
*
|
|
35
|
+
* Header/footer visibility is genuinely per-stage in this Figma (logo nav +
|
|
36
|
+
* verified tag show on `review`, both are absent on `analyzing` and
|
|
37
|
+
* `success`) — not a layout choice this file invents, just the existing
|
|
38
|
+
* `showHeader`/`showFooter` chrome knobs (owner rule 2026-08-18: header and
|
|
39
|
+
* footer are independently controlled) applied per stage.
|
|
40
|
+
*
|
|
41
|
+
* Always opts into the archetype's `centeredWhenNoNav` — it only takes effect
|
|
42
|
+
* while the nav is hidden (`analyzing`/`success` here), where this Figma
|
|
43
|
+
* draws the header + media as one group centred with equal space above and
|
|
44
|
+
* below it, not a pinned header (see ReviewScreen.tsx for the mechanics).
|
|
45
|
+
* `review` always shows its own nav, so the flag is a no-op there, and the
|
|
46
|
+
* default `false` leaves Document Capture's existing analyzing/success
|
|
47
|
+
* screens byte-for-byte unchanged (neither ever hides the nav here).
|
|
48
|
+
*
|
|
49
|
+
* GAP (report, not workaround — README rule 2): Figma's `Success` section
|
|
50
|
+
* also shows a subtitle ("Let's continue") under the success title, but the
|
|
51
|
+
* shared `PrizmaReviewScreen` archetype only renders a subtitle on
|
|
52
|
+
* `stage="review"` — every other current consumer's success state has none.
|
|
53
|
+
* Left unset here pending an owner call on whether to extend the shared
|
|
54
|
+
* archetype with a `successSubtitle` slot.
|
|
55
|
+
*/
|
|
56
|
+
export declare const DigitalIdUploadReviewScreen: React.ForwardRefExoticComponent<DigitalIdUploadReviewScreenProps & React.RefAttributes<HTMLDivElement>>;
|
|
57
|
+
export default DigitalIdUploadReviewScreen;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { PrizmaCaptureDigitalId } from '@incodetech/prizma-core-web/capture-digital-id';
|
|
5
|
+
import { PrizmaReviewScreen } from './ReviewScreen';
|
|
6
|
+
import './ScreenLayout.css';
|
|
7
|
+
/**
|
|
8
|
+
* Digital ID Upload — review / analyzing / success, built on the
|
|
9
|
+
* `PrizmaReviewScreen` archetype (GUIDELINES.md §6-H). Figma: `Upload Digital
|
|
10
|
+
* ID` file (wxFsHRvllern4VnjRqM4JO), "Web Happy Path - Light Mode" section —
|
|
11
|
+
* `Review Document` / `Analyzing` / `Success` (nodes 25351:14725/6/7).
|
|
12
|
+
*
|
|
13
|
+
* The media stage is Core's `PrizmaCaptureDigitalId` across all three stages
|
|
14
|
+
* — its own state enum (`review` / `analyzing` / `success`) maps directly
|
|
15
|
+
* onto the archetype's stage axis, so it already owns the border treatment
|
|
16
|
+
* (neutral on review, green 4px on analyzing/success), the scan-flash sweep
|
|
17
|
+
* and the filename row. Nothing is hand-built here, unlike
|
|
18
|
+
* `DocumentCaptureConfirmUploadScreen`'s bespoke file-card — Core ships a
|
|
19
|
+
* purpose-built component for this module.
|
|
20
|
+
*
|
|
21
|
+
* Header/footer visibility is genuinely per-stage in this Figma (logo nav +
|
|
22
|
+
* verified tag show on `review`, both are absent on `analyzing` and
|
|
23
|
+
* `success`) — not a layout choice this file invents, just the existing
|
|
24
|
+
* `showHeader`/`showFooter` chrome knobs (owner rule 2026-08-18: header and
|
|
25
|
+
* footer are independently controlled) applied per stage.
|
|
26
|
+
*
|
|
27
|
+
* Always opts into the archetype's `centeredWhenNoNav` — it only takes effect
|
|
28
|
+
* while the nav is hidden (`analyzing`/`success` here), where this Figma
|
|
29
|
+
* draws the header + media as one group centred with equal space above and
|
|
30
|
+
* below it, not a pinned header (see ReviewScreen.tsx for the mechanics).
|
|
31
|
+
* `review` always shows its own nav, so the flag is a no-op there, and the
|
|
32
|
+
* default `false` leaves Document Capture's existing analyzing/success
|
|
33
|
+
* screens byte-for-byte unchanged (neither ever hides the nav here).
|
|
34
|
+
*
|
|
35
|
+
* GAP (report, not workaround — README rule 2): Figma's `Success` section
|
|
36
|
+
* also shows a subtitle ("Let's continue") under the success title, but the
|
|
37
|
+
* shared `PrizmaReviewScreen` archetype only renders a subtitle on
|
|
38
|
+
* `stage="review"` — every other current consumer's success state has none.
|
|
39
|
+
* Left unset here pending an owner call on whether to extend the shared
|
|
40
|
+
* archetype with a `successSubtitle` slot.
|
|
41
|
+
*/
|
|
42
|
+
export const DigitalIdUploadReviewScreen = forwardRef(({ strings, stage = 'review', filename, progress = 45, showHeader = stage === 'review', showFooter = stage === 'review', screenId = `digital-id-upload-${stage}`, overrides, onAction, ...shell }, ref) => (_jsx(PrizmaReviewScreen, { ref: ref, stage: stage, title: strings.review.title, subtitle: strings.review.subtitle, successTitle: strings.review.successTitle, analyzingLabel: strings.review.analyzingLabel, centeredWhenNoNav: true, progress: progress, primaryLabel: strings.review.ctaLabel, secondaryLabel: strings.review.replaceLabel, verifiedLabel: strings.verifiedLabel, navLabel: strings.navLabel, showHeader: showHeader, showFooter: showFooter, screenId: screenId, overrides: overrides, onAction: onAction, ...shell, children: _jsx(PrizmaCaptureDigitalId, { state: stage, filename: filename }) })));
|
|
43
|
+
DigitalIdUploadReviewScreen.displayName = 'DigitalIdUploadReviewScreen';
|
|
44
|
+
export default DigitalIdUploadReviewScreen;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/** The three stages the confirm flow's screen shares — matches
|
|
2
|
+
* `PrizmaReviewScreen`'s own `PrizmaReviewStage` (ReviewScreen.tsx). Kept as
|
|
3
|
+
* a separate module-scoped type rather than importing it, same convention as
|
|
4
|
+
* `DocumentCaptureConfirmStage` (DocumentCaptureStrings.ts). */
|
|
5
|
+
export type DigitalIdUploadConfirmStage = 'review' | 'analyzing' | 'success';
|
|
6
|
+
export interface DigitalIdUploadStrings {
|
|
7
|
+
/** Accessible name for the logo nav region (i18n — no baked-in English). */
|
|
8
|
+
navLabel?: string;
|
|
9
|
+
/** "verified by" attribution copy for the footer tag. */
|
|
10
|
+
verifiedLabel: string;
|
|
11
|
+
/** `Tutorial Screen` (node 25351:14722). */
|
|
12
|
+
tutorial: {
|
|
13
|
+
title: string;
|
|
14
|
+
subtitle?: string;
|
|
15
|
+
/** "Upload PDF" */
|
|
16
|
+
ctaLabel: string;
|
|
17
|
+
};
|
|
18
|
+
/** `Review Document` / `Analyzing` / `Success` (nodes
|
|
19
|
+
* 25351:14725/14726/14727) — one screen, three stages. */
|
|
20
|
+
review: {
|
|
21
|
+
/** `review` title ("Review document"). */
|
|
22
|
+
title: string;
|
|
23
|
+
/** `review` description. Figma draws no subtitle on `analyzing` or
|
|
24
|
+
* `success` — the shared `PrizmaReviewScreen` archetype already only
|
|
25
|
+
* shows one on `review`, so this needs no per-stage handling here. */
|
|
26
|
+
subtitle?: string;
|
|
27
|
+
/** Loading-bar caption on `analyzing` ("Analyzing.."). */
|
|
28
|
+
analyzingLabel: string;
|
|
29
|
+
/** H2 on `success` ("Successfully processed!"). */
|
|
30
|
+
successTitle: string;
|
|
31
|
+
/** Secondary CTA on `review` ("Replace file"). */
|
|
32
|
+
replaceLabel: string;
|
|
33
|
+
/** Primary CTA on `review` / `success` ("Continue"). */
|
|
34
|
+
ctaLabel: string;
|
|
35
|
+
};
|
|
36
|
+
/** `Errors` section, `Error` frame (node 25874:11957) — the uploaded file
|
|
37
|
+
* itself was rejected (wrong document type). Built on the SAME
|
|
38
|
+
* `PrizmaReviewScreen` archetype as `review`, stage `"error"`: the card
|
|
39
|
+
* reuses `PrizmaCaptureDigitalId state="error"` (red 4px border), not a
|
|
40
|
+
* generic archetype-F verdict screen (DigitalIdUploadErrorScreen.tsx). */
|
|
41
|
+
error: {
|
|
42
|
+
/** "ID type is not accepted" */
|
|
43
|
+
title: string;
|
|
44
|
+
/** "Please try scanning a different document" */
|
|
45
|
+
subtitle?: string;
|
|
46
|
+
/** "Scan your ID" */
|
|
47
|
+
ctaLabel: string;
|
|
48
|
+
};
|
|
49
|
+
/** `Errors` section, `File Limit Error` frame (node 26083:3981) — the file
|
|
50
|
+
* was never uploaded at all (client-side size check), so there is no
|
|
51
|
+
* rejected document to show. Built on Archetype F (`PrizmaResultScreen`,
|
|
52
|
+
* ResultScreen.tsx) rather than the review archetype `error` uses above —
|
|
53
|
+
* Figma centres the status + title + subtitle in the full available
|
|
54
|
+
* height with no media stage at all, exactly F's shape, not H's
|
|
55
|
+
* header-above-a-card one (DigitalIdUploadFileTooLargeScreen.tsx). */
|
|
56
|
+
fileTooLarge: {
|
|
57
|
+
/** "File is too large" */
|
|
58
|
+
title: string;
|
|
59
|
+
/** "The selected file is larger than 5 MB, please upload a smaller one" */
|
|
60
|
+
subtitle?: string;
|
|
61
|
+
/** "Choose another file" */
|
|
62
|
+
ctaLabel: string;
|
|
63
|
+
};
|
|
64
|
+
}
|