@incodetech/prizma-core-screens 0.1.2 → 0.2.3
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/DemoScreensConfigScreen.d.ts +36 -0
- package/dist/DemoScreensConfigScreen.js +30 -0
- package/dist/DemoScreensConfigSheetScreen.d.ts +39 -0
- package/dist/DemoScreensConfigSheetScreen.js +33 -0
- package/dist/DemoScreensEditSheetScreen.d.ts +30 -0
- package/dist/DemoScreensEditSheetScreen.js +28 -0
- package/dist/DemoScreensEndScreen.d.ts +9 -21
- package/dist/DemoScreensEndScreen.js +9 -14
- package/dist/DemoScreensLaunchScreen.d.ts +28 -0
- package/dist/DemoScreensLaunchScreen.js +26 -0
- package/dist/DemoScreensLayout.css +542 -0
- package/dist/DemoScreensRedirectScreen.d.ts +50 -0
- package/dist/DemoScreensRedirectScreen.js +38 -0
- package/dist/DemoScreensResultScreen.d.ts +52 -0
- package/dist/DemoScreensResultScreen.js +46 -0
- package/dist/DemoScreensRunningScreen.d.ts +22 -0
- package/dist/DemoScreensRunningScreen.js +16 -0
- package/dist/DemoScreensSettingsScreen.d.ts +37 -0
- package/dist/DemoScreensSettingsScreen.js +40 -0
- package/dist/DemoScreensSplashScreen.d.ts +27 -0
- package/dist/DemoScreensSplashScreen.js +25 -0
- package/dist/DemoScreensStartScreen.d.ts +38 -0
- package/dist/DemoScreensStartScreen.js +37 -0
- package/dist/DemoScreensStrings.d.ts +192 -0
- package/dist/DemoScreensStrings.js +11 -11
- package/dist/DemoScreensTermsScreen.d.ts +28 -0
- package/dist/DemoScreensTermsScreen.js +26 -0
- package/dist/EkybAddressDetailsScreen.js +9 -5
- package/dist/EkybBusinessDetailsScreen.js +6 -3
- package/dist/EkybOwnersScreen.d.ts +4 -0
- package/dist/EkybOwnersScreen.js +13 -5
- package/dist/EkybStrings.d.ts +12 -1
- package/dist/EkycCountryCatalog.d.ts +46 -0
- package/dist/EkycCountryCatalog.js +139 -0
- package/dist/EkycCountryFormScreen.d.ts +36 -0
- package/dist/EkycCountryFormScreen.js +94 -0
- package/dist/EkycDetailsScreen.js +11 -4
- package/dist/EkycLayout.css +23 -0
- package/dist/EkycLicenseScreen.js +7 -3
- package/dist/EkycStrings.d.ts +26 -0
- package/dist/EmailInputStrings.d.ts +11 -1
- package/dist/FaceMatchComparisonScreen.d.ts +4 -2
- package/dist/FaceMatchComparisonScreen.js +3 -1
- package/dist/FaceMatchLayout.css +53 -3
- package/dist/FormScreen.css +74 -0
- package/dist/FormScreen.d.ts +17 -0
- package/dist/FormScreen.js +12 -1
- package/dist/PhoneInputStrings.d.ts +10 -1
- package/dist/index.d.ts +15 -2
- package/dist/index.js +13 -0
- package/dist/styles.css +1 -0
- package/package.json +62 -1
- package/src/DemoScreensConfigScreen.tsx +101 -0
- package/src/DemoScreensConfigSheetScreen.tsx +120 -0
- package/src/DemoScreensEditSheetScreen.tsx +103 -0
- package/src/DemoScreensEndScreen.tsx +14 -38
- package/src/DemoScreensLaunchScreen.tsx +96 -0
- package/src/DemoScreensLayout.css +542 -0
- package/src/DemoScreensRedirectScreen.tsx +190 -0
- package/src/DemoScreensResultScreen.tsx +115 -0
- package/src/DemoScreensRunningScreen.tsx +45 -0
- package/src/DemoScreensSettingsScreen.tsx +101 -0
- package/src/DemoScreensSplashScreen.tsx +47 -0
- package/src/DemoScreensStartScreen.tsx +105 -0
- package/src/DemoScreensStrings.ts +204 -11
- package/src/DemoScreensTermsScreen.tsx +82 -0
- package/src/EkybAddressDetailsScreen.tsx +7 -1
- package/src/EkybBusinessDetailsScreen.tsx +6 -1
- package/src/EkybOwnersScreen.tsx +46 -2
- package/src/EkybStrings.ts +12 -0
- package/src/EkycCountryCatalog.ts +199 -0
- package/src/EkycCountryFormScreen.tsx +184 -0
- package/src/EkycDetailsScreen.tsx +29 -20
- package/src/EkycLayout.css +23 -0
- package/src/EkycLicenseScreen.tsx +22 -16
- package/src/EkycStrings.ts +25 -0
- package/src/EmailInputStrings.ts +11 -1
- package/src/FaceMatchComparisonScreen.tsx +11 -3
- package/src/FaceMatchLayout.css +53 -3
- package/src/FormScreen.css +74 -0
- package/src/FormScreen.tsx +27 -1
- package/src/PhoneInputStrings.ts +10 -1
- package/src/index.ts +65 -1
- package/src/styles.css +1 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
import { PrizmaButton } from '@incodetech/prizma-core-web/button';
|
|
3
|
+
import { PrizmaTitle } from '@incodetech/prizma-core-web/title';
|
|
4
|
+
import { PrizmaNavigation } from '@incodetech/prizma-core-web/navigation';
|
|
5
|
+
import { PrizmaTextField } from '@incodetech/prizma-core-web/text-field';
|
|
6
|
+
import { PrizmaDropdown } from '@incodetech/prizma-core-web/dropdown';
|
|
7
|
+
import { PrizmaScreenShell, type PrizmaScreenShellProps } from './ScreenShell';
|
|
8
|
+
import type { PrizmaScreenActionHandler } from './types';
|
|
9
|
+
import type { DemoScreensStrings } from './DemoScreensStrings';
|
|
10
|
+
import { DemoScreensSheet } from './DemoScreensConfigSheetScreen';
|
|
11
|
+
import './ScreenLayout.css';
|
|
12
|
+
import './DemoScreensLayout.css';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The five states of the `Edit Client ID or Environment` row (2118:21000 …):
|
|
16
|
+
* - `default` nothing changed yet, Update disabled
|
|
17
|
+
* - `environmentOpen` the environment menu open
|
|
18
|
+
* - `filled` a new environment chosen, Update live
|
|
19
|
+
* - `loading` Update pressed, the backend checking
|
|
20
|
+
* - `error` "Wrong Client ID"
|
|
21
|
+
*/
|
|
22
|
+
export type DemoScreensEditSheetState = 'default' | 'environmentOpen' | 'filled' | 'loading' | 'error';
|
|
23
|
+
|
|
24
|
+
export interface DemoScreensEditSheetScreenProps
|
|
25
|
+
extends Omit<PrizmaScreenShellProps, 'dark' | 'title' | 'children'> {
|
|
26
|
+
/** Family copy — this screen reads the `editSheet` slice. */
|
|
27
|
+
strings: DemoScreensStrings;
|
|
28
|
+
state?: DemoScreensEditSheetState;
|
|
29
|
+
screenId?: string;
|
|
30
|
+
onAction?: PrizmaScreenActionHandler;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Demo screens · NATIVE — the second sheet, reached from the first's link:
|
|
35
|
+
* change the Client ID or the environment, and let the backend check the pair.
|
|
36
|
+
* Navigation with back AND close, a left Title with subtitle, a TextField, a
|
|
37
|
+
* Dropdown, the Update CTA and the build caption.
|
|
38
|
+
*/
|
|
39
|
+
export const DemoScreensEditSheetScreen = forwardRef<HTMLDivElement, DemoScreensEditSheetScreenProps>(
|
|
40
|
+
(
|
|
41
|
+
{ strings, state = 'default', screenId = `demo-screens-edit-sheet-${state}`, onAction, ...shell },
|
|
42
|
+
ref,
|
|
43
|
+
) => {
|
|
44
|
+
const e = strings.editSheet;
|
|
45
|
+
const changed = state === 'filled' || state === 'loading' || state === 'error';
|
|
46
|
+
const options = e.environments.some(o => o.value === e.environmentValue)
|
|
47
|
+
? e.environments
|
|
48
|
+
: [{ value: e.environmentValue, label: e.environmentValue }, ...e.environments];
|
|
49
|
+
return (
|
|
50
|
+
<PrizmaScreenShell ref={ref} data-screen-id={screenId} {...shell}>
|
|
51
|
+
<DemoScreensSheet ariaLabel={e.title}>
|
|
52
|
+
<div className="demo-screens-sheet__nav">
|
|
53
|
+
<PrizmaNavigation
|
|
54
|
+
showIncodeLogo={false}
|
|
55
|
+
showLeftIcon
|
|
56
|
+
backLabel={e.backLabel}
|
|
57
|
+
onLeftIconClick={() => onAction?.({ type: 'secondary', screenId })}
|
|
58
|
+
showRightIcon
|
|
59
|
+
closeLabel={e.closeLabel}
|
|
60
|
+
onRightIconClick={() => onAction?.({ type: 'help', screenId })}
|
|
61
|
+
aria-label={e.title}
|
|
62
|
+
/>
|
|
63
|
+
</div>
|
|
64
|
+
<div className="demo-screens-sheet__title">
|
|
65
|
+
<PrizmaTitle variant="left" title={e.title} showSubtitle subtitle={e.subtitle} />
|
|
66
|
+
</div>
|
|
67
|
+
<div className="demo-screens-sheet__fields">
|
|
68
|
+
<PrizmaTextField
|
|
69
|
+
key={state}
|
|
70
|
+
label={e.clientIdLabel}
|
|
71
|
+
defaultValue={e.clientIdValue}
|
|
72
|
+
error={state === 'error'}
|
|
73
|
+
errorText={state === 'error' ? e.clientIdError : undefined}
|
|
74
|
+
showRequiredMarker={false}
|
|
75
|
+
/>
|
|
76
|
+
<PrizmaDropdown
|
|
77
|
+
label={e.environmentLabel}
|
|
78
|
+
options={options}
|
|
79
|
+
value={changed ? e.environmentSelected : e.environmentValue}
|
|
80
|
+
showRequiredMarker={false}
|
|
81
|
+
forceOpen={state === 'environmentOpen'}
|
|
82
|
+
/>
|
|
83
|
+
</div>
|
|
84
|
+
<div className="demo-screens-sheet__band">
|
|
85
|
+
<PrizmaButton
|
|
86
|
+
variant="primary"
|
|
87
|
+
size="L"
|
|
88
|
+
disabled={!changed || state === 'error'}
|
|
89
|
+
loading={state === 'loading'}
|
|
90
|
+
onClick={() => onAction?.({ type: 'cta', screenId })}
|
|
91
|
+
>
|
|
92
|
+
{e.ctaLabel}
|
|
93
|
+
</PrizmaButton>
|
|
94
|
+
<p className="demo-screens-build">{e.buildLabel}</p>
|
|
95
|
+
</div>
|
|
96
|
+
</DemoScreensSheet>
|
|
97
|
+
</PrizmaScreenShell>
|
|
98
|
+
);
|
|
99
|
+
},
|
|
100
|
+
);
|
|
101
|
+
DemoScreensEditSheetScreen.displayName = 'DemoScreensEditSheetScreen';
|
|
102
|
+
|
|
103
|
+
export default DemoScreensEditSheetScreen;
|
|
@@ -1,54 +1,30 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import {
|
|
3
|
+
DemoScreensResultScreen,
|
|
4
|
+
type DemoScreensResultScreenProps,
|
|
5
|
+
} from './DemoScreensResultScreen';
|
|
5
6
|
import './ScreenLayout.css';
|
|
6
7
|
|
|
7
8
|
export interface DemoScreensEndScreenProps
|
|
8
|
-
extends Omit<
|
|
9
|
-
PrizmaResultScreenProps,
|
|
10
|
-
'status' | 'title' | 'subtitle' | 'glyph' | 'verifiedLabel' | 'navLabel'
|
|
11
|
-
> {
|
|
12
|
-
/** Family copy — this screen reads the `end` slice. */
|
|
13
|
-
strings: DemoScreensStrings;
|
|
14
|
-
screenId?: string;
|
|
15
|
-
overrides?: PrizmaScreenOverrides;
|
|
16
|
-
onAction?: PrizmaScreenActionHandler;
|
|
17
|
-
}
|
|
9
|
+
extends Omit<DemoScreensResultScreenProps, 'status'> {}
|
|
18
10
|
|
|
19
11
|
/**
|
|
20
|
-
* Demo screens — "Verification complete!",
|
|
21
|
-
*
|
|
12
|
+
* Demo screens — "Verification complete!", `Module Generic Screens` frame
|
|
13
|
+
* `63:399`: the demo is over and the result is with a human.
|
|
22
14
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* Result rather than Processing, even though the skeleton is Processing's:
|
|
28
|
-
* archetype C's status vocabulary is `loading | success | error | warning`, so
|
|
29
|
-
* a MARK-FREE centred title is not expressible there. `status="none"` is
|
|
30
|
-
* archetype F's, and with no CTA the band never renders — F degenerates to
|
|
31
|
-
* exactly C's shape and keeps the mark off.
|
|
15
|
+
* Since 2026-09-24 this is the `inReview` case of `DemoScreensResultScreen`,
|
|
16
|
+
* kept under its original name so the hub entry `demo-screens-end` and the
|
|
17
|
+
* iPhone Duo exploration that renders it by id keep resolving. New consumers
|
|
18
|
+
* should reach for the result screen and pass the session status.
|
|
32
19
|
*
|
|
33
20
|
* Figma draws no status mark above the title, deliberately: the demo did not
|
|
34
21
|
* verify anything, it finished. A success tick here would claim a verdict the
|
|
35
22
|
* session never reached — the copy already says the result is still under
|
|
36
|
-
* review.
|
|
23
|
+
* review. No CTA, because the demo has nowhere left to go.
|
|
37
24
|
*/
|
|
38
25
|
export const DemoScreensEndScreen = forwardRef<HTMLDivElement, DemoScreensEndScreenProps>(
|
|
39
|
-
({
|
|
40
|
-
<
|
|
41
|
-
ref={ref}
|
|
42
|
-
status="none"
|
|
43
|
-
title={strings.end.title}
|
|
44
|
-
subtitle={strings.end.subtitle}
|
|
45
|
-
verifiedLabel={strings.verifiedLabel}
|
|
46
|
-
navLabel={strings.navLabel}
|
|
47
|
-
screenId={screenId}
|
|
48
|
-
overrides={overrides}
|
|
49
|
-
onAction={onAction}
|
|
50
|
-
{...shell}
|
|
51
|
-
/>
|
|
26
|
+
({ screenId = 'demo-screens-end', ...rest }, ref) => (
|
|
27
|
+
<DemoScreensResultScreen ref={ref} status="inReview" screenId={screenId} {...rest} />
|
|
52
28
|
),
|
|
53
29
|
);
|
|
54
30
|
DemoScreensEndScreen.displayName = 'DemoScreensEndScreen';
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
import { PrizmaButton } from '@incodetech/prizma-core-web/button';
|
|
3
|
+
import { PrizmaLogo } from '@incodetech/prizma-core-web/logo';
|
|
4
|
+
import { PrizmaSnackbar } from '@incodetech/prizma-core-web/snackbar';
|
|
5
|
+
import { PrizmaScreenShell, type PrizmaScreenShellProps } from './ScreenShell';
|
|
6
|
+
import type { PrizmaScreenActionHandler } from './types';
|
|
7
|
+
import type { DemoScreensStrings } from './DemoScreensStrings';
|
|
8
|
+
import { MenuDotsGlyph } from './DemoScreensStartScreen';
|
|
9
|
+
import './ScreenLayout.css';
|
|
10
|
+
import './DemoScreensLayout.css';
|
|
11
|
+
|
|
12
|
+
export interface DemoScreensLaunchScreenProps
|
|
13
|
+
extends Omit<PrizmaScreenShellProps, 'dark' | 'title' | 'children'> {
|
|
14
|
+
/** Family copy — this screen reads `appName` and `launch`. */
|
|
15
|
+
strings: DemoScreensStrings;
|
|
16
|
+
/** The CTA is pressed and the session is being created (`Loading`). */
|
|
17
|
+
loading?: boolean;
|
|
18
|
+
/** The configuration sheet just saved: "Flow saved" over the header. */
|
|
19
|
+
saved?: boolean;
|
|
20
|
+
screenId?: string;
|
|
21
|
+
onAction?: PrizmaScreenActionHandler;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Demo screens · NATIVE — `Launch screen` (2010:5024), `Loading` (2082:8004)
|
|
26
|
+
* and the "Flow saved" return (2118:21170): the app is configured. Header row
|
|
27
|
+
* with the flow's name on the left and the menu on the right, the wordmark in
|
|
28
|
+
* the middle, one CTA, and the environment named under it.
|
|
29
|
+
*
|
|
30
|
+
* The web Start screen's twin: same header row, same wordmark block, same
|
|
31
|
+
* bare CTA band; only the header's left slot and the caption differ.
|
|
32
|
+
* `onAction`: `cta` for Start, `help` for the menu (it opens the sheet).
|
|
33
|
+
*/
|
|
34
|
+
export const DemoScreensLaunchScreen = forwardRef<HTMLDivElement, DemoScreensLaunchScreenProps>(
|
|
35
|
+
(
|
|
36
|
+
{
|
|
37
|
+
strings,
|
|
38
|
+
loading = false,
|
|
39
|
+
saved = false,
|
|
40
|
+
screenId = loading ? 'demo-screens-launch-loading' : saved ? 'demo-screens-launch-saved' : 'demo-screens-launch',
|
|
41
|
+
onAction,
|
|
42
|
+
...shell
|
|
43
|
+
},
|
|
44
|
+
ref,
|
|
45
|
+
) => {
|
|
46
|
+
const l = strings.launch;
|
|
47
|
+
return (
|
|
48
|
+
<PrizmaScreenShell ref={ref} data-screen-id={screenId} {...shell}>
|
|
49
|
+
{saved ? (
|
|
50
|
+
<div className="demo-screens-toast">
|
|
51
|
+
<PrizmaSnackbar state="success" contentResizing="fill">
|
|
52
|
+
{l.savedSnackbar}
|
|
53
|
+
</PrizmaSnackbar>
|
|
54
|
+
</div>
|
|
55
|
+
) : null}
|
|
56
|
+
<header className="demo-screens-start__header" aria-label={strings.navLabel}>
|
|
57
|
+
<span className="demo-screens-start__flow">{l.flowLabel}</span>
|
|
58
|
+
<button
|
|
59
|
+
type="button"
|
|
60
|
+
className="prizma-nav__icon demo-screens-start__menu"
|
|
61
|
+
aria-label={l.menuLabel}
|
|
62
|
+
onClick={() => onAction?.({ type: 'help', screenId })}
|
|
63
|
+
>
|
|
64
|
+
<MenuDotsGlyph />
|
|
65
|
+
</button>
|
|
66
|
+
</header>
|
|
67
|
+
<div className="prizma-screen-layout__content">
|
|
68
|
+
<div className="demo-screens-start__middle">
|
|
69
|
+
<div className="demo-screens-wordmark">
|
|
70
|
+
<PrizmaLogo variant="incode" />
|
|
71
|
+
<p className="demo-screens-wordmark__caption">{strings.appName}</p>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
<div className="prizma-screen-layout__band prizma-screen-layout__band--bare demo-screens-band">
|
|
76
|
+
<div className="prizma-screen-layout__band__ctas">
|
|
77
|
+
<PrizmaButton
|
|
78
|
+
variant="primary"
|
|
79
|
+
size="L"
|
|
80
|
+
loading={loading}
|
|
81
|
+
onClick={() => onAction?.({ type: 'cta', screenId })}
|
|
82
|
+
>
|
|
83
|
+
{l.ctaLabel}
|
|
84
|
+
</PrizmaButton>
|
|
85
|
+
</div>
|
|
86
|
+
<p className="demo-screens-launch__env">
|
|
87
|
+
{l.environmentCaption} <b>{l.environmentValue}</b>
|
|
88
|
+
</p>
|
|
89
|
+
</div>
|
|
90
|
+
</PrizmaScreenShell>
|
|
91
|
+
);
|
|
92
|
+
},
|
|
93
|
+
);
|
|
94
|
+
DemoScreensLaunchScreen.displayName = 'DemoScreensLaunchScreen';
|
|
95
|
+
|
|
96
|
+
export default DemoScreensLaunchScreen;
|