@thecb/components 10.2.4-beta.0 → 10.2.4-beta.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/dist/index.cjs.js +47 -20
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +47 -20
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/badge/Badge.js +6 -2
- package/src/components/atoms/badge/Badge.stories.js +2 -1
- package/src/components/atoms/badge/Badge.theme.js +8 -4
- package/src/components/atoms/button-with-action/ButtonWithAction.js +7 -4
- package/src/components/atoms/icons/AutopayIcon.js +2 -2
- package/src/components/atoms/layouts/Box.js +1 -0
- package/src/components/atoms/layouts/examples/box-example/BoxExample.stories.js +2 -1
- package/src/components/atoms/placeholder/Placeholder.js +80 -76
- package/src/components/molecules/link-card/LinkCard.js +13 -6
- package/src/components/molecules/link-card/LinkCard.stories.js +64 -34
- package/src/components/molecules/link-card/LinkCard.theme.js +20 -5
package/dist/index.esm.js
CHANGED
|
@@ -6496,7 +6496,7 @@ var BoxWrapper = styled(function (_ref) {
|
|
|
6496
6496
|
});
|
|
6497
6497
|
/* eslint-enable no-unused-vars */
|
|
6498
6498
|
|
|
6499
|
-
var _excluded$3 = ["autocompleteValue", "padding", "borderSize", "borderColor", "borderRadius", "boxShadow", "background", "color", "minHeight", "width", "minWidth", "maxWidth", "borderWidthOverride", "border", "textAlign", "hoverStyles", "activeStyles", "disabledStyles", "variant", "as", "onClick", "onKeyDown", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur", "onTouchEnd", "theme", "hiddenStyles", "extraStyles", "srOnly", "dataQa", "children"];
|
|
6499
|
+
var _excluded$3 = ["autocompleteValue", "padding", "borderSize", "borderColor", "borderRadius", "boxShadow", "background", "color", "minHeight", "width", "minWidth", "maxWidth", "borderWidthOverride", "border", "textAlign", "hoverStyles", "activeStyles", "disabledStyles", "variant", "as", "onClick", "onKeyDown", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur", "onTouchEnd", "theme", "hiddenStyles", "extraStyles", "srOnly", "dataQa", "disabled", "children"];
|
|
6500
6500
|
|
|
6501
6501
|
/*
|
|
6502
6502
|
Box component to create generic boxes
|
|
@@ -6544,6 +6544,7 @@ var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
6544
6544
|
_ref$srOnly = _ref.srOnly,
|
|
6545
6545
|
srOnly = _ref$srOnly === void 0 ? false : _ref$srOnly,
|
|
6546
6546
|
dataQa = _ref.dataQa,
|
|
6547
|
+
_ref$disabled = _ref.disabled,
|
|
6547
6548
|
children = _ref.children,
|
|
6548
6549
|
rest = _objectWithoutProperties(_ref, _excluded$3);
|
|
6549
6550
|
return /*#__PURE__*/React.createElement(BoxWrapper, _extends({
|
|
@@ -12902,12 +12903,13 @@ var ButtonWithAction = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
12902
12903
|
children = _ref2.children,
|
|
12903
12904
|
extraDisabledStyles = _ref2.extraDisabledStyles,
|
|
12904
12905
|
rest = _objectWithoutProperties(_ref2, _excluded$h);
|
|
12906
|
+
var isGhostVariant = variant === "ghost" || variant === "smallGhost";
|
|
12905
12907
|
var themeContext = useContext(ThemeContext);
|
|
12906
12908
|
var themeValues = createThemeValues(themeContext, fallbackValues$1, "Button", variant);
|
|
12907
12909
|
var isMobile = themeContext.isMobile;
|
|
12908
12910
|
var hoverStyles = "\n outline: none;\n background-color: ".concat(themeValues.hoverBackgroundColor, ";\n border-color: ").concat(themeValues.hoverBorderColor, ";\n color: ").concat(themeValues.hoverColor, ";\n text-decoration: ").concat(variant === "ghost" || variant === "smallGhost" ? "underline" : "none", ";\n cursor: pointer;\n ");
|
|
12909
12911
|
var activeStyles = "\n outline: none;\n background-color: ".concat(themeValues.activeBackgroundColor, ";\n border-color: ").concat(themeValues.activeBorderColor, ";\n color: ").concat(themeValues.activeColor, ";\n text-decoration: ").concat(variant === "ghost" || variant === "smallGhost" ? "underline" : "none", ";\n ");
|
|
12910
|
-
var disabledStyles = "\n background-color: #6D717E;\n border-color: #6D717E;\n color: #FFFFFF;\n cursor: default;\n &:focus {\n outline: 3px solid #6D717E;\n outline-offset: 2px;\n }\n ".concat(extraDisabledStyles, "\n ");
|
|
12912
|
+
var disabledStyles = "\n background-color: ".concat(isGhostVariant ? "transparent;" : "#6D717E;", ";\n border-color: ").concat(isGhostVariant ? "transparent;" : "#6D717E;", ";\n color: ").concat(isGhostVariant ? "#6D717E;" : "#FFFFFF", ";\n cursor: default;\n &:focus {\n outline: 3px solid #6D717E;\n outline-offset: 2px;\n }\n ").concat(extraDisabledStyles, "\n ");
|
|
12911
12913
|
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
12912
12914
|
ref: ref,
|
|
12913
12915
|
variant: variant,
|
|
@@ -12938,7 +12940,7 @@ var ButtonWithAction = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
12938
12940
|
variant: themeValues.fontSizeVariant,
|
|
12939
12941
|
color: themeValues.color,
|
|
12940
12942
|
textWrap: textWrap,
|
|
12941
|
-
extraStyles: textExtraStyles
|
|
12943
|
+
extraStyles: disabled ? textExtraStyles + disabledStyles : textExtraStyles
|
|
12942
12944
|
}, text)));
|
|
12943
12945
|
});
|
|
12944
12946
|
|
|
@@ -13006,7 +13008,9 @@ var AccountsIcon$1 = themeComponent(AccountsIcon, "Icons", fallbackValues$2, "in
|
|
|
13006
13008
|
// Fill color based on default "success" variant color
|
|
13007
13009
|
var AutopayIcon = function AutopayIcon(_ref) {
|
|
13008
13010
|
var _ref$fill = _ref.fill,
|
|
13009
|
-
fill = _ref$fill === void 0 ? "#317D4F" : _ref$fill
|
|
13011
|
+
fill = _ref$fill === void 0 ? "#317D4F" : _ref$fill,
|
|
13012
|
+
_ref$color = _ref.color,
|
|
13013
|
+
color = _ref$color === void 0 ? "#317D4F" : _ref$color;
|
|
13010
13014
|
return /*#__PURE__*/React.createElement("svg", {
|
|
13011
13015
|
width: "16",
|
|
13012
13016
|
height: "16",
|
|
@@ -13030,7 +13034,7 @@ var AutopayIcon = function AutopayIcon(_ref) {
|
|
|
13030
13034
|
mask: "url(#mask0_5560_39870)"
|
|
13031
13035
|
}, /*#__PURE__*/React.createElement("path", {
|
|
13032
13036
|
d: "M0 0H16V16H0V0Z",
|
|
13033
|
-
fill: fill
|
|
13037
|
+
fill: fill || color
|
|
13034
13038
|
})));
|
|
13035
13039
|
};
|
|
13036
13040
|
|
|
@@ -18977,13 +18981,15 @@ var background$1 = {
|
|
|
18977
18981
|
info: "".concat(INFO_BLUE),
|
|
18978
18982
|
warn: "".concat(HALF_COLONIAL_WHITE),
|
|
18979
18983
|
primary: "".concat(CORNFLOWER_BLUE),
|
|
18980
|
-
success: "".concat(HINT_GREEN)
|
|
18984
|
+
success: "".concat(HINT_GREEN),
|
|
18985
|
+
disabled: "".concat(GRECIAN_GREY)
|
|
18981
18986
|
};
|
|
18982
18987
|
var color$4 = {
|
|
18983
18988
|
info: "".concat(MATISSE_BLUE),
|
|
18984
18989
|
warn: "".concat(ZEST_ORANGE),
|
|
18985
18990
|
primary: "".concat(ROYAL_BLUE_VIVID),
|
|
18986
|
-
success: "".concat(SEA_GREEN)
|
|
18991
|
+
success: "".concat(SEA_GREEN),
|
|
18992
|
+
disabled: "".concat(MANATEE_GREY)
|
|
18987
18993
|
};
|
|
18988
18994
|
var fallbackValues$7 = {
|
|
18989
18995
|
background: background$1,
|
|
@@ -19007,10 +19013,12 @@ var Badge = function Badge(_ref) {
|
|
|
19007
19013
|
return /*#__PURE__*/React.createElement(StyledBadgeContainer, {
|
|
19008
19014
|
background: themeValues.background
|
|
19009
19015
|
}, iconOnLeft && Icon && /*#__PURE__*/React.createElement(Icon, {
|
|
19016
|
+
color: themeValues.color,
|
|
19010
19017
|
fill: themeValues.color
|
|
19011
19018
|
}), /*#__PURE__*/React.createElement(StyledBadge, {
|
|
19012
19019
|
color: themeValues.color
|
|
19013
19020
|
}, label), !iconOnLeft && Icon && /*#__PURE__*/React.createElement(Icon, {
|
|
19021
|
+
color: themeValues.color,
|
|
19014
19022
|
fill: themeValues.color
|
|
19015
19023
|
}));
|
|
19016
19024
|
};
|
|
@@ -27576,18 +27584,18 @@ var PlaceholderContentWrapper = function PlaceholderContentWrapper(_ref) {
|
|
|
27576
27584
|
return isLink ? /*#__PURE__*/React.createElement(Link, {
|
|
27577
27585
|
to: destination,
|
|
27578
27586
|
"data-qa": dataQa,
|
|
27579
|
-
disabled: disabled
|
|
27587
|
+
"aria-disabled": disabled
|
|
27580
27588
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
27581
27589
|
padding: "0",
|
|
27582
27590
|
minHeight: "100%",
|
|
27583
|
-
extraStyles: "cursor: pointer;"
|
|
27591
|
+
extraStyles: disabled ? "cursor: default;" : "cursor: pointer;"
|
|
27584
27592
|
}, children)) : /*#__PURE__*/React.createElement(Box, {
|
|
27585
27593
|
onClick: disabled ? noop : action,
|
|
27586
27594
|
padding: "0",
|
|
27587
27595
|
minHeight: "100%",
|
|
27588
27596
|
dataQa: dataQa,
|
|
27589
27597
|
"aria-disabled": disabled,
|
|
27590
|
-
extraStyles: disabled ? "cursor: default;
|
|
27598
|
+
extraStyles: disabled ? "cursor: default;" : "cursor: pointer;"
|
|
27591
27599
|
}, children);
|
|
27592
27600
|
};
|
|
27593
27601
|
var Placeholder = function Placeholder(_ref2) {
|
|
@@ -27604,6 +27612,7 @@ var Placeholder = function Placeholder(_ref2) {
|
|
|
27604
27612
|
dataQa = _ref2.dataQa,
|
|
27605
27613
|
_ref2$disabled = _ref2.disabled,
|
|
27606
27614
|
disabled = _ref2$disabled === void 0 ? false : _ref2$disabled;
|
|
27615
|
+
var tintedColor = "".concat(curriedTint$1(0.9, themeValues.color));
|
|
27607
27616
|
return /*#__PURE__*/React.createElement(PlaceholderContentWrapper, {
|
|
27608
27617
|
isLink: isLink,
|
|
27609
27618
|
action: action,
|
|
@@ -27617,7 +27626,7 @@ var Placeholder = function Placeholder(_ref2) {
|
|
|
27617
27626
|
minHeight: themeValues.height,
|
|
27618
27627
|
hiddenStyles: !visible,
|
|
27619
27628
|
extraStyles: "\n background: linear-gradient(\n to right,\n ".concat(variant === "large" ? STORM_GREY : themeValues.color, " 40%,\n rgba(255, 255, 255, 0) 0%\n ),\n linear-gradient(").concat(variant === "large" ? STORM_GREY : themeValues.color, " 40%, rgba(255, 255, 255, 0) 0%),\n linear-gradient(to right, ").concat(variant === "large" ? STORM_GREY : themeValues.color, " 40%, rgba(255, 255, 255, 0) 0%),\n linear-gradient(").concat(variant === "large" ? STORM_GREY : themeValues.color, " 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;"),
|
|
27620
|
-
hoverStyles: "background-color: ".concat(variant === "large" ? GRECIAN_GREY :
|
|
27629
|
+
hoverStyles: "background-color: ".concat(variant === "large" ? GRECIAN_GREY : tintedColor, ";")
|
|
27621
27630
|
}, /*#__PURE__*/React.createElement(Center, {
|
|
27622
27631
|
maxWidth: "300px"
|
|
27623
27632
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
@@ -42454,10 +42463,22 @@ var PROPERTIES_COMMERCIAL_AUTO_ICON = "PROPERTIES_COMMERCIAL_AUTO";
|
|
|
42454
42463
|
var MISC_BILL_ICON = "MISC_SINGLE_BILL";
|
|
42455
42464
|
var iconsMap = (_iconsMap = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_iconsMap, ACCOUNTS_GENERIC_ICON, AccountGenericIcon), ACCOUNTS_CONSTRUCTION_ICON, AccountConstructionIcon), ACCOUNTS_HEALTH_ICON, AccountMedicalIcon), ACCOUNTS_DENTAL_ICON, AccountDentalIcon), ACCOUNTS_UTILITY_ELECTRIC_ICON, AccountElectricIcon), ACCOUNTS_UTILITY_GARBAGE_ICON, AccountGarbageIcon), ACCOUNTS_UTILITY_GAS_ICON, AccountGasIcon), ACCOUNTS_UTILITY_WATER_ICON, AccountWaterIcon), PROPERTIES_PERSONAL_ICON, PropertyPersonalIcon), PROPERTIES_GARAGE_ICON, PropertyGarageIcon), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_iconsMap, PROPERTIES_BUSINESS_ICON, PropertyBusinessIcon), PROPERTIES_STOREFRONT_ICON, PropertyStorefrontIcon), PROPERTIES_APARTMENT_ICON, PropertyApartmentIcon), PROPERTIES_LAND_ICON, PropertyLandIcon), PROPERTIES_CAR_ICON, PropertyCarIcon), PROPERTIES_MOTORCYCLE_ICON, PropertyMotorcycleIcon), PROPERTIES_COMMERCIAL_AUTO_ICON, PropertyCommercialVehicleIcon), MISC_BILL_ICON, AccountBillIcon));
|
|
42456
42465
|
|
|
42457
|
-
var activeBackgroundColor$1 =
|
|
42458
|
-
|
|
42459
|
-
|
|
42460
|
-
|
|
42466
|
+
var activeBackgroundColor$1 = {
|
|
42467
|
+
primary: "".concat(CORNFLOWER_BLUE),
|
|
42468
|
+
disabled: "".concat(ATHENS_GREY)
|
|
42469
|
+
};
|
|
42470
|
+
var backgroundColor$9 = {
|
|
42471
|
+
primary: "".concat(LINK_WATER),
|
|
42472
|
+
disabled: "".concat(ATHENS_GREY)
|
|
42473
|
+
};
|
|
42474
|
+
var borderColor$5 = {
|
|
42475
|
+
primary: "".concat(MOON_RAKER),
|
|
42476
|
+
disabled: "".concat(GHOST_GREY)
|
|
42477
|
+
};
|
|
42478
|
+
var color$b = {
|
|
42479
|
+
primary: "".concat(ROYAL_BLUE_VIVID),
|
|
42480
|
+
disabled: "".concat(MANATEE_GREY)
|
|
42481
|
+
};
|
|
42461
42482
|
var fallbackValues$I = {
|
|
42462
42483
|
activeBackgroundColor: activeBackgroundColor$1,
|
|
42463
42484
|
backgroundColor: backgroundColor$9,
|
|
@@ -42498,7 +42519,8 @@ var Footer = styled(Stack).withConfig({
|
|
|
42498
42519
|
})(["align-items:center;width:100%;"]);
|
|
42499
42520
|
|
|
42500
42521
|
var LinkCard = function LinkCard(_ref) {
|
|
42501
|
-
var _ref$
|
|
42522
|
+
var _ref$variant = _ref.variant,
|
|
42523
|
+
_ref$title = _ref.title,
|
|
42502
42524
|
title = _ref$title === void 0 ? "Test Workflow" : _ref$title,
|
|
42503
42525
|
_ref$subtitle = _ref.subtitle,
|
|
42504
42526
|
subtitle = _ref$subtitle === void 0 ? "Link your benefit plan" : _ref$subtitle,
|
|
@@ -42515,7 +42537,9 @@ var LinkCard = function LinkCard(_ref) {
|
|
|
42515
42537
|
extraActiveStyles = _ref$extraActiveStyle === void 0 ? "" : _ref$extraActiveStyle,
|
|
42516
42538
|
themeValues = _ref.themeValues,
|
|
42517
42539
|
_ref$titleVariant = _ref.titleVariant,
|
|
42518
|
-
titleVariant = _ref$titleVariant === void 0 ? "h3" : _ref$titleVariant
|
|
42540
|
+
titleVariant = _ref$titleVariant === void 0 ? "h3" : _ref$titleVariant,
|
|
42541
|
+
_ref$disabled = _ref.disabled,
|
|
42542
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled;
|
|
42519
42543
|
var _useContext = useContext(ThemeContext),
|
|
42520
42544
|
isMobile = _useContext.isMobile;
|
|
42521
42545
|
var regex = /\W/g;
|
|
@@ -42532,7 +42556,8 @@ var LinkCard = function LinkCard(_ref) {
|
|
|
42532
42556
|
extraStyles: extraStyles,
|
|
42533
42557
|
hoverStyles: extraHoverStyles,
|
|
42534
42558
|
activeStyles: extraActiveStyles,
|
|
42535
|
-
onClick: onClick
|
|
42559
|
+
onClick: disabled ? noop : onClick,
|
|
42560
|
+
"aria-disabled": disabled
|
|
42536
42561
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
42537
42562
|
childGap: 0,
|
|
42538
42563
|
bottomItem: 3,
|
|
@@ -42563,9 +42588,11 @@ var LinkCard = function LinkCard(_ref) {
|
|
|
42563
42588
|
direction: "row",
|
|
42564
42589
|
childGap: "6px",
|
|
42565
42590
|
justify: "space-between"
|
|
42566
|
-
}, showLeft &&
|
|
42591
|
+
}, showLeft && !!leftContent ? leftContent : /*#__PURE__*/React.createElement(Box, {
|
|
42592
|
+
extraStyles: "margin-right: auto;"
|
|
42593
|
+
}), showRight && !!rightContent && rightContent))));
|
|
42567
42594
|
};
|
|
42568
|
-
var LinkCard$1 = themeComponent(LinkCard, "LinkCard", fallbackValues$I);
|
|
42595
|
+
var LinkCard$1 = themeComponent(LinkCard, "LinkCard", fallbackValues$I, "primary");
|
|
42569
42596
|
|
|
42570
42597
|
var LoginForm = function LoginForm(_ref) {
|
|
42571
42598
|
var clearOnDismount = _ref.clearOnDismount,
|