@ha_tecno/live-id-sdk 2.13.0 → 2.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. package/lib/commonjs/@types/declarations.d.js +2 -0
  2. package/lib/commonjs/@types/declarations.d.js.map +1 -0
  3. package/lib/commonjs/assets/svg/exampleCalibration1.svg +9 -0
  4. package/lib/commonjs/assets/svg/exampleCalibration2.svg +9 -0
  5. package/lib/commonjs/assets/svg/fingerPrint.svg +30 -0
  6. package/lib/commonjs/assets/svg/fingerPrintWithMask.svg +34 -0
  7. package/lib/commonjs/assets/svg/selfieStick.svg +167 -0
  8. package/lib/commonjs/components/HACaptureInstructions/HACaptureInstructions.js +52 -0
  9. package/lib/commonjs/components/HACaptureInstructions/HACaptureInstructions.js.map +1 -0
  10. package/lib/commonjs/components/HACaptureInstructions/HACard/HACard.js +49 -0
  11. package/lib/commonjs/components/HACaptureInstructions/HACard/HACard.js.map +1 -0
  12. package/lib/commonjs/components/HACaptureInstructions/HACard/styles.js +37 -0
  13. package/lib/commonjs/components/HACaptureInstructions/HACard/styles.js.map +1 -0
  14. package/lib/commonjs/components/HACaptureInstructions/data.js +25 -0
  15. package/lib/commonjs/components/HACaptureInstructions/data.js.map +1 -0
  16. package/lib/commonjs/components/HACaptureInstructions/style.js +32 -0
  17. package/lib/commonjs/components/HACaptureInstructions/style.js.map +1 -0
  18. package/lib/commonjs/components/HACarouselCalibration/HACarouselCalibration.js +81 -0
  19. package/lib/commonjs/components/HACarouselCalibration/HACarouselCalibration.js.map +1 -0
  20. package/lib/commonjs/components/HACarouselCalibration/HACarouselItem/HACarouselItem.js +81 -0
  21. package/lib/commonjs/components/HACarouselCalibration/HACarouselItem/HACarouselItem.js.map +1 -0
  22. package/lib/commonjs/components/HACarouselCalibration/HACarouselItem/styles.js +49 -0
  23. package/lib/commonjs/components/HACarouselCalibration/HACarouselItem/styles.js.map +1 -0
  24. package/lib/commonjs/components/HACarouselCalibration/HAPagination/HAPagination.js +46 -0
  25. package/lib/commonjs/components/HACarouselCalibration/HAPagination/HAPagination.js.map +1 -0
  26. package/lib/commonjs/components/HACarouselCalibration/HAPagination/styles.js +22 -0
  27. package/lib/commonjs/components/HACarouselCalibration/HAPagination/styles.js.map +1 -0
  28. package/lib/commonjs/components/HACarouselCalibration/data.js +28 -0
  29. package/lib/commonjs/components/HACarouselCalibration/data.js.map +1 -0
  30. package/lib/commonjs/components/index.js +14 -0
  31. package/lib/commonjs/components/index.js.map +1 -1
  32. package/lib/commonjs/index.js +13 -0
  33. package/lib/commonjs/index.js.map +1 -1
  34. package/lib/commonjs/theme/colors.js +19 -0
  35. package/lib/commonjs/theme/colors.js.map +1 -0
  36. package/lib/commonjs/theme/theme.js +25 -0
  37. package/lib/commonjs/theme/theme.js.map +1 -0
  38. package/lib/module/@types/declarations.d.js +2 -0
  39. package/lib/module/@types/declarations.d.js.map +1 -0
  40. package/lib/module/assets/svg/exampleCalibration1.svg +9 -0
  41. package/lib/module/assets/svg/exampleCalibration2.svg +9 -0
  42. package/lib/module/assets/svg/fingerPrint.svg +30 -0
  43. package/lib/module/assets/svg/fingerPrintWithMask.svg +34 -0
  44. package/lib/module/assets/svg/selfieStick.svg +167 -0
  45. package/lib/module/components/HACaptureInstructions/HACaptureInstructions.js +45 -0
  46. package/lib/module/components/HACaptureInstructions/HACaptureInstructions.js.map +1 -0
  47. package/lib/module/components/HACaptureInstructions/HACard/HACard.js +41 -0
  48. package/lib/module/components/HACaptureInstructions/HACard/HACard.js.map +1 -0
  49. package/lib/module/components/HACaptureInstructions/HACard/styles.js +31 -0
  50. package/lib/module/components/HACaptureInstructions/HACard/styles.js.map +1 -0
  51. package/lib/module/components/HACaptureInstructions/data.js +18 -0
  52. package/lib/module/components/HACaptureInstructions/data.js.map +1 -0
  53. package/lib/module/components/HACaptureInstructions/style.js +26 -0
  54. package/lib/module/components/HACaptureInstructions/style.js.map +1 -0
  55. package/lib/module/components/HACarouselCalibration/HACarouselCalibration.js +72 -0
  56. package/lib/module/components/HACarouselCalibration/HACarouselCalibration.js.map +1 -0
  57. package/lib/module/components/HACarouselCalibration/HACarouselItem/HACarouselItem.js +73 -0
  58. package/lib/module/components/HACarouselCalibration/HACarouselItem/HACarouselItem.js.map +1 -0
  59. package/lib/module/components/HACarouselCalibration/HACarouselItem/styles.js +44 -0
  60. package/lib/module/components/HACarouselCalibration/HACarouselItem/styles.js.map +1 -0
  61. package/lib/module/components/HACarouselCalibration/HAPagination/HAPagination.js +36 -0
  62. package/lib/module/components/HACarouselCalibration/HAPagination/HAPagination.js.map +1 -0
  63. package/lib/module/components/HACarouselCalibration/HAPagination/styles.js +16 -0
  64. package/lib/module/components/HACarouselCalibration/HAPagination/styles.js.map +1 -0
  65. package/lib/module/components/HACarouselCalibration/data.js +21 -0
  66. package/lib/module/components/HACarouselCalibration/data.js.map +1 -0
  67. package/lib/module/components/index.js +3 -1
  68. package/lib/module/components/index.js.map +1 -1
  69. package/lib/module/index.js +2 -1
  70. package/lib/module/index.js.map +1 -1
  71. package/lib/module/theme/colors.js +14 -0
  72. package/lib/module/theme/colors.js.map +1 -0
  73. package/lib/module/theme/theme.js +18 -0
  74. package/lib/module/theme/theme.js.map +1 -0
  75. package/lib/typescript/src/components/HACaptureInstructions/HACaptureInstructions.d.ts +8 -0
  76. package/lib/typescript/src/components/HACaptureInstructions/HACaptureInstructions.d.ts.map +1 -0
  77. package/lib/typescript/src/components/HACaptureInstructions/HACard/HACard.d.ts +11 -0
  78. package/lib/typescript/src/components/HACaptureInstructions/HACard/HACard.d.ts.map +1 -0
  79. package/lib/typescript/src/components/HACaptureInstructions/HACard/styles.d.ts +27 -0
  80. package/lib/typescript/src/components/HACaptureInstructions/HACard/styles.d.ts.map +1 -0
  81. package/lib/typescript/src/components/HACaptureInstructions/data.d.ts +9 -0
  82. package/lib/typescript/src/components/HACaptureInstructions/data.d.ts.map +1 -0
  83. package/lib/typescript/src/components/HACaptureInstructions/style.d.ts +25 -0
  84. package/lib/typescript/src/components/HACaptureInstructions/style.d.ts.map +1 -0
  85. package/lib/typescript/src/components/HACarouselCalibration/HACarouselCalibration.d.ts +7 -0
  86. package/lib/typescript/src/components/HACarouselCalibration/HACarouselCalibration.d.ts.map +1 -0
  87. package/lib/typescript/src/components/HACarouselCalibration/HACarouselItem/HACarouselItem.d.ts +17 -0
  88. package/lib/typescript/src/components/HACarouselCalibration/HACarouselItem/HACarouselItem.d.ts.map +1 -0
  89. package/lib/typescript/src/components/HACarouselCalibration/HACarouselItem/styles.d.ts +39 -0
  90. package/lib/typescript/src/components/HACarouselCalibration/HACarouselItem/styles.d.ts.map +1 -0
  91. package/lib/typescript/src/components/HACarouselCalibration/HAPagination/HAPagination.d.ts +14 -0
  92. package/lib/typescript/src/components/HACarouselCalibration/HAPagination/HAPagination.d.ts.map +1 -0
  93. package/lib/typescript/src/components/HACarouselCalibration/HAPagination/styles.d.ts +15 -0
  94. package/lib/typescript/src/components/HACarouselCalibration/HAPagination/styles.d.ts.map +1 -0
  95. package/lib/typescript/src/components/HACarouselCalibration/data.d.ts +9 -0
  96. package/lib/typescript/src/components/HACarouselCalibration/data.d.ts.map +1 -0
  97. package/lib/typescript/src/components/index.d.ts +3 -1
  98. package/lib/typescript/src/components/index.d.ts.map +1 -1
  99. package/lib/typescript/src/index.d.ts +2 -1
  100. package/lib/typescript/src/index.d.ts.map +1 -1
  101. package/lib/typescript/src/theme/colors.d.ts +14 -0
  102. package/lib/typescript/src/theme/colors.d.ts.map +1 -0
  103. package/lib/typescript/src/theme/theme.d.ts +8 -0
  104. package/lib/typescript/src/theme/theme.d.ts.map +1 -0
  105. package/package.json +3 -1
  106. package/src/@types/declarations.d.ts +5 -0
  107. package/src/assets/svg/exampleCalibration1.svg +9 -0
  108. package/src/assets/svg/exampleCalibration2.svg +9 -0
  109. package/src/assets/svg/fingerPrint.svg +30 -0
  110. package/src/assets/svg/fingerPrintWithMask.svg +34 -0
  111. package/src/assets/svg/selfieStick.svg +167 -0
  112. package/src/components/HACaptureInstructions/HACaptureInstructions.tsx +36 -0
  113. package/src/components/HACaptureInstructions/HACard/HACard.tsx +34 -0
  114. package/src/components/HACaptureInstructions/HACard/styles.ts +30 -0
  115. package/src/components/HACaptureInstructions/data.ts +23 -0
  116. package/src/components/HACaptureInstructions/style.ts +17 -0
  117. package/src/components/HACarouselCalibration/HACarouselCalibration.tsx +71 -0
  118. package/src/components/HACarouselCalibration/HACarouselItem/HACarouselItem.tsx +53 -0
  119. package/src/components/HACarouselCalibration/HACarouselItem/styles.ts +43 -0
  120. package/src/components/HACarouselCalibration/HAPagination/HAPagination.tsx +51 -0
  121. package/src/components/HACarouselCalibration/HAPagination/styles.ts +16 -0
  122. package/src/components/HACarouselCalibration/data.ts +27 -0
  123. package/src/components/index.ts +14 -1
  124. package/src/index.tsx +5 -1
  125. package/src/theme/colors.ts +15 -0
  126. package/src/theme/theme.ts +13 -0
@@ -0,0 +1,43 @@
1
+ import { Dimensions } from "react-native";
2
+ import { StyleSheet } from "react-native";
3
+
4
+ const { width } = Dimensions.get("window");
5
+
6
+ export const styles = StyleSheet.create({
7
+ container: {
8
+ flex: 1,
9
+ width,
10
+ justifyContent: "center",
11
+ alignItems: "center",
12
+ padding: 20
13
+ },
14
+ card: {
15
+ justifyContent: "center",
16
+ minHeight: "60%",
17
+ borderRadius: 20,
18
+ gap: 20,
19
+ padding: 20
20
+ },
21
+ content: {
22
+ alignItems: "center",
23
+ justifyContent: "center",
24
+ gap: 20
25
+ },
26
+ title: {
27
+ textAlign: "center"
28
+ },
29
+ text: {
30
+ textAlign: "center"
31
+ },
32
+ containerPagination: {
33
+ alignSelf: "center"
34
+ },
35
+ containerButton: {
36
+ height: 80,
37
+ width: 80,
38
+ alignSelf: "center",
39
+ justifyContent: "center",
40
+ alignItems: "center",
41
+ borderRadius: 50
42
+ }
43
+ });
@@ -0,0 +1,51 @@
1
+ import React from "react";
2
+ import { Dimensions, View } from "react-native";
3
+ import Animated, { Extrapolation, SharedValue, interpolate, useAnimatedStyle } from "react-native-reanimated";
4
+ import { useTheme } from "../../../theme/theme";
5
+ import { styles } from "./styles";
6
+
7
+ type PaginationType = {
8
+ item: {
9
+ title: string;
10
+ text: string;
11
+ ImageComponent?: React.FC<React.SVGProps<SVGSVGElement>>;
12
+ }[];
13
+ paginationIndex: number;
14
+ scrollX: SharedValue<number>;
15
+ };
16
+
17
+ const { width } = Dimensions.get("screen");
18
+
19
+ export const HAPagination = ({ item, paginationIndex, scrollX }: PaginationType) => {
20
+ const { blue, isDark } = useTheme();
21
+ const dotWithoutFocused = isDark ? "#ffffff25" : "#00000025";
22
+
23
+ return (
24
+ <View style={styles.container}>
25
+ {item.map((_, index) => {
26
+ const pgAnimationStyle = useAnimatedStyle(() => {
27
+ const dotWidth = interpolate(
28
+ scrollX.value,
29
+ [(index - 1) * width, index * width, (index + 1) * width],
30
+ [8, 30, 8],
31
+ Extrapolation.CLAMP
32
+ );
33
+ return { width: dotWidth };
34
+ });
35
+
36
+ return (
37
+ <Animated.View
38
+ key={index}
39
+ style={[
40
+ {
41
+ backgroundColor: paginationIndex === index ? blue : dotWithoutFocused
42
+ },
43
+ styles.pagination,
44
+ pgAnimationStyle
45
+ ]}
46
+ />
47
+ );
48
+ })}
49
+ </View>
50
+ );
51
+ };
@@ -0,0 +1,16 @@
1
+ import { StyleSheet } from "react-native";
2
+
3
+ export const styles = StyleSheet.create({
4
+ container: {
5
+ flexDirection: "row",
6
+ height: 60,
7
+ justifyContent: "center",
8
+ alignItems: "center"
9
+ },
10
+ pagination: {
11
+ height: 8,
12
+ width: 8,
13
+ marginHorizontal: 2,
14
+ borderRadius: 8
15
+ }
16
+ });
@@ -0,0 +1,27 @@
1
+ import ExampleCalibration1 from "../../assets/svg/exampleCalibration1.svg";
2
+ import ExampleCalibration2 from "../../assets/svg/exampleCalibration2.svg";
3
+ import FingerPrint from "../../assets/svg/fingerPrint.svg";
4
+
5
+ const data: { title: string; ImageComponent?: React.FC<React.SVGProps<SVGSVGElement>>; text: string }[] = [
6
+ {
7
+ title: "BOAS VINDAS AO LIVEID",
8
+ text: `Antes de começarmos, precisamos garantir que seu dispositivo esteja configurado para a melhor experiência possível.\n\nSiga as etapas a seguir para calibrar a captura no seu aparelho.`
9
+ },
10
+ {
11
+ title: "Preparando para a captura perfeita!",
12
+ ImageComponent: ExampleCalibration1,
13
+ text: "Para garantir uma leitura precisa, escolha um fundo neutro, como uma parede lisa ou até mesmo uma folha de papel."
14
+ },
15
+ {
16
+ title: "Posicione-se para a melhor leitura!",
17
+ ImageComponent: ExampleCalibration2,
18
+ text: "Coloque o dedo indicador direito sobre o diagrama vermelho. Ajuste o zoom, se necessário, para um melhor encaixe."
19
+ },
20
+ {
21
+ title: "Finalizando a calibração!",
22
+ ImageComponent: FingerPrint,
23
+ text: "Certifique-se de que sua digital está bem focada. Testaremos diferentes iluminações — se a tela escurecer, não se preocupe, faz parte do processo!"
24
+ }
25
+ ];
26
+
27
+ export default data;
@@ -6,5 +6,18 @@ import CameraConfigInfo from "./CameraConfigInfo";
6
6
  import Gabarito from "./Gabarito";
7
7
  import HAText from "./Typograph/typograph";
8
8
  import Icon from "./icon/icon";
9
+ import HACarouselCalibration from "./HACarouselCalibration/HACarouselCalibration";
10
+ import HACaptureInstructions from "./HACaptureInstructions/HACaptureInstructions";
9
11
 
10
- export { DeviceNotFound, ModalMessage, RecordButton, CaptureButton, CameraConfigInfo, Gabarito, HAText, Icon };
12
+ export {
13
+ DeviceNotFound,
14
+ ModalMessage,
15
+ RecordButton,
16
+ CaptureButton,
17
+ CameraConfigInfo,
18
+ Gabarito,
19
+ HAText,
20
+ Icon,
21
+ HACarouselCalibration,
22
+ HACaptureInstructions
23
+ };
package/src/index.tsx CHANGED
@@ -6,10 +6,14 @@ import {
6
6
  RegisterOperationPointsLifeCertificate
7
7
  } from "./screens";
8
8
 
9
+ import { HACarouselCalibration, HACaptureInstructions } from "./components";
10
+
9
11
  export {
10
12
  LifeCertificate,
11
13
  FingerRegister,
12
14
  FingerAuth,
13
15
  RegisterOperationPointsBiometrics,
14
- RegisterOperationPointsLifeCertificate
16
+ RegisterOperationPointsLifeCertificate,
17
+ HACarouselCalibration,
18
+ HACaptureInstructions
15
19
  };
@@ -0,0 +1,15 @@
1
+ const light = {
2
+ backgroundColor: "#ffffff",
3
+ gray: "#F5F5F5",
4
+ text: "#000000",
5
+ blue: "#005EFF"
6
+ };
7
+
8
+ const dark = {
9
+ backgroundColor: "#000000",
10
+ gray: "#212121",
11
+ text: "#ffffff",
12
+ blue: "#005EFF"
13
+ };
14
+
15
+ export { light, dark };
@@ -0,0 +1,13 @@
1
+ import { useColorScheme } from "react-native";
2
+ import { light, dark } from "./colors";
3
+
4
+ export const useTheme = () => {
5
+ const isDark = useColorScheme() === "dark";
6
+ const theme = isDark ? dark : light;
7
+ const backgroundColor = theme.backgroundColor;
8
+ const gray = theme.gray;
9
+ const text = theme.text;
10
+ const blue = theme.blue;
11
+
12
+ return { isDark, backgroundColor, gray, text, blue };
13
+ };