@thecb/components 9.2.7-beta.2 → 9.2.7-beta.4
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 +21 -11
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +21 -11
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/modal/Modal.js +3 -1
- package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV1.js +1 -0
- package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV2.js +1 -0
- package/src/components/molecules/terms-and-conditions-modal/TermsAndConditionsModal.js +4 -2
package/dist/index.esm.js
CHANGED
|
@@ -45743,7 +45743,9 @@ var Modal$1 = function Modal(_ref) {
|
|
|
45743
45743
|
buttonExtraStyles = _ref.buttonExtraStyles,
|
|
45744
45744
|
children = _ref.children,
|
|
45745
45745
|
_ref$dataQa = _ref.dataQa,
|
|
45746
|
-
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa
|
|
45746
|
+
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
|
|
45747
|
+
_ref$initialFocus = _ref.initialFocus,
|
|
45748
|
+
initialFocus = _ref$initialFocus === void 0 ? null : _ref$initialFocus;
|
|
45747
45749
|
|
|
45748
45750
|
var _useContext = useContext(ThemeContext),
|
|
45749
45751
|
isMobile = _useContext.isMobile;
|
|
@@ -45753,7 +45755,7 @@ var Modal$1 = function Modal(_ref) {
|
|
|
45753
45755
|
ref: modalContainerRef,
|
|
45754
45756
|
"data-qa": dataQa
|
|
45755
45757
|
}, modalOpen && /*#__PURE__*/React.createElement(reactAriaModal // fallback to resolve Jest unit test errors when tabbable doesn't exist in jsdom https://github.com/focus-trap/focus-trap-react/issues/91
|
|
45756
|
-
, {
|
|
45758
|
+
, _extends({
|
|
45757
45759
|
focusTrapOptions: {
|
|
45758
45760
|
fallbackFocus: modalContainerRef === null || modalContainerRef === void 0 ? void 0 : modalContainerRef.current
|
|
45759
45761
|
},
|
|
@@ -45771,7 +45773,9 @@ var Modal$1 = function Modal(_ref) {
|
|
|
45771
45773
|
},
|
|
45772
45774
|
underlayClickExits: underlayClickExits,
|
|
45773
45775
|
"aria-modal": true
|
|
45774
|
-
},
|
|
45776
|
+
}, initialFocus ? {
|
|
45777
|
+
initialFocus: initialFocus
|
|
45778
|
+
} : {}), /*#__PURE__*/React.createElement(Box, {
|
|
45775
45779
|
padding: "0",
|
|
45776
45780
|
borderRadius: "2px",
|
|
45777
45781
|
boxShadow: "inset 0px -2px 0px 0px rgb(0, 80, 149)"
|
|
@@ -47765,8 +47769,10 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
|
|
|
47765
47769
|
variant = _ref.variant,
|
|
47766
47770
|
_ref$linkVariant = _ref.linkVariant,
|
|
47767
47771
|
linkVariant = _ref$linkVariant === void 0 ? "p" : _ref$linkVariant,
|
|
47768
|
-
themeValues = _ref.themeValues
|
|
47769
|
-
|
|
47772
|
+
themeValues = _ref.themeValues,
|
|
47773
|
+
_ref$initialFocus = _ref.initialFocus,
|
|
47774
|
+
initialFocus = _ref$initialFocus === void 0 ? null : _ref$initialFocus;
|
|
47775
|
+
return /*#__PURE__*/React.createElement(Modal$1, _extends({
|
|
47770
47776
|
modalOpen: isOpen,
|
|
47771
47777
|
hideModal: function hideModal() {
|
|
47772
47778
|
return toggleOpen(false);
|
|
@@ -47791,9 +47797,10 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
|
|
|
47791
47797
|
continueAction: function continueAction() {
|
|
47792
47798
|
toggleAccepted(true);
|
|
47793
47799
|
toggleOpen(false);
|
|
47794
|
-
}
|
|
47795
|
-
|
|
47796
|
-
|
|
47800
|
+
}
|
|
47801
|
+
}, initialFocus ? {
|
|
47802
|
+
initialFocus: initialFocus
|
|
47803
|
+
} : {}), /*#__PURE__*/React.createElement(Text$1, {
|
|
47797
47804
|
variant: linkVariant,
|
|
47798
47805
|
onClick: function onClick() {
|
|
47799
47806
|
return toggleOpen(true);
|
|
@@ -47806,7 +47813,8 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
|
|
|
47806
47813
|
weight: themeValues.fontWeight,
|
|
47807
47814
|
hoverStyles: themeValues.modalLinkHoverFocus,
|
|
47808
47815
|
extraStyles: "display: inline-block; width: fit-content; cursor: pointer",
|
|
47809
|
-
role: "button"
|
|
47816
|
+
role: "button",
|
|
47817
|
+
className: "modal-trigger"
|
|
47810
47818
|
}, link));
|
|
47811
47819
|
};
|
|
47812
47820
|
|
|
@@ -47841,7 +47849,8 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
|
|
|
47841
47849
|
terms: terms,
|
|
47842
47850
|
isOpen: showTerms,
|
|
47843
47851
|
toggleOpen: toggleShowTerms,
|
|
47844
|
-
linkVariant: linkVariant
|
|
47852
|
+
linkVariant: linkVariant,
|
|
47853
|
+
initialFocus: "[role=\"button\"]:not(.modal-trigger)"
|
|
47845
47854
|
})))));
|
|
47846
47855
|
};
|
|
47847
47856
|
|
|
@@ -47924,7 +47933,8 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
|
|
|
47924
47933
|
isOpen: showTerms,
|
|
47925
47934
|
toggleOpen: toggleTerms,
|
|
47926
47935
|
linkVariant: modalVariant,
|
|
47927
|
-
title: modalTitle
|
|
47936
|
+
title: modalTitle,
|
|
47937
|
+
initialFocus: "[role=\"button\"]:not(.modal-trigger)"
|
|
47928
47938
|
})), /*#__PURE__*/React.createElement("div", {
|
|
47929
47939
|
"aria-live": "polite",
|
|
47930
47940
|
"aria-atomic": true
|