lizaui 9.0.45 → 9.0.46

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.
@@ -35,14 +35,14 @@ var getRootNode = !NoElement && Element.prototype.getRootNode ? function(element
35
35
  } : function(element) {
36
36
  return element === null || element === void 0 ? void 0 : element.ownerDocument;
37
37
  };
38
- var isInert = function isInert2(node, lookUp) {
38
+ var _isInert = function isInert(node, lookUp) {
39
39
  var _node$getAttribute;
40
40
  if (lookUp === void 0) {
41
41
  lookUp = true;
42
42
  }
43
43
  var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, "inert");
44
44
  var inert = inertAtt === "" || inertAtt === "true";
45
- var result = inert || lookUp && node && isInert2(node.parentNode);
45
+ var result = inert || lookUp && node && _isInert(node.parentNode);
46
46
  return result;
47
47
  };
48
48
  var isContentEditable = function isContentEditable2(node) {
@@ -51,7 +51,7 @@ var isContentEditable = function isContentEditable2(node) {
51
51
  return attValue === "" || attValue === "true";
52
52
  };
53
53
  var getCandidates = function getCandidates2(el, includeContainer, filter) {
54
- if (isInert(el)) {
54
+ if (_isInert(el)) {
55
55
  return [];
56
56
  }
57
57
  var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));
@@ -61,18 +61,18 @@ var getCandidates = function getCandidates2(el, includeContainer, filter) {
61
61
  candidates = candidates.filter(filter);
62
62
  return candidates;
63
63
  };
64
- var getCandidatesIteratively = function getCandidatesIteratively2(elements, includeContainer, options) {
64
+ var _getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {
65
65
  var candidates = [];
66
66
  var elementsToCheck = Array.from(elements);
67
67
  while (elementsToCheck.length) {
68
68
  var element = elementsToCheck.shift();
69
- if (isInert(element, false)) {
69
+ if (_isInert(element, false)) {
70
70
  continue;
71
71
  }
72
72
  if (element.tagName === "SLOT") {
73
73
  var assigned = element.assignedElements();
74
74
  var content = assigned.length ? assigned : element.children;
75
- var nestedCandidates = getCandidatesIteratively2(content, true, options);
75
+ var nestedCandidates = _getCandidatesIteratively(content, true, options);
76
76
  if (options.flatten) {
77
77
  candidates.push.apply(candidates, nestedCandidates);
78
78
  } else {
@@ -88,9 +88,9 @@ var getCandidatesIteratively = function getCandidatesIteratively2(elements, incl
88
88
  }
89
89
  var shadowRoot = element.shadowRoot || // check for an undisclosed shadow
90
90
  typeof options.getShadowRoot === "function" && options.getShadowRoot(element);
91
- var validShadowRoot = !isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));
91
+ var validShadowRoot = !_isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));
92
92
  if (shadowRoot && validShadowRoot) {
93
- var _nestedCandidates = getCandidatesIteratively2(shadowRoot === true ? element.children : shadowRoot.children, true, options);
93
+ var _nestedCandidates = _getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);
94
94
  if (options.flatten) {
95
95
  candidates.push.apply(candidates, _nestedCandidates);
96
96
  } else {
@@ -199,6 +199,24 @@ var isZeroArea = function isZeroArea2(node) {
199
199
  };
200
200
  var isHidden = function isHidden2(node, _ref) {
201
201
  var displayCheck = _ref.displayCheck, getShadowRoot = _ref.getShadowRoot;
202
+ if (displayCheck === "full-native") {
203
+ if ("checkVisibility" in node) {
204
+ var visible = node.checkVisibility({
205
+ // Checking opacity might be desirable for some use cases, but natively,
206
+ // opacity zero elements _are_ focusable and tabbable.
207
+ checkOpacity: false,
208
+ opacityProperty: false,
209
+ contentVisibilityAuto: true,
210
+ visibilityProperty: true,
211
+ // This is an alias for `visibilityProperty`. Contemporary browsers
212
+ // support both. However, this alias has wider browser support (Chrome
213
+ // >= 105 and Firefox >= 106, vs. Chrome >= 121 and Firefox >= 122), so
214
+ // we include it anyway.
215
+ checkVisibilityCSS: true
216
+ });
217
+ return !visible;
218
+ }
219
+ }
202
220
  if (getComputedStyle(node).visibility === "hidden") {
203
221
  return true;
204
222
  }
@@ -207,7 +225,9 @@ var isHidden = function isHidden2(node, _ref) {
207
225
  if (matches.call(nodeUnderDetails, "details:not([open]) *")) {
208
226
  return true;
209
227
  }
210
- if (!displayCheck || displayCheck === "full" || displayCheck === "legacy-full") {
228
+ if (!displayCheck || displayCheck === "full" || // full-native can run this branch when it falls through in case
229
+ // Element#checkVisibility is unsupported
230
+ displayCheck === "full-native" || displayCheck === "legacy-full") {
211
231
  if (typeof getShadowRoot === "function") {
212
232
  var originalNode = node;
213
233
  while (node) {
@@ -258,7 +278,7 @@ var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable2(
258
278
  if (node.disabled || // we must do an inert look up to filter out any elements inside an inert ancestor
259
279
  // because we're limited in the type of selectors we can use in JSDom (see related
260
280
  // note related to `candidateSelectors`)
261
- isInert(node) || isHiddenInput(node) || isHidden(node, options) || // For a details element with a summary, the summary element gets the focus
281
+ _isInert(node) || isHiddenInput(node) || isHidden(node, options) || // For a details element with a summary, the summary element gets the focus
262
282
  isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {
263
283
  return false;
264
284
  }
@@ -270,21 +290,21 @@ var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable2(op
270
290
  }
271
291
  return true;
272
292
  };
273
- var isValidShadowRootTabbable = function isValidShadowRootTabbable2(shadowHostNode) {
293
+ var isShadowRootTabbable = function isShadowRootTabbable2(shadowHostNode) {
274
294
  var tabIndex = parseInt(shadowHostNode.getAttribute("tabindex"), 10);
275
295
  if (isNaN(tabIndex) || tabIndex >= 0) {
276
296
  return true;
277
297
  }
278
298
  return false;
279
299
  };
280
- var sortByOrder = function sortByOrder2(candidates) {
300
+ var _sortByOrder = function sortByOrder(candidates) {
281
301
  var regularTabbables = [];
282
302
  var orderedTabbables = [];
283
303
  candidates.forEach(function(item, i) {
284
304
  var isScope = !!item.scopeParent;
285
305
  var element = isScope ? item.scopeParent : item;
286
306
  var candidateTabindex = getSortOrderTabIndex(element, isScope);
287
- var elements = isScope ? sortByOrder2(item.candidates) : element;
307
+ var elements = isScope ? _sortByOrder(item.candidates) : element;
288
308
  if (candidateTabindex === 0) {
289
309
  isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);
290
310
  } else {
@@ -306,16 +326,16 @@ var tabbable = function tabbable2(container, options) {
306
326
  options = options || {};
307
327
  var candidates;
308
328
  if (options.getShadowRoot) {
309
- candidates = getCandidatesIteratively([container], options.includeContainer, {
329
+ candidates = _getCandidatesIteratively([container], options.includeContainer, {
310
330
  filter: isNodeMatchingSelectorTabbable.bind(null, options),
311
331
  flatten: false,
312
332
  getShadowRoot: options.getShadowRoot,
313
- shadowRootFilter: isValidShadowRootTabbable
333
+ shadowRootFilter: isShadowRootTabbable
314
334
  });
315
335
  } else {
316
336
  candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));
317
337
  }
318
- return sortByOrder(candidates);
338
+ return _sortByOrder(candidates);
319
339
  };
320
340
  function getPlatform() {
321
341
  const uaData = navigator.userAgentData;
@@ -1938,4 +1958,4 @@ const Tooltip = ({
1938
1958
  ] });
1939
1959
  };
1940
1960
  exports.Tooltip = Tooltip;
1941
- //# sourceMappingURL=tooltip-BT4TzSeu.js.map
1961
+ //# sourceMappingURL=tooltip-hhxclHkr.js.map