bootstrap 5.2.2 → 5.3.0.alpha3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +55 -0
  3. data/README.md +2 -2
  4. data/assets/javascripts/bootstrap/alert.js +21 -32
  5. data/assets/javascripts/bootstrap/base-component.js +21 -38
  6. data/assets/javascripts/bootstrap/button.js +18 -22
  7. data/assets/javascripts/bootstrap/carousel.js +51 -135
  8. data/assets/javascripts/bootstrap/collapse.js +39 -102
  9. data/assets/javascripts/bootstrap/dom/data.js +8 -12
  10. data/assets/javascripts/bootstrap/dom/event-handler.js +18 -66
  11. data/assets/javascripts/bootstrap/dom/manipulator.js +4 -17
  12. data/assets/javascripts/bootstrap/dom/selector-engine.js +41 -24
  13. data/assets/javascripts/bootstrap/dropdown.js +73 -145
  14. data/assets/javascripts/bootstrap/modal.js +52 -133
  15. data/assets/javascripts/bootstrap/offcanvas.js +49 -102
  16. data/assets/javascripts/bootstrap/popover.js +22 -29
  17. data/assets/javascripts/bootstrap/scrollspy.js +51 -89
  18. data/assets/javascripts/bootstrap/tab.js +51 -109
  19. data/assets/javascripts/bootstrap/toast.js +30 -73
  20. data/assets/javascripts/bootstrap/tooltip.js +79 -191
  21. data/assets/javascripts/bootstrap/util/backdrop.js +27 -54
  22. data/assets/javascripts/bootstrap/util/component-functions.js +13 -19
  23. data/assets/javascripts/bootstrap/util/config.js +14 -27
  24. data/assets/javascripts/bootstrap/util/focustrap.js +19 -36
  25. data/assets/javascripts/bootstrap/util/index.js +42 -111
  26. data/assets/javascripts/bootstrap/util/sanitizer.js +13 -19
  27. data/assets/javascripts/bootstrap/util/scrollbar.js +23 -50
  28. data/assets/javascripts/bootstrap/util/swipe.js +26 -48
  29. data/assets/javascripts/bootstrap/util/template-factory.js +24 -52
  30. data/assets/javascripts/bootstrap-sprockets.js +11 -11
  31. data/assets/javascripts/bootstrap.js +631 -1420
  32. data/assets/javascripts/bootstrap.min.js +3 -3
  33. data/assets/stylesheets/_bootstrap-grid.scss +1 -3
  34. data/assets/stylesheets/_bootstrap-reboot.scss +1 -0
  35. data/assets/stylesheets/_bootstrap.scss +1 -0
  36. data/assets/stylesheets/bootstrap/_accordion.scss +9 -0
  37. data/assets/stylesheets/bootstrap/_alert.scss +8 -11
  38. data/assets/stylesheets/bootstrap/_button-group.scss +2 -2
  39. data/assets/stylesheets/bootstrap/_buttons.scss +3 -3
  40. data/assets/stylesheets/bootstrap/_card.scss +5 -0
  41. data/assets/stylesheets/bootstrap/_carousel.scss +20 -5
  42. data/assets/stylesheets/bootstrap/_close.scss +32 -9
  43. data/assets/stylesheets/bootstrap/_dropdown.scss +1 -0
  44. data/assets/stylesheets/bootstrap/_functions.scss +2 -2
  45. data/assets/stylesheets/bootstrap/_grid.scss +6 -0
  46. data/assets/stylesheets/bootstrap/_helpers.scss +2 -0
  47. data/assets/stylesheets/bootstrap/_list-group.scss +12 -7
  48. data/assets/stylesheets/bootstrap/_maps.scss +120 -0
  49. data/assets/stylesheets/bootstrap/_mixins.scss +1 -2
  50. data/assets/stylesheets/bootstrap/_nav.scss +40 -3
  51. data/assets/stylesheets/bootstrap/_navbar.scss +13 -3
  52. data/assets/stylesheets/bootstrap/_offcanvas.scss +4 -2
  53. data/assets/stylesheets/bootstrap/_pagination.scss +1 -1
  54. data/assets/stylesheets/bootstrap/_progress.scss +10 -1
  55. data/assets/stylesheets/bootstrap/_reboot.scss +3 -3
  56. data/assets/stylesheets/bootstrap/_root.scss +125 -10
  57. data/assets/stylesheets/bootstrap/_tables.scss +1 -1
  58. data/assets/stylesheets/bootstrap/_tooltip.scss +4 -5
  59. data/assets/stylesheets/bootstrap/_utilities.scss +172 -13
  60. data/assets/stylesheets/bootstrap/_variables-dark.scss +85 -0
  61. data/assets/stylesheets/bootstrap/_variables.scss +260 -151
  62. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +4 -0
  63. data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +21 -3
  64. data/assets/stylesheets/bootstrap/forms/_form-check.scss +24 -11
  65. data/assets/stylesheets/bootstrap/forms/_form-control.scss +23 -3
  66. data/assets/stylesheets/bootstrap/forms/_form-select.scss +11 -2
  67. data/assets/stylesheets/bootstrap/forms/_input-group.scss +1 -1
  68. data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +22 -2
  69. data/assets/stylesheets/bootstrap/helpers/_focus-ring.scss +5 -0
  70. data/assets/stylesheets/bootstrap/helpers/_icon-link.scss +25 -0
  71. data/assets/stylesheets/bootstrap/mixins/_alert.scss +4 -1
  72. data/assets/stylesheets/bootstrap/mixins/_banner.scss +2 -4
  73. data/assets/stylesheets/bootstrap/mixins/_caret.scss +30 -25
  74. data/assets/stylesheets/bootstrap/mixins/_color-mode.scss +21 -0
  75. data/assets/stylesheets/bootstrap/mixins/_forms.scss +8 -7
  76. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +2 -0
  77. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +1 -1
  78. data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +5 -1
  79. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +23 -29
  80. data/bootstrap.gemspec +1 -1
  81. data/lib/bootstrap/version.rb +2 -2
  82. data/tasks/updater/js.rb +1 -1
  83. data/tasks/updater/network.rb +2 -2
  84. data/tasks/updater/scss.rb +1 -1
  85. data/test/gemfiles/rails_5_2.gemfile +8 -0
  86. data/test/gemfiles/rails_7_0.gemfile +7 -0
  87. data/test/test_helper.rb +3 -2
  88. metadata +15 -7
  89. data/.travis.yml +0 -32
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a293b6bb0f077b3634982eeed77c89bfc3631f890f3df2027ddc45ceab3b18a5
4
- data.tar.gz: d8fd6730b835bbe608e62d26359b7530a52cbadbccbe7d3589b895ac37944f79
3
+ metadata.gz: 63aeb656107be9f6dae64d6fd1e369476f743018d86cb5d87b2482d1c493f9d8
4
+ data.tar.gz: 5160c42b1ea8333e7a820ccc47561f56ded1aeab950cf186624357b990463ef4
5
5
  SHA512:
6
- metadata.gz: 6fcbeba2892da722b611946a283a166fa57cc44f80e0ccb8096f903e0d0e9f5d5dd69fbead50e819ce35184a62cb9df29d7aceb59bc215b90e75c8020fde1516
7
- data.tar.gz: 8931244575e0476fba2ea27f1d7524043755a2237035abfd6aa1af5fe9da64001f826350f0631d9a7b9164091c4d766b8c0aa80f6d85ee78b8384b03b6b141a8
6
+ metadata.gz: 2d38c781ff2f4f8115b5c6c7eeeba9f4d7fb7e5ef67f72dded8c9439c1231a970daa32a3ea7202e0aeb1a01d22c998432eb8e4e45a6d9f52bb3afd621ef70957
7
+ data.tar.gz: 590237c07a1b7bed950a288c5bdee0c6feb1d54af2c56a2698a35066add2e96bc19168eba260d94fa6c0275a35d3ba840e3955265698220752bd92200ab91bf5
@@ -0,0 +1,55 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+
7
+ jobs:
8
+ test:
9
+ env:
10
+ BUNDLE_GEMFILE: ${{ matrix.gemfile }}
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ ruby_version: ['2.5', '2.6', '2.7', '3.0', '3.1']
15
+ gemfile:
16
+ - test/gemfiles/rails_5_0.gemfile
17
+ - test/gemfiles/rails_5_1.gemfile
18
+ - test/gemfiles/rails_5_2.gemfile
19
+ - test/gemfiles/rails_6_0.gemfile
20
+ - test/gemfiles/rails_6_1.gemfile
21
+ - test/gemfiles/rails_7_0.gemfile
22
+ include:
23
+ - ruby_version: '2.5'
24
+ gemfile: test/gemfiles/rails_4_2.gemfile
25
+ - ruby_version: '2.6'
26
+ gemfile: test/gemfiles/rails_4_2.gemfile
27
+ exclude:
28
+ - ruby_version: '2.5'
29
+ gemfile: test/gemfiles/rails_7_0.gemfile
30
+ - ruby_version: '2.6'
31
+ gemfile: test/gemfiles/rails_7_0.gemfile
32
+ - ruby_version: '3.0'
33
+ gemfile: test/gemfiles/rails_5_0.gemfile
34
+ - ruby_version: '3.0'
35
+ gemfile: test/gemfiles/rails_5_1.gemfile
36
+ - ruby_version: '3.0'
37
+ gemfile: test/gemfiles/rails_5_2.gemfile
38
+ - ruby_version: '3.1'
39
+ gemfile: test/gemfiles/rails_5_0.gemfile
40
+ - ruby_version: '3.1'
41
+ gemfile: test/gemfiles/rails_5_1.gemfile
42
+ - ruby_version: '3.1'
43
+ gemfile: test/gemfiles/rails_5_2.gemfile
44
+ - ruby_version: '3.1'
45
+ gemfile: test/gemfiles/rails_6_0.gemfile
46
+ runs-on: ubuntu-latest
47
+ steps:
48
+ - uses: actions/checkout@v3
49
+ - name: Set up Ruby
50
+ uses: ruby/setup-ruby@v1
51
+ with:
52
+ ruby-version: ${{ matrix.ruby_version }}
53
+ bundler-cache: true # 'bundle install' and cache
54
+ - name: Build and test with Rake
55
+ run: bundle exec rake --trace
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Bootstrap Ruby Gem [![Build Status](https://travis-ci.org/twbs/bootstrap-rubygem.svg?branch=master)](https://travis-ci.org/twbs/bootstrap-rubygem) [![Gem](https://img.shields.io/gem/v/bootstrap.svg)](https://rubygems.org/gems/bootstrap)
1
+ # Bootstrap Ruby Gem [![CI](https://github.com/twbs/bootstrap-rubygem/actions/workflows/ci.yml/badge.svg)](https://github.com/twbs/bootstrap-rubygem/actions/workflows/ci.yml) [![Gem](https://img.shields.io/gem/v/bootstrap.svg)](https://rubygems.org/gems/bootstrap)
2
2
 
3
3
  [Bootstrap 5][bootstrap-home] ruby gem for Ruby on Rails (*Sprockets*/*Importmaps*) and Hanami (formerly Lotus).
4
4
 
@@ -21,7 +21,7 @@ Please see the appropriate guide for your environment of choice:
21
21
  Add `bootstrap` to your Gemfile:
22
22
 
23
23
  ```ruby
24
- gem 'bootstrap', '~> 5.2.2'
24
+ gem 'bootstrap', '~> 5.3.0.alpha3'
25
25
  ```
26
26
 
27
27
  Ensure that `sprockets-rails` is at least v2.3.2.
@@ -1,25 +1,21 @@
1
1
  /*!
2
- * Bootstrap alert.js v5.2.2 (https://getbootstrap.com/)
3
- * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
2
+ * Bootstrap alert.js v5.3.0-alpha3 (https://getbootstrap.com/)
3
+ * Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
4
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5
5
  */
6
6
  (function (global, factory) {
7
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./util/index'), require('./dom/event-handler'), require('./base-component'), require('./util/component-functions')) :
8
- typeof define === 'function' && define.amd ? define(['./util/index', './dom/event-handler', './base-component', './util/component-functions'], factory) :
9
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.Index, global.EventHandler, global.BaseComponent, global.ComponentFunctions));
10
- })(this, (function (index, EventHandler, BaseComponent, componentFunctions) { 'use strict';
11
-
12
- const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
13
-
14
- const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
15
- const BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
7
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./base-component.js'), require('./dom/event-handler.js'), require('./util/component-functions.js'), require('./util/index.js')) :
8
+ typeof define === 'function' && define.amd ? define(['./base-component', './dom/event-handler', './util/component-functions', './util/index'], factory) :
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.BaseComponent, global.EventHandler, global.ComponentFunctions, global.Index));
10
+ })(this, (function (BaseComponent, EventHandler, componentFunctions_js, index_js) { 'use strict';
16
11
 
17
12
  /**
18
13
  * --------------------------------------------------------------------------
19
- * Bootstrap (v5.2.2): alert.js
14
+ * Bootstrap alert.js
20
15
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
21
16
  * --------------------------------------------------------------------------
22
17
  */
18
+
23
19
  /**
24
20
  * Constants
25
21
  */
@@ -31,68 +27,61 @@
31
27
  const EVENT_CLOSED = `closed${EVENT_KEY}`;
32
28
  const CLASS_NAME_FADE = 'fade';
33
29
  const CLASS_NAME_SHOW = 'show';
30
+
34
31
  /**
35
32
  * Class definition
36
33
  */
37
34
 
38
- class Alert extends BaseComponent__default.default {
35
+ class Alert extends BaseComponent {
39
36
  // Getters
40
37
  static get NAME() {
41
38
  return NAME;
42
- } // Public
43
-
39
+ }
44
40
 
41
+ // Public
45
42
  close() {
46
- const closeEvent = EventHandler__default.default.trigger(this._element, EVENT_CLOSE);
47
-
43
+ const closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE);
48
44
  if (closeEvent.defaultPrevented) {
49
45
  return;
50
46
  }
51
-
52
47
  this._element.classList.remove(CLASS_NAME_SHOW);
53
-
54
48
  const isAnimated = this._element.classList.contains(CLASS_NAME_FADE);
55
-
56
49
  this._queueCallback(() => this._destroyElement(), this._element, isAnimated);
57
- } // Private
58
-
50
+ }
59
51
 
52
+ // Private
60
53
  _destroyElement() {
61
54
  this._element.remove();
62
-
63
- EventHandler__default.default.trigger(this._element, EVENT_CLOSED);
55
+ EventHandler.trigger(this._element, EVENT_CLOSED);
64
56
  this.dispose();
65
- } // Static
66
-
57
+ }
67
58
 
59
+ // Static
68
60
  static jQueryInterface(config) {
69
61
  return this.each(function () {
70
62
  const data = Alert.getOrCreateInstance(this);
71
-
72
63
  if (typeof config !== 'string') {
73
64
  return;
74
65
  }
75
-
76
66
  if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
77
67
  throw new TypeError(`No method named "${config}"`);
78
68
  }
79
-
80
69
  data[config](this);
81
70
  });
82
71
  }
83
-
84
72
  }
73
+
85
74
  /**
86
75
  * Data API implementation
87
76
  */
88
77
 
78
+ componentFunctions_js.enableDismissTrigger(Alert, 'close');
89
79
 
90
- componentFunctions.enableDismissTrigger(Alert, 'close');
91
80
  /**
92
81
  * jQuery
93
82
  */
94
83
 
95
- index.defineJQueryPlugin(Alert);
84
+ index_js.defineJQueryPlugin(Alert);
96
85
 
97
86
  return Alert;
98
87
 
@@ -1,97 +1,80 @@
1
1
  /*!
2
- * Bootstrap base-component.js v5.2.2 (https://getbootstrap.com/)
3
- * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
2
+ * Bootstrap base-component.js v5.3.0-alpha3 (https://getbootstrap.com/)
3
+ * Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
4
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5
5
  */
6
6
  (function (global, factory) {
7
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data'), require('./util/index'), require('./dom/event-handler'), require('./util/config')) :
8
- typeof define === 'function' && define.amd ? define(['./dom/data', './util/index', './dom/event-handler', './util/config'], factory) :
9
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.BaseComponent = factory(global.Data, global.Index, global.EventHandler, global.Config));
10
- })(this, (function (Data, index, EventHandler, Config) { 'use strict';
11
-
12
- const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
13
-
14
- const Data__default = /*#__PURE__*/_interopDefaultLegacy(Data);
15
- const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
16
- const Config__default = /*#__PURE__*/_interopDefaultLegacy(Config);
7
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./dom/data.js'), require('./dom/event-handler.js'), require('./util/config.js'), require('./util/index.js')) :
8
+ typeof define === 'function' && define.amd ? define(['./dom/data', './dom/event-handler', './util/config', './util/index'], factory) :
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.BaseComponent = factory(global.Data, global.EventHandler, global.Config, global.Index));
10
+ })(this, (function (Data, EventHandler, Config, index_js) { 'use strict';
17
11
 
18
12
  /**
19
13
  * --------------------------------------------------------------------------
20
- * Bootstrap (v5.2.2): base-component.js
14
+ * Bootstrap base-component.js
21
15
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
22
16
  * --------------------------------------------------------------------------
23
17
  */
18
+
24
19
  /**
25
20
  * Constants
26
21
  */
27
22
 
28
- const VERSION = '5.2.2';
23
+ const VERSION = '5.3.0-alpha2';
24
+
29
25
  /**
30
26
  * Class definition
31
27
  */
32
28
 
33
- class BaseComponent extends Config__default.default {
29
+ class BaseComponent extends Config {
34
30
  constructor(element, config) {
35
31
  super();
36
- element = index.getElement(element);
37
-
32
+ element = index_js.getElement(element);
38
33
  if (!element) {
39
34
  return;
40
35
  }
41
-
42
36
  this._element = element;
43
37
  this._config = this._getConfig(config);
44
- Data__default.default.set(this._element, this.constructor.DATA_KEY, this);
45
- } // Public
46
-
38
+ Data.set(this._element, this.constructor.DATA_KEY, this);
39
+ }
47
40
 
41
+ // Public
48
42
  dispose() {
49
- Data__default.default.remove(this._element, this.constructor.DATA_KEY);
50
- EventHandler__default.default.off(this._element, this.constructor.EVENT_KEY);
51
-
43
+ Data.remove(this._element, this.constructor.DATA_KEY);
44
+ EventHandler.off(this._element, this.constructor.EVENT_KEY);
52
45
  for (const propertyName of Object.getOwnPropertyNames(this)) {
53
46
  this[propertyName] = null;
54
47
  }
55
48
  }
56
-
57
49
  _queueCallback(callback, element, isAnimated = true) {
58
- index.executeAfterTransition(callback, element, isAnimated);
50
+ index_js.executeAfterTransition(callback, element, isAnimated);
59
51
  }
60
-
61
52
  _getConfig(config) {
62
53
  config = this._mergeConfigObj(config, this._element);
63
54
  config = this._configAfterMerge(config);
64
-
65
55
  this._typeCheckConfig(config);
66
-
67
56
  return config;
68
- } // Static
69
-
57
+ }
70
58
 
59
+ // Static
71
60
  static getInstance(element) {
72
- return Data__default.default.get(index.getElement(element), this.DATA_KEY);
61
+ return Data.get(index_js.getElement(element), this.DATA_KEY);
73
62
  }
74
-
75
63
  static getOrCreateInstance(element, config = {}) {
76
64
  return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null);
77
65
  }
78
-
79
66
  static get VERSION() {
80
67
  return VERSION;
81
68
  }
82
-
83
69
  static get DATA_KEY() {
84
70
  return `bs.${this.NAME}`;
85
71
  }
86
-
87
72
  static get EVENT_KEY() {
88
73
  return `.${this.DATA_KEY}`;
89
74
  }
90
-
91
75
  static eventName(name) {
92
76
  return `${name}${this.EVENT_KEY}`;
93
77
  }
94
-
95
78
  }
96
79
 
97
80
  return BaseComponent;
@@ -1,25 +1,21 @@
1
1
  /*!
2
- * Bootstrap button.js v5.2.2 (https://getbootstrap.com/)
3
- * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
2
+ * Bootstrap button.js v5.3.0-alpha3 (https://getbootstrap.com/)
3
+ * Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
4
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5
5
  */
6
6
  (function (global, factory) {
7
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./util/index'), require('./dom/event-handler'), require('./base-component')) :
8
- typeof define === 'function' && define.amd ? define(['./util/index', './dom/event-handler', './base-component'], factory) :
9
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.Index, global.EventHandler, global.BaseComponent));
10
- })(this, (function (index, EventHandler, BaseComponent) { 'use strict';
11
-
12
- const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
13
-
14
- const EventHandler__default = /*#__PURE__*/_interopDefaultLegacy(EventHandler);
15
- const BaseComponent__default = /*#__PURE__*/_interopDefaultLegacy(BaseComponent);
7
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./base-component.js'), require('./dom/event-handler.js'), require('./util/index.js')) :
8
+ typeof define === 'function' && define.amd ? define(['./base-component', './dom/event-handler', './util/index'], factory) :
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Button = factory(global.BaseComponent, global.EventHandler, global.Index));
10
+ })(this, (function (BaseComponent, EventHandler, index_js) { 'use strict';
16
11
 
17
12
  /**
18
13
  * --------------------------------------------------------------------------
19
- * Bootstrap (v5.2.2): button.js
14
+ * Bootstrap button.js
20
15
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
21
16
  * --------------------------------------------------------------------------
22
17
  */
18
+
23
19
  /**
24
20
  * Constants
25
21
  */
@@ -31,50 +27,50 @@
31
27
  const CLASS_NAME_ACTIVE = 'active';
32
28
  const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="button"]';
33
29
  const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`;
30
+
34
31
  /**
35
32
  * Class definition
36
33
  */
37
34
 
38
- class Button extends BaseComponent__default.default {
35
+ class Button extends BaseComponent {
39
36
  // Getters
40
37
  static get NAME() {
41
38
  return NAME;
42
- } // Public
43
-
39
+ }
44
40
 
41
+ // Public
45
42
  toggle() {
46
43
  // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method
47
44
  this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE));
48
- } // Static
49
-
45
+ }
50
46
 
47
+ // Static
51
48
  static jQueryInterface(config) {
52
49
  return this.each(function () {
53
50
  const data = Button.getOrCreateInstance(this);
54
-
55
51
  if (config === 'toggle') {
56
52
  data[config]();
57
53
  }
58
54
  });
59
55
  }
60
-
61
56
  }
57
+
62
58
  /**
63
59
  * Data API implementation
64
60
  */
65
61
 
66
-
67
- EventHandler__default.default.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, event => {
62
+ EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, event => {
68
63
  event.preventDefault();
69
64
  const button = event.target.closest(SELECTOR_DATA_TOGGLE);
70
65
  const data = Button.getOrCreateInstance(button);
71
66
  data.toggle();
72
67
  });
68
+
73
69
  /**
74
70
  * jQuery
75
71
  */
76
72
 
77
- index.defineJQueryPlugin(Button);
73
+ index_js.defineJQueryPlugin(Button);
78
74
 
79
75
  return Button;
80
76