@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.cjs.js CHANGED
@@ -17770,7 +17770,63 @@ var fallbackValues$4 = {
17770
17770
  link: link
17771
17771
  };
17772
17772
 
17773
+ /*
17774
+
17775
+ A utility function that can generate box-shadow values for components
17776
+ Takes a string representing an rgb color value and returns an object
17777
+ with values for standard, inset, and overlay shadows.
17778
+
17779
+ The objects for standard and inset shadows contain versions approiate
17780
+ for base, hover, and active interaction states.
17781
+
17782
+ */
17783
+
17784
+ /*
17785
+ Function to convert string representing rgb color to rgba value with provided opacity
17786
+ ("rgb(41, 42, 51)", "0.1") => "rgba(41, 42, 51, 0.1)"
17787
+
17788
+ */
17789
+ var rgbToRgba = function rgbToRgba() {
17790
+ var rgbValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
17791
+ var opacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
17792
+
17793
+ if (typeof rgbValue !== "string" || typeof opacity !== "string" || rgbValue.charAt(0) === "#") {
17794
+ return "";
17795
+ }
17796
+
17797
+ return "".concat(rgbValue.slice(0, 3), "a").concat(rgbValue.slice(3, -1), ", ").concat(opacity).concat(rgbValue.slice(-1));
17798
+ };
17799
+
17800
+ var generateShadows = function generateShadows() {
17801
+ var baseColorRGB = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "rgb(41, 42, 51)";
17802
+ var colorTen = rgbToRgba(baseColorRGB, "0.1") || "rgba(41, 42, 51, 0.1)";
17803
+ var colorTwenty = rgbToRgba(baseColorRGB, "0.2") || "rgba(41, 42, 51, 0.2)";
17804
+ var colorTwentyFive = rgbToRgba(baseColorRGB, "0.25") || "rgba(41, 42, 51, 0.25)";
17805
+ var colorThirty = rgbToRgba(baseColorRGB, "0.3") || "rgba(41, 42, 51, 0.3)";
17806
+ var blackTwentyFive = "rgba(0, 0, 0, 0.25)";
17807
+ var standard = {
17808
+ base: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 6px 0px ").concat(colorTwenty, ", inset 0px 1px 0px 0px ").concat(colorTen),
17809
+ hover: "0px 1px 2px 0px ".concat(colorTwenty, ", 0px 4px 8px 0px ").concat(blackTwentyFive, ", 0px 6px 12px 0px ").concat(colorTen),
17810
+ active: "0px 2px 8px 0px ".concat(colorTwenty, ", 0px 4px 8px 0px ").concat(colorThirty, ", 0px 6px 12px 0px ").concat(colorTwentyFive)
17811
+ };
17812
+ var inset = {
17813
+ base: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 4px 0px ").concat(colorTwenty, ", inset 0px 1px 0px 0px ").concat(colorTen),
17814
+ hover: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 4px 0px ").concat(colorTwentyFive, ", 0px 4px 8px 0px ").concat(colorTen),
17815
+ active: "0px 1px 2px 2px ".concat(colorTwenty, ", 0px 3px 6px 0px ").concat(colorThirty, ", 0px 4px 8px 0px ").concat(colorTwenty)
17816
+ };
17817
+ var overlay = {
17818
+ base: "0px 7px 32px 0px ".concat(colorTwenty, ", 0px 1px 4px 0px ").concat(colorTwenty, ", 0px 1px 8px -1px ").concat(colorThirty)
17819
+ };
17820
+ return {
17821
+ standard: standard,
17822
+ inset: inset,
17823
+ overlay: overlay
17824
+ };
17825
+ };
17826
+
17773
17827
  var Alert = function Alert(_ref) {
17828
+ var _generateShadows, _generateShadows$inse;
17829
+
17774
17830
  var heading = _ref.heading,
17775
17831
  text = _ref.text,
17776
17832
  textOverride = _ref.textOverride,
@@ -17784,13 +17840,26 @@ var Alert = function Alert(_ref) {
17784
17840
  showQuitLink = _ref$showQuitLink === void 0 ? true : _ref$showQuitLink,
17785
17841
  themeValues = _ref.themeValues,
17786
17842
  extraStyles = _ref.extraStyles,
17787
- maxContentWidth = _ref.maxContentWidth;
17843
+ maxContentWidth = _ref.maxContentWidth,
17844
+ _ref$noBorder = _ref.noBorder,
17845
+ noBorder = _ref$noBorder === void 0 ? false : _ref$noBorder,
17846
+ _ref$enableBoxShadow = _ref.enableBoxShadow,
17847
+ enableBoxShadow = _ref$enableBoxShadow === void 0 ? false : _ref$enableBoxShadow,
17848
+ _ref$enableSmallText = _ref.enableSmallText,
17849
+ enableSmallText = _ref$enableSmallText === void 0 ? false : _ref$enableSmallText,
17850
+ _ref$innerContentPadd = _ref.innerContentPadding,
17851
+ innerContentPadding = _ref$innerContentPadd === void 0 ? "1rem" : _ref$innerContentPadd,
17852
+ _ref$iconPadding = _ref.iconPadding,
17853
+ iconPadding = _ref$iconPadding === void 0 ? "0 0 0 1rem" : _ref$iconPadding,
17854
+ _ref$contentFullHeigh = _ref.contentFullHeight,
17855
+ contentFullHeight = _ref$contentFullHeigh === void 0 ? false : _ref$contentFullHeigh;
17788
17856
  var Icon = AlertIcons[variant];
17857
+ var contentPadding = maxContentWidth ? "".concat(padding, " 1rem") : innerContentPadding;
17789
17858
  var content = /*#__PURE__*/React__default.createElement(Sidebar, {
17790
17859
  width: "24px",
17791
17860
  childGap: "0rem"
17792
17861
  }, /*#__PURE__*/React__default.createElement(Box, {
17793
- padding: "0 0 0 1rem",
17862
+ padding: iconPadding,
17794
17863
  minHeight: "100%"
17795
17864
  }, /*#__PURE__*/React__default.createElement(Cover, {
17796
17865
  minHeight: "100%",
@@ -17804,17 +17873,18 @@ var Alert = function Alert(_ref) {
17804
17873
  }, /*#__PURE__*/React__default.createElement(Sidebar, {
17805
17874
  sidebarOnRight: true,
17806
17875
  width: "24px",
17807
- childGap: "0rem"
17876
+ childGap: "0rem",
17877
+ fullHeight: contentFullHeight
17808
17878
  }, /*#__PURE__*/React__default.createElement(Box, {
17809
- padding: maxContentWidth ? "".concat(padding, " 1rem") : "1rem"
17879
+ padding: contentPadding
17810
17880
  }, /*#__PURE__*/React__default.createElement(Cluster, {
17811
17881
  justify: "flex-start",
17812
17882
  align: "center"
17813
17883
  }, textOverride ? textOverride : /*#__PURE__*/React__default.createElement(Stack, {
17814
17884
  fullHeight: true,
17815
- childGap: "0.25rem"
17885
+ childGap: "0"
17816
17886
  }, /*#__PURE__*/React__default.createElement(Text$1, {
17817
- variant: "p",
17887
+ variant: enableSmallText ? "pS" : "p",
17818
17888
  color: themeValues.text,
17819
17889
  weight: "600"
17820
17890
  }, heading), /*#__PURE__*/React__default.createElement(Text$1, {
@@ -17836,7 +17906,8 @@ var Alert = function Alert(_ref) {
17836
17906
  background: themeValues.background,
17837
17907
  borderRadius: "4px",
17838
17908
  borderColor: themeValues.border,
17839
- borderSize: "1px",
17909
+ borderSize: noBorder ? "0px" : "1px",
17910
+ boxShadow: enableBoxShadow ? (_generateShadows = generateShadows()) === null || _generateShadows === void 0 ? void 0 : (_generateShadows$inse = _generateShadows.inset) === null || _generateShadows$inse === void 0 ? void 0 : _generateShadows$inse.base : "",
17840
17911
  extraStyles: extraStyles
17841
17912
  }, maxContentWidth ? /*#__PURE__*/React__default.createElement(Center, {
17842
17913
  maxWidth: maxContentWidth
@@ -25581,7 +25652,7 @@ var fallbackValues$q = {
25581
25652
  var SpinnerSvgAnimation = styled__default.svg.withConfig({
25582
25653
  displayName: "Spinner__SpinnerSvgAnimation",
25583
25654
  componentId: "sc-vhupl9-0"
25584
- })(["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) {
25655
+ })(["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) {
25585
25656
  var size = _ref.size;
25586
25657
  return size;
25587
25658
  }, function (_ref2) {
@@ -25590,19 +25661,36 @@ var SpinnerSvgAnimation = styled__default.svg.withConfig({
25590
25661
  }, function (_ref3) {
25591
25662
  var color = _ref3.color;
25592
25663
  return color;
25664
+ }, function (_ref4) {
25665
+ var centerSpinner = _ref4.centerSpinner;
25666
+ return centerSpinner ? styled.css(["margin:0;"]) : "";
25593
25667
  });
25594
25668
  var SpinnerContainer$2 = styled__default.div.withConfig({
25595
25669
  displayName: "Spinner__SpinnerContainer",
25596
25670
  componentId: "sc-vhupl9-1"
25597
- })(["width:100%;display:flex;flex-direction:row;align-items:center;justify-content:center;line-height:1;"]);
25671
+ })(["width:100%;display:flex;flex-direction:row;align-items:center;justify-content:center;line-height:1;", ""], function (_ref5) {
25672
+ var centerSpinner = _ref5.centerSpinner,
25673
+ size = _ref5.size;
25674
+ return centerSpinner ? styled.css(["width:", "px;height:", "px;"], size, size) : "";
25675
+ });
25676
+ /*
25677
+ `centerSpinner` prop alters existing styling of spinner to allow it to properly center itself within
25678
+ containers. Default is false to preserve legacy behavior for past uses.
25679
+ */
25598
25680
 
25599
- var Spinner$1 = function Spinner(_ref4) {
25600
- var _ref4$size = _ref4.size,
25601
- size = _ref4$size === void 0 ? "24" : _ref4$size,
25602
- themeValues = _ref4.themeValues;
25603
- return /*#__PURE__*/React__default.createElement(SpinnerContainer$2, null, /*#__PURE__*/React__default.createElement(SpinnerSvgAnimation, {
25681
+ var Spinner$1 = function Spinner(_ref6) {
25682
+ var _ref6$size = _ref6.size,
25683
+ size = _ref6$size === void 0 ? "24" : _ref6$size,
25684
+ _ref6$centerSpinner = _ref6.centerSpinner,
25685
+ centerSpinner = _ref6$centerSpinner === void 0 ? false : _ref6$centerSpinner,
25686
+ themeValues = _ref6.themeValues;
25687
+ return /*#__PURE__*/React__default.createElement(SpinnerContainer$2, {
25688
+ centerSpinner: centerSpinner,
25689
+ size: size
25690
+ }, /*#__PURE__*/React__default.createElement(SpinnerSvgAnimation, {
25604
25691
  size: size,
25605
- color: themeValues.color
25692
+ color: themeValues.color,
25693
+ centerSpinner: centerSpinner
25606
25694
  }, /*#__PURE__*/React__default.createElement("circle", {
25607
25695
  className: "path",
25608
25696
  cx: "50",
@@ -46956,7 +47044,7 @@ var PaymentDetailsContent = function PaymentDetailsContent(_ref) {
46956
47044
  },
46957
47045
  text: "Void",
46958
47046
  padding: "0",
46959
- extraStyles: "\n min-width: 65px; \n margin: 0px;\n min-height: 0px;\n ",
47047
+ extraStyles: "\n min-width: 65px;\n margin: 0px;\n min-height: 0px;\n ",
46960
47048
  textExtraStyles: "font-weight: ".concat(FONT_WEIGHT_REGULAR, "; font-size: 14px;")
46961
47049
  })), /*#__PURE__*/React__default.createElement(Box, {
46962
47050
  padding: "0",
@@ -46987,18 +47075,21 @@ var PaymentDetailsContent = function PaymentDetailsContent(_ref) {
46987
47075
  var LoadingDetails = function LoadingDetails() {
46988
47076
  return /*#__PURE__*/React__default.createElement(Box, {
46989
47077
  padding: "0",
46990
- background: GHOST_GREY,
47078
+ background: GRECIAN_GREY,
46991
47079
  borderRadius: "4px",
46992
47080
  minHeight: "196px"
46993
47081
  }, /*#__PURE__*/React__default.createElement(Cover, {
46994
- minHeight: "100%",
46995
- singleChild: true
47082
+ minHeight: "196px",
47083
+ singleChild: true,
47084
+ fillCenter: true
46996
47085
  }, /*#__PURE__*/React__default.createElement(Center, {
46997
47086
  intrinsic: true
46998
47087
  }, /*#__PURE__*/React__default.createElement(Box, {
46999
- padding: "0"
47088
+ padding: "0",
47089
+ extraStyles: "flex-grow: 1; display: flex; justify-content: center; align-items: center;"
47000
47090
  }, /*#__PURE__*/React__default.createElement(Spinner$2, {
47001
- size: "100"
47091
+ size: "100",
47092
+ centerSpinner: true
47002
47093
  })))));
47003
47094
  };
47004
47095
 
@@ -47009,7 +47100,15 @@ var ErrorDetails = function ErrorDetails() {
47009
47100
  variant: "error",
47010
47101
  heading: "Error Loading Payment",
47011
47102
  text: "Please go back and try again.",
47012
- showQuitLink: false
47103
+ showQuitLink: false,
47104
+ noBorder: true,
47105
+ enableBoxShadow: true,
47106
+ enableSmallText: true,
47107
+ innerContentPadding: "0 0 0 0.75rem",
47108
+ iconPadding: "0 0 0 0",
47109
+ height: "67px",
47110
+ minHeight: "67px",
47111
+ padding: "0.75rem"
47013
47112
  }));
47014
47113
  };
47015
47114
 
@@ -47423,59 +47522,6 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
47423
47522
  })))));
47424
47523
  };
47425
47524
 
47426
- /*
47427
-
47428
- A utility function that can generate box-shadow values for components
47429
- Takes a string representing an rgb color value and returns an object
47430
- with values for standard, inset, and overlay shadows.
47431
-
47432
- The objects for standard and inset shadows contain versions approiate
47433
- for base, hover, and active interaction states.
47434
-
47435
- */
47436
-
47437
- /*
47438
- Function to convert string representing rgb color to rgba value with provided opacity
47439
- ("rgb(41, 42, 51)", "0.1") => "rgba(41, 42, 51, 0.1)"
47440
-
47441
- */
47442
- var rgbToRgba = function rgbToRgba() {
47443
- var rgbValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
47444
- var opacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
47445
-
47446
- if (typeof rgbValue !== "string" || typeof opacity !== "string" || rgbValue.charAt(0) === "#") {
47447
- return "";
47448
- }
47449
-
47450
- return "".concat(rgbValue.slice(0, 3), "a").concat(rgbValue.slice(3, -1), ", ").concat(opacity).concat(rgbValue.slice(-1));
47451
- };
47452
-
47453
- var generateShadows = function generateShadows(baseColorRGB) {
47454
- var colorTen = rgbToRgba(baseColorRGB, "0.1") || "rgba(41, 42, 51, 0.1)";
47455
- var colorTwenty = rgbToRgba(baseColorRGB, "0.2") || "rgba(41, 42, 51, 0.2)";
47456
- var colorTwentyFive = rgbToRgba(baseColorRGB, "0.25") || "rgba(41, 42, 51, 0.25)";
47457
- var colorThirty = rgbToRgba(baseColorRGB, "0.3") || "rgba(41, 42, 51, 0.3)";
47458
- var blackTwentyFive = "rgba(0, 0, 0, 0.25)";
47459
- var standard = {
47460
- base: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 6px 0px ").concat(colorTwenty, ", inset 0px 1px 0px 0px ").concat(colorTen),
47461
- hover: "0px 1px 2px 0px ".concat(colorTwenty, ", 0px 4px 8px 0px ").concat(blackTwentyFive, ", 0px 6px 12px 0px ").concat(colorTen),
47462
- active: "0px 2px 8px 0px ".concat(colorTwenty, ", 0px 4px 8px 0px ").concat(colorThirty, ", 0px 6px 12px 0px ").concat(colorTwentyFive)
47463
- };
47464
- var inset = {
47465
- base: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 4px 0px ").concat(colorTwenty, ", inset 0px 1px 0px 0px ").concat(colorTen),
47466
- hover: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 4px 0px ").concat(colorTwentyFive, ", 0px 4px 8px 0px ").concat(colorTen),
47467
- active: "0px 1px 2px 2px ".concat(colorTwenty, ", 0px 3px 6px 0px ").concat(colorThirty, ", 0px 4px 8px 0px ").concat(colorTwenty)
47468
- };
47469
- var overlay = {
47470
- base: "0px 7px 32px 0px ".concat(colorTwenty, ", 0px 1px 4px 0px ").concat(colorTwenty, ", 0px 1px 8px -1px ").concat(colorThirty)
47471
- };
47472
- return {
47473
- standard: standard,
47474
- inset: inset,
47475
- overlay: overlay
47476
- };
47477
- };
47478
-
47479
47525
  /*
47480
47526
  Hook that takes an ID selector for an element on the screen
47481
47527
  And optionally values for top position, left position, smooth behavior