aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/js/dist/dom/selector-engine.js
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-10-08 12:24:19 +0000
committerMario <mario@mariovavti.com>2021-10-08 12:24:19 +0000
commite6dac085cb1d601da1fc63bfd59d811612fa6ef4 (patch)
treef5b704b613c9c8d347857b4e7f8dd0b19cdd7df3 /vendor/twbs/bootstrap/js/dist/dom/selector-engine.js
parentf5f357060bf0ebcb0b8352519375953d993437e7 (diff)
downloadvolse-hubzilla-e6dac085cb1d601da1fc63bfd59d811612fa6ef4.tar.gz
volse-hubzilla-e6dac085cb1d601da1fc63bfd59d811612fa6ef4.tar.bz2
volse-hubzilla-e6dac085cb1d601da1fc63bfd59d811612fa6ef4.zip
update composer libs
Diffstat (limited to 'vendor/twbs/bootstrap/js/dist/dom/selector-engine.js')
-rw-r--r--vendor/twbs/bootstrap/js/dist/dom/selector-engine.js56
1 files changed, 49 insertions, 7 deletions
diff --git a/vendor/twbs/bootstrap/js/dist/dom/selector-engine.js b/vendor/twbs/bootstrap/js/dist/dom/selector-engine.js
index de6949b17..6c190db3a 100644
--- a/vendor/twbs/bootstrap/js/dist/dom/selector-engine.js
+++ b/vendor/twbs/bootstrap/js/dist/dom/selector-engine.js
@@ -1,5 +1,5 @@
/*!
- * Bootstrap selector-engine.js v5.0.2 (https://getbootstrap.com/)
+ * Bootstrap selector-engine.js v5.1.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@@ -7,19 +7,56 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.SelectorEngine = factory());
-}(this, (function () { 'use strict';
+})(this, (function () { 'use strict';
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.0.2): dom/selector-engine.js
+ * Bootstrap (v5.1.2): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
+ const isElement = obj => {
+ if (!obj || typeof obj !== 'object') {
+ return false;
+ }
+
+ if (typeof obj.jquery !== 'undefined') {
+ obj = obj[0];
+ }
+
+ return typeof obj.nodeType !== 'undefined';
+ };
+
+ const isVisible = element => {
+ if (!isElement(element) || element.getClientRects().length === 0) {
+ return false;
+ }
+
+ return getComputedStyle(element).getPropertyValue('visibility') === 'visible';
+ };
+
+ const isDisabled = element => {
+ if (!element || element.nodeType !== Node.ELEMENT_NODE) {
+ return true;
+ }
+
+ if (element.classList.contains('disabled')) {
+ return true;
+ }
+
+ if (typeof element.disabled !== 'undefined') {
+ return element.disabled;
+ }
+
+ return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false';
+ };
+
/**
- * ------------------------------------------------------------------------
- * Constants
- * ------------------------------------------------------------------------
+ * --------------------------------------------------------------------------
+ * Bootstrap (v5.1.2): dom/selector-engine.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
*/
const NODE_TEXT = 3;
const SelectorEngine = {
@@ -76,11 +113,16 @@
}
return [];
+ },
+
+ focusableChildren(element) {
+ const focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable="true"]'].map(selector => `${selector}:not([tabindex^="-"])`).join(', ');
+ return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el));
}
};
return SelectorEngine;
-})));
+}));
//# sourceMappingURL=selector-engine.js.map