@thecb/components 4.0.13 → 4.0.15-beta.0
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 +35 -26
- package/package.json +1 -1
- package/src/components/atoms/button-with-action/ButtonWithAction.js +1 -0
- package/src/components/atoms/button-with-link/ButtonWithLink.js +2 -1
- package/src/components/atoms/layouts/examples/sidebar-example/SidebarExample.js +1 -1
- package/src/components/molecules/collapsible-section/CollapsibleSection.js +3 -2
- package/src/components/molecules/collapsible-section/CollapsibleSection.theme.js +1 -3
- package/src/components/molecules/payment-details/PaymentDetails.js +8 -4
- package/src/components/molecules/reset-confirmation-form/ResetConfirmationForm.js +1 -0
- package/src/components/molecules/reset-password-success/ResetPasswordSuccess.js +1 -0
- package/src/components/molecules/welcome-module/WelcomeModule.js +1 -1
- package/src/components/templates/sidebar-single-content/SidebarSingleContent.js +1 -1
- package/src/components/templates/sidebar-stack-content/SidebarStackContent.js +1 -1
- package/.tool-versions +0 -1
package/dist/index.cjs.js
CHANGED
|
@@ -12633,7 +12633,7 @@ var ButtonWithAction = function ButtonWithAction(_ref) {
|
|
|
12633
12633
|
var themeContext = React.useContext(styled.ThemeContext);
|
|
12634
12634
|
var themeValues = createThemeValues(themeContext, fallbackValues$1, "Button", variant);
|
|
12635
12635
|
var loadingExtraStyles = "".concat(extraStyles, "; padding-top: 0.75rem; padding-bottom: 0.75rem; height: ").concat(themeContext.isMobile ? "50px" : "57px", " ");
|
|
12636
|
-
var hoverStyles = "\n outline: none;\n background-color: ".concat(themeValues.hoverBackgroundColor, ";\n border-color: ").concat(themeValues.hoverBorderColor, ";\n color: ").concat(themeValues.hoverColor, ";\n text-decoration: ").concat(variant === "ghost" || variant === "smallGhost" ? "underline" : "none", ";\n ");
|
|
12636
|
+
var hoverStyles = "\n outline: none;\n background-color: ".concat(themeValues.hoverBackgroundColor, ";\n border-color: ").concat(themeValues.hoverBorderColor, ";\n color: ").concat(themeValues.hoverColor, ";\n text-decoration: ").concat(variant === "ghost" || variant === "smallGhost" ? "underline" : "none", ";\n cursor: pointer;\n ");
|
|
12637
12637
|
var activeStyles = "\n outline: none;\n background-color: ".concat(themeValues.activeBackgroundColor, ";\n border-color: ").concat(themeValues.activeBorderColor, ";\n color: ").concat(themeValues.activeColor, ";\n text-decoration: ").concat(variant === "ghost" || variant === "smallGhost" ? "underline" : "none", ";\n ");
|
|
12638
12638
|
var disabledStyles = "\n background-clor: #6E727E;\n border-color: #6E727E;\n color: #FFFFFF;\n &:focus {\n box-shadow: 0 0 10px #6E727E;\n outline: none;\n }\n ";
|
|
12639
12639
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -16293,9 +16293,10 @@ var ButtonWithLink = function ButtonWithLink(_ref) {
|
|
|
16293
16293
|
_ref$fileLink = _ref.fileLink,
|
|
16294
16294
|
fileLink = _ref$fileLink === void 0 ? false : _ref$fileLink,
|
|
16295
16295
|
extraStyles = _ref.extraStyles,
|
|
16296
|
+
linkExtraStyles = _ref.linkExtraStyles,
|
|
16296
16297
|
_ref$newTab = _ref.newTab,
|
|
16297
16298
|
newTab = _ref$newTab === void 0 ? false : _ref$newTab,
|
|
16298
|
-
otherProps = _objectWithoutProperties(_ref, ["url", "disabled", "fileLink", "extraStyles", "newTab"]);
|
|
16299
|
+
otherProps = _objectWithoutProperties(_ref, ["url", "disabled", "fileLink", "extraStyles", "linkExtraStyles", "newTab"]);
|
|
16299
16300
|
|
|
16300
16301
|
var ButtonWithLinkWrapper = function ButtonWithLinkWrapper(_ref2) {
|
|
16301
16302
|
var children = _ref2.children,
|
|
@@ -16324,7 +16325,7 @@ var ButtonWithLink = function ButtonWithLink(_ref) {
|
|
|
16324
16325
|
url: url,
|
|
16325
16326
|
disabled: disabled,
|
|
16326
16327
|
newTab: newTab,
|
|
16327
|
-
extraStyles: "text-decoration: none; &:hover {\n text-decoration: none; }"
|
|
16328
|
+
extraStyles: "".concat(linkExtraStyles, " text-decoration: none; &:hover {\n text-decoration: none; }")
|
|
16328
16329
|
}, /*#__PURE__*/React__default.createElement(ButtonWithAction, _extends({}, otherProps, {
|
|
16329
16330
|
extraStyles: extraStyles
|
|
16330
16331
|
})));
|
|
@@ -19916,9 +19917,7 @@ var ERRORS = {
|
|
|
19916
19917
|
"71": "Passed invalid pixel value %s to %s(), please pass a value like \"12px\" or 12.\n\n",
|
|
19917
19918
|
"72": "Passed invalid base value %s to %s(), please pass a value like \"12px\" or 12.\n\n",
|
|
19918
19919
|
"73": "Please provide a valid CSS variable.\n\n",
|
|
19919
|
-
"74": "CSS variable not found
|
|
19920
|
-
"75": "important requires a valid style object, got a %s instead.\n\n",
|
|
19921
|
-
"76": "fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.\n"
|
|
19920
|
+
"74": "CSS variable not found.\n"
|
|
19922
19921
|
};
|
|
19923
19922
|
/**
|
|
19924
19923
|
* super basic version of sprintf
|
|
@@ -33396,12 +33395,10 @@ ChangePasswordForm.mapDispatchToProps = mapDispatchToProps$1;
|
|
|
33396
33395
|
var titleColor = "#292A33";
|
|
33397
33396
|
var headingBackgroundColor = "transparent";
|
|
33398
33397
|
var bodyBackgroundColor = "transparent";
|
|
33399
|
-
var focusStyles = "outline: none;";
|
|
33400
33398
|
var fallbackValues$q = {
|
|
33401
33399
|
titleColor: titleColor,
|
|
33402
33400
|
headingBackgroundColor: headingBackgroundColor,
|
|
33403
|
-
bodyBackgroundColor: bodyBackgroundColor
|
|
33404
|
-
focusStyles: focusStyles
|
|
33401
|
+
bodyBackgroundColor: bodyBackgroundColor
|
|
33405
33402
|
};
|
|
33406
33403
|
|
|
33407
33404
|
var CollapsibleSection = function CollapsibleSection(_ref) {
|
|
@@ -33459,7 +33456,7 @@ var CollapsibleSection = function CollapsibleSection(_ref) {
|
|
|
33459
33456
|
padding: "0",
|
|
33460
33457
|
tabIndex: "0",
|
|
33461
33458
|
onKeyDown: handleKeyDown,
|
|
33462
|
-
hoverStyles:
|
|
33459
|
+
hoverStyles: "outline: none;",
|
|
33463
33460
|
animate: isOpen ? "open" : "closed",
|
|
33464
33461
|
positionTransition: true
|
|
33465
33462
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
@@ -33469,7 +33466,8 @@ var CollapsibleSection = function CollapsibleSection(_ref) {
|
|
|
33469
33466
|
background: themeValues.headingBackgroundColor,
|
|
33470
33467
|
onClick: isMobile && supportsTouch ? noop : toggleSection,
|
|
33471
33468
|
onTouchEnd: isMobile && supportsTouch ? toggleSection : noop,
|
|
33472
|
-
key: "header"
|
|
33469
|
+
key: "header",
|
|
33470
|
+
hoverStyles: "cursor: pointer;"
|
|
33473
33471
|
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
33474
33472
|
justify: "space-between",
|
|
33475
33473
|
align: "center"
|
|
@@ -33483,10 +33481,7 @@ var CollapsibleSection = function CollapsibleSection(_ref) {
|
|
|
33483
33481
|
as: "h6"
|
|
33484
33482
|
}, title), /*#__PURE__*/React__default.createElement(Motion, {
|
|
33485
33483
|
variants: icon,
|
|
33486
|
-
|
|
33487
|
-
display: "flex",
|
|
33488
|
-
alignItems: "center"
|
|
33489
|
-
}
|
|
33484
|
+
extraStyles: "display: flex; align-items: center;"
|
|
33490
33485
|
}, /*#__PURE__*/React__default.createElement(ChevronIcon$1, null)))), /*#__PURE__*/React__default.createElement(AnimatePresence, {
|
|
33491
33486
|
initial: false
|
|
33492
33487
|
}, isOpen && /*#__PURE__*/React__default.createElement(Motion, {
|
|
@@ -37700,7 +37695,9 @@ var PaymentDetailsContent = function PaymentDetailsContent(_ref) {
|
|
|
37700
37695
|
subtotal = _ref.subtotal,
|
|
37701
37696
|
total = _ref.total,
|
|
37702
37697
|
themeValues = _ref.themeValues;
|
|
37703
|
-
return /*#__PURE__*/React__default.createElement(Stack,
|
|
37698
|
+
return /*#__PURE__*/React__default.createElement(Stack, {
|
|
37699
|
+
childGap: "16px"
|
|
37700
|
+
}, lineItemElems, /*#__PURE__*/React__default.createElement(SolidDivider$1, null), /*#__PURE__*/React__default.createElement(Box, {
|
|
37704
37701
|
padding: "0.5rem 0"
|
|
37705
37702
|
}, /*#__PURE__*/React__default.createElement(LabeledAmount$1, {
|
|
37706
37703
|
variant: themeValues.labeledAmountSubtotal,
|
|
@@ -37803,13 +37800,19 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
37803
37800
|
return /*#__PURE__*/React__default.createElement(React.Fragment, {
|
|
37804
37801
|
key: fee.label
|
|
37805
37802
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
37806
|
-
padding: "
|
|
37803
|
+
padding: "4px 0"
|
|
37807
37804
|
}), /*#__PURE__*/React__default.createElement(LabeledAmount$1, _extends({
|
|
37808
37805
|
key: fee.label,
|
|
37809
37806
|
variant: themeValues.labeledAmountSubtotal
|
|
37810
37807
|
}, fee)));
|
|
37811
37808
|
});
|
|
37812
|
-
var content = isCollapsible ? /*#__PURE__*/React__default.createElement(Stack,
|
|
37809
|
+
var content = isCollapsible ? /*#__PURE__*/React__default.createElement(Stack, {
|
|
37810
|
+
childGap: "0"
|
|
37811
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
37812
|
+
padding: "4.5px"
|
|
37813
|
+
}), /*#__PURE__*/React__default.createElement(SolidDivider$1, null), /*#__PURE__*/React__default.createElement(Box, {
|
|
37814
|
+
padding: "8px"
|
|
37815
|
+
}), /*#__PURE__*/React__default.createElement(PaymentDetailsContent, {
|
|
37813
37816
|
lineItemElems: lineItemElems,
|
|
37814
37817
|
feeElems: feeElems,
|
|
37815
37818
|
subtotal: subtotal,
|
|
@@ -37832,7 +37835,11 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
37832
37835
|
variant: "h5",
|
|
37833
37836
|
weight: "700",
|
|
37834
37837
|
as: "h1"
|
|
37835
|
-
}, titleText),
|
|
37838
|
+
}, titleText), /*#__PURE__*/React__default.createElement(Heading$1, {
|
|
37839
|
+
variant: "h5",
|
|
37840
|
+
weight: "700",
|
|
37841
|
+
as: "h1"
|
|
37842
|
+
}, displayCurrency(total)))) : /*#__PURE__*/React__default.createElement(Heading$1, {
|
|
37836
37843
|
as: "h1",
|
|
37837
37844
|
variant: "h3",
|
|
37838
37845
|
weight: "700",
|
|
@@ -38321,13 +38328,13 @@ var headingBackgroundColor$1 = "".concat(WHITE);
|
|
|
38321
38328
|
var headingDisabledColor = "".concat(ATHENS_GREY);
|
|
38322
38329
|
var bodyBackgroundColor$1 = "#eeeeee";
|
|
38323
38330
|
var borderColor$2 = "".concat(GREY_CHATEAU);
|
|
38324
|
-
var focusStyles
|
|
38331
|
+
var focusStyles = "outline: none;";
|
|
38325
38332
|
var fallbackValues$x = {
|
|
38326
38333
|
headingBackgroundColor: headingBackgroundColor$1,
|
|
38327
38334
|
headingDisabledColor: headingDisabledColor,
|
|
38328
38335
|
bodyBackgroundColor: bodyBackgroundColor$1,
|
|
38329
38336
|
borderColor: borderColor$2,
|
|
38330
|
-
focusStyles: focusStyles
|
|
38337
|
+
focusStyles: focusStyles
|
|
38331
38338
|
};
|
|
38332
38339
|
|
|
38333
38340
|
function _templateObject$A() {
|
|
@@ -38671,7 +38678,8 @@ var ResetConfirmationForm = function ResetConfirmationForm() {
|
|
|
38671
38678
|
url: "/login",
|
|
38672
38679
|
text: "Back to Login",
|
|
38673
38680
|
variant: "primary",
|
|
38674
|
-
extraStyles: "width: 100%;"
|
|
38681
|
+
extraStyles: "width: 100%;",
|
|
38682
|
+
linkExtraStyles: "width: 100%;"
|
|
38675
38683
|
})))));
|
|
38676
38684
|
};
|
|
38677
38685
|
|
|
@@ -38791,7 +38799,8 @@ var ResetConfirmationForm$2 = function ResetConfirmationForm() {
|
|
|
38791
38799
|
url: "/login",
|
|
38792
38800
|
text: "Log in",
|
|
38793
38801
|
variant: "primary",
|
|
38794
|
-
extraStyles: "width: 100%;"
|
|
38802
|
+
extraStyles: "width: 100%;",
|
|
38803
|
+
linkExtraStyles: "width: 100%;"
|
|
38795
38804
|
}))))));
|
|
38796
38805
|
};
|
|
38797
38806
|
|
|
@@ -39113,7 +39122,7 @@ var WelcomeModule = function WelcomeModule(_ref) {
|
|
|
39113
39122
|
}, /*#__PURE__*/React__default.createElement(WelcomeImage, {
|
|
39114
39123
|
src: welcomeImage
|
|
39115
39124
|
}))), /*#__PURE__*/React__default.createElement(Box, {
|
|
39116
|
-
padding: "0.875rem 1.5rem",
|
|
39125
|
+
padding: isMobile ? "0.875rem 1rem" : "0.875rem 1.5rem",
|
|
39117
39126
|
background: themeValues.headerBackgroundColor
|
|
39118
39127
|
}, /*#__PURE__*/React__default.createElement(Heading$1, {
|
|
39119
39128
|
variant: "h6",
|
|
@@ -39356,7 +39365,7 @@ var SidebarSingleContent = function SidebarSingleContent(_ref) {
|
|
|
39356
39365
|
}, /*#__PURE__*/React__default.createElement(Sidebar, {
|
|
39357
39366
|
width: sidebarTargetWidth,
|
|
39358
39367
|
childGap: sidebarContentGap,
|
|
39359
|
-
|
|
39368
|
+
sidebarOnRight: sidebarOnRight,
|
|
39360
39369
|
contentMinWidth: mainContentMinWidth
|
|
39361
39370
|
}, sidebarOnRight ? /*#__PURE__*/React__default.createElement(React.Fragment, null) : sidebarContent, mainContent, sidebarOnRight ? sidebarContent : /*#__PURE__*/React__default.createElement(React.Fragment, null))))), footer ? footer : /*#__PURE__*/React__default.createElement(Box, {
|
|
39362
39371
|
padding: "0"
|
|
@@ -39418,7 +39427,7 @@ var SidebarStackContent = function SidebarStackContent(_ref) {
|
|
|
39418
39427
|
}, /*#__PURE__*/React__default.createElement(Sidebar, {
|
|
39419
39428
|
width: sidebarTargetWidth,
|
|
39420
39429
|
childGap: sidebarContentGap,
|
|
39421
|
-
|
|
39430
|
+
sidebarOnRight: sidebarOnRight,
|
|
39422
39431
|
contentMinWidth: mainContentMinWidth,
|
|
39423
39432
|
key: "content-sidebar"
|
|
39424
39433
|
}, sidebarOnRight ? /*#__PURE__*/React__default.createElement(React.Fragment, {
|
package/package.json
CHANGED
|
@@ -10,6 +10,7 @@ const ButtonWithLink = ({
|
|
|
10
10
|
disabled = false,
|
|
11
11
|
fileLink = false,
|
|
12
12
|
extraStyles,
|
|
13
|
+
linkExtraStyles,
|
|
13
14
|
newTab = false,
|
|
14
15
|
...otherProps
|
|
15
16
|
}) => {
|
|
@@ -44,7 +45,7 @@ const ButtonWithLink = ({
|
|
|
44
45
|
url={url}
|
|
45
46
|
disabled={disabled}
|
|
46
47
|
newTab={newTab}
|
|
47
|
-
extraStyles={
|
|
48
|
+
extraStyles={`${linkExtraStyles} text-decoration: none; &:hover {
|
|
48
49
|
text-decoration: none; }`}
|
|
49
50
|
>
|
|
50
51
|
<ButtonWithAction {...otherProps} extraStyles={extraStyles} />
|
|
@@ -3,7 +3,7 @@ import React from "react";
|
|
|
3
3
|
import Sidebar from "../../Sidebar";
|
|
4
4
|
|
|
5
5
|
const SidebarExample = ({ width, onRight, childGap, children }) => (
|
|
6
|
-
<Sidebar width={width}
|
|
6
|
+
<Sidebar width={width} sidebarOnRight={onRight} childGap={childGap}>
|
|
7
7
|
{children}
|
|
8
8
|
</Sidebar>
|
|
9
9
|
);
|
|
@@ -64,7 +64,7 @@ const CollapsibleSection = ({
|
|
|
64
64
|
padding="0"
|
|
65
65
|
tabIndex="0"
|
|
66
66
|
onKeyDown={handleKeyDown}
|
|
67
|
-
hoverStyles={
|
|
67
|
+
hoverStyles={`outline: none;`}
|
|
68
68
|
animate={isOpen ? "open" : "closed"}
|
|
69
69
|
positionTransition
|
|
70
70
|
>
|
|
@@ -75,6 +75,7 @@ const CollapsibleSection = ({
|
|
|
75
75
|
onClick={isMobile && supportsTouch ? noop : toggleSection}
|
|
76
76
|
onTouchEnd={isMobile && supportsTouch ? toggleSection : noop}
|
|
77
77
|
key="header"
|
|
78
|
+
hoverStyles={`cursor: pointer;`}
|
|
78
79
|
>
|
|
79
80
|
<Cluster justify="space-between" align="center">
|
|
80
81
|
{customTitle ? (
|
|
@@ -93,7 +94,7 @@ const CollapsibleSection = ({
|
|
|
93
94
|
)}
|
|
94
95
|
<Motion
|
|
95
96
|
variants={icon}
|
|
96
|
-
|
|
97
|
+
extraStyles={`display: flex; align-items: center;`}
|
|
97
98
|
>
|
|
98
99
|
<ChevronIcon />
|
|
99
100
|
</Motion>
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
const titleColor = "#292A33";
|
|
2
2
|
const headingBackgroundColor = "transparent";
|
|
3
3
|
const bodyBackgroundColor = "transparent";
|
|
4
|
-
const focusStyles = `outline: none;`;
|
|
5
4
|
|
|
6
5
|
export const fallbackValues = {
|
|
7
6
|
titleColor,
|
|
8
7
|
headingBackgroundColor,
|
|
9
|
-
bodyBackgroundColor
|
|
10
|
-
focusStyles
|
|
8
|
+
bodyBackgroundColor
|
|
11
9
|
};
|
|
@@ -18,7 +18,7 @@ const PaymentDetailsContent = ({
|
|
|
18
18
|
total,
|
|
19
19
|
themeValues
|
|
20
20
|
}) => (
|
|
21
|
-
<Stack>
|
|
21
|
+
<Stack childGap="16px">
|
|
22
22
|
{lineItemElems}
|
|
23
23
|
<SolidDivider />
|
|
24
24
|
<Box padding="0.5rem 0">
|
|
@@ -99,7 +99,7 @@ const PaymentDetails = ({
|
|
|
99
99
|
));
|
|
100
100
|
const feeElems = fees.map(fee => (
|
|
101
101
|
<Fragment key={fee.label}>
|
|
102
|
-
<Box padding="
|
|
102
|
+
<Box padding="4px 0" />
|
|
103
103
|
<LabeledAmount
|
|
104
104
|
key={fee.label}
|
|
105
105
|
variant={themeValues.labeledAmountSubtotal}
|
|
@@ -108,8 +108,10 @@ const PaymentDetails = ({
|
|
|
108
108
|
</Fragment>
|
|
109
109
|
));
|
|
110
110
|
const content = isCollapsible ? (
|
|
111
|
-
<Stack>
|
|
111
|
+
<Stack childGap="0">
|
|
112
|
+
<Box padding="4.5px" />
|
|
112
113
|
<SolidDivider />
|
|
114
|
+
<Box padding="8px" />
|
|
113
115
|
<PaymentDetailsContent
|
|
114
116
|
{...{ lineItemElems, feeElems, subtotal, total, themeValues }}
|
|
115
117
|
/>
|
|
@@ -127,7 +129,9 @@ const PaymentDetails = ({
|
|
|
127
129
|
<Heading variant="h5" weight="700" as="h1">
|
|
128
130
|
{titleText}
|
|
129
131
|
</Heading>
|
|
130
|
-
|
|
132
|
+
<Heading variant="h5" weight="700" as="h1">
|
|
133
|
+
{displayCurrency(total)}
|
|
134
|
+
</Heading>
|
|
131
135
|
</Cluster>
|
|
132
136
|
</Box>
|
|
133
137
|
) : (
|
|
@@ -44,7 +44,7 @@ const SidebarSingleContent = ({
|
|
|
44
44
|
<Sidebar
|
|
45
45
|
width={sidebarTargetWidth}
|
|
46
46
|
childGap={sidebarContentGap}
|
|
47
|
-
|
|
47
|
+
sidebarOnRight={sidebarOnRight}
|
|
48
48
|
contentMinWidth={mainContentMinWidth}
|
|
49
49
|
>
|
|
50
50
|
{sidebarOnRight ? <Fragment /> : sidebarContent}
|
package/.tool-versions
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
nodejs 10.15.3
|