@thecb/components 9.3.0-beta.1 → 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 +850 -616
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +171 -60
- package/dist/index.esm.js +847 -616
- 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/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 +5 -1
- 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 +9 -2
- package/src/components/molecules/radio-section/RadioSection.stories.js +4 -2
- package/src/components/molecules/radio-section/radio-button/RadioButton.js +3 -1
- 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.cjs.js
CHANGED
|
@@ -5019,6 +5019,7 @@ var INFO_BLUE = "#E4F4FD";
|
|
|
5019
5019
|
var CORNFLOWER_BLUE = "#EBEFFB";
|
|
5020
5020
|
var HOVER_LIGHT_BLUE = "#EFFAFF";
|
|
5021
5021
|
var MATISSE_BLUE = "#15749D";
|
|
5022
|
+
var MATISSE_BLUE_DARK = "#105C7D";
|
|
5022
5023
|
var ROYAL_BLUE = "#3181E3";
|
|
5023
5024
|
var ROYAL_BLUE_VIVID = "#3B5BDB";
|
|
5024
5025
|
var ASTRAL_BLUE = "#3176AA";
|
|
@@ -5051,7 +5052,8 @@ var FANTASY_RED = "#FCF4F4";
|
|
|
5051
5052
|
var COSMOS_RED = "#FFD0D3";
|
|
5052
5053
|
var BLUSH_RED = "#FFF0F5"; // Second level color constants
|
|
5053
5054
|
|
|
5054
|
-
var ERROR_COLOR = RAZZMATAZZ_RED;
|
|
5055
|
+
var ERROR_COLOR = RAZZMATAZZ_RED;
|
|
5056
|
+
var ERROR_BACKGROUND_COLOR = "#FFF4F8"; // These colors are sequestered so that the alert component can reference them // by type of alert
|
|
5055
5057
|
|
|
5056
5058
|
var ALERT_COLORS = {
|
|
5057
5059
|
warn: {
|
|
@@ -5153,6 +5155,7 @@ var colors = /*#__PURE__*/Object.freeze({
|
|
|
5153
5155
|
BOSTON_BLUE: BOSTON_BLUE,
|
|
5154
5156
|
HOVER_LIGHT_BLUE: HOVER_LIGHT_BLUE,
|
|
5155
5157
|
MATISSE_BLUE: MATISSE_BLUE,
|
|
5158
|
+
MATISSE_BLUE_DARK: MATISSE_BLUE_DARK,
|
|
5156
5159
|
ROYAL_BLUE: ROYAL_BLUE,
|
|
5157
5160
|
ROYAL_BLUE_VIVID: ROYAL_BLUE_VIVID,
|
|
5158
5161
|
ASTRAL_BLUE: ASTRAL_BLUE,
|
|
@@ -5182,7 +5185,8 @@ var colors = /*#__PURE__*/Object.freeze({
|
|
|
5182
5185
|
RASPBERRY: RASPBERRY,
|
|
5183
5186
|
ALERT_COLORS: ALERT_COLORS,
|
|
5184
5187
|
PILL_COLORS: PILL_COLORS,
|
|
5185
|
-
ERROR_COLOR: ERROR_COLOR
|
|
5188
|
+
ERROR_COLOR: ERROR_COLOR,
|
|
5189
|
+
ERROR_BACKGROUND_COLOR: ERROR_BACKGROUND_COLOR
|
|
5186
5190
|
});
|
|
5187
5191
|
|
|
5188
5192
|
var TextSpan = styled__default.span.withConfig({
|
|
@@ -12922,7 +12926,7 @@ var Spinner = function Spinner(_ref) {
|
|
|
12922
12926
|
*/
|
|
12923
12927
|
|
|
12924
12928
|
|
|
12925
|
-
var ButtonWithAction = function
|
|
12929
|
+
var ButtonWithAction = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
12926
12930
|
var _ref2$action = _ref2.action,
|
|
12927
12931
|
action = _ref2$action === void 0 ? noop : _ref2$action,
|
|
12928
12932
|
_ref2$variant = _ref2.variant,
|
|
@@ -12953,6 +12957,7 @@ var ButtonWithAction = function ButtonWithAction(_ref2) {
|
|
|
12953
12957
|
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 ");
|
|
12954
12958
|
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 ");
|
|
12955
12959
|
return /*#__PURE__*/React__default.createElement(Box, _extends({
|
|
12960
|
+
ref: ref,
|
|
12956
12961
|
variant: variant,
|
|
12957
12962
|
padding: themeValues.padding,
|
|
12958
12963
|
minHeight: themeValues.height,
|
|
@@ -12981,7 +12986,7 @@ var ButtonWithAction = function ButtonWithAction(_ref2) {
|
|
|
12981
12986
|
textWrap: textWrap,
|
|
12982
12987
|
extraStyles: textExtraStyles
|
|
12983
12988
|
}, text)));
|
|
12984
|
-
};
|
|
12989
|
+
});
|
|
12985
12990
|
|
|
12986
12991
|
var primaryColor = {
|
|
12987
12992
|
info: "".concat(WHITE),
|
|
@@ -13679,7 +13684,9 @@ var AccountNumberImage = function AccountNumberImage() {
|
|
|
13679
13684
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13680
13685
|
width: "371",
|
|
13681
13686
|
height: "164",
|
|
13682
|
-
viewBox: "0 0 371 164"
|
|
13687
|
+
viewBox: "0 0 371 164",
|
|
13688
|
+
role: "img",
|
|
13689
|
+
"aria-label": "A check with the account number highlighted in the bottom center"
|
|
13683
13690
|
}, /*#__PURE__*/React__default.createElement("g", {
|
|
13684
13691
|
fill: "none",
|
|
13685
13692
|
fillRule: "evenodd",
|
|
@@ -13760,7 +13767,9 @@ var RoutingNumberImage = function RoutingNumberImage() {
|
|
|
13760
13767
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13761
13768
|
width: "371",
|
|
13762
13769
|
height: "164",
|
|
13763
|
-
viewBox: "0 0 371 164"
|
|
13770
|
+
viewBox: "0 0 371 164",
|
|
13771
|
+
role: "img",
|
|
13772
|
+
"aria-label": "A check with the routing number highlighted in the lower left hand corner"
|
|
13764
13773
|
}, /*#__PURE__*/React__default.createElement("g", {
|
|
13765
13774
|
fill: "none",
|
|
13766
13775
|
fillRule: "evenodd",
|
|
@@ -13843,7 +13852,9 @@ var CheckmarkIcon = function CheckmarkIcon() {
|
|
|
13843
13852
|
viewBox: "0 0 98 98",
|
|
13844
13853
|
version: "1.1",
|
|
13845
13854
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13846
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink"
|
|
13855
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
13856
|
+
role: "img",
|
|
13857
|
+
"aria-label": "Successful payment, green checkmark"
|
|
13847
13858
|
}, /*#__PURE__*/React__default.createElement("g", {
|
|
13848
13859
|
id: "Cityville-Checkout---Desktop---Logged-In",
|
|
13849
13860
|
stroke: "none",
|
|
@@ -13888,7 +13899,9 @@ var BankIcon = function BankIcon() {
|
|
|
13888
13899
|
height: "18",
|
|
13889
13900
|
viewBox: "0 0 28 18",
|
|
13890
13901
|
fill: "none",
|
|
13891
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
13902
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
13903
|
+
role: "img",
|
|
13904
|
+
"aria-label": "Check Payment"
|
|
13892
13905
|
}, /*#__PURE__*/React__default.createElement("path", {
|
|
13893
13906
|
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",
|
|
13894
13907
|
fill: "#E4F4FD"
|
|
@@ -13935,7 +13948,9 @@ var GenericCard = function GenericCard() {
|
|
|
13935
13948
|
height: "18",
|
|
13936
13949
|
viewBox: "0 0 28 18",
|
|
13937
13950
|
fill: "none",
|
|
13938
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
13951
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
13952
|
+
role: "img",
|
|
13953
|
+
"aria-label": "Card Payment"
|
|
13939
13954
|
}, /*#__PURE__*/React__default.createElement("rect", {
|
|
13940
13955
|
width: "28",
|
|
13941
13956
|
height: "18",
|
|
@@ -15194,7 +15209,9 @@ var GenericCardLarge = function GenericCardLarge() {
|
|
|
15194
15209
|
height: "24",
|
|
15195
15210
|
viewBox: "0 0 36 24",
|
|
15196
15211
|
fill: "none",
|
|
15197
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
15212
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15213
|
+
role: "img",
|
|
15214
|
+
"aria-label": "Card Payment"
|
|
15198
15215
|
}, /*#__PURE__*/React__default.createElement("rect", {
|
|
15199
15216
|
width: "36",
|
|
15200
15217
|
height: "24",
|
|
@@ -15283,7 +15300,8 @@ var ShoppingCartIcon = function ShoppingCartIcon() {
|
|
|
15283
15300
|
};
|
|
15284
15301
|
|
|
15285
15302
|
var TrashIcon = function TrashIcon(_ref) {
|
|
15286
|
-
var themeValues = _ref.themeValues
|
|
15303
|
+
var themeValues = _ref.themeValues,
|
|
15304
|
+
iconFill = _ref.iconFill;
|
|
15287
15305
|
return /*#__PURE__*/React__default.createElement("svg", {
|
|
15288
15306
|
width: "20px",
|
|
15289
15307
|
height: "20px",
|
|
@@ -15307,12 +15325,12 @@ var TrashIcon = function TrashIcon(_ref) {
|
|
|
15307
15325
|
xlinkHref: "#trash-path-1"
|
|
15308
15326
|
})), /*#__PURE__*/React__default.createElement("use", {
|
|
15309
15327
|
id: "trash-Mask",
|
|
15310
|
-
fill: themeValues.singleIconColor,
|
|
15328
|
+
fill: iconFill !== null && iconFill !== void 0 ? iconFill : themeValues.singleIconColor,
|
|
15311
15329
|
fillRule: "nonzero",
|
|
15312
15330
|
xlinkHref: "#trash-path-1"
|
|
15313
15331
|
}), /*#__PURE__*/React__default.createElement("polygon", {
|
|
15314
15332
|
id: "trash-Path",
|
|
15315
|
-
fill: themeValues.singleIconColor,
|
|
15333
|
+
fill: iconFill !== null && iconFill !== void 0 ? iconFill : themeValues.singleIconColor,
|
|
15316
15334
|
fillRule: "nonzero",
|
|
15317
15335
|
mask: "url(#trash-mask-2)",
|
|
15318
15336
|
points: "0 0 20 0 20 20 0 20"
|
|
@@ -18243,6 +18261,34 @@ var PlusCircleIcon = function PlusCircleIcon(_ref) {
|
|
|
18243
18261
|
}));
|
|
18244
18262
|
};
|
|
18245
18263
|
|
|
18264
|
+
var KebabMenuIcon = function KebabMenuIcon() {
|
|
18265
|
+
return /*#__PURE__*/React__default.createElement("svg", {
|
|
18266
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
18267
|
+
width: "21",
|
|
18268
|
+
height: "32",
|
|
18269
|
+
viewBox: "0 0 21 32",
|
|
18270
|
+
fill: "none"
|
|
18271
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
18272
|
+
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",
|
|
18273
|
+
fill: "none"
|
|
18274
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
18275
|
+
fillRule: "evenodd",
|
|
18276
|
+
clipRule: "evenodd",
|
|
18277
|
+
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",
|
|
18278
|
+
fill: "#3B5BDB"
|
|
18279
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
18280
|
+
fillRule: "evenodd",
|
|
18281
|
+
clipRule: "evenodd",
|
|
18282
|
+
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",
|
|
18283
|
+
fill: "#3B5BDB"
|
|
18284
|
+
}), /*#__PURE__*/React__default.createElement("path", {
|
|
18285
|
+
fillRule: "evenodd",
|
|
18286
|
+
clipRule: "evenodd",
|
|
18287
|
+
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",
|
|
18288
|
+
fill: "#3B5BDB"
|
|
18289
|
+
}));
|
|
18290
|
+
};
|
|
18291
|
+
|
|
18246
18292
|
var color$2 = "#15749D";
|
|
18247
18293
|
var hoverColor$1 = "#116285";
|
|
18248
18294
|
var activeColor$1 = "#0E506D";
|
|
@@ -22129,10 +22175,9 @@ var Checkbox = function Checkbox(_ref4) {
|
|
|
22129
22175
|
checkboxMargin = _ref4$checkboxMargin === void 0 ? "0 16px 0 0" : _ref4$checkboxMargin,
|
|
22130
22176
|
extraStyles = _ref4.extraStyles,
|
|
22131
22177
|
textExtraStyles = _ref4.textExtraStyles,
|
|
22178
|
+
labelledById = _ref4.labelledById,
|
|
22132
22179
|
_ref4$dataQa = _ref4.dataQa,
|
|
22133
|
-
dataQa = _ref4$dataQa === void 0 ? null : _ref4$dataQa
|
|
22134
|
-
_ref4$isRequired = _ref4.isRequired,
|
|
22135
|
-
isRequired = _ref4$isRequired === void 0 ? false : _ref4$isRequired;
|
|
22180
|
+
dataQa = _ref4$dataQa === void 0 ? null : _ref4$dataQa;
|
|
22136
22181
|
|
|
22137
22182
|
var _useState = React.useState(false),
|
|
22138
22183
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -22145,6 +22190,9 @@ var Checkbox = function Checkbox(_ref4) {
|
|
|
22145
22190
|
}
|
|
22146
22191
|
};
|
|
22147
22192
|
|
|
22193
|
+
var titleId = title ? "checkboxlabel-".concat(name) : undefined;
|
|
22194
|
+
var ariaLabelledById = labelledById !== null && labelledById !== void 0 ? labelledById : titleId;
|
|
22195
|
+
var ariaLabel = ariaLabelledById ? undefined : name;
|
|
22148
22196
|
return /*#__PURE__*/React__default.createElement(Box, {
|
|
22149
22197
|
padding: "0",
|
|
22150
22198
|
tabIndex: "0",
|
|
@@ -22168,7 +22216,8 @@ var Checkbox = function Checkbox(_ref4) {
|
|
|
22168
22216
|
id: "checkbox-".concat(name),
|
|
22169
22217
|
disabled: disabled,
|
|
22170
22218
|
name: name,
|
|
22171
|
-
"aria-label":
|
|
22219
|
+
"aria-label": ariaLabel,
|
|
22220
|
+
"aria-labelledby": ariaLabelledById,
|
|
22172
22221
|
checked: checked,
|
|
22173
22222
|
onChange: onChange,
|
|
22174
22223
|
tabIndex: "-1",
|
|
@@ -22186,8 +22235,7 @@ var Checkbox = function Checkbox(_ref4) {
|
|
|
22186
22235
|
errorStyles: themeValues.errorStyles,
|
|
22187
22236
|
disabledStyles: themeValues.disabledStyles,
|
|
22188
22237
|
disabledCheckedStyles: themeValues.disabledCheckedStyles,
|
|
22189
|
-
focusedStyles: themeValues.focusedStyles
|
|
22190
|
-
"aria-required": isRequired
|
|
22238
|
+
focusedStyles: themeValues.focusedStyles
|
|
22191
22239
|
}, /*#__PURE__*/React__default.createElement(CheckboxIcon, {
|
|
22192
22240
|
viewBox: "0 0 24 24",
|
|
22193
22241
|
disabled: disabled,
|
|
@@ -22196,6 +22244,7 @@ var Checkbox = function Checkbox(_ref4) {
|
|
|
22196
22244
|
}, /*#__PURE__*/React__default.createElement("polyline", {
|
|
22197
22245
|
points: "20 6 9 17 4 12"
|
|
22198
22246
|
})))), title && /*#__PURE__*/React__default.createElement(Text$1, {
|
|
22247
|
+
id: titleId,
|
|
22199
22248
|
variant: "p",
|
|
22200
22249
|
weight: themeValues.textFontWeight,
|
|
22201
22250
|
color: themeValues.textColor,
|
|
@@ -22426,17 +22475,18 @@ var DropdownIcon = function DropdownIcon() {
|
|
|
22426
22475
|
};
|
|
22427
22476
|
|
|
22428
22477
|
var check = function (it) {
|
|
22429
|
-
return it && it.Math
|
|
22478
|
+
return it && it.Math === Math && it;
|
|
22430
22479
|
};
|
|
22431
22480
|
|
|
22432
22481
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
22433
22482
|
var global_1 =
|
|
22434
|
-
// eslint-disable-next-line es
|
|
22483
|
+
// eslint-disable-next-line es/no-global-this -- safe
|
|
22435
22484
|
check(typeof globalThis == 'object' && globalThis) ||
|
|
22436
22485
|
check(typeof window == 'object' && window) ||
|
|
22437
22486
|
// eslint-disable-next-line no-restricted-globals -- safe
|
|
22438
22487
|
check(typeof self == 'object' && self) ||
|
|
22439
22488
|
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
22489
|
+
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
22440
22490
|
// eslint-disable-next-line no-new-func -- fallback
|
|
22441
22491
|
(function () { return this; })() || Function('return this')();
|
|
22442
22492
|
|
|
@@ -22450,12 +22500,12 @@ var fails = function (exec) {
|
|
|
22450
22500
|
|
|
22451
22501
|
// Detect IE8's incomplete defineProperty implementation
|
|
22452
22502
|
var descriptors = !fails(function () {
|
|
22453
|
-
// eslint-disable-next-line es
|
|
22454
|
-
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1]
|
|
22503
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
22504
|
+
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
|
|
22455
22505
|
});
|
|
22456
22506
|
|
|
22457
22507
|
var functionBindNative = !fails(function () {
|
|
22458
|
-
// eslint-disable-next-line es
|
|
22508
|
+
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
22459
22509
|
var test = (function () { /* empty */ }).bind();
|
|
22460
22510
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
22461
22511
|
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
@@ -22468,7 +22518,7 @@ var functionCall = functionBindNative ? call.bind(call) : function () {
|
|
|
22468
22518
|
};
|
|
22469
22519
|
|
|
22470
22520
|
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
22471
|
-
// eslint-disable-next-line es
|
|
22521
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
22472
22522
|
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
22473
22523
|
|
|
22474
22524
|
// Nashorn ~ JDK8 bug
|
|
@@ -22495,14 +22545,11 @@ var createPropertyDescriptor = function (bitmap, value) {
|
|
|
22495
22545
|
};
|
|
22496
22546
|
|
|
22497
22547
|
var FunctionPrototype = Function.prototype;
|
|
22498
|
-
var bind$1 = FunctionPrototype.bind;
|
|
22499
22548
|
var call$1 = FunctionPrototype.call;
|
|
22500
|
-
var
|
|
22549
|
+
var uncurryThisWithBind = functionBindNative && FunctionPrototype.bind.bind(call$1, call$1);
|
|
22501
22550
|
|
|
22502
|
-
var functionUncurryThis = functionBindNative ? function (fn) {
|
|
22503
|
-
return
|
|
22504
|
-
} : function (fn) {
|
|
22505
|
-
return fn && function () {
|
|
22551
|
+
var functionUncurryThis = functionBindNative ? uncurryThisWithBind : function (fn) {
|
|
22552
|
+
return function () {
|
|
22506
22553
|
return call$1.apply(fn, arguments);
|
|
22507
22554
|
};
|
|
22508
22555
|
};
|
|
@@ -22523,15 +22570,21 @@ var indexedObject = fails(function () {
|
|
|
22523
22570
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
22524
22571
|
return !$Object('z').propertyIsEnumerable(0);
|
|
22525
22572
|
}) ? function (it) {
|
|
22526
|
-
return classofRaw(it)
|
|
22573
|
+
return classofRaw(it) === 'String' ? split(it, '') : $Object(it);
|
|
22527
22574
|
} : $Object;
|
|
22528
22575
|
|
|
22576
|
+
// we can't use just `it == null` since of `document.all` special case
|
|
22577
|
+
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
|
|
22578
|
+
var isNullOrUndefined = function (it) {
|
|
22579
|
+
return it === null || it === undefined;
|
|
22580
|
+
};
|
|
22581
|
+
|
|
22529
22582
|
var $TypeError = TypeError;
|
|
22530
22583
|
|
|
22531
22584
|
// `RequireObjectCoercible` abstract operation
|
|
22532
22585
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
22533
22586
|
var requireObjectCoercible = function (it) {
|
|
22534
|
-
if (it
|
|
22587
|
+
if (isNullOrUndefined(it)) throw new $TypeError("Can't call method on " + it);
|
|
22535
22588
|
return it;
|
|
22536
22589
|
};
|
|
22537
22590
|
|
|
@@ -22543,13 +22596,32 @@ var toIndexedObject = function (it) {
|
|
|
22543
22596
|
return indexedObject(requireObjectCoercible(it));
|
|
22544
22597
|
};
|
|
22545
22598
|
|
|
22599
|
+
var documentAll = typeof document == 'object' && document.all;
|
|
22600
|
+
|
|
22601
|
+
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
22602
|
+
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
22603
|
+
var IS_HTMLDDA = typeof documentAll == 'undefined' && documentAll !== undefined;
|
|
22604
|
+
|
|
22605
|
+
var documentAll_1 = {
|
|
22606
|
+
all: documentAll,
|
|
22607
|
+
IS_HTMLDDA: IS_HTMLDDA
|
|
22608
|
+
};
|
|
22609
|
+
|
|
22610
|
+
var documentAll$1 = documentAll_1.all;
|
|
22611
|
+
|
|
22546
22612
|
// `IsCallable` abstract operation
|
|
22547
22613
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
22548
|
-
var isCallable = function (argument) {
|
|
22614
|
+
var isCallable = documentAll_1.IS_HTMLDDA ? function (argument) {
|
|
22615
|
+
return typeof argument == 'function' || argument === documentAll$1;
|
|
22616
|
+
} : function (argument) {
|
|
22549
22617
|
return typeof argument == 'function';
|
|
22550
22618
|
};
|
|
22551
22619
|
|
|
22552
|
-
var
|
|
22620
|
+
var documentAll$2 = documentAll_1.all;
|
|
22621
|
+
|
|
22622
|
+
var isObject = documentAll_1.IS_HTMLDDA ? function (it) {
|
|
22623
|
+
return typeof it == 'object' ? it !== null : isCallable(it) || it === documentAll$2;
|
|
22624
|
+
} : function (it) {
|
|
22553
22625
|
return typeof it == 'object' ? it !== null : isCallable(it);
|
|
22554
22626
|
};
|
|
22555
22627
|
|
|
@@ -22563,7 +22635,7 @@ var getBuiltIn = function (namespace, method) {
|
|
|
22563
22635
|
|
|
22564
22636
|
var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
|
|
22565
22637
|
|
|
22566
|
-
var engineUserAgent =
|
|
22638
|
+
var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
|
|
22567
22639
|
|
|
22568
22640
|
var process$1 = global_1.process;
|
|
22569
22641
|
var Deno = global_1.Deno;
|
|
@@ -22590,24 +22662,29 @@ if (!version && engineUserAgent) {
|
|
|
22590
22662
|
|
|
22591
22663
|
var engineV8Version = version;
|
|
22592
22664
|
|
|
22593
|
-
/* eslint-disable es
|
|
22665
|
+
/* eslint-disable es/no-symbol -- required for testing */
|
|
22666
|
+
|
|
22667
|
+
|
|
22594
22668
|
|
|
22595
22669
|
|
|
22670
|
+
var $String = global_1.String;
|
|
22596
22671
|
|
|
22597
|
-
// eslint-disable-next-line es
|
|
22598
|
-
var
|
|
22599
|
-
var symbol = Symbol();
|
|
22672
|
+
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
22673
|
+
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails(function () {
|
|
22674
|
+
var symbol = Symbol('symbol detection');
|
|
22600
22675
|
// Chrome 38 Symbol has incorrect toString conversion
|
|
22601
22676
|
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
22602
|
-
|
|
22677
|
+
// nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
|
|
22678
|
+
// of course, fail.
|
|
22679
|
+
return !$String(symbol) || !(Object(symbol) instanceof Symbol) ||
|
|
22603
22680
|
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
22604
22681
|
!Symbol.sham && engineV8Version && engineV8Version < 41;
|
|
22605
22682
|
});
|
|
22606
22683
|
|
|
22607
|
-
/* eslint-disable es
|
|
22684
|
+
/* eslint-disable es/no-symbol -- required for testing */
|
|
22608
22685
|
|
|
22609
22686
|
|
|
22610
|
-
var useSymbolAsUid =
|
|
22687
|
+
var useSymbolAsUid = symbolConstructorDetection
|
|
22611
22688
|
&& !Symbol.sham
|
|
22612
22689
|
&& typeof Symbol.iterator == 'symbol';
|
|
22613
22690
|
|
|
@@ -22620,11 +22697,11 @@ var isSymbol = useSymbolAsUid ? function (it) {
|
|
|
22620
22697
|
return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, $Object$1(it));
|
|
22621
22698
|
};
|
|
22622
22699
|
|
|
22623
|
-
var $String = String;
|
|
22700
|
+
var $String$1 = String;
|
|
22624
22701
|
|
|
22625
22702
|
var tryToString = function (argument) {
|
|
22626
22703
|
try {
|
|
22627
|
-
return $String(argument);
|
|
22704
|
+
return $String$1(argument);
|
|
22628
22705
|
} catch (error) {
|
|
22629
22706
|
return 'Object';
|
|
22630
22707
|
}
|
|
@@ -22635,14 +22712,14 @@ var $TypeError$1 = TypeError;
|
|
|
22635
22712
|
// `Assert: IsCallable(argument) is true`
|
|
22636
22713
|
var aCallable = function (argument) {
|
|
22637
22714
|
if (isCallable(argument)) return argument;
|
|
22638
|
-
throw $TypeError$1(tryToString(argument) + ' is not a function');
|
|
22715
|
+
throw new $TypeError$1(tryToString(argument) + ' is not a function');
|
|
22639
22716
|
};
|
|
22640
22717
|
|
|
22641
22718
|
// `GetMethod` abstract operation
|
|
22642
22719
|
// https://tc39.es/ecma262/#sec-getmethod
|
|
22643
22720
|
var getMethod = function (V, P) {
|
|
22644
22721
|
var func = V[P];
|
|
22645
|
-
return func
|
|
22722
|
+
return isNullOrUndefined(func) ? undefined : aCallable(func);
|
|
22646
22723
|
};
|
|
22647
22724
|
|
|
22648
22725
|
var $TypeError$2 = TypeError;
|
|
@@ -22654,10 +22731,10 @@ var ordinaryToPrimitive = function (input, pref) {
|
|
|
22654
22731
|
if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
|
22655
22732
|
if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
|
|
22656
22733
|
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
|
22657
|
-
throw $TypeError$2("Can't convert object to primitive value");
|
|
22734
|
+
throw new $TypeError$2("Can't convert object to primitive value");
|
|
22658
22735
|
};
|
|
22659
22736
|
|
|
22660
|
-
// eslint-disable-next-line es
|
|
22737
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
22661
22738
|
var defineProperty = Object.defineProperty;
|
|
22662
22739
|
|
|
22663
22740
|
var defineGlobalProperty = function (key, value) {
|
|
@@ -22674,13 +22751,16 @@ var store = global_1[SHARED] || defineGlobalProperty(SHARED, {});
|
|
|
22674
22751
|
var sharedStore = store;
|
|
22675
22752
|
|
|
22676
22753
|
var shared = createCommonjsModule(function (module) {
|
|
22754
|
+
|
|
22755
|
+
|
|
22756
|
+
|
|
22677
22757
|
(module.exports = function (key, value) {
|
|
22678
22758
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
22679
22759
|
})('versions', []).push({
|
|
22680
|
-
version: '3.
|
|
22760
|
+
version: '3.33.3',
|
|
22681
22761
|
mode: 'global',
|
|
22682
|
-
copyright: '© 2014-
|
|
22683
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
22762
|
+
copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
|
|
22763
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.33.3/LICENSE',
|
|
22684
22764
|
source: 'https://github.com/zloirock/core-js'
|
|
22685
22765
|
});
|
|
22686
22766
|
});
|
|
@@ -22697,7 +22777,7 @@ var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
|
|
|
22697
22777
|
|
|
22698
22778
|
// `HasOwnProperty` abstract operation
|
|
22699
22779
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
22700
|
-
// eslint-disable-next-line es
|
|
22780
|
+
// eslint-disable-next-line es/no-object-hasown -- safe
|
|
22701
22781
|
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
22702
22782
|
return hasOwnProperty(toObject(it), key);
|
|
22703
22783
|
};
|
|
@@ -22710,21 +22790,15 @@ var uid = function (key) {
|
|
|
22710
22790
|
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$3(++id + postfix, 36);
|
|
22711
22791
|
};
|
|
22712
22792
|
|
|
22713
|
-
var WellKnownSymbolsStore = shared('wks');
|
|
22714
22793
|
var Symbol$1 = global_1.Symbol;
|
|
22715
|
-
var
|
|
22716
|
-
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
|
22794
|
+
var WellKnownSymbolsStore = shared('wks');
|
|
22795
|
+
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
|
22717
22796
|
|
|
22718
22797
|
var wellKnownSymbol = function (name) {
|
|
22719
|
-
if (!hasOwnProperty_1(WellKnownSymbolsStore, name)
|
|
22720
|
-
|
|
22721
|
-
|
|
22722
|
-
|
|
22723
|
-
} else if (useSymbolAsUid && symbolFor) {
|
|
22724
|
-
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
22725
|
-
} else {
|
|
22726
|
-
WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
|
|
22727
|
-
}
|
|
22798
|
+
if (!hasOwnProperty_1(WellKnownSymbolsStore, name)) {
|
|
22799
|
+
WellKnownSymbolsStore[name] = symbolConstructorDetection && hasOwnProperty_1(Symbol$1, name)
|
|
22800
|
+
? Symbol$1[name]
|
|
22801
|
+
: createWellKnownSymbol('Symbol.' + name);
|
|
22728
22802
|
} return WellKnownSymbolsStore[name];
|
|
22729
22803
|
};
|
|
22730
22804
|
|
|
@@ -22741,7 +22815,7 @@ var toPrimitive = function (input, pref) {
|
|
|
22741
22815
|
if (pref === undefined) pref = 'default';
|
|
22742
22816
|
result = functionCall(exoticToPrim, input, pref);
|
|
22743
22817
|
if (!isObject(result) || isSymbol(result)) return result;
|
|
22744
|
-
throw $TypeError$3("Can't convert object to primitive value");
|
|
22818
|
+
throw new $TypeError$3("Can't convert object to primitive value");
|
|
22745
22819
|
}
|
|
22746
22820
|
if (pref === undefined) pref = 'number';
|
|
22747
22821
|
return ordinaryToPrimitive(input, pref);
|
|
@@ -22764,13 +22838,13 @@ var documentCreateElement = function (it) {
|
|
|
22764
22838
|
|
|
22765
22839
|
// Thanks to IE8 for its funny defineProperty
|
|
22766
22840
|
var ie8DomDefine = !descriptors && !fails(function () {
|
|
22767
|
-
// eslint-disable-next-line es
|
|
22841
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
22768
22842
|
return Object.defineProperty(documentCreateElement('div'), 'a', {
|
|
22769
22843
|
get: function () { return 7; }
|
|
22770
|
-
}).a
|
|
22844
|
+
}).a !== 7;
|
|
22771
22845
|
});
|
|
22772
22846
|
|
|
22773
|
-
// eslint-disable-next-line es
|
|
22847
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
22774
22848
|
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
22775
22849
|
|
|
22776
22850
|
// `Object.getOwnPropertyDescriptor` method
|
|
@@ -22791,26 +22865,26 @@ var objectGetOwnPropertyDescriptor = {
|
|
|
22791
22865
|
// V8 ~ Chrome 36-
|
|
22792
22866
|
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
22793
22867
|
var v8PrototypeDefineBug = descriptors && fails(function () {
|
|
22794
|
-
// eslint-disable-next-line es
|
|
22868
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
22795
22869
|
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
22796
22870
|
value: 42,
|
|
22797
22871
|
writable: false
|
|
22798
|
-
}).prototype
|
|
22872
|
+
}).prototype !== 42;
|
|
22799
22873
|
});
|
|
22800
22874
|
|
|
22801
|
-
var $String$
|
|
22875
|
+
var $String$2 = String;
|
|
22802
22876
|
var $TypeError$4 = TypeError;
|
|
22803
22877
|
|
|
22804
22878
|
// `Assert: Type(argument) is Object`
|
|
22805
22879
|
var anObject = function (argument) {
|
|
22806
22880
|
if (isObject(argument)) return argument;
|
|
22807
|
-
throw $TypeError$4($String$
|
|
22881
|
+
throw new $TypeError$4($String$2(argument) + ' is not an object');
|
|
22808
22882
|
};
|
|
22809
22883
|
|
|
22810
22884
|
var $TypeError$5 = TypeError;
|
|
22811
|
-
// eslint-disable-next-line es
|
|
22885
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
22812
22886
|
var $defineProperty = Object.defineProperty;
|
|
22813
|
-
// eslint-disable-next-line es
|
|
22887
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
22814
22888
|
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
22815
22889
|
var ENUMERABLE = 'enumerable';
|
|
22816
22890
|
var CONFIGURABLE = 'configurable';
|
|
@@ -22840,7 +22914,7 @@ var f$2 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Att
|
|
|
22840
22914
|
if (ie8DomDefine) try {
|
|
22841
22915
|
return $defineProperty(O, P, Attributes);
|
|
22842
22916
|
} catch (error) { /* empty */ }
|
|
22843
|
-
if ('get' in Attributes || 'set' in Attributes) throw $TypeError$5('Accessors not supported');
|
|
22917
|
+
if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$5('Accessors not supported');
|
|
22844
22918
|
if ('value' in Attributes) O[P] = Attributes.value;
|
|
22845
22919
|
return O;
|
|
22846
22920
|
};
|
|
@@ -22857,7 +22931,7 @@ var createNonEnumerableProperty = descriptors ? function (object, key, value) {
|
|
|
22857
22931
|
};
|
|
22858
22932
|
|
|
22859
22933
|
var FunctionPrototype$1 = Function.prototype;
|
|
22860
|
-
// eslint-disable-next-line es
|
|
22934
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
22861
22935
|
var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
|
|
22862
22936
|
|
|
22863
22937
|
var EXISTS$1 = hasOwnProperty_1(FunctionPrototype$1, 'name');
|
|
@@ -22884,7 +22958,7 @@ var inspectSource = sharedStore.inspectSource;
|
|
|
22884
22958
|
|
|
22885
22959
|
var WeakMap$1 = global_1.WeakMap;
|
|
22886
22960
|
|
|
22887
|
-
var
|
|
22961
|
+
var weakMapBasicDetection = isCallable(WeakMap$1) && /native code/.test(String(WeakMap$1));
|
|
22888
22962
|
|
|
22889
22963
|
var keys$1 = shared('keys');
|
|
22890
22964
|
|
|
@@ -22907,27 +22981,29 @@ var getterFor = function (TYPE) {
|
|
|
22907
22981
|
return function (it) {
|
|
22908
22982
|
var state;
|
|
22909
22983
|
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
|
22910
|
-
throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
|
|
22984
|
+
throw new TypeError$1('Incompatible receiver, ' + TYPE + ' required');
|
|
22911
22985
|
} return state;
|
|
22912
22986
|
};
|
|
22913
22987
|
};
|
|
22914
22988
|
|
|
22915
|
-
if (
|
|
22989
|
+
if (weakMapBasicDetection || sharedStore.state) {
|
|
22916
22990
|
var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$2());
|
|
22917
|
-
|
|
22918
|
-
|
|
22919
|
-
|
|
22991
|
+
/* eslint-disable no-self-assign -- prototype methods protection */
|
|
22992
|
+
store$1.get = store$1.get;
|
|
22993
|
+
store$1.has = store$1.has;
|
|
22994
|
+
store$1.set = store$1.set;
|
|
22995
|
+
/* eslint-enable no-self-assign -- prototype methods protection */
|
|
22920
22996
|
set = function (it, metadata) {
|
|
22921
|
-
if (
|
|
22997
|
+
if (store$1.has(it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
22922
22998
|
metadata.facade = it;
|
|
22923
|
-
|
|
22999
|
+
store$1.set(it, metadata);
|
|
22924
23000
|
return metadata;
|
|
22925
23001
|
};
|
|
22926
23002
|
get = function (it) {
|
|
22927
|
-
return
|
|
23003
|
+
return store$1.get(it) || {};
|
|
22928
23004
|
};
|
|
22929
23005
|
has = function (it) {
|
|
22930
|
-
return
|
|
23006
|
+
return store$1.has(it);
|
|
22931
23007
|
};
|
|
22932
23008
|
} else {
|
|
22933
23009
|
var STATE = sharedKey('state');
|
|
@@ -22955,14 +23031,23 @@ var internalState = {
|
|
|
22955
23031
|
};
|
|
22956
23032
|
|
|
22957
23033
|
var makeBuiltIn_1 = createCommonjsModule(function (module) {
|
|
23034
|
+
|
|
23035
|
+
|
|
23036
|
+
|
|
23037
|
+
|
|
23038
|
+
|
|
22958
23039
|
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
|
22959
23040
|
|
|
22960
23041
|
|
|
22961
23042
|
|
|
22962
23043
|
var enforceInternalState = internalState.enforce;
|
|
22963
23044
|
var getInternalState = internalState.get;
|
|
22964
|
-
|
|
23045
|
+
var $String = String;
|
|
23046
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
22965
23047
|
var defineProperty = Object.defineProperty;
|
|
23048
|
+
var stringSlice = functionUncurryThis(''.slice);
|
|
23049
|
+
var replace = functionUncurryThis(''.replace);
|
|
23050
|
+
var join = functionUncurryThis([].join);
|
|
22966
23051
|
|
|
22967
23052
|
var CONFIGURABLE_LENGTH = descriptors && !fails(function () {
|
|
22968
23053
|
return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
@@ -22971,8 +23056,8 @@ var CONFIGURABLE_LENGTH = descriptors && !fails(function () {
|
|
|
22971
23056
|
var TEMPLATE = String(String).split('String');
|
|
22972
23057
|
|
|
22973
23058
|
var makeBuiltIn = module.exports = function (value, name, options) {
|
|
22974
|
-
if (String(name)
|
|
22975
|
-
name = '[' + String(name)
|
|
23059
|
+
if (stringSlice($String(name), 0, 7) === 'Symbol(') {
|
|
23060
|
+
name = '[' + replace($String(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
22976
23061
|
}
|
|
22977
23062
|
if (options && options.getter) name = 'get ' + name;
|
|
22978
23063
|
if (options && options.setter) name = 'set ' + name;
|
|
@@ -22991,7 +23076,7 @@ var makeBuiltIn = module.exports = function (value, name, options) {
|
|
|
22991
23076
|
} catch (error) { /* empty */ }
|
|
22992
23077
|
var state = enforceInternalState(value);
|
|
22993
23078
|
if (!hasOwnProperty_1(state, 'source')) {
|
|
22994
|
-
state.source =
|
|
23079
|
+
state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
|
|
22995
23080
|
} return value;
|
|
22996
23081
|
};
|
|
22997
23082
|
|
|
@@ -23030,7 +23115,7 @@ var floor = Math.floor;
|
|
|
23030
23115
|
|
|
23031
23116
|
// `Math.trunc` method
|
|
23032
23117
|
// https://tc39.es/ecma262/#sec-math.trunc
|
|
23033
|
-
// eslint-disable-next-line es
|
|
23118
|
+
// eslint-disable-next-line es/no-math-trunc -- safe
|
|
23034
23119
|
var mathTrunc = Math.trunc || function trunc(x) {
|
|
23035
23120
|
var n = +x;
|
|
23036
23121
|
return (n > 0 ? floor : ceil)(n);
|
|
@@ -23078,10 +23163,10 @@ var createMethod = function (IS_INCLUDES) {
|
|
|
23078
23163
|
var value;
|
|
23079
23164
|
// Array#includes uses SameValueZero equality algorithm
|
|
23080
23165
|
// eslint-disable-next-line no-self-compare -- NaN check
|
|
23081
|
-
if (IS_INCLUDES && el
|
|
23166
|
+
if (IS_INCLUDES && el !== el) while (length > index) {
|
|
23082
23167
|
value = O[index++];
|
|
23083
23168
|
// eslint-disable-next-line no-self-compare -- NaN check
|
|
23084
|
-
if (value
|
|
23169
|
+
if (value !== value) return true;
|
|
23085
23170
|
// Array#indexOf ignores holes, Array#includes - not
|
|
23086
23171
|
} else for (;length > index; index++) {
|
|
23087
23172
|
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
@@ -23131,7 +23216,7 @@ var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
|
|
|
23131
23216
|
|
|
23132
23217
|
// `Object.getOwnPropertyNames` method
|
|
23133
23218
|
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
23134
|
-
// eslint-disable-next-line es
|
|
23219
|
+
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
|
|
23135
23220
|
var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
23136
23221
|
return objectKeysInternal(O, hiddenKeys$1);
|
|
23137
23222
|
};
|
|
@@ -23140,7 +23225,7 @@ var objectGetOwnPropertyNames = {
|
|
|
23140
23225
|
f: f$3
|
|
23141
23226
|
};
|
|
23142
23227
|
|
|
23143
|
-
// eslint-disable-next-line es
|
|
23228
|
+
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
|
23144
23229
|
var f$4 = Object.getOwnPropertySymbols;
|
|
23145
23230
|
|
|
23146
23231
|
var objectGetOwnPropertySymbols = {
|
|
@@ -23172,8 +23257,8 @@ var replacement = /#|\.prototype\./;
|
|
|
23172
23257
|
|
|
23173
23258
|
var isForced = function (feature, detection) {
|
|
23174
23259
|
var value = data[normalize(feature)];
|
|
23175
|
-
return value
|
|
23176
|
-
: value
|
|
23260
|
+
return value === POLYFILL ? true
|
|
23261
|
+
: value === NATIVE ? false
|
|
23177
23262
|
: isCallable(detection) ? fails(detection)
|
|
23178
23263
|
: !!detection;
|
|
23179
23264
|
};
|
|
@@ -23253,7 +23338,7 @@ var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
|
|
|
23253
23338
|
var $Object$3 = Object;
|
|
23254
23339
|
|
|
23255
23340
|
// ES3 wrong here
|
|
23256
|
-
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }())
|
|
23341
|
+
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';
|
|
23257
23342
|
|
|
23258
23343
|
// fallback for IE11 Script Access Denied error
|
|
23259
23344
|
var tryGet = function (it, key) {
|
|
@@ -23271,25 +23356,25 @@ var classof = toStringTagSupport ? classofRaw : function (it) {
|
|
|
23271
23356
|
// builtinTag case
|
|
23272
23357
|
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
23273
23358
|
// ES3 arguments fallback
|
|
23274
|
-
: (result = classofRaw(O))
|
|
23359
|
+
: (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;
|
|
23275
23360
|
};
|
|
23276
23361
|
|
|
23277
|
-
var $String$
|
|
23362
|
+
var $String$3 = String;
|
|
23278
23363
|
|
|
23279
23364
|
var toString_1 = function (argument) {
|
|
23280
|
-
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
23281
|
-
return $String$
|
|
23365
|
+
if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
|
|
23366
|
+
return $String$3(argument);
|
|
23282
23367
|
};
|
|
23283
23368
|
|
|
23284
23369
|
var charAt = functionUncurryThis(''.charAt);
|
|
23285
23370
|
|
|
23286
23371
|
var FORCED = fails(function () {
|
|
23287
|
-
// eslint-disable-next-line es
|
|
23372
|
+
// eslint-disable-next-line es/no-array-string-prototype-at -- safe
|
|
23288
23373
|
return '𠮷'.at(-2) !== '\uD842';
|
|
23289
23374
|
});
|
|
23290
23375
|
|
|
23291
23376
|
// `String.prototype.at` method
|
|
23292
|
-
// https://
|
|
23377
|
+
// https://tc39.es/ecma262/#sec-string.prototype.at
|
|
23293
23378
|
_export({ target: 'String', proto: true, forced: FORCED }, {
|
|
23294
23379
|
at: function at(index) {
|
|
23295
23380
|
var S = toString_1(requireObjectCoercible(this));
|
|
@@ -23302,14 +23387,14 @@ _export({ target: 'String', proto: true, forced: FORCED }, {
|
|
|
23302
23387
|
|
|
23303
23388
|
// `Object.keys` method
|
|
23304
23389
|
// https://tc39.es/ecma262/#sec-object.keys
|
|
23305
|
-
// eslint-disable-next-line es
|
|
23390
|
+
// eslint-disable-next-line es/no-object-keys -- safe
|
|
23306
23391
|
var objectKeys = Object.keys || function keys(O) {
|
|
23307
23392
|
return objectKeysInternal(O, enumBugKeys);
|
|
23308
23393
|
};
|
|
23309
23394
|
|
|
23310
23395
|
// `Object.defineProperties` method
|
|
23311
23396
|
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
23312
|
-
// eslint-disable-next-line es
|
|
23397
|
+
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
23313
23398
|
var f$5 = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
23314
23399
|
anObject(O);
|
|
23315
23400
|
var props = toIndexedObject(Properties);
|
|
@@ -23398,7 +23483,7 @@ hiddenKeys[IE_PROTO] = true;
|
|
|
23398
23483
|
|
|
23399
23484
|
// `Object.create` method
|
|
23400
23485
|
// https://tc39.es/ecma262/#sec-object.create
|
|
23401
|
-
// eslint-disable-next-line es
|
|
23486
|
+
// eslint-disable-next-line es/no-object-create -- safe
|
|
23402
23487
|
var objectCreate = Object.create || function create(O, Properties) {
|
|
23403
23488
|
var result;
|
|
23404
23489
|
if (O !== null) {
|
|
@@ -23418,7 +23503,7 @@ var ArrayPrototype = Array.prototype;
|
|
|
23418
23503
|
|
|
23419
23504
|
// Array.prototype[@@unscopables]
|
|
23420
23505
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
23421
|
-
if (ArrayPrototype[UNSCOPABLES]
|
|
23506
|
+
if (ArrayPrototype[UNSCOPABLES] === undefined) {
|
|
23422
23507
|
defineProperty$1(ArrayPrototype, UNSCOPABLES, {
|
|
23423
23508
|
configurable: true,
|
|
23424
23509
|
value: objectCreate(null)
|
|
@@ -23431,7 +23516,7 @@ var addToUnscopables = function (key) {
|
|
|
23431
23516
|
};
|
|
23432
23517
|
|
|
23433
23518
|
// `Array.prototype.at` method
|
|
23434
|
-
// https://
|
|
23519
|
+
// https://tc39.es/ecma262/#sec-array.prototype.at
|
|
23435
23520
|
_export({ target: 'Array', proto: true }, {
|
|
23436
23521
|
at: function at(index) {
|
|
23437
23522
|
var O = toObject(this);
|
|
@@ -23444,13 +23529,19 @@ _export({ target: 'Array', proto: true }, {
|
|
|
23444
23529
|
|
|
23445
23530
|
addToUnscopables('at');
|
|
23446
23531
|
|
|
23447
|
-
// eslint-disable-next-line es
|
|
23448
|
-
var
|
|
23532
|
+
// eslint-disable-next-line es/no-typed-arrays -- safe
|
|
23533
|
+
var arrayBufferBasicDetection = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
|
|
23534
|
+
|
|
23535
|
+
var defineBuiltInAccessor = function (target, name, descriptor) {
|
|
23536
|
+
if (descriptor.get) makeBuiltIn_1(descriptor.get, name, { getter: true });
|
|
23537
|
+
if (descriptor.set) makeBuiltIn_1(descriptor.set, name, { setter: true });
|
|
23538
|
+
return objectDefineProperty.f(target, name, descriptor);
|
|
23539
|
+
};
|
|
23449
23540
|
|
|
23450
23541
|
var correctPrototypeGetter = !fails(function () {
|
|
23451
23542
|
function F() { /* empty */ }
|
|
23452
23543
|
F.prototype.constructor = null;
|
|
23453
|
-
// eslint-disable-next-line es
|
|
23544
|
+
// eslint-disable-next-line es/no-object-getprototypeof -- required for testing
|
|
23454
23545
|
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
23455
23546
|
});
|
|
23456
23547
|
|
|
@@ -23460,7 +23551,7 @@ var ObjectPrototype = $Object$4.prototype;
|
|
|
23460
23551
|
|
|
23461
23552
|
// `Object.getPrototypeOf` method
|
|
23462
23553
|
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
23463
|
-
// eslint-disable-next-line es
|
|
23554
|
+
// eslint-disable-next-line es/no-object-getprototypeof -- safe
|
|
23464
23555
|
var objectGetPrototypeOf = correctPrototypeGetter ? $Object$4.getPrototypeOf : function (O) {
|
|
23465
23556
|
var object = toObject(O);
|
|
23466
23557
|
if (hasOwnProperty_1(object, IE_PROTO$1)) return object[IE_PROTO$1];
|
|
@@ -23470,12 +23561,19 @@ var objectGetPrototypeOf = correctPrototypeGetter ? $Object$4.getPrototypeOf : f
|
|
|
23470
23561
|
} return object instanceof $Object$4 ? ObjectPrototype : null;
|
|
23471
23562
|
};
|
|
23472
23563
|
|
|
23473
|
-
var
|
|
23564
|
+
var functionUncurryThisAccessor = function (object, key, method) {
|
|
23565
|
+
try {
|
|
23566
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
23567
|
+
return functionUncurryThis(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));
|
|
23568
|
+
} catch (error) { /* empty */ }
|
|
23569
|
+
};
|
|
23570
|
+
|
|
23571
|
+
var $String$4 = String;
|
|
23474
23572
|
var $TypeError$6 = TypeError;
|
|
23475
23573
|
|
|
23476
23574
|
var aPossiblePrototype = function (argument) {
|
|
23477
23575
|
if (typeof argument == 'object' || isCallable(argument)) return argument;
|
|
23478
|
-
throw $TypeError$6("Can't set " + $String$
|
|
23576
|
+
throw new $TypeError$6("Can't set " + $String$4(argument) + ' as a prototype');
|
|
23479
23577
|
};
|
|
23480
23578
|
|
|
23481
23579
|
/* eslint-disable no-proto -- safe */
|
|
@@ -23486,14 +23584,13 @@ var aPossiblePrototype = function (argument) {
|
|
|
23486
23584
|
// `Object.setPrototypeOf` method
|
|
23487
23585
|
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
23488
23586
|
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
23489
|
-
// eslint-disable-next-line es
|
|
23587
|
+
// eslint-disable-next-line es/no-object-setprototypeof -- safe
|
|
23490
23588
|
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
23491
23589
|
var CORRECT_SETTER = false;
|
|
23492
23590
|
var test = {};
|
|
23493
23591
|
var setter;
|
|
23494
23592
|
try {
|
|
23495
|
-
|
|
23496
|
-
setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
23593
|
+
setter = functionUncurryThisAccessor(Object.prototype, '__proto__', 'set');
|
|
23497
23594
|
setter(test, []);
|
|
23498
23595
|
CORRECT_SETTER = test instanceof Array;
|
|
23499
23596
|
} catch (error) { /* empty */ }
|
|
@@ -23506,14 +23603,6 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
23506
23603
|
};
|
|
23507
23604
|
}() : undefined);
|
|
23508
23605
|
|
|
23509
|
-
var defineProperty$2 = objectDefineProperty.f;
|
|
23510
|
-
|
|
23511
|
-
|
|
23512
|
-
|
|
23513
|
-
|
|
23514
|
-
|
|
23515
|
-
|
|
23516
|
-
|
|
23517
23606
|
var enforceInternalState = internalState.enforce;
|
|
23518
23607
|
var getInternalState = internalState.get;
|
|
23519
23608
|
var Int8Array = global_1.Int8Array;
|
|
@@ -23529,7 +23618,7 @@ var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
|
|
|
23529
23618
|
var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
|
|
23530
23619
|
var TYPED_ARRAY_CONSTRUCTOR = 'TypedArrayConstructor';
|
|
23531
23620
|
// Fixing native typed arrays in Opera Presto crashes the browser, see #595
|
|
23532
|
-
var NATIVE_ARRAY_BUFFER_VIEWS =
|
|
23621
|
+
var NATIVE_ARRAY_BUFFER_VIEWS = arrayBufferBasicDetection && !!objectSetPrototypeOf && classof(global_1.opera) !== 'Opera';
|
|
23533
23622
|
var TYPED_ARRAY_TAG_REQUIRED = false;
|
|
23534
23623
|
var NAME, Constructor, Prototype;
|
|
23535
23624
|
|
|
@@ -23574,12 +23663,12 @@ var isTypedArray = function (it) {
|
|
|
23574
23663
|
|
|
23575
23664
|
var aTypedArray = function (it) {
|
|
23576
23665
|
if (isTypedArray(it)) return it;
|
|
23577
|
-
throw TypeError$2('Target is not a typed array');
|
|
23666
|
+
throw new TypeError$2('Target is not a typed array');
|
|
23578
23667
|
};
|
|
23579
23668
|
|
|
23580
23669
|
var aTypedArrayConstructor = function (C) {
|
|
23581
23670
|
if (isCallable(C) && (!objectSetPrototypeOf || objectIsPrototypeOf(TypedArray, C))) return C;
|
|
23582
|
-
throw TypeError$2(tryToString(C) + ' is not a typed array constructor');
|
|
23671
|
+
throw new TypeError$2(tryToString(C) + ' is not a typed array constructor');
|
|
23583
23672
|
};
|
|
23584
23673
|
|
|
23585
23674
|
var exportTypedArrayMethod = function (KEY, property, forced, options) {
|
|
@@ -23643,7 +23732,7 @@ for (NAME in BigIntArrayConstructorsList) {
|
|
|
23643
23732
|
if (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) {
|
|
23644
23733
|
// eslint-disable-next-line no-shadow -- safe
|
|
23645
23734
|
TypedArray = function TypedArray() {
|
|
23646
|
-
throw TypeError$2('Incorrect invocation');
|
|
23735
|
+
throw new TypeError$2('Incorrect invocation');
|
|
23647
23736
|
};
|
|
23648
23737
|
if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
|
|
23649
23738
|
if (global_1[NAME]) objectSetPrototypeOf(global_1[NAME], TypedArray);
|
|
@@ -23664,9 +23753,12 @@ if (NATIVE_ARRAY_BUFFER_VIEWS && objectGetPrototypeOf(Uint8ClampedArrayPrototype
|
|
|
23664
23753
|
|
|
23665
23754
|
if (descriptors && !hasOwnProperty_1(TypedArrayPrototype, TO_STRING_TAG$2)) {
|
|
23666
23755
|
TYPED_ARRAY_TAG_REQUIRED = true;
|
|
23667
|
-
|
|
23668
|
-
|
|
23669
|
-
|
|
23756
|
+
defineBuiltInAccessor(TypedArrayPrototype, TO_STRING_TAG$2, {
|
|
23757
|
+
configurable: true,
|
|
23758
|
+
get: function () {
|
|
23759
|
+
return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;
|
|
23760
|
+
}
|
|
23761
|
+
});
|
|
23670
23762
|
for (NAME in TypedArrayConstructorsList) if (global_1[NAME]) {
|
|
23671
23763
|
createNonEnumerableProperty(global_1[NAME], TYPED_ARRAY_TAG, NAME);
|
|
23672
23764
|
}
|
|
@@ -23690,7 +23782,7 @@ var aTypedArray$1 = arrayBufferViewCore.aTypedArray;
|
|
|
23690
23782
|
var exportTypedArrayMethod$1 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
23691
23783
|
|
|
23692
23784
|
// `%TypedArray%.prototype.at` method
|
|
23693
|
-
// https://
|
|
23785
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.at
|
|
23694
23786
|
exportTypedArrayMethod$1('at', function at(index) {
|
|
23695
23787
|
var O = aTypedArray$1(this);
|
|
23696
23788
|
var len = lengthOfArrayLike(O);
|
|
@@ -23701,9 +23793,11 @@ exportTypedArrayMethod$1('at', function at(index) {
|
|
|
23701
23793
|
|
|
23702
23794
|
var selectedColor = "".concat(MATISSE_BLUE);
|
|
23703
23795
|
var hoverColor$3 = "".concat(HOVER_LIGHT_BLUE);
|
|
23796
|
+
var focusColor = "".concat(MATISSE_BLUE_DARK);
|
|
23704
23797
|
var fallbackValues$f = {
|
|
23705
23798
|
selectedColor: selectedColor,
|
|
23706
|
-
hoverColor: hoverColor$3
|
|
23799
|
+
hoverColor: hoverColor$3,
|
|
23800
|
+
focusColor: focusColor
|
|
23707
23801
|
};
|
|
23708
23802
|
|
|
23709
23803
|
var IconWrapper = styled__default.div.withConfig({
|
|
@@ -23726,7 +23820,7 @@ var DropdownContentWrapper = styled__default.div.withConfig({
|
|
|
23726
23820
|
var DropdownItemWrapper = styled__default.li.withConfig({
|
|
23727
23821
|
displayName: "Dropdown__DropdownItemWrapper",
|
|
23728
23822
|
componentId: "sc-pn6m0h-2"
|
|
23729
|
-
})(["
|
|
23823
|
+
})(["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) {
|
|
23730
23824
|
var selected = _ref4.selected,
|
|
23731
23825
|
themeValues = _ref4.themeValues;
|
|
23732
23826
|
return selected ? themeValues.selectedColor : WHITE;
|
|
@@ -23734,48 +23828,71 @@ var DropdownItemWrapper = styled__default.li.withConfig({
|
|
|
23734
23828
|
var disabled = _ref5.disabled;
|
|
23735
23829
|
return disabled ? "default" : "pointer";
|
|
23736
23830
|
}, function (_ref6) {
|
|
23737
|
-
var
|
|
23738
|
-
|
|
23831
|
+
var disabled = _ref6.disabled,
|
|
23832
|
+
selected = _ref6.selected,
|
|
23739
23833
|
themeValues = _ref6.themeValues;
|
|
23740
|
-
return selected ? themeValues.
|
|
23834
|
+
return selected ? themeValues.focusColor : disabled ? WHITE : themeValues.hoverColor;
|
|
23741
23835
|
}, function (_ref7) {
|
|
23742
23836
|
var selected = _ref7.selected,
|
|
23743
23837
|
disabled = _ref7.disabled,
|
|
23744
23838
|
themeValues = _ref7.themeValues;
|
|
23745
|
-
return selected ? themeValues.
|
|
23839
|
+
return selected ? themeValues.focusColor : disabled ? WHITE : themeValues.hoverColor;
|
|
23840
|
+
}, function (_ref8) {
|
|
23841
|
+
var selected = _ref8.selected,
|
|
23842
|
+
disabled = _ref8.disabled,
|
|
23843
|
+
themeValues = _ref8.themeValues;
|
|
23844
|
+
return selected ? themeValues.focusColor : disabled ? WHITE : themeValues.hoverColor;
|
|
23845
|
+
}, function (_ref9) {
|
|
23846
|
+
var themeValues = _ref9.themeValues;
|
|
23847
|
+
return themeValues.selectedColor;
|
|
23848
|
+
}, function (_ref10) {
|
|
23849
|
+
var selected = _ref10.selected,
|
|
23850
|
+
disabled = _ref10.disabled,
|
|
23851
|
+
themeValues = _ref10.themeValues;
|
|
23852
|
+
return selected ? themeValues.focusColor : disabled ? WHITE : themeValues.hoverColor;
|
|
23853
|
+
});
|
|
23854
|
+
var DropdownItemBorder = styled__default.div.withConfig({
|
|
23855
|
+
displayName: "Dropdown__DropdownItemBorder",
|
|
23856
|
+
componentId: "sc-pn6m0h-3"
|
|
23857
|
+
})(["background:", ";border-color:", ";border-width:2px;border-style:solid;padding:12px;"], function (_ref11) {
|
|
23858
|
+
var selected = _ref11.selected,
|
|
23859
|
+
themeValues = _ref11.themeValues;
|
|
23860
|
+
return selected ? themeValues.selectedColor : WHITE;
|
|
23861
|
+
}, function (_ref12) {
|
|
23862
|
+
var selected = _ref12.selected,
|
|
23863
|
+
themeValues = _ref12.themeValues;
|
|
23864
|
+
return selected ? themeValues.selectedColor : WHITE;
|
|
23746
23865
|
});
|
|
23747
23866
|
|
|
23748
|
-
var Dropdown = function Dropdown(
|
|
23749
|
-
var placeholder =
|
|
23750
|
-
options =
|
|
23751
|
-
value =
|
|
23752
|
-
isOpen =
|
|
23753
|
-
isError =
|
|
23754
|
-
onSelect =
|
|
23755
|
-
|
|
23756
|
-
disabledValues =
|
|
23757
|
-
|
|
23758
|
-
_onClick =
|
|
23759
|
-
themeValues =
|
|
23760
|
-
maxHeight =
|
|
23761
|
-
|
|
23762
|
-
widthFitOptions =
|
|
23763
|
-
disabled =
|
|
23764
|
-
|
|
23765
|
-
hasTitles =
|
|
23766
|
-
|
|
23767
|
-
autoEraseTypeAhead =
|
|
23768
|
-
ariaLabelledby =
|
|
23769
|
-
ariaDescribedby =
|
|
23770
|
-
autocompleteValue =
|
|
23771
|
-
|
|
23772
|
-
smoothScroll =
|
|
23773
|
-
|
|
23774
|
-
ariaInvalid =
|
|
23775
|
-
|
|
23776
|
-
isRequired =
|
|
23777
|
-
|
|
23778
|
-
var required = options.required || isRequired;
|
|
23867
|
+
var Dropdown = function Dropdown(_ref13) {
|
|
23868
|
+
var placeholder = _ref13.placeholder,
|
|
23869
|
+
options = _ref13.options,
|
|
23870
|
+
value = _ref13.value,
|
|
23871
|
+
isOpen = _ref13.isOpen,
|
|
23872
|
+
isError = _ref13.isError,
|
|
23873
|
+
onSelect = _ref13.onSelect,
|
|
23874
|
+
_ref13$disabledValues = _ref13.disabledValues,
|
|
23875
|
+
disabledValues = _ref13$disabledValues === void 0 ? [] : _ref13$disabledValues,
|
|
23876
|
+
_ref13$onClick = _ref13.onClick,
|
|
23877
|
+
_onClick = _ref13$onClick === void 0 ? noop : _ref13$onClick,
|
|
23878
|
+
themeValues = _ref13.themeValues,
|
|
23879
|
+
maxHeight = _ref13.maxHeight,
|
|
23880
|
+
_ref13$widthFitOption = _ref13.widthFitOptions,
|
|
23881
|
+
widthFitOptions = _ref13$widthFitOption === void 0 ? false : _ref13$widthFitOption,
|
|
23882
|
+
disabled = _ref13.disabled,
|
|
23883
|
+
_ref13$hasTitles = _ref13.hasTitles,
|
|
23884
|
+
hasTitles = _ref13$hasTitles === void 0 ? false : _ref13$hasTitles,
|
|
23885
|
+
_ref13$autoEraseTypeA = _ref13.autoEraseTypeAhead,
|
|
23886
|
+
autoEraseTypeAhead = _ref13$autoEraseTypeA === void 0 ? true : _ref13$autoEraseTypeA,
|
|
23887
|
+
ariaLabelledby = _ref13.ariaLabelledby,
|
|
23888
|
+
ariaDescribedby = _ref13.ariaDescribedby,
|
|
23889
|
+
autocompleteValue = _ref13.autocompleteValue,
|
|
23890
|
+
_ref13$smoothScroll = _ref13.smoothScroll,
|
|
23891
|
+
smoothScroll = _ref13$smoothScroll === void 0 ? true : _ref13$smoothScroll,
|
|
23892
|
+
_ref13$ariaInvalid = _ref13.ariaInvalid,
|
|
23893
|
+
ariaInvalid = _ref13$ariaInvalid === void 0 ? false : _ref13$ariaInvalid,
|
|
23894
|
+
_ref13$isRequired = _ref13.isRequired,
|
|
23895
|
+
isRequired = _ref13$isRequired === void 0 ? false : _ref13$isRequired;
|
|
23779
23896
|
|
|
23780
23897
|
var _useState = React.useState(""),
|
|
23781
23898
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -23968,11 +24085,13 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
23968
24085
|
clearTimeout(timer);
|
|
23969
24086
|
setTimer(setTimeout(function () {
|
|
23970
24087
|
return setInputValue("");
|
|
23971
|
-
},
|
|
24088
|
+
}, 20000));
|
|
23972
24089
|
}
|
|
23973
24090
|
|
|
23974
24091
|
setFilteredOptions(options.filter(function (option) {
|
|
23975
|
-
|
|
24092
|
+
var _option$value, _option$value$toLower, _option$text, _option$text$toLowerC;
|
|
24093
|
+
|
|
24094
|
+
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;
|
|
23976
24095
|
}));
|
|
23977
24096
|
}, [inputValue]);
|
|
23978
24097
|
React.useEffect(function () {
|
|
@@ -24024,8 +24143,7 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
24024
24143
|
"aria-labelledby": ariaLabelledby,
|
|
24025
24144
|
"aria-describedby": ariaDescribedby,
|
|
24026
24145
|
"aria-expanded": isOpen,
|
|
24027
|
-
"aria-required": required,
|
|
24028
|
-
required: required,
|
|
24146
|
+
"aria-required": options.required,
|
|
24029
24147
|
"aria-invalid": ariaInvalid,
|
|
24030
24148
|
background: isOpen ? themeValues.hoverColor : WHITE,
|
|
24031
24149
|
borderRadius: "2px",
|
|
@@ -24047,14 +24165,14 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
24047
24165
|
},
|
|
24048
24166
|
padding: "12px",
|
|
24049
24167
|
placeholder: getSelection(),
|
|
24168
|
+
required: options.required || isRequired,
|
|
24050
24169
|
role: "combobox",
|
|
24051
24170
|
themeValues: themeValues,
|
|
24052
24171
|
title: hasTitles ? getSelection() : null,
|
|
24053
24172
|
type: "text",
|
|
24054
24173
|
tabIndex: 0,
|
|
24055
24174
|
value: inputValue,
|
|
24056
|
-
width: "100%"
|
|
24057
|
-
disabled: disabledValues.includes(inputValue)
|
|
24175
|
+
width: "100%"
|
|
24058
24176
|
}), /*#__PURE__*/React__default.createElement(IconWrapper, {
|
|
24059
24177
|
open: isOpen,
|
|
24060
24178
|
onClick: _onClick
|
|
@@ -24065,8 +24183,7 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
24065
24183
|
widthFitOptions: widthFitOptions,
|
|
24066
24184
|
tabIndex: 0,
|
|
24067
24185
|
role: "listbox",
|
|
24068
|
-
id: "".concat(ariaLabelledby, "_listbox")
|
|
24069
|
-
required: required
|
|
24186
|
+
id: "".concat(ariaLabelledby, "_listbox")
|
|
24070
24187
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
24071
24188
|
childGap: "0",
|
|
24072
24189
|
as: "ul"
|
|
@@ -24099,11 +24216,15 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
24099
24216
|
onFocus: function onFocus() {
|
|
24100
24217
|
return setFocusedRef(optionRefs.current[i]);
|
|
24101
24218
|
}
|
|
24219
|
+
}, /*#__PURE__*/React__default.createElement(DropdownItemBorder, {
|
|
24220
|
+
disabled: disabledValues.includes(choice.value),
|
|
24221
|
+
selected: choice.value === value,
|
|
24222
|
+
themeValues: themeValues
|
|
24102
24223
|
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
24103
24224
|
variant: "p",
|
|
24104
24225
|
color: choice.value === value ? WHITE : disabledValues.includes(choice.value) ? STORM_GREY : MINESHAFT_GREY,
|
|
24105
|
-
extraStyles: "padding-left: 16px;\n
|
|
24106
|
-
}, choice.text));
|
|
24226
|
+
extraStyles: "padding-left: 16px;\n cursor: ".concat(disabledValues.includes(choice.value) ? "default" : "pointer", ";\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;")
|
|
24227
|
+
}, choice.text)));
|
|
24107
24228
|
}))) : /*#__PURE__*/React__default.createElement(React.Fragment, null)));
|
|
24108
24229
|
};
|
|
24109
24230
|
|
|
@@ -24222,17 +24343,6 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24222
24343
|
setOpen = _useState2[1];
|
|
24223
24344
|
|
|
24224
24345
|
var dropdownRef = React.useRef(null);
|
|
24225
|
-
var required = (options === null || options === void 0 ? void 0 : options.required) || isRequired;
|
|
24226
|
-
var labelId = React.useMemo(function () {
|
|
24227
|
-
return function (labelTextWhenNoError) {
|
|
24228
|
-
return createIdFromString(labelTextWhenNoError);
|
|
24229
|
-
};
|
|
24230
|
-
}, [labelTextWhenNoError]);
|
|
24231
|
-
var descriptionId = React.useMemo(function () {
|
|
24232
|
-
return function (field, labelTextWhenNoError) {
|
|
24233
|
-
return field.hasErrors && field.dirty ? labelId(labelTextWhenNoError) + "error-message" : "";
|
|
24234
|
-
};
|
|
24235
|
-
}, [field, labelTextWhenNoError]);
|
|
24236
24346
|
|
|
24237
24347
|
var handleClickAway = function handleClickAway(event) {
|
|
24238
24348
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
@@ -24248,8 +24358,8 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24248
24358
|
});
|
|
24249
24359
|
return /*#__PURE__*/React__default.createElement(SelectContainer, {
|
|
24250
24360
|
ref: dropdownRef,
|
|
24251
|
-
"aria-role": "group",
|
|
24252
24361
|
disabled: disabled,
|
|
24362
|
+
"aria-disabled": disabled,
|
|
24253
24363
|
"data-qa": dataQa
|
|
24254
24364
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
24255
24365
|
padding: "0",
|
|
@@ -24263,10 +24373,10 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24263
24373
|
color: themeValues.labelColor,
|
|
24264
24374
|
weight: themeValues.fontWeight,
|
|
24265
24375
|
extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
|
|
24266
|
-
id:
|
|
24376
|
+
id: createIdFromString(labelTextWhenNoError)
|
|
24267
24377
|
}, labelTextWhenNoError))), /*#__PURE__*/React__default.createElement(Dropdown$1, {
|
|
24268
|
-
ariaLabelledby:
|
|
24269
|
-
ariaDescribedby:
|
|
24378
|
+
ariaLabelledby: createIdFromString(labelTextWhenNoError),
|
|
24379
|
+
ariaDescribedby: createIdFromString(labelTextWhenNoError, "error message"),
|
|
24270
24380
|
maxHeight: dropdownMaxHeight,
|
|
24271
24381
|
widthFitOptions: widthFitOptions,
|
|
24272
24382
|
hasTitles: hasTitles,
|
|
@@ -24288,11 +24398,11 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24288
24398
|
disabled: disabled,
|
|
24289
24399
|
autocompleteValue: autocompleteValue,
|
|
24290
24400
|
smoothScroll: smoothScroll,
|
|
24291
|
-
isRequired:
|
|
24401
|
+
isRequired: isRequired
|
|
24292
24402
|
}), /*#__PURE__*/React__default.createElement(Stack, {
|
|
24293
24403
|
direction: "row",
|
|
24294
24404
|
justify: "space-between"
|
|
24295
|
-
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
24405
|
+
}, field.hasErrors && field.dirty || field.hasErrors && showErrors ? /*#__PURE__*/React__default.createElement(Text$1, {
|
|
24296
24406
|
color: ERROR_COLOR,
|
|
24297
24407
|
variant: "pXS",
|
|
24298
24408
|
weight: themeValues.fontWeight,
|
|
@@ -24301,7 +24411,9 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24301
24411
|
"aria-live": "polite",
|
|
24302
24412
|
"aria-atomic": true,
|
|
24303
24413
|
"data-qa": createIdFromString(labelTextWhenNoError, "error message")
|
|
24304
|
-
},
|
|
24414
|
+
}, errorMessages[field.errors[0]]) : /*#__PURE__*/React__default.createElement(Text$1, {
|
|
24415
|
+
extraStyles: "height: ".concat(themeValues.lineHeight, ";")
|
|
24416
|
+
})));
|
|
24305
24417
|
};
|
|
24306
24418
|
|
|
24307
24419
|
var FormSelect$1 = themeComponent(FormSelect, "FormSelect", fallbackValues$g, "default");
|
|
@@ -25057,10 +25169,10 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
25057
25169
|
fieldActions = _ref.fieldActions,
|
|
25058
25170
|
showErrors = _ref.showErrors,
|
|
25059
25171
|
onChange = _ref.onChange,
|
|
25060
|
-
_ref$dataQa = _ref.dataQa,
|
|
25061
|
-
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
|
|
25062
25172
|
_ref$isRequired = _ref.isRequired,
|
|
25063
|
-
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired
|
|
25173
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
|
|
25174
|
+
_ref$dataQa = _ref.dataQa,
|
|
25175
|
+
dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa;
|
|
25064
25176
|
return /*#__PURE__*/React__default.createElement(FormSelect$1, {
|
|
25065
25177
|
options: options,
|
|
25066
25178
|
field: field,
|
|
@@ -25235,6 +25347,346 @@ var DisplayBox = function DisplayBox(_ref) {
|
|
|
25235
25347
|
|
|
25236
25348
|
var DisplayBox$1 = themeComponent(DisplayBox, "DisplayBox", fallbackValues$i);
|
|
25237
25349
|
|
|
25350
|
+
/*
|
|
25351
|
+
Hook that assigns a click event listener to the main document element
|
|
25352
|
+
Returns a ref to attach to another element (like an icon/button that triggers a popover)
|
|
25353
|
+
If a click event gets captured by the document and the assigned element isn't the target
|
|
25354
|
+
hook will run whatever handler is passed (eg a function that closes a popover)
|
|
25355
|
+
|
|
25356
|
+
See popover component for implementation
|
|
25357
|
+
|
|
25358
|
+
*/
|
|
25359
|
+
|
|
25360
|
+
var useOutsideClickHook = function useOutsideClickHook(handler) {
|
|
25361
|
+
var ref = React.useRef();
|
|
25362
|
+
React.useEffect(function () {
|
|
25363
|
+
}, [ref]);
|
|
25364
|
+
return ref;
|
|
25365
|
+
};
|
|
25366
|
+
|
|
25367
|
+
/*
|
|
25368
|
+
Hook that takes an ID selector for an element on the screen
|
|
25369
|
+
And optionally values for top position, left position, smooth behavior
|
|
25370
|
+
Finds element on screen and scrolls it to the provided coordinates
|
|
25371
|
+
|
|
25372
|
+
(string, number, number, string, number) => undefined;
|
|
25373
|
+
*/
|
|
25374
|
+
var useScrollTo = function useScrollTo(id) {
|
|
25375
|
+
var top = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
25376
|
+
var left = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
25377
|
+
var behavior = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "auto";
|
|
25378
|
+
var delay = arguments.length > 4 ? arguments[4] : undefined;
|
|
25379
|
+
var scrollItem;
|
|
25380
|
+
|
|
25381
|
+
if (delay) {
|
|
25382
|
+
setTimeout(function () {
|
|
25383
|
+
var _scrollItem;
|
|
25384
|
+
|
|
25385
|
+
scrollItem = document.getElementById(id);
|
|
25386
|
+
(_scrollItem = scrollItem) === null || _scrollItem === void 0 ? void 0 : _scrollItem.scrollTo({
|
|
25387
|
+
top: top,
|
|
25388
|
+
left: left,
|
|
25389
|
+
behavior: behavior
|
|
25390
|
+
});
|
|
25391
|
+
}, delay);
|
|
25392
|
+
} else {
|
|
25393
|
+
var _scrollItem2;
|
|
25394
|
+
|
|
25395
|
+
scrollItem = document.getElementById(id);
|
|
25396
|
+
(_scrollItem2 = scrollItem) === null || _scrollItem2 === void 0 ? void 0 : _scrollItem2.scrollTo({
|
|
25397
|
+
top: top,
|
|
25398
|
+
left: left,
|
|
25399
|
+
behavior: behavior
|
|
25400
|
+
});
|
|
25401
|
+
}
|
|
25402
|
+
};
|
|
25403
|
+
|
|
25404
|
+
var initialToastState = {
|
|
25405
|
+
isOpen: false,
|
|
25406
|
+
variant: "",
|
|
25407
|
+
message: ""
|
|
25408
|
+
};
|
|
25409
|
+
|
|
25410
|
+
var useToastNotification = function useToastNotification() {
|
|
25411
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
25412
|
+
_ref$timeout = _ref.timeout,
|
|
25413
|
+
timeout = _ref$timeout === void 0 ? 5000 : _ref$timeout;
|
|
25414
|
+
|
|
25415
|
+
var _useState = React.useState(initialToastState),
|
|
25416
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
25417
|
+
toastState = _useState2[0],
|
|
25418
|
+
setToastState = _useState2[1];
|
|
25419
|
+
|
|
25420
|
+
React.useEffect(function () {
|
|
25421
|
+
if (toastState.isOpen) {
|
|
25422
|
+
setTimeout(function () {
|
|
25423
|
+
setToastState(initialToastState);
|
|
25424
|
+
}, timeout);
|
|
25425
|
+
}
|
|
25426
|
+
}, [timeout, toastState.isOpen]);
|
|
25427
|
+
|
|
25428
|
+
var showToast = function showToast(_ref2) {
|
|
25429
|
+
var message = _ref2.message,
|
|
25430
|
+
variant = _ref2.variant;
|
|
25431
|
+
return setToastState({
|
|
25432
|
+
isOpen: true,
|
|
25433
|
+
variant: variant,
|
|
25434
|
+
message: message
|
|
25435
|
+
});
|
|
25436
|
+
};
|
|
25437
|
+
|
|
25438
|
+
var hideToast = function hideToast() {
|
|
25439
|
+
return setToastState(initialToastState);
|
|
25440
|
+
};
|
|
25441
|
+
|
|
25442
|
+
return {
|
|
25443
|
+
isToastOpen: toastState.isOpen,
|
|
25444
|
+
toastVariant: toastState.variant,
|
|
25445
|
+
toastMessage: toastState.message,
|
|
25446
|
+
showToast: showToast,
|
|
25447
|
+
hideToast: hideToast
|
|
25448
|
+
};
|
|
25449
|
+
};
|
|
25450
|
+
|
|
25451
|
+
|
|
25452
|
+
|
|
25453
|
+
var index$4 = /*#__PURE__*/Object.freeze({
|
|
25454
|
+
__proto__: null,
|
|
25455
|
+
useOutsideClick: useOutsideClickHook,
|
|
25456
|
+
useScrollTo: useScrollTo,
|
|
25457
|
+
useToastNotification: useToastNotification
|
|
25458
|
+
});
|
|
25459
|
+
|
|
25460
|
+
var hoverColor$4 = "#116285";
|
|
25461
|
+
var activeColor$4 = "#0E506D";
|
|
25462
|
+
var popoverTriggerColor = "#15749D";
|
|
25463
|
+
var fallbackValues$j = {
|
|
25464
|
+
hoverColor: hoverColor$4,
|
|
25465
|
+
activeColor: activeColor$4,
|
|
25466
|
+
popoverTriggerColor: popoverTriggerColor
|
|
25467
|
+
};
|
|
25468
|
+
|
|
25469
|
+
var arrowBorder = function arrowBorder(borderColor, direction) {
|
|
25470
|
+
var width = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "8px";
|
|
25471
|
+
var angle = "".concat(width, " solid transparent");
|
|
25472
|
+
var straight = "".concat(width, " solid ").concat(borderColor);
|
|
25473
|
+
|
|
25474
|
+
if (direction == "down") {
|
|
25475
|
+
return "border-left: ".concat(angle, "; border-right: ").concat(angle, "; border-top: ").concat(straight);
|
|
25476
|
+
} else if (direction == "up") {
|
|
25477
|
+
return "border-left: ".concat(angle, "; border-right: ").concat(angle, "; border-bottom: ").concat(straight);
|
|
25478
|
+
} else if (direction == "left") {
|
|
25479
|
+
return "border-top: ".concat(angle, "; border-bottom: ").concat(angle, "; border-right: ").concat(straight);
|
|
25480
|
+
} else if (direction == "right") {
|
|
25481
|
+
return "border-top: ".concat(angle, "; border-bottom: ").concat(angle, "; border-left: ").concat(straight);
|
|
25482
|
+
}
|
|
25483
|
+
};
|
|
25484
|
+
|
|
25485
|
+
var Popover = function Popover(_ref) {
|
|
25486
|
+
var themeValues = _ref.themeValues,
|
|
25487
|
+
_ref$triggerText = _ref.triggerText,
|
|
25488
|
+
triggerText = _ref$triggerText === void 0 ? "" : _ref$triggerText,
|
|
25489
|
+
_ref$content = _ref.content,
|
|
25490
|
+
content = _ref$content === void 0 ? "" : _ref$content,
|
|
25491
|
+
_ref$hasIcon = _ref.hasIcon,
|
|
25492
|
+
hasIcon = _ref$hasIcon === void 0 ? false : _ref$hasIcon,
|
|
25493
|
+
Icon = _ref.icon,
|
|
25494
|
+
_ref$iconHelpText = _ref.iconHelpText,
|
|
25495
|
+
iconHelpText = _ref$iconHelpText === void 0 ? "" : _ref$iconHelpText,
|
|
25496
|
+
_ref$popoverID = _ref.popoverID,
|
|
25497
|
+
popoverID = _ref$popoverID === void 0 ? 0 : _ref$popoverID,
|
|
25498
|
+
_ref$popoverFocus = _ref.popoverFocus,
|
|
25499
|
+
popoverFocus = _ref$popoverFocus === void 0 ? false : _ref$popoverFocus,
|
|
25500
|
+
extraStyles = _ref.extraStyles,
|
|
25501
|
+
textExtraStyles = _ref.textExtraStyles,
|
|
25502
|
+
_ref$minWidth = _ref.minWidth,
|
|
25503
|
+
minWidth = _ref$minWidth === void 0 ? "250px" : _ref$minWidth,
|
|
25504
|
+
_ref$maxWidth = _ref.maxWidth,
|
|
25505
|
+
maxWidth = _ref$maxWidth === void 0 ? "300px" : _ref$maxWidth,
|
|
25506
|
+
_ref$height = _ref.height,
|
|
25507
|
+
height = _ref$height === void 0 ? "auto" : _ref$height,
|
|
25508
|
+
position = _ref.position,
|
|
25509
|
+
arrowPosition = _ref.arrowPosition,
|
|
25510
|
+
_ref$arrowDirection = _ref.arrowDirection,
|
|
25511
|
+
arrowDirection = _ref$arrowDirection === void 0 ? "down" : _ref$arrowDirection,
|
|
25512
|
+
_ref$transform = _ref.transform,
|
|
25513
|
+
transform = _ref$transform === void 0 ? "none" : _ref$transform,
|
|
25514
|
+
buttonExtraStyles = _ref.buttonExtraStyles,
|
|
25515
|
+
_ref$backgroundColor = _ref.backgroundColor,
|
|
25516
|
+
backgroundColor = _ref$backgroundColor === void 0 ? "white" : _ref$backgroundColor,
|
|
25517
|
+
_ref$borderColor = _ref.borderColor,
|
|
25518
|
+
borderColor = _ref$borderColor === void 0 ? "rgba(255, 255, 255, 0.85)" : _ref$borderColor,
|
|
25519
|
+
popoverExtraStyles = _ref.popoverExtraStyles;
|
|
25520
|
+
var hoverColor = themeValues.hoverColor,
|
|
25521
|
+
activeColor = themeValues.activeColor,
|
|
25522
|
+
popoverTriggerColor = themeValues.popoverTriggerColor;
|
|
25523
|
+
|
|
25524
|
+
var _ref2 = position !== null && position !== void 0 ? position : {},
|
|
25525
|
+
_ref2$top = _ref2.top,
|
|
25526
|
+
top = _ref2$top === void 0 ? "-110px" : _ref2$top,
|
|
25527
|
+
_ref2$right = _ref2.right,
|
|
25528
|
+
right = _ref2$right === void 0 ? "auto" : _ref2$right,
|
|
25529
|
+
_ref2$bottom = _ref2.bottom,
|
|
25530
|
+
bottom = _ref2$bottom === void 0 ? "auto" : _ref2$bottom,
|
|
25531
|
+
_ref2$left = _ref2.left,
|
|
25532
|
+
left = _ref2$left === void 0 ? "-225px" : _ref2$left;
|
|
25533
|
+
|
|
25534
|
+
var _ref3 = arrowPosition !== null && arrowPosition !== void 0 ? arrowPosition : {},
|
|
25535
|
+
_ref3$arrowTop = _ref3.arrowTop,
|
|
25536
|
+
arrowTop = _ref3$arrowTop === void 0 ? "auto" : _ref3$arrowTop,
|
|
25537
|
+
_ref3$arrowRight = _ref3.arrowRight,
|
|
25538
|
+
arrowRight = _ref3$arrowRight === void 0 ? "10px" : _ref3$arrowRight,
|
|
25539
|
+
_ref3$arrowBottom = _ref3.arrowBottom,
|
|
25540
|
+
arrowBottom = _ref3$arrowBottom === void 0 ? "-8px" : _ref3$arrowBottom,
|
|
25541
|
+
_ref3$arrowLeft = _ref3.arrowLeft,
|
|
25542
|
+
arrowLeft = _ref3$arrowLeft === void 0 ? "auto" : _ref3$arrowLeft;
|
|
25543
|
+
|
|
25544
|
+
var _useState = React.useState(false),
|
|
25545
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
25546
|
+
popoverOpen = _useState2[0],
|
|
25547
|
+
togglePopover = _useState2[1];
|
|
25548
|
+
|
|
25549
|
+
var handleTogglePopover = function handleTogglePopover(popoverState) {
|
|
25550
|
+
if (popoverOpen !== popoverState) {
|
|
25551
|
+
togglePopover(popoverState);
|
|
25552
|
+
}
|
|
25553
|
+
};
|
|
25554
|
+
|
|
25555
|
+
var triggerRef = useOutsideClickHook();
|
|
25556
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
25557
|
+
padding: "0",
|
|
25558
|
+
extraStyles: "position: relative; ".concat(extraStyles)
|
|
25559
|
+
}, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
25560
|
+
action: function action() {
|
|
25561
|
+
return noop;
|
|
25562
|
+
},
|
|
25563
|
+
onFocus: function onFocus() {
|
|
25564
|
+
handleTogglePopover(true);
|
|
25565
|
+
},
|
|
25566
|
+
onBlur: function onBlur() {
|
|
25567
|
+
handleTogglePopover(false);
|
|
25568
|
+
},
|
|
25569
|
+
onKeyDown: function onKeyDown(e) {
|
|
25570
|
+
if (e.keyCode === 27) {
|
|
25571
|
+
handleTogglePopover(false);
|
|
25572
|
+
}
|
|
25573
|
+
},
|
|
25574
|
+
onTouchStart: function onTouchStart() {
|
|
25575
|
+
return handleTogglePopover(true);
|
|
25576
|
+
},
|
|
25577
|
+
onTouchEnd: function onTouchEnd() {
|
|
25578
|
+
return handleTogglePopover(false);
|
|
25579
|
+
},
|
|
25580
|
+
onMouseEnter: function onMouseEnter() {
|
|
25581
|
+
return handleTogglePopover(true);
|
|
25582
|
+
},
|
|
25583
|
+
onMouseLeave: function onMouseLeave() {
|
|
25584
|
+
return handleTogglePopover(false);
|
|
25585
|
+
},
|
|
25586
|
+
contentOverride: true,
|
|
25587
|
+
variant: "smallGhost",
|
|
25588
|
+
tabIndex: "0",
|
|
25589
|
+
id: "btnPopover".concat(popoverID),
|
|
25590
|
+
"aria-expanded": popoverOpen,
|
|
25591
|
+
"aria-labelledby": "btnPopover".concat(popoverID, "_info Disclosure").concat(popoverID),
|
|
25592
|
+
"aria-describedby": "Disclosure".concat(popoverID),
|
|
25593
|
+
"aria-controls": "Disclosed".concat(popoverID),
|
|
25594
|
+
ref: triggerRef,
|
|
25595
|
+
extraStyles: buttonExtraStyles
|
|
25596
|
+
}, hasIcon && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Icon, null), /*#__PURE__*/React__default.createElement(Box, {
|
|
25597
|
+
padding: "0",
|
|
25598
|
+
srOnly: true
|
|
25599
|
+
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
25600
|
+
id: "btnPopover".concat(popoverID, "_info")
|
|
25601
|
+
}, iconHelpText))), !hasIcon && /*#__PURE__*/React__default.createElement(Text$1, {
|
|
25602
|
+
color: popoverTriggerColor,
|
|
25603
|
+
extraStyles: "&:active { color: ".concat(activeColor, "; } &:hover { color: ").concat(hoverColor, " }; ").concat(textExtraStyles)
|
|
25604
|
+
}, triggerText)), /*#__PURE__*/React__default.createElement(Box, {
|
|
25605
|
+
background: backgroundColor,
|
|
25606
|
+
borderRadius: "4px",
|
|
25607
|
+
boxShadow: "0px 2px 14px 0px rgb(246, 246, 249), 0px 3px 8px 0px rgb(202, 206, 216)",
|
|
25608
|
+
id: "Disclosed".concat(popoverID),
|
|
25609
|
+
role: "region",
|
|
25610
|
+
"aria-describedby": "Disclosure".concat(popoverID),
|
|
25611
|
+
tabIndex: popoverFocus && popoverOpen ? "0" : "-1",
|
|
25612
|
+
minWidth: minWidth,
|
|
25613
|
+
maxWidth: maxWidth,
|
|
25614
|
+
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 ")
|
|
25615
|
+
}, /*#__PURE__*/React__default.createElement(Paragraph$1, null, content), /*#__PURE__*/React__default.createElement(Box, {
|
|
25616
|
+
padding: "0",
|
|
25617
|
+
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 ")
|
|
25618
|
+
})));
|
|
25619
|
+
};
|
|
25620
|
+
|
|
25621
|
+
var Popover$1 = themeComponent(Popover, "Popover", fallbackValues$j);
|
|
25622
|
+
|
|
25623
|
+
var DisplayCard = function DisplayCard(_ref) {
|
|
25624
|
+
var title = _ref.title,
|
|
25625
|
+
item = _ref.item,
|
|
25626
|
+
buttonText = _ref.buttonText,
|
|
25627
|
+
buttonAction = _ref.buttonAction,
|
|
25628
|
+
url = _ref.url,
|
|
25629
|
+
_ref$link = _ref.link,
|
|
25630
|
+
link = _ref$link === void 0 ? false : _ref$link,
|
|
25631
|
+
helpText = _ref.helpText,
|
|
25632
|
+
_ref$hasPopover = _ref.hasPopover,
|
|
25633
|
+
hasPopover = _ref$hasPopover === void 0 ? false : _ref$hasPopover,
|
|
25634
|
+
_ref$popoverTriggerTe = _ref.popoverTriggerText,
|
|
25635
|
+
popoverTriggerText = _ref$popoverTriggerTe === void 0 ? "" : _ref$popoverTriggerTe,
|
|
25636
|
+
_ref$popoverContent = _ref.popoverContent,
|
|
25637
|
+
popoverContent = _ref$popoverContent === void 0 ? "" : _ref$popoverContent,
|
|
25638
|
+
popoverExtraStyles = _ref.popoverExtraStyles,
|
|
25639
|
+
popoverTextExtraStyles = _ref.popoverTextExtraStyles;
|
|
25640
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
25641
|
+
padding: "0 0 16px"
|
|
25642
|
+
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
25643
|
+
childGap: "0rem"
|
|
25644
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
25645
|
+
padding: "0 0 8px 0"
|
|
25646
|
+
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
25647
|
+
justify: "space-between",
|
|
25648
|
+
align: "center",
|
|
25649
|
+
overflow: true
|
|
25650
|
+
}, /*#__PURE__*/React__default.createElement(Paragraph$1, {
|
|
25651
|
+
variant: "pL",
|
|
25652
|
+
color: CHARADE_GREY,
|
|
25653
|
+
extraStyles: "letter-spacing: 0.29px"
|
|
25654
|
+
}, title), hasPopover && /*#__PURE__*/React__default.createElement(Popover$1, {
|
|
25655
|
+
triggerText: popoverTriggerText,
|
|
25656
|
+
content: popoverContent,
|
|
25657
|
+
popoverExtraStyles: popoverExtraStyles,
|
|
25658
|
+
popoverTextExtraStyles: popoverTextExtraStyles
|
|
25659
|
+
}))), /*#__PURE__*/React__default.createElement(Box, {
|
|
25660
|
+
padding: "0"
|
|
25661
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
25662
|
+
padding: "24px",
|
|
25663
|
+
borderSize: "1px",
|
|
25664
|
+
borderRadius: "4px",
|
|
25665
|
+
background: WHITE,
|
|
25666
|
+
boxShadow: "0px 2px 14px 0px rgb(246, 246, 249), 0px 3px 8px 0px rgb(202, 206, 216)"
|
|
25667
|
+
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
25668
|
+
justify: "space-between",
|
|
25669
|
+
align: "center"
|
|
25670
|
+
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
25671
|
+
color: CHARADE_GREY
|
|
25672
|
+
}, item), link ? /*#__PURE__*/React__default.createElement(ButtonWithLink, {
|
|
25673
|
+
text: buttonText,
|
|
25674
|
+
url: url,
|
|
25675
|
+
variant: "smallGhost",
|
|
25676
|
+
dataQa: buttonText,
|
|
25677
|
+
extraStyles: "min-width: 0;"
|
|
25678
|
+
}) : buttonAction ? /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
25679
|
+
text: buttonText,
|
|
25680
|
+
action: buttonAction,
|
|
25681
|
+
variant: "smallGhost",
|
|
25682
|
+
dataQa: buttonText,
|
|
25683
|
+
extraStyles: "min-width: 0;"
|
|
25684
|
+
}) : helpText ? /*#__PURE__*/React__default.createElement(Text$1, {
|
|
25685
|
+
color: STORM_GREY,
|
|
25686
|
+
extraStyles: "font-style: italic;"
|
|
25687
|
+
}, helpText) : /*#__PURE__*/React__default.createElement(React.Fragment, null))))));
|
|
25688
|
+
};
|
|
25689
|
+
|
|
25238
25690
|
function _extends$2() {
|
|
25239
25691
|
_extends$2 = Object.assign || function (target) {
|
|
25240
25692
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -25513,344 +25965,6 @@ var FormattedInput = function FormattedInput(_ref) {
|
|
|
25513
25965
|
}));
|
|
25514
25966
|
};
|
|
25515
25967
|
|
|
25516
|
-
var formatDelimiter = "_";
|
|
25517
|
-
var phoneFormats = ["", "_", "__", "(___) ", "(___) _", "(___) __", "(___) ___-", "(___) ___-_", "(___) ___-__", "(___) ___-___", "(___) ___-____"];
|
|
25518
|
-
var zipFormats = ["", "_", "__", "___", "____", "_____", "______", "_____-__", "_____-___", "_____-____"];
|
|
25519
|
-
var creditCardFormats = ["", "_", "__", "___", "____", "____ _", "____ __", "____ ___", "____ ____", "____ ____ _", "____ ____ __", "____ ____ ___", "____ ____ ____", "____ ____ ____ _", "____ ____ ____ __", "____ ____ ____ ___", "____ ____ ____ ____"];
|
|
25520
|
-
var moneyFormats = ["", "$0.0_", "$0.__", "$_.__", "$__.__", "$___.__", "$_,___.__", "$__,___.__", "$___,___.__", "$_,___,___.__", "$__,___,___.__", "$___,___,___.__", "$_,___,___,___.__", "$__,___,___,___.__", "$___,___,___,___.__", "$_,___,___,___,___.__"];
|
|
25521
|
-
var expirationDateFormats = ["", "_", "__/", "__/_", "__/__"];
|
|
25522
|
-
var zipFormat = createFormat(zipFormats, formatDelimiter);
|
|
25523
|
-
var creditCardFormat = createFormat(creditCardFormats, formatDelimiter);
|
|
25524
|
-
var expirationDateFormat = createFormat(expirationDateFormats, formatDelimiter);
|
|
25525
|
-
var phoneFormat = createFormat(phoneFormats, formatDelimiter);
|
|
25526
|
-
var moneyFormat = createFormat(moneyFormats, formatDelimiter);
|
|
25527
|
-
var renderCardStatus = function renderCardStatus(expirationStatus, expireDate) {
|
|
25528
|
-
var textAlign = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "right";
|
|
25529
|
-
var as = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "span";
|
|
25530
|
-
var ACTIVE = "ACTIVE";
|
|
25531
|
-
var EXPIRING_SOON = "EXPIRING_SOON";
|
|
25532
|
-
var EXPIRED = "EXPIRED";
|
|
25533
|
-
var textMargin = textAlign === "right" ? "auto" : "0";
|
|
25534
|
-
|
|
25535
|
-
switch (expirationStatus) {
|
|
25536
|
-
case ACTIVE:
|
|
25537
|
-
return /*#__PURE__*/React__default.createElement(Text$1, {
|
|
25538
|
-
as: as,
|
|
25539
|
-
variant: "pXS",
|
|
25540
|
-
color: ASH_GREY,
|
|
25541
|
-
extraStyles: "text-align: ".concat(textAlign, "; margin: ").concat(textMargin, ";")
|
|
25542
|
-
}, "Exp Date ", expireDate);
|
|
25543
|
-
|
|
25544
|
-
case EXPIRING_SOON:
|
|
25545
|
-
return /*#__PURE__*/React__default.createElement(Text$1, {
|
|
25546
|
-
as: as,
|
|
25547
|
-
variant: "pXS",
|
|
25548
|
-
color: FIRE_YELLOW,
|
|
25549
|
-
extraStyles: "text-align: ".concat(textAlign, "; margin: ").concat(textMargin, ";")
|
|
25550
|
-
}, "Expiring Soon ", expireDate);
|
|
25551
|
-
|
|
25552
|
-
case EXPIRED:
|
|
25553
|
-
return /*#__PURE__*/React__default.createElement(Text$1, {
|
|
25554
|
-
as: as,
|
|
25555
|
-
variant: "pXS",
|
|
25556
|
-
color: ASH_GREY,
|
|
25557
|
-
extraStyles: "text-align: ".concat(textAlign, "; margin: ").concat(textMargin, ";")
|
|
25558
|
-
}, "Expired");
|
|
25559
|
-
}
|
|
25560
|
-
};
|
|
25561
|
-
|
|
25562
|
-
var formats = /*#__PURE__*/Object.freeze({
|
|
25563
|
-
__proto__: null,
|
|
25564
|
-
formatDelimiter: formatDelimiter,
|
|
25565
|
-
phoneFormats: phoneFormats,
|
|
25566
|
-
moneyFormats: moneyFormats,
|
|
25567
|
-
expirationDateFormats: expirationDateFormats,
|
|
25568
|
-
zipFormat: zipFormat,
|
|
25569
|
-
creditCardFormat: creditCardFormat,
|
|
25570
|
-
expirationDateFormat: expirationDateFormat,
|
|
25571
|
-
phoneFormat: phoneFormat,
|
|
25572
|
-
moneyFormat: moneyFormat,
|
|
25573
|
-
renderCardStatus: renderCardStatus
|
|
25574
|
-
});
|
|
25575
|
-
|
|
25576
|
-
var useFocusInvalidInput = function useFocusInvalidInput(hasErrors) {
|
|
25577
|
-
var resetHasErrors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
|
|
25578
|
-
// Only move focus when "hasErrors" is true
|
|
25579
|
-
// "hasErrors" is managed by container page of form
|
|
25580
|
-
// typically set to "true" on attempted form submission, if errors exist
|
|
25581
|
-
// Reset errors, if provided, resets the error state tracking in order to properly re-run
|
|
25582
|
-
React.useEffect(function () {
|
|
25583
|
-
if (hasErrors) {
|
|
25584
|
-
var _inputsWithErrors$;
|
|
25585
|
-
|
|
25586
|
-
var inputsWithErrors = document.querySelectorAll("input[aria-invalid=true]");
|
|
25587
|
-
inputsWithErrors === null || inputsWithErrors === void 0 ? void 0 : (_inputsWithErrors$ = inputsWithErrors[0]) === null || _inputsWithErrors$ === void 0 ? void 0 : _inputsWithErrors$.focus();
|
|
25588
|
-
}
|
|
25589
|
-
|
|
25590
|
-
return function () {
|
|
25591
|
-
return resetHasErrors(false);
|
|
25592
|
-
};
|
|
25593
|
-
});
|
|
25594
|
-
};
|
|
25595
|
-
|
|
25596
|
-
/*
|
|
25597
|
-
Hook that assigns a click event listener to the main document element
|
|
25598
|
-
Returns a ref to attach to another element (like an icon/button that triggers a popover)
|
|
25599
|
-
If a click event gets captured by the document and the assigned element isn't the target
|
|
25600
|
-
hook will run whatever handler is passed (eg a function that closes a popover)
|
|
25601
|
-
|
|
25602
|
-
See popover component for implementation
|
|
25603
|
-
|
|
25604
|
-
*/
|
|
25605
|
-
|
|
25606
|
-
var useOutsideClickHook = function useOutsideClickHook(handler) {
|
|
25607
|
-
var ref = React.useRef();
|
|
25608
|
-
React.useEffect(function () {
|
|
25609
|
-
}, [ref]);
|
|
25610
|
-
return ref;
|
|
25611
|
-
};
|
|
25612
|
-
|
|
25613
|
-
|
|
25614
|
-
|
|
25615
|
-
var index$4 = /*#__PURE__*/Object.freeze({
|
|
25616
|
-
__proto__: null,
|
|
25617
|
-
formats: formats,
|
|
25618
|
-
general: general,
|
|
25619
|
-
theme: themeUtils,
|
|
25620
|
-
useFocusInvalidInput: useFocusInvalidInput,
|
|
25621
|
-
useOutsideClick: useOutsideClickHook
|
|
25622
|
-
});
|
|
25623
|
-
|
|
25624
|
-
var hoverColor$4 = "#116285";
|
|
25625
|
-
var activeColor$4 = "#0E506D";
|
|
25626
|
-
var popoverTriggerColor = "#15749D";
|
|
25627
|
-
var fallbackValues$j = {
|
|
25628
|
-
hoverColor: hoverColor$4,
|
|
25629
|
-
activeColor: activeColor$4,
|
|
25630
|
-
popoverTriggerColor: popoverTriggerColor
|
|
25631
|
-
};
|
|
25632
|
-
|
|
25633
|
-
var arrowBorder = function arrowBorder(borderColor, direction) {
|
|
25634
|
-
var width = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "8px";
|
|
25635
|
-
var angle = "".concat(width, " solid transparent");
|
|
25636
|
-
var straight = "".concat(width, " solid ").concat(borderColor);
|
|
25637
|
-
|
|
25638
|
-
if (direction == "down") {
|
|
25639
|
-
return "border-left: ".concat(angle, "; border-right: ").concat(angle, "; border-top: ").concat(straight);
|
|
25640
|
-
} else if (direction == "up") {
|
|
25641
|
-
return "border-left: ".concat(angle, "; border-right: ").concat(angle, "; border-bottom: ").concat(straight);
|
|
25642
|
-
} else if (direction == "left") {
|
|
25643
|
-
return "border-top: ".concat(angle, "; border-bottom: ").concat(angle, "; border-right: ").concat(straight);
|
|
25644
|
-
} else if (direction == "right") {
|
|
25645
|
-
return "border-top: ".concat(angle, "; border-bottom: ").concat(angle, "; border-left: ").concat(straight);
|
|
25646
|
-
}
|
|
25647
|
-
};
|
|
25648
|
-
|
|
25649
|
-
var Popover = function Popover(_ref) {
|
|
25650
|
-
var themeValues = _ref.themeValues,
|
|
25651
|
-
_ref$triggerText = _ref.triggerText,
|
|
25652
|
-
triggerText = _ref$triggerText === void 0 ? "" : _ref$triggerText,
|
|
25653
|
-
_ref$content = _ref.content,
|
|
25654
|
-
content = _ref$content === void 0 ? "" : _ref$content,
|
|
25655
|
-
_ref$hasIcon = _ref.hasIcon,
|
|
25656
|
-
hasIcon = _ref$hasIcon === void 0 ? false : _ref$hasIcon,
|
|
25657
|
-
Icon = _ref.icon,
|
|
25658
|
-
_ref$iconHelpText = _ref.iconHelpText,
|
|
25659
|
-
iconHelpText = _ref$iconHelpText === void 0 ? "" : _ref$iconHelpText,
|
|
25660
|
-
_ref$popoverID = _ref.popoverID,
|
|
25661
|
-
popoverID = _ref$popoverID === void 0 ? 0 : _ref$popoverID,
|
|
25662
|
-
_ref$popoverFocus = _ref.popoverFocus,
|
|
25663
|
-
popoverFocus = _ref$popoverFocus === void 0 ? false : _ref$popoverFocus,
|
|
25664
|
-
extraStyles = _ref.extraStyles,
|
|
25665
|
-
textExtraStyles = _ref.textExtraStyles,
|
|
25666
|
-
_ref$minWidth = _ref.minWidth,
|
|
25667
|
-
minWidth = _ref$minWidth === void 0 ? "250px" : _ref$minWidth,
|
|
25668
|
-
_ref$maxWidth = _ref.maxWidth,
|
|
25669
|
-
maxWidth = _ref$maxWidth === void 0 ? "300px" : _ref$maxWidth,
|
|
25670
|
-
_ref$height = _ref.height,
|
|
25671
|
-
height = _ref$height === void 0 ? "auto" : _ref$height,
|
|
25672
|
-
position = _ref.position,
|
|
25673
|
-
arrowPosition = _ref.arrowPosition,
|
|
25674
|
-
_ref$arrowDirection = _ref.arrowDirection,
|
|
25675
|
-
arrowDirection = _ref$arrowDirection === void 0 ? "down" : _ref$arrowDirection,
|
|
25676
|
-
_ref$transform = _ref.transform,
|
|
25677
|
-
transform = _ref$transform === void 0 ? "none" : _ref$transform,
|
|
25678
|
-
buttonExtraStyles = _ref.buttonExtraStyles,
|
|
25679
|
-
_ref$backgroundColor = _ref.backgroundColor,
|
|
25680
|
-
backgroundColor = _ref$backgroundColor === void 0 ? "white" : _ref$backgroundColor,
|
|
25681
|
-
_ref$borderColor = _ref.borderColor,
|
|
25682
|
-
borderColor = _ref$borderColor === void 0 ? "rgba(255, 255, 255, 0.85)" : _ref$borderColor,
|
|
25683
|
-
popoverExtraStyles = _ref.popoverExtraStyles;
|
|
25684
|
-
var hoverColor = themeValues.hoverColor,
|
|
25685
|
-
activeColor = themeValues.activeColor,
|
|
25686
|
-
popoverTriggerColor = themeValues.popoverTriggerColor;
|
|
25687
|
-
|
|
25688
|
-
var _ref2 = position !== null && position !== void 0 ? position : {},
|
|
25689
|
-
_ref2$top = _ref2.top,
|
|
25690
|
-
top = _ref2$top === void 0 ? "-110px" : _ref2$top,
|
|
25691
|
-
_ref2$right = _ref2.right,
|
|
25692
|
-
right = _ref2$right === void 0 ? "auto" : _ref2$right,
|
|
25693
|
-
_ref2$bottom = _ref2.bottom,
|
|
25694
|
-
bottom = _ref2$bottom === void 0 ? "auto" : _ref2$bottom,
|
|
25695
|
-
_ref2$left = _ref2.left,
|
|
25696
|
-
left = _ref2$left === void 0 ? "-225px" : _ref2$left;
|
|
25697
|
-
|
|
25698
|
-
var _ref3 = arrowPosition !== null && arrowPosition !== void 0 ? arrowPosition : {},
|
|
25699
|
-
_ref3$arrowTop = _ref3.arrowTop,
|
|
25700
|
-
arrowTop = _ref3$arrowTop === void 0 ? "auto" : _ref3$arrowTop,
|
|
25701
|
-
_ref3$arrowRight = _ref3.arrowRight,
|
|
25702
|
-
arrowRight = _ref3$arrowRight === void 0 ? "10px" : _ref3$arrowRight,
|
|
25703
|
-
_ref3$arrowBottom = _ref3.arrowBottom,
|
|
25704
|
-
arrowBottom = _ref3$arrowBottom === void 0 ? "-8px" : _ref3$arrowBottom,
|
|
25705
|
-
_ref3$arrowLeft = _ref3.arrowLeft,
|
|
25706
|
-
arrowLeft = _ref3$arrowLeft === void 0 ? "auto" : _ref3$arrowLeft;
|
|
25707
|
-
|
|
25708
|
-
var _useState = React.useState(false),
|
|
25709
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
25710
|
-
popoverOpen = _useState2[0],
|
|
25711
|
-
togglePopover = _useState2[1];
|
|
25712
|
-
|
|
25713
|
-
var handleTogglePopover = function handleTogglePopover(popoverState) {
|
|
25714
|
-
if (popoverOpen !== popoverState) {
|
|
25715
|
-
togglePopover(popoverState);
|
|
25716
|
-
}
|
|
25717
|
-
};
|
|
25718
|
-
|
|
25719
|
-
var triggerRef = useOutsideClickHook();
|
|
25720
|
-
return /*#__PURE__*/React__default.createElement(Box, {
|
|
25721
|
-
padding: "0",
|
|
25722
|
-
extraStyles: "position: relative; ".concat(extraStyles)
|
|
25723
|
-
}, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
25724
|
-
action: function action() {
|
|
25725
|
-
return noop;
|
|
25726
|
-
},
|
|
25727
|
-
onFocus: function onFocus() {
|
|
25728
|
-
handleTogglePopover(true);
|
|
25729
|
-
},
|
|
25730
|
-
onBlur: function onBlur() {
|
|
25731
|
-
handleTogglePopover(false);
|
|
25732
|
-
},
|
|
25733
|
-
onKeyDown: function onKeyDown(e) {
|
|
25734
|
-
if (e.keyCode === 27) {
|
|
25735
|
-
handleTogglePopover(false);
|
|
25736
|
-
}
|
|
25737
|
-
},
|
|
25738
|
-
onTouchStart: function onTouchStart() {
|
|
25739
|
-
return handleTogglePopover(true);
|
|
25740
|
-
},
|
|
25741
|
-
onTouchEnd: function onTouchEnd() {
|
|
25742
|
-
return handleTogglePopover(false);
|
|
25743
|
-
},
|
|
25744
|
-
onMouseEnter: function onMouseEnter() {
|
|
25745
|
-
return handleTogglePopover(true);
|
|
25746
|
-
},
|
|
25747
|
-
onMouseLeave: function onMouseLeave() {
|
|
25748
|
-
return handleTogglePopover(false);
|
|
25749
|
-
},
|
|
25750
|
-
contentOverride: true,
|
|
25751
|
-
variant: "smallGhost",
|
|
25752
|
-
tabIndex: "0",
|
|
25753
|
-
id: "btnPopover".concat(popoverID),
|
|
25754
|
-
"aria-expanded": popoverOpen,
|
|
25755
|
-
"aria-labelledby": "btnPopover".concat(popoverID, "_info Disclosure").concat(popoverID),
|
|
25756
|
-
"aria-describedby": "Disclosure".concat(popoverID),
|
|
25757
|
-
"aria-controls": "Disclosed".concat(popoverID),
|
|
25758
|
-
ref: triggerRef,
|
|
25759
|
-
extraStyles: buttonExtraStyles
|
|
25760
|
-
}, hasIcon && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Icon, null), /*#__PURE__*/React__default.createElement(Box, {
|
|
25761
|
-
padding: "0",
|
|
25762
|
-
srOnly: true
|
|
25763
|
-
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
25764
|
-
id: "btnPopover".concat(popoverID, "_info")
|
|
25765
|
-
}, iconHelpText))), !hasIcon && /*#__PURE__*/React__default.createElement(Text$1, {
|
|
25766
|
-
color: popoverTriggerColor,
|
|
25767
|
-
extraStyles: "&:active { color: ".concat(activeColor, "; } &:hover { color: ").concat(hoverColor, " }; ").concat(textExtraStyles)
|
|
25768
|
-
}, triggerText)), /*#__PURE__*/React__default.createElement(Box, {
|
|
25769
|
-
background: backgroundColor,
|
|
25770
|
-
borderRadius: "4px",
|
|
25771
|
-
boxShadow: "0px 2px 14px 0px rgb(246, 246, 249), 0px 3px 8px 0px rgb(202, 206, 216)",
|
|
25772
|
-
id: "Disclosed".concat(popoverID),
|
|
25773
|
-
role: "region",
|
|
25774
|
-
"aria-describedby": "Disclosure".concat(popoverID),
|
|
25775
|
-
tabIndex: popoverFocus && popoverOpen ? "0" : "-1",
|
|
25776
|
-
minWidth: minWidth,
|
|
25777
|
-
maxWidth: maxWidth,
|
|
25778
|
-
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 ")
|
|
25779
|
-
}, /*#__PURE__*/React__default.createElement(Paragraph$1, null, content), /*#__PURE__*/React__default.createElement(Box, {
|
|
25780
|
-
padding: "0",
|
|
25781
|
-
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 ")
|
|
25782
|
-
})));
|
|
25783
|
-
};
|
|
25784
|
-
|
|
25785
|
-
var Popover$1 = themeComponent(Popover, "Popover", fallbackValues$j);
|
|
25786
|
-
|
|
25787
|
-
var DisplayCard = function DisplayCard(_ref) {
|
|
25788
|
-
var title = _ref.title,
|
|
25789
|
-
item = _ref.item,
|
|
25790
|
-
buttonText = _ref.buttonText,
|
|
25791
|
-
buttonAction = _ref.buttonAction,
|
|
25792
|
-
url = _ref.url,
|
|
25793
|
-
_ref$link = _ref.link,
|
|
25794
|
-
link = _ref$link === void 0 ? false : _ref$link,
|
|
25795
|
-
helpText = _ref.helpText,
|
|
25796
|
-
_ref$hasPopover = _ref.hasPopover,
|
|
25797
|
-
hasPopover = _ref$hasPopover === void 0 ? false : _ref$hasPopover,
|
|
25798
|
-
_ref$popoverTriggerTe = _ref.popoverTriggerText,
|
|
25799
|
-
popoverTriggerText = _ref$popoverTriggerTe === void 0 ? "" : _ref$popoverTriggerTe,
|
|
25800
|
-
_ref$popoverContent = _ref.popoverContent,
|
|
25801
|
-
popoverContent = _ref$popoverContent === void 0 ? "" : _ref$popoverContent,
|
|
25802
|
-
popoverExtraStyles = _ref.popoverExtraStyles,
|
|
25803
|
-
popoverTextExtraStyles = _ref.popoverTextExtraStyles;
|
|
25804
|
-
return /*#__PURE__*/React__default.createElement(Box, {
|
|
25805
|
-
padding: "0 0 16px"
|
|
25806
|
-
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
25807
|
-
childGap: "0rem"
|
|
25808
|
-
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
25809
|
-
padding: "0 0 8px 0"
|
|
25810
|
-
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
25811
|
-
justify: "space-between",
|
|
25812
|
-
align: "center",
|
|
25813
|
-
overflow: true
|
|
25814
|
-
}, /*#__PURE__*/React__default.createElement(Paragraph$1, {
|
|
25815
|
-
variant: "pL",
|
|
25816
|
-
color: CHARADE_GREY,
|
|
25817
|
-
extraStyles: "letter-spacing: 0.29px"
|
|
25818
|
-
}, title), hasPopover && /*#__PURE__*/React__default.createElement(Popover$1, {
|
|
25819
|
-
triggerText: popoverTriggerText,
|
|
25820
|
-
content: popoverContent,
|
|
25821
|
-
popoverExtraStyles: popoverExtraStyles,
|
|
25822
|
-
popoverTextExtraStyles: popoverTextExtraStyles
|
|
25823
|
-
}))), /*#__PURE__*/React__default.createElement(Box, {
|
|
25824
|
-
padding: "0"
|
|
25825
|
-
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
25826
|
-
padding: "24px",
|
|
25827
|
-
borderSize: "1px",
|
|
25828
|
-
borderRadius: "4px",
|
|
25829
|
-
background: WHITE,
|
|
25830
|
-
boxShadow: "0px 2px 14px 0px rgb(246, 246, 249), 0px 3px 8px 0px rgb(202, 206, 216)"
|
|
25831
|
-
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
25832
|
-
justify: "space-between",
|
|
25833
|
-
align: "center"
|
|
25834
|
-
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
25835
|
-
color: CHARADE_GREY
|
|
25836
|
-
}, item), link ? /*#__PURE__*/React__default.createElement(ButtonWithLink, {
|
|
25837
|
-
text: buttonText,
|
|
25838
|
-
url: url,
|
|
25839
|
-
variant: "smallGhost",
|
|
25840
|
-
dataQa: buttonText,
|
|
25841
|
-
extraStyles: "min-width: 0;"
|
|
25842
|
-
}) : buttonAction ? /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
25843
|
-
text: buttonText,
|
|
25844
|
-
action: buttonAction,
|
|
25845
|
-
variant: "smallGhost",
|
|
25846
|
-
dataQa: buttonText,
|
|
25847
|
-
extraStyles: "min-width: 0;"
|
|
25848
|
-
}) : helpText ? /*#__PURE__*/React__default.createElement(Text$1, {
|
|
25849
|
-
color: STORM_GREY,
|
|
25850
|
-
extraStyles: "font-style: italic;"
|
|
25851
|
-
}, helpText) : /*#__PURE__*/React__default.createElement(React.Fragment, null))))));
|
|
25852
|
-
};
|
|
25853
|
-
|
|
25854
25968
|
var linkColor$2 = {
|
|
25855
25969
|
"default": "".concat(MATISSE_BLUE),
|
|
25856
25970
|
disabled: "".concat(MATISSE_BLUE)
|
|
@@ -26007,8 +26121,6 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26007
26121
|
isRequired = _ref15$isRequired === void 0 ? false : _ref15$isRequired,
|
|
26008
26122
|
props = _objectWithoutProperties(_ref15, _excluded2);
|
|
26009
26123
|
|
|
26010
|
-
var required = isRequired || (props === null || props === void 0 ? void 0 : props.required);
|
|
26011
|
-
|
|
26012
26124
|
var _useState = React.useState(false),
|
|
26013
26125
|
_useState2 = _slicedToArray(_useState, 2),
|
|
26014
26126
|
showPassword = _useState2[0],
|
|
@@ -26094,7 +26206,7 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26094
26206
|
$extraStyles: extraStyles,
|
|
26095
26207
|
"data-qa": dataQa || labelTextWhenNoError,
|
|
26096
26208
|
autoComplete: autocompleteValue,
|
|
26097
|
-
required:
|
|
26209
|
+
required: isRequired
|
|
26098
26210
|
}, props)) : /*#__PURE__*/React__default.createElement(InputField, _extends({
|
|
26099
26211
|
"aria-labelledby": createIdFromString(labelTextWhenNoError),
|
|
26100
26212
|
"aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
|
|
@@ -26114,7 +26226,7 @@ var FormInput = function FormInput(_ref15) {
|
|
|
26114
26226
|
$extraStyles: extraStyles,
|
|
26115
26227
|
"data-qa": dataQa || labelTextWhenNoError,
|
|
26116
26228
|
autoComplete: autocompleteValue,
|
|
26117
|
-
required:
|
|
26229
|
+
required: isRequired
|
|
26118
26230
|
}, props))), /*#__PURE__*/React__default.createElement(Stack, {
|
|
26119
26231
|
direction: "row",
|
|
26120
26232
|
justify: "space-between",
|
|
@@ -26323,6 +26435,66 @@ var fallbackValues$n = {
|
|
|
26323
26435
|
autopayTextColor: autopayTextColor$1
|
|
26324
26436
|
};
|
|
26325
26437
|
|
|
26438
|
+
var formatDelimiter = "_";
|
|
26439
|
+
var phoneFormats = ["", "_", "__", "(___) ", "(___) _", "(___) __", "(___) ___-", "(___) ___-_", "(___) ___-__", "(___) ___-___", "(___) ___-____"];
|
|
26440
|
+
var zipFormats = ["", "_", "__", "___", "____", "_____", "______", "_____-__", "_____-___", "_____-____"];
|
|
26441
|
+
var creditCardFormats = ["", "_", "__", "___", "____", "____ _", "____ __", "____ ___", "____ ____", "____ ____ _", "____ ____ __", "____ ____ ___", "____ ____ ____", "____ ____ ____ _", "____ ____ ____ __", "____ ____ ____ ___", "____ ____ ____ ____"];
|
|
26442
|
+
var moneyFormats = ["", "$0.0_", "$0.__", "$_.__", "$__.__", "$___.__", "$_,___.__", "$__,___.__", "$___,___.__", "$_,___,___.__", "$__,___,___.__", "$___,___,___.__", "$_,___,___,___.__", "$__,___,___,___.__", "$___,___,___,___.__", "$_,___,___,___,___.__"];
|
|
26443
|
+
var expirationDateFormats = ["", "_", "__/", "__/_", "__/__"];
|
|
26444
|
+
var zipFormat = createFormat(zipFormats, formatDelimiter);
|
|
26445
|
+
var creditCardFormat = createFormat(creditCardFormats, formatDelimiter);
|
|
26446
|
+
var expirationDateFormat = createFormat(expirationDateFormats, formatDelimiter);
|
|
26447
|
+
var phoneFormat = createFormat(phoneFormats, formatDelimiter);
|
|
26448
|
+
var moneyFormat = createFormat(moneyFormats, formatDelimiter);
|
|
26449
|
+
var renderCardStatus = function renderCardStatus(expirationStatus, expireDate) {
|
|
26450
|
+
var textAlign = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "right";
|
|
26451
|
+
var as = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "span";
|
|
26452
|
+
var ACTIVE = "ACTIVE";
|
|
26453
|
+
var EXPIRING_SOON = "EXPIRING_SOON";
|
|
26454
|
+
var EXPIRED = "EXPIRED";
|
|
26455
|
+
var textMargin = textAlign === "right" ? "auto" : "0";
|
|
26456
|
+
|
|
26457
|
+
switch (expirationStatus) {
|
|
26458
|
+
case ACTIVE:
|
|
26459
|
+
return /*#__PURE__*/React__default.createElement(Text$1, {
|
|
26460
|
+
as: as,
|
|
26461
|
+
variant: "pXS",
|
|
26462
|
+
color: ASH_GREY,
|
|
26463
|
+
extraStyles: "text-align: ".concat(textAlign, "; margin: ").concat(textMargin, ";")
|
|
26464
|
+
}, "Exp Date ", expireDate);
|
|
26465
|
+
|
|
26466
|
+
case EXPIRING_SOON:
|
|
26467
|
+
return /*#__PURE__*/React__default.createElement(Text$1, {
|
|
26468
|
+
as: as,
|
|
26469
|
+
variant: "pXS",
|
|
26470
|
+
color: FIRE_YELLOW,
|
|
26471
|
+
extraStyles: "text-align: ".concat(textAlign, "; margin: ").concat(textMargin, ";")
|
|
26472
|
+
}, "Expiring Soon ", expireDate);
|
|
26473
|
+
|
|
26474
|
+
case EXPIRED:
|
|
26475
|
+
return /*#__PURE__*/React__default.createElement(Text$1, {
|
|
26476
|
+
as: as,
|
|
26477
|
+
variant: "pXS",
|
|
26478
|
+
color: ASH_GREY,
|
|
26479
|
+
extraStyles: "text-align: ".concat(textAlign, "; margin: ").concat(textMargin, ";")
|
|
26480
|
+
}, "Expired");
|
|
26481
|
+
}
|
|
26482
|
+
};
|
|
26483
|
+
|
|
26484
|
+
var formats = /*#__PURE__*/Object.freeze({
|
|
26485
|
+
__proto__: null,
|
|
26486
|
+
formatDelimiter: formatDelimiter,
|
|
26487
|
+
phoneFormats: phoneFormats,
|
|
26488
|
+
moneyFormats: moneyFormats,
|
|
26489
|
+
expirationDateFormats: expirationDateFormats,
|
|
26490
|
+
zipFormat: zipFormat,
|
|
26491
|
+
creditCardFormat: creditCardFormat,
|
|
26492
|
+
expirationDateFormat: expirationDateFormat,
|
|
26493
|
+
phoneFormat: phoneFormat,
|
|
26494
|
+
moneyFormat: moneyFormat,
|
|
26495
|
+
renderCardStatus: renderCardStatus
|
|
26496
|
+
});
|
|
26497
|
+
|
|
26326
26498
|
var CreditCardWrapper = styled__default.div.withConfig({
|
|
26327
26499
|
displayName: "FormattedCreditCard__CreditCardWrapper",
|
|
26328
26500
|
componentId: "sc-s0ta5l-0"
|
|
@@ -27296,7 +27468,9 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27296
27468
|
_ref2$ariaLabelledBy = _ref2.ariaLabelledBy,
|
|
27297
27469
|
ariaLabelledBy = _ref2$ariaLabelledBy === void 0 ? "" : _ref2$ariaLabelledBy,
|
|
27298
27470
|
_ref2$ariaLabel = _ref2.ariaLabel,
|
|
27299
|
-
ariaLabel = _ref2$ariaLabel === void 0 ? null : _ref2$ariaLabel
|
|
27471
|
+
ariaLabel = _ref2$ariaLabel === void 0 ? null : _ref2$ariaLabel,
|
|
27472
|
+
_ref2$isRequired = _ref2.isRequired,
|
|
27473
|
+
isRequired = _ref2$isRequired === void 0 ? false : _ref2$isRequired;
|
|
27300
27474
|
var buttonBorder = {
|
|
27301
27475
|
onFocused: {
|
|
27302
27476
|
borderColor: themeValues.activeColor,
|
|
@@ -27358,7 +27532,8 @@ var RadioButton$1 = function RadioButton(_ref2) {
|
|
|
27358
27532
|
disabled: disabled,
|
|
27359
27533
|
onClick: toggleRadio,
|
|
27360
27534
|
"aria-describedby": ariaDescribedBy,
|
|
27361
|
-
tabIndex: "-1"
|
|
27535
|
+
tabIndex: "-1",
|
|
27536
|
+
required: isRequired
|
|
27362
27537
|
}, extraProps)), /*#__PURE__*/React__default.createElement(Motion, {
|
|
27363
27538
|
borderWidth: "1px",
|
|
27364
27539
|
borderStyle: "solid",
|
|
@@ -39387,7 +39562,6 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39387
39562
|
labelTextWhenNoError: "Country",
|
|
39388
39563
|
errorMessages: countryErrorMessages,
|
|
39389
39564
|
field: fields.country,
|
|
39390
|
-
isRequired: true,
|
|
39391
39565
|
onChange: function onChange(value) {
|
|
39392
39566
|
actions.fields.country.set(value); // temporary measure to not dirty fields until
|
|
39393
39567
|
// we can write a reset function for fields
|
|
@@ -39401,7 +39575,8 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39401
39575
|
}
|
|
39402
39576
|
},
|
|
39403
39577
|
showErrors: showErrors,
|
|
39404
|
-
dataQa: "Country"
|
|
39578
|
+
dataQa: "Country",
|
|
39579
|
+
isRequired: true
|
|
39405
39580
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
39406
39581
|
labelTextWhenNoError: "Address",
|
|
39407
39582
|
errorMessages: street1ErrorMessages,
|
|
@@ -39423,8 +39598,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
39423
39598
|
return e.key === "Enter" && handleSubmit(e);
|
|
39424
39599
|
},
|
|
39425
39600
|
autocompleteValue: "address-line2",
|
|
39426
|
-
dataQa: "Address Line 2"
|
|
39427
|
-
isRequired: false
|
|
39601
|
+
dataQa: "Address Line 2"
|
|
39428
39602
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
39429
39603
|
labelTextWhenNoError: "City",
|
|
39430
39604
|
errorMessages: cityErrorMessages,
|
|
@@ -40365,7 +40539,9 @@ var EmailForm = function EmailForm(_ref) {
|
|
|
40365
40539
|
handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
|
|
40366
40540
|
showWalletCheckbox = _ref.showWalletCheckbox,
|
|
40367
40541
|
saveToWallet = _ref.saveToWallet,
|
|
40368
|
-
walletCheckboxMarked = _ref.walletCheckboxMarked
|
|
40542
|
+
walletCheckboxMarked = _ref.walletCheckboxMarked,
|
|
40543
|
+
_ref$isRequired = _ref.isRequired,
|
|
40544
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
40369
40545
|
|
|
40370
40546
|
if (clearOnDismount) {
|
|
40371
40547
|
React.useEffect(function () {
|
|
@@ -40394,7 +40570,8 @@ var EmailForm = function EmailForm(_ref) {
|
|
|
40394
40570
|
},
|
|
40395
40571
|
isEmail: true,
|
|
40396
40572
|
autocompleteValue: "email",
|
|
40397
|
-
dataQa: "Email address"
|
|
40573
|
+
dataQa: "Email address",
|
|
40574
|
+
isRequired: isRequired
|
|
40398
40575
|
}), showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
40399
40576
|
name: "email checkbox",
|
|
40400
40577
|
title: "Save email address to wallet",
|
|
@@ -45691,7 +45868,8 @@ var Modal$1 = function Modal(_ref) {
|
|
|
45691
45868
|
alignItems: "center"
|
|
45692
45869
|
},
|
|
45693
45870
|
dialogStyle: {
|
|
45694
|
-
width: customWidth || "615px"
|
|
45871
|
+
width: customWidth || "615px",
|
|
45872
|
+
overflow: "auto"
|
|
45695
45873
|
},
|
|
45696
45874
|
underlayClickExits: underlayClickExits
|
|
45697
45875
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -47747,8 +47925,7 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
|
|
|
47747
47925
|
title: "Terms and Conditions",
|
|
47748
47926
|
error: error,
|
|
47749
47927
|
checked: isChecked,
|
|
47750
|
-
onChange: onCheck
|
|
47751
|
-
isRequired: true
|
|
47928
|
+
onChange: onCheck
|
|
47752
47929
|
}), /*#__PURE__*/React__default.createElement(Box, {
|
|
47753
47930
|
padding: "0 0 0 58px"
|
|
47754
47931
|
}, /*#__PURE__*/React__default.createElement(Stack, null, /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -47762,42 +47939,7 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
|
|
|
47762
47939
|
})))));
|
|
47763
47940
|
};
|
|
47764
47941
|
|
|
47765
|
-
|
|
47766
|
-
Hook that takes an ID selector for an element on the screen
|
|
47767
|
-
And optionally values for top position, left position, smooth behavior
|
|
47768
|
-
Finds element on screen and scrolls it to the provided coordinates
|
|
47769
|
-
|
|
47770
|
-
(string, number, number, string, number) => undefined;
|
|
47771
|
-
*/
|
|
47772
|
-
var useScrollTo = function useScrollTo(id) {
|
|
47773
|
-
var top = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
47774
|
-
var left = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
47775
|
-
var behavior = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "auto";
|
|
47776
|
-
var delay = arguments.length > 4 ? arguments[4] : undefined;
|
|
47777
|
-
var scrollItem;
|
|
47778
|
-
|
|
47779
|
-
if (delay) {
|
|
47780
|
-
setTimeout(function () {
|
|
47781
|
-
var _scrollItem;
|
|
47782
|
-
|
|
47783
|
-
scrollItem = document.getElementById(id);
|
|
47784
|
-
(_scrollItem = scrollItem) === null || _scrollItem === void 0 ? void 0 : _scrollItem.scrollTo({
|
|
47785
|
-
top: top,
|
|
47786
|
-
left: left,
|
|
47787
|
-
behavior: behavior
|
|
47788
|
-
});
|
|
47789
|
-
}, delay);
|
|
47790
|
-
} else {
|
|
47791
|
-
var _scrollItem2;
|
|
47792
|
-
|
|
47793
|
-
scrollItem = document.getElementById(id);
|
|
47794
|
-
(_scrollItem2 = scrollItem) === null || _scrollItem2 === void 0 ? void 0 : _scrollItem2.scrollTo({
|
|
47795
|
-
top: top,
|
|
47796
|
-
left: left,
|
|
47797
|
-
behavior: behavior
|
|
47798
|
-
});
|
|
47799
|
-
}
|
|
47800
|
-
};
|
|
47942
|
+
var TermsAndConditionsTitleDivId = "terms-and-conditions-title";
|
|
47801
47943
|
|
|
47802
47944
|
var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
|
|
47803
47945
|
var _ref$showCheckbox = _ref.showCheckbox,
|
|
@@ -47862,7 +48004,7 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
|
|
|
47862
48004
|
onChange: onCheck,
|
|
47863
48005
|
checkboxMargin: checkboxMargin,
|
|
47864
48006
|
extraStyles: "align-self: flex-start;",
|
|
47865
|
-
|
|
48007
|
+
labelledById: TermsAndConditionsTitleDivId
|
|
47866
48008
|
}), /*#__PURE__*/React__default.createElement(Stack, {
|
|
47867
48009
|
childGap: "0.25rem",
|
|
47868
48010
|
fullHeight: true
|
|
@@ -47870,7 +48012,8 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
|
|
|
47870
48012
|
justify: "flex-start",
|
|
47871
48013
|
align: "center",
|
|
47872
48014
|
nowrap: true,
|
|
47873
|
-
extraStyles: "padding-right: 2px; > div > * { margin: 4px 2px; };"
|
|
48015
|
+
extraStyles: "padding-right: 2px; > div > * { margin: 4px 2px; };",
|
|
48016
|
+
id: TermsAndConditionsTitleDivId
|
|
47874
48017
|
}, description && /*#__PURE__*/React__default.createElement(Text$1, {
|
|
47875
48018
|
color: CHARADE_GREY
|
|
47876
48019
|
}, description), terms && /*#__PURE__*/React__default.createElement(TermsAndConditionsModal$1, {
|
|
@@ -48003,8 +48146,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48003
48146
|
onKeyDown: function onKeyDown(e) {
|
|
48004
48147
|
return e.key === "Enter" && handleSubmit(e);
|
|
48005
48148
|
},
|
|
48006
|
-
|
|
48007
|
-
|
|
48149
|
+
isNum: true,
|
|
48150
|
+
isRequired: true
|
|
48008
48151
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48009
48152
|
labelTextWhenNoError: "Account number",
|
|
48010
48153
|
dataQa: "Account number",
|
|
@@ -48012,7 +48155,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48012
48155
|
field: fields.accountNumber,
|
|
48013
48156
|
fieldActions: actions.fields.accountNumber,
|
|
48014
48157
|
showErrors: showErrors,
|
|
48015
|
-
isRequired: true,
|
|
48016
48158
|
isNum: true,
|
|
48017
48159
|
helperModal: function helperModal() {
|
|
48018
48160
|
return /*#__PURE__*/React__default.createElement(AccountAndRoutingModal$1, {
|
|
@@ -48027,11 +48169,11 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48027
48169
|
},
|
|
48028
48170
|
onKeyDown: function onKeyDown(e) {
|
|
48029
48171
|
return e.key === "Enter" && handleSubmit(e);
|
|
48030
|
-
}
|
|
48172
|
+
},
|
|
48173
|
+
isRequired: true
|
|
48031
48174
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48032
48175
|
labelTextWhenNoError: "Confirm account number",
|
|
48033
48176
|
dataQa: "Confirm account number",
|
|
48034
|
-
isRequired: true,
|
|
48035
48177
|
errorMessages: confirmAccountNumberErrors,
|
|
48036
48178
|
field: fields.confirmAccountNumber,
|
|
48037
48179
|
fieldActions: actions.fields.confirmAccountNumber,
|
|
@@ -48039,10 +48181,10 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48039
48181
|
onKeyDown: function onKeyDown(e) {
|
|
48040
48182
|
return e.key === "Enter" && handleSubmit(e);
|
|
48041
48183
|
},
|
|
48184
|
+
isRequired: true,
|
|
48042
48185
|
isNum: true
|
|
48043
48186
|
}), allowBankAccountType && /*#__PURE__*/React__default.createElement(FormSelect$1, {
|
|
48044
48187
|
labelTextWhenNoError: "Account type",
|
|
48045
|
-
isRequired: true,
|
|
48046
48188
|
dataQa: "Account type",
|
|
48047
48189
|
options: [{
|
|
48048
48190
|
text: "Select account type",
|
|
@@ -48057,7 +48199,8 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48057
48199
|
fieldActions: actions.fields.accountType,
|
|
48058
48200
|
showErrors: showErrors,
|
|
48059
48201
|
errorMessages: accountTypeErrors,
|
|
48060
|
-
field: fields.accountType
|
|
48202
|
+
field: fields.accountType,
|
|
48203
|
+
isRequired: true
|
|
48061
48204
|
}), !hideDefaultPayment && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
48062
48205
|
title: "Save as Default Payment Method",
|
|
48063
48206
|
dataQa: "default-payment-ach",
|
|
@@ -48080,8 +48223,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
|
|
|
48080
48223
|
version: "v2",
|
|
48081
48224
|
showCheckbox: false,
|
|
48082
48225
|
description: "View",
|
|
48083
|
-
terms: termsContent
|
|
48084
|
-
isRequired: true
|
|
48226
|
+
terms: termsContent
|
|
48085
48227
|
})))));
|
|
48086
48228
|
};
|
|
48087
48229
|
|
|
@@ -48174,7 +48316,6 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48174
48316
|
"aria-label": "Card payment"
|
|
48175
48317
|
}, /*#__PURE__*/React__default.createElement(FormInputColumn, null, !hideZipCode && /*#__PURE__*/React__default.createElement(CountryDropdown, {
|
|
48176
48318
|
labelTextWhenNoError: "Country",
|
|
48177
|
-
isRequired: true,
|
|
48178
48319
|
errorMessages: countryErrorMessages,
|
|
48179
48320
|
field: fields.country,
|
|
48180
48321
|
onChange: function onChange(value) {
|
|
@@ -48197,7 +48338,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48197
48338
|
onKeyDown: function onKeyDown(e) {
|
|
48198
48339
|
return e.key === "Enter" && handleSubmit(e);
|
|
48199
48340
|
},
|
|
48200
|
-
autocompleteValue: "cc-name"
|
|
48341
|
+
autocompleteValue: "cc-name",
|
|
48342
|
+
isRequired: true
|
|
48201
48343
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48202
48344
|
labelTextWhenNoError: "Credit card number",
|
|
48203
48345
|
dataQa: "Credit card number",
|
|
@@ -48210,7 +48352,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48210
48352
|
return e.key === "Enter" && handleSubmit(e);
|
|
48211
48353
|
},
|
|
48212
48354
|
isNum: true,
|
|
48213
|
-
autocompleteValue: "cc-number"
|
|
48355
|
+
autocompleteValue: "cc-number",
|
|
48356
|
+
isRequired: true
|
|
48214
48357
|
}), /*#__PURE__*/React__default.createElement(FormInputRow, {
|
|
48215
48358
|
breakpoint: isMobile ? "1000rem" : "21rem",
|
|
48216
48359
|
childGap: isMobile ? "0rem" : "1rem"
|
|
@@ -48228,7 +48371,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48228
48371
|
isNum: true,
|
|
48229
48372
|
removeFromValue: /\// // removes "/" from browser autofill
|
|
48230
48373
|
,
|
|
48231
|
-
autocompleteValue: "cc-exp"
|
|
48374
|
+
autocompleteValue: "cc-exp",
|
|
48375
|
+
isRequired: true
|
|
48232
48376
|
}), /*#__PURE__*/React__default.createElement(FormInput$1, {
|
|
48233
48377
|
labelTextWhenNoError: "CVV",
|
|
48234
48378
|
dataQa: "CVV",
|
|
@@ -48241,7 +48385,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48241
48385
|
onKeyDown: function onKeyDown(e) {
|
|
48242
48386
|
return e.key === "Enter" && handleSubmit(e);
|
|
48243
48387
|
},
|
|
48244
|
-
autocompleteValue: "cc-csc"
|
|
48388
|
+
autocompleteValue: "cc-csc",
|
|
48389
|
+
isRequired: true
|
|
48245
48390
|
})), !hideZipCode && /*#__PURE__*/React__default.createElement(Box, {
|
|
48246
48391
|
padding: isMobile ? "0" : "0 0.5rem 0 0",
|
|
48247
48392
|
width: isMobile ? "100%" : "50%"
|
|
@@ -48257,7 +48402,8 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
48257
48402
|
onKeyDown: function onKeyDown(e) {
|
|
48258
48403
|
return e.key === "Enter" && handleSubmit(e);
|
|
48259
48404
|
},
|
|
48260
|
-
autocompleteValue: "billing postal-code"
|
|
48405
|
+
autocompleteValue: "billing postal-code",
|
|
48406
|
+
isRequired: true
|
|
48261
48407
|
})), (showWalletCheckbox || showTerms) && /*#__PURE__*/React__default.createElement(Cluster, {
|
|
48262
48408
|
childGap: "4px",
|
|
48263
48409
|
align: "center"
|
|
@@ -48450,7 +48596,9 @@ var PhoneForm = function PhoneForm(_ref) {
|
|
|
48450
48596
|
handleSubmit = _ref$handleSubmit === void 0 ? noop : _ref$handleSubmit,
|
|
48451
48597
|
showWalletCheckbox = _ref.showWalletCheckbox,
|
|
48452
48598
|
saveToWallet = _ref.saveToWallet,
|
|
48453
|
-
walletCheckboxMarked = _ref.walletCheckboxMarked
|
|
48599
|
+
walletCheckboxMarked = _ref.walletCheckboxMarked,
|
|
48600
|
+
_ref$isRequired = _ref.isRequired,
|
|
48601
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
|
|
48454
48602
|
|
|
48455
48603
|
if (clearOnDismount) {
|
|
48456
48604
|
React.useEffect(function () {
|
|
@@ -48477,7 +48625,8 @@ var PhoneForm = function PhoneForm(_ref) {
|
|
|
48477
48625
|
},
|
|
48478
48626
|
autocompleteValue: "tel-national",
|
|
48479
48627
|
dataQa: "Phone number",
|
|
48480
|
-
isNum: true
|
|
48628
|
+
isNum: true,
|
|
48629
|
+
isRequired: isRequired
|
|
48481
48630
|
}), showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
|
|
48482
48631
|
name: "phone checkbox",
|
|
48483
48632
|
title: "Save phone number to wallet",
|
|
@@ -48610,7 +48759,9 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48610
48759
|
openHeight = _ref$openHeight === void 0 ? "auto" : _ref$openHeight,
|
|
48611
48760
|
_ref$containerStyles = _ref.containerStyles,
|
|
48612
48761
|
containerStyles = _ref$containerStyles === void 0 ? "" : _ref$containerStyles,
|
|
48613
|
-
ariaDescribedBy = _ref.ariaDescribedBy
|
|
48762
|
+
ariaDescribedBy = _ref.ariaDescribedBy,
|
|
48763
|
+
_ref$isSectionRequire = _ref.isSectionRequired,
|
|
48764
|
+
isSectionRequired = _ref$isSectionRequire === void 0 ? false : _ref$isSectionRequire;
|
|
48614
48765
|
|
|
48615
48766
|
var handleKeyDown = function handleKeyDown(id, e) {
|
|
48616
48767
|
if ((e === null || e === void 0 ? void 0 : e.keyCode) === 13 || (e === null || e === void 0 ? void 0 : e.keyCode) === 32) {
|
|
@@ -48666,7 +48817,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48666
48817
|
extraStyles: containerStyles
|
|
48667
48818
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
48668
48819
|
childGap: "0",
|
|
48669
|
-
role: "radiogroup"
|
|
48820
|
+
"aria-role": "radiogroup",
|
|
48821
|
+
"aria-required": isSectionRequired
|
|
48670
48822
|
}, sections.filter(function (section) {
|
|
48671
48823
|
return !section.hidden;
|
|
48672
48824
|
}).map(function (section) {
|
|
@@ -48688,7 +48840,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48688
48840
|
extraStyles: borderStyles,
|
|
48689
48841
|
role: "radio",
|
|
48690
48842
|
"aria-checked": openSection === section.id,
|
|
48691
|
-
"aria-disabled": section.disabled
|
|
48843
|
+
"aria-disabled": section.disabled,
|
|
48844
|
+
"aria-required": section === null || section === void 0 ? void 0 : section.required
|
|
48692
48845
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
48693
48846
|
childGap: "0"
|
|
48694
48847
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -48726,7 +48879,8 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48726
48879
|
toggleRadio: section.disabled ? noop : function () {
|
|
48727
48880
|
return toggleOpenSection(section.id);
|
|
48728
48881
|
},
|
|
48729
|
-
tabIndex: "-1"
|
|
48882
|
+
tabIndex: "-1",
|
|
48883
|
+
isRequired: section === null || section === void 0 ? void 0 : section.required
|
|
48730
48884
|
})), section.titleIcon && /*#__PURE__*/React__default.createElement(Cluster, {
|
|
48731
48885
|
align: "center"
|
|
48732
48886
|
}, section.titleIcon), /*#__PURE__*/React__default.createElement(Box, {
|
|
@@ -49245,6 +49399,51 @@ var Timeout = function Timeout(_ref) {
|
|
|
49245
49399
|
|
|
49246
49400
|
var Timeout$1 = withWindowSize(Timeout);
|
|
49247
49401
|
|
|
49402
|
+
var VARIANTS = {
|
|
49403
|
+
SUCCESS: "success",
|
|
49404
|
+
ERROR: "error"
|
|
49405
|
+
};
|
|
49406
|
+
|
|
49407
|
+
var ToastNotification = function ToastNotification(_ref) {
|
|
49408
|
+
var _ref$variant = _ref.variant,
|
|
49409
|
+
variant = _ref$variant === void 0 ? VARIANTS.SUCCESS : _ref$variant,
|
|
49410
|
+
_ref$message = _ref.message,
|
|
49411
|
+
message = _ref$message === void 0 ? "" : _ref$message,
|
|
49412
|
+
toastOpen = _ref.toastOpen,
|
|
49413
|
+
closeToastNotification = _ref.closeToastNotification,
|
|
49414
|
+
extraStyles = _ref.extraStyles,
|
|
49415
|
+
_ref$minWidth = _ref.minWidth,
|
|
49416
|
+
minWidth = _ref$minWidth === void 0 ? "112px" : _ref$minWidth,
|
|
49417
|
+
_ref$maxWidth = _ref.maxWidth,
|
|
49418
|
+
maxWidth = _ref$maxWidth === void 0 ? "350px" : _ref$maxWidth,
|
|
49419
|
+
_ref$height = _ref.height,
|
|
49420
|
+
height = _ref$height === void 0 ? "56px" : _ref$height,
|
|
49421
|
+
_ref$childGap = _ref.childGap,
|
|
49422
|
+
childGap = _ref$childGap === void 0 ? "1rem" : _ref$childGap,
|
|
49423
|
+
backgroundColor = _ref.backgroundColor;
|
|
49424
|
+
return /*#__PURE__*/React__default.createElement(Box, {
|
|
49425
|
+
onClick: closeToastNotification,
|
|
49426
|
+
background: backgroundColor ? backgroundColor : variant === VARIANTS.SUCCESS ? HINT_GREEN : variant === VARIANTS.ERROR ? ERROR_BACKGROUND_COLOR : WHITE,
|
|
49427
|
+
minWidth: minWidth,
|
|
49428
|
+
minHeight: height && parseInt(height) < 100 ? height : "100px",
|
|
49429
|
+
height: height ? height : "auto",
|
|
49430
|
+
tabIndex: toastOpen ? "-1" : "0",
|
|
49431
|
+
padding: "0rem 1rem",
|
|
49432
|
+
borderRadius: "4px",
|
|
49433
|
+
boxShadow: generateShadows().standard.base,
|
|
49434
|
+
extraStyles: "\n display: ".concat(toastOpen ? "block" : "none", ";\n position: fixed; bottom: 4rem; left: 4rem;\n ").concat(extraStyles, ";\n cursor: pointer;\n ")
|
|
49435
|
+
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
49436
|
+
align: "center",
|
|
49437
|
+
childGap: childGap
|
|
49438
|
+
}, variant === VARIANTS.SUCCESS && /*#__PURE__*/React__default.createElement(SuccessfulIconMedium, null), variant === VARIANTS.ERROR && /*#__PURE__*/React__default.createElement(ErroredIcon, null), /*#__PURE__*/React__default.createElement(Box, {
|
|
49439
|
+
padding: "1rem 0",
|
|
49440
|
+
maxWidth: maxWidth
|
|
49441
|
+
}, /*#__PURE__*/React__default.createElement(Paragraph$1, {
|
|
49442
|
+
weight: FONT_WEIGHT_SEMIBOLD,
|
|
49443
|
+
extraStyles: "word-break: break-word;"
|
|
49444
|
+
}, message)), /*#__PURE__*/React__default.createElement(IconQuitLarge, null)));
|
|
49445
|
+
};
|
|
49446
|
+
|
|
49248
49447
|
var fontWeight$9 = "600";
|
|
49249
49448
|
var fontColor$1 = WHITE;
|
|
49250
49449
|
var textAlign$1 = "left";
|
|
@@ -49617,6 +49816,38 @@ var SidebarStackContent = function SidebarStackContent(_ref) {
|
|
|
49617
49816
|
|
|
49618
49817
|
var SidebarStackContent$1 = withWindowSize(themeComponent(SidebarStackContent, "Global", fallbackValues$U));
|
|
49619
49818
|
|
|
49819
|
+
var useFocusInvalidInput = function useFocusInvalidInput(hasErrors) {
|
|
49820
|
+
var resetHasErrors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
|
|
49821
|
+
// Only move focus when "hasErrors" is true
|
|
49822
|
+
// "hasErrors" is managed by container page of form
|
|
49823
|
+
// typically set to "true" on attempted form submission, if errors exist
|
|
49824
|
+
// Reset errors, if provided, resets the error state tracking in order to properly re-run
|
|
49825
|
+
React.useEffect(function () {
|
|
49826
|
+
if (hasErrors) {
|
|
49827
|
+
var _inputsWithErrors$;
|
|
49828
|
+
|
|
49829
|
+
var inputsWithErrors = document.querySelectorAll("input[aria-invalid=true]");
|
|
49830
|
+
inputsWithErrors === null || inputsWithErrors === void 0 ? void 0 : (_inputsWithErrors$ = inputsWithErrors[0]) === null || _inputsWithErrors$ === void 0 ? void 0 : _inputsWithErrors$.focus();
|
|
49831
|
+
}
|
|
49832
|
+
|
|
49833
|
+
return function () {
|
|
49834
|
+
return resetHasErrors(false);
|
|
49835
|
+
};
|
|
49836
|
+
});
|
|
49837
|
+
};
|
|
49838
|
+
|
|
49839
|
+
|
|
49840
|
+
|
|
49841
|
+
var index$6 = /*#__PURE__*/Object.freeze({
|
|
49842
|
+
__proto__: null,
|
|
49843
|
+
formats: formats,
|
|
49844
|
+
general: general,
|
|
49845
|
+
theme: themeUtils,
|
|
49846
|
+
useFocusInvalidInput: useFocusInvalidInput,
|
|
49847
|
+
useOutsideClick: useOutsideClickHook,
|
|
49848
|
+
useToastNotification: useToastNotification
|
|
49849
|
+
});
|
|
49850
|
+
|
|
49620
49851
|
exports.AccountNumberImage = AccountNumberImage;
|
|
49621
49852
|
exports.AccountsAddIcon = AccountsAddIcon$1;
|
|
49622
49853
|
exports.AccountsIcon = AccountsIcon$1;
|
|
@@ -49714,6 +49945,7 @@ exports.ImageBox = ImageBox;
|
|
|
49714
49945
|
exports.Imposter = Imposter;
|
|
49715
49946
|
exports.InternalLink = InternalLink;
|
|
49716
49947
|
exports.Jumbo = Jumbo$1;
|
|
49948
|
+
exports.KebabMenuIcon = KebabMenuIcon;
|
|
49717
49949
|
exports.KioskImage = KioskImage;
|
|
49718
49950
|
exports.LabeledAmount = LabeledAmount$1;
|
|
49719
49951
|
exports.LineItem = LineItem$1;
|
|
@@ -49810,6 +50042,7 @@ exports.Text = Text$1;
|
|
|
49810
50042
|
exports.Timeout = Timeout$1;
|
|
49811
50043
|
exports.TimeoutImage = TimeoutImage;
|
|
49812
50044
|
exports.Title = Title$1;
|
|
50045
|
+
exports.ToastNotification = ToastNotification;
|
|
49813
50046
|
exports.ToggleSwitch = ToggleSwitch$1;
|
|
49814
50047
|
exports.TrashIcon = TrashIcon$1;
|
|
49815
50048
|
exports.TypeaheadInput = TypeaheadInput;
|
|
@@ -49827,6 +50060,7 @@ exports.cardRegistry = cardRegistry;
|
|
|
49827
50060
|
exports.constants = index$5;
|
|
49828
50061
|
exports.createPartialAmountFormState = createPartialAmountFormState;
|
|
49829
50062
|
exports.createPartialAmountFormValidators = createPartialAmountFormValidators;
|
|
49830
|
-
exports.
|
|
50063
|
+
exports.hooks = index$4;
|
|
50064
|
+
exports.util = index$6;
|
|
49831
50065
|
exports.withWindowSize = withWindowSize;
|
|
49832
50066
|
//# sourceMappingURL=index.cjs.js.map
|