@hero-design/rn 8.12.0 → 8.12.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 (34) hide show
  1. package/.turbo/turbo-build.log +9 -9
  2. package/es/index.js +42 -9
  3. package/lib/index.js +42 -9
  4. package/package.json +5 -5
  5. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +17 -3
  6. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +17 -3
  7. package/src/components/List/BasicListItem.tsx +6 -0
  8. package/src/components/List/ListItem.tsx +6 -0
  9. package/src/components/List/StyledBasicListItem.tsx +2 -2
  10. package/src/components/List/StyledListItem.tsx +2 -2
  11. package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +22 -18
  12. package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +32 -28
  13. package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +44 -36
  14. package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +50 -46
  15. package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +22 -18
  16. package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +33 -27
  17. package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +4 -0
  18. package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +11 -9
  19. package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +132 -108
  20. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +232 -139
  21. package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +11 -9
  22. package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +132 -108
  23. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +232 -139
  24. package/src/components/TextInput/StyledTextInput.tsx +3 -0
  25. package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +466 -28
  26. package/src/components/TextInput/__tests__/index.spec.tsx +32 -0
  27. package/src/components/TextInput/index.tsx +32 -4
  28. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +34 -6
  29. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +34 -6
  30. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +1 -0
  31. package/src/theme/components/textInput.ts +1 -0
  32. package/types/components/List/StyledBasicListItem.d.ts +3 -3
  33. package/types/components/List/StyledListItem.d.ts +3 -3
  34. package/types/theme/components/textInput.d.ts +1 -0
@@ -1,9 +1,9 @@
1
- @hero-design/rn:build: cache hit, replaying output be75cdb303db3812
2
- @hero-design/rn:build: $ yarn build:js && yarn build:types
3
- @hero-design/rn:build: $ rollup -c
4
- @hero-design/rn:build: 
5
- @hero-design/rn:build: src/index.ts → lib/index.js, es/index.js...
6
- @hero-design/rn:build: (!) Plugin replace: @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.
7
- @hero-design/rn:build: (!) Plugin node-resolve: preferring built-in module 'events' over local alternative at '/root/hero-design/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
8
- @hero-design/rn:build: created lib/index.js, es/index.js in 23.2s
9
- @hero-design/rn:build: $ tsc --noEmit false --emitDeclarationOnly --project tsconfig.prod.json
1
+ @hero-design/rn:build: cache hit, replaying output 11519c5263d6ba02
2
+ @hero-design/rn:build: $ yarn build:js && yarn build:types
3
+ @hero-design/rn:build: $ rollup -c
4
+ @hero-design/rn:build: 
5
+ @hero-design/rn:build: src/index.ts → lib/index.js, es/index.js...
6
+ @hero-design/rn:build: (!) Plugin replace: @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.
7
+ @hero-design/rn:build: (!) Plugin node-resolve: preferring built-in module 'events' over local alternative at '/root/hero-design/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
8
+ @hero-design/rn:build: created lib/index.js, es/index.js in 31.5s
9
+ @hero-design/rn:build: $ tsc --noEmit false --emitDeclarationOnly --project tsconfig.prod.json
package/es/index.js CHANGED
@@ -2674,6 +2674,7 @@ var getTagTheme = function getTagTheme(theme) {
2674
2674
  var getTextInputTheme = function getTextInputTheme(theme) {
2675
2675
  var colors = {
2676
2676
  labelBackground: theme.colors.defaultGlobalSurface,
2677
+ containerBackground: theme.colors.defaultGlobalSurface,
2677
2678
  asterisks: {
2678
2679
  "default": theme.colors.onErrorSurface,
2679
2680
  error: theme.colors.onErrorSurface,
@@ -11434,7 +11435,9 @@ var StyledTextInputContainer = index$a(View)(function (_ref13) {
11434
11435
  return {
11435
11436
  flexDirection: 'row',
11436
11437
  alignItems: 'center',
11437
- padding: theme.__hd__.textInput.space.containerPadding
11438
+ padding: theme.__hd__.textInput.space.containerPadding,
11439
+ backgroundColor: theme.__hd__.textInput.colors.containerBackground,
11440
+ borderRadius: theme.__hd__.textInput.radii.container
11438
11441
  };
11439
11442
  });
11440
11443
  var StyledTextInputAndLabelContainer = index$a(View)(function () {
@@ -11568,8 +11571,24 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref2, ref) {
11568
11571
  }, [textStyle]),
11569
11572
  borderStyle = _useMemo.borderStyle,
11570
11573
  textStyleWithoutBorderStyle = _useMemo.textStyleWithoutBorderStyle;
11574
+ var _useMemo2 = useMemo(function () {
11575
+ var _flattenTextStyle$bac;
11576
+ if (!style) {
11577
+ return {
11578
+ backgroundColor: theme.__hd__.textInput.colors.containerBackground
11579
+ };
11580
+ }
11581
+ var flattenTextStyle = StyleSheet$1.flatten(style);
11582
+ return {
11583
+ backgroundColor: (_flattenTextStyle$bac = flattenTextStyle.backgroundColor) !== null && _flattenTextStyle$bac !== void 0 ? _flattenTextStyle$bac : theme.__hd__.textInput.colors.containerBackground,
11584
+ styleWithoutBackgroundColor: omit(['backgroundColor'], flattenTextStyle)
11585
+ };
11586
+ }, [style, theme]),
11587
+ backgroundColor = _useMemo2.backgroundColor,
11588
+ styleWithoutBackgroundColor = _useMemo2.styleWithoutBackgroundColor;
11571
11589
  var nativeInputProps = _objectSpread2(_objectSpread2({
11572
11590
  style: StyleSheet$1.flatten([{
11591
+ backgroundColor: backgroundColor,
11573
11592
  color: theme.__hd__.textInput.colors.text
11574
11593
  }, textStyleWithoutBorderStyle]),
11575
11594
  testID: 'text-input',
@@ -11601,15 +11620,22 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref2, ref) {
11601
11620
  placeholder: isFocused || label === undefined ? nativeProps.placeholder : EMPTY_PLACEHOLDER_VALUE
11602
11621
  });
11603
11622
  return /*#__PURE__*/React.createElement(StyledContainer$3, {
11604
- style: style,
11623
+ style: styleWithoutBackgroundColor,
11605
11624
  pointerEvents: variant === 'disabled' || variant === 'readonly' ? 'none' : 'auto',
11606
11625
  testID: testID
11607
11626
  }, /*#__PURE__*/React.createElement(StyledTextInputContainer, null, /*#__PURE__*/React.createElement(StyledBorderBackDrop, {
11608
11627
  themeFocused: isFocused,
11609
11628
  themeVariant: variant,
11610
- style: borderStyle
11629
+ testID: "text-input-border",
11630
+ style: [{
11631
+ backgroundColor: backgroundColor
11632
+ }, borderStyle]
11611
11633
  }), (isFocused || label && !isEmptyValue) && /*#__PURE__*/React.createElement(StyledLabelContainer, {
11612
- pointerEvents: "none"
11634
+ pointerEvents: "none",
11635
+ testID: "label-container",
11636
+ style: {
11637
+ backgroundColor: backgroundColor
11638
+ }
11613
11639
  }, required && /*#__PURE__*/React.createElement(StyledAsteriskLabel, {
11614
11640
  themeVariant: variant,
11615
11641
  fontSize: "small"
@@ -11617,7 +11643,10 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref2, ref) {
11617
11643
  nativeID: accessibilityLabelledBy,
11618
11644
  testID: "input-label",
11619
11645
  fontSize: "small",
11620
- themeVariant: variant
11646
+ themeVariant: variant,
11647
+ style: {
11648
+ backgroundColor: backgroundColor
11649
+ }
11621
11650
  }, label)), typeof prefix === 'string' ? /*#__PURE__*/React.createElement(Icon, {
11622
11651
  intent: variant === 'disabled' ? 'disabled-text' : 'text',
11623
11652
  testID: "input-prefix",
@@ -12437,7 +12466,7 @@ var index$6 = Object.assign(FAB, {
12437
12466
  ActionGroup: ActionGroup
12438
12467
  });
12439
12468
 
12440
- var StyledListItemContainer$1 = index$a(TouchableOpacity)(function (_ref) {
12469
+ var StyledListItemContainer$1 = index$a(TouchableHighlight)(function (_ref) {
12441
12470
  var theme = _ref.theme,
12442
12471
  _ref$themeSelected = _ref.themeSelected,
12443
12472
  themeSelected = _ref$themeSelected === void 0 ? false : _ref$themeSelected,
@@ -12523,13 +12552,15 @@ var ListItem = function ListItem(_ref) {
12523
12552
  onPress = _ref.onPress,
12524
12553
  _ref$disabled = _ref.disabled,
12525
12554
  disabled = _ref$disabled === void 0 ? false : _ref$disabled;
12555
+ var theme = useTheme();
12526
12556
  return /*#__PURE__*/React.createElement(StyledListItemContainer$1, {
12527
12557
  style: style,
12528
12558
  testID: testID,
12529
12559
  themeSelected: selected,
12530
12560
  themeVariant: variant,
12531
12561
  onPress: onPress,
12532
- disabled: disabled
12562
+ disabled: disabled,
12563
+ underlayColor: theme.__hd__.list.colors.checkedListItemContainerBackground
12533
12564
  }, /*#__PURE__*/React.createElement(React.Fragment, null, leadingStatus && /*#__PURE__*/React.createElement(StyledLeadingStatus, {
12534
12565
  themeLeadingStatusIntent: leadingStatus,
12535
12566
  testID: "leadingStatus"
@@ -12571,7 +12602,7 @@ var StyledTitleContainer = index$a(View)(function () {
12571
12602
  flex: 1
12572
12603
  };
12573
12604
  });
12574
- var StyledListItemContainer = index$a(TouchableOpacity)(function (_ref3) {
12605
+ var StyledListItemContainer = index$a(TouchableHighlight)(function (_ref3) {
12575
12606
  var theme = _ref3.theme,
12576
12607
  themeSelected = _ref3.themeSelected,
12577
12608
  themeDisabled = _ref3.themeDisabled;
@@ -12597,13 +12628,15 @@ var BasicListItem = function BasicListItem(_ref) {
12597
12628
  _ref$disabled = _ref.disabled,
12598
12629
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
12599
12630
  onPress = _ref.onPress;
12631
+ var theme = useTheme();
12600
12632
  return /*#__PURE__*/React.createElement(StyledListItemContainer, {
12601
12633
  style: style,
12602
12634
  testID: testID,
12603
12635
  themeSelected: selected,
12604
12636
  themeDisabled: disabled,
12605
12637
  onPress: onPress,
12606
- disabled: disabled
12638
+ disabled: disabled,
12639
+ underlayColor: theme.__hd__.list.colors.checkedListItemContainerBackground
12607
12640
  }, /*#__PURE__*/React.createElement(React.Fragment, null, prefix && /*#__PURE__*/React.createElement(StyledPrefixContainer, null, typeof prefix === 'string' ? /*#__PURE__*/React.createElement(Icon, {
12608
12641
  icon: prefix,
12609
12642
  intent: disabled ? 'disabled-text' : 'primary'
package/lib/index.js CHANGED
@@ -2703,6 +2703,7 @@ var getTagTheme = function getTagTheme(theme) {
2703
2703
  var getTextInputTheme = function getTextInputTheme(theme) {
2704
2704
  var colors = {
2705
2705
  labelBackground: theme.colors.defaultGlobalSurface,
2706
+ containerBackground: theme.colors.defaultGlobalSurface,
2706
2707
  asterisks: {
2707
2708
  "default": theme.colors.onErrorSurface,
2708
2709
  error: theme.colors.onErrorSurface,
@@ -11463,7 +11464,9 @@ var StyledTextInputContainer = index$a(reactNative.View)(function (_ref13) {
11463
11464
  return {
11464
11465
  flexDirection: 'row',
11465
11466
  alignItems: 'center',
11466
- padding: theme.__hd__.textInput.space.containerPadding
11467
+ padding: theme.__hd__.textInput.space.containerPadding,
11468
+ backgroundColor: theme.__hd__.textInput.colors.containerBackground,
11469
+ borderRadius: theme.__hd__.textInput.radii.container
11467
11470
  };
11468
11471
  });
11469
11472
  var StyledTextInputAndLabelContainer = index$a(reactNative.View)(function () {
@@ -11597,8 +11600,24 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
11597
11600
  }, [textStyle]),
11598
11601
  borderStyle = _useMemo.borderStyle,
11599
11602
  textStyleWithoutBorderStyle = _useMemo.textStyleWithoutBorderStyle;
11603
+ var _useMemo2 = React.useMemo(function () {
11604
+ var _flattenTextStyle$bac;
11605
+ if (!style) {
11606
+ return {
11607
+ backgroundColor: theme.__hd__.textInput.colors.containerBackground
11608
+ };
11609
+ }
11610
+ var flattenTextStyle = reactNative.StyleSheet.flatten(style);
11611
+ return {
11612
+ backgroundColor: (_flattenTextStyle$bac = flattenTextStyle.backgroundColor) !== null && _flattenTextStyle$bac !== void 0 ? _flattenTextStyle$bac : theme.__hd__.textInput.colors.containerBackground,
11613
+ styleWithoutBackgroundColor: omit(['backgroundColor'], flattenTextStyle)
11614
+ };
11615
+ }, [style, theme]),
11616
+ backgroundColor = _useMemo2.backgroundColor,
11617
+ styleWithoutBackgroundColor = _useMemo2.styleWithoutBackgroundColor;
11600
11618
  var nativeInputProps = _objectSpread2(_objectSpread2({
11601
11619
  style: reactNative.StyleSheet.flatten([{
11620
+ backgroundColor: backgroundColor,
11602
11621
  color: theme.__hd__.textInput.colors.text
11603
11622
  }, textStyleWithoutBorderStyle]),
11604
11623
  testID: 'text-input',
@@ -11630,15 +11649,22 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
11630
11649
  placeholder: isFocused || label === undefined ? nativeProps.placeholder : EMPTY_PLACEHOLDER_VALUE
11631
11650
  });
11632
11651
  return /*#__PURE__*/React__default["default"].createElement(StyledContainer$3, {
11633
- style: style,
11652
+ style: styleWithoutBackgroundColor,
11634
11653
  pointerEvents: variant === 'disabled' || variant === 'readonly' ? 'none' : 'auto',
11635
11654
  testID: testID
11636
11655
  }, /*#__PURE__*/React__default["default"].createElement(StyledTextInputContainer, null, /*#__PURE__*/React__default["default"].createElement(StyledBorderBackDrop, {
11637
11656
  themeFocused: isFocused,
11638
11657
  themeVariant: variant,
11639
- style: borderStyle
11658
+ testID: "text-input-border",
11659
+ style: [{
11660
+ backgroundColor: backgroundColor
11661
+ }, borderStyle]
11640
11662
  }), (isFocused || label && !isEmptyValue) && /*#__PURE__*/React__default["default"].createElement(StyledLabelContainer, {
11641
- pointerEvents: "none"
11663
+ pointerEvents: "none",
11664
+ testID: "label-container",
11665
+ style: {
11666
+ backgroundColor: backgroundColor
11667
+ }
11642
11668
  }, required && /*#__PURE__*/React__default["default"].createElement(StyledAsteriskLabel, {
11643
11669
  themeVariant: variant,
11644
11670
  fontSize: "small"
@@ -11646,7 +11672,10 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
11646
11672
  nativeID: accessibilityLabelledBy,
11647
11673
  testID: "input-label",
11648
11674
  fontSize: "small",
11649
- themeVariant: variant
11675
+ themeVariant: variant,
11676
+ style: {
11677
+ backgroundColor: backgroundColor
11678
+ }
11650
11679
  }, label)), typeof prefix === 'string' ? /*#__PURE__*/React__default["default"].createElement(Icon, {
11651
11680
  intent: variant === 'disabled' ? 'disabled-text' : 'text',
11652
11681
  testID: "input-prefix",
@@ -12466,7 +12495,7 @@ var index$6 = Object.assign(FAB, {
12466
12495
  ActionGroup: ActionGroup
12467
12496
  });
12468
12497
 
12469
- var StyledListItemContainer$1 = index$a(reactNative.TouchableOpacity)(function (_ref) {
12498
+ var StyledListItemContainer$1 = index$a(reactNative.TouchableHighlight)(function (_ref) {
12470
12499
  var theme = _ref.theme,
12471
12500
  _ref$themeSelected = _ref.themeSelected,
12472
12501
  themeSelected = _ref$themeSelected === void 0 ? false : _ref$themeSelected,
@@ -12552,13 +12581,15 @@ var ListItem = function ListItem(_ref) {
12552
12581
  onPress = _ref.onPress,
12553
12582
  _ref$disabled = _ref.disabled,
12554
12583
  disabled = _ref$disabled === void 0 ? false : _ref$disabled;
12584
+ var theme = useTheme();
12555
12585
  return /*#__PURE__*/React__default["default"].createElement(StyledListItemContainer$1, {
12556
12586
  style: style,
12557
12587
  testID: testID,
12558
12588
  themeSelected: selected,
12559
12589
  themeVariant: variant,
12560
12590
  onPress: onPress,
12561
- disabled: disabled
12591
+ disabled: disabled,
12592
+ underlayColor: theme.__hd__.list.colors.checkedListItemContainerBackground
12562
12593
  }, /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, leadingStatus && /*#__PURE__*/React__default["default"].createElement(StyledLeadingStatus, {
12563
12594
  themeLeadingStatusIntent: leadingStatus,
12564
12595
  testID: "leadingStatus"
@@ -12600,7 +12631,7 @@ var StyledTitleContainer = index$a(reactNative.View)(function () {
12600
12631
  flex: 1
12601
12632
  };
12602
12633
  });
12603
- var StyledListItemContainer = index$a(reactNative.TouchableOpacity)(function (_ref3) {
12634
+ var StyledListItemContainer = index$a(reactNative.TouchableHighlight)(function (_ref3) {
12604
12635
  var theme = _ref3.theme,
12605
12636
  themeSelected = _ref3.themeSelected,
12606
12637
  themeDisabled = _ref3.themeDisabled;
@@ -12626,13 +12657,15 @@ var BasicListItem = function BasicListItem(_ref) {
12626
12657
  _ref$disabled = _ref.disabled,
12627
12658
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
12628
12659
  onPress = _ref.onPress;
12660
+ var theme = useTheme();
12629
12661
  return /*#__PURE__*/React__default["default"].createElement(StyledListItemContainer, {
12630
12662
  style: style,
12631
12663
  testID: testID,
12632
12664
  themeSelected: selected,
12633
12665
  themeDisabled: disabled,
12634
12666
  onPress: onPress,
12635
- disabled: disabled
12667
+ disabled: disabled,
12668
+ underlayColor: theme.__hd__.list.colors.checkedListItemContainerBackground
12636
12669
  }, /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, prefix && /*#__PURE__*/React__default["default"].createElement(StyledPrefixContainer, null, typeof prefix === 'string' ? /*#__PURE__*/React__default["default"].createElement(Icon, {
12637
12670
  icon: prefix,
12638
12671
  intent: disabled ? 'disabled-text' : 'primary'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "8.12.0",
3
+ "version": "8.12.1",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -21,7 +21,7 @@
21
21
  "dependencies": {
22
22
  "@emotion/native": "^11.9.3",
23
23
  "@emotion/react": "^11.9.3",
24
- "@hero-design/colors": "8.12.0",
24
+ "@hero-design/colors": "8.12.1",
25
25
  "date-fns": "^2.16.1",
26
26
  "events": "^3.2.0",
27
27
  "hero-editor": "^1.9.21"
@@ -44,7 +44,7 @@
44
44
  "@babel/preset-typescript": "^7.17.12",
45
45
  "@babel/runtime": "^7.18.9",
46
46
  "@emotion/jest": "^11.9.3",
47
- "@hero-design/eslint-plugin": "8.12.0",
47
+ "@hero-design/eslint-plugin": "8.12.1",
48
48
  "@react-native-community/datetimepicker": "^3.5.2",
49
49
  "@react-native-community/slider": "4.1.12",
50
50
  "@rollup/plugin-babel": "^5.3.1",
@@ -60,9 +60,9 @@
60
60
  "@types/react-native": "^0.67.7",
61
61
  "@types/react-native-vector-icons": "^6.4.10",
62
62
  "babel-plugin-inline-import": "^3.0.0",
63
- "eslint-config-hd": "8.12.0",
63
+ "eslint-config-hd": "8.12.1",
64
64
  "jest": "^27.3.1",
65
- "prettier-config-hd": "8.12.0",
65
+ "prettier-config-hd": "8.12.1",
66
66
  "react": "18.0.0",
67
67
  "react-native": "0.69.7",
68
68
  "react-native-gesture-handler": "~2.1.0",
@@ -44,6 +44,8 @@ exports[`DatePickerAndroid renders correctly 1`] = `
44
44
  Array [
45
45
  Object {
46
46
  "alignItems": "center",
47
+ "backgroundColor": "#ffffff",
48
+ "borderRadius": 8,
47
49
  "flexDirection": "row",
48
50
  "padding": 16,
49
51
  },
@@ -64,9 +66,15 @@ exports[`DatePickerAndroid renders correctly 1`] = `
64
66
  "right": 0,
65
67
  "top": 0,
66
68
  },
67
- undefined,
69
+ Array [
70
+ Object {
71
+ "backgroundColor": "#ffffff",
72
+ },
73
+ undefined,
74
+ ],
68
75
  ]
69
76
  }
77
+ testID="text-input-border"
70
78
  themeFocused={false}
71
79
  themeVariant="filled"
72
80
  />
@@ -83,9 +91,12 @@ exports[`DatePickerAndroid renders correctly 1`] = `
83
91
  "top": -10,
84
92
  "zIndex": 1,
85
93
  },
86
- undefined,
94
+ Object {
95
+ "backgroundColor": "#ffffff",
96
+ },
87
97
  ]
88
98
  }
99
+ testID="label-container"
89
100
  >
90
101
  <Text
91
102
  style={
@@ -101,7 +112,9 @@ exports[`DatePickerAndroid renders correctly 1`] = `
101
112
  Object {
102
113
  "color": "#001f23",
103
114
  },
104
- undefined,
115
+ Object {
116
+ "backgroundColor": "#ffffff",
117
+ },
105
118
  ],
106
119
  ]
107
120
  }
@@ -151,6 +164,7 @@ exports[`DatePickerAndroid renders correctly 1`] = `
151
164
  "textAlignVertical": "center",
152
165
  },
153
166
  Object {
167
+ "backgroundColor": "#ffffff",
154
168
  "color": "#001f23",
155
169
  },
156
170
  ]
@@ -44,6 +44,8 @@ exports[`DatePickerIOS renders correctly 1`] = `
44
44
  Array [
45
45
  Object {
46
46
  "alignItems": "center",
47
+ "backgroundColor": "#ffffff",
48
+ "borderRadius": 8,
47
49
  "flexDirection": "row",
48
50
  "padding": 16,
49
51
  },
@@ -64,9 +66,15 @@ exports[`DatePickerIOS renders correctly 1`] = `
64
66
  "right": 0,
65
67
  "top": 0,
66
68
  },
67
- undefined,
69
+ Array [
70
+ Object {
71
+ "backgroundColor": "#ffffff",
72
+ },
73
+ undefined,
74
+ ],
68
75
  ]
69
76
  }
77
+ testID="text-input-border"
70
78
  themeFocused={false}
71
79
  themeVariant="filled"
72
80
  />
@@ -83,9 +91,12 @@ exports[`DatePickerIOS renders correctly 1`] = `
83
91
  "top": -10,
84
92
  "zIndex": 1,
85
93
  },
86
- undefined,
94
+ Object {
95
+ "backgroundColor": "#ffffff",
96
+ },
87
97
  ]
88
98
  }
99
+ testID="label-container"
89
100
  >
90
101
  <Text
91
102
  style={
@@ -101,7 +112,9 @@ exports[`DatePickerIOS renders correctly 1`] = `
101
112
  Object {
102
113
  "color": "#001f23",
103
114
  },
104
- undefined,
115
+ Object {
116
+ "backgroundColor": "#ffffff",
117
+ },
105
118
  ],
106
119
  ]
107
120
  }
@@ -151,6 +164,7 @@ exports[`DatePickerIOS renders correctly 1`] = `
151
164
  "textAlignVertical": "center",
152
165
  },
153
166
  Object {
167
+ "backgroundColor": "#ffffff",
154
168
  "color": "#001f23",
155
169
  },
156
170
  ]
@@ -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' }) => {
@@ -8,7 +8,6 @@ exports[`BasicListItem when suffix and prefix are icon name renders correctly 1`
8
8
  }
9
9
  }
10
10
  accessible={true}
11
- collapsable={false}
12
11
  focusable={false}
13
12
  onClick={[Function]}
14
13
  onResponderGrant={[Function]}
@@ -18,14 +17,17 @@ exports[`BasicListItem when suffix and prefix are icon name renders correctly 1`
18
17
  onResponderTerminationRequest={[Function]}
19
18
  onStartShouldSetResponder={[Function]}
20
19
  style={
21
- Object {
22
- "alignItems": "center",
23
- "backgroundColor": "#ffffff",
24
- "borderRadius": 4,
25
- "flexDirection": "row",
26
- "opacity": 1,
27
- "padding": 16,
28
- }
20
+ Array [
21
+ Object {
22
+ "alignItems": "center",
23
+ "backgroundColor": "#ffffff",
24
+ "borderRadius": 4,
25
+ "flexDirection": "row",
26
+ "opacity": 1,
27
+ "padding": 16,
28
+ },
29
+ undefined,
30
+ ]
29
31
  }
30
32
  testID="basic-list-item"
31
33
  >
@@ -141,7 +143,6 @@ exports[`BasicListItem when suffix and prefix are react element renders correctl
141
143
  }
142
144
  }
143
145
  accessible={true}
144
- collapsable={false}
145
146
  focusable={false}
146
147
  onClick={[Function]}
147
148
  onResponderGrant={[Function]}
@@ -151,14 +152,17 @@ exports[`BasicListItem when suffix and prefix are react element renders correctl
151
152
  onResponderTerminationRequest={[Function]}
152
153
  onStartShouldSetResponder={[Function]}
153
154
  style={
154
- Object {
155
- "alignItems": "center",
156
- "backgroundColor": "#ffffff",
157
- "borderRadius": 4,
158
- "flexDirection": "row",
159
- "opacity": 1,
160
- "padding": 16,
161
- }
155
+ Array [
156
+ Object {
157
+ "alignItems": "center",
158
+ "backgroundColor": "#ffffff",
159
+ "borderRadius": 4,
160
+ "flexDirection": "row",
161
+ "opacity": 1,
162
+ "padding": 16,
163
+ },
164
+ undefined,
165
+ ]
162
166
  }
163
167
  testID="basic-list-item"
164
168
  >