bootstrap 4.6.2.1 → 5.0.0.alpha1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +0 -4
  3. data/README.md +1 -7
  4. data/Rakefile +4 -16
  5. data/assets/javascripts/bootstrap/alert.js +148 -73
  6. data/assets/javascripts/bootstrap/button.js +71 -154
  7. data/assets/javascripts/bootstrap/carousel.js +315 -209
  8. data/assets/javascripts/bootstrap/collapse.js +307 -153
  9. data/assets/javascripts/bootstrap/dom/data.js +81 -0
  10. data/assets/javascripts/bootstrap/dom/event-handler.js +311 -0
  11. data/assets/javascripts/bootstrap/dom/manipulator.js +100 -0
  12. data/assets/javascripts/bootstrap/dom/polyfill.js +110 -0
  13. data/assets/javascripts/bootstrap/dom/selector-engine.js +98 -0
  14. data/assets/javascripts/bootstrap/dropdown.js +257 -205
  15. data/assets/javascripts/bootstrap/modal.js +354 -250
  16. data/assets/javascripts/bootstrap/popover.js +85 -94
  17. data/assets/javascripts/bootstrap/scrollspy.js +179 -107
  18. data/assets/javascripts/bootstrap/tab.js +170 -99
  19. data/assets/javascripts/bootstrap/toast.js +181 -110
  20. data/assets/javascripts/bootstrap/tooltip.js +375 -226
  21. data/assets/javascripts/bootstrap-sprockets.js +5 -1
  22. data/assets/javascripts/bootstrap.js +2260 -1550
  23. data/assets/javascripts/bootstrap.min.js +3 -3
  24. data/assets/stylesheets/_bootstrap-grid.scss +53 -18
  25. data/assets/stylesheets/_bootstrap-reboot.scss +6 -3
  26. data/assets/stylesheets/_bootstrap.scss +16 -10
  27. data/assets/stylesheets/bootstrap/_alert.scss +3 -4
  28. data/assets/stylesheets/bootstrap/_badge.scss +2 -27
  29. data/assets/stylesheets/bootstrap/_breadcrumb.scss +5 -17
  30. data/assets/stylesheets/bootstrap/_button-group.scss +16 -38
  31. data/assets/stylesheets/bootstrap/_buttons.scss +27 -45
  32. data/assets/stylesheets/bootstrap/_card.scss +22 -68
  33. data/assets/stylesheets/bootstrap/_carousel.scss +15 -20
  34. data/assets/stylesheets/bootstrap/_close.scss +9 -13
  35. data/assets/stylesheets/bootstrap/_containers.scss +41 -0
  36. data/assets/stylesheets/bootstrap/_dropdown.scss +12 -9
  37. data/assets/stylesheets/bootstrap/_forms.scss +9 -347
  38. data/assets/stylesheets/bootstrap/_functions.scss +82 -69
  39. data/assets/stylesheets/bootstrap/_grid.scss +3 -54
  40. data/assets/stylesheets/bootstrap/_helpers.scss +7 -0
  41. data/assets/stylesheets/bootstrap/_images.scss +1 -1
  42. data/assets/stylesheets/bootstrap/_list-group.scss +7 -4
  43. data/assets/stylesheets/bootstrap/_mixins.scss +6 -12
  44. data/assets/stylesheets/bootstrap/_modal.scss +36 -41
  45. data/assets/stylesheets/bootstrap/_nav.scss +7 -9
  46. data/assets/stylesheets/bootstrap/_navbar.scss +42 -82
  47. data/assets/stylesheets/bootstrap/_pagination.scss +7 -20
  48. data/assets/stylesheets/bootstrap/_popover.scss +14 -14
  49. data/assets/stylesheets/bootstrap/_progress.scss +3 -5
  50. data/assets/stylesheets/bootstrap/_reboot.scss +304 -172
  51. data/assets/stylesheets/bootstrap/_root.scss +5 -8
  52. data/assets/stylesheets/bootstrap/_spinners.scss +8 -17
  53. data/assets/stylesheets/bootstrap/_tables.scss +80 -114
  54. data/assets/stylesheets/bootstrap/_toasts.scss +2 -4
  55. data/assets/stylesheets/bootstrap/_tooltip.scss +9 -9
  56. data/assets/stylesheets/bootstrap/_transitions.scss +0 -7
  57. data/assets/stylesheets/bootstrap/_type.scss +38 -59
  58. data/assets/stylesheets/bootstrap/_utilities.scss +503 -18
  59. data/assets/stylesheets/bootstrap/_variables.scss +548 -437
  60. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +18 -0
  61. data/assets/stylesheets/bootstrap/forms/_form-check.scss +142 -0
  62. data/assets/stylesheets/bootstrap/forms/_form-control.scss +116 -0
  63. data/assets/stylesheets/bootstrap/forms/_form-file.scss +91 -0
  64. data/assets/stylesheets/bootstrap/forms/_form-range.scss +136 -0
  65. data/assets/stylesheets/bootstrap/forms/_form-select.scss +82 -0
  66. data/assets/stylesheets/bootstrap/forms/_form-text.scss +11 -0
  67. data/assets/stylesheets/bootstrap/forms/_input-group.scss +140 -0
  68. data/assets/stylesheets/bootstrap/forms/_labels.scss +36 -0
  69. data/assets/stylesheets/bootstrap/forms/_validation.scss +12 -0
  70. data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +12 -0
  71. data/assets/stylesheets/bootstrap/helpers/_embed.scss +31 -0
  72. data/assets/stylesheets/bootstrap/helpers/_position.scss +30 -0
  73. data/assets/stylesheets/bootstrap/helpers/_screenreaders.scss +8 -0
  74. data/assets/stylesheets/bootstrap/helpers/_stretched-link.scss +15 -0
  75. data/assets/stylesheets/bootstrap/helpers/_text-truncation.scss +7 -0
  76. data/assets/stylesheets/bootstrap/mixins/_alert.scss +0 -4
  77. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +1 -1
  78. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +11 -8
  79. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +62 -47
  80. data/assets/stylesheets/bootstrap/mixins/_caret.scss +4 -4
  81. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +2 -0
  82. data/assets/stylesheets/bootstrap/mixins/_container.scss +9 -0
  83. data/assets/stylesheets/bootstrap/mixins/_forms.scss +23 -85
  84. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +9 -11
  85. data/assets/stylesheets/bootstrap/mixins/_grid.scss +86 -34
  86. data/assets/stylesheets/bootstrap/mixins/_image.scss +1 -21
  87. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +2 -1
  88. data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
  89. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +15 -8
  90. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +3 -3
  91. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +18 -24
  92. data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +21 -0
  93. data/assets/stylesheets/bootstrap/mixins/_transition.scss +2 -2
  94. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +49 -0
  95. data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
  96. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +214 -130
  97. data/bootstrap.gemspec +3 -1
  98. data/lib/bootstrap/engine.rb +1 -17
  99. data/lib/bootstrap/version.rb +2 -2
  100. data/tasks/updater/js.rb +6 -18
  101. data/tasks/updater/network.rb +1 -7
  102. metadata +49 -47
  103. data/assets/javascripts/bootstrap/util.js +0 -189
  104. data/assets/stylesheets/bootstrap/_code.scss +0 -48
  105. data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -526
  106. data/assets/stylesheets/bootstrap/_input-group.scss +0 -211
  107. data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -17
  108. data/assets/stylesheets/bootstrap/_media.scss +0 -8
  109. data/assets/stylesheets/bootstrap/_print.scss +0 -132
  110. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -23
  111. data/assets/stylesheets/bootstrap/mixins/_badge.scss +0 -17
  112. data/assets/stylesheets/bootstrap/mixins/_float.scss +0 -14
  113. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -80
  114. data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
  115. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -11
  116. data/assets/stylesheets/bootstrap/mixins/_size.scss +0 -7
  117. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -39
  118. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -17
  119. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +0 -11
  120. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +0 -8
  121. data/assets/stylesheets/bootstrap/utilities/_align.scss +0 -8
  122. data/assets/stylesheets/bootstrap/utilities/_background.scss +0 -19
  123. data/assets/stylesheets/bootstrap/utilities/_borders.scss +0 -75
  124. data/assets/stylesheets/bootstrap/utilities/_display.scss +0 -26
  125. data/assets/stylesheets/bootstrap/utilities/_embed.scss +0 -39
  126. data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -51
  127. data/assets/stylesheets/bootstrap/utilities/_float.scss +0 -11
  128. data/assets/stylesheets/bootstrap/utilities/_interactions.scss +0 -5
  129. data/assets/stylesheets/bootstrap/utilities/_overflow.scss +0 -5
  130. data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -32
  131. data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +0 -11
  132. data/assets/stylesheets/bootstrap/utilities/_shadows.scss +0 -6
  133. data/assets/stylesheets/bootstrap/utilities/_sizing.scss +0 -20
  134. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +0 -73
  135. data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +0 -19
  136. data/assets/stylesheets/bootstrap/utilities/_text.scss +0 -72
  137. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +0 -13
  138. data/test/gemfiles/rails_7_0_dartsass.gemfile +0 -8
  139. data/test/gemfiles/rails_7_0_sassc.gemfile +0 -8
  140. /data/assets/stylesheets/bootstrap/{utilities → helpers}/_clearfix.scss +0 -0
@@ -0,0 +1,81 @@
1
+ /*!
2
+ * Bootstrap data.js v5.0.0-alpha1 (https://getbootstrap.com/)
3
+ * Copyright 2011-2020 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() :
8
+ typeof define === 'function' && define.amd ? define(factory) :
9
+ (global = global || self, global.Data = factory());
10
+ }(this, (function () { 'use strict';
11
+
12
+ /**
13
+ * --------------------------------------------------------------------------
14
+ * Bootstrap (v5.0.0-alpha1): dom/data.js
15
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
16
+ * --------------------------------------------------------------------------
17
+ */
18
+
19
+ /**
20
+ * ------------------------------------------------------------------------
21
+ * Constants
22
+ * ------------------------------------------------------------------------
23
+ */
24
+ var mapData = function () {
25
+ var storeData = {};
26
+ var id = 1;
27
+ return {
28
+ set: function set(element, key, data) {
29
+ if (typeof element.key === 'undefined') {
30
+ element.key = {
31
+ key: key,
32
+ id: id
33
+ };
34
+ id++;
35
+ }
36
+
37
+ storeData[element.key.id] = data;
38
+ },
39
+ get: function get(element, key) {
40
+ if (!element || typeof element.key === 'undefined') {
41
+ return null;
42
+ }
43
+
44
+ var keyProperties = element.key;
45
+
46
+ if (keyProperties.key === key) {
47
+ return storeData[keyProperties.id];
48
+ }
49
+
50
+ return null;
51
+ },
52
+ delete: function _delete(element, key) {
53
+ if (typeof element.key === 'undefined') {
54
+ return;
55
+ }
56
+
57
+ var keyProperties = element.key;
58
+
59
+ if (keyProperties.key === key) {
60
+ delete storeData[keyProperties.id];
61
+ delete element.key;
62
+ }
63
+ }
64
+ };
65
+ }();
66
+
67
+ var Data = {
68
+ setData: function setData(instance, key, data) {
69
+ mapData.set(instance, key, data);
70
+ },
71
+ getData: function getData(instance, key) {
72
+ return mapData.get(instance, key);
73
+ },
74
+ removeData: function removeData(instance, key) {
75
+ mapData.delete(instance, key);
76
+ }
77
+ };
78
+
79
+ return Data;
80
+
81
+ })));
@@ -0,0 +1,311 @@
1
+ /*!
2
+ * Bootstrap event-handler.js v5.0.0-alpha1 (https://getbootstrap.com/)
3
+ * Copyright 2011-2020 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('./polyfill.js')) :
8
+ typeof define === 'function' && define.amd ? define(['./polyfill.js'], factory) :
9
+ (global = global || self, global.EventHandler = factory(global.Polyfill));
10
+ }(this, (function (polyfill_js) { 'use strict';
11
+
12
+ /**
13
+ * --------------------------------------------------------------------------
14
+ * Bootstrap (v5.0.0-alpha1): util/index.js
15
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
16
+ * --------------------------------------------------------------------------
17
+ */
18
+
19
+ var getjQuery = function getjQuery() {
20
+ var _window = window,
21
+ jQuery = _window.jQuery;
22
+
23
+ if (jQuery && !document.body.hasAttribute('data-no-jquery')) {
24
+ return jQuery;
25
+ }
26
+
27
+ return null;
28
+ };
29
+
30
+ /**
31
+ * --------------------------------------------------------------------------
32
+ * Bootstrap (v5.0.0-alpha1): dom/event-handler.js
33
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
34
+ * --------------------------------------------------------------------------
35
+ */
36
+ /**
37
+ * ------------------------------------------------------------------------
38
+ * Constants
39
+ * ------------------------------------------------------------------------
40
+ */
41
+
42
+ var $ = getjQuery();
43
+ var namespaceRegex = /[^.]*(?=\..*)\.|.*/;
44
+ var stripNameRegex = /\..*/;
45
+ var stripUidRegex = /::\d+$/;
46
+ var eventRegistry = {}; // Events storage
47
+
48
+ var uidEvent = 1;
49
+ var customEvents = {
50
+ mouseenter: 'mouseover',
51
+ mouseleave: 'mouseout'
52
+ };
53
+ var nativeEvents = ['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll'];
54
+ /**
55
+ * ------------------------------------------------------------------------
56
+ * Private methods
57
+ * ------------------------------------------------------------------------
58
+ */
59
+
60
+ function getUidEvent(element, uid) {
61
+ return uid && uid + "::" + uidEvent++ || element.uidEvent || uidEvent++;
62
+ }
63
+
64
+ function getEvent(element) {
65
+ var uid = getUidEvent(element);
66
+ element.uidEvent = uid;
67
+ eventRegistry[uid] = eventRegistry[uid] || {};
68
+ return eventRegistry[uid];
69
+ }
70
+
71
+ function bootstrapHandler(element, fn) {
72
+ return function handler(event) {
73
+ if (handler.oneOff) {
74
+ EventHandler.off(element, event.type, fn);
75
+ }
76
+
77
+ return fn.apply(element, [event]);
78
+ };
79
+ }
80
+
81
+ function bootstrapDelegationHandler(element, selector, fn) {
82
+ return function handler(event) {
83
+ var domElements = element.querySelectorAll(selector);
84
+
85
+ for (var target = event.target; target && target !== this; target = target.parentNode) {
86
+ for (var i = domElements.length; i--;) {
87
+ if (domElements[i] === target) {
88
+ if (handler.oneOff) {
89
+ EventHandler.off(element, event.type, fn);
90
+ }
91
+
92
+ return fn.apply(target, [event]);
93
+ }
94
+ }
95
+ } // To please ESLint
96
+
97
+
98
+ return null;
99
+ };
100
+ }
101
+
102
+ function findHandler(events, handler, delegationSelector) {
103
+ if (delegationSelector === void 0) {
104
+ delegationSelector = null;
105
+ }
106
+
107
+ var uidEventList = Object.keys(events);
108
+
109
+ for (var i = 0, len = uidEventList.length; i < len; i++) {
110
+ var event = events[uidEventList[i]];
111
+
112
+ if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {
113
+ return event;
114
+ }
115
+ }
116
+
117
+ return null;
118
+ }
119
+
120
+ function normalizeParams(originalTypeEvent, handler, delegationFn) {
121
+ var delegation = typeof handler === 'string';
122
+ var originalHandler = delegation ? delegationFn : handler; // allow to get the native events from namespaced events ('click.bs.button' --> 'click')
123
+
124
+ var typeEvent = originalTypeEvent.replace(stripNameRegex, '');
125
+ var custom = customEvents[typeEvent];
126
+
127
+ if (custom) {
128
+ typeEvent = custom;
129
+ }
130
+
131
+ var isNative = nativeEvents.indexOf(typeEvent) > -1;
132
+
133
+ if (!isNative) {
134
+ typeEvent = originalTypeEvent;
135
+ }
136
+
137
+ return [delegation, originalHandler, typeEvent];
138
+ }
139
+
140
+ function addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) {
141
+ if (typeof originalTypeEvent !== 'string' || !element) {
142
+ return;
143
+ }
144
+
145
+ if (!handler) {
146
+ handler = delegationFn;
147
+ delegationFn = null;
148
+ }
149
+
150
+ var _normalizeParams = normalizeParams(originalTypeEvent, handler, delegationFn),
151
+ delegation = _normalizeParams[0],
152
+ originalHandler = _normalizeParams[1],
153
+ typeEvent = _normalizeParams[2];
154
+
155
+ var events = getEvent(element);
156
+ var handlers = events[typeEvent] || (events[typeEvent] = {});
157
+ var previousFn = findHandler(handlers, originalHandler, delegation ? handler : null);
158
+
159
+ if (previousFn) {
160
+ previousFn.oneOff = previousFn.oneOff && oneOff;
161
+ return;
162
+ }
163
+
164
+ var uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''));
165
+ var fn = delegation ? bootstrapDelegationHandler(element, handler, delegationFn) : bootstrapHandler(element, handler);
166
+ fn.delegationSelector = delegation ? handler : null;
167
+ fn.originalHandler = originalHandler;
168
+ fn.oneOff = oneOff;
169
+ fn.uidEvent = uid;
170
+ handlers[uid] = fn;
171
+ element.addEventListener(typeEvent, fn, delegation);
172
+ }
173
+
174
+ function removeHandler(element, events, typeEvent, handler, delegationSelector) {
175
+ var fn = findHandler(events[typeEvent], handler, delegationSelector);
176
+
177
+ if (!fn) {
178
+ return;
179
+ }
180
+
181
+ element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));
182
+ delete events[typeEvent][fn.uidEvent];
183
+ }
184
+
185
+ function removeNamespacedHandlers(element, events, typeEvent, namespace) {
186
+ var storeElementEvent = events[typeEvent] || {};
187
+ Object.keys(storeElementEvent).forEach(function (handlerKey) {
188
+ if (handlerKey.indexOf(namespace) > -1) {
189
+ var event = storeElementEvent[handlerKey];
190
+ removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
191
+ }
192
+ });
193
+ }
194
+
195
+ var EventHandler = {
196
+ on: function on(element, event, handler, delegationFn) {
197
+ addHandler(element, event, handler, delegationFn, false);
198
+ },
199
+ one: function one(element, event, handler, delegationFn) {
200
+ addHandler(element, event, handler, delegationFn, true);
201
+ },
202
+ off: function off(element, originalTypeEvent, handler, delegationFn) {
203
+ if (typeof originalTypeEvent !== 'string' || !element) {
204
+ return;
205
+ }
206
+
207
+ var _normalizeParams2 = normalizeParams(originalTypeEvent, handler, delegationFn),
208
+ delegation = _normalizeParams2[0],
209
+ originalHandler = _normalizeParams2[1],
210
+ typeEvent = _normalizeParams2[2];
211
+
212
+ var inNamespace = typeEvent !== originalTypeEvent;
213
+ var events = getEvent(element);
214
+ var isNamespace = originalTypeEvent.charAt(0) === '.';
215
+
216
+ if (typeof originalHandler !== 'undefined') {
217
+ // Simplest case: handler is passed, remove that listener ONLY.
218
+ if (!events || !events[typeEvent]) {
219
+ return;
220
+ }
221
+
222
+ removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null);
223
+ return;
224
+ }
225
+
226
+ if (isNamespace) {
227
+ Object.keys(events).forEach(function (elementEvent) {
228
+ removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));
229
+ });
230
+ }
231
+
232
+ var storeElementEvent = events[typeEvent] || {};
233
+ Object.keys(storeElementEvent).forEach(function (keyHandlers) {
234
+ var handlerKey = keyHandlers.replace(stripUidRegex, '');
235
+
236
+ if (!inNamespace || originalTypeEvent.indexOf(handlerKey) > -1) {
237
+ var event = storeElementEvent[keyHandlers];
238
+ removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
239
+ }
240
+ });
241
+ },
242
+ trigger: function trigger(element, event, args) {
243
+ if (typeof event !== 'string' || !element) {
244
+ return null;
245
+ }
246
+
247
+ var typeEvent = event.replace(stripNameRegex, '');
248
+ var inNamespace = event !== typeEvent;
249
+ var isNative = nativeEvents.indexOf(typeEvent) > -1;
250
+ var jQueryEvent;
251
+ var bubbles = true;
252
+ var nativeDispatch = true;
253
+ var defaultPrevented = false;
254
+ var evt = null;
255
+
256
+ if (inNamespace && $) {
257
+ jQueryEvent = $.Event(event, args);
258
+ $(element).trigger(jQueryEvent);
259
+ bubbles = !jQueryEvent.isPropagationStopped();
260
+ nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
261
+ defaultPrevented = jQueryEvent.isDefaultPrevented();
262
+ }
263
+
264
+ if (isNative) {
265
+ evt = document.createEvent('HTMLEvents');
266
+ evt.initEvent(typeEvent, bubbles, true);
267
+ } else {
268
+ evt = new CustomEvent(event, {
269
+ bubbles: bubbles,
270
+ cancelable: true
271
+ });
272
+ } // merge custom informations in our event
273
+
274
+
275
+ if (typeof args !== 'undefined') {
276
+ Object.keys(args).forEach(function (key) {
277
+ Object.defineProperty(evt, key, {
278
+ get: function get() {
279
+ return args[key];
280
+ }
281
+ });
282
+ });
283
+ }
284
+
285
+ if (defaultPrevented) {
286
+ evt.preventDefault();
287
+
288
+ if (!polyfill_js.defaultPreventedPreservedOnDispatch) {
289
+ Object.defineProperty(evt, 'defaultPrevented', {
290
+ get: function get() {
291
+ return true;
292
+ }
293
+ });
294
+ }
295
+ }
296
+
297
+ if (nativeDispatch) {
298
+ element.dispatchEvent(evt);
299
+ }
300
+
301
+ if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') {
302
+ jQueryEvent.preventDefault();
303
+ }
304
+
305
+ return evt;
306
+ }
307
+ };
308
+
309
+ return EventHandler;
310
+
311
+ })));
@@ -0,0 +1,100 @@
1
+ /*!
2
+ * Bootstrap manipulator.js v5.0.0-alpha1 (https://getbootstrap.com/)
3
+ * Copyright 2011-2020 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() :
8
+ typeof define === 'function' && define.amd ? define(factory) :
9
+ (global = global || self, global.Manipulator = factory());
10
+ }(this, (function () { 'use strict';
11
+
12
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
13
+
14
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
15
+
16
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
17
+
18
+ /**
19
+ * --------------------------------------------------------------------------
20
+ * Bootstrap (v5.0.0-alpha1): dom/manipulator.js
21
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
22
+ * --------------------------------------------------------------------------
23
+ */
24
+ function normalizeData(val) {
25
+ if (val === 'true') {
26
+ return true;
27
+ }
28
+
29
+ if (val === 'false') {
30
+ return false;
31
+ }
32
+
33
+ if (val === Number(val).toString()) {
34
+ return Number(val);
35
+ }
36
+
37
+ if (val === '' || val === 'null') {
38
+ return null;
39
+ }
40
+
41
+ return val;
42
+ }
43
+
44
+ function normalizeDataKey(key) {
45
+ return key.replace(/[A-Z]/g, function (chr) {
46
+ return "-" + chr.toLowerCase();
47
+ });
48
+ }
49
+
50
+ var Manipulator = {
51
+ setDataAttribute: function setDataAttribute(element, key, value) {
52
+ element.setAttribute("data-" + normalizeDataKey(key), value);
53
+ },
54
+ removeDataAttribute: function removeDataAttribute(element, key) {
55
+ element.removeAttribute("data-" + normalizeDataKey(key));
56
+ },
57
+ getDataAttributes: function getDataAttributes(element) {
58
+ if (!element) {
59
+ return {};
60
+ }
61
+
62
+ var attributes = _objectSpread({}, element.dataset);
63
+
64
+ Object.keys(attributes).forEach(function (key) {
65
+ attributes[key] = normalizeData(attributes[key]);
66
+ });
67
+ return attributes;
68
+ },
69
+ getDataAttribute: function getDataAttribute(element, key) {
70
+ return normalizeData(element.getAttribute("data-" + normalizeDataKey(key)));
71
+ },
72
+ offset: function offset(element) {
73
+ var rect = element.getBoundingClientRect();
74
+ return {
75
+ top: rect.top + document.body.scrollTop,
76
+ left: rect.left + document.body.scrollLeft
77
+ };
78
+ },
79
+ position: function position(element) {
80
+ return {
81
+ top: element.offsetTop,
82
+ left: element.offsetLeft
83
+ };
84
+ },
85
+ toggleClass: function toggleClass(element, className) {
86
+ if (!element) {
87
+ return;
88
+ }
89
+
90
+ if (element.classList.contains(className)) {
91
+ element.classList.remove(className);
92
+ } else {
93
+ element.classList.add(className);
94
+ }
95
+ }
96
+ };
97
+
98
+ return Manipulator;
99
+
100
+ })));
@@ -0,0 +1,110 @@
1
+ /*!
2
+ * Bootstrap polyfill.js v5.0.0-alpha1 (https://getbootstrap.com/)
3
+ * Copyright 2011-2020 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 = global || self, factory(global.Polyfill = {}));
10
+ }(this, (function (exports) { 'use strict';
11
+
12
+ /**
13
+ * --------------------------------------------------------------------------
14
+ * Bootstrap (v5.0.0-alpha1): util/index.js
15
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
16
+ * --------------------------------------------------------------------------
17
+ */
18
+ var MAX_UID = 1000000;
19
+ /**
20
+ * --------------------------------------------------------------------------
21
+ * Public Util Api
22
+ * --------------------------------------------------------------------------
23
+ */
24
+
25
+
26
+ var getUID = function getUID(prefix) {
27
+ do {
28
+ prefix += Math.floor(Math.random() * MAX_UID);
29
+ } while (document.getElementById(prefix));
30
+
31
+ return prefix;
32
+ };
33
+
34
+ /* istanbul ignore file */
35
+ exports.find = Element.prototype.querySelectorAll;
36
+ exports.findOne = Element.prototype.querySelector; // MSEdge resets defaultPrevented flag upon dispatchEvent call if at least one listener is attached
37
+
38
+ var defaultPreventedPreservedOnDispatch = function () {
39
+ var e = new CustomEvent('Bootstrap', {
40
+ cancelable: true
41
+ });
42
+ var element = document.createElement('div');
43
+ element.addEventListener('Bootstrap', function () {
44
+ return null;
45
+ });
46
+ e.preventDefault();
47
+ element.dispatchEvent(e);
48
+ return e.defaultPrevented;
49
+ }();
50
+
51
+ var scopeSelectorRegex = /:scope\b/;
52
+
53
+ var supportScopeQuery = function () {
54
+ var element = document.createElement('div');
55
+
56
+ try {
57
+ element.querySelectorAll(':scope *');
58
+ } catch (_) {
59
+ return false;
60
+ }
61
+
62
+ return true;
63
+ }();
64
+
65
+ if (!supportScopeQuery) {
66
+ exports.find = function find(selector) {
67
+ if (!scopeSelectorRegex.test(selector)) {
68
+ return this.querySelectorAll(selector);
69
+ }
70
+
71
+ var hasId = Boolean(this.id);
72
+
73
+ if (!hasId) {
74
+ this.id = getUID('scope');
75
+ }
76
+
77
+ var nodeList = null;
78
+
79
+ try {
80
+ selector = selector.replace(scopeSelectorRegex, "#" + this.id);
81
+ nodeList = this.querySelectorAll(selector);
82
+ } finally {
83
+ if (!hasId) {
84
+ this.removeAttribute('id');
85
+ }
86
+ }
87
+
88
+ return nodeList;
89
+ };
90
+
91
+ exports.findOne = function findOne(selector) {
92
+ if (!scopeSelectorRegex.test(selector)) {
93
+ return this.querySelector(selector);
94
+ }
95
+
96
+ var matches = exports.find.call(this, selector);
97
+
98
+ if (typeof matches[0] !== 'undefined') {
99
+ return matches[0];
100
+ }
101
+
102
+ return null;
103
+ };
104
+ }
105
+
106
+ exports.defaultPreventedPreservedOnDispatch = defaultPreventedPreservedOnDispatch;
107
+
108
+ Object.defineProperty(exports, '__esModule', { value: true });
109
+
110
+ })));
@@ -0,0 +1,98 @@
1
+ /*!
2
+ * Bootstrap selector-engine.js v5.0.0-alpha1 (https://getbootstrap.com/)
3
+ * Copyright 2011-2020 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('./polyfill.js')) :
8
+ typeof define === 'function' && define.amd ? define(['./polyfill.js'], factory) :
9
+ (global = global || self, global.SelectorEngine = factory(global.Polyfill));
10
+ }(this, (function (polyfill_js) { 'use strict';
11
+
12
+ /**
13
+ * --------------------------------------------------------------------------
14
+ * Bootstrap (v5.0.0-alpha1): dom/selector-engine.js
15
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
16
+ * --------------------------------------------------------------------------
17
+ */
18
+ /**
19
+ * ------------------------------------------------------------------------
20
+ * Constants
21
+ * ------------------------------------------------------------------------
22
+ */
23
+
24
+ var NODE_TEXT = 3;
25
+ var SelectorEngine = {
26
+ matches: function matches(element, selector) {
27
+ return element.matches(selector);
28
+ },
29
+ find: function find(selector, element) {
30
+ var _ref;
31
+
32
+ if (element === void 0) {
33
+ element = document.documentElement;
34
+ }
35
+
36
+ return (_ref = []).concat.apply(_ref, polyfill_js.find.call(element, selector));
37
+ },
38
+ findOne: function findOne(selector, element) {
39
+ if (element === void 0) {
40
+ element = document.documentElement;
41
+ }
42
+
43
+ return polyfill_js.findOne.call(element, selector);
44
+ },
45
+ children: function children(element, selector) {
46
+ var _ref2;
47
+
48
+ var children = (_ref2 = []).concat.apply(_ref2, element.children);
49
+
50
+ return children.filter(function (child) {
51
+ return child.matches(selector);
52
+ });
53
+ },
54
+ parents: function parents(element, selector) {
55
+ var parents = [];
56
+ var ancestor = element.parentNode;
57
+
58
+ while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
59
+ if (this.matches(ancestor, selector)) {
60
+ parents.push(ancestor);
61
+ }
62
+
63
+ ancestor = ancestor.parentNode;
64
+ }
65
+
66
+ return parents;
67
+ },
68
+ prev: function prev(element, selector) {
69
+ var previous = element.previousElementSibling;
70
+
71
+ while (previous) {
72
+ if (previous.matches(selector)) {
73
+ return [previous];
74
+ }
75
+
76
+ previous = previous.previousElementSibling;
77
+ }
78
+
79
+ return [];
80
+ },
81
+ next: function next(element, selector) {
82
+ var next = element.nextElementSibling;
83
+
84
+ while (next) {
85
+ if (this.matches(next, selector)) {
86
+ return [next];
87
+ }
88
+
89
+ next = next.nextElementSibling;
90
+ }
91
+
92
+ return [];
93
+ }
94
+ };
95
+
96
+ return SelectorEngine;
97
+
98
+ })));