@thecb/components 7.12.2-beta.2 → 7.12.2-beta.21

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
@@ -17762,7 +17762,63 @@ var fallbackValues$4 = {
17762
17762
  link: link
17763
17763
  };
17764
17764
 
17765
+ /*
17766
+
17767
+ A utility function that can generate box-shadow values for components
17768
+ Takes a string representing an rgb color value and returns an object
17769
+ with values for standard, inset, and overlay shadows.
17770
+
17771
+ The objects for standard and inset shadows contain versions approiate
17772
+ for base, hover, and active interaction states.
17773
+
17774
+ */
17775
+
17776
+ /*
17777
+ Function to convert string representing rgb color to rgba value with provided opacity
17778
+ ("rgb(41, 42, 51)", "0.1") => "rgba(41, 42, 51, 0.1)"
17779
+
17780
+ */
17781
+ var rgbToRgba = function rgbToRgba() {
17782
+ var rgbValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
17783
+ var opacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
17784
+
17785
+ if (typeof rgbValue !== "string" || typeof opacity !== "string" || rgbValue.charAt(0) === "#") {
17786
+ return "";
17787
+ }
17788
+
17789
+ return "".concat(rgbValue.slice(0, 3), "a").concat(rgbValue.slice(3, -1), ", ").concat(opacity).concat(rgbValue.slice(-1));
17790
+ };
17791
+
17792
+ var generateShadows = function generateShadows() {
17793
+ var baseColorRGB = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "rgb(41, 42, 51)";
17794
+ var colorTen = rgbToRgba(baseColorRGB, "0.1") || "rgba(41, 42, 51, 0.1)";
17795
+ var colorTwenty = rgbToRgba(baseColorRGB, "0.2") || "rgba(41, 42, 51, 0.2)";
17796
+ var colorTwentyFive = rgbToRgba(baseColorRGB, "0.25") || "rgba(41, 42, 51, 0.25)";
17797
+ var colorThirty = rgbToRgba(baseColorRGB, "0.3") || "rgba(41, 42, 51, 0.3)";
17798
+ var blackTwentyFive = "rgba(0, 0, 0, 0.25)";
17799
+ var standard = {
17800
+ base: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 6px 0px ").concat(colorTwenty, ", inset 0px 1px 0px 0px ").concat(colorTen),
17801
+ hover: "0px 1px 2px 0px ".concat(colorTwenty, ", 0px 4px 8px 0px ").concat(blackTwentyFive, ", 0px 6px 12px 0px ").concat(colorTen),
17802
+ active: "0px 2px 8px 0px ".concat(colorTwenty, ", 0px 4px 8px 0px ").concat(colorThirty, ", 0px 6px 12px 0px ").concat(colorTwentyFive)
17803
+ };
17804
+ var inset = {
17805
+ base: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 4px 0px ").concat(colorTwenty, ", inset 0px 1px 0px 0px ").concat(colorTen),
17806
+ hover: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 4px 0px ").concat(colorTwentyFive, ", 0px 4px 8px 0px ").concat(colorTen),
17807
+ active: "0px 1px 2px 2px ".concat(colorTwenty, ", 0px 3px 6px 0px ").concat(colorThirty, ", 0px 4px 8px 0px ").concat(colorTwenty)
17808
+ };
17809
+ var overlay = {
17810
+ base: "0px 7px 32px 0px ".concat(colorTwenty, ", 0px 1px 4px 0px ").concat(colorTwenty, ", 0px 1px 8px -1px ").concat(colorThirty)
17811
+ };
17812
+ return {
17813
+ standard: standard,
17814
+ inset: inset,
17815
+ overlay: overlay
17816
+ };
17817
+ };
17818
+
17765
17819
  var Alert = function Alert(_ref) {
17820
+ var _generateShadows, _generateShadows$inse;
17821
+
17766
17822
  var heading = _ref.heading,
17767
17823
  text = _ref.text,
17768
17824
  textOverride = _ref.textOverride,
@@ -17776,13 +17832,26 @@ var Alert = function Alert(_ref) {
17776
17832
  showQuitLink = _ref$showQuitLink === void 0 ? true : _ref$showQuitLink,
17777
17833
  themeValues = _ref.themeValues,
17778
17834
  extraStyles = _ref.extraStyles,
17779
- maxContentWidth = _ref.maxContentWidth;
17835
+ maxContentWidth = _ref.maxContentWidth,
17836
+ _ref$noBorder = _ref.noBorder,
17837
+ noBorder = _ref$noBorder === void 0 ? false : _ref$noBorder,
17838
+ _ref$enableBoxShadow = _ref.enableBoxShadow,
17839
+ enableBoxShadow = _ref$enableBoxShadow === void 0 ? false : _ref$enableBoxShadow,
17840
+ _ref$enableSmallText = _ref.enableSmallText,
17841
+ enableSmallText = _ref$enableSmallText === void 0 ? false : _ref$enableSmallText,
17842
+ _ref$innerContentPadd = _ref.innerContentPadding,
17843
+ innerContentPadding = _ref$innerContentPadd === void 0 ? "1rem" : _ref$innerContentPadd,
17844
+ _ref$iconPadding = _ref.iconPadding,
17845
+ iconPadding = _ref$iconPadding === void 0 ? "0 0 0 1rem" : _ref$iconPadding,
17846
+ _ref$contentFullHeigh = _ref.contentFullHeight,
17847
+ contentFullHeight = _ref$contentFullHeigh === void 0 ? false : _ref$contentFullHeigh;
17780
17848
  var Icon = AlertIcons[variant];
17849
+ var contentPadding = maxContentWidth ? "".concat(padding, " 1rem") : innerContentPadding;
17781
17850
  var content = /*#__PURE__*/React.createElement(Sidebar, {
17782
17851
  width: "24px",
17783
17852
  childGap: "0rem"
17784
17853
  }, /*#__PURE__*/React.createElement(Box, {
17785
- padding: "0 0 0 1rem",
17854
+ padding: iconPadding,
17786
17855
  minHeight: "100%"
17787
17856
  }, /*#__PURE__*/React.createElement(Cover, {
17788
17857
  minHeight: "100%",
@@ -17796,17 +17865,18 @@ var Alert = function Alert(_ref) {
17796
17865
  }, /*#__PURE__*/React.createElement(Sidebar, {
17797
17866
  sidebarOnRight: true,
17798
17867
  width: "24px",
17799
- childGap: "0rem"
17868
+ childGap: "0rem",
17869
+ fullHeight: contentFullHeight
17800
17870
  }, /*#__PURE__*/React.createElement(Box, {
17801
- padding: maxContentWidth ? "".concat(padding, " 1rem") : "1rem"
17871
+ padding: contentPadding
17802
17872
  }, /*#__PURE__*/React.createElement(Cluster, {
17803
17873
  justify: "flex-start",
17804
17874
  align: "center"
17805
17875
  }, textOverride ? textOverride : /*#__PURE__*/React.createElement(Stack, {
17806
17876
  fullHeight: true,
17807
- childGap: "0.25rem"
17877
+ childGap: "0"
17808
17878
  }, /*#__PURE__*/React.createElement(Text$1, {
17809
- variant: "p",
17879
+ variant: enableSmallText ? "pS" : "p",
17810
17880
  color: themeValues.text,
17811
17881
  weight: "600"
17812
17882
  }, heading), /*#__PURE__*/React.createElement(Text$1, {
@@ -17828,7 +17898,8 @@ var Alert = function Alert(_ref) {
17828
17898
  background: themeValues.background,
17829
17899
  borderRadius: "4px",
17830
17900
  borderColor: themeValues.border,
17831
- borderSize: "1px",
17901
+ borderSize: noBorder ? "0px" : "1px",
17902
+ boxShadow: enableBoxShadow ? (_generateShadows = generateShadows()) === null || _generateShadows === void 0 ? void 0 : (_generateShadows$inse = _generateShadows.inset) === null || _generateShadows$inse === void 0 ? void 0 : _generateShadows$inse.base : "",
17832
17903
  extraStyles: extraStyles
17833
17904
  }, maxContentWidth ? /*#__PURE__*/React.createElement(Center, {
17834
17905
  maxWidth: maxContentWidth
@@ -25573,7 +25644,7 @@ var fallbackValues$q = {
25573
25644
  var SpinnerSvgAnimation = styled.svg.withConfig({
25574
25645
  displayName: "Spinner__SpinnerSvgAnimation",
25575
25646
  componentId: "sc-vhupl9-0"
25576
- })(["animation:rotate 2s linear infinite;margin:-25px 0 0 -25px;width:", "px;height:", "px;& .path{stroke:", ";stroke-linecap:round;animation:dash 1.5s ease-in-out infinite;}@keyframes rotate{100%{transform:rotate(360deg);}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0;}50%{stroke-dasharray:90,150;stroke-dashoffset:-35;}100%{stroke-dasharray:90,150;stroke-dashoffset:-124;}}"], function (_ref) {
25647
+ })(["animation:rotate 2s linear infinite;margin:-25px 0 0 -25px;width:", "px;height:", "px;& .path{stroke:", ";stroke-linecap:round;animation:dash 1.5s ease-in-out infinite;}@keyframes rotate{100%{transform:rotate(360deg);}}@keyframes dash{0%{stroke-dasharray:1,150;stroke-dashoffset:0;}50%{stroke-dasharray:90,150;stroke-dashoffset:-35;}100%{stroke-dasharray:90,150;stroke-dashoffset:-124;}}", ""], function (_ref) {
25577
25648
  var size = _ref.size;
25578
25649
  return size;
25579
25650
  }, function (_ref2) {
@@ -25582,19 +25653,36 @@ var SpinnerSvgAnimation = styled.svg.withConfig({
25582
25653
  }, function (_ref3) {
25583
25654
  var color = _ref3.color;
25584
25655
  return color;
25656
+ }, function (_ref4) {
25657
+ var centerSpinner = _ref4.centerSpinner;
25658
+ return centerSpinner ? css(["margin:0;"]) : "";
25585
25659
  });
25586
25660
  var SpinnerContainer$2 = styled.div.withConfig({
25587
25661
  displayName: "Spinner__SpinnerContainer",
25588
25662
  componentId: "sc-vhupl9-1"
25589
- })(["width:100%;display:flex;flex-direction:row;align-items:center;justify-content:center;line-height:1;"]);
25663
+ })(["width:100%;display:flex;flex-direction:row;align-items:center;justify-content:center;line-height:1;", ""], function (_ref5) {
25664
+ var centerSpinner = _ref5.centerSpinner,
25665
+ size = _ref5.size;
25666
+ return centerSpinner ? css(["width:", "px;height:", "px;"], size, size) : "";
25667
+ });
25668
+ /*
25669
+ `centerSpinner` prop alters existing styling of spinner to allow it to properly center itself within
25670
+ containers. Default is false to preserve legacy behavior for past uses.
25671
+ */
25590
25672
 
25591
- var Spinner$1 = function Spinner(_ref4) {
25592
- var _ref4$size = _ref4.size,
25593
- size = _ref4$size === void 0 ? "24" : _ref4$size,
25594
- themeValues = _ref4.themeValues;
25595
- return /*#__PURE__*/React.createElement(SpinnerContainer$2, null, /*#__PURE__*/React.createElement(SpinnerSvgAnimation, {
25673
+ var Spinner$1 = function Spinner(_ref6) {
25674
+ var _ref6$size = _ref6.size,
25675
+ size = _ref6$size === void 0 ? "24" : _ref6$size,
25676
+ _ref6$centerSpinner = _ref6.centerSpinner,
25677
+ centerSpinner = _ref6$centerSpinner === void 0 ? false : _ref6$centerSpinner,
25678
+ themeValues = _ref6.themeValues;
25679
+ return /*#__PURE__*/React.createElement(SpinnerContainer$2, {
25680
+ centerSpinner: centerSpinner,
25681
+ size: size
25682
+ }, /*#__PURE__*/React.createElement(SpinnerSvgAnimation, {
25596
25683
  size: size,
25597
- color: themeValues.color
25684
+ color: themeValues.color,
25685
+ centerSpinner: centerSpinner
25598
25686
  }, /*#__PURE__*/React.createElement("circle", {
25599
25687
  className: "path",
25600
25688
  cx: "50",
@@ -46948,7 +47036,7 @@ var PaymentDetailsContent = function PaymentDetailsContent(_ref) {
46948
47036
  },
46949
47037
  text: "Void",
46950
47038
  padding: "0",
46951
- extraStyles: "\n min-width: 65px; \n margin: 0px;\n min-height: 0px;\n ",
47039
+ extraStyles: "\n min-width: 65px;\n margin: 0px;\n min-height: 0px;\n ",
46952
47040
  textExtraStyles: "font-weight: ".concat(FONT_WEIGHT_REGULAR, "; font-size: 14px;")
46953
47041
  })), /*#__PURE__*/React.createElement(Box, {
46954
47042
  padding: "0",
@@ -46979,18 +47067,21 @@ var PaymentDetailsContent = function PaymentDetailsContent(_ref) {
46979
47067
  var LoadingDetails = function LoadingDetails() {
46980
47068
  return /*#__PURE__*/React.createElement(Box, {
46981
47069
  padding: "0",
46982
- background: GHOST_GREY,
47070
+ background: GRECIAN_GREY,
46983
47071
  borderRadius: "4px",
46984
47072
  minHeight: "196px"
46985
47073
  }, /*#__PURE__*/React.createElement(Cover, {
46986
- minHeight: "100%",
46987
- singleChild: true
47074
+ minHeight: "196px",
47075
+ singleChild: true,
47076
+ fillCenter: true
46988
47077
  }, /*#__PURE__*/React.createElement(Center, {
46989
47078
  intrinsic: true
46990
47079
  }, /*#__PURE__*/React.createElement(Box, {
46991
- padding: "0"
47080
+ padding: "0",
47081
+ extraStyles: "flex-grow: 1; display: flex; justify-content: center; align-items: center;"
46992
47082
  }, /*#__PURE__*/React.createElement(Spinner$2, {
46993
- size: "100"
47083
+ size: "100",
47084
+ centerSpinner: true
46994
47085
  })))));
46995
47086
  };
46996
47087
 
@@ -47001,7 +47092,15 @@ var ErrorDetails = function ErrorDetails() {
47001
47092
  variant: "error",
47002
47093
  heading: "Error Loading Payment",
47003
47094
  text: "Please go back and try again.",
47004
- showQuitLink: false
47095
+ showQuitLink: false,
47096
+ noBorder: true,
47097
+ enableBoxShadow: true,
47098
+ enableSmallText: true,
47099
+ innerContentPadding: "0 0 0 0.75rem",
47100
+ iconPadding: "0 0 0 0",
47101
+ height: "67px",
47102
+ minHeight: "67px",
47103
+ padding: "0.75rem"
47005
47104
  }));
47006
47105
  };
47007
47106
 
@@ -47415,59 +47514,6 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
47415
47514
  })))));
47416
47515
  };
47417
47516
 
47418
- /*
47419
-
47420
- A utility function that can generate box-shadow values for components
47421
- Takes a string representing an rgb color value and returns an object
47422
- with values for standard, inset, and overlay shadows.
47423
-
47424
- The objects for standard and inset shadows contain versions approiate
47425
- for base, hover, and active interaction states.
47426
-
47427
- */
47428
-
47429
- /*
47430
- Function to convert string representing rgb color to rgba value with provided opacity
47431
- ("rgb(41, 42, 51)", "0.1") => "rgba(41, 42, 51, 0.1)"
47432
-
47433
- */
47434
- var rgbToRgba = function rgbToRgba() {
47435
- var rgbValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
47436
- var opacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
47437
-
47438
- if (typeof rgbValue !== "string" || typeof opacity !== "string" || rgbValue.charAt(0) === "#") {
47439
- return "";
47440
- }
47441
-
47442
- return "".concat(rgbValue.slice(0, 3), "a").concat(rgbValue.slice(3, -1), ", ").concat(opacity).concat(rgbValue.slice(-1));
47443
- };
47444
-
47445
- var generateShadows = function generateShadows(baseColorRGB) {
47446
- var colorTen = rgbToRgba(baseColorRGB, "0.1") || "rgba(41, 42, 51, 0.1)";
47447
- var colorTwenty = rgbToRgba(baseColorRGB, "0.2") || "rgba(41, 42, 51, 0.2)";
47448
- var colorTwentyFive = rgbToRgba(baseColorRGB, "0.25") || "rgba(41, 42, 51, 0.25)";
47449
- var colorThirty = rgbToRgba(baseColorRGB, "0.3") || "rgba(41, 42, 51, 0.3)";
47450
- var blackTwentyFive = "rgba(0, 0, 0, 0.25)";
47451
- var standard = {
47452
- base: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 6px 0px ").concat(colorTwenty, ", inset 0px 1px 0px 0px ").concat(colorTen),
47453
- hover: "0px 1px 2px 0px ".concat(colorTwenty, ", 0px 4px 8px 0px ").concat(blackTwentyFive, ", 0px 6px 12px 0px ").concat(colorTen),
47454
- active: "0px 2px 8px 0px ".concat(colorTwenty, ", 0px 4px 8px 0px ").concat(colorThirty, ", 0px 6px 12px 0px ").concat(colorTwentyFive)
47455
- };
47456
- var inset = {
47457
- base: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 4px 0px ").concat(colorTwenty, ", inset 0px 1px 0px 0px ").concat(colorTen),
47458
- hover: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 4px 0px ").concat(colorTwentyFive, ", 0px 4px 8px 0px ").concat(colorTen),
47459
- active: "0px 1px 2px 2px ".concat(colorTwenty, ", 0px 3px 6px 0px ").concat(colorThirty, ", 0px 4px 8px 0px ").concat(colorTwenty)
47460
- };
47461
- var overlay = {
47462
- base: "0px 7px 32px 0px ".concat(colorTwenty, ", 0px 1px 4px 0px ").concat(colorTwenty, ", 0px 1px 8px -1px ").concat(colorThirty)
47463
- };
47464
- return {
47465
- standard: standard,
47466
- inset: inset,
47467
- overlay: overlay
47468
- };
47469
- };
47470
-
47471
47517
  /*
47472
47518
  Hook that takes an ID selector for an element on the screen
47473
47519
  And optionally values for top position, left position, smooth behavior