bootstrap 4.0.0 → 4.3.1

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 (104) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +1 -1
  3. data/CHANGELOG.md +8 -0
  4. data/README.md +2 -2
  5. data/Rakefile +4 -2
  6. data/assets/javascripts/bootstrap/alert.js +45 -22
  7. data/assets/javascripts/bootstrap/button.js +39 -19
  8. data/assets/javascripts/bootstrap/carousel.js +213 -51
  9. data/assets/javascripts/bootstrap/collapse.js +105 -52
  10. data/assets/javascripts/bootstrap/dropdown.js +169 -45
  11. data/assets/javascripts/bootstrap/modal.js +139 -71
  12. data/assets/javascripts/bootstrap/popover.js +77 -20
  13. data/assets/javascripts/bootstrap/scrollspy.js +87 -29
  14. data/assets/javascripts/bootstrap/tab.js +50 -32
  15. data/assets/javascripts/bootstrap/toast.js +282 -0
  16. data/assets/javascripts/bootstrap/tooltip.js +295 -59
  17. data/assets/javascripts/bootstrap/util.js +78 -45
  18. data/assets/javascripts/bootstrap-sprockets.js +7 -6
  19. data/assets/javascripts/bootstrap.js +1537 -996
  20. data/assets/javascripts/bootstrap.min.js +3 -3
  21. data/assets/stylesheets/_bootstrap-grid.scss +4 -7
  22. data/assets/stylesheets/_bootstrap-reboot.scss +3 -3
  23. data/assets/stylesheets/_bootstrap.scss +5 -3
  24. data/assets/stylesheets/bootstrap/_alert.scss +1 -1
  25. data/assets/stylesheets/bootstrap/_badge.scss +8 -1
  26. data/assets/stylesheets/bootstrap/_breadcrumb.scss +9 -6
  27. data/assets/stylesheets/bootstrap/_button-group.scss +16 -19
  28. data/assets/stylesheets/bootstrap/_buttons.scss +10 -16
  29. data/assets/stylesheets/bootstrap/_card.scss +53 -34
  30. data/assets/stylesheets/bootstrap/_carousel.scss +66 -60
  31. data/assets/stylesheets/bootstrap/_close.scss +15 -8
  32. data/assets/stylesheets/bootstrap/_code.scss +5 -13
  33. data/assets/stylesheets/bootstrap/_custom-forms.scss +250 -40
  34. data/assets/stylesheets/bootstrap/_dropdown.scss +65 -5
  35. data/assets/stylesheets/bootstrap/_forms.scss +32 -35
  36. data/assets/stylesheets/bootstrap/_functions.scss +9 -9
  37. data/assets/stylesheets/bootstrap/_images.scss +2 -2
  38. data/assets/stylesheets/bootstrap/_input-group.scss +45 -11
  39. data/assets/stylesheets/bootstrap/_jumbotron.scss +1 -0
  40. data/assets/stylesheets/bootstrap/_list-group.scss +39 -5
  41. data/assets/stylesheets/bootstrap/_mixins.scss +6 -1
  42. data/assets/stylesheets/bootstrap/_modal.scss +80 -19
  43. data/assets/stylesheets/bootstrap/_nav.scss +2 -0
  44. data/assets/stylesheets/bootstrap/_navbar.scss +9 -26
  45. data/assets/stylesheets/bootstrap/_pagination.scss +2 -6
  46. data/assets/stylesheets/bootstrap/_popover.scss +47 -59
  47. data/assets/stylesheets/bootstrap/_print.scss +23 -6
  48. data/assets/stylesheets/bootstrap/_progress.scss +16 -6
  49. data/assets/stylesheets/bootstrap/_reboot.scss +51 -50
  50. data/assets/stylesheets/bootstrap/_spinners.scss +55 -0
  51. data/assets/stylesheets/bootstrap/_tables.scss +16 -11
  52. data/assets/stylesheets/bootstrap/_toasts.scss +44 -0
  53. data/assets/stylesheets/bootstrap/_tooltip.scss +1 -1
  54. data/assets/stylesheets/bootstrap/_transitions.scss +4 -20
  55. data/assets/stylesheets/bootstrap/_type.scss +16 -16
  56. data/assets/stylesheets/bootstrap/_utilities.scss +3 -0
  57. data/assets/stylesheets/bootstrap/_variables.scss +430 -201
  58. data/assets/stylesheets/bootstrap/mixins/_badge.scss +7 -2
  59. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +29 -1
  60. data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +16 -1
  61. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +3 -3
  62. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +12 -14
  63. data/assets/stylesheets/bootstrap/mixins/_caret.scss +5 -8
  64. data/assets/stylesheets/bootstrap/mixins/_deprecate.scss +10 -0
  65. data/assets/stylesheets/bootstrap/mixins/_float.scss +3 -0
  66. data/assets/stylesheets/bootstrap/mixins/_forms.scss +68 -13
  67. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +7 -7
  68. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +3 -4
  69. data/assets/stylesheets/bootstrap/mixins/_grid.scss +9 -10
  70. data/assets/stylesheets/bootstrap/mixins/_hover.scss +3 -5
  71. data/assets/stylesheets/bootstrap/mixins/_image.scss +2 -2
  72. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +1 -1
  73. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +2 -2
  74. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +1 -1
  75. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +1 -1
  76. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +1 -3
  77. data/assets/stylesheets/bootstrap/mixins/_size.scss +1 -0
  78. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +10 -1
  79. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +5 -3
  80. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +3 -1
  81. data/assets/stylesheets/bootstrap/mixins/_transition.scss +7 -0
  82. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +1 -0
  83. data/assets/stylesheets/bootstrap/utilities/_borders.scss +17 -1
  84. data/assets/stylesheets/bootstrap/utilities/_display.scss +6 -18
  85. data/assets/stylesheets/bootstrap/utilities/_embed.scss +7 -20
  86. data/assets/stylesheets/bootstrap/utilities/_flex.scss +5 -0
  87. data/assets/stylesheets/bootstrap/utilities/_float.scss +5 -3
  88. data/assets/stylesheets/bootstrap/utilities/_overflow.scss +5 -0
  89. data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -4
  90. data/assets/stylesheets/bootstrap/utilities/_shadows.scss +6 -0
  91. data/assets/stylesheets/bootstrap/utilities/_sizing.scss +8 -0
  92. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +23 -1
  93. data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +19 -0
  94. data/assets/stylesheets/bootstrap/utilities/_text.scss +26 -6
  95. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +4 -2
  96. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +204 -0
  97. data/bootstrap.gemspec +6 -3
  98. data/lib/bootstrap/engine.rb +3 -0
  99. data/lib/bootstrap/version.rb +4 -2
  100. data/lib/bootstrap.rb +10 -7
  101. data/tasks/updater/js.rb +1 -1
  102. data/test/test_helper.rb +7 -6
  103. metadata +19 -12
  104. data/assets/stylesheets/bootstrap/mixins/_navbar-align.scss +0 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 20d4d19b9e96d1a891aab9466010e01c1842c7cf
4
- data.tar.gz: 6d91e6aeee143e15d974f7ff3d24a2ad87d65b53
2
+ SHA256:
3
+ metadata.gz: 0e32995c543ae2e6e2053b60ca3bf7f852b89c60ce26827c4b3efc87a482d2eb
4
+ data.tar.gz: bec41cdf3c4c03ed3945fa20f744aa5d2a2ebd301389809548d6c08ce08a866d
5
5
  SHA512:
6
- metadata.gz: aac524ee7e9d87f5107f8041f286a12c7c16ba99b64f5e8b0d7a23d23a767cc6420e6bf18be9595d84afad7861ef048fee85fddcd84b6712aae9d0146bb72afe
7
- data.tar.gz: b69acad263dceffeb101cefbfa76efd849b634d6a61f5567eae8800e250a674a06ef43ace048f187d8a2b441e62311242eb3eea96bcada84fef2a0a83744a35a
6
+ metadata.gz: 8531bfb77cf50de537a66b36c08ef2f90953c9c80d0177c70f07ea14662b219380e904f27a5aed3c55c41b835efe3e20fbebe670f74495dad7efa107afeb1fea
7
+ data.tar.gz: c3a0f8311bf6e76ee646fb92cd7432bd2c482e354ed7aa58b5edad824901fc1da6cc92c631553e0c48de2b7d9ba64797fd369af124fe51ae6e88681afecfeb08
data/.travis.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  language: ruby
2
2
  sudo: false
3
3
  rvm:
4
- - 2.3.1
4
+ - 2.3.8
5
5
  gemfile:
6
6
  - test/gemfiles/rails_4_2.gemfile
7
7
  - test/gemfiles/rails_5_0.gemfile
data/CHANGELOG.md CHANGED
@@ -6,6 +6,14 @@ The changelog only includes changes specific to the RubyGem.
6
6
  The Bootstrap framework changes can be found in [the Releases section of twbs/bootstrap](https://github.com/twbs/bootstrap/releases).
7
7
  Release announcement posts on [the official Bootstrap blog](http://blog.getbootstrap.com) contain summaries of the most noteworthy changes made in each release of Bootstrap.
8
8
 
9
+ # 4.1.1
10
+
11
+ No gem-specific changes.
12
+
13
+ # 4.1.0
14
+
15
+ No gem-specific changes.
16
+
9
17
  # 4.0.0
10
18
 
11
19
  No gem-specific changes.
data/README.md CHANGED
@@ -17,7 +17,7 @@ Please see the appropriate guide for your environment of choice:
17
17
  Add `bootstrap` to your Gemfile:
18
18
 
19
19
  ```ruby
20
- gem 'bootstrap', '~> 4.0.0'
20
+ gem 'bootstrap', '~> 4.3.1'
21
21
  ```
22
22
 
23
23
  Ensure that `sprockets-rails` is at least v2.3.2.
@@ -105,7 +105,7 @@ In the application Sass file, replace `@import 'bootstrap'` with:
105
105
  @import 'bootstrap-custom';
106
106
  ```
107
107
 
108
- [bootstrap-home]: http://v4-alpha.getbootstrap.com/
108
+ [bootstrap-home]: https://getbootstrap.com
109
109
  [bootstrap-variables.scss]: https://github.com/twbs/bootstrap-rubygem/blob/master/templates/project/_bootstrap-variables.scss
110
110
  [autoprefixer]: https://github.com/ai/autoprefixer
111
111
  [popper.js]: https://popper.js.org
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ require 'bundler/gem_tasks'
2
+
1
3
  lib_path = File.join(File.dirname(__FILE__), 'lib')
2
4
  $:.unshift(lib_path) unless $:.include?(lib_path)
3
5
 
@@ -43,13 +45,13 @@ end
43
45
 
44
46
  desc 'Dumps output to a CSS file for testing'
45
47
  task :debug do
46
- require 'sass'
48
+ require 'sassc'
47
49
  require './lib/bootstrap'
48
50
  require 'term/ansicolor'
49
51
  require 'autoprefixer-rails'
50
52
  path = Bootstrap.stylesheets_path
51
53
  %w(_bootstrap _bootstrap-reboot _bootstrap-grid).each do |file|
52
- engine = Sass::Engine.for_file("#{path}/#{file}.scss", syntax: :scss, load_paths: [path])
54
+ engine = SassC::Engine.new(File.read("#{path}/#{file}.scss"), syntax: :scss, load_paths: [path])
53
55
  out = File.join('tmp', "#{file[1..-1]}.css")
54
56
  css = engine.render
55
57
  css = AutoprefixerRails.process(css)
@@ -1,26 +1,45 @@
1
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
1
+ /*!
2
+ * Bootstrap alert.js v4.3.1 (https://getbootstrap.com/)
3
+ * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5
+ */
6
+ (function (global, factory) {
7
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
8
+ typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
9
+ (global = global || self, global.Alert = factory(global.jQuery, global.Util));
10
+ }(this, function ($, Util) { 'use strict';
11
+
12
+ $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
13
+ Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
14
+
15
+ function _defineProperties(target, props) {
16
+ for (var i = 0; i < props.length; i++) {
17
+ var descriptor = props[i];
18
+ descriptor.enumerable = descriptor.enumerable || false;
19
+ descriptor.configurable = true;
20
+ if ("value" in descriptor) descriptor.writable = true;
21
+ Object.defineProperty(target, descriptor.key, descriptor);
22
+ }
23
+ }
24
+
25
+ function _createClass(Constructor, protoProps, staticProps) {
26
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
27
+ if (staticProps) _defineProperties(Constructor, staticProps);
28
+ return Constructor;
29
+ }
2
30
 
3
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
4
-
5
- /**
6
- * --------------------------------------------------------------------------
7
- * Bootstrap (v4.0.0): alert.js
8
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
9
- * --------------------------------------------------------------------------
10
- */
11
- var Alert = function ($) {
12
31
  /**
13
32
  * ------------------------------------------------------------------------
14
33
  * Constants
15
34
  * ------------------------------------------------------------------------
16
35
  */
36
+
17
37
  var NAME = 'alert';
18
- var VERSION = '4.0.0';
38
+ var VERSION = '4.3.1';
19
39
  var DATA_KEY = 'bs.alert';
20
40
  var EVENT_KEY = "." + DATA_KEY;
21
41
  var DATA_API_KEY = '.data-api';
22
42
  var JQUERY_NO_CONFLICT = $.fn[NAME];
23
- var TRANSITION_DURATION = 150;
24
43
  var Selector = {
25
44
  DISMISS: '[data-dismiss="alert"]'
26
45
  };
@@ -53,9 +72,11 @@ var Alert = function ($) {
53
72
 
54
73
  // Public
55
74
  _proto.close = function close(element) {
56
- element = element || this._element;
75
+ var rootElement = this._element;
57
76
 
58
- var rootElement = this._getRootElement(element);
77
+ if (element) {
78
+ rootElement = this._getRootElement(element);
79
+ }
59
80
 
60
81
  var customEvent = this._triggerCloseEvent(rootElement);
61
82
 
@@ -69,15 +90,15 @@ var Alert = function ($) {
69
90
  _proto.dispose = function dispose() {
70
91
  $.removeData(this._element, DATA_KEY);
71
92
  this._element = null;
72
- }; // Private
73
-
93
+ } // Private
94
+ ;
74
95
 
75
96
  _proto._getRootElement = function _getRootElement(element) {
76
97
  var selector = Util.getSelectorFromElement(element);
77
98
  var parent = false;
78
99
 
79
100
  if (selector) {
80
- parent = $(selector)[0];
101
+ parent = document.querySelector(selector);
81
102
  }
82
103
 
83
104
  if (!parent) {
@@ -98,21 +119,22 @@ var Alert = function ($) {
98
119
 
99
120
  $(element).removeClass(ClassName.SHOW);
100
121
 
101
- if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) {
122
+ if (!$(element).hasClass(ClassName.FADE)) {
102
123
  this._destroyElement(element);
103
124
 
104
125
  return;
105
126
  }
106
127
 
128
+ var transitionDuration = Util.getTransitionDurationFromElement(element);
107
129
  $(element).one(Util.TRANSITION_END, function (event) {
108
130
  return _this._destroyElement(element, event);
109
- }).emulateTransitionEnd(TRANSITION_DURATION);
131
+ }).emulateTransitionEnd(transitionDuration);
110
132
  };
111
133
 
112
134
  _proto._destroyElement = function _destroyElement(element) {
113
135
  $(element).detach().trigger(Event.CLOSED).remove();
114
- }; // Static
115
-
136
+ } // Static
137
+ ;
116
138
 
117
139
  Alert._jQueryInterface = function _jQueryInterface(config) {
118
140
  return this.each(function () {
@@ -172,4 +194,5 @@ var Alert = function ($) {
172
194
  };
173
195
 
174
196
  return Alert;
175
- }($);
197
+
198
+ }));
@@ -1,21 +1,40 @@
1
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
1
+ /*!
2
+ * Bootstrap button.js v4.3.1 (https://getbootstrap.com/)
3
+ * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5
+ */
6
+ (function (global, factory) {
7
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) :
8
+ typeof define === 'function' && define.amd ? define(['jquery'], factory) :
9
+ (global = global || self, global.Button = factory(global.jQuery));
10
+ }(this, function ($) { 'use strict';
11
+
12
+ $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
13
+
14
+ function _defineProperties(target, props) {
15
+ for (var i = 0; i < props.length; i++) {
16
+ var descriptor = props[i];
17
+ descriptor.enumerable = descriptor.enumerable || false;
18
+ descriptor.configurable = true;
19
+ if ("value" in descriptor) descriptor.writable = true;
20
+ Object.defineProperty(target, descriptor.key, descriptor);
21
+ }
22
+ }
2
23
 
3
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
24
+ function _createClass(Constructor, protoProps, staticProps) {
25
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
26
+ if (staticProps) _defineProperties(Constructor, staticProps);
27
+ return Constructor;
28
+ }
4
29
 
5
- /**
6
- * --------------------------------------------------------------------------
7
- * Bootstrap (v4.0.0): button.js
8
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
9
- * --------------------------------------------------------------------------
10
- */
11
- var Button = function ($) {
12
30
  /**
13
31
  * ------------------------------------------------------------------------
14
32
  * Constants
15
33
  * ------------------------------------------------------------------------
16
34
  */
35
+
17
36
  var NAME = 'button';
18
- var VERSION = '4.0.0';
37
+ var VERSION = '4.3.1';
19
38
  var DATA_KEY = 'bs.button';
20
39
  var EVENT_KEY = "." + DATA_KEY;
21
40
  var DATA_API_KEY = '.data-api';
@@ -28,7 +47,7 @@ var Button = function ($) {
28
47
  var Selector = {
29
48
  DATA_TOGGLE_CARROT: '[data-toggle^="button"]',
30
49
  DATA_TOGGLE: '[data-toggle="buttons"]',
31
- INPUT: 'input',
50
+ INPUT: 'input:not([type="hidden"])',
32
51
  ACTIVE: '.active',
33
52
  BUTTON: '.btn'
34
53
  };
@@ -60,14 +79,14 @@ var Button = function ($) {
60
79
  var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0];
61
80
 
62
81
  if (rootElement) {
63
- var input = $(this._element).find(Selector.INPUT)[0];
82
+ var input = this._element.querySelector(Selector.INPUT);
64
83
 
65
84
  if (input) {
66
85
  if (input.type === 'radio') {
67
- if (input.checked && $(this._element).hasClass(ClassName.ACTIVE)) {
86
+ if (input.checked && this._element.classList.contains(ClassName.ACTIVE)) {
68
87
  triggerChangeEvent = false;
69
88
  } else {
70
- var activeElement = $(rootElement).find(Selector.ACTIVE)[0];
89
+ var activeElement = rootElement.querySelector(Selector.ACTIVE);
71
90
 
72
91
  if (activeElement) {
73
92
  $(activeElement).removeClass(ClassName.ACTIVE);
@@ -80,7 +99,7 @@ var Button = function ($) {
80
99
  return;
81
100
  }
82
101
 
83
- input.checked = !$(this._element).hasClass(ClassName.ACTIVE);
102
+ input.checked = !this._element.classList.contains(ClassName.ACTIVE);
84
103
  $(input).trigger('change');
85
104
  }
86
105
 
@@ -90,7 +109,7 @@ var Button = function ($) {
90
109
  }
91
110
 
92
111
  if (addAriaPressed) {
93
- this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE));
112
+ this._element.setAttribute('aria-pressed', !this._element.classList.contains(ClassName.ACTIVE));
94
113
  }
95
114
 
96
115
  if (triggerChangeEvent) {
@@ -101,8 +120,8 @@ var Button = function ($) {
101
120
  _proto.dispose = function dispose() {
102
121
  $.removeData(this._element, DATA_KEY);
103
122
  this._element = null;
104
- }; // Static
105
-
123
+ } // Static
124
+ ;
106
125
 
107
126
  Button._jQueryInterface = function _jQueryInterface(config) {
108
127
  return this.each(function () {
@@ -163,4 +182,5 @@ var Button = function ($) {
163
182
  };
164
183
 
165
184
  return Button;
166
- }($);
185
+
186
+ }));