pebble-web 2.26.1 → 3.0.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.
@@ -17,7 +17,7 @@ import addDays from 'date-fns/addDays';
17
17
  import startOfDay from 'date-fns/startOfDay';
18
18
  import endOfDay from 'date-fns/endOfDay';
19
19
  import isSameDay from 'date-fns/isSameDay';
20
- import { Transition, animated } from 'react-spring/renderprops.cjs';
20
+ import { Transition, animated } from 'react-spring';
21
21
  import { Manager, Reference, Popper } from 'react-popper';
22
22
  import { Rifm } from 'rifm';
23
23
  import format from 'date-fns/format';
@@ -1133,8 +1133,8 @@ var animationConfig = {
1133
1133
  transform: "scale(0.95)",
1134
1134
  pointerEvents: "none"
1135
1135
  },
1136
- config: function config(_a, motion) {
1137
- return motion === "leave" ? {
1136
+ config: function config(_show, _index, state) {
1137
+ return state === "leave" ? {
1138
1138
  duration: 80
1139
1139
  } : {
1140
1140
  duration: 200
@@ -1145,10 +1145,10 @@ var animationConfig = {
1145
1145
  var MountTransition = function MountTransition(props) {
1146
1146
  return /*#__PURE__*/createElement(Transition, Object.assign({
1147
1147
  items: props.visible
1148
- }, animationConfig, props), function (show, state, index) {
1149
- return show && function (styles) {
1150
- return props.children(styles, state, index);
1151
- };
1148
+ }, animationConfig, props), function (styles, show, _ref, index) {
1149
+ var phase = _ref.phase;
1150
+ if (!show) return null;
1151
+ return props.children(styles, phase, index);
1152
1152
  });
1153
1153
  };
1154
1154
 
@@ -1236,11 +1236,13 @@ var DropDown = /*#__PURE__*/function (_React$PureComponent) {
1236
1236
  arrowProps = _ref2.arrowProps;
1237
1237
  var popperWrapperStyle = _objectSpread$7(_objectSpread$7(_objectSpread$7({}, style), transitionStyles), {}, {
1238
1238
  backgroundColor: colors.white.base,
1239
- transform: "".concat(style.transform || "", " ").concat(transitionStyles.transform || ""),
1239
+ transform: transitionStyles.transform.to(function (t) {
1240
+ return "".concat(style.transform || "", " ").concat(t || "");
1241
+ }),
1240
1242
  transformOrigin: "".concat(arrowProps.style.left || 0, "px ").concat(arrowProps.style.top || 0, "px"),
1241
1243
  padding: padding
1242
1244
  });
1243
- return /*#__PURE__*/createElement("div", {
1245
+ return /*#__PURE__*/createElement(animated.div, {
1244
1246
  className: cx(dropDownStyle, dropDownClassName),
1245
1247
  ref: ref,
1246
1248
  style: popperWrapperStyle,
@@ -2021,17 +2023,15 @@ var Toast = /*#__PURE__*/function (_React$PureComponent) {
2021
2023
  pointerEvents: "none"
2022
2024
  }, customStyles[position].transitions.leave),
2023
2025
  config: animationConfig.config
2024
- }, function (show) {
2025
- return show && function (styles) {
2026
- return /*#__PURE__*/createElement(animated.div, {
2027
- className: cx(toastWrapper, _this4.props.className),
2028
- style: _objectSpread$c(_objectSpread$c({
2029
- backgroundColor: bColor
2030
- }, styles), customStyles[position].style)
2031
- }, /*#__PURE__*/createElement("i", {
2032
- className: iconClass
2033
- }), _this4.state.text);
2034
- };
2026
+ }, function (styles, show) {
2027
+ return show && /*#__PURE__*/createElement(animated.div, {
2028
+ className: cx(toastWrapper, _this4.props.className),
2029
+ style: _objectSpread$c(_objectSpread$c({
2030
+ backgroundColor: bColor
2031
+ }, styles), customStyles[position].style)
2032
+ }, /*#__PURE__*/createElement("i", {
2033
+ className: iconClass
2034
+ }), _this4.state.text);
2035
2035
  });
2036
2036
  }
2037
2037
  }], [{
@@ -2148,15 +2148,16 @@ var Modal = /*#__PURE__*/function (_React$PureComponent) {
2148
2148
  createElement(MountTransition, {
2149
2149
  visible: visible
2150
2150
  }, function (transitionStyles) {
2151
- return /*#__PURE__*/createElement("div", {
2151
+ return /*#__PURE__*/createElement(animated.div, {
2152
2152
  style: {
2153
2153
  opacity: transitionStyles.opacity
2154
2154
  },
2155
2155
  className: cx(modalContainer, backDropClassName)
2156
- }, /*#__PURE__*/createElement("div", {
2157
- className: cx( /*#__PURE__*/css({
2156
+ }, /*#__PURE__*/createElement(animated.div, {
2157
+ style: {
2158
2158
  transform: transitionStyles.transform
2159
- }, ";label:Modal;" + ( "" )), modalClassName)
2159
+ },
2160
+ className: modalClassName
2160
2161
  }, children));
2161
2162
  }), node);
2162
2163
  }
@@ -3045,10 +3046,12 @@ var PebblePopper = /*#__PURE__*/function (_React$PureComponent) {
3045
3046
  arrowProps = _ref2.arrowProps;
3046
3047
  var wrapperStyle = _objectSpread$j(_objectSpread$j(_objectSpread$j({}, style), transitionStyles), {}, {
3047
3048
  backgroundColor: popperBackgroundColor,
3048
- transform: "".concat(style.transform || "", " ").concat(transitionStyles.transform || ""),
3049
+ transform: transitionStyles.transform.to(function (t) {
3050
+ return "".concat(style.transform || "", " ").concat(t || "");
3051
+ }),
3049
3052
  transformOrigin: "".concat(arrowProps.style.left || 0, "px ").concat(arrowProps.style.top || 0, "px")
3050
3053
  });
3051
- return /*#__PURE__*/createElement("div", {
3054
+ return /*#__PURE__*/createElement(animated.div, {
3052
3055
  className: cx(popperStyle, popperClassName),
3053
3056
  ref: ref,
3054
3057
  style: wrapperStyle,
@@ -4668,8 +4671,7 @@ var TypeAhead = /*#__PURE__*/function (_React$PureComponent) {
4668
4671
  }, _objectSpread$v(_objectSpread$v({}, this.props), {}, {
4669
4672
  testId: testIds.searchBoxId
4670
4673
  })), /*#__PURE__*/createElement(MountTransition, {
4671
- visible: showSuggestions,
4672
- native: true
4674
+ visible: showSuggestions
4673
4675
  }, function (transitionStyles) {
4674
4676
  return /*#__PURE__*/createElement(animated.div, {
4675
4677
  style: transitionStyles,