@transferwise/components 43.12.5 → 43.12.6
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/common/DOMOperations/DOMOperations.js +1 -1
- package/build/es/no-polyfill/drawer/Drawer.js +1 -1
- package/build/es/no-polyfill/dropFade/DropFade.story.js +1 -1
- package/build/es/no-polyfill/nudge/Nudge.js +1 -1
- package/build/es/polyfill/common/DOMOperations/DOMOperations.js +1 -1
- package/build/es/polyfill/drawer/Drawer.js +1 -1
- package/build/es/polyfill/dropFade/DropFade.story.js +1 -1
- package/build/es/polyfill/nudge/Nudge.js +1 -1
- package/build/main.css +1 -1
- package/build/styles/loader/Loader.css +1 -1
- package/build/styles/main.css +1 -1
- package/build/styles/nudge/Nudge.css +1 -1
- package/build/styles/statusIcon/StatusIcon.css +1 -1
- package/build/styles/summary/Summary.css +1 -1
- package/build/umd/no-polyfill/main.js +1 -1
- package/build/umd/polyfill/main.js +1 -1
- package/package.json +2 -2
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
* For a proper disabling, the CSS class needs to be applied for `html` and `body` elements.
|
|
7
7
|
*/export var addNoScrollBodyClass=function(){document.documentElement.classList.add(NO_SCROLL_BODY_CLASS),document.body.classList.add(NO_SCROLL_BODY_CLASS)};/**
|
|
8
8
|
* Clean up after {@link addNoScrollBodyClass} function
|
|
9
|
-
*/export var removeNoScrollBodyClass=function(){
|
|
9
|
+
*/export var removeNoScrollBodyClass=function(){document.documentElement.classList.remove(NO_SCROLL_BODY_CLASS),document.body.classList.remove(NO_SCROLL_BODY_CLASS)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{useTheme}from"@wise/components-theming";import classNames from"classnames";import PropTypes from"prop-types";import{Position,Typography}from"../common";import CloseButton from"../common/closeButton";import{useLayout}from"../common/hooks";import Dimmer from"../dimmer";import SlidingPanel from"../slidingPanel";import Title from"../title";import{logActionRequiredIf}from"../utilities";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var Drawer=function(a){var b=a.children,c=a.className,d=a.footerContent,e=a.headerTitle,f=a.onClose,g=a.open,h=a.position;logActionRequiredIf("Drawer now expects `onClose`, and will soon make this prop required. Please update your usage to provide it.",!f);var i=useLayout(),j=i.isMobile,k=useTheme(),l=k.theme,m=k.isModern;return/*#__PURE__*/_jsx(Dimmer,{open:g,onClose:f,children:/*#__PURE__*/_jsx(SlidingPanel,{open:g,position:j?Position.BOTTOM:h,children:/*#__PURE__*/_jsxs("div",{className:classNames("np-drawer","np-theme-".concat(l),c),children:[/*#__PURE__*/_jsxs("div",{className:classNames("np-drawer-header",{"np-drawer-header--withborder":e}),children:[e&&/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_BODY,children:e}),/*#__PURE__*/_jsx(CloseButton,{onClick:f})]}),b&&/*#__PURE__*/_jsx("div",{className:classNames("np-drawer-content"),children:b}),d&&/*#__PURE__*/_jsx("div",{className:classNames("np-drawer-footer"),children:d})]})})})};Drawer.propTypes={/** The content to appear in the drawer body. */children:PropTypes.node,className:PropTypes.string,/** The content to appear in the drawer footer. */footerContent:PropTypes.node,/** The content to appear in the drawer header. */headerTitle:PropTypes.node,/** The action to perform on close click. */onClose:PropTypes.func,/** The status of Drawer either open or not. */open:PropTypes.bool,/** The placement of Drawer on the screen either left or right. On mobile it will default to bottom. */position:PropTypes.oneOf(["left","right","bottom"])},Drawer.defaultProps={children:null,className:void 0,footerContent:null,headerTitle:null,onClose:null,open:!1,position:Position.RIGHT};export default Drawer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";/* eslint-disable react/forbid-dom-props */import{action}from"@storybook/addon-actions";import{useState}from"react";import{Button,Nudge}from"..";import DropFade from"./DropFade";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export default{title:"Dialogs/DropFade",component:DropFade};export var Basic=function(){var a=useState(!1),b=_slicedToArray(a,2),c=b[0],d=b[1];return/*#__PURE__*/_jsxs("div",{style:{margin:"0 auto",maxWidth:400},children:[/*#__PURE__*/_jsx(DropFade,{show:c,children:/*#__PURE__*/_jsx("div",{children:/*#__PURE__*/_jsx(Nudge,{media:/*#__PURE__*/_jsx("img",{alt:"",style:{width:44,height:44},src:"https://wise.com/public-resources/assets/public-navigation/saving.svg"}),title:"Did you know it's cool to be Wise?",link:"Get Wise",href:"https://wise.com",onClick:action("action clicked"),onDismiss:action("dismissed")})})}),/*#__PURE__*/_jsx(Button,{className:"m-t-3",block:!0,onClick:function onClick(){return d(!0)},children:"Some other content"})]})};
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";/* eslint-disable react/forbid-dom-props */import{action}from"@storybook/addon-actions";import{useState}from"react";import{Button,Nudge}from"..";import DropFade from"./DropFade";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export default{title:"Dialogs/DropFade",component:DropFade};export var Basic=function(){var a=useState(!1),b=_slicedToArray(a,2),c=b[0],d=b[1];return/*#__PURE__*/_jsxs("div",{style:{margin:"0 auto",maxWidth:400},children:[/*#__PURE__*/_jsx(DropFade,{show:c,children:/*#__PURE__*/_jsx("div",{children:/*#__PURE__*/_jsx(Nudge,{media:/*#__PURE__*/_jsx("img",{alt:"",style:{width:44,height:44},src:"https://wise.com/public-resources/assets/public-navigation/saving.svg"}),mediaName:"globe",title:"Did you know it's cool to be Wise?",link:"Get Wise",href:"https://wise.com",onClick:action("action clicked"),onDismiss:function onDismiss(){action("dismissed"),d(!1)}})})}),/*#__PURE__*/_jsx(Button,{className:"m-t-3",block:!0,onClick:function onClick(){return d(!0)},children:"Some other content"})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Illustration}from"@wise/art";import{useTheme}from"@wise/components-theming";import classNames from"classnames";import PropTypes from"prop-types";import Body from"../body";import{Typography}from"../common";import CloseButton from"../common/closeButton";import Link from"../link";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export var Media={GLOBE:"globe",LOCK:"lock",WALLET:"wallet",GEAR:"gear","INVITE-LETTER":"invite-letter"};var Nudge=function(a){var b=a.media,c=a.mediaName,d=a.title,e=a.link,f=a.href,g=a.onClick,h=a.onDismiss,i=a.id,j=a.className,k=useTheme(),l=k.isModern;return/*#__PURE__*/_jsxs("div",{className:classNames("wds-nudge",j),id:i,children:[l
|
|
1
|
+
import{Illustration}from"@wise/art";import{useTheme}from"@wise/components-theming";import classNames from"classnames";import PropTypes from"prop-types";import Body from"../body";import{Typography}from"../common";import CloseButton from"../common/closeButton";import Link from"../link";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export var Media={GLOBE:"globe",LOCK:"lock",WALLET:"wallet",GEAR:"gear","INVITE-LETTER":"invite-letter"};var Nudge=function(a){var b=a.media,c=a.mediaName,d=a.title,e=a.link,f=a.href,g=a.onClick,h=a.onDismiss,i=a.id,j=a.className,k=useTheme(),l=k.isModern;return/*#__PURE__*/_jsxs("div",{className:classNames("wds-nudge",j),id:i,children:[l?!!c&&/*#__PURE__*/_jsx("div",{className:"wds-nudge-media",children:/*#__PURE__*/_jsx(Illustration,{name:c,className:classNames("wds-nudge-media-".concat(c)),size:"small",disablePadding:!0})}):/*#__PURE__*/_jsx("div",{className:"wds-nudge-media",children:b}),/*#__PURE__*/_jsxs("div",{className:"wds-nudge-container",children:[/*#__PURE__*/_jsxs("div",{className:"wds-nudge-content",children:[l?/*#__PURE__*/_jsx(Body,{type:Typography.BODY_LARGE,className:classNames("wds-nudge-body"),children:d}):/*#__PURE__*/_jsx("div",{className:"wds-nudge-title",children:d}),e&&/*#__PURE__*/_jsx(Link,{href:f,type:Typography.LINK_LARGE,className:"wds-nudge-link",onClick:g,children:e})]}),h&&/*#__PURE__*/_jsx(CloseButton,{className:"wds-nudge-control",size:16,onClick:h})]})]})};Nudge.propTypes={media:PropTypes.node,mediaName:PropTypes.oneOf(["globe","lock","wallet","gear","invite-letter"]),title:PropTypes.node.isRequired,link:PropTypes.node,href:PropTypes.string,onClick:PropTypes.func,onDismiss:PropTypes.func,id:PropTypes.string,className:PropTypes.string},Nudge.Media=Media,Nudge.defaultProps={id:null,className:null,onClick:void 0,onDismiss:void 0};export default Nudge;
|
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
* For a proper disabling, the CSS class needs to be applied for `html` and `body` elements.
|
|
7
7
|
*/export var addNoScrollBodyClass=function(){document.documentElement.classList.add(NO_SCROLL_BODY_CLASS),document.body.classList.add(NO_SCROLL_BODY_CLASS)};/**
|
|
8
8
|
* Clean up after {@link addNoScrollBodyClass} function
|
|
9
|
-
*/export var removeNoScrollBodyClass=function(){
|
|
9
|
+
*/export var removeNoScrollBodyClass=function(){document.documentElement.classList.remove(NO_SCROLL_BODY_CLASS),document.body.classList.remove(NO_SCROLL_BODY_CLASS)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{useTheme}from"@wise/components-theming";import classNames from"classnames";import PropTypes from"prop-types";import{Position,Typography}from"../common";import CloseButton from"../common/closeButton";import{useLayout}from"../common/hooks";import Dimmer from"../dimmer";import SlidingPanel from"../slidingPanel";import Title from"../title";import{logActionRequiredIf}from"../utilities";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var Drawer=function(a){var b=a.children,c=a.className,d=a.footerContent,e=a.headerTitle,f=a.onClose,g=a.open,h=a.position;logActionRequiredIf("Drawer now expects `onClose`, and will soon make this prop required. Please update your usage to provide it.",!f);var i=useLayout(),j=i.isMobile,k=useTheme(),l=k.theme,m=k.isModern;return/*#__PURE__*/_jsx(Dimmer,{open:g,onClose:f,children:/*#__PURE__*/_jsx(SlidingPanel,{open:g,position:j?Position.BOTTOM:h,children:/*#__PURE__*/_jsxs("div",{className:classNames("np-drawer","np-theme-".concat(l),c),children:[/*#__PURE__*/_jsxs("div",{className:classNames("np-drawer-header",{"np-drawer-header--withborder":e}),children:[e&&/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_BODY,children:e}),/*#__PURE__*/_jsx(CloseButton,{onClick:f})]}),b&&/*#__PURE__*/_jsx("div",{className:classNames("np-drawer-content"),children:b}),d&&/*#__PURE__*/_jsx("div",{className:classNames("np-drawer-footer"),children:d})]})})})};Drawer.propTypes={/** The content to appear in the drawer body. */children:PropTypes.node,className:PropTypes.string,/** The content to appear in the drawer footer. */footerContent:PropTypes.node,/** The content to appear in the drawer header. */headerTitle:PropTypes.node,/** The action to perform on close click. */onClose:PropTypes.func,/** The status of Drawer either open or not. */open:PropTypes.bool,/** The placement of Drawer on the screen either left or right. On mobile it will default to bottom. */position:PropTypes.oneOf(["left","right","bottom"])},Drawer.defaultProps={children:null,className:void 0,footerContent:null,headerTitle:null,onClose:null,open:!1,position:Position.RIGHT};export default Drawer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";/* eslint-disable react/forbid-dom-props */import{action}from"@storybook/addon-actions";import{useState}from"react";import{Button,Nudge}from"..";import DropFade from"./DropFade";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export default{title:"Dialogs/DropFade",component:DropFade};export var Basic=function(){var a=useState(!1),b=_slicedToArray(a,2),c=b[0],d=b[1];return/*#__PURE__*/_jsxs("div",{style:{margin:"0 auto",maxWidth:400},children:[/*#__PURE__*/_jsx(DropFade,{show:c,children:/*#__PURE__*/_jsx("div",{children:/*#__PURE__*/_jsx(Nudge,{media:/*#__PURE__*/_jsx("img",{alt:"",style:{width:44,height:44},src:"https://wise.com/public-resources/assets/public-navigation/saving.svg"}),title:"Did you know it's cool to be Wise?",link:"Get Wise",href:"https://wise.com",onClick:action("action clicked"),onDismiss:action("dismissed")})})}),/*#__PURE__*/_jsx(Button,{className:"m-t-3",block:!0,onClick:function onClick(){return d(!0)},children:"Some other content"})]})};
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";/* eslint-disable react/forbid-dom-props */import{action}from"@storybook/addon-actions";import{useState}from"react";import{Button,Nudge}from"..";import DropFade from"./DropFade";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export default{title:"Dialogs/DropFade",component:DropFade};export var Basic=function(){var a=useState(!1),b=_slicedToArray(a,2),c=b[0],d=b[1];return/*#__PURE__*/_jsxs("div",{style:{margin:"0 auto",maxWidth:400},children:[/*#__PURE__*/_jsx(DropFade,{show:c,children:/*#__PURE__*/_jsx("div",{children:/*#__PURE__*/_jsx(Nudge,{media:/*#__PURE__*/_jsx("img",{alt:"",style:{width:44,height:44},src:"https://wise.com/public-resources/assets/public-navigation/saving.svg"}),mediaName:"globe",title:"Did you know it's cool to be Wise?",link:"Get Wise",href:"https://wise.com",onClick:action("action clicked"),onDismiss:function onDismiss(){action("dismissed"),d(!1)}})})}),/*#__PURE__*/_jsx(Button,{className:"m-t-3",block:!0,onClick:function onClick(){return d(!0)},children:"Some other content"})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"core-js/modules/es.string.link.js";import{Illustration}from"@wise/art";import{useTheme}from"@wise/components-theming";import classNames from"classnames";import PropTypes from"prop-types";import Body from"../body";import{Typography}from"../common";import CloseButton from"../common/closeButton";import Link from"../link";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export var Media={GLOBE:"globe",LOCK:"lock",WALLET:"wallet",GEAR:"gear","INVITE-LETTER":"invite-letter"};var Nudge=function(a){var b=a.media,c=a.mediaName,d=a.title,e=a.link,f=a.href,g=a.onClick,h=a.onDismiss,i=a.id,j=a.className,k=useTheme(),l=k.isModern;return/*#__PURE__*/_jsxs("div",{className:classNames("wds-nudge",j),id:i,children:[l
|
|
1
|
+
import"core-js/modules/es.string.link.js";import{Illustration}from"@wise/art";import{useTheme}from"@wise/components-theming";import classNames from"classnames";import PropTypes from"prop-types";import Body from"../body";import{Typography}from"../common";import CloseButton from"../common/closeButton";import Link from"../link";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export var Media={GLOBE:"globe",LOCK:"lock",WALLET:"wallet",GEAR:"gear","INVITE-LETTER":"invite-letter"};var Nudge=function(a){var b=a.media,c=a.mediaName,d=a.title,e=a.link,f=a.href,g=a.onClick,h=a.onDismiss,i=a.id,j=a.className,k=useTheme(),l=k.isModern;return/*#__PURE__*/_jsxs("div",{className:classNames("wds-nudge",j),id:i,children:[l?!!c&&/*#__PURE__*/_jsx("div",{className:"wds-nudge-media",children:/*#__PURE__*/_jsx(Illustration,{name:c,className:classNames("wds-nudge-media-".concat(c)),size:"small",disablePadding:!0})}):/*#__PURE__*/_jsx("div",{className:"wds-nudge-media",children:b}),/*#__PURE__*/_jsxs("div",{className:"wds-nudge-container",children:[/*#__PURE__*/_jsxs("div",{className:"wds-nudge-content",children:[l?/*#__PURE__*/_jsx(Body,{type:Typography.BODY_LARGE,className:classNames("wds-nudge-body"),children:d}):/*#__PURE__*/_jsx("div",{className:"wds-nudge-title",children:d}),e&&/*#__PURE__*/_jsx(Link,{href:f,type:Typography.LINK_LARGE,className:"wds-nudge-link",onClick:g,children:e})]}),h&&/*#__PURE__*/_jsx(CloseButton,{className:"wds-nudge-control",size:16,onClick:h})]})]})};Nudge.propTypes={media:PropTypes.node,mediaName:PropTypes.oneOf(["globe","lock","wallet","gear","invite-letter"]),title:PropTypes.node.isRequired,link:PropTypes.node,href:PropTypes.string,onClick:PropTypes.func,onDismiss:PropTypes.func,id:PropTypes.string,className:PropTypes.string},Nudge.Media=Media,Nudge.defaultProps={id:null,className:null,onClick:void 0,onDismiss:void 0};export default Nudge;
|