@thecb/components 9.3.1-beta.0 → 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.
- package/dist/index.cjs.js +717 -536
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +169 -60
- package/dist/index.esm.js +715 -536
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/dropdown/Dropdown.js +70 -36
- package/src/components/atoms/dropdown/Dropdown.theme.js +8 -2
- package/src/components/atoms/form-select/FormSelect.js +16 -14
- package/src/components/molecules/index.d.ts +1 -0
- package/src/components/molecules/index.js +1 -0
- package/src/components/molecules/popover/Popover.js +1 -1
- package/src/components/molecules/radio-section/RadioSection.js +2 -3
- package/src/components/molecules/terms-and-conditions/TermsAndConditionsControlV2.js +1 -1
- package/src/components/molecules/toast-notification/ToastNotification.js +75 -0
- package/src/components/molecules/toast-notification/ToastNotification.stories.js +67 -0
- package/src/components/molecules/toast-notification/index.d.ts +18 -0
- package/src/components/molecules/toast-notification/index.js +3 -0
- package/src/constants/colors.d.ts +1 -0
- package/src/constants/colors.js +5 -1
- package/src/hooks/index.js +3 -0
- package/src/hooks/use-toast-notification/index.d.ts +23 -0
- package/src/hooks/use-toast-notification/index.js +38 -0
- package/src/index.d.ts +2 -1
- package/src/index.js +2 -1
- package/src/types/common/ToastVariants.ts +6 -0
- package/src/types/common/index.ts +1 -0
- package/src/util/index.js +10 -2
- package/dist/src/apps/checkout/pages/payment/sub-pages/payment-amount/PaymentAmount_old.js +0 -49322
- package/src/.DS_Store +0 -0
- package/src/components/.DS_Store +0 -0
- package/src/components/atoms/.DS_Store +0 -0
- package/src/components/atoms/icons/.DS_Store +0 -0
- /package/src/{util/useOutsideClick.js → hooks/use-outside-click/index.js} +0 -0
- /package/src/{util/useScrollTo.js → hooks/use-scroll-to/index.js} +0 -0
package/dist/index.cjs.js
CHANGED
|
@@ -5019,6 +5019,7 @@ var INFO_BLUE = "#E4F4FD";
|
|
|
5019
5019
|
var CORNFLOWER_BLUE = "#EBEFFB";
|
|
5020
5020
|
var HOVER_LIGHT_BLUE = "#EFFAFF";
|
|
5021
5021
|
var MATISSE_BLUE = "#15749D";
|
|
5022
|
+
var MATISSE_BLUE_DARK = "#105C7D";
|
|
5022
5023
|
var ROYAL_BLUE = "#3181E3";
|
|
5023
5024
|
var ROYAL_BLUE_VIVID = "#3B5BDB";
|
|
5024
5025
|
var ASTRAL_BLUE = "#3176AA";
|
|
@@ -5051,7 +5052,8 @@ var FANTASY_RED = "#FCF4F4";
|
|
|
5051
5052
|
var COSMOS_RED = "#FFD0D3";
|
|
5052
5053
|
var BLUSH_RED = "#FFF0F5"; // Second level color constants
|
|
5053
5054
|
|
|
5054
|
-
var ERROR_COLOR = RAZZMATAZZ_RED;
|
|
5055
|
+
var ERROR_COLOR = RAZZMATAZZ_RED;
|
|
5056
|
+
var ERROR_BACKGROUND_COLOR = "#FFF4F8"; // These colors are sequestered so that the alert component can reference them // by type of alert
|
|
5055
5057
|
|
|
5056
5058
|
var ALERT_COLORS = {
|
|
5057
5059
|
warn: {
|
|
@@ -5153,6 +5155,7 @@ var colors = /*#__PURE__*/Object.freeze({
|
|
|
5153
5155
|
BOSTON_BLUE: BOSTON_BLUE,
|
|
5154
5156
|
HOVER_LIGHT_BLUE: HOVER_LIGHT_BLUE,
|
|
5155
5157
|
MATISSE_BLUE: MATISSE_BLUE,
|
|
5158
|
+
MATISSE_BLUE_DARK: MATISSE_BLUE_DARK,
|
|
5156
5159
|
ROYAL_BLUE: ROYAL_BLUE,
|
|
5157
5160
|
ROYAL_BLUE_VIVID: ROYAL_BLUE_VIVID,
|
|
5158
5161
|
ASTRAL_BLUE: ASTRAL_BLUE,
|
|
@@ -5182,7 +5185,8 @@ var colors = /*#__PURE__*/Object.freeze({
|
|
|
5182
5185
|
RASPBERRY: RASPBERRY,
|
|
5183
5186
|
ALERT_COLORS: ALERT_COLORS,
|
|
5184
5187
|
PILL_COLORS: PILL_COLORS,
|
|
5185
|
-
ERROR_COLOR: ERROR_COLOR
|
|
5188
|
+
ERROR_COLOR: ERROR_COLOR,
|
|
5189
|
+
ERROR_BACKGROUND_COLOR: ERROR_BACKGROUND_COLOR
|
|
5186
5190
|
});
|
|
5187
5191
|
|
|
5188
5192
|
var TextSpan = styled__default.span.withConfig({
|
|
@@ -22423,17 +22427,18 @@ var DropdownIcon = function DropdownIcon() {
|
|
|
22423
22427
|
};
|
|
22424
22428
|
|
|
22425
22429
|
var check = function (it) {
|
|
22426
|
-
return it && it.Math
|
|
22430
|
+
return it && it.Math === Math && it;
|
|
22427
22431
|
};
|
|
22428
22432
|
|
|
22429
22433
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
22430
22434
|
var global_1 =
|
|
22431
|
-
// eslint-disable-next-line es
|
|
22435
|
+
// eslint-disable-next-line es/no-global-this -- safe
|
|
22432
22436
|
check(typeof globalThis == 'object' && globalThis) ||
|
|
22433
22437
|
check(typeof window == 'object' && window) ||
|
|
22434
22438
|
// eslint-disable-next-line no-restricted-globals -- safe
|
|
22435
22439
|
check(typeof self == 'object' && self) ||
|
|
22436
22440
|
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
22441
|
+
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
22437
22442
|
// eslint-disable-next-line no-new-func -- fallback
|
|
22438
22443
|
(function () { return this; })() || Function('return this')();
|
|
22439
22444
|
|
|
@@ -22447,12 +22452,12 @@ var fails = function (exec) {
|
|
|
22447
22452
|
|
|
22448
22453
|
// Detect IE8's incomplete defineProperty implementation
|
|
22449
22454
|
var descriptors = !fails(function () {
|
|
22450
|
-
// eslint-disable-next-line es
|
|
22451
|
-
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1]
|
|
22455
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
22456
|
+
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
|
|
22452
22457
|
});
|
|
22453
22458
|
|
|
22454
22459
|
var functionBindNative = !fails(function () {
|
|
22455
|
-
// eslint-disable-next-line es
|
|
22460
|
+
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
22456
22461
|
var test = (function () { /* empty */ }).bind();
|
|
22457
22462
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
22458
22463
|
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
@@ -22465,7 +22470,7 @@ var functionCall = functionBindNative ? call.bind(call) : function () {
|
|
|
22465
22470
|
};
|
|
22466
22471
|
|
|
22467
22472
|
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
22468
|
-
// eslint-disable-next-line es
|
|
22473
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
22469
22474
|
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
22470
22475
|
|
|
22471
22476
|
// Nashorn ~ JDK8 bug
|
|
@@ -22492,14 +22497,11 @@ var createPropertyDescriptor = function (bitmap, value) {
|
|
|
22492
22497
|
};
|
|
22493
22498
|
|
|
22494
22499
|
var FunctionPrototype = Function.prototype;
|
|
22495
|
-
var bind$1 = FunctionPrototype.bind;
|
|
22496
22500
|
var call$1 = FunctionPrototype.call;
|
|
22497
|
-
var
|
|
22501
|
+
var uncurryThisWithBind = functionBindNative && FunctionPrototype.bind.bind(call$1, call$1);
|
|
22498
22502
|
|
|
22499
|
-
var functionUncurryThis = functionBindNative ? function (fn) {
|
|
22500
|
-
return
|
|
22501
|
-
} : function (fn) {
|
|
22502
|
-
return fn && function () {
|
|
22503
|
+
var functionUncurryThis = functionBindNative ? uncurryThisWithBind : function (fn) {
|
|
22504
|
+
return function () {
|
|
22503
22505
|
return call$1.apply(fn, arguments);
|
|
22504
22506
|
};
|
|
22505
22507
|
};
|
|
@@ -22520,15 +22522,21 @@ var indexedObject = fails(function () {
|
|
|
22520
22522
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
22521
22523
|
return !$Object('z').propertyIsEnumerable(0);
|
|
22522
22524
|
}) ? function (it) {
|
|
22523
|
-
return classofRaw(it)
|
|
22525
|
+
return classofRaw(it) === 'String' ? split(it, '') : $Object(it);
|
|
22524
22526
|
} : $Object;
|
|
22525
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
|
+
|
|
22526
22534
|
var $TypeError = TypeError;
|
|
22527
22535
|
|
|
22528
22536
|
// `RequireObjectCoercible` abstract operation
|
|
22529
22537
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
22530
22538
|
var requireObjectCoercible = function (it) {
|
|
22531
|
-
if (it
|
|
22539
|
+
if (isNullOrUndefined(it)) throw new $TypeError("Can't call method on " + it);
|
|
22532
22540
|
return it;
|
|
22533
22541
|
};
|
|
22534
22542
|
|
|
@@ -22540,13 +22548,32 @@ var toIndexedObject = function (it) {
|
|
|
22540
22548
|
return indexedObject(requireObjectCoercible(it));
|
|
22541
22549
|
};
|
|
22542
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
|
+
|
|
22543
22564
|
// `IsCallable` abstract operation
|
|
22544
22565
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
22545
|
-
var isCallable = function (argument) {
|
|
22566
|
+
var isCallable = documentAll_1.IS_HTMLDDA ? function (argument) {
|
|
22567
|
+
return typeof argument == 'function' || argument === documentAll$1;
|
|
22568
|
+
} : function (argument) {
|
|
22546
22569
|
return typeof argument == 'function';
|
|
22547
22570
|
};
|
|
22548
22571
|
|
|
22549
|
-
var
|
|
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) {
|
|
22550
22577
|
return typeof it == 'object' ? it !== null : isCallable(it);
|
|
22551
22578
|
};
|
|
22552
22579
|
|
|
@@ -22560,7 +22587,7 @@ var getBuiltIn = function (namespace, method) {
|
|
|
22560
22587
|
|
|
22561
22588
|
var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
|
|
22562
22589
|
|
|
22563
|
-
var engineUserAgent =
|
|
22590
|
+
var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
|
|
22564
22591
|
|
|
22565
22592
|
var process$1 = global_1.process;
|
|
22566
22593
|
var Deno = global_1.Deno;
|
|
@@ -22587,24 +22614,29 @@ if (!version && engineUserAgent) {
|
|
|
22587
22614
|
|
|
22588
22615
|
var engineV8Version = version;
|
|
22589
22616
|
|
|
22590
|
-
/* eslint-disable es
|
|
22617
|
+
/* eslint-disable es/no-symbol -- required for testing */
|
|
22618
|
+
|
|
22591
22619
|
|
|
22592
22620
|
|
|
22593
22621
|
|
|
22594
|
-
|
|
22595
|
-
|
|
22596
|
-
|
|
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');
|
|
22597
22627
|
// Chrome 38 Symbol has incorrect toString conversion
|
|
22598
22628
|
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
22599
|
-
|
|
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) ||
|
|
22600
22632
|
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
22601
22633
|
!Symbol.sham && engineV8Version && engineV8Version < 41;
|
|
22602
22634
|
});
|
|
22603
22635
|
|
|
22604
|
-
/* eslint-disable es
|
|
22636
|
+
/* eslint-disable es/no-symbol -- required for testing */
|
|
22605
22637
|
|
|
22606
22638
|
|
|
22607
|
-
var useSymbolAsUid =
|
|
22639
|
+
var useSymbolAsUid = symbolConstructorDetection
|
|
22608
22640
|
&& !Symbol.sham
|
|
22609
22641
|
&& typeof Symbol.iterator == 'symbol';
|
|
22610
22642
|
|
|
@@ -22617,11 +22649,11 @@ var isSymbol = useSymbolAsUid ? function (it) {
|
|
|
22617
22649
|
return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, $Object$1(it));
|
|
22618
22650
|
};
|
|
22619
22651
|
|
|
22620
|
-
var $String = String;
|
|
22652
|
+
var $String$1 = String;
|
|
22621
22653
|
|
|
22622
22654
|
var tryToString = function (argument) {
|
|
22623
22655
|
try {
|
|
22624
|
-
return $String(argument);
|
|
22656
|
+
return $String$1(argument);
|
|
22625
22657
|
} catch (error) {
|
|
22626
22658
|
return 'Object';
|
|
22627
22659
|
}
|
|
@@ -22632,14 +22664,14 @@ var $TypeError$1 = TypeError;
|
|
|
22632
22664
|
// `Assert: IsCallable(argument) is true`
|
|
22633
22665
|
var aCallable = function (argument) {
|
|
22634
22666
|
if (isCallable(argument)) return argument;
|
|
22635
|
-
throw $TypeError$1(tryToString(argument) + ' is not a function');
|
|
22667
|
+
throw new $TypeError$1(tryToString(argument) + ' is not a function');
|
|
22636
22668
|
};
|
|
22637
22669
|
|
|
22638
22670
|
// `GetMethod` abstract operation
|
|
22639
22671
|
// https://tc39.es/ecma262/#sec-getmethod
|
|
22640
22672
|
var getMethod = function (V, P) {
|
|
22641
22673
|
var func = V[P];
|
|
22642
|
-
return func
|
|
22674
|
+
return isNullOrUndefined(func) ? undefined : aCallable(func);
|
|
22643
22675
|
};
|
|
22644
22676
|
|
|
22645
22677
|
var $TypeError$2 = TypeError;
|
|
@@ -22651,10 +22683,10 @@ var ordinaryToPrimitive = function (input, pref) {
|
|
|
22651
22683
|
if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
|
22652
22684
|
if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
|
|
22653
22685
|
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
|
22654
|
-
throw $TypeError$2("Can't convert object to primitive value");
|
|
22686
|
+
throw new $TypeError$2("Can't convert object to primitive value");
|
|
22655
22687
|
};
|
|
22656
22688
|
|
|
22657
|
-
// eslint-disable-next-line es
|
|
22689
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
22658
22690
|
var defineProperty = Object.defineProperty;
|
|
22659
22691
|
|
|
22660
22692
|
var defineGlobalProperty = function (key, value) {
|
|
@@ -22671,13 +22703,16 @@ var store = global_1[SHARED] || defineGlobalProperty(SHARED, {});
|
|
|
22671
22703
|
var sharedStore = store;
|
|
22672
22704
|
|
|
22673
22705
|
var shared = createCommonjsModule(function (module) {
|
|
22706
|
+
|
|
22707
|
+
|
|
22708
|
+
|
|
22674
22709
|
(module.exports = function (key, value) {
|
|
22675
22710
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
22676
22711
|
})('versions', []).push({
|
|
22677
|
-
version: '3.
|
|
22712
|
+
version: '3.33.3',
|
|
22678
22713
|
mode: 'global',
|
|
22679
|
-
copyright: '© 2014-
|
|
22680
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
22714
|
+
copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
|
|
22715
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.33.3/LICENSE',
|
|
22681
22716
|
source: 'https://github.com/zloirock/core-js'
|
|
22682
22717
|
});
|
|
22683
22718
|
});
|
|
@@ -22694,7 +22729,7 @@ var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
|
|
|
22694
22729
|
|
|
22695
22730
|
// `HasOwnProperty` abstract operation
|
|
22696
22731
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
22697
|
-
// eslint-disable-next-line es
|
|
22732
|
+
// eslint-disable-next-line es/no-object-hasown -- safe
|
|
22698
22733
|
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
22699
22734
|
return hasOwnProperty(toObject(it), key);
|
|
22700
22735
|
};
|
|
@@ -22707,21 +22742,15 @@ var uid = function (key) {
|
|
|
22707
22742
|
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$3(++id + postfix, 36);
|
|
22708
22743
|
};
|
|
22709
22744
|
|
|
22710
|
-
var WellKnownSymbolsStore = shared('wks');
|
|
22711
22745
|
var Symbol$1 = global_1.Symbol;
|
|
22712
|
-
var
|
|
22713
|
-
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;
|
|
22714
22748
|
|
|
22715
22749
|
var wellKnownSymbol = function (name) {
|
|
22716
|
-
if (!hasOwnProperty_1(WellKnownSymbolsStore, name)
|
|
22717
|
-
|
|
22718
|
-
|
|
22719
|
-
|
|
22720
|
-
} else if (useSymbolAsUid && symbolFor) {
|
|
22721
|
-
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
22722
|
-
} else {
|
|
22723
|
-
WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
|
|
22724
|
-
}
|
|
22750
|
+
if (!hasOwnProperty_1(WellKnownSymbolsStore, name)) {
|
|
22751
|
+
WellKnownSymbolsStore[name] = symbolConstructorDetection && hasOwnProperty_1(Symbol$1, name)
|
|
22752
|
+
? Symbol$1[name]
|
|
22753
|
+
: createWellKnownSymbol('Symbol.' + name);
|
|
22725
22754
|
} return WellKnownSymbolsStore[name];
|
|
22726
22755
|
};
|
|
22727
22756
|
|
|
@@ -22738,7 +22767,7 @@ var toPrimitive = function (input, pref) {
|
|
|
22738
22767
|
if (pref === undefined) pref = 'default';
|
|
22739
22768
|
result = functionCall(exoticToPrim, input, pref);
|
|
22740
22769
|
if (!isObject(result) || isSymbol(result)) return result;
|
|
22741
|
-
throw $TypeError$3("Can't convert object to primitive value");
|
|
22770
|
+
throw new $TypeError$3("Can't convert object to primitive value");
|
|
22742
22771
|
}
|
|
22743
22772
|
if (pref === undefined) pref = 'number';
|
|
22744
22773
|
return ordinaryToPrimitive(input, pref);
|
|
@@ -22761,13 +22790,13 @@ var documentCreateElement = function (it) {
|
|
|
22761
22790
|
|
|
22762
22791
|
// Thanks to IE8 for its funny defineProperty
|
|
22763
22792
|
var ie8DomDefine = !descriptors && !fails(function () {
|
|
22764
|
-
// eslint-disable-next-line es
|
|
22793
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
22765
22794
|
return Object.defineProperty(documentCreateElement('div'), 'a', {
|
|
22766
22795
|
get: function () { return 7; }
|
|
22767
|
-
}).a
|
|
22796
|
+
}).a !== 7;
|
|
22768
22797
|
});
|
|
22769
22798
|
|
|
22770
|
-
// eslint-disable-next-line es
|
|
22799
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
22771
22800
|
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
22772
22801
|
|
|
22773
22802
|
// `Object.getOwnPropertyDescriptor` method
|
|
@@ -22788,26 +22817,26 @@ var objectGetOwnPropertyDescriptor = {
|
|
|
22788
22817
|
// V8 ~ Chrome 36-
|
|
22789
22818
|
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
22790
22819
|
var v8PrototypeDefineBug = descriptors && fails(function () {
|
|
22791
|
-
// eslint-disable-next-line es
|
|
22820
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
22792
22821
|
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
22793
22822
|
value: 42,
|
|
22794
22823
|
writable: false
|
|
22795
|
-
}).prototype
|
|
22824
|
+
}).prototype !== 42;
|
|
22796
22825
|
});
|
|
22797
22826
|
|
|
22798
|
-
var $String$
|
|
22827
|
+
var $String$2 = String;
|
|
22799
22828
|
var $TypeError$4 = TypeError;
|
|
22800
22829
|
|
|
22801
22830
|
// `Assert: Type(argument) is Object`
|
|
22802
22831
|
var anObject = function (argument) {
|
|
22803
22832
|
if (isObject(argument)) return argument;
|
|
22804
|
-
throw $TypeError$4($String$
|
|
22833
|
+
throw new $TypeError$4($String$2(argument) + ' is not an object');
|
|
22805
22834
|
};
|
|
22806
22835
|
|
|
22807
22836
|
var $TypeError$5 = TypeError;
|
|
22808
|
-
// eslint-disable-next-line es
|
|
22837
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
22809
22838
|
var $defineProperty = Object.defineProperty;
|
|
22810
|
-
// eslint-disable-next-line es
|
|
22839
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
22811
22840
|
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
22812
22841
|
var ENUMERABLE = 'enumerable';
|
|
22813
22842
|
var CONFIGURABLE = 'configurable';
|
|
@@ -22837,7 +22866,7 @@ var f$2 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Att
|
|
|
22837
22866
|
if (ie8DomDefine) try {
|
|
22838
22867
|
return $defineProperty(O, P, Attributes);
|
|
22839
22868
|
} catch (error) { /* empty */ }
|
|
22840
|
-
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');
|
|
22841
22870
|
if ('value' in Attributes) O[P] = Attributes.value;
|
|
22842
22871
|
return O;
|
|
22843
22872
|
};
|
|
@@ -22854,7 +22883,7 @@ var createNonEnumerableProperty = descriptors ? function (object, key, value) {
|
|
|
22854
22883
|
};
|
|
22855
22884
|
|
|
22856
22885
|
var FunctionPrototype$1 = Function.prototype;
|
|
22857
|
-
// eslint-disable-next-line es
|
|
22886
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
22858
22887
|
var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
|
|
22859
22888
|
|
|
22860
22889
|
var EXISTS$1 = hasOwnProperty_1(FunctionPrototype$1, 'name');
|
|
@@ -22881,7 +22910,7 @@ var inspectSource = sharedStore.inspectSource;
|
|
|
22881
22910
|
|
|
22882
22911
|
var WeakMap$1 = global_1.WeakMap;
|
|
22883
22912
|
|
|
22884
|
-
var
|
|
22913
|
+
var weakMapBasicDetection = isCallable(WeakMap$1) && /native code/.test(String(WeakMap$1));
|
|
22885
22914
|
|
|
22886
22915
|
var keys$1 = shared('keys');
|
|
22887
22916
|
|
|
@@ -22904,27 +22933,29 @@ var getterFor = function (TYPE) {
|
|
|
22904
22933
|
return function (it) {
|
|
22905
22934
|
var state;
|
|
22906
22935
|
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
|
22907
|
-
throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
|
|
22936
|
+
throw new TypeError$1('Incompatible receiver, ' + TYPE + ' required');
|
|
22908
22937
|
} return state;
|
|
22909
22938
|
};
|
|
22910
22939
|
};
|
|
22911
22940
|
|
|
22912
|
-
if (
|
|
22941
|
+
if (weakMapBasicDetection || sharedStore.state) {
|
|
22913
22942
|
var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$2());
|
|
22914
|
-
|
|
22915
|
-
|
|
22916
|
-
|
|
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 */
|
|
22917
22948
|
set = function (it, metadata) {
|
|
22918
|
-
if (
|
|
22949
|
+
if (store$1.has(it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
22919
22950
|
metadata.facade = it;
|
|
22920
|
-
|
|
22951
|
+
store$1.set(it, metadata);
|
|
22921
22952
|
return metadata;
|
|
22922
22953
|
};
|
|
22923
22954
|
get = function (it) {
|
|
22924
|
-
return
|
|
22955
|
+
return store$1.get(it) || {};
|
|
22925
22956
|
};
|
|
22926
22957
|
has = function (it) {
|
|
22927
|
-
return
|
|
22958
|
+
return store$1.has(it);
|
|
22928
22959
|
};
|
|
22929
22960
|
} else {
|
|
22930
22961
|
var STATE = sharedKey('state');
|
|
@@ -22952,14 +22983,23 @@ var internalState = {
|
|
|
22952
22983
|
};
|
|
22953
22984
|
|
|
22954
22985
|
var makeBuiltIn_1 = createCommonjsModule(function (module) {
|
|
22986
|
+
|
|
22987
|
+
|
|
22988
|
+
|
|
22989
|
+
|
|
22990
|
+
|
|
22955
22991
|
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
|
22956
22992
|
|
|
22957
22993
|
|
|
22958
22994
|
|
|
22959
22995
|
var enforceInternalState = internalState.enforce;
|
|
22960
22996
|
var getInternalState = internalState.get;
|
|
22961
|
-
|
|
22997
|
+
var $String = String;
|
|
22998
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
22962
22999
|
var defineProperty = Object.defineProperty;
|
|
23000
|
+
var stringSlice = functionUncurryThis(''.slice);
|
|
23001
|
+
var replace = functionUncurryThis(''.replace);
|
|
23002
|
+
var join = functionUncurryThis([].join);
|
|
22963
23003
|
|
|
22964
23004
|
var CONFIGURABLE_LENGTH = descriptors && !fails(function () {
|
|
22965
23005
|
return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
@@ -22968,8 +23008,8 @@ var CONFIGURABLE_LENGTH = descriptors && !fails(function () {
|
|
|
22968
23008
|
var TEMPLATE = String(String).split('String');
|
|
22969
23009
|
|
|
22970
23010
|
var makeBuiltIn = module.exports = function (value, name, options) {
|
|
22971
|
-
if (String(name)
|
|
22972
|
-
name = '[' + String(name)
|
|
23011
|
+
if (stringSlice($String(name), 0, 7) === 'Symbol(') {
|
|
23012
|
+
name = '[' + replace($String(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
22973
23013
|
}
|
|
22974
23014
|
if (options && options.getter) name = 'get ' + name;
|
|
22975
23015
|
if (options && options.setter) name = 'set ' + name;
|
|
@@ -22988,7 +23028,7 @@ var makeBuiltIn = module.exports = function (value, name, options) {
|
|
|
22988
23028
|
} catch (error) { /* empty */ }
|
|
22989
23029
|
var state = enforceInternalState(value);
|
|
22990
23030
|
if (!hasOwnProperty_1(state, 'source')) {
|
|
22991
|
-
state.source =
|
|
23031
|
+
state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
|
|
22992
23032
|
} return value;
|
|
22993
23033
|
};
|
|
22994
23034
|
|
|
@@ -23027,7 +23067,7 @@ var floor = Math.floor;
|
|
|
23027
23067
|
|
|
23028
23068
|
// `Math.trunc` method
|
|
23029
23069
|
// https://tc39.es/ecma262/#sec-math.trunc
|
|
23030
|
-
// eslint-disable-next-line es
|
|
23070
|
+
// eslint-disable-next-line es/no-math-trunc -- safe
|
|
23031
23071
|
var mathTrunc = Math.trunc || function trunc(x) {
|
|
23032
23072
|
var n = +x;
|
|
23033
23073
|
return (n > 0 ? floor : ceil)(n);
|
|
@@ -23075,10 +23115,10 @@ var createMethod = function (IS_INCLUDES) {
|
|
|
23075
23115
|
var value;
|
|
23076
23116
|
// Array#includes uses SameValueZero equality algorithm
|
|
23077
23117
|
// eslint-disable-next-line no-self-compare -- NaN check
|
|
23078
|
-
if (IS_INCLUDES && el
|
|
23118
|
+
if (IS_INCLUDES && el !== el) while (length > index) {
|
|
23079
23119
|
value = O[index++];
|
|
23080
23120
|
// eslint-disable-next-line no-self-compare -- NaN check
|
|
23081
|
-
if (value
|
|
23121
|
+
if (value !== value) return true;
|
|
23082
23122
|
// Array#indexOf ignores holes, Array#includes - not
|
|
23083
23123
|
} else for (;length > index; index++) {
|
|
23084
23124
|
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
@@ -23128,7 +23168,7 @@ var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
|
|
|
23128
23168
|
|
|
23129
23169
|
// `Object.getOwnPropertyNames` method
|
|
23130
23170
|
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
23131
|
-
// eslint-disable-next-line es
|
|
23171
|
+
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
|
|
23132
23172
|
var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
23133
23173
|
return objectKeysInternal(O, hiddenKeys$1);
|
|
23134
23174
|
};
|
|
@@ -23137,7 +23177,7 @@ var objectGetOwnPropertyNames = {
|
|
|
23137
23177
|
f: f$3
|
|
23138
23178
|
};
|
|
23139
23179
|
|
|
23140
|
-
// eslint-disable-next-line es
|
|
23180
|
+
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
|
23141
23181
|
var f$4 = Object.getOwnPropertySymbols;
|
|
23142
23182
|
|
|
23143
23183
|
var objectGetOwnPropertySymbols = {
|
|
@@ -23169,8 +23209,8 @@ var replacement = /#|\.prototype\./;
|
|
|
23169
23209
|
|
|
23170
23210
|
var isForced = function (feature, detection) {
|
|
23171
23211
|
var value = data[normalize(feature)];
|
|
23172
|
-
return value
|
|
23173
|
-
: value
|
|
23212
|
+
return value === POLYFILL ? true
|
|
23213
|
+
: value === NATIVE ? false
|
|
23174
23214
|
: isCallable(detection) ? fails(detection)
|
|
23175
23215
|
: !!detection;
|
|
23176
23216
|
};
|
|
@@ -23250,7 +23290,7 @@ var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
|
|
|
23250
23290
|
var $Object$3 = Object;
|
|
23251
23291
|
|
|
23252
23292
|
// ES3 wrong here
|
|
23253
|
-
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }())
|
|
23293
|
+
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';
|
|
23254
23294
|
|
|
23255
23295
|
// fallback for IE11 Script Access Denied error
|
|
23256
23296
|
var tryGet = function (it, key) {
|
|
@@ -23268,25 +23308,25 @@ var classof = toStringTagSupport ? classofRaw : function (it) {
|
|
|
23268
23308
|
// builtinTag case
|
|
23269
23309
|
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
23270
23310
|
// ES3 arguments fallback
|
|
23271
|
-
: (result = classofRaw(O))
|
|
23311
|
+
: (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;
|
|
23272
23312
|
};
|
|
23273
23313
|
|
|
23274
|
-
var $String$
|
|
23314
|
+
var $String$3 = String;
|
|
23275
23315
|
|
|
23276
23316
|
var toString_1 = function (argument) {
|
|
23277
|
-
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
23278
|
-
return $String$
|
|
23317
|
+
if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
|
|
23318
|
+
return $String$3(argument);
|
|
23279
23319
|
};
|
|
23280
23320
|
|
|
23281
23321
|
var charAt = functionUncurryThis(''.charAt);
|
|
23282
23322
|
|
|
23283
23323
|
var FORCED = fails(function () {
|
|
23284
|
-
// eslint-disable-next-line es
|
|
23324
|
+
// eslint-disable-next-line es/no-array-string-prototype-at -- safe
|
|
23285
23325
|
return '𠮷'.at(-2) !== '\uD842';
|
|
23286
23326
|
});
|
|
23287
23327
|
|
|
23288
23328
|
// `String.prototype.at` method
|
|
23289
|
-
// https://
|
|
23329
|
+
// https://tc39.es/ecma262/#sec-string.prototype.at
|
|
23290
23330
|
_export({ target: 'String', proto: true, forced: FORCED }, {
|
|
23291
23331
|
at: function at(index) {
|
|
23292
23332
|
var S = toString_1(requireObjectCoercible(this));
|
|
@@ -23299,14 +23339,14 @@ _export({ target: 'String', proto: true, forced: FORCED }, {
|
|
|
23299
23339
|
|
|
23300
23340
|
// `Object.keys` method
|
|
23301
23341
|
// https://tc39.es/ecma262/#sec-object.keys
|
|
23302
|
-
// eslint-disable-next-line es
|
|
23342
|
+
// eslint-disable-next-line es/no-object-keys -- safe
|
|
23303
23343
|
var objectKeys = Object.keys || function keys(O) {
|
|
23304
23344
|
return objectKeysInternal(O, enumBugKeys);
|
|
23305
23345
|
};
|
|
23306
23346
|
|
|
23307
23347
|
// `Object.defineProperties` method
|
|
23308
23348
|
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
23309
|
-
// eslint-disable-next-line es
|
|
23349
|
+
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
23310
23350
|
var f$5 = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
23311
23351
|
anObject(O);
|
|
23312
23352
|
var props = toIndexedObject(Properties);
|
|
@@ -23395,7 +23435,7 @@ hiddenKeys[IE_PROTO] = true;
|
|
|
23395
23435
|
|
|
23396
23436
|
// `Object.create` method
|
|
23397
23437
|
// https://tc39.es/ecma262/#sec-object.create
|
|
23398
|
-
// eslint-disable-next-line es
|
|
23438
|
+
// eslint-disable-next-line es/no-object-create -- safe
|
|
23399
23439
|
var objectCreate = Object.create || function create(O, Properties) {
|
|
23400
23440
|
var result;
|
|
23401
23441
|
if (O !== null) {
|
|
@@ -23415,7 +23455,7 @@ var ArrayPrototype = Array.prototype;
|
|
|
23415
23455
|
|
|
23416
23456
|
// Array.prototype[@@unscopables]
|
|
23417
23457
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
23418
|
-
if (ArrayPrototype[UNSCOPABLES]
|
|
23458
|
+
if (ArrayPrototype[UNSCOPABLES] === undefined) {
|
|
23419
23459
|
defineProperty$1(ArrayPrototype, UNSCOPABLES, {
|
|
23420
23460
|
configurable: true,
|
|
23421
23461
|
value: objectCreate(null)
|
|
@@ -23428,7 +23468,7 @@ var addToUnscopables = function (key) {
|
|
|
23428
23468
|
};
|
|
23429
23469
|
|
|
23430
23470
|
// `Array.prototype.at` method
|
|
23431
|
-
// https://
|
|
23471
|
+
// https://tc39.es/ecma262/#sec-array.prototype.at
|
|
23432
23472
|
_export({ target: 'Array', proto: true }, {
|
|
23433
23473
|
at: function at(index) {
|
|
23434
23474
|
var O = toObject(this);
|
|
@@ -23441,13 +23481,19 @@ _export({ target: 'Array', proto: true }, {
|
|
|
23441
23481
|
|
|
23442
23482
|
addToUnscopables('at');
|
|
23443
23483
|
|
|
23444
|
-
// eslint-disable-next-line es
|
|
23445
|
-
var
|
|
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
|
+
};
|
|
23446
23492
|
|
|
23447
23493
|
var correctPrototypeGetter = !fails(function () {
|
|
23448
23494
|
function F() { /* empty */ }
|
|
23449
23495
|
F.prototype.constructor = null;
|
|
23450
|
-
// eslint-disable-next-line es
|
|
23496
|
+
// eslint-disable-next-line es/no-object-getprototypeof -- required for testing
|
|
23451
23497
|
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
23452
23498
|
});
|
|
23453
23499
|
|
|
@@ -23457,7 +23503,7 @@ var ObjectPrototype = $Object$4.prototype;
|
|
|
23457
23503
|
|
|
23458
23504
|
// `Object.getPrototypeOf` method
|
|
23459
23505
|
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
23460
|
-
// eslint-disable-next-line es
|
|
23506
|
+
// eslint-disable-next-line es/no-object-getprototypeof -- safe
|
|
23461
23507
|
var objectGetPrototypeOf = correctPrototypeGetter ? $Object$4.getPrototypeOf : function (O) {
|
|
23462
23508
|
var object = toObject(O);
|
|
23463
23509
|
if (hasOwnProperty_1(object, IE_PROTO$1)) return object[IE_PROTO$1];
|
|
@@ -23467,12 +23513,19 @@ var objectGetPrototypeOf = correctPrototypeGetter ? $Object$4.getPrototypeOf : f
|
|
|
23467
23513
|
} return object instanceof $Object$4 ? ObjectPrototype : null;
|
|
23468
23514
|
};
|
|
23469
23515
|
|
|
23470
|
-
var
|
|
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;
|
|
23471
23524
|
var $TypeError$6 = TypeError;
|
|
23472
23525
|
|
|
23473
23526
|
var aPossiblePrototype = function (argument) {
|
|
23474
23527
|
if (typeof argument == 'object' || isCallable(argument)) return argument;
|
|
23475
|
-
throw $TypeError$6("Can't set " + $String$
|
|
23528
|
+
throw new $TypeError$6("Can't set " + $String$4(argument) + ' as a prototype');
|
|
23476
23529
|
};
|
|
23477
23530
|
|
|
23478
23531
|
/* eslint-disable no-proto -- safe */
|
|
@@ -23483,14 +23536,13 @@ var aPossiblePrototype = function (argument) {
|
|
|
23483
23536
|
// `Object.setPrototypeOf` method
|
|
23484
23537
|
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
23485
23538
|
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
23486
|
-
// eslint-disable-next-line es
|
|
23539
|
+
// eslint-disable-next-line es/no-object-setprototypeof -- safe
|
|
23487
23540
|
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
23488
23541
|
var CORRECT_SETTER = false;
|
|
23489
23542
|
var test = {};
|
|
23490
23543
|
var setter;
|
|
23491
23544
|
try {
|
|
23492
|
-
|
|
23493
|
-
setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
23545
|
+
setter = functionUncurryThisAccessor(Object.prototype, '__proto__', 'set');
|
|
23494
23546
|
setter(test, []);
|
|
23495
23547
|
CORRECT_SETTER = test instanceof Array;
|
|
23496
23548
|
} catch (error) { /* empty */ }
|
|
@@ -23503,14 +23555,6 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
23503
23555
|
};
|
|
23504
23556
|
}() : undefined);
|
|
23505
23557
|
|
|
23506
|
-
var defineProperty$2 = objectDefineProperty.f;
|
|
23507
|
-
|
|
23508
|
-
|
|
23509
|
-
|
|
23510
|
-
|
|
23511
|
-
|
|
23512
|
-
|
|
23513
|
-
|
|
23514
23558
|
var enforceInternalState = internalState.enforce;
|
|
23515
23559
|
var getInternalState = internalState.get;
|
|
23516
23560
|
var Int8Array = global_1.Int8Array;
|
|
@@ -23526,7 +23570,7 @@ var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
|
|
|
23526
23570
|
var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
|
|
23527
23571
|
var TYPED_ARRAY_CONSTRUCTOR = 'TypedArrayConstructor';
|
|
23528
23572
|
// Fixing native typed arrays in Opera Presto crashes the browser, see #595
|
|
23529
|
-
var NATIVE_ARRAY_BUFFER_VIEWS =
|
|
23573
|
+
var NATIVE_ARRAY_BUFFER_VIEWS = arrayBufferBasicDetection && !!objectSetPrototypeOf && classof(global_1.opera) !== 'Opera';
|
|
23530
23574
|
var TYPED_ARRAY_TAG_REQUIRED = false;
|
|
23531
23575
|
var NAME, Constructor, Prototype;
|
|
23532
23576
|
|
|
@@ -23571,12 +23615,12 @@ var isTypedArray = function (it) {
|
|
|
23571
23615
|
|
|
23572
23616
|
var aTypedArray = function (it) {
|
|
23573
23617
|
if (isTypedArray(it)) return it;
|
|
23574
|
-
throw TypeError$2('Target is not a typed array');
|
|
23618
|
+
throw new TypeError$2('Target is not a typed array');
|
|
23575
23619
|
};
|
|
23576
23620
|
|
|
23577
23621
|
var aTypedArrayConstructor = function (C) {
|
|
23578
23622
|
if (isCallable(C) && (!objectSetPrototypeOf || objectIsPrototypeOf(TypedArray, C))) return C;
|
|
23579
|
-
throw TypeError$2(tryToString(C) + ' is not a typed array constructor');
|
|
23623
|
+
throw new TypeError$2(tryToString(C) + ' is not a typed array constructor');
|
|
23580
23624
|
};
|
|
23581
23625
|
|
|
23582
23626
|
var exportTypedArrayMethod = function (KEY, property, forced, options) {
|
|
@@ -23640,7 +23684,7 @@ for (NAME in BigIntArrayConstructorsList) {
|
|
|
23640
23684
|
if (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) {
|
|
23641
23685
|
// eslint-disable-next-line no-shadow -- safe
|
|
23642
23686
|
TypedArray = function TypedArray() {
|
|
23643
|
-
throw TypeError$2('Incorrect invocation');
|
|
23687
|
+
throw new TypeError$2('Incorrect invocation');
|
|
23644
23688
|
};
|
|
23645
23689
|
if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
|
|
23646
23690
|
if (global_1[NAME]) objectSetPrototypeOf(global_1[NAME], TypedArray);
|
|
@@ -23661,9 +23705,12 @@ if (NATIVE_ARRAY_BUFFER_VIEWS && objectGetPrototypeOf(Uint8ClampedArrayPrototype
|
|
|
23661
23705
|
|
|
23662
23706
|
if (descriptors && !hasOwnProperty_1(TypedArrayPrototype, TO_STRING_TAG$2)) {
|
|
23663
23707
|
TYPED_ARRAY_TAG_REQUIRED = true;
|
|
23664
|
-
|
|
23665
|
-
|
|
23666
|
-
|
|
23708
|
+
defineBuiltInAccessor(TypedArrayPrototype, TO_STRING_TAG$2, {
|
|
23709
|
+
configurable: true,
|
|
23710
|
+
get: function () {
|
|
23711
|
+
return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;
|
|
23712
|
+
}
|
|
23713
|
+
});
|
|
23667
23714
|
for (NAME in TypedArrayConstructorsList) if (global_1[NAME]) {
|
|
23668
23715
|
createNonEnumerableProperty(global_1[NAME], TYPED_ARRAY_TAG, NAME);
|
|
23669
23716
|
}
|
|
@@ -23687,7 +23734,7 @@ var aTypedArray$1 = arrayBufferViewCore.aTypedArray;
|
|
|
23687
23734
|
var exportTypedArrayMethod$1 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
23688
23735
|
|
|
23689
23736
|
// `%TypedArray%.prototype.at` method
|
|
23690
|
-
// https://
|
|
23737
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.at
|
|
23691
23738
|
exportTypedArrayMethod$1('at', function at(index) {
|
|
23692
23739
|
var O = aTypedArray$1(this);
|
|
23693
23740
|
var len = lengthOfArrayLike(O);
|
|
@@ -23698,9 +23745,11 @@ exportTypedArrayMethod$1('at', function at(index) {
|
|
|
23698
23745
|
|
|
23699
23746
|
var selectedColor = "".concat(MATISSE_BLUE);
|
|
23700
23747
|
var hoverColor$3 = "".concat(HOVER_LIGHT_BLUE);
|
|
23748
|
+
var focusColor = "".concat(MATISSE_BLUE_DARK);
|
|
23701
23749
|
var fallbackValues$f = {
|
|
23702
23750
|
selectedColor: selectedColor,
|
|
23703
|
-
hoverColor: hoverColor$3
|
|
23751
|
+
hoverColor: hoverColor$3,
|
|
23752
|
+
focusColor: focusColor
|
|
23704
23753
|
};
|
|
23705
23754
|
|
|
23706
23755
|
var IconWrapper = styled__default.div.withConfig({
|
|
@@ -23723,7 +23772,7 @@ var DropdownContentWrapper = styled__default.div.withConfig({
|
|
|
23723
23772
|
var DropdownItemWrapper = styled__default.li.withConfig({
|
|
23724
23773
|
displayName: "Dropdown__DropdownItemWrapper",
|
|
23725
23774
|
componentId: "sc-pn6m0h-2"
|
|
23726
|
-
})(["
|
|
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) {
|
|
23727
23776
|
var selected = _ref4.selected,
|
|
23728
23777
|
themeValues = _ref4.themeValues;
|
|
23729
23778
|
return selected ? themeValues.selectedColor : WHITE;
|
|
@@ -23731,44 +23780,69 @@ var DropdownItemWrapper = styled__default.li.withConfig({
|
|
|
23731
23780
|
var disabled = _ref5.disabled;
|
|
23732
23781
|
return disabled ? "default" : "pointer";
|
|
23733
23782
|
}, function (_ref6) {
|
|
23734
|
-
var
|
|
23735
|
-
|
|
23783
|
+
var disabled = _ref6.disabled,
|
|
23784
|
+
selected = _ref6.selected,
|
|
23736
23785
|
themeValues = _ref6.themeValues;
|
|
23737
|
-
return selected ? themeValues.
|
|
23786
|
+
return selected ? themeValues.focusColor : disabled ? WHITE : themeValues.hoverColor;
|
|
23738
23787
|
}, function (_ref7) {
|
|
23739
23788
|
var selected = _ref7.selected,
|
|
23740
23789
|
disabled = _ref7.disabled,
|
|
23741
23790
|
themeValues = _ref7.themeValues;
|
|
23742
|
-
return selected ? themeValues.
|
|
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;
|
|
23743
23817
|
});
|
|
23744
23818
|
|
|
23745
|
-
var Dropdown = function Dropdown(
|
|
23746
|
-
var placeholder =
|
|
23747
|
-
options =
|
|
23748
|
-
value =
|
|
23749
|
-
isOpen =
|
|
23750
|
-
isError =
|
|
23751
|
-
onSelect =
|
|
23752
|
-
|
|
23753
|
-
disabledValues =
|
|
23754
|
-
|
|
23755
|
-
_onClick =
|
|
23756
|
-
themeValues =
|
|
23757
|
-
maxHeight =
|
|
23758
|
-
|
|
23759
|
-
widthFitOptions =
|
|
23760
|
-
disabled =
|
|
23761
|
-
|
|
23762
|
-
hasTitles =
|
|
23763
|
-
|
|
23764
|
-
autoEraseTypeAhead =
|
|
23765
|
-
ariaLabelledby =
|
|
23766
|
-
ariaDescribedby =
|
|
23767
|
-
autocompleteValue =
|
|
23768
|
-
|
|
23769
|
-
smoothScroll =
|
|
23770
|
-
|
|
23771
|
-
ariaInvalid =
|
|
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;
|
|
23772
23846
|
|
|
23773
23847
|
var _useState = React.useState(""),
|
|
23774
23848
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -24090,11 +24164,15 @@ var Dropdown = function Dropdown(_ref8) {
|
|
|
24090
24164
|
onFocus: function onFocus() {
|
|
24091
24165
|
return setFocusedRef(optionRefs.current[i]);
|
|
24092
24166
|
}
|
|
24167
|
+
}, /*#__PURE__*/React__default.createElement(DropdownItemBorder, {
|
|
24168
|
+
disabled: disabledValues.includes(choice.value),
|
|
24169
|
+
selected: choice.value === value,
|
|
24170
|
+
themeValues: themeValues
|
|
24093
24171
|
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
24094
24172
|
variant: "p",
|
|
24095
24173
|
color: choice.value === value ? WHITE : disabledValues.includes(choice.value) ? STORM_GREY : MINESHAFT_GREY,
|
|
24096
|
-
extraStyles: "padding-left: 16px;\n
|
|
24097
|
-
}, 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)));
|
|
24098
24176
|
}))) : /*#__PURE__*/React__default.createElement(React.Fragment, null)));
|
|
24099
24177
|
};
|
|
24100
24178
|
|
|
@@ -24269,7 +24347,7 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24269
24347
|
}), /*#__PURE__*/React__default.createElement(Stack, {
|
|
24270
24348
|
direction: "row",
|
|
24271
24349
|
justify: "space-between"
|
|
24272
|
-
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
24350
|
+
}, field.hasErrors && field.dirty || field.hasErrors && showErrors ? /*#__PURE__*/React__default.createElement(Text$1, {
|
|
24273
24351
|
color: ERROR_COLOR,
|
|
24274
24352
|
variant: "pXS",
|
|
24275
24353
|
weight: themeValues.fontWeight,
|
|
@@ -24278,7 +24356,9 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
24278
24356
|
"aria-live": "polite",
|
|
24279
24357
|
"aria-atomic": true,
|
|
24280
24358
|
"data-qa": createIdFromString(labelTextWhenNoError, "error message")
|
|
24281
|
-
},
|
|
24359
|
+
}, errorMessages[field.errors[0]]) : /*#__PURE__*/React__default.createElement(Text$1, {
|
|
24360
|
+
extraStyles: "height: ".concat(themeValues.lineHeight, ";")
|
|
24361
|
+
})));
|
|
24282
24362
|
};
|
|
24283
24363
|
|
|
24284
24364
|
var FormSelect$1 = themeComponent(FormSelect, "FormSelect", fallbackValues$g, "default");
|
|
@@ -25209,6 +25289,346 @@ var DisplayBox = function DisplayBox(_ref) {
|
|
|
25209
25289
|
|
|
25210
25290
|
var DisplayBox$1 = themeComponent(DisplayBox, "DisplayBox", fallbackValues$i);
|
|
25211
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
|
+
|
|
25212
25632
|
function _extends$2() {
|
|
25213
25633
|
_extends$2 = Object.assign || function (target) {
|
|
25214
25634
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -25487,344 +25907,6 @@ var FormattedInput = function FormattedInput(_ref) {
|
|
|
25487
25907
|
}));
|
|
25488
25908
|
};
|
|
25489
25909
|
|
|
25490
|
-
var formatDelimiter = "_";
|
|
25491
|
-
var phoneFormats = ["", "_", "__", "(___) ", "(___) _", "(___) __", "(___) ___-", "(___) ___-_", "(___) ___-__", "(___) ___-___", "(___) ___-____"];
|
|
25492
|
-
var zipFormats = ["", "_", "__", "___", "____", "_____", "______", "_____-__", "_____-___", "_____-____"];
|
|
25493
|
-
var creditCardFormats = ["", "_", "__", "___", "____", "____ _", "____ __", "____ ___", "____ ____", "____ ____ _", "____ ____ __", "____ ____ ___", "____ ____ ____", "____ ____ ____ _", "____ ____ ____ __", "____ ____ ____ ___", "____ ____ ____ ____"];
|
|
25494
|
-
var moneyFormats = ["", "$0.0_", "$0.__", "$_.__", "$__.__", "$___.__", "$_,___.__", "$__,___.__", "$___,___.__", "$_,___,___.__", "$__,___,___.__", "$___,___,___.__", "$_,___,___,___.__", "$__,___,___,___.__", "$___,___,___,___.__", "$_,___,___,___,___.__"];
|
|
25495
|
-
var expirationDateFormats = ["", "_", "__/", "__/_", "__/__"];
|
|
25496
|
-
var zipFormat = createFormat(zipFormats, formatDelimiter);
|
|
25497
|
-
var creditCardFormat = createFormat(creditCardFormats, formatDelimiter);
|
|
25498
|
-
var expirationDateFormat = createFormat(expirationDateFormats, formatDelimiter);
|
|
25499
|
-
var phoneFormat = createFormat(phoneFormats, formatDelimiter);
|
|
25500
|
-
var moneyFormat = createFormat(moneyFormats, formatDelimiter);
|
|
25501
|
-
var renderCardStatus = function renderCardStatus(expirationStatus, expireDate) {
|
|
25502
|
-
var textAlign = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "right";
|
|
25503
|
-
var as = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "span";
|
|
25504
|
-
var ACTIVE = "ACTIVE";
|
|
25505
|
-
var EXPIRING_SOON = "EXPIRING_SOON";
|
|
25506
|
-
var EXPIRED = "EXPIRED";
|
|
25507
|
-
var textMargin = textAlign === "right" ? "auto" : "0";
|
|
25508
|
-
|
|
25509
|
-
switch (expirationStatus) {
|
|
25510
|
-
case ACTIVE:
|
|
25511
|
-
return /*#__PURE__*/React__default.createElement(Text$1, {
|
|
25512
|
-
as: as,
|
|
25513
|
-
variant: "pXS",
|
|
25514
|
-
color: ASH_GREY,
|
|
25515
|
-
extraStyles: "text-align: ".concat(textAlign, "; margin: ").concat(textMargin, ";")
|
|
25516
|
-
}, "Exp Date ", expireDate);
|
|
25517
|
-
|
|
25518
|
-
case EXPIRING_SOON:
|
|
25519
|
-
return /*#__PURE__*/React__default.createElement(Text$1, {
|
|
25520
|
-
as: as,
|
|
25521
|
-
variant: "pXS",
|
|
25522
|
-
color: FIRE_YELLOW,
|
|
25523
|
-
extraStyles: "text-align: ".concat(textAlign, "; margin: ").concat(textMargin, ";")
|
|
25524
|
-
}, "Expiring Soon ", expireDate);
|
|
25525
|
-
|
|
25526
|
-
case EXPIRED:
|
|
25527
|
-
return /*#__PURE__*/React__default.createElement(Text$1, {
|
|
25528
|
-
as: as,
|
|
25529
|
-
variant: "pXS",
|
|
25530
|
-
color: ASH_GREY,
|
|
25531
|
-
extraStyles: "text-align: ".concat(textAlign, "; margin: ").concat(textMargin, ";")
|
|
25532
|
-
}, "Expired");
|
|
25533
|
-
}
|
|
25534
|
-
};
|
|
25535
|
-
|
|
25536
|
-
var formats = /*#__PURE__*/Object.freeze({
|
|
25537
|
-
__proto__: null,
|
|
25538
|
-
formatDelimiter: formatDelimiter,
|
|
25539
|
-
phoneFormats: phoneFormats,
|
|
25540
|
-
moneyFormats: moneyFormats,
|
|
25541
|
-
expirationDateFormats: expirationDateFormats,
|
|
25542
|
-
zipFormat: zipFormat,
|
|
25543
|
-
creditCardFormat: creditCardFormat,
|
|
25544
|
-
expirationDateFormat: expirationDateFormat,
|
|
25545
|
-
phoneFormat: phoneFormat,
|
|
25546
|
-
moneyFormat: moneyFormat,
|
|
25547
|
-
renderCardStatus: renderCardStatus
|
|
25548
|
-
});
|
|
25549
|
-
|
|
25550
|
-
var useFocusInvalidInput = function useFocusInvalidInput(hasErrors) {
|
|
25551
|
-
var resetHasErrors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
|
|
25552
|
-
// Only move focus when "hasErrors" is true
|
|
25553
|
-
// "hasErrors" is managed by container page of form
|
|
25554
|
-
// typically set to "true" on attempted form submission, if errors exist
|
|
25555
|
-
// Reset errors, if provided, resets the error state tracking in order to properly re-run
|
|
25556
|
-
React.useEffect(function () {
|
|
25557
|
-
if (hasErrors) {
|
|
25558
|
-
var _inputsWithErrors$;
|
|
25559
|
-
|
|
25560
|
-
var inputsWithErrors = document.querySelectorAll("input[aria-invalid=true]");
|
|
25561
|
-
inputsWithErrors === null || inputsWithErrors === void 0 ? void 0 : (_inputsWithErrors$ = inputsWithErrors[0]) === null || _inputsWithErrors$ === void 0 ? void 0 : _inputsWithErrors$.focus();
|
|
25562
|
-
}
|
|
25563
|
-
|
|
25564
|
-
return function () {
|
|
25565
|
-
return resetHasErrors(false);
|
|
25566
|
-
};
|
|
25567
|
-
});
|
|
25568
|
-
};
|
|
25569
|
-
|
|
25570
|
-
/*
|
|
25571
|
-
Hook that assigns a click event listener to the main document element
|
|
25572
|
-
Returns a ref to attach to another element (like an icon/button that triggers a popover)
|
|
25573
|
-
If a click event gets captured by the document and the assigned element isn't the target
|
|
25574
|
-
hook will run whatever handler is passed (eg a function that closes a popover)
|
|
25575
|
-
|
|
25576
|
-
See popover component for implementation
|
|
25577
|
-
|
|
25578
|
-
*/
|
|
25579
|
-
|
|
25580
|
-
var useOutsideClickHook = function useOutsideClickHook(handler) {
|
|
25581
|
-
var ref = React.useRef();
|
|
25582
|
-
React.useEffect(function () {
|
|
25583
|
-
}, [ref]);
|
|
25584
|
-
return ref;
|
|
25585
|
-
};
|
|
25586
|
-
|
|
25587
|
-
|
|
25588
|
-
|
|
25589
|
-
var index$4 = /*#__PURE__*/Object.freeze({
|
|
25590
|
-
__proto__: null,
|
|
25591
|
-
formats: formats,
|
|
25592
|
-
general: general,
|
|
25593
|
-
theme: themeUtils,
|
|
25594
|
-
useFocusInvalidInput: useFocusInvalidInput,
|
|
25595
|
-
useOutsideClick: useOutsideClickHook
|
|
25596
|
-
});
|
|
25597
|
-
|
|
25598
|
-
var hoverColor$4 = "#116285";
|
|
25599
|
-
var activeColor$4 = "#0E506D";
|
|
25600
|
-
var popoverTriggerColor = "#15749D";
|
|
25601
|
-
var fallbackValues$j = {
|
|
25602
|
-
hoverColor: hoverColor$4,
|
|
25603
|
-
activeColor: activeColor$4,
|
|
25604
|
-
popoverTriggerColor: popoverTriggerColor
|
|
25605
|
-
};
|
|
25606
|
-
|
|
25607
|
-
var arrowBorder = function arrowBorder(borderColor, direction) {
|
|
25608
|
-
var width = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "8px";
|
|
25609
|
-
var angle = "".concat(width, " solid transparent");
|
|
25610
|
-
var straight = "".concat(width, " solid ").concat(borderColor);
|
|
25611
|
-
|
|
25612
|
-
if (direction == "down") {
|
|
25613
|
-
return "border-left: ".concat(angle, "; border-right: ").concat(angle, "; border-top: ").concat(straight);
|
|
25614
|
-
} else if (direction == "up") {
|
|
25615
|
-
return "border-left: ".concat(angle, "; border-right: ").concat(angle, "; border-bottom: ").concat(straight);
|
|
25616
|
-
} else if (direction == "left") {
|
|
25617
|
-
return "border-top: ".concat(angle, "; border-bottom: ").concat(angle, "; border-right: ").concat(straight);
|
|
25618
|
-
} else if (direction == "right") {
|
|
25619
|
-
return "border-top: ".concat(angle, "; border-bottom: ").concat(angle, "; border-left: ").concat(straight);
|
|
25620
|
-
}
|
|
25621
|
-
};
|
|
25622
|
-
|
|
25623
|
-
var Popover = function Popover(_ref) {
|
|
25624
|
-
var themeValues = _ref.themeValues,
|
|
25625
|
-
_ref$triggerText = _ref.triggerText,
|
|
25626
|
-
triggerText = _ref$triggerText === void 0 ? "" : _ref$triggerText,
|
|
25627
|
-
_ref$content = _ref.content,
|
|
25628
|
-
content = _ref$content === void 0 ? "" : _ref$content,
|
|
25629
|
-
_ref$hasIcon = _ref.hasIcon,
|
|
25630
|
-
hasIcon = _ref$hasIcon === void 0 ? false : _ref$hasIcon,
|
|
25631
|
-
Icon = _ref.icon,
|
|
25632
|
-
_ref$iconHelpText = _ref.iconHelpText,
|
|
25633
|
-
iconHelpText = _ref$iconHelpText === void 0 ? "" : _ref$iconHelpText,
|
|
25634
|
-
_ref$popoverID = _ref.popoverID,
|
|
25635
|
-
popoverID = _ref$popoverID === void 0 ? 0 : _ref$popoverID,
|
|
25636
|
-
_ref$popoverFocus = _ref.popoverFocus,
|
|
25637
|
-
popoverFocus = _ref$popoverFocus === void 0 ? false : _ref$popoverFocus,
|
|
25638
|
-
extraStyles = _ref.extraStyles,
|
|
25639
|
-
textExtraStyles = _ref.textExtraStyles,
|
|
25640
|
-
_ref$minWidth = _ref.minWidth,
|
|
25641
|
-
minWidth = _ref$minWidth === void 0 ? "250px" : _ref$minWidth,
|
|
25642
|
-
_ref$maxWidth = _ref.maxWidth,
|
|
25643
|
-
maxWidth = _ref$maxWidth === void 0 ? "300px" : _ref$maxWidth,
|
|
25644
|
-
_ref$height = _ref.height,
|
|
25645
|
-
height = _ref$height === void 0 ? "auto" : _ref$height,
|
|
25646
|
-
position = _ref.position,
|
|
25647
|
-
arrowPosition = _ref.arrowPosition,
|
|
25648
|
-
_ref$arrowDirection = _ref.arrowDirection,
|
|
25649
|
-
arrowDirection = _ref$arrowDirection === void 0 ? "down" : _ref$arrowDirection,
|
|
25650
|
-
_ref$transform = _ref.transform,
|
|
25651
|
-
transform = _ref$transform === void 0 ? "none" : _ref$transform,
|
|
25652
|
-
buttonExtraStyles = _ref.buttonExtraStyles,
|
|
25653
|
-
_ref$backgroundColor = _ref.backgroundColor,
|
|
25654
|
-
backgroundColor = _ref$backgroundColor === void 0 ? "white" : _ref$backgroundColor,
|
|
25655
|
-
_ref$borderColor = _ref.borderColor,
|
|
25656
|
-
borderColor = _ref$borderColor === void 0 ? "rgba(255, 255, 255, 0.85)" : _ref$borderColor,
|
|
25657
|
-
popoverExtraStyles = _ref.popoverExtraStyles;
|
|
25658
|
-
var hoverColor = themeValues.hoverColor,
|
|
25659
|
-
activeColor = themeValues.activeColor,
|
|
25660
|
-
popoverTriggerColor = themeValues.popoverTriggerColor;
|
|
25661
|
-
|
|
25662
|
-
var _ref2 = position !== null && position !== void 0 ? position : {},
|
|
25663
|
-
_ref2$top = _ref2.top,
|
|
25664
|
-
top = _ref2$top === void 0 ? "-110px" : _ref2$top,
|
|
25665
|
-
_ref2$right = _ref2.right,
|
|
25666
|
-
right = _ref2$right === void 0 ? "auto" : _ref2$right,
|
|
25667
|
-
_ref2$bottom = _ref2.bottom,
|
|
25668
|
-
bottom = _ref2$bottom === void 0 ? "auto" : _ref2$bottom,
|
|
25669
|
-
_ref2$left = _ref2.left,
|
|
25670
|
-
left = _ref2$left === void 0 ? "-225px" : _ref2$left;
|
|
25671
|
-
|
|
25672
|
-
var _ref3 = arrowPosition !== null && arrowPosition !== void 0 ? arrowPosition : {},
|
|
25673
|
-
_ref3$arrowTop = _ref3.arrowTop,
|
|
25674
|
-
arrowTop = _ref3$arrowTop === void 0 ? "auto" : _ref3$arrowTop,
|
|
25675
|
-
_ref3$arrowRight = _ref3.arrowRight,
|
|
25676
|
-
arrowRight = _ref3$arrowRight === void 0 ? "10px" : _ref3$arrowRight,
|
|
25677
|
-
_ref3$arrowBottom = _ref3.arrowBottom,
|
|
25678
|
-
arrowBottom = _ref3$arrowBottom === void 0 ? "-8px" : _ref3$arrowBottom,
|
|
25679
|
-
_ref3$arrowLeft = _ref3.arrowLeft,
|
|
25680
|
-
arrowLeft = _ref3$arrowLeft === void 0 ? "auto" : _ref3$arrowLeft;
|
|
25681
|
-
|
|
25682
|
-
var _useState = React.useState(false),
|
|
25683
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
25684
|
-
popoverOpen = _useState2[0],
|
|
25685
|
-
togglePopover = _useState2[1];
|
|
25686
|
-
|
|
25687
|
-
var handleTogglePopover = function handleTogglePopover(popoverState) {
|
|
25688
|
-
if (popoverOpen !== popoverState) {
|
|
25689
|
-
togglePopover(popoverState);
|
|
25690
|
-
}
|
|
25691
|
-
};
|
|
25692
|
-
|
|
25693
|
-
var triggerRef = useOutsideClickHook();
|
|
25694
|
-
return /*#__PURE__*/React__default.createElement(Box, {
|
|
25695
|
-
padding: "0",
|
|
25696
|
-
extraStyles: "position: relative; ".concat(extraStyles)
|
|
25697
|
-
}, /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
25698
|
-
action: function action() {
|
|
25699
|
-
return noop;
|
|
25700
|
-
},
|
|
25701
|
-
onFocus: function onFocus() {
|
|
25702
|
-
handleTogglePopover(true);
|
|
25703
|
-
},
|
|
25704
|
-
onBlur: function onBlur() {
|
|
25705
|
-
handleTogglePopover(false);
|
|
25706
|
-
},
|
|
25707
|
-
onKeyDown: function onKeyDown(e) {
|
|
25708
|
-
if (e.keyCode === 27) {
|
|
25709
|
-
handleTogglePopover(false);
|
|
25710
|
-
}
|
|
25711
|
-
},
|
|
25712
|
-
onTouchStart: function onTouchStart() {
|
|
25713
|
-
return handleTogglePopover(true);
|
|
25714
|
-
},
|
|
25715
|
-
onTouchEnd: function onTouchEnd() {
|
|
25716
|
-
return handleTogglePopover(false);
|
|
25717
|
-
},
|
|
25718
|
-
onMouseEnter: function onMouseEnter() {
|
|
25719
|
-
return handleTogglePopover(true);
|
|
25720
|
-
},
|
|
25721
|
-
onMouseLeave: function onMouseLeave() {
|
|
25722
|
-
return handleTogglePopover(false);
|
|
25723
|
-
},
|
|
25724
|
-
contentOverride: true,
|
|
25725
|
-
variant: "smallGhost",
|
|
25726
|
-
tabIndex: "0",
|
|
25727
|
-
id: "btnPopover".concat(popoverID),
|
|
25728
|
-
"aria-expanded": popoverOpen,
|
|
25729
|
-
"aria-labelledby": "btnPopover".concat(popoverID, "_info Disclosure").concat(popoverID),
|
|
25730
|
-
"aria-describedby": "Disclosure".concat(popoverID),
|
|
25731
|
-
"aria-controls": "Disclosed".concat(popoverID),
|
|
25732
|
-
ref: triggerRef,
|
|
25733
|
-
extraStyles: buttonExtraStyles
|
|
25734
|
-
}, hasIcon && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Icon, null), /*#__PURE__*/React__default.createElement(Box, {
|
|
25735
|
-
padding: "0",
|
|
25736
|
-
srOnly: true
|
|
25737
|
-
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
25738
|
-
id: "btnPopover".concat(popoverID, "_info")
|
|
25739
|
-
}, iconHelpText))), !hasIcon && /*#__PURE__*/React__default.createElement(Text$1, {
|
|
25740
|
-
color: popoverTriggerColor,
|
|
25741
|
-
extraStyles: "&:active { color: ".concat(activeColor, "; } &:hover { color: ").concat(hoverColor, " }; ").concat(textExtraStyles)
|
|
25742
|
-
}, triggerText)), /*#__PURE__*/React__default.createElement(Box, {
|
|
25743
|
-
background: backgroundColor,
|
|
25744
|
-
borderRadius: "4px",
|
|
25745
|
-
boxShadow: "0px 2px 14px 0px rgb(246, 246, 249), 0px 3px 8px 0px rgb(202, 206, 216)",
|
|
25746
|
-
id: "Disclosed".concat(popoverID),
|
|
25747
|
-
role: "region",
|
|
25748
|
-
"aria-describedby": "Disclosure".concat(popoverID),
|
|
25749
|
-
tabIndex: popoverFocus && popoverOpen ? "0" : "-1",
|
|
25750
|
-
minWidth: minWidth,
|
|
25751
|
-
maxWidth: maxWidth,
|
|
25752
|
-
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 ")
|
|
25753
|
-
}, /*#__PURE__*/React__default.createElement(Paragraph$1, null, content), /*#__PURE__*/React__default.createElement(Box, {
|
|
25754
|
-
padding: "0",
|
|
25755
|
-
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 ")
|
|
25756
|
-
})));
|
|
25757
|
-
};
|
|
25758
|
-
|
|
25759
|
-
var Popover$1 = themeComponent(Popover, "Popover", fallbackValues$j);
|
|
25760
|
-
|
|
25761
|
-
var DisplayCard = function DisplayCard(_ref) {
|
|
25762
|
-
var title = _ref.title,
|
|
25763
|
-
item = _ref.item,
|
|
25764
|
-
buttonText = _ref.buttonText,
|
|
25765
|
-
buttonAction = _ref.buttonAction,
|
|
25766
|
-
url = _ref.url,
|
|
25767
|
-
_ref$link = _ref.link,
|
|
25768
|
-
link = _ref$link === void 0 ? false : _ref$link,
|
|
25769
|
-
helpText = _ref.helpText,
|
|
25770
|
-
_ref$hasPopover = _ref.hasPopover,
|
|
25771
|
-
hasPopover = _ref$hasPopover === void 0 ? false : _ref$hasPopover,
|
|
25772
|
-
_ref$popoverTriggerTe = _ref.popoverTriggerText,
|
|
25773
|
-
popoverTriggerText = _ref$popoverTriggerTe === void 0 ? "" : _ref$popoverTriggerTe,
|
|
25774
|
-
_ref$popoverContent = _ref.popoverContent,
|
|
25775
|
-
popoverContent = _ref$popoverContent === void 0 ? "" : _ref$popoverContent,
|
|
25776
|
-
popoverExtraStyles = _ref.popoverExtraStyles,
|
|
25777
|
-
popoverTextExtraStyles = _ref.popoverTextExtraStyles;
|
|
25778
|
-
return /*#__PURE__*/React__default.createElement(Box, {
|
|
25779
|
-
padding: "0 0 16px"
|
|
25780
|
-
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
25781
|
-
childGap: "0rem"
|
|
25782
|
-
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
25783
|
-
padding: "0 0 8px 0"
|
|
25784
|
-
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
25785
|
-
justify: "space-between",
|
|
25786
|
-
align: "center",
|
|
25787
|
-
overflow: true
|
|
25788
|
-
}, /*#__PURE__*/React__default.createElement(Paragraph$1, {
|
|
25789
|
-
variant: "pL",
|
|
25790
|
-
color: CHARADE_GREY,
|
|
25791
|
-
extraStyles: "letter-spacing: 0.29px"
|
|
25792
|
-
}, title), hasPopover && /*#__PURE__*/React__default.createElement(Popover$1, {
|
|
25793
|
-
triggerText: popoverTriggerText,
|
|
25794
|
-
content: popoverContent,
|
|
25795
|
-
popoverExtraStyles: popoverExtraStyles,
|
|
25796
|
-
popoverTextExtraStyles: popoverTextExtraStyles
|
|
25797
|
-
}))), /*#__PURE__*/React__default.createElement(Box, {
|
|
25798
|
-
padding: "0"
|
|
25799
|
-
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
25800
|
-
padding: "24px",
|
|
25801
|
-
borderSize: "1px",
|
|
25802
|
-
borderRadius: "4px",
|
|
25803
|
-
background: WHITE,
|
|
25804
|
-
boxShadow: "0px 2px 14px 0px rgb(246, 246, 249), 0px 3px 8px 0px rgb(202, 206, 216)"
|
|
25805
|
-
}, /*#__PURE__*/React__default.createElement(Cluster, {
|
|
25806
|
-
justify: "space-between",
|
|
25807
|
-
align: "center"
|
|
25808
|
-
}, /*#__PURE__*/React__default.createElement(Text$1, {
|
|
25809
|
-
color: CHARADE_GREY
|
|
25810
|
-
}, item), link ? /*#__PURE__*/React__default.createElement(ButtonWithLink, {
|
|
25811
|
-
text: buttonText,
|
|
25812
|
-
url: url,
|
|
25813
|
-
variant: "smallGhost",
|
|
25814
|
-
dataQa: buttonText,
|
|
25815
|
-
extraStyles: "min-width: 0;"
|
|
25816
|
-
}) : buttonAction ? /*#__PURE__*/React__default.createElement(ButtonWithAction, {
|
|
25817
|
-
text: buttonText,
|
|
25818
|
-
action: buttonAction,
|
|
25819
|
-
variant: "smallGhost",
|
|
25820
|
-
dataQa: buttonText,
|
|
25821
|
-
extraStyles: "min-width: 0;"
|
|
25822
|
-
}) : helpText ? /*#__PURE__*/React__default.createElement(Text$1, {
|
|
25823
|
-
color: STORM_GREY,
|
|
25824
|
-
extraStyles: "font-style: italic;"
|
|
25825
|
-
}, helpText) : /*#__PURE__*/React__default.createElement(React.Fragment, null))))));
|
|
25826
|
-
};
|
|
25827
|
-
|
|
25828
25910
|
var linkColor$2 = {
|
|
25829
25911
|
"default": "".concat(MATISSE_BLUE),
|
|
25830
25912
|
disabled: "".concat(MATISSE_BLUE)
|
|
@@ -26291,6 +26373,66 @@ var fallbackValues$n = {
|
|
|
26291
26373
|
autopayTextColor: autopayTextColor$1
|
|
26292
26374
|
};
|
|
26293
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
|
+
|
|
26294
26436
|
var CreditCardWrapper = styled__default.div.withConfig({
|
|
26295
26437
|
displayName: "FormattedCreditCard__CreditCardWrapper",
|
|
26296
26438
|
componentId: "sc-s0ta5l-0"
|
|
@@ -47720,43 +47862,6 @@ var TermsAndConditionsControlV1 = function TermsAndConditionsControlV1(_ref) {
|
|
|
47720
47862
|
})))));
|
|
47721
47863
|
};
|
|
47722
47864
|
|
|
47723
|
-
/*
|
|
47724
|
-
Hook that takes an ID selector for an element on the screen
|
|
47725
|
-
And optionally values for top position, left position, smooth behavior
|
|
47726
|
-
Finds element on screen and scrolls it to the provided coordinates
|
|
47727
|
-
|
|
47728
|
-
(string, number, number, string, number) => undefined;
|
|
47729
|
-
*/
|
|
47730
|
-
var useScrollTo = function useScrollTo(id) {
|
|
47731
|
-
var top = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
47732
|
-
var left = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
47733
|
-
var behavior = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "auto";
|
|
47734
|
-
var delay = arguments.length > 4 ? arguments[4] : undefined;
|
|
47735
|
-
var scrollItem;
|
|
47736
|
-
|
|
47737
|
-
if (delay) {
|
|
47738
|
-
setTimeout(function () {
|
|
47739
|
-
var _scrollItem;
|
|
47740
|
-
|
|
47741
|
-
scrollItem = document.getElementById(id);
|
|
47742
|
-
(_scrollItem = scrollItem) === null || _scrollItem === void 0 ? void 0 : _scrollItem.scrollTo({
|
|
47743
|
-
top: top,
|
|
47744
|
-
left: left,
|
|
47745
|
-
behavior: behavior
|
|
47746
|
-
});
|
|
47747
|
-
}, delay);
|
|
47748
|
-
} else {
|
|
47749
|
-
var _scrollItem2;
|
|
47750
|
-
|
|
47751
|
-
scrollItem = document.getElementById(id);
|
|
47752
|
-
(_scrollItem2 = scrollItem) === null || _scrollItem2 === void 0 ? void 0 : _scrollItem2.scrollTo({
|
|
47753
|
-
top: top,
|
|
47754
|
-
left: left,
|
|
47755
|
-
behavior: behavior
|
|
47756
|
-
});
|
|
47757
|
-
}
|
|
47758
|
-
};
|
|
47759
|
-
|
|
47760
47865
|
var TermsAndConditionsControlV2 = function TermsAndConditionsControlV2(_ref) {
|
|
47761
47866
|
var _ref$showCheckbox = _ref.showCheckbox,
|
|
47762
47867
|
showCheckbox = _ref$showCheckbox === void 0 ? true : _ref$showCheckbox,
|
|
@@ -48559,9 +48664,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48559
48664
|
openHeight = _ref$openHeight === void 0 ? "auto" : _ref$openHeight,
|
|
48560
48665
|
_ref$containerStyles = _ref.containerStyles,
|
|
48561
48666
|
containerStyles = _ref$containerStyles === void 0 ? "" : _ref$containerStyles,
|
|
48562
|
-
ariaDescribedBy = _ref.ariaDescribedBy
|
|
48563
|
-
_ref$ariaLabel = _ref.ariaLabel,
|
|
48564
|
-
ariaLabel = _ref$ariaLabel === void 0 ? "Please select an option." : _ref$ariaLabel;
|
|
48667
|
+
ariaDescribedBy = _ref.ariaDescribedBy;
|
|
48565
48668
|
|
|
48566
48669
|
var handleKeyDown = function handleKeyDown(id, e) {
|
|
48567
48670
|
if ((e === null || e === void 0 ? void 0 : e.keyCode) === 13 || (e === null || e === void 0 ? void 0 : e.keyCode) === 32) {
|
|
@@ -48617,8 +48720,7 @@ var RadioSection = function RadioSection(_ref) {
|
|
|
48617
48720
|
extraStyles: containerStyles
|
|
48618
48721
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
48619
48722
|
childGap: "0",
|
|
48620
|
-
role: "radiogroup"
|
|
48621
|
-
"aria-label": ariaLabel
|
|
48723
|
+
role: "radiogroup"
|
|
48622
48724
|
}, sections.filter(function (section) {
|
|
48623
48725
|
return !section.hidden;
|
|
48624
48726
|
}).map(function (section) {
|
|
@@ -49197,6 +49299,51 @@ var Timeout = function Timeout(_ref) {
|
|
|
49197
49299
|
|
|
49198
49300
|
var Timeout$1 = withWindowSize(Timeout);
|
|
49199
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
|
+
|
|
49200
49347
|
var fontWeight$9 = "600";
|
|
49201
49348
|
var fontColor$1 = WHITE;
|
|
49202
49349
|
var textAlign$1 = "left";
|
|
@@ -49569,6 +49716,38 @@ var SidebarStackContent = function SidebarStackContent(_ref) {
|
|
|
49569
49716
|
|
|
49570
49717
|
var SidebarStackContent$1 = withWindowSize(themeComponent(SidebarStackContent, "Global", fallbackValues$U));
|
|
49571
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
|
+
|
|
49572
49751
|
exports.AccountNumberImage = AccountNumberImage;
|
|
49573
49752
|
exports.AccountsAddIcon = AccountsAddIcon$1;
|
|
49574
49753
|
exports.AccountsIcon = AccountsIcon$1;
|
|
@@ -49762,6 +49941,7 @@ exports.Text = Text$1;
|
|
|
49762
49941
|
exports.Timeout = Timeout$1;
|
|
49763
49942
|
exports.TimeoutImage = TimeoutImage;
|
|
49764
49943
|
exports.Title = Title$1;
|
|
49944
|
+
exports.ToastNotification = ToastNotification;
|
|
49765
49945
|
exports.ToggleSwitch = ToggleSwitch$1;
|
|
49766
49946
|
exports.TrashIcon = TrashIcon$1;
|
|
49767
49947
|
exports.TypeaheadInput = TypeaheadInput;
|
|
@@ -49779,6 +49959,7 @@ exports.cardRegistry = cardRegistry;
|
|
|
49779
49959
|
exports.constants = index$5;
|
|
49780
49960
|
exports.createPartialAmountFormState = createPartialAmountFormState;
|
|
49781
49961
|
exports.createPartialAmountFormValidators = createPartialAmountFormValidators;
|
|
49782
|
-
exports.
|
|
49962
|
+
exports.hooks = index$4;
|
|
49963
|
+
exports.util = index$6;
|
|
49783
49964
|
exports.withWindowSize = withWindowSize;
|
|
49784
49965
|
//# sourceMappingURL=index.cjs.js.map
|