@incodetech/web 0.0.0-dev-20260402-0dc2fb9 → 0.0.0-dev-20260403-10f7d94
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/base.css +8 -0
- package/dist/email/email.es.js +19 -17
- package/dist/extensibility.es.js +2 -2
- package/dist/{flipAnimation-CLQ2VPp5.js → flipAnimation-r4wJkacO.js} +43 -43
- package/dist/governmentValidation/governmentValidation.es.js +1 -1
- package/dist/id/id.es.js +1 -1
- package/dist/otpInput-CMi5-n2O.js +155 -0
- package/dist/phone/phone.es.js +45 -36
- package/package.json +2 -2
- package/dist/otpInput-B85heGC5.js +0 -148
package/dist/base.css
CHANGED
|
@@ -1104,6 +1104,14 @@
|
|
|
1104
1104
|
width: 100%;
|
|
1105
1105
|
display: flex;
|
|
1106
1106
|
}
|
|
1107
|
+
.IncodeOtpInputTimerText {
|
|
1108
|
+
margin: var(--spacing-0, var(--spacing-none, 0px));
|
|
1109
|
+
text-align: center;
|
|
1110
|
+
font-size: var(--text-18, var(--primitive-typography-size-18));
|
|
1111
|
+
--tw-font-weight: var(--font-weight-medium, var(--primitive-typography-weight-medium));
|
|
1112
|
+
font-weight: var(--font-weight-medium, var(--primitive-typography-weight-medium));
|
|
1113
|
+
color: var(--color-text-body-secondary, var(--text-body-500-secondary));
|
|
1114
|
+
}
|
|
1107
1115
|
.IncodeOtpInputResendText {
|
|
1108
1116
|
margin: var(--spacing-0, var(--spacing-none, 0px));
|
|
1109
1117
|
text-align: center;
|
package/dist/email/email.es.js
CHANGED
|
@@ -2,7 +2,7 @@ import { b as v, u as e, I as O, a as w, S as C, B as y } from "../button-DXIWei
|
|
|
2
2
|
import { createEmailManager as P } from "@incodetech/core/email";
|
|
3
3
|
import { d as b, y as V } from "../vendor-preact-BoMmvSgn.js";
|
|
4
4
|
import "@incodetech/core";
|
|
5
|
-
import { O as R } from "../otpInput-
|
|
5
|
+
import { O as R } from "../otpInput-CMi5-n2O.js";
|
|
6
6
|
import { P as I } from "../page-D4OThpFS.js";
|
|
7
7
|
import { r as S } from "../incodeModule-C4XIllao.js";
|
|
8
8
|
import "../uiConfig-DmIn-g8M.js";
|
|
@@ -17,7 +17,7 @@ import "../countries-DfLkrF0x.js";
|
|
|
17
17
|
const h = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, L = ({
|
|
18
18
|
prefilledEmail: i,
|
|
19
19
|
emailError: s,
|
|
20
|
-
label:
|
|
20
|
+
label: m,
|
|
21
21
|
disabled: c = !1,
|
|
22
22
|
required: a = !1,
|
|
23
23
|
onEmailChange: t
|
|
@@ -31,9 +31,9 @@ const h = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, L = ({
|
|
|
31
31
|
}
|
|
32
32
|
}, [i, t]);
|
|
33
33
|
const f = (r) => {
|
|
34
|
-
const
|
|
35
|
-
p(
|
|
36
|
-
const o =
|
|
34
|
+
const d = r.target.value;
|
|
35
|
+
p(d);
|
|
36
|
+
const o = d.trim(), u = o.length > 0 && h.test(o);
|
|
37
37
|
t(o, u);
|
|
38
38
|
}, n = s ? "email-error" : void 0;
|
|
39
39
|
return /* @__PURE__ */ e("div", { class: "IncodeEmailInput", children: /* @__PURE__ */ e("div", { class: "IncodeEmailInputContainer", children: /* @__PURE__ */ e(
|
|
@@ -46,9 +46,9 @@ const h = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, L = ({
|
|
|
46
46
|
placeholder: l("email.placeholder"),
|
|
47
47
|
disabled: c,
|
|
48
48
|
required: a,
|
|
49
|
-
label:
|
|
49
|
+
label: m,
|
|
50
50
|
"data-testid": "email-input",
|
|
51
|
-
"aria-label":
|
|
51
|
+
"aria-label": m ? void 0 : "Email address",
|
|
52
52
|
"aria-invalid": s ? "true" : void 0,
|
|
53
53
|
"aria-describedby": n || void 0,
|
|
54
54
|
autocomplete: "email",
|
|
@@ -59,7 +59,7 @@ const h = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, L = ({
|
|
|
59
59
|
}, T = ({
|
|
60
60
|
config: i,
|
|
61
61
|
manager: s,
|
|
62
|
-
onFinish:
|
|
62
|
+
onFinish: m,
|
|
63
63
|
onError: c
|
|
64
64
|
}) => {
|
|
65
65
|
const { t: a } = v(), [t, l] = w(
|
|
@@ -72,13 +72,13 @@ const h = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, L = ({
|
|
|
72
72
|
{ manageLifecycle: !s }
|
|
73
73
|
), [E, p] = b(!1);
|
|
74
74
|
if (t.status === "idle" || t.status === "loadingPrefill" || t.status === "inputting" || t.status === "submitting" || t.status === "sendingInitialOtp") {
|
|
75
|
-
const n = t.status === "idle" || t.status === "loadingPrefill" || t.status === "submitting" || t.status === "sendingInitialOtp", r = t.status === "inputting" ? t.prefilledEmail : void 0, g = t.status === "inputting" && t.emailError ? a(t.emailError) : void 0,
|
|
75
|
+
const n = t.status === "idle" || t.status === "loadingPrefill" || t.status === "submitting" || t.status === "sendingInitialOtp", r = t.status === "inputting" ? t.prefilledEmail : void 0, g = t.status === "inputting" && t.emailError ? a(t.emailError) : void 0, d = t.status === "inputting" ? t.otpVerification ?? !1 : !1;
|
|
76
76
|
return /* @__PURE__ */ e(
|
|
77
77
|
I,
|
|
78
78
|
{
|
|
79
79
|
className: "IncodeEmailPage",
|
|
80
80
|
title: a("otp.enterCodeEmail"),
|
|
81
|
-
subtitle:
|
|
81
|
+
subtitle: d ? a("email.willSendCode") : void 0,
|
|
82
82
|
children: [
|
|
83
83
|
/* @__PURE__ */ e(
|
|
84
84
|
L,
|
|
@@ -103,11 +103,12 @@ const h = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, L = ({
|
|
|
103
103
|
}
|
|
104
104
|
)
|
|
105
105
|
]
|
|
106
|
-
}
|
|
106
|
+
},
|
|
107
|
+
"email-input"
|
|
107
108
|
);
|
|
108
109
|
}
|
|
109
110
|
if (t.status === "awaitingOtp" || t.status === "verifyingOtp" || t.status === "otpError" || t.status === "resendingOtp") {
|
|
110
|
-
const n = t.status === "verifyingOtp", r = t.status === "otpError", g = t.status === "awaitingOtp",
|
|
111
|
+
const n = t.status === "verifyingOtp", r = t.status === "otpError", g = t.status === "awaitingOtp", d = t.status === "resendingOtp", o = g || r || n;
|
|
111
112
|
return /* @__PURE__ */ e(
|
|
112
113
|
I,
|
|
113
114
|
{
|
|
@@ -120,28 +121,29 @@ const h = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, L = ({
|
|
|
120
121
|
canResend: o ? t.canResend : !1,
|
|
121
122
|
error: r ? a(t.otpError) : void 0,
|
|
122
123
|
isLoading: n,
|
|
123
|
-
disabled:
|
|
124
|
+
disabled: d || n,
|
|
124
125
|
onSubmit: (u) => l.submitOtp(u),
|
|
125
126
|
onResend: () => l.resendOtp(),
|
|
126
127
|
onBack: () => l.back(),
|
|
127
128
|
backLinkText: "otp.changeEmail"
|
|
128
129
|
}
|
|
129
130
|
)
|
|
130
|
-
}
|
|
131
|
+
},
|
|
132
|
+
"email-otp"
|
|
131
133
|
);
|
|
132
134
|
}
|
|
133
|
-
return t.status === "finished" ? (
|
|
135
|
+
return t.status === "finished" ? (m?.(), null) : (t.status === "error" && c?.(t.error), null);
|
|
134
136
|
}, B = ({
|
|
135
137
|
config: i,
|
|
136
138
|
manager: s,
|
|
137
|
-
onFinish:
|
|
139
|
+
onFinish: m,
|
|
138
140
|
onError: c
|
|
139
141
|
}) => /* @__PURE__ */ e(O, { children: i || s ? /* @__PURE__ */ e(
|
|
140
142
|
T,
|
|
141
143
|
{
|
|
142
144
|
config: i,
|
|
143
145
|
manager: s,
|
|
144
|
-
onFinish:
|
|
146
|
+
onFinish: m,
|
|
145
147
|
onError: c
|
|
146
148
|
}
|
|
147
149
|
) : null });
|
package/dist/extensibility.es.js
CHANGED
|
@@ -9,13 +9,13 @@ import { E as A } from "./errorContent-CnY-Deoi.js";
|
|
|
9
9
|
import { F as U, V as j } from "./formField-BoozuV2w.js";
|
|
10
10
|
import { C as q, P as z } from "./cameraView-DXT7CWqE.js";
|
|
11
11
|
import { I as J, a as K } from "./inputComposed-QzDneavl.js";
|
|
12
|
-
import { O as Q } from "./otpInput-
|
|
12
|
+
import { O as Q } from "./otpInput-CMi5-n2O.js";
|
|
13
13
|
import { C as Y, a as Z } from "./checkbox-wo8qk7tM.js";
|
|
14
14
|
import { P as $ } from "./phoneInputComposed-BAFZQ4Y8.js";
|
|
15
15
|
import { D as ra, S as ea } from "./dropdownComposed-CzAsPPqv.js";
|
|
16
16
|
import { C as ta, D as sa } from "./dateInputComposed-D5kgh_aC.js";
|
|
17
17
|
import { b as pa, C as ca, c as ia, e as ua, d as la, H as ma, L as Ca, T as da, a as fa } from "./captureOverlay-wQmz2Z5r.js";
|
|
18
|
-
import { d as xa, C as ha, b as ga, I as ya, c as Ta, F as va, T as Sa, S as Ba, V as Fa, a as Pa } from "./flipAnimation-
|
|
18
|
+
import { d as xa, C as ha, b as ga, I as ya, c as Ta, F as va, T as Sa, S as Ba, V as Fa, a as Pa } from "./flipAnimation-r4wJkacO.js";
|
|
19
19
|
import { L as Oa, M as ba } from "./manualCaptureButton-CPZ2xxEI.js";
|
|
20
20
|
import { A as i, y as u, q as l } from "./vendor-preact-BoMmvSgn.js";
|
|
21
21
|
import { B as Ma, P as Va } from "./permissions-BeU3HuVB.js";
|
|
@@ -291,17 +291,17 @@ const J = ({ className: i }) => /* @__PURE__ */ e(
|
|
|
291
291
|
onTakeManually: l,
|
|
292
292
|
portalContainer: n
|
|
293
293
|
}) => {
|
|
294
|
-
const { t: r } = C(), o = E((
|
|
295
|
-
|
|
296
|
-
}, []),
|
|
294
|
+
const { t: r } = C(), o = E((a) => {
|
|
295
|
+
a?.focus();
|
|
296
|
+
}, []), s = () => {
|
|
297
297
|
l(), t();
|
|
298
298
|
};
|
|
299
299
|
return /* @__PURE__ */ e(
|
|
300
300
|
w.Root,
|
|
301
301
|
{
|
|
302
302
|
open: i,
|
|
303
|
-
onOpenChange: (
|
|
304
|
-
|
|
303
|
+
onOpenChange: (a) => {
|
|
304
|
+
a || t();
|
|
305
305
|
},
|
|
306
306
|
class: "IncodeCommonIssuesFullScreen",
|
|
307
307
|
hasBackdrop: !1,
|
|
@@ -348,7 +348,7 @@ const J = ({ className: i }) => /* @__PURE__ */ e(
|
|
|
348
348
|
L,
|
|
349
349
|
{
|
|
350
350
|
variant: "link",
|
|
351
|
-
onClick:
|
|
351
|
+
onClick: s,
|
|
352
352
|
class: "IncodeCommonIssuesTakeManually",
|
|
353
353
|
children: r("commonIssues.takeManually")
|
|
354
354
|
}
|
|
@@ -365,15 +365,15 @@ const J = ({ className: i }) => /* @__PURE__ */ e(
|
|
|
365
365
|
children: n,
|
|
366
366
|
className: r
|
|
367
367
|
}) => {
|
|
368
|
-
const o = i !== "vertical" || t === "passport",
|
|
368
|
+
const o = i !== "vertical" || t === "passport", s = t === "passport", a = `IncodeCaptureFrame${l.charAt(0).toUpperCase() + l.slice(1)}`;
|
|
369
369
|
return /* @__PURE__ */ e(
|
|
370
370
|
"div",
|
|
371
371
|
{
|
|
372
372
|
class: V(
|
|
373
373
|
"IncodeCaptureFrame",
|
|
374
374
|
o ? "IncodeCaptureFrameHorizontal" : "IncodeCaptureFrameVertical",
|
|
375
|
-
|
|
376
|
-
|
|
375
|
+
a,
|
|
376
|
+
s && "IncodeCaptureFramePassport",
|
|
377
377
|
r
|
|
378
378
|
),
|
|
379
379
|
"aria-hidden": "true",
|
|
@@ -388,9 +388,9 @@ const J = ({ className: i }) => /* @__PURE__ */ e(
|
|
|
388
388
|
borderState: n,
|
|
389
389
|
topContent: r,
|
|
390
390
|
bottomContent: o,
|
|
391
|
-
overlayContent:
|
|
391
|
+
overlayContent: s
|
|
392
392
|
}) => {
|
|
393
|
-
const { t:
|
|
393
|
+
const { t: a } = C();
|
|
394
394
|
return /* @__PURE__ */ e(x, { hideHeader: !0, hideFooterBranding: !0, children: /* @__PURE__ */ e("div", { class: "IncodeIdProcessingLayout", children: /* @__PURE__ */ e("div", { class: "IncodeIdProcessingLayoutContent", children: [
|
|
395
395
|
r && /* @__PURE__ */ e("div", { class: "IncodeIdProcessingTopArea", children: r }),
|
|
396
396
|
/* @__PURE__ */ e(
|
|
@@ -409,14 +409,14 @@ const J = ({ className: i }) => /* @__PURE__ */ e(
|
|
|
409
409
|
class: "IncodeIdProcessingImage"
|
|
410
410
|
}
|
|
411
411
|
),
|
|
412
|
-
|
|
412
|
+
s && /* @__PURE__ */ e("div", { class: "IncodeIdProcessingOverlay", "aria-hidden": "true", children: s })
|
|
413
413
|
]
|
|
414
414
|
}
|
|
415
415
|
),
|
|
416
416
|
/* @__PURE__ */ e("div", { class: "IncodeIdProcessingBottomArea", children: [
|
|
417
417
|
/* @__PURE__ */ e("div", { class: "IncodeCaptureEncryptionLabel", children: [
|
|
418
418
|
/* @__PURE__ */ e(G, { className: "IncodeCaptureEncryptionIcon" }),
|
|
419
|
-
/* @__PURE__ */ e("span", { children:
|
|
419
|
+
/* @__PURE__ */ e("span", { children: a("v2.capture.label") })
|
|
420
420
|
] }),
|
|
421
421
|
o
|
|
422
422
|
] })
|
|
@@ -427,16 +427,16 @@ const J = ({ className: i }) => /* @__PURE__ */ e(
|
|
|
427
427
|
orientation: l,
|
|
428
428
|
mode: n
|
|
429
429
|
}) => {
|
|
430
|
-
const { t: r } = C(), o = u(null),
|
|
430
|
+
const { t: r } = C(), o = u(null), s = l !== "vertical" || n === "passport", [a, d] = g(null);
|
|
431
431
|
return f(() => {
|
|
432
432
|
o.current?.focus();
|
|
433
433
|
}, []), f(() => {
|
|
434
|
-
|
|
434
|
+
s ? import("./id-laser-h-BBV3r3rz.js").then((c) => {
|
|
435
435
|
d(c.default);
|
|
436
436
|
}) : import("./id-laser-v-BTHJaSfx.js").then((c) => {
|
|
437
437
|
d(c.default);
|
|
438
438
|
});
|
|
439
|
-
}, [
|
|
439
|
+
}, [s]), /* @__PURE__ */ e(
|
|
440
440
|
F,
|
|
441
441
|
{
|
|
442
442
|
imageUrl: i,
|
|
@@ -456,10 +456,10 @@ const J = ({ className: i }) => /* @__PURE__ */ e(
|
|
|
456
456
|
}
|
|
457
457
|
)
|
|
458
458
|
] }),
|
|
459
|
-
overlayContent:
|
|
459
|
+
overlayContent: a ? /* @__PURE__ */ e(
|
|
460
460
|
D,
|
|
461
461
|
{
|
|
462
|
-
animationData:
|
|
462
|
+
animationData: a,
|
|
463
463
|
loop: !0,
|
|
464
464
|
className: "IncodeAnalyzingLottie"
|
|
465
465
|
}
|
|
@@ -511,8 +511,8 @@ const J = ({ className: i }) => /* @__PURE__ */ e(
|
|
|
511
511
|
mode: n,
|
|
512
512
|
title: r,
|
|
513
513
|
subtitle: o,
|
|
514
|
-
buttonText:
|
|
515
|
-
onButtonClick:
|
|
514
|
+
buttonText: s,
|
|
515
|
+
onButtonClick: a,
|
|
516
516
|
attemptsRemaining: d
|
|
517
517
|
}) => {
|
|
518
518
|
const { t: c } = C(), h = u(null);
|
|
@@ -546,7 +546,7 @@ const J = ({ className: i }) => /* @__PURE__ */ e(
|
|
|
546
546
|
d !== void 0 && d > 0 && /* @__PURE__ */ e("p", { class: "IncodeIdProcessingResultAttempts", children: c("v2.idError.attemptsLeft", {
|
|
547
547
|
count: d
|
|
548
548
|
}) }),
|
|
549
|
-
/* @__PURE__ */ e(L, { onClick:
|
|
549
|
+
/* @__PURE__ */ e(L, { onClick: a, "data-testid": "retry-button", children: s })
|
|
550
550
|
] })
|
|
551
551
|
}
|
|
552
552
|
);
|
|
@@ -624,9 +624,9 @@ const J = ({ className: i }) => /* @__PURE__ */ e(
|
|
|
624
624
|
}
|
|
625
625
|
);
|
|
626
626
|
}
|
|
627
|
-
return t.captureStatus === "success" && t.previewImageUrl ? /* @__PURE__ */ e(r1, { manager: i, state: t }) : t.captureStatus === "uploadError" && t.previewImageUrl ? /* @__PURE__ */ e(o1, { manager: i, state: t }) : /* @__PURE__ */ e(
|
|
628
|
-
},
|
|
629
|
-
const l = u(null), n = u(null), r = u(null), o = u(null),
|
|
627
|
+
return t.captureStatus === "success" && t.previewImageUrl ? /* @__PURE__ */ e(r1, { manager: i, state: t }) : t.captureStatus === "uploadError" && t.previewImageUrl ? /* @__PURE__ */ e(o1, { manager: i, state: t }) : /* @__PURE__ */ e(a1, { manager: i, state: t });
|
|
628
|
+
}, a1 = ({ manager: i, state: t }) => {
|
|
629
|
+
const l = u(null), n = u(null), r = u(null), o = u(null), s = u(null), [a, d] = g(!1), [c, h] = g(!1);
|
|
630
630
|
f(() => {
|
|
631
631
|
const p = l.current;
|
|
632
632
|
if (!p || !t.stream) {
|
|
@@ -664,7 +664,7 @@ const J = ({ className: i }) => /* @__PURE__ */ e(
|
|
|
664
664
|
i.capture();
|
|
665
665
|
};
|
|
666
666
|
return /* @__PURE__ */ e(x, { hideHeader: !0, hideFooterBranding: !0, className: "IncodeIdCapturePage", children: [
|
|
667
|
-
/* @__PURE__ */ e(z, { stream: t.stream, "aria-hidden":
|
|
667
|
+
/* @__PURE__ */ e(z, { stream: t.stream, "aria-hidden": a || void 0, children: /* @__PURE__ */ e(
|
|
668
668
|
N,
|
|
669
669
|
{
|
|
670
670
|
ref: n,
|
|
@@ -680,30 +680,30 @@ const J = ({ className: i }) => /* @__PURE__ */ e(
|
|
|
680
680
|
captureButtonRef: o
|
|
681
681
|
}
|
|
682
682
|
) }),
|
|
683
|
-
/* @__PURE__ */ e("div", { ref:
|
|
683
|
+
/* @__PURE__ */ e("div", { ref: s }),
|
|
684
684
|
/* @__PURE__ */ e(
|
|
685
685
|
t1,
|
|
686
686
|
{
|
|
687
|
-
open:
|
|
687
|
+
open: a,
|
|
688
688
|
onClose: b,
|
|
689
689
|
onTakeManually: S,
|
|
690
|
-
portalContainer:
|
|
690
|
+
portalContainer: s.current
|
|
691
691
|
}
|
|
692
692
|
)
|
|
693
693
|
] });
|
|
694
694
|
}, R1 = ({ manager: i, state: t }) => {
|
|
695
|
-
const { t: l } = C(), [n, r] = g(!1), [o,
|
|
695
|
+
const { t: l } = C(), [n, r] = g(!1), [o, s] = g(null), a = t.selectedDocumentType === "passport", d = t.currentMode === "back";
|
|
696
696
|
if (f(() => {
|
|
697
|
-
|
|
698
|
-
|
|
697
|
+
a ? import("./passport-tutorial-CaYBFTqt.js").then((I) => {
|
|
698
|
+
s(I.default);
|
|
699
699
|
}) : d ? import("./back-tutorial-An9AcMSe.js").then((I) => {
|
|
700
|
-
|
|
700
|
+
s(I.default);
|
|
701
701
|
}) : import("./id-tutorial-B-F5Q28m.js").then((I) => {
|
|
702
|
-
|
|
702
|
+
s(I.default);
|
|
703
703
|
});
|
|
704
|
-
}, [
|
|
704
|
+
}, [a, d]), !o)
|
|
705
705
|
return null;
|
|
706
|
-
const c = l(
|
|
706
|
+
const c = l(a ? "idv2.capture.passport.title" : d ? "idv2.backTutorial.title" : "idv2.tutorial.v2.title"), h = l(a ? "idv2.capture.passport.subtitle" : d ? "idv2.backTutorial.subtitle" : "idv2.tutorial.subtitle"), B = l(d ? "idv2.backTutorial.disclaimer" : "idv2.tutorial.v2.autocapture");
|
|
707
707
|
return /* @__PURE__ */ e(
|
|
708
708
|
W,
|
|
709
709
|
{
|
|
@@ -718,11 +718,11 @@ const J = ({ className: i }) => /* @__PURE__ */ e(
|
|
|
718
718
|
isLoading: n,
|
|
719
719
|
className: V(
|
|
720
720
|
"IncodeIdTutorial",
|
|
721
|
-
|
|
721
|
+
a ? "IncodeIdTutorialPassport" : "IncodeIdTutorialId"
|
|
722
722
|
)
|
|
723
723
|
}
|
|
724
724
|
);
|
|
725
|
-
},
|
|
725
|
+
}, s1 = () => /* @__PURE__ */ e(
|
|
726
726
|
"svg",
|
|
727
727
|
{
|
|
728
728
|
width: "119",
|
|
@@ -1957,7 +1957,7 @@ const J = ({ className: i }) => /* @__PURE__ */ e(
|
|
|
1957
1957
|
},
|
|
1958
1958
|
id: {
|
|
1959
1959
|
type: "id",
|
|
1960
|
-
icon:
|
|
1960
|
+
icon: s1,
|
|
1961
1961
|
title: "idv2.chooser.idButtonTitle",
|
|
1962
1962
|
testId: "verification-option-id",
|
|
1963
1963
|
weight: 2
|
|
@@ -2021,17 +2021,17 @@ const U1 = ({ manager: i, state: t }) => {
|
|
|
2021
2021
|
manager: i,
|
|
2022
2022
|
direction: t
|
|
2023
2023
|
}) => {
|
|
2024
|
-
const [l, n] = g(null), [r, o] = g(!1), { t:
|
|
2024
|
+
const [l, n] = g(null), [r, o] = g(!1), { t: s } = C();
|
|
2025
2025
|
f(() => {
|
|
2026
2026
|
import("./flip-animation-COR596wy.js").then((c) => {
|
|
2027
2027
|
n(c.default);
|
|
2028
2028
|
});
|
|
2029
2029
|
}, []);
|
|
2030
|
-
const
|
|
2030
|
+
const a = E(async () => {
|
|
2031
2031
|
await new Promise((c) => setTimeout(c, 1e3)), t === "toBack" ? i.continueToBack() : i.continueToFront(), o(!0);
|
|
2032
2032
|
}, [t, i]);
|
|
2033
|
-
return r ? /* @__PURE__ */ e(H, { size: "large" }) : l ? /* @__PURE__ */ e("div", { class: "IncodeFlipAnimation", children: [
|
|
2034
|
-
/* @__PURE__ */ e(y, { role: "status", className: "IncodeFlipAnimationTitle", children:
|
|
2033
|
+
return r ? /* @__PURE__ */ e(H, { size: "large", title: `${s("webcam.loading")}...` }) : l ? /* @__PURE__ */ e("div", { class: "IncodeFlipAnimation", children: [
|
|
2034
|
+
/* @__PURE__ */ e(y, { role: "status", className: "IncodeFlipAnimationTitle", children: s(t === "toBack" ? "idv2.flipAnimation.title" : "idv2.flipAnimation.titleToFront") }),
|
|
2035
2035
|
/* @__PURE__ */ e(_, { size: 32 }),
|
|
2036
2036
|
/* @__PURE__ */ e(
|
|
2037
2037
|
D,
|
|
@@ -2039,7 +2039,7 @@ const U1 = ({ manager: i, state: t }) => {
|
|
|
2039
2039
|
animationData: l,
|
|
2040
2040
|
loop: !1,
|
|
2041
2041
|
reverse: t === "toFront",
|
|
2042
|
-
onComplete:
|
|
2042
|
+
onComplete: a
|
|
2043
2043
|
}
|
|
2044
2044
|
)
|
|
2045
2045
|
] }) : null;
|
|
@@ -6,7 +6,7 @@ import "../uiConfig-DmIn-g8M.js";
|
|
|
6
6
|
import { E as h } from "../errorIcon-DOuc6ONw.js";
|
|
7
7
|
import { S as c } from "../successIcon-BZphSsQr.js";
|
|
8
8
|
import { W as I } from "../warningIcon-xqaHPxjF.js";
|
|
9
|
-
import { O as V } from "../otpInput-
|
|
9
|
+
import { O as V } from "../otpInput-CMi5-n2O.js";
|
|
10
10
|
import { P as r } from "../page-D4OThpFS.js";
|
|
11
11
|
import { S as G } from "../spinner-CLwSl2tJ.js";
|
|
12
12
|
import { r as S } from "../incodeModule-C4XIllao.js";
|
package/dist/id/id.es.js
CHANGED
|
@@ -5,7 +5,7 @@ import "@incodetech/core";
|
|
|
5
5
|
import { P as f } from "../permissions-BeU3HuVB.js";
|
|
6
6
|
import { r as l } from "../incodeModule-C4XIllao.js";
|
|
7
7
|
import { P as h } from "../processing-Ss26Ad0W.js";
|
|
8
|
-
import { b as C, T as I, F as a, C as g, c as y, I as F } from "../flipAnimation-
|
|
8
|
+
import { b as C, T as I, F as a, C as g, c as y, I as F } from "../flipAnimation-r4wJkacO.js";
|
|
9
9
|
import "../captureOverlay-wQmz2Z5r.js";
|
|
10
10
|
import "../uiConfig-DmIn-g8M.js";
|
|
11
11
|
import "../typography-CBPoLoAP.js";
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { b as B, u as r, S as A, B as M } from "./button-DXIWeie9.js";
|
|
2
|
+
import { d as N, A as s, q as y, y as C } from "./vendor-preact-BoMmvSgn.js";
|
|
3
|
+
import { a as E } from "./inputComposed-QzDneavl.js";
|
|
4
|
+
import "./uiConfig-DmIn-g8M.js";
|
|
5
|
+
const u = 6, G = (o) => {
|
|
6
|
+
const c = Math.floor(o / 60), l = o % 60;
|
|
7
|
+
return `${c}:${l.toString().padStart(2, "0")}`;
|
|
8
|
+
}, b = (o) => o.replace(/[^a-zA-Z0-9]/g, "").toUpperCase().slice(0, u), L = ({
|
|
9
|
+
resendTimer: o,
|
|
10
|
+
canResend: c,
|
|
11
|
+
error: l,
|
|
12
|
+
onSubmit: g,
|
|
13
|
+
onResend: z,
|
|
14
|
+
onBack: D,
|
|
15
|
+
backLinkText: P = "otp.changePhoneNumber",
|
|
16
|
+
disabled: f = !1,
|
|
17
|
+
isLoading: p = !1
|
|
18
|
+
}) => {
|
|
19
|
+
const { t: n } = B(), [a, m] = N(""), x = s(null), S = s(0), d = s(null), T = s(null), k = s(c), v = s(!1), O = s(), i = y((t) => {
|
|
20
|
+
const e = T.current;
|
|
21
|
+
e && (clearTimeout(O.current), e.textContent = "", O.current = setTimeout(() => {
|
|
22
|
+
e.textContent = t;
|
|
23
|
+
}, 50));
|
|
24
|
+
}, []);
|
|
25
|
+
C(() => {
|
|
26
|
+
const t = !k.current;
|
|
27
|
+
return k.current = c, t && c && i(n("otp.resendCodeAvailable")), () => clearTimeout(O.current);
|
|
28
|
+
}, [c, i, n]), C(() => {
|
|
29
|
+
l && (d.current = null, setTimeout(() => {
|
|
30
|
+
x.current?.focus();
|
|
31
|
+
}, 0));
|
|
32
|
+
}, [l]);
|
|
33
|
+
const h = y(
|
|
34
|
+
(t) => {
|
|
35
|
+
const e = b(t);
|
|
36
|
+
e.length !== u || p || d.current !== e && (d.current = e, g(e));
|
|
37
|
+
},
|
|
38
|
+
[p, g]
|
|
39
|
+
);
|
|
40
|
+
C(() => {
|
|
41
|
+
if (!a) return;
|
|
42
|
+
const t = a.length === u && S.current < u;
|
|
43
|
+
S.current = a.length, t && h(a);
|
|
44
|
+
}, [a, h]);
|
|
45
|
+
const R = (t) => {
|
|
46
|
+
const e = t.target;
|
|
47
|
+
m(b(e.value));
|
|
48
|
+
}, $ = (t) => {
|
|
49
|
+
t.preventDefault();
|
|
50
|
+
const e = t.clipboardData?.getData("text") || "", I = b(e);
|
|
51
|
+
I && (m(I), I.length === u && h(I));
|
|
52
|
+
};
|
|
53
|
+
C(() => {
|
|
54
|
+
if (c || o <= 0) {
|
|
55
|
+
v.current = !1;
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (!v.current) {
|
|
59
|
+
v.current = !0, i(n("otp.timerStarted", { time: String(o) }));
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
o === 10 ? i(n("otp.timerTenSeconds")) : o === 5 && i(n("otp.timerFiveSeconds"));
|
|
63
|
+
}, [o, c, i, n]);
|
|
64
|
+
const w = () => {
|
|
65
|
+
if (!c && o > 0)
|
|
66
|
+
return /* @__PURE__ */ r("div", { class: "IncodeOtpInputActions", children: /* @__PURE__ */ r("p", { class: "IncodeOtpInputTimerText", "data-testid": "otp-timer", children: n("otp.resendCountdown", { time: G(o) }) }) });
|
|
67
|
+
const t = () => {
|
|
68
|
+
d.current = null, m(""), z();
|
|
69
|
+
}, e = () => {
|
|
70
|
+
d.current = null, m(""), D();
|
|
71
|
+
};
|
|
72
|
+
return /* @__PURE__ */ r("div", { class: "IncodeOtpInputActions", children: /* @__PURE__ */ r(
|
|
73
|
+
"p",
|
|
74
|
+
{
|
|
75
|
+
class: `IncodeOtpInputResendText ${f ? "IncodeOtpInputResendTextDisabled" : ""}`,
|
|
76
|
+
"data-testid": "otp-resend-section",
|
|
77
|
+
children: [
|
|
78
|
+
n("otp.didYouNotGetIt"),
|
|
79
|
+
/* @__PURE__ */ r(
|
|
80
|
+
"button",
|
|
81
|
+
{
|
|
82
|
+
type: "button",
|
|
83
|
+
class: "IncodeOtpInputLink",
|
|
84
|
+
onClick: t,
|
|
85
|
+
disabled: f || !c,
|
|
86
|
+
"data-testid": "otp-resend",
|
|
87
|
+
children: n("otp.resendCode")
|
|
88
|
+
}
|
|
89
|
+
),
|
|
90
|
+
` ${n("otp.or")} `,
|
|
91
|
+
/* @__PURE__ */ r(
|
|
92
|
+
"button",
|
|
93
|
+
{
|
|
94
|
+
type: "button",
|
|
95
|
+
class: "IncodeOtpInputLink",
|
|
96
|
+
onClick: e,
|
|
97
|
+
disabled: f,
|
|
98
|
+
"data-testid": "otp-back",
|
|
99
|
+
children: n(P)
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
) });
|
|
105
|
+
};
|
|
106
|
+
return /* @__PURE__ */ r("div", { class: "IncodeOtpInput IncodeOtpInputComposed", children: [
|
|
107
|
+
/* @__PURE__ */ r(
|
|
108
|
+
"div",
|
|
109
|
+
{
|
|
110
|
+
ref: T,
|
|
111
|
+
class: "IncodeSrOnly",
|
|
112
|
+
"aria-live": "polite",
|
|
113
|
+
"aria-atomic": "true"
|
|
114
|
+
}
|
|
115
|
+
),
|
|
116
|
+
/* @__PURE__ */ r(
|
|
117
|
+
E,
|
|
118
|
+
{
|
|
119
|
+
id: "otp-code",
|
|
120
|
+
type: "text",
|
|
121
|
+
inputMode: "text",
|
|
122
|
+
ref: x,
|
|
123
|
+
maxLength: u,
|
|
124
|
+
value: a,
|
|
125
|
+
error: l,
|
|
126
|
+
onInput: R,
|
|
127
|
+
onPaste: $,
|
|
128
|
+
disabled: f || p,
|
|
129
|
+
autocomplete: "one-time-code",
|
|
130
|
+
"data-testid": "otp-input-0",
|
|
131
|
+
"aria-label": n("otp.verificationCode"),
|
|
132
|
+
class: "IncodeOtpSingleInput",
|
|
133
|
+
showErrorIcon: !0
|
|
134
|
+
}
|
|
135
|
+
),
|
|
136
|
+
/* @__PURE__ */ r(A, {}),
|
|
137
|
+
/* @__PURE__ */ r(
|
|
138
|
+
M,
|
|
139
|
+
{
|
|
140
|
+
onClick: () => {
|
|
141
|
+
h(a);
|
|
142
|
+
},
|
|
143
|
+
disabled: a.length < u || p,
|
|
144
|
+
isLoading: p,
|
|
145
|
+
"data-testid": "otp-submit",
|
|
146
|
+
children: n("common.continue")
|
|
147
|
+
}
|
|
148
|
+
),
|
|
149
|
+
/* @__PURE__ */ r(A, { size: 12 }),
|
|
150
|
+
w()
|
|
151
|
+
] });
|
|
152
|
+
};
|
|
153
|
+
export {
|
|
154
|
+
L as O
|
|
155
|
+
};
|
package/dist/phone/phone.es.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { u as
|
|
1
|
+
import { u as n, I as O, b as C, a as E, S as g, B as v } from "../button-DXIWeie9.js";
|
|
2
2
|
import { createPhoneManager as w } from "@incodetech/core/phone";
|
|
3
3
|
import { d as S } from "../vendor-preact-BoMmvSgn.js";
|
|
4
4
|
import "../uiConfig-DmIn-g8M.js";
|
|
5
5
|
import "@incodetech/core";
|
|
6
6
|
import { C as y } from "../checkbox-wo8qk7tM.js";
|
|
7
|
-
import { O as k } from "../otpInput-
|
|
7
|
+
import { O as k } from "../otpInput-CMi5-n2O.js";
|
|
8
8
|
import { P } from "../page-D4OThpFS.js";
|
|
9
9
|
import { P as R } from "../phoneInputComposed-BAFZQ4Y8.js";
|
|
10
10
|
import { r as V } from "../incodeModule-C4XIllao.js";
|
|
11
11
|
const B = ({
|
|
12
12
|
config: r,
|
|
13
13
|
manager: s,
|
|
14
|
-
onFinish:
|
|
15
|
-
onError:
|
|
14
|
+
onFinish: p,
|
|
15
|
+
onError: d
|
|
16
16
|
}) => {
|
|
17
|
-
const { t:
|
|
17
|
+
const { t: e } = C(), [t, o] = E(
|
|
18
18
|
() => {
|
|
19
19
|
if (s) return s;
|
|
20
20
|
if (!r)
|
|
@@ -24,16 +24,16 @@ const B = ({
|
|
|
24
24
|
{ manageLifecycle: !s }
|
|
25
25
|
), [b, I] = S(!1);
|
|
26
26
|
if (t.status === "idle" || t.status === "loadingPrefill" || t.status === "inputting" || t.status === "submitting" || t.status === "sendingInitialOtp") {
|
|
27
|
-
const i = t.status === "idle" || t.status === "loadingPrefill" || t.status === "submitting" || t.status === "sendingInitialOtp", a = t.status === "inputting" ? t.countryCode : "US", l = t.status === "inputting" ? t.prefilledPhone : void 0, c = t.status === "inputting" && t.phoneError ?
|
|
28
|
-
return /* @__PURE__ */
|
|
27
|
+
const i = t.status === "idle" || t.status === "loadingPrefill" || t.status === "submitting" || t.status === "sendingInitialOtp", a = t.status === "inputting" ? t.countryCode : "US", l = t.status === "inputting" ? t.prefilledPhone : void 0, c = t.status === "inputting" && t.phoneError ? e(t.phoneError) : void 0, u = t.status === "inputting" ? t.otpVerification ?? !1 : !1, h = t.status === "inputting" ? t.optinEnabled ?? !1 : !1;
|
|
28
|
+
return /* @__PURE__ */ n(
|
|
29
29
|
P,
|
|
30
30
|
{
|
|
31
31
|
className: "IncodePhonePage",
|
|
32
|
-
title:
|
|
33
|
-
subtitle: u ?
|
|
32
|
+
title: e("phone.verify"),
|
|
33
|
+
subtitle: u ? e("email.willSendCode") : void 0,
|
|
34
34
|
children: [
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */
|
|
35
|
+
/* @__PURE__ */ n("div", { class: "IncodePhoneInputContainer", children: [
|
|
36
|
+
/* @__PURE__ */ n(
|
|
37
37
|
R,
|
|
38
38
|
{
|
|
39
39
|
id: "phone",
|
|
@@ -48,61 +48,70 @@ const B = ({
|
|
|
48
48
|
showErrorIcon: !0
|
|
49
49
|
}
|
|
50
50
|
),
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
h && /* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ n(g, { size: 16 }),
|
|
52
|
+
h && /* @__PURE__ */ n(
|
|
53
53
|
y,
|
|
54
54
|
{
|
|
55
55
|
id: "phone-optin",
|
|
56
|
-
label:
|
|
56
|
+
label: e("phone.optIn"),
|
|
57
57
|
size: "s",
|
|
58
58
|
onChange: (m) => o.setOptInGranted(m.target.checked)
|
|
59
59
|
}
|
|
60
60
|
)
|
|
61
61
|
] }),
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ n(g, {}),
|
|
63
|
+
/* @__PURE__ */ n(
|
|
64
64
|
v,
|
|
65
65
|
{
|
|
66
66
|
onClick: () => o.submit(),
|
|
67
67
|
disabled: !b,
|
|
68
68
|
isLoading: i,
|
|
69
69
|
"data-testid": "phone-submit",
|
|
70
|
-
children:
|
|
70
|
+
children: e("common.continue")
|
|
71
71
|
}
|
|
72
72
|
)
|
|
73
73
|
]
|
|
74
|
-
}
|
|
74
|
+
},
|
|
75
|
+
"phone-input"
|
|
75
76
|
);
|
|
76
77
|
}
|
|
77
78
|
if (t.status === "awaitingOtp" || t.status === "verifyingOtp" || t.status === "otpError" || t.status === "resendingOtp") {
|
|
78
79
|
const i = t.status === "verifyingOtp", a = t.status === "otpError", l = t.status === "awaitingOtp", c = t.status === "resendingOtp", u = l || a || i;
|
|
79
|
-
return /* @__PURE__ */
|
|
80
|
-
|
|
80
|
+
return /* @__PURE__ */ n(
|
|
81
|
+
P,
|
|
81
82
|
{
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
83
|
+
className: "IncodePhonePage",
|
|
84
|
+
title: e("otp.enterCodeSMS"),
|
|
85
|
+
children: /* @__PURE__ */ n(
|
|
86
|
+
k,
|
|
87
|
+
{
|
|
88
|
+
resendTimer: u ? t.resendTimer : 0,
|
|
89
|
+
canResend: u ? t.canResend : !1,
|
|
90
|
+
isLoading: i,
|
|
91
|
+
disabled: c || i,
|
|
92
|
+
error: a ? e(t.otpError) : void 0,
|
|
93
|
+
onSubmit: (h) => o.submitOtp(h),
|
|
94
|
+
onResend: () => o.resendOtp(),
|
|
95
|
+
onBack: () => o.back()
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
},
|
|
99
|
+
"phone-otp"
|
|
100
|
+
);
|
|
92
101
|
}
|
|
93
|
-
return t.status === "finished" ? (
|
|
102
|
+
return t.status === "finished" ? (p?.(), null) : (t.status === "error" && d?.(t.error), null);
|
|
94
103
|
}, L = ({
|
|
95
104
|
config: r,
|
|
96
105
|
manager: s,
|
|
97
|
-
onFinish:
|
|
98
|
-
onError:
|
|
99
|
-
}) => /* @__PURE__ */
|
|
106
|
+
onFinish: p,
|
|
107
|
+
onError: d
|
|
108
|
+
}) => /* @__PURE__ */ n(O, { children: r || s ? /* @__PURE__ */ n(
|
|
100
109
|
B,
|
|
101
110
|
{
|
|
102
111
|
config: r,
|
|
103
112
|
manager: s,
|
|
104
|
-
onFinish:
|
|
105
|
-
onError:
|
|
113
|
+
onFinish: p,
|
|
114
|
+
onError: d
|
|
106
115
|
}
|
|
107
116
|
) : null });
|
|
108
117
|
V(L, "incode-phone");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@incodetech/web",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20260403-10f7d94",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.es.js",
|
|
6
6
|
"types": "./dist/types/index.d.ts",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"qrcode": "^1.5.4",
|
|
138
138
|
"signature_pad": "^5.1.3",
|
|
139
139
|
"tailwindcss": "^4.1.17",
|
|
140
|
-
"@incodetech/core": "0.0.0-dev-
|
|
140
|
+
"@incodetech/core": "0.0.0-dev-20260403-10f7d94"
|
|
141
141
|
},
|
|
142
142
|
"devDependencies": {
|
|
143
143
|
"@microsoft/api-extractor": "^7.53.3",
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { b as M, u as n, S as A, B as S } from "./button-DXIWeie9.js";
|
|
2
|
-
import { d as N, A as u, q as y, y as C } from "./vendor-preact-BoMmvSgn.js";
|
|
3
|
-
import { a as E } from "./inputComposed-QzDneavl.js";
|
|
4
|
-
import "./uiConfig-DmIn-g8M.js";
|
|
5
|
-
const a = 6, F = (s) => {
|
|
6
|
-
const r = Math.floor(s / 60), i = s % 60;
|
|
7
|
-
return `${r}:${i.toString().padStart(2, "0")}`;
|
|
8
|
-
}, v = (s) => s.replace(/[^a-zA-Z0-9]/g, "").toUpperCase().slice(0, a), L = ({
|
|
9
|
-
resendTimer: s,
|
|
10
|
-
canResend: r,
|
|
11
|
-
error: i,
|
|
12
|
-
onSubmit: O,
|
|
13
|
-
onResend: z,
|
|
14
|
-
onBack: R,
|
|
15
|
-
backLinkText: D = "otp.changePhoneNumber",
|
|
16
|
-
disabled: p = !1,
|
|
17
|
-
isLoading: l = !1
|
|
18
|
-
}) => {
|
|
19
|
-
const { t: o } = M(), [c, f] = N(""), m = u(null), g = u(0), d = u(null), x = u(null), T = u(r), b = u(), k = y((t) => {
|
|
20
|
-
const e = x.current;
|
|
21
|
-
e && (clearTimeout(b.current), e.textContent = "", b.current = setTimeout(() => {
|
|
22
|
-
e.textContent = t;
|
|
23
|
-
}, 50));
|
|
24
|
-
}, []);
|
|
25
|
-
C(() => {
|
|
26
|
-
const t = !T.current;
|
|
27
|
-
return T.current = r, t && r && k(o("otp.resendCodeAvailable")), () => clearTimeout(b.current);
|
|
28
|
-
}, [r, k, o]), C(() => {
|
|
29
|
-
m.current && m.current.focus();
|
|
30
|
-
}, []), C(() => {
|
|
31
|
-
i && (d.current = null, setTimeout(() => {
|
|
32
|
-
m.current?.focus();
|
|
33
|
-
}, 0));
|
|
34
|
-
}, [i]);
|
|
35
|
-
const h = y(
|
|
36
|
-
(t) => {
|
|
37
|
-
const e = v(t);
|
|
38
|
-
e.length !== a || l || d.current !== e && (d.current = e, O(e));
|
|
39
|
-
},
|
|
40
|
-
[l, O]
|
|
41
|
-
);
|
|
42
|
-
C(() => {
|
|
43
|
-
if (!c) return;
|
|
44
|
-
const t = c.length === a && g.current < a;
|
|
45
|
-
g.current = c.length, t && h(c);
|
|
46
|
-
}, [c, h]);
|
|
47
|
-
const P = (t) => {
|
|
48
|
-
t.target.select();
|
|
49
|
-
}, $ = (t) => {
|
|
50
|
-
const e = t.target;
|
|
51
|
-
f(v(e.value));
|
|
52
|
-
}, w = (t) => {
|
|
53
|
-
t.preventDefault();
|
|
54
|
-
const e = t.clipboardData?.getData("text") || "", I = v(e);
|
|
55
|
-
I && (f(I), I.length === a && h(I));
|
|
56
|
-
}, B = () => {
|
|
57
|
-
if (!r && s > 0)
|
|
58
|
-
return /* @__PURE__ */ n("div", { class: "IncodeOtpInputActions", children: /* @__PURE__ */ n(S, { variant: "link", disabled: !0, "data-testid": "otp-timer", children: o("otp.resendCountdown", { time: F(s) }) }) });
|
|
59
|
-
const t = () => {
|
|
60
|
-
d.current = null, f(""), z();
|
|
61
|
-
}, e = () => {
|
|
62
|
-
d.current = null, f(""), R();
|
|
63
|
-
};
|
|
64
|
-
return /* @__PURE__ */ n("div", { class: "IncodeOtpInputActions", children: /* @__PURE__ */ n(
|
|
65
|
-
"p",
|
|
66
|
-
{
|
|
67
|
-
class: `IncodeOtpInputResendText ${p ? "IncodeOtpInputResendTextDisabled" : ""}`,
|
|
68
|
-
"data-testid": "otp-resend-section",
|
|
69
|
-
children: [
|
|
70
|
-
o("otp.didYouNotGetIt"),
|
|
71
|
-
/* @__PURE__ */ n(
|
|
72
|
-
"button",
|
|
73
|
-
{
|
|
74
|
-
type: "button",
|
|
75
|
-
class: "IncodeOtpInputLink",
|
|
76
|
-
onClick: t,
|
|
77
|
-
disabled: p || !r,
|
|
78
|
-
"data-testid": "otp-resend",
|
|
79
|
-
children: o("otp.resendCode")
|
|
80
|
-
}
|
|
81
|
-
),
|
|
82
|
-
` ${o("otp.or")} `,
|
|
83
|
-
/* @__PURE__ */ n(
|
|
84
|
-
"button",
|
|
85
|
-
{
|
|
86
|
-
type: "button",
|
|
87
|
-
class: "IncodeOtpInputLink",
|
|
88
|
-
onClick: e,
|
|
89
|
-
disabled: p,
|
|
90
|
-
"data-testid": "otp-back",
|
|
91
|
-
children: o(D)
|
|
92
|
-
}
|
|
93
|
-
)
|
|
94
|
-
]
|
|
95
|
-
}
|
|
96
|
-
) });
|
|
97
|
-
};
|
|
98
|
-
return /* @__PURE__ */ n("div", { class: "IncodeOtpInput IncodeOtpInputComposed", children: [
|
|
99
|
-
/* @__PURE__ */ n(
|
|
100
|
-
"div",
|
|
101
|
-
{
|
|
102
|
-
ref: x,
|
|
103
|
-
class: "IncodeSrOnly",
|
|
104
|
-
"aria-live": "polite",
|
|
105
|
-
"aria-atomic": "true"
|
|
106
|
-
}
|
|
107
|
-
),
|
|
108
|
-
/* @__PURE__ */ n(
|
|
109
|
-
E,
|
|
110
|
-
{
|
|
111
|
-
id: "otp-code",
|
|
112
|
-
type: "text",
|
|
113
|
-
inputMode: "text",
|
|
114
|
-
ref: m,
|
|
115
|
-
maxLength: a,
|
|
116
|
-
value: c,
|
|
117
|
-
error: i,
|
|
118
|
-
onInput: $,
|
|
119
|
-
onPaste: w,
|
|
120
|
-
onFocus: P,
|
|
121
|
-
disabled: p || l,
|
|
122
|
-
autocomplete: "one-time-code",
|
|
123
|
-
"data-testid": "otp-input-0",
|
|
124
|
-
"aria-label": o("otp.verificationCode"),
|
|
125
|
-
class: "IncodeOtpSingleInput",
|
|
126
|
-
showErrorIcon: !0
|
|
127
|
-
}
|
|
128
|
-
),
|
|
129
|
-
/* @__PURE__ */ n(A, {}),
|
|
130
|
-
/* @__PURE__ */ n(
|
|
131
|
-
S,
|
|
132
|
-
{
|
|
133
|
-
onClick: () => {
|
|
134
|
-
h(c);
|
|
135
|
-
},
|
|
136
|
-
disabled: c.length < a || l,
|
|
137
|
-
isLoading: l,
|
|
138
|
-
"data-testid": "otp-submit",
|
|
139
|
-
children: o("common.continue")
|
|
140
|
-
}
|
|
141
|
-
),
|
|
142
|
-
/* @__PURE__ */ n(A, { size: 12 }),
|
|
143
|
-
B()
|
|
144
|
-
] });
|
|
145
|
-
};
|
|
146
|
-
export {
|
|
147
|
-
L as O
|
|
148
|
-
};
|