@hero-design/rn 7.16.2 → 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 (122) hide show
  1. package/.turbo/turbo-build.log +2 -2
  2. package/es/index.js +331 -259
  3. package/lib/index.js +330 -258
  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/BasicListItem.tsx +8 -4
  36. package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +3 -3
  37. package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +20 -20
  38. package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +6 -6
  39. package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +12 -12
  40. package/src/components/PinInput/__tests__/__snapshots__/PinCell.spec.tsx.snap +4 -4
  41. package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +22 -22
  42. package/src/components/Progress/ProgressCircle.tsx +25 -22
  43. package/src/components/Progress/StyledProgressCircle.tsx +33 -28
  44. package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +102 -92
  45. package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +5 -5
  46. package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +6 -6
  47. package/src/components/Radio/__tests__/__snapshots__/StyledRadio.spec.tsx.snap +3 -3
  48. package/src/components/RichTextEditor/__tests__/__snapshots__/EditorToolbar.spec.tsx.snap +11 -11
  49. package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +6 -6
  50. package/src/components/SectionHeading/__tests__/__snapshots__/StyledHeading.spec.tsx.snap +1 -1
  51. package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +9 -9
  52. package/src/components/Select/MultiSelect/Option.tsx +20 -11
  53. package/src/components/Select/MultiSelect/OptionList.tsx +47 -41
  54. package/src/components/Select/MultiSelect/__tests__/OptionList.spec.tsx +25 -14
  55. package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +6 -4
  56. package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +1638 -134
  57. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +5312 -366
  58. package/src/components/Select/MultiSelect/__tests__/index.spec.tsx +122 -1
  59. package/src/components/Select/MultiSelect/index.tsx +26 -36
  60. package/src/components/Select/SingleSelect/Option.tsx +19 -3
  61. package/src/components/Select/SingleSelect/OptionList.tsx +47 -39
  62. package/src/components/Select/SingleSelect/__tests__/OptionList.spec.tsx +23 -12
  63. package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +5 -3
  64. package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +1632 -128
  65. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +4932 -302
  66. package/src/components/Select/SingleSelect/__tests__/index.spec.tsx +117 -1
  67. package/src/components/Select/SingleSelect/index.tsx +26 -37
  68. package/src/components/Select/StyledOptionList.tsx +43 -44
  69. package/src/components/Select/StyledSelect.tsx +7 -3
  70. package/src/components/Select/__tests__/StyledSelect.spec.tsx +1 -9
  71. package/src/components/Select/__tests__/__snapshots__/StyledSelect.spec.tsx.snap +2 -15
  72. package/src/components/Select/__tests__/helpers.spec.tsx +74 -0
  73. package/src/components/Select/helpers.tsx +87 -4
  74. package/src/components/Select/types.ts +99 -0
  75. package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +4 -4
  76. package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +8 -8
  77. package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
  78. package/src/components/Switch/__tests__/__snapshots__/StyledHeading.spec.tsx.snap +1 -1
  79. package/src/components/Switch/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  80. package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +6 -6
  81. package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +8 -8
  82. package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +8 -8
  83. package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +50 -50
  84. package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +241 -85
  85. package/src/components/TextInput/__tests__/index.spec.tsx +29 -8
  86. package/src/components/TextInput/index.tsx +18 -7
  87. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +5 -5
  88. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +12 -12
  89. package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +22 -22
  90. package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +12 -12
  91. package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +8 -8
  92. package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +13 -13
  93. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +145 -146
  94. package/src/theme/components/alert.ts +3 -3
  95. package/src/theme/components/badge.ts +1 -1
  96. package/src/theme/components/card.ts +4 -4
  97. package/src/theme/components/list.ts +4 -4
  98. package/src/theme/components/pinInput.ts +2 -2
  99. package/src/theme/components/progress.ts +5 -5
  100. package/src/theme/components/select.ts +3 -3
  101. package/src/theme/components/toast.ts +3 -3
  102. package/src/theme/global/colors.ts +40 -39
  103. package/src/types.ts +7 -1
  104. package/types/components/List/BasicListItem.d.ts +1 -1
  105. package/types/components/Progress/StyledProgressCircle.d.ts +12 -6
  106. package/types/components/Select/MultiSelect/Option.d.ts +4 -2
  107. package/types/components/Select/MultiSelect/OptionList.d.ts +6 -7
  108. package/types/components/Select/MultiSelect/index.d.ts +5 -5
  109. package/types/components/Select/SingleSelect/Option.d.ts +4 -2
  110. package/types/components/Select/SingleSelect/OptionList.d.ts +6 -7
  111. package/types/components/Select/SingleSelect/index.d.ts +5 -5
  112. package/types/components/Select/StyledOptionList.d.ts +10 -16
  113. package/types/components/Select/StyledSelect.d.ts +8 -2
  114. package/types/components/Select/__tests__/helpers.spec.d.ts +1 -0
  115. package/types/components/Select/helpers.d.ts +14 -2
  116. package/types/components/Select/index.d.ts +1 -1
  117. package/types/components/Select/types.d.ts +32 -7
  118. package/types/components/TextInput/index.d.ts +4 -2
  119. package/types/theme/components/progress.d.ts +1 -2
  120. package/types/theme/components/select.d.ts +3 -3
  121. package/types/types.d.ts +2 -1
  122. package/src/components/Select/types.tsx +0 -52
@@ -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
  };