playbook_ui 14.17.0.pre.alpha.play1499backgroundkitoverlay7110 → 14.17.0.pre.alpha.play1735highchartscirclechartdefaultrebuild7365

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 (137) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/Components/RegularTableView.tsx +23 -3
  3. data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +67 -3
  4. data/app/pb_kits/playbook/pb_advanced_table/Hooks/useTableActions.ts +1 -2
  5. data/app/pb_kits/playbook/pb_advanced_table/Utilities/ExpansionControlHelpers.tsx +29 -19
  6. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +67 -128
  7. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +9 -0
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expand_by_depth.jsx +66 -0
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expand_by_depth.md +10 -0
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns.jsx +58 -0
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns.md +6 -0
  12. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns_and_header.jsx +64 -0
  13. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns_and_header.md +8 -0
  14. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header.jsx +55 -0
  15. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header.md +3 -0
  16. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header_rails.html.erb +33 -0
  17. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header_rails.md +3 -0
  18. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.html.erb +1 -1
  19. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx +1 -2
  20. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_rails.md +2 -2
  21. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_react.md +1 -1
  22. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md +6 -2
  23. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md +6 -2
  24. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +7 -2
  25. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +5 -1
  26. data/app/pb_kits/playbook/pb_advanced_table/index.js +7 -0
  27. data/app/pb_kits/playbook/pb_advanced_table/scss_partials/advanced_table_sticky_mixin.scss +97 -0
  28. data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +1 -1
  29. data/app/pb_kits/playbook/pb_background/_background.tsx +0 -1
  30. data/app/pb_kits/playbook/pb_background/docs/_background_overlay.jsx +3 -4
  31. data/app/pb_kits/playbook/pb_background/docs/example.yml +1 -1
  32. data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx +1 -1
  33. data/app/pb_kits/playbook/pb_circle_chart/circleChartTheme.ts +45 -0
  34. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_pb_styles.jsx +38 -0
  35. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_pb_styles.md +1 -0
  36. data/app/pb_kits/playbook/pb_circle_chart/docs/example.yml +2 -1
  37. data/app/pb_kits/playbook/pb_circle_chart/docs/index.js +2 -1
  38. data/app/pb_kits/playbook/pb_copy_button/_copy_button.tsx +19 -45
  39. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_hook.jsx +54 -0
  40. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_hook.md +3 -0
  41. data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +1 -0
  42. data/app/pb_kits/playbook/pb_copy_button/docs/index.js +2 -1
  43. data/app/pb_kits/playbook/pb_copy_button/usePBCopy.ts +45 -0
  44. data/app/pb_kits/playbook/pb_draggable/_draggable.scss +43 -20
  45. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.jsx +102 -105
  46. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.md +3 -3
  47. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.jsx +50 -48
  48. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.md +1 -1
  49. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.jsx +110 -0
  50. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.md +5 -0
  51. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_event_listeners.html.erb +42 -0
  52. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_event_listeners.md +1 -0
  53. data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_table_react.jsx → _draggable_with_table.jsx} +1 -1
  54. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.md +3 -1
  55. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +10 -6
  56. data/app/pb_kits/playbook/pb_draggable/docs/index.js +4 -1
  57. data/app/pb_kits/playbook/pb_draggable/draggable.test.jsx +68 -0
  58. data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableContainer.tsx +4 -3
  59. data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +1 -1
  60. data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownOption.tsx +1 -1
  61. data/app/pb_kits/playbook/pb_form_group/_form_group.scss +23 -3
  62. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.html.erb +15 -5
  63. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.jsx +39 -6
  64. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_pb_styles.jsx +30 -0
  65. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_pb_styles.md +1 -0
  66. data/app/pb_kits/playbook/pb_gauge/docs/example.yml +1 -0
  67. data/app/pb_kits/playbook/pb_gauge/docs/index.js +1 -0
  68. data/app/pb_kits/playbook/pb_gauge/gaugeTheme.ts +85 -0
  69. data/app/pb_kits/playbook/pb_layout/_layout.scss +70 -1
  70. data/app/pb_kits/playbook/pb_layout/_layout.tsx +29 -2
  71. data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.jsx +322 -118
  72. data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.md +1 -1
  73. data/app/pb_kits/playbook/pb_layout/subcomponents/_game.tsx +74 -43
  74. data/app/pb_kits/playbook/pb_layout/subcomponents/_participant.tsx +79 -0
  75. data/app/pb_kits/playbook/pb_layout/subcomponents/_round.tsx +21 -4
  76. data/app/pb_kits/playbook/pb_overlay/_overlay.scss +83 -22
  77. data/app/pb_kits/playbook/pb_overlay/_overlay.tsx +39 -7
  78. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_color.jsx +63 -0
  79. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_color.md +3 -0
  80. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md +1 -7
  81. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_fullscreen_background.jsx +49 -0
  82. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_fullscreen_background.md +1 -0
  83. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_fullscreen_opacity.jsx +81 -0
  84. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_fullscreen_opacity.md +1 -0
  85. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.jsx +39 -0
  86. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.md +1 -0
  87. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.jsx +40 -0
  88. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.md +5 -0
  89. data/app/pb_kits/playbook/pb_overlay/docs/example.yml +5 -0
  90. data/app/pb_kits/playbook/pb_overlay/docs/index.js +5 -0
  91. data/app/pb_kits/playbook/pb_overlay/overlay.test.jsx +39 -1
  92. data/app/pb_kits/playbook/pb_table/_table.tsx +2 -2
  93. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows.md +3 -1
  94. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows_rails.md +3 -1
  95. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table.md +3 -1
  96. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table_rails.md +3 -1
  97. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless.html.erb +34 -0
  98. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless_rails.md +1 -0
  99. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating.html.erb +36 -0
  100. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_rails.md +1 -0
  101. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_react.md +1 -1
  102. data/app/pb_kits/playbook/pb_table/docs/example.yml +2 -0
  103. data/app/pb_kits/playbook/pb_table/styles/_collapsible.scss +1 -1
  104. data/app/pb_kits/playbook/pb_table/styles/_headers.scss +19 -7
  105. data/app/pb_kits/playbook/pb_table/table.rb +13 -1
  106. data/app/pb_kits/playbook/pb_table/table_header.rb +13 -1
  107. data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +13 -5
  108. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_sanitize.jsx +94 -0
  109. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_sanitize.md +1 -0
  110. data/app/pb_kits/playbook/pb_text_input/docs/example.yml +2 -0
  111. data/app/pb_kits/playbook/pb_text_input/docs/index.js +1 -0
  112. data/app/pb_kits/playbook/pb_text_input/inputMask.ts +8 -1
  113. data/dist/chunks/_typeahead-B8ZHFkS2.js +22 -0
  114. data/dist/chunks/_weekday_stacked-BHIbkVpj.js +45 -0
  115. data/dist/chunks/lib-D4SkptW4.js +29 -0
  116. data/dist/chunks/{pb_form_validation-BvNy9Bd6.js → pb_form_validation-CUMPJ9As.js} +1 -1
  117. data/dist/chunks/vendor.js +1 -1
  118. data/dist/playbook-doc.js +19 -1
  119. data/dist/playbook-rails-react-bindings.js +1 -1
  120. data/dist/playbook-rails.js +1 -1
  121. data/dist/playbook.css +1 -1
  122. data/lib/playbook/version.rb +1 -1
  123. metadata +59 -18
  124. data/dist/chunks/_typeahead-1gVtCLYL.js +0 -22
  125. data/dist/chunks/_weekday_stacked-Cl62R0Ef.js +0 -45
  126. data/dist/chunks/lib-BGzBzFZX.js +0 -29
  127. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_default_rails.html.erb → _draggable_default.html.erb} +0 -0
  128. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_default.md → _draggable_default_react.md} +0 -0
  129. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_multiple_containers_rails.html.erb → _draggable_multiple_containers.html.erb} +0 -0
  130. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_multiple_containers.md → _draggable_multiple_containers_react.md} +0 -0
  131. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_cards_rails.html.erb → _draggable_with_cards.html.erb} +0 -0
  132. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_cards.md → _draggable_with_cards_react.md} +0 -0
  133. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_list_rails.html.erb → _draggable_with_list.html.erb} +0 -0
  134. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_list.md → _draggable_with_list_react.md} +0 -0
  135. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_selectable_list_rails.html.erb → _draggable_with_selectable_list.html.erb} +0 -0
  136. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_selectable_list.md → _draggable_with_selectable_list_react.md} +0 -0
  137. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_table.md → _draggable_with_table_rails.md} +0 -0
@@ -0,0 +1,66 @@
1
+ import React from "react"
2
+ import AdvancedTable from '../../pb_advanced_table/_advanced_table'
3
+ import MOCK_DATA from "./advanced_table_mock_data.json"
4
+
5
+ const AdvancedTableExpandByDepth = (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 expandByDepth = [
39
+ {
40
+ depth: 0,
41
+ label: "Year",
42
+ },
43
+ {
44
+ depth: 1,
45
+ label: "Quarter",
46
+ },
47
+ {
48
+ depth: 2,
49
+ label: "Month",
50
+ }
51
+ ]
52
+
53
+ return (
54
+ <div>
55
+ <AdvancedTable
56
+ columnDefinitions={columnDefinitions}
57
+ expandByDepth={expandByDepth}
58
+ onExpandByDepthClick={(depth, rows) => {console.log(depth, rows)}}
59
+ tableData={MOCK_DATA}
60
+ {...props}
61
+ />
62
+ </div>
63
+ )
64
+ }
65
+
66
+ export default AdvancedTableExpandByDepth
@@ -0,0 +1,10 @@
1
+ The `expandByDepth` prop enables users to expand or collapse table rows by specific levels of nesting. When provided, it renders a dropdown that appears when the toggle icon in the header is clicked.
2
+
3
+ `expandByDepth` accepts an array of objects, where each object defines the depth level to target and the label to display in the dropdown. When a user selects an option:
4
+
5
+ **Expanding a depth**: Expands all rows at the selected depth AND all parent levels above it (if parent levels were closed), ensuring nested content is visible.
6
+
7
+ **Collapsing a depth**: Only collapses rows at the selected depth, keeping parent rows expanded for context.
8
+
9
+ If you want to attach further logic to each option click, the **optional** `onExpandByDepthClick` prop can be used. This click event provides 2 arguments that can be hooked into: the depth level of the clicked item AND all flattened table rows. Any additional functionality provided through this onClick will be applied in addition to the default.
10
+
@@ -0,0 +1,58 @@
1
+ import React from "react"
2
+ import AdvancedTable from '../../pb_advanced_table/_advanced_table'
3
+ import MOCK_DATA from "./advanced_table_mock_data.json"
4
+
5
+ const AdvancedTableStickyColumns = (props) => {
6
+ const columnDefinitions = [
7
+ {
8
+ accessor: "year",
9
+ label: "Year",
10
+ id: "year",
11
+ cellAccessors: ["quarter", "month", "day"],
12
+ },
13
+ {
14
+ accessor: "newEnrollments",
15
+ label: "New Enrollments",
16
+ id: "newEnrollments",
17
+ },
18
+ {
19
+ accessor: "scheduledMeetings",
20
+ label: "Scheduled Meetings",
21
+ id: "scheduledMeetings",
22
+ },
23
+ {
24
+ accessor: "attendanceRate",
25
+ label: "Attendance Rate",
26
+ id: "attendanceRate",
27
+ },
28
+ {
29
+ accessor: "completedClasses",
30
+ label: "Completed Classes",
31
+ id: "completedClasses",
32
+ },
33
+ {
34
+ accessor: "classCompletionRate",
35
+ label: "Class Completion Rate",
36
+ id: "classCompletionRate",
37
+ },
38
+ {
39
+ accessor: "graduatedStudents",
40
+ label: "Graduated Students",
41
+ id: "graduatedStudents",
42
+ },
43
+ ]
44
+
45
+ return (
46
+ <div>
47
+ <AdvancedTable
48
+ columnDefinitions={columnDefinitions}
49
+ responsive="none"
50
+ stickyLeftColumn={["year"]}
51
+ tableData={MOCK_DATA}
52
+ {...props}
53
+ />
54
+ </div>
55
+ )
56
+ }
57
+
58
+ export default AdvancedTableStickyColumns
@@ -0,0 +1,6 @@
1
+ To render sticky columns for the Advanced Table, you can use the `stickyLeftColumn` prop. This prop expects an array of the column ids you want to be sticky.
2
+
3
+ To achieve this:
4
+ - Make sure to provide an id for each column via columnDefinitions as shown below. Id can be any string.
5
+ - One or multiple columns can be made sticky, it is recommended to set the ids within `stickyLeftColumn` in the order in which the columns are rendered.
6
+ - It is recommended to set `responsive` to none when using `stickyLeftColumn` since responsive just makes the first column sticky and the slightly different styling for `responsive` and `stickyLeftColumn` may override each other in unexpected ways.
@@ -0,0 +1,64 @@
1
+ import React from "react"
2
+ import AdvancedTable from '../../pb_advanced_table/_advanced_table'
3
+ import MOCK_DATA from "./advanced_table_mock_data.json"
4
+
5
+ const AdvancedTableStickyColumnsAndHeader = (props) => {
6
+ const columnDefinitions = [
7
+ {
8
+ accessor: "year",
9
+ label: "Year",
10
+ id: "year",
11
+ cellAccessors: ["quarter", "month", "day"],
12
+ },
13
+ {
14
+ accessor: "newEnrollments",
15
+ label: "New Enrollments",
16
+ id: "newEnrollments",
17
+ },
18
+ {
19
+ accessor: "scheduledMeetings",
20
+ label: "Scheduled Meetings",
21
+ id: "scheduledMeetings",
22
+ },
23
+ {
24
+ accessor: "attendanceRate",
25
+ label: "Attendance Rate",
26
+ id: "attendanceRate",
27
+ },
28
+ {
29
+ accessor: "completedClasses",
30
+ label: "Completed Classes",
31
+ id: "completedClasses",
32
+ },
33
+ {
34
+ accessor: "classCompletionRate",
35
+ label: "Class Completion Rate",
36
+ id: "classCompletionRate",
37
+ },
38
+ {
39
+ accessor: "graduatedStudents",
40
+ label: "Graduated Students",
41
+ id: "graduatedStudents",
42
+ },
43
+ ]
44
+
45
+ const tableProps = {
46
+ sticky: true
47
+ }
48
+
49
+ return (
50
+ <div>
51
+ <AdvancedTable
52
+ columnDefinitions={columnDefinitions}
53
+ maxHeight="xs"
54
+ responsive="none"
55
+ stickyLeftColumn={["year"]}
56
+ tableData={MOCK_DATA}
57
+ tableProps={tableProps}
58
+ {...props}
59
+ />
60
+ </div>
61
+ )
62
+ }
63
+
64
+ export default AdvancedTableStickyColumnsAndHeader
@@ -0,0 +1,8 @@
1
+ To achieve a sticky header AND sticky columns together, in addition to the `stickyLeftColumn` logic outlined above, you can:
2
+
3
+ - Set `sticky: true` via `tableProps`
4
+ - Give the AdvancedTable a `maxHeight` using our [Max Height](https://playbook.powerapp.cloud/visual_guidelines/max_height) global prop.
5
+
6
+ **NOTE**: This behavior requires a `maxHeight` to work. The header is sticky within the table container, allowing for it to work along with the column stickiness.
7
+
8
+ Expand the table above to see this in action.
@@ -0,0 +1,55 @@
1
+ import React from "react"
2
+ import AdvancedTable from '../../pb_advanced_table/_advanced_table'
3
+ import MOCK_DATA from "./advanced_table_mock_data.json"
4
+
5
+ const AdvancedTableStickyHeader = (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 tableProps = {
39
+ sticky: true
40
+ }
41
+
42
+ return (
43
+ <div>
44
+ <AdvancedTable
45
+ columnDefinitions={columnDefinitions}
46
+ responsive="none"
47
+ tableData={MOCK_DATA}
48
+ tableProps={tableProps}
49
+ {...props}
50
+ />
51
+ </div>
52
+ )
53
+ }
54
+
55
+ export default AdvancedTableStickyHeader
@@ -0,0 +1,3 @@
1
+ The `TableProps` prop can also be used to render a sticky header for the Advanced Table.
2
+
3
+ This doc example showcases how to set a sticky header for a nonresponsive table (see the `responsive` prop set to "none"). To achieve sticky header AND responsive functionality, see the "Sticky Header for Responsive Table" doc example below.
@@ -0,0 +1,33 @@
1
+ <% column_definitions = [
2
+ {
3
+ accessor: "year",
4
+ label: "Year",
5
+ cellAccessors: ["quarter", "month", "day"],
6
+ },
7
+ {
8
+ accessor: "newEnrollments",
9
+ label: "New Enrollments",
10
+ },
11
+ {
12
+ accessor: "scheduledMeetings",
13
+ label: "Scheduled Meetings",
14
+ },
15
+ {
16
+ accessor: "attendanceRate",
17
+ label: "Attendance Rate",
18
+ },
19
+ {
20
+ accessor: "completedClasses",
21
+ label: "Completed Classes",
22
+ },
23
+ {
24
+ accessor: "classCompletionRate",
25
+ label: "Class Completion Rate",
26
+ },
27
+ {
28
+ accessor: "graduatedStudents",
29
+ label: "Graduated Students",
30
+ }
31
+ ] %>
32
+
33
+ <%= pb_rails("advanced_table", props: { id: "sticky_header_table", table_data: @table_data, column_definitions: column_definitions, responsive: "none", table_props: { sticky: true }}) %>
@@ -0,0 +1,3 @@
1
+ The `table_props` prop can also be used to render a sticky header for the Advanced Table.
2
+
3
+ This doc example showcases how to set a sticky header for a nonresponsive table (see the `responsive` prop set to "none"). To achieve sticky header AND responsive functionality, see the "[Sticky Header for Responsive Table](https://playbook.powerapp.cloud/kits/advanced_table/react#sticky-header-for-responsive-table)" doc example below.
@@ -30,4 +30,4 @@
30
30
  }
31
31
  ] %>
32
32
 
33
- <%= pb_rails("advanced_table", props: { id: "table_props_table", table_data: @table_data, column_definitions: column_definitions, responsive: "none", table_props: { container: false, sticky: true }}) %>
33
+ <%= pb_rails("advanced_table", props: { id: "table_props_table", table_data: @table_data, column_definitions: column_definitions, table_props: { vertical_border: true, container: false }}) %>
@@ -37,14 +37,13 @@ const AdvancedTableTableProps = (props) => {
37
37
 
38
38
  const tableProps = {
39
39
  container: false,
40
- sticky: true
40
+ verticalBorder: true
41
41
  }
42
42
 
43
43
  return (
44
44
  <div>
45
45
  <AdvancedTable
46
46
  columnDefinitions={columnDefinitions}
47
- responsive="none"
48
47
  tableData={MOCK_DATA}
49
48
  tableProps={tableProps}
50
49
  {...props}
@@ -1,3 +1,3 @@
1
- This kit uses the [Table kit](https://playbook.powerapp.cloud/kits/table) under the hood which comes with its own set of props. If you want to apply certain Table props to that underlying kit, you can do so by using the optional `table_props` prop. This prop must be an object that contains valid Table props. For a full list of Table props, see [here](https://playbook.powerapp.cloud/kits/table).
1
+ This kit uses the [Table kit](https://playbook.powerapp.cloud/kits/table/react) under the hood which comes with its own set of props. If you want to apply certain Table props to that underlying kit, you can do so by using the optional `table_props` prop. This prop must be an object that contains valid Table props. For a full list of Table props, see [here](https://playbook.powerapp.cloud/kits/table/react).
2
2
 
3
- This doc example showcases how to set a sticky header for a nonresponsive table. To achieve sticky header AND responsive functionality, see the ["Table Props Sticky Header"](https://playbook.powerapp.cloud/kits/advanced_table#table-props-sticky-header) doc example below.
3
+ This doc example showcases the use of two table props, including how to render the vertical borders between columns.
@@ -1,3 +1,3 @@
1
1
  This kit uses the [Table kit](https://playbook.powerapp.cloud/kits/table/react) under the hood which comes with its own set of props. If you want to apply certain Table props to that underlying kit, you can do so by using the optional `tableProps` prop. This prop must be an object that contains valid Table props. For a full list of Table props, see [here](https://playbook.powerapp.cloud/kits/table/react).
2
2
 
3
- This doc example showcases how to set a sticky header for a nonresponsive table. To achieve sticky header AND responsive functionality, see the ["Table Props Sticky Header"](https://playbook.powerapp.cloud/kits/advanced_table/react#table-props-sticky-header) doc example below.
3
+ This doc example showcases the use of two table props, including how to render the vertical borders between columns.
@@ -1,3 +1,7 @@
1
- Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `table_props` and giving the AdvancedTable a `max_height` using our [Max Height](https://playbook.powerapp.cloud/visual_guidelines/max_height) global prop. This behavior requires a `max_height` to work. The header is sticky within the table container, allowing for it to work along with the first column stickiness of a responsive table on smaller screen sizes.
1
+ Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `table_props` and giving the AdvancedTable a `max_height` using our [Max Height](https://playbook.powerapp.cloud/visual_guidelines/max_height) global prop.
2
2
 
3
- A sticky header on a nonresponsive table is demonstrated in the ["Table Props"](https://playbook.powerapp.cloud/kits/advanced_table#table-props) doc example above.
3
+ **NOTE**: This behavior requires a `max_height` to work. The header is sticky within the table container, allowing for it to work along with the first column stickiness of a responsive table on smaller screen sizes.
4
+
5
+ Expand the table above to see this in action.
6
+
7
+ A sticky header on a nonresponsive table is demonstrated in the ["Sticky Header"](https://playbook.powerapp.cloud/kits/advanced_table#sticky-header) doc example above.
@@ -1,3 +1,7 @@
1
- Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `tableProps` and giving the AdvancedTable a `maxHeight` using our [Max Height](https://playbook.powerapp.cloud/visual_guidelines/max_height) global prop. This behavior requires a `maxHeight` to work. The header is sticky within the table container, allowing for it to work along with the first column stickiness of a responsive table on smaller screen sizes.
1
+ Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `tableProps` and giving the AdvancedTable a `maxHeight` using our [Max Height](https://playbook.powerapp.cloud/visual_guidelines/max_height) global prop.
2
2
 
3
- A sticky header on a nonresponsive table is demonstrated in the ["Table Props"](https://playbook.powerapp.cloud/kits/advanced_table/react#table-props) doc example above.
3
+ **NOTE**: This behavior requires a `maxHeight` to work. The header is sticky within the table container, allowing for it to work along with the first column stickiness of a responsive table on smaller screen sizes.
4
+
5
+ Expand the table above to see this in action.
6
+
7
+ A sticky header on a nonresponsive table is demonstrated in the ["Sticky Header"](https://playbook.powerapp.cloud/kits/advanced_table/react#sticky-header) doc example above.
@@ -5,7 +5,8 @@ examples:
5
5
  - advanced_table_beta_subrow_headers: SubRow Headers
6
6
  - advanced_table_collapsible_trail_rails: Collapsible Trail
7
7
  - advanced_table_table_props: Table Props
8
- - advanced_table_table_props_sticky_header: Table Props Sticky Header
8
+ - advanced_table_sticky_header_rails: Sticky Header
9
+ - advanced_table_table_props_sticky_header: Sticky Header for Responsive Table
9
10
  - advanced_table_beta_sort: Enable Sorting
10
11
  - advanced_table_responsive: Responsive Tables
11
12
  - advanced_table_custom_cell_rails: Custom Components for Cells
@@ -21,11 +22,15 @@ examples:
21
22
  - advanced_table_sort: Enable Sorting
22
23
  - advanced_table_sort_control: Sort Control
23
24
  - advanced_table_expanded_control: Expanded Control
25
+ - advanced_table_expand_by_depth: Expand by Depth
24
26
  - advanced_table_subrow_headers: SubRow Headers
25
27
  - advanced_table_collapsible_trail: Collapsible Trail
26
28
  - advanced_table_table_options: Table Options
27
29
  - advanced_table_table_props: Table Props
28
- - advanced_table_table_props_sticky_header: Table Props Sticky Header
30
+ - advanced_table_sticky_header: Sticky Header
31
+ - advanced_table_table_props_sticky_header: Sticky Header for Responsive Table
32
+ - advanced_table_sticky_columns: Sticky Columns
33
+ - advanced_table_sticky_columns_and_header: Sticky Columns with Sticky Header
29
34
  - advanced_table_inline_row_loading: Inline Row Loading
30
35
  - advanced_table_responsive: Responsive Tables
31
36
  - advanced_table_custom_cell: Custom Components for Cells
@@ -22,4 +22,8 @@ export { default as AdvancedTableSelectableRowsActions } from './_advanced_table
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
24
  export { default as AdvancedTableInlineEditing } from './_advanced_table_inline_editing.jsx'
25
- export { default as AdvancedTableFullscreen } from './_advanced_table_fullscreen.jsx'
25
+ export { default as AdvancedTableFullscreen } from './_advanced_table_fullscreen.jsx'
26
+ export { default as AdvancedTableStickyColumns } from './_advanced_table_sticky_columns.jsx'
27
+ export { default as AdvancedTableStickyHeader } from './_advanced_table_sticky_header.jsx'
28
+ export { default as AdvancedTableStickyColumnsAndHeader } from './_advanced_table_sticky_columns_and_header.jsx'
29
+ export { default as AdvancedTableExpandByDepth } from './_advanced_table_expand_by_depth.jsx'
@@ -31,6 +31,8 @@ export default class PbAdvancedTable extends PbEnhancedElement {
31
31
  this.toggleElement(this.target);
32
32
  }
33
33
  });
34
+
35
+ this.hideCloseIcon()
34
36
 
35
37
  const nestedButtons = this.element
36
38
  .closest("table")
@@ -49,6 +51,11 @@ export default class PbAdvancedTable extends PbEnhancedElement {
49
51
  });
50
52
  }
51
53
 
54
+ hideCloseIcon() {
55
+ const closeIcon = this.element.querySelector(UP_ARROW_SELECTOR);
56
+ closeIcon.style.display = "none";
57
+ }
58
+
52
59
  showElement(elements) {
53
60
  elements.forEach((elem) => {
54
61
  elem.style.display = "table-row";
@@ -0,0 +1,97 @@
1
+ @mixin advanced-table-sticky-mixin(
2
+ $border-color,
3
+ $bg-main,
4
+ $bg-secondary,
5
+ $highlight: $info_subtle
6
+ ) {
7
+ border-radius: 4px;
8
+ box-shadow: 1px 0 0 0px $border-color, -1px 0 0 0px $border-color;
9
+ display: block;
10
+ [class^="pb_table"].table-sm.table-card thead tr th:first-child,
11
+ [class^="pb_table"].table-sm:not(.no-hover).table-card
12
+ tbody
13
+ tr
14
+ td:first-child {
15
+ border-left-width: 0px !important;
16
+ }
17
+ [class^="pb_table"].table-sm.table-card thead tr th:last-child,
18
+ [class^="pb_table"].table-sm:not(.no-hover).table-card
19
+ tbody
20
+ tr
21
+ td:last-child {
22
+ border-right-width: 0px;
23
+ }
24
+ [class^="pb_table"].table-sm.table-card tbody tr:last-child td:first-child,
25
+ [class^="pb_table"].table-sm.table-card tbody tr:last-child td:last-child {
26
+ border-radius: 0 0 0 0;
27
+ }
28
+ .table-header-cells:first-child,
29
+ td:first-child,
30
+ .pb_table_td:first-child,
31
+ .checkbox-cell.checkbox-cell-header:first-child,
32
+ .table-header-cells.sticky-left,
33
+ [class*="pinned-left"] {
34
+ background-color: $bg-main;
35
+ box-shadow: $shadow_deep !important;
36
+ position: sticky !important;
37
+ left: 0;
38
+ z-index: 2;
39
+ }
40
+
41
+ .bg-silver {
42
+ td:first-child,
43
+ .sticky-left {
44
+ background-color: $bg-secondary;
45
+ }
46
+ }
47
+ .bg-row-selection {
48
+ td:first-child,
49
+ .sticky-left {
50
+ background-color: $highlight;
51
+ }
52
+ }
53
+
54
+ .bg-white {
55
+ td:first-child,
56
+ .sticky-left {
57
+ background-color: $bg-main;
58
+ }
59
+ }
60
+
61
+ .virtualized-table-row {
62
+ &.bg-silver td:first-child {
63
+ background-color: $bg-secondary;
64
+ }
65
+ &.bg-white td:first-child {
66
+ background-color: $bg-main;
67
+ }
68
+ &.bg-row-selection td:first-child {
69
+ background-color: $highlight;
70
+ }
71
+ }
72
+
73
+ .row-selection-actions-card {
74
+ border-right-width: 0px;
75
+ border-left-width: 0px;
76
+ position: sticky;
77
+ top: 0;
78
+ left: 0;
79
+ border-radius: unset;
80
+ }
81
+
82
+ .checkbox-cell {
83
+ display: table-cell !important;
84
+ }
85
+
86
+ .sticky-header {
87
+ thead {
88
+ th:first-child {
89
+ box-shadow: 1px 0 10px -2px $border-color !important;
90
+ }
91
+ }
92
+
93
+ .pb_advanced_table_header {
94
+ box-shadow: none !important;
95
+ }
96
+ }
97
+ }
@@ -30,7 +30,7 @@
30
30
  class="gray-icon expand-toggle-icon"
31
31
  data-advanced-table="true">
32
32
  <%= pb_rails("icon", props: { id: "advanced-table_open_icon", icon: "circle-play", cursor: "pointer" }) %>
33
- <%= pb_rails("icon", props: { id: "advanced-table_close_icon", display: "none", icon: "circle-play", cursor: "pointer", rotation: 90 }) %>
33
+ <%= pb_rails("icon", props: { id: "advanced-table_close_icon", icon: "circle-play", cursor: "pointer", rotation: 90 }) %>
34
34
  </button>
35
35
  <% end %>
36
36
  <% end %>
@@ -171,7 +171,6 @@ const Background = (props: BackgroundProps): React.ReactElement => {
171
171
  >
172
172
  {children}
173
173
  </Tag>
174
-
175
174
  )
176
175
  }
177
176
 
@@ -8,11 +8,11 @@ const BackgroundOverlay = (props) => {
8
8
  return (
9
9
  <Background
10
10
  alt="colorful background"
11
+ backgroundColor="category_21"
11
12
  className="background lazyload"
12
- imageOverlay="opacity_6"
13
- imageUrl="https://images.unsplash.com/photo-1528459801416-a9e53bbf4e17?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1000&q=80"
13
+ imageOverlay="opacity_2"
14
+ imageUrl="https://unsplash.it/500/400/?image=633"
14
15
  {...props}
15
- backgroundColor="light"
16
16
  >
17
17
  <Flex
18
18
  orientation="column"
@@ -25,7 +25,6 @@ const BackgroundOverlay = (props) => {
25
25
  padding="lg"
26
26
  size={1}
27
27
  text="Background Kit Image"
28
- {...props}
29
28
  />
30
29
  </FlexItem>
31
30
  </Flex>
@@ -11,7 +11,6 @@ examples:
11
11
  - background_size: Size
12
12
 
13
13
  react:
14
- - background_overlay: Overlay
15
14
  - background_light: Light
16
15
  - background_white: White
17
16
  - background_gradient: Gradient
@@ -20,3 +19,4 @@ examples:
20
19
  - background_status_subtle: Status Subtle
21
20
  - background_category: Category
22
21
  - background_size: Size
22
+ - background_overlay: Overlay
@@ -10,7 +10,7 @@ import { highchartsDarkTheme } from "../pb_dashboard/pbChartsDarkTheme";
10
10
  import mapColors from "../pb_dashboard/pbChartsColorsHelper";
11
11
  import { globalProps } from "../utilities/globalProps";
12
12
  import { buildAriaProps, buildDataProps, buildHtmlProps } from "../utilities/props";
13
- import { merge } from '../utilities/object'
13
+ import { merge } from '../utilities/object'
14
14
 
15
15
  type CircleChartProps = {
16
16
  align?: "left" | "right" | "center";
@@ -0,0 +1,45 @@
1
+ import colors from '../tokens/exports/_colors.module.scss'
2
+ import typography from '../tokens/exports/_typography.module.scss'
3
+
4
+ const circleChartTheme = {
5
+ title: { text: "" },
6
+ chart: {
7
+ type: "pie",
8
+ },
9
+ tooltip: {
10
+ backgroundColor: {
11
+ linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
12
+ stops: [
13
+ [0, colors.bg_dark],
14
+ [1, colors.bg_dark],
15
+ ],
16
+ },
17
+ pointFormat:
18
+ '<span style="font-weight: bold; color:{point.color};">●</span>{point.name}: ' +
19
+ "<b>{point.y}</b>",
20
+ followPointer: true,
21
+ shadow: false,
22
+ borderWidth: 0,
23
+ borderRadius: 10,
24
+ style: {
25
+ fontFamily: typography.font_family_base,
26
+ color: colors.text_dk_default,
27
+ fontWeight: typography.regular,
28
+ fontSize: typography.text_smaller,
29
+ },
30
+ },
31
+ plotOptions: {
32
+ pie: {
33
+ dataLabels: {
34
+ enabled: false,
35
+ },
36
+ innerSize: '50%',
37
+ borderColor: "",
38
+ borderWidth: null as number | null,
39
+ },
40
+ },
41
+ credits: false,
42
+
43
+ }
44
+
45
+ export default circleChartTheme;