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