@thecb/components 3.5.6 → 3.5.9
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 +19 -10
- package/package.json +1 -1
- package/src/components/molecules/collapsible-section/CollapsibleSection.js +2 -2
- package/src/components/molecules/nav-menu/NavMenu.theme.js +9 -2
- package/src/components/molecules/nav-menu/NavMenuDesktop.js +6 -1
- package/src/components/molecules/nav-menu/NavMenuMobile.js +6 -1
- package/src/components/molecules/payment-form-ach/PaymentFormACH.js +1 -1
- package/src/components/molecules/payment-form-ach/PaymentFormACH.state.js +1 -1
- package/src/components/molecules/payment-form-ach/PaymentFormACH.stories.js +24 -0
- package/src/components/molecules/payment-form-card/PaymentFormCard.stories.js +24 -0
- package/src/components/molecules/workflow-tile/WorkflowTile.js +4 -3
package/dist/index.cjs.js
CHANGED
|
@@ -32430,7 +32430,7 @@ var CollapsibleSection = function CollapsibleSection(_ref) {
|
|
|
32430
32430
|
display: "flex",
|
|
32431
32431
|
alignItems: "center"
|
|
32432
32432
|
}
|
|
32433
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
32433
|
+
}, /*#__PURE__*/React__default.createElement(ChevronIcon$1, null)))), /*#__PURE__*/React__default.createElement(AnimatePresence, {
|
|
32434
32434
|
initial: false
|
|
32435
32435
|
}, isOpen && /*#__PURE__*/React__default.createElement(Motion, {
|
|
32436
32436
|
padding: "0",
|
|
@@ -34389,8 +34389,14 @@ var Module = function Module(_ref) {
|
|
|
34389
34389
|
|
|
34390
34390
|
var Module$1 = /*#__PURE__*/React.memo(themeComponent(Module, "Module", fallbackValues$r, "default"));
|
|
34391
34391
|
|
|
34392
|
-
var backgroundColor$6 =
|
|
34393
|
-
|
|
34392
|
+
var backgroundColor$6 = {
|
|
34393
|
+
profile: "#3b414d",
|
|
34394
|
+
cms: "#3b414d"
|
|
34395
|
+
};
|
|
34396
|
+
var shadowColor = {
|
|
34397
|
+
profile: "#292A33",
|
|
34398
|
+
cms: "#292A33"
|
|
34399
|
+
};
|
|
34394
34400
|
var fallbackValues$s = {
|
|
34395
34401
|
backgroundColor: backgroundColor$6,
|
|
34396
34402
|
shadowColor: shadowColor
|
|
@@ -34430,7 +34436,7 @@ var NavMenuDesktop = function NavMenuDesktop(_ref) {
|
|
|
34430
34436
|
}, menuContent));
|
|
34431
34437
|
};
|
|
34432
34438
|
|
|
34433
|
-
var NavMenuDesktop$1 = themeComponent(NavMenuDesktop, "NavMenu", fallbackValues$s);
|
|
34439
|
+
var NavMenuDesktop$1 = themeComponent(NavMenuDesktop, "NavMenu", fallbackValues$s, "profile");
|
|
34434
34440
|
|
|
34435
34441
|
function _templateObject$y() {
|
|
34436
34442
|
var data = _taggedTemplateLiteral(["\n position: fixed;\n top: 72px;\n"]);
|
|
@@ -34490,7 +34496,7 @@ var NavMenuMobile = function NavMenuMobile(_ref) {
|
|
|
34490
34496
|
}, menuContent));
|
|
34491
34497
|
};
|
|
34492
34498
|
|
|
34493
|
-
var NavMenuMobile$1 = themeComponent(NavMenuMobile, "NavMenu", fallbackValues$s);
|
|
34499
|
+
var NavMenuMobile$1 = themeComponent(NavMenuMobile, "NavMenu", fallbackValues$s, "profile");
|
|
34494
34500
|
|
|
34495
34501
|
var AccountBillIcon = function AccountBillIcon() {
|
|
34496
34502
|
return /*#__PURE__*/React__default.createElement("svg", {
|
|
@@ -36772,7 +36778,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
36772
36778
|
|
|
36773
36779
|
var confirmRoutingNumberErrors = _defineProperty({}, matchesField.error, "Confirm routing number field must match routing number");
|
|
36774
36780
|
|
|
36775
|
-
var accountNumberErrors = (_accountNumberErrors = {}, _defineProperty(_accountNumberErrors, required.error, "Account number is required"), _defineProperty(_accountNumberErrors, hasLength.error, "Account number must be between
|
|
36781
|
+
var accountNumberErrors = (_accountNumberErrors = {}, _defineProperty(_accountNumberErrors, required.error, "Account number is required"), _defineProperty(_accountNumberErrors, hasLength.error, "Account number must be between 5 and 17 digits"), _accountNumberErrors);
|
|
36776
36782
|
|
|
36777
36783
|
var confirmAccountNumberErrors = _defineProperty({}, matchesField.error, "Confirm account number field must match account number");
|
|
36778
36784
|
|
|
@@ -36902,7 +36908,7 @@ var formConfig$6 = {
|
|
|
36902
36908
|
constraints: [onlyIntegers(), hasLength(0, 9)]
|
|
36903
36909
|
},
|
|
36904
36910
|
accountNumber: {
|
|
36905
|
-
validators: [required(), hasLength(
|
|
36911
|
+
validators: [required(), hasLength(5, 17)],
|
|
36906
36912
|
constraints: [onlyIntegers(), hasLength(0, 17)]
|
|
36907
36913
|
},
|
|
36908
36914
|
confirmAccountNumber: {
|
|
@@ -37854,7 +37860,10 @@ var Timeout$1 = withWindowSize(Timeout);
|
|
|
37854
37860
|
var WorkflowTile = function WorkflowTile(_ref) {
|
|
37855
37861
|
var _ref$workflowName = _ref.workflowName,
|
|
37856
37862
|
workflowName = _ref$workflowName === void 0 ? "Test Workflow" : _ref$workflowName,
|
|
37857
|
-
|
|
37863
|
+
_ref$workflowDescript = _ref.workflowDescription,
|
|
37864
|
+
workflowDescription = _ref$workflowDescript === void 0 ? "Link your benefit plan" : _ref$workflowDescript,
|
|
37865
|
+
_ref$workflowActionNa = _ref.workflowActionName,
|
|
37866
|
+
workflowActionName = _ref$workflowActionNa === void 0 ? "Search" : _ref$workflowActionNa,
|
|
37858
37867
|
slug = _ref.slug;
|
|
37859
37868
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
37860
37869
|
background: WHITE,
|
|
@@ -37877,7 +37886,7 @@ var WorkflowTile = function WorkflowTile(_ref) {
|
|
|
37877
37886
|
}, /*#__PURE__*/React__default.createElement(Paragraph$1, {
|
|
37878
37887
|
variant: "pS",
|
|
37879
37888
|
color: STORM_GREY
|
|
37880
|
-
}, workflowDescription
|
|
37889
|
+
}, workflowDescription)), /*#__PURE__*/React__default.createElement(Box, {
|
|
37881
37890
|
padding: "1.5rem 1rem",
|
|
37882
37891
|
background: GRECIAN_GREY
|
|
37883
37892
|
}, /*#__PURE__*/React__default.createElement(ButtonWithLink, {
|
|
@@ -37886,7 +37895,7 @@ var WorkflowTile = function WorkflowTile(_ref) {
|
|
|
37886
37895
|
fontWeight: FONT_WEIGHT_SEMIBOLD,
|
|
37887
37896
|
fontSize: "1.125rem",
|
|
37888
37897
|
borderRadius: "0px",
|
|
37889
|
-
text:
|
|
37898
|
+
text: workflowActionName,
|
|
37890
37899
|
minWidth: "100%",
|
|
37891
37900
|
url: "/service/".concat(slug),
|
|
37892
37901
|
extraStyles: "width: 100%;"
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ import { themeComponent } from "../../../util/themeUtils";
|
|
|
5
5
|
import Heading from "../../atoms/heading";
|
|
6
6
|
import { FONT_WEIGHT_SEMIBOLD } from "../../../constants/style_constants";
|
|
7
7
|
import { Box, Cluster, Stack, Motion } from "../../atoms/layouts";
|
|
8
|
-
import {
|
|
8
|
+
import { ChevronIcon } from "../../atoms/icons";
|
|
9
9
|
import { noop } from "../../../util/general";
|
|
10
10
|
|
|
11
11
|
const CollapsibleSection = ({
|
|
@@ -95,7 +95,7 @@ const CollapsibleSection = ({
|
|
|
95
95
|
variants={icon}
|
|
96
96
|
style={{ display: "flex", alignItems: "center" }}
|
|
97
97
|
>
|
|
98
|
-
<
|
|
98
|
+
<ChevronIcon />
|
|
99
99
|
</Motion>
|
|
100
100
|
</Cluster>
|
|
101
101
|
</Box>
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
const backgroundColor =
|
|
2
|
-
|
|
1
|
+
const backgroundColor = {
|
|
2
|
+
profile: "#3b414d",
|
|
3
|
+
cms: "#3b414d"
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
const shadowColor = {
|
|
7
|
+
profile: "#292A33",
|
|
8
|
+
cms: "#292A33"
|
|
9
|
+
};
|
|
3
10
|
|
|
4
11
|
export const fallbackValues = {
|
|
5
12
|
backgroundColor,
|
|
@@ -60,4 +60,9 @@ const NavMenuMobile = ({ menuContent = [], visible = false, themeValues }) => {
|
|
|
60
60
|
);
|
|
61
61
|
};
|
|
62
62
|
|
|
63
|
-
export default themeComponent(
|
|
63
|
+
export default themeComponent(
|
|
64
|
+
NavMenuMobile,
|
|
65
|
+
"NavMenu",
|
|
66
|
+
fallbackValues,
|
|
67
|
+
"profile"
|
|
68
|
+
);
|
|
@@ -53,7 +53,7 @@ const PaymentFormACH = ({
|
|
|
53
53
|
};
|
|
54
54
|
const accountNumberErrors = {
|
|
55
55
|
[required.error]: "Account number is required",
|
|
56
|
-
[hasLength.error]: "Account number must be between
|
|
56
|
+
[hasLength.error]: "Account number must be between 5 and 17 digits"
|
|
57
57
|
};
|
|
58
58
|
const confirmAccountNumberErrors = {
|
|
59
59
|
[matchesField.error]:
|
|
@@ -20,7 +20,7 @@ const formConfig = {
|
|
|
20
20
|
constraints: [onlyIntegers(), hasLength(0, 9)]
|
|
21
21
|
},
|
|
22
22
|
accountNumber: {
|
|
23
|
-
validators: [required(), hasLength(
|
|
23
|
+
validators: [required(), hasLength(5, 17)],
|
|
24
24
|
constraints: [onlyIntegers(), hasLength(0, 17)]
|
|
25
25
|
},
|
|
26
26
|
confirmAccountNumber: {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { connect } from "react-redux";
|
|
3
|
+
import { boolean } from "@storybook/addon-knobs";
|
|
4
|
+
|
|
5
|
+
import PaymentFormACH from "./PaymentFormACH";
|
|
6
|
+
import page from "../../../../.storybook/page";
|
|
7
|
+
import * as PaymentFormACHState from "./PaymentFormACH.state";
|
|
8
|
+
|
|
9
|
+
const story = page({
|
|
10
|
+
title: "Components|Molecules/PaymentFormACH",
|
|
11
|
+
Component: PaymentFormACH,
|
|
12
|
+
reducer: PaymentFormACHState.reducer,
|
|
13
|
+
mapStateToProps: PaymentFormACHState.mapStateToProps,
|
|
14
|
+
mapDispatchToProps: PaymentFormACHState.mapDispatchToProps
|
|
15
|
+
});
|
|
16
|
+
export default story;
|
|
17
|
+
|
|
18
|
+
const ConnectedForm = connect(
|
|
19
|
+
PaymentFormACHState.mapStateToProps,
|
|
20
|
+
PaymentFormACHState.mapDispatchToProps
|
|
21
|
+
)(PaymentFormACH);
|
|
22
|
+
export const paymentFormACH = () => (
|
|
23
|
+
<ConnectedForm showErrors={boolean("showErrors", false, "props")} />
|
|
24
|
+
);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { connect } from "react-redux";
|
|
3
|
+
import { boolean } from "@storybook/addon-knobs";
|
|
4
|
+
|
|
5
|
+
import PaymentFormCard from "./PaymentFormCard";
|
|
6
|
+
import page from "../../../../.storybook/page";
|
|
7
|
+
import * as PaymentFormCardState from "./PaymentFormCard.state";
|
|
8
|
+
|
|
9
|
+
const story = page({
|
|
10
|
+
title: "Components|Molecules/PaymentFormCard",
|
|
11
|
+
Component: PaymentFormCard,
|
|
12
|
+
reducer: PaymentFormCardState.reducer,
|
|
13
|
+
mapStateToProps: PaymentFormCardState.mapStateToProps,
|
|
14
|
+
mapDispatchToProps: PaymentFormCardState.mapDispatchToProps
|
|
15
|
+
});
|
|
16
|
+
export default story;
|
|
17
|
+
|
|
18
|
+
const ConnectedForm = connect(
|
|
19
|
+
PaymentFormCardState.mapStateToProps,
|
|
20
|
+
PaymentFormCardState.mapDispatchToProps
|
|
21
|
+
)(PaymentFormCard);
|
|
22
|
+
export const paymentFormCard = () => (
|
|
23
|
+
<ConnectedForm showErrors={boolean("showErrors", false, "props")} />
|
|
24
|
+
);
|
|
@@ -14,7 +14,8 @@ import ButtonWithLink from "../../atoms/button-with-link";
|
|
|
14
14
|
import { Box, Stack } from "../../atoms/layouts";
|
|
15
15
|
const WorkflowTile = ({
|
|
16
16
|
workflowName = "Test Workflow",
|
|
17
|
-
workflowDescription,
|
|
17
|
+
workflowDescription = "Link your benefit plan",
|
|
18
|
+
workflowActionName = "Search",
|
|
18
19
|
slug
|
|
19
20
|
}) => (
|
|
20
21
|
<Box
|
|
@@ -35,7 +36,7 @@ const WorkflowTile = ({
|
|
|
35
36
|
</Box>
|
|
36
37
|
<Box padding={"0 1rem 1rem 1rem"} minHeight={"4.25rem"}>
|
|
37
38
|
<Paragraph variant="pS" color={STORM_GREY}>
|
|
38
|
-
{workflowDescription
|
|
39
|
+
{workflowDescription}
|
|
39
40
|
</Paragraph>
|
|
40
41
|
</Box>
|
|
41
42
|
<Box padding={"1.5rem 1rem"} background={GRECIAN_GREY}>
|
|
@@ -45,7 +46,7 @@ const WorkflowTile = ({
|
|
|
45
46
|
fontWeight={FONT_WEIGHT_SEMIBOLD}
|
|
46
47
|
fontSize={"1.125rem"}
|
|
47
48
|
borderRadius={"0px"}
|
|
48
|
-
text={
|
|
49
|
+
text={workflowActionName}
|
|
49
50
|
minWidth={"100%"}
|
|
50
51
|
url={`/service/${slug}`}
|
|
51
52
|
extraStyles={`width: 100%;`}
|