playbook_ui 14.16.0.pre.alpha.play1960buttonkitdisablenotworkingdanger6850 → 14.16.0.pre.alpha.play1964tablekitheadertextstylefix6997

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 (74) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/Utilities/types.ts +1 -1
  3. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +70 -0
  4. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +168 -85
  5. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +15 -2
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.jsx +90 -0
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.md +3 -0
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx +0 -1
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +2 -1
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +2 -1
  11. data/app/pb_kits/playbook/pb_body/_body_mixins.scss +1 -0
  12. data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +34 -34
  13. data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +2 -2
  14. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +16 -0
  15. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.html.erb +0 -11
  16. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.jsx +0 -7
  17. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_inline_styles.scss +28 -24
  18. data/app/pb_kits/playbook/pb_detail/_detail_mixins.scss +1 -0
  19. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.jsx +6 -6
  20. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_and_custom_display.jsx +6 -6
  21. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx +6 -6
  22. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +8 -8
  23. data/app/pb_kits/playbook/pb_filter/Filter/CurrentFilters.tsx +3 -4
  24. data/app/pb_kits/playbook/pb_filter/Filter/SortMenu.tsx +2 -3
  25. data/app/pb_kits/playbook/pb_form/pb_form_validation.js +1 -1
  26. data/app/pb_kits/playbook/pb_layout/_layout.scss +58 -0
  27. data/app/pb_kits/playbook/pb_layout/_layout.tsx +20 -7
  28. data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.jsx +190 -0
  29. data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.md +5 -0
  30. data/app/pb_kits/playbook/pb_layout/docs/example.yml +1 -0
  31. data/app/pb_kits/playbook/pb_layout/docs/index.js +1 -0
  32. data/app/pb_kits/playbook/pb_layout/layout.test.js +4 -0
  33. data/app/pb_kits/playbook/pb_layout/subcomponents/_game.tsx +90 -0
  34. data/app/pb_kits/playbook/pb_layout/subcomponents/_round.tsx +57 -0
  35. data/app/pb_kits/playbook/pb_lightbox/hooks/useVisibility.js +1 -1
  36. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +2 -1
  37. data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +29 -11
  38. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_default.html.erb +1 -1
  39. data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.html.erb +4 -4
  40. data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb +2 -0
  41. data/app/pb_kits/playbook/pb_table/_table.tsx +4 -0
  42. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless.jsx +50 -0
  43. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless_react.md +1 -0
  44. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating.jsx +59 -0
  45. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_react.md +1 -0
  46. data/app/pb_kits/playbook/pb_table/docs/example.yml +2 -0
  47. data/app/pb_kits/playbook/pb_table/docs/index.js +2 -0
  48. data/app/pb_kits/playbook/pb_table/styles/_headers.scss +76 -0
  49. data/app/pb_kits/playbook/pb_table/styles/_striped.scss +3 -3
  50. data/app/pb_kits/playbook/pb_table/subcomponents/_table_head.tsx +11 -1
  51. data/app/pb_kits/playbook/pb_table/subcomponents/_table_header.tsx +11 -1
  52. data/app/pb_kits/playbook/pb_table/subcomponents/_table_row.tsx +5 -0
  53. data/app/pb_kits/playbook/pb_table/table.test.js +17 -0
  54. data/app/pb_kits/playbook/pb_tooltip/index.js +183 -56
  55. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +4 -4
  56. data/app/pb_kits/playbook/pb_typeahead/index.ts +2 -2
  57. data/app/pb_kits/playbook/utilities/globalProps.ts +1 -1
  58. data/app/pb_kits/playbook/utilities/object.test.js +149 -1
  59. data/app/pb_kits/playbook/utilities/object.ts +124 -42
  60. data/dist/chunks/_typeahead-Djo6qCne.js +22 -0
  61. data/dist/chunks/_weekday_stacked-BV8x7Ogy.js +45 -0
  62. data/dist/chunks/lib-BGzBzFZX.js +29 -0
  63. data/dist/chunks/{pb_form_validation-DMajaRt3.js → pb_form_validation-BvNy9Bd6.js} +1 -1
  64. data/dist/chunks/vendor.js +1 -1
  65. data/dist/playbook-doc.js +1 -1
  66. data/dist/playbook-rails-react-bindings.js +1 -1
  67. data/dist/playbook-rails.js +1 -1
  68. data/dist/playbook.css +1 -1
  69. data/lib/playbook/version.rb +1 -1
  70. metadata +16 -7
  71. data/app/pb_kits/playbook/pb_tooltip/floating_ui.js +0 -282
  72. data/dist/chunks/_typeahead-HN7DWIZV.js +0 -22
  73. data/dist/chunks/_weekday_stacked-DpwdSQoj.js +0 -45
  74. data/dist/chunks/lib-Co5y3V4K.js +0 -29
@@ -44,7 +44,7 @@
44
44
  <% if object.hide_icon && object.inline %>
45
45
  <!-- Plus Icon -->
46
46
  <div
47
- class="<%= object.icon_wrapper_class %>"
47
+ class="<%= object.icon_wrapper_class %> date-picker-inline-icon-plus"
48
48
  id="<%= object.picker_id %>-icon-plus"
49
49
  >
50
50
  <%= pb_rails("icon", props: {
@@ -55,7 +55,7 @@
55
55
 
56
56
  <!-- Angle Down Icon -->
57
57
  <div
58
- class="<%= object.icon_wrapper_class %>"
58
+ class="<%= object.icon_wrapper_class %> date-picker-inline-angle-down"
59
59
  id="<%= object.picker_id %>-angle-down"
60
60
  >
61
61
  <%= pb_rails("icon", props: {
@@ -174,6 +174,21 @@ const datePickerHelper = (config: DatePickerConfig, scrollContainer: string | HT
174
174
  yearInput.value = fp.currentYear?.toString()
175
175
  }
176
176
 
177
+ const handleDatePickerChange = (fp: Instance, selectedDates: Date[]) => {
178
+ const inputEl = fp.input
179
+
180
+ if (inputEl) {
181
+ const inlineDatePickerElem = inputEl.closest('.inline-date-picker')
182
+ if (inlineDatePickerElem) {
183
+ if (selectedDates && selectedDates.length > 0) {
184
+ inlineDatePickerElem.classList.add('show-angle-down-icon')
185
+ } else {
186
+ inlineDatePickerElem.classList.remove('show-angle-down-icon')
187
+ }
188
+ }
189
+ }
190
+ }
191
+
177
192
  // ===========================================================
178
193
  // | Flatpickr initializer w/ config |
179
194
  // ===========================================================
@@ -204,6 +219,7 @@ const datePickerHelper = (config: DatePickerConfig, scrollContainer: string | HT
204
219
  onClose(selectedDates, dateStr)
205
220
  }],
206
221
  onChange: [(selectedDates, dateStr, fp) => {
222
+ handleDatePickerChange(fp, selectedDates)
207
223
  yearChangeHook(fp)
208
224
  onChange(dateStr, selectedDates)
209
225
  }],
@@ -4,14 +4,3 @@
4
4
  inline: true,
5
5
  picker_id: "date-picker-inline"
6
6
  }) %>
7
-
8
- <%= javascript_tag do %>
9
- window.addEventListener("DOMContentLoaded", (event) => {
10
- const fpInline = document.querySelector("#date-picker-inline")._flatpickr
11
- <!-- Display the angle-down icon when a date has been selected -->
12
- const showAngleDownHandler = () => {
13
- document.querySelector('.inline-date-picker').classList.add('show-angle-down-icon')
14
- }
15
- fpInline.config.onChange.push(showAngleDownHandler)
16
- })
17
- <% end %>
@@ -3,19 +3,12 @@ import React from 'react'
3
3
  import DatePicker from '../_date_picker'
4
4
 
5
5
  const DatePickerInline = (props) => {
6
- const showAngleDownHandler = (dateSelected) => {
7
- if (dateSelected) {
8
- document.querySelector('.inline-date-picker').classList.add('show-angle-down-icon')
9
- }
10
- }
11
-
12
6
  return (
13
7
  <div>
14
8
  <DatePicker
15
9
  className="inline-date-picker"
16
10
  hideIcon
17
11
  inLine
18
- onChange={showAngleDownHandler}
19
12
  pickerId="date-picker-inline"
20
13
  {...props}
21
14
  />
@@ -14,12 +14,12 @@
14
14
  opacity: 1;
15
15
  }
16
16
  &:not(:hover) {
17
- #date-picker-inline-angle-down {
17
+ .date-picker-inline-angle-down.cal_icon_wrapper {
18
18
  svg {
19
19
  display: none;
20
20
  }
21
21
  }
22
- #date-picker-inline-icon-plus {
22
+ .date-picker-inline-icon-plus.cal_icon_wrapper {
23
23
  svg {
24
24
  color: $slate;
25
25
  display: inline-block;
@@ -33,12 +33,12 @@
33
33
  [class^="pb_text_input_kit"] .text_input_wrapper .flatpickr-wrapper .text_input .placeholder {
34
34
  color: $primary;
35
35
  }
36
- #date-picker-inline-angle-down {
36
+ .date-picker-inline-angle-down.cal_icon_wrapper {
37
37
  svg {
38
38
  display: none;
39
39
  }
40
40
  }
41
- #date-picker-inline-icon-plus {
41
+ .date-picker-inline-icon-plus.cal_icon_wrapper {
42
42
  svg {
43
43
  display: inline-block;
44
44
  color: $primary;
@@ -47,32 +47,34 @@
47
47
  }
48
48
  &.show-angle-down-icon {
49
49
  &:not(:hover) {
50
- #date-picker-inline-angle-down {
50
+ .date-picker-inline-angle-down.cal_icon_wrapper {
51
51
  svg {
52
52
  display: inline-block;
53
53
  color: $text_lt_light;
54
54
  }
55
55
  }
56
- #date-picker-inline-icon-plus {
56
+ .date-picker-inline-icon-plus.cal_icon_wrapper {
57
57
  svg {
58
58
  display: none;
59
59
  }
60
60
  }
61
61
  }
62
- #date-picker-inline-icon-plus {
62
+ .date-picker-inline-icon-plus.cal_icon_wrapper {
63
63
  svg {
64
64
  display: none;
65
65
  }
66
66
  }
67
- #date-picker-inline-angle-down {
67
+ .date-picker-inline-angle-down.cal_icon_wrapper {
68
68
  svg {
69
69
  display: inline-block;
70
70
  color: $primary;
71
71
  }
72
72
  }
73
73
  }
74
- #date-picker-inline,
75
- #date-picker-inline .active {
74
+ .date_picker_input.flatpickr-input,
75
+ .date_picker_input.flatpickr-input .active,
76
+ .text_input.flatpickr-input,
77
+ .text_input.flatpickr-input .active {
76
78
  border: none;
77
79
  padding: 5px 5px 5px 10px;
78
80
  background-color: #FFF;
@@ -82,8 +84,8 @@
82
84
  box-shadow: none;
83
85
  }
84
86
  }
85
- #date-picker-inline-angle-down,
86
- #date-picker-inline-icon-plus {
87
+ .date-picker-inline-angle-down.cal_icon_wrapper,
88
+ .date-picker-inline-icon-plus.cal_icon_wrapper {
87
89
  height: 33px;
88
90
  border: none;
89
91
  }
@@ -96,12 +98,12 @@
96
98
  [class^=pb_date_picker_kit].dark {
97
99
  &.inline-date-picker {
98
100
  &:not(:hover) {
99
- #date-picker-inline-angle-down {
101
+ .date-picker-inline-angle-down.cal_icon_wrapper {
100
102
  svg {
101
103
  display: none;
102
104
  }
103
105
  }
104
- #date-picker-inline-icon-plus {
106
+ .date-picker-inline-icon-plus.cal_icon_wrapper {
105
107
  svg {
106
108
  display: inline-block;
107
109
  color: $white;
@@ -115,12 +117,12 @@
115
117
  [class^="pb_text_input_kit"] .text_input_wrapper .flatpickr-wrapper .text_input .placeholder {
116
118
  color: $white;
117
119
  }
118
- #date-picker-inline-angle-down {
120
+ .date-picker-inline-angle-down.cal_icon_wrapper {
119
121
  svg {
120
122
  display: none;
121
123
  }
122
124
  }
123
- #date-picker-inline-icon-plus {
125
+ .date-picker-inline-icon-plus.cal_icon_wrapper {
124
126
  svg {
125
127
  display: inline-block;
126
128
  color: $white;
@@ -129,32 +131,34 @@
129
131
  }
130
132
  &.show-angle-down-icon {
131
133
  &:not(:hover) {
132
- #date-picker-inline-angle-down {
134
+ .date-picker-inline-angle-down.cal_icon_wrapper {
133
135
  svg {
134
136
  display: inline-block;
135
137
  color: $white;
136
138
  }
137
139
  }
138
- #date-picker-inline-icon-plus {
140
+ .date-picker-inline-icon-plus.cal_icon_wrapper {
139
141
  svg {
140
142
  display: none;
141
143
  }
142
144
  }
143
145
  }
144
- #date-picker-inline-icon-plus {
146
+ .date-picker-inline-icon-plus.cal_icon_wrapper {
145
147
  svg {
146
148
  display: none;
147
149
  }
148
150
  }
149
- #date-picker-inline-angle-down {
151
+ .date-picker-inline-angle-down.cal_icon_wrapper {
150
152
  svg {
151
153
  display: inline-block;
152
154
  color: $white;
153
155
  }
154
156
  }
155
157
  }
156
- #date-picker-inline,
157
- #date-picker-inline .active {
158
+ .date_picker_input.flatpickr-input,
159
+ .date_picker_input.flatpickr-input .active,
160
+ .text_input.flatpickr-input,
161
+ .text_input.flatpickr-input .active {
158
162
  background-color: rgba($white,.10);
159
163
  border: none;
160
164
  padding: 5px 5px 5px 10px;
@@ -164,8 +168,8 @@
164
168
  box-shadow: none;
165
169
  }
166
170
  }
167
- #date-picker-inline-angle-down,
168
- #date-picker-inline-icon-plus {
171
+ .date-picker-inline-angle-down.cal_icon_wrapper,
172
+ .date-picker-inline-icon-plus.cal_icon_wrapper {
169
173
  height: 33px;
170
174
  border: none;
171
175
  }
@@ -26,4 +26,5 @@ $pb_dark_detail_colors: (
26
26
  font-size: $text_small;
27
27
  font-weight: $regular;
28
28
  font-family: $font-family-base;
29
+ text-transform: none;
29
30
  }
@@ -12,7 +12,7 @@ const DropdownWithAutocomplete = (props) => {
12
12
  label: "Jasper Furniss",
13
13
  value: "Jasper Furniss",
14
14
  territory: "PHL",
15
- title: "Senior UX Engineer",
15
+ title: "Lead UX Engineer",
16
16
  id: "jasper-furniss",
17
17
  status: "Offline"
18
18
  },
@@ -25,18 +25,18 @@ const DropdownWithAutocomplete = (props) => {
25
25
  status: "Away"
26
26
  },
27
27
  {
28
- label: "Jason Cypret",
29
- value: "Jason Cypret",
28
+ label: "Carlos Lima",
29
+ value: "Carlos Lima",
30
30
  territory: "PHL",
31
- title: "VP of User Experience",
32
- id: "jason-cypret",
31
+ title: "Nitro Developer",
32
+ id: "carlos-lima",
33
33
  status: "Online"
34
34
  },
35
35
  {
36
36
  label: "Courtney Long",
37
37
  value: "Courtney Long",
38
38
  territory: "PHL",
39
- title: "UX Design Mentor",
39
+ title: "Lead UX Designer",
40
40
  id: "courtney-long",
41
41
  status: "Online"
42
42
  }
@@ -15,7 +15,7 @@ const DropdownWithAutocompleteAndCustomDisplay = (props) => {
15
15
  label: "Jasper Furniss",
16
16
  value: "Jasper Furniss",
17
17
  territory: "PHL",
18
- title: "Senior UX Engineer",
18
+ title: "Lead UX Engineer",
19
19
  id: "jasper-furniss",
20
20
  status: "Offline"
21
21
  },
@@ -28,18 +28,18 @@ const DropdownWithAutocompleteAndCustomDisplay = (props) => {
28
28
  status: "Away"
29
29
  },
30
30
  {
31
- label: "Jason Cypret",
32
- value: "Jason Cypret",
31
+ label: "Carlos Lima",
32
+ value: "Carlos Lima",
33
33
  territory: "PHL",
34
- title: "VP of User Experience",
35
- id: "jason-cypret",
34
+ title: "Nitro Developer",
35
+ id: "carlos-lima",
36
36
  status: "Online"
37
37
  },
38
38
  {
39
39
  label: "Courtney Long",
40
40
  value: "Courtney Long",
41
41
  territory: "PHL",
42
- title: "UX Design Mentor",
42
+ title: "Lead UX Designer",
43
43
  id: "courtney-long",
44
44
  status: "Online"
45
45
  }
@@ -15,7 +15,7 @@ const DropdownWithCustomDisplay = (props) => {
15
15
  label: "Jasper Furniss",
16
16
  value: "Jasper Furniss",
17
17
  territory: "PHL",
18
- title: "Senior UX Engineer",
18
+ title: "Lead UX Engineer",
19
19
  id: "jasper-furniss",
20
20
  status: "Offline"
21
21
  },
@@ -28,18 +28,18 @@ const DropdownWithCustomDisplay = (props) => {
28
28
  status: "Away"
29
29
  },
30
30
  {
31
- label: "Jason Cypret",
32
- value: "Jason Cypret",
31
+ label: "Carlos Lima",
32
+ value: "Carlos Lima",
33
33
  territory: "PHL",
34
- title: "VP of User Experience",
35
- id: "jason-cypret",
34
+ title: "Nitro Developer",
35
+ id: "carlos-lima",
36
36
  status: "Online"
37
37
  },
38
38
  {
39
39
  label: "Courtney Long",
40
40
  value: "Courtney Long",
41
41
  territory: "PHL",
42
- title: "UX Design Mentor",
42
+ title: "Lead UX Designer",
43
43
  id: "courtney-long",
44
44
  status: "Online"
45
45
  }
@@ -1,10 +1,10 @@
1
1
  <%
2
- options = [
2
+ options = [
3
3
  {
4
4
  label: "Jasper Furniss",
5
5
  value: "Jasper Furniss",
6
6
  territory: "PHL",
7
- title: "Senior UX Engineer",
7
+ title: "Lead UX Engineer",
8
8
  id: "jasper-furniss",
9
9
  status: "Offline"
10
10
  },
@@ -17,22 +17,22 @@
17
17
  status: "Away"
18
18
  },
19
19
  {
20
- label: "Jason Cypret",
21
- value: "Jason Cypret",
20
+ label: "Carlos Lima",
21
+ value: "Carlos Lima",
22
22
  territory: "PHL",
23
- title: "VP of User Experience",
24
- id: "jason-cypret",
23
+ title: "Nitro Developer",
24
+ id: "carlos-lima",
25
25
  status: "Online"
26
26
  },
27
27
  {
28
28
  label: "Courtney Long",
29
29
  value: "Courtney Long",
30
30
  territory: "PHL",
31
- title: "UX Design Mentor",
31
+ title: "Lead UX Designer",
32
32
  id: "courtney-long",
33
33
  status: "Online"
34
34
  }
35
- ]
35
+ ];
36
36
 
37
37
  %>
38
38
 
@@ -1,6 +1,5 @@
1
1
  import React from 'react'
2
- import { map } from 'lodash'
3
- import { isEmpty, omitBy } from '../../utilities/object'
2
+ import { isEmpty, omitBy, map } from '../../utilities/object'
4
3
 
5
4
  import Body from '../../pb_body/_body'
6
5
  import Caption from '../../pb_caption/_caption'
@@ -46,12 +45,12 @@ const CurrentFilters = ({ dark, filters }: CurrentFiltersProps): React.ReactElem
46
45
  dark={dark}
47
46
  size={4}
48
47
  tag="h4"
49
- text={name}
48
+ text={`${name}`}
50
49
  /> :
51
50
  <div>
52
51
  <Caption
53
52
  dark={dark}
54
- text={name}
53
+ text={`${name}`}
55
54
  />
56
55
  <Title
57
56
  dark={dark}
@@ -1,6 +1,5 @@
1
1
  import React, { useState } from 'react'
2
- import { map } from 'lodash'
3
- import { find, partial } from '../../utilities/object'
2
+ import { find, partial, map } from '../../utilities/object'
4
3
 
5
4
  import Button from '../../pb_button/_button'
6
5
  import Icon from '../../pb_icon/_icon'
@@ -27,7 +26,7 @@ const directionIcon = (dir: Direction) => (
27
26
 
28
27
  const renderOptions = (options: SortOptions, value: SortValue[], handleChange: (arg0: SortValue) => void) => (
29
28
  map(options, (label, name) => {
30
- const next = nextValue(value, name)
29
+ const next = nextValue(value, String(name))
31
30
  return (
32
31
  <ListItem key={`option-${next.name}-${next.dir}`}>
33
32
  <Button
@@ -1,5 +1,5 @@
1
1
  import PbEnhancedElement from '../pb_enhanced_element'
2
- import { debounce } from 'lodash'
2
+ import { debounce } from '../utilities/object'
3
3
 
4
4
  // Kit selectors
5
5
  const KIT_SELECTOR = '[class^="pb_"][class*="_kit"]'
@@ -10,6 +10,8 @@ $list-header-height: $space_lg;
10
10
  $list-footer-height: $space_lg;
11
11
  $list-border-radius: $border_rad_lighter;
12
12
  $card-border-radius: $border_rad_lightest;
13
+ $bracket-connector-width: 45px;
14
+ $bracket-border-width: 4px;
13
15
 
14
16
 
15
17
  [class^=pb_layout_kit] {
@@ -168,6 +170,62 @@ $card-border-radius: $border_rad_lightest;
168
170
  }
169
171
  }
170
172
 
173
+ &[class*=_bracket]{
174
+ display: flex;
175
+ overflow-x: scroll;
176
+
177
+ div.layout_round {
178
+ display: flex;
179
+ flex-direction: column;
180
+ justify-content: space-around;
181
+ flex-grow: 1;
182
+ }
183
+
184
+ .connector_container {
185
+ display: flex;
186
+ flex-direction: column;
187
+ justify-content: space-around;
188
+ }
189
+ .right_connector {
190
+ border-top: $bracket-border-width solid $border_light;
191
+ width: $bracket-connector-width;
192
+ margin-left: $bracket-connector-width;
193
+ }
194
+
195
+ .layout_round .layout_game {
196
+ position: relative;
197
+ }
198
+
199
+ .half_box {
200
+ content: '';
201
+ position: absolute;
202
+ top: calc(50% - $bracket-border-width / 2);
203
+ height: calc(100% + $bracket-border-width);
204
+ width: $bracket-connector-width;
205
+ right: -$bracket-connector-width;
206
+ border-top-right-radius: $border_radius_lg;
207
+ border-bottom-right-radius: $border_radius_lg;
208
+ border-top: $bracket-border-width solid $border_light;
209
+ border-bottom: $bracket-border-width solid $border_light;
210
+ border-right: $bracket-border-width solid $border_light;
211
+ }
212
+
213
+ .layout_round_label {
214
+ display: none;
215
+ }
216
+
217
+ @media (max-width: $screen-md-max) {
218
+ flex-direction: column;
219
+ .layout_round_label {
220
+ display: block;
221
+ }
222
+ .layout_round .layout_game::after,
223
+ .connector_container,
224
+ .half_box {
225
+ display: none !important;
226
+ }
227
+ }
228
+ }
171
229
 
172
230
  &[class*=_sidebar]{
173
231
  $layout_sizes: (
@@ -4,6 +4,9 @@ import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../uti
4
4
 
5
5
  import { GlobalProps, globalProps, globalInlineProps } from '../utilities/globalProps'
6
6
 
7
+ import { Round, RoundLabel } from "./subcomponents/_round";
8
+ import Game from "./subcomponents/_game";
9
+
7
10
  type LayoutPropTypes = {
8
11
  aria?: {[key: string]: string},
9
12
  children?: React.ReactChild[] | React.ReactChild,
@@ -18,7 +21,7 @@ type LayoutPropTypes = {
18
21
  size?: "xs" | "sm" | "md" | "base" | "lg" | "xl",
19
22
  variant?: "light" | "dark" | "gradient",
20
23
  transparent?: boolean,
21
- layout?: "sidebar" | "collection" | "kanban" | "content" | "masonry",
24
+ layout?: "sidebar" | "collection" | "kanban" | "content" | "masonry" | "bracket",
22
25
  } & GlobalProps
23
26
 
24
27
  type LayoutSideProps = {
@@ -140,7 +143,7 @@ const Layout = (props: LayoutPropTypes) => {
140
143
  const htmlProps = buildHtmlProps(htmlOptions)
141
144
 
142
145
  const layoutCss =
143
- layout == 'collection'
146
+ (layout == 'collection' || layout == 'bracket')
144
147
  ? `pb_layout_kit_${layout}`
145
148
  : layout == 'kanban'
146
149
  ? `pb_layout_kit_${layout}${responsiveClass}`
@@ -151,11 +154,9 @@ const Layout = (props: LayoutPropTypes) => {
151
154
  })
152
155
 
153
156
  const layoutCollapseCss =
154
- layout == 'collection'
157
+ (layout == 'collection' || layout == 'kanban' || layout == 'bracket')
155
158
  ? ''
156
- : layout == 'kanban'
157
- ? ''
158
- : buildCss('layout', position, 'collapse', collapse)
159
+ : buildCss('layout', position, 'collapse', collapse)
159
160
 
160
161
  const layoutChildren = React.Children.toArray(children)
161
162
 
@@ -175,6 +176,15 @@ const Layout = (props: LayoutPropTypes) => {
175
176
  (child: React.ReactElement & {type: {displayName: string}}) => child.type?.displayName !== 'Side'
176
177
  )
177
178
 
179
+ const numberOfRounds = Array.isArray(nonSideChildren) ? React.Children.toArray(children).filter(
180
+ (child) => {
181
+ return (child as React.ReactElement).type === Layout.Round;
182
+ }
183
+ ).length : 0
184
+ const bracketChildren = nonSideChildren.map(child =>
185
+ React.isValidElement(child) ? React.cloneElement(child, { numberOfRounds }) : child
186
+ )
187
+
178
188
  const filteredProps = {...props}
179
189
  delete filteredProps?.position
180
190
 
@@ -196,7 +206,7 @@ const Layout = (props: LayoutPropTypes) => {
196
206
  style={dynamicInlineProps}
197
207
  >
198
208
  {subComponentTags('Side')}
199
- {nonSideChildren}
209
+ {layout === 'bracket' ? bracketChildren : nonSideChildren}
200
210
  </div>
201
211
  )
202
212
  }
@@ -206,5 +216,8 @@ Layout.Body = Body
206
216
  Layout.Item = Item
207
217
  Layout.Header = Header
208
218
  Layout.Footer = Footer
219
+ Layout.Round = Round
220
+ Layout.Game = Game
221
+ Layout.RoundLabel = RoundLabel
209
222
 
210
223
  export default Layout