@thecb/components 4.0.6 → 4.0.10
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/.tool-versions +1 -0
- package/dist/index.cjs.js +1341 -326
- 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/form-layouts/FormLayouts.theme.js +2 -2
- package/src/components/atoms/heading/Heading.js +3 -1
- package/src/components/atoms/icons/PropertiesAddIcon.js +1 -6
- package/src/components/atoms/index.js +1 -0
- package/src/components/atoms/labeled-amount/LabeledAmount.js +3 -1
- 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/module/Module.js +1 -2
- package/src/components/molecules/module/Module.theme.js +1 -1
- package/src/components/molecules/obligation/modules/TitleModule.js +2 -2
- package/src/components/molecules/payment-details/PaymentDetails.js +3 -2
- package/src/components/molecules/radio-section/RadioSection.js +2 -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
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"
|
|
@@ -14339,12 +14338,15 @@ var Heading = function Heading(_ref) {
|
|
|
14339
14338
|
className = _ref.className,
|
|
14340
14339
|
_ref$variant = _ref.variant,
|
|
14341
14340
|
variant = _ref$variant === void 0 ? "h1" : _ref$variant,
|
|
14341
|
+
_ref$as = _ref.as,
|
|
14342
|
+
as = _ref$as === void 0 ? variant : _ref$as,
|
|
14342
14343
|
dataQa = _ref.dataQa,
|
|
14343
14344
|
children = _ref.children,
|
|
14344
|
-
rest = _objectWithoutProperties(_ref, ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "dataQa", "children"]);
|
|
14345
|
+
rest = _objectWithoutProperties(_ref, ["themeValues", "weight", "color", "margin", "textAlign", "extraStyles", "className", "variant", "as", "dataQa", "children"]);
|
|
14345
14346
|
|
|
14346
14347
|
return /*#__PURE__*/React__default.createElement(HeadingText, _extends({
|
|
14347
|
-
|
|
14348
|
+
variant: variant,
|
|
14349
|
+
as: as,
|
|
14348
14350
|
weight: weight,
|
|
14349
14351
|
color: color,
|
|
14350
14352
|
margin: margin,
|
|
@@ -16264,7 +16266,198 @@ var ButtonWithLink = function ButtonWithLink(_ref) {
|
|
|
16264
16266
|
})));
|
|
16265
16267
|
};
|
|
16266
16268
|
|
|
16267
|
-
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 = {
|
|
16268
16461
|
"default": "".concat(TRANSPARENT)
|
|
16269
16462
|
};
|
|
16270
16463
|
var textFontSize = {
|
|
@@ -16300,8 +16493,8 @@ var checkedStyles = {
|
|
|
16300
16493
|
var defaultStyles = {
|
|
16301
16494
|
"default": "\n background: ".concat(WHITE, "; \n border: 1px solid ").concat(GHOST_GREY, ";\n")
|
|
16302
16495
|
};
|
|
16303
|
-
var fallbackValues$
|
|
16304
|
-
backgroundColor: backgroundColor$
|
|
16496
|
+
var fallbackValues$a = {
|
|
16497
|
+
backgroundColor: backgroundColor$2,
|
|
16305
16498
|
textFontSize: textFontSize,
|
|
16306
16499
|
textFontWeight: textFontWeight,
|
|
16307
16500
|
textLineHeight: textLineHeight,
|
|
@@ -16505,7 +16698,7 @@ var Checkbox = function Checkbox(_ref4) {
|
|
|
16505
16698
|
}, title)));
|
|
16506
16699
|
};
|
|
16507
16700
|
|
|
16508
|
-
var Checkbox$1 = themeComponent(Checkbox, "Checkbox", fallbackValues$
|
|
16701
|
+
var Checkbox$1 = themeComponent(Checkbox, "Checkbox", fallbackValues$a, "default");
|
|
16509
16702
|
|
|
16510
16703
|
var listBackgroundColor = {
|
|
16511
16704
|
"default": "".concat(ATHENS_GREY),
|
|
@@ -16531,7 +16724,7 @@ var radioButtonInactive = {
|
|
|
16531
16724
|
"default": "".concat(GHOST_GREY),
|
|
16532
16725
|
disabled: "".concat(GHOST_GREY)
|
|
16533
16726
|
};
|
|
16534
|
-
var fallbackValues$
|
|
16727
|
+
var fallbackValues$b = {
|
|
16535
16728
|
listBackgroundColor: listBackgroundColor,
|
|
16536
16729
|
listItemColor: listItemColor,
|
|
16537
16730
|
listItemBackgroundColor: listItemBackgroundColor,
|
|
@@ -16735,7 +16928,7 @@ var CheckboxList = function CheckboxList(_ref2) {
|
|
|
16735
16928
|
})));
|
|
16736
16929
|
};
|
|
16737
16930
|
|
|
16738
|
-
var CheckboxList$1 = themeComponent(CheckboxList, "CheckboxList", fallbackValues$
|
|
16931
|
+
var CheckboxList$1 = themeComponent(CheckboxList, "CheckboxList", fallbackValues$b, "default");
|
|
16739
16932
|
|
|
16740
16933
|
var DropdownIcon = function DropdownIcon() {
|
|
16741
16934
|
return /*#__PURE__*/React__default.createElement("svg", {
|
|
@@ -16765,7 +16958,7 @@ var DropdownIcon = function DropdownIcon() {
|
|
|
16765
16958
|
|
|
16766
16959
|
var selectedColor = "".concat(MATISSE_BLUE);
|
|
16767
16960
|
var hoverColor$3 = "".concat(HOVER_LIGHT_BLUE);
|
|
16768
|
-
var fallbackValues$
|
|
16961
|
+
var fallbackValues$c = {
|
|
16769
16962
|
selectedColor: selectedColor,
|
|
16770
16963
|
hoverColor: hoverColor$3
|
|
16771
16964
|
};
|
|
@@ -17042,7 +17235,7 @@ var Dropdown = function Dropdown(_ref7) {
|
|
|
17042
17235
|
}))) : /*#__PURE__*/React__default.createElement(React.Fragment, null));
|
|
17043
17236
|
};
|
|
17044
17237
|
|
|
17045
|
-
var Dropdown$1 = themeComponent(Dropdown, "Dropdown", fallbackValues$
|
|
17238
|
+
var Dropdown$1 = themeComponent(Dropdown, "Dropdown", fallbackValues$c);
|
|
17046
17239
|
|
|
17047
17240
|
function _templateObject4$3() {
|
|
17048
17241
|
var data = _taggedTemplateLiteral([""]);
|
|
@@ -17918,10 +18111,10 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
17918
18111
|
});
|
|
17919
18112
|
};
|
|
17920
18113
|
|
|
17921
|
-
var backgroundColor$
|
|
18114
|
+
var backgroundColor$3 = WHITE;
|
|
17922
18115
|
var boxShadow = "0px 2px 14px 0px ".concat(ATHENS_GREY, ", 0px 3px 8px 0px ").concat(GHOST_GREY);
|
|
17923
|
-
var fallbackValues$
|
|
17924
|
-
backgroundColor: backgroundColor$
|
|
18116
|
+
var fallbackValues$d = {
|
|
18117
|
+
backgroundColor: backgroundColor$3,
|
|
17925
18118
|
boxShadow: boxShadow
|
|
17926
18119
|
};
|
|
17927
18120
|
|
|
@@ -17941,7 +18134,7 @@ var DisplayBox = function DisplayBox(_ref) {
|
|
|
17941
18134
|
}, children));
|
|
17942
18135
|
};
|
|
17943
18136
|
|
|
17944
|
-
var DisplayBox$1 = themeComponent(DisplayBox, "DisplayBox", fallbackValues$
|
|
18137
|
+
var DisplayBox$1 = themeComponent(DisplayBox, "DisplayBox", fallbackValues$d);
|
|
17945
18138
|
|
|
17946
18139
|
var fontFamily$3 = {
|
|
17947
18140
|
p: "Public Sans",
|
|
@@ -17959,7 +18152,7 @@ var fontSize$4 = {
|
|
|
17959
18152
|
pXXS: "0.65rem",
|
|
17960
18153
|
pXL: "1.5rem"
|
|
17961
18154
|
};
|
|
17962
|
-
var fallbackValues$
|
|
18155
|
+
var fallbackValues$e = {
|
|
17963
18156
|
fontFamily: fontFamily$3,
|
|
17964
18157
|
fontSize: fontSize$4
|
|
17965
18158
|
};
|
|
@@ -18005,7 +18198,8 @@ var Paragraph = function Paragraph(_ref) {
|
|
|
18005
18198
|
extraStyles = _ref$extraStyles === void 0 ? "" : _ref$extraStyles,
|
|
18006
18199
|
dataQa = _ref.dataQa,
|
|
18007
18200
|
children = _ref.children,
|
|
18008
|
-
|
|
18201
|
+
as = _ref.as,
|
|
18202
|
+
rest = _objectWithoutProperties(_ref, ["themeValues", "weight", "color", "margin", "extraStyles", "dataQa", "children", "as"]);
|
|
18009
18203
|
|
|
18010
18204
|
return /*#__PURE__*/React__default.createElement(ParagraphText, _extends({
|
|
18011
18205
|
weight: weight,
|
|
@@ -18013,12 +18207,13 @@ var Paragraph = function Paragraph(_ref) {
|
|
|
18013
18207
|
margin: margin,
|
|
18014
18208
|
fontFamily: themeValues.fontFamily,
|
|
18015
18209
|
fontSize: themeValues.fontSize,
|
|
18210
|
+
as: as,
|
|
18016
18211
|
extraStyles: extraStyles,
|
|
18017
18212
|
"data-qa": dataQa
|
|
18018
18213
|
}, rest), safeChildren(children, /*#__PURE__*/React__default.createElement("span", null)));
|
|
18019
18214
|
};
|
|
18020
18215
|
|
|
18021
|
-
var Paragraph$1 = themeComponent(Paragraph, "Paragraph", fallbackValues$
|
|
18216
|
+
var Paragraph$1 = themeComponent(Paragraph, "Paragraph", fallbackValues$e, "p");
|
|
18022
18217
|
|
|
18023
18218
|
var DisplayCard = function DisplayCard(_ref) {
|
|
18024
18219
|
var title = _ref.title,
|
|
@@ -18384,8 +18579,8 @@ var color$5 = {
|
|
|
18384
18579
|
disabled: "".concat(DUSTY_GREY)
|
|
18385
18580
|
};
|
|
18386
18581
|
var labelColor = {
|
|
18387
|
-
"default": "".concat(
|
|
18388
|
-
disabled: "".concat(
|
|
18582
|
+
"default": "".concat(FIREFLY_GREY),
|
|
18583
|
+
disabled: "".concat(FIREFLY_GREY)
|
|
18389
18584
|
};
|
|
18390
18585
|
var borderColor = {
|
|
18391
18586
|
"default": "".concat(GREY_CHATEAU),
|
|
@@ -18411,7 +18606,7 @@ var hoverFocusStyles = {
|
|
|
18411
18606
|
"default": "color: #0E506D; outline: none; text-decoration: underline; ",
|
|
18412
18607
|
disabled: "color: #6E727E;"
|
|
18413
18608
|
};
|
|
18414
|
-
var fallbackValues$
|
|
18609
|
+
var fallbackValues$f = {
|
|
18415
18610
|
linkColor: linkColor,
|
|
18416
18611
|
formBackgroundColor: formBackgroundColor,
|
|
18417
18612
|
inputBackgroundColor: inputBackgroundColor,
|
|
@@ -18638,7 +18833,7 @@ var FormInput = function FormInput(_ref13) {
|
|
|
18638
18833
|
}, decorator)));
|
|
18639
18834
|
};
|
|
18640
18835
|
|
|
18641
|
-
var FormInput$1 = themeComponent(FormInput, "FormInput", fallbackValues$
|
|
18836
|
+
var FormInput$1 = themeComponent(FormInput, "FormInput", fallbackValues$f, "default");
|
|
18642
18837
|
|
|
18643
18838
|
var FormInputRow = function FormInputRow(_ref) {
|
|
18644
18839
|
var _ref$breakpoint = _ref.breakpoint,
|
|
@@ -18673,61 +18868,6 @@ var FormInputColumn = function FormInputColumn(_ref) {
|
|
|
18673
18868
|
}, rest), children);
|
|
18674
18869
|
};
|
|
18675
18870
|
|
|
18676
|
-
var MOBILE_WIDTH = 768;
|
|
18677
|
-
|
|
18678
|
-
var throttle = function throttle(delay, fn) {
|
|
18679
|
-
var lastCall = 0;
|
|
18680
|
-
return function () {
|
|
18681
|
-
var now = new Date().getTime();
|
|
18682
|
-
|
|
18683
|
-
if (now - lastCall < delay) {
|
|
18684
|
-
return;
|
|
18685
|
-
}
|
|
18686
|
-
|
|
18687
|
-
lastCall = now;
|
|
18688
|
-
return fn.apply(void 0, arguments);
|
|
18689
|
-
};
|
|
18690
|
-
};
|
|
18691
|
-
|
|
18692
|
-
var withWindowSize = function withWindowSize(Child) {
|
|
18693
|
-
return function (_ref) {
|
|
18694
|
-
var props = _extends({}, _ref);
|
|
18695
|
-
|
|
18696
|
-
var _useState = React.useState({
|
|
18697
|
-
isMobile: window.innerWidth < MOBILE_WIDTH,
|
|
18698
|
-
mobileWidth: MOBILE_WIDTH,
|
|
18699
|
-
supportsTouch: "ontouchstart" in window || navigator.maxTouchPoints > 1
|
|
18700
|
-
}),
|
|
18701
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
18702
|
-
state = _useState2[0],
|
|
18703
|
-
setState = _useState2[1];
|
|
18704
|
-
|
|
18705
|
-
var isMobileRef = React.useRef(state.isMobile);
|
|
18706
|
-
var onResize = throttle(25, function () {
|
|
18707
|
-
var width = window.innerWidth;
|
|
18708
|
-
var newMobileState = width <= MOBILE_WIDTH;
|
|
18709
|
-
|
|
18710
|
-
if (newMobileState !== isMobileRef.current) {
|
|
18711
|
-
isMobileRef.current = newMobileState;
|
|
18712
|
-
setState({
|
|
18713
|
-
isMobile: width <= MOBILE_WIDTH,
|
|
18714
|
-
mobileWidth: MOBILE_WIDTH,
|
|
18715
|
-
supportsTouch: "ontouchstart" in window || navigator.maxTouchPoints > 1
|
|
18716
|
-
});
|
|
18717
|
-
}
|
|
18718
|
-
});
|
|
18719
|
-
React.useLayoutEffect(function () {
|
|
18720
|
-
window.addEventListener("resize", onResize);
|
|
18721
|
-
return function () {
|
|
18722
|
-
window.removeEventListener("resize", onResize);
|
|
18723
|
-
};
|
|
18724
|
-
}, []);
|
|
18725
|
-
return /*#__PURE__*/React__default.createElement(styled.ThemeProvider, {
|
|
18726
|
-
theme: state
|
|
18727
|
-
}, /*#__PURE__*/React__default.createElement(Child, props));
|
|
18728
|
-
};
|
|
18729
|
-
};
|
|
18730
|
-
|
|
18731
18871
|
var FormContainer = function FormContainer(_ref) {
|
|
18732
18872
|
var themeValues = _ref.themeValues,
|
|
18733
18873
|
children = _ref.children,
|
|
@@ -18743,7 +18883,7 @@ var FormContainer = function FormContainer(_ref) {
|
|
|
18743
18883
|
}, rest), children);
|
|
18744
18884
|
};
|
|
18745
18885
|
|
|
18746
|
-
var FormContainer$1 = themeComponent(withWindowSize(FormContainer), "FormContainer", fallbackValues$
|
|
18886
|
+
var FormContainer$1 = themeComponent(withWindowSize(FormContainer), "FormContainer", fallbackValues$f, "default");
|
|
18747
18887
|
|
|
18748
18888
|
var fontSize$6 = {
|
|
18749
18889
|
"default": "1rem",
|
|
@@ -18757,7 +18897,7 @@ var color$6 = {
|
|
|
18757
18897
|
"default": "".concat(CHARADE_GREY),
|
|
18758
18898
|
radio: "".concat(MINESHAFT_GREY)
|
|
18759
18899
|
};
|
|
18760
|
-
var fallbackValues$
|
|
18900
|
+
var fallbackValues$g = {
|
|
18761
18901
|
fontSize: fontSize$6,
|
|
18762
18902
|
padding: padding$1,
|
|
18763
18903
|
color: color$6
|
|
@@ -18800,11 +18940,11 @@ var FormattedAddress = function FormattedAddress(_ref) {
|
|
|
18800
18940
|
}, city, ", ", stateProvince, " ".concat(zip), country ? " ".concat(country) : "")));
|
|
18801
18941
|
};
|
|
18802
18942
|
|
|
18803
|
-
var FormattedAddress$1 = themeComponent(FormattedAddress, "FormattedAddress", fallbackValues$
|
|
18943
|
+
var FormattedAddress$1 = themeComponent(FormattedAddress, "FormattedAddress", fallbackValues$g, "default");
|
|
18804
18944
|
|
|
18805
18945
|
var textColor$1 = "".concat(CHARADE_GREY);
|
|
18806
18946
|
var autopayTextColor = "".concat(REGENT_GREY);
|
|
18807
|
-
var fallbackValues$
|
|
18947
|
+
var fallbackValues$h = {
|
|
18808
18948
|
textColor: textColor$1,
|
|
18809
18949
|
autopayTextColor: autopayTextColor
|
|
18810
18950
|
};
|
|
@@ -18857,7 +18997,7 @@ var FormattedCreditCard = function FormattedCreditCard(_ref) {
|
|
|
18857
18997
|
}, "Autopay Enabled")));
|
|
18858
18998
|
};
|
|
18859
18999
|
|
|
18860
|
-
var FormattedCreditCard$1 = themeComponent(FormattedCreditCard, "FormattedCreditCard", fallbackValues$
|
|
19000
|
+
var FormattedCreditCard$1 = themeComponent(FormattedCreditCard, "FormattedCreditCard", fallbackValues$h, "default");
|
|
18861
19001
|
|
|
18862
19002
|
function _templateObject3$8() {
|
|
18863
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"]);
|
|
@@ -18980,7 +19120,7 @@ var fontWeight$3 = {
|
|
|
18980
19120
|
pL: "600",
|
|
18981
19121
|
h6: "700"
|
|
18982
19122
|
};
|
|
18983
|
-
var fallbackValues$
|
|
19123
|
+
var fallbackValues$i = {
|
|
18984
19124
|
fontWeight: fontWeight$3
|
|
18985
19125
|
};
|
|
18986
19126
|
|
|
@@ -18989,22 +19129,25 @@ var LabeledAmount = function LabeledAmount(_ref) {
|
|
|
18989
19129
|
variant = _ref$variant === void 0 ? "pL" : _ref$variant,
|
|
18990
19130
|
label = _ref.label,
|
|
18991
19131
|
amount = _ref.amount,
|
|
18992
|
-
themeValues = _ref.themeValues
|
|
19132
|
+
themeValues = _ref.themeValues,
|
|
19133
|
+
as = _ref.as;
|
|
18993
19134
|
var LabeledAmountText = variant === "h6" ? Heading$1 : Paragraph$1;
|
|
18994
19135
|
return /*#__PURE__*/React__default.createElement(Stack, {
|
|
18995
19136
|
direction: "row"
|
|
18996
19137
|
}, /*#__PURE__*/React__default.createElement(LabeledAmountText, {
|
|
18997
19138
|
variant: variant,
|
|
19139
|
+
as: as,
|
|
18998
19140
|
weight: themeValues.fontWeight,
|
|
18999
19141
|
extraStyles: "text-align: start; flex: 3;"
|
|
19000
19142
|
}, label, ":"), /*#__PURE__*/React__default.createElement(LabeledAmountText, {
|
|
19001
19143
|
variant: variant,
|
|
19144
|
+
as: as,
|
|
19002
19145
|
weight: themeValues.fontWeight,
|
|
19003
19146
|
extraStyles: "text-align: end; flex: 1;"
|
|
19004
19147
|
}, amount));
|
|
19005
19148
|
};
|
|
19006
19149
|
|
|
19007
|
-
var LabeledAmount$1 = themeComponent(LabeledAmount, "LabeledAmount", fallbackValues$
|
|
19150
|
+
var LabeledAmount$1 = themeComponent(LabeledAmount, "LabeledAmount", fallbackValues$i, "default");
|
|
19008
19151
|
|
|
19009
19152
|
var weightTitle = {
|
|
19010
19153
|
"default": "600",
|
|
@@ -19014,7 +19157,7 @@ var paragraphVariant = {
|
|
|
19014
19157
|
"default": "pL",
|
|
19015
19158
|
small: "p"
|
|
19016
19159
|
};
|
|
19017
|
-
var fallbackValues$
|
|
19160
|
+
var fallbackValues$j = {
|
|
19018
19161
|
weightTitle: weightTitle,
|
|
19019
19162
|
paragraphVariant: paragraphVariant
|
|
19020
19163
|
};
|
|
@@ -19043,10 +19186,10 @@ var LineItem = function LineItem(_ref) {
|
|
|
19043
19186
|
}, amount));
|
|
19044
19187
|
};
|
|
19045
19188
|
|
|
19046
|
-
var LineItem$1 = themeComponent(LineItem, "LineItem", fallbackValues$
|
|
19189
|
+
var LineItem$1 = themeComponent(LineItem, "LineItem", fallbackValues$j, "default");
|
|
19047
19190
|
|
|
19048
19191
|
var color$7 = "#15749D";
|
|
19049
|
-
var fallbackValues$
|
|
19192
|
+
var fallbackValues$k = {
|
|
19050
19193
|
color: color$7
|
|
19051
19194
|
};
|
|
19052
19195
|
|
|
@@ -19098,7 +19241,7 @@ var Spinner$1 = function Spinner(_ref4) {
|
|
|
19098
19241
|
})));
|
|
19099
19242
|
};
|
|
19100
19243
|
|
|
19101
|
-
var Spinner$2 = themeComponent(Spinner$1, "Spinner", fallbackValues$
|
|
19244
|
+
var Spinner$2 = themeComponent(Spinner$1, "Spinner", fallbackValues$k);
|
|
19102
19245
|
|
|
19103
19246
|
var Loading = function Loading() {
|
|
19104
19247
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -19343,174 +19486,986 @@ function _templateObject2$h() {
|
|
|
19343
19486
|
return data;
|
|
19344
19487
|
};
|
|
19345
19488
|
|
|
19346
|
-
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);
|
|
19347
20352
|
}
|
|
19348
20353
|
|
|
19349
|
-
|
|
19350
|
-
|
|
19351
|
-
|
|
19352
|
-
|
|
19353
|
-
|
|
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);
|
|
19354
20363
|
};
|
|
20364
|
+
} // eslint-disable-next-line no-redeclare
|
|
19355
20365
|
|
|
19356
|
-
return data;
|
|
19357
|
-
}
|
|
19358
20366
|
|
|
19359
|
-
|
|
19360
|
-
|
|
19361
|
-
|
|
19362
|
-
|
|
19363
|
-
var EMAIL_ERROR = "email_error";
|
|
19364
|
-
var HAS_NUMBER_ERROR = "error/HAS_NUMBER";
|
|
19365
|
-
var HAS_UPPERCASE_LETTER_ERROR = "error/HAS_UPPERCASE_LETTER";
|
|
19366
|
-
var HAS_LOWERCASE_LETTER_ERROR = "error/HAS_LOWERCASE_LETTER";
|
|
19367
|
-
var HAS_SPECIAL_CHARACTER_ERROR = "error/HAS_SPECIAL_CHARACTER";
|
|
19368
|
-
var ONLY_NUMBERS_ERROR = "only_numbers_error";
|
|
19369
|
-
var ONLY_LETTERS_ERROR = "only_letters_error";
|
|
19370
|
-
var REQUIRED_FIELD_ERROR = "required_field_error";
|
|
19371
|
-
var NUM_GREATER_THAN_ERROR = "num_greater_than_error";
|
|
19372
|
-
var NUM_LESS_THAN_ERROR = "num_less_than_error";
|
|
19373
|
-
var MATCHES_FIELD_ERROR = "matches_field_error";
|
|
19374
|
-
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
|
+
}
|
|
19375
20371
|
|
|
19376
|
-
|
|
19377
|
-
|
|
19378
|
-
|
|
19379
|
-
|
|
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
|
+
*/
|
|
19380
20398
|
|
|
19381
|
-
|
|
19382
|
-
|
|
19383
|
-
|
|
19384
|
-
|
|
19385
|
-
|
|
19386
|
-
};
|
|
19387
|
-
/*
|
|
19388
|
-
What's going on here? This looks weird, you may ask...
|
|
19389
|
-
DEFAULT_ERROR_MESSAGES is a map between the error constants (which are returned by validators)
|
|
19390
|
-
and some tagged template literals.
|
|
19391
|
-
In this case, the template tag function is curried and returns a function which accepts an args object
|
|
19392
|
-
I'm calling that object inputState, but it could really be anything.
|
|
19393
|
-
When the error message string fucntion is called with that arg, it's reduced to produce a custom error message
|
|
19394
|
-
with interpolation.
|
|
19395
|
-
*/
|
|
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);
|
|
19396
20404
|
|
|
20405
|
+
var color1 = _extends$1({}, parsedColor1, {
|
|
20406
|
+
alpha: typeof parsedColor1.alpha === 'number' ? parsedColor1.alpha : 1
|
|
20407
|
+
});
|
|
19397
20408
|
|
|
19398
|
-
var
|
|
19399
|
-
|
|
19400
|
-
|
|
19401
|
-
|
|
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
|
|
19402
20431
|
|
|
19403
|
-
var INPUT_STATE_NEUTRAL = "NEUTRAL";
|
|
19404
|
-
var INPUT_STATE_INVALID = "INVALID";
|
|
19405
|
-
var INPUT_STATE_VALID = "VALID"; // Function to check the state of an input
|
|
19406
|
-
// This function is intended to be used with inputs that have multiple validators
|
|
19407
|
-
// Takes an input's state value, destructures for the input's error and showError booleans, list of errors
|
|
19408
|
-
// Also takes a list of the specific error constants to look for
|
|
19409
|
-
// If the input's showError property is false, the input has not been validated, and input state is NEUTRAL
|
|
19410
|
-
// If the input has an error, and showError is true, check if the errors we care about are in the input's error list
|
|
19411
|
-
// If yes, input state is INVALID
|
|
19412
|
-
// If input has no error and showError is true, or the errors we're looking for aren't present in the list
|
|
19413
|
-
// then input state is VALID
|
|
19414
|
-
// { error: Boolean, showError: Boolean, errorsList: Array<String> }, Array<String> -> String
|
|
19415
20432
|
|
|
19416
|
-
var
|
|
19417
|
-
|
|
19418
|
-
|
|
19419
|
-
errors = _ref.errors,
|
|
19420
|
-
rawValue = _ref.rawValue;
|
|
19421
|
-
var errorsToCheck = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
20433
|
+
var curriedMix = /*#__PURE__*/curry
|
|
20434
|
+
/* ::<number | string, string, string, string> */
|
|
20435
|
+
(mix$1);
|
|
19422
20436
|
|
|
19423
|
-
|
|
19424
|
-
|
|
19425
|
-
|
|
19426
|
-
|
|
19427
|
-
|
|
19428
|
-
|
|
19429
|
-
|
|
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
|
+
*/
|
|
19430
20459
|
|
|
19431
|
-
|
|
19432
|
-
|
|
20460
|
+
function tint(percentage, color) {
|
|
20461
|
+
if (color === 'transparent') return color;
|
|
20462
|
+
return curriedMix(parseFloat(percentage), 'rgb(255, 255, 255)', color);
|
|
20463
|
+
} // prettier-ignore
|
|
19433
20464
|
|
|
19434
|
-
var PasswordRequirements = function PasswordRequirements(_ref) {
|
|
19435
|
-
var _iconMap;
|
|
19436
20465
|
|
|
19437
|
-
|
|
19438
|
-
|
|
19439
|
-
|
|
19440
|
-
icon: /*#__PURE__*/React__default.createElement(IconNeutral, {
|
|
19441
|
-
margin: "0.125rem 0.5rem 0 0"
|
|
19442
|
-
}),
|
|
19443
|
-
color: MINESHAFT_GREY
|
|
19444
|
-
}), _defineProperty(_iconMap, INPUT_STATE_INVALID, {
|
|
19445
|
-
icon: /*#__PURE__*/React__default.createElement(IconInvalid, {
|
|
19446
|
-
margin: "0.125rem 0.5rem 0 0"
|
|
19447
|
-
}),
|
|
19448
|
-
color: RAZZMATAZZ_RED
|
|
19449
|
-
}), _defineProperty(_iconMap, INPUT_STATE_VALID, {
|
|
19450
|
-
icon: /*#__PURE__*/React__default.createElement(IconValid, {
|
|
19451
|
-
margin: "0.125rem 0.5rem 0 0"
|
|
19452
|
-
}),
|
|
19453
|
-
color: FOREST_GREEN
|
|
19454
|
-
}), _iconMap);
|
|
19455
|
-
var validationMap = {
|
|
19456
|
-
charactersValidation: {
|
|
19457
|
-
validationMessage: "Password must be 8 characters",
|
|
19458
|
-
validationRequirement: [MIN_LENGTH_ERROR]
|
|
19459
|
-
},
|
|
19460
|
-
numbersValidation: {
|
|
19461
|
-
validationMessage: "Password must contain at least one number",
|
|
19462
|
-
validationRequirement: [HAS_NUMBER_ERROR]
|
|
19463
|
-
},
|
|
19464
|
-
letterCaseValidation: {
|
|
19465
|
-
validationMessage: "Password must contain an upper and lower case letter",
|
|
19466
|
-
validationRequirement: [HAS_UPPERCASE_LETTER_ERROR, HAS_LOWERCASE_LETTER_ERROR]
|
|
19467
|
-
},
|
|
19468
|
-
specialCharacterValidation: {
|
|
19469
|
-
validationMessage: "Password must contain a special character (!@#$%^&*.?)",
|
|
19470
|
-
validationRequirement: [HAS_SPECIAL_CHARACTER_ERROR]
|
|
19471
|
-
}
|
|
19472
|
-
};
|
|
19473
|
-
return /*#__PURE__*/React__default.createElement(Box, {
|
|
19474
|
-
background: ATHENS_GREY,
|
|
19475
|
-
padding: isMobile ? "1rem" : "1.5rem",
|
|
19476
|
-
width: "100%"
|
|
19477
|
-
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
19478
|
-
justify: "center",
|
|
19479
|
-
align: "center"
|
|
19480
|
-
}, /*#__PURE__*/React__default.createElement(Stack, null, Object.values(validationMap).map(function (item) {
|
|
19481
|
-
return /*#__PURE__*/React__default.createElement(Box, {
|
|
19482
|
-
padding: "0",
|
|
19483
|
-
key: item.validationMessage
|
|
19484
|
-
}, /*#__PURE__*/React__default.createElement(Sidebar, {
|
|
19485
|
-
width: "24px",
|
|
19486
|
-
childGap: "0rem"
|
|
19487
|
-
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
19488
|
-
padding: "0",
|
|
19489
|
-
minHeight: "100%"
|
|
19490
|
-
}, /*#__PURE__*/React__default.createElement(Cover, {
|
|
19491
|
-
minHeight: "100%",
|
|
19492
|
-
singleChild: true
|
|
19493
|
-
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
19494
|
-
padding: "0"
|
|
19495
|
-
}, iconMap[getInputState(password, item.validationRequirement)].icon))), /*#__PURE__*/React__default.createElement(Box, {
|
|
19496
|
-
padding: "0"
|
|
19497
|
-
}, /*#__PURE__*/React__default.createElement(Sidebar, {
|
|
19498
|
-
onRight: true,
|
|
19499
|
-
childGap: "0rem"
|
|
19500
|
-
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
19501
|
-
padding: "0rem"
|
|
19502
|
-
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
19503
|
-
justify: "flex-start",
|
|
19504
|
-
align: "center"
|
|
19505
|
-
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
19506
|
-
fullHeight: true,
|
|
19507
|
-
childGap: "0.25rem"
|
|
19508
|
-
}, /*#__PURE__*/React__default.createElement(Paragraph$1, {
|
|
19509
|
-
variant: "pS",
|
|
19510
|
-
color: iconMap[getInputState(password, item.validationRequirement)].color
|
|
19511
|
-
}, item.validationMessage))))))));
|
|
19512
|
-
}))));
|
|
19513
|
-
};
|
|
20466
|
+
var curriedTint = /*#__PURE__*/curry
|
|
20467
|
+
/* ::<number | string, string, string> */
|
|
20468
|
+
(tint);
|
|
19514
20469
|
|
|
19515
20470
|
var color$8 = {
|
|
19516
20471
|
"default": "".concat(CHARADE_GREY),
|
|
@@ -19520,7 +20475,7 @@ var height$1 = {
|
|
|
19520
20475
|
"default": "3rem",
|
|
19521
20476
|
large: "192px"
|
|
19522
20477
|
};
|
|
19523
|
-
var fallbackValues$
|
|
20478
|
+
var fallbackValues$l = {
|
|
19524
20479
|
color: color$8,
|
|
19525
20480
|
height: height$1
|
|
19526
20481
|
};
|
|
@@ -19570,8 +20525,8 @@ var Placeholder = function Placeholder(_ref2) {
|
|
|
19570
20525
|
border: "none",
|
|
19571
20526
|
minHeight: themeValues.height,
|
|
19572
20527
|
hiddenStyles: !visible,
|
|
19573
|
-
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;"),
|
|
19574
|
-
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), ";")
|
|
19575
20530
|
}, /*#__PURE__*/React__default.createElement(Center, {
|
|
19576
20531
|
maxWidth: "300px"
|
|
19577
20532
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -19585,7 +20540,7 @@ var Placeholder = function Placeholder(_ref2) {
|
|
|
19585
20540
|
childGap: "0"
|
|
19586
20541
|
}, variant === "large" && /*#__PURE__*/React__default.createElement("div", null), /*#__PURE__*/React__default.createElement(Box, {
|
|
19587
20542
|
padding: "0",
|
|
19588
|
-
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 }")
|
|
19589
20544
|
}, variant === "large" ? /*#__PURE__*/React__default.createElement(Center, {
|
|
19590
20545
|
intrinsic: true
|
|
19591
20546
|
}, largeIcon === "accounts" ? /*#__PURE__*/React__default.createElement(AccountsAddIcon$1, null) : /*#__PURE__*/React__default.createElement(PropertiesAddIcon$1, null), /*#__PURE__*/React__default.createElement(Text$1, {
|
|
@@ -19609,13 +20564,13 @@ var Placeholder = function Placeholder(_ref2) {
|
|
|
19609
20564
|
}, text)))))))))));
|
|
19610
20565
|
};
|
|
19611
20566
|
|
|
19612
|
-
var Placeholder$1 = themeComponent(Placeholder, "Placeholder", fallbackValues$
|
|
20567
|
+
var Placeholder$1 = themeComponent(Placeholder, "Placeholder", fallbackValues$l, "default");
|
|
19613
20568
|
|
|
19614
|
-
var backgroundColor$
|
|
20569
|
+
var backgroundColor$4 = {
|
|
19615
20570
|
"default": "".concat(WHITE)
|
|
19616
20571
|
};
|
|
19617
|
-
var fallbackValues$
|
|
19618
|
-
backgroundColor: backgroundColor$
|
|
20572
|
+
var fallbackValues$m = {
|
|
20573
|
+
backgroundColor: backgroundColor$4
|
|
19619
20574
|
};
|
|
19620
20575
|
|
|
19621
20576
|
var ProcessingFee = function ProcessingFee(_ref) {
|
|
@@ -19642,11 +20597,11 @@ var ProcessingFee = function ProcessingFee(_ref) {
|
|
|
19642
20597
|
}));
|
|
19643
20598
|
};
|
|
19644
20599
|
|
|
19645
|
-
var ProcessingFee$1 = themeComponent(ProcessingFee, "ProcessingFee", fallbackValues$
|
|
20600
|
+
var ProcessingFee$1 = themeComponent(ProcessingFee, "ProcessingFee", fallbackValues$m, "default");
|
|
19646
20601
|
|
|
19647
20602
|
var activeColor$4 = "".concat(MATISSE_BLUE);
|
|
19648
20603
|
var inactiveColor = "".concat(GREY_CHATEAU);
|
|
19649
|
-
var fallbackValues$
|
|
20604
|
+
var fallbackValues$n = {
|
|
19650
20605
|
activeColor: activeColor$4,
|
|
19651
20606
|
inactiveColor: inactiveColor
|
|
19652
20607
|
};
|
|
@@ -19742,7 +20697,7 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
19742
20697
|
})));
|
|
19743
20698
|
};
|
|
19744
20699
|
|
|
19745
|
-
var RadioButton$2 = themeComponent(RadioButton$1, "RadioButton", fallbackValues$
|
|
20700
|
+
var RadioButton$2 = themeComponent(RadioButton$1, "RadioButton", fallbackValues$n);
|
|
19746
20701
|
|
|
19747
20702
|
var borderColor$1 = {
|
|
19748
20703
|
"default": "".concat(GREY_CHATEAU)
|
|
@@ -19750,7 +20705,7 @@ var borderColor$1 = {
|
|
|
19750
20705
|
var borderSize = {
|
|
19751
20706
|
"default": "1px"
|
|
19752
20707
|
};
|
|
19753
|
-
var fallbackValues$
|
|
20708
|
+
var fallbackValues$o = {
|
|
19754
20709
|
borderColor: borderColor$1,
|
|
19755
20710
|
borderSize: borderSize
|
|
19756
20711
|
};
|
|
@@ -19767,7 +20722,7 @@ var SolidDivider = function SolidDivider(_ref) {
|
|
|
19767
20722
|
});
|
|
19768
20723
|
};
|
|
19769
20724
|
|
|
19770
|
-
var SolidDivider$1 = themeComponent(SolidDivider, "SolidDivider", fallbackValues$
|
|
20725
|
+
var SolidDivider$1 = themeComponent(SolidDivider, "SolidDivider", fallbackValues$o, "default");
|
|
19771
20726
|
|
|
19772
20727
|
var placeHolderOptionUS = {
|
|
19773
20728
|
text: "Please select state",
|
|
@@ -30349,7 +31304,7 @@ var offBackground = "".concat(REGENT_GREY);
|
|
|
30349
31304
|
var labelStyles = "\n display: flex;\n justify-content: flex-start;\n align-items: center;\n";
|
|
30350
31305
|
var rightLabelStyles = "\n ".concat(labelStyles, "\n flex-direction: row;\n");
|
|
30351
31306
|
var leftLabelStyles = "\n ".concat(labelStyles, "\n flex-direction: row-reverse;\n");
|
|
30352
|
-
var fallbackValues$
|
|
31307
|
+
var fallbackValues$p = {
|
|
30353
31308
|
onBackground: onBackground,
|
|
30354
31309
|
disabledBackground: disabledBackground,
|
|
30355
31310
|
white: white,
|
|
@@ -30551,7 +31506,7 @@ var ToggleSwitch = function ToggleSwitch(_ref6) {
|
|
|
30551
31506
|
}, label))));
|
|
30552
31507
|
};
|
|
30553
31508
|
|
|
30554
|
-
var ToggleSwitch$1 = themeComponent(ToggleSwitch, "ToggleSwitch", fallbackValues$
|
|
31509
|
+
var ToggleSwitch$1 = themeComponent(ToggleSwitch, "ToggleSwitch", fallbackValues$p);
|
|
30555
31510
|
|
|
30556
31511
|
const validatorToPredicate = (validatorFn, emptyCase) => (
|
|
30557
31512
|
value,
|
|
@@ -32377,7 +33332,7 @@ var titleColor = "#292A33";
|
|
|
32377
33332
|
var headingBackgroundColor = "transparent";
|
|
32378
33333
|
var bodyBackgroundColor = "transparent";
|
|
32379
33334
|
var focusStyles = "outline: none;";
|
|
32380
|
-
var fallbackValues$
|
|
33335
|
+
var fallbackValues$q = {
|
|
32381
33336
|
titleColor: titleColor,
|
|
32382
33337
|
headingBackgroundColor: headingBackgroundColor,
|
|
32383
33338
|
bodyBackgroundColor: bodyBackgroundColor,
|
|
@@ -32460,7 +33415,7 @@ var CollapsibleSection = function CollapsibleSection(_ref) {
|
|
|
32460
33415
|
variant: "h6",
|
|
32461
33416
|
weight: FONT_WEIGHT_SEMIBOLD,
|
|
32462
33417
|
color: themeValues.titleColor,
|
|
32463
|
-
|
|
33418
|
+
as: "h6"
|
|
32464
33419
|
}, title), /*#__PURE__*/React__default.createElement(Motion, {
|
|
32465
33420
|
variants: icon,
|
|
32466
33421
|
style: {
|
|
@@ -32481,7 +33436,7 @@ var CollapsibleSection = function CollapsibleSection(_ref) {
|
|
|
32481
33436
|
}, children))));
|
|
32482
33437
|
};
|
|
32483
33438
|
|
|
32484
|
-
var CollapsibleSection$1 = themeComponent(CollapsibleSection, "CollapsibleSection", fallbackValues$
|
|
33439
|
+
var CollapsibleSection$1 = themeComponent(CollapsibleSection, "CollapsibleSection", fallbackValues$q);
|
|
32485
33440
|
|
|
32486
33441
|
var EditNameForm = function EditNameForm(_ref) {
|
|
32487
33442
|
var fields = _ref.fields,
|
|
@@ -32604,8 +33559,7 @@ var EditableList = function EditableList(_ref) {
|
|
|
32604
33559
|
variant: "pL",
|
|
32605
33560
|
weight: titleWeight,
|
|
32606
33561
|
color: CHARADE_GREY,
|
|
32607
|
-
extraStyles: "letter-spacing: 0.29px;"
|
|
32608
|
-
"aria-level": "3"
|
|
33562
|
+
extraStyles: "letter-spacing: 0.29px;"
|
|
32609
33563
|
}, title)), /*#__PURE__*/React__default.createElement(Box, {
|
|
32610
33564
|
padding: "0",
|
|
32611
33565
|
borderRadius: "4px",
|
|
@@ -32848,8 +33802,7 @@ var TableListItem = function TableListItem(_ref) {
|
|
|
32848
33802
|
isMobile: isMobile
|
|
32849
33803
|
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
32850
33804
|
variant: "pS",
|
|
32851
|
-
color: CHARADE_GREY
|
|
32852
|
-
"aria-level": "3"
|
|
33805
|
+
color: CHARADE_GREY
|
|
32853
33806
|
}, title)), /*#__PURE__*/React__default.createElement(TableItemValue, {
|
|
32854
33807
|
isMobile: isMobile
|
|
32855
33808
|
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
@@ -32970,10 +33923,10 @@ ForgotPasswordForm.mapStateToProps = mapStateToProps$5;
|
|
|
32970
33923
|
ForgotPasswordForm.mapDispatchToProps = mapDispatchToProps$4;
|
|
32971
33924
|
|
|
32972
33925
|
var textColor$2 = "#ffffff";
|
|
32973
|
-
var backgroundColor$
|
|
32974
|
-
var fallbackValues$
|
|
33926
|
+
var backgroundColor$5 = "#182848";
|
|
33927
|
+
var fallbackValues$r = {
|
|
32975
33928
|
textColor: textColor$2,
|
|
32976
|
-
backgroundColor: backgroundColor$
|
|
33929
|
+
backgroundColor: backgroundColor$5
|
|
32977
33930
|
};
|
|
32978
33931
|
|
|
32979
33932
|
var HighlightTabRow = function HighlightTabRow(_ref) {
|
|
@@ -33015,7 +33968,7 @@ var HighlightTabRow = function HighlightTabRow(_ref) {
|
|
|
33015
33968
|
}), repeat( /*#__PURE__*/React__default.createElement(Box, null), boxesAfter)));
|
|
33016
33969
|
};
|
|
33017
33970
|
|
|
33018
|
-
var HighlightTabRow$1 = /*#__PURE__*/React.memo(themeComponent(HighlightTabRow, "HighlightTabRow", fallbackValues$
|
|
33971
|
+
var HighlightTabRow$1 = /*#__PURE__*/React.memo(themeComponent(HighlightTabRow, "HighlightTabRow", fallbackValues$r));
|
|
33019
33972
|
|
|
33020
33973
|
var LoginForm = function LoginForm(_ref) {
|
|
33021
33974
|
var _emailErrorMessages;
|
|
@@ -33929,15 +34882,15 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
33929
34882
|
|
|
33930
34883
|
function _createClass$2(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
33931
34884
|
|
|
33932
|
-
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); }
|
|
33933
34886
|
|
|
33934
|
-
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); }
|
|
33935
34888
|
|
|
33936
|
-
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; }
|
|
33937
34890
|
|
|
33938
|
-
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); }
|
|
33939
34892
|
|
|
33940
|
-
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); }
|
|
33941
34894
|
|
|
33942
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; }
|
|
33943
34896
|
|
|
@@ -33965,27 +34918,27 @@ function (_React$Component) {
|
|
|
33965
34918
|
args[_key] = arguments[_key];
|
|
33966
34919
|
}
|
|
33967
34920
|
|
|
33968
|
-
_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)));
|
|
33969
34922
|
|
|
33970
|
-
_defineProperty$1(_assertThisInitialized(_this), "getApplicationNode", function () {
|
|
34923
|
+
_defineProperty$1(_assertThisInitialized$1(_this), "getApplicationNode", function () {
|
|
33971
34924
|
if (_this.props.getApplicationNode) return _this.props.getApplicationNode();
|
|
33972
34925
|
return _this.props.applicationNode;
|
|
33973
34926
|
});
|
|
33974
34927
|
|
|
33975
|
-
_defineProperty$1(_assertThisInitialized(_this), "checkUnderlayClick", function (event) {
|
|
34928
|
+
_defineProperty$1(_assertThisInitialized$1(_this), "checkUnderlayClick", function (event) {
|
|
33976
34929
|
if (_this.dialogNode && _this.dialogNode.contains(event.target) || // If the click is on the scrollbar we don't want to close the modal.
|
|
33977
34930
|
event.pageX > event.target.ownerDocument.documentElement.offsetWidth || event.pageY > event.target.ownerDocument.documentElement.offsetHeight) return;
|
|
33978
34931
|
|
|
33979
34932
|
_this.exit(event);
|
|
33980
34933
|
});
|
|
33981
34934
|
|
|
33982
|
-
_defineProperty$1(_assertThisInitialized(_this), "checkDocumentKeyDown", function (event) {
|
|
34935
|
+
_defineProperty$1(_assertThisInitialized$1(_this), "checkDocumentKeyDown", function (event) {
|
|
33983
34936
|
if (_this.props.escapeExits && (event.key === 'Escape' || event.key === 'Esc' || event.keyCode === 27)) {
|
|
33984
34937
|
_this.exit(event);
|
|
33985
34938
|
}
|
|
33986
34939
|
});
|
|
33987
34940
|
|
|
33988
|
-
_defineProperty$1(_assertThisInitialized(_this), "exit", function (event) {
|
|
34941
|
+
_defineProperty$1(_assertThisInitialized$1(_this), "exit", function (event) {
|
|
33989
34942
|
if (_this.props.onExit) {
|
|
33990
34943
|
_this.props.onExit(event);
|
|
33991
34944
|
}
|
|
@@ -34368,7 +35321,7 @@ var textAlign = {
|
|
|
34368
35321
|
};
|
|
34369
35322
|
var titleType = {
|
|
34370
35323
|
"default": "h5",
|
|
34371
|
-
largeTitle: "
|
|
35324
|
+
largeTitle: "h1"
|
|
34372
35325
|
};
|
|
34373
35326
|
var titleSpacing = {
|
|
34374
35327
|
"default": "0.5rem",
|
|
@@ -34382,11 +35335,11 @@ var borderRadius = {
|
|
|
34382
35335
|
"default": "0.25rem",
|
|
34383
35336
|
largeTitle: "0.25rem"
|
|
34384
35337
|
};
|
|
34385
|
-
var backgroundColor$
|
|
35338
|
+
var backgroundColor$6 = {
|
|
34386
35339
|
"default": WHITE,
|
|
34387
35340
|
largeTitle: WHITE
|
|
34388
35341
|
};
|
|
34389
|
-
var fallbackValues$
|
|
35342
|
+
var fallbackValues$s = {
|
|
34390
35343
|
fontSize: fontSize$7,
|
|
34391
35344
|
fontWeight: fontWeight$4,
|
|
34392
35345
|
fontColor: fontColor,
|
|
@@ -34396,7 +35349,7 @@ var fallbackValues$r = {
|
|
|
34396
35349
|
titleSpacing: titleSpacing,
|
|
34397
35350
|
boxShadow: boxShadow$1,
|
|
34398
35351
|
borderRadius: borderRadius,
|
|
34399
|
-
backgroundColor: backgroundColor$
|
|
35352
|
+
backgroundColor: backgroundColor$6
|
|
34400
35353
|
};
|
|
34401
35354
|
|
|
34402
35355
|
var Module = function Module(_ref) {
|
|
@@ -34412,12 +35365,11 @@ var Module = function Module(_ref) {
|
|
|
34412
35365
|
variant = _ref$variant === void 0 ? "default" : _ref$variant,
|
|
34413
35366
|
children = _ref.children;
|
|
34414
35367
|
return /*#__PURE__*/React__default.createElement(React.Fragment, null, heading && /*#__PURE__*/React__default.createElement(Heading$1, {
|
|
34415
|
-
variant: variant === "default" ? "h5" : "
|
|
35368
|
+
variant: variant === "default" ? "h5" : "h2",
|
|
34416
35369
|
weight: themeValues.fontWeight,
|
|
34417
35370
|
color: themeValues.fontColor,
|
|
34418
35371
|
margin: "".concat(spacing, " 0 ").concat(themeValues.titleSpacing, " 0"),
|
|
34419
|
-
textAlign: themeValues.textAlign
|
|
34420
|
-
"aria-level": variant === "default" ? "3" : "1"
|
|
35372
|
+
textAlign: themeValues.textAlign
|
|
34421
35373
|
}, heading), /*#__PURE__*/React__default.createElement(Box, {
|
|
34422
35374
|
padding: "0 0 ".concat(spacingBottom)
|
|
34423
35375
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -34428,9 +35380,9 @@ var Module = function Module(_ref) {
|
|
|
34428
35380
|
}, children)));
|
|
34429
35381
|
};
|
|
34430
35382
|
|
|
34431
|
-
var Module$1 = /*#__PURE__*/React.memo(themeComponent(Module, "Module", fallbackValues$
|
|
35383
|
+
var Module$1 = /*#__PURE__*/React.memo(themeComponent(Module, "Module", fallbackValues$s, "default"));
|
|
34432
35384
|
|
|
34433
|
-
var backgroundColor$
|
|
35385
|
+
var backgroundColor$7 = {
|
|
34434
35386
|
profile: "#3b414d",
|
|
34435
35387
|
cms: "#3b414d"
|
|
34436
35388
|
};
|
|
@@ -34438,8 +35390,8 @@ var shadowColor = {
|
|
|
34438
35390
|
profile: "#292A33",
|
|
34439
35391
|
cms: "#292A33"
|
|
34440
35392
|
};
|
|
34441
|
-
var fallbackValues$
|
|
34442
|
-
backgroundColor: backgroundColor$
|
|
35393
|
+
var fallbackValues$t = {
|
|
35394
|
+
backgroundColor: backgroundColor$7,
|
|
34443
35395
|
shadowColor: shadowColor
|
|
34444
35396
|
};
|
|
34445
35397
|
|
|
@@ -34479,7 +35431,7 @@ var NavMenuDesktop = function NavMenuDesktop(_ref) {
|
|
|
34479
35431
|
}, menuContent));
|
|
34480
35432
|
};
|
|
34481
35433
|
|
|
34482
|
-
var NavMenuDesktop$1 = themeComponent(NavMenuDesktop, "NavMenu", fallbackValues$
|
|
35434
|
+
var NavMenuDesktop$1 = themeComponent(NavMenuDesktop, "NavMenu", fallbackValues$t, "profile");
|
|
34483
35435
|
|
|
34484
35436
|
function _templateObject$y() {
|
|
34485
35437
|
var data = _taggedTemplateLiteral(["\n position: fixed;\n top: 72px;\n"]);
|
|
@@ -34541,7 +35493,7 @@ var NavMenuMobile = function NavMenuMobile(_ref) {
|
|
|
34541
35493
|
}, menuContent));
|
|
34542
35494
|
};
|
|
34543
35495
|
|
|
34544
|
-
var NavMenuMobile$1 = themeComponent(NavMenuMobile, "NavMenu", fallbackValues$
|
|
35496
|
+
var NavMenuMobile$1 = themeComponent(NavMenuMobile, "NavMenu", fallbackValues$t, "profile");
|
|
34545
35497
|
|
|
34546
35498
|
var AccountBillIcon = function AccountBillIcon() {
|
|
34547
35499
|
return /*#__PURE__*/React__default.createElement("svg", {
|
|
@@ -36033,18 +36985,17 @@ var TitleModule = function TitleModule(_ref) {
|
|
|
36033
36985
|
variant: "h6",
|
|
36034
36986
|
weight: FONT_WEIGHT_SEMIBOLD,
|
|
36035
36987
|
color: titleColor,
|
|
36036
|
-
|
|
36988
|
+
as: "h2"
|
|
36037
36989
|
}, title), /*#__PURE__*/React__default.createElement(Text$1, {
|
|
36038
36990
|
variant: "pS",
|
|
36039
|
-
color: subtitleColor
|
|
36040
|
-
"aria-level": "3"
|
|
36991
|
+
color: subtitleColor
|
|
36041
36992
|
}, subtitle)));
|
|
36042
36993
|
};
|
|
36043
36994
|
|
|
36044
36995
|
var color$9 = "#15749D";
|
|
36045
36996
|
var hoverColor$4 = "#116285";
|
|
36046
36997
|
var activeColor$5 = "#0E506D";
|
|
36047
|
-
var fallbackValues$
|
|
36998
|
+
var fallbackValues$u = {
|
|
36048
36999
|
color: color$9,
|
|
36049
37000
|
hoverColor: hoverColor$4,
|
|
36050
37001
|
activeColor: activeColor$5
|
|
@@ -36115,7 +37066,7 @@ var AutopayModal = function AutopayModal(_ref) {
|
|
|
36115
37066
|
}, modalExtraProps));
|
|
36116
37067
|
};
|
|
36117
37068
|
|
|
36118
|
-
var AutopayModalModule = themeComponent(AutopayModal, "AutopayModal", fallbackValues$
|
|
37069
|
+
var AutopayModalModule = themeComponent(AutopayModal, "AutopayModal", fallbackValues$u);
|
|
36119
37070
|
|
|
36120
37071
|
var AmountModule = function AmountModule(_ref) {
|
|
36121
37072
|
var totalAmountDue = _ref.totalAmountDue,
|
|
@@ -36651,7 +37602,7 @@ var PaymentButtonBar = function PaymentButtonBar(_ref) {
|
|
|
36651
37602
|
}, backButton, forwardButton)));
|
|
36652
37603
|
};
|
|
36653
37604
|
|
|
36654
|
-
var backgroundColor$
|
|
37605
|
+
var backgroundColor$8 = {
|
|
36655
37606
|
"default": "transparent",
|
|
36656
37607
|
small: "transparent"
|
|
36657
37608
|
};
|
|
@@ -36667,8 +37618,8 @@ var labeledAmountTotal = {
|
|
|
36667
37618
|
"default": "h6",
|
|
36668
37619
|
small: "pL"
|
|
36669
37620
|
};
|
|
36670
|
-
var fallbackValues$
|
|
36671
|
-
backgroundColor: backgroundColor$
|
|
37621
|
+
var fallbackValues$v = {
|
|
37622
|
+
backgroundColor: backgroundColor$8,
|
|
36672
37623
|
lineItem: lineItem,
|
|
36673
37624
|
labeledAmountSubtotal: labeledAmountSubtotal,
|
|
36674
37625
|
labeledAmountTotal: labeledAmountTotal
|
|
@@ -36687,6 +37638,7 @@ var PaymentDetailsContent = function PaymentDetailsContent(_ref) {
|
|
|
36687
37638
|
label: "Subtotal",
|
|
36688
37639
|
amount: displayCurrency(subtotal)
|
|
36689
37640
|
}), feeElems), /*#__PURE__*/React__default.createElement(SolidDivider$1, null), /*#__PURE__*/React__default.createElement(LabeledAmount$1, {
|
|
37641
|
+
as: "h2",
|
|
36690
37642
|
variant: themeValues.labeledAmountTotal,
|
|
36691
37643
|
label: "Total",
|
|
36692
37644
|
amount: displayCurrency(total)
|
|
@@ -36808,9 +37760,11 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
36808
37760
|
justify: "space-between",
|
|
36809
37761
|
align: "center"
|
|
36810
37762
|
}, /*#__PURE__*/React__default.createElement(Heading$1, {
|
|
36811
|
-
variant: "
|
|
36812
|
-
weight: "700"
|
|
37763
|
+
variant: "h5",
|
|
37764
|
+
weight: "700",
|
|
37765
|
+
as: "h1"
|
|
36813
37766
|
}, titleText), displayCurrency(total))) : /*#__PURE__*/React__default.createElement(Heading$1, {
|
|
37767
|
+
as: "h1",
|
|
36814
37768
|
variant: "h3",
|
|
36815
37769
|
weight: "700",
|
|
36816
37770
|
margin: "1rem 0 0 0"
|
|
@@ -36828,7 +37782,7 @@ var PaymentDetails = function PaymentDetails(_ref4) {
|
|
|
36828
37782
|
});
|
|
36829
37783
|
};
|
|
36830
37784
|
|
|
36831
|
-
var PaymentDetails$1 = themeComponent(PaymentDetails, "PaymentDetails", fallbackValues$
|
|
37785
|
+
var PaymentDetails$1 = themeComponent(PaymentDetails, "PaymentDetails", fallbackValues$v, "default");
|
|
36832
37786
|
|
|
36833
37787
|
var linkColor$1 = {
|
|
36834
37788
|
"default": "#357fb8",
|
|
@@ -36850,7 +37804,7 @@ var modalLinkHoverFocus = {
|
|
|
36850
37804
|
"default": "",
|
|
36851
37805
|
footer: "outline: none; text-decoration: underline;"
|
|
36852
37806
|
};
|
|
36853
|
-
var fallbackValues$
|
|
37807
|
+
var fallbackValues$w = {
|
|
36854
37808
|
linkColor: linkColor$1,
|
|
36855
37809
|
fontSize: fontSize$8,
|
|
36856
37810
|
lineHeight: lineHeight$4,
|
|
@@ -36913,7 +37867,7 @@ var AccountAndRoutingModal = function AccountAndRoutingModal(_ref) {
|
|
|
36913
37867
|
});
|
|
36914
37868
|
};
|
|
36915
37869
|
|
|
36916
|
-
var AccountAndRoutingModal$1 = themeComponent(AccountAndRoutingModal, "AccountAndRoutingModal", fallbackValues$
|
|
37870
|
+
var AccountAndRoutingModal$1 = themeComponent(AccountAndRoutingModal, "AccountAndRoutingModal", fallbackValues$w, "default");
|
|
36917
37871
|
|
|
36918
37872
|
function _templateObject$z() {
|
|
36919
37873
|
var data = _taggedTemplateLiteral([""]);
|
|
@@ -37299,7 +38253,7 @@ var headingDisabledColor = "".concat(ATHENS_GREY);
|
|
|
37299
38253
|
var bodyBackgroundColor$1 = "#eeeeee";
|
|
37300
38254
|
var borderColor$2 = "".concat(GREY_CHATEAU);
|
|
37301
38255
|
var focusStyles$1 = "outline: none;";
|
|
37302
|
-
var fallbackValues$
|
|
38256
|
+
var fallbackValues$x = {
|
|
37303
38257
|
headingBackgroundColor: headingBackgroundColor$1,
|
|
37304
38258
|
headingDisabledColor: headingDisabledColor,
|
|
37305
38259
|
bodyBackgroundColor: bodyBackgroundColor$1,
|
|
@@ -37463,8 +38417,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
37463
38417
|
padding: section.titleIcon ? "0 0 0 8px" : "0"
|
|
37464
38418
|
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
37465
38419
|
variant: "p",
|
|
37466
|
-
color: CHARADE_GREY
|
|
37467
|
-
"aria-level": "3"
|
|
38420
|
+
color: CHARADE_GREY
|
|
37468
38421
|
}, section.title))), section.rightIcons && /*#__PURE__*/React__default.createElement(Cluster, {
|
|
37469
38422
|
childGap: "0.5rem"
|
|
37470
38423
|
}, section.rightIcons.map(function (icon) {
|
|
@@ -37472,7 +38425,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
37472
38425
|
src: icon.img,
|
|
37473
38426
|
key: icon.img,
|
|
37474
38427
|
fade: !icon.enabled,
|
|
37475
|
-
isMobile: isMobile
|
|
38428
|
+
isMobile: isMobile,
|
|
38429
|
+
alt: icon.altText
|
|
37476
38430
|
});
|
|
37477
38431
|
})))), /*#__PURE__*/React__default.createElement(AnimatePresence, {
|
|
37478
38432
|
initial: false
|
|
@@ -37490,7 +38444,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
37490
38444
|
})));
|
|
37491
38445
|
};
|
|
37492
38446
|
|
|
37493
|
-
var RadioSection$1 = themeComponent(RadioSection, "RadioSection", fallbackValues$
|
|
38447
|
+
var RadioSection$1 = themeComponent(RadioSection, "RadioSection", fallbackValues$x);
|
|
37494
38448
|
|
|
37495
38449
|
var RegistrationForm = function RegistrationForm(_ref) {
|
|
37496
38450
|
var _emailErrorMessages, _passwordErrorMessage;
|
|
@@ -37777,7 +38731,7 @@ var ResetPasswordSuccess = withWindowSize(ResetConfirmationForm$2);
|
|
|
37777
38731
|
var activeTabBackground = "#FFFFFF";
|
|
37778
38732
|
var activeTabAccent = "#15749D";
|
|
37779
38733
|
var activeTabHover = "#B8D5E1";
|
|
37780
|
-
var fallbackValues$
|
|
38734
|
+
var fallbackValues$y = {
|
|
37781
38735
|
activeTabBackground: activeTabBackground,
|
|
37782
38736
|
activeTabAccent: activeTabAccent,
|
|
37783
38737
|
activeTabHover: activeTabHover
|
|
@@ -37833,9 +38787,9 @@ var TabSidebar = function TabSidebar(_ref) {
|
|
|
37833
38787
|
})));
|
|
37834
38788
|
};
|
|
37835
38789
|
|
|
37836
|
-
var TabSidebar$1 = themeComponent(TabSidebar, "ProfileTab", fallbackValues$
|
|
38790
|
+
var TabSidebar$1 = themeComponent(TabSidebar, "ProfileTab", fallbackValues$y);
|
|
37837
38791
|
|
|
37838
|
-
var backgroundColor$
|
|
38792
|
+
var backgroundColor$9 = {
|
|
37839
38793
|
"default": "#ffffff",
|
|
37840
38794
|
footer: "#ffffff"
|
|
37841
38795
|
};
|
|
@@ -37863,8 +38817,8 @@ var modalLinkHoverFocus$1 = {
|
|
|
37863
38817
|
"default": "",
|
|
37864
38818
|
footer: "outline: none; text-decoration: underline;"
|
|
37865
38819
|
};
|
|
37866
|
-
var fallbackValues$
|
|
37867
|
-
backgroundColor: backgroundColor$
|
|
38820
|
+
var fallbackValues$z = {
|
|
38821
|
+
backgroundColor: backgroundColor$9,
|
|
37868
38822
|
linkColor: linkColor$2,
|
|
37869
38823
|
border: border$2,
|
|
37870
38824
|
fontSize: fontSize$9,
|
|
@@ -37927,7 +38881,7 @@ var TermsAndConditionsModal = function TermsAndConditionsModal(_ref) {
|
|
|
37927
38881
|
});
|
|
37928
38882
|
};
|
|
37929
38883
|
|
|
37930
|
-
var TermsAndConditionsModal$1 = themeComponent(TermsAndConditionsModal, "TermsAndConditionsModal", fallbackValues$
|
|
38884
|
+
var TermsAndConditionsModal$1 = themeComponent(TermsAndConditionsModal, "TermsAndConditionsModal", fallbackValues$z, "default");
|
|
37931
38885
|
|
|
37932
38886
|
function _templateObject2$l() {
|
|
37933
38887
|
var data = _taggedTemplateLiteral([""]);
|
|
@@ -38051,6 +39005,65 @@ var Timeout = function Timeout(_ref) {
|
|
|
38051
39005
|
|
|
38052
39006
|
var Timeout$1 = withWindowSize(Timeout);
|
|
38053
39007
|
|
|
39008
|
+
var fontWeight$7 = "600";
|
|
39009
|
+
var fontColor$1 = WHITE;
|
|
39010
|
+
var textAlign$1 = "left";
|
|
39011
|
+
var headerBackgroundColor = BRIGHT_GREY;
|
|
39012
|
+
var imageBackgroundColor = MATISSE_BLUE;
|
|
39013
|
+
var fallbackValues$A = {
|
|
39014
|
+
fontWeight: fontWeight$7,
|
|
39015
|
+
fontColor: fontColor$1,
|
|
39016
|
+
textAlign: textAlign$1,
|
|
39017
|
+
headerBackgroundColor: headerBackgroundColor,
|
|
39018
|
+
imageBackgroundColor: imageBackgroundColor
|
|
39019
|
+
};
|
|
39020
|
+
|
|
39021
|
+
function _templateObject$C() {
|
|
39022
|
+
var data = _taggedTemplateLiteral(["\n width: 100%;\n height: auto;\n"]);
|
|
39023
|
+
|
|
39024
|
+
_templateObject$C = function _templateObject() {
|
|
39025
|
+
return data;
|
|
39026
|
+
};
|
|
39027
|
+
|
|
39028
|
+
return data;
|
|
39029
|
+
}
|
|
39030
|
+
var WelcomeImage = styled__default.img(_templateObject$C());
|
|
39031
|
+
|
|
39032
|
+
var WelcomeModule = function WelcomeModule(_ref) {
|
|
39033
|
+
var heading = _ref.heading,
|
|
39034
|
+
isMobile = _ref.isMobile,
|
|
39035
|
+
themeValues = _ref.themeValues;
|
|
39036
|
+
var welcomeImage = "https://cb-public-assets.s3-us-west-2.amazonaws.com/profile-assets/profile-welcome-image.png";
|
|
39037
|
+
return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(Box, {
|
|
39038
|
+
padding: "0"
|
|
39039
|
+
}, isMobile && /*#__PURE__*/React__default.createElement(Box, {
|
|
39040
|
+
padding: "0",
|
|
39041
|
+
background: themeValues.imageBackgroundColor
|
|
39042
|
+
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
39043
|
+
justify: "center"
|
|
39044
|
+
}, /*#__PURE__*/React__default.createElement(WelcomeImage, {
|
|
39045
|
+
src: welcomeImage
|
|
39046
|
+
}))), /*#__PURE__*/React__default.createElement(Box, {
|
|
39047
|
+
background: themeValues.headerBackgroundColor
|
|
39048
|
+
}, /*#__PURE__*/React__default.createElement(Heading$1, {
|
|
39049
|
+
variant: "h5",
|
|
39050
|
+
weight: themeValues.fontWeight,
|
|
39051
|
+
color: themeValues.fontColor,
|
|
39052
|
+
textAlign: themeValues.textAlign,
|
|
39053
|
+
as: "h5"
|
|
39054
|
+
}, heading)), !isMobile && /*#__PURE__*/React__default.createElement(Box, {
|
|
39055
|
+
padding: "0",
|
|
39056
|
+
background: themeValues.imageBackgroundColor
|
|
39057
|
+
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
39058
|
+
justify: "center",
|
|
39059
|
+
align: "flex-end"
|
|
39060
|
+
}, /*#__PURE__*/React__default.createElement(WelcomeImage, {
|
|
39061
|
+
src: welcomeImage
|
|
39062
|
+
})))));
|
|
39063
|
+
};
|
|
39064
|
+
|
|
39065
|
+
var WelcomeModule$1 = /*#__PURE__*/React.memo(themeComponent(WelcomeModule, "WelcomeModule", fallbackValues$A));
|
|
39066
|
+
|
|
38054
39067
|
var WorkflowTile = function WorkflowTile(_ref) {
|
|
38055
39068
|
var _ref$workflowName = _ref.workflowName,
|
|
38056
39069
|
workflowName = _ref$workflowName === void 0 ? "Test Workflow" : _ref$workflowName,
|
|
@@ -38097,7 +39110,7 @@ var WorkflowTile = function WorkflowTile(_ref) {
|
|
|
38097
39110
|
};
|
|
38098
39111
|
|
|
38099
39112
|
var pageBackground = "#F6F6F9";
|
|
38100
|
-
var fallbackValues$
|
|
39113
|
+
var fallbackValues$B = {
|
|
38101
39114
|
pageBackground: pageBackground
|
|
38102
39115
|
};
|
|
38103
39116
|
|
|
@@ -38144,7 +39157,7 @@ var CenterSingle = function CenterSingle(_ref) {
|
|
|
38144
39157
|
})));
|
|
38145
39158
|
};
|
|
38146
39159
|
|
|
38147
|
-
var CenterSingle$1 = withWindowSize(themeComponent(CenterSingle, "Global", fallbackValues$
|
|
39160
|
+
var CenterSingle$1 = withWindowSize(themeComponent(CenterSingle, "Global", fallbackValues$B));
|
|
38148
39161
|
|
|
38149
39162
|
var CenterStack = function CenterStack(_ref) {
|
|
38150
39163
|
var header = _ref.header,
|
|
@@ -38186,7 +39199,7 @@ var CenterStack = function CenterStack(_ref) {
|
|
|
38186
39199
|
})));
|
|
38187
39200
|
};
|
|
38188
39201
|
|
|
38189
|
-
var CenterStack$1 = withWindowSize(themeComponent(CenterStack, "Global", fallbackValues$
|
|
39202
|
+
var CenterStack$1 = withWindowSize(themeComponent(CenterStack, "Global", fallbackValues$B));
|
|
38190
39203
|
|
|
38191
39204
|
var CenterSingle$2 = function CenterSingle(_ref) {
|
|
38192
39205
|
var header = _ref.header,
|
|
@@ -38226,7 +39239,7 @@ var CenterSingle$2 = function CenterSingle(_ref) {
|
|
|
38226
39239
|
})));
|
|
38227
39240
|
};
|
|
38228
39241
|
|
|
38229
|
-
var DefaultPageTemplate = withWindowSize(themeComponent(CenterSingle$2, "Global", fallbackValues$
|
|
39242
|
+
var DefaultPageTemplate = withWindowSize(themeComponent(CenterSingle$2, "Global", fallbackValues$B));
|
|
38230
39243
|
|
|
38231
39244
|
var SidebarSingleContent = function SidebarSingleContent(_ref) {
|
|
38232
39245
|
var header = _ref.header,
|
|
@@ -38280,7 +39293,7 @@ var SidebarSingleContent = function SidebarSingleContent(_ref) {
|
|
|
38280
39293
|
})));
|
|
38281
39294
|
};
|
|
38282
39295
|
|
|
38283
|
-
var SidebarSingleContent$1 = withWindowSize(themeComponent(SidebarSingleContent, "Global", fallbackValues$
|
|
39296
|
+
var SidebarSingleContent$1 = withWindowSize(themeComponent(SidebarSingleContent, "Global", fallbackValues$B));
|
|
38284
39297
|
|
|
38285
39298
|
var SidebarStackContent = function SidebarStackContent(_ref) {
|
|
38286
39299
|
var header = _ref.header,
|
|
@@ -38351,7 +39364,7 @@ var SidebarStackContent = function SidebarStackContent(_ref) {
|
|
|
38351
39364
|
})));
|
|
38352
39365
|
};
|
|
38353
39366
|
|
|
38354
|
-
var SidebarStackContent$1 = withWindowSize(themeComponent(SidebarStackContent, "Global", fallbackValues$
|
|
39367
|
+
var SidebarStackContent$1 = withWindowSize(themeComponent(SidebarStackContent, "Global", fallbackValues$B));
|
|
38355
39368
|
|
|
38356
39369
|
|
|
38357
39370
|
|
|
@@ -38480,7 +39493,9 @@ exports.Timeout = Timeout$1;
|
|
|
38480
39493
|
exports.TimeoutImage = TimeoutImage;
|
|
38481
39494
|
exports.ToggleSwitch = ToggleSwitch$1;
|
|
38482
39495
|
exports.VerifiedEmailIcon = VerifiedEmailIcon$1;
|
|
39496
|
+
exports.WelcomeModule = WelcomeModule$1;
|
|
38483
39497
|
exports.WorkflowTile = WorkflowTile;
|
|
39498
|
+
exports.cardRegistry = cardRegistry;
|
|
38484
39499
|
exports.constants = index$4;
|
|
38485
39500
|
exports.createPartialAmountFormState = createPartialAmountFormState;
|
|
38486
39501
|
exports.util = index$5;
|