@incodetech/web 0.0.0-dev-20260407-4580f1c → 0.0.0-dev-20260407-2c382da
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-D1H_js4X.js +2607 -0
- package/dist/Trans-aTzdT_SA.js +55 -0
- package/dist/addressAutocomplete-C8-wL1j_.js +153 -0
- package/dist/aligndevicelottie-DlQCRPfM.js +29 -0
- package/dist/antifraud/antifraud.es.js +18 -17
- package/dist/antifraud/styles.css +1 -1
- package/dist/authentication/authentication.es.js +50 -28
- package/dist/back-horizontal-hint-CSlf9KI1.js +5 -0
- package/dist/back-tutorial-An9AcMSe.js +29 -0
- package/dist/back-vertical-hint-CNieqiCr.js +5 -0
- package/dist/backdevicelottie-B4NgyWmX.js +29 -0
- package/dist/base.css +67 -327
- package/dist/blurdevicelottie-_BZRug1c.js +29 -0
- package/dist/browser-ponyfill-B6W6hHVY.js +344 -0
- package/dist/button-CE9kRlem.js +184 -0
- package/dist/cameraView-C2X7klNb.js +55 -0
- package/dist/captureOverlay-tCb4R4WE.js +592 -0
- package/dist/checkbox-B5X-mfqq.js +137 -0
- package/dist/chevronDown-DSHaPKbi.js +23 -0
- package/dist/closeIcon-9Hc97omv.js +28 -0
- package/dist/consent/consent.es.js +89 -82
- package/dist/consent/styles.css +1 -1
- package/dist/countries-DfLkrF0x.js +616 -0
- package/dist/curp-validation/curp-validation.es.js +313 -271
- package/dist/curp-validation/styles.css +1 -1
- package/dist/dateInputComposed-C7PCzh-U.js +173 -0
- package/dist/document-capture/styles.css +1 -1
- package/dist/documentCapture-C0mO-RGE.js +692 -0
- package/dist/dropdownComposed-BpinYlrx.js +367 -0
- package/dist/ekyb/styles.css +1 -1
- package/dist/ekybModule-Dr6LJUg-.js +357 -0
- package/dist/ekyc/styles.css +1 -1
- package/dist/ekycModule-C3mswduI.js +291 -0
- package/dist/email/email.es.js +154 -110
- package/dist/email/styles.css +1 -1
- package/dist/errorContent-Cb8nmQAE.js +44 -0
- package/dist/errorIcon-DEARBrGx.js +26 -0
- package/dist/extensibility.es.js +150 -22
- package/dist/face-match/styles.css +73 -147
- package/dist/faceMatch-DbDp7D3d.js +237 -0
- package/dist/fileIcon-CCSvS10T.js +52 -0
- package/dist/flip-animation-COR596wy.js +29 -0
- package/dist/flipAnimation-BqV462TA.js +2059 -0
- package/dist/flow/flow.es.js +2613 -2273
- package/dist/flow/styles.css +73 -432
- package/dist/formField-CP6wDdfA.js +106 -0
- package/dist/front-horizontal-hint-lRLKd7vY.js +7 -0
- package/dist/front-vertical-hint-qQoJXRE3.js +7 -0
- package/dist/frontdevicelottie-KhKxT5n9.js +29 -0
- package/dist/geolocation/geolocation.es.js +832 -852
- package/dist/geolocation/styles.css +1 -1
- package/dist/glaredevicelottie-DLuIStvb.js +29 -0
- package/dist/governmentValidation/governmentValidation.es.js +106 -100
- package/dist/governmentValidation/styles.css +1 -1
- package/dist/id/id.es.js +59 -53
- package/dist/id/styles.css +1 -1
- package/dist/id-laser-h-BBV3r3rz.js +29 -0
- package/dist/id-laser-v-BTHJaSfx.js +29 -0
- package/dist/id-tutorial-B-F5Q28m.js +29 -0
- package/dist/incodeModule-C4XIllao.js +96 -0
- package/dist/index.es.js +25 -4
- package/dist/inputComposed-fUbAGrDy.js +103 -0
- package/dist/instance-BWYzq8dk.js +2163 -0
- package/dist/loadingIcon-DmuPXh70.js +195 -0
- package/dist/mandatoryConsent-5xPI0cor.js +94 -0
- package/dist/manualCaptureButton-BvFmTyJe.js +372 -0
- package/dist/numberedStep-DwUB__mh.js +5 -0
- package/dist/otpInput-BFXhqFRT.js +156 -0
- package/dist/page-SrUl0qtN.js +69 -0
- package/dist/passport-horizontal-hint-BCtpMp1Y.js +5 -0
- package/dist/passport-tutorial-CaYBFTqt.js +29 -0
- package/dist/passport-vertical-hint-GaLnzqHP.js +5 -0
- package/dist/permissions-DT4Fz9MR.js +709 -0
- package/dist/phone/phone.es.js +121 -87
- package/dist/phone/styles.css +1 -1
- package/dist/phoneInput-CGr8TxOO.js +158 -0
- package/dist/phoneInputComposed-Cm9O2Jba.js +206 -0
- package/dist/processing-szVOCQwZ.js +19 -0
- package/dist/redirect-to-mobile/styles.css +1 -1
- package/dist/richText-cspvNz2a.js +1807 -0
- package/dist/selfie/selfie.es.js +50 -29
- package/dist/selfie/styles.css +66 -170
- package/dist/selfieTutorial-Dm_p0ke9.js +29 -0
- package/dist/signature/signature.es.js +707 -557
- package/dist/signature/styles.css +1 -1
- package/dist/spinner-DygONskw.js +60 -0
- package/dist/successIcon-Bjsdc4lF.js +26 -0
- package/dist/tutorial-Cdz1025D.js +473 -0
- package/dist/types/ekyb/styles.d.ts +1 -0
- package/dist/types/ekyc/styles.d.ts +1 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/typography-BDACYR5i.js +14 -0
- package/dist/uiConfig-Dnt-2YWB.js +23 -0
- package/dist/useMediaQuery-lJdQBmC2.js +18 -0
- package/dist/vendor-preact-BoMmvSgn.js +694 -0
- package/dist/warningIcon-DQq_MrOB.js +26 -0
- package/package.json +11 -8
- package/dist/AsYouType-DPWqJvFu.js +0 -2482
- package/dist/addressAutocomplete-B3f6PGTT.js +0 -108
- package/dist/aligndevicelottie-C9xl1spu.js +0 -12757
- package/dist/back-horizontal-hint-Be3dUGk6.js +0 -137
- package/dist/back-tutorial-BNTyW-1N.js +0 -14584
- package/dist/back-vertical-hint-Bz_rnhd-.js +0 -128
- package/dist/backdevicelottie-DBB1YCtW.js +0 -16678
- package/dist/blurdevicelottie-9WvZCZ6C.js +0 -15939
- package/dist/browser-ponyfill-B4Qc6yfW.js +0 -299
- package/dist/button-DhL5eRT3.js +0 -123
- package/dist/checkbox-l8NxPf4o.js +0 -85
- package/dist/countries-y2ydYDhN.js +0 -8323
- package/dist/dateInputComposed-B9WqdYx9.js +0 -2
- package/dist/dateInputComposed-ndsGHX1M.js +0 -94
- package/dist/defineProperty-brqHEHA_.js +0 -39
- package/dist/documentCapture-wDgRLdon.js +0 -784
- package/dist/dropdownComposed-_Ey7wJNG.js +0 -258
- package/dist/ekyb/ekyb.es.js +0 -2
- package/dist/ekybModule-BBOm1y49.js +0 -2
- package/dist/ekybModule-fz6i9ZRt.js +0 -286
- package/dist/ekyc/ekyc.es.js +0 -2
- package/dist/ekycModule-SeTFG3AJ.js +0 -233
- package/dist/ekycModule-hxIcNX8n.js +0 -2
- package/dist/extensibility-DJihqIzM.js +0 -2248
- package/dist/faceMatch-DH8sLx34.js +0 -191
- package/dist/flip-animation-DOJzdXB-.js +0 -6983
- package/dist/formField-BRTbY8w9.js +0 -100
- package/dist/front-horizontal-hint-aGAhadA2.js +0 -380
- package/dist/front-vertical-hint-DZz1VeNp.js +0 -420
- package/dist/frontdevicelottie-DadDp6be.js +0 -17302
- package/dist/glaredevicelottie-BfI84cPw.js +0 -14466
- package/dist/i18n-DZOHbK9q.js +0 -1916
- package/dist/icons-BHbofCgJ.js +0 -245
- package/dist/id-laser-h-BWyU3VgL.js +0 -467
- package/dist/id-laser-v-JiWXUlv0.js +0 -467
- package/dist/id-tutorial-Cc9xg5_J.js +0 -13152
- package/dist/incodeModule-Bf6yJ8RB.js +0 -18
- package/dist/inputComposed-BhbfD8Ru.js +0 -77
- package/dist/loadingIcon-CeQt7Zgb.js +0 -146
- package/dist/mandatoryConsent-LBS8E0rj.js +0 -101
- package/dist/numberedStep-CQVRixRP.js +0 -11
- package/dist/otpInput-CDIG9el7.js +0 -143
- package/dist/page-SvlJWUfz.js +0 -61
- package/dist/passport-horizontal-hint-CFsGs7Dp.js +0 -293
- package/dist/passport-tutorial-z0LN7Hsp.js +0 -11688
- package/dist/passport-vertical-hint-BnCpKWeN.js +0 -267
- package/dist/phoneInput-C9T_8FJt.js +0 -138
- package/dist/phoneInputComposed-B-0zieIW.js +0 -407
- package/dist/processing-B5zhNH6I.js +0 -15
- package/dist/richText-Db0PfpkE.js +0 -1973
- package/dist/rolldown-runtime-CjdbFOpI.js +0 -13
- package/dist/selfieTutorial-B0MIyPrk.js +0 -2676
- package/dist/setup-Dq2bzNKH.js +0 -15
- package/dist/spacer-DCljE53A.js +0 -59
- package/dist/spinner-Bk0YuoLu.js +0 -1
- package/dist/spinner-snIGzmm8.js +0 -41
- package/dist/successIcon-AHrfmJvv.js +0 -17
- package/dist/tutorial-DNOd11tg.js +0 -2780
- package/dist/types/ekyb.d.ts +0 -29
- package/dist/types/ekyc.d.ts +0 -29
- package/dist/typography-BNbFNFek.js +0 -1
- package/dist/typography-DvHeVWfY.js +0 -29
- package/dist/uiConfig-CwpQ-IM6.js +0 -20
- package/dist/vendor-preact-D6SntenC.js +0 -958
- package/dist/warningIcon-Cvj-ayg1.js +0 -17
package/dist/phone/phone.es.js
CHANGED
|
@@ -1,87 +1,121 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
1
|
+
import { u as n, I as O, b as C, a as E, S as g } from "../loadingIcon-DmuPXh70.js";
|
|
2
|
+
import { createPhoneManager as v } from "@incodetech/core/phone";
|
|
3
|
+
import { d as w } from "../vendor-preact-BoMmvSgn.js";
|
|
4
|
+
import "../instance-BWYzq8dk.js";
|
|
5
|
+
import "@incodetech/core";
|
|
6
|
+
import { B as S } from "../button-CE9kRlem.js";
|
|
7
|
+
import { C as y } from "../checkbox-B5X-mfqq.js";
|
|
8
|
+
import { O as k } from "../otpInput-BFXhqFRT.js";
|
|
9
|
+
import { P } from "../page-SrUl0qtN.js";
|
|
10
|
+
import { P as R } from "../phoneInputComposed-Cm9O2Jba.js";
|
|
11
|
+
import { r as V } from "../incodeModule-C4XIllao.js";
|
|
12
|
+
const B = ({
|
|
13
|
+
config: r,
|
|
14
|
+
manager: s,
|
|
15
|
+
onFinish: p,
|
|
16
|
+
onError: d
|
|
17
|
+
}) => {
|
|
18
|
+
const { t: e } = C(), [t, o] = E(
|
|
19
|
+
() => {
|
|
20
|
+
if (s) return s;
|
|
21
|
+
if (!r)
|
|
22
|
+
throw new Error("Phone config is required");
|
|
23
|
+
return v({ config: r });
|
|
24
|
+
},
|
|
25
|
+
{ manageLifecycle: !s }
|
|
26
|
+
), [b, I] = w(!1);
|
|
27
|
+
if (t.status === "idle" || t.status === "loadingPrefill" || t.status === "inputting" || t.status === "submitting" || t.status === "sendingInitialOtp") {
|
|
28
|
+
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;
|
|
29
|
+
return /* @__PURE__ */ n(
|
|
30
|
+
P,
|
|
31
|
+
{
|
|
32
|
+
className: "IncodePhonePage",
|
|
33
|
+
title: e("phone.verify"),
|
|
34
|
+
subtitle: u ? e("email.willSendCode") : void 0,
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ n("div", { class: "IncodePhoneInputContainer", children: [
|
|
37
|
+
/* @__PURE__ */ n(
|
|
38
|
+
R,
|
|
39
|
+
{
|
|
40
|
+
id: "phone",
|
|
41
|
+
countryCode: a,
|
|
42
|
+
value: l,
|
|
43
|
+
error: c,
|
|
44
|
+
disabled: i,
|
|
45
|
+
onChange: (m, f) => {
|
|
46
|
+
o.setPhoneNumber(m, f), I(f);
|
|
47
|
+
},
|
|
48
|
+
"data-testid": "phone-input",
|
|
49
|
+
showErrorIcon: !0
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
/* @__PURE__ */ n(g, { size: 16 }),
|
|
53
|
+
h && /* @__PURE__ */ n(
|
|
54
|
+
y,
|
|
55
|
+
{
|
|
56
|
+
id: "phone-optin",
|
|
57
|
+
label: e("phone.optIn"),
|
|
58
|
+
size: "s",
|
|
59
|
+
onChange: (m) => o.setOptInGranted(m.target.checked)
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
] }),
|
|
63
|
+
/* @__PURE__ */ n(g, {}),
|
|
64
|
+
/* @__PURE__ */ n(
|
|
65
|
+
S,
|
|
66
|
+
{
|
|
67
|
+
onClick: () => o.submit(),
|
|
68
|
+
disabled: !b,
|
|
69
|
+
isLoading: i,
|
|
70
|
+
"data-testid": "phone-submit",
|
|
71
|
+
children: e("common.continue")
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
"phone-input"
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
if (t.status === "awaitingOtp" || t.status === "verifyingOtp" || t.status === "otpError" || t.status === "resendingOtp") {
|
|
80
|
+
const i = t.status === "verifyingOtp", a = t.status === "otpError", l = t.status === "awaitingOtp", c = t.status === "resendingOtp", u = l || a || i;
|
|
81
|
+
return /* @__PURE__ */ n(
|
|
82
|
+
P,
|
|
83
|
+
{
|
|
84
|
+
className: "IncodePhonePage",
|
|
85
|
+
title: e("otp.enterCodeSMS"),
|
|
86
|
+
children: /* @__PURE__ */ n(
|
|
87
|
+
k,
|
|
88
|
+
{
|
|
89
|
+
resendTimer: u ? t.resendTimer : 0,
|
|
90
|
+
canResend: u ? t.canResend : !1,
|
|
91
|
+
isLoading: i,
|
|
92
|
+
disabled: c || i,
|
|
93
|
+
error: a ? e(t.otpError) : void 0,
|
|
94
|
+
onSubmit: (h) => o.submitOtp(h),
|
|
95
|
+
onResend: () => o.resendOtp(),
|
|
96
|
+
onBack: () => o.back()
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
},
|
|
100
|
+
"phone-otp"
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
return t.status === "finished" ? (p?.(), null) : (t.status === "error" && d?.(t.error), null);
|
|
104
|
+
}, L = ({
|
|
105
|
+
config: r,
|
|
106
|
+
manager: s,
|
|
107
|
+
onFinish: p,
|
|
108
|
+
onError: d
|
|
109
|
+
}) => /* @__PURE__ */ n(O, { children: r || s ? /* @__PURE__ */ n(
|
|
110
|
+
B,
|
|
111
|
+
{
|
|
112
|
+
config: r,
|
|
113
|
+
manager: s,
|
|
114
|
+
onFinish: p,
|
|
115
|
+
onError: d
|
|
116
|
+
}
|
|
117
|
+
) : null });
|
|
118
|
+
V(L, "incode-phone");
|
|
119
|
+
export {
|
|
120
|
+
L as Phone
|
|
121
|
+
};
|
package/dist/phone/styles.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tailwindcss v4.
|
|
1
|
+
/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */
|
|
2
2
|
.IncodePhonePage .IncodePageContent {
|
|
3
3
|
padding-top: var(--spacing-32, var(--spacing-32, 32px));
|
|
4
4
|
padding-bottom: var(--spacing-16, var(--spacing-16, 16px));
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { u as n, S } from "./loadingIcon-DmuPXh70.js";
|
|
2
|
+
import { d as p, A as D, y as u, k as $ } from "./vendor-preact-BoMmvSgn.js";
|
|
3
|
+
import { g as b, c as g } from "./countries-DfLkrF0x.js";
|
|
4
|
+
import { C as z } from "./chevronDown-DSHaPKbi.js";
|
|
5
|
+
import { p as k, A } from "./AsYouType-D1H_js4X.js";
|
|
6
|
+
const M = ({
|
|
7
|
+
countryCode: P,
|
|
8
|
+
prefilledPhone: a,
|
|
9
|
+
phoneError: h,
|
|
10
|
+
optinEnabled: N = !1,
|
|
11
|
+
disabled: d = !1,
|
|
12
|
+
autoFocus: w = !1,
|
|
13
|
+
onPhoneChange: i,
|
|
14
|
+
onOptInChange: x
|
|
15
|
+
}) => {
|
|
16
|
+
const [c, l] = p(
|
|
17
|
+
null
|
|
18
|
+
), [r, I] = p(!1), [f, m] = p(""), [W, F] = p(!1), C = D(null), v = D(null);
|
|
19
|
+
u(() => {
|
|
20
|
+
const e = b(P);
|
|
21
|
+
l(e || g.find((o) => o.code === "US") || g[0]);
|
|
22
|
+
}, [P]), u(() => {
|
|
23
|
+
if (a && c) {
|
|
24
|
+
const e = a.startsWith("+") ? a : `+${a}`, o = k(e);
|
|
25
|
+
if (o?.isValid()) {
|
|
26
|
+
if (o.country && o.country !== c.code) {
|
|
27
|
+
const s = b(o.country);
|
|
28
|
+
s && l(s);
|
|
29
|
+
}
|
|
30
|
+
const y = new A(o.country).input(o.nationalNumber);
|
|
31
|
+
m(y), i(e, !0);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}, [a, c, i]), u(() => {
|
|
35
|
+
w && v.current?.focus();
|
|
36
|
+
}, [w]), u(() => {
|
|
37
|
+
const e = (o) => {
|
|
38
|
+
C.current && !C.current.contains(o.target) && I(!1);
|
|
39
|
+
};
|
|
40
|
+
return r && document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
41
|
+
}, [r]);
|
|
42
|
+
const O = (e, o) => {
|
|
43
|
+
const t = `${o.callingCode}${e.replace(/\D/g, "")}`;
|
|
44
|
+
try {
|
|
45
|
+
const s = k(
|
|
46
|
+
t,
|
|
47
|
+
o.code
|
|
48
|
+
)?.isValid() ?? !1;
|
|
49
|
+
i(t, s);
|
|
50
|
+
} catch {
|
|
51
|
+
i(t, !1);
|
|
52
|
+
}
|
|
53
|
+
}, R = (e) => {
|
|
54
|
+
const t = e.target.value;
|
|
55
|
+
if (c) {
|
|
56
|
+
const s = new A(c.code).input(t);
|
|
57
|
+
m(s), O(t, c);
|
|
58
|
+
} else
|
|
59
|
+
m(t);
|
|
60
|
+
}, V = (e) => {
|
|
61
|
+
l(e), I(!1), f && O(f, e);
|
|
62
|
+
}, j = (e) => {
|
|
63
|
+
const t = e.target.checked;
|
|
64
|
+
F(t), x?.(t);
|
|
65
|
+
};
|
|
66
|
+
return /* @__PURE__ */ n("div", { class: "IncodePhoneInput", children: /* @__PURE__ */ n("div", { class: "IncodePhoneInputContainer", children: [
|
|
67
|
+
/* @__PURE__ */ n("div", { class: "IncodePhoneInputRow", children: [
|
|
68
|
+
/* @__PURE__ */ n(
|
|
69
|
+
"div",
|
|
70
|
+
{
|
|
71
|
+
class: `IncodePhoneCountrySelector ${r ? "IncodePhoneCountrySelectorOpen" : ""} ${d ? "IncodePhoneCountrySelectorDisabled" : ""}`,
|
|
72
|
+
ref: C,
|
|
73
|
+
children: [
|
|
74
|
+
/* @__PURE__ */ n(
|
|
75
|
+
"button",
|
|
76
|
+
{
|
|
77
|
+
type: "button",
|
|
78
|
+
class: "IncodePhoneCountryButton",
|
|
79
|
+
onClick: () => {
|
|
80
|
+
d || I(!r);
|
|
81
|
+
},
|
|
82
|
+
disabled: d,
|
|
83
|
+
"aria-expanded": r,
|
|
84
|
+
"aria-haspopup": "listbox",
|
|
85
|
+
"data-testid": "phone-country-selector",
|
|
86
|
+
children: [
|
|
87
|
+
/* @__PURE__ */ n("span", { class: "IncodePhoneCountryFlag", "aria-hidden": "true", children: c?.emoji }),
|
|
88
|
+
/* @__PURE__ */ n("span", { class: "IncodePhoneCountryCode", children: c?.callingCode }),
|
|
89
|
+
/* @__PURE__ */ n(
|
|
90
|
+
z,
|
|
91
|
+
{
|
|
92
|
+
class: `IncodePhoneCountryArrow ${r ? "IncodePhoneCountryArrowUp" : ""}`
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
),
|
|
98
|
+
r && /* @__PURE__ */ n("div", { class: "IncodePhoneCountryDropdown", children: g.map((e) => /* @__PURE__ */ n(
|
|
99
|
+
"button",
|
|
100
|
+
{
|
|
101
|
+
type: "button",
|
|
102
|
+
class: `IncodePhoneCountryOption ${c?.code === e.code ? "IncodePhoneCountryOptionSelected" : ""}`,
|
|
103
|
+
onClick: () => V(e),
|
|
104
|
+
children: [
|
|
105
|
+
/* @__PURE__ */ n("span", { class: "IncodePhoneCountryFlag", "aria-hidden": "true", children: e.emoji }),
|
|
106
|
+
/* @__PURE__ */ n("span", { class: "IncodePhoneCountryOptionCode", children: e.callingCode }),
|
|
107
|
+
/* @__PURE__ */ n("span", { class: "IncodePhoneCountryOptionName", children: e.name })
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
e.code
|
|
111
|
+
)) })
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
),
|
|
115
|
+
/* @__PURE__ */ n(
|
|
116
|
+
"div",
|
|
117
|
+
{
|
|
118
|
+
class: `IncodePhoneInputWrapper ${h ? "IncodePhoneInputWrapperError" : ""} ${d ? "IncodePhoneInputWrapperDisabled" : ""}`,
|
|
119
|
+
children: /* @__PURE__ */ n(
|
|
120
|
+
"input",
|
|
121
|
+
{
|
|
122
|
+
ref: v,
|
|
123
|
+
type: "tel",
|
|
124
|
+
value: f,
|
|
125
|
+
onInput: R,
|
|
126
|
+
placeholder: "(123) 456-7890",
|
|
127
|
+
disabled: d,
|
|
128
|
+
class: "IncodePhoneInputField",
|
|
129
|
+
"data-testid": "phone-input"
|
|
130
|
+
}
|
|
131
|
+
)
|
|
132
|
+
}
|
|
133
|
+
)
|
|
134
|
+
] }),
|
|
135
|
+
h && /* @__PURE__ */ n($, { children: [
|
|
136
|
+
/* @__PURE__ */ n(S, { size: 8 }),
|
|
137
|
+
/* @__PURE__ */ n("p", { class: "IncodePhoneInputError", "data-testid": "phone-error", children: h })
|
|
138
|
+
] }),
|
|
139
|
+
N && /* @__PURE__ */ n($, { children: [
|
|
140
|
+
/* @__PURE__ */ n(S, { size: 16 }),
|
|
141
|
+
/* @__PURE__ */ n("label", { class: "IncodePhoneInputOptIn", children: [
|
|
142
|
+
/* @__PURE__ */ n(
|
|
143
|
+
"input",
|
|
144
|
+
{
|
|
145
|
+
type: "checkbox",
|
|
146
|
+
checked: W,
|
|
147
|
+
onChange: j,
|
|
148
|
+
"data-testid": "phone-optin"
|
|
149
|
+
}
|
|
150
|
+
),
|
|
151
|
+
/* @__PURE__ */ n("span", { children: "I agree to receive SMS notifications" })
|
|
152
|
+
] })
|
|
153
|
+
] })
|
|
154
|
+
] }) });
|
|
155
|
+
};
|
|
156
|
+
export {
|
|
157
|
+
M as PhoneInput
|
|
158
|
+
};
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { u as s } from "./loadingIcon-DmuPXh70.js";
|
|
2
|
+
import { D as J, d as D, A as x, T as M, y as Q, q as A } from "./vendor-preact-BoMmvSgn.js";
|
|
3
|
+
import { w as X, g as h, c as j, b as k } from "./countries-DfLkrF0x.js";
|
|
4
|
+
import { D as z } from "./dropdownComposed-BpinYlrx.js";
|
|
5
|
+
import { E as _ } from "./errorIcon-DEARBrGx.js";
|
|
6
|
+
import { S as q } from "./successIcon-Bjsdc4lF.js";
|
|
7
|
+
import { a as e2 } from "./inputComposed-fUbAGrDy.js";
|
|
8
|
+
import { P as n2, p as L, A as g } from "./AsYouType-D1H_js4X.js";
|
|
9
|
+
function o2(e, o, r) {
|
|
10
|
+
if (o[e])
|
|
11
|
+
return new n2(e, o[e], r);
|
|
12
|
+
}
|
|
13
|
+
function t2() {
|
|
14
|
+
return X(o2, arguments);
|
|
15
|
+
}
|
|
16
|
+
const r2 = { AC: "40123", AD: "312345", AE: "501234567", AF: "701234567", AG: "2684641234", AI: "2642351234", AL: "672123456", AM: "77123456", AO: "923123456", AR: "91123456789", AS: "6847331234", AT: "664123456", AU: "412345678", AW: "5601234", AX: "412345678", AZ: "401234567", BA: "61123456", BB: "2462501234", BD: "1812345678", BE: "470123456", BF: "70123456", BG: "43012345", BH: "36001234", BI: "79561234", BJ: "0195123456", BL: "690001234", BM: "4413701234", BN: "7123456", BO: "71234567", BQ: "3181234", BR: "11961234567", BS: "2423591234", BT: "17123456", BW: "71123456", BY: "294911911", BZ: "6221234", CA: "5062345678", CC: "412345678", CD: "991234567", CF: "70012345", CG: "061234567", CH: "781234567", CI: "0123456789", CK: "71234", CL: "221234567", CM: "671234567", CN: "13123456789", CO: "3211234567", CR: "83123456", CU: "51234567", CV: "9911234", CW: "95181234", CX: "412345678", CY: "96123456", CZ: "601123456", DE: "15123456789", DJ: "77831001", DK: "34412345", DM: "7672251234", DO: "8092345678", DZ: "551234567", EC: "991234567", EE: "51234567", EG: "1001234567", EH: "650123456", ER: "7123456", ES: "612345678", ET: "911234567", FI: "412345678", FJ: "7012345", FK: "51234", FM: "3501234", FO: "211234", FR: "612345678", GA: "06031234", GB: "7400123456", GD: "4734031234", GE: "555123456", GF: "694201234", GG: "7781123456", GH: "231234567", GI: "57123456", GL: "221234", GM: "3012345", GN: "601123456", GP: "690001234", GQ: "222123456", GR: "6912345678", GT: "51234567", GU: "6713001234", GW: "955012345", GY: "6091234", HK: "51234567", HN: "91234567", HR: "921234567", HT: "34101234", HU: "201234567", ID: "812345678", IE: "850123456", IL: "502345678", IM: "7924123456", IN: "8123456789", IO: "3801234", IQ: "7912345678", IR: "9123456789", IS: "6111234", IT: "3123456789", JE: "7797712345", JM: "8762101234", JO: "790123456", JP: "9012345678", KE: "712123456", KG: "700123456", KH: "91234567", KI: "72001234", KM: "3212345", KN: "8697652917", KP: "1921234567", KR: "1020000000", KW: "50012345", KY: "3453231234", KZ: "7710009998", LA: "2023123456", LB: "71123456", LC: "7582845678", LI: "660234567", LK: "712345678", LR: "770123456", LS: "50123456", LT: "61234567", LU: "628123456", LV: "21234567", LY: "912345678", MA: "650123456", MC: "612345678", MD: "62112345", ME: "60123456", MF: "690001234", MG: "321234567", MH: "2351234", MK: "72345678", ML: "65012345", MM: "92123456", MN: "88123456", MO: "66123456", MP: "6702345678", MQ: "696201234", MR: "22123456", MS: "6644923456", MT: "96961234", MU: "52512345", MV: "7712345", MW: "991234567", MX: "2221234567", MY: "123456789", MZ: "821234567", NA: "811234567", NC: "751234", NE: "93123456", NF: "381234", NG: "8021234567", NI: "81234567", NL: "612345678", NO: "40612345", NP: "9841234567", NR: "5551234", NU: "8884012", NZ: "211234567", OM: "92123456", PA: "61234567", PE: "912345678", PF: "87123456", PG: "70123456", PH: "9051234567", PK: "3012345678", PL: "512345678", PM: "551234", PR: "7872345678", PS: "599123456", PT: "912345678", PW: "6201234", PY: "961456789", QA: "33123456", RE: "692123456", RO: "712034567", RS: "601234567", RU: "9123456789", RW: "720123456", SA: "512345678", SB: "7421234", SC: "2510123", SD: "911231234", SE: "701234567", SG: "81234567", SH: "51234", SI: "31234567", SJ: "41234567", SK: "912123456", SL: "25123456", SM: "66661212", SN: "701234567", SO: "71123456", SR: "7412345", SS: "977123456", ST: "9812345", SV: "70123456", SX: "7215205678", SY: "944567890", SZ: "76123456", TA: "8999", TC: "6492311234", TD: "63012345", TG: "90112345", TH: "812345678", TJ: "917123456", TK: "7290", TL: "77212345", TM: "66123456", TN: "20123456", TO: "7715123", TR: "5012345678", TT: "8682911234", TV: "901234", TW: "912345678", TZ: "621234567", UA: "501234567", UG: "712345678", US: "2015550123", UY: "94231234", UZ: "912345678", VA: "3123456789", VC: "7844301234", VE: "4121234567", VG: "2843001234", VI: "3406421234", VN: "912345678", VU: "5912345", WF: "821234", WS: "7212345", XK: "43201234", YE: "712345678", YT: "639012345", ZA: "711234567", ZM: "955123456", ZW: "712345678" };
|
|
17
|
+
function b(e, o, r) {
|
|
18
|
+
return new g(r).input(`${o}${e}`).replace(o, "").trimStart();
|
|
19
|
+
}
|
|
20
|
+
function s2(e, o) {
|
|
21
|
+
const r = e.replace(/\D/g, "");
|
|
22
|
+
if (r === o) return e;
|
|
23
|
+
if (!r.endsWith(o)) return null;
|
|
24
|
+
const a = r.length - o.length;
|
|
25
|
+
if (a <= 0) return e;
|
|
26
|
+
const l = e.replace(/[()]/g, "");
|
|
27
|
+
let c = 0;
|
|
28
|
+
for (let d = 0; d < l.length; d++)
|
|
29
|
+
if (/\d/.test(l[d]) && (c++, c === a))
|
|
30
|
+
return l.slice(d + 1).replace(/^\D+/, "");
|
|
31
|
+
return e;
|
|
32
|
+
}
|
|
33
|
+
const a2 = {
|
|
34
|
+
US: "(123) 456-7890",
|
|
35
|
+
CA: "(123) 456-7890"
|
|
36
|
+
};
|
|
37
|
+
function c2(e) {
|
|
38
|
+
const o = a2[e];
|
|
39
|
+
if (o) return o;
|
|
40
|
+
const r = t2(e, r2);
|
|
41
|
+
if (!r) return "";
|
|
42
|
+
const a = r.formatNational(), l = s2(a, r.nationalNumber);
|
|
43
|
+
if (l) return l;
|
|
44
|
+
const c = `+${k(e)}`;
|
|
45
|
+
return b(r.nationalNumber, c, e);
|
|
46
|
+
}
|
|
47
|
+
const l2 = J(
|
|
48
|
+
({
|
|
49
|
+
id: e,
|
|
50
|
+
label: o,
|
|
51
|
+
countryCode: r = "US",
|
|
52
|
+
value: a,
|
|
53
|
+
placeholder: l,
|
|
54
|
+
error: c,
|
|
55
|
+
helper: d,
|
|
56
|
+
showErrorIcon: R,
|
|
57
|
+
showHelperIcon: y,
|
|
58
|
+
disabled: E = !1,
|
|
59
|
+
disableCountrySelector: K = !1,
|
|
60
|
+
required: P,
|
|
61
|
+
onChange: f,
|
|
62
|
+
"aria-labelledby": $,
|
|
63
|
+
"data-testid": H,
|
|
64
|
+
...W
|
|
65
|
+
}, U) => {
|
|
66
|
+
const [p, N] = D(r), [C, S] = D(""), T = x(!1), F = M(
|
|
67
|
+
() => j.map((t) => ({
|
|
68
|
+
value: t.code,
|
|
69
|
+
label: `${t.emoji} ${t.callingCode} ${t.name}`
|
|
70
|
+
})),
|
|
71
|
+
[]
|
|
72
|
+
), i = M(
|
|
73
|
+
() => h(p) ?? h("US"),
|
|
74
|
+
[p]
|
|
75
|
+
), O = M(
|
|
76
|
+
() => l ?? c2(p),
|
|
77
|
+
[l, p]
|
|
78
|
+
);
|
|
79
|
+
Q(() => {
|
|
80
|
+
if (T.current || !a || !i) return;
|
|
81
|
+
T.current = !0;
|
|
82
|
+
const t = a.startsWith("+") ? a : `+${a}`, n = L(t);
|
|
83
|
+
if (n?.isValid() && n.country) {
|
|
84
|
+
n.country !== p && N(n.country);
|
|
85
|
+
const u = new g(n.country);
|
|
86
|
+
S(u.input(n.nationalNumber));
|
|
87
|
+
}
|
|
88
|
+
}, [a, i, p]);
|
|
89
|
+
const m = A(
|
|
90
|
+
(t, n) => {
|
|
91
|
+
const u = `${n.callingCode}${t.replace(/\D/g, "")}`;
|
|
92
|
+
try {
|
|
93
|
+
const Y = L(u, n.code);
|
|
94
|
+
f?.(u, Y?.isValid() ?? !1);
|
|
95
|
+
} catch {
|
|
96
|
+
f?.(u, !1);
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
[f]
|
|
100
|
+
), V = A(
|
|
101
|
+
(t) => {
|
|
102
|
+
N(t);
|
|
103
|
+
const n = h(t);
|
|
104
|
+
n && C && m(C, n);
|
|
105
|
+
},
|
|
106
|
+
[C, m]
|
|
107
|
+
), Z = A(
|
|
108
|
+
(t) => {
|
|
109
|
+
const n = t.target.value;
|
|
110
|
+
if (!i) {
|
|
111
|
+
S(n);
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
const u = b(
|
|
115
|
+
n,
|
|
116
|
+
i.callingCode,
|
|
117
|
+
i.code
|
|
118
|
+
);
|
|
119
|
+
S(u), m(n, i);
|
|
120
|
+
},
|
|
121
|
+
[i, m]
|
|
122
|
+
), v = `${e}-country`, I = `${e}-phone`, G = `${I}-helper`, B = `${I}-error`, w = [d ? G : null, c ? B : null].filter(Boolean).join(" ");
|
|
123
|
+
return /* @__PURE__ */ s("div", { class: "IncodePhoneInputComposed", children: [
|
|
124
|
+
o && /* @__PURE__ */ s(
|
|
125
|
+
"label",
|
|
126
|
+
{
|
|
127
|
+
class: "IncodePhoneInputComposedLabel",
|
|
128
|
+
htmlFor: I,
|
|
129
|
+
"data-testid": `${e}-label`,
|
|
130
|
+
children: [
|
|
131
|
+
o,
|
|
132
|
+
P && /* @__PURE__ */ s("span", { class: "IncodePhoneInputComposedRequired", children: " *" })
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
),
|
|
136
|
+
/* @__PURE__ */ s(
|
|
137
|
+
z,
|
|
138
|
+
{
|
|
139
|
+
id: v,
|
|
140
|
+
options: F,
|
|
141
|
+
value: p,
|
|
142
|
+
onChange: V,
|
|
143
|
+
disabled: E || K,
|
|
144
|
+
required: P,
|
|
145
|
+
searchable: !0,
|
|
146
|
+
searchPlaceholder: "Search countries...",
|
|
147
|
+
suppressMessages: !0,
|
|
148
|
+
"aria-label": `Country code ${i.callingCode}, ${i.name}`,
|
|
149
|
+
renderSelectedLabel: (t) => {
|
|
150
|
+
const n = h(t.value);
|
|
151
|
+
return n ? `${n.emoji} ${n.callingCode}` : t.label;
|
|
152
|
+
},
|
|
153
|
+
class: "IncodePhoneInputComposedDropdown",
|
|
154
|
+
siblingElement: /* @__PURE__ */ s(
|
|
155
|
+
e2,
|
|
156
|
+
{
|
|
157
|
+
id: I,
|
|
158
|
+
ref: U,
|
|
159
|
+
type: "tel",
|
|
160
|
+
value: C,
|
|
161
|
+
onInput: Z,
|
|
162
|
+
placeholder: O,
|
|
163
|
+
error: c,
|
|
164
|
+
disabled: E,
|
|
165
|
+
required: P,
|
|
166
|
+
suppressMessages: !0,
|
|
167
|
+
"aria-label": o ? void 0 : "Phone number",
|
|
168
|
+
"aria-labelledby": $,
|
|
169
|
+
"aria-describedby": w || void 0,
|
|
170
|
+
"aria-invalid": c ? "true" : void 0,
|
|
171
|
+
"data-testid": H,
|
|
172
|
+
...W
|
|
173
|
+
}
|
|
174
|
+
)
|
|
175
|
+
}
|
|
176
|
+
),
|
|
177
|
+
c && /* @__PURE__ */ s(
|
|
178
|
+
"div",
|
|
179
|
+
{
|
|
180
|
+
class: "IncodePhoneInputComposedErrorWrapper",
|
|
181
|
+
role: "alert",
|
|
182
|
+
"data-testid": `${e}-error-wrapper`,
|
|
183
|
+
children: [
|
|
184
|
+
R && /* @__PURE__ */ s("div", { class: "IncodePhoneInputComposedIconWrapper", children: /* @__PURE__ */ s(_, { size: 16 }) }),
|
|
185
|
+
/* @__PURE__ */ s("p", { id: B, class: "IncodePhoneInputComposedError", children: c })
|
|
186
|
+
]
|
|
187
|
+
}
|
|
188
|
+
),
|
|
189
|
+
d && !c && /* @__PURE__ */ s(
|
|
190
|
+
"div",
|
|
191
|
+
{
|
|
192
|
+
class: "IncodePhoneInputComposedHelperWrapper",
|
|
193
|
+
"data-testid": `${e}-helper-wrapper`,
|
|
194
|
+
children: [
|
|
195
|
+
y && /* @__PURE__ */ s("div", { class: "IncodePhoneInputComposedIconWrapper", children: /* @__PURE__ */ s(q, { size: 16 }) }),
|
|
196
|
+
/* @__PURE__ */ s("p", { id: G, class: "IncodePhoneInputComposedHelper", children: d })
|
|
197
|
+
]
|
|
198
|
+
}
|
|
199
|
+
)
|
|
200
|
+
] });
|
|
201
|
+
}
|
|
202
|
+
);
|
|
203
|
+
l2.displayName = "PhoneInputComposed";
|
|
204
|
+
export {
|
|
205
|
+
l2 as P
|
|
206
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { b as i, u as t } from "./loadingIcon-DmuPXh70.js";
|
|
2
|
+
import { S as e } from "./spinner-DygONskw.js";
|
|
3
|
+
import "./instance-BWYzq8dk.js";
|
|
4
|
+
import "./vendor-preact-BoMmvSgn.js";
|
|
5
|
+
const s = () => {
|
|
6
|
+
const { t: r } = i();
|
|
7
|
+
return /* @__PURE__ */ t(
|
|
8
|
+
e,
|
|
9
|
+
{
|
|
10
|
+
title: r("loadingCircle.hangOn"),
|
|
11
|
+
subtitle: r("loadingCircle.validating"),
|
|
12
|
+
size: "large",
|
|
13
|
+
fullScreen: !0
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
s as P
|
|
19
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tailwindcss v4.
|
|
1
|
+
/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */
|
|
2
2
|
@layer properties {
|
|
3
3
|
@supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {
|
|
4
4
|
*, :before, :after, ::backdrop {
|