playbook_ui_docs 14.11.1.pre.alpha.PBNTR440enableglobalpropspbformwith5624 → 14.11.1.pre.alpha.PBNTR573datepickerinvestigation5355

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 (67) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx +0 -1
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx +0 -1
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort_control.md +2 -2
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -5
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -6
  7. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default.html.erb +12 -1
  8. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.md +1 -1
  9. data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +0 -1
  10. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.html.erb +9 -3
  11. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +0 -1
  12. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_borders.jsx +45 -3
  13. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.jsx +1 -0
  14. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_default.jsx +16 -9
  15. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.jsx +19 -44
  16. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.md +3 -21
  17. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_overlay.jsx +21 -16
  18. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_sizes.jsx +19 -2
  19. data/app/pb_kits/playbook/pb_drawer/docs/example.yml +1 -2
  20. data/app/pb_kits/playbook/pb_drawer/docs/index.js +0 -1
  21. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.md +1 -1
  22. data/app/pb_kits/playbook/pb_phone_number_input/docs/example.yml +1 -3
  23. data/app/pb_kits/playbook/pb_phone_number_input/docs/index.js +0 -1
  24. data/app/pb_kits/playbook/pb_radio/docs/_radio_custom_children.jsx +3 -8
  25. data/app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx +1 -4
  26. data/app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_single_select.jsx +1 -4
  27. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_rails.md +2 -2
  28. data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -3
  29. data/app/pb_kits/playbook/pb_text_input/docs/example.yml +1 -2
  30. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +0 -2
  31. data/app/pb_kits/playbook/pb_typeahead/docs/index.js +0 -1
  32. data/dist/playbook-doc.js +1 -1
  33. metadata +3 -36
  34. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_no_subrows.jsx +0 -50
  35. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.jsx +0 -60
  36. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.md +0 -5
  37. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions.jsx +0 -78
  38. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions.md +0 -1
  39. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_header.jsx +0 -53
  40. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_header.md +0 -1
  41. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.jsx +0 -52
  42. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.md +0 -1
  43. data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data_no_subrows.json +0 -42
  44. data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data_with_id.json +0 -299
  45. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_turbo_frames.html.erb +0 -13
  46. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_turbo_frames_rails.md +0 -3
  47. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.md +0 -5
  48. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.html.erb +0 -38
  49. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.md +0 -3
  50. data/app/pb_kits/playbook/pb_drawer/docs/_drawer_behavior.jsx +0 -38
  51. data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_default.html.erb +0 -3
  52. data/app/pb_kits/playbook/pb_icon_button/docs/example.yml +0 -7
  53. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.html.erb +0 -15
  54. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.jsx +0 -24
  55. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.md +0 -1
  56. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns.html.erb +0 -74
  57. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns_rails.md +0 -3
  58. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns.html.erb +0 -74
  59. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns_rails.md +0 -3
  60. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.html.erb +0 -47
  61. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_rails.md +0 -2
  62. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.html.erb +0 -46
  63. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask_rails.md +0 -3
  64. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.html.erb +0 -19
  65. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.jsx +0 -27
  66. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.md +0 -1
  67. /data/app/pb_kits/playbook/pb_table/docs/{_table_with_collapsible_react.md → _table_with_collapsible.md} +0 -0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui_docs
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.11.1.pre.alpha.PBNTR440enableglobalpropspbformwith5624
4
+ version: 14.11.1.pre.alpha.PBNTR573datepickerinvestigation5355
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2025-01-24 00:00:00.000000000 Z
12
+ date: 2025-01-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: playbook_ui
@@ -61,21 +61,12 @@ files:
61
61
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading.md
62
62
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading.jsx
63
63
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading.md
64
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_no_subrows.jsx
65
64
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx
66
65
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.md
67
66
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx
68
67
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.md
69
68
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.jsx
70
69
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.md
71
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.jsx
72
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.md
73
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions.jsx
74
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_actions.md
75
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_header.jsx
76
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_header.md
77
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.jsx
78
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.md
79
70
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.jsx
80
71
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.md
81
72
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort_control.jsx
@@ -90,8 +81,6 @@ files:
90
81
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_react.md
91
82
  - app/pb_kits/playbook/pb_advanced_table/docs/_mock_data_inline_loading.js
92
83
  - app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data.json
93
- - app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data_no_subrows.json
94
- - app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data_with_id.json
95
84
  - app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_pagination_mock_data.json
96
85
  - app/pb_kits/playbook/pb_advanced_table/docs/example.yml
97
86
  - app/pb_kits/playbook/pb_advanced_table/docs/index.js
@@ -553,8 +542,6 @@ files:
553
542
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_time.html.erb
554
543
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_time.jsx
555
544
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_time.md
556
- - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_turbo_frames.html.erb
557
- - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_turbo_frames_rails.md
558
545
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_week.html.erb
559
546
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_week.jsx
560
547
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_week.md
@@ -695,14 +682,10 @@ files:
695
682
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.jsx
696
683
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.md
697
684
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.html.erb
698
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list_rails.md
699
685
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.jsx
700
686
  - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.md
701
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.html.erb
702
- - app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list_rails.md
703
687
  - app/pb_kits/playbook/pb_draggable/docs/example.yml
704
688
  - app/pb_kits/playbook/pb_draggable/docs/index.js
705
- - app/pb_kits/playbook/pb_drawer/docs/_drawer_behavior.jsx
706
689
  - app/pb_kits/playbook/pb_drawer/docs/_drawer_borders.jsx
707
690
  - app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.jsx
708
691
  - app/pb_kits/playbook/pb_drawer/docs/_drawer_default.html.erb
@@ -1009,8 +992,6 @@ files:
1009
992
  - app/pb_kits/playbook/pb_icon/docs/_icon_sizes_swift.md
1010
993
  - app/pb_kits/playbook/pb_icon/docs/example.yml
1011
994
  - app/pb_kits/playbook/pb_icon/docs/index.js
1012
- - app/pb_kits/playbook/pb_icon_button/docs/_icon_button_default.html.erb
1013
- - app/pb_kits/playbook/pb_icon_button/docs/example.yml
1014
995
  - app/pb_kits/playbook/pb_icon_circle/docs/_description.md
1015
996
  - app/pb_kits/playbook/pb_icon_circle/docs/_footer.md
1016
997
  - app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_color.html.erb
@@ -1414,9 +1395,6 @@ files:
1414
1395
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_default.html.erb
1415
1396
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_default.jsx
1416
1397
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_default.md
1417
- - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.html.erb
1418
- - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.jsx
1419
- - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.md
1420
1398
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_initial_country.html.erb
1421
1399
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_initial_country.jsx
1422
1400
  - app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_initial_country.md
@@ -1793,17 +1771,13 @@ files:
1793
1771
  - app/pb_kits/playbook/pb_table/docs/_table_sticky.html.erb
1794
1772
  - app/pb_kits/playbook/pb_table/docs/_table_sticky.jsx
1795
1773
  - app/pb_kits/playbook/pb_table/docs/_table_sticky.md
1796
- - app/pb_kits/playbook/pb_table/docs/_table_sticky_columns.html.erb
1797
1774
  - app/pb_kits/playbook/pb_table/docs/_table_sticky_columns.jsx
1798
- - app/pb_kits/playbook/pb_table/docs/_table_sticky_columns_rails.md
1799
1775
  - app/pb_kits/playbook/pb_table/docs/_table_sticky_columns_react.md
1800
1776
  - app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.html.erb
1801
1777
  - app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.jsx
1802
1778
  - app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_rails.md
1803
1779
  - app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_react.md
1804
- - app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns.html.erb
1805
1780
  - app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns.jsx
1806
- - app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns_rails.md
1807
1781
  - app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns_react.md
1808
1782
  - app/pb_kits/playbook/pb_table/docs/_table_striped.html.erb
1809
1783
  - app/pb_kits/playbook/pb_table/docs/_table_striped.jsx
@@ -1818,10 +1792,8 @@ files:
1818
1792
  - app/pb_kits/playbook/pb_table/docs/_table_vertical_border.jsx
1819
1793
  - app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.html.erb
1820
1794
  - app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.jsx
1821
- - app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.html.erb
1822
1795
  - app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.jsx
1823
- - app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_rails.md
1824
- - app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_react.md
1796
+ - app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.md
1825
1797
  - app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.jsx
1826
1798
  - app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.md
1827
1799
  - app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content.jsx
@@ -1858,9 +1830,7 @@ files:
1858
1830
  - app/pb_kits/playbook/pb_text_input/docs/_text_input_error_swift.md
1859
1831
  - app/pb_kits/playbook/pb_text_input/docs/_text_input_inline.html.erb
1860
1832
  - app/pb_kits/playbook/pb_text_input/docs/_text_input_inline.jsx
1861
- - app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.html.erb
1862
1833
  - app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.jsx
1863
- - app/pb_kits/playbook/pb_text_input/docs/_text_input_mask_rails.md
1864
1834
  - app/pb_kits/playbook/pb_text_input/docs/_text_input_no_label.html.erb
1865
1835
  - app/pb_kits/playbook/pb_text_input/docs/_text_input_no_label.jsx
1866
1836
  - app/pb_kits/playbook/pb_text_input/docs/_text_input_options.html.erb
@@ -2061,9 +2031,6 @@ files:
2061
2031
  - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_margin_bottom.jsx
2062
2032
  - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_multi_kit.html.erb
2063
2033
  - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_multi_kit.jsx
2064
- - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.html.erb
2065
- - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.jsx
2066
- - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.md
2067
2034
  - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_context.html.erb
2068
2035
  - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx
2069
2036
  - app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb
@@ -1,50 +0,0 @@
1
- import React from "react"
2
- import { AdvancedTable } from "playbook-ui"
3
- import MOCK_DATA from "./advanced_table_mock_data_no_subrows.json"
4
-
5
- const AdvancedTableNoSubrows = (props) => {
6
- const columnDefinitions = [
7
- {
8
- accessor: "year",
9
- label: "Year",
10
- cellAccessors: ["quarter", "month", "day"],
11
- },
12
- {
13
- accessor: "newEnrollments",
14
- label: "New Enrollments",
15
- },
16
- {
17
- accessor: "scheduledMeetings",
18
- label: "Scheduled Meetings",
19
- },
20
- {
21
- accessor: "attendanceRate",
22
- label: "Attendance Rate",
23
- },
24
- {
25
- accessor: "completedClasses",
26
- label: "Completed Classes",
27
- },
28
- {
29
- accessor: "classCompletionRate",
30
- label: "Class Completion Rate",
31
- },
32
- {
33
- accessor: "graduatedStudents",
34
- label: "Graduated Students",
35
- },
36
- ]
37
-
38
- return (
39
- <div>
40
- <AdvancedTable
41
- columnDefinitions={columnDefinitions}
42
- enableToggleExpansion="all"
43
- tableData={MOCK_DATA}
44
- {...props}
45
- />
46
- </div>
47
- )
48
- }
49
-
50
- export default AdvancedTableNoSubrows
@@ -1,60 +0,0 @@
1
- import React from "react"
2
- import { AdvancedTable } from "playbook-ui"
3
- import MOCK_DATA from "./advanced_table_mock_data_with_id.json"
4
-
5
- const AdvancedTableSelectableRows = (props) => {
6
- const columnDefinitions = [
7
- {
8
- accessor: "year",
9
- label: "Year",
10
- cellAccessors: ["quarter", "month", "day"],
11
- },
12
- {
13
- accessor: "newEnrollments",
14
- label: "New Enrollments",
15
- },
16
- {
17
- accessor: "scheduledMeetings",
18
- label: "Scheduled Meetings",
19
- },
20
- {
21
- accessor: "attendanceRate",
22
- label: "Attendance Rate",
23
- },
24
- {
25
- accessor: "completedClasses",
26
- label: "Completed Classes",
27
- },
28
- {
29
- accessor: "classCompletionRate",
30
- label: "Class Completion Rate",
31
- },
32
- {
33
- accessor: "graduatedStudents",
34
- label: "Graduated Students",
35
- },
36
- ]
37
-
38
- //Render the subRow header rows
39
- const subRowHeaders = ["Quarter", "Month", "Day"]
40
-
41
-
42
- return (
43
- <div>
44
- <AdvancedTable
45
- columnDefinitions={columnDefinitions}
46
- enableToggleExpansion="all"
47
- onRowSelectionChange={(selectedRows) => console.log(selectedRows)}
48
- selectableRows
49
- tableData={MOCK_DATA}
50
-
51
- {...props}
52
- >
53
- <AdvancedTable.Header />
54
- <AdvancedTable.Body subRowHeaders={subRowHeaders}/>
55
- </AdvancedTable>
56
- </div>
57
- )
58
- }
59
-
60
- export default AdvancedTableSelectableRows
@@ -1,5 +0,0 @@
1
- `selectableRows` is a boolean prop that if present will add checkboxes to all rows that will allow for selecting rows.
2
-
3
- When a parent row is clicked, it will check all nested children rows, Children rows can be manually checked or unchecked as well.
4
-
5
- The `onRowSelectionChange` prop returns an array of ids of all Rows that have been selected. Open the console on this example and check and uncheck checkboxes to see this is action! __NOTE__: Each object within the `tableData`Array must contain a unique id in order to attach an id to all Rows for this to function.
@@ -1,78 +0,0 @@
1
- import React, {useState} from "react"
2
- import { AdvancedTable, CircleIconButton, Flex } from "playbook-ui"
3
- import MOCK_DATA from "./advanced_table_mock_data_no_subrows.json"
4
-
5
- const AdvancedTableSelectableRowsActions = (props) => {
6
- const columnDefinitions = [
7
- {
8
- accessor: "year",
9
- label: "Year",
10
- cellAccessors: ["quarter", "month", "day"],
11
- },
12
- {
13
- accessor: "newEnrollments",
14
- label: "New Enrollments",
15
- },
16
- {
17
- accessor: "scheduledMeetings",
18
- label: "Scheduled Meetings",
19
- },
20
- {
21
- accessor: "attendanceRate",
22
- label: "Attendance Rate",
23
- },
24
- {
25
- accessor: "completedClasses",
26
- label: "Completed Classes",
27
- },
28
- {
29
- accessor: "classCompletionRate",
30
- label: "Class Completion Rate",
31
- },
32
- {
33
- accessor: "graduatedStudents",
34
- label: "Graduated Students",
35
- },
36
- ]
37
-
38
- const [selectedRows, setSelectedRows] = useState()
39
-
40
- const CustomActions = () => {
41
- const rowIds = selectedRows ? Object.keys(selectedRows) : [];
42
-
43
- return (
44
- <Flex>
45
- <CircleIconButton
46
- icon="file-csv"
47
- onClick={() =>
48
- alert(rowIds.length === 0 ? "No Selection Made" : `Row ids ${rowIds.join(", ")} will be exported!`)
49
- }
50
- variant="link"
51
- />
52
- <CircleIconButton
53
- icon="trash-alt"
54
- onClick={() =>
55
- alert(rowIds.length === 0 ? "No Selection Made" : `Row ids ${rowIds.join(", ")} will be deleted!`)
56
- }
57
- variant="link"
58
- />
59
- </Flex>
60
- );
61
- };
62
-
63
-
64
- return (
65
- <div>
66
- <AdvancedTable
67
- actions={<CustomActions/>}
68
- columnDefinitions={columnDefinitions}
69
- onRowSelectionChange={(selected) => setSelectedRows(selected)}
70
- selectableRows
71
- tableData={MOCK_DATA}
72
- {...props}
73
- />
74
- </div>
75
- )
76
- }
77
-
78
- export default AdvancedTableSelectableRowsActions
@@ -1 +0,0 @@
1
- Custom actions content can be rendered within the Actions Bar as shown in this doc example. The component passed to `actions` will be rendered on the right of the actionsBar. The `onRowSelectionChange` can then be used to attach the needed click events to those actions.
@@ -1,53 +0,0 @@
1
- import React from "react"
2
- import { AdvancedTable } from "playbook-ui"
3
- import MOCK_DATA from "./advanced_table_mock_data_no_subrows.json"
4
-
5
- const AdvancedTableSelectableRowsHeader = (props) => {
6
- const columnDefinitions = [
7
- {
8
- accessor: "year",
9
- label: "Year",
10
- cellAccessors: ["quarter", "month", "day"],
11
- },
12
- {
13
- accessor: "newEnrollments",
14
- label: "New Enrollments",
15
- },
16
- {
17
- accessor: "scheduledMeetings",
18
- label: "Scheduled Meetings",
19
- },
20
- {
21
- accessor: "attendanceRate",
22
- label: "Attendance Rate",
23
- },
24
- {
25
- accessor: "completedClasses",
26
- label: "Completed Classes",
27
- },
28
- {
29
- accessor: "classCompletionRate",
30
- label: "Class Completion Rate",
31
- },
32
- {
33
- accessor: "graduatedStudents",
34
- label: "Graduated Students",
35
- },
36
- ]
37
-
38
-
39
- return (
40
- <div>
41
- <AdvancedTable
42
- columnDefinitions={columnDefinitions}
43
- onRowSelectionChange={(selectedRows) => console.log(selectedRows)}
44
- selectableRows
45
- showActionsBar={false}
46
- tableData={MOCK_DATA}
47
- {...props}
48
- />
49
- </div>
50
- )
51
- }
52
-
53
- export default AdvancedTableSelectableRowsHeader
@@ -1 +0,0 @@
1
- `showActionsBar` is an optional prop that renders the header at the top showing the row count. This is set to `true` by default but can be toggled off by setting it to `false`
@@ -1,52 +0,0 @@
1
- import React from "react"
2
- import { AdvancedTable } from "playbook-ui"
3
- import MOCK_DATA from "./advanced_table_mock_data_no_subrows.json"
4
-
5
- const AdvancedTableSelectableRowsNoSubrows = (props) => {
6
- const columnDefinitions = [
7
- {
8
- accessor: "year",
9
- label: "Year",
10
- cellAccessors: ["quarter", "month", "day"],
11
- },
12
- {
13
- accessor: "newEnrollments",
14
- label: "New Enrollments",
15
- },
16
- {
17
- accessor: "scheduledMeetings",
18
- label: "Scheduled Meetings",
19
- },
20
- {
21
- accessor: "attendanceRate",
22
- label: "Attendance Rate",
23
- },
24
- {
25
- accessor: "completedClasses",
26
- label: "Completed Classes",
27
- },
28
- {
29
- accessor: "classCompletionRate",
30
- label: "Class Completion Rate",
31
- },
32
- {
33
- accessor: "graduatedStudents",
34
- label: "Graduated Students",
35
- },
36
- ]
37
-
38
-
39
- return (
40
- <div>
41
- <AdvancedTable
42
- columnDefinitions={columnDefinitions}
43
- onRowSelectionChange={(selectedRows) => console.log(selectedRows)}
44
- selectableRows
45
- tableData={MOCK_DATA}
46
- {...props}
47
- />
48
- </div>
49
- )
50
- }
51
-
52
- export default AdvancedTableSelectableRowsNoSubrows
@@ -1 +0,0 @@
1
- `selectableRows` can also be used with tables without nested row data.
@@ -1,42 +0,0 @@
1
- [
2
- {
3
- "year": "2021",
4
- "id": "1",
5
- "newEnrollments": "20",
6
- "scheduledMeetings": "10",
7
- "attendanceRate": "51%",
8
- "completedClasses": "3",
9
- "classCompletionRate": "33%",
10
- "graduatedStudents": "19"
11
- },
12
- {
13
- "year": "2022",
14
- "id": "8",
15
- "newEnrollments": "25",
16
- "scheduledMeetings": "17",
17
- "attendanceRate": "75%",
18
- "completedClasses": "5",
19
- "classCompletionRate": "45%",
20
- "graduatedStudents": "32"
21
- },
22
- {
23
- "year": "2023",
24
- "id": "15",
25
- "newEnrollments": "10",
26
- "scheduledMeetings": "15",
27
- "attendanceRate": "65%",
28
- "completedClasses": "4",
29
- "classCompletionRate": "49%",
30
- "graduatedStudents": "29"
31
- },
32
- {
33
- "year": "2024",
34
- "id": "14",
35
- "newEnrollments": "15",
36
- "scheduledMeetings": "34",
37
- "attendanceRate": "32%",
38
- "completedClasses": "6",
39
- "classCompletionRate": "67%",
40
- "graduatedStudents": "65"
41
- }
42
- ]