@hero-design/rn 7.16.0 → 7.16.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.
@@ -1,20 +1,7 @@
1
- import { View, TouchableOpacity } from 'react-native';
1
+ import { View } from 'react-native';
2
2
  import styled from '@emotion/native';
3
3
  import Typography from '../Typography';
4
4
 
5
- const OptionWrapper = styled(TouchableOpacity)<{
6
- themeSelected: boolean;
7
- }>(({ theme, themeSelected }) => ({
8
- flexDirection: 'row',
9
- justifyContent: 'space-between',
10
- alignItems: 'center',
11
- borderRadius: theme.__hd__.select.radii.option,
12
- padding: theme.__hd__.select.space.optionPadding,
13
- backgroundColor: themeSelected
14
- ? theme.__hd__.select.colors.checkedOption
15
- : theme.__hd__.select.colors.option,
16
- }));
17
-
18
5
  const Spacer = styled(View)(({ theme }) => ({
19
6
  marginTop: theme.__hd__.select.space.optionListSpacing,
20
7
  }));
@@ -29,4 +16,4 @@ const StyledSearchBar = styled(View)(({ theme }) => ({
29
16
  paddingBottom: theme.__hd__.select.space.searchBarBottomSpacing,
30
17
  }));
31
18
 
32
- export { OptionWrapper, Spacer, FooterText, StyledSearchBar };
19
+ export { Spacer, FooterText, StyledSearchBar };
@@ -1,20 +1,6 @@
1
1
  import React from 'react';
2
2
  import renderWithTheme from '../../../testHelpers/renderWithTheme';
3
- import { OptionWrapper, Spacer, FooterText } from '../StyledSelect';
4
-
5
- describe('OptionWrapper', () => {
6
- it.each`
7
- themeSelected
8
- ${true}
9
- ${false}
10
- `('has selected style: $themeSelected', ({ themeSelected }) => {
11
- const { toJSON } = renderWithTheme(
12
- <OptionWrapper themeSelected={themeSelected} />
13
- );
14
-
15
- expect(toJSON()).toMatchSnapshot();
16
- });
17
- });
3
+ import { Spacer, FooterText } from '../StyledSelect';
18
4
 
19
5
  describe('Spacer', () => {
20
6
  it('has correct style', () => {
@@ -27,60 +27,6 @@ exports[`FooterText has correct style 1`] = `
27
27
  </Text>
28
28
  `;
29
29
 
30
- exports[`OptionWrapper has selected style: false 1`] = `
31
- <View
32
- accessible={true}
33
- collapsable={false}
34
- focusable={false}
35
- nativeID="animatedComponent"
36
- onClick={[Function]}
37
- onResponderGrant={[Function]}
38
- onResponderMove={[Function]}
39
- onResponderRelease={[Function]}
40
- onResponderTerminate={[Function]}
41
- onResponderTerminationRequest={[Function]}
42
- onStartShouldSetResponder={[Function]}
43
- style={
44
- Object {
45
- "alignItems": "center",
46
- "backgroundColor": "#ffffff",
47
- "borderRadius": 4,
48
- "flexDirection": "row",
49
- "justifyContent": "space-between",
50
- "opacity": 1,
51
- "padding": 16,
52
- }
53
- }
54
- />
55
- `;
56
-
57
- exports[`OptionWrapper has selected style: true 1`] = `
58
- <View
59
- accessible={true}
60
- collapsable={false}
61
- focusable={false}
62
- nativeID="animatedComponent"
63
- onClick={[Function]}
64
- onResponderGrant={[Function]}
65
- onResponderMove={[Function]}
66
- onResponderRelease={[Function]}
67
- onResponderTerminate={[Function]}
68
- onResponderTerminationRequest={[Function]}
69
- onStartShouldSetResponder={[Function]}
70
- style={
71
- Object {
72
- "alignItems": "center",
73
- "backgroundColor": "#f1e9fb",
74
- "borderRadius": 4,
75
- "flexDirection": "row",
76
- "justifyContent": "space-between",
77
- "opacity": 1,
78
- "padding": 16,
79
- }
80
- }
81
- />
82
- `;
83
-
84
30
  exports[`Spacer has correct style 1`] = `
85
31
  <View
86
32
  style={
@@ -23,7 +23,7 @@ const TimePickerIOS = ({
23
23
  style,
24
24
  testID,
25
25
  }: TimePickerProps) => {
26
- const [selectingDate, setSelectingDate] = useState<Date | undefined>(value);
26
+ const [selectingDate, setSelectingDate] = useState<Date>(value || new Date());
27
27
  const [open, setOpen] = useState(false);
28
28
 
29
29
  const is12Hour = displayFormat.includes('hh');
@@ -71,7 +71,7 @@ const TimePickerIOS = ({
71
71
  <StyledPickerWrapper>
72
72
  <DateTimePicker
73
73
  testID="timePickerIOS"
74
- value={selectingDate || new Date()}
74
+ value={selectingDate}
75
75
  mode="time"
76
76
  // Current prop is24Hour config only available for Android.
77
77
  // This is a work around to get the picker to display 24 hour format for iOS.
@@ -552,9 +552,7 @@ Object {
552
552
  },
553
553
  "select": Object {
554
554
  "colors": Object {
555
- "checkedOption": "#f1e9fb",
556
555
  "footerText": "#7622d7",
557
- "option": "#ffffff",
558
556
  },
559
557
  "radii": Object {
560
558
  "option": 4,
@@ -2,8 +2,6 @@ import { GlobalTheme } from '../global';
2
2
 
3
3
  const getSelectTheme = (theme: GlobalTheme) => {
4
4
  const colors = {
5
- option: theme.colors.platformBackground,
6
- checkedOption: theme.colors.primaryBackground,
7
5
  footerText: theme.colors.primary,
8
6
  };
9
7
 
@@ -1,12 +1,4 @@
1
- import { View, TouchableOpacity } from 'react-native';
2
- declare const OptionWrapper: import("@emotion/native").StyledComponent<import("react-native").TouchableOpacityProps & {
3
- theme?: import("@emotion/react").Theme | undefined;
4
- as?: import("react").ElementType<any> | undefined;
5
- } & {
6
- themeSelected: boolean;
7
- }, {}, {
8
- ref?: import("react").Ref<TouchableOpacity> | undefined;
9
- }>;
1
+ import { View } from 'react-native';
10
2
  declare const Spacer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
11
3
  theme?: import("@emotion/react").Theme | undefined;
12
4
  as?: import("react").ElementType<any> | undefined;
@@ -23,4 +15,4 @@ declare const StyledSearchBar: import("@emotion/native").StyledComponent<import(
23
15
  }, {}, {
24
16
  ref?: import("react").Ref<View> | undefined;
25
17
  }>;
26
- export { OptionWrapper, Spacer, FooterText, StyledSearchBar };
18
+ export { Spacer, FooterText, StyledSearchBar };
@@ -10,8 +10,6 @@ declare const getSelectTheme: (theme: GlobalTheme) => {
10
10
  searchBarBottomSpacing: number;
11
11
  };
12
12
  colors: {
13
- option: string;
14
- checkedOption: string;
15
13
  footerText: string;
16
14
  };
17
15
  radii: {