@thecb/components 7.7.7 → 7.7.8-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -21319,7 +21319,7 @@ var check = function (it) {
21319
21319
 
21320
21320
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
21321
21321
  var global_1 =
21322
- // eslint-disable-next-line es/no-global-this -- safe
21322
+ // eslint-disable-next-line es-x/no-global-this -- safe
21323
21323
  check(typeof globalThis == 'object' && globalThis) ||
21324
21324
  check(typeof window == 'object' && window) ||
21325
21325
  // eslint-disable-next-line no-restricted-globals -- safe
@@ -21338,12 +21338,12 @@ var fails = function (exec) {
21338
21338
 
21339
21339
  // Detect IE8's incomplete defineProperty implementation
21340
21340
  var descriptors = !fails(function () {
21341
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
21341
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
21342
21342
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
21343
21343
  });
21344
21344
 
21345
21345
  var functionBindNative = !fails(function () {
21346
- // eslint-disable-next-line es/no-function-prototype-bind -- safe
21346
+ // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
21347
21347
  var test = (function () { /* empty */ }).bind();
21348
21348
  // eslint-disable-next-line no-prototype-builtins -- safe
21349
21349
  return typeof test != 'function' || test.hasOwnProperty('prototype');
@@ -21356,7 +21356,7 @@ var functionCall = functionBindNative ? call.bind(call) : function () {
21356
21356
  };
21357
21357
 
21358
21358
  var $propertyIsEnumerable = {}.propertyIsEnumerable;
21359
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
21359
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
21360
21360
  var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
21361
21361
 
21362
21362
  // Nashorn ~ JDK8 bug
@@ -21383,29 +21383,25 @@ var createPropertyDescriptor = function (bitmap, value) {
21383
21383
  };
21384
21384
 
21385
21385
  var FunctionPrototype = Function.prototype;
21386
+ var bind$1 = FunctionPrototype.bind;
21386
21387
  var call$1 = FunctionPrototype.call;
21387
- var uncurryThisWithBind = functionBindNative && FunctionPrototype.bind.bind(call$1, call$1);
21388
+ var uncurryThis = functionBindNative && bind$1.bind(call$1, call$1);
21388
21389
 
21389
- var functionUncurryThisRaw = function (fn) {
21390
- return functionBindNative ? uncurryThisWithBind(fn) : function () {
21390
+ var functionUncurryThis = functionBindNative ? function (fn) {
21391
+ return fn && uncurryThis(fn);
21392
+ } : function (fn) {
21393
+ return fn && function () {
21391
21394
  return call$1.apply(fn, arguments);
21392
21395
  };
21393
21396
  };
21394
21397
 
21395
- var toString$2 = functionUncurryThisRaw({}.toString);
21396
- var stringSlice = functionUncurryThisRaw(''.slice);
21398
+ var toString$2 = functionUncurryThis({}.toString);
21399
+ var stringSlice = functionUncurryThis(''.slice);
21397
21400
 
21398
21401
  var classofRaw = function (it) {
21399
21402
  return stringSlice(toString$2(it), 8, -1);
21400
21403
  };
21401
21404
 
21402
- var functionUncurryThis = function (fn) {
21403
- // Nashorn bug:
21404
- // https://github.com/zloirock/core-js/issues/1128
21405
- // https://github.com/zloirock/core-js/issues/1130
21406
- if (classofRaw(fn) === 'Function') return functionUncurryThisRaw(fn);
21407
- };
21408
-
21409
21405
  var $Object = Object;
21410
21406
  var split = functionUncurryThis(''.split);
21411
21407
 
@@ -21418,18 +21414,12 @@ var indexedObject = fails(function () {
21418
21414
  return classofRaw(it) == 'String' ? split(it, '') : $Object(it);
21419
21415
  } : $Object;
21420
21416
 
21421
- // we can't use just `it == null` since of `document.all` special case
21422
- // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
21423
- var isNullOrUndefined = function (it) {
21424
- return it === null || it === undefined;
21425
- };
21426
-
21427
21417
  var $TypeError = TypeError;
21428
21418
 
21429
21419
  // `RequireObjectCoercible` abstract operation
21430
21420
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
21431
21421
  var requireObjectCoercible = function (it) {
21432
- if (isNullOrUndefined(it)) throw $TypeError("Can't call method on " + it);
21422
+ if (it == undefined) throw $TypeError("Can't call method on " + it);
21433
21423
  return it;
21434
21424
  };
21435
21425
 
@@ -21441,31 +21431,13 @@ var toIndexedObject = function (it) {
21441
21431
  return indexedObject(requireObjectCoercible(it));
21442
21432
  };
21443
21433
 
21444
- var documentAll = typeof document == 'object' && document.all;
21445
-
21446
- // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
21447
- var IS_HTMLDDA = typeof documentAll == 'undefined' && documentAll !== undefined;
21448
-
21449
- var documentAll_1 = {
21450
- all: documentAll,
21451
- IS_HTMLDDA: IS_HTMLDDA
21452
- };
21453
-
21454
- var documentAll$1 = documentAll_1.all;
21455
-
21456
21434
  // `IsCallable` abstract operation
21457
21435
  // https://tc39.es/ecma262/#sec-iscallable
21458
- var isCallable = documentAll_1.IS_HTMLDDA ? function (argument) {
21459
- return typeof argument == 'function' || argument === documentAll$1;
21460
- } : function (argument) {
21436
+ var isCallable = function (argument) {
21461
21437
  return typeof argument == 'function';
21462
21438
  };
21463
21439
 
21464
- var documentAll$2 = documentAll_1.all;
21465
-
21466
- var isObject = documentAll_1.IS_HTMLDDA ? function (it) {
21467
- return typeof it == 'object' ? it !== null : isCallable(it) || it === documentAll$2;
21468
- } : function (it) {
21440
+ var isObject = function (it) {
21469
21441
  return typeof it == 'object' ? it !== null : isCallable(it);
21470
21442
  };
21471
21443
 
@@ -21506,12 +21478,12 @@ if (!version && engineUserAgent) {
21506
21478
 
21507
21479
  var engineV8Version = version;
21508
21480
 
21509
- /* eslint-disable es/no-symbol -- required for testing */
21481
+ /* eslint-disable es-x/no-symbol -- required for testing */
21510
21482
 
21511
21483
 
21512
21484
 
21513
- // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
21514
- var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails(function () {
21485
+ // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
21486
+ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
21515
21487
  var symbol = Symbol();
21516
21488
  // Chrome 38 Symbol has incorrect toString conversion
21517
21489
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
@@ -21520,10 +21492,10 @@ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails(functi
21520
21492
  !Symbol.sham && engineV8Version && engineV8Version < 41;
21521
21493
  });
21522
21494
 
21523
- /* eslint-disable es/no-symbol -- required for testing */
21495
+ /* eslint-disable es-x/no-symbol -- required for testing */
21524
21496
 
21525
21497
 
21526
- var useSymbolAsUid = symbolConstructorDetection
21498
+ var useSymbolAsUid = nativeSymbol
21527
21499
  && !Symbol.sham
21528
21500
  && typeof Symbol.iterator == 'symbol';
21529
21501
 
@@ -21558,7 +21530,7 @@ var aCallable = function (argument) {
21558
21530
  // https://tc39.es/ecma262/#sec-getmethod
21559
21531
  var getMethod = function (V, P) {
21560
21532
  var func = V[P];
21561
- return isNullOrUndefined(func) ? undefined : aCallable(func);
21533
+ return func == null ? undefined : aCallable(func);
21562
21534
  };
21563
21535
 
21564
21536
  var $TypeError$2 = TypeError;
@@ -21573,7 +21545,7 @@ var ordinaryToPrimitive = function (input, pref) {
21573
21545
  throw $TypeError$2("Can't convert object to primitive value");
21574
21546
  };
21575
21547
 
21576
- // eslint-disable-next-line es/no-object-defineproperty -- safe
21548
+ // eslint-disable-next-line es-x/no-object-defineproperty -- safe
21577
21549
  var defineProperty = Object.defineProperty;
21578
21550
 
21579
21551
  var defineGlobalProperty = function (key, value) {
@@ -21593,10 +21565,10 @@ var shared = createCommonjsModule(function (module) {
21593
21565
  (module.exports = function (key, value) {
21594
21566
  return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
21595
21567
  })('versions', []).push({
21596
- version: '3.25.5',
21568
+ version: '3.24.1',
21597
21569
  mode: 'global',
21598
21570
  copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
21599
- license: 'https://github.com/zloirock/core-js/blob/v3.25.5/LICENSE',
21571
+ license: 'https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE',
21600
21572
  source: 'https://github.com/zloirock/core-js'
21601
21573
  });
21602
21574
  });
@@ -21613,7 +21585,7 @@ var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
21613
21585
 
21614
21586
  // `HasOwnProperty` abstract operation
21615
21587
  // https://tc39.es/ecma262/#sec-hasownproperty
21616
- // eslint-disable-next-line es/no-object-hasown -- safe
21588
+ // eslint-disable-next-line es-x/no-object-hasown -- safe
21617
21589
  var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
21618
21590
  return hasOwnProperty(toObject(it), key);
21619
21591
  };
@@ -21632,9 +21604,9 @@ var symbolFor = Symbol$1 && Symbol$1['for'];
21632
21604
  var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
21633
21605
 
21634
21606
  var wellKnownSymbol = function (name) {
21635
- if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(symbolConstructorDetection || typeof WellKnownSymbolsStore[name] == 'string')) {
21607
+ if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
21636
21608
  var description = 'Symbol.' + name;
21637
- if (symbolConstructorDetection && hasOwnProperty_1(Symbol$1, name)) {
21609
+ if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) {
21638
21610
  WellKnownSymbolsStore[name] = Symbol$1[name];
21639
21611
  } else if (useSymbolAsUid && symbolFor) {
21640
21612
  WellKnownSymbolsStore[name] = symbolFor(description);
@@ -21680,13 +21652,13 @@ var documentCreateElement = function (it) {
21680
21652
 
21681
21653
  // Thanks to IE8 for its funny defineProperty
21682
21654
  var ie8DomDefine = !descriptors && !fails(function () {
21683
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
21655
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
21684
21656
  return Object.defineProperty(documentCreateElement('div'), 'a', {
21685
21657
  get: function () { return 7; }
21686
21658
  }).a != 7;
21687
21659
  });
21688
21660
 
21689
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
21661
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
21690
21662
  var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
21691
21663
 
21692
21664
  // `Object.getOwnPropertyDescriptor` method
@@ -21707,7 +21679,7 @@ var objectGetOwnPropertyDescriptor = {
21707
21679
  // V8 ~ Chrome 36-
21708
21680
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
21709
21681
  var v8PrototypeDefineBug = descriptors && fails(function () {
21710
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
21682
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
21711
21683
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
21712
21684
  value: 42,
21713
21685
  writable: false
@@ -21724,9 +21696,9 @@ var anObject = function (argument) {
21724
21696
  };
21725
21697
 
21726
21698
  var $TypeError$5 = TypeError;
21727
- // eslint-disable-next-line es/no-object-defineproperty -- safe
21699
+ // eslint-disable-next-line es-x/no-object-defineproperty -- safe
21728
21700
  var $defineProperty = Object.defineProperty;
21729
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
21701
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
21730
21702
  var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
21731
21703
  var ENUMERABLE = 'enumerable';
21732
21704
  var CONFIGURABLE = 'configurable';
@@ -21773,7 +21745,7 @@ var createNonEnumerableProperty = descriptors ? function (object, key, value) {
21773
21745
  };
21774
21746
 
21775
21747
  var FunctionPrototype$1 = Function.prototype;
21776
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
21748
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
21777
21749
  var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
21778
21750
 
21779
21751
  var EXISTS$1 = hasOwnProperty_1(FunctionPrototype$1, 'name');
@@ -21800,7 +21772,7 @@ var inspectSource = sharedStore.inspectSource;
21800
21772
 
21801
21773
  var WeakMap$1 = global_1.WeakMap;
21802
21774
 
21803
- var weakMapBasicDetection = isCallable(WeakMap$1) && /native code/.test(String(WeakMap$1));
21775
+ var nativeWeakMap = isCallable(WeakMap$1) && /native code/.test(inspectSource(WeakMap$1));
21804
21776
 
21805
21777
  var keys$1 = shared('keys');
21806
21778
 
@@ -21828,30 +21800,28 @@ var getterFor = function (TYPE) {
21828
21800
  };
21829
21801
  };
21830
21802
 
21831
- if (weakMapBasicDetection || sharedStore.state) {
21803
+ if (nativeWeakMap || sharedStore.state) {
21832
21804
  var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$2());
21833
- /* eslint-disable no-self-assign -- prototype methods protection */
21834
- store$1.get = store$1.get;
21835
- store$1.has = store$1.has;
21836
- store$1.set = store$1.set;
21837
- /* eslint-enable no-self-assign -- prototype methods protection */
21805
+ var wmget = functionUncurryThis(store$1.get);
21806
+ var wmhas = functionUncurryThis(store$1.has);
21807
+ var wmset = functionUncurryThis(store$1.set);
21838
21808
  set = function (it, metadata) {
21839
- if (store$1.has(it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
21809
+ if (wmhas(store$1, it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
21840
21810
  metadata.facade = it;
21841
- store$1.set(it, metadata);
21811
+ wmset(store$1, it, metadata);
21842
21812
  return metadata;
21843
21813
  };
21844
21814
  get = function (it) {
21845
- return store$1.get(it) || {};
21815
+ return wmget(store$1, it) || {};
21846
21816
  };
21847
21817
  has = function (it) {
21848
- return store$1.has(it);
21818
+ return wmhas(store$1, it);
21849
21819
  };
21850
21820
  } else {
21851
21821
  var STATE = sharedKey('state');
21852
21822
  hiddenKeys[STATE] = true;
21853
21823
  set = function (it, metadata) {
21854
- if (hasOwnProperty_1(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
21824
+ if (hasOwnProperty_1(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
21855
21825
  metadata.facade = it;
21856
21826
  createNonEnumerableProperty(it, STATE, metadata);
21857
21827
  return metadata;
@@ -21879,7 +21849,7 @@ var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
21879
21849
 
21880
21850
  var enforceInternalState = internalState.enforce;
21881
21851
  var getInternalState = internalState.get;
21882
- // eslint-disable-next-line es/no-object-defineproperty -- safe
21852
+ // eslint-disable-next-line es-x/no-object-defineproperty -- safe
21883
21853
  var defineProperty = Object.defineProperty;
21884
21854
 
21885
21855
  var CONFIGURABLE_LENGTH = descriptors && !fails(function () {
@@ -21948,7 +21918,7 @@ var floor = Math.floor;
21948
21918
 
21949
21919
  // `Math.trunc` method
21950
21920
  // https://tc39.es/ecma262/#sec-math.trunc
21951
- // eslint-disable-next-line es/no-math-trunc -- safe
21921
+ // eslint-disable-next-line es-x/no-math-trunc -- safe
21952
21922
  var mathTrunc = Math.trunc || function trunc(x) {
21953
21923
  var n = +x;
21954
21924
  return (n > 0 ? floor : ceil)(n);
@@ -22049,7 +22019,7 @@ var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
22049
22019
 
22050
22020
  // `Object.getOwnPropertyNames` method
22051
22021
  // https://tc39.es/ecma262/#sec-object.getownpropertynames
22052
- // eslint-disable-next-line es/no-object-getownpropertynames -- safe
22022
+ // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
22053
22023
  var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
22054
22024
  return objectKeysInternal(O, hiddenKeys$1);
22055
22025
  };
@@ -22058,7 +22028,7 @@ var objectGetOwnPropertyNames = {
22058
22028
  f: f$3
22059
22029
  };
22060
22030
 
22061
- // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
22031
+ // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
22062
22032
  var f$4 = Object.getOwnPropertySymbols;
22063
22033
 
22064
22034
  var objectGetOwnPropertySymbols = {
@@ -22202,7 +22172,7 @@ var toString_1 = function (argument) {
22202
22172
  var charAt = functionUncurryThis(''.charAt);
22203
22173
 
22204
22174
  var FORCED = fails(function () {
22205
- // eslint-disable-next-line es/no-array-string-prototype-at -- safe
22175
+ // eslint-disable-next-line es-x/no-array-string-prototype-at -- safe
22206
22176
  return '𠮷'.at(-2) !== '\uD842';
22207
22177
  });
22208
22178
 
@@ -22220,14 +22190,14 @@ _export({ target: 'String', proto: true, forced: FORCED }, {
22220
22190
 
22221
22191
  // `Object.keys` method
22222
22192
  // https://tc39.es/ecma262/#sec-object.keys
22223
- // eslint-disable-next-line es/no-object-keys -- safe
22193
+ // eslint-disable-next-line es-x/no-object-keys -- safe
22224
22194
  var objectKeys = Object.keys || function keys(O) {
22225
22195
  return objectKeysInternal(O, enumBugKeys);
22226
22196
  };
22227
22197
 
22228
22198
  // `Object.defineProperties` method
22229
22199
  // https://tc39.es/ecma262/#sec-object.defineproperties
22230
- // eslint-disable-next-line es/no-object-defineproperties -- safe
22200
+ // eslint-disable-next-line es-x/no-object-defineproperties -- safe
22231
22201
  var f$5 = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
22232
22202
  anObject(O);
22233
22203
  var props = toIndexedObject(Properties);
@@ -22316,7 +22286,7 @@ hiddenKeys[IE_PROTO] = true;
22316
22286
 
22317
22287
  // `Object.create` method
22318
22288
  // https://tc39.es/ecma262/#sec-object.create
22319
- // eslint-disable-next-line es/no-object-create -- safe
22289
+ // eslint-disable-next-line es-x/no-object-create -- safe
22320
22290
  var objectCreate = Object.create || function create(O, Properties) {
22321
22291
  var result;
22322
22292
  if (O !== null) {
@@ -22362,13 +22332,13 @@ _export({ target: 'Array', proto: true }, {
22362
22332
 
22363
22333
  addToUnscopables('at');
22364
22334
 
22365
- // eslint-disable-next-line es/no-typed-arrays -- safe
22366
- var arrayBufferBasicDetection = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
22335
+ // eslint-disable-next-line es-x/no-typed-arrays -- safe
22336
+ var arrayBufferNative = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
22367
22337
 
22368
22338
  var correctPrototypeGetter = !fails(function () {
22369
22339
  function F() { /* empty */ }
22370
22340
  F.prototype.constructor = null;
22371
- // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
22341
+ // eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing
22372
22342
  return Object.getPrototypeOf(new F()) !== F.prototype;
22373
22343
  });
22374
22344
 
@@ -22378,7 +22348,7 @@ var ObjectPrototype = $Object$4.prototype;
22378
22348
 
22379
22349
  // `Object.getPrototypeOf` method
22380
22350
  // https://tc39.es/ecma262/#sec-object.getprototypeof
22381
- // eslint-disable-next-line es/no-object-getprototypeof -- safe
22351
+ // eslint-disable-next-line es-x/no-object-getprototypeof -- safe
22382
22352
  var objectGetPrototypeOf = correctPrototypeGetter ? $Object$4.getPrototypeOf : function (O) {
22383
22353
  var object = toObject(O);
22384
22354
  if (hasOwnProperty_1(object, IE_PROTO$1)) return object[IE_PROTO$1];
@@ -22404,13 +22374,13 @@ var aPossiblePrototype = function (argument) {
22404
22374
  // `Object.setPrototypeOf` method
22405
22375
  // https://tc39.es/ecma262/#sec-object.setprototypeof
22406
22376
  // Works with __proto__ only. Old v8 can't work with null proto objects.
22407
- // eslint-disable-next-line es/no-object-setprototypeof -- safe
22377
+ // eslint-disable-next-line es-x/no-object-setprototypeof -- safe
22408
22378
  var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
22409
22379
  var CORRECT_SETTER = false;
22410
22380
  var test = {};
22411
22381
  var setter;
22412
22382
  try {
22413
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
22383
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
22414
22384
  setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
22415
22385
  setter(test, []);
22416
22386
  CORRECT_SETTER = test instanceof Array;
@@ -22447,7 +22417,7 @@ var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
22447
22417
  var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
22448
22418
  var TYPED_ARRAY_CONSTRUCTOR = 'TypedArrayConstructor';
22449
22419
  // Fixing native typed arrays in Opera Presto crashes the browser, see #595
22450
- var NATIVE_ARRAY_BUFFER_VIEWS = arrayBufferBasicDetection && !!objectSetPrototypeOf && classof(global_1.opera) !== 'Opera';
22420
+ var NATIVE_ARRAY_BUFFER_VIEWS = arrayBufferNative && !!objectSetPrototypeOf && classof(global_1.opera) !== 'Opera';
22451
22421
  var TYPED_ARRAY_TAG_REQUIRED = false;
22452
22422
  var NAME, Constructor, Prototype;
22453
22423
 
@@ -24484,6 +24454,49 @@ var useOutsideClickHook = function useOutsideClickHook(handler) {
24484
24454
  return ref;
24485
24455
  };
24486
24456
 
24457
+ /*
24458
+ Hook that determines whether every element in an array of DOM selectors is fully present
24459
+ within the user's current viewport.
24460
+
24461
+ (elements: Array<String>) => Boolean;
24462
+
24463
+ Takes an array of strings that correspond to DOM selectors. Examples:
24464
+ "#submit-button", ".module-small", "h2.alert-title"
24465
+
24466
+ The document query function will return the *first* element in the document that matches
24467
+ the string given.
24468
+
24469
+ A combination string of multiple selectors can also be provided, e.g.:
24470
+ ".alert-info, .alert-warning, .alert-error"
24471
+
24472
+ This will return the first element that matches *any* of the provided selectors
24473
+
24474
+ If every element in the array is fully within the viewport, function returns true
24475
+ */
24476
+
24477
+ var useCheckElementsInViewport = function useCheckElementsInViewport() {
24478
+ var elements = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
24479
+
24480
+ var _useState = useState(false),
24481
+ _useState2 = _slicedToArray(_useState, 2),
24482
+ elementsVisible = _useState2[0],
24483
+ setElementsVisible = _useState2[1];
24484
+
24485
+ var viewportWidth = window.innerWidth || document.documentElement.clientWidth;
24486
+ var viewportHeight = window.innerHeight || document.documentElement.clientHeight;
24487
+ useEffect$1(function () {
24488
+ elements.forEach(function (element) {
24489
+ var domEl = document.querySelector(element);
24490
+ var boundingBox = domEl.getBoundingClientRect();
24491
+
24492
+ if (boundingBox.top >= 0 && boundingBox.left >= 0 && boundingBox.right <= viewportWidth && boundingBox.bottom <= viewportHeight) {
24493
+ setElementsVisible(true);
24494
+ }
24495
+ });
24496
+ }, [elements]);
24497
+ return elementsVisible;
24498
+ };
24499
+
24487
24500
 
24488
24501
 
24489
24502
  var index$4 = /*#__PURE__*/Object.freeze({
@@ -24492,7 +24505,8 @@ var index$4 = /*#__PURE__*/Object.freeze({
24492
24505
  general: general,
24493
24506
  theme: themeUtils,
24494
24507
  useFocusInvalidInput: useFocusInvalidInput,
24495
- useOutsideClick: useOutsideClickHook
24508
+ useOutsideClick: useOutsideClickHook,
24509
+ useCheckElementsInViewport: useCheckElementsInViewport
24496
24510
  });
24497
24511
 
24498
24512
  var hoverColor$4 = "#116285";