@thecb/components 9.3.0-beta.2 → 9.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +840 -617
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +171 -60
- package/dist/index.esm.js +837 -617
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/components/atoms/button-with-action/ButtonWithAction.js +76 -70
- package/src/components/atoms/checkbox/Checkbox.js +9 -4
- package/src/components/atoms/checkbox/Checkbox.stories.js +3 -3
- package/src/components/atoms/country-dropdown/CountryDropdown.js +2 -2
- package/src/components/atoms/country-dropdown/CountryDropdown.stories.js +0 -1
- package/src/components/atoms/dropdown/Dropdown.js +77 -44
- package/src/components/atoms/dropdown/Dropdown.theme.js +8 -2
- package/src/components/atoms/form-layouts/FormInput.js +2 -3
- package/src/components/atoms/form-select/FormSelect.js +25 -34
- package/src/components/atoms/form-select/FormSelect.stories.js +2 -2
- package/src/components/atoms/icons/AccountNumberImage.js +2 -0
- package/src/components/atoms/icons/BankIcon.js +2 -0
- package/src/components/atoms/icons/CheckmarkIcon.js +2 -0
- package/src/components/atoms/icons/GenericCard.js +2 -0
- package/src/components/atoms/icons/GenericCardLarge.js +2 -0
- package/src/components/atoms/icons/KebabMenuIcon.d.ts +1 -0
- package/src/components/atoms/icons/KebabMenuIcon.js +38 -0
- package/src/components/atoms/icons/RoutingNumberImage.js +2 -0
- package/src/components/atoms/icons/TrashIcon.js +42 -40
- package/src/components/atoms/icons/icons.stories.js +3 -1
- package/src/components/atoms/icons/index.d.ts +1 -0
- package/src/components/atoms/icons/index.js +3 -1
- package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.js +0 -1
- package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.stories.js +0 -1
- package/src/components/molecules/address-form/AddressForm.js +1 -2
- package/src/components/molecules/email-form/EmailForm.js +3 -1
- package/src/components/molecules/index.d.ts +1 -0
- package/src/components/molecules/index.js +1 -0
- package/src/components/molecules/modal/Modal.js +2 -1
- package/src/components/molecules/payment-form-ach/PaymentFormACH.js +4 -5
- package/src/components/molecules/payment-form-card/PaymentFormCard.js +0 -2
- package/src/components/molecules/phone-form/PhoneForm.js +3 -1
- package/src/components/molecules/popover/Popover.js +1 -1
- package/src/components/molecules/popup-menu/PopupMenu.js +152 -0
- package/src/components/molecules/popup-menu/PopupMenu.stories.js +40 -0
- package/src/components/molecules/popup-menu/PopupMenu.styled.js +20 -0
- package/src/components/molecules/popup-menu/PopupMenu.theme.js +11 -0
- package/src/components/molecules/popup-menu/index.d.ts +25 -0
- package/src/components/molecules/popup-menu/index.js +3 -0
- package/src/components/molecules/popup-menu/popup-menu-item/PopupMenuItem.js +79 -0
- package/src/components/molecules/popup-menu/popup-menu-item/PopupMenuItem.styled.js +27 -0
- package/src/components/molecules/popup-menu/popup-menu-item/PopupMenuItem.theme.js +23 -0
- package/src/components/molecules/radio-section/RadioSection.js +10 -4
- package/src/components/molecules/radio-section/RadioSection.stories.js +1 -0
- package/src/components/molecules/radio-section/radio-button/RadioButton.js +2 -3
- package/src/components/molecules/terms-and-conditions/TermsAndConditions.stories.js +3 -1
- package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV1.js +0 -1
- package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV2.js +5 -2
- package/src/components/molecules/toast-notification/ToastNotification.js +75 -0
- package/src/components/molecules/toast-notification/ToastNotification.stories.js +67 -0
- package/src/components/molecules/toast-notification/index.d.ts +18 -0
- package/src/components/molecules/toast-notification/index.js +3 -0
- package/src/constants/colors.d.ts +1 -0
- package/src/constants/colors.js +5 -1
- package/src/hooks/index.js +3 -0
- package/src/hooks/use-toast-notification/index.d.ts +23 -0
- package/src/hooks/use-toast-notification/index.js +38 -0
- package/src/index.d.ts +2 -1
- package/src/index.js +2 -1
- package/src/types/common/ToastVariants.ts +6 -0
- package/src/types/common/index.ts +1 -0
- package/src/util/index.js +10 -2
- package/dist/src/apps/checkout/pages/payment/sub-pages/payment-amount/PaymentAmount_old.js +0 -49322
- package/src/components/.DS_Store +0 -0
- package/src/components/atoms/.DS_Store +0 -0
- package/src/components/atoms/icons/.DS_Store +0 -0
- /package/src/{util/useOutsideClick.js → hooks/use-outside-click/index.js} +0 -0
- /package/src/{util/useScrollTo.js → hooks/use-scroll-to/index.js} +0 -0
package/dist/index.esm.js
CHANGED
|
@@ -5011,6 +5011,7 @@ var INFO_BLUE = "#E4F4FD";
|
|
|
5011
5011
|
var CORNFLOWER_BLUE = "#EBEFFB";
|
|
5012
5012
|
var HOVER_LIGHT_BLUE = "#EFFAFF";
|
|
5013
5013
|
var MATISSE_BLUE = "#15749D";
|
|
5014
|
+
var MATISSE_BLUE_DARK = "#105C7D";
|
|
5014
5015
|
var ROYAL_BLUE = "#3181E3";
|
|
5015
5016
|
var ROYAL_BLUE_VIVID = "#3B5BDB";
|
|
5016
5017
|
var ASTRAL_BLUE = "#3176AA";
|
|
@@ -5043,7 +5044,8 @@ var FANTASY_RED = "#FCF4F4";
|
|
|
5043
5044
|
var COSMOS_RED = "#FFD0D3";
|
|
5044
5045
|
var BLUSH_RED = "#FFF0F5"; // Second level color constants
|
|
5045
5046
|
|
|
5046
|
-
var ERROR_COLOR = RAZZMATAZZ_RED;
|
|
5047
|
+
var ERROR_COLOR = RAZZMATAZZ_RED;
|
|
5048
|
+
var ERROR_BACKGROUND_COLOR = "#FFF4F8"; // These colors are sequestered so that the alert component can reference them // by type of alert
|
|
5047
5049
|
|
|
5048
5050
|
var ALERT_COLORS = {
|
|
5049
5051
|
warn: {
|
|
@@ -5145,6 +5147,7 @@ var colors = /*#__PURE__*/Object.freeze({
|
|
|
5145
5147
|
BOSTON_BLUE: BOSTON_BLUE,
|
|
5146
5148
|
HOVER_LIGHT_BLUE: HOVER_LIGHT_BLUE,
|
|
5147
5149
|
MATISSE_BLUE: MATISSE_BLUE,
|
|
5150
|
+
MATISSE_BLUE_DARK: MATISSE_BLUE_DARK,
|
|
5148
5151
|
ROYAL_BLUE: ROYAL_BLUE,
|
|
5149
5152
|
ROYAL_BLUE_VIVID: ROYAL_BLUE_VIVID,
|
|
5150
5153
|
ASTRAL_BLUE: ASTRAL_BLUE,
|
|
@@ -5174,7 +5177,8 @@ var colors = /*#__PURE__*/Object.freeze({
|
|
|
5174
5177
|
RASPBERRY: RASPBERRY,
|
|
5175
5178
|
ALERT_COLORS: ALERT_COLORS,
|
|
5176
5179
|
PILL_COLORS: PILL_COLORS,
|
|
5177
|
-
ERROR_COLOR: ERROR_COLOR
|
|
5180
|
+
ERROR_COLOR: ERROR_COLOR,
|
|
5181
|
+
ERROR_BACKGROUND_COLOR: ERROR_BACKGROUND_COLOR
|
|
5178
5182
|
});
|
|
5179
5183
|
|
|
5180
5184
|
var TextSpan = styled.span.withConfig({
|
|
@@ -12914,7 +12918,7 @@ var Spinner = function Spinner(_ref) {
|
|
|
12914
12918
|
*/
|
|
12915
12919
|
|
|
12916
12920
|
|
|
12917
|
-
var ButtonWithAction = function
|
|
12921
|
+
var ButtonWithAction = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
12918
12922
|
var _ref2$action = _ref2.action,
|
|
12919
12923
|
action = _ref2$action === void 0 ? noop : _ref2$action,
|
|
12920
12924
|
_ref2$variant = _ref2.variant,
|
|
@@ -12945,6 +12949,7 @@ var ButtonWithAction = function ButtonWithAction(_ref2) {
|
|
|
12945
12949
|
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 ");
|
|
12946
12950
|
var disabledStyles = "\n background-color: #6D717E;\n border-color: #6D717E;\n color: #FFFFFF;\n cursor: default;\n &:focus {\n box-shadow: 0 0 10px #6D717E;\n outline: none;\n }\n ".concat(extraDisabledStyles, "\n ");
|
|
12947
12951
|
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
12952
|
+
ref: ref,
|
|
12948
12953
|
variant: variant,
|
|
12949
12954
|
padding: themeValues.padding,
|
|
12950
12955
|
minHeight: themeValues.height,
|
|
@@ -12973,7 +12978,7 @@ var ButtonWithAction = function ButtonWithAction(_ref2) {
|
|
|
12973
12978
|
textWrap: textWrap,
|
|
12974
12979
|
extraStyles: textExtraStyles
|
|
12975
12980
|
}, text)));
|
|
12976
|
-
};
|
|
12981
|
+
});
|
|
12977
12982
|
|
|
12978
12983
|
var primaryColor = {
|
|
12979
12984
|
info: "".concat(WHITE),
|
|
@@ -13671,7 +13676,9 @@ var AccountNumberImage = function AccountNumberImage() {
|
|
|
13671
13676
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13672
13677
|
width: "371",
|
|
13673
13678
|
height: "164",
|
|
13674
|
-
viewBox: "0 0 371 164"
|
|
13679
|
+
viewBox: "0 0 371 164",
|
|
13680
|
+
role: "img",
|
|
13681
|
+
"aria-label": "A check with the account number highlighted in the bottom center"
|
|
13675
13682
|
}, /*#__PURE__*/React.createElement("g", {
|
|
13676
13683
|
fill: "none",
|
|
13677
13684
|
fillRule: "evenodd",
|
|
@@ -13752,7 +13759,9 @@ var RoutingNumberImage = function RoutingNumberImage() {
|
|
|
13752
13759
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13753
13760
|
width: "371",
|
|
13754
13761
|
height: "164",
|
|
13755
|
-
viewBox: "0 0 371 164"
|
|
13762
|
+
viewBox: "0 0 371 164",
|
|
13763
|
+
role: "img",
|
|
13764
|
+
"aria-label": "A check with the routing number highlighted in the lower left hand corner"
|
|
13756
13765
|
}, /*#__PURE__*/React.createElement("g", {
|
|
13757
13766
|
fill: "none",
|
|
13758
13767
|
fillRule: "evenodd",
|
|
@@ -13835,7 +13844,9 @@ var CheckmarkIcon = function CheckmarkIcon() {
|
|
|
13835
13844
|
viewBox: "0 0 98 98",
|
|
13836
13845
|
version: "1.1",
|
|
13837
13846
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13838
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink"
|
|
13847
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
13848
|
+
role: "img",
|
|
13849
|
+
"aria-label": "Successful payment, green checkmark"
|
|
13839
13850
|
}, /*#__PURE__*/React.createElement("g", {
|
|
13840
13851
|
id: "Cityville-Checkout---Desktop---Logged-In",
|
|
13841
13852
|
stroke: "none",
|
|
@@ -13880,7 +13891,9 @@ var BankIcon = function BankIcon() {
|
|
|
13880
13891
|
height: "18",
|
|
13881
13892
|
viewBox: "0 0 28 18",
|
|
13882
13893
|
fill: "none",
|
|
13883
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
13894
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
13895
|
+
role: "img",
|
|
13896
|
+
"aria-label": "Check Payment"
|
|
13884
13897
|
}, /*#__PURE__*/React.createElement("path", {
|
|
13885
13898
|
d: "M0 2.25C0 1.00736 1.04467 0 2.33333 0H25.6667C26.9553 0 28 1.00736 28 2.25V15.75C28 16.9926 26.9553 18 25.6667 18H2.33333C1.04467 18 0 16.9926 0 15.75V2.25Z",
|
|
13886
13899
|
fill: "#E4F4FD"
|
|
@@ -13927,7 +13940,9 @@ var GenericCard = function GenericCard() {
|
|
|
13927
13940
|
height: "18",
|
|
13928
13941
|
viewBox: "0 0 28 18",
|
|
13929
13942
|
fill: "none",
|
|
13930
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
13943
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
13944
|
+
role: "img",
|
|
13945
|
+
"aria-label": "Card Payment"
|
|
13931
13946
|
}, /*#__PURE__*/React.createElement("rect", {
|
|
13932
13947
|
width: "28",
|
|
13933
13948
|
height: "18",
|
|
@@ -15186,7 +15201,9 @@ var GenericCardLarge = function GenericCardLarge() {
|
|
|
15186
15201
|
height: "24",
|
|
15187
15202
|
viewBox: "0 0 36 24",
|
|
15188
15203
|
fill: "none",
|
|
15189
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
15204
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15205
|
+
role: "img",
|
|
15206
|
+
"aria-label": "Card Payment"
|
|
15190
15207
|
}, /*#__PURE__*/React.createElement("rect", {
|
|
15191
15208
|
width: "36",
|
|
15192
15209
|
height: "24",
|
|
@@ -15275,7 +15292,8 @@ var ShoppingCartIcon = function ShoppingCartIcon() {
|
|
|
15275
15292
|
};
|
|
15276
15293
|
|
|
15277
15294
|
var TrashIcon = function TrashIcon(_ref) {
|
|
15278
|
-
var themeValues = _ref.themeValues
|
|
15295
|
+
var themeValues = _ref.themeValues,
|
|
15296
|
+
iconFill = _ref.iconFill;
|
|
15279
15297
|
return /*#__PURE__*/React.createElement("svg", {
|
|
15280
15298
|
width: "20px",
|
|
15281
15299
|
height: "20px",
|
|
@@ -15299,12 +15317,12 @@ var TrashIcon = function TrashIcon(_ref) {
|
|
|
15299
15317
|
xlinkHref: "#trash-path-1"
|
|
15300
15318
|
})), /*#__PURE__*/React.createElement("use", {
|
|
15301
15319
|
id: "trash-Mask",
|
|
15302
|
-
fill: themeValues.singleIconColor,
|
|
15320
|
+
fill: iconFill !== null && iconFill !== void 0 ? iconFill : themeValues.singleIconColor,
|
|
15303
15321
|
fillRule: "nonzero",
|
|
15304
15322
|
xlinkHref: "#trash-path-1"
|
|
15305
15323
|
}), /*#__PURE__*/React.createElement("polygon", {
|
|
15306
15324
|
id: "trash-Path",
|
|
15307
|
-
fill: themeValues.singleIconColor,
|
|
15325
|
+
fill: iconFill !== null && iconFill !== void 0 ? iconFill : themeValues.singleIconColor,
|
|
15308
15326
|
fillRule: "nonzero",
|
|
15309
15327
|
mask: "url(#trash-mask-2)",
|
|
15310
15328
|
points: "0 0 20 0 20 20 0 20"
|
|
@@ -18235,6 +18253,34 @@ var PlusCircleIcon = function PlusCircleIcon(_ref) {
|
|
|
18235
18253
|
}));
|
|
18236
18254
|
};
|
|
18237
18255
|
|
|
18256
|
+
var KebabMenuIcon = function KebabMenuIcon() {
|
|
18257
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
18258
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
18259
|
+
width: "21",
|
|
18260
|
+
height: "32",
|
|
18261
|
+
viewBox: "0 0 21 32",
|
|
18262
|
+
fill: "none"
|
|
18263
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
18264
|
+
d: "M0 4C0 1.79086 1.79086 0 4 0L17 0C19.2091 0 21 1.79086 21 4V28C21 30.2091 19.2091 32 17 32H4C1.79086 32 0 30.2091 0 28L0 4Z",
|
|
18265
|
+
fill: "none"
|
|
18266
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
18267
|
+
fillRule: "evenodd",
|
|
18268
|
+
clipRule: "evenodd",
|
|
18269
|
+
d: "M10.5 6C9.39333 6 8.5 6.89333 8.5 8C8.5 9.10667 9.39333 10 10.5 10C11.6067 10 12.5 9.10667 12.5 8C12.5 6.89333 11.6067 6 10.5 6Z",
|
|
18270
|
+
fill: "#3B5BDB"
|
|
18271
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
18272
|
+
fillRule: "evenodd",
|
|
18273
|
+
clipRule: "evenodd",
|
|
18274
|
+
d: "M10.5 14C9.39333 14 8.5 14.8933 8.5 16C8.5 17.1067 9.39333 18 10.5 18C11.6067 18 12.5 17.1067 12.5 16C12.5 14.8933 11.6067 14 10.5 14Z",
|
|
18275
|
+
fill: "#3B5BDB"
|
|
18276
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
18277
|
+
fillRule: "evenodd",
|
|
18278
|
+
clipRule: "evenodd",
|
|
18279
|
+
d: "M10.5 22C9.39333 22 8.5 22.9067 8.5 24C8.5 25.0933 9.40667 26 10.5 26C11.5933 26 12.5 25.0933 12.5 24C12.5 22.9067 11.6067 22 10.5 22Z",
|
|
18280
|
+
fill: "#3B5BDB"
|
|
18281
|
+
}));
|
|
18282
|
+
};
|
|
18283
|
+
|
|
18238
18284
|
var color$2 = "#15749D";
|
|
18239
18285
|
var hoverColor$1 = "#116285";
|
|
18240
18286
|
var activeColor$1 = "#0E506D";
|
|
@@ -22121,10 +22167,9 @@ var Checkbox = function Checkbox(_ref4) {
|
|
|
22121
22167
|
checkboxMargin = _ref4$checkboxMargin === void 0 ? "0 16px 0 0" : _ref4$checkboxMargin,
|
|
22122
22168
|
extraStyles = _ref4.extraStyles,
|
|
22123
22169
|
textExtraStyles = _ref4.textExtraStyles,
|
|
22170
|
+
labelledById = _ref4.labelledById,
|
|
22124
22171
|
_ref4$dataQa = _ref4.dataQa,
|
|
22125
|
-
dataQa = _ref4$dataQa === void 0 ? null : _ref4$dataQa
|
|
22126
|
-
_ref4$isRequired = _ref4.isRequired,
|
|
22127
|
-
isRequired = _ref4$isRequired === void 0 ? false : _ref4$isRequired;
|
|
22172
|
+
dataQa = _ref4$dataQa === void 0 ? null : _ref4$dataQa;
|
|
22128
22173
|
|
|
22129
22174
|
var _useState = useState(false),
|
|
22130
22175
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -22137,6 +22182,9 @@ var Checkbox = function Checkbox(_ref4) {
|
|
|
22137
22182
|
}
|
|
22138
22183
|
};
|
|
22139
22184
|
|
|
22185
|
+
var titleId = title ? "checkboxlabel-".concat(name) : undefined;
|
|
22186
|
+
var ariaLabelledById = labelledById !== null && labelledById !== void 0 ? labelledById : titleId;
|
|
22187
|
+
var ariaLabel = ariaLabelledById ? undefined : name;
|
|
22140
22188
|
return /*#__PURE__*/React.createElement(Box, {
|
|
22141
22189
|
padding: "0",
|
|
22142
22190
|
tabIndex: "0",
|
|
@@ -22160,7 +22208,8 @@ var Checkbox = function Checkbox(_ref4) {
|
|
|
22160
22208
|
id: "checkbox-".concat(name),
|
|
22161
22209
|
disabled: disabled,
|
|
22162
22210
|
name: name,
|
|
22163
|
-
"aria-label":
|
|
22211
|
+
"aria-label": ariaLabel,
|
|
22212
|
+
"aria-labelledby": ariaLabelledById,
|
|
22164
22213
|
checked: checked,
|
|
22165
22214
|
onChange: onChange,
|
|
22166
22215
|
tabIndex: "-1",
|
|
@@ -22178,8 +22227,7 @@ var Checkbox = function Checkbox(_ref4) {
|
|
|
22178
22227
|
errorStyles: themeValues.errorStyles,
|
|
22179
22228
|
disabledStyles: themeValues.disabledStyles,
|
|
22180
22229
|
disabledCheckedStyles: themeValues.disabledCheckedStyles,
|
|
22181
|
-
focusedStyles: themeValues.focusedStyles
|
|
22182
|
-
"aria-required": isRequired
|
|
22230
|
+
focusedStyles: themeValues.focusedStyles
|
|
22183
22231
|
}, /*#__PURE__*/React.createElement(CheckboxIcon, {
|
|
22184
22232
|
viewBox: "0 0 24 24",
|
|
22185
22233
|
disabled: disabled,
|
|
@@ -22188,6 +22236,7 @@ var Checkbox = function Checkbox(_ref4) {
|
|
|
22188
22236
|
}, /*#__PURE__*/React.createElement("polyline", {
|
|
22189
22237
|
points: "20 6 9 17 4 12"
|
|
22190
22238
|
})))), title && /*#__PURE__*/React.createElement(Text$1, {
|
|
22239
|
+
id: titleId,
|
|
22191
22240
|
variant: "p",
|
|
22192
22241
|
weight: themeValues.textFontWeight,
|
|
22193
22242
|
color: themeValues.textColor,
|
|
@@ -22418,17 +22467,18 @@ var DropdownIcon = function DropdownIcon() {
|
|
|
22418
22467
|
};
|
|
22419
22468
|
|
|
22420
22469
|
var check = function (it) {
|
|
22421
|
-
return it && it.Math
|
|
22470
|
+
return it && it.Math === Math && it;
|
|
22422
22471
|
};
|
|
22423
22472
|
|
|
22424
22473
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
22425
22474
|
var global_1 =
|
|
22426
|
-
// eslint-disable-next-line es
|
|
22475
|
+
// eslint-disable-next-line es/no-global-this -- safe
|
|
22427
22476
|
check(typeof globalThis == 'object' && globalThis) ||
|
|
22428
22477
|
check(typeof window == 'object' && window) ||
|
|
22429
22478
|
// eslint-disable-next-line no-restricted-globals -- safe
|
|
22430
22479
|
check(typeof self == 'object' && self) ||
|
|
22431
22480
|
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
22481
|
+
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
22432
22482
|
// eslint-disable-next-line no-new-func -- fallback
|
|
22433
22483
|
(function () { return this; })() || Function('return this')();
|
|
22434
22484
|
|
|
@@ -22442,12 +22492,12 @@ var fails = function (exec) {
|
|
|
22442
22492
|
|
|
22443
22493
|
// Detect IE8's incomplete defineProperty implementation
|
|
22444
22494
|
var descriptors = !fails(function () {
|
|
22445
|
-
// eslint-disable-next-line es
|
|
22446
|
-
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1]
|
|
22495
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
22496
|
+
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
|
|
22447
22497
|
});
|
|
22448
22498
|
|
|
22449
22499
|
var functionBindNative = !fails(function () {
|
|
22450
|
-
// eslint-disable-next-line es
|
|
22500
|
+
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
22451
22501
|
var test = (function () { /* empty */ }).bind();
|
|
22452
22502
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
22453
22503
|
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
@@ -22460,7 +22510,7 @@ var functionCall = functionBindNative ? call.bind(call) : function () {
|
|
|
22460
22510
|
};
|
|
22461
22511
|
|
|
22462
22512
|
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
22463
|
-
// eslint-disable-next-line es
|
|
22513
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
22464
22514
|
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
22465
22515
|
|
|
22466
22516
|
// Nashorn ~ JDK8 bug
|
|
@@ -22487,14 +22537,11 @@ var createPropertyDescriptor = function (bitmap, value) {
|
|
|
22487
22537
|
};
|
|
22488
22538
|
|
|
22489
22539
|
var FunctionPrototype = Function.prototype;
|
|
22490
|
-
var bind$1 = FunctionPrototype.bind;
|
|
22491
22540
|
var call$1 = FunctionPrototype.call;
|
|
22492
|
-
var
|
|
22541
|
+
var uncurryThisWithBind = functionBindNative && FunctionPrototype.bind.bind(call$1, call$1);
|
|
22493
22542
|
|
|
22494
|
-
var functionUncurryThis = functionBindNative ? function (fn) {
|
|
22495
|
-
return
|
|
22496
|
-
} : function (fn) {
|
|
22497
|
-
return fn && function () {
|
|
22543
|
+
var functionUncurryThis = functionBindNative ? uncurryThisWithBind : function (fn) {
|
|
22544
|
+
return function () {
|
|
22498
22545
|
return call$1.apply(fn, arguments);
|
|
22499
22546
|
};
|
|
22500
22547
|
};
|
|
@@ -22515,15 +22562,21 @@ var indexedObject = fails(function () {
|
|
|
22515
22562
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
22516
22563
|
return !$Object('z').propertyIsEnumerable(0);
|
|
22517
22564
|
}) ? function (it) {
|
|
22518
|
-
return classofRaw(it)
|
|
22565
|
+
return classofRaw(it) === 'String' ? split(it, '') : $Object(it);
|
|
22519
22566
|
} : $Object;
|
|
22520
22567
|
|
|
22568
|
+
// we can't use just `it == null` since of `document.all` special case
|
|
22569
|
+
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
|
|
22570
|
+
var isNullOrUndefined = function (it) {
|
|
22571
|
+
return it === null || it === undefined;
|
|
22572
|
+
};
|
|
22573
|
+
|
|
22521
22574
|
var $TypeError = TypeError;
|
|
22522
22575
|
|
|
22523
22576
|
// `RequireObjectCoercible` abstract operation
|
|
22524
22577
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
22525
22578
|
var requireObjectCoercible = function (it) {
|
|
22526
|
-
if (it
|
|
22579
|
+
if (isNullOrUndefined(it)) throw new $TypeError("Can't call method on " + it);
|
|
22527
22580
|
return it;
|
|
22528
22581
|
};
|
|
22529
22582
|
|
|
@@ -22535,13 +22588,32 @@ var toIndexedObject = function (it) {
|
|
|
22535
22588
|
return indexedObject(requireObjectCoercible(it));
|
|
22536
22589
|
};
|
|
22537
22590
|
|
|
22591
|
+
var documentAll = typeof document == 'object' && document.all;
|
|
22592
|
+
|
|
22593
|
+
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
22594
|
+
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
22595
|
+
var IS_HTMLDDA = typeof documentAll == 'undefined' && documentAll !== undefined;
|
|
22596
|
+
|
|
22597
|
+
var documentAll_1 = {
|
|
22598
|
+
all: documentAll,
|
|
22599
|
+
IS_HTMLDDA: IS_HTMLDDA
|
|
22600
|
+
};
|
|
22601
|
+
|
|
22602
|
+
var documentAll$1 = documentAll_1.all;
|
|
22603
|
+
|
|
22538
22604
|
// `IsCallable` abstract operation
|
|
22539
22605
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
22540
|
-
var isCallable = function (argument) {
|
|
22606
|
+
var isCallable = documentAll_1.IS_HTMLDDA ? function (argument) {
|
|
22607
|
+
return typeof argument == 'function' || argument === documentAll$1;
|
|
22608
|
+
} : function (argument) {
|
|
22541
22609
|
return typeof argument == 'function';
|
|
22542
22610
|
};
|
|
22543
22611
|
|
|
22544
|
-
var
|
|
22612
|
+
var documentAll$2 = documentAll_1.all;
|
|
22613
|
+
|
|
22614
|
+
var isObject = documentAll_1.IS_HTMLDDA ? function (it) {
|
|
22615
|
+
return typeof it == 'object' ? it !== null : isCallable(it) || it === documentAll$2;
|
|
22616
|
+
} : function (it) {
|
|
22545
22617
|
return typeof it == 'object' ? it !== null : isCallable(it);
|
|
22546
22618
|
};
|
|
22547
22619
|
|
|
@@ -22555,7 +22627,7 @@ var getBuiltIn = function (namespace, method) {
|
|
|
22555
22627
|
|
|
22556
22628
|
var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
|
|
22557
22629
|
|
|
22558
|
-
var engineUserAgent =
|
|
22630
|
+
var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
|
|
22559
22631
|
|
|
22560
22632
|
var process$1 = global_1.process;
|
|
22561
22633
|
var Deno = global_1.Deno;
|
|
@@ -22582,24 +22654,29 @@ if (!version && engineUserAgent) {
|
|
|
22582
22654
|
|
|
22583
22655
|
var engineV8Version = version;
|
|
22584
22656
|
|
|
22585
|
-
/* eslint-disable es
|
|
22657
|
+
/* eslint-disable es/no-symbol -- required for testing */
|
|
22658
|
+
|
|
22659
|
+
|
|
22586
22660
|
|
|
22587
22661
|
|
|
22662
|
+
var $String = global_1.String;
|
|
22588
22663
|
|
|
22589
|
-
// eslint-disable-next-line es
|
|
22590
|
-
var
|
|
22591
|
-
var symbol = Symbol();
|
|
22664
|
+
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
22665
|
+
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails(function () {
|
|
22666
|
+
var symbol = Symbol('symbol detection');
|
|
22592
22667
|
// Chrome 38 Symbol has incorrect toString conversion
|
|
22593
22668
|
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
22594
|
-
|
|
22669
|
+
// nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
|
|
22670
|
+
// of course, fail.
|
|
22671
|
+
return !$String(symbol) || !(Object(symbol) instanceof Symbol) ||
|
|
22595
22672
|
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
22596
22673
|
!Symbol.sham && engineV8Version && engineV8Version < 41;
|
|
22597
22674
|
});
|
|
22598
22675
|
|
|
22599
|
-
/* eslint-disable es
|
|
22676
|
+
/* eslint-disable es/no-symbol -- required for testing */
|
|
22600
22677
|
|
|
22601
22678
|
|
|
22602
|
-
var useSymbolAsUid =
|
|
22679
|
+
var useSymbolAsUid = symbolConstructorDetection
|
|
22603
22680
|
&& !Symbol.sham
|
|
22604
22681
|
&& typeof Symbol.iterator == 'symbol';
|
|
22605
22682
|
|
|
@@ -22612,11 +22689,11 @@ var isSymbol = useSymbolAsUid ? function (it) {
|
|
|
22612
22689
|
return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, $Object$1(it));
|
|
22613
22690
|
};
|
|
22614
22691
|
|
|
22615
|
-
var $String = String;
|
|
22692
|
+
var $String$1 = String;
|
|
22616
22693
|
|
|
22617
22694
|
var tryToString = function (argument) {
|
|
22618
22695
|
try {
|
|
22619
|
-
return $String(argument);
|
|
22696
|
+
return $String$1(argument);
|
|
22620
22697
|
} catch (error) {
|
|
22621
22698
|
return 'Object';
|
|
22622
22699
|
}
|
|
@@ -22627,14 +22704,14 @@ var $TypeError$1 = TypeError;
|
|
|
22627
22704
|
// `Assert: IsCallable(argument) is true`
|
|
22628
22705
|
var aCallable = function (argument) {
|
|
22629
22706
|
if (isCallable(argument)) return argument;
|
|
22630
|
-
throw $TypeError$1(tryToString(argument) + ' is not a function');
|
|
22707
|
+
throw new $TypeError$1(tryToString(argument) + ' is not a function');
|
|
22631
22708
|
};
|
|
22632
22709
|
|
|
22633
22710
|
// `GetMethod` abstract operation
|
|
22634
22711
|
// https://tc39.es/ecma262/#sec-getmethod
|
|
22635
22712
|
var getMethod = function (V, P) {
|
|
22636
22713
|
var func = V[P];
|
|
22637
|
-
return func
|
|
22714
|
+
return isNullOrUndefined(func) ? undefined : aCallable(func);
|
|
22638
22715
|
};
|
|
22639
22716
|
|
|
22640
22717
|
var $TypeError$2 = TypeError;
|
|
@@ -22646,10 +22723,10 @@ var ordinaryToPrimitive = function (input, pref) {
|
|
|
22646
22723
|
if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
|
22647
22724
|
if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
|
|
22648
22725
|
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
|
22649
|
-
throw $TypeError$2("Can't convert object to primitive value");
|
|
22726
|
+
throw new $TypeError$2("Can't convert object to primitive value");
|
|
22650
22727
|
};
|
|
22651
22728
|
|
|
22652
|
-
// eslint-disable-next-line es
|
|
22729
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
22653
22730
|
var defineProperty = Object.defineProperty;
|
|
22654
22731
|
|
|
22655
22732
|
var defineGlobalProperty = function (key, value) {
|
|
@@ -22666,13 +22743,16 @@ var store = global_1[SHARED] || defineGlobalProperty(SHARED, {});
|
|
|
22666
22743
|
var sharedStore = store;
|
|
22667
22744
|
|
|
22668
22745
|
var shared = createCommonjsModule(function (module) {
|
|
22746
|
+
|
|
22747
|
+
|
|
22748
|
+
|
|
22669
22749
|
(module.exports = function (key, value) {
|
|
22670
22750
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
22671
22751
|
})('versions', []).push({
|
|
22672
|
-
version: '3.
|
|
22752
|
+
version: '3.33.3',
|
|
22673
22753
|
mode: 'global',
|
|
22674
|
-
copyright: '© 2014-
|
|
22675
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
22754
|
+
copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
|
|
22755
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.33.3/LICENSE',
|
|
22676
22756
|
source: 'https://github.com/zloirock/core-js'
|
|
22677
22757
|
});
|
|
22678
22758
|
});
|
|
@@ -22689,7 +22769,7 @@ var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
|
|
|
22689
22769
|
|
|
22690
22770
|
// `HasOwnProperty` abstract operation
|
|
22691
22771
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
22692
|
-
// eslint-disable-next-line es
|
|
22772
|
+
// eslint-disable-next-line es/no-object-hasown -- safe
|
|
22693
22773
|
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
22694
22774
|
return hasOwnProperty(toObject(it), key);
|
|
22695
22775
|
};
|
|
@@ -22702,21 +22782,15 @@ var uid = function (key) {
|
|
|
22702
22782
|
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$3(++id + postfix, 36);
|
|
22703
22783
|
};
|
|
22704
22784
|
|
|
22705
|
-
var WellKnownSymbolsStore = shared('wks');
|
|
22706
22785
|
var Symbol$1 = global_1.Symbol;
|
|
22707
|
-
var
|
|
22708
|
-
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
|
22786
|
+
var WellKnownSymbolsStore = shared('wks');
|
|
22787
|
+
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
|
22709
22788
|
|
|
22710
22789
|
var wellKnownSymbol = function (name) {
|
|
22711
|
-
if (!hasOwnProperty_1(WellKnownSymbolsStore, name)
|
|
22712
|
-
|
|
22713
|
-
|
|
22714
|
-
|
|
22715
|
-
} else if (useSymbolAsUid && symbolFor) {
|
|
22716
|
-
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
22717
|
-
} else {
|
|
22718
|
-
WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
|
|
22719
|
-
}
|
|
22790
|
+
if (!hasOwnProperty_1(WellKnownSymbolsStore, name)) {
|
|
22791
|
+
WellKnownSymbolsStore[name] = symbolConstructorDetection && hasOwnProperty_1(Symbol$1, name)
|
|
22792
|
+
? Symbol$1[name]
|
|
22793
|
+
: createWellKnownSymbol('Symbol.' + name);
|
|
22720
22794
|
} return WellKnownSymbolsStore[name];
|
|
22721
22795
|
};
|
|
22722
22796
|
|
|
@@ -22733,7 +22807,7 @@ var toPrimitive = function (input, pref) {
|
|
|
22733
22807
|
if (pref === undefined) pref = 'default';
|
|
22734
22808
|
result = functionCall(exoticToPrim, input, pref);
|
|
22735
22809
|
if (!isObject(result) || isSymbol(result)) return result;
|
|
22736
|
-
throw $TypeError$3("Can't convert object to primitive value");
|
|
22810
|
+
throw new $TypeError$3("Can't convert object to primitive value");
|
|
22737
22811
|
}
|
|
22738
22812
|
if (pref === undefined) pref = 'number';
|
|
22739
22813
|
return ordinaryToPrimitive(input, pref);
|
|
@@ -22756,13 +22830,13 @@ var documentCreateElement = function (it) {
|
|
|
22756
22830
|
|
|
22757
22831
|
// Thanks to IE8 for its funny defineProperty
|
|
22758
22832
|
var ie8DomDefine = !descriptors && !fails(function () {
|
|
22759
|
-
// eslint-disable-next-line es
|
|
22833
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
22760
22834
|
return Object.defineProperty(documentCreateElement('div'), 'a', {
|
|
22761
22835
|
get: function () { return 7; }
|
|
22762
|
-
}).a
|
|
22836
|
+
}).a !== 7;
|
|
22763
22837
|
});
|
|
22764
22838
|
|
|
22765
|
-
// eslint-disable-next-line es
|
|
22839
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
22766
22840
|
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
22767
22841
|
|
|
22768
22842
|
// `Object.getOwnPropertyDescriptor` method
|
|
@@ -22783,26 +22857,26 @@ var objectGetOwnPropertyDescriptor = {
|
|
|
22783
22857
|
// V8 ~ Chrome 36-
|
|
22784
22858
|
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
22785
22859
|
var v8PrototypeDefineBug = descriptors && fails(function () {
|
|
22786
|
-
// eslint-disable-next-line es
|
|
22860
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
22787
22861
|
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
22788
22862
|
value: 42,
|
|
22789
22863
|
writable: false
|
|
22790
|
-
}).prototype
|
|
22864
|
+
}).prototype !== 42;
|
|
22791
22865
|
});
|
|
22792
22866
|
|
|
22793
|
-
var $String$
|
|
22867
|
+
var $String$2 = String;
|
|
22794
22868
|
var $TypeError$4 = TypeError;
|
|
22795
22869
|
|
|
22796
22870
|
// `Assert: Type(argument) is Object`
|
|
22797
22871
|
var anObject = function (argument) {
|
|
22798
22872
|
if (isObject(argument)) return argument;
|
|
22799
|
-
throw $TypeError$4($String$
|
|
22873
|
+
throw new $TypeError$4($String$2(argument) + ' is not an object');
|
|
22800
22874
|
};
|
|
22801
22875
|
|
|
22802
22876
|
var $TypeError$5 = TypeError;
|
|
22803
|
-
// eslint-disable-next-line es
|
|
22877
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
22804
22878
|
var $defineProperty = Object.defineProperty;
|
|
22805
|
-
// eslint-disable-next-line es
|
|
22879
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
22806
22880
|
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
22807
22881
|
var ENUMERABLE = 'enumerable';
|
|
22808
22882
|
var CONFIGURABLE = 'configurable';
|
|
@@ -22832,7 +22906,7 @@ var f$2 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Att
|
|
|
22832
22906
|
if (ie8DomDefine) try {
|
|
22833
22907
|
return $defineProperty(O, P, Attributes);
|
|
22834
22908
|
} catch (error) { /* empty */ }
|
|
22835
|
-
if ('get' in Attributes || 'set' in Attributes) throw $TypeError$5('Accessors not supported');
|
|
22909
|
+
if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$5('Accessors not supported');
|
|
22836
22910
|
if ('value' in Attributes) O[P] = Attributes.value;
|
|
22837
22911
|
return O;
|
|
22838
22912
|
};
|
|
@@ -22849,7 +22923,7 @@ var createNonEnumerableProperty = descriptors ? function (object, key, value) {
|
|
|
22849
22923
|
};
|
|
22850
22924
|
|
|
22851
22925
|
var FunctionPrototype$1 = Function.prototype;
|
|
22852
|
-
// eslint-disable-next-line es
|
|
22926
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
22853
22927
|
var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
|
|
22854
22928
|
|
|
22855
22929
|
var EXISTS$1 = hasOwnProperty_1(FunctionPrototype$1, 'name');
|
|
@@ -22876,7 +22950,7 @@ var inspectSource = sharedStore.inspectSource;
|
|
|
22876
22950
|
|
|
22877
22951
|
var WeakMap$1 = global_1.WeakMap;
|
|
22878
22952
|
|
|
22879
|
-
var
|
|
22953
|
+
var weakMapBasicDetection = isCallable(WeakMap$1) && /native code/.test(String(WeakMap$1));
|
|
22880
22954
|
|
|
22881
22955
|
var keys$1 = shared('keys');
|
|
22882
22956
|
|
|
@@ -22899,27 +22973,29 @@ var getterFor = function (TYPE) {
|
|
|
22899
22973
|
return function (it) {
|
|
22900
22974
|
var state;
|
|
22901
22975
|
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
|
22902
|
-
throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
|
|
22976
|
+
throw new TypeError$1('Incompatible receiver, ' + TYPE + ' required');
|
|
22903
22977
|
} return state;
|
|
22904
22978
|
};
|
|
22905
22979
|
};
|
|
22906
22980
|
|
|
22907
|
-
if (
|
|
22981
|
+
if (weakMapBasicDetection || sharedStore.state) {
|
|
22908
22982
|
var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$2());
|
|
22909
|
-
|
|
22910
|
-
|
|
22911
|
-
|
|
22983
|
+
/* eslint-disable no-self-assign -- prototype methods protection */
|
|
22984
|
+
store$1.get = store$1.get;
|
|
22985
|
+
store$1.has = store$1.has;
|
|
22986
|
+
store$1.set = store$1.set;
|
|
22987
|
+
/* eslint-enable no-self-assign -- prototype methods protection */
|
|
22912
22988
|
set = function (it, metadata) {
|
|
22913
|
-
if (
|
|
22989
|
+
if (store$1.has(it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
22914
22990
|
metadata.facade = it;
|
|
22915
|
-
|
|
22991
|
+
store$1.set(it, metadata);
|
|
22916
22992
|
return metadata;
|
|
22917
22993
|
};
|
|
22918
22994
|
get = function (it) {
|
|
22919
|
-
return
|
|
22995
|
+
return store$1.get(it) || {};
|
|
22920
22996
|
};
|
|
22921
22997
|
has = function (it) {
|
|
22922
|
-
return
|
|
22998
|
+
return store$1.has(it);
|
|
22923
22999
|
};
|
|
22924
23000
|
} else {
|
|
22925
23001
|
var STATE = sharedKey('state');
|
|
@@ -22947,14 +23023,23 @@ var internalState = {
|
|
|
22947
23023
|
};
|
|
22948
23024
|
|
|
22949
23025
|
var makeBuiltIn_1 = createCommonjsModule(function (module) {
|
|
23026
|
+
|
|
23027
|
+
|
|
23028
|
+
|
|
23029
|
+
|
|
23030
|
+
|
|
22950
23031
|
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
|
22951
23032
|
|
|
22952
23033
|
|
|
22953
23034
|
|
|
22954
23035
|
var enforceInternalState = internalState.enforce;
|
|
22955
23036
|
var getInternalState = internalState.get;
|
|
22956
|
-
|
|
23037
|
+
var $String = String;
|
|
23038
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
22957
23039
|
var defineProperty = Object.defineProperty;
|
|
23040
|
+
var stringSlice = functionUncurryThis(''.slice);
|
|
23041
|
+
var replace = functionUncurryThis(''.replace);
|
|
23042
|
+
var join = functionUncurryThis([].join);
|
|
22958
23043
|
|
|
22959
23044
|
var CONFIGURABLE_LENGTH = descriptors && !fails(function () {
|
|
22960
23045
|
return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
@@ -22963,8 +23048,8 @@ var CONFIGURABLE_LENGTH = descriptors && !fails(function () {
|
|
|
22963
23048
|
var TEMPLATE = String(String).split('String');
|
|
22964
23049
|
|
|
22965
23050
|
var makeBuiltIn = module.exports = function (value, name, options) {
|
|
22966
|
-
if (String(name)
|
|
22967
|
-
name = '[' + String(name)
|
|
23051
|
+
if (stringSlice($String(name), 0, 7) === 'Symbol(') {
|
|
23052
|
+
name = '[' + replace($String(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
22968
23053
|
}
|
|
22969
23054
|
if (options && options.getter) name = 'get ' + name;
|
|
22970
23055
|
if (options && options.setter) name = 'set ' + name;
|
|
@@ -22983,7 +23068,7 @@ var makeBuiltIn = module.exports = function (value, name, options) {
|
|
|
22983
23068
|
} catch (error) { /* empty */ }
|
|
22984
23069
|
var state = enforceInternalState(value);
|
|
22985
23070
|
if (!hasOwnProperty_1(state, 'source')) {
|
|
22986
|
-
state.source =
|
|
23071
|
+
state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
|
|
22987
23072
|
} return value;
|
|
22988
23073
|
};
|
|
22989
23074
|
|
|
@@ -23022,7 +23107,7 @@ var floor = Math.floor;
|
|
|
23022
23107
|
|
|
23023
23108
|
// `Math.trunc` method
|
|
23024
23109
|
// https://tc39.es/ecma262/#sec-math.trunc
|
|
23025
|
-
// eslint-disable-next-line es
|
|
23110
|
+
// eslint-disable-next-line es/no-math-trunc -- safe
|
|
23026
23111
|
var mathTrunc = Math.trunc || function trunc(x) {
|
|
23027
23112
|
var n = +x;
|
|
23028
23113
|
return (n > 0 ? floor : ceil)(n);
|
|
@@ -23070,10 +23155,10 @@ var createMethod = function (IS_INCLUDES) {
|
|
|
23070
23155
|
var value;
|
|
23071
23156
|
// Array#includes uses SameValueZero equality algorithm
|
|
23072
23157
|
// eslint-disable-next-line no-self-compare -- NaN check
|
|
23073
|
-
if (IS_INCLUDES && el
|
|
23158
|
+
if (IS_INCLUDES && el !== el) while (length > index) {
|
|
23074
23159
|
value = O[index++];
|
|
23075
23160
|
// eslint-disable-next-line no-self-compare -- NaN check
|
|
23076
|
-
if (value
|
|
23161
|
+
if (value !== value) return true;
|
|
23077
23162
|
// Array#indexOf ignores holes, Array#includes - not
|
|
23078
23163
|
} else for (;length > index; index++) {
|
|
23079
23164
|
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
@@ -23123,7 +23208,7 @@ var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
|
|
|
23123
23208
|
|
|
23124
23209
|
// `Object.getOwnPropertyNames` method
|
|
23125
23210
|
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
23126
|
-
// eslint-disable-next-line es
|
|
23211
|
+
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
|
|
23127
23212
|
var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
23128
23213
|
return objectKeysInternal(O, hiddenKeys$1);
|
|
23129
23214
|
};
|
|
@@ -23132,7 +23217,7 @@ var objectGetOwnPropertyNames = {
|
|
|
23132
23217
|
f: f$3
|
|
23133
23218
|
};
|
|
23134
23219
|
|
|
23135
|
-
// eslint-disable-next-line es
|
|
23220
|
+
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
|
23136
23221
|
var f$4 = Object.getOwnPropertySymbols;
|
|
23137
23222
|
|
|
23138
23223
|
var objectGetOwnPropertySymbols = {
|
|
@@ -23164,8 +23249,8 @@ var replacement = /#|\.prototype\./;
|
|
|
23164
23249
|
|
|
23165
23250
|
var isForced = function (feature, detection) {
|
|
23166
23251
|
var value = data[normalize(feature)];
|
|
23167
|
-
return value
|
|
23168
|
-
: value
|
|
23252
|
+
return value === POLYFILL ? true
|
|
23253
|
+
: value === NATIVE ? false
|
|
23169
23254
|
: isCallable(detection) ? fails(detection)
|
|
23170
23255
|
: !!detection;
|
|
23171
23256
|
};
|
|
@@ -23245,7 +23330,7 @@ var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
|
|
|
23245
23330
|
var $Object$3 = Object;
|
|
23246
23331
|
|
|
23247
23332
|
// ES3 wrong here
|
|
23248
|
-
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }())
|
|
23333
|
+
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';
|
|
23249
23334
|
|
|
23250
23335
|
// fallback for IE11 Script Access Denied error
|
|
23251
23336
|
var tryGet = function (it, key) {
|
|
@@ -23263,25 +23348,25 @@ var classof = toStringTagSupport ? classofRaw : function (it) {
|
|
|
23263
23348
|
// builtinTag case
|
|
23264
23349
|
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
23265
23350
|
// ES3 arguments fallback
|
|
23266
|
-
: (result = classofRaw(O))
|
|
23351
|
+
: (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;
|
|
23267
23352
|
};
|
|
23268
23353
|
|
|
23269
|
-
var $String$
|
|
23354
|
+
var $String$3 = String;
|
|
23270
23355
|
|
|
23271
23356
|
var toString_1 = function (argument) {
|
|
23272
|
-
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
23273
|
-
return $String$
|
|
23357
|
+
if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
|
|
23358
|
+
return $String$3(argument);
|
|
23274
23359
|
};
|
|
23275
23360
|
|
|
23276
23361
|
var charAt = functionUncurryThis(''.charAt);
|
|
23277
23362
|
|
|
23278
23363
|
var FORCED = fails(function () {
|
|
23279
|
-
// eslint-disable-next-line es
|
|
23364
|
+
// eslint-disable-next-line es/no-array-string-prototype-at -- safe
|
|
23280
23365
|
return '𠮷'.at(-2) !== '\uD842';
|
|
23281
23366
|
});
|
|
23282
23367
|
|
|
23283
23368
|
// `String.prototype.at` method
|
|
23284
|
-
// https://
|
|
23369
|
+
// https://tc39.es/ecma262/#sec-string.prototype.at
|
|
23285
23370
|
_export({ target: 'String', proto: true, forced: FORCED }, {
|
|
23286
23371
|
at: function at(index) {
|
|
23287
23372
|
var S = toString_1(requireObjectCoercible(this));
|
|
@@ -23294,14 +23379,14 @@ _export({ target: 'String', proto: true, forced: FORCED }, {
|
|
|
23294
23379
|
|
|
23295
23380
|
// `Object.keys` method
|
|
23296
23381
|
// https://tc39.es/ecma262/#sec-object.keys
|
|
23297
|
-
// eslint-disable-next-line es
|
|
23382
|
+
// eslint-disable-next-line es/no-object-keys -- safe
|
|
23298
23383
|
var objectKeys = Object.keys || function keys(O) {
|
|
23299
23384
|
return objectKeysInternal(O, enumBugKeys);
|
|
23300
23385
|
};
|
|
23301
23386
|
|
|
23302
23387
|
// `Object.defineProperties` method
|
|
23303
23388
|
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
23304
|
-
// eslint-disable-next-line es
|
|
23389
|
+
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
23305
23390
|
var f$5 = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
23306
23391
|
anObject(O);
|
|
23307
23392
|
var props = toIndexedObject(Properties);
|
|
@@ -23390,7 +23475,7 @@ hiddenKeys[IE_PROTO] = true;
|
|
|
23390
23475
|
|
|
23391
23476
|
// `Object.create` method
|
|
23392
23477
|
// https://tc39.es/ecma262/#sec-object.create
|
|
23393
|
-
// eslint-disable-next-line es
|
|
23478
|
+
// eslint-disable-next-line es/no-object-create -- safe
|
|
23394
23479
|
var objectCreate = Object.create || function create(O, Properties) {
|
|
23395
23480
|
var result;
|
|
23396
23481
|
if (O !== null) {
|
|
@@ -23410,7 +23495,7 @@ var ArrayPrototype = Array.prototype;
|
|
|
23410
23495
|
|
|
23411
23496
|
// Array.prototype[@@unscopables]
|
|
23412
23497
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
23413
|
-
if (ArrayPrototype[UNSCOPABLES]
|
|
23498
|
+
if (ArrayPrototype[UNSCOPABLES] === undefined) {
|
|
23414
23499
|
defineProperty$1(ArrayPrototype, UNSCOPABLES, {
|
|
23415
23500
|
configurable: true,
|
|
23416
23501
|
value: objectCreate(null)
|
|
@@ -23423,7 +23508,7 @@ var addToUnscopables = function (key) {
|
|
|
23423
23508
|
};
|
|
23424
23509
|
|
|
23425
23510
|
// `Array.prototype.at` method
|
|
23426
|
-
// https://
|
|
23511
|
+
// https://tc39.es/ecma262/#sec-array.prototype.at
|
|
23427
23512
|
_export({ target: 'Array', proto: true }, {
|
|
23428
23513
|
at: function at(index) {
|
|
23429
23514
|
var O = toObject(this);
|
|
@@ -23436,13 +23521,19 @@ _export({ target: 'Array', proto: true }, {
|
|
|
23436
23521
|
|
|
23437
23522
|
addToUnscopables('at');
|
|
23438
23523
|
|
|
23439
|
-
// eslint-disable-next-line es
|
|
23440
|
-
var
|
|
23524
|
+
// eslint-disable-next-line es/no-typed-arrays -- safe
|
|
23525
|
+
var arrayBufferBasicDetection = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
|
|
23526
|
+
|
|
23527
|
+
var defineBuiltInAccessor = function (target, name, descriptor) {
|
|
23528
|
+
if (descriptor.get) makeBuiltIn_1(descriptor.get, name, { getter: true });
|
|
23529
|
+
if (descriptor.set) makeBuiltIn_1(descriptor.set, name, { setter: true });
|
|
23530
|
+
return objectDefineProperty.f(target, name, descriptor);
|
|
23531
|
+
};
|
|
23441
23532
|
|
|
23442
23533
|
var correctPrototypeGetter = !fails(function () {
|
|
23443
23534
|
function F() { /* empty */ }
|
|
23444
23535
|
F.prototype.constructor = null;
|
|
23445
|
-
// eslint-disable-next-line es
|
|
23536
|
+
// eslint-disable-next-line es/no-object-getprototypeof -- required for testing
|
|
23446
23537
|
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
23447
23538
|
});
|
|
23448
23539
|
|
|
@@ -23452,7 +23543,7 @@ var ObjectPrototype = $Object$4.prototype;
|
|
|
23452
23543
|
|
|
23453
23544
|
// `Object.getPrototypeOf` method
|
|
23454
23545
|
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
23455
|
-
// eslint-disable-next-line es
|
|
23546
|
+
// eslint-disable-next-line es/no-object-getprototypeof -- safe
|
|
23456
23547
|
var objectGetPrototypeOf = correctPrototypeGetter ? $Object$4.getPrototypeOf : function (O) {
|
|
23457
23548
|
var object = toObject(O);
|
|
23458
23549
|
if (hasOwnProperty_1(object, IE_PROTO$1)) return object[IE_PROTO$1];
|
|
@@ -23462,12 +23553,19 @@ var objectGetPrototypeOf = correctPrototypeGetter ? $Object$4.getPrototypeOf : f
|
|
|
23462
23553
|
} return object instanceof $Object$4 ? ObjectPrototype : null;
|
|
23463
23554
|
};
|
|
23464
23555
|
|
|
23465
|
-
var
|
|
23556
|
+
var functionUncurryThisAccessor = function (object, key, method) {
|
|
23557
|
+
try {
|
|
23558
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
23559
|
+
return functionUncurryThis(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));
|
|
23560
|
+
} catch (error) { /* empty */ }
|
|
23561
|
+
};
|
|
23562
|
+
|
|
23563
|
+
var $String$4 = String;
|
|
23466
23564
|
var $TypeError$6 = TypeError;
|
|
23467
23565
|
|
|
23468
23566
|
var aPossiblePrototype = function (argument) {
|
|
23469
23567
|
if (typeof argument == 'object' || isCallable(argument)) return argument;
|
|
23470
|
-
throw $TypeError$6("Can't set " + $String$
|
|
23568
|
+
throw new $TypeError$6("Can't set " + $String$4(argument) + ' as a prototype');
|
|
23471
23569
|
};
|
|
23472
23570
|
|
|
23473
23571
|
/* eslint-disable no-proto -- safe */
|
|
@@ -23478,14 +23576,13 @@ var aPossiblePrototype = function (argument) {
|
|
|
23478
23576
|
// `Object.setPrototypeOf` method
|
|
23479
23577
|
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
23480
23578
|
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
23481
|
-
// eslint-disable-next-line es
|
|
23579
|
+
// eslint-disable-next-line es/no-object-setprototypeof -- safe
|
|
23482
23580
|
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
23483
23581
|
var CORRECT_SETTER = false;
|
|
23484
23582
|
var test = {};
|
|
23485
23583
|
var setter;
|
|
23486
23584
|
try {
|
|
23487
|
-
|
|
23488
|
-
setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
23585
|
+
setter = functionUncurryThisAccessor(Object.prototype, '__proto__', 'set');
|
|
23489
23586
|
setter(test, []);
|
|
23490
23587
|
CORRECT_SETTER = test instanceof Array;
|
|
23491
23588
|
} catch (error) { /* empty */ }
|
|
@@ -23498,14 +23595,6 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
23498
23595
|
};
|
|
23499
23596
|
}() : undefined);
|
|
23500
23597
|
|
|
23501
|
-
var defineProperty$2 = objectDefineProperty.f;
|
|
23502
|
-
|
|
23503
|
-
|
|
23504
|
-
|
|
23505
|
-
|
|
23506
|
-
|
|
23507
|
-
|
|
23508
|
-
|
|
23509
23598
|
var enforceInternalState = internalState.enforce;
|
|
23510
23599
|
var getInternalState = internalState.get;
|
|
23511
23600
|
var Int8Array = global_1.Int8Array;
|
|
@@ -23521,7 +23610,7 @@ var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
|
|
|
23521
23610
|
var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
|
|
23522
23611
|
var TYPED_ARRAY_CONSTRUCTOR = 'TypedArrayConstructor';
|
|
23523
23612
|
// Fixing native typed arrays in Opera Presto crashes the browser, see #595
|
|
23524
|
-
var NATIVE_ARRAY_BUFFER_VIEWS =
|
|
23613
|
+
var NATIVE_ARRAY_BUFFER_VIEWS = arrayBufferBasicDetection && !!objectSetPrototypeOf && classof(global_1.opera) !== 'Opera';
|
|
23525
23614
|
var TYPED_ARRAY_TAG_REQUIRED = false;
|
|
23526
23615
|
var NAME, Constructor, Prototype;
|
|
23527
23616
|
|
|
@@ -23566,12 +23655,12 @@ var isTypedArray = function (it) {
|
|
|
23566
23655
|
|
|
23567
23656
|
var aTypedArray = function (it) {
|
|
23568
23657
|
if (isTypedArray(it)) return it;
|
|
23569
|
-
throw TypeError$2('Target is not a typed array');
|
|
23658
|
+
throw new TypeError$2('Target is not a typed array');
|
|
23570
23659
|
};
|
|
23571
23660
|
|
|
23572
23661
|
var aTypedArrayConstructor = function (C) {
|
|
23573
23662
|
if (isCallable(C) && (!objectSetPrototypeOf || objectIsPrototypeOf(TypedArray, C))) return C;
|
|
23574
|
-
throw TypeError$2(tryToString(C) + ' is not a typed array constructor');
|
|
23663
|
+
throw new TypeError$2(tryToString(C) + ' is not a typed array constructor');
|
|
23575
23664
|
};
|
|
23576
23665
|
|
|
23577
23666
|
var exportTypedArrayMethod = function (KEY, property, forced, options) {
|
|
@@ -23635,7 +23724,7 @@ for (NAME in BigIntArrayConstructorsList) {
|
|
|
23635
23724
|
if (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) {
|
|
23636
23725
|
// eslint-disable-next-line no-shadow -- safe
|
|
23637
23726
|
TypedArray = function TypedArray() {
|
|
23638
|
-
throw TypeError$2('Incorrect invocation');
|
|
23727
|
+
throw new TypeError$2('Incorrect invocation');
|
|
23639
23728
|
};
|
|
23640
23729
|
if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
|
|
23641
23730
|
if (global_1[NAME]) objectSetPrototypeOf(global_1[NAME], TypedArray);
|
|
@@ -23656,9 +23745,12 @@ if (NATIVE_ARRAY_BUFFER_VIEWS && objectGetPrototypeOf(Uint8ClampedArrayPrototype
|
|
|
23656
23745
|
|
|
23657
23746
|
if (descriptors && !hasOwnProperty_1(TypedArrayPrototype, TO_STRING_TAG$2)) {
|
|
23658
23747
|
TYPED_ARRAY_TAG_REQUIRED = true;
|
|
23659
|
-
|
|
23660
|
-
|
|
23661
|
-
|
|
23748
|
+
defineBuiltInAccessor(TypedArrayPrototype, TO_STRING_TAG$2, {
|
|
23749
|
+
configurable: true,
|
|
23750
|
+
get: function () {
|
|
23751
|
+
return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;
|
|
23752
|
+
}
|
|
23753
|
+
});
|
|
23662
23754
|
for (NAME in TypedArrayConstructorsList) if (global_1[NAME]) {
|
|
23663
23755
|
createNonEnumerableProperty(global_1[NAME], TYPED_ARRAY_TAG, NAME);
|
|
23664
23756
|
}
|
|
@@ -23682,7 +23774,7 @@ var aTypedArray$1 = arrayBufferViewCore.aTypedArray;
|
|
|
23682
23774
|
var exportTypedArrayMethod$1 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
23683
23775
|
|
|
23684
23776
|
// `%TypedArray%.prototype.at` method
|
|
23685
|
-
// https://
|
|
23777
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.at
|
|
23686
23778
|
exportTypedArrayMethod$1('at', function at(index) {
|
|
23687
23779
|
var O = aTypedArray$1(this);
|
|
23688
23780
|
var len = lengthOfArrayLike(O);
|
|
@@ -23693,9 +23785,11 @@ exportTypedArrayMethod$1('at', function at(index) {
|
|
|
23693
23785
|
|
|
23694
23786
|
var selectedColor = "".concat(MATISSE_BLUE);
|
|
23695
23787
|
var hoverColor$3 = "".concat(HOVER_LIGHT_BLUE);
|
|
23788
|
+
var focusColor = "".concat(MATISSE_BLUE_DARK);
|
|
23696
23789
|
var fallbackValues$f = {
|
|
23697
23790
|
selectedColor: selectedColor,
|
|
23698
|
-
hoverColor: hoverColor$3
|
|
23791
|
+
hoverColor: hoverColor$3,
|
|
23792
|
+
focusColor: focusColor
|
|
23699
23793
|
};
|
|
23700
23794
|
|
|
23701
23795
|
var IconWrapper = styled.div.withConfig({
|
|
@@ -23718,7 +23812,7 @@ var DropdownContentWrapper = styled.div.withConfig({
|
|
|
23718
23812
|
var DropdownItemWrapper = styled.li.withConfig({
|
|
23719
23813
|
displayName: "Dropdown__DropdownItemWrapper",
|
|
23720
23814
|
componentId: "sc-pn6m0h-2"
|
|
23721
|
-
})(["
|
|
23815
|
+
})(["text-align:start;border-width:2px;border-style:solid;border-color:", ";box-shadow:none;box-sizing:border-box;width:100%;list-style:none;cursor:", ";&:hover{border-color:", ";> *{background:", ";border-color:", ";}}&:focus{outline:none;border-color:", ";> *{background:", ";border-color:white;outline:none;}}"], function (_ref4) {
|
|
23722
23816
|
var selected = _ref4.selected,
|
|
23723
23817
|
themeValues = _ref4.themeValues;
|
|
23724
23818
|
return selected ? themeValues.selectedColor : WHITE;
|
|
@@ -23726,48 +23820,71 @@ var DropdownItemWrapper = styled.li.withConfig({
|
|
|
23726
23820
|
var disabled = _ref5.disabled;
|
|
23727
23821
|
return disabled ? "default" : "pointer";
|
|
23728
23822
|
}, function (_ref6) {
|
|
23729
|
-
var
|
|
23730
|
-
|
|
23823
|
+
var disabled = _ref6.disabled,
|
|
23824
|
+
selected = _ref6.selected,
|
|
23731
23825
|
themeValues = _ref6.themeValues;
|
|
23732
|
-
return selected ? themeValues.
|
|
23826
|
+
return selected ? themeValues.focusColor : disabled ? WHITE : themeValues.hoverColor;
|
|
23733
23827
|
}, function (_ref7) {
|
|
23734
23828
|
var selected = _ref7.selected,
|
|
23735
23829
|
disabled = _ref7.disabled,
|
|
23736
23830
|
themeValues = _ref7.themeValues;
|
|
23737
|
-
return selected ? themeValues.
|
|
23831
|
+
return selected ? themeValues.focusColor : disabled ? WHITE : themeValues.hoverColor;
|
|
23832
|
+
}, function (_ref8) {
|
|
23833
|
+
var selected = _ref8.selected,
|
|
23834
|
+
disabled = _ref8.disabled,
|
|
23835
|
+
themeValues = _ref8.themeValues;
|
|
23836
|
+
return selected ? themeValues.focusColor : disabled ? WHITE : themeValues.hoverColor;
|
|
23837
|
+
}, function (_ref9) {
|
|
23838
|
+
var themeValues = _ref9.themeValues;
|
|
23839
|
+
return themeValues.selectedColor;
|
|
23840
|
+
}, function (_ref10) {
|
|
23841
|
+
var selected = _ref10.selected,
|
|
23842
|
+
disabled = _ref10.disabled,
|
|
23843
|
+
themeValues = _ref10.themeValues;
|
|
23844
|
+
return selected ? themeValues.focusColor : disabled ? WHITE : themeValues.hoverColor;
|
|
23845
|
+
});
|
|
23846
|
+
var DropdownItemBorder = styled.div.withConfig({
|
|
23847
|
+
displayName: "Dropdown__DropdownItemBorder",
|
|
23848
|
+
componentId: "sc-pn6m0h-3"
|
|
23849
|
+
})(["background:", ";border-color:", ";border-width:2px;border-style:solid;padding:12px;"], function (_ref11) {
|
|
23850
|
+
var selected = _ref11.selected,
|
|
23851
|
+
themeValues = _ref11.themeValues;
|
|
23852
|
+
return selected ? themeValues.selectedColor : WHITE;
|
|
23853
|
+
}, function (_ref12) {
|
|
23854
|
+
var selected = _ref12.selected,
|
|
23855
|
+
themeValues = _ref12.themeValues;
|
|
23856
|
+
return selected ? themeValues.selectedColor : WHITE;
|
|
23738
23857
|
});
|
|
23739
23858
|
|
|
23740
|
-
var Dropdown = function Dropdown(
|
|
23741
|
-
var placeholder =
|
|
23742
|
-
options =
|
|
23743
|
-
value =
|
|
23744
|
-
isOpen =
|
|
23745
|
-
isError =
|
|
23746
|
-
onSelect =
|
|
23747
|
-
|
|
23748
|
-
disabledValues =
|
|
23749
|
-
|
|
23750
|
-
_onClick =
|
|
23751
|
-
themeValues =
|
|
23752
|
-
maxHeight =
|
|
23753
|
-
|
|
23754
|
-
widthFitOptions =
|
|
23755
|
-
disabled =
|
|
23756
|
-
|
|
23757
|
-
hasTitles =
|
|
23758
|
-
|
|
23759
|
-
autoEraseTypeAhead =
|
|
23760
|
-
ariaLabelledby =
|
|
23761
|
-
ariaDescribedby =
|
|
23762
|
-
autocompleteValue =
|
|
23763
|
-
|
|
23764
|
-
smoothScroll =
|
|
23765
|
-
|
|
23766
|
-
ariaInvalid =
|
|
23767
|
-
|
|
23768
|
-
isRequired =
|
|
23769
|
-
|
|
23770
|
-
var required = options.required || isRequired;
|
|
23859
|
+
var Dropdown = function Dropdown(_ref13) {
|
|
23860
|
+
var placeholder = _ref13.placeholder,
|
|
23861
|
+
options = _ref13.options,
|
|
23862
|
+
value = _ref13.value,
|
|
23863
|
+
isOpen = _ref13.isOpen,
|
|
23864
|
+
isError = _ref13.isError,
|
|
23865
|
+
onSelect = _ref13.onSelect,
|
|
23866
|
+
_ref13$disabledValues = _ref13.disabledValues,
|
|
23867
|
+
disabledValues = _ref13$disabledValues === void 0 ? [] : _ref13$disabledValues,
|
|
23868
|
+
_ref13$onClick = _ref13.onClick,
|
|
23869
|
+
_onClick = _ref13$onClick === void 0 ? noop : _ref13$onClick,
|
|
23870
|
+
themeValues = _ref13.themeValues,
|
|
23871
|
+
maxHeight = _ref13.maxHeight,
|
|
23872
|
+
_ref13$widthFitOption = _ref13.widthFitOptions,
|
|
23873
|
+
widthFitOptions = _ref13$widthFitOption === void 0 ? false : _ref13$widthFitOption,
|
|
23874
|
+
disabled = _ref13.disabled,
|
|
23875
|
+
_ref13$hasTitles = _ref13.hasTitles,
|
|
23876
|
+
hasTitles = _ref13$hasTitles === void 0 ? false : _ref13$hasTitles,
|
|
23877
|
+
_ref13$autoEraseTypeA = _ref13.autoEraseTypeAhead,
|
|
23878
|
+
autoEraseTypeAhead = _ref13$autoEraseTypeA === void 0 ? true : _ref13$autoEraseTypeA,
|
|
23879
|
+
ariaLabelledby = _ref13.ariaLabelledby,
|
|
23880
|
+
ariaDescribedby = _ref13.ariaDescribedby,
|
|
23881
|
+
autocompleteValue = _ref13.autocompleteValue,
|
|
23882
|
+
_ref13$smoothScroll = _ref13.smoothScroll,
|
|
23883
|
+
smoothScroll = _ref13$smoothScroll === void 0 ? true : _ref13$smoothScroll,
|
|
23884
|
+
_ref13$ariaInvalid = _ref13.ariaInvalid,
|
|
23885
|
+
ariaInvalid = _ref13$ariaInvalid === void 0 ? false : _ref13$ariaInvalid,
|
|
23886
|
+
_ref13$isRequired = _ref13.isRequired,
|
|
23887
|
+
isRequired = _ref13$isRequired === void 0 ? false : _ref13$isRequired;
|
|
23771
23888
|
|
|
23772
23889
|
var _useState = useState(""),
|
|
23773
23890
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -23960,11 +24077,13 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
23960
24077
|
clearTimeout(timer);
|
|
23961
24078
|
setTimer(setTimeout(function () {
|
|
23962
24079
|
return setInputValue("");
|
|
23963
|
-
},
|
|
24080
|
+
}, 20000));
|
|
23964
24081
|
}
|
|
23965
24082
|
|
|
23966
24083
|
setFilteredOptions(options.filter(function (option) {
|
|
23967
|
-
|
|
24084
|
+
var _option$value, _option$value$toLower, _option$text, _option$text$toLowerC;
|
|
24085
|
+
|
|
24086
|
+
return (option === null || option === void 0 ? void 0 : (_option$value = option.value) === null || _option$value === void 0 ? void 0 : (_option$value$toLower = _option$value.toLowerCase()) === null || _option$value$toLower === void 0 ? void 0 : _option$value$toLower.indexOf(inputValue === null || inputValue === void 0 ? void 0 : inputValue.toLowerCase())) >= 0 || ((_option$text = option.text) === null || _option$text === void 0 ? void 0 : (_option$text$toLowerC = _option$text.toLowerCase()) === null || _option$text$toLowerC === void 0 ? void 0 : _option$text$toLowerC.indexOf(inputValue === null || inputValue === void 0 ? void 0 : inputValue.toLowerCase())) >= 0;
|
|
23968
24087
|
}));
|
|
23969
24088
|
}, [inputValue]);
|
|
23970
24089
|
useEffect$1(function () {
|
|
@@ -24016,8 +24135,7 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
24016
24135
|
"aria-labelledby": ariaLabelledby,
|
|
24017
24136
|
"aria-describedby": ariaDescribedby,
|
|
24018
24137
|
"aria-expanded": isOpen,
|
|
24019
|
-
"aria-required": required,
|
|
24020
|
-
required: required,
|
|
24138
|
+
"aria-required": options.required,
|
|
24021
24139
|
"aria-invalid": ariaInvalid,
|
|
24022
24140
|
background: isOpen ? themeValues.hoverColor : WHITE,
|
|
24023
24141
|
borderRadius: "2px",
|
|
@@ -24039,14 +24157,14 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
24039
24157
|
},
|
|
24040
24158
|
padding: "12px",
|
|
24041
24159
|
placeholder: getSelection(),
|
|
24160
|
+
required: options.required || isRequired,
|
|
24042
24161
|
role: "combobox",
|
|
24043
24162
|
themeValues: themeValues,
|
|
24044
24163
|
title: hasTitles ? getSelection() : null,
|
|
24045
24164
|
type: "text",
|
|
24046
24165
|
tabIndex: 0,
|
|
24047
24166
|
value: inputValue,
|
|
24048
|
-
width: "100%"
|
|
24049
|
-
disabled: disabledValues.includes(inputValue)
|
|
24167
|
+
width: "100%"
|
|
24050
24168
|
}), /*#__PURE__*/React.createElement(IconWrapper, {
|
|
24051
24169
|
open: isOpen,
|
|
24052
24170
|
onClick: _onClick
|
|
@@ -24057,8 +24175,7 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
24057
24175
|
widthFitOptions: widthFitOptions,
|
|
24058
24176
|
tabIndex: 0,
|
|
24059
24177
|
role: "listbox",
|
|
24060
|
-
id: "".concat(ariaLabelledby, "_listbox")
|
|
24061
|
-
required: required
|
|
24178
|
+
id: "".concat(ariaLabelledby, "_listbox")
|
|
24062
24179
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
24063
24180
|
childGap: "0",
|
|
24064
24181
|
as: "ul"
|
|
@@ -24091,11 +24208,15 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
24091
24208
|
onFocus: function onFocus() {
|
|
24092
24209
|
return setFocusedRef(optionRefs.current[i]);
|
|
24093
24210
|
}
|
|
24211
|
+
}, /*#__PURE__*/React.createElement(DropdownItemBorder, {
|
|
24212
|
+
disabled: disabledValues.includes(choice.value),
|
|
24213
|
+
selected: choice.value === value,
|
|
24214
|
+
themeValues: themeValues
|
|
24094
24215
|
}, /*#__PURE__*/React.createElement(Text$1, {
|
|
24095
24216
|
variant: "p",
|
|
24096
24217
|
color: choice.value === value ? WHITE : disabledValues.includes(choice.value) ? STORM_GREY : MINESHAFT_GREY,
|
|
24097
|
-
extraStyles: "padding-left: 16px;\n
|
|
24098
|
-
}, choice.text));
|
|
24218
|
+
extraStyles: "padding-left: 16px;\n cursor: ".concat(disabledValues.includes(choice.value) ? "default" : "pointer", ";\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;")
|
|
24219
|
+
}, choice.text)));
|
|
24099
24220
|
}))) : /*#__PURE__*/React.createElement(Fragment$1, null)));
|
|
24100
24221
|
};
|
|
24101
24222
|
|
|
@@ -24214,17 +24335,6 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24214
24335
|
setOpen = _useState2[1];
|
|
24215
24336
|
|
|
24216
24337
|
var dropdownRef = useRef(null);
|
|
24217
|
-
var required = (options === null || options === void 0 ? void 0 : options.required) || isRequired;
|
|
24218
|
-
var labelId = useMemo(function () {
|
|
24219
|
-
return function (labelTextWhenNoError) {
|
|
24220
|
-
return createIdFromString(labelTextWhenNoError);
|
|
24221
|
-
};
|
|
24222
|
-
}, [labelTextWhenNoError]);
|
|
24223
|
-
var descriptionId = useMemo(function () {
|
|
24224
|
-
return function (field, labelTextWhenNoError) {
|
|
24225
|
-
return field.hasErrors && field.dirty ? labelId(labelTextWhenNoError) + "error-message" : "";
|
|
24226
|
-
};
|
|
24227
|
-
}, [field, labelTextWhenNoError]);
|
|
24228
24338
|
|
|
24229
24339
|
var handleClickAway = function handleClickAway(event) {
|
|
24230
24340
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
@@ -24240,8 +24350,8 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24240
24350
|
});
|
|
24241
24351
|
return /*#__PURE__*/React.createElement(SelectContainer, {
|
|
24242
24352
|
ref: dropdownRef,
|
|
24243
|
-
"aria-role": "group",
|
|
24244
24353
|
disabled: disabled,
|
|
24354
|
+
"aria-disabled": disabled,
|
|
24245
24355
|
"data-qa": dataQa
|
|
24246
24356
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
24247
24357
|
padding: "0",
|
|
@@ -24255,10 +24365,10 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24255
24365
|
color: themeValues.labelColor,
|
|
24256
24366
|
weight: themeValues.fontWeight,
|
|
24257
24367
|
extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
|
|
24258
|
-
id:
|
|
24368
|
+
id: createIdFromString(labelTextWhenNoError)
|
|
24259
24369
|
}, labelTextWhenNoError))), /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
24260
|
-
ariaLabelledby:
|
|
24261
|
-
ariaDescribedby:
|
|
24370
|
+
ariaLabelledby: createIdFromString(labelTextWhenNoError),
|
|
24371
|
+
ariaDescribedby: createIdFromString(labelTextWhenNoError, "error message"),
|
|
24262
24372
|
maxHeight: dropdownMaxHeight,
|
|
24263
24373
|
widthFitOptions: widthFitOptions,
|
|
24264
24374
|
hasTitles: hasTitles,
|
|
@@ -24280,11 +24390,11 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24280
24390
|
disabled: disabled,
|
|
24281
24391
|
autocompleteValue: autocompleteValue,
|
|
24282
24392
|
smoothScroll: smoothScroll,
|
|
24283
|
-
isRequired:
|
|
24393
|
+
isRequired: isRequired
|
|
24284
24394
|
}), /*#__PURE__*/React.createElement(Stack, {
|
|
24285
24395
|
direction: "row",
|
|
24286
24396
|
justify: "space-between"
|
|
24287
|
-
}, /*#__PURE__*/React.createElement(Text$1, {
|
|
24397
|
+
}, field.hasErrors && field.dirty || field.hasErrors && showErrors ? /*#__PURE__*/React.createElement(Text$1, {
|
|
24288
24398
|
color: ERROR_COLOR,
|
|
24289
24399
|
variant: "pXS",
|
|
24290
24400
|
weight: themeValues.fontWeight,
|
|
@@ -24293,7 +24403,9 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24293
24403
|
"aria-live": "polite",
|
|
24294
24404
|
"aria-atomic": true,
|
|
24295
24405
|
"data-qa": createIdFromString(labelTextWhenNoError, "error message")
|
|
24296
|
-
},
|
|
24406
|
+
}, errorMessages[field.errors[0]]) : /*#__PURE__*/React.createElement(Text$1, {
|
|
24407
|
+
extraStyles: "height: ".concat(themeValues.lineHeight, ";")
|
|
24408
|
+
})));
|
|
24297
24409
|
};
|
|
24298
24410
|
|
|
24299
24411
|
var FormSelect$1 = themeComponent(FormSelect, "FormSelect", fallbackValues$g, "default");
|
|
@@ -25049,10 +25161,10 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
25049
25161
|
fieldActions = _ref.fieldActions,
|
|
25050
25162
|
showErrors = _ref.showErrors,
|
|
25051
25163
|
onChange = _ref.onChange,
|
|
25052
|
-
_ref$dataQa = _ref.dataQa,
|
|
25053
|
-
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
|
|
25054
25164
|
_ref$isRequired = _ref.isRequired,
|
|
25055
|
-
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired
|
|
25165
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
|
|
25166
|
+
_ref$dataQa = _ref.dataQa,
|
|
25167
|
+
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa;
|
|
25056
25168
|
return /*#__PURE__*/React.createElement(FormSelect$1, {
|
|
25057
25169
|
options: options,
|
|
25058
25170
|
field: field,
|
|
@@ -25227,6 +25339,346 @@ var DisplayBox = function DisplayBox(_ref) {
|
|
|
25227
25339
|
|
|
25228
25340
|
var DisplayBox$1 = themeComponent(DisplayBox, "DisplayBox", fallbackValues$i);
|
|
25229
25341
|
|
|
25342
|
+
/*
|
|
25343
|
+
Hook that assigns a click event listener to the main document element
|
|
25344
|
+
Returns a ref to attach to another element (like an icon/button that triggers a popover)
|
|
25345
|
+
If a click event gets captured by the document and the assigned element isn't the target
|
|
25346
|
+
hook will run whatever handler is passed (eg a function that closes a popover)
|
|
25347
|
+
|
|
25348
|
+
See popover component for implementation
|
|
25349
|
+
|
|
25350
|
+
*/
|
|
25351
|
+
|
|
25352
|
+
var useOutsideClickHook = function useOutsideClickHook(handler) {
|
|
25353
|
+
var ref = useRef();
|
|
25354
|
+
useEffect$1(function () {
|
|
25355
|
+
}, [ref]);
|
|
25356
|
+
return ref;
|
|
25357
|
+
};
|
|
25358
|
+
|
|
25359
|
+
/*
|
|
25360
|
+
Hook that takes an ID selector for an element on the screen
|
|
25361
|
+
And optionally values for top position, left position, smooth behavior
|
|
25362
|
+
Finds element on screen and scrolls it to the provided coordinates
|
|
25363
|
+
|
|
25364
|
+
(string, number, number, string, number) => undefined;
|
|
25365
|
+
*/
|
|
25366
|
+
var useScrollTo = function useScrollTo(id) {
|
|
25367
|
+
var top = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
25368
|
+
var left = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
25369
|
+
var behavior = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "auto";
|
|
25370
|
+
var delay = arguments.length > 4 ? arguments[4] : undefined;
|
|
25371
|
+
var scrollItem;
|
|
25372
|
+
|
|
25373
|
+
if (delay) {
|
|
25374
|
+
setTimeout(function () {
|
|
25375
|
+
var _scrollItem;
|
|
25376
|
+
|
|
25377
|
+
scrollItem = document.getElementById(id);
|
|
25378
|
+
(_scrollItem = scrollItem) === null || _scrollItem === void 0 ? void 0 : _scrollItem.scrollTo({
|
|
25379
|
+
top: top,
|
|
25380
|
+
left: left,
|
|
25381
|
+
behavior: behavior
|
|
25382
|
+
});
|
|
25383
|
+
}, delay);
|
|
25384
|
+
} else {
|
|
25385
|
+
var _scrollItem2;
|
|
25386
|
+
|
|
25387
|
+
scrollItem = document.getElementById(id);
|
|
25388
|
+
(_scrollItem2 = scrollItem) === null || _scrollItem2 === void 0 ? void 0 : _scrollItem2.scrollTo({
|
|
25389
|
+
top: top,
|
|
25390
|
+
left: left,
|
|
25391
|
+
behavior: behavior
|
|
25392
|
+
});
|
|
25393
|
+
}
|
|
25394
|
+
};
|
|
25395
|
+
|
|
25396
|
+
var initialToastState = {
|
|
25397
|
+
isOpen: false,
|
|
25398
|
+
variant: "",
|
|
25399
|
+
message: ""
|
|
25400
|
+
};
|
|
25401
|
+
|
|
25402
|
+
var useToastNotification = function useToastNotification() {
|
|
25403
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
25404
|
+
_ref$timeout = _ref.timeout,
|
|
25405
|
+
timeout = _ref$timeout === void 0 ? 5000 : _ref$timeout;
|
|
25406
|
+
|
|
25407
|
+
var _useState = useState(initialToastState),
|
|
25408
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
25409
|
+
toastState = _useState2[0],
|
|
25410
|
+
setToastState = _useState2[1];
|
|
25411
|
+
|
|
25412
|
+
useEffect$1(function () {
|
|
25413
|
+
if (toastState.isOpen) {
|
|
25414
|
+
setTimeout(function () {
|
|
25415
|
+
setToastState(initialToastState);
|
|
25416
|
+
}, timeout);
|
|
25417
|
+
}
|
|
25418
|
+
}, [timeout, toastState.isOpen]);
|
|
25419
|
+
|
|
25420
|
+
var showToast = function showToast(_ref2) {
|
|
25421
|
+
var message = _ref2.message,
|
|
25422
|
+
variant = _ref2.variant;
|
|
25423
|
+
return setToastState({
|
|
25424
|
+
isOpen: true,
|
|
25425
|
+
variant: variant,
|
|
25426
|
+
message: message
|
|
25427
|
+
});
|
|
25428
|
+
};
|
|
25429
|
+
|
|
25430
|
+
var hideToast = function hideToast() {
|
|
25431
|
+
return setToastState(initialToastState);
|
|
25432
|
+
};
|
|
25433
|
+
|
|
25434
|
+
return {
|
|
25435
|
+
isToastOpen: toastState.isOpen,
|
|
25436
|
+
toastVariant: toastState.variant,
|
|
25437
|
+
toastMessage: toastState.message,
|
|
25438
|
+
showToast: showToast,
|
|
25439
|
+
hideToast: hideToast
|
|
25440
|
+
};
|
|
25441
|
+
};
|
|
25442
|
+
|
|
25443
|
+
|
|
25444
|
+
|
|
25445
|
+
var index$4 = /*#__PURE__*/Object.freeze({
|
|
25446
|
+
__proto__: null,
|
|
25447
|
+
useOutsideClick: useOutsideClickHook,
|
|
25448
|
+
useScrollTo: useScrollTo,
|
|
25449
|
+
useToastNotification: useToastNotification
|
|
25450
|
+
});
|
|
25451
|
+
|
|
25452
|
+
var hoverColor$4 = "#116285";
|
|
25453
|
+
var activeColor$4 = "#0E506D";
|
|
25454
|
+
var popoverTriggerColor = "#15749D";
|
|
25455
|
+
var fallbackValues$j = {
|
|
25456
|
+
hoverColor: hoverColor$4,
|
|
25457
|
+
activeColor: activeColor$4,
|
|
25458
|
+
popoverTriggerColor: popoverTriggerColor
|
|
25459
|
+
};
|
|
25460
|
+
|
|
25461
|
+
var arrowBorder = function arrowBorder(borderColor, direction) {
|
|
25462
|
+
var width = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "8px";
|
|
25463
|
+
var angle = "".concat(width, " solid transparent");
|
|
25464
|
+
var straight = "".concat(width, " solid ").concat(borderColor);
|
|
25465
|
+
|
|
25466
|
+
if (direction == "down") {
|
|
25467
|
+
return "border-left: ".concat(angle, "; border-right: ").concat(angle, "; border-top: ").concat(straight);
|
|
25468
|
+
} else if (direction == "up") {
|
|
25469
|
+
return "border-left: ".concat(angle, "; border-right: ").concat(angle, "; border-bottom: ").concat(straight);
|
|
25470
|
+
} else if (direction == "left") {
|
|
25471
|
+
return "border-top: ".concat(angle, "; border-bottom: ").concat(angle, "; border-right: ").concat(straight);
|
|
25472
|
+
} else if (direction == "right") {
|
|
25473
|
+
return "border-top: ".concat(angle, "; border-bottom: ").concat(angle, "; border-left: ").concat(straight);
|
|
25474
|
+
}
|
|
25475
|
+
};
|
|
25476
|
+
|
|
25477
|
+
var Popover = function Popover(_ref) {
|
|
25478
|
+
var themeValues = _ref.themeValues,
|
|
25479
|
+
_ref$triggerText = _ref.triggerText,
|
|
25480
|
+
triggerText = _ref$triggerText === void 0 ? "" : _ref$triggerText,
|
|
25481
|
+
_ref$content = _ref.content,
|
|
25482
|
+
content = _ref$content === void 0 ? "" : _ref$content,
|
|
25483
|
+
_ref$hasIcon = _ref.hasIcon,
|
|
25484
|
+
hasIcon = _ref$hasIcon === void 0 ? false : _ref$hasIcon,
|
|
25485
|
+
Icon = _ref.icon,
|
|
25486
|
+
_ref$iconHelpText = _ref.iconHelpText,
|
|
25487
|
+
iconHelpText = _ref$iconHelpText === void 0 ? "" : _ref$iconHelpText,
|
|
25488
|
+
_ref$popoverID = _ref.popoverID,
|
|
25489
|
+
popoverID = _ref$popoverID === void 0 ? 0 : _ref$popoverID,
|
|
25490
|
+
_ref$popoverFocus = _ref.popoverFocus,
|
|
25491
|
+
popoverFocus = _ref$popoverFocus === void 0 ? false : _ref$popoverFocus,
|
|
25492
|
+
extraStyles = _ref.extraStyles,
|
|
25493
|
+
textExtraStyles = _ref.textExtraStyles,
|
|
25494
|
+
_ref$minWidth = _ref.minWidth,
|
|
25495
|
+
minWidth = _ref$minWidth === void 0 ? "250px" : _ref$minWidth,
|
|
25496
|
+
_ref$maxWidth = _ref.maxWidth,
|
|
25497
|
+
maxWidth = _ref$maxWidth === void 0 ? "300px" : _ref$maxWidth,
|
|
25498
|
+
_ref$height = _ref.height,
|
|
25499
|
+
height = _ref$height === void 0 ? "auto" : _ref$height,
|
|
25500
|
+
position = _ref.position,
|
|
25501
|
+
arrowPosition = _ref.arrowPosition,
|
|
25502
|
+
_ref$arrowDirection = _ref.arrowDirection,
|
|
25503
|
+
arrowDirection = _ref$arrowDirection === void 0 ? "down" : _ref$arrowDirection,
|
|
25504
|
+
_ref$transform = _ref.transform,
|
|
25505
|
+
transform = _ref$transform === void 0 ? "none" : _ref$transform,
|
|
25506
|
+
buttonExtraStyles = _ref.buttonExtraStyles,
|
|
25507
|
+
_ref$backgroundColor = _ref.backgroundColor,
|
|
25508
|
+
backgroundColor = _ref$backgroundColor === void 0 ? "white" : _ref$backgroundColor,
|
|
25509
|
+
_ref$borderColor = _ref.borderColor,
|
|
25510
|
+
borderColor = _ref$borderColor === void 0 ? "rgba(255, 255, 255, 0.85)" : _ref$borderColor,
|
|
25511
|
+
popoverExtraStyles = _ref.popoverExtraStyles;
|
|
25512
|
+
var hoverColor = themeValues.hoverColor,
|
|
25513
|
+
activeColor = themeValues.activeColor,
|
|
25514
|
+
popoverTriggerColor = themeValues.popoverTriggerColor;
|
|
25515
|
+
|
|
25516
|
+
var _ref2 = position !== null && position !== void 0 ? position : {},
|
|
25517
|
+
_ref2$top = _ref2.top,
|
|
25518
|
+
top = _ref2$top === void 0 ? "-110px" : _ref2$top,
|
|
25519
|
+
_ref2$right = _ref2.right,
|
|
25520
|
+
right = _ref2$right === void 0 ? "auto" : _ref2$right,
|
|
25521
|
+
_ref2$bottom = _ref2.bottom,
|
|
25522
|
+
bottom = _ref2$bottom === void 0 ? "auto" : _ref2$bottom,
|
|
25523
|
+
_ref2$left = _ref2.left,
|
|
25524
|
+
left = _ref2$left === void 0 ? "-225px" : _ref2$left;
|
|
25525
|
+
|
|
25526
|
+
var _ref3 = arrowPosition !== null && arrowPosition !== void 0 ? arrowPosition : {},
|
|
25527
|
+
_ref3$arrowTop = _ref3.arrowTop,
|
|
25528
|
+
arrowTop = _ref3$arrowTop === void 0 ? "auto" : _ref3$arrowTop,
|
|
25529
|
+
_ref3$arrowRight = _ref3.arrowRight,
|
|
25530
|
+
arrowRight = _ref3$arrowRight === void 0 ? "10px" : _ref3$arrowRight,
|
|
25531
|
+
_ref3$arrowBottom = _ref3.arrowBottom,
|
|
25532
|
+
arrowBottom = _ref3$arrowBottom === void 0 ? "-8px" : _ref3$arrowBottom,
|
|
25533
|
+
_ref3$arrowLeft = _ref3.arrowLeft,
|
|
25534
|
+
arrowLeft = _ref3$arrowLeft === void 0 ? "auto" : _ref3$arrowLeft;
|
|
25535
|
+
|
|
25536
|
+
var _useState = useState(false),
|
|
25537
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
25538
|
+
popoverOpen = _useState2[0],
|
|
25539
|
+
togglePopover = _useState2[1];
|
|
25540
|
+
|
|
25541
|
+
var handleTogglePopover = function handleTogglePopover(popoverState) {
|
|
25542
|
+
if (popoverOpen !== popoverState) {
|
|
25543
|
+
togglePopover(popoverState);
|
|
25544
|
+
}
|
|
25545
|
+
};
|
|
25546
|
+
|
|
25547
|
+
var triggerRef = useOutsideClickHook();
|
|
25548
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
25549
|
+
padding: "0",
|
|
25550
|
+
extraStyles: "position: relative; ".concat(extraStyles)
|
|
25551
|
+
}, /*#__PURE__*/React.createElement(ButtonWithAction, {
|
|
25552
|
+
action: function action() {
|
|
25553
|
+
return noop;
|
|
25554
|
+
},
|
|
25555
|
+
onFocus: function onFocus() {
|
|
25556
|
+
handleTogglePopover(true);
|
|
25557
|
+
},
|
|
25558
|
+
onBlur: function onBlur() {
|
|
25559
|
+
handleTogglePopover(false);
|
|
25560
|
+
},
|
|
25561
|
+
onKeyDown: function onKeyDown(e) {
|
|
25562
|
+
if (e.keyCode === 27) {
|
|
25563
|
+
handleTogglePopover(false);
|
|
25564
|
+
}
|
|
25565
|
+
},
|
|
25566
|
+
onTouchStart: function onTouchStart() {
|
|
25567
|
+
return handleTogglePopover(true);
|
|
25568
|
+
},
|
|
25569
|
+
onTouchEnd: function onTouchEnd() {
|
|
25570
|
+
return handleTogglePopover(false);
|
|
25571
|
+
},
|
|
25572
|
+
onMouseEnter: function onMouseEnter() {
|
|
25573
|
+
return handleTogglePopover(true);
|
|
25574
|
+
},
|
|
25575
|
+
onMouseLeave: function onMouseLeave() {
|
|
25576
|
+
return handleTogglePopover(false);
|
|
25577
|
+
},
|
|
25578
|
+
contentOverride: true,
|
|
25579
|
+
variant: "smallGhost",
|
|
25580
|
+
tabIndex: "0",
|
|
25581
|
+
id: "btnPopover".concat(popoverID),
|
|
25582
|
+
"aria-expanded": popoverOpen,
|
|
25583
|
+
"aria-labelledby": "btnPopover".concat(popoverID, "_info Disclosure").concat(popoverID),
|
|
25584
|
+
"aria-describedby": "Disclosure".concat(popoverID),
|
|
25585
|
+
"aria-controls": "Disclosed".concat(popoverID),
|
|
25586
|
+
ref: triggerRef,
|
|
25587
|
+
extraStyles: buttonExtraStyles
|
|
25588
|
+
}, hasIcon && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Icon, null), /*#__PURE__*/React.createElement(Box, {
|
|
25589
|
+
padding: "0",
|
|
25590
|
+
srOnly: true
|
|
25591
|
+
}, /*#__PURE__*/React.createElement(Text$1, {
|
|
25592
|
+
id: "btnPopover".concat(popoverID, "_info")
|
|
25593
|
+
}, iconHelpText))), !hasIcon && /*#__PURE__*/React.createElement(Text$1, {
|
|
25594
|
+
color: popoverTriggerColor,
|
|
25595
|
+
extraStyles: "&:active { color: ".concat(activeColor, "; } &:hover { color: ").concat(hoverColor, " }; ").concat(textExtraStyles)
|
|
25596
|
+
}, triggerText)), /*#__PURE__*/React.createElement(Box, {
|
|
25597
|
+
background: backgroundColor,
|
|
25598
|
+
borderRadius: "4px",
|
|
25599
|
+
boxShadow: "0px 2px 14px 0px rgb(246, 246, 249), 0px 3px 8px 0px rgb(202, 206, 216)",
|
|
25600
|
+
id: "Disclosed".concat(popoverID),
|
|
25601
|
+
role: "region",
|
|
25602
|
+
"aria-describedby": "Disclosure".concat(popoverID),
|
|
25603
|
+
tabIndex: popoverFocus && popoverOpen ? "0" : "-1",
|
|
25604
|
+
minWidth: minWidth,
|
|
25605
|
+
maxWidth: maxWidth,
|
|
25606
|
+
extraStyles: "\n display: ".concat(popoverOpen ? "block" : "none", "; \n position: absolute; \n top: ").concat(top, "; \n right: ").concat(right, "; \n bottom: ").concat(bottom, "; \n left: ").concat(left, ";\n height: ").concat(height, ";\n transform: ").concat(transform, ";\n ").concat(popoverExtraStyles, ";\n ")
|
|
25607
|
+
}, /*#__PURE__*/React.createElement(Paragraph$1, null, content), /*#__PURE__*/React.createElement(Box, {
|
|
25608
|
+
padding: "0",
|
|
25609
|
+
extraStyles: "\n position: absolute;\n content: \"\";\n width: 0;\n height: 0;\n ".concat(arrowBorder(borderColor, arrowDirection, "8px"), ";\n filter: drop-shadow(2px 8px 14px black);\n bottom: ").concat(arrowBottom, ";\n right: ").concat(arrowRight, ";\n top: ").concat(arrowTop, ";\n left: ").concat(arrowLeft, ";\n ")
|
|
25610
|
+
})));
|
|
25611
|
+
};
|
|
25612
|
+
|
|
25613
|
+
var Popover$1 = themeComponent(Popover, "Popover", fallbackValues$j);
|
|
25614
|
+
|
|
25615
|
+
var DisplayCard = function DisplayCard(_ref) {
|
|
25616
|
+
var title = _ref.title,
|
|
25617
|
+
item = _ref.item,
|
|
25618
|
+
buttonText = _ref.buttonText,
|
|
25619
|
+
buttonAction = _ref.buttonAction,
|
|
25620
|
+
url = _ref.url,
|
|
25621
|
+
_ref$link = _ref.link,
|
|
25622
|
+
link = _ref$link === void 0 ? false : _ref$link,
|
|
25623
|
+
helpText = _ref.helpText,
|
|
25624
|
+
_ref$hasPopover = _ref.hasPopover,
|
|
25625
|
+
hasPopover = _ref$hasPopover === void 0 ? false : _ref$hasPopover,
|
|
25626
|
+
_ref$popoverTriggerTe = _ref.popoverTriggerText,
|
|
25627
|
+
popoverTriggerText = _ref$popoverTriggerTe === void 0 ? "" : _ref$popoverTriggerTe,
|
|
25628
|
+
_ref$popoverContent = _ref.popoverContent,
|
|
25629
|
+
popoverContent = _ref$popoverContent === void 0 ? "" : _ref$popoverContent,
|
|
25630
|
+
popoverExtraStyles = _ref.popoverExtraStyles,
|
|
25631
|
+
popoverTextExtraStyles = _ref.popoverTextExtraStyles;
|
|
25632
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
25633
|
+
padding: "0 0 16px"
|
|
25634
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
25635
|
+
childGap: "0rem"
|
|
25636
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
25637
|
+
padding: "0 0 8px 0"
|
|
25638
|
+
}, /*#__PURE__*/React.createElement(Cluster, {
|
|
25639
|
+
justify: "space-between",
|
|
25640
|
+
align: "center",
|
|
25641
|
+
overflow: true
|
|
25642
|
+
}, /*#__PURE__*/React.createElement(Paragraph$1, {
|
|
25643
|
+
variant: "pL",
|
|
25644
|
+
color: CHARADE_GREY,
|
|
25645
|
+
extraStyles: "letter-spacing: 0.29px"
|
|
25646
|
+
}, title), hasPopover && /*#__PURE__*/React.createElement(Popover$1, {
|
|
25647
|
+
triggerText: popoverTriggerText,
|
|
25648
|
+
content: popoverContent,
|
|
25649
|
+
popoverExtraStyles: popoverExtraStyles,
|
|
25650
|
+
popoverTextExtraStyles: popoverTextExtraStyles
|
|
25651
|
+
}))), /*#__PURE__*/React.createElement(Box, {
|
|
25652
|
+
padding: "0"
|
|
25653
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
25654
|
+
padding: "24px",
|
|
25655
|
+
borderSize: "1px",
|
|
25656
|
+
borderRadius: "4px",
|
|
25657
|
+
background: WHITE,
|
|
25658
|
+
boxShadow: "0px 2px 14px 0px rgb(246, 246, 249), 0px 3px 8px 0px rgb(202, 206, 216)"
|
|
25659
|
+
}, /*#__PURE__*/React.createElement(Cluster, {
|
|
25660
|
+
justify: "space-between",
|
|
25661
|
+
align: "center"
|
|
25662
|
+
}, /*#__PURE__*/React.createElement(Text$1, {
|
|
25663
|
+
color: CHARADE_GREY
|
|
25664
|
+
}, item), link ? /*#__PURE__*/React.createElement(ButtonWithLink, {
|
|
25665
|
+
text: buttonText,
|
|
25666
|
+
url: url,
|
|
25667
|
+
variant: "smallGhost",
|
|
25668
|
+
dataQa: buttonText,
|
|
25669
|
+
extraStyles: "min-width: 0;"
|
|
25670
|
+
}) : buttonAction ? /*#__PURE__*/React.createElement(ButtonWithAction, {
|
|
25671
|
+
text: buttonText,
|
|
25672
|
+
action: buttonAction,
|
|
25673
|
+
variant: "smallGhost",
|
|
25674
|
+
dataQa: buttonText,
|
|
25675
|
+
extraStyles: "min-width: 0;"
|
|
25676
|
+
}) : helpText ? /*#__PURE__*/React.createElement(Text$1, {
|
|
25677
|
+
color: STORM_GREY,
|
|
25678
|
+
extraStyles: "font-style: italic;"
|
|
25679
|
+
}, helpText) : /*#__PURE__*/React.createElement(Fragment$1, null))))));
|
|
25680
|
+
};
|
|
25681
|
+
|
|
25230
25682
|
function _extends$2() {
|
|
25231
25683
|
_extends$2 = Object.assign || function (target) {
|
|
25232
25684
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -25505,344 +25957,6 @@ var FormattedInput = function FormattedInput(_ref) {
|
|
|
25505
25957
|
}));
|
|
25506
25958
|
};
|
|
25507
25959
|
|
|
25508
|
-
var formatDelimiter = "_";
|
|
25509
|
-
var phoneFormats = ["", "_", "__", "(___) ", "(___) _", "(___) __", "(___) ___-", "(___) ___-_", "(___) ___-__", "(___) ___-___", "(___) ___-____"];
|
|
25510
|
-
var zipFormats = ["", "_", "__", "___", "____", "_____", "______", "_____-__", "_____-___", "_____-____"];
|
|
25511
|
-
var creditCardFormats = ["", "_", "__", "___", "____", "____ _", "____ __", "____ ___", "____ ____", "____ ____ _", "____ ____ __", "____ ____ ___", "____ ____ ____", "____ ____ ____ _", "____ ____ ____ __", "____ ____ ____ ___", "____ ____ ____ ____"];
|
|
25512
|
-
var moneyFormats = ["", "$0.0_", "$0.__", "$_.__", "$__.__", "$___.__", "$_,___.__", "$__,___.__", "$___,___.__", "$_,___,___.__", "$__,___,___.__", "$___,___,___.__", "$_,___,___,___.__", "$__,___,___,___.__", "$___,___,___,___.__", "$_,___,___,___,___.__"];
|
|
25513
|
-
var expirationDateFormats = ["", "_", "__/", "__/_", "__/__"];
|
|
25514
|
-
var zipFormat = createFormat(zipFormats, formatDelimiter);
|
|
25515
|
-
var creditCardFormat = createFormat(creditCardFormats, formatDelimiter);
|
|
25516
|
-
var expirationDateFormat = createFormat(expirationDateFormats, formatDelimiter);
|
|
25517
|
-
var phoneFormat = createFormat(phoneFormats, formatDelimiter);
|
|
25518
|
-
var moneyFormat = createFormat(moneyFormats, formatDelimiter);
|
|
25519
|
-
var renderCardStatus = function renderCardStatus(expirationStatus, expireDate) {
|
|
25520
|
-
var textAlign = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "right";
|
|
25521
|
-
var as = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "span";
|
|
25522
|
-
var ACTIVE = "ACTIVE";
|
|
25523
|
-
var EXPIRING_SOON = "EXPIRING_SOON";
|
|
25524
|
-
var EXPIRED = "EXPIRED";
|
|
25525
|
-
var textMargin = textAlign === "right" ? "auto" : "0";
|
|
25526
|
-
|
|
25527
|
-
switch (expirationStatus) {
|
|
25528
|
-
case ACTIVE:
|
|
25529
|
-
return /*#__PURE__*/React.createElement(Text$1, {
|
|
25530
|
-
as: as,
|
|
25531
|
-
variant: "pXS",
|
|
25532
|
-
color: ASH_GREY,
|
|
25533
|
-
extraStyles: "text-align: ".concat(textAlign, "; margin: ").concat(textMargin, ";")
|
|
25534
|
-
}, "Exp Date ", expireDate);
|
|
25535
|
-
|
|
25536
|
-
case EXPIRING_SOON:
|
|
25537
|
-
return /*#__PURE__*/React.createElement(Text$1, {
|
|
25538
|
-
as: as,
|
|
25539
|
-
variant: "pXS",
|
|
25540
|
-
color: FIRE_YELLOW,
|
|
25541
|
-
extraStyles: "text-align: ".concat(textAlign, "; margin: ").concat(textMargin, ";")
|
|
25542
|
-
}, "Expiring Soon ", expireDate);
|
|
25543
|
-
|
|
25544
|
-
case EXPIRED:
|
|
25545
|
-
return /*#__PURE__*/React.createElement(Text$1, {
|
|
25546
|
-
as: as,
|
|
25547
|
-
variant: "pXS",
|
|
25548
|
-
color: ASH_GREY,
|
|
25549
|
-
extraStyles: "text-align: ".concat(textAlign, "; margin: ").concat(textMargin, ";")
|
|
25550
|
-
}, "Expired");
|
|
25551
|
-
}
|
|
25552
|
-
};
|
|
25553
|
-
|
|
25554
|
-
var formats = /*#__PURE__*/Object.freeze({
|
|
25555
|
-
__proto__: null,
|
|
25556
|
-
formatDelimiter: formatDelimiter,
|
|
25557
|
-
phoneFormats: phoneFormats,
|
|
25558
|
-
moneyFormats: moneyFormats,
|
|
25559
|
-
expirationDateFormats: expirationDateFormats,
|
|
25560
|
-
zipFormat: zipFormat,
|
|
25561
|
-
creditCardFormat: creditCardFormat,
|
|
25562
|
-
expirationDateFormat: expirationDateFormat,
|
|
25563
|
-
phoneFormat: phoneFormat,
|
|
25564
|
-
moneyFormat: moneyFormat,
|
|
25565
|
-
renderCardStatus: renderCardStatus
|
|
25566
|
-
});
|
|
25567
|
-
|
|
25568
|
-
var useFocusInvalidInput = function useFocusInvalidInput(hasErrors) {
|
|
25569
|
-
var resetHasErrors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
|
|
25570
|
-
// Only move focus when "hasErrors" is true
|
|
25571
|
-
// "hasErrors" is managed by container page of form
|
|
25572
|
-
// typically set to "true" on attempted form submission, if errors exist
|
|
25573
|
-
// Reset errors, if provided, resets the error state tracking in order to properly re-run
|
|
25574
|
-
useEffect$1(function () {
|
|
25575
|
-
if (hasErrors) {
|
|
25576
|
-
var _inputsWithErrors$;
|
|
25577
|
-
|
|
25578
|
-
var inputsWithErrors = document.querySelectorAll("input[aria-invalid=true]");
|
|
25579
|
-
inputsWithErrors === null || inputsWithErrors === void 0 ? void 0 : (_inputsWithErrors$ = inputsWithErrors[0]) === null || _inputsWithErrors$ === void 0 ? void 0 : _inputsWithErrors$.focus();
|
|
25580
|
-
}
|
|
25581
|
-
|
|
25582
|
-
return function () {
|
|
25583
|
-
return resetHasErrors(false);
|
|
25584
|
-
};
|
|
25585
|
-
});
|
|
25586
|
-
};
|
|
25587
|
-
|
|
25588
|
-
/*
|
|
25589
|
-
Hook that assigns a click event listener to the main document element
|
|
25590
|
-
Returns a ref to attach to another element (like an icon/button that triggers a popover)
|
|
25591
|
-
If a click event gets captured by the document and the assigned element isn't the target
|
|
25592
|
-
hook will run whatever handler is passed (eg a function that closes a popover)
|
|
25593
|
-
|
|
25594
|
-
See popover component for implementation
|
|
25595
|
-
|
|
25596
|
-
*/
|
|
25597
|
-
|
|
25598
|
-
var useOutsideClickHook = function useOutsideClickHook(handler) {
|
|
25599
|
-
var ref = useRef();
|
|
25600
|
-
useEffect$1(function () {
|
|
25601
|
-
}, [ref]);
|
|
25602
|
-
return ref;
|
|
25603
|
-
};
|
|
25604
|
-
|
|
25605
|
-
|
|
25606
|
-
|
|
25607
|
-
var index$4 = /*#__PURE__*/Object.freeze({
|
|
25608
|
-
__proto__: null,
|
|
25609
|
-
formats: formats,
|
|
25610
|
-
general: general,
|
|
25611
|
-
theme: themeUtils,
|
|
25612
|
-
useFocusInvalidInput: useFocusInvalidInput,
|
|
25613
|
-
useOutsideClick: useOutsideClickHook
|
|
25614
|
-
});
|
|
25615
|
-
|
|
25616
|
-
var hoverColor$4 = "#116285";
|
|
25617
|
-
var activeColor$4 = "#0E506D";
|
|
25618
|
-
var popoverTriggerColor = "#15749D";
|
|
25619
|
-
var fallbackValues$j = {
|
|
25620
|
-
hoverColor: hoverColor$4,
|
|
25621
|
-
activeColor: activeColor$4,
|
|
25622
|
-
popoverTriggerColor: popoverTriggerColor
|
|
25623
|
-
};
|
|
25624
|
-
|
|
25625
|
-
var arrowBorder = function arrowBorder(borderColor, direction) {
|
|
25626
|
-
var width = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "8px";
|
|
25627
|
-
var angle = "".concat(width, " solid transparent");
|
|
25628
|
-
var straight = "".concat(width, " solid ").concat(borderColor);
|
|
25629
|
-
|
|
25630
|
-
if (direction == "down") {
|
|
25631
|
-
return "border-left: ".concat(angle, "; border-right: ").concat(angle, "; border-top: ").concat(straight);
|
|
25632
|
-
} else if (direction == "up") {
|
|
25633
|
-
return "border-left: ".concat(angle, "; border-right: ").concat(angle, "; border-bottom: ").concat(straight);
|
|
25634
|
-
} else if (direction == "left") {
|
|
25635
|
-
return "border-top: ".concat(angle, "; border-bottom: ").concat(angle, "; border-right: ").concat(straight);
|
|
25636
|
-
} else if (direction == "right") {
|
|
25637
|
-
return "border-top: ".concat(angle, "; border-bottom: ").concat(angle, "; border-left: ").concat(straight);
|
|
25638
|
-
}
|
|
25639
|
-
};
|
|
25640
|
-
|
|
25641
|
-
var Popover = function Popover(_ref) {
|
|
25642
|
-
var themeValues = _ref.themeValues,
|
|
25643
|
-
_ref$triggerText = _ref.triggerText,
|
|
25644
|
-
triggerText = _ref$triggerText === void 0 ? "" : _ref$triggerText,
|
|
25645
|
-
_ref$content = _ref.content,
|
|
25646
|
-
content = _ref$content === void 0 ? "" : _ref$content,
|
|
25647
|
-
_ref$hasIcon = _ref.hasIcon,
|
|
25648
|
-
hasIcon = _ref$hasIcon === void 0 ? false : _ref$hasIcon,
|
|
25649
|
-
Icon = _ref.icon,
|
|
25650
|
-
_ref$iconHelpText = _ref.iconHelpText,
|
|
25651
|
-
iconHelpText = _ref$iconHelpText === void 0 ? "" : _ref$iconHelpText,
|
|
25652
|
-
_ref$popoverID = _ref.popoverID,
|
|
25653
|
-
popoverID = _ref$popoverID === void 0 ? 0 : _ref$popoverID,
|
|
25654
|
-
_ref$popoverFocus = _ref.popoverFocus,
|
|
25655
|
-
popoverFocus = _ref$popoverFocus === void 0 ? false : _ref$popoverFocus,
|
|
25656
|
-
extraStyles = _ref.extraStyles,
|
|
25657
|
-
textExtraStyles = _ref.textExtraStyles,
|
|
25658
|
-
_ref$minWidth = _ref.minWidth,
|
|
25659
|
-
minWidth = _ref$minWidth === void 0 ? "250px" : _ref$minWidth,
|
|
25660
|
-
_ref$maxWidth = _ref.maxWidth,
|
|
25661
|
-
maxWidth = _ref$maxWidth === void 0 ? "300px" : _ref$maxWidth,
|
|
25662
|
-
_ref$height = _ref.height,
|
|
25663
|
-
height = _ref$height === void 0 ? "auto" : _ref$height,
|
|
25664
|
-
position = _ref.position,
|
|
25665
|
-
arrowPosition = _ref.arrowPosition,
|
|
25666
|
-
_ref$arrowDirection = _ref.arrowDirection,
|
|
25667
|
-
arrowDirection = _ref$arrowDirection === void 0 ? "down" : _ref$arrowDirection,
|
|
25668
|
-
_ref$transform = _ref.transform,
|
|
25669
|
-
transform = _ref$transform === void 0 ? "none" : _ref$transform,
|
|
25670
|
-
buttonExtraStyles = _ref.buttonExtraStyles,
|
|
25671
|
-
_ref$backgroundColor = _ref.backgroundColor,
|
|
25672
|
-
backgroundColor = _ref$backgroundColor === void 0 ? "white" : _ref$backgroundColor,
|
|
25673
|
-
_ref$borderColor = _ref.borderColor,
|
|
25674
|
-
borderColor = _ref$borderColor === void 0 ? "rgba(255, 255, 255, 0.85)" : _ref$borderColor,
|
|
25675
|
-
popoverExtraStyles = _ref.popoverExtraStyles;
|
|
25676
|
-
var hoverColor = themeValues.hoverColor,
|
|
25677
|
-
activeColor = themeValues.activeColor,
|
|
25678
|
-
popoverTriggerColor = themeValues.popoverTriggerColor;
|
|
25679
|
-
|
|
25680
|
-
var _ref2 = position !== null && position !== void 0 ? position : {},
|
|
25681
|
-
_ref2$top = _ref2.top,
|
|
25682
|
-
top = _ref2$top === void 0 ? "-110px" : _ref2$top,
|
|
25683
|
-
_ref2$right = _ref2.right,
|
|
25684
|
-
right = _ref2$right === void 0 ? "auto" : _ref2$right,
|
|
25685
|
-
_ref2$bottom = _ref2.bottom,
|
|
25686
|
-
bottom = _ref2$bottom === void 0 ? "auto" : _ref2$bottom,
|
|
25687
|
-
_ref2$left = _ref2.left,
|
|
25688
|
-
left = _ref2$left === void 0 ? "-225px" : _ref2$left;
|
|
25689
|
-
|
|
25690
|
-
var _ref3 = arrowPosition !== null && arrowPosition !== void 0 ? arrowPosition : {},
|
|
25691
|
-
_ref3$arrowTop = _ref3.arrowTop,
|
|
25692
|
-
arrowTop = _ref3$arrowTop === void 0 ? "auto" : _ref3$arrowTop,
|
|
25693
|
-
_ref3$arrowRight = _ref3.arrowRight,
|
|
25694
|
-
arrowRight = _ref3$arrowRight === void 0 ? "10px" : _ref3$arrowRight,
|
|
25695
|
-
_ref3$arrowBottom = _ref3.arrowBottom,
|
|
25696
|
-
arrowBottom = _ref3$arrowBottom === void 0 ? "-8px" : _ref3$arrowBottom,
|
|
25697
|
-
_ref3$arrowLeft = _ref3.arrowLeft,
|
|
25698
|
-
arrowLeft = _ref3$arrowLeft === void 0 ? "auto" : _ref3$arrowLeft;
|
|
25699
|
-
|
|
25700
|
-
var _useState = useState(false),
|
|
25701
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
25702
|
-
popoverOpen = _useState2[0],
|
|
25703
|
-
togglePopover = _useState2[1];
|
|
25704
|
-
|
|
25705
|
-
var handleTogglePopover = function handleTogglePopover(popoverState) {
|
|
25706
|
-
if (popoverOpen !== popoverState) {
|
|
25707
|
-
togglePopover(popoverState);
|
|
25708
|
-
}
|
|
25709
|
-
};
|
|
25710
|
-
|
|
25711
|
-
var triggerRef = useOutsideClickHook();
|
|
25712
|
-
return /*#__PURE__*/React.createElement(Box, {
|
|
25713
|
-
padding: "0",
|
|
25714
|
-
extraStyles: "position: relative; ".concat(extraStyles)
|
|
25715
|
-
}, /*#__PURE__*/React.createElement(ButtonWithAction, {
|
|
25716
|
-
action: function action() {
|
|
25717
|
-
return noop;
|
|
25718
|
-
},
|
|
25719
|
-
onFocus: function onFocus() {
|
|
25720
|
-
handleTogglePopover(true);
|
|
25721
|
-
},
|
|
25722
|
-
onBlur: function onBlur() {
|
|
25723
|
-
handleTogglePopover(false);
|
|
25724
|
-
},
|
|
25725
|
-
onKeyDown: function onKeyDown(e) {
|
|
25726
|
-
if (e.keyCode === 27) {
|
|
25727
|
-
handleTogglePopover(false);
|
|
25728
|
-
}
|
|
25729
|
-
},
|
|
25730
|
-
onTouchStart: function onTouchStart() {
|
|
25731
|
-
return handleTogglePopover(true);
|
|
25732
|
-
},
|
|
25733
|
-
onTouchEnd: function onTouchEnd() {
|
|
25734
|
-
return handleTogglePopover(false);
|
|
25735
|
-
},
|
|
25736
|
-
onMouseEnter: function onMouseEnter() {
|
|
25737
|
-
return handleTogglePopover(true);
|
|
25738
|
-
},
|
|
25739
|
-
onMouseLeave: function onMouseLeave() {
|
|
25740
|
-
return handleTogglePopover(false);
|
|
25741
|
-
},
|
|
25742
|
-
contentOverride: true,
|
|
25743
|
-
variant: "smallGhost",
|
|
25744
|
-
tabIndex: "0",
|
|
25745
|
-
id: "btnPopover".concat(popoverID),
|
|
25746
|
-
"aria-expanded": popoverOpen,
|
|
25747
|
-
"aria-labelledby": "btnPopover".concat(popoverID, "_info Disclosure").concat(popoverID),
|
|
25748
|
-
"aria-describedby": "Disclosure".concat(popoverID),
|
|
25749
|
-
"aria-controls": "Disclosed".concat(popoverID),
|
|
25750
|
-
ref: triggerRef,
|
|
25751
|
-
extraStyles: buttonExtraStyles
|
|
25752
|
-
}, hasIcon && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Icon, null), /*#__PURE__*/React.createElement(Box, {
|
|
25753
|
-
padding: "0",
|
|
25754
|
-
srOnly: true
|
|
25755
|
-
}, /*#__PURE__*/React.createElement(Text$1, {
|
|
25756
|
-
id: "btnPopover".concat(popoverID, "_info")
|
|
25757
|
-
}, iconHelpText))), !hasIcon && /*#__PURE__*/React.createElement(Text$1, {
|
|
25758
|
-
color: popoverTriggerColor,
|
|
25759
|
-
extraStyles: "&:active { color: ".concat(activeColor, "; } &:hover { color: ").concat(hoverColor, " }; ").concat(textExtraStyles)
|
|
25760
|
-
}, triggerText)), /*#__PURE__*/React.createElement(Box, {
|
|
25761
|
-
background: backgroundColor,
|
|
25762
|
-
borderRadius: "4px",
|
|
25763
|
-
boxShadow: "0px 2px 14px 0px rgb(246, 246, 249), 0px 3px 8px 0px rgb(202, 206, 216)",
|
|
25764
|
-
id: "Disclosed".concat(popoverID),
|
|
25765
|
-
role: "region",
|
|
25766
|
-
"aria-describedby": "Disclosure".concat(popoverID),
|
|
25767
|
-
tabIndex: popoverFocus && popoverOpen ? "0" : "-1",
|
|
25768
|
-
minWidth: minWidth,
|
|
25769
|
-
maxWidth: maxWidth,
|
|
25770
|
-
extraStyles: "\n display: ".concat(popoverOpen ? "block" : "none", "; \n position: absolute; \n top: ").concat(top, "; \n right: ").concat(right, "; \n bottom: ").concat(bottom, "; \n left: ").concat(left, ";\n height: ").concat(height, ";\n transform: ").concat(transform, ";\n ").concat(popoverExtraStyles, ";\n ")
|
|
25771
|
-
}, /*#__PURE__*/React.createElement(Paragraph$1, null, content), /*#__PURE__*/React.createElement(Box, {
|
|
25772
|
-
padding: "0",
|
|
25773
|
-
extraStyles: "\n position: absolute;\n content: \"\";\n width: 0;\n height: 0;\n ".concat(arrowBorder(borderColor, arrowDirection, "8px"), ";\n filter: drop-shadow(2px 8px 14px black);\n bottom: ").concat(arrowBottom, ";\n right: ").concat(arrowRight, ";\n top: ").concat(arrowTop, ";\n left: ").concat(arrowLeft, ";\n ")
|
|
25774
|
-
})));
|
|
25775
|
-
};
|
|
25776
|
-
|
|
25777
|
-
var Popover$1 = themeComponent(Popover, "Popover", fallbackValues$j);
|
|
25778
|
-
|
|
25779
|
-
var DisplayCard = function DisplayCard(_ref) {
|
|
25780
|
-
var title = _ref.title,
|
|
25781
|
-
item = _ref.item,
|
|
25782
|
-
buttonText = _ref.buttonText,
|
|
25783
|
-
buttonAction = _ref.buttonAction,
|
|
25784
|
-
url = _ref.url,
|
|
25785
|
-
_ref$link = _ref.link,
|
|
25786
|
-
link = _ref$link === void 0 ? false : _ref$link,
|
|
25787
|
-
helpText = _ref.helpText,
|
|
25788
|
-
_ref$hasPopover = _ref.hasPopover,
|
|
25789
|
-
hasPopover = _ref$hasPopover === void 0 ? false : _ref$hasPopover,
|
|
25790
|
-
_ref$popoverTriggerTe = _ref.popoverTriggerText,
|
|
25791
|
-
popoverTriggerText = _ref$popoverTriggerTe === void 0 ? "" : _ref$popoverTriggerTe,
|
|
25792
|
-
_ref$popoverContent = _ref.popoverContent,
|
|
25793
|
-
popoverContent = _ref$popoverContent === void 0 ? "" : _ref$popoverContent,
|
|
25794
|
-
popoverExtraStyles = _ref.popoverExtraStyles,
|
|
25795
|
-
popoverTextExtraStyles = _ref.popoverTextExtraStyles;
|
|
25796
|
-
return /*#__PURE__*/React.createElement(Box, {
|
|
25797
|
-
padding: "0 0 16px"
|
|
25798
|
-
}, /*#__PURE__*/React.createElement(Stack, {
|
|
25799
|
-
childGap: "0rem"
|
|
25800
|
-
}, /*#__PURE__*/React.createElement(Box, {
|
|
25801
|
-
padding: "0 0 8px 0"
|
|
25802
|
-
}, /*#__PURE__*/React.createElement(Cluster, {
|
|
25803
|
-
justify: "space-between",
|
|
25804
|
-
align: "center",
|
|
25805
|
-
overflow: true
|
|
25806
|
-
}, /*#__PURE__*/React.createElement(Paragraph$1, {
|
|
25807
|
-
variant: "pL",
|
|
25808
|
-
color: CHARADE_GREY,
|
|
25809
|
-
extraStyles: "letter-spacing: 0.29px"
|
|
25810
|
-
}, title), hasPopover && /*#__PURE__*/React.createElement(Popover$1, {
|
|
25811
|
-
triggerText: popoverTriggerText,
|
|
25812
|
-
content: popoverContent,
|
|
25813
|
-
popoverExtraStyles: popoverExtraStyles,
|
|
25814
|
-
popoverTextExtraStyles: popoverTextExtraStyles
|
|
25815
|
-
}))), /*#__PURE__*/React.createElement(Box, {
|
|
25816
|
-
padding: "0"
|
|
25817
|
-
}, /*#__PURE__*/React.createElement(Box, {
|
|
25818
|
-
padding: "24px",
|
|
25819
|
-
borderSize: "1px",
|
|
25820
|
-
borderRadius: "4px",
|
|
25821
|
-
background: WHITE,
|
|
25822
|
-
boxShadow: "0px 2px 14px 0px rgb(246, 246, 249), 0px 3px 8px 0px rgb(202, 206, 216)"
|
|
25823
|
-
}, /*#__PURE__*/React.createElement(Cluster, {
|
|
25824
|
-
justify: "space-between",
|
|
25825
|
-
align: "center"
|
|
25826
|
-
}, /*#__PURE__*/React.createElement(Text$1, {
|
|
25827
|
-
color: CHARADE_GREY
|
|
25828
|
-
}, item), link ? /*#__PURE__*/React.createElement(ButtonWithLink, {
|
|
25829
|
-
text: buttonText,
|
|
25830
|
-
url: url,
|
|
25831
|
-
variant: "smallGhost",
|
|
25832
|
-
dataQa: buttonText,
|
|
25833
|
-
extraStyles: "min-width: 0;"
|
|
25834
|
-
}) : buttonAction ? /*#__PURE__*/React.createElement(ButtonWithAction, {
|
|
25835
|
-
text: buttonText,
|
|
25836
|
-
action: buttonAction,
|
|
25837
|
-
variant: "smallGhost",
|
|
25838
|
-
dataQa: buttonText,
|
|
25839
|
-
extraStyles: "min-width: 0;"
|
|
25840
|
-
}) : helpText ? /*#__PURE__*/React.createElement(Text$1, {
|
|
25841
|
-
color: STORM_GREY,
|
|
25842
|
-
extraStyles: "font-style: italic;"
|
|
25843
|
-
}, helpText) : /*#__PURE__*/React.createElement(Fragment$1, null))))));
|
|
25844
|
-
};
|
|
25845
|
-
|
|
25846
25960
|
var linkColor$2 = {
|
|
25847
25961
|
"default": "".concat(MATISSE_BLUE),
|
|
25848
25962
|
disabled: "".concat(MATISSE_BLUE)
|
|
@@ -25999,8 +26113,6 @@ var FormInput = function FormInput(_ref15) {
|
|
|
25999
26113
|
isRequired = _ref15$isRequired === void 0 ? false : _ref15$isRequired,
|
|
26000
26114
|
props = _objectWithoutProperties(_ref15, _excluded2);
|
|
26001
26115
|
|
|
26002
|
-
var required = isRequired || (props === null || props === void 0 ? void 0 : props.required);
|
|
26003
|
-
|
|
26004
26116
|
var _useState = useState(false),
|
|
26005
26117
|
_useState2 = _slicedToArray(_useState, 2),
|
|
26006
26118
|
showPassword = _useState2[0],
|
|
@@ -26086,7 +26198,7 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26086
26198
|
$extraStyles: extraStyles,
|
|
26087
26199
|
"data-qa": dataQa || labelTextWhenNoError,
|
|
26088
26200
|
autoComplete: autocompleteValue,
|
|
26089
|
-
required:
|
|
26201
|
+
required: isRequired
|
|
26090
26202
|
}, props)) : /*#__PURE__*/React.createElement(InputField, _extends({
|
|
26091
26203
|
"aria-labelledby": createIdFromString(labelTextWhenNoError),
|
|
26092
26204
|
"aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
|
|
@@ -26106,7 +26218,7 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26106
26218
|
$extraStyles: extraStyles,
|
|
26107
26219
|
"data-qa": dataQa || labelTextWhenNoError,
|
|
26108
26220
|
autoComplete: autocompleteValue,
|
|
26109
|
-
required:
|
|
26221
|
+
required: isRequired
|
|
26110
26222
|
}, props))), /*#__PURE__*/React.createElement(Stack, {
|
|
26111
26223
|
direction: "row",
|
|
26112
26224
|
justify: "space-between",
|
|
@@ -26315,6 +26427,66 @@ var fallbackValues$n = {
|
|
|
26315
26427
|
autopayTextColor: autopayTextColor$1
|
|
26316
26428
|
};
|
|
26317
26429
|
|
|
26430
|
+
var formatDelimiter = "_";
|
|
26431
|
+
var phoneFormats = ["", "_", "__", "(___) ", "(___) _", "(___) __", "(___) ___-", "(___) ___-_", "(___) ___-__", "(___) ___-___", "(___) ___-____"];
|
|
26432
|
+
var zipFormats = ["", "_", "__", "___", "____", "_____", "______", "_____-__", "_____-___", "_____-____"];
|
|
26433
|
+
var creditCardFormats = ["", "_", "__", "___", "____", "____ _", "____ __", "____ ___", "____ ____", "____ ____ _", "____ ____ __", "____ ____ ___", "____ ____ ____", "____ ____ ____ _", "____ ____ ____ __", "____ ____ ____ ___", "____ ____ ____ ____"];
|
|
26434
|
+
var moneyFormats = ["", "$0.0_", "$0.__", "$_.__", "$__.__", "$___.__", "$_,___.__", "$__,___.__", "$___,___.__", "$_,___,___.__", "$__,___,___.__", "$___,___,___.__", "$_,___,___,___.__", "$__,___,___,___.__", "$___,___,___,___.__", "$_,___,___,___,___.__"];
|
|
26435
|
+
var expirationDateFormats = ["", "_", "__/", "__/_", "__/__"];
|
|
26436
|
+
var zipFormat = createFormat(zipFormats, formatDelimiter);
|
|
26437
|
+
var creditCardFormat = createFormat(creditCardFormats, formatDelimiter);
|
|
26438
|
+
var expirationDateFormat = createFormat(expirationDateFormats, formatDelimiter);
|
|
26439
|
+
var phoneFormat = createFormat(phoneFormats, formatDelimiter);
|
|
26440
|
+
var moneyFormat = createFormat(moneyFormats, formatDelimiter);
|
|
26441
|
+
var renderCardStatus = function renderCardStatus(expirationStatus, expireDate) {
|
|
26442
|
+
var textAlign = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "right";
|
|
26443
|
+
var as = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "span";
|
|
26444
|
+
var ACTIVE = "ACTIVE";
|
|
26445
|
+
var EXPIRING_SOON = "EXPIRING_SOON";
|
|
26446
|
+
var EXPIRED = "EXPIRED";
|
|
26447
|
+
var textMargin = textAlign === "right" ? "auto" : "0";
|
|
26448
|
+
|
|
26449
|
+
switch (expirationStatus) {
|
|
26450
|
+
case ACTIVE:
|
|
26451
|
+
return /*#__PURE__*/React.createElement(Text$1, {
|
|
26452
|
+
as: as,
|
|
26453
|
+
variant: "pXS",
|
|
26454
|
+
color: ASH_GREY,
|
|
26455
|
+
extraStyles: "text-align: ".concat(textAlign, "; margin: ").concat(textMargin, ";")
|
|
26456
|
+
}, "Exp Date ", expireDate);
|
|
26457
|
+
|
|
26458
|
+
case EXPIRING_SOON:
|
|
26459
|
+
return /*#__PURE__*/React.createElement(Text$1, {
|
|
26460
|
+
as: as,
|
|
26461
|
+
variant: "pXS",
|
|
26462
|
+
color: FIRE_YELLOW,
|
|
26463
|
+
extraStyles: "text-align: ".concat(textAlign, "; margin: ").concat(textMargin, ";")
|
|
26464
|
+
}, "Expiring Soon ", expireDate);
|
|
26465
|
+
|
|
26466
|
+
case EXPIRED:
|
|
26467
|
+
return /*#__PURE__*/React.createElement(Text$1, {
|
|
26468
|
+
as: as,
|
|
26469
|
+
variant: "pXS",
|
|
26470
|
+
color: ASH_GREY,
|
|
26471
|
+
extraStyles: "text-align: ".concat(textAlign, "; margin: ").concat(textMargin, ";")
|
|
26472
|
+
}, "Expired");
|
|
26473
|
+
}
|
|
26474
|
+
};
|
|
26475
|
+
|
|
26476
|
+
var formats = /*#__PURE__*/Object.freeze({
|
|
26477
|
+
__proto__: null,
|
|
26478
|
+
formatDelimiter: formatDelimiter,
|
|
26479
|
+
phoneFormats: phoneFormats,
|
|
26480
|
+
moneyFormats: moneyFormats,
|
|
26481
|
+
expirationDateFormats: expirationDateFormats,
|
|
26482
|
+
zipFormat: zipFormat,
|
|
26483
|
+
creditCardFormat: creditCardFormat,
|
|
26484
|
+
expirationDateFormat: expirationDateFormat,
|
|
26485
|
+
phoneFormat: phoneFormat,
|
|
26486
|
+
moneyFormat: moneyFormat,
|
|
26487
|
+
renderCardStatus: renderCardStatus
|
|
26488
|
+
});
|
|
26489
|
+
|
|
26318
26490
|
var CreditCardWrapper = styled.div.withConfig({
|
|
26319
26491
|
displayName: "FormattedCreditCard__CreditCardWrapper",
|
|
26320
26492
|
componentId: "sc-s0ta5l-0"
|
|
@@ -27289,8 +27461,8 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27289
27461
|
ariaLabelledBy = _ref2$ariaLabelledBy === void 0 ? "" : _ref2$ariaLabelledBy,
|
|
27290
27462
|
_ref2$ariaLabel = _ref2.ariaLabel,
|
|
27291
27463
|
ariaLabel = _ref2$ariaLabel === void 0 ? null : _ref2$ariaLabel,
|
|
27292
|
-
_ref2$
|
|
27293
|
-
|
|
27464
|
+
_ref2$isRequired = _ref2.isRequired,
|
|
27465
|
+
isRequired = _ref2$isRequired === void 0 ? false : _ref2$isRequired;
|
|
27294
27466
|
var buttonBorder = {
|
|
27295
27467
|
onFocused: {
|
|
27296
27468
|
borderColor: themeValues.activeColor,
|
|
@@ -27350,11 +27522,10 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27350
27522
|
type: "radio",
|
|
27351
27523
|
id: "radio-".concat(name),
|
|
27352
27524
|
disabled: disabled,
|
|
27353
|
-
required: required,
|
|
27354
|
-
"aria-required": required,
|
|
27355
27525
|
onClick: toggleRadio,
|
|
27356
27526
|
"aria-describedby": ariaDescribedBy,
|
|
27357
|
-
tabIndex: "-1"
|
|
27527
|
+
tabIndex: "-1",
|
|
27528
|
+
required: isRequired
|
|
27358
27529
|
}, extraProps)), /*#__PURE__*/React.createElement(Motion, {
|
|
27359
27530
|
borderWidth: "1px",
|
|
27360
27531
|
borderStyle: "solid",
|
|
@@ -39383,7 +39554,6 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39383
39554
|
labelTextWhenNoError: "Country",
|
|
39384
39555
|
errorMessages: countryErrorMessages,
|
|
39385
39556
|
field: fields.country,
|
|
39386
|
-
isRequired: true,
|
|
39387
39557
|
onChange: function onChange(value) {
|
|
39388
39558
|
actions.fields.country.set(value); // temporary measure to not dirty fields until
|
|
39389
39559
|
// we can write a reset function for fields
|
|
@@ -39397,7 +39567,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39397
39567
|
}
|
|
39398
39568
|
},
|
|
39399
39569
|
showErrors: showErrors,
|
|
39400
|
-
dataQa: "Country"
|
|
39570
|
+
dataQa: "Country",
|
|
39571
|
+
isRequired: true
|
|
39401
39572
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
39402
39573
|
labelTextWhenNoError: "Address",
|
|
39403
39574
|
errorMessages: street1ErrorMessages,
|
|
@@ -39419,8 +39590,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39419
39590
|
return e.key === "Enter" && handleSubmit(e);
|
|
39420
39591
|
},
|
|
39421
39592
|
autocompleteValue: "address-line2",
|
|
39422
|
-
dataQa: "Address Line 2"
|
|
39423
|
-
isRequired: false
|
|
39593
|
+
dataQa: "Address Line 2"
|
|
39424
39594
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
39425
39595
|
labelTextWhenNoError: "City",
|
|
39426
39596
|
errorMessages: cityErrorMessages,
|
|
@@ -40361,7 +40531,9 @@ var EmailForm = function EmailForm(_ref) {
|
|
|
40361
40531
|
handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
|
|
40362
40532
|
showWalletCheckbox = _ref.showWalletCheckbox,
|
|
40363
40533
|
saveToWallet = _ref.saveToWallet,
|
|
40364
|
-
walletCheckboxMarked = _ref.walletCheckboxMarked
|
|
40534
|
+
walletCheckboxMarked = _ref.walletCheckboxMarked,
|
|
40535
|
+
_ref$isRequired = _ref.isRequired,
|
|
40536
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
40365
40537
|
|
|
40366
40538
|
if (clearOnDismount) {
|
|
40367
40539
|
useEffect$1(function () {
|
|
@@ -40390,7 +40562,8 @@ var EmailForm = function EmailForm(_ref) {
|
|
|
40390
40562
|
},
|
|
40391
40563
|
isEmail: true,
|
|
40392
40564
|
autocompleteValue: "email",
|
|
40393
|
-
dataQa: "Email address"
|
|
40565
|
+
dataQa: "Email address",
|
|
40566
|
+
isRequired: isRequired
|
|
40394
40567
|
}), showWalletCheckbox && /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
40395
40568
|
name: "email checkbox",
|
|
40396
40569
|
title: "Save email address to wallet",
|
|
@@ -45687,7 +45860,8 @@ var Modal$1 = function Modal(_ref) {
|
|
|
45687
45860
|
alignItems: "center"
|
|
45688
45861
|
},
|
|
45689
45862
|
dialogStyle: {
|
|
45690
|
-
width: customWidth || "615px"
|
|
45863
|
+
width: customWidth || "615px",
|
|
45864
|
+
overflow: "auto"
|
|
45691
45865
|
},
|
|
45692
45866
|
underlayClickExits: underlayClickExits
|
|
45693
45867
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
@@ -47743,8 +47917,7 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
|
|
|
47743
47917
|
title: "Terms and Conditions",
|
|
47744
47918
|
error: error,
|
|
47745
47919
|
checked: isChecked,
|
|
47746
|
-
onChange: onCheck
|
|
47747
|
-
isRequired: true
|
|
47920
|
+
onChange: onCheck
|
|
47748
47921
|
}), /*#__PURE__*/React.createElement(Box, {
|
|
47749
47922
|
padding: "0 0 0 58px"
|
|
47750
47923
|
}, /*#__PURE__*/React.createElement(Stack, null, /*#__PURE__*/React.createElement(Box, {
|
|
@@ -47758,42 +47931,7 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
|
|
|
47758
47931
|
})))));
|
|
47759
47932
|
};
|
|
47760
47933
|
|
|
47761
|
-
|
|
47762
|
-
Hook that takes an ID selector for an element on the screen
|
|
47763
|
-
And optionally values for top position, left position, smooth behavior
|
|
47764
|
-
Finds element on screen and scrolls it to the provided coordinates
|
|
47765
|
-
|
|
47766
|
-
(string, number, number, string, number) => undefined;
|
|
47767
|
-
*/
|
|
47768
|
-
var useScrollTo = function useScrollTo(id) {
|
|
47769
|
-
var top = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
47770
|
-
var left = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
47771
|
-
var behavior = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "auto";
|
|
47772
|
-
var delay = arguments.length > 4 ? arguments[4] : undefined;
|
|
47773
|
-
var scrollItem;
|
|
47774
|
-
|
|
47775
|
-
if (delay) {
|
|
47776
|
-
setTimeout(function () {
|
|
47777
|
-
var _scrollItem;
|
|
47778
|
-
|
|
47779
|
-
scrollItem = document.getElementById(id);
|
|
47780
|
-
(_scrollItem = scrollItem) === null || _scrollItem === void 0 ? void 0 : _scrollItem.scrollTo({
|
|
47781
|
-
top: top,
|
|
47782
|
-
left: left,
|
|
47783
|
-
behavior: behavior
|
|
47784
|
-
});
|
|
47785
|
-
}, delay);
|
|
47786
|
-
} else {
|
|
47787
|
-
var _scrollItem2;
|
|
47788
|
-
|
|
47789
|
-
scrollItem = document.getElementById(id);
|
|
47790
|
-
(_scrollItem2 = scrollItem) === null || _scrollItem2 === void 0 ? void 0 : _scrollItem2.scrollTo({
|
|
47791
|
-
top: top,
|
|
47792
|
-
left: left,
|
|
47793
|
-
behavior: behavior
|
|
47794
|
-
});
|
|
47795
|
-
}
|
|
47796
|
-
};
|
|
47934
|
+
var TermsAndConditionsTitleDivId = "terms-and-conditions-title";
|
|
47797
47935
|
|
|
47798
47936
|
var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
|
|
47799
47937
|
var _ref$showCheckbox = _ref.showCheckbox,
|
|
@@ -47858,7 +47996,7 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
|
|
|
47858
47996
|
onChange: onCheck,
|
|
47859
47997
|
checkboxMargin: checkboxMargin,
|
|
47860
47998
|
extraStyles: "align-self: flex-start;",
|
|
47861
|
-
|
|
47999
|
+
labelledById: TermsAndConditionsTitleDivId
|
|
47862
48000
|
}), /*#__PURE__*/React.createElement(Stack, {
|
|
47863
48001
|
childGap: "0.25rem",
|
|
47864
48002
|
fullHeight: true
|
|
@@ -47866,7 +48004,8 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
|
|
|
47866
48004
|
justify: "flex-start",
|
|
47867
48005
|
align: "center",
|
|
47868
48006
|
nowrap: true,
|
|
47869
|
-
extraStyles: "padding-right: 2px; > div > * { margin: 4px 2px; };"
|
|
48007
|
+
extraStyles: "padding-right: 2px; > div > * { margin: 4px 2px; };",
|
|
48008
|
+
id: TermsAndConditionsTitleDivId
|
|
47870
48009
|
}, description && /*#__PURE__*/React.createElement(Text$1, {
|
|
47871
48010
|
color: CHARADE_GREY
|
|
47872
48011
|
}, description), terms && /*#__PURE__*/React.createElement(TermsAndConditionsModal$1, {
|
|
@@ -47999,8 +48138,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
47999
48138
|
onKeyDown: function onKeyDown(e) {
|
|
48000
48139
|
return e.key === "Enter" && handleSubmit(e);
|
|
48001
48140
|
},
|
|
48002
|
-
|
|
48003
|
-
|
|
48141
|
+
isNum: true,
|
|
48142
|
+
isRequired: true
|
|
48004
48143
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48005
48144
|
labelTextWhenNoError: "Account number",
|
|
48006
48145
|
dataQa: "Account number",
|
|
@@ -48008,7 +48147,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48008
48147
|
field: fields.accountNumber,
|
|
48009
48148
|
fieldActions: actions.fields.accountNumber,
|
|
48010
48149
|
showErrors: showErrors,
|
|
48011
|
-
isRequired: true,
|
|
48012
48150
|
isNum: true,
|
|
48013
48151
|
helperModal: function helperModal() {
|
|
48014
48152
|
return /*#__PURE__*/React.createElement(AccountAndRoutingModal$1, {
|
|
@@ -48023,11 +48161,11 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48023
48161
|
},
|
|
48024
48162
|
onKeyDown: function onKeyDown(e) {
|
|
48025
48163
|
return e.key === "Enter" && handleSubmit(e);
|
|
48026
|
-
}
|
|
48164
|
+
},
|
|
48165
|
+
isRequired: true
|
|
48027
48166
|
}), /*#__PURE__*/React.createElement(FormInput$1, {
|
|
48028
48167
|
labelTextWhenNoError: "Confirm account number",
|
|
48029
48168
|
dataQa: "Confirm account number",
|
|
48030
|
-
isRequired: true,
|
|
48031
48169
|
errorMessages: confirmAccountNumberErrors,
|
|
48032
48170
|
field: fields.confirmAccountNumber,
|
|
48033
48171
|
fieldActions: actions.fields.confirmAccountNumber,
|
|
@@ -48035,10 +48173,10 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48035
48173
|
onKeyDown: function onKeyDown(e) {
|
|
48036
48174
|
return e.key === "Enter" && handleSubmit(e);
|
|
48037
48175
|
},
|
|
48176
|
+
isRequired: true,
|
|
48038
48177
|
isNum: true
|
|
48039
48178
|
}), allowBankAccountType && /*#__PURE__*/React.createElement(FormSelect$1, {
|
|
48040
48179
|
labelTextWhenNoError: "Account type",
|
|
48041
|
-
isRequired: true,
|
|
48042
48180
|
dataQa: "Account type",
|
|
48043
48181
|
options: [{
|
|
48044
48182
|
text: "Select account type",
|
|
@@ -48053,7 +48191,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48053
48191
|
fieldActions: actions.fields.accountType,
|
|
48054
48192
|
showErrors: showErrors,
|
|
48055
48193
|
errorMessages: accountTypeErrors,
|
|
48056
|
-
field: fields.accountType
|
|
48194
|
+
field: fields.accountType,
|
|
48195
|
+
isRequired: true
|
|
48057
48196
|
}), !hideDefaultPayment && /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
48058
48197
|
title: "Save as Default Payment Method",
|
|
48059
48198
|
dataQa: "default-payment-ach",
|
|
@@ -48076,8 +48215,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48076
48215
|
version: "v2",
|
|
48077
48216
|
showCheckbox: false,
|
|
48078
48217
|
description: "View",
|
|
48079
|
-
terms: termsContent
|
|
48080
|
-
isRequired: true
|
|
48218
|
+
terms: termsContent
|
|
48081
48219
|
})))));
|
|
48082
48220
|
};
|
|
48083
48221
|
|
|
@@ -48170,7 +48308,6 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48170
48308
|
"aria-label": "Card payment"
|
|
48171
48309
|
}, /*#__PURE__*/React.createElement(FormInputColumn, null, !hideZipCode && /*#__PURE__*/React.createElement(CountryDropdown, {
|
|
48172
48310
|
labelTextWhenNoError: "Country",
|
|
48173
|
-
isRequired: true,
|
|
48174
48311
|
errorMessages: countryErrorMessages,
|
|
48175
48312
|
field: fields.country,
|
|
48176
48313
|
onChange: function onChange(value) {
|
|
@@ -48274,8 +48411,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48274
48411
|
version: "v2",
|
|
48275
48412
|
showCheckbox: false,
|
|
48276
48413
|
description: "View",
|
|
48277
|
-
terms: termsContent
|
|
48278
|
-
isRequired: true
|
|
48414
|
+
terms: termsContent
|
|
48279
48415
|
})))));
|
|
48280
48416
|
};
|
|
48281
48417
|
|
|
@@ -48452,7 +48588,9 @@ var PhoneForm = function PhoneForm(_ref) {
|
|
|
48452
48588
|
handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
|
|
48453
48589
|
showWalletCheckbox = _ref.showWalletCheckbox,
|
|
48454
48590
|
saveToWallet = _ref.saveToWallet,
|
|
48455
|
-
walletCheckboxMarked = _ref.walletCheckboxMarked
|
|
48591
|
+
walletCheckboxMarked = _ref.walletCheckboxMarked,
|
|
48592
|
+
_ref$isRequired = _ref.isRequired,
|
|
48593
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
48456
48594
|
|
|
48457
48595
|
if (clearOnDismount) {
|
|
48458
48596
|
useEffect$1(function () {
|
|
@@ -48479,7 +48617,8 @@ var PhoneForm = function PhoneForm(_ref) {
|
|
|
48479
48617
|
},
|
|
48480
48618
|
autocompleteValue: "tel-national",
|
|
48481
48619
|
dataQa: "Phone number",
|
|
48482
|
-
isNum: true
|
|
48620
|
+
isNum: true,
|
|
48621
|
+
isRequired: isRequired
|
|
48483
48622
|
}), showWalletCheckbox && /*#__PURE__*/React.createElement(Checkbox$1, {
|
|
48484
48623
|
name: "phone checkbox",
|
|
48485
48624
|
title: "Save phone number to wallet",
|
|
@@ -48612,7 +48751,9 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48612
48751
|
openHeight = _ref$openHeight === void 0 ? "auto" : _ref$openHeight,
|
|
48613
48752
|
_ref$containerStyles = _ref.containerStyles,
|
|
48614
48753
|
containerStyles = _ref$containerStyles === void 0 ? "" : _ref$containerStyles,
|
|
48615
|
-
ariaDescribedBy = _ref.ariaDescribedBy
|
|
48754
|
+
ariaDescribedBy = _ref.ariaDescribedBy,
|
|
48755
|
+
_ref$isSectionRequire = _ref.isSectionRequired,
|
|
48756
|
+
isSectionRequired = _ref$isSectionRequire === void 0 ? false : _ref$isSectionRequire;
|
|
48616
48757
|
|
|
48617
48758
|
var handleKeyDown = function handleKeyDown(id, e) {
|
|
48618
48759
|
if ((e === null || e === void 0 ? void 0 : e.keyCode) === 13 || (e === null || e === void 0 ? void 0 : e.keyCode) === 32) {
|
|
@@ -48668,7 +48809,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48668
48809
|
extraStyles: containerStyles
|
|
48669
48810
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
48670
48811
|
childGap: "0",
|
|
48671
|
-
role: "radiogroup"
|
|
48812
|
+
"aria-role": "radiogroup",
|
|
48813
|
+
"aria-required": isSectionRequired
|
|
48672
48814
|
}, sections.filter(function (section) {
|
|
48673
48815
|
return !section.hidden;
|
|
48674
48816
|
}).map(function (section) {
|
|
@@ -48690,7 +48832,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48690
48832
|
extraStyles: borderStyles,
|
|
48691
48833
|
role: "radio",
|
|
48692
48834
|
"aria-checked": openSection === section.id,
|
|
48693
|
-
"aria-disabled": section.disabled
|
|
48835
|
+
"aria-disabled": section.disabled,
|
|
48836
|
+
"aria-required": section === null || section === void 0 ? void 0 : section.required
|
|
48694
48837
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
48695
48838
|
childGap: "0"
|
|
48696
48839
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
@@ -48729,7 +48872,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48729
48872
|
return toggleOpenSection(section.id);
|
|
48730
48873
|
},
|
|
48731
48874
|
tabIndex: "-1",
|
|
48732
|
-
|
|
48875
|
+
isRequired: section === null || section === void 0 ? void 0 : section.required
|
|
48733
48876
|
})), section.titleIcon && /*#__PURE__*/React.createElement(Cluster, {
|
|
48734
48877
|
align: "center"
|
|
48735
48878
|
}, section.titleIcon), /*#__PURE__*/React.createElement(Box, {
|
|
@@ -48741,7 +48884,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48741
48884
|
}, section.title))), section.rightIcons && /*#__PURE__*/React.createElement(Cluster, {
|
|
48742
48885
|
childGap: "0.5rem",
|
|
48743
48886
|
"aria-label": (section === null || section === void 0 ? void 0 : section.rightIconsLabel) || null,
|
|
48744
|
-
role: (section === null || section === void 0 ? void 0 : section.rightIconsRole) ||
|
|
48887
|
+
role: (section === null || section === void 0 ? void 0 : section.rightIconsRole) || null
|
|
48745
48888
|
}, section.rightIcons.map(function (icon) {
|
|
48746
48889
|
return /*#__PURE__*/React.createElement(RightIcon, {
|
|
48747
48890
|
src: icon.img,
|
|
@@ -49248,6 +49391,51 @@ var Timeout = function Timeout(_ref) {
|
|
|
49248
49391
|
|
|
49249
49392
|
var Timeout$1 = withWindowSize(Timeout);
|
|
49250
49393
|
|
|
49394
|
+
var VARIANTS = {
|
|
49395
|
+
SUCCESS: "success",
|
|
49396
|
+
ERROR: "error"
|
|
49397
|
+
};
|
|
49398
|
+
|
|
49399
|
+
var ToastNotification = function ToastNotification(_ref) {
|
|
49400
|
+
var _ref$variant = _ref.variant,
|
|
49401
|
+
variant = _ref$variant === void 0 ? VARIANTS.SUCCESS : _ref$variant,
|
|
49402
|
+
_ref$message = _ref.message,
|
|
49403
|
+
message = _ref$message === void 0 ? "" : _ref$message,
|
|
49404
|
+
toastOpen = _ref.toastOpen,
|
|
49405
|
+
closeToastNotification = _ref.closeToastNotification,
|
|
49406
|
+
extraStyles = _ref.extraStyles,
|
|
49407
|
+
_ref$minWidth = _ref.minWidth,
|
|
49408
|
+
minWidth = _ref$minWidth === void 0 ? "112px" : _ref$minWidth,
|
|
49409
|
+
_ref$maxWidth = _ref.maxWidth,
|
|
49410
|
+
maxWidth = _ref$maxWidth === void 0 ? "350px" : _ref$maxWidth,
|
|
49411
|
+
_ref$height = _ref.height,
|
|
49412
|
+
height = _ref$height === void 0 ? "56px" : _ref$height,
|
|
49413
|
+
_ref$childGap = _ref.childGap,
|
|
49414
|
+
childGap = _ref$childGap === void 0 ? "1rem" : _ref$childGap,
|
|
49415
|
+
backgroundColor = _ref.backgroundColor;
|
|
49416
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
49417
|
+
onClick: closeToastNotification,
|
|
49418
|
+
background: backgroundColor ? backgroundColor : variant === VARIANTS.SUCCESS ? HINT_GREEN : variant === VARIANTS.ERROR ? ERROR_BACKGROUND_COLOR : WHITE,
|
|
49419
|
+
minWidth: minWidth,
|
|
49420
|
+
minHeight: height && parseInt(height) < 100 ? height : "100px",
|
|
49421
|
+
height: height ? height : "auto",
|
|
49422
|
+
tabIndex: toastOpen ? "-1" : "0",
|
|
49423
|
+
padding: "0rem 1rem",
|
|
49424
|
+
borderRadius: "4px",
|
|
49425
|
+
boxShadow: generateShadows().standard.base,
|
|
49426
|
+
extraStyles: "\n display: ".concat(toastOpen ? "block" : "none", ";\n position: fixed; bottom: 4rem; left: 4rem;\n ").concat(extraStyles, ";\n cursor: pointer;\n ")
|
|
49427
|
+
}, /*#__PURE__*/React.createElement(Cluster, {
|
|
49428
|
+
align: "center",
|
|
49429
|
+
childGap: childGap
|
|
49430
|
+
}, variant === VARIANTS.SUCCESS && /*#__PURE__*/React.createElement(SuccessfulIconMedium, null), variant === VARIANTS.ERROR && /*#__PURE__*/React.createElement(ErroredIcon, null), /*#__PURE__*/React.createElement(Box, {
|
|
49431
|
+
padding: "1rem 0",
|
|
49432
|
+
maxWidth: maxWidth
|
|
49433
|
+
}, /*#__PURE__*/React.createElement(Paragraph$1, {
|
|
49434
|
+
weight: FONT_WEIGHT_SEMIBOLD,
|
|
49435
|
+
extraStyles: "word-break: break-word;"
|
|
49436
|
+
}, message)), /*#__PURE__*/React.createElement(IconQuitLarge, null)));
|
|
49437
|
+
};
|
|
49438
|
+
|
|
49251
49439
|
var fontWeight$9 = "600";
|
|
49252
49440
|
var fontColor$1 = WHITE;
|
|
49253
49441
|
var textAlign$1 = "left";
|
|
@@ -49620,5 +49808,37 @@ var SidebarStackContent = function SidebarStackContent(_ref) {
|
|
|
49620
49808
|
|
|
49621
49809
|
var SidebarStackContent$1 = withWindowSize(themeComponent(SidebarStackContent, "Global", fallbackValues$U));
|
|
49622
49810
|
|
|
49623
|
-
|
|
49811
|
+
var useFocusInvalidInput = function useFocusInvalidInput(hasErrors) {
|
|
49812
|
+
var resetHasErrors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
|
|
49813
|
+
// Only move focus when "hasErrors" is true
|
|
49814
|
+
// "hasErrors" is managed by container page of form
|
|
49815
|
+
// typically set to "true" on attempted form submission, if errors exist
|
|
49816
|
+
// Reset errors, if provided, resets the error state tracking in order to properly re-run
|
|
49817
|
+
useEffect$1(function () {
|
|
49818
|
+
if (hasErrors) {
|
|
49819
|
+
var _inputsWithErrors$;
|
|
49820
|
+
|
|
49821
|
+
var inputsWithErrors = document.querySelectorAll("input[aria-invalid=true]");
|
|
49822
|
+
inputsWithErrors === null || inputsWithErrors === void 0 ? void 0 : (_inputsWithErrors$ = inputsWithErrors[0]) === null || _inputsWithErrors$ === void 0 ? void 0 : _inputsWithErrors$.focus();
|
|
49823
|
+
}
|
|
49824
|
+
|
|
49825
|
+
return function () {
|
|
49826
|
+
return resetHasErrors(false);
|
|
49827
|
+
};
|
|
49828
|
+
});
|
|
49829
|
+
};
|
|
49830
|
+
|
|
49831
|
+
|
|
49832
|
+
|
|
49833
|
+
var index$6 = /*#__PURE__*/Object.freeze({
|
|
49834
|
+
__proto__: null,
|
|
49835
|
+
formats: formats,
|
|
49836
|
+
general: general,
|
|
49837
|
+
theme: themeUtils,
|
|
49838
|
+
useFocusInvalidInput: useFocusInvalidInput,
|
|
49839
|
+
useOutsideClick: useOutsideClickHook,
|
|
49840
|
+
useToastNotification: useToastNotification
|
|
49841
|
+
});
|
|
49842
|
+
|
|
49843
|
+
export { AccountNumberImage, AccountsAddIcon$1 as AccountsAddIcon, AccountsIcon$1 as AccountsIcon, AccountsIconSmall$1 as AccountsIconSmall, AchReturnIcon, AddObligation$1 as AddObligation, AddressForm, Alert$1 as Alert, AllocatedIcon, AmountCallout$1 as AmountCallout, ArrowDownCircleIconSmall, ArrowLeftCircleIconMedium, ArrowLeftCircleIconSmall, ArrowRightCircleIconSmall, ArrowRightIcon, ArrowUpCircleIconSmall, AutopayIcon, AutopayOnIcon, Badge$1 as Badge, BankIcon, BankIconLarge, Banner$1 as Banner, Box, BoxWithShadow$1 as BoxWithShadow, Breadcrumbs as Breadcrumb, ButtonWithAction, ButtonWithLink, CalendarIcon, Card$1 as Card, CarrotIcon$1 as CarrotIcon, CashIcon, Center, CenterSingle$1 as CenterSingle, CenterStack$1 as CenterStack, ChangePasswordForm, ChargebackIcon, ChargebackIconMedium, ChargebackIconSmall, ChargebackReversalIcon, ChargebackReversalIconMedium, ChargebackReversalIconSmall, CheckIcon, Checkbox$1 as Checkbox, CheckboxList$1 as CheckboxList, CheckmarkIcon, ChevronIcon$1 as ChevronIcon, Cluster, CollapsibleSection$1 as CollapsibleSection, Copyable, CountryDropdown, Cover, CustomerSearchIcon, DefaultPageTemplate, Detail$1 as Detail, DisplayBox$1 as DisplayBox, DisplayCard, Dropdown$1 as Dropdown, DuplicateIcon, EditNameForm, EditableList, EditableTable, EmailForm, EmptyCartIcon$1 as EmptyCartIcon, ErroredIcon, ExternalLink, ExternalLinkIcon, FailedIcon, FindIconSmall$1 as FindIconSmall, FooterWithSubfooter$1 as FooterWithSubfooter, ForgotPasswordForm, ForgotPasswordIcon$1 as ForgotPasswordIcon, FormContainer$1 as FormContainer, FormFooterPanel$1 as FormFooterPanel, FormInput$1 as FormInput, FormInputColumn, FormInputRow, FormSelect$1 as FormSelect, FormattedAddress$1 as FormattedAddress, FormattedBankAccount$1 as FormattedBankAccount, FormattedCreditCard$1 as FormattedCreditCard, Frame, GenericCard, GenericCardLarge, GenericErrorIcon, GoToEmailIcon$1 as GoToEmailIcon, Grid, GuidedCheckoutImage, HamburgerButton, Heading$1 as Heading, HighlightTabRow$1 as HighlightTabRow, HistoryIconSmall$1 as HistoryIconSmall, IconAdd, IconQuitLarge, ImageBox, Imposter, InternalLink, Jumbo$1 as Jumbo, KebabMenuIcon, KioskImage, LabeledAmount$1 as LabeledAmount, LineItem$1 as LineItem, LinkCard$1 as LinkCard, Loading, LoadingLine, LoginForm, Modal$1 as Modal, Module$1 as Module, Motion, NavFooter, NavHeader, NavMenuDesktop$1 as NavMenuDesktop, NavMenuMobile$1 as NavMenuMobile, NavTabs, NoCustomerResultsIcon, NoPaymentResultsIcon, NotFoundIcon, Obligation, iconsMap as ObligationIcons, Pagination$1 as Pagination, Paragraph$1 as Paragraph, PartialAmountForm, PasswordRequirements, PaymentButtonBar, PaymentDetails$1 as PaymentDetails, PaymentFormACH, PaymentFormCard$1 as PaymentFormCard, PaymentMethodAddIcon$1 as PaymentMethodAddIcon, PaymentMethodIcon$1 as PaymentMethodIcon, PaymentSearchIcon, PaymentsIconSmall$1 as PaymentsIconSmall, PencilIcon$1 as PencilIcon, PendingIcon, PeriscopeDashboardIframe, PeriscopeFailedIcon, PhoneForm, Placeholder$1 as Placeholder, PlusCircleIcon, PointOfSaleImage, Popover$1 as Popover, ProcessingFee$1 as ProcessingFee, ProfileIcon$1 as ProfileIcon, ProfileIconSmall$1 as ProfileIconSmall, ProfileImage, PropertiesAddIcon$1 as PropertiesAddIcon, PropertiesIconSmall$1 as PropertiesIconSmall, RadioButton$2 as RadioButton, RadioButtonWithLabel$1 as RadioButtonWithLabel, RadioGroup, RadioSection$1 as RadioSection, Reel, RefundIcon, RefundIconMedium, RefundIconSmall, RegistrationForm, RejectedIcon, RejectedVelocityIcon, ResetConfirmationForm$1 as ResetConfirmationForm, ResetPasswordForm, ResetPasswordIcon, ResetPasswordSuccess, RevenueManagementImage, RoutingNumberImage, SearchIcon, SearchableSelect$1 as SearchableSelect, SettingsIconSmall$1 as SettingsIconSmall, ShoppingCartIcon, Sidebar, SidebarSingleContent$1 as SidebarSingleContent, SidebarStackContent$1 as SidebarStackContent, SolidDivider$1 as SolidDivider, Spinner$2 as Spinner, Stack, StandardCheckoutImage, FormStateDropdown as StateProvinceDropdown, StatusUnknownIcon, SuccessfulIcon, SuccessfulIconMedium, SuccessfulIconSmall, Switcher, TabSidebar$1 as TabSidebar, Table_styled as Table, TableBody_styled as TableBody, TableCell_styled as TableCell, TableHead$1 as TableHead, TableHeading_styled as TableHeading, TableListItem, TableRow$1 as TableRow, Tabs$1 as Tabs, TermsAndConditions, TermsAndConditionsModal$1 as TermsAndConditionsModal, Text$1 as Text, Timeout$1 as Timeout, TimeoutImage, Title$1 as Title, ToastNotification, ToggleSwitch$1 as ToggleSwitch, TrashIcon$1 as TrashIcon, TypeaheadInput, VerifiedEmailIcon$1 as VerifiedEmailIcon, VoidedIcon, WalletBannerIcon$1 as WalletBannerIcon, WalletIcon$1 as WalletIcon, WalletIconSmall$1 as WalletIconSmall, WarningIconXS, WelcomeModule$1 as WelcomeModule, WorkflowTile, XCircleIconMedium, XCircleIconSmall, cardRegistry, index$5 as constants, createPartialAmountFormState, createPartialAmountFormValidators, index$4 as hooks, index$6 as util, withWindowSize };
|
|
49624
49844
|
//# sourceMappingURL=index.esm.js.map
|