@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.
Files changed (168) hide show
  1. package/dist/BiometricConsentScreen.d.ts +95 -0
  2. package/dist/BiometricConsentScreen.js +91 -0
  3. package/dist/BiometricConsentStrings.d.ts +84 -0
  4. package/dist/BiometricConsentStrings.js +31 -0
  5. package/dist/CaptureScreen.d.ts +13 -0
  6. package/dist/CaptureScreen.js +2 -2
  7. package/dist/DemoScreensLayout.css +16 -0
  8. package/dist/DemoScreensRedirectScreen.d.ts +6 -1
  9. package/dist/DemoScreensRedirectScreen.js +3 -2
  10. package/dist/DemoScreensStrings.d.ts +5 -0
  11. package/dist/DigitalIdUploadErrorScreen.d.ts +31 -0
  12. package/dist/DigitalIdUploadErrorScreen.js +26 -0
  13. package/dist/DigitalIdUploadFileTooLargeScreen.d.ts +27 -0
  14. package/dist/DigitalIdUploadFileTooLargeScreen.js +21 -0
  15. package/dist/DigitalIdUploadReviewScreen.d.ts +57 -0
  16. package/dist/DigitalIdUploadReviewScreen.js +44 -0
  17. package/dist/DigitalIdUploadStrings.d.ts +64 -0
  18. package/dist/DigitalIdUploadStrings.js +19 -0
  19. package/dist/DigitalIdUploadTutorialScreen.d.ts +28 -0
  20. package/dist/DigitalIdUploadTutorialScreen.js +23 -0
  21. package/dist/DocumentCaptureIllustration.d.ts +1 -1
  22. package/dist/EkybCountryScreen.d.ts +6 -6
  23. package/dist/EkybCountryScreen.js +20 -7
  24. package/dist/EkybStrings.d.ts +6 -1
  25. package/dist/ErrorScreensScreen.d.ts +5 -2
  26. package/dist/ErrorScreensScreen.js +15 -4
  27. package/dist/ErrorScreensStrings.d.ts +17 -2
  28. package/dist/ErrorScreensStrings.js +18 -10
  29. package/dist/FaceCaptureCapturingScreen.d.ts +63 -0
  30. package/dist/FaceCaptureCapturingScreen.js +62 -2
  31. package/dist/FaceCaptureLayout.css +69 -4
  32. package/dist/FaceCaptureStrings.d.ts +23 -0
  33. package/dist/FormScreen.css +14 -0
  34. package/dist/FormScreen.d.ts +28 -0
  35. package/dist/FormScreen.js +3 -2
  36. package/dist/IdCaptureLayout.css +165 -2
  37. package/dist/IdCaptureStageScreen.d.ts +47 -0
  38. package/dist/IdCaptureStageScreen.js +39 -3
  39. package/dist/IdCaptureStrings.d.ts +19 -0
  40. package/dist/ListScreen.d.ts +19 -0
  41. package/dist/ListScreen.js +7 -2
  42. package/dist/LoaderScreen.d.ts +7 -5
  43. package/dist/LoaderScreen.js +7 -5
  44. package/dist/LoadersStrings.d.ts +18 -5
  45. package/dist/OcrReviewErrorScreen.d.ts +30 -0
  46. package/dist/OcrReviewErrorScreen.js +24 -0
  47. package/dist/OcrReviewLayout.css +24 -0
  48. package/dist/OcrReviewLoadingScreen.d.ts +25 -0
  49. package/dist/OcrReviewLoadingScreen.js +19 -0
  50. package/dist/OcrReviewScreen.d.ts +76 -0
  51. package/dist/OcrReviewScreen.js +65 -0
  52. package/dist/OcrReviewStrings.d.ts +47 -0
  53. package/dist/OcrReviewStrings.js +17 -0
  54. package/dist/OcrReviewSuccessScreen.d.ts +30 -0
  55. package/dist/OcrReviewSuccessScreen.js +24 -0
  56. package/dist/PermissionsAllowScreen.d.ts +8 -11
  57. package/dist/PermissionsAllowScreen.js +8 -11
  58. package/dist/PermissionsAskScreen.d.ts +41 -0
  59. package/dist/PermissionsAskScreen.js +43 -0
  60. package/dist/PermissionsBrowserStepsScreen.d.ts +9 -2
  61. package/dist/PermissionsBrowserStepsScreen.js +12 -3
  62. package/dist/PermissionsLayout.css +47 -0
  63. package/dist/PermissionsStrings.d.ts +20 -9
  64. package/dist/PermissionsStrings.js +10 -4
  65. package/dist/PhoneInputOtpScreen.d.ts +8 -0
  66. package/dist/PhoneInputOtpScreen.js +26 -19
  67. package/dist/PhoneInputStrings.d.ts +11 -3
  68. package/dist/PhoneInputVerifyScreen.js +21 -5
  69. package/dist/QualifiedSignatureDocumentScreen.d.ts +8 -5
  70. package/dist/QualifiedSignatureDocumentScreen.js +9 -6
  71. package/dist/QualifiedSignatureResultScreen.d.ts +16 -13
  72. package/dist/QualifiedSignatureResultScreen.js +17 -18
  73. package/dist/QualifiedSignatureStrings.d.ts +11 -4
  74. package/dist/ResultScreen.d.ts +8 -0
  75. package/dist/ResultScreen.js +14 -3
  76. package/dist/ReusabilityCredentialSelectionScreen.d.ts +95 -0
  77. package/dist/ReusabilityCredentialSelectionScreen.js +94 -0
  78. package/dist/ReusabilityLayout.css +241 -0
  79. package/dist/ReusabilityPrivacyPolicyScreen.d.ts +55 -0
  80. package/dist/ReusabilityPrivacyPolicyScreen.js +44 -0
  81. package/dist/ReusabilityStrings.d.ts +85 -0
  82. package/dist/ReusabilityStrings.js +37 -0
  83. package/dist/ReviewScreen.d.ts +38 -12
  84. package/dist/ReviewScreen.js +41 -8
  85. package/dist/ScreenLayout.css +382 -6
  86. package/dist/VideoSelfieErrorScreen.js +1 -1
  87. package/dist/VideoSelfieIdCaptureScreen.js +1 -1
  88. package/dist/VideoSelfieLayout.css +304 -2
  89. package/dist/VideoSelfieSelfieCaptureScreen.js +1 -1
  90. package/dist/VideoSelfieSpeakScreen.js +1 -1
  91. package/dist/VideoSelfieStrings.d.ts +4 -1
  92. package/dist/VideoSelfieTurnHeadScreen.js +14 -11
  93. package/dist/VideoSelfieTutorialScreen.d.ts +9 -0
  94. package/dist/VideoSelfieTutorialScreen.js +10 -1
  95. package/dist/VideoSelfieWaveScreen.js +1 -1
  96. package/dist/ViewfinderScreen.css +36 -0
  97. package/dist/flows.d.ts +8 -0
  98. package/dist/flows.js +17 -0
  99. package/dist/index.d.ts +16 -0
  100. package/dist/index.js +12 -0
  101. package/dist/styles.css +3 -0
  102. package/package.json +68 -3
  103. package/samples/video-selfie-camera-wide.jpg +0 -0
  104. package/samples/video-selfie-room-wide.jpg +0 -0
  105. package/src/BiometricConsentScreen.tsx +192 -0
  106. package/src/BiometricConsentStrings.ts +119 -0
  107. package/src/CaptureScreen.tsx +17 -0
  108. package/src/DemoScreensLayout.css +16 -0
  109. package/src/DemoScreensRedirectScreen.tsx +14 -6
  110. package/src/DemoScreensStrings.ts +5 -0
  111. package/src/DigitalIdUploadErrorScreen.tsx +83 -0
  112. package/src/DigitalIdUploadFileTooLargeScreen.tsx +67 -0
  113. package/src/DigitalIdUploadReviewScreen.tsx +119 -0
  114. package/src/DigitalIdUploadStrings.ts +88 -0
  115. package/src/DigitalIdUploadTutorialScreen.tsx +59 -0
  116. package/src/DocumentCaptureIllustration.tsx +1 -1
  117. package/src/EkybCountryScreen.tsx +23 -6
  118. package/src/EkybStrings.ts +6 -1
  119. package/src/ErrorScreensScreen.tsx +15 -4
  120. package/src/ErrorScreensStrings.ts +37 -12
  121. package/src/FaceCaptureCapturingScreen.tsx +102 -13
  122. package/src/FaceCaptureLayout.css +69 -4
  123. package/src/FaceCaptureStrings.ts +24 -0
  124. package/src/FormScreen.css +14 -0
  125. package/src/FormScreen.tsx +34 -0
  126. package/src/IdCaptureLayout.css +165 -2
  127. package/src/IdCaptureStageScreen.tsx +75 -0
  128. package/src/IdCaptureStrings.ts +19 -0
  129. package/src/ListScreen.tsx +48 -9
  130. package/src/LoaderScreen.tsx +7 -5
  131. package/src/LoadersStrings.ts +18 -5
  132. package/src/OcrReviewErrorScreen.tsx +53 -0
  133. package/src/OcrReviewLayout.css +24 -0
  134. package/src/OcrReviewLoadingScreen.tsx +48 -0
  135. package/src/OcrReviewScreen.tsx +190 -0
  136. package/src/OcrReviewStrings.ts +69 -0
  137. package/src/OcrReviewSuccessScreen.tsx +52 -0
  138. package/src/PermissionsAllowScreen.tsx +9 -10
  139. package/src/PermissionsAskScreen.tsx +105 -0
  140. package/src/PermissionsBrowserStepsScreen.tsx +11 -3
  141. package/src/PermissionsLayout.css +47 -0
  142. package/src/PermissionsStrings.ts +42 -12
  143. package/src/PhoneInputOtpScreen.tsx +23 -3
  144. package/src/PhoneInputStrings.ts +11 -3
  145. package/src/PhoneInputVerifyScreen.tsx +24 -4
  146. package/src/QualifiedSignatureDocumentScreen.tsx +9 -7
  147. package/src/QualifiedSignatureResultScreen.tsx +28 -26
  148. package/src/QualifiedSignatureStrings.ts +11 -4
  149. package/src/ResultScreen.tsx +33 -2
  150. package/src/ReusabilityCredentialSelectionScreen.tsx +246 -0
  151. package/src/ReusabilityLayout.css +241 -0
  152. package/src/ReusabilityPrivacyPolicyScreen.tsx +109 -0
  153. package/src/ReusabilityStrings.ts +127 -0
  154. package/src/ReviewScreen.tsx +96 -27
  155. package/src/ScreenLayout.css +382 -6
  156. package/src/VideoSelfieErrorScreen.tsx +1 -1
  157. package/src/VideoSelfieIdCaptureScreen.tsx +9 -1
  158. package/src/VideoSelfieLayout.css +304 -2
  159. package/src/VideoSelfieSelfieCaptureScreen.tsx +9 -1
  160. package/src/VideoSelfieSpeakScreen.tsx +9 -1
  161. package/src/VideoSelfieStrings.ts +4 -2
  162. package/src/VideoSelfieTurnHeadScreen.tsx +25 -14
  163. package/src/VideoSelfieTutorialScreen.tsx +11 -0
  164. package/src/VideoSelfieWaveScreen.tsx +9 -1
  165. package/src/ViewfinderScreen.css +36 -0
  166. package/src/flows.ts +25 -0
  167. package/src/index.ts +74 -3
  168. package/src/styles.css +3 -0
@@ -77,6 +77,14 @@ export interface PrizmaResultScreenProps
77
77
  * job (Face Match's verdict Snackbar). DEVIATIONS #VS-17.
78
78
  */
79
79
  linkLabel?: string;
80
+ /**
81
+ * Where the tertiary link sits in the stack. `below` (default) is archetype
82
+ * A's position; `above` puts it over the primary CTA, which is what the
83
+ * permission frames draw ("Quit process" over "Allow permission",
84
+ * DEVIATIONS #GEN-3, #VS-17). The slot those rows escalated: the archetype
85
+ * still owns both positions, a screen only picks one of them.
86
+ */
87
+ linkPosition?: 'below' | 'above';
80
88
  /** "verified by" attribution copy for the footer tag. */
81
89
  verifiedLabel: string;
82
90
  navLabel?: string;
@@ -118,6 +126,7 @@ export const PrizmaResultScreen = forwardRef<HTMLDivElement, PrizmaResultScreenP
118
126
  ctaLabel,
119
127
  secondaryCtaLabel,
120
128
  linkLabel,
129
+ linkPosition = 'below',
121
130
  verifiedLabel,
122
131
  navLabel,
123
132
  screenId,
@@ -152,7 +161,20 @@ export const PrizmaResultScreen = forwardRef<HTMLDivElement, PrizmaResultScreenP
152
161
  {children}
153
162
  </div>
154
163
  {ctaLabel || secondaryCtaLabel || linkLabel || disclaimer || bandContent ? (
155
- <div className="prizma-screen-layout__band prizma-screen-layout__band--result">
164
+ <div
165
+ className={[
166
+ 'prizma-screen-layout__band',
167
+ 'prizma-screen-layout__band--result',
168
+ // No footer tag to reserve `--pcs-footer-space` for — same gap the
169
+ // Review archetype's `--bare` fallback exists for (ScreenLayout.css).
170
+ // Every existing F consumer always shows the tag, so this has never
171
+ // fired before; without it the CTA sits ~40px further from the
172
+ // bottom than Figma's flat Spacing/24 draws.
173
+ !showFooter ? 'prizma-screen-layout__band--bare' : '',
174
+ ]
175
+ .filter(Boolean)
176
+ .join(' ')}
177
+ >
156
178
  {bandContent ? (
157
179
  <div className="prizma-screen-layout__band__content">{bandContent}</div>
158
180
  ) : null}
@@ -168,6 +190,15 @@ export const PrizmaResultScreen = forwardRef<HTMLDivElement, PrizmaResultScreenP
168
190
  2026-08-19, DEVIATIONS #GEO-1). Not a per-screen choice and not
169
191
  a prop — a screen never picks its own button order. `row` pairs
170
192
  them side by side instead, where the rule does not apply. */}
193
+ {linkLabel && linkPosition === 'above' ? (
194
+ <PrizmaButton
195
+ variant="tertiary-link"
196
+ size="L"
197
+ onClick={() => onAction?.({ type: 'tertiary', screenId })}
198
+ >
199
+ {linkLabel}
200
+ </PrizmaButton>
201
+ ) : null}
171
202
  {ctaLabel ? (
172
203
  <PrizmaButton
173
204
  variant="primary"
@@ -186,7 +217,7 @@ export const PrizmaResultScreen = forwardRef<HTMLDivElement, PrizmaResultScreenP
186
217
  {secondaryCtaLabel}
187
218
  </PrizmaButton>
188
219
  ) : null}
189
- {linkLabel ? (
220
+ {linkLabel && linkPosition === 'below' ? (
190
221
  <PrizmaButton
191
222
  variant="tertiary-link"
192
223
  size="L"
@@ -0,0 +1,246 @@
1
+ import React, { forwardRef } from 'react';
2
+ import { PrizmaBottomSheetContent } from '@incodetech/prizma-core-web/bottom-sheet';
3
+ import { PrizmaCountryFlag } from '@incodetech/prizma-core-web/combined';
4
+ import { PrizmaListScreen, type PrizmaListScreenProps } from './ListScreen';
5
+ import type { PrizmaScreenActionHandler, PrizmaScreenOverrides } from './types';
6
+ import type { ReusableCredential, ReusabilityStrings } from './ReusabilityStrings';
7
+ import './ScreenLayout.css';
8
+ import './ReusabilityLayout.css';
9
+
10
+ /** The sentinel the SDK submits for the capture row (`SCAN_NEW_DOCUMENT`,
11
+ * `identityReuseStateMachine.ts`): `{ accepted: false }`, then ID Capture. */
12
+ export const REUSABILITY_SCAN_NEW = 'scanNew' as const;
13
+
14
+ export type ReusabilitySelection = string | typeof REUSABILITY_SCAN_NEW;
15
+
16
+ export interface ReusabilityCredentialSelectionScreenProps
17
+ extends Omit<
18
+ PrizmaListScreenProps,
19
+ | 'status'
20
+ | 'title'
21
+ | 'subtitle'
22
+ | 'glyph'
23
+ | 'children'
24
+ | 'listAlign'
25
+ | 'scrollList'
26
+ | 'disclaimer'
27
+ | 'ctaLabel'
28
+ | 'secondaryCtaLabel'
29
+ | 'linkLabel'
30
+ | 'secondaryLinkLabel'
31
+ | 'overlay'
32
+ | 'verifiedLabel'
33
+ | 'navLabel'
34
+ > {
35
+ /** Module copy — this screen reads the `selection` and `sharedDetails` slices. */
36
+ strings: ReusabilityStrings;
37
+ /**
38
+ * The documents the network found for this person, best match FIRST — the
39
+ * backend orders them and the first row wears the "Recommended" pill (SDK
40
+ * `recommended={index === 0}`). One or more; the frame draws two
41
+ * (`Multiple documents`) and one (`Single document`).
42
+ */
43
+ credentials: ReusableCredential[];
44
+ /**
45
+ * "What data will be shared?" was pressed: Core's bottom sheet listing the
46
+ * recipient's data request is presented over the dimmed selection
47
+ * (`shared info`, 7877:68927). Its one button emits `cta` and closes it.
48
+ */
49
+ sharedDetails?: boolean;
50
+ /**
51
+ * Fired with the chosen credential's id, or `REUSABILITY_SCAN_NEW` for the
52
+ * capture row; `onAction` still reports the tap as `cta`. Named like ID
53
+ * Capture's `onDocumentSelect` — `onSelect` is a native <div> event the shell
54
+ * already passes through.
55
+ */
56
+ onCredentialSelect?: (selection: ReusabilitySelection) => void;
57
+ screenId?: string;
58
+ overrides?: PrizmaScreenOverrides;
59
+ onAction?: PrizmaScreenActionHandler;
60
+ }
61
+
62
+ /**
63
+ * Reusability (Incode Bridge) — choose the document to reuse, built on the
64
+ * List archetype (GUIDELINES.md §6-G, `PrizmaListScreen`).
65
+ *
66
+ * ONE screen for three of the section's four frames: `Multiple documents`
67
+ * (7877:68816) and `Single document` (7877:68875) are the same skeleton — nav →
68
+ * Title (H2 + H5) → the credential list → "Scan a new document" → two tertiary
69
+ * links → tag — differing only in how many rows the network returned; and
70
+ * `Shared data` (7877:68927) is that screen with Core's bottom sheet presented
71
+ * over it (`sharedDetails`).
72
+ *
73
+ * WHY ARCHETYPE G. The rows ARE the actions — tapping a document advances the
74
+ * session with no confirm step (consent review 2026-09-16: "remove the confirm
75
+ * button: selecting a document advances the user immediately"; the Web SDK's
76
+ * ENG-57939 built exactly that) — so there is no primary CTA, and G is the one
77
+ * archetype whose band may carry links alone. ID Capture's document chooser is
78
+ * the same shape on the same archetype.
79
+ *
80
+ * Six things are deliberate:
81
+ *
82
+ * 1. The rows are composed here from Core's tokens, not from Core's
83
+ * `PrizmaCardListVerificationOptions`. The frame calls them "Verification
84
+ * options card list", but a reusable credential has a different anatomy —
85
+ * type label + status pill, flag + masked number, verified date — and the
86
+ * capture row is one line with a pill. Core ships neither that row nor a
87
+ * plain status pill; both are proposed (DEVIATIONS #RU-1, #RU-2) and the
88
+ * rules live once in `ReusabilityLayout.css`.
89
+ * 2. Every row is a real `<button>` that emits `cta` and names its credential
90
+ * through `onCredentialSelect` — the one-click rule. No radio, no selected
91
+ * state: the frame draws none and the decision was to drop them. The SDK's
92
+ * shipped `role="radio"` + confirm is the generation BEFORE this frame.
93
+ * 3. The first row wears "Recommended", because the backend sorts best match
94
+ * first; the capture row wears "Slowest". The pills are the frame's own
95
+ * fills on Core tokens; their 12px type is the one value Core's scale
96
+ * cannot express (#RU-2).
97
+ * 4. The flag is Core's raster bank (`PrizmaCountryFlag`, 24×18), never the
98
+ * frame's emoji glyph (owner decision 2026-07-12). A country outside the
99
+ * bank falls back to the emoji the host supplies — Core's own fallback rule
100
+ * (#RU-3).
101
+ * 5. The two links ride the archetype's band: "What data will be shared?" in
102
+ * `linkLabel` (emits `secondary`) and "Incode’s Privacy Policy" in the new
103
+ * `secondaryLinkLabel` slot (emits `tertiary`) — two non-primary actions a
104
+ * host must tell apart (#PI-10), so each has its own action. The band's
105
+ * flat Spacing/16 stands between them where the frame's Button group
106
+ * tightens the pair by 8 (#RU-4).
107
+ * 6. The sheet rides the archetype's new `overlay` slot — the same contract E
108
+ * gained for Biometric Consent (#BC-8): the screen owns the scrim and the
109
+ * anchoring (the foundation's `__sheet-scrim` / `__sheet-panel`), Core owns
110
+ * the panel — `PrizmaBottomSheetContent variant="dialog"` with its H1
111
+ * title, H5 subtitle, the bullet list in `body`, and its own Button Group
112
+ * reduced to "Understood". With the sheet up the rows and links are under
113
+ * the scrim and do not report (#RU-5).
114
+ *
115
+ * The nav keeps the logo and draws no close: the frame's top-right ✕ is the
116
+ * SDK page chrome, not a Prizma screen control (GUIDELINES §3; #RU-6).
117
+ */
118
+ export const ReusabilityCredentialSelectionScreen = forwardRef<
119
+ HTMLDivElement,
120
+ ReusabilityCredentialSelectionScreenProps
121
+ >(
122
+ (
123
+ {
124
+ strings,
125
+ credentials,
126
+ sharedDetails = false,
127
+ onCredentialSelect,
128
+ screenId = sharedDetails
129
+ ? 'reusability-shared-details'
130
+ : `reusability-selection-${credentials.length > 1 ? 'multiple' : 'single'}`,
131
+ overrides,
132
+ onAction,
133
+ ...shell
134
+ },
135
+ ref,
136
+ ) => {
137
+ const { selection, sharedDetails: shared } = strings;
138
+
139
+ const choose = (choice: ReusabilitySelection) => {
140
+ if (sharedDetails) return;
141
+ onCredentialSelect?.(choice);
142
+ onAction?.({ type: 'cta', screenId });
143
+ };
144
+
145
+ const sheet = sharedDetails ? (
146
+ <>
147
+ <div className="prizma-screen-layout__sheet-scrim" aria-hidden="true" />
148
+ <div className="prizma-screen-layout__sheet-panel">
149
+ <PrizmaBottomSheetContent
150
+ variant="dialog"
151
+ title={shared.title}
152
+ subtitle={shared.subtitle}
153
+ body={
154
+ <ul className="reusability-shared-list">
155
+ {shared.items.map((item) => (
156
+ <li key={item}>{item}</li>
157
+ ))}
158
+ </ul>
159
+ }
160
+ buttonGroupProps={{
161
+ primaryLabel: shared.ctaLabel,
162
+ showSecondary: false,
163
+ onPrimaryClick: () => onAction?.({ type: 'cta', screenId }),
164
+ }}
165
+ />
166
+ </div>
167
+ </>
168
+ ) : undefined;
169
+
170
+ return (
171
+ <PrizmaListScreen
172
+ ref={ref}
173
+ title={selection.title}
174
+ subtitle={selection.subtitle}
175
+ linkLabel={selection.sharedDataLink}
176
+ secondaryLinkLabel={selection.privacyPolicyLink}
177
+ verifiedLabel={strings.verifiedLabel}
178
+ navLabel={strings.navLabel}
179
+ screenId={screenId}
180
+ overrides={overrides}
181
+ /* With the sheet up, the links are under the scrim and must not
182
+ report: the sheet's "Understood" is the only action. */
183
+ onAction={sharedDetails ? undefined : onAction}
184
+ overlay={sheet}
185
+ {...shell}
186
+ >
187
+ <div className="reusability-credentials" role="group" aria-label={selection.listLabel}>
188
+ <div className="reusability-credentials__group">
189
+ {credentials.map((credential, index) => (
190
+ <button
191
+ key={credential.id}
192
+ type="button"
193
+ className="reusability-credential"
194
+ onClick={() => choose(credential.id)}
195
+ tabIndex={sharedDetails ? -1 : undefined}
196
+ >
197
+ <span className="reusability-credential__head">
198
+ <span className="reusability-credential__type">
199
+ {selection.documentType[credential.documentType]}
200
+ </span>
201
+ {index === 0 ? (
202
+ <span className="reusability-pill reusability-pill--recommended">
203
+ {selection.recommendedTag}
204
+ </span>
205
+ ) : null}
206
+ </span>
207
+ <span className="reusability-credential__number">
208
+ <span className="reusability-credential__flag" aria-hidden="true">
209
+ <PrizmaCountryFlag
210
+ country={{
211
+ code: credential.countryCode,
212
+ name: credential.countryCode,
213
+ dialCode: '',
214
+ flag: credential.countryFlag ?? '',
215
+ }}
216
+ />
217
+ </span>
218
+ <span>{credential.maskedNumber}</span>
219
+ </span>
220
+ <span className="reusability-credential__verified">
221
+ <span>{selection.verifiedPrefix}</span> <span>{credential.verifiedOn}</span>
222
+ </span>
223
+ </button>
224
+ ))}
225
+ </div>
226
+ <div className="reusability-credentials__group">
227
+ <button
228
+ type="button"
229
+ className="reusability-credential"
230
+ onClick={() => choose(REUSABILITY_SCAN_NEW)}
231
+ tabIndex={sharedDetails ? -1 : undefined}
232
+ >
233
+ <span className="reusability-credential__head">
234
+ <span className="reusability-credential__type">{selection.scanNewLabel}</span>
235
+ <span className="reusability-pill reusability-pill--neutral">{selection.slowestTag}</span>
236
+ </span>
237
+ </button>
238
+ </div>
239
+ </div>
240
+ </PrizmaListScreen>
241
+ );
242
+ },
243
+ );
244
+ ReusabilityCredentialSelectionScreen.displayName = 'ReusabilityCredentialSelectionScreen';
245
+
246
+ export default ReusabilityCredentialSelectionScreen;
@@ -0,0 +1,241 @@
1
+ /* Reusability (Incode Bridge) — module layout additions.
2
+ *
3
+ * Three recipes, every value a Prizma token: the credential rows the selection
4
+ * screen lists, the bullet list inside the shared-details sheet, and the framed
5
+ * reader the privacy policy scrolls in. The content column, the 24px gutters,
6
+ * the title → list offset, the CTA band, the sheet scrim and panel and the
7
+ * anchored footer are all the foundation's (`ScreenLayout.css`); the sheet
8
+ * itself, the buttons, the title and the flag raster are Core's.
9
+ *
10
+ * WHY THE ROWS ARE COMPOSED HERE. The frame names the list "Verification
11
+ * options card list", but it is not Core's `Card / Verification options item`
12
+ * (60px card icon + title + chevron): each row is a document-type label with a
13
+ * status pill, the masked number behind a flag, and the date it was verified —
14
+ * and the last row is a single line with a pill. Core ships no card with that
15
+ * anatomy and no plain status pill (its `PrizmaCardTag` is the ⚡ Instant pill,
16
+ * with the glyph baked in). Both are built below from Core's own tokens — no
17
+ * palette, no radius, no spacing invented — and both are logged as component
18
+ * proposals (DEVIATIONS #RU-1, #RU-2). The moment Core ships them, these rules
19
+ * go and the screen imports the component.
20
+ */
21
+
22
+ /* ── The credential list ─────────────────────────────────────────────────────
23
+ * Two bordered containers, Spacing/16 apart (`options`, 7877:68823): the
24
+ * reusable documents in the first, "Scan a new document" alone in the second.
25
+ * Rows inside a container touch, each drawing a top hairline the way Core's
26
+ * verification-options rows do (`Card.css`); the container clips the corners. */
27
+ .reusability-credentials {
28
+ display: flex;
29
+ flex-direction: column;
30
+ gap: var(--prizma-spacing-16);
31
+ width: 100%;
32
+ }
33
+
34
+ .reusability-credentials__group {
35
+ display: flex;
36
+ flex-direction: column;
37
+ overflow: hidden;
38
+ box-sizing: border-box;
39
+ width: 100%;
40
+ background-color: var(--prizma-surface-neutral-0);
41
+ border: var(--prizma-border-width-regular) solid var(--prizma-border-neutral-100);
42
+ border-radius: var(--prizma-border-radius-medium);
43
+ }
44
+
45
+ /* The row IS the action — a real <button>, one tap advances (consent review
46
+ * 2026-09-16: "remove the confirm button"). Button reset, then the frame's
47
+ * Spacing/16 padding and Spacing/8 between its lines. */
48
+ .reusability-credential {
49
+ display: flex;
50
+ flex-direction: column;
51
+ align-items: stretch;
52
+ gap: var(--prizma-spacing-8);
53
+ box-sizing: border-box;
54
+ width: 100%;
55
+ margin: 0;
56
+ padding: var(--prizma-spacing-16);
57
+ background-color: var(--prizma-surface-neutral-0);
58
+ border: none;
59
+ border-top: var(--prizma-border-width-regular) solid var(--prizma-border-neutral-100);
60
+ color: var(--prizma-text-body-800-primary);
61
+ font-family: var(--prizma-body-family);
62
+ text-align: left;
63
+ cursor: pointer;
64
+ -webkit-font-smoothing: antialiased;
65
+ }
66
+
67
+ .reusability-credentials__group > .reusability-credential:first-child {
68
+ border-top: none;
69
+ }
70
+
71
+ /* Keyboard focus: Core's Button ring, so a row and the links below it light
72
+ * up the same way. Inset, because the group clips its corners. */
73
+ .reusability-credential:focus-visible {
74
+ outline: var(--prizma-button-focus-ring-width) solid var(--prizma-border-status-focus);
75
+ outline-offset: calc(-1 * var(--prizma-button-focus-ring-width));
76
+ }
77
+
78
+ /* Line 1: the document-type label, the pill at the far right. */
79
+ .reusability-credential__head {
80
+ display: flex;
81
+ align-items: center;
82
+ justify-content: space-between;
83
+ gap: var(--prizma-spacing-8);
84
+ width: 100%;
85
+ }
86
+
87
+ .reusability-credential__type {
88
+ margin: 0;
89
+ color: var(--prizma-text-body-800-primary);
90
+ font-family: var(--prizma-body-family);
91
+ font-size: var(--prizma-body-m-regular-font-size);
92
+ font-weight: var(--prizma-body-m-regular-font-weight);
93
+ line-height: var(--prizma-body-m-regular-line-height);
94
+ letter-spacing: var(--prizma-body-m-regular-letter-spacing);
95
+ }
96
+
97
+ /* Line 2: the flag and the masked number, Headline/H5. */
98
+ .reusability-credential__number {
99
+ display: flex;
100
+ align-items: center;
101
+ gap: var(--prizma-spacing-4);
102
+ margin: 0;
103
+ color: var(--prizma-text-body-800-primary);
104
+ font-family: var(--prizma-headline-family);
105
+ font-size: var(--prizma-headline-h5-font-size);
106
+ font-weight: var(--prizma-headline-h5-font-weight);
107
+ line-height: var(--prizma-headline-h5-line-height);
108
+ letter-spacing: var(--prizma-headline-h5-letter-spacing);
109
+ }
110
+
111
+ /* Core's flag raster is 24×18; the frame draws an emoji glyph at the text
112
+ * size. The raster wins (owner decision 2026-07-12: flags are images, never
113
+ * emoji) and keeps its own geometry — DEVIATIONS #RU-3. */
114
+ .reusability-credential__flag {
115
+ display: inline-flex;
116
+ flex: 0 0 auto;
117
+ align-items: center;
118
+ }
119
+
120
+ /* Line 3: "Verified Apr 2023", Body/M in the secondary ink. */
121
+ .reusability-credential__verified {
122
+ margin: 0;
123
+ color: var(--prizma-text-body-500-secondary);
124
+ font-family: var(--prizma-body-family);
125
+ font-size: var(--prizma-body-m-regular-font-size);
126
+ font-weight: var(--prizma-body-m-regular-font-weight);
127
+ line-height: var(--prizma-body-m-regular-line-height);
128
+ letter-spacing: var(--prizma-body-m-regular-letter-spacing);
129
+ }
130
+
131
+ /* ── The status pill ─────────────────────────────────────────────────────────
132
+ * "Recommended" on the best match, "Slowest" on the capture row. Surface/Brand/50
133
+ * for the first, inked with Card/Tag/Text — the mode-aware AA pair Core's own
134
+ * ⚡ pill uses (Brand.600 light · Focus.400 dark; owner call 2026-07-14), because
135
+ * the frame's Text/Accent/Brand on Brand/50 is blue on blue in dark mode;
136
+ * Surface/Neutral/50 with a Border/Neutral/200 hairline for the second — the
137
+ * frame's own fills. Radius x-small (4) and Spacing/2 × Spacing/4 padding, as
138
+ * drawn.
139
+ *
140
+ * TYPE: the frame sets the label in Body/S Regular (12px). Core's generated
141
+ * scale has no 12px text step — Body/M and Label/M are 14 — so the pill takes
142
+ * Label/M Regular, the smallest token the scale has. DEVIATIONS #RU-2. */
143
+ .reusability-pill {
144
+ display: inline-flex;
145
+ align-items: center;
146
+ flex: 0 0 auto;
147
+ padding: var(--prizma-spacing-2) var(--prizma-spacing-4);
148
+ border-radius: var(--prizma-border-radius-x-small);
149
+ font-family: var(--prizma-body-family);
150
+ font-size: var(--prizma-label-m-regular-font-size);
151
+ font-weight: var(--prizma-label-m-regular-font-weight);
152
+ line-height: var(--prizma-label-m-regular-line-height);
153
+ letter-spacing: var(--prizma-label-m-regular-letter-spacing);
154
+ white-space: nowrap;
155
+ }
156
+
157
+ .reusability-pill--recommended {
158
+ background-color: var(--prizma-surface-brand-50);
159
+ color: var(--prizma-card-tag-text);
160
+ }
161
+
162
+ .reusability-pill--neutral {
163
+ background-color: var(--prizma-surface-neutral-50);
164
+ border: var(--prizma-border-width-regular) solid var(--prizma-border-neutral-200);
165
+ color: var(--prizma-text-body-800-primary);
166
+ }
167
+
168
+ /* ── The shared-details list ─────────────────────────────────────────────────
169
+ * Inside Core's dialog sheet (`__body` slot): the recipient's data request as
170
+ * bullets, Headline/H5 in the primary ink, Spacing/8 apart, the browser's own
171
+ * disc marker on a Spacing/24 indent (`Documents list`, 7877:68985). Core's
172
+ * sheet supplies the Spacing/24 above it. */
173
+ .reusability-shared-list {
174
+ display: flex;
175
+ flex-direction: column;
176
+ gap: var(--prizma-spacing-8);
177
+ margin: 0;
178
+ padding: 0 0 0 var(--prizma-spacing-24);
179
+ color: var(--prizma-text-body-800-primary);
180
+ font-family: var(--prizma-headline-family);
181
+ font-size: var(--prizma-headline-h5-font-size);
182
+ font-weight: var(--prizma-headline-h5-font-weight);
183
+ line-height: var(--prizma-headline-h5-line-height);
184
+ letter-spacing: var(--prizma-headline-h5-letter-spacing);
185
+ text-align: left;
186
+ }
187
+
188
+ .reusability-shared-list > li {
189
+ margin: 0;
190
+ padding: 0;
191
+ }
192
+
193
+ /* ── The privacy-policy reader ───────────────────────────────────────────────
194
+ * The framed, scrolling document Qualified Signature's viewers draw
195
+ * (`.qualified-signature-document--framed`, DEVIATIONS #QS-n): a hairline
196
+ * frame on radius-small, Spacing/16 inside, Body/M prose with Spacing/12
197
+ * between paragraphs, the dateline first. The frame's `demo_5` draws the text
198
+ * unframed on a 32px gutter; the framed reader is what every document viewer
199
+ * in this package draws (owner call 2026-09-29, "take reference from other
200
+ * screens"), so it is followed here — DEVIATIONS #RU-7.
201
+ *
202
+ * FOUNDATION REQUEST: this is the SECOND module drawing the framed reader.
203
+ * Promote it to `ScreenLayout.css` as `__document` (the #DC-29 / #BC-8 idiom:
204
+ * the third consumer moves the recipe), and both module copies go. */
205
+ .reusability-document {
206
+ flex: 1 1 auto;
207
+ min-height: 0;
208
+ box-sizing: border-box;
209
+ width: 100%;
210
+ overflow-y: auto;
211
+ overscroll-behavior: contain;
212
+ padding: var(--prizma-spacing-16);
213
+ margin-bottom: var(--prizma-spacing-16);
214
+ background-color: var(--prizma-surface-neutral-0);
215
+ border: var(--prizma-border-width-regular) solid var(--prizma-border-neutral-100);
216
+ border-radius: var(--prizma-border-radius-small);
217
+ text-align: start;
218
+ }
219
+
220
+ .reusability-document > * {
221
+ margin: 0;
222
+ }
223
+
224
+ .reusability-document > * + * {
225
+ margin-top: var(--prizma-spacing-12);
226
+ }
227
+
228
+ .reusability-document__meta,
229
+ .reusability-document__prose {
230
+ color: var(--prizma-text-body-800-primary);
231
+ font-family: var(--prizma-body-family);
232
+ font-size: var(--prizma-body-m-regular-font-size);
233
+ font-weight: var(--prizma-body-m-regular-font-weight);
234
+ line-height: var(--prizma-body-m-regular-line-height);
235
+ letter-spacing: var(--prizma-body-m-regular-letter-spacing);
236
+ text-align: left;
237
+ }
238
+
239
+ .reusability-document__meta {
240
+ color: var(--prizma-text-body-500-secondary);
241
+ }
@@ -0,0 +1,109 @@
1
+ import React, { forwardRef, type ReactNode } from 'react';
2
+ import { PrizmaListScreen, type PrizmaListScreenProps } from './ListScreen';
3
+ import type { PrizmaScreenActionHandler, PrizmaScreenOverrides } from './types';
4
+ import type { ReusabilityStrings } from './ReusabilityStrings';
5
+ import './ScreenLayout.css';
6
+ import './ReusabilityLayout.css';
7
+
8
+ export interface ReusabilityPrivacyPolicyScreenProps
9
+ extends Omit<
10
+ PrizmaListScreenProps,
11
+ | 'status'
12
+ | 'title'
13
+ | 'subtitle'
14
+ | 'glyph'
15
+ | 'children'
16
+ | 'listAlign'
17
+ | 'scrollList'
18
+ | 'disclaimer'
19
+ | 'ctaLabel'
20
+ | 'secondaryCtaLabel'
21
+ | 'linkLabel'
22
+ | 'secondaryLinkLabel'
23
+ | 'overlay'
24
+ | 'verifiedLabel'
25
+ | 'navLabel'
26
+ > {
27
+ /** Module copy — this screen reads the `privacyPolicy` slice. */
28
+ strings: ReusabilityStrings;
29
+ /**
30
+ * The policy itself. HOST-supplied content, never module copy — the same
31
+ * slot contract Qualified Signature's document viewers use for the contract
32
+ * page (GUIDELINES §10): paragraphs in `.reusability-document__prose`, the
33
+ * dateline in `.reusability-document__meta`. The host supplies it in the
34
+ * session's language; it is legal text and is never machine translated.
35
+ */
36
+ body?: ReactNode;
37
+ screenId?: string;
38
+ overrides?: PrizmaScreenOverrides;
39
+ onAction?: PrizmaScreenActionHandler;
40
+ }
41
+
42
+ /**
43
+ * Reusability (Incode Bridge) — Incode's privacy policy, read inside the flow.
44
+ * Built on the List archetype (GUIDELINES.md §6-G), the way Qualified
45
+ * Signature's document viewers are: the `__list` middle is "content filling the
46
+ * space between the title block and the CTA band", which is what a document is,
47
+ * and the band carries one full-width button.
48
+ *
49
+ * Figma: `demo_5` (7877:68997), the frame the "Incode’s Privacy Policy" link
50
+ * opens — the Demo App's terms layout re-used: the Incode logo top-LEFT on a
51
+ * 32px gutter, "Last Modified: August 5, 2024", the policy as an unframed wall
52
+ * of Body/M text, and a raised white band with "Done".
53
+ *
54
+ * Three deltas from that frame, all the system's (DEVIATIONS #RU-7):
55
+ * 1. The nav is the archetype's — logo centred, no close — and the document
56
+ * sits on the column's 24px gutter like every screen in this package
57
+ * (GUIDELINES §3, §5). The frame's left logo and 32 gutter are the Demo
58
+ * App's chrome, not a module's.
59
+ * 2. The frame draws no heading. GUIDELINES §4 gives every screen exactly one
60
+ * H2 and G has no title-less path (the same delta QS's `viewdoc` records),
61
+ * so the screen carries the link's own label as its title.
62
+ * 3. The policy scrolls inside the framed reader every document viewer here
63
+ * draws (`.reusability-document`, the QS recipe), not unframed to the
64
+ * frame's edge; the title, the button and the tag hold still while it pans.
65
+ *
66
+ * The policy is the host's (`body`), like QS's contract page: the SDK owns no
67
+ * legal text and translates none — the host supplies the document in the
68
+ * session's language. "Done" is the frame's primary and emits `cta`: it
69
+ * closes the policy and returns to the selection, where nothing has changed. On the Web SDK this
70
+ * link opens the policy in a NEW TAB instead (`identityReuse.opensInNewTab`);
71
+ * this screen is the in-flow reading the frame draws, which is what a native
72
+ * host presents.
73
+ */
74
+ export const ReusabilityPrivacyPolicyScreen = forwardRef<
75
+ HTMLDivElement,
76
+ ReusabilityPrivacyPolicyScreenProps
77
+ >(
78
+ (
79
+ { strings, body, screenId = 'reusability-privacy-policy', overrides, onAction, ...shell },
80
+ ref,
81
+ ) => {
82
+ const { privacyPolicy } = strings;
83
+ return (
84
+ <PrizmaListScreen
85
+ ref={ref}
86
+ title={privacyPolicy.title}
87
+ ctaLabel={privacyPolicy.ctaLabel}
88
+ verifiedLabel={strings.verifiedLabel}
89
+ navLabel={strings.navLabel}
90
+ screenId={screenId}
91
+ overrides={overrides}
92
+ onAction={onAction}
93
+ {...shell}
94
+ >
95
+ <div
96
+ className="reusability-document"
97
+ role="region"
98
+ aria-label={privacyPolicy.title}
99
+ tabIndex={0}
100
+ >
101
+ {body}
102
+ </div>
103
+ </PrizmaListScreen>
104
+ );
105
+ },
106
+ );
107
+ ReusabilityPrivacyPolicyScreen.displayName = 'ReusabilityPrivacyPolicyScreen';
108
+
109
+ export default ReusabilityPrivacyPolicyScreen;