twitter-bootstrap-rails 5.1.0 → 5.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 (36) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +61 -0
  3. data/README.md +29 -613
  4. data/app/assets/javascripts/twitter/bootstrap/bootstrap.min.js +7 -0
  5. data/app/assets/javascripts/twitter/bootstrap.js +1 -12
  6. data/app/assets/stylesheets/twitter-bootstrap-static/bootstrap.css +6 -0
  7. data/lib/generators/bootstrap/install/install_generator.rb +29 -8
  8. data/lib/generators/bootstrap/install/templates/application.js +1 -3
  9. data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.css +3 -4
  10. data/lib/generators/bootstrap/layout/templates/layout.html.erb +17 -60
  11. data/lib/generators/bootstrap/partial/templates/_navbar-devise.html.erb +30 -0
  12. data/lib/generators/bootstrap/partial/templates/_navbar.html.erb +16 -0
  13. data/lib/generators/bootstrap/themed/templates/_form.html.erb +16 -23
  14. data/lib/generators/bootstrap/themed/templates/index.html.erb +10 -10
  15. data/lib/generators/bootstrap/themed/templates/show.html.erb +5 -5
  16. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.erb +5 -8
  17. data/lib/twitter/bootstrap/rails/version.rb +1 -1
  18. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap.bundle.min.js +7 -0
  19. data/vendor/assets/stylesheets/twitter/bootstrap/bootstrap.min.css +6 -0
  20. data/vendor/toolkit/twitter/bootstrap/variables.less +1681 -799
  21. metadata +17 -73
  22. data/app/assets/javascripts/twitter/bootstrap/affix.js +0 -162
  23. data/app/assets/javascripts/twitter/bootstrap/alert.js +0 -94
  24. data/app/assets/javascripts/twitter/bootstrap/button.js +0 -120
  25. data/app/assets/javascripts/twitter/bootstrap/carousel.js +0 -237
  26. data/app/assets/javascripts/twitter/bootstrap/collapse.js +0 -211
  27. data/app/assets/javascripts/twitter/bootstrap/dropdown.js +0 -165
  28. data/app/assets/javascripts/twitter/bootstrap/modal.js +0 -337
  29. data/app/assets/javascripts/twitter/bootstrap/popover.js +0 -108
  30. data/app/assets/javascripts/twitter/bootstrap/scrollspy.js +0 -172
  31. data/app/assets/javascripts/twitter/bootstrap/tab.js +0 -155
  32. data/app/assets/javascripts/twitter/bootstrap/tooltip.js +0 -514
  33. data/app/assets/javascripts/twitter/bootstrap/transition.js +0 -59
  34. data/app/assets/javascripts/twitter/bootstrap_ujs.js +0 -11
  35. data/app/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +0 -1
  36. data/app/assets/stylesheets/twitter-bootstrap-static/sprites.css.erb +0 -1
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitter-bootstrap-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.0
4
+ version: 5.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seyhun Akyurek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-05-29 00:00:00.000000000 Z
11
+ date: 2026-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -54,22 +54,16 @@ dependencies:
54
54
  name: less-rails
55
55
  requirement: !ruby/object:Gem::Requirement
56
56
  requirements:
57
- - - ">="
58
- - !ruby/object:Gem::Version
59
- version: '3.0'
60
- - - "<"
57
+ - - "~>"
61
58
  - !ruby/object:Gem::Version
62
- version: '5.0'
59
+ version: '4.0'
63
60
  type: :runtime
64
61
  prerelease: false
65
62
  version_requirements: !ruby/object:Gem::Requirement
66
63
  requirements:
67
- - - ">="
68
- - !ruby/object:Gem::Version
69
- version: '3.0'
70
- - - "<"
64
+ - - "~>"
71
65
  - !ruby/object:Gem::Version
72
- version: '5.0'
66
+ version: '4.0'
73
67
  - !ruby/object:Gem::Dependency
74
68
  name: execjs
75
69
  requirement: !ruby/object:Gem::Requirement
@@ -84,56 +78,15 @@ dependencies:
84
78
  - - "~>"
85
79
  - !ruby/object:Gem::Version
86
80
  version: '2.7'
87
- - !ruby/object:Gem::Dependency
88
- name: rails
89
- requirement: !ruby/object:Gem::Requirement
90
- requirements:
91
- - - ">="
92
- - !ruby/object:Gem::Version
93
- version: 5.0.1
94
- type: :development
95
- prerelease: false
96
- version_requirements: !ruby/object:Gem::Requirement
97
- requirements:
98
- - - ">="
99
- - !ruby/object:Gem::Version
100
- version: 5.0.1
101
- - !ruby/object:Gem::Dependency
102
- name: less
103
- requirement: !ruby/object:Gem::Requirement
104
- requirements:
105
- - - "~>"
106
- - !ruby/object:Gem::Version
107
- version: '2.6'
108
- type: :development
109
- prerelease: false
110
- version_requirements: !ruby/object:Gem::Requirement
111
- requirements:
112
- - - "~>"
113
- - !ruby/object:Gem::Version
114
- version: '2.6'
115
- - !ruby/object:Gem::Dependency
116
- name: therubyracer
117
- requirement: !ruby/object:Gem::Requirement
118
- requirements:
119
- - - "~>"
120
- - !ruby/object:Gem::Version
121
- version: '0.12'
122
- type: :development
123
- prerelease: false
124
- version_requirements: !ruby/object:Gem::Requirement
125
- requirements:
126
- - - "~>"
127
- - !ruby/object:Gem::Version
128
- version: '0.12'
129
- description: twitter-bootstrap-rails project integrates Bootstrap CSS toolkit for
130
- Rails 8, 7, 6, 5, 4.x (also supports) Asset Pipeline
81
+ description: twitter-bootstrap-rails project integrates Bootstrap 5 CSS toolkit for
82
+ Rails 8, 7, 6, 5 (also supports) Asset Pipeline
131
83
  email:
132
84
  - seyhunak@gmail.com
133
85
  executables: []
134
86
  extensions: []
135
87
  extra_rdoc_files: []
136
88
  files:
89
+ - CHANGELOG.md
137
90
  - README.md
138
91
  - Rakefile
139
92
  - app/assets/fonts/glyphicons-halflings-regular.eot
@@ -142,21 +95,8 @@ files:
142
95
  - app/assets/fonts/glyphicons-halflings-regular.woff
143
96
  - app/assets/fonts/glyphicons-halflings-regular.woff2
144
97
  - app/assets/javascripts/twitter/bootstrap.js
145
- - app/assets/javascripts/twitter/bootstrap/affix.js
146
- - app/assets/javascripts/twitter/bootstrap/alert.js
147
- - app/assets/javascripts/twitter/bootstrap/button.js
148
- - app/assets/javascripts/twitter/bootstrap/carousel.js
149
- - app/assets/javascripts/twitter/bootstrap/collapse.js
150
- - app/assets/javascripts/twitter/bootstrap/dropdown.js
151
- - app/assets/javascripts/twitter/bootstrap/modal.js
152
- - app/assets/javascripts/twitter/bootstrap/popover.js
153
- - app/assets/javascripts/twitter/bootstrap/scrollspy.js
154
- - app/assets/javascripts/twitter/bootstrap/tab.js
155
- - app/assets/javascripts/twitter/bootstrap/tooltip.js
156
- - app/assets/javascripts/twitter/bootstrap/transition.js
157
- - app/assets/javascripts/twitter/bootstrap_ujs.js
158
- - app/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb
159
- - app/assets/stylesheets/twitter-bootstrap-static/sprites.css.erb
98
+ - app/assets/javascripts/twitter/bootstrap/bootstrap.min.js
99
+ - app/assets/stylesheets/twitter-bootstrap-static/bootstrap.css
160
100
  - app/helpers/badge_label_helper.rb
161
101
  - app/helpers/bootstrap_flash_helper.rb
162
102
  - app/helpers/flash_block_helper.rb
@@ -180,6 +120,8 @@ files:
180
120
  - lib/generators/bootstrap/layout/templates/layout.html.slim
181
121
  - lib/generators/bootstrap/partial/partial_generator.rb
182
122
  - lib/generators/bootstrap/partial/templates/_login.html.erb
123
+ - lib/generators/bootstrap/partial/templates/_navbar-devise.html.erb
124
+ - lib/generators/bootstrap/partial/templates/_navbar.html.erb
183
125
  - lib/generators/bootstrap/themed/templates/_form.html.erb
184
126
  - lib/generators/bootstrap/themed/templates/_form.html.haml
185
127
  - lib/generators/bootstrap/themed/templates/_form.html.slim
@@ -213,7 +155,9 @@ files:
213
155
  - spec/lib/twitter_bootstrap_rails/navbar_helper_spec.rb
214
156
  - spec/lib/twitter_bootstrap_rails/uri_state_spec.rb
215
157
  - spec/spec_helper.rb
158
+ - vendor/assets/javascripts/twitter/bootstrap/bootstrap.bundle.min.js
216
159
  - vendor/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb
160
+ - vendor/assets/stylesheets/twitter/bootstrap/bootstrap.min.css
217
161
  - vendor/static-source/bootstrap.less
218
162
  - vendor/static-source/sprites.less
219
163
  - vendor/toolkit/twitter/bootstrap/alerts.less
@@ -304,7 +248,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
304
248
  requirements:
305
249
  - - ">="
306
250
  - !ruby/object:Gem::Version
307
- version: '0'
251
+ version: '3.0'
308
252
  required_rubygems_version: !ruby/object:Gem::Requirement
309
253
  requirements:
310
254
  - - ">="
@@ -314,7 +258,7 @@ requirements: []
314
258
  rubygems_version: 3.5.16
315
259
  signing_key:
316
260
  specification_version: 4
317
- summary: Bootstrap CSS toolkit for Rails 8, 7, 6, 5, 4.x Asset Pipeline
261
+ summary: Bootstrap 5 CSS toolkit for Rails 8, 7, 6, 5 Asset Pipeline
318
262
  test_files:
319
263
  - spec/lib/breadcrumbs_spec.rb
320
264
  - spec/lib/twitter_bootstrap_rails/badge_label_helper_spec.rb
@@ -1,162 +0,0 @@
1
- /* ========================================================================
2
- * Bootstrap: affix.js v3.3.6
3
- * http://getbootstrap.com/javascript/#affix
4
- * ========================================================================
5
- * Copyright 2011-2015 Twitter, Inc.
6
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7
- * ======================================================================== */
8
-
9
-
10
- +function ($) {
11
- 'use strict';
12
-
13
- // AFFIX CLASS DEFINITION
14
- // ======================
15
-
16
- var Affix = function (element, options) {
17
- this.options = $.extend({}, Affix.DEFAULTS, options)
18
-
19
- this.$target = $(this.options.target)
20
- .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
21
- .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
22
-
23
- this.$element = $(element)
24
- this.affixed = null
25
- this.unpin = null
26
- this.pinnedOffset = null
27
-
28
- this.checkPosition()
29
- }
30
-
31
- Affix.VERSION = '3.3.6'
32
-
33
- Affix.RESET = 'affix affix-top affix-bottom'
34
-
35
- Affix.DEFAULTS = {
36
- offset: 0,
37
- target: window
38
- }
39
-
40
- Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
41
- var scrollTop = this.$target.scrollTop()
42
- var position = this.$element.offset()
43
- var targetHeight = this.$target.height()
44
-
45
- if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
46
-
47
- if (this.affixed == 'bottom') {
48
- if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
49
- return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
50
- }
51
-
52
- var initializing = this.affixed == null
53
- var colliderTop = initializing ? scrollTop : position.top
54
- var colliderHeight = initializing ? targetHeight : height
55
-
56
- if (offsetTop != null && scrollTop <= offsetTop) return 'top'
57
- if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
58
-
59
- return false
60
- }
61
-
62
- Affix.prototype.getPinnedOffset = function () {
63
- if (this.pinnedOffset) return this.pinnedOffset
64
- this.$element.removeClass(Affix.RESET).addClass('affix')
65
- var scrollTop = this.$target.scrollTop()
66
- var position = this.$element.offset()
67
- return (this.pinnedOffset = position.top - scrollTop)
68
- }
69
-
70
- Affix.prototype.checkPositionWithEventLoop = function () {
71
- setTimeout($.proxy(this.checkPosition, this), 1)
72
- }
73
-
74
- Affix.prototype.checkPosition = function () {
75
- if (!this.$element.is(':visible')) return
76
-
77
- var height = this.$element.height()
78
- var offset = this.options.offset
79
- var offsetTop = offset.top
80
- var offsetBottom = offset.bottom
81
- var scrollHeight = Math.max($(document).height(), $(document.body).height())
82
-
83
- if (typeof offset != 'object') offsetBottom = offsetTop = offset
84
- if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
85
- if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
86
-
87
- var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
88
-
89
- if (this.affixed != affix) {
90
- if (this.unpin != null) this.$element.css('top', '')
91
-
92
- var affixType = 'affix' + (affix ? '-' + affix : '')
93
- var e = $.Event(affixType + '.bs.affix')
94
-
95
- this.$element.trigger(e)
96
-
97
- if (e.isDefaultPrevented()) return
98
-
99
- this.affixed = affix
100
- this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
101
-
102
- this.$element
103
- .removeClass(Affix.RESET)
104
- .addClass(affixType)
105
- .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
106
- }
107
-
108
- if (affix == 'bottom') {
109
- this.$element.offset({
110
- top: scrollHeight - height - offsetBottom
111
- })
112
- }
113
- }
114
-
115
-
116
- // AFFIX PLUGIN DEFINITION
117
- // =======================
118
-
119
- function Plugin(option) {
120
- return this.each(function () {
121
- var $this = $(this)
122
- var data = $this.data('bs.affix')
123
- var options = typeof option == 'object' && option
124
-
125
- if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
126
- if (typeof option == 'string') data[option]()
127
- })
128
- }
129
-
130
- var old = $.fn.affix
131
-
132
- $.fn.affix = Plugin
133
- $.fn.affix.Constructor = Affix
134
-
135
-
136
- // AFFIX NO CONFLICT
137
- // =================
138
-
139
- $.fn.affix.noConflict = function () {
140
- $.fn.affix = old
141
- return this
142
- }
143
-
144
-
145
- // AFFIX DATA-API
146
- // ==============
147
-
148
- $(window).on('load', function () {
149
- $('[data-spy="affix"]').each(function () {
150
- var $spy = $(this)
151
- var data = $spy.data()
152
-
153
- data.offset = data.offset || {}
154
-
155
- if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
156
- if (data.offsetTop != null) data.offset.top = data.offsetTop
157
-
158
- Plugin.call($spy, data)
159
- })
160
- })
161
-
162
- }(jQuery);
@@ -1,94 +0,0 @@
1
- /* ========================================================================
2
- * Bootstrap: alert.js v3.3.6
3
- * http://getbootstrap.com/javascript/#alerts
4
- * ========================================================================
5
- * Copyright 2011-2015 Twitter, Inc.
6
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7
- * ======================================================================== */
8
-
9
-
10
- +function ($) {
11
- 'use strict';
12
-
13
- // ALERT CLASS DEFINITION
14
- // ======================
15
-
16
- var dismiss = '[data-dismiss="alert"]'
17
- var Alert = function (el) {
18
- $(el).on('click', dismiss, this.close)
19
- }
20
-
21
- Alert.VERSION = '3.3.6'
22
-
23
- Alert.TRANSITION_DURATION = 150
24
-
25
- Alert.prototype.close = function (e) {
26
- var $this = $(this)
27
- var selector = $this.attr('data-target')
28
-
29
- if (!selector) {
30
- selector = $this.attr('href')
31
- selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
32
- }
33
-
34
- var $parent = $(selector)
35
-
36
- if (e) e.preventDefault()
37
-
38
- if (!$parent.length) {
39
- $parent = $this.closest('.alert')
40
- }
41
-
42
- $parent.trigger(e = $.Event('close.bs.alert'))
43
-
44
- if (e.isDefaultPrevented()) return
45
-
46
- $parent.removeClass('in')
47
-
48
- function removeElement() {
49
- // detach from parent, fire event then clean up data
50
- $parent.detach().trigger('closed.bs.alert').remove()
51
- }
52
-
53
- $.support.transition && $parent.hasClass('fade') ?
54
- $parent
55
- .one('bsTransitionEnd', removeElement)
56
- .emulateTransitionEnd(Alert.TRANSITION_DURATION) :
57
- removeElement()
58
- }
59
-
60
-
61
- // ALERT PLUGIN DEFINITION
62
- // =======================
63
-
64
- function Plugin(option) {
65
- return this.each(function () {
66
- var $this = $(this)
67
- var data = $this.data('bs.alert')
68
-
69
- if (!data) $this.data('bs.alert', (data = new Alert(this)))
70
- if (typeof option == 'string') data[option].call($this)
71
- })
72
- }
73
-
74
- var old = $.fn.alert
75
-
76
- $.fn.alert = Plugin
77
- $.fn.alert.Constructor = Alert
78
-
79
-
80
- // ALERT NO CONFLICT
81
- // =================
82
-
83
- $.fn.alert.noConflict = function () {
84
- $.fn.alert = old
85
- return this
86
- }
87
-
88
-
89
- // ALERT DATA-API
90
- // ==============
91
-
92
- $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
93
-
94
- }(jQuery);
@@ -1,120 +0,0 @@
1
- /* ========================================================================
2
- * Bootstrap: button.js v3.3.6
3
- * http://getbootstrap.com/javascript/#buttons
4
- * ========================================================================
5
- * Copyright 2011-2015 Twitter, Inc.
6
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7
- * ======================================================================== */
8
-
9
-
10
- +function ($) {
11
- 'use strict';
12
-
13
- // BUTTON PUBLIC CLASS DEFINITION
14
- // ==============================
15
-
16
- var Button = function (element, options) {
17
- this.$element = $(element)
18
- this.options = $.extend({}, Button.DEFAULTS, options)
19
- this.isLoading = false
20
- }
21
-
22
- Button.VERSION = '3.3.6'
23
-
24
- Button.DEFAULTS = {
25
- loadingText: 'loading...'
26
- }
27
-
28
- Button.prototype.setState = function (state) {
29
- var d = 'disabled'
30
- var $el = this.$element
31
- var val = $el.is('input') ? 'val' : 'html'
32
- var data = $el.data()
33
-
34
- state += 'Text'
35
-
36
- if (data.resetText == null) $el.data('resetText', $el[val]())
37
-
38
- // push to event loop to allow forms to submit
39
- setTimeout($.proxy(function () {
40
- $el[val](data[state] == null ? this.options[state] : data[state])
41
-
42
- if (state == 'loadingText') {
43
- this.isLoading = true
44
- $el.addClass(d).attr(d, d)
45
- } else if (this.isLoading) {
46
- this.isLoading = false
47
- $el.removeClass(d).removeAttr(d)
48
- }
49
- }, this), 0)
50
- }
51
-
52
- Button.prototype.toggle = function () {
53
- var changed = true
54
- var $parent = this.$element.closest('[data-toggle="buttons"]')
55
-
56
- if ($parent.length) {
57
- var $input = this.$element.find('input')
58
- if ($input.prop('type') == 'radio') {
59
- if ($input.prop('checked')) changed = false
60
- $parent.find('.active').removeClass('active')
61
- this.$element.addClass('active')
62
- } else if ($input.prop('type') == 'checkbox') {
63
- if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
64
- this.$element.toggleClass('active')
65
- }
66
- $input.prop('checked', this.$element.hasClass('active'))
67
- if (changed) $input.trigger('change')
68
- } else {
69
- this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
70
- this.$element.toggleClass('active')
71
- }
72
- }
73
-
74
-
75
- // BUTTON PLUGIN DEFINITION
76
- // ========================
77
-
78
- function Plugin(option) {
79
- return this.each(function () {
80
- var $this = $(this)
81
- var data = $this.data('bs.button')
82
- var options = typeof option == 'object' && option
83
-
84
- if (!data) $this.data('bs.button', (data = new Button(this, options)))
85
-
86
- if (option == 'toggle') data.toggle()
87
- else if (option) data.setState(option)
88
- })
89
- }
90
-
91
- var old = $.fn.button
92
-
93
- $.fn.button = Plugin
94
- $.fn.button.Constructor = Button
95
-
96
-
97
- // BUTTON NO CONFLICT
98
- // ==================
99
-
100
- $.fn.button.noConflict = function () {
101
- $.fn.button = old
102
- return this
103
- }
104
-
105
-
106
- // BUTTON DATA-API
107
- // ===============
108
-
109
- $(document)
110
- .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
111
- var $btn = $(e.target)
112
- if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
113
- Plugin.call($btn, 'toggle')
114
- if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault()
115
- })
116
- .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
117
- $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
118
- })
119
-
120
- }(jQuery);