playbook_ui 14.17.0.pre.alpha.PBNTR766tablenestedcollapsiblerowsborderdoubling7192 → 14.17.0.pre.alpha.PBNTR766tablenestedcollapsiblerowsborderdoubling7256

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.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_background/_background.scss +26 -0
  3. data/app/pb_kits/playbook/pb_background/_background.tsx +5 -3
  4. data/app/pb_kits/playbook/pb_background/background.test.js +5 -0
  5. data/app/pb_kits/playbook/pb_background/docs/_background_overlay.jsx +35 -0
  6. data/app/pb_kits/playbook/pb_background/docs/_background_overlay.md +1 -0
  7. data/app/pb_kits/playbook/pb_background/docs/example.yml +1 -0
  8. data/app/pb_kits/playbook/pb_background/docs/index.js +1 -0
  9. data/app/pb_kits/playbook/pb_form_group/_form_group.scss +18 -2
  10. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.html.erb +15 -5
  11. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.jsx +20 -5
  12. data/app/pb_kits/playbook/pb_layout/_layout.scss +70 -1
  13. data/app/pb_kits/playbook/pb_layout/_layout.tsx +29 -2
  14. data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.jsx +322 -118
  15. data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.md +1 -1
  16. data/app/pb_kits/playbook/pb_layout/subcomponents/_game.tsx +74 -43
  17. data/app/pb_kits/playbook/pb_layout/subcomponents/_participant.tsx +79 -0
  18. data/app/pb_kits/playbook/pb_layout/subcomponents/_round.tsx +21 -4
  19. data/app/pb_kits/playbook/pb_overlay/_overlay.scss +49 -22
  20. data/app/pb_kits/playbook/pb_overlay/_overlay.tsx +15 -4
  21. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_color.jsx +63 -0
  22. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_color.md +3 -0
  23. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md +1 -7
  24. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.jsx +39 -0
  25. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.md +1 -0
  26. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.jsx +40 -0
  27. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.md +5 -0
  28. data/app/pb_kits/playbook/pb_overlay/docs/example.yml +3 -0
  29. data/app/pb_kits/playbook/pb_overlay/docs/index.js +3 -0
  30. data/app/pb_kits/playbook/pb_overlay/overlay.test.jsx +39 -1
  31. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless.html.erb +34 -0
  32. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless_rails.md +1 -0
  33. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating.html.erb +36 -0
  34. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_rails.md +1 -0
  35. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_react.md +1 -1
  36. data/app/pb_kits/playbook/pb_table/docs/example.yml +2 -0
  37. data/app/pb_kits/playbook/pb_table/styles/_collapsible.scss +77 -17
  38. data/app/pb_kits/playbook/pb_table/styles/_headers.scss +19 -7
  39. data/app/pb_kits/playbook/pb_table/table.rb +13 -1
  40. data/app/pb_kits/playbook/pb_table/table_header.rb +13 -1
  41. data/dist/chunks/{_typeahead-HqfDnjRe.js → _typeahead-BY6AFq1l.js} +2 -2
  42. data/dist/chunks/{_weekday_stacked-DVQITtQ9.js → _weekday_stacked-DvC4wBNS.js} +2 -2
  43. data/dist/chunks/vendor.js +1 -1
  44. data/dist/playbook-doc.js +1 -1
  45. data/dist/playbook-rails-react-bindings.js +1 -1
  46. data/dist/playbook-rails.js +1 -1
  47. data/dist/playbook.css +1 -1
  48. data/lib/playbook/version.rb +1 -1
  49. metadata +17 -4
@@ -1,4 +1,5 @@
1
1
  @import "../../tokens/colors";
2
+ @import "../../tokens/screen_sizes";
2
3
 
3
4
  .table_collapsible_side_highlight {
4
5
  border-left: 4px solid $primary;
@@ -50,26 +51,85 @@
50
51
  }
51
52
 
52
53
  // Removing borders from nested collapsible tables and table rows to prevent visual border doubling
53
- .pb_collapsible_content_kit {
54
- .pb_table {
55
- th {
56
- border-left: none !important;
57
- border-right: none !important;
58
- border-top: none !important;
59
- }
60
- tr td:first-child {
61
- border-left: none !important;
62
- }
63
- tr td:last-child {
64
- border-right: none !important;
54
+ &.table-sm.table-collapse-sm,
55
+ &.table-md.table-collapse-sm,
56
+ &.table-lg.table-collapse-sm {
57
+ .pb_collapsible_content_kit {
58
+ .pb_table {
59
+ @media only screen and (min-width: $screen-xs-max) {
60
+ th {
61
+ border-left: none;
62
+ border-right: none;
63
+ border-top: none;
64
+ }
65
+ tr td:first-child {
66
+ border-left: none;
67
+ }
68
+ tr td:last-child {
69
+ border-right: none;
70
+ }
71
+ tr:first-child td {
72
+ border-top: none;
73
+ }
74
+ tr:last-child td {
75
+ border-bottom: none;
76
+ }
77
+ }
65
78
  }
66
- tr:first-child td {
67
- border-top: none !important;
79
+ }
80
+ }
81
+ &.table-sm.table-collapse-md,
82
+ &.table-md.table-collapse-md,
83
+ &.table-lg.table-collapse-md {
84
+ .pb_collapsible_content_kit {
85
+ .pb_table {
86
+ @media only screen and (min-width: $screen-lg-min) {
87
+ th {
88
+ border-left: none;
89
+ border-right: none;
90
+ border-top: none;
91
+ }
92
+ tr td:first-child {
93
+ border-left: none;
94
+ }
95
+ tr td:last-child {
96
+ border-right: none;
97
+ }
98
+ tr:first-child td {
99
+ border-top: none;
100
+ }
101
+ tr:last-child td {
102
+ border-bottom: none;
103
+ }
104
+ }
68
105
  }
69
- tr:last-child td {
70
- border-bottom: none !important;
106
+ }
107
+ }
108
+ &.table-sm.table-collapse-lg,
109
+ &.table-md.table-collapse-lg,
110
+ &.table-lg.table-collapse-lg {
111
+ .pb_collapsible_content_kit {
112
+ .pb_table {
113
+ @media only screen and (min-width: $screen-xl-min) {
114
+ th {
115
+ border-left: none;
116
+ border-right: none;
117
+ border-top: none;
118
+ }
119
+ tr td:first-child {
120
+ border-left: none;
121
+ }
122
+ tr td:last-child {
123
+ border-right: none;
124
+ }
125
+ tr:first-child td {
126
+ border-top: none;
127
+ }
128
+ tr:last-child td {
129
+ border-bottom: none;
130
+ }
131
+ }
71
132
  }
72
-
73
133
  }
74
134
  }
75
135
  }
@@ -6,8 +6,20 @@
6
6
  &.table-lg {
7
7
  thead, .pb_table_thead {
8
8
  tr, .pb_table_tr {
9
- th, .pb_table_th {
9
+ th:not(:has(
10
+ [class*="pb_body_kit"],
11
+ [class*="pb_detail_kit"],
12
+ [class*="pb_title_kit"]
13
+ )),
14
+ .pb_table_th:not(:has(
15
+ [class*="pb_body_kit"],
16
+ [class*="pb_detail_kit"],
17
+ [class*="pb_title_kit"]
18
+ )) {
10
19
  @include caption;
20
+ }
21
+
22
+ th, .pb_table_th {
11
23
  border-bottom: 1px solid $border_light;
12
24
  }
13
25
  }
@@ -83,10 +95,10 @@
83
95
 
84
96
  // flatten out corners for floating headerstyle variant to avoid small triangle of white/empty space
85
97
  .header-floating > thead > tr:first-child > th:first-child,
86
- .header-floating > .pb_table_thead > .pb_table_tr:first-child > .pb_table_th:first-child {
87
- border-top-left-radius: 0 !important;
88
- }
89
- .header-floating > thead > tr:first-child > th:last-child,
90
- .header-floating > .pb_table_thead > .pb_table_tr:first-child > .pb_table_th:last-child {
91
- border-top-right-radius: 0 !important;
98
+ .header-floating > .pb_table_thead > .pb_table_tr:first-child > .pb_table_th:first-child {
99
+ border-top-left-radius: 0 !important;
100
+ }
101
+ .header-floating > thead > tr:first-child > th:last-child,
102
+ .header-floating > .pb_table_thead > .pb_table_tr:first-child > .pb_table_th:last-child {
103
+ border-top-right-radius: 0 !important;
92
104
  }
@@ -37,13 +37,16 @@ module Playbook
37
37
  prop :outer_padding, type: Playbook::Props::Enum,
38
38
  values: ["none", "xxs", "xs", "sm", "md", "lg", "xl", nil],
39
39
  default: nil
40
+ prop :header_style, type: Playbook::Props::Enum,
41
+ values: %w[default borderless floating],
42
+ default: "default"
40
43
 
41
44
  def classname
42
45
  generate_classname(
43
46
  "pb_table", "table-#{size}", single_line_class, dark_class,
44
47
  disable_hover_class, container_class, data_table_class, sticky_class, sticky_left_column_class,
45
48
  sticky_right_column_class, collapse_class, vertical_border_class, striped_class, outer_padding_class,
46
- "table-responsive-#{responsive}", separator: " "
49
+ "table-responsive-#{responsive}", header_style_class, separator: " "
47
50
  )
48
51
  end
49
52
 
@@ -123,6 +126,15 @@ module Playbook
123
126
  outer_padding.present? ? "outer_padding_#{space_css_name}#{outer_padding}" : nil
124
127
  end
125
128
  end
129
+
130
+ def header_style_class
131
+ case header_style
132
+ when "borderless"
133
+ "header-borderless"
134
+ when "floating"
135
+ "header-floating"
136
+ end
137
+ end
126
138
  end
127
139
  end
128
140
  end
@@ -26,9 +26,12 @@ module Playbook
26
26
  prop :tag, type: Playbook::Props::Enum,
27
27
  values: %w[table div],
28
28
  default: "table"
29
+ prop :header_style, type: Playbook::Props::Enum,
30
+ values: %w[default borderless floating],
31
+ default: "default"
29
32
 
30
33
  def classname
31
- generate_classname("pb_table_header_kit", align_class) + tag_class
34
+ generate_classname("pb_table_header_kit", align_class, header_style_class) + tag_class
32
35
  end
33
36
 
34
37
  def tag_class
@@ -106,6 +109,15 @@ module Playbook
106
109
  end
107
110
  active_item
108
111
  end
112
+
113
+ def header_style_class
114
+ case header_style
115
+ when "borderless"
116
+ "header-borderless"
117
+ when "floating"
118
+ "header-floating"
119
+ end
120
+ end
109
121
  end
110
122
  end
111
123
  end