@thecb/components 10.5.1-beta.0 → 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 CHANGED
@@ -46503,6 +46503,8 @@ var CancelButton = function CancelButton(_ref) {
46503
46503
  cancelAction = _ref$cancelAction === void 0 ? noop : _ref$cancelAction,
46504
46504
  _ref$cancelButtonText = _ref.cancelButtonText,
46505
46505
  cancelButtonText = _ref$cancelButtonText === void 0 ? "" : _ref$cancelButtonText,
46506
+ _ref$cancelButtonVari = _ref.cancelButtonVariant,
46507
+ cancelButtonVariant = _ref$cancelButtonVari === void 0 ? "secondary" : _ref$cancelButtonVari,
46506
46508
  _ref$hideModal = _ref.hideModal,
46507
46509
  hideModal = _ref$hideModal === void 0 ? noop : _ref$hideModal,
46508
46510
  _ref$isMobile = _ref.isMobile,
@@ -46519,7 +46521,7 @@ var CancelButton = function CancelButton(_ref) {
46519
46521
  role: "button",
46520
46522
  text: cancelButtonText,
46521
46523
  textExtraStyles: "".concat(fontSize),
46522
- variant: "secondary"
46524
+ variant: cancelButtonVariant
46523
46525
  });
46524
46526
  };
46525
46527
 
@@ -46557,6 +46559,8 @@ var ContinueButton = function ContinueButton(_ref) {
46557
46559
  continueButtonText = _ref$continueButtonTe === void 0 ? "" : _ref$continueButtonTe,
46558
46560
  _ref$continueURL = _ref.continueURL,
46559
46561
  continueURL = _ref$continueURL === void 0 ? "" : _ref$continueURL,
46562
+ _ref$continueButtonVa = _ref.continueButtonVariant,
46563
+ continueButtonVariant = _ref$continueButtonVa === void 0 ? "primary" : _ref$continueButtonVa,
46560
46564
  _ref$isContinueAction = _ref.isContinueActionDisabled,
46561
46565
  isContinueActionDisabled = _ref$isContinueAction === void 0 ? false : _ref$isContinueAction,
46562
46566
  _ref$isLoading = _ref.isLoading,
@@ -46582,7 +46586,7 @@ var ContinueButton = function ContinueButton(_ref) {
46582
46586
  text: continueButtonText,
46583
46587
  textExtraStyles: "".concat(fontSize),
46584
46588
  url: continueURL,
46585
- variant: useDangerButton ? "danger" : "primary"
46589
+ variant: useDangerButton ? "danger" : continueButtonVariant
46586
46590
  });
46587
46591
  };
46588
46592
 
@@ -62826,13 +62830,13 @@ var CloseIconButton = function CloseIconButton(_ref) {
62826
62830
  _ref$iconHeight = _ref.iconHeight,
62827
62831
  iconHeight = _ref$iconHeight === void 0 ? "24" : _ref$iconHeight,
62828
62832
  _ref$ariaLabel = _ref.ariaLabel,
62829
- ariaLabel = _ref$ariaLabel === void 0 ? "" : _ref$ariaLabel;
62833
+ ariaLabel = _ref$ariaLabel === void 0 ? "Close Modal" : _ref$ariaLabel;
62830
62834
  return /*#__PURE__*/React__default.createElement(ButtonWithAction, {
62831
62835
  variant: "smallGhost",
62832
62836
  action: hideModal,
62833
62837
  contentOverride: true,
62834
62838
  extraStyles: buttonExtraStyles,
62835
- "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : "Close Modal"
62839
+ "aria-label": ariaLabel
62836
62840
  }, /*#__PURE__*/React__default.createElement(CloseIcon, {
62837
62841
  role: "img",
62838
62842
  "aria-hidden": "true",
@@ -62863,6 +62867,8 @@ var Modal$2 = function Modal(_ref) {
62863
62867
  cancelAction = _ref$cancelAction === void 0 ? noop : _ref$cancelAction,
62864
62868
  _ref$cancelButtonText = _ref.cancelButtonText,
62865
62869
  cancelButtonText = _ref$cancelButtonText === void 0 ? "Cancel" : _ref$cancelButtonText,
62870
+ _ref$cancelButtonVari = _ref.cancelButtonVariant,
62871
+ cancelButtonVariant = _ref$cancelButtonVari === void 0 ? "secondary" : _ref$cancelButtonVari,
62866
62872
  _ref$children = _ref.children,
62867
62873
  children = _ref$children === void 0 ? [] : _ref$children,
62868
62874
  _ref$closeButtonText = _ref.closeButtonText,
@@ -62873,6 +62879,8 @@ var Modal$2 = function Modal(_ref) {
62873
62879
  continueButtonText = _ref$continueButtonTe === void 0 ? "Continue" : _ref$continueButtonTe,
62874
62880
  _ref$continueURL = _ref.continueURL,
62875
62881
  continueURL = _ref$continueURL === void 0 ? "" : _ref$continueURL,
62882
+ _ref$continueButtonVa = _ref.continueButtonVariant,
62883
+ continueButtonVariant = _ref$continueButtonVa === void 0 ? "primary" : _ref$continueButtonVa,
62876
62884
  _ref$customWidth = _ref.customWidth,
62877
62885
  customWidth = _ref$customWidth === void 0 ? "" : _ref$customWidth,
62878
62886
  _ref$dataQa = _ref.dataQa,
@@ -62957,7 +62965,7 @@ var Modal$2 = function Modal(_ref) {
62957
62965
  borderRadius: BORDER_RADIUS.MD,
62958
62966
  margin: SPACING.XS,
62959
62967
  overflow: "auto",
62960
- width: isMobile ? "" : customWidth || "615px"
62968
+ width: isMobile ? "" : customWidth || "576px"
62961
62969
  },
62962
62970
  underlayClickExits: underlayClickExits,
62963
62971
  "aria-modal": true,
@@ -62973,16 +62981,15 @@ var Modal$2 = function Modal(_ref) {
62973
62981
  padding: "".concat(SPACING.XS, " ").concat(SPACING.MD)
62974
62982
  }, /*#__PURE__*/React__default.createElement(Cluster, {
62975
62983
  justify: showCloseIconButton ? "space-between" : "flex-start",
62976
- align: "center"
62984
+ align: showCloseIconButton && isMobile ? "flex-start" : "center",
62985
+ nowrap: true
62977
62986
  }, /*#__PURE__*/React__default.createElement(Title$1, {
62978
62987
  as: "h2",
62979
62988
  weight: FONT_WEIGHT_SEMIBOLD,
62980
62989
  fontSize: isMobile ? FONT_SIZE.MD : FONT_SIZE.LG
62981
62990
  }, modalHeaderText), showCloseIconButton && /*#__PURE__*/React__default.createElement(CloseIconButton, {
62982
62991
  hideModal: hideModal,
62983
- iconWidth: isMobile ? "20" : "24",
62984
- iconHeight: isMobile ? "20" : "24",
62985
- buttonExtraStyles: "\n min-height: auto;\n min-width: auto;\n height: 1.5rem;\n margin: 0;\n &:focus {\n outline-offset: -3px;\n }\n "
62992
+ 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 "
62986
62993
  }))), /*#__PURE__*/React__default.createElement(Box, {
62987
62994
  background: modalBodyBg || ATHENS_GREY,
62988
62995
  padding: "0"
@@ -63001,6 +63008,7 @@ var Modal$2 = function Modal(_ref) {
63001
63008
  buttonExtraStyles: buttonExtraStyles,
63002
63009
  cancelAction: cancelAction,
63003
63010
  cancelButtonText: cancelButtonText,
63011
+ cancelButtonVariant: cancelButtonVariant,
63004
63012
  hideModal: hideModal,
63005
63013
  isMobile: isMobile,
63006
63014
  key: "cancel"
@@ -63009,6 +63017,7 @@ var Modal$2 = function Modal(_ref) {
63009
63017
  continueAction: continueAction,
63010
63018
  continueButtonText: continueButtonText,
63011
63019
  continueURL: continueURL,
63020
+ continueButtonVariant: continueButtonVariant,
63012
63021
  isContinueActionDisabled: isContinueActionDisabled,
63013
63022
  isLoading: isLoading,
63014
63023
  isMobile: isMobile,