@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
@@ -0,0 +1,2 @@
1
+ import { t as DocumentCapture } from "./documentCapture-BE78MIlR.js";
2
+ export { DocumentCapture };
@@ -0,0 +1,380 @@
1
+ import { S as k, _ as y, l as A, p as d, v as u } from "./vendor-preact-BH7vOa2r.js";
2
+ import { n as cn } from "./loadingIcon-DN62ugKs.js";
3
+ import { t as ErrorIcon } from "./errorIcon-B0rmz3rw.js";
4
+ import { l as ChevronDown, n as SearchIcon, o as CloseIcon, u as CheckmarkCompactIcon } from "./icons-DKY3xDkf.js";
5
+ import { t as SuccessIcon } from "./successIcon-rmzr-pxu.js";
6
+ //#region src/shared/dropdownComposed/dropdownComposed.tsx
7
+ var DropdownComposed = ({ id, label, labelHint, placeholder = "Choose an option", value, options, onChange, error, helper, showErrorIcon, showHelperIcon, suppressMessages = false, disabled = false, required, searchable = false, searchPlaceholder = "Search...", noResultsText = "No results found", name, tabIndex, onKeyDown, onBlur, renderSelectedLabel, siblingElement, enterKeyHint: _enterKeyHint, class: className, "aria-label": ariaLabel, "data-testid": dataTestId }) => {
8
+ const [isOpen, setIsOpen] = d(false);
9
+ const [isFocused, setIsFocused] = d(false);
10
+ const [highlightedIndex, setHighlightedIndex] = d(-1);
11
+ const [searchQuery, setSearchQuery] = d("");
12
+ const containerRef = A(null);
13
+ const triggerRef = A(null);
14
+ const optionsRef = A(null);
15
+ const optionRefs = A([]);
16
+ const searchInputRef = A(null);
17
+ const typeaheadRef = A("");
18
+ const typeaheadTimeoutRef = A();
19
+ const selectedOption = options.find((o) => o.value === value);
20
+ const triggerText = selectedOption ? renderSelectedLabel ? renderSelectedLabel(selectedOption) : selectedOption.label : placeholder;
21
+ const filteredOptions = searchable && searchQuery ? options.filter((option) => option.label.toLowerCase().includes(searchQuery.toLowerCase())) : options;
22
+ const labelId = `${id}-label`;
23
+ const valueId = `${id}-value`;
24
+ const listboxId = `${id}-listbox`;
25
+ const helperId = `${id}-helper`;
26
+ const errorId = `${id}-error`;
27
+ const describedByIds = !suppressMessages ? [helper ? helperId : null, error ? errorId : null].filter(Boolean).join(" ") : "";
28
+ y(() => {
29
+ if (!isOpen) return;
30
+ const frame = requestAnimationFrame(() => {
31
+ if (searchable && searchInputRef.current) searchInputRef.current.focus();
32
+ requestAnimationFrame(() => {
33
+ optionsRef.current?.scrollIntoView({
34
+ behavior: "smooth",
35
+ block: "nearest",
36
+ inline: "nearest"
37
+ });
38
+ });
39
+ });
40
+ return () => cancelAnimationFrame(frame);
41
+ }, [isOpen, searchable]);
42
+ y(() => {
43
+ if (!isOpen) {
44
+ setHighlightedIndex(-1);
45
+ setSearchQuery("");
46
+ }
47
+ }, [isOpen]);
48
+ y(() => {
49
+ if (highlightedIndex >= 0 && optionRefs.current[highlightedIndex]) optionRefs.current[highlightedIndex]?.scrollIntoView({
50
+ block: "nearest",
51
+ inline: "nearest"
52
+ });
53
+ }, [highlightedIndex]);
54
+ y(() => {
55
+ return () => {
56
+ if (typeaheadTimeoutRef.current) clearTimeout(typeaheadTimeoutRef.current);
57
+ };
58
+ }, []);
59
+ const handleToggle = () => {
60
+ if (disabled) return;
61
+ setIsOpen((prev) => !prev);
62
+ };
63
+ const handleSelect = (optionValue) => {
64
+ onChange(optionValue);
65
+ setIsOpen(false);
66
+ setHighlightedIndex(-1);
67
+ triggerRef.current?.focus();
68
+ };
69
+ const handleFocus = () => {
70
+ setIsFocused(true);
71
+ };
72
+ const handleBlur = (e) => {
73
+ setIsFocused(false);
74
+ if (!containerRef.current?.contains(e.relatedTarget)) {
75
+ setIsOpen(false);
76
+ onBlur?.();
77
+ }
78
+ };
79
+ const handleKeyboardNavigation = (e) => {
80
+ if (disabled) return;
81
+ onKeyDown?.(e);
82
+ const { key } = e;
83
+ if (key.length === 1 && /^[a-zA-Z0-9]$/.test(key)) {
84
+ e.preventDefault();
85
+ if (typeaheadTimeoutRef.current) clearTimeout(typeaheadTimeoutRef.current);
86
+ typeaheadRef.current += key.toLowerCase();
87
+ const matchIndex = filteredOptions.findIndex((opt) => opt.label.toLowerCase().startsWith(typeaheadRef.current));
88
+ if (matchIndex !== -1) {
89
+ if (!isOpen) setIsOpen(true);
90
+ setHighlightedIndex(matchIndex);
91
+ }
92
+ typeaheadTimeoutRef.current = setTimeout(() => {
93
+ typeaheadRef.current = "";
94
+ }, 500);
95
+ return;
96
+ }
97
+ switch (key) {
98
+ case "ArrowDown":
99
+ e.preventDefault();
100
+ if (!isOpen) {
101
+ setIsOpen(true);
102
+ setHighlightedIndex(0);
103
+ } else setHighlightedIndex((prev) => prev < filteredOptions.length - 1 ? prev + 1 : prev);
104
+ break;
105
+ case "ArrowUp":
106
+ e.preventDefault();
107
+ if (!isOpen) {
108
+ setIsOpen(true);
109
+ setHighlightedIndex(filteredOptions.length - 1);
110
+ } else setHighlightedIndex((prev) => prev > 0 ? prev - 1 : prev);
111
+ break;
112
+ case "Home":
113
+ e.preventDefault();
114
+ if (isOpen) setHighlightedIndex(0);
115
+ break;
116
+ case "End":
117
+ e.preventDefault();
118
+ if (isOpen) setHighlightedIndex(filteredOptions.length - 1);
119
+ break;
120
+ case "Enter":
121
+ e.preventDefault();
122
+ if (isOpen && highlightedIndex >= 0 && filteredOptions[highlightedIndex]) handleSelect(filteredOptions[highlightedIndex].value);
123
+ else if (!isOpen) setIsOpen(true);
124
+ break;
125
+ case " ":
126
+ e.preventDefault();
127
+ if (isOpen && highlightedIndex >= 0 && filteredOptions[highlightedIndex]) handleSelect(filteredOptions[highlightedIndex].value);
128
+ else if (!isOpen) {
129
+ setIsOpen(true);
130
+ setHighlightedIndex(0);
131
+ }
132
+ break;
133
+ case "Escape":
134
+ e.preventDefault();
135
+ if (isOpen) {
136
+ setIsOpen(false);
137
+ setHighlightedIndex(-1);
138
+ triggerRef.current?.focus();
139
+ }
140
+ break;
141
+ case "Tab":
142
+ if (isOpen) {
143
+ setIsOpen(false);
144
+ setHighlightedIndex(-1);
145
+ }
146
+ break;
147
+ default: break;
148
+ }
149
+ };
150
+ const handleSearchKeyDown = (e) => {
151
+ const { key } = e;
152
+ switch (key) {
153
+ case "ArrowDown":
154
+ e.preventDefault();
155
+ setHighlightedIndex((prev) => prev < filteredOptions.length - 1 ? prev + 1 : prev);
156
+ break;
157
+ case "ArrowUp":
158
+ e.preventDefault();
159
+ setHighlightedIndex((prev) => prev > 0 ? prev - 1 : prev);
160
+ break;
161
+ case "Home":
162
+ e.preventDefault();
163
+ setHighlightedIndex(0);
164
+ break;
165
+ case "End":
166
+ e.preventDefault();
167
+ setHighlightedIndex(filteredOptions.length - 1);
168
+ break;
169
+ case "Enter":
170
+ e.preventDefault();
171
+ if (highlightedIndex >= 0 && filteredOptions[highlightedIndex]) handleSelect(filteredOptions[highlightedIndex].value);
172
+ break;
173
+ case "Escape":
174
+ e.preventDefault();
175
+ setIsOpen(false);
176
+ setHighlightedIndex(-1);
177
+ triggerRef.current?.focus();
178
+ break;
179
+ case "Tab":
180
+ if (!searchQuery) {
181
+ setIsOpen(false);
182
+ setHighlightedIndex(-1);
183
+ }
184
+ break;
185
+ default: break;
186
+ }
187
+ };
188
+ return /* @__PURE__ */ u("div", {
189
+ class: cn("IncodeDropdownComposed", className),
190
+ ref: containerRef,
191
+ onBlur: handleBlur,
192
+ children: [
193
+ name && /* @__PURE__ */ u("input", {
194
+ type: "hidden",
195
+ name,
196
+ value: value || "",
197
+ disabled,
198
+ required
199
+ }),
200
+ label && /* @__PURE__ */ u("label", {
201
+ class: "IncodeDropdownComposedLabel",
202
+ id: labelId,
203
+ htmlFor: id,
204
+ "data-testid": `${id}-label`,
205
+ children: [label, labelHint && /* @__PURE__ */ u("span", {
206
+ class: "IncodeDropdownComposedLabelHint",
207
+ "data-testid": `${id}-label-hint`,
208
+ children: labelHint
209
+ })]
210
+ }),
211
+ /* @__PURE__ */ u("div", {
212
+ class: "IncodeDropdownComposedWrapper",
213
+ children: [/* @__PURE__ */ u("div", {
214
+ class: cn("IncodeDropdownComposedTriggerRow", { IncodeDropdownComposedTriggerRowWithSibling: !!siblingElement }),
215
+ children: [/* @__PURE__ */ u("button", {
216
+ ref: triggerRef,
217
+ type: "button",
218
+ id,
219
+ class: "IncodeDropdownComposedTrigger",
220
+ onClick: handleToggle,
221
+ onFocus: handleFocus,
222
+ onKeyDown: handleKeyboardNavigation,
223
+ tabIndex: disabled ? -1 : tabIndex ?? 0,
224
+ disabled,
225
+ "aria-haspopup": "listbox",
226
+ "aria-expanded": isOpen ? "true" : "false",
227
+ "aria-disabled": disabled ? "true" : void 0,
228
+ "aria-labelledby": label ? `${labelId} ${valueId}` : void 0,
229
+ "aria-label": !label ? ariaLabel : void 0,
230
+ "aria-controls": isOpen ? listboxId : void 0,
231
+ "aria-activedescendant": isOpen && highlightedIndex >= 0 ? `${id}-option-${highlightedIndex}` : void 0,
232
+ "aria-invalid": error ? "true" : void 0,
233
+ "aria-required": required ? "true" : void 0,
234
+ "aria-describedby": describedByIds || void 0,
235
+ "data-error": error ? "true" : void 0,
236
+ "data-focused": isFocused || isOpen ? "true" : void 0,
237
+ "data-testid": dataTestId,
238
+ children: [/* @__PURE__ */ u("span", {
239
+ id: valueId,
240
+ class: selectedOption ? "IncodeDropdownComposedTriggerText" : "IncodeDropdownComposedTriggerPlaceholder",
241
+ "aria-hidden": !label && !!ariaLabel ? "true" : void 0,
242
+ children: selectedOption?.ariaLabel ? /* @__PURE__ */ u(k, { children: [/* @__PURE__ */ u("span", {
243
+ "aria-hidden": "true",
244
+ children: triggerText
245
+ }), /* @__PURE__ */ u("span", {
246
+ class: "IncodeDropdownComposedSrOnly",
247
+ children: selectedOption.ariaLabel
248
+ })] }) : triggerText
249
+ }), /* @__PURE__ */ u("span", {
250
+ class: "IncodeDropdownComposedTriggerIcon",
251
+ "aria-hidden": "true",
252
+ "data-open": isOpen,
253
+ children: /* @__PURE__ */ u(ChevronDown, {})
254
+ })]
255
+ }), siblingElement && /* @__PURE__ */ u("div", {
256
+ class: "IncodeDropdownComposedSibling",
257
+ children: siblingElement
258
+ })]
259
+ }), isOpen && /* @__PURE__ */ u("div", {
260
+ ref: optionsRef,
261
+ class: "IncodeDropdownComposedList",
262
+ "data-error": error ? "true" : void 0,
263
+ children: [searchable && /* @__PURE__ */ u("div", {
264
+ class: "IncodeDropdownComposedSearchWrapper",
265
+ children: /* @__PURE__ */ u("div", {
266
+ class: "IncodeDropdownComposedSearchInner",
267
+ children: [/* @__PURE__ */ u("input", {
268
+ ref: searchInputRef,
269
+ type: "text",
270
+ class: "IncodeDropdownComposedSearchInput",
271
+ value: searchQuery,
272
+ onInput: (e) => {
273
+ setSearchQuery(e.target.value);
274
+ setHighlightedIndex(0);
275
+ },
276
+ onKeyDown: handleSearchKeyDown,
277
+ placeholder: searchPlaceholder,
278
+ role: "combobox",
279
+ "aria-autocomplete": "list",
280
+ "aria-expanded": "true",
281
+ "aria-controls": listboxId,
282
+ "aria-activedescendant": highlightedIndex >= 0 ? `${id}-option-${highlightedIndex}` : void 0,
283
+ "aria-label": searchPlaceholder,
284
+ autocomplete: "off"
285
+ }), searchQuery ? /* @__PURE__ */ u("button", {
286
+ type: "button",
287
+ class: "IncodeDropdownComposedCloseIconButton",
288
+ onMouseDown: (e) => e.preventDefault(),
289
+ onClick: () => {
290
+ if (!searchQuery) return;
291
+ setSearchQuery("");
292
+ searchInputRef.current?.focus();
293
+ },
294
+ "aria-label": "Clear search query",
295
+ children: /* @__PURE__ */ u(CloseIcon, {
296
+ width: 20,
297
+ height: 20,
298
+ fillColor: "var(--icon-neutral-500)"
299
+ })
300
+ }) : /* @__PURE__ */ u("span", {
301
+ class: "IncodeDropdownComposedSearchIcon",
302
+ "aria-hidden": "true",
303
+ children: /* @__PURE__ */ u(SearchIcon, { size: 20 })
304
+ })]
305
+ })
306
+ }), /* @__PURE__ */ u("div", {
307
+ id: listboxId,
308
+ role: "listbox",
309
+ "aria-labelledby": label ? labelId : void 0,
310
+ "aria-label": !label ? ariaLabel ?? placeholder : void 0,
311
+ class: "IncodeDropdownComposedOptionsScroll",
312
+ children: filteredOptions.length === 0 ? /* @__PURE__ */ u("div", {
313
+ class: "IncodeDropdownComposedNoResults",
314
+ children: noResultsText
315
+ }) : filteredOptions.map((option, index) => {
316
+ const selectedOption = value === option.value;
317
+ const optionAriaLabel = option.ariaLabel && selectedOption ? `${option.ariaLabel}, selected` : option.ariaLabel;
318
+ return /* @__PURE__ */ u("div", {
319
+ id: `${id}-option-${index}`,
320
+ role: "option",
321
+ "aria-label": optionAriaLabel,
322
+ "aria-selected": selectedOption ? "true" : "false",
323
+ class: "IncodeDropdownComposedOption",
324
+ "data-highlighted": highlightedIndex === index,
325
+ ref: (el) => {
326
+ optionRefs.current[index] = el;
327
+ },
328
+ onClick: () => handleSelect(option.value),
329
+ onMouseDown: (e) => e.preventDefault(),
330
+ onMouseEnter: () => setHighlightedIndex(index),
331
+ children: [option.ariaLabel ? /* @__PURE__ */ u("span", {
332
+ "aria-hidden": "true",
333
+ children: option.label
334
+ }) : option.label, selectedOption && /* @__PURE__ */ u("span", {
335
+ class: "IncodeDropdownComposedCheckmarkIcon",
336
+ "aria-hidden": "true",
337
+ children: /* @__PURE__ */ u(CheckmarkCompactIcon, {})
338
+ })]
339
+ }, option.value);
340
+ })
341
+ })]
342
+ })]
343
+ }),
344
+ searchable && /* @__PURE__ */ u("div", {
345
+ class: "IncodeDropdownComposedLiveRegion",
346
+ role: "status",
347
+ "aria-live": "polite",
348
+ "aria-atomic": "true",
349
+ children: isOpen && searchQuery ? filteredOptions.length === 0 ? noResultsText : `${filteredOptions.length} result${filteredOptions.length !== 1 ? "s" : ""} available` : ""
350
+ }),
351
+ !suppressMessages && error && /* @__PURE__ */ u("div", {
352
+ class: "IncodeDropdownComposedErrorWrapper",
353
+ role: "alert",
354
+ "data-testid": `${id}-error-wrapper`,
355
+ children: [showErrorIcon && /* @__PURE__ */ u("div", {
356
+ class: "IncodeDropdownComposedIconWrapper",
357
+ children: /* @__PURE__ */ u(ErrorIcon, { size: 17 })
358
+ }), /* @__PURE__ */ u("p", {
359
+ id: errorId,
360
+ class: "IncodeDropdownComposedError",
361
+ children: error
362
+ })]
363
+ }),
364
+ !suppressMessages && helper && !error && /* @__PURE__ */ u("div", {
365
+ class: "IncodeDropdownComposedHelperWrapper",
366
+ "data-testid": `${id}-helper-wrapper`,
367
+ children: [showHelperIcon && /* @__PURE__ */ u("div", {
368
+ class: "IncodeDropdownComposedIconWrapper",
369
+ children: /* @__PURE__ */ u(SuccessIcon, { size: 17 })
370
+ }), /* @__PURE__ */ u("p", {
371
+ id: helperId,
372
+ class: "IncodeDropdownComposedHelper",
373
+ children: helper
374
+ })]
375
+ })
376
+ ]
377
+ });
378
+ };
379
+ //#endregion
380
+ export { DropdownComposed as t };
@@ -0,0 +1 @@
1
+ import "./dropdownComposed-BF4L-7mJ.js";