dhre-ui-kit 0.0.83 → 0.0.86

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dhre-ui-kit",
3
- "version": "0.0.83",
3
+ "version": "0.0.86",
4
4
  "main": "src/index.ts",
5
5
  "files": [
6
6
  "src",
@@ -0,0 +1,3 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M13.5 4.5L6.5 11.5L3 8" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
@@ -10,6 +10,7 @@ import ArrowLeft from './images/arrowLeft.svg';
10
10
  import BellSimple from './images/bellSimple.svg';
11
11
  import UploadFile from './images/uploadFileIcon.svg';
12
12
  import CaretRight from './images/caretRight.svg';
13
+ import CheckWhite from './images/checkWhite.svg';
13
14
 
14
15
  export {
15
16
  CalenderDots,
@@ -24,4 +25,5 @@ export {
24
25
  BellSimple,
25
26
  UploadFile,
26
27
  CaretRight,
28
+ CheckWhite,
27
29
  };
@@ -1,11 +1,12 @@
1
1
  import {View} from 'react-native';
2
2
  import React from 'react';
3
- import {CircleTick} from '../../assets';
3
+ import {CheckWhite} from '../../assets';
4
4
  import {styles} from './styles';
5
5
  import {IData, IProps, Status} from './stepper.interface';
6
- import {DHRE_COLORS_TEXT} from '../../theme/colors';
7
6
  import {FontStyle} from '../../utils/appEnum';
8
7
  import CustomTypography from '../customTypography';
8
+ import {useTheme} from '../../theme/ThemeContext';
9
+ import {withThemeProvider} from '../../theme/withThemeProvider';
9
10
 
10
11
  const Stepper = ({
11
12
  containerStyle,
@@ -13,38 +14,46 @@ const Stepper = ({
13
14
  showStatus = false,
14
15
  data,
15
16
  }: IProps) => {
17
+ const {theme} = useTheme();
18
+
16
19
  const renderCircleStyle = (status?: string) => {
17
20
  if (status === Status.Active) {
18
- return styles.activeStepCircle;
21
+ return {...styles.activeStepCircle, borderColor: theme.CONTENT_PRIMARY};
19
22
  } else if (status === Status.Inactive) {
20
- return styles.inactiveStepCircle;
23
+ return {
24
+ ...styles.inactiveStepCircle,
25
+ borderColor: theme.CONTENT_SECONDRY,
26
+ };
21
27
  } else if (status === Status.Completed) {
22
- return styles.completeStepCircle;
28
+ return {...styles.completeStepCircle, backgroundColor: theme.SUCCESS};
23
29
  } else {
24
- return styles.stepCountCircle;
30
+ return {...styles.stepCountCircle, borderColor: theme.BORDER_PRIMARY};
25
31
  }
26
32
  };
27
33
  const renderLableStyle = (status?: string) => {
28
34
  if (status === Status.Active) {
29
- return styles.activeStepLabel;
35
+ return {...styles.activeStepLabel, color: theme.CONTENT_PRIMARY};
30
36
  } else if (status === Status.Inactive) {
31
- return styles.inactiveStepLabel;
37
+ return {...styles.inactiveStepLabel, color: theme.CONTENT_SECONDRY};
32
38
  } else if (status === Status.Completed) {
33
- return styles.completeStepLabel;
39
+ return {...styles.completeStepLabel, color: theme.CONTENT_PRIMARY};
34
40
  } else {
35
- return styles.countStepLabel;
41
+ return {...styles.countStepLabel, color: theme.CONTENT_PRIMARY};
36
42
  }
37
43
  };
38
44
 
39
45
  const renderDividerStyle = (status?: string) => {
40
46
  if (status === Status.Active) {
41
- return styles.activeStepDivider;
47
+ return {borderColor: theme.BORDER_PRIMARY};
42
48
  } else if (status === Status.Inactive) {
43
- return styles.inactiveStepDivider;
49
+ return {borderColor: theme.BORDER_PRIMARY};
44
50
  } else if (status === Status.Completed) {
45
- return styles.completeStepDivider;
51
+ return {
52
+ ...styles.completeStepDivider,
53
+ borderColor: theme.CONTENT_PRIMARY,
54
+ };
46
55
  } else {
47
- return styles.countStepDivider;
56
+ return {borderColor: theme.CONTENT_SECONDRY};
48
57
  }
49
58
  };
50
59
 
@@ -67,12 +76,12 @@ const Stepper = ({
67
76
  text={item?.step}
68
77
  variant={FontStyle.L2_REGULAR}
69
78
  style={{
70
- color: DHRE_COLORS_TEXT.DH_WHITE,
79
+ color: theme.CONTENT_PRIMARY,
71
80
  }}
72
81
  />
73
82
  )}
74
83
  {showStatus && item?.status === Status.Completed && (
75
- <CircleTick />
84
+ <CheckWhite />
76
85
  )}
77
86
  </View>
78
87
  {index != data?.length - 1 && (
@@ -93,4 +102,4 @@ const Stepper = ({
93
102
  );
94
103
  };
95
104
 
96
- export default Stepper;
105
+ export default withThemeProvider(Stepper);
@@ -1,5 +1,4 @@
1
1
  import {StyleSheet} from 'react-native';
2
- import {DHRE_COLORS_TEXT} from '../../theme/colors';
3
2
 
4
3
  const styles = StyleSheet.create({
5
4
  stepperContainer: {
@@ -23,46 +22,33 @@ const styles = StyleSheet.create({
23
22
  borderRadius: 12,
24
23
  alignItems: 'center',
25
24
  borderWidth: 2,
26
- borderColor: '#000000',
27
25
  justifyContent: 'center',
28
26
  },
29
27
  activeStepLabel: {
30
- color: DHRE_COLORS_TEXT.DH_BLACK,
31
28
  marginTop: 11,
32
29
  },
33
- activeStepDivider: {
34
- borderColor: '#686868',
35
- },
36
30
  inactiveStepCircle: {
37
31
  height: 24,
38
32
  width: 24,
39
33
  borderRadius: 12,
40
34
  alignItems: 'center',
41
35
  borderWidth: 2,
42
- borderColor: '#A7A7A7',
43
36
  justifyContent: 'center',
44
37
  },
45
38
  inactiveStepLabel: {
46
- color: '#686868',
47
39
  marginTop: 11,
48
40
  },
49
- inactiveStepDivider: {
50
- borderColor: '#686868',
51
- },
52
41
  completeStepCircle: {
53
42
  height: 24,
54
43
  width: 24,
55
- backgroundColor: '#00B578',
56
44
  borderRadius: 12,
57
45
  alignItems: 'center',
58
46
  justifyContent: 'center',
59
47
  },
60
48
  completeStepLabel: {
61
- color: DHRE_COLORS_TEXT.DH_BLACK,
62
49
  marginTop: 11,
63
50
  },
64
51
  completeStepDivider: {
65
- borderColor: DHRE_COLORS_TEXT.DH_BLACK,
66
52
  borderStyle: 'solid',
67
53
  },
68
54
  stepCountCircle: {
@@ -71,16 +57,12 @@ const styles = StyleSheet.create({
71
57
  borderRadius: 12,
72
58
  alignItems: 'center',
73
59
  borderWidth: 1,
74
- borderColor: '#A7A7A7',
75
60
  justifyContent: 'center',
76
61
  },
77
62
  countStepLabel: {
78
- color: DHRE_COLORS_TEXT.DH_WHITE,
63
+
79
64
  marginTop: 11,
80
65
  },
81
- countStepDivider: {
82
- borderColor: '#686868',
83
- },
84
66
  separator: {
85
67
  borderWidth: 1,
86
68
  borderStyle: 'dashed',