@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.cjs.js
CHANGED
|
@@ -17770,7 +17770,62 @@ 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(baseColorRGB) {
|
|
17801
|
+
var colorTen = rgbToRgba(baseColorRGB, "0.1") || "rgba(41, 42, 51, 0.1)";
|
|
17802
|
+
var colorTwenty = rgbToRgba(baseColorRGB, "0.2") || "rgba(41, 42, 51, 0.2)";
|
|
17803
|
+
var colorTwentyFive = rgbToRgba(baseColorRGB, "0.25") || "rgba(41, 42, 51, 0.25)";
|
|
17804
|
+
var colorThirty = rgbToRgba(baseColorRGB, "0.3") || "rgba(41, 42, 51, 0.3)";
|
|
17805
|
+
var blackTwentyFive = "rgba(0, 0, 0, 0.25)";
|
|
17806
|
+
var standard = {
|
|
17807
|
+
base: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 6px 0px ").concat(colorTwenty, ", inset 0px 1px 0px 0px ").concat(colorTen),
|
|
17808
|
+
hover: "0px 1px 2px 0px ".concat(colorTwenty, ", 0px 4px 8px 0px ").concat(blackTwentyFive, ", 0px 6px 12px 0px ").concat(colorTen),
|
|
17809
|
+
active: "0px 2px 8px 0px ".concat(colorTwenty, ", 0px 4px 8px 0px ").concat(colorThirty, ", 0px 6px 12px 0px ").concat(colorTwentyFive)
|
|
17810
|
+
};
|
|
17811
|
+
var inset = {
|
|
17812
|
+
base: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 4px 0px ").concat(colorTwenty, ", inset 0px 1px 0px 0px ").concat(colorTen),
|
|
17813
|
+
hover: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 4px 0px ").concat(colorTwentyFive, ", 0px 4px 8px 0px ").concat(colorTen),
|
|
17814
|
+
active: "0px 1px 2px 2px ".concat(colorTwenty, ", 0px 3px 6px 0px ").concat(colorThirty, ", 0px 4px 8px 0px ").concat(colorTwenty)
|
|
17815
|
+
};
|
|
17816
|
+
var overlay = {
|
|
17817
|
+
base: "0px 7px 32px 0px ".concat(colorTwenty, ", 0px 1px 4px 0px ").concat(colorTwenty, ", 0px 1px 8px -1px ").concat(colorThirty)
|
|
17818
|
+
};
|
|
17819
|
+
return {
|
|
17820
|
+
standard: standard,
|
|
17821
|
+
inset: inset,
|
|
17822
|
+
overlay: overlay
|
|
17823
|
+
};
|
|
17824
|
+
};
|
|
17825
|
+
|
|
17773
17826
|
var Alert = function Alert(_ref) {
|
|
17827
|
+
var _generateShadows, _generateShadows$inse;
|
|
17828
|
+
|
|
17774
17829
|
var heading = _ref.heading,
|
|
17775
17830
|
text = _ref.text,
|
|
17776
17831
|
textOverride = _ref.textOverride,
|
|
@@ -17784,7 +17839,11 @@ var Alert = function Alert(_ref) {
|
|
|
17784
17839
|
showQuitLink = _ref$showQuitLink === void 0 ? true : _ref$showQuitLink,
|
|
17785
17840
|
themeValues = _ref.themeValues,
|
|
17786
17841
|
extraStyles = _ref.extraStyles,
|
|
17787
|
-
maxContentWidth = _ref.maxContentWidth
|
|
17842
|
+
maxContentWidth = _ref.maxContentWidth,
|
|
17843
|
+
_ref$noBorder = _ref.noBorder,
|
|
17844
|
+
noBorder = _ref$noBorder === void 0 ? false : _ref$noBorder,
|
|
17845
|
+
_ref$enableBoxShadow = _ref.enableBoxShadow,
|
|
17846
|
+
enableBoxShadow = _ref$enableBoxShadow === void 0 ? false : _ref$enableBoxShadow;
|
|
17788
17847
|
var Icon = AlertIcons[variant];
|
|
17789
17848
|
var content = /*#__PURE__*/React__default.createElement(Sidebar, {
|
|
17790
17849
|
width: "24px",
|
|
@@ -17836,7 +17895,8 @@ var Alert = function Alert(_ref) {
|
|
|
17836
17895
|
background: themeValues.background,
|
|
17837
17896
|
borderRadius: "4px",
|
|
17838
17897
|
borderColor: themeValues.border,
|
|
17839
|
-
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 : "",
|
|
17840
17900
|
extraStyles: extraStyles
|
|
17841
17901
|
}, maxContentWidth ? /*#__PURE__*/React__default.createElement(Center, {
|
|
17842
17902
|
maxWidth: maxContentWidth
|
|
@@ -47004,7 +47064,7 @@ var PaymentDetailsContent = function PaymentDetailsContent(_ref) {
|
|
|
47004
47064
|
var LoadingDetails = function LoadingDetails() {
|
|
47005
47065
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
47006
47066
|
padding: "0",
|
|
47007
|
-
background:
|
|
47067
|
+
background: GRECIAN_GREY,
|
|
47008
47068
|
borderRadius: "4px",
|
|
47009
47069
|
minHeight: "196px"
|
|
47010
47070
|
}, /*#__PURE__*/React__default.createElement(Cover, {
|
|
@@ -47029,7 +47089,10 @@ var ErrorDetails = function ErrorDetails() {
|
|
|
47029
47089
|
variant: "error",
|
|
47030
47090
|
heading: "Error Loading Payment",
|
|
47031
47091
|
text: "Please go back and try again.",
|
|
47032
|
-
showQuitLink: false
|
|
47092
|
+
showQuitLink: false,
|
|
47093
|
+
height: "67px",
|
|
47094
|
+
noBorder: true,
|
|
47095
|
+
enableBoxShadow: true
|
|
47033
47096
|
}));
|
|
47034
47097
|
};
|
|
47035
47098
|
|
|
@@ -47443,59 +47506,6 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
|
|
|
47443
47506
|
})))));
|
|
47444
47507
|
};
|
|
47445
47508
|
|
|
47446
|
-
/*
|
|
47447
|
-
|
|
47448
|
-
A utility function that can generate box-shadow values for components
|
|
47449
|
-
Takes a string representing an rgb color value and returns an object
|
|
47450
|
-
with values for standard, inset, and overlay shadows.
|
|
47451
|
-
|
|
47452
|
-
The objects for standard and inset shadows contain versions approiate
|
|
47453
|
-
for base, hover, and active interaction states.
|
|
47454
|
-
|
|
47455
|
-
*/
|
|
47456
|
-
|
|
47457
|
-
/*
|
|
47458
|
-
Function to convert string representing rgb color to rgba value with provided opacity
|
|
47459
|
-
("rgb(41, 42, 51)", "0.1") => "rgba(41, 42, 51, 0.1)"
|
|
47460
|
-
|
|
47461
|
-
*/
|
|
47462
|
-
var rgbToRgba = function rgbToRgba() {
|
|
47463
|
-
var rgbValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
47464
|
-
var opacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
47465
|
-
|
|
47466
|
-
if (typeof rgbValue !== "string" || typeof opacity !== "string" || rgbValue.charAt(0) === "#") {
|
|
47467
|
-
return "";
|
|
47468
|
-
}
|
|
47469
|
-
|
|
47470
|
-
return "".concat(rgbValue.slice(0, 3), "a").concat(rgbValue.slice(3, -1), ", ").concat(opacity).concat(rgbValue.slice(-1));
|
|
47471
|
-
};
|
|
47472
|
-
|
|
47473
|
-
var generateShadows = function generateShadows(baseColorRGB) {
|
|
47474
|
-
var colorTen = rgbToRgba(baseColorRGB, "0.1") || "rgba(41, 42, 51, 0.1)";
|
|
47475
|
-
var colorTwenty = rgbToRgba(baseColorRGB, "0.2") || "rgba(41, 42, 51, 0.2)";
|
|
47476
|
-
var colorTwentyFive = rgbToRgba(baseColorRGB, "0.25") || "rgba(41, 42, 51, 0.25)";
|
|
47477
|
-
var colorThirty = rgbToRgba(baseColorRGB, "0.3") || "rgba(41, 42, 51, 0.3)";
|
|
47478
|
-
var blackTwentyFive = "rgba(0, 0, 0, 0.25)";
|
|
47479
|
-
var standard = {
|
|
47480
|
-
base: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 6px 0px ").concat(colorTwenty, ", inset 0px 1px 0px 0px ").concat(colorTen),
|
|
47481
|
-
hover: "0px 1px 2px 0px ".concat(colorTwenty, ", 0px 4px 8px 0px ").concat(blackTwentyFive, ", 0px 6px 12px 0px ").concat(colorTen),
|
|
47482
|
-
active: "0px 2px 8px 0px ".concat(colorTwenty, ", 0px 4px 8px 0px ").concat(colorThirty, ", 0px 6px 12px 0px ").concat(colorTwentyFive)
|
|
47483
|
-
};
|
|
47484
|
-
var inset = {
|
|
47485
|
-
base: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 4px 0px ").concat(colorTwenty, ", inset 0px 1px 0px 0px ").concat(colorTen),
|
|
47486
|
-
hover: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 4px 0px ").concat(colorTwentyFive, ", 0px 4px 8px 0px ").concat(colorTen),
|
|
47487
|
-
active: "0px 1px 2px 2px ".concat(colorTwenty, ", 0px 3px 6px 0px ").concat(colorThirty, ", 0px 4px 8px 0px ").concat(colorTwenty)
|
|
47488
|
-
};
|
|
47489
|
-
var overlay = {
|
|
47490
|
-
base: "0px 7px 32px 0px ".concat(colorTwenty, ", 0px 1px 4px 0px ").concat(colorTwenty, ", 0px 1px 8px -1px ").concat(colorThirty)
|
|
47491
|
-
};
|
|
47492
|
-
return {
|
|
47493
|
-
standard: standard,
|
|
47494
|
-
inset: inset,
|
|
47495
|
-
overlay: overlay
|
|
47496
|
-
};
|
|
47497
|
-
};
|
|
47498
|
-
|
|
47499
47509
|
/*
|
|
47500
47510
|
Hook that takes an ID selector for an element on the screen
|
|
47501
47511
|
And optionally values for top position, left position, smooth behavior
|