@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,34 @@
1
+ import React from 'react';
2
+ import { type PrizmaListScreenProps } from './ListScreen';
3
+ import type { PrizmaScreenActionHandler, PrizmaScreenOverrides } from './types';
4
+ import type { DigitalIdDeviceWalletsOption, DigitalIdDeviceWalletsPlatformWallet, DigitalIdDeviceWalletsStrings } from './DigitalIdDeviceWalletsStrings';
5
+ import './ScreenLayout.css';
6
+ export interface DigitalIdDeviceWalletsDocumentSelectionScreenProps extends Omit<PrizmaListScreenProps, 'title' | 'subtitle' | 'children' | 'listAlign' | 'verifiedLabel' | 'navLabel'> {
7
+ /** Module copy — this screen reads the `documentSelection` slice. */
8
+ strings: DigitalIdDeviceWalletsStrings;
9
+ /** Which wallet row the list carries. Default `apple` (iOS); `google` on
10
+ * Android; `digital-id` on web, where the row comes last with no tag. */
11
+ wallet?: DigitalIdDeviceWalletsPlatformWallet;
12
+ /** Fired with the chosen option; `onAction` still reports the tap. Named
13
+ * `onOptionSelect`, not `onSelect` — the latter is a native <div> event the
14
+ * shell already passes through. */
15
+ onOptionSelect?: (option: DigitalIdDeviceWalletsOption) => void;
16
+ screenId?: string;
17
+ overrides?: PrizmaScreenOverrides;
18
+ onAction?: PrizmaScreenActionHandler;
19
+ }
20
+ /**
21
+ * Digital ID Device Wallets — choose how to verify, with the device wallet
22
+ * first, built on the `PrizmaListScreen` archetype (GUIDELINES.md §6-G).
23
+ * Figma: `Digital IDs - Latest Design` (u7N5Zq4bfOwiVbpKHKmSPE), section
24
+ * `iOS Apple Wallet`, frame `1-1-1-how to verify` (26106:12647).
25
+ *
26
+ * The same screen as `IdCaptureDocumentSelectionScreen` with one more row: on
27
+ * iOS and Android the wallet on top, carrying Core's ⚡ Instant tag; on web a
28
+ * plain Digital ID row last (`[Web] Device Wallets`, 26106:13011). It is its own screen rather
29
+ * than a flag on ID Capture's so that ID Capture's chooser stays exactly what
30
+ * that module ships. Every piece is Core's — the row, the tag and the
31
+ * `apple-wallet` / `google-wallet` card icons (§10).
32
+ */
33
+ export declare const DigitalIdDeviceWalletsDocumentSelectionScreen: React.ForwardRefExoticComponent<DigitalIdDeviceWalletsDocumentSelectionScreenProps & React.RefAttributes<HTMLDivElement>>;
34
+ export default DigitalIdDeviceWalletsDocumentSelectionScreen;
@@ -0,0 +1,47 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { forwardRef } from 'react';
4
+ import { PrizmaCardListVerificationOptions } from '@incodetech/prizma-core-web/card-list';
5
+ import { PrizmaListScreen } from './ListScreen';
6
+ import './ScreenLayout.css';
7
+ /**
8
+ * Digital ID Device Wallets — choose how to verify, with the device wallet
9
+ * first, built on the `PrizmaListScreen` archetype (GUIDELINES.md §6-G).
10
+ * Figma: `Digital IDs - Latest Design` (u7N5Zq4bfOwiVbpKHKmSPE), section
11
+ * `iOS Apple Wallet`, frame `1-1-1-how to verify` (26106:12647).
12
+ *
13
+ * The same screen as `IdCaptureDocumentSelectionScreen` with one more row: on
14
+ * iOS and Android the wallet on top, carrying Core's ⚡ Instant tag; on web a
15
+ * plain Digital ID row last (`[Web] Device Wallets`, 26106:13011). It is its own screen rather
16
+ * than a flag on ID Capture's so that ID Capture's chooser stays exactly what
17
+ * that module ships. Every piece is Core's — the row, the tag and the
18
+ * `apple-wallet` / `google-wallet` card icons (§10).
19
+ */
20
+ export const DigitalIdDeviceWalletsDocumentSelectionScreen = forwardRef(({ strings, wallet = 'apple', onOptionSelect, screenId = 'digital-id-device-wallets-document-selection', overrides, onAction, ...shell }, ref) => {
21
+ const choose = (option) => {
22
+ onOptionSelect?.(option);
23
+ onAction?.({ type: 'cta', screenId });
24
+ };
25
+ const copy = strings.documentSelection;
26
+ return (_jsx(PrizmaListScreen, { ref: ref, title: copy.title, subtitle: copy.subtitle, listAlign: "end", verifiedLabel: strings.verifiedLabel, navLabel: strings.navLabel, screenId: screenId, overrides: overrides, onAction: onAction, ...shell, children: _jsx(PrizmaCardListVerificationOptions, { items: wallet === 'digital-id'
27
+ ? [
28
+ // Web: the documents first, the plain Digital ID row last.
29
+ { icon: 'id', title: copy.idLabel, onClick: () => choose('id') },
30
+ { icon: 'passport', title: copy.passportLabel, onClick: () => choose('passport') },
31
+ { icon: 'digital-id', title: copy.digitalIdLabel, onClick: () => choose('wallet') },
32
+ ]
33
+ : [
34
+ {
35
+ icon: wallet === 'apple' ? 'apple-wallet' : 'google-wallet',
36
+ title: wallet === 'apple' ? copy.appleWalletLabel : copy.googleWalletLabel,
37
+ hasTag: true,
38
+ tagLabel: copy.instantLabel,
39
+ onClick: () => choose('wallet'),
40
+ },
41
+ { icon: 'id', title: copy.idLabel, onClick: () => choose('id') },
42
+ { icon: 'passport', title: copy.passportLabel, onClick: () => choose('passport') },
43
+ ] }) }));
44
+ });
45
+ DigitalIdDeviceWalletsDocumentSelectionScreen.displayName =
46
+ 'DigitalIdDeviceWalletsDocumentSelectionScreen';
47
+ export default DigitalIdDeviceWalletsDocumentSelectionScreen;
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import { type PrizmaResultScreenProps } from './ResultScreen';
3
+ import type { PrizmaScreenActionHandler, PrizmaScreenOverrides } from './types';
4
+ import type { DigitalIdDeviceWalletsResultState, DigitalIdDeviceWalletsStrings } from './DigitalIdDeviceWalletsStrings';
5
+ import './ScreenLayout.css';
6
+ export interface DigitalIdDeviceWalletsResultScreenProps extends Omit<PrizmaResultScreenProps, 'status' | 'title' | 'subtitle' | 'ctaLabel' | 'secondaryCtaLabel' | 'verifiedLabel' | 'navLabel'> {
7
+ /** Module copy — this screen reads the `success` or `error` slice. */
8
+ strings: DigitalIdDeviceWalletsStrings;
9
+ /** Which verdict the wallet hand-back landed on. */
10
+ state: DigitalIdDeviceWalletsResultState;
11
+ screenId?: string;
12
+ overrides?: PrizmaScreenOverrides;
13
+ onAction?: PrizmaScreenActionHandler;
14
+ }
15
+ /**
16
+ * Digital ID Device Wallets — the verdict after the wallet hands the ID back,
17
+ * built on the `PrizmaResultScreen` archetype (GUIDELINES.md §6-F).
18
+ *
19
+ * `error` is `Digital ID Generic Error` (26540:5685): status icon, title and
20
+ * subtitle centred in the full height, one CTA near the bottom, no logo nav and
21
+ * no verified tag. `success` has no frame — the section's `Success?` decision
22
+ * goes straight to the next module — so it is the same recipe with the
23
+ * positive mark and no button: it moves on by itself after 3 s, the way Face
24
+ * Capture's success does (DEVIATIONS.md #DIW-1). On web the error can carry a
25
+ * second button, "Choose another method", back to the chooser (#DIW-5).
26
+ */
27
+ export declare const DigitalIdDeviceWalletsResultScreen: React.ForwardRefExoticComponent<DigitalIdDeviceWalletsResultScreenProps & React.RefAttributes<HTMLDivElement>>;
28
+ export default DigitalIdDeviceWalletsResultScreen;
@@ -0,0 +1,23 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { forwardRef } from 'react';
4
+ import { PrizmaResultScreen } from './ResultScreen';
5
+ import './ScreenLayout.css';
6
+ /**
7
+ * Digital ID Device Wallets — the verdict after the wallet hands the ID back,
8
+ * built on the `PrizmaResultScreen` archetype (GUIDELINES.md §6-F).
9
+ *
10
+ * `error` is `Digital ID Generic Error` (26540:5685): status icon, title and
11
+ * subtitle centred in the full height, one CTA near the bottom, no logo nav and
12
+ * no verified tag. `success` has no frame — the section's `Success?` decision
13
+ * goes straight to the next module — so it is the same recipe with the
14
+ * positive mark and no button: it moves on by itself after 3 s, the way Face
15
+ * Capture's success does (DEVIATIONS.md #DIW-1). On web the error can carry a
16
+ * second button, "Choose another method", back to the chooser (#DIW-5).
17
+ */
18
+ export const DigitalIdDeviceWalletsResultScreen = forwardRef(({ strings, state, screenId = `digital-id-device-wallets-${state}`, showHeader = false, showFooter = false, overrides, onAction, ...shell }, ref) => {
19
+ const copy = state === 'success' ? strings.success : strings.error;
20
+ return (_jsx(PrizmaResultScreen, { ref: ref, status: state, title: copy.title, subtitle: copy.subtitle, ctaLabel: copy.ctaLabel, secondaryCtaLabel: state === 'error' ? strings.error.secondaryCtaLabel : undefined, verifiedLabel: strings.verifiedLabel, navLabel: strings.navLabel, showHeader: showHeader, showFooter: showFooter, screenId: screenId, overrides: overrides, onAction: onAction, ...shell }));
21
+ });
22
+ DigitalIdDeviceWalletsResultScreen.displayName = 'DigitalIdDeviceWalletsResultScreen';
23
+ export default DigitalIdDeviceWalletsResultScreen;
@@ -0,0 +1,55 @@
1
+ /** Which wallet row the chooser offers. iOS shows Apple Wallet and Android
2
+ * Google Wallet, first and tagged Instant; web shows a plain Digital ID row
3
+ * last (`[Web] Device Wallets`, 26106:13011), which opens the browser's
4
+ * wallet sheet. */
5
+ export type DigitalIdDeviceWalletsPlatformWallet = 'apple' | 'google' | 'digital-id';
6
+ /** The two verdicts the wallet hand-back can land on. */
7
+ export type DigitalIdDeviceWalletsResultState = 'success' | 'error';
8
+ /** What the person picked on the chooser. `wallet` stays in this module; `id`
9
+ * and `passport` hand off to ID Capture. */
10
+ export type DigitalIdDeviceWalletsOption = 'wallet' | 'id' | 'passport';
11
+ export interface DigitalIdDeviceWalletsStrings {
12
+ /** Accessible name for the logo nav region (i18n — no baked-in English). */
13
+ navLabel?: string;
14
+ /** "verified by" attribution copy for the footer tag. */
15
+ verifiedLabel: string;
16
+ /** `1-1-1-how to verify` (node 26106:12647). */
17
+ documentSelection: {
18
+ /** "Select how to verify" */
19
+ title: string;
20
+ subtitle?: string;
21
+ /** "Apple Wallet" */
22
+ appleWalletLabel: string;
23
+ /** "Google Wallet" — the Android row. */
24
+ googleWalletLabel: string;
25
+ /** "Digital ID" — the web row. */
26
+ digitalIdLabel: string;
27
+ /** "Instant" — the tag under the wallet row. */
28
+ instantLabel: string;
29
+ /** "Identity Card" */
30
+ idLabel: string;
31
+ /** "Passport" */
32
+ passportLabel: string;
33
+ };
34
+ /** `Successfully verified` (node 26598:16374) — no button (DEVIATIONS.md #DIW-1). */
35
+ success: {
36
+ /** "Identity successfully verified" — the NFC / OCR Review success title. */
37
+ title: string;
38
+ subtitle?: string;
39
+ /** No button by default: like Face Capture's success, the flow moves on by
40
+ * itself after 3 s. Set it only for a host that waits for a tap. */
41
+ ctaLabel?: string;
42
+ };
43
+ /** `Digital ID Generic Error` (node 26540:5685). */
44
+ error: {
45
+ /** "Couldn't verify your ID" */
46
+ title: string;
47
+ /** "Please try again" */
48
+ subtitle?: string;
49
+ /** "Try again" */
50
+ ctaLabel: string;
51
+ /** "Choose another method" — web only: back to the chooser, the SDK's
52
+ * `deviceWalletUseAnotherMethod()`. Absent, the screen has one button. */
53
+ secondaryCtaLabel?: string;
54
+ };
55
+ }
@@ -0,0 +1,19 @@
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
+ export {};
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ import { type PrizmaListScreenProps } from './ListScreen';
3
+ import type { PrizmaScreenActionHandler, PrizmaScreenOverrides } from './types';
4
+ import type { DigitalIdProvidersSelection, DigitalIdProvidersStrings } from './DigitalIdProvidersStrings';
5
+ import './ScreenLayout.css';
6
+ import './DigitalIdProvidersLayout.css';
7
+ export interface DigitalIdProvidersDocumentSelectionScreenProps extends Omit<PrizmaListScreenProps, 'title' | 'subtitle' | 'children' | 'listAlign' | 'verifiedLabel' | 'navLabel'> {
8
+ /** Module copy — this screen reads the `documentSelection` slice. */
9
+ strings: DigitalIdProvidersStrings;
10
+ /** How many providers to list; all of them when absent. The frame's first
11
+ * state (27753:8099) shows six, the full list (27703:4895) scrolls. */
12
+ providerCount?: number;
13
+ /** Fired with what was picked; `onAction` still reports the tap. */
14
+ onOptionSelect?: (selection: DigitalIdProvidersSelection) => void;
15
+ screenId?: string;
16
+ overrides?: PrizmaScreenOverrides;
17
+ onAction?: PrizmaScreenActionHandler;
18
+ }
19
+ /**
20
+ * Digital ID Providers — choose how to verify: your own ID, or a Digital ID
21
+ * provider, on the `PrizmaListScreen` archetype (GUIDELINES.md §6-G).
22
+ * Figma: `Document Chooser` (27753:8099) and the full list (27703:4895).
23
+ *
24
+ * Two of Core's card lists, each under a section label, after a "Viewing
25
+ * options for" country line with Core's flag. Every row is Core's; a
26
+ * provider leads with its logo from the backend catalog, or Core's generic
27
+ * `digital-id-web` card icon when it has none (DEVIATIONS #DIP-1), and the Identity Card
28
+ * row has no second line, which Core's row cannot draw (#DIP-3).
29
+ */
30
+ export declare const DigitalIdProvidersDocumentSelectionScreen: React.ForwardRefExoticComponent<DigitalIdProvidersDocumentSelectionScreenProps & React.RefAttributes<HTMLDivElement>>;
31
+ export default DigitalIdProvidersDocumentSelectionScreen;
@@ -0,0 +1,38 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { forwardRef } from 'react';
4
+ import { PrizmaCardListVerificationOptions } from '@incodetech/prizma-core-web/card-list';
5
+ import { PrizmaCountryFlag } from '@incodetech/prizma-core-web/combined';
6
+ import { PrizmaListScreen } from './ListScreen';
7
+ import './ScreenLayout.css';
8
+ import './DigitalIdProvidersLayout.css';
9
+ /**
10
+ * Digital ID Providers — choose how to verify: your own ID, or a Digital ID
11
+ * provider, on the `PrizmaListScreen` archetype (GUIDELINES.md §6-G).
12
+ * Figma: `Document Chooser` (27753:8099) and the full list (27703:4895).
13
+ *
14
+ * Two of Core's card lists, each under a section label, after a "Viewing
15
+ * options for" country line with Core's flag. Every row is Core's; a
16
+ * provider leads with its logo from the backend catalog, or Core's generic
17
+ * `digital-id-web` card icon when it has none (DEVIATIONS #DIP-1), and the Identity Card
18
+ * row has no second line, which Core's row cannot draw (#DIP-3).
19
+ */
20
+ export const DigitalIdProvidersDocumentSelectionScreen = forwardRef(({ strings, providerCount, onOptionSelect, screenId = 'digital-id-providers-document-selection', overrides, onAction, ...shell }, ref) => {
21
+ const copy = strings.documentSelection;
22
+ const providers = providerCount === undefined ? copy.providers : copy.providers.slice(0, providerCount);
23
+ const choose = (selection) => {
24
+ onOptionSelect?.(selection);
25
+ onAction?.({ type: 'cta', screenId });
26
+ };
27
+ return (_jsx(PrizmaListScreen, { ref: ref, title: copy.title, listAlign: "start", scrollList: true, verifiedLabel: strings.verifiedLabel, navLabel: strings.navLabel, screenId: screenId, overrides: overrides, onAction: onAction, ...shell, children: _jsxs("div", { className: "digital-id-providers-chooser", children: [_jsxs("p", { className: "digital-id-providers-country", children: [copy.countryLabel, _jsx(PrizmaCountryFlag, { country: { code: copy.countryCode, name: copy.countryName, dialCode: '', flag: '' } }), _jsx("span", { className: "digital-id-providers-country__name", children: copy.countryName })] }), _jsxs("section", { className: "digital-id-providers-section", children: [_jsx("p", { className: "digital-id-providers-section__label", children: copy.idSectionLabel }), _jsx(PrizmaCardListVerificationOptions, { items: [
28
+ { icon: 'id', title: copy.idLabel, onClick: () => choose({ kind: 'id' }) },
29
+ { icon: 'passport', title: copy.passportLabel, onClick: () => choose({ kind: 'passport' }) },
30
+ ] })] }), _jsxs("section", { className: "digital-id-providers-section", children: [_jsx("p", { className: "digital-id-providers-section__label", children: copy.providersSectionLabel }), _jsx(PrizmaCardListVerificationOptions, { items: providers.map(provider => ({
31
+ icon: 'digital-id-web',
32
+ logo: provider.logo,
33
+ title: provider.label,
34
+ onClick: () => choose({ kind: 'provider', providerId: provider.id }),
35
+ })) })] })] }) }));
36
+ });
37
+ DigitalIdProvidersDocumentSelectionScreen.displayName = 'DigitalIdProvidersDocumentSelectionScreen';
38
+ export default DigitalIdProvidersDocumentSelectionScreen;
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ import { type PrizmaResultScreenProps } from './ResultScreen';
3
+ import type { PrizmaScreenActionHandler, PrizmaScreenOverrides } from './types';
4
+ import type { DigitalIdProvidersErrorState, DigitalIdProvidersStrings } from './DigitalIdProvidersStrings';
5
+ import './ScreenLayout.css';
6
+ export interface DigitalIdProvidersErrorScreenProps extends Omit<PrizmaResultScreenProps, 'status' | 'title' | 'subtitle' | 'children' | 'ctaLabel' | 'secondaryCtaLabel' | 'verifiedLabel' | 'navLabel'> {
7
+ /** Module copy — this screen reads the `errors` slice for its `state`, and
8
+ * `acceptedDocuments` on the two document states. */
9
+ strings: DigitalIdProvidersStrings;
10
+ state: DigitalIdProvidersErrorState;
11
+ screenId?: string;
12
+ overrides?: PrizmaScreenOverrides;
13
+ onAction?: PrizmaScreenActionHandler;
14
+ }
15
+ /**
16
+ * Digital ID Providers — the five failures of a provider run, on the
17
+ * `PrizmaResultScreen` archetype (GUIDELINES.md §6-F). Figma: `Errors`
18
+ * (27707:9338).
19
+ *
20
+ * unavailable the provider could not be reached — Scan ID instead
21
+ * consent-denied the person did not grant sharing at the provider
22
+ * timed-out the provider session did not finish in time
23
+ * not-accepted the ID behind the provider is not one the flow accepts
24
+ * expired the ID behind the provider has expired
25
+ *
26
+ * Every state has two buttons, the second "Choose another method" (#DIP-4).
27
+ * The two document states carry Core's `PrizmaCardDocumentList` in the
28
+ * archetype's `children` slot, the same recipe ID Capture's document error
29
+ * uses. The first three keep the footer tag as drawn; the two document states
30
+ * drop it, as drawn.
31
+ */
32
+ export declare const DigitalIdProvidersErrorScreen: React.ForwardRefExoticComponent<DigitalIdProvidersErrorScreenProps & React.RefAttributes<HTMLDivElement>>;
33
+ export default DigitalIdProvidersErrorScreen;
@@ -0,0 +1,33 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { forwardRef } from 'react';
4
+ import { PrizmaCardDocumentList } from '@incodetech/prizma-core-web/card';
5
+ import { PrizmaResultScreen } from './ResultScreen';
6
+ import './ScreenLayout.css';
7
+ /** The two states that list the documents accepted instead. */
8
+ const LISTS_DOCUMENTS = new Set(['not-accepted', 'expired']);
9
+ /**
10
+ * Digital ID Providers — the five failures of a provider run, on the
11
+ * `PrizmaResultScreen` archetype (GUIDELINES.md §6-F). Figma: `Errors`
12
+ * (27707:9338).
13
+ *
14
+ * unavailable the provider could not be reached — Scan ID instead
15
+ * consent-denied the person did not grant sharing at the provider
16
+ * timed-out the provider session did not finish in time
17
+ * not-accepted the ID behind the provider is not one the flow accepts
18
+ * expired the ID behind the provider has expired
19
+ *
20
+ * Every state has two buttons, the second "Choose another method" (#DIP-4).
21
+ * The two document states carry Core's `PrizmaCardDocumentList` in the
22
+ * archetype's `children` slot, the same recipe ID Capture's document error
23
+ * uses. The first three keep the footer tag as drawn; the two document states
24
+ * drop it, as drawn.
25
+ */
26
+ export const DigitalIdProvidersErrorScreen = forwardRef(({ strings, state, screenId = `digital-id-providers-error-${state}`, showHeader = false, showFooter, overrides, onAction, ...shell }, ref) => {
27
+ const copy = strings.errors[state];
28
+ const listsDocuments = LISTS_DOCUMENTS.has(state);
29
+ const docs = strings.acceptedDocuments;
30
+ return (_jsx(PrizmaResultScreen, { ref: ref, status: "error", title: copy.title, subtitle: copy.subtitle, ctaLabel: copy.ctaLabel, secondaryCtaLabel: copy.secondaryCtaLabel, verifiedLabel: strings.verifiedLabel, navLabel: strings.navLabel, showHeader: showHeader, showFooter: showFooter ?? !listsDocuments, screenId: screenId, overrides: overrides, onAction: onAction, ...shell, children: listsDocuments ? (_jsx(PrizmaCardDocumentList, { state: "default", countryCode: docs.countryCode, flag: docs.flag, country: docs.country, documents: docs.documents })) : null }));
31
+ });
32
+ DigitalIdProvidersErrorScreen.displayName = 'DigitalIdProvidersErrorScreen';
33
+ 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,23 @@
1
+ import React from 'react';
2
+ import { type PrizmaProcessingScreenProps } from './ProcessingScreen';
3
+ import type { PrizmaScreenActionHandler, PrizmaScreenOverrides } from './types';
4
+ import type { DigitalIdProvidersStrings } from './DigitalIdProvidersStrings';
5
+ import './ScreenLayout.css';
6
+ export interface DigitalIdProvidersRedirectScreenProps extends Omit<PrizmaProcessingScreenProps, 'status' | 'title' | 'subtitle' | 'verifiedLabel' | 'navLabel'> {
7
+ /** Module copy — this screen reads the `redirecting` slice. */
8
+ strings: DigitalIdProvidersStrings;
9
+ screenId?: string;
10
+ overrides?: PrizmaScreenOverrides;
11
+ onAction?: PrizmaScreenActionHandler;
12
+ }
13
+ /**
14
+ * Digital ID Providers — "Redirecting for verification…", the wait before the
15
+ * browser leaves for the provider's site, on the `PrizmaProcessingScreen`
16
+ * archetype (GUIDELINES.md §6-C). Figma: the `1-18-1-id-hold-on` instance in
17
+ * the web full flow (27707:9281), with the module's own copy. The Web SDK's
18
+ * `digitalIdRedirect` phases `loading` and `redirecting` both look like this.
19
+ * Built like Core's other processing screens: the archetype as-is, with the
20
+ * logo nav and the footer tag (DEVIATIONS #DIP-9).
21
+ */
22
+ export declare const DigitalIdProvidersRedirectScreen: React.ForwardRefExoticComponent<DigitalIdProvidersRedirectScreenProps & React.RefAttributes<HTMLDivElement>>;
23
+ export default DigitalIdProvidersRedirectScreen;
@@ -0,0 +1,17 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { forwardRef } from 'react';
4
+ import { PrizmaProcessingScreen } from './ProcessingScreen';
5
+ import './ScreenLayout.css';
6
+ /**
7
+ * Digital ID Providers — "Redirecting for verification…", the wait before the
8
+ * browser leaves for the provider's site, on the `PrizmaProcessingScreen`
9
+ * archetype (GUIDELINES.md §6-C). Figma: the `1-18-1-id-hold-on` instance in
10
+ * the web full flow (27707:9281), with the module's own copy. The Web SDK's
11
+ * `digitalIdRedirect` phases `loading` and `redirecting` both look like this.
12
+ * Built like Core's other processing screens: the archetype as-is, with the
13
+ * logo nav and the footer tag (DEVIATIONS #DIP-9).
14
+ */
15
+ export const DigitalIdProvidersRedirectScreen = forwardRef(({ strings, screenId = 'digital-id-providers-redirecting', overrides, onAction, ...shell }, ref) => (_jsx(PrizmaProcessingScreen, { ref: ref, status: "loading", title: strings.redirecting.title, subtitle: strings.redirecting.subtitle, verifiedLabel: strings.verifiedLabel, navLabel: strings.navLabel, screenId: screenId, overrides: overrides, onAction: onAction, ...shell })));
16
+ DigitalIdProvidersRedirectScreen.displayName = 'DigitalIdProvidersRedirectScreen';
17
+ export default DigitalIdProvidersRedirectScreen;
@@ -0,0 +1,76 @@
1
+ /** The five ways a provider run can fail (`27707:9338`). */
2
+ export type DigitalIdProvidersErrorState = 'unavailable' | 'consent-denied' | 'timed-out' | 'not-accepted' | 'expired';
3
+ /** One provider row on the chooser. `id` is what `onOptionSelect` reports. */
4
+ export interface DigitalIdProvidersOption {
5
+ id: string;
6
+ /** "iDIN", "itsme", "CA DMV Wallet"… */
7
+ label: string;
8
+ /** The provider's logo tile (an image URL), from the backend catalog.
9
+ * Absent → Core's generic `digital-id-web` card icon. Samples ship under
10
+ * `samples/digital-id-providers/`. */
11
+ logo?: string;
12
+ }
13
+ /** What the person picked: a physical document, or a provider by its id. */
14
+ export type DigitalIdProvidersSelection = {
15
+ kind: 'id';
16
+ } | {
17
+ kind: 'passport';
18
+ } | {
19
+ kind: 'provider';
20
+ providerId: string;
21
+ };
22
+ export interface DigitalIdProvidersStrings {
23
+ /** Accessible name for the logo nav region (i18n — no baked-in English). */
24
+ navLabel?: string;
25
+ /** "verified by" attribution copy for the footer tag. */
26
+ verifiedLabel: string;
27
+ /** `Document Chooser` (27753:8099). */
28
+ documentSelection: {
29
+ /** "Select how to verify" — the module's one chooser title (owner call,
30
+ * 2026-10-28; the frame says "Verify your identity"). */
31
+ title: string;
32
+ /** "Viewing options for" — before the country. */
33
+ countryLabel: string;
34
+ /** ISO code of the country the options are for, e.g. "US" (the flag). */
35
+ countryCode: string;
36
+ /** The country as shown, e.g. "US". */
37
+ countryName: string;
38
+ /** "Use your ID" */
39
+ idSectionLabel: string;
40
+ /** "Identity Card" */
41
+ idLabel: string;
42
+ /** "Passport" */
43
+ passportLabel: string;
44
+ /** "Digital ID verification" */
45
+ providersSectionLabel: string;
46
+ /** The providers the flow offers, in order. */
47
+ providers: DigitalIdProvidersOption[];
48
+ };
49
+ /** `Redirecting` (1-18-1-id-hold-on, 27707:9281). */
50
+ redirecting: {
51
+ /** "Redirecting for verification…" */
52
+ title: string;
53
+ /** "You'll be redirected to complete verification" */
54
+ subtitle?: string;
55
+ };
56
+ /** `Errors` (27707:9338), one slice per state. */
57
+ errors: Record<DigitalIdProvidersErrorState, {
58
+ title: string;
59
+ subtitle?: string;
60
+ /** "Try again", or "Scan ID" when the provider is unavailable. */
61
+ ctaLabel: string;
62
+ /** "Choose another method" — one wording on every error (owner call,
63
+ * 2026-10-28; the frame says "Change verification method" on two). */
64
+ secondaryCtaLabel: string;
65
+ }>;
66
+ /** The accepted-documents card on `not-accepted` and `expired`. */
67
+ acceptedDocuments: {
68
+ /** ISO code for the flag, e.g. "IN". */
69
+ countryCode: string;
70
+ /** "India" */
71
+ country: string;
72
+ /** Emoji fallback when the flag is outside Core's raster bank. */
73
+ flag?: string;
74
+ documents: string[];
75
+ };
76
+ }
@@ -0,0 +1,15 @@
1
+ // Digital ID Providers — copy contract.
2
+ //
3
+ // Every Digital ID Providers screen receives the SAME `strings:
4
+ // DigitalIdProvidersStrings` object (rule: all copy via props, no hardcoded
5
+ // English — GUIDELINES.md §9).
6
+ //
7
+ // Authoritative screens: `Digital ID Providers - Latest Designs` Figma file
8
+ // (q0wiyQkLXxGQ2jkPEutxR8) — the chooser `Document Chooser` (27753:8099) and its
9
+ // full provider list (27703:4895), and the section `🪪 Digital ID Verification
10
+ // Flow - 🌐 Web - Full flow` (27707:9237): Redirecting, the provider's own pages
11
+ // (OS chrome, not built), success and five errors. Web only: the providers
12
+ // redirect out of the browser to the provider's site and back (Web SDK,
13
+ // `digitalIdRedirect`). These screens sit in the Digital IDs module beside the
14
+ // device wallets (`DigitalIdDeviceWallets*`), and share its success screen.
15
+ export {};