@incodetech/web 2.1.1 → 2.2.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 (205) hide show
  1. package/dist/ae-signature/ae-signature.es.js +7 -4
  2. package/dist/antifraud/antifraud.es.js +6 -6
  3. package/dist/authentication/authentication.es.js +7 -7
  4. package/dist/{autoFocusTitle-CuRu2lPg.js → autoFocusTitle-gLba2mgp.js} +6 -3
  5. package/dist/{back-horizontal-hint-xTnSQbzn.js → back-horizontal-hint-BBGuJ75y.js} +1 -1
  6. package/dist/{back-vertical-hint-BWWlHfX2.js → back-vertical-hint-B9usJ5lY.js} +1 -1
  7. package/dist/base.css +425 -3290
  8. package/dist/{bottomSheet-CnWbbUAM.js → bottomSheet-Cp8DLulN.js} +7 -8
  9. package/dist/certificate-issuance/certificate-issuance.es.js +34 -87
  10. package/dist/certificate-issuance/styles.css +0 -41
  11. package/dist/{checkbox-1wUHSoaK.js → checkbox-C38Elx0O.js} +5 -5
  12. package/dist/connectionError-DAeXp8sE.js +45 -0
  13. package/dist/consent/consent.es.js +10 -12
  14. package/dist/consent/styles.css +5 -4
  15. package/dist/{countrySelector-SvUOyPo0.js → countrySelector-2t-ZTgGo.js} +3 -3
  16. package/dist/cross-document-data-match/cross-document-data-match.es.js +13 -10
  17. package/dist/curp-validation/curp-validation.es.js +28 -29
  18. package/dist/curp-validation/styles.css +47 -0
  19. package/dist/{customFields-BDsXR7A-.js → customFields-B8HQZ7Mh.js} +13 -14
  20. package/dist/{customWatchlist-CYoRNCim.js → customWatchlist-_tUmZ855.js} +9 -9
  21. package/dist/dashboardTheme-CVliZSR-.js +223 -0
  22. package/dist/{dateInputComposed-DuaofcBl.js → dateInputComposed-eRcbt_SL.js} +5 -5
  23. package/dist/dateInputComposed-ks0-opuq.js +1 -0
  24. package/dist/document-capture/document-capture.es.js +1 -1
  25. package/dist/document-capture/styles.css +85 -70
  26. package/dist/{documentCapture-DhbO-A-V.js → documentCapture-BvEGCYj-.js} +218 -136
  27. package/dist/documentCapture-DdHdRPzR.js +2 -0
  28. package/dist/{dropdownComposed-CoU0enG6.js → dropdownComposed-OHDHzt1Q.js} +18 -11
  29. package/dist/dropdownComposed-kjG4UblM.js +1 -0
  30. package/dist/dynamic-forms/styles.css +58 -6
  31. package/dist/{dynamicForms-BifGbC9F.js → dynamicForms-P-4E42IA.js} +53 -45
  32. package/dist/ekyb/ekyb.es.js +1 -1
  33. package/dist/ekyb/styles.css +1 -28
  34. package/dist/ekybModule-CiaxFHXo.js +2 -0
  35. package/dist/{ekybModule-DGnTw5UV.js → ekybModule-DmjkzVWE.js} +51 -27
  36. package/dist/ekyc/ekyc.es.js +1 -1
  37. package/dist/ekyc/styles.css +2 -2
  38. package/dist/ekycModule-BVt10kgv.js +2 -0
  39. package/dist/{ekycModule-Dxpdd0ns.js → ekycModule-Da1Fm7ai.js} +45 -19
  40. package/dist/electronic-signature/electronic-signature.es.js +1 -1
  41. package/dist/{ae-signature → electronic-signature}/styles.css +2 -2
  42. package/dist/{electronic-signature-Ueoffasr.js → electronic-signature-yamI6zHM.js} +31 -23
  43. package/dist/email/email.es.js +10 -11
  44. package/dist/{emailInput-DsLkDtER.js → emailInput-B0P2Q-pk.js} +4 -4
  45. package/dist/{expiredId-BZXLrLk-.js → expiredId-BXXE3srN.js} +6 -6
  46. package/dist/{extensibility-7sRIN0JC.js → extensibility-iJYzpW6H.js} +440 -374
  47. package/dist/extensibility.es.js +24 -28
  48. package/dist/face-match/face-match.es.js +1 -1
  49. package/dist/face-match/styles.css +9 -609
  50. package/dist/faceMatch-D4XFihTc.js +2 -0
  51. package/dist/{faceMatch-DyTBoMDm.js → faceMatch-VtEZvsen.js} +71 -79
  52. package/dist/field-comparison/field-comparison.es.js +1 -1
  53. package/dist/fieldComparison-B_r9Bal7.js +2 -0
  54. package/dist/{fieldComparison-L_knHqgw.js → fieldComparison-NLdDSOEh.js} +11 -12
  55. package/dist/finalSuccessScreen-DryADx1n.js +500 -0
  56. package/dist/fiscal-qr/fiscal-qr.es.js +12 -12
  57. package/dist/flip-animation-CvN8FLNc.js +6996 -0
  58. package/dist/flow/flow.es.js +81 -45
  59. package/dist/flow/styles.css +908 -5423
  60. package/dist/{front-horizontal-hint-B84GgTO1.js → front-horizontal-hint-D3CrWViZ.js} +1 -1
  61. package/dist/{front-vertical-hint-Bs_avngq.js → front-vertical-hint-BoLZvyx5.js} +1 -1
  62. package/dist/geolocation/geolocation.es.js +36 -13
  63. package/dist/geolocation/styles.css +1 -1
  64. package/dist/government-validation/government-validation.es.js +11 -12
  65. package/dist/{homeScreen-B6T0JVh8.js → homeScreen-Pv3v_0ji.js} +7 -9
  66. package/dist/{icons-CJJbIpBq.js → icons--ezYG2Fb.js} +92 -7
  67. package/dist/id/id.es.js +222 -52
  68. package/dist/id/styles.css +290 -10
  69. package/dist/id-back-of-card-DO593HH8.js +83 -0
  70. package/dist/id-back-of-card-vertical-DArEQ0hE.js +88 -0
  71. package/dist/id-front-of-card-Bcit7Pnq.js +308 -0
  72. package/dist/id-front-of-card-vertical-Bcr-KXcl.js +278 -0
  73. package/dist/id-laser-h-BaUHzX-d.js +480 -0
  74. package/dist/{id-laser-v-BiUXkM4x.js → id-laser-v-Dv9yEYJE.js} +7 -17
  75. package/dist/id-selfie-flow/id-selfie-flow.es.js +239 -0
  76. package/dist/id-selfie-flow/styles.css +749 -0
  77. package/dist/id-verification/id-verification.es.js +13 -9
  78. package/dist/{idOcr-WFBvqy3b.js → idOcr-gsIXHq6R.js} +14 -15
  79. package/dist/identity-reuse/identity-reuse.es.js +6 -8
  80. package/dist/identity-reuse/styles.css +1 -1
  81. package/dist/{incode-logo-57XFniXU.js → incode-logo-rGFjZHqi.js} +64 -1
  82. package/dist/incodeComponent-K9ZWg302.js +713 -0
  83. package/dist/incodeModule-CcLzar_X.js +25 -0
  84. package/dist/index.es.js +16 -5
  85. package/dist/{inputComposed-C1R2LAa3.js → inputComposed-BeROn635.js} +9 -9
  86. package/dist/inputComposed-CADVQW-o.js +1 -0
  87. package/dist/{mandatoryConsent-D0GTKu-H.js → mandatoryConsent-BtqB-FxY.js} +9 -11
  88. package/dist/{capture-CkGvdDNH.js → manualCaptureButton-quGa2ufS.js} +68 -198
  89. package/dist/manualCaptureButton-t_oIol88.js +300 -0
  90. package/dist/{modal-OxkFuuiR.js → modal-BjjJFpZu.js} +4 -4
  91. package/dist/{modal.hooks-ZrzmHAUa.js → modal.hooks-BvXzNWvY.js} +1 -1
  92. package/dist/{numberedStep-CEb-lFJm.js → numberedStep-DUs77Gy3.js} +1 -1
  93. package/dist/{optionAccessibleLabel-gfF-58Mv.js → optionAccessibleLabel-DgfHD_mx.js} +6 -6
  94. package/dist/{otpInput-CnDc6pQm.js → otpInput-D5dLXrmC.js} +72 -36
  95. package/dist/{passport-horizontal-hint-Bj0ZJY0g.js → passport-horizontal-hint-DgnU-8bl.js} +1 -1
  96. package/dist/{passport-vertical-hint-Dfk77xUJ.js → passport-vertical-hint-Dd2Wknw7.js} +1 -1
  97. package/dist/{pdf-BqtJTlor.js → pdf-BUoY_2gv.js} +1 -1
  98. package/dist/pdfViewer-CZb6obcZ.js +2 -0
  99. package/dist/{pdfViewer-B97DmT9m.js → pdfViewer-vud1VZv6.js} +5 -7
  100. package/dist/phone/phone.es.js +13 -12
  101. package/dist/{phoneInputComposed-DMiXfF-1.js → phoneInputComposed-CeVWTS_O.js} +7 -6
  102. package/dist/{processing-BeUMfdJJ.js → processing-BsvHyDWa.js} +2 -2
  103. package/dist/qe-signature/qe-signature.es.js +7 -4
  104. package/dist/{radioGroupComposed-DuQxslB2.js → radioGroupComposed-DzNGUbZQ.js} +16 -15
  105. package/dist/redirect-to-mobile/redirect-to-mobile.es.js +132 -45
  106. package/dist/redirect-to-mobile/styles.css +20 -10
  107. package/dist/{registerIncodeElement-DaNjbAwZ.js → registerIncodeElement-BduCekz5.js} +1 -1
  108. package/dist/{richText-CB1fmegc.js → richText-CTHBpZOw.js} +3 -1607
  109. package/dist/selfie/selfie.es.js +10 -10
  110. package/dist/selfie/styles.css +16 -949
  111. package/dist/signature/signature.es.js +27 -19
  112. package/dist/{ae-signature/styles2.css → signature/styles.css} +4 -4
  113. package/dist/{snackbar-DS7Mv62v.js → snackbar-C9Mqrh0e.js} +2 -2
  114. package/dist/spacer-CDlQd12V.js +2344 -0
  115. package/dist/{spinner-BMeIEK1d.js → spinner-CLZ2fz4u.js} +45 -4
  116. package/dist/statusPage--GVFSUJp.js +36 -0
  117. package/dist/{successIcon-B5mGvdx1.js → successIcon-Bj8Y9CuI.js} +1 -1
  118. package/dist/{tabs-C__chW-u.js → tabs-DweBZTV2.js} +4 -3
  119. package/dist/themes/dark.css +35 -0
  120. package/dist/themes/light.css +35 -0
  121. package/dist/{tutorial-CCfPuVKX.js → tutorial-BZZC93Ur.js} +222 -180
  122. package/dist/types/ae-signature.d.ts +91 -5
  123. package/dist/types/antifraud.d.ts +86 -3
  124. package/dist/types/authentication.d.ts +86 -3
  125. package/dist/types/certificate-issuance.d.ts +86 -3
  126. package/dist/types/consent.d.ts +86 -3
  127. package/dist/types/cross-document-data-match.d.ts +88 -4
  128. package/dist/types/curp-validation.d.ts +86 -3
  129. package/dist/types/document-capture.d.ts +88 -4
  130. package/dist/types/ekyb.d.ts +88 -4
  131. package/dist/types/ekyc.d.ts +88 -4
  132. package/dist/types/electronic-signature.d.ts +87 -4
  133. package/dist/types/email.d.ts +82 -22
  134. package/dist/types/extensibility.d.ts +157 -5
  135. package/dist/types/face-match.d.ts +84 -22
  136. package/dist/types/field-comparison.d.ts +86 -3
  137. package/dist/types/fiscal-qr.d.ts +89 -5
  138. package/dist/types/flow.d.ts +92 -2
  139. package/dist/types/geolocation.d.ts +86 -3
  140. package/dist/types/government-validation.d.ts +86 -3
  141. package/dist/types/id-selfie-flow.d.ts +161 -0
  142. package/dist/types/id-verification.d.ts +87 -4
  143. package/dist/types/id.d.ts +88 -5
  144. package/dist/types/identity-reuse.d.ts +82 -2
  145. package/dist/types/index.d.ts +106 -1
  146. package/dist/types/phone.d.ts +83 -24
  147. package/dist/types/qe-signature.d.ts +91 -5
  148. package/dist/types/redirect-to-mobile.d.ts +4 -1
  149. package/dist/types/selfie.d.ts +86 -3
  150. package/dist/types/signature.d.ts +91 -5
  151. package/dist/types/video-selfie.d.ts +83 -6
  152. package/dist/types/watchlist.d.ts +91 -5
  153. package/dist/types/workflow.d.ts +85 -2
  154. package/dist/{i18n-CU4xq8qC.js → uiConfig-B5ASPUL4.js} +26 -3
  155. package/dist/{useModuleLoader-Bi26kJbg.js → useModuleLoader-D_YpuVsS.js} +37 -248
  156. package/dist/{vendor-preact-DThS2ZQ_.js → vendor-preact-mvwZ8mJj.js} +1 -1
  157. package/dist/{verificationResult-BWWkmeiA.js → verificationResult-B8HwR07t.js} +26 -15
  158. package/dist/video-selfie/styles.css +349 -1202
  159. package/dist/video-selfie/video-selfie.es.js +120 -381
  160. package/dist/watchlist/watchlist.es.js +16 -13
  161. package/dist/{watchlistForBusiness-D2Uo_TwF.js → watchlistForBusiness-D8Is99bZ.js} +12 -13
  162. package/dist/workflow/styles.css +501 -3977
  163. package/dist/workflow/workflow.es.js +25 -18
  164. package/package.json +22 -20
  165. package/dist/button-Dz6AsbmF.js +0 -40
  166. package/dist/cameraView-DIEzM5ru.js +0 -47
  167. package/dist/cpf-ocr/cpf-ocr.es.js +0 -2
  168. package/dist/cpf-ocr/styles.css +0 -45
  169. package/dist/cpfOcr-B79245-3.js +0 -2
  170. package/dist/cpfOcr-BhxT-lRN.js +0 -92
  171. package/dist/dateInputComposed-DRzZi6uy.js +0 -1
  172. package/dist/documentCapture-DXYYyxZl.js +0 -2
  173. package/dist/dropdownComposed-BAoxIIsE.js +0 -1
  174. package/dist/ekybModule-C6Nttked.js +0 -2
  175. package/dist/ekycModule-CDIEjI6V.js +0 -2
  176. package/dist/errorIcon-BA4T6iy-.js +0 -26
  177. package/dist/faceMatch-B_HvxLm_.js +0 -2
  178. package/dist/fieldComparison-DfNEuEE5.js +0 -2
  179. package/dist/flip-animation-CZYSUtMm.js +0 -6983
  180. package/dist/hooks-CNu7o-v8.js +0 -186
  181. package/dist/id-laser-h-CzPegPMn.js +0 -467
  182. package/dist/incodeComponent-CfzJGETt.js +0 -64
  183. package/dist/incodeModule-B-4_3JrK.js +0 -13
  184. package/dist/inputComposed-BaY5q9WM.js +0 -1
  185. package/dist/loadingIcon-B0ysgiNq.js +0 -148
  186. package/dist/page-DidH_RkX.js +0 -171
  187. package/dist/spinner-BCDCoi9C.js +0 -1
  188. package/dist/statusPage-Bk8nJwXV.js +0 -28
  189. package/dist/transitionSpinner-CuNCqHNi.js +0 -30
  190. package/dist/types/cpf-ocr.d.ts +0 -12
  191. package/dist/typography-BZIpjo97.js +0 -45
  192. package/dist/uiConfig-D2_wawvr.js +0 -25
  193. /package/dist/{aligndevicelottie-DFscByAI.js → aligndevicelottie-CfoZ5Uus.js} +0 -0
  194. /package/dist/{back-tutorial-cI_4VHmE.js → back-tutorial-BHyRHyET.js} +0 -0
  195. /package/dist/{backdevicelottie-COyhTrxM.js → backdevicelottie-yKkczgFy.js} +0 -0
  196. /package/dist/{blurdevicelottie-BLVeJHEG.js → blurdevicelottie-8BbophdM.js} +0 -0
  197. /package/dist/{browser-ponyfill-Df13Th-G.js → browser-ponyfill-CBjGwwPW.js} +0 -0
  198. /package/dist/{defineProperty-Qjefk7Uf.js → defineProperty-BbpBna-2.js} +0 -0
  199. /package/dist/{frontdevicelottie-B4tE2PYQ.js → frontdevicelottie-CFcahVLk.js} +0 -0
  200. /package/dist/{glaredevicelottie-D1pR73sx.js → glaredevicelottie-Cnvah0kz.js} +0 -0
  201. /package/dist/{id-tutorial-DwO90SAm.js → id-tutorial-BOOsXlAJ.js} +0 -0
  202. /package/dist/{lottie_light-C6B2ec41.js → lottie_light-Bv56F2Ae.js} +0 -0
  203. /package/dist/{passport-tutorial-D9JNsMsM.js → passport-tutorial-CeSup6m9.js} +0 -0
  204. /package/dist/{requiredLabelHint-D0RhuMed.js → requiredLabelHint-Dx0WS2cR.js} +0 -0
  205. /package/dist/{selfieTutorial-pB-N-fj5.js → selfieTutorial-CYa8bq6B.js} +0 -0
@@ -1,19 +1,19 @@
1
- import { n as useTranslation } from "./i18n-CU4xq8qC.js";
2
- import { c as z, h as q, l as A, m as g, o as P, p as d, v as u, x as k } from "./vendor-preact-DThS2ZQ_.js";
3
- import { a as useIsMobileDeviceWidth, c as useModuleTerminalCallbacks, u as useManager } from "./hooks-CNu7o-v8.js";
4
- import { t as IncodeComponent } from "./incodeComponent-CfzJGETt.js";
5
- import { n as cn, r as Spacer } from "./loadingIcon-B0ysgiNq.js";
6
- import { t as Page } from "./page-DidH_RkX.js";
7
- import { _ as ProgressBar, d as CameraOverlay, l as CaptureFooter, u as CameraOverlayHeader, v as Overlay } from "./extensibility-7sRIN0JC.js";
8
- import { t as Spinner } from "./spinner-BMeIEK1d.js";
9
- import { t as Button } from "./button-Dz6AsbmF.js";
10
- import { a as FileIcon, p as CameraIcon, r as LockIcon } from "./icons-CJJbIpBq.js";
11
- import { t as SuccessIcon } from "./successIcon-B5mGvdx1.js";
12
- import { a as ErrorContent } from "./tutorial-CCfPuVKX.js";
13
- import { t as BottomSheet } from "./bottomSheet-CnWbbUAM.js";
14
- import { n as CameraFrame, t as CameraView } from "./cameraView-DIEzM5ru.js";
15
- import { i as Permissions } from "./capture-CkGvdDNH.js";
16
- import { t as registerIncodeModuleElement } from "./incodeModule-B-4_3JrK.js";
1
+ import { i as useTranslation } from "./uiConfig-B5ASPUL4.js";
2
+ import { S as k, c as z, h as q, l as A, m as g, o as P, p as d, v as u } from "./vendor-preact-mvwZ8mJj.js";
3
+ import { _ as useModuleTerminalCallbacks, m as useIsMobileDeviceWidth, o as Page, r as withStandaloneModuleBootstrap, t as IncodeComponent, y as useManager } from "./incodeComponent-K9ZWg302.js";
4
+ import { s as Asset, t as Spacer, u as cn } from "./spacer-CDlQd12V.js";
5
+ import { t as Spinner } from "./spinner-CLZ2fz4u.js";
6
+ import { r as Button } from "./incode-logo-rGFjZHqi.js";
7
+ import { b as ProgressBar, d as CaptureFooter, f as CameraOverlayHeader, p as CameraOverlay } from "./extensibility-iJYzpW6H.js";
8
+ import { a as FileIcon, g as CameraIcon, r as LockIcon } from "./icons--ezYG2Fb.js";
9
+ import { t as SuccessIcon } from "./successIcon-Bj8Y9CuI.js";
10
+ import { t as Modal } from "./modal-BjjJFpZu.js";
11
+ import { i as ErrorContent } from "./tutorial-BZZC93Ur.js";
12
+ import { t as AutoFocusTitle } from "./autoFocusTitle-gLba2mgp.js";
13
+ import { t as BottomSheet } from "./bottomSheet-Cp8DLulN.js";
14
+ import { a as CameraView, o as CameraFrame } from "./manualCaptureButton-t_oIol88.js";
15
+ import { n as Permissions } from "./manualCaptureButton-quGa2ufS.js";
16
+ import { t as registerIncodeModuleElement } from "./incodeModule-CcLzar_X.js";
17
17
  import { createDocumentCaptureManager } from "@incodetech/core/document-capture";
18
18
  //#region src/modules/document-capture/documentCameraView.tsx
19
19
  function captureFrameFromVideo(video) {
@@ -26,7 +26,7 @@ function captureFrameFromVideo(video) {
26
26
  ctx.drawImage(video, 0, 0);
27
27
  return canvas.toDataURL("image/jpeg", .92).split(",")[1] ?? null;
28
28
  }
29
- var DocumentCameraView = ({ stream, manager, onOpenHelp }) => {
29
+ var DocumentCameraView = ({ stream, manager, onOpenHelp, helpButtonRef }) => {
30
30
  const { t } = useTranslation();
31
31
  const videoRef = A(null);
32
32
  const handleCapture = q(() => {
@@ -38,26 +38,30 @@ var DocumentCameraView = ({ stream, manager, onOpenHelp }) => {
38
38
  const file = new File([blob], "document.jpg", { type: "image/jpeg" });
39
39
  manager.setFile(file, `data:image/jpeg;base64,${base64}`);
40
40
  }, [manager]);
41
- return /* @__PURE__ */ u(CameraView, {
42
- stream,
43
- videoRef,
44
- "data-testid": "document-capture-camera",
45
- children: /* @__PURE__ */ u(CameraOverlay, { children: [
46
- /* @__PURE__ */ u(CameraOverlayHeader, {
47
- title: t("documentCapture.camera.title"),
48
- subtitle: t("documentCapture.camera.subtitle")
49
- }),
50
- /* @__PURE__ */ u(Spacer, { size: 16 }),
51
- /* @__PURE__ */ u(CameraFrame, { variant: "fill" }),
52
- /* @__PURE__ */ u(CaptureFooter, {
53
- onOpenHelp,
54
- onCapture: handleCapture,
55
- isManualCapture: true,
56
- captureAriaLabel: t("manualCapture.ariaLabel"),
57
- helpAriaLabel: t("documentCapture.needHelp.open"),
58
- encryptionLabel: t("encryptionLabel.encryptedPhotos")
59
- })
60
- ] })
41
+ return /* @__PURE__ */ u("main", {
42
+ class: "IncodeDocumentCaptureCameraPage",
43
+ children: /* @__PURE__ */ u(CameraView, {
44
+ stream,
45
+ videoRef,
46
+ "data-testid": "document-capture-camera",
47
+ children: /* @__PURE__ */ u(CameraOverlay, { children: [
48
+ /* @__PURE__ */ u(CameraOverlayHeader, {
49
+ title: t("documentCapture.camera.title"),
50
+ subtitle: t("documentCapture.camera.subtitle")
51
+ }),
52
+ /* @__PURE__ */ u(Spacer, { size: 16 }),
53
+ /* @__PURE__ */ u(CameraFrame, { variant: "fill" }),
54
+ /* @__PURE__ */ u(CaptureFooter, {
55
+ onOpenHelp,
56
+ helpButtonRef,
57
+ onCapture: handleCapture,
58
+ isManualCapture: true,
59
+ captureAriaLabel: t("manualCapture.ariaLabel"),
60
+ helpAriaLabel: t("documentCapture.needHelp.open"),
61
+ encryptionLabel: t("encryptionLabel.encryptedPhotos")
62
+ })
63
+ ] })
64
+ })
61
65
  });
62
66
  };
63
67
  //#endregion
@@ -201,44 +205,53 @@ var ISSUES = [
201
205
  Icon: DirtyIcon
202
206
  }
203
207
  ];
204
- var DocumentCommonIssues = ({ onClose }) => {
208
+ var DocumentCommonIssues = ({ onClose, returnFocusRef }) => {
205
209
  const { t } = useTranslation();
206
- return /* @__PURE__ */ u(Overlay, {
207
- "aria-labelledby": "document-common-issues-title",
208
- children: [
209
- /* @__PURE__ */ u("h2", {
210
- id: "document-common-issues-title",
211
- class: "IncodeDocumentCommonIssuesTitle",
212
- children: t("commonIssues.commonIssues")
213
- }),
214
- /* @__PURE__ */ u(Spacer, { size: 32 }),
215
- /* @__PURE__ */ u("div", {
216
- class: "IncodeDocumentCommonIssuesCards",
217
- children: ISSUES.map((issue) => /* @__PURE__ */ u("div", {
218
- class: "IncodeDocumentCommonIssuesCard",
219
- children: [/* @__PURE__ */ u("div", {
220
- class: "IncodeDocumentCommonIssuesCardIcon",
221
- children: /* @__PURE__ */ u(issue.Icon, {})
222
- }), /* @__PURE__ */ u("div", {
223
- class: "IncodeDocumentCommonIssuesCardText",
224
- children: [/* @__PURE__ */ u("h5", {
225
- class: "IncodeDocumentCommonIssuesCardTitle",
226
- children: t(issue.titleKey)
227
- }), /* @__PURE__ */ u("p", {
228
- class: "IncodeDocumentCommonIssuesCardBody",
229
- children: t(issue.bodyKey)
210
+ return /* @__PURE__ */ u(Modal.Root, {
211
+ open: true,
212
+ returnFocusRef,
213
+ onOpenChange: (open) => {
214
+ if (!open) onClose();
215
+ },
216
+ class: "IncodeDocumentCommonIssuesFullScreen",
217
+ hasBackdrop: false,
218
+ children: /* @__PURE__ */ u(Modal.Content, {
219
+ class: "IncodeDocumentCommonIssuesContent",
220
+ children: [
221
+ /* @__PURE__ */ u(Modal.TitleSection, { children: /* @__PURE__ */ u(Modal.Title, {
222
+ class: "IncodeDocumentCommonIssuesTitle",
223
+ children: t("commonIssues.commonIssues")
224
+ }) }),
225
+ /* @__PURE__ */ u("div", {
226
+ class: "IncodeDocumentCommonIssuesCards",
227
+ children: ISSUES.map((issue) => /* @__PURE__ */ u("div", {
228
+ class: "IncodeDocumentCommonIssuesCard",
229
+ children: [/* @__PURE__ */ u("div", {
230
+ class: "IncodeDocumentCommonIssuesCardIcon",
231
+ children: /* @__PURE__ */ u(issue.Icon, {})
232
+ }), /* @__PURE__ */ u("div", {
233
+ class: "IncodeDocumentCommonIssuesCardText",
234
+ children: [/* @__PURE__ */ u("h3", {
235
+ class: "IncodeDocumentCommonIssuesCardTitle",
236
+ children: t(issue.titleKey)
237
+ }), /* @__PURE__ */ u("p", {
238
+ class: "IncodeDocumentCommonIssuesCardBody",
239
+ children: t(issue.bodyKey)
240
+ })]
230
241
  })]
231
- })]
232
- }, issue.titleKey))
233
- }),
234
- /* @__PURE__ */ u("div", {
235
- class: "IncodeDocumentCommonIssuesButtons",
236
- children: /* @__PURE__ */ u(Button, {
237
- onClick: onClose,
238
- children: t("commonIssues.tryAgain")
242
+ }, issue.titleKey))
243
+ }),
244
+ /* @__PURE__ */ u(Modal.Actions, {
245
+ class: "IncodeDocumentCommonIssuesButtons",
246
+ children: /* @__PURE__ */ u(Button, {
247
+ onClick: onClose,
248
+ class: "IncodeDocumentCommonIssuesTryAgain",
249
+ "data-testid": "document-capture-common-issues-close-button",
250
+ children: t("commonIssues.tryAgain")
251
+ })
239
252
  })
240
- })
241
- ]
253
+ ]
254
+ })
242
255
  });
243
256
  };
244
257
  //#endregion
@@ -264,8 +277,8 @@ var PreviewFooter = ({ manager }) => {
264
277
  var PreviewHeader = ({ isFilePdf }) => {
265
278
  const { t } = useTranslation();
266
279
  return /* @__PURE__ */ u(k, { children: [
267
- /* @__PURE__ */ u("h2", {
268
- class: "IncodeDocumentCaptureReviewTitle",
280
+ /* @__PURE__ */ u(AutoFocusTitle, {
281
+ className: "IncodeDocumentCaptureReviewTitle",
269
282
  children: isFilePdf ? t("documentCapture.review.titlePdfUpload") : t("documentCapture.review.titleCaptured")
270
283
  }),
271
284
  /* @__PURE__ */ u(Spacer, { size: 12 }),
@@ -292,8 +305,8 @@ var SuccessHeader = () => {
292
305
  return /* @__PURE__ */ u(k, { children: [
293
306
  /* @__PURE__ */ u(SuccessIcon, { size: 30 }),
294
307
  /* @__PURE__ */ u(Spacer, { size: 16 }),
295
- /* @__PURE__ */ u("h2", {
296
- class: "IncodeDocumentCaptureReviewTitle",
308
+ /* @__PURE__ */ u(AutoFocusTitle, {
309
+ className: "IncodeDocumentCaptureReviewTitle",
297
310
  children: t("documentCapture.review.successTitle")
298
311
  })
299
312
  ] });
@@ -303,23 +316,35 @@ var SuccessHeader = () => {
303
316
  var UploadingHeader = ({ progress, isFilePdf }) => {
304
317
  const { t } = useTranslation();
305
318
  const label = isFilePdf ? t("documentCapture.review.uploading") : t("documentCapture.review.analyzing");
306
- return /* @__PURE__ */ u(k, { children: [/* @__PURE__ */ u(Spacer, { size: 8 }), /* @__PURE__ */ u(ProgressBar, {
307
- progress,
308
- label
309
- })] });
319
+ return /* @__PURE__ */ u(k, { children: [
320
+ /* @__PURE__ */ u(Spacer, { size: 8 }),
321
+ /* @__PURE__ */ u(ProgressBar, {
322
+ progress,
323
+ labelledById: "document-capture-uploading-title"
324
+ }),
325
+ /* @__PURE__ */ u(Spacer, { size: 24 }),
326
+ /* @__PURE__ */ u(AutoFocusTitle, {
327
+ id: "document-capture-uploading-title",
328
+ className: "IncodeProgressBarLabel",
329
+ children: label
330
+ })
331
+ ] });
310
332
  };
311
333
  //#endregion
312
334
  //#region src/modules/document-capture/documentReview.tsx
313
- var PdfViewer = z(() => import("./pdfViewer-B97DmT9m.js").then((n) => n.n).then((m) => ({ default: m.PdfViewer })));
335
+ var PdfViewer = z(() => import("./pdfViewer-CZb6obcZ.js").then((m) => ({ default: m.PdfViewer })));
314
336
  var DocumentReview = ({ state, manager }) => {
315
337
  const { t } = useTranslation();
316
- if (state.status === "failure") return /* @__PURE__ */ u(ErrorContent, {
317
- "data-testid": "document-capture-error",
318
- title: t("documentCapture.review.error.title"),
319
- description: state.attemptsRemaining <= 0 ? t("notifications.noTries") : t("documentCapture.review.error.description"),
320
- attemptsRemaining: state.attemptsRemaining,
321
- onButtonClick: () => manager.retry()
322
- });
338
+ if (state.status === "failure") {
339
+ const noMoreAttempts = state.attemptsRemaining <= 0;
340
+ return /* @__PURE__ */ u(ErrorContent, {
341
+ "data-testid": "document-capture-error",
342
+ title: noMoreAttempts ? t("documentCapture.review.error.exhaustedTitle") : t("documentCapture.review.error.title"),
343
+ description: noMoreAttempts ? t("documentCapture.review.error.exhaustedDescription") : t("documentCapture.review.error.description"),
344
+ attemptsRemaining: state.attemptsRemaining,
345
+ onButtonClick: noMoreAttempts ? () => manager.continue() : () => manager.retry()
346
+ });
347
+ }
323
348
  const isFilePdf = state.fileType === "application/pdf" || state.imageBase64.startsWith("data:application/pdf");
324
349
  const { fileName } = state;
325
350
  const isPreview = state.status === "preview";
@@ -352,14 +377,14 @@ var DocumentReview = ({ state, manager }) => {
352
377
  isFilePdf ? /* @__PURE__ */ u(k, { children: [/* @__PURE__ */ u("div", {
353
378
  class: "IncodeDocumentCapturePdfCard",
354
379
  children: [/* @__PURE__ */ u("div", {
355
- class: "ImageDocumentCapturePdfPreviewContainer",
380
+ class: "IncodeImageDocumentCapturePdfPreviewContainer",
356
381
  children: /* @__PURE__ */ u(P, {
357
382
  fallback: null,
358
383
  children: /* @__PURE__ */ u(PdfViewer, {
359
384
  url: state.imageBase64,
360
385
  mode: "thumbnail",
361
386
  "aria-label": t("documentCapture.review.titlePdfUpload"),
362
- className: "ImageDocumentCapturePdfPreview"
387
+ className: "IncodeImageDocumentCapturePdfPreview"
363
388
  })
364
389
  })
365
390
  }), /* @__PURE__ */ u("p", {
@@ -370,7 +395,7 @@ var DocumentReview = ({ state, manager }) => {
370
395
  class: "IncodeDocumentCaptureReviewImageContainer",
371
396
  children: /* @__PURE__ */ u("img", {
372
397
  src: state.imageBase64,
373
- alt: "",
398
+ alt: t("documentCapture.review.titlePdfUpload"),
374
399
  class: cn("IncodeDocumentCaptureReviewImage", showSuccessChrome && "IncodeDocumentCaptureSuccessBorder"),
375
400
  "data-testid": "document-capture-review-image"
376
401
  })
@@ -595,7 +620,7 @@ var SvgDocumentCaptureTutorial = (props) => /* @__PURE__ */ u("svg", {
595
620
  });
596
621
  //#endregion
597
622
  //#region src/modules/document-capture/documentCaptureBottomSheet.tsx
598
- var DocumentCaptureBottomSheet = ({ isOpen, onClose, onCameraClick, onUploadClick, cameraOptionTestId, uploadOptionTestId }) => {
623
+ var DocumentCaptureBottomSheet = ({ isOpen, onClose, onCameraClick, onUploadClick, cameraOptionTestId, uploadOptionTestId, returnFocusRef }) => {
599
624
  const { t } = useTranslation();
600
625
  const labelledById = g();
601
626
  if (!isOpen) return null;
@@ -603,6 +628,7 @@ var DocumentCaptureBottomSheet = ({ isOpen, onClose, onCameraClick, onUploadClic
603
628
  isOpen,
604
629
  onClose,
605
630
  labelledById,
631
+ returnFocusRef,
606
632
  children: /* @__PURE__ */ u("div", {
607
633
  class: "IncodeDocumentCaptureBottomSheetOptions",
608
634
  children: [/* @__PURE__ */ u("button", {
@@ -636,22 +662,44 @@ function fileToBase64(file) {
636
662
  }
637
663
  //#endregion
638
664
  //#region src/modules/document-capture/documentTutorial.tsx
639
- var DocumentTutorial = ({ manager, title: titleProp, text: textProp, allowSkipDocumentCapture, captureMode, error, pageNumber }) => {
665
+ var DocumentTutorial = ({ manager, title: titleProp, text: textProp, allowSkipDocumentCapture, onlyCapture, onlyUpload, methodSelectionOpen, error, pageNumber, onlyPdf = false, directFilePick = false }) => {
640
666
  const { t } = useTranslation();
641
- const isMobileWidth = useIsMobileDeviceWidth();
642
667
  const fileInputRef = A(null);
643
- const [isBottomSheetOpen, setIsBottomSheetOpen] = d(false);
668
+ const primaryButtonRef = A(null);
669
+ const fileAccept = onlyPdf ? "application/pdf" : "image/*,application/pdf";
670
+ const isCaptureOnly = onlyCapture;
671
+ const isUploadOnly = onlyUpload;
672
+ const isBoth = !onlyCapture && !onlyUpload;
644
673
  const prefix = pageNumber > 1 ? "documentCapture.tutorial.multiPageDocument" : "documentCapture.tutorial";
674
+ const subtitleKey = pageNumber > 1 ? `${prefix}.subtitle` : isCaptureOnly ? "documentCapture.tutorial.captureOnlySubtitle" : isUploadOnly ? "documentCapture.tutorial.uploadOnlySubtitle" : "documentCapture.tutorial.subtitle";
645
675
  const title = titleProp?.trim() ? titleProp : t(`${prefix}.title`);
646
- const text = textProp?.trim() ? textProp : t(`${prefix}.subtitle`);
647
- const showBottomSheet = captureMode === "camera" && isMobileWidth;
648
- const closeBottomSheet = q(() => setIsBottomSheetOpen(false), []);
676
+ const text = textProp?.trim() ? textProp : t(subtitleKey);
649
677
  const openFilePicker = () => {
650
678
  fileInputRef.current?.click();
651
679
  };
652
680
  const handlePrimaryClick = () => {
653
- if (showBottomSheet) setIsBottomSheetOpen(true);
654
- else openFilePicker();
681
+ if (directFilePick) {
682
+ openFilePicker();
683
+ return;
684
+ }
685
+ if (isCaptureOnly) {
686
+ manager.capture();
687
+ return;
688
+ }
689
+ if (isUploadOnly) {
690
+ manager.openMethodSelection();
691
+ openFilePicker();
692
+ return;
693
+ }
694
+ manager.openMethodSelection();
695
+ };
696
+ const handleSelectorUpload = () => {
697
+ manager.selectUploadMethod();
698
+ openFilePicker();
699
+ };
700
+ const handlePickerDismissed = () => {
701
+ if (isUploadOnly) manager.closeMethodSelection();
702
+ else if (isBoth) manager.deselectUploadMethod();
655
703
  };
656
704
  const handleFileChange = async (e) => {
657
705
  const target = e.target;
@@ -659,14 +707,13 @@ var DocumentTutorial = ({ manager, title: titleProp, text: textProp, allowSkipDo
659
707
  if (file) {
660
708
  const base64 = await fileToBase64(file);
661
709
  manager.setFile(file, base64);
662
- if (showBottomSheet) closeBottomSheet();
663
- }
710
+ } else handlePickerDismissed();
664
711
  target.value = "";
665
712
  };
666
- const handleCameraClick = () => {
667
- closeBottomSheet();
668
- manager.capture();
713
+ const handleFileCancel = () => {
714
+ handlePickerDismissed();
669
715
  };
716
+ const primaryLabel = isCaptureOnly ? t("documentCapture.tutorial.captureDocument") : isUploadOnly ? t("documentCapture.tutorial.uploadDocument") : t("documentCapture.tutorial.continue");
670
717
  return /* @__PURE__ */ u(k, { children: [/* @__PURE__ */ u(Page, {
671
718
  className: "IncodeDocumentCapturePageTutorial",
672
719
  title,
@@ -676,18 +723,25 @@ var DocumentTutorial = ({ manager, title: titleProp, text: textProp, allowSkipDo
676
723
  /* @__PURE__ */ u("input", {
677
724
  ref: fileInputRef,
678
725
  type: "file",
679
- accept: "image/*,application/pdf",
726
+ accept: fileAccept,
680
727
  onChange: handleFileChange,
728
+ onCancel: handleFileCancel,
681
729
  "aria-hidden": true,
682
730
  tabIndex: -1,
683
- class: "IncodeDocumentCaptureFileInput"
731
+ class: "IncodeDocumentCaptureFileInput",
732
+ "data-testid": "document-capture-file-input"
684
733
  }),
685
734
  /* @__PURE__ */ u("div", {
686
735
  class: "IncodeDocumentCaptureTutorialContent",
687
736
  children: /* @__PURE__ */ u("div", {
688
737
  class: "IncodeDocumentCaptureTutorialIllustration",
689
738
  "aria-hidden": true,
690
- children: /* @__PURE__ */ u(SvgDocumentCaptureTutorial, { class: "IncodeDocumentCaptureTutorialImage" })
739
+ "data-testid": "document-capture-tutorial-illustration",
740
+ children: /* @__PURE__ */ u(Asset, {
741
+ name: "documentCapture.tutorial",
742
+ class: "IncodeDocumentCaptureTutorialImage",
743
+ default: SvgDocumentCaptureTutorial
744
+ })
691
745
  })
692
746
  }),
693
747
  error ? /* @__PURE__ */ u("p", {
@@ -698,9 +752,10 @@ var DocumentTutorial = ({ manager, title: titleProp, text: textProp, allowSkipDo
698
752
  /* @__PURE__ */ u("div", {
699
753
  class: "IncodeDocumentCaptureActions",
700
754
  children: [/* @__PURE__ */ u(Button, {
755
+ ref: primaryButtonRef,
701
756
  onClick: handlePrimaryClick,
702
757
  "data-testid": "document-capture-continue-button",
703
- children: t("documentCapture.tutorial.continue")
758
+ children: primaryLabel
704
759
  }), allowSkipDocumentCapture ? /* @__PURE__ */ u("div", {
705
760
  class: "IncodeDocumentCaptureSkipWrapper",
706
761
  children: /* @__PURE__ */ u(Button, {
@@ -712,25 +767,28 @@ var DocumentTutorial = ({ manager, title: titleProp, text: textProp, allowSkipDo
712
767
  }) : null]
713
768
  })
714
769
  ]
715
- }), showBottomSheet ? /* @__PURE__ */ u(DocumentCaptureBottomSheet, {
716
- isOpen: isBottomSheetOpen,
717
- onClose: closeBottomSheet,
718
- onCameraClick: handleCameraClick,
719
- onUploadClick: openFilePicker,
770
+ }), isBoth ? /* @__PURE__ */ u(DocumentCaptureBottomSheet, {
771
+ isOpen: methodSelectionOpen,
772
+ onClose: () => manager.closeMethodSelection(),
773
+ onCameraClick: () => manager.capture(),
774
+ onUploadClick: handleSelectorUpload,
720
775
  cameraOptionTestId: "camera-option",
721
- uploadOptionTestId: "file-option"
776
+ uploadOptionTestId: "file-option",
777
+ returnFocusRef: primaryButtonRef
722
778
  }) : null] });
723
779
  };
724
780
  //#endregion
725
781
  //#region src/modules/document-capture/nextDocumentPage.tsx
726
- var NextDocumentPage = ({ manager, nextPageType, captureMode }) => {
782
+ var NextDocumentPage = ({ manager, nextPageType, onlyUpload, onlyPdf = false }) => {
727
783
  const { t } = useTranslation();
728
784
  const isMobileWidth = useIsMobileDeviceWidth();
729
785
  const fileInputRef = A(null);
786
+ const primaryButtonRef = A(null);
730
787
  const [isBottomSheetOpen, setIsBottomSheetOpen] = d(false);
788
+ const fileAccept = onlyPdf ? "application/pdf" : "image/jpeg,image/png";
731
789
  const prefix = "documentCapture.tutorial.multiPageDocument";
732
790
  const subtitle = t(nextPageType === "optional" ? `${prefix}.optionalPage.subtitle` : `${prefix}.subtitle`);
733
- const showBottomSheet = captureMode === "camera" && isMobileWidth;
791
+ const showBottomSheet = !onlyUpload && isMobileWidth;
734
792
  const closeBottomSheet = q(() => setIsBottomSheetOpen(false), []);
735
793
  const openFilePicker = () => {
736
794
  fileInputRef.current?.click();
@@ -763,7 +821,7 @@ var NextDocumentPage = ({ manager, nextPageType, captureMode }) => {
763
821
  /* @__PURE__ */ u("input", {
764
822
  ref: fileInputRef,
765
823
  type: "file",
766
- accept: "image/jpeg,image/png",
824
+ accept: fileAccept,
767
825
  onChange: handleNextPageFileChange,
768
826
  "aria-hidden": true,
769
827
  tabIndex: -1,
@@ -774,10 +832,15 @@ var NextDocumentPage = ({ manager, nextPageType, captureMode }) => {
774
832
  children: /* @__PURE__ */ u("div", {
775
833
  class: "IncodeDocumentCaptureTutorialIllustration",
776
834
  "aria-hidden": true,
777
- children: /* @__PURE__ */ u(SvgDocumentCaptureTutorial, { class: "IncodeDocumentCaptureTutorialImage" })
835
+ children: /* @__PURE__ */ u(Asset, {
836
+ name: "documentCapture.tutorial",
837
+ class: "IncodeDocumentCaptureTutorialImage",
838
+ default: SvgDocumentCaptureTutorial
839
+ })
778
840
  })
779
841
  }),
780
842
  /* @__PURE__ */ u(Button, {
843
+ ref: primaryButtonRef,
781
844
  onClick: handlePrimaryClick,
782
845
  "data-testid": "document-capture-add-next-page-button",
783
846
  children: t("documentCapture.button.nextPage")
@@ -796,7 +859,8 @@ var NextDocumentPage = ({ manager, nextPageType, captureMode }) => {
796
859
  onCameraClick: handleCameraClick,
797
860
  onUploadClick: openFilePicker,
798
861
  cameraOptionTestId: "next-page-camera-option",
799
- uploadOptionTestId: "next-page-upload-document-option"
862
+ uploadOptionTestId: "next-page-upload-document-option",
863
+ returnFocusRef: primaryButtonRef
800
864
  }) : null] });
801
865
  };
802
866
  //#endregion
@@ -805,7 +869,7 @@ var DocumentCaptureLoading = ({ title }) => {
805
869
  return /* @__PURE__ */ u(Page, {
806
870
  hideHeader: true,
807
871
  hideFooterBranding: true,
808
- className: "IncodeDocumentCapturePage",
872
+ className: "IncodeDocumentCaptureLoadingPage",
809
873
  children: /* @__PURE__ */ u("div", {
810
874
  class: "IncodeDocumentCaptureCentered",
811
875
  children: /* @__PURE__ */ u(Spinner, {
@@ -817,10 +881,14 @@ var DocumentCaptureLoading = ({ title }) => {
817
881
  };
818
882
  //#endregion
819
883
  //#region src/modules/document-capture/documentCapture.tsx
820
- var DocumentCaptureContent = ({ config, onFinish, onError }) => {
821
- const [state, manager] = useManager(() => createDocumentCaptureManager({ config }));
822
- const [isCommonIssuesOpen, setIsCommonIssuesOpen] = d(false);
884
+ var DocumentCaptureContent = ({ config, manager: externalManager, onFinish, onError }) => {
885
+ const [state, manager] = useManager(() => {
886
+ if (externalManager) return externalManager;
887
+ if (!config) throw new Error("DocumentCapture config is required when no manager is provided");
888
+ return createDocumentCaptureManager({ config });
889
+ }, { manageLifecycle: !externalManager });
823
890
  const { t } = useTranslation();
891
+ const helpButtonRef = A(null);
824
892
  useModuleTerminalCallbacks({
825
893
  status: state.status,
826
894
  onFinish,
@@ -832,36 +900,48 @@ var DocumentCaptureContent = ({ config, onFinish, onError }) => {
832
900
  title: state.title,
833
901
  text: state.text,
834
902
  allowSkipDocumentCapture: state.allowSkipDocumentCapture,
835
- captureMode: state.captureMode,
903
+ onlyCapture: state.onlyCapture,
904
+ onlyUpload: state.onlyUpload,
905
+ methodSelectionOpen: state.methodSelectionOpen,
906
+ onlyPdf: state.onlyPdf,
836
907
  error: state.error,
837
908
  pageNumber: state.pageNumber
838
909
  });
839
910
  if (state.status === "nextPage") return /* @__PURE__ */ u(NextDocumentPage, {
840
911
  manager,
841
912
  nextPageType: state.nextPageType,
842
- captureMode: state.captureMode
913
+ onlyUpload: state.onlyUpload,
914
+ onlyPdf: state.onlyPdf
843
915
  });
844
- if (state.status === "capturing" && state.captureMode === "file") return /* @__PURE__ */ u(DocumentTutorial, {
916
+ if (state.status === "capturing" && (state.captureMethod === "file" || state.captureMethod === "gallery")) return /* @__PURE__ */ u(DocumentTutorial, {
845
917
  manager,
846
- title: config.title,
847
- text: config.text,
918
+ title: config?.title,
919
+ text: config?.text,
848
920
  allowSkipDocumentCapture: false,
849
- captureMode: "file",
921
+ onlyCapture: false,
922
+ onlyUpload: true,
923
+ methodSelectionOpen: false,
924
+ onlyPdf: state.onlyPdf,
850
925
  error: state.error,
851
- pageNumber: state.pageNumber
926
+ pageNumber: state.pageNumber,
927
+ directFilePick: true
852
928
  });
853
929
  if (state.status === "permissions") return /* @__PURE__ */ u(Permissions, {
854
930
  manager,
855
931
  permissionStatus: state.permissionStatus
856
932
  });
857
933
  if (state.status === "initializingCamera") return /* @__PURE__ */ u(DocumentCaptureLoading, {});
858
- if (state.status === "capturing" && state.captureMode === "camera") {
934
+ if (state.status === "capturing") {
859
935
  if (!state.stream) return /* @__PURE__ */ u(DocumentCaptureLoading, {});
860
936
  return /* @__PURE__ */ u(k, { children: [/* @__PURE__ */ u(DocumentCameraView, {
861
937
  stream: state.stream,
862
938
  manager,
863
- onOpenHelp: () => setIsCommonIssuesOpen(true)
864
- }), isCommonIssuesOpen ? /* @__PURE__ */ u(DocumentCommonIssues, { onClose: () => setIsCommonIssuesOpen(false) }) : null] });
939
+ onOpenHelp: () => manager.openHelp(),
940
+ helpButtonRef
941
+ }), state.helpOpen ? /* @__PURE__ */ u(DocumentCommonIssues, {
942
+ onClose: () => manager.closeHelp(),
943
+ returnFocusRef: helpButtonRef
944
+ }) : null] });
865
945
  }
866
946
  if (state.status === "finalizing") return /* @__PURE__ */ u(DocumentCaptureLoading, { title: t("common.processing") });
867
947
  if (state.status === "preview" || state.status === "uploading" || state.status === "success" || state.status === "failure") return /* @__PURE__ */ u(DocumentReview, {
@@ -870,13 +950,15 @@ var DocumentCaptureContent = ({ config, onFinish, onError }) => {
870
950
  });
871
951
  return null;
872
952
  };
873
- var DocumentCapture = ({ config, onFinish, onError }) => {
874
- return /* @__PURE__ */ u(IncodeComponent, { children: config ? /* @__PURE__ */ u(DocumentCaptureContent, {
953
+ var DocumentCaptureWithLocalConfig = ({ config, manager, onFinish, onError }) => {
954
+ return /* @__PURE__ */ u(IncodeComponent, { children: config || manager ? /* @__PURE__ */ u(DocumentCaptureContent, {
875
955
  config,
956
+ manager,
876
957
  onFinish,
877
958
  onError
878
959
  }) : null });
879
960
  };
961
+ var DocumentCapture = withStandaloneModuleBootstrap(DocumentCaptureWithLocalConfig, "DOCUMENT_CAPTURE", { supportsExternalManager: true });
880
962
  registerIncodeModuleElement(DocumentCapture, "incode-document-capture");
881
963
  //#endregion
882
964
  export { DocumentCapture as t };
@@ -0,0 +1,2 @@
1
+ import { t as DocumentCapture } from "./documentCapture-BvEGCYj-.js";
2
+ export { DocumentCapture };
@@ -1,8 +1,8 @@
1
- import { _ as y, l as A, p as d, v as u, x as k } from "./vendor-preact-DThS2ZQ_.js";
2
- import { n as cn } from "./loadingIcon-B0ysgiNq.js";
3
- import { t as ErrorIcon } from "./errorIcon-BA4T6iy-.js";
4
- import { l as ChevronDown, n as SearchIcon, o as CloseIcon, u as CheckmarkCompactIcon } from "./icons-CJJbIpBq.js";
5
- import { t as SuccessIcon } from "./successIcon-B5mGvdx1.js";
1
+ import { S as k, _ as y, l as A, p as d, v as u } from "./vendor-preact-mvwZ8mJj.js";
2
+ import { u as cn } from "./spacer-CDlQd12V.js";
3
+ import { n as ErrorIcon } from "./incode-logo-rGFjZHqi.js";
4
+ import { f as ChevronDown, l as CloseIcon, n as SearchIcon, p as CheckmarkCompactIcon } from "./icons--ezYG2Fb.js";
5
+ import { t as SuccessIcon } from "./successIcon-Bj8Y9CuI.js";
6
6
  //#region src/shared/dropdownComposed/dropdownComposed.tsx
7
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, class: className, "aria-label": ariaLabel, "data-testid": dataTestId }) => {
8
8
  const [isOpen, setIsOpen] = d(false);
@@ -222,16 +222,16 @@ var DropdownComposed = ({ id, label, labelHint, placeholder = "Choose an option"
222
222
  onKeyDown: handleKeyboardNavigation,
223
223
  tabIndex: disabled ? -1 : tabIndex ?? 0,
224
224
  disabled,
225
- role: "combobox",
225
+ role: searchable ? void 0 : "combobox",
226
226
  "aria-haspopup": "listbox",
227
227
  "aria-expanded": isOpen ? "true" : "false",
228
228
  "aria-disabled": disabled ? "true" : void 0,
229
- "aria-required": required ? "true" : void 0,
230
- "aria-invalid": error ? "true" : void 0,
229
+ "aria-required": !searchable && required ? "true" : void 0,
230
+ "aria-invalid": !searchable && error ? "true" : void 0,
231
231
  "aria-labelledby": label ? `${labelId} ${valueId}` : ariaLabel ? void 0 : valueId,
232
232
  "aria-label": !label ? ariaLabel : void 0,
233
233
  "aria-controls": isOpen ? listboxId : void 0,
234
- "aria-activedescendant": isOpen && highlightedIndex >= 0 ? `${id}-option-${highlightedIndex}` : void 0,
234
+ "aria-activedescendant": !searchable && isOpen && highlightedIndex >= 0 ? `${id}-option-${highlightedIndex}` : void 0,
235
235
  "aria-describedby": describedByIds || void 0,
236
236
  "data-error": error ? "true" : void 0,
237
237
  "data-focused": isFocused || isOpen ? "true" : void 0,
@@ -268,6 +268,8 @@ var DropdownComposed = ({ id, label, labelHint, placeholder = "Choose an option"
268
268
  children: [/* @__PURE__ */ u("input", {
269
269
  ref: searchInputRef,
270
270
  type: "text",
271
+ id: `${id}-search`,
272
+ "data-testid": `${id}-search`,
271
273
  class: "IncodeDropdownComposedSearchInput",
272
274
  value: searchQuery,
273
275
  onInput: (e) => {
@@ -276,11 +278,16 @@ var DropdownComposed = ({ id, label, labelHint, placeholder = "Choose an option"
276
278
  },
277
279
  onKeyDown: handleSearchKeyDown,
278
280
  placeholder: searchPlaceholder,
279
- role: "searchbox",
281
+ role: "combobox",
280
282
  "aria-autocomplete": "list",
283
+ "aria-expanded": "true",
281
284
  "aria-controls": listboxId,
282
285
  "aria-activedescendant": highlightedIndex >= 0 ? `${id}-option-${highlightedIndex}` : void 0,
283
- "aria-label": searchPlaceholder,
286
+ "aria-required": required ? "true" : void 0,
287
+ "aria-invalid": error ? "true" : void 0,
288
+ "aria-labelledby": label ? labelId : void 0,
289
+ "aria-label": !label ? ariaLabel ?? searchPlaceholder : void 0,
290
+ "aria-describedby": describedByIds || void 0,
284
291
  autocomplete: "off"
285
292
  }), searchQuery ? /* @__PURE__ */ u("button", {
286
293
  type: "button",