@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.cjs.js
CHANGED
|
@@ -45751,7 +45751,9 @@ var Modal$1 = function Modal(_ref) {
|
|
|
45751
45751
|
buttonExtraStyles = _ref.buttonExtraStyles,
|
|
45752
45752
|
children = _ref.children,
|
|
45753
45753
|
_ref$dataQa = _ref.dataQa,
|
|
45754
|
-
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa
|
|
45754
|
+
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
|
|
45755
|
+
_ref$initialFocus = _ref.initialFocus,
|
|
45756
|
+
initialFocus = _ref$initialFocus === void 0 ? null : _ref$initialFocus;
|
|
45755
45757
|
|
|
45756
45758
|
var _useContext = React.useContext(styled.ThemeContext),
|
|
45757
45759
|
isMobile = _useContext.isMobile;
|
|
@@ -45761,7 +45763,7 @@ var Modal$1 = function Modal(_ref) {
|
|
|
45761
45763
|
ref: modalContainerRef,
|
|
45762
45764
|
"data-qa": dataQa
|
|
45763
45765
|
}, modalOpen && /*#__PURE__*/React__default.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
|
|
45764
|
-
, {
|
|
45766
|
+
, _extends({
|
|
45765
45767
|
focusTrapOptions: {
|
|
45766
45768
|
fallbackFocus: modalContainerRef === null || modalContainerRef === void 0 ? void 0 : modalContainerRef.current
|
|
45767
45769
|
},
|
|
@@ -45779,7 +45781,9 @@ var Modal$1 = function Modal(_ref) {
|
|
|
45779
45781
|
},
|
|
45780
45782
|
underlayClickExits: underlayClickExits,
|
|
45781
45783
|
"aria-modal": true
|
|
45782
|
-
},
|
|
45784
|
+
}, initialFocus ? {
|
|
45785
|
+
initialFocus: initialFocus
|
|
45786
|
+
} : {}), /*#__PURE__*/React__default.createElement(Box, {
|
|
45783
45787
|
padding: "0",
|
|
45784
45788
|
borderRadius: "2px",
|
|
45785
45789
|
boxShadow: "inset 0px -2px 0px 0px rgb(0, 80, 149)"
|
|
@@ -47773,8 +47777,10 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
|
|
|
47773
47777
|
variant = _ref.variant,
|
|
47774
47778
|
_ref$linkVariant = _ref.linkVariant,
|
|
47775
47779
|
linkVariant = _ref$linkVariant === void 0 ? "p" : _ref$linkVariant,
|
|
47776
|
-
themeValues = _ref.themeValues
|
|
47777
|
-
|
|
47780
|
+
themeValues = _ref.themeValues,
|
|
47781
|
+
_ref$initialFocus = _ref.initialFocus,
|
|
47782
|
+
initialFocus = _ref$initialFocus === void 0 ? null : _ref$initialFocus;
|
|
47783
|
+
return /*#__PURE__*/React__default.createElement(Modal$1, _extends({
|
|
47778
47784
|
modalOpen: isOpen,
|
|
47779
47785
|
hideModal: function hideModal() {
|
|
47780
47786
|
return toggleOpen(false);
|
|
@@ -47799,9 +47805,10 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
|
|
|
47799
47805
|
continueAction: function continueAction() {
|
|
47800
47806
|
toggleAccepted(true);
|
|
47801
47807
|
toggleOpen(false);
|
|
47802
|
-
}
|
|
47803
|
-
|
|
47804
|
-
|
|
47808
|
+
}
|
|
47809
|
+
}, initialFocus ? {
|
|
47810
|
+
initialFocus: initialFocus
|
|
47811
|
+
} : {}), /*#__PURE__*/React__default.createElement(Text$1, {
|
|
47805
47812
|
variant: linkVariant,
|
|
47806
47813
|
onClick: function onClick() {
|
|
47807
47814
|
return toggleOpen(true);
|
|
@@ -47814,7 +47821,8 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
|
|
|
47814
47821
|
weight: themeValues.fontWeight,
|
|
47815
47822
|
hoverStyles: themeValues.modalLinkHoverFocus,
|
|
47816
47823
|
extraStyles: "display: inline-block; width: fit-content; cursor: pointer",
|
|
47817
|
-
role: "button"
|
|
47824
|
+
role: "button",
|
|
47825
|
+
className: "modal-trigger"
|
|
47818
47826
|
}, link));
|
|
47819
47827
|
};
|
|
47820
47828
|
|
|
@@ -47849,7 +47857,8 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
|
|
|
47849
47857
|
terms: terms,
|
|
47850
47858
|
isOpen: showTerms,
|
|
47851
47859
|
toggleOpen: toggleShowTerms,
|
|
47852
|
-
linkVariant: linkVariant
|
|
47860
|
+
linkVariant: linkVariant,
|
|
47861
|
+
initialFocus: "[role=\"button\"]:not(.modal-trigger)"
|
|
47853
47862
|
})))));
|
|
47854
47863
|
};
|
|
47855
47864
|
|
|
@@ -47932,7 +47941,8 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
|
|
|
47932
47941
|
isOpen: showTerms,
|
|
47933
47942
|
toggleOpen: toggleTerms,
|
|
47934
47943
|
linkVariant: modalVariant,
|
|
47935
|
-
title: modalTitle
|
|
47944
|
+
title: modalTitle,
|
|
47945
|
+
initialFocus: "[role=\"button\"]:not(.modal-trigger)"
|
|
47936
47946
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
47937
47947
|
"aria-live": "polite",
|
|
47938
47948
|
"aria-atomic": true
|