bootstrap 4.0.0.alpha3 → 4.0.0.alpha3.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bootstrap might be problematic. Click here for more details.

Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -2
  3. data/CHANGELOG.md +5 -0
  4. data/LICENSE +1 -1
  5. data/README.md +3 -3
  6. data/Rakefile +11 -8
  7. data/assets/javascripts/bootstrap.js +61 -48
  8. data/assets/javascripts/bootstrap.min.js +4 -4
  9. data/assets/javascripts/bootstrap/alert.js +2 -2
  10. data/assets/javascripts/bootstrap/button.js +4 -2
  11. data/assets/javascripts/bootstrap/carousel.js +10 -6
  12. data/assets/javascripts/bootstrap/collapse.js +2 -2
  13. data/assets/javascripts/bootstrap/dropdown.js +12 -8
  14. data/assets/javascripts/bootstrap/modal.js +9 -12
  15. data/assets/javascripts/bootstrap/popover.js +2 -2
  16. data/assets/javascripts/bootstrap/scrollspy.js +4 -3
  17. data/assets/javascripts/bootstrap/tab.js +2 -2
  18. data/assets/javascripts/bootstrap/tooltip.js +2 -2
  19. data/assets/javascripts/bootstrap/util.js +8 -3
  20. data/assets/stylesheets/_bootstrap-grid.scss +2 -41
  21. data/assets/stylesheets/_bootstrap-reboot.scss +1 -0
  22. data/assets/stylesheets/_bootstrap.scss +5 -7
  23. data/assets/stylesheets/bootstrap/_alert.scss +1 -10
  24. data/assets/stylesheets/bootstrap/_breadcrumb.scss +25 -10
  25. data/assets/stylesheets/bootstrap/_button-group.scss +22 -12
  26. data/assets/stylesheets/bootstrap/_buttons.scss +14 -11
  27. data/assets/stylesheets/bootstrap/_card.scss +59 -30
  28. data/assets/stylesheets/bootstrap/_carousel.scss +25 -24
  29. data/assets/stylesheets/bootstrap/_close.scss +3 -0
  30. data/assets/stylesheets/bootstrap/_code.scss +6 -7
  31. data/assets/stylesheets/bootstrap/_custom-forms.scss +144 -105
  32. data/assets/stylesheets/bootstrap/_custom.scss +4 -0
  33. data/assets/stylesheets/bootstrap/_dropdown.scss +10 -24
  34. data/assets/stylesheets/bootstrap/_forms.scss +97 -185
  35. data/assets/stylesheets/bootstrap/_grid.scss +9 -46
  36. data/assets/stylesheets/bootstrap/_images.scss +3 -4
  37. data/assets/stylesheets/bootstrap/_input-group.scss +25 -26
  38. data/assets/stylesheets/bootstrap/_list-group.scss +33 -50
  39. data/assets/stylesheets/bootstrap/_media.scss +4 -5
  40. data/assets/stylesheets/bootstrap/_mixins.scss +1 -2
  41. data/assets/stylesheets/bootstrap/_modal.scss +13 -27
  42. data/assets/stylesheets/bootstrap/_nav.scss +18 -23
  43. data/assets/stylesheets/bootstrap/_navbar.scss +54 -26
  44. data/assets/stylesheets/bootstrap/_normalize.scss +164 -168
  45. data/assets/stylesheets/bootstrap/_pagination.scss +1 -1
  46. data/assets/stylesheets/bootstrap/_popover.scss +12 -5
  47. data/assets/stylesheets/bootstrap/_print.scss +93 -65
  48. data/assets/stylesheets/bootstrap/_progress.scss +43 -54
  49. data/assets/stylesheets/bootstrap/_reboot.scss +59 -13
  50. data/assets/stylesheets/bootstrap/_tables.scss +32 -27
  51. data/assets/stylesheets/bootstrap/_tags.scss +77 -0
  52. data/assets/stylesheets/bootstrap/_tooltip.scss +7 -5
  53. data/assets/stylesheets/bootstrap/_type.scss +22 -29
  54. data/assets/stylesheets/bootstrap/_utilities.scss +9 -95
  55. data/assets/stylesheets/bootstrap/_variables.scss +302 -139
  56. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +1 -1
  57. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +22 -9
  58. data/assets/stylesheets/bootstrap/mixins/_cards.scss +8 -2
  59. data/assets/stylesheets/bootstrap/mixins/_forms.scss +7 -4
  60. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +4 -4
  61. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +37 -11
  62. data/assets/stylesheets/bootstrap/mixins/_grid.scss +18 -9
  63. data/assets/stylesheets/bootstrap/mixins/_hover.scss +10 -9
  64. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +2 -3
  65. data/assets/stylesheets/bootstrap/mixins/_progress.scss +5 -0
  66. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +2 -3
  67. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +1 -1
  68. data/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +3 -3
  69. data/assets/stylesheets/bootstrap/mixins/{_label.scss → _tag.scss} +2 -2
  70. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +1 -1
  71. data/assets/stylesheets/bootstrap/{_utilities-background.scss → utilities/_background.scss} +1 -4
  72. data/assets/stylesheets/bootstrap/utilities/_clearfix.scss +3 -0
  73. data/assets/stylesheets/bootstrap/utilities/_display.scss +13 -0
  74. data/assets/stylesheets/bootstrap/utilities/_flex.scss +37 -0
  75. data/assets/stylesheets/bootstrap/utilities/_pulls.scss +13 -0
  76. data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +11 -0
  77. data/assets/stylesheets/bootstrap/{_utilities-spacing.scss → utilities/_spacing.scss} +4 -0
  78. data/assets/stylesheets/bootstrap/utilities/_text.scss +51 -0
  79. data/assets/stylesheets/bootstrap/{_utilities-responsive.scss → utilities/_visibility.scss} +9 -1
  80. data/bootstrap.gemspec +1 -1
  81. data/lib/bootstrap.rb +6 -6
  82. data/lib/bootstrap/engine.rb +2 -0
  83. data/lib/bootstrap/version.rb +2 -2
  84. data/tasks/updater/network.rb +3 -1
  85. data/templates/project/_bootstrap-variables.scss +303 -140
  86. data/test/dummy_rails/config/boot.rb +1 -1
  87. data/test/gemfiles/rails_4_2.gemfile +4 -4
  88. data/test/gemfiles/rails_5_0.gemfile +12 -0
  89. data/test/rails_test.rb +1 -1
  90. data/test/support/dummy_rails_integration.rb +2 -2
  91. metadata +19 -14
  92. data/assets/stylesheets/bootstrap/_labels.scss +0 -77
  93. data/assets/stylesheets/bootstrap/_pager.scss +0 -57
  94. data/assets/stylesheets/bootstrap/mixins/_center-block.scss +0 -7
  95. data/test/gemfiles/rails_head.gemfile +0 -20
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 917289ad9d4851dcf6bc05bb81334abe4a741a9c
4
- data.tar.gz: a91f57664c628b38d67103edaa2ac1a1b375fb1c
3
+ metadata.gz: 983d9e6a81bea1a6cc6ec48d9c1e628af3bceb94
4
+ data.tar.gz: 949e826312380d235b20426c54fd577f481bb610
5
5
  SHA512:
6
- metadata.gz: b0bf1f56af76bb796ba0551c17af2a52208eb53da812a754abfd822b0ed5e8f025e654fb4ababed39661b8f47df254f596925fee6f99c1ab32ce24f4657b510e
7
- data.tar.gz: 72df1e6be481c3b84a00c601825fc61a15a6c975a611a9880277e55e1dae9655d93ecdb2f92f8a8dc6c74cbe90f44797fa4a4277644d2b9f176d16823d68d7a1
6
+ metadata.gz: 4594a062c9f6d9b7f8fbaad1b1e2d938947c0890b4005a733817704ffb16efc2e0e0edf001f9c35b5c37bed1dbd758cad1e29cf1ba47089fa916372e45f86b60
7
+ data.tar.gz: b742ec7493451d7681b7f097c2a1894ab70d7b58b5133fdf1f118da57816ef1e400817242974bc0585e383c790366ae59a2ffeb954ba4c40359793889b7969af
@@ -1,10 +1,10 @@
1
1
  language: ruby
2
2
  sudo: false
3
3
  rvm:
4
- - 2.2.3
4
+ - 2.2.4
5
5
  gemfile:
6
6
  - test/gemfiles/rails_4_2.gemfile
7
- - test/gemfiles/rails_head.gemfile
7
+ - test/gemfiles/rails_5_0.gemfile
8
8
  cache: bundler
9
9
  bundler_args: --path ../../vendor/bundle --without debug
10
10
  notifications:
@@ -5,3 +5,8 @@ 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
+
10
+ # 4.0.0.alpha3.1
11
+
12
+ This release corresponds to the upstream Bootstrap 4 Alpha 3.
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
@@ -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.alpha3'
20
+ gem 'bootstrap', '~> 4.0.0.alpha3.1'
21
21
  ```
22
22
 
23
23
  Ensure that `sprockets-rails` is at least v2.3.2.
@@ -27,7 +27,7 @@ Ensure that `sprockets-rails` is at least v2.3.2.
27
27
  Import Bootstrap styles in `app/assets/stylesheets/application.scss`:
28
28
 
29
29
  ```scss
30
- // Custom bootstrap variables must be set or import before bootstrap itself.
30
+ // Custom bootstrap variables must be set or imported before bootstrap itself.
31
31
  @import "bootstrap";
32
32
  ```
33
33
 
@@ -78,7 +78,7 @@ Then, run `bundle`, restart the server, and require tether before bootstrap but
78
78
  Install the gem:
79
79
 
80
80
  ```console
81
- $ gem install bootstrap -v 4.0.0.alpha1
81
+ $ gem install bootstrap -v 4.0.0.alpha3.1
82
82
  ```
83
83
 
84
84
  **If you have an existing Compass project:**
data/Rakefile CHANGED
@@ -5,7 +5,8 @@ require 'rake/testtask'
5
5
  Rake::TestTask.new do |t|
6
6
  t.libs << 'test'
7
7
  t.test_files = FileList['test/**/*_test.rb']
8
- t.verbose = true
8
+ t.verbose = false
9
+ t.warning = false
9
10
  end
10
11
 
11
12
  desc 'Test all Gemfiles from test/*.gemfile'
@@ -18,13 +19,15 @@ task :test_all_gemfiles do
18
19
  env = {'BUNDLE_GEMFILE' => gemfile}
19
20
  cmd_with_env = " (#{env.map { |k, v| "export #{k}=#{Shellwords.escape v}" } * ' '}; #{cmd})"
20
21
  $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
22
+ Bundler.with_clean_env do
23
+ PTY.spawn(env, cmd) do |r, _w, pid|
24
+ begin
25
+ r.each_line { |l| puts l }
26
+ rescue Errno::EIO
27
+ # Errno:EIO error means that the process has finished giving output.
28
+ ensure
29
+ ::Process.wait pid
30
+ end
28
31
  end
29
32
  end
30
33
  [$? && $?.exitstatus == 0, cmd_with_env]
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * Bootstrap v4.0.0-alpha.2 (http://getbootstrap.com)
3
- * Copyright 2011-2015 Twitter, Inc.
2
+ * Bootstrap v4.0.0-alpha.3 (http://getbootstrap.com)
3
+ * Copyright 2011-2016 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
4
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5
5
  */
6
6
 
@@ -10,8 +10,8 @@ if (typeof jQuery === 'undefined') {
10
10
 
11
11
  +function ($) {
12
12
  var version = $.fn.jquery.split(' ')[0].split('.')
13
- if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] >= 3)) {
14
- throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v3.0.0')
13
+ if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] >= 4)) {
14
+ throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0')
15
15
  }
16
16
  }(jQuery);
17
17
 
@@ -20,7 +20,7 @@ if (typeof jQuery === 'undefined') {
20
20
 
21
21
  /**
22
22
  * --------------------------------------------------------------------------
23
- * Bootstrap (v4.0.0-alpha.2): util.js
23
+ * Bootstrap (v4.0.0-alpha.3): util.js
24
24
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
25
25
  * --------------------------------------------------------------------------
26
26
  */
@@ -45,6 +45,8 @@ var Util = (function ($) {
45
45
 
46
46
  var transition = false;
47
47
 
48
+ var MAX_UID = 1000000;
49
+
48
50
  var TransitionEndEvent = {
49
51
  WebkitTransition: 'webkitTransitionEnd',
50
52
  MozTransition: 'transitionend',
@@ -67,8 +69,9 @@ var Util = (function ($) {
67
69
  delegateType: transition.end,
68
70
  handle: function handle(event) {
69
71
  if ($(event.target).is(this)) {
70
- return event.handleObj.handler.apply(this, arguments);
72
+ return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
71
73
  }
74
+ return undefined;
72
75
  }
73
76
  };
74
77
  }
@@ -129,7 +132,9 @@ var Util = (function ($) {
129
132
 
130
133
  getUID: function getUID(prefix) {
131
134
  do {
132
- prefix += ~ ~(Math.random() * 1000000); // "~~" acts like a faster Math.floor() here
135
+ /* eslint-disable no-bitwise */
136
+ prefix += ~ ~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
137
+ /* eslint-enable no-bitwise */
133
138
  } while (document.getElementById(prefix));
134
139
  return prefix;
135
140
  },
@@ -185,7 +190,7 @@ var Util = (function ($) {
185
190
 
186
191
  /**
187
192
  * --------------------------------------------------------------------------
188
- * Bootstrap (v4.0.0-alpha.2): alert.js
193
+ * Bootstrap (v4.0.0-alpha.3): alert.js
189
194
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
190
195
  * --------------------------------------------------------------------------
191
196
  */
@@ -199,7 +204,7 @@ var Alert = (function ($) {
199
204
  */
200
205
 
201
206
  var NAME = 'alert';
202
- var VERSION = '4.0.0-alpha';
207
+ var VERSION = '4.0.0-alpha.3';
203
208
  var DATA_KEY = 'bs.alert';
204
209
  var EVENT_KEY = '.' + DATA_KEY;
205
210
  var DATA_API_KEY = '.data-api';
@@ -371,7 +376,7 @@ var Alert = (function ($) {
371
376
 
372
377
  /**
373
378
  * --------------------------------------------------------------------------
374
- * Bootstrap (v4.0.0-alpha.2): button.js
379
+ * Bootstrap (v4.0.0-alpha.3): button.js
375
380
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
376
381
  * --------------------------------------------------------------------------
377
382
  */
@@ -385,7 +390,7 @@ var Button = (function ($) {
385
390
  */
386
391
 
387
392
  var NAME = 'button';
388
- var VERSION = '4.0.0-alpha';
393
+ var VERSION = '4.0.0-alpha.3';
389
394
  var DATA_KEY = 'bs.button';
390
395
  var EVENT_KEY = '.' + DATA_KEY;
391
396
  var DATA_API_KEY = '.data-api';
@@ -460,6 +465,8 @@ var Button = (function ($) {
460
465
  input.checked = !$(this._element).hasClass(ClassName.ACTIVE);
461
466
  $(this._element).trigger('change');
462
467
  }
468
+
469
+ input.focus();
463
470
  }
464
471
  } else {
465
472
  this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE));
@@ -537,7 +544,7 @@ var Button = (function ($) {
537
544
 
538
545
  /**
539
546
  * --------------------------------------------------------------------------
540
- * Bootstrap (v4.0.0-alpha.2): carousel.js
547
+ * Bootstrap (v4.0.0-alpha.3): carousel.js
541
548
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
542
549
  * --------------------------------------------------------------------------
543
550
  */
@@ -551,12 +558,14 @@ var Carousel = (function ($) {
551
558
  */
552
559
 
553
560
  var NAME = 'carousel';
554
- var VERSION = '4.0.0-alpha';
561
+ var VERSION = '4.0.0-alpha.3';
555
562
  var DATA_KEY = 'bs.carousel';
556
563
  var EVENT_KEY = '.' + DATA_KEY;
557
564
  var DATA_API_KEY = '.data-api';
558
565
  var JQUERY_NO_CONFLICT = $.fn[NAME];
559
566
  var TRANSITION_DURATION = 600;
567
+ var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
568
+ var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
560
569
 
561
570
  var Default = {
562
571
  interval: 5000,
@@ -772,10 +781,12 @@ var Carousel = (function ($) {
772
781
  }
773
782
 
774
783
  switch (event.which) {
775
- case 37:
776
- this.prev();break;
777
- case 39:
778
- this.next();break;
784
+ case ARROW_LEFT_KEYCODE:
785
+ this.prev();
786
+ break;
787
+ case ARROW_RIGHT_KEYCODE:
788
+ this.next();
789
+ break;
779
790
  default:
780
791
  return;
781
792
  }
@@ -1009,7 +1020,7 @@ var Carousel = (function ($) {
1009
1020
 
1010
1021
  /**
1011
1022
  * --------------------------------------------------------------------------
1012
- * Bootstrap (v4.0.0-alpha.2): collapse.js
1023
+ * Bootstrap (v4.0.0-alpha.3): collapse.js
1013
1024
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1014
1025
  * --------------------------------------------------------------------------
1015
1026
  */
@@ -1023,7 +1034,7 @@ var Collapse = (function ($) {
1023
1034
  */
1024
1035
 
1025
1036
  var NAME = 'collapse';
1026
- var VERSION = '4.0.0-alpha';
1037
+ var VERSION = '4.0.0-alpha.3';
1027
1038
  var DATA_KEY = 'bs.collapse';
1028
1039
  var EVENT_KEY = '.' + DATA_KEY;
1029
1040
  var DATA_API_KEY = '.data-api';
@@ -1367,7 +1378,7 @@ var Collapse = (function ($) {
1367
1378
 
1368
1379
  /**
1369
1380
  * --------------------------------------------------------------------------
1370
- * Bootstrap (v4.0.0-alpha.2): dropdown.js
1381
+ * Bootstrap (v4.0.0-alpha.3): dropdown.js
1371
1382
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1372
1383
  * --------------------------------------------------------------------------
1373
1384
  */
@@ -1381,11 +1392,15 @@ var Dropdown = (function ($) {
1381
1392
  */
1382
1393
 
1383
1394
  var NAME = 'dropdown';
1384
- var VERSION = '4.0.0-alpha';
1395
+ var VERSION = '4.0.0-alpha.3';
1385
1396
  var DATA_KEY = 'bs.dropdown';
1386
1397
  var EVENT_KEY = '.' + DATA_KEY;
1387
1398
  var DATA_API_KEY = '.data-api';
1388
1399
  var JQUERY_NO_CONFLICT = $.fn[NAME];
1400
+ var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
1401
+ var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key
1402
+ var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key
1403
+ var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)
1389
1404
 
1390
1405
  var Event = {
1391
1406
  HIDE: 'hide' + EVENT_KEY,
@@ -1520,7 +1535,7 @@ var Dropdown = (function ($) {
1520
1535
  }, {
1521
1536
  key: '_clearMenus',
1522
1537
  value: function _clearMenus(event) {
1523
- if (event && event.which === 3) {
1538
+ if (event && event.which === RIGHT_MOUSE_BUTTON_WHICH) {
1524
1539
  return;
1525
1540
  }
1526
1541
 
@@ -1583,9 +1598,9 @@ var Dropdown = (function ($) {
1583
1598
  var parent = Dropdown._getParentFromElement(this);
1584
1599
  var isActive = $(parent).hasClass(ClassName.OPEN);
1585
1600
 
1586
- if (!isActive && event.which !== 27 || isActive && event.which === 27) {
1601
+ if (!isActive && event.which !== ESCAPE_KEYCODE || isActive && event.which === ESCAPE_KEYCODE) {
1587
1602
 
1588
- if (event.which === 27) {
1603
+ if (event.which === ESCAPE_KEYCODE) {
1589
1604
  var toggle = $(parent).find(Selector.DATA_TOGGLE)[0];
1590
1605
  $(toggle).trigger('focus');
1591
1606
  }
@@ -1606,17 +1621,17 @@ var Dropdown = (function ($) {
1606
1621
 
1607
1622
  var index = items.indexOf(event.target);
1608
1623
 
1609
- if (event.which === 38 && index > 0) {
1624
+ if (event.which === ARROW_UP_KEYCODE && index > 0) {
1610
1625
  // up
1611
1626
  index--;
1612
1627
  }
1613
1628
 
1614
- if (event.which === 40 && index < items.length - 1) {
1629
+ if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) {
1615
1630
  // down
1616
1631
  index++;
1617
1632
  }
1618
1633
 
1619
- if (! ~index) {
1634
+ if (index < 0) {
1620
1635
  index = 0;
1621
1636
  }
1622
1637
 
@@ -1654,7 +1669,7 @@ var Dropdown = (function ($) {
1654
1669
 
1655
1670
  /**
1656
1671
  * --------------------------------------------------------------------------
1657
- * Bootstrap (v4.0.0-alpha.2): modal.js
1672
+ * Bootstrap (v4.0.0-alpha.3): modal.js
1658
1673
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1659
1674
  * --------------------------------------------------------------------------
1660
1675
  */
@@ -1668,13 +1683,14 @@ var Modal = (function ($) {
1668
1683
  */
1669
1684
 
1670
1685
  var NAME = 'modal';
1671
- var VERSION = '4.0.0-alpha';
1686
+ var VERSION = '4.0.0-alpha.3';
1672
1687
  var DATA_KEY = 'bs.modal';
1673
1688
  var EVENT_KEY = '.' + DATA_KEY;
1674
1689
  var DATA_API_KEY = '.data-api';
1675
1690
  var JQUERY_NO_CONFLICT = $.fn[NAME];
1676
1691
  var TRANSITION_DURATION = 300;
1677
1692
  var BACKDROP_TRANSITION_DURATION = 150;
1693
+ var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key
1678
1694
 
1679
1695
  var Default = {
1680
1696
  backdrop: true,
@@ -1870,6 +1886,7 @@ var Modal = (function ($) {
1870
1886
  }
1871
1887
 
1872
1888
  this._element.style.display = 'block';
1889
+ this._element.removeAttribute('aria-hidden');
1873
1890
  this._element.scrollTop = 0;
1874
1891
 
1875
1892
  if (transition) {
@@ -1906,7 +1923,7 @@ var Modal = (function ($) {
1906
1923
 
1907
1924
  $(document).off(Event.FOCUSIN) // guard against infinite focus loop
1908
1925
  .on(Event.FOCUSIN, function (event) {
1909
- if (_this9._element !== event.target && !$(_this9._element).has(event.target).length) {
1926
+ if (document !== event.target && _this9._element !== event.target && !$(_this9._element).has(event.target).length) {
1910
1927
  _this9._element.focus();
1911
1928
  }
1912
1929
  });
@@ -1918,7 +1935,7 @@ var Modal = (function ($) {
1918
1935
 
1919
1936
  if (this._isShown && this._config.keyboard) {
1920
1937
  $(this._element).on(Event.KEYDOWN_DISMISS, function (event) {
1921
- if (event.which === 27) {
1938
+ if (event.which === ESCAPE_KEYCODE) {
1922
1939
  _this10.hide();
1923
1940
  }
1924
1941
  });
@@ -1941,6 +1958,7 @@ var Modal = (function ($) {
1941
1958
  var _this11 = this;
1942
1959
 
1943
1960
  this._element.style.display = 'none';
1961
+ this._element.setAttribute('aria-hidden', 'true');
1944
1962
  this._showBackdrop(function () {
1945
1963
  $(document.body).removeClass(ClassName.OPEN);
1946
1964
  _this11._resetAdjustments();
@@ -2046,7 +2064,7 @@ var Modal = (function ($) {
2046
2064
  }
2047
2065
 
2048
2066
  if (this._isBodyOverflowing && !isModalOverflowing) {
2049
- this._element.style.paddingRight = this._scrollbarWidth + 'px~';
2067
+ this._element.style.paddingRight = this._scrollbarWidth + 'px';
2050
2068
  }
2051
2069
  }
2052
2070
  }, {
@@ -2058,13 +2076,7 @@ var Modal = (function ($) {
2058
2076
  }, {
2059
2077
  key: '_checkScrollbar',
2060
2078
  value: function _checkScrollbar() {
2061
- var fullWindowWidth = window.innerWidth;
2062
- if (!fullWindowWidth) {
2063
- // workaround for missing window.innerWidth in IE8
2064
- var documentElementRect = document.documentElement.getBoundingClientRect();
2065
- fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left);
2066
- }
2067
- this._isBodyOverflowing = document.body.clientWidth < fullWindowWidth;
2079
+ this._isBodyOverflowing = document.body.clientWidth < window.innerWidth;
2068
2080
  this._scrollbarWidth = this._getScrollbarWidth();
2069
2081
  }
2070
2082
  }, {
@@ -2184,7 +2196,7 @@ var Modal = (function ($) {
2184
2196
 
2185
2197
  /**
2186
2198
  * --------------------------------------------------------------------------
2187
- * Bootstrap (v4.0.0-alpha.2): scrollspy.js
2199
+ * Bootstrap (v4.0.0-alpha.3): scrollspy.js
2188
2200
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2189
2201
  * --------------------------------------------------------------------------
2190
2202
  */
@@ -2198,7 +2210,7 @@ var ScrollSpy = (function ($) {
2198
2210
  */
2199
2211
 
2200
2212
  var NAME = 'scrollspy';
2201
- var VERSION = '4.0.0-alpha';
2213
+ var VERSION = '4.0.0-alpha.3';
2202
2214
  var DATA_KEY = 'bs.scrollspy';
2203
2215
  var EVENT_KEY = '.' + DATA_KEY;
2204
2216
  var DATA_API_KEY = '.data-api';
@@ -2313,6 +2325,7 @@ var ScrollSpy = (function ($) {
2313
2325
  // todo (fat): remove sketch reliance on jQuery position/offset
2314
2326
  return [$(target)[offsetMethod]().top + offsetBase, targetSelector];
2315
2327
  }
2328
+ return null;
2316
2329
  }).filter(function (item) {
2317
2330
  return item;
2318
2331
  }).sort(function (a, b) {
@@ -2419,7 +2432,7 @@ var ScrollSpy = (function ($) {
2419
2432
  $link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
2420
2433
  $link.addClass(ClassName.ACTIVE);
2421
2434
  } else {
2422
- // todo (fat) this is kinda sus
2435
+ // todo (fat) this is kinda sus...
2423
2436
  // recursively add actives to tested nav-links
2424
2437
  $link.parents(Selector.LI).find(Selector.NAV_LINKS).addClass(ClassName.ACTIVE);
2425
2438
  }
@@ -2498,7 +2511,7 @@ var ScrollSpy = (function ($) {
2498
2511
 
2499
2512
  /**
2500
2513
  * --------------------------------------------------------------------------
2501
- * Bootstrap (v4.0.0-alpha.2): tab.js
2514
+ * Bootstrap (v4.0.0-alpha.3): tab.js
2502
2515
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2503
2516
  * --------------------------------------------------------------------------
2504
2517
  */
@@ -2512,7 +2525,7 @@ var Tab = (function ($) {
2512
2525
  */
2513
2526
 
2514
2527
  var NAME = 'tab';
2515
- var VERSION = '4.0.0-alpha';
2528
+ var VERSION = '4.0.0-alpha.3';
2516
2529
  var DATA_KEY = 'bs.tab';
2517
2530
  var EVENT_KEY = '.' + DATA_KEY;
2518
2531
  var DATA_API_KEY = '.data-api';
@@ -2757,7 +2770,7 @@ var Tab = (function ($) {
2757
2770
 
2758
2771
  /**
2759
2772
  * --------------------------------------------------------------------------
2760
- * Bootstrap (v4.0.0-alpha.2): tooltip.js
2773
+ * Bootstrap (v4.0.0-alpha.3): tooltip.js
2761
2774
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2762
2775
  * --------------------------------------------------------------------------
2763
2776
  */
@@ -2779,7 +2792,7 @@ var Tooltip = (function ($) {
2779
2792
  */
2780
2793
 
2781
2794
  var NAME = 'tooltip';
2782
- var VERSION = '4.0.0-alpha';
2795
+ var VERSION = '4.0.0-alpha.3';
2783
2796
  var DATA_KEY = 'bs.tooltip';
2784
2797
  var EVENT_KEY = '.' + DATA_KEY;
2785
2798
  var JQUERY_NO_CONFLICT = $.fn[NAME];
@@ -3368,7 +3381,7 @@ var Tooltip = (function ($) {
3368
3381
 
3369
3382
  /**
3370
3383
  * --------------------------------------------------------------------------
3371
- * Bootstrap (v4.0.0-alpha.2): popover.js
3384
+ * Bootstrap (v4.0.0-alpha.3): popover.js
3372
3385
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
3373
3386
  * --------------------------------------------------------------------------
3374
3387
  */
@@ -3382,7 +3395,7 @@ var Popover = (function ($) {
3382
3395
  */
3383
3396
 
3384
3397
  var NAME = 'popover';
3385
- var VERSION = '4.0.0-alpha';
3398
+ var VERSION = '4.0.0-alpha.3';
3386
3399
  var DATA_KEY = 'bs.popover';
3387
3400
  var EVENT_KEY = '.' + DATA_KEY;
3388
3401
  var JQUERY_NO_CONFLICT = $.fn[NAME];