@hero-design/rn 7.22.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/.turbo/turbo-build.log +2 -2
- package/es/index.js +20 -16
- package/lib/index.js +19 -15
- package/package.json +4 -4
- 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/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +176 -159
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +4691 -4606
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +4245 -4160
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +176 -159
- package/types/components/BottomSheet/StyledBottomSheet.d.ts +8 -2
- package/types/components/BottomSheet/index.d.ts +6 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
[34m@hero-design/rn:build[0m: cache hit, replaying output [
|
|
1
|
+
[34m@hero-design/rn:build[0m: cache hit, replaying output [2mf989e19224b6c38b[0m
|
|
2
2
|
[34m@hero-design/rn:build: [0m$ yarn build:js && yarn build:types
|
|
3
3
|
[34m@hero-design/rn:build: [0m$ rollup -c
|
|
4
4
|
[34m@hero-design/rn:build: [0m[36m
|
|
5
5
|
[34m@hero-design/rn:build: [0m[1msrc/index.ts[22m → [1mlib/index.js, es/index.js[22m...[39m
|
|
6
6
|
[34m@hero-design/rn:build: [0m[1m[33m(!) 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`.[39m[22m
|
|
7
7
|
[34m@hero-design/rn:build: [0m[1m[33m(!) 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[39m[22m
|
|
8
|
-
[34m@hero-design/rn:build: [0m[32mcreated [1mlib/index.js, es/index.js[22m in [
|
|
8
|
+
[34m@hero-design/rn:build: [0m[32mcreated [1mlib/index.js, es/index.js[22m in [1m26.3s[22m[39m
|
|
9
9
|
[34m@hero-design/rn:build: [0m$ tsc --noEmit false --emitDeclarationOnly
|
package/es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as reactNative from 'react-native';
|
|
2
|
-
import { Platform, Dimensions, StyleSheet as StyleSheet$1, Animated, View, Easing, TouchableOpacity, Text as Text$1, Image as Image$1, TouchableWithoutFeedback, Pressable, SafeAreaView, TouchableHighlight, Modal, TextInput as TextInput$1, PanResponder, InteractionManager, SectionList, Keyboard, FlatList, LayoutAnimation } from 'react-native';
|
|
2
|
+
import { Platform, Dimensions, StyleSheet as StyleSheet$1, Animated, View, Easing, TouchableOpacity, Text as Text$1, Image as Image$1, TouchableWithoutFeedback, Pressable, SafeAreaView, KeyboardAvoidingView, TouchableHighlight, Modal, TextInput as TextInput$1, PanResponder, InteractionManager, SectionList, Keyboard, FlatList, LayoutAnimation } from 'react-native';
|
|
3
3
|
import React, { useContext, createContext, createElement, forwardRef, useEffect, useCallback, useRef, useMemo, useState, useLayoutEffect, useImperativeHandle } from 'react';
|
|
4
4
|
import { createIconSetFromIcoMoon } from 'react-native-vector-icons';
|
|
5
5
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
@@ -15234,6 +15234,12 @@ var AnimatedSafeAreaView = Animated.createAnimatedComponent(SafeAreaView);
|
|
|
15234
15234
|
var StyledWrapper$7 = index$8(View)(_objectSpread2(_objectSpread2({}, StyleSheet$1.absoluteFillObject), {}, {
|
|
15235
15235
|
flexDirection: 'column-reverse'
|
|
15236
15236
|
}));
|
|
15237
|
+
var StyledKeyboardAvoidingView = index$8(KeyboardAvoidingView)(function () {
|
|
15238
|
+
return {
|
|
15239
|
+
flex: 1,
|
|
15240
|
+
flexDirection: 'column-reverse'
|
|
15241
|
+
};
|
|
15242
|
+
});
|
|
15237
15243
|
var StyledBottomSheet = index$8(AnimatedSafeAreaView)(function (_ref) {
|
|
15238
15244
|
var theme = _ref.theme;
|
|
15239
15245
|
return {
|
|
@@ -15936,18 +15942,18 @@ var BottomSheet = function BottomSheet(_ref) {
|
|
|
15936
15942
|
_ref$showDivider = _ref.showDivider,
|
|
15937
15943
|
showDivider = _ref$showDivider === void 0 ? true : _ref$showDivider,
|
|
15938
15944
|
style = _ref.style,
|
|
15939
|
-
testID = _ref.testID
|
|
15945
|
+
testID = _ref.testID,
|
|
15946
|
+
_ref$keyboardAvoiding = _ref.keyboardAvoidingViewProps,
|
|
15947
|
+
keyboardAvoidingViewProps = _ref$keyboardAvoiding === void 0 ? {} : _ref$keyboardAvoiding;
|
|
15940
15948
|
|
|
15941
|
-
var
|
|
15942
|
-
|
|
15943
|
-
height = _useState2[0],
|
|
15944
|
-
setHeight = _useState2[1]; // Internal state to control modal open/close timing with animation
|
|
15949
|
+
var _Dimensions$get = Dimensions.get('window'),
|
|
15950
|
+
height = _Dimensions$get.height; // Internal state to control modal open/close timing with animation
|
|
15945
15951
|
|
|
15946
15952
|
|
|
15947
|
-
var
|
|
15948
|
-
|
|
15949
|
-
visible =
|
|
15950
|
-
setVisibility =
|
|
15953
|
+
var _useState = useState(open),
|
|
15954
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
15955
|
+
visible = _useState2[0],
|
|
15956
|
+
setVisibility = _useState2[1];
|
|
15951
15957
|
|
|
15952
15958
|
var animatedValue = useRef(new Animated.Value(open ? 0 : 1));
|
|
15953
15959
|
useEffect(function () {
|
|
@@ -16005,11 +16011,9 @@ var BottomSheet = function BottomSheet(_ref) {
|
|
|
16005
16011
|
opacity: interpolateOpacity
|
|
16006
16012
|
},
|
|
16007
16013
|
onPress: onRequestClose
|
|
16008
|
-
}), /*#__PURE__*/React.createElement(
|
|
16009
|
-
|
|
16010
|
-
|
|
16011
|
-
return setHeight(nativeEvent.layout.height);
|
|
16012
|
-
},
|
|
16014
|
+
}), /*#__PURE__*/React.createElement(StyledKeyboardAvoidingView, _extends$1({
|
|
16015
|
+
behavior: Platform.OS === 'ios' ? 'padding' : 'height'
|
|
16016
|
+
}, keyboardAvoidingViewProps), /*#__PURE__*/React.createElement(StyledBottomSheet, {
|
|
16013
16017
|
style: [style, {
|
|
16014
16018
|
transform: [{
|
|
16015
16019
|
scaleY: height > 0 ? 1 : 0
|
|
@@ -16024,7 +16028,7 @@ var BottomSheet = function BottomSheet(_ref) {
|
|
|
16024
16028
|
showCloseButton: showCloseButton
|
|
16025
16029
|
}) : null, children, footer ? /*#__PURE__*/React.createElement(Footer$1, {
|
|
16026
16030
|
showDivider: showDivider
|
|
16027
|
-
}, footer) : null)));
|
|
16031
|
+
}, footer) : null))));
|
|
16028
16032
|
};
|
|
16029
16033
|
|
|
16030
16034
|
var colors = {
|
package/lib/index.js
CHANGED
|
@@ -15263,6 +15263,12 @@ var AnimatedSafeAreaView = reactNative.Animated.createAnimatedComponent(reactNat
|
|
|
15263
15263
|
var StyledWrapper$7 = index$8(reactNative.View)(_objectSpread2(_objectSpread2({}, reactNative.StyleSheet.absoluteFillObject), {}, {
|
|
15264
15264
|
flexDirection: 'column-reverse'
|
|
15265
15265
|
}));
|
|
15266
|
+
var StyledKeyboardAvoidingView = index$8(reactNative.KeyboardAvoidingView)(function () {
|
|
15267
|
+
return {
|
|
15268
|
+
flex: 1,
|
|
15269
|
+
flexDirection: 'column-reverse'
|
|
15270
|
+
};
|
|
15271
|
+
});
|
|
15266
15272
|
var StyledBottomSheet = index$8(AnimatedSafeAreaView)(function (_ref) {
|
|
15267
15273
|
var theme = _ref.theme;
|
|
15268
15274
|
return {
|
|
@@ -15965,18 +15971,18 @@ var BottomSheet = function BottomSheet(_ref) {
|
|
|
15965
15971
|
_ref$showDivider = _ref.showDivider,
|
|
15966
15972
|
showDivider = _ref$showDivider === void 0 ? true : _ref$showDivider,
|
|
15967
15973
|
style = _ref.style,
|
|
15968
|
-
testID = _ref.testID
|
|
15974
|
+
testID = _ref.testID,
|
|
15975
|
+
_ref$keyboardAvoiding = _ref.keyboardAvoidingViewProps,
|
|
15976
|
+
keyboardAvoidingViewProps = _ref$keyboardAvoiding === void 0 ? {} : _ref$keyboardAvoiding;
|
|
15969
15977
|
|
|
15970
|
-
var
|
|
15971
|
-
|
|
15972
|
-
height = _useState2[0],
|
|
15973
|
-
setHeight = _useState2[1]; // Internal state to control modal open/close timing with animation
|
|
15978
|
+
var _Dimensions$get = reactNative.Dimensions.get('window'),
|
|
15979
|
+
height = _Dimensions$get.height; // Internal state to control modal open/close timing with animation
|
|
15974
15980
|
|
|
15975
15981
|
|
|
15976
|
-
var
|
|
15977
|
-
|
|
15978
|
-
visible =
|
|
15979
|
-
setVisibility =
|
|
15982
|
+
var _useState = React.useState(open),
|
|
15983
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
15984
|
+
visible = _useState2[0],
|
|
15985
|
+
setVisibility = _useState2[1];
|
|
15980
15986
|
|
|
15981
15987
|
var animatedValue = React.useRef(new reactNative.Animated.Value(open ? 0 : 1));
|
|
15982
15988
|
React.useEffect(function () {
|
|
@@ -16034,11 +16040,9 @@ var BottomSheet = function BottomSheet(_ref) {
|
|
|
16034
16040
|
opacity: interpolateOpacity
|
|
16035
16041
|
},
|
|
16036
16042
|
onPress: onRequestClose
|
|
16037
|
-
}), /*#__PURE__*/React__default["default"].createElement(
|
|
16038
|
-
|
|
16039
|
-
|
|
16040
|
-
return setHeight(nativeEvent.layout.height);
|
|
16041
|
-
},
|
|
16043
|
+
}), /*#__PURE__*/React__default["default"].createElement(StyledKeyboardAvoidingView, _extends$1({
|
|
16044
|
+
behavior: reactNative.Platform.OS === 'ios' ? 'padding' : 'height'
|
|
16045
|
+
}, keyboardAvoidingViewProps), /*#__PURE__*/React__default["default"].createElement(StyledBottomSheet, {
|
|
16042
16046
|
style: [style, {
|
|
16043
16047
|
transform: [{
|
|
16044
16048
|
scaleY: height > 0 ? 1 : 0
|
|
@@ -16053,7 +16057,7 @@ var BottomSheet = function BottomSheet(_ref) {
|
|
|
16053
16057
|
showCloseButton: showCloseButton
|
|
16054
16058
|
}) : null, children, footer ? /*#__PURE__*/React__default["default"].createElement(Footer$1, {
|
|
16055
16059
|
showDivider: showDivider
|
|
16056
|
-
}, footer) : null)));
|
|
16060
|
+
}, footer) : null))));
|
|
16057
16061
|
};
|
|
16058
16062
|
|
|
16059
16063
|
var colors = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hero-design/rn",
|
|
3
|
-
"version": "7.22.
|
|
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.22.
|
|
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"
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@types/react-native": "^0.67.7",
|
|
58
58
|
"@types/react-native-vector-icons": "^6.4.10",
|
|
59
59
|
"babel-plugin-inline-import": "^3.0.0",
|
|
60
|
-
"eslint-config-hd": "7.22.
|
|
60
|
+
"eslint-config-hd": "7.22.1",
|
|
61
61
|
"jest": "^27.3.1",
|
|
62
62
|
"react": "17.0.2",
|
|
63
63
|
"react-native": "0.65.1",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"rollup-plugin-copy": "^3.4.0",
|
|
71
71
|
"rollup-plugin-flow": "^1.1.1",
|
|
72
72
|
"ts-jest": "^27.0.7",
|
|
73
|
-
"prettier-config-hd": "7.22.
|
|
73
|
+
"prettier-config-hd": "7.22.1"
|
|
74
74
|
},
|
|
75
75
|
"prettier": "prettier-config-hd"
|
|
76
76
|
}
|
|
@@ -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
|
};
|