@thecb/components 7.12.2-beta.5 → 7.12.2-beta.7

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,7 +17832,11 @@ 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;
17780
17840
  var Icon = AlertIcons[variant];
17781
17841
  var content = /*#__PURE__*/React.createElement(Sidebar, {
17782
17842
  width: "24px",
@@ -17828,7 +17888,8 @@ var Alert = function Alert(_ref) {
17828
17888
  background: themeValues.background,
17829
17889
  borderRadius: "4px",
17830
17890
  borderColor: themeValues.border,
17831
- borderSize: "1px",
17891
+ borderSize: noBorder ? "0px" : "1px",
17892
+ 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
17893
  extraStyles: extraStyles
17833
17894
  }, maxContentWidth ? /*#__PURE__*/React.createElement(Center, {
17834
17895
  maxWidth: maxContentWidth
@@ -46996,7 +47057,7 @@ var PaymentDetailsContent = function PaymentDetailsContent(_ref) {
46996
47057
  var LoadingDetails = function LoadingDetails() {
46997
47058
  return /*#__PURE__*/React.createElement(Box, {
46998
47059
  padding: "0",
46999
- background: GHOST_GREY,
47060
+ background: GRECIAN_GREY,
47000
47061
  borderRadius: "4px",
47001
47062
  minHeight: "196px"
47002
47063
  }, /*#__PURE__*/React.createElement(Cover, {
@@ -47021,7 +47082,10 @@ var ErrorDetails = function ErrorDetails() {
47021
47082
  variant: "error",
47022
47083
  heading: "Error Loading Payment",
47023
47084
  text: "Please go back and try again.",
47024
- showQuitLink: false
47085
+ showQuitLink: false,
47086
+ noBorder: true,
47087
+ enableBoxShadow: true,
47088
+ extraStyles: "min-height: 67px; height: 67px;"
47025
47089
  }));
47026
47090
  };
47027
47091
 
@@ -47435,59 +47499,6 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
47435
47499
  })))));
47436
47500
  };
47437
47501
 
47438
- /*
47439
-
47440
- A utility function that can generate box-shadow values for components
47441
- Takes a string representing an rgb color value and returns an object
47442
- with values for standard, inset, and overlay shadows.
47443
-
47444
- The objects for standard and inset shadows contain versions approiate
47445
- for base, hover, and active interaction states.
47446
-
47447
- */
47448
-
47449
- /*
47450
- Function to convert string representing rgb color to rgba value with provided opacity
47451
- ("rgb(41, 42, 51)", "0.1") => "rgba(41, 42, 51, 0.1)"
47452
-
47453
- */
47454
- var rgbToRgba = function rgbToRgba() {
47455
- var rgbValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
47456
- var opacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
47457
-
47458
- if (typeof rgbValue !== "string" || typeof opacity !== "string" || rgbValue.charAt(0) === "#") {
47459
- return "";
47460
- }
47461
-
47462
- return "".concat(rgbValue.slice(0, 3), "a").concat(rgbValue.slice(3, -1), ", ").concat(opacity).concat(rgbValue.slice(-1));
47463
- };
47464
-
47465
- var generateShadows = function generateShadows(baseColorRGB) {
47466
- var colorTen = rgbToRgba(baseColorRGB, "0.1") || "rgba(41, 42, 51, 0.1)";
47467
- var colorTwenty = rgbToRgba(baseColorRGB, "0.2") || "rgba(41, 42, 51, 0.2)";
47468
- var colorTwentyFive = rgbToRgba(baseColorRGB, "0.25") || "rgba(41, 42, 51, 0.25)";
47469
- var colorThirty = rgbToRgba(baseColorRGB, "0.3") || "rgba(41, 42, 51, 0.3)";
47470
- var blackTwentyFive = "rgba(0, 0, 0, 0.25)";
47471
- var standard = {
47472
- base: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 6px 0px ").concat(colorTwenty, ", inset 0px 1px 0px 0px ").concat(colorTen),
47473
- hover: "0px 1px 2px 0px ".concat(colorTwenty, ", 0px 4px 8px 0px ").concat(blackTwentyFive, ", 0px 6px 12px 0px ").concat(colorTen),
47474
- active: "0px 2px 8px 0px ".concat(colorTwenty, ", 0px 4px 8px 0px ").concat(colorThirty, ", 0px 6px 12px 0px ").concat(colorTwentyFive)
47475
- };
47476
- var inset = {
47477
- base: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 4px 0px ").concat(colorTwenty, ", inset 0px 1px 0px 0px ").concat(colorTen),
47478
- hover: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 4px 0px ").concat(colorTwentyFive, ", 0px 4px 8px 0px ").concat(colorTen),
47479
- active: "0px 1px 2px 2px ".concat(colorTwenty, ", 0px 3px 6px 0px ").concat(colorThirty, ", 0px 4px 8px 0px ").concat(colorTwenty)
47480
- };
47481
- var overlay = {
47482
- base: "0px 7px 32px 0px ".concat(colorTwenty, ", 0px 1px 4px 0px ").concat(colorTwenty, ", 0px 1px 8px -1px ").concat(colorThirty)
47483
- };
47484
- return {
47485
- standard: standard,
47486
- inset: inset,
47487
- overlay: overlay
47488
- };
47489
- };
47490
-
47491
47502
  /*
47492
47503
  Hook that takes an ID selector for an element on the screen
47493
47504
  And optionally values for top position, left position, smooth behavior