@thecb/components 4.0.7-beta.0 → 4.0.11
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 +1328 -318
- package/package.json +2 -1
- package/src/components/atoms/button-with-action/ButtonWithAction.js +3 -1
- package/src/components/atoms/card/Card.js +121 -0
- package/src/components/atoms/card/Card.theme.js +9 -0
- package/src/components/atoms/card/index.js +37 -0
- package/src/components/atoms/heading/Heading.js +1 -1
- package/src/components/atoms/icons/PropertiesAddIcon.js +1 -6
- package/src/components/atoms/index.js +1 -0
- package/src/components/atoms/paragraph/Paragraph.js +2 -0
- package/src/components/atoms/placeholder/Placeholder.js +20 -7
- package/src/components/atoms/text/Text.js +2 -0
- package/src/components/molecules/collapsible-section/CollapsibleSection.js +1 -1
- package/src/components/molecules/editable-list/EditableList.js +0 -1
- package/src/components/molecules/editable-table/TableListItem.js +1 -1
- package/src/components/molecules/index.js +1 -0
- package/src/components/molecules/modal/Modal.js +5 -2
- package/src/components/molecules/obligation/modules/TitleModule.js +2 -2
- package/src/components/molecules/radio-section/RadioSection.js +1 -1
- package/src/components/molecules/welcome-module/WelcomeModule.js +52 -0
- package/src/components/molecules/welcome-module/WelcomeModule.theme.js +15 -0
- package/src/components/molecules/welcome-module/index.js +3 -0
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.esm.js +0 -38375
- package/dist/index.esm.js.map +0 -1
package/dist/index.cjs.js
CHANGED
|
@@ -6119,15 +6119,17 @@ var Text = function Text(_ref) {
|
|
|
6119
6119
|
extraStyles = _ref$extraStyles === void 0 ? "" : _ref$extraStyles,
|
|
6120
6120
|
hoverStyles = _ref.hoverStyles,
|
|
6121
6121
|
onClick = _ref.onClick,
|
|
6122
|
+
as = _ref.as,
|
|
6122
6123
|
dataQa = _ref.dataQa,
|
|
6123
6124
|
children = _ref.children,
|
|
6124
|
-
rest = _objectWithoutProperties(_ref, ["themeValues", "weight", "color", "extraStyles", "hoverStyles", "onClick", "dataQa", "children"]);
|
|
6125
|
+
rest = _objectWithoutProperties(_ref, ["themeValues", "weight", "color", "extraStyles", "hoverStyles", "onClick", "as", "dataQa", "children"]);
|
|
6125
6126
|
|
|
6126
6127
|
return /*#__PURE__*/React__default.createElement(TextSpan, _extends({
|
|
6127
6128
|
fontSize: themeValues.fontSize,
|
|
6128
6129
|
weight: weight,
|
|
6129
6130
|
color: color,
|
|
6130
6131
|
fontFamily: themeValues.fontFamily,
|
|
6132
|
+
as: as,
|
|
6131
6133
|
extraStyles: extraStyles,
|
|
6132
6134
|
hoverStyles: hoverStyles,
|
|
6133
6135
|
onClick: onClick,
|
|
@@ -12630,7 +12632,7 @@ var ButtonWithAction = function ButtonWithAction(_ref) {
|
|
|
12630
12632
|
children = _ref.children;
|
|
12631
12633
|
var themeContext = React.useContext(styled.ThemeContext);
|
|
12632
12634
|
var themeValues = createThemeValues(themeContext, fallbackValues$1, "Button", variant);
|
|
12633
|
-
var loadingExtraStyles = "".concat(extraStyles, "; padding-top: 0.75rem; padding-bottom: 0.75rem;");
|
|
12635
|
+
var loadingExtraStyles = "".concat(extraStyles, "; padding-top: 0.75rem; padding-bottom: 0.75rem; height: ").concat(themeContext.isMobile ? "50px" : "57px", " ");
|
|
12634
12636
|
var hoverStyles = "\n outline: none;\n background-color: ".concat(themeValues.hoverBackgroundColor, ";\n border-color: ").concat(themeValues.hoverBorderColor, ";\n color: ").concat(themeValues.hoverColor, ";\n text-decoration: ").concat(variant === "ghost" || variant === "smallGhost" ? "underline" : "none", ";\n ");
|
|
12635
12637
|
var activeStyles = "\n outline: none;\n background-color: ".concat(themeValues.activeBackgroundColor, ";\n border-color: ").concat(themeValues.activeBorderColor, ";\n color: ").concat(themeValues.activeColor, ";\n text-decoration: ").concat(variant === "ghost" || variant === "smallGhost" ? "underline" : "none", ";\n ");
|
|
12636
12638
|
var disabledStyles = "\n background-clor: #6E727E;\n border-color: #6E727E;\n color: #FFFFFF;\n &:focus {\n box-shadow: 0 0 10px #6E727E;\n outline: none;\n }\n ";
|
|
@@ -13125,10 +13127,7 @@ var PropertiesAddIcon = function PropertiesAddIcon(_ref) {
|
|
|
13125
13127
|
return /*#__PURE__*/React__default.createElement("svg", {
|
|
13126
13128
|
width: 100,
|
|
13127
13129
|
height: 100,
|
|
13128
|
-
viewBox: "0 0
|
|
13129
|
-
style: {
|
|
13130
|
-
paddingLeft: "16px"
|
|
13131
|
-
}
|
|
13130
|
+
viewBox: "0 0 84 100"
|
|
13132
13131
|
}, /*#__PURE__*/React__default.createElement("title", null, "8330C897-662E-49C5-B716-3661563AA1FB@1.00x"), /*#__PURE__*/React__default.createElement("defs", null, /*#__PURE__*/React__default.createElement("path", {
|
|
13133
13132
|
id: "prefix__a",
|
|
13134
13133
|
d: "M0 0h100v100H0z"
|
|
@@ -14340,7 +14339,7 @@ var Heading = function Heading(_ref) {
|
|
|
14340
14339
|
_ref$variant = _ref.variant,
|
|
14341
14340
|
variant = _ref$variant === void 0 ? "h1" : _ref$variant,
|
|
14342
14341
|
_ref$as = _ref.as,
|
|
14343
|
-
as = _ref$as === void 0 ?
|
|
14342
|
+
as = _ref$as === void 0 ? variant : _ref$as,
|
|
14344
14343
|
dataQa = _ref.dataQa,
|
|
14345
14344
|
children = _ref.children,
|
|
14346
14345
|
rest = _objectWithoutProperties(_ref, ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"]);
|
|
@@ -16267,7 +16266,198 @@ var ButtonWithLink = function ButtonWithLink(_ref) {
|
|
|
16267
16266
|
})));
|
|
16268
16267
|
};
|
|
16269
16268
|
|
|
16270
|
-
var backgroundColor$1 =
|
|
16269
|
+
var backgroundColor$1 = WHITE;
|
|
16270
|
+
var iconBackgroundColor = GRECIAN_GREY;
|
|
16271
|
+
var fallbackValues$9 = {
|
|
16272
|
+
backgroundColor: backgroundColor$1,
|
|
16273
|
+
iconBackgroundColor: iconBackgroundColor
|
|
16274
|
+
};
|
|
16275
|
+
|
|
16276
|
+
var MOBILE_WIDTH = 768;
|
|
16277
|
+
|
|
16278
|
+
var throttle = function throttle(delay, fn) {
|
|
16279
|
+
var lastCall = 0;
|
|
16280
|
+
return function () {
|
|
16281
|
+
var now = new Date().getTime();
|
|
16282
|
+
|
|
16283
|
+
if (now - lastCall < delay) {
|
|
16284
|
+
return;
|
|
16285
|
+
}
|
|
16286
|
+
|
|
16287
|
+
lastCall = now;
|
|
16288
|
+
return fn.apply(void 0, arguments);
|
|
16289
|
+
};
|
|
16290
|
+
};
|
|
16291
|
+
|
|
16292
|
+
var withWindowSize = function withWindowSize(Child) {
|
|
16293
|
+
return function (_ref) {
|
|
16294
|
+
var props = _extends({}, _ref);
|
|
16295
|
+
|
|
16296
|
+
var _useState = React.useState({
|
|
16297
|
+
isMobile: window.innerWidth < MOBILE_WIDTH,
|
|
16298
|
+
mobileWidth: MOBILE_WIDTH,
|
|
16299
|
+
supportsTouch: "ontouchstart" in window || navigator.maxTouchPoints > 1
|
|
16300
|
+
}),
|
|
16301
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
16302
|
+
state = _useState2[0],
|
|
16303
|
+
setState = _useState2[1];
|
|
16304
|
+
|
|
16305
|
+
var isMobileRef = React.useRef(state.isMobile);
|
|
16306
|
+
var onResize = throttle(25, function () {
|
|
16307
|
+
var width = window.innerWidth;
|
|
16308
|
+
var newMobileState = width <= MOBILE_WIDTH;
|
|
16309
|
+
|
|
16310
|
+
if (newMobileState !== isMobileRef.current) {
|
|
16311
|
+
isMobileRef.current = newMobileState;
|
|
16312
|
+
setState({
|
|
16313
|
+
isMobile: width <= MOBILE_WIDTH,
|
|
16314
|
+
mobileWidth: MOBILE_WIDTH,
|
|
16315
|
+
supportsTouch: "ontouchstart" in window || navigator.maxTouchPoints > 1
|
|
16316
|
+
});
|
|
16317
|
+
}
|
|
16318
|
+
});
|
|
16319
|
+
React.useLayoutEffect(function () {
|
|
16320
|
+
window.addEventListener("resize", onResize);
|
|
16321
|
+
return function () {
|
|
16322
|
+
window.removeEventListener("resize", onResize);
|
|
16323
|
+
};
|
|
16324
|
+
}, []);
|
|
16325
|
+
return /*#__PURE__*/React__default.createElement(styled.ThemeProvider, {
|
|
16326
|
+
theme: state
|
|
16327
|
+
}, /*#__PURE__*/React__default.createElement(Child, props));
|
|
16328
|
+
};
|
|
16329
|
+
};
|
|
16330
|
+
|
|
16331
|
+
var CardVariantSwitcher = function CardVariantSwitcher(_ref) {
|
|
16332
|
+
var variant = _ref.variant,
|
|
16333
|
+
children = _ref.children;
|
|
16334
|
+
return variant === "vertical" ? /*#__PURE__*/React__default.createElement(React.Fragment, null, children) : /*#__PURE__*/React__default.createElement(Box, {
|
|
16335
|
+
padding: "0",
|
|
16336
|
+
extraStyles: "width: 100%"
|
|
16337
|
+
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
16338
|
+
childGap: "0",
|
|
16339
|
+
maxWidth: "100%",
|
|
16340
|
+
fullHeight: true
|
|
16341
|
+
}, children));
|
|
16342
|
+
};
|
|
16343
|
+
|
|
16344
|
+
var Card = function Card(_ref2) {
|
|
16345
|
+
var themeValues = _ref2.themeValues,
|
|
16346
|
+
icon = _ref2.icon,
|
|
16347
|
+
heading = _ref2.heading,
|
|
16348
|
+
text = _ref2.text,
|
|
16349
|
+
_ref2$cardAction = _ref2.cardAction,
|
|
16350
|
+
cardAction = _ref2$cardAction === void 0 ? "/profile" : _ref2$cardAction,
|
|
16351
|
+
buttonText = _ref2.buttonText,
|
|
16352
|
+
_ref2$variant = _ref2.variant,
|
|
16353
|
+
variant = _ref2$variant === void 0 ? "vertical" : _ref2$variant;
|
|
16354
|
+
|
|
16355
|
+
var _useContext = React.useContext(styled.ThemeContext),
|
|
16356
|
+
isMobile = _useContext.isMobile;
|
|
16357
|
+
|
|
16358
|
+
var navigate = reactRouterDom.useNavigate();
|
|
16359
|
+
|
|
16360
|
+
var renderIcon = function renderIcon(icon) {
|
|
16361
|
+
switch (icon) {
|
|
16362
|
+
case "accounts":
|
|
16363
|
+
return /*#__PURE__*/React__default.createElement(AccountsAddIcon$1, null);
|
|
16364
|
+
|
|
16365
|
+
case "properties":
|
|
16366
|
+
return /*#__PURE__*/React__default.createElement(PropertiesAddIcon$1, null);
|
|
16367
|
+
|
|
16368
|
+
case "payment":
|
|
16369
|
+
return /*#__PURE__*/React__default.createElement(PaymentMethodIcon$1, null);
|
|
16370
|
+
|
|
16371
|
+
default:
|
|
16372
|
+
return /*#__PURE__*/React__default.createElement(PaymentMethodIcon$1, null);
|
|
16373
|
+
}
|
|
16374
|
+
};
|
|
16375
|
+
|
|
16376
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
16377
|
+
background: themeValues.backgroundColor,
|
|
16378
|
+
borderRadius: "4px",
|
|
16379
|
+
boxShadow: " 0px 1px 10px 0px rgb(246, 246, 249), 0px 2px 5px 0px rgb(202, 206, 216)",
|
|
16380
|
+
padding: "0",
|
|
16381
|
+
maxWidth: "100%",
|
|
16382
|
+
minHeight: "100%",
|
|
16383
|
+
minWidth: variant !== "vertical" && "300px"
|
|
16384
|
+
}, /*#__PURE__*/React__default.createElement(Cover, {
|
|
16385
|
+
singleChild: true,
|
|
16386
|
+
fillCenter: true
|
|
16387
|
+
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
16388
|
+
direction: variant === "vertical" ? "column" : "row",
|
|
16389
|
+
justify: variant === "vertical" && "center",
|
|
16390
|
+
fullHeight: true,
|
|
16391
|
+
childGap: "0"
|
|
16392
|
+
}, icon && /*#__PURE__*/React__default.createElement(Box, {
|
|
16393
|
+
padding: "0",
|
|
16394
|
+
background: themeValues.iconBackgroundColor
|
|
16395
|
+
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
16396
|
+
direction: variant === "vertical" ? "row" : "column",
|
|
16397
|
+
justify: "center",
|
|
16398
|
+
fullHeight: true
|
|
16399
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
16400
|
+
padding: variant === "vertical" ? "0.5rem 0" : isMobile ? "1rem 1.5rem" : "2rem 2.5rem"
|
|
16401
|
+
}, renderIcon(icon)))), /*#__PURE__*/React__default.createElement(CardVariantSwitcher, {
|
|
16402
|
+
variant: variant
|
|
16403
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
16404
|
+
padding: "0.5rem 1rem",
|
|
16405
|
+
width: "100%",
|
|
16406
|
+
extraStyles: "flex-grow: 1; width: 100%;"
|
|
16407
|
+
}, /*#__PURE__*/React__default.createElement(Cover, {
|
|
16408
|
+
singleChild: true,
|
|
16409
|
+
fillCenter: true
|
|
16410
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
16411
|
+
padding: "0"
|
|
16412
|
+
}, /*#__PURE__*/React__default.createElement(Heading$1, {
|
|
16413
|
+
variant: "h6"
|
|
16414
|
+
}, heading), /*#__PURE__*/React__default.createElement(Text$1, {
|
|
16415
|
+
variant: "pS"
|
|
16416
|
+
}, text)))), /*#__PURE__*/React__default.createElement(Box, {
|
|
16417
|
+
padding: "0.5rem 1rem 1rem"
|
|
16418
|
+
}, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
16419
|
+
variant: "smallPrimary",
|
|
16420
|
+
text: buttonText,
|
|
16421
|
+
action: function action() {
|
|
16422
|
+
return navigate(cardAction);
|
|
16423
|
+
},
|
|
16424
|
+
extraStyles: "width: 100%;"
|
|
16425
|
+
}))))));
|
|
16426
|
+
};
|
|
16427
|
+
|
|
16428
|
+
var Card$1 = themeComponent(withWindowSize(Card), "Card", fallbackValues$9);
|
|
16429
|
+
|
|
16430
|
+
var cardRegistry = {
|
|
16431
|
+
accounts: function accounts(props) {
|
|
16432
|
+
return /*#__PURE__*/React__default.createElement(Card$1, _extends({
|
|
16433
|
+
icon: "accounts",
|
|
16434
|
+
heading: "Add an Account",
|
|
16435
|
+
buttonText: "Add Account",
|
|
16436
|
+
text: "Add your accounts to this profile to make your payments simple.",
|
|
16437
|
+
cardAction: "/profile/accounts"
|
|
16438
|
+
}, props));
|
|
16439
|
+
},
|
|
16440
|
+
properties: function properties(props) {
|
|
16441
|
+
return /*#__PURE__*/React__default.createElement(Card$1, _extends({
|
|
16442
|
+
icon: "properties",
|
|
16443
|
+
heading: "Add a Property",
|
|
16444
|
+
buttonText: "Add Property",
|
|
16445
|
+
text: "Add a home, car, or other types of personal or business property.",
|
|
16446
|
+
cardAction: "/profile/properties"
|
|
16447
|
+
}, props));
|
|
16448
|
+
},
|
|
16449
|
+
payment: function payment(props) {
|
|
16450
|
+
return /*#__PURE__*/React__default.createElement(Card$1, _extends({
|
|
16451
|
+
icon: "payment",
|
|
16452
|
+
heading: "Add a Payment Method",
|
|
16453
|
+
buttonText: "Add Payment Method",
|
|
16454
|
+
text: "Save cards and/or bank accounts to your profile for fast future payments.",
|
|
16455
|
+
cardAction: "/profile/settings"
|
|
16456
|
+
}, props));
|
|
16457
|
+
}
|
|
16458
|
+
};
|
|
16459
|
+
|
|
16460
|
+
var backgroundColor$2 = {
|
|
16271
16461
|
"default": "".concat(TRANSPARENT)
|
|
16272
16462
|
};
|
|
16273
16463
|
var textFontSize = {
|
|
@@ -16303,8 +16493,8 @@ var checkedStyles = {
|
|
|
16303
16493
|
var defaultStyles = {
|
|
16304
16494
|
"default": "\n background: ".concat(WHITE, "; \n border: 1px solid ").concat(GHOST_GREY, ";\n")
|
|
16305
16495
|
};
|
|
16306
|
-
var fallbackValues$
|
|
16307
|
-
backgroundColor: backgroundColor$
|
|
16496
|
+
var fallbackValues$a = {
|
|
16497
|
+
backgroundColor: backgroundColor$2,
|
|
16308
16498
|
textFontSize: textFontSize,
|
|
16309
16499
|
textFontWeight: textFontWeight,
|
|
16310
16500
|
textLineHeight: textLineHeight,
|
|
@@ -16508,7 +16698,7 @@ var Checkbox = function Checkbox(_ref4) {
|
|
|
16508
16698
|
}, title)));
|
|
16509
16699
|
};
|
|
16510
16700
|
|
|
16511
|
-
var Checkbox$1 = themeComponent(Checkbox, "Checkbox", fallbackValues$
|
|
16701
|
+
var Checkbox$1 = themeComponent(Checkbox, "Checkbox", fallbackValues$a, "default");
|
|
16512
16702
|
|
|
16513
16703
|
var listBackgroundColor = {
|
|
16514
16704
|
"default": "".concat(ATHENS_GREY),
|
|
@@ -16534,7 +16724,7 @@ var radioButtonInactive = {
|
|
|
16534
16724
|
"default": "".concat(GHOST_GREY),
|
|
16535
16725
|
disabled: "".concat(GHOST_GREY)
|
|
16536
16726
|
};
|
|
16537
|
-
var fallbackValues$
|
|
16727
|
+
var fallbackValues$b = {
|
|
16538
16728
|
listBackgroundColor: listBackgroundColor,
|
|
16539
16729
|
listItemColor: listItemColor,
|
|
16540
16730
|
listItemBackgroundColor: listItemBackgroundColor,
|
|
@@ -16738,7 +16928,7 @@ var CheckboxList = function CheckboxList(_ref2) {
|
|
|
16738
16928
|
})));
|
|
16739
16929
|
};
|
|
16740
16930
|
|
|
16741
|
-
var CheckboxList$1 = themeComponent(CheckboxList, "CheckboxList", fallbackValues$
|
|
16931
|
+
var CheckboxList$1 = themeComponent(CheckboxList, "CheckboxList", fallbackValues$b, "default");
|
|
16742
16932
|
|
|
16743
16933
|
var DropdownIcon = function DropdownIcon() {
|
|
16744
16934
|
return /*#__PURE__*/React__default.createElement("svg", {
|
|
@@ -16768,7 +16958,7 @@ var DropdownIcon = function DropdownIcon() {
|
|
|
16768
16958
|
|
|
16769
16959
|
var selectedColor = "".concat(MATISSE_BLUE);
|
|
16770
16960
|
var hoverColor$3 = "".concat(HOVER_LIGHT_BLUE);
|
|
16771
|
-
var fallbackValues$
|
|
16961
|
+
var fallbackValues$c = {
|
|
16772
16962
|
selectedColor: selectedColor,
|
|
16773
16963
|
hoverColor: hoverColor$3
|
|
16774
16964
|
};
|
|
@@ -17045,7 +17235,7 @@ var Dropdown = function Dropdown(_ref7) {
|
|
|
17045
17235
|
}))) : /*#__PURE__*/React__default.createElement(React.Fragment, null));
|
|
17046
17236
|
};
|
|
17047
17237
|
|
|
17048
|
-
var Dropdown$1 = themeComponent(Dropdown, "Dropdown", fallbackValues$
|
|
17238
|
+
var Dropdown$1 = themeComponent(Dropdown, "Dropdown", fallbackValues$c);
|
|
17049
17239
|
|
|
17050
17240
|
function _templateObject4$3() {
|
|
17051
17241
|
var data = _taggedTemplateLiteral([""]);
|
|
@@ -17921,10 +18111,10 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
17921
18111
|
});
|
|
17922
18112
|
};
|
|
17923
18113
|
|
|
17924
|
-
var backgroundColor$
|
|
18114
|
+
var backgroundColor$3 = WHITE;
|
|
17925
18115
|
var boxShadow = "0px 2px 14px 0px ".concat(ATHENS_GREY, ", 0px 3px 8px 0px ").concat(GHOST_GREY);
|
|
17926
|
-
var fallbackValues$
|
|
17927
|
-
backgroundColor: backgroundColor$
|
|
18116
|
+
var fallbackValues$d = {
|
|
18117
|
+
backgroundColor: backgroundColor$3,
|
|
17928
18118
|
boxShadow: boxShadow
|
|
17929
18119
|
};
|
|
17930
18120
|
|
|
@@ -17944,7 +18134,7 @@ var DisplayBox = function DisplayBox(_ref) {
|
|
|
17944
18134
|
}, children));
|
|
17945
18135
|
};
|
|
17946
18136
|
|
|
17947
|
-
var DisplayBox$1 = themeComponent(DisplayBox, "DisplayBox", fallbackValues$
|
|
18137
|
+
var DisplayBox$1 = themeComponent(DisplayBox, "DisplayBox", fallbackValues$d);
|
|
17948
18138
|
|
|
17949
18139
|
var fontFamily$3 = {
|
|
17950
18140
|
p: "Public Sans",
|
|
@@ -17962,7 +18152,7 @@ var fontSize$4 = {
|
|
|
17962
18152
|
pXXS: "0.65rem",
|
|
17963
18153
|
pXL: "1.5rem"
|
|
17964
18154
|
};
|
|
17965
|
-
var fallbackValues$
|
|
18155
|
+
var fallbackValues$e = {
|
|
17966
18156
|
fontFamily: fontFamily$3,
|
|
17967
18157
|
fontSize: fontSize$4
|
|
17968
18158
|
};
|
|
@@ -18008,7 +18198,8 @@ var Paragraph = function Paragraph(_ref) {
|
|
|
18008
18198
|
extraStyles = _ref$extraStyles === void 0 ? "" : _ref$extraStyles,
|
|
18009
18199
|
dataQa = _ref.dataQa,
|
|
18010
18200
|
children = _ref.children,
|
|
18011
|
-
|
|
18201
|
+
as = _ref.as,
|
|
18202
|
+
rest = _objectWithoutProperties(_ref, ["themeValues", "weight", "color", "margin", "extraStyles", "dataQa", "children", "as"]);
|
|
18012
18203
|
|
|
18013
18204
|
return /*#__PURE__*/React__default.createElement(ParagraphText, _extends({
|
|
18014
18205
|
weight: weight,
|
|
@@ -18016,12 +18207,13 @@ var Paragraph = function Paragraph(_ref) {
|
|
|
18016
18207
|
margin: margin,
|
|
18017
18208
|
fontFamily: themeValues.fontFamily,
|
|
18018
18209
|
fontSize: themeValues.fontSize,
|
|
18210
|
+
as: as,
|
|
18019
18211
|
extraStyles: extraStyles,
|
|
18020
18212
|
"data-qa": dataQa
|
|
18021
18213
|
}, rest), safeChildren(children, /*#__PURE__*/React__default.createElement("span", null)));
|
|
18022
18214
|
};
|
|
18023
18215
|
|
|
18024
|
-
var Paragraph$1 = themeComponent(Paragraph, "Paragraph", fallbackValues$
|
|
18216
|
+
var Paragraph$1 = themeComponent(Paragraph, "Paragraph", fallbackValues$e, "p");
|
|
18025
18217
|
|
|
18026
18218
|
var DisplayCard = function DisplayCard(_ref) {
|
|
18027
18219
|
var title = _ref.title,
|
|
@@ -18414,7 +18606,7 @@ var hoverFocusStyles = {
|
|
|
18414
18606
|
"default": "color: #0E506D; outline: none; text-decoration: underline; ",
|
|
18415
18607
|
disabled: "color: #6E727E;"
|
|
18416
18608
|
};
|
|
18417
|
-
var fallbackValues$
|
|
18609
|
+
var fallbackValues$f = {
|
|
18418
18610
|
linkColor: linkColor,
|
|
18419
18611
|
formBackgroundColor: formBackgroundColor,
|
|
18420
18612
|
inputBackgroundColor: inputBackgroundColor,
|
|
@@ -18641,7 +18833,7 @@ var FormInput = function FormInput(_ref13) {
|
|
|
18641
18833
|
}, decorator)));
|
|
18642
18834
|
};
|
|
18643
18835
|
|
|
18644
|
-
var FormInput$1 = themeComponent(FormInput, "FormInput", fallbackValues$
|
|
18836
|
+
var FormInput$1 = themeComponent(FormInput, "FormInput", fallbackValues$f, "default");
|
|
18645
18837
|
|
|
18646
18838
|
var FormInputRow = function FormInputRow(_ref) {
|
|
18647
18839
|
var _ref$breakpoint = _ref.breakpoint,
|
|
@@ -18676,61 +18868,6 @@ var FormInputColumn = function FormInputColumn(_ref) {
|
|
|
18676
18868
|
}, rest), children);
|
|
18677
18869
|
};
|
|
18678
18870
|
|
|
18679
|
-
var MOBILE_WIDTH = 768;
|
|
18680
|
-
|
|
18681
|
-
var throttle = function throttle(delay, fn) {
|
|
18682
|
-
var lastCall = 0;
|
|
18683
|
-
return function () {
|
|
18684
|
-
var now = new Date().getTime();
|
|
18685
|
-
|
|
18686
|
-
if (now - lastCall < delay) {
|
|
18687
|
-
return;
|
|
18688
|
-
}
|
|
18689
|
-
|
|
18690
|
-
lastCall = now;
|
|
18691
|
-
return fn.apply(void 0, arguments);
|
|
18692
|
-
};
|
|
18693
|
-
};
|
|
18694
|
-
|
|
18695
|
-
var withWindowSize = function withWindowSize(Child) {
|
|
18696
|
-
return function (_ref) {
|
|
18697
|
-
var props = _extends({}, _ref);
|
|
18698
|
-
|
|
18699
|
-
var _useState = React.useState({
|
|
18700
|
-
isMobile: window.innerWidth < MOBILE_WIDTH,
|
|
18701
|
-
mobileWidth: MOBILE_WIDTH,
|
|
18702
|
-
supportsTouch: "ontouchstart" in window || navigator.maxTouchPoints > 1
|
|
18703
|
-
}),
|
|
18704
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
18705
|
-
state = _useState2[0],
|
|
18706
|
-
setState = _useState2[1];
|
|
18707
|
-
|
|
18708
|
-
var isMobileRef = React.useRef(state.isMobile);
|
|
18709
|
-
var onResize = throttle(25, function () {
|
|
18710
|
-
var width = window.innerWidth;
|
|
18711
|
-
var newMobileState = width <= MOBILE_WIDTH;
|
|
18712
|
-
|
|
18713
|
-
if (newMobileState !== isMobileRef.current) {
|
|
18714
|
-
isMobileRef.current = newMobileState;
|
|
18715
|
-
setState({
|
|
18716
|
-
isMobile: width <= MOBILE_WIDTH,
|
|
18717
|
-
mobileWidth: MOBILE_WIDTH,
|
|
18718
|
-
supportsTouch: "ontouchstart" in window || navigator.maxTouchPoints > 1
|
|
18719
|
-
});
|
|
18720
|
-
}
|
|
18721
|
-
});
|
|
18722
|
-
React.useLayoutEffect(function () {
|
|
18723
|
-
window.addEventListener("resize", onResize);
|
|
18724
|
-
return function () {
|
|
18725
|
-
window.removeEventListener("resize", onResize);
|
|
18726
|
-
};
|
|
18727
|
-
}, []);
|
|
18728
|
-
return /*#__PURE__*/React__default.createElement(styled.ThemeProvider, {
|
|
18729
|
-
theme: state
|
|
18730
|
-
}, /*#__PURE__*/React__default.createElement(Child, props));
|
|
18731
|
-
};
|
|
18732
|
-
};
|
|
18733
|
-
|
|
18734
18871
|
var FormContainer = function FormContainer(_ref) {
|
|
18735
18872
|
var themeValues = _ref.themeValues,
|
|
18736
18873
|
children = _ref.children,
|
|
@@ -18746,7 +18883,7 @@ var FormContainer = function FormContainer(_ref) {
|
|
|
18746
18883
|
}, rest), children);
|
|
18747
18884
|
};
|
|
18748
18885
|
|
|
18749
|
-
var FormContainer$1 = themeComponent(withWindowSize(FormContainer), "FormContainer", fallbackValues$
|
|
18886
|
+
var FormContainer$1 = themeComponent(withWindowSize(FormContainer), "FormContainer", fallbackValues$f, "default");
|
|
18750
18887
|
|
|
18751
18888
|
var fontSize$6 = {
|
|
18752
18889
|
"default": "1rem",
|
|
@@ -18760,7 +18897,7 @@ var color$6 = {
|
|
|
18760
18897
|
"default": "".concat(CHARADE_GREY),
|
|
18761
18898
|
radio: "".concat(MINESHAFT_GREY)
|
|
18762
18899
|
};
|
|
18763
|
-
var fallbackValues$
|
|
18900
|
+
var fallbackValues$g = {
|
|
18764
18901
|
fontSize: fontSize$6,
|
|
18765
18902
|
padding: padding$1,
|
|
18766
18903
|
color: color$6
|
|
@@ -18803,11 +18940,11 @@ var FormattedAddress = function FormattedAddress(_ref) {
|
|
|
18803
18940
|
}, city, ", ", stateProvince, " ".concat(zip), country ? " ".concat(country) : "")));
|
|
18804
18941
|
};
|
|
18805
18942
|
|
|
18806
|
-
var FormattedAddress$1 = themeComponent(FormattedAddress, "FormattedAddress", fallbackValues$
|
|
18943
|
+
var FormattedAddress$1 = themeComponent(FormattedAddress, "FormattedAddress", fallbackValues$g, "default");
|
|
18807
18944
|
|
|
18808
18945
|
var textColor$1 = "".concat(CHARADE_GREY);
|
|
18809
18946
|
var autopayTextColor = "".concat(REGENT_GREY);
|
|
18810
|
-
var fallbackValues$
|
|
18947
|
+
var fallbackValues$h = {
|
|
18811
18948
|
textColor: textColor$1,
|
|
18812
18949
|
autopayTextColor: autopayTextColor
|
|
18813
18950
|
};
|
|
@@ -18860,7 +18997,7 @@ var FormattedCreditCard = function FormattedCreditCard(_ref) {
|
|
|
18860
18997
|
}, "Autopay Enabled")));
|
|
18861
18998
|
};
|
|
18862
18999
|
|
|
18863
|
-
var FormattedCreditCard$1 = themeComponent(FormattedCreditCard, "FormattedCreditCard", fallbackValues$
|
|
19000
|
+
var FormattedCreditCard$1 = themeComponent(FormattedCreditCard, "FormattedCreditCard", fallbackValues$h, "default");
|
|
18864
19001
|
|
|
18865
19002
|
function _templateObject3$8() {
|
|
18866
19003
|
var data = _taggedTemplateLiteral(["\n display: block;\n top: auto;\n bottom: 6px;\n left: 2px;\n transition-duration: 0.13s;\n transition-delay: 0.13s;\n transition-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n margin-top: 12px;\n background-color: ", ";\n\n &, &::before, &::after {\n background-color: ", ";\n width: 30px;\n height: 3px;\n position: absolute;\n transition-property: transform;\n transition-duration: 0.15s;\n transition-timing-function: ease;\n }\n\n &::before, &::after {\n content: \"\";\n display: block;\n }\n\n &::before {\n top: -10px;\n transition: top 0.12s 0.2s cubic-bezier(0.33333, 0.66667, 0.66667, 1), \n transform 0.13s cubic-bezier(0.55, 0.055, 0.675, 0.19);\n }\n\n &::after {\n bottom: -10px;\n top: -20px;\n transition: top 0.2s 0.2s cubic-bezier(0.33333, 0.66667, 0.66667, 1), \n opacity 0.1s linear;\n }\n\n &.active, &.active::before, &.active::after {\n background-color: ", ";\n }\n\n &.active {\n transform: translate3d(0, -10px, 0) rotate(-45deg);\n transition-delay: 0.22s;\n transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n\n &.active::after {\n top: 0;\n opacity: 0;\n transition: top 0.2s cubic-bezier(0.33333, 0, 0.66667, 0.33333), \n opacity: 0.1s 0.22s linear;\n }\n\n &.active::before {\n top: 0;\n transform: rotate(-90deg);\n transition: top 0.1s 0.16s cubic-bezier(0.33333, 0, 0.66667, 0.33333), \n transform 0.13s 0.25s cubic-bezier(0.215, 0.61, 0.355, 1);\n }\n"]);
|
|
@@ -18983,7 +19120,7 @@ var fontWeight$3 = {
|
|
|
18983
19120
|
pL: "600",
|
|
18984
19121
|
h6: "700"
|
|
18985
19122
|
};
|
|
18986
|
-
var fallbackValues$
|
|
19123
|
+
var fallbackValues$i = {
|
|
18987
19124
|
fontWeight: fontWeight$3
|
|
18988
19125
|
};
|
|
18989
19126
|
|
|
@@ -19010,7 +19147,7 @@ var LabeledAmount = function LabeledAmount(_ref) {
|
|
|
19010
19147
|
}, amount));
|
|
19011
19148
|
};
|
|
19012
19149
|
|
|
19013
|
-
var LabeledAmount$1 = themeComponent(LabeledAmount, "LabeledAmount", fallbackValues$
|
|
19150
|
+
var LabeledAmount$1 = themeComponent(LabeledAmount, "LabeledAmount", fallbackValues$i, "default");
|
|
19014
19151
|
|
|
19015
19152
|
var weightTitle = {
|
|
19016
19153
|
"default": "600",
|
|
@@ -19020,7 +19157,7 @@ var paragraphVariant = {
|
|
|
19020
19157
|
"default": "pL",
|
|
19021
19158
|
small: "p"
|
|
19022
19159
|
};
|
|
19023
|
-
var fallbackValues$
|
|
19160
|
+
var fallbackValues$j = {
|
|
19024
19161
|
weightTitle: weightTitle,
|
|
19025
19162
|
paragraphVariant: paragraphVariant
|
|
19026
19163
|
};
|
|
@@ -19049,10 +19186,10 @@ var LineItem = function LineItem(_ref) {
|
|
|
19049
19186
|
}, amount));
|
|
19050
19187
|
};
|
|
19051
19188
|
|
|
19052
|
-
var LineItem$1 = themeComponent(LineItem, "LineItem", fallbackValues$
|
|
19189
|
+
var LineItem$1 = themeComponent(LineItem, "LineItem", fallbackValues$j, "default");
|
|
19053
19190
|
|
|
19054
19191
|
var color$7 = "#15749D";
|
|
19055
|
-
var fallbackValues$
|
|
19192
|
+
var fallbackValues$k = {
|
|
19056
19193
|
color: color$7
|
|
19057
19194
|
};
|
|
19058
19195
|
|
|
@@ -19104,7 +19241,7 @@ var Spinner$1 = function Spinner(_ref4) {
|
|
|
19104
19241
|
})));
|
|
19105
19242
|
};
|
|
19106
19243
|
|
|
19107
|
-
var Spinner$2 = themeComponent(Spinner$1, "Spinner", fallbackValues$
|
|
19244
|
+
var Spinner$2 = themeComponent(Spinner$1, "Spinner", fallbackValues$k);
|
|
19108
19245
|
|
|
19109
19246
|
var Loading = function Loading() {
|
|
19110
19247
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -19349,174 +19486,986 @@ function _templateObject2$h() {
|
|
|
19349
19486
|
return data;
|
|
19350
19487
|
};
|
|
19351
19488
|
|
|
19352
|
-
return data;
|
|
19489
|
+
return data;
|
|
19490
|
+
}
|
|
19491
|
+
|
|
19492
|
+
function _templateObject$t() {
|
|
19493
|
+
var data = _taggedTemplateLiteral(["", " is too short"]);
|
|
19494
|
+
|
|
19495
|
+
_templateObject$t = function _templateObject() {
|
|
19496
|
+
return data;
|
|
19497
|
+
};
|
|
19498
|
+
|
|
19499
|
+
return data;
|
|
19500
|
+
}
|
|
19501
|
+
|
|
19502
|
+
var MIN_LENGTH_ERROR = "error/HAS_LENGTH";
|
|
19503
|
+
var MAX_LENGTH_ERROR = "max_length_error";
|
|
19504
|
+
var EXACT_LENGTH_ERROR = "exact_length_error";
|
|
19505
|
+
var MULTIPLE_LENGTHS_ERROR = "multiple_lengths_error";
|
|
19506
|
+
var EMAIL_ERROR = "email_error";
|
|
19507
|
+
var HAS_NUMBER_ERROR = "error/HAS_NUMBER";
|
|
19508
|
+
var HAS_UPPERCASE_LETTER_ERROR = "error/HAS_UPPERCASE_LETTER";
|
|
19509
|
+
var HAS_LOWERCASE_LETTER_ERROR = "error/HAS_LOWERCASE_LETTER";
|
|
19510
|
+
var HAS_SPECIAL_CHARACTER_ERROR = "error/HAS_SPECIAL_CHARACTER";
|
|
19511
|
+
var ONLY_NUMBERS_ERROR = "only_numbers_error";
|
|
19512
|
+
var ONLY_LETTERS_ERROR = "only_letters_error";
|
|
19513
|
+
var REQUIRED_FIELD_ERROR = "required_field_error";
|
|
19514
|
+
var NUM_GREATER_THAN_ERROR = "num_greater_than_error";
|
|
19515
|
+
var NUM_LESS_THAN_ERROR = "num_less_than_error";
|
|
19516
|
+
var MATCHES_FIELD_ERROR = "matches_field_error";
|
|
19517
|
+
var VALID_SELECT_OPTION_ERROR = "valid_select_option_error"; // Array<String>, Array<String> -> Object -> String
|
|
19518
|
+
|
|
19519
|
+
var genErrorMessage = function genErrorMessage(strings) {
|
|
19520
|
+
for (var _len = arguments.length, argKeys = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
19521
|
+
argKeys[_key - 1] = arguments[_key];
|
|
19522
|
+
}
|
|
19523
|
+
|
|
19524
|
+
return function (inputState) {
|
|
19525
|
+
return strings.reduce(function (accum, current, index) {
|
|
19526
|
+
return "".concat(accum).concat(current).concat(argKeys[index] ? pathOr("", [argKeys[index]], inputState) : "");
|
|
19527
|
+
}, []);
|
|
19528
|
+
};
|
|
19529
|
+
};
|
|
19530
|
+
/*
|
|
19531
|
+
What's going on here? This looks weird, you may ask...
|
|
19532
|
+
DEFAULT_ERROR_MESSAGES is a map between the error constants (which are returned by validators)
|
|
19533
|
+
and some tagged template literals.
|
|
19534
|
+
In this case, the template tag function is curried and returns a function which accepts an args object
|
|
19535
|
+
I'm calling that object inputState, but it could really be anything.
|
|
19536
|
+
When the error message string fucntion is called with that arg, it's reduced to produce a custom error message
|
|
19537
|
+
with interpolation.
|
|
19538
|
+
*/
|
|
19539
|
+
|
|
19540
|
+
|
|
19541
|
+
var DEFAULT_ERROR_MESSAGES = (_DEFAULT_ERROR_MESSAG = {}, _defineProperty(_DEFAULT_ERROR_MESSAG, MIN_LENGTH_ERROR, genErrorMessage(_templateObject$t(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, MAX_LENGTH_ERROR, genErrorMessage(_templateObject2$h(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, EXACT_LENGTH_ERROR, genErrorMessage(_templateObject3$9(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, MULTIPLE_LENGTHS_ERROR, genErrorMessage(_templateObject4$5(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, EMAIL_ERROR, genErrorMessage(_templateObject5$2(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, HAS_NUMBER_ERROR, genErrorMessage(_templateObject6$2(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, HAS_UPPERCASE_LETTER_ERROR, genErrorMessage(_templateObject7$1(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, HAS_LOWERCASE_LETTER_ERROR, genErrorMessage(_templateObject8$1(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, HAS_SPECIAL_CHARACTER_ERROR, genErrorMessage(_templateObject9$1(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, ONLY_NUMBERS_ERROR, genErrorMessage(_templateObject10$1(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, ONLY_LETTERS_ERROR, genErrorMessage(_templateObject11$1(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, REQUIRED_FIELD_ERROR, genErrorMessage(_templateObject12(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, NUM_GREATER_THAN_ERROR, genErrorMessage(_templateObject13(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, NUM_LESS_THAN_ERROR, genErrorMessage(_templateObject14(), "fieldLabel")), _defineProperty(_DEFAULT_ERROR_MESSAG, MATCHES_FIELD_ERROR, genErrorMessage(_templateObject15(), "fieldLabel", "matchField")), _defineProperty(_DEFAULT_ERROR_MESSAG, VALID_SELECT_OPTION_ERROR, genErrorMessage(_templateObject16(), "fieldLabel")), _DEFAULT_ERROR_MESSAG); // Constants to represent an input's state
|
|
19542
|
+
// Neutral - has not been validated
|
|
19543
|
+
// Invalid - has been validated and has an error
|
|
19544
|
+
// Valid - has been validated and has no error
|
|
19545
|
+
|
|
19546
|
+
var INPUT_STATE_NEUTRAL = "NEUTRAL";
|
|
19547
|
+
var INPUT_STATE_INVALID = "INVALID";
|
|
19548
|
+
var INPUT_STATE_VALID = "VALID"; // Function to check the state of an input
|
|
19549
|
+
// This function is intended to be used with inputs that have multiple validators
|
|
19550
|
+
// Takes an input's state value, destructures for the input's error and showError booleans, list of errors
|
|
19551
|
+
// Also takes a list of the specific error constants to look for
|
|
19552
|
+
// If the input's showError property is false, the input has not been validated, and input state is NEUTRAL
|
|
19553
|
+
// If the input has an error, and showError is true, check if the errors we care about are in the input's error list
|
|
19554
|
+
// If yes, input state is INVALID
|
|
19555
|
+
// If input has no error and showError is true, or the errors we're looking for aren't present in the list
|
|
19556
|
+
// then input state is VALID
|
|
19557
|
+
// { error: Boolean, showError: Boolean, errorsList: Array<String> }, Array<String> -> String
|
|
19558
|
+
|
|
19559
|
+
var getInputState = function getInputState(_ref) {
|
|
19560
|
+
var dirty = _ref.dirty,
|
|
19561
|
+
hasErrors = _ref.hasErrors,
|
|
19562
|
+
errors = _ref.errors,
|
|
19563
|
+
rawValue = _ref.rawValue;
|
|
19564
|
+
var errorsToCheck = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
19565
|
+
|
|
19566
|
+
if (!dirty) {
|
|
19567
|
+
return INPUT_STATE_NEUTRAL;
|
|
19568
|
+
} else if (dirty && rawValue === "" || hasErrors && errorsToCheck.some(function (error) {
|
|
19569
|
+
return errors.includes(error);
|
|
19570
|
+
})) {
|
|
19571
|
+
return INPUT_STATE_INVALID;
|
|
19572
|
+
}
|
|
19573
|
+
|
|
19574
|
+
return INPUT_STATE_VALID;
|
|
19575
|
+
};
|
|
19576
|
+
|
|
19577
|
+
var PasswordRequirements = function PasswordRequirements(_ref) {
|
|
19578
|
+
var _iconMap;
|
|
19579
|
+
|
|
19580
|
+
var password = _ref.password,
|
|
19581
|
+
isMobile = _ref.isMobile;
|
|
19582
|
+
var iconMap = (_iconMap = {}, _defineProperty(_iconMap, INPUT_STATE_NEUTRAL, {
|
|
19583
|
+
icon: /*#__PURE__*/React__default.createElement(IconNeutral, {
|
|
19584
|
+
margin: "0.125rem 0.5rem 0 0"
|
|
19585
|
+
}),
|
|
19586
|
+
color: MINESHAFT_GREY
|
|
19587
|
+
}), _defineProperty(_iconMap, INPUT_STATE_INVALID, {
|
|
19588
|
+
icon: /*#__PURE__*/React__default.createElement(IconInvalid, {
|
|
19589
|
+
margin: "0.125rem 0.5rem 0 0"
|
|
19590
|
+
}),
|
|
19591
|
+
color: RAZZMATAZZ_RED
|
|
19592
|
+
}), _defineProperty(_iconMap, INPUT_STATE_VALID, {
|
|
19593
|
+
icon: /*#__PURE__*/React__default.createElement(IconValid, {
|
|
19594
|
+
margin: "0.125rem 0.5rem 0 0"
|
|
19595
|
+
}),
|
|
19596
|
+
color: FOREST_GREEN
|
|
19597
|
+
}), _iconMap);
|
|
19598
|
+
var validationMap = {
|
|
19599
|
+
charactersValidation: {
|
|
19600
|
+
validationMessage: "Password must be 8 characters",
|
|
19601
|
+
validationRequirement: [MIN_LENGTH_ERROR]
|
|
19602
|
+
},
|
|
19603
|
+
numbersValidation: {
|
|
19604
|
+
validationMessage: "Password must contain at least one number",
|
|
19605
|
+
validationRequirement: [HAS_NUMBER_ERROR]
|
|
19606
|
+
},
|
|
19607
|
+
letterCaseValidation: {
|
|
19608
|
+
validationMessage: "Password must contain an upper and lower case letter",
|
|
19609
|
+
validationRequirement: [HAS_UPPERCASE_LETTER_ERROR, HAS_LOWERCASE_LETTER_ERROR]
|
|
19610
|
+
},
|
|
19611
|
+
specialCharacterValidation: {
|
|
19612
|
+
validationMessage: "Password must contain a special character (!@#$%^&*.?)",
|
|
19613
|
+
validationRequirement: [HAS_SPECIAL_CHARACTER_ERROR]
|
|
19614
|
+
}
|
|
19615
|
+
};
|
|
19616
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
19617
|
+
background: ATHENS_GREY,
|
|
19618
|
+
padding: isMobile ? "1rem" : "1.5rem",
|
|
19619
|
+
width: "100%"
|
|
19620
|
+
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
19621
|
+
justify: "center",
|
|
19622
|
+
align: "center"
|
|
19623
|
+
}, /*#__PURE__*/React__default.createElement(Stack, null, Object.values(validationMap).map(function (item) {
|
|
19624
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
19625
|
+
padding: "0",
|
|
19626
|
+
key: item.validationMessage
|
|
19627
|
+
}, /*#__PURE__*/React__default.createElement(Sidebar, {
|
|
19628
|
+
width: "24px",
|
|
19629
|
+
childGap: "0rem"
|
|
19630
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
19631
|
+
padding: "0",
|
|
19632
|
+
minHeight: "100%"
|
|
19633
|
+
}, /*#__PURE__*/React__default.createElement(Cover, {
|
|
19634
|
+
minHeight: "100%",
|
|
19635
|
+
singleChild: true
|
|
19636
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
19637
|
+
padding: "0"
|
|
19638
|
+
}, iconMap[getInputState(password, item.validationRequirement)].icon))), /*#__PURE__*/React__default.createElement(Box, {
|
|
19639
|
+
padding: "0"
|
|
19640
|
+
}, /*#__PURE__*/React__default.createElement(Sidebar, {
|
|
19641
|
+
onRight: true,
|
|
19642
|
+
childGap: "0rem"
|
|
19643
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
19644
|
+
padding: "0rem"
|
|
19645
|
+
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
19646
|
+
justify: "flex-start",
|
|
19647
|
+
align: "center"
|
|
19648
|
+
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
19649
|
+
fullHeight: true,
|
|
19650
|
+
childGap: "0.25rem"
|
|
19651
|
+
}, /*#__PURE__*/React__default.createElement(Paragraph$1, {
|
|
19652
|
+
variant: "pS",
|
|
19653
|
+
color: iconMap[getInputState(password, item.validationRequirement)].color
|
|
19654
|
+
}, item.validationMessage))))))));
|
|
19655
|
+
}))));
|
|
19656
|
+
};
|
|
19657
|
+
|
|
19658
|
+
function _extends$1() {
|
|
19659
|
+
_extends$1 = Object.assign || function (target) {
|
|
19660
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
19661
|
+
var source = arguments[i];
|
|
19662
|
+
|
|
19663
|
+
for (var key in source) {
|
|
19664
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
19665
|
+
target[key] = source[key];
|
|
19666
|
+
}
|
|
19667
|
+
}
|
|
19668
|
+
}
|
|
19669
|
+
|
|
19670
|
+
return target;
|
|
19671
|
+
};
|
|
19672
|
+
|
|
19673
|
+
return _extends$1.apply(this, arguments);
|
|
19674
|
+
}
|
|
19675
|
+
|
|
19676
|
+
function _assertThisInitialized(self) {
|
|
19677
|
+
if (self === void 0) {
|
|
19678
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
19679
|
+
}
|
|
19680
|
+
|
|
19681
|
+
return self;
|
|
19682
|
+
}
|
|
19683
|
+
|
|
19684
|
+
function _inheritsLoose(subClass, superClass) {
|
|
19685
|
+
subClass.prototype = Object.create(superClass.prototype);
|
|
19686
|
+
subClass.prototype.constructor = subClass;
|
|
19687
|
+
subClass.__proto__ = superClass;
|
|
19688
|
+
}
|
|
19689
|
+
|
|
19690
|
+
function _getPrototypeOf(o) {
|
|
19691
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
19692
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
19693
|
+
};
|
|
19694
|
+
return _getPrototypeOf(o);
|
|
19695
|
+
}
|
|
19696
|
+
|
|
19697
|
+
function _setPrototypeOf(o, p) {
|
|
19698
|
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
19699
|
+
o.__proto__ = p;
|
|
19700
|
+
return o;
|
|
19701
|
+
};
|
|
19702
|
+
|
|
19703
|
+
return _setPrototypeOf(o, p);
|
|
19704
|
+
}
|
|
19705
|
+
|
|
19706
|
+
function _isNativeFunction(fn) {
|
|
19707
|
+
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
19708
|
+
}
|
|
19709
|
+
|
|
19710
|
+
function _isNativeReflectConstruct() {
|
|
19711
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
19712
|
+
if (Reflect.construct.sham) return false;
|
|
19713
|
+
if (typeof Proxy === "function") return true;
|
|
19714
|
+
|
|
19715
|
+
try {
|
|
19716
|
+
Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
|
|
19717
|
+
return true;
|
|
19718
|
+
} catch (e) {
|
|
19719
|
+
return false;
|
|
19720
|
+
}
|
|
19721
|
+
}
|
|
19722
|
+
|
|
19723
|
+
function _construct(Parent, args, Class) {
|
|
19724
|
+
if (_isNativeReflectConstruct()) {
|
|
19725
|
+
_construct = Reflect.construct;
|
|
19726
|
+
} else {
|
|
19727
|
+
_construct = function _construct(Parent, args, Class) {
|
|
19728
|
+
var a = [null];
|
|
19729
|
+
a.push.apply(a, args);
|
|
19730
|
+
var Constructor = Function.bind.apply(Parent, a);
|
|
19731
|
+
var instance = new Constructor();
|
|
19732
|
+
if (Class) _setPrototypeOf(instance, Class.prototype);
|
|
19733
|
+
return instance;
|
|
19734
|
+
};
|
|
19735
|
+
}
|
|
19736
|
+
|
|
19737
|
+
return _construct.apply(null, arguments);
|
|
19738
|
+
}
|
|
19739
|
+
|
|
19740
|
+
function _wrapNativeSuper(Class) {
|
|
19741
|
+
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
19742
|
+
|
|
19743
|
+
_wrapNativeSuper = function _wrapNativeSuper(Class) {
|
|
19744
|
+
if (Class === null || !_isNativeFunction(Class)) return Class;
|
|
19745
|
+
|
|
19746
|
+
if (typeof Class !== "function") {
|
|
19747
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
19748
|
+
}
|
|
19749
|
+
|
|
19750
|
+
if (typeof _cache !== "undefined") {
|
|
19751
|
+
if (_cache.has(Class)) return _cache.get(Class);
|
|
19752
|
+
|
|
19753
|
+
_cache.set(Class, Wrapper);
|
|
19754
|
+
}
|
|
19755
|
+
|
|
19756
|
+
function Wrapper() {
|
|
19757
|
+
return _construct(Class, arguments, _getPrototypeOf(this).constructor);
|
|
19758
|
+
}
|
|
19759
|
+
|
|
19760
|
+
Wrapper.prototype = Object.create(Class.prototype, {
|
|
19761
|
+
constructor: {
|
|
19762
|
+
value: Wrapper,
|
|
19763
|
+
enumerable: false,
|
|
19764
|
+
writable: true,
|
|
19765
|
+
configurable: true
|
|
19766
|
+
}
|
|
19767
|
+
});
|
|
19768
|
+
return _setPrototypeOf(Wrapper, Class);
|
|
19769
|
+
};
|
|
19770
|
+
|
|
19771
|
+
return _wrapNativeSuper(Class);
|
|
19772
|
+
}
|
|
19773
|
+
|
|
19774
|
+
// based on https://github.com/styled-components/styled-components/blob/fcf6f3804c57a14dd7984dfab7bc06ee2edca044/src/utils/error.js
|
|
19775
|
+
|
|
19776
|
+
/**
|
|
19777
|
+
* Parse errors.md and turn it into a simple hash of code: message
|
|
19778
|
+
* @private
|
|
19779
|
+
*/
|
|
19780
|
+
var ERRORS = {
|
|
19781
|
+
"1": "Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75 }).\n\n",
|
|
19782
|
+
"2": "Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, saturation: 0.4, lightness: 0.75, alpha: 0.7 }).\n\n",
|
|
19783
|
+
"3": "Passed an incorrect argument to a color function, please pass a string representation of a color.\n\n",
|
|
19784
|
+
"4": "Couldn't generate valid rgb string from %s, it returned %s.\n\n",
|
|
19785
|
+
"5": "Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.\n\n",
|
|
19786
|
+
"6": "Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, blue: 100 }).\n\n",
|
|
19787
|
+
"7": "Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: 205, blue: 100, alpha: 0.75 }).\n\n",
|
|
19788
|
+
"8": "Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.\n\n",
|
|
19789
|
+
"9": "Please provide a number of steps to the modularScale helper.\n\n",
|
|
19790
|
+
"10": "Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n",
|
|
19791
|
+
"11": "Invalid value passed as base to modularScale, expected number or em string but got \"%s\"\n\n",
|
|
19792
|
+
"12": "Expected a string ending in \"px\" or a number passed as the first argument to %s(), got \"%s\" instead.\n\n",
|
|
19793
|
+
"13": "Expected a string ending in \"px\" or a number passed as the second argument to %s(), got \"%s\" instead.\n\n",
|
|
19794
|
+
"14": "Passed invalid pixel value (\"%s\") to %s(), please pass a value like \"12px\" or 12.\n\n",
|
|
19795
|
+
"15": "Passed invalid base value (\"%s\") to %s(), please pass a value like \"12px\" or 12.\n\n",
|
|
19796
|
+
"16": "You must provide a template to this method.\n\n",
|
|
19797
|
+
"17": "You passed an unsupported selector state to this method.\n\n",
|
|
19798
|
+
"18": "minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n",
|
|
19799
|
+
"19": "fromSize and toSize must be provided as stringified numbers with the same units.\n\n",
|
|
19800
|
+
"20": "expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n",
|
|
19801
|
+
"21": "expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\n\n",
|
|
19802
|
+
"22": "expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\n\n",
|
|
19803
|
+
"23": "fontFace expects a name of a font-family.\n\n",
|
|
19804
|
+
"24": "fontFace expects either the path to the font file(s) or a name of a local copy.\n\n",
|
|
19805
|
+
"25": "fontFace expects localFonts to be an array.\n\n",
|
|
19806
|
+
"26": "fontFace expects fileFormats to be an array.\n\n",
|
|
19807
|
+
"27": "radialGradient requries at least 2 color-stops to properly render.\n\n",
|
|
19808
|
+
"28": "Please supply a filename to retinaImage() as the first argument.\n\n",
|
|
19809
|
+
"29": "Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n",
|
|
19810
|
+
"30": "Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",
|
|
19811
|
+
"31": "The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation\n\n",
|
|
19812
|
+
"32": "To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')\n\n",
|
|
19813
|
+
"33": "The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation\n\n",
|
|
19814
|
+
"34": "borderRadius expects a radius value as a string or number as the second argument.\n\n",
|
|
19815
|
+
"35": "borderRadius expects one of \"top\", \"bottom\", \"left\" or \"right\" as the first argument.\n\n",
|
|
19816
|
+
"36": "Property must be a string value.\n\n",
|
|
19817
|
+
"37": "Syntax Error at %s.\n\n",
|
|
19818
|
+
"38": "Formula contains a function that needs parentheses at %s.\n\n",
|
|
19819
|
+
"39": "Formula is missing closing parenthesis at %s.\n\n",
|
|
19820
|
+
"40": "Formula has too many closing parentheses at %s.\n\n",
|
|
19821
|
+
"41": "All values in a formula must have the same unit or be unitless.\n\n",
|
|
19822
|
+
"42": "Please provide a number of steps to the modularScale helper.\n\n",
|
|
19823
|
+
"43": "Please pass a number or one of the predefined scales to the modularScale helper as the ratio.\n\n",
|
|
19824
|
+
"44": "Invalid value passed as base to modularScale, expected number or em/rem string but got %s.\n\n",
|
|
19825
|
+
"45": "Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.\n\n",
|
|
19826
|
+
"46": "Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.\n\n",
|
|
19827
|
+
"47": "minScreen and maxScreen must be provided as stringified numbers with the same units.\n\n",
|
|
19828
|
+
"48": "fromSize and toSize must be provided as stringified numbers with the same units.\n\n",
|
|
19829
|
+
"49": "Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.\n\n",
|
|
19830
|
+
"50": "Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.\n\n",
|
|
19831
|
+
"51": "Expects the first argument object to have the properties prop, fromSize, and toSize.\n\n",
|
|
19832
|
+
"52": "fontFace expects either the path to the font file(s) or a name of a local copy.\n\n",
|
|
19833
|
+
"53": "fontFace expects localFonts to be an array.\n\n",
|
|
19834
|
+
"54": "fontFace expects fileFormats to be an array.\n\n",
|
|
19835
|
+
"55": "fontFace expects a name of a font-family.\n\n",
|
|
19836
|
+
"56": "linearGradient requries at least 2 color-stops to properly render.\n\n",
|
|
19837
|
+
"57": "radialGradient requries at least 2 color-stops to properly render.\n\n",
|
|
19838
|
+
"58": "Please supply a filename to retinaImage() as the first argument.\n\n",
|
|
19839
|
+
"59": "Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.\n\n",
|
|
19840
|
+
"60": "Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",
|
|
19841
|
+
"61": "Property must be a string value.\n\n",
|
|
19842
|
+
"62": "borderRadius expects a radius value as a string or number as the second argument.\n\n",
|
|
19843
|
+
"63": "borderRadius expects one of \"top\", \"bottom\", \"left\" or \"right\" as the first argument.\n\n",
|
|
19844
|
+
"64": "The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.\n\n",
|
|
19845
|
+
"65": "To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animation please supply them in simple values, e.g. animation('rotate', '2s').\n\n",
|
|
19846
|
+
"66": "The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.\n\n",
|
|
19847
|
+
"67": "You must provide a template to this method.\n\n",
|
|
19848
|
+
"68": "You passed an unsupported selector state to this method.\n\n",
|
|
19849
|
+
"69": "Expected a string ending in \"px\" or a number passed as the first argument to %s(), got %s instead.\n\n",
|
|
19850
|
+
"70": "Expected a string ending in \"px\" or a number passed as the second argument to %s(), got %s instead.\n\n",
|
|
19851
|
+
"71": "Passed invalid pixel value %s to %s(), please pass a value like \"12px\" or 12.\n\n",
|
|
19852
|
+
"72": "Passed invalid base value %s to %s(), please pass a value like \"12px\" or 12.\n\n",
|
|
19853
|
+
"73": "Please provide a valid CSS variable.\n\n",
|
|
19854
|
+
"74": "CSS variable not found and no default was provided.\n\n",
|
|
19855
|
+
"75": "important requires a valid style object, got a %s instead.\n\n",
|
|
19856
|
+
"76": "fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.\n"
|
|
19857
|
+
};
|
|
19858
|
+
/**
|
|
19859
|
+
* super basic version of sprintf
|
|
19860
|
+
* @private
|
|
19861
|
+
*/
|
|
19862
|
+
|
|
19863
|
+
function format() {
|
|
19864
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
19865
|
+
args[_key] = arguments[_key];
|
|
19866
|
+
}
|
|
19867
|
+
|
|
19868
|
+
var a = args[0];
|
|
19869
|
+
var b = [];
|
|
19870
|
+
var c;
|
|
19871
|
+
|
|
19872
|
+
for (c = 1; c < args.length; c += 1) {
|
|
19873
|
+
b.push(args[c]);
|
|
19874
|
+
}
|
|
19875
|
+
|
|
19876
|
+
b.forEach(function (d) {
|
|
19877
|
+
a = a.replace(/%[a-z]/, d);
|
|
19878
|
+
});
|
|
19879
|
+
return a;
|
|
19880
|
+
}
|
|
19881
|
+
/**
|
|
19882
|
+
* Create an error file out of errors.md for development and a simple web link to the full errors
|
|
19883
|
+
* in production mode.
|
|
19884
|
+
* @private
|
|
19885
|
+
*/
|
|
19886
|
+
|
|
19887
|
+
|
|
19888
|
+
var PolishedError = /*#__PURE__*/function (_Error) {
|
|
19889
|
+
_inheritsLoose(PolishedError, _Error);
|
|
19890
|
+
|
|
19891
|
+
function PolishedError(code) {
|
|
19892
|
+
var _this;
|
|
19893
|
+
|
|
19894
|
+
if (process.env.NODE_ENV === 'production') {
|
|
19895
|
+
_this = _Error.call(this, "An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#" + code + " for more information.") || this;
|
|
19896
|
+
} else {
|
|
19897
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
19898
|
+
args[_key2 - 1] = arguments[_key2];
|
|
19899
|
+
}
|
|
19900
|
+
|
|
19901
|
+
_this = _Error.call(this, format.apply(void 0, [ERRORS[code]].concat(args))) || this;
|
|
19902
|
+
}
|
|
19903
|
+
|
|
19904
|
+
return _assertThisInitialized(_this);
|
|
19905
|
+
}
|
|
19906
|
+
|
|
19907
|
+
return PolishedError;
|
|
19908
|
+
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
19909
|
+
|
|
19910
|
+
function colorToInt(color) {
|
|
19911
|
+
return Math.round(color * 255);
|
|
19912
|
+
}
|
|
19913
|
+
|
|
19914
|
+
function convertToInt(red, green, blue) {
|
|
19915
|
+
return colorToInt(red) + "," + colorToInt(green) + "," + colorToInt(blue);
|
|
19916
|
+
}
|
|
19917
|
+
|
|
19918
|
+
function hslToRgb(hue, saturation, lightness, convert) {
|
|
19919
|
+
if (convert === void 0) {
|
|
19920
|
+
convert = convertToInt;
|
|
19921
|
+
}
|
|
19922
|
+
|
|
19923
|
+
if (saturation === 0) {
|
|
19924
|
+
// achromatic
|
|
19925
|
+
return convert(lightness, lightness, lightness);
|
|
19926
|
+
} // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV
|
|
19927
|
+
|
|
19928
|
+
|
|
19929
|
+
var huePrime = (hue % 360 + 360) % 360 / 60;
|
|
19930
|
+
var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;
|
|
19931
|
+
var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
|
|
19932
|
+
var red = 0;
|
|
19933
|
+
var green = 0;
|
|
19934
|
+
var blue = 0;
|
|
19935
|
+
|
|
19936
|
+
if (huePrime >= 0 && huePrime < 1) {
|
|
19937
|
+
red = chroma;
|
|
19938
|
+
green = secondComponent;
|
|
19939
|
+
} else if (huePrime >= 1 && huePrime < 2) {
|
|
19940
|
+
red = secondComponent;
|
|
19941
|
+
green = chroma;
|
|
19942
|
+
} else if (huePrime >= 2 && huePrime < 3) {
|
|
19943
|
+
green = chroma;
|
|
19944
|
+
blue = secondComponent;
|
|
19945
|
+
} else if (huePrime >= 3 && huePrime < 4) {
|
|
19946
|
+
green = secondComponent;
|
|
19947
|
+
blue = chroma;
|
|
19948
|
+
} else if (huePrime >= 4 && huePrime < 5) {
|
|
19949
|
+
red = secondComponent;
|
|
19950
|
+
blue = chroma;
|
|
19951
|
+
} else if (huePrime >= 5 && huePrime < 6) {
|
|
19952
|
+
red = chroma;
|
|
19953
|
+
blue = secondComponent;
|
|
19954
|
+
}
|
|
19955
|
+
|
|
19956
|
+
var lightnessModification = lightness - chroma / 2;
|
|
19957
|
+
var finalRed = red + lightnessModification;
|
|
19958
|
+
var finalGreen = green + lightnessModification;
|
|
19959
|
+
var finalBlue = blue + lightnessModification;
|
|
19960
|
+
return convert(finalRed, finalGreen, finalBlue);
|
|
19961
|
+
}
|
|
19962
|
+
|
|
19963
|
+
var namedColorMap = {
|
|
19964
|
+
aliceblue: 'f0f8ff',
|
|
19965
|
+
antiquewhite: 'faebd7',
|
|
19966
|
+
aqua: '00ffff',
|
|
19967
|
+
aquamarine: '7fffd4',
|
|
19968
|
+
azure: 'f0ffff',
|
|
19969
|
+
beige: 'f5f5dc',
|
|
19970
|
+
bisque: 'ffe4c4',
|
|
19971
|
+
black: '000',
|
|
19972
|
+
blanchedalmond: 'ffebcd',
|
|
19973
|
+
blue: '0000ff',
|
|
19974
|
+
blueviolet: '8a2be2',
|
|
19975
|
+
brown: 'a52a2a',
|
|
19976
|
+
burlywood: 'deb887',
|
|
19977
|
+
cadetblue: '5f9ea0',
|
|
19978
|
+
chartreuse: '7fff00',
|
|
19979
|
+
chocolate: 'd2691e',
|
|
19980
|
+
coral: 'ff7f50',
|
|
19981
|
+
cornflowerblue: '6495ed',
|
|
19982
|
+
cornsilk: 'fff8dc',
|
|
19983
|
+
crimson: 'dc143c',
|
|
19984
|
+
cyan: '00ffff',
|
|
19985
|
+
darkblue: '00008b',
|
|
19986
|
+
darkcyan: '008b8b',
|
|
19987
|
+
darkgoldenrod: 'b8860b',
|
|
19988
|
+
darkgray: 'a9a9a9',
|
|
19989
|
+
darkgreen: '006400',
|
|
19990
|
+
darkgrey: 'a9a9a9',
|
|
19991
|
+
darkkhaki: 'bdb76b',
|
|
19992
|
+
darkmagenta: '8b008b',
|
|
19993
|
+
darkolivegreen: '556b2f',
|
|
19994
|
+
darkorange: 'ff8c00',
|
|
19995
|
+
darkorchid: '9932cc',
|
|
19996
|
+
darkred: '8b0000',
|
|
19997
|
+
darksalmon: 'e9967a',
|
|
19998
|
+
darkseagreen: '8fbc8f',
|
|
19999
|
+
darkslateblue: '483d8b',
|
|
20000
|
+
darkslategray: '2f4f4f',
|
|
20001
|
+
darkslategrey: '2f4f4f',
|
|
20002
|
+
darkturquoise: '00ced1',
|
|
20003
|
+
darkviolet: '9400d3',
|
|
20004
|
+
deeppink: 'ff1493',
|
|
20005
|
+
deepskyblue: '00bfff',
|
|
20006
|
+
dimgray: '696969',
|
|
20007
|
+
dimgrey: '696969',
|
|
20008
|
+
dodgerblue: '1e90ff',
|
|
20009
|
+
firebrick: 'b22222',
|
|
20010
|
+
floralwhite: 'fffaf0',
|
|
20011
|
+
forestgreen: '228b22',
|
|
20012
|
+
fuchsia: 'ff00ff',
|
|
20013
|
+
gainsboro: 'dcdcdc',
|
|
20014
|
+
ghostwhite: 'f8f8ff',
|
|
20015
|
+
gold: 'ffd700',
|
|
20016
|
+
goldenrod: 'daa520',
|
|
20017
|
+
gray: '808080',
|
|
20018
|
+
green: '008000',
|
|
20019
|
+
greenyellow: 'adff2f',
|
|
20020
|
+
grey: '808080',
|
|
20021
|
+
honeydew: 'f0fff0',
|
|
20022
|
+
hotpink: 'ff69b4',
|
|
20023
|
+
indianred: 'cd5c5c',
|
|
20024
|
+
indigo: '4b0082',
|
|
20025
|
+
ivory: 'fffff0',
|
|
20026
|
+
khaki: 'f0e68c',
|
|
20027
|
+
lavender: 'e6e6fa',
|
|
20028
|
+
lavenderblush: 'fff0f5',
|
|
20029
|
+
lawngreen: '7cfc00',
|
|
20030
|
+
lemonchiffon: 'fffacd',
|
|
20031
|
+
lightblue: 'add8e6',
|
|
20032
|
+
lightcoral: 'f08080',
|
|
20033
|
+
lightcyan: 'e0ffff',
|
|
20034
|
+
lightgoldenrodyellow: 'fafad2',
|
|
20035
|
+
lightgray: 'd3d3d3',
|
|
20036
|
+
lightgreen: '90ee90',
|
|
20037
|
+
lightgrey: 'd3d3d3',
|
|
20038
|
+
lightpink: 'ffb6c1',
|
|
20039
|
+
lightsalmon: 'ffa07a',
|
|
20040
|
+
lightseagreen: '20b2aa',
|
|
20041
|
+
lightskyblue: '87cefa',
|
|
20042
|
+
lightslategray: '789',
|
|
20043
|
+
lightslategrey: '789',
|
|
20044
|
+
lightsteelblue: 'b0c4de',
|
|
20045
|
+
lightyellow: 'ffffe0',
|
|
20046
|
+
lime: '0f0',
|
|
20047
|
+
limegreen: '32cd32',
|
|
20048
|
+
linen: 'faf0e6',
|
|
20049
|
+
magenta: 'f0f',
|
|
20050
|
+
maroon: '800000',
|
|
20051
|
+
mediumaquamarine: '66cdaa',
|
|
20052
|
+
mediumblue: '0000cd',
|
|
20053
|
+
mediumorchid: 'ba55d3',
|
|
20054
|
+
mediumpurple: '9370db',
|
|
20055
|
+
mediumseagreen: '3cb371',
|
|
20056
|
+
mediumslateblue: '7b68ee',
|
|
20057
|
+
mediumspringgreen: '00fa9a',
|
|
20058
|
+
mediumturquoise: '48d1cc',
|
|
20059
|
+
mediumvioletred: 'c71585',
|
|
20060
|
+
midnightblue: '191970',
|
|
20061
|
+
mintcream: 'f5fffa',
|
|
20062
|
+
mistyrose: 'ffe4e1',
|
|
20063
|
+
moccasin: 'ffe4b5',
|
|
20064
|
+
navajowhite: 'ffdead',
|
|
20065
|
+
navy: '000080',
|
|
20066
|
+
oldlace: 'fdf5e6',
|
|
20067
|
+
olive: '808000',
|
|
20068
|
+
olivedrab: '6b8e23',
|
|
20069
|
+
orange: 'ffa500',
|
|
20070
|
+
orangered: 'ff4500',
|
|
20071
|
+
orchid: 'da70d6',
|
|
20072
|
+
palegoldenrod: 'eee8aa',
|
|
20073
|
+
palegreen: '98fb98',
|
|
20074
|
+
paleturquoise: 'afeeee',
|
|
20075
|
+
palevioletred: 'db7093',
|
|
20076
|
+
papayawhip: 'ffefd5',
|
|
20077
|
+
peachpuff: 'ffdab9',
|
|
20078
|
+
peru: 'cd853f',
|
|
20079
|
+
pink: 'ffc0cb',
|
|
20080
|
+
plum: 'dda0dd',
|
|
20081
|
+
powderblue: 'b0e0e6',
|
|
20082
|
+
purple: '800080',
|
|
20083
|
+
rebeccapurple: '639',
|
|
20084
|
+
red: 'f00',
|
|
20085
|
+
rosybrown: 'bc8f8f',
|
|
20086
|
+
royalblue: '4169e1',
|
|
20087
|
+
saddlebrown: '8b4513',
|
|
20088
|
+
salmon: 'fa8072',
|
|
20089
|
+
sandybrown: 'f4a460',
|
|
20090
|
+
seagreen: '2e8b57',
|
|
20091
|
+
seashell: 'fff5ee',
|
|
20092
|
+
sienna: 'a0522d',
|
|
20093
|
+
silver: 'c0c0c0',
|
|
20094
|
+
skyblue: '87ceeb',
|
|
20095
|
+
slateblue: '6a5acd',
|
|
20096
|
+
slategray: '708090',
|
|
20097
|
+
slategrey: '708090',
|
|
20098
|
+
snow: 'fffafa',
|
|
20099
|
+
springgreen: '00ff7f',
|
|
20100
|
+
steelblue: '4682b4',
|
|
20101
|
+
tan: 'd2b48c',
|
|
20102
|
+
teal: '008080',
|
|
20103
|
+
thistle: 'd8bfd8',
|
|
20104
|
+
tomato: 'ff6347',
|
|
20105
|
+
turquoise: '40e0d0',
|
|
20106
|
+
violet: 'ee82ee',
|
|
20107
|
+
wheat: 'f5deb3',
|
|
20108
|
+
white: 'fff',
|
|
20109
|
+
whitesmoke: 'f5f5f5',
|
|
20110
|
+
yellow: 'ff0',
|
|
20111
|
+
yellowgreen: '9acd32'
|
|
20112
|
+
};
|
|
20113
|
+
/**
|
|
20114
|
+
* Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.
|
|
20115
|
+
* @private
|
|
20116
|
+
*/
|
|
20117
|
+
|
|
20118
|
+
function nameToHex(color) {
|
|
20119
|
+
if (typeof color !== 'string') return color;
|
|
20120
|
+
var normalizedColorName = color.toLowerCase();
|
|
20121
|
+
return namedColorMap[normalizedColorName] ? "#" + namedColorMap[normalizedColorName] : color;
|
|
20122
|
+
}
|
|
20123
|
+
|
|
20124
|
+
var hexRegex = /^#[a-fA-F0-9]{6}$/;
|
|
20125
|
+
var hexRgbaRegex = /^#[a-fA-F0-9]{8}$/;
|
|
20126
|
+
var reducedHexRegex = /^#[a-fA-F0-9]{3}$/;
|
|
20127
|
+
var reducedRgbaHexRegex = /^#[a-fA-F0-9]{4}$/;
|
|
20128
|
+
var rgbRegex = /^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i;
|
|
20129
|
+
var rgbaRegex = /^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i;
|
|
20130
|
+
var hslRegex = /^hsl\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i;
|
|
20131
|
+
var hslaRegex = /^hsla\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i;
|
|
20132
|
+
/**
|
|
20133
|
+
* Returns an RgbColor or RgbaColor object. This utility function is only useful
|
|
20134
|
+
* if want to extract a color component. With the color util `toColorString` you
|
|
20135
|
+
* can convert a RgbColor or RgbaColor object back to a string.
|
|
20136
|
+
*
|
|
20137
|
+
* @example
|
|
20138
|
+
* // Assigns `{ red: 255, green: 0, blue: 0 }` to color1
|
|
20139
|
+
* const color1 = parseToRgb('rgb(255, 0, 0)');
|
|
20140
|
+
* // Assigns `{ red: 92, green: 102, blue: 112, alpha: 0.75 }` to color2
|
|
20141
|
+
* const color2 = parseToRgb('hsla(210, 10%, 40%, 0.75)');
|
|
20142
|
+
*/
|
|
20143
|
+
|
|
20144
|
+
function parseToRgb(color) {
|
|
20145
|
+
if (typeof color !== 'string') {
|
|
20146
|
+
throw new PolishedError(3);
|
|
20147
|
+
}
|
|
20148
|
+
|
|
20149
|
+
var normalizedColor = nameToHex(color);
|
|
20150
|
+
|
|
20151
|
+
if (normalizedColor.match(hexRegex)) {
|
|
20152
|
+
return {
|
|
20153
|
+
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
|
|
20154
|
+
green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16),
|
|
20155
|
+
blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16)
|
|
20156
|
+
};
|
|
20157
|
+
}
|
|
20158
|
+
|
|
20159
|
+
if (normalizedColor.match(hexRgbaRegex)) {
|
|
20160
|
+
var alpha = parseFloat((parseInt("" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));
|
|
20161
|
+
return {
|
|
20162
|
+
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
|
|
20163
|
+
green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16),
|
|
20164
|
+
blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16),
|
|
20165
|
+
alpha: alpha
|
|
20166
|
+
};
|
|
20167
|
+
}
|
|
20168
|
+
|
|
20169
|
+
if (normalizedColor.match(reducedHexRegex)) {
|
|
20170
|
+
return {
|
|
20171
|
+
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
20172
|
+
green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
|
|
20173
|
+
blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16)
|
|
20174
|
+
};
|
|
20175
|
+
}
|
|
20176
|
+
|
|
20177
|
+
if (normalizedColor.match(reducedRgbaHexRegex)) {
|
|
20178
|
+
var _alpha = parseFloat((parseInt("" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));
|
|
20179
|
+
|
|
20180
|
+
return {
|
|
20181
|
+
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
20182
|
+
green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
|
|
20183
|
+
blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16),
|
|
20184
|
+
alpha: _alpha
|
|
20185
|
+
};
|
|
20186
|
+
}
|
|
20187
|
+
|
|
20188
|
+
var rgbMatched = rgbRegex.exec(normalizedColor);
|
|
20189
|
+
|
|
20190
|
+
if (rgbMatched) {
|
|
20191
|
+
return {
|
|
20192
|
+
red: parseInt("" + rgbMatched[1], 10),
|
|
20193
|
+
green: parseInt("" + rgbMatched[2], 10),
|
|
20194
|
+
blue: parseInt("" + rgbMatched[3], 10)
|
|
20195
|
+
};
|
|
20196
|
+
}
|
|
20197
|
+
|
|
20198
|
+
var rgbaMatched = rgbaRegex.exec(normalizedColor);
|
|
20199
|
+
|
|
20200
|
+
if (rgbaMatched) {
|
|
20201
|
+
return {
|
|
20202
|
+
red: parseInt("" + rgbaMatched[1], 10),
|
|
20203
|
+
green: parseInt("" + rgbaMatched[2], 10),
|
|
20204
|
+
blue: parseInt("" + rgbaMatched[3], 10),
|
|
20205
|
+
alpha: parseFloat("" + rgbaMatched[4])
|
|
20206
|
+
};
|
|
20207
|
+
}
|
|
20208
|
+
|
|
20209
|
+
var hslMatched = hslRegex.exec(normalizedColor);
|
|
20210
|
+
|
|
20211
|
+
if (hslMatched) {
|
|
20212
|
+
var hue = parseInt("" + hslMatched[1], 10);
|
|
20213
|
+
var saturation = parseInt("" + hslMatched[2], 10) / 100;
|
|
20214
|
+
var lightness = parseInt("" + hslMatched[3], 10) / 100;
|
|
20215
|
+
var rgbColorString = "rgb(" + hslToRgb(hue, saturation, lightness) + ")";
|
|
20216
|
+
var hslRgbMatched = rgbRegex.exec(rgbColorString);
|
|
20217
|
+
|
|
20218
|
+
if (!hslRgbMatched) {
|
|
20219
|
+
throw new PolishedError(4, normalizedColor, rgbColorString);
|
|
20220
|
+
}
|
|
20221
|
+
|
|
20222
|
+
return {
|
|
20223
|
+
red: parseInt("" + hslRgbMatched[1], 10),
|
|
20224
|
+
green: parseInt("" + hslRgbMatched[2], 10),
|
|
20225
|
+
blue: parseInt("" + hslRgbMatched[3], 10)
|
|
20226
|
+
};
|
|
20227
|
+
}
|
|
20228
|
+
|
|
20229
|
+
var hslaMatched = hslaRegex.exec(normalizedColor);
|
|
20230
|
+
|
|
20231
|
+
if (hslaMatched) {
|
|
20232
|
+
var _hue = parseInt("" + hslaMatched[1], 10);
|
|
20233
|
+
|
|
20234
|
+
var _saturation = parseInt("" + hslaMatched[2], 10) / 100;
|
|
20235
|
+
|
|
20236
|
+
var _lightness = parseInt("" + hslaMatched[3], 10) / 100;
|
|
20237
|
+
|
|
20238
|
+
var _rgbColorString = "rgb(" + hslToRgb(_hue, _saturation, _lightness) + ")";
|
|
20239
|
+
|
|
20240
|
+
var _hslRgbMatched = rgbRegex.exec(_rgbColorString);
|
|
20241
|
+
|
|
20242
|
+
if (!_hslRgbMatched) {
|
|
20243
|
+
throw new PolishedError(4, normalizedColor, _rgbColorString);
|
|
20244
|
+
}
|
|
20245
|
+
|
|
20246
|
+
return {
|
|
20247
|
+
red: parseInt("" + _hslRgbMatched[1], 10),
|
|
20248
|
+
green: parseInt("" + _hslRgbMatched[2], 10),
|
|
20249
|
+
blue: parseInt("" + _hslRgbMatched[3], 10),
|
|
20250
|
+
alpha: parseFloat("" + hslaMatched[4])
|
|
20251
|
+
};
|
|
20252
|
+
}
|
|
20253
|
+
|
|
20254
|
+
throw new PolishedError(5);
|
|
20255
|
+
}
|
|
20256
|
+
|
|
20257
|
+
/**
|
|
20258
|
+
* Reduces hex values if possible e.g. #ff8866 to #f86
|
|
20259
|
+
* @private
|
|
20260
|
+
*/
|
|
20261
|
+
var reduceHexValue = function reduceHexValue(value) {
|
|
20262
|
+
if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {
|
|
20263
|
+
return "#" + value[1] + value[3] + value[5];
|
|
20264
|
+
}
|
|
20265
|
+
|
|
20266
|
+
return value;
|
|
20267
|
+
};
|
|
20268
|
+
|
|
20269
|
+
function numberToHex(value) {
|
|
20270
|
+
var hex = value.toString(16);
|
|
20271
|
+
return hex.length === 1 ? "0" + hex : hex;
|
|
20272
|
+
}
|
|
20273
|
+
|
|
20274
|
+
/**
|
|
20275
|
+
* Returns a string value for the color. The returned result is the smallest possible hex notation.
|
|
20276
|
+
*
|
|
20277
|
+
* @example
|
|
20278
|
+
* // Styles as object usage
|
|
20279
|
+
* const styles = {
|
|
20280
|
+
* background: rgb(255, 205, 100),
|
|
20281
|
+
* background: rgb({ red: 255, green: 205, blue: 100 }),
|
|
20282
|
+
* }
|
|
20283
|
+
*
|
|
20284
|
+
* // styled-components usage
|
|
20285
|
+
* const div = styled.div`
|
|
20286
|
+
* background: ${rgb(255, 205, 100)};
|
|
20287
|
+
* background: ${rgb({ red: 255, green: 205, blue: 100 })};
|
|
20288
|
+
* `
|
|
20289
|
+
*
|
|
20290
|
+
* // CSS in JS Output
|
|
20291
|
+
*
|
|
20292
|
+
* element {
|
|
20293
|
+
* background: "#ffcd64";
|
|
20294
|
+
* background: "#ffcd64";
|
|
20295
|
+
* }
|
|
20296
|
+
*/
|
|
20297
|
+
function rgb(value, green, blue) {
|
|
20298
|
+
if (typeof value === 'number' && typeof green === 'number' && typeof blue === 'number') {
|
|
20299
|
+
return reduceHexValue("#" + numberToHex(value) + numberToHex(green) + numberToHex(blue));
|
|
20300
|
+
} else if (typeof value === 'object' && green === undefined && blue === undefined) {
|
|
20301
|
+
return reduceHexValue("#" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));
|
|
20302
|
+
}
|
|
20303
|
+
|
|
20304
|
+
throw new PolishedError(6);
|
|
20305
|
+
}
|
|
20306
|
+
|
|
20307
|
+
/**
|
|
20308
|
+
* Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.
|
|
20309
|
+
*
|
|
20310
|
+
* Can also be used to fade a color by passing a hex value or named CSS color along with an alpha value.
|
|
20311
|
+
*
|
|
20312
|
+
* @example
|
|
20313
|
+
* // Styles as object usage
|
|
20314
|
+
* const styles = {
|
|
20315
|
+
* background: rgba(255, 205, 100, 0.7),
|
|
20316
|
+
* background: rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 }),
|
|
20317
|
+
* background: rgba(255, 205, 100, 1),
|
|
20318
|
+
* background: rgba('#ffffff', 0.4),
|
|
20319
|
+
* background: rgba('black', 0.7),
|
|
20320
|
+
* }
|
|
20321
|
+
*
|
|
20322
|
+
* // styled-components usage
|
|
20323
|
+
* const div = styled.div`
|
|
20324
|
+
* background: ${rgba(255, 205, 100, 0.7)};
|
|
20325
|
+
* background: ${rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 })};
|
|
20326
|
+
* background: ${rgba(255, 205, 100, 1)};
|
|
20327
|
+
* background: ${rgba('#ffffff', 0.4)};
|
|
20328
|
+
* background: ${rgba('black', 0.7)};
|
|
20329
|
+
* `
|
|
20330
|
+
*
|
|
20331
|
+
* // CSS in JS Output
|
|
20332
|
+
*
|
|
20333
|
+
* element {
|
|
20334
|
+
* background: "rgba(255,205,100,0.7)";
|
|
20335
|
+
* background: "rgba(255,205,100,0.7)";
|
|
20336
|
+
* background: "#ffcd64";
|
|
20337
|
+
* background: "rgba(255,255,255,0.4)";
|
|
20338
|
+
* background: "rgba(0,0,0,0.7)";
|
|
20339
|
+
* }
|
|
20340
|
+
*/
|
|
20341
|
+
function rgba$1(firstValue, secondValue, thirdValue, fourthValue) {
|
|
20342
|
+
if (typeof firstValue === 'string' && typeof secondValue === 'number') {
|
|
20343
|
+
var rgbValue = parseToRgb(firstValue);
|
|
20344
|
+
return "rgba(" + rgbValue.red + "," + rgbValue.green + "," + rgbValue.blue + "," + secondValue + ")";
|
|
20345
|
+
} else if (typeof firstValue === 'number' && typeof secondValue === 'number' && typeof thirdValue === 'number' && typeof fourthValue === 'number') {
|
|
20346
|
+
return fourthValue >= 1 ? rgb(firstValue, secondValue, thirdValue) : "rgba(" + firstValue + "," + secondValue + "," + thirdValue + "," + fourthValue + ")";
|
|
20347
|
+
} else if (typeof firstValue === 'object' && secondValue === undefined && thirdValue === undefined && fourthValue === undefined) {
|
|
20348
|
+
return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.alpha + ")";
|
|
20349
|
+
}
|
|
20350
|
+
|
|
20351
|
+
throw new PolishedError(7);
|
|
19353
20352
|
}
|
|
19354
20353
|
|
|
19355
|
-
|
|
19356
|
-
|
|
19357
|
-
|
|
19358
|
-
|
|
19359
|
-
|
|
20354
|
+
// Type definitions taken from https://github.com/gcanti/flow-static-land/blob/master/src/Fun.js
|
|
20355
|
+
// eslint-disable-next-line no-unused-vars
|
|
20356
|
+
// eslint-disable-next-line no-unused-vars
|
|
20357
|
+
// eslint-disable-next-line no-redeclare
|
|
20358
|
+
function curried(f, length, acc) {
|
|
20359
|
+
return function fn() {
|
|
20360
|
+
// eslint-disable-next-line prefer-rest-params
|
|
20361
|
+
var combined = acc.concat(Array.prototype.slice.call(arguments));
|
|
20362
|
+
return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined);
|
|
19360
20363
|
};
|
|
20364
|
+
} // eslint-disable-next-line no-redeclare
|
|
19361
20365
|
|
|
19362
|
-
return data;
|
|
19363
|
-
}
|
|
19364
20366
|
|
|
19365
|
-
|
|
19366
|
-
|
|
19367
|
-
|
|
19368
|
-
|
|
19369
|
-
var EMAIL_ERROR = "email_error";
|
|
19370
|
-
var HAS_NUMBER_ERROR = "error/HAS_NUMBER";
|
|
19371
|
-
var HAS_UPPERCASE_LETTER_ERROR = "error/HAS_UPPERCASE_LETTER";
|
|
19372
|
-
var HAS_LOWERCASE_LETTER_ERROR = "error/HAS_LOWERCASE_LETTER";
|
|
19373
|
-
var HAS_SPECIAL_CHARACTER_ERROR = "error/HAS_SPECIAL_CHARACTER";
|
|
19374
|
-
var ONLY_NUMBERS_ERROR = "only_numbers_error";
|
|
19375
|
-
var ONLY_LETTERS_ERROR = "only_letters_error";
|
|
19376
|
-
var REQUIRED_FIELD_ERROR = "required_field_error";
|
|
19377
|
-
var NUM_GREATER_THAN_ERROR = "num_greater_than_error";
|
|
19378
|
-
var NUM_LESS_THAN_ERROR = "num_less_than_error";
|
|
19379
|
-
var MATCHES_FIELD_ERROR = "matches_field_error";
|
|
19380
|
-
var VALID_SELECT_OPTION_ERROR = "valid_select_option_error"; // Array<String>, Array<String> -> Object -> String
|
|
20367
|
+
function curry(f) {
|
|
20368
|
+
// eslint-disable-line no-redeclare
|
|
20369
|
+
return curried(f, f.length, []);
|
|
20370
|
+
}
|
|
19381
20371
|
|
|
19382
|
-
|
|
19383
|
-
|
|
19384
|
-
|
|
19385
|
-
|
|
20372
|
+
/**
|
|
20373
|
+
* Mixes the two provided colors together by calculating the average of each of the RGB components weighted to the first color by the provided weight.
|
|
20374
|
+
*
|
|
20375
|
+
* @example
|
|
20376
|
+
* // Styles as object usage
|
|
20377
|
+
* const styles = {
|
|
20378
|
+
* background: mix(0.5, '#f00', '#00f')
|
|
20379
|
+
* background: mix(0.25, '#f00', '#00f')
|
|
20380
|
+
* background: mix('0.5', 'rgba(255, 0, 0, 0.5)', '#00f')
|
|
20381
|
+
* }
|
|
20382
|
+
*
|
|
20383
|
+
* // styled-components usage
|
|
20384
|
+
* const div = styled.div`
|
|
20385
|
+
* background: ${mix(0.5, '#f00', '#00f')};
|
|
20386
|
+
* background: ${mix(0.25, '#f00', '#00f')};
|
|
20387
|
+
* background: ${mix('0.5', 'rgba(255, 0, 0, 0.5)', '#00f')};
|
|
20388
|
+
* `
|
|
20389
|
+
*
|
|
20390
|
+
* // CSS in JS Output
|
|
20391
|
+
*
|
|
20392
|
+
* element {
|
|
20393
|
+
* background: "#7f007f";
|
|
20394
|
+
* background: "#3f00bf";
|
|
20395
|
+
* background: "rgba(63, 0, 191, 0.75)";
|
|
20396
|
+
* }
|
|
20397
|
+
*/
|
|
19386
20398
|
|
|
19387
|
-
|
|
19388
|
-
|
|
19389
|
-
|
|
19390
|
-
|
|
19391
|
-
|
|
19392
|
-
};
|
|
19393
|
-
/*
|
|
19394
|
-
What's going on here? This looks weird, you may ask...
|
|
19395
|
-
DEFAULT_ERROR_MESSAGES is a map between the error constants (which are returned by validators)
|
|
19396
|
-
and some tagged template literals.
|
|
19397
|
-
In this case, the template tag function is curried and returns a function which accepts an args object
|
|
19398
|
-
I'm calling that object inputState, but it could really be anything.
|
|
19399
|
-
When the error message string fucntion is called with that arg, it's reduced to produce a custom error message
|
|
19400
|
-
with interpolation.
|
|
19401
|
-
*/
|
|
20399
|
+
function mix$1(weight, color, otherColor) {
|
|
20400
|
+
if (color === 'transparent') return otherColor;
|
|
20401
|
+
if (otherColor === 'transparent') return color;
|
|
20402
|
+
if (weight === 0) return otherColor;
|
|
20403
|
+
var parsedColor1 = parseToRgb(color);
|
|
19402
20404
|
|
|
20405
|
+
var color1 = _extends$1({}, parsedColor1, {
|
|
20406
|
+
alpha: typeof parsedColor1.alpha === 'number' ? parsedColor1.alpha : 1
|
|
20407
|
+
});
|
|
19403
20408
|
|
|
19404
|
-
var
|
|
19405
|
-
|
|
19406
|
-
|
|
19407
|
-
|
|
20409
|
+
var parsedColor2 = parseToRgb(otherColor);
|
|
20410
|
+
|
|
20411
|
+
var color2 = _extends$1({}, parsedColor2, {
|
|
20412
|
+
alpha: typeof parsedColor2.alpha === 'number' ? parsedColor2.alpha : 1
|
|
20413
|
+
}); // The formula is copied from the original Sass implementation:
|
|
20414
|
+
// http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method
|
|
20415
|
+
|
|
20416
|
+
|
|
20417
|
+
var alphaDelta = color1.alpha - color2.alpha;
|
|
20418
|
+
var x = parseFloat(weight) * 2 - 1;
|
|
20419
|
+
var y = x * alphaDelta === -1 ? x : x + alphaDelta;
|
|
20420
|
+
var z = 1 + x * alphaDelta;
|
|
20421
|
+
var weight1 = (y / z + 1) / 2.0;
|
|
20422
|
+
var weight2 = 1 - weight1;
|
|
20423
|
+
var mixedColor = {
|
|
20424
|
+
red: Math.floor(color1.red * weight1 + color2.red * weight2),
|
|
20425
|
+
green: Math.floor(color1.green * weight1 + color2.green * weight2),
|
|
20426
|
+
blue: Math.floor(color1.blue * weight1 + color2.blue * weight2),
|
|
20427
|
+
alpha: color1.alpha * (parseFloat(weight) / 1.0) + color2.alpha * (1 - parseFloat(weight) / 1.0)
|
|
20428
|
+
};
|
|
20429
|
+
return rgba$1(mixedColor);
|
|
20430
|
+
} // prettier-ignore
|
|
19408
20431
|
|
|
19409
|
-
var INPUT_STATE_NEUTRAL = "NEUTRAL";
|
|
19410
|
-
var INPUT_STATE_INVALID = "INVALID";
|
|
19411
|
-
var INPUT_STATE_VALID = "VALID"; // Function to check the state of an input
|
|
19412
|
-
// This function is intended to be used with inputs that have multiple validators
|
|
19413
|
-
// Takes an input's state value, destructures for the input's error and showError booleans, list of errors
|
|
19414
|
-
// Also takes a list of the specific error constants to look for
|
|
19415
|
-
// If the input's showError property is false, the input has not been validated, and input state is NEUTRAL
|
|
19416
|
-
// If the input has an error, and showError is true, check if the errors we care about are in the input's error list
|
|
19417
|
-
// If yes, input state is INVALID
|
|
19418
|
-
// If input has no error and showError is true, or the errors we're looking for aren't present in the list
|
|
19419
|
-
// then input state is VALID
|
|
19420
|
-
// { error: Boolean, showError: Boolean, errorsList: Array<String> }, Array<String> -> String
|
|
19421
20432
|
|
|
19422
|
-
var
|
|
19423
|
-
|
|
19424
|
-
|
|
19425
|
-
errors = _ref.errors,
|
|
19426
|
-
rawValue = _ref.rawValue;
|
|
19427
|
-
var errorsToCheck = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
20433
|
+
var curriedMix = /*#__PURE__*/curry
|
|
20434
|
+
/* ::<number | string, string, string, string> */
|
|
20435
|
+
(mix$1);
|
|
19428
20436
|
|
|
19429
|
-
|
|
19430
|
-
|
|
19431
|
-
|
|
19432
|
-
|
|
19433
|
-
|
|
19434
|
-
|
|
19435
|
-
|
|
20437
|
+
/**
|
|
20438
|
+
* Tints a color by mixing it with white. `tint` can produce
|
|
20439
|
+
* hue shifts, where as `lighten` manipulates the luminance channel and therefore
|
|
20440
|
+
* doesn't produce hue shifts.
|
|
20441
|
+
*
|
|
20442
|
+
* @example
|
|
20443
|
+
* // Styles as object usage
|
|
20444
|
+
* const styles = {
|
|
20445
|
+
* background: tint(0.25, '#00f')
|
|
20446
|
+
* }
|
|
20447
|
+
*
|
|
20448
|
+
* // styled-components usage
|
|
20449
|
+
* const div = styled.div`
|
|
20450
|
+
* background: ${tint(0.25, '#00f')};
|
|
20451
|
+
* `
|
|
20452
|
+
*
|
|
20453
|
+
* // CSS in JS Output
|
|
20454
|
+
*
|
|
20455
|
+
* element {
|
|
20456
|
+
* background: "#bfbfff";
|
|
20457
|
+
* }
|
|
20458
|
+
*/
|
|
19436
20459
|
|
|
19437
|
-
|
|
19438
|
-
|
|
20460
|
+
function tint(percentage, color) {
|
|
20461
|
+
if (color === 'transparent') return color;
|
|
20462
|
+
return curriedMix(parseFloat(percentage), 'rgb(255, 255, 255)', color);
|
|
20463
|
+
} // prettier-ignore
|
|
19439
20464
|
|
|
19440
|
-
var PasswordRequirements = function PasswordRequirements(_ref) {
|
|
19441
|
-
var _iconMap;
|
|
19442
20465
|
|
|
19443
|
-
|
|
19444
|
-
|
|
19445
|
-
|
|
19446
|
-
icon: /*#__PURE__*/React__default.createElement(IconNeutral, {
|
|
19447
|
-
margin: "0.125rem 0.5rem 0 0"
|
|
19448
|
-
}),
|
|
19449
|
-
color: MINESHAFT_GREY
|
|
19450
|
-
}), _defineProperty(_iconMap, INPUT_STATE_INVALID, {
|
|
19451
|
-
icon: /*#__PURE__*/React__default.createElement(IconInvalid, {
|
|
19452
|
-
margin: "0.125rem 0.5rem 0 0"
|
|
19453
|
-
}),
|
|
19454
|
-
color: RAZZMATAZZ_RED
|
|
19455
|
-
}), _defineProperty(_iconMap, INPUT_STATE_VALID, {
|
|
19456
|
-
icon: /*#__PURE__*/React__default.createElement(IconValid, {
|
|
19457
|
-
margin: "0.125rem 0.5rem 0 0"
|
|
19458
|
-
}),
|
|
19459
|
-
color: FOREST_GREEN
|
|
19460
|
-
}), _iconMap);
|
|
19461
|
-
var validationMap = {
|
|
19462
|
-
charactersValidation: {
|
|
19463
|
-
validationMessage: "Password must be 8 characters",
|
|
19464
|
-
validationRequirement: [MIN_LENGTH_ERROR]
|
|
19465
|
-
},
|
|
19466
|
-
numbersValidation: {
|
|
19467
|
-
validationMessage: "Password must contain at least one number",
|
|
19468
|
-
validationRequirement: [HAS_NUMBER_ERROR]
|
|
19469
|
-
},
|
|
19470
|
-
letterCaseValidation: {
|
|
19471
|
-
validationMessage: "Password must contain an upper and lower case letter",
|
|
19472
|
-
validationRequirement: [HAS_UPPERCASE_LETTER_ERROR, HAS_LOWERCASE_LETTER_ERROR]
|
|
19473
|
-
},
|
|
19474
|
-
specialCharacterValidation: {
|
|
19475
|
-
validationMessage: "Password must contain a special character (!@#$%^&*.?)",
|
|
19476
|
-
validationRequirement: [HAS_SPECIAL_CHARACTER_ERROR]
|
|
19477
|
-
}
|
|
19478
|
-
};
|
|
19479
|
-
return /*#__PURE__*/React__default.createElement(Box, {
|
|
19480
|
-
background: ATHENS_GREY,
|
|
19481
|
-
padding: isMobile ? "1rem" : "1.5rem",
|
|
19482
|
-
width: "100%"
|
|
19483
|
-
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
19484
|
-
justify: "center",
|
|
19485
|
-
align: "center"
|
|
19486
|
-
}, /*#__PURE__*/React__default.createElement(Stack, null, Object.values(validationMap).map(function (item) {
|
|
19487
|
-
return /*#__PURE__*/React__default.createElement(Box, {
|
|
19488
|
-
padding: "0",
|
|
19489
|
-
key: item.validationMessage
|
|
19490
|
-
}, /*#__PURE__*/React__default.createElement(Sidebar, {
|
|
19491
|
-
width: "24px",
|
|
19492
|
-
childGap: "0rem"
|
|
19493
|
-
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
19494
|
-
padding: "0",
|
|
19495
|
-
minHeight: "100%"
|
|
19496
|
-
}, /*#__PURE__*/React__default.createElement(Cover, {
|
|
19497
|
-
minHeight: "100%",
|
|
19498
|
-
singleChild: true
|
|
19499
|
-
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
19500
|
-
padding: "0"
|
|
19501
|
-
}, iconMap[getInputState(password, item.validationRequirement)].icon))), /*#__PURE__*/React__default.createElement(Box, {
|
|
19502
|
-
padding: "0"
|
|
19503
|
-
}, /*#__PURE__*/React__default.createElement(Sidebar, {
|
|
19504
|
-
onRight: true,
|
|
19505
|
-
childGap: "0rem"
|
|
19506
|
-
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
19507
|
-
padding: "0rem"
|
|
19508
|
-
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
19509
|
-
justify: "flex-start",
|
|
19510
|
-
align: "center"
|
|
19511
|
-
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
19512
|
-
fullHeight: true,
|
|
19513
|
-
childGap: "0.25rem"
|
|
19514
|
-
}, /*#__PURE__*/React__default.createElement(Paragraph$1, {
|
|
19515
|
-
variant: "pS",
|
|
19516
|
-
color: iconMap[getInputState(password, item.validationRequirement)].color
|
|
19517
|
-
}, item.validationMessage))))))));
|
|
19518
|
-
}))));
|
|
19519
|
-
};
|
|
20466
|
+
var curriedTint = /*#__PURE__*/curry
|
|
20467
|
+
/* ::<number | string, string, string> */
|
|
20468
|
+
(tint);
|
|
19520
20469
|
|
|
19521
20470
|
var color$8 = {
|
|
19522
20471
|
"default": "".concat(CHARADE_GREY),
|
|
@@ -19526,7 +20475,7 @@ var height$1 = {
|
|
|
19526
20475
|
"default": "3rem",
|
|
19527
20476
|
large: "192px"
|
|
19528
20477
|
};
|
|
19529
|
-
var fallbackValues$
|
|
20478
|
+
var fallbackValues$l = {
|
|
19530
20479
|
color: color$8,
|
|
19531
20480
|
height: height$1
|
|
19532
20481
|
};
|
|
@@ -19576,8 +20525,8 @@ var Placeholder = function Placeholder(_ref2) {
|
|
|
19576
20525
|
border: "none",
|
|
19577
20526
|
minHeight: themeValues.height,
|
|
19578
20527
|
hiddenStyles: !visible,
|
|
19579
|
-
extraStyles: "\n background: linear-gradient(\n to right,\n ".concat(STORM_GREY, " 40%,\n rgba(255, 255, 255, 0) 0%\n ),\n linear-gradient(").concat(STORM_GREY, " 40%, rgba(255, 255, 255, 0) 0%),\n linear-gradient(to right, ").concat(STORM_GREY, " 40%, rgba(255, 255, 255, 0) 0%),\n linear-gradient(").concat(STORM_GREY, " 40%, rgba(255, 255, 255, 0) 0%);\n background-position: top, right, bottom, left;\n background-repeat: repeat-x, repeat-y;\n background-size: 5px 1px, 1px 5px;\n display: flex;\n justify-content: center;\n align-items:center;"),
|
|
19580
|
-
hoverStyles: "background-color: ".concat(GRECIAN_GREY, ";")
|
|
20528
|
+
extraStyles: "\n background: linear-gradient(\n to right,\n ".concat(variant === "large" ? STORM_GREY : themeValues.color, " 40%,\n rgba(255, 255, 255, 0) 0%\n ),\n linear-gradient(").concat(variant === "large" ? STORM_GREY : themeValues.color, " 40%, rgba(255, 255, 255, 0) 0%),\n linear-gradient(to right, ").concat(variant === "large" ? STORM_GREY : themeValues.color, " 40%, rgba(255, 255, 255, 0) 0%),\n linear-gradient(").concat(variant === "large" ? STORM_GREY : themeValues.color, " 40%, rgba(255, 255, 255, 0) 0%);\n background-position: top, right, bottom, left;\n background-repeat: repeat-x, repeat-y;\n background-size: 5px 1px, 1px 5px;\n display: flex;\n justify-content: center;\n align-items:center;"),
|
|
20529
|
+
hoverStyles: "background-color: ".concat(variant === "large" ? GRECIAN_GREY : curriedTint(0.9, themeValues.color), ";")
|
|
19581
20530
|
}, /*#__PURE__*/React__default.createElement(Center, {
|
|
19582
20531
|
maxWidth: "300px"
|
|
19583
20532
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -19591,7 +20540,7 @@ var Placeholder = function Placeholder(_ref2) {
|
|
|
19591
20540
|
childGap: "0"
|
|
19592
20541
|
}, variant === "large" && /*#__PURE__*/React__default.createElement("div", null), /*#__PURE__*/React__default.createElement(Box, {
|
|
19593
20542
|
padding: "0",
|
|
19594
|
-
extraStyles: ".fill { \n fill: ".concat(CHARADE_GREY, "; \n } .stroke { \n stroke: ").concat(CHARADE_GREY, "; \n }")
|
|
20543
|
+
extraStyles: ".fill { \n fill: ".concat(variant === "large" ? CHARADE_GREY : themeValues.color, "; \n } .stroke { \n stroke: ").concat(variant === "large" ? CHARADE_GREY : themeValues.color, "; \n }")
|
|
19595
20544
|
}, variant === "large" ? /*#__PURE__*/React__default.createElement(Center, {
|
|
19596
20545
|
intrinsic: true
|
|
19597
20546
|
}, largeIcon === "accounts" ? /*#__PURE__*/React__default.createElement(AccountsAddIcon$1, null) : /*#__PURE__*/React__default.createElement(PropertiesAddIcon$1, null), /*#__PURE__*/React__default.createElement(Text$1, {
|
|
@@ -19615,13 +20564,13 @@ var Placeholder = function Placeholder(_ref2) {
|
|
|
19615
20564
|
}, text)))))))))));
|
|
19616
20565
|
};
|
|
19617
20566
|
|
|
19618
|
-
var Placeholder$1 = themeComponent(Placeholder, "Placeholder", fallbackValues$
|
|
20567
|
+
var Placeholder$1 = themeComponent(Placeholder, "Placeholder", fallbackValues$l, "default");
|
|
19619
20568
|
|
|
19620
|
-
var backgroundColor$
|
|
20569
|
+
var backgroundColor$4 = {
|
|
19621
20570
|
"default": "".concat(WHITE)
|
|
19622
20571
|
};
|
|
19623
|
-
var fallbackValues$
|
|
19624
|
-
backgroundColor: backgroundColor$
|
|
20572
|
+
var fallbackValues$m = {
|
|
20573
|
+
backgroundColor: backgroundColor$4
|
|
19625
20574
|
};
|
|
19626
20575
|
|
|
19627
20576
|
var ProcessingFee = function ProcessingFee(_ref) {
|
|
@@ -19648,11 +20597,11 @@ var ProcessingFee = function ProcessingFee(_ref) {
|
|
|
19648
20597
|
}));
|
|
19649
20598
|
};
|
|
19650
20599
|
|
|
19651
|
-
var ProcessingFee$1 = themeComponent(ProcessingFee, "ProcessingFee", fallbackValues$
|
|
20600
|
+
var ProcessingFee$1 = themeComponent(ProcessingFee, "ProcessingFee", fallbackValues$m, "default");
|
|
19652
20601
|
|
|
19653
20602
|
var activeColor$4 = "".concat(MATISSE_BLUE);
|
|
19654
20603
|
var inactiveColor = "".concat(GREY_CHATEAU);
|
|
19655
|
-
var fallbackValues$
|
|
20604
|
+
var fallbackValues$n = {
|
|
19656
20605
|
activeColor: activeColor$4,
|
|
19657
20606
|
inactiveColor: inactiveColor
|
|
19658
20607
|
};
|
|
@@ -19748,7 +20697,7 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
19748
20697
|
})));
|
|
19749
20698
|
};
|
|
19750
20699
|
|
|
19751
|
-
var RadioButton$2 = themeComponent(RadioButton$1, "RadioButton", fallbackValues$
|
|
20700
|
+
var RadioButton$2 = themeComponent(RadioButton$1, "RadioButton", fallbackValues$n);
|
|
19752
20701
|
|
|
19753
20702
|
var borderColor$1 = {
|
|
19754
20703
|
"default": "".concat(GREY_CHATEAU)
|
|
@@ -19756,7 +20705,7 @@ var borderColor$1 = {
|
|
|
19756
20705
|
var borderSize = {
|
|
19757
20706
|
"default": "1px"
|
|
19758
20707
|
};
|
|
19759
|
-
var fallbackValues$
|
|
20708
|
+
var fallbackValues$o = {
|
|
19760
20709
|
borderColor: borderColor$1,
|
|
19761
20710
|
borderSize: borderSize
|
|
19762
20711
|
};
|
|
@@ -19773,7 +20722,7 @@ var SolidDivider = function SolidDivider(_ref) {
|
|
|
19773
20722
|
});
|
|
19774
20723
|
};
|
|
19775
20724
|
|
|
19776
|
-
var SolidDivider$1 = themeComponent(SolidDivider, "SolidDivider", fallbackValues$
|
|
20725
|
+
var SolidDivider$1 = themeComponent(SolidDivider, "SolidDivider", fallbackValues$o, "default");
|
|
19777
20726
|
|
|
19778
20727
|
var placeHolderOptionUS = {
|
|
19779
20728
|
text: "Please select state",
|
|
@@ -30355,7 +31304,7 @@ var offBackground = "".concat(REGENT_GREY);
|
|
|
30355
31304
|
var labelStyles = "\n display: flex;\n justify-content: flex-start;\n align-items: center;\n";
|
|
30356
31305
|
var rightLabelStyles = "\n ".concat(labelStyles, "\n flex-direction: row;\n");
|
|
30357
31306
|
var leftLabelStyles = "\n ".concat(labelStyles, "\n flex-direction: row-reverse;\n");
|
|
30358
|
-
var fallbackValues$
|
|
31307
|
+
var fallbackValues$p = {
|
|
30359
31308
|
onBackground: onBackground,
|
|
30360
31309
|
disabledBackground: disabledBackground,
|
|
30361
31310
|
white: white,
|
|
@@ -30557,7 +31506,7 @@ var ToggleSwitch = function ToggleSwitch(_ref6) {
|
|
|
30557
31506
|
}, label))));
|
|
30558
31507
|
};
|
|
30559
31508
|
|
|
30560
|
-
var ToggleSwitch$1 = themeComponent(ToggleSwitch, "ToggleSwitch", fallbackValues$
|
|
31509
|
+
var ToggleSwitch$1 = themeComponent(ToggleSwitch, "ToggleSwitch", fallbackValues$p);
|
|
30561
31510
|
|
|
30562
31511
|
const validatorToPredicate = (validatorFn, emptyCase) => (
|
|
30563
31512
|
value,
|
|
@@ -32383,7 +33332,7 @@ var titleColor = "#292A33";
|
|
|
32383
33332
|
var headingBackgroundColor = "transparent";
|
|
32384
33333
|
var bodyBackgroundColor = "transparent";
|
|
32385
33334
|
var focusStyles = "outline: none;";
|
|
32386
|
-
var fallbackValues$
|
|
33335
|
+
var fallbackValues$q = {
|
|
32387
33336
|
titleColor: titleColor,
|
|
32388
33337
|
headingBackgroundColor: headingBackgroundColor,
|
|
32389
33338
|
bodyBackgroundColor: bodyBackgroundColor,
|
|
@@ -32466,7 +33415,7 @@ var CollapsibleSection = function CollapsibleSection(_ref) {
|
|
|
32466
33415
|
variant: "h6",
|
|
32467
33416
|
weight: FONT_WEIGHT_SEMIBOLD,
|
|
32468
33417
|
color: themeValues.titleColor,
|
|
32469
|
-
|
|
33418
|
+
as: "h6"
|
|
32470
33419
|
}, title), /*#__PURE__*/React__default.createElement(Motion, {
|
|
32471
33420
|
variants: icon,
|
|
32472
33421
|
style: {
|
|
@@ -32487,7 +33436,7 @@ var CollapsibleSection = function CollapsibleSection(_ref) {
|
|
|
32487
33436
|
}, children))));
|
|
32488
33437
|
};
|
|
32489
33438
|
|
|
32490
|
-
var CollapsibleSection$1 = themeComponent(CollapsibleSection, "CollapsibleSection", fallbackValues$
|
|
33439
|
+
var CollapsibleSection$1 = themeComponent(CollapsibleSection, "CollapsibleSection", fallbackValues$q);
|
|
32491
33440
|
|
|
32492
33441
|
var EditNameForm = function EditNameForm(_ref) {
|
|
32493
33442
|
var fields = _ref.fields,
|
|
@@ -32610,8 +33559,7 @@ var EditableList = function EditableList(_ref) {
|
|
|
32610
33559
|
variant: "pL",
|
|
32611
33560
|
weight: titleWeight,
|
|
32612
33561
|
color: CHARADE_GREY,
|
|
32613
|
-
extraStyles: "letter-spacing: 0.29px;"
|
|
32614
|
-
"aria-level": "3"
|
|
33562
|
+
extraStyles: "letter-spacing: 0.29px;"
|
|
32615
33563
|
}, title)), /*#__PURE__*/React__default.createElement(Box, {
|
|
32616
33564
|
padding: "0",
|
|
32617
33565
|
borderRadius: "4px",
|
|
@@ -32854,8 +33802,7 @@ var TableListItem = function TableListItem(_ref) {
|
|
|
32854
33802
|
isMobile: isMobile
|
|
32855
33803
|
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
32856
33804
|
variant: "pS",
|
|
32857
|
-
color: CHARADE_GREY
|
|
32858
|
-
"aria-level": "3"
|
|
33805
|
+
color: CHARADE_GREY
|
|
32859
33806
|
}, title)), /*#__PURE__*/React__default.createElement(TableItemValue, {
|
|
32860
33807
|
isMobile: isMobile
|
|
32861
33808
|
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
@@ -32976,10 +33923,10 @@ ForgotPasswordForm.mapStateToProps = mapStateToProps$5;
|
|
|
32976
33923
|
ForgotPasswordForm.mapDispatchToProps = mapDispatchToProps$4;
|
|
32977
33924
|
|
|
32978
33925
|
var textColor$2 = "#ffffff";
|
|
32979
|
-
var backgroundColor$
|
|
32980
|
-
var fallbackValues$
|
|
33926
|
+
var backgroundColor$5 = "#182848";
|
|
33927
|
+
var fallbackValues$r = {
|
|
32981
33928
|
textColor: textColor$2,
|
|
32982
|
-
backgroundColor: backgroundColor$
|
|
33929
|
+
backgroundColor: backgroundColor$5
|
|
32983
33930
|
};
|
|
32984
33931
|
|
|
32985
33932
|
var HighlightTabRow = function HighlightTabRow(_ref) {
|
|
@@ -33021,7 +33968,7 @@ var HighlightTabRow = function HighlightTabRow(_ref) {
|
|
|
33021
33968
|
}), repeat( /*#__PURE__*/React__default.createElement(Box, null), boxesAfter)));
|
|
33022
33969
|
};
|
|
33023
33970
|
|
|
33024
|
-
var HighlightTabRow$1 = /*#__PURE__*/React.memo(themeComponent(HighlightTabRow, "HighlightTabRow", fallbackValues$
|
|
33971
|
+
var HighlightTabRow$1 = /*#__PURE__*/React.memo(themeComponent(HighlightTabRow, "HighlightTabRow", fallbackValues$r));
|
|
33025
33972
|
|
|
33026
33973
|
var LoginForm = function LoginForm(_ref) {
|
|
33027
33974
|
var _emailErrorMessages;
|
|
@@ -33935,15 +34882,15 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
33935
34882
|
|
|
33936
34883
|
function _createClass$2(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
33937
34884
|
|
|
33938
|
-
function _possibleConstructorReturn$2(self, call) { if (call && (_typeof$1(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
34885
|
+
function _possibleConstructorReturn$2(self, call) { if (call && (_typeof$1(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized$1(self); }
|
|
33939
34886
|
|
|
33940
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
34887
|
+
function _getPrototypeOf$1(o) { _getPrototypeOf$1 = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf$1(o); }
|
|
33941
34888
|
|
|
33942
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
34889
|
+
function _assertThisInitialized$1(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
33943
34890
|
|
|
33944
|
-
function _inherits$2(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
34891
|
+
function _inherits$2(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$1(subClass, superClass); }
|
|
33945
34892
|
|
|
33946
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
34893
|
+
function _setPrototypeOf$1(o, p) { _setPrototypeOf$1 = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf$1(o, p); }
|
|
33947
34894
|
|
|
33948
34895
|
function _defineProperty$1(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
33949
34896
|
|
|
@@ -33971,27 +34918,27 @@ function (_React$Component) {
|
|
|
33971
34918
|
args[_key] = arguments[_key];
|
|
33972
34919
|
}
|
|
33973
34920
|
|
|
33974
|
-
_this = _possibleConstructorReturn$2(this, (_getPrototypeOf2 = _getPrototypeOf(Modal)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
34921
|
+
_this = _possibleConstructorReturn$2(this, (_getPrototypeOf2 = _getPrototypeOf$1(Modal)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
33975
34922
|
|
|
33976
|
-
_defineProperty$1(_assertThisInitialized(_this), "getApplicationNode", function () {
|
|
34923
|
+
_defineProperty$1(_assertThisInitialized$1(_this), "getApplicationNode", function () {
|
|
33977
34924
|
if (_this.props.getApplicationNode) return _this.props.getApplicationNode();
|
|
33978
34925
|
return _this.props.applicationNode;
|
|
33979
34926
|
});
|
|
33980
34927
|
|
|
33981
|
-
_defineProperty$1(_assertThisInitialized(_this), "checkUnderlayClick", function (event) {
|
|
34928
|
+
_defineProperty$1(_assertThisInitialized$1(_this), "checkUnderlayClick", function (event) {
|
|
33982
34929
|
if (_this.dialogNode && _this.dialogNode.contains(event.target) || // If the click is on the scrollbar we don't want to close the modal.
|
|
33983
34930
|
event.pageX > event.target.ownerDocument.documentElement.offsetWidth || event.pageY > event.target.ownerDocument.documentElement.offsetHeight) return;
|
|
33984
34931
|
|
|
33985
34932
|
_this.exit(event);
|
|
33986
34933
|
});
|
|
33987
34934
|
|
|
33988
|
-
_defineProperty$1(_assertThisInitialized(_this), "checkDocumentKeyDown", function (event) {
|
|
34935
|
+
_defineProperty$1(_assertThisInitialized$1(_this), "checkDocumentKeyDown", function (event) {
|
|
33989
34936
|
if (_this.props.escapeExits && (event.key === 'Escape' || event.key === 'Esc' || event.keyCode === 27)) {
|
|
33990
34937
|
_this.exit(event);
|
|
33991
34938
|
}
|
|
33992
34939
|
});
|
|
33993
34940
|
|
|
33994
|
-
_defineProperty$1(_assertThisInitialized(_this), "exit", function (event) {
|
|
34941
|
+
_defineProperty$1(_assertThisInitialized$1(_this), "exit", function (event) {
|
|
33995
34942
|
if (_this.props.onExit) {
|
|
33996
34943
|
_this.props.onExit(event);
|
|
33997
34944
|
}
|
|
@@ -34256,6 +35203,7 @@ var Modal$1 = function Modal(_ref) {
|
|
|
34256
35203
|
var ModalLink = _ref.ModalLink,
|
|
34257
35204
|
hideModal = _ref.hideModal,
|
|
34258
35205
|
continueAction = _ref.continueAction,
|
|
35206
|
+
cancelAction = _ref.cancelAction,
|
|
34259
35207
|
modalOpen = _ref.modalOpen,
|
|
34260
35208
|
modalHeaderText = _ref.modalHeaderText,
|
|
34261
35209
|
modalBodyText = _ref.modalBodyText,
|
|
@@ -34273,7 +35221,9 @@ var Modal$1 = function Modal(_ref) {
|
|
|
34273
35221
|
defaultWrapper = _ref$defaultWrapper === void 0 ? true : _ref$defaultWrapper,
|
|
34274
35222
|
_ref$onlyCloseButton = _ref.onlyCloseButton,
|
|
34275
35223
|
onlyCloseButton = _ref$onlyCloseButton === void 0 ? false : _ref$onlyCloseButton,
|
|
34276
|
-
maxHeight = _ref.maxHeight
|
|
35224
|
+
maxHeight = _ref.maxHeight,
|
|
35225
|
+
_ref$underlayClickExi = _ref.underlayClickExits,
|
|
35226
|
+
underlayClickExits = _ref$underlayClickExi === void 0 ? true : _ref$underlayClickExi;
|
|
34277
35227
|
|
|
34278
35228
|
var _useContext = React.useContext(styled.ThemeContext),
|
|
34279
35229
|
isMobile = _useContext.isMobile;
|
|
@@ -34290,7 +35240,8 @@ var Modal$1 = function Modal(_ref) {
|
|
|
34290
35240
|
},
|
|
34291
35241
|
dialogStyle: {
|
|
34292
35242
|
width: "615px"
|
|
34293
|
-
}
|
|
35243
|
+
},
|
|
35244
|
+
underlayClickExits: underlayClickExits
|
|
34294
35245
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
34295
35246
|
padding: "0",
|
|
34296
35247
|
borderRadius: "2px",
|
|
@@ -34329,7 +35280,7 @@ var Modal$1 = function Modal(_ref) {
|
|
|
34329
35280
|
extraStyles: isMobile ? "flex-grow: 1" : ""
|
|
34330
35281
|
}, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
34331
35282
|
variant: "secondary",
|
|
34332
|
-
action: hideModal,
|
|
35283
|
+
action: cancelAction ? cancelAction : hideModal,
|
|
34333
35284
|
text: cancelButtonText,
|
|
34334
35285
|
dataQa: cancelButtonText,
|
|
34335
35286
|
extraStyles: "width: 100%;"
|
|
@@ -34388,11 +35339,11 @@ var borderRadius = {
|
|
|
34388
35339
|
"default": "0.25rem",
|
|
34389
35340
|
largeTitle: "0.25rem"
|
|
34390
35341
|
};
|
|
34391
|
-
var backgroundColor$
|
|
35342
|
+
var backgroundColor$6 = {
|
|
34392
35343
|
"default": WHITE,
|
|
34393
35344
|
largeTitle: WHITE
|
|
34394
35345
|
};
|
|
34395
|
-
var fallbackValues$
|
|
35346
|
+
var fallbackValues$s = {
|
|
34396
35347
|
fontSize: fontSize$7,
|
|
34397
35348
|
fontWeight: fontWeight$4,
|
|
34398
35349
|
fontColor: fontColor,
|
|
@@ -34402,7 +35353,7 @@ var fallbackValues$r = {
|
|
|
34402
35353
|
titleSpacing: titleSpacing,
|
|
34403
35354
|
boxShadow: boxShadow$1,
|
|
34404
35355
|
borderRadius: borderRadius,
|
|
34405
|
-
backgroundColor: backgroundColor$
|
|
35356
|
+
backgroundColor: backgroundColor$6
|
|
34406
35357
|
};
|
|
34407
35358
|
|
|
34408
35359
|
var Module = function Module(_ref) {
|
|
@@ -34433,9 +35384,9 @@ var Module = function Module(_ref) {
|
|
|
34433
35384
|
}, children)));
|
|
34434
35385
|
};
|
|
34435
35386
|
|
|
34436
|
-
var Module$1 = /*#__PURE__*/React.memo(themeComponent(Module, "Module", fallbackValues$
|
|
35387
|
+
var Module$1 = /*#__PURE__*/React.memo(themeComponent(Module, "Module", fallbackValues$s, "default"));
|
|
34437
35388
|
|
|
34438
|
-
var backgroundColor$
|
|
35389
|
+
var backgroundColor$7 = {
|
|
34439
35390
|
profile: "#3b414d",
|
|
34440
35391
|
cms: "#3b414d"
|
|
34441
35392
|
};
|
|
@@ -34443,8 +35394,8 @@ var shadowColor = {
|
|
|
34443
35394
|
profile: "#292A33",
|
|
34444
35395
|
cms: "#292A33"
|
|
34445
35396
|
};
|
|
34446
|
-
var fallbackValues$
|
|
34447
|
-
backgroundColor: backgroundColor$
|
|
35397
|
+
var fallbackValues$t = {
|
|
35398
|
+
backgroundColor: backgroundColor$7,
|
|
34448
35399
|
shadowColor: shadowColor
|
|
34449
35400
|
};
|
|
34450
35401
|
|
|
@@ -34484,7 +35435,7 @@ var NavMenuDesktop = function NavMenuDesktop(_ref) {
|
|
|
34484
35435
|
}, menuContent));
|
|
34485
35436
|
};
|
|
34486
35437
|
|
|
34487
|
-
var NavMenuDesktop$1 = themeComponent(NavMenuDesktop, "NavMenu", fallbackValues$
|
|
35438
|
+
var NavMenuDesktop$1 = themeComponent(NavMenuDesktop, "NavMenu", fallbackValues$t, "profile");
|
|
34488
35439
|
|
|
34489
35440
|
function _templateObject$y() {
|
|
34490
35441
|
var data = _taggedTemplateLiteral(["\n position: fixed;\n top: 72px;\n"]);
|
|
@@ -34546,7 +35497,7 @@ var NavMenuMobile = function NavMenuMobile(_ref) {
|
|
|
34546
35497
|
}, menuContent));
|
|
34547
35498
|
};
|
|
34548
35499
|
|
|
34549
|
-
var NavMenuMobile$1 = themeComponent(NavMenuMobile, "NavMenu", fallbackValues$
|
|
35500
|
+
var NavMenuMobile$1 = themeComponent(NavMenuMobile, "NavMenu", fallbackValues$t, "profile");
|
|
34550
35501
|
|
|
34551
35502
|
var AccountBillIcon = function AccountBillIcon() {
|
|
34552
35503
|
return /*#__PURE__*/React__default.createElement("svg", {
|
|
@@ -36038,18 +36989,17 @@ var TitleModule = function TitleModule(_ref) {
|
|
|
36038
36989
|
variant: "h6",
|
|
36039
36990
|
weight: FONT_WEIGHT_SEMIBOLD,
|
|
36040
36991
|
color: titleColor,
|
|
36041
|
-
|
|
36992
|
+
as: "h2"
|
|
36042
36993
|
}, title), /*#__PURE__*/React__default.createElement(Text$1, {
|
|
36043
36994
|
variant: "pS",
|
|
36044
|
-
color: subtitleColor
|
|
36045
|
-
"aria-level": "3"
|
|
36995
|
+
color: subtitleColor
|
|
36046
36996
|
}, subtitle)));
|
|
36047
36997
|
};
|
|
36048
36998
|
|
|
36049
36999
|
var color$9 = "#15749D";
|
|
36050
37000
|
var hoverColor$4 = "#116285";
|
|
36051
37001
|
var activeColor$5 = "#0E506D";
|
|
36052
|
-
var fallbackValues$
|
|
37002
|
+
var fallbackValues$u = {
|
|
36053
37003
|
color: color$9,
|
|
36054
37004
|
hoverColor: hoverColor$4,
|
|
36055
37005
|
activeColor: activeColor$5
|
|
@@ -36120,7 +37070,7 @@ var AutopayModal = function AutopayModal(_ref) {
|
|
|
36120
37070
|
}, modalExtraProps));
|
|
36121
37071
|
};
|
|
36122
37072
|
|
|
36123
|
-
var AutopayModalModule = themeComponent(AutopayModal, "AutopayModal", fallbackValues$
|
|
37073
|
+
var AutopayModalModule = themeComponent(AutopayModal, "AutopayModal", fallbackValues$u);
|
|
36124
37074
|
|
|
36125
37075
|
var AmountModule = function AmountModule(_ref) {
|
|
36126
37076
|
var totalAmountDue = _ref.totalAmountDue,
|
|
@@ -36656,7 +37606,7 @@ var PaymentButtonBar = function PaymentButtonBar(_ref) {
|
|
|
36656
37606
|
}, backButton, forwardButton)));
|
|
36657
37607
|
};
|
|
36658
37608
|
|
|
36659
|
-
var backgroundColor$
|
|
37609
|
+
var backgroundColor$8 = {
|
|
36660
37610
|
"default": "transparent",
|
|
36661
37611
|
small: "transparent"
|
|
36662
37612
|
};
|
|
@@ -36672,8 +37622,8 @@ var labeledAmountTotal = {
|
|
|
36672
37622
|
"default": "h6",
|
|
36673
37623
|
small: "pL"
|
|
36674
37624
|
};
|
|
36675
|
-
var fallbackValues$
|
|
36676
|
-
backgroundColor: backgroundColor$
|
|
37625
|
+
var fallbackValues$v = {
|
|
37626
|
+
backgroundColor: backgroundColor$8,
|
|
36677
37627
|
lineItem: lineItem,
|
|
36678
37628
|
labeledAmountSubtotal: labeledAmountSubtotal,
|
|
36679
37629
|
labeledAmountTotal: labeledAmountTotal
|
|
@@ -36836,7 +37786,7 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
36836
37786
|
});
|
|
36837
37787
|
};
|
|
36838
37788
|
|
|
36839
|
-
var PaymentDetails$1 = themeComponent(PaymentDetails, "PaymentDetails", fallbackValues$
|
|
37789
|
+
var PaymentDetails$1 = themeComponent(PaymentDetails, "PaymentDetails", fallbackValues$v, "default");
|
|
36840
37790
|
|
|
36841
37791
|
var linkColor$1 = {
|
|
36842
37792
|
"default": "#357fb8",
|
|
@@ -36858,7 +37808,7 @@ var modalLinkHoverFocus = {
|
|
|
36858
37808
|
"default": "",
|
|
36859
37809
|
footer: "outline: none; text-decoration: underline;"
|
|
36860
37810
|
};
|
|
36861
|
-
var fallbackValues$
|
|
37811
|
+
var fallbackValues$w = {
|
|
36862
37812
|
linkColor: linkColor$1,
|
|
36863
37813
|
fontSize: fontSize$8,
|
|
36864
37814
|
lineHeight: lineHeight$4,
|
|
@@ -36921,7 +37871,7 @@ var AccountAndRoutingModal = function AccountAndRoutingModal(_ref) {
|
|
|
36921
37871
|
});
|
|
36922
37872
|
};
|
|
36923
37873
|
|
|
36924
|
-
var AccountAndRoutingModal$1 = themeComponent(AccountAndRoutingModal, "AccountAndRoutingModal", fallbackValues$
|
|
37874
|
+
var AccountAndRoutingModal$1 = themeComponent(AccountAndRoutingModal, "AccountAndRoutingModal", fallbackValues$w, "default");
|
|
36925
37875
|
|
|
36926
37876
|
function _templateObject$z() {
|
|
36927
37877
|
var data = _taggedTemplateLiteral([""]);
|
|
@@ -37307,7 +38257,7 @@ var headingDisabledColor = "".concat(ATHENS_GREY);
|
|
|
37307
38257
|
var bodyBackgroundColor$1 = "#eeeeee";
|
|
37308
38258
|
var borderColor$2 = "".concat(GREY_CHATEAU);
|
|
37309
38259
|
var focusStyles$1 = "outline: none;";
|
|
37310
|
-
var fallbackValues$
|
|
38260
|
+
var fallbackValues$x = {
|
|
37311
38261
|
headingBackgroundColor: headingBackgroundColor$1,
|
|
37312
38262
|
headingDisabledColor: headingDisabledColor,
|
|
37313
38263
|
bodyBackgroundColor: bodyBackgroundColor$1,
|
|
@@ -37471,8 +38421,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
37471
38421
|
padding: section.titleIcon ? "0 0 0 8px" : "0"
|
|
37472
38422
|
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
37473
38423
|
variant: "p",
|
|
37474
|
-
color: CHARADE_GREY
|
|
37475
|
-
"aria-level": "3"
|
|
38424
|
+
color: CHARADE_GREY
|
|
37476
38425
|
}, section.title))), section.rightIcons && /*#__PURE__*/React__default.createElement(Cluster, {
|
|
37477
38426
|
childGap: "0.5rem"
|
|
37478
38427
|
}, section.rightIcons.map(function (icon) {
|
|
@@ -37499,7 +38448,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
37499
38448
|
})));
|
|
37500
38449
|
};
|
|
37501
38450
|
|
|
37502
|
-
var RadioSection$1 = themeComponent(RadioSection, "RadioSection", fallbackValues$
|
|
38451
|
+
var RadioSection$1 = themeComponent(RadioSection, "RadioSection", fallbackValues$x);
|
|
37503
38452
|
|
|
37504
38453
|
var RegistrationForm = function RegistrationForm(_ref) {
|
|
37505
38454
|
var _emailErrorMessages, _passwordErrorMessage;
|
|
@@ -37786,7 +38735,7 @@ var ResetPasswordSuccess = withWindowSize(ResetConfirmationForm$2);
|
|
|
37786
38735
|
var activeTabBackground = "#FFFFFF";
|
|
37787
38736
|
var activeTabAccent = "#15749D";
|
|
37788
38737
|
var activeTabHover = "#B8D5E1";
|
|
37789
|
-
var fallbackValues$
|
|
38738
|
+
var fallbackValues$y = {
|
|
37790
38739
|
activeTabBackground: activeTabBackground,
|
|
37791
38740
|
activeTabAccent: activeTabAccent,
|
|
37792
38741
|
activeTabHover: activeTabHover
|
|
@@ -37842,9 +38791,9 @@ var TabSidebar = function TabSidebar(_ref) {
|
|
|
37842
38791
|
})));
|
|
37843
38792
|
};
|
|
37844
38793
|
|
|
37845
|
-
var TabSidebar$1 = themeComponent(TabSidebar, "ProfileTab", fallbackValues$
|
|
38794
|
+
var TabSidebar$1 = themeComponent(TabSidebar, "ProfileTab", fallbackValues$y);
|
|
37846
38795
|
|
|
37847
|
-
var backgroundColor$
|
|
38796
|
+
var backgroundColor$9 = {
|
|
37848
38797
|
"default": "#ffffff",
|
|
37849
38798
|
footer: "#ffffff"
|
|
37850
38799
|
};
|
|
@@ -37872,8 +38821,8 @@ var modalLinkHoverFocus$1 = {
|
|
|
37872
38821
|
"default": "",
|
|
37873
38822
|
footer: "outline: none; text-decoration: underline;"
|
|
37874
38823
|
};
|
|
37875
|
-
var fallbackValues$
|
|
37876
|
-
backgroundColor: backgroundColor$
|
|
38824
|
+
var fallbackValues$z = {
|
|
38825
|
+
backgroundColor: backgroundColor$9,
|
|
37877
38826
|
linkColor: linkColor$2,
|
|
37878
38827
|
border: border$2,
|
|
37879
38828
|
fontSize: fontSize$9,
|
|
@@ -37936,7 +38885,7 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
|
|
|
37936
38885
|
});
|
|
37937
38886
|
};
|
|
37938
38887
|
|
|
37939
|
-
var TermsAndConditionsModal$1 = themeComponent(TermsAndConditionsModal, "TermsAndConditionsModal", fallbackValues$
|
|
38888
|
+
var TermsAndConditionsModal$1 = themeComponent(TermsAndConditionsModal, "TermsAndConditionsModal", fallbackValues$z, "default");
|
|
37940
38889
|
|
|
37941
38890
|
function _templateObject2$l() {
|
|
37942
38891
|
var data = _taggedTemplateLiteral([""]);
|
|
@@ -38060,6 +39009,65 @@ var Timeout = function Timeout(_ref) {
|
|
|
38060
39009
|
|
|
38061
39010
|
var Timeout$1 = withWindowSize(Timeout);
|
|
38062
39011
|
|
|
39012
|
+
var fontWeight$7 = "600";
|
|
39013
|
+
var fontColor$1 = WHITE;
|
|
39014
|
+
var textAlign$1 = "left";
|
|
39015
|
+
var headerBackgroundColor = BRIGHT_GREY;
|
|
39016
|
+
var imageBackgroundColor = MATISSE_BLUE;
|
|
39017
|
+
var fallbackValues$A = {
|
|
39018
|
+
fontWeight: fontWeight$7,
|
|
39019
|
+
fontColor: fontColor$1,
|
|
39020
|
+
textAlign: textAlign$1,
|
|
39021
|
+
headerBackgroundColor: headerBackgroundColor,
|
|
39022
|
+
imageBackgroundColor: imageBackgroundColor
|
|
39023
|
+
};
|
|
39024
|
+
|
|
39025
|
+
function _templateObject$C() {
|
|
39026
|
+
var data = _taggedTemplateLiteral(["\n width: 100%;\n height: auto;\n"]);
|
|
39027
|
+
|
|
39028
|
+
_templateObject$C = function _templateObject() {
|
|
39029
|
+
return data;
|
|
39030
|
+
};
|
|
39031
|
+
|
|
39032
|
+
return data;
|
|
39033
|
+
}
|
|
39034
|
+
var WelcomeImage = styled__default.img(_templateObject$C());
|
|
39035
|
+
|
|
39036
|
+
var WelcomeModule = function WelcomeModule(_ref) {
|
|
39037
|
+
var heading = _ref.heading,
|
|
39038
|
+
isMobile = _ref.isMobile,
|
|
39039
|
+
themeValues = _ref.themeValues;
|
|
39040
|
+
var welcomeImage = "https://cb-public-assets.s3-us-west-2.amazonaws.com/profile-assets/profile-welcome-image.png";
|
|
39041
|
+
return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(Box, {
|
|
39042
|
+
padding: "0"
|
|
39043
|
+
}, isMobile && /*#__PURE__*/React__default.createElement(Box, {
|
|
39044
|
+
padding: "0",
|
|
39045
|
+
background: themeValues.imageBackgroundColor
|
|
39046
|
+
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
39047
|
+
justify: "center"
|
|
39048
|
+
}, /*#__PURE__*/React__default.createElement(WelcomeImage, {
|
|
39049
|
+
src: welcomeImage
|
|
39050
|
+
}))), /*#__PURE__*/React__default.createElement(Box, {
|
|
39051
|
+
background: themeValues.headerBackgroundColor
|
|
39052
|
+
}, /*#__PURE__*/React__default.createElement(Heading$1, {
|
|
39053
|
+
variant: "h5",
|
|
39054
|
+
weight: themeValues.fontWeight,
|
|
39055
|
+
color: themeValues.fontColor,
|
|
39056
|
+
textAlign: themeValues.textAlign,
|
|
39057
|
+
as: "h5"
|
|
39058
|
+
}, heading)), !isMobile && /*#__PURE__*/React__default.createElement(Box, {
|
|
39059
|
+
padding: "0",
|
|
39060
|
+
background: themeValues.imageBackgroundColor
|
|
39061
|
+
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
39062
|
+
justify: "center",
|
|
39063
|
+
align: "flex-end"
|
|
39064
|
+
}, /*#__PURE__*/React__default.createElement(WelcomeImage, {
|
|
39065
|
+
src: welcomeImage
|
|
39066
|
+
})))));
|
|
39067
|
+
};
|
|
39068
|
+
|
|
39069
|
+
var WelcomeModule$1 = /*#__PURE__*/React.memo(themeComponent(WelcomeModule, "WelcomeModule", fallbackValues$A));
|
|
39070
|
+
|
|
38063
39071
|
var WorkflowTile = function WorkflowTile(_ref) {
|
|
38064
39072
|
var _ref$workflowName = _ref.workflowName,
|
|
38065
39073
|
workflowName = _ref$workflowName === void 0 ? "Test Workflow" : _ref$workflowName,
|
|
@@ -38106,7 +39114,7 @@ var WorkflowTile = function WorkflowTile(_ref) {
|
|
|
38106
39114
|
};
|
|
38107
39115
|
|
|
38108
39116
|
var pageBackground = "#F6F6F9";
|
|
38109
|
-
var fallbackValues$
|
|
39117
|
+
var fallbackValues$B = {
|
|
38110
39118
|
pageBackground: pageBackground
|
|
38111
39119
|
};
|
|
38112
39120
|
|
|
@@ -38153,7 +39161,7 @@ var CenterSingle = function CenterSingle(_ref) {
|
|
|
38153
39161
|
})));
|
|
38154
39162
|
};
|
|
38155
39163
|
|
|
38156
|
-
var CenterSingle$1 = withWindowSize(themeComponent(CenterSingle, "Global", fallbackValues$
|
|
39164
|
+
var CenterSingle$1 = withWindowSize(themeComponent(CenterSingle, "Global", fallbackValues$B));
|
|
38157
39165
|
|
|
38158
39166
|
var CenterStack = function CenterStack(_ref) {
|
|
38159
39167
|
var header = _ref.header,
|
|
@@ -38195,7 +39203,7 @@ var CenterStack = function CenterStack(_ref) {
|
|
|
38195
39203
|
})));
|
|
38196
39204
|
};
|
|
38197
39205
|
|
|
38198
|
-
var CenterStack$1 = withWindowSize(themeComponent(CenterStack, "Global", fallbackValues$
|
|
39206
|
+
var CenterStack$1 = withWindowSize(themeComponent(CenterStack, "Global", fallbackValues$B));
|
|
38199
39207
|
|
|
38200
39208
|
var CenterSingle$2 = function CenterSingle(_ref) {
|
|
38201
39209
|
var header = _ref.header,
|
|
@@ -38235,7 +39243,7 @@ var CenterSingle$2 = function CenterSingle(_ref) {
|
|
|
38235
39243
|
})));
|
|
38236
39244
|
};
|
|
38237
39245
|
|
|
38238
|
-
var DefaultPageTemplate = withWindowSize(themeComponent(CenterSingle$2, "Global", fallbackValues$
|
|
39246
|
+
var DefaultPageTemplate = withWindowSize(themeComponent(CenterSingle$2, "Global", fallbackValues$B));
|
|
38239
39247
|
|
|
38240
39248
|
var SidebarSingleContent = function SidebarSingleContent(_ref) {
|
|
38241
39249
|
var header = _ref.header,
|
|
@@ -38289,7 +39297,7 @@ var SidebarSingleContent = function SidebarSingleContent(_ref) {
|
|
|
38289
39297
|
})));
|
|
38290
39298
|
};
|
|
38291
39299
|
|
|
38292
|
-
var SidebarSingleContent$1 = withWindowSize(themeComponent(SidebarSingleContent, "Global", fallbackValues$
|
|
39300
|
+
var SidebarSingleContent$1 = withWindowSize(themeComponent(SidebarSingleContent, "Global", fallbackValues$B));
|
|
38293
39301
|
|
|
38294
39302
|
var SidebarStackContent = function SidebarStackContent(_ref) {
|
|
38295
39303
|
var header = _ref.header,
|
|
@@ -38360,7 +39368,7 @@ var SidebarStackContent = function SidebarStackContent(_ref) {
|
|
|
38360
39368
|
})));
|
|
38361
39369
|
};
|
|
38362
39370
|
|
|
38363
|
-
var SidebarStackContent$1 = withWindowSize(themeComponent(SidebarStackContent, "Global", fallbackValues$
|
|
39371
|
+
var SidebarStackContent$1 = withWindowSize(themeComponent(SidebarStackContent, "Global", fallbackValues$B));
|
|
38364
39372
|
|
|
38365
39373
|
|
|
38366
39374
|
|
|
@@ -38489,7 +39497,9 @@ exports.Timeout = Timeout$1;
|
|
|
38489
39497
|
exports.TimeoutImage = TimeoutImage;
|
|
38490
39498
|
exports.ToggleSwitch = ToggleSwitch$1;
|
|
38491
39499
|
exports.VerifiedEmailIcon = VerifiedEmailIcon$1;
|
|
39500
|
+
exports.WelcomeModule = WelcomeModule$1;
|
|
38492
39501
|
exports.WorkflowTile = WorkflowTile;
|
|
39502
|
+
exports.cardRegistry = cardRegistry;
|
|
38493
39503
|
exports.constants = index$4;
|
|
38494
39504
|
exports.createPartialAmountFormState = createPartialAmountFormState;
|
|
38495
39505
|
exports.util = index$5;
|