aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/js/src/collapse.js
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-01-20 11:05:15 +0000
committerMario <mario@mariovavti.com>2023-01-20 11:05:15 +0000
commit9dc949b62c6b5e3c8872211f71b11714d9d22b22 (patch)
tree38c06e7a128742e219eb74d6adb035f2f106918a /vendor/twbs/bootstrap/js/src/collapse.js
parent40394b94d7c8a8bf1f61f5482195164fff434b90 (diff)
downloadvolse-hubzilla-9dc949b62c6b5e3c8872211f71b11714d9d22b22.tar.gz
volse-hubzilla-9dc949b62c6b5e3c8872211f71b11714d9d22b22.tar.bz2
volse-hubzilla-9dc949b62c6b5e3c8872211f71b11714d9d22b22.zip
native dark theme initial checkin
Diffstat (limited to 'vendor/twbs/bootstrap/js/src/collapse.js')
-rw-r--r--vendor/twbs/bootstrap/js/src/collapse.js23
1 files changed, 9 insertions, 14 deletions
diff --git a/vendor/twbs/bootstrap/js/src/collapse.js b/vendor/twbs/bootstrap/js/src/collapse.js
index df2bbc647..b1dd7cf8a 100644
--- a/vendor/twbs/bootstrap/js/src/collapse.js
+++ b/vendor/twbs/bootstrap/js/src/collapse.js
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.2.2): collapse.js
+ * Bootstrap (v5.3.0-alpha1): collapse.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -8,13 +8,11 @@
import {
defineJQueryPlugin,
getElement,
- getElementFromSelector,
- getSelectorFromElement,
reflow
-} from './util/index'
-import EventHandler from './dom/event-handler'
-import SelectorEngine from './dom/selector-engine'
-import BaseComponent from './base-component'
+} from './util/index.js'
+import EventHandler from './dom/event-handler.js'
+import SelectorEngine from './dom/selector-engine.js'
+import BaseComponent from './base-component.js'
/**
* Constants
@@ -68,7 +66,7 @@ class Collapse extends BaseComponent {
const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE)
for (const elem of toggleList) {
- const selector = getSelectorFromElement(elem)
+ const selector = SelectorEngine.getSelectorFromElement(elem)
const filterElement = SelectorEngine.find(selector)
.filter(foundElement => foundElement === this._element)
@@ -185,7 +183,7 @@ class Collapse extends BaseComponent {
this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW)
for (const trigger of this._triggerArray) {
- const element = getElementFromSelector(trigger)
+ const element = SelectorEngine.getElementFromSelector(trigger)
if (element && !this._isShown(element)) {
this._addAriaAndCollapsedClass([trigger], false)
@@ -229,7 +227,7 @@ class Collapse extends BaseComponent {
const children = this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE)
for (const element of children) {
- const selected = getElementFromSelector(element)
+ const selected = SelectorEngine.getElementFromSelector(element)
if (selected) {
this._addAriaAndCollapsedClass([element], this._isShown(selected))
@@ -285,10 +283,7 @@ EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (
event.preventDefault()
}
- const selector = getSelectorFromElement(this)
- const selectorElements = SelectorEngine.find(selector)
-
- for (const element of selectorElements) {
+ for (const element of SelectorEngine.getMultipleElementsFromSelector(this)) {
Collapse.getOrCreateInstance(element, { toggle: false }).toggle()
}
})