@thecb/components 3.6.0-beta.0 → 3.7.0-beta.1
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 +243 -78
- package/package.json +1 -1
- package/src/components/atoms/alert/Alert.js +3 -3
- package/src/components/atoms/form-layouts/FormInput.js +19 -3
- package/src/components/atoms/nav-footer/NavFooter.js +2 -1
- package/src/components/atoms/nav-header/NavHeader.js +2 -1
- package/src/components/molecules/index.js +1 -0
- package/src/components/molecules/pagination/Pagination.js +125 -0
- package/src/components/molecules/pagination/index.js +3 -0
- package/src/components/molecules/radio-section/RadioSection.js +8 -3
- package/src/components/molecules/workflow-tile/WorkflowTile.js +4 -3
- package/src/deprecated/icons/AlertSuccessIcon.js +3 -3
package/dist/index.cjs.js
CHANGED
|
@@ -14097,7 +14097,7 @@ var AlertSuccessIcon = function AlertSuccessIcon() {
|
|
|
14097
14097
|
xmlnsXlink: "http://www.w3.org/1999/xlink"
|
|
14098
14098
|
}, /*#__PURE__*/React__default.createElement("defs", null, /*#__PURE__*/React__default.createElement("path", {
|
|
14099
14099
|
d: "M12,24 C18.627417,24 24,18.627417 24,12 C24,5.372583 18.627417,0 12,0 C5.372583,0 0,5.372583 0,12 C0,18.627417 5.372583,24 12,24 Z M16.9497475,7.46446609 L18.363961,8.87867966 L9.87867966,17.363961 L5.63603897,13.1213203 L7.05025253,11.7071068 L9.87803897,14.5354661 L16.9497475,7.46446609 Z",
|
|
14100
|
-
id: "
|
|
14100
|
+
id: "alertSuccess"
|
|
14101
14101
|
})), /*#__PURE__*/React__default.createElement("g", {
|
|
14102
14102
|
id: "Symbols",
|
|
14103
14103
|
stroke: "none",
|
|
@@ -14114,12 +14114,12 @@ var AlertSuccessIcon = function AlertSuccessIcon() {
|
|
|
14114
14114
|
id: "mask-2",
|
|
14115
14115
|
fill: "white"
|
|
14116
14116
|
}, /*#__PURE__*/React__default.createElement("use", {
|
|
14117
|
-
xlinkHref: "#
|
|
14117
|
+
xlinkHref: "#alertSuccess"
|
|
14118
14118
|
})), /*#__PURE__*/React__default.createElement("use", {
|
|
14119
14119
|
id: "background-2",
|
|
14120
14120
|
fill: "#47B872",
|
|
14121
14121
|
fillRule: "nonzero",
|
|
14122
|
-
xlinkHref: "#
|
|
14122
|
+
xlinkHref: "#alertSuccess"
|
|
14123
14123
|
})))));
|
|
14124
14124
|
};
|
|
14125
14125
|
|
|
@@ -14264,7 +14264,7 @@ var Alert = function Alert(_ref) {
|
|
|
14264
14264
|
width: "24px",
|
|
14265
14265
|
childGap: "0rem"
|
|
14266
14266
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
14267
|
-
padding: "0 0 0 1rem",
|
|
14267
|
+
padding: "0 0.5rem 0 1rem",
|
|
14268
14268
|
minHeight: "100%"
|
|
14269
14269
|
}, /*#__PURE__*/React__default.createElement(Cover, {
|
|
14270
14270
|
minHeight: "100%",
|
|
@@ -14276,11 +14276,11 @@ var Alert = function Alert(_ref) {
|
|
|
14276
14276
|
}, /*#__PURE__*/React__default.createElement(Icon, null)))), /*#__PURE__*/React__default.createElement(Box, {
|
|
14277
14277
|
padding: "0"
|
|
14278
14278
|
}, /*#__PURE__*/React__default.createElement(Sidebar, {
|
|
14279
|
-
|
|
14279
|
+
sidebarOnRight: true,
|
|
14280
14280
|
width: "24px",
|
|
14281
14281
|
childGap: "0rem"
|
|
14282
14282
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
14283
|
-
padding: "1rem"
|
|
14283
|
+
padding: "1rem 1rem 1rem 0.5rem"
|
|
14284
14284
|
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
14285
14285
|
justify: "flex-start",
|
|
14286
14286
|
align: "center"
|
|
@@ -15349,7 +15349,7 @@ _curry2(function nth(offset, list) {
|
|
|
15349
15349
|
*
|
|
15350
15350
|
* @func
|
|
15351
15351
|
* @memberOf R
|
|
15352
|
-
* @since v0.27.
|
|
15352
|
+
* @since v0.27.1
|
|
15353
15353
|
* @category Object
|
|
15354
15354
|
* @typedefn Idx = [String | Int]
|
|
15355
15355
|
* @sig [Idx] -> {a} -> [a | Undefined]
|
|
@@ -18448,8 +18448,28 @@ var fallbackValues$e = {
|
|
|
18448
18448
|
hoverFocusStyles: hoverFocusStyles
|
|
18449
18449
|
};
|
|
18450
18450
|
|
|
18451
|
+
function _templateObject4$4() {
|
|
18452
|
+
var data = _taggedTemplateLiteral(["\n ", "\n "]);
|
|
18453
|
+
|
|
18454
|
+
_templateObject4$4 = function _templateObject4() {
|
|
18455
|
+
return data;
|
|
18456
|
+
};
|
|
18457
|
+
|
|
18458
|
+
return data;
|
|
18459
|
+
}
|
|
18460
|
+
|
|
18461
|
+
function _templateObject3$7() {
|
|
18462
|
+
var data = _taggedTemplateLiteral(["\n border: 1px solid\n ", ";\n border-radius: 2px;\n height: ", ";\n width: 100%;\n padding: 1rem;\n min-width: 100px;\n margin: 0;\n box-sizing: border-box;\n position: relative;\n font-size: 1.1rem;\n line-height: 2rem;\n font-weight: ", ";\n background-color: ", ";\n color: ", ";\n box-shadow: none;\n\n &:focus {\n border: 1px solid ", ";\n }\n\n ", "\n"]);
|
|
18463
|
+
|
|
18464
|
+
_templateObject3$7 = function _templateObject3() {
|
|
18465
|
+
return data;
|
|
18466
|
+
};
|
|
18467
|
+
|
|
18468
|
+
return data;
|
|
18469
|
+
}
|
|
18470
|
+
|
|
18451
18471
|
function _templateObject2$d() {
|
|
18452
|
-
var data = _taggedTemplateLiteral(["\n
|
|
18472
|
+
var data = _taggedTemplateLiteral(["\n ", "\n "]);
|
|
18453
18473
|
|
|
18454
18474
|
_templateObject2$d = function _templateObject2() {
|
|
18455
18475
|
return data;
|
|
@@ -18459,7 +18479,7 @@ function _templateObject2$d() {
|
|
|
18459
18479
|
}
|
|
18460
18480
|
|
|
18461
18481
|
function _templateObject$p() {
|
|
18462
|
-
var data = _taggedTemplateLiteral(["\n border: 1px solid\n ", ";\n border-radius: 2px;\n height:
|
|
18482
|
+
var data = _taggedTemplateLiteral(["\n border: 1px solid\n ", ";\n border-radius: 2px;\n height: ", ";\n width: 100%;\n padding: 1rem;\n min-width: 100px;\n margin: 0;\n box-sizing: border-box;\n position: relative;\n font-size: 1.1rem;\n font-family: Public Sans;\n line-height: 2rem;\n font-weight: ", ";\n background-color: ", ";\n color: ", ";\n box-shadow: none;\n ", "\n transition: background 0.3s ease;\n\n &:focus {\n border: 1px solid ", ";\n }\n\n ", "\n"]);
|
|
18463
18483
|
|
|
18464
18484
|
_templateObject$p = function _templateObject() {
|
|
18465
18485
|
return data;
|
|
@@ -18472,54 +18492,68 @@ var InputField = styled__default.input(_templateObject$p(), function (_ref) {
|
|
|
18472
18492
|
showErrors = _ref.showErrors,
|
|
18473
18493
|
themeValues = _ref.themeValues;
|
|
18474
18494
|
return field.dirty && field.hasErrors || field.hasErrors && showErrors ? ERROR_COLOR : themeValues.borderColor;
|
|
18475
|
-
},
|
|
18476
|
-
var
|
|
18477
|
-
return
|
|
18478
|
-
}, function (_ref3) {
|
|
18495
|
+
}, function (_ref2) {
|
|
18496
|
+
var customHeight = _ref2.customHeight;
|
|
18497
|
+
return customHeight ? customHeight : "48px";
|
|
18498
|
+
}, FONT_WEIGHT_REGULAR, function (_ref3) {
|
|
18479
18499
|
var themeValues = _ref3.themeValues;
|
|
18480
|
-
return themeValues.
|
|
18500
|
+
return themeValues.inputBackgroundColor && themeValues.inputBackgroundColor;
|
|
18481
18501
|
}, function (_ref4) {
|
|
18482
|
-
var
|
|
18483
|
-
|
|
18502
|
+
var themeValues = _ref4.themeValues;
|
|
18503
|
+
return themeValues.color && themeValues.color;
|
|
18504
|
+
}, function (_ref5) {
|
|
18505
|
+
var background = _ref5.background,
|
|
18506
|
+
themeValues = _ref5.themeValues;
|
|
18484
18507
|
return background && "background: ".concat(themeValues.inputBackgroundColor, " url(").concat(background, ") no-repeat right 0.5rem center;");
|
|
18485
|
-
}, MATISSE_BLUE
|
|
18508
|
+
}, MATISSE_BLUE, function (_ref6) {
|
|
18509
|
+
var extraStyles = _ref6.extraStyles;
|
|
18510
|
+
return styled.css(_templateObject2$d(), extraStyles);
|
|
18511
|
+
}); // eslint-disable-next-line no-unused-vars
|
|
18486
18512
|
|
|
18487
|
-
var FormattedInputField = styled__default(function (
|
|
18488
|
-
var showErrors =
|
|
18489
|
-
props = _objectWithoutProperties(
|
|
18513
|
+
var FormattedInputField = styled__default(function (_ref7) {
|
|
18514
|
+
var showErrors = _ref7.showErrors,
|
|
18515
|
+
props = _objectWithoutProperties(_ref7, ["showErrors"]);
|
|
18490
18516
|
|
|
18491
18517
|
return /*#__PURE__*/React__default.createElement(src_1, props);
|
|
18492
|
-
})(
|
|
18493
|
-
var field =
|
|
18494
|
-
showErrors =
|
|
18495
|
-
themeValues =
|
|
18518
|
+
})(_templateObject3$7(), function (_ref8) {
|
|
18519
|
+
var field = _ref8.field,
|
|
18520
|
+
showErrors = _ref8.showErrors,
|
|
18521
|
+
themeValues = _ref8.themeValues;
|
|
18496
18522
|
return field.dirty && field.hasErrors || field.hasErrors && showErrors ? ERROR_COLOR : themeValues.borderColor;
|
|
18497
|
-
},
|
|
18498
|
-
var
|
|
18523
|
+
}, function (_ref9) {
|
|
18524
|
+
var customHeight = _ref9.customHeight;
|
|
18525
|
+
return customHeight ? customHeight : "48px";
|
|
18526
|
+
}, FONT_WEIGHT_REGULAR, function (_ref10) {
|
|
18527
|
+
var themeValues = _ref10.themeValues;
|
|
18499
18528
|
return themeValues.inputBackgroundColor && themeValues.inputBackgroundColor;
|
|
18500
|
-
}, function (
|
|
18501
|
-
var themeValues =
|
|
18529
|
+
}, function (_ref11) {
|
|
18530
|
+
var themeValues = _ref11.themeValues;
|
|
18502
18531
|
return themeValues.color && themeValues.color;
|
|
18503
|
-
}, MATISSE_BLUE)
|
|
18532
|
+
}, MATISSE_BLUE, function (_ref12) {
|
|
18533
|
+
var extraStyles = _ref12.extraStyles;
|
|
18534
|
+
return styled.css(_templateObject4$4(), extraStyles);
|
|
18535
|
+
});
|
|
18504
18536
|
|
|
18505
|
-
var FormInput = function FormInput(
|
|
18506
|
-
var
|
|
18507
|
-
type =
|
|
18508
|
-
labelTextWhenNoError =
|
|
18509
|
-
errorMessages =
|
|
18510
|
-
|
|
18511
|
-
isNum =
|
|
18512
|
-
|
|
18513
|
-
helperModal =
|
|
18514
|
-
field =
|
|
18515
|
-
fieldActions =
|
|
18516
|
-
showErrors =
|
|
18517
|
-
|
|
18518
|
-
formatter =
|
|
18519
|
-
decorator =
|
|
18520
|
-
themeValues =
|
|
18521
|
-
background =
|
|
18522
|
-
|
|
18537
|
+
var FormInput = function FormInput(_ref13) {
|
|
18538
|
+
var _ref13$type = _ref13.type,
|
|
18539
|
+
type = _ref13$type === void 0 ? "text" : _ref13$type,
|
|
18540
|
+
labelTextWhenNoError = _ref13.labelTextWhenNoError,
|
|
18541
|
+
errorMessages = _ref13.errorMessages,
|
|
18542
|
+
_ref13$isNum = _ref13.isNum,
|
|
18543
|
+
isNum = _ref13$isNum === void 0 ? false : _ref13$isNum,
|
|
18544
|
+
_ref13$helperModal = _ref13.helperModal,
|
|
18545
|
+
helperModal = _ref13$helperModal === void 0 ? false : _ref13$helperModal,
|
|
18546
|
+
field = _ref13.field,
|
|
18547
|
+
fieldActions = _ref13.fieldActions,
|
|
18548
|
+
showErrors = _ref13.showErrors,
|
|
18549
|
+
_ref13$formatter = _ref13.formatter,
|
|
18550
|
+
formatter = _ref13$formatter === void 0 ? null : _ref13$formatter,
|
|
18551
|
+
decorator = _ref13.decorator,
|
|
18552
|
+
themeValues = _ref13.themeValues,
|
|
18553
|
+
background = _ref13.background,
|
|
18554
|
+
customHeight = _ref13.customHeight,
|
|
18555
|
+
extraStyles = _ref13.extraStyles,
|
|
18556
|
+
props = _objectWithoutProperties(_ref13, ["type", "labelTextWhenNoError", "errorMessages", "isNum", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "extraStyles"]);
|
|
18523
18557
|
|
|
18524
18558
|
var _useState = React.useState(false),
|
|
18525
18559
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -18588,7 +18622,9 @@ var FormInput = function FormInput(_ref9) {
|
|
|
18588
18622
|
formatter: formatter,
|
|
18589
18623
|
showErrors: showErrors,
|
|
18590
18624
|
"data-qa": labelTextWhenNoError,
|
|
18591
|
-
themeValues: themeValues
|
|
18625
|
+
themeValues: themeValues,
|
|
18626
|
+
customHeight: customHeight,
|
|
18627
|
+
extraStyles: extraStyles
|
|
18592
18628
|
}, props)) : /*#__PURE__*/React__default.createElement(InputField, _extends({
|
|
18593
18629
|
"aria-labelledby": labelTextWhenNoError,
|
|
18594
18630
|
onChange: function onChange(e) {
|
|
@@ -18602,7 +18638,9 @@ var FormInput = function FormInput(_ref9) {
|
|
|
18602
18638
|
showErrors: showErrors,
|
|
18603
18639
|
"data-qa": labelTextWhenNoError,
|
|
18604
18640
|
themeValues: themeValues,
|
|
18605
|
-
background: background
|
|
18641
|
+
background: background,
|
|
18642
|
+
customHeight: customHeight,
|
|
18643
|
+
extraStyles: extraStyles
|
|
18606
18644
|
}, props))), /*#__PURE__*/React__default.createElement(Stack, {
|
|
18607
18645
|
direction: "row",
|
|
18608
18646
|
justify: "space-between"
|
|
@@ -18832,10 +18870,10 @@ var FormattedCreditCard = function FormattedCreditCard(_ref) {
|
|
|
18832
18870
|
|
|
18833
18871
|
var FormattedCreditCard$1 = themeComponent(FormattedCreditCard, "FormattedCreditCard", fallbackValues$g, "default");
|
|
18834
18872
|
|
|
18835
|
-
function _templateObject3$
|
|
18873
|
+
function _templateObject3$8() {
|
|
18836
18874
|
var data = _taggedTemplateLiteral(["\n display: block;\n top: auto;\n bottom: 6px;\n left: 2px;\n transition-duration: 0.13s;\n transition-delay: 0.13s;\n transition-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n margin-top: 12px;\n background-color: ", ";\n\n &, &::before, &::after {\n background-color: ", ";\n width: 30px;\n height: 3px;\n position: absolute;\n transition-property: transform;\n transition-duration: 0.15s;\n transition-timing-function: ease;\n }\n\n &::before, &::after {\n content: \"\";\n display: block;\n }\n\n &::before {\n top: -10px;\n transition: top 0.12s 0.2s cubic-bezier(0.33333, 0.66667, 0.66667, 1), \n transform 0.13s cubic-bezier(0.55, 0.055, 0.675, 0.19);\n }\n\n &::after {\n bottom: -10px;\n top: -20px;\n transition: top 0.2s 0.2s cubic-bezier(0.33333, 0.66667, 0.66667, 1), \n opacity 0.1s linear;\n }\n\n &.active, &.active::before, &.active::after {\n background-color: ", ";\n }\n\n &.active {\n transform: translate3d(0, -10px, 0) rotate(-45deg);\n transition-delay: 0.22s;\n transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n\n &.active::after {\n top: 0;\n opacity: 0;\n transition: top 0.2s cubic-bezier(0.33333, 0, 0.66667, 0.33333), \n opacity: 0.1s 0.22s linear;\n }\n\n &.active::before {\n top: 0;\n transform: rotate(-90deg);\n transition: top 0.1s 0.16s cubic-bezier(0.33333, 0, 0.66667, 0.33333), \n transform 0.13s 0.25s cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n"]);
|
|
18837
18875
|
|
|
18838
|
-
_templateObject3$
|
|
18876
|
+
_templateObject3$8 = function _templateObject3() {
|
|
18839
18877
|
return data;
|
|
18840
18878
|
};
|
|
18841
18879
|
|
|
@@ -18863,7 +18901,7 @@ function _templateObject$r() {
|
|
|
18863
18901
|
}
|
|
18864
18902
|
var Hamburger = styled__default.button(_templateObject$r());
|
|
18865
18903
|
var HamburgerBox = styled__default.span(_templateObject2$f());
|
|
18866
|
-
var HamburgerInner = styled__default.span(_templateObject3$
|
|
18904
|
+
var HamburgerInner = styled__default.span(_templateObject3$8(), function (_ref) {
|
|
18867
18905
|
var inactiveColor = _ref.inactiveColor;
|
|
18868
18906
|
return inactiveColor;
|
|
18869
18907
|
}, function (_ref2) {
|
|
@@ -19099,7 +19137,8 @@ var NavFooter = function NavFooter(_ref) {
|
|
|
19099
19137
|
_ref$footerPadding = _ref.footerPadding,
|
|
19100
19138
|
footerPadding = _ref$footerPadding === void 0 ? "1.5rem 1rem" : _ref$footerPadding,
|
|
19101
19139
|
isMobile = _ref.isMobile,
|
|
19102
|
-
|
|
19140
|
+
footerWidth = _ref.footerWidth,
|
|
19141
|
+
rest = _objectWithoutProperties(_ref, ["leftContent", "rightContent", "footerMinHeight", "backgroundColor", "largeSide", "largeSideSize", "footerPadding", "isMobile", "footerWidth"]);
|
|
19103
19142
|
|
|
19104
19143
|
return /*#__PURE__*/React__default.createElement(Box, _extends({
|
|
19105
19144
|
padding: footerPadding,
|
|
@@ -19108,7 +19147,7 @@ var NavFooter = function NavFooter(_ref) {
|
|
|
19108
19147
|
minWidth: "100%",
|
|
19109
19148
|
extraStyles: isMobile ? "overflow: hidden;" : "height: ".concat(footerMinHeight, "; > * { height: 100%; };")
|
|
19110
19149
|
}, rest), /*#__PURE__*/React__default.createElement(Center, {
|
|
19111
|
-
maxWidth: "76.5rem"
|
|
19150
|
+
maxWidth: footerWidth || "76.5rem"
|
|
19112
19151
|
}, /*#__PURE__*/React__default.createElement(Cover, {
|
|
19113
19152
|
singleChild: true,
|
|
19114
19153
|
minHeight: "100%"
|
|
@@ -19138,7 +19177,8 @@ var NavHeader = function NavHeader(_ref) {
|
|
|
19138
19177
|
headerHeight = _ref$headerHeight === void 0 ? "105px" : _ref$headerHeight,
|
|
19139
19178
|
isMobile = _ref.isMobile,
|
|
19140
19179
|
backgroundColor = _ref.backgroundColor,
|
|
19141
|
-
|
|
19180
|
+
headerWidth = _ref.headerWidth,
|
|
19181
|
+
rest = _objectWithoutProperties(_ref, ["leftContent", "rightContent", "headerHeight", "isMobile", "backgroundColor", "headerWidth"]);
|
|
19142
19182
|
|
|
19143
19183
|
return /*#__PURE__*/React__default.createElement(Box, _extends({
|
|
19144
19184
|
padding: "0 16px 4px",
|
|
@@ -19146,7 +19186,7 @@ var NavHeader = function NavHeader(_ref) {
|
|
|
19146
19186
|
extraStyles: isMobile ? "height: 72px; > * { height: 100%; }; z-index: 2;" : "height: ".concat(headerHeight, "; > * { height: 100%; }; z-index: 2;"),
|
|
19147
19187
|
minWidth: "100%"
|
|
19148
19188
|
}, rest), /*#__PURE__*/React__default.createElement(Center, {
|
|
19149
|
-
maxWidth: "76.5rem"
|
|
19189
|
+
maxWidth: headerWidth || "76.5rem"
|
|
19150
19190
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
19151
19191
|
minHeight: "100%",
|
|
19152
19192
|
padding: "0"
|
|
@@ -19286,20 +19326,20 @@ function _templateObject5$2() {
|
|
|
19286
19326
|
return data;
|
|
19287
19327
|
}
|
|
19288
19328
|
|
|
19289
|
-
function _templateObject4$
|
|
19329
|
+
function _templateObject4$5() {
|
|
19290
19330
|
var data = _taggedTemplateLiteral(["", " is not a valid length"]);
|
|
19291
19331
|
|
|
19292
|
-
_templateObject4$
|
|
19332
|
+
_templateObject4$5 = function _templateObject4() {
|
|
19293
19333
|
return data;
|
|
19294
19334
|
};
|
|
19295
19335
|
|
|
19296
19336
|
return data;
|
|
19297
19337
|
}
|
|
19298
19338
|
|
|
19299
|
-
function _templateObject3$
|
|
19339
|
+
function _templateObject3$9() {
|
|
19300
19340
|
var data = _taggedTemplateLiteral(["", " is not the right length"]);
|
|
19301
19341
|
|
|
19302
|
-
_templateObject3$
|
|
19342
|
+
_templateObject3$9 = function _templateObject3() {
|
|
19303
19343
|
return data;
|
|
19304
19344
|
};
|
|
19305
19345
|
|
|
@@ -19365,7 +19405,7 @@ with interpolation.
|
|
|
19365
19405
|
*/
|
|
19366
19406
|
|
|
19367
19407
|
|
|
19368
|
-
var DEFAULT_ERROR_MESSAGES = (_DEFAULT_ERROR_MESSAG = {}, _defineProperty(_DEFAULT_ERROR_MESSAG, MIN_LENGTH_ERROR, genErrorMessage(_templateObject$t(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, MAX_LENGTH_ERROR, genErrorMessage(_templateObject2$h(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, EXACT_LENGTH_ERROR, genErrorMessage(_templateObject3$
|
|
19408
|
+
var DEFAULT_ERROR_MESSAGES = (_DEFAULT_ERROR_MESSAG = {}, _defineProperty(_DEFAULT_ERROR_MESSAG, MIN_LENGTH_ERROR, genErrorMessage(_templateObject$t(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, MAX_LENGTH_ERROR, genErrorMessage(_templateObject2$h(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, EXACT_LENGTH_ERROR, genErrorMessage(_templateObject3$9(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, MULTIPLE_LENGTHS_ERROR, genErrorMessage(_templateObject4$5(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, EMAIL_ERROR, genErrorMessage(_templateObject5$2(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, HAS_NUMBER_ERROR, genErrorMessage(_templateObject6$2(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, HAS_UPPERCASE_LETTER_ERROR, genErrorMessage(_templateObject7$2(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, HAS_LOWERCASE_LETTER_ERROR, genErrorMessage(_templateObject8$1(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, HAS_SPECIAL_CHARACTER_ERROR, genErrorMessage(_templateObject9$1(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, ONLY_NUMBERS_ERROR, genErrorMessage(_templateObject10$1(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, ONLY_LETTERS_ERROR, genErrorMessage(_templateObject11$1(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, REQUIRED_FIELD_ERROR, genErrorMessage(_templateObject12(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, NUM_GREATER_THAN_ERROR, genErrorMessage(_templateObject13(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, NUM_LESS_THAN_ERROR, genErrorMessage(_templateObject14(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, MATCHES_FIELD_ERROR, genErrorMessage(_templateObject15(), "fieldLabel", "matchField")), _defineProperty(_DEFAULT_ERROR_MESSAG, VALID_SELECT_OPTION_ERROR, genErrorMessage(_templateObject16(), "fieldLabel")), _DEFAULT_ERROR_MESSAG); // Constants to represent an input's state
|
|
19369
19409
|
// Neutral - has not been validated
|
|
19370
19410
|
// Invalid - has been validated and has an error
|
|
19371
19411
|
// Valid - has been validated and has no error
|
|
@@ -30327,20 +30367,20 @@ var fallbackValues$o = {
|
|
|
30327
30367
|
leftLabelStyles: leftLabelStyles
|
|
30328
30368
|
};
|
|
30329
30369
|
|
|
30330
|
-
function _templateObject4$
|
|
30370
|
+
function _templateObject4$6() {
|
|
30331
30371
|
var data = _taggedTemplateLiteral(["\n position: absolute;\n width: 14px;\n height: 14px;\n top: 3px;\n left: 3px;\n right: 3px;\n bottom: 3px;\n border-radius: 50%;\n box-sizing: border-box;\n"]);
|
|
30332
30372
|
|
|
30333
|
-
_templateObject4$
|
|
30373
|
+
_templateObject4$6 = function _templateObject4() {
|
|
30334
30374
|
return data;
|
|
30335
30375
|
};
|
|
30336
30376
|
|
|
30337
30377
|
return data;
|
|
30338
30378
|
}
|
|
30339
30379
|
|
|
30340
|
-
function _templateObject3$
|
|
30380
|
+
function _templateObject3$a() {
|
|
30341
30381
|
var data = _taggedTemplateLiteral(["\n position: absolute;\n width: 20px;\n height: 20px;\n border: none;\n border-radius: 50%;\n box-sizing: border-box;\n"]);
|
|
30342
30382
|
|
|
30343
|
-
_templateObject3$
|
|
30383
|
+
_templateObject3$a = function _templateObject3() {
|
|
30344
30384
|
return data;
|
|
30345
30385
|
};
|
|
30346
30386
|
|
|
@@ -30383,8 +30423,8 @@ var VisibleSwitchComponent = styled__default.label(_templateObject2$i(), functio
|
|
|
30383
30423
|
var isMobile = _ref5.isMobile;
|
|
30384
30424
|
return isMobile ? "transform: scale(0.75)" : "";
|
|
30385
30425
|
});
|
|
30386
|
-
var ToggleSwitchMiddleRingComponent = styled__default.div(_templateObject3$
|
|
30387
|
-
var ToggleSwitchInnerRingComponent = styled__default.div(_templateObject4$
|
|
30426
|
+
var ToggleSwitchMiddleRingComponent = styled__default.div(_templateObject3$a());
|
|
30427
|
+
var ToggleSwitchInnerRingComponent = styled__default.div(_templateObject4$6());
|
|
30388
30428
|
|
|
30389
30429
|
var ToggleSwitch = function ToggleSwitch(_ref6) {
|
|
30390
30430
|
var _ref6$isOn = _ref6.isOn,
|
|
@@ -32683,20 +32723,20 @@ function _templateObject5$3() {
|
|
|
32683
32723
|
return data;
|
|
32684
32724
|
}
|
|
32685
32725
|
|
|
32686
|
-
function _templateObject4$
|
|
32726
|
+
function _templateObject4$7() {
|
|
32687
32727
|
var data = _taggedTemplateLiteral(["\n color: ", ";\n align-items: center;\n font-size: 1rem;\n padding-right: 1rem;\n cursor: pointer;\n display: ", ";\n"]);
|
|
32688
32728
|
|
|
32689
|
-
_templateObject4$
|
|
32729
|
+
_templateObject4$7 = function _templateObject4() {
|
|
32690
32730
|
return data;
|
|
32691
32731
|
};
|
|
32692
32732
|
|
|
32693
32733
|
return data;
|
|
32694
32734
|
}
|
|
32695
32735
|
|
|
32696
|
-
function _templateObject3$
|
|
32736
|
+
function _templateObject3$b() {
|
|
32697
32737
|
var data = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-evenly;\n align-items: center;\n"]);
|
|
32698
32738
|
|
|
32699
|
-
_templateObject3$
|
|
32739
|
+
_templateObject3$b = function _templateObject3() {
|
|
32700
32740
|
return data;
|
|
32701
32741
|
};
|
|
32702
32742
|
|
|
@@ -32739,8 +32779,8 @@ var EditableTableListItem = styled__default.div(_templateObject2$k(), function (
|
|
|
32739
32779
|
var isMobile = _ref5.isMobile;
|
|
32740
32780
|
return isMobile ? "padding: 1rem 0.5rem" : "padding: 0 0.5rem";
|
|
32741
32781
|
});
|
|
32742
|
-
var EditableListItemControls$1 = styled__default.div(_templateObject3$
|
|
32743
|
-
var EditableListAction = styled__default.div(_templateObject4$
|
|
32782
|
+
var EditableListItemControls$1 = styled__default.div(_templateObject3$b());
|
|
32783
|
+
var EditableListAction = styled__default.div(_templateObject4$7(), MATISSE_BLUE, function (_ref6) {
|
|
32744
32784
|
var hide = _ref6.hide;
|
|
32745
32785
|
return hide ? "none" : "flex";
|
|
32746
32786
|
});
|
|
@@ -36412,6 +36452,123 @@ var createPartialAmountFormState = function createPartialAmountFormState(lineIte
|
|
|
36412
36452
|
};
|
|
36413
36453
|
};
|
|
36414
36454
|
|
|
36455
|
+
var PAGING_SPACE = 2; // how many pages we want to have before/after delimiter
|
|
36456
|
+
|
|
36457
|
+
var PAGING_INIT_SPACE = 3; // first delimiter should appear after 3 pages
|
|
36458
|
+
|
|
36459
|
+
var PrevNextButton = function PrevNextButton(_ref) {
|
|
36460
|
+
var action = _ref.action,
|
|
36461
|
+
type = _ref.type;
|
|
36462
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
36463
|
+
padding: "0 10px 0",
|
|
36464
|
+
minHeight: "40px",
|
|
36465
|
+
extraStyles: "max-height: 40px;"
|
|
36466
|
+
}, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
36467
|
+
action: action,
|
|
36468
|
+
contentOverride: true,
|
|
36469
|
+
dataQa: type,
|
|
36470
|
+
extraStyles: "\n min-width: 40px;\n min-height: 100%;\n max-height: 40px;\n padding: 6px;\n border-radius: 3px;\n "
|
|
36471
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
36472
|
+
padding: "0",
|
|
36473
|
+
extraStyles: type === "prev" && "transform: scaleX(-1)"
|
|
36474
|
+
}, /*#__PURE__*/React__default.createElement(ChevronIcon$1, {
|
|
36475
|
+
variant: "darkMode"
|
|
36476
|
+
}))));
|
|
36477
|
+
};
|
|
36478
|
+
|
|
36479
|
+
var getPagesPanel = function getPagesPanel(page, pagesCount) {
|
|
36480
|
+
if (!pagesCount || pagesCount <= 1) {
|
|
36481
|
+
return [];
|
|
36482
|
+
}
|
|
36483
|
+
|
|
36484
|
+
var lastPageNumber = pagesCount;
|
|
36485
|
+
var space = page === 1 ? PAGING_INIT_SPACE : PAGING_SPACE;
|
|
36486
|
+
var pages = [{
|
|
36487
|
+
index: 1,
|
|
36488
|
+
isButton: true
|
|
36489
|
+
}];
|
|
36490
|
+
|
|
36491
|
+
if (page > space + 1) {
|
|
36492
|
+
pages.push({
|
|
36493
|
+
isDelimiter: true
|
|
36494
|
+
});
|
|
36495
|
+
}
|
|
36496
|
+
|
|
36497
|
+
for (var j = Math.max(1, page - space) + 1; j < Math.min(lastPageNumber, page + space); j++) {
|
|
36498
|
+
pages.push({
|
|
36499
|
+
index: j,
|
|
36500
|
+
isButton: true
|
|
36501
|
+
});
|
|
36502
|
+
}
|
|
36503
|
+
|
|
36504
|
+
if (page < lastPageNumber - space) {
|
|
36505
|
+
pages.push({
|
|
36506
|
+
isDelimiter: true
|
|
36507
|
+
});
|
|
36508
|
+
}
|
|
36509
|
+
|
|
36510
|
+
pages.push({
|
|
36511
|
+
index: lastPageNumber,
|
|
36512
|
+
isButton: true
|
|
36513
|
+
});
|
|
36514
|
+
var activePage = pages.find(function (p) {
|
|
36515
|
+
return p.index === page;
|
|
36516
|
+
});
|
|
36517
|
+
|
|
36518
|
+
if (activePage) {
|
|
36519
|
+
activePage.active = true;
|
|
36520
|
+
}
|
|
36521
|
+
|
|
36522
|
+
return pages;
|
|
36523
|
+
};
|
|
36524
|
+
|
|
36525
|
+
var Pagination = function Pagination(_ref2) {
|
|
36526
|
+
var pagePrevious = _ref2.pagePrevious,
|
|
36527
|
+
pageNext = _ref2.pageNext,
|
|
36528
|
+
setCurrentPage = _ref2.setCurrentPage,
|
|
36529
|
+
currentPage = _ref2.currentPage,
|
|
36530
|
+
pageCount = _ref2.pageCount;
|
|
36531
|
+
return /*#__PURE__*/React__default.createElement(Cluster, {
|
|
36532
|
+
justify: "center",
|
|
36533
|
+
childGap: "10px"
|
|
36534
|
+
}, currentPage > 1 && /*#__PURE__*/React__default.createElement(PrevNextButton, {
|
|
36535
|
+
type: "prev",
|
|
36536
|
+
action: pagePrevious
|
|
36537
|
+
}), getPagesPanel(currentPage, pageCount).map(function (item, index) {
|
|
36538
|
+
return item.isButton ? /*#__PURE__*/React__default.createElement(Box, {
|
|
36539
|
+
padding: "0",
|
|
36540
|
+
border: item.active && "1px solid ".concat(MATISSE_BLUE),
|
|
36541
|
+
borderRadius: item.active && "3px",
|
|
36542
|
+
extraStyles: "max-height: 40px;"
|
|
36543
|
+
}, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
36544
|
+
variant: "ghost",
|
|
36545
|
+
key: item.index,
|
|
36546
|
+
text: item.index,
|
|
36547
|
+
disabled: item.active,
|
|
36548
|
+
action: !item.active ? function () {
|
|
36549
|
+
return setCurrentPage({
|
|
36550
|
+
pageNumber: item.index
|
|
36551
|
+
});
|
|
36552
|
+
} : noop,
|
|
36553
|
+
textExtraStyles: "font-size: 17px; font-weight: 900;",
|
|
36554
|
+
extraStyles: "\n min-width: 40px; min-height: 100%; padding: 0;\n &:hover, &:focus {\n text-decoration: none;\n > * > span {\n text-decoration: none;\n }\n }\n }\n &:hover { ".concat(item.active ? "cursor: default;" : "background-color: ".concat(ALABASTER_WHITE), " }\n "),
|
|
36555
|
+
dataQa: index
|
|
36556
|
+
}, item.index)) : /*#__PURE__*/React__default.createElement(Box, {
|
|
36557
|
+
padding: "0 10px"
|
|
36558
|
+
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
36559
|
+
justify: "flex-end"
|
|
36560
|
+
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
36561
|
+
key: index,
|
|
36562
|
+
variant: "pXL",
|
|
36563
|
+
weight: "900",
|
|
36564
|
+
color: MATISSE_BLUE
|
|
36565
|
+
}, "...")));
|
|
36566
|
+
}), currentPage < pageCount && /*#__PURE__*/React__default.createElement(PrevNextButton, {
|
|
36567
|
+
type: "next",
|
|
36568
|
+
action: pageNext
|
|
36569
|
+
}));
|
|
36570
|
+
};
|
|
36571
|
+
|
|
36415
36572
|
var PaymentButtonBar = function PaymentButtonBar(_ref) {
|
|
36416
36573
|
var _ref$forwardButtonTex = _ref.forwardButtonText,
|
|
36417
36574
|
forwardButtonText = _ref$forwardButtonTex === void 0 ? "Next" : _ref$forwardButtonTex,
|
|
@@ -37272,11 +37429,15 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
37272
37429
|
return toggleOpenSection(section.id);
|
|
37273
37430
|
},
|
|
37274
37431
|
tabIndex: "-1"
|
|
37275
|
-
})), /*#__PURE__*/React__default.createElement(
|
|
37432
|
+
})), section.titleIcon && /*#__PURE__*/React__default.createElement(Cluster, {
|
|
37433
|
+
align: "center"
|
|
37434
|
+
}, section.titleIcon), /*#__PURE__*/React__default.createElement(Box, {
|
|
37435
|
+
padding: section.titleIcon ? "0 0 0 8px" : "0"
|
|
37436
|
+
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
37276
37437
|
variant: "p",
|
|
37277
37438
|
color: CHARADE_GREY,
|
|
37278
37439
|
"aria-level": "3"
|
|
37279
|
-
}, section.title)), section.rightIcons && /*#__PURE__*/React__default.createElement(Cluster, {
|
|
37440
|
+
}, section.title))), section.rightIcons && /*#__PURE__*/React__default.createElement(Cluster, {
|
|
37280
37441
|
childGap: "0.5rem"
|
|
37281
37442
|
}, section.rightIcons.map(function (icon) {
|
|
37282
37443
|
return /*#__PURE__*/React__default.createElement(RightIcon, {
|
|
@@ -37865,7 +38026,10 @@ var Timeout$1 = withWindowSize(Timeout);
|
|
|
37865
38026
|
var WorkflowTile = function WorkflowTile(_ref) {
|
|
37866
38027
|
var _ref$workflowName = _ref.workflowName,
|
|
37867
38028
|
workflowName = _ref$workflowName === void 0 ? "Test Workflow" : _ref$workflowName,
|
|
37868
|
-
|
|
38029
|
+
_ref$workflowDescript = _ref.workflowDescription,
|
|
38030
|
+
workflowDescription = _ref$workflowDescript === void 0 ? "Link your benefit plan" : _ref$workflowDescript,
|
|
38031
|
+
_ref$workflowActionNa = _ref.workflowActionName,
|
|
38032
|
+
workflowActionName = _ref$workflowActionNa === void 0 ? "Search" : _ref$workflowActionNa,
|
|
37869
38033
|
slug = _ref.slug;
|
|
37870
38034
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
37871
38035
|
background: WHITE,
|
|
@@ -37888,7 +38052,7 @@ var WorkflowTile = function WorkflowTile(_ref) {
|
|
|
37888
38052
|
}, /*#__PURE__*/React__default.createElement(Paragraph$1, {
|
|
37889
38053
|
variant: "pS",
|
|
37890
38054
|
color: STORM_GREY
|
|
37891
|
-
}, workflowDescription
|
|
38055
|
+
}, workflowDescription)), /*#__PURE__*/React__default.createElement(Box, {
|
|
37892
38056
|
padding: "1.5rem 1rem",
|
|
37893
38057
|
background: GRECIAN_GREY
|
|
37894
38058
|
}, /*#__PURE__*/React__default.createElement(ButtonWithLink, {
|
|
@@ -37897,7 +38061,7 @@ var WorkflowTile = function WorkflowTile(_ref) {
|
|
|
37897
38061
|
fontWeight: FONT_WEIGHT_SEMIBOLD,
|
|
37898
38062
|
fontSize: "1.125rem",
|
|
37899
38063
|
borderRadius: "0px",
|
|
37900
|
-
text:
|
|
38064
|
+
text: workflowActionName,
|
|
37901
38065
|
minWidth: "100%",
|
|
37902
38066
|
url: "/service/".concat(slug),
|
|
37903
38067
|
extraStyles: "width: 100%;"
|
|
@@ -38245,6 +38409,7 @@ exports.NavHeader = NavHeader;
|
|
|
38245
38409
|
exports.NavMenuDesktop = NavMenuDesktop$1;
|
|
38246
38410
|
exports.NavMenuMobile = NavMenuMobile$1;
|
|
38247
38411
|
exports.Obligation = Obligation;
|
|
38412
|
+
exports.Pagination = Pagination;
|
|
38248
38413
|
exports.Paragraph = Paragraph$1;
|
|
38249
38414
|
exports.PartialAmountForm = PartialAmountForm;
|
|
38250
38415
|
exports.PasswordRequirements = PasswordRequirements;
|
package/package.json
CHANGED
|
@@ -28,7 +28,7 @@ const Alert = ({
|
|
|
28
28
|
borderSize="1px"
|
|
29
29
|
>
|
|
30
30
|
<Sidebar width="24px" childGap="0rem">
|
|
31
|
-
<Box padding="0 0 0 1rem" minHeight="100%">
|
|
31
|
+
<Box padding="0 0.5rem 0 1rem" minHeight="100%">
|
|
32
32
|
<Cover minHeight="100%" singleChild>
|
|
33
33
|
<Box padding="0" width="1.5rem" minHeight="1.5rem">
|
|
34
34
|
<Icon />
|
|
@@ -36,8 +36,8 @@ const Alert = ({
|
|
|
36
36
|
</Cover>
|
|
37
37
|
</Box>
|
|
38
38
|
<Box padding="0">
|
|
39
|
-
<Sidebar
|
|
40
|
-
<Box padding="1rem">
|
|
39
|
+
<Sidebar sidebarOnRight width="24px" childGap="0rem">
|
|
40
|
+
<Box padding="1rem 1rem 1rem 0.5rem">
|
|
41
41
|
<Cluster justify="flex-start" align="center">
|
|
42
42
|
<Stack fullHeight childGap="0.25rem">
|
|
43
43
|
<Text variant="p" color={themeValues.text} weight="600">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState, useContext } from "react";
|
|
2
|
-
import styled, { ThemeContext } from "styled-components";
|
|
2
|
+
import styled, { ThemeContext, css } from "styled-components";
|
|
3
3
|
import { FormattedInput } from "formatted-input";
|
|
4
4
|
import { fallbackValues } from "./FormLayouts.theme.js";
|
|
5
5
|
import { themeComponent } from "../../../util/themeUtils";
|
|
@@ -15,7 +15,7 @@ const InputField = styled.input`
|
|
|
15
15
|
? ERROR_COLOR
|
|
16
16
|
: themeValues.borderColor};
|
|
17
17
|
border-radius: 2px;
|
|
18
|
-
height: 48px;
|
|
18
|
+
height: ${({ customHeight }) => (customHeight ? customHeight : "48px")};
|
|
19
19
|
width: 100%;
|
|
20
20
|
padding: 1rem;
|
|
21
21
|
min-width: 100px;
|
|
@@ -38,6 +38,11 @@ const InputField = styled.input`
|
|
|
38
38
|
&:focus {
|
|
39
39
|
border: 1px solid ${MATISSE_BLUE};
|
|
40
40
|
}
|
|
41
|
+
|
|
42
|
+
${({ extraStyles }) =>
|
|
43
|
+
css`
|
|
44
|
+
${extraStyles}
|
|
45
|
+
`}
|
|
41
46
|
`;
|
|
42
47
|
|
|
43
48
|
// eslint-disable-next-line no-unused-vars
|
|
@@ -50,7 +55,7 @@ const FormattedInputField = styled(({ showErrors, ...props }) => (
|
|
|
50
55
|
? ERROR_COLOR
|
|
51
56
|
: themeValues.borderColor};
|
|
52
57
|
border-radius: 2px;
|
|
53
|
-
height: 48px;
|
|
58
|
+
height: ${({ customHeight }) => (customHeight ? customHeight : "48px")};
|
|
54
59
|
width: 100%;
|
|
55
60
|
padding: 1rem;
|
|
56
61
|
min-width: 100px;
|
|
@@ -68,6 +73,11 @@ const FormattedInputField = styled(({ showErrors, ...props }) => (
|
|
|
68
73
|
&:focus {
|
|
69
74
|
border: 1px solid ${MATISSE_BLUE};
|
|
70
75
|
}
|
|
76
|
+
|
|
77
|
+
${({ extraStyles }) =>
|
|
78
|
+
css`
|
|
79
|
+
${extraStyles}
|
|
80
|
+
`}
|
|
71
81
|
`;
|
|
72
82
|
|
|
73
83
|
const FormInput = ({
|
|
@@ -83,6 +93,8 @@ const FormInput = ({
|
|
|
83
93
|
decorator,
|
|
84
94
|
themeValues,
|
|
85
95
|
background,
|
|
96
|
+
customHeight,
|
|
97
|
+
extraStyles,
|
|
86
98
|
...props
|
|
87
99
|
}) => {
|
|
88
100
|
const [showPassword, setShowPassword] = useState(false);
|
|
@@ -167,6 +179,8 @@ const FormInput = ({
|
|
|
167
179
|
showErrors={showErrors}
|
|
168
180
|
data-qa={labelTextWhenNoError}
|
|
169
181
|
themeValues={themeValues}
|
|
182
|
+
customHeight={customHeight}
|
|
183
|
+
extraStyles={extraStyles}
|
|
170
184
|
{...props}
|
|
171
185
|
/>
|
|
172
186
|
) : (
|
|
@@ -182,6 +196,8 @@ const FormInput = ({
|
|
|
182
196
|
data-qa={labelTextWhenNoError}
|
|
183
197
|
themeValues={themeValues}
|
|
184
198
|
background={background}
|
|
199
|
+
customHeight={customHeight}
|
|
200
|
+
extraStyles={extraStyles}
|
|
185
201
|
{...props}
|
|
186
202
|
/>
|
|
187
203
|
)}
|
|
@@ -10,6 +10,7 @@ const NavFooter = ({
|
|
|
10
10
|
largeSideSize = "2",
|
|
11
11
|
footerPadding = "1.5rem 1rem",
|
|
12
12
|
isMobile,
|
|
13
|
+
footerWidth,
|
|
13
14
|
...rest
|
|
14
15
|
}) => (
|
|
15
16
|
<Box
|
|
@@ -24,7 +25,7 @@ const NavFooter = ({
|
|
|
24
25
|
}
|
|
25
26
|
{...rest}
|
|
26
27
|
>
|
|
27
|
-
<Center maxWidth="76.5rem">
|
|
28
|
+
<Center maxWidth={footerWidth || "76.5rem"}>
|
|
28
29
|
<Cover singleChild minHeight="100%">
|
|
29
30
|
<Box minHeight="100%" padding="0">
|
|
30
31
|
<Switcher
|
|
@@ -7,6 +7,7 @@ const NavHeader = ({
|
|
|
7
7
|
headerHeight = "105px",
|
|
8
8
|
isMobile,
|
|
9
9
|
backgroundColor,
|
|
10
|
+
headerWidth,
|
|
10
11
|
...rest
|
|
11
12
|
}) => (
|
|
12
13
|
<Box
|
|
@@ -20,7 +21,7 @@ const NavHeader = ({
|
|
|
20
21
|
minWidth="100%"
|
|
21
22
|
{...rest}
|
|
22
23
|
>
|
|
23
|
-
<Center maxWidth="76.5rem">
|
|
24
|
+
<Center maxWidth={headerWidth || "76.5rem"}>
|
|
24
25
|
<Box minHeight="100%" padding="0">
|
|
25
26
|
<Cover singleChild minHeight={isMobile ? "72px" : headerHeight}>
|
|
26
27
|
<Cluster justify="space-between" align="center" overflow>
|
|
@@ -13,6 +13,7 @@ export { default as Module } from "./module";
|
|
|
13
13
|
export * from "./nav-menu";
|
|
14
14
|
export { default as Obligation } from "./obligation";
|
|
15
15
|
export * from "./partial-amount-form";
|
|
16
|
+
export { default as Pagination } from "./pagination";
|
|
16
17
|
export { default as PaymentButtonBar } from "./payment-button-bar";
|
|
17
18
|
export { default as PaymentDetails } from "./payment-details";
|
|
18
19
|
export { default as PaymentFormACH } from "./payment-form-ach";
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Cluster, Box } from "../../atoms/layouts";
|
|
3
|
+
import Text from "../../atoms/text";
|
|
4
|
+
import ButtonWithAction from "../../atoms/button-with-action";
|
|
5
|
+
import { ChevronIcon } from "../../atoms/icons";
|
|
6
|
+
import { MATISSE_BLUE, ALABASTER_WHITE } from "../../../constants/colors";
|
|
7
|
+
import { noop } from "../../../util/general";
|
|
8
|
+
|
|
9
|
+
const PAGING_SPACE = 2; // how many pages we want to have before/after delimiter
|
|
10
|
+
const PAGING_INIT_SPACE = 3; // first delimiter should appear after 3 pages
|
|
11
|
+
|
|
12
|
+
const PrevNextButton = ({ action, type }) => (
|
|
13
|
+
<Box padding="0 10px 0" minHeight="40px" extraStyles="max-height: 40px;">
|
|
14
|
+
<ButtonWithAction
|
|
15
|
+
action={action}
|
|
16
|
+
contentOverride
|
|
17
|
+
dataQa={type}
|
|
18
|
+
extraStyles={`
|
|
19
|
+
min-width: 40px;
|
|
20
|
+
min-height: 100%;
|
|
21
|
+
max-height: 40px;
|
|
22
|
+
padding: 6px;
|
|
23
|
+
border-radius: 3px;
|
|
24
|
+
`}
|
|
25
|
+
>
|
|
26
|
+
<Box padding="0" extraStyles={type === "prev" && "transform: scaleX(-1)"}>
|
|
27
|
+
<ChevronIcon variant="darkMode" />
|
|
28
|
+
</Box>
|
|
29
|
+
</ButtonWithAction>
|
|
30
|
+
</Box>
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
export const getPagesPanel = (page, pagesCount) => {
|
|
34
|
+
if (!pagesCount || pagesCount <= 1) {
|
|
35
|
+
return [];
|
|
36
|
+
}
|
|
37
|
+
const lastPageNumber = pagesCount;
|
|
38
|
+
const space = page === 1 ? PAGING_INIT_SPACE : PAGING_SPACE;
|
|
39
|
+
const pages = [{ index: 1, isButton: true }];
|
|
40
|
+
if (page > space + 1) {
|
|
41
|
+
pages.push({ isDelimiter: true });
|
|
42
|
+
}
|
|
43
|
+
for (
|
|
44
|
+
let j = Math.max(1, page - space) + 1;
|
|
45
|
+
j < Math.min(lastPageNumber, page + space);
|
|
46
|
+
j++
|
|
47
|
+
) {
|
|
48
|
+
pages.push({ index: j, isButton: true });
|
|
49
|
+
}
|
|
50
|
+
if (page < lastPageNumber - space) {
|
|
51
|
+
pages.push({ isDelimiter: true });
|
|
52
|
+
}
|
|
53
|
+
pages.push({ index: lastPageNumber, isButton: true });
|
|
54
|
+
const activePage = pages.find(p => p.index === page);
|
|
55
|
+
if (activePage) {
|
|
56
|
+
activePage.active = true;
|
|
57
|
+
}
|
|
58
|
+
return pages;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const Pagination = ({
|
|
62
|
+
pagePrevious,
|
|
63
|
+
pageNext,
|
|
64
|
+
setCurrentPage,
|
|
65
|
+
currentPage,
|
|
66
|
+
pageCount
|
|
67
|
+
}) => (
|
|
68
|
+
<Cluster justify="center" childGap="10px">
|
|
69
|
+
{currentPage > 1 && <PrevNextButton type="prev" action={pagePrevious} />}
|
|
70
|
+
{getPagesPanel(currentPage, pageCount).map((item, index) =>
|
|
71
|
+
item.isButton ? (
|
|
72
|
+
<Box
|
|
73
|
+
padding="0"
|
|
74
|
+
border={item.active && `1px solid ${MATISSE_BLUE}`}
|
|
75
|
+
borderRadius={item.active && "3px"}
|
|
76
|
+
extraStyles="max-height: 40px;"
|
|
77
|
+
>
|
|
78
|
+
<ButtonWithAction
|
|
79
|
+
variant="ghost"
|
|
80
|
+
key={item.index}
|
|
81
|
+
text={item.index}
|
|
82
|
+
disabled={item.active}
|
|
83
|
+
action={
|
|
84
|
+
!item.active
|
|
85
|
+
? () => setCurrentPage({ pageNumber: item.index })
|
|
86
|
+
: noop
|
|
87
|
+
}
|
|
88
|
+
textExtraStyles={`font-size: 17px; font-weight: 900;`}
|
|
89
|
+
extraStyles={`
|
|
90
|
+
min-width: 40px; min-height: 100%; padding: 0;
|
|
91
|
+
&:hover, &:focus {
|
|
92
|
+
text-decoration: none;
|
|
93
|
+
> * > span {
|
|
94
|
+
text-decoration: none;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
&:hover { ${
|
|
99
|
+
item.active
|
|
100
|
+
? "cursor: default;"
|
|
101
|
+
: `background-color: ${ALABASTER_WHITE}`
|
|
102
|
+
} }
|
|
103
|
+
`}
|
|
104
|
+
dataQa={index}
|
|
105
|
+
>
|
|
106
|
+
{item.index}
|
|
107
|
+
</ButtonWithAction>
|
|
108
|
+
</Box>
|
|
109
|
+
) : (
|
|
110
|
+
<Box padding="0 10px">
|
|
111
|
+
<Cluster justify="flex-end">
|
|
112
|
+
<Text key={index} variant="pXL" weight="900" color={MATISSE_BLUE}>
|
|
113
|
+
{"..."}
|
|
114
|
+
</Text>
|
|
115
|
+
</Cluster>
|
|
116
|
+
</Box>
|
|
117
|
+
)
|
|
118
|
+
)}
|
|
119
|
+
{currentPage < pageCount && (
|
|
120
|
+
<PrevNextButton type="next" action={pageNext} />
|
|
121
|
+
)}
|
|
122
|
+
</Cluster>
|
|
123
|
+
);
|
|
124
|
+
|
|
125
|
+
export default Pagination;
|
|
@@ -160,9 +160,14 @@ const RadioSection = ({
|
|
|
160
160
|
/>
|
|
161
161
|
</Box>
|
|
162
162
|
)}
|
|
163
|
-
|
|
164
|
-
{section.
|
|
165
|
-
|
|
163
|
+
{section.titleIcon && (
|
|
164
|
+
<Cluster align="center">{section.titleIcon}</Cluster>
|
|
165
|
+
)}
|
|
166
|
+
<Box padding={section.titleIcon ? "0 0 0 8px" : "0"}>
|
|
167
|
+
<Text variant="p" color={CHARADE_GREY} aria-level="3">
|
|
168
|
+
{section.title}
|
|
169
|
+
</Text>
|
|
170
|
+
</Box>
|
|
166
171
|
</Cluster>
|
|
167
172
|
{section.rightIcons && (
|
|
168
173
|
<Cluster childGap="0.5rem">
|
|
@@ -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%;`}
|
|
@@ -11,7 +11,7 @@ export const AlertSuccessIcon = () => (
|
|
|
11
11
|
<defs>
|
|
12
12
|
<path
|
|
13
13
|
d="M12,24 C18.627417,24 24,18.627417 24,12 C24,5.372583 18.627417,0 12,0 C5.372583,0 0,5.372583 0,12 C0,18.627417 5.372583,24 12,24 Z M16.9497475,7.46446609 L18.363961,8.87867966 L9.87867966,17.363961 L5.63603897,13.1213203 L7.05025253,11.7071068 L9.87803897,14.5354661 L16.9497475,7.46446609 Z"
|
|
14
|
-
id="
|
|
14
|
+
id="alertSuccess"
|
|
15
15
|
></path>
|
|
16
16
|
</defs>
|
|
17
17
|
<g
|
|
@@ -27,13 +27,13 @@ export const AlertSuccessIcon = () => (
|
|
|
27
27
|
transform="translate(24.000000, 34.000000)"
|
|
28
28
|
>
|
|
29
29
|
<mask id="mask-2" fill="white">
|
|
30
|
-
<use xlinkHref="#
|
|
30
|
+
<use xlinkHref="#alertSuccess"></use>
|
|
31
31
|
</mask>
|
|
32
32
|
<use
|
|
33
33
|
id="background-2"
|
|
34
34
|
fill="#47B872"
|
|
35
35
|
fillRule="nonzero"
|
|
36
|
-
xlinkHref="#
|
|
36
|
+
xlinkHref="#alertSuccess"
|
|
37
37
|
></use>
|
|
38
38
|
</g>
|
|
39
39
|
</g>
|