aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/js/dist/button.js
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-08-19 13:15:48 +0000
committerMario <mario@mariovavti.com>2022-08-19 13:15:48 +0000
commit185ddf1eaf82e08586be6c7689507ee924d9dd47 (patch)
tree218ff6da6fb1511a1b2823729607c7c4b13e30e9 /vendor/twbs/bootstrap/js/dist/button.js
parent7dee47183d05b6e1f7d5c5588e2df9993fb294dd (diff)
downloadvolse-hubzilla-185ddf1eaf82e08586be6c7689507ee924d9dd47.tar.gz
volse-hubzilla-185ddf1eaf82e08586be6c7689507ee924d9dd47.tar.bz2
volse-hubzilla-185ddf1eaf82e08586be6c7689507ee924d9dd47.zip
update to bootstrap 5.2 and fixes
Diffstat (limited to 'vendor/twbs/bootstrap/js/dist/button.js')
-rw-r--r--vendor/twbs/bootstrap/js/dist/button.js84
1 files changed, 10 insertions, 74 deletions
diff --git a/vendor/twbs/bootstrap/js/dist/button.js b/vendor/twbs/bootstrap/js/dist/button.js
index f9755e3d4..df8425d36 100644
--- a/vendor/twbs/bootstrap/js/dist/button.js
+++ b/vendor/twbs/bootstrap/js/dist/button.js
@@ -1,13 +1,13 @@
/*!
- * Bootstrap button.js v5.1.3 (https://getbootstrap.com/)
- * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
+ * Bootstrap button.js v5.2.0 (https://getbootstrap.com/)
+ * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/event-handler.js'), require('./base-component.js')) :
- typeof define === 'function' && define.amd ? define(['./dom/event-handler', './base-component'], factory) :
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.EventHandler, global.Base));
-})(this, (function (EventHandler, BaseComponent) { 'use strict';
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./util/index'), require('./dom/event-handler'), require('./base-component')) :
+ typeof define === 'function' && define.amd ? define(['./util/index', './dom/event-handler', './base-component'], factory) :
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.Index, global.EventHandler, global.BaseComponent));
+})(this, (function (index, EventHandler, BaseComponent) { 'use strict';
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
@@ -16,69 +16,12 @@
/**
* --------------------------------------------------------------------------
- * Bootstrap (v5.1.3): util/index.js
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
- * --------------------------------------------------------------------------
- */
-
- const getjQuery = () => {
- const {
- jQuery
- } = window;
-
- if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
- return jQuery;
- }
-
- return null;
- };
-
- const DOMContentLoadedCallbacks = [];
-
- const onDOMContentLoaded = callback => {
- if (document.readyState === 'loading') {
- // add listener on the first call when the document is in loading state
- if (!DOMContentLoadedCallbacks.length) {
- document.addEventListener('DOMContentLoaded', () => {
- DOMContentLoadedCallbacks.forEach(callback => callback());
- });
- }
-
- DOMContentLoadedCallbacks.push(callback);
- } else {
- callback();
- }
- };
-
- const defineJQueryPlugin = plugin => {
- onDOMContentLoaded(() => {
- const $ = getjQuery();
- /* istanbul ignore if */
-
- if ($) {
- const name = plugin.NAME;
- const JQUERY_NO_CONFLICT = $.fn[name];
- $.fn[name] = plugin.jQueryInterface;
- $.fn[name].Constructor = plugin;
-
- $.fn[name].noConflict = () => {
- $.fn[name] = JQUERY_NO_CONFLICT;
- return plugin.jQueryInterface;
- };
- }
- });
- };
-
- /**
- * --------------------------------------------------------------------------
- * Bootstrap (v5.1.3): button.js
+ * Bootstrap (v5.2.0): button.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
/**
- * ------------------------------------------------------------------------
* Constants
- * ------------------------------------------------------------------------
*/
const NAME = 'button';
@@ -89,9 +32,7 @@
const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="button"]';
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`;
/**
- * ------------------------------------------------------------------------
- * Class Definition
- * ------------------------------------------------------------------------
+ * Class definition
*/
class Button extends BaseComponent__default.default {
@@ -119,9 +60,7 @@
}
/**
- * ------------------------------------------------------------------------
- * Data Api implementation
- * ------------------------------------------------------------------------
+ * Data API implementation
*/
@@ -132,13 +71,10 @@
data.toggle();
});
/**
- * ------------------------------------------------------------------------
* jQuery
- * ------------------------------------------------------------------------
- * add .Button to jQuery only if jQuery is present
*/
- defineJQueryPlugin(Button);
+ index.defineJQueryPlugin(Button);
return Button;