@thecb/components 11.10.2-beta.2 → 11.10.3
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 +21 -29
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +21 -29
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/form-layouts/FormInput.js +9 -16
- package/src/components/atoms/formatted-bank-account/FormattedBankAccount.js +2 -2
- package/src/components/atoms/formatted-bank-account/FormattedBankAccount.theme.js +2 -2
- package/src/components/atoms/formatted-credit-card/FormattedCreditCard.js +2 -2
- package/src/components/atoms/formatted-credit-card/FormattedCreditCard.theme.js +2 -2
- package/src/components/molecules/email-form/EmailForm.js +2 -1
- package/src/components/molecules/email-form/EmailForm.stories.js +210 -0
- package/src/components/molecules/forgot-password-form/ForgotPasswordForm.js +2 -1
- package/src/components/molecules/login-form/LoginForm.js +2 -1
- package/src/components/molecules/registration-form/RegistrationForm.js +2 -1
- package/src/util/formats.js +3 -6
package/dist/index.cjs.js
CHANGED
|
@@ -25946,7 +25946,8 @@ var FormInput = function FormInput(_ref15) {
|
|
|
25946
25946
|
minWidth: "100%"
|
|
25947
25947
|
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
25948
25948
|
justify: "space-between",
|
|
25949
|
-
align: "center"
|
|
25949
|
+
align: "center",
|
|
25950
|
+
overflow: true
|
|
25950
25951
|
}, labelDisplayOverride ? labelDisplayOverride : /*#__PURE__*/React__default.createElement(Text$1, {
|
|
25951
25952
|
as: "label",
|
|
25952
25953
|
color: themeValues.labelColor,
|
|
@@ -25954,22 +25955,16 @@ var FormInput = function FormInput(_ref15) {
|
|
|
25954
25955
|
fontWeight: themeValues.fontWeight,
|
|
25955
25956
|
extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
|
|
25956
25957
|
id: createIdFromString(labelTextWhenNoError)
|
|
25957
|
-
}, labelTextWhenNoError), type === "password" && /*#__PURE__*/React__default.createElement(
|
|
25958
|
-
variant:
|
|
25959
|
-
|
|
25960
|
-
|
|
25961
|
-
hoverStyles: themeValues.hoverFocusStyles,
|
|
25962
|
-
extraStyles: "text-decoration: underline; cursor: pointer; &:focus { outline-offset: -2px; }",
|
|
25963
|
-
onClick: function onClick() {
|
|
25958
|
+
}, labelTextWhenNoError), type === "password" && /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
25959
|
+
variant: "smallGhost",
|
|
25960
|
+
text: showPassword ? "Hide" : "Show",
|
|
25961
|
+
action: function action() {
|
|
25964
25962
|
return setShowPassword(!showPassword);
|
|
25965
25963
|
},
|
|
25966
|
-
tabIndex: "0",
|
|
25967
25964
|
"aria-label": showPassword ? "Hide Password" : "Show password",
|
|
25968
|
-
"
|
|
25969
|
-
|
|
25970
|
-
|
|
25971
|
-
}
|
|
25972
|
-
}, showPassword ? "Hide" : "Show"), isMobile && decorator && /*#__PURE__*/React__default.createElement(Box, {
|
|
25965
|
+
extraStyles: "margin: 0; min-width: auto;",
|
|
25966
|
+
textExtraStyles: "color: ".concat(themeValues.linkColor, ";")
|
|
25967
|
+
}), isMobile && decorator && /*#__PURE__*/React__default.createElement(Box, {
|
|
25973
25968
|
padding: "0 0 0 auto"
|
|
25974
25969
|
}, decorator)))), /*#__PURE__*/React__default.createElement(Box, {
|
|
25975
25970
|
padding: "0"
|
|
@@ -26309,7 +26304,7 @@ var FormattedAddress = function FormattedAddress(_ref) {
|
|
|
26309
26304
|
var FormattedAddress$1 = themeComponent(FormattedAddress, "FormattedAddress", fallbackValues$n, "default");
|
|
26310
26305
|
|
|
26311
26306
|
var textColor$1 = "".concat(CHARADE_GREY);
|
|
26312
|
-
var autopayTextColor = "".concat(
|
|
26307
|
+
var autopayTextColor = "".concat(REGENT_GREY);
|
|
26313
26308
|
var fallbackValues$o = {
|
|
26314
26309
|
textColor: textColor$1,
|
|
26315
26310
|
autopayTextColor: autopayTextColor
|
|
@@ -26345,8 +26340,8 @@ var FormattedBankAccount = function FormattedBankAccount(_ref2) {
|
|
|
26345
26340
|
}, "Savings Account ending in ", lastFour), autoPay && /*#__PURE__*/React__default.createElement(Text$1, {
|
|
26346
26341
|
variant: "p",
|
|
26347
26342
|
color: themeValues.autopayTextColor,
|
|
26348
|
-
extraStyles: "font-style: italic;
|
|
26349
|
-
}, "Autopay
|
|
26343
|
+
extraStyles: "font-style: italic;"
|
|
26344
|
+
}, "Autopay Enabled")));
|
|
26350
26345
|
};
|
|
26351
26346
|
var FormattedBankAccount$1 = themeComponent(FormattedBankAccount, "FormattedBankAccount", fallbackValues$o);
|
|
26352
26347
|
|
|
@@ -26395,7 +26390,7 @@ var CardType = function CardType(_ref) {
|
|
|
26395
26390
|
};
|
|
26396
26391
|
|
|
26397
26392
|
var textColor$2 = "".concat(CHARADE_GREY);
|
|
26398
|
-
var autopayTextColor$1 = "".concat(
|
|
26393
|
+
var autopayTextColor$1 = "".concat(REGENT_GREY);
|
|
26399
26394
|
var fallbackValues$p = {
|
|
26400
26395
|
textColor: textColor$2,
|
|
26401
26396
|
autopayTextColor: autopayTextColor$1
|
|
@@ -26424,15 +26419,13 @@ var renderCardStatus = function renderCardStatus(expirationStatus, expireDate) {
|
|
|
26424
26419
|
return /*#__PURE__*/React__default.createElement(Text$1, {
|
|
26425
26420
|
as: as,
|
|
26426
26421
|
variant: "pXS",
|
|
26427
|
-
|
|
26428
|
-
color: STORM_GREY,
|
|
26422
|
+
color: ASH_GREY,
|
|
26429
26423
|
extraStyles: "text-align: ".concat(textAlign, "; margin: ").concat(textMargin, ";")
|
|
26430
26424
|
}, "Exp Date ", expireDate);
|
|
26431
26425
|
case EXPIRING_SOON:
|
|
26432
26426
|
return /*#__PURE__*/React__default.createElement(Text$1, {
|
|
26433
26427
|
as: as,
|
|
26434
26428
|
variant: "pXS",
|
|
26435
|
-
fontSize: ".75rem",
|
|
26436
26429
|
color: FIRE_YELLOW,
|
|
26437
26430
|
extraStyles: "text-align: ".concat(textAlign, "; margin: ").concat(textMargin, ";")
|
|
26438
26431
|
}, "Expiring Soon ", expireDate);
|
|
@@ -26440,8 +26433,7 @@ var renderCardStatus = function renderCardStatus(expirationStatus, expireDate) {
|
|
|
26440
26433
|
return /*#__PURE__*/React__default.createElement(Text$1, {
|
|
26441
26434
|
as: as,
|
|
26442
26435
|
variant: "pXS",
|
|
26443
|
-
|
|
26444
|
-
color: STORM_GREY,
|
|
26436
|
+
color: ASH_GREY,
|
|
26445
26437
|
extraStyles: "text-align: ".concat(textAlign, "; margin: ").concat(textMargin, ";")
|
|
26446
26438
|
}, "Expired");
|
|
26447
26439
|
}
|
|
@@ -26494,8 +26486,8 @@ var FormattedCreditCard = function FormattedCreditCard(_ref) {
|
|
|
26494
26486
|
}, "Card ending in ".concat(lastFour)), expireDate && /*#__PURE__*/React__default.createElement(React.Fragment, null, renderCardStatus(expirationStatus, expireDate, "left", "p"))), autoPay && /*#__PURE__*/React__default.createElement(Text$1, {
|
|
26495
26487
|
variant: "p",
|
|
26496
26488
|
color: themeValues.autopayTextColor,
|
|
26497
|
-
extraStyles: "font-style: italic;
|
|
26498
|
-
}, "Autopay
|
|
26489
|
+
extraStyles: "font-style: italic;"
|
|
26490
|
+
}, "Autopay Enabled")));
|
|
26499
26491
|
};
|
|
26500
26492
|
var FormattedCreditCard$1 = themeComponent(FormattedCreditCard, "FormattedCreditCard", fallbackValues$p);
|
|
26501
26493
|
|
|
@@ -41178,7 +41170,7 @@ var EmailForm = function EmailForm(_ref) {
|
|
|
41178
41170
|
}, []);
|
|
41179
41171
|
}
|
|
41180
41172
|
useConditionallyAddValidator(isRequired, required, actions.fields.email.addValidator, actions.fields.email.removeValidator);
|
|
41181
|
-
var emailFieldErrorMessages = _defineProperty(_defineProperty({}, required.error, "Email address is required"), isProbablyEmail.error, "
|
|
41173
|
+
var emailFieldErrorMessages = _defineProperty(_defineProperty({}, required.error, "Email address is required"), isProbablyEmail.error, "Please enter a valid email address in the format user@example.com");
|
|
41182
41174
|
return /*#__PURE__*/React__default.createElement(FormContainer$1, {
|
|
41183
41175
|
variant: variant,
|
|
41184
41176
|
role: "form",
|
|
@@ -41270,7 +41262,7 @@ var ForgotPasswordForm = function ForgotPasswordForm(_ref) {
|
|
|
41270
41262
|
};
|
|
41271
41263
|
}, []);
|
|
41272
41264
|
}
|
|
41273
|
-
var EmailErrorMessages = _defineProperty(_defineProperty({}, required.error, "Email address is required"), isProbablyEmail.error, "
|
|
41265
|
+
var EmailErrorMessages = _defineProperty(_defineProperty({}, required.error, "Email address is required"), isProbablyEmail.error, "Please enter a valid email address in the format user@example.com");
|
|
41274
41266
|
return /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
41275
41267
|
labelTextWhenNoError: "Email address",
|
|
41276
41268
|
errorMessages: EmailErrorMessages,
|
|
@@ -45969,7 +45961,7 @@ var LoginForm = function LoginForm(_ref) {
|
|
|
45969
45961
|
};
|
|
45970
45962
|
}, []);
|
|
45971
45963
|
}
|
|
45972
|
-
var emailErrorMessages = _defineProperty(_defineProperty({}, required.error, "Email address is required"), isProbablyEmail.error, "
|
|
45964
|
+
var emailErrorMessages = _defineProperty(_defineProperty({}, required.error, "Email address is required"), isProbablyEmail.error, "Please enter a valid email address in the format user@example.com");
|
|
45973
45965
|
var passwordErrorMessages = _defineProperty({}, required.error, "Password is required");
|
|
45974
45966
|
return /*#__PURE__*/React__default.createElement(FormInputColumn, {
|
|
45975
45967
|
role: "form",
|
|
@@ -49342,7 +49334,7 @@ var RegistrationForm = function RegistrationForm(_ref) {
|
|
|
49342
49334
|
}
|
|
49343
49335
|
var firstNameErrorMessages = _defineProperty(_defineProperty({}, required.error, "First name is required"), validName.error, "First name contains invalid characters");
|
|
49344
49336
|
var lastNameErrorMessages = _defineProperty(_defineProperty({}, required.error, "Last name is required"), validName.error, "Last name contains invalid characters");
|
|
49345
|
-
var emailErrorMessages = _defineProperty(_defineProperty({}, required.error, "Email is required"), isProbablyEmail.error, "
|
|
49337
|
+
var emailErrorMessages = _defineProperty(_defineProperty({}, required.error, "Email is required"), isProbablyEmail.error, "Please enter a valid email address in the format user@example.com");
|
|
49346
49338
|
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 (!@#$%^&*.?)");
|
|
49347
49339
|
var confirmPasswordErrorMessages = _defineProperty({}, matchesField.error, "Confirm password must match password");
|
|
49348
49340
|
return /*#__PURE__*/React__default.createElement(FormInputColumn, {
|