@incodetech/web 2.0.0 → 2.0.1

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 (178) hide show
  1. package/dist/ae-signature/ae-signature.es.js +15 -0
  2. package/dist/ae-signature/styles.css +348 -0
  3. package/dist/ae-signature/styles2.css +107 -0
  4. package/dist/aligndevicelottie-DoV8xKjh.js +12757 -0
  5. package/dist/antifraud/antifraud.es.js +18 -0
  6. package/dist/antifraud/styles.css +2 -0
  7. package/dist/authentication/authentication.es.js +29 -0
  8. package/dist/autoFocusTitle-QexamZ4i.js +16 -0
  9. package/dist/back-horizontal-hint-B8Brxh3U.js +137 -0
  10. package/dist/back-tutorial-1NOQobGO.js +14585 -0
  11. package/dist/back-vertical-hint-BBo36dxn.js +128 -0
  12. package/dist/backdevicelottie-C_ceuqY7.js +16678 -0
  13. package/dist/base.css +8146 -0
  14. package/dist/blurdevicelottie-UO14Y0WC.js +15939 -0
  15. package/dist/bottomSheet-DE_8TFEC.js +31 -0
  16. package/dist/browser-ponyfill-jOkuz57z.js +299 -0
  17. package/dist/button-DcCUEn2n.js +24 -0
  18. package/dist/checkbox-Cl57ltq_.js +85 -0
  19. package/dist/consent/consent.es.js +90 -0
  20. package/dist/consent/styles.css +116 -0
  21. package/dist/countrySelector-CE-JgIsv.js +58 -0
  22. package/dist/cpf-ocr/styles.css +45 -0
  23. package/dist/cpfOcr-D_tbwbvh.js +78 -0
  24. package/dist/cross-document-data-match/cross-document-data-match.es.js +18 -0
  25. package/dist/curp-validation/curp-validation.es.js +279 -0
  26. package/dist/curp-validation/styles.css +82 -0
  27. package/dist/custom-fields/styles.css +22 -0
  28. package/dist/customFields-CW38fQUv.js +127 -0
  29. package/dist/customWatchlist-D9_yjEQd.js +33 -0
  30. package/dist/dateInputComposed-BpAGsjN6.js +55 -0
  31. package/dist/dateInputComposed-DU3o6PAV.js +1 -0
  32. package/dist/defineProperty-Dh8nSJpJ.js +39 -0
  33. package/dist/document-capture/styles.css +367 -0
  34. package/dist/documentCapture-xX-JT7ZY.js +763 -0
  35. package/dist/dropdownComposed-DFRBG22E.js +284 -0
  36. package/dist/dropdownComposed-DwTzc2YU.js +1 -0
  37. package/dist/dynamic-forms/styles.css +36 -0
  38. package/dist/dynamicForms-CJP1Ia6Q.js +262 -0
  39. package/dist/ekyb/ekyb.es.js +2 -0
  40. package/dist/ekyb/styles.css +137 -0
  41. package/dist/ekybModule-BSs7mndb.js +280 -0
  42. package/dist/ekybModule-D9M3E2Gm.js +2 -0
  43. package/dist/ekyc/ekyc.es.js +2 -0
  44. package/dist/ekyc/styles.css +106 -0
  45. package/dist/ekycModule-CU9pt5YN.js +246 -0
  46. package/dist/ekycModule-CZw9cLno.js +2 -0
  47. package/dist/electronic-signature/electronic-signature.es.js +2 -0
  48. package/dist/electronic-signature-COYXjGdd.js +410 -0
  49. package/dist/email/email.es.js +87 -0
  50. package/dist/email/styles.css +12 -0
  51. package/dist/emailInput-DppGf9pv.js +37 -0
  52. package/dist/expiredId-BnmzE8T3.js +70 -0
  53. package/dist/extensibility-CzEJfRwo.js +2586 -0
  54. package/dist/extensibility.es.js +25 -0
  55. package/dist/face-match/face-match.es.js +2 -0
  56. package/dist/face-match/styles.css +1078 -0
  57. package/dist/faceMatch-B8j0g0Yo.js +2 -0
  58. package/dist/faceMatch-BV8UD7tj.js +201 -0
  59. package/dist/flip-animation-CgwRsEmK.js +6983 -0
  60. package/dist/flow/flow.es.js +661 -0
  61. package/dist/flow/styles.css +8478 -0
  62. package/dist/front-horizontal-hint-DGGGi8e1.js +380 -0
  63. package/dist/front-vertical-hint-CNr5mE6Q.js +420 -0
  64. package/dist/frontdevicelottie-Bu6f9fDE.js +17302 -0
  65. package/dist/geolocation/geolocation.es.js +857 -0
  66. package/dist/geolocation/styles.css +158 -0
  67. package/dist/glaredevicelottie-B10axYs_.js +14466 -0
  68. package/dist/governmentValidation/governmentValidation.es.js +98 -0
  69. package/dist/governmentValidation/styles.css +58 -0
  70. package/dist/homeScreen-DnP1jw9A.js +227 -0
  71. package/dist/hooks-BVnGysT7.js +80 -0
  72. package/dist/i18n-9s4OSqwi.js +2010 -0
  73. package/dist/icons-Cc7zwchP.js +310 -0
  74. package/dist/id/id.es.js +832 -0
  75. package/dist/id/styles.css +1287 -0
  76. package/dist/id-laser-h-mBAzHVOK.js +467 -0
  77. package/dist/id-laser-v-CrFg4bcJ.js +483 -0
  78. package/dist/id-ocr/styles.css +46 -0
  79. package/dist/id-tutorial-BCr42Pnn.js +13153 -0
  80. package/dist/id-verification/id-verification.es.js +20 -0
  81. package/dist/idOcr-CCjfWQvH.js +94 -0
  82. package/dist/identity-reuse/identity-reuse.es.js +198 -0
  83. package/dist/identity-reuse/styles.css +163 -0
  84. package/dist/incode-logo-DX016usY.js +4 -0
  85. package/dist/incodeComponent-C1o4M0ZK.js +50 -0
  86. package/dist/incodeModule-BqCjVgEI.js +18 -0
  87. package/dist/index.es.js +16 -0
  88. package/dist/inputComposed-APSw8C7o.js +89 -0
  89. package/dist/inputComposed-XYrarFxS.js +1 -0
  90. package/dist/loadingIcon-BN5YRQUb.js +104 -0
  91. package/dist/mandatoryConsent-DssKMC3v.js +100 -0
  92. package/dist/modal-NMxsQHAO.js +135 -0
  93. package/dist/modal.hooks-CAjcIFZK.js +126 -0
  94. package/dist/numberedStep-CT-alrK5.js +11 -0
  95. package/dist/optionAccessibleLabel-CzEeX3Q4.js +140 -0
  96. package/dist/otpInput-DqRA_egd.js +145 -0
  97. package/dist/page-C1yT4DLb.js +69 -0
  98. package/dist/passport-horizontal-hint-Bgquwtac.js +293 -0
  99. package/dist/passport-tutorial-DwRwtPVX.js +11689 -0
  100. package/dist/passport-vertical-hint-BT1D5BrW.js +267 -0
  101. package/dist/pdf-BurGZ08w.js +14967 -0
  102. package/dist/pdfViewer-BGBNL1Ea.js +63 -0
  103. package/dist/phone/phone.es.js +98 -0
  104. package/dist/phone/styles.css +11 -0
  105. package/dist/phoneInputComposed-bvWhGLFZ.js +11206 -0
  106. package/dist/processing-G_y3o32b.js +6 -0
  107. package/dist/qe-signature/qe-signature.es.js +15 -0
  108. package/dist/radioGroupComposed-BbmvxmD2.js +177 -0
  109. package/dist/redirect-to-mobile/styles.css +588 -0
  110. package/dist/redirectToMobile-C3k1gloW.js +1514 -0
  111. package/dist/requiredLabelHint-BLwgqozE.js +13 -0
  112. package/dist/richText-DbJ5sl2n.js +1973 -0
  113. package/dist/rolldown-runtime-CYMK-g2i.js +20 -0
  114. package/dist/selfie/selfie.es.js +43 -0
  115. package/dist/selfie/styles.css +1144 -0
  116. package/dist/selfieTutorial-BgrlUMXP.js +2677 -0
  117. package/dist/signature/signature.es.js +546 -0
  118. package/dist/snackbar-BDp8x7Cv.js +14 -0
  119. package/dist/spinner-B4dcie2T.js +1 -0
  120. package/dist/spinner-CKnjVHxw.js +39 -0
  121. package/dist/statusPage-CUI7ApcU.js +28 -0
  122. package/dist/successIcon-DbILeIz_.js +28 -0
  123. package/dist/tabs-DaPyP71c.js +78 -0
  124. package/dist/themes/dark.css +1347 -0
  125. package/dist/themes/light.css +1225 -0
  126. package/dist/transitionSpinner-PIEPU2Vx.js +17 -0
  127. package/dist/tutorial-9vHAHvMK.js +2587 -0
  128. package/dist/types/ae-signature.d.ts +40 -0
  129. package/dist/types/antifraud.d.ts +40 -0
  130. package/dist/types/authentication.d.ts +45 -0
  131. package/dist/types/base.d.ts +1 -0
  132. package/dist/types/consent.d.ts +41 -0
  133. package/dist/types/cpf-ocr/styles.d.ts +1 -0
  134. package/dist/types/cross-document-data-match.d.ts +34 -0
  135. package/dist/types/curp-validation.d.ts +40 -0
  136. package/dist/types/custom-fields/styles.d.ts +1 -0
  137. package/dist/types/dark.d.ts +1 -0
  138. package/dist/types/document-capture/styles.d.ts +1 -0
  139. package/dist/types/dynamic-forms/styles.d.ts +1 -0
  140. package/dist/types/ekyb.d.ts +34 -0
  141. package/dist/types/ekyc.d.ts +34 -0
  142. package/dist/types/electronic-signature.d.ts +43 -0
  143. package/dist/types/email.d.ts +67 -0
  144. package/dist/types/extensibility.d.ts +981 -0
  145. package/dist/types/face-match.d.ts +59 -0
  146. package/dist/types/flow.d.ts +137 -0
  147. package/dist/types/geolocation.d.ts +41 -0
  148. package/dist/types/governmentValidation.d.ts +34 -0
  149. package/dist/types/id-ocr/styles.d.ts +1 -0
  150. package/dist/types/id-verification.d.ts +40 -0
  151. package/dist/types/id.d.ts +41 -0
  152. package/dist/types/identity-reuse.d.ts +43 -0
  153. package/dist/types/index.d.ts +32 -0
  154. package/dist/types/light.d.ts +1 -0
  155. package/dist/types/mandatory-consent/styles.d.ts +1 -0
  156. package/dist/types/phone.d.ts +68 -0
  157. package/dist/types/qe-signature.d.ts +40 -0
  158. package/dist/types/redirect-to-mobile/styles.d.ts +1 -0
  159. package/dist/types/selfie.d.ts +41 -0
  160. package/dist/types/signature.d.ts +40 -0
  161. package/dist/types/styles.d.ts +1 -0
  162. package/dist/types/themes/dark.d.ts +1 -0
  163. package/dist/types/themes/light.d.ts +1 -0
  164. package/dist/types/watchlist-for-business/styles.d.ts +1 -0
  165. package/dist/types/watchlist.d.ts +40 -0
  166. package/dist/types/workflow.d.ts +91 -0
  167. package/dist/typography-CxjaknHN.js +28 -0
  168. package/dist/uiConfig-CwpQ-IM6.js +20 -0
  169. package/dist/useModuleLoader-BFiVA41N.js +432 -0
  170. package/dist/vendor-preact-D6SntenC.js +958 -0
  171. package/dist/verificationResult-BrVbUJ4U.js +97 -0
  172. package/dist/verifiedByIncode-ChZBpqNy.js +101 -0
  173. package/dist/watchlist/watchlist.es.js +33 -0
  174. package/dist/watchlist-for-business/styles.css +18 -0
  175. package/dist/watchlistForBusiness-BcSNtHCV.js +77 -0
  176. package/dist/workflow/styles.css +7480 -0
  177. package/dist/workflow/workflow.es.js +244 -0
  178. package/package.json +2 -2
@@ -0,0 +1,58 @@
1
+ import { n as e } from "./i18n-9s4OSqwi.js";
2
+ import { d as t, v as n } from "./vendor-preact-D6SntenC.js";
3
+ import { t as r } from "./dropdownComposed-DFRBG22E.js";
4
+ //#region src/shared/countrySelector/countrySelector.tsx
5
+ var i = [
6
+ "BR",
7
+ "CN",
8
+ "FR",
9
+ "DE",
10
+ "IL",
11
+ "IT",
12
+ "MX",
13
+ "ES",
14
+ "GB",
15
+ "US"
16
+ ], a = [
17
+ "CM",
18
+ "KE",
19
+ "NG"
20
+ ];
21
+ function o(e) {
22
+ return [...e.toUpperCase()].map((e) => String.fromCodePoint(127462 + e.charCodeAt(0) - 65)).join("");
23
+ }
24
+ function s() {
25
+ if (typeof window > "u") return !1;
26
+ let { hostname: e } = window.location;
27
+ return e === "localhost" || e.includes("stage") || e.includes("demo");
28
+ }
29
+ var c = ({ value: c, onChange: l, label: u, id: d = "country-selector", countryCodes: f = i, devOnlyCountryCodes: p = a, "data-testid": m }) => {
30
+ let { i18n: h } = e(), g = h.language || "en";
31
+ return /* @__PURE__ */ n("div", {
32
+ class: "IncodeCountrySelector",
33
+ children: /* @__PURE__ */ n(r, {
34
+ id: d,
35
+ label: u,
36
+ value: c,
37
+ options: t(() => {
38
+ let e = new Intl.DisplayNames([g, "en"], { type: "region" });
39
+ return (s() ? [...f, ...p] : [...f]).map((t) => {
40
+ let n = e.of(t) ?? t;
41
+ return {
42
+ value: t,
43
+ label: `${o(t)} ${n}`,
44
+ ariaLabel: n
45
+ };
46
+ }).sort((e, t) => e.label.localeCompare(t.label, g));
47
+ }, [
48
+ f,
49
+ p,
50
+ g
51
+ ]),
52
+ onChange: l,
53
+ "data-testid": m
54
+ })
55
+ });
56
+ };
57
+ //#endregion
58
+ export { c as t };
@@ -0,0 +1,45 @@
1
+ /*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
2
+ .IncodeCpfOcrPage {
3
+ width: 100%;
4
+ height: 100%;
5
+ animation: fadeIn var(--motion-fade-in-duration, .7s) ease-out;
6
+ margin-inline: auto;
7
+ animation-fill-mode: both;
8
+ }
9
+
10
+ @media (min-width: 48rem) {
11
+ .IncodeCpfOcrPage.IncodePageContainer {
12
+ align-items: stretch;
13
+ }
14
+ }
15
+
16
+ .IncodeCpfOcrPage .IncodePageInner {
17
+ height: 100%;
18
+ min-height: var(--spacing-0, var(--spacing-none, 0px));
19
+ }
20
+
21
+ .IncodeCpfOcrPage .IncodePageContent {
22
+ min-height: var(--spacing-0, var(--spacing-none, 0px));
23
+ }
24
+
25
+ .IncodeCpfOcrPage .IncodeCpfOcr {
26
+ height: 100%;
27
+ min-height: var(--spacing-0, var(--spacing-none, 0px));
28
+ width: 100%;
29
+ max-width: var(--incode-form-max-w);
30
+ align-items: center;
31
+ gap: var(--spacing-16, var(--spacing-16, 16px));
32
+ flex-direction: column;
33
+ flex: 1;
34
+ display: flex;
35
+ }
36
+
37
+ .IncodeCpfOcrPage .IncodeCpfOcrLoading {
38
+ height: 100%;
39
+ min-height: var(--spacing-0, var(--spacing-none, 0px));
40
+ flex-direction: column;
41
+ flex: 1;
42
+ justify-content: center;
43
+ align-items: center;
44
+ display: flex;
45
+ }
@@ -0,0 +1,78 @@
1
+ import { _ as e, p as t, v as n } from "./vendor-preact-D6SntenC.js";
2
+ import { o as r } from "./hooks-BVnGysT7.js";
3
+ import { r as i } from "./loadingIcon-BN5YRQUb.js";
4
+ import { t as a } from "./page-C1yT4DLb.js";
5
+ import { t as o } from "./spinner-CKnjVHxw.js";
6
+ import "./spinner-B4dcie2T.js";
7
+ import { t as s } from "./button-DcCUEn2n.js";
8
+ import { t as c } from "./verificationResult-BrVbUJ4U.js";
9
+ import { t as l } from "./inputComposed-APSw8C7o.js";
10
+ import { createCpfOcrManager as u } from "@incodetech/core/cpf-ocr";
11
+ //#region src/modules/cpf-ocr/cpfOcr.tsx
12
+ var d = (e) => e.status === "inputting" ? {
13
+ cpf: e.cpf,
14
+ isValid: e.isValid
15
+ } : {
16
+ cpf: "",
17
+ isValid: !1
18
+ }, f = ({ onFinish: f, onError: p }) => {
19
+ let [m, h] = r(() => u()), [g, _] = t(!1), [v, y] = t(!1), [b, x] = t(!1);
20
+ if (e(() => {
21
+ m.status === "finished" && f?.();
22
+ }, [m.status, f]), e(() => {
23
+ m.status === "error" && p?.(m.error);
24
+ }, [m, p]), m.status === "idle" || m.status === "loading" || m.status === "submitting") return /* @__PURE__ */ n(a, {
25
+ className: "IncodeCpfOcrPage",
26
+ children: /* @__PURE__ */ n("div", {
27
+ class: "IncodeCpfOcrLoading",
28
+ children: /* @__PURE__ */ n(o, { fullScreen: !1 })
29
+ })
30
+ });
31
+ if (m.status === "error") return /* @__PURE__ */ n(c, {
32
+ status: "failure",
33
+ failureTitle: "Não foi possível verificar o CPF",
34
+ onRetry: () => h.retry()
35
+ });
36
+ if (m.status === "finished") return null;
37
+ let S = d(m), C = S.cpf.replace(/\D/g, "").length === 11, w = v && !S.isValid && (C || g && !b) ? "Insira um CPF válido" : void 0;
38
+ return /* @__PURE__ */ n(a, {
39
+ className: "IncodeCpfOcrPage",
40
+ title: "Insira e verifique o número do seu CPF",
41
+ children: /* @__PURE__ */ n("div", {
42
+ class: "IncodeCpfOcr",
43
+ children: [
44
+ /* @__PURE__ */ n(i, { size: 32 }),
45
+ /* @__PURE__ */ n(l, {
46
+ id: "cpf-ocr-input",
47
+ label: "",
48
+ value: S.cpf,
49
+ placeholder: "Seu CPF",
50
+ maxLength: 14,
51
+ inputMode: "numeric",
52
+ "aria-label": "CPF",
53
+ onInput: (e) => {
54
+ y(!0), h.setCpf(e.target.value);
55
+ },
56
+ onFocus: () => {
57
+ x(!0);
58
+ },
59
+ onBlur: () => {
60
+ x(!1), _(!0);
61
+ },
62
+ error: w,
63
+ showErrorIcon: !0
64
+ }),
65
+ /* @__PURE__ */ n(i, {}),
66
+ /* @__PURE__ */ n(s, {
67
+ type: "button",
68
+ onClick: () => h.submit(),
69
+ disabled: !S.isValid,
70
+ "data-testid": "cpf-ocr-continue",
71
+ children: "Continuar"
72
+ })
73
+ ]
74
+ })
75
+ });
76
+ };
77
+ //#endregion
78
+ export { f as CpfOcr };
@@ -0,0 +1,18 @@
1
+ import { _ as e, v as t } from "../vendor-preact-D6SntenC.js";
2
+ import { o as n } from "../hooks-BVnGysT7.js";
3
+ import { t as r } from "../incodeComponent-C1o4M0ZK.js";
4
+ import { t as i } from "../spinner-CKnjVHxw.js";
5
+ import { t as a } from "../incodeModule-BqCjVgEI.js";
6
+ import { createCrossDocumentDataMatchManager as o } from "@incodetech/core/cross-document-data-match";
7
+ //#region src/modules/cross-document-data-match/cross-document-data-match.tsx
8
+ var s = ({ onFinish: r }) => {
9
+ let [a, s] = n(() => o());
10
+ return e(() => {
11
+ s.load();
12
+ }, [s]), e(() => {
13
+ a.status === "finished" && r?.();
14
+ }, [a.status, r]), /* @__PURE__ */ t(i, { fullScreen: !0 });
15
+ }, c = ({ onFinish: e }) => /* @__PURE__ */ t(r, { children: /* @__PURE__ */ t(s, { onFinish: e }) });
16
+ a(c, "incode-cross-document-data-match");
17
+ //#endregion
18
+ export { c as CrossDocumentDataMatch };
@@ -0,0 +1,279 @@
1
+ import { n as e } from "../i18n-9s4OSqwi.js";
2
+ import { S as t, d as n, v as r } from "../vendor-preact-D6SntenC.js";
3
+ import { o as i } from "../hooks-BVnGysT7.js";
4
+ import { t as a } from "../incodeComponent-C1o4M0ZK.js";
5
+ import { r as o } from "../loadingIcon-BN5YRQUb.js";
6
+ import { t as s } from "../page-C1yT4DLb.js";
7
+ import { t as c } from "../transitionSpinner-PIEPU2Vx.js";
8
+ import { t as l } from "../button-DcCUEn2n.js";
9
+ import { g as u } from "../icons-Cc7zwchP.js";
10
+ import { t as d } from "../successIcon-DbILeIz_.js";
11
+ import { t as f } from "../inputComposed-APSw8C7o.js";
12
+ import { t as p } from "../dropdownComposed-DFRBG22E.js";
13
+ import "../dropdownComposed-DwTzc2YU.js";
14
+ import { t as m } from "../dateInputComposed-BpAGsjN6.js";
15
+ import "../dateInputComposed-DU3o6PAV.js";
16
+ import { t as h } from "../incodeModule-BqCjVgEI.js";
17
+ import { n as g, t as _ } from "../requiredLabelHint-BLwgqozE.js";
18
+ import { t as v } from "../autoFocusTitle-QexamZ4i.js";
19
+ import { GENERATE_CURP_FIELDS as y, createCurpValidationManager as b, mexicanStates as x } from "@incodetech/core/curp-validation";
20
+ //#region src/modules/curp-validation/curpInput.tsx
21
+ var S = ({ curp: t, errorKey: n, onCurpChange: i, onCurpBlur: a, onVerify: s, onSwitchToGenerate: c, disabled: u = !1, placeholder: d, continueLabel: p, dontHaveLabel: m }) => {
22
+ let { t: h } = e(), g = d ?? h("curp.placeholder.curp") ?? "CURP", _ = p ?? h("curp.continue") ?? "Continue", v = m ?? h("curp.dontHave") ?? "I don't have my CURP", y = n ? h(n) : void 0, b = t.length === 0 || !!y || u;
23
+ return /* @__PURE__ */ r("div", {
24
+ class: "IncodeCurpValidation IncodeCurpInput",
25
+ children: [
26
+ /* @__PURE__ */ r(f, {
27
+ id: "curp-input",
28
+ value: t,
29
+ onInput: (e) => {
30
+ let t = e.target;
31
+ i(t.value.toUpperCase());
32
+ },
33
+ onBlur: a,
34
+ placeholder: g,
35
+ disabled: u,
36
+ required: !0,
37
+ maxLength: 18,
38
+ "aria-label": h("curp.placeholder.curp") ?? "CURP",
39
+ error: y,
40
+ showErrorIcon: !!y
41
+ }),
42
+ /* @__PURE__ */ r(o, {}),
43
+ /* @__PURE__ */ r(l, {
44
+ type: "button",
45
+ onClick: s,
46
+ disabled: b,
47
+ "data-testid": "curp-verify",
48
+ children: _
49
+ }),
50
+ /* @__PURE__ */ r(l, {
51
+ type: "button",
52
+ variant: "secondary",
53
+ onClick: c,
54
+ disabled: u,
55
+ "data-testid": "curp-switch-to-generate",
56
+ children: v
57
+ })
58
+ ]
59
+ });
60
+ }, C = ({ form: t, validationErrors: i, onFormChange: a, onValidateField: s, onGenerate: c, disabled: u = !1, labels: d }) => {
61
+ let { t: h } = e(), v = {
62
+ firstName: h("curp.labels.firstName") ?? "Your First name",
63
+ firstLast: h("curp.labels.firstLast") ?? "Your First last name",
64
+ secondLast: h("curp.labels.secondLast") ?? "Your Second last name",
65
+ gender: h("curp.labels.genderV2") ?? "Gender",
66
+ genderPlaceholder: h("curp.placeholder.gender") ?? "Choose gender",
67
+ male: h("curp.labels.maleV2") ?? "Male",
68
+ female: h("curp.labels.femaleV2") ?? "Female",
69
+ other: h("curp.labels.other") ?? "Other",
70
+ dob: h("curp.labels.dob") ?? "Date of birth",
71
+ birthState: h("curp.labels.birthState") ?? "State of birth",
72
+ statePlaceholder: h("curp.placeholder.state") ?? "Select state",
73
+ generate: h("curp.generateCta") ?? "Generate CURP",
74
+ ...d
75
+ }, b = n(() => g(y.map((e) => e.required)), []), S = !!i && Object.keys(i).length > 0, C = (e) => (t) => {
76
+ let n = t.target;
77
+ a({ [e]: n.value });
78
+ }, w = (e) => () => {
79
+ s(e);
80
+ }, T = [
81
+ {
82
+ value: "H",
83
+ label: v.male
84
+ },
85
+ {
86
+ value: "M",
87
+ label: v.female
88
+ },
89
+ {
90
+ value: "X",
91
+ label: v.other
92
+ }
93
+ ], E = x.map((e) => ({
94
+ value: e.value,
95
+ label: e.label
96
+ })), D = (e) => {
97
+ switch (e) {
98
+ case "name": return v.firstName;
99
+ case "firstLastName": return v.firstLast;
100
+ case "secondLastName": return v.secondLast;
101
+ case "gender": return v.gender;
102
+ case "birthDate": return v.dob;
103
+ case "birthState": return v.birthState;
104
+ }
105
+ };
106
+ return /* @__PURE__ */ r("div", {
107
+ class: "IncodeCurpValidation IncodeGenerateCurpForm",
108
+ children: [
109
+ y.map((e) => {
110
+ let n = _(b, e.required), o = n ? h(`forms.label.${n}`) ?? void 0 : void 0, s = i?.[e.key], c = s ? h(s) ?? void 0 : void 0, l = D(e.key);
111
+ if (e.type === "dropdown") {
112
+ let n = e.key === "gender" ? T : E, i = e.key === "gender" ? v.genderPlaceholder : v.statePlaceholder;
113
+ return /* @__PURE__ */ r(p, {
114
+ id: `curp-${e.key === "birthState" ? "birth-state" : "gender"}`,
115
+ label: l,
116
+ labelHint: o,
117
+ placeholder: i,
118
+ value: t[e.key],
119
+ options: n,
120
+ disabled: u,
121
+ required: e.required,
122
+ onChange: (t) => {
123
+ e.key === "gender" ? a({ gender: t }) : a({ [e.key]: t });
124
+ },
125
+ onBlur: w(e.key),
126
+ error: c,
127
+ showErrorIcon: !!c,
128
+ "data-testid": e.key === "gender" ? "curp-gender" : "curp-birth-state",
129
+ ...e.key === "birthState" ? { searchable: !0 } : {}
130
+ }, e.key);
131
+ }
132
+ return e.type === "date" ? /* @__PURE__ */ r(m, {
133
+ id: "curp-birth-date",
134
+ label: l,
135
+ labelHint: o,
136
+ value: t.birthDate,
137
+ onInput: C("birthDate"),
138
+ onBlur: w("birthDate"),
139
+ max: (/* @__PURE__ */ new Date()).toISOString().split("T")[0],
140
+ placeholder: h("curp.placeholder.dob") ?? "mm/dd/yyyy",
141
+ disabled: u,
142
+ required: e.required,
143
+ error: c,
144
+ showErrorIcon: !!c,
145
+ "data-testid": "curp-birth-date"
146
+ }, e.key) : /* @__PURE__ */ r(f, {
147
+ id: e.key === "name" ? "curp-first-name" : e.key === "firstLastName" ? "curp-first-last" : "curp-second-last",
148
+ label: l,
149
+ labelHint: o,
150
+ value: t[e.key],
151
+ onInput: C(e.key),
152
+ onBlur: w(e.key),
153
+ placeholder: l,
154
+ disabled: u,
155
+ required: e.required,
156
+ error: c,
157
+ showErrorIcon: !!c,
158
+ ...e.autoComplete ? { autoComplete: e.autoComplete } : {}
159
+ }, e.key);
160
+ }),
161
+ /* @__PURE__ */ r(o, { size: 16 }),
162
+ /* @__PURE__ */ r(l, {
163
+ type: "button",
164
+ onClick: c,
165
+ disabled: S || u,
166
+ "data-testid": "curp-generate",
167
+ children: v.generate
168
+ })
169
+ ]
170
+ });
171
+ }, w = ({ config: n, onFinish: a, onError: p }) => {
172
+ let { t: m } = e(), [h, g] = i(() => {
173
+ if (!n) throw Error("CURP validation config is required");
174
+ return b({ config: n });
175
+ });
176
+ if (h.status === "idle" || h.status === "loading" || h.status === "verifying" || h.status === "generating") return /* @__PURE__ */ r(c, { spinnerConfig: { title: h.status === "generating" ? m("curp.status.generating") ?? "Generating..." : m("curp.status.verifying") ?? "Verifying..." } });
177
+ if (h.status === "enterCurp") return /* @__PURE__ */ r(s, {
178
+ className: "IncodeCurpValidationPage",
179
+ title: m("curp.enterCurp") ?? "Enter your CURP",
180
+ children: /* @__PURE__ */ r(S, {
181
+ curp: h.curp,
182
+ errorKey: h.validationErrors?.curp,
183
+ onCurpChange: (e) => g.setCurp(e),
184
+ onCurpBlur: () => g.validateField("curp"),
185
+ onVerify: () => g.verify(),
186
+ onSwitchToGenerate: () => g.switchToGenerate(),
187
+ placeholder: m("curp.placeholder.curp") ?? "CURP",
188
+ continueLabel: m("curp.continue") ?? "Continue",
189
+ dontHaveLabel: m("curp.dontHave") ?? "I don't have my CURP"
190
+ })
191
+ });
192
+ if (h.status === "generateCurp") return /* @__PURE__ */ r(s, {
193
+ className: "IncodeCurpValidationPage",
194
+ title: m("curp.generate") ?? "Generate your CURP",
195
+ hideFooterBranding: !0,
196
+ children: /* @__PURE__ */ r(C, {
197
+ form: h.form,
198
+ validationErrors: h.validationErrors,
199
+ onFormChange: (e) => g.setGenerateForm(e),
200
+ onValidateField: (e) => g.validateField(e),
201
+ onGenerate: () => g.generate()
202
+ })
203
+ });
204
+ if (h.status === "confirmCurp") return /* @__PURE__ */ r(s, {
205
+ className: "IncodeCurpValidationPage",
206
+ title: m("curp.status.confirm") ?? "Confirm your CURP",
207
+ children: /* @__PURE__ */ r("div", {
208
+ class: "IncodeCurpValidation IncodeCurpConfirm",
209
+ children: [
210
+ /* @__PURE__ */ r(f, {
211
+ id: "curp-confirm-input",
212
+ value: h.curp,
213
+ readOnly: !0,
214
+ "aria-label": m("curp.status.generatedCurp") ?? "Generated CURP",
215
+ "data-testid": "curp-confirm-input"
216
+ }),
217
+ /* @__PURE__ */ r(o, {}),
218
+ /* @__PURE__ */ r(l, {
219
+ type: "button",
220
+ onClick: () => g.confirmGenerated(),
221
+ "data-testid": "curp-confirm",
222
+ children: m("curp.continue") ?? "Continue"
223
+ })
224
+ ]
225
+ })
226
+ });
227
+ if (h.status === "success") return /* @__PURE__ */ r(s, {
228
+ className: "IncodeCurpValidationPage",
229
+ children: /* @__PURE__ */ r("div", {
230
+ class: "IncodeCurpValidation IncodeCurpSuccess",
231
+ children: [
232
+ /* @__PURE__ */ r(d, { size: 64 }),
233
+ /* @__PURE__ */ r(o, { size: 16 }),
234
+ /* @__PURE__ */ r(v, {
235
+ className: "IncodeCurpSuccessTitle",
236
+ children: m("curp.status.verified") ?? "Verified"
237
+ })
238
+ ]
239
+ })
240
+ });
241
+ if (h.status === "failure" || h.status === "generateError") {
242
+ let e = h.retriesLeft > 0, n = h.status === "failure" ? m("curp.status.notVerified") ?? "Not verified" : m("curp.status.couldntGenerate") ?? "Couldn't generate CURP";
243
+ return /* @__PURE__ */ r(s, {
244
+ className: "IncodeCurpValidationPage",
245
+ children: /* @__PURE__ */ r("div", {
246
+ class: "IncodeCurpValidation IncodeCurpFailure",
247
+ children: [
248
+ /* @__PURE__ */ r(o, {}),
249
+ /* @__PURE__ */ r(u, { size: 64 }),
250
+ /* @__PURE__ */ r(o, { size: 16 }),
251
+ /* @__PURE__ */ r(v, {
252
+ className: "IncodeCurpFailureTitle",
253
+ children: n
254
+ }),
255
+ h.status === "generateError" && e && /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ r(o, { size: 12 }), /* @__PURE__ */ r("p", {
256
+ class: "IncodeCurpFailureHint",
257
+ role: "alert",
258
+ children: m("curp.status.checkInfo") ?? "Please check your information"
259
+ })] }),
260
+ /* @__PURE__ */ r(o, {}),
261
+ e && /* @__PURE__ */ r(t, { children: /* @__PURE__ */ r(l, {
262
+ type: "button",
263
+ onClick: () => g.retry(),
264
+ "data-testid": "curp-retry",
265
+ children: h.status === "failure" ? m("curp.status.tryAgain") ?? "Try again" : m("curp.status.edit") ?? "Edit information"
266
+ }) })
267
+ ]
268
+ })
269
+ });
270
+ }
271
+ return h.status === "finished" ? (a?.(), null) : (h.status === "closed" && p?.(void 0), null);
272
+ }, T = ({ config: e, onFinish: t, onError: n }) => /* @__PURE__ */ r(a, { children: e ? /* @__PURE__ */ r(w, {
273
+ config: e,
274
+ onFinish: t,
275
+ onError: n
276
+ }) : null });
277
+ h(T, "incode-curp-validation");
278
+ //#endregion
279
+ export { T as CurpValidation };
@@ -0,0 +1,82 @@
1
+ /*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
2
+ .IncodeCurpValidationPage .IncodePageContent {
3
+ padding-top: var(--spacing-32, var(--spacing-32, 32px));
4
+ padding-bottom: var(--spacing-16, var(--spacing-16, 16px));
5
+ flex-direction: column;
6
+ align-items: center;
7
+ display: flex;
8
+ }
9
+
10
+ .IncodeCurpValidationPage .IncodeCurpValidation {
11
+ flex-direction: column;
12
+ align-items: center;
13
+ width: 100%;
14
+ height: 100%;
15
+ display: flex;
16
+ }
17
+
18
+ .IncodeCurpValidationPage .IncodeCurpInput {
19
+ min-height: var(--spacing-0, var(--spacing-none, 0px));
20
+ width: 100%;
21
+ max-width: var(--incode-form-max-w);
22
+ gap: var(--spacing-12, var(--spacing-12, 12px));
23
+ flex-direction: column;
24
+ flex: 1;
25
+ display: flex;
26
+ }
27
+
28
+ .IncodeCurpValidationPage .IncodeCurpInput .IncodeButtonSecondary:focus {
29
+ text-decoration: none;
30
+ }
31
+
32
+ .IncodeCurpValidationPage .IncodeCurpInput .IncodeButtonSecondary:active {
33
+ color: var(--color-button-secondary-text-default, var(--button-secondary-text-default));
34
+ }
35
+
36
+ .IncodeCurpValidationPage .IncodeGenerateCurpForm {
37
+ width: 100%;
38
+ max-width: var(--incode-form-max-w);
39
+ gap: var(--spacing-8, var(--spacing-8, 8px));
40
+ flex-direction: column;
41
+ display: flex;
42
+ }
43
+
44
+ .IncodeCurpValidationPage .IncodeCurpConfirm {
45
+ width: 100%;
46
+ max-width: var(--incode-curp-confirm-max-w);
47
+ flex-direction: column;
48
+ align-items: center;
49
+ display: flex;
50
+ }
51
+
52
+ .IncodeCurpValidationPage .IncodeCurpConfirm .IncodeInput {
53
+ text-align: center;
54
+ font-family: var(--typography-input-dropdown-family);
55
+ font-size: var(--typography-input-dropdown-m-size);
56
+ font-weight: var(--typography-input-dropdown-m-weight);
57
+ line-height: var(--typography-input-dropdown-m-line-height);
58
+ letter-spacing: var(--typography-input-dropdown-m-letter-spacing);
59
+ }
60
+
61
+ .IncodeCurpValidationPage .IncodeCurpSuccess, .IncodeCurpValidationPage .IncodeCurpFailure {
62
+ flex-direction: column;
63
+ justify-content: center;
64
+ align-items: center;
65
+ display: flex;
66
+ }
67
+
68
+ .IncodeCurpValidationPage .IncodeCurpSuccessTitle, .IncodeCurpValidationPage .IncodeCurpFailureTitle {
69
+ margin: var(--spacing-0, var(--spacing-none, 0px));
70
+ padding: var(--spacing-0, var(--spacing-none, 0px));
71
+ }
72
+
73
+ .IncodeCurpValidationPage .IncodeCurpFailureHint {
74
+ margin: var(--spacing-0, var(--spacing-none, 0px));
75
+ text-align: center;
76
+ font-family: var(--typography-headline-family);
77
+ font-size: var(--typography-headline-h5-size);
78
+ font-weight: var(--typography-headline-h5-weight);
79
+ line-height: var(--typography-headline-h5-line-height);
80
+ letter-spacing: var(--typography-headline-h5-letter-spacing);
81
+ color: var(--color-text-body-secondary, var(--text-body-500-secondary));
82
+ }
@@ -0,0 +1,22 @@
1
+ /*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
2
+ .IncodeCustomFieldsForm {
3
+ margin-top: var(--spacing-32, var(--spacing-32, 32px));
4
+ margin-bottom: var(--spacing-16, var(--spacing-16, 16px));
5
+ gap: var(--spacing-16, var(--spacing-16, 16px));
6
+ flex-direction: column;
7
+ flex: 1;
8
+ width: 100%;
9
+ display: flex;
10
+ overflow-y: auto;
11
+ }
12
+
13
+ .IncodeCustomFieldsForm .IncodeCustomFieldsField {
14
+ flex-direction: column;
15
+ align-items: center;
16
+ width: 100%;
17
+ display: flex;
18
+ }
19
+
20
+ .IncodeCustomFieldsPage .IncodePageHeader {
21
+ margin-bottom: var(--spacing-16, var(--spacing-16, 16px));
22
+ }