@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.
- package/.turbo/turbo-build.log +2 -2
- package/es/index.js +176 -2444
- package/lib/index.js +449 -2717
- package/package.json +3 -4
- package/rollup.config.js +2 -0
- package/src/components/DatePicker/DatePickerIOS.tsx +2 -2
- package/src/components/List/StyledBasicListItem.tsx +2 -2
- package/src/components/Select/MultiSelect/Option.tsx +7 -10
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +39 -21
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +342 -203
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +366 -224
- package/src/components/Select/SingleSelect/Option.tsx +2 -11
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +21 -14
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +252 -168
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +294 -196
- package/src/components/Select/StyledSelect.tsx +2 -15
- package/src/components/Select/__tests__/StyledSelect.spec.tsx +1 -15
- package/src/components/Select/__tests__/__snapshots__/StyledSelect.spec.tsx.snap +0 -54
- package/src/components/TimePicker/TimePickerIOS.tsx +2 -2
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +0 -2
- package/src/theme/components/select.ts +0 -2
- package/types/components/Select/StyledSelect.d.ts +2 -10
- package/types/theme/components/select.d.ts +0 -2
|
@@ -1,20 +1,7 @@
|
|
|
1
|
-
import { View
|
|
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 {
|
|
19
|
+
export { Spacer, FooterText, StyledSearchBar };
|
|
@@ -1,20 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import renderWithTheme from '../../../testHelpers/renderWithTheme';
|
|
3
|
-
import {
|
|
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
|
|
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
|
|
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.
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
import { View
|
|
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 {
|
|
18
|
+
export { Spacer, FooterText, StyledSearchBar };
|