@incodetech/web 0.0.0-dev-20260608-c8c427ca → 0.0.0-dev-20260609-11ba3e8a

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 (211) hide show
  1. package/dist/ae-signature/ae-signature.es.js +15 -13
  2. package/dist/aligndevicelottie-DY_bX_p8.js +12769 -0
  3. package/dist/antifraud/antifraud.es.js +22 -19
  4. package/dist/authentication/authentication.es.js +42 -33
  5. package/dist/autoFocusTitle-DM6PvgcP.js +29 -0
  6. package/dist/{back-horizontal-hint-DsPhKbR4.js → back-horizontal-hint-BXYix0Wj.js} +26 -26
  7. package/dist/back-tutorial-vb1MxlrT.js +14597 -0
  8. package/dist/{back-vertical-hint-BFJbYQrX.js → back-vertical-hint-DNSh6JNH.js} +27 -27
  9. package/dist/backdevicelottie-HypPqBz7.js +16690 -0
  10. package/dist/base.css +5 -0
  11. package/dist/blurdevicelottie-CBXtBFiJ.js +15951 -0
  12. package/dist/bottomSheet-BuzqNQtG.js +39 -0
  13. package/dist/browser-ponyfill-CLLvZCVg.js +441 -0
  14. package/dist/button-B-qlr4iI.js +35 -0
  15. package/dist/checkbox-CTPETqo5.js +96 -0
  16. package/dist/consent/consent.es.js +75 -64
  17. package/dist/countrySelector-CzyuaDIs.js +60 -0
  18. package/dist/cpf-ocr/cpf-ocr.es.js +2 -2
  19. package/dist/cpfOcr-DQVs3r8N.js +92 -0
  20. package/dist/cpfOcr-WNklFuxT.js +2 -0
  21. package/dist/cross-document-data-match/cross-document-data-match.es.js +20 -17
  22. package/dist/curp-validation/curp-validation.es.js +246 -211
  23. package/dist/customFields-B4MqqDI6.js +140 -0
  24. package/dist/customWatchlist-Dfqw1DQP.js +36 -0
  25. package/dist/dateInputComposed-BsPQHG5o.js +1 -0
  26. package/dist/dateInputComposed-DY97tQVK.js +69 -0
  27. package/dist/defineProperty-mefzVtTv.js +39 -0
  28. package/dist/document-capture/document-capture.es.js +2 -2
  29. package/dist/documentCapture-BE78MIlR.js +876 -0
  30. package/dist/documentCapture-BVfNZL29.js +2 -0
  31. package/dist/dropdownComposed-BF4L-7mJ.js +380 -0
  32. package/dist/dropdownComposed-mvHuRFHn.js +1 -0
  33. package/dist/dynamicForms-BYGGAQoc.js +352 -0
  34. package/dist/ekyb/ekyb.es.js +2 -2
  35. package/dist/ekybModule-BUPX0QhW.js +2 -0
  36. package/dist/ekybModule-CkTXu-4u.js +279 -0
  37. package/dist/ekyc/ekyc.es.js +2 -2
  38. package/dist/ekycModule-BWsVX39d.js +257 -0
  39. package/dist/ekycModule-DNDPqvUc.js +2 -0
  40. package/dist/electronic-signature/electronic-signature.es.js +2 -2
  41. package/dist/electronic-signature-BJSyzex9.js +426 -0
  42. package/dist/email/email.es.js +198 -78
  43. package/dist/emailInput-BHp4Apt4.js +39 -0
  44. package/dist/errorIcon-B0rmz3rw.js +26 -0
  45. package/dist/expiredId-C105HVKv.js +85 -0
  46. package/dist/extensibility-DJwVxojG.js +3070 -0
  47. package/dist/extensibility.es.js +26 -26
  48. package/dist/face-match/face-match.es.js +2 -2
  49. package/dist/faceMatch-BOFGxzzx.js +343 -0
  50. package/dist/faceMatch-CDMcFQwR.js +2 -0
  51. package/dist/field-comparison/field-comparison.es.js +2 -2
  52. package/dist/fieldComparison-BMDmQ8eA.js +88 -0
  53. package/dist/fieldComparison-Z1NleSxD.js +2 -0
  54. package/dist/{flip-animation-CuQ57qTn.js → flip-animation-BGRvygw9.js} +4221 -4221
  55. package/dist/flow/flow.es.js +597 -493
  56. package/dist/flow/styles.css +0 -8
  57. package/dist/{front-horizontal-hint-CKm7PnmS.js → front-horizontal-hint-CLSU0iVo.js} +70 -70
  58. package/dist/{front-vertical-hint-CLHC2qoH.js → front-vertical-hint-BWq-yWQ8.js} +81 -81
  59. package/dist/frontdevicelottie-CLqitJhG.js +17314 -0
  60. package/dist/geolocation/geolocation.es.js +485 -395
  61. package/dist/glaredevicelottie-BS04U6Fc.js +14478 -0
  62. package/dist/governmentValidation/governmentValidation.es.js +145 -64
  63. package/dist/governmentValidation/styles.css +0 -36
  64. package/dist/homeScreen-BsEYyiDB.js +264 -0
  65. package/dist/hooks-BtgmGvba.js +149 -0
  66. package/dist/i18n-gTHArCl9.js +2971 -0
  67. package/dist/icons-DKY3xDkf.js +360 -0
  68. package/dist/id/id.es.js +565 -413
  69. package/dist/id-laser-h-DX8UbVNH.js +467 -0
  70. package/dist/id-laser-v-DhnHdjlB.js +490 -0
  71. package/dist/id-tutorial-lj4iKtYT.js +13165 -0
  72. package/dist/id-verification/id-verification.es.js +21 -18
  73. package/dist/idOcr-BS77o1VC.js +123 -0
  74. package/dist/identity-reuse/identity-reuse.es.js +168 -130
  75. package/dist/incode-logo-57XFniXU.js +4 -0
  76. package/dist/incodeComponent-CDJxFZvS.js +63 -0
  77. package/dist/incodeModule-DkA_yd0X.js +13 -0
  78. package/dist/index.es.js +16 -14
  79. package/dist/inputComposed-5V2nLTqH.js +99 -0
  80. package/dist/inputComposed-BPOYwUBl.js +1 -0
  81. package/dist/loadingIcon-DN62ugKs.js +148 -0
  82. package/dist/lottie_light-Dp9Bz3mf.js +9031 -0
  83. package/dist/mandatoryConsent-DP189TUn.js +107 -0
  84. package/dist/modal-B5QeulDu.js +153 -0
  85. package/dist/modal.hooks-C7K9k_pY.js +202 -0
  86. package/dist/numberedStep-DVAyTPv1.js +13 -0
  87. package/dist/optionAccessibleLabel-Czc2YC8z.js +202 -0
  88. package/dist/otpInput-2IQ-JCK8.js +195 -0
  89. package/dist/page-BZ-0eNWq.js +71 -0
  90. package/dist/{passport-horizontal-hint-C_le0HVU.js → passport-horizontal-hint-DfVsf4Cc.js} +55 -55
  91. package/dist/{passport-tutorial-BYN4T_TE.js → passport-tutorial-zT1ZoA-D.js} +7096 -7084
  92. package/dist/{passport-vertical-hint-H-pyICSv.js → passport-vertical-hint-DVxbTyQp.js} +49 -49
  93. package/dist/pdf-BZA70WbM.js +22398 -0
  94. package/dist/pdfViewer-Dr63sJ51.js +114 -0
  95. package/dist/phone/phone.es.js +214 -87
  96. package/dist/phoneInputComposed-D_IabWKJ.js +12142 -0
  97. package/dist/processing-B_u8wUB7.js +8 -0
  98. package/dist/qe-signature/qe-signature.es.js +15 -13
  99. package/dist/radioGroupComposed-DwYW-Ld-.js +215 -0
  100. package/dist/redirect-to-mobile/redirect-to-mobile.es.js +2099 -859
  101. package/dist/registerIncodeElement-BJJGzVdq.js +11 -0
  102. package/dist/requiredLabelHint-DEadtiwx.js +17 -0
  103. package/dist/richText-C7GUm0WL.js +3153 -0
  104. package/dist/rolldown-runtime--E5BIlTp.js +33 -0
  105. package/dist/selfie/selfie.es.js +54 -42
  106. package/dist/selfieTutorial-CtruLyO2.js +2689 -0
  107. package/dist/signature/signature.es.js +765 -406
  108. package/dist/snackbar-Dz9crm39.js +16 -0
  109. package/dist/spinner-BfBIZkDQ.js +42 -0
  110. package/dist/spinner-DEDtE7Pz.js +1 -0
  111. package/dist/statusPage-CVCoieyd.js +28 -0
  112. package/dist/successIcon-rmzr-pxu.js +30 -0
  113. package/dist/tabs--UMd6eEB.js +103 -0
  114. package/dist/transitionSpinner-CWhGcr7c.js +26 -0
  115. package/dist/{tutorial-QzQ536BL.js → tutorial-Jv0noW4z.js} +832 -578
  116. package/dist/types/extensibility.d.ts +3 -1
  117. package/dist/types/index.d.ts +13 -4
  118. package/dist/typography-BK4AmfKX.js +45 -0
  119. package/dist/uiConfig-sgEkFuuA.js +25 -0
  120. package/dist/useModuleLoader-CuhHtmgr.js +670 -0
  121. package/dist/vendor-preact-BH7vOa2r.js +957 -0
  122. package/dist/verificationResult-CJ0JyV6A.js +64 -0
  123. package/dist/verifiedByIncode-8QBn-kgZ.js +103 -0
  124. package/dist/watchlist/watchlist.es.js +31 -26
  125. package/dist/watchlistForBusiness-RZcnjVDb.js +80 -0
  126. package/dist/workflow/styles.css +0 -8
  127. package/dist/workflow/workflow.es.js +251 -209
  128. package/package.json +4 -2
  129. package/dist/aligndevicelottie-D8KsO77t.js +0 -12757
  130. package/dist/autoFocusTitle-BpYdaSUM.js +0 -16
  131. package/dist/back-tutorial-DhSE2FJo.js +0 -14585
  132. package/dist/backdevicelottie-CJWGVMdw.js +0 -16678
  133. package/dist/blurdevicelottie-Dxt2deEB.js +0 -15939
  134. package/dist/bottomSheet-QrpyatOD.js +0 -31
  135. package/dist/browser-ponyfill-Crda_c5R.js +0 -299
  136. package/dist/button-DcCUEn2n.js +0 -24
  137. package/dist/checkbox-DCCzBAuF.js +0 -86
  138. package/dist/countrySelector-CJ8egQ4C.js +0 -58
  139. package/dist/cpfOcr-Db06i-Lm.js +0 -2
  140. package/dist/cpfOcr-FixhUeMQ.js +0 -79
  141. package/dist/customFields-C1G9xHNX.js +0 -125
  142. package/dist/customWatchlist-IKEblz7u.js +0 -31
  143. package/dist/dateInputComposed-Cg8BvYSK.js +0 -1
  144. package/dist/dateInputComposed-Ddd7HLyM.js +0 -58
  145. package/dist/defineProperty-xczUyn-m.js +0 -39
  146. package/dist/documentCapture-D9I7FjGe.js +0 -2
  147. package/dist/documentCapture-b61wlala.js +0 -765
  148. package/dist/dropdownComposed-B4U0AIak.js +0 -1
  149. package/dist/dropdownComposed-CS2pyn-g.js +0 -293
  150. package/dist/dynamicForms-tYQog0kw.js +0 -298
  151. package/dist/ekybModule-C33C4JES.js +0 -237
  152. package/dist/ekybModule-LON6G2Bz.js +0 -2
  153. package/dist/ekycModule-BJOgtTAh.js +0 -225
  154. package/dist/ekycModule-BSf_DIG7.js +0 -2
  155. package/dist/electronic-signature-OdgTyso4.js +0 -406
  156. package/dist/emailInput-CU7mLB21.js +0 -37
  157. package/dist/errorIcon-DpHzAoAo.js +0 -24
  158. package/dist/expiredId-nfVAZgTL.js +0 -70
  159. package/dist/extensibility-BbNy3mVG.js +0 -2602
  160. package/dist/faceMatch-BIila4kf.js +0 -2
  161. package/dist/faceMatch-DJ7Mqujx.js +0 -206
  162. package/dist/fieldComparison-D2RSFYl-.js +0 -84
  163. package/dist/fieldComparison-DbUyouFd.js +0 -2
  164. package/dist/frontdevicelottie-65Vyfpff.js +0 -17302
  165. package/dist/glaredevicelottie-BEyaqtc6.js +0 -14466
  166. package/dist/homeScreen-CyPddxWl.js +0 -227
  167. package/dist/hooks-MxHtZWTS.js +0 -112
  168. package/dist/i18n-Kzzvkz94.js +0 -2019
  169. package/dist/icons-9I5g9-_1.js +0 -292
  170. package/dist/id-laser-h-iCPbFixz.js +0 -467
  171. package/dist/id-laser-v-CNzwliP2.js +0 -483
  172. package/dist/id-tutorial-CF4nO4oX.js +0 -13153
  173. package/dist/idOcr-DlMLMDqa.js +0 -97
  174. package/dist/incode-logo-DX016usY.js +0 -4
  175. package/dist/incodeComponent-BoFhgK7G.js +0 -50
  176. package/dist/incodeModule-BiCoAJ5k.js +0 -13
  177. package/dist/inputComposed-DAEey9xm.js +0 -94
  178. package/dist/inputComposed-eS4B0Mkh.js +0 -1
  179. package/dist/loadingIcon-BN5YRQUb.js +0 -104
  180. package/dist/lottie_light-DLqSnziX.js +0 -4419
  181. package/dist/mandatoryConsent-DNz2jZ43.js +0 -98
  182. package/dist/modal-ZqAhwiRF.js +0 -135
  183. package/dist/modal.hooks-LdusROLW.js +0 -126
  184. package/dist/numberedStep-CdLWASwL.js +0 -11
  185. package/dist/optionAccessibleLabel-DcygPaME.js +0 -140
  186. package/dist/otpInput-C4pk4BJU.js +0 -157
  187. package/dist/page-DA3R7q0J.js +0 -69
  188. package/dist/pdf-51QeiFSx.js +0 -14967
  189. package/dist/pdfViewer-rKzTHket.js +0 -64
  190. package/dist/phoneInputComposed-CjAxk2Gj.js +0 -11230
  191. package/dist/processing-DPktVde2.js +0 -6
  192. package/dist/radioGroupComposed-DRRxVk9Z.js +0 -178
  193. package/dist/registerIncodeElement-BHWOwdSS.js +0 -7
  194. package/dist/requiredLabelHint-B6FN3v88.js +0 -13
  195. package/dist/richText-6pIbydcz.js +0 -1973
  196. package/dist/rolldown-runtime-CYMK-g2i.js +0 -20
  197. package/dist/selfieTutorial-Yo9AlUoT.js +0 -2677
  198. package/dist/snackbar-CQiiWO4p.js +0 -14
  199. package/dist/spinner-B4dcie2T.js +0 -1
  200. package/dist/spinner-CKnjVHxw.js +0 -39
  201. package/dist/statusPage-B8b3Jg6N.js +0 -28
  202. package/dist/successIcon-SlKgTSty.js +0 -28
  203. package/dist/tabs-D7lGst3Q.js +0 -78
  204. package/dist/transitionSpinner-Di3bOyOu.js +0 -17
  205. package/dist/typography-CxjaknHN.js +0 -28
  206. package/dist/uiConfig-CwpQ-IM6.js +0 -20
  207. package/dist/useModuleLoader-Bqs7fglI.js +0 -517
  208. package/dist/vendor-preact-D6SntenC.js +0 -958
  209. package/dist/verificationResult-DhT3hH1b.js +0 -90
  210. package/dist/verifiedByIncode-DpbxzO0y.js +0 -101
  211. package/dist/watchlistForBusiness-CRXVbH4l.js +0 -75
@@ -1 +0,0 @@
1
- import "./dropdownComposed-CS2pyn-g.js";
@@ -1,293 +0,0 @@
1
- import { S as e, _ as t, l as n, p as r, v as i } from "./vendor-preact-D6SntenC.js";
2
- import { n as a } from "./loadingIcon-BN5YRQUb.js";
3
- import { t as o } from "./errorIcon-DpHzAoAo.js";
4
- import { l as s, n as c, o as ee, u as te } from "./icons-9I5g9-_1.js";
5
- import { t as l } from "./successIcon-SlKgTSty.js";
6
- //#region src/shared/dropdownComposed/dropdownComposed.tsx
7
- var u = ({ id: u, label: d, labelHint: f, placeholder: p = "Choose an option", value: m, options: h, onChange: ne, error: g, helper: _, showErrorIcon: re, showHelperIcon: v, suppressMessages: y = !1, disabled: b = !1, required: x, searchable: S = !1, searchPlaceholder: C = "Search...", noResultsText: w = "No results found", name: T, tabIndex: ie, onKeyDown: ae, onBlur: oe, renderSelectedLabel: E, siblingElement: D, enterKeyHint: se, class: ce, "aria-label": O, "data-testid": k }) => {
8
- let [A, j] = r(!1), [M, N] = r(!1), [P, F] = r(-1), [I, L] = r(""), R = n(null), z = n(null), B = n(null), V = n([]), H = n(null), U = n(""), W = n(), G = h.find((e) => e.value === m), K = G ? E ? E(G) : G.label : p, q = S && I ? h.filter((e) => e.label.toLowerCase().includes(I.toLowerCase())) : h, J = `${u}-label`, Y = `${u}-value`, X = `${u}-listbox`, Z = `${u}-helper`, Q = `${u}-error`, le = y ? "" : [_ ? Z : null, g ? Q : null].filter(Boolean).join(" ");
9
- t(() => {
10
- if (!A) return;
11
- let e = requestAnimationFrame(() => {
12
- S && H.current && H.current.focus(), requestAnimationFrame(() => {
13
- B.current?.scrollIntoView({
14
- behavior: "smooth",
15
- block: "nearest",
16
- inline: "nearest"
17
- });
18
- });
19
- });
20
- return () => cancelAnimationFrame(e);
21
- }, [A, S]), t(() => {
22
- A || (F(-1), L(""));
23
- }, [A]), t(() => {
24
- P >= 0 && V.current[P] && V.current[P]?.scrollIntoView({
25
- block: "nearest",
26
- inline: "nearest"
27
- });
28
- }, [P]), t(() => () => {
29
- W.current && clearTimeout(W.current);
30
- }, []);
31
- let ue = () => {
32
- b || j((e) => !e);
33
- }, $ = (e) => {
34
- ne(e), j(!1), F(-1), z.current?.focus();
35
- }, de = () => {
36
- N(!0);
37
- }, fe = (e) => {
38
- N(!1), R.current?.contains(e.relatedTarget) || (j(!1), oe?.());
39
- }, pe = (e) => {
40
- if (b) return;
41
- ae?.(e);
42
- let { key: t } = e;
43
- if (t.length === 1 && /^[a-zA-Z0-9]$/.test(t)) {
44
- e.preventDefault(), W.current && clearTimeout(W.current), U.current += t.toLowerCase();
45
- let n = q.findIndex((e) => e.label.toLowerCase().startsWith(U.current));
46
- n !== -1 && (A || j(!0), F(n)), W.current = setTimeout(() => {
47
- U.current = "";
48
- }, 500);
49
- return;
50
- }
51
- switch (t) {
52
- case "ArrowDown":
53
- e.preventDefault(), A ? F((e) => e < q.length - 1 ? e + 1 : e) : (j(!0), F(0));
54
- break;
55
- case "ArrowUp":
56
- e.preventDefault(), A ? F((e) => e > 0 ? e - 1 : e) : (j(!0), F(q.length - 1));
57
- break;
58
- case "Home":
59
- e.preventDefault(), A && F(0);
60
- break;
61
- case "End":
62
- e.preventDefault(), A && F(q.length - 1);
63
- break;
64
- case "Enter":
65
- e.preventDefault(), A && P >= 0 && q[P] ? $(q[P].value) : A || j(!0);
66
- break;
67
- case " ":
68
- e.preventDefault(), A && P >= 0 && q[P] ? $(q[P].value) : A || (j(!0), F(0));
69
- break;
70
- case "Escape":
71
- e.preventDefault(), A && (j(!1), F(-1), z.current?.focus());
72
- break;
73
- case "Tab":
74
- A && (j(!1), F(-1));
75
- break;
76
- default: break;
77
- }
78
- }, me = (e) => {
79
- let { key: t } = e;
80
- switch (t) {
81
- case "ArrowDown":
82
- e.preventDefault(), F((e) => e < q.length - 1 ? e + 1 : e);
83
- break;
84
- case "ArrowUp":
85
- e.preventDefault(), F((e) => e > 0 ? e - 1 : e);
86
- break;
87
- case "Home":
88
- e.preventDefault(), F(0);
89
- break;
90
- case "End":
91
- e.preventDefault(), F(q.length - 1);
92
- break;
93
- case "Enter":
94
- e.preventDefault(), P >= 0 && q[P] && $(q[P].value);
95
- break;
96
- case "Escape":
97
- e.preventDefault(), j(!1), F(-1), z.current?.focus();
98
- break;
99
- case "Tab":
100
- I || (j(!1), F(-1));
101
- break;
102
- default: break;
103
- }
104
- };
105
- return /* @__PURE__ */ i("div", {
106
- class: a("IncodeDropdownComposed", ce),
107
- ref: R,
108
- onBlur: fe,
109
- children: [
110
- T && /* @__PURE__ */ i("input", {
111
- type: "hidden",
112
- name: T,
113
- value: m || "",
114
- disabled: b,
115
- required: x
116
- }),
117
- d && /* @__PURE__ */ i("label", {
118
- class: "IncodeDropdownComposedLabel",
119
- id: J,
120
- htmlFor: u,
121
- "data-testid": `${u}-label`,
122
- children: [d, f && /* @__PURE__ */ i("span", {
123
- class: "IncodeDropdownComposedLabelHint",
124
- "data-testid": `${u}-label-hint`,
125
- children: f
126
- })]
127
- }),
128
- /* @__PURE__ */ i("div", {
129
- class: "IncodeDropdownComposedWrapper",
130
- children: [/* @__PURE__ */ i("div", {
131
- class: a("IncodeDropdownComposedTriggerRow", { IncodeDropdownComposedTriggerRowWithSibling: !!D }),
132
- children: [/* @__PURE__ */ i("button", {
133
- ref: z,
134
- type: "button",
135
- id: u,
136
- class: "IncodeDropdownComposedTrigger",
137
- onClick: ue,
138
- onFocus: de,
139
- onKeyDown: pe,
140
- tabIndex: b ? -1 : ie ?? 0,
141
- disabled: b,
142
- "aria-haspopup": "listbox",
143
- "aria-expanded": A ? "true" : "false",
144
- "aria-disabled": b ? "true" : void 0,
145
- "aria-labelledby": d ? `${J} ${Y}` : void 0,
146
- "aria-label": d ? void 0 : O,
147
- "aria-controls": A ? X : void 0,
148
- "aria-activedescendant": A && P >= 0 ? `${u}-option-${P}` : void 0,
149
- "aria-invalid": g ? "true" : void 0,
150
- "aria-required": x ? "true" : void 0,
151
- "aria-describedby": le || void 0,
152
- "data-error": g ? "true" : void 0,
153
- "data-focused": M || A ? "true" : void 0,
154
- "data-testid": k,
155
- children: [/* @__PURE__ */ i("span", {
156
- id: Y,
157
- class: G ? "IncodeDropdownComposedTriggerText" : "IncodeDropdownComposedTriggerPlaceholder",
158
- "aria-hidden": !d && O ? "true" : void 0,
159
- children: G?.ariaLabel ? /* @__PURE__ */ i(e, { children: [/* @__PURE__ */ i("span", {
160
- "aria-hidden": "true",
161
- children: K
162
- }), /* @__PURE__ */ i("span", {
163
- class: "IncodeDropdownComposedSrOnly",
164
- children: G.ariaLabel
165
- })] }) : K
166
- }), /* @__PURE__ */ i("span", {
167
- class: "IncodeDropdownComposedTriggerIcon",
168
- "aria-hidden": "true",
169
- "data-open": A,
170
- children: /* @__PURE__ */ i(s, {})
171
- })]
172
- }), D && /* @__PURE__ */ i("div", {
173
- class: "IncodeDropdownComposedSibling",
174
- children: D
175
- })]
176
- }), A && /* @__PURE__ */ i("div", {
177
- ref: B,
178
- class: "IncodeDropdownComposedList",
179
- "data-error": g ? "true" : void 0,
180
- children: [S && /* @__PURE__ */ i("div", {
181
- class: "IncodeDropdownComposedSearchWrapper",
182
- children: /* @__PURE__ */ i("div", {
183
- class: "IncodeDropdownComposedSearchInner",
184
- children: [/* @__PURE__ */ i("input", {
185
- ref: H,
186
- type: "text",
187
- class: "IncodeDropdownComposedSearchInput",
188
- value: I,
189
- onInput: (e) => {
190
- L(e.target.value), F(0);
191
- },
192
- onKeyDown: me,
193
- placeholder: C,
194
- role: "combobox",
195
- "aria-autocomplete": "list",
196
- "aria-expanded": "true",
197
- "aria-controls": X,
198
- "aria-activedescendant": P >= 0 ? `${u}-option-${P}` : void 0,
199
- "aria-label": C,
200
- autocomplete: "off"
201
- }), I ? /* @__PURE__ */ i("button", {
202
- type: "button",
203
- class: "IncodeDropdownComposedCloseIconButton",
204
- onMouseDown: (e) => e.preventDefault(),
205
- onClick: () => {
206
- I && (L(""), H.current?.focus());
207
- },
208
- "aria-label": "Clear search query",
209
- children: /* @__PURE__ */ i(ee, {
210
- width: 20,
211
- height: 20,
212
- fillColor: "var(--icon-neutral-500)"
213
- })
214
- }) : /* @__PURE__ */ i("span", {
215
- class: "IncodeDropdownComposedSearchIcon",
216
- "aria-hidden": "true",
217
- children: /* @__PURE__ */ i(c, { size: 20 })
218
- })]
219
- })
220
- }), /* @__PURE__ */ i("div", {
221
- id: X,
222
- role: "listbox",
223
- "aria-labelledby": d ? J : void 0,
224
- "aria-label": d ? void 0 : O ?? p,
225
- class: "IncodeDropdownComposedOptionsScroll",
226
- children: q.length === 0 ? /* @__PURE__ */ i("div", {
227
- class: "IncodeDropdownComposedNoResults",
228
- children: w
229
- }) : q.map((e, t) => {
230
- let n = m === e.value, r = e.ariaLabel && n ? `${e.ariaLabel}, selected` : e.ariaLabel;
231
- return /* @__PURE__ */ i("div", {
232
- id: `${u}-option-${t}`,
233
- role: "option",
234
- "aria-label": r,
235
- "aria-selected": n ? "true" : "false",
236
- class: "IncodeDropdownComposedOption",
237
- "data-highlighted": P === t,
238
- ref: (e) => {
239
- V.current[t] = e;
240
- },
241
- onClick: () => $(e.value),
242
- onMouseDown: (e) => e.preventDefault(),
243
- onMouseEnter: () => F(t),
244
- children: [e.ariaLabel ? /* @__PURE__ */ i("span", {
245
- "aria-hidden": "true",
246
- children: e.label
247
- }) : e.label, n && /* @__PURE__ */ i("span", {
248
- class: "IncodeDropdownComposedCheckmarkIcon",
249
- "aria-hidden": "true",
250
- children: /* @__PURE__ */ i(te, {})
251
- })]
252
- }, e.value);
253
- })
254
- })]
255
- })]
256
- }),
257
- S && /* @__PURE__ */ i("div", {
258
- class: "IncodeDropdownComposedLiveRegion",
259
- role: "status",
260
- "aria-live": "polite",
261
- "aria-atomic": "true",
262
- children: A && I ? q.length === 0 ? w : `${q.length} result${q.length === 1 ? "" : "s"} available` : ""
263
- }),
264
- !y && g && /* @__PURE__ */ i("div", {
265
- class: "IncodeDropdownComposedErrorWrapper",
266
- role: "alert",
267
- "data-testid": `${u}-error-wrapper`,
268
- children: [re && /* @__PURE__ */ i("div", {
269
- class: "IncodeDropdownComposedIconWrapper",
270
- children: /* @__PURE__ */ i(o, { size: 17 })
271
- }), /* @__PURE__ */ i("p", {
272
- id: Q,
273
- class: "IncodeDropdownComposedError",
274
- children: g
275
- })]
276
- }),
277
- !y && _ && !g && /* @__PURE__ */ i("div", {
278
- class: "IncodeDropdownComposedHelperWrapper",
279
- "data-testid": `${u}-helper-wrapper`,
280
- children: [v && /* @__PURE__ */ i("div", {
281
- class: "IncodeDropdownComposedIconWrapper",
282
- children: /* @__PURE__ */ i(l, { size: 17 })
283
- }), /* @__PURE__ */ i("p", {
284
- id: Z,
285
- class: "IncodeDropdownComposedHelper",
286
- children: _
287
- })]
288
- })
289
- ]
290
- });
291
- };
292
- //#endregion
293
- export { u as t };
@@ -1,298 +0,0 @@
1
- import { n as e } from "./i18n-Kzzvkz94.js";
2
- import { d as t, m as n, v as r } from "./vendor-preact-D6SntenC.js";
3
- import { c as i, o as a } from "./hooks-MxHtZWTS.js";
4
- import { t as o } from "./incodeComponent-BoFhgK7G.js";
5
- import { r as s } from "./loadingIcon-BN5YRQUb.js";
6
- import { t as c } from "./page-DA3R7q0J.js";
7
- import { t as l } from "./button-DcCUEn2n.js";
8
- import { t as u } from "./verificationResult-DhT3hH1b.js";
9
- import { t as d } from "./inputComposed-DAEey9xm.js";
10
- import { n as f, t as p } from "./phoneInputComposed-CjAxk2Gj.js";
11
- import { t as m } from "./dropdownComposed-CS2pyn-g.js";
12
- import { t as h } from "./dateInputComposed-Ddd7HLyM.js";
13
- import { t as g } from "./incodeModule-BiCoAJ5k.js";
14
- import { n as _, t as v } from "./requiredLabelHint-B6FN3v88.js";
15
- import { t as y } from "./emailInput-CU7mLB21.js";
16
- import { formatCPF as b, isValidCPF as x } from "@incodetech/core/cpf-ocr";
17
- import { createDynamicFormsManager as S } from "@incodetech/core/dynamic-forms";
18
- //#region src/modules/dynamic-forms/dynamicForms.tsx
19
- function C(e) {
20
- return e.inputType ?? e.overrides ?? "TEXT";
21
- }
22
- function w(e) {
23
- switch (e) {
24
- case "NAME": return "name";
25
- case "PHONE": return "tel";
26
- case "DATE": return "bday";
27
- default: return;
28
- }
29
- }
30
- var T = ({ question: n, value: i, disabled: a = !1, error: o, labelHint: s, onChange: c, onFormatValidityChange: l, onBlur: u }) => {
31
- let { t: g } = e(), _ = C(n), v = `dynamic-form-${n.questionId}`, S = n.question, T = !n.isOptional, E = w(_), D = _ === "COUNTRY" || _ === "NATIONALITY", O = t(() => D ? f.map((e) => ({
32
- value: e.code,
33
- label: `${e.emoji} ${e.name}`,
34
- ariaLabel: e.name
35
- })) : [], [D]);
36
- if (_ === "YESNO") {
37
- let e = [{
38
- value: "YES",
39
- label: g("common.yes")
40
- }, {
41
- value: "NO",
42
- label: g("common.no")
43
- }];
44
- return /* @__PURE__ */ r("div", {
45
- class: "IncodeDynamicFormsField",
46
- children: /* @__PURE__ */ r(m, {
47
- id: v,
48
- name: n.questionId,
49
- label: S,
50
- labelHint: s,
51
- value: i,
52
- options: e,
53
- required: T,
54
- error: o,
55
- disabled: a,
56
- onChange: (e) => c(n.questionId, e),
57
- onBlur: () => u?.(n.questionId)
58
- })
59
- });
60
- }
61
- if (_ === "DATE") return /* @__PURE__ */ r("div", {
62
- class: "IncodeDynamicFormsField",
63
- children: /* @__PURE__ */ r(h, {
64
- id: v,
65
- name: n.questionId,
66
- label: S,
67
- labelHint: s,
68
- value: i,
69
- required: T,
70
- autocomplete: E,
71
- error: o,
72
- showErrorIcon: !!o,
73
- disabled: a,
74
- onInput: (e) => c(n.questionId, e.target.value),
75
- onBlur: () => u?.(n.questionId)
76
- })
77
- });
78
- if (_ === "PHONE") return /* @__PURE__ */ r("div", {
79
- class: "IncodeDynamicFormsField",
80
- onFocusOut: () => u?.(n.questionId),
81
- children: /* @__PURE__ */ r(p, {
82
- id: v,
83
- label: S,
84
- labelHint: s,
85
- value: i,
86
- required: T,
87
- autocomplete: E,
88
- error: o,
89
- showErrorIcon: !!o,
90
- disabled: a,
91
- onChange: (e, t) => {
92
- c(n.questionId, e), l?.(n.questionId, t);
93
- }
94
- })
95
- });
96
- if (_ === "COUNTRY" || _ === "NATIONALITY") return /* @__PURE__ */ r("div", {
97
- class: "IncodeDynamicFormsField",
98
- children: /* @__PURE__ */ r(m, {
99
- id: v,
100
- label: S,
101
- labelHint: s,
102
- value: i,
103
- options: O,
104
- searchable: !0,
105
- required: T,
106
- error: o,
107
- disabled: a,
108
- onChange: (e) => c(n.questionId, e),
109
- onBlur: () => u?.(n.questionId)
110
- })
111
- });
112
- if (_ === "SELECT" || _ === "MULTISELECT") {
113
- let e = (n.options ?? []).map((e) => ({
114
- value: e,
115
- label: e
116
- }));
117
- return /* @__PURE__ */ r("div", {
118
- class: "IncodeDynamicFormsField",
119
- children: /* @__PURE__ */ r(m, {
120
- id: v,
121
- label: S,
122
- labelHint: s,
123
- value: i,
124
- options: e,
125
- searchable: e.length > 5,
126
- required: T,
127
- error: o,
128
- disabled: a,
129
- onChange: (e) => c(n.questionId, e),
130
- onBlur: () => u?.(n.questionId)
131
- })
132
- });
133
- }
134
- return _ === "EMAIL" ? /* @__PURE__ */ r("div", {
135
- class: "IncodeDynamicFormsField",
136
- children: /* @__PURE__ */ r(y, {
137
- value: i,
138
- emailError: o,
139
- label: S,
140
- labelHint: s,
141
- required: T,
142
- disabled: a,
143
- onEmailChange: (e, t) => {
144
- c(n.questionId, e), l?.(n.questionId, t);
145
- },
146
- onBlur: () => u?.(n.questionId)
147
- })
148
- }) : _ === "CPF" ? /* @__PURE__ */ r("div", {
149
- class: "IncodeDynamicFormsField",
150
- children: /* @__PURE__ */ r(d, {
151
- id: v,
152
- name: n.questionId,
153
- label: S,
154
- labelHint: s,
155
- inputMode: "numeric",
156
- maxLength: 14,
157
- value: i,
158
- required: T,
159
- error: o,
160
- showErrorIcon: !!o,
161
- disabled: a,
162
- onInput: (e) => {
163
- let t = b(e.target.value);
164
- e.target.value = t, c(n.questionId, t), l?.(n.questionId, x(t));
165
- },
166
- onBlur: () => u?.(n.questionId)
167
- })
168
- }) : _ === "NUMBER" ? /* @__PURE__ */ r("div", {
169
- class: "IncodeDynamicFormsField",
170
- children: /* @__PURE__ */ r(d, {
171
- id: v,
172
- name: n.questionId,
173
- label: S,
174
- labelHint: s,
175
- type: "number",
176
- inputMode: "numeric",
177
- value: i,
178
- required: T,
179
- error: o,
180
- showErrorIcon: !!o,
181
- disabled: a,
182
- onInput: (e) => {
183
- let t = e.target.value.replace(/[^0-9]/g, "");
184
- c(n.questionId, t);
185
- },
186
- onBlur: () => u?.(n.questionId)
187
- })
188
- }) : /* @__PURE__ */ r("div", {
189
- class: "IncodeDynamicFormsField",
190
- children: /* @__PURE__ */ r(d, {
191
- id: v,
192
- name: n.questionId,
193
- label: S,
194
- labelHint: s,
195
- type: "text",
196
- value: i,
197
- required: T,
198
- autocomplete: E,
199
- error: o,
200
- showErrorIcon: !!o,
201
- disabled: a,
202
- onInput: (e) => c(n.questionId, e.target.value),
203
- onBlur: () => u?.(n.questionId)
204
- })
205
- });
206
- }, E = ({ screen: i, answers: a, validationErrors: o, canSubmit: u, isSubmitting: d = !1, onAnswerChange: f, onAnswerValidityChange: p, onValidateField: m, onSubmit: h }) => {
207
- let { t: g } = e(), y = i.hideTitle ? void 0 : i.title || g("dynamicForms.title"), b = n(), x = i.title || g("dynamicForms.title"), S = t(() => _(i.questions.map((e) => !e.isOptional)), [i]);
208
- return /* @__PURE__ */ r(c, {
209
- className: "IncodeDynamicFormsPage",
210
- title: y,
211
- titleId: y ? b : void 0,
212
- hideFooterBranding: !0,
213
- children: [
214
- /* @__PURE__ */ r(s, { size: 32 }),
215
- d && /* @__PURE__ */ r("div", {
216
- role: "status",
217
- "aria-live": "polite",
218
- class: "IncodeSrOnly",
219
- children: g("common.processing")
220
- }),
221
- /* @__PURE__ */ r("form", {
222
- class: "IncodeDynamicFormsForm",
223
- onSubmit: (e) => {
224
- e.preventDefault(), h();
225
- },
226
- "aria-labelledby": y ? b : void 0,
227
- "aria-label": y ? void 0 : x,
228
- "aria-busy": d || void 0,
229
- children: [i.questions.map((e) => {
230
- let t = o?.[e.questionId], n = v(S, !e.isOptional), i = n ? g(`forms.label.${n}`) ?? void 0 : void 0;
231
- return /* @__PURE__ */ r(T, {
232
- question: e,
233
- value: a[e.questionId] ?? "",
234
- disabled: d,
235
- error: t ? g(t) : void 0,
236
- labelHint: i,
237
- onChange: f,
238
- onFormatValidityChange: p,
239
- onBlur: m
240
- }, e.questionId);
241
- }), /* @__PURE__ */ r(l, {
242
- type: "submit",
243
- disabled: !u,
244
- isLoading: d,
245
- children: g("common.continue")
246
- })]
247
- })
248
- ]
249
- });
250
- }, D = ({ config: t, manager: n, onFinish: o }) => {
251
- let { t: s } = e(), [c, l] = i(() => {
252
- if (n) return n;
253
- if (!t) throw Error("DynamicForms config is required");
254
- return S({ config: t });
255
- }, {
256
- manageLifecycle: !n,
257
- autoLoad: !0
258
- });
259
- if (a({
260
- status: c.status === "closed" ? "finished" : c.status,
261
- onFinish: o
262
- }), c.status === "idle" || c.status === "loadingScreens") return /* @__PURE__ */ r(u, {
263
- status: "submitting",
264
- submittingTitle: s("common.loading")
265
- });
266
- if (c.status === "inputting" || c.status === "submitting") {
267
- let e = c.status === "submitting", t = c.status === "inputting" ? c.canSubmit : !1;
268
- return /* @__PURE__ */ r(E, {
269
- screen: c.currentScreen,
270
- answers: c.answers,
271
- validationErrors: c.validationErrors,
272
- canSubmit: t,
273
- isSubmitting: e,
274
- onAnswerChange: (e, t) => l.setAnswer(e, t),
275
- onAnswerValidityChange: (e, t) => l.setAnswerValidity(e, t),
276
- onValidateField: (e) => l.validateField(e),
277
- onSubmit: () => l.submit()
278
- }, c.screenIndex);
279
- }
280
- if (c.status === "success") return /* @__PURE__ */ r(u, {
281
- status: "success",
282
- successTitle: s("dynamicForms.success")
283
- });
284
- if (c.status === "misconfigured") return /* @__PURE__ */ r(u, {
285
- status: "failure",
286
- failureTitle: s("dynamicForms.misconfigured"),
287
- onSkip: () => l.close(),
288
- skipLabel: s("common.close")
289
- });
290
- if (c.status === "finished" || c.status === "closed") return null;
291
- }, O = ({ config: e, manager: t, onFinish: n }) => /* @__PURE__ */ r(o, { children: e || t ? /* @__PURE__ */ r(D, {
292
- config: e,
293
- manager: t,
294
- onFinish: n
295
- }) : null });
296
- g(O, "incode-dynamic-forms");
297
- //#endregion
298
- export { O as DynamicForms };