playbook_ui 14.18.0.pre.alpha.revert4567revert4553PLAY2056ATcolbordercolors7469 → 14.18.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 +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/Components/RegularTableView.tsx +3 -23
- data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +3 -67
- data/app/pb_kits/playbook/pb_advanced_table/Hooks/useTableActions.ts +2 -1
- data/app/pb_kits/playbook/pb_advanced_table/Utilities/ExpansionControlHelpers.tsx +19 -29
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +143 -365
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +1 -14
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +1 -6
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx +2 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_rails.md +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_react.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md +2 -6
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md +2 -6
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +3 -10
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -6
- data/app/pb_kits/playbook/pb_advanced_table/index.js +0 -7
- data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/circleChart.test.js +2 -2
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.html.erb +2 -2
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.jsx +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.html.erb +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.jsx +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.html.erb +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.jsx +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.html.erb +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.jsx +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_live_data.jsx +2 -2
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.html.erb +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.jsx +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/example.yml +3 -2
- data/app/pb_kits/playbook/pb_circle_chart/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.scss +1 -39
- data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.tsx +0 -4
- data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.rb +1 -9
- data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.test.js +0 -14
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_copy_button/_copy_button.tsx +45 -19
- data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_copy_button/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_copy_button/index.js +20 -46
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +0 -12
- data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +0 -12
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +1 -50
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_error.jsx +1 -4
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_rails.md +0 -4
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_range_limit.md +1 -1
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_react.md +1 -5
- data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_date_picker/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_date_picker/plugins/quickPick.tsx +0 -10
- data/app/pb_kits/playbook/pb_dialog/dialog.html.erb +1 -10
- data/app/pb_kits/playbook/pb_dialog/dialog.rb +0 -2
- data/app/pb_kits/playbook/pb_dialog/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_dialog/index.js +14 -106
- data/app/pb_kits/playbook/pb_draggable/docs/example.yml +1 -3
- data/app/pb_kits/playbook/pb_draggable/draggable.rb +1 -9
- data/app/pb_kits/playbook/pb_draggable/index.js +142 -139
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.jsx +1 -4
- data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownOption.tsx +1 -1
- data/app/pb_kits/playbook/pb_filter/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_form_group/_form_group.scss +3 -23
- data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.html.erb +5 -15
- data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.jsx +6 -39
- data/app/pb_kits/playbook/pb_gauge/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_gauge/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_layout/_layout.scss +1 -70
- data/app/pb_kits/playbook/pb_layout/_layout.tsx +2 -29
- data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.jsx +118 -322
- data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.md +1 -1
- data/app/pb_kits/playbook/pb_layout/subcomponents/_game.tsx +43 -74
- data/app/pb_kits/playbook/pb_layout/subcomponents/_round.tsx +4 -21
- data/app/pb_kits/playbook/pb_line_graph/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_line_graph/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_overlay/_overlay.scss +22 -83
- data/app/pb_kits/playbook/pb_overlay/_overlay.tsx +7 -39
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md +7 -1
- data/app/pb_kits/playbook/pb_overlay/docs/example.yml +0 -5
- data/app/pb_kits/playbook/pb_overlay/docs/index.js +0 -5
- data/app/pb_kits/playbook/pb_overlay/overlay.test.jsx +1 -39
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +0 -13
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +1 -3
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.jsx +1 -8
- data/app/pb_kits/playbook/pb_phone_number_input/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_phone_number_input/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.rb +0 -3
- data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.test.js +0 -19
- data/app/pb_kits/playbook/pb_popover/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_popover/index.ts +1 -13
- data/app/pb_kits/playbook/pb_popover/popover.rb +0 -2
- data/app/pb_kits/playbook/pb_select/docs/_select_error.jsx +2 -7
- data/app/pb_kits/playbook/pb_table/_table.tsx +2 -2
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows.md +1 -3
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows_rails.md +1 -3
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table.md +1 -3
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table_rails.md +1 -3
- data/app/pb_kits/playbook/pb_table/styles/_collapsible.scss +1 -1
- data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +5 -13
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_error.jsx +1 -9
- data/app/pb_kits/playbook/pb_text_input/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_text_input/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_text_input/inputMask.ts +1 -8
- data/app/pb_kits/playbook/pb_textarea/docs/_textarea_error.jsx +1 -7
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_error_state.jsx +2 -6
- data/dist/chunks/_typeahead-C2GOKWtm.js +22 -0
- data/dist/chunks/_weekday_stacked-CFGTPT0O.js +45 -0
- data/dist/chunks/lib-BGzBzFZX.js +29 -0
- data/dist/chunks/{pb_form_validation-BWjy4bFn.js → pb_form_validation-BvNy9Bd6.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +2 -2
- data/dist/playbook-doc.js +1 -19
- 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 +2 -2
- metadata +8 -71
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color.jsx +0 -80
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color.md +0 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color_rails.html.erb +0 -58
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color_rails.md +0 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expand_by_depth.jsx +0 -66
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expand_by_depth.md +0 -10
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns.jsx +0 -58
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns.md +0 -6
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns_and_header.jsx +0 -64
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns_and_header.md +0 -8
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header.jsx +0 -55
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header.md +0 -3
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header_rails.html.erb +0 -33
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header_rails.md +0 -3
- data/app/pb_kits/playbook/pb_advanced_table/scss_partials/advanced_table_sticky_mixin.scss +0 -97
- data/app/pb_kits/playbook/pb_circle_chart/circleChartTheme.ts +0 -53
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_pb_styles.jsx +0 -38
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_pb_styles.md +0 -1
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_size.html.erb +0 -28
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_size.jsx +0 -42
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_size.md +0 -1
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_hook.jsx +0 -54
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_hook.md +0 -3
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_hook_rails.html.erb +0 -14
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_hook_rails.md +0 -3
- data/app/pb_kits/playbook/pb_copy_button/usePBCopy.ts +0 -45
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern.jsx +0 -34
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern.md +0 -14
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern_rails.html.erb +0 -20
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern_rails.md +0 -14
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_turbo_frames.html.erb +0 -117
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_turbo_frames_rails.md +0 -9
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.html.erb +0 -43
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.html.erb +0 -55
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors_rails.md +0 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_event_listeners.html.erb +0 -42
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_event_listeners.md +0 -1
- data/app/pb_kits/playbook/pb_filter/docs/_filter_within_turbo_frames.html.erb +0 -41
- data/app/pb_kits/playbook/pb_filter/docs/_filter_within_turbo_frames.md +0 -1
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_pb_styles.jsx +0 -30
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_pb_styles.md +0 -1
- data/app/pb_kits/playbook/pb_gauge/gaugeTheme.ts +0 -85
- data/app/pb_kits/playbook/pb_layout/subcomponents/_participant.tsx +0 -79
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.jsx +0 -52
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.md +0 -1
- data/app/pb_kits/playbook/pb_line_graph/lineGraphTheme.ts +0 -110
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_color.jsx +0 -63
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_color.md +0 -3
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_fullscreen_background.jsx +0 -49
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_fullscreen_background.md +0 -1
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_fullscreen_opacity.jsx +0 -81
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_fullscreen_opacity.md +0 -1
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.jsx +0 -39
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.md +0 -1
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.jsx +0 -40
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.md +0 -5
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_country_search.html.erb +0 -10
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_country_search.jsx +0 -20
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_country_search.md +0 -1
- data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.html.erb +0 -46
- data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.md +0 -1
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_sanitize.jsx +0 -94
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_sanitize.md +0 -1
- data/dist/chunks/_typeahead-D8CsVBZO.js +0 -22
- data/dist/chunks/_weekday_stacked-D3oLTSkH.js +0 -45
- data/dist/chunks/lib-BmTAc7Nc.js +0 -29
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_drop_zones_react.md → _draggable_drop_zones.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_drop_zones_colors_react.md → _draggable_drop_zones_colors.md} +0 -0
@@ -210,78 +210,10 @@ $bracket-border-width: 4px;
|
|
210
210
|
border-right: $bracket-border-width solid $border_light;
|
211
211
|
}
|
212
212
|
|
213
|
-
.polygon_node {
|
214
|
-
position: absolute;
|
215
|
-
top: calc(50% - 5px);
|
216
|
-
right: -10px;
|
217
|
-
|
218
|
-
width: 0;
|
219
|
-
height: 0;
|
220
|
-
border-top: 5px solid transparent;
|
221
|
-
border-bottom: 5px solid transparent;
|
222
|
-
border-left: 10px solid $border_light;
|
223
|
-
}
|
224
|
-
|
225
213
|
.layout_round_label {
|
226
214
|
display: none;
|
227
215
|
}
|
228
216
|
|
229
|
-
.layout_participant,
|
230
|
-
.layout_participant_winner,
|
231
|
-
.layout_participant_self,
|
232
|
-
.layout_participant_winner_self,
|
233
|
-
.layout_participant_winner_self_last {
|
234
|
-
height: 60px;
|
235
|
-
}
|
236
|
-
|
237
|
-
.layout_tbd {
|
238
|
-
height: 140px;
|
239
|
-
display: flex;
|
240
|
-
flex-direction: column;
|
241
|
-
justify-content: center;
|
242
|
-
}
|
243
|
-
|
244
|
-
.layout_participant_winner,
|
245
|
-
.layout_participant_self,
|
246
|
-
.layout_participant_winner_self,
|
247
|
-
.layout_participant_winner_self_last {
|
248
|
-
position: relative;
|
249
|
-
|
250
|
-
&::after {
|
251
|
-
content: "";
|
252
|
-
position: absolute;
|
253
|
-
top: 0;
|
254
|
-
width: 4px;
|
255
|
-
height: 100%;
|
256
|
-
}
|
257
|
-
}
|
258
|
-
|
259
|
-
.layout_participant_winner::after {
|
260
|
-
right: 0;
|
261
|
-
background: $product_6_highlight;
|
262
|
-
}
|
263
|
-
|
264
|
-
.layout_participant_self::after {
|
265
|
-
left: 0;
|
266
|
-
background: $category_1;
|
267
|
-
}
|
268
|
-
|
269
|
-
.layout_participant_winner_self::after {
|
270
|
-
right: 0;
|
271
|
-
background: $product_6_highlight;
|
272
|
-
}
|
273
|
-
|
274
|
-
.layout_participant_winner_self_last::after {
|
275
|
-
left: 0;
|
276
|
-
background: $category_1;
|
277
|
-
}
|
278
|
-
|
279
|
-
.game_separator {
|
280
|
-
&::before, &::after {
|
281
|
-
height: 2px;
|
282
|
-
}
|
283
|
-
}
|
284
|
-
|
285
217
|
@media (max-width: $screen-md-max) {
|
286
218
|
flex-direction: column;
|
287
219
|
.layout_round_label {
|
@@ -289,8 +221,7 @@ $bracket-border-width: 4px;
|
|
289
221
|
}
|
290
222
|
.layout_round .layout_game::after,
|
291
223
|
.connector_container,
|
292
|
-
.half_box
|
293
|
-
.polygon_node {
|
224
|
+
.half_box {
|
294
225
|
display: none !important;
|
295
226
|
}
|
296
227
|
}
|
@@ -6,7 +6,6 @@ import { GlobalProps, globalProps, globalInlineProps } from '../utilities/global
|
|
6
6
|
|
7
7
|
import { Round, RoundLabel } from "./subcomponents/_round";
|
8
8
|
import Game from "./subcomponents/_game";
|
9
|
-
import Participant from "./subcomponents/_participant";
|
10
9
|
|
11
10
|
type LayoutPropTypes = {
|
12
11
|
aria?: {[key: string]: string},
|
@@ -177,38 +176,13 @@ const Layout = (props: LayoutPropTypes) => {
|
|
177
176
|
(child: React.ReactElement & {type: {displayName: string}}) => child.type?.displayName !== 'Side'
|
178
177
|
)
|
179
178
|
|
180
|
-
const numberOfRounds = Array.isArray(
|
179
|
+
const numberOfRounds = Array.isArray(nonSideChildren) ? React.Children.toArray(children).filter(
|
181
180
|
(child) => {
|
182
181
|
return (child as React.ReactElement).type === Layout.Round;
|
183
182
|
}
|
184
183
|
).length : 0
|
185
|
-
|
186
|
-
const lastRoundWithSelf = React.Children.toArray(children).filter((child) => {
|
187
|
-
if ((child as React.ReactElement).type !== Layout.Round) {
|
188
|
-
return false
|
189
|
-
}
|
190
|
-
|
191
|
-
const roundElement = child as React.ReactElement
|
192
|
-
|
193
|
-
const gameChildren = React.Children.toArray(roundElement.props.children)
|
194
|
-
|
195
|
-
const hasWinningSelfParticipant = gameChildren.some((gameChild) => {
|
196
|
-
const gameElement = gameChild as React.ReactElement
|
197
|
-
|
198
|
-
const participantChildren = React.Children.toArray(gameElement.props.children)
|
199
|
-
|
200
|
-
return participantChildren.some((participantChild) => {
|
201
|
-
const participantElement = participantChild as React.ReactElement
|
202
|
-
const { self } = participantElement.props
|
203
|
-
return self === true
|
204
|
-
})
|
205
|
-
})
|
206
|
-
|
207
|
-
return hasWinningSelfParticipant
|
208
|
-
}).length
|
209
|
-
|
210
184
|
const bracketChildren = nonSideChildren.map(child =>
|
211
|
-
React.isValidElement(child) ? React.cloneElement(child, { numberOfRounds
|
185
|
+
React.isValidElement(child) ? React.cloneElement(child, { numberOfRounds }) : child
|
212
186
|
)
|
213
187
|
|
214
188
|
const filteredProps = {...props}
|
@@ -245,6 +219,5 @@ Layout.Footer = Footer
|
|
245
219
|
Layout.Round = Round
|
246
220
|
Layout.Game = Game
|
247
221
|
Layout.RoundLabel = RoundLabel
|
248
|
-
Layout.Participant = Participant
|
249
222
|
|
250
223
|
export default Layout
|
@@ -1,102 +1,11 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
|
3
3
|
import Layout from '../../pb_layout/_layout'
|
4
|
+
import Flex from '../../pb_flex/_flex'
|
5
|
+
import Body from '../../pb_body/_body'
|
4
6
|
import Caption from '../../pb_caption/_caption'
|
5
7
|
import SectionSeparator from '../../pb_section_separator/_section_separator'
|
6
8
|
|
7
|
-
const teamData = {
|
8
|
-
eagles: {
|
9
|
-
avatar:"https://images.unsplash.com/photo-1628703117067-fb7c9c20946e?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Mnx8ZWFnbGVzfGVufDB8fDB8fHww",
|
10
|
-
name:"Eagles",
|
11
|
-
rank:"#1 NFC East",
|
12
|
-
territory:"PHI",
|
13
|
-
},
|
14
|
-
packers: {
|
15
|
-
avatar:"https://images.unsplash.com/photo-1486297678162-eb2a19b0a32d?q=80&w=500&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
16
|
-
name:"Packers",
|
17
|
-
rank:"#3 NFC North",
|
18
|
-
territory:"GB",
|
19
|
-
},
|
20
|
-
vikings: {
|
21
|
-
avatar:"https://images.unsplash.com/photo-1525540796810-55f9fbc5592f?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MTV8fHZpa2luZ3xlbnwwfHwwfHx8MA%3D%3D",
|
22
|
-
name:"Vikings",
|
23
|
-
rank:"#2 NFC North",
|
24
|
-
territory:"MIN",
|
25
|
-
},
|
26
|
-
rams: {
|
27
|
-
avatar:"https://images.unsplash.com/photo-1490739043913-239b6cdf4084?q=80&w=500&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
28
|
-
name:"Rams",
|
29
|
-
rank:"#1 NFC West",
|
30
|
-
territory:"LAR",
|
31
|
-
},
|
32
|
-
lions: {
|
33
|
-
avatar:"https://images.unsplash.com/photo-1614027164847-1b28cfe1df60?q=80&w=500&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
34
|
-
name:"Lions",
|
35
|
-
rank:"#1 NFC North",
|
36
|
-
territory:"DET",
|
37
|
-
},
|
38
|
-
commanders: {
|
39
|
-
avatar:"https://images.unsplash.com/photo-1501466044931-62695aada8e9?q=80&w=500&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
40
|
-
name:"Commanders",
|
41
|
-
rank:"#2 NFC East",
|
42
|
-
territory:"WAS",
|
43
|
-
},
|
44
|
-
buccaneers: {
|
45
|
-
avatar:"https://images.unsplash.com/photo-1584116843008-46d529f04145?q=80&w=500&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
46
|
-
name:"Buccaneers",
|
47
|
-
rank:"#1 NFC South",
|
48
|
-
territory:"TB",
|
49
|
-
},
|
50
|
-
chiefs: {
|
51
|
-
avatar:"https://plus.unsplash.com/premium_photo-1697729864667-57f5f29e946b?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MXx8a2Fuc2FzJTIwY2l0eXxlbnwwfHwwfHx8MA%3D%3D",
|
52
|
-
name:"Chiefs",
|
53
|
-
rank:"#1 AFC West",
|
54
|
-
territory:"KC",
|
55
|
-
},
|
56
|
-
chargers: {
|
57
|
-
avatar:"https://images.unsplash.com/photo-1529310399831-ed472b81d589?q=80&w=500&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
58
|
-
name:"Chargers",
|
59
|
-
rank:"#2 AFC West",
|
60
|
-
territory:"LAC",
|
61
|
-
},
|
62
|
-
texans: {
|
63
|
-
avatar:"https://images.unsplash.com/photo-1545345540-ea5d968030af?q=80&w=500&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
64
|
-
name:"Texans",
|
65
|
-
rank:"#1 AFC South",
|
66
|
-
territory:"HOU",
|
67
|
-
},
|
68
|
-
broncos: {
|
69
|
-
avatar:"https://images.unsplash.com/photo-1553284965-83fd3e82fa5a?q=80&w=500&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
70
|
-
name:"Broncos",
|
71
|
-
rank:"#3 AFC West",
|
72
|
-
territory:"DEN",
|
73
|
-
},
|
74
|
-
bills: {
|
75
|
-
avatar:"https://images.unsplash.com/photo-1575414914265-ebc9aa2637f4?q=80&w=500&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
|
76
|
-
name:"Bills",
|
77
|
-
rank:"#1 AFC East",
|
78
|
-
territory:"BUF",
|
79
|
-
},
|
80
|
-
steelers: {
|
81
|
-
avatar:"https://plus.unsplash.com/premium_photo-1697730155764-cc8ca8f78cbe?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MXx8cGl0dHNidXJnaHxlbnwwfHwwfHx8MA%3D%3D",
|
82
|
-
name:"Steelers",
|
83
|
-
rank:"#2 AFC North",
|
84
|
-
territory:"PIT",
|
85
|
-
},
|
86
|
-
ravens: {
|
87
|
-
avatar:"https://images.unsplash.com/photo-1433888376991-1297486ba3f5?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Mnx8cmF2ZW58ZW58MHx8MHx8fDA%3D",
|
88
|
-
name:"Ravens",
|
89
|
-
rank:"#1 AFC North",
|
90
|
-
territory:"BAL",
|
91
|
-
},
|
92
|
-
bye: {
|
93
|
-
avatar:"",
|
94
|
-
name:"BYE",
|
95
|
-
rank:"",
|
96
|
-
territory:"",
|
97
|
-
},
|
98
|
-
}
|
99
|
-
|
100
9
|
const LayoutBracket = () => {
|
101
10
|
return (
|
102
11
|
<div>
|
@@ -109,141 +18,80 @@ const LayoutBracket = () => {
|
|
109
18
|
</Layout.RoundLabel>
|
110
19
|
<Layout.Round marginBottom={{ xs: "md", sm: "md" }}>
|
111
20
|
<Layout.Game>
|
112
|
-
<
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
avatar={teamData.eagles.avatar}
|
121
|
-
name={teamData.eagles.name}
|
122
|
-
points="22"
|
123
|
-
rank={teamData.eagles.rank}
|
124
|
-
self
|
125
|
-
territory={teamData.eagles.territory}
|
126
|
-
winner
|
127
|
-
/>
|
21
|
+
<Flex justify="between">
|
22
|
+
<Body>Packers</Body>
|
23
|
+
<Body>10</Body>
|
24
|
+
</Flex>
|
25
|
+
<Flex justify="between">
|
26
|
+
<Body><strong>Eagles</strong></Body>
|
27
|
+
<Body>22</Body>
|
28
|
+
</Flex>
|
128
29
|
</Layout.Game>
|
129
30
|
<Layout.Game>
|
130
|
-
<
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
avatar={teamData.rams.avatar}
|
139
|
-
name={teamData.rams.name}
|
140
|
-
points="27"
|
141
|
-
rank={teamData.rams.rank}
|
142
|
-
territory={teamData.rams.territory}
|
143
|
-
winner
|
144
|
-
/>
|
31
|
+
<Flex justify="between">
|
32
|
+
<Body>Vikings</Body>
|
33
|
+
<Body>9</Body>
|
34
|
+
</Flex>
|
35
|
+
<Flex justify="between">
|
36
|
+
<Body><strong>Rams</strong></Body>
|
37
|
+
<Body>27</Body>
|
38
|
+
</Flex>
|
145
39
|
</Layout.Game>
|
146
40
|
<Layout.Game>
|
147
|
-
<
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
winner
|
154
|
-
/>
|
155
|
-
<Layout.Participant
|
156
|
-
avatar={teamData.bye.avatar}
|
157
|
-
name={teamData.bye.name}
|
158
|
-
points=""
|
159
|
-
rank={teamData.bye.rank}
|
160
|
-
territory={teamData.bye.territory}
|
161
|
-
/>
|
41
|
+
<Flex justify="between">
|
42
|
+
<Body><strong>Lions</strong></Body>
|
43
|
+
</Flex>
|
44
|
+
<Flex justify="between">
|
45
|
+
<Body>BYE</Body>
|
46
|
+
</Flex>
|
162
47
|
</Layout.Game>
|
163
48
|
<Layout.Game>
|
164
|
-
<
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
<Layout.Participant
|
173
|
-
avatar={teamData.buccaneers.avatar}
|
174
|
-
name={teamData.buccaneers.name}
|
175
|
-
points="20"
|
176
|
-
rank={teamData.buccaneers.rank}
|
177
|
-
territory={teamData.buccaneers.territory}
|
178
|
-
/>
|
49
|
+
<Flex justify="between">
|
50
|
+
<Body><strong>Commanders</strong></Body>
|
51
|
+
<Body>23</Body>
|
52
|
+
</Flex>
|
53
|
+
<Flex justify="between">
|
54
|
+
<Body>Buccaneers</Body>
|
55
|
+
<Body>20</Body>
|
56
|
+
</Flex>
|
179
57
|
</Layout.Game>
|
180
58
|
<Layout.Game>
|
181
|
-
<
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
winner
|
188
|
-
/>
|
189
|
-
<Layout.Participant
|
190
|
-
avatar={teamData.bye.avatar}
|
191
|
-
name={teamData.bye.name}
|
192
|
-
points=""
|
193
|
-
rank={teamData.bye.rank}
|
194
|
-
territory={teamData.bye.territory}
|
195
|
-
/>
|
59
|
+
<Flex justify="between">
|
60
|
+
<Body><strong>Chiefs</strong></Body>
|
61
|
+
</Flex>
|
62
|
+
<Flex justify="between">
|
63
|
+
<Body>BYE</Body>
|
64
|
+
</Flex>
|
196
65
|
</Layout.Game>
|
197
66
|
<Layout.Game>
|
198
|
-
<
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
avatar={teamData.texans.avatar}
|
207
|
-
name={teamData.texans.name}
|
208
|
-
points="32"
|
209
|
-
rank={teamData.texans.rank}
|
210
|
-
territory={teamData.texans.territory}
|
211
|
-
winner
|
212
|
-
/>
|
67
|
+
<Flex justify="between">
|
68
|
+
<Body>Chargers</Body>
|
69
|
+
<Body>12</Body>
|
70
|
+
</Flex>
|
71
|
+
<Flex justify="between">
|
72
|
+
<Body><strong>Texans</strong></Body>
|
73
|
+
<Body>32</Body>
|
74
|
+
</Flex>
|
213
75
|
</Layout.Game>
|
214
76
|
<Layout.Game>
|
215
|
-
<
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
avatar={teamData.bills.avatar}
|
224
|
-
name={teamData.bills.name}
|
225
|
-
points="31"
|
226
|
-
rank={teamData.bills.rank}
|
227
|
-
territory={teamData.bills.territory}
|
228
|
-
winner
|
229
|
-
/>
|
77
|
+
<Flex justify="between">
|
78
|
+
<Body>Broncos</Body>
|
79
|
+
<Body>7</Body>
|
80
|
+
</Flex>
|
81
|
+
<Flex justify="between">
|
82
|
+
<Body><strong>Bills</strong></Body>
|
83
|
+
<Body>31</Body>
|
84
|
+
</Flex>
|
230
85
|
</Layout.Game>
|
231
86
|
<Layout.Game>
|
232
|
-
<
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
avatar={teamData.ravens.avatar}
|
241
|
-
name={teamData.ravens.name}
|
242
|
-
points="28"
|
243
|
-
rank={teamData.ravens.rank}
|
244
|
-
territory={teamData.ravens.territory}
|
245
|
-
winner
|
246
|
-
/>
|
87
|
+
<Flex justify="between">
|
88
|
+
<Body>Steelers</Body>
|
89
|
+
<Body>14</Body>
|
90
|
+
</Flex>
|
91
|
+
<Flex justify="between">
|
92
|
+
<Body><strong>Ravens</strong></Body>
|
93
|
+
<Body>28</Body>
|
94
|
+
</Flex>
|
247
95
|
</Layout.Game>
|
248
96
|
</Layout.Round>
|
249
97
|
<Layout.RoundLabel>
|
@@ -252,73 +100,44 @@ const LayoutBracket = () => {
|
|
252
100
|
</Layout.RoundLabel>
|
253
101
|
<Layout.Round marginBottom={{ xs: "md", sm: "md" }}>
|
254
102
|
<Layout.Game>
|
255
|
-
<
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
avatar={teamData.eagles.avatar}
|
264
|
-
name={teamData.eagles.name}
|
265
|
-
points="28"
|
266
|
-
rank={teamData.eagles.rank}
|
267
|
-
self
|
268
|
-
territory={teamData.eagles.territory}
|
269
|
-
winner
|
270
|
-
/>
|
103
|
+
<Flex justify="between">
|
104
|
+
<Body>Rams</Body>
|
105
|
+
<Body>22</Body>
|
106
|
+
</Flex>
|
107
|
+
<Flex justify="between">
|
108
|
+
<Body><strong>Eagles</strong></Body>
|
109
|
+
<Body>28</Body>
|
110
|
+
</Flex>
|
271
111
|
</Layout.Game>
|
272
112
|
<Layout.Game>
|
273
|
-
<
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
<Layout.Participant
|
282
|
-
avatar={teamData.lions.avatar}
|
283
|
-
name={teamData.lions.name}
|
284
|
-
points="31"
|
285
|
-
rank={teamData.lions.rank}
|
286
|
-
territory={teamData.lions.territory}
|
287
|
-
/>
|
113
|
+
<Flex justify="between">
|
114
|
+
<Body><strong>Commanders</strong></Body>
|
115
|
+
<Body>45</Body>
|
116
|
+
</Flex>
|
117
|
+
<Flex justify="between">
|
118
|
+
<Body>Lions</Body>
|
119
|
+
<Body>31</Body>
|
120
|
+
</Flex>
|
288
121
|
</Layout.Game>
|
289
122
|
<Layout.Game>
|
290
|
-
<
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
avatar={teamData.chiefs.avatar}
|
299
|
-
name={teamData.chiefs.name}
|
300
|
-
points="23"
|
301
|
-
rank={teamData.chiefs.rank}
|
302
|
-
territory={teamData.chiefs.territory}
|
303
|
-
winner
|
304
|
-
/>
|
123
|
+
<Flex justify="between">
|
124
|
+
<Body>Texans</Body>
|
125
|
+
<Body>14</Body>
|
126
|
+
</Flex>
|
127
|
+
<Flex justify="between">
|
128
|
+
<Body><strong>Chiefs</strong></Body>
|
129
|
+
<Body>23</Body>
|
130
|
+
</Flex>
|
305
131
|
</Layout.Game>
|
306
132
|
<Layout.Game>
|
307
|
-
<
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
avatar={teamData.bills.avatar}
|
316
|
-
name={teamData.bills.name}
|
317
|
-
points="27"
|
318
|
-
rank={teamData.bills.rank}
|
319
|
-
territory={teamData.bills.territory}
|
320
|
-
winner
|
321
|
-
/>
|
133
|
+
<Flex justify="between">
|
134
|
+
<Body>Ravens</Body>
|
135
|
+
<Body>25</Body>
|
136
|
+
</Flex>
|
137
|
+
<Flex justify="between">
|
138
|
+
<Body><strong>Bills</strong></Body>
|
139
|
+
<Body>27</Body>
|
140
|
+
</Flex>
|
322
141
|
</Layout.Game>
|
323
142
|
</Layout.Round>
|
324
143
|
<Layout.RoundLabel>
|
@@ -327,39 +146,24 @@ const LayoutBracket = () => {
|
|
327
146
|
</Layout.RoundLabel>
|
328
147
|
<Layout.Round marginBottom={{ xs: "md", sm: "md" }}>
|
329
148
|
<Layout.Game>
|
330
|
-
<
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
avatar={teamData.eagles.avatar}
|
339
|
-
name={teamData.eagles.name}
|
340
|
-
points="55"
|
341
|
-
rank={teamData.eagles.rank}
|
342
|
-
self
|
343
|
-
territory={teamData.eagles.territory}
|
344
|
-
winner
|
345
|
-
/>
|
149
|
+
<Flex justify="between">
|
150
|
+
<Body>Commanders</Body>
|
151
|
+
<Body>23</Body>
|
152
|
+
</Flex>
|
153
|
+
<Flex justify="between">
|
154
|
+
<Body><strong>Eagles</strong></Body>
|
155
|
+
<Body>55</Body>
|
156
|
+
</Flex>
|
346
157
|
</Layout.Game>
|
347
158
|
<Layout.Game>
|
348
|
-
<
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
avatar={teamData.chiefs.avatar}
|
357
|
-
name={teamData.chiefs.name}
|
358
|
-
points="32"
|
359
|
-
rank={teamData.chiefs.rank}
|
360
|
-
territory={teamData.chiefs.territory}
|
361
|
-
winner
|
362
|
-
/>
|
159
|
+
<Flex justify="between">
|
160
|
+
<Body>Bills</Body>
|
161
|
+
<Body>29</Body>
|
162
|
+
</Flex>
|
163
|
+
<Flex justify="between">
|
164
|
+
<Body><strong>Chiefs</strong></Body>
|
165
|
+
<Body>32</Body>
|
166
|
+
</Flex>
|
363
167
|
</Layout.Game>
|
364
168
|
</Layout.Round>
|
365
169
|
<Layout.RoundLabel>
|
@@ -368,22 +172,14 @@ const LayoutBracket = () => {
|
|
368
172
|
</Layout.RoundLabel>
|
369
173
|
<Layout.Round>
|
370
174
|
<Layout.Game>
|
371
|
-
<
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
avatar={teamData.eagles.avatar}
|
380
|
-
name={teamData.eagles.name}
|
381
|
-
points="40"
|
382
|
-
rank={teamData.eagles.rank}
|
383
|
-
self
|
384
|
-
territory={teamData.eagles.territory}
|
385
|
-
winner
|
386
|
-
/>
|
175
|
+
<Flex justify="between">
|
176
|
+
<Body>Chiefs</Body>
|
177
|
+
<Body>22</Body>
|
178
|
+
</Flex>
|
179
|
+
<Flex justify="between">
|
180
|
+
<Body><strong>Eagles</strong></Body>
|
181
|
+
<Body>40</Body>
|
182
|
+
</Flex>
|
387
183
|
</Layout.Game>
|
388
184
|
</Layout.Round>
|
389
185
|
</Layout>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
Use `<Layout.RoundLabel>`, `<Layout.Round>`,
|
1
|
+
Use `<Layout.RoundLabel>`, `<Layout.Round>`, and `<Layout.Game>` to make a bracket layout.
|
2
2
|
|
3
3
|
On mobile devices, `<Layout.RoundLabel>` will display (on desktop these components are hidden) and the bracket will be in one column.
|
4
4
|
|