@transferwise/components 43.11.2 → 43.11.3

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.
@@ -1 +1 @@
1
- import _defineProperty from"@babel/runtime/helpers/defineProperty";var _typeClassMap;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{AlertCircle as AlertCircleIcon}from"@transferwise/icons";import{useTheme}from"@wise/components-theming";import classNames from"classnames";import PropTypes from"prop-types";import withArrow,{AlertArrowPosition}from"../alert/withArrow";import{Sentiment}from"../common";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var typeClassMap=(_typeClassMap={},_defineProperty(_typeClassMap,Sentiment.ERROR,"danger"),_defineProperty(_typeClassMap,Sentiment.NEGATIVE,"danger"),_typeClassMap),InlineAlert=function(a){var b=useTheme(),c=b.isModern,d="alert-".concat(typeClassMap[a.type]||a.type);if(c)return/*#__PURE__*/_jsxs("div",{role:"alert",id:a.id,className:classNames("alert alert-detach",d,a.className),children:[("error"===a.type||"negative"===a.type)&&/*#__PURE__*/_jsx(AlertCircleIcon,{}),a.children]});var e=withArrow(function getAlertContents(b){var c=b.children,e=b.className;return/*#__PURE__*/_jsx("div",{role:"alert",id:a.id,className:classNames("alert alert-detach p-x-2 p-y-1",d,e),children:c})},AlertArrowPosition.TOP_LEFT);return/*#__PURE__*/_jsx(e,_objectSpread({},a))};InlineAlert.propTypes={children:PropTypes.node.isRequired,className:PropTypes.string,id:PropTypes.string,type:PropTypes.oneOf(["positive","negative","warning","neutral","success","info","error"])},InlineAlert.defaultProps={className:void 0,id:void 0,type:Sentiment.NEUTRAL};export default InlineAlert;
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";var _typeClassMap;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{AlertCircle as AlertCircleIcon}from"@transferwise/icons";import{useTheme}from"@wise/components-theming";import classNames from"classnames";import PropTypes from"prop-types";import withArrow,{AlertArrowPosition}from"../alert/withArrow";import{Sentiment}from"../common";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var typeClassMap=(_typeClassMap={},_defineProperty(_typeClassMap,Sentiment.ERROR,"danger"),_defineProperty(_typeClassMap,Sentiment.NEGATIVE,"danger"),_typeClassMap),InlineAlert=function(a){var b=useTheme(),c=b.isModern,d="alert-".concat(typeClassMap[a.type]||a.type);if(c)return/*#__PURE__*/_jsxs("div",{role:"alert",id:a.id,className:classNames("alert alert-detach",d,a.className),children:[("error"===a.type||"negative"===a.type)&&/*#__PURE__*/_jsx(AlertCircleIcon,{}),/*#__PURE__*/_jsx("div",{children:a.children})]});var e=withArrow(function getAlertContents(b){var c=b.children,e=b.className;return/*#__PURE__*/_jsx("div",{role:"alert",id:a.id,className:classNames("alert alert-detach p-x-2 p-y-1",d,e),children:c})},AlertArrowPosition.TOP_LEFT);return/*#__PURE__*/_jsx(e,_objectSpread({},a))};InlineAlert.propTypes={children:PropTypes.node.isRequired,className:PropTypes.string,id:PropTypes.string,type:PropTypes.oneOf(["positive","negative","warning","neutral","success","info","error"])},InlineAlert.defaultProps={className:void 0,id:void 0,type:Sentiment.NEUTRAL};export default InlineAlert;
@@ -1 +1 @@
1
- import _defineProperty from"@babel/runtime/helpers/defineProperty";var _typeClassMap;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{AlertCircle as AlertCircleIcon}from"@transferwise/icons";import{useTheme}from"@wise/components-theming";import classNames from"classnames";import PropTypes from"prop-types";import withArrow,{AlertArrowPosition}from"../alert/withArrow";import{Sentiment}from"../common";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var typeClassMap=(_typeClassMap={},_defineProperty(_typeClassMap,Sentiment.ERROR,"danger"),_defineProperty(_typeClassMap,Sentiment.NEGATIVE,"danger"),_typeClassMap),InlineAlert=function(a){var b=useTheme(),c=b.isModern,d="alert-".concat(typeClassMap[a.type]||a.type);if(c)return/*#__PURE__*/_jsxs("div",{role:"alert",id:a.id,className:classNames("alert alert-detach",d,a.className),children:[("error"===a.type||"negative"===a.type)&&/*#__PURE__*/_jsx(AlertCircleIcon,{}),a.children]});var e=withArrow(function getAlertContents(b){var c=b.children,e=b.className;return/*#__PURE__*/_jsx("div",{role:"alert",id:a.id,className:classNames("alert alert-detach p-x-2 p-y-1",d,e),children:c})},AlertArrowPosition.TOP_LEFT);return/*#__PURE__*/_jsx(e,_objectSpread({},a))};InlineAlert.propTypes={children:PropTypes.node.isRequired,className:PropTypes.string,id:PropTypes.string,type:PropTypes.oneOf(["positive","negative","warning","neutral","success","info","error"])},InlineAlert.defaultProps={className:void 0,id:void 0,type:Sentiment.NEUTRAL};export default InlineAlert;
1
+ import _defineProperty from"@babel/runtime/helpers/defineProperty";var _typeClassMap;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{AlertCircle as AlertCircleIcon}from"@transferwise/icons";import{useTheme}from"@wise/components-theming";import classNames from"classnames";import PropTypes from"prop-types";import withArrow,{AlertArrowPosition}from"../alert/withArrow";import{Sentiment}from"../common";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var typeClassMap=(_typeClassMap={},_defineProperty(_typeClassMap,Sentiment.ERROR,"danger"),_defineProperty(_typeClassMap,Sentiment.NEGATIVE,"danger"),_typeClassMap),InlineAlert=function(a){var b=useTheme(),c=b.isModern,d="alert-".concat(typeClassMap[a.type]||a.type);if(c)return/*#__PURE__*/_jsxs("div",{role:"alert",id:a.id,className:classNames("alert alert-detach",d,a.className),children:[("error"===a.type||"negative"===a.type)&&/*#__PURE__*/_jsx(AlertCircleIcon,{}),/*#__PURE__*/_jsx("div",{children:a.children})]});var e=withArrow(function getAlertContents(b){var c=b.children,e=b.className;return/*#__PURE__*/_jsx("div",{role:"alert",id:a.id,className:classNames("alert alert-detach p-x-2 p-y-1",d,e),children:c})},AlertArrowPosition.TOP_LEFT);return/*#__PURE__*/_jsx(e,_objectSpread({},a))};InlineAlert.propTypes={children:PropTypes.node.isRequired,className:PropTypes.string,id:PropTypes.string,type:PropTypes.oneOf(["positive","negative","warning","neutral","success","info","error"])},InlineAlert.defaultProps={className:void 0,id:void 0,type:Sentiment.NEUTRAL};export default InlineAlert;