@transferwise/components 43.13.49 → 44.0.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.
- package/build/es/no-polyfill/loader/Loader.js +3 -3
- package/build/es/polyfill/loader/Loader.js +3 -3
- package/build/main.css +1 -1
- package/build/styles/loader/Loader.css +1 -1
- package/build/styles/main.css +1 -1
- package/build/types/loader/Loader.d.ts +5 -3
- package/build/umd/no-polyfill/main.js +1 -1
- package/build/umd/polyfill/main.js +1 -1
- package/package.json +5 -6
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["small","size","classNames"];import
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["small","size","displayInstantly","classNames"];import classnames from"classnames";import{useEffect,useState}from"react";import{Size}from"../common";// TODO: We gracefully depracated xs, lg and xl -- remove these as part of a future breaking change to this component
|
|
2
|
+
import{jsx as _jsx}from"react/jsx-runtime";/**
|
|
2
3
|
* Loader component
|
|
3
4
|
*
|
|
4
5
|
* Docs link: https://transferwise.github.io/neptune-web/components/progress/Loader
|
|
@@ -7,5 +8,4 @@ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutPropert
|
|
|
7
8
|
* @param root0.small
|
|
8
9
|
* @param root0.size
|
|
9
10
|
* @param root0.classNames
|
|
10
|
-
*/var Loader=function(a){var b=a.small,c=a.size,d=void 0===c?Size.
|
|
11
|
-
_jsx("div",{className:j("tw-loader__stripe")},b))})})},getSupportedSize=function(a){switch(a){case Size.EXTRA_LARGE:case Size.LARGE:return Size.LARGE;case Size.SMALL:case Size.EXTRA_SMALL:return Size.SMALL;case Size.MEDIUM:default:return Size.MEDIUM;}};export default Loader;
|
|
11
|
+
*/var Loader=function(a){var b=a.small,c=a.size,d=void 0===c?Size.MEDIUM:c,e=a.displayInstantly,f=void 0!==e&&e,g=a.classNames,h=void 0===g?{}:g,i=_objectWithoutProperties(a,_excluded),j=useState(f),k=_slicedToArray(j,2),l=k[0],m=k[1];useEffect(function(){var a,b;return f||(b=setTimeout(function(){a||m(!0)},1e3)),function(){a=!0,clearTimeout(b)}},[]);var n=function(a){return h[a]||a},o=void 0!==b&&b?Size.SMALL:d,p=getSupportedSize(o);return/*#__PURE__*/_jsx("div",{className:classnames(n("tw-loader"),n("tw-loader--".concat(p)),{"tw-loader--visible":l}),"data-testid":i["data-testid"]})},getSupportedSize=function(a){switch(a){case Size.SMALL:case Size.EXTRA_SMALL:return Size.SMALL;case Size.EXTRA_LARGE:case Size.LARGE:case Size.MEDIUM:default:return Size.MEDIUM;}};export default Loader;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["small","size","classNames"];import"core-js/modules/es.string.small.js";import"
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["small","size","displayInstantly","classNames"];import"core-js/modules/es.string.small.js";import classnames from"classnames";import{useEffect,useState}from"react";import{Size}from"../common";// TODO: We gracefully depracated xs, lg and xl -- remove these as part of a future breaking change to this component
|
|
2
|
+
import{jsx as _jsx}from"react/jsx-runtime";/**
|
|
2
3
|
* Loader component
|
|
3
4
|
*
|
|
4
5
|
* Docs link: https://transferwise.github.io/neptune-web/components/progress/Loader
|
|
@@ -7,5 +8,4 @@ import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutPropert
|
|
|
7
8
|
* @param root0.small
|
|
8
9
|
* @param root0.size
|
|
9
10
|
* @param root0.classNames
|
|
10
|
-
*/var Loader=function(a){var b=a.small,c=a.size,d=void 0===c?Size.
|
|
11
|
-
_jsx("div",{className:j("tw-loader__stripe")},b))})})},getSupportedSize=function(a){switch(a){case Size.EXTRA_LARGE:case Size.LARGE:return Size.LARGE;case Size.SMALL:case Size.EXTRA_SMALL:return Size.SMALL;case Size.MEDIUM:default:return Size.MEDIUM;}};export default Loader;
|
|
11
|
+
*/var Loader=function(a){var b=a.small,c=a.size,d=void 0===c?Size.MEDIUM:c,e=a.displayInstantly,f=void 0!==e&&e,g=a.classNames,h=void 0===g?{}:g,i=_objectWithoutProperties(a,_excluded),j=useState(f),k=_slicedToArray(j,2),l=k[0],m=k[1];useEffect(function(){var a,b;return f||(b=setTimeout(function(){a||m(!0)},1e3)),function(){a=!0,clearTimeout(b)}},[]);var n=function(a){return h[a]||a},o=void 0!==b&&b?Size.SMALL:d,p=getSupportedSize(o);return/*#__PURE__*/_jsx("div",{className:classnames(n("tw-loader"),n("tw-loader--".concat(p)),{"tw-loader--visible":l}),"data-testid":i["data-testid"]})},getSupportedSize=function(a){switch(a){case Size.SMALL:case Size.EXTRA_SMALL:return Size.SMALL;case Size.EXTRA_LARGE:case Size.LARGE:case Size.MEDIUM:default:return Size.MEDIUM;}};export default Loader;
|