pebble-web 2.23.0 → 2.24.0-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.
@@ -9,7 +9,7 @@ import addDays from 'date-fns/addDays';
9
9
  import startOfDay from 'date-fns/startOfDay';
10
10
  import endOfDay from 'date-fns/endOfDay';
11
11
  import isSameDay from 'date-fns/isSameDay';
12
- import { Transition, animated } from 'react-spring/renderprops.cjs';
12
+ import { Transition, animated } from 'react-spring';
13
13
  import { Manager, Reference, Popper } from 'react-popper';
14
14
  import { Rifm } from 'rifm';
15
15
  import format from 'date-fns/format';
@@ -994,7 +994,7 @@ const animationConfig = {
994
994
  transform: "scale(0.95)",
995
995
  pointerEvents: "none"
996
996
  },
997
- config: (_a, motion) => motion === "leave" ? {
997
+ config: (_show, _index, state) => state === "leave" ? {
998
998
  duration: 80
999
999
  } : {
1000
1000
  duration: 200
@@ -1004,7 +1004,12 @@ const animationConfig = {
1004
1004
  const MountTransition = props => {
1005
1005
  return /*#__PURE__*/createElement(Transition, Object.assign({
1006
1006
  items: props.visible
1007
- }, animationConfig, props), (show, state, index) => show && (styles => props.children(styles, state, index)));
1007
+ }, animationConfig, props), (styles, show, {
1008
+ phase
1009
+ }, index) => {
1010
+ if (!show) return null;
1011
+ return props.children(styles, phase, index);
1012
+ });
1008
1013
  };
1009
1014
 
1010
1015
  class DropDown extends PureComponent {
@@ -1079,11 +1084,11 @@ class DropDown extends PureComponent {
1079
1084
  const popperWrapperStyle = { ...style,
1080
1085
  ...transitionStyles,
1081
1086
  backgroundColor: colors.white.base,
1082
- transform: `${style.transform || ""} ${transitionStyles.transform || ""}`,
1087
+ transform: transitionStyles.transform.to(t => `${style.transform || ""} ${t || ""}`),
1083
1088
  transformOrigin: `${arrowProps.style.left || 0}px ${arrowProps.style.top || 0}px`,
1084
1089
  padding
1085
1090
  };
1086
- return /*#__PURE__*/createElement("div", {
1091
+ return /*#__PURE__*/createElement(animated.div, {
1087
1092
  className: cx(dropDownStyle, dropDownClassName),
1088
1093
  ref: ref,
1089
1094
  style: popperWrapperStyle,
@@ -1753,7 +1758,7 @@ class Toast extends PureComponent {
1753
1758
  ...customStyles[position].transitions.leave
1754
1759
  },
1755
1760
  config: animationConfig.config
1756
- }, show => show && (styles => /*#__PURE__*/createElement(animated.div, {
1761
+ }, (styles, show) => show && /*#__PURE__*/createElement(animated.div, {
1757
1762
  className: cx(toastWrapper, this.props.className),
1758
1763
  style: {
1759
1764
  backgroundColor: bColor,
@@ -1762,7 +1767,7 @@ class Toast extends PureComponent {
1762
1767
  }
1763
1768
  }, /*#__PURE__*/createElement("i", {
1764
1769
  className: iconClass
1765
- }), this.state.text)));
1770
+ }), this.state.text));
1766
1771
  }
1767
1772
  }
1768
1773
 
@@ -1840,15 +1845,16 @@ class Modal extends PureComponent {
1840
1845
  /*#__PURE__*/
1841
1846
  createElement(MountTransition, {
1842
1847
  visible: visible
1843
- }, transitionStyles => /*#__PURE__*/createElement("div", {
1848
+ }, transitionStyles => /*#__PURE__*/createElement(animated.div, {
1844
1849
  style: {
1845
1850
  opacity: transitionStyles.opacity
1846
1851
  },
1847
1852
  className: cx(modalContainer, backDropClassName)
1848
- }, /*#__PURE__*/createElement("div", {
1849
- className: cx( /*#__PURE__*/css({
1853
+ }, /*#__PURE__*/createElement(animated.div, {
1854
+ style: {
1850
1855
  transform: transitionStyles.transform
1851
- }, ";label:Modal;" + ( "" )), modalClassName)
1856
+ },
1857
+ className: modalClassName
1852
1858
  }, children))), node);
1853
1859
  }
1854
1860
  }
@@ -2638,10 +2644,10 @@ class PebblePopper extends PureComponent {
2638
2644
  const wrapperStyle = { ...style,
2639
2645
  ...transitionStyles,
2640
2646
  backgroundColor: popperBackgroundColor,
2641
- transform: `${style.transform || ""} ${transitionStyles.transform || ""}`,
2647
+ transform: transitionStyles.transform.to(t => `${style.transform || ""} ${t || ""}`),
2642
2648
  transformOrigin: `${arrowProps.style.left || 0}px ${arrowProps.style.top || 0}px`
2643
2649
  };
2644
- return /*#__PURE__*/createElement("div", {
2650
+ return /*#__PURE__*/createElement(animated.div, {
2645
2651
  className: cx(popperStyle, popperClassName),
2646
2652
  ref: ref,
2647
2653
  style: wrapperStyle,
@@ -4116,8 +4122,7 @@ class TypeAhead extends PureComponent {
4116
4122
  onFocus: this.onFocus,
4117
4123
  value
4118
4124
  }, this.props), /*#__PURE__*/createElement(MountTransition, {
4119
- visible: showSuggestions,
4120
- native: true
4125
+ visible: showSuggestions
4121
4126
  }, transitionStyles => /*#__PURE__*/createElement(animated.div, {
4122
4127
  style: transitionStyles,
4123
4128
  className: cx(optionsWrapper$1, dropdownClassName)