@incodetech/prizma-core-screens 0.2.12 → 0.2.18

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 (64) hide show
  1. package/dist/DigitalIdDeviceWalletsDocumentSelectionScreen.d.ts +34 -0
  2. package/dist/DigitalIdDeviceWalletsDocumentSelectionScreen.js +47 -0
  3. package/dist/DigitalIdDeviceWalletsResultScreen.d.ts +28 -0
  4. package/dist/DigitalIdDeviceWalletsResultScreen.js +23 -0
  5. package/dist/DigitalIdDeviceWalletsStrings.d.ts +55 -0
  6. package/dist/DigitalIdDeviceWalletsStrings.js +19 -0
  7. package/dist/DigitalIdProvidersDocumentSelectionScreen.d.ts +31 -0
  8. package/dist/DigitalIdProvidersDocumentSelectionScreen.js +38 -0
  9. package/dist/DigitalIdProvidersErrorScreen.d.ts +33 -0
  10. package/dist/DigitalIdProvidersErrorScreen.js +33 -0
  11. package/dist/DigitalIdProvidersLayout.css +47 -0
  12. package/dist/DigitalIdProvidersRedirectScreen.d.ts +23 -0
  13. package/dist/DigitalIdProvidersRedirectScreen.js +17 -0
  14. package/dist/DigitalIdProvidersStrings.d.ts +76 -0
  15. package/dist/DigitalIdProvidersStrings.js +15 -0
  16. package/dist/FaceCaptureLayout.css +150 -0
  17. package/dist/FormScreen.css +35 -0
  18. package/dist/IdCaptureLayout.css +63 -0
  19. package/dist/ScreenLayout.css +191 -0
  20. package/dist/ScreenShell.css +13 -0
  21. package/dist/TutorialScreen.js +1 -1
  22. package/dist/index.d.ts +7 -0
  23. package/dist/index.js +5 -0
  24. package/dist/styles.css +1 -0
  25. package/package.json +29 -3
  26. package/samples/digital-id-providers/audkenni.png +0 -0
  27. package/samples/digital-id-providers/bankid-cz.png +0 -0
  28. package/samples/digital-id-providers/bankid-se.png +0 -0
  29. package/samples/digital-id-providers/ca-dmv-wallet.png +0 -0
  30. package/samples/digital-id-providers/digidentity.png +0 -0
  31. package/samples/digital-id-providers/diia.png +0 -0
  32. package/samples/digital-id-providers/edo.png +0 -0
  33. package/samples/digital-id-providers/eparaksts.png +0 -0
  34. package/samples/digital-id-providers/evrotrust.png +0 -0
  35. package/samples/digital-id-providers/freja.png +0 -0
  36. package/samples/digital-id-providers/ftn.png +0 -0
  37. package/samples/digital-id-providers/handy-signatur.png +0 -0
  38. package/samples/digital-id-providers/idin.png +0 -0
  39. package/samples/digital-id-providers/itsme.png +0 -0
  40. package/samples/digital-id-providers/mitid.png +0 -0
  41. package/samples/digital-id-providers/mobile-id.png +0 -0
  42. package/samples/digital-id-providers/mojeid.png +0 -0
  43. package/samples/digital-id-providers/oneid.png +0 -0
  44. package/samples/digital-id-providers/smart-id.png +0 -0
  45. package/samples/digital-id-providers/spid.png +0 -0
  46. package/samples/digital-id-providers/swissid.png +0 -0
  47. package/samples/digital-id-providers/uae-pass.png +0 -0
  48. package/samples/digital-id-providers/verimi.png +0 -0
  49. package/src/DigitalIdDeviceWalletsDocumentSelectionScreen.tsx +108 -0
  50. package/src/DigitalIdDeviceWalletsResultScreen.tsx +76 -0
  51. package/src/DigitalIdDeviceWalletsStrings.ts +80 -0
  52. package/src/DigitalIdProvidersDocumentSelectionScreen.tsx +113 -0
  53. package/src/DigitalIdProvidersErrorScreen.tsx +104 -0
  54. package/src/DigitalIdProvidersLayout.css +47 -0
  55. package/src/DigitalIdProvidersRedirectScreen.tsx +58 -0
  56. package/src/DigitalIdProvidersStrings.ts +102 -0
  57. package/src/FaceCaptureLayout.css +150 -0
  58. package/src/FormScreen.css +35 -0
  59. package/src/IdCaptureLayout.css +63 -0
  60. package/src/ScreenLayout.css +191 -0
  61. package/src/ScreenShell.css +13 -0
  62. package/src/TutorialScreen.tsx +4 -1
  63. package/src/index.ts +42 -0
  64. package/src/styles.css +1 -0
@@ -0,0 +1,108 @@
1
+ import React, { forwardRef } from 'react';
2
+ import { PrizmaCardListVerificationOptions } from '@incodetech/prizma-core-web/card-list';
3
+ import { PrizmaListScreen, type PrizmaListScreenProps } from './ListScreen';
4
+ import type { PrizmaScreenActionHandler, PrizmaScreenOverrides } from './types';
5
+ import type {
6
+ DigitalIdDeviceWalletsOption,
7
+ DigitalIdDeviceWalletsPlatformWallet,
8
+ DigitalIdDeviceWalletsStrings,
9
+ } from './DigitalIdDeviceWalletsStrings';
10
+ import './ScreenLayout.css';
11
+
12
+ export interface DigitalIdDeviceWalletsDocumentSelectionScreenProps
13
+ extends Omit<
14
+ PrizmaListScreenProps,
15
+ 'title' | 'subtitle' | 'children' | 'listAlign' | 'verifiedLabel' | 'navLabel'
16
+ > {
17
+ /** Module copy — this screen reads the `documentSelection` slice. */
18
+ strings: DigitalIdDeviceWalletsStrings;
19
+ /** Which wallet row the list carries. Default `apple` (iOS); `google` on
20
+ * Android; `digital-id` on web, where the row comes last with no tag. */
21
+ wallet?: DigitalIdDeviceWalletsPlatformWallet;
22
+ /** Fired with the chosen option; `onAction` still reports the tap. Named
23
+ * `onOptionSelect`, not `onSelect` — the latter is a native <div> event the
24
+ * shell already passes through. */
25
+ onOptionSelect?: (option: DigitalIdDeviceWalletsOption) => void;
26
+ screenId?: string;
27
+ overrides?: PrizmaScreenOverrides;
28
+ onAction?: PrizmaScreenActionHandler;
29
+ }
30
+
31
+ /**
32
+ * Digital ID Device Wallets — choose how to verify, with the device wallet
33
+ * first, built on the `PrizmaListScreen` archetype (GUIDELINES.md §6-G).
34
+ * Figma: `Digital IDs - Latest Design` (u7N5Zq4bfOwiVbpKHKmSPE), section
35
+ * `iOS Apple Wallet`, frame `1-1-1-how to verify` (26106:12647).
36
+ *
37
+ * The same screen as `IdCaptureDocumentSelectionScreen` with one more row: on
38
+ * iOS and Android the wallet on top, carrying Core's ⚡ Instant tag; on web a
39
+ * plain Digital ID row last (`[Web] Device Wallets`, 26106:13011). It is its own screen rather
40
+ * than a flag on ID Capture's so that ID Capture's chooser stays exactly what
41
+ * that module ships. Every piece is Core's — the row, the tag and the
42
+ * `apple-wallet` / `google-wallet` card icons (§10).
43
+ */
44
+ export const DigitalIdDeviceWalletsDocumentSelectionScreen = forwardRef<
45
+ HTMLDivElement,
46
+ DigitalIdDeviceWalletsDocumentSelectionScreenProps
47
+ >(
48
+ (
49
+ {
50
+ strings,
51
+ wallet = 'apple',
52
+ onOptionSelect,
53
+ screenId = 'digital-id-device-wallets-document-selection',
54
+ overrides,
55
+ onAction,
56
+ ...shell
57
+ },
58
+ ref,
59
+ ) => {
60
+ const choose = (option: DigitalIdDeviceWalletsOption) => {
61
+ onOptionSelect?.(option);
62
+ onAction?.({ type: 'cta', screenId });
63
+ };
64
+ const copy = strings.documentSelection;
65
+
66
+ return (
67
+ <PrizmaListScreen
68
+ ref={ref}
69
+ title={copy.title}
70
+ subtitle={copy.subtitle}
71
+ listAlign="end"
72
+ verifiedLabel={strings.verifiedLabel}
73
+ navLabel={strings.navLabel}
74
+ screenId={screenId}
75
+ overrides={overrides}
76
+ onAction={onAction}
77
+ {...shell}
78
+ >
79
+ <PrizmaCardListVerificationOptions
80
+ items={
81
+ wallet === 'digital-id'
82
+ ? [
83
+ // Web: the documents first, the plain Digital ID row last.
84
+ { icon: 'id', title: copy.idLabel, onClick: () => choose('id') },
85
+ { icon: 'passport', title: copy.passportLabel, onClick: () => choose('passport') },
86
+ { icon: 'digital-id', title: copy.digitalIdLabel, onClick: () => choose('wallet') },
87
+ ]
88
+ : [
89
+ {
90
+ icon: wallet === 'apple' ? 'apple-wallet' : 'google-wallet',
91
+ title: wallet === 'apple' ? copy.appleWalletLabel : copy.googleWalletLabel,
92
+ hasTag: true,
93
+ tagLabel: copy.instantLabel,
94
+ onClick: () => choose('wallet'),
95
+ },
96
+ { icon: 'id', title: copy.idLabel, onClick: () => choose('id') },
97
+ { icon: 'passport', title: copy.passportLabel, onClick: () => choose('passport') },
98
+ ]
99
+ }
100
+ />
101
+ </PrizmaListScreen>
102
+ );
103
+ },
104
+ );
105
+ DigitalIdDeviceWalletsDocumentSelectionScreen.displayName =
106
+ 'DigitalIdDeviceWalletsDocumentSelectionScreen';
107
+
108
+ export default DigitalIdDeviceWalletsDocumentSelectionScreen;
@@ -0,0 +1,76 @@
1
+ import React, { forwardRef } from 'react';
2
+ import { PrizmaResultScreen, type PrizmaResultScreenProps } from './ResultScreen';
3
+ import type { PrizmaScreenActionHandler, PrizmaScreenOverrides } from './types';
4
+ import type {
5
+ DigitalIdDeviceWalletsResultState,
6
+ DigitalIdDeviceWalletsStrings,
7
+ } from './DigitalIdDeviceWalletsStrings';
8
+ import './ScreenLayout.css';
9
+
10
+ export interface DigitalIdDeviceWalletsResultScreenProps
11
+ extends Omit<
12
+ PrizmaResultScreenProps,
13
+ 'status' | 'title' | 'subtitle' | 'ctaLabel' | 'secondaryCtaLabel' | 'verifiedLabel' | 'navLabel'
14
+ > {
15
+ /** Module copy — this screen reads the `success` or `error` slice. */
16
+ strings: DigitalIdDeviceWalletsStrings;
17
+ /** Which verdict the wallet hand-back landed on. */
18
+ state: DigitalIdDeviceWalletsResultState;
19
+ screenId?: string;
20
+ overrides?: PrizmaScreenOverrides;
21
+ onAction?: PrizmaScreenActionHandler;
22
+ }
23
+
24
+ /**
25
+ * Digital ID Device Wallets — the verdict after the wallet hands the ID back,
26
+ * built on the `PrizmaResultScreen` archetype (GUIDELINES.md §6-F).
27
+ *
28
+ * `error` is `Digital ID Generic Error` (26540:5685): status icon, title and
29
+ * subtitle centred in the full height, one CTA near the bottom, no logo nav and
30
+ * no verified tag. `success` has no frame — the section's `Success?` decision
31
+ * goes straight to the next module — so it is the same recipe with the
32
+ * positive mark and no button: it moves on by itself after 3 s, the way Face
33
+ * Capture's success does (DEVIATIONS.md #DIW-1). On web the error can carry a
34
+ * second button, "Choose another method", back to the chooser (#DIW-5).
35
+ */
36
+ export const DigitalIdDeviceWalletsResultScreen = forwardRef<
37
+ HTMLDivElement,
38
+ DigitalIdDeviceWalletsResultScreenProps
39
+ >(
40
+ (
41
+ {
42
+ strings,
43
+ state,
44
+ screenId = `digital-id-device-wallets-${state}`,
45
+ showHeader = false,
46
+ showFooter = false,
47
+ overrides,
48
+ onAction,
49
+ ...shell
50
+ },
51
+ ref,
52
+ ) => {
53
+ const copy = state === 'success' ? strings.success : strings.error;
54
+ return (
55
+ <PrizmaResultScreen
56
+ ref={ref}
57
+ status={state}
58
+ title={copy.title}
59
+ subtitle={copy.subtitle}
60
+ ctaLabel={copy.ctaLabel}
61
+ secondaryCtaLabel={state === 'error' ? strings.error.secondaryCtaLabel : undefined}
62
+ verifiedLabel={strings.verifiedLabel}
63
+ navLabel={strings.navLabel}
64
+ showHeader={showHeader}
65
+ showFooter={showFooter}
66
+ screenId={screenId}
67
+ overrides={overrides}
68
+ onAction={onAction}
69
+ {...shell}
70
+ />
71
+ );
72
+ },
73
+ );
74
+ DigitalIdDeviceWalletsResultScreen.displayName = 'DigitalIdDeviceWalletsResultScreen';
75
+
76
+ export default DigitalIdDeviceWalletsResultScreen;
@@ -0,0 +1,80 @@
1
+ // Digital ID Device Wallets module — copy contract.
2
+ //
3
+ // Every Digital ID Device Wallets screen receives the SAME `strings:
4
+ // DigitalIdDeviceWalletsStrings` object (rule: all copy via props, no hardcoded
5
+ // English — GUIDELINES.md §9).
6
+ //
7
+ // Authoritative screens: the `iOS Apple Wallet` section of the Digital IDs -
8
+ // Latest Design Figma file (u7N5Zq4bfOwiVbpKHKmSPE, node 26103:3689) —
9
+ // `1-1-1-how to verify` (26106:12647, the chooser with the Apple Wallet row)
10
+ // and `Digital ID Generic Error` (26540:5685). Two frames of the section are
11
+ // NOT part of this contract: `Apple Wallet System Modal` (26597:14667) is the
12
+ // OS's own sheet — OS chrome, DEVIATIONS.md #DC-20 precedent, mocked on the
13
+ // Core Lab canvas instead — and `1-2-1-id` / `2-2-1-id` are ID Capture's own
14
+ // tutorials, which the Identity Card and Passport rows hand off to.
15
+ //
16
+ // The success state has no frame: the section's `Success?` decision goes
17
+ // straight to `Next module/screen`. It is built as the error's mirror on the
18
+ // same archetype and recorded as added, not traced (DEVIATIONS.md #DIW-1).
19
+
20
+ /** Which wallet row the chooser offers. iOS shows Apple Wallet and Android
21
+ * Google Wallet, first and tagged Instant; web shows a plain Digital ID row
22
+ * last (`[Web] Device Wallets`, 26106:13011), which opens the browser's
23
+ * wallet sheet. */
24
+ export type DigitalIdDeviceWalletsPlatformWallet = 'apple' | 'google' | 'digital-id';
25
+
26
+ /** The two verdicts the wallet hand-back can land on. */
27
+ export type DigitalIdDeviceWalletsResultState = 'success' | 'error';
28
+
29
+ /** What the person picked on the chooser. `wallet` stays in this module; `id`
30
+ * and `passport` hand off to ID Capture. */
31
+ export type DigitalIdDeviceWalletsOption = 'wallet' | 'id' | 'passport';
32
+
33
+ export interface DigitalIdDeviceWalletsStrings {
34
+ /** Accessible name for the logo nav region (i18n — no baked-in English). */
35
+ navLabel?: string;
36
+ /** "verified by" attribution copy for the footer tag. */
37
+ verifiedLabel: string;
38
+
39
+ /** `1-1-1-how to verify` (node 26106:12647). */
40
+ documentSelection: {
41
+ /** "Select how to verify" */
42
+ title: string;
43
+ subtitle?: string;
44
+ /** "Apple Wallet" */
45
+ appleWalletLabel: string;
46
+ /** "Google Wallet" — the Android row. */
47
+ googleWalletLabel: string;
48
+ /** "Digital ID" — the web row. */
49
+ digitalIdLabel: string;
50
+ /** "Instant" — the tag under the wallet row. */
51
+ instantLabel: string;
52
+ /** "Identity Card" */
53
+ idLabel: string;
54
+ /** "Passport" */
55
+ passportLabel: string;
56
+ };
57
+
58
+ /** `Successfully verified` (node 26598:16374) — no button (DEVIATIONS.md #DIW-1). */
59
+ success: {
60
+ /** "Identity successfully verified" — the NFC / OCR Review success title. */
61
+ title: string;
62
+ subtitle?: string;
63
+ /** No button by default: like Face Capture's success, the flow moves on by
64
+ * itself after 3 s. Set it only for a host that waits for a tap. */
65
+ ctaLabel?: string;
66
+ };
67
+
68
+ /** `Digital ID Generic Error` (node 26540:5685). */
69
+ error: {
70
+ /** "Couldn't verify your ID" */
71
+ title: string;
72
+ /** "Please try again" */
73
+ subtitle?: string;
74
+ /** "Try again" */
75
+ ctaLabel: string;
76
+ /** "Choose another method" — web only: back to the chooser, the SDK's
77
+ * `deviceWalletUseAnotherMethod()`. Absent, the screen has one button. */
78
+ secondaryCtaLabel?: string;
79
+ };
80
+ }
@@ -0,0 +1,113 @@
1
+ import React, { forwardRef } from 'react';
2
+ import { PrizmaCardListVerificationOptions } from '@incodetech/prizma-core-web/card-list';
3
+ import { PrizmaCountryFlag } from '@incodetech/prizma-core-web/combined';
4
+ import { PrizmaListScreen, type PrizmaListScreenProps } from './ListScreen';
5
+ import type { PrizmaScreenActionHandler, PrizmaScreenOverrides } from './types';
6
+ import type {
7
+ DigitalIdProvidersSelection,
8
+ DigitalIdProvidersStrings,
9
+ } from './DigitalIdProvidersStrings';
10
+ import './ScreenLayout.css';
11
+ import './DigitalIdProvidersLayout.css';
12
+
13
+ export interface DigitalIdProvidersDocumentSelectionScreenProps
14
+ extends Omit<
15
+ PrizmaListScreenProps,
16
+ 'title' | 'subtitle' | 'children' | 'listAlign' | 'verifiedLabel' | 'navLabel'
17
+ > {
18
+ /** Module copy — this screen reads the `documentSelection` slice. */
19
+ strings: DigitalIdProvidersStrings;
20
+ /** How many providers to list; all of them when absent. The frame's first
21
+ * state (27753:8099) shows six, the full list (27703:4895) scrolls. */
22
+ providerCount?: number;
23
+ /** Fired with what was picked; `onAction` still reports the tap. */
24
+ onOptionSelect?: (selection: DigitalIdProvidersSelection) => void;
25
+ screenId?: string;
26
+ overrides?: PrizmaScreenOverrides;
27
+ onAction?: PrizmaScreenActionHandler;
28
+ }
29
+
30
+ /**
31
+ * Digital ID Providers — choose how to verify: your own ID, or a Digital ID
32
+ * provider, on the `PrizmaListScreen` archetype (GUIDELINES.md §6-G).
33
+ * Figma: `Document Chooser` (27753:8099) and the full list (27703:4895).
34
+ *
35
+ * Two of Core's card lists, each under a section label, after a "Viewing
36
+ * options for" country line with Core's flag. Every row is Core's; a
37
+ * provider leads with its logo from the backend catalog, or Core's generic
38
+ * `digital-id-web` card icon when it has none (DEVIATIONS #DIP-1), and the Identity Card
39
+ * row has no second line, which Core's row cannot draw (#DIP-3).
40
+ */
41
+ export const DigitalIdProvidersDocumentSelectionScreen = forwardRef<
42
+ HTMLDivElement,
43
+ DigitalIdProvidersDocumentSelectionScreenProps
44
+ >(
45
+ (
46
+ {
47
+ strings,
48
+ providerCount,
49
+ onOptionSelect,
50
+ screenId = 'digital-id-providers-document-selection',
51
+ overrides,
52
+ onAction,
53
+ ...shell
54
+ },
55
+ ref,
56
+ ) => {
57
+ const copy = strings.documentSelection;
58
+ const providers =
59
+ providerCount === undefined ? copy.providers : copy.providers.slice(0, providerCount);
60
+ const choose = (selection: DigitalIdProvidersSelection) => {
61
+ onOptionSelect?.(selection);
62
+ onAction?.({ type: 'cta', screenId });
63
+ };
64
+
65
+ return (
66
+ <PrizmaListScreen
67
+ ref={ref}
68
+ title={copy.title}
69
+ listAlign="start"
70
+ scrollList
71
+ verifiedLabel={strings.verifiedLabel}
72
+ navLabel={strings.navLabel}
73
+ screenId={screenId}
74
+ overrides={overrides}
75
+ onAction={onAction}
76
+ {...shell}
77
+ >
78
+ <div className="digital-id-providers-chooser">
79
+ <p className="digital-id-providers-country">
80
+ {copy.countryLabel}
81
+ <PrizmaCountryFlag
82
+ country={{ code: copy.countryCode, name: copy.countryName, dialCode: '', flag: '' }}
83
+ />
84
+ <span className="digital-id-providers-country__name">{copy.countryName}</span>
85
+ </p>
86
+ <section className="digital-id-providers-section">
87
+ <p className="digital-id-providers-section__label">{copy.idSectionLabel}</p>
88
+ <PrizmaCardListVerificationOptions
89
+ items={[
90
+ { icon: 'id', title: copy.idLabel, onClick: () => choose({ kind: 'id' }) },
91
+ { icon: 'passport', title: copy.passportLabel, onClick: () => choose({ kind: 'passport' }) },
92
+ ]}
93
+ />
94
+ </section>
95
+ <section className="digital-id-providers-section">
96
+ <p className="digital-id-providers-section__label">{copy.providersSectionLabel}</p>
97
+ <PrizmaCardListVerificationOptions
98
+ items={providers.map(provider => ({
99
+ icon: 'digital-id-web' as const,
100
+ logo: provider.logo,
101
+ title: provider.label,
102
+ onClick: () => choose({ kind: 'provider', providerId: provider.id }),
103
+ }))}
104
+ />
105
+ </section>
106
+ </div>
107
+ </PrizmaListScreen>
108
+ );
109
+ },
110
+ );
111
+ DigitalIdProvidersDocumentSelectionScreen.displayName = 'DigitalIdProvidersDocumentSelectionScreen';
112
+
113
+ export default DigitalIdProvidersDocumentSelectionScreen;
@@ -0,0 +1,104 @@
1
+ import React, { forwardRef } from 'react';
2
+ import { PrizmaCardDocumentList } from '@incodetech/prizma-core-web/card';
3
+ import { PrizmaResultScreen, type PrizmaResultScreenProps } from './ResultScreen';
4
+ import type { PrizmaScreenActionHandler, PrizmaScreenOverrides } from './types';
5
+ import type {
6
+ DigitalIdProvidersErrorState,
7
+ DigitalIdProvidersStrings,
8
+ } from './DigitalIdProvidersStrings';
9
+ import './ScreenLayout.css';
10
+
11
+ export interface DigitalIdProvidersErrorScreenProps
12
+ extends Omit<
13
+ PrizmaResultScreenProps,
14
+ | 'status'
15
+ | 'title'
16
+ | 'subtitle'
17
+ | 'children'
18
+ | 'ctaLabel'
19
+ | 'secondaryCtaLabel'
20
+ | 'verifiedLabel'
21
+ | 'navLabel'
22
+ > {
23
+ /** Module copy — this screen reads the `errors` slice for its `state`, and
24
+ * `acceptedDocuments` on the two document states. */
25
+ strings: DigitalIdProvidersStrings;
26
+ state: DigitalIdProvidersErrorState;
27
+ screenId?: string;
28
+ overrides?: PrizmaScreenOverrides;
29
+ onAction?: PrizmaScreenActionHandler;
30
+ }
31
+
32
+ /** The two states that list the documents accepted instead. */
33
+ const LISTS_DOCUMENTS: ReadonlySet<DigitalIdProvidersErrorState> = new Set(['not-accepted', 'expired']);
34
+
35
+ /**
36
+ * Digital ID Providers — the five failures of a provider run, on the
37
+ * `PrizmaResultScreen` archetype (GUIDELINES.md §6-F). Figma: `Errors`
38
+ * (27707:9338).
39
+ *
40
+ * unavailable the provider could not be reached — Scan ID instead
41
+ * consent-denied the person did not grant sharing at the provider
42
+ * timed-out the provider session did not finish in time
43
+ * not-accepted the ID behind the provider is not one the flow accepts
44
+ * expired the ID behind the provider has expired
45
+ *
46
+ * Every state has two buttons, the second "Choose another method" (#DIP-4).
47
+ * The two document states carry Core's `PrizmaCardDocumentList` in the
48
+ * archetype's `children` slot, the same recipe ID Capture's document error
49
+ * uses. The first three keep the footer tag as drawn; the two document states
50
+ * drop it, as drawn.
51
+ */
52
+ export const DigitalIdProvidersErrorScreen = forwardRef<
53
+ HTMLDivElement,
54
+ DigitalIdProvidersErrorScreenProps
55
+ >(
56
+ (
57
+ {
58
+ strings,
59
+ state,
60
+ screenId = `digital-id-providers-error-${state}`,
61
+ showHeader = false,
62
+ showFooter,
63
+ overrides,
64
+ onAction,
65
+ ...shell
66
+ },
67
+ ref,
68
+ ) => {
69
+ const copy = strings.errors[state];
70
+ const listsDocuments = LISTS_DOCUMENTS.has(state);
71
+ const docs = strings.acceptedDocuments;
72
+ return (
73
+ <PrizmaResultScreen
74
+ ref={ref}
75
+ status="error"
76
+ title={copy.title}
77
+ subtitle={copy.subtitle}
78
+ ctaLabel={copy.ctaLabel}
79
+ secondaryCtaLabel={copy.secondaryCtaLabel}
80
+ verifiedLabel={strings.verifiedLabel}
81
+ navLabel={strings.navLabel}
82
+ showHeader={showHeader}
83
+ showFooter={showFooter ?? !listsDocuments}
84
+ screenId={screenId}
85
+ overrides={overrides}
86
+ onAction={onAction}
87
+ {...shell}
88
+ >
89
+ {listsDocuments ? (
90
+ <PrizmaCardDocumentList
91
+ state="default"
92
+ countryCode={docs.countryCode}
93
+ flag={docs.flag}
94
+ country={docs.country}
95
+ documents={docs.documents}
96
+ />
97
+ ) : null}
98
+ </PrizmaResultScreen>
99
+ );
100
+ },
101
+ );
102
+ DigitalIdProvidersErrorScreen.displayName = 'DigitalIdProvidersErrorScreen';
103
+
104
+ export default DigitalIdProvidersErrorScreen;
@@ -0,0 +1,47 @@
1
+ /* Digital ID Providers — the chooser's country line and section labels.
2
+ *
3
+ * Archetype G has one list slot and no section-label recipe; the provider
4
+ * chooser (27753:8099) groups two Core card lists under labels ("Use your ID",
5
+ * "Digital ID verification") with a "Viewing options for 🇺🇸 US" line under the
6
+ * title. Composed here from tokens only, like Reusability's rows (#RU-1);
7
+ * DEVIATIONS #DIP-2 asks for a foundation recipe. */
8
+
9
+ .digital-id-providers-chooser {
10
+ display: flex;
11
+ flex-direction: column;
12
+ gap: var(--prizma-spacing-24);
13
+ }
14
+
15
+ .digital-id-providers-country {
16
+ display: flex;
17
+ align-items: center;
18
+ justify-content: center;
19
+ gap: var(--prizma-spacing-8);
20
+ color: var(--prizma-text-body-500-secondary);
21
+ font-family: var(--prizma-body-family);
22
+ font-size: var(--prizma-body-m-regular-font-size);
23
+ font-weight: var(--prizma-body-m-regular-font-weight);
24
+ line-height: var(--prizma-body-m-regular-line-height);
25
+ letter-spacing: var(--prizma-body-m-regular-letter-spacing);
26
+ }
27
+
28
+ .digital-id-providers-country__name {
29
+ color: var(--prizma-text-body-800-primary);
30
+ text-decoration: underline;
31
+ }
32
+
33
+ .digital-id-providers-section {
34
+ display: flex;
35
+ flex-direction: column;
36
+ gap: var(--prizma-spacing-8);
37
+ }
38
+
39
+ .digital-id-providers-section__label {
40
+ margin: 0;
41
+ color: var(--prizma-text-body-500-secondary);
42
+ font-family: var(--prizma-body-family);
43
+ font-size: var(--prizma-body-m-regular-font-size);
44
+ font-weight: var(--prizma-body-m-regular-font-weight);
45
+ line-height: var(--prizma-body-m-regular-line-height);
46
+ letter-spacing: var(--prizma-body-m-regular-letter-spacing);
47
+ }
@@ -0,0 +1,58 @@
1
+ import React, { forwardRef } from 'react';
2
+ import { PrizmaProcessingScreen, type PrizmaProcessingScreenProps } from './ProcessingScreen';
3
+ import type { PrizmaScreenActionHandler, PrizmaScreenOverrides } from './types';
4
+ import type { DigitalIdProvidersStrings } from './DigitalIdProvidersStrings';
5
+ import './ScreenLayout.css';
6
+
7
+ export interface DigitalIdProvidersRedirectScreenProps
8
+ extends Omit<
9
+ PrizmaProcessingScreenProps,
10
+ 'status' | 'title' | 'subtitle' | 'verifiedLabel' | 'navLabel'
11
+ > {
12
+ /** Module copy — this screen reads the `redirecting` slice. */
13
+ strings: DigitalIdProvidersStrings;
14
+ screenId?: string;
15
+ overrides?: PrizmaScreenOverrides;
16
+ onAction?: PrizmaScreenActionHandler;
17
+ }
18
+
19
+ /**
20
+ * Digital ID Providers — "Redirecting for verification…", the wait before the
21
+ * browser leaves for the provider's site, on the `PrizmaProcessingScreen`
22
+ * archetype (GUIDELINES.md §6-C). Figma: the `1-18-1-id-hold-on` instance in
23
+ * the web full flow (27707:9281), with the module's own copy. The Web SDK's
24
+ * `digitalIdRedirect` phases `loading` and `redirecting` both look like this.
25
+ * Built like Core's other processing screens: the archetype as-is, with the
26
+ * logo nav and the footer tag (DEVIATIONS #DIP-9).
27
+ */
28
+ export const DigitalIdProvidersRedirectScreen = forwardRef<
29
+ HTMLDivElement,
30
+ DigitalIdProvidersRedirectScreenProps
31
+ >(
32
+ (
33
+ {
34
+ strings,
35
+ screenId = 'digital-id-providers-redirecting',
36
+ overrides,
37
+ onAction,
38
+ ...shell
39
+ },
40
+ ref,
41
+ ) => (
42
+ <PrizmaProcessingScreen
43
+ ref={ref}
44
+ status="loading"
45
+ title={strings.redirecting.title}
46
+ subtitle={strings.redirecting.subtitle}
47
+ verifiedLabel={strings.verifiedLabel}
48
+ navLabel={strings.navLabel}
49
+ screenId={screenId}
50
+ overrides={overrides}
51
+ onAction={onAction}
52
+ {...shell}
53
+ />
54
+ ),
55
+ );
56
+ DigitalIdProvidersRedirectScreen.displayName = 'DigitalIdProvidersRedirectScreen';
57
+
58
+ export default DigitalIdProvidersRedirectScreen;