@thecb/components 10.5.1-beta.1 → 10.5.1-beta.2
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 +16 -8
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +16 -8
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/icons/index.js +1 -1
- package/src/components/molecules/modal/ModalControlV2.js +8 -4
- package/src/components/molecules/modal/__private__/CancelButton.js +2 -1
- package/src/components/molecules/modal/__private__/CloseIconButton.js +2 -2
- package/src/components/molecules/modal/__private__/ContinueButton.js +2 -1
- package/src/components/molecules/modal/__private__/index.d.ts +2 -0
package/dist/index.esm.js
CHANGED
|
@@ -46495,6 +46495,8 @@ var CancelButton = function CancelButton(_ref) {
|
|
|
46495
46495
|
cancelAction = _ref$cancelAction === void 0 ? noop : _ref$cancelAction,
|
|
46496
46496
|
_ref$cancelButtonText = _ref.cancelButtonText,
|
|
46497
46497
|
cancelButtonText = _ref$cancelButtonText === void 0 ? "" : _ref$cancelButtonText,
|
|
46498
|
+
_ref$cancelButtonVari = _ref.cancelButtonVariant,
|
|
46499
|
+
cancelButtonVariant = _ref$cancelButtonVari === void 0 ? "secondary" : _ref$cancelButtonVari,
|
|
46498
46500
|
_ref$hideModal = _ref.hideModal,
|
|
46499
46501
|
hideModal = _ref$hideModal === void 0 ? noop : _ref$hideModal,
|
|
46500
46502
|
_ref$isMobile = _ref.isMobile,
|
|
@@ -46511,7 +46513,7 @@ var CancelButton = function CancelButton(_ref) {
|
|
|
46511
46513
|
role: "button",
|
|
46512
46514
|
text: cancelButtonText,
|
|
46513
46515
|
textExtraStyles: "".concat(fontSize),
|
|
46514
|
-
variant:
|
|
46516
|
+
variant: cancelButtonVariant
|
|
46515
46517
|
});
|
|
46516
46518
|
};
|
|
46517
46519
|
|
|
@@ -46549,6 +46551,8 @@ var ContinueButton = function ContinueButton(_ref) {
|
|
|
46549
46551
|
continueButtonText = _ref$continueButtonTe === void 0 ? "" : _ref$continueButtonTe,
|
|
46550
46552
|
_ref$continueURL = _ref.continueURL,
|
|
46551
46553
|
continueURL = _ref$continueURL === void 0 ? "" : _ref$continueURL,
|
|
46554
|
+
_ref$continueButtonVa = _ref.continueButtonVariant,
|
|
46555
|
+
continueButtonVariant = _ref$continueButtonVa === void 0 ? "primary" : _ref$continueButtonVa,
|
|
46552
46556
|
_ref$isContinueAction = _ref.isContinueActionDisabled,
|
|
46553
46557
|
isContinueActionDisabled = _ref$isContinueAction === void 0 ? false : _ref$isContinueAction,
|
|
46554
46558
|
_ref$isLoading = _ref.isLoading,
|
|
@@ -46574,7 +46578,7 @@ var ContinueButton = function ContinueButton(_ref) {
|
|
|
46574
46578
|
text: continueButtonText,
|
|
46575
46579
|
textExtraStyles: "".concat(fontSize),
|
|
46576
46580
|
url: continueURL,
|
|
46577
|
-
variant: useDangerButton ? "danger" :
|
|
46581
|
+
variant: useDangerButton ? "danger" : continueButtonVariant
|
|
46578
46582
|
});
|
|
46579
46583
|
};
|
|
46580
46584
|
|
|
@@ -62818,13 +62822,13 @@ var CloseIconButton = function CloseIconButton(_ref) {
|
|
|
62818
62822
|
_ref$iconHeight = _ref.iconHeight,
|
|
62819
62823
|
iconHeight = _ref$iconHeight === void 0 ? "24" : _ref$iconHeight,
|
|
62820
62824
|
_ref$ariaLabel = _ref.ariaLabel,
|
|
62821
|
-
ariaLabel = _ref$ariaLabel === void 0 ? "" : _ref$ariaLabel;
|
|
62825
|
+
ariaLabel = _ref$ariaLabel === void 0 ? "Close Modal" : _ref$ariaLabel;
|
|
62822
62826
|
return /*#__PURE__*/React.createElement(ButtonWithAction, {
|
|
62823
62827
|
variant: "smallGhost",
|
|
62824
62828
|
action: hideModal,
|
|
62825
62829
|
contentOverride: true,
|
|
62826
62830
|
extraStyles: buttonExtraStyles,
|
|
62827
|
-
"aria-label": ariaLabel
|
|
62831
|
+
"aria-label": ariaLabel
|
|
62828
62832
|
}, /*#__PURE__*/React.createElement(CloseIcon, {
|
|
62829
62833
|
role: "img",
|
|
62830
62834
|
"aria-hidden": "true",
|
|
@@ -62855,6 +62859,8 @@ var Modal$2 = function Modal(_ref) {
|
|
|
62855
62859
|
cancelAction = _ref$cancelAction === void 0 ? noop : _ref$cancelAction,
|
|
62856
62860
|
_ref$cancelButtonText = _ref.cancelButtonText,
|
|
62857
62861
|
cancelButtonText = _ref$cancelButtonText === void 0 ? "Cancel" : _ref$cancelButtonText,
|
|
62862
|
+
_ref$cancelButtonVari = _ref.cancelButtonVariant,
|
|
62863
|
+
cancelButtonVariant = _ref$cancelButtonVari === void 0 ? "secondary" : _ref$cancelButtonVari,
|
|
62858
62864
|
_ref$children = _ref.children,
|
|
62859
62865
|
children = _ref$children === void 0 ? [] : _ref$children,
|
|
62860
62866
|
_ref$closeButtonText = _ref.closeButtonText,
|
|
@@ -62865,6 +62871,8 @@ var Modal$2 = function Modal(_ref) {
|
|
|
62865
62871
|
continueButtonText = _ref$continueButtonTe === void 0 ? "Continue" : _ref$continueButtonTe,
|
|
62866
62872
|
_ref$continueURL = _ref.continueURL,
|
|
62867
62873
|
continueURL = _ref$continueURL === void 0 ? "" : _ref$continueURL,
|
|
62874
|
+
_ref$continueButtonVa = _ref.continueButtonVariant,
|
|
62875
|
+
continueButtonVariant = _ref$continueButtonVa === void 0 ? "primary" : _ref$continueButtonVa,
|
|
62868
62876
|
_ref$customWidth = _ref.customWidth,
|
|
62869
62877
|
customWidth = _ref$customWidth === void 0 ? "" : _ref$customWidth,
|
|
62870
62878
|
_ref$dataQa = _ref.dataQa,
|
|
@@ -62965,7 +62973,7 @@ var Modal$2 = function Modal(_ref) {
|
|
|
62965
62973
|
padding: "".concat(SPACING.XS, " ").concat(SPACING.MD)
|
|
62966
62974
|
}, /*#__PURE__*/React.createElement(Cluster, {
|
|
62967
62975
|
justify: showCloseIconButton ? "space-between" : "flex-start",
|
|
62968
|
-
align: "center",
|
|
62976
|
+
align: showCloseIconButton && isMobile ? "flex-start" : "center",
|
|
62969
62977
|
nowrap: true
|
|
62970
62978
|
}, /*#__PURE__*/React.createElement(Title$1, {
|
|
62971
62979
|
as: "h2",
|
|
@@ -62973,9 +62981,7 @@ var Modal$2 = function Modal(_ref) {
|
|
|
62973
62981
|
fontSize: isMobile ? FONT_SIZE.MD : FONT_SIZE.LG
|
|
62974
62982
|
}, modalHeaderText), showCloseIconButton && /*#__PURE__*/React.createElement(CloseIconButton, {
|
|
62975
62983
|
hideModal: hideModal,
|
|
62976
|
-
|
|
62977
|
-
iconHeight: isMobile ? "20" : "24",
|
|
62978
|
-
buttonExtraStyles: "\n min-height: auto;\n min-width: auto;\n height: 1.5rem;\n margin: 0;\n &:focus {\n outline-offset: -3px;\n }\n "
|
|
62984
|
+
buttonExtraStyles: "\n min-height: auto;\n min-width: auto;\n height: 1.5rem;\n margin: 0 0 0 0.5rem;\n &:focus {\n outline-offset: -3px;\n }\n "
|
|
62979
62985
|
}))), /*#__PURE__*/React.createElement(Box, {
|
|
62980
62986
|
background: modalBodyBg || ATHENS_GREY,
|
|
62981
62987
|
padding: "0"
|
|
@@ -62994,6 +63000,7 @@ var Modal$2 = function Modal(_ref) {
|
|
|
62994
63000
|
buttonExtraStyles: buttonExtraStyles,
|
|
62995
63001
|
cancelAction: cancelAction,
|
|
62996
63002
|
cancelButtonText: cancelButtonText,
|
|
63003
|
+
cancelButtonVariant: cancelButtonVariant,
|
|
62997
63004
|
hideModal: hideModal,
|
|
62998
63005
|
isMobile: isMobile,
|
|
62999
63006
|
key: "cancel"
|
|
@@ -63002,6 +63009,7 @@ var Modal$2 = function Modal(_ref) {
|
|
|
63002
63009
|
continueAction: continueAction,
|
|
63003
63010
|
continueButtonText: continueButtonText,
|
|
63004
63011
|
continueURL: continueURL,
|
|
63012
|
+
continueButtonVariant: continueButtonVariant,
|
|
63005
63013
|
isContinueActionDisabled: isContinueActionDisabled,
|
|
63006
63014
|
isLoading: isLoading,
|
|
63007
63015
|
isMobile: isMobile,
|