playbook_ui 14.23.0.pre.alpha.play23129273 → 14.23.0.pre.rc.0

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 (188) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +1 -0
  3. data/app/pb_kits/playbook/pb_advanced_table/Components/CustomCell.tsx +6 -7
  4. data/app/pb_kits/playbook/pb_advanced_table/Components/SortIconButton.tsx +25 -24
  5. data/app/pb_kits/playbook/pb_advanced_table/Components/SubRowHeaderRow.tsx +11 -32
  6. data/app/pb_kits/playbook/pb_advanced_table/Components/TableActionBar.tsx +10 -10
  7. data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +12 -11
  8. data/app/pb_kits/playbook/pb_advanced_table/Hooks/useTableState.ts +5 -8
  9. data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableHeader.tsx +1 -1
  10. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +1 -67
  11. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +7 -19
  12. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +1 -1
  13. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +2 -14
  14. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +0 -34
  15. data/app/pb_kits/playbook/pb_advanced_table/advanced_table_action_bar.js +0 -16
  16. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +6 -14
  17. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +0 -5
  18. data/app/pb_kits/playbook/pb_advanced_table/scss_partials/advanced_table_sticky_mixin.scss +1 -7
  19. data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +1 -3
  20. data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +1 -5
  21. data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +0 -36
  22. data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +4 -13
  23. data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +0 -2
  24. data/app/pb_kits/playbook/pb_badge/_badge.scss +6 -5
  25. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.jsx +15 -33
  26. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.jsx +72 -0
  27. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.md +6 -0
  28. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.jsx +15 -33
  29. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.jsx +22 -52
  30. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_horizontal.jsx +16 -12
  31. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend.jsx +15 -31
  32. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_non_clickable.jsx +16 -39
  33. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.jsx +38 -86
  34. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.md +1 -1
  35. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.jsx +15 -32
  36. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.jsx +64 -0
  37. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.md +1 -0
  38. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.jsx +22 -72
  39. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.md +1 -1
  40. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.jsx +15 -31
  41. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.jsx +16 -37
  42. data/app/pb_kits/playbook/pb_bar_graph/docs/_description.md +3 -1
  43. data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +3 -1
  44. data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +2 -0
  45. data/app/pb_kits/playbook/pb_body/docs/_body_truncate.jsx +3 -3
  46. data/app/pb_kits/playbook/pb_checkbox/checkbox.rb +1 -12
  47. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.html.erb +1 -1
  48. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate_rails.md +1 -2
  49. data/app/pb_kits/playbook/pb_checkbox/index.js +1 -3
  50. data/app/pb_kits/playbook/pb_circle_chart/circleChartTheme.ts +1 -36
  51. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.jsx +26 -71
  52. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.jsx +16 -29
  53. data/app/pb_kits/playbook/pb_circle_chart/docs/{_circle_chart_colors_rails.md → _circle_chart_colors.md} +1 -1
  54. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.jsx +16 -28
  55. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.md +2 -4
  56. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.jsx +15 -23
  57. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_inner_sizes.jsx +51 -81
  58. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.jsx +75 -103
  59. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.md +7 -4
  60. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_live_data.jsx +13 -19
  61. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_pb_styles.jsx +38 -0
  62. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_pb_styles.md +1 -0
  63. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.jsx +17 -30
  64. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_labels.jsx +20 -34
  65. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_legend_kit.jsx +20 -29
  66. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_title.jsx +20 -28
  67. data/app/pb_kits/playbook/pb_circle_chart/docs/example.yml +1 -0
  68. data/app/pb_kits/playbook/pb_circle_chart/docs/index.js +1 -0
  69. data/app/pb_kits/playbook/pb_draggable/context/index.tsx +4 -12
  70. data/app/pb_kits/playbook/pb_draggable/context/types.ts +2 -5
  71. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +1 -17
  72. data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +0 -6
  73. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_radio_options.jsx +0 -1
  74. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_radio_options_react.md +1 -1
  75. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +2 -3
  76. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +1 -2
  77. data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +0 -24
  78. data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownOption.tsx +1 -11
  79. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors.jsx +15 -32
  80. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex.jsx +9 -35
  81. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_default.jsx +14 -26
  82. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_disable_animation.jsx +15 -32
  83. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_full_circle.jsx +17 -45
  84. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_height.jsx +22 -59
  85. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_live_data.jsx +9 -40
  86. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.jsx +18 -50
  87. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_pb_styles.jsx +30 -0
  88. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_pb_styles.md +1 -0
  89. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.jsx +18 -31
  90. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_title.jsx +17 -34
  91. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units.jsx +23 -64
  92. data/app/pb_kits/playbook/pb_gauge/docs/example.yml +1 -0
  93. data/app/pb_kits/playbook/pb_gauge/docs/index.js +1 -0
  94. data/app/pb_kits/playbook/pb_gauge/gaugeTheme.ts +1 -7
  95. data/app/pb_kits/playbook/pb_line_graph/docs/_description.md +3 -1
  96. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors.jsx +17 -36
  97. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_default.jsx +16 -31
  98. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.jsx +31 -63
  99. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend.jsx +16 -35
  100. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_nonclickable.jsx +16 -41
  101. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.jsx +62 -107
  102. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.md +7 -4
  103. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.jsx +52 -0
  104. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.md +1 -0
  105. data/app/pb_kits/playbook/pb_line_graph/docs/example.yml +1 -0
  106. data/app/pb_kits/playbook/pb_line_graph/docs/index.js +1 -0
  107. data/app/pb_kits/playbook/pb_line_graph/lineGraphTheme.ts +1 -16
  108. data/app/pb_kits/playbook/pb_pagination/_pagination.tsx +0 -4
  109. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_default_rails.md +1 -3
  110. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_default_react.md +1 -3
  111. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +17 -30
  112. data/app/pb_kits/playbook/pb_phone_number_input/docs/example.yml +0 -2
  113. data/app/pb_kits/playbook/pb_phone_number_input/docs/index.js +0 -1
  114. data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.rb +0 -3
  115. data/app/pb_kits/playbook/pb_select/select.rb +2 -4
  116. data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.html.erb +0 -1
  117. data/app/pb_kits/playbook/pb_title/docs/_title_truncate.jsx +3 -3
  118. data/app/pb_kits/playbook/pb_tooltip/docs/example.yml +0 -1
  119. data/app/pb_kits/playbook/pb_tooltip/index.js +36 -59
  120. data/app/pb_kits/playbook/pb_tooltip/tooltip.rb +2 -9
  121. data/app/pb_kits/playbook/pb_walkthrough/_walkthrough.scss +0 -0
  122. data/app/pb_kits/playbook/pb_walkthrough/_walkthrough.tsx +202 -0
  123. data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_continuous.jsx +69 -0
  124. data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_default.jsx +71 -0
  125. data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_multi_beacon.jsx +110 -0
  126. data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_no_beacon.jsx +76 -0
  127. data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_no_overlay.jsx +76 -0
  128. data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_styled.jsx +76 -0
  129. data/app/pb_kits/playbook/pb_walkthrough/docs/example.yml +10 -0
  130. data/app/pb_kits/playbook/pb_walkthrough/docs/index.js +6 -0
  131. data/app/pb_kits/playbook/pb_walkthrough/walkthrough.test.jsx +34 -0
  132. data/dist/chunks/_typeahead-B7FRYVtS.js +22 -0
  133. data/dist/chunks/_weekday_stacked-BNSy7Mo2.js +45 -0
  134. data/dist/chunks/lib-Carqm8Ip.js +29 -0
  135. data/dist/chunks/{pb_form_validation-D3b0JKHH.js → pb_form_validation-DqRmTS8m.js} +1 -1
  136. data/dist/chunks/vendor.js +1 -1
  137. data/dist/menu.yml +15 -68
  138. data/dist/playbook-doc.js +2 -2
  139. data/dist/playbook-rails-react-bindings.js +1 -1
  140. data/dist/playbook-rails.js +1 -1
  141. data/dist/playbook.css +1 -1
  142. data/lib/playbook/version.rb +2 -2
  143. metadata +35 -49
  144. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_sort.jsx +0 -65
  145. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_sort.md +0 -5
  146. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling.html.erb +0 -46
  147. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling_rails.md +0 -7
  148. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort_per_column.jsx +0 -55
  149. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort_per_column.md +0 -6
  150. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort_per_column_for_multi_column.jsx +0 -80
  151. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort_per_column_for_multi_column.md +0 -1
  152. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header.jsx +0 -69
  153. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header.md +0 -1
  154. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_multi_header.jsx +0 -107
  155. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_multi_header.md +0 -1
  156. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_rails.html.erb +0 -51
  157. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_rails.md +0 -1
  158. data/app/pb_kits/playbook/pb_bar_graph/barGraphTheme.ts +0 -106
  159. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.md +0 -3
  160. data/app/pb_kits/playbook/pb_body/docs/_body_truncate_react.md +0 -4
  161. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors_react.md +0 -2
  162. data/app/pb_kits/playbook/pb_circle_chart/docs/_description.md +0 -1
  163. data/app/pb_kits/playbook/pb_dropdown/_dropdown_mixin.scss +0 -36
  164. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_active_style_options.jsx +0 -90
  165. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_active_style_options_react.md +0 -4
  166. data/app/pb_kits/playbook/pb_gauge/docs/_description.md +0 -1
  167. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors_react.md +0 -2
  168. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex_react.md +0 -1
  169. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units_react.md +0 -1
  170. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors_react.md +0 -3
  171. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.md +0 -3
  172. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_strict_mode.html.erb +0 -10
  173. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_strict_mode.jsx +0 -26
  174. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_strict_mode.md +0 -3
  175. data/app/pb_kits/playbook/pb_title/docs/_title_truncate_react.md +0 -4
  176. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_click_open.html.erb +0 -14
  177. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_click_open_rails.md +0 -1
  178. data/dist/chunks/_line_graph-BNbgv7cZ.js +0 -1
  179. data/dist/chunks/_typeahead-BjxzQL_-.js +0 -6
  180. data/dist/chunks/_weekday_stacked-DA1-B51Z.js +0 -37
  181. data/dist/chunks/lib-CY5ZPzic.js +0 -29
  182. /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_row_styling_react.md → _advanced_table_row_styling.md} +0 -0
  183. /data/app/pb_kits/playbook/pb_body/docs/{_body_truncate_rails.md → _body_truncate.md} +0 -0
  184. /data/app/pb_kits/playbook/pb_gauge/docs/{_gauge_colors_rails.md → _gauge_colors.md} +0 -0
  185. /data/app/pb_kits/playbook/pb_gauge/docs/{_gauge_complex_rails.md → _gauge_complex.md} +0 -0
  186. /data/app/pb_kits/playbook/pb_line_graph/docs/{_line_graph_colors_rails.md → _line_graph_colors.md} +0 -0
  187. /data/app/pb_kits/playbook/pb_title/docs/{_title_truncate_rails.md → _title_truncate.md} +0 -0
  188. /data/app/pb_kits/playbook/pb_tooltip/docs/{_tooltip_click_open_react.md → _tooltip_click_open.md} +0 -0
@@ -124,23 +124,6 @@ const columnDefinitions = [
124
124
  },
125
125
  ]
126
126
 
127
- const columnDefinitionsSort = [
128
- {
129
- accessor: "year",
130
- label: "Year",
131
- cellAccessors: ["quarter", "month", "day"],
132
- },
133
- {
134
- accessor: "newEnrollments",
135
- label: "New Enrollments",
136
- enableSort: true,
137
- },
138
- {
139
- accessor: "scheduledMeetings",
140
- label: "Scheduled Meetings",
141
- },
142
- ];
143
-
144
127
  const columnDefinitionsCustomRenderer = [
145
128
  {
146
129
  accessor: "year",
@@ -693,20 +676,3 @@ test("rowStyling prop works as expected", () => {
693
676
  const row1 = tableBody.querySelector('tr:nth-child(1)')
694
677
  expect(row1).toHaveStyle({backgroundColor: colors.white, color: colors.black})
695
678
  })
696
-
697
- test("Sort icon renders with enableSort on individual columns", () => {
698
- render(
699
- <AdvancedTable
700
- columnDefinitions={columnDefinitionsSort}
701
- data={{ testid: testId }}
702
- tableData={MOCK_DATA}
703
- />
704
- );
705
-
706
- const kit = screen.getByTestId(testId);
707
- const sortIcon = kit.querySelector(".sort-button-icon");
708
- expect(sortIcon).toBeInTheDocument();
709
- const sortButton = kit.querySelector(".header-sort-secondary-columns");
710
- expect(sortButton).toBeInTheDocument();
711
- });
712
-
@@ -1,7 +1,4 @@
1
1
  function showActionBar(actionBar, selectedCount) {
2
- // Get container
3
- const tableContainer = actionBar.closest('.pb_advanced_table');
4
-
5
2
  // Show action bar directly
6
3
  actionBar.style.height = "auto";
7
4
  actionBar.style.overflow = "visible";
@@ -11,11 +8,6 @@ function showActionBar(actionBar, selectedCount) {
11
8
  actionBar.classList.remove("p_none");
12
9
  actionBar.classList.add("p_xs", "is-visible", "show-action-card");
13
10
 
14
- // Remove hidden-action-bar class when action bar is shown
15
- if (tableContainer) {
16
- tableContainer.classList.remove("hidden-action-bar");
17
- }
18
-
19
11
  // Update the count
20
12
  const countElement = actionBar.querySelector(".selected-count");
21
13
  if (countElement) {
@@ -24,20 +16,12 @@ function showActionBar(actionBar, selectedCount) {
24
16
  }
25
17
 
26
18
  function hideActionBar(actionBar) {
27
- // Get container
28
- const tableContainer = actionBar.closest('.pb_advanced_table');
29
-
30
19
  // Hide action bar directly
31
20
  actionBar.style.height = "0px";
32
21
  actionBar.style.overflow = "hidden";
33
22
  actionBar.style.opacity = "0";
34
23
  actionBar.classList.add("p_none");
35
24
  actionBar.classList.remove("p_xs", "is-visible", "show-action-card");
36
-
37
- // Add hidden-action-bar class when action bar is hidden
38
- if (tableContainer) {
39
- tableContainer.classList.add("hidden-action-bar");
40
- }
41
25
  }
42
26
 
43
27
  export function updateSelectionActionBar(table, selectedCount) {
@@ -10,28 +10,23 @@ examples:
10
10
  - advanced_table_beta_sort: Enable Sorting
11
11
  - advanced_table_responsive: Responsive Tables
12
12
  - advanced_table_custom_cell_rails: Custom Components for Cells
13
- - advanced_table_with_custom_header_rails: Custom Header Cell
14
13
  - advanced_table_column_headers: Multi-Header Columns
15
14
  - advanced_table_column_headers_multiple: Multi-Header Columns (Multiple Levels)
15
+ - advanced_table_column_border_color_rails: Column Group Border Color
16
16
  - advanced_table_no_subrows: Table with No Subrows or Expansion
17
17
  - advanced_table_selectable_rows_rails: Selectable Rows
18
18
  - advanced_table_selectable_rows_no_subrows_rails: Selectable Rows (No Subrows)
19
19
  - advanced_table_selectable_rows_actions_rails: Selectable Rows (With Actions)
20
20
  - advanced_table_selectable_rows_header_rails: Selectable Rows (No Actions Bar)
21
21
  - advanced_table_scrollbar_none: Advanced Table Scrollbar None
22
- - advanced_table_row_styling: Row Styling
23
22
  - advanced_table_column_styling_rails: Column Styling
24
23
  - advanced_table_column_styling_column_headers_rails: Column Styling with Multiple Headers
25
- - advanced_table_column_border_color_rails: Column Group Border Color
26
-
27
24
 
28
25
  react:
29
26
  - advanced_table_default: Default (Required Props)
27
+ - advanced_table_loading: Loading State
30
28
  - advanced_table_sort: Enable Sorting
31
29
  - advanced_table_sort_control: Sort Control
32
- - advanced_table_sort_per_column: Enable Sort By Column
33
- - advanced_table_sort_per_column_for_multi_column: Enable Sort By Column (Multi-Column)
34
- - advanced_table_custom_sort: Custom Sort
35
30
  - advanced_table_expanded_control: Expanded Control
36
31
  - advanced_table_expand_by_depth: Expand by Depth
37
32
  - advanced_table_subrow_headers: SubRow Headers
@@ -42,32 +37,29 @@ examples:
42
37
  - advanced_table_table_props_sticky_header: Sticky Header for Responsive Table
43
38
  - advanced_table_sticky_columns: Sticky Columns
44
39
  - advanced_table_sticky_columns_and_header: Sticky Columns with Sticky Header
40
+ - advanced_table_inline_row_loading: Inline Row Loading
45
41
  - advanced_table_responsive: Responsive Tables
46
42
  - advanced_table_custom_cell: Custom Components for Cells
47
- - advanced_table_with_custom_header: Custom Header Cell
48
- - advanced_table_with_custom_header_multi_header: Custom Header with Multiple Headers
49
43
  - advanced_table_pagination: Pagination
50
44
  - advanced_table_pagination_with_props: Pagination Props
51
- - advanced_table_loading: Loading State
52
- - advanced_table_inline_row_loading: Inline Row Loading
53
45
  - advanced_table_column_headers: Multi-Header Columns
54
46
  - advanced_table_column_headers_multiple: Multi-Header Columns (Multiple Levels)
55
47
  - advanced_table_column_headers_custom_cell: Multi-Header Columns with Custom Cells
48
+ - advanced_table_column_border_color: Column Group Border Color
56
49
  - advanced_table_no_subrows: Table with No Subrows or Expansion
57
- - advanced_table_pinned_rows: Pinned Rows
58
50
  - advanced_table_selectable_rows: Selectable Rows
59
51
  - advanced_table_selectable_rows_no_subrows_react: Selectable Rows (No Subrows)
60
52
  - advanced_table_selectable_rows_actions: Selectable Rows (With Actions)
61
53
  - advanced_table_selectable_rows_header: Selectable Rows (No Actions Bar)
62
54
  - advanced_table_inline_editing: Inline Cell Editing
55
+ - advanced_table_fullscreen: Fullscreen
63
56
  - advanced_table_column_visibility: Column Visibility Control
64
57
  - advanced_table_column_visibility_with_state: Column Visibility Control With State
65
58
  - advanced_table_column_visibility_custom: Column Visibility Control with Custom Dropdown
66
59
  - advanced_table_column_visibility_multi: Column Visibility Control with Multi-Header Columns
60
+ - advanced_table_pinned_rows: Pinned Rows
67
61
  - advanced_table_scrollbar_none: Advanced Table Scrollbar None
68
62
  - advanced_table_row_styling: Row Styling
69
63
  - advanced_table_column_styling: Column Styling
70
64
  - advanced_table_column_styling_column_headers: Column Styling with Multiple Headers
71
- - advanced_table_column_border_color: Column Group Border Color
72
- - advanced_table_fullscreen: Fullscreen
73
65
  - advanced_table_infinite_scroll: Infinite Scroll
@@ -38,8 +38,3 @@ export { default as AdvancedTableRowStyling } from './_advanced_table_row_stylin
38
38
  export { default as AdvancedTableColumnStyling } from './_advanced_table_column_styling.jsx'
39
39
  export { default as AdvancedTableColumnStylingColumnHeaders } from './_advanced_table_column_styling_column_headers.jsx'
40
40
  export { default as AdvancedTableInfiniteScroll} from './_advanced_table_infinite_scroll.jsx'
41
- export {default as AdvancedTableWithCustomHeader} from './_advanced_table_with_custom_header.jsx'
42
- export { default as AdvancedTableCustomSort } from './_advanced_table_custom_sort.jsx'
43
- export { default as AdvancedTableWithCustomHeaderMultiHeader } from './_advanced_table_with_custom_header_multi_header.jsx'
44
- export { default as AdvancedTableSortPerColumn } from './_advanced_table_sort_per_column.jsx'
45
- export { default as AdvancedTableSortPerColumnForMultiColumn } from './_advanced_table_sort_per_column_for_multi_column.jsx'
@@ -79,14 +79,8 @@
79
79
  left: 0;
80
80
  border-radius: unset;
81
81
  z-index: 5;
82
-
83
- // Add proper border radius when action bar is visible
84
- &.is-visible,
85
- &.show-action-card {
86
- border-top-left-radius: 4px !important;
87
- border-top-right-radius: 4px !important;
88
- }
89
82
  }
83
+
90
84
  .checkbox-cell {
91
85
  display: table-cell !important;
92
86
  }
@@ -23,8 +23,6 @@ module Playbook
23
23
  default: "scroll"
24
24
  prop :selectable_rows, type: Playbook::Props::Boolean,
25
25
  default: false
26
- prop :row_styling, type: Playbook::Props::Array,
27
- default: []
28
26
 
29
27
  def flatten_columns(columns)
30
28
  columns.flat_map do |col|
@@ -68,7 +66,7 @@ module Playbook
68
66
  end
69
67
 
70
68
  # Additional class and data attributes needed for toggle logic
71
- output << pb_rails("advanced_table/table_row", props: { id: id, row: row, column_definitions: leaf_columns, depth: current_depth, collapsible_trail: collapsible_trail, classname: additional_classes, table_data_attributes: current_data_attributes, responsive: responsive, loading: loading, selectable_rows: selectable_rows, row_id: row[:id], enable_toggle_expansion: enable_toggle_expansion, row_styling: row_styling })
69
+ output << pb_rails("advanced_table/table_row", props: { id: id, row: row, column_definitions: leaf_columns, depth: current_depth, collapsible_trail: collapsible_trail, classname: additional_classes, table_data_attributes: current_data_attributes, responsive: responsive, loading: loading, selectable_rows: selectable_rows, row_id: row[:id], enable_toggle_expansion: enable_toggle_expansion })
72
70
 
73
71
  if row[:children].present?
74
72
  row[:children].each do |child_row|
@@ -26,11 +26,7 @@
26
26
  <% end %>
27
27
  <% end %>
28
28
  <% end %>
29
- <% if object.has_header_renderer?(cell) %>
30
- <%= raw(object.render_header(cell)) %>
31
- <% else %>
32
- <%= cell[:label] %>
33
- <% end %>
29
+ <%= cell[:label] %>
34
30
  <% end %>
35
31
  <% end %>
36
32
  <% end %>
@@ -76,30 +76,6 @@ module Playbook
76
76
  end
77
77
  end
78
78
 
79
- # Get original column definition for custom rendering
80
- def find_original_column_def(accessor)
81
- find_column_def_by_accessor(column_definitions, accessor)
82
- end
83
-
84
- # Check if a header cell has a custom renderer
85
- def has_header_renderer?(cell)
86
- return false unless cell[:accessor].present?
87
-
88
- original_def = find_original_column_def(cell[:accessor])
89
- original_def && original_def[:header].present?
90
- end
91
-
92
- # Render custom header content
93
- def render_header(cell)
94
- return cell[:label] unless has_header_renderer?(cell)
95
-
96
- original_def = find_original_column_def(cell[:accessor])
97
- custom_renderer = original_def[:header]
98
-
99
- # Call the custom renderer with the cell data and label
100
- custom_renderer.call(cell, cell[:label])
101
- end
102
-
103
79
  private
104
80
 
105
81
  def compute_max_depth(columns)
@@ -172,18 +148,6 @@ module Playbook
172
148
  end
173
149
  wrapped
174
150
  end
175
-
176
- def find_column_def_by_accessor(defs, target_accessor)
177
- defs.each do |col|
178
- return col if col[:accessor] == target_accessor
179
-
180
- if col[:columns].is_a?(Array)
181
- found = find_column_def_by_accessor(col[:columns], target_accessor)
182
- return found if found
183
- end
184
- end
185
- nil
186
- end
187
151
  end
188
152
  end
189
153
  end
@@ -1,10 +1,3 @@
1
- <%
2
- row_style = object.row_styling.find { |style| style[:row_id].to_s == object.row_id.to_s }
3
- button_color = row_style&.[](:expand_button_color)
4
- bg_color = row_style&.[](:background_color)
5
- font_color = row_style&.[](:font_color)
6
- %>
7
-
8
1
  <%= pb_content_tag(:tr) do %>
9
2
  <% has_separate_checkbox = object.selectable_rows && object.enable_toggle_expansion == "none" %>
10
3
  <% if has_separate_checkbox %>
@@ -12,7 +5,7 @@
12
5
  <% end %>
13
6
  <% object.column_definitions.each_with_index do |column, index| %>
14
7
  <% next unless column[:accessor].present? %>
15
- <%= pb_rails("table/table_cell", props: { html_options: { style: { "background-color": bg_color, color: font_color } }, classname:object.td_classname(column, index)}) do %>
8
+ <%= pb_rails("table/table_cell", props: { classname:object.td_classname(column, index)}) do %>
16
9
  <%= pb_rails("flex", props:{ align: "center", justify: object.justify_for(column, index), classname: object.loading ? "loading-cell" : "" }) do %>
17
10
  <% if collapsible_trail && index.zero? %>
18
11
  <% (1..depth).each do |i| %>
@@ -35,15 +28,13 @@
35
28
  <button
36
29
  id="<%= "#{object.id}_#{object.row.object_id}" %>"
37
30
  class="gray-icon expand-toggle-icon"
38
- data-advanced-table="true"
39
- style="color: <%= button_color %>"
40
- >
31
+ data-advanced-table="true">
41
32
  <%= pb_rails("icon", props: { id: "advanced-table_open_icon", icon: "circle-play", cursor: "pointer" }) %>
42
- <%= pb_rails("icon", props: { id: "advanced-table_close_icon", icon: "circle-play", cursor: "pointer", rotation: 90 }) %>
33
+ <%= pb_rails("icon", props: { id: "advanced-table_close_icon", icon: "circle-play-down", cursor: "pointer" }) %>
43
34
  </button>
44
35
  <% end %>
45
36
  <% end %>
46
- <%= pb_rails("flex/flex_item") do %>
37
+ <%= pb_rails("flex/flex_item") do %>
47
38
  <% if column[:custom_renderer].present? %>
48
39
  <%= raw(column[:custom_renderer].call(object.row, custom_renderer_value(column, index))) %>
49
40
  <% elsif index.zero? %>
@@ -27,8 +27,6 @@ module Playbook
27
27
  prop :enable_toggle_expansion, type: Playbook::Props::Enum,
28
28
  values: %w[all header none],
29
29
  default: "header"
30
- prop :row_styling, type: Playbook::Props::Array,
31
- default: []
32
30
 
33
31
  def data
34
32
  Hash(prop(:data)).merge(table_data_attributes)
@@ -5,7 +5,7 @@
5
5
  @import "../tokens/typography";
6
6
 
7
7
  [class^=pb_badge_kit] {
8
- $pb_badge_height_rounded: 16px;
8
+ $pb_badge_height: 18px;
9
9
 
10
10
  display: inline-flex;
11
11
  align-items: center;
@@ -13,6 +13,7 @@
13
13
  border-radius: $border_rad_light;
14
14
  padding: 0 $space_xs/2;
15
15
  border-width: 1px;
16
+ border-style: solid;
16
17
  border-color: $card_light;
17
18
  white-space: nowrap;
18
19
 
@@ -30,10 +31,10 @@
30
31
  }
31
32
 
32
33
  &[class*=_rounded] {
33
- height: $pb_badge_height_rounded;
34
- min-height: $pb_badge_height_rounded;
35
- min-width: $pb_badge_height_rounded;
36
- border-radius: $pb_badge_height_rounded / 2;
34
+ height: $pb_badge_height;
35
+ min-height: $pb_badge_height;
36
+ min-width: $pb_badge_height;
37
+ border-radius: $pb_badge_height / 2;
37
38
  }
38
39
 
39
40
  &[class*=_notification] {
@@ -1,10 +1,6 @@
1
1
  import React from 'react'
2
- import colors from '../../tokens/exports/_colors.module.scss'
3
- import barGraphTheme from '../barGraphTheme';
4
- import Highcharts from "highcharts";
5
- import HighchartsReact from "highcharts-react-official";
6
-
7
2
 
3
+ import BarGraph from '../_bar_graph'
8
4
 
9
5
  const chartData = [{
10
6
  name: 'Installation',
@@ -23,33 +19,19 @@ const chartData = [{
23
19
  data: [1111, 677, 3245, 500, 200],
24
20
  }]
25
21
 
26
- const chartOptions = {
27
- series: chartData,
28
- title: {
29
- text: "Bar Graph with Custom Data Colors",
30
- },
31
- xAxis: {
32
- categories: ["Jan", "Feb", "Mar", "Apr", "May"],
33
- },
34
- yAxis: {
35
- title: {
36
- text: "Number of Employees",
37
- },
38
- },
39
- colors: [colors.data_4, colors.data_5, colors.data_6, colors.data_7, colors.data_8],
40
- }
41
-
42
- const BarGraphColors = () => {
43
- const options = Highcharts.merge({}, barGraphTheme, chartOptions)
44
-
45
- return (
46
- <div>
47
- <HighchartsReact
48
- highcharts={Highcharts}
49
- options={options}
50
- />
51
- </div>
52
- )
53
- }
22
+ const BarGraphColors = (props) => (
23
+ <div>
24
+ <BarGraph
25
+ axisTitle="Number of Employees"
26
+ chartData={chartData}
27
+ colors={['data-4', 'data-5', 'data-6', 'data-7', 'data-8']}
28
+ id="bar-colors"
29
+ title="Bar Graph with Custom Data Colors"
30
+ xAxisCategories={['Jan', 'Feb', 'Mar', 'Apr', 'May']}
31
+ yAxisMin={0}
32
+ {...props}
33
+ />
34
+ </div>
35
+ )
54
36
 
55
37
  export default BarGraphColors
@@ -0,0 +1,72 @@
1
+ import React from 'react'
2
+ import ReactDOMServer from 'react-dom/server'
3
+ import BarGraph from '../_bar_graph'
4
+ import Icon from '../../pb_icon/_icon'
5
+
6
+ const chartData = [
7
+ {
8
+ name: 'Role',
9
+ data: [0, 200, 300, 654, 656],
10
+ },
11
+ {
12
+ name: 'Company',
13
+ data: [150, 524, 320, 440, 500],
14
+ },
15
+ ]
16
+
17
+ const renderIcon = (iconName, color) => {
18
+ return ReactDOMServer.renderToStaticMarkup(
19
+ <Icon
20
+ color={color}
21
+ icon={iconName}
22
+ />)
23
+ };
24
+
25
+ const barGraphOptions = {
26
+ yAxis: {
27
+ tickInterval: 5,
28
+ },
29
+ xAxis: {
30
+ categories: ['1', '2', '3', '4', '5'],
31
+ labels: {
32
+ useHTML: true,
33
+ formatter: function () {
34
+ switch (this.value) {
35
+ case '1':
36
+ return `${renderIcon('frown', 'error')}`;
37
+ case '2':
38
+ return `${renderIcon('frown', 'warning')}`;
39
+ case '3':
40
+ return `${renderIcon('frown-open', 'neutral')}`;
41
+ case '4':
42
+ return `${renderIcon('smile', 'category_7')}`;
43
+ case '5':
44
+ return `${renderIcon('smile-beam', 'success')}`;
45
+ default:
46
+ return ''
47
+ }
48
+ },
49
+ style: {
50
+ fontSize: '1.4em',
51
+ },
52
+ y: 42,
53
+ },
54
+ },
55
+ legend: {
56
+ itemMarginTop: 62,
57
+ },
58
+ }
59
+
60
+ const BarGraphCustom = () => (
61
+ <div>
62
+ <BarGraph
63
+ chartData={chartData}
64
+ customOptions={barGraphOptions}
65
+ id="happiness-dashboard"
66
+ legend
67
+ title="Bar Graph with Custom Overrides"
68
+ />
69
+ </div>
70
+ )
71
+
72
+ export default BarGraphCustom
@@ -0,0 +1,6 @@
1
+ The `customOptions` prop provides comprehensive access to additional [Highcharts options](https://api.highcharts.com/highcharts/) that are not explicitly defined as props.
2
+ It's important to note that certain options may require specific script imports to function properly.
3
+
4
+ Note: If you are having trouble getting any Highcharts options to work, please match the formatting of our [staticOptions](https://github.com/powerhome/playbook/blob/master/playbook/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx#L85-L141). For example, `yAxis` will need to be wrapped with square brackets.
5
+
6
+ You may also need to override any of the [defaults](https://github.com/powerhome/playbook/blob/master/playbook/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx#L45-L73) in order to get that options to work.
@@ -1,8 +1,6 @@
1
1
  import React from 'react'
2
- import barGraphTheme from '../barGraphTheme';
3
- import Highcharts from "highcharts";
4
- import HighchartsReact from "highcharts-react-official";
5
2
 
3
+ import BarGraph from '../_bar_graph'
6
4
 
7
5
  const chartData = [{
8
6
  name: 'Installation',
@@ -21,35 +19,19 @@ const chartData = [{
21
19
  data: [1111, 677, 3245, 500, 200],
22
20
  }]
23
21
 
24
- const chartOptions = {
25
- series: chartData,
26
- title: {
27
- text: 'Solar Employment Growth by Sector, 2010-2016',
28
- },
29
- subtitle: {
30
- text: 'Source: thesolarfoundation.com',
31
- },
32
- xAxis: {
33
- categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May'],
34
- },
35
- yAxis: {
36
- title: {
37
- text: 'Number of Employees',
38
- },
39
- },
40
- }
41
-
42
- const BarGraphDefault = () => {
43
- const options = Highcharts.merge({}, barGraphTheme, chartOptions)
44
-
45
- return (
46
- <div>
47
- <HighchartsReact
48
- highcharts={Highcharts}
49
- options={options}
50
- />
51
- </div>
52
- )
53
- }
22
+ const BarGraphDefault = (props) => (
23
+ <div>
24
+ <BarGraph
25
+ axisTitle="Number of Employees"
26
+ chartData={chartData}
27
+ id="bar-default"
28
+ subTitle="Source: thesolarfoundation.com"
29
+ title="Solar Employment Growth by Sector, 2010-2016"
30
+ xAxisCategories={['Jan', 'Feb', 'Mar', 'Apr', 'May']}
31
+ yAxisMin={0}
32
+ {...props}
33
+ />
34
+ </div>
35
+ )
54
36
 
55
37
  export default BarGraphDefault
@@ -1,69 +1,39 @@
1
1
  import React from 'react'
2
- import barGraphTheme from '../barGraphTheme';
3
- import Highcharts from "highcharts";
4
- import HighchartsReact from "highcharts-react-official";
5
2
 
3
+ import BarGraph from '../_bar_graph'
6
4
 
7
5
  const chartData = [{
8
6
  name: 'Number of Installations',
9
7
  data: [1475, 200, 3000, 654, 656],
10
8
  }]
11
9
 
12
- const pixelHeightChartOptions = {
13
- chart: {
14
- height: "300"
15
- },
16
- series: chartData,
17
- title: {
18
- text: "Fixed Height (300px)",
19
- },
20
- xAxis: {
21
- categories: ["Jan", "Feb", "Mar", "Apr", "May"],
22
- },
23
- yAxis: {
24
- title: {
25
- text: "Number of Employees",
26
- },
27
- },
28
- };
29
-
30
- const percentageHeightChartOptions = {
31
- chart: {
32
- height: "50%"
33
- },
34
- series: chartData,
35
- title: {
36
- text: "Percentage Height (50%)",
37
- },
38
- xAxis: {
39
- categories: ["Jan", "Feb", "Mar", "Apr", "May"],
40
- },
41
- yAxis: {
42
- title: {
43
- text: "Number of Employees",
44
- },
45
- },
46
- };
47
-
48
- const pixelOptions = Highcharts.merge({}, barGraphTheme, pixelHeightChartOptions)
49
-
50
- const percentageOptions = Highcharts.merge({}, barGraphTheme, percentageHeightChartOptions)
51
-
52
- const BarGraphHeight = () => (
10
+ const BarGraphDefault = (props) => (
53
11
  <div>
54
- <HighchartsReact
55
- highcharts={Highcharts}
56
- options={pixelOptions}
57
- />
12
+ <BarGraph
13
+ axisTitle="Number of Employees"
14
+ chartData={chartData}
15
+ height="300"
16
+ id="bar-fixed-height"
17
+ title="Fixed Height (300px)"
18
+ xAxisCategories={['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']}
19
+ yAxisMin={0}
20
+ {...props}
21
+ />
58
22
 
59
23
  <br />
60
24
  <br />
61
25
 
62
- <HighchartsReact
63
- highcharts={Highcharts}
64
- options={percentageOptions}
26
+ <BarGraph
27
+ axisTitle="Number of Employees"
28
+ chartData={chartData}
29
+ height="50%"
30
+ id="bar-percentage-height"
31
+ title="Percentage Height (50%)"
32
+ xAxisCategories={['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']}
33
+ yAxisMin={0}
34
+ {...props}
65
35
  />
66
36
  </div>
67
37
  )
68
38
 
69
- export default BarGraphHeight
39
+ export default BarGraphDefault