aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/dist/js/bootstrap.js
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-04-28 19:02:23 +0000
committerMario <mario@mariovavti.com>2023-04-28 19:02:23 +0000
commit2a1341b910dfb1187dd9fceebd2b3be14e825e28 (patch)
treef2f5a26394d0a1a905823dd71b620e9c964fb155 /vendor/twbs/bootstrap/dist/js/bootstrap.js
parent1ed8b9dd149b9d2cb2fe30dc56ddc24cc523255c (diff)
downloadvolse-hubzilla-2a1341b910dfb1187dd9fceebd2b3be14e825e28.tar.gz
volse-hubzilla-2a1341b910dfb1187dd9fceebd2b3be14e825e28.tar.bz2
volse-hubzilla-2a1341b910dfb1187dd9fceebd2b3be14e825e28.zip
update bootstrap
Diffstat (limited to 'vendor/twbs/bootstrap/dist/js/bootstrap.js')
-rw-r--r--vendor/twbs/bootstrap/dist/js/bootstrap.js393
1 files changed, 197 insertions, 196 deletions
diff --git a/vendor/twbs/bootstrap/dist/js/bootstrap.js b/vendor/twbs/bootstrap/dist/js/bootstrap.js
index 9bf4ad1a0..99bcaf8a2 100644
--- a/vendor/twbs/bootstrap/dist/js/bootstrap.js
+++ b/vendor/twbs/bootstrap/dist/js/bootstrap.js
@@ -1,6 +1,6 @@
/*!
- * Bootstrap v5.3.0-alpha1 (https://getbootstrap.com/)
- * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
+ * Bootstrap v5.3.0-alpha3 (https://getbootstrap.com/)
+ * Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
@@ -30,7 +30,55 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.3.0-alpha1): util/index.js
+ * Bootstrap dom/data.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+ /**
+ * Constants
+ */
+
+ const elementMap = new Map();
+ const Data = {
+ set(element, key, instance) {
+ if (!elementMap.has(element)) {
+ elementMap.set(element, new Map());
+ }
+ const instanceMap = elementMap.get(element);
+
+ // make it clear we only want one instance per element
+ // can be removed later when multiple key/instances are fine to be used
+ if (!instanceMap.has(key) && instanceMap.size !== 0) {
+ // eslint-disable-next-line no-console
+ console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);
+ return;
+ }
+ instanceMap.set(key, instance);
+ },
+ get(element, key) {
+ if (elementMap.has(element)) {
+ return elementMap.get(element).get(key) || null;
+ }
+ return null;
+ },
+ remove(element, key) {
+ if (!elementMap.has(element)) {
+ return;
+ }
+ const instanceMap = elementMap.get(element);
+ instanceMap.delete(key);
+
+ // free up element references if there are no instances left for an element
+ if (instanceMap.size === 0) {
+ elementMap.delete(element);
+ }
+ }
+ };
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -277,7 +325,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.3.0-alpha1): dom/event-handler.js
+ * Bootstrap dom/event-handler.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -347,7 +395,7 @@
}
function normalizeParameters(originalTypeEvent, handler, delegationFunction) {
const isDelegated = typeof handler === 'string';
- // todo: tooltip passes `false` instead of selector, so we need to check
+ // TODO: tooltip passes `false` instead of selector, so we need to check
const callable = isDelegated ? delegationFunction : handler || delegationFunction;
let typeEvent = getTypeEvent(originalTypeEvent);
if (!nativeEvents.has(typeEvent)) {
@@ -464,11 +512,10 @@
nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
defaultPrevented = jQueryEvent.isDefaultPrevented();
}
- let evt = new Event(event, {
+ const evt = hydrateObj(new Event(event, {
bubbles,
cancelable: true
- });
- evt = hydrateObj(evt, args);
+ }), args);
if (defaultPrevented) {
evt.preventDefault();
}
@@ -499,55 +546,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.3.0-alpha1): dom/data.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
- * --------------------------------------------------------------------------
- */
-
- /**
- * Constants
- */
-
- const elementMap = new Map();
- const Data = {
- set(element, key, instance) {
- if (!elementMap.has(element)) {
- elementMap.set(element, new Map());
- }
- const instanceMap = elementMap.get(element);
-
- // make it clear we only want one instance per element
- // can be removed later when multiple key/instances are fine to be used
- if (!instanceMap.has(key) && instanceMap.size !== 0) {
- // eslint-disable-next-line no-console
- console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);
- return;
- }
- instanceMap.set(key, instance);
- },
- get(element, key) {
- if (elementMap.has(element)) {
- return elementMap.get(element).get(key) || null;
- }
- return null;
- },
- remove(element, key) {
- if (!elementMap.has(element)) {
- return;
- }
- const instanceMap = elementMap.get(element);
- instanceMap.delete(key);
-
- // free up element references if there are no instances left for an element
- if (instanceMap.size === 0) {
- elementMap.delete(element);
- }
- }
- };
-
- /**
- * --------------------------------------------------------------------------
- * Bootstrap (v5.3.0-alpha1): dom/manipulator.js
+ * Bootstrap dom/manipulator.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -604,7 +603,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.3.0-alpha1): util/config.js
+ * Bootstrap util/config.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -656,7 +655,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.3.0-alpha1): base-component.js
+ * Bootstrap base-component.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -665,7 +664,7 @@
* Constants
*/
- const VERSION = '5.3.0-alpha1';
+ const VERSION = '5.3.0-alpha2';
/**
* Class definition
@@ -724,7 +723,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.3.0-alpha1): dom/selector-engine.js
+ * Bootstrap dom/selector-engine.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -812,7 +811,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.3.0-alpha1): util/component-functions.js
+ * Bootstrap util/component-functions.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -836,7 +835,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.3.0-alpha1): alert.js
+ * Bootstrap alert.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -910,7 +909,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.3.0-alpha1): button.js
+ * Bootstrap button.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -973,7 +972,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.3.0-alpha1): util/swipe.js
+ * Bootstrap util/swipe.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -1092,7 +1091,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.3.0-alpha1): carousel.js
+ * Bootstrap carousel.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -1352,7 +1351,7 @@
}
if (!activeElement || !nextElement) {
// Some weirdness is happening, so we bail
- // todo: change tests that use empty divs to avoid this check
+ // TODO: change tests that use empty divs to avoid this check
return;
}
const isCycling = Boolean(this._interval);
@@ -1464,7 +1463,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.3.0-alpha1): collapse.js
+ * Bootstrap collapse.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -1697,7 +1696,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.3.0-alpha1): dropdown.js
+ * Bootstrap dropdown.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -1769,7 +1768,7 @@
super(element, config);
this._popper = null;
this._parent = this._element.parentNode; // dropdown wrapper
- // todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/
+ // TODO: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/
this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] || SelectorEngine.prev(this._element, SELECTOR_MENU)[0] || SelectorEngine.findOne(SELECTOR_MENU, this._parent);
this._inNavbar = this._detectNavbar();
}
@@ -1943,7 +1942,7 @@
// Disable Popper if we have a static display or Dropdown is in Navbar
if (this._inNavbar || this._config.display === 'static') {
- Manipulator.setDataAttribute(this._menu, 'popper', 'static'); // todo:v6 remove
+ Manipulator.setDataAttribute(this._menu, 'popper', 'static'); // TODO: v6 remove
defaultBsPopperConfig.modifiers = [{
name: 'applyStyles',
enabled: false
@@ -2025,7 +2024,7 @@
}
event.preventDefault();
- // todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/
+ // TODO: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/
const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.next(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.findOne(SELECTOR_DATA_TOGGLE$3, event.delegateTarget.parentNode);
const instance = Dropdown.getOrCreateInstance(getToggleButton);
if (isUpOrDownEvent) {
@@ -2064,104 +2063,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.3.0-alpha1): util/scrollBar.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
- * --------------------------------------------------------------------------
- */
-
- /**
- * Constants
- */
-
- const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
- const SELECTOR_STICKY_CONTENT = '.sticky-top';
- const PROPERTY_PADDING = 'padding-right';
- const PROPERTY_MARGIN = 'margin-right';
-
- /**
- * Class definition
- */
-
- class ScrollBarHelper {
- constructor() {
- this._element = document.body;
- }
-
- // Public
- getWidth() {
- // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
- const documentWidth = document.documentElement.clientWidth;
- return Math.abs(window.innerWidth - documentWidth);
- }
- hide() {
- const width = this.getWidth();
- this._disableOverFlow();
- // give padding to element to balance the hidden scrollbar width
- this._setElementAttributes(this._element, PROPERTY_PADDING, calculatedValue => calculatedValue + width);
- // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth
- this._setElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING, calculatedValue => calculatedValue + width);
- this._setElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN, calculatedValue => calculatedValue - width);
- }
- reset() {
- this._resetElementAttributes(this._element, 'overflow');
- this._resetElementAttributes(this._element, PROPERTY_PADDING);
- this._resetElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING);
- this._resetElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN);
- }
- isOverflowing() {
- return this.getWidth() > 0;
- }
-
- // Private
- _disableOverFlow() {
- this._saveInitialAttribute(this._element, 'overflow');
- this._element.style.overflow = 'hidden';
- }
- _setElementAttributes(selector, styleProperty, callback) {
- const scrollbarWidth = this.getWidth();
- const manipulationCallBack = element => {
- if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) {
- return;
- }
- this._saveInitialAttribute(element, styleProperty);
- const calculatedValue = window.getComputedStyle(element).getPropertyValue(styleProperty);
- element.style.setProperty(styleProperty, `${callback(Number.parseFloat(calculatedValue))}px`);
- };
- this._applyManipulationCallback(selector, manipulationCallBack);
- }
- _saveInitialAttribute(element, styleProperty) {
- const actualValue = element.style.getPropertyValue(styleProperty);
- if (actualValue) {
- Manipulator.setDataAttribute(element, styleProperty, actualValue);
- }
- }
- _resetElementAttributes(selector, styleProperty) {
- const manipulationCallBack = element => {
- const value = Manipulator.getDataAttribute(element, styleProperty);
- // We only want to remove the property if the value is `null`; the value can also be zero
- if (value === null) {
- element.style.removeProperty(styleProperty);
- return;
- }
- Manipulator.removeDataAttribute(element, styleProperty);
- element.style.setProperty(styleProperty, value);
- };
- this._applyManipulationCallback(selector, manipulationCallBack);
- }
- _applyManipulationCallback(selector, callBack) {
- if (isElement(selector)) {
- callBack(selector);
- return;
- }
- for (const sel of SelectorEngine.find(selector, this._element)) {
- callBack(sel);
- }
- }
- }
-
- /**
- * --------------------------------------------------------------------------
- * Bootstrap (v5.3.0-alpha1): util/backdrop.js
+ * Bootstrap util/backdrop.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -2285,7 +2187,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.3.0-alpha1): util/focustrap.js
+ * Bootstrap util/focustrap.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -2383,7 +2285,104 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.3.0-alpha1): modal.js
+ * Bootstrap util/scrollBar.js
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ * --------------------------------------------------------------------------
+ */
+
+ /**
+ * Constants
+ */
+
+ const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
+ const SELECTOR_STICKY_CONTENT = '.sticky-top';
+ const PROPERTY_PADDING = 'padding-right';
+ const PROPERTY_MARGIN = 'margin-right';
+
+ /**
+ * Class definition
+ */
+
+ class ScrollBarHelper {
+ constructor() {
+ this._element = document.body;
+ }
+
+ // Public
+ getWidth() {
+ // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
+ const documentWidth = document.documentElement.clientWidth;
+ return Math.abs(window.innerWidth - documentWidth);
+ }
+ hide() {
+ const width = this.getWidth();
+ this._disableOverFlow();
+ // give padding to element to balance the hidden scrollbar width
+ this._setElementAttributes(this._element, PROPERTY_PADDING, calculatedValue => calculatedValue + width);
+ // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth
+ this._setElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING, calculatedValue => calculatedValue + width);
+ this._setElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN, calculatedValue => calculatedValue - width);
+ }
+ reset() {
+ this._resetElementAttributes(this._element, 'overflow');
+ this._resetElementAttributes(this._element, PROPERTY_PADDING);
+ this._resetElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING);
+ this._resetElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN);
+ }
+ isOverflowing() {
+ return this.getWidth() > 0;
+ }
+
+ // Private
+ _disableOverFlow() {
+ this._saveInitialAttribute(this._element, 'overflow');
+ this._element.style.overflow = 'hidden';
+ }
+ _setElementAttributes(selector, styleProperty, callback) {
+ const scrollbarWidth = this.getWidth();
+ const manipulationCallBack = element => {
+ if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) {
+ return;
+ }
+ this._saveInitialAttribute(element, styleProperty);
+ const calculatedValue = window.getComputedStyle(element).getPropertyValue(styleProperty);
+ element.style.setProperty(styleProperty, `${callback(Number.parseFloat(calculatedValue))}px`);
+ };
+ this._applyManipulationCallback(selector, manipulationCallBack);
+ }
+ _saveInitialAttribute(element, styleProperty) {
+ const actualValue = element.style.getPropertyValue(styleProperty);
+ if (actualValue) {
+ Manipulator.setDataAttribute(element, styleProperty, actualValue);
+ }
+ }
+ _resetElementAttributes(selector, styleProperty) {
+ const manipulationCallBack = element => {
+ const value = Manipulator.getDataAttribute(element, styleProperty);
+ // We only want to remove the property if the value is `null`; the value can also be zero
+ if (value === null) {
+ element.style.removeProperty(styleProperty);
+ return;
+ }
+ Manipulator.removeDataAttribute(element, styleProperty);
+ element.style.setProperty(styleProperty, value);
+ };
+ this._applyManipulationCallback(selector, manipulationCallBack);
+ }
+ _applyManipulationCallback(selector, callBack) {
+ if (isElement(selector)) {
+ callBack(selector);
+ return;
+ }
+ for (const sel of SelectorEngine.find(selector, this._element)) {
+ callBack(sel);
+ }
+ }
+ }
+
+ /**
+ * --------------------------------------------------------------------------
+ * Bootstrap modal.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -2489,9 +2488,8 @@
this._queueCallback(() => this._hideModal(), this._element, this._isAnimated());
}
dispose() {
- for (const htmlElement of [window, this._dialog]) {
- EventHandler.off(htmlElement, EVENT_KEY$4);
- }
+ EventHandler.off(window, EVENT_KEY$4);
+ EventHandler.off(this._dialog, EVENT_KEY$4);
this._backdrop.dispose();
this._focustrap.deactivate();
super.dispose();
@@ -2546,7 +2544,6 @@
return;
}
if (this._config.keyboard) {
- event.preventDefault();
this.hide();
return;
}
@@ -2689,7 +2686,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.3.0-alpha1): offcanvas.js
+ * Bootstrap offcanvas.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -2847,11 +2844,11 @@
if (event.key !== ESCAPE_KEY) {
return;
}
- if (!this._config.keyboard) {
- EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);
+ if (this._config.keyboard) {
+ this.hide();
return;
}
- this.hide();
+ EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);
});
}
@@ -2919,13 +2916,12 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.3.0-alpha1): util/sanitizer.js
+ * Bootstrap util/sanitizer.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
const uriAttributes = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);
- const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
/**
* A pattern that recognizes a commonly useful subset of URLs that are safe.
@@ -2952,6 +2948,9 @@
// Check if a regular expression validates the attribute.
return allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp).some(regex => regex.test(attributeName));
};
+
+ // js-docs-start allow-list
+ const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
const DefaultAllowlist = {
// Global attributes allowed on any supplied element below.
'*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
@@ -2985,6 +2984,8 @@
u: [],
ul: []
};
+ // js-docs-end allow-list
+
function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) {
if (!unsafeHtml.length) {
return unsafeHtml;
@@ -3014,7 +3015,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.3.0-alpha1): util/template-factory.js
+ * Bootstrap util/template-factory.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -3149,7 +3150,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.3.0-alpha1): tooltip.js
+ * Bootstrap tooltip.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -3196,7 +3197,7 @@
delay: 0,
fallbackPlacements: ['top', 'right', 'bottom', 'left'],
html: false,
- offset: [0, 0],
+ offset: [0, 6],
placement: 'top',
popperConfig: null,
sanitize: true,
@@ -3309,7 +3310,7 @@
return;
}
- // todo v6 remove this OR make it optional
+ // TODO: v6 remove this or make it optional
this._disposePopper();
const tip = this._getTipElement();
this._element.setAttribute('aria-describedby', tip.getAttribute('id'));
@@ -3395,12 +3396,12 @@
_createTipElement(content) {
const tip = this._getTemplateFactory(content).toHtml();
- // todo: remove this check on v6
+ // TODO: remove this check in v6
if (!tip) {
return null;
}
tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2);
- // todo: on v6 the following can be achieved with CSS only
+ // TODO: v6 the following can be achieved with CSS only
tip.classList.add(`bs-${this.constructor.NAME}-auto`);
const tipId = getUID(this.constructor.NAME).toString();
tip.setAttribute('id', tipId);
@@ -3660,7 +3661,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.3.0-alpha1): popover.js
+ * Bootstrap popover.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -3740,7 +3741,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.3.0-alpha1): scrollspy.js
+ * Bootstrap scrollspy.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -3999,7 +4000,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.3.0-alpha1): tab.js
+ * Bootstrap tab.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -4032,7 +4033,7 @@
const SELECTOR_TAB_PANEL = '.list-group, .nav, [role="tablist"]';
const SELECTOR_OUTER = '.nav-item, .list-group-item';
const SELECTOR_INNER = `.nav-link${NOT_SELECTOR_DROPDOWN_TOGGLE}, .list-group-item${NOT_SELECTOR_DROPDOWN_TOGGLE}, [role="tab"]${NOT_SELECTOR_DROPDOWN_TOGGLE}`;
- const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]'; // todo:v6: could be only `tab`
+ const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]'; // TODO: could only be `tab` in v6
const SELECTOR_INNER_ELEM = `${SELECTOR_INNER}, ${SELECTOR_DATA_TOGGLE}`;
const SELECTOR_DATA_TOGGLE_ACTIVE = `.${CLASS_NAME_ACTIVE}[data-bs-toggle="tab"], .${CLASS_NAME_ACTIVE}[data-bs-toggle="pill"], .${CLASS_NAME_ACTIVE}[data-bs-toggle="list"]`;
@@ -4046,7 +4047,7 @@
this._parent = this._element.closest(SELECTOR_TAB_PANEL);
if (!this._parent) {
return;
- // todo: should Throw exception on v6
+ // TODO: should throw exception in v6
// throw new TypeError(`${element.outerHTML} has not a valid parent ${SELECTOR_INNER_ELEM}`)
}
@@ -4178,7 +4179,7 @@
}
this._setAttributeIfNotExists(target, 'role', 'tabpanel');
if (child.id) {
- this._setAttributeIfNotExists(target, 'aria-labelledby', `#${child.id}`);
+ this._setAttributeIfNotExists(target, 'aria-labelledby', `${child.id}`);
}
}
_toggleDropDown(element, open) {
@@ -4260,7 +4261,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.3.0-alpha1): toast.js
+ * Bootstrap toast.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -4443,7 +4444,7 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.3.0-alpha1): index.umd.js
+ * Bootstrap index.umd.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/