@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.
- 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/CurpEnterScreen.d.ts +7 -0
- package/dist/CurpEnterScreen.js +17 -3
- package/dist/CurpGenerateScreen.d.ts +8 -0
- package/dist/CurpGenerateScreen.js +28 -13
- package/dist/CurpLayout.css +8 -34
- package/dist/CurpStrings.d.ts +16 -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/EkybAddressDetailsScreen.d.ts +7 -0
- package/dist/EkybAddressDetailsScreen.js +25 -7
- package/dist/EkybBusinessDetailsScreen.d.ts +6 -0
- package/dist/EkybBusinessDetailsScreen.js +23 -6
- package/dist/EkybCountryScreen.d.ts +13 -5
- package/dist/EkybCountryScreen.js +41 -10
- package/dist/EkybOwnersScreen.d.ts +8 -0
- package/dist/EkybOwnersScreen.js +26 -3
- package/dist/EkybStrings.d.ts +32 -10
- package/dist/EkycCountryCatalog.d.ts +4 -1
- package/dist/EkycCountryCatalog.js +5 -3
- package/dist/EkycCountryFormScreen.d.ts +12 -3
- package/dist/EkycCountryFormScreen.js +28 -10
- package/dist/EkycDetailsScreen.d.ts +7 -0
- package/dist/EkycDetailsScreen.js +21 -4
- package/dist/EkycStrings.d.ts +14 -2
- package/dist/ElectronicSignatureLayout.css +6 -0
- package/dist/EmailInputStrings.d.ts +11 -1
- package/dist/EmailInputVerifyScreen.d.ts +7 -0
- package/dist/EmailInputVerifyScreen.js +17 -3
- 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/FaceMatchComparisonScreen.d.ts +3 -3
- package/dist/FaceMatchLayout.css +21 -12
- package/dist/FormScreen.css +30 -0
- package/dist/FormScreen.d.ts +28 -0
- package/dist/FormScreen.js +3 -2
- package/dist/FormsLongFormScreen.d.ts +8 -0
- package/dist/FormsLongFormScreen.js +34 -13
- package/dist/FormsStrings.d.ts +11 -1
- package/dist/GeolocationBrowserStepsScreen.d.ts +6 -2
- package/dist/GeolocationBrowserStepsScreen.js +7 -3
- package/dist/GeolocationStrings.d.ts +3 -0
- package/dist/IdCaptureLayout.css +205 -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 +21 -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/PhoneInputLayout.css +10 -9
- package/dist/PhoneInputOtpScreen.d.ts +8 -0
- package/dist/PhoneInputOtpScreen.js +26 -19
- package/dist/PhoneInputStrings.d.ts +22 -4
- package/dist/PhoneInputVerifyScreen.d.ts +8 -0
- package/dist/PhoneInputVerifyScreen.js +36 -7
- package/dist/QualifiedSignatureAcceptScreen.js +6 -1
- package/dist/QualifiedSignatureDocumentScreen.d.ts +17 -10
- package/dist/QualifiedSignatureDocumentScreen.js +22 -17
- package/dist/QualifiedSignatureLayout.css +76 -0
- package/dist/QualifiedSignatureResultScreen.d.ts +16 -13
- package/dist/QualifiedSignatureResultScreen.js +17 -18
- package/dist/QualifiedSignatureStrings.d.ts +19 -2
- 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/ScreenNav.css +8 -0
- package/dist/ScreenNav.d.ts +15 -2
- package/dist/ScreenNav.js +10 -3
- package/dist/VideoSelfieErrorScreen.js +1 -1
- package/dist/VideoSelfieIdCaptureScreen.d.ts +10 -3
- package/dist/VideoSelfieIdCaptureScreen.js +45 -14
- package/dist/VideoSelfieLayout.css +467 -34
- package/dist/VideoSelfieSelfieCaptureScreen.d.ts +44 -27
- package/dist/VideoSelfieSelfieCaptureScreen.js +65 -39
- package/dist/VideoSelfieSpeakScreen.js +19 -2
- package/dist/VideoSelfieStrings.d.ts +82 -13
- package/dist/VideoSelfieTurnHeadScreen.d.ts +51 -0
- package/dist/VideoSelfieTurnHeadScreen.js +66 -0
- package/dist/VideoSelfieTutorialScreen.d.ts +9 -0
- package/dist/VideoSelfieTutorialScreen.js +22 -5
- package/dist/VideoSelfieWaveScreen.d.ts +53 -0
- package/dist/VideoSelfieWaveScreen.js +62 -0
- package/dist/ViewfinderScreen.css +36 -0
- package/dist/WatchlistBusinessFormScreen.d.ts +11 -7
- package/dist/WatchlistBusinessFormScreen.js +27 -13
- package/dist/WatchlistBusinessStrings.d.ts +21 -7
- package/dist/flows.d.ts +8 -0
- package/dist/flows.js +17 -0
- package/dist/index.d.ts +19 -1
- package/dist/index.js +14 -0
- package/dist/styles.css +3 -0
- package/dist/types.d.ts +3 -1
- package/package.json +79 -3
- package/samples/video-selfie-camera-wide.jpg +0 -0
- package/samples/video-selfie-room-wide.jpg +0 -0
- package/samples/video-selfie-room.png +0 -0
- package/src/BiometricConsentScreen.tsx +192 -0
- package/src/BiometricConsentStrings.ts +119 -0
- package/src/CaptureScreen.tsx +17 -0
- package/src/CurpEnterScreen.tsx +21 -4
- package/src/CurpGenerateScreen.tsx +46 -22
- package/src/CurpLayout.css +8 -34
- package/src/CurpStrings.ts +22 -2
- 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/EkybAddressDetailsScreen.tsx +32 -4
- package/src/EkybBusinessDetailsScreen.tsx +23 -5
- package/src/EkybCountryScreen.tsx +45 -7
- package/src/EkybOwnersScreen.tsx +34 -3
- package/src/EkybStrings.ts +34 -10
- package/src/EkycCountryCatalog.ts +9 -4
- package/src/EkycCountryFormScreen.tsx +51 -12
- package/src/EkycDetailsScreen.tsx +22 -1
- package/src/EkycStrings.ts +14 -2
- package/src/ElectronicSignatureLayout.css +6 -0
- package/src/EmailInputStrings.ts +12 -1
- package/src/EmailInputVerifyScreen.tsx +21 -4
- 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/FaceMatchComparisonScreen.tsx +3 -3
- package/src/FaceMatchLayout.css +21 -12
- package/src/FormScreen.css +30 -0
- package/src/FormScreen.tsx +34 -0
- package/src/FormsLongFormScreen.tsx +41 -13
- package/src/FormsStrings.ts +12 -1
- package/src/GeolocationBrowserStepsScreen.tsx +6 -3
- package/src/GeolocationStrings.ts +3 -0
- package/src/IdCaptureLayout.css +205 -2
- package/src/IdCaptureStageScreen.tsx +75 -0
- package/src/IdCaptureStrings.ts +19 -0
- package/src/ListScreen.tsx +58 -10
- 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/PhoneInputLayout.css +10 -9
- package/src/PhoneInputOtpScreen.tsx +23 -3
- package/src/PhoneInputStrings.ts +23 -4
- package/src/PhoneInputVerifyScreen.tsx +41 -5
- package/src/QualifiedSignatureAcceptScreen.tsx +12 -1
- package/src/QualifiedSignatureDocumentScreen.tsx +31 -19
- package/src/QualifiedSignatureLayout.css +76 -0
- package/src/QualifiedSignatureResultScreen.tsx +28 -26
- package/src/QualifiedSignatureStrings.ts +19 -2
- 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/ScreenNav.css +8 -0
- package/src/ScreenNav.tsx +35 -5
- package/src/VideoSelfieErrorScreen.tsx +1 -1
- package/src/VideoSelfieIdCaptureScreen.tsx +125 -31
- package/src/VideoSelfieLayout.css +467 -34
- package/src/VideoSelfieSelfieCaptureScreen.tsx +110 -57
- package/src/VideoSelfieSpeakScreen.tsx +34 -15
- package/src/VideoSelfieStrings.ts +89 -14
- package/src/VideoSelfieTurnHeadScreen.tsx +162 -0
- package/src/VideoSelfieTutorialScreen.tsx +45 -23
- package/src/VideoSelfieWaveScreen.tsx +143 -0
- package/src/ViewfinderScreen.css +36 -0
- package/src/WatchlistBusinessFormScreen.tsx +35 -16
- package/src/WatchlistBusinessStrings.ts +21 -7
- package/src/flows.ts +25 -0
- package/src/index.ts +88 -3
- package/src/styles.css +3 -0
- package/src/types.ts +3 -1
|
@@ -33,7 +33,9 @@ const PRESET_ROWS = {
|
|
|
33
33
|
{ key: 'idNumber', kind: 'text', requirement: 'required' },
|
|
34
34
|
{ key: 'email', kind: 'email', requirement: 'required' },
|
|
35
35
|
{ key: 'residence', kind: 'country', requirement: 'required' },
|
|
36
|
-
|
|
36
|
+
// Date of birth carries NO asterisk (owner Elena, 2026-09-30), so the
|
|
37
|
+
// `emptyError` state flags the other three rows and leaves it at rest.
|
|
38
|
+
{ key: 'dob', kind: 'date', requirement: 'none' },
|
|
37
39
|
],
|
|
38
40
|
};
|
|
39
41
|
/**
|
|
@@ -85,10 +87,19 @@ const OPTIONAL_VARIANT = {
|
|
|
85
87
|
* into the CTA band — the half a module stylesheet kept losing. It is a no-op
|
|
86
88
|
* on the short `name` preset, whose rows never overflow. DEVIATIONS #DSC-2,
|
|
87
89
|
* restating #CURP-1.
|
|
90
|
+
*
|
|
91
|
+
* `emptyError` is the GUIDELINES §6-E empty-submit rule (Elena 2026-09-30):
|
|
92
|
+
* the user pressed the CTA with the form still empty. Every REQUIRED row
|
|
93
|
+
* renders empty, with no placeholder, in Core's own error state carrying
|
|
94
|
+
* `strings.requiredError`; optional and unmarked rows stay on their resting
|
|
95
|
+
* surface with no error. The CTA greys there and ONLY there: the resting
|
|
96
|
+
* `default` keeps it enabled, so the user can press it to reach the error —
|
|
97
|
+
* the `FormsFieldScreen` `emptyError` precedent applied to a stack.
|
|
88
98
|
*/
|
|
89
99
|
export const FormsLongFormScreen = forwardRef(({ strings, preset = 'eKyc', state = 'default', values, focusedField, options, countries, screenId = `forms-long-form-${preset}-${state}`, className, overrides, onAction, ...shell }, ref) => {
|
|
90
100
|
const copy = strings.longForm[preset];
|
|
91
101
|
const busy = state === 'loading';
|
|
102
|
+
const emptyError = state === 'emptyError';
|
|
92
103
|
const countryList = countries ?? [];
|
|
93
104
|
// The Optional / Required pair documents the eKYC form specifically; no
|
|
94
105
|
// other preset draws it, so the override never leaks to a preset whose
|
|
@@ -106,20 +117,30 @@ export const FormsLongFormScreen = forwardRef(({ strings, preset = 'eKyc', state
|
|
|
106
117
|
const fieldCopy = copy.fields[row.key];
|
|
107
118
|
const label = labelFor(row);
|
|
108
119
|
const required = row.requirement === 'required';
|
|
109
|
-
|
|
110
|
-
|
|
120
|
+
// `emptyError` is an EMPTY submit: every row renders empty, whatever
|
|
121
|
+
// values the host passed.
|
|
122
|
+
const value = emptyError ? '' : (values?.[row.key] ?? '');
|
|
123
|
+
const focused = !busy && !emptyError && focusedField === row.key;
|
|
124
|
+
// Only REQUIRED rows flag the empty submit. Their placeholder goes, as
|
|
125
|
+
// on the drawn `forms.IDnumber.error`; optional rows stay at rest.
|
|
126
|
+
const invalid = emptyError && required;
|
|
127
|
+
const errorText = invalid ? strings.requiredError : undefined;
|
|
128
|
+
const placeholder = invalid ? undefined : fieldCopy?.placeholder;
|
|
111
129
|
switch (row.kind) {
|
|
112
130
|
case 'country':
|
|
113
|
-
return (_jsx(PrizmaDropdown, { label: label, required: required, requiredHint: strings.requiredHint, placeholder:
|
|
131
|
+
return (_jsx(PrizmaDropdown, { label: label, required: required, requiredHint: strings.requiredHint, placeholder: placeholder, options: countryList.map((c) => ({ value: c.code, label: c.name })), value: value || null, searchable: true, searchPlaceholder: copy.searchPlaceholder, disabled: busy, error: invalid, errorText: errorText, forceState: focused ? 'focused' : undefined, renderLeading: (option) => {
|
|
114
132
|
const match = countryList.find((c) => c.code === option.value);
|
|
115
133
|
return match ? _jsx(PrizmaCountryFlag, { country: match }) : null;
|
|
116
134
|
} }, row.key));
|
|
117
135
|
case 'select':
|
|
118
|
-
return (_jsx(PrizmaDropdown, { label: label, required: required, requiredHint: strings.requiredHint, placeholder:
|
|
136
|
+
return (_jsx(PrizmaDropdown, { label: label, required: required, requiredHint: strings.requiredHint, placeholder: placeholder, options: options?.[row.key] ?? [], value: value || null, disabled: busy, error: invalid, errorText: errorText, forceState: focused ? 'focused' : undefined }, row.key));
|
|
119
137
|
case 'date':
|
|
120
|
-
return (_jsx(PrizmaDateField, { className: focused ? 'prizma-input-datefield--focused' : undefined, label: label, required: required, requiredHint: strings.requiredHint,
|
|
138
|
+
return (_jsx(PrizmaDateField, { className: focused ? 'prizma-input-datefield--focused' : undefined, label: label, required: required, requiredHint: strings.requiredHint,
|
|
139
|
+
/* Core falls back to its DD/MM/YYYY mask on an undefined
|
|
140
|
+
placeholder, so the error row passes an explicit empty one. */
|
|
141
|
+
placeholder: invalid ? '' : fieldCopy?.placeholder, defaultValue: value, disabled: busy, error: invalid, errorText: errorText, calendarLabel: copy.calendarLabel }, row.key));
|
|
121
142
|
default:
|
|
122
|
-
return (_jsx(PrizmaTextField, { className: focused ? 'prizma-input-textfield--focused' : undefined, label: label, required: required, requiredHint: strings.requiredHint, placeholder:
|
|
143
|
+
return (_jsx(PrizmaTextField, { className: focused ? 'prizma-input-textfield--focused' : undefined, label: label, required: required, requiredHint: strings.requiredHint, placeholder: placeholder, defaultValue: value, type: row.kind === 'email' ? 'email' : 'text', inputMode: row.kind === 'email' ? 'email' : undefined, autoComplete: row.kind === 'email' ? 'email' : 'off', autoCapitalize: row.kind === 'email' ? 'none' : undefined, spellCheck: false, disabled: busy, error: invalid, errorText: errorText,
|
|
123
144
|
/* Figma draws the clear ✕ only on the focused row of
|
|
124
145
|
`longform.focused`; every other row draws none. */
|
|
125
146
|
clearable: focused, clearLabel: copy.clearLabel }, row.key));
|
|
@@ -134,12 +155,12 @@ export const FormsLongFormScreen = forwardRef(({ strings, preset = 'eKyc', state
|
|
|
134
155
|
]
|
|
135
156
|
.filter(Boolean)
|
|
136
157
|
.join(' '), title: copy.title, subtitle: copy.subtitle, ctaLabel: copy.ctaLabel,
|
|
137
|
-
/*
|
|
138
|
-
the
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
ctaDisabled:
|
|
158
|
+
/* GUIDELINES §6-E empty-submit rule (Elena 2026-09-30): the CTA stays
|
|
159
|
+
ENABLED on the resting empty form, every preset alike, so the user
|
|
160
|
+
can press it; it greys only on `emptyError`, the state that press
|
|
161
|
+
leads to. This supersedes the per-section greying #FDE-3 followed
|
|
162
|
+
on `longform.default` and `longform.customizable`. */
|
|
163
|
+
ctaDisabled: emptyError, ctaLoading: busy, ctaLoadingLabel: copy.ctaLoadingLabel,
|
|
143
164
|
/* The four- and five-row stacks are taller than the 844 frame; the
|
|
144
165
|
archetype's variant pans them and keeps Spacing/16 of clear surface
|
|
145
166
|
above the CTA. No module CSS re-declares this. */
|
package/dist/FormsStrings.d.ts
CHANGED
|
@@ -80,8 +80,12 @@ export type FormsLongFormPreset = 'name' | 'profile' | 'eKyc';
|
|
|
80
80
|
* - `loading` — `longform.loading`: the whole form greyed, spinner in the CTA
|
|
81
81
|
* - `optional` — the "Optional / Required" documentation pair: the same form
|
|
82
82
|
* with mixed required and optional markers
|
|
83
|
+
* - `emptyError` — the user pressed the CTA with the form still empty: every
|
|
84
|
+
* REQUIRED row renders empty in Core's error state with
|
|
85
|
+
* `requiredError`, optional and unmarked rows stay clean, CTA
|
|
86
|
+
* greyed (GUIDELINES §6-E empty-submit rule, Elena 2026-09-30)
|
|
83
87
|
*/
|
|
84
|
-
export type FormsLongFormState = 'default' | 'focused' | 'filled' | 'loading' | 'optional';
|
|
88
|
+
export type FormsLongFormState = 'default' | 'focused' | 'filled' | 'loading' | 'optional' | 'emptyError';
|
|
85
89
|
/** Copy for one single-field section. */
|
|
86
90
|
export interface FormsFieldCopy {
|
|
87
91
|
/** H2 ("Enter your title", "Enter your email", "Enter your phone number"). */
|
|
@@ -161,6 +165,12 @@ export interface FormsStrings {
|
|
|
161
165
|
* the label string by the screen. See DEVIATIONS #FDE-4.
|
|
162
166
|
*/
|
|
163
167
|
optionalHint: string;
|
|
168
|
+
/**
|
|
169
|
+
* The error row every REQUIRED field shows on the `emptyError` long-form
|
|
170
|
+
* state ("This field is required"). Maps to the SDK's
|
|
171
|
+
* `dynamicForms.fieldRequired` key. GUIDELINES §6-E empty-submit rule.
|
|
172
|
+
*/
|
|
173
|
+
requiredError: string;
|
|
164
174
|
/** The single-field sections. */
|
|
165
175
|
fields: Record<FormsFieldKey, FormsFieldCopy>;
|
|
166
176
|
/** The choice sections. */
|
|
@@ -31,9 +31,13 @@ export interface GeolocationBrowserStepsScreenProps extends Omit<PrizmaListScree
|
|
|
31
31
|
* The rows are Core's `PrizmaCardListCommonIssues` verbatim; only the leading
|
|
32
32
|
* glyph is chosen here, from the canonical bank (see `STEP_ICONS`).
|
|
33
33
|
*
|
|
34
|
+
* No subtitle: the browser name (`label`) is NOT drawn under the title (owner
|
|
35
|
+
* call, Elena 2026-09-30). The label stays in the strings as the section's
|
|
36
|
+
* identifier for hosts and catalogs; the screen itself shows title + steps.
|
|
37
|
+
*
|
|
34
38
|
* The title block is LEFT-aligned for this whole family. Every
|
|
35
|
-
* `Geolocation.allowLocation.<browser>` section starts the two-line headline
|
|
36
|
-
*
|
|
39
|
+
* `Geolocation.allowLocation.<browser>` section starts the two-line headline
|
|
40
|
+
* flush at the gutter, over left-led step
|
|
37
41
|
* rows; a centred headline above a left-aligned list reads as a mistake. The
|
|
38
42
|
* screen therefore DEFAULTS the archetype's own `align` override to `left`
|
|
39
43
|
* rather than declaring any alignment of its own, and a host that passes
|
|
@@ -55,9 +55,13 @@ const STEP_ICONS = {
|
|
|
55
55
|
* The rows are Core's `PrizmaCardListCommonIssues` verbatim; only the leading
|
|
56
56
|
* glyph is chosen here, from the canonical bank (see `STEP_ICONS`).
|
|
57
57
|
*
|
|
58
|
+
* No subtitle: the browser name (`label`) is NOT drawn under the title (owner
|
|
59
|
+
* call, Elena 2026-09-30). The label stays in the strings as the section's
|
|
60
|
+
* identifier for hosts and catalogs; the screen itself shows title + steps.
|
|
61
|
+
*
|
|
58
62
|
* The title block is LEFT-aligned for this whole family. Every
|
|
59
|
-
* `Geolocation.allowLocation.<browser>` section starts the two-line headline
|
|
60
|
-
*
|
|
63
|
+
* `Geolocation.allowLocation.<browser>` section starts the two-line headline
|
|
64
|
+
* flush at the gutter, over left-led step
|
|
61
65
|
* rows; a centred headline above a left-aligned list reads as a mistake. The
|
|
62
66
|
* screen therefore DEFAULTS the archetype's own `align` override to `left`
|
|
63
67
|
* rather than declaring any alignment of its own, and a host that passes
|
|
@@ -85,7 +89,7 @@ export const GeolocationBrowserStepsScreen = forwardRef(({ strings, browser = 's
|
|
|
85
89
|
...overrides,
|
|
86
90
|
align: overrides?.align ?? 'left',
|
|
87
91
|
};
|
|
88
|
-
return (_jsx(PrizmaListScreen, { ref: ref, title: strings.browserSteps.title,
|
|
92
|
+
return (_jsx(PrizmaListScreen, { ref: ref, title: strings.browserSteps.title, ctaLabel: strings.browserSteps.ctaLabel, secondaryCtaLabel: showSkip ? strings.browserSteps.skipLabel : undefined, verifiedLabel: strings.verifiedLabel, navLabel: strings.navLabel, screenId: screenId, overrides: alignedOverrides, onAction: onAction, ...shell, children: _jsx(PrizmaCardListCommonIssues, { items: (slice?.steps ?? []).map((step) => ({
|
|
89
93
|
icon: STEP_ICONS[step.kind],
|
|
90
94
|
title: step.label,
|
|
91
95
|
showSubtitle: false,
|
|
@@ -76,6 +76,9 @@ export interface GeolocationBrowserSteps {
|
|
|
76
76
|
* rows and would render as one screen three times. Every browser therefore
|
|
77
77
|
* SHOULD carry a label, extending the precedent Figma itself sets on Safari.
|
|
78
78
|
* Still optional so a host that ships its own logo artwork can drop it.
|
|
79
|
+
*
|
|
80
|
+
* 2026-09-30 (Elena): the screen no longer RENDERS it as a subtitle. It is
|
|
81
|
+
* kept as the section's name for catalogs and hosts, not as on-screen copy.
|
|
79
82
|
*/
|
|
80
83
|
label?: string;
|
|
81
84
|
/** The steps, in order. */
|
package/dist/IdCaptureLayout.css
CHANGED
|
@@ -59,12 +59,129 @@
|
|
|
59
59
|
gap: var(--prizma-spacing-8); /* Title → instruction, GUIDELINES §5 */
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
/* ── Short screens: the vertical frame gives up height, never the title ──────
|
|
63
|
+
* The vertical ID (288:456) and passport (306:420) frames are tall. On a
|
|
64
|
+
* 320 × 693 phone the column is 272 wide, so the frame alone is ~431 tall and
|
|
65
|
+
* the stage ran 168px past the bottom, under the shutter strip (Camila,
|
|
66
|
+
* 2026-09-28). Here the frame is the ONE part of the column that shrinks: it
|
|
67
|
+
* starts at its full-width height (the column less its two Spacing/24
|
|
68
|
+
* gutters, over the aspect), and when the screen is too short the flex column
|
|
69
|
+
* takes the shortfall out of its height; the aspect ratio then narrows its
|
|
70
|
+
* width to match, so it stays an ID-shaped frame, centred. The title band
|
|
71
|
+
* keeps its content height. With room to spare (390 × 844) the frame never
|
|
72
|
+
* needs to shrink, so it sits exactly where it did.
|
|
73
|
+
*
|
|
74
|
+
* Scoped to ID + passport with `:not(--poa)`: Document Capture renders the
|
|
75
|
+
* same stage as `type="poa" isVertical`, so it carries `--vertical` too, but
|
|
76
|
+
* the PoA frame has NO aspect ratio (it fills the host's height). `width:
|
|
77
|
+
* auto` there collapsed it to a 0-wide sliver, a grey vertical bar down the
|
|
78
|
+
* camera screen (Elena, 2026-09-30). Only showed where this file and Document
|
|
79
|
+
* Capture's CSS ship in the same bundle, i.e. the production build. */
|
|
80
|
+
.prizma-viewfinder__content:has(> .prizma-id-capture--vertical:not(.prizma-id-capture--poa)) {
|
|
81
|
+
min-height: 0;
|
|
82
|
+
}
|
|
83
|
+
.prizma-viewfinder__content:has(> .prizma-id-capture--vertical:not(.prizma-id-capture--poa)) > .id-capture-band--top {
|
|
84
|
+
flex-shrink: 0;
|
|
85
|
+
min-height: min-content;
|
|
86
|
+
}
|
|
87
|
+
.prizma-viewfinder__content > .prizma-id-capture--vertical:not(.prizma-id-capture--poa) {
|
|
88
|
+
flex: 0 1 auto;
|
|
89
|
+
min-height: 0;
|
|
90
|
+
}
|
|
91
|
+
.prizma-viewfinder__content > .prizma-id-capture--vertical:not(.prizma-id-capture--poa) .prizma-id-capture__frame {
|
|
92
|
+
flex: 0 1 auto;
|
|
93
|
+
min-height: 0;
|
|
94
|
+
width: auto;
|
|
95
|
+
max-width: 100%;
|
|
96
|
+
flex-basis: calc((100cqw - 2 * var(--prizma-spacing-24)) * 456 / 288);
|
|
97
|
+
}
|
|
98
|
+
.prizma-viewfinder__content > .prizma-id-capture--passport.prizma-id-capture--vertical .prizma-id-capture__frame {
|
|
99
|
+
flex-basis: calc((100cqw - 2 * var(--prizma-spacing-24)) * 420 / 306);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* ── A notice on the stage: the horizontal frame may give up height too ──────
|
|
103
|
+
* The "Need more time?" offer (`.id-capture-stage__notice`, IDC-32) adds ~90px
|
|
104
|
+
* of content to the bottom band. On the 390 × 844 reference the band has the
|
|
105
|
+
* room and nothing moves. On a short panel it does not: measured 2026-10-15,
|
|
106
|
+
* the horizontal ID frame is aspect-locked and does not shrink, so the column
|
|
107
|
+
* overflowed and the notice ran 10px into the help strip at 320 × 693 and 36px
|
|
108
|
+
* at the closed iPhone Duo (466 × 678). The same recipe as the vertical rule
|
|
109
|
+
* above, applied to the horizontal frames ONLY while a notice is on the stage:
|
|
110
|
+
* the frame starts at its full-width height and gives up height when the
|
|
111
|
+
* column is short, the aspect ratio narrows it to match, the title band keeps
|
|
112
|
+
* its content height. Face Capture makes the identical trade at 320 (its
|
|
113
|
+
* selfie frame gives up Spacing/40 for the notice, ScreenLayout.css) and the
|
|
114
|
+
* owner's rule is explicit that the frame may get smaller (2026-08-18). A
|
|
115
|
+
* stage without a notice is untouched. */
|
|
116
|
+
.prizma-viewfinder__content:has(> .id-capture-band > .id-capture-stage__notice) {
|
|
117
|
+
min-height: 0;
|
|
118
|
+
}
|
|
119
|
+
.prizma-viewfinder__content:has(> .id-capture-band > .id-capture-stage__notice) > .id-capture-band--top {
|
|
120
|
+
flex-shrink: 0;
|
|
121
|
+
min-height: min-content;
|
|
122
|
+
}
|
|
123
|
+
.prizma-viewfinder__content:has(> .id-capture-band > .id-capture-stage__notice) > .prizma-id-capture--horizontal:not(.prizma-id-capture--poa) {
|
|
124
|
+
flex: 0 1 auto;
|
|
125
|
+
min-height: 0;
|
|
126
|
+
}
|
|
127
|
+
.prizma-viewfinder__content:has(> .id-capture-band > .id-capture-stage__notice) > .prizma-id-capture--horizontal:not(.prizma-id-capture--poa) .prizma-id-capture__frame {
|
|
128
|
+
flex: 0 1 auto;
|
|
129
|
+
min-height: 0;
|
|
130
|
+
width: auto;
|
|
131
|
+
max-width: 100%;
|
|
132
|
+
flex-basis: calc((100cqw - 2 * var(--prizma-spacing-24)) * 220 / 350);
|
|
133
|
+
}
|
|
134
|
+
.prizma-viewfinder__content:has(> .id-capture-band > .id-capture-stage__notice) > .prizma-id-capture--passport.prizma-id-capture--horizontal .prizma-id-capture__frame {
|
|
135
|
+
flex-basis: calc((100cqw - 2 * var(--prizma-spacing-24)) * 254 / 350);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* ── Short panels: the tutorial art is sized by its halo, not its canvas ─────
|
|
139
|
+
* `PrizmaIllustrationIdTutorial` is a 342 × 392 canvas with the halo centred
|
|
140
|
+
* at r130 (y 66–326) and the hand-and-document artwork inside it (y 100–313;
|
|
141
|
+
* the passport's hand fades out above). The 66 above and below the halo are
|
|
142
|
+
* air at rest; the bottom band is where the hand travels in from during the
|
|
143
|
+
* loop. The selfie illustration is a 296 canvas with the same r130 halo and 18
|
|
144
|
+
* of air: on the 844 reference both halos are 260 and the two tutorials match.
|
|
145
|
+
*
|
|
146
|
+
* On a short panel the tutorial middle is height-limited (ScreenLayout.css,
|
|
147
|
+
* #F-35) and the two canvases scale by height, so the ID halo comes out 18 %
|
|
148
|
+
* smaller than the selfie's (170 vs 209 on the closed iPhone Duo, measured
|
|
149
|
+
* 2026-10-14; Camila: "ID tutorials have illustration a bit too small, no?
|
|
150
|
+
* Compared to the size on the selfie tutorial one"). Fixed by cropping the
|
|
151
|
+
* canvas to the halo band plus Spacing/16 on each side — y 50 to 342, 292
|
|
152
|
+
* units, the same 89 % the selfie's halo takes of its own box — so the halo
|
|
153
|
+
* fills the slot the way the selfie's does. The wrapper takes the slot and
|
|
154
|
+
* clips; the svg is scaled so 292 of its 392 units fill the wrapper and
|
|
155
|
+
* centres, so the crop is symmetric around the halo and the halo's centre
|
|
156
|
+
* does not move. During the loop the entering hand is clipped 50 units
|
|
157
|
+
* earlier than the canvas clips it, which is invisible against the fade.
|
|
158
|
+
* Outside the query nothing exists: the reference renders the full canvas.
|
|
159
|
+
* DEVIATIONS #IDC-31. */
|
|
160
|
+
@container pcs-screen (max-height: 720px) {
|
|
161
|
+
.prizma-screen-layout__flex > .prizma-illustration-tutorial {
|
|
162
|
+
flex: 1 1 0;
|
|
163
|
+
min-height: 0;
|
|
164
|
+
align-self: stretch;
|
|
165
|
+
display: flex;
|
|
166
|
+
align-items: center;
|
|
167
|
+
justify-content: center;
|
|
168
|
+
overflow: hidden;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.prizma-screen-layout__flex > .prizma-illustration-tutorial > svg {
|
|
172
|
+
flex: none;
|
|
173
|
+
height: calc(100% * 392 / 292);
|
|
174
|
+
width: auto;
|
|
175
|
+
max-width: none;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
62
179
|
/* ── Camera stage (dark) ───────────────────────────────────────────────────── */
|
|
63
180
|
|
|
64
181
|
/* The stage's nav row carries only the close X (no logo — the camera owns the
|
|
65
182
|
* screen). The foundation `.prizma-screen-nav` supplies the status-bar reserve,
|
|
66
183
|
* the 44px flow slot and the un-fixing of Core's PrizmaNavigation; the ink is
|
|
67
|
-
* the only thing the camera stage changes: Core's nav icon is the
|
|
184
|
+
* the only thing the camera stage changes: Core's nav icon is the themed
|
|
68
185
|
* `Icon/Neutral/500`, which disappears on the always-dark camera surface, so it
|
|
69
186
|
* takes the camera's own Static ink — the same token PrizmaCaptureManual uses
|
|
70
187
|
* for the shutter and the "?" help control. DEVIATIONS.md #IDC-21. */
|
|
@@ -78,6 +195,44 @@
|
|
|
78
195
|
width: 100%;
|
|
79
196
|
}
|
|
80
197
|
|
|
198
|
+
/* ── The "Need more time?" notice ─────────────────────────────────────────────
|
|
199
|
+
* The Snackbar the stage raises 20 s before auto-capture falls back to the
|
|
200
|
+
* shutter (IdCaptureStageScreen `extendTime`, 2026-10-15). It takes the BOTTOM
|
|
201
|
+
* band — the air between the encrypted row and the strip's reserved space —
|
|
202
|
+
* because, unlike Face Capture, this stage's strip is never empty: the "?" help
|
|
203
|
+
* control rides it on every stage (IDC-29), so the shared rail the selfie notice
|
|
204
|
+
* uses (`.prizma-screen-layout__capture-notice`) would land on top of it.
|
|
205
|
+
*
|
|
206
|
+
* The band is `justify-content: flex-end`, so the notice sits just above the
|
|
207
|
+
* strip's Spacing/12 of breathing and the frame above does not move when the
|
|
208
|
+
* offer arrives. The band is also `flex: 1; min-height: 0`, which on a short
|
|
209
|
+
* panel would let it shrink to nothing and spill the notice upward over the
|
|
210
|
+
* encrypted row; with a notice in it the band keeps its content height and the
|
|
211
|
+
* shortfall goes where this stylesheet already sends it — the vertical frame
|
|
212
|
+
* (the short-panel rule above), which the owner has said may get smaller
|
|
213
|
+
* (2026-08-18). DEVIATIONS #IDC-32. */
|
|
214
|
+
.id-capture-band:has(> .id-capture-stage__notice) {
|
|
215
|
+
flex-shrink: 0;
|
|
216
|
+
min-height: min-content;
|
|
217
|
+
padding-top: var(--prizma-spacing-16);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.id-capture-stage__notice {
|
|
221
|
+
display: flex;
|
|
222
|
+
/* The HUD column centres its copy; the Snackbar's own text is left-set. */
|
|
223
|
+
text-align: left;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/* On a 320 phone the notice drops its status glyph — the same call Face
|
|
227
|
+
* Capture made (Camila, 2026-10-05, ScreenLayout.css): 44 of the 272px column
|
|
228
|
+
* on a decorative mark pushed the body to four lines. The icon is
|
|
229
|
+
* `aria-hidden`; the copy carries the meaning without it. */
|
|
230
|
+
@container pcs-screen (max-width: 340px) {
|
|
231
|
+
.id-capture-stage__notice .prizma-snackbar__icon {
|
|
232
|
+
display: none;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
81
236
|
/* The feedback pill replaces the title block on the error stages (Figma
|
|
82
237
|
* `1-5-5 … 1-5-9-id-errors`): same band, same Spacing/40 above the frame. */
|
|
83
238
|
.id-capture-stage__feedback {
|
|
@@ -85,6 +240,54 @@
|
|
|
85
240
|
justify-content: center;
|
|
86
241
|
}
|
|
87
242
|
|
|
243
|
+
/* ── Short or narrow panels: the live cue takes Template B ───────────────────
|
|
244
|
+
* `PrizmaCaptureFeedback` ships two templates on its `showAnimation` axis:
|
|
245
|
+
* A, the 120-ish pill with the illustration and a Headline/H3 title, and B, a
|
|
246
|
+
* 72 pill with no illustration and Headline/H5. The error stages draw A on the
|
|
247
|
+
* 390 × 844 reference. On a closed iPhone Duo (678) A still fits — measured
|
|
248
|
+
* 2026-10-14, the frame lands at 198–473 with the pill above it — but it is
|
|
249
|
+
* the tallest element on a stage that has just lost 166px, and on a 640 phone
|
|
250
|
+
* or a 320 column it does not fit at all. Video Selfie already made this call
|
|
251
|
+
* for its own cues (DEVIATIONS #VS-30, Camila 2026-10-07): under 340 wide or
|
|
252
|
+
* 720 tall the pill is B. The same line here, so the two camera modules agree
|
|
253
|
+
* on when a cue goes compact. Nothing is re-skinned: fill, radius, stroke and
|
|
254
|
+
* shadow are Core's and identical between A and B (capture-feedback.md §4.4);
|
|
255
|
+
* what changes is exactly Template B's four switches, taken from
|
|
256
|
+
* `CaptureFeedback.css`'s own `--compact` modifier.
|
|
257
|
+
*
|
|
258
|
+
* A container query, not the prop: the screen cannot know the panel's height,
|
|
259
|
+
* the shell's `pcs-screen` container can. ONE `or` condition, not two
|
|
260
|
+
* comma-separated queries (lightningcss rejects the latter; see
|
|
261
|
+
* VideoSelfieLayout.css). The 390 reference is unchanged. DEVIATIONS #IDC-30. */
|
|
262
|
+
@container pcs-screen ((max-width: 340px) or (max-height: 720px)) {
|
|
263
|
+
.id-capture-stage__feedback .prizma-capture-feedback__illustration {
|
|
264
|
+
display: none;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/* Template B: body padding-bottom 12 → 16, itemSpacing 8 → 4. */
|
|
268
|
+
.id-capture-stage__feedback .prizma-capture-feedback__body {
|
|
269
|
+
padding: var(--prizma-spacing-16) 0;
|
|
270
|
+
gap: var(--prizma-spacing-4);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/* Title Headline/H3 → Headline/H5. */
|
|
274
|
+
.id-capture-stage__feedback .prizma-capture-feedback__title {
|
|
275
|
+
font-weight: var(--prizma-headline-h5-font-weight);
|
|
276
|
+
font-size: var(--prizma-headline-h5-font-size);
|
|
277
|
+
line-height: var(--prizma-headline-h5-line-height);
|
|
278
|
+
letter-spacing: var(--prizma-headline-h5-letter-spacing);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/* Subtitle Headline/H5 → Body/M Regular. */
|
|
282
|
+
.id-capture-stage__feedback .prizma-capture-feedback__subtitle {
|
|
283
|
+
font-family: var(--prizma-body-family);
|
|
284
|
+
font-weight: var(--prizma-body-m-regular-font-weight);
|
|
285
|
+
font-size: var(--prizma-body-m-regular-font-size);
|
|
286
|
+
line-height: var(--prizma-body-m-regular-line-height);
|
|
287
|
+
letter-spacing: var(--prizma-body-m-regular-letter-spacing);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
88
291
|
/* ── Removed: promoted into the foundation ───────────────────────────────────
|
|
89
292
|
* `.id-capture-glyph*` (the non-status glyph slot) is now
|
|
90
293
|
* `ScreenLayout.css`'s `__glyph` — DEVIATIONS #DC-29, closed.
|
|
@@ -102,7 +305,7 @@
|
|
|
102
305
|
*
|
|
103
306
|
* The plate needs no override — Core's own `mode="overlay"` already makes the
|
|
104
307
|
* window transparent, which is what the light screens want. The ink does: the
|
|
105
|
-
* row is re-inked with the
|
|
308
|
+
* row is re-inked with the themed body token so it also survives dark mode,
|
|
106
309
|
* scoped to the light screens only (the camera stage keeps Core's Static white).
|
|
107
310
|
* Core gap — PrizmaIdCapture has no surface-aware encrypted row. DEVIATIONS.md #IDC-28.
|
|
108
311
|
*/
|
|
@@ -32,6 +32,28 @@ export interface IdCaptureStageScreenProps extends Omit<PrizmaScreenShellProps,
|
|
|
32
32
|
still?: ReactNode;
|
|
33
33
|
/** Digit shown by the countdown Timer (`*-countdown` sections 1..3). */
|
|
34
34
|
countdownValue?: 1 | 2 | 3;
|
|
35
|
+
/**
|
|
36
|
+
* Raise the "Need more time?" offer over the feed — the accessibility
|
|
37
|
+
* notification shown 20 s before auto-capture falls back to the shutter.
|
|
38
|
+
*
|
|
39
|
+
* A MODIFIER of whatever stage state is already showing, not a twelfth
|
|
40
|
+
* state: the 30 s fallback timer runs underneath the hint overlay, so the
|
|
41
|
+
* person can be shown the hand-and-document ghost and offered more time in
|
|
42
|
+
* the same frame. Needs `strings.stage.extendTime`; without it the flag is a
|
|
43
|
+
* no-op, which is what a host that has not localized the copy should get
|
|
44
|
+
* rather than English. Same contract as `FaceCaptureCapturingScreen`.
|
|
45
|
+
*/
|
|
46
|
+
extendTime?: boolean;
|
|
47
|
+
/** Tapping "Extend auto-capture". The host resets its own fallback timer. */
|
|
48
|
+
onExtendTime?: () => void;
|
|
49
|
+
/**
|
|
50
|
+
* A notice band of the host's own, in the slot `extendTime` uses. Wins over
|
|
51
|
+
* `extendTime` when both are given. Exists for a host that needs the
|
|
52
|
+
* Snackbar to do something the static one cannot — Core Lab's prototype
|
|
53
|
+
* swaps in a copy whose count actually runs down — without reaching into
|
|
54
|
+
* the screen. The static `extendTime` notice stays the default.
|
|
55
|
+
*/
|
|
56
|
+
notice?: ReactNode;
|
|
35
57
|
screenId?: string;
|
|
36
58
|
overrides?: PrizmaScreenOverrides;
|
|
37
59
|
onAction?: PrizmaScreenActionHandler;
|
|
@@ -64,6 +86,31 @@ export interface IdCaptureStageScreenProps extends Omit<PrizmaScreenShellProps,
|
|
|
64
86
|
* to the column's bottom padding) — no offsets are invented here, and
|
|
65
87
|
* PrizmaIdCapture's own frame→encrypted-row adjacency is left untouched
|
|
66
88
|
* (DEVIATIONS.md #12's lesson: never stack an offset a Core component carries).
|
|
89
|
+
*
|
|
90
|
+
* ── The "Need more time?" offer (`extendTime`) ──────────────────────────────
|
|
91
|
+
*
|
|
92
|
+
* Auto-capture gives up after a configured timeout (30 s in the module's own
|
|
93
|
+
* flow frames) and drops the person onto the shutter. Someone who is
|
|
94
|
+
* struggling — a tremor, low vision, a dark room, a card that will not sit
|
|
95
|
+
* flat — gets moved off the EASIER path precisely because they were slow,
|
|
96
|
+
* which is backwards. So 20 s before the switch, the stage offers to stay on
|
|
97
|
+
* auto. A client turns it on per flow from the dashboard; with it off, nothing
|
|
98
|
+
* about today's capture changes. It is the conformance route for WCAG 2.2.1
|
|
99
|
+
* Timing Adjustable via the *Extend* clause (warn before the limit, ≥20 s to
|
|
100
|
+
* act, ≥10 extensions) — the reasoning, the `role="alert"` decision and the
|
|
101
|
+
* `neutral` state are all Face Capture's (2026-10-05) and are not re-argued
|
|
102
|
+
* here: `FaceCaptureCapturingScreen`'s header is the record. One feature, two
|
|
103
|
+
* modules, one Snackbar.
|
|
104
|
+
*
|
|
105
|
+
* WHERE IT SITS is the one thing this module decides differently. Face
|
|
106
|
+
* Capture anchors the notice on the shutter-strip rail because, there, notice
|
|
107
|
+
* and shutter are alternatives — a capturing screen either raises the offer or
|
|
108
|
+
* shows the button. ID Capture's strip is never free: the "?" help control
|
|
109
|
+
* rides it on every stage, auto or manual (IDC-29). So the notice takes the
|
|
110
|
+
* BOTTOM BAND instead — the flexible air between the encrypted row and the
|
|
111
|
+
* strip's reserved space — which is the one slot on this stage nothing else
|
|
112
|
+
* owns. It bottom-anchors there like the band's other content would, so the
|
|
113
|
+
* frame above does not move when the offer arrives. DEVIATIONS.md #IDC-32.
|
|
67
114
|
*/
|
|
68
115
|
export declare const IdCaptureStageScreen: React.ForwardRefExoticComponent<IdCaptureStageScreenProps & React.RefAttributes<HTMLDivElement>>;
|
|
69
116
|
export default IdCaptureStageScreen;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx,
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import { PrizmaNavigation } from '@incodetech/prizma-core-web/navigation';
|
|
5
5
|
import { PrizmaIdCapture, } from '@incodetech/prizma-core-web/id-capture';
|
|
6
6
|
import { PrizmaCaptureManual } from '@incodetech/prizma-core-web/capture-manual';
|
|
7
7
|
import { PrizmaCaptureFeedback } from '@incodetech/prizma-core-web/capture-feedback';
|
|
8
|
+
import { PrizmaSnackbar } from '@incodetech/prizma-core-web/snackbar';
|
|
8
9
|
import { PrizmaTag } from '@incodetech/prizma-core-web/tag';
|
|
9
10
|
import { PrizmaScreenShell } from './ScreenShell';
|
|
10
11
|
import './ScreenLayout.css';
|
|
@@ -68,8 +69,33 @@ const STAGE_FEEDBACK = {
|
|
|
68
69
|
* to the column's bottom padding) — no offsets are invented here, and
|
|
69
70
|
* PrizmaIdCapture's own frame→encrypted-row adjacency is left untouched
|
|
70
71
|
* (DEVIATIONS.md #12's lesson: never stack an offset a Core component carries).
|
|
72
|
+
*
|
|
73
|
+
* ── The "Need more time?" offer (`extendTime`) ──────────────────────────────
|
|
74
|
+
*
|
|
75
|
+
* Auto-capture gives up after a configured timeout (30 s in the module's own
|
|
76
|
+
* flow frames) and drops the person onto the shutter. Someone who is
|
|
77
|
+
* struggling — a tremor, low vision, a dark room, a card that will not sit
|
|
78
|
+
* flat — gets moved off the EASIER path precisely because they were slow,
|
|
79
|
+
* which is backwards. So 20 s before the switch, the stage offers to stay on
|
|
80
|
+
* auto. A client turns it on per flow from the dashboard; with it off, nothing
|
|
81
|
+
* about today's capture changes. It is the conformance route for WCAG 2.2.1
|
|
82
|
+
* Timing Adjustable via the *Extend* clause (warn before the limit, ≥20 s to
|
|
83
|
+
* act, ≥10 extensions) — the reasoning, the `role="alert"` decision and the
|
|
84
|
+
* `neutral` state are all Face Capture's (2026-10-05) and are not re-argued
|
|
85
|
+
* here: `FaceCaptureCapturingScreen`'s header is the record. One feature, two
|
|
86
|
+
* modules, one Snackbar.
|
|
87
|
+
*
|
|
88
|
+
* WHERE IT SITS is the one thing this module decides differently. Face
|
|
89
|
+
* Capture anchors the notice on the shutter-strip rail because, there, notice
|
|
90
|
+
* and shutter are alternatives — a capturing screen either raises the offer or
|
|
91
|
+
* shows the button. ID Capture's strip is never free: the "?" help control
|
|
92
|
+
* rides it on every stage, auto or manual (IDC-29). So the notice takes the
|
|
93
|
+
* BOTTOM BAND instead — the flexible air between the encrypted row and the
|
|
94
|
+
* strip's reserved space — which is the one slot on this stage nothing else
|
|
95
|
+
* owns. It bottom-anchors there like the band's other content would, so the
|
|
96
|
+
* frame above does not move when the offer arrives. DEVIATIONS.md #IDC-32.
|
|
71
97
|
*/
|
|
72
|
-
export const IdCaptureStageScreen = forwardRef(({ strings, documentType = 'id', side = 'front', vertical = false, state = 'empty', manual = false, showClose = state !== 'empty', feedback, camera, still, countdownValue = 3, screenId = `id-capture-${documentType}-${side}-${state}`, overrides, onAction, className, ...shell }, ref) => {
|
|
98
|
+
export const IdCaptureStageScreen = forwardRef(({ strings, documentType = 'id', side = 'front', vertical = false, state = 'empty', manual = false, showClose = state !== 'empty', feedback, camera, still, countdownValue = 3, extendTime, onExtendTime, notice, screenId = `id-capture-${documentType}-${side}-${state}`, overrides, onAction, className, ...shell }, ref) => {
|
|
73
99
|
const slice = documentType === 'passport'
|
|
74
100
|
? strings.stage.passport
|
|
75
101
|
: side === 'back'
|
|
@@ -77,12 +103,22 @@ export const IdCaptureStageScreen = forwardRef(({ strings, documentType = 'id',
|
|
|
77
103
|
: strings.stage.front;
|
|
78
104
|
const pillKind = feedback === undefined ? STAGE_FEEDBACK[state] : feedback;
|
|
79
105
|
const pillCopy = pillKind ? strings.feedback[pillKind] : undefined;
|
|
106
|
+
const offer = strings.stage.extendTime;
|
|
107
|
+
// No copy, no notice: a host that has not localized this must not get
|
|
108
|
+
// English, and the flag alone is not permission to invent it.
|
|
109
|
+
const band = notice ??
|
|
110
|
+
(extendTime && offer ? (_jsxs(PrizmaSnackbar, { state: "neutral", isMultiline: true,
|
|
111
|
+
// Assertive on purpose — a polite region can queue behind the
|
|
112
|
+
// stage's own state announcements and be read out after the 20 s
|
|
113
|
+
// has already run out. FaceCaptureCapturingScreen's header has the
|
|
114
|
+
// full reasoning; this instance follows it.
|
|
115
|
+
role: "alert", linkLabel: offer.linkLabel, onLinkClick: onExtendTime, children: [_jsx("strong", { children: offer.title }), _jsx("br", {}), offer.description] })) : undefined);
|
|
80
116
|
return (_jsxs(PrizmaScreenShell, { ref: ref, dark: true, className: className, ...shell, children: [_jsx("div", { className: "prizma-viewfinder__surface", children: camera }), _jsx("header", { className: "prizma-screen-nav id-capture-stage__nav", children: _jsx(PrizmaNavigation, { showIncodeLogo: false, showRightIcon: showClose, closeLabel: strings.closeLabel, "aria-label": strings.navLabel, onRightIconClick: () => onAction?.({ type: 'secondary', screenId }) }) }), _jsxs("div", { className: [
|
|
81
117
|
'prizma-viewfinder__content',
|
|
82
118
|
overrides?.align === 'left' ? 'prizma-viewfinder__content--left' : '',
|
|
83
119
|
]
|
|
84
120
|
.filter(Boolean)
|
|
85
|
-
.join(' '), children: [_jsx("div", { className: "id-capture-band id-capture-band--top", children: pillKind && pillCopy ? (_jsx("div", { className: "id-capture-stage__feedback", children: _jsx(PrizmaCaptureFeedback, { feedback: pillKind, title: pillCopy.title, subtitle: pillCopy.subtitle }) })) : (_jsxs(_Fragment, { children: [_jsx("h2", { className: "prizma-viewfinder__title", children: slice.title }), slice.instruction && !manual ? (_jsx("p", { className: "prizma-viewfinder__instruction", children: slice.instruction })) : null] })) }), _jsx(PrizmaIdCapture, { type: documentType, state: CAPTURE_STATE[state], isVertical: vertical, mode: "overlay", scrim: true, countdownValue: countdownValue, encryptedLabel: strings.encryptedLabel, announcement: strings.stage.stateLabels?.[state], still: still }), _jsx("div", { className: "id-capture-band" })] }), _jsx("div", { className: "prizma-screen-layout__capture-strip", children: _jsx(PrizmaCaptureManual, { className: "id-capture-stage__manual", variant: "id-capture", showButton: manual, showTooltip: manual, showHelpIcon: true, tooltipText: manual ? strings.stage.manualTooltip : undefined, ariaLabel: strings.stage.captureLabel, helpLabel: strings.stage.helpLabel, onCapture: () => onAction?.({ type: 'cta', screenId }), onHelp: () => onAction?.({ type: 'help', screenId }) }) }), _jsx("div", { className: "prizma-screen-layout__footer", children: _jsx(PrizmaTag, { label: strings.verifiedLabel }) })] }));
|
|
121
|
+
.join(' '), children: [_jsx("div", { className: "id-capture-band id-capture-band--top", children: pillKind && pillCopy ? (_jsx("div", { className: "id-capture-stage__feedback", children: _jsx(PrizmaCaptureFeedback, { feedback: pillKind, title: pillCopy.title, subtitle: pillCopy.subtitle }) })) : (_jsxs(_Fragment, { children: [_jsx("h2", { className: "prizma-viewfinder__title", children: slice.title }), slice.instruction && !manual ? (_jsx("p", { className: "prizma-viewfinder__instruction", children: slice.instruction })) : null] })) }), _jsx(PrizmaIdCapture, { type: documentType, state: CAPTURE_STATE[state], isVertical: vertical, mode: "overlay", scrim: true, countdownValue: countdownValue, encryptedLabel: strings.encryptedLabel, announcement: strings.stage.stateLabels?.[state], still: still }), _jsx("div", { className: "id-capture-band", children: band ? _jsx("div", { className: "id-capture-stage__notice", children: band }) : null })] }), _jsx("div", { className: "prizma-screen-layout__capture-strip", children: _jsx(PrizmaCaptureManual, { className: "id-capture-stage__manual", variant: "id-capture", showButton: manual, showTooltip: manual, showHelpIcon: true, tooltipText: manual ? strings.stage.manualTooltip : undefined, ariaLabel: strings.stage.captureLabel, helpLabel: strings.stage.helpLabel, onCapture: () => onAction?.({ type: 'cta', screenId }), onHelp: () => onAction?.({ type: 'help', screenId }) }) }), _jsx("div", { className: "prizma-screen-layout__footer", children: _jsx(PrizmaTag, { label: strings.verifiedLabel }) })] }));
|
|
86
122
|
});
|
|
87
123
|
IdCaptureStageScreen.displayName = 'IdCaptureStageScreen';
|
|
88
124
|
export default IdCaptureStageScreen;
|
|
@@ -102,6 +102,25 @@ export interface IdCaptureStrings {
|
|
|
102
102
|
/** Visually-hidden state announcements, per stage state — forwarded to
|
|
103
103
|
* `PrizmaIdCapture.stateLabels`. */
|
|
104
104
|
stateLabels?: Partial<Record<IdCaptureStageState, string>>;
|
|
105
|
+
/**
|
|
106
|
+
* stage.extendTime — the accessibility offer that rides the camera stage
|
|
107
|
+
* 20 s before auto-capture gives up and hands over to the shutter
|
|
108
|
+
* ("Need more time? / Manual capture starts in 20 s / Extend auto-capture").
|
|
109
|
+
* The same contract as Face Capture's `extendTime`: one feature, two
|
|
110
|
+
* modules, identical copy, so the locale overlay translates both at once.
|
|
111
|
+
*
|
|
112
|
+
* `description` is one localized sentence that CONTAINS the count, not a
|
|
113
|
+
* template — ten locales put the number in ten places. Optional: a host
|
|
114
|
+
* that has not localized it gets no notice rather than English.
|
|
115
|
+
*/
|
|
116
|
+
extendTime?: {
|
|
117
|
+
/** Bold first line — "Need more time?" */
|
|
118
|
+
title: string;
|
|
119
|
+
/** "Manual capture starts in 20 s" — the count lives inside the copy. */
|
|
120
|
+
description: string;
|
|
121
|
+
/** The action that keeps the user on auto — "Extend auto-capture". */
|
|
122
|
+
linkLabel: string;
|
|
123
|
+
};
|
|
105
124
|
};
|
|
106
125
|
/** The on-camera feedback pills the error stages carry. */
|
|
107
126
|
feedback: Partial<Record<IdCaptureFeedbackKind, IdCaptureFeedbackCopy>>;
|
package/dist/ListScreen.d.ts
CHANGED
|
@@ -61,9 +61,30 @@ export interface PrizmaListScreenProps extends Omit<PrizmaScreenShellProps, 'dar
|
|
|
61
61
|
* (common issues) and "Quit process" (permission). Figma draws Core's
|
|
62
62
|
* `tertiary-link` composite in the band's top slot. */
|
|
63
63
|
linkLabel?: string;
|
|
64
|
+
/**
|
|
65
|
+
* A SECOND tertiary link, under the first. Reusability's selection draws
|
|
66
|
+
* "What data will be shared?" over "Incode’s Privacy Policy" with no primary
|
|
67
|
+
* between them — two non-primary actions a host has to tell apart, so this
|
|
68
|
+
* one emits `tertiary` where `linkLabel` emits `secondary` (the #PI-10
|
|
69
|
+
* reasoning). Stacked at the band's flat Spacing/16 like everything else in
|
|
70
|
+
* it. Omit it and nothing renders, so every existing consumer is untouched.
|
|
71
|
+
* DEVIATIONS #RU-4.
|
|
72
|
+
*/
|
|
73
|
+
secondaryLinkLabel?: string;
|
|
74
|
+
/**
|
|
75
|
+
* A shell-level layer painted OVER the whole screen — the same slot
|
|
76
|
+
* archetypes A and E carry (#F-32, #BC-8): a scrim plus Core's
|
|
77
|
+
* `PrizmaBottomSheetContent` or `PrizmaModalContent`, presented on top of the
|
|
78
|
+
* dimmed list. It cannot ride in the content column: it is absolutely
|
|
79
|
+
* positioned against the shell. Reusability's shared-details sheet is the
|
|
80
|
+
* first List consumer (DEVIATIONS #RU-5).
|
|
81
|
+
*/
|
|
82
|
+
overlay?: ReactNode;
|
|
64
83
|
/** "verified by" attribution copy for the footer tag. */
|
|
65
84
|
verifiedLabel: string;
|
|
66
85
|
navLabel?: string;
|
|
86
|
+
/** Opt-in back chevron in the nav (its accessible name). Emits `back`. */
|
|
87
|
+
backLabel?: string;
|
|
67
88
|
screenId?: string;
|
|
68
89
|
overrides?: PrizmaScreenOverrides;
|
|
69
90
|
onAction?: PrizmaScreenActionHandler;
|