@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.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
|
|
@@ -25573,7 +25633,7 @@ var fallbackValues$q = {
|
|
|
25573
25633
|
var SpinnerSvgAnimation = styled.svg.withConfig({
|
|
25574
25634
|
displayName: "Spinner__SpinnerSvgAnimation",
|
|
25575
25635
|
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) {
|
|
25636
|
+
})(["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
25637
|
var size = _ref.size;
|
|
25578
25638
|
return size;
|
|
25579
25639
|
}, function (_ref2) {
|
|
@@ -25582,19 +25642,36 @@ var SpinnerSvgAnimation = styled.svg.withConfig({
|
|
|
25582
25642
|
}, function (_ref3) {
|
|
25583
25643
|
var color = _ref3.color;
|
|
25584
25644
|
return color;
|
|
25645
|
+
}, function (_ref4) {
|
|
25646
|
+
var centerSpinner = _ref4.centerSpinner;
|
|
25647
|
+
return centerSpinner ? css(["margin:0;"]) : "";
|
|
25585
25648
|
});
|
|
25586
25649
|
var SpinnerContainer$2 = styled.div.withConfig({
|
|
25587
25650
|
displayName: "Spinner__SpinnerContainer",
|
|
25588
25651
|
componentId: "sc-vhupl9-1"
|
|
25589
|
-
})(["width:100%;display:flex;flex-direction:row;align-items:center;justify-content:center;line-height:1;"])
|
|
25652
|
+
})(["width:100%;display:flex;flex-direction:row;align-items:center;justify-content:center;line-height:1;", ""], function (_ref5) {
|
|
25653
|
+
var centerSpinner = _ref5.centerSpinner,
|
|
25654
|
+
size = _ref5.size;
|
|
25655
|
+
return centerSpinner ? css(["width:", "px;height:", "px;"], size, size) : "";
|
|
25656
|
+
});
|
|
25657
|
+
/*
|
|
25658
|
+
`centerSpinner` prop alters existing styling of spinner to allow it to properly center itself within
|
|
25659
|
+
containers. Default is false to preserve legacy behavior for past uses.
|
|
25660
|
+
*/
|
|
25590
25661
|
|
|
25591
|
-
var Spinner$1 = function Spinner(
|
|
25592
|
-
var
|
|
25593
|
-
size =
|
|
25594
|
-
|
|
25595
|
-
|
|
25662
|
+
var Spinner$1 = function Spinner(_ref6) {
|
|
25663
|
+
var _ref6$size = _ref6.size,
|
|
25664
|
+
size = _ref6$size === void 0 ? "24" : _ref6$size,
|
|
25665
|
+
_ref6$centerSpinner = _ref6.centerSpinner,
|
|
25666
|
+
centerSpinner = _ref6$centerSpinner === void 0 ? false : _ref6$centerSpinner,
|
|
25667
|
+
themeValues = _ref6.themeValues;
|
|
25668
|
+
return /*#__PURE__*/React.createElement(SpinnerContainer$2, {
|
|
25669
|
+
centerSpinner: centerSpinner,
|
|
25670
|
+
size: size
|
|
25671
|
+
}, /*#__PURE__*/React.createElement(SpinnerSvgAnimation, {
|
|
25596
25672
|
size: size,
|
|
25597
|
-
color: themeValues.color
|
|
25673
|
+
color: themeValues.color,
|
|
25674
|
+
centerSpinner: centerSpinner
|
|
25598
25675
|
}, /*#__PURE__*/React.createElement("circle", {
|
|
25599
25676
|
className: "path",
|
|
25600
25677
|
cx: "50",
|
|
@@ -46979,7 +47056,7 @@ var PaymentDetailsContent = function PaymentDetailsContent(_ref) {
|
|
|
46979
47056
|
var LoadingDetails = function LoadingDetails() {
|
|
46980
47057
|
return /*#__PURE__*/React.createElement(Box, {
|
|
46981
47058
|
padding: "0",
|
|
46982
|
-
background:
|
|
47059
|
+
background: GRECIAN_GREY,
|
|
46983
47060
|
borderRadius: "4px",
|
|
46984
47061
|
minHeight: "196px"
|
|
46985
47062
|
}, /*#__PURE__*/React.createElement(Cover, {
|
|
@@ -46990,10 +47067,10 @@ var LoadingDetails = function LoadingDetails() {
|
|
|
46990
47067
|
intrinsic: true
|
|
46991
47068
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
46992
47069
|
padding: "0",
|
|
46993
|
-
|
|
46994
|
-
minWidth: "100px"
|
|
47070
|
+
extraStyles: "flex-grow: 1; display: flex; justify-content: center; align-items: center;"
|
|
46995
47071
|
}, /*#__PURE__*/React.createElement(Spinner$2, {
|
|
46996
|
-
size: "100"
|
|
47072
|
+
size: "100",
|
|
47073
|
+
centerSpinner: true
|
|
46997
47074
|
})))));
|
|
46998
47075
|
};
|
|
46999
47076
|
|
|
@@ -47004,7 +47081,10 @@ var ErrorDetails = function ErrorDetails() {
|
|
|
47004
47081
|
variant: "error",
|
|
47005
47082
|
heading: "Error Loading Payment",
|
|
47006
47083
|
text: "Please go back and try again.",
|
|
47007
|
-
showQuitLink: false
|
|
47084
|
+
showQuitLink: false,
|
|
47085
|
+
height: "67px",
|
|
47086
|
+
noBorder: true,
|
|
47087
|
+
enableBoxShadow: true
|
|
47008
47088
|
}));
|
|
47009
47089
|
};
|
|
47010
47090
|
|
|
@@ -47418,59 +47498,6 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
|
|
|
47418
47498
|
})))));
|
|
47419
47499
|
};
|
|
47420
47500
|
|
|
47421
|
-
/*
|
|
47422
|
-
|
|
47423
|
-
A utility function that can generate box-shadow values for components
|
|
47424
|
-
Takes a string representing an rgb color value and returns an object
|
|
47425
|
-
with values for standard, inset, and overlay shadows.
|
|
47426
|
-
|
|
47427
|
-
The objects for standard and inset shadows contain versions approiate
|
|
47428
|
-
for base, hover, and active interaction states.
|
|
47429
|
-
|
|
47430
|
-
*/
|
|
47431
|
-
|
|
47432
|
-
/*
|
|
47433
|
-
Function to convert string representing rgb color to rgba value with provided opacity
|
|
47434
|
-
("rgb(41, 42, 51)", "0.1") => "rgba(41, 42, 51, 0.1)"
|
|
47435
|
-
|
|
47436
|
-
*/
|
|
47437
|
-
var rgbToRgba = function rgbToRgba() {
|
|
47438
|
-
var rgbValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
47439
|
-
var opacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
47440
|
-
|
|
47441
|
-
if (typeof rgbValue !== "string" || typeof opacity !== "string" || rgbValue.charAt(0) === "#") {
|
|
47442
|
-
return "";
|
|
47443
|
-
}
|
|
47444
|
-
|
|
47445
|
-
return "".concat(rgbValue.slice(0, 3), "a").concat(rgbValue.slice(3, -1), ", ").concat(opacity).concat(rgbValue.slice(-1));
|
|
47446
|
-
};
|
|
47447
|
-
|
|
47448
|
-
var generateShadows = function generateShadows(baseColorRGB) {
|
|
47449
|
-
var colorTen = rgbToRgba(baseColorRGB, "0.1") || "rgba(41, 42, 51, 0.1)";
|
|
47450
|
-
var colorTwenty = rgbToRgba(baseColorRGB, "0.2") || "rgba(41, 42, 51, 0.2)";
|
|
47451
|
-
var colorTwentyFive = rgbToRgba(baseColorRGB, "0.25") || "rgba(41, 42, 51, 0.25)";
|
|
47452
|
-
var colorThirty = rgbToRgba(baseColorRGB, "0.3") || "rgba(41, 42, 51, 0.3)";
|
|
47453
|
-
var blackTwentyFive = "rgba(0, 0, 0, 0.25)";
|
|
47454
|
-
var standard = {
|
|
47455
|
-
base: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 6px 0px ").concat(colorTwenty, ", inset 0px 1px 0px 0px ").concat(colorTen),
|
|
47456
|
-
hover: "0px 1px 2px 0px ".concat(colorTwenty, ", 0px 4px 8px 0px ").concat(blackTwentyFive, ", 0px 6px 12px 0px ").concat(colorTen),
|
|
47457
|
-
active: "0px 2px 8px 0px ".concat(colorTwenty, ", 0px 4px 8px 0px ").concat(colorThirty, ", 0px 6px 12px 0px ").concat(colorTwentyFive)
|
|
47458
|
-
};
|
|
47459
|
-
var inset = {
|
|
47460
|
-
base: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 4px 0px ").concat(colorTwenty, ", inset 0px 1px 0px 0px ").concat(colorTen),
|
|
47461
|
-
hover: "0px 1px 2px 0px ".concat(colorTen, ", 0px 2px 4px 0px ").concat(colorTwentyFive, ", 0px 4px 8px 0px ").concat(colorTen),
|
|
47462
|
-
active: "0px 1px 2px 2px ".concat(colorTwenty, ", 0px 3px 6px 0px ").concat(colorThirty, ", 0px 4px 8px 0px ").concat(colorTwenty)
|
|
47463
|
-
};
|
|
47464
|
-
var overlay = {
|
|
47465
|
-
base: "0px 7px 32px 0px ".concat(colorTwenty, ", 0px 1px 4px 0px ").concat(colorTwenty, ", 0px 1px 8px -1px ").concat(colorThirty)
|
|
47466
|
-
};
|
|
47467
|
-
return {
|
|
47468
|
-
standard: standard,
|
|
47469
|
-
inset: inset,
|
|
47470
|
-
overlay: overlay
|
|
47471
|
-
};
|
|
47472
|
-
};
|
|
47473
|
-
|
|
47474
47501
|
/*
|
|
47475
47502
|
Hook that takes an ID selector for an element on the screen
|
|
47476
47503
|
And optionally values for top position, left position, smooth behavior
|