@transferwise/components 40.12.9 → 40.12.10

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,17 @@
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.12.10](https://github.com/transferwise/neptune-web/compare/@transferwise/components@40.12.9...@transferwise/components@40.12.10) (2022-07-06)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * make onclick not required ([7ea0f63](https://github.com/transferwise/neptune-web/commit/7ea0f6381db49b459f4ec87ec2497cbd296a6f29))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [40.12.9](https://github.com/transferwise/neptune-web/compare/@transferwise/components@40.12.8...@transferwise/components@40.12.9) (2022-06-28)
7
18
 
8
19
  **Note:** Version bump only for package @transferwise/components
@@ -2,4 +2,4 @@ import classNames from"classnames";import PropTypes from"prop-types";import requ
2
2
  ,{complex:!1,content:c,disabled:d,href:f,target:g,media:m,showMediaAtAllSizes:!0,showMediaCircle:e,title:o,onClick:n},"nav-".concat(b))),k[1].items.push(/*#__PURE__*/_jsx(Tile// eslint-disable-next-line react/no-array-index-key
3
3
  ,{className:classNames("np-decision__tile".concat(i?"--small":""),{"np-decision__tile--fixed-width":j}),description:c,disabled:d,href:f,target:g,media:l,size:i?Size.SMALL:Size.MEDIUM,title:o,onClick:n},"tile-".concat(b)))}),/*#__PURE__*/_jsx("div",{className:classNames("np-decision",{"np-decision--small":i,"np-decision--grid":j}),children:/*#__PURE__*/_jsx(SizeSwapper,{items:k})})}// LIST
4
4
  return b.map(function(a,b){var c=a.title,d=a.description,f=a.disabled,g=a.href,h=a.target,i=a.media.list,j=a.onClick;return/*#__PURE__*/_jsx(NavigationOption// eslint-disable-next-line react/no-array-index-key
5
- ,{complex:!1,content:d,disabled:f,href:g,target:h,media:i,showMediaAtAllSizes:!0,showMediaCircle:e,title:c,onClick:j},"nav-".concat(b))})}return/*#__PURE__*/_jsx(_Fragment,{})};Decision.propTypes={/** A list of elements to be rendered */options:PropTypes.arrayOf(PropTypes.shape({description:PropTypes.node,disabled:PropTypes.bool,href:requiredIf(PropTypes.string,function(a){return a.type===Type.NAVIGATION}),target:PropTypes.oneOf(["_self","_blank","_parent","_top"]),media:PropTypes.shape({block:PropTypes.node.isRequired,list:PropTypes.node.isRequired}),onClick:PropTypes.func.isRequired,title:PropTypes.node.isRequired})).isRequired,/** Handles the display mode of the component */presentation:PropTypes.oneOf(["LIST","LIST_BLOCK","LIST_BLOCK_GRID"]),/** Size currently affects only Tile dimension */size:PropTypes.oneOf(["sm","md"]),/** Decide which kind of element type needs to be rendered ex: Navigation Options or in the future Radio or Checkbox Options */type:PropTypes.oneOf(["NAVIGATION"]),/** Display media in a circle in list presentation */showMediaCircleInList:PropTypes.bool},Decision.defaultProps={presentation:Presentation.LIST,size:Size.MEDIUM,type:Type.NAVIGATION,showMediaCircleInList:!0};export default Decision;
5
+ ,{complex:!1,content:d,disabled:f,href:g,target:h,media:i,showMediaAtAllSizes:!0,showMediaCircle:e,title:c,onClick:j},"nav-".concat(b))})}return/*#__PURE__*/_jsx(_Fragment,{})};Decision.propTypes={/** A list of elements to be rendered */options:PropTypes.arrayOf(PropTypes.shape({description:PropTypes.node,disabled:PropTypes.bool,href:requiredIf(PropTypes.string,function(a){return a.type===Type.NAVIGATION}),target:PropTypes.oneOf(["_self","_blank","_parent","_top"]),media:PropTypes.shape({block:PropTypes.node.isRequired,list:PropTypes.node.isRequired}),onClick:PropTypes.func,title:PropTypes.node.isRequired})).isRequired,/** Handles the display mode of the component */presentation:PropTypes.oneOf(["LIST","LIST_BLOCK","LIST_BLOCK_GRID"]),/** Size currently affects only Tile dimension */size:PropTypes.oneOf(["sm","md"]),/** Decide which kind of element type needs to be rendered ex: Navigation Options or in the future Radio or Checkbox Options */type:PropTypes.oneOf(["NAVIGATION"]),/** Display media in a circle in list presentation */showMediaCircleInList:PropTypes.bool},Decision.defaultProps={presentation:Presentation.LIST,size:Size.MEDIUM,type:Type.NAVIGATION,showMediaCircleInList:!0};export default Decision;
@@ -2,4 +2,4 @@ import"core-js/modules/es.object.to-string.js";import"core-js/modules/web.dom-co
2
2
  ,{complex:!1,content:c,disabled:d,href:f,target:g,media:m,showMediaAtAllSizes:!0,showMediaCircle:e,title:o,onClick:n},"nav-".concat(b))),k[1].items.push(/*#__PURE__*/_jsx(Tile// eslint-disable-next-line react/no-array-index-key
3
3
  ,{className:classNames("np-decision__tile".concat(i?"--small":""),{"np-decision__tile--fixed-width":j}),description:c,disabled:d,href:f,target:g,media:l,size:i?Size.SMALL:Size.MEDIUM,title:o,onClick:n},"tile-".concat(b)))}),/*#__PURE__*/_jsx("div",{className:classNames("np-decision",{"np-decision--small":i,"np-decision--grid":j}),children:/*#__PURE__*/_jsx(SizeSwapper,{items:k})})}// LIST
4
4
  return b.map(function(a,b){var c=a.title,d=a.description,f=a.disabled,g=a.href,h=a.target,i=a.media.list,j=a.onClick;return/*#__PURE__*/_jsx(NavigationOption// eslint-disable-next-line react/no-array-index-key
5
- ,{complex:!1,content:d,disabled:f,href:g,target:h,media:i,showMediaAtAllSizes:!0,showMediaCircle:e,title:c,onClick:j},"nav-".concat(b))})}return/*#__PURE__*/_jsx(_Fragment,{})};Decision.propTypes={/** A list of elements to be rendered */options:PropTypes.arrayOf(PropTypes.shape({description:PropTypes.node,disabled:PropTypes.bool,href:requiredIf(PropTypes.string,function(a){return a.type===Type.NAVIGATION}),target:PropTypes.oneOf(["_self","_blank","_parent","_top"]),media:PropTypes.shape({block:PropTypes.node.isRequired,list:PropTypes.node.isRequired}),onClick:PropTypes.func.isRequired,title:PropTypes.node.isRequired})).isRequired,/** Handles the display mode of the component */presentation:PropTypes.oneOf(["LIST","LIST_BLOCK","LIST_BLOCK_GRID"]),/** Size currently affects only Tile dimension */size:PropTypes.oneOf(["sm","md"]),/** Decide which kind of element type needs to be rendered ex: Navigation Options or in the future Radio or Checkbox Options */type:PropTypes.oneOf(["NAVIGATION"]),/** Display media in a circle in list presentation */showMediaCircleInList:PropTypes.bool},Decision.defaultProps={presentation:Presentation.LIST,size:Size.MEDIUM,type:Type.NAVIGATION,showMediaCircleInList:!0};export default Decision;
5
+ ,{complex:!1,content:d,disabled:f,href:g,target:h,media:i,showMediaAtAllSizes:!0,showMediaCircle:e,title:c,onClick:j},"nav-".concat(b))})}return/*#__PURE__*/_jsx(_Fragment,{})};Decision.propTypes={/** A list of elements to be rendered */options:PropTypes.arrayOf(PropTypes.shape({description:PropTypes.node,disabled:PropTypes.bool,href:requiredIf(PropTypes.string,function(a){return a.type===Type.NAVIGATION}),target:PropTypes.oneOf(["_self","_blank","_parent","_top"]),media:PropTypes.shape({block:PropTypes.node.isRequired,list:PropTypes.node.isRequired}),onClick:PropTypes.func,title:PropTypes.node.isRequired})).isRequired,/** Handles the display mode of the component */presentation:PropTypes.oneOf(["LIST","LIST_BLOCK","LIST_BLOCK_GRID"]),/** Size currently affects only Tile dimension */size:PropTypes.oneOf(["sm","md"]),/** Decide which kind of element type needs to be rendered ex: Navigation Options or in the future Radio or Checkbox Options */type:PropTypes.oneOf(["NAVIGATION"]),/** Display media in a circle in list presentation */showMediaCircleInList:PropTypes.bool},Decision.defaultProps={presentation:Presentation.LIST,size:Size.MEDIUM,type:Type.NAVIGATION,showMediaCircleInList:!0};export default Decision;
@@ -9,7 +9,7 @@ export interface DecisionOptions {
9
9
  block: React.ReactNode;
10
10
  list: React.ReactNode;
11
11
  };
12
- onClick: (...args: any[])=>any;
12
+ onClick?: (...args: any[])=>any;
13
13
  title: React.ReactNode;
14
14
  }
15
15