@transferwise/components 41.0.0 → 41.0.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/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [41.0.1](https://github.com/transferwise/neptune-web/compare/@transferwise/components@41.0.0...@transferwise/components@41.0.1) (2022-08-09)
7
+
8
+ **Note:** Version bump only for package @transferwise/components
9
+
10
+
11
+
12
+
13
+
6
14
  # [41.0.0](https://github.com/transferwise/neptune-web/compare/@transferwise/components@40.13.3...@transferwise/components@41.0.0) (2022-08-02)
7
15
 
8
16
 
@@ -2,5 +2,5 @@ import classNames from"classnames";import{useCallback,useEffect,useRef}from"reac
2
2
  // this is because of bug in WebKit https://bugs.webkit.org/show_bug.cgi?id=220908
3
3
  // note: scrolling still works for children(s) as expected
4
4
  isIosDevice()&&b&&(a.stopPropagation(),a.preventDefault())};var Dimmer=function(a){var b=a.children,c=a.className,d=a.disableClickToClose,e=a.fadeContentOnEnter,f=void 0!==e&&e,g=a.fadeContentOnExit,h=a.open,i=void 0!==h&&h,j=a.scrollable,k=a.transparent,l=void 0!==k&&k,m=a.onClose,n=useRef(null),o=function(a){a.target===n.current&&(null===m||void 0===m?void 0:m(a))},p=useCallback(function(a){"Escape"!==a.key||(a.stopPropagation(),m&&n.current&&dimmerManager.isTop(n.current)&&m(a))},[m]);return useEffect(function(){var a=n.current;return i&&(document.addEventListener("keydown",p),null===a||void 0===a?void 0:a.addEventListener("touchmove",handleTouchMove,{passive:!0})),function(){document.removeEventListener("keydown",p),null===a||void 0===a?void 0:a.removeEventListener("touchmove",handleTouchMove)}},[p,i]),/*#__PURE__*/_jsx(CSSTransition,{in:i,appear:!0// Wait for animation to finish before unmount.
5
- ,timeout:{enter:0,exit:EXIT_ANIMATION},classNames:{enter:classNames({"dimmer--enter-fade":f}),enterDone:classNames("dimmer--enter-done",{"dimmer--enter-fade":f}),exit:classNames("dimmer--exit",{"dimmer--exit-fade":void 0!==g&&g})},unmountOnExit:!0,onEnter:function onEnter(){n.current&&dimmerManager.add(n.current)},onExited:function onExited(){n.current&&dimmerManager.remove(n.current)},children:/*#__PURE__*/_jsx(DimmerContentWrapper,{scrollBody:!l,children:/*#__PURE__*/_jsx("div",{ref:n,className:classNames("dimmer",{"dimmer--scrollable":void 0!==j&&j,"dimmer--transparent":l},c),role:"presentation",onClick:function handleClick(a){void 0!==d&&d||!m||o(a)},children:/*#__PURE__*/_jsx(FocusBoundary,{children:b})})})})};export var DimmerContentWrapper=function(a){var b=a.children,c=a.scrollBody;return useEffect(function(){return c&&addNoScrollBodyClass(),function(){c&&removeNoScrollBodyClass()}},[c]),b};// Export without the Portal for tests only
5
+ ,timeout:{enter:0,exit:EXIT_ANIMATION},classNames:{enter:classNames({"dimmer--enter-fade":f}),enterDone:classNames("dimmer--enter-done",{"dimmer--enter-fade":f}),exit:classNames("dimmer--exit",{"dimmer--exit-fade":void 0!==g&&g})},unmountOnExit:!0,onEnter:function onEnter(){n.current&&dimmerManager.add(n.current)},onExited:function onExited(){n.current&&dimmerManager.remove(n.current)},children:/*#__PURE__*/_jsx(DimmerContentWrapper,{scrollBody:!l,children:/*#__PURE__*/_jsx("div",{ref:n,className:classNames("dimmer",{"dimmer--scrollable":void 0!==j&&j,"dimmer--transparent":l},c),role:"presentation",onMouseDown:function handleClick(a){void 0!==d&&d||!m||o(a)},children:/*#__PURE__*/_jsx(FocusBoundary,{children:b})})})})};export var DimmerContentWrapper=function(a){var b=a.children,c=a.scrollBody;return useEffect(function(){return c&&addNoScrollBodyClass(),function(){c&&removeNoScrollBodyClass()}},[c]),b};// Export without the Portal for tests only
6
6
  export{Dimmer};export default withNextPortal(Dimmer);
@@ -2,5 +2,5 @@ import classNames from"classnames";import{useCallback,useEffect,useRef}from"reac
2
2
  // this is because of bug in WebKit https://bugs.webkit.org/show_bug.cgi?id=220908
3
3
  // note: scrolling still works for children(s) as expected
4
4
  isIosDevice()&&b&&(a.stopPropagation(),a.preventDefault())};var Dimmer=function(a){var b=a.children,c=a.className,d=a.disableClickToClose,e=a.fadeContentOnEnter,f=void 0!==e&&e,g=a.fadeContentOnExit,h=a.open,i=void 0!==h&&h,j=a.scrollable,k=a.transparent,l=void 0!==k&&k,m=a.onClose,n=useRef(null),o=function(a){a.target===n.current&&(null===m||void 0===m?void 0:m(a))},p=useCallback(function(a){"Escape"!==a.key||(a.stopPropagation(),m&&n.current&&dimmerManager.isTop(n.current)&&m(a))},[m]);return useEffect(function(){var a=n.current;return i&&(document.addEventListener("keydown",p),null===a||void 0===a?void 0:a.addEventListener("touchmove",handleTouchMove,{passive:!0})),function(){document.removeEventListener("keydown",p),null===a||void 0===a?void 0:a.removeEventListener("touchmove",handleTouchMove)}},[p,i]),/*#__PURE__*/_jsx(CSSTransition,{in:i,appear:!0// Wait for animation to finish before unmount.
5
- ,timeout:{enter:0,exit:EXIT_ANIMATION},classNames:{enter:classNames({"dimmer--enter-fade":f}),enterDone:classNames("dimmer--enter-done",{"dimmer--enter-fade":f}),exit:classNames("dimmer--exit",{"dimmer--exit-fade":void 0!==g&&g})},unmountOnExit:!0,onEnter:function onEnter(){n.current&&dimmerManager.add(n.current)},onExited:function onExited(){n.current&&dimmerManager.remove(n.current)},children:/*#__PURE__*/_jsx(DimmerContentWrapper,{scrollBody:!l,children:/*#__PURE__*/_jsx("div",{ref:n,className:classNames("dimmer",{"dimmer--scrollable":void 0!==j&&j,"dimmer--transparent":l},c),role:"presentation",onClick:function handleClick(a){void 0!==d&&d||!m||o(a)},children:/*#__PURE__*/_jsx(FocusBoundary,{children:b})})})})};export var DimmerContentWrapper=function(a){var b=a.children,c=a.scrollBody;return useEffect(function(){return c&&addNoScrollBodyClass(),function(){c&&removeNoScrollBodyClass()}},[c]),b};// Export without the Portal for tests only
5
+ ,timeout:{enter:0,exit:EXIT_ANIMATION},classNames:{enter:classNames({"dimmer--enter-fade":f}),enterDone:classNames("dimmer--enter-done",{"dimmer--enter-fade":f}),exit:classNames("dimmer--exit",{"dimmer--exit-fade":void 0!==g&&g})},unmountOnExit:!0,onEnter:function onEnter(){n.current&&dimmerManager.add(n.current)},onExited:function onExited(){n.current&&dimmerManager.remove(n.current)},children:/*#__PURE__*/_jsx(DimmerContentWrapper,{scrollBody:!l,children:/*#__PURE__*/_jsx("div",{ref:n,className:classNames("dimmer",{"dimmer--scrollable":void 0!==j&&j,"dimmer--transparent":l},c),role:"presentation",onMouseDown:function handleClick(a){void 0!==d&&d||!m||o(a)},children:/*#__PURE__*/_jsx(FocusBoundary,{children:b})})})})};export var DimmerContentWrapper=function(a){var b=a.children,c=a.scrollBody;return useEffect(function(){return c&&addNoScrollBodyClass(),function(){c&&removeNoScrollBodyClass()}},[c]),b};// Export without the Portal for tests only
6
6
  export{Dimmer};export default withNextPortal(Dimmer);