@idmission/websdk-ui 0.2.0 → 0.6.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 (200) hide show
  1. package/README.md +75 -4
  2. package/dist/DocumentCaptureView.d.ts +7 -5
  3. package/dist/DocumentCaptureView.d.ts.map +1 -1
  4. package/dist/DocumentCaptureView.js +30 -26
  5. package/dist/FaceLivenessView.d.ts +2 -2
  6. package/dist/FaceLivenessView.d.ts.map +1 -1
  7. package/dist/FaceLivenessView.js +47 -13
  8. package/dist/IdCaptureView.d.ts +27 -15
  9. package/dist/IdCaptureView.d.ts.map +1 -1
  10. package/dist/IdCaptureView.js +149 -26
  11. package/dist/SelfieCaptureView.d.ts +18 -1
  12. package/dist/SelfieCaptureView.d.ts.map +1 -1
  13. package/dist/SelfieCaptureView.js +13 -4
  14. package/dist/SignatureCaptureView.d.ts +18 -5
  15. package/dist/SignatureCaptureView.d.ts.map +1 -1
  16. package/dist/SignatureCaptureView.js +90 -15
  17. package/dist/VideoIdCaptureView.d.ts +14 -2
  18. package/dist/VideoIdCaptureView.d.ts.map +1 -1
  19. package/dist/VideoIdCaptureView.js +13 -6
  20. package/dist/bindings/useDocumentCapture.d.ts.map +1 -1
  21. package/dist/bindings/useDocumentCapture.js +2 -1
  22. package/dist/bindings/useIdCapture.d.ts.map +1 -1
  23. package/dist/bindings/useIdCapture.js +2 -1
  24. package/dist/bindings/useSelfieCapture.d.ts.map +1 -1
  25. package/dist/bindings/useSelfieCapture.js +2 -1
  26. package/dist/bindings/useSignatureCapture.d.ts.map +1 -1
  27. package/dist/bindings/useSignatureCapture.js +2 -1
  28. package/dist/bindings/useVideoIdCapture.d.ts.map +1 -1
  29. package/dist/bindings/useVideoIdCapture.js +2 -1
  30. package/dist/components/common/BrowserEdgeTint.d.ts +63 -0
  31. package/dist/components/common/BrowserEdgeTint.d.ts.map +1 -0
  32. package/dist/components/common/BrowserEdgeTint.js +111 -0
  33. package/dist/components/common/LoaderButton.d.ts +9 -0
  34. package/dist/components/common/LoaderButton.d.ts.map +1 -1
  35. package/dist/components/common/LoaderButton.js +44 -321
  36. package/dist/components/common/ScreenReaderStatus.d.ts +8 -0
  37. package/dist/components/common/ScreenReaderStatus.d.ts.map +1 -0
  38. package/dist/components/common/ScreenReaderStatus.js +18 -0
  39. package/dist/components/common/overlay.d.ts +6 -0
  40. package/dist/components/common/overlay.d.ts.map +1 -1
  41. package/dist/components/common/overlay.js +7 -1
  42. package/dist/components/debug/debug.d.ts +6 -0
  43. package/dist/components/debug/debug.d.ts.map +1 -1
  44. package/dist/components/debug/debug.js +5 -1
  45. package/dist/components/document/DocumentCaptureAutoCaptureDebugLayer.d.ts.map +1 -1
  46. package/dist/components/document/DocumentCaptureAutoCaptureDebugLayer.js +4 -5
  47. package/dist/components/document/DocumentCaptureAutoCaptureGuidance.d.ts.map +1 -1
  48. package/dist/components/document/DocumentCaptureAutoCaptureGuidance.js +40 -13
  49. package/dist/components/error/CameraAccessDeniedOverlay.d.ts +8 -1
  50. package/dist/components/error/CameraAccessDeniedOverlay.d.ts.map +1 -1
  51. package/dist/components/error/useCameraAccessDeniedReport.d.ts +12 -0
  52. package/dist/components/error/useCameraAccessDeniedReport.d.ts.map +1 -0
  53. package/dist/components/error/useCameraAccessDeniedReport.js +31 -0
  54. package/dist/components/face_liveness/FaceLivenessFailure.d.ts +4 -1
  55. package/dist/components/face_liveness/FaceLivenessFailure.d.ts.map +1 -1
  56. package/dist/components/face_liveness/FaceLivenessFailure.js +4 -2
  57. package/dist/components/face_liveness/FaceLivenessSuccess.d.ts +4 -1
  58. package/dist/components/face_liveness/FaceLivenessSuccess.d.ts.map +1 -1
  59. package/dist/components/face_liveness/FaceLivenessSuccess.js +6 -2
  60. package/dist/components/guides/IdCaptureFitGuide.d.ts +2 -0
  61. package/dist/components/guides/IdCaptureFitGuide.d.ts.map +1 -1
  62. package/dist/components/guides/IdCaptureFitGuide.js +4 -1
  63. package/dist/components/guides/IdCaptureGuideOverlay.d.ts +2 -0
  64. package/dist/components/guides/IdCaptureGuideOverlay.d.ts.map +1 -1
  65. package/dist/components/guides/IdCaptureGuideOverlay.js +3 -1
  66. package/dist/components/guides/IdCaptureGuides.d.ts +14 -0
  67. package/dist/components/guides/IdCaptureGuides.d.ts.map +1 -1
  68. package/dist/components/guides/IdCaptureGuides.js +22 -7
  69. package/dist/components/guides/IdCaptureGuidesCommon.d.ts.map +1 -1
  70. package/dist/components/guides/IdCaptureGuidesCommon.js +12 -7
  71. package/dist/components/loading/IdCaptureLoadingOverlayDefault.d.ts +9 -0
  72. package/dist/components/loading/IdCaptureLoadingOverlayDefault.d.ts.map +1 -1
  73. package/dist/components/loading/IdCaptureLoadingOverlayDefault.js +26 -4
  74. package/dist/components/loading/RingIntroScreen.d.ts.map +1 -1
  75. package/dist/components/loading/RingIntroScreen.js +4 -34
  76. package/dist/components/review/ReviewScreen.d.ts +10 -1
  77. package/dist/components/review/ReviewScreen.d.ts.map +1 -1
  78. package/dist/components/review/ReviewScreen.js +8 -8
  79. package/dist/components/review/SignatureCaptureDiagnostics.d.ts +5 -1
  80. package/dist/components/review/SignatureCaptureDiagnostics.d.ts.map +1 -1
  81. package/dist/components/review/SignatureCaptureDiagnostics.js +4 -2
  82. package/dist/components/selfie/FaceCaptureGuideOverlay.d.ts +9 -2
  83. package/dist/components/selfie/FaceCaptureGuideOverlay.d.ts.map +1 -1
  84. package/dist/components/selfie/FaceCaptureGuideOverlay.js +10 -4
  85. package/dist/components/selfie/SelfieCaptureAnimatedMask.d.ts +8 -1
  86. package/dist/components/selfie/SelfieCaptureAnimatedMask.d.ts.map +1 -1
  87. package/dist/components/selfie/SelfieCaptureAnimatedMask.js +55 -21
  88. package/dist/components/selfie/SelfieCaptureSurface.d.ts +9 -2
  89. package/dist/components/selfie/SelfieCaptureSurface.d.ts.map +1 -1
  90. package/dist/components/selfie/SelfieCaptureSurface.js +77 -16
  91. package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayDefault.d.ts +9 -0
  92. package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayDefault.d.ts.map +1 -1
  93. package/dist/components/selfie_loading/SelfieCaptureLoadingOverlayDefault.js +26 -4
  94. package/dist/flows/AuthStateContext.d.ts.map +1 -1
  95. package/dist/flows/AuthStateContext.js +2 -1
  96. package/dist/flows/CaptureProgress.d.ts +14 -0
  97. package/dist/flows/CaptureProgress.d.ts.map +1 -0
  98. package/dist/flows/CaptureProgress.js +51 -0
  99. package/dist/flows/CompositeWizard.d.ts +7 -1
  100. package/dist/flows/CompositeWizard.d.ts.map +1 -1
  101. package/dist/flows/CompositeWizard.js +6 -2
  102. package/dist/flows/CustomerBiometricsEnrollmentFlow.d.ts +3 -3
  103. package/dist/flows/CustomerBiometricsEnrollmentFlow.d.ts.map +1 -1
  104. package/dist/flows/CustomerBiometricsEnrollmentFlow.js +26 -4
  105. package/dist/flows/CustomerIdAndBiometricsEnrollmentFlow.d.ts +3 -3
  106. package/dist/flows/CustomerIdAndBiometricsEnrollmentFlow.d.ts.map +1 -1
  107. package/dist/flows/CustomerIdAndBiometricsEnrollmentFlow.js +45 -9
  108. package/dist/flows/DocumentCaptureFlow.d.ts +4 -3
  109. package/dist/flows/DocumentCaptureFlow.d.ts.map +1 -1
  110. package/dist/flows/DocumentCaptureFlow.js +14 -8
  111. package/dist/flows/FaceValidationFlow.d.ts +2 -2
  112. package/dist/flows/FaceValidationFlow.d.ts.map +1 -1
  113. package/dist/flows/FaceValidationFlow.js +7 -2
  114. package/dist/flows/FlowChassis.d.ts +19 -1
  115. package/dist/flows/FlowChassis.d.ts.map +1 -1
  116. package/dist/flows/FlowChassis.js +40 -4
  117. package/dist/flows/IdAndFaceValidationFlow.d.ts +3 -3
  118. package/dist/flows/IdAndFaceValidationFlow.d.ts.map +1 -1
  119. package/dist/flows/IdAndFaceValidationFlow.js +33 -3
  120. package/dist/flows/IdValidationFlow.d.ts +10 -5
  121. package/dist/flows/IdValidationFlow.d.ts.map +1 -1
  122. package/dist/flows/IdValidationFlow.js +32 -5
  123. package/dist/flows/SignatureKYCFlow.d.ts +43 -7
  124. package/dist/flows/SignatureKYCFlow.d.ts.map +1 -1
  125. package/dist/flows/SignatureKYCFlow.js +154 -16
  126. package/dist/flows/SubmissionProvider.d.ts +12 -3
  127. package/dist/flows/SubmissionProvider.d.ts.map +1 -1
  128. package/dist/flows/SubmissionProvider.js +142 -16
  129. package/dist/flows/VideoIdValidationFlow.d.ts +3 -5
  130. package/dist/flows/VideoIdValidationFlow.d.ts.map +1 -1
  131. package/dist/flows/VideoIdValidationFlow.js +38 -4
  132. package/dist/flows/additionalDocuments.d.ts.map +1 -1
  133. package/dist/flows/additionalDocuments.js +3 -6
  134. package/dist/flows/approval.d.ts +1 -14
  135. package/dist/flows/approval.d.ts.map +1 -1
  136. package/dist/flows/approval.js +1 -19
  137. package/dist/flows/artifacts.d.ts +1 -1
  138. package/dist/flows/artifacts.d.ts.map +1 -1
  139. package/dist/flows/artifacts.js +29 -9
  140. package/dist/flows/customerMatch/CustomerMatchCapture.d.ts +3 -2
  141. package/dist/flows/customerMatch/CustomerMatchCapture.d.ts.map +1 -1
  142. package/dist/flows/customerMatch/CustomerMatchCapture.js +3 -2
  143. package/dist/flows/customerMatch/CustomerMatchFlow.d.ts +13 -4
  144. package/dist/flows/customerMatch/CustomerMatchFlow.d.ts.map +1 -1
  145. package/dist/flows/customerMatch/CustomerMatchFlow.js +17 -12
  146. package/dist/flows/flowSettings.d.ts +11 -0
  147. package/dist/flows/flowSettings.d.ts.map +1 -0
  148. package/dist/flows/flowSettings.js +20 -0
  149. package/dist/flows/ringScreens.d.ts +1 -0
  150. package/dist/flows/ringScreens.d.ts.map +1 -1
  151. package/dist/flows/ringScreens.js +17 -2
  152. package/dist/flows/signatureStep.d.ts +6 -1
  153. package/dist/flows/signatureStep.d.ts.map +1 -1
  154. package/dist/flows/types.d.ts +120 -10
  155. package/dist/flows/types.d.ts.map +1 -1
  156. package/dist/flows/videoIdSteps.d.ts +2 -2
  157. package/dist/flows/videoIdSteps.d.ts.map +1 -1
  158. package/dist/guidance/selfieStrings.d.ts.map +1 -1
  159. package/dist/guidance/selfieStrings.js +8 -4
  160. package/dist/guidance/strings.d.ts +34 -1
  161. package/dist/guidance/strings.d.ts.map +1 -1
  162. package/dist/guidance/strings.js +39 -0
  163. package/dist/i18n/index.d.ts +5 -1
  164. package/dist/i18n/index.d.ts.map +1 -1
  165. package/dist/i18n/index.js +13 -2
  166. package/dist/i18n/locales/threeOh.d.ts.map +1 -1
  167. package/dist/i18n/locales/threeOh.js +56 -2
  168. package/dist/index.d.ts +9 -6
  169. package/dist/index.d.ts.map +1 -1
  170. package/dist/index.js +3 -0
  171. package/dist/testing/autoCaptureFrames.d.ts.map +1 -1
  172. package/dist/testing/autoCaptureFrames.js +10 -4
  173. package/dist/testing/buildSelfieState.d.ts.map +1 -1
  174. package/dist/testing/buildSelfieState.js +5 -0
  175. package/dist/testing/classNamesLeaves.js +1 -1
  176. package/dist/testing/fakeClient.d.ts +41 -2
  177. package/dist/testing/fakeClient.d.ts.map +1 -1
  178. package/dist/testing/fakeClient.js +71 -16
  179. package/dist/testing/fakeSelfieController.d.ts.map +1 -1
  180. package/dist/testing/fakeSelfieController.js +7 -0
  181. package/dist/testing/index.d.ts +1 -1
  182. package/dist/testing/index.d.ts.map +1 -1
  183. package/dist/testing/index.js +1 -1
  184. package/dist/theme/index.d.ts +10 -0
  185. package/dist/theme/index.d.ts.map +1 -1
  186. package/dist/useDocumentUpload.d.ts +63 -0
  187. package/dist/useDocumentUpload.d.ts.map +1 -0
  188. package/dist/useDocumentUpload.js +45 -0
  189. package/dist/useIdmissionClient.d.ts +24 -3
  190. package/dist/useIdmissionClient.d.ts.map +1 -1
  191. package/dist/useIdmissionClient.js +46 -0
  192. package/dist/utils/mountOnly.d.ts +25 -0
  193. package/dist/utils/mountOnly.d.ts.map +1 -0
  194. package/dist/utils/mountOnly.js +111 -0
  195. package/dist/version.d.ts +1 -1
  196. package/dist/version.js +1 -1
  197. package/package.json +10 -9
  198. package/dist/flows/autoCaptureMountGuard.d.ts +0 -22
  199. package/dist/flows/autoCaptureMountGuard.d.ts.map +0 -1
  200. package/dist/flows/autoCaptureMountGuard.js +0 -61
@@ -1,5 +1,12 @@
1
1
  import { type LoaderButtonColors } from '../common/LoaderButton';
2
2
  import { type CustomerSuppliedVerbiage } from '../../i18n';
3
+ /**
4
+ * Why the camera could not be used: `permissionDenied` when the user or the
5
+ * browser refused the permission, `unavailable` when it could not be started
6
+ * (in use by another app, blocked by the OS, or no usable camera). Passed to
7
+ * `onCameraAccessDenied` so a host can word its own screen to match.
8
+ */
9
+ export type CameraAccessDeniedReason = 'permissionDenied' | 'unavailable';
3
10
  export type CameraAccessDeniedOverlayAssets = {
4
11
  imageUrl?: string;
5
12
  };
@@ -36,7 +43,7 @@ export type CameraAccessDeniedOverlayProps = {
36
43
  * already-resolved value would silently drop component-typed verbiage,
37
44
  * since `evaluateVerbiage` reads a ReactElement as a locale map.
38
45
  */
39
- variant?: 'permissionDenied' | 'unavailable';
46
+ variant?: CameraAccessDeniedReason;
40
47
  };
41
48
  export declare const CameraAccessDeniedOverlay: ({ onRetry, assets, classNames, colors, verbiage: rawVerbiage, variant, }: CameraAccessDeniedOverlayProps) => import("react/jsx-runtime").JSX.Element;
42
49
  //# sourceMappingURL=CameraAccessDeniedOverlay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CameraAccessDeniedOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/error/CameraAccessDeniedOverlay.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAgB,KAAK,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAC9E,OAAO,EAAE,KAAK,wBAAwB,EAAmB,MAAM,YAAY,CAAA;AAE3E,MAAM,MAAM,+BAA+B,GAAG;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,mCAAmC,GAAG;IAChD,SAAS,CAAC,E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CAAA;CAClB,CAAA;AAED,MAAM,MAAM,mCAAmC,GAAG;IAChD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,+BAA+B,GAAG;IAC5C,QAAQ,CAAC,EAAE,kBAAkB,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,iCAAiC,GAAG;IAC9C,WAAW,CAAC,EAAE,wBAAwB,CAAA;IACtC,eAAe,CAAC,EAAE,wBAAwB,CAAA;IAC1C,YAAY,CAAC,EAAE,wBAAwB,CAAA;CACxC,CAAA;AAED,MAAM,MAAM,8BAA8B,GAAG;IAC3C,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,MAAM,CAAC,EAAE,+BAA+B,CAAA;IACxC,UAAU,CAAC,EAAE,mCAAmC,CAAA;IAChD,MAAM,CAAC,EAAE,+BAA+B,CAAA;IACxC,QAAQ,CAAC,EAAE,iCAAiC,CAAA;IAC5C;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,wBAAwB,CAAA;CACnC,CAAA;AAED,eAAO,MAAM,yBAAyB,GAAI,0EAOvC,8BAA8B,4CAkDhC,CAAA"}
@@ -0,0 +1,12 @@
1
+ import type { CameraAccessDeniedReason } from './CameraAccessDeniedOverlay';
2
+ /**
3
+ * Calls `onCameraAccessDenied` once per camera failure a controller reports:
4
+ * when its error code becomes one, changes to the other, or a different
5
+ * controller reports one. Not per render, and not again when StrictMode
6
+ * replays effects, since the latch only moves when what it saw changes. A
7
+ * failure seen with no handler bound is not latched, so a handler bound later
8
+ * still hears about it; one already reported stays latched while the handler
9
+ * is briefly unbound.
10
+ */
11
+ export declare function useCameraAccessDeniedReport(controller: object, errorCode: string | undefined, onCameraAccessDenied: ((reason: CameraAccessDeniedReason) => void) | undefined): void;
12
+ //# sourceMappingURL=useCameraAccessDeniedReport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCameraAccessDeniedReport.d.ts","sourceRoot":"","sources":["../../../src/components/error/useCameraAccessDeniedReport.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAA;AAQ3E;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE,wBAAwB,KAAK,IAAI,CAAC,GAAG,SAAS,GAC7E,IAAI,CAYN"}
@@ -0,0 +1,31 @@
1
+ import { useEffect, useRef } from 'react';
2
+ function reasonFor(code) {
3
+ if (code === 'CAMERA_PERMISSION_DENIED')
4
+ return 'permissionDenied';
5
+ if (code === 'CAMERA_UNAVAILABLE')
6
+ return 'unavailable';
7
+ return undefined;
8
+ }
9
+ /**
10
+ * Calls `onCameraAccessDenied` once per camera failure a controller reports:
11
+ * when its error code becomes one, changes to the other, or a different
12
+ * controller reports one. Not per render, and not again when StrictMode
13
+ * replays effects, since the latch only moves when what it saw changes. A
14
+ * failure seen with no handler bound is not latched, so a handler bound later
15
+ * still hears about it; one already reported stays latched while the handler
16
+ * is briefly unbound.
17
+ */
18
+ export function useCameraAccessDeniedReport(controller, errorCode, onCameraAccessDenied) {
19
+ const reason = reasonFor(errorCode);
20
+ const reportedRef = useRef(undefined);
21
+ useEffect(() => {
22
+ const reported = reportedRef.current;
23
+ const alreadyReported = reported?.controller === controller && reported.reason === reason;
24
+ reportedRef.current = {
25
+ controller,
26
+ reason: onCameraAccessDenied || alreadyReported ? reason : undefined,
27
+ };
28
+ if (reason && onCameraAccessDenied && !alreadyReported)
29
+ onCameraAccessDenied(reason);
30
+ }, [controller, reason, onCameraAccessDenied]);
31
+ }
@@ -20,16 +20,19 @@ export type FaceLivenessFailureColors = {
20
20
  export type FaceLivenessFailureVerbiage = {
21
21
  headingText?: CustomerSuppliedVerbiage;
22
22
  retryBtnText?: CustomerSuppliedVerbiage;
23
+ retryingBtnText?: CustomerSuppliedVerbiage;
23
24
  exitBtnText?: CustomerSuppliedVerbiage;
24
25
  };
25
26
  export type FaceLivenessFailureProps = {
26
27
  canRetry?: boolean;
27
28
  onRetryClick?: () => void;
29
+ /** Shows Retry loading, and saying so, while the camera comes back. */
30
+ retrying?: boolean;
28
31
  onExitClick?: () => void;
29
32
  assets?: FaceLivenessFailureAssets;
30
33
  classNames?: FaceLivenessFailureClassNames;
31
34
  colors?: FaceLivenessFailureColors;
32
35
  verbiage?: FaceLivenessFailureVerbiage;
33
36
  };
34
- export declare const FaceLivenessFailure: ({ canRetry, onRetryClick, onExitClick, assets, classNames, colors, verbiage: rawVerbiage, }: FaceLivenessFailureProps) => import("react/jsx-runtime").JSX.Element;
37
+ export declare const FaceLivenessFailure: ({ canRetry, onRetryClick, retrying, onExitClick, assets, classNames, colors, verbiage: rawVerbiage, }: FaceLivenessFailureProps) => import("react/jsx-runtime").JSX.Element;
35
38
  //# sourceMappingURL=FaceLivenessFailure.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FaceLivenessFailure.d.ts","sourceRoot":"","sources":["../../../src/components/face_liveness/FaceLivenessFailure.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAChE,OAAO,EAAE,KAAK,wBAAwB,EAAmB,MAAM,YAAY,CAAA;AAE3E,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IAC7B,OAAO,CAAC,EAAE,kBAAkB,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG;IACxC,WAAW,CAAC,EAAE,wBAAwB,CAAA;IACtC,YAAY,CAAC,EAAE,wBAAwB,CAAA;IACvC,WAAW,CAAC,EAAE,wBAAwB,CAAA;CACvC,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IACzB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,MAAM,CAAC,EAAE,yBAAyB,CAAA;IAClC,UAAU,CAAC,EAAE,6BAA6B,CAAA;IAC1C,MAAM,CAAC,EAAE,yBAAyB,CAAA;IAClC,QAAQ,CAAC,EAAE,2BAA2B,CAAA;CACvC,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,6FAQjC,wBAAwB,4CA8C1B,CAAA"}
1
+ {"version":3,"file":"FaceLivenessFailure.d.ts","sourceRoot":"","sources":["../../../src/components/face_liveness/FaceLivenessFailure.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAEhE,OAAO,EAAE,KAAK,wBAAwB,EAAmB,MAAM,YAAY,CAAA;AAE3E,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IAC7B,OAAO,CAAC,EAAE,kBAAkB,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG;IACxC,WAAW,CAAC,EAAE,wBAAwB,CAAA;IACtC,YAAY,CAAC,EAAE,wBAAwB,CAAA;IACvC,eAAe,CAAC,EAAE,wBAAwB,CAAA;IAC1C,WAAW,CAAC,EAAE,wBAAwB,CAAA;CACvC,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IACzB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,MAAM,CAAC,EAAE,yBAAyB,CAAA;IAClC,UAAU,CAAC,EAAE,6BAA6B,CAAA;IAC1C,MAAM,CAAC,EAAE,yBAAyB,CAAA;IAClC,QAAQ,CAAC,EAAE,2BAA2B,CAAA;CACvC,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,uGASjC,wBAAwB,4CAoD1B,CAAA"}
@@ -12,15 +12,17 @@ import { styled } from 'styled-components';
12
12
  import { ButtonsColumn, GrayOverlayContainer, OverlayImageContainer, OverlayInner, WideBorderButton, WideButton, } from '../common/overlay';
13
13
  import { DEFAULT_CDN_URL } from '../../utils/cdn';
14
14
  import { Card } from '../common/Card';
15
+ import { ScreenReaderStatus } from '../common/ScreenReaderStatus';
15
16
  import { useTranslations } from '../../i18n';
16
- export const FaceLivenessFailure = ({ canRetry = true, onRetryClick, onExitClick, assets = {}, classNames = {}, colors = {}, verbiage: rawVerbiage = {}, }) => {
17
+ export const FaceLivenessFailure = ({ canRetry = true, onRetryClick, retrying = false, onExitClick, assets = {}, classNames = {}, colors = {}, verbiage: rawVerbiage = {}, }) => {
17
18
  const imageUrl = assets.imageUrl ?? `${DEFAULT_CDN_URL}/Face_Not_Detected.svg`;
18
19
  const verbiage = useTranslations(rawVerbiage, {
19
20
  headingText: 'Live face not detected, please try again',
20
21
  retryBtnText: 'Retry',
22
+ retryingBtnText: 'Starting camera...',
21
23
  exitBtnText: 'Exit',
22
24
  });
23
- return (_jsx(GrayOverlayContainer, { className: classNames.container, children: _jsx(OverlayInner, { className: classNames.inner, children: _jsxs(Card, { children: [_jsx(ImageContainer, { className: classNames.imageContainer, children: _jsx("img", { alt: verbiage.headingText, src: imageUrl, className: classNames.image }) }), _jsx(Heading, { className: classNames.heading, children: verbiage.headingText }), _jsxs(ButtonsColumn, { className: classNames.buttonsRow, children: [canRetry && (_jsx(WideButton, { variant: "secondary", className: classNames.retryBtn, onClick: onRetryClick, colors: colors.retryBtn, finished: true, children: verbiage.retryBtnText })), _jsx(WideBorderButton, { variant: "secondary", className: classNames.exitBtn, onClick: onExitClick, colors: colors.exitBtn, finished: true, children: verbiage.exitBtnText })] })] }) }) }));
25
+ return (_jsx(GrayOverlayContainer, { className: classNames.container, children: _jsx(OverlayInner, { className: classNames.inner, children: _jsxs(Card, { children: [_jsx(ImageContainer, { className: classNames.imageContainer, children: _jsx("img", { alt: verbiage.headingText, src: imageUrl, className: classNames.image }) }), _jsx(Heading, { className: classNames.heading, children: verbiage.headingText }), _jsxs(ButtonsColumn, { className: classNames.buttonsRow, children: [_jsx(ScreenReaderStatus, { children: retrying ? verbiage.retryingBtnText : null }), canRetry && (_jsx(WideButton, { variant: "secondary", className: classNames.retryBtn, onClick: onRetryClick, colors: colors.retryBtn, finished: !retrying, children: retrying ? verbiage.retryingBtnText : verbiage.retryBtnText })), _jsx(WideBorderButton, { variant: "secondary", className: classNames.exitBtn, onClick: onExitClick, colors: colors.exitBtn, finished: true, children: verbiage.exitBtnText })] })] }) }) }));
24
26
  };
25
27
  const ImageContainer = styled(OverlayImageContainer) `
26
28
  max-height: calc(100vh - 185px);
@@ -17,15 +17,18 @@ export type FaceLivenessSuccessColors = {
17
17
  export type FaceLivenessSuccessVerbiage = {
18
18
  headingText?: CustomerSuppliedVerbiage;
19
19
  retryBtnText?: CustomerSuppliedVerbiage;
20
+ retryingBtnText?: CustomerSuppliedVerbiage;
20
21
  doneBtnText?: CustomerSuppliedVerbiage;
21
22
  };
22
23
  export type FaceLivenessSuccessProps = {
23
24
  imageUrl: string;
24
25
  onDoneClick?: () => void;
25
26
  onRetryClick?: () => void;
27
+ /** Shows Retry loading, and saying so, while the camera comes back. */
28
+ retrying?: boolean;
26
29
  classNames?: FaceLivenessSuccessClassNames;
27
30
  colors?: FaceLivenessSuccessColors;
28
31
  verbiage?: FaceLivenessSuccessVerbiage;
29
32
  };
30
- export declare const FaceLivenessSuccess: ({ imageUrl, onDoneClick, onRetryClick, classNames, colors, verbiage: rawVerbiage, }: FaceLivenessSuccessProps) => import("react/jsx-runtime").JSX.Element;
33
+ export declare const FaceLivenessSuccess: ({ imageUrl, onDoneClick, onRetryClick, retrying, classNames, colors, verbiage: rawVerbiage, }: FaceLivenessSuccessProps) => import("react/jsx-runtime").JSX.Element;
31
34
  //# sourceMappingURL=FaceLivenessSuccess.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FaceLivenessSuccess.d.ts","sourceRoot":"","sources":["../../../src/components/face_liveness/FaceLivenessSuccess.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAChE,OAAO,EAAE,KAAK,wBAAwB,EAAmB,MAAM,YAAY,CAAA;AAE3E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E,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,OAAO,CAAC,EAAE,kBAAkB,CAAA;IAC5B,QAAQ,CAAC,EAAE,kBAAkB,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,2BAA2B,GAAG;IACxC,WAAW,CAAC,EAAE,wBAAwB,CAAA;IACtC,YAAY,CAAC,EAAE,wBAAwB,CAAA;IACvC,eAAe,CAAC,EAAE,wBAAwB,CAAA;IAC1C,WAAW,CAAC,EAAE,wBAAwB,CAAA;CACvC,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IACzB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,6BAA6B,CAAA;IAC1C,MAAM,CAAC,EAAE,yBAAyB,CAAA;IAClC,QAAQ,CAAC,EAAE,2BAA2B,CAAA;CACvC,CAAA;AAED,eAAO,MAAM,mBAAmB,GAAI,+FAQjC,wBAAwB,4CA+D1B,CAAA"}
@@ -15,11 +15,13 @@ import { useCallback, useRef } from 'react';
15
15
  import { styled } from 'styled-components';
16
16
  import { ButtonsColumn, GrayOverlayContainer, OverlayInner, WideBorderButton, WideButton, } from '../common/overlay';
17
17
  import { FlexCard } from '../common/Card';
18
+ import { ScreenReaderStatus } from '../common/ScreenReaderStatus';
18
19
  import { useTranslations } from '../../i18n';
19
- export const FaceLivenessSuccess = ({ imageUrl, onDoneClick, onRetryClick, classNames = {}, colors = {}, verbiage: rawVerbiage = {}, }) => {
20
+ export const FaceLivenessSuccess = ({ imageUrl, onDoneClick, onRetryClick, retrying = false, classNames = {}, colors = {}, verbiage: rawVerbiage = {}, }) => {
20
21
  const verbiage = useTranslations(rawVerbiage, {
21
22
  headingText: 'Face liveness has been verified!',
22
23
  retryBtnText: 'Retry',
24
+ retryingBtnText: 'Starting camera...',
23
25
  doneBtnText: 'Done',
24
26
  });
25
27
  const imageContainerRef = useRef(null);
@@ -30,7 +32,9 @@ export const FaceLivenessSuccess = ({ imageUrl, onDoneClick, onRetryClick, class
30
32
  const imageHeight = e.currentTarget.getBoundingClientRect().height;
31
33
  imageContainerRef.current?.scroll(0, (imageHeight - containerHeight) / 2);
32
34
  }, []);
33
- return (_jsx(GrayOverlayContainer, { className: classNames.container, children: _jsx(OverlayInner, { className: classNames.inner, children: _jsxs(FlexCard, { children: [_jsx(ImageContainer, { className: classNames.imageContainer, ref: imageContainerRef, children: _jsx("img", { alt: verbiage.headingText, src: imageUrl, className: classNames.image, onLoad: onImageLoaded }) }), _jsx(Heading, { className: classNames.heading, children: verbiage.headingText }), _jsxs(ButtonsColumn, { className: classNames.buttonsRow, children: [_jsx(WideButton, { variant: "positive", onClick: onDoneClick, colors: colors.doneBtn, className: classNames.doneBtn, finished: true, children: verbiage.doneBtnText }), _jsx(WideBorderButton, { variant: "secondary", onClick: onRetryClick, colors: colors.retryBtn, className: classNames.retryBtn, finished: true, children: verbiage.retryBtnText })] })] }) }) }));
35
+ return (_jsx(GrayOverlayContainer, { className: classNames.container, children: _jsx(OverlayInner, { className: classNames.inner, children: _jsxs(FlexCard, { children: [_jsx(ImageContainer, { className: classNames.imageContainer, ref: imageContainerRef, children: _jsx("img", { alt: verbiage.headingText, src: imageUrl, className: classNames.image, onLoad: onImageLoaded }) }), _jsx(Heading, { className: classNames.heading, children: verbiage.headingText }), _jsxs(ButtonsColumn, { className: classNames.buttonsRow, children: [_jsx(ScreenReaderStatus, { children: retrying ? verbiage.retryingBtnText : null }), _jsx(WideButton, { variant: "positive", onClick: onDoneClick, colors: colors.doneBtn, className: classNames.doneBtn, finished: true,
36
+ // Done would race the retry the user already started.
37
+ disabled: retrying, children: verbiage.doneBtnText }), _jsx(WideBorderButton, { variant: "secondary", onClick: onRetryClick, colors: colors.retryBtn, className: classNames.retryBtn, finished: !retrying, children: retrying ? verbiage.retryingBtnText : verbiage.retryBtnText })] })] }) }) }));
34
38
  };
35
39
  const ImageContainer = styled.div `
36
40
  position: relative;
@@ -60,4 +60,6 @@ export type IdCaptureFitGuideProps = {
60
60
  classNames?: IdCaptureFitGuideClassNames;
61
61
  };
62
62
  export declare const IdCaptureFitGuide: ({ aspectRatio, maskColor, borderRadius, borderColor, borderWidth, padding, maxWidth, maxHeight, imageVisible, isMirrored, isBackToFront, portraitGuidesOnMobile, instruction, requestedAction, status, progress, guideBoxDisabled, guideBoxFollowsMask, cameraFeedMode, images, classNames, }: IdCaptureFitGuideProps) => import("react/jsx-runtime").JSX.Element;
63
+ /** The mask colour when neither the prop nor the theme sets one. */
64
+ export declare const FIT_GUIDE_MASK_DEFAULT = "#708090";
63
65
  //# sourceMappingURL=IdCaptureFitGuide.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IdCaptureFitGuide.d.ts","sourceRoot":"","sources":["../../../src/components/guides/IdCaptureFitGuide.tsx"],"names":[],"mappings":"AA0BA,OAAO,EAAE,YAAY,EAAqB,MAAM,OAAO,CAAA;AAGvD,OAAO,EACL,oBAAoB,EAEpB,+BAA+B,EAChC,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EAAmB,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC5E,OAAO,EAA+B,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAKnF,MAAM,MAAM,2BAA2B,GAAG,+BAA+B,GAAG;IAC1E,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,MAAM,CAAC,EAAE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AAO,MAAM,sBAAsB,YAAY,CAAA"}
@@ -56,7 +56,8 @@ export const IdCaptureFitGuide = ({ aspectRatio, maskColor, borderRadius = 33, b
56
56
  aspectRatio = imageAspectRatio;
57
57
  }
58
58
  if (maskColor === undefined) {
59
- maskColor = theme.idCapture?.guideOverlay?.backgroundColor ?? '#708090';
59
+ maskColor =
60
+ theme.idCapture?.guideOverlay?.backgroundColor ?? FIT_GUIDE_MASK_DEFAULT;
60
61
  }
61
62
  const progressBarIndicatorColor = theme.idCapture?.guideBox?.progressBarIndicatorColor ?? '#287ec6';
62
63
  const progressBarWidth = theme.idCapture?.guideBox?.progressBarWidth ?? borderWidth;
@@ -213,3 +214,5 @@ const CaptureAreaProgress = styled.div `
213
214
  const GuideBoxLayer = styled(CaptureAreaProgress) `
214
215
  z-index: 1000;
215
216
  `;
217
+ /** The mask colour when neither the prop nor the theme sets one. */
218
+ export const FIT_GUIDE_MASK_DEFAULT = '#708090';
@@ -97,4 +97,6 @@ export declare const GuideCenterInner: import("styled-components/dist/types").IS
97
97
  }, never> & Partial<Pick<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$isLandscape"> & {
98
98
  $isLandscape?: boolean;
99
99
  }, never>>> & string;
100
+ /** The mask colour when neither the prop nor the theme sets one. */
101
+ export declare const OVERLAY_GUIDE_MASK_DEFAULT = "rgba(0, 0, 0, 0.5)";
100
102
  //# sourceMappingURL=IdCaptureGuideOverlay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IdCaptureGuideOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/guides/IdCaptureGuideOverlay.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,YAAY,EAA6B,MAAM,OAAO,CAAA;AAG/D,OAAO,EAGL,iBAAiB,EAClB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAgB,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAErE,OAAO,EAGL,oBAAoB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,EAAE,iBAAiB,CAAA;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,oBAAoB,GAC5B,eAAe,GACf,SAAS,GACT,cAAc,GACd,eAAe,CAAA;AAEnB,eAAO,MAAM,qBAAqB,GAAI,0UAoBnC,0BAA0B,KAAG,YA0J/B,CAAA;AAkBD,eAAO,MAAM,eAAe,uVAK3B,CAAA;AAED,eAAO,MAAM,cAAc,uVAW1B,CAAA;AAED,eAAO,MAAM,WAAW;gBACV,MAAM;iBACL,MAAM;iBACN,MAAM;;gBAFP,MAAM;iBACL,MAAM;iBACN,MAAM;oBAiBpB,CAAA;AAED,eAAO,MAAM,MAAM;gBArBL,MAAM;iBACL,MAAM;iBACN,MAAM;;gBAFP,MAAM;iBACL,MAAM;iBACN,MAAM;;;;;gBAFP,MAAM;iBACL,MAAM;iBACN,MAAM;;gBAFP,MAAM;iBACL,MAAM;iBACN,MAAM;;;;oBAsBpB,CAAA;AAED,eAAO,MAAM,iBAAiB;gBAChB,MAAM;kBACJ,OAAO;;gBADT,MAAM;kBACJ,OAAO;oBAUtB,CAAA;AAED,eAAO,MAAM,iBAAiB;kBACd,MAAM;mBACL,MAAM;eACV,MAAM;;kBAFH,MAAM;mBACL,MAAM;eACV,MAAM;oBAalB,CAAA;AAED,eAAO,MAAM,SAAS,2VAIrB,CAAA;AAED,eAAO,MAAM,gBAAgB;mBACZ,OAAO;;mBAAP,OAAO;oBAWvB,CAAA"}
1
+ {"version":3,"file":"IdCaptureGuideOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/guides/IdCaptureGuideOverlay.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,YAAY,EAA6B,MAAM,OAAO,CAAA;AAG/D,OAAO,EAGL,iBAAiB,EAClB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAgB,sBA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;IACnC,eAAe,CAAC,EAAE,oBAAoB,CAAA;IACtC,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,oBAAoB,GAC5B,eAAe,GACf,SAAS,GACT,cAAc,GACd,eAAe,CAAA;AAEnB,eAAO,MAAM,qBAAqB,GAAI,0UAoBnC,0BAA0B,KAAG,YA0J/B,CAAA;AAkBD,eAAO,MAAM,eAAe,uVAK3B,CAAA;AAED,eAAO,MAAM,cAAc,uVAW1B,CAAA;AAED,eAAO,MAAM,WAAW;gBACV,MAAM;iBACL,MAAM;iBACN,MAAM;;gBAFP,MAAM;iBACL,MAAM;iBACN,MAAM;oBAiBpB,CAAA;AAED,eAAO,MAAM,MAAM;gBArBL,MAAM;iBACL,MAAM;iBACN,MAAM;;gBAFP,MAAM;iBACL,MAAM;iBACN,MAAM;;;;;gBAFP,MAAM;iBACL,MAAM;iBACN,MAAM;;gBAFP,MAAM;iBACL,MAAM;iBACN,MAAM;;;;oBAsBpB,CAAA;AAED,eAAO,MAAM,iBAAiB;gBAChB,MAAM;kBACJ,OAAO;;gBADT,MAAM;kBACJ,OAAO;oBAUtB,CAAA;AAED,eAAO,MAAM,iBAAiB;kBACd,MAAM;mBACL,MAAM;eACV,MAAM;;kBAFH,MAAM;mBACL,MAAM;eACV,MAAM;oBAalB,CAAA;AAED,eAAO,MAAM,SAAS,2VAIrB,CAAA;AAED,eAAO,MAAM,gBAAgB;mBACZ,OAAO;;mBAAP,OAAO;oBAWvB,CAAA;AAED,oEAAoE;AACpE,eAAO,MAAM,0BAA0B,uBAAuB,CAAA"}
@@ -87,7 +87,7 @@ export const GuideRegion = styled.div `
87
87
  z-index: 1000;
88
88
  background: ${(props) => props.$maskColor ??
89
89
  props.theme?.idCapture?.guideOverlay?.backgroundColor ??
90
- 'rgba(0, 0, 0, 0.5)'};
90
+ OVERLAY_GUIDE_MASK_DEFAULT};
91
91
  color: ${(props) => props.theme?.idCapture?.guideOverlay?.textColor ?? 'white'};
92
92
  text-align: center;
93
93
  ${(props) => (props.$minWidth ? `min-width: ${props.$minWidth}px;` : ``)}
@@ -135,3 +135,5 @@ export const GuideCenterInner = styled.div `
135
135
  align-items: center;
136
136
  justify-content: center;
137
137
  `;
138
+ /** The mask colour when neither the prop nor the theme sets one. */
139
+ export const OVERLAY_GUIDE_MASK_DEFAULT = 'rgba(0, 0, 0, 0.5)';
@@ -18,6 +18,20 @@ export type IdCaptureGuidesClassNames = IdCaptureFitGuideClassNames & IdCaptureG
18
18
  export type IdCaptureGuideType = 'fit' | 'overlay';
19
19
  export type IdCaptureGuidesVerbiage = {
20
20
  barcodeHeaderText?: CustomerSuppliedVerbiage;
21
+ /** The scan instruction above the guide. Defaults to the requested
22
+ * document's "Scan the front of ID" / "Scan the back of ID" / "Scan the ID
23
+ * page of passport". */
24
+ instructionText?: CustomerSuppliedVerbiage;
25
+ /** Replaces the instruction while a capture is running. Defaults to "Capturing...". */
26
+ capturingText?: CustomerSuppliedVerbiage;
27
+ /** Replaces the instruction when a capture fails. Defaults to "Capture failed!". */
28
+ captureFailedText?: CustomerSuppliedVerbiage;
29
+ /** Barcode recapture, barcode not yet close enough. Defaults to "Please
30
+ * move the barcode closer to the camera". */
31
+ guidanceBarcodeRecaptureText?: CustomerSuppliedVerbiage;
32
+ /** Barcode recapture, barcode close enough. Defaults to "Barcode capture in
33
+ * progress, please hold still". */
34
+ guidanceBarcodeRecaptureInProgressText?: CustomerSuppliedVerbiage;
21
35
  };
22
36
  export type IdCaptureGuidesProps = {
23
37
  state: IdCaptureControllerState;
@@ -1 +1 @@
1
- {"version":3,"file":"IdCaptureGuides.d.ts","sourceRoot":"","sources":["../../../src/components/guides/IdCaptureGuides.tsx"],"names":[],"mappings":"AAyEA,OAAO,EAAmB,KAAK,wBAAwB,EAA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IAC5C;iDAC6C;IAC7C,4BAA4B,CAAC,EAAE,wBAAwB,CAAA;IACvD;uCACmC;IACnC,sCAAsC,CAAC,EAAE,wBAAwB,CAAA;CAClE,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,wBAAwB,CAAA;IAC/B,YAAY,EAAE,OAAO,CAAA;IACrB,SAAS,CAAC,EAAE,kBAAkB,CAAA;IAC9B;kEAC8D;IAC9D,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,8FAA8F;IAC9F,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B;;0EAEsE;IACtE,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,2EAA2E;IAC3E,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,cAAc,CAAC,EAAE,cAAc,GAAG,YAAY,CAAA;IAC9C,MAAM,CAAC,EAAE,oBAAoB,CAAA;IAC7B,UAAU,CAAC,EAAE,yBAAyB,CAAA;IACtC,QAAQ,CAAC,EAAE,uBAAuB,CAAA;IAClC;;;;yEAIqE;IACrE,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAC1B;;0DAEsD;IACtD,sBAAsB,CAAC,EAAE,OAAO,CAAA;CACjC,CAAA;AAED,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,YAAY,EACZ,SAAiB,EACjB,gBAAwB,EACxB,mBAA2B,EAC3B,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,cAA+B,EAC/B,MAAoC,EACpC,UAAe,EACf,QAAQ,EAAE,WAAgB,EAC1B,MAAM,EAAE,cAAc,EACtB,sBAA6B,GAC9B,EAAE,oBAAoB,2CAyHtB"}
@@ -70,18 +70,25 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
70
70
  // therefore dropped from IdCaptureGuidesVerbiage (would otherwise be dead:
71
71
  // always superseded by the guidance-code string); `barcodeHeaderText`
72
72
  // remains, since the header ("SCAN THE BARCODE") has no guidance-code
73
- // equivalent and stays customizable exactly as in sdk2.
73
+ // equivalent and stays customizable exactly as in sdk2. The recapture
74
+ // message itself is customizable through the two keys sdk2 read it from,
75
+ // `guidanceBarcodeRecaptureText` / `guidanceBarcodeRecaptureInProgressText`
76
+ // (wizard :1152-1162), one per BARCODE_* code.
77
+ //
78
+ // The scan instruction takes sdk2's flat `instructionText` / `capturingText` /
79
+ // `captureFailedText` (source :65-69). IdCaptureView fills them from the
80
+ // per-document bag for the requested document, as sdk2's wizard did, so this
81
+ // router never has to know which document is being captured.
74
82
  import { useTheme } from 'styled-components';
75
83
  import { isSatisfiedCode } from '@idmission/websdk-core/idCapture';
76
- import { guidanceMessageKey, instructionKey } from '../../guidance/strings';
77
- import { useSdkTranslation, useTranslations, } from '../../i18n';
84
+ import { guidanceMessageKey, instructionKey, instructionVerbiage, } from '../../guidance/strings';
85
+ import { useTranslations, useVerbiage, } from '../../i18n';
78
86
  import { IdCaptureFitGuide, } from './IdCaptureFitGuide';
79
87
  import { IdCaptureGuideOverlay, } from './IdCaptureGuideOverlay';
80
88
  import { defaultIdCaptureGuideImages } from '../guide_images';
81
89
  import { BarcodeGuideOverlay, } from '../barcode/BarcodeGuideOverlay';
82
90
  import { BarcodeSuccessOverlay } from '../barcode/BarcodeSuccessOverlay';
83
91
  export function IdCaptureGuides({ state, isRearFacing, guideType = 'fit', guideBoxDisabled = false, guideBoxFollowsMask = false, guideBoxBorderRadius, guideBoxMaxWidth, guideBoxMaxHeight, cameraFeedMode = 'snapToGuides', images = defaultIdCaptureGuideImages, classNames = {}, verbiage: rawVerbiage = {}, status: statusOverride, portraitGuidesOnMobile = true, }) {
84
- const { t } = useSdkTranslation();
85
92
  const theme = useTheme();
86
93
  const barcodeVerbiage = useTranslations(rawVerbiage, {
87
94
  barcodeHeaderText: 'SCAN THE BARCODE',
@@ -91,9 +98,17 @@ export function IdCaptureGuides({ state, isRearFacing, guideType = 'fit', guideB
91
98
  // sets it true anywhere (IdCaptureWizard.tsx never passes
92
99
  // isBarcodeSuccess) — preserved here, unreachable, for fidelity.
93
100
  const isBarcodeSuccess = false;
94
- const instruction = isRequestingBetterBarcode
95
- ? t(guidanceMessageKey(state.rawGuidance))
96
- : t(instructionKey(state.instruction));
101
+ const instructionOverride = isRequestingBetterBarcode
102
+ ? state.rawGuidance.code === 'BARCODE_HOLD_STILL'
103
+ ? rawVerbiage.guidanceBarcodeRecaptureInProgressText
104
+ : state.rawGuidance.code === 'BARCODE_MOVE_CLOSER'
105
+ ? rawVerbiage.guidanceBarcodeRecaptureText
106
+ : undefined
107
+ : instructionVerbiage(rawVerbiage, state.instruction);
108
+ const instructionDefaultKey = isRequestingBetterBarcode
109
+ ? guidanceMessageKey(state.rawGuidance)
110
+ : instructionKey(state.instruction);
111
+ const instruction = useVerbiage(instructionOverride, instructionDefaultKey);
97
112
  const satisfiedColor = theme.idCapture?.guideBox?.satisfiedColor ?? 'green';
98
113
  const unsatisfiedColor = theme.idCapture?.guideBox?.unsatisfiedColor ?? 'white';
99
114
  // The border reads the HELD guidance code (sdk2 IdCaptureGuides.tsx
@@ -1 +1 @@
1
- {"version":3,"file":"IdCaptureGuidesCommon.d.ts","sourceRoot":"","sources":["../../../src/components/guides/IdCaptureGuidesCommon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,QAAQ,EAAuB,MAAM,OAAO,CAAA;AAMpF,eAAO,MAAM,yBAAyB;aA4C3B,iBAAiB;kBACZ,MAAM,GAAG,MAAM;mBACd,MAAM;kBACP,MAAM;kBACN,MAAM;eACT,MAAM;uBACE,OAAO;YAClB,aAAa;;iBAlDR,OAAO;kBACN,MAAM,GAAG,MAAM;gBACjB,OAAO;mBACJ,OAAO;;aAwCb,iBAAiB;kBACZ,MAAM,GAAG,MAAM;mBACd,MAAM;kBACP,MAAM;kBACN,MAAM;eACT,MAAM;uBACE,OAAO;YAClB,aAAa;;iBAlD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sEtB;AAuDD,eAAO,MAAM,kBAAkB;aA3OpB,iBAAiB;kBACZ,MAAM,GAAG,MAAM;mBACd,MAAM;kBACP,MAAM;kBACN,MAAM;eACT,MAAM;uBACE,OAAO;YAClB,aAAa;;iBAlDR,OAAO;kBACN,MAAM,GAAG,MAAM;gBACjB,OAAO;mBACJ,OAAO;;aAwCb,iBAAiB;kBACZ,MAAM,GAAG,MAAM;mBACd,MAAM;kBACP,MAAM;kBACN,MAAM;eACT,MAAM;uBACE,OAAO;YAClB,aAAa;;iBAlDR,OAAO;kBACN,MAAM,GAAG,MAAM;gBACjB,OAAO;mBACJ,OAAO;;;;;iBAoRT,MAAM;qBACF,MAAM;;aA7Od,iBAAiB;kBACZ,MAAM,GAAG,MAAM;mBACd,MAAM;kBACP,MAAM;kBACN,MAAM;eACT,MAAM;uBACE,OAAO;YAClB,aAAa;;iBAlDR,OAAO;kBACN,MAAM,GAAG,MAAM;gBACjB,OAAO;mBACJ,OAAO;;aAwCb,iBAAiB;kBACZ,MAAM,GAAG,MAAM;mBACd,MAAM;kBACP,MAAM;kBACN,MAAM;eACT,MAAM;uBACE,OAAO;YAClB,aAAa;;iBAlDR,OAAO;kBACN,MAAM,GAAG,MAAM;gBACjB,OAAO;mBACJ,OAAO;;;;;iBAoRT,MAAM;qBACF,MAAM;oBAUxB,CAAA"}
1
+ {"version":3,"file":"IdCaptureGuidesCommon.d.ts","sourceRoot":"","sources":["../../../src/components/guides/IdCaptureGuidesCommon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,QAAQ,EAAuB,MAAM,OAAO,CAAA;AAMpF,eAAO,MAAM,yBAAyB;aA4C3B,iBAAiB;kBACZ,MAAM,GAAG,MAAM;mBACd,MAAM;kBACP,MAAM;kBACN,MAAM;eACT,MAAM;uBACE,OAAO;YAClB,aAAa;;iBAlDR,OAAO;kBACN,MAAM,GAAG,MAAM;gBACjB,OAAO;mBACJ,OAAO;;aAwCb,iBAAiB;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EACX,WAAW,EACX,aAAiB,EACjB,QAAY,EACZ,aAAqB,EACrB,iBAAwB,EACxB,GAAG,KAAK,EACT,EAAE,oBAAoB,2CAsEtB;AA2DD,eAAO,MAAM,kBAAkB;aA/OpB,iBAAiB;kBACZ,MAAM,GAAG,MAAM;mBACd,MAAM;kBACP,MAAM;kBACN,MAAM;eACT,MAAM;uBACE,OAAO;YAClB,aAAa;;iBAlDR,OAAO;kBACN,MAAM,GAAG,MAAM;gBACjB,OAAO;mBACJ,OAAO;;aAwCb,iBAAiB;kBACZ,MAAM,GAAG,MAAM;mBACd,MAAM;kBACP,MAAM;kBACN,MAAM;eACT,MAAM;uBACE,OAAO;YAClB,aAAa;;iBAlDR,OAAO;kBACN,MAAM,GAAG,MAAM;gBACjB,OAAO;mBACJ,OAAO;;;;;iBAwRT,MAAM;qBACF,MAAM;;aAjPd,iBAAiB;kBACZ,MAAM,GAAG,MAAM;mBACd,MAAM;kBACP,MAAM;kBACN,MAAM;eACT,MAAM;uBACE,OAAO;YAClB,aAAa;;iBAlDR,OAAO;kBACN,MAAM,GAAG,MAAM;gBACjB,OAAO;mBACJ,OAAO;;aAwCb,iBAAiB;kBACZ,MAAM,GAAG,MAAM;mBACd,MAAM;kBACP,MAAM;kBACN,MAAM;eACT,MAAM;uBACE,OAAO;YAClB,aAAa;;iBAlDR,OAAO;kBACN,MAAM,GAAG,MAAM;gBACjB,OAAO;mBACJ,OAAO;;;;;iBAwRT,MAAM;qBACF,MAAM;oBAWxB,CAAA"}
@@ -106,11 +106,15 @@ const IdCardBorderRect = styled.rect `
106
106
  }
107
107
  `;
108
108
  // Ported dep (sdk2's video_id/IdVideoCaptureFlipIdPrompt.tsx:136-148 —
109
- // FlipImageContainer). That file isn't otherwise in this task's scope (it's
110
- // the video-capture flip prompt, a different top-level component pulling in
111
- // the store-based useCameraStore), so only the pure styled-component it
112
- // exports is relocated here, next to the IdCardGuideImageContainer it
113
- // extends. Byte-identical CSS; used by FlipIdPrompt.tsx (this task's port).
109
+ // FlipImageContainer), relocated next to the IdCardGuideImageContainer it
110
+ // extends. Used by FlipIdPrompt.tsx.
111
+ //
112
+ // Each face fills FlipIdPrompt's wrapper, which already carries the guide's
113
+ // per-viewport size. Inheriting that size again (80%/82% of the width in
114
+ // portrait) shrank the faces to 80% of the resting guide and pinned them to the
115
+ // top of a box taller than the card — visible wherever a global
116
+ // `img { max-width: 100% }` reset (e.g. Tailwind's preflight) stops the image's
117
+ // size attributes from overflowing it.
114
118
  export const FlipImageContainer = styled(IdCardGuideImageContainer) `
115
119
  backface-visibility: hidden;
116
120
  transition: transform ${(props) => props.$transitionTime}s;
@@ -118,6 +122,7 @@ export const FlipImageContainer = styled(IdCardGuideImageContainer) `
118
122
  transform-style: preserve-3d;
119
123
  position: absolute;
120
124
  display: block;
121
- top: 0;
122
- height: 100%; // todo: branch between desktop and mobile
125
+ inset: 0;
126
+ width: 100%;
127
+ height: 100%;
123
128
  `;
@@ -1,3 +1,12 @@
1
+ import { type DefaultTheme } from 'styled-components';
1
2
  import type { IdCaptureLoadingOverlayProps } from './IdCaptureLoadingOverlay';
2
3
  export declare const IdCaptureLoadingOverlayDefault: ({ state, sessionReady, now, onLoadingStarted, onLoadingProgress, onLoadingCompleted, onLoadingFailed, onDismissed, onUserCancel, instructions, rotateImage, assets, classNames, colors, verbiage: rawVerbiage, customOverlayContent, autoContinueAfterLoading, }: IdCaptureLoadingOverlayProps) => import("react/jsx-runtime").JSX.Element;
4
+ /** The overlay's background when the theme does not set one. */
5
+ export declare const LOADING_OVERLAY_BACKGROUND_DEFAULT = "#ecedf3";
6
+ /**
7
+ * The colour this overlay paints along the viewport's bottom edge, for
8
+ * `BrowserEdgeTint`. That edge is the progress row, not the background, and the
9
+ * bar is full once the models are ready.
10
+ */
11
+ export declare function loadingOverlayBottomEdgeColor(theme: DefaultTheme, modelsReady: boolean): string;
3
12
  //# sourceMappingURL=IdCaptureLoadingOverlayDefault.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IdCaptureLoadingOverlayDefault.d.ts","sourceRoot":"","sources":["../../../src/components/loading/IdCaptureLoadingOverlayDefault.tsx"],"names":[],"mappings":"AAyEA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAA;AAuB7E,eAAO,MAAM,8BAA8B,GAAI,kQAkB5C,4BAA4B,4CA8M9B,CAAA"}
1
+ {"version":3,"file":"IdCaptureLoadingOverlayDefault.d.ts","sourceRoot":"","sources":["../../../src/components/loading/IdCaptureLoadingOverlayDefault.tsx"],"names":[],"mappings":"AAkDA,OAAO,EAAoB,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAwBvE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAA;AAuB7E,eAAO,MAAM,8BAA8B,GAAI,kQAkB5C,4BAA4B,4CA8M9B,CAAA;AAoED,gEAAgE;AAChE,eAAO,MAAM,kCAAkC,YAAY,CAAA;AAK3D;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,YAAY,EACnB,WAAW,EAAE,OAAO,GACnB,MAAM,CAUR"}
@@ -53,6 +53,7 @@ import { styled, useTheme } from 'styled-components';
53
53
  import { LoadingOverlayButtonsRow, LoadingOverlayContinueButtonContainer, LoadingOverlayCustomLoadingGraphic, LoadingOverlayGuidanceMessage, LoadingOverlayHeader, LoadingOverlayImageContainer, LoadingOverlayInner, LoadingOverlayLoadingList, LoadingOverlayLoadingListContainer, LoadingOverlayLoadingListItem, LoadingOverlayProgressBar, LoadingOverlayProgressBarBackground, LoadingOverlayProgressContainer, LoadingOverlayProgressIndicator, OverlayContainer, } from '../common/overlay';
54
54
  import { DEFAULT_CDN_URL } from '../../utils/cdn';
55
55
  import { LoaderButton } from '../common/LoaderButton';
56
+ import { progressRowEdgeColor } from '../common/BrowserEdgeTint';
56
57
  import { downloadingLabel } from '../common/downloadingLabel';
57
58
  import { useTranslations } from '../../i18n';
58
59
  import { ExitCaptureButton } from '../ExitCaptureButton';
@@ -148,7 +149,8 @@ export const IdCaptureLoadingOverlayDefault = ({ state, sessionReady = true, now
148
149
  theme.idCapture?.loadingOverlay?.displayDisabledContinueBtn) && (_jsx(ContinueButton, { autoFocus: true, finished: ready, className: classNames.continueBtn, disabled: !ready, variant: "positive", colors: colors.continueBtn, onClick: handleContinue, children: ready ? verbiage.continueText : verbiage.pleaseWaitText })) })] })] }) }));
149
150
  };
150
151
  const OverlayInner = styled(LoadingOverlayInner) `
151
- background: ${(props) => props.theme?.idCapture?.loadingOverlay?.backgroundColor ?? '#ecedf3'};
152
+ background: ${(props) => props.theme?.idCapture?.loadingOverlay?.backgroundColor ??
153
+ LOADING_OVERLAY_BACKGROUND_DEFAULT};
152
154
  color: ${(props) => props.theme?.idCapture?.loadingOverlay?.textColor ?? 'black'};
153
155
  `;
154
156
  const ButtonsRow = styled(LoadingOverlayButtonsRow) `
@@ -159,13 +161,13 @@ const ButtonsRow = styled(LoadingOverlayButtonsRow) `
159
161
  `;
160
162
  const ProgressBarBackground = styled(LoadingOverlayProgressBarBackground) `
161
163
  background: ${(props) => props.theme?.idCapture?.loadingOverlay?.progressBarBackgroundColor ??
162
- 'var(--idm-color-positive-600)'};
164
+ PROGRESS_TRACK_DEFAULT};
163
165
  opacity: ${(props) => props.theme?.idCapture?.loadingOverlay?.progressBarBackgroundOpacity ??
164
- 0.75};
166
+ PROGRESS_TRACK_OPACITY_DEFAULT};
165
167
  `;
166
168
  const ProgressIndicator = styled(LoadingOverlayProgressIndicator) `
167
169
  background: ${(props) => props.theme?.idCapture?.loadingOverlay?.progressBarIndicatorColor ??
168
- 'var(--idm-color-primary-500)'};
170
+ PROGRESS_INDICATOR_DEFAULT};
169
171
  `;
170
172
  const ContinueButton = styled(LoaderButton) `
171
173
  margin: auto;
@@ -194,3 +196,23 @@ const ContinueButton = styled(LoaderButton) `
194
196
  'none'};
195
197
  }
196
198
  `;
199
+ /** The overlay's background when the theme does not set one. */
200
+ export const LOADING_OVERLAY_BACKGROUND_DEFAULT = '#ecedf3';
201
+ const PROGRESS_TRACK_DEFAULT = 'var(--idm-color-positive-600)';
202
+ const PROGRESS_TRACK_OPACITY_DEFAULT = 0.75;
203
+ const PROGRESS_INDICATOR_DEFAULT = 'var(--idm-color-primary-500)';
204
+ /**
205
+ * The colour this overlay paints along the viewport's bottom edge, for
206
+ * `BrowserEdgeTint`. That edge is the progress row, not the background, and the
207
+ * bar is full once the models are ready.
208
+ */
209
+ export function loadingOverlayBottomEdgeColor(theme, modelsReady) {
210
+ const overlay = theme.idCapture?.loadingOverlay;
211
+ return progressRowEdgeColor({
212
+ full: modelsReady,
213
+ indicator: overlay?.progressBarIndicatorColor ?? PROGRESS_INDICATOR_DEFAULT,
214
+ track: overlay?.progressBarBackgroundColor ?? PROGRESS_TRACK_DEFAULT,
215
+ trackOpacity: overlay?.progressBarBackgroundOpacity ?? PROGRESS_TRACK_OPACITY_DEFAULT,
216
+ background: overlay?.backgroundColor ?? LOADING_OVERLAY_BACKGROUND_DEFAULT,
217
+ });
218
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"RingIntroScreen.d.ts","sourceRoot":"","sources":["../../../src/components/loading/RingIntroScreen.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAgB,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAEzE,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,YAAY,CAAC,EA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;GAKG;AACH,eAAO,MAAM,eAAe,GAAI,kNAiB7B;IACD,KAAK,EAAE,SAAS,CAAA;IAChB,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,EAAE,SAAS,CAAA;IACpB,SAAS,EAAE,SAAS,CAAA;IACpB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,mBAAmB,EAAE,SAAS,CAAA;IAC9B,eAAe,EAAE,SAAS,CAAA;IAC1B,oBAAoB,EAAE,SAAS,CAAA;IAC/B,UAAU,EAAE,OAAO,CAAA;IACnB,WAAW,EAAE,SAAS,CAAA;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,UAAU,CAAC,EAAE,yBAAyB,CAAA;IACtC,YAAY,CAAC,EAAE,kBAAkB,CAAA;CAClC,4CA+CA,CAAA"}
@@ -7,15 +7,11 @@ import { LoaderButton } from '../common/LoaderButton';
7
7
  * start" button, privacy footnote. Shown before any camera permission
8
8
  * request; the button drives the native prompt via `onStart`.
9
9
  */
10
- export const RingIntroScreen = ({ title, subtitle, step1Text, step2Text, step1Emoji, step2Emoji, reassuranceChipText, startButtonText, requestingButtonText, requesting, privacyText, badgeColor, chipTint, onStart, classNames = {}, buttonColors, }) => (_jsxs(IntroLayout, { className: classNames.introPage, children: [_jsx(Badge, { "$color": badgeColor, className: classNames.introBadge, children: _jsx("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { d: "M9 3l-1.5 2H5a2 2 0 00-2 2v11a2 2 0 002 2h14a2 2 0 002-2V7a2 2 0 00-2-2h-2.5L15 3H9zm3 5.5A4.5 4.5 0 1112 17a4.5 4.5 0 010-8.5zm0 2A2.5 2.5 0 1012 15a2.5 2.5 0 000-4.5z" }) }) }), _jsx(Title, { className: classNames.introTitle, children: title }), _jsx(Subtitle, { className: classNames.introSubtitle, children: subtitle }), (step1Text || step2Text) && (_jsxs(Steps, { className: classNames.introSteps, children: [step1Text && (_jsxs(Step, { className: classNames.introStep, children: [_jsx(StepDot, { className: classNames.introStepDot, children: step1Emoji }), step1Text] })), step2Text && (_jsxs(Step, { className: classNames.introStep, children: [_jsx(StepDot, { className: classNames.introStepDot, children: step2Emoji }), step2Text] }))] })), reassuranceChipText && (_jsx(ReassuranceChip, { "$tint": chipTint, className: classNames.introReassuranceChip, children: reassuranceChipText })), _jsx(StartButton, { autoFocus: true, "$accent": badgeColor, className: classNames.introStartBtn, variant: "positive", colors: buttonColors, finished: !requesting, disabled: requesting, onClick: onStart, "data-spinner-color": badgeColor, children: requesting ? requestingButtonText : startButtonText }), _jsx(Privacy, { className: classNames.introPrivacy, children: privacyText })] }));
10
+ export const RingIntroScreen = ({ title, subtitle, step1Text, step2Text, step1Emoji, step2Emoji, reassuranceChipText, startButtonText, requestingButtonText, requesting, privacyText, badgeColor, chipTint, onStart, classNames = {}, buttonColors, }) => (_jsxs(IntroLayout, { className: classNames.introPage, children: [_jsx(Badge, { "$color": badgeColor, className: classNames.introBadge, children: _jsx("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { d: "M9 3l-1.5 2H5a2 2 0 00-2 2v11a2 2 0 002 2h14a2 2 0 002-2V7a2 2 0 00-2-2h-2.5L15 3H9zm3 5.5A4.5 4.5 0 1112 17a4.5 4.5 0 010-8.5zm0 2A2.5 2.5 0 1012 15a2.5 2.5 0 000-4.5z" }) }) }), _jsx(Title, { className: classNames.introTitle, children: title }), _jsx(Subtitle, { className: classNames.introSubtitle, children: subtitle }), (step1Text || step2Text) && (_jsxs(Steps, { className: classNames.introSteps, children: [step1Text && (_jsxs(Step, { className: classNames.introStep, children: [_jsx(StepDot, { className: classNames.introStepDot, children: step1Emoji }), step1Text] })), step2Text && (_jsxs(Step, { className: classNames.introStep, children: [_jsx(StepDot, { className: classNames.introStepDot, children: step2Emoji }), step2Text] }))] })), reassuranceChipText && (_jsx(ReassuranceChip, { "$tint": chipTint, className: classNames.introReassuranceChip, children: reassuranceChipText })), _jsx(StartButton, { autoFocus: true, "$accent": badgeColor, className: classNames.introStartBtn, variant: "positive", colors: buttonColors, finished: !requesting, disabled: requesting, onClick: onStart, children: requesting ? requestingButtonText : startButtonText }), _jsx(Privacy, { className: classNames.introPrivacy, children: privacyText })] }));
11
11
  const float = keyframes `
12
12
  0%, 100% { transform: translateY(0); }
13
13
  50% { transform: translateY(-7px); }
14
14
  `;
15
- const sweep = keyframes `
16
- from { transform: translateX(-100%); }
17
- to { transform: translateX(100%); }
18
- `;
19
15
  const IntroLayout = styled.div `
20
16
  position: absolute;
21
17
  inset: 0;
@@ -97,9 +93,7 @@ const ReassuranceChip = styled.div `
97
93
  * theme styling. The glow and the deliberately quiet focus ring derive from
98
94
  * the button's own background (--bs-btn-bg, set by the theme's bootstrap
99
95
  * block) with the intro accent as fallback for un-themed buttons. Double
100
- * ampersand outranks the base LoaderButton rules; Ladda's loading
101
- * padding-right still wins (three-selector specificity) so the spinner
102
- * keeps its room. */
96
+ * ampersand outranks the base LoaderButton rules. */
103
97
  const StartButton = styled(LoaderButton) `
104
98
  && {
105
99
  margin-top: 10px;
@@ -155,12 +149,10 @@ const StartButton = styled(LoaderButton) `
155
149
  }
156
150
 
157
151
  /* Requesting-camera state: a pale accent tint (visibly "waiting", not
158
- * the solid "go" green), deep-accent label, and an indeterminate gloss
159
- * sweep. LoaderButton's simulated 0→90% progress fill is hidden — a
160
- * permission prompt has no knowable progress. */
152
+ * the solid "go" green) and a deep-accent label. LoaderButton's loading
153
+ * bar takes the label colour. */
161
154
  &.disabled {
162
155
  opacity: 1;
163
- overflow: hidden;
164
156
  background: color-mix(
165
157
  in srgb,
166
158
  var(--bs-btn-bg, ${(props) => props.$accent}) 12%,
@@ -177,24 +169,6 @@ const StartButton = styled(LoaderButton) `
177
169
  var(--bs-btn-bg, ${(props) => props.$accent}) 18%,
178
170
  transparent
179
171
  );
180
-
181
- &::after {
182
- content: '';
183
- position: absolute;
184
- inset: 0;
185
- z-index: 1;
186
- background: linear-gradient(
187
- 100deg,
188
- transparent 30%,
189
- rgb(255 255 255 / 0.65) 50%,
190
- transparent 70%
191
- );
192
- animation: ${sweep} 1.4s ease-in-out infinite;
193
- }
194
-
195
- .ladda-progress {
196
- display: none;
197
- }
198
172
  }
199
173
 
200
174
  @media (prefers-reduced-motion: reduce) {
@@ -202,10 +176,6 @@ const StartButton = styled(LoaderButton) `
202
176
  &:active:not(.disabled) {
203
177
  transform: none;
204
178
  }
205
-
206
- &.disabled::after {
207
- display: none;
208
- }
209
179
  }
210
180
  }
211
181
  `;
@@ -1,4 +1,5 @@
1
1
  import type { CapturedDocuments, SubmissionPhase } from '@idmission/websdk-core/idCapture';
2
+ import type { LoaderButtonColors } from '../common/LoaderButton';
2
3
  import { type CustomerSuppliedVerbiage } from '../../i18n';
3
4
  import { type ReviewDiagnosticsModel } from './ReviewDiagnosticsPanel';
4
5
  export type ReviewScreenClassNames = {
@@ -14,6 +15,10 @@ export type ReviewScreenClassNames = {
14
15
  retryBtn?: string;
15
16
  submitBtn?: string;
16
17
  };
18
+ export type ReviewScreenColors = {
19
+ submitBtn?: LoaderButtonColors;
20
+ retryBtn?: LoaderButtonColors;
21
+ };
17
22
  export type ReviewScreenVerbiage = {
18
23
  headingText?: CustomerSuppliedVerbiage;
19
24
  submitText?: CustomerSuppliedVerbiage;
@@ -22,6 +27,9 @@ export type ReviewScreenVerbiage = {
22
27
  };
23
28
  export type ReviewScreenProps = {
24
29
  capturedDocuments: CapturedDocuments;
30
+ /** Show the barcode crop, including diagnostic comparison images. Defaults
31
+ * to true. Does not change the captured documents or submission. */
32
+ showBarcodeImage?: boolean;
25
33
  submission: SubmissionPhase;
26
34
  sessionReady?: boolean;
27
35
  onSubmit: () => void;
@@ -29,6 +37,7 @@ export type ReviewScreenProps = {
29
37
  diagnostics?: ReviewDiagnosticsModel;
30
38
  verbiage?: ReviewScreenVerbiage;
31
39
  classNames?: ReviewScreenClassNames;
40
+ colors?: ReviewScreenColors;
32
41
  };
33
- export declare const ReviewScreen: ({ capturedDocuments, submission, sessionReady, onSubmit, onRetry, diagnostics, verbiage: rawVerbiage, classNames, }: ReviewScreenProps) => import("react/jsx-runtime").JSX.Element;
42
+ export declare const ReviewScreen: ({ capturedDocuments, showBarcodeImage, submission, sessionReady, onSubmit, onRetry, diagnostics, verbiage: rawVerbiage, classNames, colors, }: ReviewScreenProps) => import("react/jsx-runtime").JSX.Element;
34
43
  //# sourceMappingURL=ReviewScreen.d.ts.map