@thecb/components 7.12.2-beta.5 → 7.12.2-beta.6
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,62 @@ 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(baseColorRGB) {
|
|
17793
|
+
var colorTen = rgbToRgba(baseColorRGB, "0.1") || "rgba(41, 42, 51, 0.1)";
|
|
17794
|
+
var colorTwenty = rgbToRgba(baseColorRGB, "0.2") || "rgba(41, 42, 51, 0.2)";
|
|
17795
|
+
var colorTwentyFive = rgbToRgba(baseColorRGB, "0.25") || "rgba(41, 42, 51, 0.25)";
|
|
17796
|
+
var colorThirty = rgbToRgba(baseColorRGB, "0.3") || "rgba(41, 42, 51, 0.3)";
|
|
17797
|
+
var blackTwentyFive = "rgba(0, 0, 0, 0.25)";
|
|
17798
|
+
var standard = {
|
|
17799
|
+
base: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 6px 0px ").concat(colorTwenty, ", inset 0px 1px 0px 0px ").concat(colorTen),
|
|
17800
|
+
hover: "0px 1px 2px 0px ".concat(colorTwenty, ", 0px 4px 8px 0px ").concat(blackTwentyFive, ", 0px 6px 12px 0px ").concat(colorTen),
|
|
17801
|
+
active: "0px 2px 8px 0px ".concat(colorTwenty, ", 0px 4px 8px 0px ").concat(colorThirty, ", 0px 6px 12px 0px ").concat(colorTwentyFive)
|
|
17802
|
+
};
|
|
17803
|
+
var inset = {
|
|
17804
|
+
base: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 4px 0px ").concat(colorTwenty, ", inset 0px 1px 0px 0px ").concat(colorTen),
|
|
17805
|
+
hover: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 4px 0px ").concat(colorTwentyFive, ", 0px 4px 8px 0px ").concat(colorTen),
|
|
17806
|
+
active: "0px 1px 2px 2px ".concat(colorTwenty, ", 0px 3px 6px 0px ").concat(colorThirty, ", 0px 4px 8px 0px ").concat(colorTwenty)
|
|
17807
|
+
};
|
|
17808
|
+
var overlay = {
|
|
17809
|
+
base: "0px 7px 32px 0px ".concat(colorTwenty, ", 0px 1px 4px 0px ").concat(colorTwenty, ", 0px 1px 8px -1px ").concat(colorThirty)
|
|
17810
|
+
};
|
|
17811
|
+
return {
|
|
17812
|
+
standard: standard,
|
|
17813
|
+
inset: inset,
|
|
17814
|
+
overlay: overlay
|
|
17815
|
+
};
|
|
17816
|
+
};
|
|
17817
|
+
|
|
17765
17818
|
var Alert = function Alert(_ref) {
|
|
17819
|
+
var _generateShadows, _generateShadows$inse;
|
|
17820
|
+
|
|
17766
17821
|
var heading = _ref.heading,
|
|
17767
17822
|
text = _ref.text,
|
|
17768
17823
|
textOverride = _ref.textOverride,
|
|
@@ -17776,7 +17831,11 @@ var Alert = function Alert(_ref) {
|
|
|
17776
17831
|
showQuitLink = _ref$showQuitLink === void 0 ? true : _ref$showQuitLink,
|
|
17777
17832
|
themeValues = _ref.themeValues,
|
|
17778
17833
|
extraStyles = _ref.extraStyles,
|
|
17779
|
-
maxContentWidth = _ref.maxContentWidth
|
|
17834
|
+
maxContentWidth = _ref.maxContentWidth,
|
|
17835
|
+
_ref$noBorder = _ref.noBorder,
|
|
17836
|
+
noBorder = _ref$noBorder === void 0 ? false : _ref$noBorder,
|
|
17837
|
+
_ref$enableBoxShadow = _ref.enableBoxShadow,
|
|
17838
|
+
enableBoxShadow = _ref$enableBoxShadow === void 0 ? false : _ref$enableBoxShadow;
|
|
17780
17839
|
var Icon = AlertIcons[variant];
|
|
17781
17840
|
var content = /*#__PURE__*/React.createElement(Sidebar, {
|
|
17782
17841
|
width: "24px",
|
|
@@ -17828,7 +17887,8 @@ var Alert = function Alert(_ref) {
|
|
|
17828
17887
|
background: themeValues.background,
|
|
17829
17888
|
borderRadius: "4px",
|
|
17830
17889
|
borderColor: themeValues.border,
|
|
17831
|
-
borderSize: "1px",
|
|
17890
|
+
borderSize: noBorder ? "0px" : "1px",
|
|
17891
|
+
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
17892
|
extraStyles: extraStyles
|
|
17833
17893
|
}, maxContentWidth ? /*#__PURE__*/React.createElement(Center, {
|
|
17834
17894
|
maxWidth: maxContentWidth
|
|
@@ -46996,7 +47056,7 @@ var PaymentDetailsContent = function PaymentDetailsContent(_ref) {
|
|
|
46996
47056
|
var LoadingDetails = function LoadingDetails() {
|
|
46997
47057
|
return /*#__PURE__*/React.createElement(Box, {
|
|
46998
47058
|
padding: "0",
|
|
46999
|
-
background:
|
|
47059
|
+
background: GRECIAN_GREY,
|
|
47000
47060
|
borderRadius: "4px",
|
|
47001
47061
|
minHeight: "196px"
|
|
47002
47062
|
}, /*#__PURE__*/React.createElement(Cover, {
|
|
@@ -47021,7 +47081,10 @@ var ErrorDetails = function ErrorDetails() {
|
|
|
47021
47081
|
variant: "error",
|
|
47022
47082
|
heading: "Error Loading Payment",
|
|
47023
47083
|
text: "Please go back and try again.",
|
|
47024
|
-
showQuitLink: false
|
|
47084
|
+
showQuitLink: false,
|
|
47085
|
+
height: "67px",
|
|
47086
|
+
noBorder: true,
|
|
47087
|
+
enableBoxShadow: true
|
|
47025
47088
|
}));
|
|
47026
47089
|
};
|
|
47027
47090
|
|
|
@@ -47435,59 +47498,6 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
|
|
|
47435
47498
|
})))));
|
|
47436
47499
|
};
|
|
47437
47500
|
|
|
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
47501
|
/*
|
|
47492
47502
|
Hook that takes an ID selector for an element on the screen
|
|
47493
47503
|
And optionally values for top position, left position, smooth behavior
|