playbook_ui 14.11.0.pre.rc.5 → 14.11.0.pre.rc.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.scss +1 -13
  3. data/app/pb_kits/playbook/pb_section_separator/_section_separator.scss +60 -0
  4. data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +3 -1
  5. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_color.html.erb +10 -0
  6. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_color.jsx +42 -0
  7. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_color.md +3 -0
  8. data/app/pb_kits/playbook/pb_section_separator/docs/example.yml +2 -0
  9. data/app/pb_kits/playbook/pb_section_separator/docs/index.js +1 -0
  10. data/app/pb_kits/playbook/pb_section_separator/section_separator.rb +4 -1
  11. data/app/pb_kits/playbook/pb_table/_table.tsx +67 -18
  12. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns.jsx +88 -0
  13. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns_react.md +3 -0
  14. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.jsx +1 -1
  15. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_rails.md +2 -0
  16. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_react.md +4 -1
  17. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns.jsx +87 -0
  18. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns_react.md +5 -0
  19. data/app/pb_kits/playbook/pb_table/index.ts +17 -17
  20. data/app/pb_kits/playbook/pb_table/styles/_scroll.scss +18 -2
  21. data/app/pb_kits/playbook/pb_table/styles/_sticky_columns.scss +17 -3
  22. data/dist/chunks/{_typeahead-BXXEtXbz.js → _typeahead-gJLWiR0r.js} +2 -2
  23. data/dist/chunks/_weekday_stacked-7XLAG_Yz.js +45 -0
  24. data/dist/chunks/{lib-sMFo2JZy.js → lib-B7sgJtGS.js} +1 -1
  25. data/dist/chunks/{pb_form_validation-CgvjWbOK.js → pb_form_validation-C5Cc0-1v.js} +1 -1
  26. data/dist/chunks/vendor.js +1 -1
  27. data/dist/playbook-doc.js +1 -1
  28. data/dist/playbook-rails-react-bindings.js +1 -1
  29. data/dist/playbook-rails.js +1 -1
  30. data/dist/playbook.css +1 -1
  31. data/lib/playbook/version.rb +1 -1
  32. metadata +12 -5
  33. data/dist/chunks/_weekday_stacked-D0yBvHBb.js +0 -45
@@ -2,7 +2,7 @@ import PbEnhancedElement from '../pb_enhanced_element'
2
2
 
3
3
  export default class PbTable extends PbEnhancedElement {
4
4
  private stickyLeftColumns: string[] = [];
5
- private handleStickyColumnsRef: () => void;
5
+ private handleStickyLeftColumnsRef: () => void;
6
6
 
7
7
  static get selector(): string {
8
8
  return '.table-responsive-collapse'
@@ -31,10 +31,10 @@ export default class PbTable extends PbEnhancedElement {
31
31
  });
32
32
 
33
33
  // New sticky columns logic
34
- this.initStickyColumns();
34
+ this.initStickyLeftColumns();
35
35
  }
36
36
 
37
- private initStickyColumns(): void {
37
+ private initStickyLeftColumns(): void {
38
38
  // Find tables with sticky-left-column class
39
39
  const tables = document.querySelectorAll('.sticky-left-column');
40
40
 
@@ -52,16 +52,16 @@ export default class PbTable extends PbEnhancedElement {
52
52
 
53
53
  if (this.stickyLeftColumns.length > 0) {
54
54
  setTimeout(() => {
55
- this.handleStickyColumnsRef = this.handleStickyColumns.bind(this);
56
- this.handleStickyColumns();
57
- window.addEventListener('resize', this.handleStickyColumnsRef);
55
+ this.handleStickyLeftColumnsRef = this.handleStickyLeftColumns.bind(this);
56
+ this.handleStickyLeftColumns();
57
+ window.addEventListener('resize', this.handleStickyLeftColumnsRef);
58
58
  }, 10);
59
59
  }
60
60
  }
61
61
  });
62
62
  }
63
63
 
64
- private handleStickyColumns(): void {
64
+ private handleStickyLeftColumns(): void {
65
65
  let accumulatedWidth = 0;
66
66
 
67
67
  this.stickyLeftColumns.forEach((colId, index) => {
@@ -74,11 +74,11 @@ export default class PbTable extends PbEnhancedElement {
74
74
  (header as HTMLElement).style.left = `${accumulatedWidth}px`;
75
75
 
76
76
  if (!isLastColumn) {
77
- header.classList.add('with-border');
78
- header.classList.remove('sticky-shadow');
77
+ header.classList.add('with-border-right');
78
+ header.classList.remove('sticky-left-shadow');
79
79
  } else {
80
- header.classList.remove('with-border');
81
- header.classList.add('sticky-shadow');
80
+ header.classList.remove('with-border-right');
81
+ header.classList.add('sticky-left-shadow');
82
82
  }
83
83
 
84
84
  accumulatedWidth += (header as HTMLElement).offsetWidth;
@@ -89,11 +89,11 @@ export default class PbTable extends PbEnhancedElement {
89
89
  (cell as HTMLElement).style.left = `${accumulatedWidth - (header as HTMLElement).offsetWidth}px`;
90
90
 
91
91
  if (!isLastColumn) {
92
- cell.classList.add('with-border');
93
- cell.classList.remove('sticky-shadow');
92
+ cell.classList.add('with-border-right');
93
+ cell.classList.remove('sticky-left-shadow');
94
94
  } else {
95
- cell.classList.remove('with-border');
96
- cell.classList.add('sticky-shadow');
95
+ cell.classList.remove('with-border-right');
96
+ cell.classList.add('sticky-left-shadow');
97
97
  }
98
98
  });
99
99
  });
@@ -101,8 +101,8 @@ export default class PbTable extends PbEnhancedElement {
101
101
 
102
102
  // Cleanup method to remove event listener
103
103
  disconnect(): void {
104
- if (this.handleStickyColumnsRef) {
105
- window.removeEventListener('resize', this.handleStickyColumnsRef);
104
+ if (this.handleStickyLeftColumnsRef) {
105
+ window.removeEventListener('resize', this.handleStickyLeftColumnsRef);
106
106
  }
107
107
  }
108
108
  }
@@ -8,8 +8,24 @@
8
8
  @media (max-width: 1600px) {
9
9
  &[class*="table-responsive-scroll"] {
10
10
  border-radius: 4px;
11
- box-shadow: 1px 0 0 0px $border_light
12
- }
11
+ box-shadow: 1px 0 0 0px $border_light,
12
+ -1px 0 0 0px $border_light
13
+ }
14
+
15
+ &[class^=pb_table].table-sm.table-card thead tr th:first-child,
16
+ &[class^=pb_table].table-sm:not(.no-hover).table-card tbody tr td:first-child {
17
+ border-left-width: 0px;
18
+ }
19
+
20
+ &[class^=pb_table].table-md.table-card thead tr th:first-child,
21
+ &[class^=pb_table].table-md:not(.no-hover).table-card tbody tr td:first-child {
22
+ border-left-width: 0px;
23
+ }
24
+
25
+ &[class^=pb_table].table-lg.table-card thead tr th:first-child,
26
+ &[class^=pb_table].table-lg:not(.no-hover).table-card tbody tr td:first-child {
27
+ border-left-width: 0px;
28
+ }
13
29
 
14
30
  &[class^=pb_table].table-sm.table-card thead tr th:last-child,
15
31
  &[class^=pb_table].table-sm:not(.no-hover).table-card tbody tr td:last-child {
@@ -7,11 +7,25 @@
7
7
  background-color: white;
8
8
  }
9
9
 
10
- .with-border {
10
+ // For use with sticky left columns
11
+ .sticky-left-shadow {
12
+ box-shadow: 4px 0 10px rgba(60, 106, 172, 0.16) !important;
13
+ left: 0;
14
+ }
15
+
16
+ .with-border-right {
11
17
  border-right: 1px solid $border_light !important;
18
+ left: 0;
12
19
  }
13
20
 
14
- .sticky-shadow {
15
- box-shadow: 4px 0 10px rgba(60, 106, 172, 0.16) !important;
21
+ // For use with sticky right columns
22
+ .sticky-right-shadow {
23
+ box-shadow: -4px 0 10px rgba(60, 106, 172, 0.16) !important;
24
+ right: 0;
25
+ }
26
+
27
+ .with-border-left {
28
+ border-left: 1px solid $border_light !important;
29
+ right: 0;
16
30
  }
17
31
  }