@thecb/components 6.1.0-beta.0 → 6.1.0-beta.2
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 +80 -25
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +80 -25
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/checkbox/Checkbox.theme.js +4 -3
- package/src/components/atoms/dropdown/Dropdown.js +12 -6
- package/src/components/atoms/form-layouts/FormInput.js +22 -4
- package/src/components/atoms/form-layouts/FormLayouts.theme.js +3 -3
- package/src/components/atoms/form-select/FormSelect.js +8 -2
- package/src/components/molecules/account-and-routing-modal/AccountAndRoutingModal.theme.js +1 -1
- package/src/components/molecules/modal/Modal.js +73 -57
- package/src/components/molecules/modal/Modal.stories.js +52 -3
- package/src/components/molecules/obligation/modules/AutopayModalModule.theme.js +1 -1
- package/src/components/molecules/periscope-dashboard-iframe/PeriscopeDashboardIframe.js +5 -2
- package/src/components/molecules/terms-and-conditions-modal/TermsAndConditionsModal.js +3 -1
- package/src/components/molecules/terms-and-conditions-modal/TermsAndConditionsModal.theme.js +1 -1
- package/src/constants/colors.js +3 -1
- package/src/util/focusFirstInvalidInputHook.js +17 -0
- package/src/util/general.js +34 -0
- package/src/util/index.js +2 -1
package/dist/index.esm.js
CHANGED
|
@@ -4863,7 +4863,8 @@ var BOSTON_BLUE = "#357fb8";
|
|
|
4863
4863
|
var INFO_BLUE = "#E4F4FD";
|
|
4864
4864
|
var HOVER_LIGHT_BLUE = "#EFFAFF";
|
|
4865
4865
|
var MATISSE_BLUE = "#15749D";
|
|
4866
|
-
var ROYAL_BLUE = "#3181E3";
|
|
4866
|
+
var ROYAL_BLUE = "#3181E3";
|
|
4867
|
+
var ASTRAL_BLUE = "#3176AA"; // GREEN
|
|
4867
4868
|
|
|
4868
4869
|
var FOREST_GREEN = "#19b03F";
|
|
4869
4870
|
var MEADOW_GREEN = "#16C98D";
|
|
@@ -4885,7 +4886,7 @@ var APRICOT_ORANGE = "#FFE8D8"; // RED
|
|
|
4885
4886
|
var RED = "#FF0000";
|
|
4886
4887
|
var CRIMSON_RED = "#ED1C24";
|
|
4887
4888
|
var THUNDERBIRD_RED = "#C3191F";
|
|
4888
|
-
var RAZZMATAZZ_RED = "#
|
|
4889
|
+
var RAZZMATAZZ_RED = "#D11053";
|
|
4889
4890
|
var FANTASY_RED = "#FCF4F4";
|
|
4890
4891
|
var COSMOS_RED = "#FFD0D3";
|
|
4891
4892
|
var BLUSH_RED = "#FFF0F5"; // Second level color constants
|
|
@@ -4969,6 +4970,7 @@ var colors = /*#__PURE__*/Object.freeze({
|
|
|
4969
4970
|
HOVER_LIGHT_BLUE: HOVER_LIGHT_BLUE,
|
|
4970
4971
|
MATISSE_BLUE: MATISSE_BLUE,
|
|
4971
4972
|
ROYAL_BLUE: ROYAL_BLUE,
|
|
4973
|
+
ASTRAL_BLUE: ASTRAL_BLUE,
|
|
4972
4974
|
FOREST_GREEN: FOREST_GREEN,
|
|
4973
4975
|
MEADOW_GREEN: MEADOW_GREEN,
|
|
4974
4976
|
POLAR_GREEN: POLAR_GREEN,
|
|
@@ -6064,6 +6066,18 @@ var createUniqueId = function createUniqueId() {
|
|
|
6064
6066
|
return "_" + Math.random().toString(36).substr(2, 9);
|
|
6065
6067
|
};
|
|
6066
6068
|
|
|
6069
|
+
var createIdFromString = function createIdFromString(text, postscript) {
|
|
6070
|
+
var unique = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
6071
|
+
|
|
6072
|
+
if (text === undefined) {
|
|
6073
|
+
return createUniqueId();
|
|
6074
|
+
} else {
|
|
6075
|
+
// "first name", undefined, false -> "first-name"
|
|
6076
|
+
// "email address", "error message", false -> "email-address-error-message"
|
|
6077
|
+
// "shopping cart", "order item", true -> "shopping-cart-order-item_2ahtlz608"
|
|
6078
|
+
return "".concat(text === null || text === void 0 ? void 0 : text.replace(/\s+/g, "-")).concat(postscript ? "-".concat(postscript === null || postscript === void 0 ? void 0 : postscript.replace(/\s+/g, "-")) : "").concat(unique ? createUniqueId() : "");
|
|
6079
|
+
}
|
|
6080
|
+
};
|
|
6067
6081
|
var safeChildren = function safeChildren(children) {
|
|
6068
6082
|
var replacement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
6069
6083
|
var unsafeValues = [false, undefined, NaN, null];
|
|
@@ -6137,6 +6151,8 @@ var checkDeniedCards = function checkDeniedCards(name) {
|
|
|
6137
6151
|
*/
|
|
6138
6152
|
|
|
6139
6153
|
var screenReaderOnlyStyle = "\n position: absolute;\n left: -10000px;\n top: auto;\n width: 1px;\n height: 1px;\n overflow: hidden;\n";
|
|
6154
|
+
var inputPlaceholderTextStyle = "\n ::-webkit-input-placeholder {\n color: ".concat(CHARADE_GREY, ";\n }\n ::-moz-placeholder {\n color: ").concat(CHARADE_GREY, ";\n }\n ::-ms-placeholder {\n color: ").concat(CHARADE_GREY, ";\n }\n ::placeholder {\n color: ").concat(CHARADE_GREY, ";\n }\n");
|
|
6155
|
+
var inputDisabledStyle = "\n color: #6e727e;\n background-color: #f7f7f7;\n pointer-events: none;\n";
|
|
6140
6156
|
|
|
6141
6157
|
var general = /*#__PURE__*/Object.freeze({
|
|
6142
6158
|
__proto__: null,
|
|
@@ -6144,12 +6160,15 @@ var general = /*#__PURE__*/Object.freeze({
|
|
|
6144
6160
|
displayCurrency: displayCurrency,
|
|
6145
6161
|
convertCentsToMoneyInt: convertCentsToMoneyInt,
|
|
6146
6162
|
formatPercent: formatPercent,
|
|
6163
|
+
createIdFromString: createIdFromString,
|
|
6147
6164
|
safeChildren: safeChildren,
|
|
6148
6165
|
generateClickHandler: generateClickHandler,
|
|
6149
6166
|
checkCardBrand: checkCardBrand,
|
|
6150
6167
|
displayCardBrand: displayCardBrand,
|
|
6151
6168
|
checkDeniedCards: checkDeniedCards,
|
|
6152
|
-
screenReaderOnlyStyle: screenReaderOnlyStyle
|
|
6169
|
+
screenReaderOnlyStyle: screenReaderOnlyStyle,
|
|
6170
|
+
inputPlaceholderTextStyle: inputPlaceholderTextStyle,
|
|
6171
|
+
inputDisabledStyle: inputDisabledStyle
|
|
6153
6172
|
});
|
|
6154
6173
|
|
|
6155
6174
|
var _excluded$1 = ["themeValues", "weight", "color", "textWrap", "extraStyles", "hoverStyles", "onClick", "onKeyPress", "as", "dataQa", "children"];
|
|
@@ -19024,13 +19043,13 @@ var disabledCheckedStyles = {
|
|
|
19024
19043
|
"default": "\n background: #6d717e;\n border: 1px solid #6d717e;\n"
|
|
19025
19044
|
};
|
|
19026
19045
|
var disabledStyles = {
|
|
19027
|
-
"default": "\n background: ".concat(SEASHELL_WHITE, ";\n border: 1px solid ").concat(
|
|
19046
|
+
"default": "\n background: ".concat(SEASHELL_WHITE, ";\n border: 1px solid ").concat(STORM_GREY, ";\n")
|
|
19028
19047
|
};
|
|
19029
19048
|
var checkedStyles = {
|
|
19030
19049
|
"default": "\n background: ".concat(MATISSE_BLUE, "; \n border: 1px solid ").concat(MATISSE_BLUE, ";\n")
|
|
19031
19050
|
};
|
|
19032
19051
|
var defaultStyles = {
|
|
19033
|
-
"default": "\n background: ".concat(WHITE, "; \n border: 1px solid ").concat(
|
|
19052
|
+
"default": "\n background: ".concat(WHITE, "; \n border: 1px solid ").concat(STORM_GREY, ";\n")
|
|
19034
19053
|
};
|
|
19035
19054
|
var fallbackValues$c = {
|
|
19036
19055
|
backgroundColor: backgroundColor$2,
|
|
@@ -20706,6 +20725,7 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
20706
20725
|
_ref8$autoEraseTypeAh = _ref8.autoEraseTypeAhead,
|
|
20707
20726
|
autoEraseTypeAhead = _ref8$autoEraseTypeAh === void 0 ? true : _ref8$autoEraseTypeAh,
|
|
20708
20727
|
ariaLabelledby = _ref8.ariaLabelledby,
|
|
20728
|
+
ariaDescribedby = _ref8.ariaDescribedby,
|
|
20709
20729
|
_ref8$autocompleteVal = _ref8.autocompleteValue,
|
|
20710
20730
|
autocompleteValue = _ref8$autocompleteVal === void 0 ? "" : _ref8$autocompleteVal,
|
|
20711
20731
|
_ref8$smoothScroll = _ref8.smoothScroll,
|
|
@@ -20955,13 +20975,14 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
20955
20975
|
"aria-owns": "".concat(ariaLabelledby, "_listbox"),
|
|
20956
20976
|
"aria-haspopup": "listbox",
|
|
20957
20977
|
"aria-labelledby": ariaLabelledby,
|
|
20978
|
+
"aria-describedby": ariaDescribedby,
|
|
20958
20979
|
"aria-expanded": isOpen,
|
|
20959
20980
|
autocomplete: autocompleteValue,
|
|
20960
20981
|
background: isOpen ? themeValues.hoverColor : WHITE,
|
|
20961
20982
|
borderRadius: "2px",
|
|
20962
20983
|
borderSize: "1px",
|
|
20963
20984
|
borderColor: isError ? ERROR_COLOR : isOpen ? themeValues.selectedColor : GREY_CHATEAU,
|
|
20964
|
-
extraStyles: disabled
|
|
20985
|
+
extraStyles: disabled ? "".concat(inputPlaceholderTextStyle).concat(inputDisabledStyle) : inputPlaceholderTextStyle,
|
|
20965
20986
|
hoverStyles: "background-color: ".concat(themeValues.hoverColor, ";"),
|
|
20966
20987
|
isOpen: isOpen,
|
|
20967
20988
|
minHeight: "48px",
|
|
@@ -21171,9 +21192,10 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
21171
21192
|
color: themeValues.labelColor,
|
|
21172
21193
|
weight: themeValues.fontWeight,
|
|
21173
21194
|
extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
|
|
21174
|
-
id: labelTextWhenNoError
|
|
21195
|
+
id: createIdFromString(labelTextWhenNoError)
|
|
21175
21196
|
}, labelTextWhenNoError))), /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
21176
|
-
ariaLabelledby: labelTextWhenNoError
|
|
21197
|
+
ariaLabelledby: createIdFromString(labelTextWhenNoError),
|
|
21198
|
+
ariaDescribedby: createIdFromString(labelTextWhenNoError, "error message"),
|
|
21177
21199
|
maxHeight: dropdownMaxHeight,
|
|
21178
21200
|
hasTitles: hasTitles,
|
|
21179
21201
|
placeholder: options[0] ? options[0].text : "",
|
|
@@ -21200,7 +21222,8 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
21200
21222
|
color: ERROR_COLOR,
|
|
21201
21223
|
variant: "pXS",
|
|
21202
21224
|
weight: themeValues.fontWeight,
|
|
21203
|
-
extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }"
|
|
21225
|
+
extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
|
|
21226
|
+
id: createIdFromString(labelTextWhenNoError, "error message")
|
|
21204
21227
|
}, errorMessages[field.errors[0]]) : /*#__PURE__*/React.createElement(Text$1, {
|
|
21205
21228
|
extraStyles: "height: ".concat(themeValues.lineHeight, ";")
|
|
21206
21229
|
})));
|
|
@@ -22475,8 +22498,8 @@ var labelColor$1 = {
|
|
|
22475
22498
|
disabled: "".concat(CHARADE_GREY)
|
|
22476
22499
|
};
|
|
22477
22500
|
var borderColor$1 = {
|
|
22478
|
-
"default": "".concat(
|
|
22479
|
-
disabled: "".concat(
|
|
22501
|
+
"default": "".concat(STORM_GREY),
|
|
22502
|
+
disabled: "".concat(STORM_GREY)
|
|
22480
22503
|
};
|
|
22481
22504
|
var lineHeight$2 = {
|
|
22482
22505
|
"default": "1rem",
|
|
@@ -22623,7 +22646,7 @@ var FormInput = function FormInput(_ref15) {
|
|
|
22623
22646
|
variant: "pS",
|
|
22624
22647
|
weight: themeValues.fontWeight,
|
|
22625
22648
|
extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
|
|
22626
|
-
id: labelTextWhenNoError
|
|
22649
|
+
id: createIdFromString(labelTextWhenNoError)
|
|
22627
22650
|
}, labelTextWhenNoError), /*#__PURE__*/React.createElement(Text$1, {
|
|
22628
22651
|
color: themeValues.linkColor,
|
|
22629
22652
|
variant: "pS",
|
|
@@ -22640,7 +22663,7 @@ var FormInput = function FormInput(_ref15) {
|
|
|
22640
22663
|
variant: "pS",
|
|
22641
22664
|
fontWeight: themeValues.fontWeight,
|
|
22642
22665
|
extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
|
|
22643
|
-
id: labelTextWhenNoError
|
|
22666
|
+
id: createIdFromString(labelTextWhenNoError)
|
|
22644
22667
|
}, labelTextWhenNoError), type === "password" && /*#__PURE__*/React.createElement(Text$1, {
|
|
22645
22668
|
variant: "pS",
|
|
22646
22669
|
color: themeValues.linkColor,
|
|
@@ -22660,7 +22683,9 @@ var FormInput = function FormInput(_ref15) {
|
|
|
22660
22683
|
}, decorator)))), /*#__PURE__*/React.createElement(Box, {
|
|
22661
22684
|
padding: "0"
|
|
22662
22685
|
}, formatter ? /*#__PURE__*/React.createElement(FormattedInputField, _extends({
|
|
22663
|
-
"aria-labelledby": labelTextWhenNoError
|
|
22686
|
+
"aria-labelledby": createIdFromString(labelTextWhenNoError),
|
|
22687
|
+
"aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
|
|
22688
|
+
"aria-invalid": field.dirty && field.hasErrors || field.hasErrors && showErrors,
|
|
22664
22689
|
onChange: function onChange(e) {
|
|
22665
22690
|
return fieldActions.set(e);
|
|
22666
22691
|
},
|
|
@@ -22676,7 +22701,9 @@ var FormInput = function FormInput(_ref15) {
|
|
|
22676
22701
|
$customHeight: customHeight,
|
|
22677
22702
|
$extraStyles: extraStyles
|
|
22678
22703
|
}, props)) : /*#__PURE__*/React.createElement(InputField, _extends({
|
|
22679
|
-
"aria-labelledby": labelTextWhenNoError
|
|
22704
|
+
"aria-labelledby": createIdFromString(labelTextWhenNoError),
|
|
22705
|
+
"aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
|
|
22706
|
+
"aria-invalid": field.dirty && field.hasErrors || field.hasErrors && showErrors,
|
|
22680
22707
|
onChange: function onChange(e) {
|
|
22681
22708
|
return fieldActions.set(e.target.value);
|
|
22682
22709
|
},
|
|
@@ -22698,7 +22725,8 @@ var FormInput = function FormInput(_ref15) {
|
|
|
22698
22725
|
color: ERROR_COLOR,
|
|
22699
22726
|
variant: "pXS",
|
|
22700
22727
|
weight: themeValues.fontWeight,
|
|
22701
|
-
extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }"
|
|
22728
|
+
extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
|
|
22729
|
+
id: createIdFromString(labelTextWhenNoError, "error message")
|
|
22702
22730
|
}, errorMessages[field.errors[0]]) : /*#__PURE__*/React.createElement(Text$1, {
|
|
22703
22731
|
extraStyles: "height: ".concat(themeValues.lineHeight, ";")
|
|
22704
22732
|
}), !isMobile && decorator && /*#__PURE__*/React.createElement(Box, {
|
|
@@ -40234,6 +40262,8 @@ var getApplicationNode = function getApplicationNode() {
|
|
|
40234
40262
|
var Modal$1 = function Modal(_ref) {
|
|
40235
40263
|
var hideModal = _ref.hideModal,
|
|
40236
40264
|
continueAction = _ref.continueAction,
|
|
40265
|
+
_ref$isContinueAction = _ref.isContinueActionDisabled,
|
|
40266
|
+
isContinueActionDisabled = _ref$isContinueAction === void 0 ? false : _ref$isContinueAction,
|
|
40237
40267
|
cancelAction = _ref.cancelAction,
|
|
40238
40268
|
modalOpen = _ref.modalOpen,
|
|
40239
40269
|
modalHeaderText = _ref.modalHeaderText,
|
|
@@ -40252,6 +40282,8 @@ var Modal$1 = function Modal(_ref) {
|
|
|
40252
40282
|
defaultWrapper = _ref$defaultWrapper === void 0 ? true : _ref$defaultWrapper,
|
|
40253
40283
|
_ref$onlyCloseButton = _ref.onlyCloseButton,
|
|
40254
40284
|
onlyCloseButton = _ref$onlyCloseButton === void 0 ? false : _ref$onlyCloseButton,
|
|
40285
|
+
_ref$noButtons = _ref.noButtons,
|
|
40286
|
+
noButtons = _ref$noButtons === void 0 ? false : _ref$noButtons,
|
|
40255
40287
|
maxHeight = _ref.maxHeight,
|
|
40256
40288
|
_ref$underlayClickExi = _ref.underlayClickExits,
|
|
40257
40289
|
underlayClickExits = _ref$underlayClickExi === void 0 ? true : _ref$underlayClickExi,
|
|
@@ -40312,7 +40344,7 @@ var Modal$1 = function Modal(_ref) {
|
|
|
40312
40344
|
justify: "flex-end",
|
|
40313
40345
|
align: "center",
|
|
40314
40346
|
childGap: "0rem"
|
|
40315
|
-
}, !onlyCloseButton ? /*#__PURE__*/React.createElement(Fragment, null, isMobile ? /*#__PURE__*/React.createElement(Stack, {
|
|
40347
|
+
}, !noButtons && /*#__PURE__*/React.createElement(React.Fragment, null, !onlyCloseButton ? /*#__PURE__*/React.createElement(Fragment, null, isMobile ? /*#__PURE__*/React.createElement(Stack, {
|
|
40316
40348
|
childGap: "1rem",
|
|
40317
40349
|
direction: "row"
|
|
40318
40350
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
@@ -40334,6 +40366,7 @@ var Modal$1 = function Modal(_ref) {
|
|
|
40334
40366
|
text: continueButtonText,
|
|
40335
40367
|
dataQa: continueButtonText,
|
|
40336
40368
|
isLoading: isLoading,
|
|
40369
|
+
disabled: isContinueActionDisabled,
|
|
40337
40370
|
extraStyles: buttonExtraStyles,
|
|
40338
40371
|
className: "modal-continue-button"
|
|
40339
40372
|
}))) : /*#__PURE__*/React.createElement(Stack, {
|
|
@@ -40353,6 +40386,7 @@ var Modal$1 = function Modal(_ref) {
|
|
|
40353
40386
|
text: continueButtonText,
|
|
40354
40387
|
dataQa: continueButtonText,
|
|
40355
40388
|
isLoading: isLoading,
|
|
40389
|
+
disabled: isContinueActionDisabled,
|
|
40356
40390
|
extraStyles: buttonExtraStyles,
|
|
40357
40391
|
className: "modal-continue-button"
|
|
40358
40392
|
}))) : /*#__PURE__*/React.createElement(Box, {
|
|
@@ -40364,7 +40398,7 @@ var Modal$1 = function Modal(_ref) {
|
|
|
40364
40398
|
dataQa: "Close",
|
|
40365
40399
|
extraStyles: buttonExtraStyles,
|
|
40366
40400
|
className: "modal-cancel-button"
|
|
40367
|
-
})))))))), children);
|
|
40401
|
+
}))))))))), children);
|
|
40368
40402
|
};
|
|
40369
40403
|
|
|
40370
40404
|
var fontSize$9 = {
|
|
@@ -40637,7 +40671,7 @@ var TitleModule = function TitleModule(_ref) {
|
|
|
40637
40671
|
var color$a = "#15749D";
|
|
40638
40672
|
var hoverColor$4 = "#116285";
|
|
40639
40673
|
var activeColor$5 = "#0E506D";
|
|
40640
|
-
var linkColor$3 = "#
|
|
40674
|
+
var linkColor$3 = "#3176AA";
|
|
40641
40675
|
var fontWeight$6 = FONT_WEIGHT_REGULAR;
|
|
40642
40676
|
var modalLinkHoverFocus = "outline: none;\n cursor: pointer;\n text-decoration: underline;\n text-decoration-color: #317D4F;";
|
|
40643
40677
|
var fallbackValues$z = {
|
|
@@ -41818,7 +41852,7 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
41818
41852
|
var PaymentDetails$1 = themeComponent(PaymentDetails, "PaymentDetails", fallbackValues$A, "default");
|
|
41819
41853
|
|
|
41820
41854
|
var linkColor$4 = {
|
|
41821
|
-
"default": "#
|
|
41855
|
+
"default": "#3176AA"
|
|
41822
41856
|
};
|
|
41823
41857
|
var fontSize$a = {
|
|
41824
41858
|
"default": "1rem"
|
|
@@ -42972,7 +43006,7 @@ var backgroundColor$9 = {
|
|
|
42972
43006
|
footer: "#ffffff"
|
|
42973
43007
|
};
|
|
42974
43008
|
var linkColor$5 = {
|
|
42975
|
-
"default": "#
|
|
43009
|
+
"default": "#3176AA",
|
|
42976
43010
|
footer: "#ffffff"
|
|
42977
43011
|
};
|
|
42978
43012
|
var border$3 = {
|
|
@@ -43032,7 +43066,8 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
|
|
|
43032
43066
|
borderRadius: "3px",
|
|
43033
43067
|
extraStyles: "overflow: scroll; max-height: 20rem;"
|
|
43034
43068
|
}, /*#__PURE__*/React.createElement(Text$1, {
|
|
43035
|
-
variant: "p"
|
|
43069
|
+
variant: "p",
|
|
43070
|
+
extraStyles: "& a { text-decoration: underline; }"
|
|
43036
43071
|
}, terms)),
|
|
43037
43072
|
defaultWrapper: false,
|
|
43038
43073
|
onlyCloseButton: !acceptText,
|
|
@@ -43276,6 +43311,9 @@ var PeriscopeDashboardIframe = function PeriscopeDashboardIframe(_ref) {
|
|
|
43276
43311
|
time.timer = setTimeout(function () {
|
|
43277
43312
|
periscopeDataRequestFailure();
|
|
43278
43313
|
}, 10000);
|
|
43314
|
+
return function () {
|
|
43315
|
+
return clearTimeout(time.timer);
|
|
43316
|
+
};
|
|
43279
43317
|
}, []);
|
|
43280
43318
|
|
|
43281
43319
|
var Dashboard = function Dashboard(height) {
|
|
@@ -43296,8 +43334,11 @@ var PeriscopeDashboardIframe = function PeriscopeDashboardIframe(_ref) {
|
|
|
43296
43334
|
var validatePeriscope = function validatePeriscope(message) {
|
|
43297
43335
|
if (isValidMessage(message)) {
|
|
43298
43336
|
setHeight(message.data.dashboard_height + 100);
|
|
43299
|
-
|
|
43300
|
-
|
|
43337
|
+
|
|
43338
|
+
if (!periscopeDataSuccess) {
|
|
43339
|
+
clearTimeout(time.timer);
|
|
43340
|
+
periscopeDataRequestSuccess();
|
|
43341
|
+
}
|
|
43301
43342
|
}
|
|
43302
43343
|
};
|
|
43303
43344
|
|
|
@@ -43606,13 +43647,27 @@ var index$4 = /*#__PURE__*/Object.freeze({
|
|
|
43606
43647
|
fontWeights: style_constants
|
|
43607
43648
|
});
|
|
43608
43649
|
|
|
43650
|
+
var useFocusInvalidInput = function useFocusInvalidInput() {
|
|
43651
|
+
var showErrors = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
43652
|
+
// Only move focus when "showErrors" is true
|
|
43653
|
+
// "showErrors" is managed by container page of form
|
|
43654
|
+
// typically set to "true" on attempted form submission, if errors exist
|
|
43655
|
+
useEffect$1(function () {
|
|
43656
|
+
if (showErrors) {
|
|
43657
|
+
var inputsWithErrors = document.querySelectorAll("input[aria-invalid=true]");
|
|
43658
|
+
console.log("inputs with errors...", inputsWithErrors);
|
|
43659
|
+
}
|
|
43660
|
+
}, [showErrors]);
|
|
43661
|
+
};
|
|
43662
|
+
|
|
43609
43663
|
|
|
43610
43664
|
|
|
43611
43665
|
var index$5 = /*#__PURE__*/Object.freeze({
|
|
43612
43666
|
__proto__: null,
|
|
43613
43667
|
formats: formats,
|
|
43614
43668
|
general: general,
|
|
43615
|
-
theme: themeUtils
|
|
43669
|
+
theme: themeUtils,
|
|
43670
|
+
useFocusInvalidInput: useFocusInvalidInput
|
|
43616
43671
|
});
|
|
43617
43672
|
|
|
43618
43673
|
export { AccountNumberImage, AccountsAddIcon$1 as AccountsAddIcon, AccountsIcon$1 as AccountsIcon, AccountsIconSmall$1 as AccountsIconSmall, AchReturnIcon, AddObligation$1 as AddObligation, AddressForm, Alert$1 as Alert, AllocatedIcon, AmountCallout$1 as AmountCallout, AutopayOnIcon, BankIcon, Box, BoxWithShadow$1 as BoxWithShadow, Breadcrumbs as Breadcrumb, ButtonWithAction, ButtonWithLink, CalendarIcon, CarrotIcon$1 as CarrotIcon, CashIcon, Center, CenterSingle$1 as CenterSingle, CenterStack$1 as CenterStack, ChangePasswordForm, ChargebackIcon, ChargebackReversalIcon, CheckIcon, Checkbox$1 as Checkbox, CheckboxList$1 as CheckboxList, CheckmarkIcon, ChevronIcon$1 as ChevronIcon, Cluster, CollapsibleSection$1 as CollapsibleSection, CountryDropdown, Cover, CustomerSearchIcon, DefaultPageTemplate, Detail$1 as Detail, DisplayBox$1 as DisplayBox, DisplayCard, Dropdown$1 as Dropdown, DuplicateIcon, EditNameForm, EditableList, EditableTable, EmailForm, EmptyCartIcon$1 as EmptyCartIcon, ErroredIcon, ExternalLink, FailedIcon, ForgotPasswordForm, ForgotPasswordIcon$1 as ForgotPasswordIcon, FormContainer$1 as FormContainer, FormFooterPanel$1 as FormFooterPanel, FormInput$1 as FormInput, FormInputColumn, FormInputRow, FormSelect$1 as FormSelect, FormattedAddress$1 as FormattedAddress, FormattedCreditCard$1 as FormattedCreditCard, Frame, GenericCard, GenericCardLarge, GoToEmailIcon$1 as GoToEmailIcon, Grid, HamburgerButton, Heading$1 as Heading, HighlightTabRow$1 as HighlightTabRow, IconAdd, IconQuitLarge, Imposter, InternalLink, InternalUserInfoForm, 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, NoCustomerResultsIcon, NoPaymentResultsIcon, NotFoundIcon, Obligation, iconsMap as ObligationIcons, Pagination, Paragraph$1 as Paragraph, PartialAmountForm, PasswordRequirements, PaymentButtonBar, PaymentDetails$1 as PaymentDetails, PaymentFormACH, PaymentFormCard$1 as PaymentFormCard, PaymentIcon, PaymentMethodAddIcon$1 as PaymentMethodAddIcon, PaymentMethodIcon$1 as PaymentMethodIcon, PaymentSearchIcon, PaymentsIconSmall$1 as PaymentsIconSmall, PendingIcon, PeriscopeDashboardIframe, PeriscopeFailedIcon, PhoneForm, Placeholder$1 as Placeholder, ProcessingFee$1 as ProcessingFee, ProfileIcon$1 as ProfileIcon, ProfileIconSmall$1 as ProfileIconSmall, PropertiesAddIcon$1 as PropertiesAddIcon, PropertiesIconSmall$1 as PropertiesIconSmall, RadioButton$2 as RadioButton, RadioSection$1 as RadioSection, Reel, RefundIcon, RegistrationForm, RejectedIcon, RejectedVelocityIcon, ResetConfirmationForm$1 as ResetConfirmationForm, ResetPasswordForm, ResetPasswordIcon, ResetPasswordSuccess, RoutingNumberImage, SearchIcon, SearchableSelect$1 as SearchableSelect, SettingsIconSmall$1 as SettingsIconSmall, ShoppingCartIcon, Sidebar, SidebarSingleContent$1 as SidebarSingleContent, SidebarStackContent$1 as SidebarStackContent, SolidDivider$1 as SolidDivider, Spinner$2 as Spinner, Stack, FormStateDropdown as StateProvinceDropdown, StatusUnknownIcon, SuccessfulIcon, Switcher, TabSidebar$1 as TabSidebar, TableListItem, Tabs$1 as Tabs, TermsAndConditions, TermsAndConditionsModal$1 as TermsAndConditionsModal, Text$1 as Text, Timeout$1 as Timeout, TimeoutImage, Title$1 as Title, ToggleSwitch$1 as ToggleSwitch, TrashIcon$1 as TrashIcon, TypeaheadInput, VerifiedEmailIcon$1 as VerifiedEmailIcon, VoidedIcon, WalletIcon$1 as WalletIcon, WarningIconXS, WelcomeModule$1 as WelcomeModule, WorkflowTile, cardRegistry, index$4 as constants, createPartialAmountFormState, index$5 as util, withWindowSize };
|