@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.
Files changed (162) hide show
  1. package/dist/AsYouType-D1H_js4X.js +2607 -0
  2. package/dist/Trans-aTzdT_SA.js +55 -0
  3. package/dist/addressAutocomplete-C8-wL1j_.js +153 -0
  4. package/dist/aligndevicelottie-DlQCRPfM.js +29 -0
  5. package/dist/antifraud/antifraud.es.js +18 -17
  6. package/dist/antifraud/styles.css +1 -1
  7. package/dist/authentication/authentication.es.js +50 -28
  8. package/dist/back-horizontal-hint-CSlf9KI1.js +5 -0
  9. package/dist/back-tutorial-An9AcMSe.js +29 -0
  10. package/dist/back-vertical-hint-CNieqiCr.js +5 -0
  11. package/dist/backdevicelottie-B4NgyWmX.js +29 -0
  12. package/dist/base.css +67 -327
  13. package/dist/blurdevicelottie-_BZRug1c.js +29 -0
  14. package/dist/browser-ponyfill-B6W6hHVY.js +344 -0
  15. package/dist/button-CE9kRlem.js +184 -0
  16. package/dist/cameraView-C2X7klNb.js +55 -0
  17. package/dist/captureOverlay-tCb4R4WE.js +592 -0
  18. package/dist/checkbox-B5X-mfqq.js +137 -0
  19. package/dist/chevronDown-DSHaPKbi.js +23 -0
  20. package/dist/closeIcon-9Hc97omv.js +28 -0
  21. package/dist/consent/consent.es.js +89 -82
  22. package/dist/consent/styles.css +1 -1
  23. package/dist/countries-DfLkrF0x.js +616 -0
  24. package/dist/curp-validation/curp-validation.es.js +313 -271
  25. package/dist/curp-validation/styles.css +1 -1
  26. package/dist/dateInputComposed-C7PCzh-U.js +173 -0
  27. package/dist/document-capture/styles.css +1 -1
  28. package/dist/documentCapture-C0mO-RGE.js +692 -0
  29. package/dist/dropdownComposed-BpinYlrx.js +367 -0
  30. package/dist/ekyb/styles.css +1 -1
  31. package/dist/ekybModule-Dr6LJUg-.js +357 -0
  32. package/dist/ekyc/styles.css +1 -1
  33. package/dist/ekycModule-C3mswduI.js +291 -0
  34. package/dist/email/email.es.js +154 -110
  35. package/dist/email/styles.css +1 -1
  36. package/dist/errorContent-Cb8nmQAE.js +44 -0
  37. package/dist/errorIcon-DEARBrGx.js +26 -0
  38. package/dist/extensibility.es.js +150 -22
  39. package/dist/face-match/styles.css +73 -147
  40. package/dist/faceMatch-DbDp7D3d.js +237 -0
  41. package/dist/fileIcon-CCSvS10T.js +52 -0
  42. package/dist/flip-animation-COR596wy.js +29 -0
  43. package/dist/flipAnimation-BqV462TA.js +2059 -0
  44. package/dist/flow/flow.es.js +2613 -2273
  45. package/dist/flow/styles.css +73 -432
  46. package/dist/formField-CP6wDdfA.js +106 -0
  47. package/dist/front-horizontal-hint-lRLKd7vY.js +7 -0
  48. package/dist/front-vertical-hint-qQoJXRE3.js +7 -0
  49. package/dist/frontdevicelottie-KhKxT5n9.js +29 -0
  50. package/dist/geolocation/geolocation.es.js +832 -852
  51. package/dist/geolocation/styles.css +1 -1
  52. package/dist/glaredevicelottie-DLuIStvb.js +29 -0
  53. package/dist/governmentValidation/governmentValidation.es.js +106 -100
  54. package/dist/governmentValidation/styles.css +1 -1
  55. package/dist/id/id.es.js +59 -53
  56. package/dist/id/styles.css +1 -1
  57. package/dist/id-laser-h-BBV3r3rz.js +29 -0
  58. package/dist/id-laser-v-BTHJaSfx.js +29 -0
  59. package/dist/id-tutorial-B-F5Q28m.js +29 -0
  60. package/dist/incodeModule-C4XIllao.js +96 -0
  61. package/dist/index.es.js +25 -4
  62. package/dist/inputComposed-fUbAGrDy.js +103 -0
  63. package/dist/instance-BWYzq8dk.js +2163 -0
  64. package/dist/loadingIcon-DmuPXh70.js +195 -0
  65. package/dist/mandatoryConsent-5xPI0cor.js +94 -0
  66. package/dist/manualCaptureButton-BvFmTyJe.js +372 -0
  67. package/dist/numberedStep-DwUB__mh.js +5 -0
  68. package/dist/otpInput-BFXhqFRT.js +156 -0
  69. package/dist/page-SrUl0qtN.js +69 -0
  70. package/dist/passport-horizontal-hint-BCtpMp1Y.js +5 -0
  71. package/dist/passport-tutorial-CaYBFTqt.js +29 -0
  72. package/dist/passport-vertical-hint-GaLnzqHP.js +5 -0
  73. package/dist/permissions-DT4Fz9MR.js +709 -0
  74. package/dist/phone/phone.es.js +121 -87
  75. package/dist/phone/styles.css +1 -1
  76. package/dist/phoneInput-CGr8TxOO.js +158 -0
  77. package/dist/phoneInputComposed-Cm9O2Jba.js +206 -0
  78. package/dist/processing-szVOCQwZ.js +19 -0
  79. package/dist/redirect-to-mobile/styles.css +1 -1
  80. package/dist/richText-cspvNz2a.js +1807 -0
  81. package/dist/selfie/selfie.es.js +50 -29
  82. package/dist/selfie/styles.css +66 -170
  83. package/dist/selfieTutorial-Dm_p0ke9.js +29 -0
  84. package/dist/signature/signature.es.js +707 -557
  85. package/dist/signature/styles.css +1 -1
  86. package/dist/spinner-DygONskw.js +60 -0
  87. package/dist/successIcon-Bjsdc4lF.js +26 -0
  88. package/dist/tutorial-Cdz1025D.js +473 -0
  89. package/dist/types/ekyb/styles.d.ts +1 -0
  90. package/dist/types/ekyc/styles.d.ts +1 -0
  91. package/dist/types/index.d.ts +8 -0
  92. package/dist/typography-BDACYR5i.js +14 -0
  93. package/dist/uiConfig-Dnt-2YWB.js +23 -0
  94. package/dist/useMediaQuery-lJdQBmC2.js +18 -0
  95. package/dist/vendor-preact-BoMmvSgn.js +694 -0
  96. package/dist/warningIcon-DQq_MrOB.js +26 -0
  97. package/package.json +11 -8
  98. package/dist/AsYouType-DPWqJvFu.js +0 -2482
  99. package/dist/addressAutocomplete-B3f6PGTT.js +0 -108
  100. package/dist/aligndevicelottie-C9xl1spu.js +0 -12757
  101. package/dist/back-horizontal-hint-Be3dUGk6.js +0 -137
  102. package/dist/back-tutorial-BNTyW-1N.js +0 -14584
  103. package/dist/back-vertical-hint-Bz_rnhd-.js +0 -128
  104. package/dist/backdevicelottie-DBB1YCtW.js +0 -16678
  105. package/dist/blurdevicelottie-9WvZCZ6C.js +0 -15939
  106. package/dist/browser-ponyfill-B4Qc6yfW.js +0 -299
  107. package/dist/button-DhL5eRT3.js +0 -123
  108. package/dist/checkbox-l8NxPf4o.js +0 -85
  109. package/dist/countries-y2ydYDhN.js +0 -8323
  110. package/dist/dateInputComposed-B9WqdYx9.js +0 -2
  111. package/dist/dateInputComposed-ndsGHX1M.js +0 -94
  112. package/dist/defineProperty-brqHEHA_.js +0 -39
  113. package/dist/documentCapture-wDgRLdon.js +0 -784
  114. package/dist/dropdownComposed-_Ey7wJNG.js +0 -258
  115. package/dist/ekyb/ekyb.es.js +0 -2
  116. package/dist/ekybModule-BBOm1y49.js +0 -2
  117. package/dist/ekybModule-fz6i9ZRt.js +0 -286
  118. package/dist/ekyc/ekyc.es.js +0 -2
  119. package/dist/ekycModule-SeTFG3AJ.js +0 -233
  120. package/dist/ekycModule-hxIcNX8n.js +0 -2
  121. package/dist/extensibility-DJihqIzM.js +0 -2248
  122. package/dist/faceMatch-DH8sLx34.js +0 -191
  123. package/dist/flip-animation-DOJzdXB-.js +0 -6983
  124. package/dist/formField-BRTbY8w9.js +0 -100
  125. package/dist/front-horizontal-hint-aGAhadA2.js +0 -380
  126. package/dist/front-vertical-hint-DZz1VeNp.js +0 -420
  127. package/dist/frontdevicelottie-DadDp6be.js +0 -17302
  128. package/dist/glaredevicelottie-BfI84cPw.js +0 -14466
  129. package/dist/i18n-DZOHbK9q.js +0 -1916
  130. package/dist/icons-BHbofCgJ.js +0 -245
  131. package/dist/id-laser-h-BWyU3VgL.js +0 -467
  132. package/dist/id-laser-v-JiWXUlv0.js +0 -467
  133. package/dist/id-tutorial-Cc9xg5_J.js +0 -13152
  134. package/dist/incodeModule-Bf6yJ8RB.js +0 -18
  135. package/dist/inputComposed-BhbfD8Ru.js +0 -77
  136. package/dist/loadingIcon-CeQt7Zgb.js +0 -146
  137. package/dist/mandatoryConsent-LBS8E0rj.js +0 -101
  138. package/dist/numberedStep-CQVRixRP.js +0 -11
  139. package/dist/otpInput-CDIG9el7.js +0 -143
  140. package/dist/page-SvlJWUfz.js +0 -61
  141. package/dist/passport-horizontal-hint-CFsGs7Dp.js +0 -293
  142. package/dist/passport-tutorial-z0LN7Hsp.js +0 -11688
  143. package/dist/passport-vertical-hint-BnCpKWeN.js +0 -267
  144. package/dist/phoneInput-C9T_8FJt.js +0 -138
  145. package/dist/phoneInputComposed-B-0zieIW.js +0 -407
  146. package/dist/processing-B5zhNH6I.js +0 -15
  147. package/dist/richText-Db0PfpkE.js +0 -1973
  148. package/dist/rolldown-runtime-CjdbFOpI.js +0 -13
  149. package/dist/selfieTutorial-B0MIyPrk.js +0 -2676
  150. package/dist/setup-Dq2bzNKH.js +0 -15
  151. package/dist/spacer-DCljE53A.js +0 -59
  152. package/dist/spinner-Bk0YuoLu.js +0 -1
  153. package/dist/spinner-snIGzmm8.js +0 -41
  154. package/dist/successIcon-AHrfmJvv.js +0 -17
  155. package/dist/tutorial-DNOd11tg.js +0 -2780
  156. package/dist/types/ekyb.d.ts +0 -29
  157. package/dist/types/ekyc.d.ts +0 -29
  158. package/dist/typography-BNbFNFek.js +0 -1
  159. package/dist/typography-DvHeVWfY.js +0 -29
  160. package/dist/uiConfig-CwpQ-IM6.js +0 -20
  161. package/dist/vendor-preact-D6SntenC.js +0 -958
  162. package/dist/warningIcon-Cvj-ayg1.js +0 -17
@@ -1,271 +1,313 @@
1
- import { n as e } from "../i18n-DZOHbK9q.js";
2
- import { S as t, v as n } from "../vendor-preact-D6SntenC.js";
3
- import { c as r, r as i } from "../loadingIcon-CeQt7Zgb.js";
4
- import { t as a } from "../spacer-DCljE53A.js";
5
- import { t as o } from "../button-DhL5eRT3.js";
6
- import { t as s } from "../page-SvlJWUfz.js";
7
- import { t as c } from "../spinner-snIGzmm8.js";
8
- import "../spinner-Bk0YuoLu.js";
9
- import { p as l } from "../icons-BHbofCgJ.js";
10
- import { t as u } from "../successIcon-AHrfmJvv.js";
11
- import { t as d } from "../inputComposed-BhbfD8Ru.js";
12
- import { t as f } from "../dropdownComposed-_Ey7wJNG.js";
13
- import "../dateInputComposed-B9WqdYx9.js";
14
- import { t as p } from "../dateInputComposed-ndsGHX1M.js";
15
- import { t as m } from "../incodeModule-Bf6yJ8RB.js";
16
- import { createCurpValidationManager as h, mexicanStates as g } from "@incodetech/core/curp-validation";
17
- //#region src/modules/curp-validation/curpInput.tsx
18
- var _ = ({ curp: t, isValid: r, onCurpChange: i, onVerify: s, onSwitchToGenerate: c, disabled: l = !1, placeholder: u, continueLabel: f, dontHaveLabel: p }) => {
19
- let { t: m } = e(), h = u ?? m("curp.placeholder.curp") ?? "CURP", g = f ?? m("curp.continue") ?? "Continue", _ = p ?? m("curp.dontHave") ?? "I don't have my CURP", v = m("curp.placeholder.curp") ?? "CURP";
20
- return /* @__PURE__ */ n("div", {
21
- class: "IncodeCurpValidation IncodeCurpInput",
22
- children: [
23
- /* @__PURE__ */ n(d, {
24
- id: "curp-input",
25
- label: "",
26
- value: t,
27
- onInput: (e) => {
28
- let t = e.target;
29
- i(t.value.toUpperCase());
30
- },
31
- placeholder: h,
32
- disabled: l,
33
- maxLength: 18,
34
- "aria-label": v
35
- }),
36
- /* @__PURE__ */ n(a, {}),
37
- /* @__PURE__ */ n(o, {
38
- type: "button",
39
- onClick: s,
40
- disabled: !r || l,
41
- "data-testid": "curp-verify",
42
- children: g
43
- }),
44
- /* @__PURE__ */ n(o, {
45
- type: "button",
46
- onClick: c,
47
- disabled: l,
48
- "data-testid": "curp-switch-to-generate",
49
- class: "IncodeCurpInputDontHaveButton",
50
- children: _
51
- })
52
- ]
53
- });
54
- }, v = ({ form: t, isValid: r, onFormChange: i, onGenerate: s, disabled: c = !1, labels: l }) => {
55
- let { t: u } = e(), m = {
56
- firstName: u("curp.labels.firstName") ?? "Your First name",
57
- firstLast: u("curp.labels.firstLast") ?? "Your First last name",
58
- secondLast: u("curp.labels.secondLast") ?? "Your Second last name",
59
- gender: u("curp.labels.genderV2") ?? "Gender",
60
- genderPlaceholder: u("curp.placeholder.gender") ?? "Choose gender",
61
- male: u("curp.labels.maleV2") ?? "Male",
62
- female: u("curp.labels.femaleV2") ?? "Female",
63
- other: u("curp.labels.other") ?? "Other",
64
- dob: u("curp.labels.dob") ?? "Date of birth",
65
- birthState: u("curp.labels.birthState") ?? "State of birth",
66
- statePlaceholder: u("curp.placeholder.state") ?? "Select state",
67
- generate: u("curp.generateCta") ?? "Generate CURP",
68
- ...l
69
- }, h = (e) => (t) => {
70
- let n = t.target;
71
- i({ [e]: n.value });
72
- }, _ = [
73
- {
74
- value: "H",
75
- label: m.male
76
- },
77
- {
78
- value: "M",
79
- label: m.female
80
- },
81
- {
82
- value: "X",
83
- label: m.other
84
- }
85
- ], v = g.map((e) => ({
86
- value: e.value,
87
- label: e.label
88
- }));
89
- return /* @__PURE__ */ n("div", {
90
- class: "IncodeCurpValidation IncodeGenerateCurpForm",
91
- children: [
92
- /* @__PURE__ */ n(d, {
93
- id: "curp-first-name",
94
- label: m.firstName,
95
- value: t.name,
96
- onInput: h("name"),
97
- placeholder: m.firstName,
98
- disabled: c,
99
- autoComplete: "given-name"
100
- }),
101
- /* @__PURE__ */ n(d, {
102
- id: "curp-first-last",
103
- label: m.firstLast,
104
- value: t.firstLastName,
105
- onInput: h("firstLastName"),
106
- placeholder: m.firstLast,
107
- disabled: c
108
- }),
109
- /* @__PURE__ */ n(d, {
110
- id: "curp-second-last",
111
- label: m.secondLast,
112
- value: t.secondLastName,
113
- onInput: h("secondLastName"),
114
- placeholder: m.secondLast,
115
- disabled: c
116
- }),
117
- /* @__PURE__ */ n(f, {
118
- id: "curp-gender",
119
- label: m.gender,
120
- placeholder: m.genderPlaceholder,
121
- value: t.gender,
122
- options: _,
123
- disabled: c,
124
- onChange: (e) => i({ gender: e }),
125
- "data-testid": "curp-gender"
126
- }),
127
- /* @__PURE__ */ n(p, {
128
- id: "curp-birth-date",
129
- label: m.dob,
130
- value: t.birthDate,
131
- onInput: h("birthDate"),
132
- max: (/* @__PURE__ */ new Date()).toISOString().split("T")[0],
133
- placeholder: u("curp.placeholder.dob") ?? "mm/dd/yyyy",
134
- disabled: c,
135
- "data-testid": "curp-birth-date"
136
- }),
137
- /* @__PURE__ */ n(f, {
138
- id: "curp-birth-state",
139
- label: m.birthState,
140
- placeholder: m.statePlaceholder,
141
- value: t.birthState,
142
- options: v,
143
- disabled: c,
144
- onChange: (e) => i({ birthState: e }),
145
- "data-testid": "curp-birth-state",
146
- searchable: !0
147
- }),
148
- /* @__PURE__ */ n(a, { size: 16 }),
149
- /* @__PURE__ */ n(o, {
150
- type: "button",
151
- onClick: s,
152
- disabled: !r || c,
153
- "data-testid": "curp-generate",
154
- children: m.generate
155
- })
156
- ]
157
- });
158
- }, y = ({ config: i, onFinish: d, onError: f }) => {
159
- let { t: p } = e(), [m, g] = r(() => {
160
- if (!i) throw Error("CURP validation config is required");
161
- return h({ config: i });
162
- });
163
- if (m.status === "idle" || m.status === "loading" || m.status === "verifying" || m.status === "generating") return /* @__PURE__ */ n(s, {
164
- className: "IncodeCurpValidationPage",
165
- children: /* @__PURE__ */ n("div", {
166
- class: "IncodeCurpValidation IncodeCurpLoading",
167
- children: /* @__PURE__ */ n(c, {
168
- title: m.status === "generating" ? p("curp.status.generating") ?? "Generating..." : p("curp.status.verifying") ?? "Verifying...",
169
- fullScreen: !1
170
- })
171
- })
172
- });
173
- if (m.status === "enterCurp") return /* @__PURE__ */ n(s, {
174
- className: "IncodeCurpValidationPage",
175
- title: p("curp.enterCurp") ?? "Enter your CURP",
176
- children: /* @__PURE__ */ n(_, {
177
- curp: m.curp,
178
- isValid: m.isValid,
179
- onCurpChange: (e) => g.setCurp(e),
180
- onVerify: () => g.verify(),
181
- onSwitchToGenerate: () => g.switchToGenerate(),
182
- placeholder: p("curp.placeholder.curp") ?? "CURP",
183
- continueLabel: p("curp.continue") ?? "Continue",
184
- dontHaveLabel: p("curp.dontHave") ?? "I don't have my CURP"
185
- })
186
- });
187
- if (m.status === "generateCurp") return /* @__PURE__ */ n(s, {
188
- className: "IncodeCurpValidationPage",
189
- title: p("curp.generate") ?? "Generate your CURP",
190
- children: /* @__PURE__ */ n(v, {
191
- form: m.form,
192
- isValid: m.isValid,
193
- onFormChange: (e) => g.setGenerateForm(e),
194
- onGenerate: () => g.generate()
195
- })
196
- });
197
- if (m.status === "confirmCurp") return /* @__PURE__ */ n(s, {
198
- className: "IncodeCurpValidationPage",
199
- title: p("curp.status.confirm") ?? "Confirm your CURP",
200
- children: /* @__PURE__ */ n("div", {
201
- class: "IncodeCurpValidation IncodeCurpConfirm",
202
- children: [
203
- /* @__PURE__ */ n("input", {
204
- type: "text",
205
- class: "IncodeCurpConfirmInput",
206
- value: m.curp,
207
- readOnly: !0,
208
- "aria-label": p("curp.status.generatedCurp") ?? "Generated CURP"
209
- }),
210
- /* @__PURE__ */ n(a, {}),
211
- /* @__PURE__ */ n(o, {
212
- type: "button",
213
- onClick: () => g.confirmGenerated(),
214
- "data-testid": "curp-confirm",
215
- children: p("curp.continue") ?? "Continue"
216
- })
217
- ]
218
- })
219
- });
220
- if (m.status === "success") return /* @__PURE__ */ n(s, {
221
- className: "IncodeCurpValidationPage",
222
- children: /* @__PURE__ */ n("div", {
223
- class: "IncodeCurpValidation IncodeCurpSuccess",
224
- children: [
225
- /* @__PURE__ */ n(u, { size: 32 }),
226
- /* @__PURE__ */ n(a, { size: 16 }),
227
- /* @__PURE__ */ n("h2", {
228
- class: "IncodeCurpSuccessTitle",
229
- children: p("curp.status.verified") ?? "Verified"
230
- })
231
- ]
232
- })
233
- });
234
- if (m.status === "failure" || m.status === "generateError") {
235
- let e = m.retriesLeft > 0, r = m.status === "failure" ? p("curp.status.notVerified") ?? "Not verified" : p("curp.status.couldntGenerate") ?? "Couldn't generate CURP";
236
- return /* @__PURE__ */ n(s, {
237
- className: "IncodeCurpValidationPage",
238
- children: /* @__PURE__ */ n("div", {
239
- class: "IncodeCurpValidation IncodeCurpFailure",
240
- children: [
241
- /* @__PURE__ */ n(a, {}),
242
- /* @__PURE__ */ n(l, { size: 32 }),
243
- /* @__PURE__ */ n(a, { size: 16 }),
244
- /* @__PURE__ */ n("h2", {
245
- class: "IncodeCurpFailureTitle",
246
- children: r
247
- }),
248
- m.status === "generateError" && e && /* @__PURE__ */ n(t, { children: [/* @__PURE__ */ n(a, { size: 12 }), /* @__PURE__ */ n("p", {
249
- class: "IncodeCurpFailureHint",
250
- children: p("curp.status.checkInfo") ?? "Please check your information"
251
- })] }),
252
- /* @__PURE__ */ n(a, {}),
253
- e && /* @__PURE__ */ n(t, { children: /* @__PURE__ */ n(o, {
254
- type: "button",
255
- onClick: () => g.retry(),
256
- "data-testid": "curp-retry",
257
- children: m.status === "failure" ? p("curp.status.tryAgain") ?? "Try again" : p("curp.status.edit") ?? "Edit information"
258
- }) })
259
- ]
260
- })
261
- });
262
- }
263
- return m.status === "finished" ? (d?.(), null) : (m.status === "closed" && f?.(void 0), null);
264
- }, b = ({ config: e, onFinish: t, onError: r }) => /* @__PURE__ */ n(i, { children: e ? /* @__PURE__ */ n(y, {
265
- config: e,
266
- onFinish: t,
267
- onError: r
268
- }) : null });
269
- m(b, "incode-curp-validation");
270
- //#endregion
271
- export { b as CurpValidation };
1
+ import { b as I, u as e, S as u, I as S, a as N } from "../loadingIcon-DmuPXh70.js";
2
+ import { mexicanStates as G, createCurpValidationManager as R } from "@incodetech/core/curp-validation";
3
+ import { k as y } from "../vendor-preact-BoMmvSgn.js";
4
+ import "@incodetech/core";
5
+ import "../instance-BWYzq8dk.js";
6
+ import { B as h } from "../button-CE9kRlem.js";
7
+ import { E as U } from "../errorIcon-DEARBrGx.js";
8
+ import { S as D } from "../successIcon-Bjsdc4lF.js";
9
+ import { P as p } from "../page-SrUl0qtN.js";
10
+ import { S as k } from "../spinner-DygONskw.js";
11
+ import { r as E } from "../incodeModule-C4XIllao.js";
12
+ import { a as C } from "../inputComposed-fUbAGrDy.js";
13
+ import { D as F } from "../dateInputComposed-C7PCzh-U.js";
14
+ import { D as P } from "../dropdownComposed-BpinYlrx.js";
15
+ const T = ({
16
+ curp: i,
17
+ isValid: d,
18
+ onCurpChange: o,
19
+ onVerify: a,
20
+ onSwitchToGenerate: t,
21
+ disabled: s = !1,
22
+ placeholder: r,
23
+ continueLabel: m,
24
+ dontHaveLabel: n
25
+ }) => {
26
+ const { t: c } = I(), f = r ?? c("curp.placeholder.curp") ?? "CURP", g = m ?? c("curp.continue") ?? "Continue", l = n ?? c("curp.dontHave") ?? "I don't have my CURP", b = c("curp.placeholder.curp") ?? "CURP";
27
+ return /* @__PURE__ */ e("div", { class: "IncodeCurpValidation IncodeCurpInput", children: [
28
+ /* @__PURE__ */ e(
29
+ C,
30
+ {
31
+ id: "curp-input",
32
+ label: "",
33
+ value: i,
34
+ onInput: (V) => {
35
+ const L = V.target;
36
+ o(L.value.toUpperCase());
37
+ },
38
+ placeholder: f,
39
+ disabled: s,
40
+ maxLength: 18,
41
+ "aria-label": b
42
+ }
43
+ ),
44
+ /* @__PURE__ */ e(u, {}),
45
+ /* @__PURE__ */ e(
46
+ h,
47
+ {
48
+ type: "button",
49
+ onClick: a,
50
+ disabled: !d || s,
51
+ "data-testid": "curp-verify",
52
+ children: g
53
+ }
54
+ ),
55
+ /* @__PURE__ */ e(
56
+ h,
57
+ {
58
+ type: "button",
59
+ onClick: t,
60
+ disabled: s,
61
+ "data-testid": "curp-switch-to-generate",
62
+ class: "IncodeCurpInputDontHaveButton",
63
+ children: l
64
+ }
65
+ )
66
+ ] });
67
+ }, w = ({
68
+ form: i,
69
+ isValid: d,
70
+ onFormChange: o,
71
+ onGenerate: a,
72
+ disabled: t = !1,
73
+ labels: s
74
+ }) => {
75
+ const { t: r } = I(), n = { ...{
76
+ firstName: r("curp.labels.firstName") ?? "Your First name",
77
+ firstLast: r("curp.labels.firstLast") ?? "Your First last name",
78
+ secondLast: r("curp.labels.secondLast") ?? "Your Second last name",
79
+ gender: r("curp.labels.genderV2") ?? "Gender",
80
+ genderPlaceholder: r("curp.placeholder.gender") ?? "Choose gender",
81
+ male: r("curp.labels.maleV2") ?? "Male",
82
+ female: r("curp.labels.femaleV2") ?? "Female",
83
+ other: r("curp.labels.other") ?? "Other",
84
+ dob: r("curp.labels.dob") ?? "Date of birth",
85
+ birthState: r("curp.labels.birthState") ?? "State of birth",
86
+ statePlaceholder: r("curp.placeholder.state") ?? "Select state",
87
+ generate: r("curp.generateCta") ?? "Generate CURP"
88
+ }, ...s }, c = (l) => (b) => {
89
+ const v = b.target;
90
+ o({ [l]: v.value });
91
+ }, f = [
92
+ { value: "H", label: n.male },
93
+ { value: "M", label: n.female },
94
+ { value: "X", label: n.other }
95
+ ], g = G.map((l) => ({
96
+ value: l.value,
97
+ label: l.label
98
+ }));
99
+ return /* @__PURE__ */ e("div", { class: "IncodeCurpValidation IncodeGenerateCurpForm", children: [
100
+ /* @__PURE__ */ e(
101
+ C,
102
+ {
103
+ id: "curp-first-name",
104
+ label: n.firstName,
105
+ value: i.name,
106
+ onInput: c("name"),
107
+ placeholder: n.firstName,
108
+ disabled: t,
109
+ autoComplete: "given-name"
110
+ }
111
+ ),
112
+ /* @__PURE__ */ e(
113
+ C,
114
+ {
115
+ id: "curp-first-last",
116
+ label: n.firstLast,
117
+ value: i.firstLastName,
118
+ onInput: c("firstLastName"),
119
+ placeholder: n.firstLast,
120
+ disabled: t
121
+ }
122
+ ),
123
+ /* @__PURE__ */ e(
124
+ C,
125
+ {
126
+ id: "curp-second-last",
127
+ label: n.secondLast,
128
+ value: i.secondLastName,
129
+ onInput: c("secondLastName"),
130
+ placeholder: n.secondLast,
131
+ disabled: t
132
+ }
133
+ ),
134
+ /* @__PURE__ */ e(
135
+ P,
136
+ {
137
+ id: "curp-gender",
138
+ label: n.gender,
139
+ placeholder: n.genderPlaceholder,
140
+ value: i.gender,
141
+ options: f,
142
+ disabled: t,
143
+ onChange: (l) => o({ gender: l }),
144
+ "data-testid": "curp-gender"
145
+ }
146
+ ),
147
+ /* @__PURE__ */ e(
148
+ F,
149
+ {
150
+ id: "curp-birth-date",
151
+ label: n.dob,
152
+ value: i.birthDate,
153
+ onInput: c("birthDate"),
154
+ max: (/* @__PURE__ */ new Date()).toISOString().split("T")[0],
155
+ placeholder: r("curp.placeholder.dob") ?? "mm/dd/yyyy",
156
+ disabled: t,
157
+ "data-testid": "curp-birth-date"
158
+ }
159
+ ),
160
+ /* @__PURE__ */ e(
161
+ P,
162
+ {
163
+ id: "curp-birth-state",
164
+ label: n.birthState,
165
+ placeholder: n.statePlaceholder,
166
+ value: i.birthState,
167
+ options: g,
168
+ disabled: t,
169
+ onChange: (l) => o({ birthState: l }),
170
+ "data-testid": "curp-birth-state",
171
+ searchable: !0
172
+ }
173
+ ),
174
+ /* @__PURE__ */ e(u, { size: 16 }),
175
+ /* @__PURE__ */ e(
176
+ h,
177
+ {
178
+ type: "button",
179
+ onClick: a,
180
+ disabled: !d || t,
181
+ "data-testid": "curp-generate",
182
+ children: n.generate
183
+ }
184
+ )
185
+ ] });
186
+ }, H = ({
187
+ config: i,
188
+ onFinish: d,
189
+ onError: o
190
+ }) => {
191
+ const { t: a } = I(), [t, s] = N(() => {
192
+ if (!i)
193
+ throw new Error("CURP validation config is required");
194
+ return R({ config: i });
195
+ });
196
+ if (t.status === "idle" || t.status === "loading" || t.status === "verifying" || t.status === "generating") {
197
+ const r = t.status === "generating" ? a("curp.status.generating") ?? "Generating..." : a("curp.status.verifying") ?? "Verifying...";
198
+ return /* @__PURE__ */ e(p, { className: "IncodeCurpValidationPage", children: /* @__PURE__ */ e("div", { class: "IncodeCurpValidation IncodeCurpLoading", children: /* @__PURE__ */ e(k, { title: r, fullScreen: !1 }) }) });
199
+ }
200
+ if (t.status === "enterCurp")
201
+ return /* @__PURE__ */ e(
202
+ p,
203
+ {
204
+ className: "IncodeCurpValidationPage",
205
+ title: a("curp.enterCurp") ?? "Enter your CURP",
206
+ children: /* @__PURE__ */ e(
207
+ T,
208
+ {
209
+ curp: t.curp,
210
+ isValid: t.isValid,
211
+ onCurpChange: (r) => s.setCurp(r),
212
+ onVerify: () => s.verify(),
213
+ onSwitchToGenerate: () => s.switchToGenerate(),
214
+ placeholder: a("curp.placeholder.curp") ?? "CURP",
215
+ continueLabel: a("curp.continue") ?? "Continue",
216
+ dontHaveLabel: a("curp.dontHave") ?? "I don't have my CURP"
217
+ }
218
+ )
219
+ }
220
+ );
221
+ if (t.status === "generateCurp")
222
+ return /* @__PURE__ */ e(
223
+ p,
224
+ {
225
+ className: "IncodeCurpValidationPage",
226
+ title: a("curp.generate") ?? "Generate your CURP",
227
+ children: /* @__PURE__ */ e(
228
+ w,
229
+ {
230
+ form: t.form,
231
+ isValid: t.isValid,
232
+ onFormChange: (r) => s.setGenerateForm(r),
233
+ onGenerate: () => s.generate()
234
+ }
235
+ )
236
+ }
237
+ );
238
+ if (t.status === "confirmCurp")
239
+ return /* @__PURE__ */ e(
240
+ p,
241
+ {
242
+ className: "IncodeCurpValidationPage",
243
+ title: a("curp.status.confirm") ?? "Confirm your CURP",
244
+ children: /* @__PURE__ */ e("div", { class: "IncodeCurpValidation IncodeCurpConfirm", children: [
245
+ /* @__PURE__ */ e(
246
+ "input",
247
+ {
248
+ type: "text",
249
+ class: "IncodeCurpConfirmInput",
250
+ value: t.curp,
251
+ readOnly: !0,
252
+ "aria-label": a("curp.status.generatedCurp") ?? "Generated CURP"
253
+ }
254
+ ),
255
+ /* @__PURE__ */ e(u, {}),
256
+ /* @__PURE__ */ e(
257
+ h,
258
+ {
259
+ type: "button",
260
+ onClick: () => s.confirmGenerated(),
261
+ "data-testid": "curp-confirm",
262
+ children: a("curp.continue") ?? "Continue"
263
+ }
264
+ )
265
+ ] })
266
+ }
267
+ );
268
+ if (t.status === "success")
269
+ return /* @__PURE__ */ e(p, { className: "IncodeCurpValidationPage", children: /* @__PURE__ */ e("div", { class: "IncodeCurpValidation IncodeCurpSuccess", children: [
270
+ /* @__PURE__ */ e(D, { size: 32 }),
271
+ /* @__PURE__ */ e(u, { size: 16 }),
272
+ /* @__PURE__ */ e("h2", { class: "IncodeCurpSuccessTitle", children: a("curp.status.verified") ?? "Verified" })
273
+ ] }) });
274
+ if (t.status === "failure" || t.status === "generateError") {
275
+ const r = t.retriesLeft > 0, m = t.status === "failure" ? a("curp.status.notVerified") ?? "Not verified" : a("curp.status.couldntGenerate") ?? "Couldn't generate CURP";
276
+ return /* @__PURE__ */ e(p, { className: "IncodeCurpValidationPage", children: /* @__PURE__ */ e("div", { class: "IncodeCurpValidation IncodeCurpFailure", children: [
277
+ /* @__PURE__ */ e(u, {}),
278
+ /* @__PURE__ */ e(U, { size: 32 }),
279
+ /* @__PURE__ */ e(u, { size: 16 }),
280
+ /* @__PURE__ */ e("h2", { class: "IncodeCurpFailureTitle", children: m }),
281
+ t.status === "generateError" && r && /* @__PURE__ */ e(y, { children: [
282
+ /* @__PURE__ */ e(u, { size: 12 }),
283
+ /* @__PURE__ */ e("p", { class: "IncodeCurpFailureHint", children: a("curp.status.checkInfo") ?? "Please check your information" })
284
+ ] }),
285
+ /* @__PURE__ */ e(u, {}),
286
+ r && /* @__PURE__ */ e(y, { children: /* @__PURE__ */ e(
287
+ h,
288
+ {
289
+ type: "button",
290
+ onClick: () => s.retry(),
291
+ "data-testid": "curp-retry",
292
+ children: t.status === "failure" ? a("curp.status.tryAgain") ?? "Try again" : a("curp.status.edit") ?? "Edit information"
293
+ }
294
+ ) })
295
+ ] }) });
296
+ }
297
+ return t.status === "finished" ? (d?.(), null) : (t.status === "closed" && o?.(void 0), null);
298
+ }, z = ({
299
+ config: i,
300
+ onFinish: d,
301
+ onError: o
302
+ }) => /* @__PURE__ */ e(S, { children: i ? /* @__PURE__ */ e(
303
+ H,
304
+ {
305
+ config: i,
306
+ onFinish: d,
307
+ onError: o
308
+ }
309
+ ) : null });
310
+ E(z, "incode-curp-validation");
311
+ export {
312
+ z as CurpValidation
313
+ };
@@ -1,4 +1,4 @@
1
- /*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
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 {