bootstrap 4.0.0.alpha2 → 4.6.2.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 (155) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +18 -3
  3. data/CHANGELOG.md +22 -0
  4. data/Gemfile +2 -4
  5. data/LICENSE +1 -1
  6. data/README.md +38 -64
  7. data/Rakefile +30 -13
  8. data/assets/javascripts/bootstrap/alert.js +134 -139
  9. data/assets/javascripts/bootstrap/button.js +173 -116
  10. data/assets/javascripts/bootstrap/carousel.js +498 -333
  11. data/assets/javascripts/bootstrap/collapse.js +285 -252
  12. data/assets/javascripts/bootstrap/dropdown.js +461 -194
  13. data/assets/javascripts/bootstrap/modal.js +507 -380
  14. data/assets/javascripts/bootstrap/popover.js +164 -120
  15. data/assets/javascripts/bootstrap/scrollspy.js +244 -226
  16. data/assets/javascripts/bootstrap/tab.js +193 -193
  17. data/assets/javascripts/bootstrap/toast.js +267 -0
  18. data/assets/javascripts/bootstrap/tooltip.js +683 -413
  19. data/assets/javascripts/bootstrap/util.js +116 -83
  20. data/assets/javascripts/bootstrap-sprockets.js +3 -2
  21. data/assets/javascripts/bootstrap.js +3389 -2594
  22. data/assets/javascripts/bootstrap.min.js +5 -6
  23. data/assets/stylesheets/_bootstrap-grid.scss +23 -55
  24. data/assets/stylesheets/_bootstrap-reboot.scss +9 -7
  25. data/assets/stylesheets/_bootstrap.scss +11 -23
  26. data/assets/stylesheets/bootstrap/_alert.scss +13 -26
  27. data/assets/stylesheets/bootstrap/_badge.scss +54 -0
  28. data/assets/stylesheets/bootstrap/_breadcrumb.scss +30 -11
  29. data/assets/stylesheets/bootstrap/_button-group.scss +70 -131
  30. data/assets/stylesheets/bootstrap/_buttons.scss +60 -91
  31. data/assets/stylesheets/bootstrap/_card.scss +157 -169
  32. data/assets/stylesheets/bootstrap/_carousel.scss +127 -179
  33. data/assets/stylesheets/bootstrap/_close.scss +20 -8
  34. data/assets/stylesheets/bootstrap/_code.scss +15 -25
  35. data/assets/stylesheets/bootstrap/_custom-forms.scss +433 -132
  36. data/assets/stylesheets/bootstrap/_dropdown.scss +136 -137
  37. data/assets/stylesheets/bootstrap/_forms.scss +186 -293
  38. data/assets/stylesheets/bootstrap/_functions.scss +190 -0
  39. data/assets/stylesheets/bootstrap/_grid.scss +48 -51
  40. data/assets/stylesheets/bootstrap/_images.scss +7 -18
  41. data/assets/stylesheets/bootstrap/_input-group.scss +162 -132
  42. data/assets/stylesheets/bootstrap/_jumbotron.scss +3 -8
  43. data/assets/stylesheets/bootstrap/_list-group.scss +107 -81
  44. data/assets/stylesheets/bootstrap/_media.scss +5 -87
  45. data/assets/stylesheets/bootstrap/_mixins.scss +13 -20
  46. data/assets/stylesheets/bootstrap/_modal.scss +150 -56
  47. data/assets/stylesheets/bootstrap/_nav.scss +58 -90
  48. data/assets/stylesheets/bootstrap/_navbar.scss +238 -136
  49. data/assets/stylesheets/bootstrap/_pagination.scss +50 -58
  50. data/assets/stylesheets/bootstrap/_popover.scss +128 -98
  51. data/assets/stylesheets/bootstrap/_print.scss +110 -66
  52. data/assets/stylesheets/bootstrap/_progress.scss +38 -147
  53. data/assets/stylesheets/bootstrap/_reboot.scss +290 -133
  54. data/assets/stylesheets/bootstrap/_root.scss +19 -0
  55. data/assets/stylesheets/bootstrap/_spinners.scss +65 -0
  56. data/assets/stylesheets/bootstrap/_tables.scss +83 -91
  57. data/assets/stylesheets/bootstrap/_toasts.scss +46 -0
  58. data/assets/stylesheets/bootstrap/_tooltip.scss +79 -49
  59. data/assets/stylesheets/bootstrap/_transitions.scss +26 -0
  60. data/assets/stylesheets/bootstrap/_type.scss +39 -78
  61. data/assets/stylesheets/bootstrap/_utilities.scss +18 -86
  62. data/assets/stylesheets/bootstrap/_variables.scss +911 -396
  63. data/assets/stylesheets/bootstrap/mixins/_alert.scss +5 -6
  64. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +15 -5
  65. data/assets/stylesheets/bootstrap/mixins/_badge.scss +17 -0
  66. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +51 -10
  67. data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +20 -0
  68. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +57 -20
  69. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +72 -62
  70. data/assets/stylesheets/bootstrap/mixins/_caret.scss +62 -0
  71. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +2 -2
  72. data/assets/stylesheets/bootstrap/mixins/_deprecate.scss +10 -0
  73. data/assets/stylesheets/bootstrap/mixins/_float.scss +14 -0
  74. data/assets/stylesheets/bootstrap/mixins/_forms.scss +174 -68
  75. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +17 -15
  76. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +57 -21
  77. data/assets/stylesheets/bootstrap/mixins/_grid.scss +42 -48
  78. data/assets/stylesheets/bootstrap/mixins/_hover.scss +27 -49
  79. data/assets/stylesheets/bootstrap/mixins/_image.scss +10 -8
  80. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +7 -16
  81. data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
  82. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +5 -4
  83. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +10 -12
  84. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +7 -8
  85. data/assets/stylesheets/bootstrap/mixins/_resize.scss +1 -1
  86. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +9 -7
  87. data/assets/stylesheets/bootstrap/mixins/_size.scss +1 -0
  88. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +11 -2
  89. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +9 -4
  90. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +5 -2
  91. data/assets/stylesheets/bootstrap/mixins/_text-truncate.scss +1 -1
  92. data/assets/stylesheets/bootstrap/mixins/_transition.scss +26 -0
  93. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +8 -0
  94. data/assets/stylesheets/bootstrap/utilities/_align.scss +8 -0
  95. data/assets/stylesheets/bootstrap/utilities/_background.scss +19 -0
  96. data/assets/stylesheets/bootstrap/utilities/_borders.scss +75 -0
  97. data/assets/stylesheets/bootstrap/utilities/_clearfix.scss +3 -0
  98. data/assets/stylesheets/bootstrap/utilities/_display.scss +26 -0
  99. data/assets/stylesheets/bootstrap/utilities/_embed.scss +39 -0
  100. data/assets/stylesheets/bootstrap/utilities/_flex.scss +51 -0
  101. data/assets/stylesheets/bootstrap/utilities/_float.scss +11 -0
  102. data/assets/stylesheets/bootstrap/utilities/_interactions.scss +5 -0
  103. data/assets/stylesheets/bootstrap/utilities/_overflow.scss +5 -0
  104. data/assets/stylesheets/bootstrap/utilities/_position.scss +32 -0
  105. data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +11 -0
  106. data/assets/stylesheets/bootstrap/utilities/_shadows.scss +6 -0
  107. data/assets/stylesheets/bootstrap/utilities/_sizing.scss +20 -0
  108. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +73 -0
  109. data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +19 -0
  110. data/assets/stylesheets/bootstrap/utilities/_text.scss +72 -0
  111. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +13 -0
  112. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +228 -0
  113. data/bootstrap.gemspec +7 -5
  114. data/lib/bootstrap/engine.rb +21 -0
  115. data/lib/bootstrap/version.rb +4 -2
  116. data/lib/bootstrap.rb +18 -29
  117. data/tasks/updater/js.rb +50 -10
  118. data/tasks/updater/network.rb +11 -3
  119. data/tasks/updater/scss.rb +3 -11
  120. data/test/dummy_rails/app/assets/config/manifest.js +3 -0
  121. data/test/dummy_rails/app/assets/javascripts/application.js +1 -1
  122. data/test/dummy_rails/app/assets/stylesheets/.browserslistrc +1 -0
  123. data/test/dummy_rails/config/application.rb +0 -2
  124. data/test/dummy_rails/config/boot.rb +1 -1
  125. data/test/gemfiles/rails_4_2.gemfile +3 -7
  126. data/test/gemfiles/rails_5_0.gemfile +8 -0
  127. data/test/gemfiles/rails_5_1.gemfile +8 -0
  128. data/test/gemfiles/rails_6_0.gemfile +7 -0
  129. data/test/gemfiles/rails_7_0_dartsass.gemfile +8 -0
  130. data/test/gemfiles/rails_7_0_sassc.gemfile +8 -0
  131. data/test/rails_test.rb +1 -1
  132. data/test/support/dummy_rails_integration.rb +5 -3
  133. data/test/test_helper.rb +21 -15
  134. metadata +67 -52
  135. data/assets/stylesheets/_bootstrap-flex.scss +0 -8
  136. data/assets/stylesheets/bootstrap/_animation.scss +0 -27
  137. data/assets/stylesheets/bootstrap/_labels.scss +0 -77
  138. data/assets/stylesheets/bootstrap/_normalize.scss +0 -428
  139. data/assets/stylesheets/bootstrap/_pager.scss +0 -57
  140. data/assets/stylesheets/bootstrap/_responsive-embed.scss +0 -35
  141. data/assets/stylesheets/bootstrap/_utilities-background.scss +0 -24
  142. data/assets/stylesheets/bootstrap/_utilities-responsive.scss +0 -49
  143. data/assets/stylesheets/bootstrap/_utilities-spacing.scss +0 -78
  144. data/assets/stylesheets/bootstrap/mixins/_center-block.scss +0 -7
  145. data/assets/stylesheets/bootstrap/mixins/_label.scss +0 -11
  146. data/assets/stylesheets/bootstrap/mixins/_navbar-align.scss +0 -9
  147. data/assets/stylesheets/bootstrap/mixins/_progress.scss +0 -18
  148. data/assets/stylesheets/bootstrap/mixins/_pulls.scss +0 -6
  149. data/assets/stylesheets/bootstrap/mixins/_reset-filter.scss +0 -8
  150. data/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +0 -9
  151. data/templates/project/_bootstrap-variables.scss +0 -635
  152. data/templates/project/manifest.rb +0 -18
  153. data/templates/project/styles.scss +0 -10
  154. data/test/compass_test.rb +0 -9
  155. data/test/gemfiles/rails_head.gemfile +0 -20
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 48165e912f6032a1ffaa81be3b792edd29619498
4
- data.tar.gz: e188b323e132e7cf91c52fefc6de8c45c8a4ce4b
2
+ SHA256:
3
+ metadata.gz: dd382f63309c8fbf7da627ee4990fdaeb3e9eb7f25ba5d06f77346c0dcc68de4
4
+ data.tar.gz: 2c24101f290892643a48f3d530132cca24fb35b9d05e8b19c5305056508065ac
5
5
  SHA512:
6
- metadata.gz: 408904cbdf66625a9a2f6cba4154e1e2f724d075de4fb13bddffc1723d6d02247e94fecf6a42586f97629bce8b98caf302a6d0726ade696551071be9a6cfa2b0
7
- data.tar.gz: bb6c5d70bbaca328da0d7bd5df63e2d88cec0a6490d23883d9ce34a80f60e04eff7243e548aa7b3b945aba94559ab565a352908c46830cd59ac303c86e574e30
6
+ metadata.gz: ed3113b844e211e9bd1875de399f167043a7b57c81d399fedaa9fb2a6e9b49dd01d1164c89801476bf6ccce66baf3c88fa88d086895cfc655429f14f821c6b2b
7
+ data.tar.gz: b79d08b3e67931da95f530aea47619c1eb486f7f1cf3eae873645b875f65aec62f30018fbd169a490add197037650f0f3cca4dd11de4a7b07f603bbb6c2fb0c8
data/.travis.yml CHANGED
@@ -1,10 +1,25 @@
1
1
  language: ruby
2
2
  sudo: false
3
+ addons:
4
+ apt:
5
+ packages:
6
+ - chromium-browser
3
7
  rvm:
4
- - 2.2.3
8
+ - 2.5
9
+ - 2.6
10
+ - 2.7
11
+
5
12
  gemfile:
6
13
  - test/gemfiles/rails_4_2.gemfile
7
- - test/gemfiles/rails_head.gemfile
14
+ - test/gemfiles/rails_5_0.gemfile
15
+ - test/gemfiles/rails_5_1.gemfile
16
+ - test/gemfiles/rails_6_0.gemfile
17
+
18
+ jobs:
19
+ exclude:
20
+ rvm: 2.7
21
+ gemfile: test/gemfiles/rails_4_2.gemfile
22
+
8
23
  cache: bundler
9
24
  bundler_args: --path ../../vendor/bundle --without debug
10
25
  notifications:
@@ -13,4 +28,4 @@ env:
13
28
  global:
14
29
  - VERBOSE=1
15
30
  script:
16
- bundle exec rake
31
+ bundle exec rake --trace
data/CHANGELOG.md CHANGED
@@ -5,3 +5,25 @@ The changelog only includes changes specific to the RubyGem.
5
5
 
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
+
9
+ # 4.6.2.1
10
+
11
+ * Adds support for other Sass compilers. [#278](https://github.com/twbs/bootstrap-rubygem/pull/278)
12
+
13
+ # 4.2.1
14
+
15
+ * Bootstrap rubygem now depends on SassC instead of Sass.
16
+
17
+ # 4.0.0.beta2.1
18
+
19
+ Fixes an extraneous `sourceMappingURL` in `bootstrap.js`.
20
+ [#124](https://github.com/twbs/bootstrap-rubygem/issues/124)
21
+
22
+ # 4.0.0.beta2
23
+
24
+ Compass is no longer supported. Minimum required Sass version is now v3.5.2.
25
+ [#122](https://github.com/twbs/bootstrap-rubygem/pull/122)
26
+
27
+ # 4.0.0.alpha3.1
28
+
29
+ This release corresponds to the upstream Bootstrap 4 Alpha 3.
data/Gemfile CHANGED
@@ -3,11 +3,9 @@ source 'https://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  group :development do
6
- source 'https://rails-assets.org' do
7
- gem 'rails-assets-tether', '>= 1.1.0'
8
- end
6
+ gem 'popper_js', '>= 1.12.3'
9
7
  end
10
8
 
11
9
  group :debug do
12
- gem 'byebug', platforms: [:mri_21, :mri_22], require: false
10
+ gem 'byebug', platforms: [:mri], require: false
13
11
  end
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2013-2015 Twitter, Inc
3
+ Copyright (c) 2013-2016 Twitter, Inc
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Bootstrap Ruby Gem [![Build Status](https://travis-ci.org/twbs/bootstrap-rubygem.svg?branch=master)](https://travis-ci.org/twbs/bootstrap-rubygem) [![Gem](https://img.shields.io/gem/v/bootstrap.svg)](https://rubygems.org/gems/bootstrap)
2
2
 
3
- [Bootstrap 4][bootstrap-home] ruby gem for Ruby on Rails (Sprockets) and Compass.
3
+ [Bootstrap 4][bootstrap-home] ruby gem for Ruby on Rails (Sprockets) and Hanami (formerly Lotus).
4
4
 
5
5
  For Sass versions of Bootstrap 3 and 2 see [bootstrap-sass](https://github.com/twbs/bootstrap-sass) instead.
6
6
 
@@ -9,7 +9,7 @@ For Sass versions of Bootstrap 3 and 2 see [bootstrap-sass](https://github.com/t
9
9
  Please see the appropriate guide for your environment of choice:
10
10
 
11
11
  * [Ruby on Rails 4+](#a-ruby-on-rails) or other Sprockets environment.
12
- * [Compass](#b-compass-without-rails) not on Rails.
12
+ * [Other Ruby frameworks](#b-other-ruby-frameworks) not on Rails.
13
13
 
14
14
 
15
15
  ### a. Ruby on Rails
@@ -17,9 +17,15 @@ 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.alpha1'
20
+ gem 'bootstrap', '~> 4.6.2.1'
21
21
  ```
22
22
 
23
+ This gem requires a Sass engine, so make sure you have **one** of these four gems in your Gemfile:
24
+ - [`dartsass-sprockets`](https://github.com/tablecheck/dartsass-sprockets): Dart Sass engine, recommended but only works for Ruby 2.6+ and Rails 5+
25
+ - [`dartsass-rails`](https://github.com/rails/dartsass-rails): Dart Sass engine, recommended for Rails projects that use Propshaft
26
+ - [`cssbundling-rails`](https://github.com/rails/cssbundling-rails): External Sass engine
27
+ - [`sassc-rails`](https://github.com/sass/sassc-rails): SassC engine, deprecated but compatible with Ruby 2.3+ and Rails 4
28
+
23
29
  Ensure that `sprockets-rails` is at least v2.3.2.
24
30
 
25
31
  `bundle install` and restart your server to make the files available through the pipeline.
@@ -27,10 +33,12 @@ Ensure that `sprockets-rails` is at least v2.3.2.
27
33
  Import Bootstrap styles in `app/assets/stylesheets/application.scss`:
28
34
 
29
35
  ```scss
30
- // Custom bootstrap variables must be set or import before bootstrap itself.
36
+ // Custom bootstrap variables must be set or imported *before* bootstrap.
31
37
  @import "bootstrap";
32
38
  ```
33
39
 
40
+ The available variables can be found [here](assets/stylesheets/bootstrap/_variables.scss).
41
+
34
42
  Make sure the file has `.scss` extension (or `.sass` for Sass syntax). If you have just generated a new Rails app,
35
43
  it may come with a `.css` file instead. If this file exists, it will be served instead of Sass, so rename it:
36
44
 
@@ -42,78 +50,43 @@ Then, remove all the `*= require` and `*= require_tree` statements from the Sass
42
50
 
43
51
  Do not use `*= require` in Sass or your other stylesheets will not be able to access the Bootstrap mixins and variables.
44
52
 
45
- Require Bootstrap Javascripts in `app/assets/javascripts/application.js`:
46
-
47
- ```js
48
- //= require jquery
49
- //= require bootstrap-sprockets
50
- ```
51
-
52
- While `bootstrap-sprockets` provides individual Bootstrap components for ease of debugging, you may alternatively require the concatenated `bootstrap` for faster compilation:
53
-
54
- ```js
55
- //= require jquery
56
- //= require bootstrap
57
- ```
58
-
59
- Tooltips and popovers depend on [tether][tether] for positioning.
60
- If you use them, add tether to the Gemfile:
53
+ Bootstrap JavaScript depends on jQuery.
54
+ If you're using Rails 5.1+, add the `jquery-rails` gem to your Gemfile:
61
55
 
62
56
  ```ruby
63
- source 'https://rails-assets.org' do
64
- gem 'rails-assets-tether', '>= 1.1.0'
65
- end
57
+ gem 'jquery-rails'
66
58
  ```
67
59
 
68
- Then, run `bundle`, restart the server, and require tether before bootstrap but after jQuery:
60
+ Bootstrap tooltips and popovers depend on [popper.js] for positioning.
61
+ The `bootstrap` gem already depends on the
62
+ [popper_js](https://github.com/glebm/popper_js-rubygem) gem.
63
+
64
+ Add Bootstrap dependencies and Bootstrap to your `application.js`:
69
65
 
70
66
  ```js
71
- //= require jquery
72
- //= require tether
67
+ //= require jquery3
68
+ //= require popper
73
69
  //= require bootstrap-sprockets
74
70
  ```
75
71
 
76
- ### b. Compass without Rails
77
-
78
- Install the gem:
79
-
80
- ```console
81
- $ gem install bootstrap -v 4.0.0.alpha1
82
- ```
83
-
84
- **If you have an existing Compass project:**
85
-
86
- 1. Require `bootstrap` in `config.rb`:
87
-
88
- ```ruby
89
- require 'bootstrap'
90
- ```
91
-
92
- 2. Install Bootstrap with:
93
-
94
- ```console
95
- $ bundle exec compass install bootstrap
96
- ```
97
-
98
- **If you are creating a new Compass project, you can generate it with bootstrap support:**
72
+ While `bootstrap-sprockets` provides individual Bootstrap components
73
+ for ease of debugging, you may alternatively require
74
+ the concatenated `bootstrap` for faster compilation:
99
75
 
100
- ```console
101
- $ bundle exec compass create my-new-project -r bootstrap --using bootstrap
102
- ```
103
-
104
- or, alternatively, if you're not using a Gemfile for your dependencies:
105
-
106
- ```console
107
- $ compass create my-new-project -r bootstrap --using bootstrap
76
+ ```js
77
+ //= require jquery3
78
+ //= require popper
79
+ //= require bootstrap
108
80
  ```
109
81
 
110
- This will create a new Compass project with the following files in it:
82
+ ### b. Other Ruby frameworks
111
83
 
112
- * [styles.scss](/templates/project/styles.scss) - main project Sass file, imports Bootstrap and variables.
113
- * [_bootstrap-variables.scss](/templates/project/_bootstrap-variables.scss) - all of Bootstrap variables, override them here.
84
+ If your framework uses Sprockets or Hanami,
85
+ the assets will be registered with Sprockets when the gem is required,
86
+ and you can use them as per the Rails section of the guide.
114
87
 
115
- Some bootstrap mixins may conflict with the Compass ones.
116
- If this happens, change the import order so that Compass mixins are loaded later.
88
+ Otherwise you may need to register the assets manually.
89
+ Refer to your framework's documentation on the subject.
117
90
 
118
91
  ## Configuration
119
92
 
@@ -138,6 +111,7 @@ In the application Sass file, replace `@import 'bootstrap'` with:
138
111
  @import 'bootstrap-custom';
139
112
  ```
140
113
 
141
- [bootstrap-home]: http://v4-alpha.getbootstrap.com/
114
+ [bootstrap-home]: https://getbootstrap.com
115
+ [bootstrap-variables.scss]: https://github.com/twbs/bootstrap-rubygem/blob/master/templates/project/_bootstrap-variables.scss
142
116
  [autoprefixer]: https://github.com/ai/autoprefixer
143
- [tether]: http://github.hubspot.com/tether/
117
+ [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
 
@@ -5,7 +7,8 @@ require 'rake/testtask'
5
7
  Rake::TestTask.new do |t|
6
8
  t.libs << 'test'
7
9
  t.test_files = FileList['test/**/*_test.rb']
8
- t.verbose = true
10
+ t.verbose = false
11
+ t.warning = false
9
12
  end
10
13
 
11
14
  desc 'Test all Gemfiles from test/*.gemfile'
@@ -18,13 +21,15 @@ task :test_all_gemfiles do
18
21
  env = {'BUNDLE_GEMFILE' => gemfile}
19
22
  cmd_with_env = " (#{env.map { |k, v| "export #{k}=#{Shellwords.escape v}" } * ' '}; #{cmd})"
20
23
  $stderr.puts Term::ANSIColor.cyan("Testing\n#{cmd_with_env}")
21
- PTY.spawn(env, cmd) do |r, _w, pid|
22
- begin
23
- r.each_line { |l| puts l }
24
- rescue Errno::EIO
25
- # Errno:EIO error means that the process has finished giving output.
26
- ensure
27
- ::Process.wait pid
24
+ Bundler.with_clean_env do
25
+ PTY.spawn(env, cmd) do |r, _w, pid|
26
+ begin
27
+ r.each_line { |l| puts l }
28
+ rescue Errno::EIO
29
+ # Errno:EIO error means that the process has finished giving output.
30
+ ensure
31
+ ::Process.wait pid
32
+ end
28
33
  end
29
34
  end
30
35
  [$? && $?.exitstatus == 0, cmd_with_env]
@@ -40,16 +45,28 @@ end
40
45
 
41
46
  desc 'Dumps output to a CSS file for testing'
42
47
  task :debug do
43
- require 'sass'
48
+ begin
49
+ require 'sass-embedded'
50
+ rescue LoadError
51
+ begin
52
+ require 'sassc'
53
+ rescue LoadError
54
+ raise LoadError.new("bootstrap-rubygem requires a Sass engine. Please add dartsass-sprockets or sassc-rails to your dependencies.")
55
+ end
56
+ end
44
57
  require './lib/bootstrap'
45
58
  require 'term/ansicolor'
46
59
  require 'autoprefixer-rails'
47
60
  path = Bootstrap.stylesheets_path
48
- %w(_bootstrap _bootstrap-flex _bootstrap-reboot _bootstrap-grid).each do |file|
49
- engine = Sass::Engine.for_file("#{path}/#{file}.scss", syntax: :scss, load_paths: [path])
50
- out = File.join('tmp', "#{file[1..-1]}.css")
51
- css = engine.render
61
+ %w(_bootstrap _bootstrap-reboot _bootstrap-grid).each do |file|
62
+ filename = "#{path}/#{file}.scss"
63
+ css = if defined?(SassC::Engine)
64
+ SassC::Engine.new(File.read(filename), filename: filename, syntax: :scss).render
65
+ else
66
+ Sass.compile(filename).css
67
+ end
52
68
  css = AutoprefixerRails.process(css)
69
+ out = File.join('tmp', "#{file[1..-1]}.css")
53
70
  File.write(out, css)
54
71
  $stderr.puts Term::ANSIColor.green "Compiled #{out}"
55
72
  end
@@ -1,191 +1,186 @@
1
- 'use strict';
2
-
3
- var _createClass = (function () { 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
4
-
5
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
6
-
7
- /**
8
- * --------------------------------------------------------------------------
9
- * Bootstrap (v4.0.0): alert.js
10
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
11
- * --------------------------------------------------------------------------
12
- */
1
+ /*!
2
+ * Bootstrap alert.js v4.6.2 (https://getbootstrap.com/)
3
+ * Copyright 2011-2022 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('jquery'), require('./util.js')) :
8
+ typeof define === 'function' && define.amd ? define(['jquery', './util'], factory) :
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Alert = factory(global.jQuery, global.Util));
10
+ })(this, (function ($, Util) { 'use strict';
11
+
12
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
+
14
+ var $__default = /*#__PURE__*/_interopDefaultLegacy($);
15
+ var Util__default = /*#__PURE__*/_interopDefaultLegacy(Util);
16
+
17
+ function _defineProperties(target, props) {
18
+ for (var i = 0; i < props.length; i++) {
19
+ var descriptor = props[i];
20
+ descriptor.enumerable = descriptor.enumerable || false;
21
+ descriptor.configurable = true;
22
+ if ("value" in descriptor) descriptor.writable = true;
23
+ Object.defineProperty(target, descriptor.key, descriptor);
24
+ }
25
+ }
13
26
 
14
- var Alert = (function ($) {
27
+ function _createClass(Constructor, protoProps, staticProps) {
28
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
29
+ if (staticProps) _defineProperties(Constructor, staticProps);
30
+ Object.defineProperty(Constructor, "prototype", {
31
+ writable: false
32
+ });
33
+ return Constructor;
34
+ }
15
35
 
16
36
  /**
17
- * ------------------------------------------------------------------------
18
37
  * Constants
19
- * ------------------------------------------------------------------------
20
38
  */
21
39
 
22
40
  var NAME = 'alert';
23
- var VERSION = '4.0.0';
41
+ var VERSION = '4.6.2';
24
42
  var DATA_KEY = 'bs.alert';
25
- var EVENT_KEY = '.' + DATA_KEY;
43
+ var EVENT_KEY = "." + DATA_KEY;
26
44
  var DATA_API_KEY = '.data-api';
27
- var JQUERY_NO_CONFLICT = $.fn[NAME];
28
- var TRANSITION_DURATION = 150;
29
-
30
- var Selector = {
31
- DISMISS: '[data-dismiss="alert"]'
32
- };
33
-
34
- var Event = {
35
- CLOSE: 'close' + EVENT_KEY,
36
- CLOSED: 'closed' + EVENT_KEY,
37
- CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY
38
- };
39
-
40
- var ClassName = {
41
- ALERT: 'alert',
42
- FADE: 'fade',
43
- IN: 'in'
44
- };
45
-
45
+ var JQUERY_NO_CONFLICT = $__default["default"].fn[NAME];
46
+ var CLASS_NAME_ALERT = 'alert';
47
+ var CLASS_NAME_FADE = 'fade';
48
+ var CLASS_NAME_SHOW = 'show';
49
+ var EVENT_CLOSE = "close" + EVENT_KEY;
50
+ var EVENT_CLOSED = "closed" + EVENT_KEY;
51
+ var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
52
+ var SELECTOR_DISMISS = '[data-dismiss="alert"]';
46
53
  /**
47
- * ------------------------------------------------------------------------
48
- * Class Definition
49
- * ------------------------------------------------------------------------
54
+ * Class definition
50
55
  */
51
56
 
52
- var Alert = (function () {
57
+ var Alert = /*#__PURE__*/function () {
53
58
  function Alert(element) {
54
- _classCallCheck(this, Alert);
55
-
56
59
  this._element = element;
57
- }
60
+ } // Getters
58
61
 
59
- /**
60
- * ------------------------------------------------------------------------
61
- * Data Api implementation
62
- * ------------------------------------------------------------------------
63
- */
64
62
 
65
- // getters
63
+ var _proto = Alert.prototype;
66
64
 
67
- _createClass(Alert, [{
68
- key: 'close',
65
+ // Public
66
+ _proto.close = function close(element) {
67
+ var rootElement = this._element;
69
68
 
70
- // public
69
+ if (element) {
70
+ rootElement = this._getRootElement(element);
71
+ }
72
+
73
+ var customEvent = this._triggerCloseEvent(rootElement);
71
74
 
72
- value: function close(element) {
73
- element = element || this._element;
75
+ if (customEvent.isDefaultPrevented()) {
76
+ return;
77
+ }
74
78
 
75
- var rootElement = this._getRootElement(element);
76
- var customEvent = this._triggerCloseEvent(rootElement);
79
+ this._removeElement(rootElement);
80
+ };
77
81
 
78
- if (customEvent.isDefaultPrevented()) {
79
- return;
80
- }
82
+ _proto.dispose = function dispose() {
83
+ $__default["default"].removeData(this._element, DATA_KEY);
84
+ this._element = null;
85
+ } // Private
86
+ ;
81
87
 
82
- this._removeElement(rootElement);
88
+ _proto._getRootElement = function _getRootElement(element) {
89
+ var selector = Util__default["default"].getSelectorFromElement(element);
90
+ var parent = false;
91
+
92
+ if (selector) {
93
+ parent = document.querySelector(selector);
83
94
  }
84
- }, {
85
- key: 'dispose',
86
- value: function dispose() {
87
- $.removeData(this._element, DATA_KEY);
88
- this._element = null;
95
+
96
+ if (!parent) {
97
+ parent = $__default["default"](element).closest("." + CLASS_NAME_ALERT)[0];
89
98
  }
90
99
 
91
- // private
100
+ return parent;
101
+ };
92
102
 
93
- }, {
94
- key: '_getRootElement',
95
- value: function _getRootElement(element) {
96
- var selector = Util.getSelectorFromElement(element);
97
- var parent = false;
103
+ _proto._triggerCloseEvent = function _triggerCloseEvent(element) {
104
+ var closeEvent = $__default["default"].Event(EVENT_CLOSE);
105
+ $__default["default"](element).trigger(closeEvent);
106
+ return closeEvent;
107
+ };
98
108
 
99
- if (selector) {
100
- parent = $(selector)[0];
101
- }
109
+ _proto._removeElement = function _removeElement(element) {
110
+ var _this = this;
102
111
 
103
- if (!parent) {
104
- parent = $(element).closest('.' + ClassName.ALERT)[0];
105
- }
112
+ $__default["default"](element).removeClass(CLASS_NAME_SHOW);
106
113
 
107
- return parent;
108
- }
109
- }, {
110
- key: '_triggerCloseEvent',
111
- value: function _triggerCloseEvent(element) {
112
- var closeEvent = $.Event(Event.CLOSE);
114
+ if (!$__default["default"](element).hasClass(CLASS_NAME_FADE)) {
115
+ this._destroyElement(element);
113
116
 
114
- $(element).trigger(closeEvent);
115
- return closeEvent;
117
+ return;
116
118
  }
117
- }, {
118
- key: '_removeElement',
119
- value: function _removeElement(element) {
120
- $(element).removeClass(ClassName.IN);
121
-
122
- if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) {
123
- this._destroyElement(element);
124
- return;
125
- }
126
119
 
127
- $(element).one(Util.TRANSITION_END, $.proxy(this._destroyElement, this, element)).emulateTransitionEnd(TRANSITION_DURATION);
128
- }
129
- }, {
130
- key: '_destroyElement',
131
- value: function _destroyElement(element) {
132
- $(element).detach().trigger(Event.CLOSED).remove();
133
- }
120
+ var transitionDuration = Util__default["default"].getTransitionDurationFromElement(element);
121
+ $__default["default"](element).one(Util__default["default"].TRANSITION_END, function (event) {
122
+ return _this._destroyElement(element, event);
123
+ }).emulateTransitionEnd(transitionDuration);
124
+ };
125
+
126
+ _proto._destroyElement = function _destroyElement(element) {
127
+ $__default["default"](element).detach().trigger(EVENT_CLOSED).remove();
128
+ } // Static
129
+ ;
130
+
131
+ Alert._jQueryInterface = function _jQueryInterface(config) {
132
+ return this.each(function () {
133
+ var $element = $__default["default"](this);
134
+ var data = $element.data(DATA_KEY);
135
+
136
+ if (!data) {
137
+ data = new Alert(this);
138
+ $element.data(DATA_KEY, data);
139
+ }
134
140
 
135
- // static
141
+ if (config === 'close') {
142
+ data[config](this);
143
+ }
144
+ });
145
+ };
136
146
 
137
- }], [{
138
- key: '_jQueryInterface',
139
- value: function _jQueryInterface(config) {
140
- return this.each(function () {
141
- var $element = $(this);
142
- var data = $element.data(DATA_KEY);
147
+ Alert._handleDismiss = function _handleDismiss(alertInstance) {
148
+ return function (event) {
149
+ if (event) {
150
+ event.preventDefault();
151
+ }
143
152
 
144
- if (!data) {
145
- data = new Alert(this);
146
- $element.data(DATA_KEY, data);
147
- }
153
+ alertInstance.close(this);
154
+ };
155
+ };
148
156
 
149
- if (config === 'close') {
150
- data[config](this);
151
- }
152
- });
153
- }
154
- }, {
155
- key: '_handleDismiss',
156
- value: function _handleDismiss(alertInstance) {
157
- return function (event) {
158
- if (event) {
159
- event.preventDefault();
160
- }
161
-
162
- alertInstance.close(this);
163
- };
164
- }
165
- }, {
166
- key: 'VERSION',
157
+ _createClass(Alert, null, [{
158
+ key: "VERSION",
167
159
  get: function get() {
168
160
  return VERSION;
169
161
  }
170
162
  }]);
171
163
 
172
164
  return Alert;
173
- })();
165
+ }();
166
+ /**
167
+ * Data API implementation
168
+ */
174
169
 
175
- $(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
176
170
 
171
+ $__default["default"](document).on(EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert._handleDismiss(new Alert()));
177
172
  /**
178
- * ------------------------------------------------------------------------
179
173
  * jQuery
180
- * ------------------------------------------------------------------------
181
174
  */
182
175
 
183
- $.fn[NAME] = Alert._jQueryInterface;
184
- $.fn[NAME].Constructor = Alert;
185
- $.fn[NAME].noConflict = function () {
186
- $.fn[NAME] = JQUERY_NO_CONFLICT;
176
+ $__default["default"].fn[NAME] = Alert._jQueryInterface;
177
+ $__default["default"].fn[NAME].Constructor = Alert;
178
+
179
+ $__default["default"].fn[NAME].noConflict = function () {
180
+ $__default["default"].fn[NAME] = JQUERY_NO_CONFLICT;
187
181
  return Alert._jQueryInterface;
188
182
  };
189
183
 
190
184
  return Alert;
191
- })(jQuery);
185
+
186
+ }));