aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/js/dist/dom/selector-engine.js
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/twbs/bootstrap/js/dist/dom/selector-engine.js')
-rw-r--r--vendor/twbs/bootstrap/js/dist/dom/selector-engine.js52
1 files changed, 5 insertions, 47 deletions
diff --git a/vendor/twbs/bootstrap/js/dist/dom/selector-engine.js b/vendor/twbs/bootstrap/js/dist/dom/selector-engine.js
index ed761bc44..de6949b17 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.1.1 (https://getbootstrap.com/)
+ * Bootstrap selector-engine.js v5.0.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)
*/
@@ -11,52 +11,15 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.1): util/index.js
+ * Bootstrap (v5.0.2): dom/selector-engine.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';
- };
-
/**
- * --------------------------------------------------------------------------
- * Bootstrap (v5.1.1): dom/selector-engine.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
- * --------------------------------------------------------------------------
+ * ------------------------------------------------------------------------
+ * Constants
+ * ------------------------------------------------------------------------
*/
const NODE_TEXT = 3;
const SelectorEngine = {
@@ -113,11 +76,6 @@
}
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));
}
};