@transferwise/components 40.4.0 → 40.5.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,25 @@
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
+ ## [40.5.1](https://github.com/transferwise/neptune-web/compare/@transferwise/components@40.5.0...@transferwise/components@40.5.1) (2022-04-07)
7
+
8
+ **Note:** Version bump only for package @transferwise/components
9
+
10
+
11
+
12
+
13
+
14
+ # [40.5.0](https://github.com/transferwise/neptune-web/compare/@transferwise/components@40.4.0...@transferwise/components@40.5.0) (2022-04-04)
15
+
16
+
17
+ ### Features
18
+
19
+ * **ActionOption:** add showMediaCircle prop ([#1394](https://github.com/transferwise/neptune-web/issues/1394)) ([c82cc72](https://github.com/transferwise/neptune-web/commit/c82cc72e7ddce3c41d874be04bc045269477e374))
20
+
21
+
22
+
23
+
24
+
6
25
  # [40.4.0](https://github.com/transferwise/neptune-web/compare/@transferwise/components@40.3.0...@transferwise/components@40.4.0) (2022-03-31)
7
26
 
8
27
 
@@ -1 +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 classNames from"classnames";import ActionButton from"../actionButton";import Option from"../common/Option";import{jsx as _jsx}from"react/jsx-runtime";var ActionOption=function(a){var b=a.action,c=a.disabled,d=a.onClick,e=a.media,f=a.title,g=a.content,h=a.complex,i=a.className,j=a.showMediaAtAllSizes,k={media:e,title:f,content:g,complex:h,disabled:c,showMediaAtAllSizes:j,className:classNames("tw-action-option",i)};return/*#__PURE__*/_jsx(Option,_objectSpread(_objectSpread({},k),{},{button:/*#__PURE__*/_jsx(ActionButton,{disabled:c,"aria-label":function getAriaLabel(){var a=[];return"string"==typeof f&&a.push(f),"string"==typeof b&&a.push(b),a.join(", ")||void 0}(),text:b,onClick:d})}))};export default ActionOption;
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 classNames from"classnames";import ActionButton from"../actionButton";import Option from"../common/Option";import{jsx as _jsx}from"react/jsx-runtime";var ActionOption=function(a){var b=a.action,c=a.disabled,d=a.onClick,e=a.media,f=a.title,g=a.content,h=a.complex,i=a.className,j=a.showMediaAtAllSizes,k=a.showMediaCircle,l={media:e,title:f,content:g,complex:h,disabled:c,showMediaAtAllSizes:j,showMediaCircle:k,className:classNames("tw-action-option",i)};return/*#__PURE__*/_jsx(Option,_objectSpread(_objectSpread({},l),{},{button:/*#__PURE__*/_jsx(ActionButton,{disabled:c,"aria-label":function getAriaLabel(){var a=[];return"string"==typeof f&&a.push(f),"string"==typeof b&&a.push(b),a.join(", ")||void 0}(),text:b,onClick:d})}))};export default ActionOption;
@@ -1 +1 @@
1
- import{action}from"@storybook/addon-actions";import{text,boolean}from"@storybook/addon-knobs";import{FastFlag as FastFlagIcon}from"@transferwise/icons";import ActionOption from"./ActionOption";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export default{component:ActionOption,title:"ActionOption"};var Template=function(){var a=text("title","Action option"),b=text("content","Normally, the button and icon are vertically centered."),c=text("action","Action"),d=boolean("disabled",!1),e=boolean("showMediaAtAllSizes",!1);return/*#__PURE__*/_jsx(ActionOption,{action:c,media:/*#__PURE__*/_jsx(FastFlagIcon,{}),title:a,content:b,complex:!1,disabled:d,showMediaAtAllSizes:e,onClick:action("Button Clicked")})};export var Basic=function(){return/*#__PURE__*/_jsx(Template,{})};export var Multiple=function(){return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Template,{}),/*#__PURE__*/_jsx(Template,{}),/*#__PURE__*/_jsx(Template,{})]})};
1
+ import{action}from"@storybook/addon-actions";import{text,boolean}from"@storybook/addon-knobs";import{FastFlag as FastFlagIcon}from"@transferwise/icons";import ActionOption from"./ActionOption";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export default{component:ActionOption,title:"ActionOption"};var Template=function(){var a=text("title","Action option"),b=text("content","Normally, the button and icon are vertically centered."),c=text("action","Action"),d=boolean("disabled",!1),e=boolean("showMediaAtAllSizes",!1),f=boolean("showMediaCircle",!1);return/*#__PURE__*/_jsx(ActionOption,{action:c,media:/*#__PURE__*/_jsx(FastFlagIcon,{}),title:a,content:b,complex:!1,disabled:d,showMediaAtAllSizes:e,showMediaCircle:f,onClick:action("Button Clicked")})};export var Basic=function(){return/*#__PURE__*/_jsx(Template,{})};export var Multiple=function(){return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Template,{}),/*#__PURE__*/_jsx(Template,{}),/*#__PURE__*/_jsx(Template,{})]})};
@@ -1 +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.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"core-js/modules/es.array.join.js";import classNames from"classnames";import ActionButton from"../actionButton";import Option from"../common/Option";import{jsx as _jsx}from"react/jsx-runtime";var ActionOption=function(a){var b=a.action,c=a.disabled,d=a.onClick,e=a.media,f=a.title,g=a.content,h=a.complex,i=a.className,j=a.showMediaAtAllSizes,k={media:e,title:f,content:g,complex:h,disabled:c,showMediaAtAllSizes:j,className:classNames("tw-action-option",i)};return/*#__PURE__*/_jsx(Option,_objectSpread(_objectSpread({},k),{},{button:/*#__PURE__*/_jsx(ActionButton,{disabled:c,"aria-label":function getAriaLabel(){var a=[];return"string"==typeof f&&a.push(f),"string"==typeof b&&a.push(b),a.join(", ")||void 0}(),text:b,onClick:d})}))};export default ActionOption;
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.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"core-js/modules/es.array.join.js";import classNames from"classnames";import ActionButton from"../actionButton";import Option from"../common/Option";import{jsx as _jsx}from"react/jsx-runtime";var ActionOption=function(a){var b=a.action,c=a.disabled,d=a.onClick,e=a.media,f=a.title,g=a.content,h=a.complex,i=a.className,j=a.showMediaAtAllSizes,k=a.showMediaCircle,l={media:e,title:f,content:g,complex:h,disabled:c,showMediaAtAllSizes:j,showMediaCircle:k,className:classNames("tw-action-option",i)};return/*#__PURE__*/_jsx(Option,_objectSpread(_objectSpread({},l),{},{button:/*#__PURE__*/_jsx(ActionButton,{disabled:c,"aria-label":function getAriaLabel(){var a=[];return"string"==typeof f&&a.push(f),"string"==typeof b&&a.push(b),a.join(", ")||void 0}(),text:b,onClick:d})}))};export default ActionOption;
@@ -1 +1 @@
1
- import{action}from"@storybook/addon-actions";import{text,boolean}from"@storybook/addon-knobs";import{FastFlag as FastFlagIcon}from"@transferwise/icons";import ActionOption from"./ActionOption";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export default{component:ActionOption,title:"ActionOption"};var Template=function(){var a=text("title","Action option"),b=text("content","Normally, the button and icon are vertically centered."),c=text("action","Action"),d=boolean("disabled",!1),e=boolean("showMediaAtAllSizes",!1);return/*#__PURE__*/_jsx(ActionOption,{action:c,media:/*#__PURE__*/_jsx(FastFlagIcon,{}),title:a,content:b,complex:!1,disabled:d,showMediaAtAllSizes:e,onClick:action("Button Clicked")})};export var Basic=function(){return/*#__PURE__*/_jsx(Template,{})};export var Multiple=function(){return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Template,{}),/*#__PURE__*/_jsx(Template,{}),/*#__PURE__*/_jsx(Template,{})]})};
1
+ import{action}from"@storybook/addon-actions";import{text,boolean}from"@storybook/addon-knobs";import{FastFlag as FastFlagIcon}from"@transferwise/icons";import ActionOption from"./ActionOption";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export default{component:ActionOption,title:"ActionOption"};var Template=function(){var a=text("title","Action option"),b=text("content","Normally, the button and icon are vertically centered."),c=text("action","Action"),d=boolean("disabled",!1),e=boolean("showMediaAtAllSizes",!1),f=boolean("showMediaCircle",!1);return/*#__PURE__*/_jsx(ActionOption,{action:c,media:/*#__PURE__*/_jsx(FastFlagIcon,{}),title:a,content:b,complex:!1,disabled:d,showMediaAtAllSizes:e,showMediaCircle:f,onClick:action("Button Clicked")})};export var Basic=function(){return/*#__PURE__*/_jsx(Template,{})};export var Multiple=function(){return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Template,{}),/*#__PURE__*/_jsx(Template,{}),/*#__PURE__*/_jsx(Template,{})]})};
@@ -9,6 +9,7 @@ declare type Props = {
9
9
  onClick: () => void;
10
10
  title: ReactChild;
11
11
  action: ReactChild;
12
+ showMediaCircle?: boolean;
12
13
  } & CommonProps;
13
- declare const ActionOption: ({ action, disabled, onClick, media, title, content, complex, className, showMediaAtAllSizes, }: Props) => ReactElement;
14
+ declare const ActionOption: ({ action, disabled, onClick, media, title, content, complex, className, showMediaAtAllSizes, showMediaCircle, }: Props) => ReactElement;
14
15
  export default ActionOption;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  declare const _default: {
3
- component: ({ action, disabled, onClick, media, title, content, complex, className, showMediaAtAllSizes, }: {
3
+ component: ({ action, disabled, onClick, media, title, content, complex, className, showMediaAtAllSizes, showMediaCircle, }: {
4
4
  complex?: boolean | undefined;
5
5
  content?: import("react").ReactChild | undefined;
6
6
  disabled?: boolean | undefined;
@@ -9,6 +9,7 @@ declare const _default: {
9
9
  onClick: () => void;
10
10
  title: import("react").ReactChild;
11
11
  action: import("react").ReactChild;
12
+ showMediaCircle?: boolean | undefined;
12
13
  } & import("../common").CommonProps) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
13
14
  title: string;
14
15
  };