@transferwise/components 44.0.1 → 44.1.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/avatar/Avatar.js +1 -1
- package/build/es/no-polyfill/progressBar/ProgressBar.js +1 -1
- package/build/es/no-polyfill/progressBar/ProgressBar.story.js +1 -0
- package/build/es/polyfill/avatar/Avatar.js +1 -1
- package/build/es/polyfill/progressBar/ProgressBar.js +1 -1
- package/build/es/polyfill/progressBar/ProgressBar.story.js +1 -0
- package/build/main.css +1 -1
- package/build/styles/avatar/Avatar.css +1 -1
- package/build/styles/main.css +1 -1
- package/build/types/avatar/Avatar.d.ts +1 -1
- package/build/types/progressBar/ProgressBar.d.ts +1 -1
- package/build/types/progressBar/ProgressBar.story.d.ts +8 -0
- package/build/umd/no-polyfill/main.js +1 -1
- package/build/umd/polyfill/main.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import classnames from"classnames";import PropTypes from"prop-types";import{Size,Theme}from"../common";import{AvatarType}from"./avatarTypes";import{jsx as _jsx}from"react/jsx-runtime";var Avatar=function(a){var b=a.backgroundColor,c=a.children,d=a.className,e=a.outlined,f=a.size,g=a.theme,h=a.type;return/*#__PURE__*/_jsx("div",{className:classnames("tw-avatar",d,"tw-avatar--".concat(f),"tw-avatar--".concat(h),"tw-avatar--".concat(g),{"tw-avatar--outlined":e,"np-text-title-body":h===AvatarType.INITIALS}),children:/*#__PURE__*/_jsx("div",{className:"tw-avatar__content",style:{backgroundColor:b||void 0},children:c})})};Avatar.propTypes={backgroundColor:PropTypes.string,children:PropTypes.node,className:PropTypes.string,outlined:PropTypes.bool,size:PropTypes.oneOf(["sm","md","lg"]),theme:PropTypes.oneOf(["light","dark"]),type:PropTypes.oneOf(["thumbnail","icon","emoji","initials"])},Avatar.defaultProps={backgroundColor:null,children:null,className:null,outlined:!1,size:Size.MEDIUM,theme:Theme.LIGHT,type:AvatarType.THUMBNAIL};export default Avatar;
|
|
1
|
+
import classnames from"classnames";import PropTypes from"prop-types";import{Size,Theme}from"../common";import{AvatarType}from"./avatarTypes";import{jsx as _jsx}from"react/jsx-runtime";var Avatar=function(a){var b=a.backgroundColor,c=a.children,d=a.className,e=a.outlined,f=a.size,g=a.theme,h=a.type;return/*#__PURE__*/_jsx("div",{className:classnames("tw-avatar",d,"tw-avatar--".concat(f),"tw-avatar--".concat(h),"tw-avatar--".concat(g),{"tw-avatar--outlined":e,"np-text-title-body":h===AvatarType.INITIALS}),children:/*#__PURE__*/_jsx("div",{className:"tw-avatar__content",style:{backgroundColor:b||void 0},children:c})})};Avatar.propTypes={backgroundColor:PropTypes.string,children:PropTypes.node,className:PropTypes.string,outlined:PropTypes.bool,size:PropTypes.oneOf(["sm","md","lg",40,56]),theme:PropTypes.oneOf(["light","dark"]),type:PropTypes.oneOf(["thumbnail","icon","emoji","initials"])},Avatar.defaultProps={backgroundColor:null,children:null,className:null,outlined:!1,size:Size.MEDIUM,theme:Theme.LIGHT,type:AvatarType.THUMBNAIL};export default Avatar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useTheme}from"@wise/components-theming";import classNames from"classnames";import Body from"../body";import{Typography}from"../common";import Progress from"../progress";import Title from"../title/Title";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var ProgressBar=function(a){var b=a.className,c=a.description,d=a.id,e=a.title,f=a.progress,g=a.textEnd,h=useTheme(),i=h.isModern;return/*#__PURE__*/_jsxs("div",{className:classNames("np-progress-bar
|
|
1
|
+
import{useTheme}from"@wise/components-theming";import classNames from"classnames";import Body from"../body";import{Typography}from"../common";import Progress from"../progress";import Title from"../title/Title";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var ProgressBar=function(a){var b=a.className,c=a.description,d=a.id,e=a.title,f=a.progress,g=a.textEnd,h=useTheme(),i=h.isModern;return/*#__PURE__*/_jsxs("div",{className:classNames("np-progress-bar",b),children:[/*#__PURE__*/_jsxs("label",{className:"np-progress-bar__title m-b-1",htmlFor:d,children:[/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_BODY,className:i?"m-b-1 text-primary":"text-primary",children:e}),c&&/*#__PURE__*/_jsx(Body,{children:c})]}),/*#__PURE__*/_jsx(Progress,{id:d,progress:f}),/*#__PURE__*/_jsx(Body,{as:"p",type:Typography.BODY_DEFAULT_BOLD,className:"d-flex justify-content-end text-primary m-b-0",children:g})]})};export default ProgressBar;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import _defineProperty from"@babel/runtime/helpers/defineProperty";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import ProgressBar from"./ProgressBar";import{jsx as _jsx}from"react/jsx-runtime";export default{component:ProgressBar,title:"Other/ProgressBar"};export var Basic=function(){return/*#__PURE__*/_jsx(ProgressBar,_objectSpread({},{description:"You have 3 days to reach your goal.",id:"progress-bar-id",title:"Send 5,550 GBP",progress:{value:50,max:100},textEnd:"200 GBP to go"}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import classnames from"classnames";import PropTypes from"prop-types";import{Size,Theme}from"../common";import{AvatarType}from"./avatarTypes";import{jsx as _jsx}from"react/jsx-runtime";var Avatar=function(a){var b=a.backgroundColor,c=a.children,d=a.className,e=a.outlined,f=a.size,g=a.theme,h=a.type;return/*#__PURE__*/_jsx("div",{className:classnames("tw-avatar",d,"tw-avatar--".concat(f),"tw-avatar--".concat(h),"tw-avatar--".concat(g),{"tw-avatar--outlined":e,"np-text-title-body":h===AvatarType.INITIALS}),children:/*#__PURE__*/_jsx("div",{className:"tw-avatar__content",style:{backgroundColor:b||void 0},children:c})})};Avatar.propTypes={backgroundColor:PropTypes.string,children:PropTypes.node,className:PropTypes.string,outlined:PropTypes.bool,size:PropTypes.oneOf(["sm","md","lg"]),theme:PropTypes.oneOf(["light","dark"]),type:PropTypes.oneOf(["thumbnail","icon","emoji","initials"])},Avatar.defaultProps={backgroundColor:null,children:null,className:null,outlined:!1,size:Size.MEDIUM,theme:Theme.LIGHT,type:AvatarType.THUMBNAIL};export default Avatar;
|
|
1
|
+
import classnames from"classnames";import PropTypes from"prop-types";import{Size,Theme}from"../common";import{AvatarType}from"./avatarTypes";import{jsx as _jsx}from"react/jsx-runtime";var Avatar=function(a){var b=a.backgroundColor,c=a.children,d=a.className,e=a.outlined,f=a.size,g=a.theme,h=a.type;return/*#__PURE__*/_jsx("div",{className:classnames("tw-avatar",d,"tw-avatar--".concat(f),"tw-avatar--".concat(h),"tw-avatar--".concat(g),{"tw-avatar--outlined":e,"np-text-title-body":h===AvatarType.INITIALS}),children:/*#__PURE__*/_jsx("div",{className:"tw-avatar__content",style:{backgroundColor:b||void 0},children:c})})};Avatar.propTypes={backgroundColor:PropTypes.string,children:PropTypes.node,className:PropTypes.string,outlined:PropTypes.bool,size:PropTypes.oneOf(["sm","md","lg",40,56]),theme:PropTypes.oneOf(["light","dark"]),type:PropTypes.oneOf(["thumbnail","icon","emoji","initials"])},Avatar.defaultProps={backgroundColor:null,children:null,className:null,outlined:!1,size:Size.MEDIUM,theme:Theme.LIGHT,type:AvatarType.THUMBNAIL};export default Avatar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"core-js/modules/es.symbol.js";import"core-js/modules/es.symbol.description.js";import{useTheme}from"@wise/components-theming";import classNames from"classnames";import Body from"../body";import{Typography}from"../common";import Progress from"../progress";import Title from"../title/Title";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var ProgressBar=function(a){var b=a.className,c=a.description,d=a.id,e=a.title,f=a.progress,g=a.textEnd,h=useTheme(),i=h.isModern;return/*#__PURE__*/_jsxs("div",{className:classNames("np-progress-bar
|
|
1
|
+
import"core-js/modules/es.symbol.js";import"core-js/modules/es.symbol.description.js";import{useTheme}from"@wise/components-theming";import classNames from"classnames";import Body from"../body";import{Typography}from"../common";import Progress from"../progress";import Title from"../title/Title";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var ProgressBar=function(a){var b=a.className,c=a.description,d=a.id,e=a.title,f=a.progress,g=a.textEnd,h=useTheme(),i=h.isModern;return/*#__PURE__*/_jsxs("div",{className:classNames("np-progress-bar",b),children:[/*#__PURE__*/_jsxs("label",{className:"np-progress-bar__title m-b-1",htmlFor:d,children:[/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_BODY,className:i?"m-b-1 text-primary":"text-primary",children:e}),c&&/*#__PURE__*/_jsx(Body,{children:c})]}),/*#__PURE__*/_jsx(Progress,{id:d,progress:f}),/*#__PURE__*/_jsx(Body,{as:"p",type:Typography.BODY_DEFAULT_BOLD,className:"d-flex justify-content-end text-primary m-b-0",children:g})]})};export default ProgressBar;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import _defineProperty from"@babel/runtime/helpers/defineProperty";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import ProgressBar from"./ProgressBar";import{jsx as _jsx}from"react/jsx-runtime";export default{component:ProgressBar,title:"Other/ProgressBar"};export var Basic=function(){return/*#__PURE__*/_jsx(ProgressBar,_objectSpread({},{description:"You have 3 days to reach your goal.",id:"progress-bar-id",title:"Send 5,550 GBP",progress:{value:50,max:100},textEnd:"200 GBP to go"}))};
|