playbook_ui 14.17.0.pre.rc.1 → 14.18.0.pre.alpha.PLAY2037selectinlinecareterror7490

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 (269) 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/Utilities/types.ts +1 -1
  7. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +429 -137
  8. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +97 -3
  9. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +6 -1
  10. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +20 -7
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color.jsx +80 -0
  12. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color.md +3 -0
  13. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color_rails.html.erb +58 -0
  14. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color_rails.md +3 -0
  15. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expand_by_depth.jsx +66 -0
  16. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expand_by_depth.md +10 -0
  17. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.jsx +90 -0
  18. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_fullscreen.md +3 -0
  19. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns.jsx +58 -0
  20. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns.md +6 -0
  21. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns_and_header.jsx +64 -0
  22. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns_and_header.md +8 -0
  23. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header.jsx +55 -0
  24. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header.md +3 -0
  25. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header_rails.html.erb +33 -0
  26. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header_rails.md +3 -0
  27. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.html.erb +1 -1
  28. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx +1 -2
  29. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_rails.md +2 -2
  30. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_react.md +1 -1
  31. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md +6 -2
  32. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md +6 -2
  33. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +11 -4
  34. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +7 -1
  35. data/app/pb_kits/playbook/pb_advanced_table/index.js +7 -0
  36. data/app/pb_kits/playbook/pb_advanced_table/scss_partials/advanced_table_sticky_mixin.scss +97 -0
  37. data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +1 -1
  38. data/app/pb_kits/playbook/pb_background/_background.scss +26 -0
  39. data/app/pb_kits/playbook/pb_background/_background.tsx +5 -3
  40. data/app/pb_kits/playbook/pb_background/background.test.js +5 -0
  41. data/app/pb_kits/playbook/pb_background/docs/_background_overlay.jsx +35 -0
  42. data/app/pb_kits/playbook/pb_background/docs/_background_overlay.md +1 -0
  43. data/app/pb_kits/playbook/pb_background/docs/example.yml +1 -0
  44. data/app/pb_kits/playbook/pb_background/docs/index.js +1 -0
  45. data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx +1 -1
  46. data/app/pb_kits/playbook/pb_circle_chart/circleChart.test.js +2 -2
  47. data/app/pb_kits/playbook/pb_circle_chart/circleChartTheme.ts +53 -0
  48. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.html.erb +2 -2
  49. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.jsx +1 -1
  50. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.html.erb +1 -1
  51. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.jsx +1 -1
  52. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.html.erb +1 -1
  53. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.jsx +1 -1
  54. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.html.erb +1 -1
  55. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.jsx +1 -1
  56. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.html.erb +1 -1
  57. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.jsx +1 -1
  58. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_live_data.jsx +2 -2
  59. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_pb_styles.jsx +38 -0
  60. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_pb_styles.md +1 -0
  61. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.html.erb +1 -1
  62. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.jsx +1 -1
  63. data/app/pb_kits/playbook/pb_circle_chart/docs/example.yml +2 -3
  64. data/app/pb_kits/playbook/pb_circle_chart/docs/index.js +2 -1
  65. data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.scss +39 -1
  66. data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.tsx +4 -0
  67. data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.rb +9 -1
  68. data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.test.js +14 -0
  69. data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_size.html.erb +28 -0
  70. data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_size.jsx +42 -0
  71. data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_size.md +1 -0
  72. data/app/pb_kits/playbook/pb_circle_icon_button/docs/example.yml +2 -0
  73. data/app/pb_kits/playbook/pb_circle_icon_button/docs/index.js +1 -0
  74. data/app/pb_kits/playbook/pb_collapsible/__snapshots__/collapsible.test.js.snap +14 -7
  75. data/app/pb_kits/playbook/pb_contact/contact.test.js +7 -7
  76. data/app/pb_kits/playbook/pb_copy_button/_copy_button.tsx +19 -45
  77. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_hook.jsx +54 -0
  78. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_hook.md +3 -0
  79. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_hook_rails.html.erb +14 -0
  80. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_hook_rails.md +3 -0
  81. data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +2 -0
  82. data/app/pb_kits/playbook/pb_copy_button/docs/index.js +2 -1
  83. data/app/pb_kits/playbook/pb_copy_button/index.js +46 -20
  84. data/app/pb_kits/playbook/pb_copy_button/usePBCopy.ts +45 -0
  85. data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +12 -0
  86. data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +12 -0
  87. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +50 -1
  88. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_error.html.erb +2 -2
  89. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_error.jsx +4 -1
  90. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_rails.md +4 -0
  91. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_range_limit.md +1 -1
  92. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_react.md +5 -1
  93. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern.jsx +34 -0
  94. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern.md +14 -0
  95. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern_rails.html.erb +20 -0
  96. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern_rails.md +14 -0
  97. data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +2 -0
  98. data/app/pb_kits/playbook/pb_date_picker/docs/index.js +1 -0
  99. data/app/pb_kits/playbook/pb_date_picker/plugins/quickPick.tsx +10 -0
  100. data/app/pb_kits/playbook/pb_date_range_inline/date_range_inline.test.js +2 -2
  101. data/app/pb_kits/playbook/pb_date_range_stacked/date_range_stacked.test.js +1 -1
  102. data/app/pb_kits/playbook/pb_dialog/dialog.html.erb +10 -1
  103. data/app/pb_kits/playbook/pb_dialog/dialog.rb +2 -0
  104. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_turbo_frames.html.erb +117 -0
  105. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_turbo_frames_rails.md +9 -0
  106. data/app/pb_kits/playbook/pb_dialog/docs/example.yml +1 -0
  107. data/app/pb_kits/playbook/pb_dialog/index.js +106 -14
  108. data/app/pb_kits/playbook/pb_draggable/_draggable.scss +43 -20
  109. data/app/pb_kits/playbook/pb_draggable/context/index.tsx +58 -17
  110. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.html.erb +43 -0
  111. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.jsx +102 -105
  112. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.html.erb +55 -0
  113. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.jsx +50 -48
  114. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors_rails.md +1 -0
  115. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors_react.md +1 -0
  116. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.jsx +110 -0
  117. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.md +5 -0
  118. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_react.md +5 -0
  119. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_event_listeners.html.erb +42 -0
  120. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_event_listeners.md +1 -0
  121. data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_table_react.jsx → _draggable_with_table.jsx} +1 -1
  122. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.md +3 -1
  123. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +12 -7
  124. data/app/pb_kits/playbook/pb_draggable/docs/index.js +4 -1
  125. data/app/pb_kits/playbook/pb_draggable/draggable.rb +9 -1
  126. data/app/pb_kits/playbook/pb_draggable/draggable.test.jsx +71 -3
  127. data/app/pb_kits/playbook/pb_draggable/index.js +139 -142
  128. data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableContainer.tsx +4 -3
  129. data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +1 -1
  130. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.html.erb +5 -2
  131. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.jsx +4 -1
  132. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.jsx +6 -6
  133. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_and_custom_display.jsx +6 -6
  134. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx +6 -6
  135. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +8 -8
  136. data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +3 -3
  137. data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownOption.tsx +1 -1
  138. data/app/pb_kits/playbook/pb_filter/docs/_filter_within_turbo_frames.html.erb +41 -0
  139. data/app/pb_kits/playbook/pb_filter/docs/_filter_within_turbo_frames.md +1 -0
  140. data/app/pb_kits/playbook/pb_filter/docs/example.yml +1 -0
  141. data/app/pb_kits/playbook/pb_form_group/_error_state_mixin.scss +22 -18
  142. data/app/pb_kits/playbook/pb_form_group/_form_group.scss +45 -3
  143. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.html.erb +15 -5
  144. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.jsx +39 -6
  145. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_pb_styles.jsx +30 -0
  146. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_pb_styles.md +1 -0
  147. data/app/pb_kits/playbook/pb_gauge/docs/example.yml +1 -0
  148. data/app/pb_kits/playbook/pb_gauge/docs/index.js +1 -0
  149. data/app/pb_kits/playbook/pb_gauge/gaugeTheme.ts +85 -0
  150. data/app/pb_kits/playbook/pb_icon/icon.test.js +9 -9
  151. data/app/pb_kits/playbook/pb_icon_circle/icon_circle.test.js +1 -1
  152. data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.test.js +1 -1
  153. data/app/pb_kits/playbook/pb_icon_value/icon_value.test.js +1 -1
  154. data/app/pb_kits/playbook/pb_label_value/label_value.test.js +1 -1
  155. data/app/pb_kits/playbook/pb_layout/_layout.scss +127 -0
  156. data/app/pb_kits/playbook/pb_layout/_layout.tsx +47 -7
  157. data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.jsx +394 -0
  158. data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.md +5 -0
  159. data/app/pb_kits/playbook/pb_layout/docs/example.yml +1 -0
  160. data/app/pb_kits/playbook/pb_layout/docs/index.js +1 -0
  161. data/app/pb_kits/playbook/pb_layout/layout.test.js +4 -0
  162. data/app/pb_kits/playbook/pb_layout/subcomponents/_game.tsx +121 -0
  163. data/app/pb_kits/playbook/pb_layout/subcomponents/_participant.tsx +79 -0
  164. data/app/pb_kits/playbook/pb_layout/subcomponents/_round.tsx +74 -0
  165. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.jsx +52 -0
  166. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.md +1 -0
  167. data/app/pb_kits/playbook/pb_line_graph/docs/example.yml +1 -0
  168. data/app/pb_kits/playbook/pb_line_graph/docs/index.js +1 -0
  169. data/app/pb_kits/playbook/pb_line_graph/lineGraphTheme.ts +110 -0
  170. data/app/pb_kits/playbook/pb_link/link.test.jsx +2 -2
  171. data/app/pb_kits/playbook/pb_nav/_nav_item.test.js +5 -3
  172. data/app/pb_kits/playbook/pb_overlay/_overlay.scss +83 -22
  173. data/app/pb_kits/playbook/pb_overlay/_overlay.tsx +39 -7
  174. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_color.jsx +63 -0
  175. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_color.md +3 -0
  176. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md +1 -7
  177. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_fullscreen_background.jsx +49 -0
  178. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_fullscreen_background.md +1 -0
  179. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_fullscreen_opacity.jsx +81 -0
  180. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_fullscreen_opacity.md +1 -0
  181. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.jsx +39 -0
  182. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.md +1 -0
  183. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.jsx +40 -0
  184. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.md +5 -0
  185. data/app/pb_kits/playbook/pb_overlay/docs/example.yml +5 -0
  186. data/app/pb_kits/playbook/pb_overlay/docs/index.js +5 -0
  187. data/app/pb_kits/playbook/pb_overlay/overlay.test.jsx +39 -1
  188. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +13 -0
  189. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +3 -1
  190. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_country_search.html.erb +10 -0
  191. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_country_search.jsx +20 -0
  192. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_country_search.md +1 -0
  193. data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.jsx +8 -1
  194. data/app/pb_kits/playbook/pb_phone_number_input/docs/example.yml +2 -0
  195. data/app/pb_kits/playbook/pb_phone_number_input/docs/index.js +1 -0
  196. data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.rb +3 -0
  197. data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.test.js +19 -0
  198. data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.html.erb +46 -0
  199. data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.md +1 -0
  200. data/app/pb_kits/playbook/pb_popover/docs/example.yml +1 -0
  201. data/app/pb_kits/playbook/pb_popover/index.ts +13 -1
  202. data/app/pb_kits/playbook/pb_popover/popover.rb +2 -0
  203. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_vertical.md +1 -0
  204. data/app/pb_kits/playbook/pb_select/_select.scss +10 -0
  205. data/app/pb_kits/playbook/pb_select/docs/_select_error.html.erb +1 -1
  206. data/app/pb_kits/playbook/pb_select/docs/_select_error.jsx +7 -2
  207. data/app/pb_kits/playbook/pb_stat_change/stat_change.test.js +8 -4
  208. data/app/pb_kits/playbook/pb_table/_table.tsx +2 -2
  209. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows.md +3 -1
  210. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows_rails.md +3 -1
  211. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table.md +3 -1
  212. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table_rails.md +3 -1
  213. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless.html.erb +34 -0
  214. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless_rails.md +1 -0
  215. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating.html.erb +36 -0
  216. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_rails.md +1 -0
  217. data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_react.md +1 -1
  218. data/app/pb_kits/playbook/pb_table/docs/example.yml +2 -0
  219. data/app/pb_kits/playbook/pb_table/styles/_collapsible.scss +1 -1
  220. data/app/pb_kits/playbook/pb_table/styles/_headers.scss +19 -7
  221. data/app/pb_kits/playbook/pb_table/styles/_striped.scss +3 -3
  222. data/app/pb_kits/playbook/pb_table/table.rb +13 -1
  223. data/app/pb_kits/playbook/pb_table/table_header.rb +13 -1
  224. data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +13 -5
  225. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_error.html.erb +1 -1
  226. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_error.jsx +9 -1
  227. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_sanitize.jsx +94 -0
  228. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_sanitize.md +1 -0
  229. data/app/pb_kits/playbook/pb_text_input/docs/example.yml +2 -0
  230. data/app/pb_kits/playbook/pb_text_input/docs/index.js +1 -0
  231. data/app/pb_kits/playbook/pb_text_input/inputMask.ts +8 -1
  232. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_error.html.erb +5 -1
  233. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_error.jsx +7 -1
  234. data/app/pb_kits/playbook/pb_tooltip/tooltip.html.erb +2 -5
  235. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_error_state.html.erb +8 -1
  236. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_error_state.jsx +6 -2
  237. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +4 -4
  238. data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +2 -5
  239. data/app/pb_kits/playbook/pb_user/user.html.erb +1 -6
  240. data/app/pb_kits/playbook/pb_user_badge/user_badge.html.erb +1 -6
  241. data/dist/chunks/_typeahead-D8CsVBZO.js +22 -0
  242. data/dist/chunks/_weekday_stacked-D3oLTSkH.js +45 -0
  243. data/dist/chunks/lib-BmTAc7Nc.js +29 -0
  244. data/dist/chunks/{pb_form_validation-BvNy9Bd6.js → pb_form_validation-BWjy4bFn.js} +1 -1
  245. data/dist/chunks/vendor.js +1 -1
  246. data/dist/menu.yml +2 -2
  247. data/dist/playbook-doc.js +19 -1
  248. data/dist/playbook-rails-react-bindings.js +1 -1
  249. data/dist/playbook-rails.js +1 -1
  250. data/dist/playbook.css +1 -1
  251. data/lib/playbook/kit_base.rb +4 -4
  252. data/lib/playbook/version.rb +2 -2
  253. metadata +98 -20
  254. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.md +0 -5
  255. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.md +0 -1
  256. data/dist/chunks/_typeahead-Djo6qCne.js +0 -22
  257. data/dist/chunks/_weekday_stacked-DIIHW0OV.js +0 -45
  258. data/dist/chunks/lib-BGzBzFZX.js +0 -29
  259. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_default_rails.html.erb → _draggable_default.html.erb} +0 -0
  260. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_default.md → _draggable_default_react.md} +0 -0
  261. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_multiple_containers_rails.html.erb → _draggable_multiple_containers.html.erb} +0 -0
  262. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_multiple_containers.md → _draggable_multiple_containers_react.md} +0 -0
  263. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_cards_rails.html.erb → _draggable_with_cards.html.erb} +0 -0
  264. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_cards.md → _draggable_with_cards_react.md} +0 -0
  265. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_list_rails.html.erb → _draggable_with_list.html.erb} +0 -0
  266. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_list.md → _draggable_with_list_react.md} +0 -0
  267. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_selectable_list_rails.html.erb → _draggable_with_selectable_list.html.erb} +0 -0
  268. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_selectable_list.md → _draggable_with_selectable_list_react.md} +0 -0
  269. /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_with_table.md → _draggable_with_table_rails.md} +0 -0
@@ -1,4 +1,4 @@
1
- import React, { useRef, useEffect } from "react";
1
+ import React, { useRef, useEffect, useState, useCallback } from "react";
2
2
  import classnames from "classnames";
3
3
 
4
4
  import { GenericObject } from "../types";
@@ -19,16 +19,28 @@ import TableActionBar from "./Components/TableActionBar";
19
19
  import { useTableState } from "./Hooks/useTableState";
20
20
  import { useTableActions } from "./Hooks/useTableActions";
21
21
 
22
+ import Card from "../pb_card/_card"
23
+ import Flex from "../pb_flex/_flex"
24
+ import Icon from "../pb_icon/_icon"
25
+
26
+ type FullscreenControls = {
27
+ toggleFullscreen: () => void;
28
+ isFullscreen: boolean;
29
+ };
30
+
22
31
  type AdvancedTableProps = {
23
32
  aria?: { [key: string]: string }
24
33
  actions?: React.ReactNode[] | React.ReactNode
25
34
  children?: React.ReactNode | React.ReactNode[]
26
35
  className?: string
27
36
  columnDefinitions: GenericObject[]
37
+ columnGroupBorderColor?: "text_lt_default" | "text_lt_light" | "text_lt_lighter" | "text_dk_default" | "text_dk_light" | "text_dk_lighter"
28
38
  dark?: boolean
29
39
  data?: { [key: string]: string }
30
40
  enableToggleExpansion?: "all" | "header" | "none"
31
41
  expandedControl?: GenericObject
42
+ expandByDepth?: { [key: string]: string | number }
43
+ onExpandByDepthClick?: (arg: number, arg1: any) => void
32
44
  htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
33
45
  id?: string
34
46
  initialLoadingRowsCount?: number
@@ -49,6 +61,8 @@ type AdvancedTableProps = {
49
61
  toggleExpansionIcon?: string | string[]
50
62
  onRowSelectionChange?: (arg: RowSelectionState) => void
51
63
  virtualizedRows?: boolean
64
+ allowFullScreen?: boolean
65
+ fullScreenControl?: (controls: FullscreenControls) => void
52
66
  } & GlobalProps;
53
67
 
54
68
  const AdvancedTable = (props: AdvancedTableProps) => {
@@ -58,10 +72,13 @@ const AdvancedTable = (props: AdvancedTableProps) => {
58
72
  children,
59
73
  className,
60
74
  columnDefinitions,
75
+ columnGroupBorderColor,
61
76
  dark = false,
62
77
  data = {},
63
78
  enableToggleExpansion = "header",
64
79
  expandedControl,
80
+ expandByDepth,
81
+ onExpandByDepthClick,
65
82
  htmlOptions = {},
66
83
  id,
67
84
  initialLoadingRowsCount = 10,
@@ -76,12 +93,15 @@ const AdvancedTable = (props: AdvancedTableProps) => {
76
93
  showActionsBar = true,
77
94
  selectableRows,
78
95
  sortControl,
96
+ stickyLeftColumn,
79
97
  tableData,
80
98
  tableOptions,
81
99
  tableProps,
82
100
  toggleExpansionIcon = "arrows-from-line",
83
101
  onRowSelectionChange,
84
102
  virtualizedRows = false,
103
+ allowFullScreen = false,
104
+ fullScreenControl,
85
105
  } = props;
86
106
 
87
107
  // Component refs
@@ -146,6 +166,68 @@ const AdvancedTable = (props: AdvancedTableProps) => {
146
166
  );
147
167
  }, [fetchMoreOnBottomReached, fetchNextPage, isFetching, totalFetched, fullData.length]);
148
168
 
169
+ // Fullscreen
170
+ const [isFullscreen, setIsFullscreen] = useState(false)
171
+
172
+ const toggleFullscreen = useCallback(() => {
173
+ setIsFullscreen(prevState => !prevState)
174
+ }, [])
175
+
176
+ useEffect(() => {
177
+ if (allowFullScreen && fullScreenControl) {
178
+ fullScreenControl({
179
+ toggleFullscreen,
180
+ isFullscreen
181
+ })
182
+ }
183
+ }, [allowFullScreen, fullScreenControl, toggleFullscreen, isFullscreen])
184
+
185
+ const renderFullscreenHeader = () => {
186
+ if (!isFullscreen) return null
187
+
188
+ const defaultMinimizeIcon = (
189
+ <button
190
+ className="gray-icon fullscreen-icon"
191
+ onClick={toggleFullscreen}
192
+ >
193
+ <Icon
194
+ cursor="pointer"
195
+ fixedWidth
196
+ icon="arrow-down-left-and-arrow-up-right-to-center"
197
+ {...props}
198
+ />
199
+ </button>
200
+ )
201
+
202
+ return (
203
+ <Card
204
+ borderNone
205
+ borderRadius="none"
206
+ className="advanced-table-fullscreen-header"
207
+ {...props}
208
+ >
209
+ <Flex justify="end">
210
+ {defaultMinimizeIcon}
211
+ </Flex>
212
+ </Card>
213
+ )
214
+ }
215
+
216
+ useEffect(() => {
217
+ if (!allowFullScreen) return
218
+
219
+ const handleKeyDown = (event: KeyboardEvent) => {
220
+ if (event.key === 'Escape' && isFullscreen) {
221
+ event.preventDefault()
222
+ toggleFullscreen()
223
+ }
224
+ }
225
+ document.addEventListener('keydown', handleKeyDown)
226
+ return () => {
227
+ document.removeEventListener('keydown', handleKeyDown)
228
+ }
229
+ }, [allowFullScreen, toggleFullscreen, isFullscreen])
230
+
149
231
  // Build CSS classes and props
150
232
  const ariaProps = buildAriaProps(aria);
151
233
  const dataProps = buildDataProps(data);
@@ -154,6 +236,12 @@ const AdvancedTable = (props: AdvancedTableProps) => {
154
236
  buildCss("pb_advanced_table"),
155
237
  `advanced-table-responsive-${responsive}`,
156
238
  maxHeight ? `advanced-table-max-height-${maxHeight}` : '',
239
+ {
240
+ 'advanced-table-fullscreen': isFullscreen,
241
+ 'advanced-table-allow-fullscreen': allowFullScreen
242
+ },
243
+ {'advanced-table-sticky-left-columns': stickyLeftColumn && stickyLeftColumn.length > 0},
244
+ columnGroupBorderColor ? `column-group-border-${columnGroupBorderColor}` : '',
157
245
  globalProps(props),
158
246
  className
159
247
  );
@@ -194,22 +282,28 @@ const AdvancedTable = (props: AdvancedTableProps) => {
194
282
  ref={tableWrapperRef}
195
283
  style={tableWrapperStyle as React.CSSProperties}
196
284
  >
285
+ {renderFullscreenHeader()}
197
286
  <AdvancedTableProvider
198
287
  columnDefinitions={columnDefinitions}
288
+ columnGroupBorderColor={columnGroupBorderColor}
199
289
  enableToggleExpansion={enableToggleExpansion}
200
290
  enableVirtualization={virtualizedRows}
291
+ expandByDepth={expandByDepth}
201
292
  expanded={expanded}
202
293
  expandedControl={expandedControl}
203
294
  handleExpandOrCollapse={handleExpandOrCollapse}
204
295
  hasAnySubRows={hasAnySubRows}
205
296
  inlineRowLoading={inlineRowLoading}
206
297
  isActionBarVisible={isActionBarVisible}
298
+ isFullscreen={isFullscreen}
207
299
  loading={loading}
300
+ onExpandByDepthClick={onExpandByDepthClick}
208
301
  responsive={responsive}
209
302
  selectableRows={selectableRows}
210
303
  setExpanded={setExpanded}
211
304
  showActionsBar={showActionsBar}
212
305
  sortControl={sortControl}
306
+ stickyLeftColumn={stickyLeftColumn}
213
307
  subRowHeaders={tableOptions?.subRowHeaders}
214
308
  table={table}
215
309
  tableContainerRef={tableWrapperRef}
@@ -244,9 +338,9 @@ const AdvancedTable = (props: AdvancedTableProps) => {
244
338
  </Table>
245
339
  </React.Fragment>
246
340
  </AdvancedTableProvider>
247
-
341
+
248
342
  </div>
249
- {/* Bottom Pagination */}
343
+ {/* Bottom Pagination */}
250
344
  {pagination && (
251
345
  <TablePagination
252
346
  onChange={onPageChange}
@@ -7,6 +7,9 @@ module Playbook
7
7
  default: []
8
8
  prop :column_definitions, type: Playbook::Props::Array,
9
9
  default: []
10
+ prop :column_group_border_color, type: Playbook::Props::Enum,
11
+ values: %w[text_lt_default text_lt_light text_lt_lighter text_dk_default text_dk_light text_dk_lighter none],
12
+ default: "none"
10
13
  prop :enable_toggle_expansion, type: Playbook::Props::Enum,
11
14
  values: %w[all header none],
12
15
  default: "header"
@@ -24,7 +27,9 @@ module Playbook
24
27
  default: false
25
28
 
26
29
  def classname
27
- generate_classname("pb_advanced_table", responsive_classname, max_height_classname, separator: " ")
30
+ additional_classes = [responsive_classname, max_height_classname]
31
+ additional_classes << "column-group-border-#{column_group_border_color}" if column_group_border_color != "none"
32
+ generate_classname("pb_advanced_table", *additional_classes, separator: " ")
28
33
  end
29
34
 
30
35
  def responsive_classname
@@ -149,7 +149,7 @@ return (
149
149
  data={{testid: testId}}
150
150
  sortControl={sortControl}
151
151
  tableData={MOCK_DATA}
152
- >
152
+ >
153
153
  <AdvancedTable.Header enableSorting />
154
154
  <AdvancedTable.Body />
155
155
  </AdvancedTable>
@@ -338,8 +338,8 @@ test("enableExpansionIcon changes icon", () => {
338
338
 
339
339
  const kit = screen.getByTestId(testId)
340
340
  const tableHead = kit.querySelector('table')
341
- const toggleIcon= tableHead.querySelector(".pb_icon_kit")
342
- expect(toggleIcon).toHaveClass("fa-chevron-up")
341
+ const toggleIcon = tableHead.querySelector(".pb_custom_icon")
342
+ expect(toggleIcon).toBeInTheDocument()
343
343
  })
344
344
 
345
345
  test("sortIcon changes icon", () => {
@@ -360,8 +360,8 @@ test("sortIcon changes icon", () => {
360
360
 
361
361
  const kit = screen.getByTestId(testId)
362
362
  const sortIcon = kit.querySelector('.sort-button-icon')
363
- const icon= sortIcon.querySelector(".pb_icon_kit")
364
- expect(icon).toHaveClass("fa-chevron-down")
363
+ const icon = sortIcon.querySelector(".pb_custom_icon")
364
+ expect(icon).toBeInTheDocument()
365
365
  })
366
366
 
367
367
  test("Sort icon renders with enableSorting + sortControl works as expected", () => {
@@ -452,7 +452,7 @@ test("inlineRowLoading prop renders inline loading if true", () => {
452
452
  const rowButton = kit.querySelector(".gray-icon.expand-toggle-icon")
453
453
  expect(rowButton).toBeInTheDocument()
454
454
  rowButton.click()
455
- const inlineLoading = kit.querySelector(".fa-spinner")
455
+ const inlineLoading = kit.querySelector(".pb_custom_icon")
456
456
  expect(inlineLoading).toBeInTheDocument()
457
457
  })
458
458
 
@@ -498,4 +498,17 @@ test("customRenderer prop functions as expected", () => {
498
498
  const kit = screen.getByTestId(testId)
499
499
  const pill = kit.querySelector(".pb_pill_kit_success_lowercase")
500
500
  expect(pill).toBeInTheDocument()
501
- })
501
+ })
502
+
503
+ test("allowFullScreen prop adds fullscreen class", () => {
504
+ render(
505
+ <AdvancedTable
506
+ allowFullScreen
507
+ columnDefinitions={columnDefinitions}
508
+ tableData={MOCK_DATA}
509
+ />
510
+ )
511
+
512
+ const tableContainer = screen.getByRole("table").closest("div")
513
+ expect(tableContainer).toHaveClass("advanced-table-allow-fullscreen")
514
+ })
@@ -0,0 +1,80 @@
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 AdvancedTableColumnBorderColors = (props) => {
6
+ const columnDefinitions = [
7
+ {
8
+ accessor: "year",
9
+ label: "Year",
10
+ cellAccessors: ["quarter", "month", "day"],
11
+ },
12
+ {
13
+ label: "Enrollment Data",
14
+ columns: [
15
+ {
16
+ label: "Enrollment Stats",
17
+ columns: [
18
+ {
19
+ accessor: "newEnrollments",
20
+ label: "New Enrollments",
21
+ },
22
+ {
23
+ accessor: "scheduledMeetings",
24
+ label: "Scheduled Meetings",
25
+ },
26
+ ],
27
+ },
28
+ ],
29
+ },
30
+ {
31
+ label: "Performance Data",
32
+ columns: [
33
+ {
34
+ label: "Completion Metrics",
35
+ columns: [
36
+ {
37
+ accessor: "completedClasses",
38
+ label: "Completed Classes",
39
+ },
40
+ {
41
+ accessor: "classCompletionRate",
42
+ label: "Class Completion Rate",
43
+ },
44
+ ],
45
+ },
46
+ {
47
+ label: "Attendance",
48
+ columns: [
49
+ {
50
+ accessor: "attendanceRate",
51
+ label: "Attendance Rate",
52
+ },
53
+ {
54
+ accessor: "scheduledMeetings",
55
+ label: "Scheduled Meetings",
56
+ },
57
+ ],
58
+ },
59
+ ],
60
+ },
61
+ ];
62
+
63
+ const tableProps = {
64
+ verticalBorder: true
65
+ }
66
+
67
+ return (
68
+ <>
69
+ <AdvancedTable
70
+ columnDefinitions={columnDefinitions}
71
+ columnGroupBorderColor="text_lt_default"
72
+ tableData={MOCK_DATA}
73
+ tableProps={tableProps}
74
+ {...props}
75
+ />
76
+ </>
77
+ )
78
+ }
79
+
80
+ export default AdvancedTableColumnBorderColors
@@ -0,0 +1,3 @@
1
+ The borders of column groups can be set to a different color using the `columnGroupBorderColor` prop. In order for these borders to be visible, this prop must be used with `tableProps` and `verticalBorder` set to true.
2
+
3
+ The available colors for the border are Playbook's Text Colors, which can be found [here](https://playbook.powerapp.cloud/visual_guidelines/colors).
@@ -0,0 +1,58 @@
1
+ <% column_definitions = [
2
+ {
3
+ accessor: "year",
4
+ label: "Year",
5
+ cellAccessors: ["quarter", "month", "day"],
6
+ },
7
+ {
8
+ label: "Enrollment Data",
9
+ columns: [
10
+ {
11
+ label: "Enrollment Stats",
12
+ columns: [
13
+ {
14
+ accessor: "newEnrollments",
15
+ label: "New Enrollments",
16
+ },
17
+ {
18
+ accessor: "scheduledMeetings",
19
+ label: "Scheduled Meetings",
20
+ },
21
+ ],
22
+ },
23
+ ],
24
+ },
25
+ {
26
+ label: "Performance Data",
27
+ columns: [
28
+ {
29
+ label: "Completion Metrics",
30
+ columns: [
31
+ {
32
+ accessor: "completedClasses",
33
+ label: "Completed Classes",
34
+ },
35
+ {
36
+ accessor: "classCompletionRate",
37
+ label: "Class Completion Rate",
38
+ },
39
+ ],
40
+ },
41
+ {
42
+ label: "Attendance",
43
+ columns: [
44
+ {
45
+ accessor: "attendanceRate",
46
+ label: "Attendance Rate",
47
+ },
48
+ {
49
+ accessor: "scheduledMeetings",
50
+ label: "Scheduled Meetings",
51
+ },
52
+ ],
53
+ },
54
+ ],
55
+ },
56
+ ] %>
57
+
58
+ <%= pb_rails("advanced_table", props: { id: "beta_table_with_muilti_headers", table_data: @table_data, column_definitions: column_definitions, column_group_border_color: "text_lt_default", table_props: { vertical_border: true } }) %>
@@ -0,0 +1,3 @@
1
+ The borders of column groups can be set to a different color using the `column_group_border_color` prop. In order for these borders to be visible, this prop must be used with `table_props` and `vertical_border` set to true.
2
+
3
+ The available colors for the border are Playbook's Text Colors, which can be found [here](https://playbook.powerapp.cloud/visual_guidelines/colors).
@@ -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,90 @@
1
+ import React, { useState } from "react"
2
+ import { AdvancedTable, Button, Flex } from "playbook-ui"
3
+ import MOCK_DATA from "./advanced_table_mock_data.json"
4
+ import PAGINATION_MOCK_DATA from "./advanced_table_pagination_mock_data.json"
5
+
6
+ const AdvancedTableFullscreen = (props) => {
7
+ const [fullscreenToggleSmall, setFullscreenToggleSmall] = useState(null)
8
+ const [fullscreenToggleLarge, setFullscreenToggleLarge] = useState(null)
9
+
10
+ const columnDefinitions = [
11
+ {
12
+ accessor: "year",
13
+ label: "Year",
14
+ cellAccessors: ["quarter", "month", "day"],
15
+ },
16
+ {
17
+ accessor: "newEnrollments",
18
+ label: "New Enrollments",
19
+ },
20
+ {
21
+ accessor: "scheduledMeetings",
22
+ label: "Scheduled Meetings",
23
+ },
24
+ {
25
+ accessor: "attendanceRate",
26
+ label: "Attendance Rate",
27
+ },
28
+ {
29
+ accessor: "completedClasses",
30
+ label: "Completed Classes",
31
+ },
32
+ {
33
+ accessor: "classCompletionRate",
34
+ label: "Class Completion Rate",
35
+ },
36
+ {
37
+ accessor: "graduatedStudents",
38
+ label: "Graduated Students",
39
+ },
40
+ ]
41
+
42
+ const tableProps = {
43
+ sticky: true
44
+ }
45
+
46
+ return (
47
+ <div>
48
+ <Flex justify="end">
49
+ <Button
50
+ marginBottom="sm"
51
+ onClick={() => fullscreenToggleSmall?.()}
52
+ text="Fullscreen Small Table"
53
+ variant="secondary"
54
+ />
55
+ </Flex>
56
+ <AdvancedTable
57
+ allowFullScreen
58
+ columnDefinitions={columnDefinitions}
59
+ fullScreenControl={({ toggleFullscreen }) => setFullscreenToggleSmall(() => toggleFullscreen)}
60
+ tableData={MOCK_DATA}
61
+ {...props}
62
+ >
63
+ <AdvancedTable.Header enableSorting />
64
+ <AdvancedTable.Body />
65
+ </AdvancedTable>
66
+ <Flex justify="end">
67
+ <Button
68
+ marginY="sm"
69
+ onClick={() => fullscreenToggleLarge?.()}
70
+ text="Fullscreen Large Table"
71
+ variant="secondary"
72
+ />
73
+ </Flex>
74
+ <AdvancedTable
75
+ allowFullScreen
76
+ columnDefinitions={columnDefinitions}
77
+ fullScreenControl={({ toggleFullscreen }) => setFullscreenToggleLarge(() => toggleFullscreen)}
78
+ responsive="none"
79
+ tableData={PAGINATION_MOCK_DATA}
80
+ tableProps={tableProps}
81
+ {...props}
82
+ >
83
+ <AdvancedTable.Header enableSorting />
84
+ <AdvancedTable.Body />
85
+ </AdvancedTable>
86
+ </div>
87
+ )
88
+ }
89
+
90
+ export default AdvancedTableFullscreen
@@ -0,0 +1,3 @@
1
+ Trigger Fullscreen mode with the `allowFullScreen`and `fullScreenControl` props. `allowFullScreen` is a boolean that enables Fullscreen functionality for an Advanced Table. `fullScreenControl` is a callback function that receives an object containing the table's internal `toggleFullscreen` function, allowing you to store and trigger Fullscreen from the parent component. An external trigger (like a button) must be used to activate Fullscreen mode.
2
+
3
+ Exit Fullscreen mode by clicking the minimize top-right-corner icon or by pressing the "Escape" keyboard key.
@@ -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.