pebble-web 2.6.0 → 2.7.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.
@@ -1042,7 +1042,7 @@ var animationConfig = {
1042
1042
  },
1043
1043
  config: function config(_a, motion) {
1044
1044
  return motion === "leave" ? {
1045
- duration: 0.1
1045
+ duration: 80
1046
1046
  } : {
1047
1047
  duration: 200
1048
1048
  };
@@ -3504,7 +3504,6 @@ var closeStyle = /*#__PURE__*/css({
3504
3504
  }
3505
3505
  }, ";label:closeStyle;" + ( "" ));
3506
3506
  var sidebarStyle = /*#__PURE__*/css({
3507
- transition: "transform 200ms ".concat(constants.animationCurve),
3508
3507
  backgroundColor: colors.white.base,
3509
3508
  position: "fixed",
3510
3509
  top: 0,
@@ -3523,13 +3522,17 @@ function _createSuper$m(Derived) { var hasNativeReflectConstruct = _isNativeRefl
3523
3522
  function _isNativeReflectConstruct$m() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
3524
3523
  var transitionProps = {
3525
3524
  from: {
3526
- opacity: 0
3525
+ opacity: 0,
3526
+ transform: "translateX(100%)"
3527
3527
  },
3528
3528
  enter: {
3529
- opacity: 1
3529
+ opacity: 1,
3530
+ transform: "translateX(0)"
3530
3531
  },
3531
3532
  leave: {
3532
- opacity: 0
3533
+ opacity: 0,
3534
+ transform: "translateX(100%)",
3535
+ pointerEvents: "none"
3533
3536
  }
3534
3537
  };
3535
3538
  var SideBar = /*#__PURE__*/function (_React$PureComponent) {
@@ -3583,46 +3586,34 @@ var SideBar = /*#__PURE__*/function (_React$PureComponent) {
3583
3586
  onClose = _this$props2.onClose,
3584
3587
  onOutsideClick = _this$props2.onOutsideClick,
3585
3588
  closeOnOutsideClick = _this$props2.closeOnOutsideClick;
3586
- var _sidebarOverride = /*#__PURE__*/css({
3587
- width: width,
3588
- transform: isOpen ? "translateX(0)" : "translateX(".concat(width, "px)")
3589
- }, ";label:SideBar;" + ( "" ));
3590
- var _sidebarStyle = cx(_sidebarOverride, sidebarStyle, /*#__PURE__*/css({
3591
- transform: isOpen ? "translateX(0)" : "translateX(100%)"
3589
+ var _sidebarStyle = cx(sidebarStyle, /*#__PURE__*/css({
3590
+ width: width
3592
3591
  }, ";label:SideBar;" + ( "" )));
3593
- return /*#__PURE__*/createElement(Fragment, null, /*#__PURE__*/createElement(Transition, Object.assign({
3594
- items: isOpen
3595
- }, transitionProps, {
3596
- config: animationConfig.config
3597
- }), function (show) {
3598
- return show && function (styles) {
3599
- return /*#__PURE__*/createElement(animated.div, {
3600
- style: styles,
3601
- className: sidebarWrapperStyle,
3602
- onClick: onOutsideClick || closeOnOutsideClick ? _this2.onOutsideClick : undefined,
3603
- "data-testid": "shadowArea"
3604
- });
3605
- };
3606
- }), /*#__PURE__*/createElement("div", {
3607
- className: _sidebarStyle
3608
- }, /*#__PURE__*/createElement(Transition, Object.assign({
3609
- items: isOpen
3610
- }, transitionProps), function (show) {
3611
- return show && function (styles) {
3612
- return /*#__PURE__*/createElement(animated.div, {
3613
- style: styles,
3614
- className: closeStyle,
3615
- onClick: onClose
3616
- }, /*#__PURE__*/createElement("i", {
3617
- className: "pi pi-close"
3618
- }), /*#__PURE__*/createElement(Ink, null));
3619
- };
3620
- }), isOpen && /*#__PURE__*/createElement("div", {
3621
- style: {
3622
- overflowY: "scroll",
3623
- height: "100vh"
3624
- }
3625
- }, children)));
3592
+ return /*#__PURE__*/createElement(MountTransition, Object.assign({
3593
+ visible: isOpen
3594
+ }, transitionProps), function (styles) {
3595
+ return /*#__PURE__*/createElement(Fragment, null, /*#__PURE__*/createElement(animated.div, {
3596
+ style: {
3597
+ opacity: styles.opacity
3598
+ },
3599
+ className: sidebarWrapperStyle,
3600
+ onClick: onOutsideClick || closeOnOutsideClick ? _this2.onOutsideClick : undefined,
3601
+ "data-testid": "shadowArea"
3602
+ }), /*#__PURE__*/createElement(animated.div, {
3603
+ className: _sidebarStyle,
3604
+ style: styles
3605
+ }, /*#__PURE__*/createElement("div", {
3606
+ className: closeStyle,
3607
+ onClick: onClose
3608
+ }, /*#__PURE__*/createElement("i", {
3609
+ className: "pi pi-close"
3610
+ }), /*#__PURE__*/createElement(Ink, null)), /*#__PURE__*/createElement("div", {
3611
+ style: {
3612
+ overflowY: "scroll",
3613
+ height: "100vh"
3614
+ }
3615
+ }, children)));
3616
+ });
3626
3617
  }
3627
3618
  }]);
3628
3619
  return SideBar;