@thecb/components 11.11.0-beta.4 → 11.11.0-beta.7
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/README.md +8 -4
- package/dist/index.cjs.js +95 -67
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +95 -67
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/card-type/CardType.js +10 -2
- package/src/components/atoms/dropdown/Dropdown.js +2 -3
- package/src/components/atoms/dropdown/DropdownIcon.js +1 -0
- package/src/components/atoms/dropdown/DropdownIconV2.js +1 -0
- 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 +12 -9
- package/src/components/atoms/formatted-credit-card/FormattedCreditCard.theme.js +2 -2
- package/src/components/atoms/icons/AmExSmallIcon.js +2 -0
- package/src/components/atoms/icons/DiscoverSmallIcon.js +2 -0
- package/src/components/atoms/icons/GenericCardLarge.js +1 -1
- package/src/components/atoms/icons/GenericSmallIcon.js +2 -0
- package/src/components/atoms/icons/MasterCardSmallIcon.js +2 -0
- package/src/components/atoms/icons/VisaSmallIcon.js +2 -0
- 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/radio-section/InnerRadioSection.js +3 -3
- package/src/components/molecules/radio-section/RadioSection.stories.js +142 -0
- package/src/components/molecules/registration-form/RegistrationForm.js +2 -1
- package/src/components/molecules/terms-and-conditions-modal/TermsAndConditionsModal.js +1 -1
- package/src/components/molecules/terms-and-conditions-modal/TermsAndConditionsModal.stories.js +110 -0
- package/src/components/molecules/tooltip/Tooltip.js +28 -15
- package/src/components/molecules/tooltip/Tooltip.stories.js +5 -5
- package/src/components/molecules/tooltip/Tooltip.theme.js +10 -11
- package/src/components/molecules/tooltip/index.d.ts +1 -1
- package/src/util/formats.js +6 -3
package/README.md
CHANGED
|
@@ -11,8 +11,6 @@ This library contains CityBase React components for use across all current and f
|
|
|
11
11
|
- [Storybook deployment](#storybook-deployment)
|
|
12
12
|
- [Adding new components](#adding-new-components)
|
|
13
13
|
- [Version bumping and publishing](#version-bumping-and-publishing)
|
|
14
|
-
- [Version bumping](#version-bumping)
|
|
15
|
-
- [Publishing new versions to NPM](#publishing-new-versions-to-npm)
|
|
16
14
|
- [Consuming in your application](#consuming-in-your-application)
|
|
17
15
|
|
|
18
16
|
- [Adding to existing application](#adding-to-existing-application)
|
|
@@ -104,9 +102,15 @@ export * from "./button-with-action";
|
|
|
104
102
|
|
|
105
103
|
## Version bumping and publishing
|
|
106
104
|
|
|
107
|
-
|
|
105
|
+
Publishing to NPM is automated. When a PR is merged to master, the package will automatically be built and published to NPM using the version specified in `package.json`. **Developers no longer need to manually run `yarn build && yarn publish`.**
|
|
108
106
|
|
|
109
|
-
|
|
107
|
+
### How it works
|
|
108
|
+
|
|
109
|
+
1. Before merging your PR, bump the version in `package.json` to an appropriate new version following semantic versioning (see below).
|
|
110
|
+
2. Ensure the version you set has **not already been published** to NPM. If you merge a PR with a version that has already been published, the automated publish will fail and you will need to create a follow-up PR that bumps the version to an unpublished one.
|
|
111
|
+
3. Merge your PR to master. The CI pipeline will automatically build and publish the new version.
|
|
112
|
+
|
|
113
|
+
### Semantic versioning
|
|
110
114
|
|
|
111
115
|
- CB Components follows semantic versioning practices, which divides version upgrades into three categories: "Patch" (e.g., `6.0.1` -> `6.0.2`), "Minor" (e.g., `6.0.2` -> `6.1.0`), and "Major" (e.g., `6.1.0` -> `7.0.0`)
|
|
112
116
|
|
package/dist/index.cjs.js
CHANGED
|
@@ -15822,7 +15822,7 @@ var GenericCardLarge = function GenericCardLarge() {
|
|
|
15822
15822
|
fill: "none",
|
|
15823
15823
|
xmlns: "http://www.w3.org/2000/svg",
|
|
15824
15824
|
role: "img",
|
|
15825
|
-
"aria-label": "
|
|
15825
|
+
"aria-label": "Credit card"
|
|
15826
15826
|
}, /*#__PURE__*/React__default.createElement("rect", {
|
|
15827
15827
|
width: "36",
|
|
15828
15828
|
height: "24",
|
|
@@ -18700,7 +18700,9 @@ var VisaSmallIcon = function VisaSmallIcon() {
|
|
|
18700
18700
|
height: "16",
|
|
18701
18701
|
viewBox: "0 0 24 16",
|
|
18702
18702
|
fill: "none",
|
|
18703
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
18703
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
18704
|
+
role: "img",
|
|
18705
|
+
"aria-label": "Visa"
|
|
18704
18706
|
}, /*#__PURE__*/React__default.createElement("path", {
|
|
18705
18707
|
fillRule: "evenodd",
|
|
18706
18708
|
clipRule: "evenodd",
|
|
@@ -18727,7 +18729,9 @@ var AmExSmallIcon = function AmExSmallIcon() {
|
|
|
18727
18729
|
height: "16",
|
|
18728
18730
|
viewBox: "0 0 24 16",
|
|
18729
18731
|
fill: "none",
|
|
18730
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
18732
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
18733
|
+
role: "img",
|
|
18734
|
+
"aria-label": "American Express"
|
|
18731
18735
|
}, /*#__PURE__*/React__default.createElement("g", {
|
|
18732
18736
|
clipPath: "url(#clip0_3693_1095)"
|
|
18733
18737
|
}, /*#__PURE__*/React__default.createElement("g", {
|
|
@@ -18826,7 +18830,9 @@ var DiscoverSmallIcon = function DiscoverSmallIcon() {
|
|
|
18826
18830
|
height: "16",
|
|
18827
18831
|
viewBox: "0 0 24 16",
|
|
18828
18832
|
fill: "none",
|
|
18829
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
18833
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
18834
|
+
role: "img",
|
|
18835
|
+
"aria-label": "Discover"
|
|
18830
18836
|
}, /*#__PURE__*/React__default.createElement("g", {
|
|
18831
18837
|
clipPath: "url(#clip0_3818_267)"
|
|
18832
18838
|
}, /*#__PURE__*/React__default.createElement("path", {
|
|
@@ -18951,7 +18957,9 @@ var GenericSmallIcon = function GenericSmallIcon() {
|
|
|
18951
18957
|
height: "16",
|
|
18952
18958
|
viewBox: "0 0 24 16",
|
|
18953
18959
|
fill: "none",
|
|
18954
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
18960
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
18961
|
+
role: "img",
|
|
18962
|
+
"aria-label": "Credit card"
|
|
18955
18963
|
}, /*#__PURE__*/React__default.createElement("rect", {
|
|
18956
18964
|
width: "24",
|
|
18957
18965
|
height: "16",
|
|
@@ -18972,7 +18980,9 @@ var MasterCardSmallIcon = function MasterCardSmallIcon() {
|
|
|
18972
18980
|
height: "16",
|
|
18973
18981
|
viewBox: "0 0 24 16",
|
|
18974
18982
|
fill: "none",
|
|
18975
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
18983
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
18984
|
+
role: "img",
|
|
18985
|
+
"aria-label": "Mastercard"
|
|
18976
18986
|
}, /*#__PURE__*/React__default.createElement("rect", {
|
|
18977
18987
|
width: "24",
|
|
18978
18988
|
height: "16",
|
|
@@ -22623,6 +22633,7 @@ var SortableTableHeading$1 = themeComponent(SortableTableHeading, "SortableTable
|
|
|
22623
22633
|
|
|
22624
22634
|
var DropdownIcon = function DropdownIcon() {
|
|
22625
22635
|
return /*#__PURE__*/React__default.createElement("svg", {
|
|
22636
|
+
"aria-hidden": "true",
|
|
22626
22637
|
version: "1.2",
|
|
22627
22638
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22628
22639
|
overflow: "visible",
|
|
@@ -23972,7 +23983,7 @@ var IconWrapper = styled__default.div.withConfig({
|
|
|
23972
23983
|
var DropdownContentWrapper = styled__default.div.withConfig({
|
|
23973
23984
|
displayName: "Dropdown__DropdownContentWrapper",
|
|
23974
23985
|
componentId: "sc-pn6m0h-1"
|
|
23975
|
-
})(["transform-origin:0 0;border:1px solid ", ";border-radius:2px;background-color:", ";padding:8px 0 8px;position:absolute;width:", ";min-width:100%;max-height:", ";overflow-y:scroll;z-index:1;box-sizing:border-box;&:focus{outline:none;}ul{padding-left:0;}"],
|
|
23986
|
+
})(["transform-origin:0 0;border:1px solid ", ";border-radius:2px;background-color:", ";padding:8px 0 8px;position:absolute;width:", ";min-width:100%;max-height:", ";overflow-y:scroll;z-index:1;box-sizing:border-box;&:focus{outline:none;}ul{padding-left:0;}"], STORM_GREY, WHITE, function (_ref2) {
|
|
23976
23987
|
var widthFitOptions = _ref2.widthFitOptions;
|
|
23977
23988
|
return widthFitOptions ? "fit-content" : "100%";
|
|
23978
23989
|
}, function (_ref3) {
|
|
@@ -24277,7 +24288,7 @@ var Dropdown = function Dropdown(_ref13) {
|
|
|
24277
24288
|
background: isOpen ? themeValues.hoverColor : WHITE,
|
|
24278
24289
|
borderRadius: "2px",
|
|
24279
24290
|
borderSize: "1px",
|
|
24280
|
-
borderColor: isError ? ERROR_COLOR : isOpen ? themeValues.selectedColor :
|
|
24291
|
+
borderColor: isError ? ERROR_COLOR : isOpen ? themeValues.selectedColor : STORM_GREY,
|
|
24281
24292
|
dataQa: placeholder,
|
|
24282
24293
|
extraStyles: disabled ? "".concat(inputPlaceholderTextStyle).concat(inputDisabledStyle) : inputPlaceholderTextStyle,
|
|
24283
24294
|
hoverStyles: "background-color: ".concat(themeValues.hoverColor, ";"),
|
|
@@ -25935,7 +25946,8 @@ var FormInput = function FormInput(_ref15) {
|
|
|
25935
25946
|
minWidth: "100%"
|
|
25936
25947
|
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
25937
25948
|
justify: "space-between",
|
|
25938
|
-
align: "center"
|
|
25949
|
+
align: "center",
|
|
25950
|
+
overflow: true
|
|
25939
25951
|
}, labelDisplayOverride ? labelDisplayOverride : /*#__PURE__*/React__default.createElement(Text$1, {
|
|
25940
25952
|
as: "label",
|
|
25941
25953
|
color: themeValues.labelColor,
|
|
@@ -25943,22 +25955,16 @@ var FormInput = function FormInput(_ref15) {
|
|
|
25943
25955
|
fontWeight: themeValues.fontWeight,
|
|
25944
25956
|
extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
|
|
25945
25957
|
id: createIdFromString(labelTextWhenNoError)
|
|
25946
|
-
}, labelTextWhenNoError), type === "password" && /*#__PURE__*/React__default.createElement(
|
|
25947
|
-
variant:
|
|
25948
|
-
|
|
25949
|
-
|
|
25950
|
-
hoverStyles: themeValues.hoverFocusStyles,
|
|
25951
|
-
extraStyles: "text-decoration: underline; cursor: pointer; &:focus { outline-offset: -2px; }",
|
|
25952
|
-
onClick: function onClick() {
|
|
25958
|
+
}, labelTextWhenNoError), type === "password" && /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
25959
|
+
variant: "smallGhost",
|
|
25960
|
+
text: showPassword ? "Hide" : "Show",
|
|
25961
|
+
action: function action() {
|
|
25953
25962
|
return setShowPassword(!showPassword);
|
|
25954
25963
|
},
|
|
25955
|
-
tabIndex: "0",
|
|
25956
25964
|
"aria-label": showPassword ? "Hide Password" : "Show password",
|
|
25957
|
-
"
|
|
25958
|
-
|
|
25959
|
-
|
|
25960
|
-
}
|
|
25961
|
-
}, 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, {
|
|
25962
25968
|
padding: "0 0 0 auto"
|
|
25963
25969
|
}, decorator)))), /*#__PURE__*/React__default.createElement(Box, {
|
|
25964
25970
|
padding: "0"
|
|
@@ -26298,7 +26304,7 @@ var FormattedAddress = function FormattedAddress(_ref) {
|
|
|
26298
26304
|
var FormattedAddress$1 = themeComponent(FormattedAddress, "FormattedAddress", fallbackValues$n, "default");
|
|
26299
26305
|
|
|
26300
26306
|
var textColor$1 = "".concat(CHARADE_GREY);
|
|
26301
|
-
var autopayTextColor = "".concat(
|
|
26307
|
+
var autopayTextColor = "".concat(SEA_GREEN);
|
|
26302
26308
|
var fallbackValues$o = {
|
|
26303
26309
|
textColor: textColor$1,
|
|
26304
26310
|
autopayTextColor: autopayTextColor
|
|
@@ -26334,8 +26340,8 @@ var FormattedBankAccount = function FormattedBankAccount(_ref2) {
|
|
|
26334
26340
|
}, "Savings Account ending in ", lastFour), autoPay && /*#__PURE__*/React__default.createElement(Text$1, {
|
|
26335
26341
|
variant: "p",
|
|
26336
26342
|
color: themeValues.autopayTextColor,
|
|
26337
|
-
extraStyles: "font-style: italic;"
|
|
26338
|
-
}, "Autopay
|
|
26343
|
+
extraStyles: "font-style: italic; font-size: .75rem;"
|
|
26344
|
+
}, "Autopay On")));
|
|
26339
26345
|
};
|
|
26340
26346
|
var FormattedBankAccount$1 = themeComponent(FormattedBankAccount, "FormattedBankAccount", fallbackValues$o);
|
|
26341
26347
|
|
|
@@ -26366,21 +26372,25 @@ var cardBrands = {
|
|
|
26366
26372
|
large: GenericCardLarge
|
|
26367
26373
|
}
|
|
26368
26374
|
};
|
|
26375
|
+
var normalizeType = function normalizeType(type) {
|
|
26376
|
+
if (!type) return undefined;
|
|
26377
|
+
var lower = type.toLowerCase();
|
|
26378
|
+
if (lower === "mastercard") return "master_card";
|
|
26379
|
+
return lower;
|
|
26380
|
+
};
|
|
26369
26381
|
var CardType = function CardType(_ref) {
|
|
26370
26382
|
var type = _ref.type,
|
|
26371
26383
|
_ref$size = _ref.size,
|
|
26372
26384
|
size = _ref$size === void 0 ? "small" : _ref$size;
|
|
26373
|
-
var
|
|
26385
|
+
var normalizedType = normalizeType(type);
|
|
26386
|
+
var _ref2 = cardBrands[normalizedType] || cardBrands["default"],
|
|
26374
26387
|
label = _ref2.label,
|
|
26375
26388
|
IconComponent = _ref2[size];
|
|
26376
|
-
return /*#__PURE__*/React__default.createElement("span",
|
|
26377
|
-
role: "img",
|
|
26378
|
-
"aria-label": label
|
|
26379
|
-
}, /*#__PURE__*/React__default.createElement(IconComponent, null));
|
|
26389
|
+
return /*#__PURE__*/React__default.createElement("span", null, /*#__PURE__*/React__default.createElement(IconComponent, null));
|
|
26380
26390
|
};
|
|
26381
26391
|
|
|
26382
26392
|
var textColor$2 = "".concat(CHARADE_GREY);
|
|
26383
|
-
var autopayTextColor$1 = "".concat(
|
|
26393
|
+
var autopayTextColor$1 = "".concat(SEA_GREEN);
|
|
26384
26394
|
var fallbackValues$p = {
|
|
26385
26395
|
textColor: textColor$2,
|
|
26386
26396
|
autopayTextColor: autopayTextColor$1
|
|
@@ -26409,13 +26419,15 @@ var renderCardStatus = function renderCardStatus(expirationStatus, expireDate) {
|
|
|
26409
26419
|
return /*#__PURE__*/React__default.createElement(Text$1, {
|
|
26410
26420
|
as: as,
|
|
26411
26421
|
variant: "pXS",
|
|
26412
|
-
|
|
26422
|
+
fontSize: ".75rem",
|
|
26423
|
+
color: STORM_GREY,
|
|
26413
26424
|
extraStyles: "text-align: ".concat(textAlign, "; margin: ").concat(textMargin, ";")
|
|
26414
26425
|
}, "Exp Date ", expireDate);
|
|
26415
26426
|
case EXPIRING_SOON:
|
|
26416
26427
|
return /*#__PURE__*/React__default.createElement(Text$1, {
|
|
26417
26428
|
as: as,
|
|
26418
26429
|
variant: "pXS",
|
|
26430
|
+
fontSize: ".75rem",
|
|
26419
26431
|
color: FIRE_YELLOW,
|
|
26420
26432
|
extraStyles: "text-align: ".concat(textAlign, "; margin: ").concat(textMargin, ";")
|
|
26421
26433
|
}, "Expiring Soon ", expireDate);
|
|
@@ -26423,7 +26435,8 @@ var renderCardStatus = function renderCardStatus(expirationStatus, expireDate) {
|
|
|
26423
26435
|
return /*#__PURE__*/React__default.createElement(Text$1, {
|
|
26424
26436
|
as: as,
|
|
26425
26437
|
variant: "pXS",
|
|
26426
|
-
|
|
26438
|
+
fontSize: ".75rem",
|
|
26439
|
+
color: STORM_GREY,
|
|
26427
26440
|
extraStyles: "text-align: ".concat(textAlign, "; margin: ").concat(textMargin, ";")
|
|
26428
26441
|
}, "Expired");
|
|
26429
26442
|
}
|
|
@@ -26450,7 +26463,7 @@ var CreditCardWrapper = styled__default.div.withConfig({
|
|
|
26450
26463
|
var CCIconWrapper = styled__default.div.withConfig({
|
|
26451
26464
|
displayName: "FormattedCreditCard__CCIconWrapper",
|
|
26452
26465
|
componentId: "sc-s0ta5l-1"
|
|
26453
|
-
})(["margin-right:16px;width:
|
|
26466
|
+
})(["margin-right:16px;width:36px;height:auto;display:flex;"]);
|
|
26454
26467
|
var FormattedCreditCard = function FormattedCreditCard(_ref) {
|
|
26455
26468
|
var lastFour = _ref.lastFour,
|
|
26456
26469
|
type = _ref.type,
|
|
@@ -26458,23 +26471,26 @@ var FormattedCreditCard = function FormattedCreditCard(_ref) {
|
|
|
26458
26471
|
expireDate = _ref.expireDate,
|
|
26459
26472
|
expirationStatus = _ref.expirationStatus,
|
|
26460
26473
|
themeValues = _ref.themeValues;
|
|
26474
|
+
var _useContext = React.useContext(styled.ThemeContext),
|
|
26475
|
+
isMobile = _useContext.isMobile;
|
|
26461
26476
|
return /*#__PURE__*/React__default.createElement(CreditCardWrapper, null, /*#__PURE__*/React__default.createElement(CCIconWrapper, null, /*#__PURE__*/React__default.createElement(CardType, {
|
|
26462
|
-
type: type
|
|
26477
|
+
type: type,
|
|
26478
|
+
size: isMobile ? "small" : "large"
|
|
26463
26479
|
})), /*#__PURE__*/React__default.createElement(Stack, {
|
|
26464
26480
|
childGap: "0"
|
|
26465
26481
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
26466
26482
|
padding: "0"
|
|
26467
26483
|
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
26468
26484
|
variant: "p",
|
|
26469
|
-
padding: "0
|
|
26485
|
+
padding: "0",
|
|
26470
26486
|
color: themeValues.textColor,
|
|
26471
26487
|
textAlign: "left",
|
|
26472
26488
|
extraStyles: "display: inline-block;"
|
|
26473
26489
|
}, "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, {
|
|
26474
26490
|
variant: "p",
|
|
26475
26491
|
color: themeValues.autopayTextColor,
|
|
26476
|
-
extraStyles: "font-style: italic;"
|
|
26477
|
-
}, "Autopay
|
|
26492
|
+
extraStyles: "font-style: italic; font-size: .75rem;"
|
|
26493
|
+
}, "Autopay On")));
|
|
26478
26494
|
};
|
|
26479
26495
|
var FormattedCreditCard$1 = themeComponent(FormattedCreditCard, "FormattedCreditCard", fallbackValues$p);
|
|
26480
26496
|
|
|
@@ -41157,7 +41173,7 @@ var EmailForm = function EmailForm(_ref) {
|
|
|
41157
41173
|
}, []);
|
|
41158
41174
|
}
|
|
41159
41175
|
useConditionallyAddValidator(isRequired, required, actions.fields.email.addValidator, actions.fields.email.removeValidator);
|
|
41160
|
-
var emailFieldErrorMessages = _defineProperty(_defineProperty({}, required.error, "Email address is required"), isProbablyEmail.error, "
|
|
41176
|
+
var emailFieldErrorMessages = _defineProperty(_defineProperty({}, required.error, "Email address is required"), isProbablyEmail.error, "Please enter a valid email address in the format user@example.com");
|
|
41161
41177
|
return /*#__PURE__*/React__default.createElement(FormContainer$1, {
|
|
41162
41178
|
variant: variant,
|
|
41163
41179
|
role: "form",
|
|
@@ -41249,7 +41265,7 @@ var ForgotPasswordForm = function ForgotPasswordForm(_ref) {
|
|
|
41249
41265
|
};
|
|
41250
41266
|
}, []);
|
|
41251
41267
|
}
|
|
41252
|
-
var EmailErrorMessages = _defineProperty(_defineProperty({}, required.error, "Email address is required"), isProbablyEmail.error, "
|
|
41268
|
+
var EmailErrorMessages = _defineProperty(_defineProperty({}, required.error, "Email address is required"), isProbablyEmail.error, "Please enter a valid email address in the format user@example.com");
|
|
41253
41269
|
return /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
41254
41270
|
labelTextWhenNoError: "Email address",
|
|
41255
41271
|
errorMessages: EmailErrorMessages,
|
|
@@ -45948,7 +45964,7 @@ var LoginForm = function LoginForm(_ref) {
|
|
|
45948
45964
|
};
|
|
45949
45965
|
}, []);
|
|
45950
45966
|
}
|
|
45951
|
-
var emailErrorMessages = _defineProperty(_defineProperty({}, required.error, "Email address is required"), isProbablyEmail.error, "
|
|
45967
|
+
var emailErrorMessages = _defineProperty(_defineProperty({}, required.error, "Email address is required"), isProbablyEmail.error, "Please enter a valid email address in the format user@example.com");
|
|
45952
45968
|
var passwordErrorMessages = _defineProperty({}, required.error, "Password is required");
|
|
45953
45969
|
return /*#__PURE__*/React__default.createElement(FormInputColumn, {
|
|
45954
45970
|
role: "form",
|
|
@@ -48076,7 +48092,7 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
|
|
|
48076
48092
|
weight: themeValues.fontWeight,
|
|
48077
48093
|
hoverStyles: themeValues.modalLinkHoverFocus,
|
|
48078
48094
|
textDecoration: themeValues.modalLinkTextDecoration,
|
|
48079
|
-
extraStyles: "display: inline-block; width: fit-content; cursor: pointer",
|
|
48095
|
+
extraStyles: "display: inline-block; width: fit-content; cursor: pointer; min-height: 24px; line-height: 24px;",
|
|
48080
48096
|
role: "button" // This should always be a "button" since it opens a modal
|
|
48081
48097
|
,
|
|
48082
48098
|
className: "modal-trigger"
|
|
@@ -48915,10 +48931,10 @@ var InnerRadioSection = function InnerRadioSection(_ref) {
|
|
|
48915
48931
|
componentId: "sc-1wtp6qc-0"
|
|
48916
48932
|
})(["height:", ";width:", ";", " transition:opacity 0.3s ease;"], function (_ref2) {
|
|
48917
48933
|
var isMobile = _ref2.isMobile;
|
|
48918
|
-
return isMobile ? "
|
|
48934
|
+
return isMobile ? "16px" : "24px";
|
|
48919
48935
|
}, function (_ref3) {
|
|
48920
48936
|
var isMobile = _ref3.isMobile;
|
|
48921
|
-
return isMobile ? "
|
|
48937
|
+
return isMobile ? "24px" : "36px";
|
|
48922
48938
|
}, function (_ref4) {
|
|
48923
48939
|
var fade = _ref4.fade;
|
|
48924
48940
|
return fade && "opacity: 0.4;";
|
|
@@ -48990,7 +49006,7 @@ var InnerRadioSection = function InnerRadioSection(_ref) {
|
|
|
48990
49006
|
padding: section.titleIcon ? "0 0 0 8px" : "0"
|
|
48991
49007
|
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
48992
49008
|
as: "label",
|
|
48993
|
-
htmlFor: "radio-
|
|
49009
|
+
htmlFor: "radio-".concat(idString(section)),
|
|
48994
49010
|
color: CHARADE_GREY
|
|
48995
49011
|
}, section.title))), section.rightIcons && /*#__PURE__*/React__default.createElement(Cluster, {
|
|
48996
49012
|
id: "right-icons-".concat(idString(section)),
|
|
@@ -49321,7 +49337,7 @@ var RegistrationForm = function RegistrationForm(_ref) {
|
|
|
49321
49337
|
}
|
|
49322
49338
|
var firstNameErrorMessages = _defineProperty(_defineProperty({}, required.error, "First name is required"), validName.error, "First name contains invalid characters");
|
|
49323
49339
|
var lastNameErrorMessages = _defineProperty(_defineProperty({}, required.error, "Last name is required"), validName.error, "Last name contains invalid characters");
|
|
49324
|
-
var emailErrorMessages = _defineProperty(_defineProperty({}, required.error, "Email is required"), isProbablyEmail.error, "
|
|
49340
|
+
var emailErrorMessages = _defineProperty(_defineProperty({}, required.error, "Email is required"), isProbablyEmail.error, "Please enter a valid email address in the format user@example.com");
|
|
49325
49341
|
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 (!@#$%^&*.?)");
|
|
49326
49342
|
var confirmPasswordErrorMessages = _defineProperty({}, matchesField.error, "Confirm password must match password");
|
|
49327
49343
|
return /*#__PURE__*/React__default.createElement(FormInputColumn, {
|
|
@@ -50270,6 +50286,7 @@ var DropdownIconV2 = function DropdownIconV2(_ref) {
|
|
|
50270
50286
|
color = _ref$color === void 0 ? "#292A33" : _ref$color,
|
|
50271
50287
|
props = _objectWithoutProperties(_ref, _excluded$Q);
|
|
50272
50288
|
return /*#__PURE__*/React__default.createElement("svg", _extends({
|
|
50289
|
+
"aria-hidden": "true",
|
|
50273
50290
|
width: width,
|
|
50274
50291
|
height: height,
|
|
50275
50292
|
viewBox: "0 0 ".concat(width, " ").concat(height),
|
|
@@ -51452,16 +51469,15 @@ var TurnstileWidget = /*#__PURE__*/React.forwardRef(function (_ref4, ref) {
|
|
|
51452
51469
|
}, error)));
|
|
51453
51470
|
});
|
|
51454
51471
|
|
|
51455
|
-
var hoverColor$6 =
|
|
51456
|
-
var activeColor$b =
|
|
51457
|
-
var linkColor$6 =
|
|
51458
|
-
var
|
|
51459
|
-
var TOOLTIP_THEME_SOURCE = "Button";
|
|
51472
|
+
var hoverColor$6 = ROYAL_BLUE;
|
|
51473
|
+
var activeColor$b = CONGRESS_BLUE;
|
|
51474
|
+
var linkColor$6 = ROYAL_BLUE_VIVID;
|
|
51475
|
+
var textColor$5 = CHARADE_GREY;
|
|
51460
51476
|
var fallbackValues$12 = {
|
|
51461
|
-
borderColor: borderColor$7,
|
|
51462
51477
|
linkColor: linkColor$6,
|
|
51463
51478
|
hoverColor: hoverColor$6,
|
|
51464
|
-
activeColor: activeColor$b
|
|
51479
|
+
activeColor: activeColor$b,
|
|
51480
|
+
textColor: textColor$5
|
|
51465
51481
|
};
|
|
51466
51482
|
|
|
51467
51483
|
var Tooltip = function Tooltip(_ref) {
|
|
@@ -51501,14 +51517,15 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
51501
51517
|
arrowBottom: "-8px",
|
|
51502
51518
|
arrowLeft: "auto"
|
|
51503
51519
|
} : _ref$arrowPosition,
|
|
51504
|
-
|
|
51520
|
+
_ref$backgroundColor = _ref.backgroundColor,
|
|
51521
|
+
backgroundColor = _ref$backgroundColor === void 0 ? WHITE : _ref$backgroundColor;
|
|
51505
51522
|
var closeTimeoutRef = React.useRef(null);
|
|
51506
51523
|
var _useState = React.useState(false),
|
|
51507
51524
|
_useState2 = _slicedToArray(_useState, 2),
|
|
51508
51525
|
tooltipOpen = _useState2[0],
|
|
51509
51526
|
setTooltipOpen = _useState2[1];
|
|
51510
51527
|
var themeContext = React.useContext(styled.ThemeContext);
|
|
51511
|
-
var themeValues = createThemeValues(themeContext, fallbackValues$12,
|
|
51528
|
+
var themeValues = createThemeValues(themeContext, fallbackValues$12, "Tooltip");
|
|
51512
51529
|
var top = contentPosition.top,
|
|
51513
51530
|
right = contentPosition.right,
|
|
51514
51531
|
bottom = contentPosition.bottom,
|
|
@@ -51548,19 +51565,30 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
51548
51565
|
}, []);
|
|
51549
51566
|
var renderTrigger = function renderTrigger() {
|
|
51550
51567
|
if (hasCustomTrigger && children) {
|
|
51551
|
-
|
|
51568
|
+
var _child$props, _child$props2;
|
|
51569
|
+
var child = React__default.Children.only(children);
|
|
51570
|
+
var _ref2 = (_child$props = child.props) !== null && _child$props !== void 0 ? _child$props : {},
|
|
51571
|
+
childOnFocus = _ref2.onFocus,
|
|
51572
|
+
childOnBlur = _ref2.onBlur,
|
|
51573
|
+
childOnKeyDown = _ref2.onKeyDown;
|
|
51574
|
+
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
51552
51575
|
"aria-describedby": tooltipID,
|
|
51553
|
-
onFocus: function onFocus() {
|
|
51554
|
-
|
|
51576
|
+
onFocus: function onFocus(e) {
|
|
51577
|
+
childOnFocus === null || childOnFocus === void 0 || childOnFocus(e);
|
|
51578
|
+
handleToggleTooltip(true);
|
|
51555
51579
|
},
|
|
51556
|
-
onBlur: function onBlur() {
|
|
51557
|
-
|
|
51580
|
+
onBlur: function onBlur(e) {
|
|
51581
|
+
childOnBlur === null || childOnBlur === void 0 || childOnBlur(e);
|
|
51582
|
+
handleToggleTooltip(false);
|
|
51583
|
+
},
|
|
51584
|
+
onKeyDown: function onKeyDown(e) {
|
|
51585
|
+
childOnKeyDown === null || childOnKeyDown === void 0 || childOnKeyDown(e);
|
|
51586
|
+
handleKeyDown(e);
|
|
51558
51587
|
},
|
|
51559
|
-
onKeyDown: handleKeyDown,
|
|
51560
51588
|
tabIndex: "0",
|
|
51561
|
-
style: {
|
|
51589
|
+
style: _objectSpread2(_objectSpread2({}, (_child$props2 = child.props) === null || _child$props2 === void 0 ? void 0 : _child$props2.style), {}, {
|
|
51562
51590
|
cursor: "pointer"
|
|
51563
|
-
}
|
|
51591
|
+
})
|
|
51564
51592
|
});
|
|
51565
51593
|
}
|
|
51566
51594
|
return /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
@@ -51593,19 +51621,19 @@ var Tooltip = function Tooltip(_ref) {
|
|
|
51593
51621
|
role: "tooltip",
|
|
51594
51622
|
id: tooltipID,
|
|
51595
51623
|
"aria-hidden": !tooltipOpen,
|
|
51596
|
-
background:
|
|
51624
|
+
background: backgroundColor,
|
|
51597
51625
|
"data-qa": "tooltip-contents",
|
|
51598
|
-
extraStyles: "\n position: absolute;\n display: ".concat(tooltipOpen ? "block" : "none", ";\n top: ").concat(top, ";\n right: ").concat(right, ";\n bottom: ").concat(bottom, ";\n left: ").concat(left, ";\n height: ").concat(height, ";\n ").concat(contentExtraStyles, "\n "),
|
|
51626
|
+
extraStyles: "\n position: absolute;\n display: ".concat(tooltipOpen ? "block" : "none", ";\n top: ").concat(top, ";\n right: ").concat(right, ";\n bottom: ").concat(bottom, ";\n left: ").concat(left, ";\n height: ").concat(height, ";\n color: ").concat(themeValues.textColor, ";\n ").concat(contentExtraStyles, "\n "),
|
|
51599
51627
|
boxShadow: "0px 2px 14px 0px rgb(246, 246, 249), 0px 3px 8px 0px rgb(202, 206, 216)",
|
|
51600
51628
|
border: "1px solid transparent",
|
|
51601
51629
|
borderRadius: "4px",
|
|
51602
51630
|
minWidth: minWidth,
|
|
51603
51631
|
maxWidth: maxWidth
|
|
51604
51632
|
}, typeof content === "string" ? /*#__PURE__*/React__default.createElement(Text$1, {
|
|
51605
|
-
color: themeValues.
|
|
51633
|
+
color: themeValues.textColor
|
|
51606
51634
|
}, content) : content, /*#__PURE__*/React__default.createElement(Box, {
|
|
51607
51635
|
padding: "0",
|
|
51608
|
-
extraStyles: "\n position: absolute;\n content: \"\";\n width: 0;\n height: 0;\n ".concat(arrowBorder(
|
|
51636
|
+
extraStyles: "\n position: absolute;\n content: \"\";\n width: 0;\n height: 0;\n ".concat(arrowBorder(backgroundColor, arrowDirection, "8px"), ";\n filter: drop-shadow(2px 8px 14px black);\n bottom: ").concat(arrowBottom, ";\n right: ").concat(arrowRight, ";\n top: ").concat(arrowTop, ";\n left: ").concat(arrowLeft, ";\n ")
|
|
51609
51637
|
})));
|
|
51610
51638
|
};
|
|
51611
51639
|
|