@thecb/components 11.1.9-beta.0 → 11.1.10-beta.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/dist/index.cjs.js +37 -79
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +37 -79
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/radio-button-with-label/RadioButtonWithLabel.js +13 -7
- package/src/components/atoms/radio-button-with-label/RadioButtonWithLabel.theme.js +9 -3
- package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.js +11 -50
- package/src/components/molecules/multiple-select-filter/__private__/FilterButton.js +1 -3
- package/src/components/molecules/multiple-select-filter/__private__/util.js +0 -13
- package/src/components/molecules/obligation/Obligation.js +3 -1
- package/src/components/molecules/obligation/modules/AutopayModalModule.js +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -28462,10 +28462,12 @@ var ProcessingFee = function ProcessingFee(_ref) {
|
|
|
28462
28462
|
var ProcessingFee$1 = themeComponent(ProcessingFee, "ProcessingFee", fallbackValues$w, "default");
|
|
28463
28463
|
|
|
28464
28464
|
var activeColor$6 = MATISSE_BLUE;
|
|
28465
|
+
var disabledColor$1 = MANATEE_GREY;
|
|
28465
28466
|
var inactiveBorderColor = GREY_CHATEAU;
|
|
28466
28467
|
var fallbackValues$x = {
|
|
28467
|
-
|
|
28468
|
-
|
|
28468
|
+
activeColor: activeColor$6,
|
|
28469
|
+
disabledColor: disabledColor$1,
|
|
28470
|
+
inactiveBorderColor: inactiveBorderColor
|
|
28469
28471
|
};
|
|
28470
28472
|
|
|
28471
28473
|
var HiddenRadioInput = styled.input.withConfig({
|
|
@@ -28476,8 +28478,8 @@ var Circle = styled.div.withConfig({
|
|
|
28476
28478
|
displayName: "RadioButtonWithLabel__Circle",
|
|
28477
28479
|
componentId: "sc-1m9whwg-1"
|
|
28478
28480
|
})(["flex-shrink:0;margin-right:8px;width:1.5rem;height 1.5rem;border:", ";border-radius:50%;box-sizing:border-box;padding:2px;:after{content:\"\";width:100%;height:100%;display:block;background:", ";border-radius:50%;transform:scale(0);}"], function (_ref) {
|
|
28479
|
-
var
|
|
28480
|
-
return "1px solid ".concat(
|
|
28481
|
+
var borderColor = _ref.borderColor;
|
|
28482
|
+
return "1px solid ".concat(borderColor);
|
|
28481
28483
|
}, function (_ref2) {
|
|
28482
28484
|
var activeColor = _ref2.activeColor;
|
|
28483
28485
|
return activeColor;
|
|
@@ -28486,11 +28488,11 @@ var InputAndLabelContainer = styled(Cluster).withConfig({
|
|
|
28486
28488
|
displayName: "RadioButtonWithLabel__InputAndLabelContainer",
|
|
28487
28489
|
componentId: "sc-1m9whwg-2"
|
|
28488
28490
|
})(["overflow:visible;", ":checked + label ", ":after{transform:scale(0.85);transition:transform 0.15s;}", ":checked + label ", "{border:", "}", ":focus + label ", "{{box-shadow:", "}"], HiddenRadioInput, Circle, HiddenRadioInput, Circle, function (_ref3) {
|
|
28489
|
-
var
|
|
28490
|
-
return "1px solid ".concat(
|
|
28491
|
+
var borderColor = _ref3.borderColor;
|
|
28492
|
+
return "1px solid ".concat(borderColor, ";");
|
|
28491
28493
|
}, HiddenRadioInput, Circle, function (_ref4) {
|
|
28492
|
-
var
|
|
28493
|
-
return "0px 0px 2px 1px ".concat(
|
|
28494
|
+
var borderColor = _ref4.borderColor;
|
|
28495
|
+
return "0px 0px 2px 1px ".concat(borderColor, ";");
|
|
28494
28496
|
});
|
|
28495
28497
|
var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
28496
28498
|
var _ref5$id = _ref5.id,
|
|
@@ -28507,7 +28509,9 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
|
28507
28509
|
_ref5$handleChange = _ref5.handleChange,
|
|
28508
28510
|
handleChange = _ref5$handleChange === void 0 ? noop$1 : _ref5$handleChange,
|
|
28509
28511
|
field = _ref5.field,
|
|
28510
|
-
config = _ref5.config
|
|
28512
|
+
config = _ref5.config,
|
|
28513
|
+
_ref5$disabled = _ref5.disabled,
|
|
28514
|
+
disabled = _ref5$disabled === void 0 ? false : _ref5$disabled;
|
|
28511
28515
|
var getDefaultChecked = function getDefaultChecked(value, idx) {
|
|
28512
28516
|
var selectionExistsInConfig = config === null || config === void 0 ? void 0 : config.map(function (c) {
|
|
28513
28517
|
return c.value;
|
|
@@ -28522,8 +28526,9 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
|
28522
28526
|
return /*#__PURE__*/React.createElement(InputAndLabelContainer, {
|
|
28523
28527
|
align: "center",
|
|
28524
28528
|
childGap: "0.5rem",
|
|
28525
|
-
|
|
28529
|
+
borderColor: disabled ? themeValues.inactiveBorderColor : themeValues.activeColor
|
|
28526
28530
|
}, /*#__PURE__*/React.createElement(HiddenRadioInput, {
|
|
28531
|
+
disabled: disabled,
|
|
28527
28532
|
"aria-invalid": ariaInvalid,
|
|
28528
28533
|
style: {
|
|
28529
28534
|
marginTop: 0
|
|
@@ -28542,8 +28547,8 @@ var RadioButtonWithLabel = function RadioButtonWithLabel(_ref5) {
|
|
|
28542
28547
|
htmlFor: id,
|
|
28543
28548
|
extraStyles: "\n font-size: 1rem;\n display: flex; \n width: 100%;\n :hover {\n cursor: pointer;\n }\n "
|
|
28544
28549
|
}, /*#__PURE__*/React.createElement(Circle, {
|
|
28545
|
-
activeColor: themeValues.activeColor,
|
|
28546
|
-
|
|
28550
|
+
activeColor: disabled ? themeValues.disabledColor : themeValues.activeColor,
|
|
28551
|
+
borderColor: themeValues.inactiveBorderColor
|
|
28547
28552
|
}), labelText));
|
|
28548
28553
|
};
|
|
28549
28554
|
var RadioButtonWithLabel$1 = themeComponent(RadioButtonWithLabel, "RadioButtonWithLabel", fallbackValues$x);
|
|
@@ -46463,7 +46468,7 @@ var iconsMap = (_iconsMap = {}, _defineProperty(_defineProperty(_defineProperty(
|
|
|
46463
46468
|
|
|
46464
46469
|
var disabledBackgroundColor$1 = TRANSPARENT;
|
|
46465
46470
|
var disabledBorderColor$1 = GHOST_GREY;
|
|
46466
|
-
var disabledColor$
|
|
46471
|
+
var disabledColor$2 = MANATEE_GREY;
|
|
46467
46472
|
var activeBackgroundColor$1 = CORNFLOWER_BLUE;
|
|
46468
46473
|
var backgroundColor$a = LINK_WATER;
|
|
46469
46474
|
var borderColor$5 = MOON_RAKER;
|
|
@@ -46471,7 +46476,7 @@ var color$b = ROYAL_BLUE_VIVID;
|
|
|
46471
46476
|
var fallbackValues$L = {
|
|
46472
46477
|
disabledBackgroundColor: disabledBackgroundColor$1,
|
|
46473
46478
|
disabledBorderColor: disabledBorderColor$1,
|
|
46474
|
-
disabledColor: disabledColor$
|
|
46479
|
+
disabledColor: disabledColor$2,
|
|
46475
46480
|
activeBackgroundColor: activeBackgroundColor$1,
|
|
46476
46481
|
backgroundColor: backgroundColor$a,
|
|
46477
46482
|
borderColor: borderColor$5,
|
|
@@ -46837,8 +46842,8 @@ var AutopayModalModule = function AutopayModalModule(_ref) {
|
|
|
46837
46842
|
onClick = _ref.onClick,
|
|
46838
46843
|
onKeyPress = _ref.onKeyPress;
|
|
46839
46844
|
var generateMethodNeededText = function generateMethodNeededText(planText, allowedPaymentInstruments) {
|
|
46840
|
-
var allowsCard = allowedPaymentInstruments.includes(CC_METHOD);
|
|
46841
|
-
var allowsACH = allowedPaymentInstruments.includes(ACH_METHOD);
|
|
46845
|
+
var allowsCard = allowedPaymentInstruments === null || allowedPaymentInstruments === void 0 ? void 0 : allowedPaymentInstruments.includes(CC_METHOD);
|
|
46846
|
+
var allowsACH = allowedPaymentInstruments === null || allowedPaymentInstruments === void 0 ? void 0 : allowedPaymentInstruments.includes(ACH_METHOD);
|
|
46842
46847
|
var methodRequired = allowsCard && !allowsACH ? "debit or credit card payment method" : !allowsCard && allowsACH ? "checking account payment method" : "payment method";
|
|
46843
46848
|
return "To set up ".concat(planText, " you must have a saved ").concat(methodRequired, " and address. Do you want to save these now?");
|
|
46844
46849
|
};
|
|
@@ -47346,7 +47351,8 @@ var fallbackValues$N = {
|
|
|
47346
47351
|
var Obligation = function Obligation(_ref) {
|
|
47347
47352
|
var _obligations$, _firstObligation$cust;
|
|
47348
47353
|
var config = _ref.config,
|
|
47349
|
-
obligations = _ref.obligations,
|
|
47354
|
+
_ref$obligations = _ref.obligations,
|
|
47355
|
+
obligations = _ref$obligations === void 0 ? [] : _ref$obligations,
|
|
47350
47356
|
actions = _ref.actions,
|
|
47351
47357
|
autoPayEnabled = _ref.autoPayEnabled,
|
|
47352
47358
|
autoPayAvailable = _ref.autoPayAvailable,
|
|
@@ -47446,6 +47452,7 @@ var Obligation = function Obligation(_ref) {
|
|
|
47446
47452
|
isLoading: true
|
|
47447
47453
|
}))), !isMobile && /*#__PURE__*/React.createElement(PaymentDetailsActions, {
|
|
47448
47454
|
obligations: obligations,
|
|
47455
|
+
obligationAssocID: obligationAssocID,
|
|
47449
47456
|
autoPayEnabled: autoPayEnabled,
|
|
47450
47457
|
autoPayAvailable: autoPayAvailable,
|
|
47451
47458
|
handleAutopayAction: handleAutopayAction,
|
|
@@ -47466,6 +47473,7 @@ var Obligation = function Obligation(_ref) {
|
|
|
47466
47473
|
isContentLoading: true
|
|
47467
47474
|
}))), isMobile && /*#__PURE__*/React.createElement(PaymentDetailsActions, {
|
|
47468
47475
|
obligations: obligations,
|
|
47476
|
+
obligationAssocID: obligationAssocID,
|
|
47469
47477
|
autoPayEnabled: autoPayEnabled,
|
|
47470
47478
|
autoPayAvailable: autoPayAvailable,
|
|
47471
47479
|
handleAutopayAction: handleAutopayAction,
|
|
@@ -50727,8 +50735,7 @@ var FilterButton$1 = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
50727
50735
|
truncateBtnTextWidth = _ref.truncateBtnTextWidth,
|
|
50728
50736
|
filterLabel = _ref.filterLabel,
|
|
50729
50737
|
selectedOptions = _ref.selectedOptions,
|
|
50730
|
-
extraStyles = _ref.extraStyles
|
|
50731
|
-
dataAppliedOptions = _ref.dataAppliedOptions;
|
|
50738
|
+
extraStyles = _ref.extraStyles;
|
|
50732
50739
|
var btnTextFilterDescription = selectedOptions !== null && selectedOptions !== void 0 && selectedOptions.length ? "".concat(filterLabel ? "".concat(filterLabel, ": ") : "").concat(selectedOptions[0].name) : "".concat(filterLabel ? filterLabel : "");
|
|
50733
50740
|
var btnTextItemsDescription = selectedOptions !== null && selectedOptions !== void 0 && selectedOptions.length && (selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions.length) > 1 ? ", +".concat((selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions.length) - 1, " More") : "";
|
|
50734
50741
|
return /*#__PURE__*/React.createElement(StyledFilterButton, {
|
|
@@ -50746,7 +50753,6 @@ var FilterButton$1 = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
50746
50753
|
dataQa: "".concat(name, "-filter-button"),
|
|
50747
50754
|
extraStyles: extraStyles,
|
|
50748
50755
|
"aria-label": "".concat(filterLabel, " Filter: ").concat(btnTextFilterDescription, " ").concat(btnTextItemsDescription),
|
|
50749
|
-
"data-applied-options": dataAppliedOptions,
|
|
50750
50756
|
contentOverride: true
|
|
50751
50757
|
}, btnContentOverride ? btnContentOverride : /*#__PURE__*/React.createElement(Center, {
|
|
50752
50758
|
as: "span",
|
|
@@ -50931,19 +50937,6 @@ var selectOption = function selectOption(option, selectedOptions, setSelectedOpt
|
|
|
50931
50937
|
setSelectedOptions(moreOptions);
|
|
50932
50938
|
}
|
|
50933
50939
|
};
|
|
50934
|
-
var mergeOptions = function mergeOptions(selectedOptions, activeOptions) {
|
|
50935
|
-
if (!activeOptions.length) return selectedOptions;
|
|
50936
|
-
if (!selectedOptions.length) return activeOptions;
|
|
50937
|
-
var mergedOptions = _toConsumableArray(selectedOptions);
|
|
50938
|
-
activeOptions.forEach(function (activeOption) {
|
|
50939
|
-
if (!mergedOptions.some(function (option) {
|
|
50940
|
-
return option.name === activeOption.name;
|
|
50941
|
-
})) {
|
|
50942
|
-
mergedOptions.push(activeOption);
|
|
50943
|
-
}
|
|
50944
|
-
});
|
|
50945
|
-
return mergedOptions;
|
|
50946
|
-
};
|
|
50947
50940
|
|
|
50948
50941
|
var useKeyboardNavigation = function useKeyboardNavigation(_ref) {
|
|
50949
50942
|
var options = _ref.options,
|
|
@@ -51144,75 +51137,41 @@ var MultipleSelectFilter = function MultipleSelectFilter(_ref) {
|
|
|
51144
51137
|
searchable = _ref$searchable === void 0 ? true : _ref$searchable,
|
|
51145
51138
|
themeValues = _ref.themeValues,
|
|
51146
51139
|
_ref$truncateBtnTextW = _ref.truncateBtnTextWidth,
|
|
51147
|
-
truncateBtnTextWidth = _ref$truncateBtnTextW === void 0 ? "15rem" : _ref$truncateBtnTextW
|
|
51148
|
-
activeAppliedOptions = _ref.activeAppliedOptions;
|
|
51149
|
-
// State to manage whether the dropdown is open or closed
|
|
51140
|
+
truncateBtnTextWidth = _ref$truncateBtnTextW === void 0 ? "15rem" : _ref$truncateBtnTextW;
|
|
51150
51141
|
var _useState = useState(false),
|
|
51151
51142
|
_useState2 = _slicedToArray(_useState, 2),
|
|
51152
51143
|
opened = _useState2[0],
|
|
51153
51144
|
setOpened = _useState2[1];
|
|
51154
|
-
|
|
51155
|
-
// State to manage the currently selected options
|
|
51156
51145
|
var _useState3 = useState([]),
|
|
51157
51146
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
51158
51147
|
selectedOptions = _useState4[0],
|
|
51159
51148
|
setSelectedOptions = _useState4[1];
|
|
51160
|
-
|
|
51161
|
-
// State to manage the applied options, initialized with activeAppliedOptions or an empty array
|
|
51162
|
-
var _useState5 = useState(activeAppliedOptions || []),
|
|
51149
|
+
var _useState5 = useState([]),
|
|
51163
51150
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
51164
51151
|
appliedOptions = _useState6[0],
|
|
51165
51152
|
setAppliedOptions = _useState6[1];
|
|
51166
|
-
|
|
51167
|
-
// State to track whether the user has interacted with the component
|
|
51168
|
-
var _useState7 = useState(false),
|
|
51169
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
51170
|
-
hasInteracted = _useState8[0],
|
|
51171
|
-
setHasInteracted = _useState8[1];
|
|
51172
|
-
|
|
51173
|
-
// Reference to keep track of the opened state across renders without causing re-renders
|
|
51174
51153
|
var openedRef = useRef(opened);
|
|
51175
|
-
|
|
51176
|
-
|
|
51154
|
+
var handleOnClose = function handleOnClose() {
|
|
51155
|
+
if (openedRef.current) {
|
|
51156
|
+
setOpened(false);
|
|
51157
|
+
actions.fields.searchTerm.set("");
|
|
51158
|
+
}
|
|
51159
|
+
};
|
|
51177
51160
|
var containerRef = useOutsideClickHook(function () {
|
|
51178
51161
|
return handleOnClose();
|
|
51179
51162
|
});
|
|
51180
|
-
|
|
51181
|
-
// References to various elements within the component
|
|
51182
51163
|
var dropdownRef = useRef(null);
|
|
51183
51164
|
var filterButtonRef = useRef(null);
|
|
51184
51165
|
var applyFilterButtonRef = useRef(null);
|
|
51185
|
-
|
|
51186
|
-
// IDs for accessibility and identification purposes
|
|
51187
51166
|
var filterDropdownID = "".concat(name, "-filter-dropdown");
|
|
51188
51167
|
var listGroupID = "".concat(name, "-list-group");
|
|
51189
|
-
var handleOnClose = function handleOnClose() {
|
|
51190
|
-
if (openedRef.current) {
|
|
51191
|
-
setOpened(false);
|
|
51192
|
-
actions.fields.searchTerm.set("");
|
|
51193
|
-
}
|
|
51194
|
-
};
|
|
51195
51168
|
useEffect$1(function () {
|
|
51196
51169
|
openedRef.current = opened;
|
|
51197
51170
|
if (!opened) {
|
|
51198
|
-
|
|
51199
|
-
|
|
51200
|
-
setAppliedOptions(selectedOptions);
|
|
51201
|
-
}
|
|
51202
|
-
} else {
|
|
51203
|
-
setHasInteracted(true);
|
|
51171
|
+
onApply(selectedOptions);
|
|
51172
|
+
setAppliedOptions(selectedOptions);
|
|
51204
51173
|
}
|
|
51205
51174
|
}, [opened]);
|
|
51206
|
-
useEffect$1(function () {
|
|
51207
|
-
// Update the applied options state with the current active applied options,
|
|
51208
|
-
// or an empty array if activeAppliedOptions is undefined or null.
|
|
51209
|
-
// This ensures that the current applied options are in sync with the parent component.
|
|
51210
|
-
setAppliedOptions(activeAppliedOptions || []);
|
|
51211
|
-
|
|
51212
|
-
// Merge the selected options with the active applied options.
|
|
51213
|
-
var mergedSelections = mergeOptions(selectedOptions, activeAppliedOptions);
|
|
51214
|
-
setSelectedOptions(mergedSelections);
|
|
51215
|
-
}, [activeAppliedOptions]);
|
|
51216
51175
|
useEffect$1(function () {
|
|
51217
51176
|
var handleKeyDown = function handleKeyDown(event) {
|
|
51218
51177
|
if (event.key === "Escape") {
|
|
@@ -51254,8 +51213,7 @@ var MultipleSelectFilter = function MultipleSelectFilter(_ref) {
|
|
|
51254
51213
|
truncateBtnTextWidth: truncateBtnTextWidth,
|
|
51255
51214
|
filterLabel: filterLabel,
|
|
51256
51215
|
selectedOptions: selectedOptions,
|
|
51257
|
-
extraStyles: btnExtraStyles
|
|
51258
|
-
dataAppliedOptions: appliedOptions === null || appliedOptions === void 0 ? void 0 : appliedOptions.length
|
|
51216
|
+
extraStyles: btnExtraStyles
|
|
51259
51217
|
}), /*#__PURE__*/React.createElement(FilterDropdown, {
|
|
51260
51218
|
id: filterDropdownID,
|
|
51261
51219
|
ref: dropdownRef,
|