@thecb/components 7.12.2-beta.0 → 7.12.2-beta.10

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,24 @@ 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;
17780
17846
  var Icon = AlertIcons[variant];
17847
+ var contentPadding = maxContentWidth ? "".concat(padding, " 1rem") : innerContentPadding;
17781
17848
  var content = /*#__PURE__*/React.createElement(Sidebar, {
17782
17849
  width: "24px",
17783
17850
  childGap: "0rem"
17784
17851
  }, /*#__PURE__*/React.createElement(Box, {
17785
- padding: "0 0 0 1rem",
17852
+ padding: iconPadding,
17786
17853
  minHeight: "100%"
17787
17854
  }, /*#__PURE__*/React.createElement(Cover, {
17788
17855
  minHeight: "100%",
@@ -17798,7 +17865,7 @@ var Alert = function Alert(_ref) {
17798
17865
  width: "24px",
17799
17866
  childGap: "0rem"
17800
17867
  }, /*#__PURE__*/React.createElement(Box, {
17801
- padding: maxContentWidth ? "".concat(padding, " 1rem") : "1rem"
17868
+ padding: contentPadding
17802
17869
  }, /*#__PURE__*/React.createElement(Cluster, {
17803
17870
  justify: "flex-start",
17804
17871
  align: "center"
@@ -17806,7 +17873,7 @@ var Alert = function Alert(_ref) {
17806
17873
  fullHeight: true,
17807
17874
  childGap: "0.25rem"
17808
17875
  }, /*#__PURE__*/React.createElement(Text$1, {
17809
- variant: "p",
17876
+ variant: enableSmallText ? "pS" : "p",
17810
17877
  color: themeValues.text,
17811
17878
  weight: "600"
17812
17879
  }, heading), /*#__PURE__*/React.createElement(Text$1, {
@@ -17828,7 +17895,8 @@ var Alert = function Alert(_ref) {
17828
17895
  background: themeValues.background,
17829
17896
  borderRadius: "4px",
17830
17897
  borderColor: themeValues.border,
17831
- borderSize: "1px",
17898
+ borderSize: noBorder ? "0px" : "1px",
17899
+ 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
17900
  extraStyles: extraStyles
17833
17901
  }, maxContentWidth ? /*#__PURE__*/React.createElement(Center, {
17834
17902
  maxWidth: maxContentWidth
@@ -25573,7 +25641,7 @@ var fallbackValues$q = {
25573
25641
  var SpinnerSvgAnimation = styled.svg.withConfig({
25574
25642
  displayName: "Spinner__SpinnerSvgAnimation",
25575
25643
  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) {
25644
+ })(["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
25645
  var size = _ref.size;
25578
25646
  return size;
25579
25647
  }, function (_ref2) {
@@ -25582,19 +25650,36 @@ var SpinnerSvgAnimation = styled.svg.withConfig({
25582
25650
  }, function (_ref3) {
25583
25651
  var color = _ref3.color;
25584
25652
  return color;
25653
+ }, function (_ref4) {
25654
+ var centerSpinner = _ref4.centerSpinner;
25655
+ return centerSpinner ? css(["margin:0;"]) : "";
25585
25656
  });
25586
25657
  var SpinnerContainer$2 = styled.div.withConfig({
25587
25658
  displayName: "Spinner__SpinnerContainer",
25588
25659
  componentId: "sc-vhupl9-1"
25589
- })(["width:100%;display:flex;flex-direction:row;align-items:center;justify-content:center;line-height:1;"]);
25660
+ })(["width:100%;display:flex;flex-direction:row;align-items:center;justify-content:center;line-height:1;", ""], function (_ref5) {
25661
+ var centerSpinner = _ref5.centerSpinner,
25662
+ size = _ref5.size;
25663
+ return centerSpinner ? css(["width:", "px;height:", "px;"], size, size) : "";
25664
+ });
25665
+ /*
25666
+ `centerSpinner` prop alters existing styling of spinner to allow it to properly center itself within
25667
+ containers. Default is false to preserve legacy behavior for past uses.
25668
+ */
25590
25669
 
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, {
25670
+ var Spinner$1 = function Spinner(_ref6) {
25671
+ var _ref6$size = _ref6.size,
25672
+ size = _ref6$size === void 0 ? "24" : _ref6$size,
25673
+ _ref6$centerSpinner = _ref6.centerSpinner,
25674
+ centerSpinner = _ref6$centerSpinner === void 0 ? false : _ref6$centerSpinner,
25675
+ themeValues = _ref6.themeValues;
25676
+ return /*#__PURE__*/React.createElement(SpinnerContainer$2, {
25677
+ centerSpinner: centerSpinner,
25678
+ size: size
25679
+ }, /*#__PURE__*/React.createElement(SpinnerSvgAnimation, {
25596
25680
  size: size,
25597
- color: themeValues.color
25681
+ color: themeValues.color,
25682
+ centerSpinner: centerSpinner
25598
25683
  }, /*#__PURE__*/React.createElement("circle", {
25599
25684
  className: "path",
25600
25685
  cx: "50",
@@ -46948,7 +47033,7 @@ var PaymentDetailsContent = function PaymentDetailsContent(_ref) {
46948
47033
  },
46949
47034
  text: "Void",
46950
47035
  padding: "0",
46951
- extraStyles: "\n min-width: 65px; \n margin: 0px;\n min-height: 0px;\n ",
47036
+ extraStyles: "\n min-width: 65px;\n margin: 0px;\n min-height: 0px;\n ",
46952
47037
  textExtraStyles: "font-weight: ".concat(FONT_WEIGHT_REGULAR, "; font-size: 14px;")
46953
47038
  })), /*#__PURE__*/React.createElement(Box, {
46954
47039
  padding: "0",
@@ -46979,9 +47064,22 @@ var PaymentDetailsContent = function PaymentDetailsContent(_ref) {
46979
47064
  var LoadingDetails = function LoadingDetails() {
46980
47065
  return /*#__PURE__*/React.createElement(Box, {
46981
47066
  padding: "0",
46982
- background: GHOST_GREY,
46983
- borderRadius: "4px"
46984
- }, /*#__PURE__*/React.createElement(Spinner$2, null));
47067
+ background: GRECIAN_GREY,
47068
+ borderRadius: "4px",
47069
+ minHeight: "196px"
47070
+ }, /*#__PURE__*/React.createElement(Cover, {
47071
+ minHeight: "196px",
47072
+ singleChild: true,
47073
+ fillCenter: true
47074
+ }, /*#__PURE__*/React.createElement(Center, {
47075
+ intrinsic: true
47076
+ }, /*#__PURE__*/React.createElement(Box, {
47077
+ padding: "0",
47078
+ extraStyles: "flex-grow: 1; display: flex; justify-content: center; align-items: center;"
47079
+ }, /*#__PURE__*/React.createElement(Spinner$2, {
47080
+ size: "100",
47081
+ centerSpinner: true
47082
+ })))));
46985
47083
  };
46986
47084
 
46987
47085
  var ErrorDetails = function ErrorDetails() {
@@ -46991,7 +47089,13 @@ var ErrorDetails = function ErrorDetails() {
46991
47089
  variant: "error",
46992
47090
  heading: "Error Loading Payment",
46993
47091
  text: "Please go back and try again.",
46994
- showQuitLink: false
47092
+ showQuitLink: false,
47093
+ noBorder: true,
47094
+ enableBoxShadow: true,
47095
+ enableSmallText: true,
47096
+ innerContentPadding: "0 1rem",
47097
+ extraStyles: "min-height: 67px; height: 67px;",
47098
+ iconPadding: "0 0 0 0.75rem"
46995
47099
  }));
46996
47100
  };
46997
47101
 
@@ -47405,59 +47509,6 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
47405
47509
  })))));
47406
47510
  };
47407
47511
 
47408
- /*
47409
-
47410
- A utility function that can generate box-shadow values for components
47411
- Takes a string representing an rgb color value and returns an object
47412
- with values for standard, inset, and overlay shadows.
47413
-
47414
- The objects for standard and inset shadows contain versions approiate
47415
- for base, hover, and active interaction states.
47416
-
47417
- */
47418
-
47419
- /*
47420
- Function to convert string representing rgb color to rgba value with provided opacity
47421
- ("rgb(41, 42, 51)", "0.1") => "rgba(41, 42, 51, 0.1)"
47422
-
47423
- */
47424
- var rgbToRgba = function rgbToRgba() {
47425
- var rgbValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
47426
- var opacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
47427
-
47428
- if (typeof rgbValue !== "string" || typeof opacity !== "string" || rgbValue.charAt(0) === "#") {
47429
- return "";
47430
- }
47431
-
47432
- return "".concat(rgbValue.slice(0, 3), "a").concat(rgbValue.slice(3, -1), ", ").concat(opacity).concat(rgbValue.slice(-1));
47433
- };
47434
-
47435
- var generateShadows = function generateShadows(baseColorRGB) {
47436
- var colorTen = rgbToRgba(baseColorRGB, "0.1") || "rgba(41, 42, 51, 0.1)";
47437
- var colorTwenty = rgbToRgba(baseColorRGB, "0.2") || "rgba(41, 42, 51, 0.2)";
47438
- var colorTwentyFive = rgbToRgba(baseColorRGB, "0.25") || "rgba(41, 42, 51, 0.25)";
47439
- var colorThirty = rgbToRgba(baseColorRGB, "0.3") || "rgba(41, 42, 51, 0.3)";
47440
- var blackTwentyFive = "rgba(0, 0, 0, 0.25)";
47441
- var standard = {
47442
- base: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 6px 0px ").concat(colorTwenty, ", inset 0px 1px 0px 0px ").concat(colorTen),
47443
- hover: "0px 1px 2px 0px ".concat(colorTwenty, ", 0px 4px 8px 0px ").concat(blackTwentyFive, ", 0px 6px 12px 0px ").concat(colorTen),
47444
- active: "0px 2px 8px 0px ".concat(colorTwenty, ", 0px 4px 8px 0px ").concat(colorThirty, ", 0px 6px 12px 0px ").concat(colorTwentyFive)
47445
- };
47446
- var inset = {
47447
- base: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 4px 0px ").concat(colorTwenty, ", inset 0px 1px 0px 0px ").concat(colorTen),
47448
- hover: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 4px 0px ").concat(colorTwentyFive, ", 0px 4px 8px 0px ").concat(colorTen),
47449
- active: "0px 1px 2px 2px ".concat(colorTwenty, ", 0px 3px 6px 0px ").concat(colorThirty, ", 0px 4px 8px 0px ").concat(colorTwenty)
47450
- };
47451
- var overlay = {
47452
- base: "0px 7px 32px 0px ".concat(colorTwenty, ", 0px 1px 4px 0px ").concat(colorTwenty, ", 0px 1px 8px -1px ").concat(colorThirty)
47453
- };
47454
- return {
47455
- standard: standard,
47456
- inset: inset,
47457
- overlay: overlay
47458
- };
47459
- };
47460
-
47461
47512
  /*
47462
47513
  Hook that takes an ID selector for an element on the screen
47463
47514
  And optionally values for top position, left position, smooth behavior