@incodetech/prizma-core-screens 0.2.4 → 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 (243) 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/CurpEnterScreen.d.ts +7 -0
  8. package/dist/CurpEnterScreen.js +17 -3
  9. package/dist/CurpGenerateScreen.d.ts +8 -0
  10. package/dist/CurpGenerateScreen.js +28 -13
  11. package/dist/CurpLayout.css +8 -34
  12. package/dist/CurpStrings.d.ts +16 -2
  13. package/dist/DemoScreensLayout.css +16 -0
  14. package/dist/DemoScreensRedirectScreen.d.ts +6 -1
  15. package/dist/DemoScreensRedirectScreen.js +3 -2
  16. package/dist/DemoScreensStrings.d.ts +5 -0
  17. package/dist/DigitalIdUploadErrorScreen.d.ts +31 -0
  18. package/dist/DigitalIdUploadErrorScreen.js +26 -0
  19. package/dist/DigitalIdUploadFileTooLargeScreen.d.ts +27 -0
  20. package/dist/DigitalIdUploadFileTooLargeScreen.js +21 -0
  21. package/dist/DigitalIdUploadReviewScreen.d.ts +57 -0
  22. package/dist/DigitalIdUploadReviewScreen.js +44 -0
  23. package/dist/DigitalIdUploadStrings.d.ts +64 -0
  24. package/dist/DigitalIdUploadStrings.js +19 -0
  25. package/dist/DigitalIdUploadTutorialScreen.d.ts +28 -0
  26. package/dist/DigitalIdUploadTutorialScreen.js +23 -0
  27. package/dist/DocumentCaptureIllustration.d.ts +1 -1
  28. package/dist/EkybAddressDetailsScreen.d.ts +7 -0
  29. package/dist/EkybAddressDetailsScreen.js +25 -7
  30. package/dist/EkybBusinessDetailsScreen.d.ts +6 -0
  31. package/dist/EkybBusinessDetailsScreen.js +23 -6
  32. package/dist/EkybCountryScreen.d.ts +13 -5
  33. package/dist/EkybCountryScreen.js +41 -10
  34. package/dist/EkybOwnersScreen.d.ts +8 -0
  35. package/dist/EkybOwnersScreen.js +26 -3
  36. package/dist/EkybStrings.d.ts +32 -10
  37. package/dist/EkycCountryCatalog.d.ts +4 -1
  38. package/dist/EkycCountryCatalog.js +5 -3
  39. package/dist/EkycCountryFormScreen.d.ts +12 -3
  40. package/dist/EkycCountryFormScreen.js +28 -10
  41. package/dist/EkycDetailsScreen.d.ts +7 -0
  42. package/dist/EkycDetailsScreen.js +21 -4
  43. package/dist/EkycStrings.d.ts +14 -2
  44. package/dist/ElectronicSignatureLayout.css +6 -0
  45. package/dist/EmailInputStrings.d.ts +11 -1
  46. package/dist/EmailInputVerifyScreen.d.ts +7 -0
  47. package/dist/EmailInputVerifyScreen.js +17 -3
  48. package/dist/ErrorScreensScreen.d.ts +5 -2
  49. package/dist/ErrorScreensScreen.js +15 -4
  50. package/dist/ErrorScreensStrings.d.ts +17 -2
  51. package/dist/ErrorScreensStrings.js +18 -10
  52. package/dist/FaceCaptureCapturingScreen.d.ts +63 -0
  53. package/dist/FaceCaptureCapturingScreen.js +62 -2
  54. package/dist/FaceCaptureLayout.css +69 -4
  55. package/dist/FaceCaptureStrings.d.ts +23 -0
  56. package/dist/FaceMatchComparisonScreen.d.ts +3 -3
  57. package/dist/FaceMatchLayout.css +21 -12
  58. package/dist/FormScreen.css +30 -0
  59. package/dist/FormScreen.d.ts +28 -0
  60. package/dist/FormScreen.js +3 -2
  61. package/dist/FormsLongFormScreen.d.ts +8 -0
  62. package/dist/FormsLongFormScreen.js +34 -13
  63. package/dist/FormsStrings.d.ts +11 -1
  64. package/dist/GeolocationBrowserStepsScreen.d.ts +6 -2
  65. package/dist/GeolocationBrowserStepsScreen.js +7 -3
  66. package/dist/GeolocationStrings.d.ts +3 -0
  67. package/dist/IdCaptureLayout.css +205 -2
  68. package/dist/IdCaptureStageScreen.d.ts +47 -0
  69. package/dist/IdCaptureStageScreen.js +39 -3
  70. package/dist/IdCaptureStrings.d.ts +19 -0
  71. package/dist/ListScreen.d.ts +21 -0
  72. package/dist/ListScreen.js +7 -2
  73. package/dist/LoaderScreen.d.ts +7 -5
  74. package/dist/LoaderScreen.js +7 -5
  75. package/dist/LoadersStrings.d.ts +18 -5
  76. package/dist/OcrReviewErrorScreen.d.ts +30 -0
  77. package/dist/OcrReviewErrorScreen.js +24 -0
  78. package/dist/OcrReviewLayout.css +24 -0
  79. package/dist/OcrReviewLoadingScreen.d.ts +25 -0
  80. package/dist/OcrReviewLoadingScreen.js +19 -0
  81. package/dist/OcrReviewScreen.d.ts +76 -0
  82. package/dist/OcrReviewScreen.js +65 -0
  83. package/dist/OcrReviewStrings.d.ts +47 -0
  84. package/dist/OcrReviewStrings.js +17 -0
  85. package/dist/OcrReviewSuccessScreen.d.ts +30 -0
  86. package/dist/OcrReviewSuccessScreen.js +24 -0
  87. package/dist/PermissionsAllowScreen.d.ts +8 -11
  88. package/dist/PermissionsAllowScreen.js +8 -11
  89. package/dist/PermissionsAskScreen.d.ts +41 -0
  90. package/dist/PermissionsAskScreen.js +43 -0
  91. package/dist/PermissionsBrowserStepsScreen.d.ts +9 -2
  92. package/dist/PermissionsBrowserStepsScreen.js +12 -3
  93. package/dist/PermissionsLayout.css +47 -0
  94. package/dist/PermissionsStrings.d.ts +20 -9
  95. package/dist/PermissionsStrings.js +10 -4
  96. package/dist/PhoneInputLayout.css +10 -9
  97. package/dist/PhoneInputOtpScreen.d.ts +8 -0
  98. package/dist/PhoneInputOtpScreen.js +26 -19
  99. package/dist/PhoneInputStrings.d.ts +22 -4
  100. package/dist/PhoneInputVerifyScreen.d.ts +8 -0
  101. package/dist/PhoneInputVerifyScreen.js +36 -7
  102. package/dist/QualifiedSignatureAcceptScreen.js +6 -1
  103. package/dist/QualifiedSignatureDocumentScreen.d.ts +17 -10
  104. package/dist/QualifiedSignatureDocumentScreen.js +22 -17
  105. package/dist/QualifiedSignatureLayout.css +76 -0
  106. package/dist/QualifiedSignatureResultScreen.d.ts +16 -13
  107. package/dist/QualifiedSignatureResultScreen.js +17 -18
  108. package/dist/QualifiedSignatureStrings.d.ts +19 -2
  109. package/dist/ResultScreen.d.ts +8 -0
  110. package/dist/ResultScreen.js +14 -3
  111. package/dist/ReusabilityCredentialSelectionScreen.d.ts +95 -0
  112. package/dist/ReusabilityCredentialSelectionScreen.js +94 -0
  113. package/dist/ReusabilityLayout.css +241 -0
  114. package/dist/ReusabilityPrivacyPolicyScreen.d.ts +55 -0
  115. package/dist/ReusabilityPrivacyPolicyScreen.js +44 -0
  116. package/dist/ReusabilityStrings.d.ts +85 -0
  117. package/dist/ReusabilityStrings.js +37 -0
  118. package/dist/ReviewScreen.d.ts +38 -12
  119. package/dist/ReviewScreen.js +41 -8
  120. package/dist/ScreenLayout.css +382 -6
  121. package/dist/ScreenNav.css +8 -0
  122. package/dist/ScreenNav.d.ts +15 -2
  123. package/dist/ScreenNav.js +10 -3
  124. package/dist/VideoSelfieErrorScreen.js +1 -1
  125. package/dist/VideoSelfieIdCaptureScreen.d.ts +10 -3
  126. package/dist/VideoSelfieIdCaptureScreen.js +45 -14
  127. package/dist/VideoSelfieLayout.css +467 -34
  128. package/dist/VideoSelfieSelfieCaptureScreen.d.ts +44 -27
  129. package/dist/VideoSelfieSelfieCaptureScreen.js +65 -39
  130. package/dist/VideoSelfieSpeakScreen.js +19 -2
  131. package/dist/VideoSelfieStrings.d.ts +82 -13
  132. package/dist/VideoSelfieTurnHeadScreen.d.ts +51 -0
  133. package/dist/VideoSelfieTurnHeadScreen.js +66 -0
  134. package/dist/VideoSelfieTutorialScreen.d.ts +9 -0
  135. package/dist/VideoSelfieTutorialScreen.js +22 -5
  136. package/dist/VideoSelfieWaveScreen.d.ts +53 -0
  137. package/dist/VideoSelfieWaveScreen.js +62 -0
  138. package/dist/ViewfinderScreen.css +36 -0
  139. package/dist/WatchlistBusinessFormScreen.d.ts +11 -7
  140. package/dist/WatchlistBusinessFormScreen.js +27 -13
  141. package/dist/WatchlistBusinessStrings.d.ts +21 -7
  142. package/dist/flows.d.ts +8 -0
  143. package/dist/flows.js +17 -0
  144. package/dist/index.d.ts +19 -1
  145. package/dist/index.js +14 -0
  146. package/dist/styles.css +3 -0
  147. package/dist/types.d.ts +3 -1
  148. package/package.json +79 -3
  149. package/samples/video-selfie-camera-wide.jpg +0 -0
  150. package/samples/video-selfie-room-wide.jpg +0 -0
  151. package/samples/video-selfie-room.png +0 -0
  152. package/src/BiometricConsentScreen.tsx +192 -0
  153. package/src/BiometricConsentStrings.ts +119 -0
  154. package/src/CaptureScreen.tsx +17 -0
  155. package/src/CurpEnterScreen.tsx +21 -4
  156. package/src/CurpGenerateScreen.tsx +46 -22
  157. package/src/CurpLayout.css +8 -34
  158. package/src/CurpStrings.ts +22 -2
  159. package/src/DemoScreensLayout.css +16 -0
  160. package/src/DemoScreensRedirectScreen.tsx +14 -6
  161. package/src/DemoScreensStrings.ts +5 -0
  162. package/src/DigitalIdUploadErrorScreen.tsx +83 -0
  163. package/src/DigitalIdUploadFileTooLargeScreen.tsx +67 -0
  164. package/src/DigitalIdUploadReviewScreen.tsx +119 -0
  165. package/src/DigitalIdUploadStrings.ts +88 -0
  166. package/src/DigitalIdUploadTutorialScreen.tsx +59 -0
  167. package/src/DocumentCaptureIllustration.tsx +1 -1
  168. package/src/EkybAddressDetailsScreen.tsx +32 -4
  169. package/src/EkybBusinessDetailsScreen.tsx +23 -5
  170. package/src/EkybCountryScreen.tsx +45 -7
  171. package/src/EkybOwnersScreen.tsx +34 -3
  172. package/src/EkybStrings.ts +34 -10
  173. package/src/EkycCountryCatalog.ts +9 -4
  174. package/src/EkycCountryFormScreen.tsx +51 -12
  175. package/src/EkycDetailsScreen.tsx +22 -1
  176. package/src/EkycStrings.ts +14 -2
  177. package/src/ElectronicSignatureLayout.css +6 -0
  178. package/src/EmailInputStrings.ts +12 -1
  179. package/src/EmailInputVerifyScreen.tsx +21 -4
  180. package/src/ErrorScreensScreen.tsx +15 -4
  181. package/src/ErrorScreensStrings.ts +37 -12
  182. package/src/FaceCaptureCapturingScreen.tsx +102 -13
  183. package/src/FaceCaptureLayout.css +69 -4
  184. package/src/FaceCaptureStrings.ts +24 -0
  185. package/src/FaceMatchComparisonScreen.tsx +3 -3
  186. package/src/FaceMatchLayout.css +21 -12
  187. package/src/FormScreen.css +30 -0
  188. package/src/FormScreen.tsx +34 -0
  189. package/src/FormsLongFormScreen.tsx +41 -13
  190. package/src/FormsStrings.ts +12 -1
  191. package/src/GeolocationBrowserStepsScreen.tsx +6 -3
  192. package/src/GeolocationStrings.ts +3 -0
  193. package/src/IdCaptureLayout.css +205 -2
  194. package/src/IdCaptureStageScreen.tsx +75 -0
  195. package/src/IdCaptureStrings.ts +19 -0
  196. package/src/ListScreen.tsx +58 -10
  197. package/src/LoaderScreen.tsx +7 -5
  198. package/src/LoadersStrings.ts +18 -5
  199. package/src/OcrReviewErrorScreen.tsx +53 -0
  200. package/src/OcrReviewLayout.css +24 -0
  201. package/src/OcrReviewLoadingScreen.tsx +48 -0
  202. package/src/OcrReviewScreen.tsx +190 -0
  203. package/src/OcrReviewStrings.ts +69 -0
  204. package/src/OcrReviewSuccessScreen.tsx +52 -0
  205. package/src/PermissionsAllowScreen.tsx +9 -10
  206. package/src/PermissionsAskScreen.tsx +105 -0
  207. package/src/PermissionsBrowserStepsScreen.tsx +11 -3
  208. package/src/PermissionsLayout.css +47 -0
  209. package/src/PermissionsStrings.ts +42 -12
  210. package/src/PhoneInputLayout.css +10 -9
  211. package/src/PhoneInputOtpScreen.tsx +23 -3
  212. package/src/PhoneInputStrings.ts +23 -4
  213. package/src/PhoneInputVerifyScreen.tsx +41 -5
  214. package/src/QualifiedSignatureAcceptScreen.tsx +12 -1
  215. package/src/QualifiedSignatureDocumentScreen.tsx +31 -19
  216. package/src/QualifiedSignatureLayout.css +76 -0
  217. package/src/QualifiedSignatureResultScreen.tsx +28 -26
  218. package/src/QualifiedSignatureStrings.ts +19 -2
  219. package/src/ResultScreen.tsx +33 -2
  220. package/src/ReusabilityCredentialSelectionScreen.tsx +246 -0
  221. package/src/ReusabilityLayout.css +241 -0
  222. package/src/ReusabilityPrivacyPolicyScreen.tsx +109 -0
  223. package/src/ReusabilityStrings.ts +127 -0
  224. package/src/ReviewScreen.tsx +96 -27
  225. package/src/ScreenLayout.css +382 -6
  226. package/src/ScreenNav.css +8 -0
  227. package/src/ScreenNav.tsx +35 -5
  228. package/src/VideoSelfieErrorScreen.tsx +1 -1
  229. package/src/VideoSelfieIdCaptureScreen.tsx +125 -31
  230. package/src/VideoSelfieLayout.css +467 -34
  231. package/src/VideoSelfieSelfieCaptureScreen.tsx +110 -57
  232. package/src/VideoSelfieSpeakScreen.tsx +34 -15
  233. package/src/VideoSelfieStrings.ts +89 -14
  234. package/src/VideoSelfieTurnHeadScreen.tsx +162 -0
  235. package/src/VideoSelfieTutorialScreen.tsx +45 -23
  236. package/src/VideoSelfieWaveScreen.tsx +143 -0
  237. package/src/ViewfinderScreen.css +36 -0
  238. package/src/WatchlistBusinessFormScreen.tsx +35 -16
  239. package/src/WatchlistBusinessStrings.ts +21 -7
  240. package/src/flows.ts +25 -0
  241. package/src/index.ts +88 -3
  242. package/src/styles.css +3 -0
  243. package/src/types.ts +3 -1
@@ -0,0 +1,48 @@
1
+ import React, { forwardRef } from 'react';
2
+ import { PrizmaResultScreen, type PrizmaResultScreenProps } from './ResultScreen';
3
+ import type { PrizmaScreenActionHandler, PrizmaScreenOverrides } from './types';
4
+ import type { OcrReviewStrings } from './OcrReviewStrings';
5
+ import './ScreenLayout.css';
6
+
7
+ export interface OcrReviewLoadingScreenProps
8
+ extends Omit<
9
+ PrizmaResultScreenProps,
10
+ 'status' | 'title' | 'subtitle' | 'verifiedLabel' | 'navLabel'
11
+ > {
12
+ /** Module copy — this screen reads the `loading` slice. */
13
+ strings: OcrReviewStrings;
14
+ screenId?: string;
15
+ overrides?: PrizmaScreenOverrides;
16
+ onAction?: PrizmaScreenActionHandler;
17
+ }
18
+
19
+ /**
20
+ * OCR Review — server-side verification wait ("Hold on a sec…"). Figma:
21
+ * `1-18-1-id-hold-on` (31084:18795) — ID Capture's own frame, redrawn here
22
+ * rather than imported by reference: every module in this package owns its
23
+ * hold-on-shaped screen independently (`IdCaptureHoldOnScreen.tsx` is ID
24
+ * Capture's), and a cross-module import was tried once (Digital ID Upload)
25
+ * and dropped rather than kept.
26
+ *
27
+ * Archetype C (§6-C), `PrizmaResultScreen` with `status="loading"` and no CTA
28
+ * — identical shape to `IdCaptureHoldOnScreen.tsx`.
29
+ */
30
+ export const OcrReviewLoadingScreen = forwardRef<HTMLDivElement, OcrReviewLoadingScreenProps>(
31
+ ({ strings, screenId = 'ocr-review-loading', overrides, onAction, ...shell }, ref) => (
32
+ <PrizmaResultScreen
33
+ ref={ref}
34
+ status="loading"
35
+ title={strings.loading.title}
36
+ subtitle={strings.loading.description}
37
+ verifiedLabel={strings.verifiedLabel}
38
+ navLabel={strings.navLabel}
39
+ screenId={screenId}
40
+ overrides={overrides}
41
+ onAction={onAction}
42
+ {...shell}
43
+ />
44
+ ),
45
+ );
46
+ OcrReviewLoadingScreen.displayName = 'OcrReviewLoadingScreen';
47
+
48
+ export default OcrReviewLoadingScreen;
@@ -0,0 +1,190 @@
1
+ import React, { forwardRef } from 'react';
2
+ import { PrizmaTextField } from '@incodetech/prizma-core-web/text-field';
3
+ import { PrizmaDateField } from '@incodetech/prizma-core-web/date-field';
4
+ import { PrizmaRadio } from '@incodetech/prizma-core-web/radio';
5
+ import { PrizmaRadioGroup } from '@incodetech/prizma-core-web/radio-group';
6
+ import { PrizmaFormScreen, type PrizmaFormScreenProps } from './FormScreen';
7
+ import type { PrizmaScreenActionHandler, PrizmaScreenOverrides } from './types';
8
+ import type { OcrReviewState, OcrReviewStrings } from './OcrReviewStrings';
9
+ import './ScreenLayout.css';
10
+ import './OcrReviewLayout.css';
11
+
12
+ export interface OcrReviewScreenProps
13
+ extends Omit<
14
+ PrizmaFormScreenProps,
15
+ 'title' | 'ctaLabel' | 'verifiedLabel' | 'children' | 'navLabel' | 'scrollFields'
16
+ > {
17
+ /** Module copy — this screen reads the `review` slice. */
18
+ strings: OcrReviewStrings;
19
+ /** Which `Review OCR Enable Edit` instance to render. Default `default`.
20
+ * Ignored when `editable` is `false` — the disabled frame draws none of
21
+ * these states (there is nothing to submit wrong when nothing can be
22
+ * typed). */
23
+ state?: OcrReviewState;
24
+ /**
25
+ * `Review OCR Enable Edit` vs `Review OCR Disable Edit` (30530:119373) — the
26
+ * module's own boolean axis, orthogonal to `state`. `false` renders every
27
+ * field `disabled` (Core's grey surface + dimmed text, same prop
28
+ * `PrizmaTextField` / `PrizmaDateField` / `PrizmaRadioGroup` already ship)
29
+ * with no required asterisks (the frame hides them — nothing to validate on
30
+ * a field nobody can edit) while Continue stays enabled. Default `true`.
31
+ */
32
+ editable?: boolean;
33
+ /** The subject photo — Figma's `Image / Selfie`, 90×90 circular. */
34
+ photoSrc: string;
35
+ /** Field values the fields start with. Every field is uncontrolled
36
+ * (`defaultValue`) — a screen is one static spec state, same rule
37
+ * `EkycDetailsScreen` draws (#PI-6). */
38
+ values?: {
39
+ fullName?: string;
40
+ dateOfBirth?: string;
41
+ gender?: 'male' | 'female';
42
+ documentNumber?: string;
43
+ expiryDate?: string;
44
+ address?: string;
45
+ };
46
+ screenId?: string;
47
+ overrides?: PrizmaScreenOverrides;
48
+ onAction?: PrizmaScreenActionHandler;
49
+ }
50
+
51
+ /**
52
+ * OCR Review — "Please check your data", built on the Form archetype
53
+ * (GUIDELINES.md §6-E, `PrizmaFormScreen`).
54
+ *
55
+ * ONE screen for both drawn states: `default` (31084:18792 / 18794 — every
56
+ * field filled, Continue enabled) and `documentNumberMissing` (31084:18793 —
57
+ * every OTHER field keeps its filled value, only Document number is cleared
58
+ * and carries Core's `error` + `documentNumberRequiredError`). Unlike eKYC's
59
+ * `emptyError` (every required field clears and errors together), this frame
60
+ * draws a SINGLE field in that state — the empty-submit rule still applies,
61
+ * scoped to the one field Figma actually shows failing it.
62
+ *
63
+ * The photo sits ABOVE Full name as the field stack's own first row — Figma's
64
+ * `input-list` draws it at the same Spacing/16 rhythm as every field below it.
65
+ * It is the field stack's plain FIRST CHILD, nothing more: `PrizmaFormScreen`
66
+ * already renders whatever `children` hands it with that same gap, so this
67
+ * needed no new slot on the archetype (the archetype is untouched).
68
+ *
69
+ * Date of birth and Expiry date are both Core's `PrizmaDateField` — the
70
+ * frame's "Dropdown" instance name is the shared component's internal name for
71
+ * a date-kind field, not a literal dropdown (same reading `EkycDetailsScreen`
72
+ * gives its own Date of birth field). Gender is Core's `PrizmaRadioGroup` +
73
+ * `PrizmaRadio` — first real consumer of either in this package.
74
+ *
75
+ * The field stack SCROLLS (`scrollFields`, the same archetype prop eKYB's
76
+ * `EkybOwnersScreen`, Forms' long form and Qualified Signature's accept screen
77
+ * already use): the photo plus six fields do not fit an 844 frame without it,
78
+ * and without the release the Address row paints under the CTA instead of
79
+ * above it. Not a prop a caller picks — this module always needs it, so it is
80
+ * omitted from `OcrReviewScreenProps` and hardcoded here, matching those three
81
+ * precedents. `Review OCR Disable Edit` overflows the same way (its own
82
+ * `input-list` measures 654 against a 448 middle container) — one more reason
83
+ * `editable` is a prop of this same screen rather than a second component.
84
+ */
85
+ export const OcrReviewScreen = forwardRef<HTMLDivElement, OcrReviewScreenProps>(
86
+ (
87
+ {
88
+ strings,
89
+ state = 'default',
90
+ editable = true,
91
+ photoSrc,
92
+ values,
93
+ screenId = editable ? `ocr-review-${state}` : 'ocr-review-disabled',
94
+ ctaDisabled,
95
+ className,
96
+ overrides,
97
+ onAction,
98
+ ...shell
99
+ },
100
+ ref,
101
+ ) => {
102
+ // The empty-submit retry only exists on the editable frame — nothing can
103
+ // be left empty on a field nobody can type into.
104
+ const documentNumberMissing = editable && state === 'documentNumberMissing';
105
+ const documentNumberError = documentNumberMissing
106
+ ? { error: true, errorText: strings.review.documentNumberRequiredError }
107
+ : {};
108
+ // `Review OCR Disable Edit` hides every required asterisk (31256:169923 is
109
+ // marked `hidden` on its own Gender row) — spread onto every field only
110
+ // when editable, rather than a `required={editable}` on each that would
111
+ // still render an empty, pointless suffix slot.
112
+ const requiredProps = editable
113
+ ? { required: true, requiredHint: strings.review.requiredHint }
114
+ : {};
115
+
116
+ return (
117
+ <PrizmaFormScreen
118
+ ref={ref}
119
+ className={className}
120
+ title={strings.review.title}
121
+ ctaLabel={strings.review.ctaLabel}
122
+ ctaDisabled={ctaDisabled}
123
+ verifiedLabel={strings.verifiedLabel}
124
+ navLabel={strings.navLabel}
125
+ screenId={screenId}
126
+ overrides={overrides}
127
+ onAction={onAction}
128
+ /* The archetype's own scrolling field stack — the photo plus six
129
+ fields do not fit an 844 frame. No module CSS. */
130
+ scrollFields
131
+ {...shell}
132
+ >
133
+ <div className="ocr-review__photo">
134
+ <img src={photoSrc} alt="" />
135
+ </div>
136
+ <PrizmaTextField
137
+ label={strings.review.fullNameLabel}
138
+ {...requiredProps}
139
+ disabled={!editable}
140
+ defaultValue={values?.fullName ?? ''}
141
+ autoComplete="off"
142
+ clearable={false}
143
+ />
144
+ <PrizmaDateField
145
+ label={strings.review.dateOfBirthLabel}
146
+ {...requiredProps}
147
+ disabled={!editable}
148
+ defaultValue={values?.dateOfBirth ?? ''}
149
+ autoComplete="off"
150
+ />
151
+ <PrizmaRadioGroup
152
+ name={`${screenId}-gender`}
153
+ legend={strings.review.genderLabel}
154
+ defaultValue={values?.gender}
155
+ disabled={!editable}
156
+ >
157
+ <PrizmaRadio textSize="m" value="male" text={strings.review.maleLabel} />
158
+ <PrizmaRadio textSize="m" value="female" text={strings.review.femaleLabel} />
159
+ </PrizmaRadioGroup>
160
+ <PrizmaTextField
161
+ label={strings.review.documentNumberLabel}
162
+ {...requiredProps}
163
+ {...documentNumberError}
164
+ disabled={!editable}
165
+ defaultValue={documentNumberMissing ? '' : values?.documentNumber ?? ''}
166
+ autoComplete="off"
167
+ clearable={false}
168
+ />
169
+ <PrizmaDateField
170
+ label={strings.review.expiryDateLabel}
171
+ {...requiredProps}
172
+ disabled={!editable}
173
+ defaultValue={values?.expiryDate ?? ''}
174
+ autoComplete="off"
175
+ />
176
+ <PrizmaTextField
177
+ label={strings.review.addressLabel}
178
+ {...requiredProps}
179
+ disabled={!editable}
180
+ defaultValue={values?.address ?? ''}
181
+ autoComplete="off"
182
+ clearable={false}
183
+ />
184
+ </PrizmaFormScreen>
185
+ );
186
+ },
187
+ );
188
+ OcrReviewScreen.displayName = 'OcrReviewScreen';
189
+
190
+ export default OcrReviewScreen;
@@ -0,0 +1,69 @@
1
+ // OCR Review module — copy contract.
2
+ //
3
+ // Every OCR Review screen receives the SAME `strings: OcrReviewStrings`
4
+ // object (rule: all copy via props, no hardcoded English — GUIDELINES.md §9).
5
+ //
6
+ // Authoritative screens: `ID Capture — Latest Design` file
7
+ // (U1EOfl9RQ1rOlOIuQw3rhL), section `OCR Review - 🍎 iOS - Full flow`
8
+ // (31084:18781) → `Happy Path` (31084:18782). Three `Review OCR Enable Edit`
9
+ // instances draw one screen in two states (filled, and Document number
10
+ // cleared + errored after an empty Continue press), `1-18-1-id-hold-on` is
11
+ // ID Capture's own wait screen redrawn here rather than reused by reference
12
+ // (see OcrReviewLoadingScreen.tsx — every module in this package owns its own
13
+ // hold-on-shaped screen; Digital ID Upload tried sharing one by reference and
14
+ // it was dropped, not kept), `OCR Success` and `OCR Error` (the latter OUTSIDE
15
+ // the Happy Path section, reached off the "Processed successfully?" decision's
16
+ // "No" branch) close the module on Archetype F.
17
+
18
+ export type OcrReviewState = 'default' | 'documentNumberMissing';
19
+
20
+ export interface OcrReviewStrings {
21
+ /** Accessible name for the logo nav region (i18n — no baked-in English). */
22
+ navLabel?: string;
23
+ /** "verified by" attribution copy for the footer tag. */
24
+ verifiedLabel: string;
25
+
26
+ /** `Review OCR Enable Edit` (31084:18792 / 18793 / 18794) — one screen, two
27
+ * states (`default`, `documentNumberMissing`). */
28
+ review: {
29
+ /** "Please check your data" */
30
+ title: string;
31
+ /** The asterisk suffix on every required field's label ("*"). */
32
+ requiredHint: string;
33
+ fullNameLabel: string;
34
+ dateOfBirthLabel: string;
35
+ genderLabel: string;
36
+ maleLabel: string;
37
+ femaleLabel: string;
38
+ documentNumberLabel: string;
39
+ /** "Field can't be empty" — Document number's error in `documentNumberMissing`. */
40
+ documentNumberRequiredError: string;
41
+ expiryDateLabel: string;
42
+ addressLabel: string;
43
+ /** "Continue" */
44
+ ctaLabel: string;
45
+ };
46
+
47
+ /** `1-18-1-id-hold-on`, redrawn for this module (see OcrReviewLoadingScreen.tsx). */
48
+ loading: {
49
+ /** "Hold on a sec.." */
50
+ title: string;
51
+ /** "We're verifying your identity" */
52
+ description: string;
53
+ };
54
+
55
+ /** `OCR Success` (31084:18796). */
56
+ success: {
57
+ /** "Identity successfully verified" */
58
+ title: string;
59
+ };
60
+
61
+ /** `OCR Error` (31084:18797) — off the "Processed successfully?" decision's
62
+ * "No" branch, drawn outside the Happy Path section. */
63
+ error: {
64
+ /** "Something went wrong" */
65
+ title: string;
66
+ /** "Try again" */
67
+ ctaLabel: string;
68
+ };
69
+ }
@@ -0,0 +1,52 @@
1
+ import React, { forwardRef } from 'react';
2
+ import { PrizmaResultScreen, type PrizmaResultScreenProps } from './ResultScreen';
3
+ import type { PrizmaScreenActionHandler, PrizmaScreenOverrides } from './types';
4
+ import type { OcrReviewStrings } from './OcrReviewStrings';
5
+ import './ScreenLayout.css';
6
+
7
+ export interface OcrReviewSuccessScreenProps
8
+ extends Omit<
9
+ PrizmaResultScreenProps,
10
+ 'status' | 'title' | 'ctaLabel' | 'verifiedLabel' | 'navLabel'
11
+ > {
12
+ /** Module copy — this screen reads the `success` slice. */
13
+ strings: OcrReviewStrings;
14
+ screenId?: string;
15
+ overrides?: PrizmaScreenOverrides;
16
+ onAction?: PrizmaScreenActionHandler;
17
+ }
18
+
19
+ /**
20
+ * OCR Review — "Identity successfully verified", built on Archetype F
21
+ * (GUIDELINES.md §6-F, `PrizmaResultScreen`). Figma: `OCR Success` (31084:18796),
22
+ * the "Processed successfully?" decision's "Yes" branch — status mark + title
23
+ * alone, no CTA drawn (the frame hands off straight to the next module).
24
+ *
25
+ * Nav and footer tag are left at the archetype's DEFAULT (shown), matching
26
+ * every other module's success screen (`EkycSuccessScreen`, `EkybSuccessScreen`,
27
+ * `NfcSuccessScreen`, `FormsSuccessScreen`, …) — none of them hide header or
28
+ * footer. The Figma frame itself draws neither, but copying that as a
29
+ * per-screen override was wrong: hiding BOTH with no CTA band to balance it
30
+ * left nothing reserved at the bottom, so the status + title sat noticeably
31
+ * lower than the centred position every sibling success screen keeps (Mili,
32
+ * 2026-10-12 — checked against the system's own screens, not re-derived from
33
+ * the frame).
34
+ */
35
+ export const OcrReviewSuccessScreen = forwardRef<HTMLDivElement, OcrReviewSuccessScreenProps>(
36
+ ({ strings, screenId = 'ocr-review-success', overrides, onAction, ...shell }, ref) => (
37
+ <PrizmaResultScreen
38
+ ref={ref}
39
+ status="success"
40
+ title={strings.success.title}
41
+ verifiedLabel={strings.verifiedLabel}
42
+ navLabel={strings.navLabel}
43
+ screenId={screenId}
44
+ overrides={overrides}
45
+ onAction={onAction}
46
+ {...shell}
47
+ />
48
+ ),
49
+ );
50
+ OcrReviewSuccessScreen.displayName = 'OcrReviewSuccessScreen';
51
+
52
+ export default OcrReviewSuccessScreen;
@@ -13,6 +13,7 @@ export interface PermissionsAllowScreenProps
13
13
  | 'glyph'
14
14
  | 'ctaLabel'
15
15
  | 'linkLabel'
16
+ | 'linkPosition'
16
17
  | 'verifiedLabel'
17
18
  | 'navLabel'
18
19
  > {
@@ -42,16 +43,13 @@ export interface PermissionsAllowScreenProps
42
43
  * `showHeader={false}` keeps the section's logo-free chrome (the flow has not
43
44
  * started) with the nav row still reserved.
44
45
  *
45
- * TWO things Figma draws that this screen does not, both reported rather than
46
- * worked around:
47
- * - **The filled amber disc.** Core renders the canonical OUTLINE warning mark
48
- * (icon-outline sweep, DEVIATIONS #15).
49
- * - **"Quit process" above the CTA.** Archetype F renders its tertiary link
50
- * BELOW the button stack (`ResultScreen.tsx`), so this screen ships inverted
51
- * against its frame. The archetype owns the order and no screen re-declares
52
- * it — F needs a `ctaOrder` slot alongside the `ctaOrientation` it already
53
- * has, exactly as Geolocation escalated for the same reason. Borrowing
54
- * `bandContent` to fake the position is the workaround #VS-17 rejected.
46
+ * "Quit process" sits ABOVE "Allow permission", as the frame draws it, through
47
+ * archetype F's `linkPosition="above"` (DEVIATIONS #GEN-3). Its sibling
48
+ * `PermissionsRequiredScreen` (archetype G) already renders that order.
49
+ *
50
+ * One thing Figma draws that this screen does not, reported rather than worked
51
+ * around: **the filled amber disc.** Core renders the canonical OUTLINE warning
52
+ * mark (icon-outline sweep, DEVIATIONS #15).
55
53
  */
56
54
  export const PermissionsAllowScreen = forwardRef<
57
55
  HTMLDivElement,
@@ -76,6 +74,7 @@ export const PermissionsAllowScreen = forwardRef<
76
74
  subtitle={strings.allow.subtitle}
77
75
  ctaLabel={strings.allow.ctaLabel}
78
76
  linkLabel={strings.allow.quitLabel}
77
+ linkPosition="above"
79
78
  verifiedLabel={strings.verifiedLabel}
80
79
  navLabel={strings.navLabel}
81
80
  screenId={screenId}
@@ -0,0 +1,105 @@
1
+ import React, { forwardRef } from 'react';
2
+ import { PrizmaBottomSheetContent } from '@incodetech/prizma-core-web/bottom-sheet';
3
+ import { PrizmaModalContent } from '@incodetech/prizma-core-web/modal';
4
+ import { PrizmaScreenShell, type PrizmaScreenShellProps } from './ScreenShell';
5
+ import type { PrizmaScreenActionHandler } from './types';
6
+ import type { PermissionsStrings } from './PermissionsStrings';
7
+ import './ScreenLayout.css';
8
+ import './PermissionsLayout.css';
9
+
10
+ export interface PermissionsAskScreenProps extends Omit<
11
+ PrizmaScreenShellProps,
12
+ 'dark' | 'title' | 'children'
13
+ > {
14
+ /** Family copy — this screen reads the `ask` slice. */
15
+ strings: PermissionsStrings;
16
+ /**
17
+ * How the ask is presented. `sheet` (default) is the phone frame's bottom
18
+ * sheet. `dialog` is Core's centred Modal, for a desktop browser window: a
19
+ * sheet pinned to the bottom of a wide window reads as a phone screen pasted
20
+ * on the page (Camila, 2026-10-07). Same copy, same two choices.
21
+ */
22
+ presentation?: 'sheet' | 'dialog';
23
+ screenId?: string;
24
+ onAction?: PrizmaScreenActionHandler;
25
+ }
26
+
27
+ /**
28
+ * Permissions — the pre-permission sheet, "Allow camera access".
29
+ *
30
+ * Figma: `1-3-1-id-permission-modal` (qGJjfL4O0JSjz1x4tOjJn8), the first frame
31
+ * of all three full-flow boards (Web 3:620, iOS 3:7788, Android 4:11304). It is
32
+ * the SDK's own sheet, not the browser's prompt: Core's Bottom Sheet `dialog`
33
+ * (handle, title, supporting line) carrying a horizontal Button Group with
34
+ * "Don't allow" (secondary) left of "Allow" (primary), which is
35
+ * `horizontal-v1`'s order. "Allow" is what raises the real OS prompt.
36
+ *
37
+ * On desktop (`presentation="dialog"`) the same ask is Core's Modal `default`
38
+ * variant, centred over the scrim the way NFC's settings dialog is: Core
39
+ * renders the card and its Button Group (its own `vertical-v1` default, Allow
40
+ * over Don't allow), the screen adds only the scrim and the centring. No close
41
+ * icon: the two buttons are the only answers the ask has.
42
+ *
43
+ * Nothing is drawn behind the sheet: every board shows the sheet over an empty
44
+ * frame, so the screen is the scrim alone. Same scrim + panel split as
45
+ * Document Capture's method sheet (#DC-30).
46
+ */
47
+ export const PermissionsAskScreen = forwardRef<HTMLDivElement, PermissionsAskScreenProps>(
48
+ (
49
+ {
50
+ strings,
51
+ presentation = 'sheet',
52
+ screenId = presentation === 'dialog' ? 'permissions-ask-dialog' : 'permissions-ask',
53
+ onAction,
54
+ ...shell
55
+ },
56
+ ref,
57
+ ) => (
58
+ <PrizmaScreenShell
59
+ ref={ref}
60
+ data-screen-id={screenId}
61
+ // A dialog dims the whole browser window, not a column of it. Hosts that
62
+ // frame screens (Core Lab's desktop card) read this to let the screen
63
+ // span the window.
64
+ data-pcs-overlay={presentation === 'dialog' ? 'window' : undefined}
65
+ {...shell}
66
+ >
67
+ <div className="permissions-sheet-scrim" aria-hidden="true" />
68
+ {presentation === 'dialog' ? (
69
+ <div className="permissions-dialog-panel">
70
+ <PrizmaModalContent
71
+ title={strings.ask.title}
72
+ subtitle={strings.ask.subtitle}
73
+ showCloseIcon={false}
74
+ buttonGroupProps={{
75
+ primaryLabel: strings.ask.allowLabel,
76
+ secondaryLabel: strings.ask.denyLabel,
77
+ onPrimaryClick: () => onAction?.({ type: 'cta', screenId }),
78
+ onSecondaryClick: () => onAction?.({ type: 'secondary', screenId }),
79
+ }}
80
+ />
81
+ </div>
82
+ ) : (
83
+ <div className="permissions-sheet-panel">
84
+ <PrizmaBottomSheetContent
85
+ variant="dialog"
86
+ ariaLabel={strings.ask.title}
87
+ title={strings.ask.title}
88
+ subtitle={strings.ask.subtitle}
89
+ buttonGroupProps={{
90
+ orientation: 'horizontal-v1',
91
+ primaryLabel: strings.ask.allowLabel,
92
+ secondaryLabel: strings.ask.denyLabel,
93
+ showTertiary: false,
94
+ onPrimaryClick: () => onAction?.({ type: 'cta', screenId }),
95
+ onSecondaryClick: () => onAction?.({ type: 'secondary', screenId }),
96
+ }}
97
+ />
98
+ </div>
99
+ )}
100
+ </PrizmaScreenShell>
101
+ ),
102
+ );
103
+ PermissionsAskScreen.displayName = 'PermissionsAskScreen';
104
+
105
+ export default PermissionsAskScreen;
@@ -29,6 +29,7 @@ import './ScreenLayout.css';
29
29
  * both forbidden (rule 1, GUIDELINES §10), so each row takes the nearest
30
30
  * canonical glyph:
31
31
  *
32
+ * addressBar → IconTextAi the address bar's page / site control
32
33
  * settings → IconLock site settings sit behind the address-bar lock
33
34
  * browser → IconTextAi Safari's "AA" is the address-bar text control
34
35
  * menu → IconNumberedList the ⋮ overflow opens a menu list
@@ -45,6 +46,7 @@ import './ScreenLayout.css';
45
46
  * glyphs or bless the substitutions — one decision covers both families.
46
47
  */
47
48
  const STEP_ICONS: Record<PermissionsStepKind, ReactNode> = {
49
+ addressBar: <IconTextAi size="m" />,
48
50
  settings: <IconLock size="m" />,
49
51
  browser: <IconTextAi size="m" />,
50
52
  menu: <IconNumberedList size="m" />,
@@ -83,15 +85,22 @@ export interface PermissionsBrowserStepsScreenProps
83
85
  *
84
86
  * Figma: `1-4-2-id` of the `Permissions` section, plus the four
85
87
  * `Android browsers` frames of the Web full-flow board (4:8159 — Chrome,
86
- * Firefox, Samsung Internet, Opera). ONE screen for all five: they draw the
88
+ * Firefox, Samsung Internet, Opera). The browser set and every step path are
89
+ * Geolocation's (`GeolocationBrowserStepsScreen`), nine browsers, with the
90
+ * camera in place of the location. ONE screen for all of them: they draw the
87
91
  * identical skeleton — title block → a step list filling the middle → the
88
92
  * refresh CTA — and differ only in the rows, because re-enabling the camera is
89
- * a different journey in each browser. Five files would have been five chances
93
+ * a different journey in each browser. Nine files would have been nine chances
90
94
  * to drift.
91
95
  *
92
96
  * The rows are Core's `PrizmaCardListCommonIssues` verbatim; only the leading
93
97
  * glyph is chosen here, from the canonical bank (see `STEP_ICONS`).
94
98
  *
99
+ * No subtitle: none of the frames draws the browser name under the title,
100
+ * and the same call was made for Geolocation's step lists (owner call, Elena
101
+ * 2026-09-30). `label` stays in the strings as the section's identifier for
102
+ * hosts and catalogs; the screen itself shows title + steps.
103
+ *
95
104
  * The title block is LEFT-aligned for this whole family. Every frame starts the
96
105
  * two-line headline flush at the gutter over left-led step rows; a centred
97
106
  * headline above a left-aligned list reads as a mistake. The screen therefore
@@ -133,7 +142,6 @@ export const PermissionsBrowserStepsScreen = forwardRef<
133
142
  ref={ref}
134
143
  showHeader={showHeader}
135
144
  title={strings.browserSteps.title}
136
- subtitle={slice?.label}
137
145
  ctaLabel={strings.browserSteps.ctaLabel}
138
146
  verifiedLabel={strings.verifiedLabel}
139
147
  navLabel={strings.navLabel}
@@ -0,0 +1,47 @@
1
+ /* Permissions — the pre-permission sheet (`PermissionsAskScreen`).
2
+ *
3
+ * Same idiom as Document Capture's method sheet (DEVIATIONS #DC-30): Core's
4
+ * `PrizmaBottomSheetContent` owns the panel (handle, radius, padding, title,
5
+ * button group); the screen owns the scrim, because the safe presenter portals
6
+ * to `document.body` and would escape the 390 × 844 frame. The scrim drinks
7
+ * Core's own `Surface/Overlay` token. No animation: a screen is one static
8
+ * spec state. */
9
+ .permissions-sheet-scrim {
10
+ position: absolute;
11
+ inset: 0;
12
+ z-index: 1;
13
+ background: var(--prizma-surface-overlay);
14
+ }
15
+
16
+ .permissions-sheet-panel {
17
+ position: absolute;
18
+ left: 0;
19
+ right: 0;
20
+ bottom: 0;
21
+ z-index: 2;
22
+ }
23
+
24
+ /* The frame's `System UI Bottom Bar` (34) sits INSIDE the sheet. Core reserves
25
+ * it as `env(safe-area-inset-bottom, var(--prizma-sheet-size-safe-area))`, but
26
+ * a browser defines the inset as 0 on a flat screen, so the fallback never
27
+ * applies and the CTAs drop to 12px off the frame's bottom. Screens in this
28
+ * package reserve device chrome as fixed values (`--pcs-status-bar`), so the
29
+ * sheet takes Core's own Sheet/Size/Safe-area token directly here. */
30
+ .permissions-sheet-panel .prizma-bottom-sheet__safe-area {
31
+ height: var(--prizma-sheet-size-safe-area);
32
+ }
33
+
34
+ /* Desktop: the same ask as Core's centred Modal (`presentation="dialog"`).
35
+ * Same split as NFC's settings dialog: Core's `PrizmaModalContent` is the card
36
+ * (width 100% up to its own Modal/Size/Max-width), this only centres it with
37
+ * the Spacing/12 gutter. */
38
+ .permissions-dialog-panel {
39
+ position: absolute;
40
+ inset: 0;
41
+ z-index: 2;
42
+ display: flex;
43
+ align-items: center;
44
+ justify-content: center;
45
+ padding-inline: var(--prizma-spacing-12);
46
+ box-sizing: border-box;
47
+ }