@hero-design/rn 8.78.0-alpha.0 → 8.78.0-alpha.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/es/index.js CHANGED
@@ -9728,7 +9728,7 @@ var BottomSheet = function BottomSheet(_ref) {
9728
9728
  if (open && !visible) {
9729
9729
  setVisibility(open);
9730
9730
  }
9731
- }, [open]);
9731
+ }, [open, visible]);
9732
9732
  // Animation
9733
9733
  useEffect(function () {
9734
9734
  var animation = Animated.timing(animatedValue.current, {
@@ -9737,10 +9737,8 @@ var BottomSheet = function BottomSheet(_ref) {
9737
9737
  useNativeDriver: true
9738
9738
  });
9739
9739
  animation.start(function () {
9740
- if (!open) {
9741
- setVisibility(false);
9742
- }
9743
9740
  if (!open && canCallOnDismiss.current) {
9741
+ setVisibility(false);
9744
9742
  onDismiss === null || onDismiss === void 0 || onDismiss();
9745
9743
  }
9746
9744
  onAnimationEnd === null || onAnimationEnd === void 0 || onAnimationEnd();
@@ -9748,7 +9746,7 @@ var BottomSheet = function BottomSheet(_ref) {
9748
9746
  return function () {
9749
9747
  return animation.stop();
9750
9748
  };
9751
- }, [open]);
9749
+ }, [open, onDismiss, onAnimationEnd]);
9752
9750
  var interpolateY = animatedValue.current.interpolate({
9753
9751
  inputRange: [0, 1],
9754
9752
  outputRange: [height, 0]
package/lib/index.js CHANGED
@@ -9755,7 +9755,7 @@ var BottomSheet = function BottomSheet(_ref) {
9755
9755
  if (open && !visible) {
9756
9756
  setVisibility(open);
9757
9757
  }
9758
- }, [open]);
9758
+ }, [open, visible]);
9759
9759
  // Animation
9760
9760
  React.useEffect(function () {
9761
9761
  var animation = reactNative.Animated.timing(animatedValue.current, {
@@ -9764,10 +9764,8 @@ var BottomSheet = function BottomSheet(_ref) {
9764
9764
  useNativeDriver: true
9765
9765
  });
9766
9766
  animation.start(function () {
9767
- if (!open) {
9768
- setVisibility(false);
9769
- }
9770
9767
  if (!open && canCallOnDismiss.current) {
9768
+ setVisibility(false);
9771
9769
  onDismiss === null || onDismiss === void 0 || onDismiss();
9772
9770
  }
9773
9771
  onAnimationEnd === null || onAnimationEnd === void 0 || onAnimationEnd();
@@ -9775,7 +9773,7 @@ var BottomSheet = function BottomSheet(_ref) {
9775
9773
  return function () {
9776
9774
  return animation.stop();
9777
9775
  };
9778
- }, [open]);
9776
+ }, [open, onDismiss, onAnimationEnd]);
9779
9777
  var interpolateY = animatedValue.current.interpolate({
9780
9778
  inputRange: [0, 1],
9781
9779
  outputRange: [height, 0]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "8.78.0-alpha.0",
3
+ "version": "8.78.0-alpha.1",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -127,7 +127,7 @@ const BottomSheet = ({
127
127
  if (open && !visible) {
128
128
  setVisibility(open);
129
129
  }
130
- }, [open]);
130
+ }, [open, visible]);
131
131
 
132
132
  // Animation
133
133
  useEffect(() => {
@@ -138,11 +138,8 @@ const BottomSheet = ({
138
138
  });
139
139
 
140
140
  animation.start(() => {
141
- if (!open) {
142
- setVisibility(false);
143
- }
144
-
145
141
  if (!open && canCallOnDismiss.current) {
142
+ setVisibility(false);
146
143
  onDismiss?.();
147
144
  }
148
145
 
@@ -150,7 +147,7 @@ const BottomSheet = ({
150
147
  });
151
148
 
152
149
  return () => animation.stop();
153
- }, [open]);
150
+ }, [open, onDismiss, onAnimationEnd]);
154
151
 
155
152
  const interpolateY = animatedValue.current.interpolate({
156
153
  inputRange: [0, 1],