bootstrap 5.1.1 → 5.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/assets/javascripts/bootstrap/alert.js +13 -13
  4. data/assets/javascripts/bootstrap/base-component.js +13 -13
  5. data/assets/javascripts/bootstrap/button.js +10 -10
  6. data/assets/javascripts/bootstrap/carousel.js +39 -39
  7. data/assets/javascripts/bootstrap/collapse.js +28 -27
  8. data/assets/javascripts/bootstrap/dom/data.js +5 -5
  9. data/assets/javascripts/bootstrap/dom/event-handler.js +5 -5
  10. data/assets/javascripts/bootstrap/dom/manipulator.js +4 -4
  11. data/assets/javascripts/bootstrap/dom/selector-engine.js +5 -5
  12. data/assets/javascripts/bootstrap/dropdown.js +37 -39
  13. data/assets/javascripts/bootstrap/modal.js +51 -51
  14. data/assets/javascripts/bootstrap/offcanvas.js +40 -40
  15. data/assets/javascripts/bootstrap/popover.js +10 -10
  16. data/assets/javascripts/bootstrap/scrollspy.js +27 -27
  17. data/assets/javascripts/bootstrap/tab.js +19 -19
  18. data/assets/javascripts/bootstrap/toast.js +21 -21
  19. data/assets/javascripts/bootstrap/tooltip.js +55 -58
  20. data/assets/javascripts/bootstrap-sprockets.js +7 -7
  21. data/assets/javascripts/bootstrap.js +64 -66
  22. data/assets/javascripts/bootstrap.min.js +2 -2
  23. data/assets/stylesheets/_bootstrap-grid.scss +1 -1
  24. data/assets/stylesheets/_bootstrap-reboot.scss +1 -1
  25. data/assets/stylesheets/_bootstrap.scss +1 -1
  26. data/assets/stylesheets/bootstrap/_buttons.scss +1 -0
  27. data/assets/stylesheets/bootstrap/_tables.scss +8 -4
  28. data/assets/stylesheets/bootstrap/_variables.scss +6 -4
  29. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +1 -1
  30. data/assets/stylesheets/bootstrap/forms/_form-select.scss +2 -0
  31. data/assets/stylesheets/bootstrap/mixins/_grid.scss +4 -3
  32. data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +1 -1
  33. data/lib/bootstrap/version.rb +2 -2
  34. metadata +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap v5.1.1 (https://getbootstrap.com/)
2
+ * Bootstrap v5.1.2 (https://getbootstrap.com/)
3
3
  * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
4
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5
5
  */
@@ -7,33 +7,31 @@
7
7
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('@popperjs/core')) :
8
8
  typeof define === 'function' && define.amd ? define(['@popperjs/core'], factory) :
9
9
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.bootstrap = factory(global.Popper));
10
- }(this, (function (Popper) { 'use strict';
10
+ })(this, (function (Popper) { 'use strict';
11
11
 
12
12
  function _interopNamespace(e) {
13
13
  if (e && e.__esModule) return e;
14
- var n = Object.create(null);
14
+ const n = Object.create(null);
15
15
  if (e) {
16
- Object.keys(e).forEach(function (k) {
16
+ for (const k in e) {
17
17
  if (k !== 'default') {
18
- var d = Object.getOwnPropertyDescriptor(e, k);
18
+ const d = Object.getOwnPropertyDescriptor(e, k);
19
19
  Object.defineProperty(n, k, d.get ? d : {
20
20
  enumerable: true,
21
- get: function () {
22
- return e[k];
23
- }
21
+ get: () => e[k]
24
22
  });
25
23
  }
26
- });
24
+ }
27
25
  }
28
- n['default'] = e;
26
+ n.default = e;
29
27
  return Object.freeze(n);
30
28
  }
31
29
 
32
- var Popper__namespace = /*#__PURE__*/_interopNamespace(Popper);
30
+ const Popper__namespace = /*#__PURE__*/_interopNamespace(Popper);
33
31
 
34
32
  /**
35
33
  * --------------------------------------------------------------------------
36
- * Bootstrap (v5.1.1): util/index.js
34
+ * Bootstrap (v5.1.2): util/index.js
37
35
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
38
36
  * --------------------------------------------------------------------------
39
37
  */
@@ -344,7 +342,7 @@
344
342
 
345
343
  /**
346
344
  * --------------------------------------------------------------------------
347
- * Bootstrap (v5.1.1): dom/event-handler.js
345
+ * Bootstrap (v5.1.2): dom/event-handler.js
348
346
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
349
347
  * --------------------------------------------------------------------------
350
348
  */
@@ -632,7 +630,7 @@
632
630
 
633
631
  /**
634
632
  * --------------------------------------------------------------------------
635
- * Bootstrap (v5.1.1): dom/data.js
633
+ * Bootstrap (v5.1.2): dom/data.js
636
634
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
637
635
  * --------------------------------------------------------------------------
638
636
  */
@@ -643,7 +641,7 @@
643
641
  * ------------------------------------------------------------------------
644
642
  */
645
643
  const elementMap = new Map();
646
- var Data = {
644
+ const Data = {
647
645
  set(element, key, instance) {
648
646
  if (!elementMap.has(element)) {
649
647
  elementMap.set(element, new Map());
@@ -686,7 +684,7 @@
686
684
 
687
685
  /**
688
686
  * --------------------------------------------------------------------------
689
- * Bootstrap (v5.1.1): base-component.js
687
+ * Bootstrap (v5.1.2): base-component.js
690
688
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
691
689
  * --------------------------------------------------------------------------
692
690
  */
@@ -696,7 +694,7 @@
696
694
  * ------------------------------------------------------------------------
697
695
  */
698
696
 
699
- const VERSION = '5.1.1';
697
+ const VERSION = '5.1.2';
700
698
 
701
699
  class BaseComponent {
702
700
  constructor(element) {
@@ -752,7 +750,7 @@
752
750
 
753
751
  /**
754
752
  * --------------------------------------------------------------------------
755
- * Bootstrap (v5.1.1): util/component-functions.js
753
+ * Bootstrap (v5.1.2): util/component-functions.js
756
754
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
757
755
  * --------------------------------------------------------------------------
758
756
  */
@@ -778,7 +776,7 @@
778
776
 
779
777
  /**
780
778
  * --------------------------------------------------------------------------
781
- * Bootstrap (v5.1.1): alert.js
779
+ * Bootstrap (v5.1.2): alert.js
782
780
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
783
781
  * --------------------------------------------------------------------------
784
782
  */
@@ -867,7 +865,7 @@
867
865
 
868
866
  /**
869
867
  * --------------------------------------------------------------------------
870
- * Bootstrap (v5.1.1): button.js
868
+ * Bootstrap (v5.1.2): button.js
871
869
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
872
870
  * --------------------------------------------------------------------------
873
871
  */
@@ -938,7 +936,7 @@
938
936
 
939
937
  /**
940
938
  * --------------------------------------------------------------------------
941
- * Bootstrap (v5.1.1): dom/manipulator.js
939
+ * Bootstrap (v5.1.2): dom/manipulator.js
942
940
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
943
941
  * --------------------------------------------------------------------------
944
942
  */
@@ -1012,7 +1010,7 @@
1012
1010
 
1013
1011
  /**
1014
1012
  * --------------------------------------------------------------------------
1015
- * Bootstrap (v5.1.1): dom/selector-engine.js
1013
+ * Bootstrap (v5.1.2): dom/selector-engine.js
1016
1014
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
1017
1015
  * --------------------------------------------------------------------------
1018
1016
  */
@@ -1082,7 +1080,7 @@
1082
1080
 
1083
1081
  /**
1084
1082
  * --------------------------------------------------------------------------
1085
- * Bootstrap (v5.1.1): carousel.js
1083
+ * Bootstrap (v5.1.2): carousel.js
1086
1084
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
1087
1085
  * --------------------------------------------------------------------------
1088
1086
  */
@@ -1350,7 +1348,7 @@
1350
1348
  };
1351
1349
 
1352
1350
  SelectorEngine.find(SELECTOR_ITEM_IMG, this._element).forEach(itemImg => {
1353
- EventHandler.on(itemImg, EVENT_DRAG_START, e => e.preventDefault());
1351
+ EventHandler.on(itemImg, EVENT_DRAG_START, event => event.preventDefault());
1354
1352
  });
1355
1353
 
1356
1354
  if (this._pointerEvent) {
@@ -1631,7 +1629,7 @@
1631
1629
 
1632
1630
  /**
1633
1631
  * --------------------------------------------------------------------------
1634
- * Bootstrap (v5.1.1): collapse.js
1632
+ * Bootstrap (v5.1.2): collapse.js
1635
1633
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
1636
1634
  * --------------------------------------------------------------------------
1637
1635
  */
@@ -1662,6 +1660,7 @@
1662
1660
  const CLASS_NAME_COLLAPSE = 'collapse';
1663
1661
  const CLASS_NAME_COLLAPSING = 'collapsing';
1664
1662
  const CLASS_NAME_COLLAPSED = 'collapsed';
1663
+ const CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`;
1665
1664
  const CLASS_NAME_HORIZONTAL = 'collapse-horizontal';
1666
1665
  const WIDTH = 'width';
1667
1666
  const HEIGHT = 'height';
@@ -1731,7 +1730,7 @@
1731
1730
  let activesData;
1732
1731
 
1733
1732
  if (this._config.parent) {
1734
- const children = SelectorEngine.find(`.${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`, this._config.parent);
1733
+ const children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent);
1735
1734
  actives = SelectorEngine.find(SELECTOR_ACTIVES, this._config.parent).filter(elem => !children.includes(elem)); // remove children if greater depth
1736
1735
  }
1737
1736
 
@@ -1869,7 +1868,7 @@
1869
1868
  return;
1870
1869
  }
1871
1870
 
1872
- const children = SelectorEngine.find(`.${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`, this._config.parent);
1871
+ const children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent);
1873
1872
  SelectorEngine.find(SELECTOR_DATA_TOGGLE$4, this._config.parent).filter(elem => !children.includes(elem)).forEach(element => {
1874
1873
  const selected = getElementFromSelector(element);
1875
1874
 
@@ -1949,7 +1948,7 @@
1949
1948
 
1950
1949
  /**
1951
1950
  * --------------------------------------------------------------------------
1952
- * Bootstrap (v5.1.1): dropdown.js
1951
+ * Bootstrap (v5.1.2): dropdown.js
1953
1952
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
1954
1953
  * --------------------------------------------------------------------------
1955
1954
  */
@@ -2411,7 +2410,7 @@
2411
2410
 
2412
2411
  /**
2413
2412
  * --------------------------------------------------------------------------
2414
- * Bootstrap (v5.1.1): util/scrollBar.js
2413
+ * Bootstrap (v5.1.2): util/scrollBar.js
2415
2414
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2416
2415
  * --------------------------------------------------------------------------
2417
2416
  */
@@ -2515,8 +2514,8 @@
2515
2514
 
2516
2515
  /**
2517
2516
  * --------------------------------------------------------------------------
2518
- * Bootstrap (v5.1.1): util/backdrop.js
2519
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2517
+ * Bootstrap (v5.1.2): util/backdrop.js
2518
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2520
2519
  * --------------------------------------------------------------------------
2521
2520
  */
2522
2521
  const Default$7 = {
@@ -2639,8 +2638,8 @@
2639
2638
 
2640
2639
  /**
2641
2640
  * --------------------------------------------------------------------------
2642
- * Bootstrap (v5.1.1): util/focustrap.js
2643
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2641
+ * Bootstrap (v5.1.2): util/focustrap.js
2642
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2644
2643
  * --------------------------------------------------------------------------
2645
2644
  */
2646
2645
  const Default$6 = {
@@ -2742,7 +2741,7 @@
2742
2741
 
2743
2742
  /**
2744
2743
  * --------------------------------------------------------------------------
2745
- * Bootstrap (v5.1.1): modal.js
2744
+ * Bootstrap (v5.1.2): modal.js
2746
2745
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
2747
2746
  * --------------------------------------------------------------------------
2748
2747
  */
@@ -3171,8 +3170,8 @@
3171
3170
 
3172
3171
  /**
3173
3172
  * --------------------------------------------------------------------------
3174
- * Bootstrap (v5.1.1): offcanvas.js
3175
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
3173
+ * Bootstrap (v5.1.2): offcanvas.js
3174
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
3176
3175
  * --------------------------------------------------------------------------
3177
3176
  */
3178
3177
  /**
@@ -3427,42 +3426,42 @@
3427
3426
 
3428
3427
  /**
3429
3428
  * --------------------------------------------------------------------------
3430
- * Bootstrap (v5.1.1): util/sanitizer.js
3429
+ * Bootstrap (v5.1.2): util/sanitizer.js
3431
3430
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
3432
3431
  * --------------------------------------------------------------------------
3433
3432
  */
3434
- const uriAttrs = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);
3433
+ const uriAttributes = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);
3435
3434
  const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
3436
3435
  /**
3437
3436
  * A pattern that recognizes a commonly useful subset of URLs that are safe.
3438
3437
  *
3439
- * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
3438
+ * Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
3440
3439
  */
3441
3440
 
3442
- const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/i;
3441
+ const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i;
3443
3442
  /**
3444
3443
  * A pattern that matches safe data URLs. Only matches image, video and audio types.
3445
3444
  *
3446
- * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
3445
+ * Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
3447
3446
  */
3448
3447
 
3449
3448
  const DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;
3450
3449
 
3451
- const allowedAttribute = (attr, allowedAttributeList) => {
3452
- const attrName = attr.nodeName.toLowerCase();
3450
+ const allowedAttribute = (attribute, allowedAttributeList) => {
3451
+ const attributeName = attribute.nodeName.toLowerCase();
3453
3452
 
3454
- if (allowedAttributeList.includes(attrName)) {
3455
- if (uriAttrs.has(attrName)) {
3456
- return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue));
3453
+ if (allowedAttributeList.includes(attributeName)) {
3454
+ if (uriAttributes.has(attributeName)) {
3455
+ return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue) || DATA_URL_PATTERN.test(attribute.nodeValue));
3457
3456
  }
3458
3457
 
3459
3458
  return true;
3460
3459
  }
3461
3460
 
3462
- const regExp = allowedAttributeList.filter(attrRegex => attrRegex instanceof RegExp); // Check if a regular expression validates the attribute.
3461
+ const regExp = allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp); // Check if a regular expression validates the attribute.
3463
3462
 
3464
3463
  for (let i = 0, len = regExp.length; i < len; i++) {
3465
- if (regExp[i].test(attrName)) {
3464
+ if (regExp[i].test(attributeName)) {
3466
3465
  return true;
3467
3466
  }
3468
3467
  }
@@ -3514,23 +3513,22 @@
3514
3513
 
3515
3514
  const domParser = new window.DOMParser();
3516
3515
  const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
3517
- const allowlistKeys = Object.keys(allowList);
3518
3516
  const elements = [].concat(...createdDocument.body.querySelectorAll('*'));
3519
3517
 
3520
3518
  for (let i = 0, len = elements.length; i < len; i++) {
3521
- const el = elements[i];
3522
- const elName = el.nodeName.toLowerCase();
3519
+ const element = elements[i];
3520
+ const elementName = element.nodeName.toLowerCase();
3523
3521
 
3524
- if (!allowlistKeys.includes(elName)) {
3525
- el.remove();
3522
+ if (!Object.keys(allowList).includes(elementName)) {
3523
+ element.remove();
3526
3524
  continue;
3527
3525
  }
3528
3526
 
3529
- const attributeList = [].concat(...el.attributes);
3530
- const allowedAttributes = [].concat(allowList['*'] || [], allowList[elName] || []);
3531
- attributeList.forEach(attr => {
3532
- if (!allowedAttribute(attr, allowedAttributes)) {
3533
- el.removeAttribute(attr.nodeName);
3527
+ const attributeList = [].concat(...element.attributes);
3528
+ const allowedAttributes = [].concat(allowList['*'] || [], allowList[elementName] || []);
3529
+ attributeList.forEach(attribute => {
3530
+ if (!allowedAttribute(attribute, allowedAttributes)) {
3531
+ element.removeAttribute(attribute.nodeName);
3534
3532
  }
3535
3533
  });
3536
3534
  }
@@ -3540,7 +3538,7 @@
3540
3538
 
3541
3539
  /**
3542
3540
  * --------------------------------------------------------------------------
3543
- * Bootstrap (v5.1.1): tooltip.js
3541
+ * Bootstrap (v5.1.2): tooltip.js
3544
3542
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
3545
3543
  * --------------------------------------------------------------------------
3546
3544
  */
@@ -4250,7 +4248,7 @@
4250
4248
 
4251
4249
  /**
4252
4250
  * --------------------------------------------------------------------------
4253
- * Bootstrap (v5.1.1): popover.js
4251
+ * Bootstrap (v5.1.2): popover.js
4254
4252
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
4255
4253
  * --------------------------------------------------------------------------
4256
4254
  */
@@ -4360,7 +4358,7 @@
4360
4358
 
4361
4359
  /**
4362
4360
  * --------------------------------------------------------------------------
4363
- * Bootstrap (v5.1.1): scrollspy.js
4361
+ * Bootstrap (v5.1.2): scrollspy.js
4364
4362
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
4365
4363
  * --------------------------------------------------------------------------
4366
4364
  */
@@ -4595,7 +4593,7 @@
4595
4593
 
4596
4594
  /**
4597
4595
  * --------------------------------------------------------------------------
4598
- * Bootstrap (v5.1.1): tab.js
4596
+ * Bootstrap (v5.1.2): tab.js
4599
4597
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
4600
4598
  * --------------------------------------------------------------------------
4601
4599
  */
@@ -4793,7 +4791,7 @@
4793
4791
 
4794
4792
  /**
4795
4793
  * --------------------------------------------------------------------------
4796
- * Bootstrap (v5.1.1): toast.js
4794
+ * Bootstrap (v5.1.2): toast.js
4797
4795
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
4798
4796
  * --------------------------------------------------------------------------
4799
4797
  */
@@ -5023,11 +5021,11 @@
5023
5021
 
5024
5022
  /**
5025
5023
  * --------------------------------------------------------------------------
5026
- * Bootstrap (v5.1.1): index.umd.js
5024
+ * Bootstrap (v5.1.2): index.umd.js
5027
5025
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5028
5026
  * --------------------------------------------------------------------------
5029
5027
  */
5030
- var index_umd = {
5028
+ const index_umd = {
5031
5029
  Alert,
5032
5030
  Button,
5033
5031
  Carousel,
@@ -5044,4 +5042,4 @@
5044
5042
 
5045
5043
  return index_umd;
5046
5044
 
5047
- })));
5045
+ }));