@coreui/coreui 4.1.0 → 4.1.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 (115) hide show
  1. package/README.md +3 -3
  2. package/dist/css/coreui-grid.css +1 -1
  3. package/dist/css/coreui-grid.css.map +1 -1
  4. package/dist/css/coreui-grid.min.css +1 -1
  5. package/dist/css/coreui-grid.min.css.map +1 -1
  6. package/dist/css/coreui-grid.rtl.css +158 -158
  7. package/dist/css/coreui-grid.rtl.css.map +1 -1
  8. package/dist/css/coreui-grid.rtl.min.css +3 -3
  9. package/dist/css/coreui-grid.rtl.min.css.map +1 -1
  10. package/dist/css/coreui-reboot.css +1 -1
  11. package/dist/css/coreui-reboot.css.map +1 -1
  12. package/dist/css/coreui-reboot.min.css +1 -1
  13. package/dist/css/coreui-reboot.min.css.map +1 -1
  14. package/dist/css/coreui-reboot.rtl.css +2 -2
  15. package/dist/css/coreui-reboot.rtl.css.map +1 -1
  16. package/dist/css/coreui-reboot.rtl.min.css +2 -2
  17. package/dist/css/coreui-reboot.rtl.min.css.map +1 -1
  18. package/dist/css/coreui-utilities.css +1 -1
  19. package/dist/css/coreui-utilities.css.map +1 -1
  20. package/dist/css/coreui-utilities.min.css +1 -1
  21. package/dist/css/coreui-utilities.min.css.map +1 -1
  22. package/dist/css/coreui-utilities.rtl.css +218 -218
  23. package/dist/css/coreui-utilities.rtl.css.map +1 -1
  24. package/dist/css/coreui-utilities.rtl.min.css +3 -3
  25. package/dist/css/coreui-utilities.rtl.min.css.map +1 -1
  26. package/dist/css/coreui.css +6 -5
  27. package/dist/css/coreui.css.map +1 -1
  28. package/dist/css/coreui.min.css +2 -2
  29. package/dist/css/coreui.min.css.map +1 -1
  30. package/dist/css/coreui.rtl.css +223 -222
  31. package/dist/css/coreui.rtl.css.map +1 -1
  32. package/dist/css/coreui.rtl.min.css +3 -3
  33. package/dist/css/coreui.rtl.min.css.map +1 -1
  34. package/dist/js/coreui.bundle.js +111 -80
  35. package/dist/js/coreui.bundle.js.map +1 -1
  36. package/dist/js/coreui.bundle.min.js +3 -3
  37. package/dist/js/coreui.bundle.min.js.map +1 -1
  38. package/dist/js/coreui.esm.js +80 -68
  39. package/dist/js/coreui.esm.js.map +1 -1
  40. package/dist/js/coreui.esm.min.js +3 -3
  41. package/dist/js/coreui.esm.min.js.map +1 -1
  42. package/dist/js/coreui.js +82 -70
  43. package/dist/js/coreui.js.map +1 -1
  44. package/dist/js/coreui.min.js +3 -3
  45. package/dist/js/coreui.min.js.map +1 -1
  46. package/js/dist/alert.js +4 -4
  47. package/js/dist/alert.js.map +1 -1
  48. package/js/dist/base-component.js +5 -5
  49. package/js/dist/base-component.js.map +1 -1
  50. package/js/dist/button.js +4 -4
  51. package/js/dist/button.js.map +1 -1
  52. package/js/dist/carousel.js +30 -10
  53. package/js/dist/carousel.js.map +1 -1
  54. package/js/dist/collapse.js +8 -8
  55. package/js/dist/collapse.js.map +1 -1
  56. package/js/dist/dom/data.js +3 -3
  57. package/js/dist/dom/data.js.map +1 -1
  58. package/js/dist/dom/event-handler.js +4 -4
  59. package/js/dist/dom/event-handler.js.map +1 -1
  60. package/js/dist/dom/manipulator.js +3 -3
  61. package/js/dist/dom/manipulator.js.map +1 -1
  62. package/js/dist/dom/selector-engine.js +25 -5
  63. package/js/dist/dom/selector-engine.js.map +1 -1
  64. package/js/dist/dropdown.js +30 -10
  65. package/js/dist/dropdown.js.map +1 -1
  66. package/js/dist/modal.js +29 -9
  67. package/js/dist/modal.js.map +1 -1
  68. package/js/dist/offcanvas.js +29 -9
  69. package/js/dist/offcanvas.js.map +1 -1
  70. package/js/dist/popover.js +4 -4
  71. package/js/dist/popover.js.map +1 -1
  72. package/js/dist/scrollspy.js +8 -8
  73. package/js/dist/scrollspy.js.map +1 -1
  74. package/js/dist/tab.js +4 -4
  75. package/js/dist/tab.js.map +1 -1
  76. package/js/dist/toast.js +8 -8
  77. package/js/dist/toast.js.map +1 -1
  78. package/js/dist/tooltip.js +10 -10
  79. package/js/dist/tooltip.js.map +1 -1
  80. package/js/src/alert.js +1 -1
  81. package/js/src/base-component.js +2 -2
  82. package/js/src/button.js +1 -1
  83. package/js/src/carousel.js +2 -1
  84. package/js/src/collapse.js +1 -1
  85. package/js/src/dom/data.js +1 -1
  86. package/js/src/dom/event-handler.js +1 -1
  87. package/js/src/dom/manipulator.js +1 -1
  88. package/js/src/dom/selector-engine.js +1 -1
  89. package/js/src/dropdown.js +1 -1
  90. package/js/src/modal.js +1 -1
  91. package/js/src/navigation.js +1 -1
  92. package/js/src/offcanvas.js +1 -1
  93. package/js/src/popover.js +1 -1
  94. package/js/src/scrollspy.js +1 -1
  95. package/js/src/sidebar.js +21 -27
  96. package/js/src/tab.js +1 -1
  97. package/js/src/toast.js +1 -1
  98. package/js/src/tooltip.js +1 -1
  99. package/js/src/util/index.js +26 -7
  100. package/js/src/util/sanitizer.js +1 -1
  101. package/package.json +36 -40
  102. package/scss/_modal.scss +1 -1
  103. package/scss/_nav.scss +1 -2
  104. package/scss/_variables.scss +4 -1
  105. package/scss/coreui-grid.rtl.scss +1 -1
  106. package/scss/coreui-grid.scss +1 -1
  107. package/scss/coreui-reboot.rtl.scss +1 -1
  108. package/scss/coreui-reboot.scss +1 -1
  109. package/scss/coreui-utilities.rtl.scss +1 -1
  110. package/scss/coreui-utilities.scss +1 -1
  111. package/scss/coreui.rtl.scss +1 -1
  112. package/scss/coreui.scss +1 -1
  113. package/scss/mixins/_reset-text.scss +1 -1
  114. package/scss/mixins/_utilities.scss +8 -20
  115. package/scss/sidebar/_sidebar-nav.scss +1 -0
package/dist/js/coreui.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * CoreUI v4.1.0 (https://coreui.io)
3
- * Copyright 2021 The CoreUI Team (https://github.com/orgs/coreui/people)
2
+ * CoreUI v4.1.1 (https://coreui.io)
3
+ * Copyright 2022 The CoreUI Team (https://github.com/orgs/coreui/people)
4
4
  * Licensed under MIT (https://coreui.io)
5
5
  */
6
6
  (function (global, factory) {
@@ -11,7 +11,7 @@
11
11
 
12
12
  function _interopNamespace(e) {
13
13
  if (e && e.__esModule) return e;
14
- const n = Object.create(null);
14
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
15
15
  if (e) {
16
16
  for (const k in e) {
17
17
  if (k !== 'default') {
@@ -31,7 +31,7 @@
31
31
 
32
32
  /**
33
33
  * --------------------------------------------------------------------------
34
- * CoreUI (v4.1.0): alert.js
34
+ * CoreUI (v4.1.1): alert.js
35
35
  * Licensed under MIT (https://coreui.io/license)
36
36
  *
37
37
  * This component is a modified version of the Bootstrap's util/index.js
@@ -42,12 +42,12 @@
42
42
  const MILLISECONDS_MULTIPLIER = 1000;
43
43
  const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
44
44
 
45
- const toType = obj => {
46
- if (obj === null || obj === undefined) {
47
- return `${obj}`;
45
+ const toType = object => {
46
+ if (object === null || object === undefined) {
47
+ return `${object}`;
48
48
  }
49
49
 
50
- return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
50
+ return Object.prototype.toString.call(object).match(/\s([a-z]+)/i)[1].toLowerCase();
51
51
  };
52
52
  /**
53
53
  * --------------------------------------------------------------------------
@@ -172,7 +172,27 @@
172
172
  return false;
173
173
  }
174
174
 
175
- return getComputedStyle(element).getPropertyValue('visibility') === 'visible';
175
+ const elementIsVisible = getComputedStyle(element).getPropertyValue('visibility') === 'visible'; // Handle `details` element as its content may falsie appear visible when it is closed
176
+
177
+ const closedDetails = element.closest('details:not([open])');
178
+
179
+ if (!closedDetails) {
180
+ return elementIsVisible;
181
+ }
182
+
183
+ if (closedDetails !== element) {
184
+ const summary = element.closest('summary');
185
+
186
+ if (summary && summary.parentNode !== closedDetails) {
187
+ return false;
188
+ }
189
+
190
+ if (summary === null) {
191
+ return false;
192
+ }
193
+ }
194
+
195
+ return elementIsVisible;
176
196
  };
177
197
 
178
198
  const isDisabled = element => {
@@ -345,7 +365,7 @@
345
365
 
346
366
  /**
347
367
  * --------------------------------------------------------------------------
348
- * CoreUI (v4.1.0): dom/event-handler.js
368
+ * CoreUI (v4.1.1): dom/event-handler.js
349
369
  * Licensed under MIT (https://coreui.io/license)
350
370
  *
351
371
  * This component is a modified version of the Bootstrap's dom/event-handler.js
@@ -636,7 +656,7 @@
636
656
 
637
657
  /**
638
658
  * --------------------------------------------------------------------------
639
- * CoreUI (v4.1.0): dom/data.js
659
+ * CoreUI (v4.1.1): dom/data.js
640
660
  * Licensed under MIT (https://coreui.io/license)
641
661
  *
642
662
  * This component is a modified version of the Bootstrap's dom/data.js
@@ -693,7 +713,7 @@
693
713
 
694
714
  /**
695
715
  * --------------------------------------------------------------------------
696
- * CoreUI (v4.1.0): alert.js
716
+ * CoreUI (v4.1.1): alert.js
697
717
  * Licensed under MIT (https://coreui.io/license)
698
718
  *
699
719
  * This component is a modified version of the Bootstrap's base-component.js
@@ -706,7 +726,7 @@
706
726
  * ------------------------------------------------------------------------
707
727
  */
708
728
 
709
- const VERSION = '4.1.0';
729
+ const VERSION = '4.1.1';
710
730
 
711
731
  class BaseComponent {
712
732
  constructor(element) {
@@ -788,7 +808,7 @@
788
808
 
789
809
  /**
790
810
  * --------------------------------------------------------------------------
791
- * CoreUI (v4.1.0): alert.js
811
+ * CoreUI (v4.1.1): alert.js
792
812
  * Licensed under MIT (https://coreui.io/license)
793
813
  *
794
814
  * This component is a modified version of the Bootstrap's alert.js
@@ -806,7 +826,7 @@
806
826
  const EVENT_KEY$e = `.${DATA_KEY$e}`;
807
827
  const EVENT_CLOSE = `close${EVENT_KEY$e}`;
808
828
  const EVENT_CLOSED = `closed${EVENT_KEY$e}`;
809
- const CLASS_NAME_FADE$6 = 'fade';
829
+ const CLASS_NAME_FADE$5 = 'fade';
810
830
  const CLASS_NAME_SHOW$a = 'show';
811
831
  /**
812
832
  * ------------------------------------------------------------------------
@@ -830,7 +850,7 @@
830
850
 
831
851
  this._element.classList.remove(CLASS_NAME_SHOW$a);
832
852
 
833
- const isAnimated = this._element.classList.contains(CLASS_NAME_FADE$6);
853
+ const isAnimated = this._element.classList.contains(CLASS_NAME_FADE$5);
834
854
 
835
855
  this._queueCallback(() => this._destroyElement(), this._element, isAnimated);
836
856
  } // Private
@@ -880,7 +900,7 @@
880
900
 
881
901
  /**
882
902
  * --------------------------------------------------------------------------
883
- * CoreUI (v4.1.0): alert.js
903
+ * CoreUI (v4.1.1): alert.js
884
904
  * Licensed under MIT (https://coreui.io/license)
885
905
  *
886
906
  * This component is a modified version of the Bootstrap's button.js
@@ -954,7 +974,7 @@
954
974
 
955
975
  /**
956
976
  * --------------------------------------------------------------------------
957
- * CoreUI (v4.1.0): dom/manipulator.js
977
+ * CoreUI (v4.1.1): dom/manipulator.js
958
978
  * Licensed under MIT (https://coreui.io/license)
959
979
  *
960
980
  * This component is a modified version of the Bootstrap's dom/manipulator.js
@@ -1031,7 +1051,7 @@
1031
1051
 
1032
1052
  /**
1033
1053
  * --------------------------------------------------------------------------
1034
- * CoreUI (v4.1.0): dom/selector-engine.js
1054
+ * CoreUI (v4.1.1): dom/selector-engine.js
1035
1055
  * Licensed under MIT (https://coreui.io/license)
1036
1056
  *
1037
1057
  * This component is a modified version of the Bootstrap's dom/selector-engine.js
@@ -1104,7 +1124,7 @@
1104
1124
 
1105
1125
  /**
1106
1126
  * --------------------------------------------------------------------------
1107
- * CoreUI (v4.1.0): carousel.js
1127
+ * CoreUI (v4.1.1): carousel.js
1108
1128
  * Licensed under MIT (https://coreui.io/license)
1109
1129
  *
1110
1130
  * This component is a modified version of the Bootstrap's carousel.js
@@ -1432,7 +1452,7 @@
1432
1452
  const activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE$1, this._indicatorsElement);
1433
1453
  activeIndicator.classList.remove(CLASS_NAME_ACTIVE$3);
1434
1454
  activeIndicator.removeAttribute('aria-current');
1435
- const indicators = SelectorEngine.find(SELECTOR_INDICATOR, this._indicatorsElement);
1455
+ const indicators = SelectorEngine.find(SELECTOR_INDICATOR, this._indicatorsElement); // eslint-disable-next-line unicorn/no-for-loop
1436
1456
 
1437
1457
  for (let i = 0; i < indicators.length; i++) {
1438
1458
  if (Number.parseInt(indicators[i].getAttribute('data-coreui-slide-to'), 10) === this._getItemIndex(element)) {
@@ -1656,7 +1676,7 @@
1656
1676
 
1657
1677
  /**
1658
1678
  * --------------------------------------------------------------------------
1659
- * CoreUI (v4.1.0): collapse.js
1679
+ * CoreUI (v4.1.1): collapse.js
1660
1680
  * Licensed under MIT (https://coreui.io/license)
1661
1681
  *
1662
1682
  * This component is a modified version of the Bootstrap's collapse.js
@@ -1978,7 +1998,7 @@
1978
1998
 
1979
1999
  /**
1980
2000
  * --------------------------------------------------------------------------
1981
- * CoreUI (v4.1.0): dropdown.js
2001
+ * CoreUI (v4.1.1): dropdown.js
1982
2002
  * Licensed under MIT (https://coreui.io/license)
1983
2003
  *
1984
2004
  * This component is a modified version of the Bootstrap's dropdown.js
@@ -2568,7 +2588,7 @@
2568
2588
  clickCallback: '(function|null)'
2569
2589
  };
2570
2590
  const NAME$a = 'backdrop';
2571
- const CLASS_NAME_FADE$5 = 'fade';
2591
+ const CLASS_NAME_FADE$4 = 'fade';
2572
2592
  const CLASS_NAME_SHOW$7 = 'show';
2573
2593
  const EVENT_MOUSEDOWN = `mousedown.coreui.${NAME$a}`;
2574
2594
 
@@ -2619,7 +2639,7 @@
2619
2639
  backdrop.className = this._config.className;
2620
2640
 
2621
2641
  if (this._config.isAnimated) {
2622
- backdrop.classList.add(CLASS_NAME_FADE$5);
2642
+ backdrop.classList.add(CLASS_NAME_FADE$4);
2623
2643
  }
2624
2644
 
2625
2645
  this._element = backdrop;
@@ -2774,7 +2794,7 @@
2774
2794
 
2775
2795
  /**
2776
2796
  * --------------------------------------------------------------------------
2777
- * CoreUI (v4.1.0): modal.js
2797
+ * CoreUI (v4.1.1): modal.js
2778
2798
  * Licensed under MIT (https://coreui.io/license)
2779
2799
  *
2780
2800
  * This component is a modified version of the Bootstrap's modal.js
@@ -2814,7 +2834,7 @@
2814
2834
  const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$8}`;
2815
2835
  const EVENT_CLICK_DATA_API$4 = `click${EVENT_KEY$8}${DATA_API_KEY$5}`;
2816
2836
  const CLASS_NAME_OPEN = 'modal-open';
2817
- const CLASS_NAME_FADE$4 = 'fade';
2837
+ const CLASS_NAME_FADE$3 = 'fade';
2818
2838
  const CLASS_NAME_SHOW$6 = 'show';
2819
2839
  const CLASS_NAME_STATIC = 'modal-static';
2820
2840
  const OPEN_SELECTOR$1 = '.modal.show';
@@ -3076,7 +3096,7 @@
3076
3096
  }
3077
3097
 
3078
3098
  _isAnimated() {
3079
- return this._element.classList.contains(CLASS_NAME_FADE$4);
3099
+ return this._element.classList.contains(CLASS_NAME_FADE$3);
3080
3100
  }
3081
3101
 
3082
3102
  _triggerBackdropTransition() {
@@ -3206,7 +3226,7 @@
3206
3226
 
3207
3227
  /**
3208
3228
  * --------------------------------------------------------------------------
3209
- * CoreUI (v4.1.0): navigation.js
3229
+ * CoreUI (v4.1.1): navigation.js
3210
3230
  * Licensed under MIT (https://coreui.io/license)
3211
3231
  * --------------------------------------------------------------------------
3212
3232
  */
@@ -3491,7 +3511,7 @@
3491
3511
 
3492
3512
  /**
3493
3513
  * --------------------------------------------------------------------------
3494
- * CoreUI (v4.1.0): dropdown.js
3514
+ * CoreUI (v4.1.1): dropdown.js
3495
3515
  * Licensed under MIT (https://coreui.io/license)
3496
3516
  *
3497
3517
  * This component is a modified version of the Bootstrap's offcanvas.js
@@ -3750,7 +3770,7 @@
3750
3770
 
3751
3771
  /**
3752
3772
  * --------------------------------------------------------------------------
3753
- * CoreUI (v4.1.0): alert.js
3773
+ * CoreUI (v4.1.1): alert.js
3754
3774
  * Licensed under MIT (https://coreui.io/license)
3755
3775
  *
3756
3776
  * This component is a modified version of the Bootstrap's util/sanitizer.js
@@ -3865,7 +3885,7 @@
3865
3885
 
3866
3886
  /**
3867
3887
  * --------------------------------------------------------------------------
3868
- * CoreUI (v4.1.0): tooltip.js
3888
+ * CoreUI (v4.1.1): tooltip.js
3869
3889
  * Licensed under MIT (https://coreui.io/license)
3870
3890
  *
3871
3891
  * This component is a modified version of the Bootstrap's tooltip.js
@@ -3940,7 +3960,7 @@
3940
3960
  MOUSEENTER: `mouseenter${EVENT_KEY$5}`,
3941
3961
  MOUSELEAVE: `mouseleave${EVENT_KEY$5}`
3942
3962
  };
3943
- const CLASS_NAME_FADE$3 = 'fade';
3963
+ const CLASS_NAME_FADE$2 = 'fade';
3944
3964
  const CLASS_NAME_MODAL = 'modal';
3945
3965
  const CLASS_NAME_SHOW$3 = 'show';
3946
3966
  const HOVER_STATE_SHOW = 'show';
@@ -4080,7 +4100,7 @@
4080
4100
  this._element.setAttribute('aria-describedby', tipId);
4081
4101
 
4082
4102
  if (this._config.animation) {
4083
- tip.classList.add(CLASS_NAME_FADE$3);
4103
+ tip.classList.add(CLASS_NAME_FADE$2);
4084
4104
  }
4085
4105
 
4086
4106
  const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement;
@@ -4133,7 +4153,7 @@
4133
4153
  }
4134
4154
  };
4135
4155
 
4136
- const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$3);
4156
+ const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$2);
4137
4157
 
4138
4158
  this._queueCallback(complete, this.tip, isAnimated);
4139
4159
  }
@@ -4179,7 +4199,7 @@
4179
4199
  this._activeTrigger[TRIGGER_CLICK] = false;
4180
4200
  this._activeTrigger[TRIGGER_FOCUS] = false;
4181
4201
  this._activeTrigger[TRIGGER_HOVER] = false;
4182
- const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$3);
4202
+ const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$2);
4183
4203
 
4184
4204
  this._queueCallback(complete, this.tip, isAnimated);
4185
4205
 
@@ -4206,7 +4226,7 @@
4206
4226
  element.innerHTML = this._config.template;
4207
4227
  const tip = element.children[0];
4208
4228
  this.setContent(tip);
4209
- tip.classList.remove(CLASS_NAME_FADE$3, CLASS_NAME_SHOW$3);
4229
+ tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$3);
4210
4230
  this.tip = tip;
4211
4231
  return this.tip;
4212
4232
  }
@@ -4578,7 +4598,7 @@
4578
4598
 
4579
4599
  /**
4580
4600
  * --------------------------------------------------------------------------
4581
- * CoreUI (v4.1.0): popover.js
4601
+ * CoreUI (v4.1.1): popover.js
4582
4602
  * Licensed under MIT (https://coreui.io/license)
4583
4603
  *
4584
4604
  * This component is a modified version of the Bootstrap's popover.js
@@ -4691,7 +4711,7 @@
4691
4711
 
4692
4712
  /**
4693
4713
  * --------------------------------------------------------------------------
4694
- * CoreUI (v4.1.0): scrollspy.js
4714
+ * CoreUI (v4.1.1): scrollspy.js
4695
4715
  * Licensed under MIT (https://coreui.io/license)
4696
4716
  *
4697
4717
  * This component is a modified version of the Bootstrap's scrollspy.js
@@ -4929,7 +4949,7 @@
4929
4949
 
4930
4950
  /**
4931
4951
  * --------------------------------------------------------------------------
4932
- * CoreUI (v4.1.0): sidebar.js
4952
+ * CoreUI (v4.1.1): sidebar.js
4933
4953
  * Licensed under MIT (https://coreui.io/license)
4934
4954
  * --------------------------------------------------------------------------
4935
4955
  */
@@ -4946,7 +4966,6 @@
4946
4966
  const Default$1 = {};
4947
4967
  const DefaultType$1 = {};
4948
4968
  const CLASS_NAME_BACKDROP = 'sidebar-backdrop';
4949
- const CLASS_NAME_FADE$2 = 'fade';
4950
4969
  const CLASS_NAME_HIDE$1 = 'hide';
4951
4970
  const CLASS_NAME_SHOW$2 = 'show';
4952
4971
  const CLASS_NAME_SIDEBAR_NARROW = 'sidebar-narrow';
@@ -4977,7 +4996,7 @@
4977
4996
  this._overlaid = this._isOverlaid();
4978
4997
  this._narrow = this._isNarrow();
4979
4998
  this._unfoldable = this._isUnfoldable();
4980
- this._backdrop = null;
4999
+ this._backdrop = this._initializeBackDrop();
4981
5000
 
4982
5001
  this._addEventListeners();
4983
5002
  } // Getters
@@ -5006,7 +5025,9 @@
5006
5025
  if (this._isMobile()) {
5007
5026
  this._element.classList.add(CLASS_NAME_SHOW$2);
5008
5027
 
5009
- this._showBackdrop();
5028
+ this._backdrop.show();
5029
+
5030
+ new ScrollBarHelper().hide();
5010
5031
  }
5011
5032
 
5012
5033
  const complete = () => {
@@ -5032,7 +5053,9 @@
5032
5053
  }
5033
5054
 
5034
5055
  if (this._isMobile()) {
5035
- this._removeBackdrop();
5056
+ this._backdrop.hide();
5057
+
5058
+ new ScrollBarHelper().reset();
5036
5059
  } else {
5037
5060
  this._element.classList.add(CLASS_NAME_HIDE$1);
5038
5061
  }
@@ -5121,6 +5144,16 @@
5121
5144
  return config;
5122
5145
  }
5123
5146
 
5147
+ _initializeBackDrop() {
5148
+ return new Backdrop({
5149
+ className: CLASS_NAME_BACKDROP,
5150
+ isVisible: this._isMobile(),
5151
+ isAnimated: true,
5152
+ rootElement: this._element.parentNode,
5153
+ clickCallback: () => this.hide()
5154
+ });
5155
+ }
5156
+
5124
5157
  _isMobile() {
5125
5158
  return Boolean(window.getComputedStyle(this._element, null).getPropertyValue('--cui-is-mobile'));
5126
5159
  }
@@ -5140,35 +5173,13 @@
5140
5173
  _isVisible() {
5141
5174
  const rect = this._element.getBoundingClientRect();
5142
5175
 
5143
- return rect.top >= 0 && rect.left >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && rect.right <= (window.innerWidth || document.documentElement.clientWidth);
5176
+ return rect.top >= 0 && rect.left >= 0 && Math.floor(rect.bottom) <= (window.innerHeight || document.documentElement.clientHeight) && Math.floor(rect.right) <= (window.innerWidth || document.documentElement.clientWidth);
5144
5177
  }
5145
5178
 
5146
5179
  _addClassName(className) {
5147
5180
  this._element.classList.add(className);
5148
5181
  }
5149
5182
 
5150
- _removeBackdrop() {
5151
- if (this._backdrop) {
5152
- this._backdrop.remove();
5153
-
5154
- this._backdrop = null;
5155
- }
5156
- }
5157
-
5158
- _showBackdrop() {
5159
- if (!this._backdrop) {
5160
- this._backdrop = document.createElement('div');
5161
- this._backdrop.className = CLASS_NAME_BACKDROP;
5162
-
5163
- this._backdrop.classList.add(CLASS_NAME_FADE$2);
5164
-
5165
- document.body.append(this._backdrop);
5166
- reflow(this._backdrop);
5167
-
5168
- this._backdrop.classList.add(CLASS_NAME_SHOW$2);
5169
- }
5170
- }
5171
-
5172
5183
  _clickOutListener(event, sidebar) {
5173
5184
  if (event.target.closest(SELECTOR_SIDEBAR) === null) {
5174
5185
  event.preventDefault();
@@ -5216,6 +5227,7 @@
5216
5227
  EventHandler.on(window, EVENT_RESIZE, () => {
5217
5228
  if (this._isMobile() && this._isVisible()) {
5218
5229
  this.hide();
5230
+ this._backdrop = this._initializeBackDrop();
5219
5231
  }
5220
5232
  });
5221
5233
  } // Static
@@ -5262,7 +5274,7 @@
5262
5274
 
5263
5275
  /**
5264
5276
  * --------------------------------------------------------------------------
5265
- * CoreUI (v4.1.0): tab.js
5277
+ * CoreUI (v4.1.1): tab.js
5266
5278
  * Licensed under MIT (https://coreui.io/license)
5267
5279
  *
5268
5280
  * This component is a modified version of the Bootstrap's tab.js
@@ -5463,7 +5475,7 @@
5463
5475
 
5464
5476
  /**
5465
5477
  * --------------------------------------------------------------------------
5466
- * CoreUI (v4.1.0): toast.js
5478
+ * CoreUI (v4.1.1): toast.js
5467
5479
  * Licensed under MIT (https://coreui.io/license)
5468
5480
  *
5469
5481
  * This component is a modified version of the Bootstrap's toast.js
@@ -5696,7 +5708,7 @@
5696
5708
 
5697
5709
  /**
5698
5710
  * --------------------------------------------------------------------------
5699
- * CoreUI (v4.1.0): index.esm.js
5711
+ * CoreUI (v4.1.1): index.esm.js
5700
5712
  * Licensed under MIT (https://coreui.io/license)
5701
5713
  * --------------------------------------------------------------------------
5702
5714
  */