@thecb/components 10.6.0-beta.0 → 10.6.0-beta.1

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
@@ -4919,7 +4919,9 @@ var FONT_SIZE = {
4919
4919
  // 14px
4920
4920
  MD: "1.000rem",
4921
4921
  // 16px
4922
- LG: "1.125rem" // 18px
4922
+ LG: "1.125rem",
4923
+ // 18px
4924
+ XL: "1.250rem" //20px
4923
4925
  };
4924
4926
  var FONT_WEIGHT_REGULAR = "400";
4925
4927
  var FONT_WEIGHT_SEMIBOLD = "600";
@@ -39262,11 +39264,15 @@ var LoadingLine = function LoadingLine(_ref) {
39262
39264
  var backgroundColor$6 = {
39263
39265
  primary: WHITE
39264
39266
  };
39267
+ var color$b = {
39268
+ primary: ROYAL_BLUE
39269
+ };
39265
39270
  var boxShadow$1 = {
39266
39271
  primary: "box-shadow: 0px 1px 2px 0px rgba(".concat(CHARADE_GREY, ", 0.1);\n box-shadow: 0px 2px 6px 0px rgba(").concat(CHARADE_GREY, ", 0.2);\n box-shadow: 0px -1px 0px 0px rgba(").concat(CHARADE_GREY, ", 0.1) inset;")
39267
39272
  };
39268
39273
  var fallbackValues$C = {
39269
39274
  backgroundColor: backgroundColor$6,
39275
+ color: color$b,
39270
39276
  boxShadow: boxShadow$1
39271
39277
  };
39272
39278
 
@@ -39400,17 +39406,15 @@ var Module = function Module(_ref) {
39400
39406
  var Module$1 = /*#__PURE__*/React.memo(themeComponent(Module, "Module", fallbackValues$D, "default"));
39401
39407
 
39402
39408
  var WalletName = function WalletName(_ref) {
39403
- var _ref$mainText = _ref.mainText,
39404
- mainText = _ref$mainText === void 0 ? "" : _ref$mainText,
39405
- _ref$action = _ref.action,
39406
- action = _ref$action === void 0 ? noop : _ref$action,
39407
- _ref$text = _ref.text,
39408
- text = _ref$text === void 0 ? "Not you?" : _ref$text,
39409
- _ref$actionText = _ref.actionText,
39410
- actionText = _ref$actionText === void 0 ? "Check out as a guest" : _ref$actionText,
39411
- themeValues = _ref.themeValues;
39412
- var themeContext = React.useContext(styled.ThemeContext);
39413
- var isMobile = themeContext.isMobile;
39409
+ var mainText = _ref.mainText,
39410
+ action = _ref.action,
39411
+ text = _ref.text,
39412
+ actionText = _ref.actionText,
39413
+ themeValues = _ref.themeValues,
39414
+ _ref$disableAction = _ref.disableAction,
39415
+ disableAction = _ref$disableAction === void 0 ? false : _ref$disableAction;
39416
+ var _useContext = React.useContext(styled.ThemeContext),
39417
+ isMobile = _useContext.isMobile;
39414
39418
  return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(Module$1, {
39415
39419
  spacingBottom: isMobile ? "0" : "1.5rem"
39416
39420
  }, /*#__PURE__*/React__default.createElement(Box, {
@@ -39418,28 +39422,30 @@ var WalletName = function WalletName(_ref) {
39418
39422
  boxShadow: themeValues.boxShadow,
39419
39423
  spacingBottom: "0",
39420
39424
  margin: "0 0 0 0",
39421
- extraStyles: isMobile ? "display: flex; flex-direction: column; flex-wrap: wrap; span {text - align: right;}" : "display: flex; justify-content: space-between; align-items: center;"
39425
+ extraStyles: isMobile ? "display: flex; flex-direction: column; flex-wrap: wrap; span {text-align: right;}" : "display: flex; justify-content: space-between; align-items: center;"
39422
39426
  }, /*#__PURE__*/React__default.createElement(Box, {
39423
39427
  padding: "0 0 0"
39424
39428
  }, /*#__PURE__*/React__default.createElement(Text$1, null, mainText)), !isMobile && /*#__PURE__*/React__default.createElement(Box, {
39425
39429
  padding: "0"
39426
- }, /*#__PURE__*/React__default.createElement(Text$1, {
39430
+ }, text && /*#__PURE__*/React__default.createElement(Text$1, {
39427
39431
  variant: "pXS"
39428
- }, text), "\xA0", /*#__PURE__*/React__default.createElement(ButtonWithAction, {
39432
+ }, text), text && actionText && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, "\xA0"), action && actionText && /*#__PURE__*/React__default.createElement(ButtonWithAction, {
39433
+ disabled: disableAction,
39429
39434
  text: actionText,
39430
39435
  action: action,
39431
39436
  variant: "smallGhost",
39432
- extraStyles: " margin-left: 0; span {font-size: 0.75rem;} "
39437
+ extraStyles: " margin-left: 0; min-width: 0; span {font-size: 0.75rem;} "
39433
39438
  })))), isMobile && /*#__PURE__*/React__default.createElement(Box, {
39434
39439
  padding: "0 0 24px",
39435
39440
  extraStyles: "display: flex; align-items: center; justify-content: flex-end;"
39436
- }, /*#__PURE__*/React__default.createElement(Text$1, {
39441
+ }, text && /*#__PURE__*/React__default.createElement(Text$1, {
39437
39442
  extraStyles: "font-size: 12px"
39438
- }, text), /*#__PURE__*/React__default.createElement(ButtonWithAction, {
39443
+ }, text), action && actionText && /*#__PURE__*/React__default.createElement(ButtonWithAction, {
39439
39444
  text: actionText,
39440
39445
  action: action,
39441
39446
  variant: "smallGhost",
39442
- extraStyles: "span {font-size: 12px;}"
39447
+ extraStyles: "span {font-size: 12px;}",
39448
+ disabled: disableAction
39443
39449
  })));
39444
39450
  };
39445
39451
  var WalletName$1 = themeComponent(WalletName, "WalletName", fallbackValues$C, "primary");
@@ -42877,7 +42883,7 @@ var backgroundColor$b = {
42877
42883
  var borderColor$5 = {
42878
42884
  primary: MOON_RAKER
42879
42885
  };
42880
- var color$b = {
42886
+ var color$c = {
42881
42887
  primary: ROYAL_BLUE_VIVID
42882
42888
  };
42883
42889
  var fallbackValues$K = {
@@ -42887,7 +42893,7 @@ var fallbackValues$K = {
42887
42893
  activeBackgroundColor: activeBackgroundColor$1,
42888
42894
  backgroundColor: backgroundColor$b,
42889
42895
  borderColor: borderColor$5,
42890
- color: color$b
42896
+ color: color$c
42891
42897
  };
42892
42898
 
42893
42899
  var Container = styled__default(Box).withConfig({
@@ -46682,6 +46688,8 @@ var CancelButton = function CancelButton(_ref) {
46682
46688
  cancelAction = _ref$cancelAction === void 0 ? noop : _ref$cancelAction,
46683
46689
  _ref$cancelButtonText = _ref.cancelButtonText,
46684
46690
  cancelButtonText = _ref$cancelButtonText === void 0 ? "" : _ref$cancelButtonText,
46691
+ _ref$cancelButtonVari = _ref.cancelButtonVariant,
46692
+ cancelButtonVariant = _ref$cancelButtonVari === void 0 ? "secondary" : _ref$cancelButtonVari,
46685
46693
  _ref$hideModal = _ref.hideModal,
46686
46694
  hideModal = _ref$hideModal === void 0 ? noop : _ref$hideModal,
46687
46695
  _ref$isMobile = _ref.isMobile,
@@ -46698,7 +46706,7 @@ var CancelButton = function CancelButton(_ref) {
46698
46706
  role: "button",
46699
46707
  text: cancelButtonText,
46700
46708
  textExtraStyles: "".concat(fontSize),
46701
- variant: "secondary"
46709
+ variant: cancelButtonVariant
46702
46710
  });
46703
46711
  };
46704
46712
 
@@ -46727,6 +46735,30 @@ var CloseButton = function CloseButton(_ref) {
46727
46735
  });
46728
46736
  };
46729
46737
 
46738
+ var CloseIconButton = function CloseIconButton(_ref) {
46739
+ var _ref$buttonExtraStyle = _ref.buttonExtraStyles,
46740
+ _ref$hideModal = _ref.hideModal,
46741
+ hideModal = _ref$hideModal === void 0 ? noop : _ref$hideModal,
46742
+ _ref$iconWidth = _ref.iconWidth,
46743
+ iconWidth = _ref$iconWidth === void 0 ? "24" : _ref$iconWidth,
46744
+ _ref$iconHeight = _ref.iconHeight,
46745
+ iconHeight = _ref$iconHeight === void 0 ? "24" : _ref$iconHeight,
46746
+ _ref$ariaLabel = _ref.ariaLabel,
46747
+ ariaLabel = _ref$ariaLabel === void 0 ? "Close Modal" : _ref$ariaLabel;
46748
+ return /*#__PURE__*/React__default.createElement(ButtonWithAction, {
46749
+ action: hideModal,
46750
+ "aria-label": ariaLabel,
46751
+ contentOverride: true,
46752
+ extraStyles: "\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 ",
46753
+ variant: "smallGhost"
46754
+ }, /*#__PURE__*/React__default.createElement(CloseIcon, {
46755
+ role: "img",
46756
+ "aria-hidden": "true",
46757
+ iconWidth: iconWidth,
46758
+ iconHeight: iconHeight
46759
+ }));
46760
+ };
46761
+
46730
46762
  var ContinueButton = function ContinueButton(_ref) {
46731
46763
  var _ref$buttonExtraStyle = _ref.buttonExtraStyles,
46732
46764
  buttonExtraStyles = _ref$buttonExtraStyle === void 0 ? "" : _ref$buttonExtraStyle,
@@ -46736,6 +46768,8 @@ var ContinueButton = function ContinueButton(_ref) {
46736
46768
  continueButtonText = _ref$continueButtonTe === void 0 ? "" : _ref$continueButtonTe,
46737
46769
  _ref$continueURL = _ref.continueURL,
46738
46770
  continueURL = _ref$continueURL === void 0 ? "" : _ref$continueURL,
46771
+ _ref$continueButtonVa = _ref.continueButtonVariant,
46772
+ continueButtonVariant = _ref$continueButtonVa === void 0 ? "primary" : _ref$continueButtonVa,
46739
46773
  _ref$isContinueAction = _ref.isContinueActionDisabled,
46740
46774
  isContinueActionDisabled = _ref$isContinueAction === void 0 ? false : _ref$isContinueAction,
46741
46775
  _ref$isLoading = _ref.isLoading,
@@ -46761,7 +46795,7 @@ var ContinueButton = function ContinueButton(_ref) {
46761
46795
  text: continueButtonText,
46762
46796
  textExtraStyles: "".concat(fontSize),
46763
46797
  url: continueURL,
46764
- variant: useDangerButton ? "danger" : "primary"
46798
+ variant: useDangerButton ? "danger" : continueButtonVariant
46765
46799
  });
46766
46800
  };
46767
46801
 
@@ -46787,6 +46821,8 @@ var Modal$2 = function Modal(_ref) {
46787
46821
  cancelAction = _ref$cancelAction === void 0 ? noop : _ref$cancelAction,
46788
46822
  _ref$cancelButtonText = _ref.cancelButtonText,
46789
46823
  cancelButtonText = _ref$cancelButtonText === void 0 ? "Cancel" : _ref$cancelButtonText,
46824
+ _ref$cancelButtonVari = _ref.cancelButtonVariant,
46825
+ cancelButtonVariant = _ref$cancelButtonVari === void 0 ? "secondary" : _ref$cancelButtonVari,
46790
46826
  _ref$children = _ref.children,
46791
46827
  children = _ref$children === void 0 ? [] : _ref$children,
46792
46828
  _ref$closeButtonText = _ref.closeButtonText,
@@ -46795,6 +46831,8 @@ var Modal$2 = function Modal(_ref) {
46795
46831
  continueAction = _ref$continueAction === void 0 ? noop : _ref$continueAction,
46796
46832
  _ref$continueButtonTe = _ref.continueButtonText,
46797
46833
  continueButtonText = _ref$continueButtonTe === void 0 ? "Continue" : _ref$continueButtonTe,
46834
+ _ref$continueButtonVa = _ref.continueButtonVariant,
46835
+ continueButtonVariant = _ref$continueButtonVa === void 0 ? "primary" : _ref$continueButtonVa,
46798
46836
  _ref$continueURL = _ref.continueURL,
46799
46837
  continueURL = _ref$continueURL === void 0 ? "" : _ref$continueURL,
46800
46838
  _ref$customWidth = _ref.customWidth,
@@ -46831,6 +46869,8 @@ var Modal$2 = function Modal(_ref) {
46831
46869
  onlyCloseButton = _ref$onlyCloseButton === void 0 ? false : _ref$onlyCloseButton,
46832
46870
  _ref$onlyContinueButt = _ref.onlyContinueButton,
46833
46871
  onlyContinueButton = _ref$onlyContinueButt === void 0 ? false : _ref$onlyContinueButt,
46872
+ _ref$showCloseIconBut = _ref.showCloseIconButton,
46873
+ showCloseIconButton = _ref$showCloseIconBut === void 0 ? false : _ref$showCloseIconBut,
46834
46874
  _ref$underlayClickExi = _ref.underlayClickExits,
46835
46875
  underlayClickExits = _ref$underlayClickExi === void 0 ? true : _ref$underlayClickExi,
46836
46876
  _ref$useDangerButton = _ref.useDangerButton,
@@ -46879,7 +46919,7 @@ var Modal$2 = function Modal(_ref) {
46879
46919
  borderRadius: BORDER_RADIUS.MD,
46880
46920
  margin: SPACING.XS,
46881
46921
  overflow: "auto",
46882
- width: isMobile ? "" : customWidth || "615px"
46922
+ width: isMobile ? "" : customWidth || "576px"
46883
46923
  },
46884
46924
  underlayClickExits: underlayClickExits,
46885
46925
  "aria-modal": true,
@@ -46894,13 +46934,16 @@ var Modal$2 = function Modal(_ref) {
46894
46934
  borderWidthOverride: "0 0 ".concat(BORDER_THIN, " 0"),
46895
46935
  padding: "".concat(SPACING.XS, " ").concat(SPACING.MD)
46896
46936
  }, /*#__PURE__*/React__default.createElement(Cluster, {
46897
- justify: "flex-start",
46898
- align: "center"
46937
+ justify: showCloseIconButton ? "space-between" : "flex-start",
46938
+ align: showCloseIconButton && isMobile ? "flex-start" : "center",
46939
+ nowrap: true
46899
46940
  }, /*#__PURE__*/React__default.createElement(Title$1, {
46900
46941
  as: "h2",
46901
46942
  weight: FONT_WEIGHT_SEMIBOLD,
46902
46943
  fontSize: isMobile ? FONT_SIZE.MD : FONT_SIZE.LG
46903
- }, modalHeaderText))), /*#__PURE__*/React__default.createElement(Box, {
46944
+ }, modalHeaderText), showCloseIconButton && /*#__PURE__*/React__default.createElement(CloseIconButton, {
46945
+ hideModal: hideModal
46946
+ }))), /*#__PURE__*/React__default.createElement(Box, {
46904
46947
  background: modalBodyBg || ATHENS_GREY,
46905
46948
  padding: "0"
46906
46949
  }, /*#__PURE__*/React__default.createElement(Box, {
@@ -46918,6 +46961,7 @@ var Modal$2 = function Modal(_ref) {
46918
46961
  buttonExtraStyles: buttonExtraStyles,
46919
46962
  cancelAction: cancelAction,
46920
46963
  cancelButtonText: cancelButtonText,
46964
+ cancelButtonVariant: cancelButtonVariant,
46921
46965
  hideModal: hideModal,
46922
46966
  isMobile: isMobile,
46923
46967
  key: "cancel"
@@ -46926,6 +46970,7 @@ var Modal$2 = function Modal(_ref) {
46926
46970
  continueAction: continueAction,
46927
46971
  continueButtonText: continueButtonText,
46928
46972
  continueURL: continueURL,
46973
+ continueButtonVariant: continueButtonVariant,
46929
46974
  isContinueActionDisabled: isContinueActionDisabled,
46930
46975
  isLoading: isLoading,
46931
46976
  isMobile: isMobile,
@@ -47108,14 +47153,14 @@ var TitleModule = function TitleModule(_ref) {
47108
47153
  }, subtitle)));
47109
47154
  };
47110
47155
 
47111
- var color$c = "#15749D";
47156
+ var color$d = "#15749D";
47112
47157
  var hoverColor$5 = "#116285";
47113
47158
  var activeColor$8 = "#0E506D";
47114
47159
  var linkColor$4 = "#3176AA";
47115
47160
  var fontWeight$6 = FONT_WEIGHT_REGULAR;
47116
47161
  var modalLinkHoverFocus = "outline: none;\n cursor: pointer;\n text-decoration: underline;\n text-decoration-color: #317D4F;";
47117
47162
  var fallbackValues$M = {
47118
- color: color$c,
47163
+ color: color$d,
47119
47164
  hoverColor: hoverColor$5,
47120
47165
  activeColor: activeColor$8,
47121
47166
  linkColor: linkColor$4,