@incodetech/prizma-core-screens 0.2.7 → 0.2.12
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/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 +16 -0
- package/dist/index.js +12 -0
- package/dist/styles.css +3 -0
- package/package.json +68 -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/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 +74 -3
- package/src/styles.css +3 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/** The document types the identity-reuse backend returns. The SDK's own
|
|
2
|
+
* vocabulary (`identityReuse.documentType.*`). */
|
|
3
|
+
export type ReusabilityDocumentType = 'passport' | 'idCard' | 'driversLicense';
|
|
4
|
+
/**
|
|
5
|
+
* One reusable credential, as the backend describes it — DATA, not copy. The
|
|
6
|
+
* host formats the date (the SDK composes "Verified" + an `Intl` short date
|
|
7
|
+
* client-side, `identity-reuse.tsx` `formatVerifiedAt`) and masks the number.
|
|
8
|
+
*/
|
|
9
|
+
export interface ReusableCredential {
|
|
10
|
+
/** Stable id the host submits back on selection. */
|
|
11
|
+
id: string;
|
|
12
|
+
documentType: ReusabilityDocumentType;
|
|
13
|
+
/** ISO 3166-1 alpha-2. Resolves to Core's flag raster bank
|
|
14
|
+
* (`PrizmaCountryFlag`, 24×18); a country outside the bundled bank falls back
|
|
15
|
+
* to `countryFlag`. */
|
|
16
|
+
countryCode: string;
|
|
17
|
+
/** Emoji fallback for a country the raster bank does not carry — Core's own
|
|
18
|
+
* fallback rule for the Combined input and the Document List card. */
|
|
19
|
+
countryFlag?: string;
|
|
20
|
+
/** Already masked by the backend ("MP1******3815"). */
|
|
21
|
+
maskedNumber: string;
|
|
22
|
+
/** Already formatted by the host ("Apr 2023"). Rendered after
|
|
23
|
+
* `selection.verifiedPrefix`. */
|
|
24
|
+
verifiedOn: string;
|
|
25
|
+
}
|
|
26
|
+
export interface ReusabilityStrings {
|
|
27
|
+
/** "verified by" attribution in the footer tag. */
|
|
28
|
+
verifiedLabel: string;
|
|
29
|
+
/** Accessible name for the logo nav row. */
|
|
30
|
+
navLabel?: string;
|
|
31
|
+
/** The `doc selection` frames — the one screen of the module. */
|
|
32
|
+
selection: {
|
|
33
|
+
/** H2 ("Share your details for a faster verification"). */
|
|
34
|
+
title: string;
|
|
35
|
+
/** H5 under the title. The frame's recipient placeholder is `{Company B}`;
|
|
36
|
+
* the SDK interpolates `{{companyName}}` (`identityReuse.subtitleWithCompany`). */
|
|
37
|
+
subtitle: string;
|
|
38
|
+
/** Accessible name of the option list. */
|
|
39
|
+
listLabel: string;
|
|
40
|
+
/** The document-type label on each credential row ("Passport"). */
|
|
41
|
+
documentType: Record<ReusabilityDocumentType, string>;
|
|
42
|
+
/** The pill on the first row — the backend orders the list best match
|
|
43
|
+
* first, and the first is tagged ("Recommended"). */
|
|
44
|
+
recommendedTag: string;
|
|
45
|
+
/** The word before the formatted date on each row ("Verified"). The SDK
|
|
46
|
+
* translates only this word and appends the date locally. */
|
|
47
|
+
verifiedPrefix: string;
|
|
48
|
+
/** The last row — capture a document instead of reusing one. */
|
|
49
|
+
scanNewLabel: string;
|
|
50
|
+
/** The pill on that row ("Slowest"). */
|
|
51
|
+
slowestTag: string;
|
|
52
|
+
/** First tertiary link under the list ("What data will be shared?"):
|
|
53
|
+
* opens the shared-details sheet. */
|
|
54
|
+
sharedDataLink: string;
|
|
55
|
+
/** Second tertiary link ("Incode’s Privacy Policy"): opens the policy. */
|
|
56
|
+
privacyPolicyLink: string;
|
|
57
|
+
};
|
|
58
|
+
/** The `shared info` frame — Core's bottom sheet over the selection. */
|
|
59
|
+
sharedDetails: {
|
|
60
|
+
/** Sheet heading, Core's H1 ("Shared details"). */
|
|
61
|
+
title: string;
|
|
62
|
+
/** Under the heading ("Only the following information will be shared with
|
|
63
|
+
* {Company B}."). */
|
|
64
|
+
subtitle: string;
|
|
65
|
+
/** The bullet list — what the recipient asked for. In production these
|
|
66
|
+
* come from the recipient's data-sharing request (ENG-57939 acceptance
|
|
67
|
+
* criteria), so the list is host data rendered through this slot. */
|
|
68
|
+
items: string[];
|
|
69
|
+
/** The sheet's one button ("Understood"). */
|
|
70
|
+
ctaLabel: string;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* The `demo_5` frame — Incode's privacy policy, read inside the flow. The
|
|
74
|
+
* document ITSELF is not here: it is host content (the policy at
|
|
75
|
+
* incode.com/privacy, in the host's language), supplied through the screen's
|
|
76
|
+
* `body` slot the way Qualified Signature's viewers take their contract.
|
|
77
|
+
*/
|
|
78
|
+
privacyPolicy: {
|
|
79
|
+
/** H2 the archetype requires; the frame draws none (DEVIATIONS #RU-7).
|
|
80
|
+
* The link's own label ("Incode’s Privacy Policy") is the natural title. */
|
|
81
|
+
title: string;
|
|
82
|
+
/** Primary under the document ("Done"): back to the selection. */
|
|
83
|
+
ctaLabel: string;
|
|
84
|
+
};
|
|
85
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Reusability (Incode Bridge) — copy contract.
|
|
2
|
+
//
|
|
3
|
+
// The credential-reuse step of an Incode Bridge session: a returning person
|
|
4
|
+
// who already verified with another member of the network is offered the
|
|
5
|
+
// document they verified there, so they can skip ID capture at the company
|
|
6
|
+
// they are onboarding with now. The SDK module is `identity-reuse`
|
|
7
|
+
// (`incode-identity-reuse`, i18n namespace `identityReuse`); the product name
|
|
8
|
+
// is Incode Bridge; the design file calls it Reusability. Bridge is NOT Trust
|
|
9
|
+
// Graph: it moves the person's own credential, with their consent, to remove
|
|
10
|
+
// friction — it makes no fraud claim (MVP spec, Notion, 2026-08-17).
|
|
11
|
+
//
|
|
12
|
+
// Figma: `Reusability - In Experimentation` (f4AsCbOBP29IbTQLxBNgNG), section
|
|
13
|
+
// `Reusability Iterations` (7877:68814) — the iteration Camila shared with the
|
|
14
|
+
// Identity team on 2026-09-19 and that the Web SDK built as ENG-57939 (Dusan,
|
|
15
|
+
// PR #1021, "one-click credential selection with shared-data sheet"). Four
|
|
16
|
+
// frames:
|
|
17
|
+
// · 7877:68816 `doc selection` Multiple documents — two reusable passports
|
|
18
|
+
// and the "Scan a new document" row
|
|
19
|
+
// · 7877:68875 `doc selection` Single document — one passport and the row
|
|
20
|
+
// · 7877:68927 `shared info` Shared data — Core's bottom sheet over the
|
|
21
|
+
// selection listing what will be shared
|
|
22
|
+
// · 7877:68997 `demo_5` Privacy Policy — Incode's policy, read in
|
|
23
|
+
// the flow, Done at the bottom
|
|
24
|
+
//
|
|
25
|
+
// Two product decisions shape the copy (consent review with legal, Granola
|
|
26
|
+
// 2026-09-16; Vlado, #reusability 2026-09-15):
|
|
27
|
+
// 1. The subtitle says WHO holds the data and that Incode only passes it:
|
|
28
|
+
// "A company you previously verified with holds a document you can reuse.
|
|
29
|
+
// Incode only passes it to {Company B}." The donor is never named (it may
|
|
30
|
+
// be a regulated entity); the recipient is.
|
|
31
|
+
// 2. Selecting a document ADVANCES — no confirm button. A mis-tap is
|
|
32
|
+
// recovered with the nav's way back, not with a second step.
|
|
33
|
+
//
|
|
34
|
+
// No hardcoded English anywhere in a screen: every visible string arrives
|
|
35
|
+
// here, so the host's locale pack drives the module. The SDK's `identityReuse`
|
|
36
|
+
// namespace already carries ES and PT for almost every sentence below.
|
|
37
|
+
export {};
|
package/dist/ReviewScreen.d.ts
CHANGED
|
@@ -3,18 +3,24 @@ import { type PrizmaScreenShellProps } from './ScreenShell';
|
|
|
3
3
|
import type { PrizmaScreenActionHandler, PrizmaScreenChromeProps, PrizmaScreenOverrides } from './types';
|
|
4
4
|
import './ScreenLayout.css';
|
|
5
5
|
/**
|
|
6
|
-
* The
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* own
|
|
6
|
+
* The stages a captured-media review section shares. Identical skeleton —
|
|
7
|
+
* only the header block (Title vs loading bar), the media's own state and
|
|
8
|
+
* the presence of the CTA row change. `review`/`analyzing`/`success` name the
|
|
9
|
+
* modules' own confirm-flow axis (`DocumentCaptureConfirmStage`, Video
|
|
10
|
+
* Selfie's review step); `error` is Digital ID Upload-only so far — its
|
|
11
|
+
* verdict screen shows the SAME rejected-file media the confirm flow does
|
|
12
|
+
* (`PrizmaCaptureDigitalId state="error"`), drawn with the identical
|
|
13
|
+
* header/media/CTA skeleton as `analyzing`/`success` (`Upload Digital ID`
|
|
14
|
+
* file wxFsHRvllern4VnjRqM4JO, node 25874:11957) — not archetype F, whose
|
|
15
|
+
* verdict screens carry no media stage of their own.
|
|
10
16
|
*/
|
|
11
|
-
export type PrizmaReviewStage = 'review' | 'analyzing' | 'success';
|
|
17
|
+
export type PrizmaReviewStage = 'review' | 'analyzing' | 'success' | 'error';
|
|
12
18
|
export interface PrizmaReviewScreenProps extends Omit<PrizmaScreenShellProps, 'dark' | 'title' | 'children'>, Pick<PrizmaScreenChromeProps, 'showHeader' | 'showFooter'> {
|
|
13
19
|
/** Which review stage to render. Default `review`. */
|
|
14
20
|
stage?: PrizmaReviewStage;
|
|
15
21
|
/** H2 review/base title ("Review your document"). */
|
|
16
22
|
title: string;
|
|
17
|
-
/** Supporting copy under the title — drawn on `review`
|
|
23
|
+
/** Supporting copy under the title — drawn on `review`/`error` (Figma). */
|
|
18
24
|
subtitle?: string;
|
|
19
25
|
/** Title shown on `success`; falls back to `title` when omitted. */
|
|
20
26
|
successTitle?: string;
|
|
@@ -28,6 +34,25 @@ export interface PrizmaReviewScreenProps extends Omit<PrizmaScreenShellProps, 'd
|
|
|
28
34
|
analyzingState?: 'analyzing' | 'uploading';
|
|
29
35
|
/** Loading-bar progress on `analyzing`, 0–100. */
|
|
30
36
|
progress?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Only takes effect while the nav is hidden (`showHeader=false` — every
|
|
39
|
+
* current no-nav stage is `analyzing`/`success`). Default `false` —
|
|
40
|
+
* Document Capture's verified layout (DEVIATIONS #DC-22/24): the header
|
|
41
|
+
* sits where a title normally would, Spacing/32 above the stage, and
|
|
42
|
+
* whatever follows (the stage, then an optional band) centres or flows
|
|
43
|
+
* independently.
|
|
44
|
+
*
|
|
45
|
+
* `true`: the header and the media centre as ONE group — leftover space
|
|
46
|
+
* splits evenly above the header and below the trailing content (the CTA
|
|
47
|
+
* band, or nothing) — because with no nav the header has nothing to anchor
|
|
48
|
+
* to. Digital ID Upload's Figma draws BOTH its no-nav stages this way: a
|
|
49
|
+
* top flex-1 region bottom-anchoring the header, the fixed media, then a
|
|
50
|
+
* bottom flex-1 region (empty on `analyzing`, bottom-anchoring the CTA on
|
|
51
|
+
* `success`) — `Upload Digital ID` file wxFsHRvllern4VnjRqM4JO, nodes
|
|
52
|
+
* 25351:14726 (analyzing) / 25351:14727 (success). `review` always shows
|
|
53
|
+
* its own nav, so this is a no-op there regardless of the value passed.
|
|
54
|
+
*/
|
|
55
|
+
centeredWhenNoNav?: boolean;
|
|
31
56
|
/**
|
|
32
57
|
* The flexing captured-media slot: a `PrizmaIdCapture` still, an uploaded-file
|
|
33
58
|
* preview card, a portrait review. Kept a slot so one template serves every
|
|
@@ -42,7 +67,7 @@ export interface PrizmaReviewScreenProps extends Omit<PrizmaScreenShellProps, 'd
|
|
|
42
67
|
* offset and footer all come from ScreenLayout.css regardless.
|
|
43
68
|
*/
|
|
44
69
|
stageClassName?: string;
|
|
45
|
-
/** Primary CTA — the forward action. Drawn on `review`
|
|
70
|
+
/** Primary CTA — the forward action. Drawn on `review`, `success`, `error`. */
|
|
46
71
|
primaryLabel: string;
|
|
47
72
|
/** Secondary CTA ("Replace" / "Retake") — drawn on `review` only. */
|
|
48
73
|
secondaryLabel?: string;
|
|
@@ -57,11 +82,12 @@ export interface PrizmaReviewScreenProps extends Omit<PrizmaScreenShellProps, 'd
|
|
|
57
82
|
* Archetype H — Review (captured-media confirmation).
|
|
58
83
|
*
|
|
59
84
|
* The "header → flexing captured-media stage → CTA band → tag" recipe, with a
|
|
60
|
-
* `review → analyzing → success` stage axis
|
|
61
|
-
* Capture screens hand-built it independently
|
|
62
|
-
* `DocumentCaptureConfirmUpload`) with their
|
|
63
|
-
* `DocumentCaptureLayout.css`, and Video Selfie's
|
|
64
|
-
* skeleton — a captured still under a title,
|
|
85
|
+
* `review → analyzing → success` stage axis (+ `error`, see `PrizmaReviewStage`).
|
|
86
|
+
* It exists because two Document Capture screens hand-built it independently
|
|
87
|
+
* (`DocumentCaptureConfirmImage`, `DocumentCaptureConfirmUpload`) with their
|
|
88
|
+
* own three-band arithmetic in `DocumentCaptureLayout.css`, and Video Selfie's
|
|
89
|
+
* review step needs the same skeleton — a captured still under a title,
|
|
90
|
+
* confirmed or replaced.
|
|
65
91
|
*
|
|
66
92
|
* It is NOT archetype F (Result): F centres a small status + CTA block, while a
|
|
67
93
|
* review TOP-aligns the header over a large media stage that flexes to fill the
|
package/dist/ReviewScreen.js
CHANGED
|
@@ -12,11 +12,12 @@ import './ScreenLayout.css';
|
|
|
12
12
|
* Archetype H — Review (captured-media confirmation).
|
|
13
13
|
*
|
|
14
14
|
* The "header → flexing captured-media stage → CTA band → tag" recipe, with a
|
|
15
|
-
* `review → analyzing → success` stage axis
|
|
16
|
-
* Capture screens hand-built it independently
|
|
17
|
-
* `DocumentCaptureConfirmUpload`) with their
|
|
18
|
-
* `DocumentCaptureLayout.css`, and Video Selfie's
|
|
19
|
-
* skeleton — a captured still under a title,
|
|
15
|
+
* `review → analyzing → success` stage axis (+ `error`, see `PrizmaReviewStage`).
|
|
16
|
+
* It exists because two Document Capture screens hand-built it independently
|
|
17
|
+
* (`DocumentCaptureConfirmImage`, `DocumentCaptureConfirmUpload`) with their
|
|
18
|
+
* own three-band arithmetic in `DocumentCaptureLayout.css`, and Video Selfie's
|
|
19
|
+
* review step needs the same skeleton — a captured still under a title,
|
|
20
|
+
* confirmed or replaced.
|
|
20
21
|
*
|
|
21
22
|
* It is NOT archetype F (Result): F centres a small status + CTA block, while a
|
|
22
23
|
* review TOP-aligns the header over a large media stage that flexes to fill the
|
|
@@ -32,25 +33,57 @@ import './ScreenLayout.css';
|
|
|
32
33
|
* to the bottom itself. Every offset lives in ScreenLayout.css; this file
|
|
33
34
|
* declares none of its own.
|
|
34
35
|
*/
|
|
35
|
-
export const PrizmaReviewScreen = forwardRef(({ stage = 'review', title, subtitle, successTitle, analyzingLabel, analyzingState = 'analyzing', progress = 0, children, stageClassName, primaryLabel, secondaryLabel, verifiedLabel, navLabel, showHeader, showFooter = true, screenId, overrides, onAction, ...shell }, ref) => {
|
|
36
|
+
export const PrizmaReviewScreen = forwardRef(({ stage = 'review', title, subtitle, successTitle, analyzingLabel, analyzingState = 'analyzing', progress = 0, centeredWhenNoNav = false, children, stageClassName, primaryLabel, secondaryLabel, verifiedLabel, navLabel, showHeader, showFooter = true, screenId, overrides, onAction, ...shell }, ref) => {
|
|
36
37
|
// Review screens are the capture family: no logo unless the client opts in
|
|
37
38
|
// by supplying one (types.ts chrome contract). `showHeader` still wins when
|
|
38
39
|
// set explicitly.
|
|
39
40
|
const withNav = showHeader ?? Boolean(overrides?.logo);
|
|
40
41
|
const showSecondary = stage === 'review' && Boolean(secondaryLabel);
|
|
41
42
|
const showBand = stage !== 'analyzing' && Boolean(primaryLabel || secondaryLabel);
|
|
43
|
+
const centeredGroup = !withNav && centeredWhenNoNav;
|
|
42
44
|
return (_jsxs(PrizmaScreenShell, { ref: ref, ...shell, children: [withNav ? (_jsx(PrizmaScreenNav, { logo: overrides?.logo, navLabel: navLabel })) : null, _jsxs("div", { className: [
|
|
43
45
|
'prizma-screen-layout__content',
|
|
44
46
|
withNav ? '' : 'prizma-screen-layout__content--no-nav',
|
|
45
47
|
]
|
|
46
48
|
.filter(Boolean)
|
|
47
|
-
.join(' '), children: [_jsx("div", { className:
|
|
49
|
+
.join(' '), children: [_jsx("div", { className: [
|
|
50
|
+
'prizma-screen-layout__review-header',
|
|
51
|
+
centeredGroup ? 'prizma-screen-layout__review-header--centered' : '',
|
|
52
|
+
]
|
|
53
|
+
.filter(Boolean)
|
|
54
|
+
.join(' '), children: stage === 'analyzing' ? (_jsx("div", { className: "prizma-screen-layout__review-loading", children: _jsx(PrizmaLoadingBar, { state: analyzingState, progress: progress, title: analyzingLabel }) })) : (_jsx(PrizmaTitle, { variant: overrides?.align === 'left' ? 'left' : 'centered', title: stage === 'success' ? successTitle ?? title : title, showSubtitle: (stage === 'review' || stage === 'error') && Boolean(subtitle), subtitle: subtitle, icon: stage === 'success'
|
|
55
|
+
? { type: 'status', status: 'success' }
|
|
56
|
+
: stage === 'error'
|
|
57
|
+
? { type: 'status', status: 'error' }
|
|
58
|
+
: undefined })) }), _jsx("div", { className: [
|
|
48
59
|
'prizma-screen-layout__review-stage',
|
|
49
60
|
stage === 'analyzing' ? 'prizma-screen-layout__review-stage--flush' : '',
|
|
61
|
+
centeredGroup ? 'prizma-screen-layout__review-stage--centered-group' : '',
|
|
50
62
|
stageClassName ?? '',
|
|
51
63
|
]
|
|
52
64
|
.filter(Boolean)
|
|
53
|
-
.join(' '), children: children }),
|
|
65
|
+
.join(' '), children: children }), (() => {
|
|
66
|
+
const band = showBand ? (_jsx("div", { className: [
|
|
67
|
+
'prizma-screen-layout__band',
|
|
68
|
+
'prizma-screen-layout__band--review',
|
|
69
|
+
// No footer tag to reserve the bottom space (§6, owner rule
|
|
70
|
+
// 2026-08-18: header/footer are independently controlled) —
|
|
71
|
+
// fall back to the band's own Spacing/24, same as any other
|
|
72
|
+
// screen that "genuinely carries no tag" (ScreenLayout.css).
|
|
73
|
+
// Otherwise the CTA sits flush against the shell edge.
|
|
74
|
+
!showFooter ? 'prizma-screen-layout__band--bare' : '',
|
|
75
|
+
]
|
|
76
|
+
.filter(Boolean)
|
|
77
|
+
.join(' '), children: _jsx(PrizmaButtonGroup, { orientation: "horizontal-v1", showSecondary: showSecondary, primaryLabel: primaryLabel, onPrimaryClick: () => onAction?.({ type: 'cta', screenId }), secondaryLabel: secondaryLabel, onSecondaryClick: () => onAction?.({ type: 'secondary', screenId }) }) })) : null;
|
|
78
|
+
// Balances the header's own flex-1 (`--centered`) so the header +
|
|
79
|
+
// media sit as one group centred between equal top/bottom space,
|
|
80
|
+
// instead of the media alone centring below a pinned header. The
|
|
81
|
+
// band (if any — `success`) bottom-anchors inside this same
|
|
82
|
+
// trailing region instead of just following the stage, matching
|
|
83
|
+
// Figma's own bottom flex-1 container; `analyzing` carries no
|
|
84
|
+
// band, so the region is just an empty spacer.
|
|
85
|
+
return centeredGroup ? (_jsx("div", { className: "prizma-screen-layout__review-trailing", children: band })) : (band);
|
|
86
|
+
})(), showFooter ? (_jsx("div", { className: "prizma-screen-layout__band__tag", children: _jsx(PrizmaTag, { label: verifiedLabel }) })) : null] })] }));
|
|
54
87
|
});
|
|
55
88
|
PrizmaReviewScreen.displayName = 'PrizmaReviewScreen';
|
|
56
89
|
export default PrizmaReviewScreen;
|