@hero-design/rn 7.17.0 → 7.17.1

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 (84) hide show
  1. package/.turbo/turbo-build.log +2 -2
  2. package/es/index.js +107 -99
  3. package/lib/index.js +107 -99
  4. package/package.json +2 -2
  5. package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +12 -12
  6. package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +18 -18
  7. package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +26 -26
  8. package/src/components/Avatar/__tests__/__snapshots__/StyledAvatar.spec.tsx.snap +3 -3
  9. package/src/components/Avatar/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  10. package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +1 -1
  11. package/src/components/Badge/__tests__/__snapshots__/Status.spec.tsx.snap +2 -2
  12. package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +9 -9
  13. package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +12 -12
  14. package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +2 -2
  15. package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +6 -6
  16. package/src/components/Button/UtilityButton/__tests__/__snapshots__/index.spec.tsx.snap +6 -6
  17. package/src/components/Button/__tests__/__snapshots__/IconButton.spec.tsx.snap +1 -1
  18. package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +67 -67
  19. package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +12 -12
  20. package/src/components/Card/__tests__/__snapshots__/StyledCard.spec.tsx.snap +1 -1
  21. package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +1 -1
  22. package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  23. package/src/components/ContentNavigator/__tests__/__snapshots__/StyledContentNavigator.spec.tsx.snap +1 -1
  24. package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +6 -6
  25. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +5 -5
  26. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +12 -12
  27. package/src/components/Divider/__tests__/__snapshots__/StyledDivider.spec.tsx.snap +12 -12
  28. package/src/components/Drawer/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
  29. package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
  30. package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +28 -28
  31. package/src/components/FAB/__tests__/__snapshots__/AnimatedFABIcon.spec.tsx.snap +2 -2
  32. package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +3 -3
  33. package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +9 -9
  34. package/src/components/Icon/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
  35. package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +3 -3
  36. package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +20 -20
  37. package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +6 -6
  38. package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +12 -12
  39. package/src/components/PinInput/__tests__/__snapshots__/PinCell.spec.tsx.snap +4 -4
  40. package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +22 -22
  41. package/src/components/Progress/ProgressCircle.tsx +25 -22
  42. package/src/components/Progress/StyledProgressCircle.tsx +33 -28
  43. package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +102 -92
  44. package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +5 -5
  45. package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +6 -6
  46. package/src/components/Radio/__tests__/__snapshots__/StyledRadio.spec.tsx.snap +3 -3
  47. package/src/components/RichTextEditor/__tests__/__snapshots__/EditorToolbar.spec.tsx.snap +11 -11
  48. package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +6 -6
  49. package/src/components/SectionHeading/__tests__/__snapshots__/StyledHeading.spec.tsx.snap +1 -1
  50. package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +9 -9
  51. package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +3 -3
  52. package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +42 -42
  53. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +121 -121
  54. package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +2 -2
  55. package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +36 -36
  56. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +94 -94
  57. package/src/components/Select/__tests__/__snapshots__/StyledSelect.spec.tsx.snap +2 -2
  58. package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +4 -4
  59. package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +8 -8
  60. package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
  61. package/src/components/Switch/__tests__/__snapshots__/StyledHeading.spec.tsx.snap +1 -1
  62. package/src/components/Switch/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  63. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +6 -6
  64. package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +8 -8
  65. package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +8 -8
  66. package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +50 -50
  67. package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +87 -87
  68. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +5 -5
  69. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +12 -12
  70. package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +22 -22
  71. package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +12 -12
  72. package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +8 -8
  73. package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +13 -13
  74. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +142 -143
  75. package/src/theme/components/alert.ts +3 -3
  76. package/src/theme/components/badge.ts +1 -1
  77. package/src/theme/components/card.ts +4 -4
  78. package/src/theme/components/list.ts +4 -4
  79. package/src/theme/components/pinInput.ts +2 -2
  80. package/src/theme/components/progress.ts +5 -5
  81. package/src/theme/components/toast.ts +3 -3
  82. package/src/theme/global/colors.ts +40 -39
  83. package/types/components/Progress/StyledProgressCircle.d.ts +12 -6
  84. package/types/theme/components/progress.d.ts +1 -2
@@ -5,7 +5,7 @@ exports[`LeadingStatus renders correctly themeLeadingStausIntent archived 1`] =
5
5
  style={
6
6
  Array [
7
7
  Object {
8
- "backgroundColor": "#ccced1",
8
+ "backgroundColor": "#bfc1c5",
9
9
  "borderRadius": 999,
10
10
  "marginRight": 8,
11
11
  "width": 8,
@@ -22,7 +22,7 @@ exports[`LeadingStatus renders correctly themeLeadingStausIntent danger 1`] = `
22
22
  style={
23
23
  Array [
24
24
  Object {
25
- "backgroundColor": "#de350b",
25
+ "backgroundColor": "#e3602a",
26
26
  "borderRadius": 999,
27
27
  "marginRight": 8,
28
28
  "width": 8,
@@ -39,7 +39,7 @@ exports[`LeadingStatus renders correctly themeLeadingStausIntent info 1`] = `
39
39
  style={
40
40
  Array [
41
41
  Object {
42
- "backgroundColor": "#d1d9fe",
42
+ "backgroundColor": "#b5c3fd",
43
43
  "borderRadius": 999,
44
44
  "marginRight": 8,
45
45
  "width": 8,
@@ -56,7 +56,7 @@ exports[`LeadingStatus renders correctly themeLeadingStausIntent success 1`] = `
56
56
  style={
57
57
  Array [
58
58
  Object {
59
- "backgroundColor": "#017d6d",
59
+ "backgroundColor": "#5ace7d",
60
60
  "borderRadius": 999,
61
61
  "marginRight": 8,
62
62
  "width": 8,
@@ -104,7 +104,7 @@ exports[`ListItemContainer renders correctly themeSelected false themeVariant ca
104
104
  "borderRadius": 8,
105
105
  "flexDirection": "row",
106
106
  "padding": 16,
107
- "shadowColor": "#dadbde",
107
+ "shadowColor": "#ccced1",
108
108
  "shadowOffset": Object {
109
109
  "height": 2,
110
110
  "width": 0,
@@ -120,7 +120,7 @@ exports[`ListItemContainer renders correctly themeSelected false themeVariant ca
120
120
  style={
121
121
  Array [
122
122
  Object {
123
- "color": "#292a2b",
123
+ "color": "#001f23",
124
124
  "fontFamily": "BeVietnamPro-Regular",
125
125
  "fontSize": 14,
126
126
  "letterSpacing": 0.42,
@@ -164,7 +164,7 @@ exports[`ListItemContainer renders correctly themeSelected false themeVariant fu
164
164
  style={
165
165
  Array [
166
166
  Object {
167
- "color": "#292a2b",
167
+ "color": "#001f23",
168
168
  "fontFamily": "BeVietnamPro-Regular",
169
169
  "fontSize": 14,
170
170
  "letterSpacing": 0.42,
@@ -197,11 +197,11 @@ exports[`ListItemContainer renders correctly themeSelected true themeVariant car
197
197
  Array [
198
198
  Object {
199
199
  "alignItems": "center",
200
- "backgroundColor": "#f1e9fb",
200
+ "backgroundColor": "#f3e6f6",
201
201
  "borderRadius": 8,
202
202
  "flexDirection": "row",
203
203
  "padding": 16,
204
- "shadowColor": "#dadbde",
204
+ "shadowColor": "#ccced1",
205
205
  "shadowOffset": Object {
206
206
  "height": 2,
207
207
  "width": 0,
@@ -217,7 +217,7 @@ exports[`ListItemContainer renders correctly themeSelected true themeVariant car
217
217
  style={
218
218
  Array [
219
219
  Object {
220
- "color": "#292a2b",
220
+ "color": "#001f23",
221
221
  "fontFamily": "BeVietnamPro-Regular",
222
222
  "fontSize": 14,
223
223
  "letterSpacing": 0.42,
@@ -249,7 +249,7 @@ exports[`ListItemContainer renders correctly themeSelected true themeVariant ful
249
249
  style={
250
250
  Array [
251
251
  Object {
252
- "backgroundColor": "#f1e9fb",
252
+ "backgroundColor": "#f3e6f6",
253
253
  "flexDirection": "row",
254
254
  "padding": 16,
255
255
  },
@@ -261,7 +261,7 @@ exports[`ListItemContainer renders correctly themeSelected true themeVariant ful
261
261
  style={
262
262
  Array [
263
263
  Object {
264
- "color": "#292a2b",
264
+ "color": "#001f23",
265
265
  "fontFamily": "BeVietnamPro-Regular",
266
266
  "fontSize": 14,
267
267
  "letterSpacing": 0.42,
@@ -6,7 +6,7 @@ exports[`PinCell renders correctly when focused is false, state is default 1`] =
6
6
  Array [
7
7
  Object {
8
8
  "alignItems": "center",
9
- "borderColor": "#292a2b",
9
+ "borderColor": "#001f23",
10
10
  "borderRadius": 8,
11
11
  "borderWidth": 1,
12
12
  "height": 48,
@@ -23,7 +23,7 @@ exports[`PinCell renders correctly when focused is false, state is default 1`] =
23
23
  style={
24
24
  Array [
25
25
  Object {
26
- "color": "#292a2b",
26
+ "color": "#001f23",
27
27
  "fontFamily": "BeVietnamPro-SemiBold",
28
28
  "fontSize": 28,
29
29
  },
@@ -117,7 +117,7 @@ exports[`PinCell renders correctly when focused is true, state is default 1`] =
117
117
  Array [
118
118
  Object {
119
119
  "alignItems": "center",
120
- "borderColor": "#292a2b",
120
+ "borderColor": "#001f23",
121
121
  "borderRadius": 8,
122
122
  "borderWidth": 2,
123
123
  "height": 48,
@@ -134,7 +134,7 @@ exports[`PinCell renders correctly when focused is true, state is default 1`] =
134
134
  style={
135
135
  Array [
136
136
  Object {
137
- "color": "#292a2b",
137
+ "color": "#001f23",
138
138
  "fontFamily": "BeVietnamPro-SemiBold",
139
139
  "fontSize": 28,
140
140
  },
@@ -26,7 +26,7 @@ exports[`rendering renders correctly 1`] = `
26
26
  Array [
27
27
  Object {
28
28
  "alignItems": "center",
29
- "borderColor": "#292a2b",
29
+ "borderColor": "#001f23",
30
30
  "borderRadius": 8,
31
31
  "borderWidth": 1,
32
32
  "height": 48,
@@ -43,8 +43,8 @@ exports[`rendering renders correctly 1`] = `
43
43
  style={
44
44
  Array [
45
45
  Object {
46
- "backgroundColor": "#292a2b",
47
- "borderColor": "#292a2b",
46
+ "backgroundColor": "#001f23",
47
+ "borderColor": "#001f23",
48
48
  "borderRadius": 999,
49
49
  "borderWidth": 1,
50
50
  "height": 16,
@@ -72,7 +72,7 @@ exports[`rendering renders correctly 1`] = `
72
72
  Array [
73
73
  Object {
74
74
  "alignItems": "center",
75
- "borderColor": "#292a2b",
75
+ "borderColor": "#001f23",
76
76
  "borderRadius": 8,
77
77
  "borderWidth": 1,
78
78
  "height": 48,
@@ -89,8 +89,8 @@ exports[`rendering renders correctly 1`] = `
89
89
  style={
90
90
  Array [
91
91
  Object {
92
- "backgroundColor": "#292a2b",
93
- "borderColor": "#292a2b",
92
+ "backgroundColor": "#001f23",
93
+ "borderColor": "#001f23",
94
94
  "borderRadius": 999,
95
95
  "borderWidth": 1,
96
96
  "height": 16,
@@ -118,7 +118,7 @@ exports[`rendering renders correctly 1`] = `
118
118
  Array [
119
119
  Object {
120
120
  "alignItems": "center",
121
- "borderColor": "#292a2b",
121
+ "borderColor": "#001f23",
122
122
  "borderRadius": 8,
123
123
  "borderWidth": 1,
124
124
  "height": 48,
@@ -135,7 +135,7 @@ exports[`rendering renders correctly 1`] = `
135
135
  style={
136
136
  Array [
137
137
  Object {
138
- "borderColor": "#292a2b",
138
+ "borderColor": "#001f23",
139
139
  "borderRadius": 999,
140
140
  "borderWidth": 1,
141
141
  "height": 16,
@@ -163,7 +163,7 @@ exports[`rendering renders correctly 1`] = `
163
163
  Array [
164
164
  Object {
165
165
  "alignItems": "center",
166
- "borderColor": "#292a2b",
166
+ "borderColor": "#001f23",
167
167
  "borderRadius": 8,
168
168
  "borderWidth": 1,
169
169
  "height": 48,
@@ -180,7 +180,7 @@ exports[`rendering renders correctly 1`] = `
180
180
  style={
181
181
  Array [
182
182
  Object {
183
- "borderColor": "#292a2b",
183
+ "borderColor": "#001f23",
184
184
  "borderRadius": 999,
185
185
  "borderWidth": 1,
186
186
  "height": 16,
@@ -476,7 +476,7 @@ exports[`rendering renders correctly when length is 6 and secure is false 1`] =
476
476
  Array [
477
477
  Object {
478
478
  "alignItems": "center",
479
- "borderColor": "#292a2b",
479
+ "borderColor": "#001f23",
480
480
  "borderRadius": 8,
481
481
  "borderWidth": 1,
482
482
  "height": 48,
@@ -493,7 +493,7 @@ exports[`rendering renders correctly when length is 6 and secure is false 1`] =
493
493
  style={
494
494
  Array [
495
495
  Object {
496
- "color": "#292a2b",
496
+ "color": "#001f23",
497
497
  "fontFamily": "BeVietnamPro-SemiBold",
498
498
  "fontSize": 28,
499
499
  },
@@ -520,7 +520,7 @@ exports[`rendering renders correctly when length is 6 and secure is false 1`] =
520
520
  Array [
521
521
  Object {
522
522
  "alignItems": "center",
523
- "borderColor": "#292a2b",
523
+ "borderColor": "#001f23",
524
524
  "borderRadius": 8,
525
525
  "borderWidth": 1,
526
526
  "height": 48,
@@ -537,7 +537,7 @@ exports[`rendering renders correctly when length is 6 and secure is false 1`] =
537
537
  style={
538
538
  Array [
539
539
  Object {
540
- "color": "#292a2b",
540
+ "color": "#001f23",
541
541
  "fontFamily": "BeVietnamPro-SemiBold",
542
542
  "fontSize": 28,
543
543
  },
@@ -564,7 +564,7 @@ exports[`rendering renders correctly when length is 6 and secure is false 1`] =
564
564
  Array [
565
565
  Object {
566
566
  "alignItems": "center",
567
- "borderColor": "#292a2b",
567
+ "borderColor": "#001f23",
568
568
  "borderRadius": 8,
569
569
  "borderWidth": 1,
570
570
  "height": 48,
@@ -581,7 +581,7 @@ exports[`rendering renders correctly when length is 6 and secure is false 1`] =
581
581
  style={
582
582
  Array [
583
583
  Object {
584
- "color": "#292a2b",
584
+ "color": "#001f23",
585
585
  "fontFamily": "BeVietnamPro-SemiBold",
586
586
  "fontSize": 28,
587
587
  },
@@ -608,7 +608,7 @@ exports[`rendering renders correctly when length is 6 and secure is false 1`] =
608
608
  Array [
609
609
  Object {
610
610
  "alignItems": "center",
611
- "borderColor": "#292a2b",
611
+ "borderColor": "#001f23",
612
612
  "borderRadius": 8,
613
613
  "borderWidth": 1,
614
614
  "height": 48,
@@ -625,7 +625,7 @@ exports[`rendering renders correctly when length is 6 and secure is false 1`] =
625
625
  style={
626
626
  Array [
627
627
  Object {
628
- "borderColor": "#292a2b",
628
+ "borderColor": "#001f23",
629
629
  "borderRadius": 999,
630
630
  "borderWidth": 1,
631
631
  "height": 16,
@@ -653,7 +653,7 @@ exports[`rendering renders correctly when length is 6 and secure is false 1`] =
653
653
  Array [
654
654
  Object {
655
655
  "alignItems": "center",
656
- "borderColor": "#292a2b",
656
+ "borderColor": "#001f23",
657
657
  "borderRadius": 8,
658
658
  "borderWidth": 1,
659
659
  "height": 48,
@@ -670,7 +670,7 @@ exports[`rendering renders correctly when length is 6 and secure is false 1`] =
670
670
  style={
671
671
  Array [
672
672
  Object {
673
- "borderColor": "#292a2b",
673
+ "borderColor": "#001f23",
674
674
  "borderRadius": 999,
675
675
  "borderWidth": 1,
676
676
  "height": 16,
@@ -698,7 +698,7 @@ exports[`rendering renders correctly when length is 6 and secure is false 1`] =
698
698
  Array [
699
699
  Object {
700
700
  "alignItems": "center",
701
- "borderColor": "#292a2b",
701
+ "borderColor": "#001f23",
702
702
  "borderRadius": 8,
703
703
  "borderWidth": 1,
704
704
  "height": 48,
@@ -715,7 +715,7 @@ exports[`rendering renders correctly when length is 6 and secure is false 1`] =
715
715
  style={
716
716
  Array [
717
717
  Object {
718
- "borderColor": "#292a2b",
718
+ "borderColor": "#001f23",
719
719
  "borderRadius": 999,
720
720
  "borderWidth": 1,
721
721
  "height": 16,
@@ -9,11 +9,12 @@ import {
9
9
  ViewStyle,
10
10
  } from 'react-native';
11
11
  import {
12
- DonutCircle,
13
- HalfCircleInnerFG,
14
- HalfCircleInnerBG,
15
- HalfCircleWrapper,
16
- StrokeEnd,
12
+ StyledContainer,
13
+ StyledDonutCircle,
14
+ StyledHalfCircleInnerFG,
15
+ StyledHalfCircleInnerBG,
16
+ StyledHalfCircleWrapper,
17
+ StyledStrokeEnd,
17
18
  } from './StyledProgressCircle';
18
19
  import { ThemeIntent } from './types';
19
20
  import Typography from '../Typography';
@@ -44,13 +45,13 @@ const HalfCircle = ({
44
45
  type: 'background' | 'foreground';
45
46
  themeIntent?: ThemeIntent;
46
47
  }) => (
47
- <HalfCircleWrapper>
48
+ <StyledHalfCircleWrapper>
48
49
  {type === 'background' ? (
49
- <HalfCircleInnerBG />
50
+ <StyledHalfCircleInnerBG />
50
51
  ) : (
51
- <HalfCircleInnerFG themeIntent={themeIntent} />
52
+ <StyledHalfCircleInnerFG themeIntent={themeIntent} />
52
53
  )}
53
- </HalfCircleWrapper>
54
+ </StyledHalfCircleWrapper>
54
55
  );
55
56
 
56
57
  const ProgressCircle = ({
@@ -61,7 +62,7 @@ const ProgressCircle = ({
61
62
  ...nativeProps
62
63
  }: ProgressCircleProps): JSX.Element => {
63
64
  const theme = useTheme();
64
- const { radius } = theme.__hd__.progress.sizes;
65
+ const radius = theme.__hd__.progress.sizes.circleWidth / 2;
65
66
  const progressAnimatedValue = useRef<Animated.Value>(new Animated.Value(0));
66
67
 
67
68
  useEffect(() => {
@@ -108,11 +109,7 @@ const ProgressCircle = ({
108
109
 
109
110
  return (
110
111
  <View {...nativeProps} testID={testID} style={style}>
111
- <View
112
- style={{
113
- flexDirection: 'row',
114
- }}
115
- >
112
+ <StyledContainer>
116
113
  <View>
117
114
  <HalfCircle type="foreground" themeIntent={intent} />
118
115
  <Animated.View
@@ -128,7 +125,13 @@ const ProgressCircle = ({
128
125
  <HalfCircle type="background" />
129
126
  </Animated.View>
130
127
  </View>
131
- <View style={{ transform: [{ rotate: '180deg' }], zIndex: 1 }}>
128
+ <View
129
+ style={{
130
+ transform: [{ rotate: '180deg' }],
131
+ zIndex: 1,
132
+ marginLeft: -0.1,
133
+ }}
134
+ >
132
135
  <HalfCircle type="foreground" themeIntent={intent} />
133
136
  <Animated.View
134
137
  style={{
@@ -144,7 +147,7 @@ const ProgressCircle = ({
144
147
  <HalfCircle type="background" />
145
148
  </Animated.View>
146
149
  </View>
147
- <StrokeEnd themeIntent={intent} />
150
+ <StyledStrokeEnd themeIntent={intent} />
148
151
  <Animated.View
149
152
  style={{
150
153
  ...StyleSheet.absoluteFillObject,
@@ -152,12 +155,12 @@ const ProgressCircle = ({
152
155
  transform: [{ rotate: interpolateDotRotate }],
153
156
  }}
154
157
  >
155
- <StrokeEnd themeIntent={intent} />
158
+ <StyledStrokeEnd themeIntent={intent} />
156
159
  </Animated.View>
157
- <DonutCircle>
158
- <Typography.Text fontSize="xlarge">{`${value}%`}</Typography.Text>
159
- </DonutCircle>
160
- </View>
160
+ <StyledDonutCircle>
161
+ <Typography.Text fontSize="large">{`${value}%`}</Typography.Text>
162
+ </StyledDonutCircle>
163
+ </StyledContainer>
161
164
  </View>
162
165
  );
163
166
  };
@@ -3,38 +3,42 @@ import styled from '@emotion/native';
3
3
 
4
4
  import { ThemeIntent } from './types';
5
5
 
6
- const HalfCircleWrapper = styled(View)<ViewProps>(({ theme }) => ({
7
- width: theme.__hd__.progress.sizes.radius,
8
- height: theme.__hd__.progress.sizes.radius * 2,
6
+ const INNER_CIRCLE_PERCENTAGE = 0.85; // 85% width according to design
7
+ const STROKE_WIDTH_PERCENTAGE = 0.075; // 7.5% width according to design
8
+
9
+ const StyledContainer = styled(View)<ViewProps>(({ theme }) => ({
10
+ flexDirection: 'row',
11
+ borderRadius: theme.__hd__.progress.radii.default,
12
+ }));
13
+
14
+ const StyledHalfCircleWrapper = styled(View)<ViewProps>(({ theme }) => ({
15
+ width: theme.__hd__.progress.sizes.circleWidth / 2,
16
+ height: theme.__hd__.progress.sizes.circleWidth,
9
17
  overflow: 'hidden',
10
18
  }));
11
19
 
12
- const HalfCircleInnerFG = styled(View)<{ themeIntent: ThemeIntent }>(
20
+ const StyledHalfCircleInnerFG = styled(View)<{ themeIntent: ThemeIntent }>(
13
21
  ({ theme, themeIntent }) => ({
14
- width: theme.__hd__.progress.sizes.radius * 2,
15
- height: theme.__hd__.progress.sizes.radius * 2,
22
+ width: theme.__hd__.progress.sizes.circleWidth,
23
+ height: theme.__hd__.progress.sizes.circleWidth,
16
24
  backgroundColor: theme.__hd__.progress.colors[themeIntent],
17
25
  borderRadius: theme.__hd__.progress.radii.default,
18
26
  })
19
27
  );
20
28
 
21
- const HalfCircleInnerBG = styled(View)<ViewProps>(({ theme }) => ({
22
- width: theme.__hd__.progress.sizes.radius * 2,
23
- height: theme.__hd__.progress.sizes.radius * 2,
29
+ const StyledHalfCircleInnerBG = styled(View)<ViewProps>(({ theme }) => ({
30
+ width: theme.__hd__.progress.sizes.circleWidth,
31
+ height: theme.__hd__.progress.sizes.circleWidth,
24
32
  backgroundColor: theme.__hd__.progress.colors.background,
25
33
  borderRadius: theme.__hd__.progress.radii.default,
26
34
  }));
27
35
 
28
- const DonutCircle = styled(View)<ViewProps>(({ theme }) => ({
36
+ const StyledDonutCircle = styled(View)<ViewProps>(({ theme }) => ({
29
37
  position: 'absolute',
30
- top: theme.__hd__.progress.sizes.strokeWidth,
31
- left: theme.__hd__.progress.sizes.strokeWidth,
32
- width:
33
- theme.__hd__.progress.sizes.radius * 2 -
34
- theme.__hd__.progress.sizes.strokeWidth * 2,
35
- height:
36
- theme.__hd__.progress.sizes.radius * 2 -
37
- theme.__hd__.progress.sizes.strokeWidth * 2,
38
+ top: theme.__hd__.progress.sizes.circleWidth * STROKE_WIDTH_PERCENTAGE,
39
+ left: theme.__hd__.progress.sizes.circleWidth * STROKE_WIDTH_PERCENTAGE,
40
+ width: theme.__hd__.progress.sizes.circleWidth * INNER_CIRCLE_PERCENTAGE,
41
+ height: theme.__hd__.progress.sizes.circleWidth * INNER_CIRCLE_PERCENTAGE,
38
42
  zIndex: 3,
39
43
  backgroundColor: theme.__hd__.progress.colors.innerBackground,
40
44
  borderRadius: theme.__hd__.progress.radii.default,
@@ -42,15 +46,15 @@ const DonutCircle = styled(View)<ViewProps>(({ theme }) => ({
42
46
  justifyContent: 'center',
43
47
  }));
44
48
 
45
- const StrokeEnd = styled(View)<{ themeIntent: ThemeIntent }>(
49
+ const StyledStrokeEnd = styled(View)<{ themeIntent: ThemeIntent }>(
46
50
  ({ theme, themeIntent }) => ({
47
51
  position: 'absolute',
48
52
  top: 0,
49
53
  left:
50
- theme.__hd__.progress.sizes.radius -
51
- theme.__hd__.progress.sizes.strokeWidth / 2,
52
- width: theme.__hd__.progress.sizes.strokeWidth,
53
- height: theme.__hd__.progress.sizes.strokeWidth,
54
+ theme.__hd__.progress.sizes.circleWidth / 2 -
55
+ (theme.__hd__.progress.sizes.circleWidth * STROKE_WIDTH_PERCENTAGE) / 2,
56
+ width: theme.__hd__.progress.sizes.circleWidth * STROKE_WIDTH_PERCENTAGE,
57
+ height: theme.__hd__.progress.sizes.circleWidth * STROKE_WIDTH_PERCENTAGE,
54
58
  borderRadius: theme.__hd__.progress.radii.default,
55
59
  backgroundColor: theme.__hd__.progress.colors[themeIntent],
56
60
  zIndex: 2,
@@ -58,9 +62,10 @@ const StrokeEnd = styled(View)<{ themeIntent: ThemeIntent }>(
58
62
  );
59
63
 
60
64
  export {
61
- DonutCircle,
62
- HalfCircleWrapper,
63
- HalfCircleInnerFG,
64
- HalfCircleInnerBG,
65
- StrokeEnd,
65
+ StyledContainer,
66
+ StyledDonutCircle,
67
+ StyledHalfCircleWrapper,
68
+ StyledHalfCircleInnerFG,
69
+ StyledHalfCircleInnerBG,
70
+ StyledStrokeEnd,
66
71
  };