@incodetech/web 2.0.0-rc.0 → 2.0.0

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/package.json +3 -3
  2. package/dist/ae-signature/ae-signature.es.js +0 -15
  3. package/dist/ae-signature/styles.css +0 -348
  4. package/dist/ae-signature/styles2.css +0 -107
  5. package/dist/aligndevicelottie-DoV8xKjh.js +0 -12757
  6. package/dist/antifraud/antifraud.es.js +0 -18
  7. package/dist/antifraud/styles.css +0 -2
  8. package/dist/authentication/authentication.es.js +0 -29
  9. package/dist/autoFocusTitle-QexamZ4i.js +0 -16
  10. package/dist/back-horizontal-hint-B8Brxh3U.js +0 -137
  11. package/dist/back-tutorial-1NOQobGO.js +0 -14585
  12. package/dist/back-vertical-hint-BBo36dxn.js +0 -128
  13. package/dist/backdevicelottie-C_ceuqY7.js +0 -16678
  14. package/dist/base.css +0 -5818
  15. package/dist/blurdevicelottie-UO14Y0WC.js +0 -15939
  16. package/dist/bottomSheet-DE_8TFEC.js +0 -31
  17. package/dist/browser-ponyfill-jOkuz57z.js +0 -299
  18. package/dist/button-DcCUEn2n.js +0 -24
  19. package/dist/checkbox-Cl57ltq_.js +0 -85
  20. package/dist/consent/consent.es.js +0 -90
  21. package/dist/consent/styles.css +0 -116
  22. package/dist/countrySelector-CE-JgIsv.js +0 -58
  23. package/dist/cpf-ocr/styles.css +0 -45
  24. package/dist/cpfOcr-D_tbwbvh.js +0 -78
  25. package/dist/cross-document-data-match/cross-document-data-match.es.js +0 -18
  26. package/dist/curp-validation/curp-validation.es.js +0 -279
  27. package/dist/curp-validation/styles.css +0 -82
  28. package/dist/custom-fields/styles.css +0 -22
  29. package/dist/customFields-CW38fQUv.js +0 -127
  30. package/dist/customWatchlist-D9_yjEQd.js +0 -33
  31. package/dist/dateInputComposed-BpAGsjN6.js +0 -55
  32. package/dist/dateInputComposed-DU3o6PAV.js +0 -1
  33. package/dist/defineProperty-Dh8nSJpJ.js +0 -39
  34. package/dist/document-capture/styles.css +0 -367
  35. package/dist/documentCapture-xX-JT7ZY.js +0 -763
  36. package/dist/dropdownComposed-DFRBG22E.js +0 -284
  37. package/dist/dropdownComposed-DwTzc2YU.js +0 -1
  38. package/dist/dynamic-forms/styles.css +0 -36
  39. package/dist/dynamicForms-CJP1Ia6Q.js +0 -262
  40. package/dist/ekyb/ekyb.es.js +0 -2
  41. package/dist/ekyb/styles.css +0 -137
  42. package/dist/ekybModule-BSs7mndb.js +0 -280
  43. package/dist/ekybModule-D9M3E2Gm.js +0 -2
  44. package/dist/ekyc/ekyc.es.js +0 -2
  45. package/dist/ekyc/styles.css +0 -106
  46. package/dist/ekycModule-CU9pt5YN.js +0 -246
  47. package/dist/ekycModule-CZw9cLno.js +0 -2
  48. package/dist/electronic-signature/electronic-signature.es.js +0 -2
  49. package/dist/electronic-signature-COYXjGdd.js +0 -410
  50. package/dist/email/email.es.js +0 -87
  51. package/dist/email/styles.css +0 -12
  52. package/dist/emailInput-DppGf9pv.js +0 -37
  53. package/dist/expiredId-BnmzE8T3.js +0 -70
  54. package/dist/extensibility-CzEJfRwo.js +0 -2586
  55. package/dist/extensibility.es.js +0 -25
  56. package/dist/face-match/face-match.es.js +0 -2
  57. package/dist/face-match/styles.css +0 -910
  58. package/dist/faceMatch-B8j0g0Yo.js +0 -2
  59. package/dist/faceMatch-BV8UD7tj.js +0 -201
  60. package/dist/flip-animation-CgwRsEmK.js +0 -6983
  61. package/dist/flow/flow.es.js +0 -661
  62. package/dist/flow/styles.css +0 -5205
  63. package/dist/front-horizontal-hint-DGGGi8e1.js +0 -380
  64. package/dist/front-vertical-hint-CNr5mE6Q.js +0 -420
  65. package/dist/frontdevicelottie-Bu6f9fDE.js +0 -17302
  66. package/dist/geolocation/geolocation.es.js +0 -857
  67. package/dist/geolocation/styles.css +0 -158
  68. package/dist/glaredevicelottie-B10axYs_.js +0 -14466
  69. package/dist/governmentValidation/governmentValidation.es.js +0 -98
  70. package/dist/governmentValidation/styles.css +0 -58
  71. package/dist/homeScreen-DnP1jw9A.js +0 -227
  72. package/dist/hooks-BVnGysT7.js +0 -80
  73. package/dist/i18n-9s4OSqwi.js +0 -2010
  74. package/dist/icons-Cc7zwchP.js +0 -310
  75. package/dist/id/id.es.js +0 -832
  76. package/dist/id/styles.css +0 -1287
  77. package/dist/id-laser-h-mBAzHVOK.js +0 -467
  78. package/dist/id-laser-v-CrFg4bcJ.js +0 -483
  79. package/dist/id-ocr/styles.css +0 -46
  80. package/dist/id-tutorial-BCr42Pnn.js +0 -13153
  81. package/dist/id-verification/id-verification.es.js +0 -20
  82. package/dist/idOcr-CCjfWQvH.js +0 -94
  83. package/dist/identity-reuse/identity-reuse.es.js +0 -198
  84. package/dist/identity-reuse/styles.css +0 -163
  85. package/dist/incode-logo-DX016usY.js +0 -4
  86. package/dist/incodeComponent-C1o4M0ZK.js +0 -50
  87. package/dist/incodeModule-BqCjVgEI.js +0 -18
  88. package/dist/index.es.js +0 -16
  89. package/dist/inputComposed-APSw8C7o.js +0 -89
  90. package/dist/inputComposed-XYrarFxS.js +0 -1
  91. package/dist/loadingIcon-BN5YRQUb.js +0 -104
  92. package/dist/mandatoryConsent-DssKMC3v.js +0 -100
  93. package/dist/modal-NMxsQHAO.js +0 -135
  94. package/dist/modal.hooks-CAjcIFZK.js +0 -126
  95. package/dist/numberedStep-CT-alrK5.js +0 -11
  96. package/dist/optionAccessibleLabel-CzEeX3Q4.js +0 -140
  97. package/dist/otpInput-DqRA_egd.js +0 -145
  98. package/dist/page-C1yT4DLb.js +0 -69
  99. package/dist/passport-horizontal-hint-Bgquwtac.js +0 -293
  100. package/dist/passport-tutorial-DwRwtPVX.js +0 -11689
  101. package/dist/passport-vertical-hint-BT1D5BrW.js +0 -267
  102. package/dist/pdf-BurGZ08w.js +0 -14967
  103. package/dist/pdfViewer-BGBNL1Ea.js +0 -63
  104. package/dist/phone/phone.es.js +0 -98
  105. package/dist/phone/styles.css +0 -11
  106. package/dist/phoneInputComposed-bvWhGLFZ.js +0 -11206
  107. package/dist/processing-G_y3o32b.js +0 -6
  108. package/dist/qe-signature/qe-signature.es.js +0 -15
  109. package/dist/radioGroupComposed-BbmvxmD2.js +0 -177
  110. package/dist/redirect-to-mobile/styles.css +0 -588
  111. package/dist/redirectToMobile-C3k1gloW.js +0 -1514
  112. package/dist/requiredLabelHint-BLwgqozE.js +0 -13
  113. package/dist/richText-DbJ5sl2n.js +0 -1973
  114. package/dist/rolldown-runtime-CYMK-g2i.js +0 -20
  115. package/dist/selfie/selfie.es.js +0 -43
  116. package/dist/selfie/styles.css +0 -706
  117. package/dist/selfieTutorial-BgrlUMXP.js +0 -2677
  118. package/dist/signature/signature.es.js +0 -546
  119. package/dist/snackbar-BDp8x7Cv.js +0 -14
  120. package/dist/spinner-B4dcie2T.js +0 -1
  121. package/dist/spinner-CKnjVHxw.js +0 -39
  122. package/dist/statusPage-CUI7ApcU.js +0 -28
  123. package/dist/successIcon-DbILeIz_.js +0 -28
  124. package/dist/tabs-DaPyP71c.js +0 -78
  125. package/dist/themes/dark.css +0 -1347
  126. package/dist/themes/light.css +0 -1225
  127. package/dist/transitionSpinner-PIEPU2Vx.js +0 -17
  128. package/dist/tutorial-9vHAHvMK.js +0 -2587
  129. package/dist/types/ae-signature.d.ts +0 -40
  130. package/dist/types/antifraud.d.ts +0 -40
  131. package/dist/types/authentication.d.ts +0 -45
  132. package/dist/types/base.d.ts +0 -1
  133. package/dist/types/consent.d.ts +0 -41
  134. package/dist/types/cpf-ocr/styles.d.ts +0 -1
  135. package/dist/types/cross-document-data-match.d.ts +0 -34
  136. package/dist/types/curp-validation.d.ts +0 -40
  137. package/dist/types/custom-fields/styles.d.ts +0 -1
  138. package/dist/types/dark.d.ts +0 -1
  139. package/dist/types/document-capture/styles.d.ts +0 -1
  140. package/dist/types/dynamic-forms/styles.d.ts +0 -1
  141. package/dist/types/ekyb.d.ts +0 -34
  142. package/dist/types/ekyc.d.ts +0 -34
  143. package/dist/types/electronic-signature.d.ts +0 -43
  144. package/dist/types/email.d.ts +0 -67
  145. package/dist/types/extensibility.d.ts +0 -981
  146. package/dist/types/face-match.d.ts +0 -59
  147. package/dist/types/flow.d.ts +0 -137
  148. package/dist/types/geolocation.d.ts +0 -41
  149. package/dist/types/governmentValidation.d.ts +0 -34
  150. package/dist/types/id-ocr/styles.d.ts +0 -1
  151. package/dist/types/id-verification.d.ts +0 -40
  152. package/dist/types/id.d.ts +0 -41
  153. package/dist/types/identity-reuse.d.ts +0 -43
  154. package/dist/types/index.d.ts +0 -32
  155. package/dist/types/light.d.ts +0 -1
  156. package/dist/types/mandatory-consent/styles.d.ts +0 -1
  157. package/dist/types/phone.d.ts +0 -68
  158. package/dist/types/qe-signature.d.ts +0 -40
  159. package/dist/types/redirect-to-mobile/styles.d.ts +0 -1
  160. package/dist/types/selfie.d.ts +0 -41
  161. package/dist/types/signature.d.ts +0 -40
  162. package/dist/types/styles.d.ts +0 -1
  163. package/dist/types/themes/dark.d.ts +0 -1
  164. package/dist/types/themes/light.d.ts +0 -1
  165. package/dist/types/watchlist-for-business/styles.d.ts +0 -1
  166. package/dist/types/watchlist.d.ts +0 -40
  167. package/dist/types/workflow.d.ts +0 -91
  168. package/dist/typography-CxjaknHN.js +0 -28
  169. package/dist/uiConfig-CwpQ-IM6.js +0 -20
  170. package/dist/useModuleLoader-BFiVA41N.js +0 -432
  171. package/dist/vendor-preact-D6SntenC.js +0 -958
  172. package/dist/verificationResult-BrVbUJ4U.js +0 -97
  173. package/dist/verifiedByIncode-ChZBpqNy.js +0 -101
  174. package/dist/watchlist/watchlist.es.js +0 -33
  175. package/dist/watchlist-for-business/styles.css +0 -18
  176. package/dist/watchlistForBusiness-BcSNtHCV.js +0 -77
  177. package/dist/workflow/styles.css +0 -4612
  178. package/dist/workflow/workflow.es.js +0 -244
@@ -1,58 +0,0 @@
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 };
@@ -1,45 +0,0 @@
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
- }
@@ -1,78 +0,0 @@
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 };
@@ -1,18 +0,0 @@
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 };
@@ -1,279 +0,0 @@
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 };
@@ -1,82 +0,0 @@
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
- }
@@ -1,22 +0,0 @@
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
- }