playbook_ui 14.16.0.pre.alpha.PBNTR933reactdraggablebugdragbtwnexamples7021 → 14.16.0.pre.alpha.PLAY1929bracketlayout6927

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 (30) 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 +0 -70
  4. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +2 -83
  5. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +2 -15
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -2
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -2
  8. data/app/pb_kits/playbook/pb_draggable/context/index.tsx +17 -58
  9. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.jsx +6 -6
  10. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_and_custom_display.jsx +6 -6
  11. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx +6 -6
  12. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +8 -8
  13. data/app/pb_kits/playbook/pb_layout/_layout.scss +2 -3
  14. data/app/pb_kits/playbook/pb_layout/_layout.tsx +1 -5
  15. data/app/pb_kits/playbook/pb_layout/subcomponents/_game.tsx +2 -3
  16. data/app/pb_kits/playbook/pb_layout/subcomponents/_round.tsx +1 -1
  17. data/app/pb_kits/playbook/pb_table/styles/_striped.scss +3 -3
  18. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +4 -4
  19. data/dist/chunks/{_typeahead-7W5Ha5Td.js → _typeahead-Djo6qCne.js} +1 -1
  20. data/dist/chunks/_weekday_stacked-BGGESD-t.js +45 -0
  21. data/dist/chunks/vendor.js +1 -1
  22. data/dist/playbook-doc.js +1 -1
  23. data/dist/playbook-rails-react-bindings.js +1 -1
  24. data/dist/playbook-rails.js +1 -1
  25. data/dist/playbook.css +1 -1
  26. data/lib/playbook/version.rb +1 -1
  27. metadata +4 -6
  28. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.jsx +0 -90
  29. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.md +0 -3
  30. data/dist/chunks/_weekday_stacked-DSKatW3m.js +0 -45
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e5eb0fb326689e8ed94b955322e2d345cc13613790637ef99a17952910b092d7
4
- data.tar.gz: b770083b760e7ca8b1c586de7adb4c8bf39fc03a4fe7bf238886c939d16ec62a
3
+ metadata.gz: 16f8bb0105f1cb3ed42b3ced5e3404771f205fd4f7ad0ffe6a369a611adcedb6
4
+ data.tar.gz: 257b900f5c2e0c6b13e1aea22038f85fccb2a122393bac58a44db05a6ccd3a4f
5
5
  SHA512:
6
- metadata.gz: 1a962daa6290d7d08eefbfdcd65767a6805db49e08c9fc5279cdeb69ffd08b07344b63ae69ceb2dc1c06ce3a4c80b7d15cff83bc42d0b61aef4c1e289246c4f6
7
- data.tar.gz: 9a51af12f90f6b5b5e4ca8bf13ffb3ff268ff0f89fdd635fbf74f29f1b8fe2b79f5ae177763f5ff7575a20850dabb65e43fae9f366637c9a71e402a2502f2946
6
+ metadata.gz: cabc6aa7b699425aad6e5f1a6b21a7c95179b1508febb11bd8c273c69773b22ec7475c2e1a09008016685e6f3448f4afbdb6ac0c7260d50ffb8fb81cba215161
7
+ data.tar.gz: ce3a688284ae165abdcecdc21437385de43e9bb6518667c87e63ab8ce3a96a3c69b92c220025a6a5b1eb99b55175c1f5d9233ffa272c24158d63e2d3f52b3fc4
@@ -3,4 +3,4 @@ import { ExpandedState } from "@tanstack/react-table"
3
3
  export type ExpandedStateObject = Extract<
4
4
  ExpandedState,
5
5
  Record<string, boolean>
6
- >
6
+ >
@@ -7,7 +7,6 @@
7
7
  @import "./scss_partials/chrome_styles";
8
8
  @import "../tokens/screen_sizes";
9
9
  @import "../tokens/shadows";
10
- @import "../tokens/positioning";
11
10
 
12
11
  .pb_advanced_table {
13
12
  $border-color: 1px solid $border_light;
@@ -230,53 +229,6 @@
230
229
  max-height: 1920px;
231
230
  overflow-y: auto;
232
231
  }
233
-
234
- // Fullscreen
235
- &.advanced-table-allow-fullscreen {
236
- transition: all 0.3s ease;
237
- }
238
-
239
- &.advanced-table-fullscreen {
240
- background-color: $bg_light;
241
- box-sizing: border-box;
242
- height: 100vh;
243
- left: 0;
244
- overflow: auto;
245
- position: fixed;
246
- top: 0;
247
- width: 100%;
248
- z-index: $z_10;
249
-
250
- .pb_table {
251
- th, td, div, button {
252
- font-size: calc(100%);
253
- }
254
- box-sizing: border-box;
255
- margin: $space_lg;
256
- max-width: calc(100% - 64px);
257
- width: calc(100% - 64px);
258
- }
259
-
260
- .pb_table.sticky-header {
261
- thead,
262
- .pb_advanced_table_header {
263
- position: sticky !important;
264
- top: 44px !important;
265
- z-index: $z_10;
266
- }
267
- }
268
- }
269
-
270
- .advanced-table-fullscreen-header {
271
- background-color: $white;
272
- height: 44px;
273
- padding: 13px 20px;
274
- position: sticky;
275
- top: 0;
276
- width: 100%;
277
- z-index: $z_10;
278
- }
279
-
280
232
  // Icons
281
233
  .button-icon {
282
234
  display: flex;
@@ -325,16 +277,6 @@
325
277
  }
326
278
  }
327
279
 
328
- .fullscreen-icon {
329
- @extend .button-icon;
330
- @extend %primary-color-pseudo;
331
- padding: 2px 0;
332
-
333
- &:focus-visible {
334
- border-radius: $border_rad_lighter;
335
- }
336
- }
337
-
338
280
  // Vertical separator
339
281
  .table-header-cells:first-child,
340
282
  .table-header-cells-custom:first-child,
@@ -524,18 +466,6 @@
524
466
  box-shadow: 1px 0px 0px 0px $border_dark !important;
525
467
  }
526
468
 
527
- // Fullscreen
528
- &.advanced-table-fullscreen {
529
- background: $bg_dark;
530
- }
531
-
532
- .advanced-table-fullscreen-header {
533
- background-color: $bg_dark_card;
534
- position: sticky;
535
- top: 0;
536
- z-index: $z_10;
537
- }
538
-
539
469
  // Dark Mode Responsive Styles
540
470
  @media only screen and (max-width: $screen-xl-min) {
541
471
  &[class*="advanced-table-responsive-scroll"] {
@@ -1,4 +1,4 @@
1
- import React, { useRef, useEffect, useState, useCallback } from "react";
1
+ import React, { useRef, useEffect } from "react";
2
2
  import classnames from "classnames";
3
3
 
4
4
  import { GenericObject } from "../types";
@@ -19,15 +19,6 @@ import TableActionBar from "./Components/TableActionBar";
19
19
  import { useTableState } from "./Hooks/useTableState";
20
20
  import { useTableActions } from "./Hooks/useTableActions";
21
21
 
22
- import Card from "../pb_card/_card"
23
- import Flex from "../pb_flex/_flex"
24
- import Icon from "../pb_icon/_icon"
25
-
26
- type FullscreenControls = {
27
- toggleFullscreen: () => void;
28
- isFullscreen: boolean;
29
- };
30
-
31
22
  type AdvancedTableProps = {
32
23
  aria?: { [key: string]: string }
33
24
  actions?: React.ReactNode[] | React.ReactNode
@@ -58,8 +49,6 @@ type AdvancedTableProps = {
58
49
  toggleExpansionIcon?: string | string[]
59
50
  onRowSelectionChange?: (arg: RowSelectionState) => void
60
51
  virtualizedRows?: boolean
61
- allowFullScreen?: boolean
62
- fullScreenControl?: (controls: FullscreenControls) => void
63
52
  } & GlobalProps;
64
53
 
65
54
  const AdvancedTable = (props: AdvancedTableProps) => {
@@ -93,8 +82,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
93
82
  toggleExpansionIcon = "arrows-from-line",
94
83
  onRowSelectionChange,
95
84
  virtualizedRows = false,
96
- allowFullScreen = false,
97
- fullScreenControl,
98
85
  } = props;
99
86
 
100
87
  // Component refs
@@ -159,68 +146,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
159
146
  );
160
147
  }, [fetchMoreOnBottomReached, fetchNextPage, isFetching, totalFetched, fullData.length]);
161
148
 
162
- // Fullscreen
163
- const [isFullscreen, setIsFullscreen] = useState(false)
164
-
165
- const toggleFullscreen = useCallback(() => {
166
- setIsFullscreen(prevState => !prevState)
167
- }, [])
168
-
169
- useEffect(() => {
170
- if (allowFullScreen && fullScreenControl) {
171
- fullScreenControl({
172
- toggleFullscreen,
173
- isFullscreen
174
- })
175
- }
176
- }, [allowFullScreen, fullScreenControl, toggleFullscreen, isFullscreen])
177
-
178
- const renderFullscreenHeader = () => {
179
- if (!isFullscreen) return null
180
-
181
- const defaultMinimizeIcon = (
182
- <button
183
- className="gray-icon fullscreen-icon"
184
- onClick={toggleFullscreen}
185
- >
186
- <Icon
187
- cursor="pointer"
188
- fixedWidth
189
- icon="arrow-down-left-and-arrow-up-right-to-center"
190
- {...props}
191
- />
192
- </button>
193
- )
194
-
195
- return (
196
- <Card
197
- borderNone
198
- borderRadius="none"
199
- className="advanced-table-fullscreen-header"
200
- {...props}
201
- >
202
- <Flex justify="end">
203
- {defaultMinimizeIcon}
204
- </Flex>
205
- </Card>
206
- )
207
- }
208
-
209
- useEffect(() => {
210
- if (!allowFullScreen) return
211
-
212
- const handleKeyDown = (event: KeyboardEvent) => {
213
- if (event.key === 'Escape' && isFullscreen) {
214
- event.preventDefault()
215
- toggleFullscreen()
216
- }
217
- }
218
- document.addEventListener('keydown', handleKeyDown)
219
- return () => {
220
- document.removeEventListener('keydown', handleKeyDown)
221
- }
222
- }, [allowFullScreen, toggleFullscreen, isFullscreen])
223
-
224
149
  // Build CSS classes and props
225
150
  const ariaProps = buildAriaProps(aria);
226
151
  const dataProps = buildDataProps(data);
@@ -229,10 +154,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
229
154
  buildCss("pb_advanced_table"),
230
155
  `advanced-table-responsive-${responsive}`,
231
156
  maxHeight ? `advanced-table-max-height-${maxHeight}` : '',
232
- {
233
- 'advanced-table-fullscreen': isFullscreen,
234
- 'advanced-table-allow-fullscreen': allowFullScreen
235
- },
236
157
  globalProps(props),
237
158
  className
238
159
  );
@@ -273,7 +194,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
273
194
  ref={tableWrapperRef}
274
195
  style={tableWrapperStyle as React.CSSProperties}
275
196
  >
276
- {renderFullscreenHeader()}
277
197
  <AdvancedTableProvider
278
198
  columnDefinitions={columnDefinitions}
279
199
  enableToggleExpansion={enableToggleExpansion}
@@ -284,7 +204,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
284
204
  hasAnySubRows={hasAnySubRows}
285
205
  inlineRowLoading={inlineRowLoading}
286
206
  isActionBarVisible={isActionBarVisible}
287
- isFullscreen={isFullscreen}
288
207
  loading={loading}
289
208
  responsive={responsive}
290
209
  selectableRows={selectableRows}
@@ -327,7 +246,7 @@ const AdvancedTable = (props: AdvancedTableProps) => {
327
246
  </AdvancedTableProvider>
328
247
 
329
248
  </div>
330
- {/* Bottom Pagination */}
249
+ {/* Bottom Pagination */}
331
250
  {pagination && (
332
251
  <TablePagination
333
252
  onChange={onPageChange}
@@ -149,7 +149,7 @@ return (
149
149
  data={{testid: testId}}
150
150
  sortControl={sortControl}
151
151
  tableData={MOCK_DATA}
152
- >
152
+ >
153
153
  <AdvancedTable.Header enableSorting />
154
154
  <AdvancedTable.Body />
155
155
  </AdvancedTable>
@@ -498,17 +498,4 @@ test("customRenderer prop functions as expected", () => {
498
498
  const kit = screen.getByTestId(testId)
499
499
  const pill = kit.querySelector(".pb_pill_kit_success_lowercase")
500
500
  expect(pill).toBeInTheDocument()
501
- })
502
-
503
- test("allowFullScreen prop adds fullscreen class", () => {
504
- render(
505
- <AdvancedTable
506
- allowFullScreen
507
- columnDefinitions={columnDefinitions}
508
- tableData={MOCK_DATA}
509
- />
510
- )
511
-
512
- const tableContainer = screen.getByRole("table").closest("div")
513
- expect(tableContainer).toHaveClass("advanced-table-allow-fullscreen")
514
- })
501
+ })
@@ -39,5 +39,4 @@ examples:
39
39
  - advanced_table_selectable_rows_no_subrows: Selectable Rows (No Subrows)
40
40
  - advanced_table_selectable_rows_actions: Selectable Rows (With Actions)
41
41
  - advanced_table_selectable_rows_header: Selectable Rows (No Actions Bar)
42
- - advanced_table_inline_editing: Inline Cell Editing
43
- - advanced_table_fullscreen: Fullscreen
42
+ - advanced_table_inline_editing: Inline Cell Editing
@@ -21,5 +21,4 @@ export { default as AdvancedTableSelectableRowsHeader } from './_advanced_table_
21
21
  export { default as AdvancedTableSelectableRowsActions } from './_advanced_table_selectable_rows_actions.jsx'
22
22
  export { default as AdvancedTableTablePropsStickyHeader } from './_advanced_table_table_props_sticky_header.jsx'
23
23
  export { default as AdvancedTableColumnHeadersCustomCell } from './_advanced_table_column_headers_custom_cell.jsx'
24
- export { default as AdvancedTableInlineEditing } from './_advanced_table_inline_editing.jsx'
25
- export { default as AdvancedTableFullscreen } from './_advanced_table_fullscreen.jsx'
24
+ export { default as AdvancedTableInlineEditing } from './_advanced_table_inline_editing.jsx'
@@ -1,11 +1,11 @@
1
- import React, { createContext, useReducer, useContext, useEffect, useMemo, useRef, useState } from "react";
1
+ import React, { createContext, useReducer, useContext, useEffect, useMemo } 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,23 +31,9 @@ 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 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);
34
+ const draggedIndex = newItems.indexOf(draggedItem);
45
35
  const targetIndex = newItems.findIndex(item => item.id === targetId);
46
36
 
47
- if (draggedIndex === -1 || targetIndex === -1) {
48
- return state;
49
- }
50
-
51
37
  newItems.splice(draggedIndex, 1);
52
38
  newItems.splice(targetIndex, 0, draggedItem);
53
39
 
@@ -62,11 +48,7 @@ const reducer = (state: InitialStateType, action: ActionType) => {
62
48
  const DragContext = createContext<any>({});
63
49
 
64
50
  export const DraggableContext = () => {
65
- const context = useContext(DragContext);
66
- if (context === undefined) {
67
- throw new Error('DraggableContext must be used within a DraggableProvider');
68
- }
69
- return context;
51
+ return useContext(DragContext);
70
52
  };
71
53
 
72
54
  export const DraggableProvider = ({
@@ -81,11 +63,7 @@ export const DraggableProvider = ({
81
63
  dropZone = { type: 'ghost', color: 'neutral', direction: 'vertical' }
82
64
  }: DraggableProviderType) => {
83
65
  const [state, dispatch] = useReducer(reducer, initialState);
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
-
66
+
89
67
  // Parse dropZone prop - handle both string format (backward compatibility) and object format
90
68
  let dropZoneType = 'ghost';
91
69
  let dropZoneColor = 'neutral';
@@ -108,64 +86,45 @@ export const DraggableProvider = ({
108
86
 
109
87
  useEffect(() => {
110
88
  dispatch({ type: 'SET_ITEMS', payload: initialItems });
111
- initialItemsRef.current = initialItems;
112
89
  }, [initialItems]);
113
90
 
114
91
  useEffect(() => {
115
- if (onReorder) {
116
- onReorder(state.items);
117
- }
118
- }, [state.items, onReorder]);
92
+ onReorder(state.items);
93
+ }, [state.items]);
119
94
 
120
95
  const handleDragStart = (id: string, container: string) => {
121
- setIsDragging(true);
122
- dispatch({ type: 'SET_DRAG_DATA', payload: { id, initialGroup: container } });
96
+ dispatch({ type: 'SET_DRAG_DATA', payload: { id: id, initialGroup: container } });
123
97
  dispatch({ type: 'SET_IS_DRAGGING', payload: id });
124
- dispatch({ type: 'SET_ACTIVE_CONTAINER', payload: container });
125
98
  if (onDragStart) onDragStart(id, container);
126
99
  };
127
100
 
128
101
  const handleDragEnter = (id: string, container: string) => {
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;
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 } });
138
105
  }
139
-
140
- dispatch({ type: 'REORDER_ITEMS', payload: { dragId: state.dragData.id, targetId: id } });
141
-
142
106
  if (onDragEnter) onDragEnter(id, container);
143
107
  };
144
108
 
145
109
  const handleDragEnd = () => {
146
- setIsDragging(false);
147
110
  dispatch({ type: 'SET_IS_DRAGGING', payload: "" });
148
111
  dispatch({ type: 'SET_ACTIVE_CONTAINER', payload: "" });
149
112
  if (onDragEnd) onDragEnd();
150
113
  };
151
114
 
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
- }
115
+ const changeCategory = (itemId: string, container: string) => {
116
+ dispatch({ type: 'CHANGE_CATEGORY', payload: { itemId, container } });
117
+ };
158
118
 
119
+ const handleDrop = (container: string) => {
159
120
  dispatch({ type: 'SET_IS_DRAGGING', payload: "" });
160
121
  dispatch({ type: 'SET_ACTIVE_CONTAINER', payload: "" });
161
-
162
- setIsDragging(false);
122
+ changeCategory(state.dragData.id, container);
163
123
  if (onDrop) onDrop(container);
164
124
  };
165
125
 
166
126
  const handleDragOver = (e: Event, container: string) => {
167
127
  e.preventDefault();
168
- e.stopPropagation();
169
128
  dispatch({ type: 'SET_ACTIVE_CONTAINER', payload: container });
170
129
  if (onDragOver) onDragOver(e, container);
171
130
  };
@@ -185,7 +144,7 @@ export const DraggableProvider = ({
185
144
  handleDragEnd,
186
145
  handleDrop,
187
146
  handleDragOver
188
- }), [state, dropZoneType, dropZoneColor, dropZoneDirection, handleDragStart, handleDragEnter, handleDragEnd, handleDrop, handleDragOver]);
147
+ }), [state, dropZoneType, dropZoneColor, dropZoneDirection]);
189
148
 
190
149
  return (
191
150
  <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: "Lead UX Engineer",
15
+ title: "Senior 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: "Carlos Lima",
29
- value: "Carlos Lima",
28
+ label: "Jason Cypret",
29
+ value: "Jason Cypret",
30
30
  territory: "PHL",
31
- title: "Nitro Developer",
32
- id: "carlos-lima",
31
+ title: "VP of User Experience",
32
+ id: "jason-cypret",
33
33
  status: "Online"
34
34
  },
35
35
  {
36
36
  label: "Courtney Long",
37
37
  value: "Courtney Long",
38
38
  territory: "PHL",
39
- title: "Lead UX Designer",
39
+ title: "UX Design Mentor",
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: "Lead UX Engineer",
18
+ title: "Senior 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: "Carlos Lima",
32
- value: "Carlos Lima",
31
+ label: "Jason Cypret",
32
+ value: "Jason Cypret",
33
33
  territory: "PHL",
34
- title: "Nitro Developer",
35
- id: "carlos-lima",
34
+ title: "VP of User Experience",
35
+ id: "jason-cypret",
36
36
  status: "Online"
37
37
  },
38
38
  {
39
39
  label: "Courtney Long",
40
40
  value: "Courtney Long",
41
41
  territory: "PHL",
42
- title: "Lead UX Designer",
42
+ title: "UX Design Mentor",
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: "Lead UX Engineer",
18
+ title: "Senior 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: "Carlos Lima",
32
- value: "Carlos Lima",
31
+ label: "Jason Cypret",
32
+ value: "Jason Cypret",
33
33
  territory: "PHL",
34
- title: "Nitro Developer",
35
- id: "carlos-lima",
34
+ title: "VP of User Experience",
35
+ id: "jason-cypret",
36
36
  status: "Online"
37
37
  },
38
38
  {
39
39
  label: "Courtney Long",
40
40
  value: "Courtney Long",
41
41
  territory: "PHL",
42
- title: "Lead UX Designer",
42
+ title: "UX Design Mentor",
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: "Lead UX Engineer",
7
+ title: "Senior 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: "Carlos Lima",
21
- value: "Carlos Lima",
20
+ label: "Jason Cypret",
21
+ value: "Jason Cypret",
22
22
  territory: "PHL",
23
- title: "Nitro Developer",
24
- id: "carlos-lima",
23
+ title: "VP of User Experience",
24
+ id: "jason-cypret",
25
25
  status: "Online"
26
26
  },
27
27
  {
28
28
  label: "Courtney Long",
29
29
  value: "Courtney Long",
30
30
  territory: "PHL",
31
- title: "Lead UX Designer",
31
+ title: "UX Design Mentor",
32
32
  id: "courtney-long",
33
33
  status: "Online"
34
34
  }
35
- ];
35
+ ]
36
36
 
37
37
  %>
38
38
 
@@ -220,9 +220,8 @@ $bracket-border-width: 4px;
220
220
  display: block;
221
221
  }
222
222
  .layout_round .layout_game::after,
223
- .connector_container,
224
- .half_box {
225
- display: none !important;
223
+ .connector_container {
224
+ display: none;
226
225
  }
227
226
  }
228
227
  }
@@ -176,11 +176,7 @@ const Layout = (props: LayoutPropTypes) => {
176
176
  (child: React.ReactElement & {type: {displayName: string}}) => child.type?.displayName !== 'Side'
177
177
  )
178
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
179
+ const numberOfRounds = Array.isArray(nonSideChildren) ? nonSideChildren.filter((child: any) => child.type?.name === 'Round').length : 0
184
180
  const bracketChildren = nonSideChildren.map(child =>
185
181
  React.isValidElement(child) ? React.cloneElement(child, { numberOfRounds }) : child
186
182
  )
@@ -19,10 +19,9 @@ const Game = (props: LayoutGameProps) => {
19
19
  const { children, className, numberOfRounds, numberOfGames, isOdd } = props
20
20
  const dynamicInlineProps = globalInlineProps(props)
21
21
 
22
- const numberOfChildren = Array.isArray(children) ? children.length : 0
23
-
24
22
  const isMultiple = Array.isArray(children)
25
-
23
+ const numberOfChildren = isMultiple ? children.length : 0
24
+
26
25
  let ratio = 0
27
26
  let exponent
28
27
  if (numberOfGames > 1) {
@@ -33,7 +33,7 @@ export const Round = (props: LayoutRoundProps) => {
33
33
  const numberOfChildren = Array.isArray(children) ? children.length : 0
34
34
 
35
35
  const childrenWithProps = Array.isArray(children) ? children.map((child, index) =>
36
- React.isValidElement(child) ? React.cloneElement(child, { numberOfRounds, numberOfGames: numberOfChildren, isOdd: index % 2 === 0, key: `child_${index}` }) : child
36
+ React.isValidElement(child) ? React.cloneElement(child, { numberOfRounds, numberOfGames: numberOfChildren, isOdd: index % 2 === 0 }) : child
37
37
  ) : children
38
38
 
39
39
  const rightConnectors = Array.from({ length: numberOfChildren / 2 }, (_, index) => (
@@ -1,7 +1,7 @@
1
- [class^=pb_table]:not(:has(colgroup)) {
1
+ [class^=pb_table] {
2
2
  &.striped {
3
3
  tbody, .pb_table_tbody {
4
- tr:nth-child(odd):not(.pb_background_kit), .pb_table_tr:nth-child(odd):not(.pb_background_kit) {
4
+ tr:nth-child(odd), .pb_table_tr:nth-child(odd) {
5
5
  background-color: $bg_light;
6
6
  }
7
7
  }
@@ -10,7 +10,7 @@
10
10
  &.dark {
11
11
  &.striped {
12
12
  tbody, .pb_table_tbody {
13
- tr:nth-child(odd):not(.pb_background_kit), .pb_table_tr:nth-child(odd):not(.pb_background_kit) {
13
+ tr:nth-child(odd), .pb_table_tr:nth-child(odd) {
14
14
  background-color: $bg_dark;
15
15
  }
16
16
  }