@incodetech/web 2.0.0-alpha.8 → 2.0.0-rc.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 (182) 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 +5218 -639
  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 -145
  50. package/dist/email/styles.css +5 -116
  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 +910 -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 +646 -542
  61. package/dist/flow/styles.css +4524 -440
  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 -6
  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 -3441
  104. package/dist/phone/styles.css +3 -297
  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 +42 -892
  115. package/dist/selfie/styles.css +298 -184
  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 +846 -151
  125. package/dist/themes/light.css +798 -116
  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/consent.d.ts +41 -0
  132. package/dist/types/cpf-ocr/styles.d.ts +1 -0
  133. package/dist/types/cross-document-data-match.d.ts +34 -0
  134. package/dist/types/curp-validation.d.ts +40 -0
  135. package/dist/types/custom-fields/styles.d.ts +1 -0
  136. package/dist/types/document-capture/styles.d.ts +1 -0
  137. package/dist/types/dynamic-forms/styles.d.ts +1 -0
  138. package/dist/types/ekyb.d.ts +34 -0
  139. package/dist/types/ekyc.d.ts +34 -0
  140. package/dist/types/electronic-signature.d.ts +43 -0
  141. package/dist/types/email.d.ts +14 -4
  142. package/dist/types/extensibility.d.ts +981 -0
  143. package/dist/types/face-match.d.ts +59 -0
  144. package/dist/types/flow.d.ts +81 -13
  145. package/dist/types/geolocation.d.ts +41 -0
  146. package/dist/types/governmentValidation.d.ts +34 -0
  147. package/dist/types/id-ocr/styles.d.ts +1 -0
  148. package/dist/types/id-verification.d.ts +40 -0
  149. package/dist/types/id.d.ts +41 -0
  150. package/dist/types/identity-reuse.d.ts +43 -0
  151. package/dist/types/index.d.ts +6 -12
  152. package/dist/types/mandatory-consent/styles.d.ts +1 -0
  153. package/dist/types/phone.d.ts +14 -4
  154. package/dist/types/qe-signature.d.ts +40 -0
  155. package/dist/types/redirect-to-mobile/styles.d.ts +1 -0
  156. package/dist/types/selfie.d.ts +14 -4
  157. package/dist/types/signature.d.ts +40 -0
  158. package/dist/types/watchlist-for-business/styles.d.ts +1 -0
  159. package/dist/types/watchlist.d.ts +40 -0
  160. package/dist/types/workflow.d.ts +91 -0
  161. package/dist/typography-CxjaknHN.js +28 -0
  162. package/dist/uiConfig-CwpQ-IM6.js +20 -0
  163. package/dist/useModuleLoader-BFiVA41N.js +432 -0
  164. package/dist/vendor-preact-D6SntenC.js +958 -0
  165. package/dist/verificationResult-BrVbUJ4U.js +97 -0
  166. package/dist/verifiedByIncode-ChZBpqNy.js +101 -0
  167. package/dist/watchlist/watchlist.es.js +33 -0
  168. package/dist/watchlist-for-business/styles.css +18 -0
  169. package/dist/watchlistForBusiness-BcSNtHCV.js +77 -0
  170. package/dist/workflow/styles.css +4612 -0
  171. package/dist/workflow/workflow.es.js +244 -0
  172. package/package.json +211 -15
  173. package/dist/browser-ponyfill-B6W6hHVY.js +0 -344
  174. package/dist/incodeModule-Dv8Qllrv.js +0 -254
  175. package/dist/instance-B-q0ZREN.js +0 -2140
  176. package/dist/otpInput-BtoZe0Wz.js +0 -151
  177. package/dist/page-D9ijzlSn.js +0 -234
  178. package/dist/selfieTutorial-C-u5GufD.js +0 -29
  179. package/dist/setup-wNL83jmW.js +0 -20
  180. package/dist/title-BfO5Dlzk.js +0 -25
  181. package/dist/uiConfig-CQ1W9cUD.js +0 -23
  182. package/dist/vendor-preact-CK0WeTOR.js +0 -584
@@ -0,0 +1,284 @@
1
+ import { _ as e, l as t, p as n, v as r } from "./vendor-preact-D6SntenC.js";
2
+ import { n as i } from "./loadingIcon-BN5YRQUb.js";
3
+ import { g as a, l as o, n as s, o as c, u as ee } from "./icons-Cc7zwchP.js";
4
+ import { t as te } from "./successIcon-DbILeIz_.js";
5
+ //#region src/shared/dropdownComposed/dropdownComposed.tsx
6
+ var l = ({ id: l, label: u, labelHint: d, placeholder: f = "Choose an option", value: p, options: m, onChange: h, error: g, helper: _, showErrorIcon: v, showHelperIcon: y, suppressMessages: b = !1, disabled: x = !1, required: S, searchable: C = !1, searchPlaceholder: w = "Search...", noResultsText: T = "No results found", name: E, tabIndex: ne, onKeyDown: re, onBlur: ie, renderSelectedLabel: D, siblingElement: O, enterKeyHint: ae, class: k, "aria-label": A, "data-testid": j }) => {
7
+ let [M, N] = n(!1), [P, F] = n(!1), [I, L] = n(-1), [R, z] = n(""), B = t(null), V = t(null), H = t(null), U = t([]), W = t(null), G = t(""), K = t(), q = m.find((e) => e.value === p), oe = q ? D ? D(q) : q.label : f, J = C && R ? m.filter((e) => e.label.toLowerCase().includes(R.toLowerCase())) : m, Y = `${l}-label`, X = `${l}-listbox`, Z = `${l}-helper`, Q = `${l}-error`, se = b ? "" : [_ ? Z : null, g ? Q : null].filter(Boolean).join(" ");
8
+ e(() => {
9
+ if (!M) return;
10
+ let e = requestAnimationFrame(() => {
11
+ C && W.current && W.current.focus(), requestAnimationFrame(() => {
12
+ H.current?.scrollIntoView({
13
+ behavior: "smooth",
14
+ block: "nearest",
15
+ inline: "nearest"
16
+ });
17
+ });
18
+ });
19
+ return () => cancelAnimationFrame(e);
20
+ }, [M, C]), e(() => {
21
+ M || (L(-1), z(""));
22
+ }, [M]), e(() => {
23
+ I >= 0 && U.current[I] && U.current[I]?.scrollIntoView({
24
+ block: "nearest",
25
+ inline: "nearest"
26
+ });
27
+ }, [I]), e(() => () => {
28
+ K.current && clearTimeout(K.current);
29
+ }, []);
30
+ let ce = () => {
31
+ x || N((e) => !e);
32
+ }, $ = (e) => {
33
+ h(e), N(!1), L(-1), V.current?.focus();
34
+ }, le = () => {
35
+ F(!0);
36
+ }, ue = (e) => {
37
+ F(!1), B.current?.contains(e.relatedTarget) || (N(!1), ie?.());
38
+ }, de = (e) => {
39
+ if (x) return;
40
+ re?.(e);
41
+ let { key: t } = e;
42
+ if (t.length === 1 && /^[a-zA-Z0-9]$/.test(t)) {
43
+ e.preventDefault(), K.current && clearTimeout(K.current), G.current += t.toLowerCase();
44
+ let n = J.findIndex((e) => e.label.toLowerCase().startsWith(G.current));
45
+ n !== -1 && (M || N(!0), L(n)), K.current = setTimeout(() => {
46
+ G.current = "";
47
+ }, 500);
48
+ return;
49
+ }
50
+ switch (t) {
51
+ case "ArrowDown":
52
+ e.preventDefault(), M ? L((e) => e < J.length - 1 ? e + 1 : e) : (N(!0), L(0));
53
+ break;
54
+ case "ArrowUp":
55
+ e.preventDefault(), M ? L((e) => e > 0 ? e - 1 : e) : (N(!0), L(J.length - 1));
56
+ break;
57
+ case "Home":
58
+ e.preventDefault(), M && L(0);
59
+ break;
60
+ case "End":
61
+ e.preventDefault(), M && L(J.length - 1);
62
+ break;
63
+ case "Enter":
64
+ e.preventDefault(), M && I >= 0 && J[I] ? $(J[I].value) : M || N(!0);
65
+ break;
66
+ case " ":
67
+ e.preventDefault(), M && I >= 0 && J[I] ? $(J[I].value) : M || (N(!0), L(0));
68
+ break;
69
+ case "Escape":
70
+ e.preventDefault(), M && (N(!1), L(-1), V.current?.focus());
71
+ break;
72
+ case "Tab":
73
+ M && (N(!1), L(-1));
74
+ break;
75
+ default: break;
76
+ }
77
+ }, fe = (e) => {
78
+ let { key: t } = e;
79
+ switch (t) {
80
+ case "ArrowDown":
81
+ e.preventDefault(), L((e) => e < J.length - 1 ? e + 1 : e);
82
+ break;
83
+ case "ArrowUp":
84
+ e.preventDefault(), L((e) => e > 0 ? e - 1 : e);
85
+ break;
86
+ case "Home":
87
+ e.preventDefault(), L(0);
88
+ break;
89
+ case "End":
90
+ e.preventDefault(), L(J.length - 1);
91
+ break;
92
+ case "Enter":
93
+ e.preventDefault(), I >= 0 && J[I] && $(J[I].value);
94
+ break;
95
+ case "Escape":
96
+ e.preventDefault(), N(!1), L(-1), V.current?.focus();
97
+ break;
98
+ case "Tab":
99
+ R || (N(!1), L(-1));
100
+ break;
101
+ default: break;
102
+ }
103
+ };
104
+ return /* @__PURE__ */ r("div", {
105
+ class: i("IncodeDropdownComposed", k),
106
+ ref: B,
107
+ onBlur: ue,
108
+ children: [
109
+ E && /* @__PURE__ */ r("input", {
110
+ type: "hidden",
111
+ name: E,
112
+ value: p || "",
113
+ disabled: x,
114
+ required: S
115
+ }),
116
+ u && /* @__PURE__ */ r("label", {
117
+ class: "IncodeDropdownComposedLabel",
118
+ id: Y,
119
+ htmlFor: l,
120
+ "data-testid": `${l}-label`,
121
+ children: [u, d && /* @__PURE__ */ r("span", {
122
+ class: "IncodeDropdownComposedLabelHint",
123
+ "data-testid": `${l}-label-hint`,
124
+ children: d
125
+ })]
126
+ }),
127
+ /* @__PURE__ */ r("div", {
128
+ class: "IncodeDropdownComposedWrapper",
129
+ children: [/* @__PURE__ */ r("div", {
130
+ class: i("IncodeDropdownComposedTriggerRow", { IncodeDropdownComposedTriggerRowWithSibling: !!O }),
131
+ children: [/* @__PURE__ */ r("button", {
132
+ ref: V,
133
+ type: "button",
134
+ id: l,
135
+ class: "IncodeDropdownComposedTrigger",
136
+ onClick: ce,
137
+ onFocus: le,
138
+ onKeyDown: de,
139
+ tabIndex: x ? -1 : ne ?? 0,
140
+ disabled: x,
141
+ "aria-haspopup": "listbox",
142
+ "aria-expanded": M ? "true" : "false",
143
+ "aria-disabled": x ? "true" : void 0,
144
+ "aria-labelledby": u ? Y : void 0,
145
+ "aria-label": u ? void 0 : A,
146
+ "aria-controls": M ? X : void 0,
147
+ "aria-activedescendant": M && I >= 0 ? `${l}-option-${I}` : void 0,
148
+ "aria-invalid": g ? "true" : void 0,
149
+ "aria-required": S ? "true" : void 0,
150
+ "aria-describedby": se || void 0,
151
+ "data-error": g ? "true" : void 0,
152
+ "data-focused": P || M ? "true" : void 0,
153
+ "data-testid": j,
154
+ children: [/* @__PURE__ */ r("span", {
155
+ class: q ? "IncodeDropdownComposedTriggerText" : "IncodeDropdownComposedTriggerPlaceholder",
156
+ "aria-hidden": !u && A ? "true" : void 0,
157
+ children: oe
158
+ }), /* @__PURE__ */ r("span", {
159
+ class: "IncodeDropdownComposedTriggerIcon",
160
+ "aria-hidden": "true",
161
+ "data-open": M,
162
+ children: /* @__PURE__ */ r(o, {})
163
+ })]
164
+ }), O && /* @__PURE__ */ r("div", {
165
+ class: "IncodeDropdownComposedSibling",
166
+ children: O
167
+ })]
168
+ }), M && /* @__PURE__ */ r("div", {
169
+ ref: H,
170
+ class: "IncodeDropdownComposedList",
171
+ "data-error": g ? "true" : void 0,
172
+ children: [C && /* @__PURE__ */ r("div", {
173
+ class: "IncodeDropdownComposedSearchWrapper",
174
+ children: /* @__PURE__ */ r("div", {
175
+ class: "IncodeDropdownComposedSearchInner",
176
+ children: [/* @__PURE__ */ r("input", {
177
+ ref: W,
178
+ type: "text",
179
+ class: "IncodeDropdownComposedSearchInput",
180
+ value: R,
181
+ onInput: (e) => {
182
+ z(e.target.value), L(0);
183
+ },
184
+ onKeyDown: fe,
185
+ placeholder: w,
186
+ role: "combobox",
187
+ "aria-autocomplete": "list",
188
+ "aria-expanded": "true",
189
+ "aria-controls": X,
190
+ "aria-activedescendant": I >= 0 ? `${l}-option-${I}` : void 0,
191
+ "aria-label": w,
192
+ autocomplete: "off"
193
+ }), R ? /* @__PURE__ */ r("button", {
194
+ type: "button",
195
+ class: "IncodeDropdownComposedCloseIconButton",
196
+ onMouseDown: (e) => e.preventDefault(),
197
+ onClick: () => {
198
+ R && (z(""), W.current?.focus());
199
+ },
200
+ "aria-label": "Clear search query",
201
+ children: /* @__PURE__ */ r(c, {
202
+ width: 20,
203
+ height: 20,
204
+ fillColor: "var(--icon-neutral-500)"
205
+ })
206
+ }) : /* @__PURE__ */ r("span", {
207
+ class: "IncodeDropdownComposedSearchIcon",
208
+ "aria-hidden": "true",
209
+ children: /* @__PURE__ */ r(s, { size: 20 })
210
+ })]
211
+ })
212
+ }), /* @__PURE__ */ r("div", {
213
+ id: X,
214
+ role: "listbox",
215
+ "aria-labelledby": u ? Y : void 0,
216
+ "aria-label": u ? void 0 : A ?? f,
217
+ class: "IncodeDropdownComposedOptionsScroll",
218
+ children: J.length === 0 ? /* @__PURE__ */ r("div", {
219
+ class: "IncodeDropdownComposedNoResults",
220
+ children: T
221
+ }) : J.map((e, t) => {
222
+ let n = p === e.value;
223
+ return /* @__PURE__ */ r("div", {
224
+ id: `${l}-option-${t}`,
225
+ role: "option",
226
+ "aria-label": e.ariaLabel,
227
+ "aria-selected": n ? "true" : "false",
228
+ class: "IncodeDropdownComposedOption",
229
+ "data-highlighted": I === t,
230
+ ref: (e) => {
231
+ U.current[t] = e;
232
+ },
233
+ onClick: () => $(e.value),
234
+ onMouseDown: (e) => e.preventDefault(),
235
+ onMouseEnter: () => L(t),
236
+ children: [e.ariaLabel ? /* @__PURE__ */ r("span", {
237
+ "aria-hidden": "true",
238
+ children: e.label
239
+ }) : e.label, n && /* @__PURE__ */ r("span", {
240
+ class: "IncodeDropdownComposedCheckmarkIcon",
241
+ "aria-hidden": "true",
242
+ children: /* @__PURE__ */ r(ee, {})
243
+ })]
244
+ }, e.value);
245
+ })
246
+ })]
247
+ })]
248
+ }),
249
+ C && /* @__PURE__ */ r("div", {
250
+ class: "IncodeDropdownComposedLiveRegion",
251
+ role: "status",
252
+ "aria-live": "polite",
253
+ "aria-atomic": "true",
254
+ children: M && R ? J.length === 0 ? T : `${J.length} result${J.length === 1 ? "" : "s"} available` : ""
255
+ }),
256
+ !b && g && /* @__PURE__ */ r("div", {
257
+ class: "IncodeDropdownComposedErrorWrapper",
258
+ "data-testid": `${l}-error-wrapper`,
259
+ children: [v && /* @__PURE__ */ r("div", {
260
+ class: "IncodeDropdownComposedIconWrapper",
261
+ children: /* @__PURE__ */ r(a, { size: 17 })
262
+ }), /* @__PURE__ */ r("p", {
263
+ id: Q,
264
+ class: "IncodeDropdownComposedError",
265
+ children: g
266
+ })]
267
+ }),
268
+ !b && _ && !g && /* @__PURE__ */ r("div", {
269
+ class: "IncodeDropdownComposedHelperWrapper",
270
+ "data-testid": `${l}-helper-wrapper`,
271
+ children: [y && /* @__PURE__ */ r("div", {
272
+ class: "IncodeDropdownComposedIconWrapper",
273
+ children: /* @__PURE__ */ r(te, { size: 17 })
274
+ }), /* @__PURE__ */ r("p", {
275
+ id: Z,
276
+ class: "IncodeDropdownComposedHelper",
277
+ children: _
278
+ })]
279
+ })
280
+ ]
281
+ });
282
+ };
283
+ //#endregion
284
+ export { l as t };
@@ -0,0 +1 @@
1
+ import "./dropdownComposed-DFRBG22E.js";
@@ -0,0 +1,36 @@
1
+ /*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
2
+ .IncodeDynamicFormsProgress {
3
+ margin-bottom: var(--spacing-4, var(--spacing-4, 4px));
4
+ text-align: center;
5
+ font-size: var(--text-sm, .875rem);
6
+ line-height: var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));
7
+ color: var(--text-secondary);
8
+ }
9
+
10
+ .IncodeDynamicFormsPage .IncodePageTitleContainer {
11
+ margin-top: var(--spacing-24, var(--spacing-24, 24px));
12
+ }
13
+
14
+ .IncodeDynamicFormsPage .IncodePageContent {
15
+ align-items: center;
16
+ }
17
+
18
+ .IncodeDynamicFormsForm {
19
+ flex-direction: column;
20
+ width: 100%;
21
+ max-width: 420px;
22
+ height: 100%;
23
+ display: flex;
24
+ }
25
+
26
+ .IncodeDynamicFormsForm button {
27
+ margin-top: auto;
28
+ }
29
+
30
+ .IncodeDynamicFormsField {
31
+ margin-bottom: var(--spacing-16, var(--spacing-16, 16px));
32
+ flex-direction: column;
33
+ align-items: flex-start;
34
+ width: 100%;
35
+ display: flex;
36
+ }
@@ -0,0 +1,262 @@
1
+ import { n as e } from "./i18n-9s4OSqwi.js";
2
+ import { _ as t, d as n, p as r, v as i } from "./vendor-preact-D6SntenC.js";
3
+ import { o as a } from "./hooks-BVnGysT7.js";
4
+ import { t as o } from "./incodeComponent-C1o4M0ZK.js";
5
+ import { r as s } from "./loadingIcon-BN5YRQUb.js";
6
+ import { t as c } from "./page-C1yT4DLb.js";
7
+ import { t as l } from "./button-DcCUEn2n.js";
8
+ import { t as u } from "./verificationResult-BrVbUJ4U.js";
9
+ import { t as d } from "./inputComposed-APSw8C7o.js";
10
+ import { t as f } from "./checkbox-Cl57ltq_.js";
11
+ import { n as p, t as m } from "./phoneInputComposed-bvWhGLFZ.js";
12
+ import { t as h } from "./dropdownComposed-DFRBG22E.js";
13
+ import { t as g } from "./dateInputComposed-BpAGsjN6.js";
14
+ import { t as _ } from "./incodeModule-BqCjVgEI.js";
15
+ import { t as v } from "./emailInput-DppGf9pv.js";
16
+ import { formatCPF as y } from "@incodetech/core/cpf-ocr";
17
+ import { createDynamicFormsManager as b } from "@incodetech/core/dynamic-forms";
18
+ //#region src/modules/dynamic-forms/dynamicForms.tsx
19
+ function x(e) {
20
+ return e.inputType ?? e.overrides ?? "TEXT";
21
+ }
22
+ var S = ({ question: e, value: t, disabled: r = !1, onChange: a, onPhoneChange: o, onPhoneBlur: s, phoneError: c, onEmailChange: l, onEmailBlur: u, emailError: _, onCpfChange: b, onCpfBlur: S, cpfError: C }) => {
23
+ let w = x(e), T = `dynamic-form-${e.questionId}`, E = e.isOptional ? e.question : `* ${e.question}`, D = w === "COUNTRY" || w === "NATIONALITY", O = n(() => D ? p.map((e) => ({
24
+ value: e.code,
25
+ label: `${e.emoji} ${e.name}`,
26
+ ariaLabel: e.name
27
+ })) : [], [D]);
28
+ if (w === "YESNO") return /* @__PURE__ */ i("div", {
29
+ class: "IncodeDynamicFormsField",
30
+ children: /* @__PURE__ */ i(f, {
31
+ id: T,
32
+ name: e.questionId,
33
+ label: E,
34
+ checked: t === "YES",
35
+ disabled: r,
36
+ onChange: (t) => a(e.questionId, t.target.checked ? "YES" : "NO")
37
+ })
38
+ });
39
+ if (w === "DATE") return /* @__PURE__ */ i("div", {
40
+ class: "IncodeDynamicFormsField",
41
+ children: /* @__PURE__ */ i(g, {
42
+ id: T,
43
+ name: e.questionId,
44
+ label: E,
45
+ value: t,
46
+ disabled: r,
47
+ onInput: (t) => a(e.questionId, t.target.value)
48
+ })
49
+ });
50
+ if (w === "PHONE") return /* @__PURE__ */ i("div", {
51
+ class: "IncodeDynamicFormsField",
52
+ onFocusOut: () => s?.(e.questionId),
53
+ children: /* @__PURE__ */ i(m, {
54
+ id: T,
55
+ label: E,
56
+ value: t,
57
+ error: c,
58
+ showErrorIcon: !!c,
59
+ disabled: r,
60
+ onChange: (t, n) => o?.(e.questionId, t, n)
61
+ })
62
+ });
63
+ if (w === "COUNTRY" || w === "NATIONALITY") return /* @__PURE__ */ i("div", {
64
+ class: "IncodeDynamicFormsField",
65
+ children: /* @__PURE__ */ i(h, {
66
+ id: T,
67
+ label: E,
68
+ value: t,
69
+ options: O,
70
+ searchable: !0,
71
+ disabled: r,
72
+ onChange: (t) => a(e.questionId, t)
73
+ })
74
+ });
75
+ if (w === "SELECT" || w === "MULTISELECT") {
76
+ let n = (e.options ?? []).map((e) => ({
77
+ value: e,
78
+ label: e
79
+ }));
80
+ return /* @__PURE__ */ i("div", {
81
+ class: "IncodeDynamicFormsField",
82
+ children: /* @__PURE__ */ i(h, {
83
+ id: T,
84
+ label: E,
85
+ value: t,
86
+ options: n,
87
+ searchable: n.length > 5,
88
+ disabled: r,
89
+ onChange: (t) => a(e.questionId, t)
90
+ })
91
+ });
92
+ }
93
+ return w === "EMAIL" ? /* @__PURE__ */ i("div", {
94
+ class: "IncodeDynamicFormsField",
95
+ children: /* @__PURE__ */ i(v, {
96
+ value: t,
97
+ emailError: _,
98
+ label: E,
99
+ disabled: r,
100
+ onEmailChange: (t, n) => {
101
+ a(e.questionId, t), l?.(e.questionId, t, n);
102
+ },
103
+ onBlur: () => u?.(e.questionId)
104
+ })
105
+ }) : w === "CPF" ? /* @__PURE__ */ i("div", {
106
+ class: "IncodeDynamicFormsField",
107
+ children: /* @__PURE__ */ i(d, {
108
+ id: T,
109
+ name: e.questionId,
110
+ label: E,
111
+ inputMode: "numeric",
112
+ maxLength: 14,
113
+ value: t,
114
+ error: C,
115
+ showErrorIcon: !!C,
116
+ disabled: r,
117
+ onInput: (t) => {
118
+ let n = y(t.target.value);
119
+ t.target.value = n, a(e.questionId, n), b?.(e.questionId, n);
120
+ },
121
+ onBlur: () => S?.(e.questionId)
122
+ })
123
+ }) : w === "NUMBER" ? /* @__PURE__ */ i("div", {
124
+ class: "IncodeDynamicFormsField",
125
+ children: /* @__PURE__ */ i(d, {
126
+ id: T,
127
+ name: e.questionId,
128
+ label: E,
129
+ type: "number",
130
+ inputMode: "numeric",
131
+ value: t,
132
+ disabled: r,
133
+ onInput: (t) => {
134
+ let n = t.target.value.replace(/[^0-9]/g, "");
135
+ a(e.questionId, n);
136
+ }
137
+ })
138
+ }) : /* @__PURE__ */ i("div", {
139
+ class: "IncodeDynamicFormsField",
140
+ children: /* @__PURE__ */ i(d, {
141
+ id: T,
142
+ name: e.questionId,
143
+ label: E,
144
+ type: "text",
145
+ value: t,
146
+ disabled: r,
147
+ onInput: (t) => a(e.questionId, t.target.value)
148
+ })
149
+ });
150
+ }, C = ({ screen: n, answers: a, answerValidity: o, canSubmit: u, isSubmitting: d = !1, onAnswerChange: f, onAnswerValidityChange: p, onSubmit: m }) => {
151
+ let { t: h } = e(), [g, _] = r({}), [v, y] = r({}), [b, C] = r({}), [w, T] = r({}), [E, D] = r({}), [O, k] = r({});
152
+ return t(() => {
153
+ _({}), y({}), C({}), T({}), D({}), k({});
154
+ }, [n]), /* @__PURE__ */ i(c, {
155
+ className: "IncodeDynamicFormsPage",
156
+ title: n.hideTitle ? void 0 : n.title || h("dynamicForms.title"),
157
+ hideFooterBranding: !0,
158
+ children: [/* @__PURE__ */ i(s, { size: 32 }), /* @__PURE__ */ i("form", {
159
+ class: "IncodeDynamicFormsForm",
160
+ onSubmit: (e) => {
161
+ e.preventDefault(), m();
162
+ },
163
+ autoComplete: "off",
164
+ children: [n.questions.map((e) => {
165
+ let t = x(e), n = t === "PHONE", r = t === "EMAIL", s = t === "CPF", c = o[e.questionId], l = n && g[e.questionId] && v[e.questionId] && c === !1 ? h("phone.invalidPhone") : void 0, u = r && b[e.questionId] && w[e.questionId] && c === !1 ? h("verification.errors.emailInvalid") : void 0, m = s && E[e.questionId] && O[e.questionId] && c === !1 ? h("dynamicForms.invalidCpf") : void 0;
166
+ return /* @__PURE__ */ i(S, {
167
+ question: e,
168
+ value: a[e.questionId] ?? "",
169
+ disabled: d,
170
+ onChange: f,
171
+ onPhoneChange: (e, t, n) => {
172
+ f(e, t), p(e, n), _((t) => ({
173
+ ...t,
174
+ [e]: !0
175
+ }));
176
+ },
177
+ onPhoneBlur: (e) => y((t) => ({
178
+ ...t,
179
+ [e]: !0
180
+ })),
181
+ phoneError: l,
182
+ onEmailChange: (e, t, n) => {
183
+ p(e, n), C((t) => ({
184
+ ...t,
185
+ [e]: !0
186
+ }));
187
+ },
188
+ onEmailBlur: (e) => T((t) => ({
189
+ ...t,
190
+ [e]: !0
191
+ })),
192
+ emailError: u,
193
+ onCpfChange: (e) => {
194
+ D((t) => ({
195
+ ...t,
196
+ [e]: !0
197
+ }));
198
+ },
199
+ onCpfBlur: (e) => k((t) => ({
200
+ ...t,
201
+ [e]: !0
202
+ })),
203
+ cpfError: m
204
+ }, e.questionId);
205
+ }), /* @__PURE__ */ i(l, {
206
+ type: "submit",
207
+ disabled: !u,
208
+ isLoading: d,
209
+ children: h("common.continue")
210
+ })]
211
+ })]
212
+ });
213
+ }, w = ({ config: n, manager: r, onFinish: o }) => {
214
+ let { t: s } = e(), [c, l] = a(() => {
215
+ if (r) return r;
216
+ if (!n) throw Error("DynamicForms config is required");
217
+ return b({ config: n });
218
+ }, {
219
+ manageLifecycle: !r,
220
+ autoLoad: !0
221
+ });
222
+ if (t(() => {
223
+ (c.status === "finished" || c.status === "closed") && o?.();
224
+ }, [c.status, o]), c.status === "idle" || c.status === "loadingScreens") return /* @__PURE__ */ i(u, {
225
+ status: "submitting",
226
+ submittingTitle: s("common.loading"),
227
+ hideFooterBranding: !0
228
+ });
229
+ if (c.status === "inputting" || c.status === "submitting") {
230
+ let e = c.status === "submitting", t = c.status === "inputting" ? c.canSubmit : !1;
231
+ return /* @__PURE__ */ i(C, {
232
+ screen: c.currentScreen,
233
+ answers: c.answers,
234
+ answerValidity: c.answerValidity,
235
+ canSubmit: t,
236
+ isSubmitting: e,
237
+ onAnswerChange: (e, t) => l.setAnswer(e, t),
238
+ onAnswerValidityChange: (e, t) => l.setAnswerValidity(e, t),
239
+ onSubmit: () => l.submit()
240
+ });
241
+ }
242
+ if (c.status === "success") return /* @__PURE__ */ i(u, {
243
+ status: "success",
244
+ successTitle: s("dynamicForms.success"),
245
+ hideFooterBranding: !0
246
+ });
247
+ if (c.status === "misconfigured") return /* @__PURE__ */ i(u, {
248
+ status: "failure",
249
+ failureTitle: s("dynamicForms.misconfigured"),
250
+ onSkip: () => l.close(),
251
+ skipLabel: s("common.close"),
252
+ hideFooterBranding: !0
253
+ });
254
+ if (c.status === "finished" || c.status === "closed") return null;
255
+ }, T = ({ config: e, manager: t, onFinish: n }) => /* @__PURE__ */ i(o, { children: e || t ? /* @__PURE__ */ i(w, {
256
+ config: e,
257
+ manager: t,
258
+ onFinish: n
259
+ }) : null });
260
+ _(T, "incode-dynamic-forms");
261
+ //#endregion
262
+ export { T as DynamicForms };
@@ -0,0 +1,2 @@
1
+ import { t as e } from "../ekybModule-BSs7mndb.js";
2
+ export { e as EkybModule };