@thecb/components 4.1.31-beta.1 → 4.1.32-beta.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/dist/index.cjs.js CHANGED
@@ -15381,19 +15381,10 @@ function _assertThisInitialized(self) {
15381
15381
  return self;
15382
15382
  }
15383
15383
 
15384
- function _setPrototypeOf(o, p) {
15385
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
15386
- o.__proto__ = p;
15387
- return o;
15388
- };
15389
-
15390
- return _setPrototypeOf(o, p);
15391
- }
15392
-
15393
15384
  function _inheritsLoose(subClass, superClass) {
15394
15385
  subClass.prototype = Object.create(superClass.prototype);
15395
15386
  subClass.prototype.constructor = subClass;
15396
- _setPrototypeOf(subClass, superClass);
15387
+ subClass.__proto__ = superClass;
15397
15388
  }
15398
15389
 
15399
15390
  function _getPrototypeOf(o) {
@@ -15403,6 +15394,15 @@ function _getPrototypeOf(o) {
15403
15394
  return _getPrototypeOf(o);
15404
15395
  }
15405
15396
 
15397
+ function _setPrototypeOf(o, p) {
15398
+ _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
15399
+ o.__proto__ = p;
15400
+ return o;
15401
+ };
15402
+
15403
+ return _setPrototypeOf(o, p);
15404
+ }
15405
+
15406
15406
  function _isNativeFunction(fn) {
15407
15407
  return Function.toString.call(fn).indexOf("[native code]") !== -1;
15408
15408
  }
@@ -15413,7 +15413,7 @@ function _isNativeReflectConstruct() {
15413
15413
  if (typeof Proxy === "function") return true;
15414
15414
 
15415
15415
  try {
15416
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
15416
+ Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
15417
15417
  return true;
15418
15418
  } catch (e) {
15419
15419
  return false;
@@ -15553,9 +15553,7 @@ var ERRORS = {
15553
15553
  "73": "Please provide a valid CSS variable.\n\n",
15554
15554
  "74": "CSS variable not found and no default was provided.\n\n",
15555
15555
  "75": "important requires a valid style object, got a %s instead.\n\n",
15556
- "76": "fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.\n\n",
15557
- "77": "remToPx expects a value in \"rem\" but you provided it in \"%s\".\n\n",
15558
- "78": "base must be set in \"px\" or \"%\" but you set it in \"%s\".\n"
15556
+ "76": "fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.\n"
15559
15557
  };
15560
15558
  /**
15561
15559
  * super basic version of sprintf
@@ -21652,7 +21650,10 @@ var Placeholder = function Placeholder(_ref2) {
21652
21650
  maxWidth: "300px"
21653
21651
  }, /*#__PURE__*/React__default.createElement(Box, {
21654
21652
  padding: "0",
21655
- tabIndex: "0"
21653
+ tabIndex: "0",
21654
+ onKeyPress: function onKeyPress(e) {
21655
+ return e.key === "Enter" && action();
21656
+ }
21656
21657
  }, /*#__PURE__*/React__default.createElement(Cluster, {
21657
21658
  justify: "center",
21658
21659
  align: "center",
@@ -34588,8 +34589,6 @@ var CollapsibleSection = function CollapsibleSection(_ref) {
34588
34589
  };
34589
34590
  return /*#__PURE__*/React__default.createElement(Motion, {
34590
34591
  padding: "0",
34591
- tabIndex: "0",
34592
- onKeyDown: handleKeyDown,
34593
34592
  hoverStyles: "outline: none;",
34594
34593
  animate: isOpen ? "open" : "closed",
34595
34594
  positionTransition: true
@@ -34602,7 +34601,8 @@ var CollapsibleSection = function CollapsibleSection(_ref) {
34602
34601
  onTouchEnd: isMobile && supportsTouch ? toggleSection : noop,
34603
34602
  key: "header",
34604
34603
  hoverStyles: "cursor: pointer;",
34605
- tabIndex: "0"
34604
+ tabIndex: "0",
34605
+ onKeyDown: handleKeyDown
34606
34606
  }, /*#__PURE__*/React__default.createElement(Cluster, {
34607
34607
  justify: "space-between",
34608
34608
  align: "center"
@@ -34744,7 +34744,7 @@ var EditableList = function EditableList(_ref) {
34744
34744
  useModal = _ref$useModal === void 0 ? false : _ref$useModal,
34745
34745
  Modal = _ref.modal,
34746
34746
  modalProps = _ref.modalProps,
34747
- autoPayMethod = _ref.autoPayMethod,
34747
+ autoPayMethods = _ref.autoPayMethods,
34748
34748
  qaPrefix = _ref.qaPrefix;
34749
34749
  return /*#__PURE__*/React__default.createElement(Box, {
34750
34750
  padding: "0rem 0rem 1.5rem 0rem"
@@ -34768,7 +34768,9 @@ var EditableList = function EditableList(_ref) {
34768
34768
  toggleModal = _useState2[1];
34769
34769
 
34770
34770
  return /*#__PURE__*/React__default.createElement(EditableListItem, {
34771
- listItemSize: !!item.id && item.id === autoPayMethod ? "big" : listItemSize,
34771
+ listItemSize: !!item.id && (autoPayMethods === null || autoPayMethods === void 0 ? void 0 : autoPayMethods.some(function (methodID) {
34772
+ return methodID === item.id;
34773
+ })) ? "big" : listItemSize,
34772
34774
  key: item.id || item
34773
34775
  }, /*#__PURE__*/React__default.createElement(Text$1, {
34774
34776
  variant: "p",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "4.1.31-beta.1",
3
+ "version": "4.1.32-beta.1",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -87,7 +87,11 @@ const Placeholder = ({
87
87
  };`}
88
88
  >
89
89
  <Center maxWidth="300px">
90
- <Box padding="0" tabIndex="0">
90
+ <Box
91
+ padding="0"
92
+ tabIndex="0"
93
+ onKeyPress={e => e.key === "Enter" && action()}
94
+ >
91
95
  <Cluster justify="center" align="center" minHeight="100%">
92
96
  <Switcher maxChildren={2} childGap="0">
93
97
  {variant === "large" && <div></div>}
@@ -64,8 +64,6 @@ const CollapsibleSection = ({
64
64
  return (
65
65
  <Motion
66
66
  padding="0"
67
- tabIndex="0"
68
- onKeyDown={handleKeyDown}
69
67
  hoverStyles={`outline: none;`}
70
68
  animate={isOpen ? "open" : "closed"}
71
69
  positionTransition
@@ -80,6 +78,7 @@ const CollapsibleSection = ({
80
78
  key="header"
81
79
  hoverStyles={`cursor: pointer;`}
82
80
  tabIndex="0"
81
+ onKeyDown={handleKeyDown}
83
82
  >
84
83
  <Cluster justify="space-between" align="center">
85
84
  {customTitle ? (
@@ -32,7 +32,7 @@ const EditableList = ({
32
32
  useModal = false,
33
33
  modal: Modal,
34
34
  modalProps,
35
- autoPayMethod,
35
+ autoPayMethods,
36
36
  qaPrefix
37
37
  }) => (
38
38
  <Box padding="0rem 0rem 1.5rem 0rem">
@@ -60,7 +60,10 @@ const EditableList = ({
60
60
  return (
61
61
  <EditableListItem
62
62
  listItemSize={
63
- !!item.id && item.id === autoPayMethod ? "big" : listItemSize
63
+ !!item.id &&
64
+ autoPayMethods?.some(methodID => methodID === item.id)
65
+ ? "big"
66
+ : listItemSize
64
67
  }
65
68
  key={item.id || item}
66
69
  >