playbook_ui 14.16.0.pre.alpha.PBNTR881advancedtablefullscreen6934 → 14.16.0.pre.alpha.PBNTR933reactdraggablebugdragbtwnexamples7021

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 (29) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +2 -2
  3. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +1 -1
  4. data/app/pb_kits/playbook/pb_draggable/context/index.tsx +58 -17
  5. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.jsx +6 -6
  6. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_and_custom_display.jsx +6 -6
  7. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx +6 -6
  8. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +8 -8
  9. data/app/pb_kits/playbook/pb_layout/_layout.scss +58 -0
  10. data/app/pb_kits/playbook/pb_layout/_layout.tsx +20 -7
  11. data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.jsx +190 -0
  12. data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.md +5 -0
  13. data/app/pb_kits/playbook/pb_layout/docs/example.yml +1 -0
  14. data/app/pb_kits/playbook/pb_layout/docs/index.js +1 -0
  15. data/app/pb_kits/playbook/pb_layout/layout.test.js +4 -0
  16. data/app/pb_kits/playbook/pb_layout/subcomponents/_game.tsx +90 -0
  17. data/app/pb_kits/playbook/pb_layout/subcomponents/_round.tsx +57 -0
  18. data/app/pb_kits/playbook/pb_table/styles/_striped.scss +3 -3
  19. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +4 -4
  20. data/dist/chunks/{_typeahead-Djo6qCne.js → _typeahead-7W5Ha5Td.js} +1 -1
  21. data/dist/chunks/_weekday_stacked-DSKatW3m.js +45 -0
  22. data/dist/chunks/vendor.js +1 -1
  23. data/dist/playbook-doc.js +1 -1
  24. data/dist/playbook-rails-react-bindings.js +1 -1
  25. data/dist/playbook-rails.js +1 -1
  26. data/dist/playbook.css +1 -1
  27. data/lib/playbook/version.rb +1 -1
  28. metadata +8 -4
  29. data/dist/chunks/_weekday_stacked-CON3AkXi.js +0 -45
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7e6ae8dabe0a1aa24faea68ee263457d677481e8fb49058ef3bf98cb34d13509
4
- data.tar.gz: aea28cf93c519443b913371efb9f7e36399b55ead106a9914698077d78df686f
3
+ metadata.gz: e5eb0fb326689e8ed94b955322e2d345cc13613790637ef99a17952910b092d7
4
+ data.tar.gz: b770083b760e7ca8b1c586de7adb4c8bf39fc03a4fe7bf238886c939d16ec62a
5
5
  SHA512:
6
- metadata.gz: da72830c3590d1df9419ecb3d6310ef1513b16186c5bb12fcd42fdb6bca29b293c10f422ca18e618587f384bd618fe3b1487e7b90f8b7d8eaf1960f880a380ab
7
- data.tar.gz: d75d70f4ae579220897598329343fa90978182a202efa1c29e46ccf51cdafc9b70a7b08624a89c5cda1b5a729519b5a58b9e2ca340136b87188079d0dea54f22
6
+ metadata.gz: 1a962daa6290d7d08eefbfdcd65767a6805db49e08c9fc5279cdeb69ffd08b07344b63ae69ceb2dc1c06ce3a4c80b7d15cff83bc42d0b61aef4c1e289246c4f6
7
+ data.tar.gz: 9a51af12f90f6b5b5e4ca8bf13ffb3ff268ff0f89fdd635fbf74f29f1b8fe2b79f5ae177763f5ff7575a20850dabb65e43fae9f366637c9a71e402a2502f2946
@@ -237,7 +237,7 @@
237
237
  }
238
238
 
239
239
  &.advanced-table-fullscreen {
240
- background-color: $border_light;
240
+ background-color: $bg_light;
241
241
  box-sizing: border-box;
242
242
  height: 100vh;
243
243
  left: 0;
@@ -526,7 +526,7 @@
526
526
 
527
527
  // Fullscreen
528
528
  &.advanced-table-fullscreen {
529
- background: $border_dark;
529
+ background: $bg_dark;
530
530
  }
531
531
 
532
532
  .advanced-table-fullscreen-header {
@@ -186,7 +186,7 @@ const AdvancedTable = (props: AdvancedTableProps) => {
186
186
  <Icon
187
187
  cursor="pointer"
188
188
  fixedWidth
189
- icon="grid-2"
189
+ icon="arrow-down-left-and-arrow-up-right-to-center"
190
190
  {...props}
191
191
  />
192
192
  </button>
@@ -1,11 +1,11 @@
1
- import React, { createContext, useReducer, useContext, useEffect, useMemo } from "react";
1
+ import React, { createContext, useReducer, useContext, useEffect, useMemo, useRef, useState } from "react";
2
2
  import { InitialStateType, ActionType, DraggableProviderType } from "./types";
3
3
 
4
4
  const initialState: InitialStateType = {
5
5
  items: [],
6
6
  dragData: { id: "", initialGroup: "" },
7
7
  isDragging: "",
8
- activeContainer: ""
8
+ activeContainer: "",
9
9
  };
10
10
 
11
11
  const reducer = (state: InitialStateType, action: ActionType) => {
@@ -31,9 +31,23 @@ const reducer = (state: InitialStateType, action: ActionType) => {
31
31
  const { dragId, targetId } = action.payload;
32
32
  const newItems = [...state.items];
33
33
  const draggedItem = newItems.find(item => item.id === dragId);
34
- const draggedIndex = newItems.indexOf(draggedItem);
34
+ const targetItem = newItems.find(item => item.id === targetId);
35
+
36
+ if (!draggedItem || !targetItem || draggedItem.container !== targetItem.container) {
37
+ return state;
38
+ }
39
+
40
+ if (dragId === targetId) {
41
+ return state;
42
+ }
43
+
44
+ const draggedIndex = newItems.findIndex(item => item.id === dragId);
35
45
  const targetIndex = newItems.findIndex(item => item.id === targetId);
36
46
 
47
+ if (draggedIndex === -1 || targetIndex === -1) {
48
+ return state;
49
+ }
50
+
37
51
  newItems.splice(draggedIndex, 1);
38
52
  newItems.splice(targetIndex, 0, draggedItem);
39
53
 
@@ -48,7 +62,11 @@ const reducer = (state: InitialStateType, action: ActionType) => {
48
62
  const DragContext = createContext<any>({});
49
63
 
50
64
  export const DraggableContext = () => {
51
- return useContext(DragContext);
65
+ const context = useContext(DragContext);
66
+ if (context === undefined) {
67
+ throw new Error('DraggableContext must be used within a DraggableProvider');
68
+ }
69
+ return context;
52
70
  };
53
71
 
54
72
  export const DraggableProvider = ({
@@ -63,7 +81,11 @@ export const DraggableProvider = ({
63
81
  dropZone = { type: 'ghost', color: 'neutral', direction: 'vertical' }
64
82
  }: DraggableProviderType) => {
65
83
  const [state, dispatch] = useReducer(reducer, initialState);
66
-
84
+
85
+ // Store initial items in a ref to use if needed (for consistency when needed in future updates)
86
+ const initialItemsRef = useRef(initialItems);
87
+ const [isDragging, setIsDragging] = useState(false);
88
+
67
89
  // Parse dropZone prop - handle both string format (backward compatibility) and object format
68
90
  let dropZoneType = 'ghost';
69
91
  let dropZoneColor = 'neutral';
@@ -86,45 +108,64 @@ export const DraggableProvider = ({
86
108
 
87
109
  useEffect(() => {
88
110
  dispatch({ type: 'SET_ITEMS', payload: initialItems });
111
+ initialItemsRef.current = initialItems;
89
112
  }, [initialItems]);
90
113
 
91
114
  useEffect(() => {
92
- onReorder(state.items);
93
- }, [state.items]);
115
+ if (onReorder) {
116
+ onReorder(state.items);
117
+ }
118
+ }, [state.items, onReorder]);
94
119
 
95
120
  const handleDragStart = (id: string, container: string) => {
96
- dispatch({ type: 'SET_DRAG_DATA', payload: { id: id, initialGroup: container } });
121
+ setIsDragging(true);
122
+ dispatch({ type: 'SET_DRAG_DATA', payload: { id, initialGroup: container } });
97
123
  dispatch({ type: 'SET_IS_DRAGGING', payload: id });
124
+ dispatch({ type: 'SET_ACTIVE_CONTAINER', payload: container });
98
125
  if (onDragStart) onDragStart(id, container);
99
126
  };
100
127
 
101
128
  const handleDragEnter = (id: string, container: string) => {
102
- if (state.dragData.id !== id) {
103
- dispatch({ type: 'REORDER_ITEMS', payload: { dragId: state.dragData.id, targetId: id } });
104
- dispatch({ type: 'SET_DRAG_DATA', payload: { id: state.dragData.id, initialGroup: container } });
129
+ if (!isDragging || container !== state.activeContainer) return;
130
+
131
+ if (state.dragData.id === id) return;
132
+
133
+ const draggedItem = state.items.find(item => item.id === state.dragData.id);
134
+ const targetItem = state.items.find(item => item.id === id);
135
+
136
+ if (!draggedItem || !targetItem || draggedItem.container !== targetItem.container) {
137
+ return;
105
138
  }
139
+
140
+ dispatch({ type: 'REORDER_ITEMS', payload: { dragId: state.dragData.id, targetId: id } });
141
+
106
142
  if (onDragEnter) onDragEnter(id, container);
107
143
  };
108
144
 
109
145
  const handleDragEnd = () => {
146
+ setIsDragging(false);
110
147
  dispatch({ type: 'SET_IS_DRAGGING', payload: "" });
111
148
  dispatch({ type: 'SET_ACTIVE_CONTAINER', payload: "" });
112
149
  if (onDragEnd) onDragEnd();
113
150
  };
114
151
 
115
- const changeCategory = (itemId: string, container: string) => {
116
- dispatch({ type: 'CHANGE_CATEGORY', payload: { itemId, container } });
117
- };
118
-
119
152
  const handleDrop = (container: string) => {
153
+ const draggedItem = state.items.find(item => item.id === state.dragData.id);
154
+
155
+ if (draggedItem && draggedItem.container !== container) {
156
+ dispatch({ type: 'CHANGE_CATEGORY', payload: { itemId: state.dragData.id, container } });
157
+ }
158
+
120
159
  dispatch({ type: 'SET_IS_DRAGGING', payload: "" });
121
160
  dispatch({ type: 'SET_ACTIVE_CONTAINER', payload: "" });
122
- changeCategory(state.dragData.id, container);
161
+
162
+ setIsDragging(false);
123
163
  if (onDrop) onDrop(container);
124
164
  };
125
165
 
126
166
  const handleDragOver = (e: Event, container: string) => {
127
167
  e.preventDefault();
168
+ e.stopPropagation();
128
169
  dispatch({ type: 'SET_ACTIVE_CONTAINER', payload: container });
129
170
  if (onDragOver) onDragOver(e, container);
130
171
  };
@@ -144,7 +185,7 @@ export const DraggableProvider = ({
144
185
  handleDragEnd,
145
186
  handleDrop,
146
187
  handleDragOver
147
- }), [state, dropZoneType, dropZoneColor, dropZoneDirection]);
188
+ }), [state, dropZoneType, dropZoneColor, dropZoneDirection, handleDragStart, handleDragEnter, handleDragEnd, handleDrop, handleDragOver]);
148
189
 
149
190
  return (
150
191
  <DragContext.Provider value={contextValue}>{children}</DragContext.Provider>
@@ -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
 
@@ -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
@@ -0,0 +1,190 @@
1
+ import React from 'react'
2
+
3
+ import Layout from '../../pb_layout/_layout'
4
+ import Flex from '../../pb_flex/_flex'
5
+ import Body from '../../pb_body/_body'
6
+ import Caption from '../../pb_caption/_caption'
7
+ import SectionSeparator from '../../pb_section_separator/_section_separator'
8
+
9
+ const LayoutBracket = () => {
10
+ return (
11
+ <div>
12
+ <Layout
13
+ layout="bracket"
14
+ >
15
+ <Layout.RoundLabel>
16
+ <Caption>Wild Card</Caption>
17
+ <SectionSeparator marginY="sm"/>
18
+ </Layout.RoundLabel>
19
+ <Layout.Round marginBottom={{ xs: "md", sm: "md" }}>
20
+ <Layout.Game>
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>
29
+ </Layout.Game>
30
+ <Layout.Game>
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>
39
+ </Layout.Game>
40
+ <Layout.Game>
41
+ <Flex justify="between">
42
+ <Body><strong>Lions</strong></Body>
43
+ </Flex>
44
+ <Flex justify="between">
45
+ <Body>BYE</Body>
46
+ </Flex>
47
+ </Layout.Game>
48
+ <Layout.Game>
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>
57
+ </Layout.Game>
58
+ <Layout.Game>
59
+ <Flex justify="between">
60
+ <Body><strong>Chiefs</strong></Body>
61
+ </Flex>
62
+ <Flex justify="between">
63
+ <Body>BYE</Body>
64
+ </Flex>
65
+ </Layout.Game>
66
+ <Layout.Game>
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>
75
+ </Layout.Game>
76
+ <Layout.Game>
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>
85
+ </Layout.Game>
86
+ <Layout.Game>
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>
95
+ </Layout.Game>
96
+ </Layout.Round>
97
+ <Layout.RoundLabel>
98
+ <Caption>Divisional</Caption>
99
+ <SectionSeparator marginY="sm"/>
100
+ </Layout.RoundLabel>
101
+ <Layout.Round marginBottom={{ xs: "md", sm: "md" }}>
102
+ <Layout.Game>
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>
111
+ </Layout.Game>
112
+ <Layout.Game>
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>
121
+ </Layout.Game>
122
+ <Layout.Game>
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>
131
+ </Layout.Game>
132
+ <Layout.Game>
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>
141
+ </Layout.Game>
142
+ </Layout.Round>
143
+ <Layout.RoundLabel>
144
+ <Caption>Conference</Caption>
145
+ <SectionSeparator marginY="sm"/>
146
+ </Layout.RoundLabel>
147
+ <Layout.Round marginBottom={{ xs: "md", sm: "md" }}>
148
+ <Layout.Game>
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>
157
+ </Layout.Game>
158
+ <Layout.Game>
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>
167
+ </Layout.Game>
168
+ </Layout.Round>
169
+ <Layout.RoundLabel>
170
+ <Caption>Super Bowl</Caption>
171
+ <SectionSeparator marginY="sm"/>
172
+ </Layout.RoundLabel>
173
+ <Layout.Round>
174
+ <Layout.Game>
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>
183
+ </Layout.Game>
184
+ </Layout.Round>
185
+ </Layout>
186
+ </div>
187
+ )
188
+ }
189
+
190
+ export default LayoutBracket
@@ -0,0 +1,5 @@
1
+ Use `<Layout.RoundLabel>`, `<Layout.Round>`, and `<Layout.Game>` to make a bracket layout.
2
+
3
+ On mobile devices, `<Layout.RoundLabel>` will display (on desktop these components are hidden) and the bracket will be in one column.
4
+
5
+ Ensure that each `<Layout.Game>` maintains a consistent height for the bracket lines to lay out properly.