bootstrap 4.6.2.1 → 5.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +61 -0
  3. data/CHANGELOG.md +7 -2
  4. data/Gemfile +1 -0
  5. data/README.md +33 -15
  6. data/Rakefile +1 -2
  7. data/assets/javascripts/bootstrap/alert.js +50 -147
  8. data/assets/javascripts/bootstrap/base-component.js +83 -0
  9. data/assets/javascripts/bootstrap/button.js +40 -190
  10. data/assets/javascripts/bootstrap/carousel.js +282 -537
  11. data/assets/javascripts/bootstrap/collapse.js +166 -314
  12. data/assets/javascripts/bootstrap/dom/data.js +62 -0
  13. data/assets/javascripts/bootstrap/dom/event-handler.js +236 -0
  14. data/assets/javascripts/bootstrap/dom/manipulator.js +71 -0
  15. data/assets/javascripts/bootstrap/dom/selector-engine.js +103 -0
  16. data/assets/javascripts/bootstrap/dropdown.js +297 -455
  17. data/assets/javascripts/bootstrap/modal.js +223 -566
  18. data/assets/javascripts/bootstrap/offcanvas.js +245 -0
  19. data/assets/javascripts/bootstrap/popover.js +59 -208
  20. data/assets/javascripts/bootstrap/scrollspy.js +213 -276
  21. data/assets/javascripts/bootstrap/tab.js +222 -200
  22. data/assets/javascripts/bootstrap/toast.js +137 -206
  23. data/assets/javascripts/bootstrap/tooltip.js +403 -747
  24. data/assets/javascripts/bootstrap/util/backdrop.js +138 -0
  25. data/assets/javascripts/bootstrap/util/component-functions.js +41 -0
  26. data/assets/javascripts/bootstrap/util/config.js +67 -0
  27. data/assets/javascripts/bootstrap/util/focustrap.js +112 -0
  28. data/assets/javascripts/bootstrap/util/index.js +280 -0
  29. data/assets/javascripts/bootstrap/util/sanitizer.js +113 -0
  30. data/assets/javascripts/bootstrap/util/scrollbar.js +112 -0
  31. data/assets/javascripts/bootstrap/util/swipe.js +134 -0
  32. data/assets/javascripts/bootstrap/util/template-factory.js +150 -0
  33. data/assets/javascripts/bootstrap-global-this-define.js +6 -0
  34. data/assets/javascripts/bootstrap-global-this-undefine.js +2 -0
  35. data/assets/javascripts/bootstrap-sprockets.js +21 -5
  36. data/assets/javascripts/bootstrap.js +3625 -3488
  37. data/assets/javascripts/bootstrap.min.js +3 -3
  38. data/assets/stylesheets/_bootstrap-grid.scss +53 -21
  39. data/assets/stylesheets/_bootstrap-reboot.scss +5 -7
  40. data/assets/stylesheets/_bootstrap-utilities.scss +19 -0
  41. data/assets/stylesheets/_bootstrap.scss +21 -13
  42. data/assets/stylesheets/bootstrap/_accordion.scss +153 -0
  43. data/assets/stylesheets/bootstrap/_alert.scss +32 -16
  44. data/assets/stylesheets/bootstrap/_badge.scss +15 -31
  45. data/assets/stylesheets/bootstrap/_breadcrumb.scss +22 -24
  46. data/assets/stylesheets/bootstrap/_button-group.scss +32 -48
  47. data/assets/stylesheets/bootstrap/_buttons.scss +145 -71
  48. data/assets/stylesheets/bootstrap/_card.scss +67 -115
  49. data/assets/stylesheets/bootstrap/_carousel.scss +63 -37
  50. data/assets/stylesheets/bootstrap/_close.scss +53 -27
  51. data/assets/stylesheets/bootstrap/_containers.scss +41 -0
  52. data/assets/stylesheets/bootstrap/_dropdown.scss +129 -71
  53. data/assets/stylesheets/bootstrap/_forms.scss +9 -347
  54. data/assets/stylesheets/bootstrap/_functions.scss +135 -23
  55. data/assets/stylesheets/bootstrap/_grid.scss +18 -52
  56. data/assets/stylesheets/bootstrap/_helpers.scss +12 -0
  57. data/assets/stylesheets/bootstrap/_list-group.scss +93 -48
  58. data/assets/stylesheets/bootstrap/_maps.scss +174 -0
  59. data/assets/stylesheets/bootstrap/_mixins.scss +10 -15
  60. data/assets/stylesheets/bootstrap/_modal.scss +112 -112
  61. data/assets/stylesheets/bootstrap/_nav.scss +100 -28
  62. data/assets/stylesheets/bootstrap/_navbar.scss +130 -173
  63. data/assets/stylesheets/bootstrap/_offcanvas.scss +147 -0
  64. data/assets/stylesheets/bootstrap/_pagination.scss +72 -37
  65. data/assets/stylesheets/bootstrap/_placeholders.scss +51 -0
  66. data/assets/stylesheets/bootstrap/_popover.scss +99 -73
  67. data/assets/stylesheets/bootstrap/_progress.scss +35 -14
  68. data/assets/stylesheets/bootstrap/_reboot.scss +319 -192
  69. data/assets/stylesheets/bootstrap/_root.scss +177 -9
  70. data/assets/stylesheets/bootstrap/_spinners.scss +43 -23
  71. data/assets/stylesheets/bootstrap/_tables.scss +101 -115
  72. data/assets/stylesheets/bootstrap/_toasts.scss +54 -27
  73. data/assets/stylesheets/bootstrap/_tooltip.scss +67 -63
  74. data/assets/stylesheets/bootstrap/_transitions.scss +3 -2
  75. data/assets/stylesheets/bootstrap/_type.scss +40 -59
  76. data/assets/stylesheets/bootstrap/_utilities.scss +806 -18
  77. data/assets/stylesheets/bootstrap/_variables-dark.scss +102 -0
  78. data/assets/stylesheets/bootstrap/_variables.scss +1210 -606
  79. data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +97 -0
  80. data/assets/stylesheets/bootstrap/forms/_form-check.scss +189 -0
  81. data/assets/stylesheets/bootstrap/forms/_form-control.scss +214 -0
  82. data/assets/stylesheets/bootstrap/forms/_form-range.scss +91 -0
  83. data/assets/stylesheets/bootstrap/forms/_form-select.scss +80 -0
  84. data/assets/stylesheets/bootstrap/forms/_form-text.scss +11 -0
  85. data/assets/stylesheets/bootstrap/forms/_input-group.scss +132 -0
  86. data/assets/stylesheets/bootstrap/forms/_labels.scss +36 -0
  87. data/assets/stylesheets/bootstrap/forms/_validation.scss +12 -0
  88. data/assets/stylesheets/bootstrap/helpers/_color-bg.scss +7 -0
  89. data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +30 -0
  90. data/assets/stylesheets/bootstrap/helpers/_focus-ring.scss +5 -0
  91. data/assets/stylesheets/bootstrap/helpers/_icon-link.scss +25 -0
  92. data/assets/stylesheets/bootstrap/helpers/_position.scss +36 -0
  93. data/assets/stylesheets/bootstrap/helpers/_ratio.scss +26 -0
  94. data/assets/stylesheets/bootstrap/helpers/_stacks.scss +15 -0
  95. data/assets/stylesheets/bootstrap/helpers/_stretched-link.scss +15 -0
  96. data/assets/stylesheets/bootstrap/helpers/_text-truncation.scss +7 -0
  97. data/assets/stylesheets/bootstrap/helpers/_visually-hidden.scss +8 -0
  98. data/assets/stylesheets/bootstrap/helpers/_vr.scss +8 -0
  99. data/assets/stylesheets/bootstrap/mixins/_alert.scss +11 -6
  100. data/assets/stylesheets/bootstrap/mixins/_backdrop.scss +14 -0
  101. data/assets/stylesheets/bootstrap/mixins/_banner.scss +7 -0
  102. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +10 -8
  103. data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +7 -9
  104. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +20 -16
  105. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +60 -100
  106. data/assets/stylesheets/bootstrap/mixins/_caret.scss +34 -27
  107. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +2 -0
  108. data/assets/stylesheets/bootstrap/mixins/_color-mode.scss +21 -0
  109. data/assets/stylesheets/bootstrap/mixins/_color-scheme.scss +7 -0
  110. data/assets/stylesheets/bootstrap/mixins/_container.scss +11 -0
  111. data/assets/stylesheets/bootstrap/mixins/_forms.scss +64 -96
  112. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +13 -11
  113. data/assets/stylesheets/bootstrap/mixins/_grid.scss +118 -36
  114. data/assets/stylesheets/bootstrap/mixins/_image.scss +1 -21
  115. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +7 -2
  116. data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
  117. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +7 -19
  118. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +2 -2
  119. data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +24 -0
  120. data/assets/stylesheets/bootstrap/mixins/_transition.scss +1 -1
  121. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +97 -0
  122. data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +33 -0
  123. data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
  124. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +211 -91
  125. data/bootstrap.gemspec +6 -6
  126. data/lib/bootstrap/engine.rb +0 -1
  127. data/lib/bootstrap/version.rb +2 -2
  128. data/tasks/updater/js.rb +17 -5
  129. data/tasks/updater/network.rb +2 -2
  130. data/tasks/updater/scss.rb +2 -2
  131. data/tasks/updater.rb +2 -2
  132. data/test/dummy_rails/app/assets/javascripts/application.js +4 -3
  133. data/test/dummy_rails/app/views/layouts/application.html.erb +3 -1
  134. data/test/dummy_rails/app/views/pages/root.html +89 -0
  135. data/test/dummy_rails/config/application.rb +0 -5
  136. data/test/dummy_rails/public/favicon.ico +0 -0
  137. data/test/gemfiles/rails_4_2.gemfile +2 -1
  138. data/test/gemfiles/rails_5_0.gemfile +1 -2
  139. data/test/gemfiles/rails_5_1.gemfile +1 -2
  140. data/test/gemfiles/rails_5_2.gemfile +7 -0
  141. data/test/gemfiles/rails_6_0.gemfile +1 -1
  142. data/test/gemfiles/rails_6_1.gemfile +7 -0
  143. data/test/gemfiles/rails_7_0_dartsass.gemfile +0 -1
  144. data/test/gemfiles/rails_7_0_sassc.gemfile +0 -1
  145. data/test/rails_test.rb +0 -5
  146. data/test/test_helper.rb +3 -2
  147. metadata +92 -86
  148. data/.travis.yml +0 -31
  149. data/assets/javascripts/bootstrap/util.js +0 -189
  150. data/assets/stylesheets/bootstrap/_code.scss +0 -48
  151. data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -526
  152. data/assets/stylesheets/bootstrap/_input-group.scss +0 -211
  153. data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -17
  154. data/assets/stylesheets/bootstrap/_media.scss +0 -8
  155. data/assets/stylesheets/bootstrap/_print.scss +0 -132
  156. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -23
  157. data/assets/stylesheets/bootstrap/mixins/_badge.scss +0 -17
  158. data/assets/stylesheets/bootstrap/mixins/_float.scss +0 -14
  159. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -80
  160. data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
  161. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -11
  162. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +0 -34
  163. data/assets/stylesheets/bootstrap/mixins/_size.scss +0 -7
  164. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -39
  165. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -17
  166. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +0 -11
  167. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +0 -8
  168. data/assets/stylesheets/bootstrap/utilities/_align.scss +0 -8
  169. data/assets/stylesheets/bootstrap/utilities/_background.scss +0 -19
  170. data/assets/stylesheets/bootstrap/utilities/_borders.scss +0 -75
  171. data/assets/stylesheets/bootstrap/utilities/_display.scss +0 -26
  172. data/assets/stylesheets/bootstrap/utilities/_embed.scss +0 -39
  173. data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -51
  174. data/assets/stylesheets/bootstrap/utilities/_float.scss +0 -11
  175. data/assets/stylesheets/bootstrap/utilities/_interactions.scss +0 -5
  176. data/assets/stylesheets/bootstrap/utilities/_overflow.scss +0 -5
  177. data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -32
  178. data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +0 -11
  179. data/assets/stylesheets/bootstrap/utilities/_shadows.scss +0 -6
  180. data/assets/stylesheets/bootstrap/utilities/_sizing.scss +0 -20
  181. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +0 -73
  182. data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +0 -19
  183. data/assets/stylesheets/bootstrap/utilities/_text.scss +0 -72
  184. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +0 -13
  185. data/test/dummy_rails/app/views/pages/root.html.slim +0 -58
  186. /data/assets/stylesheets/bootstrap/{utilities → helpers}/_clearfix.scss +0 -0
@@ -0,0 +1,138 @@
1
+ /*!
2
+ * Bootstrap backdrop.js v5.3.5 (https://getbootstrap.com/)
3
+ * Copyright 2011-2025 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5
+ */
6
+ (function (global, factory) {
7
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('../dom/event-handler.js'), require('./config.js'), require('./index.js')) :
8
+ typeof define === 'function' && define.amd ? define(['../dom/event-handler', './config', './index'], factory) :
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Backdrop = factory(global.EventHandler, global.Config, global.Index));
10
+ })(this, (function (EventHandler, Config, index_js) { 'use strict';
11
+
12
+ /**
13
+ * --------------------------------------------------------------------------
14
+ * Bootstrap util/backdrop.js
15
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
16
+ * --------------------------------------------------------------------------
17
+ */
18
+
19
+
20
+ /**
21
+ * Constants
22
+ */
23
+
24
+ const NAME = 'backdrop';
25
+ const CLASS_NAME_FADE = 'fade';
26
+ const CLASS_NAME_SHOW = 'show';
27
+ const EVENT_MOUSEDOWN = `mousedown.bs.${NAME}`;
28
+ const Default = {
29
+ className: 'modal-backdrop',
30
+ clickCallback: null,
31
+ isAnimated: false,
32
+ isVisible: true,
33
+ // if false, we use the backdrop helper without adding any element to the dom
34
+ rootElement: 'body' // give the choice to place backdrop under different elements
35
+ };
36
+ const DefaultType = {
37
+ className: 'string',
38
+ clickCallback: '(function|null)',
39
+ isAnimated: 'boolean',
40
+ isVisible: 'boolean',
41
+ rootElement: '(element|string)'
42
+ };
43
+
44
+ /**
45
+ * Class definition
46
+ */
47
+
48
+ class Backdrop extends Config {
49
+ constructor(config) {
50
+ super();
51
+ this._config = this._getConfig(config);
52
+ this._isAppended = false;
53
+ this._element = null;
54
+ }
55
+
56
+ // Getters
57
+ static get Default() {
58
+ return Default;
59
+ }
60
+ static get DefaultType() {
61
+ return DefaultType;
62
+ }
63
+ static get NAME() {
64
+ return NAME;
65
+ }
66
+
67
+ // Public
68
+ show(callback) {
69
+ if (!this._config.isVisible) {
70
+ index_js.execute(callback);
71
+ return;
72
+ }
73
+ this._append();
74
+ const element = this._getElement();
75
+ if (this._config.isAnimated) {
76
+ index_js.reflow(element);
77
+ }
78
+ element.classList.add(CLASS_NAME_SHOW);
79
+ this._emulateAnimation(() => {
80
+ index_js.execute(callback);
81
+ });
82
+ }
83
+ hide(callback) {
84
+ if (!this._config.isVisible) {
85
+ index_js.execute(callback);
86
+ return;
87
+ }
88
+ this._getElement().classList.remove(CLASS_NAME_SHOW);
89
+ this._emulateAnimation(() => {
90
+ this.dispose();
91
+ index_js.execute(callback);
92
+ });
93
+ }
94
+ dispose() {
95
+ if (!this._isAppended) {
96
+ return;
97
+ }
98
+ EventHandler.off(this._element, EVENT_MOUSEDOWN);
99
+ this._element.remove();
100
+ this._isAppended = false;
101
+ }
102
+
103
+ // Private
104
+ _getElement() {
105
+ if (!this._element) {
106
+ const backdrop = document.createElement('div');
107
+ backdrop.className = this._config.className;
108
+ if (this._config.isAnimated) {
109
+ backdrop.classList.add(CLASS_NAME_FADE);
110
+ }
111
+ this._element = backdrop;
112
+ }
113
+ return this._element;
114
+ }
115
+ _configAfterMerge(config) {
116
+ // use getElement() with the default "body" to get a fresh Element on each instantiation
117
+ config.rootElement = index_js.getElement(config.rootElement);
118
+ return config;
119
+ }
120
+ _append() {
121
+ if (this._isAppended) {
122
+ return;
123
+ }
124
+ const element = this._getElement();
125
+ this._config.rootElement.append(element);
126
+ EventHandler.on(element, EVENT_MOUSEDOWN, () => {
127
+ index_js.execute(this._config.clickCallback);
128
+ });
129
+ this._isAppended = true;
130
+ }
131
+ _emulateAnimation(callback) {
132
+ index_js.executeAfterTransition(callback, this._getElement(), this._config.isAnimated);
133
+ }
134
+ }
135
+
136
+ return Backdrop;
137
+
138
+ }));
@@ -0,0 +1,41 @@
1
+ /*!
2
+ * Bootstrap component-functions.js v5.3.5 (https://getbootstrap.com/)
3
+ * Copyright 2011-2025 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5
+ */
6
+ (function (global, factory) {
7
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('../dom/event-handler.js'), require('../dom/selector-engine.js'), require('./index.js')) :
8
+ typeof define === 'function' && define.amd ? define(['exports', '../dom/event-handler', '../dom/selector-engine', './index'], factory) :
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ComponentFunctions = {}, global.EventHandler, global.SelectorEngine, global.Index));
10
+ })(this, (function (exports, EventHandler, SelectorEngine, index_js) { 'use strict';
11
+
12
+ /**
13
+ * --------------------------------------------------------------------------
14
+ * Bootstrap util/component-functions.js
15
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
16
+ * --------------------------------------------------------------------------
17
+ */
18
+
19
+ const enableDismissTrigger = (component, method = 'hide') => {
20
+ const clickEvent = `click.dismiss${component.EVENT_KEY}`;
21
+ const name = component.NAME;
22
+ EventHandler.on(document, clickEvent, `[data-bs-dismiss="${name}"]`, function (event) {
23
+ if (['A', 'AREA'].includes(this.tagName)) {
24
+ event.preventDefault();
25
+ }
26
+ if (index_js.isDisabled(this)) {
27
+ return;
28
+ }
29
+ const target = SelectorEngine.getElementFromSelector(this) || this.closest(`.${name}`);
30
+ const instance = component.getOrCreateInstance(target);
31
+
32
+ // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method
33
+ instance[method]();
34
+ });
35
+ };
36
+
37
+ exports.enableDismissTrigger = enableDismissTrigger;
38
+
39
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
40
+
41
+ }));
@@ -0,0 +1,67 @@
1
+ /*!
2
+ * Bootstrap config.js v5.3.5 (https://getbootstrap.com/)
3
+ * Copyright 2011-2025 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5
+ */
6
+ (function (global, factory) {
7
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('../dom/manipulator.js'), require('./index.js')) :
8
+ typeof define === 'function' && define.amd ? define(['../dom/manipulator', './index'], factory) :
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Config = factory(global.Manipulator, global.Index));
10
+ })(this, (function (Manipulator, index_js) { 'use strict';
11
+
12
+ /**
13
+ * --------------------------------------------------------------------------
14
+ * Bootstrap util/config.js
15
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
16
+ * --------------------------------------------------------------------------
17
+ */
18
+
19
+
20
+ /**
21
+ * Class definition
22
+ */
23
+
24
+ class Config {
25
+ // Getters
26
+ static get Default() {
27
+ return {};
28
+ }
29
+ static get DefaultType() {
30
+ return {};
31
+ }
32
+ static get NAME() {
33
+ throw new Error('You have to implement the static method "NAME", for each component!');
34
+ }
35
+ _getConfig(config) {
36
+ config = this._mergeConfigObj(config);
37
+ config = this._configAfterMerge(config);
38
+ this._typeCheckConfig(config);
39
+ return config;
40
+ }
41
+ _configAfterMerge(config) {
42
+ return config;
43
+ }
44
+ _mergeConfigObj(config, element) {
45
+ const jsonConfig = index_js.isElement(element) ? Manipulator.getDataAttribute(element, 'config') : {}; // try to parse
46
+
47
+ return {
48
+ ...this.constructor.Default,
49
+ ...(typeof jsonConfig === 'object' ? jsonConfig : {}),
50
+ ...(index_js.isElement(element) ? Manipulator.getDataAttributes(element) : {}),
51
+ ...(typeof config === 'object' ? config : {})
52
+ };
53
+ }
54
+ _typeCheckConfig(config, configTypes = this.constructor.DefaultType) {
55
+ for (const [property, expectedTypes] of Object.entries(configTypes)) {
56
+ const value = config[property];
57
+ const valueType = index_js.isElement(value) ? 'element' : index_js.toType(value);
58
+ if (!new RegExp(expectedTypes).test(valueType)) {
59
+ throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".`);
60
+ }
61
+ }
62
+ }
63
+ }
64
+
65
+ return Config;
66
+
67
+ }));
@@ -0,0 +1,112 @@
1
+ /*!
2
+ * Bootstrap focustrap.js v5.3.5 (https://getbootstrap.com/)
3
+ * Copyright 2011-2025 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5
+ */
6
+ (function (global, factory) {
7
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('../dom/event-handler.js'), require('../dom/selector-engine.js'), require('./config.js')) :
8
+ typeof define === 'function' && define.amd ? define(['../dom/event-handler', '../dom/selector-engine', './config'], factory) :
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Focustrap = factory(global.EventHandler, global.SelectorEngine, global.Config));
10
+ })(this, (function (EventHandler, SelectorEngine, Config) { 'use strict';
11
+
12
+ /**
13
+ * --------------------------------------------------------------------------
14
+ * Bootstrap util/focustrap.js
15
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
16
+ * --------------------------------------------------------------------------
17
+ */
18
+
19
+
20
+ /**
21
+ * Constants
22
+ */
23
+
24
+ const NAME = 'focustrap';
25
+ const DATA_KEY = 'bs.focustrap';
26
+ const EVENT_KEY = `.${DATA_KEY}`;
27
+ const EVENT_FOCUSIN = `focusin${EVENT_KEY}`;
28
+ const EVENT_KEYDOWN_TAB = `keydown.tab${EVENT_KEY}`;
29
+ const TAB_KEY = 'Tab';
30
+ const TAB_NAV_FORWARD = 'forward';
31
+ const TAB_NAV_BACKWARD = 'backward';
32
+ const Default = {
33
+ autofocus: true,
34
+ trapElement: null // The element to trap focus inside of
35
+ };
36
+ const DefaultType = {
37
+ autofocus: 'boolean',
38
+ trapElement: 'element'
39
+ };
40
+
41
+ /**
42
+ * Class definition
43
+ */
44
+
45
+ class FocusTrap extends Config {
46
+ constructor(config) {
47
+ super();
48
+ this._config = this._getConfig(config);
49
+ this._isActive = false;
50
+ this._lastTabNavDirection = null;
51
+ }
52
+
53
+ // Getters
54
+ static get Default() {
55
+ return Default;
56
+ }
57
+ static get DefaultType() {
58
+ return DefaultType;
59
+ }
60
+ static get NAME() {
61
+ return NAME;
62
+ }
63
+
64
+ // Public
65
+ activate() {
66
+ if (this._isActive) {
67
+ return;
68
+ }
69
+ if (this._config.autofocus) {
70
+ this._config.trapElement.focus();
71
+ }
72
+ EventHandler.off(document, EVENT_KEY); // guard against infinite focus loop
73
+ EventHandler.on(document, EVENT_FOCUSIN, event => this._handleFocusin(event));
74
+ EventHandler.on(document, EVENT_KEYDOWN_TAB, event => this._handleKeydown(event));
75
+ this._isActive = true;
76
+ }
77
+ deactivate() {
78
+ if (!this._isActive) {
79
+ return;
80
+ }
81
+ this._isActive = false;
82
+ EventHandler.off(document, EVENT_KEY);
83
+ }
84
+
85
+ // Private
86
+ _handleFocusin(event) {
87
+ const {
88
+ trapElement
89
+ } = this._config;
90
+ if (event.target === document || event.target === trapElement || trapElement.contains(event.target)) {
91
+ return;
92
+ }
93
+ const elements = SelectorEngine.focusableChildren(trapElement);
94
+ if (elements.length === 0) {
95
+ trapElement.focus();
96
+ } else if (this._lastTabNavDirection === TAB_NAV_BACKWARD) {
97
+ elements[elements.length - 1].focus();
98
+ } else {
99
+ elements[0].focus();
100
+ }
101
+ }
102
+ _handleKeydown(event) {
103
+ if (event.key !== TAB_KEY) {
104
+ return;
105
+ }
106
+ this._lastTabNavDirection = event.shiftKey ? TAB_NAV_BACKWARD : TAB_NAV_FORWARD;
107
+ }
108
+ }
109
+
110
+ return FocusTrap;
111
+
112
+ }));
@@ -0,0 +1,280 @@
1
+ /*!
2
+ * Bootstrap index.js v5.3.5 (https://getbootstrap.com/)
3
+ * Copyright 2011-2025 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5
+ */
6
+ (function (global, factory) {
7
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
8
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Index = {}));
10
+ })(this, (function (exports) { 'use strict';
11
+
12
+ /**
13
+ * --------------------------------------------------------------------------
14
+ * Bootstrap util/index.js
15
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
16
+ * --------------------------------------------------------------------------
17
+ */
18
+
19
+ const MAX_UID = 1000000;
20
+ const MILLISECONDS_MULTIPLIER = 1000;
21
+ const TRANSITION_END = 'transitionend';
22
+
23
+ /**
24
+ * Properly escape IDs selectors to handle weird IDs
25
+ * @param {string} selector
26
+ * @returns {string}
27
+ */
28
+ const parseSelector = selector => {
29
+ if (selector && window.CSS && window.CSS.escape) {
30
+ // document.querySelector needs escaping to handle IDs (html5+) containing for instance /
31
+ selector = selector.replace(/#([^\s"#']+)/g, (match, id) => `#${CSS.escape(id)}`);
32
+ }
33
+ return selector;
34
+ };
35
+
36
+ // Shout-out Angus Croll (https://goo.gl/pxwQGp)
37
+ const toType = object => {
38
+ if (object === null || object === undefined) {
39
+ return `${object}`;
40
+ }
41
+ return Object.prototype.toString.call(object).match(/\s([a-z]+)/i)[1].toLowerCase();
42
+ };
43
+
44
+ /**
45
+ * Public Util API
46
+ */
47
+
48
+ const getUID = prefix => {
49
+ do {
50
+ prefix += Math.floor(Math.random() * MAX_UID);
51
+ } while (document.getElementById(prefix));
52
+ return prefix;
53
+ };
54
+ const getTransitionDurationFromElement = element => {
55
+ if (!element) {
56
+ return 0;
57
+ }
58
+
59
+ // Get transition-duration of the element
60
+ let {
61
+ transitionDuration,
62
+ transitionDelay
63
+ } = window.getComputedStyle(element);
64
+ const floatTransitionDuration = Number.parseFloat(transitionDuration);
65
+ const floatTransitionDelay = Number.parseFloat(transitionDelay);
66
+
67
+ // Return 0 if element or transition duration is not found
68
+ if (!floatTransitionDuration && !floatTransitionDelay) {
69
+ return 0;
70
+ }
71
+
72
+ // If multiple durations are defined, take the first
73
+ transitionDuration = transitionDuration.split(',')[0];
74
+ transitionDelay = transitionDelay.split(',')[0];
75
+ return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
76
+ };
77
+ const triggerTransitionEnd = element => {
78
+ element.dispatchEvent(new Event(TRANSITION_END));
79
+ };
80
+ const isElement = object => {
81
+ if (!object || typeof object !== 'object') {
82
+ return false;
83
+ }
84
+ if (typeof object.jquery !== 'undefined') {
85
+ object = object[0];
86
+ }
87
+ return typeof object.nodeType !== 'undefined';
88
+ };
89
+ const getElement = object => {
90
+ // it's a jQuery object or a node element
91
+ if (isElement(object)) {
92
+ return object.jquery ? object[0] : object;
93
+ }
94
+ if (typeof object === 'string' && object.length > 0) {
95
+ return document.querySelector(parseSelector(object));
96
+ }
97
+ return null;
98
+ };
99
+ const isVisible = element => {
100
+ if (!isElement(element) || element.getClientRects().length === 0) {
101
+ return false;
102
+ }
103
+ const elementIsVisible = getComputedStyle(element).getPropertyValue('visibility') === 'visible';
104
+ // Handle `details` element as its content may falsie appear visible when it is closed
105
+ const closedDetails = element.closest('details:not([open])');
106
+ if (!closedDetails) {
107
+ return elementIsVisible;
108
+ }
109
+ if (closedDetails !== element) {
110
+ const summary = element.closest('summary');
111
+ if (summary && summary.parentNode !== closedDetails) {
112
+ return false;
113
+ }
114
+ if (summary === null) {
115
+ return false;
116
+ }
117
+ }
118
+ return elementIsVisible;
119
+ };
120
+ const isDisabled = element => {
121
+ if (!element || element.nodeType !== Node.ELEMENT_NODE) {
122
+ return true;
123
+ }
124
+ if (element.classList.contains('disabled')) {
125
+ return true;
126
+ }
127
+ if (typeof element.disabled !== 'undefined') {
128
+ return element.disabled;
129
+ }
130
+ return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false';
131
+ };
132
+ const findShadowRoot = element => {
133
+ if (!document.documentElement.attachShadow) {
134
+ return null;
135
+ }
136
+
137
+ // Can find the shadow root otherwise it'll return the document
138
+ if (typeof element.getRootNode === 'function') {
139
+ const root = element.getRootNode();
140
+ return root instanceof ShadowRoot ? root : null;
141
+ }
142
+ if (element instanceof ShadowRoot) {
143
+ return element;
144
+ }
145
+
146
+ // when we don't find a shadow root
147
+ if (!element.parentNode) {
148
+ return null;
149
+ }
150
+ return findShadowRoot(element.parentNode);
151
+ };
152
+ const noop = () => {};
153
+
154
+ /**
155
+ * Trick to restart an element's animation
156
+ *
157
+ * @param {HTMLElement} element
158
+ * @return void
159
+ *
160
+ * @see https://www.harrytheo.com/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation
161
+ */
162
+ const reflow = element => {
163
+ element.offsetHeight; // eslint-disable-line no-unused-expressions
164
+ };
165
+ const getjQuery = () => {
166
+ if (window.jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
167
+ return window.jQuery;
168
+ }
169
+ return null;
170
+ };
171
+ const DOMContentLoadedCallbacks = [];
172
+ const onDOMContentLoaded = callback => {
173
+ if (document.readyState === 'loading') {
174
+ // add listener on the first call when the document is in loading state
175
+ if (!DOMContentLoadedCallbacks.length) {
176
+ document.addEventListener('DOMContentLoaded', () => {
177
+ for (const callback of DOMContentLoadedCallbacks) {
178
+ callback();
179
+ }
180
+ });
181
+ }
182
+ DOMContentLoadedCallbacks.push(callback);
183
+ } else {
184
+ callback();
185
+ }
186
+ };
187
+ const isRTL = () => document.documentElement.dir === 'rtl';
188
+ const defineJQueryPlugin = plugin => {
189
+ onDOMContentLoaded(() => {
190
+ const $ = getjQuery();
191
+ /* istanbul ignore if */
192
+ if ($) {
193
+ const name = plugin.NAME;
194
+ const JQUERY_NO_CONFLICT = $.fn[name];
195
+ $.fn[name] = plugin.jQueryInterface;
196
+ $.fn[name].Constructor = plugin;
197
+ $.fn[name].noConflict = () => {
198
+ $.fn[name] = JQUERY_NO_CONFLICT;
199
+ return plugin.jQueryInterface;
200
+ };
201
+ }
202
+ });
203
+ };
204
+ const execute = (possibleCallback, args = [], defaultValue = possibleCallback) => {
205
+ return typeof possibleCallback === 'function' ? possibleCallback.call(...args) : defaultValue;
206
+ };
207
+ const executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {
208
+ if (!waitForTransition) {
209
+ execute(callback);
210
+ return;
211
+ }
212
+ const durationPadding = 5;
213
+ const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding;
214
+ let called = false;
215
+ const handler = ({
216
+ target
217
+ }) => {
218
+ if (target !== transitionElement) {
219
+ return;
220
+ }
221
+ called = true;
222
+ transitionElement.removeEventListener(TRANSITION_END, handler);
223
+ execute(callback);
224
+ };
225
+ transitionElement.addEventListener(TRANSITION_END, handler);
226
+ setTimeout(() => {
227
+ if (!called) {
228
+ triggerTransitionEnd(transitionElement);
229
+ }
230
+ }, emulatedDuration);
231
+ };
232
+
233
+ /**
234
+ * Return the previous/next element of a list.
235
+ *
236
+ * @param {array} list The list of elements
237
+ * @param activeElement The active element
238
+ * @param shouldGetNext Choose to get next or previous element
239
+ * @param isCycleAllowed
240
+ * @return {Element|elem} The proper element
241
+ */
242
+ const getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed) => {
243
+ const listLength = list.length;
244
+ let index = list.indexOf(activeElement);
245
+
246
+ // if the element does not exist in the list return an element
247
+ // depending on the direction and if cycle is allowed
248
+ if (index === -1) {
249
+ return !shouldGetNext && isCycleAllowed ? list[listLength - 1] : list[0];
250
+ }
251
+ index += shouldGetNext ? 1 : -1;
252
+ if (isCycleAllowed) {
253
+ index = (index + listLength) % listLength;
254
+ }
255
+ return list[Math.max(0, Math.min(index, listLength - 1))];
256
+ };
257
+
258
+ exports.defineJQueryPlugin = defineJQueryPlugin;
259
+ exports.execute = execute;
260
+ exports.executeAfterTransition = executeAfterTransition;
261
+ exports.findShadowRoot = findShadowRoot;
262
+ exports.getElement = getElement;
263
+ exports.getNextActiveElement = getNextActiveElement;
264
+ exports.getTransitionDurationFromElement = getTransitionDurationFromElement;
265
+ exports.getUID = getUID;
266
+ exports.getjQuery = getjQuery;
267
+ exports.isDisabled = isDisabled;
268
+ exports.isElement = isElement;
269
+ exports.isRTL = isRTL;
270
+ exports.isVisible = isVisible;
271
+ exports.noop = noop;
272
+ exports.onDOMContentLoaded = onDOMContentLoaded;
273
+ exports.parseSelector = parseSelector;
274
+ exports.reflow = reflow;
275
+ exports.toType = toType;
276
+ exports.triggerTransitionEnd = triggerTransitionEnd;
277
+
278
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
279
+
280
+ }));