playbook_ui 15.5.0 → 15.6.0.pre.rc.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a883729bcc3b37b0d4b1d155e4a7a27a6a598c8a0ceb563b0eb5516b56e3dff4
4
- data.tar.gz: 2a3fef178d8aa3c10a6f91f66b5b2f8bcce5c63314b9c2a26a676877b0fa7c5d
3
+ metadata.gz: 2851c07d23768f59137cd7cb0ba34884e25960c1bc8700573a62c3aaa1004f83
4
+ data.tar.gz: 74e6d86e0807f31e01ece7b7f3d620cea86367dfee7150493273543fb1ed682d
5
5
  SHA512:
6
- metadata.gz: b14d4934f5ee87c4513676c1d35fd7fce4187222567d2d516379b6dcf536183afc946d4264b8448ff91038e3b5f9a9492b06fd0229c74b462fb16f4ebb0fc0b4
7
- data.tar.gz: bac6a862cb3f18a38877933a07c9abab89165f721867aba4eb0672bb0cc5448ec793fd2dfdd606d9e99b11b06fa60ab3e4ed4090cb95ac4a1f786f8afb9066c8
6
+ metadata.gz: a38283f21f3c2b2f2bb7132f27f6cf8fc161cd9f1fd3476f4521df857859c15960bd1e5b82857839d214b8c531adcf0082834eb6daf6a0fbc3df1ffb93b26d08
7
+ data.tar.gz: 3e9aff80d60e0f20a4ce59810a631d167798f0abe3a3d54962b0ba66c9d9267dfc1bbcddbb3d9b6a03c66d3467cf1c6f0be574254344773b04b47359fc90a564
@@ -791,6 +791,28 @@
791
791
  box-shadow: 1px 0px 0px 0px var(--column-border-color) !important;
792
792
  }
793
793
 
794
+ // Override last-header-cell border color in dark mode
795
+ .pb_advanced_table_header {
796
+ > tr:not(:first-child) {
797
+ .last-header-cell {
798
+ border-right: 1px solid $border_dark !important;
799
+ }
800
+ }
801
+
802
+ th[colspan]:not([colspan="1"]) {
803
+ border-right: 1px solid $border_dark !important;
804
+ }
805
+ }
806
+
807
+ // Override last-cell border color in dark mode for body cells
808
+ .pb_advanced_table_body {
809
+ tr {
810
+ .last-cell:not(:last-of-type) {
811
+ border-right: 1px solid $border_dark !important;
812
+ }
813
+ }
814
+ }
815
+
794
816
  // Apply border colors in dark mode
795
817
  &[class*="column-group-border-"] {
796
818
  // For top-level column groups (ENROLLMENT DATA, PERFORMANCE DATA)
@@ -850,7 +872,7 @@
850
872
  // Restore vertical border styling in dark mode when verticalBorder is true
851
873
  .pb_table[data-vertical-border="true"] {
852
874
  .pb_advanced_table_header {
853
- > tr:not(:first-child) {
875
+ > tr {
854
876
  th:not(:last-child) {
855
877
  border-right: 1px solid $border_dark !important;
856
878
  }
@@ -864,11 +886,17 @@
864
886
  }
865
887
  }
866
888
 
889
+ tr.virtualized-table-row {
890
+ td:not(:last-child) {
891
+ border-right: 1px solid $border_dark !important;
892
+ }
893
+ }
894
+
867
895
  // When both verticalBorder AND columnGroupBorderColor are set in dark mode,
868
896
  // override the default border-dark with the custom color
869
897
  &.pb_advanced_table[class*="column-group-border-"] {
870
898
  .pb_advanced_table_header {
871
- > tr:not(:first-child) {
899
+ > tr {
872
900
  th:not(:last-child) {
873
901
  border-right: 1px solid var(--column-border-color) !important;
874
902
  }
@@ -881,6 +909,12 @@
881
909
  border-right: 1px solid var(--column-border-color) !important;
882
910
  }
883
911
  }
912
+
913
+ tr.virtualized-table-row {
914
+ td:not(:last-child) {
915
+ border-right: 1px solid var(--column-border-color) !important;
916
+ }
917
+ }
884
918
  }
885
919
  }
886
920
 
@@ -985,34 +1019,90 @@
985
1019
  // Firefox-specific fix for last-header-cell and last-cell vertical borders
986
1020
  @-moz-document url-prefix() {
987
1021
  .pb_advanced_table_header {
988
- .last-header-cell:not(:last-child) {
1022
+ th[colspan]:not([colspan="1"]):not(:last-child) {
1023
+ border-right: none !important;
1024
+ box-shadow: 1px 0 0 0 $border_light !important;
1025
+ }
1026
+
1027
+ .last-header-cell:not(:last-child),
1028
+ > tr:last-child .last-header-cell:not(:last-child) {
989
1029
  border-right: none !important;
990
1030
  box-shadow: 1px 0 0 0 $border_light !important;
991
1031
  }
992
1032
  }
993
1033
 
994
1034
  .pb_advanced_table_body {
995
- .last-cell:not(:last-child) {
1035
+ tr .last-cell:not(:last-of-type),
1036
+ td.last-cell:not(:last-child),
1037
+ .pb_table_td.last-cell:not(:last-child) {
996
1038
  border-right: none !important;
997
1039
  box-shadow: 1px 0 0 0 $border_light !important;
998
1040
  }
999
1041
  }
1000
1042
 
1043
+ &[class*="column-group-border-"] {
1044
+ .pb_advanced_table_header {
1045
+ th[colspan]:not([colspan="1"]):not(:last-child),
1046
+ .last-header-cell:not(:last-child),
1047
+ > tr:last-child .last-header-cell:not(:last-child) {
1048
+ box-shadow: 1px 0 0 0 var(--column-border-color) !important;
1049
+ }
1050
+ }
1051
+
1052
+ .pb_advanced_table_body {
1053
+ tr .last-cell:not(:last-of-type),
1054
+ td.last-cell:not(:last-child),
1055
+ .pb_table_td.last-cell:not(:last-child) {
1056
+ box-shadow: 1px 0 0 0 var(--column-border-color) !important;
1057
+ }
1058
+ }
1059
+ }
1060
+
1001
1061
  // Dark mode Firefox fixes
1002
1062
  &.dark {
1003
1063
  .pb_advanced_table_header {
1004
- .last-header-cell:not(:last-child) {
1064
+ // Convert all colspan headers to box-shadow with dark color
1065
+ th[colspan]:not([colspan="1"]) {
1066
+ border-right: none !important;
1067
+ box-shadow: 1px 0 0 0 $border_dark !important;
1068
+ }
1069
+
1070
+ // Convert all last-header-cell borders to box-shadow with dark color
1071
+ .last-header-cell:not(:last-child),
1072
+ > tr:last-child .last-header-cell:not(:last-child),
1073
+ > tr:not(:first-child) .last-header-cell:not(:last-child),
1074
+ > tr:not(:first-child) .last-header-cell:last-child {
1005
1075
  border-right: none !important;
1006
1076
  box-shadow: 1px 0 0 0 $border_dark !important;
1007
1077
  }
1008
1078
  }
1009
1079
 
1010
1080
  .pb_advanced_table_body {
1011
- .last-cell:not(:last-child) {
1081
+ tr .last-cell:not(:last-of-type),
1082
+ td.last-cell:not(:last-child),
1083
+ .pb_table_td.last-cell:not(:last-child) {
1012
1084
  border-right: none !important;
1013
1085
  box-shadow: 1px 0 0 0 $border_dark !important;
1014
1086
  }
1015
1087
  }
1088
+
1089
+ &[class*="column-group-border-"] {
1090
+ .pb_advanced_table_header {
1091
+ th[colspan]:not([colspan="1"]):not(:last-child),
1092
+ .last-header-cell:not(:last-child),
1093
+ > tr:last-child .last-header-cell:not(:last-child) {
1094
+ box-shadow: 1px 0 0 0 var(--column-border-color) !important;
1095
+ }
1096
+ }
1097
+
1098
+ .pb_advanced_table_body {
1099
+ tr .last-cell:not(:last-of-type),
1100
+ td.last-cell:not(:last-child),
1101
+ .pb_table_td.last-cell:not(:last-child) {
1102
+ box-shadow: 1px 0 0 0 var(--column-border-color) !important;
1103
+ }
1104
+ }
1105
+ }
1016
1106
  }
1017
1107
  }
1018
1108
  }
@@ -29,5 +29,167 @@
29
29
  label: "Graduated Students",
30
30
  }
31
31
  ] %>
32
+ <%= pb_rails("caption", props: { text: "Advanced Table Vertical Border Table Props" }) %>
33
+ <%= pb_rails("advanced_table", props: { id: "table_props_table", table_data: @table_data, margin_bottom: "md", column_definitions: column_definitions, table_props: { vertical_border: true, container: false }}) %>
32
34
 
33
- <%= pb_rails("advanced_table", props: { id: "table_props_table", table_data: @table_data, column_definitions: column_definitions, table_props: { vertical_border: true, container: false }}) %>
35
+ <% column_definitions_two = [
36
+ {
37
+ accessor: "year",
38
+ label: "Year",
39
+ cellAccessors: ["quarter", "month", "day"],
40
+ },
41
+ {
42
+ label: "Enrollment Data",
43
+ columns: [
44
+ {
45
+ accessor: "newEnrollments",
46
+ label: "New Enrollments",
47
+ },
48
+ {
49
+ accessor: "scheduledMeetings",
50
+ label: "Scheduled Meetings",
51
+ },
52
+ ],
53
+ },
54
+ {
55
+ label: "Performance Data",
56
+ columns: [
57
+ {
58
+ accessor: "attendanceRate",
59
+ label: "Attendance Rate",
60
+ },
61
+ {
62
+ accessor: "completedClasses",
63
+ label: "Completed Classes",
64
+ },
65
+ {
66
+ accessor: "classCompletionRate",
67
+ label: "Class Completion Rate",
68
+ },
69
+ {
70
+ accessor: "graduatedStudents",
71
+ label: "Graduated Students",
72
+ },
73
+ ],
74
+ },
75
+ ] %>
76
+ <%= pb_rails("caption", props: { text: "Advanced Table Vertical Border Multi Header" }) %>
77
+ <%= pb_rails("advanced_table", props: { id: "table_multi_headers_vertical_borders", margin_bottom: "md", table_data: @table_data, column_definitions: column_definitions_two, table_props: { vertical_border: true } }) %>
78
+
79
+ <% column_definitions_three = [
80
+ {
81
+ accessor: "year",
82
+ label: "Year",
83
+ cellAccessors: ["quarter", "month", "day"],
84
+ },
85
+ {
86
+ label: "Enrollment Data",
87
+ columns: [
88
+ {
89
+ label: "Enrollment Stats",
90
+ columns: [
91
+ {
92
+ accessor: "newEnrollments",
93
+ label: "New Enrollments",
94
+ },
95
+ {
96
+ accessor: "scheduledMeetings",
97
+ label: "Scheduled Meetings",
98
+ },
99
+ ],
100
+ },
101
+ ],
102
+ },
103
+ {
104
+ label: "Performance Data",
105
+ columns: [
106
+ {
107
+ label: "Completion Metrics",
108
+ columns: [
109
+ {
110
+ accessor: "completedClasses",
111
+ label: "Completed Classes",
112
+ },
113
+ {
114
+ accessor: "classCompletionRate",
115
+ label: "Class Completion Rate",
116
+ },
117
+ ],
118
+ },
119
+ {
120
+ label: "Attendance",
121
+ columns: [
122
+ {
123
+ accessor: "attendanceRate",
124
+ label: "Attendance Rate",
125
+ },
126
+ {
127
+ accessor: "scheduledMeetings",
128
+ label: "Scheduled Meetings",
129
+ },
130
+ ],
131
+ },
132
+ ],
133
+ },
134
+ ] %>
135
+ <%= pb_rails("caption", props: { text: "Advanced Table Vertical Border Multi Header with Column Group Border Color" }) %>
136
+ <%= pb_rails("advanced_table", props: { id: "beta_table_with_color_headers", margin_bottom: "md", table_data: @table_data, column_definitions: column_definitions_three, column_group_border_color: "text_lt_default", table_props: { vertical_border: true } }) %>
137
+
138
+ <% column_definitions_four = [
139
+ {
140
+ accessor: "year",
141
+ label: "Year",
142
+ cellAccessors: ["quarter", "month", "day"],
143
+ },
144
+ {
145
+ label: "Enrollment Data",
146
+ columns: [
147
+ {
148
+ label: "Enrollment Stats",
149
+ columns: [
150
+ {
151
+ accessor: "newEnrollments",
152
+ label: "New Enrollments",
153
+ },
154
+ {
155
+ accessor: "scheduledMeetings",
156
+ label: "Scheduled Meetings",
157
+ },
158
+ ],
159
+ },
160
+ ],
161
+ },
162
+ {
163
+ label: "Performance Data",
164
+ columns: [
165
+ {
166
+ label: "Completion Metrics",
167
+ columns: [
168
+ {
169
+ accessor: "completedClasses",
170
+ label: "Completed Classes",
171
+ },
172
+ {
173
+ accessor: "classCompletionRate",
174
+ label: "Class Completion Rate",
175
+ },
176
+ ],
177
+ },
178
+ {
179
+ label: "Attendance",
180
+ columns: [
181
+ {
182
+ accessor: "attendanceRate",
183
+ label: "Attendance Rate",
184
+ },
185
+ {
186
+ accessor: "scheduledMeetings",
187
+ label: "Scheduled Meetings",
188
+ },
189
+ ],
190
+ },
191
+ ],
192
+ },
193
+ ] %>
194
+ <%= pb_rails("caption", props: { text: "Advanced Table Vertical Border Multi Header No Vertical Border" }) %>
195
+ <%= pb_rails("advanced_table", props: {id: "beta_table_with_muilti_headers", table_data: @table_data, column_definitions: column_definitions_four }) %>
@@ -1,6 +1,7 @@
1
1
  import React from "react"
2
2
  import AdvancedTable from '../../pb_advanced_table/_advanced_table'
3
3
  import MOCK_DATA from "./advanced_table_mock_data.json"
4
+ import Caption from "../../pb_caption/_caption"
4
5
 
5
6
  const AdvancedTableTableProps = (props) => {
6
7
  const columnDefinitions = [
@@ -40,14 +41,203 @@ const AdvancedTableTableProps = (props) => {
40
41
  verticalBorder: true
41
42
  }
42
43
 
44
+ const columnDefinitionsTwo = [
45
+ {
46
+ accessor: "year",
47
+ label: "Year",
48
+ cellAccessors: ["quarter", "month", "day"],
49
+ },
50
+ {
51
+ label: "Enrollment Data",
52
+ columns: [
53
+ {
54
+ accessor: "newEnrollments",
55
+ label: "New Enrollments",
56
+ },
57
+ {
58
+ accessor: "scheduledMeetings",
59
+ label: "Scheduled Meetings",
60
+ },
61
+ ],
62
+ },
63
+ {
64
+ label: "Performance Data",
65
+ columns: [
66
+ {
67
+ accessor: "attendanceRate",
68
+ label: "Attendance Rate",
69
+ },
70
+ {
71
+ accessor: "completedClasses",
72
+ label: "Completed Classes",
73
+ },
74
+ {
75
+ accessor: "classCompletionRate",
76
+ label: "Class Completion Rate",
77
+ },
78
+ {
79
+ accessor: "graduatedStudents",
80
+ label: "Graduated Students",
81
+ },
82
+ ],
83
+ },
84
+ ];
85
+
86
+ const tablePropsTwo = {
87
+ verticalBorder: true,
88
+ }
89
+
90
+ const columnDefinitionsThree = [
91
+ {
92
+ accessor: "year",
93
+ label: "Year",
94
+ cellAccessors: ["quarter", "month", "day"],
95
+ },
96
+ {
97
+ label: "Enrollment Data",
98
+ columns: [
99
+ {
100
+ label: "Enrollment Stats",
101
+ columns: [
102
+ {
103
+ accessor: "newEnrollments",
104
+ label: "New Enrollments",
105
+ },
106
+ {
107
+ accessor: "scheduledMeetings",
108
+ label: "Scheduled Meetings",
109
+ },
110
+ ],
111
+ },
112
+ ],
113
+ },
114
+ {
115
+ label: "Performance Data",
116
+ columns: [
117
+ {
118
+ label: "Completion Metrics",
119
+ columns: [
120
+ {
121
+ accessor: "completedClasses",
122
+ label: "Completed Classes",
123
+ },
124
+ {
125
+ accessor: "classCompletionRate",
126
+ label: "Class Completion Rate",
127
+ },
128
+ ],
129
+ },
130
+ {
131
+ label: "Attendance",
132
+ columns: [
133
+ {
134
+ accessor: "attendanceRate",
135
+ label: "Attendance Rate",
136
+ },
137
+ {
138
+ accessor: "scheduledMeetings",
139
+ label: "Scheduled Meetings",
140
+ },
141
+ ],
142
+ },
143
+ ],
144
+ },
145
+ ];
146
+
147
+ const tablePropsThree = {
148
+ verticalBorder: true
149
+ }
150
+
151
+ const columnDefinitionsFour = [
152
+ {
153
+ accessor: "year",
154
+ label: "Year",
155
+ cellAccessors: ["quarter", "month", "day"],
156
+ },
157
+ {
158
+ label: "Enrollment Data",
159
+ columns: [
160
+ {
161
+ label: "Enrollment Stats",
162
+ columns: [
163
+ {
164
+ accessor: "newEnrollments",
165
+ label: "New Enrollments",
166
+ },
167
+ {
168
+ accessor: "scheduledMeetings",
169
+ label: "Scheduled Meetings",
170
+ },
171
+ ],
172
+ },
173
+ ],
174
+ },
175
+ {
176
+ label: "Performance Data",
177
+ columns: [
178
+ {
179
+ label: "Completion Metrics",
180
+ columns: [
181
+ {
182
+ accessor: "completedClasses",
183
+ label: "Completed Classes",
184
+ },
185
+ {
186
+ accessor: "classCompletionRate",
187
+ label: "Class Completion Rate",
188
+ },
189
+ ],
190
+ },
191
+ {
192
+ label: "Attendance",
193
+ columns: [
194
+ {
195
+ accessor: "attendanceRate",
196
+ label: "Attendance Rate",
197
+ },
198
+ {
199
+ accessor: "scheduledMeetings",
200
+ label: "Scheduled Meetings",
201
+ },
202
+ ],
203
+ },
204
+ ],
205
+ },
206
+ ];
207
+
43
208
  return (
44
209
  <div>
210
+ <Caption text="Advanced Table Vertical Border Table Props" />
45
211
  <AdvancedTable
46
212
  columnDefinitions={columnDefinitions}
213
+ marginBottom="md"
47
214
  tableData={MOCK_DATA}
48
215
  tableProps={tableProps}
49
216
  {...props}
50
217
  />
218
+ <Caption text="Advanced Table Vertical Border Multi Header" />
219
+ <AdvancedTable
220
+ columnDefinitions={columnDefinitionsTwo}
221
+ marginBottom="md"
222
+ tableData={MOCK_DATA}
223
+ tableProps={tablePropsTwo}
224
+ {...props}
225
+ />
226
+ <Caption text="Advanced Table Vertical Border Multi Header with Column Group Border Color" />
227
+ <AdvancedTable
228
+ columnDefinitions={columnDefinitionsThree}
229
+ columnGroupBorderColor="text_lt_default"
230
+ marginBottom="md"
231
+ tableData={MOCK_DATA}
232
+ tableProps={tablePropsThree}
233
+ {...props}
234
+ />
235
+ <Caption text="Advanced Table Vertical Border Multi Header No Vertical Border" />
236
+ <AdvancedTable
237
+ columnDefinitions={columnDefinitionsFour}
238
+ tableData={MOCK_DATA}
239
+ {...props}
240
+ />
51
241
  </div>
52
242
  )
53
243
  }
@@ -8,6 +8,25 @@
8
8
  border-right: 1px solid $border_light !important;
9
9
  }
10
10
 
11
+ // **Advanced Table** specific rules to eliminate double borders when vertical-border is active
12
+ .pb_advanced_table &,
13
+ &[data-vertical-border="true"] {
14
+ // Remove first column box-shadow (preserve border-right in Chrome and use CSS var to respect column group border colors)
15
+ .table-header-cells:first-child,
16
+ .table-header-cells-custom:first-child,
17
+ td:first-child,
18
+ .pb_table_td:first-child,
19
+ .checkbox-cell.checkbox-cell-header:first-child {
20
+ box-shadow: none !important;
21
+ border-right: 1px solid var(--column-border-color, #{$border_light}) !important;
22
+ }
23
+
24
+ .pb_table_td:nth-child(2) {
25
+ box-shadow: none !important;
26
+ }
27
+ }
28
+ // --- End Advanced Table First Column Code Section ---
29
+
11
30
  @media screen and (min-width: $screen-xs-min) {
12
31
  tr:hover, .pb_table_tr:hover {
13
32
  td:last-child, .pb_table_td:last-child {
@@ -63,5 +82,35 @@
63
82
  }
64
83
  }
65
84
  }
85
+
86
+ // Dark mode support for advanced tables
87
+ .pb_advanced_table.dark & {
88
+ td, th, .pb_table_td, .pb_table_th {
89
+ border-right: 1px solid $border_dark !important;
90
+ }
91
+
92
+ thead tr th {
93
+ border-right: 1px solid $border_dark !important;
94
+ }
95
+
96
+ &[data-vertical-border="true"] {
97
+ .table-header-cells:first-child,
98
+ .table-header-cells-custom:first-child,
99
+ td:first-child,
100
+ .pb_table_td:first-child,
101
+ .checkbox-cell.checkbox-cell-header:first-child {
102
+ border-right: 1px solid var(--column-border-color, #{$border_dark}) !important;
103
+ }
104
+ }
105
+
106
+ @media screen and (min-width: $screen-xs-min) {
107
+ tr:hover, .pb_table_tr:hover {
108
+ td:last-child, .pb_table_td:last-child {
109
+ border-right-color: darken($border_dark, 10%) !important;
110
+ }
111
+ }
112
+ }
113
+ }
114
+ // --- End Advanced Table Dark Mode Code Section ---
66
115
  }
67
116
  }