@hero-design/rn 8.12.0 → 8.12.2

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 (56) hide show
  1. package/.turbo/turbo-build.log +9 -9
  2. package/es/index.js +121 -34
  3. package/lib/index.js +120 -33
  4. package/package.json +5 -5
  5. package/src/components/Button/Button.tsx +42 -2
  6. package/src/components/Button/LoadingIndicator/StyledLoadingIndicator.tsx +1 -1
  7. package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +1 -1
  8. package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
  9. package/src/components/Button/StyledButton.tsx +21 -14
  10. package/src/components/Button/__tests__/Button.spec.tsx +46 -1
  11. package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +1564 -0
  12. package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +126 -110
  13. package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +24 -22
  14. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +17 -3
  15. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +29 -12
  16. package/src/components/FAB/ActionGroup/ActionItem.tsx +17 -6
  17. package/src/components/FAB/ActionGroup/StyledActionItem.tsx +15 -17
  18. package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +170 -160
  19. package/src/components/FAB/FAB.tsx +3 -1
  20. package/src/components/List/BasicListItem.tsx +6 -0
  21. package/src/components/List/ListItem.tsx +6 -0
  22. package/src/components/List/StyledBasicListItem.tsx +2 -2
  23. package/src/components/List/StyledListItem.tsx +2 -2
  24. package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +22 -18
  25. package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +32 -28
  26. package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +44 -36
  27. package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +50 -46
  28. package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +22 -18
  29. package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +33 -27
  30. package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +4 -0
  31. package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +11 -9
  32. package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +132 -108
  33. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +268 -166
  34. package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +11 -9
  35. package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +132 -108
  36. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +232 -139
  37. package/src/components/TextInput/StyledTextInput.tsx +3 -0
  38. package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +466 -28
  39. package/src/components/TextInput/__tests__/index.spec.tsx +32 -0
  40. package/src/components/TextInput/index.tsx +32 -4
  41. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +34 -6
  42. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +46 -15
  43. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +18 -0
  44. package/src/theme/components/button.ts +16 -2
  45. package/src/theme/components/fab.ts +2 -0
  46. package/src/theme/components/textInput.ts +1 -0
  47. package/src/theme/global/borders.ts +2 -0
  48. package/types/components/Button/Button.d.ts +1 -1
  49. package/types/components/Button/StyledButton.d.ts +4 -3
  50. package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +3 -3
  51. package/types/components/List/StyledBasicListItem.d.ts +3 -3
  52. package/types/components/List/StyledListItem.d.ts +3 -3
  53. package/types/theme/components/button.d.ts +14 -0
  54. package/types/theme/components/fab.d.ts +2 -0
  55. package/types/theme/components/textInput.d.ts +1 -0
  56. package/types/theme/global/borders.d.ts +1 -0
@@ -1,26 +1,24 @@
1
- import { TouchableOpacity } from 'react-native';
1
+ import { TouchableHighlight } from 'react-native';
2
2
  import styled from '@emotion/native';
3
3
  import type { TouchableOpacityProps } from 'react-native';
4
4
  import Typography from '../../Typography';
5
5
  import Icon from '../../Icon';
6
6
  import type { IconProps } from '../../Icon';
7
7
 
8
- const StyledActionItem = styled(TouchableOpacity)<TouchableOpacityProps>(
9
- ({ theme }) => ({
10
- paddingLeft: theme.__hd__.fab.space.actionItemPaddingLeft,
11
- paddingRight: theme.__hd__.fab.space.actionItemPaddingRight,
12
- paddingTop: theme.__hd__.fab.space.actionItemPaddingTop,
13
- paddingBottom: theme.__hd__.fab.space.actionItemPaddingBottom,
14
- margin: theme.__hd__.fab.space.actionItemMargin,
15
- marginRight: theme.__hd__.fab.space.actionItemMarginRight,
16
- backgroundColor: theme.__hd__.fab.colors.actionItemBackground,
17
- borderRadius: theme.__hd__.fab.radii.actionItem,
18
- flexDirection: 'row',
19
- alignItems: 'center',
20
- alignSelf: 'flex-end',
21
- overflow: 'hidden',
22
- })
23
- );
8
+ const StyledActionItem = styled(TouchableHighlight)(({ theme }) => ({
9
+ paddingLeft: theme.__hd__.fab.space.actionItemPaddingLeft,
10
+ paddingRight: theme.__hd__.fab.space.actionItemPaddingRight,
11
+ paddingTop: theme.__hd__.fab.space.actionItemPaddingTop,
12
+ paddingBottom: theme.__hd__.fab.space.actionItemPaddingBottom,
13
+ margin: theme.__hd__.fab.space.actionItemMargin,
14
+ marginRight: theme.__hd__.fab.space.actionItemMarginRight,
15
+ backgroundColor: theme.__hd__.fab.colors.actionItemBackground,
16
+ borderRadius: theme.__hd__.fab.radii.actionItem,
17
+ flexDirection: 'row',
18
+ alignItems: 'center',
19
+ alignSelf: 'flex-end',
20
+ overflow: 'hidden',
21
+ }));
24
22
 
25
23
  const StyledActionItemText = styled(Typography.Text)<TouchableOpacityProps>(
26
24
  ({ theme }) => ({
@@ -87,7 +87,6 @@ exports[`ActionGroup has active false 1`] = `
87
87
  <View>
88
88
  <View
89
89
  accessible={true}
90
- collapsable={false}
91
90
  focusable={false}
92
91
  onClick={[Function]}
93
92
  onResponderGrant={[Function]}
@@ -97,21 +96,23 @@ exports[`ActionGroup has active false 1`] = `
97
96
  onResponderTerminationRequest={[Function]}
98
97
  onStartShouldSetResponder={[Function]}
99
98
  style={
100
- Object {
101
- "alignItems": "center",
102
- "alignSelf": "flex-end",
103
- "backgroundColor": "#401960",
104
- "borderRadius": 999,
105
- "flexDirection": "row",
106
- "margin": 8,
107
- "marginRight": 24,
108
- "opacity": 1,
109
- "overflow": "hidden",
110
- "paddingBottom": 8,
111
- "paddingLeft": 16,
112
- "paddingRight": 16,
113
- "paddingTop": 8,
114
- }
99
+ Array [
100
+ Object {
101
+ "alignItems": "center",
102
+ "alignSelf": "flex-end",
103
+ "backgroundColor": "#401960",
104
+ "borderRadius": 999,
105
+ "flexDirection": "row",
106
+ "margin": 8,
107
+ "marginRight": 24,
108
+ "overflow": "hidden",
109
+ "paddingBottom": 8,
110
+ "paddingLeft": 16,
111
+ "paddingRight": 16,
112
+ "paddingTop": 8,
113
+ },
114
+ undefined,
115
+ ]
115
116
  }
116
117
  testID="speaker-action-item"
117
118
  >
@@ -166,7 +167,6 @@ exports[`ActionGroup has active false 1`] = `
166
167
  </View>
167
168
  <View
168
169
  accessible={true}
169
- collapsable={false}
170
170
  focusable={false}
171
171
  onClick={[Function]}
172
172
  onResponderGrant={[Function]}
@@ -176,21 +176,23 @@ exports[`ActionGroup has active false 1`] = `
176
176
  onResponderTerminationRequest={[Function]}
177
177
  onStartShouldSetResponder={[Function]}
178
178
  style={
179
- Object {
180
- "alignItems": "center",
181
- "alignSelf": "flex-end",
182
- "backgroundColor": "#401960",
183
- "borderRadius": 999,
184
- "flexDirection": "row",
185
- "margin": 8,
186
- "marginRight": 24,
187
- "opacity": 1,
188
- "overflow": "hidden",
189
- "paddingBottom": 8,
190
- "paddingLeft": 16,
191
- "paddingRight": 16,
192
- "paddingTop": 8,
193
- }
179
+ Array [
180
+ Object {
181
+ "alignItems": "center",
182
+ "alignSelf": "flex-end",
183
+ "backgroundColor": "#401960",
184
+ "borderRadius": 999,
185
+ "flexDirection": "row",
186
+ "margin": 8,
187
+ "marginRight": 24,
188
+ "overflow": "hidden",
189
+ "paddingBottom": 8,
190
+ "paddingLeft": 16,
191
+ "paddingRight": 16,
192
+ "paddingTop": 8,
193
+ },
194
+ undefined,
195
+ ]
194
196
  }
195
197
  testID="target-action-item"
196
198
  >
@@ -245,7 +247,6 @@ exports[`ActionGroup has active false 1`] = `
245
247
  </View>
246
248
  <View
247
249
  accessible={true}
248
- collapsable={false}
249
250
  focusable={false}
250
251
  onClick={[Function]}
251
252
  onResponderGrant={[Function]}
@@ -255,21 +256,23 @@ exports[`ActionGroup has active false 1`] = `
255
256
  onResponderTerminationRequest={[Function]}
256
257
  onStartShouldSetResponder={[Function]}
257
258
  style={
258
- Object {
259
- "alignItems": "center",
260
- "alignSelf": "flex-end",
261
- "backgroundColor": "#401960",
262
- "borderRadius": 999,
263
- "flexDirection": "row",
264
- "margin": 8,
265
- "marginRight": 24,
266
- "opacity": 1,
267
- "overflow": "hidden",
268
- "paddingBottom": 8,
269
- "paddingLeft": 16,
270
- "paddingRight": 16,
271
- "paddingTop": 8,
272
- }
259
+ Array [
260
+ Object {
261
+ "alignItems": "center",
262
+ "alignSelf": "flex-end",
263
+ "backgroundColor": "#401960",
264
+ "borderRadius": 999,
265
+ "flexDirection": "row",
266
+ "margin": 8,
267
+ "marginRight": 24,
268
+ "overflow": "hidden",
269
+ "paddingBottom": 8,
270
+ "paddingLeft": 16,
271
+ "paddingRight": 16,
272
+ "paddingTop": 8,
273
+ },
274
+ undefined,
275
+ ]
273
276
  }
274
277
  testID="plane-action-item"
275
278
  >
@@ -324,7 +327,6 @@ exports[`ActionGroup has active false 1`] = `
324
327
  </View>
325
328
  <View
326
329
  accessible={true}
327
- collapsable={false}
328
330
  focusable={false}
329
331
  onClick={[Function]}
330
332
  onResponderGrant={[Function]}
@@ -334,21 +336,23 @@ exports[`ActionGroup has active false 1`] = `
334
336
  onResponderTerminationRequest={[Function]}
335
337
  onStartShouldSetResponder={[Function]}
336
338
  style={
337
- Object {
338
- "alignItems": "center",
339
- "alignSelf": "flex-end",
340
- "backgroundColor": "#401960",
341
- "borderRadius": 999,
342
- "flexDirection": "row",
343
- "margin": 8,
344
- "marginRight": 24,
345
- "opacity": 1,
346
- "overflow": "hidden",
347
- "paddingBottom": 8,
348
- "paddingLeft": 16,
349
- "paddingRight": 16,
350
- "paddingTop": 8,
351
- }
339
+ Array [
340
+ Object {
341
+ "alignItems": "center",
342
+ "alignSelf": "flex-end",
343
+ "backgroundColor": "#401960",
344
+ "borderRadius": 999,
345
+ "flexDirection": "row",
346
+ "margin": 8,
347
+ "marginRight": 24,
348
+ "overflow": "hidden",
349
+ "paddingBottom": 8,
350
+ "paddingLeft": 16,
351
+ "paddingRight": 16,
352
+ "paddingTop": 8,
353
+ },
354
+ undefined,
355
+ ]
352
356
  }
353
357
  testID="health-bag-action-item"
354
358
  >
@@ -403,7 +407,6 @@ exports[`ActionGroup has active false 1`] = `
403
407
  </View>
404
408
  <View
405
409
  accessible={true}
406
- collapsable={false}
407
410
  focusable={false}
408
411
  onClick={[Function]}
409
412
  onResponderGrant={[Function]}
@@ -413,21 +416,23 @@ exports[`ActionGroup has active false 1`] = `
413
416
  onResponderTerminationRequest={[Function]}
414
417
  onStartShouldSetResponder={[Function]}
415
418
  style={
416
- Object {
417
- "alignItems": "center",
418
- "alignSelf": "flex-end",
419
- "backgroundColor": "#401960",
420
- "borderRadius": 999,
421
- "flexDirection": "row",
422
- "margin": 8,
423
- "marginRight": 24,
424
- "opacity": 1,
425
- "overflow": "hidden",
426
- "paddingBottom": 8,
427
- "paddingLeft": 16,
428
- "paddingRight": 16,
429
- "paddingTop": 8,
430
- }
419
+ Array [
420
+ Object {
421
+ "alignItems": "center",
422
+ "alignSelf": "flex-end",
423
+ "backgroundColor": "#401960",
424
+ "borderRadius": 999,
425
+ "flexDirection": "row",
426
+ "margin": 8,
427
+ "marginRight": 24,
428
+ "overflow": "hidden",
429
+ "paddingBottom": 8,
430
+ "paddingLeft": 16,
431
+ "paddingRight": 16,
432
+ "paddingTop": 8,
433
+ },
434
+ undefined,
435
+ ]
431
436
  }
432
437
  testID="clock-action-item"
433
438
  >
@@ -649,7 +654,6 @@ exports[`ActionGroup has active true 1`] = `
649
654
  <View>
650
655
  <View
651
656
  accessible={true}
652
- collapsable={false}
653
657
  focusable={false}
654
658
  onClick={[Function]}
655
659
  onResponderGrant={[Function]}
@@ -659,21 +663,23 @@ exports[`ActionGroup has active true 1`] = `
659
663
  onResponderTerminationRequest={[Function]}
660
664
  onStartShouldSetResponder={[Function]}
661
665
  style={
662
- Object {
663
- "alignItems": "center",
664
- "alignSelf": "flex-end",
665
- "backgroundColor": "#401960",
666
- "borderRadius": 999,
667
- "flexDirection": "row",
668
- "margin": 8,
669
- "marginRight": 24,
670
- "opacity": 1,
671
- "overflow": "hidden",
672
- "paddingBottom": 8,
673
- "paddingLeft": 16,
674
- "paddingRight": 16,
675
- "paddingTop": 8,
676
- }
666
+ Array [
667
+ Object {
668
+ "alignItems": "center",
669
+ "alignSelf": "flex-end",
670
+ "backgroundColor": "#401960",
671
+ "borderRadius": 999,
672
+ "flexDirection": "row",
673
+ "margin": 8,
674
+ "marginRight": 24,
675
+ "overflow": "hidden",
676
+ "paddingBottom": 8,
677
+ "paddingLeft": 16,
678
+ "paddingRight": 16,
679
+ "paddingTop": 8,
680
+ },
681
+ undefined,
682
+ ]
677
683
  }
678
684
  testID="speaker-action-item"
679
685
  >
@@ -728,7 +734,6 @@ exports[`ActionGroup has active true 1`] = `
728
734
  </View>
729
735
  <View
730
736
  accessible={true}
731
- collapsable={false}
732
737
  focusable={false}
733
738
  onClick={[Function]}
734
739
  onResponderGrant={[Function]}
@@ -738,21 +743,23 @@ exports[`ActionGroup has active true 1`] = `
738
743
  onResponderTerminationRequest={[Function]}
739
744
  onStartShouldSetResponder={[Function]}
740
745
  style={
741
- Object {
742
- "alignItems": "center",
743
- "alignSelf": "flex-end",
744
- "backgroundColor": "#401960",
745
- "borderRadius": 999,
746
- "flexDirection": "row",
747
- "margin": 8,
748
- "marginRight": 24,
749
- "opacity": 1,
750
- "overflow": "hidden",
751
- "paddingBottom": 8,
752
- "paddingLeft": 16,
753
- "paddingRight": 16,
754
- "paddingTop": 8,
755
- }
746
+ Array [
747
+ Object {
748
+ "alignItems": "center",
749
+ "alignSelf": "flex-end",
750
+ "backgroundColor": "#401960",
751
+ "borderRadius": 999,
752
+ "flexDirection": "row",
753
+ "margin": 8,
754
+ "marginRight": 24,
755
+ "overflow": "hidden",
756
+ "paddingBottom": 8,
757
+ "paddingLeft": 16,
758
+ "paddingRight": 16,
759
+ "paddingTop": 8,
760
+ },
761
+ undefined,
762
+ ]
756
763
  }
757
764
  testID="target-action-item"
758
765
  >
@@ -807,7 +814,6 @@ exports[`ActionGroup has active true 1`] = `
807
814
  </View>
808
815
  <View
809
816
  accessible={true}
810
- collapsable={false}
811
817
  focusable={false}
812
818
  onClick={[Function]}
813
819
  onResponderGrant={[Function]}
@@ -817,21 +823,23 @@ exports[`ActionGroup has active true 1`] = `
817
823
  onResponderTerminationRequest={[Function]}
818
824
  onStartShouldSetResponder={[Function]}
819
825
  style={
820
- Object {
821
- "alignItems": "center",
822
- "alignSelf": "flex-end",
823
- "backgroundColor": "#401960",
824
- "borderRadius": 999,
825
- "flexDirection": "row",
826
- "margin": 8,
827
- "marginRight": 24,
828
- "opacity": 1,
829
- "overflow": "hidden",
830
- "paddingBottom": 8,
831
- "paddingLeft": 16,
832
- "paddingRight": 16,
833
- "paddingTop": 8,
834
- }
826
+ Array [
827
+ Object {
828
+ "alignItems": "center",
829
+ "alignSelf": "flex-end",
830
+ "backgroundColor": "#401960",
831
+ "borderRadius": 999,
832
+ "flexDirection": "row",
833
+ "margin": 8,
834
+ "marginRight": 24,
835
+ "overflow": "hidden",
836
+ "paddingBottom": 8,
837
+ "paddingLeft": 16,
838
+ "paddingRight": 16,
839
+ "paddingTop": 8,
840
+ },
841
+ undefined,
842
+ ]
835
843
  }
836
844
  testID="plane-action-item"
837
845
  >
@@ -886,7 +894,6 @@ exports[`ActionGroup has active true 1`] = `
886
894
  </View>
887
895
  <View
888
896
  accessible={true}
889
- collapsable={false}
890
897
  focusable={false}
891
898
  onClick={[Function]}
892
899
  onResponderGrant={[Function]}
@@ -896,21 +903,23 @@ exports[`ActionGroup has active true 1`] = `
896
903
  onResponderTerminationRequest={[Function]}
897
904
  onStartShouldSetResponder={[Function]}
898
905
  style={
899
- Object {
900
- "alignItems": "center",
901
- "alignSelf": "flex-end",
902
- "backgroundColor": "#401960",
903
- "borderRadius": 999,
904
- "flexDirection": "row",
905
- "margin": 8,
906
- "marginRight": 24,
907
- "opacity": 1,
908
- "overflow": "hidden",
909
- "paddingBottom": 8,
910
- "paddingLeft": 16,
911
- "paddingRight": 16,
912
- "paddingTop": 8,
913
- }
906
+ Array [
907
+ Object {
908
+ "alignItems": "center",
909
+ "alignSelf": "flex-end",
910
+ "backgroundColor": "#401960",
911
+ "borderRadius": 999,
912
+ "flexDirection": "row",
913
+ "margin": 8,
914
+ "marginRight": 24,
915
+ "overflow": "hidden",
916
+ "paddingBottom": 8,
917
+ "paddingLeft": 16,
918
+ "paddingRight": 16,
919
+ "paddingTop": 8,
920
+ },
921
+ undefined,
922
+ ]
914
923
  }
915
924
  testID="health-bag-action-item"
916
925
  >
@@ -965,7 +974,6 @@ exports[`ActionGroup has active true 1`] = `
965
974
  </View>
966
975
  <View
967
976
  accessible={true}
968
- collapsable={false}
969
977
  focusable={false}
970
978
  onClick={[Function]}
971
979
  onResponderGrant={[Function]}
@@ -975,21 +983,23 @@ exports[`ActionGroup has active true 1`] = `
975
983
  onResponderTerminationRequest={[Function]}
976
984
  onStartShouldSetResponder={[Function]}
977
985
  style={
978
- Object {
979
- "alignItems": "center",
980
- "alignSelf": "flex-end",
981
- "backgroundColor": "#401960",
982
- "borderRadius": 999,
983
- "flexDirection": "row",
984
- "margin": 8,
985
- "marginRight": 24,
986
- "opacity": 1,
987
- "overflow": "hidden",
988
- "paddingBottom": 8,
989
- "paddingLeft": 16,
990
- "paddingRight": 16,
991
- "paddingTop": 8,
992
- }
986
+ Array [
987
+ Object {
988
+ "alignItems": "center",
989
+ "alignSelf": "flex-end",
990
+ "backgroundColor": "#401960",
991
+ "borderRadius": 999,
992
+ "flexDirection": "row",
993
+ "margin": 8,
994
+ "marginRight": 24,
995
+ "overflow": "hidden",
996
+ "paddingBottom": 8,
997
+ "paddingLeft": 16,
998
+ "paddingRight": 16,
999
+ "paddingTop": 8,
1000
+ },
1001
+ undefined,
1002
+ ]
993
1003
  }
994
1004
  testID="clock-action-item"
995
1005
  >
@@ -3,6 +3,7 @@ import type { StyleProp, ViewStyle } from 'react-native';
3
3
  import { AnimatedFABIcon } from './AnimatedFABIcon';
4
4
  import { StyledFABContainer, StyledFABIcon, StyledFABText } from './StyledFAB';
5
5
  import type { IconName } from '../Icon';
6
+ import { useTheme } from '../../theme';
6
7
 
7
8
  export interface FABProps {
8
9
  /**
@@ -81,12 +82,13 @@ const FAB = ({
81
82
  style,
82
83
  }: FABProps): JSX.Element => {
83
84
  const isIconOnly = !title;
85
+ const theme = useTheme();
84
86
  return (
85
87
  <StyledFABContainer
88
+ underlayColor={theme.__hd__.fab.colors.buttonPressedBackground}
86
89
  testID={testID}
87
90
  style={style}
88
91
  onPress={onPress}
89
- activeOpacity={0.6}
90
92
  >
91
93
  {isIconOnly ? (
92
94
  <IconOnlyContent animated={animated} active={active} icon={icon} />
@@ -9,6 +9,7 @@ import {
9
9
  StyledListItemContainer,
10
10
  } from './StyledBasicListItem';
11
11
  import type { IconName } from '../Icon';
12
+ import { useTheme } from '../../theme';
12
13
 
13
14
  export interface ListItemProps {
14
15
  /**
@@ -60,6 +61,8 @@ const BasicListItem = ({
60
61
  disabled = false,
61
62
  onPress,
62
63
  }: ListItemProps): JSX.Element => {
64
+ const theme = useTheme();
65
+
63
66
  return (
64
67
  <StyledListItemContainer
65
68
  style={style}
@@ -68,6 +71,9 @@ const BasicListItem = ({
68
71
  themeDisabled={disabled}
69
72
  onPress={onPress}
70
73
  disabled={disabled}
74
+ underlayColor={
75
+ theme.__hd__.list.colors.checkedListItemContainerBackground
76
+ }
71
77
  >
72
78
  <>
73
79
  {prefix && (
@@ -15,6 +15,7 @@ import {
15
15
  StyledTitleContainer,
16
16
  } from './StyledListItem';
17
17
  import type { IconName } from '../Icon';
18
+ import { useTheme } from '../../theme';
18
19
 
19
20
  export interface ListItemProps {
20
21
  /**
@@ -81,6 +82,8 @@ const ListItem = ({
81
82
  onPress,
82
83
  disabled = false,
83
84
  }: ListItemProps): JSX.Element => {
85
+ const theme = useTheme();
86
+
84
87
  return (
85
88
  <StyledListItemContainer
86
89
  style={style}
@@ -89,6 +92,9 @@ const ListItem = ({
89
92
  themeVariant={variant}
90
93
  onPress={onPress}
91
94
  disabled={disabled}
95
+ underlayColor={
96
+ theme.__hd__.list.colors.checkedListItemContainerBackground
97
+ }
92
98
  >
93
99
  <>
94
100
  {leadingStatus && (
@@ -1,5 +1,5 @@
1
1
  import styled from '@emotion/native';
2
- import { TouchableOpacity, View } from 'react-native';
2
+ import { TouchableHighlight, View } from 'react-native';
3
3
 
4
4
  const StyledPrefixContainer = styled(View)(({ theme }) => ({
5
5
  marginRight: theme.__hd__.list.space.prefixContainerMarginRight,
@@ -11,7 +11,7 @@ const StyledTitleContainer = styled(View)(() => ({
11
11
  flex: 1,
12
12
  }));
13
13
 
14
- const StyledListItemContainer = styled(TouchableOpacity)<{
14
+ const StyledListItemContainer = styled(TouchableHighlight)<{
15
15
  themeSelected?: boolean;
16
16
  themeDisabled?: boolean;
17
17
  }>(({ theme, themeSelected, themeDisabled }) => ({
@@ -1,4 +1,4 @@
1
- import { TouchableOpacity, View } from 'react-native';
1
+ import { TouchableHighlight, View } from 'react-native';
2
2
  import styled from '@emotion/native';
3
3
 
4
4
  export type Variant = 'full-width' | 'card';
@@ -9,7 +9,7 @@ export type LeadingStatusIntent =
9
9
  | 'info'
10
10
  | 'archived';
11
11
 
12
- const StyledListItemContainer = styled(TouchableOpacity)<{
12
+ const StyledListItemContainer = styled(TouchableHighlight)<{
13
13
  themeSelected?: boolean;
14
14
  themeVariant?: Variant;
15
15
  }>(({ theme, themeSelected = false, themeVariant = 'basic' }) => {