@thecb/components 3.1.4-beta.0 → 3.1.10
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/.storybook/page.js +5 -4
- package/.tool-versions +1 -0
- package/dist/index.cjs.js +113 -100
- package/package.json +5 -5
- package/src/components/atoms/alert/Alert.stories.js +28 -0
- package/src/components/atoms/amount-callout/AmountCallout.stories.js +41 -0
- package/src/components/atoms/amount-callout/AmountCallout.theme.js +4 -4
- package/src/components/atoms/breadcrumb/Breadcrumb.stories.js +38 -0
- package/src/components/atoms/button-with-link/ButtonWithLink.stories.js +32 -0
- package/src/components/atoms/checkbox/Checkbox.stories.js +29 -0
- package/src/components/atoms/checkbox-list/CheckboxList.stories.js +50 -0
- package/src/components/atoms/country-dropdown/CountryDropdown.stories.js +42 -0
- package/src/components/atoms/display-box/DisplayBox.stories.js +25 -0
- package/src/components/atoms/display-card/DisplayCard.js +2 -0
- package/src/components/atoms/display-card/DisplayCard.stories.js +24 -0
- package/src/components/atoms/form-layouts/FormLayouts.stories.js +72 -0
- package/src/components/atoms/form-select/FormSelect.stories.js +44 -0
- package/src/components/atoms/formatted-address/FormattedAddress.js +1 -3
- package/src/components/atoms/formatted-address/FormattedAddress.stories.js +32 -0
- package/src/components/atoms/hamburger-button/HamburgerButton.js +7 -1
- package/src/components/atoms/hamburger-button/HamburgerButton.stories.js +21 -0
- package/src/components/atoms/heading/Heading.stories.js +20 -0
- package/src/components/atoms/icons/icons.stories.js +50 -0
- package/src/components/atoms/labeled-amount/LabeledAmount.js +1 -1
- package/src/components/atoms/labeled-amount/LabeledAmount.stories.js +29 -0
- package/src/components/atoms/layouts/Cluster.js +2 -0
- package/src/components/atoms/layouts/Cluster.styled.js +1 -1
- package/src/components/atoms/layouts/examples/ResizingContainer.js +3 -1
- package/src/components/atoms/layouts/examples/ResizingContainer.styled.js +1 -1
- package/src/components/atoms/layouts/examples/box-example/BoxExample.stories.js +58 -0
- package/src/components/atoms/layouts/examples/center-example/CenterExample.stories.js +28 -0
- package/src/components/atoms/layouts/examples/cover-example/CoverExample.stories.js +53 -0
- package/src/components/atoms/layouts/examples/frame-example/FrameExample.stories.js +22 -0
- package/src/components/atoms/layouts/examples/imposter-example/ImposterExample.stories.js +35 -0
- package/src/components/atoms/layouts/examples/motion-example/MotionExample.stories.js +62 -0
- package/src/components/atoms/layouts/examples/reel-example/ReelExample.stories.js +57 -0
- package/src/components/atoms/line-item/LineItem.js +2 -2
- package/src/components/atoms/line-item/LineItem.stories.js +19 -0
- package/src/components/atoms/link/ExternalLink.js +1 -3
- package/src/components/atoms/link/InternalLink.styled.js +0 -2
- package/src/components/atoms/link/Link.stories.js +57 -0
- package/src/components/atoms/link/Link.theme.js +3 -2
- package/src/components/atoms/nav-footer/NavFooter.stories.js +31 -0
- package/src/components/atoms/nav-header/NavHeader.stories.js +29 -0
- package/src/components/atoms/paragraph/Paragraph.stories.js +34 -0
- package/src/components/atoms/paragraph/Paragraph.theme.js +6 -2
- package/src/components/atoms/password-requirements/PasswordRequirements.stories.js +75 -0
- package/src/components/atoms/placeholder/Placeholder.js +16 -16
- package/src/components/atoms/placeholder/Placeholder.stories.js +38 -0
- package/src/components/atoms/processing-fee/ProcessingFee.stories.js +28 -0
- package/src/components/atoms/solid-divider/SolidDivider.stories.js +11 -0
- package/src/components/atoms/spinner/Spinner.stories.js +17 -0
- package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.stories.js +52 -0
- package/src/components/atoms/text/Text.stories.js +34 -0
- package/src/components/atoms/text/Text.theme.js +6 -2
- package/src/components/molecules/collapsible-section/CollapsibleSection.js +2 -1
- package/src/components/molecules/collapsible-section/CollapsibleSection.stories.js +68 -0
- package/src/components/molecules/highlight-tab-row/HighlightTabRow.js +8 -3
- package/src/components/molecules/highlight-tab-row/HighlightTabRow.stories.js +30 -0
- package/src/components/molecules/highlight-tab-row/index.js +1 -6
- package/src/components/molecules/modal/Modal.stories.js +44 -0
- package/src/components/molecules/module/Module.js +6 -2
- package/src/components/molecules/module/Module.stories.js +31 -0
- package/src/components/molecules/module/index.js +1 -6
- package/src/components/molecules/obligation/Obligation.js +1 -1
- package/src/components/molecules/obligation/modules/AmountModule.js +6 -2
- package/src/components/molecules/payment-button-bar/PaymentButtonBar.stories.js +20 -0
- package/src/components/molecules/payment-details/PaymentDetails.stories.js +71 -0
- package/src/components/molecules/radio-section/RadioSection.stories.js +31 -0
- package/src/components/molecules/tab-sidebar/TabSidebar.stories.js +59 -0
- package/src/components/molecules/terms-and-conditions/TermsAndConditions.stories.js +24 -0
- package/src/components/molecules/terms-and-conditions-modal/TermsAndConditionsModal.stories.js +31 -0
- package/src/components/molecules/workflow-tile/WorkflowTile.stories.js +25 -0
- package/dist/cb-components.esm.js +0 -23576
- package/dist/cb-components.js +0 -94714
- package/dist/index.esm.js +0 -36084
package/.storybook/page.js
CHANGED
|
@@ -30,7 +30,7 @@ const themeDecorator = storyFn => (
|
|
|
30
30
|
<ThemeProvider theme={select(themesLabel, themes, defaultValue, groupId)}>{storyFn()}</ThemeProvider>
|
|
31
31
|
)
|
|
32
32
|
|
|
33
|
-
export default ({ title, Component, reducer = () => { }}) => {
|
|
33
|
+
export default ({ title, Component, height, reducer = () => { }, containerMax = "40rem", containerMin = "20rem" }) => {
|
|
34
34
|
const history = createBrowserHistory();
|
|
35
35
|
const store =createStore(
|
|
36
36
|
reducer,
|
|
@@ -45,11 +45,12 @@ export default ({ title, Component, reducer = () => { }}) => {
|
|
|
45
45
|
storyFn => (
|
|
46
46
|
<Router history={history} >
|
|
47
47
|
<Provider store={store}>
|
|
48
|
-
<div style={{ height: "
|
|
48
|
+
<div style={{ height: "max-content", display: "flex", justifyContent: "center", flexDirection: "column" }}>
|
|
49
49
|
<ResizingContainer
|
|
50
|
+
height={height}
|
|
50
51
|
animate={radios(animateLabel, animateOptions, animateDefaultValue, animateGroupID)}
|
|
51
|
-
containerMax={text("Container Max",
|
|
52
|
-
containerMin={text("Container Min",
|
|
52
|
+
containerMax={text("Container Max", containerMax, animateGroupID)}
|
|
53
|
+
containerMin={text("Container Min", containerMin, animateGroupID)}>
|
|
53
54
|
{storyFn()}
|
|
54
55
|
</ResizingContainer >
|
|
55
56
|
</div>
|
package/.tool-versions
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
nodejs 10.13.0
|
package/dist/index.cjs.js
CHANGED
|
@@ -2179,7 +2179,7 @@ var Center = function Center(_ref) {
|
|
|
2179
2179
|
};
|
|
2180
2180
|
|
|
2181
2181
|
function _templateObject2$1() {
|
|
2182
|
-
var data = _taggedTemplateLiteral(["\n box-sizing: border-box;\n display: flex;\n flex-wrap:
|
|
2182
|
+
var data = _taggedTemplateLiteral(["\n box-sizing: border-box;\n display: flex;\n flex-wrap: ", ";\n justify-content: ", ";\n align-items: ", ";\n margin: calc(", " / 2 * -1);\n min-height: ", ";\n min-width: ", ";\n\n > * {\n margin: calc(", " / 2);\n }\n"]);
|
|
2183
2183
|
|
|
2184
2184
|
_templateObject2$1 = function _templateObject2() {
|
|
2185
2185
|
return data;
|
|
@@ -2202,22 +2202,25 @@ var ClusterWrapper = styled__default.div(_templateObject$2(), function (_ref) {
|
|
|
2202
2202
|
return overflow ? "visible" : "hidden";
|
|
2203
2203
|
});
|
|
2204
2204
|
var ClusterInnerWrapper = styled__default.div(_templateObject2$1(), function (_ref2) {
|
|
2205
|
-
var
|
|
2206
|
-
return
|
|
2205
|
+
var nowrap = _ref2.nowrap;
|
|
2206
|
+
return nowrap ? "nowrap" : "wrap";
|
|
2207
2207
|
}, function (_ref3) {
|
|
2208
|
-
var
|
|
2209
|
-
return
|
|
2208
|
+
var justify = _ref3.justify;
|
|
2209
|
+
return justify;
|
|
2210
2210
|
}, function (_ref4) {
|
|
2211
|
-
var
|
|
2212
|
-
return
|
|
2211
|
+
var align = _ref4.align;
|
|
2212
|
+
return align;
|
|
2213
2213
|
}, function (_ref5) {
|
|
2214
|
-
var
|
|
2215
|
-
return
|
|
2214
|
+
var childGap = _ref5.childGap;
|
|
2215
|
+
return childGap;
|
|
2216
2216
|
}, function (_ref6) {
|
|
2217
|
-
var
|
|
2218
|
-
return
|
|
2217
|
+
var minHeight = _ref6.minHeight;
|
|
2218
|
+
return minHeight;
|
|
2219
2219
|
}, function (_ref7) {
|
|
2220
|
-
var
|
|
2220
|
+
var minWidth = _ref7.minWidth;
|
|
2221
|
+
return minWidth;
|
|
2222
|
+
}, function (_ref8) {
|
|
2223
|
+
var childGap = _ref8.childGap;
|
|
2221
2224
|
return childGap;
|
|
2222
2225
|
});
|
|
2223
2226
|
|
|
@@ -2236,10 +2239,11 @@ var Cluster = function Cluster(_ref) {
|
|
|
2236
2239
|
childGap = _ref.childGap,
|
|
2237
2240
|
minHeight = _ref.minHeight,
|
|
2238
2241
|
minWidth = _ref.minWidth,
|
|
2242
|
+
nowrap = _ref.nowrap,
|
|
2239
2243
|
_ref$overflow = _ref.overflow,
|
|
2240
2244
|
overflow = _ref$overflow === void 0 ? false : _ref$overflow,
|
|
2241
2245
|
children = _ref.children,
|
|
2242
|
-
rest = _objectWithoutProperties(_ref, ["justify", "align", "childGap", "minHeight", "minWidth", "overflow", "children"]);
|
|
2246
|
+
rest = _objectWithoutProperties(_ref, ["justify", "align", "childGap", "minHeight", "minWidth", "nowrap", "overflow", "children"]);
|
|
2243
2247
|
|
|
2244
2248
|
return /*#__PURE__*/React__default.createElement(ClusterWrapper, _extends({
|
|
2245
2249
|
overflow: overflow
|
|
@@ -2248,7 +2252,8 @@ var Cluster = function Cluster(_ref) {
|
|
|
2248
2252
|
align: align,
|
|
2249
2253
|
childGap: childGap,
|
|
2250
2254
|
minHeight: minHeight,
|
|
2251
|
-
minWidth: minWidth
|
|
2255
|
+
minWidth: minWidth,
|
|
2256
|
+
nowrap: nowrap
|
|
2252
2257
|
}, safeChildren(children, /*#__PURE__*/React__default.createElement(React.Fragment, null))));
|
|
2253
2258
|
};
|
|
2254
2259
|
|
|
@@ -9541,8 +9546,12 @@ var Reel = function Reel(_ref) {
|
|
|
9541
9546
|
};
|
|
9542
9547
|
|
|
9543
9548
|
var fontFamily = {
|
|
9544
|
-
|
|
9545
|
-
|
|
9549
|
+
p: "Public Sans",
|
|
9550
|
+
pL: "Public Sans",
|
|
9551
|
+
pS: "Public Sans",
|
|
9552
|
+
pXS: "Public Sans",
|
|
9553
|
+
pXXS: "Public Sans",
|
|
9554
|
+
pXL: "Public Sans"
|
|
9546
9555
|
}; // Text uses the same variants as paragraph
|
|
9547
9556
|
// Use a Paragraph if you want a block level element
|
|
9548
9557
|
// Use a Text if you want an inline element
|
|
@@ -9987,14 +9996,14 @@ var Heading = function Heading(_ref) {
|
|
|
9987
9996
|
var Heading$1 = themeComponent(Heading, "Heading", fallbackValues$2, "h1");
|
|
9988
9997
|
|
|
9989
9998
|
var fontSize$2 = {
|
|
9990
|
-
large: "1.
|
|
9991
|
-
medium: "1.
|
|
9999
|
+
large: "1.5rem",
|
|
10000
|
+
medium: "1.25rem",
|
|
9992
10001
|
small: "1.094rem"
|
|
9993
10002
|
};
|
|
9994
10003
|
var color$1 = "#15749D";
|
|
9995
10004
|
var lineHeight = {
|
|
9996
|
-
large: "
|
|
9997
|
-
medium: "
|
|
10005
|
+
large: "2rem",
|
|
10006
|
+
medium: "1.875rem",
|
|
9998
10007
|
small: "1.641rem"
|
|
9999
10008
|
};
|
|
10000
10009
|
var fallbackValues$3 = {
|
|
@@ -10052,10 +10061,12 @@ var fontFamily$2 = {
|
|
|
10052
10061
|
};
|
|
10053
10062
|
var hoverColor = "#116285";
|
|
10054
10063
|
var activeColor$1 = "#0E506D";
|
|
10064
|
+
var externalLinkColor = "#15749D";
|
|
10055
10065
|
var fallbackValues$5 = {
|
|
10056
10066
|
fontFamily: fontFamily$2,
|
|
10057
10067
|
hoverColor: hoverColor,
|
|
10058
|
-
activeColor: activeColor$1
|
|
10068
|
+
activeColor: activeColor$1,
|
|
10069
|
+
externalLinkColor: externalLinkColor
|
|
10059
10070
|
};
|
|
10060
10071
|
|
|
10061
10072
|
function _templateObject$e() {
|
|
@@ -10113,8 +10124,6 @@ var ExternalLink = function ExternalLink(_ref) {
|
|
|
10113
10124
|
href = _ref$href === void 0 ? "" : _ref$href,
|
|
10114
10125
|
_ref$newTab = _ref.newTab,
|
|
10115
10126
|
newTab = _ref$newTab === void 0 ? false : _ref$newTab,
|
|
10116
|
-
_ref$color = _ref.color,
|
|
10117
|
-
color = _ref$color === void 0 ? CONGRESS_BLUE : _ref$color,
|
|
10118
10127
|
_ref$size = _ref.size,
|
|
10119
10128
|
size = _ref$size === void 0 ? "1rem" : _ref$size,
|
|
10120
10129
|
_ref$lineHeight = _ref.lineHeight,
|
|
@@ -10133,7 +10142,7 @@ var ExternalLink = function ExternalLink(_ref) {
|
|
|
10133
10142
|
return /*#__PURE__*/React__default.createElement(StyledExternalLink, {
|
|
10134
10143
|
href: href,
|
|
10135
10144
|
target: newTab ? "_blank" : "",
|
|
10136
|
-
color:
|
|
10145
|
+
color: themeValues.externalLinkColor,
|
|
10137
10146
|
size: size,
|
|
10138
10147
|
lineheight: lineHeight,
|
|
10139
10148
|
weight: weight,
|
|
@@ -10147,7 +10156,7 @@ var ExternalLink = function ExternalLink(_ref) {
|
|
|
10147
10156
|
};
|
|
10148
10157
|
|
|
10149
10158
|
function _templateObject$f() {
|
|
10150
|
-
var data = _taggedTemplateLiteral(["\n display: flex;\n color: ", ";\n font-weight: ", ";\n line-height: ", ";\n font-size: ", ";\n font-family: ", ";\n margin: ", ";\n
|
|
10159
|
+
var data = _taggedTemplateLiteral(["\n display: flex;\n color: ", ";\n font-weight: ", ";\n line-height: ", ";\n font-size: ", ";\n font-family: ", ";\n margin: ", ";\n\n &:hover,\n &:focus {\n color: ", ";\n text-decoration: underline;\n }\n\n &:active {\n text-decoration: underline;\n color: ", ";\n }\n\n ", "\n"]);
|
|
10151
10160
|
|
|
10152
10161
|
_templateObject$f = function _templateObject() {
|
|
10153
10162
|
return data;
|
|
@@ -10192,16 +10201,13 @@ var StyledInternalLink = styled__default(function (_ref) {
|
|
|
10192
10201
|
var margin = _ref7.margin;
|
|
10193
10202
|
return margin;
|
|
10194
10203
|
}, function (_ref8) {
|
|
10195
|
-
var
|
|
10196
|
-
return active === "true" ? "underline" : "none";
|
|
10197
|
-
}, function (_ref9) {
|
|
10198
|
-
var hoverColor = _ref9.hoverColor;
|
|
10204
|
+
var hoverColor = _ref8.hoverColor;
|
|
10199
10205
|
return hoverColor;
|
|
10200
|
-
}, function (
|
|
10201
|
-
var activeColor =
|
|
10206
|
+
}, function (_ref9) {
|
|
10207
|
+
var activeColor = _ref9.activeColor;
|
|
10202
10208
|
return activeColor;
|
|
10203
|
-
}, function (
|
|
10204
|
-
var extrastyles =
|
|
10209
|
+
}, function (_ref10) {
|
|
10210
|
+
var extrastyles = _ref10.extrastyles;
|
|
10205
10211
|
return extrastyles;
|
|
10206
10212
|
});
|
|
10207
10213
|
/* eslint-enable no-unused-vars */
|
|
@@ -15252,8 +15258,12 @@ var DisplayBox = function DisplayBox(_ref) {
|
|
|
15252
15258
|
var DisplayBox$1 = themeComponent(DisplayBox, "DisplayBox", fallbackValues$a);
|
|
15253
15259
|
|
|
15254
15260
|
var fontFamily$3 = {
|
|
15255
|
-
|
|
15256
|
-
|
|
15261
|
+
p: "Public Sans",
|
|
15262
|
+
pL: "Public Sans",
|
|
15263
|
+
pS: "Public Sans",
|
|
15264
|
+
pXS: "Public Sans",
|
|
15265
|
+
pXXS: "Public Sans",
|
|
15266
|
+
pXL: "Public Sans"
|
|
15257
15267
|
};
|
|
15258
15268
|
var fontSize$4 = {
|
|
15259
15269
|
p: "1rem",
|
|
@@ -15358,12 +15368,14 @@ var DisplayCard = function DisplayCard(_ref) {
|
|
|
15358
15368
|
text: buttonText,
|
|
15359
15369
|
url: url,
|
|
15360
15370
|
variant: "smallGhost",
|
|
15361
|
-
dataQa: buttonText
|
|
15371
|
+
dataQa: buttonText,
|
|
15372
|
+
extraStyles: "min-width: 0;"
|
|
15362
15373
|
}) : /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
15363
15374
|
text: buttonText,
|
|
15364
15375
|
action: buttonAction,
|
|
15365
15376
|
variant: "smallGhost",
|
|
15366
|
-
dataQa: buttonText
|
|
15377
|
+
dataQa: buttonText,
|
|
15378
|
+
extraStyles: "min-width: 0;"
|
|
15367
15379
|
}))))));
|
|
15368
15380
|
};
|
|
15369
15381
|
|
|
@@ -16022,8 +16034,7 @@ var fallbackValues$d = {
|
|
|
16022
16034
|
};
|
|
16023
16035
|
|
|
16024
16036
|
var FormattedAddress = function FormattedAddress(_ref) {
|
|
16025
|
-
var
|
|
16026
|
-
street1 = _ref.street1,
|
|
16037
|
+
var street1 = _ref.street1,
|
|
16027
16038
|
city = _ref.city,
|
|
16028
16039
|
stateProvince = _ref.stateProvince,
|
|
16029
16040
|
country = _ref.country,
|
|
@@ -16032,14 +16043,11 @@ var FormattedAddress = function FormattedAddress(_ref) {
|
|
|
16032
16043
|
street2 = _ref$street === void 0 ? null : _ref$street,
|
|
16033
16044
|
_ref$name = _ref.name,
|
|
16034
16045
|
name = _ref$name === void 0 ? null : _ref$name,
|
|
16035
|
-
isRadio = _ref.isRadio,
|
|
16036
16046
|
themeValues = _ref.themeValues,
|
|
16037
16047
|
_ref$qaPrefix = _ref.qaPrefix,
|
|
16038
16048
|
qaPrefix = _ref$qaPrefix === void 0 ? "address" : _ref$qaPrefix;
|
|
16039
16049
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
16040
|
-
padding: themeValues.padding
|
|
16041
|
-
isActive: isActive,
|
|
16042
|
-
isRadio: isRadio
|
|
16050
|
+
padding: themeValues.padding
|
|
16043
16051
|
}, name && /*#__PURE__*/React__default.createElement(Text$1, {
|
|
16044
16052
|
variant: "p",
|
|
16045
16053
|
color: themeValues.color,
|
|
@@ -16200,7 +16208,8 @@ var HamburgerButton = function HamburgerButton(_ref4) {
|
|
|
16200
16208
|
var activeColor = _ref4.activeColor,
|
|
16201
16209
|
inactiveColor = _ref4.inactiveColor,
|
|
16202
16210
|
isActive = _ref4.isActive,
|
|
16203
|
-
onClick = _ref4.onClick
|
|
16211
|
+
_ref4$onClick = _ref4.onClick,
|
|
16212
|
+
onClick = _ref4$onClick === void 0 ? noop : _ref4$onClick;
|
|
16204
16213
|
return /*#__PURE__*/React__default.createElement(Hamburger, {
|
|
16205
16214
|
className: isActive === true ? "active" : "",
|
|
16206
16215
|
onClick: onClick,
|
|
@@ -17178,7 +17187,7 @@ var LabeledAmount = function LabeledAmount(_ref) {
|
|
|
17178
17187
|
}, /*#__PURE__*/React__default.createElement(LabeledAmountText, {
|
|
17179
17188
|
variant: variant,
|
|
17180
17189
|
weight: themeValues.fontWeight,
|
|
17181
|
-
extraStyles: "text-align:
|
|
17190
|
+
extraStyles: "text-align: start; flex: 3;"
|
|
17182
17191
|
}, label, ":"), /*#__PURE__*/React__default.createElement(LabeledAmountText, {
|
|
17183
17192
|
variant: variant,
|
|
17184
17193
|
weight: themeValues.fontWeight,
|
|
@@ -17207,6 +17216,7 @@ var LineItem = function LineItem(_ref) {
|
|
|
17207
17216
|
amount = _ref.amount,
|
|
17208
17217
|
themeValues = _ref.themeValues;
|
|
17209
17218
|
return /*#__PURE__*/React__default.createElement(Cluster, {
|
|
17219
|
+
nowrap: true,
|
|
17210
17220
|
justify: "space-between",
|
|
17211
17221
|
align: "start"
|
|
17212
17222
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
@@ -17220,7 +17230,7 @@ var LineItem = function LineItem(_ref) {
|
|
|
17220
17230
|
}, subDescription)), /*#__PURE__*/React__default.createElement(Paragraph$1, {
|
|
17221
17231
|
variant: themeValues.paragraphVariant,
|
|
17222
17232
|
weight: "600",
|
|
17223
|
-
extraStyles: "margin: 0;"
|
|
17233
|
+
extraStyles: "margin: 0; text-align: end; min-width: fit-content; padding-left: 32px;"
|
|
17224
17234
|
}, amount));
|
|
17225
17235
|
};
|
|
17226
17236
|
|
|
@@ -17742,7 +17752,12 @@ var Placeholder = function Placeholder(_ref2) {
|
|
|
17742
17752
|
var _useContext = React.useContext(styled.ThemeContext),
|
|
17743
17753
|
isMobile = _useContext.isMobile;
|
|
17744
17754
|
|
|
17745
|
-
return /*#__PURE__*/React__default.createElement(
|
|
17755
|
+
return /*#__PURE__*/React__default.createElement(PlaceholderContentWrapper, {
|
|
17756
|
+
isLink: isLink,
|
|
17757
|
+
action: action,
|
|
17758
|
+
destination: destination,
|
|
17759
|
+
dataQa: dataQa
|
|
17760
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
17746
17761
|
padding: "0",
|
|
17747
17762
|
borderRadius: "4px",
|
|
17748
17763
|
border: "none",
|
|
@@ -17750,11 +17765,6 @@ var Placeholder = function Placeholder(_ref2) {
|
|
|
17750
17765
|
hiddenStyles: !visible,
|
|
17751
17766
|
extraStyles: "\n background: linear-gradient(\n to right,\n ".concat(STORM_GREY, " 40%,\n rgba(255, 255, 255, 0) 0%\n ),\n linear-gradient(").concat(STORM_GREY, " 40%, rgba(255, 255, 255, 0) 0%),\n linear-gradient(to right, ").concat(STORM_GREY, " 40%, rgba(255, 255, 255, 0) 0%),\n linear-gradient(").concat(STORM_GREY, " 40%, rgba(255, 255, 255, 0) 0%);\n background-position: top, right, bottom, left;\n background-repeat: repeat-x, repeat-y;\n background-size: 5px 1px, 1px 5px;\n display: flex;\n justify-content: center;\n align-items:center;"),
|
|
17752
17767
|
hoverStyles: "background-color: ".concat(GRECIAN_GREY, ";")
|
|
17753
|
-
}, /*#__PURE__*/React__default.createElement(PlaceholderContentWrapper, {
|
|
17754
|
-
isLink: isLink,
|
|
17755
|
-
action: action,
|
|
17756
|
-
destination: destination,
|
|
17757
|
-
dataQa: dataQa
|
|
17758
17768
|
}, /*#__PURE__*/React__default.createElement(Center, {
|
|
17759
17769
|
maxWidth: "300px"
|
|
17760
17770
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -30488,6 +30498,7 @@ var CollapsibleSection = function CollapsibleSection(_ref) {
|
|
|
30488
30498
|
isMobile = _ref.isMobile,
|
|
30489
30499
|
supportsTouch = _ref.supportsTouch,
|
|
30490
30500
|
title = _ref.title,
|
|
30501
|
+
customPadding = _ref.customPadding,
|
|
30491
30502
|
_ref$initiallyOpen = _ref.initiallyOpen,
|
|
30492
30503
|
initiallyOpen = _ref$initiallyOpen === void 0 ? true : _ref$initiallyOpen,
|
|
30493
30504
|
_ref$openHeight = _ref.openHeight,
|
|
@@ -30541,7 +30552,7 @@ var CollapsibleSection = function CollapsibleSection(_ref) {
|
|
|
30541
30552
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
30542
30553
|
childGap: isOpen ? "0.5rem" : "0rem"
|
|
30543
30554
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
30544
|
-
padding: "0",
|
|
30555
|
+
padding: customPadding ? customPadding : "0",
|
|
30545
30556
|
background: themeValues.headingBackgroundColor,
|
|
30546
30557
|
onClick: isMobile && supportsTouch ? noop : toggleSection,
|
|
30547
30558
|
onTouchEnd: isMobile && supportsTouch ? toggleSection : noop,
|
|
@@ -31076,6 +31087,13 @@ ForgotPasswordForm.reducer = reducer$4;
|
|
|
31076
31087
|
ForgotPasswordForm.mapStateToProps = mapStateToProps$5;
|
|
31077
31088
|
ForgotPasswordForm.mapDispatchToProps = mapDispatchToProps$4;
|
|
31078
31089
|
|
|
31090
|
+
var textColor$2 = "#ffffff";
|
|
31091
|
+
var backgroundColor$4 = "#182848";
|
|
31092
|
+
var fallbackValues$p = {
|
|
31093
|
+
textColor: textColor$2,
|
|
31094
|
+
backgroundColor: backgroundColor$4
|
|
31095
|
+
};
|
|
31096
|
+
|
|
31079
31097
|
var HighlightTabRow = function HighlightTabRow(_ref) {
|
|
31080
31098
|
var tabs = _ref.tabs,
|
|
31081
31099
|
highlightIndex = _ref.highlightIndex,
|
|
@@ -31114,14 +31132,7 @@ var HighlightTabRow = function HighlightTabRow(_ref) {
|
|
|
31114
31132
|
}), R.repeat( /*#__PURE__*/React__default.createElement(Box, null), boxesAfter)));
|
|
31115
31133
|
};
|
|
31116
31134
|
|
|
31117
|
-
var
|
|
31118
|
-
var backgroundColor$4 = "#182848";
|
|
31119
|
-
var fallbackValues$p = {
|
|
31120
|
-
textColor: textColor$2,
|
|
31121
|
-
backgroundColor: backgroundColor$4
|
|
31122
|
-
};
|
|
31123
|
-
|
|
31124
|
-
var index$3 = /*#__PURE__*/React.memo(themeComponent(HighlightTabRow, "HighlightTabRow", fallbackValues$p));
|
|
31135
|
+
var HighlightTabRow$1 = /*#__PURE__*/React.memo(themeComponent(HighlightTabRow, "HighlightTabRow", fallbackValues$p));
|
|
31125
31136
|
|
|
31126
31137
|
var LoginForm = function LoginForm(_ref) {
|
|
31127
31138
|
var _emailErrorMessages;
|
|
@@ -32452,35 +32463,6 @@ var Modal$1 = function Modal(_ref) {
|
|
|
32452
32463
|
})))))))));
|
|
32453
32464
|
};
|
|
32454
32465
|
|
|
32455
|
-
var Module = function Module(_ref) {
|
|
32456
|
-
var heading = _ref.heading,
|
|
32457
|
-
_ref$spacing = _ref.spacing,
|
|
32458
|
-
spacing = _ref$spacing === void 0 ? "1rem" : _ref$spacing,
|
|
32459
|
-
_ref$padding = _ref.padding,
|
|
32460
|
-
padding = _ref$padding === void 0 ? "0" : _ref$padding,
|
|
32461
|
-
_ref$spacingBottom = _ref.spacingBottom,
|
|
32462
|
-
spacingBottom = _ref$spacingBottom === void 0 ? "2.5rem" : _ref$spacingBottom,
|
|
32463
|
-
themeValues = _ref.themeValues,
|
|
32464
|
-
_ref$variant = _ref.variant,
|
|
32465
|
-
variant = _ref$variant === void 0 ? "default" : _ref$variant,
|
|
32466
|
-
children = _ref.children;
|
|
32467
|
-
return /*#__PURE__*/React__default.createElement(React.Fragment, null, heading && /*#__PURE__*/React__default.createElement(Heading$1, {
|
|
32468
|
-
variant: variant === "default" ? "h5" : "h3",
|
|
32469
|
-
weight: themeValues.fontWeight,
|
|
32470
|
-
color: themeValues.fontColor,
|
|
32471
|
-
margin: "".concat(spacing, " 0 ").concat(themeValues.titleSpacing, " 0"),
|
|
32472
|
-
textAlign: themeValues.textAlign,
|
|
32473
|
-
"aria-level": variant === "default" ? "3" : "1"
|
|
32474
|
-
}, heading), /*#__PURE__*/React__default.createElement(Box, {
|
|
32475
|
-
padding: "0 0 ".concat(spacingBottom)
|
|
32476
|
-
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
32477
|
-
padding: padding,
|
|
32478
|
-
background: themeValues.backgroundColor,
|
|
32479
|
-
borderRadius: themeValues.borderRadius,
|
|
32480
|
-
boxShadow: themeValues.boxShadow
|
|
32481
|
-
}, children)));
|
|
32482
|
-
};
|
|
32483
|
-
|
|
32484
32466
|
var fontSize$7 = {
|
|
32485
32467
|
"default": "1.375rem",
|
|
32486
32468
|
largeTitle: "1.75rem"
|
|
@@ -32534,7 +32516,36 @@ var fallbackValues$q = {
|
|
|
32534
32516
|
backgroundColor: backgroundColor$5
|
|
32535
32517
|
};
|
|
32536
32518
|
|
|
32537
|
-
var
|
|
32519
|
+
var Module = function Module(_ref) {
|
|
32520
|
+
var heading = _ref.heading,
|
|
32521
|
+
_ref$spacing = _ref.spacing,
|
|
32522
|
+
spacing = _ref$spacing === void 0 ? "1rem" : _ref$spacing,
|
|
32523
|
+
_ref$padding = _ref.padding,
|
|
32524
|
+
padding = _ref$padding === void 0 ? "0" : _ref$padding,
|
|
32525
|
+
_ref$spacingBottom = _ref.spacingBottom,
|
|
32526
|
+
spacingBottom = _ref$spacingBottom === void 0 ? "2.5rem" : _ref$spacingBottom,
|
|
32527
|
+
themeValues = _ref.themeValues,
|
|
32528
|
+
_ref$variant = _ref.variant,
|
|
32529
|
+
variant = _ref$variant === void 0 ? "default" : _ref$variant,
|
|
32530
|
+
children = _ref.children;
|
|
32531
|
+
return /*#__PURE__*/React__default.createElement(React.Fragment, null, heading && /*#__PURE__*/React__default.createElement(Heading$1, {
|
|
32532
|
+
variant: variant === "default" ? "h5" : "h3",
|
|
32533
|
+
weight: themeValues.fontWeight,
|
|
32534
|
+
color: themeValues.fontColor,
|
|
32535
|
+
margin: "".concat(spacing, " 0 ").concat(themeValues.titleSpacing, " 0"),
|
|
32536
|
+
textAlign: themeValues.textAlign,
|
|
32537
|
+
"aria-level": variant === "default" ? "3" : "1"
|
|
32538
|
+
}, heading), /*#__PURE__*/React__default.createElement(Box, {
|
|
32539
|
+
padding: "0 0 ".concat(spacingBottom)
|
|
32540
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
32541
|
+
padding: padding,
|
|
32542
|
+
background: themeValues.backgroundColor,
|
|
32543
|
+
borderRadius: themeValues.borderRadius,
|
|
32544
|
+
boxShadow: themeValues.boxShadow
|
|
32545
|
+
}, children)));
|
|
32546
|
+
};
|
|
32547
|
+
|
|
32548
|
+
var Module$1 = /*#__PURE__*/React.memo(themeComponent(Module, "Module", fallbackValues$q, "default"));
|
|
32538
32549
|
|
|
32539
32550
|
var backgroundColor$6 = "#3b414d";
|
|
32540
32551
|
var fallbackValues$r = {
|
|
@@ -34145,7 +34156,8 @@ var AmountModule = function AmountModule(_ref) {
|
|
|
34145
34156
|
childGap: "0"
|
|
34146
34157
|
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
34147
34158
|
variant: "pS",
|
|
34148
|
-
weight: FONT_WEIGHT_SEMIBOLD
|
|
34159
|
+
weight: FONT_WEIGHT_SEMIBOLD,
|
|
34160
|
+
extraStyles: "text-align: right;"
|
|
34149
34161
|
}, isMobile ? "Total Due" : "Total Amount Due"), /*#__PURE__*/React__default.createElement(AmountCallout$1, {
|
|
34150
34162
|
amount: displayCurrency(totalAmountDue),
|
|
34151
34163
|
textAlign: "right"
|
|
@@ -34153,7 +34165,7 @@ var AmountModule = function AmountModule(_ref) {
|
|
|
34153
34165
|
variant: "p",
|
|
34154
34166
|
weight: FONT_WEIGHT_REGULAR,
|
|
34155
34167
|
color: REGENT_GREY,
|
|
34156
|
-
extraStyles: "font-style: italic"
|
|
34168
|
+
extraStyles: "font-style: italic; text-align: right;"
|
|
34157
34169
|
}, isMobile ? "Autopay On" : "Autopay Enabled")));
|
|
34158
34170
|
};
|
|
34159
34171
|
|
|
@@ -34238,7 +34250,8 @@ var Obligation = function Obligation(_ref) {
|
|
|
34238
34250
|
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
34239
34251
|
justify: "space-between",
|
|
34240
34252
|
align: "center",
|
|
34241
|
-
childGap: "4px"
|
|
34253
|
+
childGap: "4px",
|
|
34254
|
+
nowrap: true
|
|
34242
34255
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
34243
34256
|
padding: "0"
|
|
34244
34257
|
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
@@ -36075,7 +36088,7 @@ var SidebarStackContent$1 = withWindowSize(themeComponent(SidebarStackContent, "
|
|
|
36075
36088
|
|
|
36076
36089
|
|
|
36077
36090
|
|
|
36078
|
-
var index$
|
|
36091
|
+
var index$3 = /*#__PURE__*/Object.freeze({
|
|
36079
36092
|
__proto__: null,
|
|
36080
36093
|
colors: colors,
|
|
36081
36094
|
fontWeights: style_constants
|
|
@@ -36083,7 +36096,7 @@ var index$5 = /*#__PURE__*/Object.freeze({
|
|
|
36083
36096
|
|
|
36084
36097
|
|
|
36085
36098
|
|
|
36086
|
-
var index$
|
|
36099
|
+
var index$4 = /*#__PURE__*/Object.freeze({
|
|
36087
36100
|
__proto__: null,
|
|
36088
36101
|
formats: formats,
|
|
36089
36102
|
general: general
|
|
@@ -36137,7 +36150,7 @@ exports.GoToEmailIcon = GoToEmailIcon$1;
|
|
|
36137
36150
|
exports.Grid = Grid;
|
|
36138
36151
|
exports.HamburgerButton = HamburgerButton;
|
|
36139
36152
|
exports.Heading = Heading$1;
|
|
36140
|
-
exports.HighlightTabRow =
|
|
36153
|
+
exports.HighlightTabRow = HighlightTabRow$1;
|
|
36141
36154
|
exports.Imposter = Imposter;
|
|
36142
36155
|
exports.InternalLink = InternalLink;
|
|
36143
36156
|
exports.Jumbo = Jumbo$1;
|
|
@@ -36146,7 +36159,7 @@ exports.LineItem = LineItem$1;
|
|
|
36146
36159
|
exports.Loading = Loading;
|
|
36147
36160
|
exports.LoginForm = LoginForm;
|
|
36148
36161
|
exports.Modal = Modal$1;
|
|
36149
|
-
exports.Module =
|
|
36162
|
+
exports.Module = Module$1;
|
|
36150
36163
|
exports.Motion = Motion;
|
|
36151
36164
|
exports.NavFooter = NavFooter;
|
|
36152
36165
|
exports.NavHeader = NavHeader;
|
|
@@ -36194,7 +36207,7 @@ exports.Text = Text$1;
|
|
|
36194
36207
|
exports.ToggleSwitch = ToggleSwitch$1;
|
|
36195
36208
|
exports.VerifiedEmailIcon = VerifiedEmailIcon$1;
|
|
36196
36209
|
exports.WorkflowTile = WorkflowTile;
|
|
36197
|
-
exports.constants = index$
|
|
36210
|
+
exports.constants = index$3;
|
|
36198
36211
|
exports.createPartialAmountFormState = createPartialAmountFormState;
|
|
36199
|
-
exports.util = index$
|
|
36212
|
+
exports.util = index$4;
|
|
36200
36213
|
exports.withWindowSize = withWindowSize;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thecb/components",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.10",
|
|
4
4
|
"description": "Common lib for CityBase react components",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"prettier": "^1.19.1",
|
|
49
49
|
"pretty-quick": "^2.0.1",
|
|
50
50
|
"react-redux": "^7.2.0",
|
|
51
|
-
"react-router-dom": "
|
|
51
|
+
"react-router-dom": "6.0.0-alpha.3",
|
|
52
52
|
"redux": "^4.0.5",
|
|
53
53
|
"rollup": "^1.21.4",
|
|
54
54
|
"rollup-plugin-babel": "^4.3.3",
|
|
@@ -57,15 +57,15 @@
|
|
|
57
57
|
"rollup-plugin-node-resolve": "^5.1.0",
|
|
58
58
|
"rollup-plugin-visualizer": "^4.0.4",
|
|
59
59
|
"storybook": "^5.3.14",
|
|
60
|
-
"styled-components": "
|
|
60
|
+
"styled-components": "5.1.1",
|
|
61
61
|
"styled-theming": "^2.2.0"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"ramda": "^0.27.0",
|
|
65
65
|
"react": "^16.13.1",
|
|
66
66
|
"react-dom": "^16.13.1",
|
|
67
|
-
"react-router-dom": "
|
|
68
|
-
"styled-components": "
|
|
67
|
+
"react-router-dom": "6.0.0-alpha.3",
|
|
68
|
+
"styled-components": "5.1.1",
|
|
69
69
|
"styled-theming": "^2.2.0"
|
|
70
70
|
},
|
|
71
71
|
"husky": {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { text, select, boolean } from "@storybook/addon-knobs";
|
|
3
|
+
import Alert from "./Alert";
|
|
4
|
+
import page from "../../../../.storybook/page";
|
|
5
|
+
|
|
6
|
+
const variantsLabel = "variant";
|
|
7
|
+
const variants = {
|
|
8
|
+
info: "info",
|
|
9
|
+
warn: "warn",
|
|
10
|
+
error: "error",
|
|
11
|
+
success: "success"
|
|
12
|
+
};
|
|
13
|
+
const defaultValue = "info";
|
|
14
|
+
const groupId = "props";
|
|
15
|
+
|
|
16
|
+
export const alert = () => (
|
|
17
|
+
<Alert
|
|
18
|
+
variant={select(variantsLabel, variants, defaultValue, groupId)}
|
|
19
|
+
text={text("text", "Alert Bar", "props")}
|
|
20
|
+
showQuitLink={boolean("showQuitLink", true, "props")}
|
|
21
|
+
/>
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
const story = page({
|
|
25
|
+
title: "Components|Atoms/Alert",
|
|
26
|
+
Component: Alert
|
|
27
|
+
});
|
|
28
|
+
export default story;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { text, select } from "@storybook/addon-knobs";
|
|
3
|
+
import AmountCallout from "./AmountCallout";
|
|
4
|
+
import page from "../../../../.storybook/page";
|
|
5
|
+
|
|
6
|
+
const variantsLabel = "variant";
|
|
7
|
+
const variants = {
|
|
8
|
+
small: "small",
|
|
9
|
+
medium: "medium",
|
|
10
|
+
large: "large",
|
|
11
|
+
None: undefined
|
|
12
|
+
};
|
|
13
|
+
const defaultValue = "large";
|
|
14
|
+
|
|
15
|
+
const textAlignLabel = "textAlign";
|
|
16
|
+
const textAlign = {
|
|
17
|
+
left: "left",
|
|
18
|
+
center: "center",
|
|
19
|
+
right: "right"
|
|
20
|
+
};
|
|
21
|
+
const defaultTextAlignValue = "left";
|
|
22
|
+
const groupId = "props";
|
|
23
|
+
|
|
24
|
+
export const amountCallout = () => (
|
|
25
|
+
<AmountCallout
|
|
26
|
+
variant={select(variantsLabel, variants, defaultValue, groupId)}
|
|
27
|
+
amount={text("text", "$1.23", "props")}
|
|
28
|
+
textAlign={select(
|
|
29
|
+
textAlignLabel,
|
|
30
|
+
textAlign,
|
|
31
|
+
defaultTextAlignValue,
|
|
32
|
+
groupId
|
|
33
|
+
)}
|
|
34
|
+
/>
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
const story = page({
|
|
38
|
+
title: "Components|Atoms/AmountCallout",
|
|
39
|
+
Component: AmountCallout
|
|
40
|
+
});
|
|
41
|
+
export default story;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
const fontSize = {
|
|
2
|
-
large: "1.
|
|
3
|
-
medium: "1.
|
|
2
|
+
large: "1.5rem",
|
|
3
|
+
medium: "1.25rem",
|
|
4
4
|
small: "1.094rem"
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
const color = "#15749D";
|
|
8
8
|
|
|
9
9
|
const lineHeight = {
|
|
10
|
-
large: "
|
|
11
|
-
medium: "
|
|
10
|
+
large: "2rem",
|
|
11
|
+
medium: "1.875rem",
|
|
12
12
|
small: "1.641rem"
|
|
13
13
|
};
|
|
14
14
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { object } from "@storybook/addon-knobs";
|
|
3
|
+
import Breadcrumb from "./Breadcrumb";
|
|
4
|
+
import page from "../../../../.storybook/page";
|
|
5
|
+
|
|
6
|
+
const labelInactive = "Inactive Breadcrumb";
|
|
7
|
+
const defaultInactiveValue = {
|
|
8
|
+
linkText: "Home",
|
|
9
|
+
linkDestination: location.pathname,
|
|
10
|
+
isActive: false
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const labelActive = "Active Breadcrumb";
|
|
14
|
+
const defaultActiveValue = {
|
|
15
|
+
linkText: "Page",
|
|
16
|
+
linkDestination: location.pathname,
|
|
17
|
+
isActive: true
|
|
18
|
+
};
|
|
19
|
+
const groupId = "props";
|
|
20
|
+
|
|
21
|
+
export const breadcrumb = () => (
|
|
22
|
+
<Breadcrumb
|
|
23
|
+
breadcrumbsList={[
|
|
24
|
+
{
|
|
25
|
+
...object(labelInactive, defaultInactiveValue, groupId)
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
...object(labelActive, defaultActiveValue, groupId)
|
|
29
|
+
}
|
|
30
|
+
]}
|
|
31
|
+
/>
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
const story = page({
|
|
35
|
+
title: "Components|Atoms/Breadcrumb",
|
|
36
|
+
Component: Breadcrumb
|
|
37
|
+
});
|
|
38
|
+
export default story;
|