@thecb/components 7.12.2-beta.4 → 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 +95 -68
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +95 -68
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/alert/Alert.js +6 -2
- package/src/components/atoms/spinner/Spinner.js +26 -4
- package/src/components/molecules/payment-details/PaymentDetails.js +15 -4
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
|
|
@@ -25581,7 +25641,7 @@ var fallbackValues$q = {
|
|
|
25581
25641
|
var SpinnerSvgAnimation = styled__default.svg.withConfig({
|
|
25582
25642
|
displayName: "Spinner__SpinnerSvgAnimation",
|
|
25583
25643
|
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) {
|
|
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) {
|
|
25585
25645
|
var size = _ref.size;
|
|
25586
25646
|
return size;
|
|
25587
25647
|
}, function (_ref2) {
|
|
@@ -25590,19 +25650,36 @@ var SpinnerSvgAnimation = styled__default.svg.withConfig({
|
|
|
25590
25650
|
}, function (_ref3) {
|
|
25591
25651
|
var color = _ref3.color;
|
|
25592
25652
|
return color;
|
|
25653
|
+
}, function (_ref4) {
|
|
25654
|
+
var centerSpinner = _ref4.centerSpinner;
|
|
25655
|
+
return centerSpinner ? styled.css(["margin:0;"]) : "";
|
|
25593
25656
|
});
|
|
25594
25657
|
var SpinnerContainer$2 = styled__default.div.withConfig({
|
|
25595
25658
|
displayName: "Spinner__SpinnerContainer",
|
|
25596
25659
|
componentId: "sc-vhupl9-1"
|
|
25597
|
-
})(["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 ? styled.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
|
+
*/
|
|
25598
25669
|
|
|
25599
|
-
var Spinner$1 = function Spinner(
|
|
25600
|
-
var
|
|
25601
|
-
size =
|
|
25602
|
-
|
|
25603
|
-
|
|
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__default.createElement(SpinnerContainer$2, {
|
|
25677
|
+
centerSpinner: centerSpinner,
|
|
25678
|
+
size: size
|
|
25679
|
+
}, /*#__PURE__*/React__default.createElement(SpinnerSvgAnimation, {
|
|
25604
25680
|
size: size,
|
|
25605
|
-
color: themeValues.color
|
|
25681
|
+
color: themeValues.color,
|
|
25682
|
+
centerSpinner: centerSpinner
|
|
25606
25683
|
}, /*#__PURE__*/React__default.createElement("circle", {
|
|
25607
25684
|
className: "path",
|
|
25608
25685
|
cx: "50",
|
|
@@ -46987,7 +47064,7 @@ var PaymentDetailsContent = function PaymentDetailsContent(_ref) {
|
|
|
46987
47064
|
var LoadingDetails = function LoadingDetails() {
|
|
46988
47065
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
46989
47066
|
padding: "0",
|
|
46990
|
-
background:
|
|
47067
|
+
background: GRECIAN_GREY,
|
|
46991
47068
|
borderRadius: "4px",
|
|
46992
47069
|
minHeight: "196px"
|
|
46993
47070
|
}, /*#__PURE__*/React__default.createElement(Cover, {
|
|
@@ -46998,10 +47075,10 @@ var LoadingDetails = function LoadingDetails() {
|
|
|
46998
47075
|
intrinsic: true
|
|
46999
47076
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
47000
47077
|
padding: "0",
|
|
47001
|
-
|
|
47002
|
-
minWidth: "100px"
|
|
47078
|
+
extraStyles: "flex-grow: 1; display: flex; justify-content: center; align-items: center;"
|
|
47003
47079
|
}, /*#__PURE__*/React__default.createElement(Spinner$2, {
|
|
47004
|
-
size: "100"
|
|
47080
|
+
size: "100",
|
|
47081
|
+
centerSpinner: true
|
|
47005
47082
|
})))));
|
|
47006
47083
|
};
|
|
47007
47084
|
|
|
@@ -47012,7 +47089,10 @@ var ErrorDetails = function ErrorDetails() {
|
|
|
47012
47089
|
variant: "error",
|
|
47013
47090
|
heading: "Error Loading Payment",
|
|
47014
47091
|
text: "Please go back and try again.",
|
|
47015
|
-
showQuitLink: false
|
|
47092
|
+
showQuitLink: false,
|
|
47093
|
+
height: "67px",
|
|
47094
|
+
noBorder: true,
|
|
47095
|
+
enableBoxShadow: true
|
|
47016
47096
|
}));
|
|
47017
47097
|
};
|
|
47018
47098
|
|
|
@@ -47426,59 +47506,6 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
|
|
|
47426
47506
|
})))));
|
|
47427
47507
|
};
|
|
47428
47508
|
|
|
47429
|
-
/*
|
|
47430
|
-
|
|
47431
|
-
A utility function that can generate box-shadow values for components
|
|
47432
|
-
Takes a string representing an rgb color value and returns an object
|
|
47433
|
-
with values for standard, inset, and overlay shadows.
|
|
47434
|
-
|
|
47435
|
-
The objects for standard and inset shadows contain versions approiate
|
|
47436
|
-
for base, hover, and active interaction states.
|
|
47437
|
-
|
|
47438
|
-
*/
|
|
47439
|
-
|
|
47440
|
-
/*
|
|
47441
|
-
Function to convert string representing rgb color to rgba value with provided opacity
|
|
47442
|
-
("rgb(41, 42, 51)", "0.1") => "rgba(41, 42, 51, 0.1)"
|
|
47443
|
-
|
|
47444
|
-
*/
|
|
47445
|
-
var rgbToRgba = function rgbToRgba() {
|
|
47446
|
-
var rgbValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
47447
|
-
var opacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
47448
|
-
|
|
47449
|
-
if (typeof rgbValue !== "string" || typeof opacity !== "string" || rgbValue.charAt(0) === "#") {
|
|
47450
|
-
return "";
|
|
47451
|
-
}
|
|
47452
|
-
|
|
47453
|
-
return "".concat(rgbValue.slice(0, 3), "a").concat(rgbValue.slice(3, -1), ", ").concat(opacity).concat(rgbValue.slice(-1));
|
|
47454
|
-
};
|
|
47455
|
-
|
|
47456
|
-
var generateShadows = function generateShadows(baseColorRGB) {
|
|
47457
|
-
var colorTen = rgbToRgba(baseColorRGB, "0.1") || "rgba(41, 42, 51, 0.1)";
|
|
47458
|
-
var colorTwenty = rgbToRgba(baseColorRGB, "0.2") || "rgba(41, 42, 51, 0.2)";
|
|
47459
|
-
var colorTwentyFive = rgbToRgba(baseColorRGB, "0.25") || "rgba(41, 42, 51, 0.25)";
|
|
47460
|
-
var colorThirty = rgbToRgba(baseColorRGB, "0.3") || "rgba(41, 42, 51, 0.3)";
|
|
47461
|
-
var blackTwentyFive = "rgba(0, 0, 0, 0.25)";
|
|
47462
|
-
var standard = {
|
|
47463
|
-
base: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 6px 0px ").concat(colorTwenty, ", inset 0px 1px 0px 0px ").concat(colorTen),
|
|
47464
|
-
hover: "0px 1px 2px 0px ".concat(colorTwenty, ", 0px 4px 8px 0px ").concat(blackTwentyFive, ", 0px 6px 12px 0px ").concat(colorTen),
|
|
47465
|
-
active: "0px 2px 8px 0px ".concat(colorTwenty, ", 0px 4px 8px 0px ").concat(colorThirty, ", 0px 6px 12px 0px ").concat(colorTwentyFive)
|
|
47466
|
-
};
|
|
47467
|
-
var inset = {
|
|
47468
|
-
base: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 4px 0px ").concat(colorTwenty, ", inset 0px 1px 0px 0px ").concat(colorTen),
|
|
47469
|
-
hover: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 4px 0px ").concat(colorTwentyFive, ", 0px 4px 8px 0px ").concat(colorTen),
|
|
47470
|
-
active: "0px 1px 2px 2px ".concat(colorTwenty, ", 0px 3px 6px 0px ").concat(colorThirty, ", 0px 4px 8px 0px ").concat(colorTwenty)
|
|
47471
|
-
};
|
|
47472
|
-
var overlay = {
|
|
47473
|
-
base: "0px 7px 32px 0px ".concat(colorTwenty, ", 0px 1px 4px 0px ").concat(colorTwenty, ", 0px 1px 8px -1px ").concat(colorThirty)
|
|
47474
|
-
};
|
|
47475
|
-
return {
|
|
47476
|
-
standard: standard,
|
|
47477
|
-
inset: inset,
|
|
47478
|
-
overlay: overlay
|
|
47479
|
-
};
|
|
47480
|
-
};
|
|
47481
|
-
|
|
47482
47509
|
/*
|
|
47483
47510
|
Hook that takes an ID selector for an element on the screen
|
|
47484
47511
|
And optionally values for top position, left position, smooth behavior
|