@thecb/components 10.5.1-beta.3 → 10.6.1-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 +38 -379
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +18 -38
- package/dist/index.esm.js +38 -379
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/atoms/icons/WalletIconSmall.js +7 -3
- package/src/components/molecules/modal/Modal.js +217 -6
- package/src/components/molecules/modal/Modal.stories.js +13 -56
- package/src/components/molecules/registration-form/RegistrationForm.js +3 -6
- package/src/components/molecules/registration-form/RegistrationForm.state.js +3 -4
- package/src/constants/style_constants.d.ts +6 -18
- package/src/constants/style_constants.js +20 -22
- package/src/components/molecules/modal/ModalControlV1.js +0 -234
- package/src/components/molecules/modal/ModalControlV2.js +0 -203
- package/src/components/molecules/modal/__private__/ButtonLayoutWrapper.js +0 -24
- package/src/components/molecules/modal/__private__/CancelButton.js +0 -35
- package/src/components/molecules/modal/__private__/CloseButton.js +0 -34
- package/src/components/molecules/modal/__private__/ContinueButton.js +0 -44
- package/src/components/molecules/modal/__private__/index.d.ts +0 -46
- package/src/components/molecules/modal/__private__/index.js +0 -4
package/dist/index.cjs.js
CHANGED
|
@@ -4908,49 +4908,27 @@ var themeUtils = /*#__PURE__*/Object.freeze({
|
|
|
4908
4908
|
|
|
4909
4909
|
/* These are constants used by nav frontend components */
|
|
4910
4910
|
|
|
4911
|
-
var BORDER_RADIUS = {
|
|
4912
|
-
MD: "4px" // Figma: Corners/Standard Corner
|
|
4913
|
-
};
|
|
4914
|
-
var BORDER_THIN = "1px";
|
|
4915
|
-
var FONT_SIZE = {
|
|
4916
|
-
XS: "0.750rem",
|
|
4917
|
-
// 12px
|
|
4918
|
-
SM: "0.875rem",
|
|
4919
|
-
// 14px
|
|
4920
|
-
MD: "1.000rem",
|
|
4921
|
-
// 16px
|
|
4922
|
-
LG: "1.125rem" // 18px
|
|
4923
|
-
};
|
|
4924
|
-
var FONT_WEIGHT_REGULAR = "400";
|
|
4925
|
-
var FONT_WEIGHT_SEMIBOLD = "600";
|
|
4926
|
-
var FONT_WEIGHT_BOLD = "700";
|
|
4927
|
-
var FOOTER_HEIGHT = "100px";
|
|
4928
4911
|
var HEADER_HEIGHT = "104px";
|
|
4929
|
-
var
|
|
4930
|
-
var JUMBO_HEIGHT = "300px";
|
|
4912
|
+
var FOOTER_HEIGHT = "100px";
|
|
4931
4913
|
var SPACER_HEIGHT = "65px";
|
|
4914
|
+
var JUMBO_HEIGHT = "300px";
|
|
4915
|
+
var COMPACT_JUMBO_HEIGHT = "65px";
|
|
4916
|
+
var FONT_WEIGHT_REGULAR = "400";
|
|
4917
|
+
var FONT_WEIGHT_BOLD = "700";
|
|
4918
|
+
var FONT_WEIGHT_SEMIBOLD = "600";
|
|
4932
4919
|
var LINK_TEXT_DECORATION = "underline solid 1px";
|
|
4933
|
-
var SPACING = {
|
|
4934
|
-
XS: "1.0rem",
|
|
4935
|
-
// Figma: Spacing/XS
|
|
4936
|
-
MD: "1.5rem" // Figma: Spacing/Normal
|
|
4937
|
-
};
|
|
4938
4920
|
|
|
4939
4921
|
var style_constants = /*#__PURE__*/Object.freeze({
|
|
4940
4922
|
__proto__: null,
|
|
4941
|
-
BORDER_RADIUS: BORDER_RADIUS,
|
|
4942
|
-
BORDER_THIN: BORDER_THIN,
|
|
4943
|
-
FONT_SIZE: FONT_SIZE,
|
|
4944
|
-
FONT_WEIGHT_REGULAR: FONT_WEIGHT_REGULAR,
|
|
4945
|
-
FONT_WEIGHT_SEMIBOLD: FONT_WEIGHT_SEMIBOLD,
|
|
4946
|
-
FONT_WEIGHT_BOLD: FONT_WEIGHT_BOLD,
|
|
4947
|
-
FOOTER_HEIGHT: FOOTER_HEIGHT,
|
|
4948
4923
|
HEADER_HEIGHT: HEADER_HEIGHT,
|
|
4949
|
-
|
|
4950
|
-
JUMBO_HEIGHT: JUMBO_HEIGHT,
|
|
4924
|
+
FOOTER_HEIGHT: FOOTER_HEIGHT,
|
|
4951
4925
|
SPACER_HEIGHT: SPACER_HEIGHT,
|
|
4952
|
-
|
|
4953
|
-
|
|
4926
|
+
JUMBO_HEIGHT: JUMBO_HEIGHT,
|
|
4927
|
+
COMPACT_JUMBO_HEIGHT: COMPACT_JUMBO_HEIGHT,
|
|
4928
|
+
FONT_WEIGHT_REGULAR: FONT_WEIGHT_REGULAR,
|
|
4929
|
+
FONT_WEIGHT_BOLD: FONT_WEIGHT_BOLD,
|
|
4930
|
+
FONT_WEIGHT_SEMIBOLD: FONT_WEIGHT_SEMIBOLD,
|
|
4931
|
+
LINK_TEXT_DECORATION: LINK_TEXT_DECORATION
|
|
4954
4932
|
});
|
|
4955
4933
|
|
|
4956
4934
|
/*
|
|
@@ -13583,7 +13561,8 @@ var SettingsIconSmall$1 = themeComponent(SettingsIconSmall, "Icons", fallbackVal
|
|
|
13583
13561
|
var WalletIconSmall = function WalletIconSmall(_ref) {
|
|
13584
13562
|
var themeValues = _ref.themeValues,
|
|
13585
13563
|
_ref$iconIndex = _ref.iconIndex,
|
|
13586
|
-
iconIndex = _ref$iconIndex === void 0 ? 0 : _ref$iconIndex
|
|
13564
|
+
iconIndex = _ref$iconIndex === void 0 ? 0 : _ref$iconIndex,
|
|
13565
|
+
colorOverride = _ref.colorOverride;
|
|
13587
13566
|
return /*#__PURE__*/React__default.createElement("svg", {
|
|
13588
13567
|
width: "20",
|
|
13589
13568
|
height: "20",
|
|
@@ -13594,7 +13573,7 @@ var WalletIconSmall = function WalletIconSmall(_ref) {
|
|
|
13594
13573
|
fillRule: "evenodd",
|
|
13595
13574
|
clipRule: "evenodd",
|
|
13596
13575
|
d: "M16.3125 6.94643C16.0446 6.70536 15.7232 6.57143 15.3482 6.57143L5.14283 6.57143C5.0089 6.57143 4.90176 6.54464 4.8214 6.46429C4.74104 6.38393 4.71426 6.27678 4.71426 6.14286C4.71426 6.03571 4.74104 5.92857 4.8214 5.84821C4.90176 5.76786 5.0089 5.71428 5.14283 5.71428L15.4285 5.71428C15.5357 5.71428 15.6428 5.6875 15.7232 5.60714C15.8035 5.52678 15.8571 5.41964 15.8571 5.28571C15.8571 4.9375 15.7232 4.64286 15.4821 4.375C15.2143 4.13393 14.9196 4 14.5714 4L4.71426 4C4.23211 4 3.80354 4.1875 3.48211 4.50893C3.16068 4.83036 2.99997 5.23214 2.99997 5.71428V14.2857C2.99997 14.7679 3.16068 15.1964 3.48211 15.5179C3.80354 15.8393 4.23211 16 4.71426 16L15.3482 16C15.7232 16 16.0446 15.8929 16.3125 15.625C16.5803 15.3839 16.7143 15.0893 16.7143 14.7143V7.85714C16.7143 7.50893 16.5803 7.21428 16.3125 6.94643ZM12.7142 13.143C13.661 13.143 14.4285 12.3755 14.4285 11.4288C14.4285 10.482 13.661 9.71447 12.7142 9.71447C11.7674 9.71447 10.9999 10.482 10.9999 11.4288C10.9999 12.3755 11.7674 13.143 12.7142 13.143Z",
|
|
13597
|
-
fill: themeValues.singleIconColor
|
|
13576
|
+
fill: colorOverride || themeValues.singleIconColor
|
|
13598
13577
|
}), /*#__PURE__*/React__default.createElement("mask", {
|
|
13599
13578
|
id: "mask0_503_574-".concat(iconIndex),
|
|
13600
13579
|
style: {
|
|
@@ -13615,7 +13594,7 @@ var WalletIconSmall = function WalletIconSmall(_ref) {
|
|
|
13615
13594
|
}, /*#__PURE__*/React__default.createElement("rect", {
|
|
13616
13595
|
width: "20",
|
|
13617
13596
|
height: "20",
|
|
13618
|
-
fill: themeValues.singleIconColor
|
|
13597
|
+
fill: colorOverride || themeValues.singleIconColor
|
|
13619
13598
|
})));
|
|
13620
13599
|
};
|
|
13621
13600
|
var WalletIconSmall$1 = themeComponent(WalletIconSmall, "Icons", fallbackValues$2, "primary");
|
|
@@ -39853,14 +39832,6 @@ validatorFns[IS_PROBABLY_EMAIL] = (value, args, form) => {
|
|
|
39853
39832
|
return new RegExp(/^\S+@\S+\.\S+$/).test(value);
|
|
39854
39833
|
};
|
|
39855
39834
|
|
|
39856
|
-
const VALID_NAME = 'validator/VALID_NAME';
|
|
39857
|
-
const VALID_NAME_ERROR = 'validator/VALID_NAME_ERROR';
|
|
39858
|
-
const validName = createValidator(VALID_NAME, VALID_NAME_ERROR);
|
|
39859
|
-
validatorFns[VALID_NAME] = (value, args, form) =>
|
|
39860
|
-
value === ''
|
|
39861
|
-
? false
|
|
39862
|
-
: new RegExp(/[A-zÀ-ÿ\-,'\S]+(\s?[A-zÀ-ÿ\-,'\S])*/).test(value);
|
|
39863
|
-
|
|
39864
39835
|
const runValidatorErrorMessage = (type) =>
|
|
39865
39836
|
`${type} was passed to runValidator, but that validator type does not exist.
|
|
39866
39837
|
Please check that you are only calling validator creator functions exported from
|
|
@@ -46331,27 +46302,14 @@ var Modal$1 = function Modal(_ref) {
|
|
|
46331
46302
|
blurUnderlay = _ref$blurUnderlay === void 0 ? true : _ref$blurUnderlay;
|
|
46332
46303
|
var _useContext = React.useContext(styled.ThemeContext),
|
|
46333
46304
|
isMobile = _useContext.isMobile;
|
|
46334
|
-
|
|
46335
|
-
// `AriaModal` uses `focus-trap` as a transient dependency. It automatically looks
|
|
46336
|
-
// for a tabbable node when the modal mounts. When it doesn't find one, it looks to
|
|
46337
|
-
// the `fallbackFocus` option. However, React does not guarantee the ref supplied to
|
|
46338
|
-
// this option will be populated on initial render when `focus-trap` is checking
|
|
46339
|
-
// these option. When there are no buttons in the modal, this causes an error.
|
|
46340
|
-
// Because `focus-trap` cannot be disabled, the ref itself requires a default value
|
|
46341
|
-
// to satisfy `focus-trap` until React populates it with the real ref value.
|
|
46342
|
-
//
|
|
46343
|
-
// See:
|
|
46344
|
-
// - https://react.dev/reference/react/useRef#caveats
|
|
46345
|
-
// - https://github.com/davidtheclark/react-aria-modal/pull/103
|
|
46346
|
-
// - https://github.com/focus-trap/focus-trap?tab=readme-ov-file#createoptions
|
|
46347
|
-
var modalContainerRef = React.useRef("#react-aria-modal-dialog");
|
|
46305
|
+
var modalContainerRef = React.useRef(null);
|
|
46348
46306
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
46349
46307
|
ref: modalContainerRef,
|
|
46350
|
-
tabIndex: "-1",
|
|
46351
46308
|
"data-qa": dataQa
|
|
46352
|
-
}, modalOpen && /*#__PURE__*/React__default.createElement(reactAriaModal
|
|
46309
|
+
}, modalOpen && /*#__PURE__*/React__default.createElement(reactAriaModal
|
|
46310
|
+
// fallback to resolve Jest unit test errors when tabbable doesn't exist in jsdom https://github.com/focus-trap/focus-trap-react/issues/91
|
|
46311
|
+
, {
|
|
46353
46312
|
focusTrapOptions: {
|
|
46354
|
-
// fallback to resolve Jest unit test errors when tabbable doesn't exist in jsdom https://github.com/focus-trap/focus-trap-react/issues/91
|
|
46355
46313
|
fallbackFocus: modalContainerRef === null || modalContainerRef === void 0 ? void 0 : modalContainerRef.current
|
|
46356
46314
|
},
|
|
46357
46315
|
onExit: onExit,
|
|
@@ -46476,305 +46434,6 @@ var Modal$1 = function Modal(_ref) {
|
|
|
46476
46434
|
}))))))))), children);
|
|
46477
46435
|
};
|
|
46478
46436
|
|
|
46479
|
-
var ButtonLayoutWrapper = function ButtonLayoutWrapper(_ref) {
|
|
46480
|
-
var _ref$children = _ref.children,
|
|
46481
|
-
children = _ref$children === void 0 ? [] : _ref$children,
|
|
46482
|
-
_ref$isMobile = _ref.isMobile,
|
|
46483
|
-
isMobile = _ref$isMobile === void 0 ? false : _ref$isMobile;
|
|
46484
|
-
var safeChildren = Array.isArray(children) ? children : [children];
|
|
46485
|
-
var flexGrow = isMobile ? "flex-grow: 1;" : "";
|
|
46486
|
-
return /*#__PURE__*/React__default.createElement(Box, {
|
|
46487
|
-
padding: SPACING.MD
|
|
46488
|
-
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
46489
|
-
childGap: "1rem",
|
|
46490
|
-
direction: "row",
|
|
46491
|
-
justify: "flex-end"
|
|
46492
|
-
}, safeChildren.map(function (child, index) {
|
|
46493
|
-
return /*#__PURE__*/React__default.createElement(Box, {
|
|
46494
|
-
padding: "0",
|
|
46495
|
-
extraStyles: flexGrow,
|
|
46496
|
-
key: index
|
|
46497
|
-
}, child);
|
|
46498
|
-
})));
|
|
46499
|
-
};
|
|
46500
|
-
|
|
46501
|
-
var CancelButton = function CancelButton(_ref) {
|
|
46502
|
-
var _ref$buttonExtraStyle = _ref.buttonExtraStyles,
|
|
46503
|
-
buttonExtraStyles = _ref$buttonExtraStyle === void 0 ? "" : _ref$buttonExtraStyle,
|
|
46504
|
-
_ref$cancelAction = _ref.cancelAction,
|
|
46505
|
-
cancelAction = _ref$cancelAction === void 0 ? noop : _ref$cancelAction,
|
|
46506
|
-
_ref$cancelButtonText = _ref.cancelButtonText,
|
|
46507
|
-
cancelButtonText = _ref$cancelButtonText === void 0 ? "" : _ref$cancelButtonText,
|
|
46508
|
-
_ref$hideModal = _ref.hideModal,
|
|
46509
|
-
hideModal = _ref$hideModal === void 0 ? noop : _ref$hideModal,
|
|
46510
|
-
_ref$isMobile = _ref.isMobile,
|
|
46511
|
-
isMobile = _ref$isMobile === void 0 ? false : _ref$isMobile;
|
|
46512
|
-
var fontSize = "font-size: ".concat(isMobile ? FONT_SIZE.XS : FONT_SIZE.SM, ";");
|
|
46513
|
-
var width = isMobile ? "width: 100%;" : "";
|
|
46514
|
-
return /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
46515
|
-
action: cancelAction ? cancelAction : hideModal,
|
|
46516
|
-
borderRadius: BORDER_RADIUS.MD,
|
|
46517
|
-
className: "modal-cancel-button",
|
|
46518
|
-
dataQa: cancelButtonText,
|
|
46519
|
-
extraStyles: "".concat(buttonExtraStyles, "; margin: 0; ").concat(width),
|
|
46520
|
-
name: cancelButtonText,
|
|
46521
|
-
role: "button",
|
|
46522
|
-
text: cancelButtonText,
|
|
46523
|
-
textExtraStyles: "".concat(fontSize),
|
|
46524
|
-
variant: "secondary"
|
|
46525
|
-
});
|
|
46526
|
-
};
|
|
46527
|
-
|
|
46528
|
-
var CloseButton = function CloseButton(_ref) {
|
|
46529
|
-
var _ref$buttonExtraStyle = _ref.buttonExtraStyles,
|
|
46530
|
-
buttonExtraStyles = _ref$buttonExtraStyle === void 0 ? "" : _ref$buttonExtraStyle,
|
|
46531
|
-
_ref$closeButtonText = _ref.closeButtonText,
|
|
46532
|
-
closeButtonText = _ref$closeButtonText === void 0 ? "" : _ref$closeButtonText,
|
|
46533
|
-
_ref$hideModal = _ref.hideModal,
|
|
46534
|
-
hideModal = _ref$hideModal === void 0 ? noop : _ref$hideModal,
|
|
46535
|
-
_ref$isMobile = _ref.isMobile,
|
|
46536
|
-
isMobile = _ref$isMobile === void 0 ? false : _ref$isMobile;
|
|
46537
|
-
var fontSize = "font-size: ".concat(isMobile ? FONT_SIZE.XS : FONT_SIZE.SM, ";");
|
|
46538
|
-
var width = isMobile ? "width: 100%;" : "";
|
|
46539
|
-
return /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
46540
|
-
action: hideModal,
|
|
46541
|
-
borderRadius: BORDER_RADIUS.MD,
|
|
46542
|
-
className: "modal-close-button",
|
|
46543
|
-
dataQa: closeButtonText,
|
|
46544
|
-
extraStyles: "".concat(buttonExtraStyles, "; margin: 0; ").concat(width),
|
|
46545
|
-
name: closeButtonText,
|
|
46546
|
-
role: "button",
|
|
46547
|
-
text: closeButtonText,
|
|
46548
|
-
textExtraStyles: "".concat(fontSize),
|
|
46549
|
-
variant: "primary"
|
|
46550
|
-
});
|
|
46551
|
-
};
|
|
46552
|
-
|
|
46553
|
-
var ContinueButton = function ContinueButton(_ref) {
|
|
46554
|
-
var _ref$buttonExtraStyle = _ref.buttonExtraStyles,
|
|
46555
|
-
buttonExtraStyles = _ref$buttonExtraStyle === void 0 ? "" : _ref$buttonExtraStyle,
|
|
46556
|
-
_ref$continueAction = _ref.continueAction,
|
|
46557
|
-
continueAction = _ref$continueAction === void 0 ? noop : _ref$continueAction,
|
|
46558
|
-
_ref$continueButtonTe = _ref.continueButtonText,
|
|
46559
|
-
continueButtonText = _ref$continueButtonTe === void 0 ? "" : _ref$continueButtonTe,
|
|
46560
|
-
_ref$continueURL = _ref.continueURL,
|
|
46561
|
-
continueURL = _ref$continueURL === void 0 ? "" : _ref$continueURL,
|
|
46562
|
-
_ref$isContinueAction = _ref.isContinueActionDisabled,
|
|
46563
|
-
isContinueActionDisabled = _ref$isContinueAction === void 0 ? false : _ref$isContinueAction,
|
|
46564
|
-
_ref$isLoading = _ref.isLoading,
|
|
46565
|
-
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
|
|
46566
|
-
_ref$isMobile = _ref.isMobile,
|
|
46567
|
-
isMobile = _ref$isMobile === void 0 ? false : _ref$isMobile,
|
|
46568
|
-
_ref$useDangerButton = _ref.useDangerButton,
|
|
46569
|
-
useDangerButton = _ref$useDangerButton === void 0 ? false : _ref$useDangerButton;
|
|
46570
|
-
var ContinueButtonAtom = continueURL ? ButtonWithLink : ButtonWithAction;
|
|
46571
|
-
var fontSize = "font-size: ".concat(isMobile ? FONT_SIZE.XS : FONT_SIZE.SM, ";");
|
|
46572
|
-
var width = isMobile ? "width: 100%;" : "";
|
|
46573
|
-
return /*#__PURE__*/React__default.createElement(ContinueButtonAtom, {
|
|
46574
|
-
action: continueAction,
|
|
46575
|
-
borderRadius: BORDER_RADIUS.MD,
|
|
46576
|
-
className: "modal-continue-button",
|
|
46577
|
-
dataQa: continueButtonText,
|
|
46578
|
-
disabled: isContinueActionDisabled,
|
|
46579
|
-
extraStyles: "".concat(buttonExtraStyles, "; margin: 0; ").concat(width),
|
|
46580
|
-
isLoading: isLoading,
|
|
46581
|
-
linkExtraStyles: "display: inline-block; ".concat(width),
|
|
46582
|
-
name: continueButtonText,
|
|
46583
|
-
role: "button",
|
|
46584
|
-
text: continueButtonText,
|
|
46585
|
-
textExtraStyles: "".concat(fontSize),
|
|
46586
|
-
url: continueURL,
|
|
46587
|
-
variant: useDangerButton ? "danger" : "primary"
|
|
46588
|
-
});
|
|
46589
|
-
};
|
|
46590
|
-
|
|
46591
|
-
/*
|
|
46592
|
-
Default Modal molecule
|
|
46593
|
-
Uses react-aria-modal behind the scenes for a11y purposes
|
|
46594
|
-
Styling accomplished with our atoms / layout primitives
|
|
46595
|
-
|
|
46596
|
-
Cancel button will (for now) always use hideModal as its action
|
|
46597
|
-
Continue button takes an action, if you want to navigate to
|
|
46598
|
-
a different route (as with a link) connect() and use "push" from @thecb/connected-react-router
|
|
46599
|
-
*/
|
|
46600
|
-
|
|
46601
|
-
var getApplicationNode$1 = function getApplicationNode() {
|
|
46602
|
-
return document.getElementById("root");
|
|
46603
|
-
};
|
|
46604
|
-
var Modal$2 = function Modal(_ref) {
|
|
46605
|
-
var _ref$blurUnderlay = _ref.blurUnderlay,
|
|
46606
|
-
blurUnderlay = _ref$blurUnderlay === void 0 ? true : _ref$blurUnderlay,
|
|
46607
|
-
_ref$buttonExtraStyle = _ref.buttonExtraStyles,
|
|
46608
|
-
buttonExtraStyles = _ref$buttonExtraStyle === void 0 ? "" : _ref$buttonExtraStyle,
|
|
46609
|
-
_ref$cancelAction = _ref.cancelAction,
|
|
46610
|
-
cancelAction = _ref$cancelAction === void 0 ? noop : _ref$cancelAction,
|
|
46611
|
-
_ref$cancelButtonText = _ref.cancelButtonText,
|
|
46612
|
-
cancelButtonText = _ref$cancelButtonText === void 0 ? "Cancel" : _ref$cancelButtonText,
|
|
46613
|
-
_ref$children = _ref.children,
|
|
46614
|
-
children = _ref$children === void 0 ? [] : _ref$children,
|
|
46615
|
-
_ref$closeButtonText = _ref.closeButtonText,
|
|
46616
|
-
closeButtonText = _ref$closeButtonText === void 0 ? "Close" : _ref$closeButtonText,
|
|
46617
|
-
_ref$continueAction = _ref.continueAction,
|
|
46618
|
-
continueAction = _ref$continueAction === void 0 ? noop : _ref$continueAction,
|
|
46619
|
-
_ref$continueButtonTe = _ref.continueButtonText,
|
|
46620
|
-
continueButtonText = _ref$continueButtonTe === void 0 ? "Continue" : _ref$continueButtonTe,
|
|
46621
|
-
_ref$continueURL = _ref.continueURL,
|
|
46622
|
-
continueURL = _ref$continueURL === void 0 ? "" : _ref$continueURL,
|
|
46623
|
-
_ref$customWidth = _ref.customWidth,
|
|
46624
|
-
customWidth = _ref$customWidth === void 0 ? "" : _ref$customWidth,
|
|
46625
|
-
_ref$dataQa = _ref.dataQa,
|
|
46626
|
-
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
|
|
46627
|
-
_ref$defaultWrapper = _ref.defaultWrapper,
|
|
46628
|
-
defaultWrapper = _ref$defaultWrapper === void 0 ? true : _ref$defaultWrapper,
|
|
46629
|
-
_ref$hideModal = _ref.hideModal,
|
|
46630
|
-
hideModal = _ref$hideModal === void 0 ? noop : _ref$hideModal,
|
|
46631
|
-
_ref$initialFocusSele = _ref.initialFocusSelector,
|
|
46632
|
-
initialFocusSelector = _ref$initialFocusSele === void 0 ? "" : _ref$initialFocusSele,
|
|
46633
|
-
_ref$isContinueAction = _ref.isContinueActionDisabled,
|
|
46634
|
-
isContinueActionDisabled = _ref$isContinueAction === void 0 ? false : _ref$isContinueAction,
|
|
46635
|
-
_ref$isLoading = _ref.isLoading,
|
|
46636
|
-
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
|
|
46637
|
-
_ref$maxHeight = _ref.maxHeight,
|
|
46638
|
-
maxHeight = _ref$maxHeight === void 0 ? "" : _ref$maxHeight,
|
|
46639
|
-
_ref$modalBodyBg = _ref.modalBodyBg,
|
|
46640
|
-
modalBodyBg = _ref$modalBodyBg === void 0 ? "" : _ref$modalBodyBg,
|
|
46641
|
-
_ref$modalBodyText = _ref.modalBodyText,
|
|
46642
|
-
modalBodyText = _ref$modalBodyText === void 0 ? "" : _ref$modalBodyText,
|
|
46643
|
-
_ref$modalHeaderBg = _ref.modalHeaderBg,
|
|
46644
|
-
modalHeaderBg = _ref$modalHeaderBg === void 0 ? "" : _ref$modalHeaderBg,
|
|
46645
|
-
_ref$modalHeaderText = _ref.modalHeaderText,
|
|
46646
|
-
modalHeaderText = _ref$modalHeaderText === void 0 ? "" : _ref$modalHeaderText,
|
|
46647
|
-
_ref$modalOpen = _ref.modalOpen,
|
|
46648
|
-
modalOpen = _ref$modalOpen === void 0 ? false : _ref$modalOpen,
|
|
46649
|
-
_ref$noButtons = _ref.noButtons,
|
|
46650
|
-
noButtons = _ref$noButtons === void 0 ? false : _ref$noButtons,
|
|
46651
|
-
_ref$onExit = _ref.onExit,
|
|
46652
|
-
onExit = _ref$onExit === void 0 ? hideModal : _ref$onExit,
|
|
46653
|
-
_ref$onlyCloseButton = _ref.onlyCloseButton,
|
|
46654
|
-
onlyCloseButton = _ref$onlyCloseButton === void 0 ? false : _ref$onlyCloseButton,
|
|
46655
|
-
_ref$onlyContinueButt = _ref.onlyContinueButton,
|
|
46656
|
-
onlyContinueButton = _ref$onlyContinueButt === void 0 ? false : _ref$onlyContinueButt,
|
|
46657
|
-
_ref$underlayClickExi = _ref.underlayClickExits,
|
|
46658
|
-
underlayClickExits = _ref$underlayClickExi === void 0 ? true : _ref$underlayClickExi,
|
|
46659
|
-
_ref$useDangerButton = _ref.useDangerButton,
|
|
46660
|
-
useDangerButton = _ref$useDangerButton === void 0 ? false : _ref$useDangerButton;
|
|
46661
|
-
var _useContext = React.useContext(styled.ThemeContext),
|
|
46662
|
-
isMobile = _useContext.isMobile;
|
|
46663
|
-
|
|
46664
|
-
// `AriaModal` uses `focus-trap` as a transient dependency. It automatically looks
|
|
46665
|
-
// for a tabbable node when the modal mounts. When it doesn't find one, it looks to
|
|
46666
|
-
// the `fallbackFocus` option. However, React does not guarantee the ref supplied to
|
|
46667
|
-
// this option will be populated on initial render when `focus-trap` is checking
|
|
46668
|
-
// these option. When there are no buttons in the modal, this causes an error.
|
|
46669
|
-
// Because `focus-trap` cannot be disabled, the ref itself requires a default value
|
|
46670
|
-
// to satisfy `focus-trap` until React populates it with the real ref value.
|
|
46671
|
-
//
|
|
46672
|
-
// See:
|
|
46673
|
-
// - https://react.dev/reference/react/useRef#caveats
|
|
46674
|
-
// - https://github.com/davidtheclark/react-aria-modal/pull/103
|
|
46675
|
-
// - https://github.com/focus-trap/focus-trap?tab=readme-ov-file#createoptions
|
|
46676
|
-
var modalContainerRef = React.useRef("#react-aria-modal-dialog");
|
|
46677
|
-
var hasCloseButton = onlyCloseButton && !noButtons;
|
|
46678
|
-
var hasCancelButton = !onlyContinueButton && !onlyCloseButton && !noButtons;
|
|
46679
|
-
var hasContinueButton = onlyContinueButton && !noButtons || !onlyCloseButton && !noButtons;
|
|
46680
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
46681
|
-
ref: modalContainerRef,
|
|
46682
|
-
tabIndex: "-1",
|
|
46683
|
-
"data-qa": dataQa
|
|
46684
|
-
}, modalOpen && /*#__PURE__*/React__default.createElement(reactAriaModal, {
|
|
46685
|
-
focusTrapOptions: {
|
|
46686
|
-
// fallback to resolve Jest unit test errors when tabbable doesn't exist in jsdom https://github.com/focus-trap/focus-trap-react/issues/91
|
|
46687
|
-
fallbackFocus: modalContainerRef === null || modalContainerRef === void 0 ? void 0 : modalContainerRef.current
|
|
46688
|
-
},
|
|
46689
|
-
onExit: onExit,
|
|
46690
|
-
getApplicationNode: getApplicationNode$1,
|
|
46691
|
-
titleText: modalHeaderText,
|
|
46692
|
-
underlayStyle: {
|
|
46693
|
-
display: "flex",
|
|
46694
|
-
flexDirection: "column",
|
|
46695
|
-
justifyContent: "center",
|
|
46696
|
-
alignItems: "center",
|
|
46697
|
-
background: "rgba(41, 42, 51, 0.45)",
|
|
46698
|
-
backdropFilter: blurUnderlay ? "blur(4px)" : "none",
|
|
46699
|
-
WebkitBackdropFilter: blurUnderlay ? "blur(4px)" : "none"
|
|
46700
|
-
},
|
|
46701
|
-
dialogStyle: {
|
|
46702
|
-
borderRadius: BORDER_RADIUS.MD,
|
|
46703
|
-
margin: SPACING.XS,
|
|
46704
|
-
overflow: "auto",
|
|
46705
|
-
width: isMobile ? "" : customWidth || "615px"
|
|
46706
|
-
},
|
|
46707
|
-
underlayClickExits: underlayClickExits,
|
|
46708
|
-
"aria-modal": true,
|
|
46709
|
-
initialFocus: initialFocusSelector,
|
|
46710
|
-
focusDialog: !initialFocusSelector // Focus the dialogue box itself if no selector for initial focus was provided
|
|
46711
|
-
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
46712
|
-
padding: "0",
|
|
46713
|
-
boxShadow: "inset 0px -2px 0px 0px rgb(0, 80, 149)"
|
|
46714
|
-
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
46715
|
-
background: modalHeaderBg || WHITE,
|
|
46716
|
-
borderColor: SILVER_GREY,
|
|
46717
|
-
borderWidthOverride: "0 0 ".concat(BORDER_THIN, " 0"),
|
|
46718
|
-
padding: "".concat(SPACING.XS, " ").concat(SPACING.MD)
|
|
46719
|
-
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
46720
|
-
justify: "flex-start",
|
|
46721
|
-
align: "center"
|
|
46722
|
-
}, /*#__PURE__*/React__default.createElement(Title$1, {
|
|
46723
|
-
as: "h2",
|
|
46724
|
-
weight: FONT_WEIGHT_SEMIBOLD,
|
|
46725
|
-
fontSize: isMobile ? FONT_SIZE.MD : FONT_SIZE.LG
|
|
46726
|
-
}, modalHeaderText))), /*#__PURE__*/React__default.createElement(Box, {
|
|
46727
|
-
background: modalBodyBg || ATHENS_GREY,
|
|
46728
|
-
padding: "0"
|
|
46729
|
-
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
46730
|
-
padding: SPACING.MD,
|
|
46731
|
-
borderWidthOverride: !noButtons && "0 0 ".concat(BORDER_THIN, " 0"),
|
|
46732
|
-
borderColor: !noButtons && SILVER_GREY,
|
|
46733
|
-
extraStyles: maxHeight ? "max-height: ".concat(maxHeight, "; overflow: auto;") : ""
|
|
46734
|
-
}, defaultWrapper ? /*#__PURE__*/React__default.createElement(Paragraph$1, {
|
|
46735
|
-
variant: isMobile ? "pS" : "p"
|
|
46736
|
-
}, modalBodyText) : /*#__PURE__*/React__default.createElement(Box, {
|
|
46737
|
-
padding: maxHeight ? "0 0 ".concat(SPACING.XS, " 0") : "0"
|
|
46738
|
-
}, modalBodyText)), noButtons ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null) : /*#__PURE__*/React__default.createElement(ButtonLayoutWrapper, {
|
|
46739
|
-
isMobile: isMobile
|
|
46740
|
-
}, [hasCancelButton && /*#__PURE__*/React__default.createElement(CancelButton, {
|
|
46741
|
-
buttonExtraStyles: buttonExtraStyles,
|
|
46742
|
-
cancelAction: cancelAction,
|
|
46743
|
-
cancelButtonText: cancelButtonText,
|
|
46744
|
-
hideModal: hideModal,
|
|
46745
|
-
isMobile: isMobile,
|
|
46746
|
-
key: "cancel"
|
|
46747
|
-
}), hasContinueButton && /*#__PURE__*/React__default.createElement(ContinueButton, {
|
|
46748
|
-
buttonExtraStyles: buttonExtraStyles,
|
|
46749
|
-
continueAction: continueAction,
|
|
46750
|
-
continueButtonText: continueButtonText,
|
|
46751
|
-
continueURL: continueURL,
|
|
46752
|
-
isContinueActionDisabled: isContinueActionDisabled,
|
|
46753
|
-
isLoading: isLoading,
|
|
46754
|
-
isMobile: isMobile,
|
|
46755
|
-
key: "continue",
|
|
46756
|
-
useDangerButton: useDangerButton
|
|
46757
|
-
}), hasCloseButton && /*#__PURE__*/React__default.createElement(CloseButton, {
|
|
46758
|
-
buttonExtraStyles: buttonExtraStyles,
|
|
46759
|
-
closeButtonText: closeButtonText,
|
|
46760
|
-
hideModal: hideModal,
|
|
46761
|
-
isMobile: isMobile,
|
|
46762
|
-
key: "close"
|
|
46763
|
-
})].filter(function (button) {
|
|
46764
|
-
return button;
|
|
46765
|
-
}))))), children);
|
|
46766
|
-
};
|
|
46767
|
-
var ModalControlV2 = withWindowSize(Modal$2);
|
|
46768
|
-
|
|
46769
|
-
var _excluded$A = ["version"];
|
|
46770
|
-
var Modal$3 = function Modal(_ref) {
|
|
46771
|
-
var _ref$version = _ref.version,
|
|
46772
|
-
version = _ref$version === void 0 ? "v1" : _ref$version,
|
|
46773
|
-
rest = _objectWithoutProperties(_ref, _excluded$A);
|
|
46774
|
-
var ModalControl = version === "v1" ? Modal$1 : ModalControlV2;
|
|
46775
|
-
return /*#__PURE__*/React__default.createElement(ModalControl, rest);
|
|
46776
|
-
};
|
|
46777
|
-
|
|
46778
46437
|
var fontSize$9 = {
|
|
46779
46438
|
"default": "1.375rem",
|
|
46780
46439
|
largeTitle: "1.75rem",
|
|
@@ -47182,7 +46841,7 @@ var AutopayModal = function AutopayModal(_ref) {
|
|
|
47182
46841
|
}
|
|
47183
46842
|
}
|
|
47184
46843
|
};
|
|
47185
|
-
return /*#__PURE__*/React__default.createElement(Modal$
|
|
46844
|
+
return /*#__PURE__*/React__default.createElement(Modal$1, _extends({
|
|
47186
46845
|
showModal: function showModal() {
|
|
47187
46846
|
return toggleModal(true);
|
|
47188
46847
|
},
|
|
@@ -47421,7 +47080,7 @@ var RemoveAccountModalModule = function RemoveAccountModalModule(_ref) {
|
|
|
47421
47080
|
return formattedAccount === agencyName ? agencyName : acc + formattedAccount;
|
|
47422
47081
|
}, "".concat(agencyName, " - ")) : "";
|
|
47423
47082
|
var identifier = accountType === "Account" && obligations.length > 1 ? "accounts" : accountType === "Property" && obligations.length > 1 ? "properties" : accountType.toLowerCase();
|
|
47424
|
-
return /*#__PURE__*/React__default.createElement(Modal$
|
|
47083
|
+
return /*#__PURE__*/React__default.createElement(Modal$1, {
|
|
47425
47084
|
showModal: function showModal() {
|
|
47426
47085
|
return setModalIsOpen(true);
|
|
47427
47086
|
},
|
|
@@ -48180,7 +47839,7 @@ var fallbackValues$N = {
|
|
|
48180
47839
|
labeledAmountTotal: labeledAmountTotal
|
|
48181
47840
|
};
|
|
48182
47841
|
|
|
48183
|
-
var _excluded$
|
|
47842
|
+
var _excluded$A = ["amount"],
|
|
48184
47843
|
_excluded2$1 = ["amount"];
|
|
48185
47844
|
var PaymentDetailsContent = function PaymentDetailsContent(_ref) {
|
|
48186
47845
|
var lineItemElems = _ref.lineItemElems,
|
|
@@ -48425,7 +48084,7 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
48425
48084
|
return fee.amount > 0;
|
|
48426
48085
|
}).map(function (_ref5) {
|
|
48427
48086
|
var amount = _ref5.amount,
|
|
48428
|
-
rest = _objectWithoutProperties(_ref5, _excluded$
|
|
48087
|
+
rest = _objectWithoutProperties(_ref5, _excluded$A);
|
|
48429
48088
|
return _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
48430
48089
|
amount: displayCurrency(amount)
|
|
48431
48090
|
});
|
|
@@ -48585,7 +48244,7 @@ var AccountAndRoutingModal = function AccountAndRoutingModal(_ref) {
|
|
|
48585
48244
|
themeValues = _ref.themeValues,
|
|
48586
48245
|
_ref$dataQa = _ref.dataQa,
|
|
48587
48246
|
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa;
|
|
48588
|
-
return /*#__PURE__*/React__default.createElement(Modal$
|
|
48247
|
+
return /*#__PURE__*/React__default.createElement(Modal$1, {
|
|
48589
48248
|
modalOpen: isOpen,
|
|
48590
48249
|
hideModal: function hideModal() {
|
|
48591
48250
|
return toggleOpen(false);
|
|
@@ -48689,7 +48348,7 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
|
|
|
48689
48348
|
themeValues = _ref.themeValues,
|
|
48690
48349
|
_ref$initialFocusSele = _ref.initialFocusSelector,
|
|
48691
48350
|
initialFocusSelector = _ref$initialFocusSele === void 0 ? "" : _ref$initialFocusSele;
|
|
48692
|
-
return /*#__PURE__*/React__default.createElement(Modal$
|
|
48351
|
+
return /*#__PURE__*/React__default.createElement(Modal$1, {
|
|
48693
48352
|
modalOpen: isOpen,
|
|
48694
48353
|
hideModal: function hideModal() {
|
|
48695
48354
|
return toggleOpen(false);
|
|
@@ -48862,11 +48521,11 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
|
|
|
48862
48521
|
}, errorMessage))))));
|
|
48863
48522
|
};
|
|
48864
48523
|
|
|
48865
|
-
var _excluded$
|
|
48524
|
+
var _excluded$B = ["version"];
|
|
48866
48525
|
var TermsAndConditions = function TermsAndConditions(_ref) {
|
|
48867
48526
|
var _ref$version = _ref.version,
|
|
48868
48527
|
version = _ref$version === void 0 ? "v1" : _ref$version,
|
|
48869
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
48528
|
+
rest = _objectWithoutProperties(_ref, _excluded$B);
|
|
48870
48529
|
var TermsAndConditionsControl = version === "v1" ? TermsAndConditionsControlV1 : TermsAndConditionsControlV2;
|
|
48871
48530
|
return /*#__PURE__*/React__default.createElement(TermsAndConditionsControl, rest);
|
|
48872
48531
|
};
|
|
@@ -49665,7 +49324,7 @@ var InnerRadioSection = function InnerRadioSection(_ref) {
|
|
|
49665
49324
|
}, section.content))));
|
|
49666
49325
|
};
|
|
49667
49326
|
|
|
49668
|
-
var _excluded$
|
|
49327
|
+
var _excluded$C = ["themeValues", "isMobile", "supportsTouch", "sections", "openSection", "toggleOpenSection", "staggeredAnimation", "initiallyOpen", "openHeight", "containerStyles", "ariaDescribedBy", "isSectionRequired", "groupedSections"];
|
|
49669
49328
|
|
|
49670
49329
|
/**
|
|
49671
49330
|
- The RadioSection component takes either a flat array (via the 'sections'
|
|
@@ -49713,7 +49372,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
49713
49372
|
_ref$isSectionRequire = _ref.isSectionRequired,
|
|
49714
49373
|
isSectionRequired = _ref$isSectionRequire === void 0 ? false : _ref$isSectionRequire,
|
|
49715
49374
|
groupedSections = _ref.groupedSections,
|
|
49716
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
49375
|
+
rest = _objectWithoutProperties(_ref, _excluded$C);
|
|
49717
49376
|
var _useState = React.useState(null),
|
|
49718
49377
|
_useState2 = _slicedToArray(_useState, 2),
|
|
49719
49378
|
focused = _useState2[0],
|
|
@@ -49817,8 +49476,8 @@ var RegistrationForm = function RegistrationForm(_ref) {
|
|
|
49817
49476
|
};
|
|
49818
49477
|
}, []);
|
|
49819
49478
|
}
|
|
49820
|
-
var firstNameErrorMessages = _defineProperty(
|
|
49821
|
-
var lastNameErrorMessages = _defineProperty(
|
|
49479
|
+
var firstNameErrorMessages = _defineProperty({}, required.error, "First name is required");
|
|
49480
|
+
var lastNameErrorMessages = _defineProperty({}, required.error, "Last name is required");
|
|
49822
49481
|
var emailErrorMessages = _defineProperty(_defineProperty({}, required.error, "Email is required"), isProbablyEmail.error, "Invalid email address");
|
|
49823
49482
|
var passwordErrorMessages = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, required.error, "Password is required"), hasLength.error, "Password must have at least 8 characters"), hasNumber.error, "Password must contain at least one number"), hasLowercaseLetter.error, "Password must contain at least one lowercase letter"), hasUppercaseLetter.error, "Password must contain at least one uppercase letter"), hasSpecialCharacter.error, "Password must contain at least one special character (!@#$%^&*.?)");
|
|
49824
49483
|
var confirmPasswordErrorMessages = _defineProperty({}, matchesField.error, "Confirm password must match password");
|
|
@@ -49894,10 +49553,10 @@ var RegistrationForm = function RegistrationForm(_ref) {
|
|
|
49894
49553
|
|
|
49895
49554
|
var formConfig$9 = {
|
|
49896
49555
|
firstName: {
|
|
49897
|
-
validators: [required()
|
|
49556
|
+
validators: [required()]
|
|
49898
49557
|
},
|
|
49899
49558
|
lastName: {
|
|
49900
|
-
validators: [required()
|
|
49559
|
+
validators: [required()]
|
|
49901
49560
|
},
|
|
49902
49561
|
email: {
|
|
49903
49562
|
validators: [required(), isProbablyEmail()]
|
|
@@ -50429,7 +50088,7 @@ var PopupMenuItemContainer = styled__default(ButtonWithAction).withConfig({
|
|
|
50429
50088
|
return "\n background-color: ".concat(isDeleteAction ? theme.menuItemHoverBackgroundColorDelete : theme.menuItemHoverBackgroundColor, ";\n ");
|
|
50430
50089
|
});
|
|
50431
50090
|
|
|
50432
|
-
var _excluded$
|
|
50091
|
+
var _excluded$D = ["id", "closeMenuCallback", "action", "themeValues", "text", "hasIcon", "isDeleteAction", "icon", "textExtraStyles", "hoverStyles", "activeStyles", "extraStyles"];
|
|
50433
50092
|
var PopupMenuItem = function PopupMenuItem(_ref) {
|
|
50434
50093
|
var id = _ref.id,
|
|
50435
50094
|
closeMenuCallback = _ref.closeMenuCallback,
|
|
@@ -50445,7 +50104,7 @@ var PopupMenuItem = function PopupMenuItem(_ref) {
|
|
|
50445
50104
|
hoverStyles = _ref.hoverStyles,
|
|
50446
50105
|
activeStyles = _ref.activeStyles,
|
|
50447
50106
|
extraStyles = _ref.extraStyles,
|
|
50448
|
-
rest = _objectWithoutProperties(_ref, _excluded$
|
|
50107
|
+
rest = _objectWithoutProperties(_ref, _excluded$D);
|
|
50449
50108
|
return /*#__PURE__*/React__default.createElement(PopupMenuItemContainer, _extends({
|
|
50450
50109
|
id: id,
|
|
50451
50110
|
role: "menuItem",
|
|
@@ -51017,7 +50676,7 @@ exports.LinkCard = LinkCard$1;
|
|
|
51017
50676
|
exports.Loading = Loading;
|
|
51018
50677
|
exports.LoadingLine = LoadingLine;
|
|
51019
50678
|
exports.LoginForm = LoginForm;
|
|
51020
|
-
exports.Modal = Modal$
|
|
50679
|
+
exports.Modal = Modal$1;
|
|
51021
50680
|
exports.Module = Module$1;
|
|
51022
50681
|
exports.Motion = Motion;
|
|
51023
50682
|
exports.MultiCartIcon = MultiCartIcon;
|