react-native-biometric-verifier 0.0.18 → 0.0.20

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.
@@ -2,7 +2,7 @@ import React, { useState } from 'react';
2
2
  import { View, Text, Image, StyleSheet, Platform } from 'react-native';
3
3
  import Icon from 'react-native-vector-icons/MaterialIcons';
4
4
  import PropTypes from 'prop-types';
5
- import { COLORS } from '../utils/constants';
5
+ import { Global } from '../utils/Global';
6
6
 
7
7
  export const Card = ({ employeeData, apiurl }) => {
8
8
  const [imageError, setImageError] = useState(false);
@@ -44,7 +44,7 @@ export const Card = ({ employeeData, apiurl }) => {
44
44
  {/* Verified Badge */}
45
45
  <View style={styles.badgeWrapper}>
46
46
  <View style={styles.badge}>
47
- <Icon name="verified-user" size={16} color={COLORS.success} />
47
+ <Icon name="verified-user" size={16} color={Global.AppTheme.success} />
48
48
  <Text style={styles.badgeText}>Identity Verified</Text>
49
49
  </View>
50
50
  </View>
@@ -82,7 +82,7 @@ const styles = StyleSheet.create({
82
82
  height: 110,
83
83
  borderRadius: 55,
84
84
  borderWidth: 3,
85
- borderColor: COLORS.primary,
85
+ borderColor: Global.AppTheme.primary,
86
86
  overflow: 'hidden',
87
87
  justifyContent: 'center',
88
88
  alignItems: 'center',
@@ -100,12 +100,12 @@ const styles = StyleSheet.create({
100
100
  fontSize: 20,
101
101
  fontWeight: '600',
102
102
  marginTop: 15,
103
- color: COLORS.light,
103
+ color: Global.AppTheme.light,
104
104
  fontFamily: Platform.OS === 'ios' ? 'Helvetica Neue' : 'sans-serif-medium',
105
105
  },
106
106
  id: {
107
107
  fontSize: 15,
108
- color: COLORS.gray,
108
+ color: Global.AppTheme.gray,
109
109
  marginTop: 5,
110
110
  fontFamily: Platform.OS === 'ios' ? 'Helvetica Neue' : 'sans-serif',
111
111
  },
@@ -127,7 +127,7 @@ const styles = StyleSheet.create({
127
127
  },
128
128
  badgeText: {
129
129
  fontSize: 13,
130
- color: COLORS.light,
130
+ color: Global.AppTheme.light,
131
131
  marginLeft: 6,
132
132
  fontFamily: Platform.OS === 'ios' ? 'Helvetica Neue' : 'sans-serif',
133
133
  },
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect, useRef } from 'react';
2
2
  import { View, Text, Animated, StyleSheet, Platform } from 'react-native';
3
- import { COLORS } from '../utils/constants';
3
+ import { Global } from '../utils/Global';
4
4
 
5
5
  export const CountdownTimer = ({ duration, currentTime }) => {
6
6
  const progress = useRef(new Animated.Value(1)).current;
@@ -45,8 +45,8 @@ export const CountdownTimer = ({ duration, currentTime }) => {
45
45
 
46
46
  // Change color when < 10 seconds
47
47
  const isEnding = currentTime <= 10;
48
- const circleColor = isEnding ? 'red' : COLORS.light;
49
- const textColor = isEnding ? 'red' : COLORS.light;
48
+ const circleColor = isEnding ? 'red' : Global.AppTheme.light;
49
+ const textColor = isEnding ? 'red' : Global.AppTheme.light;
50
50
 
51
51
  return (
52
52
  <View style={styles.container}>
@@ -2,7 +2,7 @@ import React, { useEffect, useRef } from 'react';
2
2
  import { Animated, Text, Platform, StyleSheet } from 'react-native';
3
3
  import Icon from 'react-native-vector-icons/MaterialIcons';
4
4
  import PropTypes from 'prop-types';
5
- import { COLORS } from '../utils/constants';
5
+ import { Global } from '../utils/Global';
6
6
 
7
7
  export const Notification = ({ notification, fadeAnim, slideAnim }) => {
8
8
  if (!notification || typeof notification !== 'object') {
@@ -15,9 +15,9 @@ export const Notification = ({ notification, fadeAnim, slideAnim }) => {
15
15
 
16
16
  // Icon and color mapping
17
17
  const iconMap = {
18
- success: { name: 'check-circle', color: COLORS.success },
19
- error: { name: 'error', color: COLORS.error },
20
- info: { name: 'info', color: COLORS.info },
18
+ success: { name: 'check-circle', color: Global.AppTheme.success },
19
+ error: { name: 'error', color: Global.AppTheme.error },
20
+ info: { name: 'info', color: Global.AppTheme.info },
21
21
  };
22
22
 
23
23
  const { name: iconName, color: iconColor } = iconMap[type] || iconMap.info;
@@ -123,7 +123,7 @@ const styles = StyleSheet.create({
123
123
  width: '100%',
124
124
  flexDirection: 'row',
125
125
  alignItems: 'center',
126
- backgroundColor: COLORS.dark,
126
+ backgroundColor: Global.AppTheme.dark,
127
127
  shadowColor: '#000',
128
128
  shadowOffset: { width: 0, height: 2 },
129
129
  shadowOpacity: 0.1,
@@ -135,7 +135,7 @@ const styles = StyleSheet.create({
135
135
  },
136
136
  message: {
137
137
  fontSize: 14,
138
- color: COLORS.light,
138
+ color: Global.AppTheme.light,
139
139
  fontWeight: '500',
140
140
  flex: 1,
141
141
  fontFamily: Platform.OS === 'ios' ? 'Helvetica Neue' : 'sans-serif',
@@ -2,7 +2,7 @@
2
2
  import React from 'react';
3
3
  import { View, Text, StyleSheet } from 'react-native';
4
4
  import Icon from 'react-native-vector-icons/MaterialIcons';
5
- import { COLORS } from '../utils/constants';
5
+ import { Global } from '../utils/Global';
6
6
 
7
7
  const StepIndicator = ({ currentStep, qrscan }) => {
8
8
  return (
@@ -16,8 +16,8 @@ const StepIndicator = ({ currentStep, qrscan }) => {
16
16
  currentStep === "Identity Verification" ||
17
17
  currentStep === "Location Verification" ||
18
18
  currentStep === "Complete"
19
- ? COLORS.primary
20
- : COLORS.light
19
+ ? Global.AppTheme.primary
20
+ : Global.AppTheme.light
21
21
  }
22
22
  style={styles.statusIcon}
23
23
  />
@@ -44,8 +44,8 @@ const StepIndicator = ({ currentStep, qrscan }) => {
44
44
  color={
45
45
  currentStep === "Location Verification" ||
46
46
  currentStep === "Complete"
47
- ? COLORS.primary
48
- : COLORS.light
47
+ ? Global.AppTheme.primary
48
+ : Global.AppTheme.light
49
49
  }
50
50
  style={styles.statusIcon}
51
51
  />
@@ -81,7 +81,7 @@ const styles = StyleSheet.create({
81
81
  },
82
82
  statusText: {
83
83
  fontSize: 12,
84
- color: COLORS.light,
84
+ color: Global.AppTheme.light,
85
85
  opacity: 0.6,
86
86
  },
87
87
  statusTextActive: {
@@ -91,7 +91,7 @@ const styles = StyleSheet.create({
91
91
  statusSeparator: {
92
92
  width: 40,
93
93
  height: 1,
94
- backgroundColor: COLORS.light,
94
+ backgroundColor: Global.AppTheme.light,
95
95
  opacity: 0.3,
96
96
  marginHorizontal: 15,
97
97
  },
@@ -1,5 +1,5 @@
1
1
  import { useRef, useState, useEffect, useCallback } from 'react';
2
- import { COUNTDOWN_DURATION } from '../utils/constants';
2
+ import { Global } from '../utils/Global';
3
3
 
4
4
  /**
5
5
  * Custom hook for a countdown timer with pause/resume functionality.
@@ -8,9 +8,9 @@ import { COUNTDOWN_DURATION } from '../utils/constants';
8
8
  * @returns {Object} countdown, startCountdown, resetCountdown, pauseCountdown, resumeCountdown
9
9
  */
10
10
  export const useCountdown = (onExpire) => {
11
- const [countdown, setCountdown] = useState(COUNTDOWN_DURATION);
11
+ const [countdown, setCountdown] = useState(Global.CountdownDuration);
12
12
  const timerRef = useRef(null);
13
- const countdownRef = useRef(COUNTDOWN_DURATION);
13
+ const countdownRef = useRef(Global.CountdownDuration);
14
14
  const isPausedRef = useRef(false);
15
15
  const onExpireRef = useRef(onExpire);
16
16
 
@@ -23,8 +23,8 @@ export const useCountdown = (onExpire) => {
23
23
  const startCountdown = useCallback((onExpireCallback) => {
24
24
  try {
25
25
  // Reset countdown
26
- countdownRef.current = COUNTDOWN_DURATION;
27
- setCountdown(COUNTDOWN_DURATION);
26
+ countdownRef.current = Global.CountdownDuration;
27
+ setCountdown(Global.CountdownDuration);
28
28
  isPausedRef.current = false;
29
29
 
30
30
  // Clear any existing timer
@@ -77,8 +77,8 @@ export const useCountdown = (onExpire) => {
77
77
  // Reset countdown to initial duration
78
78
  const resetCountdown = useCallback(() => {
79
79
  try {
80
- countdownRef.current = COUNTDOWN_DURATION;
81
- setCountdown(COUNTDOWN_DURATION);
80
+ countdownRef.current = Global.CountdownDuration;
81
+ setCountdown(Global.CountdownDuration);
82
82
  isPausedRef.current = false;
83
83
 
84
84
  if (timerRef.current) {