@thecb/components 9.2.10-beta.1 → 9.2.10-beta.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.
package/dist/index.cjs.js CHANGED
@@ -45767,9 +45767,7 @@ var Modal$1 = function Modal(_ref) {
45767
45767
  _ref$dataQa = _ref.dataQa,
45768
45768
  dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
45769
45769
  _ref$initialFocusSele = _ref.initialFocusSelector,
45770
- initialFocusSelector = _ref$initialFocusSele === void 0 ? "" : _ref$initialFocusSele,
45771
- _ref$modalName = _ref.modalName,
45772
- modalName = _ref$modalName === void 0 ? "" : _ref$modalName;
45770
+ initialFocusSelector = _ref$initialFocusSele === void 0 ? "" : _ref$initialFocusSele;
45773
45771
 
45774
45772
  var _useContext = React.useContext(styled.ThemeContext),
45775
45773
  isMobile = _useContext.isMobile;
@@ -45798,8 +45796,9 @@ var Modal$1 = function Modal(_ref) {
45798
45796
  },
45799
45797
  underlayClickExits: underlayClickExits,
45800
45798
  "aria-modal": true,
45801
- "aria-name": !!modalName.length ? modalName : modalHeaderText,
45802
- initialFocus: initialFocusSelector
45799
+ initialFocus: initialFocusSelector,
45800
+ focusDialog: !initialFocusSelector // Focus the dialogue box itself if no selector for initial focus was provided
45801
+
45803
45802
  }, /*#__PURE__*/React__default.createElement(Box, {
45804
45803
  padding: "0",
45805
45804
  borderRadius: "2px",
@@ -47729,7 +47728,8 @@ var AccountAndRoutingModal = function AccountAndRoutingModal(_ref) {
47729
47728
  continueAction: function continueAction() {
47730
47729
  toggleAccepted(true);
47731
47730
  toggleOpen(false);
47732
- }
47731
+ },
47732
+ initialFocusSelector: "[name='Close']"
47733
47733
  }, /*#__PURE__*/React__default.createElement(Text$1, {
47734
47734
  variant: "pS",
47735
47735
  onClick: function onClick() {
@@ -47989,9 +47989,7 @@ var TermsAndConditions = function TermsAndConditions(_ref) {
47989
47989
  rest = _objectWithoutProperties(_ref, _excluded$y);
47990
47990
 
47991
47991
  var TermsAndConditionsControl = version === "v1" ? TermsAndConditionsControlV1 : TermsAndConditionsControlV2;
47992
- return /*#__PURE__*/React__default.createElement(TermsAndConditionsControl, _extends({
47993
- initialFocusSelector: "[role='button']:not(.modal-trigger)"
47994
- }, rest));
47992
+ return /*#__PURE__*/React__default.createElement(TermsAndConditionsControl, rest);
47995
47993
  };
47996
47994
 
47997
47995
  var PaymentFormACH = function PaymentFormACH(_ref) {
@@ -48173,7 +48171,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
48173
48171
  version: "v2",
48174
48172
  showCheckbox: false,
48175
48173
  description: "View",
48176
- terms: termsContent
48174
+ terms: termsContent,
48175
+ initialFocusSelector: ".modal-close-button"
48177
48176
  })))));
48178
48177
  };
48179
48178
 
@@ -48369,7 +48368,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
48369
48368
  version: "v2",
48370
48369
  showCheckbox: false,
48371
48370
  description: "View",
48372
- terms: termsContent
48371
+ terms: termsContent,
48372
+ initialFocusSelector: ".modal-close-button"
48373
48373
  })))));
48374
48374
  };
48375
48375