vrembem 3.0.11 → 3.0.13

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.
@@ -132,19 +132,29 @@ class Collection {
132
132
  }
133
133
  }
134
134
 
135
+ const not = {
136
+ inert: ':not([inert]):not([inert] *)',
137
+ negTabIndex: ':not([tabindex^="-"])',
138
+ disabled: ':not(:disabled)',
139
+ };
140
+
135
141
  var e = [
136
- 'a[href]:not([tabindex^="-"])',
137
- 'area[href]:not([tabindex^="-"])',
138
- 'input:not([type="hidden"]):not([type="radio"]):not([disabled]):not([tabindex^="-"])',
139
- 'input[type="radio"]:not([disabled]):not([tabindex^="-"])',
140
- 'select:not([disabled]):not([tabindex^="-"])',
141
- 'textarea:not([disabled]):not([tabindex^="-"])',
142
- 'button:not([disabled]):not([tabindex^="-"])',
143
- 'iframe:not([tabindex^="-"])',
144
- 'audio[controls]:not([tabindex^="-"])',
145
- 'video[controls]:not([tabindex^="-"])',
146
- '[contenteditable]:not([tabindex^="-"])',
147
- '[tabindex]:not([tabindex^="-"])',
142
+ `a[href]${not.inert}${not.negTabIndex}`,
143
+ `area[href]${not.inert}${not.negTabIndex}`,
144
+ `input:not([type="hidden"]):not([type="radio"])${not.inert}${not.negTabIndex}${not.disabled}`,
145
+ `input[type="radio"]${not.inert}${not.negTabIndex}${not.disabled}`,
146
+ `select${not.inert}${not.negTabIndex}${not.disabled}`,
147
+ `textarea${not.inert}${not.negTabIndex}${not.disabled}`,
148
+ `button${not.inert}${not.negTabIndex}${not.disabled}`,
149
+ `details${not.inert} > summary:first-of-type${not.negTabIndex}`,
150
+ // Discard until Firefox supports `:has()`
151
+ // See: https://github.com/KittyGiraudel/focusable-selectors/issues/12
152
+ // `details:not(:has(> summary))${not.inert}${not.negTabIndex}`,
153
+ `iframe${not.inert}${not.negTabIndex}`,
154
+ `audio[controls]${not.inert}${not.negTabIndex}`,
155
+ `video[controls]${not.inert}${not.negTabIndex}`,
156
+ `[contenteditable]${not.inert}${not.negTabIndex}`,
157
+ `[tabindex]${not.inert}${not.negTabIndex}`,
148
158
  ];
149
159
 
150
160
  var _focusable = /*#__PURE__*/_classPrivateFieldLooseKey("focusable");
@@ -2172,7 +2182,7 @@ var round = Math.round;
2172
2182
  function getUAString() {
2173
2183
  var uaData = navigator.userAgentData;
2174
2184
 
2175
- if (uaData != null && uaData.brands) {
2185
+ if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {
2176
2186
  return uaData.brands.map(function (item) {
2177
2187
  return item.brand + "/" + item.version;
2178
2188
  }).join(' ');
@@ -2460,7 +2470,6 @@ function effect$1(_ref2) {
2460
2470
  }
2461
2471
 
2462
2472
  if (!contains(state.elements.popper, arrowElement)) {
2463
-
2464
2473
  return;
2465
2474
  }
2466
2475
 
@@ -2491,10 +2500,9 @@ var unsetSides = {
2491
2500
  // Zooming can change the DPR, but it seems to report a value that will
2492
2501
  // cleanly divide the values into the appropriate subpixels.
2493
2502
 
2494
- function roundOffsetsByDPR(_ref) {
2503
+ function roundOffsetsByDPR(_ref, win) {
2495
2504
  var x = _ref.x,
2496
2505
  y = _ref.y;
2497
- var win = window;
2498
2506
  var dpr = win.devicePixelRatio || 1;
2499
2507
  return {
2500
2508
  x: round(x * dpr) / dpr || 0,
@@ -2577,7 +2585,7 @@ function mapToStyles(_ref2) {
2577
2585
  var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
2578
2586
  x: x,
2579
2587
  y: y
2580
- }) : {
2588
+ }, getWindow(popper)) : {
2581
2589
  x: x,
2582
2590
  y: y
2583
2591
  };
@@ -2603,7 +2611,6 @@ function computeStyles(_ref5) {
2603
2611
  adaptive = _options$adaptive === void 0 ? true : _options$adaptive,
2604
2612
  _options$roundOffsets = options.roundOffsets,
2605
2613
  roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;
2606
-
2607
2614
  var commonStyles = {
2608
2615
  placement: getBasePlacement(state.placement),
2609
2616
  variation: getVariation(state.placement),
@@ -3671,8 +3678,7 @@ function popperGenerator(generatorOptions) {
3671
3678
 
3672
3679
  state.orderedModifiers = orderedModifiers.filter(function (m) {
3673
3680
  return m.enabled;
3674
- }); // Validate the provided modifiers so that the consumer will get warned
3675
-
3681
+ });
3676
3682
  runModifierEffects();
3677
3683
  return instance.update();
3678
3684
  },
@@ -3692,7 +3698,6 @@ function popperGenerator(generatorOptions) {
3692
3698
  // anymore
3693
3699
 
3694
3700
  if (!areValidElements(reference, popper)) {
3695
-
3696
3701
  return;
3697
3702
  } // Store the reference and popper rects to be read by modifiers
3698
3703
 
@@ -3717,7 +3722,6 @@ function popperGenerator(generatorOptions) {
3717
3722
  });
3718
3723
 
3719
3724
  for (var index = 0; index < state.orderedModifiers.length; index++) {
3720
-
3721
3725
  if (state.reset === true) {
3722
3726
  state.reset = false;
3723
3727
  index = -1;
@@ -3755,7 +3759,6 @@ function popperGenerator(generatorOptions) {
3755
3759
  };
3756
3760
 
3757
3761
  if (!areValidElements(reference, popper)) {
3758
-
3759
3762
  return instance;
3760
3763
  }
3761
3764
 
@@ -3770,11 +3773,11 @@ function popperGenerator(generatorOptions) {
3770
3773
  // one.
3771
3774
 
3772
3775
  function runModifierEffects() {
3773
- state.orderedModifiers.forEach(function (_ref3) {
3774
- var name = _ref3.name,
3775
- _ref3$options = _ref3.options,
3776
- options = _ref3$options === void 0 ? {} : _ref3$options,
3777
- effect = _ref3.effect;
3776
+ state.orderedModifiers.forEach(function (_ref) {
3777
+ var name = _ref.name,
3778
+ _ref$options = _ref.options,
3779
+ options = _ref$options === void 0 ? {} : _ref$options,
3780
+ effect = _ref.effect;
3778
3781
 
3779
3782
  if (typeof effect === 'function') {
3780
3783
  var cleanupFn = effect({