@thecb/components 3.1.4-beta.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/page.js +5 -4
- package/README.md +9 -8
- package/dist/index.cjs.js +119 -103
- package/dist/index.esm.js +116 -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.js +2 -1
- 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/partial-amount-form/PartialAmountForm.state.js +2 -1
- 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
CHANGED
|
@@ -2171,7 +2171,7 @@ var Center = function Center(_ref) {
|
|
|
2171
2171
|
};
|
|
2172
2172
|
|
|
2173
2173
|
function _templateObject2$1() {
|
|
2174
|
-
var data = _taggedTemplateLiteral(["\n box-sizing: border-box;\n display: flex;\n flex-wrap:
|
|
2174
|
+
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"]);
|
|
2175
2175
|
|
|
2176
2176
|
_templateObject2$1 = function _templateObject2() {
|
|
2177
2177
|
return data;
|
|
@@ -2194,22 +2194,25 @@ var ClusterWrapper = styled.div(_templateObject$2(), function (_ref) {
|
|
|
2194
2194
|
return overflow ? "visible" : "hidden";
|
|
2195
2195
|
});
|
|
2196
2196
|
var ClusterInnerWrapper = styled.div(_templateObject2$1(), function (_ref2) {
|
|
2197
|
-
var
|
|
2198
|
-
return
|
|
2197
|
+
var nowrap = _ref2.nowrap;
|
|
2198
|
+
return nowrap ? "nowrap" : "wrap";
|
|
2199
2199
|
}, function (_ref3) {
|
|
2200
|
-
var
|
|
2201
|
-
return
|
|
2200
|
+
var justify = _ref3.justify;
|
|
2201
|
+
return justify;
|
|
2202
2202
|
}, function (_ref4) {
|
|
2203
|
-
var
|
|
2204
|
-
return
|
|
2203
|
+
var align = _ref4.align;
|
|
2204
|
+
return align;
|
|
2205
2205
|
}, function (_ref5) {
|
|
2206
|
-
var
|
|
2207
|
-
return
|
|
2206
|
+
var childGap = _ref5.childGap;
|
|
2207
|
+
return childGap;
|
|
2208
2208
|
}, function (_ref6) {
|
|
2209
|
-
var
|
|
2210
|
-
return
|
|
2209
|
+
var minHeight = _ref6.minHeight;
|
|
2210
|
+
return minHeight;
|
|
2211
2211
|
}, function (_ref7) {
|
|
2212
|
-
var
|
|
2212
|
+
var minWidth = _ref7.minWidth;
|
|
2213
|
+
return minWidth;
|
|
2214
|
+
}, function (_ref8) {
|
|
2215
|
+
var childGap = _ref8.childGap;
|
|
2213
2216
|
return childGap;
|
|
2214
2217
|
});
|
|
2215
2218
|
|
|
@@ -2228,10 +2231,11 @@ var Cluster = function Cluster(_ref) {
|
|
|
2228
2231
|
childGap = _ref.childGap,
|
|
2229
2232
|
minHeight = _ref.minHeight,
|
|
2230
2233
|
minWidth = _ref.minWidth,
|
|
2234
|
+
nowrap = _ref.nowrap,
|
|
2231
2235
|
_ref$overflow = _ref.overflow,
|
|
2232
2236
|
overflow = _ref$overflow === void 0 ? false : _ref$overflow,
|
|
2233
2237
|
children = _ref.children,
|
|
2234
|
-
rest = _objectWithoutProperties(_ref, ["justify", "align", "childGap", "minHeight", "minWidth", "overflow", "children"]);
|
|
2238
|
+
rest = _objectWithoutProperties(_ref, ["justify", "align", "childGap", "minHeight", "minWidth", "nowrap", "overflow", "children"]);
|
|
2235
2239
|
|
|
2236
2240
|
return /*#__PURE__*/React.createElement(ClusterWrapper, _extends({
|
|
2237
2241
|
overflow: overflow
|
|
@@ -2240,7 +2244,8 @@ var Cluster = function Cluster(_ref) {
|
|
|
2240
2244
|
align: align,
|
|
2241
2245
|
childGap: childGap,
|
|
2242
2246
|
minHeight: minHeight,
|
|
2243
|
-
minWidth: minWidth
|
|
2247
|
+
minWidth: minWidth,
|
|
2248
|
+
nowrap: nowrap
|
|
2244
2249
|
}, safeChildren(children, /*#__PURE__*/React.createElement(Fragment, null))));
|
|
2245
2250
|
};
|
|
2246
2251
|
|
|
@@ -9533,8 +9538,12 @@ var Reel = function Reel(_ref) {
|
|
|
9533
9538
|
};
|
|
9534
9539
|
|
|
9535
9540
|
var fontFamily = {
|
|
9536
|
-
|
|
9537
|
-
|
|
9541
|
+
p: "Public Sans",
|
|
9542
|
+
pL: "Public Sans",
|
|
9543
|
+
pS: "Public Sans",
|
|
9544
|
+
pXS: "Public Sans",
|
|
9545
|
+
pXXS: "Public Sans",
|
|
9546
|
+
pXL: "Public Sans"
|
|
9538
9547
|
}; // Text uses the same variants as paragraph
|
|
9539
9548
|
// Use a Paragraph if you want a block level element
|
|
9540
9549
|
// Use a Text if you want an inline element
|
|
@@ -9979,14 +9988,14 @@ var Heading = function Heading(_ref) {
|
|
|
9979
9988
|
var Heading$1 = themeComponent(Heading, "Heading", fallbackValues$2, "h1");
|
|
9980
9989
|
|
|
9981
9990
|
var fontSize$2 = {
|
|
9982
|
-
large: "1.
|
|
9983
|
-
medium: "1.
|
|
9991
|
+
large: "1.5rem",
|
|
9992
|
+
medium: "1.25rem",
|
|
9984
9993
|
small: "1.094rem"
|
|
9985
9994
|
};
|
|
9986
9995
|
var color$1 = "#15749D";
|
|
9987
9996
|
var lineHeight = {
|
|
9988
|
-
large: "
|
|
9989
|
-
medium: "
|
|
9997
|
+
large: "2rem",
|
|
9998
|
+
medium: "1.875rem",
|
|
9990
9999
|
small: "1.641rem"
|
|
9991
10000
|
};
|
|
9992
10001
|
var fallbackValues$3 = {
|
|
@@ -10044,10 +10053,12 @@ var fontFamily$2 = {
|
|
|
10044
10053
|
};
|
|
10045
10054
|
var hoverColor = "#116285";
|
|
10046
10055
|
var activeColor$1 = "#0E506D";
|
|
10056
|
+
var externalLinkColor = "#15749D";
|
|
10047
10057
|
var fallbackValues$5 = {
|
|
10048
10058
|
fontFamily: fontFamily$2,
|
|
10049
10059
|
hoverColor: hoverColor,
|
|
10050
|
-
activeColor: activeColor$1
|
|
10060
|
+
activeColor: activeColor$1,
|
|
10061
|
+
externalLinkColor: externalLinkColor
|
|
10051
10062
|
};
|
|
10052
10063
|
|
|
10053
10064
|
function _templateObject$e() {
|
|
@@ -10105,8 +10116,6 @@ var ExternalLink = function ExternalLink(_ref) {
|
|
|
10105
10116
|
href = _ref$href === void 0 ? "" : _ref$href,
|
|
10106
10117
|
_ref$newTab = _ref.newTab,
|
|
10107
10118
|
newTab = _ref$newTab === void 0 ? false : _ref$newTab,
|
|
10108
|
-
_ref$color = _ref.color,
|
|
10109
|
-
color = _ref$color === void 0 ? CONGRESS_BLUE : _ref$color,
|
|
10110
10119
|
_ref$size = _ref.size,
|
|
10111
10120
|
size = _ref$size === void 0 ? "1rem" : _ref$size,
|
|
10112
10121
|
_ref$lineHeight = _ref.lineHeight,
|
|
@@ -10125,7 +10134,7 @@ var ExternalLink = function ExternalLink(_ref) {
|
|
|
10125
10134
|
return /*#__PURE__*/React.createElement(StyledExternalLink, {
|
|
10126
10135
|
href: href,
|
|
10127
10136
|
target: newTab ? "_blank" : "",
|
|
10128
|
-
color:
|
|
10137
|
+
color: themeValues.externalLinkColor,
|
|
10129
10138
|
size: size,
|
|
10130
10139
|
lineheight: lineHeight,
|
|
10131
10140
|
weight: weight,
|
|
@@ -10139,7 +10148,7 @@ var ExternalLink = function ExternalLink(_ref) {
|
|
|
10139
10148
|
};
|
|
10140
10149
|
|
|
10141
10150
|
function _templateObject$f() {
|
|
10142
|
-
var data = _taggedTemplateLiteral(["\n display: flex;\n color: ", ";\n font-weight: ", ";\n line-height: ", ";\n font-size: ", ";\n font-family: ", ";\n margin: ", ";\n
|
|
10151
|
+
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"]);
|
|
10143
10152
|
|
|
10144
10153
|
_templateObject$f = function _templateObject() {
|
|
10145
10154
|
return data;
|
|
@@ -10184,16 +10193,13 @@ var StyledInternalLink = styled(function (_ref) {
|
|
|
10184
10193
|
var margin = _ref7.margin;
|
|
10185
10194
|
return margin;
|
|
10186
10195
|
}, function (_ref8) {
|
|
10187
|
-
var
|
|
10188
|
-
return active === "true" ? "underline" : "none";
|
|
10189
|
-
}, function (_ref9) {
|
|
10190
|
-
var hoverColor = _ref9.hoverColor;
|
|
10196
|
+
var hoverColor = _ref8.hoverColor;
|
|
10191
10197
|
return hoverColor;
|
|
10192
|
-
}, function (
|
|
10193
|
-
var activeColor =
|
|
10198
|
+
}, function (_ref9) {
|
|
10199
|
+
var activeColor = _ref9.activeColor;
|
|
10194
10200
|
return activeColor;
|
|
10195
|
-
}, function (
|
|
10196
|
-
var extrastyles =
|
|
10201
|
+
}, function (_ref10) {
|
|
10202
|
+
var extrastyles = _ref10.extrastyles;
|
|
10197
10203
|
return extrastyles;
|
|
10198
10204
|
});
|
|
10199
10205
|
/* eslint-enable no-unused-vars */
|
|
@@ -13531,10 +13537,12 @@ var ButtonWithLink = function ButtonWithLink(_ref) {
|
|
|
13531
13537
|
url = _ref$url === void 0 ? "/" : _ref$url,
|
|
13532
13538
|
_ref$disabled = _ref.disabled,
|
|
13533
13539
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
13540
|
+
_ref$fileLink = _ref.fileLink,
|
|
13541
|
+
fileLink = _ref$fileLink === void 0 ? false : _ref$fileLink,
|
|
13534
13542
|
extraStyles = _ref.extraStyles,
|
|
13535
13543
|
_ref$newTab = _ref.newTab,
|
|
13536
13544
|
newTab = _ref$newTab === void 0 ? false : _ref$newTab,
|
|
13537
|
-
otherProps = _objectWithoutProperties(_ref, ["url", "disabled", "extraStyles", "newTab"]);
|
|
13545
|
+
otherProps = _objectWithoutProperties(_ref, ["url", "disabled", "fileLink", "extraStyles", "newTab"]);
|
|
13538
13546
|
|
|
13539
13547
|
var ButtonWithLinkWrapper = function ButtonWithLinkWrapper(_ref2) {
|
|
13540
13548
|
var children = _ref2.children,
|
|
@@ -13547,7 +13555,7 @@ var ButtonWithLink = function ButtonWithLink(_ref) {
|
|
|
13547
13555
|
return safeChildren(children, /*#__PURE__*/React.createElement("span", null));
|
|
13548
13556
|
}
|
|
13549
13557
|
|
|
13550
|
-
return test(URL_TEST, url) ? /*#__PURE__*/React.createElement(ExternalLink, {
|
|
13558
|
+
return test(URL_TEST, url) || fileLink ? /*#__PURE__*/React.createElement(ExternalLink, {
|
|
13551
13559
|
href: url,
|
|
13552
13560
|
tabIndex: "-1",
|
|
13553
13561
|
newTab: newTab,
|
|
@@ -15244,8 +15252,12 @@ var DisplayBox = function DisplayBox(_ref) {
|
|
|
15244
15252
|
var DisplayBox$1 = themeComponent(DisplayBox, "DisplayBox", fallbackValues$a);
|
|
15245
15253
|
|
|
15246
15254
|
var fontFamily$3 = {
|
|
15247
|
-
|
|
15248
|
-
|
|
15255
|
+
p: "Public Sans",
|
|
15256
|
+
pL: "Public Sans",
|
|
15257
|
+
pS: "Public Sans",
|
|
15258
|
+
pXS: "Public Sans",
|
|
15259
|
+
pXXS: "Public Sans",
|
|
15260
|
+
pXL: "Public Sans"
|
|
15249
15261
|
};
|
|
15250
15262
|
var fontSize$4 = {
|
|
15251
15263
|
p: "1rem",
|
|
@@ -15350,12 +15362,14 @@ var DisplayCard = function DisplayCard(_ref) {
|
|
|
15350
15362
|
text: buttonText,
|
|
15351
15363
|
url: url,
|
|
15352
15364
|
variant: "smallGhost",
|
|
15353
|
-
dataQa: buttonText
|
|
15365
|
+
dataQa: buttonText,
|
|
15366
|
+
extraStyles: "min-width: 0;"
|
|
15354
15367
|
}) : /*#__PURE__*/React.createElement(ButtonWithAction, {
|
|
15355
15368
|
text: buttonText,
|
|
15356
15369
|
action: buttonAction,
|
|
15357
15370
|
variant: "smallGhost",
|
|
15358
|
-
dataQa: buttonText
|
|
15371
|
+
dataQa: buttonText,
|
|
15372
|
+
extraStyles: "min-width: 0;"
|
|
15359
15373
|
}))))));
|
|
15360
15374
|
};
|
|
15361
15375
|
|
|
@@ -16014,8 +16028,7 @@ var fallbackValues$d = {
|
|
|
16014
16028
|
};
|
|
16015
16029
|
|
|
16016
16030
|
var FormattedAddress = function FormattedAddress(_ref) {
|
|
16017
|
-
var
|
|
16018
|
-
street1 = _ref.street1,
|
|
16031
|
+
var street1 = _ref.street1,
|
|
16019
16032
|
city = _ref.city,
|
|
16020
16033
|
stateProvince = _ref.stateProvince,
|
|
16021
16034
|
country = _ref.country,
|
|
@@ -16024,14 +16037,11 @@ var FormattedAddress = function FormattedAddress(_ref) {
|
|
|
16024
16037
|
street2 = _ref$street === void 0 ? null : _ref$street,
|
|
16025
16038
|
_ref$name = _ref.name,
|
|
16026
16039
|
name = _ref$name === void 0 ? null : _ref$name,
|
|
16027
|
-
isRadio = _ref.isRadio,
|
|
16028
16040
|
themeValues = _ref.themeValues,
|
|
16029
16041
|
_ref$qaPrefix = _ref.qaPrefix,
|
|
16030
16042
|
qaPrefix = _ref$qaPrefix === void 0 ? "address" : _ref$qaPrefix;
|
|
16031
16043
|
return /*#__PURE__*/React.createElement(Box, {
|
|
16032
|
-
padding: themeValues.padding
|
|
16033
|
-
isActive: isActive,
|
|
16034
|
-
isRadio: isRadio
|
|
16044
|
+
padding: themeValues.padding
|
|
16035
16045
|
}, name && /*#__PURE__*/React.createElement(Text$1, {
|
|
16036
16046
|
variant: "p",
|
|
16037
16047
|
color: themeValues.color,
|
|
@@ -16192,7 +16202,8 @@ var HamburgerButton = function HamburgerButton(_ref4) {
|
|
|
16192
16202
|
var activeColor = _ref4.activeColor,
|
|
16193
16203
|
inactiveColor = _ref4.inactiveColor,
|
|
16194
16204
|
isActive = _ref4.isActive,
|
|
16195
|
-
onClick = _ref4.onClick
|
|
16205
|
+
_ref4$onClick = _ref4.onClick,
|
|
16206
|
+
onClick = _ref4$onClick === void 0 ? noop : _ref4$onClick;
|
|
16196
16207
|
return /*#__PURE__*/React.createElement(Hamburger, {
|
|
16197
16208
|
className: isActive === true ? "active" : "",
|
|
16198
16209
|
onClick: onClick,
|
|
@@ -17170,7 +17181,7 @@ var LabeledAmount = function LabeledAmount(_ref) {
|
|
|
17170
17181
|
}, /*#__PURE__*/React.createElement(LabeledAmountText, {
|
|
17171
17182
|
variant: variant,
|
|
17172
17183
|
weight: themeValues.fontWeight,
|
|
17173
|
-
extraStyles: "text-align:
|
|
17184
|
+
extraStyles: "text-align: start; flex: 3;"
|
|
17174
17185
|
}, label, ":"), /*#__PURE__*/React.createElement(LabeledAmountText, {
|
|
17175
17186
|
variant: variant,
|
|
17176
17187
|
weight: themeValues.fontWeight,
|
|
@@ -17199,6 +17210,7 @@ var LineItem = function LineItem(_ref) {
|
|
|
17199
17210
|
amount = _ref.amount,
|
|
17200
17211
|
themeValues = _ref.themeValues;
|
|
17201
17212
|
return /*#__PURE__*/React.createElement(Cluster, {
|
|
17213
|
+
nowrap: true,
|
|
17202
17214
|
justify: "space-between",
|
|
17203
17215
|
align: "start"
|
|
17204
17216
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
@@ -17212,7 +17224,7 @@ var LineItem = function LineItem(_ref) {
|
|
|
17212
17224
|
}, subDescription)), /*#__PURE__*/React.createElement(Paragraph$1, {
|
|
17213
17225
|
variant: themeValues.paragraphVariant,
|
|
17214
17226
|
weight: "600",
|
|
17215
|
-
extraStyles: "margin: 0;"
|
|
17227
|
+
extraStyles: "margin: 0; text-align: end; min-width: fit-content; padding-left: 32px;"
|
|
17216
17228
|
}, amount));
|
|
17217
17229
|
};
|
|
17218
17230
|
|
|
@@ -17734,7 +17746,12 @@ var Placeholder = function Placeholder(_ref2) {
|
|
|
17734
17746
|
var _useContext = useContext(ThemeContext),
|
|
17735
17747
|
isMobile = _useContext.isMobile;
|
|
17736
17748
|
|
|
17737
|
-
return /*#__PURE__*/React.createElement(
|
|
17749
|
+
return /*#__PURE__*/React.createElement(PlaceholderContentWrapper, {
|
|
17750
|
+
isLink: isLink,
|
|
17751
|
+
action: action,
|
|
17752
|
+
destination: destination,
|
|
17753
|
+
dataQa: dataQa
|
|
17754
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
17738
17755
|
padding: "0",
|
|
17739
17756
|
borderRadius: "4px",
|
|
17740
17757
|
border: "none",
|
|
@@ -17742,11 +17759,6 @@ var Placeholder = function Placeholder(_ref2) {
|
|
|
17742
17759
|
hiddenStyles: !visible,
|
|
17743
17760
|
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;"),
|
|
17744
17761
|
hoverStyles: "background-color: ".concat(GRECIAN_GREY, ";")
|
|
17745
|
-
}, /*#__PURE__*/React.createElement(PlaceholderContentWrapper, {
|
|
17746
|
-
isLink: isLink,
|
|
17747
|
-
action: action,
|
|
17748
|
-
destination: destination,
|
|
17749
|
-
dataQa: dataQa
|
|
17750
17762
|
}, /*#__PURE__*/React.createElement(Center, {
|
|
17751
17763
|
maxWidth: "300px"
|
|
17752
17764
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
@@ -30480,6 +30492,7 @@ var CollapsibleSection = function CollapsibleSection(_ref) {
|
|
|
30480
30492
|
isMobile = _ref.isMobile,
|
|
30481
30493
|
supportsTouch = _ref.supportsTouch,
|
|
30482
30494
|
title = _ref.title,
|
|
30495
|
+
customPadding = _ref.customPadding,
|
|
30483
30496
|
_ref$initiallyOpen = _ref.initiallyOpen,
|
|
30484
30497
|
initiallyOpen = _ref$initiallyOpen === void 0 ? true : _ref$initiallyOpen,
|
|
30485
30498
|
_ref$openHeight = _ref.openHeight,
|
|
@@ -30533,7 +30546,7 @@ var CollapsibleSection = function CollapsibleSection(_ref) {
|
|
|
30533
30546
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
30534
30547
|
childGap: isOpen ? "0.5rem" : "0rem"
|
|
30535
30548
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
30536
|
-
padding: "0",
|
|
30549
|
+
padding: customPadding ? customPadding : "0",
|
|
30537
30550
|
background: themeValues.headingBackgroundColor,
|
|
30538
30551
|
onClick: isMobile && supportsTouch ? noop : toggleSection,
|
|
30539
30552
|
onTouchEnd: isMobile && supportsTouch ? toggleSection : noop,
|
|
@@ -31068,6 +31081,13 @@ ForgotPasswordForm.reducer = reducer$4;
|
|
|
31068
31081
|
ForgotPasswordForm.mapStateToProps = mapStateToProps$5;
|
|
31069
31082
|
ForgotPasswordForm.mapDispatchToProps = mapDispatchToProps$4;
|
|
31070
31083
|
|
|
31084
|
+
var textColor$2 = "#ffffff";
|
|
31085
|
+
var backgroundColor$4 = "#182848";
|
|
31086
|
+
var fallbackValues$p = {
|
|
31087
|
+
textColor: textColor$2,
|
|
31088
|
+
backgroundColor: backgroundColor$4
|
|
31089
|
+
};
|
|
31090
|
+
|
|
31071
31091
|
var HighlightTabRow = function HighlightTabRow(_ref) {
|
|
31072
31092
|
var tabs = _ref.tabs,
|
|
31073
31093
|
highlightIndex = _ref.highlightIndex,
|
|
@@ -31106,14 +31126,7 @@ var HighlightTabRow = function HighlightTabRow(_ref) {
|
|
|
31106
31126
|
}), repeat( /*#__PURE__*/React.createElement(Box, null), boxesAfter)));
|
|
31107
31127
|
};
|
|
31108
31128
|
|
|
31109
|
-
var
|
|
31110
|
-
var backgroundColor$4 = "#182848";
|
|
31111
|
-
var fallbackValues$p = {
|
|
31112
|
-
textColor: textColor$2,
|
|
31113
|
-
backgroundColor: backgroundColor$4
|
|
31114
|
-
};
|
|
31115
|
-
|
|
31116
|
-
var index$3 = /*#__PURE__*/memo(themeComponent(HighlightTabRow, "HighlightTabRow", fallbackValues$p));
|
|
31129
|
+
var HighlightTabRow$1 = /*#__PURE__*/memo(themeComponent(HighlightTabRow, "HighlightTabRow", fallbackValues$p));
|
|
31117
31130
|
|
|
31118
31131
|
var LoginForm = function LoginForm(_ref) {
|
|
31119
31132
|
var _emailErrorMessages;
|
|
@@ -32444,35 +32457,6 @@ var Modal$1 = function Modal(_ref) {
|
|
|
32444
32457
|
})))))))));
|
|
32445
32458
|
};
|
|
32446
32459
|
|
|
32447
|
-
var Module = function Module(_ref) {
|
|
32448
|
-
var heading = _ref.heading,
|
|
32449
|
-
_ref$spacing = _ref.spacing,
|
|
32450
|
-
spacing = _ref$spacing === void 0 ? "1rem" : _ref$spacing,
|
|
32451
|
-
_ref$padding = _ref.padding,
|
|
32452
|
-
padding = _ref$padding === void 0 ? "0" : _ref$padding,
|
|
32453
|
-
_ref$spacingBottom = _ref.spacingBottom,
|
|
32454
|
-
spacingBottom = _ref$spacingBottom === void 0 ? "2.5rem" : _ref$spacingBottom,
|
|
32455
|
-
themeValues = _ref.themeValues,
|
|
32456
|
-
_ref$variant = _ref.variant,
|
|
32457
|
-
variant = _ref$variant === void 0 ? "default" : _ref$variant,
|
|
32458
|
-
children = _ref.children;
|
|
32459
|
-
return /*#__PURE__*/React.createElement(Fragment, null, heading && /*#__PURE__*/React.createElement(Heading$1, {
|
|
32460
|
-
variant: variant === "default" ? "h5" : "h3",
|
|
32461
|
-
weight: themeValues.fontWeight,
|
|
32462
|
-
color: themeValues.fontColor,
|
|
32463
|
-
margin: "".concat(spacing, " 0 ").concat(themeValues.titleSpacing, " 0"),
|
|
32464
|
-
textAlign: themeValues.textAlign,
|
|
32465
|
-
"aria-level": variant === "default" ? "3" : "1"
|
|
32466
|
-
}, heading), /*#__PURE__*/React.createElement(Box, {
|
|
32467
|
-
padding: "0 0 ".concat(spacingBottom)
|
|
32468
|
-
}, /*#__PURE__*/React.createElement(Box, {
|
|
32469
|
-
padding: padding,
|
|
32470
|
-
background: themeValues.backgroundColor,
|
|
32471
|
-
borderRadius: themeValues.borderRadius,
|
|
32472
|
-
boxShadow: themeValues.boxShadow
|
|
32473
|
-
}, children)));
|
|
32474
|
-
};
|
|
32475
|
-
|
|
32476
32460
|
var fontSize$7 = {
|
|
32477
32461
|
"default": "1.375rem",
|
|
32478
32462
|
largeTitle: "1.75rem"
|
|
@@ -32526,7 +32510,36 @@ var fallbackValues$q = {
|
|
|
32526
32510
|
backgroundColor: backgroundColor$5
|
|
32527
32511
|
};
|
|
32528
32512
|
|
|
32529
|
-
var
|
|
32513
|
+
var Module = function Module(_ref) {
|
|
32514
|
+
var heading = _ref.heading,
|
|
32515
|
+
_ref$spacing = _ref.spacing,
|
|
32516
|
+
spacing = _ref$spacing === void 0 ? "1rem" : _ref$spacing,
|
|
32517
|
+
_ref$padding = _ref.padding,
|
|
32518
|
+
padding = _ref$padding === void 0 ? "0" : _ref$padding,
|
|
32519
|
+
_ref$spacingBottom = _ref.spacingBottom,
|
|
32520
|
+
spacingBottom = _ref$spacingBottom === void 0 ? "2.5rem" : _ref$spacingBottom,
|
|
32521
|
+
themeValues = _ref.themeValues,
|
|
32522
|
+
_ref$variant = _ref.variant,
|
|
32523
|
+
variant = _ref$variant === void 0 ? "default" : _ref$variant,
|
|
32524
|
+
children = _ref.children;
|
|
32525
|
+
return /*#__PURE__*/React.createElement(Fragment, null, heading && /*#__PURE__*/React.createElement(Heading$1, {
|
|
32526
|
+
variant: variant === "default" ? "h5" : "h3",
|
|
32527
|
+
weight: themeValues.fontWeight,
|
|
32528
|
+
color: themeValues.fontColor,
|
|
32529
|
+
margin: "".concat(spacing, " 0 ").concat(themeValues.titleSpacing, " 0"),
|
|
32530
|
+
textAlign: themeValues.textAlign,
|
|
32531
|
+
"aria-level": variant === "default" ? "3" : "1"
|
|
32532
|
+
}, heading), /*#__PURE__*/React.createElement(Box, {
|
|
32533
|
+
padding: "0 0 ".concat(spacingBottom)
|
|
32534
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
32535
|
+
padding: padding,
|
|
32536
|
+
background: themeValues.backgroundColor,
|
|
32537
|
+
borderRadius: themeValues.borderRadius,
|
|
32538
|
+
boxShadow: themeValues.boxShadow
|
|
32539
|
+
}, children)));
|
|
32540
|
+
};
|
|
32541
|
+
|
|
32542
|
+
var Module$1 = /*#__PURE__*/memo(themeComponent(Module, "Module", fallbackValues$q, "default"));
|
|
32530
32543
|
|
|
32531
32544
|
var backgroundColor$6 = "#3b414d";
|
|
32532
32545
|
var fallbackValues$r = {
|
|
@@ -34137,7 +34150,8 @@ var AmountModule = function AmountModule(_ref) {
|
|
|
34137
34150
|
childGap: "0"
|
|
34138
34151
|
}, /*#__PURE__*/React.createElement(Text$1, {
|
|
34139
34152
|
variant: "pS",
|
|
34140
|
-
weight: FONT_WEIGHT_SEMIBOLD
|
|
34153
|
+
weight: FONT_WEIGHT_SEMIBOLD,
|
|
34154
|
+
extraStyles: "text-align: right;"
|
|
34141
34155
|
}, isMobile ? "Total Due" : "Total Amount Due"), /*#__PURE__*/React.createElement(AmountCallout$1, {
|
|
34142
34156
|
amount: displayCurrency(totalAmountDue),
|
|
34143
34157
|
textAlign: "right"
|
|
@@ -34145,7 +34159,7 @@ var AmountModule = function AmountModule(_ref) {
|
|
|
34145
34159
|
variant: "p",
|
|
34146
34160
|
weight: FONT_WEIGHT_REGULAR,
|
|
34147
34161
|
color: REGENT_GREY,
|
|
34148
|
-
extraStyles: "font-style: italic"
|
|
34162
|
+
extraStyles: "font-style: italic; text-align: right;"
|
|
34149
34163
|
}, isMobile ? "Autopay On" : "Autopay Enabled")));
|
|
34150
34164
|
};
|
|
34151
34165
|
|
|
@@ -34230,7 +34244,8 @@ var Obligation = function Obligation(_ref) {
|
|
|
34230
34244
|
}, /*#__PURE__*/React.createElement(Cluster, {
|
|
34231
34245
|
justify: "space-between",
|
|
34232
34246
|
align: "center",
|
|
34233
|
-
childGap: "4px"
|
|
34247
|
+
childGap: "4px",
|
|
34248
|
+
nowrap: true
|
|
34234
34249
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
34235
34250
|
padding: "0"
|
|
34236
34251
|
}, /*#__PURE__*/React.createElement(Cluster, {
|
|
@@ -34338,7 +34353,8 @@ var createPartialAmountFormState = function createPartialAmountFormState(lineIte
|
|
|
34338
34353
|
|
|
34339
34354
|
return _objectSpread2(_objectSpread2({}, acc), {}, _defineProperty({}, item.id, {
|
|
34340
34355
|
validators: validators,
|
|
34341
|
-
constraints: [onlyNaturals()]
|
|
34356
|
+
constraints: [onlyNaturals()],
|
|
34357
|
+
defaultValue: String(item.amount)
|
|
34342
34358
|
}));
|
|
34343
34359
|
}, {});
|
|
34344
34360
|
|
|
@@ -36067,7 +36083,7 @@ var SidebarStackContent$1 = withWindowSize(themeComponent(SidebarStackContent, "
|
|
|
36067
36083
|
|
|
36068
36084
|
|
|
36069
36085
|
|
|
36070
|
-
var index$
|
|
36086
|
+
var index$3 = /*#__PURE__*/Object.freeze({
|
|
36071
36087
|
__proto__: null,
|
|
36072
36088
|
colors: colors,
|
|
36073
36089
|
fontWeights: style_constants
|
|
@@ -36075,10 +36091,10 @@ var index$5 = /*#__PURE__*/Object.freeze({
|
|
|
36075
36091
|
|
|
36076
36092
|
|
|
36077
36093
|
|
|
36078
|
-
var index$
|
|
36094
|
+
var index$4 = /*#__PURE__*/Object.freeze({
|
|
36079
36095
|
__proto__: null,
|
|
36080
36096
|
formats: formats,
|
|
36081
36097
|
general: general
|
|
36082
36098
|
});
|
|
36083
36099
|
|
|
36084
|
-
export { AccountNumberImage, AccountsAddIcon$1 as AccountsAddIcon, AccountsIcon$1 as AccountsIcon, AccountsIconSmall$1 as AccountsIconSmall, AddressForm, Alert$1 as Alert, AmountCallout$1 as AmountCallout, BankIcon, Box, Breadcrumbs as Breadcrumb, ButtonWithAction, ButtonWithLink, Center, CenterSingle$1 as CenterSingle, CenterStack$1 as CenterStack, ChangePasswordForm, Checkbox$1 as Checkbox, CheckboxList$1 as CheckboxList, CheckmarkIcon, ChevronIcon$1 as ChevronIcon, Cluster, CollapsibleSection$1 as CollapsibleSection, CountryDropdown, Cover, DefaultPageTemplate, DisplayBox$1 as DisplayBox, DisplayCard, Dropdown$1 as Dropdown, EditNameForm, EditableList, EditableTable, EmailForm, ExternalLink, ForgotPasswordForm, ForgotPasswordIcon$1 as ForgotPasswordIcon, FormContainer$1 as FormContainer, FormInput$1 as FormInput, FormInputColumn, FormInputRow, FormSelect, FormattedAddress$1 as FormattedAddress, FormattedCreditCard$1 as FormattedCreditCard, Frame, GenericCard, GoToEmailIcon$1 as GoToEmailIcon, Grid, HamburgerButton, Heading$1 as Heading,
|
|
36100
|
+
export { AccountNumberImage, AccountsAddIcon$1 as AccountsAddIcon, AccountsIcon$1 as AccountsIcon, AccountsIconSmall$1 as AccountsIconSmall, AddressForm, Alert$1 as Alert, AmountCallout$1 as AmountCallout, BankIcon, Box, Breadcrumbs as Breadcrumb, ButtonWithAction, ButtonWithLink, Center, CenterSingle$1 as CenterSingle, CenterStack$1 as CenterStack, ChangePasswordForm, Checkbox$1 as Checkbox, CheckboxList$1 as CheckboxList, CheckmarkIcon, ChevronIcon$1 as ChevronIcon, Cluster, CollapsibleSection$1 as CollapsibleSection, CountryDropdown, Cover, DefaultPageTemplate, DisplayBox$1 as DisplayBox, DisplayCard, Dropdown$1 as Dropdown, EditNameForm, EditableList, EditableTable, EmailForm, ExternalLink, ForgotPasswordForm, ForgotPasswordIcon$1 as ForgotPasswordIcon, FormContainer$1 as FormContainer, FormInput$1 as FormInput, FormInputColumn, FormInputRow, FormSelect, FormattedAddress$1 as FormattedAddress, FormattedCreditCard$1 as FormattedCreditCard, Frame, GenericCard, GoToEmailIcon$1 as GoToEmailIcon, Grid, HamburgerButton, Heading$1 as Heading, HighlightTabRow$1 as HighlightTabRow, Imposter, InternalLink, Jumbo$1 as Jumbo, LabeledAmount$1 as LabeledAmount, LineItem$1 as LineItem, Loading, LoginForm, Modal$1 as Modal, Module$1 as Module, Motion, NavFooter, NavHeader, NavMenuDesktop$1 as NavMenuDesktop, NavMenuMobile$1 as NavMenuMobile, Obligation, Paragraph$1 as Paragraph, PartialAmountForm, PasswordRequirements, PaymentButtonBar, PaymentDetails$1 as PaymentDetails, PaymentFormACH, PaymentFormCard, PaymentIcon, PaymentMethodIcon$1 as PaymentMethodIcon, PaymentsIconSmall$1 as PaymentsIconSmall, PhoneForm, Placeholder$1 as Placeholder, ProcessingFee$1 as ProcessingFee, ProfileIconSmall$1 as ProfileIconSmall, PropertiesAddIcon$1 as PropertiesAddIcon, PropertiesIconSmall$1 as PropertiesIconSmall, RadioButton$2 as RadioButton, RadioSection$1 as RadioSection, Reel, RegistrationForm, ResetConfirmationForm$1 as ResetConfirmationForm, ResetPasswordForm, ResetPasswordSuccess, RoutingNumberImage, SettingsIconSmall$1 as SettingsIconSmall, Sidebar, SidebarSingleContent$1 as SidebarSingleContent, SidebarStackContent$1 as SidebarStackContent, SolidDivider$1 as SolidDivider, Spinner$2 as Spinner, Stack, FormStateDropdown as StateProvinceDropdown, Switcher, TabSidebar$1 as TabSidebar, TableListItem, TermsAndConditions, TermsAndConditionsModal$1 as TermsAndConditionsModal, Text$1 as Text, ToggleSwitch$1 as ToggleSwitch, VerifiedEmailIcon$1 as VerifiedEmailIcon, WorkflowTile, index$3 as constants, createPartialAmountFormState, index$4 as util, withWindowSize };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thecb/components",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
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;
|
|
@@ -8,6 +8,7 @@ import ButtonWithAction from "../button-with-action";
|
|
|
8
8
|
const ButtonWithLink = ({
|
|
9
9
|
url = "/",
|
|
10
10
|
disabled = false,
|
|
11
|
+
fileLink = false,
|
|
11
12
|
extraStyles,
|
|
12
13
|
newTab = false,
|
|
13
14
|
...otherProps
|
|
@@ -22,7 +23,7 @@ const ButtonWithLink = ({
|
|
|
22
23
|
if (disabled) {
|
|
23
24
|
return safeChildren(children, <span />);
|
|
24
25
|
}
|
|
25
|
-
return R.test(URL_TEST, url) ? (
|
|
26
|
+
return R.test(URL_TEST, url) || fileLink ? (
|
|
26
27
|
<ExternalLink
|
|
27
28
|
href={url}
|
|
28
29
|
tabIndex="-1"
|