@incodetech/web 0.0.0-dev-20260313-486e658 → 0.0.0-dev-20260313-bc2dab4
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/{AsYouType-BtKe6-rC.js → AsYouType-CpH-Rmtj.js} +1 -1
- package/dist/{Trans-C2X8WLEu.js → Trans-CA9a3vKp.js} +1 -1
- package/dist/authentication/authentication.es.js +25 -20
- package/dist/base.css +9 -4
- package/dist/{browser-ponyfill-CLXJUgvu.js → browser-ponyfill-B6W6hHVY.js} +49 -46
- package/dist/{incodeModule-DLGHhn9E.js → button-Ca1tRSTI.js} +153 -239
- package/dist/{captureFooter-C2Yrou50.js → captureFooter-X2qN1773.js} +72 -70
- package/dist/{chevronDown-D5uHEaU-.js → chevronDown-BUaOuf9J.js} +1 -1
- package/dist/{closeIcon-BMPoRQCd.js → closeIcon-BM7WLbKp.js} +1 -1
- package/dist/{countries-3p5tkqcx.js → countries-C9bhJe4u.js} +3 -3
- package/dist/curp-validation/curp-validation.es.js +26 -25
- package/dist/{dateInputComposed-CqHIiKPV.js → dateInputComposed-CvFmQpJ0.js} +11 -10
- package/dist/document-capture/styles.css +1 -0
- package/dist/{documentCapture-CzGmGxzA.js → documentCapture-PdKA2frR.js} +113 -157
- package/dist/{dropdownComposed-BgGKKaXv.js → dropdownComposed-DBm7cotT.js} +8 -6
- package/dist/{ekybModule-Bttpjr3j.js → ekybModule-DiFpO2sE.js} +16 -14
- package/dist/ekycModule-DdD1iChB.js +370 -0
- package/dist/email/email.es.js +86 -63
- package/dist/{errorContent-6xl4ArMV.js → errorContent-yUAdbZ5o.js} +5 -5
- package/dist/{errorIcon-Cxcv4ISP.js → errorIcon-BL647nVh.js} +1 -1
- package/dist/extensibility.es.js +290 -0
- package/dist/face-match/styles.css +8 -0
- package/dist/{faceMatch-DKqzUCml.js → faceMatch-BjdNG_e0.js} +12 -11
- package/dist/fileIcon-DOyMcRWU.js +52 -0
- package/dist/flipAnimation-DoMQoFPb.js +1355 -0
- package/dist/flow/flow.es.js +157 -157
- package/dist/flow/styles.css +15 -3
- package/dist/formField-C91ckby4.js +94 -0
- package/dist/geolocation/geolocation.es.js +15 -14
- package/dist/governmentValidation/governmentValidation.es.js +19 -18
- package/dist/id/id.es.js +30 -1354
- package/dist/id/styles.css +2 -0
- package/dist/incodeModule-aE-LkKwM.js +96 -0
- package/dist/index.es.js +7 -7
- package/dist/{otpInput-BT0ZXrAt.js → otpInput-cazUY73p.js} +1 -1
- package/dist/{page-BJDfLRpO.js → page-BVHG3h0V.js} +1 -1
- package/dist/permissions-DwF2Ez1N.js +754 -0
- package/dist/phone/phone.es.js +53 -30
- package/dist/{phoneInput-d3sq4X5R.js → phoneInput-Duuochsh.js} +4 -4
- package/dist/phoneInputComposed-B1gXoSzr.js +107 -0
- package/dist/{processing-CGb_3dSE.js → processing-CDgOueI3.js} +3 -3
- package/dist/selfie/selfie.es.js +29 -18
- package/dist/selfie/styles.css +12 -3
- package/dist/{spinner--i134wYq.js → spinner-Cx3FPUCD.js} +13 -11
- package/dist/{successIcon-1BcPFhum.js → successIcon-BybULRRU.js} +1 -1
- package/dist/{tutorial-DXgOS41l.js → tutorial-Dagmccxh.js} +21 -21
- package/dist/types/authentication.d.ts +10 -3
- package/dist/types/curp-validation.d.ts +5 -1
- package/dist/types/email.d.ts +8 -3
- package/dist/types/extensibility.d.ts +671 -0
- package/dist/types/flow.d.ts +5 -1
- package/dist/types/geolocation.d.ts +5 -1
- package/dist/types/governmentValidation.d.ts +5 -1
- package/dist/types/id.d.ts +8 -3
- package/dist/types/phone.d.ts +8 -3
- package/dist/types/selfie.d.ts +8 -3
- package/dist/{uiConfig-DisZ_yFB.js → uiConfig-Z6RT23Sl.js} +3 -3
- package/dist/useFormScrollable-3O3GeT4m.js +15 -0
- package/dist/{warningIcon-WqI5X7cK.js → warningIcon-DyoKeqDd.js} +1 -1
- package/package.json +6 -2
- package/dist/_commonjsHelpers-DaMA6jEr.js +0 -8
- package/dist/baseTutorial-hbezn8sT.js +0 -755
- package/dist/ekycModule-DfwZMKdL.js +0 -467
- package/dist/verificationResult-CKZqPXb9.js +0 -106
|
@@ -0,0 +1,671 @@
|
|
|
1
|
+
import { ComponentChildren } from 'preact';
|
|
2
|
+
import { CountryCode } from 'libphonenumber-js';
|
|
3
|
+
import { CSSProperties } from 'preact';
|
|
4
|
+
import { FC } from 'preact/compat';
|
|
5
|
+
import { FunctionalComponent } from 'preact';
|
|
6
|
+
import { HTMLAttributes } from 'preact';
|
|
7
|
+
import { HTMLAttributes as HTMLAttributes_2 } from 'preact/compat';
|
|
8
|
+
import { i18n } from 'i18next';
|
|
9
|
+
import { IdCaptureManager } from '@incodetech/core/id';
|
|
10
|
+
import { IdCaptureState } from '@incodetech/core/id';
|
|
11
|
+
import { InputHTMLAttributes } from 'preact';
|
|
12
|
+
import { JSX } from 'preact';
|
|
13
|
+
import { PermissionStatus as PermissionStatus_2 } from '@incodetech/core';
|
|
14
|
+
import { PropsWithoutRef } from 'preact/compat';
|
|
15
|
+
import { Ref } from 'preact';
|
|
16
|
+
import { SelfieManager } from '@incodetech/core/selfie';
|
|
17
|
+
import { SelfieState } from '@incodetech/core/selfie';
|
|
18
|
+
import { TFunction } from 'i18next';
|
|
19
|
+
import { VNode } from 'preact';
|
|
20
|
+
|
|
21
|
+
export declare const BaseTutorial: ({ className, animationData, title, titleId, subtitle, onContinue, buttonText, disclaimerText, isLoading, }: BaseTutorialProps) => JSX.Element;
|
|
22
|
+
|
|
23
|
+
declare type BaseTutorialProps = {
|
|
24
|
+
className?: string;
|
|
25
|
+
animationData: LottieAnimationData;
|
|
26
|
+
title: string;
|
|
27
|
+
titleId?: string;
|
|
28
|
+
subtitle: string;
|
|
29
|
+
onContinue: () => void;
|
|
30
|
+
buttonText: string;
|
|
31
|
+
disclaimerText: string;
|
|
32
|
+
isLoading?: boolean;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export declare const Button: FunctionalComponent<PropsWithoutRef<ButtonProps> & {
|
|
36
|
+
ref?: Ref<HTMLButtonElement> | undefined;
|
|
37
|
+
}>;
|
|
38
|
+
|
|
39
|
+
declare type ButtonProps = Omit<HTMLAttributes<HTMLButtonElement>, 'class' | 'type' | 'icon'> & {
|
|
40
|
+
isLoading?: boolean;
|
|
41
|
+
children?: ComponentChildren;
|
|
42
|
+
class?: string;
|
|
43
|
+
type?: 'button' | 'submit' | 'reset';
|
|
44
|
+
variant?: 'primary' | 'secondary' | 'link';
|
|
45
|
+
size?: ButtonSize;
|
|
46
|
+
icon?: ComponentChildren;
|
|
47
|
+
disabled?: boolean;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
declare type ButtonSize = 'L' | 'M' | 'S';
|
|
51
|
+
|
|
52
|
+
export declare const CalendarIcon: FC<CalendarIconProps>;
|
|
53
|
+
|
|
54
|
+
declare type CalendarIconProps = {
|
|
55
|
+
class?: string;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export declare const CameraFrame: FunctionalComponent<PropsWithoutRef<CameraFrameProps> & {
|
|
59
|
+
ref?: Ref<HTMLDivElement> | undefined;
|
|
60
|
+
}>;
|
|
61
|
+
|
|
62
|
+
declare type CameraFrameProps = {
|
|
63
|
+
variant: CameraFrameVariant;
|
|
64
|
+
aspectRatio?: string;
|
|
65
|
+
orientation?: 'horizontal' | 'vertical';
|
|
66
|
+
frameState?: CameraFrameState;
|
|
67
|
+
className?: string;
|
|
68
|
+
children?: ComponentChildren;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
declare type CameraFrameState = 'idle' | 'capturing' | 'error' | 'focus' | 'success' | 'analyzing';
|
|
72
|
+
|
|
73
|
+
declare type CameraFrameVariant = 'fill' | 'locked';
|
|
74
|
+
|
|
75
|
+
export declare const CameraIcon: FC<CameraIconProps>;
|
|
76
|
+
|
|
77
|
+
declare type CameraIconProps = {
|
|
78
|
+
size?: number | string;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Absolute-positioned flex-column overlay that sits on top of the camera video.
|
|
83
|
+
*
|
|
84
|
+
* Expected child order:
|
|
85
|
+
* 1. (optional) Module-specific header extras (e.g. CaptureNotification)
|
|
86
|
+
* 2. CameraOverlayHeader
|
|
87
|
+
* 3. CameraFrame
|
|
88
|
+
* 4. CaptureFooter
|
|
89
|
+
*/
|
|
90
|
+
export declare const CameraOverlay: FC<CameraOverlayProps>;
|
|
91
|
+
|
|
92
|
+
export declare const CameraOverlayHeader: FC<CameraOverlayHeaderProps>;
|
|
93
|
+
|
|
94
|
+
declare type CameraOverlayHeaderProps = {
|
|
95
|
+
title: string;
|
|
96
|
+
subtitle?: string;
|
|
97
|
+
visible?: boolean;
|
|
98
|
+
className?: string;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
declare type CameraOverlayProps = {
|
|
102
|
+
children: ComponentChildren;
|
|
103
|
+
className?: string;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
export declare const CameraView: FC<CameraViewProps>;
|
|
107
|
+
|
|
108
|
+
declare type CameraViewProps = {
|
|
109
|
+
stream: MediaStream | undefined;
|
|
110
|
+
children: ComponentChildren;
|
|
111
|
+
videoRef?: Ref<HTMLVideoElement>;
|
|
112
|
+
className?: string;
|
|
113
|
+
'data-testid'?: string;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
export declare const CaptureButtonIcon: FC<CaptureButtonIconProps>;
|
|
117
|
+
|
|
118
|
+
declare type CaptureButtonIconProps = {
|
|
119
|
+
className?: string;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
export declare const CaptureFooter: FC<CaptureFooterProps>;
|
|
123
|
+
|
|
124
|
+
declare type CaptureFooterProps = {
|
|
125
|
+
onOpenHelp: () => void;
|
|
126
|
+
onCapture?: () => void;
|
|
127
|
+
isManualCapture?: boolean;
|
|
128
|
+
captureAriaLabel?: string;
|
|
129
|
+
helpAriaLabel?: string;
|
|
130
|
+
encryptionLabel?: string;
|
|
131
|
+
children?: ComponentChildren;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
declare type CaptureProps = {
|
|
135
|
+
manager: SelfieManager;
|
|
136
|
+
state: CaptureState;
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
declare type CaptureProps_2 = {
|
|
140
|
+
manager: IdCaptureManager;
|
|
141
|
+
state: Extract<IdCaptureState, {
|
|
142
|
+
status: 'capture';
|
|
143
|
+
}>;
|
|
144
|
+
onFinish?: () => void;
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
declare type CaptureState = Extract<SelfieState, {
|
|
148
|
+
status: 'capture';
|
|
149
|
+
}>;
|
|
150
|
+
|
|
151
|
+
export declare const Checkbox: FunctionalComponent<PropsWithoutRef<CheckboxProps> & {
|
|
152
|
+
ref?: Ref<HTMLInputElement> | undefined;
|
|
153
|
+
}>;
|
|
154
|
+
|
|
155
|
+
declare type CheckboxProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'id' | 'class' | 'type' | 'size'> & {
|
|
156
|
+
id: string;
|
|
157
|
+
label?: string | ComponentChildren;
|
|
158
|
+
size?: 's' | 'm';
|
|
159
|
+
error?: string;
|
|
160
|
+
helper?: string;
|
|
161
|
+
showErrorIcon?: boolean;
|
|
162
|
+
class?: string;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
export declare const CheckmarkIcon: FC<CheckmarkIconProps>;
|
|
166
|
+
|
|
167
|
+
declare type CheckmarkIconProps = {
|
|
168
|
+
size?: number | string;
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
export declare const ChevronDown: FC<ChevronDownProps>;
|
|
172
|
+
|
|
173
|
+
declare type ChevronDownProps = {
|
|
174
|
+
class?: string;
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
export declare const ChevronRightIcon: ({ size, class: className, }: ChevronRightIconProps) => JSX.Element;
|
|
178
|
+
|
|
179
|
+
declare type ChevronRightIconProps = {
|
|
180
|
+
size?: number;
|
|
181
|
+
class?: string;
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
declare type ChooserProps = {
|
|
185
|
+
manager: IdCaptureManager;
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
declare type CloseButtonOptions = {
|
|
189
|
+
show?: boolean;
|
|
190
|
+
onClose?: () => void;
|
|
191
|
+
position?: 'left' | 'right';
|
|
192
|
+
offset?: string;
|
|
193
|
+
onCancel?: () => void;
|
|
194
|
+
color?: string;
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
declare type CloseButtonOptions_2 = {
|
|
198
|
+
show?: boolean;
|
|
199
|
+
onClose?: () => void;
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
export declare const CloseIcon: FC<CloseIconProps>;
|
|
203
|
+
|
|
204
|
+
declare type CloseIconProps = {
|
|
205
|
+
width?: number | string;
|
|
206
|
+
height?: number | string;
|
|
207
|
+
class?: string;
|
|
208
|
+
fillColor?: string;
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
export declare const countries: CountryData[];
|
|
212
|
+
|
|
213
|
+
declare type CountryData = {
|
|
214
|
+
code: CountryCode;
|
|
215
|
+
emoji: string;
|
|
216
|
+
name: string;
|
|
217
|
+
callingCode: string;
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
export declare const DateInputComposed: FunctionalComponent<PropsWithoutRef<DateInputComposedProps> & {
|
|
221
|
+
ref?: Ref<HTMLInputElement> | undefined;
|
|
222
|
+
}>;
|
|
223
|
+
|
|
224
|
+
declare type DateInputComposedProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'class'> & {
|
|
225
|
+
id: string;
|
|
226
|
+
label?: string;
|
|
227
|
+
value: string;
|
|
228
|
+
onInput: (e: Event) => void;
|
|
229
|
+
error?: string;
|
|
230
|
+
helper?: string;
|
|
231
|
+
showErrorIcon?: boolean;
|
|
232
|
+
showHelperIcon?: boolean;
|
|
233
|
+
suppressMessages?: boolean;
|
|
234
|
+
class?: string;
|
|
235
|
+
'data-testid'?: string;
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
export declare const DropdownComposed: FC<DropdownComposedProps>;
|
|
239
|
+
|
|
240
|
+
declare type DropdownComposedProps = {
|
|
241
|
+
id: string;
|
|
242
|
+
label?: string;
|
|
243
|
+
placeholder?: string;
|
|
244
|
+
value: string;
|
|
245
|
+
options: DropdownOption[];
|
|
246
|
+
onChange: (value: string) => void;
|
|
247
|
+
error?: string;
|
|
248
|
+
helper?: string;
|
|
249
|
+
showErrorIcon?: boolean;
|
|
250
|
+
showHelperIcon?: boolean;
|
|
251
|
+
suppressMessages?: boolean;
|
|
252
|
+
disabled?: boolean;
|
|
253
|
+
required?: boolean;
|
|
254
|
+
searchable?: boolean;
|
|
255
|
+
searchPlaceholder?: string;
|
|
256
|
+
noResultsText?: string;
|
|
257
|
+
name?: string;
|
|
258
|
+
tabIndex?: number;
|
|
259
|
+
onKeyDown?: (e: KeyboardEvent) => void;
|
|
260
|
+
onBlur?: () => void;
|
|
261
|
+
renderSelectedLabel?: (option: DropdownOption) => string;
|
|
262
|
+
siblingElement?: ComponentChildren;
|
|
263
|
+
enterKeyHint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';
|
|
264
|
+
class?: string;
|
|
265
|
+
'data-testid'?: string;
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
declare type DropdownOption = {
|
|
269
|
+
value: string;
|
|
270
|
+
label: string;
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
export declare const ErrorContent: ({ title, description, attemptsRemaining, onButtonClick, "data-testid": testId, }: ErrorContentProps) => JSX.Element;
|
|
274
|
+
|
|
275
|
+
declare type ErrorContentProps = {
|
|
276
|
+
title: string;
|
|
277
|
+
description: string;
|
|
278
|
+
attemptsRemaining: number;
|
|
279
|
+
onButtonClick: () => void;
|
|
280
|
+
'data-testid'?: string;
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
export declare const ErrorIcon: FC<ErrorIconProps>;
|
|
284
|
+
|
|
285
|
+
declare type ErrorIconProps = {
|
|
286
|
+
size?: number | string;
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
export declare const FileIcon: FC<FileIconProps>;
|
|
290
|
+
|
|
291
|
+
declare type FileIconProps = {
|
|
292
|
+
size?: number | string;
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
declare type FlipAnimationProps = {
|
|
296
|
+
manager: IdCaptureManager;
|
|
297
|
+
direction: 'toBack' | 'toFront';
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
export declare const FormField: FC<FormFieldProps>;
|
|
301
|
+
|
|
302
|
+
declare type FormFieldProps = {
|
|
303
|
+
name: string;
|
|
304
|
+
label: string;
|
|
305
|
+
value?: string;
|
|
306
|
+
error?: string;
|
|
307
|
+
errorParams?: Record<string, string | number>;
|
|
308
|
+
type?: string;
|
|
309
|
+
placeholder?: string;
|
|
310
|
+
placeholderParams?: Record<string, string>;
|
|
311
|
+
required?: boolean;
|
|
312
|
+
readonly?: boolean;
|
|
313
|
+
maxLength?: number;
|
|
314
|
+
disabled?: boolean;
|
|
315
|
+
optional?: boolean;
|
|
316
|
+
onChange: (name: string, value: string) => void;
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
export declare function getCountryByCallingCode(callingCode: string): CountryData | undefined;
|
|
320
|
+
|
|
321
|
+
export declare function getCountryByCode(code: string | undefined): CountryData | undefined;
|
|
322
|
+
|
|
323
|
+
export declare const HelpIcon: FC<HelpIconProps>;
|
|
324
|
+
|
|
325
|
+
declare type HelpIconProps = {
|
|
326
|
+
className?: string;
|
|
327
|
+
};
|
|
328
|
+
|
|
329
|
+
export declare const IdCapture: FC<CaptureProps_2>;
|
|
330
|
+
|
|
331
|
+
export declare const IdChooser: FC<ChooserProps>;
|
|
332
|
+
|
|
333
|
+
export declare const IdError: FC<IdErrorProps>;
|
|
334
|
+
|
|
335
|
+
declare type IdErrorProps = {
|
|
336
|
+
manager: IdCaptureManager;
|
|
337
|
+
state: Extract<IdCaptureState, {
|
|
338
|
+
status: 'error';
|
|
339
|
+
}>;
|
|
340
|
+
onError?: (error: string | undefined) => void;
|
|
341
|
+
} | {
|
|
342
|
+
manager: IdCaptureManager;
|
|
343
|
+
state: Extract<IdCaptureState, {
|
|
344
|
+
status: 'capture';
|
|
345
|
+
}>;
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
export declare const IdExpired: FC<IdExpiredProps>;
|
|
349
|
+
|
|
350
|
+
declare type IdExpiredProps = {
|
|
351
|
+
manager: IdCaptureManager;
|
|
352
|
+
};
|
|
353
|
+
|
|
354
|
+
export declare const IdFlipAnimation: FC<FlipAnimationProps>;
|
|
355
|
+
|
|
356
|
+
export declare const IdTutorial: FC<TutorialProps_2>;
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Wraps UI modules with the standard container.
|
|
360
|
+
* Shows a landscape blocker overlay on mobile (excluding iPad) when device is rotated to landscape.
|
|
361
|
+
*/
|
|
362
|
+
export declare function IncodeComponent({ children }: IncodeComponentProps): VNode;
|
|
363
|
+
|
|
364
|
+
declare type IncodeComponentProps = {
|
|
365
|
+
children?: ComponentChildren;
|
|
366
|
+
};
|
|
367
|
+
|
|
368
|
+
export declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
|
|
369
|
+
/**
|
|
370
|
+
* Module configuration required to render the flow.
|
|
371
|
+
* For Web Components, this is typically assigned via `element.config = ...`.
|
|
372
|
+
*/
|
|
373
|
+
config?: TConfig;
|
|
374
|
+
/**
|
|
375
|
+
* Optional pre-built manager. When provided, the module does not create or manage the manager lifecycle.
|
|
376
|
+
*/
|
|
377
|
+
manager?: TManager;
|
|
378
|
+
/**
|
|
379
|
+
* Callback invoked when the module completes successfully.
|
|
380
|
+
* @param result - Optional result data from the module completion
|
|
381
|
+
*/
|
|
382
|
+
onFinish?: (result?: TResult) => void;
|
|
383
|
+
/**
|
|
384
|
+
* Callback invoked when a fatal module error occurs.
|
|
385
|
+
*/
|
|
386
|
+
onError?: (error: string | undefined) => void;
|
|
387
|
+
};
|
|
388
|
+
|
|
389
|
+
declare type InferState<T> = T extends {
|
|
390
|
+
getState: () => infer S;
|
|
391
|
+
} ? S : never;
|
|
392
|
+
|
|
393
|
+
export declare const Input: FunctionalComponent<PropsWithoutRef<InputProps> & {
|
|
394
|
+
ref?: Ref<HTMLInputElement> | undefined;
|
|
395
|
+
}>;
|
|
396
|
+
|
|
397
|
+
export declare const InputComposed: FunctionalComponent<PropsWithoutRef<InputComposedProps> & {
|
|
398
|
+
ref?: Ref<HTMLInputElement> | undefined;
|
|
399
|
+
}>;
|
|
400
|
+
|
|
401
|
+
declare type InputComposedProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'id' | 'class'> & {
|
|
402
|
+
id: string;
|
|
403
|
+
label?: string;
|
|
404
|
+
error?: string;
|
|
405
|
+
helper?: string;
|
|
406
|
+
showErrorIcon?: boolean;
|
|
407
|
+
showHelperIcon?: boolean;
|
|
408
|
+
closeButton?: CloseButtonOptions_2;
|
|
409
|
+
suppressMessages?: boolean;
|
|
410
|
+
class?: string;
|
|
411
|
+
};
|
|
412
|
+
|
|
413
|
+
declare type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'class' | 'type'> & {
|
|
414
|
+
class?: string;
|
|
415
|
+
type?: string;
|
|
416
|
+
'data-has-value'?: boolean;
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
export declare function LandscapeBlocker(): VNode | null;
|
|
420
|
+
|
|
421
|
+
export declare const LockIcon: FC<LockIconProps>;
|
|
422
|
+
|
|
423
|
+
declare type LockIconProps = {
|
|
424
|
+
className?: string;
|
|
425
|
+
};
|
|
426
|
+
|
|
427
|
+
export declare function Lottie({ animationData, loop, autoplay, style, className, onComplete, }: LottieProps): JSX.Element;
|
|
428
|
+
|
|
429
|
+
declare type LottieAnimationData = {
|
|
430
|
+
fr: number;
|
|
431
|
+
v: string;
|
|
432
|
+
ip: number;
|
|
433
|
+
op: number;
|
|
434
|
+
w: number;
|
|
435
|
+
h: number;
|
|
436
|
+
};
|
|
437
|
+
|
|
438
|
+
declare type LottieProps = {
|
|
439
|
+
animationData: LottieAnimationData;
|
|
440
|
+
loop?: boolean;
|
|
441
|
+
autoplay?: boolean;
|
|
442
|
+
style?: CSSProperties;
|
|
443
|
+
className?: string;
|
|
444
|
+
onComplete?: () => void;
|
|
445
|
+
};
|
|
446
|
+
|
|
447
|
+
export declare const ManualCapture: FC<ManualCaptureProps>;
|
|
448
|
+
|
|
449
|
+
declare type ManualCaptureProps = {
|
|
450
|
+
stream: MediaStream;
|
|
451
|
+
onCapture: (imageBase64: string) => void;
|
|
452
|
+
disabled?: boolean;
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
export declare const Modal: FC<ModalProps>;
|
|
456
|
+
|
|
457
|
+
declare type ModalProps = {
|
|
458
|
+
children: ComponentChildren;
|
|
459
|
+
'aria-labelledby'?: string;
|
|
460
|
+
class?: string;
|
|
461
|
+
};
|
|
462
|
+
|
|
463
|
+
export declare const OtpInput: FC<OtpInputProps>;
|
|
464
|
+
|
|
465
|
+
declare type OtpInputProps = {
|
|
466
|
+
resendTimer: number;
|
|
467
|
+
canResend: boolean;
|
|
468
|
+
error?: string;
|
|
469
|
+
onSubmit: (code: string) => void;
|
|
470
|
+
onResend: () => void;
|
|
471
|
+
onBack: () => void;
|
|
472
|
+
/**
|
|
473
|
+
* Custom text for the back link (e.g., "change email address").
|
|
474
|
+
* Defaults to "change phone number" if not provided.
|
|
475
|
+
*/
|
|
476
|
+
backLinkText?: string;
|
|
477
|
+
/** Whether the inputs and buttons should be disabled */
|
|
478
|
+
disabled?: boolean;
|
|
479
|
+
/** Whether the submit button should show loading state */
|
|
480
|
+
isLoading?: boolean;
|
|
481
|
+
};
|
|
482
|
+
|
|
483
|
+
export declare const Page: ({ title, titleId, subtitle, className, logo, children, hideHeader, hideFooterBranding, "data-testid": dataTestId, "data-permission-status": dataPermissionStatus, }: PageProps) => JSX.Element;
|
|
484
|
+
|
|
485
|
+
declare type PageProps = {
|
|
486
|
+
children?: ComponentChildren;
|
|
487
|
+
title?: string;
|
|
488
|
+
titleId?: string;
|
|
489
|
+
subtitle?: string;
|
|
490
|
+
className?: string;
|
|
491
|
+
logo?: {
|
|
492
|
+
src?: string;
|
|
493
|
+
height?: string;
|
|
494
|
+
};
|
|
495
|
+
hideFooterBranding?: boolean;
|
|
496
|
+
hideHeader?: boolean;
|
|
497
|
+
closeButton?: CloseButtonOptions;
|
|
498
|
+
'data-testid'?: string;
|
|
499
|
+
'data-permission-status'?: string;
|
|
500
|
+
};
|
|
501
|
+
|
|
502
|
+
declare const Permissions_2: FC<PermissionsProps>;
|
|
503
|
+
export { Permissions_2 as Permissions }
|
|
504
|
+
|
|
505
|
+
declare type PermissionsManager = {
|
|
506
|
+
requestPermission: () => void;
|
|
507
|
+
goToLearnMore: () => void;
|
|
508
|
+
close: () => void;
|
|
509
|
+
};
|
|
510
|
+
|
|
511
|
+
declare type PermissionsProps = {
|
|
512
|
+
manager: PermissionsManager;
|
|
513
|
+
permissionStatus: PermissionStatus_2;
|
|
514
|
+
};
|
|
515
|
+
|
|
516
|
+
export declare const PhoneInputComposed: FC<PhoneInputComposedProps>;
|
|
517
|
+
|
|
518
|
+
declare type PhoneInputComposedProps = {
|
|
519
|
+
id: string;
|
|
520
|
+
label?: string;
|
|
521
|
+
countryCode?: string;
|
|
522
|
+
value?: string;
|
|
523
|
+
placeholder?: string;
|
|
524
|
+
error?: string;
|
|
525
|
+
disabled?: boolean;
|
|
526
|
+
disableCountrySelector?: boolean;
|
|
527
|
+
required?: boolean;
|
|
528
|
+
onChange?: (fullNumber: string, isValid: boolean) => void;
|
|
529
|
+
'data-testid'?: string;
|
|
530
|
+
};
|
|
531
|
+
|
|
532
|
+
export declare const Processing: FC;
|
|
533
|
+
|
|
534
|
+
export declare const ProgressBar: FC<ProgressBarProps>;
|
|
535
|
+
|
|
536
|
+
declare type ProgressBarProps = {
|
|
537
|
+
progress: number;
|
|
538
|
+
label?: string;
|
|
539
|
+
className?: string;
|
|
540
|
+
};
|
|
541
|
+
|
|
542
|
+
export declare const SearchIcon: FC<SearchIconProps>;
|
|
543
|
+
|
|
544
|
+
declare type SearchIconProps = {
|
|
545
|
+
size?: number | string;
|
|
546
|
+
};
|
|
547
|
+
|
|
548
|
+
export declare const SelfieCapture: FC<CaptureProps>;
|
|
549
|
+
|
|
550
|
+
export declare const SelfieTutorial: ({ manager }: TutorialProps) => JSX.Element | null;
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* Sets global UI configuration defaults for `@incodetech/ui`.
|
|
554
|
+
*/
|
|
555
|
+
export declare function setUiConfig(next: UiConfig): void;
|
|
556
|
+
|
|
557
|
+
export declare const Spacer: ({ size, className, direction, }: SpacerProps) => JSX.Element;
|
|
558
|
+
|
|
559
|
+
declare type SpacerProps = {
|
|
560
|
+
size?: number | string;
|
|
561
|
+
direction?: 'horizontal' | 'vertical';
|
|
562
|
+
className?: string;
|
|
563
|
+
};
|
|
564
|
+
|
|
565
|
+
export declare const Spinner: FC<SpinnerProps>;
|
|
566
|
+
|
|
567
|
+
declare type SpinnerProps = {
|
|
568
|
+
/** Title text to display below the spinner */
|
|
569
|
+
title?: string;
|
|
570
|
+
/** Subtitle text to display below the title */
|
|
571
|
+
subtitle?: string;
|
|
572
|
+
/** Size of the spinner icon */
|
|
573
|
+
size?: SpinnerSize;
|
|
574
|
+
/** Whether to display as full-screen overlay */
|
|
575
|
+
fullScreen?: boolean;
|
|
576
|
+
/** Additional CSS class name */
|
|
577
|
+
className?: string;
|
|
578
|
+
};
|
|
579
|
+
|
|
580
|
+
export declare type SpinnerSize = 'small' | 'medium' | 'large';
|
|
581
|
+
|
|
582
|
+
export declare const SuccessIcon: FC<SuccessIconProps>;
|
|
583
|
+
|
|
584
|
+
declare type SuccessIconProps = {
|
|
585
|
+
size?: number | string;
|
|
586
|
+
};
|
|
587
|
+
|
|
588
|
+
export declare const Title: FunctionalComponent<PropsWithoutRef<TitleProps> & {
|
|
589
|
+
ref?: Ref<HTMLHeadingElement> | undefined;
|
|
590
|
+
}>;
|
|
591
|
+
|
|
592
|
+
declare type TitleProps = HTMLAttributes_2<HTMLHeadingElement> & {
|
|
593
|
+
children: ComponentChildren;
|
|
594
|
+
className?: string;
|
|
595
|
+
};
|
|
596
|
+
|
|
597
|
+
declare type TutorialProps = {
|
|
598
|
+
manager: SelfieManager;
|
|
599
|
+
};
|
|
600
|
+
|
|
601
|
+
declare type TutorialProps_2 = {
|
|
602
|
+
manager: IdCaptureManager;
|
|
603
|
+
state: Extract<IdCaptureState, {
|
|
604
|
+
status: 'tutorial';
|
|
605
|
+
}>;
|
|
606
|
+
};
|
|
607
|
+
|
|
608
|
+
export declare const TypographyH1: FC<TitleProps>;
|
|
609
|
+
|
|
610
|
+
export declare const TypographyH3: FC<TitleProps>;
|
|
611
|
+
|
|
612
|
+
export declare const TypographyH4: FC<TitleProps>;
|
|
613
|
+
|
|
614
|
+
export declare const TypographyH5: FC<TitleProps>;
|
|
615
|
+
|
|
616
|
+
export declare type UiConfig = {
|
|
617
|
+
logoSrc?: string;
|
|
618
|
+
logoHeight?: string;
|
|
619
|
+
hideHeader?: boolean;
|
|
620
|
+
hideFooterBranding?: boolean;
|
|
621
|
+
};
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* Hook for subscribing to manager state updates
|
|
625
|
+
* @param factory - Factory function that creates the manager instance
|
|
626
|
+
* @param options - Configuration options
|
|
627
|
+
* @returns Tuple of [state, manager]
|
|
628
|
+
*/
|
|
629
|
+
export declare function useManager<TManager extends {
|
|
630
|
+
getState: () => TState;
|
|
631
|
+
subscribe: (listener: (state: TState) => void) => () => void;
|
|
632
|
+
load?: () => void;
|
|
633
|
+
stop?: () => void;
|
|
634
|
+
}, TState = InferState<TManager>>(factory: () => TManager, options?: UseManagerOptions): [TState, TManager];
|
|
635
|
+
|
|
636
|
+
declare type UseManagerOptions = {
|
|
637
|
+
autoLoad?: boolean;
|
|
638
|
+
manageLifecycle?: boolean;
|
|
639
|
+
};
|
|
640
|
+
|
|
641
|
+
/**
|
|
642
|
+
* Hook that returns whether the device is in landscape mode on mobile (excluding iPad and desktop).
|
|
643
|
+
* Use this to show a landscape blocker overlay when true.
|
|
644
|
+
*/
|
|
645
|
+
export declare function useScreenOrientation(): {
|
|
646
|
+
isLandscapeMobile: boolean;
|
|
647
|
+
};
|
|
648
|
+
|
|
649
|
+
export declare function useTranslation(): UseTranslationReturn;
|
|
650
|
+
|
|
651
|
+
declare type UseTranslationReturn = {
|
|
652
|
+
t: TFunction;
|
|
653
|
+
ready: boolean;
|
|
654
|
+
i18n: i18n;
|
|
655
|
+
};
|
|
656
|
+
|
|
657
|
+
export declare const VerificationResult: FC<VerificationResultProps>;
|
|
658
|
+
|
|
659
|
+
declare type VerificationResultProps = {
|
|
660
|
+
status: 'submitting' | 'success' | 'failure';
|
|
661
|
+
submittingTitle?: string;
|
|
662
|
+
successTitle?: string;
|
|
663
|
+
failureTitle?: string;
|
|
664
|
+
errorMessage?: string;
|
|
665
|
+
onRetry?: () => void;
|
|
666
|
+
onSkip?: () => void;
|
|
667
|
+
retryLabel?: string;
|
|
668
|
+
skipLabel?: string;
|
|
669
|
+
};
|
|
670
|
+
|
|
671
|
+
export { }
|
package/dist/types/flow.d.ts
CHANGED
|
@@ -19,12 +19,16 @@ export declare const IncodeFlow: FC<IncodeFlowProps>;
|
|
|
19
19
|
|
|
20
20
|
declare type IncodeFlowProps = IncodeModuleProps<FlowConfig, FinishStatus>;
|
|
21
21
|
|
|
22
|
-
declare type IncodeModuleProps<TConfig, TResult = void> = {
|
|
22
|
+
declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
|
|
23
23
|
/**
|
|
24
24
|
* Module configuration required to render the flow.
|
|
25
25
|
* For Web Components, this is typically assigned via `element.config = ...`.
|
|
26
26
|
*/
|
|
27
27
|
config?: TConfig;
|
|
28
|
+
/**
|
|
29
|
+
* Optional pre-built manager. When provided, the module does not create or manage the manager lifecycle.
|
|
30
|
+
*/
|
|
31
|
+
manager?: TManager;
|
|
28
32
|
/**
|
|
29
33
|
* Callback invoked when the module completes successfully.
|
|
30
34
|
* @param result - Optional result data from the module completion
|
|
@@ -6,12 +6,16 @@ export { Geolocation_2 as Geolocation }
|
|
|
6
6
|
|
|
7
7
|
declare type GeolocationProps = IncodeModuleProps<GeolocationConfig>;
|
|
8
8
|
|
|
9
|
-
declare type IncodeModuleProps<TConfig, TResult = void> = {
|
|
9
|
+
declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
|
|
10
10
|
/**
|
|
11
11
|
* Module configuration required to render the flow.
|
|
12
12
|
* For Web Components, this is typically assigned via `element.config = ...`.
|
|
13
13
|
*/
|
|
14
14
|
config?: TConfig;
|
|
15
|
+
/**
|
|
16
|
+
* Optional pre-built manager. When provided, the module does not create or manage the manager lifecycle.
|
|
17
|
+
*/
|
|
18
|
+
manager?: TManager;
|
|
15
19
|
/**
|
|
16
20
|
* Callback invoked when the module completes successfully.
|
|
17
21
|
* @param result - Optional result data from the module completion
|