@hero-design/rn 7.21.0 → 7.22.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.
- package/.eslintrc.js +11 -0
- package/.turbo/turbo-build.log +9 -9
- package/babel.config.js +1 -1
- package/es/index.js +377 -263
- package/lib/index.js +380 -266
- package/package.json +7 -15
- package/src/components/BottomNavigation/__tests__/index.spec.tsx +1 -1
- package/src/components/BottomNavigation/index.tsx +3 -3
- package/src/components/BottomSheet/StyledBottomSheet.tsx +10 -0
- package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +326 -292
- package/src/components/BottomSheet/index.tsx +46 -26
- package/src/components/Box/helpers.ts +1 -1
- package/src/components/Calendar/index.tsx +9 -9
- package/src/components/Collapse/index.tsx +1 -1
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +176 -159
- package/src/components/Drawer/DragableDrawer/helpers.ts +7 -3
- package/src/components/FAB/ActionGroup/index.tsx +1 -1
- package/src/components/Icon/HeroIcon/selection.json +7029 -1
- package/src/components/PinInput/index.tsx +1 -1
- package/src/components/RichTextEditor/EditorToolbar.tsx +3 -3
- package/src/components/RichTextEditor/RichTextEditor.tsx +5 -5
- package/src/components/RichTextEditor/__tests__/EditorToolbar.spec.tsx +2 -2
- package/src/components/RichTextEditor/__tests__/MentionList.spec.tsx +1 -1
- package/src/components/Select/MultiSelect/OptionList.tsx +1 -1
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +4691 -4606
- package/src/components/Select/MultiSelect/__tests__/index.spec.tsx +1 -1
- package/src/components/Select/MultiSelect/index.tsx +3 -3
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +4245 -4160
- package/src/components/Select/SingleSelect/index.tsx +3 -3
- package/src/components/Select/helpers.tsx +4 -4
- package/src/components/Slider/index.tsx +1 -1
- package/src/components/Switch/SelectorSwitch/Option.tsx +67 -0
- package/src/components/Switch/SelectorSwitch/StyledSelectorSwitch.tsx +25 -0
- package/src/components/Switch/SelectorSwitch/__tests__/Option.spec.tsx +61 -0
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/Option.spec.tsx.snap +195 -0
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +121 -0
- package/src/components/Switch/SelectorSwitch/__tests__/index.spec.tsx +62 -0
- package/src/components/Switch/SelectorSwitch/index.tsx +60 -0
- package/src/components/Switch/index.tsx +4 -1
- package/src/components/Tabs/ScrollableTabs.tsx +12 -5
- package/src/components/Tabs/__tests__/ScrollableTabs.spec.tsx +1 -1
- package/src/components/Tabs/__tests__/index.spec.tsx +1 -1
- package/src/components/Tabs/index.tsx +13 -6
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +3 -1
- package/src/components/TextInput/__tests__/index.spec.tsx +114 -112
- package/src/components/TextInput/index.tsx +29 -30
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +176 -159
- package/src/components/Toast/ToastContainer.tsx +6 -6
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +14 -12
- package/src/theme/components/switch.ts +14 -18
- package/testUtils/setup.tsx +1 -1
- package/tsconfig.json +1 -1
- package/types/components/BottomSheet/StyledBottomSheet.d.ts +8 -2
- package/types/components/BottomSheet/index.d.ts +6 -1
- package/types/components/Slider/index.d.ts +1 -1
- package/types/components/Switch/SelectorSwitch/Option.d.ts +10 -0
- package/types/components/Switch/SelectorSwitch/StyledSelectorSwitch.d.ts +19 -0
- package/types/components/Switch/SelectorSwitch/__tests__/Option.spec.d.ts +1 -0
- package/types/components/Switch/SelectorSwitch/__tests__/index.spec.d.ts +1 -0
- package/types/components/Switch/SelectorSwitch/index.d.ts +37 -0
- package/types/components/Switch/index.d.ts +5 -3
- package/types/components/Tabs/ScrollableTabs.d.ts +1 -1
- package/types/components/Tabs/index.d.ts +2 -2
- package/types/components/TextInput/index.d.ts +4 -4
- package/types/theme/components/switch.d.ts +14 -12
- package/.eslintrc.json +0 -62
- package/.prettierrc.json +0 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hero-design/rn",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.22.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@emotion/native": "^11.9.3",
|
|
22
22
|
"@emotion/react": "^11.9.3",
|
|
23
|
-
"@hero-design/colors": "7.
|
|
23
|
+
"@hero-design/colors": "7.22.1",
|
|
24
24
|
"date-fns": "^2.16.1",
|
|
25
25
|
"events": "^3.2.0",
|
|
26
26
|
"hero-editor": "^1.9.9"
|
|
@@ -56,19 +56,9 @@
|
|
|
56
56
|
"@types/react": "^17.0.39",
|
|
57
57
|
"@types/react-native": "^0.67.7",
|
|
58
58
|
"@types/react-native-vector-icons": "^6.4.10",
|
|
59
|
-
"@typescript-eslint/eslint-plugin": "^5.12.1",
|
|
60
|
-
"@typescript-eslint/parser": "^5.12.1",
|
|
61
59
|
"babel-plugin-inline-import": "^3.0.0",
|
|
62
|
-
"eslint": "
|
|
63
|
-
"eslint-config-airbnb": "^19.0.4",
|
|
64
|
-
"eslint-config-prettier": "^8.5.0",
|
|
65
|
-
"eslint-plugin-import": "^2.25.4",
|
|
66
|
-
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
67
|
-
"eslint-plugin-prettier": "^4.0.0",
|
|
68
|
-
"eslint-plugin-react": "^7.28.0",
|
|
69
|
-
"eslint-plugin-react-hooks": "^4.3.0",
|
|
60
|
+
"eslint-config-hd": "7.22.1",
|
|
70
61
|
"jest": "^27.3.1",
|
|
71
|
-
"prettier": "^2.5.1",
|
|
72
62
|
"react": "17.0.2",
|
|
73
63
|
"react-native": "0.65.1",
|
|
74
64
|
"react-native-pager-view": "^5.4.25",
|
|
@@ -79,6 +69,8 @@
|
|
|
79
69
|
"rollup": "^2.68.0",
|
|
80
70
|
"rollup-plugin-copy": "^3.4.0",
|
|
81
71
|
"rollup-plugin-flow": "^1.1.1",
|
|
82
|
-
"ts-jest": "^27.0.7"
|
|
83
|
-
|
|
72
|
+
"ts-jest": "^27.0.7",
|
|
73
|
+
"prettier-config-hd": "7.22.1"
|
|
74
|
+
},
|
|
75
|
+
"prettier": "prettier-config-hd"
|
|
84
76
|
}
|
|
@@ -80,13 +80,13 @@ const BottomNavigation = ({
|
|
|
80
80
|
|
|
81
81
|
if (!loaded.includes(selectedTabKey)) {
|
|
82
82
|
// Set the current tab to be loaded if it was not loaded before
|
|
83
|
-
setLoaded(loadedState => [...loadedState, selectedTabKey]);
|
|
83
|
+
setLoaded((loadedState) => [...loadedState, selectedTabKey]);
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
return (
|
|
87
87
|
<BottomNavigationContainer {...nativeProps}>
|
|
88
88
|
<ContentWrapper>
|
|
89
|
-
{tabs.map(tab => {
|
|
89
|
+
{tabs.map((tab) => {
|
|
90
90
|
const { key, component, testID } = tab;
|
|
91
91
|
const active = selectedTabKey === key;
|
|
92
92
|
|
|
@@ -123,7 +123,7 @@ const BottomNavigation = ({
|
|
|
123
123
|
</ContentWrapper>
|
|
124
124
|
<BottomBarWrapper themeInsets={insets}>
|
|
125
125
|
<BottomBar>
|
|
126
|
-
{tabs.map(tab => {
|
|
126
|
+
{tabs.map((tab) => {
|
|
127
127
|
const { key, icon, title, testID } = tab;
|
|
128
128
|
const active = selectedTabKey === key;
|
|
129
129
|
const inactiveIcon = getInactiveIcon(icon);
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import styled from '@emotion/native';
|
|
2
2
|
import {
|
|
3
3
|
Animated,
|
|
4
|
+
KeyboardAvoidingView,
|
|
5
|
+
KeyboardAvoidingViewProps,
|
|
4
6
|
Pressable,
|
|
5
7
|
SafeAreaView,
|
|
6
8
|
StyleSheet,
|
|
@@ -17,6 +19,13 @@ const StyledWrapper = styled(View)<ViewProps>({
|
|
|
17
19
|
flexDirection: 'column-reverse',
|
|
18
20
|
});
|
|
19
21
|
|
|
22
|
+
const StyledKeyboardAvoidingView = styled(
|
|
23
|
+
KeyboardAvoidingView
|
|
24
|
+
)<KeyboardAvoidingViewProps>(() => ({
|
|
25
|
+
flex: 1,
|
|
26
|
+
flexDirection: 'column-reverse',
|
|
27
|
+
}));
|
|
28
|
+
|
|
20
29
|
const StyledBottomSheet = styled(AnimatedSafeAreaView)<
|
|
21
30
|
ComponentProps<typeof AnimatedSafeAreaView>
|
|
22
31
|
>(({ theme }) => ({
|
|
@@ -77,4 +86,5 @@ export {
|
|
|
77
86
|
StyledIconWrapper,
|
|
78
87
|
StyledBottomSheet,
|
|
79
88
|
StyledBackdrop,
|
|
89
|
+
StyledKeyboardAvoidingView,
|
|
80
90
|
};
|