playbook_ui 14.19.0.pre.rc.0 → 14.19.0.pre.rc.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.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +304 -21
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +5 -1
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +6 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color.jsx +80 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color.md +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color_rails.html.erb +58 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color_rails.md +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +3 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.html.erb +43 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.html.erb +55 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors_rails.md +1 -0
- data/app/pb_kits/playbook/pb_draggable/docs/example.yml +2 -1
- data/app/pb_kits/playbook/pb_draggable/draggable.rb +9 -1
- data/app/pb_kits/playbook/pb_draggable/index.js +139 -142
- data/app/pb_kits/playbook/pb_filter/docs/_filter_within_turbo_frames.html.erb +41 -0
- data/app/pb_kits/playbook/pb_filter/docs/_filter_within_turbo_frames.md +1 -0
- data/app/pb_kits/playbook/pb_filter/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.jsx +52 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.md +1 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_line_graph/lineGraphTheme.ts +110 -0
- data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.html.erb +46 -0
- data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.md +1 -0
- data/app/pb_kits/playbook/pb_popover/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_popover/index.ts +13 -1
- data/app/pb_kits/playbook/pb_popover/popover.rb +2 -0
- data/dist/chunks/{_typeahead-BX8IifKY.js → _typeahead-CITBvzU7.js} +1 -1
- data/dist/chunks/_weekday_stacked-C8-PW1nI.js +45 -0
- data/dist/chunks/{lib-96_ZmvAo.js → lib-BmTAc7Nc.js} +1 -1
- data/dist/chunks/{pb_form_validation-Vv2TqXVC.js → pb_form_validation-BWjy4bFn.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +22 -8
- data/dist/chunks/_weekday_stacked-DfMD7HJz.js +0 -45
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_drop_zones_colors.md → _draggable_drop_zones_colors_react.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_drop_zones.md → _draggable_drop_zones_react.md} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1bfa3c16e7e1f49e5b76698d4613e2b06b27e00830bb48899a405eae61ba1a3
|
4
|
+
data.tar.gz: a21c3c47af80c388f1a56bb6177ee8195b2f214e9d8f8b83edfbb932f8e66260
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04bcff4ed98257d0c7249b6fb48550839d4d0a6dbead693604ebe75ca0febad6d0e9641a1e77ee46819b4d861c82c56d1c416e89ffe6fce73b506ce4bff5b04a
|
7
|
+
data.tar.gz: 63de6ea020d1ccaa76279f5a157e78549e9fad3569653880f8df9250e08026db361866a66a8b3369a6e614e29a062faaf94cfa6b0c5d3c62525bc8b9fddef43f
|
@@ -13,6 +13,26 @@
|
|
13
13
|
.pb_advanced_table {
|
14
14
|
$border-color: 1px solid $border_light;
|
15
15
|
|
16
|
+
// Base vertical border color variable setup
|
17
|
+
--column-border-color: #{$border_light};
|
18
|
+
|
19
|
+
// Define color tokens once
|
20
|
+
$border_color_options: (
|
21
|
+
"text_lt_default": $text_lt_default,
|
22
|
+
"text_lt_light": $text_lt_light,
|
23
|
+
"text_lt_lighter": $text_lt_lighter,
|
24
|
+
"text_dk_default": $text_dk_default,
|
25
|
+
"text_dk_light": $text_dk_light,
|
26
|
+
"text_dk_lighter": $text_dk_lighter
|
27
|
+
);
|
28
|
+
|
29
|
+
// Generate classes for each color option
|
30
|
+
@each $color_name, $color_value in $border_color_options {
|
31
|
+
&.column-group-border-#{$color_name} {
|
32
|
+
--column-border-color: #{$color_value};
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
16
36
|
[id$="-span"] {
|
17
37
|
word-wrap: normal;
|
18
38
|
}
|
@@ -346,13 +366,133 @@
|
|
346
366
|
}
|
347
367
|
}
|
348
368
|
|
349
|
-
//
|
369
|
+
// First column separator/border
|
350
370
|
.table-header-cells:first-child,
|
351
371
|
.table-header-cells-custom:first-child,
|
352
372
|
td:first-child,
|
353
373
|
.pb_table_td:first-child,
|
354
374
|
.checkbox-cell.checkbox-cell-header:first-child {
|
355
|
-
box-shadow: 1px 0px 0px 0px
|
375
|
+
box-shadow: 1px 0px 0px 0px var(--column-border-color) !important;
|
376
|
+
}
|
377
|
+
|
378
|
+
// Color for collapsible trail
|
379
|
+
.collapsible-trail {
|
380
|
+
background-color: $border_light !important;
|
381
|
+
position: absolute;
|
382
|
+
top: 0;
|
383
|
+
bottom: 0;
|
384
|
+
width: 2px;
|
385
|
+
}
|
386
|
+
|
387
|
+
// Make sure all horizontal borders use the default border color
|
388
|
+
tr, th, td {
|
389
|
+
border-top-color: $border_light !important;
|
390
|
+
border-bottom-color: $border_light !important;
|
391
|
+
}
|
392
|
+
|
393
|
+
// Apply border colors when columnGroupBorderColor is set
|
394
|
+
&[class*="column-group-border-"] {
|
395
|
+
// For top-level column groups
|
396
|
+
.pb_advanced_table_header {
|
397
|
+
// The main column group headers
|
398
|
+
> tr:first-child {
|
399
|
+
th[colspan]:not([colspan="1"]):not(:last-child) {
|
400
|
+
border-right: 1px solid var(--column-border-color) !important;
|
401
|
+
}
|
402
|
+
}
|
403
|
+
|
404
|
+
// Subgroup headers
|
405
|
+
> tr:nth-child(2) {
|
406
|
+
th[colspan]:not([colspan="1"]):not(:last-child) {
|
407
|
+
border-right: 1px solid var(--column-border-color) !important;
|
408
|
+
}
|
409
|
+
|
410
|
+
// Last cell in each subgroup
|
411
|
+
th.last-header-cell:not(:last-child) {
|
412
|
+
border-right: 1px solid var(--column-border-color) !important;
|
413
|
+
}
|
414
|
+
}
|
415
|
+
|
416
|
+
// Individual column headers at subgroup boundaries
|
417
|
+
> tr:last-child {
|
418
|
+
// Last cell in each subgroup
|
419
|
+
th.last-header-cell:not(:last-child) {
|
420
|
+
border-right: 1px solid var(--column-border-color) !important;
|
421
|
+
}
|
422
|
+
}
|
423
|
+
}
|
424
|
+
|
425
|
+
// For data cells at column group boundaries
|
426
|
+
.pb_advanced_table_body {
|
427
|
+
// Apply to cells that are at column group boundaries
|
428
|
+
td.last-cell:not(:last-child),
|
429
|
+
.pb_table_td.last-cell:not(:last-child) {
|
430
|
+
border-right: 1px solid var(--column-border-color) !important;
|
431
|
+
}
|
432
|
+
|
433
|
+
// Virtualized row cells at column group boundaries
|
434
|
+
tr.virtualized-table-row {
|
435
|
+
td.last-cell:not(:last-child) {
|
436
|
+
border-right: 1px solid var(--column-border-color) !important;
|
437
|
+
}
|
438
|
+
}
|
439
|
+
}
|
440
|
+
|
441
|
+
// Sub-row headers
|
442
|
+
.toggle-content {
|
443
|
+
td {
|
444
|
+
border-bottom: 1px solid $border_light !important;
|
445
|
+
}
|
446
|
+
}
|
447
|
+
}
|
448
|
+
|
449
|
+
// Restore vertical border styling when verticalBorder is true
|
450
|
+
.pb_table[data-vertical-border="true"] {
|
451
|
+
.pb_advanced_table_header {
|
452
|
+
> tr:not(:first-child) {
|
453
|
+
th:not(:last-child) {
|
454
|
+
border-right: 1px solid $border_light !important;
|
455
|
+
}
|
456
|
+
}
|
457
|
+
}
|
458
|
+
|
459
|
+
.pb_advanced_table_body {
|
460
|
+
td:not(:last-child),
|
461
|
+
.pb_table_td:not(:last-child) {
|
462
|
+
border-right: 1px solid $border_light !important;
|
463
|
+
}
|
464
|
+
}
|
465
|
+
|
466
|
+
tr.virtualized-table-row {
|
467
|
+
td:not(:last-child) {
|
468
|
+
border-right: 1px solid $border_light !important;
|
469
|
+
}
|
470
|
+
}
|
471
|
+
|
472
|
+
// When both verticalBorder AND columnGroupBorderColor are set,
|
473
|
+
// override the default border-light with the custom color
|
474
|
+
&.pb_advanced_table[class*="column-group-border-"] {
|
475
|
+
.pb_advanced_table_header {
|
476
|
+
> tr:not(:first-child) {
|
477
|
+
th:not(:last-child) {
|
478
|
+
border-right: 1px solid var(--column-border-color) !important;
|
479
|
+
}
|
480
|
+
}
|
481
|
+
}
|
482
|
+
|
483
|
+
.pb_advanced_table_body {
|
484
|
+
td:not(:last-child),
|
485
|
+
.pb_table_td:not(:last-child) {
|
486
|
+
border-right: 1px solid var(--column-border-color) !important;
|
487
|
+
}
|
488
|
+
}
|
489
|
+
|
490
|
+
tr.virtualized-table-row {
|
491
|
+
td:not(:last-child) {
|
492
|
+
border-right: 1px solid var(--column-border-color) !important;
|
493
|
+
}
|
494
|
+
}
|
495
|
+
}
|
356
496
|
}
|
357
497
|
|
358
498
|
@include chrome_styles($border-color);
|
@@ -375,12 +515,25 @@
|
|
375
515
|
height: auto;
|
376
516
|
}
|
377
517
|
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
518
|
+
// Mixin to apply sticky column styles for different color modes and themes
|
519
|
+
@mixin apply-sticky-colors($theme) {
|
520
|
+
@each $color_name, $color_value in $border_color_options {
|
521
|
+
&.column-group-border-#{$color_name} {
|
522
|
+
@if $theme == "light" {
|
523
|
+
@include advanced-table-sticky-mixin(
|
524
|
+
$color_value,
|
525
|
+
$white,
|
526
|
+
lighten($silver, $opacity_7)
|
527
|
+
);
|
528
|
+
} @else if $theme == "dark" {
|
529
|
+
@include advanced-table-sticky-mixin(
|
530
|
+
$color_value,
|
531
|
+
$bg_dark_card,
|
532
|
+
$bg_dark
|
533
|
+
);
|
534
|
+
}
|
535
|
+
}
|
536
|
+
}
|
384
537
|
}
|
385
538
|
|
386
539
|
// Sticky Left Columns Styling
|
@@ -397,6 +550,9 @@
|
|
397
550
|
$white,
|
398
551
|
lighten($silver, $opacity_7)
|
399
552
|
);
|
553
|
+
|
554
|
+
// Apply border colors for sticky columns
|
555
|
+
@include apply-sticky-colors("light");
|
400
556
|
}
|
401
557
|
|
402
558
|
// Responsive Styles
|
@@ -404,13 +560,29 @@
|
|
404
560
|
&[class*="advanced-table-responsive-scroll"] {
|
405
561
|
overflow-x: auto;
|
406
562
|
width: 100%;
|
563
|
+
|
564
|
+
// These are the responsive borders that should NOT inherit the custom color
|
407
565
|
@include advanced-table-sticky-mixin(
|
408
566
|
$border_light,
|
409
567
|
$white,
|
410
568
|
lighten($silver, $opacity_7)
|
411
569
|
);
|
570
|
+
|
571
|
+
// Override any columnGroupBorderColor inheritance for responsive borders
|
572
|
+
.sticky-left {
|
573
|
+
box-shadow: $shadow_deep !important;
|
574
|
+
}
|
575
|
+
|
576
|
+
.pb_advanced_table_header,
|
577
|
+
.pb_advanced_table_body {
|
578
|
+
th.sticky-left,
|
579
|
+
td.sticky-left {
|
580
|
+
border-right: 1px solid $border_light !important;
|
581
|
+
}
|
582
|
+
}
|
412
583
|
}
|
413
584
|
}
|
585
|
+
|
414
586
|
@media only screen and (min-width: $screen-xl-min) {
|
415
587
|
&[class*="advanced-table-responsive-scroll"] {
|
416
588
|
overflow-x: visible;
|
@@ -418,6 +590,20 @@
|
|
418
590
|
}
|
419
591
|
|
420
592
|
&.dark {
|
593
|
+
// Override default border color for dark mode
|
594
|
+
--column-border-color: #{$border_dark};
|
595
|
+
|
596
|
+
// Dark mode default border colors for trails and horizontal borders
|
597
|
+
.collapsible-trail {
|
598
|
+
background-color: $border_dark !important;
|
599
|
+
}
|
600
|
+
|
601
|
+
// Make sure all horizontal borders use the default border color in dark mode
|
602
|
+
tr, th, td {
|
603
|
+
border-top-color: $border_dark !important;
|
604
|
+
border-bottom-color: $border_dark !important;
|
605
|
+
}
|
606
|
+
|
421
607
|
.bg-white {
|
422
608
|
background: $bg_dark_card;
|
423
609
|
}
|
@@ -446,13 +632,104 @@
|
|
446
632
|
}
|
447
633
|
|
448
634
|
.table-header-cells:first-child,
|
635
|
+
.table-header-cells-custom:first-child,
|
449
636
|
td:first-child,
|
450
|
-
.pb_table_td:first-child
|
451
|
-
|
637
|
+
.pb_table_td:first-child,
|
638
|
+
.checkbox-cell.checkbox-cell-header:first-child {
|
639
|
+
box-shadow: 1px 0px 0px 0px var(--column-border-color) !important;
|
452
640
|
}
|
453
641
|
|
454
|
-
|
455
|
-
|
642
|
+
// Apply border colors in dark mode
|
643
|
+
&[class*="column-group-border-"] {
|
644
|
+
// For top-level column groups (ENROLLMENT DATA, PERFORMANCE DATA)
|
645
|
+
.pb_advanced_table_header {
|
646
|
+
// The main column group headers - NOT the last column
|
647
|
+
> tr:first-child {
|
648
|
+
th[colspan]:not([colspan="1"]):not(:last-child) {
|
649
|
+
border-right: 1px solid var(--column-border-color) !important;
|
650
|
+
}
|
651
|
+
}
|
652
|
+
|
653
|
+
// Subgroup headers
|
654
|
+
> tr:nth-child(2) {
|
655
|
+
th[colspan]:not([colspan="1"]):not(:last-child) {
|
656
|
+
border-right: 1px solid var(--column-border-color) !important;
|
657
|
+
}
|
658
|
+
|
659
|
+
// Last cell in each subgroup
|
660
|
+
th.last-header-cell:not(:last-child) {
|
661
|
+
border-right: 1px solid var(--column-border-color) !important;
|
662
|
+
}
|
663
|
+
}
|
664
|
+
|
665
|
+
// Individual column headers at subgroup boundaries
|
666
|
+
> tr:last-child {
|
667
|
+
// Last cell in each subgroup
|
668
|
+
th.last-header-cell:not(:last-child) {
|
669
|
+
border-right: 1px solid var(--column-border-color) !important;
|
670
|
+
}
|
671
|
+
}
|
672
|
+
}
|
673
|
+
|
674
|
+
// For data cells at column group boundaries in dark mode
|
675
|
+
.pb_advanced_table_body {
|
676
|
+
// Apply to cells that are at column group boundaries
|
677
|
+
td.last-cell:not(:last-child),
|
678
|
+
.pb_table_td.last-cell:not(:last-child) {
|
679
|
+
border-right: 1px solid var(--column-border-color) !important;
|
680
|
+
}
|
681
|
+
|
682
|
+
// Virtualized row cells at column group boundaries
|
683
|
+
tr.virtualized-table-row {
|
684
|
+
td.last-cell:not(:last-child) {
|
685
|
+
border-right: 1px solid var(--column-border-color) !important;
|
686
|
+
}
|
687
|
+
}
|
688
|
+
}
|
689
|
+
|
690
|
+
// Sub-row headers
|
691
|
+
.toggle-content {
|
692
|
+
td {
|
693
|
+
border-bottom: 1px solid $border_dark !important;
|
694
|
+
}
|
695
|
+
}
|
696
|
+
}
|
697
|
+
|
698
|
+
// Restore vertical border styling in dark mode when verticalBorder is true
|
699
|
+
.pb_table[data-vertical-border="true"] {
|
700
|
+
.pb_advanced_table_header {
|
701
|
+
> tr:not(:first-child) {
|
702
|
+
th:not(:last-child) {
|
703
|
+
border-right: 1px solid $border_dark !important;
|
704
|
+
}
|
705
|
+
}
|
706
|
+
}
|
707
|
+
|
708
|
+
.pb_advanced_table_body {
|
709
|
+
td:not(:last-child),
|
710
|
+
.pb_table_td:not(:last-child) {
|
711
|
+
border-right: 1px solid $border_dark !important;
|
712
|
+
}
|
713
|
+
}
|
714
|
+
|
715
|
+
// When both verticalBorder AND columnGroupBorderColor are set in dark mode,
|
716
|
+
// override the default border-dark with the custom color
|
717
|
+
&.pb_advanced_table[class*="column-group-border-"] {
|
718
|
+
.pb_advanced_table_header {
|
719
|
+
> tr:not(:first-child) {
|
720
|
+
th:not(:last-child) {
|
721
|
+
border-right: 1px solid var(--column-border-color) !important;
|
722
|
+
}
|
723
|
+
}
|
724
|
+
}
|
725
|
+
|
726
|
+
.pb_advanced_table_body {
|
727
|
+
td:not(:last-child),
|
728
|
+
.pb_table_td:not(:last-child) {
|
729
|
+
border-right: 1px solid var(--column-border-color) !important;
|
730
|
+
}
|
731
|
+
}
|
732
|
+
}
|
456
733
|
}
|
457
734
|
|
458
735
|
.sort-button-icon,
|
@@ -484,15 +761,6 @@
|
|
484
761
|
}
|
485
762
|
}
|
486
763
|
|
487
|
-
// Vertical separator
|
488
|
-
.table-header-cells:first-child,
|
489
|
-
.table-header-cells-custom:first-child,
|
490
|
-
td:first-child,
|
491
|
-
.pb_table_td:first-child,
|
492
|
-
.checkbox-cell.checkbox-cell-header:first-child {
|
493
|
-
box-shadow: 1px 0px 0px 0px $border_dark !important;
|
494
|
-
}
|
495
|
-
|
496
764
|
// Fullscreen
|
497
765
|
&.advanced-table-fullscreen {
|
498
766
|
background: $bg_dark;
|
@@ -526,11 +794,26 @@
|
|
526
794
|
}
|
527
795
|
}
|
528
796
|
}
|
797
|
+
|
798
|
+
// These are the responsive borders that should NOT inherit the custom color
|
529
799
|
@include advanced-table-sticky-mixin(
|
530
800
|
$border_dark,
|
531
801
|
$bg_dark_card,
|
532
802
|
$bg_dark
|
533
803
|
);
|
804
|
+
|
805
|
+
// Override any columnGroupBorderColor inheritance for responsive borders in dark mode
|
806
|
+
.sticky-left {
|
807
|
+
box-shadow: $shadow_deep !important;
|
808
|
+
}
|
809
|
+
|
810
|
+
.pb_advanced_table_header,
|
811
|
+
.pb_advanced_table_body {
|
812
|
+
th.sticky-left,
|
813
|
+
td.sticky-left {
|
814
|
+
border-right: 1px solid $border_dark !important;
|
815
|
+
}
|
816
|
+
}
|
534
817
|
}
|
535
818
|
}
|
536
819
|
}
|
@@ -34,6 +34,7 @@ type AdvancedTableProps = {
|
|
34
34
|
children?: React.ReactNode | React.ReactNode[]
|
35
35
|
className?: string
|
36
36
|
columnDefinitions: GenericObject[]
|
37
|
+
columnGroupBorderColor?: "text_lt_default" | "text_lt_light" | "text_lt_lighter" | "text_dk_default" | "text_dk_light" | "text_dk_lighter"
|
37
38
|
dark?: boolean
|
38
39
|
data?: { [key: string]: string }
|
39
40
|
enableToggleExpansion?: "all" | "header" | "none"
|
@@ -71,6 +72,7 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
71
72
|
children,
|
72
73
|
className,
|
73
74
|
columnDefinitions,
|
75
|
+
columnGroupBorderColor,
|
74
76
|
dark = false,
|
75
77
|
data = {},
|
76
78
|
enableToggleExpansion = "header",
|
@@ -239,6 +241,7 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
239
241
|
'advanced-table-allow-fullscreen': allowFullScreen
|
240
242
|
},
|
241
243
|
{'advanced-table-sticky-left-columns': stickyLeftColumn && stickyLeftColumn.length > 0},
|
244
|
+
columnGroupBorderColor ? `column-group-border-${columnGroupBorderColor}` : '',
|
242
245
|
globalProps(props),
|
243
246
|
className
|
244
247
|
);
|
@@ -282,6 +285,7 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
282
285
|
{renderFullscreenHeader()}
|
283
286
|
<AdvancedTableProvider
|
284
287
|
columnDefinitions={columnDefinitions}
|
288
|
+
columnGroupBorderColor={columnGroupBorderColor}
|
285
289
|
enableToggleExpansion={enableToggleExpansion}
|
286
290
|
enableVirtualization={virtualizedRows}
|
287
291
|
expandByDepth={expandByDepth}
|
@@ -334,7 +338,7 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
334
338
|
</Table>
|
335
339
|
</React.Fragment>
|
336
340
|
</AdvancedTableProvider>
|
337
|
-
|
341
|
+
|
338
342
|
</div>
|
339
343
|
{/* Bottom Pagination */}
|
340
344
|
{pagination && (
|
@@ -7,6 +7,9 @@ module Playbook
|
|
7
7
|
default: []
|
8
8
|
prop :column_definitions, type: Playbook::Props::Array,
|
9
9
|
default: []
|
10
|
+
prop :column_group_border_color, type: Playbook::Props::Enum,
|
11
|
+
values: %w[text_lt_default text_lt_light text_lt_lighter text_dk_default text_dk_light text_dk_lighter none],
|
12
|
+
default: "none"
|
10
13
|
prop :enable_toggle_expansion, type: Playbook::Props::Enum,
|
11
14
|
values: %w[all header none],
|
12
15
|
default: "header"
|
@@ -24,7 +27,9 @@ module Playbook
|
|
24
27
|
default: false
|
25
28
|
|
26
29
|
def classname
|
27
|
-
|
30
|
+
additional_classes = [responsive_classname, max_height_classname]
|
31
|
+
additional_classes << "column-group-border-#{column_group_border_color}" if column_group_border_color != "none"
|
32
|
+
generate_classname("pb_advanced_table", *additional_classes, separator: " ")
|
28
33
|
end
|
29
34
|
|
30
35
|
def responsive_classname
|
@@ -0,0 +1,80 @@
|
|
1
|
+
import React from "react"
|
2
|
+
import AdvancedTable from '../../pb_advanced_table/_advanced_table'
|
3
|
+
import MOCK_DATA from "./advanced_table_mock_data.json"
|
4
|
+
|
5
|
+
const AdvancedTableColumnBorderColors = (props) => {
|
6
|
+
const columnDefinitions = [
|
7
|
+
{
|
8
|
+
accessor: "year",
|
9
|
+
label: "Year",
|
10
|
+
cellAccessors: ["quarter", "month", "day"],
|
11
|
+
},
|
12
|
+
{
|
13
|
+
label: "Enrollment Data",
|
14
|
+
columns: [
|
15
|
+
{
|
16
|
+
label: "Enrollment Stats",
|
17
|
+
columns: [
|
18
|
+
{
|
19
|
+
accessor: "newEnrollments",
|
20
|
+
label: "New Enrollments",
|
21
|
+
},
|
22
|
+
{
|
23
|
+
accessor: "scheduledMeetings",
|
24
|
+
label: "Scheduled Meetings",
|
25
|
+
},
|
26
|
+
],
|
27
|
+
},
|
28
|
+
],
|
29
|
+
},
|
30
|
+
{
|
31
|
+
label: "Performance Data",
|
32
|
+
columns: [
|
33
|
+
{
|
34
|
+
label: "Completion Metrics",
|
35
|
+
columns: [
|
36
|
+
{
|
37
|
+
accessor: "completedClasses",
|
38
|
+
label: "Completed Classes",
|
39
|
+
},
|
40
|
+
{
|
41
|
+
accessor: "classCompletionRate",
|
42
|
+
label: "Class Completion Rate",
|
43
|
+
},
|
44
|
+
],
|
45
|
+
},
|
46
|
+
{
|
47
|
+
label: "Attendance",
|
48
|
+
columns: [
|
49
|
+
{
|
50
|
+
accessor: "attendanceRate",
|
51
|
+
label: "Attendance Rate",
|
52
|
+
},
|
53
|
+
{
|
54
|
+
accessor: "scheduledMeetings",
|
55
|
+
label: "Scheduled Meetings",
|
56
|
+
},
|
57
|
+
],
|
58
|
+
},
|
59
|
+
],
|
60
|
+
},
|
61
|
+
];
|
62
|
+
|
63
|
+
const tableProps = {
|
64
|
+
verticalBorder: true
|
65
|
+
}
|
66
|
+
|
67
|
+
return (
|
68
|
+
<>
|
69
|
+
<AdvancedTable
|
70
|
+
columnDefinitions={columnDefinitions}
|
71
|
+
columnGroupBorderColor="text_lt_default"
|
72
|
+
tableData={MOCK_DATA}
|
73
|
+
tableProps={tableProps}
|
74
|
+
{...props}
|
75
|
+
/>
|
76
|
+
</>
|
77
|
+
)
|
78
|
+
}
|
79
|
+
|
80
|
+
export default AdvancedTableColumnBorderColors
|
@@ -0,0 +1,3 @@
|
|
1
|
+
The borders of column groups can be set to a different color using the `columnGroupBorderColor` prop. In order for these borders to be visible, this prop must be used with `tableProps` and `verticalBorder` set to true.
|
2
|
+
|
3
|
+
The available colors for the border are Playbook's Text Colors, which can be found [here](https://playbook.powerapp.cloud/visual_guidelines/colors).
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color_rails.html.erb
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
<% column_definitions = [
|
2
|
+
{
|
3
|
+
accessor: "year",
|
4
|
+
label: "Year",
|
5
|
+
cellAccessors: ["quarter", "month", "day"],
|
6
|
+
},
|
7
|
+
{
|
8
|
+
label: "Enrollment Data",
|
9
|
+
columns: [
|
10
|
+
{
|
11
|
+
label: "Enrollment Stats",
|
12
|
+
columns: [
|
13
|
+
{
|
14
|
+
accessor: "newEnrollments",
|
15
|
+
label: "New Enrollments",
|
16
|
+
},
|
17
|
+
{
|
18
|
+
accessor: "scheduledMeetings",
|
19
|
+
label: "Scheduled Meetings",
|
20
|
+
},
|
21
|
+
],
|
22
|
+
},
|
23
|
+
],
|
24
|
+
},
|
25
|
+
{
|
26
|
+
label: "Performance Data",
|
27
|
+
columns: [
|
28
|
+
{
|
29
|
+
label: "Completion Metrics",
|
30
|
+
columns: [
|
31
|
+
{
|
32
|
+
accessor: "completedClasses",
|
33
|
+
label: "Completed Classes",
|
34
|
+
},
|
35
|
+
{
|
36
|
+
accessor: "classCompletionRate",
|
37
|
+
label: "Class Completion Rate",
|
38
|
+
},
|
39
|
+
],
|
40
|
+
},
|
41
|
+
{
|
42
|
+
label: "Attendance",
|
43
|
+
columns: [
|
44
|
+
{
|
45
|
+
accessor: "attendanceRate",
|
46
|
+
label: "Attendance Rate",
|
47
|
+
},
|
48
|
+
{
|
49
|
+
accessor: "scheduledMeetings",
|
50
|
+
label: "Scheduled Meetings",
|
51
|
+
},
|
52
|
+
],
|
53
|
+
},
|
54
|
+
],
|
55
|
+
},
|
56
|
+
] %>
|
57
|
+
|
58
|
+
<%= pb_rails("advanced_table", props: { id: "beta_table_with_muilti_headers", table_data: @table_data, column_definitions: column_definitions, column_group_border_color: "text_lt_default", table_props: { vertical_border: true } }) %>
|
@@ -0,0 +1,3 @@
|
|
1
|
+
The borders of column groups can be set to a different color using the `column_group_border_color` prop. In order for these borders to be visible, this prop must be used with `table_props` and `vertical_border` set to true.
|
2
|
+
|
3
|
+
The available colors for the border are Playbook's Text Colors, which can be found [here](https://playbook.powerapp.cloud/visual_guidelines/colors).
|
@@ -14,6 +14,7 @@ examples:
|
|
14
14
|
- advanced_table_column_headers_multiple: Multi-Header Columns (Multiple Levels)
|
15
15
|
# - advanced_table_selectable_rows: Selectable Rows
|
16
16
|
# - advanced_table_selectable_rows_no_subrows: Selectable Rows (No Subrows)
|
17
|
+
- advanced_table_column_border_color_rails: Column Group Border Color
|
17
18
|
|
18
19
|
|
19
20
|
react:
|
@@ -45,4 +46,5 @@ examples:
|
|
45
46
|
- advanced_table_selectable_rows_actions: Selectable Rows (With Actions)
|
46
47
|
- advanced_table_selectable_rows_header: Selectable Rows (No Actions Bar)
|
47
48
|
- advanced_table_inline_editing: Inline Cell Editing
|
48
|
-
- advanced_table_fullscreen: Fullscreen
|
49
|
+
- advanced_table_fullscreen: Fullscreen
|
50
|
+
- advanced_table_column_border_color: Column Group Border Color
|
@@ -26,4 +26,5 @@ export { default as AdvancedTableFullscreen } from './_advanced_table_fullscreen
|
|
26
26
|
export { default as AdvancedTableStickyColumns } from './_advanced_table_sticky_columns.jsx'
|
27
27
|
export { default as AdvancedTableStickyHeader } from './_advanced_table_sticky_header.jsx'
|
28
28
|
export { default as AdvancedTableStickyColumnsAndHeader } from './_advanced_table_sticky_columns_and_header.jsx'
|
29
|
-
export { default as AdvancedTableExpandByDepth } from './_advanced_table_expand_by_depth.jsx'
|
29
|
+
export { default as AdvancedTableExpandByDepth } from './_advanced_table_expand_by_depth.jsx'
|
30
|
+
export { default as AdvancedTableColumnBorderColor} from './_advanced_table_column_border_color.jsx'
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<% data_shadow = [
|
2
|
+
{ id: "51", text: "Task 1" },
|
3
|
+
{ id: "52", text: "Task 2" },
|
4
|
+
{ id: "53", text: "Task 3" }
|
5
|
+
] %>
|
6
|
+
|
7
|
+
<% data_outline = [
|
8
|
+
{ id: "61", text: "Task 1" },
|
9
|
+
{ id: "62", text: "Task 2" },
|
10
|
+
{ id: "63", text: "Task 3" }
|
11
|
+
] %>
|
12
|
+
|
13
|
+
<%= pb_rails("flex", props: { justify: "around" }) do %>
|
14
|
+
<%= pb_rails("flex/flex_item", props: { margin_right: "xl" }) do %>
|
15
|
+
<%= pb_rails("draggable", props: { drop_zone_type: "shadow", initial_items: data_shadow }) do %>
|
16
|
+
<%= pb_rails("caption", props: { margin_bottom: "xs", text: "Shadow", text_align: "center" }) %>
|
17
|
+
<%= pb_rails("draggable/draggable_container", props: { html_options: { style: { width: "200px" } } }) do %>
|
18
|
+
<% data_shadow.each do |item| %>
|
19
|
+
<%= pb_rails("card", props: { drag_id: item[:id], draggable_item: true, margin_bottom: "xs", padding: "xs", padding_right: "xl" }) do %>
|
20
|
+
<%= pb_rails("flex", props: { align_items: "stretch", flex_direction: "column" }) do %>
|
21
|
+
<%= pb_rails("body", props: { text: item[:text] }) %>
|
22
|
+
<% end %>
|
23
|
+
<% end %>
|
24
|
+
<% end %>
|
25
|
+
<% end %>
|
26
|
+
<% end %>
|
27
|
+
<% end %>
|
28
|
+
|
29
|
+
<%= pb_rails("flex/flex_item", props: { margin_right: "xl" }) do %>
|
30
|
+
<%= pb_rails("draggable", props: { drop_zone_type: "outline", initial_items: data_outline }) do %>
|
31
|
+
<%= pb_rails("caption", props: { margin_bottom: "xs", text: "Outline", text_align: "center" }) %>
|
32
|
+
<%= pb_rails("draggable/draggable_container", props: { html_options: { style: { width: "200px" } } }) do %>
|
33
|
+
<% data_outline.each do |item| %>
|
34
|
+
<%= pb_rails("card", props: { drag_id: item[:id], draggable_item: true, margin_bottom: "xs", padding: "xs", padding_right: "xl" }) do %>
|
35
|
+
<%= pb_rails("flex", props: { align_items: "stretch", flex_direction: "column" }) do %>
|
36
|
+
<%= pb_rails("body", props: { text: item[:text] }) %>
|
37
|
+
<% end %>
|
38
|
+
<% end %>
|
39
|
+
<% end %>
|
40
|
+
<% end %>
|
41
|
+
<% end %>
|
42
|
+
<% end %>
|
43
|
+
<% end %>
|