playbook_ui 14.12.0.pre.rc.12 → 14.13.0.pre.alpha.PBNTR457formtimezoneselect6219

Sign up to get free protection for your applications and to get access to all the features.
Files changed (242) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +1 -1
  3. data/app/pb_kits/playbook/pb_advanced_table/Components/CustomCell.tsx +1 -1
  4. data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +11 -4
  5. data/app/pb_kits/playbook/pb_advanced_table/Utilities/ActionBarAnimationHelper.ts +26 -0
  6. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +74 -10
  7. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +43 -26
  8. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +3 -3
  9. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +11 -2
  10. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +1 -1
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_custom_cell.jsx +75 -0
  12. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading.html.erb +33 -0
  13. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading_rails.md +1 -0
  14. data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_loading.md → _advanced_table_loading_react.md} +2 -2
  15. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.html.erb +38 -0
  16. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.html.erb +1 -1
  17. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx +1 -0
  18. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_rails.md +3 -1
  19. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_react.md +3 -1
  20. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.html.erb +33 -0
  21. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.jsx +55 -0
  22. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md +3 -0
  23. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md +3 -0
  24. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +5 -0
  25. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +3 -1
  26. data/app/pb_kits/playbook/pb_advanced_table/index.js +9 -6
  27. data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +17 -3
  28. data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +15 -11
  29. data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +14 -3
  30. data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +10 -7
  31. data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +9 -1
  32. data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb +1 -1
  33. data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.rb +9 -0
  34. data/app/pb_kits/playbook/pb_avatar/_avatar.scss +14 -0
  35. data/app/pb_kits/playbook/pb_avatar/_avatar.tsx +11 -7
  36. data/app/pb_kits/playbook/pb_avatar/avatar.html.erb +6 -7
  37. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.jsx +9 -3
  38. data/app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.jsx +6 -2
  39. data/app/pb_kits/playbook/pb_bar_graph/BarGraphStyles.scss +58 -0
  40. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.jsx +64 -0
  41. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.md +1 -0
  42. data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +1 -0
  43. data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +1 -0
  44. data/app/pb_kits/playbook/pb_button/button.rb +1 -1
  45. data/app/pb_kits/playbook/pb_card/card.html.erb +21 -2
  46. data/app/pb_kits/playbook/pb_card/card.rb +7 -0
  47. data/app/pb_kits/playbook/pb_checkbox/_checkbox.tsx +17 -8
  48. data/app/pb_kits/playbook/pb_checkbox/checkbox.test.js +16 -0
  49. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_react_hook.jsx +69 -0
  50. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_react_hook.md +1 -0
  51. data/app/pb_kits/playbook/pb_checkbox/docs/example.yml +2 -1
  52. data/app/pb_kits/playbook/pb_checkbox/docs/index.js +1 -0
  53. data/app/pb_kits/playbook/pb_copy_button/_copy_button.scss +4 -0
  54. data/app/pb_kits/playbook/pb_copy_button/_copy_button.tsx +92 -0
  55. data/app/pb_kits/playbook/pb_copy_button/copy_button.html.erb +15 -0
  56. data/app/pb_kits/playbook/pb_copy_button/copy_button.rb +28 -0
  57. data/app/pb_kits/playbook/pb_copy_button/copy_button.test.jsx +64 -0
  58. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.html.erb +2 -0
  59. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.jsx +21 -0
  60. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.html.erb +5 -0
  61. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.jsx +45 -0
  62. data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.md +1 -0
  63. data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +8 -0
  64. data/app/pb_kits/playbook/pb_copy_button/docs/index.js +2 -0
  65. data/app/pb_kits/playbook/pb_copy_button/index.js +47 -0
  66. data/app/pb_kits/playbook/pb_date/_date.tsx +14 -4
  67. data/app/pb_kits/playbook/pb_date/docs/_date_default.jsx +2 -1
  68. data/app/pb_kits/playbook/pb_date/docs/_date_unstyled.jsx +13 -5
  69. data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +3 -1
  70. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_rails.html.erb +99 -0
  71. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_rails.md +1 -0
  72. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.html.erb +1 -3
  73. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.md +7 -0
  74. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.html.erb +61 -0
  75. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.md +4 -0
  76. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.jsx +90 -0
  77. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.md +5 -0
  78. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +4 -5
  79. data/app/pb_kits/playbook/pb_draggable/docs/index.js +2 -1
  80. data/app/pb_kits/playbook/pb_draggable/draggable_container.html.erb +2 -2
  81. data/app/pb_kits/playbook/pb_draggable/draggable_container.rb +5 -0
  82. data/app/pb_kits/playbook/pb_draggable/draggable_item.html.erb +1 -1
  83. data/app/pb_kits/playbook/pb_draggable/draggable_item.rb +4 -0
  84. data/app/pb_kits/playbook/pb_draggable/index.js +151 -15
  85. data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableContainer.tsx +7 -4
  86. data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableItem.tsx +6 -3
  87. data/app/pb_kits/playbook/pb_file_upload/file_upload.html.erb +1 -6
  88. data/app/pb_kits/playbook/pb_filter/filter.html.erb +1 -5
  89. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close.html.erb +58 -0
  90. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close_rails.md +3 -0
  91. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +1 -0
  92. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/index.js +7 -5
  93. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +1 -0
  94. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -0
  95. data/app/pb_kits/playbook/pb_form_group/form_group.html.erb +1 -6
  96. data/app/pb_kits/playbook/pb_form_pill/form_pill.html.erb +1 -1
  97. data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +11 -7
  98. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.html.erb +11 -0
  99. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.jsx +22 -0
  100. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_rails.md +1 -0
  101. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_react.md +1 -0
  102. data/app/pb_kits/playbook/pb_home_address_street/docs/example.yml +2 -0
  103. data/app/pb_kits/playbook/pb_home_address_street/docs/index.js +1 -0
  104. data/app/pb_kits/playbook/pb_home_address_street/home_address_street.rb +13 -2
  105. data/app/pb_kits/playbook/pb_icon/icon.html.erb +2 -6
  106. data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_default.html.erb +1 -2
  107. data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_sizes.html.erb +27 -0
  108. data/app/pb_kits/playbook/pb_icon_button/docs/example.yml +1 -3
  109. data/app/pb_kits/playbook/pb_icon_button/icon_button.html.erb +1 -1
  110. data/app/pb_kits/playbook/pb_icon_button/icon_button.rb +3 -0
  111. data/app/pb_kits/playbook/pb_layout/body.html.erb +1 -5
  112. data/app/pb_kits/playbook/pb_layout/footer.html.erb +1 -5
  113. data/app/pb_kits/playbook/pb_layout/header.html.erb +1 -5
  114. data/app/pb_kits/playbook/pb_layout/item.html.erb +1 -5
  115. data/app/pb_kits/playbook/pb_layout/layout.html.erb +1 -5
  116. data/app/pb_kits/playbook/pb_layout/sidebar.html.erb +1 -5
  117. data/app/pb_kits/playbook/pb_legend/legend.html.erb +1 -6
  118. data/app/pb_kits/playbook/pb_lightbox/lightbox.scss +7 -6
  119. data/app/pb_kits/playbook/pb_link/_link.tsx +18 -0
  120. data/app/pb_kits/playbook/pb_link/docs/_link_target.html.erb +15 -0
  121. data/app/pb_kits/playbook/pb_link/docs/_link_target.jsx +29 -0
  122. data/app/pb_kits/playbook/pb_link/docs/example.yml +5 -3
  123. data/app/pb_kits/playbook/pb_link/docs/index.js +2 -1
  124. data/app/pb_kits/playbook/pb_link/link.html.erb +1 -1
  125. data/app/pb_kits/playbook/pb_link/link.rb +6 -0
  126. data/app/pb_kits/playbook/pb_link/link.test.jsx +30 -0
  127. data/app/pb_kits/playbook/pb_message/message.html.erb +1 -6
  128. data/app/pb_kits/playbook/pb_message/message_mention.html.erb +1 -6
  129. data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.html.erb +1 -6
  130. data/app/pb_kits/playbook/pb_nav/item.html.erb +7 -19
  131. data/app/pb_kits/playbook/pb_nav/nav.html.erb +3 -8
  132. data/app/pb_kits/playbook/pb_online_status/online_status.html.erb +1 -6
  133. data/app/pb_kits/playbook/pb_overlay/_overlay.tsx +4 -0
  134. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_vertical_dynamic_multi_directional.jsx +37 -0
  135. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_vertical_dynamic_multi_directional_react.md +1 -0
  136. data/app/pb_kits/playbook/pb_overlay/docs/example.yml +1 -0
  137. data/app/pb_kits/playbook/pb_overlay/docs/index.js +1 -0
  138. data/app/pb_kits/playbook/pb_overlay/subcomponents/_overlay_token.tsx +48 -10
  139. data/app/pb_kits/playbook/pb_popover/popover.html.erb +1 -6
  140. data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.scss +6 -1
  141. data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.tsx +7 -5
  142. data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.html.erb +1 -0
  143. data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.jsx +7 -0
  144. data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.md +1 -0
  145. data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width.html.erb +1 -0
  146. data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width.jsx +18 -0
  147. data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width_rails.md +1 -0
  148. data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width_react.md +1 -0
  149. data/app/pb_kits/playbook/pb_progress_pills/docs/example.yml +2 -0
  150. data/app/pb_kits/playbook/pb_progress_pills/docs/index.js +1 -0
  151. data/app/pb_kits/playbook/pb_progress_pills/progress_pills.html.erb +2 -7
  152. data/app/pb_kits/playbook/pb_progress_pills/progress_pills.rb +6 -0
  153. data/app/pb_kits/playbook/pb_progress_pills/progress_pills.test.js +26 -1
  154. data/app/pb_kits/playbook/pb_progress_simple/progress_simple.html.erb +1 -5
  155. data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tooltip.html.erb +6 -6
  156. data/app/pb_kits/playbook/pb_progress_step/progress_step.html.erb +1 -5
  157. data/app/pb_kits/playbook/pb_progress_step/progress_step_item.html.erb +1 -5
  158. data/app/pb_kits/playbook/pb_radio/radio.html.erb +6 -11
  159. data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.html.erb +6 -9
  160. data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.jsx +6 -9
  161. data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.html.erb +47 -0
  162. data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.jsx +88 -0
  163. data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.md +1 -0
  164. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.jsx +1 -1
  165. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.html.erb +51 -0
  166. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click_rails.md +2 -0
  167. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content.jsx +12 -8
  168. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content_rails.html.erb +52 -0
  169. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content_rails.md +0 -0
  170. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows_rails.html.erb +52 -0
  171. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows_rails.md +3 -0
  172. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table_rails.html.erb +80 -0
  173. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table_rails.md +1 -0
  174. data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.html.erb +96 -0
  175. data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.jsx +101 -0
  176. data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.md +1 -0
  177. data/app/pb_kits/playbook/pb_table/docs/example.yml +8 -0
  178. data/app/pb_kits/playbook/pb_table/docs/index.js +3 -1
  179. data/app/pb_kits/playbook/pb_table/index.ts +41 -9
  180. data/app/pb_kits/playbook/pb_table/styles/_collapsible.scss +4 -0
  181. data/app/pb_kits/playbook/pb_table/styles/_desktop_collapse.scss +26 -0
  182. data/app/pb_kits/playbook/pb_table/styles/_mobile.scss +0 -1
  183. data/app/pb_kits/playbook/pb_table/styles/_mobile_collapse.scss +25 -0
  184. data/app/pb_kits/playbook/pb_table/styles/_tablet_collapse.scss +25 -0
  185. data/app/pb_kits/playbook/pb_table/subcomponents/_table_body.tsx +29 -2
  186. data/app/pb_kits/playbook/pb_table/subcomponents/_table_row.tsx +31 -3
  187. data/app/pb_kits/playbook/pb_table/table_body.html.erb +13 -7
  188. data/app/pb_kits/playbook/pb_table/table_body.rb +2 -0
  189. data/app/pb_kits/playbook/pb_table/table_row.html.erb +14 -7
  190. data/app/pb_kits/playbook/pb_table/table_row.rb +15 -2
  191. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.html.erb +15 -1
  192. data/app/pb_kits/playbook/pb_text_input/index.js +60 -82
  193. data/app/pb_kits/playbook/pb_text_input/text_input.rb +5 -2
  194. data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +3 -1
  195. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_default.html.erb +1 -1
  196. data/app/pb_kits/playbook/pb_tooltip/index.js +45 -27
  197. data/app/pb_kits/playbook/pb_tooltip/tooltip.rb +5 -1
  198. data/app/pb_kits/playbook/pb_user/_user.tsx +3 -0
  199. data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.html.erb +42 -0
  200. data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.jsx +59 -0
  201. data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.md +2 -0
  202. data/app/pb_kits/playbook/pb_user/docs/example.yml +2 -0
  203. data/app/pb_kits/playbook/pb_user/docs/index.js +1 -0
  204. data/app/pb_kits/playbook/pb_user/user.html.erb +1 -1
  205. data/app/pb_kits/playbook/pb_user/user.rb +1 -0
  206. data/app/pb_kits/playbook/pb_user/user.test.js +14 -0
  207. data/dist/chunks/_typeahead-PqkcDf1H.js +36 -0
  208. data/dist/chunks/_weekday_stacked-C7J0S4f7.js +45 -0
  209. data/dist/chunks/{lib-kMuhBuU7.js → lib-D3us1bGD.js} +2 -2
  210. data/dist/chunks/{pb_form_validation-DBJ0wZuS.js → pb_form_validation-BpihMSOQ.js} +1 -1
  211. data/dist/chunks/vendor.js +1 -1
  212. data/dist/menu.yml +6 -7
  213. data/dist/playbook-doc.js +1 -1
  214. data/dist/playbook-rails-react-bindings.js +1 -1
  215. data/dist/playbook-rails.js +1 -1
  216. data/dist/playbook.css +1 -1
  217. data/lib/playbook/forms/builder/time_zone_select_field.rb +19 -0
  218. data/lib/playbook/forms/builder.rb +1 -0
  219. data/lib/playbook/pb_forms_global_props_helper.rb +136 -0
  220. data/lib/playbook/pb_forms_helper.rb +13 -4
  221. data/lib/playbook/version.rb +2 -2
  222. metadata +77 -25
  223. data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.scss +0 -66
  224. data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.tsx +0 -98
  225. data/app/pb_kits/playbook/pb_avatar_action_button/avatar_action_button.html.erb +0 -28
  226. data/app/pb_kits/playbook/pb_avatar_action_button/avatar_action_button.rb +0 -42
  227. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_actions.html.erb +0 -19
  228. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_actions.jsx +0 -26
  229. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_default.html.erb +0 -10
  230. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_default.jsx +0 -17
  231. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_on_click.jsx +0 -19
  232. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_onclick.html.erb +0 -16
  233. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_placement.html.erb +0 -35
  234. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_placement.jsx +0 -42
  235. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_tooltip.html.erb +0 -13
  236. data/app/pb_kits/playbook/pb_avatar_action_button/docs/example.yml +0 -15
  237. data/app/pb_kits/playbook/pb_avatar_action_button/docs/index.js +0 -4
  238. data/app/pb_kits/playbook/pb_avatar_action_button/pb_avatar_action_button.test.js +0 -31
  239. data/dist/chunks/_typeahead-BWwaAo_0.js +0 -36
  240. data/dist/chunks/_weekday_stacked-zyBCd1s8.js +0 -45
  241. /data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/{_fixed_confirmation_toast_auto_close.md → _fixed_confirmation_toast_auto_close_react.md} +0 -0
  242. /data/app/pb_kits/playbook/pb_table/docs/{_table_with_collapsible_with_custom_click.md → _table_with_collapsible_with_custom_click_react.md} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b01422970c47b5ac3d53ad0fa10ea7cb9bbb8be651852f4c2ee25b2d51379ee7
4
- data.tar.gz: 4a196fb9aa2fc4eea20c60530f607c89313ba0e7b36baab2915dfa1be31ceda0
3
+ metadata.gz: 96be297e4b256928b42d2aee573d4c7aa74e52a392ea66433309b0923616ef75
4
+ data.tar.gz: 23e994715b91860a0531ba2752963c035d6ff2bc8bed0f58493426a0722086e7
5
5
  SHA512:
6
- metadata.gz: c240f23324bd2e796025ce55b2c4d71b24c40591bee4ae0b9f769a54907b0933874f875b0c9f16630c5e1801a882fc54278041fc612655872ab36418ddc8f62e
7
- data.tar.gz: 3c9a91daa012c834a2cdef8b4be88f97df70c48b6f4bfe6b545622b80f0ca4661563b91eeaac4e9288a06f9d3c2fd998ae2890f2d918504d7accca57f1aa8748
6
+ metadata.gz: 80f48248b5e9d6600abf10e0c2fcb56d389f4fa04226be97e4528a93e1f69d4ecd5b321c7c33a06b357b9b8d007c4f7470f2f0a7be0a1c1034f036c9cdebbc17
7
+ data.tar.gz: '0508c2f2d3b3b8f9726efcfc5a21b48bb6700cde54b5d4492021a00c0ae4d0180dac59fbc23183807fd62f7ad3a230f2997792c15b428de0855de2272853948c'
@@ -1,7 +1,6 @@
1
1
 
2
2
  @import 'pb_advanced_table/advanced_table';
3
3
  @import 'pb_avatar/avatar';
4
- @import 'pb_avatar_action_button/avatar_action_button';
5
4
  @import 'pb_background/background';
6
5
  @import 'pb_badge/badge';
7
6
  @import 'pb_bar_graph/bar_graph';
@@ -15,6 +14,7 @@
15
14
  @import 'pb_circle_chart/circle_chart';
16
15
  @import 'pb_circle_icon_button/circle_icon_button';
17
16
  @import 'pb_collapsible/collapsible';
17
+ @import 'pb_copy_button/copy_button';
18
18
  @import 'pb_contact/contact';
19
19
  @import 'pb_currency/currency';
20
20
  @import 'pb_dashboard_value/dashboard_value';
@@ -47,7 +47,7 @@ export const CustomCell = ({
47
47
  <Flex
48
48
  alignItems="center"
49
49
  columnGap="xs"
50
- justify={!hasAnySubRows ? "end" : "start"}
50
+ justify={!hasAnySubRows && !inlineRowLoading ? "end" : "start"}
51
51
  orientation="row"
52
52
  >
53
53
  {
@@ -39,8 +39,15 @@ export const TableHeaderCell = ({
39
39
  sortIcon,
40
40
  table
41
41
  }: TableHeaderCellProps) => {
42
- const { sortControl, responsive, selectableRows, hasAnySubRows, showActionsBar } =
43
- useContext(AdvancedTableContext);
42
+ const {
43
+ sortControl,
44
+ responsive,
45
+ selectableRows,
46
+ hasAnySubRows,
47
+ showActionsBar,
48
+ inlineRowLoading,
49
+ isActionBarVisible,
50
+ } = useContext(AdvancedTableContext);
44
51
 
45
52
  type justifyTypes = "none" | "center" | "start" | "end" | "between" | "around" | "evenly"
46
53
 
@@ -65,7 +72,7 @@ export const TableHeaderCell = ({
65
72
 
66
73
  const cellClassName = classnames(
67
74
  "table-header-cells",
68
- `${showActionsBar && "header-cells-with-actions"}`,
75
+ `${showActionsBar && isActionBarVisible && "header-cells-with-actions"}`,
69
76
  `${isChrome() ? "chrome-styles" : ""}`,
70
77
  `${enableSorting ? "table-header-cells-active" : ""}`,
71
78
  { "pinned-left": responsive === "scroll" && isPinnedLeft },
@@ -91,7 +98,7 @@ const isToggleExpansionEnabled =
91
98
 
92
99
  let justifyHeader:justifyTypes;
93
100
 
94
- if (header?.index === 0 && hasAnySubRows) {
101
+ if (header?.index === 0 && hasAnySubRows || (header?.index === 0 && inlineRowLoading)) {
95
102
  justifyHeader = enableSorting ? "between" : "start";
96
103
  } else {
97
104
  justifyHeader = isLeafColumn ? "end" : "center";
@@ -0,0 +1,26 @@
1
+ export const showActionBar = (elem: HTMLElement) => {
2
+ elem.style.display = "block";
3
+ const height = elem.scrollHeight + "px";
4
+ elem.style.height = height;
5
+ elem.classList.add("is-visible");
6
+ elem.style.overflow = "hidden";
7
+
8
+ window.setTimeout(() => {
9
+ if (elem.classList.contains("is-visible")) {
10
+ elem.style.height = "";
11
+ elem.style.overflow = "visible";
12
+ }
13
+ }, 300);
14
+ };
15
+
16
+ export const hideActionBar = (elem: HTMLElement) => {
17
+ elem.style.height = elem.scrollHeight + "px";
18
+ elem.offsetHeight;
19
+ window.setTimeout(() => {
20
+ elem.style.height = "0";
21
+ elem.style.overflow = "hidden";
22
+ }, 10);
23
+ window.setTimeout(() => {
24
+ elem.classList.remove("is-visible");
25
+ }, 300);
26
+ };
@@ -31,12 +31,12 @@
31
31
  width: 100%;
32
32
  }
33
33
 
34
- .row-selection-actions-card {
35
- border-bottom-right-radius: 0px !important;
36
- border-bottom-left-radius: 0px !important;
37
- border-bottom-color: transparent;
38
- }
39
-
34
+ .row-selection-actions-card {
35
+ border-bottom-right-radius: 0px !important;
36
+ border-bottom-left-radius: 0px !important;
37
+ border-bottom-color: transparent;
38
+ transition: height 300ms ease;
39
+ }
40
40
  .table-header-cells:first-child {
41
41
  min-width: 180px;
42
42
  }
@@ -89,11 +89,47 @@
89
89
  }
90
90
  }
91
91
 
92
-
93
92
  .table-header-cells-active:first-child {
94
93
  color: $primary !important;
95
94
  }
96
95
 
96
+ // Sticky Header
97
+ .sticky-header {
98
+ thead {
99
+ z-index: 3 !important;
100
+ }
101
+ }
102
+
103
+ // Max height overflow - the below prevents expansion from overflowing container at full screen for responsive and nonresponsive tables
104
+ &.advanced-table-max-height-xs {
105
+ max-height: 320px;
106
+ overflow-y: auto;
107
+ }
108
+ &.advanced-table-max-height-sm {
109
+ max-height: 480px;
110
+ overflow-y: auto;
111
+ }
112
+ &.advanced-table-max-height-md {
113
+ max-height: 768px;
114
+ overflow-y: auto;
115
+ }
116
+ &.advanced-table-max-height-lg {
117
+ max-height: 1024px;
118
+ overflow-y: auto;
119
+ }
120
+ &.advanced-table-max-height-xl {
121
+ max-height: 1280px;
122
+ overflow-y: auto;
123
+ }
124
+ &.advanced-table-max-height-xxl {
125
+ max-height: 1440px;
126
+ overflow-y: auto;
127
+ }
128
+ &.advanced-table-max-height-xxxl {
129
+ max-height: 1920px;
130
+ overflow-y: auto;
131
+ }
132
+
97
133
  // Icons
98
134
  .button-icon {
99
135
  display: flex;
@@ -179,7 +215,7 @@
179
215
  }
180
216
 
181
217
  // Responsive Styles
182
- @media only screen and (max-width: $screen-xl-min) {
218
+ @media only screen and (max-width: $screen-xl-min) {
183
219
  &[class*="advanced-table-responsive-scroll"] {
184
220
  border-radius: 4px;
185
221
  box-shadow: 1px 0 0 0px $border_light,
@@ -215,7 +251,27 @@
215
251
  .bg-white td:first-child {
216
252
  background-color: $white;
217
253
  }
218
-
254
+ .row-selection-actions-card {
255
+ border-right-width: 0px;
256
+ border-left-width: 0px;
257
+ position: sticky;
258
+ top: 0;
259
+ left: 0;
260
+ border-radius: unset;
261
+ }
262
+ .checkbox-cell {
263
+ display: table-cell !important;
264
+ }
265
+ .sticky-header {
266
+ thead {
267
+ th:first-child {
268
+ box-shadow: 1px 0 10px -2px $border_light !important;
269
+ }
270
+ }
271
+ .pb_advanced_table_header {
272
+ box-shadow: none !important;
273
+ }
274
+ }
219
275
  }
220
276
  }
221
277
  @media only screen and (min-width: $screen-xl-min) {
@@ -303,7 +359,15 @@
303
359
  .bg-white td:first-child {
304
360
  background-color: $bg_dark_card;
305
361
  }
362
+ .sticky-header {
363
+ thead {
364
+ th:first-child {
365
+ background: $bg_dark;
366
+ box-shadow: 1px 0 10px -2px $border_dark !important;
367
+ }
368
+ }
369
+ }
306
370
  }
307
371
  }
308
372
  }
309
- }
373
+ }
@@ -1,4 +1,4 @@
1
- import React, { useState, useEffect, useCallback } from "react"
1
+ import React, { useState, useEffect, useCallback, useRef } from "react"
2
2
  import classnames from "classnames"
3
3
 
4
4
  import { GenericObject } from "../types"
@@ -27,6 +27,7 @@ import FlexItem from "../pb_flex/_flex_item"
27
27
  import AdvancedTableContext from "./Context/AdvancedTableContext"
28
28
 
29
29
  import { updateExpandAndCollapseState } from "./Utilities/ExpansionControlHelpers"
30
+ import { showActionBar, hideActionBar } from "./Utilities/ActionBarAnimationHelper"
30
31
 
31
32
  import { CustomCell } from "./Components/CustomCell"
32
33
  import { TableHeader } from "./SubKits/TableHeader"
@@ -48,6 +49,7 @@ type AdvancedTableProps = {
48
49
  initialLoadingRowsCount?: number
49
50
  inlineRowLoading?: boolean
50
51
  loading?: boolean | string
52
+ maxHeight?: "auto" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl"
51
53
  onRowToggleClick?: (arg: Row<GenericObject>) => void
52
54
  onToggleExpansionClick?: (arg: Row<GenericObject>) => void
53
55
  pagination?: boolean,
@@ -79,6 +81,7 @@ const AdvancedTable = (props: AdvancedTableProps) => {
79
81
  initialLoadingRowsCount = 10,
80
82
  inlineRowLoading = false,
81
83
  loading,
84
+ maxHeight,
82
85
  onRowToggleClick,
83
86
  onToggleExpansionClick,
84
87
  pagination = false,
@@ -113,7 +116,7 @@ const AdvancedTable = (props: AdvancedTableProps) => {
113
116
  const [rowSelection, setRowSelection] = useState<RowSelectionState>({})
114
117
 
115
118
  //Create cells for columns, with customization for first column
116
- const createCellFunction = (cellAccessors: string[], customRenderer?: (row: Row<GenericObject>, value: any) => JSX.Element, index?: number) => {
119
+ const createCellFunction = (cellAccessors: string[], customRenderer?: (row: Row<GenericObject>, value: any) => JSX.Element, isFirstColumn?: boolean) => {
117
120
  const columnCells = ({
118
121
  row,
119
122
  getValue,
@@ -123,7 +126,7 @@ const AdvancedTable = (props: AdvancedTableProps) => {
123
126
  }) => {
124
127
  const rowData = row.original
125
128
 
126
- if (index === 0) {
129
+ if (isFirstColumn) {
127
130
  switch (row.depth) {
128
131
  case 0: {
129
132
  return (
@@ -161,15 +164,16 @@ const AdvancedTable = (props: AdvancedTableProps) => {
161
164
  return columnCells
162
165
  }
163
166
 
164
- const buildColumns = (columnDefinitions: GenericObject[]): any => {
167
+ const buildColumns = (columnDefinitions: GenericObject[], isRoot= true): any => {
165
168
  return (
166
169
  columnDefinitions &&
167
170
  columnDefinitions.map((column, index) => {
171
+ const isFirstColumn = isRoot && index === 0;
168
172
  //Checking to see if grouped column or not
169
173
  if (column.columns && column.columns.length > 0) {
170
174
  return {
171
175
  header: column.label || "",
172
- columns: buildColumns(column.columns),
176
+ columns: buildColumns(column.columns, false),
173
177
  };
174
178
  } else {
175
179
  // Define the base column structure
@@ -183,7 +187,7 @@ const AdvancedTable = (props: AdvancedTableProps) => {
183
187
  columnStructure.cell = createCellFunction(
184
188
  column.cellAccessors,
185
189
  column.customRenderer,
186
- index
190
+ isFirstColumn
187
191
  );
188
192
  }
189
193
 
@@ -288,6 +292,7 @@ const AdvancedTable = (props: AdvancedTableProps) => {
288
292
  const classes = classnames(
289
293
  buildCss("pb_advanced_table"),
290
294
  `advanced-table-responsive-${responsive}`,
295
+ maxHeight ? `advanced-table-max-height-${maxHeight}` : '', // max height as kit prop not global prop to control overflow-y
291
296
  globalProps(props),
292
297
  className
293
298
  )
@@ -295,6 +300,20 @@ const AdvancedTable = (props: AdvancedTableProps) => {
295
300
  const onPageChange = (page: number) => {
296
301
  table.setPageIndex(page - 1)
297
302
  }
303
+ //When to show the actions bar as a whole
304
+ const isActionBarVisible = selectableRows && showActionsBar && selectedRowsLength > 0
305
+
306
+ //Ref and useEffect for animating the actions bar
307
+ const cardRef = useRef(null);
308
+ useEffect(() => {
309
+ if (cardRef.current) {
310
+ if (isActionBarVisible) {
311
+ showActionBar(cardRef.current);
312
+ } else {
313
+ hideActionBar(cardRef.current);
314
+ }
315
+ }
316
+ }, [isActionBarVisible]);
298
317
 
299
318
  return (
300
319
  <div {...ariaProps}
@@ -311,6 +330,7 @@ const AdvancedTable = (props: AdvancedTableProps) => {
311
330
  expandedControl,
312
331
  handleExpandOrCollapse,
313
332
  inlineRowLoading,
333
+ isActionBarVisible,
314
334
  loading,
315
335
  responsive,
316
336
  setExpanded,
@@ -333,27 +353,24 @@ const AdvancedTable = (props: AdvancedTableProps) => {
333
353
  total={table.getPageCount()}
334
354
  />
335
355
  }
336
- {
337
- selectableRows && showActionsBar && (
338
- <Card className="row-selection-actions-card"
339
- padding="xs"
356
+ <Card
357
+ borderNone={!isActionBarVisible}
358
+ className={`${isActionBarVisible && "show-action-card row-selection-actions-card"}`}
359
+ htmlOptions={{ ref: cardRef as any }}
360
+ padding={`${isActionBarVisible ? "xs" : "none"}`}
361
+ >
362
+ <Flex alignItems="center"
363
+ justify="between"
364
+ >
365
+ <Caption color="light"
366
+ paddingLeft="xs"
367
+ size="xs"
340
368
  >
341
- <Flex alignItems="center"
342
- justify="between"
343
- >
344
- <Caption color="light"
345
- paddingLeft="xs"
346
- size="xs"
347
- >
348
- {selectedRowsLength} Selected
349
- </Caption>
350
- <FlexItem>
351
- {actions}
352
- </FlexItem>
353
- </Flex>
354
- </Card>
355
- )
356
- }
369
+ {selectedRowsLength} Selected
370
+ </Caption>
371
+ <FlexItem>{actions}</FlexItem>
372
+ </Flex>
373
+ </Card>
357
374
  <Table
358
375
  className={`${loading ? "content-loading" : ""}`}
359
376
  dark={dark}
@@ -1,10 +1,10 @@
1
1
  <%= pb_content_tag do %>
2
- <%= pb_rails("table", props: { size: "sm", data_table: true, number_spacing:"tabular", responsive:"none", dark: dark }.merge(object.table_props)) do %>
2
+ <%= pb_rails("table", props: { size: "sm", data_table: true, number_spacing:"tabular", responsive:"none", dark: dark, classname: object.loading ? "content-loading" : "" }.merge(object.table_props)) do %>
3
3
  <% if content.present? %>
4
4
  <% content.presence %>
5
5
  <% else %>
6
- <%= pb_rails("advanced_table/table_header", props: { column_definitions: object.column_definitions, enable_toggle_expansion: object.enable_toggle_expansion }) %>
7
- <%= pb_rails("advanced_table/table_body", props: { id: object.id, table_data: object.table_data, column_definitions: object.column_definitions }) %>
6
+ <%= pb_rails("advanced_table/table_header", props: { column_definitions: object.column_definitions, enable_toggle_expansion: object.enable_toggle_expansion, responsive: object.responsive, loading: object.loading }) %>
7
+ <%= pb_rails("advanced_table/table_body", props: { id: object.id, table_data: object.table_data, column_definitions: object.column_definitions, responsive: object.responsive, loading: object.loading }) %>
8
8
  <% end %>
9
9
  <% end %>
10
10
  <% end %>
@@ -10,19 +10,28 @@ module Playbook
10
10
  prop :enable_toggle_expansion, type: Playbook::Props::Enum,
11
11
  values: %w[all header none],
12
12
  default: "header"
13
+ prop :loading, type: Playbook::Props::Boolean,
14
+ default: false
13
15
  prop :responsive, type: Playbook::Props::Enum,
14
16
  values: %w[none scroll],
15
- default: "none"
17
+ default: "scroll"
16
18
  prop :table_props, type: Playbook::Props::HashProp,
17
19
  default: {}
20
+ prop :max_height, type: Playbook::Props::Enum,
21
+ values: %w[auto xs sm md lg xl xxl xxxl],
22
+ default: "auto"
18
23
 
19
24
  def classname
20
- generate_classname("pb_advanced_table", responsive_classname, separator: " ")
25
+ generate_classname("pb_advanced_table", responsive_classname, max_height_classname, separator: " ")
21
26
  end
22
27
 
23
28
  def responsive_classname
24
29
  responsive == "scroll" ? "advanced-table-responsive-scroll" : "advanced-table-responsive-none"
25
30
  end
31
+
32
+ def max_height_classname
33
+ max_height.present? ? "advanced-table-max-height-#{max_height}" : ""
34
+ end
26
35
  end
27
36
  end
28
37
  end
@@ -245,7 +245,7 @@ test("toggleExpansionAll button exists and toggles subrows open and closed", asy
245
245
  })
246
246
 
247
247
 
248
- test("loading state + initialLoadingRowCount prop", () => {
248
+ test("loading state + initialLoadingRowsCount prop", () => {
249
249
  render(
250
250
  <AdvancedTable
251
251
  columnDefinitions={columnDefinitions}
@@ -0,0 +1,75 @@
1
+ import React from "react"
2
+ import { AdvancedTable, Pill } from "playbook-ui"
3
+ import MOCK_DATA from "./advanced_table_mock_data.json"
4
+
5
+ const AdvancedTableColumnHeadersCustomCell = (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
+ accessor: "newEnrollments",
17
+ label: "New Enrollments",
18
+ customRenderer: (row, value) => (
19
+ <Pill text={value}
20
+ variant="success"
21
+ />
22
+ ),
23
+ },
24
+ {
25
+ accessor: "scheduledMeetings",
26
+ label: "Scheduled Meetings",
27
+ customRenderer: (row, value) => (
28
+ <Pill text={value}
29
+ variant="info"
30
+ />
31
+ ),
32
+ },
33
+ ],
34
+ },
35
+ {
36
+ label: "Performance Data",
37
+ columns: [
38
+ {
39
+ accessor: "attendanceRate",
40
+ label: "Attendance Rate",
41
+ },
42
+ {
43
+ accessor: "completedClasses",
44
+ label: "Completed Classes",
45
+ customRenderer: (row, value) => (
46
+ <Pill text={value}
47
+ variant="error"
48
+ />
49
+ ),
50
+ },
51
+ {
52
+ accessor: "classCompletionRate",
53
+ label: "Class Completion Rate",
54
+ },
55
+ {
56
+ accessor: "graduatedStudents",
57
+ label: "Graduated Students",
58
+ },
59
+ ],
60
+ },
61
+ ];
62
+
63
+
64
+ return (
65
+ <>
66
+ <AdvancedTable
67
+ columnDefinitions={columnDefinitions}
68
+ tableData={MOCK_DATA}
69
+ {...props}
70
+ />
71
+ </>
72
+ )
73
+ }
74
+
75
+ export default AdvancedTableColumnHeadersCustomCell
@@ -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: "beta_table", table_data: @table_data, column_definitions: column_definitions, loading: true }) %>
@@ -0,0 +1 @@
1
+ The optional `loading` prop takes a boolean value that can be managed using state. If loading is true, the table will display the loading skeleton and once loading is false, the table will render with the data provided.
@@ -1,3 +1,3 @@
1
- the optional `loading` prop takes a boolean value that can be managed using state. If loading is true, the table will display the loading skeleton and once loading is false, the table will render with the data provided.
1
+ The optional `loading` prop takes a boolean value that can be managed using state. If loading is true, the table will display the loading skeleton and once loading is false, the table will render with the data provided.
2
2
 
3
- By default, the inital row count of the loading skeleton is set to 10. If you want more control over this initial row count, the optional `initialLoadingRowCount` prop can be used to pass in a number. __NOTE__: This is only for the first render of the table, subsequent loading skeleton row count logic is handled within the kit itself.
3
+ By default, the inital row count of the loading skeleton is set to 10. If you want more control over this initial row count, the optional `initialLoadingRowsCount` prop can be used to pass in a number. __NOTE__: This is only for the first render of the table, subsequent loading skeleton row count logic is handled within the kit itself.
@@ -0,0 +1,38 @@
1
+
2
+ <% column_definitions = [
3
+ {
4
+ accessor: "year",
5
+ label: "Year",
6
+ cellAccessors: ["quarter", "month", "day"],
7
+ },
8
+ {
9
+ accessor: "newEnrollments",
10
+ label: "New Enrollments",
11
+ },
12
+ {
13
+ accessor: "scheduledMeetings",
14
+ label: "Scheduled Meetings",
15
+ },
16
+ {
17
+ accessor: "attendanceRate",
18
+ label: "Attendance Rate",
19
+ },
20
+ {
21
+ accessor: "completedClasses",
22
+ label: "Completed Classes",
23
+ },
24
+ {
25
+ accessor: "classCompletionRate",
26
+ label: "Class Completion Rate",
27
+ },
28
+ {
29
+ accessor: "graduatedStudents",
30
+ label: "Graduated Students",
31
+ },
32
+ ] %>
33
+
34
+ <%= pb_rails("title", props: { size: 4 }) do %> Not Responsive <% end %>
35
+ <%= pb_rails("advanced_table", props: { id: "table_props_table_non_responsive", table_data: @table_data, column_definitions: column_definitions, responsive: "none" }) %>
36
+
37
+ <%= pb_rails("title", props: { padding_top: "sm", size: 4 }) do %> Responsive as Default <% end %>
38
+ <%= pb_rails("advanced_table", props: { id: "table_props_table_responsive", table_data: @table_data, column_definitions: column_definitions }) %>
@@ -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, table_props: { container: false, sticky: true }}) %>
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 }}) %>
@@ -44,6 +44,7 @@ const AdvancedTableTableProps = (props) => {
44
44
  <div>
45
45
  <AdvancedTable
46
46
  columnDefinitions={columnDefinitions}
47
+ responsive="none"
47
48
  tableData={MOCK_DATA}
48
49
  tableProps={tableProps}
49
50
  {...props}
@@ -1 +1,3 @@
1
- This kit uses the [Table kit](https://playbook.powerapp.cloud/kits/table) under the hood which comes with it's 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) 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).
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.
@@ -1 +1,3 @@
1
- This kit uses the [Table kit](https://playbook.powerapp.cloud/kits/table/react) under the hood which comes with it's 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).
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
+
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.
@@ -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: "table_props_table", table_data: @table_data, column_definitions: column_definitions, max_height: "xs", table_props: { sticky: true }}) %>