@thecb/components 10.6.0-beta.2 → 10.6.0-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.esm.js CHANGED
@@ -27495,7 +27495,15 @@ var Spinner$1 = function Spinner(_ref6) {
27495
27495
  size = _ref6$size === void 0 ? "24" : _ref6$size,
27496
27496
  _ref6$centerSpinner = _ref6.centerSpinner,
27497
27497
  centerSpinner = _ref6$centerSpinner === void 0 ? false : _ref6$centerSpinner,
27498
- themeValues = _ref6.themeValues;
27498
+ themeValues = _ref6.themeValues,
27499
+ _ref6$cx = _ref6.cx,
27500
+ cx = _ref6$cx === void 0 ? "50" : _ref6$cx,
27501
+ _ref6$cy = _ref6.cy,
27502
+ cy = _ref6$cy === void 0 ? "50" : _ref6$cy,
27503
+ _ref6$radius = _ref6.radius,
27504
+ radius = _ref6$radius === void 0 ? "25" : _ref6$radius,
27505
+ _ref6$strokeWidth = _ref6.strokeWidth,
27506
+ strokeWidth = _ref6$strokeWidth === void 0 ? "6" : _ref6$strokeWidth;
27499
27507
  return /*#__PURE__*/React.createElement(SpinnerContainer$2, {
27500
27508
  centerSpinner: centerSpinner,
27501
27509
  size: size
@@ -27505,11 +27513,11 @@ var Spinner$1 = function Spinner(_ref6) {
27505
27513
  centerSpinner: centerSpinner
27506
27514
  }, /*#__PURE__*/React.createElement("circle", {
27507
27515
  className: "path",
27508
- cx: "50",
27509
- cy: "50",
27510
- r: "25",
27516
+ cx: cx,
27517
+ cy: cy,
27518
+ r: radius,
27511
27519
  fill: "none",
27512
- strokeWidth: "6"
27520
+ strokeWidth: strokeWidth
27513
27521
  })));
27514
27522
  };
27515
27523
  var Spinner$2 = themeComponent(Spinner$1, "Spinner", fallbackValues$r);
@@ -39257,7 +39265,7 @@ var backgroundColor$6 = {
39257
39265
  primary: WHITE
39258
39266
  };
39259
39267
  var color$b = {
39260
- primary: ROYAL_BLUE
39268
+ primary: ROYAL_BLUE_VIVID
39261
39269
  };
39262
39270
  var boxShadow$1 = {
39263
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;")
@@ -39406,35 +39414,49 @@ var WalletName = function WalletName(_ref) {
39406
39414
  _ref$disableAction = _ref.disableAction,
39407
39415
  disableAction = _ref$disableAction === void 0 ? false : _ref$disableAction,
39408
39416
  _ref$buttonExtraStyle = _ref.buttonExtraStyles,
39409
- buttonExtraStyles = _ref$buttonExtraStyle === void 0 ? "" : _ref$buttonExtraStyle;
39417
+ buttonExtraStyles = _ref$buttonExtraStyle === void 0 ? "" : _ref$buttonExtraStyle,
39418
+ _ref$isLoading = _ref.isLoading,
39419
+ isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading;
39410
39420
  var _useContext = useContext(ThemeContext),
39411
39421
  isMobile = _useContext.isMobile;
39412
39422
  return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(Module$1, {
39413
39423
  spacingBottom: isMobile ? "0" : "1.5rem"
39424
+ }, /*#__PURE__*/React.createElement(Cluster, {
39425
+ align: "center",
39426
+ justify: !!text || !!actionText ? "space-between" : "flex-start",
39427
+ extraStyles: "\n box-shadow: ".concat(themeValues.boxShadow, ";\n padding: 1.5rem;\n ").concat(isMobile ? "span {text-align: right;}" : "", "\n ")
39414
39428
  }, /*#__PURE__*/React.createElement(Box, {
39415
- padding: "24px",
39416
- boxShadow: themeValues.boxShadow,
39417
- spacingBottom: "0",
39418
- margin: "0 0 0 0",
39419
- extraStyles: isMobile ? "display: flex; flex-direction: column; flex-wrap: wrap; span {text-align: right;}" : "display: flex; justify-content: space-between; align-items: center;"
39420
- }, /*#__PURE__*/React.createElement(Box, {
39421
- padding: "0 0 0"
39422
- }, /*#__PURE__*/React.createElement(Text$1, null, mainText)), !isMobile && /*#__PURE__*/React.createElement(Box, {
39429
+ padding: "0",
39430
+ extraStyles: ""
39431
+ }, isLoading ? /*#__PURE__*/React.createElement(Center, {
39432
+ as: "span",
39433
+ style: {
39434
+ padding: "24px 24px 0"
39435
+ },
39436
+ intrinsic: true
39437
+ }, /*#__PURE__*/React.createElement(Spinner$2, {
39438
+ strokeWidth: "2",
39439
+ size: "24",
39440
+ radius: "10",
39441
+ cx: "12",
39442
+ cy: "12"
39443
+ })) : /*#__PURE__*/React.createElement(Text$1, null, mainText)), !isMobile && /*#__PURE__*/React.createElement(Box, {
39423
39444
  padding: "0"
39424
39445
  }, text && /*#__PURE__*/React.createElement(Text$1, {
39425
39446
  variant: "pXS"
39426
- }, text), text && actionText && /*#__PURE__*/React.createElement(React.Fragment, null, "\xA0"), action && actionText && /*#__PURE__*/React.createElement(ButtonWithAction, {
39447
+ }, text), (text || actionText) && /*#__PURE__*/React.createElement(React.Fragment, null, "\xA0"), action && actionText && /*#__PURE__*/React.createElement(ButtonWithAction, {
39427
39448
  disabled: disableAction,
39428
39449
  text: actionText,
39429
39450
  action: action,
39430
39451
  variant: "smallGhost",
39431
39452
  extraStyles: "\n margin: 0;\n min-width: 0;\n span {font-size: 0.75rem;}\n ".concat(buttonExtraStyles, "\n ")
39432
- })))), isMobile && /*#__PURE__*/React.createElement(Box, {
39433
- padding: "0 0 24px",
39434
- extraStyles: "display: flex; align-items: center; justify-content: flex-end;"
39453
+ })))), isMobile && /*#__PURE__*/React.createElement(Cluster, {
39454
+ align: "center",
39455
+ justify: text || actionText ? "flex-end" : "flex-start",
39456
+ extraStyles: "margin-top: 0.5rem;"
39435
39457
  }, text && /*#__PURE__*/React.createElement(Text$1, {
39436
39458
  extraStyles: "font-size: 12px"
39437
- }, text), action && actionText && /*#__PURE__*/React.createElement(ButtonWithAction, {
39459
+ }, text), (text || actionText) && /*#__PURE__*/React.createElement(React.Fragment, null, "\xA0"), action && actionText && /*#__PURE__*/React.createElement(ButtonWithAction, {
39438
39460
  text: actionText,
39439
39461
  action: action,
39440
39462
  variant: "smallGhost",