@coreui/coreui 4.2.6 → 4.3.0-beta.0
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.
- package/LICENSE +5 -6
- package/README.md +2 -2
- package/dist/css/coreui-grid.css +36 -83
- package/dist/css/coreui-grid.css.map +1 -1
- package/dist/css/coreui-grid.min.css +4 -6
- package/dist/css/coreui-grid.min.css.map +1 -1
- package/dist/css/coreui-grid.rtl.css +40 -89
- package/dist/css/coreui-grid.rtl.css.map +1 -1
- package/dist/css/coreui-grid.rtl.min.css +8 -12
- package/dist/css/coreui-grid.rtl.min.css.map +1 -1
- package/dist/css/coreui-reboot.css +176 -48
- package/dist/css/coreui-reboot.css.map +1 -1
- package/dist/css/coreui-reboot.min.css +4 -6
- package/dist/css/coreui-reboot.min.css.map +1 -1
- package/dist/css/coreui-reboot.rtl.css +180 -54
- package/dist/css/coreui-reboot.rtl.css.map +1 -1
- package/dist/css/coreui-reboot.rtl.min.css +8 -12
- package/dist/css/coreui-reboot.rtl.min.css.map +1 -1
- package/dist/css/coreui-utilities.css +1328 -95
- package/dist/css/coreui-utilities.css.map +1 -1
- package/dist/css/coreui-utilities.min.css +4 -6
- package/dist/css/coreui-utilities.min.css.map +1 -1
- package/dist/css/coreui-utilities.rtl.css +1237 -101
- package/dist/css/coreui-utilities.rtl.css.map +1 -1
- package/dist/css/coreui-utilities.rtl.min.css +8 -12
- package/dist/css/coreui-utilities.rtl.min.css.map +1 -1
- package/dist/css/coreui.css +2385 -885
- package/dist/css/coreui.css.map +1 -1
- package/dist/css/coreui.min.css +4 -6
- package/dist/css/coreui.min.css.map +1 -1
- package/dist/css/coreui.rtl.css +2299 -905
- package/dist/css/coreui.rtl.css.map +1 -1
- package/dist/css/coreui.rtl.min.css +8 -12
- package/dist/css/coreui.rtl.min.css.map +1 -1
- package/dist/js/coreui.bundle.js +317 -304
- package/dist/js/coreui.bundle.js.map +1 -1
- package/dist/js/coreui.bundle.min.js +4 -4
- package/dist/js/coreui.bundle.min.js.map +1 -1
- package/dist/js/coreui.esm.js +277 -258
- package/dist/js/coreui.esm.js.map +1 -1
- package/dist/js/coreui.esm.min.js +4 -4
- package/dist/js/coreui.esm.min.js.map +1 -1
- package/dist/js/coreui.js +280 -260
- package/dist/js/coreui.js.map +1 -1
- package/dist/js/coreui.min.js +4 -4
- package/dist/js/coreui.min.js.map +1 -1
- package/js/dist/alert.js +10 -9
- package/js/dist/alert.js.map +1 -1
- package/js/dist/base-component.js +11 -10
- package/js/dist/base-component.js.map +1 -1
- package/js/dist/button.js +10 -9
- package/js/dist/button.js.map +1 -1
- package/js/dist/carousel.js +11 -10
- package/js/dist/carousel.js.map +1 -1
- package/js/dist/collapse.js +10 -9
- package/js/dist/collapse.js.map +1 -1
- package/js/dist/dom/data.js +5 -5
- package/js/dist/dom/data.js.map +1 -1
- package/js/dist/dom/event-handler.js +9 -9
- package/js/dist/dom/event-handler.js.map +1 -1
- package/js/dist/dom/manipulator.js +5 -5
- package/js/dist/dom/manipulator.js.map +1 -1
- package/js/dist/dom/selector-engine.js +6 -5
- package/js/dist/dom/selector-engine.js.map +1 -1
- package/js/dist/dropdown.js +13 -12
- package/js/dist/dropdown.js.map +1 -1
- package/js/dist/modal.js +12 -13
- package/js/dist/modal.js.map +1 -1
- package/js/dist/navigation.js +10 -9
- package/js/dist/navigation.js.map +1 -1
- package/js/dist/offcanvas.js +13 -12
- package/js/dist/offcanvas.js.map +1 -1
- package/js/dist/popover.js +10 -9
- package/js/dist/popover.js.map +1 -1
- package/js/dist/scrollspy.js +16 -15
- package/js/dist/scrollspy.js.map +1 -1
- package/js/dist/sidebar.js +10 -9
- package/js/dist/sidebar.js.map +1 -1
- package/js/dist/tab.js +13 -12
- package/js/dist/tab.js.map +1 -1
- package/js/dist/toast.js +10 -9
- package/js/dist/toast.js.map +1 -1
- package/js/dist/tooltip.js +14 -13
- package/js/dist/tooltip.js.map +1 -1
- package/js/dist/util/backdrop.js +10 -9
- package/js/dist/util/backdrop.js.map +1 -1
- package/js/dist/util/component-functions.js +10 -9
- package/js/dist/util/component-functions.js.map +1 -1
- package/js/dist/util/config.js +10 -9
- package/js/dist/util/config.js.map +1 -1
- package/js/dist/util/focustrap.js +6 -5
- package/js/dist/util/focustrap.js.map +1 -1
- package/js/dist/util/index.js +5 -5
- package/js/dist/util/index.js.map +1 -1
- package/js/dist/util/sanitizer.js +30 -32
- package/js/dist/util/sanitizer.js.map +1 -1
- package/js/dist/util/scrollbar.js +10 -9
- package/js/dist/util/scrollbar.js.map +1 -1
- package/js/dist/util/swipe.js +10 -9
- package/js/dist/util/swipe.js.map +1 -1
- package/js/dist/util/template-factory.js +10 -9
- package/js/dist/util/template-factory.js.map +1 -1
- package/js/index.esm.js +21 -0
- package/js/index.umd.js +38 -0
- package/js/src/alert.js +4 -4
- package/js/src/base-component.js +4 -4
- package/js/src/button.js +4 -4
- package/js/src/carousel.js +7 -7
- package/js/src/collapse.js +5 -5
- package/js/src/dom/data.js +2 -2
- package/js/src/dom/event-handler.js +4 -5
- package/js/src/dom/manipulator.js +2 -2
- package/js/src/dom/selector-engine.js +2 -2
- package/js/src/dropdown.js +9 -9
- package/js/src/modal.js +9 -10
- package/js/src/navigation.js +4 -4
- package/js/src/offcanvas.js +11 -11
- package/js/src/popover.js +3 -3
- package/js/src/scrollspy.js +8 -8
- package/js/src/sidebar.js +5 -5
- package/js/src/tab.js +7 -7
- package/js/src/toast.js +4 -4
- package/js/src/tooltip.js +9 -9
- package/js/src/util/backdrop.js +3 -3
- package/js/src/util/component-functions.js +3 -3
- package/js/src/util/config.js +3 -3
- package/js/src/util/focustrap.js +2 -2
- package/js/src/util/index.js +2 -2
- package/js/src/util/sanitizer.js +40 -43
- package/js/src/util/scrollbar.js +3 -3
- package/js/src/util/swipe.js +3 -3
- package/js/src/util/template-factory.js +4 -4
- package/package.json +52 -43
- package/scss/_accordion.scss +9 -1
- package/scss/_alert.scss +6 -10
- package/scss/_badge.scss +2 -1
- package/scss/_button-group.scss +4 -4
- package/scss/_buttons.scss +23 -1
- package/scss/_card.scss +8 -3
- package/scss/_carousel.scss +24 -8
- package/scss/_close.scss +32 -9
- package/scss/_dropdown.scss +3 -3
- package/scss/_functions.scss +6 -22
- package/scss/_grid.scss +8 -0
- package/scss/_helpers.scss +2 -0
- package/scss/_list-group.scss +11 -2
- package/scss/_maps.scss +125 -0
- package/scss/_mixins.scss +1 -4
- package/scss/_nav.scss +7 -0
- package/scss/_navbar.scss +18 -4
- package/scss/_offcanvas.scss +4 -2
- package/scss/_pagination.scss +1 -1
- package/scss/_progress.scss +10 -1
- package/scss/_reboot.scss +2 -3
- package/scss/_root.scss +144 -16
- package/scss/_tables.scss +18 -15
- package/scss/_tooltip.scss +5 -6
- package/scss/_type.scss +3 -1
- package/scss/_utilities.scss +182 -23
- package/scss/_variables-dark.scss +169 -0
- package/scss/_variables.scss +361 -344
- package/scss/coreui-grid.rtl.scss +2 -7
- package/scss/coreui-grid.scss +3 -10
- package/scss/coreui-reboot.rtl.scss +2 -7
- package/scss/coreui-reboot.scss +4 -7
- package/scss/coreui-utilities.rtl.scss +2 -7
- package/scss/coreui-utilities.scss +3 -7
- package/scss/coreui.rtl.scss +2 -7
- package/scss/coreui.scss +3 -7
- package/scss/forms/_floating-labels.scss +23 -4
- package/scss/forms/_form-check.scss +22 -24
- package/scss/forms/_form-control.scss +33 -13
- package/scss/forms/_form-range.scss +8 -8
- package/scss/forms/_form-select.scss +19 -10
- package/scss/forms/_form-text.scss +1 -1
- package/scss/forms/_input-group.scss +1 -1
- package/scss/forms/_labels.scss +2 -2
- package/scss/helpers/_color-bg.scss +12 -2
- package/scss/helpers/_colored-links.scss +20 -2
- package/scss/helpers/_focus-ring.scss +5 -0
- package/scss/helpers/_icon-link.scss +25 -0
- package/scss/mixins/_alert.scss +4 -1
- package/scss/mixins/_banner.scss +7 -0
- package/scss/mixins/_breakpoints.scss +0 -13
- package/scss/mixins/_caret.scss +31 -26
- package/scss/mixins/_color-mode.scss +21 -0
- package/scss/mixins/_forms.scss +8 -7
- package/scss/mixins/_grid.scss +1 -1
- package/scss/mixins/_list-group.scss +3 -0
- package/scss/mixins/_utilities.scss +35 -15
- package/scss/mixins/_visually-hidden.scss +5 -1
- package/scss/sidebar/_sidebar.scss +10 -2
- package/scss/vendor/_rfs.scss +24 -30
- package/scss/mixins/_css-vars.scss +0 -87
package/dist/js/coreui.bundle.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* CoreUI
|
|
3
|
-
* Copyright
|
|
4
|
-
* Licensed under MIT (https://coreui
|
|
2
|
+
* CoreUI v4.3.0-beta.0 (https://coreui.io)
|
|
3
|
+
* Copyright 2023 The CoreUI Team (https://github.com/orgs/coreui/people)
|
|
4
|
+
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
5
5
|
*/
|
|
6
6
|
(function (global, factory) {
|
|
7
7
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
@@ -11,8 +11,59 @@
|
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* --------------------------------------------------------------------------
|
|
14
|
-
* CoreUI
|
|
15
|
-
* Licensed under MIT (https://
|
|
14
|
+
* CoreUI dom/data.js
|
|
15
|
+
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
16
|
+
*
|
|
17
|
+
* This is a modified version of the Bootstrap's dom/data.js
|
|
18
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
19
|
+
* --------------------------------------------------------------------------
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Constants
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
const elementMap = new Map();
|
|
27
|
+
const Data = {
|
|
28
|
+
set(element, key, instance) {
|
|
29
|
+
if (!elementMap.has(element)) {
|
|
30
|
+
elementMap.set(element, new Map());
|
|
31
|
+
}
|
|
32
|
+
const instanceMap = elementMap.get(element);
|
|
33
|
+
|
|
34
|
+
// make it clear we only want one instance per element
|
|
35
|
+
// can be removed later when multiple key/instances are fine to be used
|
|
36
|
+
if (!instanceMap.has(key) && instanceMap.size !== 0) {
|
|
37
|
+
// eslint-disable-next-line no-console
|
|
38
|
+
console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
instanceMap.set(key, instance);
|
|
42
|
+
},
|
|
43
|
+
get(element, key) {
|
|
44
|
+
if (elementMap.has(element)) {
|
|
45
|
+
return elementMap.get(element).get(key) || null;
|
|
46
|
+
}
|
|
47
|
+
return null;
|
|
48
|
+
},
|
|
49
|
+
remove(element, key) {
|
|
50
|
+
if (!elementMap.has(element)) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const instanceMap = elementMap.get(element);
|
|
54
|
+
instanceMap.delete(key);
|
|
55
|
+
|
|
56
|
+
// free up element references if there are no instances left for an element
|
|
57
|
+
if (instanceMap.size === 0) {
|
|
58
|
+
elementMap.delete(element);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* --------------------------------------------------------------------------
|
|
65
|
+
* CoreUI util/index.js
|
|
66
|
+
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
16
67
|
*
|
|
17
68
|
* This is a modified version of the Bootstrap's util/index.js
|
|
18
69
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
@@ -261,14 +312,15 @@
|
|
|
261
312
|
|
|
262
313
|
/**
|
|
263
314
|
* --------------------------------------------------------------------------
|
|
264
|
-
* CoreUI
|
|
265
|
-
* Licensed under MIT (https://
|
|
315
|
+
* CoreUI dom/event-handler.js
|
|
316
|
+
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
266
317
|
*
|
|
267
318
|
* This is a modified version of the Bootstrap's dom/event-handler.js
|
|
268
319
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
269
320
|
* --------------------------------------------------------------------------
|
|
270
321
|
*/
|
|
271
322
|
|
|
323
|
+
|
|
272
324
|
/**
|
|
273
325
|
* Constants
|
|
274
326
|
*/
|
|
@@ -334,7 +386,7 @@
|
|
|
334
386
|
}
|
|
335
387
|
function normalizeParameters(originalTypeEvent, handler, delegationFunction) {
|
|
336
388
|
const isDelegated = typeof handler === 'string';
|
|
337
|
-
//
|
|
389
|
+
// TODO: tooltip passes `false` instead of selector, so we need to check
|
|
338
390
|
const callable = isDelegated ? delegationFunction : handler || delegationFunction;
|
|
339
391
|
let typeEvent = getTypeEvent(originalTypeEvent);
|
|
340
392
|
if (!nativeEvents.has(typeEvent)) {
|
|
@@ -451,11 +503,10 @@
|
|
|
451
503
|
nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
|
|
452
504
|
defaultPrevented = jQueryEvent.isDefaultPrevented();
|
|
453
505
|
}
|
|
454
|
-
|
|
506
|
+
const evt = hydrateObj(new Event(event, {
|
|
455
507
|
bubbles,
|
|
456
508
|
cancelable: true
|
|
457
|
-
});
|
|
458
|
-
evt = hydrateObj(evt, args);
|
|
509
|
+
}), args);
|
|
459
510
|
if (defaultPrevented) {
|
|
460
511
|
evt.preventDefault();
|
|
461
512
|
}
|
|
@@ -486,59 +537,8 @@
|
|
|
486
537
|
|
|
487
538
|
/**
|
|
488
539
|
* --------------------------------------------------------------------------
|
|
489
|
-
* CoreUI
|
|
490
|
-
* Licensed under MIT (https://
|
|
491
|
-
*
|
|
492
|
-
* This is a modified version of the Bootstrap's dom/data.js
|
|
493
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
494
|
-
* --------------------------------------------------------------------------
|
|
495
|
-
*/
|
|
496
|
-
|
|
497
|
-
/**
|
|
498
|
-
* Constants
|
|
499
|
-
*/
|
|
500
|
-
|
|
501
|
-
const elementMap = new Map();
|
|
502
|
-
const Data = {
|
|
503
|
-
set(element, key, instance) {
|
|
504
|
-
if (!elementMap.has(element)) {
|
|
505
|
-
elementMap.set(element, new Map());
|
|
506
|
-
}
|
|
507
|
-
const instanceMap = elementMap.get(element);
|
|
508
|
-
|
|
509
|
-
// make it clear we only want one instance per element
|
|
510
|
-
// can be removed later when multiple key/instances are fine to be used
|
|
511
|
-
if (!instanceMap.has(key) && instanceMap.size !== 0) {
|
|
512
|
-
// eslint-disable-next-line no-console
|
|
513
|
-
console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);
|
|
514
|
-
return;
|
|
515
|
-
}
|
|
516
|
-
instanceMap.set(key, instance);
|
|
517
|
-
},
|
|
518
|
-
get(element, key) {
|
|
519
|
-
if (elementMap.has(element)) {
|
|
520
|
-
return elementMap.get(element).get(key) || null;
|
|
521
|
-
}
|
|
522
|
-
return null;
|
|
523
|
-
},
|
|
524
|
-
remove(element, key) {
|
|
525
|
-
if (!elementMap.has(element)) {
|
|
526
|
-
return;
|
|
527
|
-
}
|
|
528
|
-
const instanceMap = elementMap.get(element);
|
|
529
|
-
instanceMap.delete(key);
|
|
530
|
-
|
|
531
|
-
// free up element references if there are no instances left for an element
|
|
532
|
-
if (instanceMap.size === 0) {
|
|
533
|
-
elementMap.delete(element);
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
};
|
|
537
|
-
|
|
538
|
-
/**
|
|
539
|
-
* --------------------------------------------------------------------------
|
|
540
|
-
* CoreUI (v4.2.6): dom/selector-engine.js
|
|
541
|
-
* Licensed under MIT (https://coreui.io/license)
|
|
540
|
+
* CoreUI dom/manipulator.js
|
|
541
|
+
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
542
542
|
*
|
|
543
543
|
* This is a modified version of the Bootstrap's dom/manipulator.js
|
|
544
544
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
@@ -597,14 +597,15 @@
|
|
|
597
597
|
|
|
598
598
|
/**
|
|
599
599
|
* --------------------------------------------------------------------------
|
|
600
|
-
* CoreUI
|
|
601
|
-
* Licensed under MIT (https://
|
|
600
|
+
* CoreUI util/config.js
|
|
601
|
+
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
602
602
|
*
|
|
603
603
|
* This is a modified version of the Bootstrap's util/config.js
|
|
604
604
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
605
605
|
* --------------------------------------------------------------------------
|
|
606
606
|
*/
|
|
607
607
|
|
|
608
|
+
|
|
608
609
|
/**
|
|
609
610
|
* Class definition
|
|
610
611
|
*/
|
|
@@ -652,19 +653,20 @@
|
|
|
652
653
|
|
|
653
654
|
/**
|
|
654
655
|
* --------------------------------------------------------------------------
|
|
655
|
-
* CoreUI
|
|
656
|
-
* Licensed under MIT (https://
|
|
656
|
+
* CoreUI base-component.js
|
|
657
|
+
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
657
658
|
*
|
|
658
659
|
* This component is a modified version of the Bootstrap's base-component.js
|
|
659
660
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
660
661
|
* --------------------------------------------------------------------------
|
|
661
662
|
*/
|
|
662
663
|
|
|
664
|
+
|
|
663
665
|
/**
|
|
664
666
|
* Constants
|
|
665
667
|
*/
|
|
666
668
|
|
|
667
|
-
const VERSION = '4.
|
|
669
|
+
const VERSION = '4.3.0-beta.0';
|
|
668
670
|
|
|
669
671
|
/**
|
|
670
672
|
* Class definition
|
|
@@ -723,13 +725,14 @@
|
|
|
723
725
|
|
|
724
726
|
/**
|
|
725
727
|
* --------------------------------------------------------------------------
|
|
726
|
-
* CoreUI
|
|
727
|
-
* Licensed under MIT (https://
|
|
728
|
+
* CoreUI dom/selector-engine.js
|
|
729
|
+
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
728
730
|
*
|
|
729
731
|
* This is a modified version of the Bootstrap's dom/selector-engine.js
|
|
730
732
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
731
733
|
* --------------------------------------------------------------------------
|
|
732
734
|
*/
|
|
735
|
+
|
|
733
736
|
const getSelector = element => {
|
|
734
737
|
let selector = element.getAttribute('data-coreui-target');
|
|
735
738
|
if (!selector || selector === '#') {
|
|
@@ -814,13 +817,14 @@
|
|
|
814
817
|
|
|
815
818
|
/**
|
|
816
819
|
* --------------------------------------------------------------------------
|
|
817
|
-
* CoreUI
|
|
818
|
-
* Licensed under MIT (https://
|
|
820
|
+
* CoreUI util/component-functions.js
|
|
821
|
+
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
819
822
|
*
|
|
820
823
|
* This is a modified version of the Bootstrap's util/component-functions.js
|
|
821
824
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
822
825
|
* --------------------------------------------------------------------------
|
|
823
826
|
*/
|
|
827
|
+
|
|
824
828
|
const enableDismissTrigger = (component, method = 'hide') => {
|
|
825
829
|
const clickEvent = `click.dismiss${component.EVENT_KEY}`;
|
|
826
830
|
const name = component.NAME;
|
|
@@ -841,14 +845,15 @@
|
|
|
841
845
|
|
|
842
846
|
/**
|
|
843
847
|
* --------------------------------------------------------------------------
|
|
844
|
-
* CoreUI
|
|
845
|
-
* Licensed under MIT (https://
|
|
848
|
+
* CoreUI alert.js
|
|
849
|
+
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
846
850
|
*
|
|
847
851
|
* This component is a modified version of the Bootstrap's alert.js
|
|
848
852
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
849
853
|
* --------------------------------------------------------------------------
|
|
850
854
|
*/
|
|
851
855
|
|
|
856
|
+
|
|
852
857
|
/**
|
|
853
858
|
* Constants
|
|
854
859
|
*/
|
|
@@ -918,14 +923,15 @@
|
|
|
918
923
|
|
|
919
924
|
/**
|
|
920
925
|
* --------------------------------------------------------------------------
|
|
921
|
-
* CoreUI
|
|
922
|
-
* Licensed under MIT (https://
|
|
926
|
+
* CoreUI button.js
|
|
927
|
+
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
923
928
|
*
|
|
924
929
|
* This component is a modified version of the Bootstrap's button.js
|
|
925
930
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
926
931
|
* --------------------------------------------------------------------------
|
|
927
932
|
*/
|
|
928
933
|
|
|
934
|
+
|
|
929
935
|
/**
|
|
930
936
|
* Constants
|
|
931
937
|
*/
|
|
@@ -984,14 +990,15 @@
|
|
|
984
990
|
|
|
985
991
|
/**
|
|
986
992
|
* --------------------------------------------------------------------------
|
|
987
|
-
* CoreUI
|
|
988
|
-
* Licensed under MIT (https://
|
|
993
|
+
* CoreUI util/swipe.js
|
|
994
|
+
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
989
995
|
*
|
|
990
996
|
* This is a modified version of the Bootstrap's util/swipe.js
|
|
991
997
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
992
998
|
* --------------------------------------------------------------------------
|
|
993
999
|
*/
|
|
994
1000
|
|
|
1001
|
+
|
|
995
1002
|
/**
|
|
996
1003
|
* Constants
|
|
997
1004
|
*/
|
|
@@ -1106,14 +1113,15 @@
|
|
|
1106
1113
|
|
|
1107
1114
|
/**
|
|
1108
1115
|
* --------------------------------------------------------------------------
|
|
1109
|
-
* CoreUI
|
|
1110
|
-
* Licensed under MIT (https://
|
|
1116
|
+
* CoreUI carousel.js
|
|
1117
|
+
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
1111
1118
|
*
|
|
1112
1119
|
* This component is a modified version of the Bootstrap's carousel.js
|
|
1113
1120
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
1114
1121
|
* --------------------------------------------------------------------------
|
|
1115
1122
|
*/
|
|
1116
1123
|
|
|
1124
|
+
|
|
1117
1125
|
/**
|
|
1118
1126
|
* Constants
|
|
1119
1127
|
*/
|
|
@@ -1369,7 +1377,7 @@
|
|
|
1369
1377
|
}
|
|
1370
1378
|
if (!activeElement || !nextElement) {
|
|
1371
1379
|
// Some weirdness is happening, so we bail
|
|
1372
|
-
//
|
|
1380
|
+
// TODO: change tests that use empty divs to avoid this check
|
|
1373
1381
|
return;
|
|
1374
1382
|
}
|
|
1375
1383
|
const isCycling = Boolean(this._interval);
|
|
@@ -1481,14 +1489,15 @@
|
|
|
1481
1489
|
|
|
1482
1490
|
/**
|
|
1483
1491
|
* --------------------------------------------------------------------------
|
|
1484
|
-
* CoreUI
|
|
1485
|
-
* Licensed under MIT (https://
|
|
1492
|
+
* CoreUI collapse.js
|
|
1493
|
+
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
1486
1494
|
*
|
|
1487
1495
|
* This component is a modified version of the Bootstrap's collapse.js
|
|
1488
1496
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
1489
1497
|
* --------------------------------------------------------------------------
|
|
1490
1498
|
*/
|
|
1491
1499
|
|
|
1500
|
+
|
|
1492
1501
|
/**
|
|
1493
1502
|
* Constants
|
|
1494
1503
|
*/
|
|
@@ -1878,7 +1887,7 @@
|
|
|
1878
1887
|
function getUAString() {
|
|
1879
1888
|
var uaData = navigator.userAgentData;
|
|
1880
1889
|
|
|
1881
|
-
if (uaData != null && uaData.brands) {
|
|
1890
|
+
if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {
|
|
1882
1891
|
return uaData.brands.map(function (item) {
|
|
1883
1892
|
return item.brand + "/" + item.version;
|
|
1884
1893
|
}).join(' ');
|
|
@@ -2166,7 +2175,6 @@
|
|
|
2166
2175
|
}
|
|
2167
2176
|
|
|
2168
2177
|
if (!contains(state.elements.popper, arrowElement)) {
|
|
2169
|
-
|
|
2170
2178
|
return;
|
|
2171
2179
|
}
|
|
2172
2180
|
|
|
@@ -2197,10 +2205,9 @@
|
|
|
2197
2205
|
// Zooming can change the DPR, but it seems to report a value that will
|
|
2198
2206
|
// cleanly divide the values into the appropriate subpixels.
|
|
2199
2207
|
|
|
2200
|
-
function roundOffsetsByDPR(_ref) {
|
|
2208
|
+
function roundOffsetsByDPR(_ref, win) {
|
|
2201
2209
|
var x = _ref.x,
|
|
2202
2210
|
y = _ref.y;
|
|
2203
|
-
var win = window;
|
|
2204
2211
|
var dpr = win.devicePixelRatio || 1;
|
|
2205
2212
|
return {
|
|
2206
2213
|
x: round(x * dpr) / dpr || 0,
|
|
@@ -2283,7 +2290,7 @@
|
|
|
2283
2290
|
var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
|
|
2284
2291
|
x: x,
|
|
2285
2292
|
y: y
|
|
2286
|
-
}) : {
|
|
2293
|
+
}, getWindow(popper)) : {
|
|
2287
2294
|
x: x,
|
|
2288
2295
|
y: y
|
|
2289
2296
|
};
|
|
@@ -2309,7 +2316,6 @@
|
|
|
2309
2316
|
adaptive = _options$adaptive === void 0 ? true : _options$adaptive,
|
|
2310
2317
|
_options$roundOffsets = options.roundOffsets,
|
|
2311
2318
|
roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;
|
|
2312
|
-
|
|
2313
2319
|
var commonStyles = {
|
|
2314
2320
|
placement: getBasePlacement(state.placement),
|
|
2315
2321
|
variation: getVariation(state.placement),
|
|
@@ -3377,8 +3383,7 @@
|
|
|
3377
3383
|
|
|
3378
3384
|
state.orderedModifiers = orderedModifiers.filter(function (m) {
|
|
3379
3385
|
return m.enabled;
|
|
3380
|
-
});
|
|
3381
|
-
|
|
3386
|
+
});
|
|
3382
3387
|
runModifierEffects();
|
|
3383
3388
|
return instance.update();
|
|
3384
3389
|
},
|
|
@@ -3398,7 +3403,6 @@
|
|
|
3398
3403
|
// anymore
|
|
3399
3404
|
|
|
3400
3405
|
if (!areValidElements(reference, popper)) {
|
|
3401
|
-
|
|
3402
3406
|
return;
|
|
3403
3407
|
} // Store the reference and popper rects to be read by modifiers
|
|
3404
3408
|
|
|
@@ -3423,7 +3427,6 @@
|
|
|
3423
3427
|
});
|
|
3424
3428
|
|
|
3425
3429
|
for (var index = 0; index < state.orderedModifiers.length; index++) {
|
|
3426
|
-
|
|
3427
3430
|
if (state.reset === true) {
|
|
3428
3431
|
state.reset = false;
|
|
3429
3432
|
index = -1;
|
|
@@ -3461,7 +3464,6 @@
|
|
|
3461
3464
|
};
|
|
3462
3465
|
|
|
3463
3466
|
if (!areValidElements(reference, popper)) {
|
|
3464
|
-
|
|
3465
3467
|
return instance;
|
|
3466
3468
|
}
|
|
3467
3469
|
|
|
@@ -3476,11 +3478,11 @@
|
|
|
3476
3478
|
// one.
|
|
3477
3479
|
|
|
3478
3480
|
function runModifierEffects() {
|
|
3479
|
-
state.orderedModifiers.forEach(function (
|
|
3480
|
-
var name =
|
|
3481
|
-
|
|
3482
|
-
options =
|
|
3483
|
-
effect =
|
|
3481
|
+
state.orderedModifiers.forEach(function (_ref) {
|
|
3482
|
+
var name = _ref.name,
|
|
3483
|
+
_ref$options = _ref.options,
|
|
3484
|
+
options = _ref$options === void 0 ? {} : _ref$options,
|
|
3485
|
+
effect = _ref.effect;
|
|
3484
3486
|
|
|
3485
3487
|
if (typeof effect === 'function') {
|
|
3486
3488
|
var cleanupFn = effect({
|
|
@@ -3521,56 +3523,57 @@
|
|
|
3521
3523
|
|
|
3522
3524
|
const Popper = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
3523
3525
|
__proto__: null,
|
|
3524
|
-
popperGenerator,
|
|
3525
|
-
detectOverflow,
|
|
3526
|
-
createPopperBase: createPopper$2,
|
|
3527
|
-
createPopper,
|
|
3528
|
-
createPopperLite: createPopper$1,
|
|
3529
|
-
top,
|
|
3530
|
-
bottom,
|
|
3531
|
-
right,
|
|
3532
|
-
left,
|
|
3533
|
-
auto,
|
|
3534
|
-
basePlacements,
|
|
3535
|
-
start,
|
|
3536
|
-
end,
|
|
3537
|
-
clippingParents,
|
|
3538
|
-
viewport,
|
|
3539
|
-
popper,
|
|
3540
|
-
reference,
|
|
3541
|
-
variationPlacements,
|
|
3542
|
-
placements,
|
|
3543
|
-
beforeRead,
|
|
3544
|
-
read,
|
|
3545
|
-
afterRead,
|
|
3546
|
-
beforeMain,
|
|
3547
|
-
main,
|
|
3548
3526
|
afterMain,
|
|
3549
|
-
|
|
3550
|
-
write,
|
|
3527
|
+
afterRead,
|
|
3551
3528
|
afterWrite,
|
|
3552
|
-
modifierPhases,
|
|
3553
3529
|
applyStyles: applyStyles$1,
|
|
3554
3530
|
arrow: arrow$1,
|
|
3531
|
+
auto,
|
|
3532
|
+
basePlacements,
|
|
3533
|
+
beforeMain,
|
|
3534
|
+
beforeRead,
|
|
3535
|
+
beforeWrite,
|
|
3536
|
+
bottom,
|
|
3537
|
+
clippingParents,
|
|
3555
3538
|
computeStyles: computeStyles$1,
|
|
3539
|
+
createPopper,
|
|
3540
|
+
createPopperBase: createPopper$2,
|
|
3541
|
+
createPopperLite: createPopper$1,
|
|
3542
|
+
detectOverflow,
|
|
3543
|
+
end,
|
|
3556
3544
|
eventListeners,
|
|
3557
3545
|
flip: flip$1,
|
|
3558
3546
|
hide: hide$1,
|
|
3547
|
+
left,
|
|
3548
|
+
main,
|
|
3549
|
+
modifierPhases,
|
|
3559
3550
|
offset: offset$1,
|
|
3551
|
+
placements,
|
|
3552
|
+
popper,
|
|
3553
|
+
popperGenerator,
|
|
3560
3554
|
popperOffsets: popperOffsets$1,
|
|
3561
|
-
preventOverflow: preventOverflow$1
|
|
3555
|
+
preventOverflow: preventOverflow$1,
|
|
3556
|
+
read,
|
|
3557
|
+
reference,
|
|
3558
|
+
right,
|
|
3559
|
+
start,
|
|
3560
|
+
top,
|
|
3561
|
+
variationPlacements,
|
|
3562
|
+
viewport,
|
|
3563
|
+
write
|
|
3562
3564
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
3563
3565
|
|
|
3564
3566
|
/**
|
|
3565
3567
|
* --------------------------------------------------------------------------
|
|
3566
|
-
* CoreUI
|
|
3567
|
-
* Licensed under MIT (https://
|
|
3568
|
+
* CoreUI dropdown.js
|
|
3569
|
+
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
3568
3570
|
*
|
|
3569
3571
|
* This component is a modified version of the Bootstrap's dropdown.js
|
|
3570
3572
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
3571
3573
|
* --------------------------------------------------------------------------
|
|
3572
3574
|
*/
|
|
3573
3575
|
|
|
3576
|
+
|
|
3574
3577
|
/**
|
|
3575
3578
|
* Constants
|
|
3576
3579
|
*/
|
|
@@ -3638,7 +3641,7 @@
|
|
|
3638
3641
|
super(element, config);
|
|
3639
3642
|
this._popper = null;
|
|
3640
3643
|
this._parent = this._element.parentNode; // dropdown wrapper
|
|
3641
|
-
//
|
|
3644
|
+
// TODO: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/
|
|
3642
3645
|
this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] || SelectorEngine.prev(this._element, SELECTOR_MENU)[0] || SelectorEngine.findOne(SELECTOR_MENU, this._parent);
|
|
3643
3646
|
this._inNavbar = this._detectNavbar();
|
|
3644
3647
|
}
|
|
@@ -3812,7 +3815,7 @@
|
|
|
3812
3815
|
|
|
3813
3816
|
// Disable Popper if we have a static display or Dropdown is in Navbar
|
|
3814
3817
|
if (this._inNavbar || this._config.display === 'static') {
|
|
3815
|
-
Manipulator.setDataAttribute(this._menu, 'popper', 'static'); //
|
|
3818
|
+
Manipulator.setDataAttribute(this._menu, 'popper', 'static'); // TODO: v6 remove
|
|
3816
3819
|
defaultBsPopperConfig.modifiers = [{
|
|
3817
3820
|
name: 'applyStyles',
|
|
3818
3821
|
enabled: false
|
|
@@ -3894,7 +3897,7 @@
|
|
|
3894
3897
|
}
|
|
3895
3898
|
event.preventDefault();
|
|
3896
3899
|
|
|
3897
|
-
//
|
|
3900
|
+
// TODO: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/
|
|
3898
3901
|
const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$4) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$4)[0] || SelectorEngine.next(this, SELECTOR_DATA_TOGGLE$4)[0] || SelectorEngine.findOne(SELECTOR_DATA_TOGGLE$4, event.delegateTarget.parentNode);
|
|
3899
3902
|
const instance = Dropdown.getOrCreateInstance(getToggleButton);
|
|
3900
3903
|
if (isUpOrDownEvent) {
|
|
@@ -3933,114 +3936,15 @@
|
|
|
3933
3936
|
|
|
3934
3937
|
/**
|
|
3935
3938
|
* --------------------------------------------------------------------------
|
|
3936
|
-
* CoreUI
|
|
3937
|
-
* Licensed under MIT (https://
|
|
3938
|
-
*
|
|
3939
|
-
* This is a modified version of the Bootstrap's util/scrollBar.js
|
|
3940
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
3941
|
-
* --------------------------------------------------------------------------
|
|
3942
|
-
*/
|
|
3943
|
-
|
|
3944
|
-
/**
|
|
3945
|
-
* Constants
|
|
3946
|
-
*/
|
|
3947
|
-
|
|
3948
|
-
const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
|
|
3949
|
-
const SELECTOR_STICKY_CONTENT = '.sticky-top';
|
|
3950
|
-
const PROPERTY_PADDING = 'padding-right';
|
|
3951
|
-
const PROPERTY_MARGIN = 'margin-right';
|
|
3952
|
-
|
|
3953
|
-
/**
|
|
3954
|
-
* Class definition
|
|
3955
|
-
*/
|
|
3956
|
-
|
|
3957
|
-
class ScrollBarHelper {
|
|
3958
|
-
constructor() {
|
|
3959
|
-
this._element = document.body;
|
|
3960
|
-
}
|
|
3961
|
-
|
|
3962
|
-
// Public
|
|
3963
|
-
getWidth() {
|
|
3964
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
|
|
3965
|
-
const documentWidth = document.documentElement.clientWidth;
|
|
3966
|
-
return Math.abs(window.innerWidth - documentWidth);
|
|
3967
|
-
}
|
|
3968
|
-
hide() {
|
|
3969
|
-
const width = this.getWidth();
|
|
3970
|
-
this._disableOverFlow();
|
|
3971
|
-
// give padding to element to balance the hidden scrollbar width
|
|
3972
|
-
this._setElementAttributes(this._element, PROPERTY_PADDING, calculatedValue => calculatedValue + width);
|
|
3973
|
-
// trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth
|
|
3974
|
-
this._setElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING, calculatedValue => calculatedValue + width);
|
|
3975
|
-
this._setElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN, calculatedValue => calculatedValue - width);
|
|
3976
|
-
}
|
|
3977
|
-
reset() {
|
|
3978
|
-
this._resetElementAttributes(this._element, 'overflow');
|
|
3979
|
-
this._resetElementAttributes(this._element, PROPERTY_PADDING);
|
|
3980
|
-
this._resetElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING);
|
|
3981
|
-
this._resetElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN);
|
|
3982
|
-
}
|
|
3983
|
-
isOverflowing() {
|
|
3984
|
-
return this.getWidth() > 0;
|
|
3985
|
-
}
|
|
3986
|
-
|
|
3987
|
-
// Private
|
|
3988
|
-
_disableOverFlow() {
|
|
3989
|
-
this._saveInitialAttribute(this._element, 'overflow');
|
|
3990
|
-
this._element.style.overflow = 'hidden';
|
|
3991
|
-
}
|
|
3992
|
-
_setElementAttributes(selector, styleProperty, callback) {
|
|
3993
|
-
const scrollbarWidth = this.getWidth();
|
|
3994
|
-
const manipulationCallBack = element => {
|
|
3995
|
-
if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) {
|
|
3996
|
-
return;
|
|
3997
|
-
}
|
|
3998
|
-
this._saveInitialAttribute(element, styleProperty);
|
|
3999
|
-
const calculatedValue = window.getComputedStyle(element).getPropertyValue(styleProperty);
|
|
4000
|
-
element.style.setProperty(styleProperty, `${callback(Number.parseFloat(calculatedValue))}px`);
|
|
4001
|
-
};
|
|
4002
|
-
this._applyManipulationCallback(selector, manipulationCallBack);
|
|
4003
|
-
}
|
|
4004
|
-
_saveInitialAttribute(element, styleProperty) {
|
|
4005
|
-
const actualValue = element.style.getPropertyValue(styleProperty);
|
|
4006
|
-
if (actualValue) {
|
|
4007
|
-
Manipulator.setDataAttribute(element, styleProperty, actualValue);
|
|
4008
|
-
}
|
|
4009
|
-
}
|
|
4010
|
-
_resetElementAttributes(selector, styleProperty) {
|
|
4011
|
-
const manipulationCallBack = element => {
|
|
4012
|
-
const value = Manipulator.getDataAttribute(element, styleProperty);
|
|
4013
|
-
// We only want to remove the property if the value is `null`; the value can also be zero
|
|
4014
|
-
if (value === null) {
|
|
4015
|
-
element.style.removeProperty(styleProperty);
|
|
4016
|
-
return;
|
|
4017
|
-
}
|
|
4018
|
-
Manipulator.removeDataAttribute(element, styleProperty);
|
|
4019
|
-
element.style.setProperty(styleProperty, value);
|
|
4020
|
-
};
|
|
4021
|
-
this._applyManipulationCallback(selector, manipulationCallBack);
|
|
4022
|
-
}
|
|
4023
|
-
_applyManipulationCallback(selector, callBack) {
|
|
4024
|
-
if (isElement$1(selector)) {
|
|
4025
|
-
callBack(selector);
|
|
4026
|
-
return;
|
|
4027
|
-
}
|
|
4028
|
-
for (const sel of SelectorEngine.find(selector, this._element)) {
|
|
4029
|
-
callBack(sel);
|
|
4030
|
-
}
|
|
4031
|
-
}
|
|
4032
|
-
}
|
|
4033
|
-
|
|
4034
|
-
/**
|
|
4035
|
-
* --------------------------------------------------------------------------
|
|
4036
|
-
* CoreUI (v4.2.6): tab.js
|
|
4037
|
-
* Licensed under MIT (https://coreui.io/license)
|
|
3939
|
+
* CoreUI util/backdrop.js
|
|
3940
|
+
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
4038
3941
|
*
|
|
4039
3942
|
* This is a modified version of the Bootstrap's util/backdrop.js
|
|
4040
3943
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
4041
3944
|
* --------------------------------------------------------------------------
|
|
4042
3945
|
*/
|
|
4043
3946
|
|
|
3947
|
+
|
|
4044
3948
|
/**
|
|
4045
3949
|
* Constants
|
|
4046
3950
|
*/
|
|
@@ -4160,14 +4064,15 @@
|
|
|
4160
4064
|
|
|
4161
4065
|
/**
|
|
4162
4066
|
* --------------------------------------------------------------------------
|
|
4163
|
-
* CoreUI
|
|
4164
|
-
* Licensed under MIT (https://
|
|
4067
|
+
* CoreUI util/focustrap.js
|
|
4068
|
+
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
4165
4069
|
*
|
|
4166
4070
|
* This is a modified version of the Bootstrap's util/focustrap.js
|
|
4167
4071
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
4168
4072
|
* --------------------------------------------------------------------------
|
|
4169
4073
|
*/
|
|
4170
4074
|
|
|
4075
|
+
|
|
4171
4076
|
/**
|
|
4172
4077
|
* Constants
|
|
4173
4078
|
*/
|
|
@@ -4261,14 +4166,116 @@
|
|
|
4261
4166
|
|
|
4262
4167
|
/**
|
|
4263
4168
|
* --------------------------------------------------------------------------
|
|
4264
|
-
* CoreUI
|
|
4265
|
-
* Licensed under MIT (https://
|
|
4169
|
+
* CoreUI util/scrollBar.js
|
|
4170
|
+
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
4171
|
+
*
|
|
4172
|
+
* This is a modified version of the Bootstrap's util/scrollBar.js
|
|
4173
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
4174
|
+
* --------------------------------------------------------------------------
|
|
4175
|
+
*/
|
|
4176
|
+
|
|
4177
|
+
|
|
4178
|
+
/**
|
|
4179
|
+
* Constants
|
|
4180
|
+
*/
|
|
4181
|
+
|
|
4182
|
+
const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
|
|
4183
|
+
const SELECTOR_STICKY_CONTENT = '.sticky-top';
|
|
4184
|
+
const PROPERTY_PADDING = 'padding-right';
|
|
4185
|
+
const PROPERTY_MARGIN = 'margin-right';
|
|
4186
|
+
|
|
4187
|
+
/**
|
|
4188
|
+
* Class definition
|
|
4189
|
+
*/
|
|
4190
|
+
|
|
4191
|
+
class ScrollBarHelper {
|
|
4192
|
+
constructor() {
|
|
4193
|
+
this._element = document.body;
|
|
4194
|
+
}
|
|
4195
|
+
|
|
4196
|
+
// Public
|
|
4197
|
+
getWidth() {
|
|
4198
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
|
|
4199
|
+
const documentWidth = document.documentElement.clientWidth;
|
|
4200
|
+
return Math.abs(window.innerWidth - documentWidth);
|
|
4201
|
+
}
|
|
4202
|
+
hide() {
|
|
4203
|
+
const width = this.getWidth();
|
|
4204
|
+
this._disableOverFlow();
|
|
4205
|
+
// give padding to element to balance the hidden scrollbar width
|
|
4206
|
+
this._setElementAttributes(this._element, PROPERTY_PADDING, calculatedValue => calculatedValue + width);
|
|
4207
|
+
// trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth
|
|
4208
|
+
this._setElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING, calculatedValue => calculatedValue + width);
|
|
4209
|
+
this._setElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN, calculatedValue => calculatedValue - width);
|
|
4210
|
+
}
|
|
4211
|
+
reset() {
|
|
4212
|
+
this._resetElementAttributes(this._element, 'overflow');
|
|
4213
|
+
this._resetElementAttributes(this._element, PROPERTY_PADDING);
|
|
4214
|
+
this._resetElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING);
|
|
4215
|
+
this._resetElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN);
|
|
4216
|
+
}
|
|
4217
|
+
isOverflowing() {
|
|
4218
|
+
return this.getWidth() > 0;
|
|
4219
|
+
}
|
|
4220
|
+
|
|
4221
|
+
// Private
|
|
4222
|
+
_disableOverFlow() {
|
|
4223
|
+
this._saveInitialAttribute(this._element, 'overflow');
|
|
4224
|
+
this._element.style.overflow = 'hidden';
|
|
4225
|
+
}
|
|
4226
|
+
_setElementAttributes(selector, styleProperty, callback) {
|
|
4227
|
+
const scrollbarWidth = this.getWidth();
|
|
4228
|
+
const manipulationCallBack = element => {
|
|
4229
|
+
if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) {
|
|
4230
|
+
return;
|
|
4231
|
+
}
|
|
4232
|
+
this._saveInitialAttribute(element, styleProperty);
|
|
4233
|
+
const calculatedValue = window.getComputedStyle(element).getPropertyValue(styleProperty);
|
|
4234
|
+
element.style.setProperty(styleProperty, `${callback(Number.parseFloat(calculatedValue))}px`);
|
|
4235
|
+
};
|
|
4236
|
+
this._applyManipulationCallback(selector, manipulationCallBack);
|
|
4237
|
+
}
|
|
4238
|
+
_saveInitialAttribute(element, styleProperty) {
|
|
4239
|
+
const actualValue = element.style.getPropertyValue(styleProperty);
|
|
4240
|
+
if (actualValue) {
|
|
4241
|
+
Manipulator.setDataAttribute(element, styleProperty, actualValue);
|
|
4242
|
+
}
|
|
4243
|
+
}
|
|
4244
|
+
_resetElementAttributes(selector, styleProperty) {
|
|
4245
|
+
const manipulationCallBack = element => {
|
|
4246
|
+
const value = Manipulator.getDataAttribute(element, styleProperty);
|
|
4247
|
+
// We only want to remove the property if the value is `null`; the value can also be zero
|
|
4248
|
+
if (value === null) {
|
|
4249
|
+
element.style.removeProperty(styleProperty);
|
|
4250
|
+
return;
|
|
4251
|
+
}
|
|
4252
|
+
Manipulator.removeDataAttribute(element, styleProperty);
|
|
4253
|
+
element.style.setProperty(styleProperty, value);
|
|
4254
|
+
};
|
|
4255
|
+
this._applyManipulationCallback(selector, manipulationCallBack);
|
|
4256
|
+
}
|
|
4257
|
+
_applyManipulationCallback(selector, callBack) {
|
|
4258
|
+
if (isElement$1(selector)) {
|
|
4259
|
+
callBack(selector);
|
|
4260
|
+
return;
|
|
4261
|
+
}
|
|
4262
|
+
for (const sel of SelectorEngine.find(selector, this._element)) {
|
|
4263
|
+
callBack(sel);
|
|
4264
|
+
}
|
|
4265
|
+
}
|
|
4266
|
+
}
|
|
4267
|
+
|
|
4268
|
+
/**
|
|
4269
|
+
* --------------------------------------------------------------------------
|
|
4270
|
+
* CoreUI modal.js
|
|
4271
|
+
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
4266
4272
|
*
|
|
4267
4273
|
* This component is a modified version of the Bootstrap's modal.js
|
|
4268
4274
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
4269
4275
|
* --------------------------------------------------------------------------
|
|
4270
4276
|
*/
|
|
4271
4277
|
|
|
4278
|
+
|
|
4272
4279
|
/**
|
|
4273
4280
|
* Constants
|
|
4274
4281
|
*/
|
|
@@ -4370,9 +4377,8 @@
|
|
|
4370
4377
|
this._queueCallback(() => this._hideModal(), this._element, this._isAnimated());
|
|
4371
4378
|
}
|
|
4372
4379
|
dispose() {
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
}
|
|
4380
|
+
EventHandler.off(window, EVENT_KEY$6);
|
|
4381
|
+
EventHandler.off(this._dialog, EVENT_KEY$6);
|
|
4376
4382
|
this._backdrop.dispose();
|
|
4377
4383
|
this._focustrap.deactivate();
|
|
4378
4384
|
super.dispose();
|
|
@@ -4427,7 +4433,6 @@
|
|
|
4427
4433
|
return;
|
|
4428
4434
|
}
|
|
4429
4435
|
if (this._config.keyboard) {
|
|
4430
|
-
event.preventDefault();
|
|
4431
4436
|
this.hide();
|
|
4432
4437
|
return;
|
|
4433
4438
|
}
|
|
@@ -4570,11 +4575,12 @@
|
|
|
4570
4575
|
|
|
4571
4576
|
/**
|
|
4572
4577
|
* --------------------------------------------------------------------------
|
|
4573
|
-
* CoreUI
|
|
4574
|
-
* Licensed under MIT (https://
|
|
4578
|
+
* CoreUI navigation.js
|
|
4579
|
+
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
4575
4580
|
* --------------------------------------------------------------------------
|
|
4576
4581
|
*/
|
|
4577
4582
|
|
|
4583
|
+
|
|
4578
4584
|
/**
|
|
4579
4585
|
* ------------------------------------------------------------------------
|
|
4580
4586
|
* Constants
|
|
@@ -4824,14 +4830,15 @@
|
|
|
4824
4830
|
|
|
4825
4831
|
/**
|
|
4826
4832
|
* --------------------------------------------------------------------------
|
|
4827
|
-
* CoreUI
|
|
4828
|
-
* Licensed under MIT (https://
|
|
4833
|
+
* CoreUI offcanvas.js
|
|
4834
|
+
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
4829
4835
|
*
|
|
4830
4836
|
* This component is a modified version of the Bootstrap's offcanvas.js
|
|
4831
4837
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
|
4832
4838
|
* --------------------------------------------------------------------------
|
|
4833
4839
|
*/
|
|
4834
4840
|
|
|
4841
|
+
|
|
4835
4842
|
/**
|
|
4836
4843
|
* Constants
|
|
4837
4844
|
*/
|
|
@@ -4985,11 +4992,11 @@
|
|
|
4985
4992
|
if (event.key !== ESCAPE_KEY) {
|
|
4986
4993
|
return;
|
|
4987
4994
|
}
|
|
4988
|
-
if (
|
|
4989
|
-
|
|
4995
|
+
if (this._config.keyboard) {
|
|
4996
|
+
this.hide();
|
|
4990
4997
|
return;
|
|
4991
4998
|
}
|
|
4992
|
-
this.
|
|
4999
|
+
EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);
|
|
4993
5000
|
});
|
|
4994
5001
|
}
|
|
4995
5002
|
|
|
@@ -5057,42 +5064,16 @@
|
|
|
5057
5064
|
|
|
5058
5065
|
/**
|
|
5059
5066
|
* --------------------------------------------------------------------------
|
|
5060
|
-
* CoreUI
|
|
5061
|
-
* Licensed under MIT (https://
|
|
5067
|
+
* CoreUI util/sanitizer.js
|
|
5068
|
+
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
5062
5069
|
*
|
|
5063
5070
|
* This is a modified version of the Bootstrap's util/sanitizer.js
|
|
5064
5071
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
5065
5072
|
* --------------------------------------------------------------------------
|
|
5066
5073
|
*/
|
|
5067
5074
|
|
|
5068
|
-
|
|
5075
|
+
// js-docs-start allow-list
|
|
5069
5076
|
const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
|
|
5070
|
-
|
|
5071
|
-
/**
|
|
5072
|
-
* A pattern that recognizes a commonly useful subset of URLs that are safe.
|
|
5073
|
-
*
|
|
5074
|
-
* Shout-out to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
|
|
5075
|
-
*/
|
|
5076
|
-
const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i;
|
|
5077
|
-
|
|
5078
|
-
/**
|
|
5079
|
-
* A pattern that matches safe data URLs. Only matches image, video and audio types.
|
|
5080
|
-
*
|
|
5081
|
-
* Shout-out to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
|
|
5082
|
-
*/
|
|
5083
|
-
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;
|
|
5084
|
-
const allowedAttribute = (attribute, allowedAttributeList) => {
|
|
5085
|
-
const attributeName = attribute.nodeName.toLowerCase();
|
|
5086
|
-
if (allowedAttributeList.includes(attributeName)) {
|
|
5087
|
-
if (uriAttributes.has(attributeName)) {
|
|
5088
|
-
return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue) || DATA_URL_PATTERN.test(attribute.nodeValue));
|
|
5089
|
-
}
|
|
5090
|
-
return true;
|
|
5091
|
-
}
|
|
5092
|
-
|
|
5093
|
-
// Check if a regular expression validates the attribute.
|
|
5094
|
-
return allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp).some(regex => regex.test(attributeName));
|
|
5095
|
-
};
|
|
5096
5077
|
const DefaultAllowlist = {
|
|
5097
5078
|
// Global attributes allowed on any supplied element below.
|
|
5098
5079
|
'*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
|
|
@@ -5126,6 +5107,30 @@
|
|
|
5126
5107
|
u: [],
|
|
5127
5108
|
ul: []
|
|
5128
5109
|
};
|
|
5110
|
+
// js-docs-end allow-list
|
|
5111
|
+
|
|
5112
|
+
const uriAttributes = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);
|
|
5113
|
+
|
|
5114
|
+
/**
|
|
5115
|
+
* A pattern that recognizes URLs that are safe wrt. XSS in URL navigation
|
|
5116
|
+
* contexts.
|
|
5117
|
+
*
|
|
5118
|
+
* Shout-out to Angular https://github.com/angular/angular/blob/15.2.8/packages/core/src/sanitization/url_sanitizer.ts#L38
|
|
5119
|
+
*/
|
|
5120
|
+
// eslint-disable-next-line unicorn/better-regex
|
|
5121
|
+
const SAFE_URL_PATTERN = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i;
|
|
5122
|
+
const allowedAttribute = (attribute, allowedAttributeList) => {
|
|
5123
|
+
const attributeName = attribute.nodeName.toLowerCase();
|
|
5124
|
+
if (allowedAttributeList.includes(attributeName)) {
|
|
5125
|
+
if (uriAttributes.has(attributeName)) {
|
|
5126
|
+
return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue));
|
|
5127
|
+
}
|
|
5128
|
+
return true;
|
|
5129
|
+
}
|
|
5130
|
+
|
|
5131
|
+
// Check if a regular expression validates the attribute.
|
|
5132
|
+
return allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp).some(regex => regex.test(attributeName));
|
|
5133
|
+
};
|
|
5129
5134
|
function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) {
|
|
5130
5135
|
if (!unsafeHtml.length) {
|
|
5131
5136
|
return unsafeHtml;
|
|
@@ -5155,14 +5160,15 @@
|
|
|
5155
5160
|
|
|
5156
5161
|
/**
|
|
5157
5162
|
* --------------------------------------------------------------------------
|
|
5158
|
-
* CoreUI
|
|
5159
|
-
* Licensed under MIT (https://
|
|
5163
|
+
* CoreUI util/template-factory.js
|
|
5164
|
+
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
5160
5165
|
*
|
|
5161
5166
|
* This is a modified version of the Bootstrap's util/template-factory.js
|
|
5162
5167
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
5163
5168
|
* --------------------------------------------------------------------------
|
|
5164
5169
|
*/
|
|
5165
5170
|
|
|
5171
|
+
|
|
5166
5172
|
/**
|
|
5167
5173
|
* Constants
|
|
5168
5174
|
*/
|
|
@@ -5293,14 +5299,15 @@
|
|
|
5293
5299
|
|
|
5294
5300
|
/**
|
|
5295
5301
|
* --------------------------------------------------------------------------
|
|
5296
|
-
* CoreUI
|
|
5297
|
-
* Licensed under MIT (https://
|
|
5302
|
+
* CoreUI tooltip.js
|
|
5303
|
+
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
5298
5304
|
*
|
|
5299
5305
|
* This component is a modified version of the Bootstrap's tooltip.js
|
|
5300
5306
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
5301
5307
|
* --------------------------------------------------------------------------
|
|
5302
5308
|
*/
|
|
5303
5309
|
|
|
5310
|
+
|
|
5304
5311
|
/**
|
|
5305
5312
|
* Constants
|
|
5306
5313
|
*/
|
|
@@ -5343,7 +5350,7 @@
|
|
|
5343
5350
|
delay: 0,
|
|
5344
5351
|
fallbackPlacements: ['top', 'right', 'bottom', 'left'],
|
|
5345
5352
|
html: false,
|
|
5346
|
-
offset: [0,
|
|
5353
|
+
offset: [0, 6],
|
|
5347
5354
|
placement: 'top',
|
|
5348
5355
|
popperConfig: null,
|
|
5349
5356
|
sanitize: true,
|
|
@@ -5456,7 +5463,7 @@
|
|
|
5456
5463
|
return;
|
|
5457
5464
|
}
|
|
5458
5465
|
|
|
5459
|
-
//
|
|
5466
|
+
// TODO: v6 remove this or make it optional
|
|
5460
5467
|
this._disposePopper();
|
|
5461
5468
|
const tip = this._getTipElement();
|
|
5462
5469
|
this._element.setAttribute('aria-describedby', tip.getAttribute('id'));
|
|
@@ -5542,12 +5549,12 @@
|
|
|
5542
5549
|
_createTipElement(content) {
|
|
5543
5550
|
const tip = this._getTemplateFactory(content).toHtml();
|
|
5544
5551
|
|
|
5545
|
-
//
|
|
5552
|
+
// TODO: remove this check in v6
|
|
5546
5553
|
if (!tip) {
|
|
5547
5554
|
return null;
|
|
5548
5555
|
}
|
|
5549
5556
|
tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$3);
|
|
5550
|
-
//
|
|
5557
|
+
// TODO: v6 the following can be achieved with CSS only
|
|
5551
5558
|
tip.classList.add(`bs-${this.constructor.NAME}-auto`);
|
|
5552
5559
|
const tipId = getUID(this.constructor.NAME).toString();
|
|
5553
5560
|
tip.setAttribute('id', tipId);
|
|
@@ -5807,14 +5814,15 @@
|
|
|
5807
5814
|
|
|
5808
5815
|
/**
|
|
5809
5816
|
* --------------------------------------------------------------------------
|
|
5810
|
-
* CoreUI
|
|
5811
|
-
* Licensed under MIT (https://
|
|
5817
|
+
* CoreUI popover.js
|
|
5818
|
+
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
5812
5819
|
*
|
|
5813
5820
|
* This component is a modified version of the Bootstrap's popover.js
|
|
5814
5821
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
5815
5822
|
* --------------------------------------------------------------------------
|
|
5816
5823
|
*/
|
|
5817
5824
|
|
|
5825
|
+
|
|
5818
5826
|
/**
|
|
5819
5827
|
* Constants
|
|
5820
5828
|
*/
|
|
@@ -5890,14 +5898,15 @@
|
|
|
5890
5898
|
|
|
5891
5899
|
/**
|
|
5892
5900
|
* --------------------------------------------------------------------------
|
|
5893
|
-
* CoreUI
|
|
5894
|
-
* Licensed under MIT (https://
|
|
5901
|
+
* CoreUI scrollspy.js
|
|
5902
|
+
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
5895
5903
|
*
|
|
5896
5904
|
* This component is a modified version of the Bootstrap's scrollspy.js
|
|
5897
5905
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
5898
5906
|
* --------------------------------------------------------------------------
|
|
5899
5907
|
*/
|
|
5900
5908
|
|
|
5909
|
+
|
|
5901
5910
|
/**
|
|
5902
5911
|
* Constants
|
|
5903
5912
|
*/
|
|
@@ -6076,11 +6085,11 @@
|
|
|
6076
6085
|
if (!anchor.hash || isDisabled(anchor)) {
|
|
6077
6086
|
continue;
|
|
6078
6087
|
}
|
|
6079
|
-
const observableSection = SelectorEngine.findOne(anchor.hash, this._element);
|
|
6088
|
+
const observableSection = SelectorEngine.findOne(decodeURI(anchor.hash), this._element);
|
|
6080
6089
|
|
|
6081
6090
|
// ensure that the observableSection exists & is visible
|
|
6082
6091
|
if (isVisible(observableSection)) {
|
|
6083
|
-
this._targetLinks.set(anchor.hash, anchor);
|
|
6092
|
+
this._targetLinks.set(decodeURI(anchor.hash), anchor);
|
|
6084
6093
|
this._observableSections.set(anchor.hash, observableSection);
|
|
6085
6094
|
}
|
|
6086
6095
|
}
|
|
@@ -6152,11 +6161,12 @@
|
|
|
6152
6161
|
|
|
6153
6162
|
/**
|
|
6154
6163
|
* --------------------------------------------------------------------------
|
|
6155
|
-
* CoreUI
|
|
6156
|
-
* Licensed under MIT (https://
|
|
6164
|
+
* CoreUI sidebar.js
|
|
6165
|
+
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
6157
6166
|
* --------------------------------------------------------------------------
|
|
6158
6167
|
*/
|
|
6159
6168
|
|
|
6169
|
+
|
|
6160
6170
|
/**
|
|
6161
6171
|
* ------------------------------------------------------------------------
|
|
6162
6172
|
* Constants
|
|
@@ -6432,14 +6442,15 @@
|
|
|
6432
6442
|
|
|
6433
6443
|
/**
|
|
6434
6444
|
* --------------------------------------------------------------------------
|
|
6435
|
-
* CoreUI
|
|
6436
|
-
* Licensed under MIT (https://
|
|
6445
|
+
* CoreUI tab.js
|
|
6446
|
+
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
6437
6447
|
*
|
|
6438
6448
|
* This component is a modified version of the Bootstrap's tab.js
|
|
6439
6449
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
6440
6450
|
* --------------------------------------------------------------------------
|
|
6441
6451
|
*/
|
|
6442
6452
|
|
|
6453
|
+
|
|
6443
6454
|
/**
|
|
6444
6455
|
* Constants
|
|
6445
6456
|
*/
|
|
@@ -6468,7 +6479,7 @@
|
|
|
6468
6479
|
const SELECTOR_TAB_PANEL = '.list-group, .nav, [role="tablist"]';
|
|
6469
6480
|
const SELECTOR_OUTER = '.nav-item, .list-group-item';
|
|
6470
6481
|
const SELECTOR_INNER = `.nav-link${NOT_SELECTOR_DROPDOWN_TOGGLE}, .list-group-item${NOT_SELECTOR_DROPDOWN_TOGGLE}, [role="tab"]${NOT_SELECTOR_DROPDOWN_TOGGLE}`;
|
|
6471
|
-
const SELECTOR_DATA_TOGGLE = '[data-coreui-toggle="tab"], [data-coreui-toggle="pill"], [data-coreui-toggle="list"]'; //
|
|
6482
|
+
const SELECTOR_DATA_TOGGLE = '[data-coreui-toggle="tab"], [data-coreui-toggle="pill"], [data-coreui-toggle="list"]'; // TODO: could only be `tab` in v6
|
|
6472
6483
|
const SELECTOR_INNER_ELEM = `${SELECTOR_INNER}, ${SELECTOR_DATA_TOGGLE}`;
|
|
6473
6484
|
const SELECTOR_DATA_TOGGLE_ACTIVE = `.${CLASS_NAME_ACTIVE}[data-coreui-toggle="tab"], .${CLASS_NAME_ACTIVE}[data-coreui-toggle="pill"], .${CLASS_NAME_ACTIVE}[data-coreui-toggle="list"]`;
|
|
6474
6485
|
|
|
@@ -6482,7 +6493,7 @@
|
|
|
6482
6493
|
this._parent = this._element.closest(SELECTOR_TAB_PANEL);
|
|
6483
6494
|
if (!this._parent) {
|
|
6484
6495
|
return;
|
|
6485
|
-
//
|
|
6496
|
+
// TODO: should throw exception in v6
|
|
6486
6497
|
// throw new TypeError(`${element.outerHTML} has not a valid parent ${SELECTOR_INNER_ELEM}`)
|
|
6487
6498
|
}
|
|
6488
6499
|
|
|
@@ -6614,7 +6625,7 @@
|
|
|
6614
6625
|
}
|
|
6615
6626
|
this._setAttributeIfNotExists(target, 'role', 'tabpanel');
|
|
6616
6627
|
if (child.id) {
|
|
6617
|
-
this._setAttributeIfNotExists(target, 'aria-labelledby',
|
|
6628
|
+
this._setAttributeIfNotExists(target, 'aria-labelledby', `${child.id}`);
|
|
6618
6629
|
}
|
|
6619
6630
|
}
|
|
6620
6631
|
_toggleDropDown(element, open) {
|
|
@@ -6696,14 +6707,15 @@
|
|
|
6696
6707
|
|
|
6697
6708
|
/**
|
|
6698
6709
|
* --------------------------------------------------------------------------
|
|
6699
|
-
* CoreUI
|
|
6700
|
-
* Licensed under MIT (https://
|
|
6710
|
+
* CoreUI toast.js
|
|
6711
|
+
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
6701
6712
|
*
|
|
6702
6713
|
* This component is a modified version of the Bootstrap's toast.js
|
|
6703
6714
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
6704
6715
|
* --------------------------------------------------------------------------
|
|
6705
6716
|
*/
|
|
6706
6717
|
|
|
6718
|
+
|
|
6707
6719
|
/**
|
|
6708
6720
|
* Constants
|
|
6709
6721
|
*/
|
|
@@ -6882,10 +6894,11 @@
|
|
|
6882
6894
|
|
|
6883
6895
|
/**
|
|
6884
6896
|
* --------------------------------------------------------------------------
|
|
6885
|
-
* CoreUI
|
|
6886
|
-
* Licensed under MIT (https://
|
|
6897
|
+
* CoreUI index.esm.js
|
|
6898
|
+
* Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
|
|
6887
6899
|
* --------------------------------------------------------------------------
|
|
6888
6900
|
*/
|
|
6901
|
+
|
|
6889
6902
|
const index_umd = {
|
|
6890
6903
|
Alert,
|
|
6891
6904
|
Button,
|