playbook_ui 14.16.0.pre.alpha.PBNTR924reacttablecustomheaders6846 → 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 (62) 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_button/_button.scss +5 -5
  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_draggable/context/index.tsx +58 -17
  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/styles/_striped.scss +3 -3
  42. data/app/pb_kits/playbook/pb_tooltip/index.js +183 -56
  43. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +4 -4
  44. data/app/pb_kits/playbook/pb_typeahead/index.ts +2 -2
  45. data/app/pb_kits/playbook/utilities/globalProps.ts +1 -1
  46. data/app/pb_kits/playbook/utilities/object.test.js +149 -1
  47. data/app/pb_kits/playbook/utilities/object.ts +124 -42
  48. data/dist/chunks/_typeahead-7W5Ha5Td.js +22 -0
  49. data/dist/chunks/_weekday_stacked-DSKatW3m.js +45 -0
  50. data/dist/chunks/lib-BGzBzFZX.js +29 -0
  51. data/dist/chunks/{pb_form_validation-DMajaRt3.js → pb_form_validation-BvNy9Bd6.js} +1 -1
  52. data/dist/chunks/vendor.js +1 -1
  53. data/dist/playbook-doc.js +1 -1
  54. data/dist/playbook-rails-react-bindings.js +1 -1
  55. data/dist/playbook-rails.js +1 -1
  56. data/dist/playbook.css +1 -1
  57. data/lib/playbook/version.rb +1 -1
  58. metadata +12 -7
  59. data/app/pb_kits/playbook/pb_tooltip/floating_ui.js +0 -282
  60. data/dist/chunks/_typeahead-HN7DWIZV.js +0 -22
  61. data/dist/chunks/_weekday_stacked-CEWwCgZj.js +0 -45
  62. data/dist/chunks/lib-Co5y3V4K.js +0 -29
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dd82bb6f3ee44ed655fa00a9063867e0bf1b2475e14053635cfa045d9eabc19c
4
- data.tar.gz: 17de2ee4fb645c07918923b762f2c4195ff451056c85e4dd41fd7655fd1004a7
3
+ metadata.gz: e5eb0fb326689e8ed94b955322e2d345cc13613790637ef99a17952910b092d7
4
+ data.tar.gz: b770083b760e7ca8b1c586de7adb4c8bf39fc03a4fe7bf238886c939d16ec62a
5
5
  SHA512:
6
- metadata.gz: e798db2746cc1381cdf2a6bf3d988f784a133ad65cddc0e6cc5085eb7586e28808b461d1d9aae1e5ad4b579474698380765c393a3ab6ff9b8537541ca8d299a5
7
- data.tar.gz: 5bee6ba2e97346c45b8b38df8839d6f2e0ad481eb8c4f2299cdb01eb3b8b79a6df40c919236a4f765b0de50d9a29a8a4c877ed9a1374348f3ab14cb92f45e302
6
+ metadata.gz: 1a962daa6290d7d08eefbfdcd65767a6805db49e08c9fc5279cdeb69ffd08b07344b63ae69ceb2dc1c06ce3a4c80b7d15cff83bc42d0b61aef4c1e289246c4f6
7
+ data.tar.gz: 9a51af12f90f6b5b5e4ca8bf13ffb3ff268ff0f89fdd635fbf74f29f1b8fe2b79f5ae177763f5ff7575a20850dabb65e43fae9f366637c9a71e402a2502f2946
@@ -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,6 +7,7 @@
7
7
  @import "./scss_partials/chrome_styles";
8
8
  @import "../tokens/screen_sizes";
9
9
  @import "../tokens/shadows";
10
+ @import "../tokens/positioning";
10
11
 
11
12
  .pb_advanced_table {
12
13
  $border-color: 1px solid $border_light;
@@ -229,6 +230,53 @@
229
230
  max-height: 1920px;
230
231
  overflow-y: auto;
231
232
  }
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
+
232
280
  // Icons
233
281
  .button-icon {
234
282
  display: flex;
@@ -277,6 +325,16 @@
277
325
  }
278
326
  }
279
327
 
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
+
280
338
  // Vertical separator
281
339
  .table-header-cells:first-child,
282
340
  .table-header-cells-custom:first-child,
@@ -466,6 +524,18 @@
466
524
  box-shadow: 1px 0px 0px 0px $border_dark !important;
467
525
  }
468
526
 
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
+
469
539
  // Dark Mode Responsive Styles
470
540
  @media only screen and (max-width: $screen-xl-min) {
471
541
  &[class*="advanced-table-responsive-scroll"] {
@@ -1,4 +1,4 @@
1
- import React, { useRef, useEffect } from "react";
1
+ import React, { useRef, useEffect, useState, useCallback } from "react";
2
2
  import classnames from "classnames";
3
3
 
4
4
  import { GenericObject } from "../types";
@@ -19,6 +19,15 @@ 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
+
22
31
  type AdvancedTableProps = {
23
32
  aria?: { [key: string]: string }
24
33
  actions?: React.ReactNode[] | React.ReactNode
@@ -49,6 +58,8 @@ type AdvancedTableProps = {
49
58
  toggleExpansionIcon?: string | string[]
50
59
  onRowSelectionChange?: (arg: RowSelectionState) => void
51
60
  virtualizedRows?: boolean
61
+ allowFullScreen?: boolean
62
+ fullScreenControl?: (controls: FullscreenControls) => void
52
63
  } & GlobalProps;
53
64
 
54
65
  const AdvancedTable = (props: AdvancedTableProps) => {
@@ -82,6 +93,8 @@ const AdvancedTable = (props: AdvancedTableProps) => {
82
93
  toggleExpansionIcon = "arrows-from-line",
83
94
  onRowSelectionChange,
84
95
  virtualizedRows = false,
96
+ allowFullScreen = false,
97
+ fullScreenControl,
85
98
  } = props;
86
99
 
87
100
  // Component refs
@@ -146,6 +159,68 @@ const AdvancedTable = (props: AdvancedTableProps) => {
146
159
  );
147
160
  }, [fetchMoreOnBottomReached, fetchNextPage, isFetching, totalFetched, fullData.length]);
148
161
 
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
+
149
224
  // Build CSS classes and props
150
225
  const ariaProps = buildAriaProps(aria);
151
226
  const dataProps = buildDataProps(data);
@@ -154,6 +229,10 @@ const AdvancedTable = (props: AdvancedTableProps) => {
154
229
  buildCss("pb_advanced_table"),
155
230
  `advanced-table-responsive-${responsive}`,
156
231
  maxHeight ? `advanced-table-max-height-${maxHeight}` : '',
232
+ {
233
+ 'advanced-table-fullscreen': isFullscreen,
234
+ 'advanced-table-allow-fullscreen': allowFullScreen
235
+ },
157
236
  globalProps(props),
158
237
  className
159
238
  );
@@ -167,93 +246,97 @@ const AdvancedTable = (props: AdvancedTableProps) => {
167
246
  const isActionBarVisible = selectableRows && showActionsBar && selectedRowsLength > 0;
168
247
 
169
248
  return (
170
- <div
171
- {...ariaProps}
172
- {...dataProps}
173
- {...htmlProps}
174
- className={classes}
175
- id={id}
176
- onScroll={virtualizedRows ? e => fetchMoreOnBottomReached(
177
- e.currentTarget,
178
- fetchNextPage,
179
- isFetching,
180
- totalFetched,
181
- fullData.length
182
- ) : undefined}
183
- ref={tableWrapperRef}
184
- style={tableWrapperStyle as React.CSSProperties}
185
- >
186
- <AdvancedTableProvider
187
- columnDefinitions={columnDefinitions}
188
- enableToggleExpansion={enableToggleExpansion}
189
- enableVirtualization={virtualizedRows}
190
- expanded={expanded}
191
- expandedControl={expandedControl}
192
- handleExpandOrCollapse={handleExpandOrCollapse}
193
- hasAnySubRows={hasAnySubRows}
194
- inlineRowLoading={inlineRowLoading}
195
- isActionBarVisible={isActionBarVisible}
196
- loading={loading}
197
- responsive={responsive}
198
- selectableRows={selectableRows}
199
- setExpanded={setExpanded}
200
- showActionsBar={showActionsBar}
201
- sortControl={sortControl}
202
- subRowHeaders={tableOptions?.subRowHeaders}
203
- table={table}
204
- tableContainerRef={tableWrapperRef}
205
- toggleExpansionIcon={toggleExpansionIcon}
206
- virtualizedRows={virtualizedRows}
249
+ <>
250
+ {/* Top Pagination */}
251
+ {pagination && (
252
+ <TablePagination
253
+ onChange={onPageChange}
254
+ position="top"
255
+ range={paginationProps?.range}
256
+ table={table}
257
+ />
258
+ )}
259
+
260
+ <div
261
+ {...ariaProps}
262
+ {...dataProps}
263
+ {...htmlProps}
264
+ className={classes}
265
+ id={id}
266
+ onScroll={virtualizedRows ? e => fetchMoreOnBottomReached(
267
+ e.currentTarget,
268
+ fetchNextPage,
269
+ isFetching,
270
+ totalFetched,
271
+ fullData.length
272
+ ) : undefined}
273
+ ref={tableWrapperRef}
274
+ style={tableWrapperStyle as React.CSSProperties}
207
275
  >
208
- <React.Fragment>
209
- {/* Top Pagination */}
210
- {pagination && (
211
- <TablePagination
212
- onChange={onPageChange}
213
- position="top"
214
- range={paginationProps?.range}
215
- table={table}
276
+ {renderFullscreenHeader()}
277
+ <AdvancedTableProvider
278
+ columnDefinitions={columnDefinitions}
279
+ enableToggleExpansion={enableToggleExpansion}
280
+ enableVirtualization={virtualizedRows}
281
+ expanded={expanded}
282
+ expandedControl={expandedControl}
283
+ handleExpandOrCollapse={handleExpandOrCollapse}
284
+ hasAnySubRows={hasAnySubRows}
285
+ inlineRowLoading={inlineRowLoading}
286
+ isActionBarVisible={isActionBarVisible}
287
+ isFullscreen={isFullscreen}
288
+ loading={loading}
289
+ responsive={responsive}
290
+ selectableRows={selectableRows}
291
+ setExpanded={setExpanded}
292
+ showActionsBar={showActionsBar}
293
+ sortControl={sortControl}
294
+ subRowHeaders={tableOptions?.subRowHeaders}
295
+ table={table}
296
+ tableContainerRef={tableWrapperRef}
297
+ toggleExpansionIcon={toggleExpansionIcon}
298
+ virtualizedRows={virtualizedRows}
299
+ >
300
+ <React.Fragment>
301
+ {/* Selection Action Bar */}
302
+ <TableActionBar
303
+ actions={actions}
304
+ isVisible={isActionBarVisible}
305
+ selectedCount={selectedRowsLength}
216
306
  />
217
- )}
218
-
219
- {/* Selection Action Bar */}
220
- <TableActionBar
221
- actions={actions}
222
- isVisible={isActionBarVisible}
223
- selectedCount={selectedRowsLength}
224
- />
225
307
 
226
- {/* Main Table */}
227
- <Table
228
- className={`${loading ? "content-loading" : ""}`}
229
- dark={dark}
230
- dataTable
231
- numberSpacing="tabular"
232
- responsive="none"
233
- {...tableProps}
234
- >
235
- {children ? (
236
- children
237
- ) : (
238
- <>
239
- <TableHeader />
240
- <TableBody />
241
- </>
242
- )}
243
- </Table>
244
-
245
- {/* Bottom Pagination */}
246
- {pagination && (
247
- <TablePagination
248
- onChange={onPageChange}
249
- position="bottom"
250
- range={paginationProps?.range}
251
- table={table}
252
- />
253
- )}
254
- </React.Fragment>
255
- </AdvancedTableProvider>
256
- </div>
308
+ {/* Main Table */}
309
+ <Table
310
+ className={`${loading ? "content-loading" : ""}`}
311
+ dark={dark}
312
+ dataTable
313
+ numberSpacing="tabular"
314
+ responsive="none"
315
+ {...tableProps}
316
+ >
317
+ {children ? (
318
+ children
319
+ ) : (
320
+ <>
321
+ <TableHeader />
322
+ <TableBody />
323
+ </>
324
+ )}
325
+ </Table>
326
+ </React.Fragment>
327
+ </AdvancedTableProvider>
328
+
329
+ </div>
330
+ {/* Bottom Pagination */}
331
+ {pagination && (
332
+ <TablePagination
333
+ onChange={onPageChange}
334
+ position="bottom"
335
+ range={paginationProps?.range}
336
+ table={table}
337
+ />
338
+ )}
339
+ </>
257
340
  );
258
341
  };
259
342
 
@@ -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,4 +498,17 @@ 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
- })
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
+ })
@@ -0,0 +1,90 @@
1
+ import React, { useState } from "react"
2
+ import { AdvancedTable, Button, Flex } from "playbook-ui"
3
+ import MOCK_DATA from "./advanced_table_mock_data.json"
4
+ import PAGINATION_MOCK_DATA from "./advanced_table_pagination_mock_data.json"
5
+
6
+ const AdvancedTableFullscreen = (props) => {
7
+ const [fullscreenToggleSmall, setFullscreenToggleSmall] = useState(null)
8
+ const [fullscreenToggleLarge, setFullscreenToggleLarge] = useState(null)
9
+
10
+ const columnDefinitions = [
11
+ {
12
+ accessor: "year",
13
+ label: "Year",
14
+ cellAccessors: ["quarter", "month", "day"],
15
+ },
16
+ {
17
+ accessor: "newEnrollments",
18
+ label: "New Enrollments",
19
+ },
20
+ {
21
+ accessor: "scheduledMeetings",
22
+ label: "Scheduled Meetings",
23
+ },
24
+ {
25
+ accessor: "attendanceRate",
26
+ label: "Attendance Rate",
27
+ },
28
+ {
29
+ accessor: "completedClasses",
30
+ label: "Completed Classes",
31
+ },
32
+ {
33
+ accessor: "classCompletionRate",
34
+ label: "Class Completion Rate",
35
+ },
36
+ {
37
+ accessor: "graduatedStudents",
38
+ label: "Graduated Students",
39
+ },
40
+ ]
41
+
42
+ const tableProps = {
43
+ sticky: true
44
+ }
45
+
46
+ return (
47
+ <div>
48
+ <Flex justify="end">
49
+ <Button
50
+ marginBottom="sm"
51
+ onClick={() => fullscreenToggleSmall?.()}
52
+ text="Fullscreen Small Table"
53
+ variant="secondary"
54
+ />
55
+ </Flex>
56
+ <AdvancedTable
57
+ allowFullScreen
58
+ columnDefinitions={columnDefinitions}
59
+ fullScreenControl={({ toggleFullscreen }) => setFullscreenToggleSmall(() => toggleFullscreen)}
60
+ tableData={MOCK_DATA}
61
+ {...props}
62
+ >
63
+ <AdvancedTable.Header enableSorting />
64
+ <AdvancedTable.Body />
65
+ </AdvancedTable>
66
+ <Flex justify="end">
67
+ <Button
68
+ marginY="sm"
69
+ onClick={() => fullscreenToggleLarge?.()}
70
+ text="Fullscreen Large Table"
71
+ variant="secondary"
72
+ />
73
+ </Flex>
74
+ <AdvancedTable
75
+ allowFullScreen
76
+ columnDefinitions={columnDefinitions}
77
+ fullScreenControl={({ toggleFullscreen }) => setFullscreenToggleLarge(() => toggleFullscreen)}
78
+ responsive="none"
79
+ tableData={PAGINATION_MOCK_DATA}
80
+ tableProps={tableProps}
81
+ {...props}
82
+ >
83
+ <AdvancedTable.Header enableSorting />
84
+ <AdvancedTable.Body />
85
+ </AdvancedTable>
86
+ </div>
87
+ )
88
+ }
89
+
90
+ export default AdvancedTableFullscreen
@@ -0,0 +1,3 @@
1
+ Trigger Fullscreen mode with the `allowFullScreen`and `fullScreenControl` props. `allowFullScreen` is a boolean that enables Fullscreen functionality for an Advanced Table. `fullScreenControl` is a callback function that receives an object containing the table's internal `toggleFullscreen` function, allowing you to store and trigger Fullscreen from the parent component. An external trigger (like a button) must be used to activate Fullscreen mode.
2
+
3
+ Exit Fullscreen mode by clicking the minimize top-right-corner icon or by pressing the "Escape" keyboard key.
@@ -40,7 +40,6 @@ const AdvancedTablePagination = (props) => {
40
40
  <AdvancedTable
41
41
  columnDefinitions={columnDefinitions}
42
42
  pagination
43
- responsive="none"
44
43
  tableData={PAGINATION_MOCK_DATA}
45
44
  {...props}
46
45
  />
@@ -39,4 +39,5 @@ 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
42
+ - advanced_table_inline_editing: Inline Cell Editing
43
+ - advanced_table_fullscreen: Fullscreen
@@ -21,4 +21,5 @@ 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'
24
+ export { default as AdvancedTableInlineEditing } from './_advanced_table_inline_editing.jsx'
25
+ export { default as AdvancedTableFullscreen } from './_advanced_table_fullscreen.jsx'
@@ -63,11 +63,6 @@ $pb_button_sizes: (
63
63
  color: $text_lt_lighter;
64
64
  }
65
65
 
66
- // Disabled =================
67
- &[class*=_disabled] {
68
- @include pb_button_disabled;
69
- }
70
-
71
66
  // Block ====================
72
67
  &[class*=_block] {
73
68
  @include pb_button_block;
@@ -83,6 +78,11 @@ $pb_button_sizes: (
83
78
  @include pb_button_danger;
84
79
  }
85
80
 
81
+ // Disabled =================
82
+ &[class*=_disabled] {
83
+ @include pb_button_disabled;
84
+ }
85
+
86
86
  // Dark Variants =============
87
87
  &.dark {
88
88
  &[class*=_primary] {
@@ -106,41 +106,41 @@ const DatePicker = (props: DatePickerProps): React.ReactElement => {
106
106
  const inputAriaProps = buildAriaProps(inputAria)
107
107
  const inputDataProps = buildDataProps(inputData)
108
108
 
109
- useEffect(() => {
110
- datePickerHelper({
111
- allowInput,
112
- customQuickPickDates,
113
- defaultDate,
114
- disableDate,
115
- disableRange,
116
- disableWeekdays,
117
- enableTime,
118
- format,
119
- hideIcon,
120
- inLine,
121
- maxDate,
122
- minDate,
123
- mode,
124
- onChange,
125
- onClose,
126
- pickerId,
127
- plugins,
128
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
129
- // @ts-ignore
130
- position,
131
- positionElement,
132
- selectionType,
133
- showTimezone,
134
- staticPosition,
135
- thisRangesEndToday,
136
- yearRange,
137
- required: false,
138
- }, scrollContainer)
139
- }, initializeOnce ? [] : undefined)
109
+ useEffect(() => {
110
+ datePickerHelper({
111
+ allowInput,
112
+ customQuickPickDates,
113
+ defaultDate,
114
+ disableDate,
115
+ disableRange,
116
+ disableWeekdays,
117
+ enableTime,
118
+ format,
119
+ hideIcon,
120
+ inLine,
121
+ maxDate,
122
+ minDate,
123
+ mode,
124
+ onChange,
125
+ onClose,
126
+ pickerId,
127
+ plugins,
128
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
129
+ // @ts-ignore
130
+ position,
131
+ positionElement,
132
+ selectionType,
133
+ showTimezone,
134
+ staticPosition,
135
+ thisRangesEndToday,
136
+ yearRange,
137
+ required: false,
138
+ }, scrollContainer)
139
+ }, initializeOnce ? [] : undefined)
140
140
  const filteredProps = {...props}
141
141
  if (filteredProps.marginBottom === undefined) {
142
142
  filteredProps.marginBottom = "sm"
143
- }
143
+ }
144
144
  delete filteredProps?.position
145
145
 
146
146
  const classes = classnames(
@@ -221,7 +221,7 @@ useEffect(() => {
221
221
  {hideIcon && inLine ?
222
222
  <div>
223
223
  <div
224
- className={iconWrapperClass()}
224
+ className={`${iconWrapperClass()} date-picker-inline-icon-plus`}
225
225
  id={`${pickerId}-icon-plus`}
226
226
  >
227
227
  <Icon
@@ -230,7 +230,7 @@ useEffect(() => {
230
230
  />
231
231
  </div>
232
232
  <div
233
- className={iconWrapperClass()}
233
+ className={`${iconWrapperClass()} date-picker-inline-angle-down`}
234
234
  id={`${pickerId}-angle-down`}
235
235
  >
236
236
  <Icon