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.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/_playbook.scss +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/Components/CustomCell.tsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +11 -4
- data/app/pb_kits/playbook/pb_advanced_table/Utilities/ActionBarAnimationHelper.ts +26 -0
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +74 -10
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +43 -26
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +3 -3
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +11 -2
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_custom_cell.jsx +75 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading.html.erb +33 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading_rails.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_loading.md → _advanced_table_loading_react.md} +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.html.erb +38 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_rails.md +3 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_react.md +3 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.html.erb +33 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.jsx +55 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +5 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +3 -1
- data/app/pb_kits/playbook/pb_advanced_table/index.js +9 -6
- data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +17 -3
- data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +15 -11
- data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +14 -3
- data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +10 -7
- data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +9 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.rb +9 -0
- data/app/pb_kits/playbook/pb_avatar/_avatar.scss +14 -0
- data/app/pb_kits/playbook/pb_avatar/_avatar.tsx +11 -7
- data/app/pb_kits/playbook/pb_avatar/avatar.html.erb +6 -7
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.jsx +9 -3
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.jsx +6 -2
- data/app/pb_kits/playbook/pb_bar_graph/BarGraphStyles.scss +58 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.jsx +64 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.md +1 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_button/button.rb +1 -1
- data/app/pb_kits/playbook/pb_card/card.html.erb +21 -2
- data/app/pb_kits/playbook/pb_card/card.rb +7 -0
- data/app/pb_kits/playbook/pb_checkbox/_checkbox.tsx +17 -8
- data/app/pb_kits/playbook/pb_checkbox/checkbox.test.js +16 -0
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_react_hook.jsx +69 -0
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_react_hook.md +1 -0
- data/app/pb_kits/playbook/pb_checkbox/docs/example.yml +2 -1
- data/app/pb_kits/playbook/pb_checkbox/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_copy_button/_copy_button.scss +4 -0
- data/app/pb_kits/playbook/pb_copy_button/_copy_button.tsx +92 -0
- data/app/pb_kits/playbook/pb_copy_button/copy_button.html.erb +15 -0
- data/app/pb_kits/playbook/pb_copy_button/copy_button.rb +28 -0
- data/app/pb_kits/playbook/pb_copy_button/copy_button.test.jsx +64 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.html.erb +2 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.jsx +21 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.html.erb +5 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.jsx +45 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.md +1 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +8 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_copy_button/index.js +47 -0
- data/app/pb_kits/playbook/pb_date/_date.tsx +14 -4
- data/app/pb_kits/playbook/pb_date/docs/_date_default.jsx +2 -1
- data/app/pb_kits/playbook/pb_date/docs/_date_unstyled.jsx +13 -5
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +3 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_rails.html.erb +99 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_rails.md +1 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.html.erb +1 -3
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.md +7 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.html.erb +61 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.md +4 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.jsx +90 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.md +5 -0
- data/app/pb_kits/playbook/pb_draggable/docs/example.yml +4 -5
- data/app/pb_kits/playbook/pb_draggable/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_draggable/draggable_container.html.erb +2 -2
- data/app/pb_kits/playbook/pb_draggable/draggable_container.rb +5 -0
- data/app/pb_kits/playbook/pb_draggable/draggable_item.html.erb +1 -1
- data/app/pb_kits/playbook/pb_draggable/draggable_item.rb +4 -0
- data/app/pb_kits/playbook/pb_draggable/index.js +151 -15
- data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableContainer.tsx +7 -4
- data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableItem.tsx +6 -3
- data/app/pb_kits/playbook/pb_file_upload/file_upload.html.erb +1 -6
- data/app/pb_kits/playbook/pb_filter/filter.html.erb +1 -5
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close.html.erb +58 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close_rails.md +3 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/index.js +7 -5
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +1 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -0
- data/app/pb_kits/playbook/pb_form_group/form_group.html.erb +1 -6
- data/app/pb_kits/playbook/pb_form_pill/form_pill.html.erb +1 -1
- data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +11 -7
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.html.erb +11 -0
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.jsx +22 -0
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_rails.md +1 -0
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_react.md +1 -0
- data/app/pb_kits/playbook/pb_home_address_street/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_home_address_street/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_home_address_street/home_address_street.rb +13 -2
- data/app/pb_kits/playbook/pb_icon/icon.html.erb +2 -6
- data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_default.html.erb +1 -2
- data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_sizes.html.erb +27 -0
- data/app/pb_kits/playbook/pb_icon_button/docs/example.yml +1 -3
- data/app/pb_kits/playbook/pb_icon_button/icon_button.html.erb +1 -1
- data/app/pb_kits/playbook/pb_icon_button/icon_button.rb +3 -0
- data/app/pb_kits/playbook/pb_layout/body.html.erb +1 -5
- data/app/pb_kits/playbook/pb_layout/footer.html.erb +1 -5
- data/app/pb_kits/playbook/pb_layout/header.html.erb +1 -5
- data/app/pb_kits/playbook/pb_layout/item.html.erb +1 -5
- data/app/pb_kits/playbook/pb_layout/layout.html.erb +1 -5
- data/app/pb_kits/playbook/pb_layout/sidebar.html.erb +1 -5
- data/app/pb_kits/playbook/pb_legend/legend.html.erb +1 -6
- data/app/pb_kits/playbook/pb_lightbox/lightbox.scss +7 -6
- data/app/pb_kits/playbook/pb_link/_link.tsx +18 -0
- data/app/pb_kits/playbook/pb_link/docs/_link_target.html.erb +15 -0
- data/app/pb_kits/playbook/pb_link/docs/_link_target.jsx +29 -0
- data/app/pb_kits/playbook/pb_link/docs/example.yml +5 -3
- data/app/pb_kits/playbook/pb_link/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_link/link.html.erb +1 -1
- data/app/pb_kits/playbook/pb_link/link.rb +6 -0
- data/app/pb_kits/playbook/pb_link/link.test.jsx +30 -0
- data/app/pb_kits/playbook/pb_message/message.html.erb +1 -6
- data/app/pb_kits/playbook/pb_message/message_mention.html.erb +1 -6
- data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.html.erb +1 -6
- data/app/pb_kits/playbook/pb_nav/item.html.erb +7 -19
- data/app/pb_kits/playbook/pb_nav/nav.html.erb +3 -8
- data/app/pb_kits/playbook/pb_online_status/online_status.html.erb +1 -6
- data/app/pb_kits/playbook/pb_overlay/_overlay.tsx +4 -0
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_vertical_dynamic_multi_directional.jsx +37 -0
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_vertical_dynamic_multi_directional_react.md +1 -0
- data/app/pb_kits/playbook/pb_overlay/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_overlay/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_overlay/subcomponents/_overlay_token.tsx +48 -10
- data/app/pb_kits/playbook/pb_popover/popover.html.erb +1 -6
- data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.scss +6 -1
- data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.tsx +7 -5
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.html.erb +1 -0
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.jsx +7 -0
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.md +1 -0
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width.html.erb +1 -0
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width.jsx +18 -0
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width_rails.md +1 -0
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width_react.md +1 -0
- data/app/pb_kits/playbook/pb_progress_pills/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_progress_pills/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_progress_pills/progress_pills.html.erb +2 -7
- data/app/pb_kits/playbook/pb_progress_pills/progress_pills.rb +6 -0
- data/app/pb_kits/playbook/pb_progress_pills/progress_pills.test.js +26 -1
- data/app/pb_kits/playbook/pb_progress_simple/progress_simple.html.erb +1 -5
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tooltip.html.erb +6 -6
- data/app/pb_kits/playbook/pb_progress_step/progress_step.html.erb +1 -5
- data/app/pb_kits/playbook/pb_progress_step/progress_step_item.html.erb +1 -5
- data/app/pb_kits/playbook/pb_radio/radio.html.erb +6 -11
- data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.html.erb +6 -9
- data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.jsx +6 -9
- data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.html.erb +47 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.jsx +88 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.jsx +1 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.html.erb +51 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click_rails.md +2 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content.jsx +12 -8
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content_rails.html.erb +52 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content_rails.md +0 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows_rails.html.erb +52 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows_rails.md +3 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table_rails.html.erb +80 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table_rails.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.html.erb +96 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.jsx +101 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/example.yml +8 -0
- data/app/pb_kits/playbook/pb_table/docs/index.js +3 -1
- data/app/pb_kits/playbook/pb_table/index.ts +41 -9
- data/app/pb_kits/playbook/pb_table/styles/_collapsible.scss +4 -0
- data/app/pb_kits/playbook/pb_table/styles/_desktop_collapse.scss +26 -0
- data/app/pb_kits/playbook/pb_table/styles/_mobile.scss +0 -1
- data/app/pb_kits/playbook/pb_table/styles/_mobile_collapse.scss +25 -0
- data/app/pb_kits/playbook/pb_table/styles/_tablet_collapse.scss +25 -0
- data/app/pb_kits/playbook/pb_table/subcomponents/_table_body.tsx +29 -2
- data/app/pb_kits/playbook/pb_table/subcomponents/_table_row.tsx +31 -3
- data/app/pb_kits/playbook/pb_table/table_body.html.erb +13 -7
- data/app/pb_kits/playbook/pb_table/table_body.rb +2 -0
- data/app/pb_kits/playbook/pb_table/table_row.html.erb +14 -7
- data/app/pb_kits/playbook/pb_table/table_row.rb +15 -2
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.html.erb +15 -1
- data/app/pb_kits/playbook/pb_text_input/index.js +60 -82
- data/app/pb_kits/playbook/pb_text_input/text_input.rb +5 -2
- data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +3 -1
- data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_tooltip/index.js +45 -27
- data/app/pb_kits/playbook/pb_tooltip/tooltip.rb +5 -1
- data/app/pb_kits/playbook/pb_user/_user.tsx +3 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.html.erb +42 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.jsx +59 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.md +2 -0
- data/app/pb_kits/playbook/pb_user/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_user/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_user/user.html.erb +1 -1
- data/app/pb_kits/playbook/pb_user/user.rb +1 -0
- data/app/pb_kits/playbook/pb_user/user.test.js +14 -0
- data/dist/chunks/_typeahead-PqkcDf1H.js +36 -0
- data/dist/chunks/_weekday_stacked-C7J0S4f7.js +45 -0
- data/dist/chunks/{lib-kMuhBuU7.js → lib-D3us1bGD.js} +2 -2
- data/dist/chunks/{pb_form_validation-DBJ0wZuS.js → pb_form_validation-BpihMSOQ.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +6 -7
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/forms/builder/time_zone_select_field.rb +19 -0
- data/lib/playbook/forms/builder.rb +1 -0
- data/lib/playbook/pb_forms_global_props_helper.rb +136 -0
- data/lib/playbook/pb_forms_helper.rb +13 -4
- data/lib/playbook/version.rb +2 -2
- metadata +77 -25
- data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.scss +0 -66
- data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.tsx +0 -98
- data/app/pb_kits/playbook/pb_avatar_action_button/avatar_action_button.html.erb +0 -28
- data/app/pb_kits/playbook/pb_avatar_action_button/avatar_action_button.rb +0 -42
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_actions.html.erb +0 -19
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_actions.jsx +0 -26
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_default.html.erb +0 -10
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_default.jsx +0 -17
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_on_click.jsx +0 -19
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_onclick.html.erb +0 -16
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_placement.html.erb +0 -35
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_placement.jsx +0 -42
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_tooltip.html.erb +0 -13
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/example.yml +0 -15
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/index.js +0 -4
- data/app/pb_kits/playbook/pb_avatar_action_button/pb_avatar_action_button.test.js +0 -31
- data/dist/chunks/_typeahead-BWwaAo_0.js +0 -36
- data/dist/chunks/_weekday_stacked-zyBCd1s8.js +0 -45
- /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
- /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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96be297e4b256928b42d2aee573d4c7aa74e52a392ea66433309b0923616ef75
|
4
|
+
data.tar.gz: 23e994715b91860a0531ba2752963c035d6ff2bc8bed0f58493426a0722086e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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';
|
@@ -39,8 +39,15 @@ export const TableHeaderCell = ({
|
|
39
39
|
sortIcon,
|
40
40
|
table
|
41
41
|
}: TableHeaderCellProps) => {
|
42
|
-
const {
|
43
|
-
|
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
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
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,
|
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 (
|
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
|
-
|
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
|
-
|
338
|
-
|
339
|
-
|
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
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
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: "
|
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 +
|
248
|
+
test("loading state + initialLoadingRowsCount prop", () => {
|
249
249
|
render(
|
250
250
|
<AdvancedTable
|
251
251
|
columnDefinitions={columnDefinitions}
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_custom_cell.jsx
ADDED
@@ -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
|
-
|
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 `
|
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 }}) %>
|
@@ -1 +1,3 @@
|
|
1
|
-
This kit uses the [Table kit](https://playbook.powerapp.cloud/kits/table) under the hood which comes with
|
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
|
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.
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.html.erb
ADDED
@@ -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 }}) %>
|