@thecb/components 9.3.0-beta.2 → 9.3.2-beta.1

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.
Files changed (49) hide show
  1. package/dist/index.cjs.js +753 -631
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.d.ts +169 -60
  4. package/dist/index.esm.js +751 -631
  5. package/dist/index.esm.js.map +1 -1
  6. package/package.json +1 -1
  7. package/src/components/atoms/checkbox/Checkbox.js +1 -3
  8. package/src/components/atoms/checkbox/Checkbox.stories.js +2 -3
  9. package/src/components/atoms/country-dropdown/CountryDropdown.js +1 -3
  10. package/src/components/atoms/country-dropdown/CountryDropdown.stories.js +0 -1
  11. package/src/components/atoms/dropdown/Dropdown.js +73 -43
  12. package/src/components/atoms/dropdown/Dropdown.theme.js +8 -2
  13. package/src/components/atoms/form-layouts/FormInput.js +0 -4
  14. package/src/components/atoms/form-select/FormSelect.js +25 -36
  15. package/src/components/atoms/form-select/FormSelect.stories.js +2 -2
  16. package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.js +1 -4
  17. package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.stories.js +0 -1
  18. package/src/components/molecules/address-form/AddressForm.js +0 -6
  19. package/src/components/molecules/index.d.ts +1 -0
  20. package/src/components/molecules/index.js +1 -0
  21. package/src/components/molecules/payment-form-ach/PaymentFormACH.js +0 -7
  22. package/src/components/molecules/payment-form-card/PaymentFormCard.js +0 -7
  23. package/src/components/molecules/popover/Popover.js +1 -1
  24. package/src/components/molecules/radio-section/RadioSection.js +1 -2
  25. package/src/components/molecules/radio-section/RadioSection.stories.js +2 -3
  26. package/src/components/molecules/radio-section/radio-button/RadioButton.js +1 -4
  27. package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV1.js +0 -1
  28. package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV2.js +1 -2
  29. package/src/components/molecules/toast-notification/ToastNotification.js +75 -0
  30. package/src/components/molecules/toast-notification/ToastNotification.stories.js +67 -0
  31. package/src/components/molecules/toast-notification/index.d.ts +18 -0
  32. package/src/components/molecules/toast-notification/index.js +3 -0
  33. package/src/constants/colors.d.ts +1 -0
  34. package/src/constants/colors.js +5 -1
  35. package/src/hooks/index.js +3 -0
  36. package/src/hooks/use-toast-notification/index.d.ts +23 -0
  37. package/src/hooks/use-toast-notification/index.js +38 -0
  38. package/src/index.d.ts +2 -1
  39. package/src/index.js +2 -1
  40. package/src/types/common/ToastVariants.ts +6 -0
  41. package/src/types/common/index.ts +1 -0
  42. package/src/util/index.js +10 -2
  43. package/dist/src/apps/checkout/pages/payment/sub-pages/payment-amount/PaymentAmount_old.js +0 -49322
  44. package/src/.DS_Store +0 -0
  45. package/src/components/.DS_Store +0 -0
  46. package/src/components/atoms/.DS_Store +0 -0
  47. package/src/components/atoms/icons/.DS_Store +0 -0
  48. /package/src/{util/useOutsideClick.js → hooks/use-outside-click/index.js} +0 -0
  49. /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; // These colors are sequestered so that the alert component can reference them // by type of alert
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({
@@ -22130,9 +22134,7 @@ var Checkbox = function Checkbox(_ref4) {
22130
22134
  extraStyles = _ref4.extraStyles,
22131
22135
  textExtraStyles = _ref4.textExtraStyles,
22132
22136
  _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;
22137
+ dataQa = _ref4$dataQa === void 0 ? null : _ref4$dataQa;
22136
22138
 
22137
22139
  var _useState = React.useState(false),
22138
22140
  _useState2 = _slicedToArray(_useState, 2),
@@ -22186,8 +22188,7 @@ var Checkbox = function Checkbox(_ref4) {
22186
22188
  errorStyles: themeValues.errorStyles,
22187
22189
  disabledStyles: themeValues.disabledStyles,
22188
22190
  disabledCheckedStyles: themeValues.disabledCheckedStyles,
22189
- focusedStyles: themeValues.focusedStyles,
22190
- "aria-required": isRequired
22191
+ focusedStyles: themeValues.focusedStyles
22191
22192
  }, /*#__PURE__*/React__default.createElement(CheckboxIcon, {
22192
22193
  viewBox: "0 0 24 24",
22193
22194
  disabled: disabled,
@@ -22426,17 +22427,18 @@ var DropdownIcon = function DropdownIcon() {
22426
22427
  };
22427
22428
 
22428
22429
  var check = function (it) {
22429
- return it && it.Math == Math && it;
22430
+ return it && it.Math === Math && it;
22430
22431
  };
22431
22432
 
22432
22433
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
22433
22434
  var global_1 =
22434
- // eslint-disable-next-line es-x/no-global-this -- safe
22435
+ // eslint-disable-next-line es/no-global-this -- safe
22435
22436
  check(typeof globalThis == 'object' && globalThis) ||
22436
22437
  check(typeof window == 'object' && window) ||
22437
22438
  // eslint-disable-next-line no-restricted-globals -- safe
22438
22439
  check(typeof self == 'object' && self) ||
22439
22440
  check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
22441
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
22440
22442
  // eslint-disable-next-line no-new-func -- fallback
22441
22443
  (function () { return this; })() || Function('return this')();
22442
22444
 
@@ -22450,12 +22452,12 @@ var fails = function (exec) {
22450
22452
 
22451
22453
  // Detect IE8's incomplete defineProperty implementation
22452
22454
  var descriptors = !fails(function () {
22453
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
22454
- return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
22455
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
22456
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
22455
22457
  });
22456
22458
 
22457
22459
  var functionBindNative = !fails(function () {
22458
- // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
22460
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
22459
22461
  var test = (function () { /* empty */ }).bind();
22460
22462
  // eslint-disable-next-line no-prototype-builtins -- safe
22461
22463
  return typeof test != 'function' || test.hasOwnProperty('prototype');
@@ -22468,7 +22470,7 @@ var functionCall = functionBindNative ? call.bind(call) : function () {
22468
22470
  };
22469
22471
 
22470
22472
  var $propertyIsEnumerable = {}.propertyIsEnumerable;
22471
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
22473
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
22472
22474
  var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
22473
22475
 
22474
22476
  // Nashorn ~ JDK8 bug
@@ -22495,14 +22497,11 @@ var createPropertyDescriptor = function (bitmap, value) {
22495
22497
  };
22496
22498
 
22497
22499
  var FunctionPrototype = Function.prototype;
22498
- var bind$1 = FunctionPrototype.bind;
22499
22500
  var call$1 = FunctionPrototype.call;
22500
- var uncurryThis = functionBindNative && bind$1.bind(call$1, call$1);
22501
+ var uncurryThisWithBind = functionBindNative && FunctionPrototype.bind.bind(call$1, call$1);
22501
22502
 
22502
- var functionUncurryThis = functionBindNative ? function (fn) {
22503
- return fn && uncurryThis(fn);
22504
- } : function (fn) {
22505
- return fn && function () {
22503
+ var functionUncurryThis = functionBindNative ? uncurryThisWithBind : function (fn) {
22504
+ return function () {
22506
22505
  return call$1.apply(fn, arguments);
22507
22506
  };
22508
22507
  };
@@ -22523,15 +22522,21 @@ var indexedObject = fails(function () {
22523
22522
  // eslint-disable-next-line no-prototype-builtins -- safe
22524
22523
  return !$Object('z').propertyIsEnumerable(0);
22525
22524
  }) ? function (it) {
22526
- return classofRaw(it) == 'String' ? split(it, '') : $Object(it);
22525
+ return classofRaw(it) === 'String' ? split(it, '') : $Object(it);
22527
22526
  } : $Object;
22528
22527
 
22528
+ // we can't use just `it == null` since of `document.all` special case
22529
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
22530
+ var isNullOrUndefined = function (it) {
22531
+ return it === null || it === undefined;
22532
+ };
22533
+
22529
22534
  var $TypeError = TypeError;
22530
22535
 
22531
22536
  // `RequireObjectCoercible` abstract operation
22532
22537
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
22533
22538
  var requireObjectCoercible = function (it) {
22534
- if (it == undefined) throw $TypeError("Can't call method on " + it);
22539
+ if (isNullOrUndefined(it)) throw new $TypeError("Can't call method on " + it);
22535
22540
  return it;
22536
22541
  };
22537
22542
 
@@ -22543,13 +22548,32 @@ var toIndexedObject = function (it) {
22543
22548
  return indexedObject(requireObjectCoercible(it));
22544
22549
  };
22545
22550
 
22551
+ var documentAll = typeof document == 'object' && document.all;
22552
+
22553
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
22554
+ // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
22555
+ var IS_HTMLDDA = typeof documentAll == 'undefined' && documentAll !== undefined;
22556
+
22557
+ var documentAll_1 = {
22558
+ all: documentAll,
22559
+ IS_HTMLDDA: IS_HTMLDDA
22560
+ };
22561
+
22562
+ var documentAll$1 = documentAll_1.all;
22563
+
22546
22564
  // `IsCallable` abstract operation
22547
22565
  // https://tc39.es/ecma262/#sec-iscallable
22548
- var isCallable = function (argument) {
22566
+ var isCallable = documentAll_1.IS_HTMLDDA ? function (argument) {
22567
+ return typeof argument == 'function' || argument === documentAll$1;
22568
+ } : function (argument) {
22549
22569
  return typeof argument == 'function';
22550
22570
  };
22551
22571
 
22552
- var isObject = function (it) {
22572
+ var documentAll$2 = documentAll_1.all;
22573
+
22574
+ var isObject = documentAll_1.IS_HTMLDDA ? function (it) {
22575
+ return typeof it == 'object' ? it !== null : isCallable(it) || it === documentAll$2;
22576
+ } : function (it) {
22553
22577
  return typeof it == 'object' ? it !== null : isCallable(it);
22554
22578
  };
22555
22579
 
@@ -22563,7 +22587,7 @@ var getBuiltIn = function (namespace, method) {
22563
22587
 
22564
22588
  var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
22565
22589
 
22566
- var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
22590
+ var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
22567
22591
 
22568
22592
  var process$1 = global_1.process;
22569
22593
  var Deno = global_1.Deno;
@@ -22590,24 +22614,29 @@ if (!version && engineUserAgent) {
22590
22614
 
22591
22615
  var engineV8Version = version;
22592
22616
 
22593
- /* eslint-disable es-x/no-symbol -- required for testing */
22617
+ /* eslint-disable es/no-symbol -- required for testing */
22618
+
22594
22619
 
22595
22620
 
22596
22621
 
22597
- // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
22598
- var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
22599
- var symbol = Symbol();
22622
+ var $String = global_1.String;
22623
+
22624
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
22625
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails(function () {
22626
+ var symbol = Symbol('symbol detection');
22600
22627
  // Chrome 38 Symbol has incorrect toString conversion
22601
22628
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
22602
- return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
22629
+ // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
22630
+ // of course, fail.
22631
+ return !$String(symbol) || !(Object(symbol) instanceof Symbol) ||
22603
22632
  // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
22604
22633
  !Symbol.sham && engineV8Version && engineV8Version < 41;
22605
22634
  });
22606
22635
 
22607
- /* eslint-disable es-x/no-symbol -- required for testing */
22636
+ /* eslint-disable es/no-symbol -- required for testing */
22608
22637
 
22609
22638
 
22610
- var useSymbolAsUid = nativeSymbol
22639
+ var useSymbolAsUid = symbolConstructorDetection
22611
22640
  && !Symbol.sham
22612
22641
  && typeof Symbol.iterator == 'symbol';
22613
22642
 
@@ -22620,11 +22649,11 @@ var isSymbol = useSymbolAsUid ? function (it) {
22620
22649
  return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, $Object$1(it));
22621
22650
  };
22622
22651
 
22623
- var $String = String;
22652
+ var $String$1 = String;
22624
22653
 
22625
22654
  var tryToString = function (argument) {
22626
22655
  try {
22627
- return $String(argument);
22656
+ return $String$1(argument);
22628
22657
  } catch (error) {
22629
22658
  return 'Object';
22630
22659
  }
@@ -22635,14 +22664,14 @@ var $TypeError$1 = TypeError;
22635
22664
  // `Assert: IsCallable(argument) is true`
22636
22665
  var aCallable = function (argument) {
22637
22666
  if (isCallable(argument)) return argument;
22638
- throw $TypeError$1(tryToString(argument) + ' is not a function');
22667
+ throw new $TypeError$1(tryToString(argument) + ' is not a function');
22639
22668
  };
22640
22669
 
22641
22670
  // `GetMethod` abstract operation
22642
22671
  // https://tc39.es/ecma262/#sec-getmethod
22643
22672
  var getMethod = function (V, P) {
22644
22673
  var func = V[P];
22645
- return func == null ? undefined : aCallable(func);
22674
+ return isNullOrUndefined(func) ? undefined : aCallable(func);
22646
22675
  };
22647
22676
 
22648
22677
  var $TypeError$2 = TypeError;
@@ -22654,10 +22683,10 @@ var ordinaryToPrimitive = function (input, pref) {
22654
22683
  if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
22655
22684
  if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
22656
22685
  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");
22686
+ throw new $TypeError$2("Can't convert object to primitive value");
22658
22687
  };
22659
22688
 
22660
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
22689
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
22661
22690
  var defineProperty = Object.defineProperty;
22662
22691
 
22663
22692
  var defineGlobalProperty = function (key, value) {
@@ -22674,13 +22703,16 @@ var store = global_1[SHARED] || defineGlobalProperty(SHARED, {});
22674
22703
  var sharedStore = store;
22675
22704
 
22676
22705
  var shared = createCommonjsModule(function (module) {
22706
+
22707
+
22708
+
22677
22709
  (module.exports = function (key, value) {
22678
22710
  return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
22679
22711
  })('versions', []).push({
22680
- version: '3.24.1',
22712
+ version: '3.33.3',
22681
22713
  mode: 'global',
22682
- copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
22683
- license: 'https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE',
22714
+ copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
22715
+ license: 'https://github.com/zloirock/core-js/blob/v3.33.3/LICENSE',
22684
22716
  source: 'https://github.com/zloirock/core-js'
22685
22717
  });
22686
22718
  });
@@ -22697,7 +22729,7 @@ var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
22697
22729
 
22698
22730
  // `HasOwnProperty` abstract operation
22699
22731
  // https://tc39.es/ecma262/#sec-hasownproperty
22700
- // eslint-disable-next-line es-x/no-object-hasown -- safe
22732
+ // eslint-disable-next-line es/no-object-hasown -- safe
22701
22733
  var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
22702
22734
  return hasOwnProperty(toObject(it), key);
22703
22735
  };
@@ -22710,21 +22742,15 @@ var uid = function (key) {
22710
22742
  return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$3(++id + postfix, 36);
22711
22743
  };
22712
22744
 
22713
- var WellKnownSymbolsStore = shared('wks');
22714
22745
  var Symbol$1 = global_1.Symbol;
22715
- var symbolFor = Symbol$1 && Symbol$1['for'];
22716
- var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
22746
+ var WellKnownSymbolsStore = shared('wks');
22747
+ var createWellKnownSymbol = useSymbolAsUid ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
22717
22748
 
22718
22749
  var wellKnownSymbol = function (name) {
22719
- if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
22720
- var description = 'Symbol.' + name;
22721
- if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) {
22722
- WellKnownSymbolsStore[name] = Symbol$1[name];
22723
- } else if (useSymbolAsUid && symbolFor) {
22724
- WellKnownSymbolsStore[name] = symbolFor(description);
22725
- } else {
22726
- WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
22727
- }
22750
+ if (!hasOwnProperty_1(WellKnownSymbolsStore, name)) {
22751
+ WellKnownSymbolsStore[name] = symbolConstructorDetection && hasOwnProperty_1(Symbol$1, name)
22752
+ ? Symbol$1[name]
22753
+ : createWellKnownSymbol('Symbol.' + name);
22728
22754
  } return WellKnownSymbolsStore[name];
22729
22755
  };
22730
22756
 
@@ -22741,7 +22767,7 @@ var toPrimitive = function (input, pref) {
22741
22767
  if (pref === undefined) pref = 'default';
22742
22768
  result = functionCall(exoticToPrim, input, pref);
22743
22769
  if (!isObject(result) || isSymbol(result)) return result;
22744
- throw $TypeError$3("Can't convert object to primitive value");
22770
+ throw new $TypeError$3("Can't convert object to primitive value");
22745
22771
  }
22746
22772
  if (pref === undefined) pref = 'number';
22747
22773
  return ordinaryToPrimitive(input, pref);
@@ -22764,13 +22790,13 @@ var documentCreateElement = function (it) {
22764
22790
 
22765
22791
  // Thanks to IE8 for its funny defineProperty
22766
22792
  var ie8DomDefine = !descriptors && !fails(function () {
22767
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
22793
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
22768
22794
  return Object.defineProperty(documentCreateElement('div'), 'a', {
22769
22795
  get: function () { return 7; }
22770
- }).a != 7;
22796
+ }).a !== 7;
22771
22797
  });
22772
22798
 
22773
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
22799
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
22774
22800
  var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
22775
22801
 
22776
22802
  // `Object.getOwnPropertyDescriptor` method
@@ -22791,26 +22817,26 @@ var objectGetOwnPropertyDescriptor = {
22791
22817
  // V8 ~ Chrome 36-
22792
22818
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
22793
22819
  var v8PrototypeDefineBug = descriptors && fails(function () {
22794
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
22820
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
22795
22821
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
22796
22822
  value: 42,
22797
22823
  writable: false
22798
- }).prototype != 42;
22824
+ }).prototype !== 42;
22799
22825
  });
22800
22826
 
22801
- var $String$1 = String;
22827
+ var $String$2 = String;
22802
22828
  var $TypeError$4 = TypeError;
22803
22829
 
22804
22830
  // `Assert: Type(argument) is Object`
22805
22831
  var anObject = function (argument) {
22806
22832
  if (isObject(argument)) return argument;
22807
- throw $TypeError$4($String$1(argument) + ' is not an object');
22833
+ throw new $TypeError$4($String$2(argument) + ' is not an object');
22808
22834
  };
22809
22835
 
22810
22836
  var $TypeError$5 = TypeError;
22811
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
22837
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
22812
22838
  var $defineProperty = Object.defineProperty;
22813
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
22839
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
22814
22840
  var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
22815
22841
  var ENUMERABLE = 'enumerable';
22816
22842
  var CONFIGURABLE = 'configurable';
@@ -22840,7 +22866,7 @@ var f$2 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Att
22840
22866
  if (ie8DomDefine) try {
22841
22867
  return $defineProperty(O, P, Attributes);
22842
22868
  } catch (error) { /* empty */ }
22843
- if ('get' in Attributes || 'set' in Attributes) throw $TypeError$5('Accessors not supported');
22869
+ if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$5('Accessors not supported');
22844
22870
  if ('value' in Attributes) O[P] = Attributes.value;
22845
22871
  return O;
22846
22872
  };
@@ -22857,7 +22883,7 @@ var createNonEnumerableProperty = descriptors ? function (object, key, value) {
22857
22883
  };
22858
22884
 
22859
22885
  var FunctionPrototype$1 = Function.prototype;
22860
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
22886
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
22861
22887
  var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
22862
22888
 
22863
22889
  var EXISTS$1 = hasOwnProperty_1(FunctionPrototype$1, 'name');
@@ -22884,7 +22910,7 @@ var inspectSource = sharedStore.inspectSource;
22884
22910
 
22885
22911
  var WeakMap$1 = global_1.WeakMap;
22886
22912
 
22887
- var nativeWeakMap = isCallable(WeakMap$1) && /native code/.test(inspectSource(WeakMap$1));
22913
+ var weakMapBasicDetection = isCallable(WeakMap$1) && /native code/.test(String(WeakMap$1));
22888
22914
 
22889
22915
  var keys$1 = shared('keys');
22890
22916
 
@@ -22907,27 +22933,29 @@ var getterFor = function (TYPE) {
22907
22933
  return function (it) {
22908
22934
  var state;
22909
22935
  if (!isObject(it) || (state = get(it)).type !== TYPE) {
22910
- throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
22936
+ throw new TypeError$1('Incompatible receiver, ' + TYPE + ' required');
22911
22937
  } return state;
22912
22938
  };
22913
22939
  };
22914
22940
 
22915
- if (nativeWeakMap || sharedStore.state) {
22941
+ if (weakMapBasicDetection || sharedStore.state) {
22916
22942
  var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$2());
22917
- var wmget = functionUncurryThis(store$1.get);
22918
- var wmhas = functionUncurryThis(store$1.has);
22919
- var wmset = functionUncurryThis(store$1.set);
22943
+ /* eslint-disable no-self-assign -- prototype methods protection */
22944
+ store$1.get = store$1.get;
22945
+ store$1.has = store$1.has;
22946
+ store$1.set = store$1.set;
22947
+ /* eslint-enable no-self-assign -- prototype methods protection */
22920
22948
  set = function (it, metadata) {
22921
- if (wmhas(store$1, it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
22949
+ if (store$1.has(it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
22922
22950
  metadata.facade = it;
22923
- wmset(store$1, it, metadata);
22951
+ store$1.set(it, metadata);
22924
22952
  return metadata;
22925
22953
  };
22926
22954
  get = function (it) {
22927
- return wmget(store$1, it) || {};
22955
+ return store$1.get(it) || {};
22928
22956
  };
22929
22957
  has = function (it) {
22930
- return wmhas(store$1, it);
22958
+ return store$1.has(it);
22931
22959
  };
22932
22960
  } else {
22933
22961
  var STATE = sharedKey('state');
@@ -22955,14 +22983,23 @@ var internalState = {
22955
22983
  };
22956
22984
 
22957
22985
  var makeBuiltIn_1 = createCommonjsModule(function (module) {
22986
+
22987
+
22988
+
22989
+
22990
+
22958
22991
  var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
22959
22992
 
22960
22993
 
22961
22994
 
22962
22995
  var enforceInternalState = internalState.enforce;
22963
22996
  var getInternalState = internalState.get;
22964
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
22997
+ var $String = String;
22998
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
22965
22999
  var defineProperty = Object.defineProperty;
23000
+ var stringSlice = functionUncurryThis(''.slice);
23001
+ var replace = functionUncurryThis(''.replace);
23002
+ var join = functionUncurryThis([].join);
22966
23003
 
22967
23004
  var CONFIGURABLE_LENGTH = descriptors && !fails(function () {
22968
23005
  return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
@@ -22971,8 +23008,8 @@ var CONFIGURABLE_LENGTH = descriptors && !fails(function () {
22971
23008
  var TEMPLATE = String(String).split('String');
22972
23009
 
22973
23010
  var makeBuiltIn = module.exports = function (value, name, options) {
22974
- if (String(name).slice(0, 7) === 'Symbol(') {
22975
- name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
23011
+ if (stringSlice($String(name), 0, 7) === 'Symbol(') {
23012
+ name = '[' + replace($String(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
22976
23013
  }
22977
23014
  if (options && options.getter) name = 'get ' + name;
22978
23015
  if (options && options.setter) name = 'set ' + name;
@@ -22991,7 +23028,7 @@ var makeBuiltIn = module.exports = function (value, name, options) {
22991
23028
  } catch (error) { /* empty */ }
22992
23029
  var state = enforceInternalState(value);
22993
23030
  if (!hasOwnProperty_1(state, 'source')) {
22994
- state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
23031
+ state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
22995
23032
  } return value;
22996
23033
  };
22997
23034
 
@@ -23030,7 +23067,7 @@ var floor = Math.floor;
23030
23067
 
23031
23068
  // `Math.trunc` method
23032
23069
  // https://tc39.es/ecma262/#sec-math.trunc
23033
- // eslint-disable-next-line es-x/no-math-trunc -- safe
23070
+ // eslint-disable-next-line es/no-math-trunc -- safe
23034
23071
  var mathTrunc = Math.trunc || function trunc(x) {
23035
23072
  var n = +x;
23036
23073
  return (n > 0 ? floor : ceil)(n);
@@ -23078,10 +23115,10 @@ var createMethod = function (IS_INCLUDES) {
23078
23115
  var value;
23079
23116
  // Array#includes uses SameValueZero equality algorithm
23080
23117
  // eslint-disable-next-line no-self-compare -- NaN check
23081
- if (IS_INCLUDES && el != el) while (length > index) {
23118
+ if (IS_INCLUDES && el !== el) while (length > index) {
23082
23119
  value = O[index++];
23083
23120
  // eslint-disable-next-line no-self-compare -- NaN check
23084
- if (value != value) return true;
23121
+ if (value !== value) return true;
23085
23122
  // Array#indexOf ignores holes, Array#includes - not
23086
23123
  } else for (;length > index; index++) {
23087
23124
  if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
@@ -23131,7 +23168,7 @@ var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
23131
23168
 
23132
23169
  // `Object.getOwnPropertyNames` method
23133
23170
  // https://tc39.es/ecma262/#sec-object.getownpropertynames
23134
- // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
23171
+ // eslint-disable-next-line es/no-object-getownpropertynames -- safe
23135
23172
  var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
23136
23173
  return objectKeysInternal(O, hiddenKeys$1);
23137
23174
  };
@@ -23140,7 +23177,7 @@ var objectGetOwnPropertyNames = {
23140
23177
  f: f$3
23141
23178
  };
23142
23179
 
23143
- // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
23180
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
23144
23181
  var f$4 = Object.getOwnPropertySymbols;
23145
23182
 
23146
23183
  var objectGetOwnPropertySymbols = {
@@ -23172,8 +23209,8 @@ var replacement = /#|\.prototype\./;
23172
23209
 
23173
23210
  var isForced = function (feature, detection) {
23174
23211
  var value = data[normalize(feature)];
23175
- return value == POLYFILL ? true
23176
- : value == NATIVE ? false
23212
+ return value === POLYFILL ? true
23213
+ : value === NATIVE ? false
23177
23214
  : isCallable(detection) ? fails(detection)
23178
23215
  : !!detection;
23179
23216
  };
@@ -23253,7 +23290,7 @@ var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
23253
23290
  var $Object$3 = Object;
23254
23291
 
23255
23292
  // ES3 wrong here
23256
- var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
23293
+ var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';
23257
23294
 
23258
23295
  // fallback for IE11 Script Access Denied error
23259
23296
  var tryGet = function (it, key) {
@@ -23271,25 +23308,25 @@ var classof = toStringTagSupport ? classofRaw : function (it) {
23271
23308
  // builtinTag case
23272
23309
  : CORRECT_ARGUMENTS ? classofRaw(O)
23273
23310
  // ES3 arguments fallback
23274
- : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
23311
+ : (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;
23275
23312
  };
23276
23313
 
23277
- var $String$2 = String;
23314
+ var $String$3 = String;
23278
23315
 
23279
23316
  var toString_1 = function (argument) {
23280
- if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
23281
- return $String$2(argument);
23317
+ if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
23318
+ return $String$3(argument);
23282
23319
  };
23283
23320
 
23284
23321
  var charAt = functionUncurryThis(''.charAt);
23285
23322
 
23286
23323
  var FORCED = fails(function () {
23287
- // eslint-disable-next-line es-x/no-array-string-prototype-at -- safe
23324
+ // eslint-disable-next-line es/no-array-string-prototype-at -- safe
23288
23325
  return '𠮷'.at(-2) !== '\uD842';
23289
23326
  });
23290
23327
 
23291
23328
  // `String.prototype.at` method
23292
- // https://github.com/tc39/proposal-relative-indexing-method
23329
+ // https://tc39.es/ecma262/#sec-string.prototype.at
23293
23330
  _export({ target: 'String', proto: true, forced: FORCED }, {
23294
23331
  at: function at(index) {
23295
23332
  var S = toString_1(requireObjectCoercible(this));
@@ -23302,14 +23339,14 @@ _export({ target: 'String', proto: true, forced: FORCED }, {
23302
23339
 
23303
23340
  // `Object.keys` method
23304
23341
  // https://tc39.es/ecma262/#sec-object.keys
23305
- // eslint-disable-next-line es-x/no-object-keys -- safe
23342
+ // eslint-disable-next-line es/no-object-keys -- safe
23306
23343
  var objectKeys = Object.keys || function keys(O) {
23307
23344
  return objectKeysInternal(O, enumBugKeys);
23308
23345
  };
23309
23346
 
23310
23347
  // `Object.defineProperties` method
23311
23348
  // https://tc39.es/ecma262/#sec-object.defineproperties
23312
- // eslint-disable-next-line es-x/no-object-defineproperties -- safe
23349
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
23313
23350
  var f$5 = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
23314
23351
  anObject(O);
23315
23352
  var props = toIndexedObject(Properties);
@@ -23398,7 +23435,7 @@ hiddenKeys[IE_PROTO] = true;
23398
23435
 
23399
23436
  // `Object.create` method
23400
23437
  // https://tc39.es/ecma262/#sec-object.create
23401
- // eslint-disable-next-line es-x/no-object-create -- safe
23438
+ // eslint-disable-next-line es/no-object-create -- safe
23402
23439
  var objectCreate = Object.create || function create(O, Properties) {
23403
23440
  var result;
23404
23441
  if (O !== null) {
@@ -23418,7 +23455,7 @@ var ArrayPrototype = Array.prototype;
23418
23455
 
23419
23456
  // Array.prototype[@@unscopables]
23420
23457
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
23421
- if (ArrayPrototype[UNSCOPABLES] == undefined) {
23458
+ if (ArrayPrototype[UNSCOPABLES] === undefined) {
23422
23459
  defineProperty$1(ArrayPrototype, UNSCOPABLES, {
23423
23460
  configurable: true,
23424
23461
  value: objectCreate(null)
@@ -23431,7 +23468,7 @@ var addToUnscopables = function (key) {
23431
23468
  };
23432
23469
 
23433
23470
  // `Array.prototype.at` method
23434
- // https://github.com/tc39/proposal-relative-indexing-method
23471
+ // https://tc39.es/ecma262/#sec-array.prototype.at
23435
23472
  _export({ target: 'Array', proto: true }, {
23436
23473
  at: function at(index) {
23437
23474
  var O = toObject(this);
@@ -23444,13 +23481,19 @@ _export({ target: 'Array', proto: true }, {
23444
23481
 
23445
23482
  addToUnscopables('at');
23446
23483
 
23447
- // eslint-disable-next-line es-x/no-typed-arrays -- safe
23448
- var arrayBufferNative = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
23484
+ // eslint-disable-next-line es/no-typed-arrays -- safe
23485
+ var arrayBufferBasicDetection = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
23486
+
23487
+ var defineBuiltInAccessor = function (target, name, descriptor) {
23488
+ if (descriptor.get) makeBuiltIn_1(descriptor.get, name, { getter: true });
23489
+ if (descriptor.set) makeBuiltIn_1(descriptor.set, name, { setter: true });
23490
+ return objectDefineProperty.f(target, name, descriptor);
23491
+ };
23449
23492
 
23450
23493
  var correctPrototypeGetter = !fails(function () {
23451
23494
  function F() { /* empty */ }
23452
23495
  F.prototype.constructor = null;
23453
- // eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing
23496
+ // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
23454
23497
  return Object.getPrototypeOf(new F()) !== F.prototype;
23455
23498
  });
23456
23499
 
@@ -23460,7 +23503,7 @@ var ObjectPrototype = $Object$4.prototype;
23460
23503
 
23461
23504
  // `Object.getPrototypeOf` method
23462
23505
  // https://tc39.es/ecma262/#sec-object.getprototypeof
23463
- // eslint-disable-next-line es-x/no-object-getprototypeof -- safe
23506
+ // eslint-disable-next-line es/no-object-getprototypeof -- safe
23464
23507
  var objectGetPrototypeOf = correctPrototypeGetter ? $Object$4.getPrototypeOf : function (O) {
23465
23508
  var object = toObject(O);
23466
23509
  if (hasOwnProperty_1(object, IE_PROTO$1)) return object[IE_PROTO$1];
@@ -23470,12 +23513,19 @@ var objectGetPrototypeOf = correctPrototypeGetter ? $Object$4.getPrototypeOf : f
23470
23513
  } return object instanceof $Object$4 ? ObjectPrototype : null;
23471
23514
  };
23472
23515
 
23473
- var $String$3 = String;
23516
+ var functionUncurryThisAccessor = function (object, key, method) {
23517
+ try {
23518
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
23519
+ return functionUncurryThis(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));
23520
+ } catch (error) { /* empty */ }
23521
+ };
23522
+
23523
+ var $String$4 = String;
23474
23524
  var $TypeError$6 = TypeError;
23475
23525
 
23476
23526
  var aPossiblePrototype = function (argument) {
23477
23527
  if (typeof argument == 'object' || isCallable(argument)) return argument;
23478
- throw $TypeError$6("Can't set " + $String$3(argument) + ' as a prototype');
23528
+ throw new $TypeError$6("Can't set " + $String$4(argument) + ' as a prototype');
23479
23529
  };
23480
23530
 
23481
23531
  /* eslint-disable no-proto -- safe */
@@ -23486,14 +23536,13 @@ var aPossiblePrototype = function (argument) {
23486
23536
  // `Object.setPrototypeOf` method
23487
23537
  // https://tc39.es/ecma262/#sec-object.setprototypeof
23488
23538
  // Works with __proto__ only. Old v8 can't work with null proto objects.
23489
- // eslint-disable-next-line es-x/no-object-setprototypeof -- safe
23539
+ // eslint-disable-next-line es/no-object-setprototypeof -- safe
23490
23540
  var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
23491
23541
  var CORRECT_SETTER = false;
23492
23542
  var test = {};
23493
23543
  var setter;
23494
23544
  try {
23495
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
23496
- setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
23545
+ setter = functionUncurryThisAccessor(Object.prototype, '__proto__', 'set');
23497
23546
  setter(test, []);
23498
23547
  CORRECT_SETTER = test instanceof Array;
23499
23548
  } catch (error) { /* empty */ }
@@ -23506,14 +23555,6 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
23506
23555
  };
23507
23556
  }() : undefined);
23508
23557
 
23509
- var defineProperty$2 = objectDefineProperty.f;
23510
-
23511
-
23512
-
23513
-
23514
-
23515
-
23516
-
23517
23558
  var enforceInternalState = internalState.enforce;
23518
23559
  var getInternalState = internalState.get;
23519
23560
  var Int8Array = global_1.Int8Array;
@@ -23529,7 +23570,7 @@ var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
23529
23570
  var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
23530
23571
  var TYPED_ARRAY_CONSTRUCTOR = 'TypedArrayConstructor';
23531
23572
  // Fixing native typed arrays in Opera Presto crashes the browser, see #595
23532
- var NATIVE_ARRAY_BUFFER_VIEWS = arrayBufferNative && !!objectSetPrototypeOf && classof(global_1.opera) !== 'Opera';
23573
+ var NATIVE_ARRAY_BUFFER_VIEWS = arrayBufferBasicDetection && !!objectSetPrototypeOf && classof(global_1.opera) !== 'Opera';
23533
23574
  var TYPED_ARRAY_TAG_REQUIRED = false;
23534
23575
  var NAME, Constructor, Prototype;
23535
23576
 
@@ -23574,12 +23615,12 @@ var isTypedArray = function (it) {
23574
23615
 
23575
23616
  var aTypedArray = function (it) {
23576
23617
  if (isTypedArray(it)) return it;
23577
- throw TypeError$2('Target is not a typed array');
23618
+ throw new TypeError$2('Target is not a typed array');
23578
23619
  };
23579
23620
 
23580
23621
  var aTypedArrayConstructor = function (C) {
23581
23622
  if (isCallable(C) && (!objectSetPrototypeOf || objectIsPrototypeOf(TypedArray, C))) return C;
23582
- throw TypeError$2(tryToString(C) + ' is not a typed array constructor');
23623
+ throw new TypeError$2(tryToString(C) + ' is not a typed array constructor');
23583
23624
  };
23584
23625
 
23585
23626
  var exportTypedArrayMethod = function (KEY, property, forced, options) {
@@ -23643,7 +23684,7 @@ for (NAME in BigIntArrayConstructorsList) {
23643
23684
  if (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) {
23644
23685
  // eslint-disable-next-line no-shadow -- safe
23645
23686
  TypedArray = function TypedArray() {
23646
- throw TypeError$2('Incorrect invocation');
23687
+ throw new TypeError$2('Incorrect invocation');
23647
23688
  };
23648
23689
  if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
23649
23690
  if (global_1[NAME]) objectSetPrototypeOf(global_1[NAME], TypedArray);
@@ -23664,9 +23705,12 @@ if (NATIVE_ARRAY_BUFFER_VIEWS && objectGetPrototypeOf(Uint8ClampedArrayPrototype
23664
23705
 
23665
23706
  if (descriptors && !hasOwnProperty_1(TypedArrayPrototype, TO_STRING_TAG$2)) {
23666
23707
  TYPED_ARRAY_TAG_REQUIRED = true;
23667
- defineProperty$2(TypedArrayPrototype, TO_STRING_TAG$2, { get: function () {
23668
- return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;
23669
- } });
23708
+ defineBuiltInAccessor(TypedArrayPrototype, TO_STRING_TAG$2, {
23709
+ configurable: true,
23710
+ get: function () {
23711
+ return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;
23712
+ }
23713
+ });
23670
23714
  for (NAME in TypedArrayConstructorsList) if (global_1[NAME]) {
23671
23715
  createNonEnumerableProperty(global_1[NAME], TYPED_ARRAY_TAG, NAME);
23672
23716
  }
@@ -23690,7 +23734,7 @@ var aTypedArray$1 = arrayBufferViewCore.aTypedArray;
23690
23734
  var exportTypedArrayMethod$1 = arrayBufferViewCore.exportTypedArrayMethod;
23691
23735
 
23692
23736
  // `%TypedArray%.prototype.at` method
23693
- // https://github.com/tc39/proposal-relative-indexing-method
23737
+ // https://tc39.es/ecma262/#sec-%typedarray%.prototype.at
23694
23738
  exportTypedArrayMethod$1('at', function at(index) {
23695
23739
  var O = aTypedArray$1(this);
23696
23740
  var len = lengthOfArrayLike(O);
@@ -23701,9 +23745,11 @@ exportTypedArrayMethod$1('at', function at(index) {
23701
23745
 
23702
23746
  var selectedColor = "".concat(MATISSE_BLUE);
23703
23747
  var hoverColor$3 = "".concat(HOVER_LIGHT_BLUE);
23748
+ var focusColor = "".concat(MATISSE_BLUE_DARK);
23704
23749
  var fallbackValues$f = {
23705
23750
  selectedColor: selectedColor,
23706
- hoverColor: hoverColor$3
23751
+ hoverColor: hoverColor$3,
23752
+ focusColor: focusColor
23707
23753
  };
23708
23754
 
23709
23755
  var IconWrapper = styled__default.div.withConfig({
@@ -23726,7 +23772,7 @@ var DropdownContentWrapper = styled__default.div.withConfig({
23726
23772
  var DropdownItemWrapper = styled__default.li.withConfig({
23727
23773
  displayName: "Dropdown__DropdownItemWrapper",
23728
23774
  componentId: "sc-pn6m0h-2"
23729
- })(["background-color:", ";text-align:start;border-width:0px;border-color:transparent;box-shadow:none;padding:1rem;box-sizing:border-box;width:100%;list-style:none;cursor:", ";&:hover{background-color:", ";}&:focus{background-color:", ";outline:none;}"], function (_ref4) {
23775
+ })(["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
23776
  var selected = _ref4.selected,
23731
23777
  themeValues = _ref4.themeValues;
23732
23778
  return selected ? themeValues.selectedColor : WHITE;
@@ -23734,48 +23780,69 @@ var DropdownItemWrapper = styled__default.li.withConfig({
23734
23780
  var disabled = _ref5.disabled;
23735
23781
  return disabled ? "default" : "pointer";
23736
23782
  }, function (_ref6) {
23737
- var selected = _ref6.selected,
23738
- disabled = _ref6.disabled,
23783
+ var disabled = _ref6.disabled,
23784
+ selected = _ref6.selected,
23739
23785
  themeValues = _ref6.themeValues;
23740
- return selected ? themeValues.selectedColor : disabled ? WHITE : themeValues.hoverColor;
23786
+ return selected ? themeValues.focusColor : disabled ? WHITE : themeValues.hoverColor;
23741
23787
  }, function (_ref7) {
23742
23788
  var selected = _ref7.selected,
23743
23789
  disabled = _ref7.disabled,
23744
23790
  themeValues = _ref7.themeValues;
23745
- return selected ? themeValues.selectedColor : disabled ? WHITE : themeValues.hoverColor;
23791
+ return selected ? themeValues.focusColor : disabled ? WHITE : themeValues.hoverColor;
23792
+ }, function (_ref8) {
23793
+ var selected = _ref8.selected,
23794
+ disabled = _ref8.disabled,
23795
+ themeValues = _ref8.themeValues;
23796
+ return selected ? themeValues.focusColor : disabled ? WHITE : themeValues.hoverColor;
23797
+ }, function (_ref9) {
23798
+ var themeValues = _ref9.themeValues;
23799
+ return themeValues.selectedColor;
23800
+ }, function (_ref10) {
23801
+ var selected = _ref10.selected,
23802
+ disabled = _ref10.disabled,
23803
+ themeValues = _ref10.themeValues;
23804
+ return selected ? themeValues.focusColor : disabled ? WHITE : themeValues.hoverColor;
23805
+ });
23806
+ var DropdownItemBorder = styled__default.div.withConfig({
23807
+ displayName: "Dropdown__DropdownItemBorder",
23808
+ componentId: "sc-pn6m0h-3"
23809
+ })(["background:", ";border-color:", ";border-width:2px;border-style:solid;padding:12px;"], function (_ref11) {
23810
+ var selected = _ref11.selected,
23811
+ themeValues = _ref11.themeValues;
23812
+ return selected ? themeValues.selectedColor : WHITE;
23813
+ }, function (_ref12) {
23814
+ var selected = _ref12.selected,
23815
+ themeValues = _ref12.themeValues;
23816
+ return selected ? themeValues.selectedColor : WHITE;
23746
23817
  });
23747
23818
 
23748
- var Dropdown = function Dropdown(_ref8) {
23749
- var placeholder = _ref8.placeholder,
23750
- options = _ref8.options,
23751
- value = _ref8.value,
23752
- isOpen = _ref8.isOpen,
23753
- isError = _ref8.isError,
23754
- onSelect = _ref8.onSelect,
23755
- _ref8$disabledValues = _ref8.disabledValues,
23756
- disabledValues = _ref8$disabledValues === void 0 ? [] : _ref8$disabledValues,
23757
- _ref8$onClick = _ref8.onClick,
23758
- _onClick = _ref8$onClick === void 0 ? noop : _ref8$onClick,
23759
- themeValues = _ref8.themeValues,
23760
- maxHeight = _ref8.maxHeight,
23761
- _ref8$widthFitOptions = _ref8.widthFitOptions,
23762
- widthFitOptions = _ref8$widthFitOptions === void 0 ? false : _ref8$widthFitOptions,
23763
- disabled = _ref8.disabled,
23764
- _ref8$hasTitles = _ref8.hasTitles,
23765
- hasTitles = _ref8$hasTitles === void 0 ? false : _ref8$hasTitles,
23766
- _ref8$autoEraseTypeAh = _ref8.autoEraseTypeAhead,
23767
- autoEraseTypeAhead = _ref8$autoEraseTypeAh === void 0 ? true : _ref8$autoEraseTypeAh,
23768
- ariaLabelledby = _ref8.ariaLabelledby,
23769
- ariaDescribedby = _ref8.ariaDescribedby,
23770
- autocompleteValue = _ref8.autocompleteValue,
23771
- _ref8$smoothScroll = _ref8.smoothScroll,
23772
- smoothScroll = _ref8$smoothScroll === void 0 ? true : _ref8$smoothScroll,
23773
- _ref8$ariaInvalid = _ref8.ariaInvalid,
23774
- ariaInvalid = _ref8$ariaInvalid === void 0 ? false : _ref8$ariaInvalid,
23775
- _ref8$isRequired = _ref8.isRequired,
23776
- isRequired = _ref8$isRequired === void 0 ? false : _ref8$isRequired;
23777
-
23778
- var required = options.required || isRequired;
23819
+ var Dropdown = function Dropdown(_ref13) {
23820
+ var placeholder = _ref13.placeholder,
23821
+ options = _ref13.options,
23822
+ value = _ref13.value,
23823
+ isOpen = _ref13.isOpen,
23824
+ isError = _ref13.isError,
23825
+ onSelect = _ref13.onSelect,
23826
+ _ref13$disabledValues = _ref13.disabledValues,
23827
+ disabledValues = _ref13$disabledValues === void 0 ? [] : _ref13$disabledValues,
23828
+ _ref13$onClick = _ref13.onClick,
23829
+ _onClick = _ref13$onClick === void 0 ? noop : _ref13$onClick,
23830
+ themeValues = _ref13.themeValues,
23831
+ maxHeight = _ref13.maxHeight,
23832
+ _ref13$widthFitOption = _ref13.widthFitOptions,
23833
+ widthFitOptions = _ref13$widthFitOption === void 0 ? false : _ref13$widthFitOption,
23834
+ disabled = _ref13.disabled,
23835
+ _ref13$hasTitles = _ref13.hasTitles,
23836
+ hasTitles = _ref13$hasTitles === void 0 ? false : _ref13$hasTitles,
23837
+ _ref13$autoEraseTypeA = _ref13.autoEraseTypeAhead,
23838
+ autoEraseTypeAhead = _ref13$autoEraseTypeA === void 0 ? true : _ref13$autoEraseTypeA,
23839
+ ariaLabelledby = _ref13.ariaLabelledby,
23840
+ ariaDescribedby = _ref13.ariaDescribedby,
23841
+ autocompleteValue = _ref13.autocompleteValue,
23842
+ _ref13$smoothScroll = _ref13.smoothScroll,
23843
+ smoothScroll = _ref13$smoothScroll === void 0 ? true : _ref13$smoothScroll,
23844
+ _ref13$ariaInvalid = _ref13.ariaInvalid,
23845
+ ariaInvalid = _ref13$ariaInvalid === void 0 ? false : _ref13$ariaInvalid;
23779
23846
 
23780
23847
  var _useState = React.useState(""),
23781
23848
  _useState2 = _slicedToArray(_useState, 2),
@@ -24024,8 +24091,7 @@ var Dropdown = function Dropdown(_ref8) {
24024
24091
  "aria-labelledby": ariaLabelledby,
24025
24092
  "aria-describedby": ariaDescribedby,
24026
24093
  "aria-expanded": isOpen,
24027
- "aria-required": required,
24028
- required: required,
24094
+ "aria-required": options.required,
24029
24095
  "aria-invalid": ariaInvalid,
24030
24096
  background: isOpen ? themeValues.hoverColor : WHITE,
24031
24097
  borderRadius: "2px",
@@ -24047,14 +24113,14 @@ var Dropdown = function Dropdown(_ref8) {
24047
24113
  },
24048
24114
  padding: "12px",
24049
24115
  placeholder: getSelection(),
24116
+ required: options.required,
24050
24117
  role: "combobox",
24051
24118
  themeValues: themeValues,
24052
24119
  title: hasTitles ? getSelection() : null,
24053
24120
  type: "text",
24054
24121
  tabIndex: 0,
24055
24122
  value: inputValue,
24056
- width: "100%",
24057
- disabled: disabledValues.includes(inputValue)
24123
+ width: "100%"
24058
24124
  }), /*#__PURE__*/React__default.createElement(IconWrapper, {
24059
24125
  open: isOpen,
24060
24126
  onClick: _onClick
@@ -24065,8 +24131,7 @@ var Dropdown = function Dropdown(_ref8) {
24065
24131
  widthFitOptions: widthFitOptions,
24066
24132
  tabIndex: 0,
24067
24133
  role: "listbox",
24068
- id: "".concat(ariaLabelledby, "_listbox"),
24069
- required: required
24134
+ id: "".concat(ariaLabelledby, "_listbox")
24070
24135
  }, /*#__PURE__*/React__default.createElement(Stack, {
24071
24136
  childGap: "0",
24072
24137
  as: "ul"
@@ -24099,11 +24164,15 @@ var Dropdown = function Dropdown(_ref8) {
24099
24164
  onFocus: function onFocus() {
24100
24165
  return setFocusedRef(optionRefs.current[i]);
24101
24166
  }
24167
+ }, /*#__PURE__*/React__default.createElement(DropdownItemBorder, {
24168
+ disabled: disabledValues.includes(choice.value),
24169
+ selected: choice.value === value,
24170
+ themeValues: themeValues
24102
24171
  }, /*#__PURE__*/React__default.createElement(Text$1, {
24103
24172
  variant: "p",
24104
24173
  color: choice.value === value ? WHITE : disabledValues.includes(choice.value) ? STORM_GREY : MINESHAFT_GREY,
24105
- extraStyles: "padding-left: 16px;\n cursor: ".concat(disabledValues.includes(choice.value) ? "default" : "pointer", ";\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;")
24106
- }, choice.text));
24174
+ extraStyles: "padding-left: 16px;\n cursor: ".concat(disabledValues.includes(choice.value) ? "default" : "pointer", ";\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;")
24175
+ }, choice.text)));
24107
24176
  }))) : /*#__PURE__*/React__default.createElement(React.Fragment, null)));
24108
24177
  };
24109
24178
 
@@ -24212,9 +24281,7 @@ var FormSelect = function FormSelect(_ref) {
24212
24281
  _ref$dataQa = _ref.dataQa,
24213
24282
  dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
24214
24283
  _ref$widthFitOptions = _ref.widthFitOptions,
24215
- widthFitOptions = _ref$widthFitOptions === void 0 ? false : _ref$widthFitOptions,
24216
- _ref$isRequired = _ref.isRequired,
24217
- isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
24284
+ widthFitOptions = _ref$widthFitOptions === void 0 ? false : _ref$widthFitOptions;
24218
24285
 
24219
24286
  var _useState = React.useState(false),
24220
24287
  _useState2 = _slicedToArray(_useState, 2),
@@ -24222,17 +24289,6 @@ var FormSelect = function FormSelect(_ref) {
24222
24289
  setOpen = _useState2[1];
24223
24290
 
24224
24291
  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
24292
 
24237
24293
  var handleClickAway = function handleClickAway(event) {
24238
24294
  if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
@@ -24248,8 +24304,8 @@ var FormSelect = function FormSelect(_ref) {
24248
24304
  });
24249
24305
  return /*#__PURE__*/React__default.createElement(SelectContainer, {
24250
24306
  ref: dropdownRef,
24251
- "aria-role": "group",
24252
24307
  disabled: disabled,
24308
+ "aria-disabled": disabled,
24253
24309
  "data-qa": dataQa
24254
24310
  }, /*#__PURE__*/React__default.createElement(Box, {
24255
24311
  padding: "0",
@@ -24263,10 +24319,10 @@ var FormSelect = function FormSelect(_ref) {
24263
24319
  color: themeValues.labelColor,
24264
24320
  weight: themeValues.fontWeight,
24265
24321
  extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
24266
- id: labelId(labelTextWhenNoError)
24322
+ id: createIdFromString(labelTextWhenNoError)
24267
24323
  }, labelTextWhenNoError))), /*#__PURE__*/React__default.createElement(Dropdown$1, {
24268
- ariaLabelledby: labelId(labelTextWhenNoError),
24269
- ariaDescribedby: descriptionId(field, labelTextWhenNoError),
24324
+ ariaLabelledby: createIdFromString(labelTextWhenNoError),
24325
+ ariaDescribedby: createIdFromString(labelTextWhenNoError, "error message"),
24270
24326
  maxHeight: dropdownMaxHeight,
24271
24327
  widthFitOptions: widthFitOptions,
24272
24328
  hasTitles: hasTitles,
@@ -24287,12 +24343,11 @@ var FormSelect = function FormSelect(_ref) {
24287
24343
  },
24288
24344
  disabled: disabled,
24289
24345
  autocompleteValue: autocompleteValue,
24290
- smoothScroll: smoothScroll,
24291
- isRequired: required
24346
+ smoothScroll: smoothScroll
24292
24347
  }), /*#__PURE__*/React__default.createElement(Stack, {
24293
24348
  direction: "row",
24294
24349
  justify: "space-between"
24295
- }, /*#__PURE__*/React__default.createElement(Text$1, {
24350
+ }, field.hasErrors && field.dirty || field.hasErrors && showErrors ? /*#__PURE__*/React__default.createElement(Text$1, {
24296
24351
  color: ERROR_COLOR,
24297
24352
  variant: "pXS",
24298
24353
  weight: themeValues.fontWeight,
@@ -24301,7 +24356,9 @@ var FormSelect = function FormSelect(_ref) {
24301
24356
  "aria-live": "polite",
24302
24357
  "aria-atomic": true,
24303
24358
  "data-qa": createIdFromString(labelTextWhenNoError, "error message")
24304
- }, field.hasErrors && field.dirty || field.hasErrors && showErrors ? errorMessages[field.errors[0]] : "")));
24359
+ }, errorMessages[field.errors[0]]) : /*#__PURE__*/React__default.createElement(Text$1, {
24360
+ extraStyles: "height: ".concat(themeValues.lineHeight, ";")
24361
+ })));
24305
24362
  };
24306
24363
 
24307
24364
  var FormSelect$1 = themeComponent(FormSelect, "FormSelect", fallbackValues$g, "default");
@@ -25058,9 +25115,7 @@ var CountryDropdown = function CountryDropdown(_ref) {
25058
25115
  showErrors = _ref.showErrors,
25059
25116
  onChange = _ref.onChange,
25060
25117
  _ref$dataQa = _ref.dataQa,
25061
- dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa,
25062
- _ref$isRequired = _ref.isRequired,
25063
- isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
25118
+ dataQa = _ref$dataQa === void 0 ? null : _ref$dataQa;
25064
25119
  return /*#__PURE__*/React__default.createElement(FormSelect$1, {
25065
25120
  options: options,
25066
25121
  field: field,
@@ -25070,8 +25125,7 @@ var CountryDropdown = function CountryDropdown(_ref) {
25070
25125
  errorMessages: errorMessages,
25071
25126
  showErrors: showErrors,
25072
25127
  onChange: onChange,
25073
- autocompleteValue: "country-name",
25074
- isRequired: isRequired
25128
+ autocompleteValue: "country-name"
25075
25129
  });
25076
25130
  };
25077
25131
 
@@ -25235,6 +25289,346 @@ var DisplayBox = function DisplayBox(_ref) {
25235
25289
 
25236
25290
  var DisplayBox$1 = themeComponent(DisplayBox, "DisplayBox", fallbackValues$i);
25237
25291
 
25292
+ /*
25293
+ Hook that assigns a click event listener to the main document element
25294
+ Returns a ref to attach to another element (like an icon/button that triggers a popover)
25295
+ If a click event gets captured by the document and the assigned element isn't the target
25296
+ hook will run whatever handler is passed (eg a function that closes a popover)
25297
+
25298
+ See popover component for implementation
25299
+
25300
+ */
25301
+
25302
+ var useOutsideClickHook = function useOutsideClickHook(handler) {
25303
+ var ref = React.useRef();
25304
+ React.useEffect(function () {
25305
+ }, [ref]);
25306
+ return ref;
25307
+ };
25308
+
25309
+ /*
25310
+ Hook that takes an ID selector for an element on the screen
25311
+ And optionally values for top position, left position, smooth behavior
25312
+ Finds element on screen and scrolls it to the provided coordinates
25313
+
25314
+ (string, number, number, string, number) => undefined;
25315
+ */
25316
+ var useScrollTo = function useScrollTo(id) {
25317
+ var top = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
25318
+ var left = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
25319
+ var behavior = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "auto";
25320
+ var delay = arguments.length > 4 ? arguments[4] : undefined;
25321
+ var scrollItem;
25322
+
25323
+ if (delay) {
25324
+ setTimeout(function () {
25325
+ var _scrollItem;
25326
+
25327
+ scrollItem = document.getElementById(id);
25328
+ (_scrollItem = scrollItem) === null || _scrollItem === void 0 ? void 0 : _scrollItem.scrollTo({
25329
+ top: top,
25330
+ left: left,
25331
+ behavior: behavior
25332
+ });
25333
+ }, delay);
25334
+ } else {
25335
+ var _scrollItem2;
25336
+
25337
+ scrollItem = document.getElementById(id);
25338
+ (_scrollItem2 = scrollItem) === null || _scrollItem2 === void 0 ? void 0 : _scrollItem2.scrollTo({
25339
+ top: top,
25340
+ left: left,
25341
+ behavior: behavior
25342
+ });
25343
+ }
25344
+ };
25345
+
25346
+ var initialToastState = {
25347
+ isOpen: false,
25348
+ variant: "",
25349
+ message: ""
25350
+ };
25351
+
25352
+ var useToastNotification = function useToastNotification() {
25353
+ var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
25354
+ _ref$timeout = _ref.timeout,
25355
+ timeout = _ref$timeout === void 0 ? 5000 : _ref$timeout;
25356
+
25357
+ var _useState = React.useState(initialToastState),
25358
+ _useState2 = _slicedToArray(_useState, 2),
25359
+ toastState = _useState2[0],
25360
+ setToastState = _useState2[1];
25361
+
25362
+ React.useEffect(function () {
25363
+ if (toastState.isOpen) {
25364
+ setTimeout(function () {
25365
+ setToastState(initialToastState);
25366
+ }, timeout);
25367
+ }
25368
+ }, [timeout, toastState.isOpen]);
25369
+
25370
+ var showToast = function showToast(_ref2) {
25371
+ var message = _ref2.message,
25372
+ variant = _ref2.variant;
25373
+ return setToastState({
25374
+ isOpen: true,
25375
+ variant: variant,
25376
+ message: message
25377
+ });
25378
+ };
25379
+
25380
+ var hideToast = function hideToast() {
25381
+ return setToastState(initialToastState);
25382
+ };
25383
+
25384
+ return {
25385
+ isToastOpen: toastState.isOpen,
25386
+ toastVariant: toastState.variant,
25387
+ toastMessage: toastState.message,
25388
+ showToast: showToast,
25389
+ hideToast: hideToast
25390
+ };
25391
+ };
25392
+
25393
+
25394
+
25395
+ var index$4 = /*#__PURE__*/Object.freeze({
25396
+ __proto__: null,
25397
+ useOutsideClick: useOutsideClickHook,
25398
+ useScrollTo: useScrollTo,
25399
+ useToastNotification: useToastNotification
25400
+ });
25401
+
25402
+ var hoverColor$4 = "#116285";
25403
+ var activeColor$4 = "#0E506D";
25404
+ var popoverTriggerColor = "#15749D";
25405
+ var fallbackValues$j = {
25406
+ hoverColor: hoverColor$4,
25407
+ activeColor: activeColor$4,
25408
+ popoverTriggerColor: popoverTriggerColor
25409
+ };
25410
+
25411
+ var arrowBorder = function arrowBorder(borderColor, direction) {
25412
+ var width = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "8px";
25413
+ var angle = "".concat(width, " solid transparent");
25414
+ var straight = "".concat(width, " solid ").concat(borderColor);
25415
+
25416
+ if (direction == "down") {
25417
+ return "border-left: ".concat(angle, "; border-right: ").concat(angle, "; border-top: ").concat(straight);
25418
+ } else if (direction == "up") {
25419
+ return "border-left: ".concat(angle, "; border-right: ").concat(angle, "; border-bottom: ").concat(straight);
25420
+ } else if (direction == "left") {
25421
+ return "border-top: ".concat(angle, "; border-bottom: ").concat(angle, "; border-right: ").concat(straight);
25422
+ } else if (direction == "right") {
25423
+ return "border-top: ".concat(angle, "; border-bottom: ").concat(angle, "; border-left: ").concat(straight);
25424
+ }
25425
+ };
25426
+
25427
+ var Popover = function Popover(_ref) {
25428
+ var themeValues = _ref.themeValues,
25429
+ _ref$triggerText = _ref.triggerText,
25430
+ triggerText = _ref$triggerText === void 0 ? "" : _ref$triggerText,
25431
+ _ref$content = _ref.content,
25432
+ content = _ref$content === void 0 ? "" : _ref$content,
25433
+ _ref$hasIcon = _ref.hasIcon,
25434
+ hasIcon = _ref$hasIcon === void 0 ? false : _ref$hasIcon,
25435
+ Icon = _ref.icon,
25436
+ _ref$iconHelpText = _ref.iconHelpText,
25437
+ iconHelpText = _ref$iconHelpText === void 0 ? "" : _ref$iconHelpText,
25438
+ _ref$popoverID = _ref.popoverID,
25439
+ popoverID = _ref$popoverID === void 0 ? 0 : _ref$popoverID,
25440
+ _ref$popoverFocus = _ref.popoverFocus,
25441
+ popoverFocus = _ref$popoverFocus === void 0 ? false : _ref$popoverFocus,
25442
+ extraStyles = _ref.extraStyles,
25443
+ textExtraStyles = _ref.textExtraStyles,
25444
+ _ref$minWidth = _ref.minWidth,
25445
+ minWidth = _ref$minWidth === void 0 ? "250px" : _ref$minWidth,
25446
+ _ref$maxWidth = _ref.maxWidth,
25447
+ maxWidth = _ref$maxWidth === void 0 ? "300px" : _ref$maxWidth,
25448
+ _ref$height = _ref.height,
25449
+ height = _ref$height === void 0 ? "auto" : _ref$height,
25450
+ position = _ref.position,
25451
+ arrowPosition = _ref.arrowPosition,
25452
+ _ref$arrowDirection = _ref.arrowDirection,
25453
+ arrowDirection = _ref$arrowDirection === void 0 ? "down" : _ref$arrowDirection,
25454
+ _ref$transform = _ref.transform,
25455
+ transform = _ref$transform === void 0 ? "none" : _ref$transform,
25456
+ buttonExtraStyles = _ref.buttonExtraStyles,
25457
+ _ref$backgroundColor = _ref.backgroundColor,
25458
+ backgroundColor = _ref$backgroundColor === void 0 ? "white" : _ref$backgroundColor,
25459
+ _ref$borderColor = _ref.borderColor,
25460
+ borderColor = _ref$borderColor === void 0 ? "rgba(255, 255, 255, 0.85)" : _ref$borderColor,
25461
+ popoverExtraStyles = _ref.popoverExtraStyles;
25462
+ var hoverColor = themeValues.hoverColor,
25463
+ activeColor = themeValues.activeColor,
25464
+ popoverTriggerColor = themeValues.popoverTriggerColor;
25465
+
25466
+ var _ref2 = position !== null && position !== void 0 ? position : {},
25467
+ _ref2$top = _ref2.top,
25468
+ top = _ref2$top === void 0 ? "-110px" : _ref2$top,
25469
+ _ref2$right = _ref2.right,
25470
+ right = _ref2$right === void 0 ? "auto" : _ref2$right,
25471
+ _ref2$bottom = _ref2.bottom,
25472
+ bottom = _ref2$bottom === void 0 ? "auto" : _ref2$bottom,
25473
+ _ref2$left = _ref2.left,
25474
+ left = _ref2$left === void 0 ? "-225px" : _ref2$left;
25475
+
25476
+ var _ref3 = arrowPosition !== null && arrowPosition !== void 0 ? arrowPosition : {},
25477
+ _ref3$arrowTop = _ref3.arrowTop,
25478
+ arrowTop = _ref3$arrowTop === void 0 ? "auto" : _ref3$arrowTop,
25479
+ _ref3$arrowRight = _ref3.arrowRight,
25480
+ arrowRight = _ref3$arrowRight === void 0 ? "10px" : _ref3$arrowRight,
25481
+ _ref3$arrowBottom = _ref3.arrowBottom,
25482
+ arrowBottom = _ref3$arrowBottom === void 0 ? "-8px" : _ref3$arrowBottom,
25483
+ _ref3$arrowLeft = _ref3.arrowLeft,
25484
+ arrowLeft = _ref3$arrowLeft === void 0 ? "auto" : _ref3$arrowLeft;
25485
+
25486
+ var _useState = React.useState(false),
25487
+ _useState2 = _slicedToArray(_useState, 2),
25488
+ popoverOpen = _useState2[0],
25489
+ togglePopover = _useState2[1];
25490
+
25491
+ var handleTogglePopover = function handleTogglePopover(popoverState) {
25492
+ if (popoverOpen !== popoverState) {
25493
+ togglePopover(popoverState);
25494
+ }
25495
+ };
25496
+
25497
+ var triggerRef = useOutsideClickHook();
25498
+ return /*#__PURE__*/React__default.createElement(Box, {
25499
+ padding: "0",
25500
+ extraStyles: "position: relative; ".concat(extraStyles)
25501
+ }, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
25502
+ action: function action() {
25503
+ return noop;
25504
+ },
25505
+ onFocus: function onFocus() {
25506
+ handleTogglePopover(true);
25507
+ },
25508
+ onBlur: function onBlur() {
25509
+ handleTogglePopover(false);
25510
+ },
25511
+ onKeyDown: function onKeyDown(e) {
25512
+ if (e.keyCode === 27) {
25513
+ handleTogglePopover(false);
25514
+ }
25515
+ },
25516
+ onTouchStart: function onTouchStart() {
25517
+ return handleTogglePopover(true);
25518
+ },
25519
+ onTouchEnd: function onTouchEnd() {
25520
+ return handleTogglePopover(false);
25521
+ },
25522
+ onMouseEnter: function onMouseEnter() {
25523
+ return handleTogglePopover(true);
25524
+ },
25525
+ onMouseLeave: function onMouseLeave() {
25526
+ return handleTogglePopover(false);
25527
+ },
25528
+ contentOverride: true,
25529
+ variant: "smallGhost",
25530
+ tabIndex: "0",
25531
+ id: "btnPopover".concat(popoverID),
25532
+ "aria-expanded": popoverOpen,
25533
+ "aria-labelledby": "btnPopover".concat(popoverID, "_info Disclosure").concat(popoverID),
25534
+ "aria-describedby": "Disclosure".concat(popoverID),
25535
+ "aria-controls": "Disclosed".concat(popoverID),
25536
+ ref: triggerRef,
25537
+ extraStyles: buttonExtraStyles
25538
+ }, hasIcon && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Icon, null), /*#__PURE__*/React__default.createElement(Box, {
25539
+ padding: "0",
25540
+ srOnly: true
25541
+ }, /*#__PURE__*/React__default.createElement(Text$1, {
25542
+ id: "btnPopover".concat(popoverID, "_info")
25543
+ }, iconHelpText))), !hasIcon && /*#__PURE__*/React__default.createElement(Text$1, {
25544
+ color: popoverTriggerColor,
25545
+ extraStyles: "&:active { color: ".concat(activeColor, "; } &:hover { color: ").concat(hoverColor, " }; ").concat(textExtraStyles)
25546
+ }, triggerText)), /*#__PURE__*/React__default.createElement(Box, {
25547
+ background: backgroundColor,
25548
+ borderRadius: "4px",
25549
+ boxShadow: "0px 2px 14px 0px rgb(246, 246, 249), 0px 3px 8px 0px rgb(202, 206, 216)",
25550
+ id: "Disclosed".concat(popoverID),
25551
+ role: "region",
25552
+ "aria-describedby": "Disclosure".concat(popoverID),
25553
+ tabIndex: popoverFocus && popoverOpen ? "0" : "-1",
25554
+ minWidth: minWidth,
25555
+ maxWidth: maxWidth,
25556
+ 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 ")
25557
+ }, /*#__PURE__*/React__default.createElement(Paragraph$1, null, content), /*#__PURE__*/React__default.createElement(Box, {
25558
+ padding: "0",
25559
+ 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 ")
25560
+ })));
25561
+ };
25562
+
25563
+ var Popover$1 = themeComponent(Popover, "Popover", fallbackValues$j);
25564
+
25565
+ var DisplayCard = function DisplayCard(_ref) {
25566
+ var title = _ref.title,
25567
+ item = _ref.item,
25568
+ buttonText = _ref.buttonText,
25569
+ buttonAction = _ref.buttonAction,
25570
+ url = _ref.url,
25571
+ _ref$link = _ref.link,
25572
+ link = _ref$link === void 0 ? false : _ref$link,
25573
+ helpText = _ref.helpText,
25574
+ _ref$hasPopover = _ref.hasPopover,
25575
+ hasPopover = _ref$hasPopover === void 0 ? false : _ref$hasPopover,
25576
+ _ref$popoverTriggerTe = _ref.popoverTriggerText,
25577
+ popoverTriggerText = _ref$popoverTriggerTe === void 0 ? "" : _ref$popoverTriggerTe,
25578
+ _ref$popoverContent = _ref.popoverContent,
25579
+ popoverContent = _ref$popoverContent === void 0 ? "" : _ref$popoverContent,
25580
+ popoverExtraStyles = _ref.popoverExtraStyles,
25581
+ popoverTextExtraStyles = _ref.popoverTextExtraStyles;
25582
+ return /*#__PURE__*/React__default.createElement(Box, {
25583
+ padding: "0 0 16px"
25584
+ }, /*#__PURE__*/React__default.createElement(Stack, {
25585
+ childGap: "0rem"
25586
+ }, /*#__PURE__*/React__default.createElement(Box, {
25587
+ padding: "0 0 8px 0"
25588
+ }, /*#__PURE__*/React__default.createElement(Cluster, {
25589
+ justify: "space-between",
25590
+ align: "center",
25591
+ overflow: true
25592
+ }, /*#__PURE__*/React__default.createElement(Paragraph$1, {
25593
+ variant: "pL",
25594
+ color: CHARADE_GREY,
25595
+ extraStyles: "letter-spacing: 0.29px"
25596
+ }, title), hasPopover && /*#__PURE__*/React__default.createElement(Popover$1, {
25597
+ triggerText: popoverTriggerText,
25598
+ content: popoverContent,
25599
+ popoverExtraStyles: popoverExtraStyles,
25600
+ popoverTextExtraStyles: popoverTextExtraStyles
25601
+ }))), /*#__PURE__*/React__default.createElement(Box, {
25602
+ padding: "0"
25603
+ }, /*#__PURE__*/React__default.createElement(Box, {
25604
+ padding: "24px",
25605
+ borderSize: "1px",
25606
+ borderRadius: "4px",
25607
+ background: WHITE,
25608
+ boxShadow: "0px 2px 14px 0px rgb(246, 246, 249), 0px 3px 8px 0px rgb(202, 206, 216)"
25609
+ }, /*#__PURE__*/React__default.createElement(Cluster, {
25610
+ justify: "space-between",
25611
+ align: "center"
25612
+ }, /*#__PURE__*/React__default.createElement(Text$1, {
25613
+ color: CHARADE_GREY
25614
+ }, item), link ? /*#__PURE__*/React__default.createElement(ButtonWithLink, {
25615
+ text: buttonText,
25616
+ url: url,
25617
+ variant: "smallGhost",
25618
+ dataQa: buttonText,
25619
+ extraStyles: "min-width: 0;"
25620
+ }) : buttonAction ? /*#__PURE__*/React__default.createElement(ButtonWithAction, {
25621
+ text: buttonText,
25622
+ action: buttonAction,
25623
+ variant: "smallGhost",
25624
+ dataQa: buttonText,
25625
+ extraStyles: "min-width: 0;"
25626
+ }) : helpText ? /*#__PURE__*/React__default.createElement(Text$1, {
25627
+ color: STORM_GREY,
25628
+ extraStyles: "font-style: italic;"
25629
+ }, helpText) : /*#__PURE__*/React__default.createElement(React.Fragment, null))))));
25630
+ };
25631
+
25238
25632
  function _extends$2() {
25239
25633
  _extends$2 = Object.assign || function (target) {
25240
25634
  for (var i = 1; i < arguments.length; i++) {
@@ -25513,344 +25907,6 @@ var FormattedInput = function FormattedInput(_ref) {
25513
25907
  }));
25514
25908
  };
25515
25909
 
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
25910
  var linkColor$2 = {
25855
25911
  "default": "".concat(MATISSE_BLUE),
25856
25912
  disabled: "".concat(MATISSE_BLUE)
@@ -25916,7 +25972,7 @@ var fallbackValues$k = {
25916
25972
  };
25917
25973
 
25918
25974
  var _excluded$p = ["showErrors", "themeValues"],
25919
- _excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa", "isRequired"];
25975
+ _excluded2 = ["type", "labelTextWhenNoError", "errorMessages", "isNum", "isEmail", "helperModal", "field", "fieldActions", "showErrors", "formatter", "decorator", "themeValues", "background", "customHeight", "autocompleteValue", "extraStyles", "removeFromValue", "dataQa"];
25920
25976
  var InputField = styled__default.input.withConfig({
25921
25977
  displayName: "FormInput__InputField",
25922
25978
  componentId: "sc-l094r1-0"
@@ -26003,12 +26059,8 @@ var FormInput = function FormInput(_ref15) {
26003
26059
  removeFromValue = _ref15.removeFromValue,
26004
26060
  _ref15$dataQa = _ref15.dataQa,
26005
26061
  dataQa = _ref15$dataQa === void 0 ? null : _ref15$dataQa,
26006
- _ref15$isRequired = _ref15.isRequired,
26007
- isRequired = _ref15$isRequired === void 0 ? false : _ref15$isRequired,
26008
26062
  props = _objectWithoutProperties(_ref15, _excluded2);
26009
26063
 
26010
- var required = isRequired || (props === null || props === void 0 ? void 0 : props.required);
26011
-
26012
26064
  var _useState = React.useState(false),
26013
26065
  _useState2 = _slicedToArray(_useState, 2),
26014
26066
  showPassword = _useState2[0],
@@ -26093,8 +26145,7 @@ var FormInput = function FormInput(_ref15) {
26093
26145
  $customHeight: customHeight,
26094
26146
  $extraStyles: extraStyles,
26095
26147
  "data-qa": dataQa || labelTextWhenNoError,
26096
- autoComplete: autocompleteValue,
26097
- required: required
26148
+ autoComplete: autocompleteValue
26098
26149
  }, props)) : /*#__PURE__*/React__default.createElement(InputField, _extends({
26099
26150
  "aria-labelledby": createIdFromString(labelTextWhenNoError),
26100
26151
  "aria-describedby": createIdFromString(labelTextWhenNoError, "error message"),
@@ -26113,8 +26164,7 @@ var FormInput = function FormInput(_ref15) {
26113
26164
  $customHeight: customHeight,
26114
26165
  $extraStyles: extraStyles,
26115
26166
  "data-qa": dataQa || labelTextWhenNoError,
26116
- autoComplete: autocompleteValue,
26117
- required: required
26167
+ autoComplete: autocompleteValue
26118
26168
  }, props))), /*#__PURE__*/React__default.createElement(Stack, {
26119
26169
  direction: "row",
26120
26170
  justify: "space-between",
@@ -26323,6 +26373,66 @@ var fallbackValues$n = {
26323
26373
  autopayTextColor: autopayTextColor$1
26324
26374
  };
26325
26375
 
26376
+ var formatDelimiter = "_";
26377
+ var phoneFormats = ["", "_", "__", "(___) ", "(___) _", "(___) __", "(___) ___-", "(___) ___-_", "(___) ___-__", "(___) ___-___", "(___) ___-____"];
26378
+ var zipFormats = ["", "_", "__", "___", "____", "_____", "______", "_____-__", "_____-___", "_____-____"];
26379
+ var creditCardFormats = ["", "_", "__", "___", "____", "____ _", "____ __", "____ ___", "____ ____", "____ ____ _", "____ ____ __", "____ ____ ___", "____ ____ ____", "____ ____ ____ _", "____ ____ ____ __", "____ ____ ____ ___", "____ ____ ____ ____"];
26380
+ var moneyFormats = ["", "$0.0_", "$0.__", "$_.__", "$__.__", "$___.__", "$_,___.__", "$__,___.__", "$___,___.__", "$_,___,___.__", "$__,___,___.__", "$___,___,___.__", "$_,___,___,___.__", "$__,___,___,___.__", "$___,___,___,___.__", "$_,___,___,___,___.__"];
26381
+ var expirationDateFormats = ["", "_", "__/", "__/_", "__/__"];
26382
+ var zipFormat = createFormat(zipFormats, formatDelimiter);
26383
+ var creditCardFormat = createFormat(creditCardFormats, formatDelimiter);
26384
+ var expirationDateFormat = createFormat(expirationDateFormats, formatDelimiter);
26385
+ var phoneFormat = createFormat(phoneFormats, formatDelimiter);
26386
+ var moneyFormat = createFormat(moneyFormats, formatDelimiter);
26387
+ var renderCardStatus = function renderCardStatus(expirationStatus, expireDate) {
26388
+ var textAlign = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "right";
26389
+ var as = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "span";
26390
+ var ACTIVE = "ACTIVE";
26391
+ var EXPIRING_SOON = "EXPIRING_SOON";
26392
+ var EXPIRED = "EXPIRED";
26393
+ var textMargin = textAlign === "right" ? "auto" : "0";
26394
+
26395
+ switch (expirationStatus) {
26396
+ case ACTIVE:
26397
+ return /*#__PURE__*/React__default.createElement(Text$1, {
26398
+ as: as,
26399
+ variant: "pXS",
26400
+ color: ASH_GREY,
26401
+ extraStyles: "text-align: ".concat(textAlign, "; margin: ").concat(textMargin, ";")
26402
+ }, "Exp Date ", expireDate);
26403
+
26404
+ case EXPIRING_SOON:
26405
+ return /*#__PURE__*/React__default.createElement(Text$1, {
26406
+ as: as,
26407
+ variant: "pXS",
26408
+ color: FIRE_YELLOW,
26409
+ extraStyles: "text-align: ".concat(textAlign, "; margin: ").concat(textMargin, ";")
26410
+ }, "Expiring Soon ", expireDate);
26411
+
26412
+ case EXPIRED:
26413
+ return /*#__PURE__*/React__default.createElement(Text$1, {
26414
+ as: as,
26415
+ variant: "pXS",
26416
+ color: ASH_GREY,
26417
+ extraStyles: "text-align: ".concat(textAlign, "; margin: ").concat(textMargin, ";")
26418
+ }, "Expired");
26419
+ }
26420
+ };
26421
+
26422
+ var formats = /*#__PURE__*/Object.freeze({
26423
+ __proto__: null,
26424
+ formatDelimiter: formatDelimiter,
26425
+ phoneFormats: phoneFormats,
26426
+ moneyFormats: moneyFormats,
26427
+ expirationDateFormats: expirationDateFormats,
26428
+ zipFormat: zipFormat,
26429
+ creditCardFormat: creditCardFormat,
26430
+ expirationDateFormat: expirationDateFormat,
26431
+ phoneFormat: phoneFormat,
26432
+ moneyFormat: moneyFormat,
26433
+ renderCardStatus: renderCardStatus
26434
+ });
26435
+
26326
26436
  var CreditCardWrapper = styled__default.div.withConfig({
26327
26437
  displayName: "FormattedCreditCard__CreditCardWrapper",
26328
26438
  componentId: "sc-s0ta5l-0"
@@ -27296,9 +27406,7 @@ var RadioButton$1 = function RadioButton(_ref2) {
27296
27406
  _ref2$ariaLabelledBy = _ref2.ariaLabelledBy,
27297
27407
  ariaLabelledBy = _ref2$ariaLabelledBy === void 0 ? "" : _ref2$ariaLabelledBy,
27298
27408
  _ref2$ariaLabel = _ref2.ariaLabel,
27299
- ariaLabel = _ref2$ariaLabel === void 0 ? null : _ref2$ariaLabel,
27300
- _ref2$required = _ref2.required,
27301
- required = _ref2$required === void 0 ? false : _ref2$required;
27409
+ ariaLabel = _ref2$ariaLabel === void 0 ? null : _ref2$ariaLabel;
27302
27410
  var buttonBorder = {
27303
27411
  onFocused: {
27304
27412
  borderColor: themeValues.activeColor,
@@ -27358,8 +27466,6 @@ var RadioButton$1 = function RadioButton(_ref2) {
27358
27466
  type: "radio",
27359
27467
  id: "radio-".concat(name),
27360
27468
  disabled: disabled,
27361
- required: required,
27362
- "aria-required": required,
27363
27469
  onClick: toggleRadio,
27364
27470
  "aria-describedby": ariaDescribedBy,
27365
27471
  tabIndex: "-1"
@@ -38052,9 +38158,7 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
38052
38158
  field = _ref.field,
38053
38159
  fieldActions = _ref.fieldActions,
38054
38160
  showErrors = _ref.showErrors,
38055
- countryCode = _ref.countryCode,
38056
- _ref$isRequired = _ref.isRequired,
38057
- isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired;
38161
+ countryCode = _ref.countryCode;
38058
38162
  var placeholder = countryCode === "US" ? placeHolderOptionUS : placeHolderOption;
38059
38163
  var options = [placeholder].concat(_toConsumableArray(getOptions(countryCode)));
38060
38164
  return /*#__PURE__*/React__default.createElement(FormSelect$1, {
@@ -38064,8 +38168,7 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
38064
38168
  labelTextWhenNoError: labelTextWhenNoError,
38065
38169
  errorMessages: errorMessages,
38066
38170
  showErrors: showErrors,
38067
- autocompleteValue: "address-level1",
38068
- isRequired: isRequired
38171
+ autocompleteValue: "address-level1"
38069
38172
  });
38070
38173
  };
38071
38174
 
@@ -39391,7 +39494,6 @@ var AddressForm = function AddressForm(_ref) {
39391
39494
  labelTextWhenNoError: "Country",
39392
39495
  errorMessages: countryErrorMessages,
39393
39496
  field: fields.country,
39394
- isRequired: true,
39395
39497
  onChange: function onChange(value) {
39396
39498
  actions.fields.country.set(value); // temporary measure to not dirty fields until
39397
39499
  // we can write a reset function for fields
@@ -39416,8 +39518,7 @@ var AddressForm = function AddressForm(_ref) {
39416
39518
  return e.key === "Enter" && handleSubmit(e);
39417
39519
  },
39418
39520
  autocompleteValue: "address-line1",
39419
- dataQa: "Address",
39420
- isRequired: true
39521
+ dataQa: "Address"
39421
39522
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
39422
39523
  labelTextWhenNoError: "Apt, Suite, Unit, Floor, etc. (Optional)",
39423
39524
  field: fields.street2,
@@ -39427,8 +39528,7 @@ var AddressForm = function AddressForm(_ref) {
39427
39528
  return e.key === "Enter" && handleSubmit(e);
39428
39529
  },
39429
39530
  autocompleteValue: "address-line2",
39430
- dataQa: "Address Line 2",
39431
- isRequired: false
39531
+ dataQa: "Address Line 2"
39432
39532
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
39433
39533
  labelTextWhenNoError: "City",
39434
39534
  errorMessages: cityErrorMessages,
@@ -39439,8 +39539,7 @@ var AddressForm = function AddressForm(_ref) {
39439
39539
  return e.key === "Enter" && handleSubmit(e);
39440
39540
  },
39441
39541
  autocompleteValue: "address-level2",
39442
- dataQa: "City",
39443
- isRequired: true
39542
+ dataQa: "City"
39444
39543
  }), /*#__PURE__*/React__default.createElement(FormStateDropdown, {
39445
39544
  labelTextWhenNoError: isUS ? "State" : "State or Province",
39446
39545
  errorMessages: stateProvinceErrorMessages,
@@ -39451,8 +39550,7 @@ var AddressForm = function AddressForm(_ref) {
39451
39550
  onKeyDown: function onKeyDown(e) {
39452
39551
  return e.key === "Enter" && handleSubmit(e);
39453
39552
  },
39454
- dataQa: "State or Province",
39455
- isRequired: true
39553
+ dataQa: "State or Province"
39456
39554
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
39457
39555
  isNum: isUS,
39458
39556
  formatter: isUS ? zipFormat : null,
@@ -39465,8 +39563,7 @@ var AddressForm = function AddressForm(_ref) {
39465
39563
  return e.key === "Enter" && handleSubmit(e);
39466
39564
  },
39467
39565
  autocompleteValue: "postal-code",
39468
- dataQa: "Zip code",
39469
- isRequired: true
39566
+ dataQa: "Zip code"
39470
39567
  }), showWalletCheckbox && /*#__PURE__*/React__default.createElement(Checkbox$1, {
39471
39568
  name: "address checkbox",
39472
39569
  title: "Save address to wallet",
@@ -47751,8 +47848,7 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
47751
47848
  title: "Terms and Conditions",
47752
47849
  error: error,
47753
47850
  checked: isChecked,
47754
- onChange: onCheck,
47755
- isRequired: true
47851
+ onChange: onCheck
47756
47852
  }), /*#__PURE__*/React__default.createElement(Box, {
47757
47853
  padding: "0 0 0 58px"
47758
47854
  }, /*#__PURE__*/React__default.createElement(Stack, null, /*#__PURE__*/React__default.createElement(Box, {
@@ -47766,43 +47862,6 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
47766
47862
  })))));
47767
47863
  };
47768
47864
 
47769
- /*
47770
- Hook that takes an ID selector for an element on the screen
47771
- And optionally values for top position, left position, smooth behavior
47772
- Finds element on screen and scrolls it to the provided coordinates
47773
-
47774
- (string, number, number, string, number) => undefined;
47775
- */
47776
- var useScrollTo = function useScrollTo(id) {
47777
- var top = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
47778
- var left = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
47779
- var behavior = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "auto";
47780
- var delay = arguments.length > 4 ? arguments[4] : undefined;
47781
- var scrollItem;
47782
-
47783
- if (delay) {
47784
- setTimeout(function () {
47785
- var _scrollItem;
47786
-
47787
- scrollItem = document.getElementById(id);
47788
- (_scrollItem = scrollItem) === null || _scrollItem === void 0 ? void 0 : _scrollItem.scrollTo({
47789
- top: top,
47790
- left: left,
47791
- behavior: behavior
47792
- });
47793
- }, delay);
47794
- } else {
47795
- var _scrollItem2;
47796
-
47797
- scrollItem = document.getElementById(id);
47798
- (_scrollItem2 = scrollItem) === null || _scrollItem2 === void 0 ? void 0 : _scrollItem2.scrollTo({
47799
- top: top,
47800
- left: left,
47801
- behavior: behavior
47802
- });
47803
- }
47804
- };
47805
-
47806
47865
  var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
47807
47866
  var _ref$showCheckbox = _ref.showCheckbox,
47808
47867
  showCheckbox = _ref$showCheckbox === void 0 ? true : _ref$showCheckbox,
@@ -47865,8 +47924,7 @@ var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
47865
47924
  checked: isChecked,
47866
47925
  onChange: onCheck,
47867
47926
  checkboxMargin: checkboxMargin,
47868
- extraStyles: "align-self: flex-start;",
47869
- isRequired: true
47927
+ extraStyles: "align-self: flex-start;"
47870
47928
  }), /*#__PURE__*/React__default.createElement(Stack, {
47871
47929
  childGap: "0.25rem",
47872
47930
  fullHeight: true
@@ -47972,8 +48030,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
47972
48030
  onKeyDown: function onKeyDown(e) {
47973
48031
  return e.key === "Enter" && handleSubmit(e);
47974
48032
  },
47975
- autocompleteValue: "name",
47976
- isRequired: true
48033
+ autocompleteValue: "name"
47977
48034
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
47978
48035
  labelTextWhenNoError: "Routing number",
47979
48036
  dataQa: "Routing number",
@@ -47995,8 +48052,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
47995
48052
  },
47996
48053
  onKeyDown: function onKeyDown(e) {
47997
48054
  return e.key === "Enter" && handleSubmit(e);
47998
- },
47999
- isRequired: true
48055
+ }
48000
48056
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
48001
48057
  labelTextWhenNoError: "Confirm routing number",
48002
48058
  dataQa: "Confirm routing number",
@@ -48007,7 +48063,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
48007
48063
  onKeyDown: function onKeyDown(e) {
48008
48064
  return e.key === "Enter" && handleSubmit(e);
48009
48065
  },
48010
- isRequired: true,
48011
48066
  isNum: true
48012
48067
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
48013
48068
  labelTextWhenNoError: "Account number",
@@ -48016,7 +48071,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
48016
48071
  field: fields.accountNumber,
48017
48072
  fieldActions: actions.fields.accountNumber,
48018
48073
  showErrors: showErrors,
48019
- isRequired: true,
48020
48074
  isNum: true,
48021
48075
  helperModal: function helperModal() {
48022
48076
  return /*#__PURE__*/React__default.createElement(AccountAndRoutingModal$1, {
@@ -48035,7 +48089,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
48035
48089
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
48036
48090
  labelTextWhenNoError: "Confirm account number",
48037
48091
  dataQa: "Confirm account number",
48038
- isRequired: true,
48039
48092
  errorMessages: confirmAccountNumberErrors,
48040
48093
  field: fields.confirmAccountNumber,
48041
48094
  fieldActions: actions.fields.confirmAccountNumber,
@@ -48046,7 +48099,6 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
48046
48099
  isNum: true
48047
48100
  }), allowBankAccountType && /*#__PURE__*/React__default.createElement(FormSelect$1, {
48048
48101
  labelTextWhenNoError: "Account type",
48049
- isRequired: true,
48050
48102
  dataQa: "Account type",
48051
48103
  options: [{
48052
48104
  text: "Select account type",
@@ -48084,8 +48136,7 @@ var PaymentFormACH = function PaymentFormACH(_ref) {
48084
48136
  version: "v2",
48085
48137
  showCheckbox: false,
48086
48138
  description: "View",
48087
- terms: termsContent,
48088
- isRequired: true
48139
+ terms: termsContent
48089
48140
  })))));
48090
48141
  };
48091
48142
 
@@ -48178,7 +48229,6 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
48178
48229
  "aria-label": "Card payment"
48179
48230
  }, /*#__PURE__*/React__default.createElement(FormInputColumn, null, !hideZipCode && /*#__PURE__*/React__default.createElement(CountryDropdown, {
48180
48231
  labelTextWhenNoError: "Country",
48181
- isRequired: true,
48182
48232
  errorMessages: countryErrorMessages,
48183
48233
  field: fields.country,
48184
48234
  onChange: function onChange(value) {
@@ -48201,8 +48251,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
48201
48251
  onKeyDown: function onKeyDown(e) {
48202
48252
  return e.key === "Enter" && handleSubmit(e);
48203
48253
  },
48204
- autocompleteValue: "cc-name",
48205
- isRequired: true
48254
+ autocompleteValue: "cc-name"
48206
48255
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
48207
48256
  labelTextWhenNoError: "Credit card number",
48208
48257
  dataQa: "Credit card number",
@@ -48215,8 +48264,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
48215
48264
  return e.key === "Enter" && handleSubmit(e);
48216
48265
  },
48217
48266
  isNum: true,
48218
- autocompleteValue: "cc-number",
48219
- isRequired: true
48267
+ autocompleteValue: "cc-number"
48220
48268
  }), /*#__PURE__*/React__default.createElement(FormInputRow, {
48221
48269
  breakpoint: isMobile ? "1000rem" : "21rem",
48222
48270
  childGap: isMobile ? "0rem" : "1rem"
@@ -48234,8 +48282,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
48234
48282
  isNum: true,
48235
48283
  removeFromValue: /\// // removes "/" from browser autofill
48236
48284
  ,
48237
- autocompleteValue: "cc-exp",
48238
- isRequired: true
48285
+ autocompleteValue: "cc-exp"
48239
48286
  }), /*#__PURE__*/React__default.createElement(FormInput$1, {
48240
48287
  labelTextWhenNoError: "CVV",
48241
48288
  dataQa: "CVV",
@@ -48248,8 +48295,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
48248
48295
  onKeyDown: function onKeyDown(e) {
48249
48296
  return e.key === "Enter" && handleSubmit(e);
48250
48297
  },
48251
- autocompleteValue: "cc-csc",
48252
- isRequired: true
48298
+ autocompleteValue: "cc-csc"
48253
48299
  })), !hideZipCode && /*#__PURE__*/React__default.createElement(Box, {
48254
48300
  padding: isMobile ? "0" : "0 0.5rem 0 0",
48255
48301
  width: isMobile ? "100%" : "50%"
@@ -48265,8 +48311,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
48265
48311
  onKeyDown: function onKeyDown(e) {
48266
48312
  return e.key === "Enter" && handleSubmit(e);
48267
48313
  },
48268
- autocompleteValue: "billing postal-code",
48269
- isRequired: true
48314
+ autocompleteValue: "billing postal-code"
48270
48315
  })), (showWalletCheckbox || showTerms) && /*#__PURE__*/React__default.createElement(Cluster, {
48271
48316
  childGap: "4px",
48272
48317
  align: "center"
@@ -48282,8 +48327,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
48282
48327
  version: "v2",
48283
48328
  showCheckbox: false,
48284
48329
  description: "View",
48285
- terms: termsContent,
48286
- isRequired: true
48330
+ terms: termsContent
48287
48331
  })))));
48288
48332
  };
48289
48333
 
@@ -48736,8 +48780,7 @@ var RadioSection = function RadioSection(_ref) {
48736
48780
  toggleRadio: section.disabled ? noop : function () {
48737
48781
  return toggleOpenSection(section.id);
48738
48782
  },
48739
- tabIndex: "-1",
48740
- required: section === null || section === void 0 ? void 0 : section.required
48783
+ tabIndex: "-1"
48741
48784
  })), section.titleIcon && /*#__PURE__*/React__default.createElement(Cluster, {
48742
48785
  align: "center"
48743
48786
  }, section.titleIcon), /*#__PURE__*/React__default.createElement(Box, {
@@ -48749,7 +48792,7 @@ var RadioSection = function RadioSection(_ref) {
48749
48792
  }, section.title))), section.rightIcons && /*#__PURE__*/React__default.createElement(Cluster, {
48750
48793
  childGap: "0.5rem",
48751
48794
  "aria-label": (section === null || section === void 0 ? void 0 : section.rightIconsLabel) || null,
48752
- role: (section === null || section === void 0 ? void 0 : section.rightIconsRole) || "group"
48795
+ role: (section === null || section === void 0 ? void 0 : section.rightIconsRole) || null
48753
48796
  }, section.rightIcons.map(function (icon) {
48754
48797
  return /*#__PURE__*/React__default.createElement(RightIcon, {
48755
48798
  src: icon.img,
@@ -49256,6 +49299,51 @@ var Timeout = function Timeout(_ref) {
49256
49299
 
49257
49300
  var Timeout$1 = withWindowSize(Timeout);
49258
49301
 
49302
+ var VARIANTS = {
49303
+ SUCCESS: "success",
49304
+ ERROR: "error"
49305
+ };
49306
+
49307
+ var ToastNotification = function ToastNotification(_ref) {
49308
+ var _ref$variant = _ref.variant,
49309
+ variant = _ref$variant === void 0 ? VARIANTS.SUCCESS : _ref$variant,
49310
+ _ref$message = _ref.message,
49311
+ message = _ref$message === void 0 ? "" : _ref$message,
49312
+ toastOpen = _ref.toastOpen,
49313
+ closeToastNotification = _ref.closeToastNotification,
49314
+ extraStyles = _ref.extraStyles,
49315
+ _ref$minWidth = _ref.minWidth,
49316
+ minWidth = _ref$minWidth === void 0 ? "112px" : _ref$minWidth,
49317
+ _ref$maxWidth = _ref.maxWidth,
49318
+ maxWidth = _ref$maxWidth === void 0 ? "350px" : _ref$maxWidth,
49319
+ _ref$height = _ref.height,
49320
+ height = _ref$height === void 0 ? "56px" : _ref$height,
49321
+ _ref$childGap = _ref.childGap,
49322
+ childGap = _ref$childGap === void 0 ? "1rem" : _ref$childGap,
49323
+ backgroundColor = _ref.backgroundColor;
49324
+ return /*#__PURE__*/React__default.createElement(Box, {
49325
+ onClick: closeToastNotification,
49326
+ background: backgroundColor ? backgroundColor : variant === VARIANTS.SUCCESS ? HINT_GREEN : variant === VARIANTS.ERROR ? ERROR_BACKGROUND_COLOR : WHITE,
49327
+ minWidth: minWidth,
49328
+ minHeight: height && parseInt(height) < 100 ? height : "100px",
49329
+ height: height ? height : "auto",
49330
+ tabIndex: toastOpen ? "-1" : "0",
49331
+ padding: "0rem 1rem",
49332
+ borderRadius: "4px",
49333
+ boxShadow: generateShadows().standard.base,
49334
+ extraStyles: "\n display: ".concat(toastOpen ? "block" : "none", ";\n position: fixed; bottom: 4rem; left: 4rem;\n ").concat(extraStyles, ";\n cursor: pointer;\n ")
49335
+ }, /*#__PURE__*/React__default.createElement(Cluster, {
49336
+ align: "center",
49337
+ childGap: childGap
49338
+ }, variant === VARIANTS.SUCCESS && /*#__PURE__*/React__default.createElement(SuccessfulIconMedium, null), variant === VARIANTS.ERROR && /*#__PURE__*/React__default.createElement(ErroredIcon, null), /*#__PURE__*/React__default.createElement(Box, {
49339
+ padding: "1rem 0",
49340
+ maxWidth: maxWidth
49341
+ }, /*#__PURE__*/React__default.createElement(Paragraph$1, {
49342
+ weight: FONT_WEIGHT_SEMIBOLD,
49343
+ extraStyles: "word-break: break-word;"
49344
+ }, message)), /*#__PURE__*/React__default.createElement(IconQuitLarge, null)));
49345
+ };
49346
+
49259
49347
  var fontWeight$9 = "600";
49260
49348
  var fontColor$1 = WHITE;
49261
49349
  var textAlign$1 = "left";
@@ -49628,6 +49716,38 @@ var SidebarStackContent = function SidebarStackContent(_ref) {
49628
49716
 
49629
49717
  var SidebarStackContent$1 = withWindowSize(themeComponent(SidebarStackContent, "Global", fallbackValues$U));
49630
49718
 
49719
+ var useFocusInvalidInput = function useFocusInvalidInput(hasErrors) {
49720
+ var resetHasErrors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
49721
+ // Only move focus when "hasErrors" is true
49722
+ // "hasErrors" is managed by container page of form
49723
+ // typically set to "true" on attempted form submission, if errors exist
49724
+ // Reset errors, if provided, resets the error state tracking in order to properly re-run
49725
+ React.useEffect(function () {
49726
+ if (hasErrors) {
49727
+ var _inputsWithErrors$;
49728
+
49729
+ var inputsWithErrors = document.querySelectorAll("input[aria-invalid=true]");
49730
+ inputsWithErrors === null || inputsWithErrors === void 0 ? void 0 : (_inputsWithErrors$ = inputsWithErrors[0]) === null || _inputsWithErrors$ === void 0 ? void 0 : _inputsWithErrors$.focus();
49731
+ }
49732
+
49733
+ return function () {
49734
+ return resetHasErrors(false);
49735
+ };
49736
+ });
49737
+ };
49738
+
49739
+
49740
+
49741
+ var index$6 = /*#__PURE__*/Object.freeze({
49742
+ __proto__: null,
49743
+ formats: formats,
49744
+ general: general,
49745
+ theme: themeUtils,
49746
+ useFocusInvalidInput: useFocusInvalidInput,
49747
+ useOutsideClick: useOutsideClickHook,
49748
+ useToastNotification: useToastNotification
49749
+ });
49750
+
49631
49751
  exports.AccountNumberImage = AccountNumberImage;
49632
49752
  exports.AccountsAddIcon = AccountsAddIcon$1;
49633
49753
  exports.AccountsIcon = AccountsIcon$1;
@@ -49821,6 +49941,7 @@ exports.Text = Text$1;
49821
49941
  exports.Timeout = Timeout$1;
49822
49942
  exports.TimeoutImage = TimeoutImage;
49823
49943
  exports.Title = Title$1;
49944
+ exports.ToastNotification = ToastNotification;
49824
49945
  exports.ToggleSwitch = ToggleSwitch$1;
49825
49946
  exports.TrashIcon = TrashIcon$1;
49826
49947
  exports.TypeaheadInput = TypeaheadInput;
@@ -49838,6 +49959,7 @@ exports.cardRegistry = cardRegistry;
49838
49959
  exports.constants = index$5;
49839
49960
  exports.createPartialAmountFormState = createPartialAmountFormState;
49840
49961
  exports.createPartialAmountFormValidators = createPartialAmountFormValidators;
49841
- exports.util = index$4;
49962
+ exports.hooks = index$4;
49963
+ exports.util = index$6;
49842
49964
  exports.withWindowSize = withWindowSize;
49843
49965
  //# sourceMappingURL=index.cjs.js.map