gd-bs 5.4.1 → 5.4.4

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/src/bs.scss CHANGED
@@ -41,6 +41,7 @@
41
41
  @import "~bootstrap/scss/placeholders";
42
42
  }
43
43
 
44
+
44
45
  /** Helpers */
45
46
 
46
47
  @import "~bootstrap/scss/helpers";
@@ -88,17 +89,19 @@
88
89
  margin-bottom: 0;
89
90
  }
90
91
  /* Color match breadcrumb links */
91
- .breadcrumb-item.active, .breadcrumb-item > a {
92
+ .breadcrumb-item.active,
93
+ .breadcrumb-item>a {
92
94
  color: #fff;
93
95
  text-decoration: none;
94
96
  }
95
97
  /* Color match breadcrumb hover links */
96
- .breadcrumb-item > a:hover, .breadcrumb-item > a:focus {
98
+ .breadcrumb-item>a:hover,
99
+ .breadcrumb-item>a:focus {
97
100
  color: #dee2e6;
98
101
  text-decoration: underline;
99
102
  }
100
103
  /* Color match breadcrumb active links */
101
- .breadcrumb-item > a:active {
104
+ .breadcrumb-item>a:active {
102
105
  color: #333333;
103
106
  font-weight: 500;
104
107
  text-decoration: underline;
@@ -223,7 +226,8 @@
223
226
  border-color: #6c757d;
224
227
  }
225
228
  /* Color match disabled form elements */
226
- .form-control:disabled, .form-control[readonly] {
229
+ .form-control:disabled,
230
+ .form-control[readonly] {
227
231
  border-color: #eaeaea;
228
232
  color: #a6a6a6;
229
233
  }
@@ -290,7 +294,7 @@
290
294
  /* Fix padding on the nav links */
291
295
  .nav-link {
292
296
  color: #0078d4;
293
- padding: 0 !important;
297
+ /* padding: 0 !important; Removing this by default. */
294
298
  }
295
299
  /* Set background color and border for nav-tabs */
296
300
  .nav-tabs .nav-link {
@@ -414,7 +418,9 @@
414
418
  }
415
419
  }
416
420
 
421
+
417
422
  /** Modal background - Shouldn't be under the .bs class */
423
+
418
424
  .modal-backdrop {
419
425
  position: fixed;
420
426
  top: 0;
@@ -432,7 +438,9 @@
432
438
  }
433
439
  }
434
440
 
441
+
435
442
  /** Offcanvas background - Shouldn't be under the .bs class */
443
+
436
444
  .offcanvas-backdrop {
437
445
  position: fixed;
438
446
  top: 0;
@@ -450,23 +458,33 @@
450
458
  }
451
459
  }
452
460
 
461
+
453
462
  /* Center the dataTables_info element properly */
463
+
454
464
  div.dataTables_wrapper div.dataTables_info {
455
465
  padding-top: 0.9rem;
456
466
  }
457
467
 
468
+
458
469
  /* Add proper width for dataTables_length select */
470
+
459
471
  div.dataTables_wrapper div.dataTables_length select {
460
472
  width: 3.75rem;
461
473
  }
462
474
 
475
+
463
476
  /* Color match colReorder line */
477
+
464
478
  div.DTCR_pointer {
465
479
  background-color: #0078d4;
466
480
  }
467
481
 
482
+
468
483
  /* Be sure to escape any characters, such as # to %23 when specifying hex color values in background-image */
484
+
485
+
469
486
  /* DataTables sorting with Bootstrap Icons */
487
+
470
488
  table.dataTable thead .sorting,
471
489
  table.dataTable thead .sorting_asc,
472
490
  table.dataTable thead .sorting_desc,
@@ -489,21 +507,28 @@ table.dataTable thead .sorting_desc_disabled:after {
489
507
  content: "" !important;
490
508
  }
491
509
 
510
+
492
511
  /* Bootstrap Icon: caret-up */
512
+
493
513
  table.dataTable thead .sorting {
494
514
  background-image: url("data:image/svg+xml,<svg viewBox='0 0 16 16' fill='%236c757d' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' d='M3.204 11L8 5.519 12.796 11H3.204zm-.753-.659l4.796-5.48a1 1 0 0 1 1.506 0l4.796 5.48c.566.647.106 1.659-.753 1.659H3.204a1 1 0 0 1-.753-1.659z'/></svg>");
495
515
  }
496
516
 
517
+
497
518
  /* Bootstrap Icon: caret-up-fill */
519
+
498
520
  table.dataTable thead .sorting_asc {
499
521
  background-image: url("data:image/svg+xml,<svg viewBox='0 0 16 16' fill='%236c757d' xmlns='http://www.w3.org/2000/svg'><path d='M7.247 4.86l-4.796 5.481c-.566.647-.106 1.659.753 1.659h9.592a1 1 0 0 0 .753-1.659l-4.796-5.48a1 1 0 0 0-1.506 0z'/></svg>");
500
522
  }
501
523
 
524
+
502
525
  /* Bootstrap Icon: caret-down-fill */
526
+
503
527
  table.dataTable thead .sorting_desc {
504
528
  background-image: url("data:image/svg+xml,<svg viewBox='0 0 16 16' fill='%236c757d' xmlns='http://www.w3.org/2000/svg'><path d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/></svg>");
505
529
  }
506
530
 
531
+
507
532
  /* Tippy Tooltip primary theme color */
508
533
 
509
534
  .tippy-box[data-theme~='primary'] {
@@ -526,6 +551,7 @@ table.dataTable thead .sorting_desc {
526
551
  border-right-color: #0078d4;
527
552
  }
528
553
 
554
+
529
555
  /* Tippy Tooltip secondary theme color */
530
556
 
531
557
  .tippy-box[data-theme~='secondary'] {
@@ -548,6 +574,7 @@ table.dataTable thead .sorting_desc {
548
574
  border-right-color: #6c757d;
549
575
  }
550
576
 
577
+
551
578
  /* Tippy Tooltip success theme color */
552
579
 
553
580
  .tippy-box[data-theme~='success'] {
@@ -570,6 +597,7 @@ table.dataTable thead .sorting_desc {
570
597
  border-right-color: #198754;
571
598
  }
572
599
 
600
+
573
601
  /* Tippy Tooltip info theme color */
574
602
 
575
603
  .tippy-box[data-theme~='info'] {
@@ -593,6 +621,7 @@ table.dataTable thead .sorting_desc {
593
621
  border-right-color: #0dcaf0;
594
622
  }
595
623
 
624
+
596
625
  /* Tippy Tooltip warning theme color */
597
626
 
598
627
  .tippy-box[data-theme~='warning'] {
@@ -616,6 +645,7 @@ table.dataTable thead .sorting_desc {
616
645
  border-right-color: #ffc107;
617
646
  }
618
647
 
648
+
619
649
  /* Tippy Tooltip danger theme color */
620
650
 
621
651
  .tippy-box[data-theme~='danger'] {
@@ -638,6 +668,7 @@ table.dataTable thead .sorting_desc {
638
668
  border-right-color: #dc3545;
639
669
  }
640
670
 
671
+
641
672
  /* Tippy Tooltip light theme color - override Tippy default to match Bootstrap */
642
673
 
643
674
  .tippy-box[data-theme~='light'] {
@@ -661,6 +692,7 @@ table.dataTable thead .sorting_desc {
661
692
  border-right-color: #f8f9fa !important;
662
693
  }
663
694
 
695
+
664
696
  /* Tippy Tooltip dark theme color */
665
697
 
666
698
  .tippy-box[data-theme~='dark'] {
@@ -681,4 +713,4 @@ table.dataTable thead .sorting_desc {
681
713
 
682
714
  .tippy-box[data-theme~='dark'][data-placement^='right']>.tippy-arrow::before {
683
715
  border-right-color: #212529;
684
- }
716
+ }
@@ -59,6 +59,9 @@ class _Carousel extends Base<ICarouselProps> implements ICarousel {
59
59
  this.nextWhenVisible(options.slide);
60
60
  }
61
61
  }
62
+
63
+ // Call the event if it exists
64
+ this.props.onRendered ? this.props.onRendered(this.el, this.props) : null;
62
65
  }
63
66
 
64
67
  // Configures the events
@@ -73,12 +76,12 @@ class _Carousel extends Base<ICarouselProps> implements ICarousel {
73
76
  // Add a keydown event
74
77
  el.addEventListener("keydown", (ev) => {
75
78
  // See if the left arrow was pressed
76
- if (ev.keyCode == 37) {
79
+ if (ev.code == "37") {
77
80
  // Move to the previous slide
78
81
  this.previous();
79
82
  }
80
83
  // Else, see if the right arrow was pressed
81
- else if (ev.keyCode == 39) {
84
+ else if (ev.code == "39") {
82
85
  // Move tot he next slide
83
86
  this.next();
84
87
  }
@@ -220,6 +223,9 @@ class _Carousel extends Base<ICarouselProps> implements ICarousel {
220
223
 
221
224
  // Create the item element
222
225
  slides.appendChild(slide.el);
226
+
227
+ // Call the event
228
+ this.props.onSlideRendered ? this.props.onSlideRendered(slide.el, items[i]) : null;
223
229
  }
224
230
  }
225
231
  }
@@ -48,6 +48,9 @@ export class CarouselItem {
48
48
  // Append the content
49
49
  appendContent(this._el, this._props.content);
50
50
  }
51
+
52
+ // Call the event if it exists
53
+ this._props.onRendered ? this._props.onRendered(this._el, this._props) : null;
51
54
  }
52
55
 
53
56
  /**
@@ -124,6 +124,7 @@ export interface ICarouselItem<T = Element> {
124
124
  imageAlt?: string;
125
125
  imageUrl?: string;
126
126
  isActive?: boolean;
127
+ onRendered?: (el?: HTMLElement, props?: ICarouselItem) => void;
127
128
  }
128
129
 
129
130
  /**
@@ -147,5 +148,7 @@ export interface ICarouselProps<T = Element> extends IBaseProps<ICarousel> {
147
148
  id?: string;
148
149
  isDark?: boolean;
149
150
  items?: Array<ICarouselItem<T>>;
151
+ onRendered?: (el?: HTMLElement, props?: ICarouselProps) => void;
152
+ onSlideRendered?: (el?: HTMLElement, props?: ICarouselItem) => void;
150
153
  options?: ICarouselOptions;
151
154
  }
@@ -125,8 +125,9 @@ export class DropdownItem {
125
125
  // Prevent the page from moving to the top
126
126
  ev.preventDefault();
127
127
 
128
- // See if we are selecting items
129
- if (this._parent.autoSelect) {
128
+ // See if we are automatically selecting items
129
+ let autoSelect = typeof (this._parent.autoSelect) === "boolean" ? this._parent.autoSelect : true;
130
+ if (autoSelect) {
130
131
  // Toggle the item
131
132
  this.toggle();
132
133
  }
@@ -195,7 +195,7 @@ class _Modal extends Base<IModalProps> implements IModal {
195
195
  // Add a click event
196
196
  (this.el as HTMLElement).addEventListener("keydown", ev => {
197
197
  // See if the escape key was clicked and the modal is visible
198
- if (ev.keyCode === 27 && this.isVisible) {
198
+ if (ev.code === "27" && this.isVisible) {
199
199
  // Toggle the modal
200
200
  this.toggle();
201
201
  }
@@ -95,7 +95,7 @@ class _Navbar extends Base<INavbarProps> implements INavbar {
95
95
  // Set a keydown event to catch the "Enter" key being pressed
96
96
  searchbox.addEventListener("keydown", ev => {
97
97
  // See if the "Enter" key was pressed
98
- if (ev.keyCode == 13) {
98
+ if (ev.code == "13") {
99
99
  // Disable the postback
100
100
  ev.preventDefault();
101
101
 
@@ -144,7 +144,7 @@ class _Offcanvas extends Base<IOffcanvasProps> implements IOffcanvas {
144
144
  // Add a click event
145
145
  (this.el as HTMLElement).addEventListener("keydown", ev => {
146
146
  // See if the escape key was clicked and the modal is visible
147
- if (ev.keyCode === 27 && this.isVisible) {
147
+ if (ev.code === "27" && this.isVisible) {
148
148
  // Toggle the modal
149
149
  this.toggle();
150
150
  }