@incodetech/web 0.0.0-dev-20260403-eccc51c → 0.0.0-dev-20260407-4580f1c

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/dist/AsYouType-DPWqJvFu.js +2482 -0
  2. package/dist/addressAutocomplete-B3f6PGTT.js +108 -0
  3. package/dist/aligndevicelottie-C9xl1spu.js +12757 -0
  4. package/dist/antifraud/antifraud.es.js +17 -18
  5. package/dist/antifraud/styles.css +1 -1
  6. package/dist/authentication/authentication.es.js +28 -50
  7. package/dist/back-horizontal-hint-Be3dUGk6.js +137 -0
  8. package/dist/back-tutorial-BNTyW-1N.js +14584 -0
  9. package/dist/back-vertical-hint-Bz_rnhd-.js +128 -0
  10. package/dist/backdevicelottie-DBB1YCtW.js +16678 -0
  11. package/dist/base.css +327 -67
  12. package/dist/blurdevicelottie-9WvZCZ6C.js +15939 -0
  13. package/dist/browser-ponyfill-B4Qc6yfW.js +299 -0
  14. package/dist/button-DhL5eRT3.js +123 -0
  15. package/dist/checkbox-l8NxPf4o.js +85 -0
  16. package/dist/consent/consent.es.js +82 -89
  17. package/dist/consent/styles.css +1 -1
  18. package/dist/countries-y2ydYDhN.js +8323 -0
  19. package/dist/curp-validation/curp-validation.es.js +271 -313
  20. package/dist/curp-validation/styles.css +1 -1
  21. package/dist/dateInputComposed-B9WqdYx9.js +2 -0
  22. package/dist/dateInputComposed-ndsGHX1M.js +94 -0
  23. package/dist/defineProperty-brqHEHA_.js +39 -0
  24. package/dist/document-capture/styles.css +1 -1
  25. package/dist/documentCapture-wDgRLdon.js +784 -0
  26. package/dist/dropdownComposed-_Ey7wJNG.js +258 -0
  27. package/dist/ekyb/ekyb.es.js +2 -0
  28. package/dist/ekyb/styles.css +1 -1
  29. package/dist/ekybModule-BBOm1y49.js +2 -0
  30. package/dist/ekybModule-fz6i9ZRt.js +286 -0
  31. package/dist/ekyc/ekyc.es.js +2 -0
  32. package/dist/ekyc/styles.css +1 -1
  33. package/dist/ekycModule-SeTFG3AJ.js +233 -0
  34. package/dist/ekycModule-hxIcNX8n.js +2 -0
  35. package/dist/email/email.es.js +110 -154
  36. package/dist/email/styles.css +1 -1
  37. package/dist/extensibility-DJihqIzM.js +2248 -0
  38. package/dist/extensibility.es.js +22 -150
  39. package/dist/face-match/styles.css +147 -73
  40. package/dist/faceMatch-DH8sLx34.js +191 -0
  41. package/dist/flip-animation-DOJzdXB-.js +6983 -0
  42. package/dist/flow/flow.es.js +2273 -2613
  43. package/dist/flow/styles.css +432 -73
  44. package/dist/formField-BRTbY8w9.js +100 -0
  45. package/dist/front-horizontal-hint-aGAhadA2.js +380 -0
  46. package/dist/front-vertical-hint-DZz1VeNp.js +420 -0
  47. package/dist/frontdevicelottie-DadDp6be.js +17302 -0
  48. package/dist/geolocation/geolocation.es.js +852 -832
  49. package/dist/geolocation/styles.css +1 -1
  50. package/dist/glaredevicelottie-BfI84cPw.js +14466 -0
  51. package/dist/governmentValidation/governmentValidation.es.js +100 -106
  52. package/dist/governmentValidation/styles.css +1 -1
  53. package/dist/i18n-DZOHbK9q.js +1916 -0
  54. package/dist/icons-BHbofCgJ.js +245 -0
  55. package/dist/id/id.es.js +53 -59
  56. package/dist/id/styles.css +1 -1
  57. package/dist/id-laser-h-BWyU3VgL.js +467 -0
  58. package/dist/id-laser-v-JiWXUlv0.js +467 -0
  59. package/dist/id-tutorial-Cc9xg5_J.js +13152 -0
  60. package/dist/incodeModule-Bf6yJ8RB.js +18 -0
  61. package/dist/index.es.js +4 -25
  62. package/dist/inputComposed-BhbfD8Ru.js +77 -0
  63. package/dist/loadingIcon-CeQt7Zgb.js +146 -0
  64. package/dist/mandatoryConsent-LBS8E0rj.js +101 -0
  65. package/dist/numberedStep-CQVRixRP.js +11 -0
  66. package/dist/otpInput-CDIG9el7.js +143 -0
  67. package/dist/page-SvlJWUfz.js +61 -0
  68. package/dist/passport-horizontal-hint-CFsGs7Dp.js +293 -0
  69. package/dist/passport-tutorial-z0LN7Hsp.js +11688 -0
  70. package/dist/passport-vertical-hint-BnCpKWeN.js +267 -0
  71. package/dist/phone/phone.es.js +87 -121
  72. package/dist/phone/styles.css +1 -1
  73. package/dist/phoneInput-C9T_8FJt.js +138 -0
  74. package/dist/phoneInputComposed-B-0zieIW.js +407 -0
  75. package/dist/processing-B5zhNH6I.js +15 -0
  76. package/dist/redirect-to-mobile/styles.css +1 -1
  77. package/dist/richText-Db0PfpkE.js +1973 -0
  78. package/dist/rolldown-runtime-CjdbFOpI.js +13 -0
  79. package/dist/selfie/selfie.es.js +29 -50
  80. package/dist/selfie/styles.css +170 -66
  81. package/dist/selfieTutorial-B0MIyPrk.js +2676 -0
  82. package/dist/setup-Dq2bzNKH.js +15 -0
  83. package/dist/signature/signature.es.js +557 -707
  84. package/dist/signature/styles.css +1 -1
  85. package/dist/spacer-DCljE53A.js +59 -0
  86. package/dist/spinner-Bk0YuoLu.js +1 -0
  87. package/dist/spinner-snIGzmm8.js +41 -0
  88. package/dist/successIcon-AHrfmJvv.js +17 -0
  89. package/dist/tutorial-DNOd11tg.js +2780 -0
  90. package/dist/types/ekyb.d.ts +29 -0
  91. package/dist/types/ekyc.d.ts +29 -0
  92. package/dist/types/index.d.ts +0 -8
  93. package/dist/typography-BNbFNFek.js +1 -0
  94. package/dist/typography-DvHeVWfY.js +29 -0
  95. package/dist/uiConfig-CwpQ-IM6.js +20 -0
  96. package/dist/vendor-preact-D6SntenC.js +958 -0
  97. package/dist/warningIcon-Cvj-ayg1.js +17 -0
  98. package/package.json +8 -11
  99. package/dist/AsYouType-D1H_js4X.js +0 -2607
  100. package/dist/Trans-aTzdT_SA.js +0 -55
  101. package/dist/addressAutocomplete-C8-wL1j_.js +0 -153
  102. package/dist/aligndevicelottie-DlQCRPfM.js +0 -29
  103. package/dist/back-horizontal-hint-CSlf9KI1.js +0 -5
  104. package/dist/back-tutorial-An9AcMSe.js +0 -29
  105. package/dist/back-vertical-hint-CNieqiCr.js +0 -5
  106. package/dist/backdevicelottie-B4NgyWmX.js +0 -29
  107. package/dist/blurdevicelottie-_BZRug1c.js +0 -29
  108. package/dist/browser-ponyfill-B6W6hHVY.js +0 -344
  109. package/dist/button-CE9kRlem.js +0 -184
  110. package/dist/cameraView-C2X7klNb.js +0 -55
  111. package/dist/captureOverlay-tCb4R4WE.js +0 -592
  112. package/dist/checkbox-B5X-mfqq.js +0 -137
  113. package/dist/chevronDown-DSHaPKbi.js +0 -23
  114. package/dist/closeIcon-9Hc97omv.js +0 -28
  115. package/dist/countries-DfLkrF0x.js +0 -616
  116. package/dist/dateInputComposed-C7PCzh-U.js +0 -173
  117. package/dist/documentCapture-C0mO-RGE.js +0 -692
  118. package/dist/dropdownComposed-BpinYlrx.js +0 -367
  119. package/dist/ekybModule-Dr6LJUg-.js +0 -357
  120. package/dist/ekycModule-C3mswduI.js +0 -291
  121. package/dist/errorContent-Cb8nmQAE.js +0 -44
  122. package/dist/errorIcon-DEARBrGx.js +0 -26
  123. package/dist/faceMatch-DbDp7D3d.js +0 -237
  124. package/dist/fileIcon-CCSvS10T.js +0 -52
  125. package/dist/flip-animation-COR596wy.js +0 -29
  126. package/dist/flipAnimation-BqV462TA.js +0 -2059
  127. package/dist/formField-CP6wDdfA.js +0 -106
  128. package/dist/front-horizontal-hint-lRLKd7vY.js +0 -7
  129. package/dist/front-vertical-hint-qQoJXRE3.js +0 -7
  130. package/dist/frontdevicelottie-KhKxT5n9.js +0 -29
  131. package/dist/glaredevicelottie-DLuIStvb.js +0 -29
  132. package/dist/id-laser-h-BBV3r3rz.js +0 -29
  133. package/dist/id-laser-v-BTHJaSfx.js +0 -29
  134. package/dist/id-tutorial-B-F5Q28m.js +0 -29
  135. package/dist/incodeModule-C4XIllao.js +0 -96
  136. package/dist/inputComposed-fUbAGrDy.js +0 -103
  137. package/dist/instance-BWYzq8dk.js +0 -2163
  138. package/dist/loadingIcon-DmuPXh70.js +0 -195
  139. package/dist/mandatoryConsent-5xPI0cor.js +0 -94
  140. package/dist/manualCaptureButton-BvFmTyJe.js +0 -372
  141. package/dist/numberedStep-DwUB__mh.js +0 -5
  142. package/dist/otpInput-BFXhqFRT.js +0 -156
  143. package/dist/page-SrUl0qtN.js +0 -69
  144. package/dist/passport-horizontal-hint-BCtpMp1Y.js +0 -5
  145. package/dist/passport-tutorial-CaYBFTqt.js +0 -29
  146. package/dist/passport-vertical-hint-GaLnzqHP.js +0 -5
  147. package/dist/permissions-DT4Fz9MR.js +0 -709
  148. package/dist/phoneInput-CGr8TxOO.js +0 -158
  149. package/dist/phoneInputComposed-Cm9O2Jba.js +0 -206
  150. package/dist/processing-szVOCQwZ.js +0 -19
  151. package/dist/richText-cspvNz2a.js +0 -1807
  152. package/dist/selfieTutorial-Dm_p0ke9.js +0 -29
  153. package/dist/spinner-DygONskw.js +0 -60
  154. package/dist/successIcon-Bjsdc4lF.js +0 -26
  155. package/dist/tutorial-Cdz1025D.js +0 -473
  156. package/dist/types/ekyb/styles.d.ts +0 -1
  157. package/dist/types/ekyc/styles.d.ts +0 -1
  158. package/dist/typography-BDACYR5i.js +0 -14
  159. package/dist/uiConfig-Dnt-2YWB.js +0 -23
  160. package/dist/useMediaQuery-lJdQBmC2.js +0 -18
  161. package/dist/vendor-preact-BoMmvSgn.js +0 -694
  162. package/dist/warningIcon-DQq_MrOB.js +0 -26
@@ -1,158 +0,0 @@
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
- };
@@ -1,206 +0,0 @@
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
- };
@@ -1,19 +0,0 @@
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
- };