bootstrap 5.2.3 → 5.3.0.alpha3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/assets/javascripts/bootstrap/alert.js +21 -32
  4. data/assets/javascripts/bootstrap/base-component.js +21 -38
  5. data/assets/javascripts/bootstrap/button.js +18 -22
  6. data/assets/javascripts/bootstrap/carousel.js +51 -135
  7. data/assets/javascripts/bootstrap/collapse.js +39 -102
  8. data/assets/javascripts/bootstrap/dom/data.js +8 -12
  9. data/assets/javascripts/bootstrap/dom/event-handler.js +18 -66
  10. data/assets/javascripts/bootstrap/dom/manipulator.js +4 -17
  11. data/assets/javascripts/bootstrap/dom/selector-engine.js +41 -24
  12. data/assets/javascripts/bootstrap/dropdown.js +73 -145
  13. data/assets/javascripts/bootstrap/modal.js +52 -133
  14. data/assets/javascripts/bootstrap/offcanvas.js +49 -102
  15. data/assets/javascripts/bootstrap/popover.js +22 -29
  16. data/assets/javascripts/bootstrap/scrollspy.js +51 -89
  17. data/assets/javascripts/bootstrap/tab.js +51 -109
  18. data/assets/javascripts/bootstrap/toast.js +30 -73
  19. data/assets/javascripts/bootstrap/tooltip.js +74 -177
  20. data/assets/javascripts/bootstrap/util/backdrop.js +27 -54
  21. data/assets/javascripts/bootstrap/util/component-functions.js +13 -19
  22. data/assets/javascripts/bootstrap/util/config.js +14 -27
  23. data/assets/javascripts/bootstrap/util/focustrap.js +19 -36
  24. data/assets/javascripts/bootstrap/util/index.js +42 -111
  25. data/assets/javascripts/bootstrap/util/sanitizer.js +13 -19
  26. data/assets/javascripts/bootstrap/util/scrollbar.js +23 -50
  27. data/assets/javascripts/bootstrap/util/swipe.js +26 -48
  28. data/assets/javascripts/bootstrap/util/template-factory.js +24 -52
  29. data/assets/javascripts/bootstrap-sprockets.js +1 -1
  30. data/assets/javascripts/bootstrap.js +626 -1406
  31. data/assets/javascripts/bootstrap.min.js +3 -3
  32. data/assets/stylesheets/_bootstrap-grid.scss +1 -3
  33. data/assets/stylesheets/_bootstrap-reboot.scss +1 -0
  34. data/assets/stylesheets/_bootstrap.scss +1 -0
  35. data/assets/stylesheets/bootstrap/_accordion.scss +9 -0
  36. data/assets/stylesheets/bootstrap/_alert.scss +8 -11
  37. data/assets/stylesheets/bootstrap/_button-group.scss +2 -2
  38. data/assets/stylesheets/bootstrap/_buttons.scss +3 -3
  39. data/assets/stylesheets/bootstrap/_card.scss +5 -0
  40. data/assets/stylesheets/bootstrap/_carousel.scss +20 -2
  41. data/assets/stylesheets/bootstrap/_close.scss +32 -9
  42. data/assets/stylesheets/bootstrap/_dropdown.scss +1 -0
  43. data/assets/stylesheets/bootstrap/_functions.scss +1 -1
  44. data/assets/stylesheets/bootstrap/_grid.scss +6 -0
  45. data/assets/stylesheets/bootstrap/_helpers.scss +2 -0
  46. data/assets/stylesheets/bootstrap/_list-group.scss +12 -7
  47. data/assets/stylesheets/bootstrap/_maps.scss +120 -0
  48. data/assets/stylesheets/bootstrap/_mixins.scss +1 -2
  49. data/assets/stylesheets/bootstrap/_nav.scss +40 -3
  50. data/assets/stylesheets/bootstrap/_navbar.scss +13 -3
  51. data/assets/stylesheets/bootstrap/_offcanvas.scss +4 -2
  52. data/assets/stylesheets/bootstrap/_pagination.scss +1 -1
  53. data/assets/stylesheets/bootstrap/_progress.scss +10 -1
  54. data/assets/stylesheets/bootstrap/_reboot.scss +3 -3
  55. data/assets/stylesheets/bootstrap/_root.scss +125 -10
  56. data/assets/stylesheets/bootstrap/_tables.scss +1 -1
  57. data/assets/stylesheets/bootstrap/_tooltip.scss +4 -5
  58. data/assets/stylesheets/bootstrap/_utilities.scss +172 -13
  59. data/assets/stylesheets/bootstrap/_variables-dark.scss +85 -0
  60. data/assets/stylesheets/bootstrap/_variables.scss +260 -151
  61. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +1 -0
  62. data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +21 -3
  63. data/assets/stylesheets/bootstrap/forms/_form-check.scss +24 -11
  64. data/assets/stylesheets/bootstrap/forms/_form-control.scss +23 -3
  65. data/assets/stylesheets/bootstrap/forms/_form-select.scss +11 -2
  66. data/assets/stylesheets/bootstrap/forms/_input-group.scss +1 -1
  67. data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +22 -2
  68. data/assets/stylesheets/bootstrap/helpers/_focus-ring.scss +5 -0
  69. data/assets/stylesheets/bootstrap/helpers/_icon-link.scss +25 -0
  70. data/assets/stylesheets/bootstrap/mixins/_alert.scss +4 -1
  71. data/assets/stylesheets/bootstrap/mixins/_banner.scss +2 -4
  72. data/assets/stylesheets/bootstrap/mixins/_caret.scss +30 -25
  73. data/assets/stylesheets/bootstrap/mixins/_color-mode.scss +21 -0
  74. data/assets/stylesheets/bootstrap/mixins/_forms.scss +8 -7
  75. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +2 -0
  76. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +1 -1
  77. data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +5 -1
  78. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +23 -29
  79. data/bootstrap.gemspec +1 -1
  80. data/lib/bootstrap/version.rb +2 -2
  81. data/tasks/updater/js.rb +1 -1
  82. data/tasks/updater/scss.rb +1 -1
  83. metadata +10 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5b9b76b3a8107fa8c73e4b760273a561e05e569e150a086196903c4ccb49ddbc
4
- data.tar.gz: 116115a60a5315e39b3bb6d5df9fe3568d48c139682d17f6de88b48762ddb06b
3
+ metadata.gz: 63aeb656107be9f6dae64d6fd1e369476f743018d86cb5d87b2482d1c493f9d8
4
+ data.tar.gz: 5160c42b1ea8333e7a820ccc47561f56ded1aeab950cf186624357b990463ef4
5
5
  SHA512:
6
- metadata.gz: '054324796db1631c6ad2dc41451f8b39dfcede1a4526a665c87d51549190dba106641fc4cf4716bd3e28f3332039369eb37f0806a5a4617acb08617373ea2bb3'
7
- data.tar.gz: c53409f131522034f9d02b5d4b18b6f69460be5ccfb232639132f5939ac63b3aa2ee7de91c6ac119c6c656ca91f2656579e20e9e50be6568564da9c3aa5f8263
6
+ metadata.gz: 2d38c781ff2f4f8115b5c6c7eeeba9f4d7fb7e5ef67f72dded8c9439c1231a970daa32a3ea7202e0aeb1a01d22c998432eb8e4e45a6d9f52bb3afd621ef70957
7
+ data.tar.gz: 590237c07a1b7bed950a288c5bdee0c6feb1d54af2c56a2698a35066add2e96bc19168eba260d94fa6c0275a35d3ba840e3955265698220752bd92200ab91bf5
data/README.md CHANGED
@@ -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.3 (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.3): 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.3 (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.3): 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.3';
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.3 (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.3): 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