@hero-design/rn-work-uikit 1.11.1-alpha.0 → 1.11.2-alpha.0
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/CHANGELOG.md +9 -2
- package/es/index.js +62 -30
- package/lib/index.js +62 -30
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
# @hero-design/rn-work-uikit
|
|
2
2
|
|
|
3
|
-
## 1.11.
|
|
3
|
+
## 1.11.2-alpha.0
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
7
|
- Updated dependencies [[`82a9532c5364c2dea2ffc96153103522295aa868`](https://github.com/Thinkei/hero-design/commit/82a9532c5364c2dea2ffc96153103522295aa868)]:
|
|
8
|
-
- @hero-design/rn@8.118.
|
|
8
|
+
- @hero-design/rn@8.118.2-alpha.0
|
|
9
|
+
|
|
10
|
+
## 1.11.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [[`2d4e3f901018d95280909eac099ad387982ff1b7`](https://github.com/Thinkei/hero-design/commit/2d4e3f901018d95280909eac099ad387982ff1b7)]:
|
|
15
|
+
- @hero-design/rn@8.118.1
|
|
9
16
|
|
|
10
17
|
## 1.11.0
|
|
11
18
|
|
package/es/index.js
CHANGED
|
@@ -24851,7 +24851,7 @@ var FAB$1 = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
24851
24851
|
var onPress = _ref3.onPress,
|
|
24852
24852
|
title = _ref3.title,
|
|
24853
24853
|
icon = _ref3.icon,
|
|
24854
|
-
|
|
24854
|
+
iconAnimated = _ref3.animated,
|
|
24855
24855
|
testID = _ref3.testID,
|
|
24856
24856
|
active = _ref3.active,
|
|
24857
24857
|
style = _ref3.style;
|
|
@@ -24878,49 +24878,78 @@ var FAB$1 = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
24878
24878
|
React__default.useImperativeHandle(ref, function () {
|
|
24879
24879
|
return {
|
|
24880
24880
|
show: function show() {
|
|
24881
|
-
|
|
24882
|
-
|
|
24883
|
-
useNativeDriver: true
|
|
24884
|
-
}).start();
|
|
24881
|
+
var animated = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
24882
|
+
var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop$2;
|
|
24885
24883
|
setDisplayState({
|
|
24886
24884
|
hideButton: false,
|
|
24887
24885
|
hideTitle: false
|
|
24888
24886
|
});
|
|
24889
24887
|
animateWidth();
|
|
24890
|
-
|
|
24891
|
-
|
|
24892
|
-
|
|
24893
|
-
|
|
24888
|
+
if (animated) {
|
|
24889
|
+
Animated.parallel([Animated.spring(animatedValues.opacity, {
|
|
24890
|
+
toValue: 1,
|
|
24891
|
+
useNativeDriver: true
|
|
24892
|
+
}), Animated.spring(animatedValues.translateY, {
|
|
24893
|
+
toValue: 0,
|
|
24894
|
+
useNativeDriver: true
|
|
24895
|
+
})]).start(callback);
|
|
24896
|
+
} else {
|
|
24897
|
+
animatedValues.opacity.setValue(1);
|
|
24898
|
+
animatedValues.translateY.setValue(0);
|
|
24899
|
+
}
|
|
24894
24900
|
},
|
|
24895
24901
|
collapse: function collapse() {
|
|
24896
|
-
|
|
24897
|
-
|
|
24898
|
-
useNativeDriver: true
|
|
24899
|
-
}), Animated.spring(animatedValues.translateY, {
|
|
24900
|
-
toValue: 0,
|
|
24901
|
-
useNativeDriver: true
|
|
24902
|
-
})]).start();
|
|
24903
|
-
animateWidth();
|
|
24902
|
+
var animated = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
24903
|
+
var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop$2;
|
|
24904
24904
|
setDisplayState({
|
|
24905
24905
|
hideButton: false,
|
|
24906
24906
|
hideTitle: true
|
|
24907
24907
|
});
|
|
24908
|
+
animateWidth();
|
|
24909
|
+
if (animated) {
|
|
24910
|
+
Animated.parallel([Animated.spring(animatedValues.opacity, {
|
|
24911
|
+
toValue: 1,
|
|
24912
|
+
useNativeDriver: true
|
|
24913
|
+
}), Animated.spring(animatedValues.translateY, {
|
|
24914
|
+
toValue: 0,
|
|
24915
|
+
useNativeDriver: true
|
|
24916
|
+
})]).start(callback);
|
|
24917
|
+
} else {
|
|
24918
|
+
animatedValues.opacity.setValue(1);
|
|
24919
|
+
animatedValues.translateY.setValue(0);
|
|
24920
|
+
}
|
|
24908
24921
|
},
|
|
24909
24922
|
hide: function hide() {
|
|
24910
|
-
|
|
24911
|
-
|
|
24912
|
-
|
|
24913
|
-
|
|
24914
|
-
|
|
24915
|
-
|
|
24916
|
-
|
|
24923
|
+
var animated = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
24924
|
+
var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop$2;
|
|
24925
|
+
if (animated) {
|
|
24926
|
+
Animated.stagger(20, [Animated.spring(animatedValues.opacity, {
|
|
24927
|
+
toValue: 0,
|
|
24928
|
+
useNativeDriver: true
|
|
24929
|
+
}), Animated.spring(animatedValues.translateY, {
|
|
24930
|
+
toValue: 1,
|
|
24931
|
+
useNativeDriver: true
|
|
24932
|
+
})]).start(function (arg) {
|
|
24933
|
+
animateWidth();
|
|
24934
|
+
setDisplayState(function (previousState) {
|
|
24935
|
+
return _objectSpread2(_objectSpread2({}, previousState), {}, {
|
|
24936
|
+
hideButton: true
|
|
24937
|
+
});
|
|
24938
|
+
});
|
|
24939
|
+
if (callback) {
|
|
24940
|
+
callback(arg);
|
|
24941
|
+
}
|
|
24942
|
+
});
|
|
24943
|
+
} else {
|
|
24944
|
+
animatedValues.opacity.setValue(0);
|
|
24945
|
+
animatedValues.translateY.setValue(1);
|
|
24917
24946
|
animateWidth();
|
|
24918
24947
|
setDisplayState(function (previousState) {
|
|
24919
24948
|
return _objectSpread2(_objectSpread2({}, previousState), {}, {
|
|
24920
24949
|
hideButton: true
|
|
24921
24950
|
});
|
|
24922
24951
|
});
|
|
24923
|
-
}
|
|
24952
|
+
}
|
|
24924
24953
|
}
|
|
24925
24954
|
};
|
|
24926
24955
|
}, []);
|
|
@@ -24950,7 +24979,7 @@ var FAB$1 = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
|
|
24950
24979
|
})
|
|
24951
24980
|
}
|
|
24952
24981
|
}, isIconOnly ? /*#__PURE__*/React__default.createElement(IconOnlyContent, {
|
|
24953
|
-
animated:
|
|
24982
|
+
animated: iconAnimated,
|
|
24954
24983
|
active: active,
|
|
24955
24984
|
icon: active ? 'add' : icon
|
|
24956
24985
|
}) : /*#__PURE__*/React__default.createElement(IconWithTextContent, {
|
|
@@ -25049,15 +25078,18 @@ var ActionGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
25049
25078
|
React__default.useEffect(function () {
|
|
25050
25079
|
Animated.spring(animatedValue.current, {
|
|
25051
25080
|
toValue: active ? 1 : 0,
|
|
25052
|
-
delay: 100,
|
|
25053
25081
|
useNativeDriver: Platform.OS !== 'web'
|
|
25054
25082
|
}).start();
|
|
25055
25083
|
if (active) {
|
|
25056
25084
|
var _fabRef$current4;
|
|
25057
|
-
(_fabRef$current4 = fabRef.current) === null || _fabRef$current4 === void 0 || _fabRef$current4.collapse()
|
|
25085
|
+
(_fabRef$current4 = fabRef.current) === null || _fabRef$current4 === void 0 || _fabRef$current4.collapse(true, function () {
|
|
25086
|
+
var _fabRef$current5;
|
|
25087
|
+
(_fabRef$current5 = fabRef.current) === null || _fabRef$current5 === void 0 || _fabRef$current5.hide(false);
|
|
25088
|
+
});
|
|
25058
25089
|
} else {
|
|
25059
|
-
var _fabRef$
|
|
25060
|
-
(_fabRef$
|
|
25090
|
+
var _fabRef$current6, _fabRef$current7;
|
|
25091
|
+
(_fabRef$current6 = fabRef.current) === null || _fabRef$current6 === void 0 || _fabRef$current6.collapse(false);
|
|
25092
|
+
(_fabRef$current7 = fabRef.current) === null || _fabRef$current7 === void 0 || _fabRef$current7.show();
|
|
25061
25093
|
}
|
|
25062
25094
|
}, [active]);
|
|
25063
25095
|
var actionGroupOpacity = animatedValue.current.interpolate({
|
package/lib/index.js
CHANGED
|
@@ -24880,7 +24880,7 @@ var FAB$1 = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
|
24880
24880
|
var onPress = _ref3.onPress,
|
|
24881
24881
|
title = _ref3.title,
|
|
24882
24882
|
icon = _ref3.icon,
|
|
24883
|
-
|
|
24883
|
+
iconAnimated = _ref3.animated,
|
|
24884
24884
|
testID = _ref3.testID,
|
|
24885
24885
|
active = _ref3.active,
|
|
24886
24886
|
style = _ref3.style;
|
|
@@ -24907,49 +24907,78 @@ var FAB$1 = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
|
24907
24907
|
React__namespace.default.useImperativeHandle(ref, function () {
|
|
24908
24908
|
return {
|
|
24909
24909
|
show: function show() {
|
|
24910
|
-
|
|
24911
|
-
|
|
24912
|
-
useNativeDriver: true
|
|
24913
|
-
}).start();
|
|
24910
|
+
var animated = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
24911
|
+
var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop$2;
|
|
24914
24912
|
setDisplayState({
|
|
24915
24913
|
hideButton: false,
|
|
24916
24914
|
hideTitle: false
|
|
24917
24915
|
});
|
|
24918
24916
|
animateWidth();
|
|
24919
|
-
|
|
24920
|
-
|
|
24921
|
-
|
|
24922
|
-
|
|
24917
|
+
if (animated) {
|
|
24918
|
+
reactNative.Animated.parallel([reactNative.Animated.spring(animatedValues.opacity, {
|
|
24919
|
+
toValue: 1,
|
|
24920
|
+
useNativeDriver: true
|
|
24921
|
+
}), reactNative.Animated.spring(animatedValues.translateY, {
|
|
24922
|
+
toValue: 0,
|
|
24923
|
+
useNativeDriver: true
|
|
24924
|
+
})]).start(callback);
|
|
24925
|
+
} else {
|
|
24926
|
+
animatedValues.opacity.setValue(1);
|
|
24927
|
+
animatedValues.translateY.setValue(0);
|
|
24928
|
+
}
|
|
24923
24929
|
},
|
|
24924
24930
|
collapse: function collapse() {
|
|
24925
|
-
|
|
24926
|
-
|
|
24927
|
-
useNativeDriver: true
|
|
24928
|
-
}), reactNative.Animated.spring(animatedValues.translateY, {
|
|
24929
|
-
toValue: 0,
|
|
24930
|
-
useNativeDriver: true
|
|
24931
|
-
})]).start();
|
|
24932
|
-
animateWidth();
|
|
24931
|
+
var animated = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
24932
|
+
var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop$2;
|
|
24933
24933
|
setDisplayState({
|
|
24934
24934
|
hideButton: false,
|
|
24935
24935
|
hideTitle: true
|
|
24936
24936
|
});
|
|
24937
|
+
animateWidth();
|
|
24938
|
+
if (animated) {
|
|
24939
|
+
reactNative.Animated.parallel([reactNative.Animated.spring(animatedValues.opacity, {
|
|
24940
|
+
toValue: 1,
|
|
24941
|
+
useNativeDriver: true
|
|
24942
|
+
}), reactNative.Animated.spring(animatedValues.translateY, {
|
|
24943
|
+
toValue: 0,
|
|
24944
|
+
useNativeDriver: true
|
|
24945
|
+
})]).start(callback);
|
|
24946
|
+
} else {
|
|
24947
|
+
animatedValues.opacity.setValue(1);
|
|
24948
|
+
animatedValues.translateY.setValue(0);
|
|
24949
|
+
}
|
|
24937
24950
|
},
|
|
24938
24951
|
hide: function hide() {
|
|
24939
|
-
|
|
24940
|
-
|
|
24941
|
-
|
|
24942
|
-
|
|
24943
|
-
|
|
24944
|
-
|
|
24945
|
-
|
|
24952
|
+
var animated = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
24953
|
+
var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop$2;
|
|
24954
|
+
if (animated) {
|
|
24955
|
+
reactNative.Animated.stagger(20, [reactNative.Animated.spring(animatedValues.opacity, {
|
|
24956
|
+
toValue: 0,
|
|
24957
|
+
useNativeDriver: true
|
|
24958
|
+
}), reactNative.Animated.spring(animatedValues.translateY, {
|
|
24959
|
+
toValue: 1,
|
|
24960
|
+
useNativeDriver: true
|
|
24961
|
+
})]).start(function (arg) {
|
|
24962
|
+
animateWidth();
|
|
24963
|
+
setDisplayState(function (previousState) {
|
|
24964
|
+
return _objectSpread2(_objectSpread2({}, previousState), {}, {
|
|
24965
|
+
hideButton: true
|
|
24966
|
+
});
|
|
24967
|
+
});
|
|
24968
|
+
if (callback) {
|
|
24969
|
+
callback(arg);
|
|
24970
|
+
}
|
|
24971
|
+
});
|
|
24972
|
+
} else {
|
|
24973
|
+
animatedValues.opacity.setValue(0);
|
|
24974
|
+
animatedValues.translateY.setValue(1);
|
|
24946
24975
|
animateWidth();
|
|
24947
24976
|
setDisplayState(function (previousState) {
|
|
24948
24977
|
return _objectSpread2(_objectSpread2({}, previousState), {}, {
|
|
24949
24978
|
hideButton: true
|
|
24950
24979
|
});
|
|
24951
24980
|
});
|
|
24952
|
-
}
|
|
24981
|
+
}
|
|
24953
24982
|
}
|
|
24954
24983
|
};
|
|
24955
24984
|
}, []);
|
|
@@ -24979,7 +25008,7 @@ var FAB$1 = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
|
|
|
24979
25008
|
})
|
|
24980
25009
|
}
|
|
24981
25010
|
}, isIconOnly ? /*#__PURE__*/React__namespace.default.createElement(IconOnlyContent, {
|
|
24982
|
-
animated:
|
|
25011
|
+
animated: iconAnimated,
|
|
24983
25012
|
active: active,
|
|
24984
25013
|
icon: active ? 'add' : icon
|
|
24985
25014
|
}) : /*#__PURE__*/React__namespace.default.createElement(IconWithTextContent, {
|
|
@@ -25078,15 +25107,18 @@ var ActionGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
25078
25107
|
React__namespace.default.useEffect(function () {
|
|
25079
25108
|
reactNative.Animated.spring(animatedValue.current, {
|
|
25080
25109
|
toValue: active ? 1 : 0,
|
|
25081
|
-
delay: 100,
|
|
25082
25110
|
useNativeDriver: reactNative.Platform.OS !== 'web'
|
|
25083
25111
|
}).start();
|
|
25084
25112
|
if (active) {
|
|
25085
25113
|
var _fabRef$current4;
|
|
25086
|
-
(_fabRef$current4 = fabRef.current) === null || _fabRef$current4 === void 0 || _fabRef$current4.collapse()
|
|
25114
|
+
(_fabRef$current4 = fabRef.current) === null || _fabRef$current4 === void 0 || _fabRef$current4.collapse(true, function () {
|
|
25115
|
+
var _fabRef$current5;
|
|
25116
|
+
(_fabRef$current5 = fabRef.current) === null || _fabRef$current5 === void 0 || _fabRef$current5.hide(false);
|
|
25117
|
+
});
|
|
25087
25118
|
} else {
|
|
25088
|
-
var _fabRef$
|
|
25089
|
-
(_fabRef$
|
|
25119
|
+
var _fabRef$current6, _fabRef$current7;
|
|
25120
|
+
(_fabRef$current6 = fabRef.current) === null || _fabRef$current6 === void 0 || _fabRef$current6.collapse(false);
|
|
25121
|
+
(_fabRef$current7 = fabRef.current) === null || _fabRef$current7 === void 0 || _fabRef$current7.show();
|
|
25090
25122
|
}
|
|
25091
25123
|
}, [active]);
|
|
25092
25124
|
var actionGroupOpacity = animatedValue.current.interpolate({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hero-design/rn-work-uikit",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.2-alpha.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@emotion/native": "^11.9.3",
|
|
24
24
|
"@emotion/react": "^11.9.3",
|
|
25
|
-
"@hero-design/rn": "8.118.
|
|
25
|
+
"@hero-design/rn": "8.118.2-alpha.0",
|
|
26
26
|
"hero-editor": "^1.17.0"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|